@loucompanion/forge-bridge 0.1.4-dev.81e48ecc185d → 0.1.4-dev.866b33be3065

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.
Files changed (61) hide show
  1. package/README.md +3 -0
  2. package/dist/bridge/bridge-chat-provider-command.d.ts +1 -1
  3. package/dist/bridge/bridge-chat-provider-command.js +16 -4
  4. package/dist/bridge/bridge-chat.types.d.ts +10 -0
  5. package/dist/bridge/bridge-chat.types.js +16 -1
  6. package/dist/bridge/runner-host-capabilities.d.ts +3 -0
  7. package/dist/bridge/runner-host-capabilities.js +13 -0
  8. package/dist/runtime/attempt-database-broker.d.ts +1 -1
  9. package/dist/runtime/docker-engine-probe.d.ts +5 -0
  10. package/dist/runtime/docker-engine-probe.js +7 -0
  11. package/dist/runtime/ephemeral-test-postgres-grant.d.ts +37 -0
  12. package/dist/runtime/ephemeral-test-postgres-grant.js +85 -0
  13. package/dist/runtime/ephemeral-test-postgres.d.ts +57 -0
  14. package/dist/runtime/ephemeral-test-postgres.js +303 -0
  15. package/dist/runtime/host-facts.d.ts +2 -1
  16. package/dist/runtime/host-load-admission.d.ts +4 -1
  17. package/dist/runtime/host-load-sampler.d.ts +34 -4
  18. package/dist/runtime/host-load-sampler.js +73 -7
  19. package/dist/runtime/host-load-windows-cpu.d.ts +34 -0
  20. package/dist/runtime/host-load-windows-cpu.js +85 -0
  21. package/dist/runtime/native-test-postgres-fallback.d.ts +51 -7
  22. package/dist/runtime/native-test-postgres-fallback.js +60 -8
  23. package/dist/session/architect-waits.d.ts +2 -0
  24. package/dist/session/architect-waits.js +138 -0
  25. package/dist/session/managed-attempt-tools.d.ts +0 -7
  26. package/dist/session/managed-attempt-tools.js +44 -54
  27. package/dist/session/phase-completion.artifacts.js +2 -1
  28. package/dist/session/phase-completion.runtime.js +1 -1
  29. package/dist/session/phase-completion.schemas.js +3 -11
  30. package/dist/session/phase-completion.validation.js +3 -1
  31. package/dist/session/pre-publication-native-postgres.d.ts +30 -0
  32. package/dist/session/pre-publication-native-postgres.js +111 -0
  33. package/dist/session/pre-publication-step-execution.d.ts +2 -1
  34. package/dist/session/pre-publication-step-execution.js +6 -5
  35. package/dist/session/pre-publication-validation.d.ts +7 -3
  36. package/dist/session/pre-publication-validation.js +32 -30
  37. package/dist/session/provider-cli/provider-cli.child-environment.d.ts +7 -0
  38. package/dist/session/provider-cli/provider-cli.child-environment.js +73 -0
  39. package/dist/session/provider-cli/provider-cli.codex-models-cache.d.ts +3 -0
  40. package/dist/session/provider-cli/provider-cli.codex-models-cache.js +37 -0
  41. package/dist/session/provider-cli/provider-cli.process.d.ts +8 -30
  42. package/dist/session/provider-cli/provider-cli.process.js +25 -376
  43. package/dist/session/provider-cli/provider-cli.windows-environment.d.ts +10 -0
  44. package/dist/session/provider-cli/provider-cli.windows-environment.js +151 -0
  45. package/dist/session/provider-cli/provider-cli.windows-launch.d.ts +23 -0
  46. package/dist/session/provider-cli/provider-cli.windows-launch.js +131 -0
  47. package/dist/session/provider-cli/provider-output-pipes.d.ts +30 -0
  48. package/dist/session/provider-cli/provider-output-pipes.js +67 -0
  49. package/dist/session/qa-sidecar-validation.d.ts +6 -0
  50. package/dist/session/qa-sidecar-validation.js +28 -0
  51. package/dist/session/session-redaction.js +31 -181
  52. package/dist/session/session.types.js +1 -1
  53. package/dist/session/sidecar-json-shape.d.ts +31 -0
  54. package/dist/session/sidecar-json-shape.js +217 -0
  55. package/dist/shared/process/windows-app-execution-alias.d.ts +19 -0
  56. package/dist/shared/process/windows-app-execution-alias.js +45 -0
  57. package/dist/shared/process/windows-launch.d.ts +18 -0
  58. package/dist/shared/process/windows-launch.js +68 -0
  59. package/dist/version.d.ts +1 -1
  60. package/dist/version.js +1 -1
  61. package/package.json +1 -1
@@ -0,0 +1,217 @@
1
+ import { TextDecoder } from "node:util";
2
+ // One set of JSON shape rules for result sidecars. The end-of-run secret check and the QA gate
3
+ // tools that record sidecars during the run both use it, so the agent is told about a malformed
4
+ // sidecar while it can still rewrite the file, and the end-of-run check never disagrees with it.
5
+ //
6
+ // Content sniffing is deliberate: any sidecar whose text starts like JSON ("{", "[" or '"') is
7
+ // held to strict JSON, whatever its file name, so JSON escapes cannot hide secret material from
8
+ // the byte scan. Only a parseable document can be checked token by token.
9
+ export const maximumIntegrityJsonBytes = 8 * 1024 * 1024;
10
+ const maximumIntegrityJsonDepth = 128;
11
+ const maximumIntegrityJsonTokens = 262_144;
12
+ const jsonEscapePattern = /\\(?:u([0-9a-fA-F]{4})|(["\\/bfnrt]))/gu;
13
+ const simpleJsonEscapes = {
14
+ "\"": "\"", "\\": "\\", "/": "/", b: "\b", f: "\f", n: "\n", r: "\r", t: "\t",
15
+ };
16
+ /** A JSON text that breaks a shape rule. `reason` names the rule and never quotes file content. */
17
+ export class JsonShapeError extends Error {
18
+ reason;
19
+ constructor(reason) {
20
+ super(reason);
21
+ this.reason = reason;
22
+ this.name = "JsonShapeError";
23
+ }
24
+ }
25
+ export const oversizedJsonReason = "it is larger than the 8 MiB JSON inspection limit";
26
+ /**
27
+ * Checks a bounded JSON text and calls `onString` with every decoded string token (property names
28
+ * and values). Throws JsonShapeError for a shape problem; errors thrown by `onString` propagate.
29
+ */
30
+ export function inspectJsonText(value, onString) {
31
+ if (Buffer.byteLength(value, "utf8") > maximumIntegrityJsonBytes)
32
+ throw new JsonShapeError(oversizedJsonReason);
33
+ if (value.trim().length === 0)
34
+ throw new JsonShapeError("the file is empty");
35
+ const containers = [];
36
+ let tokenCount = 0;
37
+ let index = 0;
38
+ while (index < value.length) {
39
+ const code = value.charCodeAt(index);
40
+ if (isJsonWhitespace(code) || code === 0x2c || code === 0x3a) {
41
+ index += 1;
42
+ continue;
43
+ }
44
+ tokenCount += 1;
45
+ if (tokenCount > maximumIntegrityJsonTokens) {
46
+ throw new JsonShapeError(`it has more than ${maximumIntegrityJsonTokens} JSON tokens`);
47
+ }
48
+ index = inspectJsonToken(value, index, containers, onString);
49
+ }
50
+ if (containers.length !== 0)
51
+ throw new JsonShapeError("a bracket or brace is never closed");
52
+ assertJsonParses(value);
53
+ }
54
+ function inspectJsonToken(value, index, containers, onString) {
55
+ const code = value.charCodeAt(index);
56
+ if (code === 0x22) {
57
+ const token = decodeJsonStringToken(value, index);
58
+ onString?.(token.decoded);
59
+ return token.nextIndex;
60
+ }
61
+ if (code === 0x7b || code === 0x5b) {
62
+ containers.push(code);
63
+ if (containers.length > maximumIntegrityJsonDepth) {
64
+ throw new JsonShapeError(`it nests deeper than ${maximumIntegrityJsonDepth} levels`);
65
+ }
66
+ return index + 1;
67
+ }
68
+ if (code === 0x7d || code === 0x5d) {
69
+ if (containers.pop() !== (code === 0x7d ? 0x7b : 0x5b)) {
70
+ throw new JsonShapeError(`an unmatched closing bracket or brace ${locationOf(value, index)}`);
71
+ }
72
+ return index + 1;
73
+ }
74
+ let end = index + 1;
75
+ while (end < value.length && !isJsonWhitespace(value.charCodeAt(end)) && !isJsonPunctuation(value.charCodeAt(end))) {
76
+ end += 1;
77
+ }
78
+ return end;
79
+ }
80
+ function assertJsonParses(value) {
81
+ try {
82
+ JSON.parse(value);
83
+ }
84
+ catch (error) {
85
+ // The parser's message can quote the offending text; keep only its position.
86
+ const message = error instanceof Error ? error.message : "";
87
+ const position = /\bposition (\d+)/u.exec(message);
88
+ const location = position ? ` ${locationOf(value, Number(position[1]))}` : "";
89
+ throw new JsonShapeError(message.includes("after JSON")
90
+ ? `unexpected text after the JSON value${location}`
91
+ : `invalid JSON syntax${location}`);
92
+ }
93
+ }
94
+ export function decodeJsonStringToken(value, openingQuoteIndex) {
95
+ const chunks = [];
96
+ let segmentStart = openingQuoteIndex + 1;
97
+ let index = segmentStart;
98
+ while (index < value.length) {
99
+ const code = value.charCodeAt(index);
100
+ if (code === 0x22) {
101
+ chunks.push(value.slice(segmentStart, index));
102
+ const decoded = chunks.join("");
103
+ if (!isWellFormedUnicode(decoded)) {
104
+ throw new JsonShapeError(`a string has an unpaired Unicode surrogate ${locationOf(value, openingQuoteIndex)}`);
105
+ }
106
+ return { decoded, nextIndex: index + 1 };
107
+ }
108
+ if (code < 0x20) {
109
+ throw new JsonShapeError(`a string contains a raw control character ${locationOf(value, index)}`);
110
+ }
111
+ if (code !== 0x5c) {
112
+ index += 1;
113
+ continue;
114
+ }
115
+ chunks.push(value.slice(segmentStart, index));
116
+ const escape = decodeJsonEscape(value, index);
117
+ chunks.push(escape.decoded);
118
+ index = escape.nextIndex;
119
+ segmentStart = index;
120
+ }
121
+ throw new JsonShapeError(`a string is never closed ${locationOf(value, openingQuoteIndex)}`);
122
+ }
123
+ function decodeJsonEscape(value, backslashIndex) {
124
+ const escaped = value[backslashIndex + 1];
125
+ const simple = escaped === undefined ? undefined : simpleJsonEscapes[escaped];
126
+ if (simple !== undefined)
127
+ return { decoded: simple, nextIndex: backslashIndex + 2 };
128
+ const hex = value.slice(backslashIndex + 2, backslashIndex + 6);
129
+ if (escaped !== "u" || !/^[0-9a-fA-F]{4}$/u.test(hex)) {
130
+ throw new JsonShapeError(`a string has an invalid escape sequence ${locationOf(value, backslashIndex)}`);
131
+ }
132
+ return { decoded: String.fromCharCode(Number.parseInt(hex, 16)), nextIndex: backslashIndex + 6 };
133
+ }
134
+ /**
135
+ * Why a sidecar that looks like JSON is not acceptable JSON, or null when it is fine: valid JSON,
136
+ * plain text that does not start like JSON, or binary content that is not named *.json.
137
+ */
138
+ export function sidecarJsonShapeProblem(content, path, onString) {
139
+ let decoded;
140
+ try {
141
+ decoded = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(content);
142
+ }
143
+ catch {
144
+ // Sniff the bytes anyway (invalid sequences decode to U+FFFD, which is not whitespace), so a
145
+ // file that starts like JSON cannot dodge the strict check with a stray invalid byte.
146
+ return looksLikeJson(Buffer.from(content).toString("utf8"), path) ? "the file is not valid UTF-8" : null;
147
+ }
148
+ if (!looksLikeJson(decoded, path))
149
+ return null;
150
+ if (content.length >= 3 && content[0] === 0xef && content[1] === 0xbb && content[2] === 0xbf) {
151
+ return "the file starts with a UTF-8 byte-order mark";
152
+ }
153
+ try {
154
+ inspectJsonText(decoded, onString);
155
+ return null;
156
+ }
157
+ catch (error) {
158
+ if (error instanceof JsonShapeError)
159
+ return error.reason;
160
+ throw error;
161
+ }
162
+ }
163
+ /** The instruction an agent gets when it records a sidecar that fails the shape check. */
164
+ export function sidecarJsonRepairInstruction(path, reason) {
165
+ const fix = isJsonFileName(path)
166
+ ? "Rewrite it as valid JSON (UTF-8, no byte-order mark), or save plain-text output under a name that does not end in .json"
167
+ : "Rewrite it as valid JSON, or as plain text that does not start with \"[\", \"{\" or a double quote (for example, put a title line first)";
168
+ return `${path} looks like JSON but is not valid JSON (${reason}). Forge rejects sidecars it cannot fully inspect. `
169
+ + `${fix}, then resubmit with the file's new bytes and content_hash.`;
170
+ }
171
+ /**
172
+ * Best-effort decoding of every JSON escape in a text that failed the shape check, so a secret
173
+ * hidden behind escapes still gets the secret error rather than the malformed-sidecar error.
174
+ */
175
+ export function decodeJsonEscapesLeniently(value) {
176
+ return value.replace(jsonEscapePattern, (_match, hex, simple) => hex !== undefined ? String.fromCharCode(Number.parseInt(hex, 16)) : simpleJsonEscapes[simple ?? ""] ?? "");
177
+ }
178
+ export function looksLikeJson(value, path) {
179
+ if (isJsonFileName(path))
180
+ return true;
181
+ const candidate = value.trimStart().replace(/^\uFEFF/u, "").trimStart();
182
+ return candidate.startsWith("{") || candidate.startsWith("[") || candidate.startsWith("\"");
183
+ }
184
+ function isJsonFileName(path) {
185
+ return path.toLowerCase().endsWith(".json");
186
+ }
187
+ function locationOf(value, index) {
188
+ let line = 1;
189
+ let lineStart = 0;
190
+ for (let cursor = value.indexOf("\n"); cursor >= 0 && cursor < index; cursor = value.indexOf("\n", cursor + 1)) {
191
+ line += 1;
192
+ lineStart = cursor + 1;
193
+ }
194
+ return `at line ${line}, column ${index - lineStart + 1}`;
195
+ }
196
+ function isWellFormedUnicode(value) {
197
+ for (let index = 0; index < value.length; index += 1) {
198
+ const code = value.charCodeAt(index);
199
+ if (code >= 0xd800 && code <= 0xdbff) {
200
+ const next = value.charCodeAt(index + 1);
201
+ if (!(next >= 0xdc00 && next <= 0xdfff))
202
+ return false;
203
+ index += 1;
204
+ }
205
+ else if (code >= 0xdc00 && code <= 0xdfff) {
206
+ return false;
207
+ }
208
+ }
209
+ return true;
210
+ }
211
+ export function isJsonWhitespace(code) {
212
+ return code === 0x20 || code === 0x09 || code === 0x0a || code === 0x0d;
213
+ }
214
+ export function isJsonPunctuation(code) {
215
+ return code === 0x7b || code === 0x7d || code === 0x5b || code === 0x5d
216
+ || code === 0x2c || code === 0x3a || code === 0x22;
217
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Tools an agent commonly starts by bare name. When one of them resolves to a Microsoft Store
3
+ * app-execution alias (`%LOCALAPPDATA%\Microsoft\WindowsApps\pwsh.exe` and the like), Windows
4
+ * creates the process it starts outside the provider's Job Object: it survives the job, keeps the
5
+ * pipe handles it inherited, and holds the attempt's output open until it exits on its own.
6
+ */
7
+ export declare const APP_EXECUTION_ALIAS_SENSITIVE_TOOLS: readonly ["pwsh", "node", "dotnet"];
8
+ export interface AppExecutionAliasFinding {
9
+ readonly tool: string;
10
+ /** The alias the tool's bare name resolves to. */
11
+ readonly aliasPath: string;
12
+ /** The first regular install later on PATH, or null when the alias is the only one. */
13
+ readonly nextInstallPath: string | null;
14
+ }
15
+ /** The sensitive tools whose bare name resolves, on this PATH, to an app-execution alias. */
16
+ export declare function findAppExecutionAliasTools(pathValue: string, pathExtValue?: string, tools?: readonly string[]): AppExecutionAliasFinding[];
17
+ export declare function describeAppExecutionAliasFindings(findings: readonly AppExecutionAliasFinding[]): string | null;
18
+ /** Reads PATH and PATHEXT from an environment whose key case is not normalized (Windows: "Path"). */
19
+ export declare function appExecutionAliasWarning(env: Readonly<Record<string, string | undefined>>, platform?: NodeJS.Platform): string | null;
@@ -0,0 +1,45 @@
1
+ import { isWindowsAppExecutionAliasPath, resolveWindowsCommandFromPath } from "./windows-launch.js";
2
+ /**
3
+ * Tools an agent commonly starts by bare name. When one of them resolves to a Microsoft Store
4
+ * app-execution alias (`%LOCALAPPDATA%\Microsoft\WindowsApps\pwsh.exe` and the like), Windows
5
+ * creates the process it starts outside the provider's Job Object: it survives the job, keeps the
6
+ * pipe handles it inherited, and holds the attempt's output open until it exits on its own.
7
+ */
8
+ export const APP_EXECUTION_ALIAS_SENSITIVE_TOOLS = ["pwsh", "node", "dotnet"];
9
+ /** The sensitive tools whose bare name resolves, on this PATH, to an app-execution alias. */
10
+ export function findAppExecutionAliasTools(pathValue, pathExtValue, tools = APP_EXECUTION_ALIAS_SENSITIVE_TOOLS) {
11
+ const findings = [];
12
+ for (const tool of tools) {
13
+ const aliasPath = resolveWindowsCommandFromPath(tool, pathValue, pathExtValue);
14
+ if (!aliasPath || !isWindowsAppExecutionAliasPath(aliasPath))
15
+ continue;
16
+ const nextInstallPath = resolveWindowsCommandFromPath(tool, pathValue, pathExtValue, { skipAppExecutionAliases: true });
17
+ findings.push({ tool, aliasPath, nextInstallPath });
18
+ }
19
+ return findings;
20
+ }
21
+ export function describeAppExecutionAliasFindings(findings) {
22
+ if (findings.length === 0)
23
+ return null;
24
+ const tools = findings.map(finding => `${finding.tool} -> ${finding.aliasPath}${finding.nextInstallPath
25
+ ? ` (a regular install later on PATH: ${finding.nextInstallPath})`
26
+ : " (no regular install on PATH)"}`);
27
+ return "Host readiness warning: on the provider PATH, "
28
+ + `${tools.join("; ")} resolve${findings.length === 1 ? "s" : ""} to a Microsoft Store app-execution alias under WindowsApps. `
29
+ + "A process started through an alias is created outside the provider's Windows Job Object, survives it, "
30
+ + "and can hold the attempt's output pipes open until it exits. Install the tool normally "
31
+ + "(for PowerShell, the MSI under C:\\Program Files\\PowerShell\\7) and put it ahead of WindowsApps on PATH.";
32
+ }
33
+ /** Reads PATH and PATHEXT from an environment whose key case is not normalized (Windows: "Path"). */
34
+ export function appExecutionAliasWarning(env, platform = process.platform) {
35
+ if (platform !== "win32")
36
+ return null;
37
+ const pathValue = environmentValue(env, "PATH");
38
+ if (!pathValue)
39
+ return null;
40
+ return describeAppExecutionAliasFindings(findAppExecutionAliasTools(pathValue, environmentValue(env, "PATHEXT")));
41
+ }
42
+ function environmentValue(env, name) {
43
+ const key = Object.keys(env).find(candidate => candidate.toUpperCase() === name);
44
+ return key === undefined ? undefined : env[key];
45
+ }
@@ -6,3 +6,21 @@ export declare function buildWindowsCmdLaunch(command: string, args: readonly st
6
6
  export declare function buildWindowsLaunchCommand(commandPath: string, args: readonly string[]): LaunchCommand;
7
7
  export declare function windowsCommandLine(command: string, args: readonly string[]): string;
8
8
  export declare function quoteWindowsCommandLineArg(value: string): string;
9
+ export interface WindowsCommandPathOptions {
10
+ /**
11
+ * Skip candidates under a `WindowsApps` directory. Those are Microsoft Store app-execution
12
+ * aliases: the process they start is created outside the caller's Job Object, so it survives the
13
+ * job and keeps any inherited pipe open. Resolve the next real install on PATH instead.
14
+ */
15
+ readonly skipAppExecutionAliases?: boolean;
16
+ }
17
+ /**
18
+ * Resolves Windows commands without spawning where.exe. Runtime launches can
19
+ * happen while the machine is under enough process pressure for where.exe to
20
+ * miss its timeout; returning the unresolved package-manager name in that case
21
+ * makes Node fall back to a shell shim that cannot survive Job Object wrapping.
22
+ */
23
+ export declare function resolveWindowsCommandFromPath(command: string, pathValue?: string, pathExtValue?: string, options?: WindowsCommandPathOptions): string | null;
24
+ export declare function chooseWindowsCommandCandidate(candidates: readonly string[]): string | null;
25
+ /** True for a path inside a `WindowsApps` directory, where Store app-execution aliases live. */
26
+ export declare function isWindowsAppExecutionAliasPath(candidate: string): boolean;
@@ -1,3 +1,4 @@
1
+ import fs from "node:fs";
1
2
  import path from "node:path";
2
3
  export function buildWindowsCmdLaunch(command, args, comSpec = process.env.ComSpec) {
3
4
  const resolvedComSpec = comSpec?.trim();
@@ -39,3 +40,70 @@ function powershellExecutable() {
39
40
  ? path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe")
40
41
  : "powershell.exe";
41
42
  }
43
+ /**
44
+ * Resolves Windows commands without spawning where.exe. Runtime launches can
45
+ * happen while the machine is under enough process pressure for where.exe to
46
+ * miss its timeout; returning the unresolved package-manager name in that case
47
+ * makes Node fall back to a shell shim that cannot survive Job Object wrapping.
48
+ */
49
+ export function resolveWindowsCommandFromPath(command, pathValue = process.env.PATH ?? "", pathExtValue = process.env.PATHEXT ?? ".COM;.EXE;.BAT;.CMD", options = {}) {
50
+ if (!command || path.isAbsolute(command) || command.includes("/") || command.includes("\\")) {
51
+ return null;
52
+ }
53
+ const hasExtension = path.extname(command).length > 0;
54
+ const extensions = hasExtension
55
+ ? [""]
56
+ : [...new Set([
57
+ "",
58
+ ".exe",
59
+ ".ps1",
60
+ ".cmd",
61
+ ".bat",
62
+ ...pathExtValue.split(";").map(value => value.trim().toLowerCase()).filter(Boolean),
63
+ ])];
64
+ for (const rawDirectory of pathValue.split(path.delimiter)) {
65
+ const directory = rawDirectory.trim().replace(/^"|"$/gu, "");
66
+ if (!directory)
67
+ continue;
68
+ const candidates = [];
69
+ for (const extension of extensions) {
70
+ const candidate = path.join(directory, `${command}${extension}`);
71
+ if (options.skipAppExecutionAliases && isWindowsAppExecutionAliasPath(candidate))
72
+ continue;
73
+ if (pathEntryExists(candidate))
74
+ candidates.push(candidate);
75
+ }
76
+ const resolved = chooseWindowsCommandCandidate(candidates);
77
+ if (resolved)
78
+ return resolved;
79
+ }
80
+ return null;
81
+ }
82
+ export function chooseWindowsCommandCandidate(candidates) {
83
+ const normalized = candidates
84
+ .map((candidate) => candidate.trim())
85
+ .filter((candidate) => candidate.length > 0);
86
+ if (normalized.length === 0) {
87
+ return null;
88
+ }
89
+ const preferredExtensions = [".exe", ".ps1", ".cmd", ".bat", ""];
90
+ for (const extension of preferredExtensions) {
91
+ const candidate = normalized.find((entry) => path.extname(entry).toLowerCase() === extension);
92
+ if (candidate) {
93
+ return candidate;
94
+ }
95
+ }
96
+ return normalized[0];
97
+ }
98
+ /** True for a path inside a `WindowsApps` directory, where Store app-execution aliases live. */
99
+ export function isWindowsAppExecutionAliasPath(candidate) {
100
+ return candidate.split(/[\\/]+/u).some(segment => segment.toLowerCase() === "windowsapps");
101
+ }
102
+ // An app-execution alias is a reparse point that stat() may not open, so an
103
+ // alias is also accepted when only lstat() can see it.
104
+ function pathEntryExists(candidate) {
105
+ if (fs.existsSync(candidate))
106
+ return true;
107
+ return isWindowsAppExecutionAliasPath(candidate)
108
+ && fs.lstatSync(candidate, { throwIfNoEntry: false }) !== undefined;
109
+ }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const forgeBridgeVersion = "0.1.4-dev.81e48ecc185d";
1
+ export declare const forgeBridgeVersion = "0.1.4-dev.866b33be3065";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const forgeBridgeVersion = "0.1.4-dev.81e48ecc185d";
1
+ export const forgeBridgeVersion = "0.1.4-dev.866b33be3065";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loucompanion/forge-bridge",
3
- "version": "0.1.4-dev.81e48ecc185d",
3
+ "version": "0.1.4-dev.866b33be3065",
4
4
  "description": "Forge runner bridge CLI for connecting local developer machines to Forge dispatch.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",