opencode-swarm 7.121.3 → 7.122.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 (39) hide show
  1. package/dist/cli/{curation-policy-10wnhpwn.js → curation-policy-cj1tpzr5.js} +2 -2
  2. package/dist/cli/{curator-ed91r7rw.js → curator-3rze3pd4.js} +8 -8
  3. package/dist/cli/{curator-llm-factory-q9veqj3h.js → curator-llm-factory-8rg0f77t.js} +8 -8
  4. package/dist/cli/{guardrail-explain-0vcaa7hj.js → guardrail-explain-hdsxa2c5.js} +9 -9
  5. package/dist/cli/{hive-promoter-dg6fk563.js → hive-promoter-dh38qd9m.js} +8 -8
  6. package/dist/cli/{index-5a3xsnzg.js → index-3r1w7xky.js} +1 -1
  7. package/dist/cli/{index-35xyj7gn.js → index-3sx27bxt.js} +26 -3
  8. package/dist/cli/{index-qad0m9bz.js → index-68aggz0v.js} +1 -1
  9. package/dist/cli/{index-fs2q8jyf.js → index-ahxrne50.js} +709 -550
  10. package/dist/cli/{index-x4fwtd59.js → index-gr7ssnj9.js} +3 -3
  11. package/dist/cli/{index-db82jxt7.js → index-j33zb3cx.js} +2 -2
  12. package/dist/cli/{index-g9eg7z93.js → index-jzpv74mq.js} +9 -9
  13. package/dist/cli/{index-0f800qg7.js → index-ny13nr0x.js} +2 -2
  14. package/dist/cli/{index-j8349ac0.js → index-rkd6qwjh.js} +1 -1
  15. package/dist/cli/{index-ft6jw816.js → index-xdsj4qtd.js} +3 -3
  16. package/dist/cli/index.js +8 -8
  17. package/dist/cli/{knowledge-escalator-8ajq1fhb.js → knowledge-escalator-sya06p12.js} +3 -3
  18. package/dist/cli/{knowledge-events-2sjy3aa7.js → knowledge-events-xzps61a9.js} +3 -1
  19. package/dist/cli/{knowledge-store-27cesthc.js → knowledge-store-qg66a93n.js} +1 -1
  20. package/dist/cli/{knowledge-validator-9keh3p8j.js → knowledge-validator-gar6wv4f.js} +4 -4
  21. package/dist/cli/{scan-cursor-qmsmmg1b.js → scan-cursor-nx5y5k7r.js} +2 -2
  22. package/dist/cli/{skill-generator-hkyxdc3j.js → skill-generator-nt5qxafq.js} +5 -5
  23. package/dist/db/index.d.ts +4 -0
  24. package/dist/db/sqlite-loader.d.ts +78 -0
  25. package/dist/hooks/cohort-cache.d.ts +44 -0
  26. package/dist/hooks/hive-promoter.d.ts +4 -3
  27. package/dist/hooks/host-boundary.d.ts +147 -0
  28. package/dist/hooks/incremental-verify.d.ts +3 -0
  29. package/dist/hooks/knowledge-events.d.ts +25 -2
  30. package/dist/hooks/knowledge-injector.d.ts +9 -1
  31. package/dist/hooks/knowledge-receipt-validator.d.ts +98 -0
  32. package/dist/hooks/micro-reflector.d.ts +3 -0
  33. package/dist/hooks/pr-auto-subscribe.d.ts +3 -0
  34. package/dist/hooks/promotion-evidence-store.d.ts +33 -0
  35. package/dist/index.js +362 -355
  36. package/dist/services/knowledge-diagnostics.d.ts +12 -0
  37. package/dist/session/snapshot-writer.d.ts +5 -0
  38. package/dist/state.d.ts +11 -0
  39. package/package.json +3 -2
@@ -45,6 +45,18 @@ export interface KnowledgeDebugMeta {
45
45
  escalated_directives: number;
46
46
  /** Knowledge-event volume bucketed by type (applied/ignored/violated/...). */
47
47
  events_by_type: Record<string, number>;
48
+ /**
49
+ * (#1849) Shown vs explicitly-applied accountability (never conflated) +
50
+ * empty-trace terminals, so the retrieval loop's accounting is visible.
51
+ */
52
+ shown_vs_applied: {
53
+ shown: number;
54
+ applied_explicit: number;
55
+ ignored: number;
56
+ contradicted: number;
57
+ violated: number;
58
+ no_relevant: number;
59
+ };
48
60
  };
49
61
  /**
50
62
  * Cohort/link health (issue #1846). Makes the linked store and its health
@@ -71,6 +71,11 @@ export interface SerializedAgentSession {
71
71
  autoProceedOverride?: boolean;
72
72
  /** Flag tracking whether the auto-proceed nudge has been shown (Phase 1) */
73
73
  autoProceedNudgeDone?: boolean;
74
+ /**
75
+ * Cached canonical cohort id (issue #1849). Omitted on disk when undefined
76
+ * so older snapshots deserialize cleanly; the reader defaults to undefined.
77
+ */
78
+ cachedCohortId?: string;
74
79
  }
75
80
  /**
76
81
  * Minimal interface for serialized InvocationWindow
package/dist/state.d.ts CHANGED
@@ -253,6 +253,17 @@ export interface AgentSessionState {
253
253
  prmEscalationTracker?: EscalationTracker;
254
254
  /** Active PR subscriptions for the background poller, keyed by `${repoFullName}::${prNumber}` */
255
255
  prSubscriptions: Map<string, PrSubscriptionState>;
256
+ /**
257
+ * Cached canonical cohort id for this session's directory (issue #1849).
258
+ * Resolved once at `chat.message` (where sessionID + agent are reliably
259
+ * present) and reused by the system-enhancer's cohort-identity line and the
260
+ * PromotionEvidenceRecord writer — so neither re-runs `resolveCohortId`
261
+ * (which spawns git) on a per-turn / per-receipt hot path. Persisted through
262
+ * snapshots so restored sessions keep the value. `undefined` when not yet
263
+ * resolved (pre-existing sessions, restored old snapshots, or resolution
264
+ * failed); callers must handle the miss with a bounded fallback.
265
+ */
266
+ cachedCohortId?: string;
256
267
  }
257
268
  /**
258
269
  * Represents a single agent invocation window with isolated guardrail budgets.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.121.3",
3
+ "version": "7.122.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",
@@ -100,7 +100,8 @@
100
100
  "package:smoke": "node scripts/package-smoke.mjs",
101
101
  "prepare": "bun run build",
102
102
  "repro:704": "node scripts/repro-704.mjs",
103
- "repro:1144": "bun scripts/repro-1144.mjs"
103
+ "repro:1144": "bun scripts/repro-1144.mjs",
104
+ "repro:1873": "bun build scripts/repro-1873-entry.ts --outdir dist-build-test/repro-1873 --target node --format esm && node scripts/repro-1873.mjs"
104
105
  },
105
106
  "dependencies": {
106
107
  "@opencode-ai/plugin": "^1.1.53",