opencode-swarm 7.145.1 → 7.146.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.
Files changed (107) hide show
  1. package/.opencode/skills/phase-wrap/SKILL.md +3 -2
  2. package/README.md +5 -1
  3. package/dist/cli/{config-doctor-96jmxr7s.js → config-doctor-vs6hvbew.js} +3 -3
  4. package/dist/cli/{core-w78pc1hh.js → core-jvvm935f.js} +2 -2
  5. package/dist/cli/{curation-policy-smyc2mrm.js → curation-policy-xv0j8zyt.js} +6 -6
  6. package/dist/cli/{curator-59hzdxrv.js → curator-5bxh1djq.js} +28 -28
  7. package/dist/cli/{curator-llm-factory-g794pv51.js → curator-llm-factory-pe6skby4.js} +28 -28
  8. package/dist/cli/{evidence-summary-service-41m0cna6.js → evidence-summary-service-6m9jmzk8.js} +12 -12
  9. package/dist/cli/{gate-evidence-7aywx7qa.js → gate-evidence-84sfx6g8.js} +7 -7
  10. package/dist/cli/{guardrail-explain-j88dhm6w.js → guardrail-explain-jhbxq8yb.js} +29 -29
  11. package/dist/cli/{guardrail-log-xcb3ke8s.js → guardrail-log-vpbp3rm4.js} +4 -4
  12. package/dist/cli/{hive-promoter-nnnx5692.js → hive-promoter-mmmfszv8.js} +28 -28
  13. package/dist/cli/{index-34tawmyx.js → index-0a0asz2s.js} +1 -1
  14. package/dist/cli/{index-2qrd8mfa.js → index-4p3qfb05.js} +1 -1
  15. package/dist/cli/{index-gey2257h.js → index-5e5a1y2r.js} +1 -1
  16. package/dist/cli/{index-17e73wac.js → index-5qwmpamg.js} +1 -1
  17. package/dist/cli/{index-41t3hgaa.js → index-92cxd0r1.js} +247 -29
  18. package/dist/cli/{index-rtkttser.js → index-97psh79d.js} +1 -1
  19. package/dist/cli/{index-gf03198s.js → index-bghwrr59.js} +1 -1
  20. package/dist/cli/{index-tw8ck794.js → index-bma2wrqx.js} +2 -2
  21. package/dist/cli/{index-v3y3qg48.js → index-cpg98bh1.js} +17 -1
  22. package/dist/cli/{index-kxzgnz2h.js → index-d4e6wpkg.js} +14 -7
  23. package/dist/cli/{index-sfemjcb8.js → index-f17j50dx.js} +5 -5
  24. package/dist/cli/{index-7axx11dt.js → index-fay8h6v8.js} +25 -5
  25. package/dist/cli/{index-19v4tccw.js → index-fyr2wbvz.js} +2 -2
  26. package/dist/cli/{index-cqfp05jb.js → index-fzqhn96z.js} +3 -3
  27. package/dist/cli/{index-mrkgxfeh.js → index-g3xt1d16.js} +4 -4
  28. package/dist/cli/{index-evpgszmp.js → index-gxbhp7sx.js} +2 -2
  29. package/dist/cli/{index-mpf01swm.js → index-j20fzn0w.js} +2 -2
  30. package/dist/cli/{index-xz4x17z0.js → index-j43qndgc.js} +30 -30
  31. package/dist/cli/{index-neh8azwc.js → index-jfcgnvg6.js} +3 -3
  32. package/dist/cli/{index-qpke2x5h.js → index-kfmee1cr.js} +6 -6
  33. package/dist/cli/{index-4evasm2b.js → index-kggqpefz.js} +5 -5
  34. package/dist/cli/{index-90w06fqr.js → index-kwxp0z0n.js} +4 -4
  35. package/dist/cli/{index-b7ntt9cw.js → index-n6ke10ck.js} +4 -4
  36. package/dist/cli/{index-fwnhh6s7.js → index-nsr5b69r.js} +2 -2
  37. package/dist/cli/{index-bst6epnr.js → index-pz2py5v7.js} +1876 -1065
  38. package/dist/cli/{index-8ef23wex.js → index-q2mvacjr.js} +4 -4
  39. package/dist/cli/{index-dppzthm9.js → index-qyvjp0bq.js} +2 -2
  40. package/dist/cli/{index-tm0bezd9.js → index-s8qyaqs2.js} +1 -1
  41. package/dist/cli/{index-ymyke19q.js → index-vk15nbh4.js} +2 -2
  42. package/dist/cli/{index-dzan8czb.js → index-x8pm918t.js} +1 -1
  43. package/dist/cli/{index-ff66fbjt.js → index-zd1mfygt.js} +177 -29
  44. package/dist/cli/{index-zpp507z0.js → index-zsmsy1dh.js} +2 -2
  45. package/dist/cli/index.js +28 -28
  46. package/dist/cli/{knowledge-escalator-s6acdpwj.js → knowledge-escalator-c9p3w12b.js} +12 -12
  47. package/dist/cli/{knowledge-events-jprkz49t.js → knowledge-events-d201414m.js} +10 -10
  48. package/dist/cli/{knowledge-link-zvtmj756.js → knowledge-link-82ew2yc4.js} +5 -5
  49. package/dist/cli/{knowledge-store-mc4awds4.js → knowledge-store-ds45k9th.js} +6 -6
  50. package/dist/cli/{knowledge-validator-pe4ncrvj.js → knowledge-validator-707vsncy.js} +8 -8
  51. package/dist/cli/{model-preflight-77dwxfv5.js → model-preflight-7ea00h34.js} +1 -1
  52. package/dist/cli/{pending-delegations-epzht3d7.js → pending-delegations-kkrczqv7.js} +3 -3
  53. package/dist/cli/{pr-subscriptions-2ahy8g87.js → pr-subscriptions-2xn238xt.js} +3 -3
  54. package/dist/cli/{runner-ra9pjhp2.js → runner-pqsf809k.js} +6 -6
  55. package/dist/cli/{scan-cursor-hdzhqwzj.js → scan-cursor-znhqb8xa.js} +7 -7
  56. package/dist/cli/{schema-pg85z06v.js → schema-dnnm0p40.js} +2 -2
  57. package/dist/cli/{scope-persistence-v8we8ja7.js → scope-persistence-4n24a1e2.js} +8 -8
  58. package/dist/cli/{skill-generator-ctskfct2.js → skill-generator-5s0p3y8k.js} +14 -14
  59. package/dist/cli/{telemetry-c21dgffc.js → telemetry-t109dhv7.js} +1 -1
  60. package/dist/cli/{worktree-collision-ownership-f7se4wbf.js → worktree-collision-ownership-2jtg2my1.js} +3 -3
  61. package/dist/cli/{worktree-isolation-j4qb7mgb.js → worktree-isolation-1v2mythh.js} +28 -28
  62. package/dist/commands/memory.d.ts +8 -0
  63. package/dist/commands/registry.d.ts +8 -0
  64. package/dist/config/schema.d.ts +16 -2
  65. package/dist/evidence/task-gate-repair.d.ts +26 -0
  66. package/dist/evidence/task-gate-requirements.d.ts +20 -0
  67. package/dist/gate-evidence.d.ts +7 -0
  68. package/dist/hooks/knowledge-receipt-ledger-storage.d.ts +2 -0
  69. package/dist/hooks/knowledge-receipt-ledger.d.ts +72 -3
  70. package/dist/hooks/knowledge-receipt-observability.d.ts +1 -1
  71. package/dist/hooks/phase-complete-directive-gate.d.ts +9 -0
  72. package/dist/index.js +593 -537
  73. package/dist/memory/config.d.ts +20 -0
  74. package/dist/memory/errors.d.ts +14 -0
  75. package/dist/memory/gateway.d.ts +32 -0
  76. package/dist/memory/index.d.ts +3 -2
  77. package/dist/memory/pii.d.ts +66 -0
  78. package/dist/memory/prompt-block.d.ts +1 -1
  79. package/dist/memory/provider.d.ts +15 -0
  80. package/dist/memory/redaction.d.ts +31 -8
  81. package/dist/memory/schema.d.ts +18 -0
  82. package/dist/memory/sentinel.d.ts +12 -0
  83. package/dist/memory/sqlite-provider.d.ts +93 -0
  84. package/dist/memory/types.d.ts +9 -0
  85. package/dist/plan/manager.d.ts +8 -0
  86. package/dist/review/diff-source.d.ts +30 -0
  87. package/dist/review/engine.d.ts +1 -0
  88. package/dist/review/evidence.d.ts +16 -2
  89. package/dist/review/phase-runner.d.ts +1 -0
  90. package/dist/tools/completion-verify.d.ts +2 -0
  91. package/dist/tools/convene-council.d.ts +1 -1
  92. package/dist/tools/index.d.ts +4 -0
  93. package/dist/tools/manifest.d.ts +4 -0
  94. package/dist/tools/phase-complete/gates/final-review-gate.d.ts +3 -3
  95. package/dist/tools/phase-complete/gates/types.d.ts +2 -2
  96. package/dist/tools/phase-complete/preflight-report.d.ts +66 -0
  97. package/dist/tools/phase-complete/snapshot-identity.d.ts +1 -0
  98. package/dist/tools/phase-complete.d.ts +66 -3
  99. package/dist/tools/record-directive-override.d.ts +14 -0
  100. package/dist/tools/repair-gate-evidence.d.ts +6 -0
  101. package/dist/tools/repair-knowledge-receipt-ledger.d.ts +27 -0
  102. package/dist/tools/run-phase-review.d.ts +37 -0
  103. package/dist/tools/submit-phase-council-verdicts.d.ts +1 -1
  104. package/dist/tools/tool-metadata.d.ts +32 -16
  105. package/dist/tools/write-final-council-evidence.d.ts +1 -1
  106. package/dist/tools/write-retro.d.ts +2 -0
  107. package/package.json +12 -2
@@ -8,9 +8,9 @@ export declare const ArgsSchema: z.ZodObject<{
8
8
  verdicts: z.ZodArray<z.ZodObject<{
9
9
  agent: z.ZodEnum<{
10
10
  reviewer: "reviewer";
11
+ test_engineer: "test_engineer";
11
12
  critic: "critic";
12
13
  explorer: "explorer";
13
- test_engineer: "test_engineer";
14
14
  sme: "sme";
15
15
  }>;
16
16
  verdict: z.ZodEnum<{
@@ -54,11 +54,15 @@ export { pr_workflow_status } from './pr-workflow-status';
54
54
  export { type PreCheckBatchInput, type PreCheckBatchResult, pre_check_batch, runPreCheckBatch, type ToolResult, } from './pre-check-batch';
55
55
  export { executePreparePrFeedbackScope, prepare_pr_feedback_scope, } from './prepare-pr-feedback-scope';
56
56
  export { type QualityBudgetInput, type QualityBudgetResult, quality_budget, qualityBudget, } from './quality-budget';
57
+ export { executeRecordDirectiveOverride, record_directive_override, } from './record-directive-override';
58
+ export { executeRepairGateEvidence, repair_gate_evidence, } from './repair-gate-evidence';
59
+ export { executeRepairKnowledgeReceiptLedger, repair_knowledge_receipt_ledger, } from './repair-knowledge-receipt-ledger';
57
60
  export { buildWorkspaceGraph, type GraphEdge, type GraphNode, loadGraph, loadOrCreateGraph, type RepoGraph, resolveModuleSpecifier, saveGraph, updateGraphForFiles, } from './repo-graph';
58
61
  export { repo_map } from './repo-map';
59
62
  export { req_coverage } from './req-coverage';
60
63
  export { retrieve_lane_output } from './retrieve-lane-output';
61
64
  export { retrieve_summary } from './retrieve-summary';
65
+ export { createRunPhaseReviewTool, executeRunPhaseReview, run_phase_review, } from './run-phase-review';
62
66
  export { type SastScanFinding, type SastScanInput, type SastScanResult, sast_scan, sastScan, } from './sast-scan';
63
67
  export type { SavePlanArgs, SavePlanResult } from './save-plan';
64
68
  export { save_plan } from './save-plan';
@@ -74,6 +74,10 @@ export declare const TOOL_MANIFEST: {
74
74
  retrieve_lane_output: () => ToolDefinition;
75
75
  extract_code_blocks: () => ToolDefinition;
76
76
  phase_complete: () => ToolDefinition;
77
+ run_phase_review: () => ToolDefinition;
78
+ repair_gate_evidence: () => ToolDefinition;
79
+ repair_knowledge_receipt_ledger: () => ToolDefinition;
80
+ record_directive_override: () => ToolDefinition;
77
81
  save_plan: () => ToolDefinition;
78
82
  update_task_status: () => ToolDefinition;
79
83
  lint_spec: () => ToolDefinition;
@@ -3,10 +3,10 @@ import type { GateContext, GateResult } from './types.js';
3
3
  /**
4
4
  * Evidence-only final review gate.
5
5
  *
6
- * The model dispatch belongs to the phase_complete tool body. This gate performs
6
+ * Model dispatch belongs to the explicit run_phase_review recovery tool. This gate performs
7
7
  * one bounded, model-free scope collection at the terminal decision point, then
8
- * verifies that the persisted artifact and in-memory result both describe that
9
- * current scope and that the configured blocking policy is satisfied.
8
+ * verifies that the persisted artifact describes that current scope and that
9
+ * the configured blocking policy is satisfied.
10
10
  */
11
11
  export declare function runFinalReviewGate(ctx: GateContext): Promise<GateResult>;
12
12
  /**
@@ -40,13 +40,13 @@ export interface GateContext {
40
40
  loadedRetroBundle?: import('../../../config/evidence-schema').EvidenceBundle | null;
41
41
  /** Task id for the accepted retrospective bundle, if one was loaded */
42
42
  loadedRetroTaskId?: string | null;
43
- /** Exact scope produced by the model-dispatching phase_complete body. */
43
+ /** Legacy compatibility field; current final review derives persisted scope. */
44
44
  autoReviewScopeHash?: string;
45
45
  /** Completeness of the freshly collected in-memory review scope. */
46
46
  autoReviewScopeComplete?: boolean;
47
47
  /** Distinguishes ordinary phase review from the final durable plan phase. */
48
48
  autoReviewTrigger?: 'phase_completion' | 'plan_completion';
49
- /** Fresh in-memory disposition from the review run owned by phase_complete. */
49
+ /** Legacy compatibility field for callers carrying a fresh disposition. */
50
50
  autoReviewBlocked?: boolean;
51
51
  /** Machine-readable reason from the current review run, when blocked. */
52
52
  autoReviewBlockReason?: import('../../../review/engine').ReviewEngineResult['blockReason'];
@@ -0,0 +1,66 @@
1
+ import type { GateResult } from './gates/types.js';
2
+ export type PhaseGateOutcome = 'pass' | 'block' | 'error' | 'not_applicable';
3
+ export interface PhaseGateRecovery {
4
+ kind: 'tool' | 'command' | 'retry' | 'user_action';
5
+ action: string;
6
+ args?: Record<string, unknown>;
7
+ }
8
+ export interface PhaseGateEntry {
9
+ id: string;
10
+ code: string;
11
+ outcome: PhaseGateOutcome;
12
+ detail?: string;
13
+ evidenceRefs: string[];
14
+ responsibleActor: string;
15
+ recovery?: PhaseGateRecovery;
16
+ requiredRecoveryKind?: PhaseGateRecovery['kind'];
17
+ agentsDispatched: string[];
18
+ agentsMissing: string[];
19
+ warnings: string[];
20
+ recoveryGuidance?: string;
21
+ phase_council_required?: boolean;
22
+ final_council_required?: boolean;
23
+ retrospective_gate?: {
24
+ schema_valid: boolean;
25
+ gate_pass: boolean;
26
+ verdict?: 'pass' | 'fail';
27
+ };
28
+ }
29
+ export interface PhaseGateReport {
30
+ schemaVersion: 1;
31
+ phase: number;
32
+ outcome: 'pass' | 'block';
33
+ reportHash: string;
34
+ entries: PhaseGateEntry[];
35
+ }
36
+ export interface PhaseGateCheck {
37
+ id: string;
38
+ responsibleActor: string;
39
+ applicable?: boolean;
40
+ notApplicableDetail?: string;
41
+ run: () => Promise<GateResult>;
42
+ timeoutMs?: number;
43
+ }
44
+ export declare function collectPhaseGateReport(input: {
45
+ phase: number;
46
+ checks: readonly PhaseGateCheck[];
47
+ }): Promise<PhaseGateReport>;
48
+ export declare function formatPhaseGateCompatibility(report: PhaseGateReport): {
49
+ success: boolean;
50
+ phase: number;
51
+ status: 'success' | 'blocked' | 'incomplete';
52
+ reason?: string;
53
+ message?: string;
54
+ agentsDispatched: string[];
55
+ agentsMissing: string[];
56
+ warnings: string[];
57
+ gate_report: PhaseGateReport;
58
+ retrospective_gate?: {
59
+ schema_valid: boolean;
60
+ gate_pass: boolean;
61
+ verdict?: 'pass' | 'fail';
62
+ };
63
+ recovery_guidance?: string;
64
+ phase_council_required?: boolean;
65
+ final_council_required?: boolean;
66
+ };
@@ -0,0 +1 @@
1
+ export declare function computePhaseEvidenceSnapshot(directory: string): string;
@@ -3,6 +3,10 @@
3
3
  * Core implementation - gathers data, enforces policy, writes event, resets state.
4
4
  */
5
5
  import type { ToolDefinition } from '@opencode-ai/plugin/tool';
6
+ import { savePlan } from '../plan/manager';
7
+ import type { ReviewModelDispatcher } from '../review/contracts.js';
8
+ import type { ReviewAgentModelRegistry } from '../review/runtime.js';
9
+ import { runArchitectureSupervisorGate, runCompletionVerifyGate, runDriftGate, runFinalCouncilGate, runFinalReviewGate, runHallucinationGate, runMutationGate, runPhaseCouncilGate } from './phase-complete/gates/index.js';
6
10
  /** Narrow seam for receipt/plan ordering tests. */
7
11
  export declare const phaseCompleteReceiptInternals: {
8
12
  recordPhaseCloseIntent: (directory: string, phase: string, sessionId?: string, taskId?: string) => Promise<import("../hooks/knowledge-receipt-ledger.js").ReceiptLedgerResult<{
@@ -12,8 +16,67 @@ export declare const phaseCompleteReceiptInternals: {
12
16
  event_id: string;
13
17
  }>>;
14
18
  };
15
- import type { ReviewModelDispatcher } from '../review/contracts.js';
16
- import type { ReviewAgentModelRegistry } from '../review/runtime.js';
19
+ /** Narrow seam for guarded-plan commit tests. */
20
+ export declare const phaseCompleteCommitInternals: {
21
+ savePlan: (directory: string, plan: {
22
+ schema_version: "1.0.0";
23
+ title: string;
24
+ swarm: string;
25
+ phases: {
26
+ id: number;
27
+ name: string;
28
+ status: "blocked" | "complete" | "completed" | "pending" | "in_progress" | "closed";
29
+ tasks: {
30
+ id: string;
31
+ phase: number;
32
+ status: "blocked" | "completed" | "pending" | "in_progress" | "closed";
33
+ size: "small" | "medium" | "large";
34
+ description: string;
35
+ depends: string[];
36
+ files_touched: string[];
37
+ acceptance?: string | undefined;
38
+ evidence_path?: string | undefined;
39
+ blocked_reason?: string | undefined;
40
+ fr_refs?: string[] | undefined;
41
+ }[];
42
+ type?: "code" | "non-code" | undefined;
43
+ required_agents?: string[] | undefined;
44
+ }[];
45
+ current_phase?: number | undefined;
46
+ migration_status?: "migrated" | "native" | "migration_failed" | undefined;
47
+ specMtime?: string | undefined;
48
+ specHash?: string | undefined;
49
+ execution_profile?: {
50
+ parallelization_enabled: boolean;
51
+ max_concurrent_tasks: number;
52
+ council_parallel: boolean;
53
+ locked: boolean;
54
+ auto_proceed: boolean;
55
+ commit_after_each_completed_task: boolean;
56
+ planning_profile?: "balanced" | "strict" | undefined;
57
+ } | undefined;
58
+ }, options?: {
59
+ preserveCompletedStatuses?: boolean;
60
+ acknowledged_removals?: import("../plan/manager").AcknowledgedRemovals;
61
+ planLockAlreadyHeld?: boolean;
62
+ staleProjectionReconcile?: {
63
+ expectedSeq: number;
64
+ expectedLedgerHash: string;
65
+ };
66
+ preCommitCheck?: () => void;
67
+ } | undefined) => Promise<void>;
68
+ };
69
+ /** Injectable observational gates for aggregate-preflight regression tests. */
70
+ export declare const phaseCompletePreflightInternals: {
71
+ runCompletionVerifyGate: typeof runCompletionVerifyGate;
72
+ runDriftGate: typeof runDriftGate;
73
+ runHallucinationGate: typeof runHallucinationGate;
74
+ runMutationGate: typeof runMutationGate;
75
+ runPhaseCouncilGate: typeof runPhaseCouncilGate;
76
+ runArchitectureSupervisorGate: typeof runArchitectureSupervisorGate;
77
+ runFinalReviewGate: typeof runFinalReviewGate;
78
+ runFinalCouncilGate: typeof runFinalCouncilGate;
79
+ };
17
80
  /**
18
81
  * Arguments for the phase_complete tool
19
82
  */
@@ -52,7 +115,7 @@ declare function allCompletedTasksHavePassedGateEvidence(directory: string, task
52
115
  * Execute the phase_complete tool
53
116
  * Gathers data, enforces policy, writes event, resets state
54
117
  */
55
- export declare function executePhaseComplete(args: PhaseCompleteArgs, workingDirectory?: string, directory?: string, runtime?: PhaseCompleteRuntime): Promise<string>;
118
+ export declare function executePhaseComplete(args: PhaseCompleteArgs, workingDirectory?: string, directory?: string, _runtime?: PhaseCompleteRuntime): Promise<string>;
56
119
  /** @internal exported for testing only */
57
120
  export declare function _buildOutputJson(outputData: {
58
121
  phase: number;
@@ -0,0 +1,14 @@
1
+ import type { ToolContext, ToolDefinition } from '@opencode-ai/plugin/tool';
2
+ import { recordDirectiveOverrides } from '../hooks/phase-complete-directive-gate.js';
3
+ import { loadPlan } from '../plan/manager.js';
4
+ export interface RecordDirectiveOverrideArgs {
5
+ directive_ids: string[];
6
+ justification: string;
7
+ phase: number;
8
+ }
9
+ export declare const recordDirectiveOverrideInternals: {
10
+ loadPlan: typeof loadPlan;
11
+ recordDirectiveOverrides: typeof recordDirectiveOverrides;
12
+ };
13
+ export declare function executeRecordDirectiveOverride(args: RecordDirectiveOverrideArgs, directory: string, ctx?: Pick<ToolContext, 'sessionID' | 'agent'>): Promise<Record<string, unknown>>;
14
+ export declare const record_directive_override: ToolDefinition;
@@ -0,0 +1,6 @@
1
+ import type { ToolContext, ToolDefinition } from '@opencode-ai/plugin/tool';
2
+ import { type RepairGateEvidenceArgs } from '../evidence/task-gate-repair.js';
3
+ export declare function executeRepairGateEvidence(args: RepairGateEvidenceArgs & {
4
+ working_directory?: string;
5
+ }, directory: string, _ctx?: ToolContext): Promise<import("../evidence/task-gate-repair.js").RepairGateEvidenceResult>;
6
+ export declare const repair_gate_evidence: ToolDefinition;
@@ -0,0 +1,27 @@
1
+ import type { ToolContext, ToolDefinition } from '@opencode-ai/plugin/tool';
2
+ import { type RepairKnowledgeReceiptLedgerInput } from '../hooks/knowledge-receipt-ledger.js';
3
+ export declare function executeRepairKnowledgeReceiptLedger(args: RepairKnowledgeReceiptLedgerInput & {
4
+ working_directory?: string;
5
+ }, directory: string, _ctx?: ToolContext): Promise<{
6
+ success: boolean;
7
+ message: string;
8
+ errors: string[];
9
+ code?: undefined;
10
+ } | {
11
+ success: boolean;
12
+ message: string;
13
+ errors: string[];
14
+ code: import("../hooks/knowledge-receipt-ledger-storage.js").ReceiptStoreErrorCode | "legacy_unverifiable";
15
+ } | {
16
+ ok: true;
17
+ status: "validated_projection" | "repaired_authority" | "pending_re_evaluation";
18
+ pending_re_evaluation: boolean;
19
+ repair_id?: string;
20
+ salvage_through_seq: number;
21
+ salvage_through_hash: string;
22
+ success: boolean;
23
+ message: string;
24
+ errors?: undefined;
25
+ code?: undefined;
26
+ }>;
27
+ export declare const repair_knowledge_receipt_ledger: ToolDefinition;
@@ -0,0 +1,37 @@
1
+ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
2
+ import { loadPluginConfigWithMeta as loadPluginConfigWithMeta_import } from '../config/index.js';
3
+ import type { ReviewModelDispatcher } from '../review/contracts.js';
4
+ import { type ReviewAgentModelRegistry } from '../review/runtime.js';
5
+ export interface RunPhaseReviewArgs {
6
+ phase: number;
7
+ sessionID: string;
8
+ is_final_plan_phase?: boolean;
9
+ }
10
+ export interface RunPhaseReviewResult {
11
+ success: boolean;
12
+ trigger?: 'phase_completion' | 'plan_completion';
13
+ status?: 'completed' | 'clean' | 'error';
14
+ blocked?: boolean;
15
+ blockReason?: string;
16
+ scopeHash?: string;
17
+ manifestHash?: string;
18
+ scopeComplete?: boolean;
19
+ evidencePath?: string;
20
+ receiptPath?: string;
21
+ message: string;
22
+ }
23
+ /**
24
+ * Test-only dependency-injection seam.
25
+ * @tool-opt-out Test-only dependency-injection seam; not a public tool.
26
+ */
27
+ export declare const _internals: {
28
+ loadPluginConfigWithMeta: typeof loadPluginConfigWithMeta_import;
29
+ };
30
+ export declare function executeRunPhaseReview(directory: string, args: RunPhaseReviewArgs, options?: {
31
+ dispatcher?: ReviewModelDispatcher;
32
+ generatedAgentNames?: readonly string[];
33
+ agentModelRegistry?: ReviewAgentModelRegistry;
34
+ activeAgentName?: string;
35
+ }): Promise<RunPhaseReviewResult>;
36
+ export declare function createRunPhaseReviewTool(dispatcher?: ReviewModelDispatcher, generatedAgentNames?: readonly string[], agentModelRegistry?: ReviewAgentModelRegistry, getActiveAgentName?: (sessionID: string) => string | undefined): ToolDefinition;
37
+ export declare const run_phase_review: ToolDefinition;
@@ -8,9 +8,9 @@ export declare const ArgsSchema: z.ZodObject<{
8
8
  verdicts: z.ZodArray<z.ZodObject<{
9
9
  agent: z.ZodEnum<{
10
10
  reviewer: "reviewer";
11
+ test_engineer: "test_engineer";
11
12
  critic: "critic";
12
13
  explorer: "explorer";
13
- test_engineer: "test_engineer";
14
14
  sme: "sme";
15
15
  }>;
16
16
  verdict: z.ZodEnum<{
@@ -34,7 +34,7 @@ export interface ToolMeta {
34
34
  export declare const TOOL_METADATA: {
35
35
  diff: {
36
36
  description: string;
37
- agents: ("reviewer" | "critic_oversight" | "critic_finding_validator" | "coder" | "test_engineer" | "architect")[];
37
+ agents: ("coder" | "reviewer" | "test_engineer" | "critic_oversight" | "critic_finding_validator" | "architect")[];
38
38
  prWorkflow: {
39
39
  modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
40
40
  capability: "observe";
@@ -66,7 +66,7 @@ export declare const TOOL_METADATA: {
66
66
  };
67
67
  imports: {
68
68
  description: string;
69
- agents: ("reviewer" | "critic" | "critic_finding_validator" | "coder" | "test_engineer" | "architect" | "sme" | "researcher" | "docs" | "docs_design" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier")[];
69
+ agents: ("coder" | "reviewer" | "test_engineer" | "critic" | "critic_finding_validator" | "architect" | "sme" | "researcher" | "docs" | "docs_design" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier")[];
70
70
  prWorkflow: {
71
71
  modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
72
72
  capability: "observe";
@@ -74,7 +74,7 @@ export declare const TOOL_METADATA: {
74
74
  };
75
75
  lint: {
76
76
  description: string;
77
- agents: ("reviewer" | "critic_finding_validator" | "coder" | "architect")[];
77
+ agents: ("coder" | "reviewer" | "critic_finding_validator" | "architect")[];
78
78
  prWorkflow: {
79
79
  modes: "PR_REVIEW"[];
80
80
  capability: "validate";
@@ -114,11 +114,11 @@ export declare const TOOL_METADATA: {
114
114
  };
115
115
  symbols: {
116
116
  description: string;
117
- agents: ("reviewer" | "critic" | "critic_finding_validator" | "coder" | "test_engineer" | "architect" | "sme" | "researcher" | "docs" | "docs_design" | "designer" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier" | "spec_writer")[];
117
+ agents: ("coder" | "reviewer" | "test_engineer" | "critic" | "critic_finding_validator" | "architect" | "sme" | "researcher" | "docs" | "docs_design" | "designer" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier" | "spec_writer")[];
118
118
  };
119
119
  complexity_hotspots: {
120
120
  description: string;
121
- agents: ("reviewer" | "critic" | "critic_oversight" | "critic_finding_validator" | "explorer" | "test_engineer" | "architect" | "sme" | "researcher" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier")[];
121
+ agents: ("reviewer" | "test_engineer" | "critic" | "critic_oversight" | "critic_finding_validator" | "explorer" | "architect" | "sme" | "researcher" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier")[];
122
122
  };
123
123
  schema_drift: {
124
124
  description: string;
@@ -210,7 +210,7 @@ export declare const TOOL_METADATA: {
210
210
  };
211
211
  pkg_audit: {
212
212
  description: string;
213
- agents: ("reviewer" | "critic_oversight" | "critic_finding_validator" | "test_engineer" | "architect" | "critic_hallucination_verifier")[];
213
+ agents: ("reviewer" | "test_engineer" | "critic_oversight" | "critic_finding_validator" | "architect" | "critic_hallucination_verifier")[];
214
214
  prWorkflow: {
215
215
  modes: "PR_REVIEW"[];
216
216
  capability: "validate";
@@ -238,7 +238,7 @@ export declare const TOOL_METADATA: {
238
238
  };
239
239
  test_runner: {
240
240
  description: string;
241
- agents: ("reviewer" | "critic_finding_validator" | "test_engineer" | "architect")[];
241
+ agents: ("reviewer" | "test_engineer" | "critic_finding_validator" | "architect")[];
242
242
  prWorkflow: {
243
243
  modes: "PR_REVIEW"[];
244
244
  capability: "validate";
@@ -246,7 +246,7 @@ export declare const TOOL_METADATA: {
246
246
  };
247
247
  test_impact: {
248
248
  description: string;
249
- agents: ("reviewer" | "critic_oversight" | "critic_finding_validator" | "test_engineer" | "architect")[];
249
+ agents: ("reviewer" | "test_engineer" | "critic_oversight" | "critic_finding_validator" | "architect")[];
250
250
  prWorkflow: {
251
251
  modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
252
252
  capability: "observe";
@@ -282,7 +282,7 @@ export declare const TOOL_METADATA: {
282
282
  };
283
283
  retrieve_summary: {
284
284
  description: string;
285
- agents: ("reviewer" | "critic" | "critic_finding_validator" | "coder" | "test_engineer" | "architect" | "sme" | "docs" | "docs_design" | "designer" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier" | "critic_architecture_supervisor" | "spec_writer")[];
285
+ agents: ("coder" | "reviewer" | "test_engineer" | "critic" | "critic_finding_validator" | "architect" | "sme" | "docs" | "docs_design" | "designer" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier" | "critic_architecture_supervisor" | "spec_writer")[];
286
286
  prWorkflow: {
287
287
  modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
288
288
  capability: "observe";
@@ -304,6 +304,22 @@ export declare const TOOL_METADATA: {
304
304
  description: string;
305
305
  agents: "architect"[];
306
306
  };
307
+ run_phase_review: {
308
+ description: string;
309
+ agents: "architect"[];
310
+ };
311
+ repair_gate_evidence: {
312
+ description: string;
313
+ agents: "architect"[];
314
+ };
315
+ repair_knowledge_receipt_ledger: {
316
+ description: string;
317
+ agents: "architect"[];
318
+ };
319
+ record_directive_override: {
320
+ description: string;
321
+ agents: "architect"[];
322
+ };
307
323
  save_plan: {
308
324
  description: string;
309
325
  agents: "architect"[];
@@ -362,7 +378,7 @@ export declare const TOOL_METADATA: {
362
378
  };
363
379
  knowledge_recall: {
364
380
  description: string;
365
- agents: ("reviewer" | "critic" | "critic_oversight" | "critic_finding_validator" | "explorer" | "coder" | "test_engineer" | "architect" | "sme" | "docs" | "docs_design" | "designer" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier" | "critic_architecture_supervisor" | "curator_init" | "curator_phase" | "skill_improver" | "spec_writer")[];
381
+ agents: ("coder" | "reviewer" | "test_engineer" | "critic" | "critic_oversight" | "critic_finding_validator" | "explorer" | "architect" | "sme" | "docs" | "docs_design" | "designer" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier" | "critic_architecture_supervisor" | "curator_init" | "curator_phase" | "skill_improver" | "spec_writer")[];
366
382
  };
367
383
  knowledge_remove: {
368
384
  description: string;
@@ -378,11 +394,11 @@ export declare const TOOL_METADATA: {
378
394
  };
379
395
  search: {
380
396
  description: string;
381
- agents: ("reviewer" | "critic_oversight" | "critic_finding_validator" | "explorer" | "coder" | "test_engineer" | "architect" | "sme" | "researcher" | "docs" | "docs_design" | "designer" | "critic_hallucination_verifier" | "skill_improver" | "spec_writer")[];
397
+ agents: ("coder" | "reviewer" | "test_engineer" | "critic_oversight" | "critic_finding_validator" | "explorer" | "architect" | "sme" | "researcher" | "docs" | "docs_design" | "designer" | "critic_hallucination_verifier" | "skill_improver" | "spec_writer")[];
382
398
  };
383
399
  ast_grep: {
384
400
  description: string;
385
- agents: ("explorer" | "coder" | "test_engineer" | "architect" | "sme" | "researcher" | "docs" | "docs_design" | "critic_hallucination_verifier" | "spec_writer")[];
401
+ agents: ("coder" | "test_engineer" | "explorer" | "architect" | "sme" | "researcher" | "docs" | "docs_design" | "critic_hallucination_verifier" | "spec_writer")[];
386
402
  };
387
403
  actionlint_scan: {
388
404
  description: string;
@@ -434,7 +450,7 @@ export declare const TOOL_METADATA: {
434
450
  };
435
451
  repo_map: {
436
452
  description: string;
437
- agents: ("reviewer" | "critic" | "critic_oversight" | "critic_finding_validator" | "explorer" | "coder" | "architect" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier" | "critic_architecture_supervisor")[];
453
+ agents: ("coder" | "reviewer" | "critic" | "critic_oversight" | "critic_finding_validator" | "explorer" | "architect" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier" | "critic_architecture_supervisor")[];
438
454
  prWorkflow: {
439
455
  modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
440
456
  capability: "observe";
@@ -502,7 +518,7 @@ export declare const TOOL_METADATA: {
502
518
  };
503
519
  knowledge_receipt: {
504
520
  description: string;
505
- agents: ("reviewer" | "critic" | "critic_finding_validator" | "coder" | "test_engineer" | "architect" | "sme" | "docs" | "docs_design" | "designer" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier" | "critic_architecture_supervisor" | "curator_init" | "curator_phase" | "skill_improver" | "spec_writer")[];
521
+ agents: ("coder" | "reviewer" | "test_engineer" | "critic" | "critic_finding_validator" | "architect" | "sme" | "docs" | "docs_design" | "designer" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier" | "critic_architecture_supervisor" | "curator_init" | "curator_phase" | "skill_improver" | "spec_writer")[];
506
522
  };
507
523
  knowledge_archive: {
508
524
  description: string;
@@ -522,7 +538,7 @@ export declare const TOOL_METADATA: {
522
538
  };
523
539
  swarm_command: {
524
540
  description: string;
525
- agents: ("reviewer" | "critic" | "critic_finding_validator" | "explorer" | "coder" | "test_engineer" | "architect" | "sme" | "researcher" | "docs" | "docs_design" | "designer")[];
541
+ agents: ("coder" | "reviewer" | "test_engineer" | "critic" | "critic_finding_validator" | "explorer" | "architect" | "sme" | "researcher" | "docs" | "docs_design" | "designer")[];
526
542
  };
527
543
  dispatch_lanes: {
528
544
  description: string;
@@ -538,7 +554,7 @@ export declare const TOOL_METADATA: {
538
554
  };
539
555
  summarize_work: {
540
556
  description: string;
541
- agents: ("explorer" | "coder" | "test_engineer" | "architect" | "sme" | "researcher" | "docs" | "docs_design" | "designer")[];
557
+ agents: ("coder" | "test_engineer" | "explorer" | "architect" | "sme" | "researcher" | "docs" | "docs_design" | "designer")[];
542
558
  };
543
559
  write_architecture_supervisor_evidence: {
544
560
  description: string;
@@ -9,9 +9,9 @@ export declare const ArgsSchema: z.ZodObject<{
9
9
  verdicts: z.ZodArray<z.ZodObject<{
10
10
  agent: z.ZodEnum<{
11
11
  reviewer: "reviewer";
12
+ test_engineer: "test_engineer";
12
13
  critic: "critic";
13
14
  explorer: "explorer";
14
- test_engineer: "test_engineer";
15
15
  sme: "sme";
16
16
  }>;
17
17
  verdict: z.ZodEnum<{
@@ -12,6 +12,8 @@ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
12
12
  export interface WriteRetroArgs {
13
13
  /** The phase number being completed (maps to phase_number in schema) */
14
14
  phase: number;
15
+ /** Explicit phase verdict recorded by the retrospective gate */
16
+ verdict?: 'pass' | 'fail';
15
17
  /** Human-readable phase summary (maps to summary in BaseEvidenceSchema) */
16
18
  summary: string;
17
19
  /** Count of tasks completed */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.145.1",
3
+ "version": "7.146.0",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -108,9 +108,11 @@
108
108
  "repro:1144": "bun scripts/repro-1144.mjs",
109
109
  "repro:1873": "bun build scripts/repro-1873-entry.ts --outdir dist-build-test/repro-1873 --target node --format esm && node scripts/repro-1873.mjs",
110
110
  "check:events": "bun run scripts/check-event-contract.ts",
111
+ "check:retention": "bun run scripts/check-retention-registry.ts",
111
112
  "check:test-file-cap": "bun run scripts/check-test-file-cap.ts",
112
113
  "check:gate-portability": "bun run scripts/check-gate-portability.ts",
113
- "check:bare-spawn": "bun run scripts/check-bare-executable-spawn.ts"
114
+ "check:bare-spawn": "bun run scripts/check-bare-executable-spawn.ts",
115
+ "check:memory-recall": "bun run scripts/memory-recall-regression.ts"
114
116
  },
115
117
  "dependencies": {
116
118
  "@opencode-ai/plugin": "^1.18.3",
@@ -130,5 +132,13 @@
130
132
  "bun-types": "1.3.8",
131
133
  "js-yaml": "^4.1.1",
132
134
  "typescript": "^5.7.3"
135
+ },
136
+ "peerDependencies": {
137
+ "@xenova/transformers": "^2.17.2"
138
+ },
139
+ "peerDependenciesMeta": {
140
+ "@xenova/transformers": {
141
+ "optional": true
142
+ }
133
143
  }
134
144
  }