@loucompanion/forge-bridge 0.1.3-dev.f66395c3ac21 → 0.1.4-dev.1ff37038366e
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 +165 -1
- package/dist/bridge/bridge-chat.types.d.ts +111 -0
- package/dist/bridge/bridge-chat.types.js +401 -0
- package/dist/bridge/bridge.base.d.ts +9 -1
- package/dist/bridge/bridge.service.d.ts +129 -3
- package/dist/bridge/bridge.service.js +2427 -70
- package/dist/bridge/bridge.types.d.ts +218 -2
- package/dist/bridge/dispatch-result-outbox.d.ts +25 -0
- package/dist/bridge/dispatch-result-outbox.js +62 -0
- package/dist/bridge/dispatch-result-worker.d.ts +2 -0
- package/dist/bridge/dispatch-result-worker.js +122 -0
- package/dist/bridge/internals.d.ts +2 -0
- package/dist/bridge/internals.js +1 -0
- package/dist/bridge/readiness-result-outbox.d.ts +21 -0
- package/dist/bridge/readiness-result-outbox.js +54 -0
- package/dist/bridge/readiness-result-worker.d.ts +2 -0
- package/dist/bridge/readiness-result-worker.js +121 -0
- package/dist/bridge/runner-host-capabilities.d.ts +15 -0
- package/dist/bridge/runner-host-capabilities.js +93 -0
- package/dist/cleanup/cleanup.service.d.ts +14 -2
- package/dist/cleanup/cleanup.service.js +496 -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 +55 -7
- package/dist/cli/cli.service.js +429 -219
- package/dist/cli/local-config.d.ts +7 -0
- package/dist/cli/local-config.js +51 -3
- package/dist/runtime/aspnet-runtime-prebuild.d.ts +36 -0
- package/dist/runtime/aspnet-runtime-prebuild.js +341 -0
- package/dist/runtime/attempt-database-broker.d.ts +89 -0
- package/dist/runtime/attempt-database-broker.js +390 -0
- package/dist/runtime/attempt-node-runtime-launcher.d.ts +18 -0
- package/dist/runtime/attempt-node-runtime-launcher.js +140 -0
- package/dist/runtime/attempt-path-operation.d.ts +21 -0
- package/dist/runtime/attempt-path-operation.js +94 -0
- package/dist/runtime/attempt-private-directory.d.ts +6 -0
- package/dist/runtime/attempt-private-directory.js +54 -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 +97 -0
- package/dist/runtime/attempt-process-supervisor.js +397 -0
- package/dist/runtime/canonical-source-file.d.ts +3 -0
- package/dist/runtime/canonical-source-file.js +54 -0
- package/dist/runtime/docker-engine-probe.d.ts +90 -0
- package/dist/runtime/docker-engine-probe.js +333 -0
- package/dist/runtime/generated-output-reset.d.ts +20 -0
- package/dist/runtime/generated-output-reset.js +157 -0
- package/dist/runtime/host-database-capability-boundary.d.ts +16 -0
- package/dist/runtime/host-database-capability-boundary.js +62 -0
- package/dist/runtime/host-diagnostics.d.ts +11 -0
- package/dist/runtime/host-diagnostics.js +191 -0
- package/dist/runtime/host-execution-root.d.ts +4 -0
- package/dist/runtime/host-execution-root.js +39 -0
- package/dist/runtime/host-listener-inspector.d.ts +51 -0
- package/dist/runtime/host-listener-inspector.js +385 -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 +58 -0
- package/dist/runtime/host-runtime-contract.js +813 -0
- package/dist/runtime/host-runtime-lease.d.ts +217 -0
- package/dist/runtime/host-runtime-lease.js +2487 -0
- package/dist/runtime/host-runtime-promotion.d.ts +32 -0
- package/dist/runtime/host-runtime-promotion.js +206 -0
- package/dist/runtime/memory-capacity.d.ts +70 -0
- package/dist/runtime/memory-capacity.js +123 -0
- package/dist/runtime/native-test-postgres-fallback.d.ts +25 -0
- package/dist/runtime/native-test-postgres-fallback.js +91 -0
- package/dist/runtime/node-host-runtime-adapter.d.ts +54 -0
- package/dist/runtime/node-host-runtime-adapter.js +285 -0
- package/dist/runtime/pinned-directory-process.d.ts +9 -0
- package/dist/runtime/pinned-directory-process.js +61 -0
- package/dist/runtime/pinned-source-directory.d.ts +17 -0
- package/dist/runtime/pinned-source-directory.js +94 -0
- package/dist/runtime/playwright-host-runtime-adapter.d.ts +21 -0
- package/dist/runtime/playwright-host-runtime-adapter.js +268 -0
- package/dist/runtime/prepared-runtime-identity.d.ts +6 -0
- package/dist/runtime/prepared-runtime-identity.js +218 -0
- package/dist/runtime/prepared-runtime-readiness.d.ts +30 -0
- package/dist/runtime/prepared-runtime-readiness.js +285 -0
- package/dist/runtime/runtime-isolation-lease.d.ts +67 -0
- package/dist/runtime/runtime-isolation-lease.js +161 -0
- package/dist/runtime/workspace-resource-estimator.d.ts +17 -0
- package/dist/runtime/workspace-resource-estimator.js +174 -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 +84 -0
- package/dist/sandbox/preflight.js +521 -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 +6 -0
- package/dist/sandbox/repository-lock.js +128 -0
- package/dist/sandbox/runtime.d.ts +302 -0
- package/dist/sandbox/runtime.js +2367 -0
- package/dist/sandbox/sandbox.types.d.ts +93 -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 +74 -0
- package/dist/session/managed-attempt-tools.d.ts +28 -0
- package/dist/session/managed-attempt-tools.js +1015 -0
- package/dist/session/managed-build-coordinator.d.ts +5 -0
- package/dist/session/managed-build-coordinator.js +105 -0
- package/dist/session/managed-build-receipt.d.ts +21 -0
- package/dist/session/managed-build-receipt.js +337 -0
- package/dist/session/managed-verification-timeouts.d.ts +8 -0
- package/dist/session/managed-verification-timeouts.js +17 -0
- package/dist/session/phase-completion.artifacts.d.ts +27 -0
- package/dist/session/phase-completion.artifacts.js +829 -0
- package/dist/session/phase-completion.d.ts +53 -42
- package/dist/session/phase-completion.helpers.d.ts +117 -0
- package/dist/session/phase-completion.helpers.js +707 -0
- package/dist/session/phase-completion.js +125 -3007
- package/dist/session/phase-completion.prompts.d.ts +14 -0
- package/dist/session/phase-completion.prompts.js +233 -0
- package/dist/session/phase-completion.runtime.d.ts +49 -0
- package/dist/session/phase-completion.runtime.js +840 -0
- package/dist/session/phase-completion.schemas.d.ts +3 -0
- package/dist/session/phase-completion.schemas.js +859 -0
- package/dist/session/phase-completion.validation.d.ts +38 -0
- package/dist/session/phase-completion.validation.js +918 -0
- package/dist/session/pre-publication-validation.d.ts +75 -0
- package/dist/session/pre-publication-validation.js +661 -0
- package/dist/session/provider-cli/bridge-cli.conformance-fixtures.d.ts +72 -0
- package/dist/session/provider-cli/bridge-cli.conformance-fixtures.js +462 -0
- package/dist/session/provider-cli/ci-repair-readiness.d.ts +16 -0
- package/dist/session/provider-cli/ci-repair-readiness.js +110 -0
- package/dist/session/provider-cli/provider-cli.artifacts.d.ts +95 -0
- package/dist/session/provider-cli/provider-cli.artifacts.js +812 -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 +407 -0
- package/dist/session/provider-cli/provider-cli.process.d.ts +99 -0
- package/dist/session/provider-cli/provider-cli.process.js +874 -0
- package/dist/session/provider-cli/provider-cli.prompts.d.ts +52 -0
- package/dist/session/provider-cli/provider-cli.prompts.js +715 -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.repair-epoch.d.ts +6 -0
- package/dist/session/provider-cli/provider-cli.repair-epoch.js +11 -0
- package/dist/session/provider-cli/provider-cli.runtime.d.ts +16 -0
- package/dist/session/provider-cli/provider-cli.runtime.js +81 -0
- package/dist/session/provider-cli/provider-cli.service.d.ts +47 -53
- package/dist/session/provider-cli/provider-cli.service.js +1257 -2497
- package/dist/session/provider-cli/provider-cli.types.d.ts +8 -0
- package/dist/session/provider-cli/provider-output-state.d.ts +32 -0
- package/dist/session/provider-cli/provider-output-state.js +817 -0
- package/dist/session/provider-cli/provider-usage.d.ts +7 -0
- package/dist/session/provider-cli/provider-usage.js +28 -5
- package/dist/session/session-redaction.d.ts +3 -0
- package/dist/session/session-redaction.js +448 -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 +586 -59
- package/dist/session/session.types.d.ts +324 -3
- package/dist/session/session.types.js +939 -10
- package/dist/session/unreferenced-exports.d.ts +12 -0
- package/dist/session/unreferenced-exports.js +59 -0
- package/dist/shared/format/format-bytes.d.ts +1 -0
- package/dist/shared/format/format-bytes.js +9 -0
- package/dist/shared/git/git.js +2 -1
- package/dist/shared/path/path.d.ts +1 -0
- package/dist/shared/path/path.js +21 -1
- package/dist/shared/process/dotnet-toolchain.d.ts +17 -0
- package/dist/shared/process/dotnet-toolchain.js +307 -0
- 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 +59 -0
- package/dist/shared/process/host-process-supervisor.js +330 -0
- package/dist/shared/process/process.d.ts +3 -0
- package/dist/shared/process/process.js +13 -7
- 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 +4 -0
- package/dist/shared/provider-capabilities.js +88 -0
- package/dist/shared/redaction/redaction.d.ts +1 -0
- package/dist/shared/redaction/redaction.js +47 -4
- 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 +53 -1
- package/dist/worktree/dependency-warmer.js +619 -11
- package/dist/worktree/index.d.ts +2 -1
- 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/story-qa-reference-hydrator.d.ts +4 -0
- package/dist/worktree/story-qa-reference-hydrator.js +253 -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 +16 -3
- package/dist/worktree/worktree.service.js +334 -54
- package/dist/worktree/worktree.types.d.ts +9 -1
- package/package.json +12 -7
- package/runtime/windows-job-supervisor.ps1 +722 -0
- package/runtime/windows-listener-owner.ps1 +33 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import type { RunOnceDispatchPacket } from "../session/session.types.js";
|
|
2
|
+
import { type ProviderProcessRunner } from "../session/provider-cli/provider-cli.process.js";
|
|
3
|
+
import { type RuntimeIsolationLease } from "./runtime-isolation-lease.js";
|
|
4
|
+
import { type LoadedHostRuntimeContract } from "./host-runtime-contract.js";
|
|
5
|
+
import { HostPortBroker } from "./host-port-broker.js";
|
|
6
|
+
import { NodeHostRuntimeAdapter, type NodeRuntimeAdapterLaunch, type NodeRuntimeCommand, type NodeRuntimeCommandLauncher } from "./node-host-runtime-adapter.js";
|
|
7
|
+
import type { AttemptProcessTreeMemoryTelemetry } from "./attempt-process-supervisor.js";
|
|
8
|
+
import { AttemptProcessSupervisorRegistry } from "./attempt-process-supervisor-registry.js";
|
|
9
|
+
import { type AttemptDatabaseBroker } from "./attempt-database-broker.js";
|
|
10
|
+
import { HostListenerInspector } from "./host-listener-inspector.js";
|
|
11
|
+
import { type MemoryAdmissionDiagnostics } from "./memory-capacity.js";
|
|
12
|
+
import { PlaywrightHostRuntimeAdapter } from "./playwright-host-runtime-adapter.js";
|
|
13
|
+
import { HostParallelPromotionStore } from "./host-runtime-promotion.js";
|
|
14
|
+
import { type HostProcessRecovery } from "../shared/process/host-process-recovery.js";
|
|
15
|
+
export interface HostRuntimeLeaseStart {
|
|
16
|
+
readonly lease: RuntimeIsolationLease;
|
|
17
|
+
readonly environment: Readonly<Record<string, string>>;
|
|
18
|
+
readonly runtimeContract: LoadedHostRuntimeContract;
|
|
19
|
+
readonly executionClass: HostRuntimeExecutionClass;
|
|
20
|
+
}
|
|
21
|
+
export interface HostRuntimeAdmissionCheckpoint {
|
|
22
|
+
readonly code: "host_runtime_serial_admission_waiting" | "host_runtime_prepared_probe_started" | "host_runtime_prepared_probe_progress" | "host_runtime_prepared_probe_completed" | "host_runtime_prepared_admission_waiting" | "host_runtime_prepared_admission_acquired";
|
|
23
|
+
readonly message: string;
|
|
24
|
+
readonly expiresAt: string;
|
|
25
|
+
}
|
|
26
|
+
export type HostRuntimeAdmissionCheckpointHandler = (checkpoint: HostRuntimeAdmissionCheckpoint) => void | Promise<void>;
|
|
27
|
+
export interface HostRuntimeProjectCheckpoint {
|
|
28
|
+
readonly code: "host_runtime_build_started" | "host_runtime_build_cached" | "host_runtime_build_completed" | "host_runtime_database_provisioned";
|
|
29
|
+
readonly message: string;
|
|
30
|
+
readonly data?: Readonly<Record<string, unknown>>;
|
|
31
|
+
}
|
|
32
|
+
export type HostRuntimeProjectCheckpointHandler = (checkpoint: HostRuntimeProjectCheckpoint) => void | Promise<void>;
|
|
33
|
+
export type HostRuntimeExecutionClass = "analysis_only" | "managed_runtime";
|
|
34
|
+
export type HostRuntimeSafetyClass = "host_serial_only" | "host_parallel_candidate" | "host_parallel_safe";
|
|
35
|
+
export interface HostRuntimeProjectCapacitySnapshot {
|
|
36
|
+
readonly repoId: string;
|
|
37
|
+
readonly safetyClass: HostRuntimeSafetyClass;
|
|
38
|
+
readonly activeAttempts: number;
|
|
39
|
+
readonly reservedAttempts: number;
|
|
40
|
+
readonly waitingAttempts: number;
|
|
41
|
+
readonly degradedAttempts: number;
|
|
42
|
+
readonly runtimeContractFingerprint?: string | null;
|
|
43
|
+
readonly runtimeContractSource?: "project" | "derived" | null;
|
|
44
|
+
readonly promotedAt?: string | null;
|
|
45
|
+
}
|
|
46
|
+
export interface HostRuntimeCapacitySnapshot {
|
|
47
|
+
readonly preparedWorktreeReadiness?: boolean;
|
|
48
|
+
readonly activeAttempts: number;
|
|
49
|
+
readonly reservedAttempts: number;
|
|
50
|
+
readonly waitingAttempts: number;
|
|
51
|
+
readonly degradedAttempts: number;
|
|
52
|
+
readonly exclusiveReservations: number;
|
|
53
|
+
readonly sharedReservations: number;
|
|
54
|
+
readonly hardMaxAttempts: number;
|
|
55
|
+
readonly effectiveMaxAttempts: number;
|
|
56
|
+
readonly availableAttempts: number;
|
|
57
|
+
readonly totalMemoryBytes: number;
|
|
58
|
+
readonly availableMemoryBytes: number;
|
|
59
|
+
readonly hostReserveBytes: number;
|
|
60
|
+
readonly availableCpuMillis: number;
|
|
61
|
+
readonly availableWorkspaceBytes: number;
|
|
62
|
+
readonly activeReservationMemoryBytes: number;
|
|
63
|
+
readonly memoryAdmission: MemoryAdmissionDiagnostics;
|
|
64
|
+
readonly unavailableCode?: string | null;
|
|
65
|
+
readonly unavailableReason?: string | null;
|
|
66
|
+
readonly projects: readonly HostRuntimeProjectCapacitySnapshot[];
|
|
67
|
+
}
|
|
68
|
+
export interface HostRuntimeReapOptions {
|
|
69
|
+
readonly runnerId: string;
|
|
70
|
+
readonly runnerInstanceId: string;
|
|
71
|
+
readonly nowMs?: number;
|
|
72
|
+
}
|
|
73
|
+
export interface HostRuntimeReapReport {
|
|
74
|
+
readonly examined: number;
|
|
75
|
+
readonly reaped: number;
|
|
76
|
+
readonly processesTerminated: number;
|
|
77
|
+
readonly reusedPidsProtected: number;
|
|
78
|
+
readonly degraded: number;
|
|
79
|
+
/**
|
|
80
|
+
* Active attempts of a previous runner instance whose every supervised
|
|
81
|
+
* process tree was proved absent, terminated or PID-reused. Forge may settle
|
|
82
|
+
* these exact attempts instead of leaving their launch outcome unknown.
|
|
83
|
+
*/
|
|
84
|
+
readonly recoveredAttempts?: readonly HostRuntimeRecoveredAttempt[];
|
|
85
|
+
}
|
|
86
|
+
export interface HostRuntimeRecoveredAttempt {
|
|
87
|
+
readonly dispatchAttemptId: string;
|
|
88
|
+
readonly fencingToken: string;
|
|
89
|
+
readonly runnerInstanceId: string;
|
|
90
|
+
}
|
|
91
|
+
export interface HostNodeRuntimeLaunch<T> extends NodeRuntimeAdapterLaunch<T> {
|
|
92
|
+
readonly runtimeLease: RuntimeIsolationLease;
|
|
93
|
+
}
|
|
94
|
+
export interface HostRuntimeLeaseRuntime {
|
|
95
|
+
acquirePreparation?(dispatch: RunOnceDispatchPacket, signal?: AbortSignal): Promise<readonly string[]>;
|
|
96
|
+
acquire(dispatch: RunOnceDispatchPacket, signal?: AbortSignal): Promise<readonly string[]>;
|
|
97
|
+
start(dispatch: RunOnceDispatchPacket, worktreePath: string, signal?: AbortSignal, onAdmissionCheckpoint?: HostRuntimeAdmissionCheckpointHandler): Promise<HostRuntimeLeaseStart>;
|
|
98
|
+
startConfiguredProject(dispatchAttemptId: string, fencingToken: string, signal?: AbortSignal, onProjectCheckpoint?: HostRuntimeProjectCheckpointHandler): Promise<HostRuntimeLeaseStart>;
|
|
99
|
+
updateLease(dispatchAttemptId: string, fencingToken: string, expiresAt: string): Promise<void>;
|
|
100
|
+
providerProcessRunner?(dispatchAttemptId: string, fencingToken: string): ProviderProcessRunner | null;
|
|
101
|
+
providerMemoryTelemetry?(dispatchAttemptId: string, fencingToken: string): AttemptProcessTreeMemoryTelemetry | null;
|
|
102
|
+
release(dispatchAttemptId: string, fencingToken: string): Promise<RuntimeIsolationLease | null>;
|
|
103
|
+
invalidatePromotion?(repoId: string, scope?: "all" | "discovery"): Promise<void>;
|
|
104
|
+
hasForegroundDemand?(): boolean;
|
|
105
|
+
reap?(options: HostRuntimeReapOptions): Promise<HostRuntimeReapReport>;
|
|
106
|
+
snapshot?(): HostRuntimeCapacitySnapshot;
|
|
107
|
+
}
|
|
108
|
+
export interface HostCapacityResourceSample {
|
|
109
|
+
readonly totalMemoryBytes: number;
|
|
110
|
+
readonly availableMemoryBytes: number;
|
|
111
|
+
readonly totalCpuMillis: number;
|
|
112
|
+
readonly availableWorkspaceBytes: number;
|
|
113
|
+
}
|
|
114
|
+
export declare class HostRuntimeLeaseManager implements HostRuntimeLeaseRuntime {
|
|
115
|
+
private readonly stateRoot;
|
|
116
|
+
private readonly processSupervisors;
|
|
117
|
+
private readonly processRunner;
|
|
118
|
+
private readonly listenerInspector;
|
|
119
|
+
private readonly promotionStore;
|
|
120
|
+
private readonly playwrightAdapter;
|
|
121
|
+
private readonly processRecovery;
|
|
122
|
+
private readonly capacityResourceSample?;
|
|
123
|
+
private readonly databaseBroker;
|
|
124
|
+
private readonly preparedReadiness;
|
|
125
|
+
private readonly active;
|
|
126
|
+
private readonly pendingRenewals;
|
|
127
|
+
private readonly acquiringAdmissions;
|
|
128
|
+
private readonly admissions;
|
|
129
|
+
private readonly singletonOwners;
|
|
130
|
+
private readonly singletonWaiters;
|
|
131
|
+
private readonly parallelProjectOwners;
|
|
132
|
+
private readonly parallelProjectWaiters;
|
|
133
|
+
private readonly capacityReservations;
|
|
134
|
+
private readonly capacityWaiters;
|
|
135
|
+
private capacityWaiterScanCursor;
|
|
136
|
+
private readonly backgroundAdmissionWaiters;
|
|
137
|
+
private readonly degraded;
|
|
138
|
+
private readonly knownPromotions;
|
|
139
|
+
private ledgerWriteTail;
|
|
140
|
+
private workspaceAvailableBytes;
|
|
141
|
+
private readonly portBroker;
|
|
142
|
+
private readonly nodeAdapter;
|
|
143
|
+
private readonly capacityConfiguration;
|
|
144
|
+
private readonly memoryAvailability;
|
|
145
|
+
private readonly executionRoot;
|
|
146
|
+
constructor(stateRoot: string, portBroker?: HostPortBroker, nodeAdapter?: NodeHostRuntimeAdapter, processSupervisors?: AttemptProcessSupervisorRegistry, processRunner?: ProviderProcessRunner, listenerInspector?: HostListenerInspector, promotionStore?: HostParallelPromotionStore, playwrightAdapter?: PlaywrightHostRuntimeAdapter, processRecovery?: HostProcessRecovery, capacityResourceSample?: HostCapacityResourceSample | undefined, executionRoot?: string, databaseBroker?: AttemptDatabaseBroker | null);
|
|
147
|
+
reap(options: HostRuntimeReapOptions): Promise<HostRuntimeReapReport>;
|
|
148
|
+
snapshot(): HostRuntimeCapacitySnapshot;
|
|
149
|
+
hasForegroundDemand(): boolean;
|
|
150
|
+
acquirePreparation(dispatch: RunOnceDispatchPacket, signal?: AbortSignal): Promise<readonly string[]>;
|
|
151
|
+
acquire(dispatch: RunOnceDispatchPacket, signal?: AbortSignal): Promise<readonly string[]>;
|
|
152
|
+
private reserveHostCapacity;
|
|
153
|
+
private reserveBackgroundAdmission;
|
|
154
|
+
private hostCapacityAvailable;
|
|
155
|
+
private hostCapacityImpossibleReason;
|
|
156
|
+
private hostResourceSnapshot;
|
|
157
|
+
private refreshWorkspaceCapacity;
|
|
158
|
+
private releaseHostCapacity;
|
|
159
|
+
private drainCapacityWaiters;
|
|
160
|
+
private capacityWaitersForScan;
|
|
161
|
+
private detachCapacityWaiter;
|
|
162
|
+
private reserveSingletonKeys;
|
|
163
|
+
private reserveParallelProject;
|
|
164
|
+
private upgradeParallelProjectToSingleton;
|
|
165
|
+
start(dispatch: RunOnceDispatchPacket, worktreePath: string, signal?: AbortSignal, onAdmissionCheckpoint?: HostRuntimeAdmissionCheckpointHandler): Promise<HostRuntimeLeaseStart>;
|
|
166
|
+
updateLease(dispatchAttemptId: string, fencingToken: string, expiresAt: string): Promise<void>;
|
|
167
|
+
startConfiguredProject(dispatchAttemptId: string, fencingToken: string, signal?: AbortSignal, onProjectCheckpoint?: HostRuntimeProjectCheckpointHandler): Promise<HostRuntimeLeaseStart>;
|
|
168
|
+
providerProcessRunner(dispatchAttemptId: string, fencingToken: string): ProviderProcessRunner | null;
|
|
169
|
+
private markCapacityReservationRunning;
|
|
170
|
+
providerMemoryTelemetry(dispatchAttemptId: string, fencingToken: string): AttemptProcessTreeMemoryTelemetry | null;
|
|
171
|
+
private promoteVerifiedRuntime;
|
|
172
|
+
launchNodeRuntime<T>(dispatchAttemptId: string, fencingToken: string, portName: string, command: NodeRuntimeCommand, launcher: NodeRuntimeCommandLauncher<T>, signal?: AbortSignal): Promise<HostNodeRuntimeLaunch<T>>;
|
|
173
|
+
release(dispatchAttemptId: string, fencingToken: string, preservePreparation?: boolean): Promise<RuntimeIsolationLease | null>;
|
|
174
|
+
private readLedgers;
|
|
175
|
+
private recoverPersistedProcesses;
|
|
176
|
+
private markLedgerDegraded;
|
|
177
|
+
private rememberDegraded;
|
|
178
|
+
private forgetDegraded;
|
|
179
|
+
private attemptRoot;
|
|
180
|
+
private writeLedger;
|
|
181
|
+
private writeLedgerAtomic;
|
|
182
|
+
private ledgerPath;
|
|
183
|
+
private singletonKeysAvailable;
|
|
184
|
+
private assignSingletonKeys;
|
|
185
|
+
private releaseSingletonKeys;
|
|
186
|
+
private convertSingletonToParallelProject;
|
|
187
|
+
private parallelProjectOwned;
|
|
188
|
+
private parallelProjectAvailable;
|
|
189
|
+
private assignParallelProject;
|
|
190
|
+
private releaseParallelProjectNoDrain;
|
|
191
|
+
private releaseParallelProjects;
|
|
192
|
+
private deleteAdmission;
|
|
193
|
+
private renewAdmissionWaiterDeadline;
|
|
194
|
+
private clearPendingRenewal;
|
|
195
|
+
private cancelAdmissionWaiters;
|
|
196
|
+
private drainSingletonWaiters;
|
|
197
|
+
private drainParallelProjectWaiters;
|
|
198
|
+
private drainBackgroundAdmissionWaiters;
|
|
199
|
+
private refreshKnownPromotions;
|
|
200
|
+
invalidatePromotion(repoId: string, scope?: "all" | "discovery"): Promise<void>;
|
|
201
|
+
private drainAdmissionWaiters;
|
|
202
|
+
private reconcileReservationOwners;
|
|
203
|
+
private reservationOwnerIsLive;
|
|
204
|
+
private hasAttemptRepresentation;
|
|
205
|
+
}
|
|
206
|
+
export declare class HostRuntimeLeaseCleanupError extends Error {
|
|
207
|
+
readonly lease: RuntimeIsolationLease;
|
|
208
|
+
constructor(lease: RuntimeIsolationLease, cause: unknown);
|
|
209
|
+
}
|
|
210
|
+
export declare class HostRuntimeAdmissionExpiredError extends Error {
|
|
211
|
+
constructor();
|
|
212
|
+
}
|
|
213
|
+
export declare class HostRuntimeCapacityRequestImpossibleError extends Error {
|
|
214
|
+
constructor(reason: string);
|
|
215
|
+
}
|
|
216
|
+
export declare function hostRuntimeEventResources(lease: RuntimeIsolationLease, runtimeContract?: LoadedHostRuntimeContract, executionClass?: HostRuntimeExecutionClass): Record<string, unknown>;
|
|
217
|
+
export declare function hostRuntimeSingletonKeys(dispatch: RunOnceDispatchPacket): readonly string[];
|