opencode-swarm 7.143.2 → 7.143.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.
- package/dist/cli/{config-doctor-xadt4kv5.js → config-doctor-az6nqawx.js} +2 -2
- package/dist/cli/{core-vpefadja.js → core-a6rzajem.js} +1 -1
- package/dist/cli/{curator-llm-factory-xjw5j2jj.js → curator-llm-factory-j42j5rcr.js} +17 -17
- package/dist/cli/{curator-wahbxxw9.js → curator-tbw9przg.js} +17 -17
- package/dist/cli/{evidence-summary-service-m0jes2yb.js → evidence-summary-service-3f319cst.js} +6 -6
- package/dist/cli/{gate-evidence-sf9hbhm0.js → gate-evidence-k2yycngf.js} +2 -2
- package/dist/cli/{guardrail-explain-9vdjkz5x.js → guardrail-explain-tsgsw91f.js} +18 -18
- package/dist/cli/{guardrail-log-xr0cv07v.js → guardrail-log-70cxb3va.js} +3 -3
- package/dist/cli/{hive-promoter-ften3m3h.js → hive-promoter-nksqxfs4.js} +17 -17
- package/dist/cli/{index-6hwedxn7.js → index-19wyta2k.js} +3 -3
- package/dist/cli/{index-fq0b44vq.js → index-5qqyvwqw.js} +4 -4
- package/dist/cli/{index-8hxbjgyk.js → index-6htwcbxh.js} +1 -1
- package/dist/cli/{index-je3jmcc1.js → index-8fq18k02.js} +3 -3
- package/dist/cli/{index-kjgma6hg.js → index-8qmnqd6g.js} +1 -1
- package/dist/cli/{index-x0ja3n3g.js → index-9m5gz9ea.js} +2 -2
- package/dist/cli/{index-xacfcpyn.js → index-bt47jrhx.js} +2 -2
- package/dist/cli/{index-jvbqryky.js → index-c9d5y70c.js} +3 -3
- package/dist/cli/{index-2pxq133w.js → index-dmtq7tvd.js} +1 -1
- package/dist/cli/{index-qswsp6s3.js → index-f39n8pbr.js} +1 -1
- package/dist/cli/{index-7e91cs99.js → index-f3xf9dv5.js} +5 -5
- package/dist/cli/{index-nvt1152n.js → index-gbr0jbxy.js} +1 -1
- package/dist/cli/{index-6f80e8r5.js → index-gz3z9d64.js} +179 -122
- package/dist/cli/{index-yr997mhn.js → index-ja15rdzd.js} +1 -1
- package/dist/cli/{index-r0j1sh38.js → index-jmgm1npc.js} +1 -1
- package/dist/cli/{index-h5fmwg5b.js → index-mewk624g.js} +19 -19
- package/dist/cli/{index-kc9tfc7e.js → index-seedt8m3.js} +3 -3
- package/dist/cli/{index-700yppfy.js → index-td2ga37v.js} +1 -1
- package/dist/cli/{index-4g1bnzma.js → index-v9qmhrj9.js} +2 -2
- package/dist/cli/{index-yw4atzww.js → index-z0j133c4.js} +1 -1
- package/dist/cli/{index-6q3wx600.js → index-z4g05zbr.js} +1 -1
- package/dist/cli/index.js +17 -17
- package/dist/cli/{knowledge-escalator-9xesv2xx.js → knowledge-escalator-8akk4n18.js} +6 -6
- package/dist/cli/{knowledge-events-s8nvbdyk.js → knowledge-events-51qk8fq2.js} +4 -4
- package/dist/cli/{knowledge-store-2zt0b10b.js → knowledge-store-7rsezhav.js} +1 -1
- package/dist/cli/{knowledge-validator-nt955tw0.js → knowledge-validator-nq75s9et.js} +2 -2
- package/dist/cli/{scan-cursor-emrg35t0.js → scan-cursor-em4vrcw6.js} +2 -2
- package/dist/cli/{schema-tpbz8f0x.js → schema-1wmfgtm9.js} +1 -1
- package/dist/cli/{scope-persistence-1hf839ys.js → scope-persistence-8ehnjgsg.js} +4 -4
- package/dist/cli/{skill-generator-fja22m4q.js → skill-generator-3jstr1sx.js} +7 -7
- package/dist/cli/{worktree-isolation-gnqvy10j.js → worktree-isolation-cc3x13ng.js} +17 -17
- package/dist/commands/registry.d.ts +2 -2
- package/dist/hooks/review-receipt-collector.d.ts +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +77 -69
- package/dist/session/snapshot-reader.d.ts +11 -0
- package/dist/session/snapshot-writer.d.ts +12 -0
- package/dist/state.d.ts +4 -3
- package/dist/tools/dispatch-lanes.d.ts +1 -0
- package/package.json +1 -1
|
@@ -33,6 +33,17 @@ export declare function readSnapshot(directory: string): Promise<SnapshotData |
|
|
|
33
33
|
* Rehydrate swarmState from a SnapshotData object.
|
|
34
34
|
* Clears existing maps first, then populates from snapshot.
|
|
35
35
|
* Does NOT touch activeToolCalls or pendingEvents (remain at defaults).
|
|
36
|
+
*
|
|
37
|
+
* activeAgent and delegationChains are restored only for session IDs that are
|
|
38
|
+
* actually restored into agentSessions. Snapshots written before ghost-entry
|
|
39
|
+
* eviction existed can carry far more activeAgent entries than agentSessions
|
|
40
|
+
* (sessions were evicted but their satellite entries never were); restoring
|
|
41
|
+
* those wholesale would resurrect the ghosts into memory and re-serialize them
|
|
42
|
+
* into every subsequent snapshot forever. Rehydration runs at plugin init,
|
|
43
|
+
* before any turn is in flight; a session that resumes afterwards gets its
|
|
44
|
+
* entry re-established by chat.message (delegation-tracker), and until then
|
|
45
|
+
* tool-path readers fall back to ORCHESTRATOR_NAME — the same treatment a
|
|
46
|
+
* fresh process gives an unknown session.
|
|
36
47
|
*/
|
|
37
48
|
export declare function rehydrateState(snapshot: SnapshotData, directory?: string): Promise<void>;
|
|
38
49
|
/**
|
|
@@ -2,9 +2,20 @@
|
|
|
2
2
|
* Session snapshot writer for OpenCode Swarm plugin.
|
|
3
3
|
* Serializes swarmState to .swarm/session/state.json using atomic write (temp-file + rename).
|
|
4
4
|
*/
|
|
5
|
+
import { rename as fsRename } from 'node:fs/promises';
|
|
5
6
|
import { TASK_WORKFLOW_SCHEMA_MARKER } from '../gate-evidence.js';
|
|
6
7
|
import type { AgentSessionState, DelegationEntry, ToolAggregate } from '../state';
|
|
7
8
|
import { swarmState } from '../state';
|
|
9
|
+
/**
|
|
10
|
+
* Windows can transiently fail a rename with EEXIST/EBUSY/EPERM while another
|
|
11
|
+
* process (an external snapshot reader, an AV scanner) briefly holds the
|
|
12
|
+
* target open. Same codes, budget, and delay as the retry policy in `bunWrite`
|
|
13
|
+
* (src/utils/bun-compat.ts:36) — except this loop skips the sleep after the
|
|
14
|
+
* final attempt, which bunWrite still takes. Kept local rather than imported
|
|
15
|
+
* so this module adds no new bun-compat exports for existing non-spread
|
|
16
|
+
* `mock.module('../utils/bun-compat', ...)` test factories to miss.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SNAPSHOT_RENAME_MAX_ATTEMPTS = 3;
|
|
8
19
|
/**
|
|
9
20
|
* Serialized form of AgentSessionState with Map/Set fields converted to plain arrays/objects
|
|
10
21
|
*/
|
|
@@ -153,4 +164,5 @@ export declare const _internals: {
|
|
|
153
164
|
writeSnapshot: typeof writeSnapshot;
|
|
154
165
|
createSnapshotWriterHook: typeof createSnapshotWriterHook;
|
|
155
166
|
flushPendingSnapshot: typeof flushPendingSnapshot;
|
|
167
|
+
rename: typeof fsRename;
|
|
156
168
|
};
|
package/dist/state.d.ts
CHANGED
|
@@ -850,9 +850,10 @@ export declare function isReviewerScopeGenerationCurrent(input: {
|
|
|
850
850
|
}): boolean;
|
|
851
851
|
/**
|
|
852
852
|
* Evict every agent session whose last tool activity is older than
|
|
853
|
-
* staleDurationMs, and drop the delegation chain
|
|
854
|
-
* (
|
|
855
|
-
* does `delegationChains.set(input.sessionID,
|
|
853
|
+
* staleDurationMs, and drop the delegation chain and activeAgent entry keyed
|
|
854
|
+
* by that same sessionID (both maps are keyed by sessionID — see
|
|
855
|
+
* delegation-tracker.ts, which does `delegationChains.set(input.sessionID,
|
|
856
|
+
* ...)` and `activeAgent.set(input.sessionID, ...)`). This is the single
|
|
856
857
|
* eviction loop reused by BOTH startAgentSession (eager, on new session start)
|
|
857
858
|
* and maybeSweepStaleSessions (opportunistic, on the hot path) so the logic is
|
|
858
859
|
* never duplicated.
|
|
@@ -5,6 +5,7 @@ import { type PrReviewDepthTier } from '../hooks/pr-workflow-gate.js';
|
|
|
5
5
|
import { buildLaneOrientationBlock } from '../hooks/repo-graph-injection.js';
|
|
6
6
|
import { createParallelDispatcher } from '../parallel/dispatcher/parallel-dispatcher.js';
|
|
7
7
|
import { createSwarmTool } from './create-tool.js';
|
|
8
|
+
export declare const MAX_LANES = 8;
|
|
8
9
|
export declare const MAX_PROMPT_CHARS = 80000;
|
|
9
10
|
export declare const BASE_EXPLORER_CANDIDATE_FORMAT_SUFFIX: string;
|
|
10
11
|
export declare const MICRO_EXPLORER_CANDIDATE_FORMAT_SUFFIX: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.143.
|
|
3
|
+
"version": "7.143.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",
|