veryfront 0.1.927 → 0.1.929

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.
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/routes/command.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/B,OAAO,CAAC,IAAI,CAAC,CA8Cf"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/routes/command.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/B,OAAO,CAAC,IAAI,CAAC,CA4Df"}
@@ -1,38 +1,51 @@
1
- import { join } from "../../../deps/jsr.io/@std/path/1.1.4/mod.js";
1
+ import { join, relative } from "../../../deps/jsr.io/@std/path/1.1.4/mod.js";
2
2
  import { runtime } from "../../../src/platform/index.js";
3
- import { APIRouteHandler } from "../../../src/routing/index.js";
4
3
  import { getConfig } from "../../../src/config/index.js";
5
4
  import { cliLogger } from "../../utils/index.js";
6
- import { createFileSystem } from "../../../src/platform/index.js";
5
+ import { ApiRouteMatcher } from "../../../src/routing/api/api-route-matcher.js";
6
+ import { discoverAppRoutes, discoverPagesRoutes } from "../../../src/routing/api/route-discovery.js";
7
+ import { RouteDiscovery } from "../../../src/server/dev-server/route-discovery.js";
7
8
  export async function routesCommand(projectDir, options = {}) {
8
- const fs = createFileSystem();
9
9
  const adapter = await runtime.get();
10
- await getConfig(projectDir, adapter);
11
- const apiHandler = new APIRouteHandler(projectDir, adapter);
12
- await apiHandler.initialize();
13
- const pages = [];
14
- const pagesDir = join(projectDir, "pages");
10
+ const config = await getConfig(projectDir, adapter);
11
+ const pageRouter = new ApiRouteMatcher();
12
+ let pageRoutes = [];
15
13
  try {
16
- const entries = fs.readDir(pagesDir);
17
- for await (const entry of entries) {
18
- if (!entry.isFile)
19
- continue;
20
- if (!entry.name.endsWith(".mdx") && !entry.name.endsWith(".tsx"))
21
- continue;
22
- const slug = entry.name.replace(/\.(mdx|tsx)$/i, "");
23
- const path = slug === "index" ? "/" : `/${slug}`;
24
- pages.push({ pattern: path, file: `pages/${entry.name}` });
25
- }
14
+ await new RouteDiscovery(projectDir, adapter, pageRouter, config).discoverRoutes();
15
+ pageRoutes = pageRouter.listRoutes();
26
16
  }
27
- catch (error) {
28
- // Pages directory might not exist, which is okay for app router projects
29
- cliLogger.debug("Could not read pages directory:", error);
17
+ finally {
18
+ pageRouter.destroy();
30
19
  }
31
- const apis = [];
32
- const apiDir = join(projectDir, "pages", "api");
33
- if (await fs.exists(apiDir)) {
34
- await collectApiPatterns(fs, apiDir, "/api", apis);
20
+ const pages = pageRoutes
21
+ .map((route) => ({
22
+ pattern: route.pattern,
23
+ file: toProjectRelativePath(projectDir, route.page),
24
+ }))
25
+ .sort((a, b) => a.pattern.localeCompare(b.pattern));
26
+ const apiRouter = new ApiRouteMatcher();
27
+ let apiRoutes = [];
28
+ try {
29
+ const pagesDir = config.directories?.pages ?? "pages";
30
+ const apiDir = join(projectDir, pagesDir, "api");
31
+ if (await adapter.fs.exists(apiDir)) {
32
+ await discoverPagesRoutes(apiRouter, apiDir, "/api", adapter);
33
+ }
34
+ const appDir = join(projectDir, config.directories?.app ?? "app");
35
+ if (await adapter.fs.exists(appDir)) {
36
+ await discoverAppRoutes(apiRouter, appDir, "", adapter);
37
+ }
38
+ apiRoutes = apiRouter.listRoutes();
35
39
  }
40
+ finally {
41
+ apiRouter.destroy();
42
+ }
43
+ const apis = apiRoutes
44
+ .map((route) => ({
45
+ pattern: route.pattern,
46
+ file: toProjectRelativePath(projectDir, route.page),
47
+ }))
48
+ .sort((a, b) => a.pattern.localeCompare(b.pattern));
36
49
  if (options.json) {
37
50
  console.log(JSON.stringify({ pages, apis }, null, 2));
38
51
  return;
@@ -43,22 +56,9 @@ export async function routesCommand(projectDir, options = {}) {
43
56
  }
44
57
  cliLogger.info("\nAPI:");
45
58
  for (const a of apis) {
46
- cliLogger.info(` ${a}`);
59
+ cliLogger.info(` ${a.pattern} -> ${a.file}`);
47
60
  }
48
61
  }
49
- async function collectApiPatterns(fs, dir, prefix, out) {
50
- const entries = fs.readDir(dir);
51
- for await (const entry of entries) {
52
- const fullPath = join(dir, entry.name);
53
- if (entry.isDirectory) {
54
- await collectApiPatterns(fs, fullPath, `${prefix}/${entry.name}`, out);
55
- continue;
56
- }
57
- if (!entry.isFile || !/\.(ts|js|tsx|jsx)$/i.test(entry.name))
58
- continue;
59
- const nameWithoutExt = entry.name.replace(/\.(ts|js|tsx|jsx)$/i, "");
60
- const routePath = `${prefix}/${nameWithoutExt}`;
61
- const pattern = routePath.replace(/\/index$/, "");
62
- out.push(pattern);
63
- }
62
+ function toProjectRelativePath(projectDir, path) {
63
+ return path.startsWith(projectDir) ? relative(projectDir, path) : path;
64
64
  }
@@ -611,32 +611,32 @@ export default {
611
611
  },
612
612
  "ai-rules:agents.md": {
613
613
  "files": {
614
- "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"
614
+ "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- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `veryfront.config.ts`: project metadata and router configuration.\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. Verify discovered routes with `veryfront routes`.\n5. Run focused tests and builds before shipping.\n6. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n\n## Coding agent loop\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, 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"
615
615
  }
616
616
  },
617
617
  "ai-rules:claude-code.md": {
618
618
  "files": {
619
- "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"
619
+ "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- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `veryfront.config.ts`: project metadata and router configuration.\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. Verify discovered routes with `veryfront routes`.\n5. Run focused tests and builds before shipping.\n6. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n\n## Coding agent loop\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, 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"
620
620
  }
621
621
  },
622
622
  "ai-rules:copilot.md": {
623
623
  "files": {
624
- "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"
624
+ "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- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `veryfront.config.ts`: project metadata and router configuration.\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. Verify discovered routes with `veryfront routes`.\n5. Run focused tests and builds before shipping.\n6. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n\n## Coding agent loop\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, 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"
625
625
  }
626
626
  },
627
627
  "ai-rules:cursor.md": {
628
628
  "files": {
629
- "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"
629
+ "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- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `veryfront.config.ts`: project metadata and router configuration.\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. Verify discovered routes with `veryfront routes`.\n5. Run focused tests and builds before shipping.\n6. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n\n## Coding agent loop\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, 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"
630
630
  }
631
631
  },
632
632
  "ai-rules:skill.md": {
633
633
  "files": {
634
- "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"
634
+ "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- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `veryfront.config.ts`: project metadata and router configuration.\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. Verify discovered routes with `veryfront routes`.\n5. Run focused tests and builds before shipping.\n6. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n\n## Coding agent loop\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, 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"
635
635
  }
636
636
  },
637
637
  "ai-rules:windsurf.md": {
638
638
  "files": {
639
- "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"
639
+ "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- `skills/`: reusable agent instructions in `skills/<id>/SKILL.md`.\n- `veryfront.config.ts`: project metadata and router configuration.\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. Verify discovered routes with `veryfront routes`.\n5. Run focused tests and builds before shipping.\n6. Use https://veryfront.com/docs when local files and CLI schema do not answer a Veryfront API or convention question.\n\n## Coding agent loop\n\nPrefer Veryfront scaffold tools over hand-written boilerplate. Keep app routes, agents, tools, workflows, 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"
640
640
  }
641
641
  }
642
642
  }
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.927",
3
+ "version": "0.1.929",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -1 +1 @@
1
- {"version":3,"file":"output-generator.d.ts","sourceRoot":"","sources":["../../../../../src/src/build/production-build/build/output-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAe1F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAEvF,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,cAAc,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,KAAK,EAAE,UAAU,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACpD;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,IAAI,CAAC,CAwBf;AAED;;GAEG;AACH,wBAAsB,gCAAgC,CACpD,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAgCf;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,IAAI,CAAC,CAGf;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAEhD;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBvF"}
1
+ {"version":3,"file":"output-generator.d.ts","sourceRoot":"","sources":["../../../../../src/src/build/production-build/build/output-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAe1F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAEvF,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,cAAc,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,KAAK,EAAE,UAAU,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACpD;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,IAAI,CAAC,CAgCf;AAWD;;GAEG;AACH,wBAAsB,gCAAgC,CACpD,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAgCf;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,IAAI,CAAC,CAGf;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAEhD;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBvF"}
@@ -9,7 +9,7 @@
9
9
  * - Static asset copying
10
10
  */
11
11
  import { serverLogger as logger } from "../../../utils/index.js";
12
- import { join } from "../../../platform/compat/path/index.js";
12
+ import { dirname, join } from "../../../platform/compat/path/index.js";
13
13
  import { generateServiceWorker } from "../../../server/build-service-worker.js";
14
14
  import { generateProdHydrationModule, getProdHydrationModulePath, } from "../../../html/hydration-script-builder/prod-scripts.js";
15
15
  import { copyStaticAssets } from "../asset-generation.js";
@@ -23,13 +23,17 @@ export async function generateClientScripts(adapter, outputDir, dryRun) {
23
23
  logger.info("Copying client scripts...");
24
24
  if (dryRun)
25
25
  return;
26
- await adapter.fs.writeFile(join(outputDir, "_veryfront/app.js"), generateAppModule());
27
- await adapter.fs.writeFile(join(outputDir, "_veryfront/client.js"), await generateClientModule());
28
- await adapter.fs.writeFile(join(outputDir, "_veryfront/router.js"), await generateRouterScript(adapter));
29
- await adapter.fs.writeFile(join(outputDir, "_veryfront/prefetch.js"), await generatePrefetchScript(adapter));
26
+ await writeOutputFile(adapter, join(outputDir, "_veryfront/app.js"), generateAppModule());
27
+ await writeOutputFile(adapter, join(outputDir, "_veryfront/client.js"), await generateClientModule());
28
+ await writeOutputFile(adapter, join(outputDir, "_veryfront/router.js"), await generateRouterScript(adapter));
29
+ await writeOutputFile(adapter, join(outputDir, "_veryfront/prefetch.js"), await generatePrefetchScript(adapter));
30
30
  const hydrationRuntime = generateProdHydrationModule();
31
- await adapter.fs.writeFile(join(outputDir, "_veryfront/hydration-runtime.js"), hydrationRuntime);
32
- await adapter.fs.writeFile(join(outputDir, getProdHydrationModulePath().slice(1)), hydrationRuntime);
31
+ await writeOutputFile(adapter, join(outputDir, "_veryfront/hydration-runtime.js"), hydrationRuntime);
32
+ await writeOutputFile(adapter, join(outputDir, getProdHydrationModulePath().slice(1)), hydrationRuntime);
33
+ }
34
+ async function writeOutputFile(adapter, path, content) {
35
+ await adapter.fs.mkdir(dirname(path), { recursive: true });
36
+ await adapter.fs.writeFile(path, content);
33
37
  }
34
38
  /**
35
39
  * Generate manifest and service worker
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.927";
2
+ export declare const VERSION = "0.1.929";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.927";
4
+ export const VERSION = "0.1.929";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.927",
3
+ "version": "0.1.929",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",