@loucompanion/forge-bridge 0.1.4-dev.63db04bcffca → 0.1.4-dev.81e48ecc185d
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 +54 -2
- package/dist/bridge/bridge-chat-provider-command.d.ts +16 -0
- package/dist/bridge/bridge-chat-provider-command.js +125 -0
- package/dist/bridge/bridge.base.d.ts +9 -0
- package/dist/bridge/bridge.service.d.ts +85 -3
- package/dist/bridge/bridge.service.js +361 -122
- package/dist/bridge/bridge.types.d.ts +22 -0
- package/dist/bridge/dispatch-result-outbox.d.ts +11 -1
- package/dist/bridge/dispatch-result-outbox.js +31 -6
- package/dist/bridge/local-yield-flag.d.ts +6 -0
- package/dist/bridge/local-yield-flag.js +34 -0
- package/dist/bridge/runner-host-capabilities.d.ts +2 -0
- package/dist/bridge/runner-host-capabilities.js +4 -0
- package/dist/bridge/test-postgres-capability.d.ts +14 -0
- package/dist/bridge/test-postgres-capability.js +120 -0
- package/dist/cleanup/cleanup.service.d.ts +9 -0
- package/dist/cleanup/cleanup.service.js +72 -109
- package/dist/cleanup/cleanup.types.d.ts +4 -0
- package/dist/cleanup/forge-owned-paths.d.ts +9 -0
- package/dist/cleanup/forge-owned-paths.js +53 -0
- package/dist/cleanup/host-runtime-ledger.d.ts +5 -0
- package/dist/cleanup/host-runtime-ledger.js +109 -0
- package/dist/cleanup/managed-branch-sweep.d.ts +27 -0
- package/dist/cleanup/managed-branch-sweep.js +111 -0
- package/dist/cli/cli.help.js +18 -0
- package/dist/cli/cli.service.d.ts +16 -0
- package/dist/cli/cli.service.js +142 -16
- package/dist/cli/local-config.d.ts +4 -0
- package/dist/cli/local-config.js +26 -4
- package/dist/runtime/aspnet-runtime-prebuild.js +94 -6
- package/dist/runtime/attempt-process-supervisor.d.ts +19 -0
- package/dist/runtime/attempt-process-supervisor.js +50 -0
- package/dist/runtime/host-database-capability-boundary.d.ts +1 -1
- package/dist/runtime/host-database-capability-boundary.js +1 -0
- package/dist/runtime/host-facts.d.ts +35 -0
- package/dist/runtime/host-facts.js +95 -0
- package/dist/runtime/host-load-admission.d.ts +64 -0
- package/dist/runtime/host-load-admission.js +99 -0
- package/dist/runtime/host-load-child-environment.d.ts +27 -0
- package/dist/runtime/host-load-child-environment.js +76 -0
- package/dist/runtime/host-load-forge-cgroups.d.ts +49 -0
- package/dist/runtime/host-load-forge-cgroups.js +140 -0
- package/dist/runtime/host-load-governor-config.d.ts +52 -0
- package/dist/runtime/host-load-governor-config.js +83 -0
- package/dist/runtime/host-load-governor.d.ts +184 -0
- package/dist/runtime/host-load-governor.js +632 -0
- package/dist/runtime/host-load-ledger-lock.d.ts +69 -0
- package/dist/runtime/host-load-ledger-lock.js +185 -0
- package/dist/runtime/host-load-runtime-settings.d.ts +25 -0
- package/dist/runtime/host-load-runtime-settings.js +78 -0
- package/dist/runtime/host-load-sampler.d.ts +126 -0
- package/dist/runtime/host-load-sampler.js +232 -0
- package/dist/runtime/host-load-step-class.d.ts +70 -0
- package/dist/runtime/host-load-step-class.js +161 -0
- package/dist/runtime/host-load-step-reaper.d.ts +27 -0
- package/dist/runtime/host-load-step-reaper.js +95 -0
- package/dist/runtime/host-load-step-run.d.ts +73 -0
- package/dist/runtime/host-load-step-run.js +102 -0
- package/dist/runtime/host-load-test-slot.d.ts +43 -0
- package/dist/runtime/host-load-test-slot.js +81 -0
- package/dist/runtime/host-load-token-ledger.d.ts +200 -0
- package/dist/runtime/host-load-token-ledger.js +453 -0
- package/dist/runtime/host-pressure-stall.d.ts +61 -0
- package/dist/runtime/host-pressure-stall.js +168 -0
- package/dist/runtime/host-runtime-contract.d.ts +4 -0
- package/dist/runtime/host-runtime-contract.js +6 -1
- package/dist/runtime/host-runtime-lease.d.ts +74 -4
- package/dist/runtime/host-runtime-lease.js +336 -20
- package/dist/runtime/host-runtime-promotion.d.ts +23 -0
- package/dist/runtime/host-runtime-promotion.js +48 -0
- package/dist/runtime/host-runtime-requirements-check.d.ts +17 -0
- package/dist/runtime/host-runtime-requirements-check.js +29 -0
- package/dist/runtime/host-runtime-requirements.d.ts +36 -0
- package/dist/runtime/host-runtime-requirements.js +117 -0
- package/dist/runtime/managed-command-teardown.d.ts +62 -0
- package/dist/runtime/managed-command-teardown.js +607 -0
- package/dist/runtime/playwright-browser-cache.d.ts +39 -0
- package/dist/runtime/playwright-browser-cache.js +227 -0
- package/dist/runtime/playwright-host-runtime-adapter.d.ts +18 -0
- package/dist/runtime/playwright-host-runtime-adapter.js +61 -55
- package/dist/runtime/runner-settings.d.ts +100 -0
- package/dist/runtime/runner-settings.js +214 -0
- package/dist/sandbox/host-capacity-broker.d.ts +113 -0
- package/dist/sandbox/host-capacity-broker.js +334 -0
- package/dist/sandbox/runtime.d.ts +10 -1
- package/dist/sandbox/runtime.js +45 -2
- package/dist/sandbox/sandbox-cgroups.d.ts +14 -0
- package/dist/sandbox/sandbox-cgroups.js +42 -0
- package/dist/session/managed-attempt-tools.d.ts +27 -0
- package/dist/session/managed-attempt-tools.js +356 -41
- package/dist/session/managed-build-coordinator.d.ts +1 -1
- package/dist/session/managed-build-coordinator.js +4 -1
- package/dist/session/managed-command-host-load.d.ts +47 -0
- package/dist/session/managed-command-host-load.js +83 -0
- package/dist/session/mcp-argument-coercion.d.ts +23 -0
- package/dist/session/mcp-argument-coercion.js +121 -0
- package/dist/session/phase-completion.artifacts.d.ts +7 -0
- package/dist/session/phase-completion.artifacts.js +98 -25
- package/dist/session/phase-completion.command-validation.d.ts +7 -0
- package/dist/session/phase-completion.command-validation.js +77 -0
- package/dist/session/phase-completion.d.ts +4 -0
- package/dist/session/phase-completion.helpers.js +13 -12
- package/dist/session/phase-completion.js +4 -0
- package/dist/session/phase-completion.prompts.js +6 -1
- package/dist/session/phase-completion.runtime.d.ts +5 -3
- package/dist/session/phase-completion.runtime.js +70 -35
- package/dist/session/phase-completion.schema-parts.d.ts +19 -0
- package/dist/session/phase-completion.schema-parts.js +188 -0
- package/dist/session/phase-completion.schemas.d.ts +3 -3
- package/dist/session/phase-completion.schemas.js +206 -221
- package/dist/session/phase-completion.validation.d.ts +2 -3
- package/dist/session/phase-completion.validation.js +46 -92
- package/dist/session/pre-publication-host-load.d.ts +27 -0
- package/dist/session/pre-publication-host-load.js +111 -0
- package/dist/session/pre-publication-pass.d.ts +61 -0
- package/dist/session/pre-publication-pass.js +148 -0
- package/dist/session/pre-publication-process.d.ts +23 -0
- package/dist/session/pre-publication-process.js +109 -0
- package/dist/session/pre-publication-skipped-tests.d.ts +21 -0
- package/dist/session/pre-publication-skipped-tests.js +109 -0
- package/dist/session/pre-publication-step-execution.d.ts +11 -0
- package/dist/session/pre-publication-step-execution.js +49 -0
- package/dist/session/pre-publication-validation.d.ts +32 -20
- package/dist/session/pre-publication-validation.js +202 -195
- package/dist/session/provider-cli/claude-background-work.d.ts +66 -0
- package/dist/session/provider-cli/claude-background-work.js +180 -0
- package/dist/session/provider-cli/pre-publication-repair.d.ts +40 -0
- package/dist/session/provider-cli/pre-publication-repair.js +243 -0
- package/dist/session/provider-cli/provider-cli.artifacts.d.ts +2 -1
- package/dist/session/provider-cli/provider-cli.artifacts.js +21 -15
- package/dist/session/provider-cli/provider-cli.merge-integrity.d.ts +89 -0
- package/dist/session/provider-cli/provider-cli.merge-integrity.js +310 -0
- package/dist/session/provider-cli/provider-cli.process.d.ts +39 -2
- package/dist/session/provider-cli/provider-cli.process.js +276 -42
- package/dist/session/provider-cli/provider-cli.prompts.d.ts +7 -0
- package/dist/session/provider-cli/provider-cli.prompts.js +65 -10
- package/dist/session/provider-cli/provider-cli.runtime.js +7 -0
- package/dist/session/provider-cli/provider-cli.service.d.ts +4 -1
- package/dist/session/provider-cli/provider-cli.service.js +203 -172
- package/dist/session/provider-cli/provider-cli.types.d.ts +30 -0
- package/dist/session/provider-cli/provider-in-flight-work.d.ts +10 -0
- package/dist/session/provider-cli/provider-in-flight-work.js +92 -0
- package/dist/session/provider-cli/provider-output-state.d.ts +8 -0
- package/dist/session/provider-cli/provider-output-state.js +15 -0
- package/dist/session/publishable-worktree-changes.d.ts +54 -0
- package/dist/session/publishable-worktree-changes.js +193 -0
- package/dist/session/sandbox-host-capacity-gate.d.ts +30 -0
- package/dist/session/sandbox-host-capacity-gate.js +238 -0
- package/dist/session/session.base.d.ts +9 -1
- package/dist/session/session.service.d.ts +9 -2
- package/dist/session/session.service.js +120 -5
- package/dist/session/session.types.d.ts +3 -0
- package/dist/session/session.types.js +15 -3
- package/dist/session/workspace-runtime-fingerprint.d.ts +32 -0
- package/dist/session/workspace-runtime-fingerprint.js +138 -0
- package/dist/shared/process/host-process-supervisor.d.ts +1 -0
- package/dist/shared/process/host-process-supervisor.js +1 -1
- package/dist/shared/process/process-tree.d.ts +52 -0
- package/dist/shared/process/process-tree.js +144 -0
- package/dist/shared/process/process.d.ts +67 -0
- package/dist/shared/process/process.js +213 -11
- package/dist/shared/provider-capabilities.js +5 -6
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worktree/dependency-warmer.d.ts +25 -0
- package/dist/worktree/dependency-warmer.js +46 -10
- package/dist/worktree/worktree.service.d.ts +10 -1
- package/dist/worktree/worktree.service.js +42 -2
- package/dist/worktree/worktree.types.d.ts +7 -0
- package/package.json +2 -2
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { type HostRuntimeRequirements } from "./host-runtime-requirements.js";
|
|
1
2
|
export declare const hostRuntimeContractPath = ".forge/forge.runtime.yml";
|
|
2
3
|
export declare const hostRuntimeTestPostgresAdminEnvironment = "FORGE_TEST_POSTGRES_ADMIN_CONNECTION_STRING";
|
|
3
4
|
export declare const hostRuntimeLegacyTestPostgresEnvironment = "FORGE_TEST_POSTGRES_CONNECTION_STRING";
|
|
5
|
+
export declare const hostRuntimeTestPostgresProvisionerEnvironment = "FORGE_TEST_POSTGRES_PROVISIONER_CONNECTION_STRING";
|
|
4
6
|
export type RequestedHostConcurrency = "serial" | "parallel" | "disabled";
|
|
5
7
|
export type HostRuntimePortAdapter = "node" | "vite" | "next" | "aspnetcore";
|
|
6
8
|
export interface HostRuntimeLaunchConfig {
|
|
@@ -31,6 +33,8 @@ export interface HostRuntimeContract {
|
|
|
31
33
|
readonly browserProfile: "isolated";
|
|
32
34
|
readonly singletonResources: readonly string[];
|
|
33
35
|
};
|
|
36
|
+
/** Decision 0013 placement requirements; absent or null when the contract declares none. */
|
|
37
|
+
readonly requires?: HostRuntimeRequirements | null;
|
|
34
38
|
}
|
|
35
39
|
export interface LoadedHostRuntimeContract {
|
|
36
40
|
readonly contract: HostRuntimeContract;
|
|
@@ -4,9 +4,12 @@ import path from "node:path";
|
|
|
4
4
|
import { isAlias, parseDocument, visit } from "yaml";
|
|
5
5
|
import { readCanonicalSourceFile } from "./canonical-source-file.js";
|
|
6
6
|
import { isGeneratedOutputDirectoryName } from "./generated-output-reset.js";
|
|
7
|
+
import { parseHostRuntimeRequirements } from "./host-runtime-requirements.js";
|
|
7
8
|
export const hostRuntimeContractPath = ".forge/forge.runtime.yml";
|
|
8
9
|
export const hostRuntimeTestPostgresAdminEnvironment = "FORGE_TEST_POSTGRES_ADMIN_CONNECTION_STRING";
|
|
9
10
|
export const hostRuntimeLegacyTestPostgresEnvironment = "FORGE_TEST_POSTGRES_CONNECTION_STRING";
|
|
11
|
+
// Optional superuser login for operator-run .NET fixtures. Never reaches attempt, validation or provider processes.
|
|
12
|
+
export const hostRuntimeTestPostgresProvisionerEnvironment = "FORGE_TEST_POSTGRES_PROVISIONER_CONNECTION_STRING";
|
|
10
13
|
const maximumContractBytes = 64 * 1024;
|
|
11
14
|
const maximumDepth = 12;
|
|
12
15
|
// Every discovery scan stops after this many directory entries. A monorepo needs a few
|
|
@@ -45,7 +48,7 @@ const ignoredDiscoveryDirectories = new Set([
|
|
|
45
48
|
"vendor",
|
|
46
49
|
"venv",
|
|
47
50
|
]);
|
|
48
|
-
const topLevelKeys = new Set(["schemaVersion", "runtime"]);
|
|
51
|
+
const topLevelKeys = new Set(["schemaVersion", "runtime", "requires", "costHints"]);
|
|
49
52
|
const runtimeKeys = new Set(["hostConcurrency", "ports", "playwright", "browserProfile", "singletonResources"]);
|
|
50
53
|
const portKeys = new Set(["adapter", "launch", "env", "baseUrlEnv", "format"]);
|
|
51
54
|
const launchKeys = new Set(["command", "args", "workingDirectory", "environment"]);
|
|
@@ -547,6 +550,7 @@ export function validateHostRuntimeContract(source) {
|
|
|
547
550
|
throw new Error("runtime_contract_invalid: runtime.browserProfile must be isolated.");
|
|
548
551
|
}
|
|
549
552
|
const ports = parsePorts(runtime.ports);
|
|
553
|
+
const requires = parseHostRuntimeRequirements(root.requires, root.costHints);
|
|
550
554
|
return {
|
|
551
555
|
schemaVersion: 1,
|
|
552
556
|
runtime: {
|
|
@@ -556,6 +560,7 @@ export function validateHostRuntimeContract(source) {
|
|
|
556
560
|
browserProfile,
|
|
557
561
|
singletonResources: parseSingletonResources(runtime.singletonResources),
|
|
558
562
|
},
|
|
563
|
+
...(requires ? { requires } : {}),
|
|
559
564
|
};
|
|
560
565
|
}
|
|
561
566
|
function parsePlaywright(value, ports) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HostRequirementsCheck } from "./host-runtime-requirements-check.js";
|
|
2
|
+
import { type RunOnceDispatchPacket } from "../session/session.types.js";
|
|
2
3
|
import { type ProviderProcessRunner } from "../session/provider-cli/provider-cli.process.js";
|
|
3
4
|
import { type RuntimeIsolationLease } from "./runtime-isolation-lease.js";
|
|
4
5
|
import { type LoadedHostRuntimeContract } from "./host-runtime-contract.js";
|
|
@@ -12,6 +13,9 @@ import { type MemoryAdmissionDiagnostics } from "./memory-capacity.js";
|
|
|
12
13
|
import { PlaywrightHostRuntimeAdapter } from "./playwright-host-runtime-adapter.js";
|
|
13
14
|
import { HostParallelPromotionStore } from "./host-runtime-promotion.js";
|
|
14
15
|
import { type HostProcessRecovery } from "../shared/process/host-process-recovery.js";
|
|
16
|
+
import { HostLoadGovernor } from "./host-load-governor.js";
|
|
17
|
+
import { type HostLoadGovernorSource } from "./host-load-sampler.js";
|
|
18
|
+
import type { RunnerHostDefaults } from "./runner-settings.js";
|
|
15
19
|
export interface HostRuntimeLeaseStart {
|
|
16
20
|
readonly lease: RuntimeIsolationLease;
|
|
17
21
|
readonly environment: Readonly<Record<string, string>>;
|
|
@@ -25,7 +29,7 @@ export interface HostRuntimeAdmissionCheckpoint {
|
|
|
25
29
|
}
|
|
26
30
|
export type HostRuntimeAdmissionCheckpointHandler = (checkpoint: HostRuntimeAdmissionCheckpoint) => void | Promise<void>;
|
|
27
31
|
export interface HostRuntimeProjectCheckpoint {
|
|
28
|
-
readonly code: "host_runtime_build_started" | "host_runtime_build_cached" | "host_runtime_build_completed" | "host_runtime_database_provisioned";
|
|
32
|
+
readonly code: "host_runtime_build_started" | "host_runtime_build_waiting_for_host_capacity" | "host_runtime_build_cached" | "host_runtime_build_completed" | "host_runtime_database_provisioned" | "host_runtime_contract_readmitted";
|
|
29
33
|
readonly message: string;
|
|
30
34
|
readonly data?: Readonly<Record<string, unknown>>;
|
|
31
35
|
}
|
|
@@ -92,10 +96,21 @@ export interface HostNodeRuntimeLaunch<T> extends NodeRuntimeAdapterLaunch<T> {
|
|
|
92
96
|
readonly runtimeLease: RuntimeIsolationLease;
|
|
93
97
|
}
|
|
94
98
|
export interface HostRuntimeLeaseRuntime {
|
|
99
|
+
setRequirementsCheck?(check: HostRequirementsCheck | null): void;
|
|
100
|
+
/** Decision 0014: today's max attempts and memory reserve defaults, before env bounds. */
|
|
101
|
+
capacityLimitDefaults?(): RunnerHostDefaults;
|
|
102
|
+
/** Decision 0014: the effective max attempts and memory reserve, from the next attempt admission. */
|
|
103
|
+
applyCapacityLimits?(limits: HostCapacityLimits): void;
|
|
95
104
|
acquirePreparation?(dispatch: RunOnceDispatchPacket, signal?: AbortSignal): Promise<readonly string[]>;
|
|
96
105
|
acquire(dispatch: RunOnceDispatchPacket, signal?: AbortSignal): Promise<readonly string[]>;
|
|
97
106
|
start(dispatch: RunOnceDispatchPacket, worktreePath: string, signal?: AbortSignal, onAdmissionCheckpoint?: HostRuntimeAdmissionCheckpointHandler): Promise<HostRuntimeLeaseStart>;
|
|
98
107
|
startConfiguredProject(dispatchAttemptId: string, fencingToken: string, signal?: AbortSignal, onProjectCheckpoint?: HostRuntimeProjectCheckpointHandler): Promise<HostRuntimeLeaseStart>;
|
|
108
|
+
/**
|
|
109
|
+
* Stops the attempt's configured project processes, releases their ports, and
|
|
110
|
+
* starts them again (rebuilding when sources changed) so the stack serves the
|
|
111
|
+
* current workspace. Returns the environment with the newly assigned URLs.
|
|
112
|
+
*/
|
|
113
|
+
restartConfiguredProject?(dispatchAttemptId: string, fencingToken: string, signal?: AbortSignal, onProjectCheckpoint?: HostRuntimeProjectCheckpointHandler): Promise<HostRuntimeLeaseStart>;
|
|
99
114
|
updateLease(dispatchAttemptId: string, fencingToken: string, expiresAt: string): Promise<void>;
|
|
100
115
|
providerProcessRunner?(dispatchAttemptId: string, fencingToken: string): ProviderProcessRunner | null;
|
|
101
116
|
providerMemoryTelemetry?(dispatchAttemptId: string, fencingToken: string): AttemptProcessTreeMemoryTelemetry | null;
|
|
@@ -104,7 +119,10 @@ export interface HostRuntimeLeaseRuntime {
|
|
|
104
119
|
hasForegroundDemand?(): boolean;
|
|
105
120
|
reap?(options: HostRuntimeReapOptions): Promise<HostRuntimeReapReport>;
|
|
106
121
|
snapshot?(): HostRuntimeCapacitySnapshot;
|
|
122
|
+
/** Variables that let the completion MCP server share this host's load governor. */
|
|
123
|
+
hostLoadChildEnvironment?(): Readonly<Record<string, string>>;
|
|
107
124
|
}
|
|
125
|
+
export type HostRuntimeAdmissionPriority = "foreground" | "background";
|
|
108
126
|
export interface HostCapacityResourceSample {
|
|
109
127
|
readonly totalMemoryBytes: number;
|
|
110
128
|
readonly availableMemoryBytes: number;
|
|
@@ -140,10 +158,26 @@ export declare class HostRuntimeLeaseManager implements HostRuntimeLeaseRuntime
|
|
|
140
158
|
private workspaceAvailableBytes;
|
|
141
159
|
private readonly portBroker;
|
|
142
160
|
private readonly nodeAdapter;
|
|
143
|
-
|
|
161
|
+
/** Rebuilt by applyCapacityLimits (decision 0014); every admission reads the current one. */
|
|
162
|
+
private capacityConfiguration;
|
|
144
163
|
private readonly memoryAvailability;
|
|
145
164
|
private readonly executionRoot;
|
|
146
|
-
|
|
165
|
+
/** Host-wide admission for heavy steps (decisions 0013, 0018): the host test slot, and the budget when on. */
|
|
166
|
+
readonly hostLoadGovernor: HostLoadGovernor;
|
|
167
|
+
private requirementsCheck;
|
|
168
|
+
/** Installs the decision 0013 accept-time requirements recheck for host attempts. */
|
|
169
|
+
setRequirementsCheck(check: HostRequirementsCheck | null): void;
|
|
170
|
+
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, hostLoad?: HostLoadGovernorSource | null);
|
|
171
|
+
/** Today's defaults for the limits the server can push, before any env bound (decision 0014). */
|
|
172
|
+
capacityLimitDefaults(): RunnerHostDefaults;
|
|
173
|
+
/**
|
|
174
|
+
* Decision 0014: the bridge's effective max attempts and memory reserve. They
|
|
175
|
+
* apply from the next attempt admission; admitted attempts keep their
|
|
176
|
+
* reservations and are never preempted, even when the new limit is lower than
|
|
177
|
+
* what already runs. The idle reserve follows the reserve as at startup.
|
|
178
|
+
*/
|
|
179
|
+
applyCapacityLimits(limits: HostCapacityLimits): void;
|
|
180
|
+
hostLoadChildEnvironment(): Readonly<Record<string, string>>;
|
|
147
181
|
reap(options: HostRuntimeReapOptions): Promise<HostRuntimeReapReport>;
|
|
148
182
|
snapshot(): HostRuntimeCapacitySnapshot;
|
|
149
183
|
hasForegroundDemand(): boolean;
|
|
@@ -165,6 +199,24 @@ export declare class HostRuntimeLeaseManager implements HostRuntimeLeaseRuntime
|
|
|
165
199
|
start(dispatch: RunOnceDispatchPacket, worktreePath: string, signal?: AbortSignal, onAdmissionCheckpoint?: HostRuntimeAdmissionCheckpointHandler): Promise<HostRuntimeLeaseStart>;
|
|
166
200
|
updateLease(dispatchAttemptId: string, fencingToken: string, expiresAt: string): Promise<void>;
|
|
167
201
|
startConfiguredProject(dispatchAttemptId: string, fencingToken: string, signal?: AbortSignal, onProjectCheckpoint?: HostRuntimeProjectCheckpointHandler): Promise<HostRuntimeLeaseStart>;
|
|
202
|
+
/**
|
|
203
|
+
* Launches the configured project. Only the first launch, from the admitted commit's clean
|
|
204
|
+
* source, may record parallel-safety proof: a restart serves the workspace after the provider
|
|
205
|
+
* edited it, and a proof observed there would be stored under the admitted commit and could
|
|
206
|
+
* move this or a later attempt at that commit into shared admission for source it never ran.
|
|
207
|
+
*/
|
|
208
|
+
private launchConfiguredProject;
|
|
209
|
+
/**
|
|
210
|
+
* Relaunches the configured project so it serves the current workspace. Every
|
|
211
|
+
* configured process stops (the API port changes, so the dev server's proxy target
|
|
212
|
+
* must change with it), its port reservation is released and dropped from the
|
|
213
|
+
* persisted lease, and the regular start path runs again, including the ASP.NET
|
|
214
|
+
* prebuild, whose receipt rebuilds only when the sources changed.
|
|
215
|
+
*/
|
|
216
|
+
restartConfiguredProject(dispatchAttemptId: string, fencingToken: string, signal?: AbortSignal, onProjectCheckpoint?: HostRuntimeProjectCheckpointHandler): Promise<HostRuntimeLeaseStart>;
|
|
217
|
+
private runConfiguredProjectRestart;
|
|
218
|
+
/** Stops configured project processes in reverse launch order and releases their ports. */
|
|
219
|
+
private stopConfiguredProject;
|
|
168
220
|
providerProcessRunner(dispatchAttemptId: string, fencingToken: string): ProviderProcessRunner | null;
|
|
169
221
|
private markCapacityReservationRunning;
|
|
170
222
|
providerMemoryTelemetry(dispatchAttemptId: string, fencingToken: string): AttemptProcessTreeMemoryTelemetry | null;
|
|
@@ -215,3 +267,21 @@ export declare class HostRuntimeCapacityRequestImpossibleError extends Error {
|
|
|
215
267
|
}
|
|
216
268
|
export declare function hostRuntimeEventResources(lease: RuntimeIsolationLease, runtimeContract?: LoadedHostRuntimeContract, executionClass?: HostRuntimeExecutionClass): Record<string, unknown>;
|
|
217
269
|
export declare function hostRuntimeSingletonKeys(dispatch: RunOnceDispatchPacket): readonly string[];
|
|
270
|
+
/**
|
|
271
|
+
* Every environment key `hostRuntimeEnvironment` and the Playwright overlay derive from the
|
|
272
|
+
* configured project's assigned ports. They name a live stack, so they are withheld while the
|
|
273
|
+
* stack is down: after its ports are released another attempt may be assigned them.
|
|
274
|
+
*/
|
|
275
|
+
export declare function hostRuntimeStackEnvironmentKeys(runtimeContract: LoadedHostRuntimeContract): readonly string[];
|
|
276
|
+
export declare function runtimeAdmissionPriority(dispatch: RunOnceDispatchPacket): HostRuntimeAdmissionPriority;
|
|
277
|
+
/** The pushed attempt limits (decision 0014), already resolved against host env bounds. */
|
|
278
|
+
export interface HostCapacityLimits {
|
|
279
|
+
readonly maxConcurrentAttempts: number;
|
|
280
|
+
readonly memoryReserveBytes: number;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Today's max attempts and adaptive memory reserve for this host, before
|
|
284
|
+
* FORGE_HOST_MAX_CONCURRENT_ATTEMPTS and FORGE_HOST_MEMORY_RESERVE_BYTES
|
|
285
|
+
* (decision 0014 treats those as bounds on the server's values).
|
|
286
|
+
*/
|
|
287
|
+
export declare function hostCapacityLimitDefaults(capacityResourceSample?: HostCapacityResourceSample): RunnerHostDefaults;
|