Skip to content

Commit dfacc8a

Browse files
committed
docs: add seam role markers(verify-seam 三角色)
1 parent 455a2d4 commit dfacc8a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export const inject = ['tools', 'commands', 'subprocess', 'jobs']
4141

4242
export { VERSION } from './version.ts'
4343
export { 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.
4446
export { RESULT_SCHEMA, DIMENSIONS, computeTotal, hasEvidence, gradeOf, verdictOf, totalsOf, ScoreResultSchema, LeaderboardRecordSchema } from './result.ts'
4547
export type { Dimension, DimensionStatus, TargetKind, EvidenceLink, DimensionScore, ScoreResult, LeaderboardRow, LeaderboardRecord } from './result.ts'
4648
export { 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

Comments
 (0)