opencode-swarm 7.148.4 → 7.149.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 (74) hide show
  1. package/dist/cli/{config-doctor-ycf9ws4p.js → config-doctor-fx8d6pma.js} +3 -3
  2. package/dist/cli/{core-a1bhs3xa.js → core-0v762txd.js} +3 -3
  3. package/dist/cli/{curation-policy-fbvctttr.js → curation-policy-4jxx3ey4.js} +6 -6
  4. package/dist/cli/{curator-8y57gq1g.js → curator-6w4frzdz.js} +32 -31
  5. package/dist/cli/{curator-llm-factory-rj4vw5fd.js → curator-llm-factory-8fstpeqh.js} +32 -31
  6. package/dist/cli/{evidence-summary-service-wkp0gfpd.js → evidence-summary-service-x00z38n2.js} +15 -14
  7. package/dist/cli/{gate-evidence-qty15skw.js → gate-evidence-ejdek2td.js} +9 -9
  8. package/dist/cli/{guardrail-explain-2n3ahs0m.js → guardrail-explain-nynjhbzk.js} +33 -32
  9. package/dist/cli/{guardrail-log-bmxrb3r2.js → guardrail-log-6bktj08e.js} +6 -4
  10. package/dist/cli/{guardrail-reset-be3sx0am.js → guardrail-reset-hsfd5ykq.js} +32 -31
  11. package/dist/cli/{hive-promoter-te5d78yt.js → hive-promoter-32artf8c.js} +32 -31
  12. package/dist/cli/{index-sxtz2d26.js → index-01q7mb83.js} +6 -6
  13. package/dist/cli/{index-yq89bgnz.js → index-41n0thtd.js} +2 -1
  14. package/dist/cli/{index-bccfz7br.js → index-42habrdv.js} +4 -4
  15. package/dist/cli/{index-622phhp5.js → index-5q5ws00e.js} +11 -11
  16. package/dist/cli/{index-9m8jy3av.js → index-6thxr1q7.js} +3 -3
  17. package/dist/cli/{index-6kw1a3bk.js → index-79pwr8hc.js} +9 -12
  18. package/dist/cli/{index-gswx08pr.js → index-8hkxm9mh.js} +4 -4
  19. package/dist/cli/{index-qpewzk0q.js → index-8yan955h.js} +2 -2
  20. package/dist/cli/{index-vrp2zva8.js → index-a90c1gtn.js} +1 -1
  21. package/dist/cli/{index-kg4knw6r.js → index-ame8ek9g.js} +7 -6
  22. package/dist/cli/{index-hj1xd3pg.js → index-bcfcekx9.js} +1314 -371
  23. package/dist/cli/{index-nq4tkfpc.js → index-bmaz2yy4.js} +1 -1
  24. package/dist/cli/{index-k1s8gxjh.js → index-c1h0rdkr.js} +1 -1
  25. package/dist/cli/index-c83bztkp.js +881 -0
  26. package/dist/cli/{index-1vbmra32.js → index-ccyve4pb.js} +1 -1
  27. package/dist/cli/{index-vhefvcta.js → index-cfvbd3dg.js} +2 -2
  28. package/dist/cli/{index-ye7kpzrk.js → index-ef0wracg.js} +5 -5
  29. package/dist/cli/{index-9qzkcmry.js → index-hbhw2qd7.js} +3 -3
  30. package/dist/cli/{index-rzzwem6x.js → index-ka2vav7t.js} +34 -33
  31. package/dist/cli/{index-b1c83zf9.js → index-kb1p6dpx.js} +18 -17
  32. package/dist/cli/{index-8kzrgjt6.js → index-mza55jmc.js} +4 -4
  33. package/dist/cli/{index-t25evmna.js → index-n6jykega.js} +1 -1
  34. package/dist/cli/{index-skgeytf6.js → index-pgfn8h50.js} +10 -10
  35. package/dist/cli/{index-7rerkeg8.js → index-q8e2yd98.js} +1 -1
  36. package/dist/cli/{index-w00hn0dd.js → index-s7t2c9jd.js} +2 -2
  37. package/dist/cli/{index-j382eh60.js → index-vfv4vnnc.js} +1 -1
  38. package/dist/cli/{index-qwmrt51t.js → index-wbz365gn.js} +1 -1
  39. package/dist/cli/{index-ghbkknjz.js → index-wj0gnab0.js} +72 -41
  40. package/dist/cli/{index-b94487xm.js → index-wsar7d91.js} +1 -1
  41. package/dist/cli/{index-0045n7qe.js → index-xdp0bx28.js} +2 -2
  42. package/dist/cli/{index-8djgxw2w.js → index-z6471b7r.js} +2 -2
  43. package/dist/cli/{index-qbvq3xt2.js → index-zkcwan96.js} +1 -1
  44. package/dist/cli/index.js +32 -31
  45. package/dist/cli/{knowledge-escalator-9w53tx55.js → knowledge-escalator-ty2kesdj.js} +14 -14
  46. package/dist/cli/{knowledge-events-my31zepa.js → knowledge-events-x3rd7r3j.js} +12 -12
  47. package/dist/cli/{knowledge-link-spw879rs.js → knowledge-link-a5f89833.js} +5 -5
  48. package/dist/cli/{knowledge-store-yf59mxp5.js → knowledge-store-zsz4dxjq.js} +6 -6
  49. package/dist/cli/{knowledge-validator-8n569fp4.js → knowledge-validator-bdhgkw9f.js} +8 -8
  50. package/dist/cli/{pending-delegations-f4wvyzbf.js → pending-delegations-aez8ebdr.js} +3 -3
  51. package/dist/cli/{pr-subscriptions-f4xw1rxy.js → pr-subscriptions-cpnwvc6y.js} +3 -3
  52. package/dist/cli/{runner-rk26nk58.js → runner-9mnkfjw7.js} +6 -6
  53. package/dist/cli/{scan-cursor-www6dbn8.js → scan-cursor-3ba1spad.js} +7 -7
  54. package/dist/cli/{schema-vyg0k7rh.js → schema-h251vmd1.js} +1 -1
  55. package/dist/cli/{scope-persistence-3qbr019s.js → scope-persistence-h1b31ba2.js} +8 -10
  56. package/dist/cli/{skill-generator-fh8emssb.js → skill-generator-esrn40th.js} +16 -16
  57. package/dist/cli/{telemetry-1pnsftp0.js → telemetry-jtq6px7k.js} +1 -1
  58. package/dist/cli/{workspace-snapshot-nq25j94x.js → workspace-snapshot-8269e1p9.js} +2 -2
  59. package/dist/cli/{worktree-collision-ownership-wqy7mgb3.js → worktree-collision-ownership-r8j31h06.js} +8 -8
  60. package/dist/cli/{worktree-isolation-sbsdx1yj.js → worktree-isolation-pbr4d5m9.js} +32 -31
  61. package/dist/commands/close.d.ts +1 -0
  62. package/dist/events/core-events.d.ts +250 -0
  63. package/dist/full-auto/oversight.d.ts +5 -3
  64. package/dist/hooks/full-auto-delegation.d.ts +24 -0
  65. package/dist/hooks/full-auto-input-probe.d.ts +11 -0
  66. package/dist/hooks/steering-consumed.d.ts +12 -4
  67. package/dist/index.js +588 -603
  68. package/dist/observability/catalog.d.ts +9 -7
  69. package/dist/sast/rules/javascript-call-classifier.d.ts +4 -0
  70. package/dist/services/spec-drift-recovery.d.ts +9 -2
  71. package/dist/telemetry.d.ts +24 -1
  72. package/package.json +2 -1
  73. package/dist/cli/{curator-drift-fv4rttf4.js → curator-drift-2h1d2fnq.js} +1 -1
  74. package/dist/cli/{index-g8wwj0sz.js → index-vnn7qq8c.js} +3 -3
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * The event catalog (issue #2029).
3
3
  *
4
- * Exactly 47 entries, matching the `TelemetryEvent` union at
5
- * `src/telemetry.ts:15-109`. Thirty-eight predate the #2029 contract; the 39th is
4
+ * Exactly 48 entries, matching the `TelemetryEvent` union at
5
+ * `src/telemetry.ts:15-125`. 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), the 40th is `close_archive_result` (issue #2030 — the
8
8
  * structured close/archive result event), the 41st is the bounded diagnostic
@@ -12,11 +12,13 @@
12
12
  * mutation audit, the 44th is the bounded `residue_health` atomic-write
13
13
  * residue audit (issue #2035), the 46th is the bounded
14
14
  * `context_telemetry_health` storage audit for the issue-#2037
15
- * `.swarm/context-telemetry.jsonl` store, and the 47th is the counts-only
15
+ * `.swarm/context-telemetry.jsonl` store, the 47th is the counts-only
16
16
  * `skill_usage_health` storage audit for the issue-#2038
17
- * `.swarm/skill-usage.jsonl` store and its authoritative pending sidecar. These late additions are instances of
18
- * the defect class this contract exists to close: an event kind entering the
19
- * stream with no registration.
17
+ * `.swarm/skill-usage.jsonl` store and its authoritative pending sidecar,
18
+ * and the 48th is the bounded `core_events_health` storage audit for the
19
+ * issue-#2039 `.swarm/events.jsonl` store. These late additions are instances
20
+ * of the defect class this contract exists to close: an event kind entering
21
+ * the stream with no registration.
20
22
  *
21
23
  * Every entry names a real producer `file:line`, a retention owner issue at or
22
24
  * above #2030 — every entry today cites the #2030-#2051 programme, but only the
@@ -69,7 +71,7 @@ export interface CatalogEntry {
69
71
  /**
70
72
  * Whether an event of this kind must carry `trace.parentSpanId`.
71
73
  *
72
- * `false` for all 47 entries today, and that is a truthful statement about
74
+ * `false` for all 48 entries today, and that is a truthful statement about
73
75
  * the current system rather than a placeholder: no producer supplies a
74
76
  * parent span, so `createObservation` never sets one. Setting this to `true`
75
77
  * for a kind whose producer cannot supply a parent would make every
@@ -0,0 +1,4 @@
1
+ import type { SastContext, SastMatch } from './index';
2
+ export type JavascriptCallFamily = 'eval' | 'function-constructor' | 'exec' | 'timer-string' | 'document-write' | 'postmessage';
3
+ export type JavascriptCallDisposition = 'confirmed' | 'safe' | 'ambiguous' | 'none';
4
+ export declare function classifyJavascriptCall(match: SastMatch, context: SastContext, family: JavascriptCallFamily): JavascriptCallDisposition;
@@ -73,8 +73,15 @@ declare function verifySnapshot(snapshotPath: string, currentSpec: {
73
73
  content: string;
74
74
  } | null): Promise<void>;
75
75
  declare function ensureSnapshotEvent(directory: string, plan: NonNullable<Awaited<ReturnType<typeof loadPlanJsonOnly>>>, transitionId: string): Promise<void>;
76
- declare function appendEvent(eventsPath: string, event: SpecDriftAcknowledgedEvent | SpecDriftRepairedEvent): Promise<void>;
77
- declare function verifyEventPresence(eventsPath: string, eventType: 'spec_drift_acknowledged' | 'spec_drift_repaired', transitionId: string): Promise<boolean>;
76
+ /**
77
+ * Issue #2039: audit events append through the core event seam with the
78
+ * authority-key dedupe restoring the old pre-check (lock-scoped, at-most-once),
79
+ * and presence verification reads the authoritative index — never the whole
80
+ * file. Fail-closed semantics are preserved: a corrupt authority index throws
81
+ * (previously a malformed events.jsonl line threw).
82
+ */
83
+ declare function appendEvent(directory: string, event: SpecDriftAcknowledgedEvent | SpecDriftRepairedEvent): Promise<void>;
84
+ declare function verifyEventPresence(directory: string, eventType: 'spec_drift_acknowledged' | 'spec_drift_repaired', transitionId: string): Promise<boolean>;
78
85
  export declare function reconcileSpecDrift(directory: string, options: {
79
86
  mode: RecoveryMode;
80
87
  actor: RecoveryActor;
@@ -32,7 +32,7 @@ export type TelemetryEvent = 'session_started' | 'session_ended' | 'agent_activa
32
32
  * `prm_hard_stop` TRIGGER emitted by `src/prm/escalation.ts`. A trigger with
33
33
  * no matching delivery means the containment never reached the agent.
34
34
  */
35
- | 'prm_hard_stop_delivered' | 'agent_conflict_detected' | 'close_archive_result' | 'knowledge_receipt_transition' | 'knowledge_maintenance' | 'residue_health' | 'context_telemetry_health' | 'skill_usage_health';
35
+ | 'prm_hard_stop_delivered' | 'agent_conflict_detected' | 'close_archive_result' | 'knowledge_receipt_transition' | 'knowledge_maintenance' | 'residue_health' | 'context_telemetry_health' | 'skill_usage_health' | 'core_events_health';
36
36
  /** Stable classification for how a reviewer-gate decision was established. */
37
37
  export type ReviewerGateEvidenceKind = 'genuine' | 'fallback' | 'data_quality' | 'block';
38
38
  /**
@@ -291,6 +291,29 @@ export declare const telemetry: {
291
291
  newest_timestamp: string | null;
292
292
  coverage: boolean;
293
293
  }): void;
294
+ /**
295
+ * Core event store health (issue #2039): emitted on compaction and close
296
+ * for the bounded `.swarm/events.jsonl` store. Counts ONLY — no event
297
+ * content and no filesystem paths, matching the observability contract's
298
+ * no-content-in-metrics rule. `authority_index_count` /
299
+ * `authority_evicted_count` disclose the authoritative partition's size
300
+ * and FIFO-eviction total (eviction is the only reachable
301
+ * absent-after-compaction case for authority lookups).
302
+ */
303
+ coreEventsHealth(data: {
304
+ trigger: "compaction" | "close";
305
+ accepted_count: number;
306
+ compacted_count: number;
307
+ retained_count: number;
308
+ dropped_count: number;
309
+ corrupt_count: number;
310
+ authority_index_count: number;
311
+ authority_evicted_count: number;
312
+ oldest_timestamp: string | null;
313
+ newest_timestamp: string | null;
314
+ bytes: number;
315
+ limit_bytes: number;
316
+ }): void;
294
317
  /**
295
318
  * Issue #2063 C2 — the PRM hard-stop DENIAL was actually delivered to the
296
319
  * agent (thrown by the guardrails `toolBefore` consumer). `prm_hard_stop`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.148.4",
3
+ "version": "7.149.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",
@@ -109,6 +109,7 @@
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
111
  "check:retention": "bun run scripts/check-retention-registry.ts",
112
+ "check:core-events": "bun run scripts/check-core-events-usage.ts",
112
113
  "check:test-file-cap": "bun run scripts/check-test-file-cap.ts",
113
114
  "check:pending-fragment": "bun run scripts/check-pending-fragment.ts",
114
115
  "check:gate-portability": "bun run scripts/check-gate-portability.ts",
@@ -6,13 +6,13 @@ import {
6
6
  readEffectiveSpecSync
7
7
  } from "./index-9ss2m4rs.js";
8
8
  import"./index-n832052r.js";
9
- import"./index-4rhhvd1a.js";
10
9
  import {
11
10
  readSwarmFileAsync,
12
11
  validateSwarmPath
13
12
  } from "./index-4cgee5vh.js";
14
13
  import"./index-z6xqpmqg.js";
15
14
  import"./index-r3mvsbtq.js";
15
+ import"./index-4rhhvd1a.js";
16
16
  import"./index-zjygnfay.js";
17
17
  import"./index-bpmtbmy9.js";
18
18
  import {
@@ -1,11 +1,11 @@
1
1
  // @bun
2
+ import {
3
+ bunSpawn
4
+ } from "./index-r3mvsbtq.js";
2
5
  import {
3
6
  init_git_executable,
4
7
  resolveGitExecutable
5
8
  } from "./index-9e6fdz2h.js";
6
- import {
7
- bunSpawn
8
- } from "./index-r3mvsbtq.js";
9
9
 
10
10
  // src/background/workspace-snapshot.ts
11
11
  import * as child_process from "child_process";