veryfront 0.1.508 → 0.1.510

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/esm/deno.js +1 -1
  2. package/esm/src/agent/{hosted-service-auth.d.ts → agent-service-auth.d.ts} +18 -1
  3. package/esm/src/agent/agent-service-auth.d.ts.map +1 -0
  4. package/esm/src/agent/{hosted-service-auth.js → agent-service-auth.js} +4 -0
  5. package/esm/src/agent/{hosted-agent-service-config.d.ts → agent-service-config.d.ts} +8 -8
  6. package/esm/src/agent/agent-service-config.d.ts.map +1 -0
  7. package/esm/src/agent/{hosted-agent-service-config.js → agent-service-config.js} +6 -6
  8. package/esm/src/agent/agent-service-env-files.d.ts +13 -0
  9. package/esm/src/agent/agent-service-env-files.d.ts.map +1 -0
  10. package/esm/src/agent/{hosted-agent-service-env-files.js → agent-service-env-files.js} +4 -6
  11. package/esm/src/agent/{hosted-agent-service-routes.d.ts → agent-service-routes.d.ts} +11 -2
  12. package/esm/src/agent/agent-service-routes.d.ts.map +1 -0
  13. package/esm/src/agent/{hosted-agent-service-routes.js → agent-service-routes.js} +2 -1
  14. package/esm/src/agent/{hosted-agent-service-runtime.d.ts → agent-service-runtime.d.ts} +12 -12
  15. package/esm/src/agent/agent-service-runtime.d.ts.map +1 -0
  16. package/esm/src/agent/{hosted-agent-service-runtime.js → agent-service-runtime.js} +11 -11
  17. package/esm/src/agent/default-hosted-chat-runtime.d.ts +2 -1
  18. package/esm/src/agent/default-hosted-chat-runtime.d.ts.map +1 -1
  19. package/esm/src/agent/default-hosted-chat-runtime.js +1 -1
  20. package/esm/src/agent/default-hosted-invoke-agent-tool.d.ts +2 -0
  21. package/esm/src/agent/default-hosted-invoke-agent-tool.d.ts.map +1 -1
  22. package/esm/src/agent/default-hosted-invoke-agent-tool.js +1 -0
  23. package/esm/src/agent/hosted-chat-runtime-tool-assembly.d.ts +2 -2
  24. package/esm/src/agent/hosted-chat-runtime-tool-assembly.d.ts.map +1 -1
  25. package/esm/src/agent/hosted-chat-runtime-tool-assembly.js +1 -1
  26. package/esm/src/agent/hosted-child-fork-tool-sources.d.ts +2 -1
  27. package/esm/src/agent/hosted-child-fork-tool-sources.d.ts.map +1 -1
  28. package/esm/src/agent/hosted-child-fork-tool-sources.js +44 -25
  29. package/esm/src/agent/hosted-project-remote-tool-source.d.ts +23 -3
  30. package/esm/src/agent/hosted-project-remote-tool-source.d.ts.map +1 -1
  31. package/esm/src/agent/hosted-project-remote-tool-source.js +55 -16
  32. package/esm/src/agent/hosted-project-steering-adapter.js +1 -1
  33. package/esm/src/agent/index.d.ts +8 -8
  34. package/esm/src/agent/index.d.ts.map +1 -1
  35. package/esm/src/agent/index.js +8 -8
  36. package/esm/src/agent/node-agent-service-runtime-infrastructure.d.ts +26 -0
  37. package/esm/src/agent/node-agent-service-runtime-infrastructure.d.ts.map +1 -0
  38. package/esm/src/agent/{node-hosted-agent-service-runtime-infrastructure.js → node-agent-service-runtime-infrastructure.js} +7 -9
  39. package/esm/src/agent/{node-hosted-agent-service-telemetry.d.ts → node-agent-service-telemetry.d.ts} +1 -1
  40. package/esm/src/agent/node-agent-service-telemetry.d.ts.map +1 -0
  41. package/esm/src/agent/veryfront-cloud-agent-service.d.ts +11 -10
  42. package/esm/src/agent/veryfront-cloud-agent-service.d.ts.map +1 -1
  43. package/esm/src/agent/veryfront-cloud-agent-service.js +16 -7
  44. package/esm/src/utils/version-constant.d.ts +1 -1
  45. package/esm/src/utils/version-constant.js +1 -1
  46. package/package.json +1 -1
  47. package/src/deno.js +1 -1
  48. package/src/deps/esm.sh/@types/react-dom@19.2.3/client.d.ts +1 -1
  49. package/src/deps/esm.sh/@types/{react@19.2.14 → react@19.2.3}/global.d.ts +0 -1
  50. package/src/deps/esm.sh/@types/{react@19.2.14 → react@19.2.3}/index.d.ts +24 -93
  51. package/src/deps/esm.sh/react-dom@19.2.4/client.d.ts +1 -1
  52. package/src/src/agent/{hosted-service-auth.ts → agent-service-auth.ts} +21 -0
  53. package/src/src/agent/{hosted-agent-service-config.ts → agent-service-config.ts} +12 -13
  54. package/src/src/agent/{hosted-agent-service-env-files.ts → agent-service-env-files.ts} +10 -14
  55. package/src/src/agent/{hosted-agent-service-routes.ts → agent-service-routes.ts} +25 -1
  56. package/src/src/agent/{hosted-agent-service-runtime.ts → agent-service-runtime.ts} +39 -39
  57. package/src/src/agent/default-hosted-chat-runtime.ts +3 -2
  58. package/src/src/agent/default-hosted-invoke-agent-tool.ts +3 -0
  59. package/src/src/agent/hosted-chat-runtime-tool-assembly.ts +3 -2
  60. package/src/src/agent/hosted-child-fork-tool-sources.ts +52 -27
  61. package/src/src/agent/hosted-project-remote-tool-source.ts +115 -37
  62. package/src/src/agent/hosted-project-steering-adapter.ts +1 -1
  63. package/src/src/agent/index.ts +10 -8
  64. package/src/src/agent/{node-hosted-agent-service-runtime-infrastructure.ts → node-agent-service-runtime-infrastructure.ts} +27 -30
  65. package/src/src/agent/veryfront-cloud-agent-service.ts +32 -15
  66. package/src/src/utils/version-constant.ts +1 -1
  67. package/esm/src/agent/hosted-agent-service-config.d.ts.map +0 -1
  68. package/esm/src/agent/hosted-agent-service-env-files.d.ts +0 -13
  69. package/esm/src/agent/hosted-agent-service-env-files.d.ts.map +0 -1
  70. package/esm/src/agent/hosted-agent-service-routes.d.ts.map +0 -1
  71. package/esm/src/agent/hosted-agent-service-runtime.d.ts.map +0 -1
  72. package/esm/src/agent/hosted-service-auth.d.ts.map +0 -1
  73. package/esm/src/agent/node-hosted-agent-service-runtime-infrastructure.d.ts +0 -26
  74. package/esm/src/agent/node-hosted-agent-service-runtime-infrastructure.d.ts.map +0 -1
  75. package/esm/src/agent/node-hosted-agent-service-telemetry.d.ts.map +0 -1
  76. /package/esm/src/agent/{node-hosted-agent-service-telemetry.js → node-agent-service-telemetry.js} +0 -0
  77. /package/src/src/agent/{node-hosted-agent-service-telemetry.ts → node-agent-service-telemetry.ts} +0 -0
@@ -3,21 +3,18 @@ import { type RunAgentServiceMainOptions } from "./agent-service-bootstrap.js";
3
3
  import { type HostedChatRuntimeCreationResult } from "./hosted-chat-runtime-contract.js";
4
4
  import type { HostedConversationRootRunContext } from "./conversation-root-run-lifecycle.js";
5
5
  import { type AgentRuntimeMessage } from "./agent-runtime-message-adapter.js";
6
- import { type CreateNodeAgentServiceRuntimeInfrastructureOptions } from "./node-hosted-agent-service-runtime-infrastructure.js";
7
- import { type AgentServiceRuntimeBundle, type AgentServiceRuntimeConfig, type StartNodeAgentServiceResult } from "./hosted-agent-service-runtime.js";
6
+ import type { HostedProjectMcpServerConfig } from "./hosted-project-remote-tool-source.js";
7
+ import { type CreateNodeAgentServiceRuntimeInfrastructureOptions } from "./node-agent-service-runtime-infrastructure.js";
8
+ import { type AgentServiceRuntimeBundle, type AgentServiceRuntimeConfig, type StartNodeAgentServiceResult } from "./agent-service-runtime.js";
8
9
  import type { PreparedHostedChatExecution } from "./prepared-hosted-chat-execution.js";
9
10
  export type NodeVeryfrontCloudAgentServiceProcessTarget = NonNullable<RunAgentServiceMainOptions["processTarget"]> & NonNullable<CreateNodeAgentServiceRuntimeInfrastructureOptions["processTarget"]> & {
10
11
  env?: Record<string, string | undefined>;
11
12
  exit?: (code: number) => never | void;
12
13
  };
13
14
  export type NodeVeryfrontCloudAgentServiceAgentSource = "auto" | "code" | "markdown";
14
- export type NodeVeryfrontCloudAgentServiceMcpOptions = {
15
- /**
16
- * Opt in to Studio UI/control-plane MCP tools for trusted Studio-capable clients.
17
- * API MCP tools remain part of the Veryfront Cloud service preset.
18
- */
19
- studio?: boolean;
20
- };
15
+ export type VeryfrontMcpServerKind = "api" | "studio";
16
+ export type NodeVeryfrontCloudAgentServiceMcpServer = HostedProjectMcpServerConfig;
17
+ export declare function veryfrontMcpServer(kind?: VeryfrontMcpServerKind): HostedProjectMcpServerConfig;
21
18
  type AgentServicePathOption = string | URL;
22
19
  export type NodeVeryfrontCloudAgentServiceOptions = {
23
20
  serviceName: string;
@@ -33,7 +30,11 @@ export type NodeVeryfrontCloudAgentServiceOptions = {
33
30
  */
34
31
  entrypointUrl?: AgentServicePathOption;
35
32
  agentSource?: NodeVeryfrontCloudAgentServiceAgentSource;
36
- mcp?: NodeVeryfrontCloudAgentServiceMcpOptions;
33
+ /**
34
+ * Remote MCP servers available to the runtime. Defaults to the Veryfront API
35
+ * MCP server. Pass [] to run without remote MCP tools.
36
+ */
37
+ mcpServers?: readonly NodeVeryfrontCloudAgentServiceMcpServer[];
37
38
  forwardedConfigNamespace?: string;
38
39
  createBashTool?: AgentServiceSandboxToolsOptions["createBashTool"];
39
40
  env?: CreateNodeAgentServiceRuntimeInfrastructureOptions["env"];
@@ -1 +1 @@
1
- {"version":3,"file":"veryfront-cloud-agent-service.d.ts","sourceRoot":"","sources":["../../../src/src/agent/veryfront-cloud-agent-service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AA+B3E,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AAC7F,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AA6B9E,OAAO,EAEL,KAAK,kDAAkD,EACxD,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAK9B,KAAK,2BAA2B,EACjC,MAAM,mCAAmC,CAAC;AAI3C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAevF,MAAM,MAAM,2CAA2C,GACnD,WAAW,CAAC,0BAA0B,CAAC,eAAe,CAAC,CAAC,GACxD,WAAW,CAAC,kDAAkD,CAAC,eAAe,CAAC,CAAC,GAChF;IACA,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,GAAG,IAAI,CAAC;CACvC,CAAC;AAEJ,MAAM,MAAM,yCAAyC,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAErF,MAAM,MAAM,wCAAwC,GAAG;IACrD;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,sBAAsB,GAAG,MAAM,GAAG,GAAG,CAAC;AAE3C,MAAM,MAAM,qCAAqC,GAAG;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,WAAW,CAAC,EAAE,yCAAyC,CAAC;IACxD,GAAG,CAAC,EAAE,wCAAwC,CAAC;IAC/C,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,cAAc,CAAC,EAAE,+BAA+B,CAAC,gBAAgB,CAAC,CAAC;IACnE,GAAG,CAAC,EAAE,kDAAkD,CAAC,KAAK,CAAC,CAAC;IAChE,aAAa,CAAC,EAAE,2CAA2C,CAAC;IAC5D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG,qCAAqC,CAAC;AAQtF,MAAM,MAAM,+CAA+C,GAAG,2BAA2B,GAAG;IAC1F,MAAM,EAAE,yBAAyB,CAAC;IAClC,KAAK,EAAE,+BAA+B,CAAC,OAAO,CAAC,CAAC;IAChD,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,mBAAmB,EAAE,CAAC;IACrC,QAAQ,EAAE,2BAA2B,CAAC,UAAU,CAAC,CAAC;IAClD,cAAc,EAAE,gCAAgC,CAAC;CAClD,CAAC;AAinBF,wBAAsB,2CAA2C,CAC/D,OAAO,EAAE,qCAAqC,GAC7C,OAAO,CAAC,yBAAyB,CAAC,+CAA+C,CAAC,CAAC,CAKrF;AAED,wBAAsB,mCAAmC,CACvD,OAAO,EAAE,qCAAqC,GAC7C,OAAO,CAAC,2BAA2B,CAAC,+CAA+C,CAAC,CAAC,CAQvF;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,qCAAqC,GAC7C,OAAO,CAAC,IAAI,CAAC,CAyCf"}
1
+ {"version":3,"file":"veryfront-cloud-agent-service.d.ts","sourceRoot":"","sources":["../../../src/src/agent/veryfront-cloud-agent-service.ts"],"names":[],"mappings":"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"}
@@ -12,7 +12,7 @@ import { getVeryfrontCloudProviderFromModelId, resolveVeryfrontCloudModelId, res
12
12
  import { __registerTraceContextGetter } from "../utils/logger/logger.js";
13
13
  import { buildAgentRunTraceAttributes, buildExecuteToolTraceAttributes, filterAgentTraceAttributes, } from "./agent-trace-attributes.js";
14
14
  import { runAgentServiceMain, } from "./agent-service-bootstrap.js";
15
- import { loadAgentServiceEnvFiles } from "./hosted-agent-service-env-files.js";
15
+ import { loadAgentServiceEnvFiles } from "./agent-service-env-files.js";
16
16
  import { createHostedFormInputTool } from "./hosted-form-input-tool.js";
17
17
  import { createHostedAgentProjectSteering } from "./hosted-agent-project-steering.js";
18
18
  import { createLiveStudioMcpTools } from "./live-studio-mcp-tools.js";
@@ -21,14 +21,20 @@ import { createDefaultHostedInvokeAgentTool } from "./default-hosted-invoke-agen
21
21
  import { createDefaultHostedProjectSteeringRefresh, fetchDefaultHostedProjectSteering, } from "./default-hosted-project-steering-refresh.js";
22
22
  import { loadRuntimeAgentMarkdownDefinitionFromFile, resolveRuntimeAgentDefinitionsDir, } from "./runtime-agent-definition-files.js";
23
23
  import { buildVeryfrontCloudRuntimeInstructions, } from "./veryfront-cloud-runtime-system-messages.js";
24
- import { createNodeAgentServiceRuntimeInfrastructure, } from "./node-hosted-agent-service-runtime-infrastructure.js";
25
- import { createAgentServiceRuntime, startAgentServiceRuntime, startNodeAgentService, } from "./hosted-agent-service-runtime.js";
24
+ import { createNodeAgentServiceRuntimeInfrastructure, } from "./node-agent-service-runtime-infrastructure.js";
25
+ import { createAgentServiceRuntime, startAgentServiceRuntime, startNodeAgentService, } from "./agent-service-runtime.js";
26
26
  import { createDetachedRunTracker } from "./detached-run-tracker.js";
27
27
  import { runPreparedHostedChatExecutionDetached, streamPreparedHostedChatExecutionToAgUiResponse, } from "./prepared-hosted-chat-execution.js";
28
28
  import { createVeryfrontCloudPreparedHostedChatExecutionRuntimeOptions, } from "./veryfront-cloud-prepared-hosted-chat-execution-runtime.js";
29
29
  import { prepareVeryfrontCloudHostedChatExecution, } from "./veryfront-cloud-hosted-chat-execution-preparation.js";
30
30
  import { applyAgentProjectContextChange } from "./project-context.js";
31
31
  import { agentRegistry, getAgent } from "./composition/index.js";
32
+ export function veryfrontMcpServer(kind = "api") {
33
+ if (kind === "studio") {
34
+ return { kind: "veryfront-studio" };
35
+ }
36
+ return { kind: "veryfront-api" };
37
+ }
32
38
  const DEFAULT_FORWARDED_CONFIG_NAMESPACE = "veryfront";
33
39
  const DEFAULT_DRAIN_TIMEOUT_MS = 15_000;
34
40
  const DEFAULT_HARD_SHUTDOWN_TIMEOUT_MS = 20_000;
@@ -83,6 +89,9 @@ function resolveDefaultProcessTarget() {
83
89
  }
84
90
  return process;
85
91
  }
92
+ function resolveMcpServers(options) {
93
+ return options.mcpServers ?? [veryfrontMcpServer()];
94
+ }
86
95
  async function loadDefaultCreateBashTool() {
87
96
  const { createBashTool } = await import("bash-tool");
88
97
  return createBashTool;
@@ -232,11 +241,11 @@ function setFilteredTraceAttributes(context, attributes) {
232
241
  }
233
242
  function getInvokeAgentConfig(context) {
234
243
  const config = context.infrastructure.getConfig();
235
- const studioMcpUrl = context.options.mcp?.studio ? config.VERYFRONT_STUDIO_MCP_URL : "";
236
244
  return {
237
245
  apiUrl: config.VERYFRONT_API_URL,
238
246
  apiMcpUrl: config.VERYFRONT_MCP_URL,
239
- studioMcpUrl,
247
+ studioMcpUrl: config.VERYFRONT_STUDIO_MCP_URL,
248
+ mcpServers: resolveMcpServers(context.options),
240
249
  enableDurableInvokeAgent: config.VERYFRONT_ENABLE_DURABLE_INVOKE_AGENT,
241
250
  };
242
251
  }
@@ -297,8 +306,8 @@ function createAgentRuntime(context, options) {
297
306
  config: {
298
307
  apiUrl: config.VERYFRONT_API_URL,
299
308
  apiMcpUrl: config.VERYFRONT_MCP_URL,
300
- studioMcpUrl: context.options.mcp?.studio ? config.VERYFRONT_STUDIO_MCP_URL : "",
301
- studioMcpEnabled: context.options.mcp?.studio ?? false,
309
+ studioMcpUrl: config.VERYFRONT_STUDIO_MCP_URL,
310
+ mcpServers: resolveMcpServers(context.options),
302
311
  },
303
312
  buildLocalTools: (taskContext) => buildLocalTools(context, options, taskContext),
304
313
  refreshSystem,
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.508";
1
+ export declare const VERSION = "0.1.510";
2
2
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
- export const VERSION = "0.1.508";
3
+ export const VERSION = "0.1.510";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.508",
3
+ "version": "0.1.510",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",
package/src/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.508",
3
+ "version": "0.1.510",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "workspace": [
@@ -4,7 +4,7 @@
4
4
 
5
5
  // See https://github.com/facebook/react/blob/main/packages/react-dom/client.js to see how the exports are declared,
6
6
 
7
- import React = require("https://esm.sh/@types/react@19.2.14/index.d.ts");
7
+ import React = require("https://esm.sh/@types/react@19.2.3/index.d.ts");
8
8
 
9
9
  export {};
10
10
 
@@ -18,7 +18,6 @@ interface KeyboardEvent extends Event {}
18
18
  interface MouseEvent extends Event {}
19
19
  interface TouchEvent extends Event {}
20
20
  interface PointerEvent extends Event {}
21
- interface SubmitEvent extends Event {}
22
21
  interface ToggleEvent extends Event {}
23
22
  interface TransitionEvent extends Event {}
24
23
  interface UIEvent extends Event {}
@@ -16,7 +16,6 @@ type NativeKeyboardEvent = KeyboardEvent;
16
16
  type NativeMouseEvent = MouseEvent;
17
17
  type NativeTouchEvent = TouchEvent;
18
18
  type NativePointerEvent = PointerEvent;
19
- type NativeSubmitEvent = SubmitEvent;
20
19
  type NativeToggleEvent = ToggleEvent;
21
20
  type NativeTransitionEvent = TransitionEvent;
22
21
  type NativeUIEvent = UIEvent;
@@ -226,20 +225,12 @@ declare namespace React {
226
225
 
227
226
  type ComponentState = any;
228
227
 
229
- interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES {}
230
-
231
228
  /**
232
229
  * A value which uniquely identifies a node among items in an array.
233
230
  *
234
231
  * @see {@link https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key React Docs}
235
232
  */
236
- type Key =
237
- | string
238
- | number
239
- | bigint
240
- | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES[
241
- keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES
242
- ];
233
+ type Key = string | number | bigint;
243
234
 
244
235
  /**
245
236
  * @internal The props any component can receive.
@@ -1893,7 +1884,7 @@ declare namespace React {
1893
1884
  *
1894
1885
  * @param callback A synchronous, void callback that will execute as a single, complete React commit.
1895
1886
  *
1896
- * @see {@link https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks}
1887
+ * @see https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks
1897
1888
  */
1898
1889
  // NOTES
1899
1890
  // - the order of these signatures matters - typescript will check the signatures in source order.
@@ -1935,31 +1926,7 @@ declare namespace React {
1935
1926
  reducer: (state: State, action: Action) => State,
1936
1927
  ): [State, (action: Action) => void];
1937
1928
 
1938
- interface UntrackedReactPromise<T> extends PromiseLike<T> {
1939
- status?: void;
1940
- }
1941
-
1942
- export interface PendingReactPromise<T> extends PromiseLike<T> {
1943
- status: "pending";
1944
- }
1945
-
1946
- export interface FulfilledReactPromise<T> extends PromiseLike<T> {
1947
- status: "fulfilled";
1948
- value: T;
1949
- }
1950
-
1951
- export interface RejectedReactPromise<T> extends PromiseLike<T> {
1952
- status: "rejected";
1953
- reason: unknown;
1954
- }
1955
-
1956
- export type ReactPromise<T> =
1957
- | UntrackedReactPromise<T>
1958
- | PendingReactPromise<T>
1959
- | FulfilledReactPromise<T>
1960
- | RejectedReactPromise<T>;
1961
-
1962
- export type Usable<T> = ReactPromise<T> | Context<T>;
1929
+ export type Usable<T> = PromiseLike<T> | Context<T>;
1963
1930
 
1964
1931
  export function use<T>(usable: Usable<T>): T;
1965
1932
 
@@ -2074,28 +2041,15 @@ declare namespace React {
2074
2041
  target: EventTarget & Target;
2075
2042
  }
2076
2043
 
2077
- /**
2078
- * @deprecated FormEvent doesn't actually exist.
2079
- * You probably meant to use {@link ChangeEvent}, {@link InputEvent}, {@link SubmitEvent}, or just {@link SyntheticEvent} instead
2080
- * depending on the event type.
2081
- */
2082
2044
  interface FormEvent<T = Element> extends SyntheticEvent<T> {
2083
2045
  }
2084
2046
 
2085
2047
  interface InvalidEvent<T = Element> extends SyntheticEvent<T> {
2048
+ target: EventTarget & T;
2086
2049
  }
2087
2050
 
2088
- /**
2089
- * change events bubble in React so their target is generally unknown.
2090
- * Only for form elements we know their target type because form events can't
2091
- * be nested.
2092
- * This type exists purely to narrow `target` for form elements. It doesn't
2093
- * reflect a DOM event. Change events are just fired as standard {@link SyntheticEvent}.
2094
- */
2095
- interface ChangeEvent<CurrentTarget = Element, Target = Element> extends SyntheticEvent<CurrentTarget> {
2096
- // TODO: This is wrong for change event handlers on arbitrary. Should
2097
- // be EventTarget & Target, but kept for backward compatibility until React 20.
2098
- target: EventTarget & CurrentTarget;
2051
+ interface ChangeEvent<T = Element> extends SyntheticEvent<T> {
2052
+ target: EventTarget & T;
2099
2053
  }
2100
2054
 
2101
2055
  interface InputEvent<T = Element> extends SyntheticEvent<T, NativeInputEvent> {
@@ -2165,13 +2119,6 @@ declare namespace React {
2165
2119
  shiftKey: boolean;
2166
2120
  }
2167
2121
 
2168
- interface SubmitEvent<T = Element> extends SyntheticEvent<T, NativeSubmitEvent> {
2169
- // `submitter` is available in react@canary
2170
- // submitter: HTMLElement | null;
2171
- // SubmitEvents are always targetted at HTMLFormElements.
2172
- target: EventTarget & HTMLFormElement;
2173
- }
2174
-
2175
2122
  interface TouchEvent<T = Element> extends UIEvent<T, NativeTouchEvent> {
2176
2123
  altKey: boolean;
2177
2124
  changedTouches: TouchList;
@@ -2227,19 +2174,11 @@ declare namespace React {
2227
2174
  type CompositionEventHandler<T = Element> = EventHandler<CompositionEvent<T>>;
2228
2175
  type DragEventHandler<T = Element> = EventHandler<DragEvent<T>>;
2229
2176
  type FocusEventHandler<T = Element> = EventHandler<FocusEvent<T>>;
2230
- /**
2231
- * @deprecated FormEventHandler doesn't actually exist.
2232
- * You probably meant to use {@link ChangeEventHandler}, {@link InputEventHandler}, {@link SubmitEventHandler}, or just {@link EventHandler} instead
2233
- * depending on the event type.
2234
- */
2235
2177
  type FormEventHandler<T = Element> = EventHandler<FormEvent<T>>;
2236
- type ChangeEventHandler<CurrentTarget = Element, Target = Element> = EventHandler<
2237
- ChangeEvent<CurrentTarget, Target>
2238
- >;
2178
+ type ChangeEventHandler<T = Element> = EventHandler<ChangeEvent<T>>;
2239
2179
  type InputEventHandler<T = Element> = EventHandler<InputEvent<T>>;
2240
2180
  type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent<T>>;
2241
2181
  type MouseEventHandler<T = Element> = EventHandler<MouseEvent<T>>;
2242
- type SubmitEventHandler<T = Element> = EventHandler<SubmitEvent<T>>;
2243
2182
  type TouchEventHandler<T = Element> = EventHandler<TouchEvent<T>>;
2244
2183
  type PointerEventHandler<T = Element> = EventHandler<PointerEvent<T>>;
2245
2184
  type UIEventHandler<T = Element> = EventHandler<UIEvent<T>>;
@@ -2293,19 +2232,19 @@ declare namespace React {
2293
2232
  onBlur?: FocusEventHandler<T> | undefined;
2294
2233
  onBlurCapture?: FocusEventHandler<T> | undefined;
2295
2234
 
2296
- // form related Events
2297
- onChange?: ChangeEventHandler<T> | undefined;
2298
- onChangeCapture?: ChangeEventHandler<T> | undefined;
2235
+ // Form Events
2236
+ onChange?: FormEventHandler<T> | undefined;
2237
+ onChangeCapture?: FormEventHandler<T> | undefined;
2299
2238
  onBeforeInput?: InputEventHandler<T> | undefined;
2300
- onBeforeInputCapture?: InputEventHandler<T> | undefined;
2301
- onInput?: InputEventHandler<T> | undefined;
2302
- onInputCapture?: InputEventHandler<T> | undefined;
2303
- onReset?: ReactEventHandler<T> | undefined;
2304
- onResetCapture?: ReactEventHandler<T> | undefined;
2305
- onSubmit?: SubmitEventHandler<T> | undefined;
2306
- onSubmitCapture?: SubmitEventHandler<T> | undefined;
2307
- onInvalid?: ReactEventHandler<T> | undefined;
2308
- onInvalidCapture?: ReactEventHandler<T> | undefined;
2239
+ onBeforeInputCapture?: FormEventHandler<T> | undefined;
2240
+ onInput?: FormEventHandler<T> | undefined;
2241
+ onInputCapture?: FormEventHandler<T> | undefined;
2242
+ onReset?: FormEventHandler<T> | undefined;
2243
+ onResetCapture?: FormEventHandler<T> | undefined;
2244
+ onSubmit?: FormEventHandler<T> | undefined;
2245
+ onSubmitCapture?: FormEventHandler<T> | undefined;
2246
+ onInvalid?: FormEventHandler<T> | undefined;
2247
+ onInvalidCapture?: FormEventHandler<T> | undefined;
2309
2248
 
2310
2249
  // Image Events
2311
2250
  onLoad?: ReactEventHandler<T> | undefined;
@@ -2849,7 +2788,7 @@ declare namespace React {
2849
2788
 
2850
2789
  // Living Standard
2851
2790
  /**
2852
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert}
2791
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert
2853
2792
  */
2854
2793
  inert?: boolean | undefined;
2855
2794
  /**
@@ -3312,9 +3251,7 @@ declare namespace React {
3312
3251
  value?: string | readonly string[] | number | undefined;
3313
3252
  width?: number | string | undefined;
3314
3253
 
3315
- // No other element dispatching change events can be nested in a <input>
3316
- // so we know the target will be a HTMLInputElement.
3317
- onChange?: ChangeEventHandler<T, HTMLInputElement> | undefined;
3254
+ onChange?: ChangeEventHandler<T> | undefined;
3318
3255
  }
3319
3256
 
3320
3257
  interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
@@ -3479,9 +3416,7 @@ declare namespace React {
3479
3416
  required?: boolean | undefined;
3480
3417
  size?: number | undefined;
3481
3418
  value?: string | readonly string[] | number | undefined;
3482
- // No other element dispatching change events can be nested in a <select>
3483
- // so we know the target will be a HTMLSelectElement.
3484
- onChange?: ChangeEventHandler<T, HTMLSelectElement> | undefined;
3419
+ onChange?: ChangeEventHandler<T> | undefined;
3485
3420
  }
3486
3421
 
3487
3422
  interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
@@ -3533,9 +3468,7 @@ declare namespace React {
3533
3468
  value?: string | readonly string[] | number | undefined;
3534
3469
  wrap?: string | undefined;
3535
3470
 
3536
- // No other element dispatching change events can be nested in a <textarea>
3537
- // so we know the target will be a HTMLTextAreaElement.
3538
- onChange?: ChangeEventHandler<T, HTMLTextAreaElement> | undefined;
3471
+ onChange?: ChangeEventHandler<T> | undefined;
3539
3472
  }
3540
3473
 
3541
3474
  interface TdHTMLAttributes<T> extends HTMLAttributes<T> {
@@ -3607,9 +3540,6 @@ declare namespace React {
3607
3540
  method?: string | undefined;
3608
3541
  min?: number | string | undefined;
3609
3542
  name?: string | undefined;
3610
- nonce?: string | undefined;
3611
- part?: string | undefined;
3612
- slot?: string | undefined;
3613
3543
  style?: CSSProperties | undefined;
3614
3544
  target?: string | undefined;
3615
3545
  type?: string | undefined;
@@ -4127,6 +4057,7 @@ declare namespace React {
4127
4057
  * Captures which component contained the exception, and its ancestors.
4128
4058
  */
4129
4059
  componentStack?: string | null;
4060
+ digest?: string | null;
4130
4061
  }
4131
4062
 
4132
4063
  // Keep in sync with JSX namespace in ./jsx-runtime.d.ts and ./jsx-dev-runtime.d.ts
@@ -4,7 +4,7 @@
4
4
 
5
5
  // See https://github.com/facebook/react/blob/main/packages/react-dom/client.js to see how the exports are declared,
6
6
 
7
- import React = require("https://esm.sh/@types/react@19.2.14/index.d.ts");
7
+ import React = require("https://esm.sh/@types/react@19.2.3/index.d.ts");
8
8
 
9
9
  export {};
10
10
 
@@ -24,6 +24,10 @@ export function isHostedServiceAuthError(
24
24
  return error instanceof HostedServiceAuthError;
25
25
  }
26
26
 
27
+ export const AgentServiceAuthError = HostedServiceAuthError;
28
+ export type AgentServiceAuthError = HostedServiceAuthError;
29
+ export type AgentServiceAuthErrorCode = HostedServiceAuthErrorCode;
30
+
27
31
  export type HostedServiceAuthenticatedRequest = {
28
32
  authToken: string;
29
33
  userId: string;
@@ -90,6 +94,18 @@ export type HostedServiceAuth = {
90
94
  ) => Promise<HostedServiceProjectAccessResult>;
91
95
  };
92
96
 
97
+ export type AgentServiceAuthenticatedRequest = HostedServiceAuthenticatedRequest;
98
+ export type AgentServiceJwtError = HostedServiceJwtError;
99
+ export type AgentServiceJwtResult = HostedServiceJwtResult;
100
+ export type AgentServiceProjectAccessError = HostedServiceProjectAccessError;
101
+ export type AgentServiceProjectAccessResult = HostedServiceProjectAccessResult;
102
+ export type AgentServiceAuthConfig = HostedServiceAuthConfig;
103
+ export type AgentServiceAuthLogger = HostedServiceAuthLogger;
104
+ export type AgentServiceAuthTrace = HostedServiceAuthTrace;
105
+ export type AgentServiceAuthFetch = HostedServiceAuthFetch;
106
+ export type AgentServiceAuthOptions = HostedServiceAuthOptions;
107
+ export type AgentServiceAuth = HostedServiceAuth;
108
+
93
109
  let cachedPublicKeyInput: string | undefined;
94
110
  let cachedPublicKeyPromise: Promise<KeyLike> | undefined;
95
111
 
@@ -128,6 +144,8 @@ export function getHostedServiceTokenFromRequest(request: Request): string | nul
128
144
  return null;
129
145
  }
130
146
 
147
+ export const getAgentServiceTokenFromRequest = getHostedServiceTokenFromRequest;
148
+
131
149
  function makeUnauthenticatedError(message: string): HostedServiceJwtError {
132
150
  return {
133
151
  statusCode: 401,
@@ -395,3 +413,6 @@ export function createHostedServiceAuth(
395
413
  verifyProjectAccess,
396
414
  };
397
415
  }
416
+
417
+ export const createAgentServiceAuth = createHostedServiceAuth;
418
+ export const isAgentServiceAuthError = isHostedServiceAuthError;
@@ -10,7 +10,7 @@ function splitAllowedOrigins(value: string): string[] {
10
10
 
11
11
  const booleanFlagSchema = z.string().default("false").transform(parseBooleanFlag);
12
12
 
13
- export const hostedAgentServiceConfigSchema = z.object({
13
+ export const agentServiceConfigSchema = z.object({
14
14
  VERYFRONT_API_URL: z.string().url().default("https://api.veryfront.com"),
15
15
  NODE_ENV: z.enum(["development", "test", "production"]).default("development"),
16
16
  PORT: z.coerce.number().default(3001),
@@ -35,22 +35,21 @@ export const hostedAgentServiceConfigSchema = z.object({
35
35
  OTEL_EXPORTER_OTLP_ENDPOINT: env.OTEL_EXPORTER_OTLP_ENDPOINT,
36
36
  }));
37
37
 
38
- export type HostedAgentServiceConfig = z.infer<typeof hostedAgentServiceConfigSchema>;
39
- export type HostedAgentServiceConfigInput = z.input<typeof hostedAgentServiceConfigSchema>;
38
+ export type AgentServiceConfig = z.infer<typeof agentServiceConfigSchema>;
39
+ export type AgentServiceConfigInput = z.input<typeof agentServiceConfigSchema>;
40
40
 
41
- export const agentServiceConfigSchema = hostedAgentServiceConfigSchema;
41
+ export const hostedAgentServiceConfigSchema = agentServiceConfigSchema;
42
+ export type HostedAgentServiceConfig = AgentServiceConfig;
43
+ export type HostedAgentServiceConfigInput = AgentServiceConfigInput;
42
44
 
43
- export type AgentServiceConfig = HostedAgentServiceConfig;
44
- export type AgentServiceConfigInput = HostedAgentServiceConfigInput;
45
+ export function parseAgentServiceConfig(
46
+ input: AgentServiceConfigInput,
47
+ ): AgentServiceConfig {
48
+ return agentServiceConfigSchema.parse(input);
49
+ }
45
50
 
46
51
  export function parseHostedAgentServiceConfig(
47
52
  input: HostedAgentServiceConfigInput,
48
53
  ): HostedAgentServiceConfig {
49
- return hostedAgentServiceConfigSchema.parse(input);
50
- }
51
-
52
- export function parseAgentServiceConfig(
53
- input: AgentServiceConfigInput,
54
- ): AgentServiceConfig {
55
- return parseHostedAgentServiceConfig(input);
54
+ return parseAgentServiceConfig(input);
56
55
  }
@@ -1,20 +1,20 @@
1
1
  import { cwd as getCwd, env as getProcessEnv, setEnv } from "../platform/compat/process.js";
2
2
  import { load as loadDotenv } from "../platform/compat/std/dotenv.js";
3
3
 
4
- const DEFAULT_HOSTED_AGENT_SERVICE_ENV_FILES = [".env", ".env.local"] as const;
4
+ const DEFAULT_AGENT_SERVICE_ENV_FILES = [".env", ".env.local"] as const;
5
5
 
6
- export type HostedAgentServiceEnvFileLoadResult = {
6
+ export type AgentServiceEnvFileLoadResult = {
7
7
  loadedFiles: string[];
8
8
  loadedVariables: number;
9
9
  };
10
10
 
11
- export type HostedAgentServiceEnvFileLoadOptions = {
11
+ export type AgentServiceEnvFileLoadOptions = {
12
12
  cwd?: string;
13
13
  files?: readonly string[];
14
14
  };
15
15
 
16
- export type AgentServiceEnvFileLoadResult = HostedAgentServiceEnvFileLoadResult;
17
- export type AgentServiceEnvFileLoadOptions = HostedAgentServiceEnvFileLoadOptions;
16
+ export type HostedAgentServiceEnvFileLoadResult = AgentServiceEnvFileLoadResult;
17
+ export type HostedAgentServiceEnvFileLoadOptions = AgentServiceEnvFileLoadOptions;
18
18
 
19
19
  function joinEnvPath(cwd: string, file: string): string {
20
20
  if (file.startsWith("/") || file.startsWith("./") || file.startsWith("../")) {
@@ -24,11 +24,11 @@ function joinEnvPath(cwd: string, file: string): string {
24
24
  return `${cwd.replace(/\/$/, "")}/${file}`;
25
25
  }
26
26
 
27
- export async function loadHostedAgentServiceEnvFiles(
28
- options: HostedAgentServiceEnvFileLoadOptions = {},
29
- ): Promise<HostedAgentServiceEnvFileLoadResult> {
27
+ export async function loadAgentServiceEnvFiles(
28
+ options: AgentServiceEnvFileLoadOptions = {},
29
+ ): Promise<AgentServiceEnvFileLoadResult> {
30
30
  const cwd = options.cwd ?? getCwd();
31
- const files = options.files ?? DEFAULT_HOSTED_AGENT_SERVICE_ENV_FILES;
31
+ const files = options.files ?? DEFAULT_AGENT_SERVICE_ENV_FILES;
32
32
  const protectedKeys = new Set(Object.keys(getProcessEnv()));
33
33
  const loadedFiles: string[] = [];
34
34
  let loadedVariables = 0;
@@ -57,8 +57,4 @@ export async function loadHostedAgentServiceEnvFiles(
57
57
  return { loadedFiles, loadedVariables };
58
58
  }
59
59
 
60
- export async function loadAgentServiceEnvFiles(
61
- options: AgentServiceEnvFileLoadOptions = {},
62
- ): Promise<AgentServiceEnvFileLoadResult> {
63
- return loadHostedAgentServiceEnvFiles(options);
64
- }
60
+ export const loadHostedAgentServiceEnvFiles = loadAgentServiceEnvFiles;
@@ -20,7 +20,7 @@ import { executeHostedDurableChatRun } from "./hosted-durable-chat-run-start.js"
20
20
  import {
21
21
  type HostedServiceAuthenticatedRequest,
22
22
  HostedServiceAuthError,
23
- } from "./hosted-service-auth.js";
23
+ } from "./agent-service-auth.js";
24
24
  import { createRequestAuthCache } from "./request-auth-cache.js";
25
25
  import { isResponseLike } from "./response-like.js";
26
26
  import type { AgUiRuntimeRequest } from "./runtime-ag-ui-contract.js";
@@ -29,32 +29,47 @@ export type HostedAgentServiceRoutesLogger = {
29
29
  error(message: string, metadata?: Record<string, unknown>): void;
30
30
  };
31
31
 
32
+ export type AgentServiceRoutesLogger = HostedAgentServiceRoutesLogger;
33
+
32
34
  export type HostedAgentServiceRoutesTrace = <TResult>(
33
35
  operationName: string,
34
36
  operation: () => Promise<TResult>,
35
37
  ) => Promise<TResult>;
36
38
 
39
+ export type AgentServiceRoutesTrace = HostedAgentServiceRoutesTrace;
40
+
37
41
  export type HostedAgentServiceActiveSpanAttributes = Record<
38
42
  string,
39
43
  string | number | boolean | readonly (string | number | boolean)[] | null | undefined
40
44
  >;
41
45
 
46
+ export type AgentServiceActiveSpanAttributes = HostedAgentServiceActiveSpanAttributes;
47
+
42
48
  export type HostedAgentServiceStreamExecutionInput<TExecution extends object> = TExecution & {
43
49
  requestAbortSignal: AbortSignal;
44
50
  agUiInput: AgUiRuntimeRequest;
45
51
  };
46
52
 
53
+ export type AgentServiceStreamExecutionInput<TExecution extends object> =
54
+ HostedAgentServiceStreamExecutionInput<TExecution>;
55
+
47
56
  export type HostedAgentServiceDetachedExecutionInput<TExecution extends object> = {
48
57
  execution: TExecution;
49
58
  abortSignal: AbortSignal;
50
59
  };
51
60
 
61
+ export type AgentServiceDetachedExecutionInput<TExecution extends object> =
62
+ HostedAgentServiceDetachedExecutionInput<TExecution>;
63
+
52
64
  export type HostedAgentServiceDetachedCleanupInput<TExecution extends object> = {
53
65
  execution: TExecution;
54
66
  runId: string;
55
67
  conversationId: string;
56
68
  };
57
69
 
70
+ export type AgentServiceDetachedCleanupInput<TExecution extends object> =
71
+ HostedAgentServiceDetachedCleanupInput<TExecution>;
72
+
58
73
  export type HostedAgentServiceRouteSetOptions<TExecution extends object> = {
59
74
  forwardedConfigNamespace?: string;
60
75
  authenticateRequest: (
@@ -84,6 +99,9 @@ export type HostedAgentServiceRouteSetOptions<TExecution extends object> = {
84
99
  logger?: HostedAgentServiceRoutesLogger;
85
100
  };
86
101
 
102
+ export type AgentServiceRouteSetOptions<TExecution extends object> =
103
+ HostedAgentServiceRouteSetOptions<TExecution>;
104
+
87
105
  export type HostedAgentServiceRouteSet<TExecution extends object> = {
88
106
  routes: AgentServiceRoute[];
89
107
  authenticateAgUiRequest: (
@@ -110,6 +128,10 @@ export type HostedAgentServiceRouteSet<TExecution extends object> = {
110
128
  }) => Promise<Response>;
111
129
  };
112
130
 
131
+ export type AgentServiceRouteSet<TExecution extends object> = HostedAgentServiceRouteSet<
132
+ TExecution
133
+ >;
134
+
113
135
  function defaultTrace<TResult>(
114
136
  _operationName: string,
115
137
  operation: () => Promise<TResult>,
@@ -363,3 +385,5 @@ export function createHostedAgentServiceRouteSet<TExecution extends object>(
363
385
  handleDurableChatRunCancelRequest,
364
386
  };
365
387
  }
388
+
389
+ export const createAgentServiceRouteSet = createHostedAgentServiceRouteSet;