@loucompanion/forge-bridge 0.1.3-dev.f2b8822ce953 → 0.1.3-dev.fbe15023cdfe
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/README.md +78 -0
- package/dist/bridge/bridge.base.d.ts +6 -1
- package/dist/bridge/bridge.service.d.ts +60 -3
- package/dist/bridge/bridge.service.js +970 -24
- package/dist/bridge/bridge.types.d.ts +172 -1
- package/dist/cleanup/cleanup.service.d.ts +13 -2
- package/dist/cleanup/cleanup.service.js +435 -3
- package/dist/cleanup/cleanup.types.d.ts +10 -0
- package/dist/cleanup/index.d.ts +1 -1
- package/dist/cleanup/index.js +1 -1
- package/dist/cleanup/internals.d.ts +2 -2
- package/dist/cleanup/internals.js +1 -1
- package/dist/cli/cli.help.js +47 -1
- package/dist/cli/cli.service.d.ts +42 -2
- package/dist/cli/cli.service.js +351 -22
- package/dist/cli/local-config.d.ts +6 -0
- package/dist/cli/local-config.js +47 -3
- package/dist/runtime/attempt-node-runtime-launcher.d.ts +17 -0
- package/dist/runtime/attempt-node-runtime-launcher.js +101 -0
- package/dist/runtime/attempt-process-supervisor-registry.d.ts +20 -0
- package/dist/runtime/attempt-process-supervisor-registry.js +64 -0
- package/dist/runtime/attempt-process-supervisor.d.ts +86 -0
- package/dist/runtime/attempt-process-supervisor.js +350 -0
- package/dist/runtime/generated-output-reset.d.ts +10 -0
- package/dist/runtime/generated-output-reset.js +103 -0
- package/dist/runtime/host-listener-inspector.d.ts +44 -0
- package/dist/runtime/host-listener-inspector.js +324 -0
- package/dist/runtime/host-port-broker.d.ts +76 -0
- package/dist/runtime/host-port-broker.js +333 -0
- package/dist/runtime/host-runtime-contract.d.ts +47 -0
- package/dist/runtime/host-runtime-contract.js +700 -0
- package/dist/runtime/host-runtime-lease.d.ts +133 -0
- package/dist/runtime/host-runtime-lease.js +1460 -0
- package/dist/runtime/host-runtime-promotion.d.ts +23 -0
- package/dist/runtime/host-runtime-promotion.js +159 -0
- package/dist/runtime/node-host-runtime-adapter.d.ts +51 -0
- package/dist/runtime/node-host-runtime-adapter.js +268 -0
- package/dist/runtime/playwright-host-runtime-adapter.d.ts +20 -0
- package/dist/runtime/playwright-host-runtime-adapter.js +220 -0
- package/dist/runtime/runtime-isolation-lease.d.ts +67 -0
- package/dist/runtime/runtime-isolation-lease.js +158 -0
- package/dist/sandbox/command-runner.d.ts +4 -0
- package/dist/sandbox/command-runner.js +47 -0
- package/dist/sandbox/contract.d.ts +5 -0
- package/dist/sandbox/contract.js +276 -0
- package/dist/sandbox/event-budget.d.ts +11 -0
- package/dist/sandbox/event-budget.js +27 -0
- package/dist/sandbox/image-policy.d.ts +35 -0
- package/dist/sandbox/image-policy.js +247 -0
- package/dist/sandbox/index.d.ts +5 -0
- package/dist/sandbox/index.js +5 -0
- package/dist/sandbox/lease-watchdog.d.ts +18 -0
- package/dist/sandbox/lease-watchdog.js +67 -0
- package/dist/sandbox/preflight.d.ts +54 -0
- package/dist/sandbox/preflight.js +335 -0
- package/dist/sandbox/process.d.ts +20 -0
- package/dist/sandbox/process.js +209 -0
- package/dist/sandbox/provider-auth/codex.d.ts +26 -0
- package/dist/sandbox/provider-auth/codex.js +212 -0
- package/dist/sandbox/repository-lock.d.ts +5 -0
- package/dist/sandbox/repository-lock.js +119 -0
- package/dist/sandbox/runtime.d.ts +297 -0
- package/dist/sandbox/runtime.js +2338 -0
- package/dist/sandbox/sandbox.types.d.ts +86 -0
- package/dist/sandbox/sandbox.types.js +1 -0
- package/dist/sandbox/smoke.d.ts +76 -0
- package/dist/sandbox/smoke.js +380 -0
- package/dist/sandbox/worker-supervisor.d.ts +13 -0
- package/dist/sandbox/worker-supervisor.js +36 -0
- package/dist/sandbox/worker.d.ts +1 -0
- package/dist/sandbox/worker.js +225 -0
- package/dist/sandbox/workspace.service.d.ts +13 -0
- package/dist/sandbox/workspace.service.js +72 -0
- package/dist/session/managed-attempt-tools.d.ts +12 -0
- package/dist/session/managed-attempt-tools.js +561 -0
- package/dist/session/phase-completion.artifacts.js +32 -4
- package/dist/session/phase-completion.d.ts +4 -2
- package/dist/session/phase-completion.helpers.js +27 -3
- package/dist/session/phase-completion.js +12 -3
- package/dist/session/phase-completion.prompts.d.ts +3 -3
- package/dist/session/phase-completion.prompts.js +20 -6
- package/dist/session/phase-completion.runtime.d.ts +12 -1
- package/dist/session/phase-completion.runtime.js +129 -7
- package/dist/session/phase-completion.schemas.js +132 -5
- package/dist/session/phase-completion.validation.d.ts +4 -1
- package/dist/session/phase-completion.validation.js +106 -2
- package/dist/session/provider-cli/ci-repair-readiness.d.ts +8 -0
- package/dist/session/provider-cli/ci-repair-readiness.js +90 -0
- package/dist/session/provider-cli/provider-cli.artifacts.d.ts +1 -1
- package/dist/session/provider-cli/provider-cli.artifacts.js +28 -4
- package/dist/session/provider-cli/provider-cli.base.d.ts +1 -0
- package/dist/session/provider-cli/provider-cli.deterministic.d.ts +2 -0
- package/dist/session/provider-cli/provider-cli.deterministic.js +66 -9
- package/dist/session/provider-cli/provider-cli.process.d.ts +17 -0
- package/dist/session/provider-cli/provider-cli.process.js +223 -14
- package/dist/session/provider-cli/provider-cli.prompts.d.ts +17 -2
- package/dist/session/provider-cli/provider-cli.prompts.js +226 -18
- package/dist/session/provider-cli/provider-cli.qa-sidecars.js +1 -0
- package/dist/session/provider-cli/provider-cli.runtime.d.ts +1 -1
- package/dist/session/provider-cli/provider-cli.runtime.js +3 -2
- package/dist/session/provider-cli/provider-cli.service.d.ts +19 -3
- package/dist/session/provider-cli/provider-cli.service.js +503 -98
- package/dist/session/provider-cli/provider-cli.types.d.ts +6 -0
- package/dist/session/provider-cli/provider-output-state.d.ts +2 -0
- package/dist/session/provider-cli/provider-output-state.js +30 -2
- package/dist/session/session-redaction.d.ts +3 -0
- package/dist/session/session-redaction.js +23 -0
- package/dist/session/session.base.d.ts +6 -1
- package/dist/session/session.service.d.ts +8 -2
- package/dist/session/session.service.js +463 -58
- package/dist/session/session.types.d.ts +144 -1
- package/dist/session/session.types.js +279 -3
- package/dist/shared/path/path.js +3 -1
- package/dist/shared/process/host-process-recovery.d.ts +12 -0
- package/dist/shared/process/host-process-recovery.js +78 -0
- package/dist/shared/process/host-process-supervisor.d.ts +57 -0
- package/dist/shared/process/host-process-supervisor.js +282 -0
- package/dist/shared/process/process.d.ts +1 -0
- package/dist/shared/process/process.js +1 -0
- package/dist/shared/process/windows-launch.d.ts +1 -1
- package/dist/shared/process/windows-launch.js +6 -3
- package/dist/shared/provider-capabilities.d.ts +1 -0
- package/dist/shared/provider-capabilities.js +3 -0
- package/dist/shared/redaction/redaction.js +10 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worktree/artifact-injector.d.ts +3 -2
- package/dist/worktree/artifact-injector.js +43 -4
- package/dist/worktree/dependency-warmer.d.ts +21 -1
- package/dist/worktree/dependency-warmer.js +138 -5
- package/dist/worktree/index.d.ts +1 -0
- package/dist/worktree/index.js +1 -0
- package/dist/worktree/prior-phase-artifact-hydrator.d.ts +2 -0
- package/dist/worktree/prior-phase-artifact-hydrator.js +136 -0
- package/dist/worktree/worktree-paths.d.ts +4 -0
- package/dist/worktree/worktree-paths.js +30 -0
- package/dist/worktree/worktree.base.d.ts +3 -0
- package/dist/worktree/worktree.service.d.ts +7 -2
- package/dist/worktree/worktree.service.js +72 -44
- package/dist/worktree/worktree.types.d.ts +3 -1
- package/package.json +6 -3
- package/runtime/windows-job-supervisor.ps1 +356 -0
- package/runtime/windows-listener-owner.ps1 +33 -0
|
@@ -1,6 +1,16 @@
|
|
|
1
|
+
export type CleanupMode = "stale" | "merged" | "all";
|
|
1
2
|
export interface CleanupRequest {
|
|
2
3
|
readonly repoRoot: string;
|
|
4
|
+
readonly allowedRepoRoot?: string;
|
|
5
|
+
readonly mode: CleanupMode;
|
|
6
|
+
readonly force: boolean;
|
|
3
7
|
}
|
|
4
8
|
export interface CleanupResult {
|
|
9
|
+
readonly worktreeRoot: string;
|
|
5
10
|
readonly removedWorktrees: number;
|
|
11
|
+
readonly candidateWorktrees: number;
|
|
12
|
+
readonly protectedWorktrees: number;
|
|
13
|
+
readonly skippedUnownedDirectories: number;
|
|
14
|
+
readonly removedRoot: boolean;
|
|
15
|
+
readonly dryRun: boolean;
|
|
6
16
|
}
|
package/dist/cleanup/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ManagedWorktreeCleanupService } from "./cleanup.service.js";
|
|
2
2
|
export type { CleanupService } from "./cleanup.base.js";
|
package/dist/cleanup/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ManagedWorktreeCleanupService } from "./cleanup.service.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ManagedWorktreeCleanupService } from "./cleanup.service.js";
|
|
2
2
|
export type { CleanupService } from "./cleanup.base.js";
|
|
3
|
-
export type { CleanupRequest, CleanupResult } from "./cleanup.types.js";
|
|
3
|
+
export type { CleanupMode, CleanupRequest, CleanupResult } from "./cleanup.types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ManagedWorktreeCleanupService } from "./cleanup.service.js";
|
package/dist/cli/cli.help.js
CHANGED
|
@@ -16,9 +16,11 @@ export function helpText() {
|
|
|
16
16
|
" connect * Start the runner bridge and wait for Forge dispatches",
|
|
17
17
|
" pair * Pair this machine with Forge and save runner credentials",
|
|
18
18
|
" status * Show config, runner identity, repos, provider CLIs, and updates",
|
|
19
|
+
" server * Show or change the saved Forge server URL",
|
|
19
20
|
" add-repo * Map a Forge repo label/name to a local checkout path",
|
|
20
21
|
" remove-repo * Remove a saved repo mapping",
|
|
21
22
|
" cleanup * Prune managed bridge worktrees",
|
|
23
|
+
" sandbox * Initialize, diagnose, smoke-test, or reap Docker sandboxes",
|
|
22
24
|
" version * Print the installed bridge package version",
|
|
23
25
|
" help * Display help for command",
|
|
24
26
|
" run-once * Internal: run one dispatch packet from JSON",
|
|
@@ -29,6 +31,7 @@ export function helpText() {
|
|
|
29
31
|
" forge-bridge pair 1234-5678 --server https://srv1493013.tail66073d.ts.net:8443 --repo-root \"%USERPROFILE%\\ForgeRepos\"",
|
|
30
32
|
" forge-bridge connect",
|
|
31
33
|
" forge-bridge status --check-updates",
|
|
34
|
+
" forge-bridge server set http://localhost:5208",
|
|
32
35
|
" forge-bridge add-repo Forge D:\\Programming\\repos\\Forge",
|
|
33
36
|
" forge-bridge cleanup --stale",
|
|
34
37
|
"",
|
|
@@ -99,6 +102,23 @@ export function commandHelpText(command) {
|
|
|
99
102
|
" forge-bridge status --check-updates",
|
|
100
103
|
"",
|
|
101
104
|
].join("\n");
|
|
105
|
+
case "server":
|
|
106
|
+
return [
|
|
107
|
+
"Forge Bridge — server",
|
|
108
|
+
"Show or change the saved Forge server URL.",
|
|
109
|
+
"",
|
|
110
|
+
"Usage:",
|
|
111
|
+
" forge-bridge server show",
|
|
112
|
+
" forge-bridge server set <url>",
|
|
113
|
+
"",
|
|
114
|
+
"The saved runner credentials are retained. Pair again when switching to a different Forge deployment.",
|
|
115
|
+
"FORGE_URL overrides the saved server when that environment variable is set.",
|
|
116
|
+
"",
|
|
117
|
+
"Examples:",
|
|
118
|
+
" forge-bridge server set http://localhost:5208",
|
|
119
|
+
" forge-bridge server set https://srv1493013.tail66073d.ts.net:8443",
|
|
120
|
+
"",
|
|
121
|
+
].join("\n");
|
|
102
122
|
case "add-repo":
|
|
103
123
|
return [
|
|
104
124
|
"Forge Bridge — add-repo",
|
|
@@ -133,6 +153,32 @@ export function commandHelpText(command) {
|
|
|
133
153
|
" forge-bridge cleanup --all --force",
|
|
134
154
|
"",
|
|
135
155
|
].join("\n");
|
|
156
|
+
case "sandbox":
|
|
157
|
+
return [
|
|
158
|
+
"Forge Bridge — sandbox",
|
|
159
|
+
"Configure local Docker sandbox placement or inspect a repository-owned sandbox contract.",
|
|
160
|
+
"",
|
|
161
|
+
"Usage:",
|
|
162
|
+
" forge-bridge sandbox on [--allow-open-public]",
|
|
163
|
+
" forge-bridge sandbox off",
|
|
164
|
+
" forge-bridge sandbox status",
|
|
165
|
+
" forge-bridge sandbox init [--repo <path>]",
|
|
166
|
+
" forge-bridge sandbox doctor [--repo <path>] [--require-pinned-base]",
|
|
167
|
+
" forge-bridge sandbox smoke [--repo <path>] [--report <path>] [--require-pinned-base] [--probe-loopback-port]",
|
|
168
|
+
" forge-bridge sandbox reap",
|
|
169
|
+
"",
|
|
170
|
+
"`sandbox on` keeps unrestricted public networking denied unless the explicit",
|
|
171
|
+
"developer-only --allow-open-public option is supplied. The local policy is",
|
|
172
|
+
"saved in bridge.json and takes effect after the connected bridge restarts.",
|
|
173
|
+
"Environment variables remain higher-priority operator overrides.",
|
|
174
|
+
"",
|
|
175
|
+
"The smoke command builds the repository Dockerfile, runs a disposable hardened",
|
|
176
|
+
"container, verifies exact-label teardown, and writes a redacted JSON report.",
|
|
177
|
+
"The optional port probe publishes 127.0.0.1::8080 only for the disposable fixture",
|
|
178
|
+
"and verifies Docker-assigned host-port discovery; normal sandboxes publish no ports.",
|
|
179
|
+
"Stop the connected bridge first so the Docker ownership lock can be acquired.",
|
|
180
|
+
"",
|
|
181
|
+
].join("\n");
|
|
136
182
|
case "run-once":
|
|
137
183
|
return [
|
|
138
184
|
"Forge Bridge — run-once",
|
|
@@ -148,7 +194,7 @@ export function commandHelpText(command) {
|
|
|
148
194
|
"Internal MCP server used by provider CLIs to report Forge phase artifacts.",
|
|
149
195
|
"",
|
|
150
196
|
"Usage:",
|
|
151
|
-
" forge-bridge mcp --worktree <path> --work-item-id <id> --phase <phase>",
|
|
197
|
+
" forge-bridge mcp --worktree <path> --work-item-id <id> --phase <phase> # includes ci-repair",
|
|
152
198
|
"",
|
|
153
199
|
].join("\n");
|
|
154
200
|
case "version":
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { BridgeService } from "../bridge/bridge.base.js";
|
|
2
2
|
import type { BridgeServiceConfig } from "../bridge/bridge.types.js";
|
|
3
|
+
import type { CleanupMode } from "../cleanup/cleanup.types.js";
|
|
4
|
+
import type { CleanupService } from "../cleanup/cleanup.base.js";
|
|
3
5
|
import type { SessionService } from "../session/session.base.js";
|
|
4
6
|
import type { CliIo, CliService } from "./cli.base.js";
|
|
5
7
|
export declare class ForgeBridgeCliService implements CliService {
|
|
6
8
|
private readonly sessions;
|
|
7
9
|
private readonly bridgeFactory;
|
|
8
10
|
private readonly pairRunner;
|
|
9
|
-
|
|
11
|
+
private readonly cleanupFactory;
|
|
12
|
+
constructor(sessions?: SessionService, bridgeFactory?: (config: BridgeServiceConfig) => BridgeService, pairRunner?: PairRunnerClient, cleanupFactory?: CleanupServiceFactory);
|
|
10
13
|
run(argv: readonly string[], io?: CliIo): Promise<number>;
|
|
11
14
|
}
|
|
12
15
|
export declare function parseArgs(argv: readonly string[]): {
|
|
@@ -34,6 +37,14 @@ export declare function parseArgs(argv: readonly string[]): {
|
|
|
34
37
|
readonly ok: true;
|
|
35
38
|
readonly command: "remove-repo";
|
|
36
39
|
readonly label: string;
|
|
40
|
+
} | {
|
|
41
|
+
readonly ok: true;
|
|
42
|
+
readonly command: "server-show";
|
|
43
|
+
readonly config: BridgeServiceConfig;
|
|
44
|
+
} | {
|
|
45
|
+
readonly ok: true;
|
|
46
|
+
readonly command: "server-set";
|
|
47
|
+
readonly serverUrl: string;
|
|
37
48
|
} | {
|
|
38
49
|
readonly ok: true;
|
|
39
50
|
readonly command: "status";
|
|
@@ -45,6 +56,35 @@ export declare function parseArgs(argv: readonly string[]): {
|
|
|
45
56
|
readonly config: BridgeServiceConfig;
|
|
46
57
|
readonly mode: CleanupMode;
|
|
47
58
|
readonly force: boolean;
|
|
59
|
+
} | {
|
|
60
|
+
readonly ok: true;
|
|
61
|
+
readonly command: "sandbox-init";
|
|
62
|
+
readonly repoPath: string;
|
|
63
|
+
} | {
|
|
64
|
+
readonly ok: true;
|
|
65
|
+
readonly command: "sandbox-doctor";
|
|
66
|
+
readonly repoPath: string;
|
|
67
|
+
readonly requirePinnedBase: boolean;
|
|
68
|
+
} | {
|
|
69
|
+
readonly ok: true;
|
|
70
|
+
readonly command: "sandbox-smoke";
|
|
71
|
+
readonly repoPath: string;
|
|
72
|
+
readonly reportPath?: string;
|
|
73
|
+
readonly requirePinnedBase: boolean;
|
|
74
|
+
readonly probeLoopbackPort: boolean;
|
|
75
|
+
} | {
|
|
76
|
+
readonly ok: true;
|
|
77
|
+
readonly command: "sandbox-reap";
|
|
78
|
+
} | {
|
|
79
|
+
readonly ok: true;
|
|
80
|
+
readonly command: "sandbox-on";
|
|
81
|
+
readonly allowOpenPublic: boolean;
|
|
82
|
+
} | {
|
|
83
|
+
readonly ok: true;
|
|
84
|
+
readonly command: "sandbox-off";
|
|
85
|
+
} | {
|
|
86
|
+
readonly ok: true;
|
|
87
|
+
readonly command: "sandbox-status";
|
|
48
88
|
} | {
|
|
49
89
|
readonly ok: false;
|
|
50
90
|
readonly error: string;
|
|
@@ -66,5 +106,5 @@ interface PairRunnerClaim {
|
|
|
66
106
|
type PairRunnerClient = (args: PairArgs) => Promise<PairRunnerClaim>;
|
|
67
107
|
export declare function parseCodexModelCatalog(raw: string): string[];
|
|
68
108
|
export declare function parseCursorModelList(raw: string): string[];
|
|
69
|
-
type
|
|
109
|
+
type CleanupServiceFactory = (stateRoot: string) => CleanupService;
|
|
70
110
|
export {};
|