veryfront 0.0.104 → 0.0.111

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 (154) hide show
  1. package/README.md +110 -3
  2. package/esm/_dnt.shims.d.ts +14 -14
  3. package/esm/_dnt.shims.d.ts.map +1 -1
  4. package/esm/deno.d.ts +1 -0
  5. package/esm/deno.js +2 -1
  6. package/esm/src/cli/app/index.d.ts.map +1 -1
  7. package/esm/src/cli/app/index.js +5 -0
  8. package/esm/src/cli/commands/init/config-generator.js +1 -1
  9. package/esm/src/cli/commands/install/types.d.ts +2 -2
  10. package/esm/src/cli/index/command-router.d.ts.map +1 -1
  11. package/esm/src/cli/index/command-router.js +8 -3
  12. package/esm/src/cli/mcp/advanced-tools.d.ts +2 -2
  13. package/esm/src/cli/mcp/dev-server-client.d.ts +35 -0
  14. package/esm/src/cli/mcp/dev-server-client.d.ts.map +1 -0
  15. package/esm/src/cli/mcp/dev-server-client.js +80 -0
  16. package/esm/src/cli/mcp/standalone.d.ts +28 -0
  17. package/esm/src/cli/mcp/standalone.d.ts.map +1 -0
  18. package/esm/src/cli/mcp/standalone.js +303 -0
  19. package/esm/src/cli/mcp/tools.d.ts +2 -2
  20. package/esm/src/cli/templates/manifest.d.ts +449 -449
  21. package/esm/src/cli/templates/manifest.js +480 -480
  22. package/esm/src/errors/catalog/module-errors.d.ts.map +1 -1
  23. package/esm/src/errors/catalog/module-errors.js +19 -0
  24. package/esm/src/errors/error-codes.d.ts +1 -0
  25. package/esm/src/errors/error-codes.d.ts.map +1 -1
  26. package/esm/src/errors/error-codes.js +4 -0
  27. package/esm/src/middleware/builtin/logger.d.ts.map +1 -1
  28. package/esm/src/middleware/builtin/logger.js +29 -7
  29. package/esm/src/modules/react-loader/component-loader.d.ts.map +1 -1
  30. package/esm/src/modules/react-loader/component-loader.js +1 -0
  31. package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
  32. package/esm/src/modules/react-loader/ssr-module-loader/loader.js +6 -4
  33. package/esm/src/modules/react-loader/ssr-module-loader/types.d.ts +2 -0
  34. package/esm/src/modules/react-loader/ssr-module-loader/types.d.ts.map +1 -1
  35. package/esm/src/modules/react-loader/types.d.ts +2 -0
  36. package/esm/src/modules/react-loader/types.d.ts.map +1 -1
  37. package/esm/src/platform/adapters/fs/factory.d.ts.map +1 -1
  38. package/esm/src/platform/adapters/fs/factory.js +1 -2
  39. package/esm/src/platform/adapters/fs/veryfront/adapter.d.ts.map +1 -1
  40. package/esm/src/platform/adapters/fs/veryfront/adapter.js +2 -6
  41. package/esm/src/platform/adapters/fs/veryfront/proxy-manager.d.ts.map +1 -1
  42. package/esm/src/platform/adapters/fs/veryfront/proxy-manager.js +1 -2
  43. package/esm/src/platform/compat/path-helper.d.ts +7 -7
  44. package/esm/src/platform/compat/path-helper.d.ts.map +1 -1
  45. package/esm/src/react/components/ai/agent-card.d.ts +1 -1
  46. package/esm/src/react/components/ai/agent-card.d.ts.map +1 -1
  47. package/esm/src/react/components/ai/chat/composition/api.d.ts +4 -5
  48. package/esm/src/react/components/ai/chat/composition/api.d.ts.map +1 -1
  49. package/esm/src/react/components/ai/chat/index.d.ts +2 -7
  50. package/esm/src/react/components/ai/chat/index.d.ts.map +1 -1
  51. package/esm/src/react/components/ai/message.d.ts +2 -2
  52. package/esm/src/react/components/ai/message.d.ts.map +1 -1
  53. package/esm/src/react/primitives/agent-primitives.d.ts +3 -3
  54. package/esm/src/react/primitives/agent-primitives.d.ts.map +1 -1
  55. package/esm/src/react/primitives/chat-container.d.ts +1 -1
  56. package/esm/src/react/primitives/chat-container.d.ts.map +1 -1
  57. package/esm/src/react/primitives/input-box.d.ts +3 -3
  58. package/esm/src/react/primitives/input-box.d.ts.map +1 -1
  59. package/esm/src/react/primitives/message-list.d.ts +4 -4
  60. package/esm/src/react/primitives/message-list.d.ts.map +1 -1
  61. package/esm/src/react/primitives/tool-primitives.d.ts +3 -3
  62. package/esm/src/react/primitives/tool-primitives.d.ts.map +1 -1
  63. package/esm/src/rendering/component-handling.d.ts.map +1 -1
  64. package/esm/src/rendering/component-handling.js +14 -0
  65. package/esm/src/rendering/layouts/layout-applicator.d.ts.map +1 -1
  66. package/esm/src/rendering/layouts/layout-applicator.js +4 -1
  67. package/esm/src/rendering/layouts/layout-collector.d.ts +31 -0
  68. package/esm/src/rendering/layouts/layout-collector.d.ts.map +1 -1
  69. package/esm/src/rendering/layouts/layout-collector.js +88 -58
  70. package/esm/src/rendering/layouts/utils/applicator.d.ts +1 -1
  71. package/esm/src/rendering/layouts/utils/applicator.d.ts.map +1 -1
  72. package/esm/src/rendering/layouts/utils/applicator.js +3 -3
  73. package/esm/src/rendering/layouts/utils/component-loader.d.ts +2 -2
  74. package/esm/src/rendering/layouts/utils/component-loader.d.ts.map +1 -1
  75. package/esm/src/rendering/layouts/utils/component-loader.js +9 -4
  76. package/esm/src/rendering/orchestrator/layout.d.ts.map +1 -1
  77. package/esm/src/rendering/orchestrator/layout.js +1 -1
  78. package/esm/src/rendering/renderer.d.ts.map +1 -1
  79. package/esm/src/rendering/renderer.js +52 -0
  80. package/esm/src/rendering/ssr-globals/context.d.ts +20 -6
  81. package/esm/src/rendering/ssr-globals/context.d.ts.map +1 -1
  82. package/esm/src/rendering/ssr-globals/context.js +25 -0
  83. package/esm/src/server/context/cache-invalidation.d.ts.map +1 -1
  84. package/esm/src/server/context/cache-invalidation.js +9 -10
  85. package/esm/src/server/dev-server/request-handler.d.ts +1 -0
  86. package/esm/src/server/dev-server/request-handler.d.ts.map +1 -1
  87. package/esm/src/server/dev-server/request-handler.js +21 -3
  88. package/esm/src/server/handlers/dev/dashboard/api.d.ts.map +1 -1
  89. package/esm/src/server/handlers/dev/dashboard/api.js +68 -0
  90. package/esm/src/server/handlers/request/ssr/ssr-handler.d.ts.map +1 -1
  91. package/esm/src/server/handlers/request/ssr/ssr-handler.js +3 -0
  92. package/esm/src/server/universal-handler/request-tracker.d.ts.map +1 -1
  93. package/esm/src/server/universal-handler/request-tracker.js +9 -24
  94. package/esm/src/transforms/esm/http-cache.d.ts.map +1 -1
  95. package/esm/src/transforms/esm/http-cache.js +147 -38
  96. package/esm/src/transforms/esm/package-registry.d.ts +3 -1
  97. package/esm/src/transforms/esm/package-registry.d.ts.map +1 -1
  98. package/esm/src/transforms/esm/package-registry.js +5 -2
  99. package/esm/src/transforms/mdx/esm-module-loader/cache/index.d.ts +1 -1
  100. package/esm/src/transforms/mdx/esm-module-loader/cache/index.d.ts.map +1 -1
  101. package/esm/src/transforms/mdx/esm-module-loader/cache/index.js +44 -10
  102. package/esm/src/transforms/mdx/esm-module-loader/loader.d.ts.map +1 -1
  103. package/esm/src/transforms/mdx/esm-module-loader/loader.js +13 -1
  104. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.d.ts +2 -0
  105. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.d.ts.map +1 -1
  106. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.js +161 -36
  107. package/esm/src/transforms/mdx/esm-module-loader/types.d.ts +3 -0
  108. package/esm/src/transforms/mdx/esm-module-loader/types.d.ts.map +1 -1
  109. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts.map +1 -1
  110. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.js +28 -5
  111. package/esm/src/transforms/pipeline/stages/compile.d.ts.map +1 -1
  112. package/esm/src/transforms/pipeline/stages/compile.js +3 -0
  113. package/esm/src/utils/perf-timer.d.ts.map +1 -1
  114. package/esm/src/utils/perf-timer.js +22 -13
  115. package/package.json +1 -1
  116. package/src/deno.js +2 -1
  117. package/src/src/cli/app/index.ts +6 -0
  118. package/src/src/cli/commands/init/config-generator.ts +1 -1
  119. package/src/src/cli/index/command-router.ts +8 -3
  120. package/src/src/cli/mcp/dev-server-client.ts +96 -0
  121. package/src/src/cli/mcp/standalone.ts +362 -0
  122. package/src/src/cli/templates/manifest.js +480 -480
  123. package/src/src/errors/catalog/module-errors.ts +20 -0
  124. package/src/src/errors/error-codes.ts +4 -0
  125. package/src/src/middleware/builtin/logger.ts +32 -7
  126. package/src/src/modules/react-loader/component-loader.ts +1 -0
  127. package/src/src/modules/react-loader/ssr-module-loader/loader.ts +6 -4
  128. package/src/src/modules/react-loader/ssr-module-loader/types.ts +2 -0
  129. package/src/src/modules/react-loader/types.ts +2 -0
  130. package/src/src/platform/adapters/fs/factory.ts +1 -2
  131. package/src/src/platform/adapters/fs/veryfront/adapter.ts +2 -4
  132. package/src/src/platform/adapters/fs/veryfront/proxy-manager.ts +1 -5
  133. package/src/src/rendering/component-handling.ts +14 -0
  134. package/src/src/rendering/layouts/layout-applicator.ts +5 -1
  135. package/src/src/rendering/layouts/layout-collector.ts +127 -61
  136. package/src/src/rendering/layouts/utils/applicator.ts +3 -1
  137. package/src/src/rendering/layouts/utils/component-loader.ts +9 -1
  138. package/src/src/rendering/orchestrator/layout.ts +1 -0
  139. package/src/src/rendering/renderer.ts +60 -0
  140. package/src/src/rendering/ssr-globals/context.ts +25 -0
  141. package/src/src/server/context/cache-invalidation.ts +14 -15
  142. package/src/src/server/dev-server/request-handler.ts +33 -4
  143. package/src/src/server/handlers/dev/dashboard/api.ts +76 -0
  144. package/src/src/server/handlers/request/ssr/ssr-handler.ts +7 -0
  145. package/src/src/server/universal-handler/request-tracker.ts +9 -35
  146. package/src/src/transforms/esm/http-cache.ts +161 -40
  147. package/src/src/transforms/esm/package-registry.ts +7 -3
  148. package/src/src/transforms/mdx/esm-module-loader/cache/index.ts +50 -13
  149. package/src/src/transforms/mdx/esm-module-loader/loader.ts +15 -1
  150. package/src/src/transforms/mdx/esm-module-loader/module-fetcher/index.ts +174 -34
  151. package/src/src/transforms/mdx/esm-module-loader/types.ts +3 -0
  152. package/src/src/transforms/mdx/esm-module-loader/utils/stub-module.ts +36 -6
  153. package/src/src/transforms/pipeline/stages/compile.ts +4 -0
  154. package/src/src/utils/perf-timer.ts +22 -16
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Veryfront Code
2
2
 
3
- The simplest way to build AI-powered apps.
3
+ The simplest way to build AI-powered apps. One command. Zero config. Just build.
4
4
 
5
5
  ```bash
6
6
  npx veryfront
@@ -20,6 +20,113 @@ npx veryfront
20
20
  ╰──────────────────────────────────────────────────────────╯
21
21
  ```
22
22
 
23
- One command. Zero config. Just build.
23
+ ## Terminal UI
24
+
25
+ The interactive TUI gives you full control from your terminal.
26
+
27
+ <details>
28
+ <summary>Keyboard Shortcuts</summary>
29
+
30
+ | Key | Action |
31
+ |-----|--------|
32
+ | `↑` `↓` | Navigate projects |
33
+ | `enter` | Open selected project |
34
+ | `o` | Open in browser |
35
+ | `s` | Open in Studio |
36
+ | `i` | Open in IDE |
37
+ | `n` | Create new project |
38
+ | `l` | Toggle logs |
39
+ | `j` `k` | Scroll logs |
40
+ | `?` | Show all shortcuts |
41
+ | `q` | Quit |
42
+
43
+ **When logged in:**
44
+
45
+ | Key | Action |
46
+ |-----|--------|
47
+ | `p` | Pull remote project |
48
+ | `u` | Push to remote |
49
+ | `a` | Login |
50
+ | `x` | Logout |
51
+
52
+ </details>
53
+
54
+ ## Connect Your Coding Agent
55
+
56
+ Veryfront exposes an MCP server that gives AI coding agents access to live dev server state—errors, logs, and HMR triggers.
57
+
58
+ ### Claude Code
59
+
60
+ <details>
61
+ <summary>Option 1: Install the plugin</summary>
62
+
63
+ ```bash
64
+ /plugin install veryfront@veryfront/claude-plugins
65
+ ```
66
+
67
+ </details>
68
+
69
+ <details>
70
+ <summary>Option 2: Manual configuration</summary>
71
+
72
+ Add to your `.mcp.json`:
73
+
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "veryfront": {
78
+ "command": "veryfront",
79
+ "args": ["mcp"]
80
+ }
81
+ }
82
+ }
83
+ ```
84
+
85
+ </details>
86
+
87
+ ### Codex CLI
88
+
89
+ <details>
90
+ <summary>Configuration</summary>
91
+
92
+ Add to `~/.codex/config.toml`:
93
+
94
+ ```toml
95
+ [mcp_servers.veryfront]
96
+ command = "veryfront"
97
+ args = ["mcp"]
98
+ ```
99
+
100
+ </details>
101
+
102
+ ### Gemini CLI
103
+
104
+ <details>
105
+ <summary>Configuration</summary>
106
+
107
+ Add to `~/.gemini/settings.json`:
108
+
109
+ ```json
110
+ {
111
+ "mcpServers": {
112
+ "veryfront": {
113
+ "command": "veryfront",
114
+ "args": ["mcp"]
115
+ }
116
+ }
117
+ }
118
+ ```
119
+
120
+ </details>
121
+
122
+ ### Available Tools
123
+
124
+ Once connected, your agent gets access to:
125
+
126
+ | Tool | Description |
127
+ |------|-------------|
128
+ | `vf_get_errors` | Live compile, runtime, and bundle errors |
129
+ | `vf_get_logs` | Recent server logs with filtering |
130
+ | `vf_get_status` | Dev server status and stats |
131
+ | `vf_trigger_hmr` | Trigger hot module reload |
24
132
 
25
- [Docs](https://veryfront.com/docs/framework) · [Discord](https://discord.gg/veryfront) · [X](https://x.com/veryfrontdev) · MIT
@@ -1,23 +1,23 @@
1
- import { Deno } from "@deno/shim-deno";
2
1
  export { Deno } from "@deno/shim-deno";
3
2
  import { Blob } from "buffer";
4
3
  export { Blob } from "buffer";
5
4
  export { crypto, type Crypto, type SubtleCrypto, type AlgorithmIdentifier, type Algorithm, type RsaOaepParams, type BufferSource, type AesCtrParams, type AesCbcParams, type AesGcmParams, type CryptoKey, type KeyAlgorithm, type KeyType, type KeyUsage, type EcdhKeyDeriveParams, type HkdfParams, type HashAlgorithmIdentifier, type Pbkdf2Params, type AesDerivedKeyParams, type HmacImportParams, type JsonWebKey, type RsaOtherPrimesInfo, type KeyFormat, type RsaHashedKeyGenParams, type RsaKeyGenParams, type BigInteger, type EcKeyGenParams, type NamedCurve, type CryptoKeyPair, type AesKeyGenParams, type HmacKeyGenParams, type RsaHashedImportParams, type EcKeyImportParams, type AesKeyAlgorithm, type RsaPssParams, type EcdsaParams } from "@deno/shim-crypto";
6
- import { setInterval, setTimeout } from "@deno/shim-timers";
7
5
  export { setInterval, setTimeout } from "@deno/shim-timers";
8
- import { fetch, File, FormData, Headers, Request, Response } from "undici";
9
6
  export { fetch, File, FormData, Headers, Request, Response, type BodyInit, type HeadersInit, type ReferrerPolicy, type RequestInit, type RequestCache, type RequestMode, type RequestRedirect, type ResponseInit } from "undici";
10
7
  export declare const dntGlobalThis: Omit<typeof globalThis, "fetch" | "setInterval" | "setTimeout" | "Blob" | "File" | "FormData" | "Headers" | "Request" | "Response" | "crypto" | "Deno"> & {
11
- Deno: typeof Deno;
12
- Blob: typeof Blob;
13
- crypto: import("@deno/shim-crypto").Crypto;
14
- setInterval: typeof setInterval;
15
- setTimeout: typeof setTimeout;
16
- fetch: typeof fetch;
17
- File: typeof File;
18
- FormData: typeof FormData;
19
- Headers: typeof Headers;
20
- Request: typeof Request;
21
- Response: typeof Response;
8
+ Deno: any;
9
+ Blob: {
10
+ new (blobParts?: import("node:buffer").BlobPart[], options?: import("node:buffer").BlobPropertyBag): Blob;
11
+ prototype: Blob;
12
+ };
13
+ crypto: any;
14
+ setInterval: any;
15
+ setTimeout: any;
16
+ fetch: any;
17
+ File: any;
18
+ FormData: any;
19
+ Headers: any;
20
+ Request: any;
21
+ Response: any;
22
22
  };
23
23
  //# sourceMappingURL=_dnt.shims.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_dnt.shims.d.ts","sourceRoot":"","sources":["../src/_dnt.shims.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,E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:circular": string;
286
286
  cli: string;
287
+ mcp: string;
287
288
  "batch:estimate": string;
288
289
  "batch:prepare": string;
289
290
  "batch:submit": string;
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.0.104",
3
+ "version": "0.0.111",
4
4
  "nodeModulesDir": "auto",
5
5
  "exclude": [
6
6
  "npm/",
@@ -302,6 +302,7 @@ export default {
302
302
  "test:e2e": "npx playwright test --config=tests/e2e/playwright.config.ts",
303
303
  "check:circular": "deno run -A jsr:@cunarist/deno-circular-deps src/index.ts",
304
304
  "cli": "deno run --allow-all src/cli/main.ts",
305
+ "mcp": "deno run --allow-all src/cli/main.ts mcp",
305
306
  "batch:estimate": "deno run -A scripts/batch-simplify/batch-simplify.ts estimate",
306
307
  "batch:prepare": "deno run -A scripts/batch-simplify/batch-simplify.ts prepare",
307
308
  "batch:submit": "deno run -A scripts/batch-simplify/batch-simplify.ts submit",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/cli/app/index.ts"],"names":[],"mappings":"AAsCA,OAAO,EAEL,KAAK,QAAQ,EAcb,KAAK,YAAY,EAQlB,MAAM,YAAY,CAAC;AASpB,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,GAAG;IAClB,oBAAoB;IACpB,KAAK,IAAI,IAAI,CAAC;IACd,wCAAwC;IACxC,IAAI,IAAI,IAAI,CAAC;IACb,mBAAmB;IACnB,MAAM,CAAC,OAAO,EAAE,Y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;IAClB,oBAAoB;IACpB,KAAK,IAAI,IAAI,CAAC;IACd,wCAAwC;IACxC,IAAI,IAAI,IAAI,CAAC;IACb,mBAAmB;IACnB,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;IACpC,wBAAwB;IACxB,QAAQ,IAAI,QAAQ,CAAC;IACrB,8BAA8B;IAC9B,MAAM,IAAI,IAAI,CAAC;IACf,uBAAuB;IACvB,cAAc,IAAI,IAAI,CAAC;IACvB,mBAAmB;IACnB,QAAQ,IAAI,IAAI,CAAC;IACjB,mBAAmB;IACnB,WAAW,IAAI,IAAI,CAAC;IACpB,uCAAuC;IACvC,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvE,qDAAqD;IACrD,gBAAgB,IAAI,MAAM,IAAI,CAAC;CAChC;AAuMD;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,GAAG,CAsnChD;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BhE;AAED,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,6BAA6B,CAAC"}
@@ -26,6 +26,7 @@ import { openBrowser } from "../auth/browser.js";
26
26
  import { fetchRemoteProjects } from "../sync/index.js";
27
27
  import { pullCommand } from "../commands/pull.js";
28
28
  import { pushCommand } from "../commands/push.js";
29
+ import { getLogBuffer } from "../mcp/log-buffer.js";
29
30
  async function copyDirectory(src, dest) {
30
31
  const fs = await import("../../platform/compat/fs.js");
31
32
  const pathMod = await import("../../platform/compat/path/index.js");
@@ -1200,6 +1201,9 @@ export function createApp(config) {
1200
1201
  // Regex to strip ANSI escape codes (ESC [ ... m)
1201
1202
  // deno-lint-ignore no-control-regex
1202
1203
  const ansiPattern = /\x1b\[[0-9;]*m/g;
1204
+ // Feed LogBuffer so the Dashboard API (/_dev/api/live-logs) can serve entries
1205
+ // to the standalone MCP process
1206
+ const logBuffer = getLogBuffer();
1203
1207
  const capture = (level) => (...args) => {
1204
1208
  const msg = args
1205
1209
  .map((a) => (typeof a === "string" ? a : JSON.stringify(a)))
@@ -1208,6 +1212,7 @@ export function createApp(config) {
1208
1212
  if (msg.trim()) {
1209
1213
  const meta = parseRequestLog(msg);
1210
1214
  state = addLog(level, msg, meta)(state);
1215
+ logBuffer.append({ level, message: msg, source: "console" });
1211
1216
  render();
1212
1217
  }
1213
1218
  };
@@ -14,7 +14,7 @@ export async function createPackageJson(projectDir, projectName) {
14
14
  dependencies: {
15
15
  react: "^19.0.0",
16
16
  "react-dom": "^19.0.0",
17
- veryfront: "^0.0.97",
17
+ veryfront: "^0.0.104",
18
18
  zod: "^3.24.0",
19
19
  },
20
20
  };
@@ -10,14 +10,14 @@ export declare const AIToolSchema: z.ZodObject<{
10
10
  }, "strip", z.ZodTypeAny, {
11
11
  file: string;
12
12
  description: string;
13
- id: "cursor" | "claude-code" | "skill" | "copilot" | "windsurf" | "agents";
14
13
  label: string;
14
+ id: "cursor" | "claude-code" | "skill" | "copilot" | "windsurf" | "agents";
15
15
  template: string;
16
16
  }, {
17
17
  file: string;
18
18
  description: string;
19
- id: "cursor" | "claude-code" | "skill" | "copilot" | "windsurf" | "agents";
20
19
  label: string;
20
+ id: "cursor" | "claude-code" | "skill" | "copilot" | "windsurf" | "agents";
21
21
  template: string;
22
22
  }>;
23
23
  export type AITool = z.infer<typeof AIToolSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"command-router.d.ts","sourceRoot":"","sources":["../../../../src/src/cli/index/command-router.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAwCH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAsD7C;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAyYlE"}
1
+ {"version":3,"file":"command-router.d.ts","sourceRoot":"","sources":["../../../../src/src/cli/index/command-router.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAwCH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAsD7C;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA8YlE"}
@@ -386,10 +386,15 @@ export async function routeCommand(args) {
386
386
  break;
387
387
  }
388
388
  case "mcp": {
389
- const { createMCPServer } = await import("../mcp/server.js");
390
- const mcpServer = await createMCPServer({ stdio: true });
389
+ // args.port defaults to DEFAULT_PORT (3000) from the CLI parser.
390
+ // The standalone MCP targets the dev server at 8080. Only override
391
+ // if the user explicitly passed --port.
392
+ const { DEFAULT_PORT } = await import("../../config/defaults.js");
393
+ const port = args.port !== DEFAULT_PORT ? Number(args.port) : undefined;
394
+ const { createStandaloneMCPServer } = await import("../mcp/standalone.js");
395
+ const mcpServer = createStandaloneMCPServer({ port });
391
396
  await new Promise(() => { });
392
- await mcpServer.stop();
397
+ mcpServer.stop();
393
398
  break;
394
399
  }
395
400
  case "issues":
@@ -303,13 +303,13 @@ declare const createProjectInput: z.ZodObject<{
303
303
  }, "strip", z.ZodTypeAny, {
304
304
  name: string;
305
305
  template: "app" | "docs" | "ai" | "blog" | "minimal";
306
- directory?: string | undefined;
307
306
  integrations?: string[] | undefined;
307
+ directory?: string | undefined;
308
308
  }, {
309
309
  name: string;
310
310
  template?: "app" | "docs" | "ai" | "blog" | "minimal" | undefined;
311
- directory?: string | undefined;
312
311
  integrations?: string[] | undefined;
312
+ directory?: string | undefined;
313
313
  }>;
314
314
  type CreateProjectInput = z.infer<typeof createProjectInput>;
315
315
  interface CreateProjectResult {
@@ -0,0 +1,35 @@
1
+ export interface DevServerClientOptions {
2
+ port: number;
3
+ }
4
+ export declare class DevServerClient {
5
+ private baseUrl;
6
+ constructor(options: DevServerClientOptions);
7
+ /**
8
+ * Fetch live errors from the ErrorCollector.
9
+ */
10
+ getLiveErrors(type?: string): Promise<unknown>;
11
+ /**
12
+ * Fetch live logs from the LogBuffer.
13
+ */
14
+ getLiveLogs(options?: {
15
+ level?: string;
16
+ source?: string;
17
+ pattern?: string;
18
+ limit?: number;
19
+ since?: number;
20
+ }): Promise<unknown>;
21
+ /**
22
+ * Fetch dev server stats.
23
+ */
24
+ getStats(): Promise<unknown>;
25
+ /**
26
+ * Trigger HMR reload.
27
+ */
28
+ triggerHmr(path?: string): Promise<unknown>;
29
+ /**
30
+ * Fetch with retry and exponential backoff.
31
+ * Retries on connection refused / timeout (dev server may be starting up).
32
+ */
33
+ private pull;
34
+ }
35
+ //# sourceMappingURL=dev-server-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-server-client.d.ts","sourceRoot":"","sources":["../../../../src/src/cli/mcp/dev-server-client.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,EAAE,sBAAsB;IAI3C;;OAEG;IACH,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK9C;;OAEG;IACH,WAAW,CAAC,OAAO,CAAC,EAAE;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,OAAO,CAAC;IAYpB;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IAI5B;;OAEG;IACH,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ3C;;;OAGG;YACW,IAAI;CAoBnB"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * HTTP client for pulling runtime data from the Veryfront dev server's Dashboard API.
3
+ *
4
+ * Used by the standalone `veryfront mcp` process to access ErrorCollector,
5
+ * LogBuffer, and HMR data over HTTP from the user's running `veryfront` process.
6
+ */
7
+ import * as dntShim from "../../../_dnt.shims.js";
8
+ const REQUEST_TIMEOUT_MS = 3000;
9
+ const MAX_RETRIES = 2;
10
+ const RETRY_DELAYS_MS = [200, 500];
11
+ export class DevServerClient {
12
+ baseUrl;
13
+ constructor(options) {
14
+ this.baseUrl = `http://localhost:${options.port}`;
15
+ }
16
+ /**
17
+ * Fetch live errors from the ErrorCollector.
18
+ */
19
+ getLiveErrors(type) {
20
+ const params = type ? `?type=${encodeURIComponent(type)}` : "";
21
+ return this.pull(`/_dev/api/live-errors${params}`);
22
+ }
23
+ /**
24
+ * Fetch live logs from the LogBuffer.
25
+ */
26
+ getLiveLogs(options) {
27
+ const params = new URLSearchParams();
28
+ if (options?.level)
29
+ params.set("level", options.level);
30
+ if (options?.source)
31
+ params.set("source", options.source);
32
+ if (options?.pattern)
33
+ params.set("pattern", options.pattern);
34
+ if (options?.limit)
35
+ params.set("limit", String(options.limit));
36
+ if (options?.since)
37
+ params.set("since", String(options.since));
38
+ const qs = params.toString();
39
+ return this.pull(`/_dev/api/live-logs${qs ? `?${qs}` : ""}`);
40
+ }
41
+ /**
42
+ * Fetch dev server stats.
43
+ */
44
+ getStats() {
45
+ return this.pull("/_dev/api/stats");
46
+ }
47
+ /**
48
+ * Trigger HMR reload.
49
+ */
50
+ triggerHmr(path) {
51
+ return this.pull("/_dev/api/hmr-trigger", {
52
+ method: "POST",
53
+ headers: { "Content-Type": "application/json" },
54
+ body: JSON.stringify(path ? { path } : {}),
55
+ });
56
+ }
57
+ /**
58
+ * Fetch with retry and exponential backoff.
59
+ * Retries on connection refused / timeout (dev server may be starting up).
60
+ */
61
+ async pull(path, init) {
62
+ let lastError;
63
+ for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {
64
+ try {
65
+ const response = await dntShim.fetch(`${this.baseUrl}${path}`, {
66
+ ...init,
67
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
68
+ });
69
+ return await response.json();
70
+ }
71
+ catch (error) {
72
+ lastError = error;
73
+ if (attempt < MAX_RETRIES) {
74
+ await new Promise((r) => dntShim.setTimeout(r, RETRY_DELAYS_MS[attempt]));
75
+ }
76
+ }
77
+ }
78
+ throw lastError;
79
+ }
80
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Standalone MCP Server
3
+ *
4
+ * Runs as a separate process (`veryfront mcp`), communicates over stdio.
5
+ * Pulls runtime data from the dev server's Dashboard API over HTTP.
6
+ * Falls back gracefully when the dev server is not running.
7
+ */
8
+ export interface StandaloneMCPConfig {
9
+ port?: number;
10
+ }
11
+ export declare class StandaloneMCPServer {
12
+ private client;
13
+ private tools;
14
+ private running;
15
+ private stdinReader;
16
+ constructor(config?: StandaloneMCPConfig);
17
+ start(): void;
18
+ stop(): void;
19
+ private startStdio;
20
+ private handleRequest;
21
+ private dispatchMethod;
22
+ private handleToolsCall;
23
+ private handlePromptsList;
24
+ private handlePromptsGet;
25
+ private createTools;
26
+ }
27
+ export declare function createStandaloneMCPServer(config?: StandaloneMCPConfig): StandaloneMCPServer;
28
+ //# sourceMappingURL=standalone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../../../src/src/cli/mcp/standalone.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAuCH,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAMD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAA4B;gBAEnC,MAAM,GAAE,mBAAwB;IAM5C,KAAK,IAAI,IAAI;IAMb,IAAI,IAAI,IAAI;IAUZ,OAAO,CAAC,UAAU;YAqDJ,aAAa;IAkB3B,OAAO,CAAC,cAAc;YA6BR,eAAe;IAmB7B,OAAO,CAAC,iBAAiB;YAkBX,gBAAgB;IA4B9B,OAAO,CAAC,WAAW;CAyGpB;AAMD,wBAAgB,yBAAyB,CAAC,MAAM,GAAE,mBAAwB,GAAG,mBAAmB,CAI/F"}