@loucompanion/forge-bridge 0.1.3-dev.fbe15023cdfe → 0.1.4-dev.028808a841c8
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 +89 -3
- 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 +4 -1
- package/dist/bridge/bridge.service.d.ts +83 -3
- package/dist/bridge/bridge.service.js +1609 -152
- package/dist/bridge/bridge.types.d.ts +52 -1
- package/dist/bridge/dispatch-result-outbox.d.ts +35 -0
- package/dist/bridge/dispatch-result-outbox.js +87 -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 +1 -0
- package/dist/cleanup/cleanup.service.js +70 -9
- package/dist/cli/cli.help.js +4 -4
- package/dist/cli/cli.service.d.ts +14 -6
- package/dist/cli/cli.service.js +75 -16
- package/dist/cli/local-config.d.ts +1 -0
- package/dist/cli/local-config.js +4 -0
- 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 +2 -1
- package/dist/runtime/attempt-node-runtime-launcher.js +57 -18
- 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.d.ts +35 -0
- package/dist/runtime/attempt-process-supervisor.js +144 -23
- 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 +10 -0
- package/dist/runtime/generated-output-reset.js +62 -8
- package/dist/runtime/host-database-capability-boundary.d.ts +16 -0
- package/dist/runtime/host-database-capability-boundary.js +63 -0
- package/dist/runtime/host-diagnostics.d.ts +11 -0
- package/dist/runtime/host-diagnostics.js +192 -0
- package/dist/runtime/host-execution-root.d.ts +4 -0
- package/dist/runtime/host-execution-root.js +39 -0
- package/dist/runtime/host-facts.d.ts +35 -0
- package/dist/runtime/host-facts.js +95 -0
- package/dist/runtime/host-listener-inspector.d.ts +8 -1
- package/dist/runtime/host-listener-inspector.js +121 -60
- package/dist/runtime/host-load-sampler.d.ts +83 -0
- package/dist/runtime/host-load-sampler.js +164 -0
- package/dist/runtime/host-pressure-stall.d.ts +41 -0
- package/dist/runtime/host-pressure-stall.js +121 -0
- package/dist/runtime/host-runtime-contract.d.ts +13 -1
- package/dist/runtime/host-runtime-contract.js +170 -55
- package/dist/runtime/host-runtime-lease.d.ts +92 -8
- package/dist/runtime/host-runtime-lease.js +1193 -120
- package/dist/runtime/host-runtime-promotion.d.ts +12 -3
- package/dist/runtime/host-runtime-promotion.js +59 -12
- package/dist/runtime/managed-command-teardown.d.ts +62 -0
- package/dist/runtime/managed-command-teardown.js +607 -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 +3 -0
- package/dist/runtime/node-host-runtime-adapter.js +29 -11
- 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-browser-cache.d.ts +39 -0
- package/dist/runtime/playwright-browser-cache.js +227 -0
- package/dist/runtime/playwright-host-runtime-adapter.d.ts +12 -0
- package/dist/runtime/playwright-host-runtime-adapter.js +100 -58
- 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.js +4 -1
- package/dist/runtime/workspace-resource-estimator.d.ts +17 -0
- package/dist/runtime/workspace-resource-estimator.js +174 -0
- package/dist/sandbox/preflight.d.ts +31 -1
- package/dist/sandbox/preflight.js +237 -51
- package/dist/sandbox/repository-lock.d.ts +2 -1
- package/dist/sandbox/repository-lock.js +19 -9
- package/dist/sandbox/runtime.d.ts +6 -1
- package/dist/sandbox/runtime.js +137 -107
- package/dist/sandbox/sandbox.types.d.ts +7 -0
- package/dist/sandbox/workspace.service.js +2 -0
- package/dist/session/managed-attempt-tools.d.ts +42 -1
- package/dist/session/managed-attempt-tools.js +692 -40
- package/dist/session/managed-build-coordinator.d.ts +5 -0
- package/dist/session/managed-build-coordinator.js +109 -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 +17 -0
- package/dist/session/phase-completion.artifacts.js +228 -22
- package/dist/session/phase-completion.d.ts +11 -1
- package/dist/session/phase-completion.helpers.d.ts +5 -0
- package/dist/session/phase-completion.helpers.js +30 -7
- package/dist/session/phase-completion.js +14 -3
- package/dist/session/phase-completion.prompts.js +17 -18
- package/dist/session/phase-completion.runtime.d.ts +3 -1
- package/dist/session/phase-completion.runtime.js +148 -34
- package/dist/session/phase-completion.schemas.js +49 -2
- package/dist/session/phase-completion.validation.d.ts +1 -0
- package/dist/session/phase-completion.validation.js +111 -21
- package/dist/session/pre-publication-process.d.ts +20 -0
- package/dist/session/pre-publication-process.js +97 -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-validation.d.ts +75 -0
- package/dist/session/pre-publication-validation.js +631 -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 +8 -0
- package/dist/session/provider-cli/ci-repair-readiness.js +23 -3
- package/dist/session/provider-cli/provider-cli.artifacts.d.ts +6 -3
- package/dist/session/provider-cli/provider-cli.artifacts.js +62 -22
- package/dist/session/provider-cli/provider-cli.deterministic.js +34 -2
- 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 +80 -0
- package/dist/session/provider-cli/provider-cli.process.js +694 -28
- package/dist/session/provider-cli/provider-cli.prompts.d.ts +10 -0
- package/dist/session/provider-cli/provider-cli.prompts.js +151 -16
- 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 +14 -1
- package/dist/session/provider-cli/provider-cli.runtime.js +54 -3
- package/dist/session/provider-cli/provider-cli.service.d.ts +30 -5
- package/dist/session/provider-cli/provider-cli.service.js +858 -77
- package/dist/session/provider-cli/provider-cli.types.d.ts +2 -0
- package/dist/session/provider-cli/provider-in-flight-work.d.ts +6 -0
- package/dist/session/provider-cli/provider-in-flight-work.js +47 -0
- package/dist/session/provider-cli/provider-output-state.d.ts +16 -0
- package/dist/session/provider-cli/provider-output-state.js +370 -17
- package/dist/session/provider-cli/provider-usage.d.ts +9 -1
- package/dist/session/provider-cli/provider-usage.js +28 -5
- package/dist/session/publishable-worktree-changes.d.ts +54 -0
- package/dist/session/publishable-worktree-changes.js +193 -0
- package/dist/session/session-redaction.js +434 -9
- package/dist/session/session.service.js +145 -23
- package/dist/session/session.types.d.ts +147 -2
- package/dist/session/session.types.js +599 -7
- 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 +18 -0
- 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.js +3 -2
- package/dist/shared/process/host-process-supervisor.d.ts +2 -0
- package/dist/shared/process/host-process-supervisor.js +60 -11
- package/dist/shared/process/process.d.ts +2 -0
- package/dist/shared/process/process.js +12 -7
- package/dist/shared/provider-capabilities.d.ts +3 -0
- package/dist/shared/provider-capabilities.js +85 -0
- package/dist/shared/redaction/redaction.d.ts +1 -0
- package/dist/shared/redaction/redaction.js +39 -3
- package/dist/shared/time/monotonic.d.ts +1 -0
- package/dist/shared/time/monotonic.js +8 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worktree/dependency-warmer.d.ts +41 -9
- package/dist/worktree/dependency-warmer.js +571 -22
- package/dist/worktree/index.d.ts +1 -1
- 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.service.d.ts +7 -0
- package/dist/worktree/worktree.service.js +253 -21
- package/dist/worktree/worktree.types.d.ts +7 -1
- package/package.json +7 -5
- package/runtime/windows-job-supervisor.ps1 +380 -14
|
@@ -27,9 +27,16 @@ export interface SandboxPreflightResult {
|
|
|
27
27
|
readonly available: boolean;
|
|
28
28
|
readonly healthy: boolean;
|
|
29
29
|
readonly generation: number;
|
|
30
|
+
readonly sampledAt: string;
|
|
30
31
|
readonly runtimeVersion: string | null;
|
|
31
32
|
readonly maxConcurrentSandboxes: number;
|
|
32
33
|
readonly totalMemoryBytes: number;
|
|
34
|
+
/** Raw free memory reported by the host operating system. */
|
|
35
|
+
readonly rawHostAvailableMemoryBytes: number;
|
|
36
|
+
/** Raw free memory in Docker's capacity domain; null when that domain cannot be sampled. */
|
|
37
|
+
readonly rawDaemonAvailableMemoryBytes: number | null;
|
|
38
|
+
/** Conservative raw admission bound selected from every required memory domain. */
|
|
39
|
+
readonly rawAvailableMemoryBytes: number;
|
|
33
40
|
readonly availableMemoryBytes: number;
|
|
34
41
|
readonly hostReserveBytes: number;
|
|
35
42
|
readonly admissionMemoryBytes: number;
|
|
@@ -3,6 +3,7 @@ import path from "node:path";
|
|
|
3
3
|
import { GitClient } from "../shared/git/git.js";
|
|
4
4
|
import { injectWorktreeArtifacts, filterArtifactsForLane } from "../worktree/artifact-injector.js";
|
|
5
5
|
import { hydratePriorPhaseArtifacts } from "../worktree/prior-phase-artifact-hydrator.js";
|
|
6
|
+
import { materializeStoryQaReferences } from "../worktree/story-qa-reference-hydrator.js";
|
|
6
7
|
import { clearRunArtifactRoots, normalizeBranchName } from "../worktree/worktree.service.js";
|
|
7
8
|
export class SandboxWorkspaceService {
|
|
8
9
|
workspace;
|
|
@@ -36,6 +37,7 @@ export class SandboxWorkspaceService {
|
|
|
36
37
|
await this.git.run(this.workspace, ["config", "user.email", "forge-agent@forge.local"]);
|
|
37
38
|
await this.git.run(this.workspace, ["config", "user.name", "Forge Agent"]);
|
|
38
39
|
await this.git.run(this.workspace, ["config", "core.hooksPath", "/dev/null"]);
|
|
40
|
+
await materializeStoryQaReferences(this.workspace, request, this.git);
|
|
39
41
|
await clearRunArtifactRoots(this.workspace, request);
|
|
40
42
|
const artifacts = filterArtifactsForLane(request.artifacts, request.lane, request.phase);
|
|
41
43
|
if (artifacts.length > 0) {
|
|
@@ -1,4 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
import { type NativeTestPostgresFallback } from "../runtime/native-test-postgres-fallback.js";
|
|
2
|
+
export declare const managedAttemptToolNames: readonly ["forge.run_managed_command", "run_managed_command", "forge.start_managed_command", "start_managed_command", "forge.get_managed_command", "get_managed_command", "forge.wait_managed_command", "wait_managed_command", "forge.start_managed_verification", "start_managed_verification", "forge.reset_generated_outputs", "reset_generated_outputs"];
|
|
3
|
+
/**
|
|
4
|
+
* Stops every managed command this MCP server started, proves each process tree stopped,
|
|
5
|
+
* and writes their terminal receipts. Called when the provider closes the MCP connection
|
|
6
|
+
* or the server is signalled: once this server exits nothing could supervise them.
|
|
7
|
+
*/
|
|
8
|
+
export declare function stopManagedCommandsForOwnerExit(): Promise<void>;
|
|
9
|
+
/** Test support: lets one test process act as a fresh MCP server after a simulated exit. */
|
|
10
|
+
export declare function resetManagedCommandOwnerShutdownForTesting(): void;
|
|
11
|
+
declare const ownerShutdownSignals: readonly ["SIGTERM", "SIGHUP", "SIGINT"];
|
|
12
|
+
export interface OwnerShutdownSignalTarget {
|
|
13
|
+
once(signal: (typeof ownerShutdownSignals)[number], listener: () => void): unknown;
|
|
14
|
+
removeListener(signal: (typeof ownerShutdownSignals)[number], listener: () => void): unknown;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Makes a termination signal stop this server's managed commands before it exits, so none
|
|
18
|
+
* outlives its only supervisor. Returns a function that removes the handlers.
|
|
19
|
+
*/
|
|
20
|
+
export declare function installOwnerShutdownHandlers(target?: OwnerShutdownSignalTarget, exit?: (code: number) => void): () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Runs an MCP server body, then stops every managed command it started before returning.
|
|
23
|
+
* The signal handlers stay installed until that stop completes: a signal during the body
|
|
24
|
+
* or the stop exits only after the same stop finishes, never by Node's default exit.
|
|
25
|
+
*/
|
|
26
|
+
export declare function runWithOwnerShutdown<T>(body: () => Promise<T>, target?: OwnerShutdownSignalTarget, exit?: (code: number) => void): Promise<T>;
|
|
2
27
|
export declare function isManagedAttemptTool(name: string): boolean;
|
|
3
28
|
export declare function managedAttemptToolDefinition(name: string): unknown;
|
|
4
29
|
export interface ManagedAttemptToolResult {
|
|
@@ -10,3 +35,19 @@ export interface ManagedAttemptToolResult {
|
|
|
10
35
|
readonly isError?: boolean;
|
|
11
36
|
}
|
|
12
37
|
export declare function callManagedAttemptTool(name: string, input: unknown, worktreePath: string): Promise<ManagedAttemptToolResult>;
|
|
38
|
+
export declare function buildManagedVerificationCommand(profile: string, outputDirectory: string, shardCount: number, shardIndex: number, noBuild: boolean, runAllShards?: boolean, maxParallelism?: number): {
|
|
39
|
+
command: string;
|
|
40
|
+
args: readonly string[];
|
|
41
|
+
timeoutMs: number;
|
|
42
|
+
};
|
|
43
|
+
export declare function preferredPowerShellExecutable(platform?: NodeJS.Platform, pathValue?: string): string;
|
|
44
|
+
export declare function validatePlaywrightProjectName(project: string, availableProjects: readonly string[]): void;
|
|
45
|
+
export declare function playwrightProjectNamesFromConfigSource(source: string): readonly string[];
|
|
46
|
+
/**
|
|
47
|
+
* Runner-authored verification normally uses its attempt-owned Testcontainers
|
|
48
|
+
* database. Only when the Docker engine is unavailable does it switch to the
|
|
49
|
+
* operator-provisioned native test cluster, which holds no real data.
|
|
50
|
+
*/
|
|
51
|
+
export declare function managedVerificationDatabaseEnvironment(dockerAvailable?: () => Promise<boolean>, readFallback?: () => NativeTestPostgresFallback | null): Promise<Readonly<Record<string, string>>>;
|
|
52
|
+
export declare function isBuildProducingManagedCommand(command: string, args: readonly string[]): boolean;
|
|
53
|
+
export {};
|