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
|
@@ -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 {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* /swarm lanes command — lists active, awaiting-merge, and conflicted worktree lanes.
|
|
3
|
+
*
|
|
4
|
+
* FR-105: SC-114, SC-115, SC-116, SC-117
|
|
5
|
+
*/
|
|
6
|
+
import { type WorktreeMergeFailure } from '../hooks/delegation-gate/worktree-merge-status';
|
|
7
|
+
/**
|
|
8
|
+
* Lane record shape for machine-parseable output (--json).
|
|
9
|
+
*/
|
|
10
|
+
export interface LaneRecord {
|
|
11
|
+
state: 'active' | 'awaiting-merge' | 'conflicted';
|
|
12
|
+
laneId: string;
|
|
13
|
+
branch: string;
|
|
14
|
+
worktreePath: string;
|
|
15
|
+
taskId: string;
|
|
16
|
+
planTaskId?: string;
|
|
17
|
+
parentSessionID: string;
|
|
18
|
+
mergeStrategy: 'merge' | 'rebase' | 'cherry-pick';
|
|
19
|
+
mergeOutcome?: WorktreeMergeFailure;
|
|
20
|
+
recoveryHint: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Handle the `/swarm lanes` command.
|
|
24
|
+
*
|
|
25
|
+
* Reads authoritative in-flight state from `standardWorktreeByCallID` and
|
|
26
|
+
* merge failure records from `worktree-merge-status.ts`. Produces two
|
|
27
|
+
* output formats controlled by the `--json` flag:
|
|
28
|
+
*
|
|
29
|
+
* - Human-readable (default): grouped by state with one-line summaries.
|
|
30
|
+
* - Machine-parseable (--json): stable-order array of `LaneRecord` objects.
|
|
31
|
+
*
|
|
32
|
+
* @param directory - Project root directory (used to init the durable status path)
|
|
33
|
+
* @param args - Command arguments; `--json` selects machine-parseable output
|
|
34
|
+
*/
|
|
35
|
+
export declare function handleLanesCommand(directory: string, args: string[]): string;
|
|
@@ -190,6 +190,13 @@ export declare const COMMAND_REGISTRY: {
|
|
|
190
190
|
readonly toolPolicy: "agent";
|
|
191
191
|
readonly toolNoArgs: true;
|
|
192
192
|
};
|
|
193
|
+
readonly lanes: {
|
|
194
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
195
|
+
readonly description: "List active, awaiting-merge, and conflicted worktree lanes";
|
|
196
|
+
readonly category: "diagnostics";
|
|
197
|
+
readonly toolPolicy: "agent";
|
|
198
|
+
readonly toolNoArgs: true;
|
|
199
|
+
};
|
|
193
200
|
readonly 'sync-plan': {
|
|
194
201
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
195
202
|
readonly description: "Ensure plan.json and plan.md are synced";
|
|
@@ -415,9 +422,9 @@ export declare const COMMAND_REGISTRY: {
|
|
|
415
422
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
416
423
|
readonly description: "Materialize the OpenSpec-compatible effective spec into .swarm/spec.md";
|
|
417
424
|
readonly subcommandOf: "sdd";
|
|
418
|
-
readonly args: "[--dry-run] [--json] [--change <id>]";
|
|
425
|
+
readonly args: "[--dry-run] [--overwrite] [--json] [--change <id>]";
|
|
419
426
|
readonly category: "utility";
|
|
420
|
-
readonly toolPolicy: "
|
|
427
|
+
readonly toolPolicy: "agent";
|
|
421
428
|
};
|
|
422
429
|
readonly 'sdd-status': {
|
|
423
430
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
package/dist/commands/sdd.d.ts
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
|
+
import { writeProjectedSpecSync } from '../sdd/effective-spec';
|
|
2
|
+
/**
|
|
3
|
+
* DI seam for testing TOCTOU error propagation without filesystem races.
|
|
4
|
+
* Tests override `_internals.writeProjectedSpecSync` to inject an error result,
|
|
5
|
+
* then restore the original in `afterEach`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const _internals: {
|
|
8
|
+
writeProjectedSpecSync: typeof writeProjectedSpecSync;
|
|
9
|
+
};
|
|
1
10
|
interface ParsedSddArgs {
|
|
2
11
|
json: boolean;
|
|
3
12
|
dryRun: boolean;
|
|
13
|
+
overwrite: boolean;
|
|
4
14
|
changeId?: string;
|
|
5
15
|
source?: 'swarm' | 'openspec' | 'speckit';
|
|
6
16
|
feature?: string;
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -1067,6 +1067,15 @@ export declare const WorktreeIsolationConfigSchema: z.ZodObject<{
|
|
|
1067
1067
|
skip: "skip";
|
|
1068
1068
|
copy: "copy";
|
|
1069
1069
|
}>>;
|
|
1070
|
+
serialization_release_after_dispatches: z.ZodDefault<z.ZodNumber>;
|
|
1071
|
+
serialization_release_after_ms: z.ZodDefault<z.ZodNumber>;
|
|
1072
|
+
runtime_isolation: z.ZodOptional<z.ZodObject<{
|
|
1073
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1074
|
+
port_base: z.ZodOptional<z.ZodNumber>;
|
|
1075
|
+
port_stride: z.ZodDefault<z.ZodNumber>;
|
|
1076
|
+
env_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1077
|
+
cache_redirects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1078
|
+
}, z.core.$strip>>;
|
|
1070
1079
|
}, z.core.$strip>;
|
|
1071
1080
|
export type WorktreeIsolationConfig = z.infer<typeof WorktreeIsolationConfigSchema>;
|
|
1072
1081
|
export declare const LeanTurboConfigSchema: z.ZodObject<{
|
|
@@ -1088,6 +1097,18 @@ export declare const LeanTurboConfigSchema: z.ZodObject<{
|
|
|
1088
1097
|
"cherry-pick": "cherry-pick";
|
|
1089
1098
|
}>>>;
|
|
1090
1099
|
worktree_dir: z.ZodOptional<z.ZodString>;
|
|
1100
|
+
deps_strategy: z.ZodOptional<z.ZodEnum<{
|
|
1101
|
+
link: "link";
|
|
1102
|
+
skip: "skip";
|
|
1103
|
+
copy: "copy";
|
|
1104
|
+
}>>;
|
|
1105
|
+
runtime_isolation: z.ZodOptional<z.ZodObject<{
|
|
1106
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1107
|
+
port_base: z.ZodOptional<z.ZodNumber>;
|
|
1108
|
+
port_stride: z.ZodDefault<z.ZodNumber>;
|
|
1109
|
+
env_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1110
|
+
cache_redirects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1111
|
+
}, z.core.$strip>>;
|
|
1091
1112
|
}, z.core.$strip>;
|
|
1092
1113
|
export type LeanTurboConfig = z.infer<typeof LeanTurboConfigSchema>;
|
|
1093
1114
|
/**
|
|
@@ -1142,6 +1163,18 @@ export declare const StandardTurboConfigSchema: z.ZodObject<{
|
|
|
1142
1163
|
"cherry-pick": "cherry-pick";
|
|
1143
1164
|
}>>>;
|
|
1144
1165
|
worktree_dir: z.ZodOptional<z.ZodString>;
|
|
1166
|
+
deps_strategy: z.ZodOptional<z.ZodEnum<{
|
|
1167
|
+
link: "link";
|
|
1168
|
+
skip: "skip";
|
|
1169
|
+
copy: "copy";
|
|
1170
|
+
}>>;
|
|
1171
|
+
runtime_isolation: z.ZodOptional<z.ZodObject<{
|
|
1172
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1173
|
+
port_base: z.ZodOptional<z.ZodNumber>;
|
|
1174
|
+
port_stride: z.ZodDefault<z.ZodNumber>;
|
|
1175
|
+
env_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1176
|
+
cache_redirects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1177
|
+
}, z.core.$strip>>;
|
|
1145
1178
|
}, z.core.$strip>>;
|
|
1146
1179
|
epic: z.ZodOptional<z.ZodObject<{
|
|
1147
1180
|
cochange: z.ZodOptional<z.ZodObject<{
|
|
@@ -1184,6 +1217,18 @@ export declare const LeanTurboStrategyConfigSchema: z.ZodObject<{
|
|
|
1184
1217
|
"cherry-pick": "cherry-pick";
|
|
1185
1218
|
}>>>;
|
|
1186
1219
|
worktree_dir: z.ZodOptional<z.ZodString>;
|
|
1220
|
+
deps_strategy: z.ZodOptional<z.ZodEnum<{
|
|
1221
|
+
link: "link";
|
|
1222
|
+
skip: "skip";
|
|
1223
|
+
copy: "copy";
|
|
1224
|
+
}>>;
|
|
1225
|
+
runtime_isolation: z.ZodOptional<z.ZodObject<{
|
|
1226
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1227
|
+
port_base: z.ZodOptional<z.ZodNumber>;
|
|
1228
|
+
port_stride: z.ZodDefault<z.ZodNumber>;
|
|
1229
|
+
env_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1230
|
+
cache_redirects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1231
|
+
}, z.core.$strip>>;
|
|
1187
1232
|
}, z.core.$strip>;
|
|
1188
1233
|
epic: z.ZodOptional<z.ZodObject<{
|
|
1189
1234
|
cochange: z.ZodOptional<z.ZodObject<{
|
|
@@ -1226,6 +1271,18 @@ export declare const TurboConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1226
1271
|
"cherry-pick": "cherry-pick";
|
|
1227
1272
|
}>>>;
|
|
1228
1273
|
worktree_dir: z.ZodOptional<z.ZodString>;
|
|
1274
|
+
deps_strategy: z.ZodOptional<z.ZodEnum<{
|
|
1275
|
+
link: "link";
|
|
1276
|
+
skip: "skip";
|
|
1277
|
+
copy: "copy";
|
|
1278
|
+
}>>;
|
|
1279
|
+
runtime_isolation: z.ZodOptional<z.ZodObject<{
|
|
1280
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1281
|
+
port_base: z.ZodOptional<z.ZodNumber>;
|
|
1282
|
+
port_stride: z.ZodDefault<z.ZodNumber>;
|
|
1283
|
+
env_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1284
|
+
cache_redirects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1285
|
+
}, z.core.$strip>>;
|
|
1229
1286
|
}, z.core.$strip>>;
|
|
1230
1287
|
epic: z.ZodOptional<z.ZodObject<{
|
|
1231
1288
|
cochange: z.ZodOptional<z.ZodObject<{
|
|
@@ -1267,6 +1324,18 @@ export declare const TurboConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1267
1324
|
"cherry-pick": "cherry-pick";
|
|
1268
1325
|
}>>>;
|
|
1269
1326
|
worktree_dir: z.ZodOptional<z.ZodString>;
|
|
1327
|
+
deps_strategy: z.ZodOptional<z.ZodEnum<{
|
|
1328
|
+
link: "link";
|
|
1329
|
+
skip: "skip";
|
|
1330
|
+
copy: "copy";
|
|
1331
|
+
}>>;
|
|
1332
|
+
runtime_isolation: z.ZodOptional<z.ZodObject<{
|
|
1333
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1334
|
+
port_base: z.ZodOptional<z.ZodNumber>;
|
|
1335
|
+
port_stride: z.ZodDefault<z.ZodNumber>;
|
|
1336
|
+
env_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1337
|
+
cache_redirects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1338
|
+
}, z.core.$strip>>;
|
|
1270
1339
|
}, z.core.$strip>;
|
|
1271
1340
|
epic: z.ZodOptional<z.ZodObject<{
|
|
1272
1341
|
cochange: z.ZodOptional<z.ZodObject<{
|
|
@@ -2179,6 +2248,15 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
2179
2248
|
skip: "skip";
|
|
2180
2249
|
copy: "copy";
|
|
2181
2250
|
}>>;
|
|
2251
|
+
serialization_release_after_dispatches: z.ZodDefault<z.ZodNumber>;
|
|
2252
|
+
serialization_release_after_ms: z.ZodDefault<z.ZodNumber>;
|
|
2253
|
+
runtime_isolation: z.ZodOptional<z.ZodObject<{
|
|
2254
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2255
|
+
port_base: z.ZodOptional<z.ZodNumber>;
|
|
2256
|
+
port_stride: z.ZodDefault<z.ZodNumber>;
|
|
2257
|
+
env_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2258
|
+
cache_redirects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2259
|
+
}, z.core.$strip>>;
|
|
2182
2260
|
}, z.core.$strip>>;
|
|
2183
2261
|
turbo: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2184
2262
|
strategy: z.ZodLiteral<"standard">;
|
|
@@ -2201,6 +2279,18 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
2201
2279
|
"cherry-pick": "cherry-pick";
|
|
2202
2280
|
}>>>;
|
|
2203
2281
|
worktree_dir: z.ZodOptional<z.ZodString>;
|
|
2282
|
+
deps_strategy: z.ZodOptional<z.ZodEnum<{
|
|
2283
|
+
link: "link";
|
|
2284
|
+
skip: "skip";
|
|
2285
|
+
copy: "copy";
|
|
2286
|
+
}>>;
|
|
2287
|
+
runtime_isolation: z.ZodOptional<z.ZodObject<{
|
|
2288
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2289
|
+
port_base: z.ZodOptional<z.ZodNumber>;
|
|
2290
|
+
port_stride: z.ZodDefault<z.ZodNumber>;
|
|
2291
|
+
env_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2292
|
+
cache_redirects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2293
|
+
}, z.core.$strip>>;
|
|
2204
2294
|
}, z.core.$strip>>;
|
|
2205
2295
|
epic: z.ZodOptional<z.ZodObject<{
|
|
2206
2296
|
cochange: z.ZodOptional<z.ZodObject<{
|
|
@@ -2242,6 +2332,18 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
2242
2332
|
"cherry-pick": "cherry-pick";
|
|
2243
2333
|
}>>>;
|
|
2244
2334
|
worktree_dir: z.ZodOptional<z.ZodString>;
|
|
2335
|
+
deps_strategy: z.ZodOptional<z.ZodEnum<{
|
|
2336
|
+
link: "link";
|
|
2337
|
+
skip: "skip";
|
|
2338
|
+
copy: "copy";
|
|
2339
|
+
}>>;
|
|
2340
|
+
runtime_isolation: z.ZodOptional<z.ZodObject<{
|
|
2341
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2342
|
+
port_base: z.ZodOptional<z.ZodNumber>;
|
|
2343
|
+
port_stride: z.ZodDefault<z.ZodNumber>;
|
|
2344
|
+
env_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2345
|
+
cache_redirects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2346
|
+
}, z.core.$strip>>;
|
|
2245
2347
|
}, z.core.$strip>;
|
|
2246
2348
|
epic: z.ZodOptional<z.ZodObject<{
|
|
2247
2349
|
cochange: z.ZodOptional<z.ZodObject<{
|
package/dist/git/branch.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as child_process from 'node:child_process';
|
|
1
2
|
export type GitRepositoryStatus = {
|
|
2
3
|
isRepo: true;
|
|
3
4
|
} | {
|
|
@@ -5,6 +6,23 @@ export type GitRepositoryStatus = {
|
|
|
5
6
|
reason: 'not_git_repo' | 'git_unavailable' | 'git_error';
|
|
6
7
|
message: string;
|
|
7
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Seam that calls child_process.spawnSync dynamically.
|
|
11
|
+
* Uses getChildProcessSpawnSync() to resolve at call time, allowing
|
|
12
|
+
* tests to mock child_process.spawnSync before gitExec runs.
|
|
13
|
+
*/
|
|
14
|
+
declare const __spawnSyncSeam: {
|
|
15
|
+
spawnSync: (cmd: string, args: string[], options?: {
|
|
16
|
+
cwd?: string;
|
|
17
|
+
encoding?: BufferEncoding;
|
|
18
|
+
timeout?: number;
|
|
19
|
+
maxBuffer?: number;
|
|
20
|
+
windowsHide?: boolean;
|
|
21
|
+
stdio?: "pipe" | "ignore" | "inherit" | Array<"pipe" | "ignore" | "inherit">;
|
|
22
|
+
env?: Record<string, string | undefined>;
|
|
23
|
+
envOverrides?: Record<string, string | null>;
|
|
24
|
+
}) => child_process.SpawnSyncReturns<string | Buffer>;
|
|
25
|
+
};
|
|
8
26
|
/**
|
|
9
27
|
* Execute git command safely.
|
|
10
28
|
*
|
|
@@ -33,8 +51,17 @@ export type GitRepositoryStatus = {
|
|
|
33
51
|
* with exponential backoff up to MAX_TRANSIENT_RETRIES before throwing.
|
|
34
52
|
* Permanent errors — non-zero exit, missing git binary, non-transient
|
|
35
53
|
* spawn errors — throw immediately with no retry.
|
|
54
|
+
*
|
|
55
|
+
* Lane env fallback (FR-201): when `laneEnv` is not provided but `laneIndex`
|
|
56
|
+
* is, reads the lane env file from disk synchronously.
|
|
57
|
+
*/
|
|
58
|
+
/**
|
|
59
|
+
* Synchronously read and parse a lane runtime profile from disk.
|
|
60
|
+
* Mirrors the logic of `readLaneEnvFileFromDisk` but uses sync fs.
|
|
61
|
+
* Returns an empty record when the file does not exist or cannot be read.
|
|
36
62
|
*/
|
|
37
|
-
declare function
|
|
63
|
+
export declare function readLaneEnvFileFromDiskSync(worktreePath: string, laneIndex: number): Record<string, string>;
|
|
64
|
+
declare function gitExec(args: string[], cwd: string, laneEnv?: Record<string, string>, laneIndex?: number): string;
|
|
38
65
|
export declare function getGitRepositoryStatus(cwd: string): GitRepositoryStatus;
|
|
39
66
|
/**
|
|
40
67
|
* Check if we're in a git repository
|
|
@@ -42,15 +69,20 @@ export declare function getGitRepositoryStatus(cwd: string): GitRepositoryStatus
|
|
|
42
69
|
export declare function isGitRepo(cwd: string): boolean;
|
|
43
70
|
/**
|
|
44
71
|
* Get current branch name
|
|
72
|
+
* @param cwd - Working directory
|
|
73
|
+
* @param laneEnv - Optional lane env overrides for git spawn
|
|
74
|
+
* @param laneIndex - Optional lane index; if laneEnv not provided, reads env file from disk
|
|
45
75
|
*/
|
|
46
|
-
export declare function getCurrentBranch(cwd: string): string;
|
|
76
|
+
export declare function getCurrentBranch(cwd: string, laneEnv?: Record<string, string>, laneIndex?: number): string;
|
|
47
77
|
/**
|
|
48
78
|
* Create a new branch
|
|
49
79
|
* @param cwd - Working directory
|
|
50
80
|
* @param branchName - Name of the branch to create
|
|
51
81
|
* @param remote - Remote name (default: 'origin')
|
|
82
|
+
* @param laneEnv - Optional lane env overrides for git spawn
|
|
83
|
+
* @param laneIndex - Optional lane index; if laneEnv not provided, reads env file from disk
|
|
52
84
|
*/
|
|
53
|
-
export declare function createBranch(cwd: string, branchName: string, remote?: string): void;
|
|
85
|
+
export declare function createBranch(cwd: string, branchName: string, remote?: string, laneEnv?: Record<string, string>, laneIndex?: number): void;
|
|
54
86
|
/**
|
|
55
87
|
* Get list of changed files compared to main/master
|
|
56
88
|
* @param cwd - Working directory
|
|
@@ -72,20 +104,32 @@ export declare function stageFiles(cwd: string, files: string[]): void;
|
|
|
72
104
|
/**
|
|
73
105
|
* Stage all files in the working directory
|
|
74
106
|
* @param cwd - Working directory
|
|
107
|
+
* @param laneEnv - Optional lane env overrides for git spawn
|
|
108
|
+
* @param laneIndex - Optional lane index; if laneEnv not provided, reads env file from disk
|
|
75
109
|
*/
|
|
76
|
-
export declare function stageAll(cwd: string): void;
|
|
110
|
+
export declare function stageAll(cwd: string, laneEnv?: Record<string, string>, laneIndex?: number): void;
|
|
77
111
|
/**
|
|
78
112
|
* Commit changes
|
|
113
|
+
* @param cwd - Working directory
|
|
114
|
+
* @param message - Commit message
|
|
115
|
+
* @param laneEnv - Optional lane env overrides for git spawn
|
|
116
|
+
* @param laneIndex - Optional lane index; if laneEnv not provided, reads env file from disk
|
|
79
117
|
*/
|
|
80
|
-
export declare function commitChanges(cwd: string, message: string): void;
|
|
118
|
+
export declare function commitChanges(cwd: string, message: string, laneEnv?: Record<string, string>, laneIndex?: number): void;
|
|
81
119
|
/**
|
|
82
120
|
* Get current commit SHA
|
|
121
|
+
* @param cwd - Working directory
|
|
122
|
+
* @param laneEnv - Optional lane env overrides for git spawn
|
|
123
|
+
* @param laneIndex - Optional lane index; if laneEnv not provided, reads env file from disk
|
|
83
124
|
*/
|
|
84
|
-
export declare function getCurrentSha(cwd: string): string;
|
|
125
|
+
export declare function getCurrentSha(cwd: string, laneEnv?: Record<string, string>, laneIndex?: number): string;
|
|
85
126
|
/**
|
|
86
127
|
* Check if there are uncommitted changes
|
|
128
|
+
* @param cwd - Working directory
|
|
129
|
+
* @param laneEnv - Optional lane env overrides for git spawn
|
|
130
|
+
* @param laneIndex - Optional lane index; if laneEnv not provided, reads env file from disk
|
|
87
131
|
*/
|
|
88
|
-
export declare function hasUncommittedChanges(cwd: string): boolean;
|
|
132
|
+
export declare function hasUncommittedChanges(cwd: string, laneEnv?: Record<string, string>, laneIndex?: number): boolean;
|
|
89
133
|
export interface ResetToRemoteBranchResult {
|
|
90
134
|
success: boolean;
|
|
91
135
|
targetBranch: string;
|
|
@@ -155,5 +199,7 @@ export declare const _internals: {
|
|
|
155
199
|
getGitRepositoryStatus: typeof getGitRepositoryStatus;
|
|
156
200
|
resetToRemoteBranch: typeof resetToRemoteBranch;
|
|
157
201
|
resetToMainAfterMerge: typeof resetToMainAfterMerge;
|
|
202
|
+
spawnSync: typeof __spawnSyncSeam.spawnSync;
|
|
203
|
+
readLaneEnvFileFromDiskSync: typeof readLaneEnvFileFromDiskSync;
|
|
158
204
|
};
|
|
159
205
|
export {};
|
package/dist/git/index.d.ts
CHANGED
|
@@ -4,6 +4,10 @@ export interface PRWorkflowOptions {
|
|
|
4
4
|
title: string;
|
|
5
5
|
body?: string;
|
|
6
6
|
branch?: string;
|
|
7
|
+
/** Optional lane env overrides for git spawns. */
|
|
8
|
+
laneEnv?: Record<string, string>;
|
|
9
|
+
/** Optional lane index; used to read env file from disk if laneEnv not provided. */
|
|
10
|
+
laneIndex?: number;
|
|
7
11
|
}
|
|
8
12
|
export interface PRWorkflowResult {
|
|
9
13
|
success: boolean;
|
|
@@ -18,5 +22,5 @@ export declare function runPRWorkflow(cwd: string, options: PRWorkflowOptions):
|
|
|
18
22
|
/**
|
|
19
23
|
* Generate evidence summary without creating PR
|
|
20
24
|
*/
|
|
21
|
-
export declare function prepareEvidence(cwd: string): string
|
|
25
|
+
export declare function prepareEvidence(cwd: string): Promise<string>;
|
|
22
26
|
export { isGhAvailable, isAuthenticated, isGitRepo, createBranch };
|
package/dist/git/pr.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as child_process from 'node:child_process';
|
|
2
|
+
import { readLaneEnvFileFromDiskSync } from './branch.js';
|
|
2
3
|
export declare const GIT_TIMEOUT_MS = 30000;
|
|
3
4
|
/**
|
|
4
5
|
* Sanitize input string to prevent command injection
|
|
@@ -15,15 +16,41 @@ export declare function sanitizeInput(input: string): string;
|
|
|
15
16
|
* - Bounded transient retry for ETIMEDOUT per AGENTS.md invariant 9
|
|
16
17
|
*/
|
|
17
18
|
export declare function ghExec(args: string[], cwd: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* File-scoped indirection seam for spawnSync.
|
|
21
|
+
* Supports envOverrides so lane runtime profiles can inject env.
|
|
22
|
+
*/
|
|
23
|
+
declare const __spawnSyncSeam: {
|
|
24
|
+
spawnSync: (cmd: string, args: string[], options?: {
|
|
25
|
+
cwd?: string;
|
|
26
|
+
encoding?: BufferEncoding;
|
|
27
|
+
timeout?: number;
|
|
28
|
+
maxBuffer?: number;
|
|
29
|
+
windowsHide?: boolean;
|
|
30
|
+
stdio?: "pipe" | "ignore" | "inherit" | Array<"pipe" | "ignore" | "inherit">;
|
|
31
|
+
env?: Record<string, string | undefined>;
|
|
32
|
+
envOverrides?: Record<string, string | null>;
|
|
33
|
+
}) => child_process.SpawnSyncReturns<string | NonSharedBuffer>;
|
|
34
|
+
};
|
|
18
35
|
/**
|
|
19
36
|
* Shared spawnSync wrapper with bounded ETIMEDOUT-only transient retry.
|
|
37
|
+
* Applies envOverrides to options.env before calling spawnSync.
|
|
20
38
|
*
|
|
21
39
|
* Mirrors the retry shape from ghExec (invariant 9):
|
|
22
40
|
* - Up to MAX_TRANSIENT_RETRIES attempts with exponential backoff on ETIMEDOUT
|
|
23
41
|
* - ENOENT and non-zero exit are thrown immediately (not retried)
|
|
24
42
|
* - On success, returns the raw spawnSync result transparently
|
|
25
43
|
*/
|
|
26
|
-
declare function spawnSyncWithTransientRetry(command: string, args: string[], options
|
|
44
|
+
declare function spawnSyncWithTransientRetry(command: string, args: string[], options?: {
|
|
45
|
+
cwd?: string;
|
|
46
|
+
encoding?: BufferEncoding;
|
|
47
|
+
timeout?: number;
|
|
48
|
+
maxBuffer?: number;
|
|
49
|
+
windowsHide?: boolean;
|
|
50
|
+
stdio?: 'pipe' | 'ignore' | 'inherit' | Array<'pipe' | 'ignore' | 'inherit'>;
|
|
51
|
+
env?: Record<string, string | undefined>;
|
|
52
|
+
envOverrides?: Record<string, string | null>;
|
|
53
|
+
}): child_process.SpawnSyncReturns<string>;
|
|
27
54
|
/**
|
|
28
55
|
* Execute gh CLI command asynchronously (non-blocking).
|
|
29
56
|
* Used by background workers that must not block the event loop.
|
|
@@ -40,6 +67,8 @@ export declare const _internals: {
|
|
|
40
67
|
ghExec: typeof ghExec;
|
|
41
68
|
ghExecAsync: typeof ghExecAsync;
|
|
42
69
|
spawnSyncWithTransientRetry: typeof spawnSyncWithTransientRetry;
|
|
70
|
+
spawnSync: typeof __spawnSyncSeam.spawnSync;
|
|
71
|
+
readLaneEnvFileFromDiskSync: typeof readLaneEnvFileFromDiskSync;
|
|
43
72
|
};
|
|
44
73
|
/**
|
|
45
74
|
* Check if gh CLI is available
|
|
@@ -62,8 +91,12 @@ export declare function createPullRequest(cwd: string, title: string, body?: str
|
|
|
62
91
|
}>;
|
|
63
92
|
/**
|
|
64
93
|
* Commit and push current changes
|
|
94
|
+
* @param cwd - Working directory
|
|
95
|
+
* @param message - Commit message
|
|
96
|
+
* @param laneEnv - Optional lane env overrides for git spawns
|
|
97
|
+
* @param laneIndex - Optional lane index; if laneEnv not provided, reads env file from disk
|
|
65
98
|
*/
|
|
66
|
-
export declare function commitAndPush(cwd: string, message: string): void
|
|
99
|
+
export declare function commitAndPush(cwd: string, message: string, laneEnv?: Record<string, string>, laneIndex?: number): Promise<void>;
|
|
67
100
|
export interface PRStatusResult {
|
|
68
101
|
number: number;
|
|
69
102
|
state: 'OPEN' | 'CLOSED' | 'MERGED';
|