opencode-swarm 7.135.2 → 7.135.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/.opencode/skills/critic-gate/SKILL.md +10 -0
- package/dist/agents/explorer.d.ts +1 -1
- package/dist/agents/index.d.ts +12 -0
- package/dist/cli/{config-doctor-pj3yvxdb.js → config-doctor-fgmemknc.js} +3 -2
- package/dist/cli/{core-4va9z2ng.js → core-4z1s2ak1.js} +3 -2
- package/dist/cli/{curation-policy-b2caf3v3.js → curation-policy-frs28q57.js} +3 -3
- package/dist/cli/{curator-drift-2ta83hss.js → curator-drift-jpap6hv4.js} +2 -2
- package/dist/cli/{curator-llm-factory-9983528d.js → curator-llm-factory-pr59p535.js} +25 -24
- package/dist/cli/{curator-r1s2mwf2.js → curator-psq8m2j7.js} +25 -24
- package/dist/cli/{dispatch-wtk6dxky.js → dispatch-b1fge4xk.js} +2 -2
- package/dist/cli/{evidence-summary-service-feby8ny0.js → evidence-summary-service-w006jnpg.js} +5 -5
- package/dist/cli/{explorer-15gqzxh8.js → explorer-swjc297z.js} +1 -1
- package/dist/cli/{gate-evidence-84b03mb4.js → gate-evidence-aenyz6vt.js} +2 -2
- package/dist/cli/{guardrail-explain-pwxvg5n0.js → guardrail-explain-ws45zchy.js} +26 -25
- package/dist/cli/{guardrail-log-yzpz8b7t.js → guardrail-log-gbzek1pz.js} +5 -4
- package/dist/cli/{hive-promoter-586dhndj.js → hive-promoter-gdbg4nyd.js} +25 -24
- package/dist/cli/index-3jcyn8g6.js +1219 -0
- package/dist/cli/{index-hdy2nd5h.js → index-45t7w06b.js} +4 -4
- package/dist/cli/{index-hvrrq3f3.js → index-4g3nq4sh.js} +1 -1
- package/dist/cli/{index-02cqjna3.js → index-5s1q6xcw.js} +4 -4
- package/dist/cli/{index-340chr1e.js → index-66w4jjg6.js} +10124 -10005
- package/dist/cli/{index-dg1njnms.js → index-6mjf4vr1.js} +1 -1
- package/dist/cli/{index-9c3gf2wd.js → index-ajehqzvn.js} +6 -4
- package/dist/cli/{index-2pxk6qg4.js → index-b34vbxmx.js} +4 -2
- package/dist/cli/{index-d5psymdk.js → index-c9ddxv4k.js} +57 -8
- package/dist/cli/{index-j0kte6gd.js → index-cg413zhk.js} +8 -1210
- package/dist/cli/{index-7pnvf04s.js → index-cggqh2dz.js} +10 -10
- package/dist/cli/{index-bs4m85v1.js → index-cgqekdja.js} +2 -2
- package/dist/cli/{index-j92ser8n.js → index-ck9rx6j1.js} +5 -3
- package/dist/cli/{index-jgkjxpdh.js → index-fx7bn93y.js} +2 -2
- package/dist/cli/{index-qqkw794p.js → index-g86vfxnk.js} +3 -3
- package/dist/cli/{index-3m7kpnqf.js → index-jsp8r6f9.js} +1 -1
- package/dist/cli/{index-8gw8p7yh.js → index-mysdsqtk.js} +21 -4
- package/dist/cli/{index-3xbx305x.js → index-tcn457d5.js} +1 -1
- package/dist/cli/{index-ckdva4rs.js → index-tegdwx34.js} +5 -5
- package/dist/cli/{index-b0eva00y.js → index-vh39nxpx.js} +1 -1
- package/dist/cli/{index-73dfyfhq.js → index-x20cgr2q.js} +1 -1
- package/dist/cli/{index-cwdy5vw9.js → index-xfeg0c0c.js} +31 -29
- package/dist/cli/{index-g3meqrsg.js → index-ys04j1np.js} +12 -10
- package/dist/cli/index.js +28 -26
- package/dist/cli/{knowledge-escalator-w7by1m8m.js → knowledge-escalator-0060q7we.js} +4 -4
- package/dist/cli/{knowledge-events-n8xxsay3.js → knowledge-events-yh2qwa6k.js} +6 -2
- package/dist/cli/knowledge-link-mm1w967j.js +1 -1
- package/dist/cli/{knowledge-store-xzmvfnx3.js → knowledge-store-geqaez58.js} +2 -2
- package/dist/cli/{knowledge-validator-5q1amsq6.js → knowledge-validator-4zq4vm7t.js} +5 -5
- package/dist/cli/{pending-delegations-mt5gs1bt.js → pending-delegations-qajsxct0.js} +4 -4
- package/dist/cli/{pr-subscriptions-v5xd3j6d.js → pr-subscriptions-qhr41epq.js} +4 -4
- package/dist/cli/{scan-cursor-1q1zmt4b.js → scan-cursor-nk2rybhq.js} +3 -3
- package/dist/cli/{schema-8mtsfspm.js → schema-th3tx32c.js} +2 -1
- package/dist/cli/scope-persistence-h2fpgxww.js +2 -2
- package/dist/cli/{skill-generator-54xbjgak.js → skill-generator-1947bbkn.js} +6 -6
- package/dist/cli/{worktree-collision-ownership-15hymf1y.js → worktree-collision-ownership-13btcj9g.js} +5 -5
- package/dist/commands/approve-plan-critic.d.ts +21 -0
- package/dist/commands/registry.d.ts +8 -0
- package/dist/config/cache-paths.d.ts +48 -0
- package/dist/config/constants.d.ts +18 -0
- package/dist/config/host-path.d.ts +95 -0
- package/dist/config/lane-context.d.ts +117 -0
- package/dist/config/lane-permissions.d.ts +277 -0
- package/dist/config/schema.d.ts +10 -0
- package/dist/config/swarm-branch.d.ts +130 -0
- package/dist/hooks/curator-postmortem.d.ts +8 -0
- package/dist/hooks/delegate-ack-collector.d.ts +21 -0
- package/dist/hooks/delegation-gate.d.ts +42 -1
- package/dist/hooks/knowledge-events.d.ts +33 -1
- package/dist/hooks/skill-propagation-gate.d.ts +10 -0
- package/dist/index.js +225 -212
- package/dist/memory/schema.d.ts +4 -4
- package/dist/services/knowledge-diagnostics.d.ts +2 -0
- package/dist/tools/approve-plan-critic.d.ts +5 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/manifest.d.ts +1 -0
- package/dist/tools/tool-metadata.d.ts +4 -0
- package/package.json +1 -1
- package/dist/cli/{index-bfd4xfpp.js → index-4qzeef9h.js} +3 -3
- package/dist/cli/{index-ryqnn3nv.js → index-mrtms113.js} +3 -3
- package/dist/cli/{index-m0ynxkaa.js → index-vm4xw9z3.js} +3 -3
|
@@ -338,7 +338,7 @@ TASK: CURATOR_POSTMORTEM [plan_id]
|
|
|
338
338
|
PLAN_SUMMARY: [plan phases, task counts, completion status]
|
|
339
339
|
CURATOR_DIGESTS: [running digest from curator_phase across all phases]
|
|
340
340
|
KNOWLEDGE_ENTRIES: [JSON array of existing entries with UUIDs]
|
|
341
|
-
KNOWLEDGE_EVENTS_SUMMARY: [aggregated violation/applied/ignored counts per entry]
|
|
341
|
+
KNOWLEDGE_EVENTS_SUMMARY: [aggregated violation/applied/ignored/unacknowledged counts per entry \u2014 "unacknowledged" means a delegate was shown the directive and filed no ack; it is an audit-only delivery signal, NEVER negative evidence: do not treat it as ignored/violated or count it toward never-applied archival reasoning]
|
|
342
342
|
PENDING_PROPOSALS: [skill/motif proposals awaiting triage]
|
|
343
343
|
UNACTIONABLE_QUARANTINE: [entries flagged unactionable with retry status]
|
|
344
344
|
DRIFT_REPORTS: [per-phase alignment/drift scores if available]
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
DEFAULT_WORKTREE_ISOLATION_CONFIG,
|
|
4
3
|
ExternalSkillsConfigSchema,
|
|
5
4
|
GATE_CONFIG_KNOWN_SECTION_KEYS,
|
|
6
5
|
GateConfigSchema,
|
|
7
6
|
PluginConfigSchema,
|
|
8
|
-
init_constants,
|
|
9
7
|
init_schema,
|
|
10
8
|
resolveExternalSkillsConfig
|
|
11
|
-
} from "./index-
|
|
9
|
+
} from "./index-cg413zhk.js";
|
|
12
10
|
import {
|
|
13
11
|
advisoryWarn,
|
|
14
12
|
init_warning_buffer
|
|
15
13
|
} from "./index-4rhhvd1a.js";
|
|
14
|
+
import {
|
|
15
|
+
DEFAULT_WORKTREE_ISOLATION_CONFIG,
|
|
16
|
+
init_constants
|
|
17
|
+
} from "./index-3jcyn8g6.js";
|
|
16
18
|
import {
|
|
17
19
|
MAX_MERGE_DEPTH,
|
|
18
20
|
deepMerge,
|
|
@@ -715,4 +717,4 @@ function resolveWorktreeIsolationConfig(config) {
|
|
|
715
717
|
// src/config/index.ts
|
|
716
718
|
var _internals = { loadPluginConfigWithMeta };
|
|
717
719
|
|
|
718
|
-
export { loadPluginConfig, loadPluginConfigWithMeta, getSafeDefaultConfigLoadResult, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader,
|
|
720
|
+
export { resolveWorktreeIsolationConfig, loadPluginConfig, loadPluginConfigWithMeta, getSafeDefaultConfigLoadResult, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader, _internals };
|
|
@@ -4,21 +4,68 @@ import {
|
|
|
4
4
|
init_warning_buffer
|
|
5
5
|
} from "./index-4rhhvd1a.js";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
SWARM_WORKTREE_DIR_NAME,
|
|
8
|
+
init_constants
|
|
9
|
+
} from "./index-3jcyn8g6.js";
|
|
9
10
|
import {
|
|
10
11
|
bunSpawn
|
|
11
12
|
} from "./index-y111zefa.js";
|
|
13
|
+
import {
|
|
14
|
+
log
|
|
15
|
+
} from "./index-zgwm4ryv.js";
|
|
12
16
|
import {
|
|
13
17
|
__require
|
|
14
18
|
} from "./index-a76rekgs.js";
|
|
15
19
|
|
|
16
20
|
// src/worktree/core.ts
|
|
17
|
-
|
|
21
|
+
init_constants();
|
|
18
22
|
import * as fs from "fs";
|
|
19
23
|
import * as fsPromises from "fs/promises";
|
|
20
24
|
import * as os from "os";
|
|
21
25
|
import * as path from "path";
|
|
26
|
+
|
|
27
|
+
// src/config/swarm-branch.ts
|
|
28
|
+
init_constants();
|
|
29
|
+
var SWARM_WORKTREE_BRANCH_PREFIXES = ["swarm/", "swarm-lane/"];
|
|
30
|
+
var SESSION_ID_PATTERN = /^ses_[A-Za-z0-9]+$/;
|
|
31
|
+
function isPlainSegment(segment) {
|
|
32
|
+
return typeof segment === "string" && segment.length > 0 && segment !== "." && segment !== "..";
|
|
33
|
+
}
|
|
34
|
+
function buildSwarmBranchName(sessionId, id, purpose, legacyLane) {
|
|
35
|
+
const [standardPrefix, legacyLanePrefix] = SWARM_WORKTREE_BRANCH_PREFIXES;
|
|
36
|
+
return legacyLane ? `${legacyLanePrefix}${sessionId}/${id}` : `${standardPrefix}${purpose}/${sessionId}/${id}`;
|
|
37
|
+
}
|
|
38
|
+
function matchSwarmLaneBranch(branch) {
|
|
39
|
+
if (typeof branch !== "string" || branch === "")
|
|
40
|
+
return;
|
|
41
|
+
const segments = branch.split("/");
|
|
42
|
+
if (segments[0] === "swarm-lane") {
|
|
43
|
+
if (segments.length !== 3)
|
|
44
|
+
return;
|
|
45
|
+
const [, sessionId, id] = segments;
|
|
46
|
+
if (!SESSION_ID_PATTERN.test(sessionId ?? ""))
|
|
47
|
+
return;
|
|
48
|
+
if (!isPlainSegment(id))
|
|
49
|
+
return;
|
|
50
|
+
return { purpose: "lane", sessionId, id, style: "legacy-lane" };
|
|
51
|
+
}
|
|
52
|
+
if (segments[0] === "swarm") {
|
|
53
|
+
if (segments.length !== 4)
|
|
54
|
+
return;
|
|
55
|
+
const [, purpose, sessionId, id] = segments;
|
|
56
|
+
if (!isPlainSegment(purpose))
|
|
57
|
+
return;
|
|
58
|
+
if (!SESSION_ID_PATTERN.test(sessionId ?? ""))
|
|
59
|
+
return;
|
|
60
|
+
if (!isPlainSegment(id))
|
|
61
|
+
return;
|
|
62
|
+
return { purpose, sessionId, id, style: "purpose" };
|
|
63
|
+
}
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// src/worktree/core.ts
|
|
68
|
+
init_warning_buffer();
|
|
22
69
|
var _internals = {
|
|
23
70
|
bunSpawn,
|
|
24
71
|
platform: process.platform,
|
|
@@ -162,13 +209,10 @@ function shortenWorktreePath(_directory, sessionId, laneId) {
|
|
|
162
209
|
return path.join(tmp, "swwt", sessionId, laneId);
|
|
163
210
|
}
|
|
164
211
|
function makeWorktreeBranchName(sessionId, id, options) {
|
|
165
|
-
|
|
166
|
-
return `swarm-lane/${sessionId}/${id}`;
|
|
167
|
-
}
|
|
168
|
-
return `swarm/${options.purpose}/${sessionId}/${id}`;
|
|
212
|
+
return buildSwarmBranchName(sessionId, id, options.purpose, options.branchStyle === "legacy-lane" && options.purpose === "lane");
|
|
169
213
|
}
|
|
170
214
|
function resolveWorktreeBaseDir(directory, worktreeDir) {
|
|
171
|
-
return worktreeDir ? path.resolve(directory, worktreeDir) : path.resolve(path.dirname(directory),
|
|
215
|
+
return worktreeDir ? path.resolve(directory, worktreeDir) : path.resolve(path.dirname(directory), SWARM_WORKTREE_DIR_NAME);
|
|
172
216
|
}
|
|
173
217
|
function isPathUnderSwarmWorktreeBase(targetPath, directory, worktreeDirOverrides = []) {
|
|
174
218
|
const caseInsensitive = process.platform === "win32";
|
|
@@ -199,6 +243,11 @@ function isPathUnderSwarmWorktreeBase(targetPath, directory, worktreeDirOverride
|
|
|
199
243
|
}
|
|
200
244
|
async function provisionWorktree(directory, id, sessionId, options) {
|
|
201
245
|
const branchName = makeWorktreeBranchName(sessionId, id, options);
|
|
246
|
+
if (!matchSwarmLaneBranch(branchName)) {
|
|
247
|
+
return {
|
|
248
|
+
error: `Refusing to provision worktree: branch "${branchName}" does not match the swarm lane grammar, so lane permission scoping could not recognise it and the lane would hang on the first external-directory prompt. This is almost always an invalid sessionId ("${sessionId}"); it must look like "ses_" followed by letters/digits, and the execution-unit id ("${id}") must be a single path segment.`
|
|
249
|
+
};
|
|
250
|
+
}
|
|
202
251
|
let worktreePath = path.resolve(resolveWorktreeBaseDir(directory, options.worktreeDir), sessionId, id);
|
|
203
252
|
const budgetResult = await checkPathBudget(worktreePath, directory);
|
|
204
253
|
if (budgetResult.ok === false) {
|