veryfront 0.1.856 → 0.1.858

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 (57) hide show
  1. package/esm/cli/commands/lint/handler.d.ts.map +1 -1
  2. package/esm/cli/commands/lint/handler.js +9 -12
  3. package/esm/cli/commands/mcp/handler.d.ts +3 -0
  4. package/esm/cli/commands/mcp/handler.d.ts.map +1 -1
  5. package/esm/cli/commands/mcp/handler.js +4 -4
  6. package/esm/cli/commands/serve/split-mode.d.ts +1 -0
  7. package/esm/cli/commands/serve/split-mode.d.ts.map +1 -1
  8. package/esm/cli/commands/serve/split-mode.js +45 -13
  9. package/esm/cli/commands/test/command.d.ts.map +1 -1
  10. package/esm/cli/commands/test/command.js +5 -2
  11. package/esm/cli/commands/test/handler.d.ts.map +1 -1
  12. package/esm/cli/commands/test/handler.js +19 -13
  13. package/esm/cli/mcp/standalone.d.ts +7 -0
  14. package/esm/cli/mcp/standalone.d.ts.map +1 -1
  15. package/esm/cli/mcp/standalone.js +9 -10
  16. package/esm/cli/mcp/tools/context7-tools.d.ts.map +1 -1
  17. package/esm/cli/mcp/tools/context7-tools.js +3 -3
  18. package/esm/cli/mcp/tools/helpers.d.ts +8 -0
  19. package/esm/cli/mcp/tools/helpers.d.ts.map +1 -1
  20. package/esm/cli/mcp/tools/project-tools.d.ts.map +1 -1
  21. package/esm/cli/mcp/tools/project-tools.js +33 -3
  22. package/esm/cli/mcp/tools/run-lint-tool.d.ts +6 -0
  23. package/esm/cli/mcp/tools/run-lint-tool.d.ts.map +1 -1
  24. package/esm/cli/mcp/tools/run-lint-tool.js +10 -58
  25. package/esm/cli/mcp/tools/run-tests-tool.d.ts +6 -0
  26. package/esm/cli/mcp/tools/run-tests-tool.d.ts.map +1 -1
  27. package/esm/cli/mcp/tools/run-tests-tool.js +8 -32
  28. package/esm/cli/scaffold/engine.js +1 -1
  29. package/esm/cli/shared/animation.d.ts +8 -0
  30. package/esm/cli/shared/animation.d.ts.map +1 -1
  31. package/esm/cli/shared/animation.js +2 -7
  32. package/esm/cli/templates/manifest.js +7 -7
  33. package/esm/cli/utils/write-run-result.js +4 -4
  34. package/esm/deno.js +1 -1
  35. package/esm/src/agent/runtime/constants.js +1 -1
  36. package/esm/src/agent/runtime/index.js +3 -3
  37. package/esm/src/agent/runtime/text-generation-runtime-message-converter.d.ts +9 -0
  38. package/esm/src/agent/runtime/text-generation-runtime-message-converter.d.ts.map +1 -1
  39. package/esm/src/agent/runtime/text-generation-runtime-message-converter.js +15 -0
  40. package/esm/src/chat/conversation.d.ts.map +1 -1
  41. package/esm/src/chat/conversation.js +18 -2
  42. package/esm/src/platform/compat/process/command.d.ts.map +1 -1
  43. package/esm/src/platform/compat/process/command.js +4 -3
  44. package/esm/src/platform/compat/process/env.d.ts.map +1 -1
  45. package/esm/src/platform/compat/process/env.js +13 -9
  46. package/esm/src/platform/compat/process/lifecycle.d.ts.map +1 -1
  47. package/esm/src/platform/compat/process/lifecycle.js +55 -37
  48. package/esm/src/platform/compat/process/runtime-process.d.ts.map +1 -1
  49. package/esm/src/platform/compat/process/runtime-process.js +4 -3
  50. package/esm/src/platform/compat/runtime.d.ts +2 -0
  51. package/esm/src/platform/compat/runtime.d.ts.map +1 -1
  52. package/esm/src/platform/compat/runtime.js +14 -6
  53. package/esm/src/platform/compat/stdin.d.ts.map +1 -1
  54. package/esm/src/platform/compat/stdin.js +17 -13
  55. package/esm/src/utils/version-constant.d.ts +1 -1
  56. package/esm/src/utils/version-constant.js +1 -1
  57. package/package.json +1 -1
@@ -4,8 +4,8 @@
4
4
  * Runs the project test suite via subprocess and returns structured results.
5
5
  * Reuses parseTestOutput from the CLI test command.
6
6
  */
7
- import * as dntShim from "../../../_dnt.shims.js";
8
7
  import { defineSchema, lazySchema } from "../../../src/schemas/index.js";
8
+ import { runCommand } from "../../../src/platform/index.js";
9
9
  import { parseTestOutput } from "../../commands/test/command.js";
10
10
  const getRunTestsInput = defineSchema((v) => v.object({
11
11
  filter: v.string().optional().describe("Filter tests by name pattern. Example: 'router' to run only tests matching 'router'."),
@@ -35,41 +35,17 @@ export const TEST_ENV = {
35
35
  };
36
36
  /** Spawn deno test and return structured results. Exported for standalone reuse. */
37
37
  export async function executeTests(input) {
38
- const cmd = new dntShim.Deno.Command("deno", {
38
+ const timeoutMs = input.timeout ?? 300000;
39
+ const result = await runCommand("deno", {
39
40
  args: buildTestArgs(input),
40
- stdout: "piped",
41
- stderr: "piped",
41
+ capture: true,
42
42
  env: TEST_ENV,
43
+ timeoutMs,
43
44
  });
44
- const child = cmd.spawn();
45
- const timeoutMs = input.timeout ?? 300000;
46
- const outputPromise = child.output();
47
- let timerId;
48
- const timeoutResult = "timeout";
49
- const timeoutPromise = new Promise((resolve) => {
50
- timerId = dntShim.setTimeout(() => {
51
- resolve(timeoutResult);
52
- }, timeoutMs);
53
- // Don't prevent process exit while waiting
54
- dntShim.Deno.unrefTimer(timerId);
55
- });
56
- const result = await Promise.race([outputPromise, timeoutPromise]);
57
- if (timerId !== undefined) {
58
- clearTimeout(timerId);
59
- }
60
- if (result === timeoutResult) {
61
- try {
62
- child.kill();
63
- }
64
- catch {
65
- // Process may have already exited
66
- }
67
- await outputPromise.catch(() => undefined);
45
+ if (result.code === 124) {
68
46
  throw new Error(`Test execution timed out after ${timeoutMs}ms`);
69
47
  }
70
- const stdout = new TextDecoder().decode(result.stdout);
71
- const stderr = new TextDecoder().decode(result.stderr);
72
- return parseTestOutput(stdout + "\n" + stderr, result.code);
48
+ return parseTestOutput(`${result.stdout ?? ""}\n${result.stderr ?? ""}`, result.code);
73
49
  }
74
50
  export const vfRunTests = {
75
51
  name: "vf_run_tests",
@@ -83,7 +59,7 @@ export const vfRunTests = {
83
59
  description: "Use this when you need to run the project's test suite and get structured pass/fail results. " +
84
60
  "Returns a summary with total, passed, failed, skipped counts and failure details including " +
85
61
  "file path, test name, error message, and line number. " +
86
- "Do not use for lint checks use vf_run_lint instead.",
62
+ "Do not use for lint checks. Use vf_run_lint instead.",
87
63
  inputSchema: runTestsInput,
88
64
  execute: (input) => executeTests(input),
89
65
  };
@@ -216,7 +216,7 @@ export default tool({
216
216
  id: "${name}",
217
217
  description: "Description of what this tool does",
218
218
  inputSchema,
219
- execute: async ({ input }) => {
219
+ execute: ({ input }) => {
220
220
  return { result: input };
221
221
  },
222
222
  });
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Animation state for accessibility
3
+ *
4
+ * Controls whether CLI animations (spinners, progress bars) are disabled.
5
+ * Set by --no-animation flag or when TERM=dumb.
6
+ *
7
+ * @module cli/shared/animation
8
+ */
1
9
  export declare function setAnimationDisabled(disabled: boolean): void;
2
10
  export declare function isAnimationDisabled(): boolean;
3
11
  //# sourceMappingURL=animation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../src/cli/shared/animation.ts"],"names":[],"mappings":"AAaA,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAE5D;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CAO7C"}
1
+ {"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../src/cli/shared/animation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAE5D;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CAG7C"}
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @module cli/shared/animation
8
8
  */
9
- import * as dntShim from "../../_dnt.shims.js";
9
+ import { getEnv } from "../../src/platform/index.js";
10
10
  let _animationDisabled = false;
11
11
  export function setAnimationDisabled(disabled) {
12
12
  _animationDisabled = disabled;
@@ -14,10 +14,5 @@ export function setAnimationDisabled(disabled) {
14
14
  export function isAnimationDisabled() {
15
15
  if (_animationDisabled)
16
16
  return true;
17
- try {
18
- return dntShim.Deno.env.get("TERM") === "dumb";
19
- }
20
- catch {
21
- return false;
22
- }
17
+ return getEnv("TERM") === "dumb";
23
18
  }
@@ -27,7 +27,7 @@ export default {
27
27
  "app/page.tsx": "'use client'\n\nimport { Chat, useChat } from 'veryfront/chat'\n\nexport default function ChatPage(): React.JSX.Element {\n const chat = useChat({ api: '/api/ag-ui' })\n\n return <Chat {...chat} className=\"flex-1 min-h-0\" placeholder=\"Message\" />\n}\n",
28
28
  "globals.css": "@import \"tailwindcss\";\n",
29
29
  "README.md": "# AI Agent\n\nA simple conversational AI with tool support.\n\n## What's included\n\n- Single assistant agent with streaming chat UI\n- Example calculator tool\n- `useChat` hook for real-time responses\n\n## Structure\n\n```\nagents/assistant.ts Agent definition\ntools/calculator.ts Example tool\napp/\n api/ag-ui/route.ts AG-UI endpoint\n page.tsx Chat interface\n```\n\nThis starter is not production-ready.\n",
30
- "tools/calculator.ts": "import { tool } from \"veryfront/tool\";\nimport { defineSchema } from \"veryfront/schemas\";\n\nexport default tool({\n id: \"calculator\",\n description: \"Perform basic arithmetic operations\",\n inputSchema: defineSchema((v) => v.object({\n operation: v.enum([\"add\", \"subtract\", \"multiply\", \"divide\"]),\n a: v.number(),\n b: v.number(),\n }))(),\n execute: async ({ operation, a, b }) => {\n if (operation === \"divide\" && b === 0) {\n throw new Error(\"Cannot divide by zero\");\n }\n\n if (operation === \"add\") return { result: a + b };\n if (operation === \"subtract\") return { result: a - b };\n if (operation === \"multiply\") return { result: a * b };\n return { result: a / b };\n },\n});\n",
30
+ "tools/calculator.ts": "import { tool } from \"veryfront/tool\";\nimport { defineSchema } from \"veryfront/schemas\";\n\nexport default tool({\n id: \"calculator\",\n description: \"Perform basic arithmetic operations\",\n inputSchema: defineSchema((v) => v.object({\n operation: v.enum([\"add\", \"subtract\", \"multiply\", \"divide\"]),\n a: v.number(),\n b: v.number(),\n }))(),\n execute: ({ operation, a, b }) => {\n if (operation === \"divide\" && b === 0) {\n throw new Error(\"Cannot divide by zero\");\n }\n\n if (operation === \"add\") return { result: a + b };\n if (operation === \"subtract\") return { result: a - b };\n if (operation === \"multiply\") return { result: a * b };\n return { result: a / b };\n },\n});\n",
31
31
  "tsconfig.json": "{\n \"compilerOptions\": {\n \"target\": \"ES2022\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"jsx\": \"react-jsx\",\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"paths\": {\n \"@/*\": [\"./*\"]\n }\n },\n \"include\": [\"**/*.ts\", \"**/*.tsx\"],\n \"exclude\": [\"node_modules\"]\n}\n"
32
32
  }
33
33
  },
@@ -608,32 +608,32 @@ export default {
608
608
  },
609
609
  "ai-rules:agents.md": {
610
610
  "files": {
611
- "agents.md": "# Veryfront project guide\n\nThis is a Veryfront project. Veryfront is a framework for building and running AI apps and agents in TypeScript and React.\n\n## Project conventions\n\nUse these folders as runtime boundaries. Create folders only when the feature needs them.\n\n- `app/`: pages, layouts, route handlers, and user-facing API routes.\n- `agents/`: model reasoning and tool use.\n- `tools/`: deterministic callable capabilities.\n- `workflows/`: multi-step coordination.\n- `tasks/`: background work targets.\n- `prompts/`: reusable prompt templates.\n- `resources/`: project data exposed to MCP clients.\n- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `integrations/`: service connectors and integration-local code.\n\n## Developer loop\n\n1. Start local development with `veryfront dev`.\n2. Generate new files with `veryfront generate <type> <name>`.\n3. Inspect current CLI commands with `veryfront schema --json`.\n4. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n5. Run focused tests and lint before shipping.\n\n## Coding agent loop\n\nWhen the Veryfront MCP server is connected, call `vf_bootstrap` once at session start. Use `vf_get_conventions` before adding files, `vf_scaffold` for new routes and AI primitives, `vf_get_errors` after edits, and `vf_run_tests` or `vf_run_lint` for verification.\n\n`veryfront dev` starts the HTTP MCP endpoint on the app port plus 2. With the default app port, use `http://localhost:3002/mcp`.\n\nIf MCP is not connected, use `veryfront schema --json` and the documented CLI commands from the shell.\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, tasks, resources, prompts, and skills in their expected folders.\n\n## Inference\n\nAgent routes need model access. Use `veryfront login` for the Veryfront Cloud gateway, set `VERYFRONT_API_TOKEN`, or set provider keys such as `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`.\n"
611
+ "agents.md": "# Veryfront project guide\n\nThis is a Veryfront project. Veryfront is a framework for building and running AI apps and agents in TypeScript and React.\n\n## Project conventions\n\nUse these folders as runtime boundaries. Create folders only when the feature needs them.\n\n- `app/`: pages, layouts, route handlers, and user-facing API routes.\n- `agents/`: model reasoning and tool use.\n- `tools/`: deterministic callable capabilities.\n- `workflows/`: multi-step coordination.\n- `tasks/`: background work targets.\n- `prompts/`: reusable prompt templates.\n- `resources/`: project data exposed to MCP clients.\n- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `integrations/`: service connectors and integration-local code.\n\n## Developer loop\n\n1. Start local development with `veryfront dev`.\n2. Generate new files with `veryfront generate <type> <name>`.\n3. For example, add an agent with a tool and skill by running `veryfront generate agent research-agent`, `veryfront generate tool search-docs`, and `veryfront generate skill research`. Use names that match the app domain.\n4. Inspect current CLI commands with `veryfront schema --json`.\n5. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n6. Run focused tests and lint before shipping.\n\n## Coding agent loop\n\nWhen the Veryfront MCP server is connected, call `vf_bootstrap` once at session start. Use `vf_get_conventions` before adding files, `vf_scaffold` for new routes and AI primitives, `vf_get_errors` after edits, and `vf_run_tests` or `vf_run_lint` for verification.\n\n`veryfront dev` starts the HTTP MCP endpoint on the app port plus 2. With the default app port, use `http://localhost:3002/mcp`.\n\nIf MCP is not connected, use `veryfront schema --json` and the documented CLI commands from the shell.\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, tasks, resources, prompts, and skills in their expected folders.\n\n## Inference\n\nAgent routes need model access. Use `veryfront login` for the Veryfront Cloud gateway, set `VERYFRONT_API_TOKEN`, or set provider keys such as `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`.\n"
612
612
  }
613
613
  },
614
614
  "ai-rules:claude-code.md": {
615
615
  "files": {
616
- "claude-code.md": "# Veryfront project guide\n\nFollow `AGENTS.md` when it exists. If it does not exist, use this guide.\n\nThis is a Veryfront project. Veryfront is a framework for building and running AI apps and agents in TypeScript and React.\n\n## Project conventions\n\nUse these folders as runtime boundaries. Create folders only when the feature needs them.\n\n- `app/`: pages, layouts, route handlers, and user-facing API routes.\n- `agents/`: model reasoning and tool use.\n- `tools/`: deterministic callable capabilities.\n- `workflows/`: multi-step coordination.\n- `tasks/`: background work targets.\n- `prompts/`: reusable prompt templates.\n- `resources/`: project data exposed to MCP clients.\n- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `integrations/`: service connectors and integration-local code.\n\n## Developer loop\n\n1. Start local development with `veryfront dev`.\n2. Generate new files with `veryfront generate <type> <name>`.\n3. Inspect current CLI commands with `veryfront schema --json`.\n4. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n5. Run focused tests and lint before shipping.\n\n## Coding agent loop\n\nWhen the Veryfront MCP server is connected, call `vf_bootstrap` once at session start. Use `vf_get_conventions` before adding files, `vf_scaffold` for new routes and AI primitives, `vf_get_errors` after edits, and `vf_run_tests` or `vf_run_lint` for verification.\n\n`veryfront dev` starts the HTTP MCP endpoint on the app port plus 2. With the default app port, use `http://localhost:3002/mcp`.\n\nIf MCP is not connected, use `veryfront schema --json` and the documented CLI commands from the shell.\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, tasks, resources, prompts, and skills in their expected folders.\n\n## Inference\n\nAgent routes need model access. Use `veryfront login` for the Veryfront Cloud gateway, set `VERYFRONT_API_TOKEN`, or set provider keys such as `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`.\n"
616
+ "claude-code.md": "# Veryfront project guide\n\nFollow `AGENTS.md` when it exists. If it does not exist, use this guide.\n\nThis is a Veryfront project. Veryfront is a framework for building and running AI apps and agents in TypeScript and React.\n\n## Project conventions\n\nUse these folders as runtime boundaries. Create folders only when the feature needs them.\n\n- `app/`: pages, layouts, route handlers, and user-facing API routes.\n- `agents/`: model reasoning and tool use.\n- `tools/`: deterministic callable capabilities.\n- `workflows/`: multi-step coordination.\n- `tasks/`: background work targets.\n- `prompts/`: reusable prompt templates.\n- `resources/`: project data exposed to MCP clients.\n- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `integrations/`: service connectors and integration-local code.\n\n## Developer loop\n\n1. Start local development with `veryfront dev`.\n2. Generate new files with `veryfront generate <type> <name>`.\n3. For example, add an agent with a tool and skill by running `veryfront generate agent research-agent`, `veryfront generate tool search-docs`, and `veryfront generate skill research`. Use names that match the app domain.\n4. Inspect current CLI commands with `veryfront schema --json`.\n5. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n6. Run focused tests and lint before shipping.\n\n## Coding agent loop\n\nWhen the Veryfront MCP server is connected, call `vf_bootstrap` once at session start. Use `vf_get_conventions` before adding files, `vf_scaffold` for new routes and AI primitives, `vf_get_errors` after edits, and `vf_run_tests` or `vf_run_lint` for verification.\n\n`veryfront dev` starts the HTTP MCP endpoint on the app port plus 2. With the default app port, use `http://localhost:3002/mcp`.\n\nIf MCP is not connected, use `veryfront schema --json` and the documented CLI commands from the shell.\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, tasks, resources, prompts, and skills in their expected folders.\n\n## Inference\n\nAgent routes need model access. Use `veryfront login` for the Veryfront Cloud gateway, set `VERYFRONT_API_TOKEN`, or set provider keys such as `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`.\n"
617
617
  }
618
618
  },
619
619
  "ai-rules:copilot.md": {
620
620
  "files": {
621
- "copilot.md": "# Veryfront project guide\n\nFollow `AGENTS.md` when it exists. If it does not exist, use this guide.\n\nThis is a Veryfront project. Veryfront is a framework for building and running AI apps and agents in TypeScript and React.\n\n## Project conventions\n\nUse these folders as runtime boundaries. Create folders only when the feature needs them.\n\n- `app/`: pages, layouts, route handlers, and user-facing API routes.\n- `agents/`: model reasoning and tool use.\n- `tools/`: deterministic callable capabilities.\n- `workflows/`: multi-step coordination.\n- `tasks/`: background work targets.\n- `prompts/`: reusable prompt templates.\n- `resources/`: project data exposed to MCP clients.\n- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `integrations/`: service connectors and integration-local code.\n\n## Developer loop\n\n1. Start local development with `veryfront dev`.\n2. Generate new files with `veryfront generate <type> <name>`.\n3. Inspect current CLI commands with `veryfront schema --json`.\n4. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n5. Run focused tests and lint before shipping.\n\n## Coding agent loop\n\nWhen the Veryfront MCP server is connected, call `vf_bootstrap` once at session start. Use `vf_get_conventions` before adding files, `vf_scaffold` for new routes and AI primitives, `vf_get_errors` after edits, and `vf_run_tests` or `vf_run_lint` for verification.\n\n`veryfront dev` starts the HTTP MCP endpoint on the app port plus 2. With the default app port, use `http://localhost:3002/mcp`.\n\nIf MCP is not connected, use `veryfront schema --json` and the documented CLI commands from the shell.\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, tasks, resources, prompts, and skills in their expected folders.\n\n## Inference\n\nAgent routes need model access. Use `veryfront login` for the Veryfront Cloud gateway, set `VERYFRONT_API_TOKEN`, or set provider keys such as `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`.\n"
621
+ "copilot.md": "# Veryfront project guide\n\nFollow `AGENTS.md` when it exists. If it does not exist, use this guide.\n\nThis is a Veryfront project. Veryfront is a framework for building and running AI apps and agents in TypeScript and React.\n\n## Project conventions\n\nUse these folders as runtime boundaries. Create folders only when the feature needs them.\n\n- `app/`: pages, layouts, route handlers, and user-facing API routes.\n- `agents/`: model reasoning and tool use.\n- `tools/`: deterministic callable capabilities.\n- `workflows/`: multi-step coordination.\n- `tasks/`: background work targets.\n- `prompts/`: reusable prompt templates.\n- `resources/`: project data exposed to MCP clients.\n- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `integrations/`: service connectors and integration-local code.\n\n## Developer loop\n\n1. Start local development with `veryfront dev`.\n2. Generate new files with `veryfront generate <type> <name>`.\n3. For example, add an agent with a tool and skill by running `veryfront generate agent research-agent`, `veryfront generate tool search-docs`, and `veryfront generate skill research`. Use names that match the app domain.\n4. Inspect current CLI commands with `veryfront schema --json`.\n5. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n6. Run focused tests and lint before shipping.\n\n## Coding agent loop\n\nWhen the Veryfront MCP server is connected, call `vf_bootstrap` once at session start. Use `vf_get_conventions` before adding files, `vf_scaffold` for new routes and AI primitives, `vf_get_errors` after edits, and `vf_run_tests` or `vf_run_lint` for verification.\n\n`veryfront dev` starts the HTTP MCP endpoint on the app port plus 2. With the default app port, use `http://localhost:3002/mcp`.\n\nIf MCP is not connected, use `veryfront schema --json` and the documented CLI commands from the shell.\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, tasks, resources, prompts, and skills in their expected folders.\n\n## Inference\n\nAgent routes need model access. Use `veryfront login` for the Veryfront Cloud gateway, set `VERYFRONT_API_TOKEN`, or set provider keys such as `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`.\n"
622
622
  }
623
623
  },
624
624
  "ai-rules:cursor.md": {
625
625
  "files": {
626
- "cursor.md": "# Veryfront project guide\n\nFollow `AGENTS.md` when it exists. If it does not exist, use this guide.\n\nThis is a Veryfront project. Veryfront is a framework for building and running AI apps and agents in TypeScript and React.\n\n## Project conventions\n\nUse these folders as runtime boundaries. Create folders only when the feature needs them.\n\n- `app/`: pages, layouts, route handlers, and user-facing API routes.\n- `agents/`: model reasoning and tool use.\n- `tools/`: deterministic callable capabilities.\n- `workflows/`: multi-step coordination.\n- `tasks/`: background work targets.\n- `prompts/`: reusable prompt templates.\n- `resources/`: project data exposed to MCP clients.\n- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `integrations/`: service connectors and integration-local code.\n\n## Developer loop\n\n1. Start local development with `veryfront dev`.\n2. Generate new files with `veryfront generate <type> <name>`.\n3. Inspect current CLI commands with `veryfront schema --json`.\n4. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n5. Run focused tests and lint before shipping.\n\n## Coding agent loop\n\nWhen the Veryfront MCP server is connected, call `vf_bootstrap` once at session start. Use `vf_get_conventions` before adding files, `vf_scaffold` for new routes and AI primitives, `vf_get_errors` after edits, and `vf_run_tests` or `vf_run_lint` for verification.\n\n`veryfront dev` starts the HTTP MCP endpoint on the app port plus 2. With the default app port, use `http://localhost:3002/mcp`.\n\nIf MCP is not connected, use `veryfront schema --json` and the documented CLI commands from the shell.\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, tasks, resources, prompts, and skills in their expected folders.\n\n## Inference\n\nAgent routes need model access. Use `veryfront login` for the Veryfront Cloud gateway, set `VERYFRONT_API_TOKEN`, or set provider keys such as `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`.\n"
626
+ "cursor.md": "# Veryfront project guide\n\nFollow `AGENTS.md` when it exists. If it does not exist, use this guide.\n\nThis is a Veryfront project. Veryfront is a framework for building and running AI apps and agents in TypeScript and React.\n\n## Project conventions\n\nUse these folders as runtime boundaries. Create folders only when the feature needs them.\n\n- `app/`: pages, layouts, route handlers, and user-facing API routes.\n- `agents/`: model reasoning and tool use.\n- `tools/`: deterministic callable capabilities.\n- `workflows/`: multi-step coordination.\n- `tasks/`: background work targets.\n- `prompts/`: reusable prompt templates.\n- `resources/`: project data exposed to MCP clients.\n- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `integrations/`: service connectors and integration-local code.\n\n## Developer loop\n\n1. Start local development with `veryfront dev`.\n2. Generate new files with `veryfront generate <type> <name>`.\n3. For example, add an agent with a tool and skill by running `veryfront generate agent research-agent`, `veryfront generate tool search-docs`, and `veryfront generate skill research`. Use names that match the app domain.\n4. Inspect current CLI commands with `veryfront schema --json`.\n5. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n6. Run focused tests and lint before shipping.\n\n## Coding agent loop\n\nWhen the Veryfront MCP server is connected, call `vf_bootstrap` once at session start. Use `vf_get_conventions` before adding files, `vf_scaffold` for new routes and AI primitives, `vf_get_errors` after edits, and `vf_run_tests` or `vf_run_lint` for verification.\n\n`veryfront dev` starts the HTTP MCP endpoint on the app port plus 2. With the default app port, use `http://localhost:3002/mcp`.\n\nIf MCP is not connected, use `veryfront schema --json` and the documented CLI commands from the shell.\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, tasks, resources, prompts, and skills in their expected folders.\n\n## Inference\n\nAgent routes need model access. Use `veryfront login` for the Veryfront Cloud gateway, set `VERYFRONT_API_TOKEN`, or set provider keys such as `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`.\n"
627
627
  }
628
628
  },
629
629
  "ai-rules:skill.md": {
630
630
  "files": {
631
- "skill.md": "---\nname: veryfront\ndescription: Build and run AI apps and agents with Veryfront CLI\nlicense: Apache-2.0\ncompatibility: Claude Code, Cursor, VS Code, Codex, Gemini CLI\nmetadata:\n author: veryfront\n version: \"1.0\"\n---\n\n# Veryfront\n\nVeryfront is a framework for building and running AI apps and agents in TypeScript and React.\n\n## Project conventions\n\nUse these folders as runtime boundaries. Create folders only when the feature needs them.\n\n- `app/`: pages, layouts, route handlers, and user-facing API routes.\n- `agents/`: model reasoning and tool use.\n- `tools/`: deterministic callable capabilities.\n- `workflows/`: multi-step coordination.\n- `tasks/`: background work targets.\n- `prompts/`: reusable prompt templates.\n- `resources/`: project data exposed to MCP clients.\n- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `integrations/`: service connectors and integration-local code.\n\n## Developer loop\n\n1. Start local development with `veryfront dev`.\n2. Generate new files with `veryfront generate <type> <name>`.\n3. Inspect current CLI commands with `veryfront schema --json`.\n4. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n5. Run focused tests and lint before shipping.\n\n## Coding agent loop\n\nWhen the Veryfront MCP server is connected, call `vf_bootstrap` once at session start. Use `vf_get_conventions` before adding files, `vf_scaffold` for new routes and AI primitives, `vf_get_errors` after edits, and `vf_run_tests` or `vf_run_lint` for verification.\n\n`veryfront dev` starts the HTTP MCP endpoint on the app port plus 2. With the default app port, use `http://localhost:3002/mcp`.\n\nIf MCP is not connected, use `veryfront schema --json` and the documented CLI commands from the shell.\n\n## Inference\n\nAgent routes need model access. Use `veryfront login` for the Veryfront Cloud gateway, set `VERYFRONT_API_TOKEN`, or set provider keys such as `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`.\n"
631
+ "skill.md": "---\nname: veryfront\ndescription: Build and run AI apps and agents with Veryfront CLI\nlicense: Apache-2.0\ncompatibility: Claude Code, Cursor, VS Code, Codex, Gemini CLI\nmetadata:\n author: veryfront\n version: \"1.0\"\n---\n\n# Veryfront\n\nVeryfront is a framework for building and running AI apps and agents in TypeScript and React.\n\n## Project conventions\n\nUse these folders as runtime boundaries. Create folders only when the feature needs them.\n\n- `app/`: pages, layouts, route handlers, and user-facing API routes.\n- `agents/`: model reasoning and tool use.\n- `tools/`: deterministic callable capabilities.\n- `workflows/`: multi-step coordination.\n- `tasks/`: background work targets.\n- `prompts/`: reusable prompt templates.\n- `resources/`: project data exposed to MCP clients.\n- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `integrations/`: service connectors and integration-local code.\n\n## Developer loop\n\n1. Start local development with `veryfront dev`.\n2. Generate new files with `veryfront generate <type> <name>`.\n3. For example, add an agent with a tool and skill by running `veryfront generate agent research-agent`, `veryfront generate tool search-docs`, and `veryfront generate skill research`. Use names that match the app domain.\n4. Inspect current CLI commands with `veryfront schema --json`.\n5. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n6. Run focused tests and lint before shipping.\n\n## Coding agent loop\n\nWhen the Veryfront MCP server is connected, call `vf_bootstrap` once at session start. Use `vf_get_conventions` before adding files, `vf_scaffold` for new routes and AI primitives, `vf_get_errors` after edits, and `vf_run_tests` or `vf_run_lint` for verification.\n\n`veryfront dev` starts the HTTP MCP endpoint on the app port plus 2. With the default app port, use `http://localhost:3002/mcp`.\n\nIf MCP is not connected, use `veryfront schema --json` and the documented CLI commands from the shell.\n\n## Inference\n\nAgent routes need model access. Use `veryfront login` for the Veryfront Cloud gateway, set `VERYFRONT_API_TOKEN`, or set provider keys such as `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`.\n"
632
632
  }
633
633
  },
634
634
  "ai-rules:windsurf.md": {
635
635
  "files": {
636
- "windsurf.md": "# Veryfront project guide\n\nFollow `AGENTS.md` when it exists. If it does not exist, use this guide.\n\nThis is a Veryfront project. Veryfront is a framework for building and running AI apps and agents in TypeScript and React.\n\n## Project conventions\n\nUse these folders as runtime boundaries. Create folders only when the feature needs them.\n\n- `app/`: pages, layouts, route handlers, and user-facing API routes.\n- `agents/`: model reasoning and tool use.\n- `tools/`: deterministic callable capabilities.\n- `workflows/`: multi-step coordination.\n- `tasks/`: background work targets.\n- `prompts/`: reusable prompt templates.\n- `resources/`: project data exposed to MCP clients.\n- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `integrations/`: service connectors and integration-local code.\n\n## Developer loop\n\n1. Start local development with `veryfront dev`.\n2. Generate new files with `veryfront generate <type> <name>`.\n3. Inspect current CLI commands with `veryfront schema --json`.\n4. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n5. Run focused tests and lint before shipping.\n\n## Coding agent loop\n\nWhen the Veryfront MCP server is connected, call `vf_bootstrap` once at session start. Use `vf_get_conventions` before adding files, `vf_scaffold` for new routes and AI primitives, `vf_get_errors` after edits, and `vf_run_tests` or `vf_run_lint` for verification.\n\n`veryfront dev` starts the HTTP MCP endpoint on the app port plus 2. With the default app port, use `http://localhost:3002/mcp`.\n\nIf MCP is not connected, use `veryfront schema --json` and the documented CLI commands from the shell.\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, tasks, resources, prompts, and skills in their expected folders.\n\n## Inference\n\nAgent routes need model access. Use `veryfront login` for the Veryfront Cloud gateway, set `VERYFRONT_API_TOKEN`, or set provider keys such as `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`.\n"
636
+ "windsurf.md": "# Veryfront project guide\n\nFollow `AGENTS.md` when it exists. If it does not exist, use this guide.\n\nThis is a Veryfront project. Veryfront is a framework for building and running AI apps and agents in TypeScript and React.\n\n## Project conventions\n\nUse these folders as runtime boundaries. Create folders only when the feature needs them.\n\n- `app/`: pages, layouts, route handlers, and user-facing API routes.\n- `agents/`: model reasoning and tool use.\n- `tools/`: deterministic callable capabilities.\n- `workflows/`: multi-step coordination.\n- `tasks/`: background work targets.\n- `prompts/`: reusable prompt templates.\n- `resources/`: project data exposed to MCP clients.\n- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `integrations/`: service connectors and integration-local code.\n\n## Developer loop\n\n1. Start local development with `veryfront dev`.\n2. Generate new files with `veryfront generate <type> <name>`.\n3. For example, add an agent with a tool and skill by running `veryfront generate agent research-agent`, `veryfront generate tool search-docs`, and `veryfront generate skill research`. Use names that match the app domain.\n4. Inspect current CLI commands with `veryfront schema --json`.\n5. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n6. Run focused tests and lint before shipping.\n\n## Coding agent loop\n\nWhen the Veryfront MCP server is connected, call `vf_bootstrap` once at session start. Use `vf_get_conventions` before adding files, `vf_scaffold` for new routes and AI primitives, `vf_get_errors` after edits, and `vf_run_tests` or `vf_run_lint` for verification.\n\n`veryfront dev` starts the HTTP MCP endpoint on the app port plus 2. With the default app port, use `http://localhost:3002/mcp`.\n\nIf MCP is not connected, use `veryfront schema --json` and the documented CLI commands from the shell.\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, tasks, resources, prompts, and skills in their expected folders.\n\n## Inference\n\nAgent routes need model access. Use `veryfront login` for the Veryfront Cloud gateway, set `VERYFRONT_API_TOKEN`, or set provider keys such as `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`.\n"
637
637
  }
638
638
  }
639
639
  }
@@ -1,9 +1,9 @@
1
- import * as dntShim from "../../_dnt.shims.js";
2
1
  import { dirname } from "../../src/platform/compat/path/index.js";
2
+ import { getEnv, mkdir, writeTextFile } from "../../src/platform/index.js";
3
3
  import { sanitizeRunOutputForLogging } from "./sanitize-run-output.js";
4
4
  const RUN_RESULT_PATH_ENV = "VERYFRONT_RUN_RESULT_PATH";
5
5
  function getRunResultPath() {
6
- const value = dntShim.Deno.env.get(RUN_RESULT_PATH_ENV)?.trim();
6
+ const value = getEnv(RUN_RESULT_PATH_ENV)?.trim();
7
7
  return value ? value : null;
8
8
  }
9
9
  export async function writeRunResultIfConfigured(value) {
@@ -11,6 +11,6 @@ export async function writeRunResultIfConfigured(value) {
11
11
  if (!resultPath) {
12
12
  return;
13
13
  }
14
- await dntShim.Deno.mkdir(dirname(resultPath), { recursive: true });
15
- await dntShim.Deno.writeTextFile(resultPath, JSON.stringify(sanitizeRunOutputForLogging(value), null, 2));
14
+ await mkdir(dirname(resultPath), { recursive: true });
15
+ await writeTextFile(resultPath, JSON.stringify(sanitizeRunOutputForLogging(value), null, 2));
16
16
  }
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.856",
3
+ "version": "0.1.858",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -17,7 +17,7 @@ const MODEL_MAX_OUTPUT_TOKENS = {
17
17
  "google-ai-studio/gemini-3.1-flash-lite": 65_536,
18
18
  "google-ai-studio/gemini-2.5-pro": 65_536,
19
19
  "google-ai-studio/gemini-2.5-flash": 65_536,
20
- "mistral/mistral-large-2512": 131_072,
20
+ "mistral/mistral-large-2512": 1_024,
21
21
  };
22
22
  const MODEL_MAX_OUTPUT_TOKEN_ALIASES = {
23
23
  "google/gemini-3.1-pro": "google-ai-studio/gemini-3.1-pro-preview",
@@ -17,7 +17,7 @@ import { detectPlatform, getPlatformCapabilities } from "../../platform/core-pla
17
17
  import { createAgentMemory } from "../memory/index.js";
18
18
  import { serverLogger } from "../../utils/index.js";
19
19
  import { addSpanEvent, setSpanAttributes, withSpan, } from "../../observability/tracing/index.js";
20
- import { convertToTextGenerationRuntimeMessages } from "./text-generation-runtime-message-converter.js";
20
+ import { convertToTextGenerationRuntimeRequestMessages } from "./text-generation-runtime-message-converter.js";
21
21
  import { convertToolsToRuntimeTools } from "./model-tool-converter.js";
22
22
  import { getRuntimeRemoteToolSources } from "./mcp-server-tool-sources.js";
23
23
  import { createStreamState, processStream, } from "./chat-stream-handler.js";
@@ -371,7 +371,7 @@ export class AgentRuntime {
371
371
  return generateText({
372
372
  model: languageModel,
373
373
  system: currentSystemPrompt,
374
- messages: convertToTextGenerationRuntimeMessages(currentMessages),
374
+ messages: convertToTextGenerationRuntimeRequestMessages(currentMessages),
375
375
  tools: convertToolsToRuntimeTools(tools, {
376
376
  model: effectiveModel,
377
377
  providerTools,
@@ -623,7 +623,7 @@ export class AgentRuntime {
623
623
  const result = streamText({
624
624
  model: languageModel,
625
625
  system: currentSystemPrompt,
626
- messages: convertToTextGenerationRuntimeMessages(currentMessages),
626
+ messages: convertToTextGenerationRuntimeRequestMessages(currentMessages),
627
627
  tools: runtimeTools,
628
628
  experimental_repairToolCall: repairToolCall,
629
629
  maxOutputTokens: this.resolveMaxOutputTokens(effectiveModel, maxOutputTokensOverride),
@@ -18,4 +18,13 @@ export declare function convertToTextGenerationRuntimeMessage(msg: Message, opti
18
18
  * Convert an array of veryfront Messages to the current text-generation runtime message format.
19
19
  */
20
20
  export declare function convertToTextGenerationRuntimeMessages(messages: Message[]): TextGenerationRuntimeMessage[];
21
+ /**
22
+ * Convert messages for a provider request.
23
+ *
24
+ * Some providers reject assistant-prefill transcripts and require the prompt to
25
+ * end at user/tool input. Persisted runtime history may temporarily end with an
26
+ * assistant-only continuation message between streamed tool steps, so trim that
27
+ * replay-only tail at the provider boundary without changing stored history.
28
+ */
29
+ export declare function convertToTextGenerationRuntimeRequestMessages(messages: Message[]): TextGenerationRuntimeMessage[];
21
30
  //# sourceMappingURL=text-generation-runtime-message-converter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAK7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAsC,KAAK,OAAO,EAAqB,MAAM,aAAa,CAAC;AAwMlG;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,2BAA2B,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAO,GAC1D,4BAA4B,CA6F9B;AAuHD;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAyChC"}
1
+ {"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAK7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAsC,KAAK,OAAO,EAAqB,MAAM,aAAa,CAAC;AAwMlG;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,2BAA2B,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAO,GAC1D,4BAA4B,CA6F9B;AAuHD;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAyChC;AAED;;;;;;;GAOG;AACH,wBAAgB,6CAA6C,CAC3D,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAQhC"}
@@ -374,3 +374,18 @@ export function convertToTextGenerationRuntimeMessages(messages) {
374
374
  }
375
375
  return textGenerationRuntimeMessages;
376
376
  }
377
+ /**
378
+ * Convert messages for a provider request.
379
+ *
380
+ * Some providers reject assistant-prefill transcripts and require the prompt to
381
+ * end at user/tool input. Persisted runtime history may temporarily end with an
382
+ * assistant-only continuation message between streamed tool steps, so trim that
383
+ * replay-only tail at the provider boundary without changing stored history.
384
+ */
385
+ export function convertToTextGenerationRuntimeRequestMessages(messages) {
386
+ const requestMessages = convertToTextGenerationRuntimeMessages(messages);
387
+ while (requestMessages.at(-1)?.role === "assistant") {
388
+ requestMessages.pop();
389
+ }
390
+ return requestMessages;
391
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../src/src/chat/conversation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAEV,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,QAAA,MAAM,gCAAgC,eAAuD,CAAC;AAE9F,8DAA8D;AAC9D,MAAM,MAAM,gCAAgC,GAAG,oBAAoB,GAAG;IACpE,CAAC,gCAAgC,CAAC,CAAC,EAAE,MAAM,CAAC;CAC7C,CAAC;AAEF,oFAAoF;AACpF,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,GAAG,SAAS,CAEjG;AAED,6EAA6E;AAC7E,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,MAAM,GACf,oBAAoB,CAQtB;AAED,uFAAuF;AACvF,wBAAgB,gCAAgC,CAAC,CAA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B,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEhE;AAED,iDAAiD;AACjD,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAK1E;AAED,2CAA2C;AAC3C,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAoB5E;AAmdD,sDAAsD;AACtD,wBAAgB,wCAAwC,CACtD,QAAQ,EAAE,aAAa,EAAE,GACxB,oBAAoB,EAAE,CAmCxB"}
@@ -110,6 +110,7 @@ export const getApiMessageSchema = defineSchema((v) => v.object({
110
110
  createdAt: v.string(),
111
111
  updatedAt: v.string().nullable(),
112
112
  }));
113
+ const PROVIDER_NATIVE_WEB_TOOL_NAMES = new Set(["web_fetch", "web_search"]);
113
114
  /** Shared UUID pattern value. */
114
115
  export const UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\b/i;
115
116
  /** Check whether a value is a UUID. */
@@ -195,11 +196,22 @@ export function getUiToolName(part) {
195
196
  }
196
197
  return part.type.startsWith("tool-") ? part.type.replace(/^tool-/, "") : undefined;
197
198
  }
199
+ function isProviderOwnedInputAvailableTool(input) {
200
+ if (input.state !== "input-available") {
201
+ return false;
202
+ }
203
+ return input.providerExecuted === true ||
204
+ (typeof input.toolName === "string" && PROVIDER_NATIVE_WEB_TOOL_NAMES.has(input.toolName));
205
+ }
198
206
  /** Push tool parts. */
199
207
  export function pushToolParts(parts, toolName, toolCallId, state, part) {
200
208
  const input = toRecord(part.input);
201
209
  const isErroredState = state === "output-error" || state === "error" || state === "output-denied";
202
- const isProviderOwnedAvailable = part.providerExecuted === true && state === "input-available";
210
+ const isProviderOwnedAvailable = isProviderOwnedInputAvailableTool({
211
+ toolName,
212
+ state,
213
+ providerExecuted: part.providerExecuted,
214
+ });
203
215
  const hasResultState = state === "output-available" || state === "completed" ||
204
216
  isErroredState || isProviderOwnedAvailable;
205
217
  if (hasResultState) {
@@ -314,7 +326,11 @@ export function toConversationPartsFromUiMessage(message) {
314
326
  return parts.filter((part) => getMessagePartSchema().safeParse(part).success);
315
327
  }
316
328
  function isToolComplete(part) {
317
- if (part.providerExecuted === true && part.state === "input-available") {
329
+ if (isProviderOwnedInputAvailableTool({
330
+ toolName: getUiToolName(part),
331
+ state: part.state,
332
+ providerExecuted: part.providerExecuted,
333
+ })) {
318
334
  return true;
319
335
  }
320
336
  return part.state === "output-available" || part.state === "output-error" ||
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/process/command.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,gDAAgD;IAChD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA6ED;;;;;;;;;GASG;AACH,wBAAsB,UAAU,CAC9B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,aAAa,CAAC,CAsLxB"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/process/command.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,gDAAgD;IAChD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA6ED;;;;;;;;;GASG;AACH,wBAAsB,UAAU,CAC9B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,aAAa,CAAC,CAuLxB"}
@@ -1,6 +1,6 @@
1
1
  import * as dntShim from "../../../../_dnt.shims.js";
2
2
  import { dynamicImport } from "../dynamic-import.js";
3
- import { isBun as IS_BUN, isDeno as IS_DENO } from "../runtime.js";
3
+ import { getDenoRuntime, isBun as IS_BUN, isDeno as IS_DENO } from "../runtime.js";
4
4
  import { isWindowsPlatform, runtimeProcess } from "./runtime-process.js";
5
5
  const COMMAND_TIMEOUT_EXIT_CODE = 124;
6
6
  const FORCE_KILL_GRACE_MS = 250;
@@ -79,8 +79,9 @@ export async function runCommand(cmd, options = {}) {
79
79
  const effectiveTimeoutMs = timeoutMs && timeoutMs > 0 ? Math.floor(timeoutMs) : undefined;
80
80
  // Determine stdio mode: inherit > capture > null
81
81
  const stdioMode = inherit ? "inherit" : capture ? "piped" : "null";
82
- if (IS_DENO) {
83
- const command = new dntShim.Deno.Command(cmd, {
82
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
83
+ if (deno) {
84
+ const command = new deno.Command(cmd, {
84
85
  args,
85
86
  cwd: cmdCwd,
86
87
  env: cmdEnv,
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/process/env.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC,CAAC;AAoBF,oDAAoD;AACpD,wBAAgB,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmB5C;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAoB1D;AAqCD,kEAAkE;AAClE,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAWtD;AAKD,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAUD,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAC9D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;AAOpE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAC9D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;AAUpE,wBAAgB,aAAa,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D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;AAOpE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAC9D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;AAUpE,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,QAAQ,UAAQ,EAChB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAmBT;AAED,gBAAgB;AAChB,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAiBvD;AAED,6CAA6C;AAC7C,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAiB3C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,GAAG,IAAI,CAS/D"}
@@ -1,5 +1,5 @@
1
1
  import * as dntShim from "../../../../_dnt.shims.js";
2
- import { isDeno as IS_DENO } from "../runtime.js";
2
+ import { getDenoRuntime, isDeno as IS_DENO } from "../runtime.js";
3
3
  import { runtimeProcess } from "./runtime-process.js";
4
4
  function getEnvOverlayStore() {
5
5
  const storage = getEnvOverlayStorage();
@@ -15,8 +15,9 @@ function getOverlayEnvValue(store, key) {
15
15
  }
16
16
  /** Read and write process environment variables. */
17
17
  export function env() {
18
- const base = IS_DENO
19
- ? dntShim.Deno.env.toObject()
18
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
19
+ const base = deno
20
+ ? deno.env.toObject()
20
21
  : runtimeProcess
21
22
  ? { ...runtimeProcess.env }
22
23
  : {};
@@ -41,9 +42,10 @@ export function getHostEnv(key) {
41
42
  if (overlayResult.hasValue) {
42
43
  return overlayResult.value;
43
44
  }
44
- if (IS_DENO) {
45
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
46
+ if (deno) {
45
47
  try {
46
- return dntShim.Deno.env.get(key);
48
+ return deno.env.get(key);
47
49
  }
48
50
  catch {
49
51
  // Under a tightened env permission allowlist (project isolation workers),
@@ -148,8 +150,9 @@ export function setEnv(key, value) {
148
150
  overlay.set(key, value);
149
151
  return;
150
152
  }
151
- if (IS_DENO) {
152
- dntShim.Deno.env.set(key, value);
153
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
154
+ if (deno) {
155
+ deno.env.set(key, value);
153
156
  return;
154
157
  }
155
158
  if (runtimeProcess) {
@@ -165,8 +168,9 @@ export function deleteEnv(key) {
165
168
  overlay.set(key, null);
166
169
  return;
167
170
  }
168
- if (IS_DENO) {
169
- dntShim.Deno.env.delete(key);
171
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
172
+ if (deno) {
173
+ deno.env.delete(key);
170
174
  return;
171
175
  }
172
176
  if (runtimeProcess) {
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/process/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAC;AAIrD,6EAA6E;AAC7E,wBAAgB,OAAO,IAAI,MAAM,EAAE,CAIlC;AAED,yFAAyF;AACzF,wBAAgB,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAIzC;AAED,4CAA4C;AAC5C,wBAAgB,GAAG,IAAI,MAAM,CAI5B;AAED,wBAAgB,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAU7C;AAED,wBAAgB,GAAG,IAAI,MAAM,CAI5B;AAED,wBAAgB,WAAW,IAAI;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAYA;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAIvC;AAED;;GAEG;AACH,wBAAgB,W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