veryfront 0.1.1236 → 0.1.1238
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 +8 -1
- package/esm/cli/commands/build/error-handler.d.ts.map +1 -1
- package/esm/cli/commands/build/error-handler.js +41 -3
- package/esm/cli/commands/build/handler.d.ts.map +1 -1
- package/esm/cli/commands/build/handler.js +1 -1
- package/esm/cli/commands/dev/command.d.ts.map +1 -1
- package/esm/cli/commands/dev/command.js +14 -1
- package/esm/cli/commands/dev/inference-status.d.ts +6 -0
- package/esm/cli/commands/dev/inference-status.d.ts.map +1 -1
- package/esm/cli/commands/dev/inference-status.js +14 -2
- package/esm/cli/commands/dev/port-fallback.d.ts.map +1 -1
- package/esm/cli/commands/dev/port-fallback.js +19 -15
- package/esm/cli/commands/generate/command.d.ts.map +1 -1
- package/esm/cli/commands/generate/command.js +62 -0
- package/esm/cli/shared/args.d.ts +5 -1
- package/esm/cli/shared/args.d.ts.map +1 -1
- package/esm/cli/shared/args.js +41 -1
- package/esm/deno.js +4 -4
- package/esm/src/agent/conversation/run-chunk-mirror.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-chunk-mirror.js +14 -2
- package/esm/src/config/loader.d.ts.map +1 -1
- package/esm/src/config/loader.js +37 -1
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
- package/esm/src/observability/application-errors.d.ts.map +1 -1
- package/esm/src/observability/application-errors.js +9 -1
- package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
- package/esm/src/rendering/orchestrator/css-candidate-manifest.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/css-candidate-manifest.js +30 -1
- package/esm/src/security/sandbox/worker-pool.d.ts.map +1 -1
- package/esm/src/security/sandbox/worker-pool.js +6 -1
- package/esm/src/server/bootstrap.d.ts.map +1 -1
- package/esm/src/server/bootstrap.js +6 -0
- package/esm/src/server/project-env/fetcher.d.ts.map +1 -1
- package/esm/src/server/project-env/fetcher.js +11 -11
- package/esm/src/server/project-env/internal-authorization.d.ts +7 -0
- package/esm/src/server/project-env/internal-authorization.d.ts.map +1 -0
- package/esm/src/server/project-env/internal-authorization.js +32 -0
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -47,7 +47,14 @@ npx veryfront@latest init <PROJECT_NAME> --template <TEMPLATE>
|
|
|
47
47
|
|
|
48
48
|
Available starters: `ai-agent`, `minimal`, `agentic-workflow`.
|
|
49
49
|
|
|
50
|
-
Install the
|
|
50
|
+
Install the CLI through npm for local development commands and the TUI:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm install -g veryfront@latest
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The self-contained standalone binary is also available through the installer or
|
|
57
|
+
Homebrew. It is a 0.9 to 1.2 GB download, depending on the platform:
|
|
51
58
|
|
|
52
59
|
```bash
|
|
53
60
|
curl -fsSL https://veryfront.com/install.sh | sh
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/build/error-handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/build/error-handler.ts"],"names":[],"mappings":"AAqCA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAyBtD"}
|
|
@@ -1,14 +1,52 @@
|
|
|
1
1
|
import { brand, dim } from "../../ui/index.js";
|
|
2
2
|
import { cliLogger, isVerbose, logError } from "../../utils/index.js";
|
|
3
|
+
import { sanitizeTerminalDiagnosticText } from "../../../src/errors/safe-diagnostics.js";
|
|
3
4
|
import { exit, getStdout } from "../../../src/platform/index.js";
|
|
5
|
+
const STACK_FRAME_WITH_PARENS = /^(\s*at\s+.*\()(file:\/\/\/[^)\r\n]+|\/[^)\r\n]+|[A-Za-z]:[\\/][^)\r\n]+)(:\d+:\d+\).*)$/;
|
|
6
|
+
const STACK_FRAME_DIRECT = /^(\s*at\s+(?:async\s+)?)(file:\/\/\/[^\r\n]+|\/[^\r\n]+|[A-Za-z]:[\\/][^\r\n]+)(:\d+:\d+.*)$/;
|
|
7
|
+
function sanitizeStackFrame(line) {
|
|
8
|
+
const sanitized = sanitizeTerminalDiagnosticText(line);
|
|
9
|
+
const match = STACK_FRAME_WITH_PARENS.exec(sanitized) ??
|
|
10
|
+
STACK_FRAME_DIRECT.exec(sanitized);
|
|
11
|
+
if (!match)
|
|
12
|
+
return sanitized;
|
|
13
|
+
const sourceName = match[2]
|
|
14
|
+
.replace(/^file:\/\/\//, "")
|
|
15
|
+
.replaceAll("\\", "/")
|
|
16
|
+
.split("/")
|
|
17
|
+
.at(-1) || "source";
|
|
18
|
+
return `${match[1]}<REDACTED>/${sourceName}${match[3]}`;
|
|
19
|
+
}
|
|
20
|
+
function deepestErrorCause(error) {
|
|
21
|
+
const seen = new Set();
|
|
22
|
+
let current = error;
|
|
23
|
+
for (let depth = 0; depth < 8; depth++) {
|
|
24
|
+
if (seen.has(current))
|
|
25
|
+
break;
|
|
26
|
+
seen.add(current);
|
|
27
|
+
const cause = Object.getOwnPropertyDescriptor(current, "cause");
|
|
28
|
+
if (!cause || !("value" in cause) || !(cause.value instanceof Error))
|
|
29
|
+
break;
|
|
30
|
+
current = cause.value;
|
|
31
|
+
}
|
|
32
|
+
return current;
|
|
33
|
+
}
|
|
4
34
|
export function handleBuildError(error) {
|
|
5
35
|
getStdout()?.write?.(`\r${" ".repeat(80)}\r`);
|
|
6
36
|
const message = error instanceof Error ? error.message : String(error);
|
|
7
37
|
console.log();
|
|
8
38
|
logError(message);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
39
|
+
const diagnosticError = error instanceof Error ? deepestErrorCause(error) : undefined;
|
|
40
|
+
if (isVerbose() && diagnosticError?.stack) {
|
|
41
|
+
const isUnderlyingCause = diagnosticError !== error;
|
|
42
|
+
cliLogger.error(`\n${dim(isUnderlyingCause ? "Underlying stack trace:" : "Stack trace:")}`);
|
|
43
|
+
const firstLine = isUnderlyingCause ? 0 : 1;
|
|
44
|
+
const stack = diagnosticError.stack.split("\n").slice(firstLine, 5)
|
|
45
|
+
.map(sanitizeStackFrame).join("\n");
|
|
46
|
+
cliLogger.error(dim(stack));
|
|
47
|
+
}
|
|
48
|
+
else if (diagnosticError && diagnosticError !== error) {
|
|
49
|
+
cliLogger.error(` Run ${brand("veryfront build --verbose")} to show the underlying stack trace.`);
|
|
12
50
|
}
|
|
13
51
|
cliLogger.error(` Run ${brand("veryfront build --help")} for usage.`);
|
|
14
52
|
cliLogger.error("");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/build/handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAQ3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;GAe9B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;GAAiC,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/build/handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAQ3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;GAe9B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;GAAiC,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;GAaA,CAAC;AAE5B,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BxE"}
|
|
@@ -41,7 +41,7 @@ export const parseBuildArgs = createArgParser(BuildArgsSchema, {
|
|
|
41
41
|
include: { keys: ["include"], type: "array" },
|
|
42
42
|
exclude: { keys: ["exclude"], type: "array" },
|
|
43
43
|
dryRun: CommonArgs.dryRun,
|
|
44
|
-
});
|
|
44
|
+
}, { rejectUnknown: true });
|
|
45
45
|
export async function handleBuildCommand(args) {
|
|
46
46
|
showHeader();
|
|
47
47
|
const opts = parseArgsOrThrow(parseBuildArgs, "build", args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/dev/command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAmBH,OAAO,EAAE,KAAK,YAAY,EAA2B,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAwC,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM1F,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE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,EAAE,CAAC,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAoBtC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,0BAA0B,CAC9C,aAAa,EAAE,MAAM,EACrB,KAAK,GAAE,MAAM,OAAO,CAAC,IAAI,CAAuB,EAChD,KAAK,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAmB,GAC1D,OAAO,CAAC,OAAO,CAAC,CAIlB;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA6TzE"}
|
|
@@ -25,7 +25,7 @@ import { createStagedPushOptions, pushCommand } from "../push/index.js";
|
|
|
25
25
|
import { createProjectSelector } from "./project-selector.js";
|
|
26
26
|
import { createDevLogController } from "./log-controller.js";
|
|
27
27
|
import { findAvailablePort, isPortAvailable, isPortInUseError } from "./port-fallback.js";
|
|
28
|
-
import { listInferenceOptions } from "./inference-status.js";
|
|
28
|
+
import { advertisesCloudGateway, listInferenceOptions } from "./inference-status.js";
|
|
29
29
|
function authStatus(identity) {
|
|
30
30
|
return isApiKeyIdentity(identity)
|
|
31
31
|
? "Authenticated with an API key"
|
|
@@ -272,6 +272,19 @@ export function devCommand(options) {
|
|
|
272
272
|
if (inferenceOptions.length > 0) {
|
|
273
273
|
console.log(` ${dim("Inference")} ${brand(inferenceOptions.join(", "))}`);
|
|
274
274
|
}
|
|
275
|
+
// The banner reports configured paths, and it must not block Ready on a
|
|
276
|
+
// network round-trip (see `void authReady` above). But an expired stored
|
|
277
|
+
// session still has a nonempty token, so the gateway would be advertised
|
|
278
|
+
// and then fail on first request. The validation is already in flight —
|
|
279
|
+
// let it correct the record rather than delay the banner.
|
|
280
|
+
if (advertisesCloudGateway(inferenceOptions)) {
|
|
281
|
+
void authReady.then(() => {
|
|
282
|
+
if (identity)
|
|
283
|
+
return;
|
|
284
|
+
console.log(` ${warning("!")} Veryfront Cloud session is not valid; gateway inference will fail. ` +
|
|
285
|
+
`Run ${brand("veryfront login")} to renew it.`);
|
|
286
|
+
});
|
|
287
|
+
}
|
|
275
288
|
if (mcpServer && isVerbose()) {
|
|
276
289
|
console.log(` ${dim("MCP")} ${brand(`http://localhost:${mcpPort}/mcp`)}`);
|
|
277
290
|
}
|
|
@@ -7,6 +7,12 @@ export interface InferenceEnvironment {
|
|
|
7
7
|
googleApiKey?: string;
|
|
8
8
|
mistralApiKey?: string;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Whether a rendered option list claims the Cloud gateway. Callers use this to
|
|
12
|
+
* decide if a stored session still needs validating — the gateway is the only
|
|
13
|
+
* option whose credential the CLI can check itself.
|
|
14
|
+
*/
|
|
15
|
+
export declare function advertisesCloudGateway(options: readonly string[]): boolean;
|
|
10
16
|
/** Return the inference paths the current dev process can use without exposing credentials. */
|
|
11
17
|
export declare function listInferenceOptions(environment: InferenceEnvironment): string[];
|
|
12
18
|
//# sourceMappingURL=inference-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inference-status.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/dev/inference-status.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;
|
|
1
|
+
{"version":3,"file":"inference-status.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/dev/inference-status.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAQD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAE1E;AAED,+FAA+F;AAC/F,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAmBhF"}
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
+
const CLOUD_GATEWAY_LABEL = "Veryfront Cloud AI Gateway";
|
|
1
2
|
function isSet(value) {
|
|
2
3
|
return Boolean(value?.trim());
|
|
3
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* Whether a rendered option list claims the Cloud gateway. Callers use this to
|
|
7
|
+
* decide if a stored session still needs validating — the gateway is the only
|
|
8
|
+
* option whose credential the CLI can check itself.
|
|
9
|
+
*/
|
|
10
|
+
export function advertisesCloudGateway(options) {
|
|
11
|
+
return options.includes(CLOUD_GATEWAY_LABEL);
|
|
12
|
+
}
|
|
4
13
|
/** Return the inference paths the current dev process can use without exposing credentials. */
|
|
5
14
|
export function listInferenceOptions(environment) {
|
|
6
15
|
const options = [];
|
|
7
|
-
|
|
8
|
-
|
|
16
|
+
// The gateway authenticates on the token alone. A freshly scaffolded project
|
|
17
|
+
// has no linked slug yet and its chat route still answers, so gating this on
|
|
18
|
+
// `projectSlug` hid the one inference path `veryfront login` sets up.
|
|
19
|
+
if (isSet(environment.apiToken)) {
|
|
20
|
+
options.push(CLOUD_GATEWAY_LABEL);
|
|
9
21
|
}
|
|
10
22
|
if (isSet(environment.openaiApiKey)) {
|
|
11
23
|
options.push(isSet(environment.openaiBaseUrl) ? "OpenAI-compatible service" : "OpenAI direct");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"port-fallback.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/dev/port-fallback.ts"],"names":[],"mappings":"AAoBA,0DAA0D;AAC1D,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C,gDAAgD;AAChD,eAAO,MAAM,YAAY,QAAQ,CAAC;AAElC,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQxD;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAWvE;
|
|
1
|
+
{"version":3,"file":"port-fallback.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/dev/port-fallback.ts"],"names":[],"mappings":"AAoBA,0DAA0D;AAC1D,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C,gDAAgD;AAChD,eAAO,MAAM,YAAY,QAAQ,CAAC;AAElC,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQxD;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAWvE;AA0DD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAWpE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,aAAa,EAAE,MAAM,EACrB,WAAW,GAAE,MAAmC,EAChD,KAAK,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAmB,GAC1D,OAAO,CAAC,MAAM,CAAC,CAejB"}
|
|
@@ -37,26 +37,30 @@ export function isAddressFamilyUnavailableError(error) {
|
|
|
37
37
|
message.includes("assign requested address") ||
|
|
38
38
|
message.includes("address family not supported");
|
|
39
39
|
}
|
|
40
|
+
/** The wildcards a listener binds when it names no host. */
|
|
41
|
+
const ANY_ADDRESS = Object.freeze({ IPV4: "0.0.0.0", IPV6: "::" });
|
|
40
42
|
/**
|
|
41
|
-
* The
|
|
43
|
+
* The addresses a port has to be free on before `veryfront dev` can have it.
|
|
42
44
|
*
|
|
43
|
-
*
|
|
44
|
-
* Deno
|
|
45
|
-
* the published npm build
|
|
46
|
-
* resolves to `::1` first on
|
|
47
|
-
* dev` serves the app on `127.0.0.1:3000` but its MCP server - `--port + 2` -
|
|
48
|
-
* on `[::1]:3002`.
|
|
45
|
+
* Both loopback families are probed because the runtime, not the CLI, picks
|
|
46
|
+
* which one a listener lands on: the Deno adapter defaults to `LOCALHOST.IPV4`,
|
|
47
|
+
* the published npm build's Node adapter to the name `localhost`, which
|
|
48
|
+
* resolves to `::1` first on a dual-stack host.
|
|
49
49
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
50
|
+
* Both wildcards are probed because a bare `listen(port)` binds `::` or
|
|
51
|
+
* `0.0.0.0`, and BSD and macOS let a more specific address bind over a wildcard
|
|
52
|
+
* holder - so loopback-only probes call such a port free and the dev server
|
|
53
|
+
* silently lands beside the existing listener instead of falling forward.
|
|
54
54
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* leave the other family unchecked exactly as before.
|
|
55
|
+
* Literal addresses rather than the name `localhost`: a listen on a name binds
|
|
56
|
+
* only the first address it resolves to, leaving the other family unchecked.
|
|
58
57
|
*/
|
|
59
|
-
const PROBE_HOSTNAMES = [
|
|
58
|
+
const PROBE_HOSTNAMES = [
|
|
59
|
+
LOCALHOST.IPV4,
|
|
60
|
+
LOCALHOST.IPV6,
|
|
61
|
+
ANY_ADDRESS.IPV4,
|
|
62
|
+
ANY_ADDRESS.IPV6,
|
|
63
|
+
];
|
|
60
64
|
function probeWithDeno(deno, hostname, port) {
|
|
61
65
|
try {
|
|
62
66
|
deno.listen({ hostname, port }).close();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/generate/command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/generate/command.ts"],"names":[],"mappings":"AA6FA,wBAAsB,eAAe,CACnC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAoCf"}
|
|
@@ -3,6 +3,67 @@ import { cliLogger } from "../../utils/index.js";
|
|
|
3
3
|
import { createError, toError } from "../../../src/errors/index.js";
|
|
4
4
|
import { generateIntegration } from "./integration-generator.js";
|
|
5
5
|
import { isScaffoldType, scaffoldProjectFile } from "../../scaffold/engine.js";
|
|
6
|
+
import { exists, readTextFile } from "../../../src/platform/compat/fs.js";
|
|
7
|
+
import { join } from "../../../src/platform/compat/path/index.js";
|
|
8
|
+
import { parseExtensionManifest } from "../../../src/extensions/manifest-reader.js";
|
|
9
|
+
const PROJECT_MARKERS = [
|
|
10
|
+
"veryfront.config.ts",
|
|
11
|
+
"veryfront.config.js",
|
|
12
|
+
"veryfront.config.mjs",
|
|
13
|
+
// Legacy, but still read and merged by the CLI config loader, so a project
|
|
14
|
+
// identified only by this file is a real project. `veryfront.config.json` is
|
|
15
|
+
// deliberately absent — the loader does not recognise that name.
|
|
16
|
+
"veryfront.json",
|
|
17
|
+
];
|
|
18
|
+
// Deno accepts JSONC grammar for `deno.json` as well as `deno.jsonc`, matching
|
|
19
|
+
// `src/extensions/discovery.ts`. Parsing those with strict JSON makes a
|
|
20
|
+
// commented manifest look like no evidence at all and fires a false warning.
|
|
21
|
+
const PROJECT_MANIFESTS = [
|
|
22
|
+
{ name: "package.json", syntax: "json" },
|
|
23
|
+
{ name: "deno.json", syntax: "jsonc" },
|
|
24
|
+
{ name: "deno.jsonc", syntax: "jsonc" },
|
|
25
|
+
];
|
|
26
|
+
/**
|
|
27
|
+
* `generate` writes into whatever directory it is invoked from, so running it
|
|
28
|
+
* one level above the project (or in the wrong terminal tab) silently produces
|
|
29
|
+
* a stray `app/` tree. `dev` already warns in this situation; match it rather
|
|
30
|
+
* than failing, so scaffolding into a not-yet-configured directory still works.
|
|
31
|
+
*/
|
|
32
|
+
async function looksLikeVeryfrontProject(projectDir) {
|
|
33
|
+
for (const marker of PROJECT_MARKERS) {
|
|
34
|
+
if (await exists(join(projectDir, marker)))
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
for (const manifest of PROJECT_MANIFESTS) {
|
|
38
|
+
const path = join(projectDir, manifest.name);
|
|
39
|
+
if (!(await exists(path)))
|
|
40
|
+
continue;
|
|
41
|
+
try {
|
|
42
|
+
const parsed = parseExtensionManifest(await readTextFile(path), manifest.syntax, manifest.name);
|
|
43
|
+
const specifiers = [
|
|
44
|
+
...Object.keys(parsed.dependencies ?? {}),
|
|
45
|
+
...Object.keys(parsed.devDependencies ?? {}),
|
|
46
|
+
...Object.keys(parsed.imports ?? {}),
|
|
47
|
+
];
|
|
48
|
+
if (specifiers.some((s) => s === "veryfront" || s.startsWith("veryfront/"))) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
// An unparseable manifest is not evidence either way; keep looking.
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
async function warnIfOutsideProject(projectDir) {
|
|
59
|
+
if (await looksLikeVeryfrontProject(projectDir))
|
|
60
|
+
return;
|
|
61
|
+
// Deliberately no path: `projectDir` is an absolute machine path, which
|
|
62
|
+
// AGENTS.md forbids in user-facing output. The directory is where the user
|
|
63
|
+
// already is, so naming it adds nothing they cannot see.
|
|
64
|
+
cliLogger.warn(`The current directory does not look like a Veryfront project; scaffolding here anyway. ` +
|
|
65
|
+
`Run this from your project root, or create one with "npm create veryfront".`);
|
|
66
|
+
}
|
|
6
67
|
async function getPreferredRouter(projectDir) {
|
|
7
68
|
try {
|
|
8
69
|
const { runtime } = await import("../../../src/platform/index.js");
|
|
@@ -20,6 +81,7 @@ async function getPreferredRouter(projectDir) {
|
|
|
20
81
|
return "app-router";
|
|
21
82
|
}
|
|
22
83
|
export async function generateCommand(projectDir, type, name) {
|
|
84
|
+
await warnIfOutsideProject(projectDir);
|
|
23
85
|
const preferred = await getPreferredRouter(projectDir);
|
|
24
86
|
if (type === "integration") {
|
|
25
87
|
await generateIntegration(projectDir, { name: name || undefined });
|
package/esm/cli/shared/args.d.ts
CHANGED
|
@@ -36,6 +36,10 @@ export interface ArgSpec {
|
|
|
36
36
|
export type ArgMap<T> = {
|
|
37
37
|
[K in keyof T]?: ArgSpec;
|
|
38
38
|
};
|
|
39
|
+
export interface ArgParserOptions {
|
|
40
|
+
/** Reject option keys that the command parser does not consume. */
|
|
41
|
+
rejectUnknown?: boolean;
|
|
42
|
+
}
|
|
39
43
|
/**
|
|
40
44
|
* Extract a single argument value from parsed args
|
|
41
45
|
*/
|
|
@@ -68,7 +72,7 @@ export declare function extractArgs<T>(args: ParsedArgs, argMap: ArgMap<T>): Rec
|
|
|
68
72
|
* }
|
|
69
73
|
* ```
|
|
70
74
|
*/
|
|
71
|
-
export declare function createArgParser<T>(schema: Schema<T>, argMap: ArgMap<T
|
|
75
|
+
export declare function createArgParser<T>(schema: Schema<T>, argMap: ArgMap<T>, options?: ArgParserOptions): (args: ParsedArgs) => SafeParseResult<T>;
|
|
72
76
|
/**
|
|
73
77
|
* Parse args with a parser function and throw on failure.
|
|
74
78
|
* Eliminates the repeated parse-validate-throw boilerplate in handlers.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../../src/cli/shared/args.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../../src/cli/shared/args.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA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e,CAAC,CAAC,EAC/B,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EACjB,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EACjB,OAAO,GAAE,gBAAqB,GAC7B,CAAC,IAAI,EAAE,UAAU,KAAK,eAAe,CAAC,CAAC,CAAC,CAe1C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,MAAM,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,eAAe,CAAC,CAAC,CAAC,EAChD,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,UAAU,GACf,CAAC,CAQH;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAaY,CAAC;AA6MpC,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAcvD"}
|
package/esm/cli/shared/args.js
CHANGED
|
@@ -6,6 +6,41 @@
|
|
|
6
6
|
* @module cli/shared/args
|
|
7
7
|
*/
|
|
8
8
|
import { COMMANDS } from "../help/command-definitions.js";
|
|
9
|
+
import { suggestCommand } from "./suggest.js";
|
|
10
|
+
const ROUTER_ARG_KEYS = new Set([
|
|
11
|
+
"color",
|
|
12
|
+
"h",
|
|
13
|
+
"help",
|
|
14
|
+
"j",
|
|
15
|
+
"json",
|
|
16
|
+
"no-animation",
|
|
17
|
+
"no-color",
|
|
18
|
+
"no-input",
|
|
19
|
+
"o",
|
|
20
|
+
"output",
|
|
21
|
+
"q",
|
|
22
|
+
"quiet",
|
|
23
|
+
"v",
|
|
24
|
+
"verbose",
|
|
25
|
+
"version",
|
|
26
|
+
"y",
|
|
27
|
+
"yes",
|
|
28
|
+
]);
|
|
29
|
+
function optionName(key) {
|
|
30
|
+
return `${key.length === 1 ? "-" : "--"}${key}`;
|
|
31
|
+
}
|
|
32
|
+
function validateKnownOptions(args, argMap) {
|
|
33
|
+
const commandKeys = Object.values(argMap)
|
|
34
|
+
.flatMap((spec) => spec?.keys ?? []);
|
|
35
|
+
const allowedKeys = new Set([...commandKeys, ...ROUTER_ARG_KEYS]);
|
|
36
|
+
const unknownKey = Object.keys(args).find((key) => key !== "_" && key !== "__explicit" && !allowedKeys.has(key));
|
|
37
|
+
if (!unknownKey)
|
|
38
|
+
return { success: true, data: undefined };
|
|
39
|
+
const suggestion = suggestCommand(unknownKey, commandKeys.filter((key) => key.length > 1), Math.min(4, Math.max(2, Math.ceil(unknownKey.length * 0.35))))[0];
|
|
40
|
+
const hint = suggestion ? ` Did you mean ${optionName(suggestion)}?` : "";
|
|
41
|
+
const error = Object.assign(new Error(`Unknown option ${optionName(unknownKey)}.${hint}`), { issues: [] });
|
|
42
|
+
return { success: false, error };
|
|
43
|
+
}
|
|
9
44
|
function coerceValue(value, type) {
|
|
10
45
|
if (type === "boolean")
|
|
11
46
|
return parseBooleanValue(value) ?? String(value);
|
|
@@ -78,8 +113,13 @@ export function extractArgs(args, argMap) {
|
|
|
78
113
|
* }
|
|
79
114
|
* ```
|
|
80
115
|
*/
|
|
81
|
-
export function createArgParser(schema, argMap) {
|
|
116
|
+
export function createArgParser(schema, argMap, options = {}) {
|
|
82
117
|
return function parseArgs(args) {
|
|
118
|
+
if (options.rejectUnknown) {
|
|
119
|
+
const knownOptions = validateKnownOptions(args, argMap);
|
|
120
|
+
if (!knownOptions.success)
|
|
121
|
+
return knownOptions;
|
|
122
|
+
}
|
|
83
123
|
const result = schema.safeParse(extractArgs(args, argMap));
|
|
84
124
|
if (result.success) {
|
|
85
125
|
return { success: true, data: result.data };
|
package/esm/deno.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1238",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"nodeModulesDir": "auto",
|
|
6
6
|
"minimumDependencyAge": {
|
|
@@ -496,7 +496,7 @@ export default {
|
|
|
496
496
|
"build:storybook": "npm --prefix storybook run build-storybook",
|
|
497
497
|
"storybook:check": "deno test --no-lock --config=scripts/test.deno.json --no-check --allow-read scripts/storybook/storybook-workbench.test.ts",
|
|
498
498
|
"lint": "DENO_NO_PACKAGE_JSON=1 deno lint && deno lint --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-meta-property-safety.ts scripts/build/dnt-meta-property-safety.test.ts scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/npm-package-metadata.test.ts scripts/build/prepare-framework-sources.test.ts && deno lint --config=scripts/codemods/deno.json scripts/codemods/",
|
|
499
|
-
"lint:ci": "deno task lint && deno task lint:core-deps && deno task lint:cross-runtime-jsr && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:client-bundle && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:chat-ratchets && deno task lint:chat-composability && deno task lint:rfc-status && deno task lint:esm-sh-codemod && deno task lint:test-typecheck && deno task lint:cwd-relative-test-reads && deno task lint:dnt-meta-properties && deno task storybook:check && deno task docs:api-reference:check && deno task docs:errors:check && deno task docs:public:check && deno test --frozen --config=scripts/test.deno.json --no-check --allow-read --allow-write --allow-run=bash scripts/ci/setup-deno-workflow.test.ts scripts/ci/prepare-rc-build.test.ts scripts/build/generated-artifact-checks.test.ts",
|
|
499
|
+
"lint:ci": "deno task lint && deno task lint:core-deps && deno task lint:cross-runtime-jsr && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:client-bundle && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:chat-ratchets && deno task lint:chat-composability && deno task lint:rfc-status && deno task lint:esm-sh-codemod && deno task lint:test-typecheck && deno task lint:cwd-relative-test-reads && deno task lint:dnt-meta-properties && deno task storybook:check && deno task docs:api-reference:check && deno task docs:errors:check && deno task docs:public:check && deno test --frozen --config=scripts/test.deno.json --no-check --allow-read --allow-write --allow-run=bash scripts/ci/setup-deno-workflow.test.ts scripts/ci/prepare-rc-build.test.ts scripts/build/generated-artifact-checks.test.ts scripts/release.test.ts",
|
|
500
500
|
"fmt": "deno fmt src/ cli/ react/ templates/ && deno fmt --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-meta-property-safety.ts scripts/build/dnt-meta-property-safety.test.ts scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/prepare-framework-sources.test.ts && deno fmt --config=scripts/codemods/deno.json scripts/codemods/",
|
|
501
501
|
"fmt:check": "deno fmt --check src/ cli/ react/ templates/ && deno fmt --check --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-meta-property-safety.ts scripts/build/dnt-meta-property-safety.test.ts scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/prepare-framework-sources.test.ts && deno fmt --check --config=scripts/codemods/deno.json scripts/codemods/",
|
|
502
502
|
"typecheck": "deno task generate:manifests:check && deno check src/index.ts cli/main.ts src/server/index.ts src/routing/api/index.ts src/rendering/index.ts src/platform/index.ts src/platform/adapters/index.ts src/build/index.ts src/build/production-build/index.ts src/transforms/index.ts src/config/index.ts src/utils/index.ts src/data/index.ts src/security/index.ts src/middleware/index.ts src/server/handlers/dev/index.ts src/server/handlers/request/api/index.ts src/rendering/cache/index.ts src/rendering/cache/stores/index.ts src/rendering/rsc/actions/index.ts src/html/index.ts src/html/hydration-script-builder/runtime/main.ts src/modules/index.ts src/proxy/main.ts src/react/components/ui/index.ts src/chat/index.ts src/markdown/index.ts src/mdx/index.ts src/fs/index.ts src/oauth/index.ts src/agent/index.ts src/agent/service/route-export.check.ts src/eval/index.ts src/tool/index.ts src/workflow/index.ts src/prompt/index.ts src/resource/index.ts src/runs/index.ts src/mcp/index.ts src/provider/index.ts",
|
|
@@ -548,7 +548,7 @@ export default {
|
|
|
548
548
|
"lint:skipped-tests": "deno run --allow-read scripts/lint/check-skipped-tests-baseline.ts",
|
|
549
549
|
"lint:cwd-relative-test-reads": "deno run --allow-read scripts/lint/audit-cwd-relative-test-reads.ts",
|
|
550
550
|
"lint:dnt-meta-properties": "deno run --config=scripts/test.deno.json --frozen --allow-read scripts/build/dnt-meta-property-safety.ts",
|
|
551
|
-
"test:scripts": "deno test --config=scripts/test.deno.json --no-check --allow-read --allow-write --allow-run scripts/ci/prepare-rc-build.test.ts scripts/ci/publish-npm-packages.test.ts scripts/ci/setup-deno-workflow.test.ts scripts/build/compile-binary.test.ts scripts/build/dnt-meta-property-safety.test.ts scripts/build/dnt-polyfill.test.ts scripts/build/generate-sbom.test.ts scripts/build/generated-artifact-checks.test.ts scripts/build/npm-dependency-sources.test.ts scripts/build/npm-extension-package-metadata.test.ts scripts/build/npm-package-metadata.test.ts scripts/build/npm-react-shims.test.ts scripts/build/npm-runtime-helper-contract.test.ts scripts/build/prepare-framework-sources.test.ts scripts/docs/docs-coverage.test.ts scripts/docs/generate-api-reference.test.ts scripts/docs/guide-validation.test.ts scripts/lint/audit-chat-composability.test.ts scripts/lint/audit-rfc-status.test.ts scripts/lint/audit-core-deps.test.ts scripts/lint/audit-cwd-relative-test-reads.test.ts scripts/lint/audit-cross-runtime-jsr.test.ts scripts/lint/audit-dependency-boundaries.test.ts scripts/lint/audit-extension-capabilities.test.ts scripts/lint/audit-extension-contracts.test.ts scripts/lint/audit-deps.test.ts scripts/lint/check-module-boundaries.test.ts scripts/lint/lint-config.test.ts scripts/lint/ban-test-only.test.ts scripts/lint/check-sanitizer-baseline.test.ts scripts/lint/check-skipped-tests-baseline.test.ts scripts/lint/check-test-typecheck-baseline.test.ts scripts/lint/check-coverage.test.ts scripts/security/audit-npm.test.ts scripts/security/submit-dependency-snapshot.test.ts scripts/test/template-runtime-e2e.test.ts && deno task test:tool-search-live",
|
|
551
|
+
"test:scripts": "deno test --config=scripts/test.deno.json --no-check --allow-read --allow-write --allow-run scripts/ci/prepare-rc-build.test.ts scripts/ci/publish-npm-packages.test.ts scripts/ci/setup-deno-workflow.test.ts scripts/build/compile-binary.test.ts scripts/build/dnt-meta-property-safety.test.ts scripts/build/dnt-polyfill.test.ts scripts/build/generate-sbom.test.ts scripts/build/generated-artifact-checks.test.ts scripts/build/npm-dependency-sources.test.ts scripts/build/npm-extension-package-metadata.test.ts scripts/build/npm-package-metadata.test.ts scripts/build/npm-react-shims.test.ts scripts/build/npm-runtime-helper-contract.test.ts scripts/build/prepare-framework-sources.test.ts scripts/build/report-artifact-sizes.test.ts scripts/docs/docs-coverage.test.ts scripts/docs/generate-api-reference.test.ts scripts/docs/guide-validation.test.ts scripts/lint/audit-chat-composability.test.ts scripts/lint/audit-rfc-status.test.ts scripts/lint/audit-core-deps.test.ts scripts/lint/audit-cwd-relative-test-reads.test.ts scripts/lint/audit-cross-runtime-jsr.test.ts scripts/lint/audit-dependency-boundaries.test.ts scripts/lint/audit-extension-capabilities.test.ts scripts/lint/audit-extension-contracts.test.ts scripts/lint/audit-deps.test.ts scripts/lint/check-module-boundaries.test.ts scripts/lint/lint-config.test.ts scripts/lint/ban-test-only.test.ts scripts/lint/check-sanitizer-baseline.test.ts scripts/lint/check-skipped-tests-baseline.test.ts scripts/lint/check-test-typecheck-baseline.test.ts scripts/lint/check-coverage.test.ts scripts/security/audit-npm.test.ts scripts/security/submit-dependency-snapshot.test.ts scripts/test/template-runtime-e2e.test.ts && deno task test:tool-search-live",
|
|
552
552
|
"test:sentry-runtime-packages": "deno test --config=scripts/test.deno.json --no-check --no-lock --allow-read --allow-write --allow-run --allow-env=DENO_DIR,HOME,XDG_CACHE_HOME,LOCALAPPDATA,USERPROFILE scripts/build/sentry-runtime-packages.test.ts",
|
|
553
553
|
"test:tool-search-live": "VF_DISABLE_LRU_INTERVAL=1 deno test --no-check -A tests/agent/verify-tool-search-live.test.ts",
|
|
554
554
|
"test:cross-runtime": "deno run --allow-all src/platform/compat/cross-runtime.test.ts",
|
|
@@ -563,7 +563,7 @@ export default {
|
|
|
563
563
|
"test:all-runtimes": "deno task test:unit && deno task test:node && deno task test:bun",
|
|
564
564
|
"test:e2e": "deno task test:e2e:playwright",
|
|
565
565
|
"test:e2e:playwright": "PW_DISABLE_TS_ESM=1 npx playwright test --config=tests/e2e/playwright.config.cjs",
|
|
566
|
-
"test:e2e:rsc-browser": "deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --allow-all tests/e2e/regressions/rsc-proxy-hydration.test.ts tests/e2e/regressions/2026-07-27-legacy-router-hydration.test.ts tests/e2e/regressions/2026-07-27-release-asset-page-island-hydration.test.ts --unstable-worker-options --unstable-net",
|
|
566
|
+
"test:e2e:rsc-browser": "deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --allow-all tests/e2e/regressions/rsc-proxy-hydration.test.ts tests/e2e/regressions/2026-07-27-legacy-router-hydration.test.ts tests/e2e/regressions/2026-07-27-release-asset-page-island-hydration.test.ts tests/e2e/regressions/2026-08-14-server-layout-spa-fallback.test.ts --unstable-worker-options --unstable-net",
|
|
567
567
|
"test:e2e:binary": "deno task generate && deno test --allow-all tests/integration/compiled-binary-e2e.test.ts",
|
|
568
568
|
"test:e2e:binary:fresh": "deno task generate && VERYFRONT_BINARY_FRESH=1 deno test --allow-all tests/integration/compiled-binary-e2e.test.ts",
|
|
569
569
|
"test:e2e:templates": "deno run --allow-all scripts/test/template-runtime-e2e.ts",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-chunk-mirror.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/conversation/run-chunk-mirror.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,m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S,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAC9E,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,+CAA+C,KAAK,IAAI,CAAC;IAC3F,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACrE,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACpE,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtE;AAED,gEAAgE;AAChE,MAAM,WAAW,uCAAuC;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,+CAA+C,CAAC;IAClE,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC;AAwBD,4CAA4C;AAC5C,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,iCAAiC,GACvC,0BAA0B,CAkE5B;AAiJD,mDAAmD;AACnD,wBAAgB,sCAAsC,CACpD,KAAK,EAAE,uCAAuC,GAC7C,0BAA0B,CA4E5B"}
|
|
@@ -103,15 +103,27 @@ async function runHostedChunkMirrorTrace(instrumentation, operationName, operati
|
|
|
103
103
|
}
|
|
104
104
|
return await operation();
|
|
105
105
|
}
|
|
106
|
+
// Retries are self-healing and back off to only a few seconds, so logging
|
|
107
|
+
// every attempt at error level turns one degraded append window into a Sentry
|
|
108
|
+
// error every few seconds per active run (VERYFRONT-AGENT-3). Escalate only
|
|
109
|
+
// once the failure streak suggests the outage is persistent; terminal
|
|
110
|
+
// stop/disable paths report at error level separately.
|
|
111
|
+
const HOSTED_CHUNK_MIRROR_RETRY_ERROR_THRESHOLD = 5;
|
|
106
112
|
function recordHostedChunkMirrorRetryScheduled(input) {
|
|
107
|
-
|
|
113
|
+
const metadata = createHostedChunkMirrorRetryMetadata({
|
|
108
114
|
conversationId: input.conversationId,
|
|
109
115
|
runId: input.runId,
|
|
110
116
|
errorMessage: input.flushAttempt.errorMessage ?? "Conversation run append failed",
|
|
111
117
|
retryDelayMs: input.flushAttempt.retryDelayMs,
|
|
112
118
|
pendingEventCount: input.flushAttempt.pendingEventCount,
|
|
113
119
|
consecutiveFailures: input.flushAttempt.consecutiveFailures,
|
|
114
|
-
})
|
|
120
|
+
});
|
|
121
|
+
const message = "Durable run mirror flush failed; queued for retry";
|
|
122
|
+
if (input.flushAttempt.consecutiveFailures >= HOSTED_CHUNK_MIRROR_RETRY_ERROR_THRESHOLD) {
|
|
123
|
+
input.instrumentation?.error?.(message, metadata);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
input.instrumentation?.warn?.(message, metadata);
|
|
115
127
|
}
|
|
116
128
|
function recordHostedChunkMirrorHighBacklog(input) {
|
|
117
129
|
input.instrumentation?.warn?.("Durable run mirror backlog is high", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/src/config/loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAWnE,OAAO,EAAuB,KAAK,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAuBxF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C;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CASD;AAED,8EAA8E;AAC9E,wBAAgB,qCAAqC,IAAI,QAAQ,CAAC;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAKD;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAIvC;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAI9E"}
|
package/esm/src/config/loader.js
CHANGED
|
@@ -416,6 +416,17 @@ function createFreshDefaults() {
|
|
|
416
416
|
const configCacheByProject = new LRUCache({
|
|
417
417
|
maxEntries: DEFAULT_CONFIG_CACHE_MAX_ENTRIES,
|
|
418
418
|
});
|
|
419
|
+
/**
|
|
420
|
+
* Negative cache for deterministic hosted config rejections.
|
|
421
|
+
*
|
|
422
|
+
* The hosted cache key already folds in the exact source digest, policy
|
|
423
|
+
* version and environment fingerprint, so a rejected source stays rejected
|
|
424
|
+
* until the tenant ships different content; re-sending it to the evaluator
|
|
425
|
+
* worker on every request only repeats the same failure.
|
|
426
|
+
*/
|
|
427
|
+
const hostedConfigFailureCacheByProject = new LRUCache({
|
|
428
|
+
maxEntries: DEFAULT_CONFIG_CACHE_MAX_ENTRIES,
|
|
429
|
+
});
|
|
419
430
|
const MAX_ACTIVE_HOSTED_CONFIG_SOURCE_READS = DECLARATIVE_CONFIG_WORKER_ADMISSION_LIMITS.maxActive;
|
|
420
431
|
const MAX_QUEUED_HOSTED_CONFIG_SOURCE_READS = DECLARATIVE_CONFIG_WORKER_ADMISSION_LIMITS.maxQueued;
|
|
421
432
|
const hostedConfigSourceReadFlights = new IntrinsicMap();
|
|
@@ -433,8 +444,9 @@ const MAX_TRUSTED_CONFIG_FLIGHTS = 64;
|
|
|
433
444
|
const trustedConfigFlights = new IntrinsicMap();
|
|
434
445
|
const trustedVirtualFilesystemIds = new IntrinsicWeakMap();
|
|
435
446
|
let nextTrustedVirtualFilesystemId = 1;
|
|
436
|
-
// Register
|
|
447
|
+
// Register caches for monitoring
|
|
437
448
|
registerLRUCache("config-cache", configCacheByProject);
|
|
449
|
+
registerLRUCache("config-failure-cache", hostedConfigFailureCacheByProject);
|
|
438
450
|
let cacheRevision = 0;
|
|
439
451
|
function configFileProvenance(configFile) {
|
|
440
452
|
return freezeObject({ kind: "file", configFile });
|
|
@@ -777,6 +789,16 @@ async function buildHostedConfigCacheKey(baseCacheKey, configPath, source, paylo
|
|
|
777
789
|
function buildHostedConfigFlightKey(hostedCacheKey, revision) {
|
|
778
790
|
return `${revision}:${hostedCacheKey}`;
|
|
779
791
|
}
|
|
792
|
+
/**
|
|
793
|
+
* Whether a hosted evaluation failure is guaranteed to repeat for the same
|
|
794
|
+
* cache key. Worker-phase and retryable failures are infrastructure
|
|
795
|
+
* conditions that can succeed on retry, so they must never be cached.
|
|
796
|
+
*/
|
|
797
|
+
function isDeterministicHostedConfigRejection(error) {
|
|
798
|
+
return error instanceof DeclarativeConfigEvaluationError &&
|
|
799
|
+
!error.retryable &&
|
|
800
|
+
error.phase !== "worker";
|
|
801
|
+
}
|
|
780
802
|
function createHostedConfigFlight(flightKey, hostedCacheKey, payload, usePersistentCache, revisionAtStart) {
|
|
781
803
|
const controller = createHostedAbortController();
|
|
782
804
|
const controllerSignal = getAbortControllerSignal(controller);
|
|
@@ -815,6 +837,13 @@ function createHostedConfigFlight(flightKey, hostedCacheKey, payload, usePersist
|
|
|
815
837
|
result.resolve(config);
|
|
816
838
|
}, (error) => {
|
|
817
839
|
finish();
|
|
840
|
+
if (usePersistentCache && cacheRevision === revisionAtStart &&
|
|
841
|
+
isDeterministicHostedConfigRejection(error)) {
|
|
842
|
+
hostedConfigFailureCacheByProject.set(hostedCacheKey, {
|
|
843
|
+
revision: revisionAtStart,
|
|
844
|
+
error,
|
|
845
|
+
});
|
|
846
|
+
}
|
|
818
847
|
result.reject(error);
|
|
819
848
|
});
|
|
820
849
|
mapSet(hostedConfigFlights, flightKey, flight);
|
|
@@ -1304,6 +1333,12 @@ function loadHostedConfigFromSource(configPath, configFile, baseCacheKey, conten
|
|
|
1304
1333
|
if (cached?.revision === revisionAtStart) {
|
|
1305
1334
|
return cached.config;
|
|
1306
1335
|
}
|
|
1336
|
+
const cachedFailure = usePersistentCache
|
|
1337
|
+
? hostedConfigFailureCacheByProject.get(hostedCacheKey)
|
|
1338
|
+
: undefined;
|
|
1339
|
+
if (cachedFailure?.revision === revisionAtStart) {
|
|
1340
|
+
throw cachedFailure.error;
|
|
1341
|
+
}
|
|
1307
1342
|
const flight = getOrCreateHostedConfigFlight(hostedCacheKey, payload, usePersistentCache, revisionAtStart);
|
|
1308
1343
|
return await waitForHostedConfigFlight(flight, signal);
|
|
1309
1344
|
}, {
|
|
@@ -1797,6 +1832,7 @@ export function __getTrustedConfigFlightStateForTests() {
|
|
|
1797
1832
|
}
|
|
1798
1833
|
export function clearConfigCache() {
|
|
1799
1834
|
configCacheByProject.clear();
|
|
1835
|
+
hostedConfigFailureCacheByProject.clear();
|
|
1800
1836
|
cacheRevision++;
|
|
1801
1837
|
}
|
|
1802
1838
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydration-runtime.generated.d.ts","sourceRoot":"","sources":["../../../../src/src/html/hydration-script-builder/hydration-runtime.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"hydration-runtime.generated.d.ts","sourceRoot":"","sources":["../../../../src/src/html/hydration-script-builder/hydration-runtime.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,wBAAwB,EAAE,MAC044E,CAAC"}
|