@@ -41,6 +41,8 @@ export const inject = ['tools', 'commands', 'subprocess', 'jobs']
4141
4242export { VERSION } from './version.ts'
4343export { Config , resolveConfig } from './config.ts'
44+ // Service Definition — the public score contract (RESULT_SCHEMA, DIMENSIONS,
45+ // badge/tool schemas) re-exported as the plugin's type & validator surface.
4446export { RESULT_SCHEMA , DIMENSIONS , computeTotal , hasEvidence , gradeOf , verdictOf , totalsOf , ScoreResultSchema , LeaderboardRecordSchema } from './result.ts'
4547export type { Dimension , DimensionStatus , TargetKind , EvidenceLink , DimensionScore , ScoreResult , LeaderboardRow , LeaderboardRecord } from './result.ts'
4648export { BADGE_SCHEMA , DIMENSION_BADGE_LABELS , gradeColor , statusColor , renderShieldsSvg , shieldsEndpointUrl , badgeJson , renderScoreBadge , renderDimensionBadges , renderBadgeMarkdown } from './badge.ts'
@@ -86,10 +88,14 @@ export function apply(ctx: Context, config: Config): void {
8688 const runner = new ScoreRunner ( deps )
8789 const services : ToolServices = { ...deps , runner }
8890
91+ // Service Provider — register the scoring tools with the host tool registry
92+ // (one effect per tool, all owned by this fiber).
8993 for ( const tool of allTools ( services ) ) {
9094 ctx . effect ( ( ) => ctx . tools . register ( tool ) , `dsh-score: ${ tool . name } tool` )
9195 }
9296
97+ // Consumer — the /score command handler consumes the shared ToolServices
98+ // (subprocess probe driver, jobs, storage domain) on every invocation.
9399 ctx . effect ( ( ) => ctx . commands . register ( {
94100 name : 'score' ,
95101 description : 'Batch score plugin targets (background job + leaderboard snapshot)' ,
0 commit comments