opencode-swarm 7.140.2 → 7.140.4

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 (113) hide show
  1. package/.opencode/skills/brainstorm/SKILL.md +1 -1
  2. package/.opencode/skills/ci-failure-batching/SKILL.md +11 -1
  3. package/.opencode/skills/ci-fix-monitor/SKILL.md +6 -4
  4. package/.opencode/skills/discover/SKILL.md +1 -1
  5. package/.opencode/skills/durable-session-state/SKILL.md +82 -0
  6. package/.opencode/skills/engineering-conventions/SKILL.md +1 -1
  7. package/.opencode/skills/issue-ingest/SKILL.md +13 -7
  8. package/.opencode/skills/issue-tracer/SKILL.md +1 -1
  9. package/.opencode/skills/orchestrating-subagents/SKILL.md +113 -0
  10. package/.opencode/skills/parallel-work-check/SKILL.md +1 -1
  11. package/.opencode/skills/swarm-ci-monitor/SKILL.md +5 -3
  12. package/.opencode/skills/swarm-pr-feedback/SKILL.md +30 -4
  13. package/.opencode/skills/writing-tests/SKILL.md +1 -1
  14. package/dist/agents/reviewer-directive-compliance.d.ts +19 -5
  15. package/dist/cli/{config-doctor-shc0n4q1.js → config-doctor-qqe6172n.js} +3 -3
  16. package/dist/cli/{core-p5cyej3r.js → core-52k057mf.js} +2 -2
  17. package/dist/cli/{curation-policy-7n6t8he4.js → curation-policy-9291bdat.js} +5 -7
  18. package/dist/cli/{curator-zp5qq24c.js → curator-04xqq68e.js} +28 -28
  19. package/dist/cli/{curator-llm-factory-pr4bdfqw.js → curator-llm-factory-cfm8fhdw.js} +28 -28
  20. package/dist/cli/{evidence-summary-service-nfdc1ht9.js → evidence-summary-service-em58myd7.js} +8 -8
  21. package/dist/cli/{gate-evidence-46qeyfc1.js → gate-evidence-ezxfkb22.js} +4 -4
  22. package/dist/cli/{guardrail-explain-thddj6jv.js → guardrail-explain-pn1bcgfz.js} +29 -29
  23. package/dist/cli/{guardrail-log-w8fmxe1x.js → guardrail-log-vb5zkegf.js} +4 -4
  24. package/dist/cli/{hive-promoter-0yg3gxg6.js → hive-promoter-z09khawt.js} +28 -28
  25. package/dist/cli/index-2rb3x0fk.js +2554 -0
  26. package/dist/cli/{index-hfvxhk4z.js → index-35qep0v7.js} +1 -1
  27. package/dist/cli/{index-h2waehqq.js → index-4hp8nvwb.js} +1 -1
  28. package/dist/cli/{index-1j5my2qy.js → index-7begd9aq.js} +4 -4
  29. package/dist/cli/{index-n831qq2v.js → index-a1fjhx4w.js} +822 -688
  30. package/dist/cli/{index-chx92bes.js → index-arza4m4j.js} +2 -2
  31. package/dist/cli/{index-ry0hgg3m.js → index-bfhwtdsw.js} +34 -0
  32. package/dist/cli/{index-jfjnn408.js → index-bn17ycxn.js} +1 -1
  33. package/dist/cli/{index-1m1ksyqt.js → index-c5kr20nz.js} +1 -1
  34. package/dist/cli/{index-4rje8dc0.js → index-djbhe0yh.js} +30 -30
  35. package/dist/cli/{index-t59cdg48.js → index-dtam929z.js} +2 -19
  36. package/dist/cli/{index-n0pja0qs.js → index-dtyeabmj.js} +2 -2
  37. package/dist/cli/{index-9txca231.js → index-hfjvepk2.js} +11 -9
  38. package/dist/cli/{index-vjqe1z2w.js → index-hfwzxh3j.js} +3 -3
  39. package/dist/cli/{index-n408rw7n.js → index-hxvkfx6t.js} +12 -0
  40. package/dist/cli/{index-brh827g0.js → index-hz0refz4.js} +10 -10
  41. package/dist/cli/{index-yt3vz0e1.js → index-mpytsq6k.js} +2 -2
  42. package/dist/cli/{index-rs1f1bh0.js → index-mrpfd1jx.js} +1 -1
  43. package/dist/cli/{index-0tevsq1a.js → index-pp5m7xga.js} +2 -2
  44. package/dist/cli/{index-b9rd29ge.js → index-rrb6cz2f.js} +1 -1
  45. package/dist/cli/{index-adyxbmt5.js → index-ryq97w1x.js} +2 -2
  46. package/dist/cli/{index-y98ngs4g.js → index-s8g7jh1k.js} +2 -2
  47. package/dist/cli/{index-bmmzfrc7.js → index-tj04dj06.js} +5 -2
  48. package/dist/cli/{index-z6md3t8m.js → index-v1an91bq.js} +54 -19
  49. package/dist/cli/{index-898f16j9.js → index-v3x7j9ey.js} +2 -2
  50. package/dist/cli/{index-7ax0bkqh.js → index-v3xhc7kg.js} +1 -1
  51. package/dist/cli/{index-325zmfyj.js → index-vrmkg8fm.js} +46 -15
  52. package/dist/cli/{index-yyyk63kk.js → index-w4etfamq.js} +2 -2
  53. package/dist/cli/{index-kbfsp07d.js → index-wk8s1m7b.js} +2 -2
  54. package/dist/cli/{index-x6mtyj6q.js → index-ysa38bnr.js} +2 -2
  55. package/dist/cli/index.js +28 -28
  56. package/dist/cli/{knowledge-escalator-58tw74js.js → knowledge-escalator-gdjnwszd.js} +19 -7
  57. package/dist/cli/{knowledge-events-knr0pfq4.js → knowledge-events-581x4q7n.js} +18 -5
  58. package/dist/cli/{knowledge-link-q46k9adx.js → knowledge-link-axx45d1h.js} +4 -4
  59. package/dist/cli/{knowledge-store-e2srcd89.js → knowledge-store-ttg33482.js} +5 -5
  60. package/dist/cli/{knowledge-validator-1dtj02q8.js → knowledge-validator-8kywqt8b.js} +7 -8
  61. package/dist/cli/{pending-delegations-qzrx38y9.js → pending-delegations-btwqsvz4.js} +3 -3
  62. package/dist/cli/{pr-subscriptions-5s59h4dd.js → pr-subscriptions-83y1cdwv.js} +3 -3
  63. package/dist/cli/{runner-y78d7ryb.js → runner-fh3r41nw.js} +5 -5
  64. package/dist/cli/{scan-cursor-7tqsvbp8.js → scan-cursor-j8ytdpam.js} +6 -6
  65. package/dist/cli/{schema-b046zss2.js → schema-6xfqtpvn.js} +2 -2
  66. package/dist/cli/{scope-persistence-dr1msqxw.js → scope-persistence-8c72jrgp.js} +4 -4
  67. package/dist/cli/{skill-generator-bvph9d98.js → skill-generator-n8vm1yhn.js} +18 -9
  68. package/dist/cli/{telemetry-sc57xtb0.js → telemetry-fb44gpba.js} +1 -1
  69. package/dist/cli/{worktree-collision-ownership-7a8e6gr9.js → worktree-collision-ownership-f28r473k.js} +3 -3
  70. package/dist/commands/ci-simulate.d.ts +7 -3
  71. package/dist/commands/close.d.ts +8 -0
  72. package/dist/commands/registry.d.ts +2 -2
  73. package/dist/commands/sdd.d.ts +15 -0
  74. package/dist/config/bundled-skills.d.ts +1 -1
  75. package/dist/config/schema.d.ts +2 -0
  76. package/dist/git/branch.d.ts +1 -1
  77. package/dist/hooks/compaction-customizer.d.ts +8 -0
  78. package/dist/hooks/delegate-ack-collector.d.ts +5 -0
  79. package/dist/hooks/hive-promoter.d.ts +4 -4
  80. package/dist/hooks/issue-trace-reducer.d.ts +7 -1
  81. package/dist/hooks/issue-trace-state.d.ts +18 -0
  82. package/dist/hooks/issue-trace.d.ts +3 -1
  83. package/dist/hooks/knowledge-application-gate.d.ts +8 -3
  84. package/dist/hooks/knowledge-application.d.ts +8 -5
  85. package/dist/hooks/knowledge-escalator.d.ts +9 -5
  86. package/dist/hooks/knowledge-events.d.ts +21 -8
  87. package/dist/hooks/knowledge-injector.d.ts +9 -0
  88. package/dist/hooks/knowledge-receipt-ledger-storage.d.ts +49 -0
  89. package/dist/hooks/knowledge-receipt-ledger.d.ts +305 -0
  90. package/dist/hooks/knowledge-receipt-observability.d.ts +28 -0
  91. package/dist/hooks/knowledge-receipt-validator.d.ts +13 -50
  92. package/dist/hooks/knowledge-store.d.ts +6 -1
  93. package/dist/hooks/knowledge-types.d.ts +12 -0
  94. package/dist/hooks/phase-complete-directive-gate.d.ts +3 -1
  95. package/dist/hooks/phase-directives.d.ts +4 -4
  96. package/dist/hooks/pr-workflow-gate.d.ts +34 -1
  97. package/dist/hooks/promotion-evidence-store.d.ts +14 -8
  98. package/dist/hooks/reviewer-verdict-parser.d.ts +34 -10
  99. package/dist/index.js +551 -532
  100. package/dist/knowledge/curation-policy.d.ts +0 -2
  101. package/dist/observability/catalog.d.ts +5 -3
  102. package/dist/observability/legacy.d.ts +4 -3
  103. package/dist/telemetry.d.ts +1 -1
  104. package/dist/tools/index.d.ts +3 -0
  105. package/dist/tools/manifest.d.ts +3 -0
  106. package/dist/tools/phase-complete.d.ts +9 -0
  107. package/dist/tools/rebind-pr-feedback-head.d.ts +17 -0
  108. package/dist/tools/record-implementation-review.d.ts +19 -0
  109. package/dist/tools/record-recurrence-sweep.d.ts +17 -0
  110. package/dist/tools/run-pr-feedback-stage-a.d.ts +8 -0
  111. package/dist/tools/tool-metadata.d.ts +12 -0
  112. package/package.json +3 -1
  113. package/dist/cli/index-jfp1bgt1.js +0 -666
@@ -26,7 +26,6 @@
26
26
  * the destructive callers (Layer 4 routing).
27
27
  */
28
28
  import { readFile } from 'node:fs/promises';
29
- import { readKnowledgeEvents } from '../hooks/knowledge-events.js';
30
29
  import { isLinked, readLinkPointer, resolveKnowledgeStoreDir, resolveLinkDir } from '../hooks/knowledge-link.js';
31
30
  import type { CurationAction, CurationEvidenceScope, CurationProposal, KnowledgeConfig } from '../hooks/knowledge-types.js';
32
31
  import { type CohortConfigFingerprintInput, cohortConfigFingerprint } from './config-fingerprint.js';
@@ -114,7 +113,6 @@ export declare function readCohortConfigFingerprint(directory: string): Promise<
114
113
  */
115
114
  export declare const _internals: {
116
115
  resolveWorktreeId: typeof resolveWorktreeId;
117
- readKnowledgeEvents: typeof readKnowledgeEvents;
118
116
  cohortConfigFingerprint: typeof cohortConfigFingerprint;
119
117
  readCohortConfigFingerprint: typeof readCohortConfigFingerprint;
120
118
  readFile: typeof readFile;
@@ -1,11 +1,13 @@
1
1
  /**
2
2
  * The event catalog (issue #2029).
3
3
  *
4
- * Exactly 40 entries, matching the `TelemetryEvent` union at
4
+ * Exactly 41 entries, matching the `TelemetryEvent` union at
5
5
  * `src/telemetry.ts:15-91`. Thirty-eight predate the #2029 contract; the 39th is
6
6
  * `agent_conflict_detected` (previously emitted through a force-cast past the
7
7
  * type system), and the 40th is `close_archive_result` (issue #2030 — the
8
- * structured close/archive result event). Both late additions are instances of
8
+ * structured close/archive result event). The 41st is the bounded diagnostic
9
+ * projection of authoritative knowledge-receipt transitions (issue #2031).
10
+ * These late additions are instances of
9
11
  * the defect class this contract exists to close: an event kind entering the
10
12
  * stream with no registration.
11
13
  *
@@ -60,7 +62,7 @@ export interface CatalogEntry {
60
62
  /**
61
63
  * Whether an event of this kind must carry `trace.parentSpanId`.
62
64
  *
63
- * `false` for all 40 entries today, and that is a truthful statement about
65
+ * `false` for all 41 entries today, and that is a truthful statement about
64
66
  * the current system rather than a placeholder: no producer supplies a
65
67
  * parent span, so `createObservation` never sets one. Setting this to `true`
66
68
  * for a kind whose producer cannot supply a parent would make every
@@ -53,9 +53,10 @@ export declare function adaptLegacyTelemetryPayload(kind: string, data: unknown,
53
53
  * Shallow, never throws, and NEVER synthesizes: an ID that is absent, empty, or
54
54
  * of the wrong type stays `undefined`. Only the mappings a producer actually
55
55
  * populates are implemented — `sessionId` to `hostSessionId`, `taskId`, `phase`
56
- * to `phaseId`, `laneId`, `batchId`. The remaining eight recognized IDs have no
57
- * current producer, and inventing an extraction for them would manufacture
58
- * exactly the joins issue #2029 item 2 forbids.
56
+ * to `phaseId`, `laneId`, `batchId`, plus the canonical receipt payload keys
57
+ * `knowledgeTraceId` and `knowledgeEntryId`. Unmapped IDs stay absent; inventing
58
+ * an extraction for them would manufacture exactly the joins issue #2029 item 2
59
+ * forbids.
59
60
  */
60
61
  export declare function extractWorkflowIds(data: unknown): WorkflowIds;
61
62
  /**
@@ -26,7 +26,7 @@ export type TelemetryEvent = 'session_started' | 'session_ended' | 'agent_activa
26
26
  * `prm_hard_stop` TRIGGER emitted by `src/prm/escalation.ts`. A trigger with
27
27
  * no matching delivery means the containment never reached the agent.
28
28
  */
29
- | 'prm_hard_stop_delivered' | 'agent_conflict_detected' | 'close_archive_result';
29
+ | 'prm_hard_stop_delivered' | 'agent_conflict_detected' | 'close_archive_result' | 'knowledge_receipt_transition';
30
30
  /** Stable classification for how a reviewer-gate decision was established. */
31
31
  export type ReviewerGateEvidenceKind = 'genuine' | 'fallback' | 'data_quality' | 'block';
32
32
  /**
@@ -106,8 +106,11 @@ export { lean_turbo_status } from './lean-turbo-status';
106
106
  export { lint_spec } from './lint-spec';
107
107
  export { mutation_test } from './mutation-test';
108
108
  export { executePreparePrWorkflowCheckout, prepare_pr_workflow_checkout, } from './prepare-pr-workflow-checkout';
109
+ export { executeRebindPrFeedbackHead, rebind_pr_feedback_head, } from './rebind-pr-feedback-head';
110
+ export { executeRecordImplementationReview, record_implementation_review, } from './record-implementation-review';
109
111
  export { executeRecordIssuePublication, record_issue_publication, } from './record-issue-publication';
110
112
  export { executeRecordIssueReproduction, record_issue_reproduction, } from './record-issue-reproduction';
113
+ export { executeRecordRecurrenceSweep, record_recurrence_sweep, } from './record-recurrence-sweep';
111
114
  export { executeRunPrFeedbackStageA, run_pr_feedback_stage_a, } from './run-pr-feedback-stage-a';
112
115
  export { symbols } from './symbols';
113
116
  export { type SyntaxCheckFileResult, type SyntaxCheckInput, type SyntaxCheckResult, syntax_check, syntaxCheck, } from './syntax-check';
@@ -46,8 +46,11 @@ export declare const TOOL_MANIFEST: {
46
46
  abort_pr_workflow: () => ToolDefinition;
47
47
  approve_plan_critic: () => ToolDefinition;
48
48
  prepare_pr_workflow_checkout: () => ToolDefinition;
49
+ record_implementation_review: () => ToolDefinition;
49
50
  record_issue_publication: () => ToolDefinition;
50
51
  record_issue_reproduction: () => ToolDefinition;
52
+ record_recurrence_sweep: () => ToolDefinition;
53
+ rebind_pr_feedback_head: () => ToolDefinition;
51
54
  run_pr_feedback_stage_a: () => ToolDefinition;
52
55
  submit_council_verdicts: () => ToolDefinition;
53
56
  submit_phase_council_verdicts: () => ToolDefinition;
@@ -3,6 +3,15 @@
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
+ /** Narrow seam for receipt/plan ordering tests. */
7
+ export declare const phaseCompleteReceiptInternals: {
8
+ recordPhaseCloseIntent: (directory: string, phase: string, sessionId?: string, taskId?: string) => Promise<import("../hooks/knowledge-receipt-ledger.js").ReceiptLedgerResult<{
9
+ event_id: string;
10
+ }>>;
11
+ commitPhaseClosed: (directory: string, phase: string, sessionId?: string, taskId?: string) => Promise<import("../hooks/knowledge-receipt-ledger.js").ReceiptLedgerResult<{
12
+ event_id: string;
13
+ }>>;
14
+ };
6
15
  import type { ReviewModelDispatcher } from '../review/contracts.js';
7
16
  import type { ReviewAgentModelRegistry } from '../review/runtime.js';
8
17
  /**
@@ -0,0 +1,17 @@
1
+ /**
2
+ * rebind_pr_feedback_head — controlled base-sync/rebind transition for a
3
+ * PR_FEEDBACK workflow (issue #2131 criterion C2).
4
+ *
5
+ * After a merge/rebase used to resolve base drift or conflicts, the local
6
+ * history is no longer a direct child of the immutable intake head, so the
7
+ * ordinary exactly-one-reviewed-commit publication path can never be satisfied.
8
+ * This tool moves the intake head to the new verified remote PR head and
9
+ * invalidates every ancestry-bound receipt (Stage A, verification batches,
10
+ * ordered gates), forcing the full mechanical ladder to re-run on the new
11
+ * ancestry. Refuses while publication is armed or while lanes are in flight.
12
+ */
13
+ import { createSwarmTool } from './create-tool';
14
+ export declare function executeRebindPrFeedbackHead(args: unknown, directory: string, context?: {
15
+ sessionID?: string;
16
+ }): Promise<string>;
17
+ export declare const rebind_pr_feedback_head: ReturnType<typeof createSwarmTool>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * record_implementation_review — persist an issue-bound independent
3
+ * implementation-review receipt for the issue-trace workflow (issue #2131
4
+ * residual criterion B).
5
+ *
6
+ * Records that FRESH-context reviewer and critic passes (separate contexts
7
+ * from the implementer) both delivered APPROVE verdicts over the
8
+ * implementation diff. This is an agent self-attestation of the review
9
+ * discipline — it records the verdicts, the reviewed diff range, and the
10
+ * calling session, but does not itself authenticate that the review contexts
11
+ * were genuinely fresh; under PR-review/feedback modes the mechanically
12
+ * authenticated reviewer gates remain the PR-workflow machinery. The trace
13
+ * engine will not hand off to commit-pr until this receipt exists.
14
+ */
15
+ import { createSwarmTool } from './create-tool';
16
+ export declare function executeRecordImplementationReview(args: unknown, directory: string, context?: {
17
+ sessionID?: string;
18
+ }): Promise<string>;
19
+ export declare const record_implementation_review: ReturnType<typeof createSwarmTool>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * record_recurrence_sweep — persist an issue-bound recurrence-sweep receipt for
3
+ * the issue-trace workflow (issue #2131 residual criterion B).
4
+ *
5
+ * Modeled on issue-tracer Phase 4.2: for a real defect class the sweep must
6
+ * record the pattern statement, explicit search predicates, a typed
7
+ * disposition for every hit, and a guardrail with proof it catches the
8
+ * original defect. The "no defect class" fast path (a change that corrects no
9
+ * incorrect behavior) requires a one-line justification. The trace engine will
10
+ * not hand off to commit-pr until this receipt (or a real defect-class sweep)
11
+ * exists; the reader validates the same shape.
12
+ */
13
+ import { createSwarmTool } from './create-tool';
14
+ export declare function executeRecordRecurrenceSweep(args: unknown, directory: string, context?: {
15
+ sessionID?: string;
16
+ }): Promise<string>;
17
+ export declare const record_recurrence_sweep: ReturnType<typeof createSwarmTool>;
@@ -35,6 +35,14 @@ declare const StageACheckSchema: z.ZodObject<{
35
35
  feedback_item_id: z.ZodString;
36
36
  target: z.ZodString;
37
37
  expected_behavior: z.ZodString;
38
+ proof_kind: z.ZodEnum<{
39
+ conflict: "conflict";
40
+ metadata: "metadata";
41
+ defect: "defect";
42
+ "source-proof": "source-proof";
43
+ ci: "ci";
44
+ "user-decision": "user-decision";
45
+ }>;
38
46
  }, z.core.$strict>>>;
39
47
  working_directory: z.ZodOptional<z.ZodString>;
40
48
  obligation_id: z.ZodOptional<z.ZodString>;
@@ -164,6 +164,10 @@ export declare const TOOL_METADATA: {
164
164
  description: string;
165
165
  agents: "architect"[];
166
166
  };
167
+ record_implementation_review: {
168
+ description: string;
169
+ agents: "architect"[];
170
+ };
167
171
  record_issue_publication: {
168
172
  description: string;
169
173
  agents: "architect"[];
@@ -172,6 +176,14 @@ export declare const TOOL_METADATA: {
172
176
  description: string;
173
177
  agents: "architect"[];
174
178
  };
179
+ record_recurrence_sweep: {
180
+ description: string;
181
+ agents: "architect"[];
182
+ };
183
+ rebind_pr_feedback_head: {
184
+ description: string;
185
+ agents: "architect"[];
186
+ };
175
187
  run_pr_feedback_stage_a: {
176
188
  description: string;
177
189
  agents: "architect"[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.140.2",
3
+ "version": "7.140.4",
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",
@@ -81,6 +81,8 @@
81
81
  ".opencode/skills/parallel-work-check",
82
82
  ".opencode/skills/ci-fix-monitor",
83
83
  ".opencode/skills/issue-tracer",
84
+ ".opencode/skills/orchestrating-subagents",
85
+ ".opencode/skills/durable-session-state",
84
86
  "tests/fixtures/memory-recall",
85
87
  "README.md",
86
88
  "LICENSE"