opencode-swarm 7.146.1 → 7.146.3

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 (76) hide show
  1. package/dist/agents/council-prompts.d.ts +3 -3
  2. package/dist/cli/{config-doctor-sd7x5bts.js → config-doctor-yd866pd5.js} +2 -2
  3. package/dist/cli/{core-17febkvw.js → core-nc9a9g5m.js} +1 -1
  4. package/dist/cli/{curation-policy-x19e8bqc.js → curation-policy-9vv7v5rf.js} +6 -6
  5. package/dist/cli/{curator-vghf320v.js → curator-acp80hpc.js} +27 -27
  6. package/dist/cli/{curator-llm-factory-zxbgkjm5.js → curator-llm-factory-ewffa8r1.js} +27 -27
  7. package/dist/cli/{evidence-summary-service-xma4aagr.js → evidence-summary-service-8gw74j8g.js} +11 -11
  8. package/dist/cli/{gate-evidence-2bznvee8.js → gate-evidence-jj3zt2x1.js} +6 -6
  9. package/dist/cli/{guardrail-explain-ppzg0xz9.js → guardrail-explain-50cp8k3r.js} +28 -28
  10. package/dist/cli/{guardrail-log-xexwz93q.js → guardrail-log-jazq10gt.js} +3 -3
  11. package/dist/cli/{hive-promoter-j3vw2hj4.js → hive-promoter-qhrngsvb.js} +27 -27
  12. package/dist/cli/{index-4qvsh3m5.js → index-0a4s2803.js} +6 -6
  13. package/dist/cli/{index-qbpxrw95.js → index-1kq3x5q6.js} +2 -2
  14. package/dist/cli/{index-t7sfrv3v.js → index-262kyrk3.js} +4 -4
  15. package/dist/cli/{index-xz0ccakc.js → index-3377n9qp.js} +1 -1
  16. package/dist/cli/{index-g8qbjqqz.js → index-3gagma8p.js} +4 -4
  17. package/dist/cli/{index-5e5a1y2r.js → index-3p4wgm0d.js} +1 -1
  18. package/dist/cli/{index-e1hjd15c.js → index-463msy1e.js} +1 -1
  19. package/dist/cli/{index-twwb61bh.js → index-4zevsvaa.js} +3 -3
  20. package/dist/cli/{index-bghwrr59.js → index-6q35swn2.js} +1 -1
  21. package/dist/cli/{index-h8qed3pr.js → index-7ph5pz77.js} +17 -4
  22. package/dist/cli/{index-vacrzesw.js → index-923phxsp.js} +6 -6
  23. package/dist/cli/{index-k46kg4t6.js → index-a7cnyp5e.js} +7 -7
  24. package/dist/cli/{index-tzyvmkd1.js → index-bxk21f2w.js} +1 -1
  25. package/dist/cli/{index-97psh79d.js → index-bxs4wkjf.js} +1 -1
  26. package/dist/cli/{index-19f0zycs.js → index-bydybrke.js} +2 -2
  27. package/dist/cli/{index-cw96tpy6.js → index-cgcs823z.js} +4 -4
  28. package/dist/cli/{index-9qbr27bw.js → index-eybamsqg.js} +2 -2
  29. package/dist/cli/{index-1c9mfnj0.js → index-fypq68yn.js} +2 -2
  30. package/dist/cli/{index-n7trn9wz.js → index-gayh8tmh.js} +55 -1
  31. package/dist/cli/{index-va8a2zrq.js → index-gwt7ceh7.js} +2 -2
  32. package/dist/cli/{index-w0cj7zyd.js → index-j2ckvbx7.js} +1 -1
  33. package/dist/cli/{index-7x00nx8m.js → index-n96nt4gb.js} +1235 -589
  34. package/dist/cli/{index-zkaz3fhw.js → index-pc4423w8.js} +2 -2
  35. package/dist/cli/{index-fksfxhmx.js → index-pgsvn005.js} +5 -5
  36. package/dist/cli/{index-qyvjp0bq.js → index-q81s0m8k.js} +66 -37
  37. package/dist/cli/{index-w5r84rd1.js → index-qjgg9qzs.js} +1 -1
  38. package/dist/cli/{index-e3caa7ng.js → index-qqawmxe7.js} +29 -29
  39. package/dist/cli/{index-txh3h83v.js → index-v2eevdbj.js} +4 -4
  40. package/dist/cli/{index-ycgm9pzg.js → index-xz9w7sa9.js} +3 -2
  41. package/dist/cli/{index-bd4g9fvb.js → index-ypwwchs0.js} +1 -1
  42. package/dist/cli/{index-zwn2e2pe.js → index-yr1aabxa.js} +4 -4
  43. package/dist/cli/index.js +27 -27
  44. package/dist/cli/{knowledge-escalator-wj85ppdt.js → knowledge-escalator-7zpg79dx.js} +11 -11
  45. package/dist/cli/{knowledge-events-4y9kk2xe.js → knowledge-events-8abttcnt.js} +9 -9
  46. package/dist/cli/{knowledge-link-8pr02pza.js → knowledge-link-mgg482z6.js} +5 -5
  47. package/dist/cli/{knowledge-store-kc8dwc14.js → knowledge-store-a5mzf986.js} +6 -6
  48. package/dist/cli/{knowledge-validator-584ga9fb.js → knowledge-validator-fn2myc73.js} +8 -8
  49. package/dist/cli/{pending-delegations-kkrczqv7.js → pending-delegations-591vme3d.js} +3 -3
  50. package/dist/cli/{pr-subscriptions-2xn238xt.js → pr-subscriptions-js5v2xr6.js} +3 -3
  51. package/dist/cli/{runner-e7z9cf5y.js → runner-rcnpm510.js} +6 -6
  52. package/dist/cli/{scan-cursor-rhjym1pn.js → scan-cursor-4jv70zwb.js} +7 -7
  53. package/dist/cli/{schema-yb3pvhcs.js → schema-jhz9hme9.js} +1 -1
  54. package/dist/cli/{scope-persistence-bxwjk9rc.js → scope-persistence-ykswenxj.js} +7 -7
  55. package/dist/cli/{skill-generator-3w8w7htr.js → skill-generator-k5pxb3w2.js} +13 -13
  56. package/dist/cli/{telemetry-t109dhv7.js → telemetry-xzy0qeap.js} +1 -1
  57. package/dist/cli/{worktree-collision-ownership-2jtg2my1.js → worktree-collision-ownership-vt0jzmdt.js} +3 -3
  58. package/dist/cli/{worktree-isolation-av1rshr3.js → worktree-isolation-443q0pah.js} +27 -27
  59. package/dist/commands/close.d.ts +1 -0
  60. package/dist/commands/context-map-stats.d.ts +5 -0
  61. package/dist/config/schema.d.ts +16 -0
  62. package/dist/context-map/telemetry.d.ts +168 -26
  63. package/dist/council/council-evidence-writer.d.ts +2 -1
  64. package/dist/council/council-freshness.d.ts +49 -0
  65. package/dist/council/council-review-identity.d.ts +133 -0
  66. package/dist/council/council-round-state.d.ts +27 -3
  67. package/dist/council/disagreement-detector.d.ts +12 -2
  68. package/dist/council/general-council-types.d.ts +32 -0
  69. package/dist/council/types.d.ts +43 -7
  70. package/dist/hooks/knowledge-application-gate.d.ts +23 -0
  71. package/dist/index.js +166 -143
  72. package/dist/observability/catalog.d.ts +7 -5
  73. package/dist/telemetry.d.ts +22 -1
  74. package/dist/tools/phase-complete/gates/types.d.ts +7 -0
  75. package/dist/tools/write-final-council-evidence.d.ts +1 -7
  76. package/package.json +1 -1
@@ -8,6 +8,13 @@ export type CouncilVerdict = 'APPROVE' | 'CONCERNS' | 'REJECT';
8
8
  export type CouncilFindingSeverity = 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW';
9
9
  export type CouncilFindingCategory = 'logic' | 'edge_case' | 'error_handling' | 'spec_compliance' | 'security' | 'maintainability' | 'naming' | 'domain' | 'test_gap' | 'test_quality' | 'mutation_gap' | 'adversarial_gap' | 'slop_pattern' | 'hallucinated_api' | 'lazy_abstraction' | 'cargo_cult' | 'spec_drift' | 'other';
10
10
  export type CouncilAgent = 'critic' | 'reviewer' | 'sme' | 'test_engineer' | 'explorer';
11
+ /**
12
+ * The canonical five-member council role set (issue #2102 contract H).
13
+ * Writers, gates, and quorum checks must import this constant instead of
14
+ * re-declaring the list, so the role policy can never drift between the
15
+ * write path and the gate path.
16
+ */
17
+ export declare const COUNCIL_MEMBER_ROLES: readonly CouncilAgent[];
11
18
  export interface CouncilFinding {
12
19
  severity: CouncilFindingSeverity;
13
20
  category: CouncilFindingCategory;
@@ -145,12 +152,25 @@ export interface CouncilCriteria {
145
152
  /** ISO 8601 */
146
153
  declaredAt: string;
147
154
  }
155
+ /** Normalized final-council completion policy (issue #2102 contract C). */
156
+ export interface FinalCompletionPolicyConfig {
157
+ /** 'all_required' (default, strict legacy) or explicit 'quorum' weakening. */
158
+ mode: 'all_required' | 'quorum';
159
+ /** Required when mode is 'quorum'; bounded 3..5 distinct canonical members. */
160
+ minimumMembers?: number;
161
+ }
148
162
  /** Config shape — matched in schema.ts via CouncilConfigSchema. */
149
163
  export interface CouncilConfig {
150
164
  enabled: boolean;
151
165
  /** Default 3 */
152
166
  maxRounds: number;
153
- /** Default 30_000 */
167
+ /**
168
+ * @deprecated Inert — declared for parse compatibility only. No runtime
169
+ * consumer exists: council tools consume already-returned verdict
170
+ * submissions and there is no member-dispatch cancellation seam. Config
171
+ * doctor warns when this is explicitly set; the field will be removed in
172
+ * a future release. Dispatch timeouts are governed by the agent host.
173
+ */
154
174
  parallelTimeoutMs: number;
155
175
  /** Default true — any REJECT blocks */
156
176
  vetoPriority: boolean;
@@ -159,15 +179,31 @@ export interface CouncilConfig {
159
179
  /** Default 3 — minimum distinct council members required for quorum. requireAllMembers: true overrides this to 5. */
160
180
  minimumMembers: number;
161
181
  /**
162
- * Optional webhook URL or handler name for auto-escalation when maxRounds is
163
- * reached without APPROVE. Reserved for forward compatibility — NOT yet
164
- * implemented. Currently, maxRounds exhaustion surfaces a user-facing message
165
- * via `buildUnifiedFeedbackMd` in council-service.ts (see the "Escalate to
166
- * user" block), and the architect must relay it to the user. Future wiring
167
- * options: critic_oversight agent, HTTP webhook, or configurable handler.
182
+ * Optional webhook URL or handler name declared for escalation when
183
+ * maxRounds is reached without APPROVE. REMAINS INERT: no handler,
184
+ * webhook, or outbound execution exists or is invoked. Config doctor
185
+ * visibly warns when it is explicitly set (issue #1650), and max-rounds
186
+ * exhaustion emits a durable structured event plus a user escalation
187
+ * message. Wiring real escalation requires a separate security review.
168
188
  */
169
189
  escalateOnMaxRounds?: string;
170
190
  /** Default true — CONCERNS verdict with only MEDIUM/LOW findings does NOT block completion (advisory). Set false to make all CONCERNS block like REJECT. Note: HIGH/CRITICAL findings from CONCERNS members are always promoted to requiredFixes and block at the tool level regardless of this setting. */
171
191
  phaseConcernsAllowComplete: boolean;
192
+ /**
193
+ * Final-council completion policy. Missing/default `all_required`
194
+ * preserves the exact legacy requirement (all five canonical roles,
195
+ * five distinct members, zero absentees). `quorum` is an explicit,
196
+ * bounded weakening: it requires `minimumMembers` between 3 and 5, and
197
+ * only distinct members of the canonical five-role set count. The
198
+ * normalized policy is part of the council policy digest, so any change
199
+ * invalidates previously accepted final-council evidence.
200
+ */
201
+ finalCompletionPolicy: FinalCompletionPolicyConfig;
202
+ /**
203
+ * Default 24 — maximum age (hours) of phase-council, architecture-
204
+ * supervisor, and final-council evidence. Bounded 1..720. Part of the
205
+ * council policy digest, so changing it invalidates prior evidence.
206
+ */
207
+ freshnessMaxAgeHours: number;
172
208
  }
173
209
  export declare const COUNCIL_DEFAULTS: CouncilConfig;
@@ -45,6 +45,27 @@ export interface GateInput {
45
45
  }
46
46
  declare function selectCurrentArchitectDirectiveMemberships(memberships: ReceiptMembership[]): ReceiptMembership[];
47
47
  declare function selectStaleUnmarkedMemberships(memberships: ReceiptMembership[], now: number, stalenessMs: number): ReceiptMembership[];
48
+ /**
49
+ * Best-effort lookup of directive lesson text by knowledge entry id, for
50
+ * surfacing the acknowledged content inside a gate denial (issue #2299).
51
+ *
52
+ * Reads the project-local swarm store always (cached by `readKnowledge` and
53
+ * bounded in size by the store's own knowledge cap) and the cross-project hive
54
+ * store only when the hive file exists. A hive entry can only be an
55
+ * unacknowledged architect-directive membership if it was displayed, which
56
+ * requires hive to have been enabled at display time, so reading it back here
57
+ * is not a fresh disclosure. Fail-open: any read error simply omits the
58
+ * content echo and never alters the denial outcome.
59
+ */
60
+ export declare function loadDirectiveContents(directory: string, entryIds: string[]): Promise<Map<string, string>>;
61
+ /**
62
+ * Build the KNOWLEDGE_ENFORCE_GATE_DENY message (issue #2299). Renders
63
+ * unacknowledged memberships in the single canonical colon pair form
64
+ * `<trace_id>:<entry_id>`, lists every valid verb with its token grammar,
65
+ * and emits one fully-instantiated, copy-pasteable `KNOWLEDGE_N_A` example per
66
+ * membership plus the directive content being acknowledged.
67
+ */
68
+ export declare function buildGateDenialMessage(toolName: string, memberships: ReceiptMembership[], contents: Map<string, string>): string;
48
69
  /**
49
70
  * Pre-tool gate. Throws when the architect attempts a high-risk action with
50
71
  * an unacknowledged critical directive in `enforce` mode. Always returns in
@@ -69,5 +90,7 @@ export declare const _internals: {
69
90
  writeWarnEvent: typeof writeWarnEvent;
70
91
  selectCurrentArchitectDirectiveMemberships: typeof selectCurrentArchitectDirectiveMemberships;
71
92
  selectStaleUnmarkedMemberships: typeof selectStaleUnmarkedMemberships;
93
+ loadDirectiveContents: typeof loadDirectiveContents;
94
+ buildGateDenialMessage: typeof buildGateDenialMessage;
72
95
  };
73
96
  export {};