opencode-swarm 7.129.3 → 7.129.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 (30) hide show
  1. package/dist/cli/{curation-policy-vn1ybh31.js → curation-policy-s08pg90f.js} +2 -2
  2. package/dist/cli/{curator-gay2gz5p.js → curator-6ggzktne.js} +10 -10
  3. package/dist/cli/{curator-llm-factory-90803y01.js → curator-llm-factory-w6ep20tm.js} +10 -10
  4. package/dist/cli/{dispatch-f4hj1cj7.js → dispatch-3mhgqj2x.js} +1 -1
  5. package/dist/cli/{guardrail-explain-axvx94rx.js → guardrail-explain-0gr9wkj0.js} +11 -11
  6. package/dist/cli/{hive-promoter-3j6xp8gm.js → hive-promoter-4x3470c9.js} +10 -10
  7. package/dist/cli/{index-vjmmzhv0.js → index-803bqrzq.js} +11 -11
  8. package/dist/cli/{index-wy5jy3m9.js → index-8fy8q1px.js} +3 -3
  9. package/dist/cli/{index-6n2jpz7x.js → index-9f71ye47.js} +2 -2
  10. package/dist/cli/{index-kj86tyrs.js → index-bz814zsm.js} +1 -1
  11. package/dist/cli/{index-5fnc76da.js → index-hbbj7ktj.js} +1 -1
  12. package/dist/cli/{index-509jpmdd.js → index-hn1dxcr3.js} +1 -1
  13. package/dist/cli/{index-9vbpy8f9.js → index-jke1z4f2.js} +30 -30
  14. package/dist/cli/{index-m8vrw3pt.js → index-mgz9nm4a.js} +4 -4
  15. package/dist/cli/{index-w2kp2zvf.js → index-n08cksd6.js} +3 -3
  16. package/dist/cli/{index-kxw2sx1d.js → index-nbdge8b6.js} +1 -1
  17. package/dist/cli/{index-pgyp3tta.js → index-nhexgq4a.js} +1 -1
  18. package/dist/cli/{index-waqvy9a5.js → index-x7wt1g4w.js} +2 -2
  19. package/dist/cli/{index-6w02qz7t.js → index-yxz0c97p.js} +10 -8
  20. package/dist/cli/index.js +10 -10
  21. package/dist/cli/{knowledge-escalator-5ytt2y9n.js → knowledge-escalator-jjyn29ht.js} +3 -3
  22. package/dist/cli/{knowledge-events-qnyfrsfv.js → knowledge-events-f75n3916.js} +1 -1
  23. package/dist/cli/{knowledge-store-yeybvcqw.js → knowledge-store-7sahm702.js} +1 -1
  24. package/dist/cli/{knowledge-validator-g2c4mbwa.js → knowledge-validator-rjwvafv3.js} +4 -4
  25. package/dist/cli/{scan-cursor-c5mcce5r.js → scan-cursor-518rhxyd.js} +2 -2
  26. package/dist/cli/{skill-generator-c77e0y98.js → skill-generator-hk6mc7pc.js} +5 -5
  27. package/dist/index.js +4 -4
  28. package/dist/services/directive-predicate-runner.d.ts +6 -0
  29. package/package.json +1 -1
  30. package/dist/config/loader-recovery.d.ts +0 -95
@@ -47,6 +47,9 @@ export declare const TOOL_BINARY_ALLOWLIST: ReadonlySet<string>;
47
47
  * `{}`) are permitted; traversal and absolute paths are not.
48
48
  */
49
49
  export declare function validateRepoRelativeGlob(directory: string, value: string): string | null;
50
+ /** Find a binary on PATH (Bun.which misses runtime PATH changes).
51
+ * On Windows, checks .exe, .cmd, .bat, and bare name (issue #1691). */
52
+ declare function findBinaryInPath(binary: string): string | null;
50
53
  interface RunResult {
51
54
  exitCode: number | null;
52
55
  stdout: string;
@@ -69,4 +72,7 @@ export declare const _internals: {
69
72
  runDirectivePredicate: typeof runDirectivePredicate;
70
73
  TOOL_BINARY_ALLOWLIST: ReadonlySet<string>;
71
74
  };
75
+ export declare const _test_exports: {
76
+ findBinaryInPath: typeof findBinaryInPath;
77
+ };
72
78
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.129.3",
3
+ "version": "7.129.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",
@@ -1,95 +0,0 @@
1
- /**
2
- * Config loader recovery persistence module.
3
- *
4
- * Persists recovery metadata emitted by the config loader so that:
5
- * - `/swarm config doctor` can surface stale recovery artifacts
6
- * (left by a prior process that crashed before cleanup).
7
- * - Post-init flush (via `flushPendingLoaderRecovery`) can record
8
- * recovery warnings without blocking plugin init.
9
- * - Stale artifacts from older loads are cleaned up atomically
10
- * when a newer load completes successfully (SC-002.3).
11
- *
12
- * Conflict resolution: every completed load writes a recovery artifact
13
- * tagged with the tuple `{loadStartedAt, pid, inProcessCounter}`. When
14
- * an artifact already exists, the new load wins iff its tuple is
15
- * numerically greater than the existing one (component-wise comparison).
16
- * This prevents a slower or earlier process from overwriting a newer
17
- * recovery result.
18
- *
19
- * Artifact format (JSON):
20
- * ```json
21
- * {
22
- * "loadStartedAt": number,
23
- * "pid": number,
24
- * "inProcessCounter": number,
25
- * "sources": string[],
26
- * "fingerprint": string,
27
- * "warnings": RecoveryWarning[]
28
- * }
29
- * ```
30
- *
31
- * Lives under `src/config/` alongside `loader.ts` so the loader can
32
- * import it without cross-module dependency violations.
33
- */
34
- import * as fsPromises from 'node:fs/promises';
35
- import { bunWrite } from '../utils/bun-compat.js';
36
- import type { RecoveryWarning } from './sanitize-malformed-values.js';
37
- /** Shape of the on-disk recovery artifact. */
38
- export interface LoaderRecoveryArtifact {
39
- /** Date.now() when the config load started. */
40
- loadStartedAt: number;
41
- /** process.pid of the loading process. */
42
- pid: number;
43
- /** Monotonic per-process counter for same-process disambiguation. */
44
- inProcessCounter: number;
45
- /** Sorted source paths that contributed to the config merge. */
46
- sources: string[];
47
- /** SHA-256 fingerprint of the merged raw config. */
48
- fingerprint: string;
49
- /** Recovery warnings from the load (empty for clean loads). */
50
- warnings: RecoveryWarning[];
51
- }
52
- /**
53
- * Input shape accepted by the public API.
54
- * Matches `LoadPluginConfigWithRecoveryResult.pendingPersistence`
55
- * from `loader.ts`.
56
- */
57
- export type PendingLoaderRecoveryData = Omit<LoaderRecoveryArtifact, 'warnings'> & {
58
- warnings: RecoveryWarning[];
59
- };
60
- /**
61
- * Test-only dependency-injection seam — replaces `fsPromises.readFile`
62
- * and `bunWrite` so tests can exercise failure paths without
63
- * `mock.module` leakage (AGENTS.md §7).
64
- */
65
- export declare const _internals: {
66
- readFile: typeof fsPromises.readFile;
67
- write: typeof bunWrite;
68
- };
69
- /**
70
- * Persist loader recovery data to `<directory>/.swarm/advisories/loader-recovery.json`.
71
- *
72
- * Every completed load atomically writes the artifact under deterministic
73
- * conflict resolution: the new load wins iff its `{loadStartedAt, pid,
74
- * inProcessCounter}` tuple is numerically greater than the existing artifact's.
75
- * Clean loads (no recovery warnings) write `warnings: []`, which serves as
76
- * the SC-002.3 stale-artifact cleanup signal.
77
- *
78
- * Failures (filesystem errors, permission issues) are logged via
79
- * `advisoryWarn` and never thrown — this is best-effort persistence.
80
- *
81
- * @param directory - Project root directory (the `.swarm/` parent).
82
- * @param data - Recovery data from the loader's `pendingPersistence`.
83
- */
84
- export declare function persistLoaderRecovery(directory: string, data: PendingLoaderRecoveryData): Promise<void>;
85
- /**
86
- * Synchronous wrapper that defers `persistLoaderRecovery` via `queueMicrotask`.
87
- *
88
- * This is designed for the post-init flush path (task 1.5) where the caller
89
- * must not await the write — the write is fire-and-forget, with errors
90
- * routed to `advisoryWarn` inside `persistLoaderRecovery`.
91
- *
92
- * @param directory - Project root directory (the `.swarm/` parent).
93
- * @param pendingData - Recovery data from the loader's `pendingPersistence`.
94
- */
95
- export declare function flushPendingLoaderRecovery(directory: string, pendingData: PendingLoaderRecoveryData): void;