@loucompanion/forge-bridge 0.1.3-dev.f66395c3ac21 → 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.d.ts +2 -0
- package/dist/cli/cli.help.js +217 -0
- package/dist/cli/cli.service.d.ts +42 -2
- package/dist/cli/cli.service.js +356 -205
- 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.d.ts +10 -0
- package/dist/session/phase-completion.artifacts.js +627 -0
- package/dist/session/phase-completion.d.ts +43 -42
- package/dist/session/phase-completion.helpers.d.ts +112 -0
- package/dist/session/phase-completion.helpers.js +684 -0
- package/dist/session/phase-completion.js +114 -3007
- package/dist/session/phase-completion.prompts.d.ts +14 -0
- package/dist/session/phase-completion.prompts.js +234 -0
- package/dist/session/phase-completion.runtime.d.ts +47 -0
- package/dist/session/phase-completion.runtime.js +731 -0
- package/dist/session/phase-completion.schemas.d.ts +3 -0
- package/dist/session/phase-completion.schemas.js +812 -0
- package/dist/session/phase-completion.validation.d.ts +37 -0
- package/dist/session/phase-completion.validation.js +828 -0
- 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 +93 -0
- package/dist/session/provider-cli/provider-cli.artifacts.js +778 -0
- package/dist/session/provider-cli/provider-cli.base.d.ts +1 -0
- package/dist/session/provider-cli/provider-cli.deterministic-payloads.d.ts +12 -0
- package/dist/session/provider-cli/provider-cli.deterministic-payloads.js +279 -0
- package/dist/session/provider-cli/provider-cli.deterministic.d.ts +14 -0
- package/dist/session/provider-cli/provider-cli.deterministic.js +375 -0
- package/dist/session/provider-cli/provider-cli.process.d.ts +48 -0
- package/dist/session/provider-cli/provider-cli.process.js +474 -0
- package/dist/session/provider-cli/provider-cli.prompts.d.ts +47 -0
- package/dist/session/provider-cli/provider-cli.prompts.js +595 -0
- package/dist/session/provider-cli/provider-cli.qa-sidecars.d.ts +11 -0
- package/dist/session/provider-cli/provider-cli.qa-sidecars.js +66 -0
- package/dist/session/provider-cli/provider-cli.runtime.d.ts +9 -0
- package/dist/session/provider-cli/provider-cli.runtime.js +41 -0
- package/dist/session/provider-cli/provider-cli.service.d.ts +22 -53
- package/dist/session/provider-cli/provider-cli.service.js +587 -2530
- package/dist/session/provider-cli/provider-cli.types.d.ts +6 -0
- package/dist/session/provider-cli/provider-output-state.d.ts +22 -0
- package/dist/session/provider-cli/provider-output-state.js +473 -0
- 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 +177 -1
- package/dist/session/session.types.js +352 -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 +8 -0
- package/dist/shared/process/windows-launch.js +41 -0
- 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 +82 -10
- 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 +9 -3
- package/dist/worktree/worktree.service.js +100 -52
- 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
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import type { BridgeServiceConfig } from "../bridge/bridge.types.js";
|
|
2
|
+
import type { SessionEventSink } from "../session/session.base.js";
|
|
3
|
+
import { type RunOnceDispatchPacket, type RunOnceResultPacket } from "../session/session.types.js";
|
|
4
|
+
import type { SandboxService, ValidatedSandboxContract } from "./sandbox.types.js";
|
|
5
|
+
import { type RuntimeIsolationLease } from "../runtime/runtime-isolation-lease.js";
|
|
6
|
+
export interface SandboxRuntime {
|
|
7
|
+
runOnce(dispatch: RunOnceDispatchPacket, sink: SessionEventSink, signal?: AbortSignal): Promise<RunOnceResultPacket>;
|
|
8
|
+
reap(options?: SandboxReapOptions): Promise<void>;
|
|
9
|
+
pendingCleanupReports?(): Promise<readonly SandboxCleanupReport[]>;
|
|
10
|
+
acknowledgeCleanupReport?(reportId: string): Promise<void>;
|
|
11
|
+
updateLease(dispatchAttemptId: string, fencingToken: string, expiresAt: string): Promise<void>;
|
|
12
|
+
snapshot(): SandboxRuntimeSnapshot;
|
|
13
|
+
}
|
|
14
|
+
export interface SandboxReapOptions {
|
|
15
|
+
readonly diskLow?: boolean;
|
|
16
|
+
readonly attemptSnapshot?: readonly SandboxAttemptSnapshot[];
|
|
17
|
+
}
|
|
18
|
+
export interface SandboxAttemptSnapshot {
|
|
19
|
+
readonly dispatchAttemptId: string;
|
|
20
|
+
readonly fencingToken: string;
|
|
21
|
+
readonly runnerInstanceId: string;
|
|
22
|
+
readonly status: string;
|
|
23
|
+
readonly expiresAt: string;
|
|
24
|
+
}
|
|
25
|
+
export interface SandboxCleanupReport {
|
|
26
|
+
readonly reportId: string;
|
|
27
|
+
readonly source: "teardown" | "reaper";
|
|
28
|
+
readonly actions: readonly SandboxCleanupAction[];
|
|
29
|
+
}
|
|
30
|
+
export interface SandboxCleanupAction {
|
|
31
|
+
readonly dispatchAttemptId: string;
|
|
32
|
+
readonly fencingToken: string;
|
|
33
|
+
readonly runnerInstanceId: string;
|
|
34
|
+
readonly resourceType: "container" | "network" | "volume";
|
|
35
|
+
readonly resourceId: string;
|
|
36
|
+
readonly outcome: "removed" | "failed";
|
|
37
|
+
readonly message?: string | null;
|
|
38
|
+
readonly occurredAt: string;
|
|
39
|
+
}
|
|
40
|
+
export interface SandboxRuntimeSnapshot {
|
|
41
|
+
readonly starting: number;
|
|
42
|
+
readonly active: number;
|
|
43
|
+
readonly degraded: number;
|
|
44
|
+
}
|
|
45
|
+
export interface SandboxContainerMemoryPeak {
|
|
46
|
+
readonly containerId: string;
|
|
47
|
+
readonly name: string;
|
|
48
|
+
readonly role: string;
|
|
49
|
+
readonly peakMemoryBytes: number;
|
|
50
|
+
}
|
|
51
|
+
export interface SandboxPeakMemoryTelemetry {
|
|
52
|
+
readonly schemaVersion: 1;
|
|
53
|
+
readonly source: "docker_stats_sampled";
|
|
54
|
+
readonly sampleIntervalMs: number;
|
|
55
|
+
readonly sampleCount: number;
|
|
56
|
+
readonly failedSampleCount: number;
|
|
57
|
+
readonly peakMemoryBytes: number;
|
|
58
|
+
readonly firstSampledAt: string;
|
|
59
|
+
readonly lastSampledAt: string;
|
|
60
|
+
readonly containers: readonly SandboxContainerMemoryPeak[];
|
|
61
|
+
}
|
|
62
|
+
export interface DockerStatsMemorySample {
|
|
63
|
+
readonly containerId: string;
|
|
64
|
+
readonly name: string;
|
|
65
|
+
readonly memoryBytes: number;
|
|
66
|
+
}
|
|
67
|
+
export interface SandboxPublicationGrantRequest {
|
|
68
|
+
readonly dispatchAttemptId: string;
|
|
69
|
+
readonly leaseId: string;
|
|
70
|
+
readonly fencingToken: string;
|
|
71
|
+
readonly runnerInstanceId: string;
|
|
72
|
+
readonly grantId: string;
|
|
73
|
+
readonly branch: string;
|
|
74
|
+
readonly resultCommitSha: string;
|
|
75
|
+
}
|
|
76
|
+
export interface SandboxPublicationCredential {
|
|
77
|
+
readonly username: string;
|
|
78
|
+
readonly secret: string;
|
|
79
|
+
readonly remoteUrl: string;
|
|
80
|
+
readonly expiresAt: string;
|
|
81
|
+
}
|
|
82
|
+
export type SandboxPublicationGrantRedeemer = (request: SandboxPublicationGrantRequest, signal?: AbortSignal) => Promise<SandboxPublicationCredential>;
|
|
83
|
+
export declare class DockerSandboxRuntime implements SandboxRuntime {
|
|
84
|
+
private readonly config;
|
|
85
|
+
private readonly publicationGrantRedeemer?;
|
|
86
|
+
private readonly active;
|
|
87
|
+
private readonly degraded;
|
|
88
|
+
private readonly builds;
|
|
89
|
+
private readonly verifiedCatalogImages;
|
|
90
|
+
private buildTail;
|
|
91
|
+
constructor(config: BridgeServiceConfig, publicationGrantRedeemer?: SandboxPublicationGrantRedeemer | undefined);
|
|
92
|
+
runOnce(dispatch: RunOnceDispatchPacket, sink: SessionEventSink, signal?: AbortSignal): Promise<RunOnceResultPacket>;
|
|
93
|
+
updateLease(dispatchAttemptId: string, fencingToken: string, expiresAt: string): Promise<void>;
|
|
94
|
+
private pushLeaseUpdate;
|
|
95
|
+
snapshot(): SandboxRuntimeSnapshot;
|
|
96
|
+
reap(options?: SandboxReapOptions): Promise<void>;
|
|
97
|
+
pendingCleanupReports(): Promise<readonly SandboxCleanupReport[]>;
|
|
98
|
+
acknowledgeCleanupReport(reportId: string): Promise<void>;
|
|
99
|
+
private persistCleanupReport;
|
|
100
|
+
private cleanupReportPath;
|
|
101
|
+
private writeLedger;
|
|
102
|
+
private readLedgers;
|
|
103
|
+
private ledgerPath;
|
|
104
|
+
private removeLedger;
|
|
105
|
+
private buildImage;
|
|
106
|
+
private withBuildPermit;
|
|
107
|
+
private buildImageCore;
|
|
108
|
+
private runBuildStage;
|
|
109
|
+
private ensureBuildxBuilder;
|
|
110
|
+
private stopBuildxBuilder;
|
|
111
|
+
private initializeVolumes;
|
|
112
|
+
private inspectContainerState;
|
|
113
|
+
private initializeServiceSecrets;
|
|
114
|
+
private initializeProviderCredentials;
|
|
115
|
+
private initializeEgressPolicy;
|
|
116
|
+
private startEgressProxy;
|
|
117
|
+
private startServices;
|
|
118
|
+
private verifyCatalogImage;
|
|
119
|
+
private waitForServiceHealthy;
|
|
120
|
+
private teardown;
|
|
121
|
+
private listResources;
|
|
122
|
+
private inspectResourceLabels;
|
|
123
|
+
private removeResource;
|
|
124
|
+
private writeImageCacheRecord;
|
|
125
|
+
private readImageCacheRecords;
|
|
126
|
+
private readImageCacheRecord;
|
|
127
|
+
private collectExpiredImages;
|
|
128
|
+
private purgeRestrictedAuditArtifacts;
|
|
129
|
+
private inspectImageMetadata;
|
|
130
|
+
private startPeakMemorySampler;
|
|
131
|
+
private docker;
|
|
132
|
+
private dockerArgs;
|
|
133
|
+
}
|
|
134
|
+
export declare function managedBranchUpdateExpectedValue(current: string, expectedInput: string, imported: string): string;
|
|
135
|
+
export declare function publicationPushArgs(branch: string, resultCommitSha: string, inputCommitSha: string, remoteCommitSha: string, remote?: string): string[] | null;
|
|
136
|
+
export declare function validatePublicationCredential(credential: SandboxPublicationCredential, nowMs?: number): void;
|
|
137
|
+
export declare function publicationCredentialEnvironment(credential: SandboxPublicationCredential, environment?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
138
|
+
export interface RestrictedBuildLog {
|
|
139
|
+
readonly content: string;
|
|
140
|
+
readonly digest: string;
|
|
141
|
+
readonly byteCount: number;
|
|
142
|
+
readonly truncated: boolean;
|
|
143
|
+
}
|
|
144
|
+
export declare function restrictedBuildLog(source: string, exactSecrets?: readonly string[], maximumBytes?: number): RestrictedBuildLog;
|
|
145
|
+
export declare function validateGitObjectBudget(inventory: string, maximumObjectCount?: number, maximumExpandedBytes?: number): {
|
|
146
|
+
readonly objectCount: number;
|
|
147
|
+
readonly expandedBytes: number;
|
|
148
|
+
};
|
|
149
|
+
export declare function validateGitCommitDepth(value: string, maximumCommitDepth?: number): number;
|
|
150
|
+
export interface AuditArtifactRecord {
|
|
151
|
+
readonly key: string;
|
|
152
|
+
readonly lastModifiedMs: number;
|
|
153
|
+
}
|
|
154
|
+
export declare function selectAuditArtifactGcCandidates(records: readonly AuditArtifactRecord[], retentionCount: number, retentionTtlMs: number, protectedKeys?: ReadonlySet<string>, nowMs?: number): string[];
|
|
155
|
+
export declare function selectSandboxConfigRefs(executionPolicy: string, configuredSha: string | null | undefined, defaultBranch: string): {
|
|
156
|
+
readonly refs: readonly string[];
|
|
157
|
+
readonly approvedSha: string | null;
|
|
158
|
+
};
|
|
159
|
+
export declare function selectSandboxInputRefs(worktreeKey: string, baseBranch: string): readonly string[];
|
|
160
|
+
export declare function sandboxTimeLimits(environment?: NodeJS.ProcessEnv): {
|
|
161
|
+
readonly hardWallMs: number;
|
|
162
|
+
readonly idleMs: number;
|
|
163
|
+
};
|
|
164
|
+
export interface ImageCacheRecord {
|
|
165
|
+
readonly schemaVersion: 1;
|
|
166
|
+
readonly key: string;
|
|
167
|
+
readonly project: string;
|
|
168
|
+
readonly createdAt: string;
|
|
169
|
+
readonly lastUsedAt: string;
|
|
170
|
+
readonly projectTag: string;
|
|
171
|
+
readonly helperTag: string;
|
|
172
|
+
readonly overlayTag: string;
|
|
173
|
+
readonly imageDigest: string;
|
|
174
|
+
readonly helperImageDigest: string;
|
|
175
|
+
readonly bridgeRuntimeDigest?: string;
|
|
176
|
+
readonly policyDigest: string;
|
|
177
|
+
}
|
|
178
|
+
export declare function sandboxWorkerFailureMessage(exitCode: number, stderr: string, containerError: string | null): string;
|
|
179
|
+
interface ResourceNames {
|
|
180
|
+
prefix: string;
|
|
181
|
+
container: string;
|
|
182
|
+
network: string;
|
|
183
|
+
egressNetwork: string;
|
|
184
|
+
workspaceVolume: string;
|
|
185
|
+
controlVolume: string;
|
|
186
|
+
secretsVolume: string;
|
|
187
|
+
credentialsVolume: string;
|
|
188
|
+
egressConfigVolume: string;
|
|
189
|
+
cacheVolumes: Record<string, string>;
|
|
190
|
+
}
|
|
191
|
+
interface SandboxRuntimeVolume {
|
|
192
|
+
readonly name: string;
|
|
193
|
+
readonly role: string;
|
|
194
|
+
}
|
|
195
|
+
export declare function parseDockerMemoryBytes(value: string): number | null;
|
|
196
|
+
export declare function parseDockerStatsMemorySample(output: string): DockerStatsMemorySample[];
|
|
197
|
+
interface ActiveSandbox {
|
|
198
|
+
dispatchAttemptId: string;
|
|
199
|
+
fencingToken: string;
|
|
200
|
+
expiresAt: string;
|
|
201
|
+
controller: AbortController;
|
|
202
|
+
phase: "starting" | "active";
|
|
203
|
+
runtimeLease: RuntimeIsolationLease;
|
|
204
|
+
ledger: SandboxLedger | null;
|
|
205
|
+
leaseControlKey: string;
|
|
206
|
+
}
|
|
207
|
+
export declare function assertSandboxImportCurrent(expected: Pick<ActiveSandbox, "dispatchAttemptId" | "fencingToken" | "expiresAt">, current: Pick<ActiveSandbox, "dispatchAttemptId" | "fencingToken"> | undefined, signal: AbortSignal, nowMs?: number): void;
|
|
208
|
+
interface SandboxLedger {
|
|
209
|
+
schemaVersion: 3;
|
|
210
|
+
runtimeLease: RuntimeIsolationLease;
|
|
211
|
+
resources: ResourceNames;
|
|
212
|
+
labels: Record<string, string>;
|
|
213
|
+
includeCredentials?: boolean;
|
|
214
|
+
peakMemory?: SandboxPeakMemoryTelemetry;
|
|
215
|
+
}
|
|
216
|
+
interface LegacySandboxLedger {
|
|
217
|
+
schemaVersion: 2;
|
|
218
|
+
resourceLeaseId: string;
|
|
219
|
+
dispatchAttemptId: string;
|
|
220
|
+
fencingToken: string;
|
|
221
|
+
runnerInstanceId: string;
|
|
222
|
+
expiresAt: string;
|
|
223
|
+
resources: ResourceNames;
|
|
224
|
+
labels: Record<string, string>;
|
|
225
|
+
includeCredentials?: boolean;
|
|
226
|
+
peakMemory?: SandboxPeakMemoryTelemetry;
|
|
227
|
+
}
|
|
228
|
+
export declare function validSandboxLedger(value: unknown): boolean;
|
|
229
|
+
export declare function normalizeSandboxLedger(value: unknown): SandboxLedger | null;
|
|
230
|
+
export declare function resourceNames(attemptHex: string, perAttemptCaches?: readonly string[]): ResourceNames;
|
|
231
|
+
export declare function dockerObjectId(output: string, kind: "container" | "network"): string;
|
|
232
|
+
export declare function sandboxRuntimeVolumes(resources: ResourceNames, includeEgressPolicy?: boolean, includeCredentials?: boolean): SandboxRuntimeVolume[];
|
|
233
|
+
export declare function sandboxRuntimeCleanupVolumeNames(resources: ResourceNames, includeCredentials?: boolean): string[];
|
|
234
|
+
export declare function sandboxResourceLabels(dispatch: RunOnceDispatchPacket, image: string, contract: string): Record<string, string>;
|
|
235
|
+
export declare function mayReapManagedResource(labels: Readonly<Record<string, string>>, runnerId: string, liveAttempts: ReadonlySet<string>): boolean;
|
|
236
|
+
export declare function shouldReapSandboxLedger(ledger: Readonly<Pick<SandboxLedger, "runtimeLease">> | Readonly<Pick<LegacySandboxLedger, "dispatchAttemptId" | "fencingToken" | "runnerInstanceId" | "expiresAt">>, currentRunnerInstanceId: string, serverAttempt: SandboxAttemptSnapshot | undefined, snapshotAvailable: boolean, nowMs?: number): boolean;
|
|
237
|
+
export declare function bridgeRuntimeCacheMatches(record: Pick<ImageCacheRecord, "bridgeRuntimeDigest"> | null | undefined, expectedDigest: string, imageLabels: readonly (Readonly<Record<string, string>> | null | undefined)[]): boolean;
|
|
238
|
+
export declare function prepareOverlayBuildRoot(overlayRoot: string): Promise<void>;
|
|
239
|
+
export declare function extractOciLayoutArchive(archivePath: string, destination: string, signal?: AbortSignal): Promise<void>;
|
|
240
|
+
export declare function ociLayoutContextRef(layoutPath: string): string;
|
|
241
|
+
export declare function formatOciExtractionFailure(result: {
|
|
242
|
+
readonly stdout: string;
|
|
243
|
+
readonly stderr: string;
|
|
244
|
+
readonly truncated: boolean;
|
|
245
|
+
}): string;
|
|
246
|
+
export declare function readOciLayoutImageDigest(layoutRoot: string): Promise<string>;
|
|
247
|
+
export declare function removeExtractedOciLayout(layoutRoot: string): Promise<void>;
|
|
248
|
+
export declare function ociLayoutScanTarget(layoutPath: string): string;
|
|
249
|
+
export declare function agentOverlayDockerignore(): string;
|
|
250
|
+
export interface SandboxImageCacheKeyInput {
|
|
251
|
+
readonly contextDigest: string;
|
|
252
|
+
readonly contractDigest: string;
|
|
253
|
+
readonly platform: string;
|
|
254
|
+
readonly architecture: string;
|
|
255
|
+
readonly bridgeVersion: string;
|
|
256
|
+
readonly bridgeRuntimeDigest: string;
|
|
257
|
+
readonly toolingImage: string;
|
|
258
|
+
readonly codexVersion: string;
|
|
259
|
+
readonly policy: string;
|
|
260
|
+
readonly policyConfigurationDigest: string;
|
|
261
|
+
}
|
|
262
|
+
export declare function sandboxImageCacheKey(input: SandboxImageCacheKeyInput): string;
|
|
263
|
+
export declare function bridgeRuntimeContentDigest(packageRoot: string): Promise<string>;
|
|
264
|
+
export declare function agentOverlayDockerfile(toolingImage: string, projectContextName: string, installMode: BridgePackageInstallMode, codexVersion: string): string;
|
|
265
|
+
export type BridgePackageInstallMode = "ci" | "install";
|
|
266
|
+
export declare function copyBridgePackageManifests(packageRoot: string, bridgeRoot: string): Promise<BridgePackageInstallMode>;
|
|
267
|
+
export declare function bridgePackageInstallCommand(mode: BridgePackageInstallMode, codexVersion: string): string;
|
|
268
|
+
export declare function buildxBuildArgs(builder: string, metadataFile: string, tail: readonly string[], environment?: NodeJS.ProcessEnv, options?: {
|
|
269
|
+
readonly load?: boolean;
|
|
270
|
+
}): string[];
|
|
271
|
+
export declare function buildResourcePolicy(environment?: NodeJS.ProcessEnv): {
|
|
272
|
+
readonly nofile: number;
|
|
273
|
+
readonly sharedMemory: string;
|
|
274
|
+
readonly builderPidsLimit: number;
|
|
275
|
+
readonly builderMemoryBytes: number;
|
|
276
|
+
};
|
|
277
|
+
export declare function dedicatedBuildxBuilderName(runnerId: string, dockerContext: string | null | undefined): string;
|
|
278
|
+
export declare function dedicatedBuildxBuilderContainerName(builder: string): string;
|
|
279
|
+
export declare function selectImageGcCandidates(records: readonly ImageCacheRecord[], keepPerProject: number, ttlMs: number, nowMs: number): ImageCacheRecord[];
|
|
280
|
+
export declare function workerCreateArgs(dispatch: RunOnceDispatchPacket, contract: ValidatedSandboxContract, resources: ResourceNames, labels: Record<string, string>, image: string, securityOptions?: readonly string[]): string[];
|
|
281
|
+
export declare function validateSandboxMemoryReservation(dispatch: RunOnceDispatchPacket, contract: ValidatedSandboxContract): void;
|
|
282
|
+
export declare function cacheVolumeArgs(contract: ValidatedSandboxContract, resources: ResourceNames): string[];
|
|
283
|
+
export declare function proxyEnvironmentArgs(dispatch: RunOnceDispatchPacket, contract: ValidatedSandboxContract, resources: ResourceNames): string[];
|
|
284
|
+
export declare function egressProxyConfig(allowedHosts: readonly string[]): string;
|
|
285
|
+
export declare function serviceContainerArgs(service: SandboxService, image: string, resources: ResourceNames, labels: Record<string, string>, securityOptions: readonly string[], environment?: NodeJS.ProcessEnv): string[];
|
|
286
|
+
export declare function resolveSandboxSecurityOptions(executionPolicy: string, environment?: NodeJS.ProcessEnv): string[];
|
|
287
|
+
export declare function networkCreateArgs(dispatch: RunOnceDispatchPacket, environment?: NodeJS.ProcessEnv, allowOpenPublicSandbox?: boolean): string[];
|
|
288
|
+
export declare function classifySandboxRuntimeFailure(value: string): {
|
|
289
|
+
readonly code: string;
|
|
290
|
+
readonly phase: string;
|
|
291
|
+
readonly message: string;
|
|
292
|
+
};
|
|
293
|
+
export declare function classifySandboxResourceFailure(value: string): {
|
|
294
|
+
readonly code: string;
|
|
295
|
+
readonly message: string;
|
|
296
|
+
} | null;
|
|
297
|
+
export {};
|