@loucompanion/forge-bridge 0.1.4-dev.f22f5e3d01fe → 0.2.1-dev.0f07274d438b
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 +128 -4
- package/dist/bridge/bridge-chat-giphy-look.d.ts +48 -0
- package/dist/bridge/bridge-chat-giphy-look.js +55 -0
- package/dist/bridge/bridge-chat-provider-command.d.ts +27 -3
- package/dist/bridge/bridge-chat-provider-command.js +131 -26
- package/dist/bridge/bridge-chat.types.d.ts +20 -0
- package/dist/bridge/bridge-chat.types.js +28 -1
- package/dist/bridge/bridge-state-file.d.ts +161 -0
- package/dist/bridge/bridge-state-file.js +376 -0
- package/dist/bridge/bridge-state-io.d.ts +15 -0
- package/dist/bridge/bridge-state-io.js +68 -0
- package/dist/bridge/bridge-state-lock.d.ts +11 -0
- package/dist/bridge/bridge-state-lock.js +102 -0
- package/dist/bridge/bridge-state-unpublished.d.ts +17 -0
- package/dist/bridge/bridge-state-unpublished.js +111 -0
- package/dist/bridge/bridge.service.d.ts +29 -12
- package/dist/bridge/bridge.service.js +215 -380
- package/dist/bridge/bridge.types.d.ts +21 -0
- package/dist/bridge/bridge.types.js +2 -1
- package/dist/bridge/default-session-service.d.ts +13 -0
- package/dist/bridge/default-session-service.js +22 -0
- package/dist/bridge/dispatch-offer-policy.d.ts +22 -0
- package/dist/bridge/dispatch-offer-policy.js +58 -0
- package/dist/bridge/in-flight-registry.d.ts +62 -0
- package/dist/bridge/in-flight-registry.js +207 -0
- package/dist/bridge/readiness-result-outbox.d.ts +5 -1
- package/dist/bridge/readiness-result-outbox.js +20 -0
- package/dist/bridge/runner-host-capabilities.js +14 -1
- package/dist/bridge/sandbox-resource-accounting.d.ts +16 -0
- package/dist/bridge/sandbox-resource-accounting.js +150 -0
- package/dist/bridge/windows-bash-resolution.d.ts +31 -0
- package/dist/bridge/windows-bash-resolution.js +153 -0
- package/dist/cleanup/cleanup-wip.d.ts +12 -0
- package/dist/cleanup/cleanup-wip.js +66 -0
- package/dist/cleanup/cleanup.service.d.ts +11 -1
- package/dist/cleanup/cleanup.service.js +80 -62
- package/dist/cleanup/cleanup.types.d.ts +2 -0
- package/dist/cleanup/forge-owned-paths.d.ts +2 -0
- package/dist/cleanup/forge-owned-paths.js +9 -0
- package/dist/cleanup/host-runtime-ledger.d.ts +2 -0
- package/dist/cleanup/host-runtime-ledger.js +30 -9
- package/dist/cli/cli.help.js +57 -13
- package/dist/cli/cli.service.d.ts +3 -10
- package/dist/cli/cli.service.js +20 -213
- package/dist/cli/idle-status.d.ts +84 -0
- package/dist/cli/idle-status.js +181 -0
- package/dist/cli/local-config.d.ts +14 -1
- package/dist/cli/local-config.js +42 -2
- package/dist/cli/provider-cli-advertising.d.ts +24 -0
- package/dist/cli/provider-cli-advertising.js +88 -0
- package/dist/cli/provider-cli-detection.d.ts +10 -0
- package/dist/cli/provider-cli-detection.js +160 -0
- package/dist/runtime/aspnet-runtime-prebuild.d.ts +20 -0
- package/dist/runtime/aspnet-runtime-prebuild.js +104 -26
- package/dist/runtime/attempt-database-broker.d.ts +1 -1
- package/dist/runtime/attempt-node-runtime-launcher.d.ts +36 -0
- package/dist/runtime/attempt-node-runtime-launcher.js +169 -0
- package/dist/runtime/attempt-process-supervisor.d.ts +2 -0
- package/dist/runtime/attempt-process-supervisor.js +12 -6
- package/dist/runtime/docker-engine-probe.d.ts +5 -0
- package/dist/runtime/docker-engine-probe.js +7 -0
- package/dist/runtime/dotnet-build-outputs.d.ts +107 -0
- package/dist/runtime/dotnet-build-outputs.js +402 -0
- package/dist/runtime/ephemeral-test-postgres-grant.d.ts +37 -0
- package/dist/runtime/ephemeral-test-postgres-grant.js +85 -0
- package/dist/runtime/ephemeral-test-postgres.d.ts +57 -0
- package/dist/runtime/ephemeral-test-postgres.js +303 -0
- package/dist/runtime/host-listener-inspector.d.ts +26 -0
- package/dist/runtime/host-listener-inspector.js +84 -3
- package/dist/runtime/host-load-admission.d.ts +5 -0
- package/dist/runtime/host-load-capacity.d.ts +198 -0
- package/dist/runtime/host-load-capacity.js +353 -0
- package/dist/runtime/host-load-child-environment.d.ts +13 -0
- package/dist/runtime/host-load-child-environment.js +35 -1
- package/dist/runtime/host-load-governor-config.d.ts +33 -3
- package/dist/runtime/host-load-governor-config.js +24 -3
- package/dist/runtime/host-load-governor.d.ts +91 -2
- package/dist/runtime/host-load-governor.js +217 -18
- package/dist/runtime/host-load-ledger-lock.js +6 -4
- package/dist/runtime/host-load-live-test-slots.d.ts +61 -0
- package/dist/runtime/host-load-live-test-slots.js +193 -0
- package/dist/runtime/host-load-runtime-settings.js +4 -2
- package/dist/runtime/host-load-sampler.d.ts +25 -1
- package/dist/runtime/host-load-sampler.js +38 -7
- package/dist/runtime/host-load-step-run.d.ts +37 -3
- package/dist/runtime/host-load-step-run.js +63 -7
- package/dist/runtime/host-load-test-slot.d.ts +3 -0
- package/dist/runtime/host-load-test-slot.js +26 -7
- package/dist/runtime/host-runtime-contract.d.ts +12 -0
- package/dist/runtime/host-runtime-contract.js +35 -5
- package/dist/runtime/host-runtime-lease.d.ts +28 -3
- package/dist/runtime/host-runtime-lease.js +140 -296
- package/dist/runtime/host-runtime-ledger-recovery.d.ts +20 -0
- package/dist/runtime/host-runtime-ledger-recovery.js +134 -0
- package/dist/runtime/host-runtime-promotion.d.ts +78 -2
- package/dist/runtime/host-runtime-promotion.js +307 -14
- package/dist/runtime/managed-command-teardown.js +5 -16
- package/dist/runtime/native-test-postgres-fallback.d.ts +51 -7
- package/dist/runtime/native-test-postgres-fallback.js +60 -8
- package/dist/runtime/prepared-runtime-identity.d.ts +4 -0
- package/dist/runtime/prepared-runtime-identity.js +130 -9
- package/dist/runtime/prepared-runtime-readiness.d.ts +23 -1
- package/dist/runtime/prepared-runtime-readiness.js +89 -18
- package/dist/runtime/runner-settings.d.ts +4 -0
- package/dist/runtime/runner-settings.js +22 -0
- package/dist/runtime/supervised-runtime-build-guard.d.ts +45 -0
- package/dist/runtime/supervised-runtime-build-guard.js +112 -0
- package/dist/sandbox/host-capacity-broker.d.ts +3 -1
- package/dist/sandbox/host-capacity-broker.js +4 -2
- package/dist/sandbox/managed-branch.d.ts +13 -0
- package/dist/sandbox/managed-branch.js +90 -0
- package/dist/sandbox/provider-auth/codex.js +11 -11
- package/dist/sandbox/runtime.d.ts +1 -2
- package/dist/sandbox/runtime.js +9 -19
- package/dist/sandbox/sandbox-input.d.ts +22 -0
- package/dist/sandbox/sandbox-input.js +49 -0
- package/dist/sandbox/workspace.service.js +15 -2
- package/dist/session/managed-attempt-tools.d.ts +0 -7
- package/dist/session/managed-attempt-tools.js +54 -109
- package/dist/session/managed-build-coordinator.d.ts +16 -0
- package/dist/session/managed-build-coordinator.js +10 -0
- package/dist/session/managed-build-receipt.d.ts +7 -0
- package/dist/session/managed-build-receipt.js +11 -3
- package/dist/session/managed-command-environment.d.ts +8 -0
- package/dist/session/managed-command-environment.js +28 -0
- package/dist/session/managed-command-host-load.d.ts +10 -5
- package/dist/session/managed-command-host-load.js +18 -14
- package/dist/session/phase-completion.artifact-bundle.d.ts +20 -0
- package/dist/session/phase-completion.artifact-bundle.js +167 -0
- package/dist/session/phase-completion.artifacts.d.ts +2 -17
- package/dist/session/phase-completion.artifacts.js +65 -166
- package/dist/session/phase-completion.d.ts +27 -2
- package/dist/session/phase-completion.helpers.js +5 -53
- package/dist/session/phase-completion.js +15 -32
- package/dist/session/phase-completion.mcp-args.d.ts +9 -0
- package/dist/session/phase-completion.mcp-args.js +195 -0
- package/dist/session/phase-completion.phase-aliases.d.ts +5 -0
- package/dist/session/phase-completion.phase-aliases.js +43 -0
- package/dist/session/phase-completion.pr-review-schema.d.ts +1 -0
- package/dist/session/phase-completion.pr-review-schema.js +75 -0
- package/dist/session/phase-completion.pr-review-validation.d.ts +11 -0
- package/dist/session/phase-completion.pr-review-validation.js +212 -0
- package/dist/session/phase-completion.pr-review.d.ts +36 -0
- package/dist/session/phase-completion.pr-review.js +294 -0
- package/dist/session/phase-completion.prompts.d.ts +1 -1
- package/dist/session/phase-completion.prompts.js +14 -0
- package/dist/session/phase-completion.runtime.d.ts +8 -9
- package/dist/session/phase-completion.runtime.js +65 -196
- package/dist/session/phase-completion.schemas.js +12 -2
- package/dist/session/phase-completion.validation.d.ts +1 -0
- package/dist/session/phase-completion.validation.js +9 -1
- package/dist/session/pr-review-diff-base.d.ts +18 -0
- package/dist/session/pr-review-diff-base.js +44 -0
- package/dist/session/pr-review-placement.d.ts +50 -0
- package/dist/session/pr-review-placement.js +91 -0
- package/dist/session/pre-publication-change-set.d.ts +62 -0
- package/dist/session/pre-publication-change-set.js +166 -0
- package/dist/session/pre-publication-host-load.js +6 -5
- package/dist/session/pre-publication-native-postgres.d.ts +30 -0
- package/dist/session/pre-publication-native-postgres.js +111 -0
- package/dist/session/pre-publication-process.js +13 -12
- package/dist/session/pre-publication-step-execution.d.ts +2 -1
- package/dist/session/pre-publication-step-execution.js +6 -5
- package/dist/session/pre-publication-validation.d.ts +9 -4
- package/dist/session/pre-publication-validation.js +62 -65
- package/dist/session/provider-cli/claude-background-work.d.ts +3 -2
- package/dist/session/provider-cli/claude-background-work.js +4 -3
- package/dist/session/provider-cli/dispatch-target-branch.d.ts +7 -0
- package/dist/session/provider-cli/dispatch-target-branch.js +8 -0
- package/dist/session/provider-cli/host-build-lock.d.ts +18 -0
- package/dist/session/provider-cli/host-build-lock.js +30 -0
- package/dist/session/provider-cli/pr-review-credential-isolation.d.ts +83 -0
- package/dist/session/provider-cli/pr-review-credential-isolation.js +144 -0
- package/dist/session/provider-cli/pr-review-guardrails.d.ts +70 -0
- package/dist/session/provider-cli/pr-review-guardrails.js +360 -0
- package/dist/session/provider-cli/pr-review-prompt.d.ts +2 -0
- package/dist/session/provider-cli/pr-review-prompt.js +119 -0
- package/dist/session/provider-cli/pre-publication-repair.d.ts +16 -0
- package/dist/session/provider-cli/pre-publication-repair.js +41 -3
- package/dist/session/provider-cli/provider-cli.base.d.ts +1 -0
- package/dist/session/provider-cli/provider-cli.child-environment.js +4 -2
- package/dist/session/provider-cli/provider-cli.deterministic.d.ts +1 -0
- package/dist/session/provider-cli/provider-cli.deterministic.js +5 -0
- package/dist/session/provider-cli/provider-cli.merge-integrity.d.ts +6 -3
- package/dist/session/provider-cli/provider-cli.merge-integrity.js +29 -10
- package/dist/session/provider-cli/provider-cli.pr-review.d.ts +23 -0
- package/dist/session/provider-cli/provider-cli.pr-review.js +213 -0
- package/dist/session/provider-cli/provider-cli.process.d.ts +2 -14
- package/dist/session/provider-cli/provider-cli.process.js +4 -94
- package/dist/session/provider-cli/provider-cli.prompts.d.ts +13 -3
- package/dist/session/provider-cli/provider-cli.prompts.js +137 -84
- package/dist/session/provider-cli/provider-cli.reapply-conflicts.d.ts +10 -0
- package/dist/session/provider-cli/provider-cli.reapply-conflicts.js +37 -0
- package/dist/session/provider-cli/provider-cli.runtime.d.ts +15 -0
- package/dist/session/provider-cli/provider-cli.runtime.js +37 -2
- package/dist/session/provider-cli/provider-cli.service-support.d.ts +37 -0
- package/dist/session/provider-cli/provider-cli.service-support.js +146 -0
- package/dist/session/provider-cli/provider-cli.service.d.ts +15 -18
- package/dist/session/provider-cli/provider-cli.service.js +59 -190
- package/dist/session/provider-cli/provider-cli.types.d.ts +7 -2
- package/dist/session/provider-cli/provider-cli.windows-launch.d.ts +23 -0
- package/dist/session/provider-cli/provider-cli.windows-launch.js +131 -0
- package/dist/session/provider-cli/provider-user-config-isolation.d.ts +69 -0
- package/dist/session/provider-cli/provider-user-config-isolation.js +164 -0
- package/dist/session/qa-sidecar-validation.d.ts +6 -0
- package/dist/session/qa-sidecar-validation.js +28 -0
- package/dist/session/sandbox-host-capacity-gate.d.ts +22 -1
- package/dist/session/sandbox-host-capacity-gate.js +63 -22
- package/dist/session/session-host-project.d.ts +22 -0
- package/dist/session/session-host-project.js +98 -0
- package/dist/session/session-redaction.js +31 -181
- package/dist/session/session.parse-helpers.d.ts +10 -0
- package/dist/session/session.parse-helpers.js +84 -0
- package/dist/session/session.runtime-refresh.d.ts +46 -0
- package/dist/session/session.runtime-refresh.js +116 -0
- package/dist/session/session.service.d.ts +8 -1
- package/dist/session/session.service.js +177 -239
- package/dist/session/session.types.d.ts +5 -0
- package/dist/session/session.types.js +9 -79
- package/dist/session/session.types.pr-review.d.ts +48 -0
- package/dist/session/session.types.pr-review.js +51 -0
- package/dist/session/sidecar-json-shape.d.ts +31 -0
- package/dist/session/sidecar-json-shape.js +217 -0
- package/dist/shared/fs/file-identity.d.ts +10 -0
- package/dist/shared/fs/file-identity.js +15 -0
- package/dist/shared/fs/replace-file.d.ts +7 -0
- package/dist/shared/fs/replace-file.js +33 -0
- package/dist/shared/process/host-process-recovery.d.ts +14 -3
- package/dist/shared/process/host-process-recovery.js +23 -3
- package/dist/shared/process/host-process-supervisor.d.ts +13 -1
- package/dist/shared/process/host-process-supervisor.js +66 -14
- package/dist/shared/provider-capabilities.d.ts +2 -0
- package/dist/shared/provider-capabilities.js +18 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worktree/artifact-injector.js +24 -0
- package/dist/worktree/orphan-relink.d.ts +19 -0
- package/dist/worktree/orphan-relink.js +106 -0
- package/dist/worktree/wip-git.d.ts +58 -0
- package/dist/worktree/wip-git.js +182 -0
- package/dist/worktree/wip-refs.d.ts +85 -0
- package/dist/worktree/wip-refs.js +169 -0
- package/dist/worktree/wip-restore.d.ts +51 -0
- package/dist/worktree/wip-restore.js +324 -0
- package/dist/worktree/wip-snapshot.d.ts +53 -0
- package/dist/worktree/wip-snapshot.js +270 -0
- package/dist/worktree/worktree-inputs.d.ts +8 -0
- package/dist/worktree/worktree-inputs.js +134 -0
- package/dist/worktree/worktree-origin-sync.d.ts +35 -0
- package/dist/worktree/worktree-origin-sync.js +128 -0
- package/dist/worktree/worktree-wip-events.d.ts +20 -0
- package/dist/worktree/worktree-wip-events.js +148 -0
- package/dist/worktree/worktree-wip.d.ts +57 -0
- package/dist/worktree/worktree-wip.js +200 -0
- package/dist/worktree/worktree.base.d.ts +7 -1
- package/dist/worktree/worktree.service.d.ts +49 -5
- package/dist/worktree/worktree.service.js +223 -187
- package/dist/worktree/worktree.types.d.ts +47 -0
- package/package.json +1 -1
- package/runtime/windows-listener-owner.ps1 +12 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
1
|
+
import { createHash, randomBytes } from "node:crypto";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
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
7
|
import { parseHostRuntimeRequirements } from "./host-runtime-requirements.js";
|
|
8
|
+
// A contract a WIP re-apply left conflicted runs as committed until the agent resolves it (see wip-git.ts).
|
|
9
|
+
import { committedWhileReapplyConflicted } from "../worktree/wip-git.js";
|
|
8
10
|
export const hostRuntimeContractPath = ".forge/forge.runtime.yml";
|
|
9
11
|
export const hostRuntimeTestPostgresAdminEnvironment = "FORGE_TEST_POSTGRES_ADMIN_CONNECTION_STRING";
|
|
10
12
|
export const hostRuntimeLegacyTestPostgresEnvironment = "FORGE_TEST_POSTGRES_CONNECTION_STRING";
|
|
@@ -68,10 +70,10 @@ export async function loadHostRuntimeContract(worktreePath, snapshot, directoryS
|
|
|
68
70
|
return await discoverHostRuntimeContract(worktreePath, snapshot, directorySnapshot);
|
|
69
71
|
throw error;
|
|
70
72
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
};
|
|
73
|
+
const text = await committedWhileReapplyConflicted(worktreePath, hostRuntimeContractPath, source.toString("utf8"));
|
|
74
|
+
if (text === null)
|
|
75
|
+
return await discoverHostRuntimeContract(worktreePath, snapshot, directorySnapshot);
|
|
76
|
+
return { contract: validateHostRuntimeContract(text), source: "project" };
|
|
75
77
|
}
|
|
76
78
|
async function discoverHostRuntimeContract(worktreePath, snapshot, directorySnapshot) {
|
|
77
79
|
const root = path.resolve(worktreePath);
|
|
@@ -425,6 +427,34 @@ function safeAspNetLaunchEnvironment(name, value) {
|
|
|
425
427
|
"TMPDIR",
|
|
426
428
|
]).has(normalized);
|
|
427
429
|
}
|
|
430
|
+
// The settings an ASP.NET API reads its secret-store master key from (Security:MasterKey wins).
|
|
431
|
+
const aspNetMasterKeySettings = ["security__masterkey", "security__masterkeyfile"];
|
|
432
|
+
/** A managed attempt's own API master key: 32 random bytes, base64-encoded, as Security:MasterKey expects. */
|
|
433
|
+
export function newAttemptApiMasterKey() {
|
|
434
|
+
return randomBytes(32).toString("base64");
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* The environment a managed attempt's ASP.NET API launches with. When neither the launch profile
|
|
438
|
+
* nor the runtime contract configures Security__MasterKey or Security__MasterKeyFile, the API gets
|
|
439
|
+
* the attempt's own key. Otherwise ASP.NET Development falls back to the host user's dotnet
|
|
440
|
+
* user-secrets: the host's own key where they exist, and a failed secret write wherever they do not.
|
|
441
|
+
* The caller keeps one key for the attempt's whole life, so a restart against the same attempt
|
|
442
|
+
* database can still decrypt what was stored before it. The key is a secret: it is for the API
|
|
443
|
+
* process only, never for the environment handed to checks or providers.
|
|
444
|
+
*/
|
|
445
|
+
export function withAttemptApiMasterKey(port, environment, attemptMasterKey) {
|
|
446
|
+
if (port.adapter !== "aspnetcore")
|
|
447
|
+
return environment;
|
|
448
|
+
const masterKeySetting = (name) => aspNetMasterKeySettings.includes(name.toLowerCase());
|
|
449
|
+
if (Object.entries(environment).some(([name, value]) => masterKeySetting(name) && value.trim().length > 0)) {
|
|
450
|
+
return environment;
|
|
451
|
+
}
|
|
452
|
+
// A blank setting configures nothing; drop it so the attempt's key is the only one.
|
|
453
|
+
return {
|
|
454
|
+
...Object.fromEntries(Object.entries(environment).filter(([name]) => !masterKeySetting(name))),
|
|
455
|
+
Security__MasterKey: attemptMasterKey,
|
|
456
|
+
};
|
|
457
|
+
}
|
|
428
458
|
async function findFiles(root, accepts, maximumDepth, maximumEntries, snapshot) {
|
|
429
459
|
const results = [];
|
|
430
460
|
let examined = 0;
|
|
@@ -29,7 +29,7 @@ export interface HostRuntimeAdmissionCheckpoint {
|
|
|
29
29
|
}
|
|
30
30
|
export type HostRuntimeAdmissionCheckpointHandler = (checkpoint: HostRuntimeAdmissionCheckpoint) => void | Promise<void>;
|
|
31
31
|
export interface HostRuntimeProjectCheckpoint {
|
|
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";
|
|
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" | "host_runtime_isolation_serialized";
|
|
33
33
|
readonly message: string;
|
|
34
34
|
readonly data?: Readonly<Record<string, unknown>>;
|
|
35
35
|
}
|
|
@@ -73,6 +73,8 @@ export interface HostRuntimeReapOptions {
|
|
|
73
73
|
readonly runnerId: string;
|
|
74
74
|
readonly runnerInstanceId: string;
|
|
75
75
|
readonly nowMs?: number;
|
|
76
|
+
/** Where maintenance reports a degraded lease it released or kept; the bridge log by default. */
|
|
77
|
+
readonly log?: (message: string) => void;
|
|
76
78
|
}
|
|
77
79
|
export interface HostRuntimeReapReport {
|
|
78
80
|
readonly examined: number;
|
|
@@ -116,6 +118,9 @@ export interface HostRuntimeLeaseRuntime {
|
|
|
116
118
|
providerMemoryTelemetry?(dispatchAttemptId: string, fencingToken: string): AttemptProcessTreeMemoryTelemetry | null;
|
|
117
119
|
release(dispatchAttemptId: string, fencingToken: string): Promise<RuntimeIsolationLease | null>;
|
|
118
120
|
invalidatePromotion?(repoId: string, scope?: "all" | "discovery"): Promise<void>;
|
|
121
|
+
promotionQuarantined?(repoId: string, runtimeContractFingerprint: string): Promise<boolean>;
|
|
122
|
+
/** The isolation violation the shared-run listener monitor found after launch, if any; the attempt must fail with it. */
|
|
123
|
+
isolationViolation?(dispatchAttemptId: string, fencingToken: string): Error | null;
|
|
119
124
|
hasForegroundDemand?(): boolean;
|
|
120
125
|
reap?(options: HostRuntimeReapOptions): Promise<HostRuntimeReapReport>;
|
|
121
126
|
snapshot?(): HostRuntimeCapacitySnapshot;
|
|
@@ -183,6 +188,16 @@ export declare class HostRuntimeLeaseManager implements HostRuntimeLeaseRuntime
|
|
|
183
188
|
hasForegroundDemand(): boolean;
|
|
184
189
|
acquirePreparation(dispatch: RunOnceDispatchPacket, signal?: AbortSignal): Promise<readonly string[]>;
|
|
185
190
|
acquire(dispatch: RunOnceDispatchPacket, signal?: AbortSignal): Promise<readonly string[]>;
|
|
191
|
+
/**
|
|
192
|
+
* Whether acquire asks for shared project admission. A parallel-eligible probe in a promoted repository
|
|
193
|
+
* runs beside its shared runs (the listener audit fails it closed); otherwise it probes exclusively.
|
|
194
|
+
*/
|
|
195
|
+
private sharedAdmissionRequested;
|
|
196
|
+
/**
|
|
197
|
+
* Whether a shared admission may launch without downgrading to exclusive: a stored proof matches the
|
|
198
|
+
* contract by isolation inputs or exact commit, or it is a still-eligible probe of an unrevoked repository.
|
|
199
|
+
*/
|
|
200
|
+
private sharedAdmissionStillValid;
|
|
186
201
|
private reserveHostCapacity;
|
|
187
202
|
private reserveBackgroundAdmission;
|
|
188
203
|
private hostCapacityAvailable;
|
|
@@ -218,13 +233,22 @@ export declare class HostRuntimeLeaseManager implements HostRuntimeLeaseRuntime
|
|
|
218
233
|
/** Stops configured project processes in reverse launch order and releases their ports. */
|
|
219
234
|
private stopConfiguredProject;
|
|
220
235
|
providerProcessRunner(dispatchAttemptId: string, fencingToken: string): ProviderProcessRunner | null;
|
|
236
|
+
isolationViolation(dispatchAttemptId: string, fencingToken: string): Error | null;
|
|
221
237
|
private markCapacityReservationRunning;
|
|
222
238
|
providerMemoryTelemetry(dispatchAttemptId: string, fencingToken: string): AttemptProcessTreeMemoryTelemetry | null;
|
|
239
|
+
/** Isolation enforcement for parallel-eligible contracts after each launch (restarts included); see monitorListeners. */
|
|
240
|
+
private auditRuntimeListeners;
|
|
241
|
+
/**
|
|
242
|
+
* Quarantines the contract and drops every promotion for the repository. An exclusive run collides with nobody, so it
|
|
243
|
+
* keeps running unpromoted and reports why; a shared one stops its project (a failed stop is left to release) and fails.
|
|
244
|
+
*/
|
|
245
|
+
private handleIsolationViolation;
|
|
246
|
+
private monitorSharedRuntimeListeners;
|
|
223
247
|
private promoteVerifiedRuntime;
|
|
224
248
|
launchNodeRuntime<T>(dispatchAttemptId: string, fencingToken: string, portName: string, command: NodeRuntimeCommand, launcher: NodeRuntimeCommandLauncher<T>, signal?: AbortSignal): Promise<HostNodeRuntimeLaunch<T>>;
|
|
225
249
|
release(dispatchAttemptId: string, fencingToken: string, preservePreparation?: boolean): Promise<RuntimeIsolationLease | null>;
|
|
226
250
|
private readLedgers;
|
|
227
|
-
|
|
251
|
+
/** Degrades and counts a ledger whose runtime may still be live. A retained released ledger owns no slot, so it is neither changed nor counted. */
|
|
228
252
|
private markLedgerDegraded;
|
|
229
253
|
private rememberDegraded;
|
|
230
254
|
private forgetDegraded;
|
|
@@ -249,7 +273,8 @@ export declare class HostRuntimeLeaseManager implements HostRuntimeLeaseRuntime
|
|
|
249
273
|
private drainParallelProjectWaiters;
|
|
250
274
|
private drainBackgroundAdmissionWaiters;
|
|
251
275
|
private refreshKnownPromotions;
|
|
252
|
-
invalidatePromotion(repoId: string, scope?: "all" | "discovery"): Promise<void>;
|
|
276
|
+
invalidatePromotion(repoId: string, scope?: "all" | "discovery", quarantineFingerprints?: readonly string[]): Promise<void>;
|
|
277
|
+
promotionQuarantined(repoId: string, fingerprint: string): Promise<boolean>;
|
|
253
278
|
private drainAdmissionWaiters;
|
|
254
279
|
private reconcileReservationOwners;
|
|
255
280
|
private reservationOwnerIsLive;
|