@loucompanion/forge-bridge 0.1.3-dev.fbe15023cdfe → 0.1.4-dev.04a1e5b9e484
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 +88 -2
- 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 +72 -3
- package/dist/bridge/bridge.service.js +1563 -152
- package/dist/bridge/bridge.types.d.ts +46 -1
- 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 +1 -0
- package/dist/cleanup/cleanup.service.js +70 -9
- package/dist/cli/cli.help.js +2 -2
- 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 +16 -0
- package/dist/runtime/attempt-process-supervisor.js +94 -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 +62 -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-listener-inspector.d.ts +8 -1
- package/dist/runtime/host-listener-inspector.js +121 -60
- package/dist/runtime/host-runtime-contract.d.ts +12 -1
- package/dist/runtime/host-runtime-contract.js +168 -55
- package/dist/runtime/host-runtime-lease.d.ts +92 -8
- package/dist/runtime/host-runtime-lease.js +1141 -114
- package/dist/runtime/host-runtime-promotion.d.ts +12 -3
- package/dist/runtime/host-runtime-promotion.js +59 -12
- 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-host-runtime-adapter.d.ts +1 -0
- package/dist/runtime/playwright-host-runtime-adapter.js +53 -5
- 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 +17 -1
- package/dist/session/managed-attempt-tools.js +489 -34
- package/dist/session/managed-build-coordinator.d.ts +5 -0
- package/dist/session/managed-build-coordinator.js +106 -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 +224 -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 +126 -17
- 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-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 +8 -0
- package/dist/session/provider-cli/ci-repair-readiness.js +23 -3
- package/dist/session/provider-cli/provider-cli.artifacts.d.ts +4 -2
- package/dist/session/provider-cli/provider-cli.artifacts.js +47 -13
- package/dist/session/provider-cli/provider-cli.deterministic.js +34 -2
- package/dist/session/provider-cli/provider-cli.process.d.ts +51 -0
- package/dist/session/provider-cli/provider-cli.process.js +422 -22
- package/dist/session/provider-cli/provider-cli.prompts.d.ts +5 -0
- package/dist/session/provider-cli/provider-cli.prompts.js +136 -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 +773 -69
- package/dist/session/provider-cli/provider-cli.types.d.ts +2 -0
- package/dist/session/provider-cli/provider-output-state.d.ts +10 -0
- package/dist/session/provider-cli/provider-output-state.js +361 -17
- 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.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 +587 -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 +497 -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
|
@@ -1 +1,4 @@
|
|
|
1
|
+
import { type BridgeChatCapability } from "../bridge/bridge-chat.types.js";
|
|
2
|
+
import type { BridgeProviderStatus } from "../bridge/bridge.types.js";
|
|
1
3
|
export declare function supportsDraftImageAttachmentsFor(cliProviders: readonly string[]): boolean;
|
|
4
|
+
export declare function bridgeChatCapabilityFor(cliProviders: readonly string[], providerStatuses: Readonly<Record<string, BridgeProviderStatus>>, baseCapability?: BridgeChatCapability | null): BridgeChatCapability;
|
|
@@ -1,3 +1,88 @@
|
|
|
1
|
+
import { bridgeChatProtocolVersion, normalizeBridgeChatCapability, unavailableBridgeChatCapability, } from "../bridge/bridge-chat.types.js";
|
|
2
|
+
const defaultBridgeChatMaxMessageBytes = 128 * 1024;
|
|
3
|
+
const defaultBridgeChatMaxContextRefs = 8;
|
|
1
4
|
export function supportsDraftImageAttachmentsFor(cliProviders) {
|
|
2
5
|
return cliProviders.some((provider) => provider.trim().toLowerCase() === "codex");
|
|
3
6
|
}
|
|
7
|
+
export function bridgeChatCapabilityFor(cliProviders, providerStatuses, baseCapability) {
|
|
8
|
+
const base = normalizeBridgeChatCapability(baseCapability ?? unavailableBridgeChatCapability());
|
|
9
|
+
if (base.protocolVersion !== bridgeChatProtocolVersion) {
|
|
10
|
+
return base;
|
|
11
|
+
}
|
|
12
|
+
const providers = chatProviderEntries(cliProviders, providerStatuses);
|
|
13
|
+
const usableProviders = providers.filter((provider) => provider.status?.signedIn !== false);
|
|
14
|
+
if (usableProviders.length === 0) {
|
|
15
|
+
return unavailableBridgeChatCapability(bridgeChatProtocolVersion, providers.length === 0 ? "no_cli_providers" : "no_signed_in_cli_providers", providers.length === 0
|
|
16
|
+
? "No CLI providers are configured for Bridge Chat."
|
|
17
|
+
: "No signed-in CLI providers are available for Bridge Chat.");
|
|
18
|
+
}
|
|
19
|
+
return normalizeBridgeChatCapability({
|
|
20
|
+
...base,
|
|
21
|
+
availability: usableProviders.length === providers.length ? "available" : "degraded",
|
|
22
|
+
protocolVersion: bridgeChatProtocolVersion,
|
|
23
|
+
supportedProviders: usableProviders.map((provider) => provider.providerKind),
|
|
24
|
+
supportedModels: sortedUniqueStrings(usableProviders.flatMap((provider) => provider.status?.models ?? []), false),
|
|
25
|
+
supportsTextStreaming: true,
|
|
26
|
+
supportsCancel: true,
|
|
27
|
+
supportsResume: true,
|
|
28
|
+
supportsProviderThreadContinuity: true,
|
|
29
|
+
supportsAttachments: true,
|
|
30
|
+
supportsActionBrokerGrants: true,
|
|
31
|
+
maxMessageBytes: base.maxMessageBytes || defaultBridgeChatMaxMessageBytes,
|
|
32
|
+
maxContextRefs: base.maxContextRefs || defaultBridgeChatMaxContextRefs,
|
|
33
|
+
unavailableCode: null,
|
|
34
|
+
unavailableReason: null,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function chatProviderEntries(cliProviders, providerStatuses) {
|
|
38
|
+
const statuses = new Map();
|
|
39
|
+
for (const [provider, status] of Object.entries(providerStatuses)) {
|
|
40
|
+
const providerKind = provider.trim().toLowerCase();
|
|
41
|
+
if (providerKind.length === 0)
|
|
42
|
+
continue;
|
|
43
|
+
statuses.set(providerKind, { providerKind, status });
|
|
44
|
+
}
|
|
45
|
+
const providers = new Map();
|
|
46
|
+
for (const provider of cliProviders) {
|
|
47
|
+
const providerKind = provider.trim().toLowerCase();
|
|
48
|
+
if (providerKind.length === 0)
|
|
49
|
+
continue;
|
|
50
|
+
providers.set(providerKind, {
|
|
51
|
+
providerKind,
|
|
52
|
+
status: statuses.get(providerKind)?.status,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
for (const [providerKind, entry] of statuses) {
|
|
56
|
+
if (!providers.has(providerKind)) {
|
|
57
|
+
providers.set(providerKind, entry);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return [...providers.values()].sort((left, right) => compareStable(left.providerKind, right.providerKind));
|
|
61
|
+
}
|
|
62
|
+
function sortedUniqueStrings(values, lower) {
|
|
63
|
+
const byKey = new Map();
|
|
64
|
+
for (const value of values) {
|
|
65
|
+
const clean = value.trim();
|
|
66
|
+
if (clean.length === 0)
|
|
67
|
+
continue;
|
|
68
|
+
const normalized = lower ? clean.toLowerCase() : clean;
|
|
69
|
+
const key = normalized.toLowerCase();
|
|
70
|
+
if (!byKey.has(key)) {
|
|
71
|
+
byKey.set(key, normalized);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return [...byKey.values()].sort(compareStable);
|
|
75
|
+
}
|
|
76
|
+
function compareStable(left, right) {
|
|
77
|
+
const leftKey = left.toLowerCase();
|
|
78
|
+
const rightKey = right.toLowerCase();
|
|
79
|
+
if (leftKey < rightKey)
|
|
80
|
+
return -1;
|
|
81
|
+
if (leftKey > rightKey)
|
|
82
|
+
return 1;
|
|
83
|
+
if (left < right)
|
|
84
|
+
return -1;
|
|
85
|
+
if (left > right)
|
|
86
|
+
return 1;
|
|
87
|
+
return 0;
|
|
88
|
+
}
|
|
@@ -1,14 +1,41 @@
|
|
|
1
1
|
const secretKeyPattern = /(api[_-]?key|authorization|bearer|client[_-]?secret|password|secret|token)/i;
|
|
2
|
+
// Serialized artifact keys follow the existing assignment policy, not the broad
|
|
3
|
+
// object redactor: tokenCount/maxTokens are evidence, not credential values.
|
|
4
|
+
const jsonCredentialKeyPattern = /(api[_-]?key|client[_-]?secret|password|secret|token)$/i;
|
|
2
5
|
const attachmentContentKeyPattern = /^(textContent|contentBase64)$/i;
|
|
6
|
+
const bridgeChatHandoffGrantKeyPattern = /^(tempFileToken|grantNonce|nonce|handle|grantId|handoffId|attachmentId)$/i;
|
|
7
|
+
const sensitiveFilenameKeyPattern = /^(fileName|filename)$/i;
|
|
3
8
|
const serializedAttachmentContentPattern = /("(?:textContent|contentBase64)"\s*:\s*")(?:(?:\\.)|[^"\\])*(")/gi;
|
|
9
|
+
const serializedBridgeChatHandoffGrantPattern = /("(?:tempFileToken|grantNonce|nonce|handle|grantId|handoffId|attachmentId)"\s*:\s*")(?:(?:\\.)|[^"\\])*(")/gi;
|
|
10
|
+
const serializedSensitiveFilenamePattern = /("(?:fileName|filename)"\s*:\s*")(?:(?:\\.)|[^"\\])*(")/gi;
|
|
4
11
|
const authorizationCredentialPattern = /(\bauthorization\s*[:=]\s*(?:bearer|basic)?\s*)([^"',\s]+)/gi;
|
|
5
12
|
const bearerCredentialPattern = /(\bbearer\s+)([^"',\s]+)/gi;
|
|
6
13
|
const secretAssignmentPattern = /(api[_-]?key|client[_-]?secret|password|secret|token)(\s*["']?\s*[:=]\s*["']?\s*)([^"',\s]+)/gi;
|
|
14
|
+
// Keep this boundary in parity with Forge.Api's SecretRedactor. Without it, the
|
|
15
|
+
// `sk-` substring in a structural identifier such as `task-skill-contract`
|
|
16
|
+
// is mistaken for a provider credential and corrupts the artifact after it has
|
|
17
|
+
// already passed schema validation.
|
|
18
|
+
const providerKeyPattern = /(?<![a-zA-Z0-9])sk-[a-zA-Z0-9_-]{12,}/g;
|
|
7
19
|
export function redactSecrets(value, exactSecrets = []) {
|
|
8
20
|
return redactValue(value, exactSecrets);
|
|
9
21
|
}
|
|
22
|
+
export function shouldRedactJsonProperty(key) {
|
|
23
|
+
// Assignment redaction already permits whitespace before the delimiter. Match
|
|
24
|
+
// that policy without normalizing the actual JSON property name on the wire.
|
|
25
|
+
const policyKey = key.trim();
|
|
26
|
+
return jsonCredentialKeyPattern.test(policyKey)
|
|
27
|
+
|| /^(authorization|bearer)$/i.test(policyKey)
|
|
28
|
+
|| attachmentContentKeyPattern.test(policyKey)
|
|
29
|
+
|| bridgeChatHandoffGrantKeyPattern.test(policyKey)
|
|
30
|
+
|| (redactSensitiveFilenames() && sensitiveFilenameKeyPattern.test(policyKey));
|
|
31
|
+
}
|
|
10
32
|
export function redactText(value, exactSecrets = []) {
|
|
11
|
-
let redacted = value
|
|
33
|
+
let redacted = value
|
|
34
|
+
.replace(serializedAttachmentContentPattern, "$1[REDACTED]$2")
|
|
35
|
+
.replace(serializedBridgeChatHandoffGrantPattern, "$1[REDACTED]$2");
|
|
36
|
+
if (redactSensitiveFilenames()) {
|
|
37
|
+
redacted = redacted.replace(serializedSensitiveFilenamePattern, "$1[REDACTED]$2");
|
|
38
|
+
}
|
|
12
39
|
for (const secret of exactSecrets) {
|
|
13
40
|
if (secret.length > 0) {
|
|
14
41
|
redacted = redacted.split(secret).join("[REDACTED]");
|
|
@@ -18,7 +45,7 @@ export function redactText(value, exactSecrets = []) {
|
|
|
18
45
|
.replace(authorizationCredentialPattern, "$1[REDACTED]")
|
|
19
46
|
.replace(bearerCredentialPattern, "$1[REDACTED]")
|
|
20
47
|
.replace(secretAssignmentPattern, "$1$2[REDACTED]")
|
|
21
|
-
.replace(
|
|
48
|
+
.replace(providerKeyPattern, "[REDACTED]");
|
|
22
49
|
}
|
|
23
50
|
function redactValue(value, exactSecrets) {
|
|
24
51
|
if (typeof value === "string") {
|
|
@@ -32,6 +59,15 @@ function redactValue(value, exactSecrets) {
|
|
|
32
59
|
}
|
|
33
60
|
return Object.fromEntries(Object.entries(value).map(([key, item]) => [
|
|
34
61
|
key,
|
|
35
|
-
secretKeyPattern.test(key)
|
|
62
|
+
secretKeyPattern.test(key)
|
|
63
|
+
|| attachmentContentKeyPattern.test(key)
|
|
64
|
+
|| bridgeChatHandoffGrantKeyPattern.test(key)
|
|
65
|
+
|| (redactSensitiveFilenames() && sensitiveFilenameKeyPattern.test(key))
|
|
66
|
+
? "[REDACTED]"
|
|
67
|
+
: redactValue(item, exactSecrets)
|
|
36
68
|
]));
|
|
37
69
|
}
|
|
70
|
+
function redactSensitiveFilenames() {
|
|
71
|
+
const value = process.env.FORGE_REDACT_FILENAMES?.trim().toLowerCase();
|
|
72
|
+
return value === "1" || value === "true" || value === "yes";
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function monotonicNowMs(): number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Elapsed time and local deadlines use the monotonic clock. The wall clock can step:
|
|
2
|
+
// a WSL VM's clock is corrected in multi-second jumps, which would end a local wait
|
|
3
|
+
// early or count time that never passed. Timestamps that are persisted or compared
|
|
4
|
+
// across processes (lease expiry, receipts, file mtimes) stay on the wall clock.
|
|
5
|
+
// Read through the global so test fake timers that replace `performance` apply.
|
|
6
|
+
export function monotonicNowMs() {
|
|
7
|
+
return performance.now();
|
|
8
|
+
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const forgeBridgeVersion = "0.1.
|
|
1
|
+
export declare const forgeBridgeVersion = "0.1.4-dev.04a1e5b9e484";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const forgeBridgeVersion = "0.1.
|
|
1
|
+
export const forgeBridgeVersion = "0.1.4-dev.04a1e5b9e484";
|
|
@@ -9,6 +9,13 @@ export interface WarmDependenciesRequest {
|
|
|
9
9
|
readonly worktreePath: string;
|
|
10
10
|
readonly allowedRoot: string;
|
|
11
11
|
readonly warmPathOverrides?: readonly string[];
|
|
12
|
+
readonly preparationPolicy?: DependencyPreparationPolicy;
|
|
13
|
+
}
|
|
14
|
+
export interface DependencyPreparationPolicy {
|
|
15
|
+
readonly isolation?: string;
|
|
16
|
+
readonly trustDomain?: string;
|
|
17
|
+
readonly invalidationEpoch?: string;
|
|
18
|
+
readonly toolchainVersions?: Readonly<Partial<Record<DependencyEcosystem | "npm" | "pnpm", string>>>;
|
|
12
19
|
}
|
|
13
20
|
export interface InstallFallbackResult {
|
|
14
21
|
readonly ecosystem: DependencyEcosystem;
|
|
@@ -20,12 +27,24 @@ export interface WarmDependenciesResult {
|
|
|
20
27
|
readonly linked: readonly string[];
|
|
21
28
|
readonly skipped: readonly string[];
|
|
22
29
|
readonly fallbacks: readonly InstallFallbackResult[];
|
|
30
|
+
readonly receipts: readonly DependencyPreparationReceiptResult[];
|
|
31
|
+
}
|
|
32
|
+
export interface DependencyPreparationReceiptResult {
|
|
33
|
+
readonly ecosystem: DependencyEcosystem;
|
|
34
|
+
readonly packageRoot: string;
|
|
35
|
+
readonly command: string;
|
|
36
|
+
readonly cacheHit: boolean;
|
|
37
|
+
readonly fingerprint: string;
|
|
38
|
+
readonly receiptPath: string;
|
|
39
|
+
/** End-to-end receipt lookup/preparation time, including coordinator wait. */
|
|
40
|
+
readonly durationMs: number;
|
|
23
41
|
}
|
|
24
42
|
export interface CommandExecutor {
|
|
25
43
|
run(cwd: string, command: string, args: readonly string[], options?: CommandExecutionOptions): Promise<void>;
|
|
26
44
|
}
|
|
27
45
|
export interface CommandExecutionOptions {
|
|
28
46
|
readonly env?: NodeJS.ProcessEnv;
|
|
47
|
+
readonly windowsVerbatimArguments?: boolean;
|
|
29
48
|
}
|
|
30
49
|
export declare function detectWarmPaths(repoRoot: string, warmPathOverrides?: readonly string[]): Promise<WarmPathEntry[]>;
|
|
31
50
|
export declare function warmWorktreeDependencies(request: WarmDependenciesRequest, executor?: CommandExecutor): Promise<WarmDependenciesResult>;
|
|
@@ -39,14 +58,27 @@ export interface NpmLaunchOptions {
|
|
|
39
58
|
readonly platform?: NodeJS.Platform;
|
|
40
59
|
readonly homeDir?: string;
|
|
41
60
|
readonly candidates?: readonly string[];
|
|
61
|
+
readonly pathExists?: (candidate: string) => boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface PackageManagerEnvironmentOptions {
|
|
64
|
+
readonly platform?: NodeJS.Platform;
|
|
65
|
+
readonly execPath?: string;
|
|
66
|
+
readonly pathExists?: (candidate: string) => boolean;
|
|
67
|
+
readonly maximumPathLength?: number;
|
|
68
|
+
readonly packageRoot?: string;
|
|
69
|
+
readonly requiredPathDirectories?: readonly string[];
|
|
70
|
+
}
|
|
71
|
+
export interface PackageManagerLaunch {
|
|
72
|
+
readonly command: string;
|
|
73
|
+
readonly args: readonly string[];
|
|
74
|
+
readonly requiredPathDirectories?: readonly string[];
|
|
75
|
+
readonly windowsVerbatimArguments?: boolean;
|
|
42
76
|
}
|
|
43
|
-
export declare function resolveNpmLaunch(args: readonly string[], options?: NpmLaunchOptions):
|
|
44
|
-
|
|
45
|
-
args: readonly string[];
|
|
46
|
-
};
|
|
47
|
-
export declare function resolvePnpmLaunch(args: readonly string[]): {
|
|
48
|
-
command: string;
|
|
49
|
-
args: readonly string[];
|
|
50
|
-
};
|
|
77
|
+
export declare function resolveNpmLaunch(args: readonly string[], options?: NpmLaunchOptions): PackageManagerLaunch;
|
|
78
|
+
export declare function resolvePnpmLaunch(args: readonly string[], options?: NpmLaunchOptions): PackageManagerLaunch;
|
|
51
79
|
export declare function formatCommandFailureOutput(stdout: string, stderr: string): string;
|
|
52
|
-
export declare function unattendedPackageManagerEnvironment(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
80
|
+
export declare function unattendedPackageManagerEnvironment(env?: NodeJS.ProcessEnv, options?: PackageManagerEnvironmentOptions): NodeJS.ProcessEnv;
|
|
81
|
+
export declare function unattendedDependencyEnvironment(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
82
|
+
export declare function compactWindowsPackageManagerPath(pathValue: string, env?: NodeJS.ProcessEnv, options?: PackageManagerEnvironmentOptions): string;
|
|
83
|
+
export declare function windowsPackageManagerLifecyclePathPrefix(packageRoot: string): string;
|
|
84
|
+
export declare function windowsPackageManagerPathBudget(packageRoot: string): number;
|