opencode-swarm 7.181.1 → 7.181.2

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 (73) hide show
  1. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  2. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  3. package/dist/background/stage-b-gates.d.ts +4 -0
  4. package/dist/cli/{coder-settlement-ee8bmg83.js → coder-settlement-993vdsd2.js} +4 -4
  5. package/dist/cli/{config-doctor-mnmxzg86.js → config-doctor-nr27vfv6.js} +3 -3
  6. package/dist/cli/{core-m9yymv84.js → core-t3tg4397.js} +2 -2
  7. package/dist/cli/{curator-drift-q42fr0c9.js → curator-drift-hz3j3fad.js} +7 -7
  8. package/dist/cli/{curator-7nmwpcxy.js → curator-gk392717.js} +27 -27
  9. package/dist/cli/{curator-llm-factory-s1b2p162.js → curator-llm-factory-n01we8pa.js} +27 -27
  10. package/dist/cli/{evidence-summary-service-m2b0mxmr.js → evidence-summary-service-fkvj8ct1.js} +11 -11
  11. package/dist/cli/{gate-evidence-4y2x85g4.js → gate-evidence-1n6zffzb.js} +3 -3
  12. package/dist/cli/{guardrail-explain-nvmf3y7j.js → guardrail-explain-81jvm99e.js} +28 -28
  13. package/dist/cli/{guardrail-log-202rfw7b.js → guardrail-log-mw9x5j8g.js} +4 -4
  14. package/dist/cli/{guardrail-reset-7nt7z18b.js → guardrail-reset-6thsn6ad.js} +27 -27
  15. package/dist/cli/{hive-promoter-segsykns.js → hive-promoter-pym6se37.js} +27 -27
  16. package/dist/cli/{index-ztph1v9m.js → index-0h39trak.js} +1 -1
  17. package/dist/cli/{index-9j5jjqks.js → index-1wpnt86a.js} +3 -3
  18. package/dist/cli/{index-a7z6jygf.js → index-2sqfrvxj.js} +2 -2
  19. package/dist/cli/{index-y4zjbrqs.js → index-2t21pv2v.js} +1 -1
  20. package/dist/cli/{index-g9ax7jyf.js → index-5hxv1er2.js} +2 -2
  21. package/dist/cli/{index-jqjdejqe.js → index-5q3xsqwm.js} +2 -2
  22. package/dist/cli/{index-g5wjasjn.js → index-5v8zws0s.js} +3 -3
  23. package/dist/cli/{index-r6p6x0pb.js → index-5zy5k5w0.js} +1 -1
  24. package/dist/cli/{index-na3br902.js → index-6x36hhd3.js} +27 -27
  25. package/dist/cli/{index-hxe22tx3.js → index-7nr9p5bd.js} +5 -5
  26. package/dist/cli/{index-cyyvc1cd.js → index-cr61qv27.js} +1 -1
  27. package/dist/cli/{index-pee6ykkg.js → index-dpxg347z.js} +3 -3
  28. package/dist/cli/{index-kjstkfgh.js → index-ehvkz2zv.js} +3 -3
  29. package/dist/cli/{index-3qhx9dx0.js → index-ernt0wrg.js} +1228 -998
  30. package/dist/cli/{index-b2zbak7v.js → index-et28q7cp.js} +2 -2
  31. package/dist/cli/{index-nhxykfyy.js → index-et7tg13p.js} +1 -1
  32. package/dist/cli/{index-4h54k8h3.js → index-fmhd3zc8.js} +2 -2
  33. package/dist/cli/{index-rxs0rrv1.js → index-gmqf6bjj.js} +29 -29
  34. package/dist/cli/{index-rw0wy2y7.js → index-hbe56wtn.js} +3 -3
  35. package/dist/cli/{index-908yea8v.js → index-kzmd4gs7.js} +1 -1
  36. package/dist/cli/{index-tczqm089.js → index-m779twtf.js} +1 -1
  37. package/dist/cli/{index-basp4sxt.js → index-n5a9dq5s.js} +1 -1
  38. package/dist/cli/{index-edb3sgxg.js → index-pqtmzee6.js} +4 -4
  39. package/dist/cli/{index-yhx94xpr.js → index-qw9aqays.js} +4 -4
  40. package/dist/cli/{index-y30y1rkg.js → index-t93cp2tz.js} +2 -2
  41. package/dist/cli/{index-q1prchye.js → index-txx2mrsk.js} +7 -7
  42. package/dist/cli/{index-91dhg3wr.js → index-ved1325w.js} +2 -2
  43. package/dist/cli/{index-vs83acgx.js → index-vmwmwahh.js} +3 -3
  44. package/dist/cli/{index-bv4b8tpa.js → index-vvgpgcyn.js} +10 -0
  45. package/dist/cli/{index-vmthakz0.js → index-w1ydvzef.js} +1 -1
  46. package/dist/cli/{index-gqe4sm73.js → index-wph45kyb.js} +1 -1
  47. package/dist/cli/{index-gydvqmtg.js → index-xz4q5vcg.js} +4 -4
  48. package/dist/cli/index.js +28 -28
  49. package/dist/cli/{knowledge-escalator-r9chkas8.js → knowledge-escalator-jmqbmfbf.js} +7 -7
  50. package/dist/cli/{knowledge-events-5j2n6age.js → knowledge-events-5ksqpf4g.js} +5 -5
  51. package/dist/cli/{knowledge-store-mybx9bmx.js → knowledge-store-q3yy56sc.js} +1 -1
  52. package/dist/cli/{knowledge-validator-v1sj9tv4.js → knowledge-validator-r5kaz53f.js} +2 -2
  53. package/dist/cli/{mcp-7yx5230p.js → mcp-h82hxnxr.js} +1 -1
  54. package/dist/cli/{model-preflight-ckvv1arg.js → model-preflight-5b81adsj.js} +1 -1
  55. package/dist/cli/{pending-delegations-amjfmc7t.js → pending-delegations-e4h6vjeb.js} +5 -5
  56. package/dist/cli/{pr-subscriptions-rctqs0gk.js → pr-subscriptions-j7hw3k6x.js} +5 -5
  57. package/dist/cli/{pr-workflow-gate-9he8ys4e.js → pr-workflow-gate-js8dcry2.js} +27 -27
  58. package/dist/cli/{scan-cursor-pxqkphrh.js → scan-cursor-yhf58mq2.js} +2 -2
  59. package/dist/cli/{schema-n8pk3f80.js → schema-0k4st1qt.js} +2 -2
  60. package/dist/cli/{scope-persistence-p992x2yd.js → scope-persistence-bpptmh1e.js} +9 -9
  61. package/dist/cli/{server-ywrd2q6z.js → server-axnran6h.js} +27 -27
  62. package/dist/cli/{skill-generator-cdppktqx.js → skill-generator-n2w032d1.js} +8 -8
  63. package/dist/cli/{snapshot-coordination-init-z42ev5g9.js → snapshot-coordination-init-kyf50x12.js} +27 -27
  64. package/dist/cli/{speckit-checkoff-6ynv46bn.js → speckit-checkoff-m4184e1x.js} +4 -4
  65. package/dist/cli/{worktree-collision-ownership-65971p3m.js → worktree-collision-ownership-1g2414pf.js} +5 -5
  66. package/dist/cli/{worktree-isolation-xf7dfc46.js → worktree-isolation-x07f7cfp.js} +27 -27
  67. package/dist/db/qa-gate-profile.d.ts +6 -3
  68. package/dist/db/qa-gate-session-override.d.ts +72 -0
  69. package/dist/index.js +306 -299
  70. package/dist/session/restart-reconciliation.d.ts +74 -0
  71. package/dist/state.d.ts +6 -3
  72. package/dist/tools/get-qa-gate-profile.d.ts +13 -6
  73. package/package.json +1 -1
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Service layer for the `qa_gate_session_override` table in the per-project
3
+ * database (issue #2668).
4
+ *
5
+ * A session's ratchet-tighter QA gate overrides (`/swarm qa-gates override`)
6
+ * are durable runtime policy: they must survive a host restart, unlike the
7
+ * ephemeral execution authority (leases, child handles, in-flight timers) that
8
+ * expires at the rehydrate boundary. The in-memory
9
+ * `AgentSessionState.qaGateSessionOverrides` remains the live cache the
10
+ * enforcement sites read; this table is the restart authority, restored by
11
+ * `rehydrateState` and kept in lockstep (created by the durable-first write in
12
+ * the `/swarm qa-gates override` command, deleted at session end/stale
13
+ * eviction).
14
+ *
15
+ * Semantics mirror the spec-level profile ratchet: only `true` wins. A session
16
+ * with no `true` gates has NO row — an empty merge deletes it.
17
+ */
18
+ import { type QaGates } from './qa-gate-profile.js';
19
+ /**
20
+ * Test-only dependency-injection seam — see `gitignore-warning.ts:_internals`
21
+ * for the rationale (`mock.module` from `bun:test` leaks across files in
22
+ * Bun's shared test-runner process). Mutating this local object is
23
+ * file-scoped and trivially restorable via `afterEach`.
24
+ */
25
+ export declare const _internals: {
26
+ getOverrideForSession: typeof getOverrideForSession;
27
+ setOverrideForSession: typeof setOverrideForSession;
28
+ clearOverrideForSession: typeof clearOverrideForSession;
29
+ clearAllSessionOverrides: typeof clearAllSessionOverrides;
30
+ };
31
+ /**
32
+ * Read the durable ratchet-tighter overrides for a session.
33
+ *
34
+ * Read-only: if `.swarm/swarm.db` does not exist yet, returns `{}`
35
+ * without creating the DB file. A malformed row fails closed to `{}`
36
+ * (with a debug-gated warn naming the session) — corruption must not
37
+ * break rehydration or silently widen the effective gates.
38
+ */
39
+ export declare function getOverrideForSession(directory: string, sessionId: string): Partial<QaGates>;
40
+ /**
41
+ * Merge ratchet-tighter gates into a session's durable override row.
42
+ *
43
+ * Only `true` values win (mirrors `getEffectiveGates` semantics); a `false`
44
+ * input never disables. If the merged map has no `true` gates the row is
45
+ * DELETED (empty-overrides invariant, #2668) — an empty override is the
46
+ * absence of policy, not a policy.
47
+ */
48
+ export declare function setOverrideForSession(directory: string, sessionId: string, gates: Partial<QaGates>): Partial<QaGates>;
49
+ /**
50
+ * Delete a session's durable override row. Idempotent: clearing an absent
51
+ * row is a no-op. Returns true when a row was removed.
52
+ */
53
+ export declare function clearOverrideForSession(directory: string, sessionId: string): boolean;
54
+ /**
55
+ * Delete every durable override row in the project. Used by
56
+ * `/swarm reset-session`, which clears all in-memory sessions for the
57
+ * project — their durable policy rows go with them (bounded: one row per
58
+ * session). Returns the number of rows removed.
59
+ */
60
+ export declare function clearAllSessionOverrides(directory: string): number;
61
+ /**
62
+ * Delete override rows whose session is no longer live in this project
63
+ * (#2668 orphan-row reaper). `sweepStaleSessions` can evict a stale session
64
+ * in-memory WITHOUT being able to clear its durable row — the hot-path
65
+ * `ensureAgentSession` sweep runs with no `directory`, so the project DB is
66
+ * unreachable there. This reaper runs at the rehydrate boundary (which knows
67
+ * the directory) and removes every row whose session id is not in
68
+ * `keepSessionIds` — the restored/live sessions of the hydrating project.
69
+ * Bounded: one indexed scan over a session-keyed table. Returns the number
70
+ * of orphaned rows removed.
71
+ */
72
+ export declare function sweepOrphanOverrides(directory: string, keepSessionIds: ReadonlySet<string>): number;