opencode-swarm 7.107.5 → 7.108.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.
- package/.opencode/skills/codebase-review-swarm/SKILL.md +15 -0
- package/.opencode/skills/codebase-review-swarm/references/review-protocol-v8.2.md +15 -0
- package/.opencode/skills/engineering-conventions/SKILL.md +1 -1
- package/.opencode/skills/execute/SKILL.md +2 -0
- package/.opencode/skills/phase-wrap/SKILL.md +6 -1
- package/.opencode/skills/swarm-implement/SKILL.md +161 -0
- package/.opencode/skills/swarm-pr-feedback/SKILL.md +5 -2
- package/.opencode/skills/swarm-pr-review/SKILL.md +61 -0
- package/.opencode/skills/writing-tests/SKILL.md +7 -0
- package/dist/cli/{capability-probe-wsjzcp48.js → capability-probe-sh9bwh39.js} +2 -1
- package/dist/cli/{config-doctor-kdq3vae4.js → config-doctor-q354tb2w.js} +2 -2
- package/dist/cli/core-vev13ej2.js +34 -0
- package/dist/cli/{curator-drift-ed7p5mfy.js → curator-drift-fdfgj9qf.js} +3 -3
- package/dist/cli/{curator-k9swkynp.js → curator-js92gc8a.js} +24 -20
- package/dist/cli/curator-llm-factory-n70bxf40.js +40 -0
- package/dist/cli/{dispatch-anmxxhen.js → dispatch-zr1xja4t.js} +2 -2
- package/dist/cli/{evidence-summary-service-6zsgw7x7.js → evidence-summary-service-bjhr75v0.js} +9 -7
- package/dist/cli/{gate-evidence-pgr7d942.js → gate-evidence-v6ds8rcp.js} +5 -4
- package/dist/cli/guardrail-explain-sn2a4pb7.js +41 -0
- package/dist/cli/{guardrail-log-fjypsmek.js → guardrail-log-8mqqsssq.js} +4 -4
- package/dist/cli/hive-promoter-3hh8ph4a.js +48 -0
- package/dist/cli/{index-9b7qp18e.js → index-1cn967sa.js} +2 -2
- package/dist/cli/{index-vzq4h90s.js → index-1emhz3zb.js} +1380 -2013
- package/dist/cli/{index-n1sptn1w.js → index-2nt4mq9n.js} +1 -1
- package/dist/cli/{index-6h82c2h0.js → index-48mc4d48.js} +1056 -192
- package/dist/cli/{index-bq8kd9r9.js → index-5gnp8fyw.js} +3 -3
- package/dist/cli/index-5mkc2f9z.js +154 -0
- package/dist/cli/{index-0kxc7t16.js → index-6jng9c8t.js} +1 -1
- package/dist/cli/{index-jrka8jd4.js → index-7jyndvsy.js} +2 -2
- package/dist/cli/{index-b9v501fr.js → index-7xgqky26.js} +33 -5
- package/dist/cli/{index-4r5z8sgw.js → index-85bacexr.js} +2 -2
- package/dist/cli/{index-bpgqbwmf.js → index-9qxntjtx.js} +6 -6
- package/dist/cli/index-f1qyj61w.js +418 -0
- package/dist/cli/{index-wvxhynxq.js → index-fm7xz1ne.js} +1 -1
- package/dist/cli/{index-dfdg4ws5.js → index-fz1jgbvw.js} +6 -6
- package/dist/cli/{index-pchpahdf.js → index-h4c4rrwx.js} +20 -3
- package/dist/cli/{index-kxm3bdjh.js → index-mmny81g1.js} +6 -6
- package/dist/cli/{index-v4fcn4tr.js → index-q1exe2b3.js} +2 -198
- package/dist/cli/{index-57ymmh7h.js → index-r3j3458j.js} +4 -4
- package/dist/cli/{index-3naa2ajc.js → index-vvk2g744.js} +10 -156
- package/dist/cli/{index-zej8cy0j.js → index-vx76tcxe.js} +1 -1
- package/dist/cli/{index-xmarctsf.js → index-wg0665ft.js} +7 -7
- package/dist/cli/{index-4vsgp5a8.js → index-wj4jeavn.js} +1 -1
- package/dist/cli/index-wvrj16f0.js +206 -0
- package/dist/cli/{index-w1tvqh4x.js → index-x06d2qqm.js} +28 -24
- package/dist/cli/index-x2q0gnt8.js +254 -0
- package/dist/cli/{index-xg18az81.js → index-yw8qpf51.js} +1 -1
- package/dist/cli/index.js +24 -20
- package/dist/cli/{knowledge-escalator-3sgwrgy9.js → knowledge-escalator-6v7sjprx.js} +8 -7
- package/dist/cli/{knowledge-events-kfc6xmkw.js → knowledge-events-6n3x3he2.js} +6 -5
- package/dist/cli/{knowledge-store-kyacem71.js → knowledge-store-exkw6yb1.js} +6 -5
- package/dist/cli/{knowledge-validator-ez3ws8ef.js → knowledge-validator-exymfcb9.js} +7 -6
- package/dist/cli/{pending-delegations-vfnpm8zt.js → pending-delegations-yyz3fcfn.js} +5 -4
- package/dist/cli/{pr-subscriptions-bpvazmsw.js → pr-subscriptions-vv8byxe6.js} +6 -5
- package/dist/cli/{schema-x0ekqzvs.js → schema-x17zmd03.js} +1 -1
- package/dist/cli/scope-persistence-6m5nsp1r.js +20 -0
- package/dist/cli/{skill-generator-x83re96d.js → skill-generator-mx9br4ty.js} +9 -8
- package/dist/commands/_shared/url-security.d.ts +13 -3
- package/dist/commands/close.d.ts +11 -0
- package/dist/commands/lanes.d.ts +35 -0
- package/dist/commands/registry.d.ts +7 -0
- package/dist/config/bundled-skills.d.ts +1 -1
- package/dist/config/schema.d.ts +102 -0
- package/dist/config/skill-mirrors.d.ts +1 -1
- package/dist/git/branch.d.ts +53 -7
- package/dist/git/index.d.ts +5 -1
- package/dist/git/pr.d.ts +35 -2
- package/dist/hooks/delegation-gate/worktree-isolation.d.ts +118 -2
- package/dist/hooks/delegation-gate/worktree-merge-status.d.ts +17 -0
- package/dist/hooks/init-orphan-recovery-advisory.d.ts +58 -0
- package/dist/hooks/init-orphan-recovery.d.ts +65 -0
- package/dist/index.js +427 -416
- package/dist/sandbox/executor.d.ts +11 -1
- package/dist/sandbox/linux/bubblewrap-executor.d.ts +3 -1
- package/dist/sandbox/macos/sandbox-exec-executor.d.ts +3 -1
- package/dist/sandbox/win32/native-sandbox-executor.d.ts +1 -1
- package/dist/sandbox/win32/restricted-environment-executor.d.ts +4 -1
- package/dist/turbo/lean/runner.d.ts +11 -20
- package/dist/turbo/lean/worktree.d.ts +9 -3
- package/dist/utils/bun-compat.d.ts +30 -0
- package/dist/worktree/core.d.ts +55 -0
- package/dist/worktree/merge.d.ts +5 -1
- package/dist/worktree/types.d.ts +38 -0
- package/package.json +2 -1
- package/dist/cli/curator-llm-factory-ed67kywr.js +0 -36
- package/dist/cli/guardrail-explain-vd6da30t.js +0 -37
- package/dist/cli/hive-promoter-gh0nva5c.js +0 -44
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
handleGuardrailLog
|
|
4
|
-
} from "./index-zej8cy0j.js";
|
|
5
2
|
import {
|
|
6
3
|
handleGuardrailExplain
|
|
7
|
-
} from "./index-
|
|
4
|
+
} from "./index-7jyndvsy.js";
|
|
5
|
+
import {
|
|
6
|
+
handleGuardrailLog
|
|
7
|
+
} from "./index-vx76tcxe.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -80,39 +80,43 @@ import {
|
|
|
80
80
|
handleWriteRetroCommand,
|
|
81
81
|
normalizeSwarmCommandInput,
|
|
82
82
|
resolveCommand
|
|
83
|
-
} from "./index-
|
|
84
|
-
import"./index-
|
|
83
|
+
} from "./index-1emhz3zb.js";
|
|
84
|
+
import"./index-wj4jeavn.js";
|
|
85
|
+
import"./index-5gnp8fyw.js";
|
|
85
86
|
import"./index-c8s9a3zh.js";
|
|
86
|
-
import"./index-
|
|
87
|
-
import"./index-
|
|
87
|
+
import"./index-fm7xz1ne.js";
|
|
88
|
+
import"./index-48mc4d48.js";
|
|
88
89
|
import"./index-91j1sqzm.js";
|
|
89
|
-
import"./index-
|
|
90
|
+
import"./index-yw8qpf51.js";
|
|
91
|
+
import"./index-85bacexr.js";
|
|
90
92
|
import"./index-09xpycan.js";
|
|
91
93
|
import {
|
|
92
94
|
AGENT_TOOL_MAP,
|
|
93
95
|
ORCHESTRATOR_NAME,
|
|
94
96
|
stripKnownSwarmPrefix
|
|
95
|
-
} from "./index-
|
|
96
|
-
import"./index-
|
|
97
|
-
import"./index-
|
|
98
|
-
import"./index-
|
|
99
|
-
import"./index-
|
|
100
|
-
import"./index-
|
|
101
|
-
import"./index-n1sptn1w.js";
|
|
97
|
+
} from "./index-h4c4rrwx.js";
|
|
98
|
+
import"./index-9qxntjtx.js";
|
|
99
|
+
import"./index-mmny81g1.js";
|
|
100
|
+
import"./index-fz1jgbvw.js";
|
|
101
|
+
import"./index-wg0665ft.js";
|
|
102
|
+
import"./index-2nt4mq9n.js";
|
|
102
103
|
import"./index-bfwt3abw.js";
|
|
103
|
-
import"./index-
|
|
104
|
-
import"./index-
|
|
105
|
-
import"./index-
|
|
106
|
-
import"./index-
|
|
107
|
-
import"./index-
|
|
104
|
+
import"./index-wvrj16f0.js";
|
|
105
|
+
import"./index-q1exe2b3.js";
|
|
106
|
+
import"./index-x2q0gnt8.js";
|
|
107
|
+
import"./index-f1qyj61w.js";
|
|
108
|
+
import"./index-r3j3458j.js";
|
|
109
|
+
import"./index-jtqkh8jf.js";
|
|
108
110
|
import"./index-5e4e2hvv.js";
|
|
109
111
|
import"./index-p0arc26j.js";
|
|
110
|
-
import"./index-jtqkh8jf.js";
|
|
111
112
|
import"./index-zgwm4ryv.js";
|
|
113
|
+
import"./index-6jng9c8t.js";
|
|
114
|
+
import"./index-1cn967sa.js";
|
|
112
115
|
import"./index-293f68mj.js";
|
|
113
|
-
import"./index-
|
|
114
|
-
import"./index-b9v501fr.js";
|
|
116
|
+
import"./index-5mkc2f9z.js";
|
|
115
117
|
import"./index-vn263hqt.js";
|
|
118
|
+
import"./index-vvk2g744.js";
|
|
119
|
+
import"./index-7xgqky26.js";
|
|
116
120
|
import"./index-a76rekgs.js";
|
|
117
121
|
// src/commands/command-names.ts
|
|
118
122
|
var COMMAND_NAMES = Object.freeze(Object.keys(COMMAND_REGISTRY));
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
require_proper_lockfile
|
|
4
|
+
} from "./index-vvk2g744.js";
|
|
5
|
+
import {
|
|
6
|
+
bunWrite
|
|
7
|
+
} from "./index-7xgqky26.js";
|
|
8
|
+
import {
|
|
9
|
+
__toESM
|
|
10
|
+
} from "./index-a76rekgs.js";
|
|
11
|
+
|
|
12
|
+
// src/scope/scope-persistence.ts
|
|
13
|
+
var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
|
|
14
|
+
import * as fs from "fs";
|
|
15
|
+
import * as path from "path";
|
|
16
|
+
var SCOPE_SCHEMA_VERSION = 1;
|
|
17
|
+
var DEFAULT_TTL_MS = 24 * 60 * 60 * 1000;
|
|
18
|
+
var LOCK_STALE_MS = 30 * 1000;
|
|
19
|
+
var SCOPES_DIR = ".swarm/scopes";
|
|
20
|
+
var MAX_FILES_PER_SCOPE = 1e4;
|
|
21
|
+
var MAX_PLAN_BYTES = 10 * 1024 * 1024;
|
|
22
|
+
var MAX_SCOPE_BYTES = 2 * 1024 * 1024;
|
|
23
|
+
var WINDOWS_RESERVED = new Set([
|
|
24
|
+
"CON",
|
|
25
|
+
"PRN",
|
|
26
|
+
"AUX",
|
|
27
|
+
"NUL",
|
|
28
|
+
"COM1",
|
|
29
|
+
"COM2",
|
|
30
|
+
"COM3",
|
|
31
|
+
"COM4",
|
|
32
|
+
"COM5",
|
|
33
|
+
"COM6",
|
|
34
|
+
"COM7",
|
|
35
|
+
"COM8",
|
|
36
|
+
"COM9",
|
|
37
|
+
"LPT1",
|
|
38
|
+
"LPT2",
|
|
39
|
+
"LPT3",
|
|
40
|
+
"LPT4",
|
|
41
|
+
"LPT5",
|
|
42
|
+
"LPT6",
|
|
43
|
+
"LPT7",
|
|
44
|
+
"LPT8",
|
|
45
|
+
"LPT9"
|
|
46
|
+
]);
|
|
47
|
+
function getScopesDir(directory) {
|
|
48
|
+
return path.join(directory, SCOPES_DIR);
|
|
49
|
+
}
|
|
50
|
+
function isSafeTaskId(taskId) {
|
|
51
|
+
if (typeof taskId !== "string")
|
|
52
|
+
return false;
|
|
53
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/.test(taskId))
|
|
54
|
+
return false;
|
|
55
|
+
const head = taskId.replace(/\.+$/, "").split(".")[0].toUpperCase();
|
|
56
|
+
if (WINDOWS_RESERVED.has(head))
|
|
57
|
+
return false;
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
function isScopesDirSafe(directory, scopesDir) {
|
|
61
|
+
try {
|
|
62
|
+
const resolvedWorkspace = fs.realpathSync(directory);
|
|
63
|
+
const resolvedScopes = fs.realpathSync(scopesDir);
|
|
64
|
+
const rel = path.relative(resolvedWorkspace, resolvedScopes);
|
|
65
|
+
return rel.length > 0 && !rel.startsWith("..") && !path.isAbsolute(rel);
|
|
66
|
+
} catch {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function getScopeFilePath(directory, taskId) {
|
|
71
|
+
if (!isSafeTaskId(taskId)) {
|
|
72
|
+
throw new Error(`Invalid taskId for scope persistence: ${taskId}`);
|
|
73
|
+
}
|
|
74
|
+
return path.join(getScopesDir(directory), `scope-${taskId}.json`);
|
|
75
|
+
}
|
|
76
|
+
async function writeScopeToDisk(directory, taskId, files, ttlMs = DEFAULT_TTL_MS) {
|
|
77
|
+
if (!isSafeTaskId(taskId))
|
|
78
|
+
return;
|
|
79
|
+
if (!Array.isArray(files) || files.length === 0)
|
|
80
|
+
return;
|
|
81
|
+
if (files.length > MAX_FILES_PER_SCOPE)
|
|
82
|
+
return;
|
|
83
|
+
const scopesDir = getScopesDir(directory);
|
|
84
|
+
const scopePath = getScopeFilePath(directory, taskId);
|
|
85
|
+
try {
|
|
86
|
+
fs.mkdirSync(scopesDir, { recursive: true });
|
|
87
|
+
} catch {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (!isScopesDirSafe(directory, scopesDir))
|
|
91
|
+
return;
|
|
92
|
+
const now = Date.now();
|
|
93
|
+
const payload = {
|
|
94
|
+
version: SCOPE_SCHEMA_VERSION,
|
|
95
|
+
taskId,
|
|
96
|
+
declaredAt: now,
|
|
97
|
+
expiresAt: now + ttlMs,
|
|
98
|
+
files: [...files]
|
|
99
|
+
};
|
|
100
|
+
const content = JSON.stringify(payload, null, 2);
|
|
101
|
+
try {
|
|
102
|
+
const flags = fs.constants.O_WRONLY | fs.constants.O_CREAT;
|
|
103
|
+
const nofollow = fs.constants.O_NOFOLLOW ?? 0;
|
|
104
|
+
const fd = fs.openSync(scopePath, flags | nofollow);
|
|
105
|
+
fs.closeSync(fd);
|
|
106
|
+
} catch {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
let release;
|
|
110
|
+
try {
|
|
111
|
+
release = await import_proper_lockfile.default.lock(scopePath, {
|
|
112
|
+
stale: LOCK_STALE_MS,
|
|
113
|
+
retries: { retries: 3, minTimeout: 50, maxTimeout: 200 },
|
|
114
|
+
realpath: false
|
|
115
|
+
});
|
|
116
|
+
await atomicWrite(scopePath, content);
|
|
117
|
+
} catch {} finally {
|
|
118
|
+
if (release) {
|
|
119
|
+
try {
|
|
120
|
+
await release();
|
|
121
|
+
} catch {}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
async function atomicWrite(targetPath, content) {
|
|
126
|
+
const tempPath = `${targetPath}.tmp.${Date.now()}.${Math.floor(Math.random() * 1e9)}`;
|
|
127
|
+
try {
|
|
128
|
+
await bunWrite(tempPath, content);
|
|
129
|
+
fs.renameSync(tempPath, targetPath);
|
|
130
|
+
} finally {
|
|
131
|
+
try {
|
|
132
|
+
fs.unlinkSync(tempPath);
|
|
133
|
+
} catch {}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function readScopeFromDisk(directory, taskId) {
|
|
137
|
+
if (!isSafeTaskId(taskId))
|
|
138
|
+
return null;
|
|
139
|
+
const scopesDir = getScopesDir(directory);
|
|
140
|
+
if (!isScopesDirSafe(directory, scopesDir))
|
|
141
|
+
return null;
|
|
142
|
+
const scopePath = getScopeFilePath(directory, taskId);
|
|
143
|
+
const nofollow = fs.constants.O_NOFOLLOW ?? 0;
|
|
144
|
+
let fd;
|
|
145
|
+
try {
|
|
146
|
+
fd = fs.openSync(scopePath, fs.constants.O_RDONLY | nofollow);
|
|
147
|
+
} catch {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
let raw;
|
|
151
|
+
try {
|
|
152
|
+
const stat = fs.fstatSync(fd);
|
|
153
|
+
if (!stat.isFile())
|
|
154
|
+
return null;
|
|
155
|
+
if (stat.size > MAX_SCOPE_BYTES)
|
|
156
|
+
return null;
|
|
157
|
+
const buf = Buffer.alloc(stat.size);
|
|
158
|
+
fs.readSync(fd, buf, 0, stat.size, 0);
|
|
159
|
+
raw = buf.toString("utf-8");
|
|
160
|
+
} catch {
|
|
161
|
+
return null;
|
|
162
|
+
} finally {
|
|
163
|
+
try {
|
|
164
|
+
fs.closeSync(fd);
|
|
165
|
+
} catch {}
|
|
166
|
+
}
|
|
167
|
+
if (!raw.trim())
|
|
168
|
+
return null;
|
|
169
|
+
let parsed;
|
|
170
|
+
try {
|
|
171
|
+
parsed = JSON.parse(raw);
|
|
172
|
+
} catch {
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
if (parsed.version !== SCOPE_SCHEMA_VERSION)
|
|
176
|
+
return null;
|
|
177
|
+
if (parsed.taskId !== taskId)
|
|
178
|
+
return null;
|
|
179
|
+
const now = Date.now();
|
|
180
|
+
if (typeof parsed.declaredAt !== "number" || parsed.declaredAt > now) {
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
if (typeof parsed.expiresAt !== "number" || now > parsed.expiresAt) {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
if (!Array.isArray(parsed.files))
|
|
187
|
+
return null;
|
|
188
|
+
if (parsed.files.length > MAX_FILES_PER_SCOPE)
|
|
189
|
+
return null;
|
|
190
|
+
const files = parsed.files.filter((f) => typeof f === "string");
|
|
191
|
+
return files.length > 0 ? files : null;
|
|
192
|
+
}
|
|
193
|
+
function readPlanScope(directory, taskId) {
|
|
194
|
+
if (!isSafeTaskId(taskId))
|
|
195
|
+
return null;
|
|
196
|
+
try {
|
|
197
|
+
const planPath = path.join(directory, ".swarm", "plan.json");
|
|
198
|
+
const stat = fs.statSync(planPath);
|
|
199
|
+
if (!stat.isFile())
|
|
200
|
+
return null;
|
|
201
|
+
if (stat.size > MAX_PLAN_BYTES)
|
|
202
|
+
return null;
|
|
203
|
+
const raw = fs.readFileSync(planPath, "utf-8");
|
|
204
|
+
const plan = JSON.parse(raw);
|
|
205
|
+
for (const phase of plan.phases ?? []) {
|
|
206
|
+
for (const task of phase.tasks ?? []) {
|
|
207
|
+
if (task.id !== taskId)
|
|
208
|
+
continue;
|
|
209
|
+
const ft = task.files_touched;
|
|
210
|
+
if (Array.isArray(ft) && ft.length > 0) {
|
|
211
|
+
if (ft.length > MAX_FILES_PER_SCOPE)
|
|
212
|
+
return null;
|
|
213
|
+
return ft.filter((f) => typeof f === "string");
|
|
214
|
+
}
|
|
215
|
+
if (typeof ft === "string" && ft.length > 0)
|
|
216
|
+
return [ft];
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return null;
|
|
221
|
+
} catch {
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function clearScopeForTask(directory, taskId) {
|
|
226
|
+
if (!isSafeTaskId(taskId))
|
|
227
|
+
return;
|
|
228
|
+
try {
|
|
229
|
+
fs.unlinkSync(getScopeFilePath(directory, taskId));
|
|
230
|
+
} catch {}
|
|
231
|
+
}
|
|
232
|
+
function clearAllScopes(directory) {
|
|
233
|
+
try {
|
|
234
|
+
fs.rmSync(getScopesDir(directory), { recursive: true, force: true });
|
|
235
|
+
} catch {}
|
|
236
|
+
}
|
|
237
|
+
function resolveScopeWithFallbacks(input) {
|
|
238
|
+
const { directory, taskId, inMemoryScope, pendingMapScope } = input;
|
|
239
|
+
if (inMemoryScope && inMemoryScope.length > 0)
|
|
240
|
+
return inMemoryScope;
|
|
241
|
+
if (taskId) {
|
|
242
|
+
const disk = readScopeFromDisk(directory, taskId);
|
|
243
|
+
if (disk && disk.length > 0)
|
|
244
|
+
return disk;
|
|
245
|
+
const plan = readPlanScope(directory, taskId);
|
|
246
|
+
if (plan && plan.length > 0)
|
|
247
|
+
return plan;
|
|
248
|
+
}
|
|
249
|
+
if (pendingMapScope && pendingMapScope.length > 0)
|
|
250
|
+
return pendingMapScope;
|
|
251
|
+
return null;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export { writeScopeToDisk, readScopeFromDisk, readPlanScope, clearScopeForTask, clearAllScopes, resolveScopeWithFallbacks };
|
package/dist/cli/index.js
CHANGED
|
@@ -7,37 +7,41 @@ import {
|
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
package_default,
|
|
9
9
|
resolveCommand
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
} from "./index-1emhz3zb.js";
|
|
11
|
+
import"./index-wj4jeavn.js";
|
|
12
|
+
import"./index-5gnp8fyw.js";
|
|
12
13
|
import"./index-c8s9a3zh.js";
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-fm7xz1ne.js";
|
|
15
|
+
import"./index-48mc4d48.js";
|
|
15
16
|
import"./index-91j1sqzm.js";
|
|
16
|
-
import"./index-
|
|
17
|
+
import"./index-yw8qpf51.js";
|
|
18
|
+
import"./index-85bacexr.js";
|
|
17
19
|
import"./index-09xpycan.js";
|
|
18
20
|
import {
|
|
19
21
|
DEFAULT_AGENT_CONFIGS
|
|
20
|
-
} from "./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-n1sptn1w.js";
|
|
22
|
+
} from "./index-h4c4rrwx.js";
|
|
23
|
+
import"./index-9qxntjtx.js";
|
|
24
|
+
import"./index-mmny81g1.js";
|
|
25
|
+
import"./index-fz1jgbvw.js";
|
|
26
|
+
import"./index-wg0665ft.js";
|
|
27
|
+
import"./index-2nt4mq9n.js";
|
|
27
28
|
import"./index-bfwt3abw.js";
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
29
|
+
import"./index-wvrj16f0.js";
|
|
30
|
+
import"./index-q1exe2b3.js";
|
|
31
|
+
import"./index-x2q0gnt8.js";
|
|
32
|
+
import"./index-f1qyj61w.js";
|
|
33
|
+
import"./index-r3j3458j.js";
|
|
34
|
+
import"./index-jtqkh8jf.js";
|
|
33
35
|
import"./index-5e4e2hvv.js";
|
|
34
36
|
import"./index-p0arc26j.js";
|
|
35
|
-
import"./index-jtqkh8jf.js";
|
|
36
37
|
import"./index-zgwm4ryv.js";
|
|
38
|
+
import"./index-6jng9c8t.js";
|
|
39
|
+
import"./index-1cn967sa.js";
|
|
37
40
|
import"./index-293f68mj.js";
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-b9v501fr.js";
|
|
41
|
+
import"./index-5mkc2f9z.js";
|
|
40
42
|
import"./index-vn263hqt.js";
|
|
43
|
+
import"./index-vvk2g744.js";
|
|
44
|
+
import"./index-7xgqky26.js";
|
|
41
45
|
import"./index-a76rekgs.js";
|
|
42
46
|
|
|
43
47
|
// src/cli/index.ts
|
|
@@ -8,17 +8,18 @@ import {
|
|
|
8
8
|
maybeEscalateOnViolation,
|
|
9
9
|
maybeQuarantineOnContradiction,
|
|
10
10
|
readRecentEscalations
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
11
|
+
} from "./index-5gnp8fyw.js";
|
|
12
|
+
import"./index-mmny81g1.js";
|
|
13
|
+
import"./index-wg0665ft.js";
|
|
14
|
+
import"./index-2nt4mq9n.js";
|
|
15
15
|
import"./index-bfwt3abw.js";
|
|
16
|
-
import"./index-9b7qp18e.js";
|
|
17
16
|
import"./index-jtqkh8jf.js";
|
|
18
17
|
import"./index-zgwm4ryv.js";
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
18
|
+
import"./index-1cn967sa.js";
|
|
19
|
+
import"./index-5mkc2f9z.js";
|
|
21
20
|
import"./index-vn263hqt.js";
|
|
21
|
+
import"./index-vvk2g744.js";
|
|
22
|
+
import"./index-7xgqky26.js";
|
|
22
23
|
import"./index-a76rekgs.js";
|
|
23
24
|
export {
|
|
24
25
|
readRecentEscalations,
|
|
@@ -25,13 +25,14 @@ import {
|
|
|
25
25
|
resolveKnowledgeCounterBaselinePath,
|
|
26
26
|
resolveKnowledgeEventsPath,
|
|
27
27
|
resolveLegacyApplicationLogPath
|
|
28
|
-
} from "./index-
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-9b7qp18e.js";
|
|
28
|
+
} from "./index-mmny81g1.js";
|
|
29
|
+
import"./index-2nt4mq9n.js";
|
|
31
30
|
import"./index-zgwm4ryv.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
31
|
+
import"./index-1cn967sa.js";
|
|
32
|
+
import"./index-5mkc2f9z.js";
|
|
34
33
|
import"./index-vn263hqt.js";
|
|
34
|
+
import"./index-vvk2g744.js";
|
|
35
|
+
import"./index-7xgqky26.js";
|
|
35
36
|
import"./index-a76rekgs.js";
|
|
36
37
|
export {
|
|
37
38
|
resolveLegacyApplicationLogPath,
|
|
@@ -32,14 +32,15 @@ import {
|
|
|
32
32
|
transactFile,
|
|
33
33
|
transactKnowledge,
|
|
34
34
|
wordBigrams
|
|
35
|
-
} from "./index-
|
|
36
|
-
import"./index-
|
|
35
|
+
} from "./index-wg0665ft.js";
|
|
36
|
+
import"./index-2nt4mq9n.js";
|
|
37
37
|
import"./index-bfwt3abw.js";
|
|
38
|
-
import"./index-9b7qp18e.js";
|
|
39
38
|
import"./index-jtqkh8jf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
39
|
+
import"./index-1cn967sa.js";
|
|
40
|
+
import"./index-5mkc2f9z.js";
|
|
42
41
|
import"./index-vn263hqt.js";
|
|
42
|
+
import"./index-vvk2g744.js";
|
|
43
|
+
import"./index-7xgqky26.js";
|
|
43
44
|
import"./index-a76rekgs.js";
|
|
44
45
|
export {
|
|
45
46
|
wordBigrams,
|
|
@@ -21,16 +21,17 @@ import {
|
|
|
21
21
|
validateLesson,
|
|
22
22
|
validateSkillCandidatePath,
|
|
23
23
|
validateSkillPath
|
|
24
|
-
} from "./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
24
|
+
} from "./index-fz1jgbvw.js";
|
|
25
|
+
import"./index-wg0665ft.js";
|
|
26
|
+
import"./index-2nt4mq9n.js";
|
|
27
27
|
import"./index-bfwt3abw.js";
|
|
28
|
-
import"./index-9b7qp18e.js";
|
|
29
28
|
import"./index-jtqkh8jf.js";
|
|
30
29
|
import"./index-zgwm4ryv.js";
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
30
|
+
import"./index-1cn967sa.js";
|
|
31
|
+
import"./index-5mkc2f9z.js";
|
|
33
32
|
import"./index-vn263hqt.js";
|
|
33
|
+
import"./index-vvk2g744.js";
|
|
34
|
+
import"./index-7xgqky26.js";
|
|
34
35
|
import"./index-a76rekgs.js";
|
|
35
36
|
export {
|
|
36
37
|
validateSkillPath,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-r3j3458j.js";
|
|
5
|
+
import"./index-jtqkh8jf.js";
|
|
5
6
|
import"./index-5e4e2hvv.js";
|
|
6
7
|
import"./index-p0arc26j.js";
|
|
7
|
-
import"./index-jtqkh8jf.js";
|
|
8
8
|
import {
|
|
9
9
|
init_logger,
|
|
10
10
|
warn
|
|
@@ -14,9 +14,10 @@ import {
|
|
|
14
14
|
} from "./index-293f68mj.js";
|
|
15
15
|
import {
|
|
16
16
|
withEvidenceLock
|
|
17
|
-
} from "./index-
|
|
18
|
-
import"./index-b9v501fr.js";
|
|
17
|
+
} from "./index-5mkc2f9z.js";
|
|
19
18
|
import"./index-vn263hqt.js";
|
|
19
|
+
import"./index-vvk2g744.js";
|
|
20
|
+
import"./index-7xgqky26.js";
|
|
20
21
|
import"./index-a76rekgs.js";
|
|
21
22
|
|
|
22
23
|
// src/background/pending-delegations.ts
|
|
@@ -9,16 +9,17 @@ import {
|
|
|
9
9
|
sweepStale,
|
|
10
10
|
unsubscribe,
|
|
11
11
|
updateSnapshot
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
} from "./index-85bacexr.js";
|
|
13
|
+
import"./index-r3j3458j.js";
|
|
14
|
+
import"./index-jtqkh8jf.js";
|
|
14
15
|
import"./index-5e4e2hvv.js";
|
|
15
16
|
import"./index-p0arc26j.js";
|
|
16
|
-
import"./index-jtqkh8jf.js";
|
|
17
17
|
import"./index-zgwm4ryv.js";
|
|
18
18
|
import"./index-293f68mj.js";
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-b9v501fr.js";
|
|
19
|
+
import"./index-5mkc2f9z.js";
|
|
21
20
|
import"./index-vn263hqt.js";
|
|
21
|
+
import"./index-vvk2g744.js";
|
|
22
|
+
import"./index-7xgqky26.js";
|
|
22
23
|
import"./index-a76rekgs.js";
|
|
23
24
|
export {
|
|
24
25
|
updateSnapshot,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
clearAllScopes,
|
|
4
|
+
clearScopeForTask,
|
|
5
|
+
readPlanScope,
|
|
6
|
+
readScopeFromDisk,
|
|
7
|
+
resolveScopeWithFallbacks,
|
|
8
|
+
writeScopeToDisk
|
|
9
|
+
} from "./index-x2q0gnt8.js";
|
|
10
|
+
import"./index-vvk2g744.js";
|
|
11
|
+
import"./index-7xgqky26.js";
|
|
12
|
+
import"./index-a76rekgs.js";
|
|
13
|
+
export {
|
|
14
|
+
writeScopeToDisk,
|
|
15
|
+
resolveScopeWithFallbacks,
|
|
16
|
+
readScopeFromDisk,
|
|
17
|
+
readPlanScope,
|
|
18
|
+
clearScopeForTask,
|
|
19
|
+
clearAllScopes
|
|
20
|
+
};
|
|
@@ -27,18 +27,19 @@ import {
|
|
|
27
27
|
retireSkill,
|
|
28
28
|
sanitizeSlug,
|
|
29
29
|
selectCandidateEntries
|
|
30
|
-
} from "./index-
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
30
|
+
} from "./index-9qxntjtx.js";
|
|
31
|
+
import"./index-mmny81g1.js";
|
|
32
|
+
import"./index-fz1jgbvw.js";
|
|
33
|
+
import"./index-wg0665ft.js";
|
|
34
|
+
import"./index-2nt4mq9n.js";
|
|
35
35
|
import"./index-bfwt3abw.js";
|
|
36
|
-
import"./index-9b7qp18e.js";
|
|
37
36
|
import"./index-jtqkh8jf.js";
|
|
38
37
|
import"./index-zgwm4ryv.js";
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
38
|
+
import"./index-1cn967sa.js";
|
|
39
|
+
import"./index-5mkc2f9z.js";
|
|
41
40
|
import"./index-vn263hqt.js";
|
|
41
|
+
import"./index-vvk2g744.js";
|
|
42
|
+
import"./index-7xgqky26.js";
|
|
42
43
|
import"./index-a76rekgs.js";
|
|
43
44
|
export {
|
|
44
45
|
selectCandidateEntries,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as child_process from 'node:child_process';
|
|
2
2
|
export declare const MAX_URL_LEN = 2048;
|
|
3
3
|
export type ValidationResult = {
|
|
4
4
|
sanitized: string;
|
|
@@ -7,9 +7,17 @@ export type ValidationResult = {
|
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* File-scoped indirection seam for git remote lookups.
|
|
10
|
+
* Supports envOverrides so lane runtime profiles can inject env.
|
|
10
11
|
*/
|
|
11
12
|
export declare const _internals: {
|
|
12
|
-
spawnSync:
|
|
13
|
+
spawnSync: (cmd: string, args: string[], options?: {
|
|
14
|
+
cwd?: string;
|
|
15
|
+
encoding?: BufferEncoding;
|
|
16
|
+
timeout?: number;
|
|
17
|
+
env?: Record<string, string | undefined>;
|
|
18
|
+
envOverrides?: Record<string, string | null>;
|
|
19
|
+
stdio?: "pipe" | "ignore" | "inherit" | Array<"pipe" | "ignore" | "inherit">;
|
|
20
|
+
}) => child_process.SpawnSyncReturns<string | NonSharedBuffer>;
|
|
13
21
|
};
|
|
14
22
|
/**
|
|
15
23
|
* Strip query strings, fragments, injected MODE headers, and credentials from
|
|
@@ -32,8 +40,10 @@ export declare function isPrivateHost(url: URL): boolean;
|
|
|
32
40
|
export declare function validateAndSanitizeGithubUrl(rawUrl: string, resource: 'issues' | 'pull'): ValidationResult;
|
|
33
41
|
/**
|
|
34
42
|
* Detect the `origin` remote URL from git config.
|
|
43
|
+
* @param cwd - Optional working directory
|
|
44
|
+
* @param laneEnv - Optional lane env overrides for git spawn
|
|
35
45
|
*/
|
|
36
|
-
export declare function detectGitRemote(cwd?: string): string | null;
|
|
46
|
+
export declare function detectGitRemote(cwd?: string, laneEnv?: Record<string, string>): string | null;
|
|
37
47
|
/**
|
|
38
48
|
* Parse owner/repo from a git remote URL.
|
|
39
49
|
*/
|
package/dist/commands/close.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as child_process from 'node:child_process';
|
|
1
2
|
import { loadPluginConfigWithMeta } from '../config';
|
|
2
3
|
import { type KnowledgeConfig, type PluginConfig } from '../config/schema';
|
|
3
4
|
import { archiveEvidence } from '../evidence/manager';
|
|
@@ -200,5 +201,15 @@ export declare const _internals: {
|
|
|
200
201
|
archiveEvidence: typeof archiveEvidence;
|
|
201
202
|
closePlanTerminalState: typeof closePlanTerminalState;
|
|
202
203
|
endAgentSession: typeof endAgentSession;
|
|
204
|
+
spawnSync: (cmd: string, args: string[], options?: {
|
|
205
|
+
cwd?: string;
|
|
206
|
+
encoding?: BufferEncoding;
|
|
207
|
+
timeout?: number;
|
|
208
|
+
maxBuffer?: number;
|
|
209
|
+
windowsHide?: boolean;
|
|
210
|
+
stdio?: "pipe" | "ignore" | "inherit" | Array<"pipe" | "ignore" | "inherit">;
|
|
211
|
+
env?: Record<string, string | undefined>;
|
|
212
|
+
envOverrides?: Record<string, string | null>;
|
|
213
|
+
}) => child_process.SpawnSyncReturns<string | NonSharedBuffer>;
|
|
203
214
|
};
|
|
204
215
|
export {};
|