@zhixuan92/multi-model-agent-core 5.1.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bounded-execution/activity-tracker-types.d.ts +30 -15
- package/dist/bounded-execution/activity-tracker-types.d.ts.map +1 -1
- package/dist/bounded-execution/activity-tracker-types.js.map +1 -1
- package/dist/bounded-execution/activity-tracker.d.ts +2 -2
- package/dist/bounded-execution/activity-tracker.d.ts.map +1 -1
- package/dist/bounded-execution/activity-tracker.js +4 -5
- package/dist/bounded-execution/activity-tracker.js.map +1 -1
- package/dist/config/schema.d.ts +41 -2
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +1 -2
- package/dist/config/schema.js.map +1 -1
- package/dist/events/task-envelope.d.ts +5 -5
- package/dist/events/task-envelope.d.ts.map +1 -1
- package/dist/events/task-envelope.js +3 -6
- package/dist/events/task-envelope.js.map +1 -1
- package/dist/events/telemetry-uploader.d.ts +1 -1
- package/dist/events/telemetry-uploader.d.ts.map +1 -1
- package/dist/events/to-wire-record.d.ts +1 -1
- package/dist/events/to-wire-record.d.ts.map +1 -1
- package/dist/events/to-wire-record.js +1 -1
- package/dist/events/to-wire-record.js.map +1 -1
- package/dist/events/wire-schema.d.ts +34 -11
- package/dist/events/wire-schema.d.ts.map +1 -1
- package/dist/events/wire-schema.js +8 -8
- package/dist/events/wire-schema.js.map +1 -1
- package/dist/index.d.ts +13 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -17
- package/dist/index.js.map +1 -1
- package/dist/providers/agent-resolver.js +1 -1
- package/dist/providers/agent-resolver.js.map +1 -1
- package/dist/providers/claude-session.d.ts +2 -1
- package/dist/providers/claude-session.d.ts.map +1 -1
- package/dist/providers/claude-session.js +29 -2
- package/dist/providers/claude-session.js.map +1 -1
- package/dist/providers/codex-cli-session.d.ts +3 -2
- package/dist/providers/codex-cli-session.d.ts.map +1 -1
- package/dist/providers/codex-cli-session.js +5 -2
- package/dist/providers/codex-cli-session.js.map +1 -1
- package/dist/providers/provider-factory.d.ts +2 -2
- package/dist/providers/provider-factory.d.ts.map +1 -1
- package/dist/providers/provider-factory.js +12 -12
- package/dist/providers/provider-factory.js.map +1 -1
- package/dist/providers/runner-types.d.ts +3 -16
- package/dist/providers/runner-types.d.ts.map +1 -1
- package/dist/research/index.d.ts +11 -1
- package/dist/research/index.d.ts.map +1 -1
- package/dist/research/index.js +8 -1
- package/dist/research/index.js.map +1 -1
- package/dist/stores/context-block-tool.d.ts +2 -3
- package/dist/stores/context-block-tool.d.ts.map +1 -1
- package/dist/stores/context-block-tool.js +1 -1
- package/dist/stores/context-block-tool.js.map +1 -1
- package/dist/stores/project-context-registry.d.ts +0 -9
- package/dist/stores/project-context-registry.d.ts.map +1 -1
- package/dist/stores/project-context-registry.js +0 -4
- package/dist/stores/project-context-registry.js.map +1 -1
- package/dist/types/brief-quality-policy.d.ts.map +1 -1
- package/dist/types/enums.d.ts +0 -9
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/enums.js +0 -10
- package/dist/types/enums.js.map +1 -1
- package/dist/types/run-result.d.ts +48 -23
- package/dist/types/run-result.d.ts.map +1 -1
- package/dist/types/run-result.js +3 -16
- package/dist/types/run-result.js.map +1 -1
- package/dist/types/stage-stats.d.ts +1 -1
- package/dist/types/stage-stats.d.ts.map +1 -1
- package/dist/types/stage-stats.js +2 -4
- package/dist/types/stage-stats.js.map +1 -1
- package/dist/types/task-spec.d.ts +3 -17
- package/dist/types/task-spec.d.ts.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/unified/reviewer-output-parser.d.ts +51 -0
- package/dist/unified/reviewer-output-parser.d.ts.map +1 -0
- package/dist/unified/reviewer-output-parser.js +39 -0
- package/dist/unified/reviewer-output-parser.js.map +1 -0
- package/dist/unified/skill-loader.d.ts +9 -0
- package/dist/unified/skill-loader.d.ts.map +1 -0
- package/dist/unified/skill-loader.js +45 -0
- package/dist/unified/skill-loader.js.map +1 -0
- package/dist/unified/task-input-schema.d.ts +217 -0
- package/dist/unified/task-input-schema.d.ts.map +1 -0
- package/dist/unified/task-input-schema.js +35 -0
- package/dist/unified/task-input-schema.js.map +1 -0
- package/dist/unified/task-registry.d.ts +23 -0
- package/dist/unified/task-registry.d.ts.map +1 -0
- package/dist/unified/task-registry.js +56 -0
- package/dist/unified/task-registry.js.map +1 -0
- package/dist/unified/two-phase-pipeline.d.ts +52 -0
- package/dist/unified/two-phase-pipeline.d.ts.map +1 -0
- package/dist/unified/two-phase-pipeline.js +95 -0
- package/dist/unified/two-phase-pipeline.js.map +1 -0
- package/dist/unified/type-registry.d.ts +13 -0
- package/dist/unified/type-registry.d.ts.map +1 -0
- package/dist/unified/type-registry.js +30 -0
- package/dist/unified/type-registry.js.map +1 -0
- package/dist/unified/worktree-manager.d.ts +43 -0
- package/dist/unified/worktree-manager.d.ts.map +1 -0
- package/dist/unified/worktree-manager.js +76 -0
- package/dist/unified/worktree-manager.js.map +1 -0
- package/package.json +5 -117
- package/dist/bounded-execution/file-artifact-check.d.ts +0 -7
- package/dist/bounded-execution/file-artifact-check.d.ts.map +0 -1
- package/dist/bounded-execution/file-artifact-check.js +0 -13
- package/dist/bounded-execution/file-artifact-check.js.map +0 -1
- package/dist/bounded-execution/progress-events-subscriber.d.ts +0 -33
- package/dist/bounded-execution/progress-events-subscriber.d.ts.map +0 -1
- package/dist/bounded-execution/progress-events-subscriber.js +0 -59
- package/dist/bounded-execution/progress-events-subscriber.js.map +0 -1
- package/dist/bounded-execution/progress-watchdog.d.ts +0 -43
- package/dist/bounded-execution/progress-watchdog.d.ts.map +0 -1
- package/dist/bounded-execution/progress-watchdog.js +0 -170
- package/dist/bounded-execution/progress-watchdog.js.map +0 -1
- package/dist/bounded-execution/real-diff.d.ts +0 -17
- package/dist/bounded-execution/real-diff.d.ts.map +0 -1
- package/dist/bounded-execution/real-diff.js +0 -59
- package/dist/bounded-execution/real-diff.js.map +0 -1
- package/dist/bounded-execution/scope-match.d.ts +0 -7
- package/dist/bounded-execution/scope-match.d.ts.map +0 -1
- package/dist/bounded-execution/scope-match.js +0 -28
- package/dist/bounded-execution/scope-match.js.map +0 -1
- package/dist/bounded-execution/stall-watchdog.d.ts +0 -18
- package/dist/bounded-execution/stall-watchdog.d.ts.map +0 -1
- package/dist/bounded-execution/stall-watchdog.js +0 -134
- package/dist/bounded-execution/stall-watchdog.js.map +0 -1
- package/dist/bounded-execution/wall-clock-guard.d.ts +0 -12
- package/dist/bounded-execution/wall-clock-guard.d.ts.map +0 -1
- package/dist/bounded-execution/wall-clock-guard.js +0 -27
- package/dist/bounded-execution/wall-clock-guard.js.map +0 -1
- package/dist/config/canonical-model-identity.d.ts +0 -9
- package/dist/config/canonical-model-identity.d.ts.map +0 -1
- package/dist/config/canonical-model-identity.js +0 -54
- package/dist/config/canonical-model-identity.js.map +0 -1
- package/dist/journal/default-schema.d.ts +0 -2
- package/dist/journal/default-schema.d.ts.map +0 -1
- package/dist/journal/default-schema.js +0 -27
- package/dist/journal/default-schema.js.map +0 -1
- package/dist/journal/types.d.ts +0 -22
- package/dist/journal/types.d.ts.map +0 -1
- package/dist/journal/types.js +0 -5
- package/dist/journal/types.js.map +0 -1
- package/dist/lifecycle/annotate-parser.d.ts +0 -11
- package/dist/lifecycle/annotate-parser.d.ts.map +0 -1
- package/dist/lifecycle/annotate-parser.js +0 -74
- package/dist/lifecycle/annotate-parser.js.map +0 -1
- package/dist/lifecycle/annotate-prompts.d.ts +0 -9
- package/dist/lifecycle/annotate-prompts.d.ts.map +0 -1
- package/dist/lifecycle/annotate-prompts.js +0 -95
- package/dist/lifecycle/annotate-prompts.js.map +0 -1
- package/dist/lifecycle/auto-commit.d.ts +0 -3
- package/dist/lifecycle/auto-commit.d.ts.map +0 -1
- package/dist/lifecycle/auto-commit.js +0 -5
- package/dist/lifecycle/auto-commit.js.map +0 -1
- package/dist/lifecycle/auto-register-context-block.d.ts +0 -11
- package/dist/lifecycle/auto-register-context-block.d.ts.map +0 -1
- package/dist/lifecycle/auto-register-context-block.js +0 -18
- package/dist/lifecycle/auto-register-context-block.js.map +0 -1
- package/dist/lifecycle/build-cancelled-result.d.ts +0 -11
- package/dist/lifecycle/build-cancelled-result.d.ts.map +0 -1
- package/dist/lifecycle/build-cancelled-result.js +0 -25
- package/dist/lifecycle/build-cancelled-result.js.map +0 -1
- package/dist/lifecycle/derive-completion.d.ts +0 -28
- package/dist/lifecycle/derive-completion.d.ts.map +0 -1
- package/dist/lifecycle/derive-completion.js +0 -79
- package/dist/lifecycle/derive-completion.js.map +0 -1
- package/dist/lifecycle/executor-output-types.d.ts +0 -53
- package/dist/lifecycle/executor-output-types.d.ts.map +0 -1
- package/dist/lifecycle/executor-output-types.js +0 -2
- package/dist/lifecycle/executor-output-types.js.map +0 -1
- package/dist/lifecycle/file-confinement-check.d.ts +0 -17
- package/dist/lifecycle/file-confinement-check.d.ts.map +0 -1
- package/dist/lifecycle/file-confinement-check.js +0 -44
- package/dist/lifecycle/file-confinement-check.js.map +0 -1
- package/dist/lifecycle/findings-parser.d.ts +0 -18
- package/dist/lifecycle/findings-parser.d.ts.map +0 -1
- package/dist/lifecycle/findings-parser.js +0 -143
- package/dist/lifecycle/findings-parser.js.map +0 -1
- package/dist/lifecycle/git-exec.d.ts +0 -62
- package/dist/lifecycle/git-exec.d.ts.map +0 -1
- package/dist/lifecycle/git-exec.js +0 -135
- package/dist/lifecycle/git-exec.js.map +0 -1
- package/dist/lifecycle/git-toplevel.d.ts +0 -12
- package/dist/lifecycle/git-toplevel.d.ts.map +0 -1
- package/dist/lifecycle/git-toplevel.js +0 -52
- package/dist/lifecycle/git-toplevel.js.map +0 -1
- package/dist/lifecycle/goal-builder.d.ts +0 -35
- package/dist/lifecycle/goal-builder.d.ts.map +0 -1
- package/dist/lifecycle/goal-builder.js +0 -56
- package/dist/lifecycle/goal-builder.js.map +0 -1
- package/dist/lifecycle/goal-preconditions.d.ts +0 -21
- package/dist/lifecycle/goal-preconditions.d.ts.map +0 -1
- package/dist/lifecycle/goal-preconditions.js +0 -33
- package/dist/lifecycle/goal-preconditions.js.map +0 -1
- package/dist/lifecycle/goal-prompts.d.ts +0 -27
- package/dist/lifecycle/goal-prompts.d.ts.map +0 -1
- package/dist/lifecycle/goal-prompts.js +0 -204
- package/dist/lifecycle/goal-prompts.js.map +0 -1
- package/dist/lifecycle/goal-report.d.ts +0 -42
- package/dist/lifecycle/goal-report.d.ts.map +0 -1
- package/dist/lifecycle/goal-report.js +0 -125
- package/dist/lifecycle/goal-report.js.map +0 -1
- package/dist/lifecycle/handlers/annotate-stage.d.ts +0 -35
- package/dist/lifecycle/handlers/annotate-stage.d.ts.map +0 -1
- package/dist/lifecycle/handlers/annotate-stage.js +0 -387
- package/dist/lifecycle/handlers/annotate-stage.js.map +0 -1
- package/dist/lifecycle/handlers/baseline-handlers.d.ts +0 -12
- package/dist/lifecycle/handlers/baseline-handlers.d.ts.map +0 -1
- package/dist/lifecycle/handlers/baseline-handlers.js +0 -281
- package/dist/lifecycle/handlers/baseline-handlers.js.map +0 -1
- package/dist/lifecycle/handlers/enrich-runtime-result.d.ts +0 -3
- package/dist/lifecycle/handlers/enrich-runtime-result.d.ts.map +0 -1
- package/dist/lifecycle/handlers/enrich-runtime-result.js +0 -239
- package/dist/lifecycle/handlers/enrich-runtime-result.js.map +0 -1
- package/dist/lifecycle/handlers/implement-stage.d.ts +0 -10
- package/dist/lifecycle/handlers/implement-stage.d.ts.map +0 -1
- package/dist/lifecycle/handlers/implement-stage.js +0 -228
- package/dist/lifecycle/handlers/implement-stage.js.map +0 -1
- package/dist/lifecycle/handlers/prepare-execution-context-handler.d.ts +0 -13
- package/dist/lifecycle/handlers/prepare-execution-context-handler.d.ts.map +0 -1
- package/dist/lifecycle/handlers/prepare-execution-context-handler.js +0 -61
- package/dist/lifecycle/handlers/prepare-execution-context-handler.js.map +0 -1
- package/dist/lifecycle/handlers/read-route-implementer.d.ts +0 -52
- package/dist/lifecycle/handlers/read-route-implementer.d.ts.map +0 -1
- package/dist/lifecycle/handlers/read-route-implementer.js +0 -109
- package/dist/lifecycle/handlers/read-route-implementer.js.map +0 -1
- package/dist/lifecycle/handlers/register-context-block-handlers.d.ts +0 -4
- package/dist/lifecycle/handlers/register-context-block-handlers.d.ts.map +0 -1
- package/dist/lifecycle/handlers/register-context-block-handlers.js +0 -35
- package/dist/lifecycle/handlers/register-context-block-handlers.js.map +0 -1
- package/dist/lifecycle/handlers/review-fix-stage.d.ts +0 -9
- package/dist/lifecycle/handlers/review-fix-stage.d.ts.map +0 -1
- package/dist/lifecycle/handlers/review-fix-stage.js +0 -75
- package/dist/lifecycle/handlers/review-fix-stage.js.map +0 -1
- package/dist/lifecycle/handlers/terminal-handlers.d.ts +0 -61
- package/dist/lifecycle/handlers/terminal-handlers.d.ts.map +0 -1
- package/dist/lifecycle/handlers/terminal-handlers.js +0 -339
- package/dist/lifecycle/handlers/terminal-handlers.js.map +0 -1
- package/dist/lifecycle/lifecycle-context.d.ts +0 -109
- package/dist/lifecycle/lifecycle-context.d.ts.map +0 -1
- package/dist/lifecycle/lifecycle-context.js +0 -2
- package/dist/lifecycle/lifecycle-context.js.map +0 -1
- package/dist/lifecycle/lifecycle-dispatcher.d.ts +0 -35
- package/dist/lifecycle/lifecycle-dispatcher.d.ts.map +0 -1
- package/dist/lifecycle/lifecycle-dispatcher.js +0 -64
- package/dist/lifecycle/lifecycle-dispatcher.js.map +0 -1
- package/dist/lifecycle/lifecycle-driver.d.ts +0 -16
- package/dist/lifecycle/lifecycle-driver.d.ts.map +0 -1
- package/dist/lifecycle/lifecycle-driver.js +0 -334
- package/dist/lifecycle/lifecycle-driver.js.map +0 -1
- package/dist/lifecycle/merge-stage-stats.d.ts +0 -62
- package/dist/lifecycle/merge-stage-stats.d.ts.map +0 -1
- package/dist/lifecycle/merge-stage-stats.js +0 -136
- package/dist/lifecycle/merge-stage-stats.js.map +0 -1
- package/dist/lifecycle/normalize-output-targets.d.ts +0 -2
- package/dist/lifecycle/normalize-output-targets.d.ts.map +0 -1
- package/dist/lifecycle/normalize-output-targets.js +0 -14
- package/dist/lifecycle/normalize-output-targets.js.map +0 -1
- package/dist/lifecycle/perform-implementation.d.ts +0 -3
- package/dist/lifecycle/perform-implementation.d.ts.map +0 -1
- package/dist/lifecycle/perform-implementation.js +0 -371
- package/dist/lifecycle/perform-implementation.js.map +0 -1
- package/dist/lifecycle/read-only-subtype-spec.d.ts +0 -18
- package/dist/lifecycle/read-only-subtype-spec.d.ts.map +0 -1
- package/dist/lifecycle/read-only-subtype-spec.js +0 -2
- package/dist/lifecycle/read-only-subtype-spec.js.map +0 -1
- package/dist/lifecycle/review-verdict-mapping.d.ts +0 -16
- package/dist/lifecycle/review-verdict-mapping.d.ts.map +0 -1
- package/dist/lifecycle/review-verdict-mapping.js +0 -24
- package/dist/lifecycle/review-verdict-mapping.js.map +0 -1
- package/dist/lifecycle/shared-compute.d.ts +0 -14
- package/dist/lifecycle/shared-compute.d.ts.map +0 -1
- package/dist/lifecycle/shared-compute.js +0 -51
- package/dist/lifecycle/shared-compute.js.map +0 -1
- package/dist/lifecycle/stage-idle-tracker.d.ts +0 -14
- package/dist/lifecycle/stage-idle-tracker.d.ts.map +0 -1
- package/dist/lifecycle/stage-idle-tracker.js +0 -17
- package/dist/lifecycle/stage-idle-tracker.js.map +0 -1
- package/dist/lifecycle/stage-io.d.ts +0 -134
- package/dist/lifecycle/stage-io.d.ts.map +0 -1
- package/dist/lifecycle/stage-io.js +0 -9
- package/dist/lifecycle/stage-io.js.map +0 -1
- package/dist/lifecycle/stage-labels.d.ts +0 -7
- package/dist/lifecycle/stage-labels.d.ts.map +0 -1
- package/dist/lifecycle/stage-labels.js +0 -19
- package/dist/lifecycle/stage-labels.js.map +0 -1
- package/dist/lifecycle/stage-plan-builder.d.ts +0 -4
- package/dist/lifecycle/stage-plan-builder.d.ts.map +0 -1
- package/dist/lifecycle/stage-plan-builder.js +0 -157
- package/dist/lifecycle/stage-plan-builder.js.map +0 -1
- package/dist/lifecycle/stage-plan-types.d.ts +0 -131
- package/dist/lifecycle/stage-plan-types.d.ts.map +0 -1
- package/dist/lifecycle/stage-plan-types.js +0 -28
- package/dist/lifecycle/stage-plan-types.js.map +0 -1
- package/dist/lifecycle/stage-progression.d.ts +0 -6
- package/dist/lifecycle/stage-progression.d.ts.map +0 -1
- package/dist/lifecycle/stage-progression.js +0 -100
- package/dist/lifecycle/stage-progression.js.map +0 -1
- package/dist/lifecycle/task-executor.d.ts +0 -24
- package/dist/lifecycle/task-executor.d.ts.map +0 -1
- package/dist/lifecycle/task-executor.js +0 -365
- package/dist/lifecycle/task-executor.js.map +0 -1
- package/dist/lifecycle/task-runner.d.ts +0 -66
- package/dist/lifecycle/task-runner.d.ts.map +0 -1
- package/dist/lifecycle/task-runner.js +0 -334
- package/dist/lifecycle/task-runner.js.map +0 -1
- package/dist/lifecycle/tool-category.d.ts +0 -2
- package/dist/lifecycle/tool-category.d.ts.map +0 -1
- package/dist/lifecycle/tool-category.js +0 -6
- package/dist/lifecycle/tool-category.js.map +0 -1
- package/dist/lifecycle/tool-config-types.d.ts +0 -32
- package/dist/lifecycle/tool-config-types.d.ts.map +0 -1
- package/dist/lifecycle/tool-config-types.js +0 -2
- package/dist/lifecycle/tool-config-types.js.map +0 -1
- package/dist/lifecycle/warm-followup.d.ts +0 -3
- package/dist/lifecycle/warm-followup.d.ts.map +0 -1
- package/dist/lifecycle/warm-followup.js +0 -16
- package/dist/lifecycle/warm-followup.js.map +0 -1
- package/dist/lifecycle/worker-output-contract.d.ts +0 -22
- package/dist/lifecycle/worker-output-contract.d.ts.map +0 -1
- package/dist/lifecycle/worker-output-contract.js +0 -91
- package/dist/lifecycle/worker-output-contract.js.map +0 -1
- package/dist/lifecycle/write-goal-lock.d.ts +0 -29
- package/dist/lifecycle/write-goal-lock.d.ts.map +0 -1
- package/dist/lifecycle/write-goal-lock.js +0 -70
- package/dist/lifecycle/write-goal-lock.js.map +0 -1
- package/dist/providers/assemble-run-result.d.ts +0 -17
- package/dist/providers/assemble-run-result.d.ts.map +0 -1
- package/dist/providers/assemble-run-result.js +0 -52
- package/dist/providers/assemble-run-result.js.map +0 -1
- package/dist/providers/skill-resolver.d.ts +0 -17
- package/dist/providers/skill-resolver.d.ts.map +0 -1
- package/dist/providers/skill-resolver.js +0 -123
- package/dist/providers/skill-resolver.js.map +0 -1
- package/dist/reporting/batch-persister.d.ts +0 -4
- package/dist/reporting/batch-persister.d.ts.map +0 -1
- package/dist/reporting/batch-persister.js +0 -11
- package/dist/reporting/batch-persister.js.map +0 -1
- package/dist/reporting/commit-stage-runner.d.ts +0 -12
- package/dist/reporting/commit-stage-runner.d.ts.map +0 -1
- package/dist/reporting/commit-stage-runner.js +0 -43
- package/dist/reporting/commit-stage-runner.js.map +0 -1
- package/dist/reporting/derive-investigate-status.d.ts +0 -15
- package/dist/reporting/derive-investigate-status.d.ts.map +0 -1
- package/dist/reporting/derive-investigate-status.js +0 -23
- package/dist/reporting/derive-investigate-status.js.map +0 -1
- package/dist/reporting/extract-fenced-json.d.ts +0 -7
- package/dist/reporting/extract-fenced-json.d.ts.map +0 -1
- package/dist/reporting/extract-fenced-json.js +0 -17
- package/dist/reporting/extract-fenced-json.js.map +0 -1
- package/dist/reporting/findings-headline.d.ts +0 -12
- package/dist/reporting/findings-headline.d.ts.map +0 -1
- package/dist/reporting/findings-headline.js +0 -40
- package/dist/reporting/findings-headline.js.map +0 -1
- package/dist/reporting/findings-outcome.d.ts +0 -13
- package/dist/reporting/findings-outcome.d.ts.map +0 -1
- package/dist/reporting/findings-outcome.js +0 -22
- package/dist/reporting/findings-outcome.js.map +0 -1
- package/dist/reporting/headline-composer.d.ts +0 -29
- package/dist/reporting/headline-composer.d.ts.map +0 -1
- package/dist/reporting/headline-composer.js +0 -10
- package/dist/reporting/headline-composer.js.map +0 -1
- package/dist/reporting/headline-templates/delegate.d.ts +0 -3
- package/dist/reporting/headline-templates/delegate.d.ts.map +0 -1
- package/dist/reporting/headline-templates/delegate.js +0 -42
- package/dist/reporting/headline-templates/delegate.js.map +0 -1
- package/dist/reporting/headline-templates/execute-plan.d.ts +0 -3
- package/dist/reporting/headline-templates/execute-plan.d.ts.map +0 -1
- package/dist/reporting/headline-templates/execute-plan.js +0 -26
- package/dist/reporting/headline-templates/execute-plan.js.map +0 -1
- package/dist/reporting/headline-templates/investigate.d.ts +0 -13
- package/dist/reporting/headline-templates/investigate.d.ts.map +0 -1
- package/dist/reporting/headline-templates/investigate.js +0 -53
- package/dist/reporting/headline-templates/investigate.js.map +0 -1
- package/dist/reporting/headline-templates/journal-recall.d.ts +0 -3
- package/dist/reporting/headline-templates/journal-recall.d.ts.map +0 -1
- package/dist/reporting/headline-templates/journal-recall.js +0 -9
- package/dist/reporting/headline-templates/journal-recall.js.map +0 -1
- package/dist/reporting/headline-templates/journal.d.ts +0 -3
- package/dist/reporting/headline-templates/journal.d.ts.map +0 -1
- package/dist/reporting/headline-templates/journal.js +0 -17
- package/dist/reporting/headline-templates/journal.js.map +0 -1
- package/dist/reporting/headline-templates/research.d.ts +0 -3
- package/dist/reporting/headline-templates/research.d.ts.map +0 -1
- package/dist/reporting/headline-templates/research.js +0 -22
- package/dist/reporting/headline-templates/research.js.map +0 -1
- package/dist/reporting/headline-text.d.ts +0 -36
- package/dist/reporting/headline-text.d.ts.map +0 -1
- package/dist/reporting/headline-text.js +0 -73
- package/dist/reporting/headline-text.js.map +0 -1
- package/dist/reporting/report-parser-slots/delegate-report.d.ts +0 -8
- package/dist/reporting/report-parser-slots/delegate-report.d.ts.map +0 -1
- package/dist/reporting/report-parser-slots/delegate-report.js +0 -12
- package/dist/reporting/report-parser-slots/delegate-report.js.map +0 -1
- package/dist/reporting/report-parser-slots/execute-plan-report.d.ts +0 -11
- package/dist/reporting/report-parser-slots/execute-plan-report.d.ts.map +0 -1
- package/dist/reporting/report-parser-slots/execute-plan-report.js +0 -7
- package/dist/reporting/report-parser-slots/execute-plan-report.js.map +0 -1
- package/dist/reporting/report-parser-slots/investigate-report.d.ts +0 -52
- package/dist/reporting/report-parser-slots/investigate-report.d.ts.map +0 -1
- package/dist/reporting/report-parser-slots/investigate-report.js +0 -307
- package/dist/reporting/report-parser-slots/investigate-report.js.map +0 -1
- package/dist/reporting/report-parser-slots/journal-report.d.ts +0 -19
- package/dist/reporting/report-parser-slots/journal-report.d.ts.map +0 -1
- package/dist/reporting/report-parser-slots/journal-report.js +0 -13
- package/dist/reporting/report-parser-slots/journal-report.js.map +0 -1
- package/dist/reporting/report-parser-slots/no-structured-report.d.ts +0 -10
- package/dist/reporting/report-parser-slots/no-structured-report.d.ts.map +0 -1
- package/dist/reporting/report-parser-slots/no-structured-report.js +0 -13
- package/dist/reporting/report-parser-slots/no-structured-report.js.map +0 -1
- package/dist/reporting/report-parser-slots/research-report.d.ts +0 -31
- package/dist/reporting/report-parser-slots/research-report.d.ts.map +0 -1
- package/dist/reporting/report-parser-slots/research-report.js +0 -50
- package/dist/reporting/report-parser-slots/research-report.js.map +0 -1
- package/dist/reporting/response-envelope-builder.d.ts +0 -32
- package/dist/reporting/response-envelope-builder.d.ts.map +0 -1
- package/dist/reporting/response-envelope-builder.js +0 -26
- package/dist/reporting/response-envelope-builder.js.map +0 -1
- package/dist/reporting/severity.d.ts +0 -62
- package/dist/reporting/severity.d.ts.map +0 -1
- package/dist/reporting/severity.js +0 -93
- package/dist/reporting/severity.js.map +0 -1
- package/dist/reporting/structured-report-parser.d.ts +0 -9
- package/dist/reporting/structured-report-parser.d.ts.map +0 -1
- package/dist/reporting/structured-report-parser.js +0 -8
- package/dist/reporting/structured-report-parser.js.map +0 -1
- package/dist/reporting/terminal-block-registrar.d.ts +0 -14
- package/dist/reporting/terminal-block-registrar.d.ts.map +0 -1
- package/dist/reporting/terminal-block-registrar.js +0 -17
- package/dist/reporting/terminal-block-registrar.js.map +0 -1
- package/dist/reporting/terminal-report-markdown.d.ts +0 -13
- package/dist/reporting/terminal-report-markdown.d.ts.map +0 -1
- package/dist/reporting/terminal-report-markdown.js +0 -31
- package/dist/reporting/terminal-report-markdown.js.map +0 -1
- package/dist/research/research-pre-loop.d.ts +0 -22
- package/dist/research/research-pre-loop.d.ts.map +0 -1
- package/dist/research/research-pre-loop.js +0 -50
- package/dist/research/research-pre-loop.js.map +0 -1
- package/dist/routing/read-route-criteria.d.ts +0 -36
- package/dist/routing/read-route-criteria.d.ts.map +0 -1
- package/dist/routing/read-route-criteria.js +0 -71
- package/dist/routing/read-route-criteria.js.map +0 -1
- package/dist/stores/batch-cache.d.ts +0 -29
- package/dist/stores/batch-cache.d.ts.map +0 -1
- package/dist/stores/batch-cache.js +0 -89
- package/dist/stores/batch-cache.js.map +0 -1
- package/dist/stores/batch-registry.d.ts +0 -138
- package/dist/stores/batch-registry.d.ts.map +0 -1
- package/dist/stores/batch-registry.js +0 -205
- package/dist/stores/batch-registry.js.map +0 -1
- package/dist/tool-surface/register-all-tools.d.ts +0 -4
- package/dist/tool-surface/register-all-tools.d.ts.map +0 -1
- package/dist/tool-surface/register-all-tools.js +0 -35
- package/dist/tool-surface/register-all-tools.js.map +0 -1
- package/dist/tool-surface/tool-surface-registry.d.ts +0 -28
- package/dist/tool-surface/tool-surface-registry.d.ts.map +0 -1
- package/dist/tool-surface/tool-surface-registry.js +0 -16
- package/dist/tool-surface/tool-surface-registry.js.map +0 -1
- package/dist/tools/audit/brief-slot.d.ts +0 -15
- package/dist/tools/audit/brief-slot.d.ts.map +0 -1
- package/dist/tools/audit/brief-slot.js +0 -69
- package/dist/tools/audit/brief-slot.js.map +0 -1
- package/dist/tools/audit/implementer-criteria.d.ts +0 -62
- package/dist/tools/audit/implementer-criteria.d.ts.map +0 -1
- package/dist/tools/audit/implementer-criteria.js +0 -121
- package/dist/tools/audit/implementer-criteria.js.map +0 -1
- package/dist/tools/audit/plan-audit-criteria.d.ts +0 -35
- package/dist/tools/audit/plan-audit-criteria.d.ts.map +0 -1
- package/dist/tools/audit/plan-audit-criteria.js +0 -159
- package/dist/tools/audit/plan-audit-criteria.js.map +0 -1
- package/dist/tools/audit/schema.d.ts +0 -61
- package/dist/tools/audit/schema.d.ts.map +0 -1
- package/dist/tools/audit/schema.js +0 -21
- package/dist/tools/audit/schema.js.map +0 -1
- package/dist/tools/audit/skill-audit-criteria.d.ts +0 -9
- package/dist/tools/audit/skill-audit-criteria.d.ts.map +0 -1
- package/dist/tools/audit/skill-audit-criteria.js +0 -52
- package/dist/tools/audit/skill-audit-criteria.js.map +0 -1
- package/dist/tools/audit/spec-audit-criteria.d.ts +0 -9
- package/dist/tools/audit/spec-audit-criteria.d.ts.map +0 -1
- package/dist/tools/audit/spec-audit-criteria.js +0 -55
- package/dist/tools/audit/spec-audit-criteria.js.map +0 -1
- package/dist/tools/audit/subtypes.d.ts +0 -4
- package/dist/tools/audit/subtypes.d.ts.map +0 -1
- package/dist/tools/audit/subtypes.js +0 -69
- package/dist/tools/audit/subtypes.js.map +0 -1
- package/dist/tools/audit/tool-config.d.ts +0 -7
- package/dist/tools/audit/tool-config.d.ts.map +0 -1
- package/dist/tools/audit/tool-config.js +0 -60
- package/dist/tools/audit/tool-config.js.map +0 -1
- package/dist/tools/criteria-types.d.ts +0 -27
- package/dist/tools/criteria-types.d.ts.map +0 -1
- package/dist/tools/criteria-types.js +0 -25
- package/dist/tools/criteria-types.js.map +0 -1
- package/dist/tools/debug/brief-slot.d.ts +0 -15
- package/dist/tools/debug/brief-slot.d.ts.map +0 -1
- package/dist/tools/debug/brief-slot.js +0 -10
- package/dist/tools/debug/brief-slot.js.map +0 -1
- package/dist/tools/debug/implementer-criteria.d.ts +0 -45
- package/dist/tools/debug/implementer-criteria.d.ts.map +0 -1
- package/dist/tools/debug/implementer-criteria.js +0 -97
- package/dist/tools/debug/implementer-criteria.js.map +0 -1
- package/dist/tools/debug/schema.d.ts +0 -60
- package/dist/tools/debug/schema.d.ts.map +0 -1
- package/dist/tools/debug/schema.js +0 -17
- package/dist/tools/debug/schema.js.map +0 -1
- package/dist/tools/debug/subtypes.d.ts +0 -4
- package/dist/tools/debug/subtypes.d.ts.map +0 -1
- package/dist/tools/debug/subtypes.js +0 -26
- package/dist/tools/debug/subtypes.js.map +0 -1
- package/dist/tools/debug/tool-config.d.ts +0 -7
- package/dist/tools/debug/tool-config.d.ts.map +0 -1
- package/dist/tools/debug/tool-config.js +0 -55
- package/dist/tools/debug/tool-config.js.map +0 -1
- package/dist/tools/delegate/brief-slot.d.ts +0 -20
- package/dist/tools/delegate/brief-slot.d.ts.map +0 -1
- package/dist/tools/delegate/brief-slot.js +0 -31
- package/dist/tools/delegate/brief-slot.js.map +0 -1
- package/dist/tools/delegate/implementer-criteria.d.ts +0 -53
- package/dist/tools/delegate/implementer-criteria.d.ts.map +0 -1
- package/dist/tools/delegate/implementer-criteria.js +0 -99
- package/dist/tools/delegate/implementer-criteria.js.map +0 -1
- package/dist/tools/delegate/schema.d.ts +0 -70
- package/dist/tools/delegate/schema.d.ts.map +0 -1
- package/dist/tools/delegate/schema.js +0 -24
- package/dist/tools/delegate/schema.js.map +0 -1
- package/dist/tools/delegate/tool-config.d.ts +0 -7
- package/dist/tools/delegate/tool-config.d.ts.map +0 -1
- package/dist/tools/delegate/tool-config.js +0 -47
- package/dist/tools/delegate/tool-config.js.map +0 -1
- package/dist/tools/execute-plan/barrel.d.ts +0 -2
- package/dist/tools/execute-plan/barrel.d.ts.map +0 -1
- package/dist/tools/execute-plan/barrel.js +0 -7
- package/dist/tools/execute-plan/barrel.js.map +0 -1
- package/dist/tools/execute-plan/brief-slot.d.ts +0 -25
- package/dist/tools/execute-plan/brief-slot.d.ts.map +0 -1
- package/dist/tools/execute-plan/brief-slot.js +0 -124
- package/dist/tools/execute-plan/brief-slot.js.map +0 -1
- package/dist/tools/execute-plan/implementer-criteria.d.ts +0 -57
- package/dist/tools/execute-plan/implementer-criteria.d.ts.map +0 -1
- package/dist/tools/execute-plan/implementer-criteria.js +0 -108
- package/dist/tools/execute-plan/implementer-criteria.js.map +0 -1
- package/dist/tools/execute-plan/plan-extractor.d.ts +0 -21
- package/dist/tools/execute-plan/plan-extractor.d.ts.map +0 -1
- package/dist/tools/execute-plan/plan-extractor.js +0 -96
- package/dist/tools/execute-plan/plan-extractor.js.map +0 -1
- package/dist/tools/execute-plan/tool-config.d.ts +0 -68
- package/dist/tools/execute-plan/tool-config.d.ts.map +0 -1
- package/dist/tools/execute-plan/tool-config.js +0 -58
- package/dist/tools/execute-plan/tool-config.js.map +0 -1
- package/dist/tools/index.d.ts +0 -8
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -14
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/investigate/brief-slot.d.ts +0 -15
- package/dist/tools/investigate/brief-slot.d.ts.map +0 -1
- package/dist/tools/investigate/brief-slot.js +0 -9
- package/dist/tools/investigate/brief-slot.js.map +0 -1
- package/dist/tools/investigate/implementer-criteria.d.ts +0 -52
- package/dist/tools/investigate/implementer-criteria.d.ts.map +0 -1
- package/dist/tools/investigate/implementer-criteria.js +0 -106
- package/dist/tools/investigate/implementer-criteria.js.map +0 -1
- package/dist/tools/investigate/schema.d.ts +0 -62
- package/dist/tools/investigate/schema.d.ts.map +0 -1
- package/dist/tools/investigate/schema.js +0 -13
- package/dist/tools/investigate/schema.js.map +0 -1
- package/dist/tools/investigate/subtypes.d.ts +0 -4
- package/dist/tools/investigate/subtypes.d.ts.map +0 -1
- package/dist/tools/investigate/subtypes.js +0 -26
- package/dist/tools/investigate/subtypes.js.map +0 -1
- package/dist/tools/investigate/tool-config.d.ts +0 -8
- package/dist/tools/investigate/tool-config.d.ts.map +0 -1
- package/dist/tools/investigate/tool-config.js +0 -68
- package/dist/tools/investigate/tool-config.js.map +0 -1
- package/dist/tools/journal/recall/brief-slot.d.ts +0 -7
- package/dist/tools/journal/recall/brief-slot.d.ts.map +0 -1
- package/dist/tools/journal/recall/brief-slot.js +0 -5
- package/dist/tools/journal/recall/brief-slot.js.map +0 -1
- package/dist/tools/journal/recall/implementer-criteria.d.ts +0 -9
- package/dist/tools/journal/recall/implementer-criteria.d.ts.map +0 -1
- package/dist/tools/journal/recall/implementer-criteria.js +0 -23
- package/dist/tools/journal/recall/implementer-criteria.js.map +0 -1
- package/dist/tools/journal/recall/schema.d.ts +0 -54
- package/dist/tools/journal/recall/schema.d.ts.map +0 -1
- package/dist/tools/journal/recall/schema.js +0 -10
- package/dist/tools/journal/recall/schema.js.map +0 -1
- package/dist/tools/journal/recall/subtypes.d.ts +0 -4
- package/dist/tools/journal/recall/subtypes.d.ts.map +0 -1
- package/dist/tools/journal/recall/subtypes.js +0 -25
- package/dist/tools/journal/recall/subtypes.js.map +0 -1
- package/dist/tools/journal/recall/tool-config.d.ts +0 -8
- package/dist/tools/journal/recall/tool-config.d.ts.map +0 -1
- package/dist/tools/journal/recall/tool-config.js +0 -46
- package/dist/tools/journal/recall/tool-config.js.map +0 -1
- package/dist/tools/journal/record/brief-slot.d.ts +0 -15
- package/dist/tools/journal/record/brief-slot.d.ts.map +0 -1
- package/dist/tools/journal/record/brief-slot.js +0 -28
- package/dist/tools/journal/record/brief-slot.js.map +0 -1
- package/dist/tools/journal/record/implementer-criteria.d.ts +0 -6
- package/dist/tools/journal/record/implementer-criteria.d.ts.map +0 -1
- package/dist/tools/journal/record/implementer-criteria.js +0 -20
- package/dist/tools/journal/record/implementer-criteria.js.map +0 -1
- package/dist/tools/journal/record/schema.d.ts +0 -55
- package/dist/tools/journal/record/schema.d.ts.map +0 -1
- package/dist/tools/journal/record/schema.js +0 -12
- package/dist/tools/journal/record/schema.js.map +0 -1
- package/dist/tools/journal/record/tool-config.d.ts +0 -7
- package/dist/tools/journal/record/tool-config.d.ts.map +0 -1
- package/dist/tools/journal/record/tool-config.js +0 -47
- package/dist/tools/journal/record/tool-config.js.map +0 -1
- package/dist/tools/read-route-prompt.d.ts +0 -113
- package/dist/tools/read-route-prompt.d.ts.map +0 -1
- package/dist/tools/read-route-prompt.js +0 -86
- package/dist/tools/read-route-prompt.js.map +0 -1
- package/dist/tools/register-context-block/schema.d.ts +0 -8
- package/dist/tools/register-context-block/schema.d.ts.map +0 -1
- package/dist/tools/register-context-block/schema.js +0 -7
- package/dist/tools/register-context-block/schema.js.map +0 -1
- package/dist/tools/register-context-block/tool-config.d.ts +0 -6
- package/dist/tools/register-context-block/tool-config.d.ts.map +0 -1
- package/dist/tools/register-context-block/tool-config.js +0 -39
- package/dist/tools/register-context-block/tool-config.js.map +0 -1
- package/dist/tools/research/brief-slot.d.ts +0 -37
- package/dist/tools/research/brief-slot.d.ts.map +0 -1
- package/dist/tools/research/brief-slot.js +0 -68
- package/dist/tools/research/brief-slot.js.map +0 -1
- package/dist/tools/research/implementer-criteria.d.ts +0 -13
- package/dist/tools/research/implementer-criteria.d.ts.map +0 -1
- package/dist/tools/research/implementer-criteria.js +0 -109
- package/dist/tools/research/implementer-criteria.js.map +0 -1
- package/dist/tools/research/schema.d.ts +0 -11
- package/dist/tools/research/schema.d.ts.map +0 -1
- package/dist/tools/research/schema.js +0 -59
- package/dist/tools/research/schema.js.map +0 -1
- package/dist/tools/research/subtypes.d.ts +0 -4
- package/dist/tools/research/subtypes.d.ts.map +0 -1
- package/dist/tools/research/subtypes.js +0 -25
- package/dist/tools/research/subtypes.js.map +0 -1
- package/dist/tools/research/tool-config.d.ts +0 -8
- package/dist/tools/research/tool-config.d.ts.map +0 -1
- package/dist/tools/research/tool-config.js +0 -48
- package/dist/tools/research/tool-config.js.map +0 -1
- package/dist/tools/research/two-turn-driver.d.ts +0 -16
- package/dist/tools/research/two-turn-driver.d.ts.map +0 -1
- package/dist/tools/research/two-turn-driver.js +0 -41
- package/dist/tools/research/two-turn-driver.js.map +0 -1
- package/dist/tools/retry/brief-slot.d.ts +0 -7
- package/dist/tools/retry/brief-slot.d.ts.map +0 -1
- package/dist/tools/retry/brief-slot.js +0 -3
- package/dist/tools/retry/brief-slot.js.map +0 -1
- package/dist/tools/retry/schema.d.ts +0 -53
- package/dist/tools/retry/schema.d.ts.map +0 -1
- package/dist/tools/retry/schema.js +0 -12
- package/dist/tools/retry/schema.js.map +0 -1
- package/dist/tools/retry/tool-config.d.ts +0 -7
- package/dist/tools/retry/tool-config.d.ts.map +0 -1
- package/dist/tools/retry/tool-config.js +0 -79
- package/dist/tools/retry/tool-config.js.map +0 -1
- package/dist/tools/review/brief-slot.d.ts +0 -11
- package/dist/tools/review/brief-slot.d.ts.map +0 -1
- package/dist/tools/review/brief-slot.js +0 -23
- package/dist/tools/review/brief-slot.js.map +0 -1
- package/dist/tools/review/implementer-criteria.d.ts +0 -48
- package/dist/tools/review/implementer-criteria.d.ts.map +0 -1
- package/dist/tools/review/implementer-criteria.js +0 -108
- package/dist/tools/review/implementer-criteria.js.map +0 -1
- package/dist/tools/review/schema.d.ts +0 -64
- package/dist/tools/review/schema.d.ts.map +0 -1
- package/dist/tools/review/schema.js +0 -17
- package/dist/tools/review/schema.js.map +0 -1
- package/dist/tools/review/subtypes.d.ts +0 -4
- package/dist/tools/review/subtypes.d.ts.map +0 -1
- package/dist/tools/review/subtypes.js +0 -27
- package/dist/tools/review/subtypes.js.map +0 -1
- package/dist/tools/review/tool-config.d.ts +0 -7
- package/dist/tools/review/tool-config.d.ts.map +0 -1
- package/dist/tools/review/tool-config.js +0 -94
- package/dist/tools/review/tool-config.js.map +0 -1
- package/dist/tools/shared-output.d.ts +0 -56
- package/dist/tools/shared-output.d.ts.map +0 -1
- package/dist/tools/shared-output.js +0 -33
- package/dist/tools/shared-output.js.map +0 -1
- package/dist/types/review-policy.d.ts +0 -2
- package/dist/types/review-policy.d.ts.map +0 -1
- package/dist/types/review-policy.js +0 -2
- package/dist/types/review-policy.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-config.d.ts","sourceRoot":"","sources":["../../../src/tools/retry/tool-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAElF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAoBvE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAYjE;AAED,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CA0C7D,CAAC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { inputSchema } from './schema.js';
|
|
2
|
-
import { retryBriefSlot } from './brief-slot.js';
|
|
3
|
-
import { noStructuredReportSchema } from '../../reporting/report-parser-slots/no-structured-report.js';
|
|
4
|
-
import { makeFindingsHeadlineTemplate } from '../../reporting/findings-headline.js';
|
|
5
|
-
import { notApplicable } from '../../reporting/not-applicable.js';
|
|
6
|
-
import { implementGoalPrompt } from '../../lifecycle/goal-prompts.js';
|
|
7
|
-
const RETRY_PREAMBLE = [
|
|
8
|
-
'RETRY: the plan below was partially executed in a prior run. The commits since the run',
|
|
9
|
-
'start (see `git log`) show what is already done. Do NOT redo committed, correct work —',
|
|
10
|
-
'complete what is missing and fix what is wrong, committing with the same `[task N]` convention.',
|
|
11
|
-
'',
|
|
12
|
-
].join('\n');
|
|
13
|
-
/** Thrown when the prior batch's goal has been evicted from the cache. */
|
|
14
|
-
class GoalNotFoundError extends Error {
|
|
15
|
-
code = 'goal_not_found';
|
|
16
|
-
constructor(batchId) { super(`no stored goal for batch ${batchId}`); this.name = 'GoalNotFoundError'; }
|
|
17
|
-
}
|
|
18
|
-
export function registerRetry(registry) {
|
|
19
|
-
registry.register({
|
|
20
|
-
routeName: 'retry_tasks',
|
|
21
|
-
httpMethod: 'POST',
|
|
22
|
-
httpPath: '/retry',
|
|
23
|
-
surface: 'tool',
|
|
24
|
-
schema: inputSchema,
|
|
25
|
-
toolCategory: 'assist',
|
|
26
|
-
agentTypeDefault: 'standard',
|
|
27
|
-
agentTypeOverridable: false,
|
|
28
|
-
responseShapeName: 'BatchResponse',
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
export const toolConfig = {
|
|
32
|
-
name: 'retry',
|
|
33
|
-
category: 'assist',
|
|
34
|
-
dispatchMode: 'serial',
|
|
35
|
-
dispatchModeOverridable: false,
|
|
36
|
-
agentType: 'standard',
|
|
37
|
-
briefSlot: retryBriefSlot,
|
|
38
|
-
buildTaskSpec: (brief, ctx) => {
|
|
39
|
-
const batch = ctx.projectContext?.batchCache?.get(brief.batchId);
|
|
40
|
-
const origTask = batch?.tasks[0];
|
|
41
|
-
if (!origTask?.goal)
|
|
42
|
-
throw new GoalNotFoundError(brief.batchId);
|
|
43
|
-
// Re-fire the same goal-set; the prepare stage captures a fresh baseSha
|
|
44
|
-
// (current HEAD) so the re-run continues from where the prior run left off.
|
|
45
|
-
return {
|
|
46
|
-
...origTask,
|
|
47
|
-
prompt: RETRY_PREAMBLE + implementGoalPrompt(origTask.goal),
|
|
48
|
-
};
|
|
49
|
-
},
|
|
50
|
-
reportSchema: noStructuredReportSchema,
|
|
51
|
-
headlineTemplate: makeFindingsHeadlineTemplate('retry', 'high'),
|
|
52
|
-
postProcessEnvelope: (envelope, ctx) => {
|
|
53
|
-
const results = (Array.isArray(envelope.results) ? envelope.results : []);
|
|
54
|
-
const total = results.length;
|
|
55
|
-
let ok = 0, incomplete = 0, error = 0;
|
|
56
|
-
for (const r of results) {
|
|
57
|
-
const s = r?.status;
|
|
58
|
-
if (s === 'ok')
|
|
59
|
-
ok++;
|
|
60
|
-
else if (s === 'error')
|
|
61
|
-
error++;
|
|
62
|
-
else
|
|
63
|
-
incomplete++;
|
|
64
|
-
}
|
|
65
|
-
const aggregate = error > 0 ? 'error' : incomplete > 0 ? 'incomplete' : 'ok';
|
|
66
|
-
let detail = `${ok}/${total} tasks complete`;
|
|
67
|
-
if (incomplete > 0)
|
|
68
|
-
detail += `, ${incomplete} incomplete`;
|
|
69
|
-
if (error > 0)
|
|
70
|
-
detail += `, ${error} error`;
|
|
71
|
-
envelope.headline = `[${aggregate}] retry: ${detail}`;
|
|
72
|
-
envelope.structuredReport = notApplicable('no structured report emitted by this executor');
|
|
73
|
-
if (ctx?.batchId) {
|
|
74
|
-
envelope.retryBatchId = ctx.batchId;
|
|
75
|
-
}
|
|
76
|
-
return envelope;
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=tool-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-config.js","sourceRoot":"","sources":["../../../src/tools/retry/tool-config.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Input } from '../../tools/review/schema.js';
|
|
2
|
-
export interface ReviewBrief {
|
|
3
|
-
filePath?: string;
|
|
4
|
-
code?: string;
|
|
5
|
-
filePaths?: string[];
|
|
6
|
-
focus?: string[];
|
|
7
|
-
hasContextBlocks: boolean;
|
|
8
|
-
contextBlockIds: string[];
|
|
9
|
-
}
|
|
10
|
-
export declare function reviewBriefSlot(input: Input): ReviewBrief[];
|
|
11
|
-
//# sourceMappingURL=brief-slot.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brief-slot.d.ts","sourceRoot":"","sources":["../../../src/tools/review/brief-slot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAE1D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAMD,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,EAAE,CAoB3D"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
function hasContent(value) {
|
|
2
|
-
return value !== undefined && value.trim().length > 0;
|
|
3
|
-
}
|
|
4
|
-
export function reviewBriefSlot(input) {
|
|
5
|
-
const hasContextBlocks = Array.isArray(input.contextBlockIds) && input.contextBlockIds.length > 0;
|
|
6
|
-
const validPaths = (input.filePaths ?? []).filter(p => p.trim().length > 0);
|
|
7
|
-
if (hasContent(input.code) || validPaths.length <= 1) {
|
|
8
|
-
return [{
|
|
9
|
-
code: input.code,
|
|
10
|
-
filePaths: input.filePaths,
|
|
11
|
-
focus: input.focus,
|
|
12
|
-
hasContextBlocks,
|
|
13
|
-
contextBlockIds: input.contextBlockIds ?? [],
|
|
14
|
-
}];
|
|
15
|
-
}
|
|
16
|
-
return validPaths.map(fp => ({
|
|
17
|
-
filePath: fp,
|
|
18
|
-
focus: input.focus,
|
|
19
|
-
hasContextBlocks,
|
|
20
|
-
contextBlockIds: input.contextBlockIds ?? [],
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=brief-slot.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brief-slot.js","sourceRoot":"","sources":["../../../src/tools/review/brief-slot.ts"],"names":[],"mappings":"AAWA,SAAS,UAAU,CAAC,KAAyB;IAC3C,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAY;IAC1C,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC;IAClG,MAAM,UAAU,GAAG,CAAC,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAE5E,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;QACrD,OAAO,CAAC;gBACN,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,gBAAgB;gBAChB,eAAe,EAAE,KAAK,CAAC,eAAe,IAAI,EAAE;aAC7C,CAAC,CAAC;IACL,CAAC;IAED,OAAO,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAC3B,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,gBAAgB;QAChB,eAAe,EAAE,KAAK,CAAC,eAAe,IAAI,EAAE;KAC7C,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Review-specific implementer criteria.
|
|
3
|
-
*
|
|
4
|
-
* REVIEW'S PURPOSE — read this before adding categories.
|
|
5
|
-
* mma-review is the pre-merge gate. The maintainer accepting your verdict
|
|
6
|
-
* will NOT re-investigate before pressing merge — your output is treated
|
|
7
|
-
* as authoritative. The success criterion is:
|
|
8
|
-
*
|
|
9
|
-
* "After fixes, will the merge be safe, correct, and maintainable —
|
|
10
|
-
* such that a regression is unlikely to ship?"
|
|
11
|
-
*
|
|
12
|
-
* That criterion makes a finding load-bearing. A nit that doesn't change
|
|
13
|
-
* whether the merge is safe is low-priority no matter how clean the
|
|
14
|
-
* suggested rewrite reads. A cross-file ripple that breaks a caller
|
|
15
|
-
* not in the diff is the audit-equivalent of an unimplementable fix —
|
|
16
|
-
* load-bearing even though the named file looks fine in isolation.
|
|
17
|
-
*
|
|
18
|
-
* Review examines source code in named files against a focus area
|
|
19
|
-
* (security/correctness/performance/style). Findings should be
|
|
20
|
-
* line-quotable — that's the natural shape of code defects — but
|
|
21
|
-
* cross-file findings backed by call-site references are also valid.
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* The orientation block. Goes at the TOP of every review prompt.
|
|
25
|
-
*
|
|
26
|
-
* This is the load-bearing addition. Without an explicit purpose
|
|
27
|
-
* statement, workers default to "find issues in this file" — which
|
|
28
|
-
* produces line-by-line proofreading and misses the cross-file rippe,
|
|
29
|
-
* test-gap, and implicit-contract findings that actually block merges.
|
|
30
|
-
*/
|
|
31
|
-
export declare const REVIEW_PURPOSE_ORIENTATION: string;
|
|
32
|
-
export declare const EVIDENCE_RULE_REVIEW: string;
|
|
33
|
-
export declare const SCOPE_RULE_REVIEW: string;
|
|
34
|
-
/**
|
|
35
|
-
* The failure-mode taxonomy for code reviews.
|
|
36
|
-
*
|
|
37
|
-
* Without this block, workers default to line-by-line proofreading of
|
|
38
|
-
* the named file and miss cross-file ripples, test gaps, and
|
|
39
|
-
* implicit-contract regressions — the findings that actually block
|
|
40
|
-
* merges. The 10 categories below are what a careful maintainer would
|
|
41
|
-
* scan for before pressing merge.
|
|
42
|
-
*/
|
|
43
|
-
export declare const CODE_REVIEW_FAILURE_MODES: string;
|
|
44
|
-
export declare const ANNOTATOR_AWARENESS_REVIEW: string;
|
|
45
|
-
import { type CriterionEntry } from '../criteria-types.js';
|
|
46
|
-
/** Structured per-criterion array for parallel-criteria fan-out. */
|
|
47
|
-
export declare const REVIEW_CRITERIA: readonly CriterionEntry[];
|
|
48
|
-
//# sourceMappingURL=implementer-criteria.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"implementer-criteria.d.ts","sourceRoot":"","sources":["../../../src/tools/review/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,QAmB3B,CAAC;AAEb,eAAO,MAAM,oBAAoB,QAQrB,CAAC;AAEb,eAAO,MAAM,iBAAiB,QAOlB,CAAC;AAEb;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,QAmB1B,CAAC;AAEb,eAAO,MAAM,0BAA0B,QAO3B,CAAC;AAEb,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE1E,oEAAoE;AACpE,eAAO,MAAM,eAAe,EAAE,SAAS,cAAc,EAA6C,CAAC"}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Review-specific implementer criteria.
|
|
3
|
-
*
|
|
4
|
-
* REVIEW'S PURPOSE — read this before adding categories.
|
|
5
|
-
* mma-review is the pre-merge gate. The maintainer accepting your verdict
|
|
6
|
-
* will NOT re-investigate before pressing merge — your output is treated
|
|
7
|
-
* as authoritative. The success criterion is:
|
|
8
|
-
*
|
|
9
|
-
* "After fixes, will the merge be safe, correct, and maintainable —
|
|
10
|
-
* such that a regression is unlikely to ship?"
|
|
11
|
-
*
|
|
12
|
-
* That criterion makes a finding load-bearing. A nit that doesn't change
|
|
13
|
-
* whether the merge is safe is low-priority no matter how clean the
|
|
14
|
-
* suggested rewrite reads. A cross-file ripple that breaks a caller
|
|
15
|
-
* not in the diff is the audit-equivalent of an unimplementable fix —
|
|
16
|
-
* load-bearing even though the named file looks fine in isolation.
|
|
17
|
-
*
|
|
18
|
-
* Review examines source code in named files against a focus area
|
|
19
|
-
* (security/correctness/performance/style). Findings should be
|
|
20
|
-
* line-quotable — that's the natural shape of code defects — but
|
|
21
|
-
* cross-file findings backed by call-site references are also valid.
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* The orientation block. Goes at the TOP of every review prompt.
|
|
25
|
-
*
|
|
26
|
-
* This is the load-bearing addition. Without an explicit purpose
|
|
27
|
-
* statement, workers default to "find issues in this file" — which
|
|
28
|
-
* produces line-by-line proofreading and misses the cross-file rippe,
|
|
29
|
-
* test-gap, and implicit-contract findings that actually block merges.
|
|
30
|
-
*/
|
|
31
|
-
export const REVIEW_PURPOSE_ORIENTATION = [
|
|
32
|
-
'Why this review exists:',
|
|
33
|
-
'mma-review is the pre-merge gate. The maintainer accepting your verdict will NOT re-investigate before merging — your verdict is treated as authoritative. A miss here ships to production.',
|
|
34
|
-
'',
|
|
35
|
-
'Your job is to find anything that would make the merge unsafe, including issues that look fine in the named files in isolation:',
|
|
36
|
-
'- a changed function with no test (or with a test that does not exercise the change)',
|
|
37
|
-
'- a changed signature whose direct callers (visible in the named files or via grep on the symbol) were not updated',
|
|
38
|
-
'- a change that introduces a new edge case (null/empty/timeout/error path) the code does not handle',
|
|
39
|
-
'- a race or concurrency hazard the change exposes (shared state mutation, missing lock, await-after-check pattern)',
|
|
40
|
-
'- a resource leak the change introduces (unclosed handle, untracked promise, file descriptor not freed)',
|
|
41
|
-
'- a backward-compatibility break in a public API or wire schema',
|
|
42
|
-
'- a security regression (auth bypass, injection, untrusted input flowing to a sink, data exposure)',
|
|
43
|
-
'- a performance regression (N+1 query, unbounded loop, blocking I/O on a hot path, unnecessary deep clone)',
|
|
44
|
-
'- an implicit-contract assumption — the change relies on the caller doing X but the contract does not state X',
|
|
45
|
-
'- a pre-existing bug entangled with the change (NOT a finding against this diff — separate cleanly)',
|
|
46
|
-
'',
|
|
47
|
-
'A finding that points at any of these is high-value EVEN IF the prose of the change reads cleanly. Conversely, a stylistic nit that does not change merge safety is low-priority no matter how clean the suggested rewrite reads.',
|
|
48
|
-
'',
|
|
49
|
-
'The completion test: would a maintainer who reads only your review and the diff (not the surrounding code) understand which changes are required, why each is required, and where each lives — well enough to apply the fix and re-merge?',
|
|
50
|
-
].join('\n');
|
|
51
|
-
export const EVIDENCE_RULE_REVIEW = [
|
|
52
|
-
'Evidence grounding (REQUIRED for every finding):',
|
|
53
|
-
'- Cite `file:line` (or `file:line-line` for a span) where the issue lives.',
|
|
54
|
-
'- Quote the exact code excerpt or command output that demonstrates the issue. Do not paraphrase — quote.',
|
|
55
|
-
'- For CROSS-FILE findings (a change in named file A breaks a caller B), cite both: the line in A that triggers the break, AND the call site in B that breaks. If B is not in the named files but is reachable via grep on the changed symbol, name it explicitly. Cross-file findings backed by call-site references are FULLY VALID — do not drop them as out-of-scope.',
|
|
56
|
-
'- For TEST-GAP findings, name the test file you would expect to cover the change AND quote the diff line that has no test coverage. If no test file exists for the changed area, that itself is the finding.',
|
|
57
|
-
'- For IMPLICIT-CONTRACT findings, quote the line in the named file that depends on the assumption AND name the contract source (the public docstring, the type, the README) that does not state the assumption.',
|
|
58
|
-
'- If you cannot quote evidence in one of these forms, do NOT raise the finding. Note "investigation needed" in your summary instead.',
|
|
59
|
-
].join('\n');
|
|
60
|
-
export const SCOPE_RULE_REVIEW = [
|
|
61
|
-
'Scope:',
|
|
62
|
-
'- The named files. Behavior of direct callers/callees can be referenced when visible in those files.',
|
|
63
|
-
'- Cross-file ripples ARE in scope when the changed symbol is searchable: if the named files change a public function, look for its call sites in the rest of the repo and flag any caller that would break. This is the highest-value cross-file work for a code review.',
|
|
64
|
-
'- Test gaps ARE in scope: if the named files change behavior and a test file is the natural sibling (e.g. `foo.ts` → `tests/foo.test.ts`), check whether the test exercises the change.',
|
|
65
|
-
'- Out of scope: speculation about untouched files unrelated to the diff; doc/spec issues (those belong in an audit, not a review); style nits when the focus area is security/correctness/performance.',
|
|
66
|
-
'- Pre-existing bugs (the diff did not introduce them) belong in their own backlog item, not in this review. Note them in a "Pre-existing — out of scope" section if you spot them, but DO NOT mix them into the merge-blocking findings.',
|
|
67
|
-
].join('\n');
|
|
68
|
-
/**
|
|
69
|
-
* The failure-mode taxonomy for code reviews.
|
|
70
|
-
*
|
|
71
|
-
* Without this block, workers default to line-by-line proofreading of
|
|
72
|
-
* the named file and miss cross-file ripples, test gaps, and
|
|
73
|
-
* implicit-contract regressions — the findings that actually block
|
|
74
|
-
* merges. The 10 categories below are what a careful maintainer would
|
|
75
|
-
* scan for before pressing merge.
|
|
76
|
-
*/
|
|
77
|
-
export const CODE_REVIEW_FAILURE_MODES = [
|
|
78
|
-
'Look for these kinds of issues — applicable to ALL code reviews regardless of focus. The focus area (security/correctness/performance/style) tells you which lens to weight, but every code review should sweep the full taxonomy:',
|
|
79
|
-
'',
|
|
80
|
-
'1. TEST GAP — the diff changes behavior, but no test exercises the change. Either: no test file exists, OR the test file exists but the changed branch is not covered. **Always check for the natural sibling test file when reviewing source-code changes.**',
|
|
81
|
-
'2. CROSS-FILE RIPPLE — a changed signature, return shape, public type, or wire schema is referenced from another file that was not updated. **If the named files change a public symbol, grep for the symbol and flag any unupdated caller.**',
|
|
82
|
-
'3. PRE-EXISTING-BUG-VS-NEW-REGRESSION — a defect exists in the named files but the diff did not introduce it. Do NOT blame the diff for prior bugs; note them in a separate "Pre-existing — out of scope" section. Conversely, if the diff DID introduce or worsen a defect, flag it as a regression.',
|
|
83
|
-
'4. MISSING EDGE CASE — the change adds a code path but does not handle null/undefined/empty/timeout/error/zero/negative inputs the path could see. Walk the change against each natural boundary value.',
|
|
84
|
-
'5. RACE / CONCURRENCY — the change introduces shared state mutation, removes a lock, splits a previously-atomic operation, or adds an await between a check and an action (TOCTOU). Flag these even when no test reproduces.',
|
|
85
|
-
'6. RESOURCE LEAK — the change opens a handle (file, socket, lock, transaction, AbortController) without a guaranteed close path; or introduces an untracked promise that may reject silently.',
|
|
86
|
-
'7. BACKWARD-COMPAT BREAK — the change modifies a public API, exported type, wire schema, environment variable, or CLI flag in a way that breaks existing callers. Flag and require a migration note.',
|
|
87
|
-
'8. SECURITY REGRESSION — the change introduces or worsens auth bypass, injection (SQL/command/prompt), untrusted input flowing to a sink (eval/exec/HTML/SQL), data exposure, or weakened sandboxing. Apply the security lens to every change, not just security-flagged ones.',
|
|
88
|
-
'9. PERFORMANCE REGRESSION — the change adds N+1 queries, unbounded loops, blocking I/O on a hot path, unnecessary deep clones, or shifts work from build/init time to request time. Apply the performance lens to every change, not just performance-flagged ones.',
|
|
89
|
-
'10. IMPLICIT-CONTRACT ASSUMPTION — the changed code relies on the caller (or environment) doing X but the contract (docstring, type, README) does not state X. The change works for in-repo callers but will silently break when the contract is read literally.',
|
|
90
|
-
'',
|
|
91
|
-
'Severity calibration for code reviews:',
|
|
92
|
-
'- critical: the merge would corrupt data, expose credentials, allow auth bypass, break a public API in production, or cause production outage. A reader who applied the fix incorrectly could ship the regression.',
|
|
93
|
-
'- high: the merge would introduce a real bug, security gap, or substantial regression that blocks release. Cross-file ripple where a caller is broken. Missing edge case in a code path that production traffic will hit.',
|
|
94
|
-
'- medium: a real issue worth fixing soon: test gap on a non-trivial change, race condition with low contention, performance regression on a non-hot path, missing edge case on an unlikely input.',
|
|
95
|
-
'- low: stylistic / naming / dead-code / minor-refactor opportunity. Does not change merge safety.',
|
|
96
|
-
].join('\n');
|
|
97
|
-
export const ANNOTATOR_AWARENESS_REVIEW = [
|
|
98
|
-
'After your output, an annotator validates each finding against this code-review rubric:',
|
|
99
|
-
'- Is the finding within the requested focus area (or universally applicable: security, performance, correctness apply to every review)?',
|
|
100
|
-
'- Does the evidence quote real code from the named files OR cite a real call site reachable via grep on the changed symbol?',
|
|
101
|
-
'- Is the severity calibrated to actual merge-safety impact (would a reader who applied the fix incorrectly ship a regression)?',
|
|
102
|
-
'- Is the finding within scope (named files + cross-file ripples on changed symbols + sibling test files), or is it speculation about unrelated code?',
|
|
103
|
-
'Self-check before emitting. Findings that fail any check are downgraded or dropped — but cross-file ripple findings backed by call-site references and test-gap findings backed by sibling-test-file references are FULLY VALID, do NOT downgrade them as "speculation about untouched files."',
|
|
104
|
-
].join('\n');
|
|
105
|
-
import { parseCriteria } from '../criteria-types.js';
|
|
106
|
-
/** Structured per-criterion array for parallel-criteria fan-out. */
|
|
107
|
-
export const REVIEW_CRITERIA = parseCriteria(CODE_REVIEW_FAILURE_MODES);
|
|
108
|
-
//# sourceMappingURL=implementer-criteria.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"implementer-criteria.js","sourceRoot":"","sources":["../../../src/tools/review/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,yBAAyB;IACzB,6LAA6L;IAC7L,EAAE;IACF,iIAAiI;IACjI,sFAAsF;IACtF,oHAAoH;IACpH,qGAAqG;IACrG,oHAAoH;IACpH,yGAAyG;IACzG,iEAAiE;IACjE,oGAAoG;IACpG,4GAA4G;IAC5G,+GAA+G;IAC/G,qGAAqG;IACrG,EAAE;IACF,mOAAmO;IACnO,EAAE;IACF,2OAA2O;CAC5O,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,kDAAkD;IAClD,4EAA4E;IAC5E,0GAA0G;IAC1G,0WAA0W;IAC1W,8MAA8M;IAC9M,iNAAiN;IACjN,sIAAsI;CACvI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ;IACR,sGAAsG;IACtG,0QAA0Q;IAC1Q,yLAAyL;IACzL,wMAAwM;IACxM,0OAA0O;CAC3O,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,oOAAoO;IACpO,EAAE;IACF,+PAA+P;IAC/P,+OAA+O;IAC/O,uSAAuS;IACvS,yMAAyM;IACzM,8NAA8N;IAC9N,+LAA+L;IAC/L,sMAAsM;IACtM,gRAAgR;IAChR,oQAAoQ;IACpQ,kQAAkQ;IAClQ,EAAE;IACF,wCAAwC;IACxC,oNAAoN;IACpN,2NAA2N;IAC3N,mMAAmM;IACnM,mGAAmG;CACpG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,yFAAyF;IACzF,yIAAyI;IACzI,6HAA6H;IAC7H,gIAAgI;IAChI,sJAAsJ;IACtJ,gSAAgS;CACjS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,OAAO,EAAE,aAAa,EAAuB,MAAM,sBAAsB,CAAC;AAE1E,oEAAoE;AACpE,MAAM,CAAC,MAAM,eAAe,GAA8B,aAAa,CAAC,yBAAyB,CAAC,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const inputSchema: z.ZodObject<{
|
|
3
|
-
code: z.ZodOptional<z.ZodString>;
|
|
4
|
-
focus: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
5
|
-
style: "style";
|
|
6
|
-
security: "security";
|
|
7
|
-
performance: "performance";
|
|
8
|
-
correctness: "correctness";
|
|
9
|
-
}>>>;
|
|
10
|
-
subtype: z.ZodDefault<z.ZodEnum<{
|
|
11
|
-
default: "default";
|
|
12
|
-
}>>;
|
|
13
|
-
filePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
|
-
contextBlockIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
|
-
}, z.core.$strip>;
|
|
16
|
-
export type Input = z.infer<typeof inputSchema>;
|
|
17
|
-
export declare const outputSchema: z.ZodObject<{
|
|
18
|
-
headline: z.ZodString;
|
|
19
|
-
results: z.ZodUnion<readonly [z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, z.ZodObject<{
|
|
20
|
-
kind: z.ZodLiteral<"not_applicable">;
|
|
21
|
-
reason: z.ZodString;
|
|
22
|
-
}, z.core.$strip>]>;
|
|
23
|
-
batchTimings: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$loose>, z.ZodObject<{
|
|
24
|
-
kind: z.ZodLiteral<"not_applicable">;
|
|
25
|
-
reason: z.ZodString;
|
|
26
|
-
}, z.core.$strip>]>;
|
|
27
|
-
costSummary: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$loose>, z.ZodObject<{
|
|
28
|
-
kind: z.ZodLiteral<"not_applicable">;
|
|
29
|
-
reason: z.ZodString;
|
|
30
|
-
}, z.core.$strip>]>;
|
|
31
|
-
structuredReport: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$loose>, z.ZodObject<{
|
|
32
|
-
kind: z.ZodLiteral<"not_applicable">;
|
|
33
|
-
reason: z.ZodString;
|
|
34
|
-
}, z.core.$strip>]>;
|
|
35
|
-
error: z.ZodUnion<readonly [z.ZodObject<{
|
|
36
|
-
code: z.ZodString;
|
|
37
|
-
message: z.ZodString;
|
|
38
|
-
details: z.ZodOptional<z.ZodUnknown>;
|
|
39
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
-
kind: z.ZodLiteral<"not_applicable">;
|
|
41
|
-
reason: z.ZodString;
|
|
42
|
-
}, z.core.$strip>]>;
|
|
43
|
-
specReviewVerdict: z.ZodOptional<z.ZodEnum<{
|
|
44
|
-
error: "error";
|
|
45
|
-
approved: "approved";
|
|
46
|
-
concerns: "concerns";
|
|
47
|
-
changes_required: "changes_required";
|
|
48
|
-
annotated: "annotated";
|
|
49
|
-
skipped: "skipped";
|
|
50
|
-
not_applicable: "not_applicable";
|
|
51
|
-
}>>;
|
|
52
|
-
qualityReviewVerdict: z.ZodOptional<z.ZodEnum<{
|
|
53
|
-
error: "error";
|
|
54
|
-
approved: "approved";
|
|
55
|
-
concerns: "concerns";
|
|
56
|
-
changes_required: "changes_required";
|
|
57
|
-
annotated: "annotated";
|
|
58
|
-
skipped: "skipped";
|
|
59
|
-
not_applicable: "not_applicable";
|
|
60
|
-
}>>;
|
|
61
|
-
roundsUsed: z.ZodOptional<z.ZodNumber>;
|
|
62
|
-
}, z.core.$loose>;
|
|
63
|
-
export type Output = z.infer<typeof outputSchema>;
|
|
64
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/tools/review/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;iBAQtB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA8B,CAAC;AAExD,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// packages/core/src/tool-schemas/review.ts
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { buildOutputEnvelopeSchema } from '../shared-output.js';
|
|
4
|
-
// Ported verbatim from packages/mcp/src/tools/review-code.ts (reviewCodeSchema).
|
|
5
|
-
// commonToolFields (filePaths + contextBlockIds) are inlined here to avoid
|
|
6
|
-
// cross-package coupling.
|
|
7
|
-
export const inputSchema = z.object({
|
|
8
|
-
code: z.string().optional().describe('Inline code to review'),
|
|
9
|
-
focus: z.array(z.enum(['security', 'performance', 'correctness', 'style'])).optional(),
|
|
10
|
-
subtype: z.enum(['default']).default('default').describe('Criteria-set selector. Only `default` is wired today; reserved for future per-language / per-risk-class subtypes.'),
|
|
11
|
-
filePaths: z.array(z.string()).optional()
|
|
12
|
-
.describe('Files the sub-agent should focus on. Multiple files are processed in parallel.'),
|
|
13
|
-
contextBlockIds: z.array(z.string()).optional()
|
|
14
|
-
.describe('IDs from register_context_block to prepend to prompt. Use for delta audits, diff-scoped reviews, or shared specs.'),
|
|
15
|
-
});
|
|
16
|
-
export const outputSchema = buildOutputEnvelopeSchema();
|
|
17
|
-
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/tools/review/schema.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,iFAAiF;AACjF,2EAA2E;AAC3E,0BAA0B;AAC1B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IAC7D,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACtF,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,mHAAmH,CAAC;IAC7K,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;SACtC,QAAQ,CAAC,gFAAgF,CAAC;IAC7F,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;SAC5C,QAAQ,CAAC,mHAAmH,CAAC;CACjI,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,YAAY,GAAG,yBAAyB,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subtypes.d.ts","sourceRoot":"","sources":["../../../src/tools/review/subtypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAOrF,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC;AAkBtC,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,aAAa,EAAE,mBAAmB,CAStE,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { REVIEW_PURPOSE_ORIENTATION, EVIDENCE_RULE_REVIEW, SCOPE_RULE_REVIEW, ANNOTATOR_AWARENESS_REVIEW, REVIEW_CRITERIA, } from './implementer-criteria.js';
|
|
2
|
-
// Copied verbatim from ROUTE_SEMANTICS.review in
|
|
3
|
-
// packages/core/src/routing/read-route-criteria.ts (removed in Task 8).
|
|
4
|
-
const SEMANTICS_DEFAULT = {
|
|
5
|
-
goalLine: 'Find ALL issues of THIS specific kind in the diff / source above.',
|
|
6
|
-
emptyOutcomeLine: 'If none exist, respond with the literal text "No findings for this criterion." — that is a fully valid outcome. Do NOT pad to avoid returning empty.',
|
|
7
|
-
findingMeaningParagraph: 'A finding is an ISSUE introduced or worsened by the change under review (correctness bug, missing test, race, security regression, contract break, etc.). Severity reflects how much the issue blocks merge / ships a regression.',
|
|
8
|
-
severityMeanings: {
|
|
9
|
-
critical: 'Production-breaking on merge',
|
|
10
|
-
high: 'Correctness gap surfacing in normal use',
|
|
11
|
-
medium: 'Maintainability/fragility',
|
|
12
|
-
low: 'Style',
|
|
13
|
-
},
|
|
14
|
-
mustEmitAtLeastOne: false,
|
|
15
|
-
legalOutcomes: ['found', 'clean'],
|
|
16
|
-
};
|
|
17
|
-
export const REVIEW_SUBTYPES = {
|
|
18
|
-
default: {
|
|
19
|
-
criteria: REVIEW_CRITERIA,
|
|
20
|
-
orientation: REVIEW_PURPOSE_ORIENTATION,
|
|
21
|
-
evidenceRule: EVIDENCE_RULE_REVIEW,
|
|
22
|
-
scopeRule: SCOPE_RULE_REVIEW,
|
|
23
|
-
annotatorAwareness: ANNOTATOR_AWARENESS_REVIEW,
|
|
24
|
-
semantics: SEMANTICS_DEFAULT,
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=subtypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subtypes.js","sourceRoot":"","sources":["../../../src/tools/review/subtypes.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,0BAA0B,EAAE,oBAAoB,EAAE,iBAAiB,EACnE,0BAA0B,EAAE,eAAe,GAC5C,MAAM,2BAA2B,CAAC;AAInC,iDAAiD;AACjD,wEAAwE;AACxE,MAAM,iBAAiB,GAAmB;IACxC,QAAQ,EAAE,mEAAmE;IAC7E,gBAAgB,EAAE,sJAAsJ;IACxK,uBAAuB,EAAE,mOAAmO;IAC5P,gBAAgB,EAAE;QAChB,QAAQ,EAAE,8BAA8B;QACxC,IAAI,EAAE,yCAAyC;QAC/C,MAAM,EAAE,2BAA2B;QACnC,GAAG,EAAE,OAAO;KACb;IACD,kBAAkB,EAAE,KAAK;IACzB,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,CAAU;CAC3C,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAA+C;IACzE,OAAO,EAAE;QACP,QAAQ,EAAE,eAAe;QACzB,WAAW,EAAE,0BAA0B;QACvC,YAAY,EAAE,oBAAoB;QAClC,SAAS,EAAE,iBAAiB;QAC5B,kBAAkB,EAAE,0BAA0B;QAC9C,SAAS,EAAE,iBAAiB;KAC7B;CACF,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ToolSurfaceRegistry } from '../../tool-surface/tool-surface-registry.js';
|
|
2
|
-
import type { Input } from './schema.js';
|
|
3
|
-
import type { ToolConfig } from '../../lifecycle/tool-config-types.js';
|
|
4
|
-
import { type ReviewBrief } from './brief-slot.js';
|
|
5
|
-
export declare function registerReview(registry: ToolSurfaceRegistry): void;
|
|
6
|
-
export declare const toolConfig: ToolConfig<Input, ReviewBrief, unknown>;
|
|
7
|
-
//# sourceMappingURL=tool-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-config.d.ts","sourceRoot":"","sources":["../../../src/tools/review/tool-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAElF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAEvE,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAKpE,wBAAgB,cAAc,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAYlE;AAsCD,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,CA0C9D,CAAC"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { inputSchema } from './schema.js';
|
|
2
|
-
import { reviewBriefSlot } from './brief-slot.js';
|
|
3
|
-
import { noStructuredReportSchema } from '../../reporting/report-parser-slots/no-structured-report.js';
|
|
4
|
-
import { makeFindingsHeadlineTemplate } from '../../reporting/findings-headline.js';
|
|
5
|
-
import { DEFAULT_TASK_TIMEOUT_MS } from '../../config/schema.js';
|
|
6
|
-
export function registerReview(registry) {
|
|
7
|
-
registry.register({
|
|
8
|
-
routeName: 'review',
|
|
9
|
-
httpMethod: 'POST',
|
|
10
|
-
httpPath: '/review',
|
|
11
|
-
surface: 'tool',
|
|
12
|
-
schema: inputSchema,
|
|
13
|
-
toolCategory: 'read_only',
|
|
14
|
-
agentTypeDefault: 'complex',
|
|
15
|
-
agentTypeOverridable: false,
|
|
16
|
-
responseShapeName: 'BatchResponse',
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Per-focus "done" conditions.
|
|
21
|
-
*
|
|
22
|
-
* The full failure-mode taxonomy in CODE_REVIEW_FAILURE_MODES applies to
|
|
23
|
-
* all reviews regardless of focus. These per-focus conditions tell the
|
|
24
|
-
* worker which lens to weight, not which categories to skip. Security,
|
|
25
|
-
* performance, and correctness lenses are universally applicable to
|
|
26
|
-
* every code change — the focus array picks emphasis, not gating.
|
|
27
|
-
*
|
|
28
|
-
* When focus is empty/missing, the worker performs a comprehensive sweep
|
|
29
|
-
* applying all four lenses with the executability/merge-safety
|
|
30
|
-
* orientation block at the top of the prompt.
|
|
31
|
-
*/
|
|
32
|
-
const REVIEW_DONE_CONDITIONS = {
|
|
33
|
-
security: 'Lens emphasis: security. Apply the full failure-mode taxonomy through the security lens: auth bypass, injection (SQL/command/prompt), untrusted input flowing to a sink (eval/exec/HTML), data exposure, weakened sandboxing, and hardcoded secrets. Each finding has severity, location, and remediation.',
|
|
34
|
-
performance: 'Lens emphasis: performance. Apply the full failure-mode taxonomy through the performance lens: N+1 queries, unbounded loops, blocking I/O on hot paths, unnecessary deep clones, work shifted from build/init time to request time, and missing caching where the same value is recomputed. Each finding has impact level, location, and fix recommendation.',
|
|
35
|
-
correctness: 'Lens emphasis: correctness. Apply the full failure-mode taxonomy through the correctness lens: logic errors, off-by-one, unhandled edge cases (null/undefined/empty/timeout/error/zero/negative), type mismatches, contract violations, race conditions, and resource leaks. Each finding has severity, location, and correct behavior.',
|
|
36
|
-
style: 'Lens emphasis: style. Apply the full failure-mode taxonomy through the style lens: naming, formatting, dead code, inconsistent patterns, deprecated APIs, and missing types. Note: style is rarely the highest-value review lens for a non-trivial diff — sweep the correctness, security, and performance categories too.',
|
|
37
|
-
};
|
|
38
|
-
const DELTA_REVIEW_SUFFIX = ' Perform a full review (do not reduce thoroughness). Verify each prior finding as addressed or unaddressed. Omit addressed prior findings. Include unaddressed prior findings and new findings. End with a summary of which prior findings were resolved.';
|
|
39
|
-
function resolveReviewDoneCondition(focus, hasContextBlocks) {
|
|
40
|
-
let base;
|
|
41
|
-
if (!focus || focus.length === 0) {
|
|
42
|
-
base = 'Comprehensive code review. Apply the full failure-mode taxonomy (the orientation block above) through all four lenses (correctness, security, performance, style). Emphasize TEST GAP, CROSS-FILE RIPPLE, MISSING EDGE CASE, and IMPLICIT-CONTRACT ASSUMPTION — these are the categories most often missed and most likely to ship regressions. Each finding has category, severity, location, and recommendation.';
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
base = focus.map(f => REVIEW_DONE_CONDITIONS[f] ?? '').filter(Boolean).join(' ');
|
|
46
|
-
}
|
|
47
|
-
return hasContextBlocks ? base + DELTA_REVIEW_SUFFIX : base;
|
|
48
|
-
}
|
|
49
|
-
export const toolConfig = {
|
|
50
|
-
name: 'review',
|
|
51
|
-
category: 'read_only',
|
|
52
|
-
dispatchMode: 'parallel',
|
|
53
|
-
dispatchModeOverridable: false,
|
|
54
|
-
agentType: 'complex',
|
|
55
|
-
briefSlot: reviewBriefSlot,
|
|
56
|
-
buildTaskSpec: (brief, ctx) => {
|
|
57
|
-
// Propagate filePaths + mainModel onto the TaskSpec so the headline
|
|
58
|
-
// composer can name the file in clean-review headlines and so the
|
|
59
|
-
// wire telemetry carries main_model attribution.
|
|
60
|
-
const filePaths = brief.filePath
|
|
61
|
-
? [brief.filePath]
|
|
62
|
-
: (brief.filePaths && brief.filePaths.length > 0 ? brief.filePaths : undefined);
|
|
63
|
-
const targetParts = ['Review this code:'];
|
|
64
|
-
if (brief.code)
|
|
65
|
-
targetParts.push('```\n' + brief.code + '\n```');
|
|
66
|
-
if (filePaths && filePaths.length > 0) {
|
|
67
|
-
targetParts.push(`Target files:\n${filePaths.map(p => `- ${p}`).join('\n')}`);
|
|
68
|
-
}
|
|
69
|
-
if (brief.focus)
|
|
70
|
-
targetParts.push(`Focus: ${Array.isArray(brief.focus) ? brief.focus.join(', ') : brief.focus}`);
|
|
71
|
-
// The read-route dispatcher builds the worker prefix from this pure target
|
|
72
|
-
// + FINDING_FORMAT_SHARED + review RouteSemantics; `prompt` mirrors it
|
|
73
|
-
// (required field / telemetry, not the read-route worker input).
|
|
74
|
-
const target = targetParts.join('\n\n');
|
|
75
|
-
return {
|
|
76
|
-
prompt: target,
|
|
77
|
-
readTarget: target,
|
|
78
|
-
agentType: 'complex',
|
|
79
|
-
reviewPolicy: 'none',
|
|
80
|
-
briefQualityPolicy: 'off',
|
|
81
|
-
done: resolveReviewDoneCondition(brief.focus, brief.hasContextBlocks),
|
|
82
|
-
tools: ctx.config.defaults?.tools ?? 'full',
|
|
83
|
-
timeoutMs: ctx.config.defaults?.timeoutMs ?? DEFAULT_TASK_TIMEOUT_MS,
|
|
84
|
-
sandboxPolicy: ctx.config.defaults?.sandboxPolicy ?? 'cwd-only',
|
|
85
|
-
cwd: ctx.projectContext?.cwd ?? ctx.cwd,
|
|
86
|
-
contextBlockIds: brief.contextBlockIds,
|
|
87
|
-
filePaths,
|
|
88
|
-
mainModel: ctx.mainModel ?? undefined,
|
|
89
|
-
};
|
|
90
|
-
},
|
|
91
|
-
reportSchema: noStructuredReportSchema,
|
|
92
|
-
headlineTemplate: makeFindingsHeadlineTemplate('review', 'blocking'),
|
|
93
|
-
};
|
|
94
|
-
//# sourceMappingURL=tool-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-config.js","sourceRoot":"","sources":["../../../src/tools/review/tool-config.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const errorSchema: z.ZodObject<{
|
|
3
|
-
code: z.ZodString;
|
|
4
|
-
message: z.ZodString;
|
|
5
|
-
details: z.ZodOptional<z.ZodUnknown>;
|
|
6
|
-
}, z.core.$strip>;
|
|
7
|
-
export declare const batchTimingsSchema: z.ZodObject<{}, z.core.$loose>;
|
|
8
|
-
export declare const costSummarySchema: z.ZodObject<{}, z.core.$loose>;
|
|
9
|
-
export declare const structuredReportSchema: z.ZodObject<{}, z.core.$loose>;
|
|
10
|
-
export declare function buildOutputEnvelopeSchema(resultItemSchema?: z.ZodTypeAny): z.ZodObject<{
|
|
11
|
-
headline: z.ZodString;
|
|
12
|
-
results: z.ZodUnion<readonly [z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, z.ZodObject<{
|
|
13
|
-
kind: z.ZodLiteral<"not_applicable">;
|
|
14
|
-
reason: z.ZodString;
|
|
15
|
-
}, z.core.$strip>]>;
|
|
16
|
-
batchTimings: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$loose>, z.ZodObject<{
|
|
17
|
-
kind: z.ZodLiteral<"not_applicable">;
|
|
18
|
-
reason: z.ZodString;
|
|
19
|
-
}, z.core.$strip>]>;
|
|
20
|
-
costSummary: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$loose>, z.ZodObject<{
|
|
21
|
-
kind: z.ZodLiteral<"not_applicable">;
|
|
22
|
-
reason: z.ZodString;
|
|
23
|
-
}, z.core.$strip>]>;
|
|
24
|
-
structuredReport: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$loose>, z.ZodObject<{
|
|
25
|
-
kind: z.ZodLiteral<"not_applicable">;
|
|
26
|
-
reason: z.ZodString;
|
|
27
|
-
}, z.core.$strip>]>;
|
|
28
|
-
error: z.ZodUnion<readonly [z.ZodObject<{
|
|
29
|
-
code: z.ZodString;
|
|
30
|
-
message: z.ZodString;
|
|
31
|
-
details: z.ZodOptional<z.ZodUnknown>;
|
|
32
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
33
|
-
kind: z.ZodLiteral<"not_applicable">;
|
|
34
|
-
reason: z.ZodString;
|
|
35
|
-
}, z.core.$strip>]>;
|
|
36
|
-
specReviewVerdict: z.ZodOptional<z.ZodEnum<{
|
|
37
|
-
error: "error";
|
|
38
|
-
approved: "approved";
|
|
39
|
-
concerns: "concerns";
|
|
40
|
-
changes_required: "changes_required";
|
|
41
|
-
annotated: "annotated";
|
|
42
|
-
skipped: "skipped";
|
|
43
|
-
not_applicable: "not_applicable";
|
|
44
|
-
}>>;
|
|
45
|
-
qualityReviewVerdict: z.ZodOptional<z.ZodEnum<{
|
|
46
|
-
error: "error";
|
|
47
|
-
approved: "approved";
|
|
48
|
-
concerns: "concerns";
|
|
49
|
-
changes_required: "changes_required";
|
|
50
|
-
annotated: "annotated";
|
|
51
|
-
skipped: "skipped";
|
|
52
|
-
not_applicable: "not_applicable";
|
|
53
|
-
}>>;
|
|
54
|
-
roundsUsed: z.ZodOptional<z.ZodNumber>;
|
|
55
|
-
}, z.core.$loose>;
|
|
56
|
-
//# sourceMappingURL=shared-output.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared-output.d.ts","sourceRoot":"","sources":["../../src/tools/shared-output.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,WAAW;;;;iBAItB,CAAC;AAGH,eAAO,MAAM,kBAAkB,gCAA6B,CAAC;AAC7D,eAAO,MAAM,iBAAiB,gCAA6B,CAAC;AAC5D,eAAO,MAAM,sBAAsB,gCAA6B,CAAC;AAGjE,wBAAgB,yBAAyB,CAAC,gBAAgB,GAAE,CAAC,CAAC,UAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAYrF"}
|