veryfront 0.1.1222 → 0.1.1224
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/esm/cli/commands/deploy/command-help.d.ts.map +1 -1
- package/esm/cli/commands/deploy/command-help.js +10 -0
- package/esm/cli/commands/deploy/command.d.ts +3 -0
- package/esm/cli/commands/deploy/command.d.ts.map +1 -1
- package/esm/cli/commands/deploy/command.js +11 -5
- package/esm/cli/shared/deployment/deploy-project.d.ts.map +1 -1
- package/esm/cli/shared/deployment/deploy-project.js +7 -1
- package/esm/deno.d.ts +1 -0
- package/esm/deno.js +8 -7
- package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts +7 -2
- package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/browser-chunk-encoder.js +1 -1
- package/esm/src/agent/ag-ui/browser-encoder.d.ts +13 -0
- package/esm/src/agent/ag-ui/browser-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/browser-encoder.js +24 -6
- package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.d.ts +7 -3
- package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.js +1 -1
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.d.ts +7 -3
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.js +1 -1
- package/esm/src/agent/ag-ui/runtime-event-encoder.d.ts +7 -3
- package/esm/src/agent/ag-ui/runtime-event-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/runtime-event-encoder.js +1 -1
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts +9 -5
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.js +3 -2
- package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts +14 -9
- package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-step-message-preparation.js +0 -3
- package/esm/src/agent/hosted/project-remote-tool-source.d.ts +18 -6
- package/esm/src/agent/hosted/project-remote-tool-source.d.ts.map +1 -1
- package/esm/src/agent/hosted/project-remote-tool-source.js +80 -6
- package/esm/src/agent/hosted/runtime-essential-tools.d.ts.map +1 -1
- package/esm/src/agent/hosted/runtime-essential-tools.js +0 -17
- package/esm/src/agent/runtime/agent-runtime-step.d.ts +4 -0
- package/esm/src/agent/runtime/agent-runtime-step.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-runtime-step.js +46 -3
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +7 -6
- package/esm/src/agent/runtime/provider-tool-compat.d.ts.map +1 -1
- package/esm/src/agent/runtime/provider-tool-compat.js +96 -1
- package/esm/src/agent/runtime/tool-discovery-context.d.ts +27 -12
- package/esm/src/agent/runtime/tool-discovery-context.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-helpers.d.ts +2 -0
- package/esm/src/agent/runtime/tool-helpers.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-helpers.js +7 -3
- package/esm/src/build/production-build/client-runtime.d.ts.map +1 -1
- package/esm/src/build/production-build/client-runtime.js +7 -0
- package/esm/src/discovery/import-rewriter.d.ts +1 -1
- package/esm/src/discovery/import-rewriter.d.ts.map +1 -1
- package/esm/src/discovery/import-rewriter.js +1 -0
- package/esm/src/discovery/runtime-modules-bootstrap.js +2 -0
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
- package/esm/src/integrations/index.d.ts +4 -1
- package/esm/src/integrations/index.d.ts.map +1 -1
- package/esm/src/integrations/index.js +3 -1
- package/esm/src/integrations/remote-tools.d.ts +23 -6
- package/esm/src/integrations/remote-tools.d.ts.map +1 -1
- package/esm/src/integrations/remote-tools.js +95 -19
- package/esm/src/internal-agents/ag-ui-sse.d.ts.map +1 -1
- package/esm/src/internal-agents/ag-ui-sse.js +36 -18
- package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
- package/esm/src/routing/api/module-loader/loader.js +17 -84
- package/esm/src/security/client/html-sanitizer.d.ts +8 -0
- package/esm/src/security/client/html-sanitizer.d.ts.map +1 -1
- package/esm/src/security/client/html-sanitizer.js +4 -1
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +2 -2
- package/esm/src/testing/bdd.d.ts +4 -1
- package/esm/src/testing/bdd.d.ts.map +1 -1
- package/esm/src/testing/bdd.js +123 -30
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,UAAU,EAAE,WAoDxB,CAAC"}
|
|
@@ -4,6 +4,14 @@ export const deployHelp = {
|
|
|
4
4
|
description: "Promote a branch to an environment",
|
|
5
5
|
usage: "veryfront deploy [options]",
|
|
6
6
|
options: [
|
|
7
|
+
{
|
|
8
|
+
flag: "-p, --project <slug>",
|
|
9
|
+
description: "Project to deploy (default: the project this directory is linked to)",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
flag: "-d, --dir <path>",
|
|
13
|
+
description: "Project directory (default: current directory)",
|
|
14
|
+
},
|
|
7
15
|
{
|
|
8
16
|
flag: "-b, --branch <name>",
|
|
9
17
|
description: "Branch to release from (default: main)",
|
|
@@ -31,12 +39,14 @@ export const deployHelp = {
|
|
|
31
39
|
"veryfront deploy --branch feature-x --environment staging",
|
|
32
40
|
"veryfront deploy --release-name v1.2.0",
|
|
33
41
|
"veryfront deploy --dry-run",
|
|
42
|
+
"veryfront deploy --project my-app --environment production",
|
|
34
43
|
],
|
|
35
44
|
notes: [
|
|
36
45
|
"Requires VERYFRONT_API_TOKEN or an authenticated Veryfront login",
|
|
37
46
|
"Creates or links a project when veryfront.json is not present",
|
|
38
47
|
"Promotes main when --branch is omitted",
|
|
39
48
|
"Pushes main before the first deploy when no verified push exists",
|
|
49
|
+
"With --project, promotes only: the working directory is never pushed, so the selected project directory's push receipt must already name that project",
|
|
40
50
|
"Creates a new release from the resolved branch",
|
|
41
51
|
"Verifies the target environment points to the created deployment before succeeding",
|
|
42
52
|
],
|
|
@@ -13,6 +13,7 @@ import type { DeployResult } from "../../shared/deployment/result.js";
|
|
|
13
13
|
* Schema factory for deploy command arguments
|
|
14
14
|
*/
|
|
15
15
|
export declare const getDeployArgsSchema: () => import("../../../src/internal-agents/schema.js").Schema<import("../../../src/extensions/schema/schema-validator.js").InferShape<{
|
|
16
|
+
projectSlug: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
|
|
16
17
|
projectDir: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
|
|
17
18
|
branch: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
|
|
18
19
|
env: import("../../../src/internal-agents/schema.js").Schema<string>;
|
|
@@ -26,6 +27,7 @@ export declare const getDeployArgsSchema: () => import("../../../src/internal-ag
|
|
|
26
27
|
skipSourcePush: import("../../../src/internal-agents/schema.js").Schema<boolean>;
|
|
27
28
|
}>>;
|
|
28
29
|
export declare const DeployArgsSchema: import("../../../src/internal-agents/schema.js").Schema<import("../../../src/extensions/schema/schema-validator.js").InferShape<{
|
|
30
|
+
projectSlug: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
|
|
29
31
|
projectDir: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
|
|
30
32
|
branch: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
|
|
31
33
|
env: import("../../../src/internal-agents/schema.js").Schema<string>;
|
|
@@ -51,6 +53,7 @@ export type DeployOptions = Omit<ParsedDeployOptions, "skipSourcePush"> & {
|
|
|
51
53
|
* Parse CLI arguments into validated DeployOptions
|
|
52
54
|
*/
|
|
53
55
|
export declare const parseDeployArgs: (args: import("../../shared/types.js").ParsedArgs) => import("../../shared/args.js").SafeParseResult<import("../../../src/extensions/schema/schema-validator.js").InferShape<{
|
|
56
|
+
projectSlug: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
|
|
54
57
|
projectDir: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
|
|
55
58
|
branch: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
|
|
56
59
|
env: import("../../../src/internal-agents/schema.js").Schema<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAO3E,OAAO,EAGL,KAAK,aAAa,EAGnB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAO3E,OAAO,EAGL,KAAK,aAAa,EAGnB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;IAQ5B,uFAAuF;;IAEvF,oDAAoD;;IAEpD,mEAAmE;;GAGtE,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;IATzB,uFAAuF;;IAEvF,oDAAoD;;IAEpD,mEAAmE;;GAKR,CAAC;AAEhE;;GAEG;AACH,KAAK,mBAAmB,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC;AAC/E,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,GAAG;IACxE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kFAAkF;IAClF,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;IAxBxB,uFAAuF;;IAEvF,oDAAoD;;IAEpD,mEAAmE;;GA6BrE,CAAC;AAEH;;GAEG;AACH,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAGxF"}
|
|
@@ -19,6 +19,7 @@ import { deployProgressText, initialDeployProgressText } from "../../shared/depl
|
|
|
19
19
|
* Schema factory for deploy command arguments
|
|
20
20
|
*/
|
|
21
21
|
export const getDeployArgsSchema = defineSchema((v) => v.object({
|
|
22
|
+
projectSlug: v.string().min(1).optional(),
|
|
22
23
|
projectDir: v.string().optional(),
|
|
23
24
|
branch: v.string().min(1).optional(),
|
|
24
25
|
env: v.string().min(1).default("production"),
|
|
@@ -36,6 +37,7 @@ export const DeployArgsSchema = lazySchema(getDeployArgsSchema);
|
|
|
36
37
|
* Parse CLI arguments into validated DeployOptions
|
|
37
38
|
*/
|
|
38
39
|
export const parseDeployArgs = createArgParser(DeployArgsSchema, {
|
|
40
|
+
projectSlug: CommonArgs.projectSlug,
|
|
39
41
|
projectDir: CommonArgs.projectDir,
|
|
40
42
|
branch: CommonArgs.branch,
|
|
41
43
|
env: CommonArgs.env,
|
|
@@ -56,15 +58,18 @@ function deployRunner(options) {
|
|
|
56
58
|
return options.deployProject ?? createDeployProject();
|
|
57
59
|
}
|
|
58
60
|
function toDeployRequest(options) {
|
|
61
|
+
// Naming a project promotes what that project already has. Deploy must never
|
|
62
|
+
// upload the working directory into a project the caller only named by slug:
|
|
63
|
+
// the directory is unrelated to that project by construction.
|
|
64
|
+
const promoteOnly = options.skipSourcePush || options.projectSlug !== undefined;
|
|
59
65
|
return {
|
|
60
66
|
projectDir: options.projectDir ?? cwd(),
|
|
67
|
+
...(options.projectSlug === undefined ? {} : { projectSlug: options.projectSlug }),
|
|
61
68
|
branch: options.branch,
|
|
62
69
|
environment: options.env,
|
|
63
70
|
releaseName: options.releaseName,
|
|
64
71
|
mode: options.dryRun ? "dry-run" : "apply",
|
|
65
|
-
source:
|
|
66
|
-
? { kind: "already-pushed" }
|
|
67
|
-
: { kind: "ensure-pushed" },
|
|
72
|
+
source: promoteOnly ? { kind: "already-pushed" } : { kind: "ensure-pushed" },
|
|
68
73
|
};
|
|
69
74
|
}
|
|
70
75
|
function formatDryRunActions(plan) {
|
|
@@ -75,8 +80,9 @@ function formatDryRunActions(plan) {
|
|
|
75
80
|
function logDryRunPlan(plan, quiet) {
|
|
76
81
|
if (quiet)
|
|
77
82
|
return;
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
// A dry run exists to be read before the real one, so it always names the
|
|
84
|
+
// project it resolved: which project is what an operator gets wrong.
|
|
85
|
+
logInfo(`Would ${formatDryRunActions(plan)} for project ${plan.projectSlug}`);
|
|
80
86
|
}
|
|
81
87
|
function commandStepName(stepName) {
|
|
82
88
|
return stepName === "create-deployment" ? "deploy" : stepName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-project.d.ts","sourceRoot":"","sources":["../../../../src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
|
|
1
|
+
{"version":3,"file":"deploy-project.d.ts","sourceRoot":"","sources":["../../../../src/cli/shared/deployment/deploy-project.ts"],"names":[],"mappings":"AAKA,OAAO,EAKL,KAAK,iCAAiC,EAGvC,MAAM,sCAAsC,CAAC;AA6B9C,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAEL,KAAK,kBAAkB,EAKxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE;QAAE,IAAI,EAAE,eAAe,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,gBAAgB,CAAA;KAAE,CAAC;CAChE;AAED,MAAM,WAAW,mBAAmB;IAClC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,MAAM,cAAc,GACtB,gBAAgB,GAChB,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,uBAAuB,GACvB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,sBAAsB,CAAC;AAE3B,MAAM,MAAM,WAAW,GACnB;IACA,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,SAAS,GAAG,WAAW,CAAC;CAChC,GACC;IACA,IAAI,EAAE,SAAS,CAAC;IAChB,IAA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AC,MAAM,EAAE,cAAc,KAAK,kBAAkB,CAAC;CACjE,GAAG,aAAa,CA0NrB"}
|
|
@@ -678,7 +678,13 @@ export function createDeployProject(options = {}) {
|
|
|
678
678
|
return resolvedEnvironment;
|
|
679
679
|
});
|
|
680
680
|
if (request.mode === "dry-run") {
|
|
681
|
-
|
|
681
|
+
// Naming a project also makes the source already-pushed, which would
|
|
682
|
+
// otherwise skip this check: the dry run then reported a deploy that
|
|
683
|
+
// the byte-identical apply refused, because the apply compares the
|
|
684
|
+
// receipt against the named project. `--skip-source-push` keeps its
|
|
685
|
+
// existing dry-run behaviour; the caller has said the source is handled.
|
|
686
|
+
if (!bootstrapPush &&
|
|
687
|
+
(request.source.kind === "ensure-pushed" || request.projectSlug !== undefined)) {
|
|
682
688
|
await resolvePushedSource({
|
|
683
689
|
projectDir: request.projectDir,
|
|
684
690
|
controlPlane: config.apiUrl,
|
package/esm/deno.d.ts
CHANGED
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.1224",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"nodeModulesDir": "auto",
|
|
6
6
|
"minimumDependencyAge": {
|
|
@@ -464,14 +464,14 @@ export default {
|
|
|
464
464
|
"build:proxy-lock": "deno cache --node-modules-dir=none --lock scripts/build/proxy-deno.lock cli/proxy-main.ts",
|
|
465
465
|
"build:npm": "deno run -A scripts/build/generate-integrations-module.ts && deno task generate && deno run --config=scripts/test.deno.json --frozen -A scripts/build/build-npm-dnt.ts",
|
|
466
466
|
"release": "deno run -A scripts/release.ts",
|
|
467
|
-
"test": "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 --preload=src/
|
|
468
|
-
"test:unit": "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 --preload=src/
|
|
469
|
-
"test:integration": "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 --preload=src/
|
|
467
|
+
"test": "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 --preload=src/testing/preload.ts --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts,scripts' --unstable-worker-options --unstable-net",
|
|
468
|
+
"test:unit": "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 --preload=src/testing/preload.ts --no-check --parallel --allow-all --v8-flags=--max-old-space-size=8192 '--ignore=tests,src/workflow/__tests__' --unstable-worker-options --unstable-net $(find src cli -name '*.test.ts*' ! -name '*.integration.test.ts*')",
|
|
469
|
+
"test:integration": "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 --preload=src/testing/preload.ts --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' tests --unstable-worker-options --unstable-net",
|
|
470
470
|
"test:integration:cli": "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 --parallel --allow-all --unstable-worker-options --unstable-net $(find cli -name '*.integration.test.ts')",
|
|
471
471
|
"test:record": "VCR=record deno test --no-check --allow-all $(find cli -name '*.integration.test.ts' -path '*/commands/*')",
|
|
472
|
-
"test:coverage": "rm -rf coverage && 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 --preload=src/
|
|
473
|
-
"test:coverage:unit": "rm -rf coverage && 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 --preload=src/
|
|
474
|
-
"test:coverage:integration": "rm -rf coverage && 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 --preload=src/
|
|
472
|
+
"test:coverage": "rm -rf coverage && 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 --preload=src/testing/preload.ts --no-check --parallel --fail-fast --allow-all --v8-flags=--max-old-space-size=8192 --coverage=coverage '--ignore=tests/integration/compiled-binary-e2e.test.ts' --unstable-worker-options --unstable-net || exit 1",
|
|
473
|
+
"test:coverage:unit": "rm -rf coverage && 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 --preload=src/testing/preload.ts --no-check --parallel --fail-fast --allow-all --v8-flags=--max-old-space-size=8192 --coverage=coverage '--ignore=tests,src/workflow/__tests__' --unstable-worker-options --unstable-net $(find src cli -name '*.test.ts*' ! -name '*.integration.test.ts*') || exit 1",
|
|
474
|
+
"test:coverage:integration": "rm -rf coverage && 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 --preload=src/testing/preload.ts --no-check --parallel --fail-fast --allow-all --v8-flags=--max-old-space-size=8192 --coverage=coverage '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' tests --unstable-worker-options --unstable-net || exit 1",
|
|
475
475
|
"coverage:report": "deno coverage coverage --include=src/ --exclude=tests '--exclude=src/**/*_test.ts' '--exclude=src/**/*_test.tsx' '--exclude=src/**/*.test.ts' '--exclude=src/**/*.test.tsx' --lcov > coverage/lcov.info && deno run --allow-read scripts/lint/check-coverage.ts 80",
|
|
476
476
|
"coverage:gate": "deno coverage coverage --include=src/ --exclude=tests '--exclude=src/**/*_test.ts' '--exclude=src/**/*_test.tsx' '--exclude=src/**/*.test.ts' '--exclude=src/**/*.test.tsx' --lcov > coverage/lcov.info && deno run --allow-read scripts/lint/check-coverage.ts 80",
|
|
477
477
|
"coverage:ci:shard": "deno run --allow-read --allow-write --allow-run --allow-env scripts/test/coverage-ci.ts shard",
|
|
@@ -484,6 +484,7 @@ export default {
|
|
|
484
484
|
"build:storybook": "npm --prefix storybook run build-storybook",
|
|
485
485
|
"storybook:check": "deno test --no-lock --config=scripts/test.deno.json --no-check --allow-read scripts/storybook/storybook-workbench.test.ts",
|
|
486
486
|
"lint": "DENO_NO_PACKAGE_JSON=1 deno lint && deno lint --config=scripts/test.deno.json scripts/test/ 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/",
|
|
487
|
+
"lint:ci": "deno task lint && deno task lint:core-deps && deno task lint:dependency-boundaries && deno task lint:module-boundaries && 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:esm-sh-codemod && deno task lint:test-typecheck && deno task storybook:check && deno task docs:api-reference:check && deno test --frozen --config=scripts/test.deno.json --no-check --allow-read --allow-write scripts/ci/setup-deno-workflow.test.ts scripts/build/generated-artifact-checks.test.ts",
|
|
487
488
|
"fmt": "deno fmt src/ cli/ react/ && deno fmt --config=scripts/test.deno.json scripts/test/ 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/",
|
|
488
489
|
"fmt:check": "deno fmt --check src/ cli/ react/ && deno fmt --check --config=scripts/test.deno.json scripts/test/ 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/",
|
|
489
490
|
"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",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AgUiBrowserEncoderStateOptions } from "./browser-encoder.js";
|
|
1
2
|
import type { AgUiBrowserEncodedEvent, AgUiBrowserEncoderState, AgUiBrowserRunFinishedMetadata, AgUiRuntimeStreamEvent } from "./browser-encoder.js";
|
|
2
3
|
import type { AgentResponse } from "../types.js";
|
|
3
4
|
/** Public API contract for AG-UI browser chunk encoder. */
|
|
@@ -8,8 +9,12 @@ export interface AgUiBrowserChunkEncoder<TChunk> {
|
|
|
8
9
|
}
|
|
9
10
|
/** Options accepted by create AG-UI browser chunk encoder. */
|
|
10
11
|
export interface CreateAgUiBrowserChunkEncoderOptions<TChunk> {
|
|
11
|
-
/**
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Timing clocks forwarded verbatim to the encoder state. A single object so
|
|
14
|
+
* that adding a clock is one edit in `AgUiBrowserEncoderStateOptions`, not a
|
|
15
|
+
* sweep through every wrapper that happens to sit in between.
|
|
16
|
+
*/
|
|
17
|
+
timing?: AgUiBrowserEncoderStateOptions;
|
|
13
18
|
getRuntimeEvents: (chunk: TChunk) => readonly AgUiRuntimeStreamEvent[];
|
|
14
19
|
getMetadataFromChunk?: (chunk: TChunk) => Partial<AgUiBrowserRunFinishedMetadata> | null | undefined;
|
|
15
20
|
initialMetadata?: Partial<AgUiBrowserRunFinishedMetadata>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-chunk-encoder.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/ag-ui/browser-chunk-encoder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,2DAA2D;AAC3D,MAAM,WAAW,uBAAuB,CAA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6B,CAAC,MAAM,EAClD,OAAO,EAAE,oCAAoC,CAAC,MAAM,CAAC,GACpD,uBAAuB,CAAC,MAAM,CAAC,CAcjC"}
|
|
@@ -72,7 +72,7 @@ function mergeMetadata(target, metadata) {
|
|
|
72
72
|
export function createAgUiBrowserChunkEncoder(options) {
|
|
73
73
|
const runtimeEventEncoder = createAgUiRuntimeEventEncoder({
|
|
74
74
|
initialMetadata: options.initialMetadata,
|
|
75
|
-
...(options.
|
|
75
|
+
...(options.timing === undefined ? {} : { timing: options.timing }),
|
|
76
76
|
});
|
|
77
77
|
return {
|
|
78
78
|
state: runtimeEventEncoder.state,
|
|
@@ -54,6 +54,14 @@ export interface AgUiBrowserEncoderState {
|
|
|
54
54
|
*/
|
|
55
55
|
nowMs?: () => number;
|
|
56
56
|
startedMs?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Wall clock for `emittedAt`, in epoch milliseconds. Separate from `nowMs`
|
|
59
|
+
* because the two answer different questions and fail differently:
|
|
60
|
+
* `elapsedMs` is monotonic and safe for durations inside one run, while
|
|
61
|
+
* `emittedAt` is comparable across events, runs and services but can move
|
|
62
|
+
* backwards if the host clock is adjusted.
|
|
63
|
+
*/
|
|
64
|
+
epochMs?: () => number;
|
|
57
65
|
}
|
|
58
66
|
/** Options for create AG-UI browser encoder state. */
|
|
59
67
|
export interface AgUiBrowserEncoderStateOptions {
|
|
@@ -62,6 +70,11 @@ export interface AgUiBrowserEncoderStateOptions {
|
|
|
62
70
|
* to omit the stamp, which keeps exact-payload assertions deterministic.
|
|
63
71
|
*/
|
|
64
72
|
nowMs?: (() => number) | null;
|
|
73
|
+
/**
|
|
74
|
+
* Wall clock used to stamp `emittedAt`, in epoch milliseconds. Defaults to
|
|
75
|
+
* `Date.now`. Pass null to omit the stamp.
|
|
76
|
+
*/
|
|
77
|
+
epochMs?: (() => number) | null;
|
|
65
78
|
}
|
|
66
79
|
/** Event emitted for AG-UI browser encoded. */
|
|
67
80
|
export interface AgUiBrowserEncodedEv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B,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,8BAA8B,CAAC;IACzC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC;CACxB;AAED,sDAAsD;AACtD,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI,CAAC;CACjC;AAED,+CAA+C;AAC/C,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,8CAA8C;AAC9C,wBAAgB,6BAA6B,CAC3C,OAAO,GAAE,8BAAmC,GAC3C,uBAAuB,CAsBzB;AA6SD,yDAAyD;AACzD,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,8BAA8B,GACvC,aAAa,GAAG,IAAI,CA+HtB;AAuID,wDAAwD;AACxD,wBAAgB,wCAAwC,CACtD,KAAK,EAAE,uBAAuB,EAC9B,KAAK,EAAE,sBAAsB,GAC5B,uBAAuB,EAAE,CAE3B;AAyQD,4CAA4C;AAC5C,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,uBAAuB,EAC9B,QAAQ,EAAE,aAAa,GAAG,IAAI,GAC7B,uBAAuB,EAAE,CAE3B"}
|
|
@@ -5,8 +5,10 @@ export function createAgUiBrowserEncoderState(options = {}) {
|
|
|
5
5
|
// roots, so an opt-in clock only has to be forgotten once to lose elapsedMs
|
|
6
6
|
// for every run -- which is exactly what happened twice before.
|
|
7
7
|
const nowMs = options.nowMs === null ? undefined : options.nowMs ?? (() => performance.now());
|
|
8
|
+
const epochMs = options.epochMs === null ? undefined : options.epochMs ?? (() => Date.now());
|
|
8
9
|
return {
|
|
9
10
|
...(nowMs ? { nowMs, startedMs: nowMs() } : {}),
|
|
11
|
+
...(epochMs ? { epochMs } : {}),
|
|
10
12
|
messageId: null,
|
|
11
13
|
textOpen: false,
|
|
12
14
|
activeTextContentId: null,
|
|
@@ -485,14 +487,30 @@ function closeOpenReasoningEvent(state) {
|
|
|
485
487
|
}
|
|
486
488
|
/** Map runtime stream event to AG-UI browser events. */
|
|
487
489
|
export function mapRuntimeStreamEventToAgUiBrowserEvents(state, event) {
|
|
488
|
-
return
|
|
490
|
+
return stampTiming(state, mapRuntimeStreamEventToAgUiBrowserEventsUnstamped(state, event));
|
|
489
491
|
}
|
|
490
|
-
function
|
|
491
|
-
if (
|
|
492
|
+
function stampTiming(state, events) {
|
|
493
|
+
if (events.length === 0) {
|
|
492
494
|
return events;
|
|
493
495
|
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
+
// `elapsedMs` is anchored to this encoder's construction, so reading it
|
|
497
|
+
// correctly requires knowing which encoder produced it. `emittedAt` carries
|
|
498
|
+
// no anchor and means the same thing everywhere, which is what makes it the
|
|
499
|
+
// durable one: it supports durations between any two events, lines up with
|
|
500
|
+
// wall-clock traces and logs, and turns ingest lag into `created_at -
|
|
501
|
+
// emittedAt`. Both are stamped because wall clocks can step backwards and
|
|
502
|
+
// the monotonic reading cannot.
|
|
503
|
+
const timing = {};
|
|
504
|
+
if (state.nowMs && state.startedMs !== undefined) {
|
|
505
|
+
timing.elapsedMs = Math.max(0, Math.round(state.nowMs() - state.startedMs));
|
|
506
|
+
}
|
|
507
|
+
if (state.epochMs) {
|
|
508
|
+
timing.emittedAt = Math.round(state.epochMs());
|
|
509
|
+
}
|
|
510
|
+
if (Object.keys(timing).length === 0) {
|
|
511
|
+
return events;
|
|
512
|
+
}
|
|
513
|
+
return events.map((entry) => ({ ...entry, payload: { ...entry.payload, ...timing } }));
|
|
496
514
|
}
|
|
497
515
|
function mapRuntimeStreamEventToAgUiBrowserEventsUnstamped(state, event) {
|
|
498
516
|
if (event.type.startsWith("data-")) {
|
|
@@ -693,7 +711,7 @@ function mapRuntimeStreamEventToAgUiBrowserEventsUnstamped(state, event) {
|
|
|
693
711
|
}
|
|
694
712
|
/** Finalize AG-UI browser events helper. */
|
|
695
713
|
export function finalizeAgUiBrowserEvents(state, response) {
|
|
696
|
-
return
|
|
714
|
+
return stampTiming(state, finalizeAgUiBrowserEventsUnstamped(state, response));
|
|
697
715
|
}
|
|
698
716
|
function finalizeAgUiBrowserEventsUnstamped(state, response) {
|
|
699
717
|
applyResponseMetadata(state, response);
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type { ChatMessageMetadata, ChatUiMessageChunk } from "../../chat/protocol.js";
|
|
2
2
|
import type { AgUiBrowserChunkEncoder } from "./browser-chunk-encoder.js";
|
|
3
|
-
import { type AgUiBrowserRunFinishedMetadata, type AgUiRuntimeStreamEvent } from "./browser-encoder.js";
|
|
3
|
+
import { type AgUiBrowserEncoderStateOptions, type AgUiBrowserRunFinishedMetadata, type AgUiRuntimeStreamEvent } from "./browser-encoder.js";
|
|
4
4
|
import { type CreateAgUiTrackedBrowserResponseInput } from "./tracked-browser-response.js";
|
|
5
5
|
/** Public API contract for AG-UI chat UI chunk browser encoder. */
|
|
6
6
|
export type AgUiChatUiChunkBrowserEncoder = Pick<AgUiBrowserChunkEncoder<ChatUiMessageChunk<ChatMessageMetadata>>, "encode" | "finalize">;
|
|
7
7
|
/** Options accepted by create AG-UI chat UI chunk browser encoder. */
|
|
8
8
|
export interface CreateAgUiChatUiChunkBrowserEncoderOptions {
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Timing clocks forwarded verbatim to the encoder state. A single object so
|
|
11
|
+
* that adding a clock is one edit in `AgUiBrowserEncoderStateOptions`, not a
|
|
12
|
+
* sweep through every wrapper that happens to sit in between.
|
|
13
|
+
*/
|
|
14
|
+
timing?: AgUiBrowserEncoderStateOptions;
|
|
11
15
|
modelId?: string;
|
|
12
16
|
resolveProvider?: (modelId: string) => string | undefined;
|
|
13
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-ui-chunk-browser-encoder.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/ag-ui/chat-ui-chunk-browser-encoder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,OAAO,EACL,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC5B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAEL,KAAK,qCAAqC,EAC3C,MAAM,+BAA+B,CAAC;AAEvC,mEAAmE;AACnE,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,uBAAuB,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC,EAChE,QAAQ,GAAG,UAAU,CACtB,CAAC;AAEF,sEAAsE;AACtE,MAAM,WAAW,0CAA0C;IACzD
|
|
1
|
+
{"version":3,"file":"chat-ui-chunk-browser-encoder.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/ag-ui/chat-ui-chunk-browser-encoder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,OAAO,EACL,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC5B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAEL,KAAK,qCAAqC,EAC3C,MAAM,+BAA+B,CAAC;AAEvC,mEAAmE;AACnE,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,uBAAuB,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC,EAChE,QAA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,CACpD,KAAK,EAAE,2CAA2C,GACjD,QAAQ,CAkBV"}
|
|
@@ -173,7 +173,7 @@ export function createAgUiChatUiChunkBrowserEncoder(options = {}) {
|
|
|
173
173
|
},
|
|
174
174
|
getMetadataFromChunk: (chunk) => getAgUiChatUiMessageChunkMetadata(chunk, options),
|
|
175
175
|
getRuntimeEvents: (chunk) => [normalizeChatUiMessageChunkToAgUiRuntimeEvent(chunk)],
|
|
176
|
-
...(options.
|
|
176
|
+
...(options.timing === undefined ? {} : { timing: options.timing }),
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
/** Response payload for create AG-UI chat UI tracked browser. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AgUiBrowserEncodedEvent, type AgUiBrowserEncoderState, type AgUiRuntimeStreamEvent } from "./browser-encoder.js";
|
|
1
|
+
import { type AgUiBrowserEncodedEvent, type AgUiBrowserEncoderState, type AgUiBrowserEncoderStateOptions, type AgUiRuntimeStreamEvent } from "./browser-encoder.js";
|
|
2
2
|
import type { AgentResponse } from "../types.js";
|
|
3
3
|
/** Public API contract for AG-UI chunk encoder bridge. */
|
|
4
4
|
export interface AgUiChunkEncoderBridge<TChunk> {
|
|
@@ -9,8 +9,12 @@ export interface AgUiChunkEncoderBridge<TChunk> {
|
|
|
9
9
|
/** Options accepted by create AG-UI chunk encoder bridge. */
|
|
10
10
|
export interface CreateAgUiChunkEncoderBridgeOptions<TChunk> {
|
|
11
11
|
getRuntimeEvents: (chunk: TChunk) => readonly AgUiRuntimeStreamEvent[];
|
|
12
|
-
/**
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Timing clocks forwarded verbatim to the encoder state. A single object so
|
|
14
|
+
* that adding a clock is one edit in `AgUiBrowserEncoderStateOptions`, not a
|
|
15
|
+
* sweep through every wrapper that happens to sit in between.
|
|
16
|
+
*/
|
|
17
|
+
timing?: AgUiBrowserEncoderStateOptions;
|
|
14
18
|
}
|
|
15
19
|
/** Create AG-UI chunk encoder bridge. */
|
|
16
20
|
export declare function createAgUiChunkEncoderBridge<TChunk>(options: CreateAgUiChunkEncoderBridgeOptions<TChunk>): AgUiChunkEncoderBridge<TChunk>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-encoder-bridge.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/ag-ui/chunk-encoder-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAI5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,0DAA0D;AAC1D,MAAM,WAAW,sBAAsB,CAAC,MAAM;IAC5C,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,uBAAuB,EAAE,CAAC;IACrD,QAAQ,EAAE,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,KAAK,uBAAuB,EAAE,CAAC;IACxE,KAAK,EAAE,uBAAuB,CAAC;CAChC;AAED,6DAA6D;AAC7D,MAAM,WAAW,mCAAmC,CAAC,MAAM;IACzD,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,sBAAsB,EAAE,CAAC;IACvE
|
|
1
|
+
{"version":3,"file":"chunk-encoder-bridge.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/ag-ui/chunk-encoder-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAI5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,0DAA0D;AAC1D,MAAM,WAAW,sBAAsB,CAAC,MAAM;IAC5C,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,uBAAuB,EAAE,CAAC;IACrD,QAAQ,EAAE,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,KAAK,uBAAuB,EAAE,CAAC;IACxE,KAAK,EAAE,uBAAuB,CAAC;CAChC;AAED,6DAA6D;AAC7D,MAAM,WAAW,mCAAmC,CAAC,MAAM;IACzD,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,sBAAsB,EAAE,CAAC;IACvE;;;;OAIG;IACH,MAAM,CAAC,EAAE,8BAA8B,CAAC;CACzC;AAED,yCAAyC;AACzC,wBAAgB,4BAA4B,CAAC,MAAM,EACjD,OAAO,EAAE,mCAAmC,CAAC,MAAM,CAAC,GACnD,sBAAsB,CAAC,MAAM,CAAC,CAWhC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createAgUiBrowserEncoderState, finalizeAgUiBrowserEvents, mapRuntimeStreamEventToAgUiBrowserEvents, } from "./browser-encoder.js";
|
|
2
2
|
/** Create AG-UI chunk encoder bridge. */
|
|
3
3
|
export function createAgUiChunkEncoderBridge(options) {
|
|
4
|
-
const state = createAgUiBrowserEncoderState(options.
|
|
4
|
+
const state = createAgUiBrowserEncoderState(options.timing ?? {});
|
|
5
5
|
return {
|
|
6
6
|
state,
|
|
7
7
|
encode: (chunk) => options.getRuntimeEvents(chunk).flatMap((event) => mapRuntimeStreamEventToAgUiBrowserEvents(state, event)),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AgUiBrowserEncodedEvent, type AgUiBrowserEncoderState, type AgUiBrowserRunFinishedMetadata, type AgUiRuntimeStreamEvent } from "./browser-encoder.js";
|
|
1
|
+
import { type AgUiBrowserEncodedEvent, type AgUiBrowserEncoderState, type AgUiBrowserEncoderStateOptions, type AgUiBrowserRunFinishedMetadata, type AgUiRuntimeStreamEvent } from "./browser-encoder.js";
|
|
2
2
|
import type { AgentResponse } from "../types.js";
|
|
3
3
|
/** Public API contract for AG-UI runtime event encoder. */
|
|
4
4
|
export interface AgUiRuntimeEventEncoder {
|
|
@@ -9,8 +9,12 @@ export interface AgUiRuntimeEventEncoder {
|
|
|
9
9
|
/** Options accepted by create AG-UI runtime event encoder. */
|
|
10
10
|
export interface CreateAgUiRuntimeEventEncoderOptions {
|
|
11
11
|
initialMetadata?: Partial<AgUiBrowserRunFinishedMetadata>;
|
|
12
|
-
/**
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Timing clocks forwarded verbatim to the encoder state. A single object so
|
|
14
|
+
* that adding a clock is one edit in `AgUiBrowserEncoderStateOptions`, not a
|
|
15
|
+
* sweep through every wrapper that happens to sit in between.
|
|
16
|
+
*/
|
|
17
|
+
timing?: AgUiBrowserEncoderStateOptions;
|
|
14
18
|
}
|
|
15
19
|
/** Create AG-UI runtime event encoder. */
|
|
16
20
|
export declare function createAgUiRuntimeEventEncoder(options?: CreateAgUiRuntimeEventEncoderOptions): AgUiRuntimeEventEncoder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-event-encoder.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/ag-ui/runtime-event-encoder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAI5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,2DAA2D;AAC3D,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,uBAAuB,CAAC;IAC/B,MAAM,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,uBAAuB,EAAE,CAAC;IACrE,QAAQ,EAAE,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,KAAK,uBAAuB,EAAE,CAAC;CACzE;AAED,8DAA8D;AAC9D,MAAM,WAAW,oCAAoC;IACnD,eAAe,CAAC,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC1D
|
|
1
|
+
{"version":3,"file":"runtime-event-encoder.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/ag-ui/runtime-event-encoder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAI5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,2DAA2D;AAC3D,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,uBAAuB,CAAC;IAC/B,MAAM,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,uBAAuB,EAAE,CAAC;IACrE,QAAQ,EAAE,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,KAAK,uBAAuB,EAAE,CAAC;CACzE;AAED,8DAA8D;AAC9D,MAAM,WAAW,oCAAoC;IACnD,eAAe,CAAC,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC1D;;;;OAIG;IACH,MAAM,CAAC,EAAE,8BAA8B,CAAC;CACzC;AAED,0CAA0C;AAC1C,wBAAgB,6BAA6B,CAC3C,OAAO,GAAE,oCAAyC,GACjD,uBAAuB,CA+CzB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createAgUiBrowserEncoderState, finalizeAgUiBrowserEvents, mapRuntimeStreamEventToAgUiBrowserEvents, } from "./browser-encoder.js";
|
|
2
2
|
/** Create AG-UI runtime event encoder. */
|
|
3
3
|
export function createAgUiRuntimeEventEncoder(options = {}) {
|
|
4
|
-
const state = createAgUiBrowserEncoderState(options.
|
|
4
|
+
const state = createAgUiBrowserEncoderState(options.timing ?? {});
|
|
5
5
|
const toolInputs = new Map();
|
|
6
6
|
Object.assign(state.metadata, options.initialMetadata ?? {});
|
|
7
7
|
return {
|
|
@@ -6,8 +6,8 @@ import { type HostedProjectRemoteToolSourceMutationHandler, type HostedProjectRe
|
|
|
6
6
|
import { type RuntimeClientProfile } from "../runtime/client-profile.js";
|
|
7
7
|
import { type HostedRuntimeAllowedToolNames } from "./runtime-essential-tools.js";
|
|
8
8
|
import type { HostedSubmittedFormInputResult } from "./chat-runtime-contract.js";
|
|
9
|
-
import type { RuntimeToolDiscoveryContext } from "../runtime/tool-discovery-context.js";
|
|
10
9
|
import { type SourceIntegrationPolicyManifest } from "../../integrations/source-policy.js";
|
|
10
|
+
import type { RuntimeToolDiscoveryContext } from "../runtime/tool-discovery-context.js";
|
|
11
11
|
import type { RuntimeToolLoadingMode } from "../runtime/runtime-tool-config.js";
|
|
12
12
|
/** Context for hosted chat runtime tool assembly. */
|
|
13
13
|
export type HostedChatRuntimeToolAssemblyContext = DefaultResearchArtifactContext & {
|
|
@@ -71,10 +71,14 @@ export type PrepareHostedChatRuntimeToolAssemblyInput<TTraceAttributes extends H
|
|
|
71
71
|
onStudioProjectSwitch?: HostedProjectRemoteToolSourceProjectSwitchHandler;
|
|
72
72
|
preloadLatestConversationUserText?: boolean;
|
|
73
73
|
/**
|
|
74
|
-
* Per-run tool
|
|
75
|
-
*
|
|
76
|
-
* execution gate
|
|
77
|
-
*
|
|
74
|
+
* Per-run tool activation context. When its `activatedRemoteToolNames` Set is
|
|
75
|
+
* present, it is passed by reference to every remote tool source as the live
|
|
76
|
+
* execution gate, so growing the Set exposes tools without re-creating the
|
|
77
|
+
* sources. Deprecated: no framework path populates this. It is retained
|
|
78
|
+
* because `PrepareHostedChatRuntimeToolAssemblyInput` is public API.
|
|
79
|
+
*
|
|
80
|
+
* @deprecated Use `tool_search` deferred loading. See
|
|
81
|
+
* `docs/architecture/28-model-driven-tool-discovery.md`.
|
|
78
82
|
*/
|
|
79
83
|
toolDiscoveryContext?: RuntimeToolDiscoveryContext;
|
|
80
84
|
/** Exact project-source restriction applied before tool inventory is exposed. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-runtime-tool-assembly.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/hosted/chat-runtime-tool-assembly.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAE5B,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,OAAO,EAEZ,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,8BAA8B,EAGpC,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAEL,KAAK,4CAA4C,EACjD,KAAK,6CAA6C,EAClD,KAAK,iDAAiD,EACtD,KAAK,wCAAwC,EAC9C,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAIzE,OAAO,EACL,KAAK,6BAA6B,EAGnC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"chat-runtime-tool-assembly.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/hosted/chat-runtime-tool-assembly.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAE5B,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,OAAO,EAEZ,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,8BAA8B,EAGpC,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAEL,KAAK,4CAA4C,EACjD,KAAK,6CAA6C,EAClD,KAAK,iDA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AAC,EAAE,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;IAC1D,YAAY,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,iBAAiB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpD,sBAAsB,CAAC,EAAE,6CAA6C,CAAC;IACvE,yBAAyB,CAAC,EAAE,wCAAwC,CAAC;IACrE,kBAAkB,CAAC,EAAE,4CAA4C,CAAC;IAClE,qBAAqB,CAAC,EAAE,iDAAiD,CAAC;IAC1E,iCAAiC,CAAC,EAAE,OAAO,CAAC;IAC5C;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,2BAA2B,CAAC;IACnD,iFAAiF;IACjF,uBAAuB,EAAE,+BAA+B,CAAC;CAC1D,CAAC;AA2FF,8CAA8C;AAC9C,wBAAgB,iCAAiC,CAAC,KAAK,EAAE;IACvD,KAAK,EAAE,WAAW,CAAC;IACnB,gBAAgB,CAAC,EAAE,iCAAiC,CAAC;IACrD,uBAAuB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C,GAAG,WAAW,CAOd;AAwBD,iDAAiD;AACjD,wBAAsB,oCAAoC,CACxD,gBAAgB,SAAS,uBAAuB,GAAG,uBAAuB,EAE1E,KAAK,EAAE,yCAAyC,CAAC,gBAAgB,CAAC,GACjE,OAAO,CAAC,mCAAmC,CAAC,CAuK9C"}
|
|
@@ -87,8 +87,9 @@ export async function prepareHostedChatRuntimeToolAssembly(input) {
|
|
|
87
87
|
agentId: input.taskContext.agentId,
|
|
88
88
|
localTools: authorizedLocalTools,
|
|
89
89
|
});
|
|
90
|
+
const normalizedAllowedToolNames = normalizeHostedRuntimeAllowedToolNames(ownerScopedAllowedToolNames);
|
|
90
91
|
const allowedToolNames = resolveHostedRuntimeAllowedToolNames({
|
|
91
|
-
allowedToolNames:
|
|
92
|
+
allowedToolNames: normalizedAllowedToolNames,
|
|
92
93
|
localToolNames: Object.keys(authorizedLocalTools),
|
|
93
94
|
availableSkillIds: input.taskContext.availableSkillIds,
|
|
94
95
|
includeRuntimeEssentialToolsWhenEmpty: input.includeRuntimeEssentialToolsWhenEmpty,
|
|
@@ -155,7 +156,7 @@ export async function prepareHostedChatRuntimeToolAssembly(input) {
|
|
|
155
156
|
: sourceProviderToolNames.has(toolName)));
|
|
156
157
|
const providerToolNames = applySourceIntegrationPolicy(selectedProviderToolNames, input.sourceIntegrationPolicy);
|
|
157
158
|
const localToolNames = Object.keys(localHostTools);
|
|
158
|
-
const toolLoadingMode =
|
|
159
|
+
const toolLoadingMode = normalizedAllowedToolNames === null
|
|
159
160
|
? "deferred"
|
|
160
161
|
: "eager";
|
|
161
162
|
const authorizedToolNames = [
|
|
@@ -12,15 +12,20 @@ export type PrepareHostedChildForkRuntimeStepMessagesInput = {
|
|
|
12
12
|
forkToolNames: readonly string[];
|
|
13
13
|
resolveSystem?: HostedChildForkRuntimeStepSystemResolver;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Tool names that are always present. Required when `getActivatedToolNames`
|
|
16
|
+
* is supplied.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated No framework path supplies this. Retained because
|
|
19
|
+
* `PrepareHostedChildForkRuntimeStepMessagesInput` is public API.
|
|
17
20
|
*/
|
|
18
21
|
pinnedToolNames?: readonly string[];
|
|
19
22
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
23
|
+
* Returns the currently activated tool names. The result is merged with
|
|
24
|
+
* `pinnedToolNames` and returned as `forkToolNames`, letting a caller refresh
|
|
25
|
+
* the exposed tool set per step without mutating its own fixed array.
|
|
26
|
+
*
|
|
27
|
+
* @deprecated Use `tool_search` deferred loading. See
|
|
28
|
+
* `docs/architecture/28-model-driven-tool-discovery.md`.
|
|
24
29
|
*/
|
|
25
30
|
getActivatedToolNames?: () => readonly string[];
|
|
26
31
|
};
|
|
@@ -29,9 +34,9 @@ export type HostedChildForkRuntimeStepMessages = {
|
|
|
29
34
|
messages: AgentMessage[];
|
|
30
35
|
system: string;
|
|
31
36
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
37
|
+
* The live `pinned + activated` set for this step. Present only when
|
|
38
|
+
* `getActivatedToolNames` was supplied; callers otherwise keep their own
|
|
39
|
+
* fixed `forkToolNames`.
|
|
35
40
|
*/
|
|
36
41
|
forkToolNames?: readonly string[];
|
|
37
42
|
};
|