opencode-swarm 7.107.6 → 7.109.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/clarify-spec/SKILL.md +15 -9
- package/.opencode/skills/critic-gate/SKILL.md +10 -4
- package/.opencode/skills/phase-wrap/SKILL.md +2 -2
- package/.opencode/skills/plan/SKILL.md +23 -11
- package/.opencode/skills/specify/SKILL.md +27 -9
- 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-jpwvkpdv.js → curator-3efwdf9x.js} +25 -21
- package/dist/cli/{curator-drift-ed7p5mfy.js → curator-drift-169wgaxn.js} +4 -4
- package/dist/cli/curator-llm-factory-nttpcx4b.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-j7jwf20f.js} +10 -8
- package/dist/cli/{gate-evidence-pgr7d942.js → gate-evidence-v6ds8rcp.js} +5 -4
- package/dist/cli/guardrail-explain-e85gbj0r.js +41 -0
- package/dist/cli/{guardrail-log-fjypsmek.js → guardrail-log-8mqqsssq.js} +4 -4
- package/dist/cli/hive-promoter-rc6z2x8f.js +48 -0
- package/dist/cli/{index-9b7qp18e.js → index-1cn967sa.js} +2 -2
- package/dist/cli/{index-h28wfp7n.js → index-1mjzvkzj.js} +29 -25
- package/dist/cli/{index-n1sptn1w.js → index-2nt4mq9n.js} +1 -1
- package/dist/cli/{index-57rthc1z.js → index-3e7jajwe.js} +2 -2
- 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-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-91j1sqzm.js → index-scww5b77.js} +47 -0
- package/dist/cli/{index-572t1qff.js → index-vb5t1kvs.js} +1477 -2045
- 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-6h82c2h0.js → index-wfq4r95s.js} +1057 -193
- 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-x2q0gnt8.js +254 -0
- package/dist/cli/{index-xg18az81.js → index-yw8qpf51.js} +1 -1
- package/dist/cli/index.js +25 -21
- 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 +9 -2
- package/dist/commands/sdd.d.ts +10 -0
- package/dist/config/schema.d.ts +102 -0
- 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 +452 -436
- 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/sdd/effective-spec.d.ts +21 -0
- 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 +1 -1
- package/dist/cli/curator-llm-factory-9y15npd5.js +0 -36
- package/dist/cli/guardrail-explain-jk0amzae.js +0 -37
- package/dist/cli/hive-promoter-j2krbdn9.js +0 -44
|
@@ -5,8 +5,7 @@ import {
|
|
|
5
5
|
} from "./index-zgwm4ryv.js";
|
|
6
6
|
import {
|
|
7
7
|
__esm,
|
|
8
|
-
__export
|
|
9
|
-
__toCommonJS
|
|
8
|
+
__export
|
|
10
9
|
} from "./index-a76rekgs.js";
|
|
11
10
|
|
|
12
11
|
// src/sandbox/win32/runner-client.ts
|
|
@@ -254,199 +253,4 @@ var init_runner_client = __esm(() => {
|
|
|
254
253
|
};
|
|
255
254
|
});
|
|
256
255
|
|
|
257
|
-
|
|
258
|
-
import { execFile, spawnSync as spawnSync2 } from "child_process";
|
|
259
|
-
import * as os2 from "os";
|
|
260
|
-
function withProbeTimeout(cmd, args, ms) {
|
|
261
|
-
return new Promise((resolve2, reject) => {
|
|
262
|
-
const controller = new AbortController;
|
|
263
|
-
const timer = setTimeout(() => {
|
|
264
|
-
controller.abort();
|
|
265
|
-
proc?.kill();
|
|
266
|
-
}, ms);
|
|
267
|
-
const unref = timer.unref;
|
|
268
|
-
if (typeof unref === "function") {
|
|
269
|
-
unref.call(timer);
|
|
270
|
-
}
|
|
271
|
-
let proc;
|
|
272
|
-
try {
|
|
273
|
-
proc = execFile(cmd, args, {
|
|
274
|
-
signal: controller.signal,
|
|
275
|
-
timeout: ms,
|
|
276
|
-
windowsHide: true,
|
|
277
|
-
cwd: os2.tmpdir()
|
|
278
|
-
}, (error, stdout, _stderr) => {
|
|
279
|
-
clearTimeout(timer);
|
|
280
|
-
if (error) {
|
|
281
|
-
const exc = error;
|
|
282
|
-
if (exc.code === "ENOENT" || exc.code === "ENOTFOUND") {
|
|
283
|
-
reject(new Error("binary not found"));
|
|
284
|
-
} else {
|
|
285
|
-
reject(error);
|
|
286
|
-
}
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
resolve2(stdout?.trim() ?? "");
|
|
290
|
-
});
|
|
291
|
-
} catch (spawnError) {
|
|
292
|
-
clearTimeout(timer);
|
|
293
|
-
reject(spawnError);
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
async function probeLinux() {
|
|
298
|
-
try {
|
|
299
|
-
const output = await withProbeTimeout("bwrap", ["--version"], 2000);
|
|
300
|
-
if (output.length > 0) {
|
|
301
|
-
return {
|
|
302
|
-
status: "enabled",
|
|
303
|
-
mechanism: "Bubblewrap",
|
|
304
|
-
platform: "linux"
|
|
305
|
-
};
|
|
306
|
-
}
|
|
307
|
-
return {
|
|
308
|
-
status: "disabled",
|
|
309
|
-
mechanism: "Bubblewrap",
|
|
310
|
-
platform: "linux",
|
|
311
|
-
error: "binary returned empty version"
|
|
312
|
-
};
|
|
313
|
-
} catch (err) {
|
|
314
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
315
|
-
if (msg === "binary not found") {
|
|
316
|
-
return {
|
|
317
|
-
status: "unsupported",
|
|
318
|
-
mechanism: "Bubblewrap",
|
|
319
|
-
platform: "linux",
|
|
320
|
-
error: msg
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
return {
|
|
324
|
-
status: "disabled",
|
|
325
|
-
mechanism: "Bubblewrap",
|
|
326
|
-
platform: "linux",
|
|
327
|
-
error: msg
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
async function probeMacOS() {
|
|
332
|
-
try {
|
|
333
|
-
const output = await withProbeTimeout("sandbox-exec", ["--version"], 2000);
|
|
334
|
-
if (output.length > 0) {
|
|
335
|
-
return {
|
|
336
|
-
status: "enabled",
|
|
337
|
-
mechanism: "sandbox-exec",
|
|
338
|
-
platform: "darwin"
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
return {
|
|
342
|
-
status: "disabled",
|
|
343
|
-
mechanism: "sandbox-exec",
|
|
344
|
-
platform: "darwin",
|
|
345
|
-
error: "binary returned empty version"
|
|
346
|
-
};
|
|
347
|
-
} catch (err) {
|
|
348
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
349
|
-
if (msg === "binary not found") {
|
|
350
|
-
return {
|
|
351
|
-
status: "unsupported",
|
|
352
|
-
mechanism: "sandbox-exec",
|
|
353
|
-
platform: "darwin",
|
|
354
|
-
error: msg
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
return {
|
|
358
|
-
status: "disabled",
|
|
359
|
-
mechanism: "sandbox-exec",
|
|
360
|
-
platform: "darwin",
|
|
361
|
-
error: msg
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
function probeWindows() {
|
|
366
|
-
try {
|
|
367
|
-
const { probe: runnerProbe } = (init_runner_client(), __toCommonJS(exports_runner_client));
|
|
368
|
-
const result = runnerProbe();
|
|
369
|
-
if (result.available) {
|
|
370
|
-
return {
|
|
371
|
-
status: "enabled",
|
|
372
|
-
platform: "win32",
|
|
373
|
-
mechanism: `native-runner/${result.mode}`
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
} catch {}
|
|
377
|
-
try {
|
|
378
|
-
const result = spawnSync2("cmd", ["/c", "echo", "ok"], {
|
|
379
|
-
windowsHide: true,
|
|
380
|
-
encoding: "utf-8",
|
|
381
|
-
timeout: 5000,
|
|
382
|
-
stdio: ["ignore", "pipe", "ignore"]
|
|
383
|
-
});
|
|
384
|
-
if (result.error) {
|
|
385
|
-
return {
|
|
386
|
-
status: "disabled",
|
|
387
|
-
platform: "win32",
|
|
388
|
-
mechanism: "PowerShell wrapper",
|
|
389
|
-
error: `cmd.exe probe failed: ${result.error.code}`
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
return result.status === 0 ? {
|
|
393
|
-
status: "enabled",
|
|
394
|
-
platform: "win32",
|
|
395
|
-
mechanism: "PowerShell wrapper"
|
|
396
|
-
} : {
|
|
397
|
-
status: "disabled",
|
|
398
|
-
platform: "win32",
|
|
399
|
-
mechanism: "PowerShell wrapper",
|
|
400
|
-
error: "cmd.exe probe returned non-zero"
|
|
401
|
-
};
|
|
402
|
-
} catch (err) {
|
|
403
|
-
return {
|
|
404
|
-
status: "disabled",
|
|
405
|
-
platform: "win32",
|
|
406
|
-
mechanism: "PowerShell wrapper",
|
|
407
|
-
error: String(err)
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
function isBubblewrapAvailable() {
|
|
412
|
-
return _cached?.status === "enabled" && _cached?.platform === "linux";
|
|
413
|
-
}
|
|
414
|
-
function isSandboxExecAvailable() {
|
|
415
|
-
return _cached?.status === "enabled" && _cached?.platform === "darwin";
|
|
416
|
-
}
|
|
417
|
-
function isWindowsSandboxAvailable() {
|
|
418
|
-
return _cached?.status === "enabled" && _cached?.platform === "win32";
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
class SandboxCapabilityProbe {
|
|
422
|
-
async detect() {
|
|
423
|
-
if (_cached !== undefined) {
|
|
424
|
-
return _cached;
|
|
425
|
-
}
|
|
426
|
-
const platform = process.platform;
|
|
427
|
-
switch (platform) {
|
|
428
|
-
case "linux":
|
|
429
|
-
_cached = await probeLinux();
|
|
430
|
-
break;
|
|
431
|
-
case "darwin":
|
|
432
|
-
_cached = await probeMacOS();
|
|
433
|
-
break;
|
|
434
|
-
case "win32":
|
|
435
|
-
_cached = probeWindows();
|
|
436
|
-
break;
|
|
437
|
-
default: {
|
|
438
|
-
_cached = {
|
|
439
|
-
status: "unsupported",
|
|
440
|
-
mechanism: "unknown",
|
|
441
|
-
platform,
|
|
442
|
-
error: `unsupported platform: ${platform}`
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
return _cached;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
var _cached;
|
|
450
|
-
var init_capability_probe = () => {};
|
|
451
|
-
|
|
452
|
-
export { _internals, probe, execute, buildDefaultPolicy, init_runner_client, isBubblewrapAvailable, isSandboxExecAvailable, isWindowsSandboxAvailable, SandboxCapabilityProbe, init_capability_probe };
|
|
256
|
+
export { _internals, probe, execute, buildDefaultPolicy, exports_runner_client, init_runner_client };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
SwarmError
|
|
4
|
-
} from "./index-5e4e2hvv.js";
|
|
5
2
|
import {
|
|
6
3
|
readCachedTextFile
|
|
7
4
|
} from "./index-jtqkh8jf.js";
|
|
5
|
+
import {
|
|
6
|
+
SwarmError
|
|
7
|
+
} from "./index-5e4e2hvv.js";
|
|
8
8
|
import {
|
|
9
9
|
warn
|
|
10
10
|
} from "./index-zgwm4ryv.js";
|
|
11
11
|
import {
|
|
12
12
|
bunFile
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-7xgqky26.js";
|
|
14
14
|
|
|
15
15
|
// src/hooks/utils.ts
|
|
16
16
|
import * as fs from "fs";
|
|
@@ -291,6 +291,32 @@ function renderRequirement(req, used, warnings, reserved) {
|
|
|
291
291
|
}
|
|
292
292
|
return `- ${text} _(source: ${req.sourceRel})_`;
|
|
293
293
|
}
|
|
294
|
+
function sanitizeFeatureLabel(label) {
|
|
295
|
+
let out = "";
|
|
296
|
+
for (const ch of label) {
|
|
297
|
+
const code = ch.codePointAt(0) ?? 0;
|
|
298
|
+
out += ch === "[" || ch === "]" || ch === "`" || code < 32 || code === 127 ? "-" : ch;
|
|
299
|
+
}
|
|
300
|
+
return out;
|
|
301
|
+
}
|
|
302
|
+
function renderSuccessCriteriaScaffold(featureLabel, usedIds) {
|
|
303
|
+
let scId;
|
|
304
|
+
for (let n = 1;n <= 999; n++) {
|
|
305
|
+
const candidate = `SC-${String(n).padStart(3, "0")}`;
|
|
306
|
+
if (!usedIds.has(candidate)) {
|
|
307
|
+
scId = candidate;
|
|
308
|
+
usedIds.add(candidate);
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
const resolvedId = scId ?? "SC-PLACEHOLDER";
|
|
313
|
+
const safeLabel = sanitizeFeatureLabel(featureLabel);
|
|
314
|
+
return [
|
|
315
|
+
"",
|
|
316
|
+
"## Success Criteria",
|
|
317
|
+
`### ${resolvedId}: [NEEDS CLARIFICATION \u2014 define success criterion for ${safeLabel}]`
|
|
318
|
+
];
|
|
319
|
+
}
|
|
294
320
|
function detectSpeckit(directory) {
|
|
295
321
|
const root = path.resolve(directory);
|
|
296
322
|
const markerPath = path.join(root, SPECKIT_MARKER);
|
|
@@ -437,6 +463,7 @@ function resolveSpeckitProjection(directory, options = {}) {
|
|
|
437
463
|
for (const req of requirements) {
|
|
438
464
|
lines.push(renderRequirement(req, usedIds, warnings, reservedIds));
|
|
439
465
|
}
|
|
466
|
+
lines.push(...renderSuccessCriteriaScaffold(selectedFeature.featureId, usedIds));
|
|
440
467
|
const projected = `${lines.join(`
|
|
441
468
|
`)}
|
|
442
469
|
`;
|
|
@@ -578,6 +605,10 @@ function buildOpenSpecProjectionSync(directory, options = {}) {
|
|
|
578
605
|
for (const req of reqs) {
|
|
579
606
|
lines.push(renderRequirement(req, usedIds, warnings));
|
|
580
607
|
}
|
|
608
|
+
lines.push(...renderSuccessCriteriaScaffold(changeId, usedIds));
|
|
609
|
+
}
|
|
610
|
+
if (currentRequirements.length > 0) {
|
|
611
|
+
lines.push(...renderSuccessCriteriaScaffold("current-requirements", usedIds));
|
|
581
612
|
}
|
|
582
613
|
const content = `${lines.join(`
|
|
583
614
|
`)}
|
|
@@ -658,6 +689,22 @@ function writeProjectedSpecSync(directory, options = {}) {
|
|
|
658
689
|
return { written: false, projection, path: target };
|
|
659
690
|
}
|
|
660
691
|
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
692
|
+
if (!options.overwrite) {
|
|
693
|
+
try {
|
|
694
|
+
fs.writeFileSync(target, projection.content, { flag: "wx" });
|
|
695
|
+
} catch (err) {
|
|
696
|
+
if (err.code === "EEXIST") {
|
|
697
|
+
return {
|
|
698
|
+
written: false,
|
|
699
|
+
projection,
|
|
700
|
+
path: target,
|
|
701
|
+
error: ".swarm/spec.md already exists; pass --overwrite to replace it"
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
throw err;
|
|
705
|
+
}
|
|
706
|
+
return { written: true, projection, path: target };
|
|
707
|
+
}
|
|
661
708
|
let archivePath;
|
|
662
709
|
if (fs.existsSync(target)) {
|
|
663
710
|
const prior = fs.readFileSync(target, "utf-8");
|