veryfront 0.1.1239 → 0.1.1241

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 (611) hide show
  1. package/esm/cli/commands/build/command-help.d.ts.map +1 -1
  2. package/esm/cli/commands/build/command-help.js +4 -0
  3. package/esm/cli/commands/build/command.d.ts +3 -1
  4. package/esm/cli/commands/build/command.d.ts.map +1 -1
  5. package/esm/cli/commands/build/command.js +13 -5
  6. package/esm/cli/commands/build/handler.d.ts +17 -0
  7. package/esm/cli/commands/build/handler.d.ts.map +1 -1
  8. package/esm/cli/commands/build/handler.js +188 -9
  9. package/esm/cli/commands/generate/command.d.ts.map +1 -1
  10. package/esm/cli/commands/generate/command.js +40 -0
  11. package/esm/cli/commands/push/command.d.ts.map +1 -1
  12. package/esm/cli/commands/push/command.js +24 -16
  13. package/esm/cli/shared/ensure-content-processor.d.ts +16 -1
  14. package/esm/cli/shared/ensure-content-processor.d.ts.map +1 -1
  15. package/esm/cli/shared/ensure-content-processor.js +39 -5
  16. package/esm/cli/shared/project-creation.d.ts.map +1 -1
  17. package/esm/cli/shared/project-creation.js +29 -1
  18. package/esm/deno.d.ts +14 -5
  19. package/esm/deno.js +23 -7
  20. package/esm/extensions/ext-llm-openai/src/openai-chat-stream.d.ts.map +1 -1
  21. package/esm/extensions/ext-llm-openai/src/openai-chat-stream.js +16 -6
  22. package/esm/extensions/ext-llm-openai/src/openai-provider.d.ts.map +1 -1
  23. package/esm/extensions/ext-llm-openai/src/openai-provider.js +11 -2
  24. package/esm/extensions/ext-llm-openai/src/openai-reasoning-models.d.ts +2 -14
  25. package/esm/extensions/ext-llm-openai/src/openai-reasoning-models.d.ts.map +1 -1
  26. package/esm/extensions/ext-llm-openai/src/openai-reasoning-models.js +1 -72
  27. package/esm/extensions/ext-schema-zod/src/adapter.d.ts.map +1 -1
  28. package/esm/src/agent/ag-ui/browser-aliases.d.ts +164 -0
  29. package/esm/src/agent/ag-ui/browser-aliases.d.ts.map +1 -0
  30. package/esm/src/agent/ag-ui/browser-aliases.js +68 -0
  31. package/esm/src/agent/ag-ui/chat-ui-chunk-encoder.d.ts +35 -0
  32. package/esm/src/agent/ag-ui/chat-ui-chunk-encoder.d.ts.map +1 -0
  33. package/esm/src/agent/ag-ui/{chat-ui-chunk-browser-encoder.js → chat-ui-chunk-encoder.js} +11 -11
  34. package/esm/src/agent/ag-ui/chunk-encoder-bridge.d.ts +8 -6
  35. package/esm/src/agent/ag-ui/chunk-encoder-bridge.d.ts.map +1 -1
  36. package/esm/src/agent/ag-ui/chunk-encoder-bridge.js +5 -4
  37. package/esm/src/agent/ag-ui/chunk-encoder.d.ts +26 -0
  38. package/esm/src/agent/ag-ui/chunk-encoder.d.ts.map +1 -0
  39. package/esm/src/agent/ag-ui/{browser-chunk-encoder.js → chunk-encoder.js} +3 -2
  40. package/esm/src/agent/ag-ui/{browser-encoder.d.ts → encoder.d.ts} +33 -19
  41. package/esm/src/agent/ag-ui/encoder.d.ts.map +1 -0
  42. package/esm/src/agent/ag-ui/{browser-encoder.js → encoder.js} +81 -27
  43. package/esm/src/agent/ag-ui/finalize-tracker.d.ts +15 -0
  44. package/esm/src/agent/ag-ui/finalize-tracker.d.ts.map +1 -0
  45. package/esm/src/agent/ag-ui/{browser-finalize-tracker.js → finalize-tracker.js} +4 -4
  46. package/esm/src/agent/ag-ui/response-stream.d.ts +36 -0
  47. package/esm/src/agent/ag-ui/response-stream.d.ts.map +1 -0
  48. package/esm/src/agent/ag-ui/{browser-response-stream.js → response-stream.js} +6 -3
  49. package/esm/src/agent/ag-ui/runtime-chat-stream-encoder.d.ts +1 -1
  50. package/esm/src/agent/ag-ui/runtime-chat-stream-encoder.d.ts.map +1 -1
  51. package/esm/src/agent/ag-ui/runtime-event-encoder.d.ts +7 -7
  52. package/esm/src/agent/ag-ui/runtime-event-encoder.d.ts.map +1 -1
  53. package/esm/src/agent/ag-ui/runtime-event-encoder.js +4 -4
  54. package/esm/src/agent/ag-ui/runtime-response.d.ts +20 -0
  55. package/esm/src/agent/ag-ui/runtime-response.d.ts.map +1 -0
  56. package/esm/src/agent/ag-ui/runtime-response.js +16 -0
  57. package/esm/src/agent/ag-ui/sse-parser.d.ts +1 -1
  58. package/esm/src/agent/ag-ui/sse-parser.d.ts.map +1 -1
  59. package/esm/src/agent/ag-ui/sse-parser.js +3 -3
  60. package/esm/src/agent/ag-ui/tracked-response.d.ts +11 -0
  61. package/esm/src/agent/ag-ui/tracked-response.d.ts.map +1 -0
  62. package/esm/src/agent/ag-ui/{tracked-browser-response.js → tracked-response.js} +6 -4
  63. package/esm/src/agent/conversation/hosted-lifecycle.d.ts.map +1 -1
  64. package/esm/src/agent/conversation/hosted-lifecycle.js +2 -1
  65. package/esm/src/agent/conversation/lifecycle-run-event-adapter.d.ts.map +1 -1
  66. package/esm/src/agent/conversation/lifecycle-run-event-adapter.js +2 -0
  67. package/esm/src/agent/conversation/private-run-event.d.ts.map +1 -1
  68. package/esm/src/agent/conversation/private-run-event.js +174 -3
  69. package/esm/src/agent/conversation/run-chunk-mirror.d.ts +2 -0
  70. package/esm/src/agent/conversation/run-chunk-mirror.d.ts.map +1 -1
  71. package/esm/src/agent/conversation/run-chunk-mirror.js +13 -6
  72. package/esm/src/agent/conversation/run-events.d.ts +8 -0
  73. package/esm/src/agent/conversation/run-events.d.ts.map +1 -1
  74. package/esm/src/agent/conversation/run-events.js +54 -4
  75. package/esm/src/agent/conversation/run-stream-mirror.d.ts.map +1 -1
  76. package/esm/src/agent/conversation/run-stream-mirror.js +5 -2
  77. package/esm/src/agent/hosted/durable-run-event-sink.d.ts +2 -1
  78. package/esm/src/agent/hosted/durable-run-event-sink.d.ts.map +1 -1
  79. package/esm/src/agent/hosted/durable-run-event-sink.js +9 -7
  80. package/esm/src/agent/hosted/prepared-chat-execution.js +2 -2
  81. package/esm/src/agent/index.d.ts +9 -8
  82. package/esm/src/agent/index.d.ts.map +1 -1
  83. package/esm/src/agent/index.js +9 -8
  84. package/esm/src/agent/memory/memory.d.ts.map +1 -1
  85. package/esm/src/agent/memory/memory.js +7 -6
  86. package/esm/src/agent/react/use-chat/types.d.ts +2 -0
  87. package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
  88. package/esm/src/agent/react/use-chat/use-chat.js +3 -2
  89. package/esm/src/agent/runtime/ag-ui-contract.d.ts +2 -2
  90. package/esm/src/agent/runtime/ag-ui-contract.d.ts.map +1 -1
  91. package/esm/src/agent/runtime/ag-ui-contract.js +2 -2
  92. package/esm/src/agent/runtime/chat-stream-handler.d.ts.map +1 -1
  93. package/esm/src/agent/runtime/chat-stream-handler.js +34 -4
  94. package/esm/src/agent/runtime/index.d.ts.map +1 -1
  95. package/esm/src/agent/runtime/index.js +15 -6
  96. package/esm/src/agent/streaming/data-stream.d.ts +1 -1
  97. package/esm/src/agent/streaming/data-stream.d.ts.map +1 -1
  98. package/esm/src/agent/streaming/fork-runtime-part-mapper.d.ts +1 -1
  99. package/esm/src/agent/streaming/fork-runtime-part-mapper.d.ts.map +1 -1
  100. package/esm/src/agent/streaming/lifecycle/live-adapter.d.ts.map +1 -1
  101. package/esm/src/agent/streaming/lifecycle/live-adapter.js +2 -0
  102. package/esm/src/agent/streaming/lifecycle/reducer.d.ts.map +1 -1
  103. package/esm/src/agent/streaming/lifecycle/reducer.js +7 -0
  104. package/esm/src/agent/streaming/lifecycle/runtime-provider-adapter.js +4 -0
  105. package/esm/src/build/production-build/templates.d.ts.map +1 -1
  106. package/esm/src/build/production-build/templates.js +1 -1
  107. package/esm/src/cache/request-cache-batcher.d.ts +1 -0
  108. package/esm/src/cache/request-cache-batcher.d.ts.map +1 -1
  109. package/esm/src/cache/request-cache-batcher.js +21 -7
  110. package/esm/src/chat/ag-ui.d.ts +1 -1
  111. package/esm/src/chat/index.d.ts +2 -2
  112. package/esm/src/chat/index.d.ts.map +1 -1
  113. package/esm/src/chat/index.js +1 -1
  114. package/esm/src/config/config-shim.d.ts +1 -1
  115. package/esm/src/config/config-shim.d.ts.map +1 -1
  116. package/esm/src/config/config-shim.js +1 -1
  117. package/esm/src/config/declarative-evaluator-worker-protocol.d.ts.map +1 -1
  118. package/esm/src/config/env.js +1 -1
  119. package/esm/src/config/environment-config.js +1 -1
  120. package/esm/src/config/loader.d.ts.map +1 -1
  121. package/esm/src/config/loader.js +4 -4
  122. package/esm/src/config/schemas/config.schema.d.ts +20 -0
  123. package/esm/src/config/schemas/config.schema.d.ts.map +1 -1
  124. package/esm/src/config/schemas/config.schema.js +27 -0
  125. package/esm/src/config/server-external-packages.d.ts +11 -0
  126. package/esm/src/config/server-external-packages.d.ts.map +1 -0
  127. package/esm/src/config/server-external-packages.js +53 -0
  128. package/esm/src/data/data-fetcher.d.ts.map +1 -1
  129. package/esm/src/data/data-fetcher.js +9 -4
  130. package/esm/src/data/data-result-validation.d.ts +5 -0
  131. package/esm/src/data/data-result-validation.d.ts.map +1 -0
  132. package/esm/src/data/data-result-validation.js +56 -0
  133. package/esm/src/data/helpers.d.ts +5 -5
  134. package/esm/src/data/helpers.d.ts.map +1 -1
  135. package/esm/src/data/helpers.js +22 -68
  136. package/esm/src/data/index.d.ts +1 -1
  137. package/esm/src/data/index.d.ts.map +1 -1
  138. package/esm/src/data/response-metadata.d.ts +23 -0
  139. package/esm/src/data/response-metadata.d.ts.map +1 -0
  140. package/esm/src/data/response-metadata.js +311 -0
  141. package/esm/src/data/schemas/data.schema.d.ts +95 -6
  142. package/esm/src/data/schemas/data.schema.d.ts.map +1 -1
  143. package/esm/src/data/schemas/data.schema.js +57 -3
  144. package/esm/src/data/schemas/index.d.ts +1 -1
  145. package/esm/src/data/schemas/index.d.ts.map +1 -1
  146. package/esm/src/data/schemas/index.js +1 -1
  147. package/esm/src/data/server-data-fetcher.d.ts.map +1 -1
  148. package/esm/src/data/server-data-fetcher.js +5 -5
  149. package/esm/src/data/static-data-fetcher.d.ts +2 -2
  150. package/esm/src/data/static-data-fetcher.d.ts.map +1 -1
  151. package/esm/src/data/static-data-fetcher.js +6 -3
  152. package/esm/src/data/types.d.ts +1 -1
  153. package/esm/src/data/types.d.ts.map +1 -1
  154. package/esm/src/discovery/discovery-engine.d.ts.map +1 -1
  155. package/esm/src/discovery/discovery-engine.js +81 -26
  156. package/esm/src/discovery/handlers/task-handler.d.ts +1 -1
  157. package/esm/src/discovery/handlers/task-handler.d.ts.map +1 -1
  158. package/esm/src/discovery/handlers/task-handler.js +6 -3
  159. package/esm/src/discovery/types.d.ts +6 -4
  160. package/esm/src/discovery/types.d.ts.map +1 -1
  161. package/esm/src/errors/error-registry/runtime.d.ts +2 -0
  162. package/esm/src/errors/error-registry/runtime.d.ts.map +1 -1
  163. package/esm/src/errors/error-registry/runtime.js +8 -0
  164. package/esm/src/errors/error-registry.d.ts +1 -0
  165. package/esm/src/errors/error-registry.d.ts.map +1 -1
  166. package/esm/src/errors/index.d.ts +1 -1
  167. package/esm/src/errors/index.d.ts.map +1 -1
  168. package/esm/src/errors/index.js +1 -1
  169. package/esm/src/errors/user-friendly/error-wrapper.js +1 -1
  170. package/esm/src/errors/veryfront-error.d.ts.map +1 -1
  171. package/esm/src/extensions/index.d.ts +2 -0
  172. package/esm/src/extensions/index.d.ts.map +1 -1
  173. package/esm/src/extensions/index.js +1 -0
  174. package/esm/src/extensions/parser/code-parser.d.ts +9 -0
  175. package/esm/src/extensions/parser/code-parser.d.ts.map +1 -1
  176. package/esm/src/extensions/parser/defaults.d.ts +5 -0
  177. package/esm/src/extensions/parser/defaults.d.ts.map +1 -1
  178. package/esm/src/extensions/parser/defaults.js +23 -11
  179. package/esm/src/fs/index.d.ts +50 -1
  180. package/esm/src/fs/index.d.ts.map +1 -1
  181. package/esm/src/fs/index.js +50 -1
  182. package/esm/src/html/html-injection.d.ts +2 -0
  183. package/esm/src/html/html-injection.d.ts.map +1 -1
  184. package/esm/src/html/html-injection.js +4 -1
  185. package/esm/src/html/html-shell-generator.d.ts.map +1 -1
  186. package/esm/src/html/html-shell-generator.js +11 -3
  187. package/esm/src/html/hydration-script-builder/hydration-runtime.generated.d.ts.map +1 -1
  188. package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
  189. package/esm/src/html/hydration-script-builder/prod-runtime-selection.d.ts +23 -0
  190. package/esm/src/html/hydration-script-builder/prod-runtime-selection.d.ts.map +1 -0
  191. package/esm/src/html/hydration-script-builder/prod-runtime-selection.js +55 -0
  192. package/esm/src/html/hydration-script-builder/prod-scripts.d.ts +2 -0
  193. package/esm/src/html/hydration-script-builder/prod-scripts.d.ts.map +1 -1
  194. package/esm/src/html/hydration-script-builder/prod-scripts.js +12 -3
  195. package/esm/src/html/schemas/html.schema.d.ts +2 -0
  196. package/esm/src/html/schemas/html.schema.d.ts.map +1 -1
  197. package/esm/src/html/schemas/html.schema.js +2 -0
  198. package/esm/src/html/styles-builder/css-hash-cache.d.ts +1 -1
  199. package/esm/src/html/styles-builder/css-hash-cache.d.ts.map +1 -1
  200. package/esm/src/html/styles-builder/css-hash-cache.js +1 -1
  201. package/esm/src/index.client.d.ts +2 -2
  202. package/esm/src/index.client.d.ts.map +1 -1
  203. package/esm/src/index.client.js +3 -1
  204. package/esm/src/index.d.ts +1 -1
  205. package/esm/src/index.d.ts.map +1 -1
  206. package/esm/src/internal-agents/ag-ui-sse.d.ts +7 -7
  207. package/esm/src/internal-agents/ag-ui-sse.d.ts.map +1 -1
  208. package/esm/src/internal-agents/ag-ui-sse.js +17 -9
  209. package/esm/src/internal-agents/control-plane-auth.js +1 -1
  210. package/esm/src/internal-agents/run-stream.d.ts.map +1 -1
  211. package/esm/src/internal-agents/run-stream.js +15 -9
  212. package/esm/src/modules/import-map/loader.d.ts.map +1 -1
  213. package/esm/src/modules/import-map/loader.js +2 -2
  214. package/esm/src/modules/import-map/merger.js +2 -2
  215. package/esm/src/modules/import-map/preloader.js +2 -2
  216. package/esm/src/modules/react-loader/component-loader.d.ts.map +1 -1
  217. package/esm/src/modules/react-loader/component-loader.js +2 -0
  218. package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts +1 -1
  219. package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
  220. package/esm/src/modules/react-loader/ssr-module-loader/loader.js +3 -2
  221. package/esm/src/modules/react-loader/ssr-module-loader/ssr-cache-manager.d.ts.map +1 -1
  222. package/esm/src/modules/react-loader/ssr-module-loader/ssr-cache-manager.js +7 -1
  223. package/esm/src/modules/react-loader/ssr-module-loader/types.d.ts +2 -0
  224. package/esm/src/modules/react-loader/ssr-module-loader/types.d.ts.map +1 -1
  225. package/esm/src/modules/react-loader/transformed-module-coordinator.d.ts.map +1 -1
  226. package/esm/src/modules/react-loader/transformed-module-coordinator.js +2 -1
  227. package/esm/src/modules/react-loader/types.d.ts +2 -0
  228. package/esm/src/modules/react-loader/types.d.ts.map +1 -1
  229. package/esm/src/modules/server/module-response-cache.d.ts +1 -0
  230. package/esm/src/modules/server/module-response-cache.d.ts.map +1 -1
  231. package/esm/src/modules/server/module-response-cache.js +5 -0
  232. package/esm/src/modules/server/module-server.d.ts.map +1 -1
  233. package/esm/src/modules/server/module-server.js +4 -0
  234. package/esm/src/modules/server/module-transform.d.ts.map +1 -1
  235. package/esm/src/modules/server/module-transform.js +2 -0
  236. package/esm/src/observability/metrics/config.js +1 -1
  237. package/esm/src/observability/request-profiler.js +1 -1
  238. package/esm/src/observability/telemetry-error.js +2 -2
  239. package/esm/src/observability/tracing/telemetry-env.js +1 -1
  240. package/esm/src/platform/adapters/fs/cache/file-cache.d.ts.map +1 -1
  241. package/esm/src/platform/adapters/fs/cache/file-cache.js +5 -0
  242. package/esm/src/platform/adapters/fs/veryfront/adapter.d.ts +39 -0
  243. package/esm/src/platform/adapters/fs/veryfront/adapter.d.ts.map +1 -1
  244. package/esm/src/platform/adapters/fs/veryfront/adapter.js +209 -40
  245. package/esm/src/platform/adapters/fs/veryfront/file-list-index.d.ts.map +1 -1
  246. package/esm/src/platform/adapters/fs/veryfront/file-list-index.js +0 -14
  247. package/esm/src/platform/adapters/fs/veryfront/read-operations-helpers.d.ts +0 -1
  248. package/esm/src/platform/adapters/fs/veryfront/read-operations-helpers.d.ts.map +1 -1
  249. package/esm/src/platform/adapters/fs/veryfront/read-operations-helpers.js +0 -3
  250. package/esm/src/platform/adapters/fs/veryfront/read-operations.d.ts.map +1 -1
  251. package/esm/src/platform/adapters/fs/veryfront/read-operations.js +1 -4
  252. package/esm/src/platform/adapters/fs/veryfront/request-context.d.ts.map +1 -1
  253. package/esm/src/platform/adapters/fs/veryfront/request-context.js +4 -0
  254. package/esm/src/platform/adapters/fs/veryfront/stat-operations.d.ts.map +1 -1
  255. package/esm/src/platform/adapters/fs/veryfront/stat-operations.js +9 -1
  256. package/esm/src/platform/adapters/fs/veryfront/websocket-manager-helpers.js +1 -1
  257. package/esm/src/platform/adapters/fs/veryfront/websocket-manager.d.ts +2 -1
  258. package/esm/src/platform/adapters/fs/veryfront/websocket-manager.d.ts.map +1 -1
  259. package/esm/src/platform/adapters/fs/veryfront/websocket-manager.js +97 -66
  260. package/esm/src/platform/compat/dns.d.ts +10 -0
  261. package/esm/src/platform/compat/dns.d.ts.map +1 -1
  262. package/esm/src/platform/compat/dns.js +50 -0
  263. package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
  264. package/esm/src/platform/compat/process/lifecycle.d.ts +10 -0
  265. package/esm/src/platform/compat/process/lifecycle.d.ts.map +1 -1
  266. package/esm/src/platform/compat/process/lifecycle.js +23 -0
  267. package/esm/src/platform/compat/process.d.ts +1 -1
  268. package/esm/src/platform/compat/process.d.ts.map +1 -1
  269. package/esm/src/platform/compat/process.js +1 -1
  270. package/esm/src/platform/compat/proxy-topology.js +1 -1
  271. package/esm/src/platform/request-context-access.d.ts +24 -0
  272. package/esm/src/platform/request-context-access.d.ts.map +1 -0
  273. package/esm/src/platform/request-context-access.js +26 -0
  274. package/esm/src/provider/shared/openai-reasoning.d.ts +16 -0
  275. package/esm/src/provider/shared/openai-reasoning.d.ts.map +1 -0
  276. package/esm/src/provider/shared/openai-reasoning.js +73 -0
  277. package/esm/src/provider/types.d.ts +2 -0
  278. package/esm/src/provider/types.d.ts.map +1 -1
  279. package/esm/src/provider/veryfront-cloud/provider.d.ts.map +1 -1
  280. package/esm/src/provider/veryfront-cloud/provider.js +45 -18
  281. package/esm/src/proxy/handler.d.ts +1 -0
  282. package/esm/src/proxy/handler.d.ts.map +1 -1
  283. package/esm/src/proxy/handler.js +17 -4
  284. package/esm/src/proxy/proxy-error-context.d.ts +1 -0
  285. package/esm/src/proxy/proxy-error-context.d.ts.map +1 -1
  286. package/esm/src/proxy/proxy-error-context.js +1 -0
  287. package/esm/src/proxy/request-host.d.ts +3 -0
  288. package/esm/src/proxy/request-host.d.ts.map +1 -1
  289. package/esm/src/proxy/request-host.js +28 -8
  290. package/esm/src/proxy/routing-invalidation-redis.d.ts.map +1 -1
  291. package/esm/src/proxy/routing-invalidation-redis.js +38 -4
  292. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +27 -3
  293. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -1
  294. package/esm/src/react/components/chat/chat/components/attachments-panel.js +29 -7
  295. package/esm/src/react/components/chat/chat/components/sidebar.d.ts +15 -6
  296. package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
  297. package/esm/src/react/components/chat/chat/components/sidebar.js +37 -4
  298. package/esm/src/react/components/chat/chat/components/sidebar.types.d.ts +12 -1
  299. package/esm/src/react/components/chat/chat/components/sidebar.types.d.ts.map +1 -1
  300. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +3 -1
  301. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
  302. package/esm/src/react/components/chat/chat/composition/chat-composer.js +17 -6
  303. package/esm/src/react/components/chat/chat/composition/chat-composer.types.d.ts +12 -5
  304. package/esm/src/react/components/chat/chat/composition/chat-composer.types.d.ts.map +1 -1
  305. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +18 -5
  306. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
  307. package/esm/src/react/components/chat/chat/composition/chat-root.js +65 -1
  308. package/esm/src/react/components/chat/chat/composition/use-composer-value.d.ts +6 -3
  309. package/esm/src/react/components/chat/chat/composition/use-composer-value.d.ts.map +1 -1
  310. package/esm/src/react/components/chat/chat/composition/use-composer-value.js +56 -5
  311. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +7 -1
  312. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
  313. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +14 -4
  314. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -1
  315. package/esm/src/react/components/chat/chat/contexts/conversations-context.js +10 -1
  316. package/esm/src/react/components/chat/chat/index.d.ts +1 -1
  317. package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
  318. package/esm/src/react/components/chat/chat/persistence/conversation-codec.d.ts.map +1 -1
  319. package/esm/src/react/components/chat/chat.d.ts +1 -1
  320. package/esm/src/react/components/chat/chat.d.ts.map +1 -1
  321. package/esm/src/react/server-render-context.d.ts.map +1 -1
  322. package/esm/src/release-assets/dependency-artifact-builder.d.ts.map +1 -1
  323. package/esm/src/rendering/app-reserved.d.ts +2 -2
  324. package/esm/src/rendering/app-reserved.d.ts.map +1 -1
  325. package/esm/src/rendering/app-reserved.js +4 -3
  326. package/esm/src/rendering/cache/cache-coordinator.d.ts.map +1 -1
  327. package/esm/src/rendering/cache/cache-coordinator.js +1 -0
  328. package/esm/src/rendering/cache/cache-payload.d.ts.map +1 -1
  329. package/esm/src/rendering/cache/cache-payload.js +44 -0
  330. package/esm/src/rendering/component-handling.d.ts +4 -1
  331. package/esm/src/rendering/component-handling.d.ts.map +1 -1
  332. package/esm/src/rendering/component-handling.js +13 -6
  333. package/esm/src/rendering/layouts/layout-applicator.d.ts.map +1 -1
  334. package/esm/src/rendering/layouts/layout-applicator.js +3 -1
  335. package/esm/src/rendering/layouts/layout-collector.d.ts +1 -0
  336. package/esm/src/rendering/layouts/layout-collector.d.ts.map +1 -1
  337. package/esm/src/rendering/layouts/layout-collector.js +201 -4
  338. package/esm/src/rendering/layouts/utils/applicator.d.ts +1 -1
  339. package/esm/src/rendering/layouts/utils/applicator.d.ts.map +1 -1
  340. package/esm/src/rendering/layouts/utils/applicator.js +3 -3
  341. package/esm/src/rendering/layouts/utils/component-loader.d.ts +2 -2
  342. package/esm/src/rendering/layouts/utils/component-loader.d.ts.map +1 -1
  343. package/esm/src/rendering/layouts/utils/component-loader.js +12 -4
  344. package/esm/src/rendering/orchestrator/file-resolver/index.d.ts +3 -1
  345. package/esm/src/rendering/orchestrator/file-resolver/index.d.ts.map +1 -1
  346. package/esm/src/rendering/orchestrator/file-resolver/index.js +13 -5
  347. package/esm/src/rendering/orchestrator/html.d.ts.map +1 -1
  348. package/esm/src/rendering/orchestrator/html.js +26 -10
  349. package/esm/src/rendering/orchestrator/layout.d.ts.map +1 -1
  350. package/esm/src/rendering/orchestrator/layout.js +2 -2
  351. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts.map +1 -1
  352. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.js +20 -2
  353. package/esm/src/rendering/orchestrator/module-loader/index.d.ts +2 -0
  354. package/esm/src/rendering/orchestrator/module-loader/index.d.ts.map +1 -1
  355. package/esm/src/rendering/orchestrator/module-loader/index.js +6 -3
  356. package/esm/src/rendering/orchestrator/module-loader/module-cache-lookup.d.ts +3 -2
  357. package/esm/src/rendering/orchestrator/module-loader/module-cache-lookup.d.ts.map +1 -1
  358. package/esm/src/rendering/orchestrator/module-loader/module-cache-lookup.js +6 -6
  359. package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts +1 -0
  360. package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts.map +1 -1
  361. package/esm/src/rendering/orchestrator/module-loader/module-persistence.js +2 -2
  362. package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.d.ts +2 -0
  363. package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.d.ts.map +1 -1
  364. package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.js +7 -1
  365. package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
  366. package/esm/src/rendering/orchestrator/pipeline.js +58 -10
  367. package/esm/src/rendering/orchestrator/render-result-assembly.d.ts +3 -0
  368. package/esm/src/rendering/orchestrator/render-result-assembly.d.ts.map +1 -1
  369. package/esm/src/rendering/orchestrator/render-result-assembly.js +3 -1
  370. package/esm/src/rendering/page-renderer.d.ts +2 -0
  371. package/esm/src/rendering/page-renderer.d.ts.map +1 -1
  372. package/esm/src/rendering/page-renderer.js +4 -1
  373. package/esm/src/rendering/page-rendering.d.ts +2 -0
  374. package/esm/src/rendering/page-rendering.d.ts.map +1 -1
  375. package/esm/src/rendering/page-rendering.js +1 -0
  376. package/esm/src/rendering/renderer.d.ts.map +1 -1
  377. package/esm/src/rendering/renderer.js +31 -1
  378. package/esm/src/rendering/script-page-handling.d.ts +2 -0
  379. package/esm/src/rendering/script-page-handling.d.ts.map +1 -1
  380. package/esm/src/rendering/script-page-handling.js +17 -1
  381. package/esm/src/rendering/shared/context-aware-cache.d.ts.map +1 -1
  382. package/esm/src/rendering/shared/context-aware-cache.js +3 -0
  383. package/esm/src/rendering/snippet-renderer.d.ts +10 -0
  384. package/esm/src/rendering/snippet-renderer.d.ts.map +1 -1
  385. package/esm/src/rendering/snippet-renderer.js +40 -18
  386. package/esm/src/rendering/ssr/component-registry.d.ts +1 -1
  387. package/esm/src/rendering/ssr/component-registry.d.ts.map +1 -1
  388. package/esm/src/rendering/ssr/component-registry.js +13 -6
  389. package/esm/src/rendering/ssr-outcome.d.ts +4 -3
  390. package/esm/src/rendering/ssr-outcome.d.ts.map +1 -1
  391. package/esm/src/rendering/ssr-outcome.js +25 -8
  392. package/esm/src/routing/api/handler.d.ts +1 -1
  393. package/esm/src/routing/api/handler.d.ts.map +1 -1
  394. package/esm/src/routing/api/handler.js +6 -1
  395. package/esm/src/runtime/model-call-context.d.ts +37 -2
  396. package/esm/src/runtime/model-call-context.d.ts.map +1 -1
  397. package/esm/src/runtime/model-call-context.js +42 -1
  398. package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
  399. package/esm/src/runtime/runtime-bridge.js +108 -8
  400. package/esm/src/sandbox/shell-tools.d.ts.map +1 -1
  401. package/esm/src/sandbox/shell-tools.js +16 -6
  402. package/esm/src/schedule/validation.d.ts +9 -1
  403. package/esm/src/schedule/validation.d.ts.map +1 -1
  404. package/esm/src/schedule/validation.js +167 -80
  405. package/esm/src/schemas/json-value.d.ts.map +1 -1
  406. package/esm/src/schemas/json-value.js +81 -37
  407. package/esm/src/security/http/base-handler.js +1 -1
  408. package/esm/src/security/sandbox/project-worker.d.ts +1 -0
  409. package/esm/src/security/sandbox/project-worker.d.ts.map +1 -1
  410. package/esm/src/security/sandbox/project-worker.js +6 -0
  411. package/esm/src/security/sandbox/worker-read-scope.d.ts +20 -0
  412. package/esm/src/security/sandbox/worker-read-scope.d.ts.map +1 -0
  413. package/esm/src/security/sandbox/worker-read-scope.js +127 -0
  414. package/esm/src/security/sandbox/worker-types.d.ts +12 -0
  415. package/esm/src/security/sandbox/worker-types.d.ts.map +1 -1
  416. package/esm/src/server/handlers/dev/dashboard/api.d.ts.map +1 -1
  417. package/esm/src/server/handlers/dev/dashboard/api.js +70 -3
  418. package/esm/src/server/handlers/dev/files/esbuild-plugins.d.ts +5 -0
  419. package/esm/src/server/handlers/dev/files/esbuild-plugins.d.ts.map +1 -1
  420. package/esm/src/server/handlers/dev/files/esbuild-plugins.js +61 -3
  421. package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
  422. package/esm/src/server/handlers/dev/framework-candidates.generated.js +227 -29
  423. package/esm/src/server/handlers/request/api/pages-api-handler.d.ts.map +1 -1
  424. package/esm/src/server/handlers/request/api/pages-api-handler.js +20 -2
  425. package/esm/src/server/handlers/request/module/page-data-endpoint-handler.d.ts.map +1 -1
  426. package/esm/src/server/handlers/request/module/page-data-endpoint-handler.js +32 -15
  427. package/esm/src/server/handlers/request/prod-hydration-module.handler.d.ts.map +1 -1
  428. package/esm/src/server/handlers/request/prod-hydration-module.handler.js +10 -3
  429. package/esm/src/server/handlers/request/project-run-execute.handler.d.ts.map +1 -1
  430. package/esm/src/server/handlers/request/project-run-execute.handler.js +1 -0
  431. package/esm/src/server/handlers/request/snippet.handler.d.ts +6 -0
  432. package/esm/src/server/handlers/request/snippet.handler.d.ts.map +1 -1
  433. package/esm/src/server/handlers/request/snippet.handler.js +8 -1
  434. package/esm/src/server/handlers/request/ssr/error-page-fallback.js +1 -0
  435. package/esm/src/server/handlers/request/ssr/ssr-response-builder.d.ts.map +1 -1
  436. package/esm/src/server/handlers/request/ssr/ssr-response-builder.js +10 -6
  437. package/esm/src/server/handlers/request/ssr/ssr.handler.d.ts.map +1 -1
  438. package/esm/src/server/handlers/request/ssr/ssr.handler.js +22 -10
  439. package/esm/src/server/handlers/request/static.handler.d.ts.map +1 -1
  440. package/esm/src/server/handlers/request/static.handler.js +1 -0
  441. package/esm/src/server/runtime-handler/handler-context-builder.d.ts +2 -0
  442. package/esm/src/server/runtime-handler/handler-context-builder.d.ts.map +1 -1
  443. package/esm/src/server/runtime-handler/handler-context-builder.js +1 -0
  444. package/esm/src/server/runtime-handler/project-runtime-context.d.ts.map +1 -1
  445. package/esm/src/server/runtime-handler/project-runtime-context.js +6 -2
  446. package/esm/src/server/runtime-handler/request-tracker.d.ts.map +1 -1
  447. package/esm/src/server/runtime-handler/request-tracker.js +10 -3
  448. package/esm/src/server/services/rendering/ssr.service.d.ts +5 -0
  449. package/esm/src/server/services/rendering/ssr.service.d.ts.map +1 -1
  450. package/esm/src/server/services/rendering/ssr.service.js +71 -16
  451. package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.d.ts.map +1 -1
  452. package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +2 -2
  453. package/esm/src/server/services/rsc/orchestrators/handler.d.ts.map +1 -1
  454. package/esm/src/server/services/rsc/orchestrators/handler.js +1 -0
  455. package/esm/src/server/services/rsc/orchestrators/render-handler.d.ts +1 -0
  456. package/esm/src/server/services/rsc/orchestrators/render-handler.d.ts.map +1 -1
  457. package/esm/src/server/services/rsc/orchestrators/render-handler.js +2 -0
  458. package/esm/src/server/services/static/static-file.service.d.ts +4 -1
  459. package/esm/src/server/services/static/static-file.service.d.ts.map +1 -1
  460. package/esm/src/server/services/static/static-file.service.js +48 -22
  461. package/esm/src/server/shared/browser-module-bundler.d.ts.map +1 -1
  462. package/esm/src/server/shared/browser-module-bundler.js +10 -0
  463. package/esm/src/server/utils/request-host.d.ts +6 -0
  464. package/esm/src/server/utils/request-host.d.ts.map +1 -1
  465. package/esm/src/server/utils/request-host.js +42 -1
  466. package/esm/src/skill/tools.d.ts.map +1 -1
  467. package/esm/src/task/definition-snapshot.d.ts +8 -0
  468. package/esm/src/task/definition-snapshot.d.ts.map +1 -0
  469. package/esm/src/task/definition-snapshot.js +154 -0
  470. package/esm/src/task/discovery.d.ts.map +1 -1
  471. package/esm/src/task/discovery.js +47 -21
  472. package/esm/src/task/types.d.ts +3 -0
  473. package/esm/src/task/types.d.ts.map +1 -1
  474. package/esm/src/task/types.js +7 -16
  475. package/esm/src/tool/remote-mcp.d.ts.map +1 -1
  476. package/esm/src/tool/remote-mcp.js +86 -5
  477. package/esm/src/transforms/esm/bundle-recovery.d.ts.map +1 -1
  478. package/esm/src/transforms/esm/bundle-recovery.js +1 -0
  479. package/esm/src/transforms/esm/http-cache-helpers.d.ts +3 -1
  480. package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
  481. package/esm/src/transforms/esm/http-cache-helpers.js +18 -2
  482. package/esm/src/transforms/esm/http-cache-wrapper.d.ts.map +1 -1
  483. package/esm/src/transforms/esm/http-cache-wrapper.js +23 -0
  484. package/esm/src/transforms/esm/specifier-resolver.d.ts.map +1 -1
  485. package/esm/src/transforms/esm/specifier-resolver.js +2 -1
  486. package/esm/src/transforms/esm/types.d.ts +2 -0
  487. package/esm/src/transforms/esm/types.d.ts.map +1 -1
  488. package/esm/src/transforms/import-rewriter/commonjs-policy.d.ts +22 -0
  489. package/esm/src/transforms/import-rewriter/commonjs-policy.d.ts.map +1 -0
  490. package/esm/src/transforms/import-rewriter/commonjs-policy.js +75 -0
  491. package/esm/src/transforms/import-rewriter/core.d.ts.map +1 -1
  492. package/esm/src/transforms/import-rewriter/core.js +29 -1
  493. package/esm/src/transforms/import-rewriter/ssr-adapter.d.ts +2 -0
  494. package/esm/src/transforms/import-rewriter/ssr-adapter.d.ts.map +1 -1
  495. package/esm/src/transforms/import-rewriter/ssr-adapter.js +79 -10
  496. package/esm/src/transforms/import-rewriter/strategies/bare-strategy.d.ts.map +1 -1
  497. package/esm/src/transforms/import-rewriter/strategies/bare-strategy.js +14 -4
  498. package/esm/src/transforms/import-rewriter/types.d.ts +2 -0
  499. package/esm/src/transforms/import-rewriter/types.d.ts.map +1 -1
  500. package/esm/src/transforms/import-rewriter/url-builder.d.ts +2 -19
  501. package/esm/src/transforms/import-rewriter/url-builder.d.ts.map +1 -1
  502. package/esm/src/transforms/import-rewriter/url-builder.js +2 -67
  503. package/esm/src/transforms/mdx/esm-module-loader/import-transformer.d.ts +3 -2
  504. package/esm/src/transforms/mdx/esm-module-loader/import-transformer.d.ts.map +1 -1
  505. package/esm/src/transforms/mdx/esm-module-loader/import-transformer.js +39 -8
  506. package/esm/src/transforms/mdx/esm-module-loader/jsx/runtime-loader.d.ts.map +1 -1
  507. package/esm/src/transforms/mdx/esm-module-loader/jsx/runtime-loader.js +1 -1
  508. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts.map +1 -1
  509. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.js +1 -0
  510. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/cache-keys.d.ts +3 -3
  511. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/cache-keys.d.ts.map +1 -1
  512. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/cache-keys.js +14 -6
  513. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/distributed-cache.d.ts +1 -1
  514. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/distributed-cache.d.ts.map +1 -1
  515. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/distributed-cache.js +2 -1
  516. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts +1 -0
  517. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts.map +1 -1
  518. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.js +1 -1
  519. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.d.ts +1 -0
  520. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.d.ts.map +1 -1
  521. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.js +6 -3
  522. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/module-cache.d.ts +1 -1
  523. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/module-cache.d.ts.map +1 -1
  524. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/module-cache.js +2 -2
  525. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/persistence.d.ts +1 -0
  526. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/persistence.d.ts.map +1 -1
  527. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/persistence.js +1 -1
  528. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/source-transform.d.ts +1 -0
  529. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/source-transform.d.ts.map +1 -1
  530. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/source-transform.js +2 -0
  531. package/esm/src/transforms/mdx/esm-module-loader/module-writer.d.ts +2 -2
  532. package/esm/src/transforms/mdx/esm-module-loader/module-writer.d.ts.map +1 -1
  533. package/esm/src/transforms/mdx/esm-module-loader/module-writer.js +15 -7
  534. package/esm/src/transforms/mdx/esm-module-loader/types.d.ts +4 -0
  535. package/esm/src/transforms/mdx/esm-module-loader/types.d.ts.map +1 -1
  536. package/esm/src/transforms/mdx/index.d.ts +1 -0
  537. package/esm/src/transforms/mdx/index.d.ts.map +1 -1
  538. package/esm/src/transforms/mdx/index.js +2 -1
  539. package/esm/src/transforms/pipeline/cache-identity.d.ts +1 -0
  540. package/esm/src/transforms/pipeline/cache-identity.d.ts.map +1 -1
  541. package/esm/src/transforms/pipeline/cache-identity.js +15 -0
  542. package/esm/src/transforms/pipeline/context.d.ts.map +1 -1
  543. package/esm/src/transforms/pipeline/context.js +2 -0
  544. package/esm/src/transforms/pipeline/index.d.ts.map +1 -1
  545. package/esm/src/transforms/pipeline/index.js +1 -0
  546. package/esm/src/transforms/pipeline/stages/resolve-imports.d.ts.map +1 -1
  547. package/esm/src/transforms/pipeline/stages/resolve-imports.js +1 -0
  548. package/esm/src/transforms/pipeline/stages/ssr-http-cache.d.ts.map +1 -1
  549. package/esm/src/transforms/pipeline/stages/ssr-http-cache.js +1 -0
  550. package/esm/src/transforms/pipeline/types.d.ts +4 -0
  551. package/esm/src/transforms/pipeline/types.d.ts.map +1 -1
  552. package/esm/src/transforms/shared/esm-sh-specifier.d.ts +18 -0
  553. package/esm/src/transforms/shared/esm-sh-specifier.d.ts.map +1 -0
  554. package/esm/src/transforms/shared/esm-sh-specifier.js +253 -0
  555. package/esm/src/transforms/shared/package-specifier.d.ts.map +1 -1
  556. package/esm/src/transforms/shared/package-specifier.js +9 -2
  557. package/esm/src/transforms/shared/server-only-packages.d.ts +25 -1
  558. package/esm/src/transforms/shared/server-only-packages.d.ts.map +1 -1
  559. package/esm/src/transforms/shared/server-only-packages.js +176 -4
  560. package/esm/src/types/entities/getEntityInfo.d.ts.map +1 -1
  561. package/esm/src/types/index.d.ts +5 -0
  562. package/esm/src/types/index.d.ts.map +1 -1
  563. package/esm/src/types/server.d.ts +6 -0
  564. package/esm/src/types/server.d.ts.map +1 -1
  565. package/esm/src/utils/env-loader.d.ts.map +1 -1
  566. package/esm/src/utils/env-loader.js +2 -1
  567. package/esm/src/utils/feature-flags.js +1 -1
  568. package/esm/src/utils/lru-wrapper.js +2 -2
  569. package/esm/src/utils/memory/profiler.d.ts +20 -0
  570. package/esm/src/utils/memory/profiler.d.ts.map +1 -1
  571. package/esm/src/utils/memory/profiler.js +43 -5
  572. package/esm/src/utils/perf-timer.js +1 -1
  573. package/esm/src/utils/redirect-policy.d.ts +18 -0
  574. package/esm/src/utils/redirect-policy.d.ts.map +1 -0
  575. package/esm/src/utils/redirect-policy.js +92 -0
  576. package/esm/src/utils/redis-client.d.ts.map +1 -1
  577. package/esm/src/utils/redis-client.js +6 -3
  578. package/esm/src/utils/version-constant.d.ts +1 -1
  579. package/esm/src/utils/version-constant.js +1 -1
  580. package/esm/src/workflow/claude-code/tool.d.ts +27 -27
  581. package/esm/src/workflow/claude-code/tool.d.ts.map +1 -1
  582. package/esm/src/workflow/claude-code/wire-protocol.d.ts.map +1 -1
  583. package/esm/src/workflow/dsl/workflow.d.ts +3 -0
  584. package/esm/src/workflow/dsl/workflow.d.ts.map +1 -1
  585. package/esm/src/workflow/dsl/workflow.js +2 -1
  586. package/esm/src/workflow/executor/workflow-definition-snapshot.d.ts.map +1 -1
  587. package/esm/src/workflow/executor/workflow-definition-snapshot.js +88 -39
  588. package/esm/src/workflow/registry.d.ts +4 -1
  589. package/esm/src/workflow/registry.d.ts.map +1 -1
  590. package/esm/src/workflow/registry.js +10 -8
  591. package/esm/src/workflow/types.d.ts +3 -0
  592. package/esm/src/workflow/types.d.ts.map +1 -1
  593. package/esm/templates/index.d.ts.map +1 -1
  594. package/esm/templates/index.js +7 -0
  595. package/esm/templates/manifest.generated.d.ts.map +1 -1
  596. package/esm/templates/manifest.generated.js +1 -1
  597. package/package.json +16 -9
  598. package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts +0 -24
  599. package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts.map +0 -1
  600. package/esm/src/agent/ag-ui/browser-encoder.d.ts.map +0 -1
  601. package/esm/src/agent/ag-ui/browser-finalize-tracker.d.ts +0 -15
  602. package/esm/src/agent/ag-ui/browser-finalize-tracker.d.ts.map +0 -1
  603. package/esm/src/agent/ag-ui/browser-response-stream.d.ts +0 -33
  604. package/esm/src/agent/ag-ui/browser-response-stream.d.ts.map +0 -1
  605. package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.d.ts +0 -35
  606. package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.d.ts.map +0 -1
  607. package/esm/src/agent/ag-ui/runtime-browser-response.d.ts +0 -20
  608. package/esm/src/agent/ag-ui/runtime-browser-response.d.ts.map +0 -1
  609. package/esm/src/agent/ag-ui/runtime-browser-response.js +0 -16
  610. package/esm/src/agent/ag-ui/tracked-browser-response.d.ts +0 -11
  611. package/esm/src/agent/ag-ui/tracked-browser-response.d.ts.map +0 -1
@@ -12,6 +12,22 @@ const JSON_VALUE_MAX_SERIALIZED_BYTES = 4 * 1024 * 1024;
12
12
  const JSON_VALUE_MAX_STRING_BYTES = 1024 * 1024;
13
13
  const JSON_VALUE_MAX_KEY_BYTES = 16 * 1024;
14
14
  const JSON_UTF8_ENCODER = new TextEncoder();
15
+ const NativeSet = Set;
16
+ const OBJECT_PROTOTYPE = Object.prototype;
17
+ const arrayIsArray = Array.isArray;
18
+ const jsonStringify = JSON.stringify;
19
+ const numberIsFinite = Number.isFinite;
20
+ const numberIsSafeInteger = Number.isSafeInteger;
21
+ const objectDefineProperty = Object.defineProperty;
22
+ const reflectApply = Reflect.apply;
23
+ const reflectGetOwnPropertyDescriptor = Reflect.getOwnPropertyDescriptor;
24
+ const reflectGetPrototypeOf = Reflect.getPrototypeOf;
25
+ const reflectOwnKeys = Reflect.ownKeys;
26
+ const setAdd = Set.prototype.add;
27
+ const setDelete = Set.prototype.delete;
28
+ const setHas = Set.prototype.has;
29
+ const textEncoderEncode = TextEncoder.prototype.encode;
30
+ const typedArrayByteLengthGetter = reflectGetOwnPropertyDescriptor(reflectGetPrototypeOf(Uint8Array.prototype), "byteLength").get;
15
31
  function appendSnapshotPath(parent, segment) {
16
32
  return { parent, segment };
17
33
  }
@@ -19,22 +35,32 @@ function invalidSnapshotPath(path) {
19
35
  return { path };
20
36
  }
21
37
  function invalidJsonSnapshot(path) {
38
+ let segmentCount = 0;
39
+ for (let current = path; current !== undefined; current = current.parent) {
40
+ segmentCount += 1;
41
+ }
22
42
  const segments = [];
43
+ segments.length = segmentCount;
44
+ let index = segmentCount - 1;
23
45
  for (let current = path; current !== undefined; current = current.parent) {
24
- segments.push(current.segment);
46
+ defineOwnDataProperty(segments, index, current.segment);
47
+ index -= 1;
25
48
  }
26
- segments.reverse();
27
49
  return { success: false, path: segments };
28
50
  }
29
51
  function utf8LengthWithin(value, limit) {
30
52
  if (value.length > limit)
31
53
  return undefined;
32
- const byteLength = JSON_UTF8_ENCODER.encode(value).byteLength;
54
+ const byteLength = encodedByteLength(value);
33
55
  return byteLength <= limit ? byteLength : undefined;
34
56
  }
35
57
  function serializedByteLength(value) {
36
- const serialized = JSON.stringify(value);
37
- return serialized === undefined ? undefined : JSON_UTF8_ENCODER.encode(serialized).byteLength;
58
+ const serialized = jsonStringify(value);
59
+ return serialized === undefined ? undefined : encodedByteLength(serialized);
60
+ }
61
+ function encodedByteLength(value) {
62
+ const encoded = reflectApply(textEncoderEncode, JSON_UTF8_ENCODER, [value]);
63
+ return reflectApply(typedArrayByteLengthGetter, encoded, []);
38
64
  }
39
65
  /**
40
66
  * Creates a bounded, data-only snapshot of an unknown JSON value.
@@ -51,7 +77,7 @@ function serializedByteLength(value) {
51
77
  export function snapshotBoundedJsonValue(value) {
52
78
  let activePath;
53
79
  try {
54
- const activeAncestors = new Set();
80
+ const activeAncestors = new NativeSet();
55
81
  const stack = [{
56
82
  kind: "visit",
57
83
  value,
@@ -72,18 +98,19 @@ export function snapshotBoundedJsonValue(value) {
72
98
  rootAssigned = true;
73
99
  return;
74
100
  }
75
- if (Array.isArray(frame.parent)) {
76
- frame.parent[frame.key] = canonical;
101
+ if (arrayIsArray(frame.parent)) {
102
+ defineOwnDataProperty(frame.parent, frame.key, canonical);
77
103
  return;
78
104
  }
79
105
  defineOwnDataProperty(frame.parent, frame.key, canonical);
80
106
  };
81
107
  while (stack.length > 0) {
82
- const frame = stack.pop();
108
+ const frame = stack.length === 0 ? undefined : stack[stack.length - 1];
83
109
  if (!frame)
84
110
  break;
111
+ stack.length -= 1;
85
112
  if (frame.kind === "exit") {
86
- activeAncestors.delete(frame.value);
113
+ reflectApply(setDelete, activeAncestors, [frame.value]);
87
114
  continue;
88
115
  }
89
116
  activePath = frame.path;
@@ -111,7 +138,7 @@ export function snapshotBoundedJsonValue(value) {
111
138
  continue;
112
139
  }
113
140
  if (typeof current === "number") {
114
- if (!Number.isFinite(current))
141
+ if (!numberIsFinite(current))
115
142
  return invalidJsonSnapshot(frame.path);
116
143
  const bytes = serializedByteLength(current);
117
144
  if (bytes === undefined || !addSerializedBytes(bytes)) {
@@ -120,10 +147,11 @@ export function snapshotBoundedJsonValue(value) {
120
147
  assign(frame, current);
121
148
  continue;
122
149
  }
123
- if (typeof current !== "object" || activeAncestors.has(current)) {
150
+ if (typeof current !== "object" ||
151
+ reflectApply(setHas, activeAncestors, [current])) {
124
152
  return invalidJsonSnapshot(frame.path);
125
153
  }
126
- if (Array.isArray(current)) {
154
+ if (arrayIsArray(current)) {
127
155
  const invalidPath = snapshotArray(current, frame, stack, activeAncestors, addSerializedBytes, assign);
128
156
  if (invalidPath !== null)
129
157
  return invalidJsonSnapshot(invalidPath.path);
@@ -144,35 +172,36 @@ export function snapshotBoundedJsonValue(value) {
144
172
  }
145
173
  }
146
174
  function snapshotArray(value, frame, stack, activeAncestors, addSerializedBytes, assign) {
147
- const ownKeys = Reflect.ownKeys(value);
148
- const lengthDescriptor = Reflect.getOwnPropertyDescriptor(value, "length");
175
+ const ownKeys = reflectOwnKeys(value);
176
+ const lengthDescriptor = reflectGetOwnPropertyDescriptor(value, "length");
149
177
  const length = lengthDescriptor && "value" in lengthDescriptor
150
178
  ? lengthDescriptor.value
151
179
  : undefined;
152
180
  if (typeof length !== "number" ||
153
- !Number.isSafeInteger(length) ||
181
+ !numberIsSafeInteger(length) ||
154
182
  length < 0 ||
155
183
  length > JSON_VALUE_MAX_NODES ||
156
- ownKeys.some((key) => typeof key === "symbol") ||
184
+ hasSymbolKey(ownKeys) ||
157
185
  ownKeys.length !== length + 1 ||
158
- !ownKeys.includes("length") ||
159
- !addSerializedBytes(2 + Math.max(0, length - 1))) {
186
+ !hasStringKey(ownKeys, "length") ||
187
+ !addSerializedBytes(2 + (length > 0 ? length - 1 : 0))) {
160
188
  return invalidSnapshotPath(frame.path);
161
189
  }
162
190
  const values = [];
163
191
  for (let index = 0; index < length; index++) {
164
- const descriptor = Reflect.getOwnPropertyDescriptor(value, String(index));
192
+ const descriptor = reflectGetOwnPropertyDescriptor(value, `${index}`);
165
193
  if (!descriptor || !("value" in descriptor) || descriptor.enumerable !== true) {
166
194
  return invalidSnapshotPath(appendSnapshotPath(frame.path, index));
167
195
  }
168
- values.push(descriptor.value);
196
+ defineOwnDataProperty(values, values.length, descriptor.value);
169
197
  }
170
- const canonical = new Array(length);
198
+ const canonical = [];
199
+ canonical.length = length;
171
200
  assign(frame, canonical);
172
- activeAncestors.add(value);
173
- stack.push({ kind: "exit", value });
201
+ reflectApply(setAdd, activeAncestors, [value]);
202
+ defineOwnDataProperty(stack, stack.length, { kind: "exit", value });
174
203
  for (let index = values.length - 1; index >= 0; index--) {
175
- stack.push({
204
+ defineOwnDataProperty(stack, stack.length, {
176
205
  kind: "visit",
177
206
  value: values[index],
178
207
  depth: frame.depth + 1,
@@ -184,18 +213,19 @@ function snapshotArray(value, frame, stack, activeAncestors, addSerializedBytes,
184
213
  return null;
185
214
  }
186
215
  function snapshotObject(value, frame, stack, activeAncestors, addSerializedBytes, assign) {
187
- const prototype = Reflect.getPrototypeOf(value);
188
- if (prototype !== Object.prototype && prototype !== null) {
216
+ const prototype = reflectGetPrototypeOf(value);
217
+ if (prototype !== OBJECT_PROTOTYPE && prototype !== null) {
189
218
  return invalidSnapshotPath(frame.path);
190
219
  }
191
- const ownKeys = Reflect.ownKeys(value);
220
+ const ownKeys = reflectOwnKeys(value);
192
221
  if (ownKeys.length > JSON_VALUE_MAX_NODES ||
193
- ownKeys.some((key) => typeof key === "symbol") ||
194
- !addSerializedBytes(2 + Math.max(0, ownKeys.length - 1))) {
222
+ hasSymbolKey(ownKeys) ||
223
+ !addSerializedBytes(2 + (ownKeys.length > 0 ? ownKeys.length - 1 : 0))) {
195
224
  return invalidSnapshotPath(frame.path);
196
225
  }
197
226
  const values = [];
198
- for (const key of ownKeys) {
227
+ for (let index = 0; index < ownKeys.length; index++) {
228
+ const key = ownKeys[index];
199
229
  const childPath = appendSnapshotPath(frame.path, key);
200
230
  if (utf8LengthWithin(key, JSON_VALUE_MAX_KEY_BYTES) === undefined) {
201
231
  return invalidSnapshotPath(childPath);
@@ -204,18 +234,18 @@ function snapshotObject(value, frame, stack, activeAncestors, addSerializedBytes
204
234
  if (keyBytes === undefined || !addSerializedBytes(keyBytes + 1)) {
205
235
  return invalidSnapshotPath(childPath);
206
236
  }
207
- const descriptor = Reflect.getOwnPropertyDescriptor(value, key);
237
+ const descriptor = reflectGetOwnPropertyDescriptor(value, key);
208
238
  if (!descriptor || !("value" in descriptor) || descriptor.enumerable !== true) {
209
239
  return invalidSnapshotPath(childPath);
210
240
  }
211
- values.push(descriptor.value);
241
+ defineOwnDataProperty(values, values.length, descriptor.value);
212
242
  }
213
243
  const canonical = {};
214
244
  assign(frame, canonical);
215
- activeAncestors.add(value);
216
- stack.push({ kind: "exit", value });
245
+ reflectApply(setAdd, activeAncestors, [value]);
246
+ defineOwnDataProperty(stack, stack.length, { kind: "exit", value });
217
247
  for (let index = values.length - 1; index >= 0; index--) {
218
- stack.push({
248
+ defineOwnDataProperty(stack, stack.length, {
219
249
  kind: "visit",
220
250
  value: values[index],
221
251
  depth: frame.depth + 1,
@@ -226,8 +256,22 @@ function snapshotObject(value, frame, stack, activeAncestors, addSerializedBytes
226
256
  }
227
257
  return null;
228
258
  }
259
+ function hasSymbolKey(keys) {
260
+ for (let index = 0; index < keys.length; index++) {
261
+ if (typeof keys[index] === "symbol")
262
+ return true;
263
+ }
264
+ return false;
265
+ }
266
+ function hasStringKey(keys, expected) {
267
+ for (let index = 0; index < keys.length; index++) {
268
+ if (keys[index] === expected)
269
+ return true;
270
+ }
271
+ return false;
272
+ }
229
273
  function defineOwnDataProperty(target, key, value) {
230
- Object.defineProperty(target, key, {
274
+ objectDefineProperty(target, key, {
231
275
  value,
232
276
  enumerable: true,
233
277
  configurable: true,
@@ -1,6 +1,6 @@
1
1
  import { runWithCacheBatching } from "../../cache/request-cache-batcher.js";
2
2
  import { runWithVerifiedCacheApiCredential } from "../../cache/verified-api-credential-context.js";
3
- import { getHostEnv } from "../../platform/compat/process.js";
3
+ import { getHostEnv } from "../../platform/compat/process/env.js";
4
4
  import { getErrorMessage as formatErrorMessage } from "../../errors/veryfront-error.js";
5
5
  import { AUTHENTICATION_REQUIRED } from "../../errors/index.js";
6
6
  import { serverLogger } from "../../utils/index.js";
@@ -28,6 +28,7 @@ export declare class ProjectWorker {
28
28
  private suppressIdleNotifications;
29
29
  private requestTimeoutMs;
30
30
  private readonly permissions;
31
+ private readonly assertReadScopeGenerationConfined;
31
32
  private workerScriptUrl?;
32
33
  private readonly isolatedSsrRendererModuleUrl?;
33
34
  private egressResolveHost?;
@@ -1 +1 @@
1
- {"version":3,"file":"project-worker.d.ts","sourceRoot":"","sources":["../../../../src/src/security/sandbox/project-worker.ts"],"names":[],"mappings":"AAsBA,OAAO,EACL,KAAK,iBAAiB,EAGvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,KAAK,EAEV,aAAa,EACb,cAAc,EAQf,MAAM,mBAAmB,CAAC;AAmP3B,M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3B;IAED,IAAI,kBAAkB,IAAI,OAAO,CAEhC;IAED,8EAA8E;IAC9E,MAAM,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAUxC;;OAEG;IACH,KAAK,IAAI,IAAI;IAyGb;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAqExD;;;;;;OAMG;IACH,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,cAAc,CAAC,UAAU,CAAC;IAwMjE;;OAEG;IACG,SAAS,CAAC,SAAS,SAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;IAuCpD;;OAEG;IACH,gBAAgB,IAAI,IAAI;IAQxB;;OAEG;IACH,SAAS,IAAI,IAAI;IAKjB;;;;;;OAMG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAQzB,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,aAAa;IA2DrB,OAAO,CAAC,gBAAgB;IAUxB,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,aAAa;IAoErB,OAAO,CAAC,oBAAoB;IA8I5B,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,gBAAgB;CAazB"}
@@ -14,6 +14,7 @@ import { validateIsolatedSsrRendererModuleUrl } from "../../extensions/rendering
14
14
  import { INVALID_ARGUMENT, SSR_OUTPUT_LIMIT_EXCEEDED, TIMEOUT_ERROR, UNKNOWN_ERROR, } from "../../errors/index.js";
15
15
  import { MAX_TIMER_DELAY_MS } from "../../utils/timer.js";
16
16
  import { startWorkerEgressBroker, } from "./worker-egress-guard.js";
17
+ import { createWorkerReadScopeGenerationAudit } from "./worker-read-scope.js";
17
18
  import { deserializeWorkerError } from "./worker-error-boundary.js";
18
19
  import { MAX_WORKER_REQUEST_ID_CHARS, MAX_WORKER_SSR_CHUNK_BYTES, MAX_WORKER_SSR_OUTPUT_BYTES, MAX_WORKER_SSR_OUTPUT_CHUNKS, } from "./worker-types.js";
19
20
  const logger = serverLogger.component("project-worker");
@@ -319,6 +320,7 @@ export class ProjectWorker {
319
320
  suppressIdleNotifications = false;
320
321
  requestTimeoutMs;
321
322
  permissions;
323
+ assertReadScopeGenerationConfined;
322
324
  workerScriptUrl;
323
325
  isolatedSsrRendererModuleUrl;
324
326
  egressResolveHost;
@@ -331,6 +333,7 @@ export class ProjectWorker {
331
333
  constructor(options) {
332
334
  this.projectId = options.projectId;
333
335
  this.permissions = snapshotWorkerPermissions(options.permissions);
336
+ this.assertReadScopeGenerationConfined = createWorkerReadScopeGenerationAudit(this.permissions.read);
334
337
  this.requestTimeoutMs = requireRequestTimeoutMs(options.requestTimeoutMs);
335
338
  this.workerScriptUrl = options.workerScriptUrl;
336
339
  this.isolatedSsrRendererModuleUrl = options.isolatedSsrRendererModuleUrl === undefined
@@ -381,6 +384,7 @@ export class ProjectWorker {
381
384
  message: "Custom project worker scripts cannot use unrestricted network permissions",
382
385
  });
383
386
  }
387
+ this.assertReadScopeGenerationConfined();
384
388
  const allowInternalEgress = this.allowInternalEgress;
385
389
  let workerPermissions = this.permissions;
386
390
  if (this.permissions.net === true) {
@@ -482,6 +486,7 @@ export class ProjectWorker {
482
486
  if (!this.worker || this._status === "crashed" || this._status === "terminated") {
483
487
  return Promise.reject(UNKNOWN_ERROR.create({ detail: `Worker not available (status: ${this._status})` }));
484
488
  }
489
+ this.assertReadScopeGenerationConfined();
485
490
  if (this.pending.has(requestId)) {
486
491
  return Promise.reject(UNKNOWN_ERROR.create({ detail: "Duplicate worker request id" }));
487
492
  }
@@ -546,6 +551,7 @@ export class ProjectWorker {
546
551
  if (!this.worker || this._status === "crashed" || this._status === "terminated") {
547
552
  throw UNKNOWN_ERROR.create({ detail: `Worker not available (status: ${this._status})` });
548
553
  }
554
+ this.assertReadScopeGenerationConfined();
549
555
  if (this.pending.has(requestId) || this.streamHandlers.has(requestId)) {
550
556
  throw UNKNOWN_ERROR.create({ detail: "Duplicate worker request id" });
551
557
  }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Reject scoped worker roots that contain a symlink escape.
3
+ *
4
+ * Deno authorizes reads using the symlink location rather than its resolved
5
+ * target. Project workers cannot create new symlinks because write access is
6
+ * denied. Use {@link createWorkerReadScopeGenerationAudit} for pooled workers
7
+ * so this full-tree scan runs once per immutable source generation.
8
+ */
9
+ export declare function assertWorkerReadScopeConfined(readScope: readonly string[] | boolean): void;
10
+ /**
11
+ * Create a successful-once read-scope audit for one immutable worker source
12
+ * generation.
13
+ *
14
+ * Host source changes must rotate the worker generation identity or evict its
15
+ * pool scope. The replacement worker receives a new audit and scans the new
16
+ * tree before startup. Reusing this closure across mutable source generations
17
+ * would violate that host-owned lifecycle contract.
18
+ */
19
+ export declare function createWorkerReadScopeGenerationAudit(readScope: readonly string[] | boolean): () => void;
20
+ //# sourceMappingURL=worker-read-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-read-scope.d.ts","sourceRoot":"","sources":["../../../../src/src/security/sandbox/worker-read-scope.ts"],"names":[],"mappings":"AAsDA;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,GACrC,IAAI,CAoDN;AAED;;;;;;;;GAQG;AACH,wBAAgB,oCAAoC,CAClD,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,GACrC,MAAM,IAAI,CAQZ"}
@@ -0,0 +1,127 @@
1
+ import * as dntShim from "../../../_dnt.shims.js";
2
+ import { dirname, join, relative } from "../../platform/compat/path/index.js";
3
+ import { SECURITY_VIOLATION } from "../../errors/index.js";
4
+ import { isNotFoundError } from "../../platform/compat/fs.js";
5
+ import { isWithinDirectory } from "../path-validation.js";
6
+ function rejectUnconfinedReadScope() {
7
+ throw SECURITY_VIOLATION.create({
8
+ detail: "Worker read scope contains a symlink outside its allowed roots",
9
+ });
10
+ }
11
+ function directorySymlinkCanEscape(linkPath, targetPath, physicalRoots) {
12
+ for (const sourceRoot of physicalRoots) {
13
+ if (!isWithinDirectory(sourceRoot, linkPath))
14
+ continue;
15
+ const sourceRelativePath = relative(sourceRoot, linkPath);
16
+ const parentSteps = sourceRelativePath === "."
17
+ ? 0
18
+ : sourceRelativePath.split("/").filter(Boolean).length;
19
+ let targetAncestor = targetPath;
20
+ for (let index = 0; index < parentSteps; index += 1) {
21
+ targetAncestor = dirname(targetAncestor);
22
+ }
23
+ if (!physicalRoots.some((root) => isWithinDirectory(root, targetAncestor))) {
24
+ return true;
25
+ }
26
+ }
27
+ return false;
28
+ }
29
+ function assertSymlinkConfined(linkPath, physicalRoots) {
30
+ let target;
31
+ let targetMetadata;
32
+ try {
33
+ target = dntShim.Deno.realPathSync(linkPath);
34
+ targetMetadata = dntShim.Deno.statSync(target);
35
+ }
36
+ catch {
37
+ rejectUnconfinedReadScope();
38
+ }
39
+ if (!physicalRoots.some((root) => isWithinDirectory(root, target)) ||
40
+ (targetMetadata.isDirectory && directorySymlinkCanEscape(linkPath, target, physicalRoots))) {
41
+ rejectUnconfinedReadScope();
42
+ }
43
+ }
44
+ /**
45
+ * Reject scoped worker roots that contain a symlink escape.
46
+ *
47
+ * Deno authorizes reads using the symlink location rather than its resolved
48
+ * target. Project workers cannot create new symlinks because write access is
49
+ * denied. Use {@link createWorkerReadScopeGenerationAudit} for pooled workers
50
+ * so this full-tree scan runs once per immutable source generation.
51
+ */
52
+ export function assertWorkerReadScopeConfined(readScope) {
53
+ if (!Array.isArray(readScope) || readScope.length === 0)
54
+ return;
55
+ const physicalRoots = [];
56
+ for (const root of readScope) {
57
+ try {
58
+ if (dntShim.Deno.lstatSync(root).isSymlink) {
59
+ rejectUnconfinedReadScope();
60
+ }
61
+ physicalRoots.push(dntShim.Deno.realPathSync(root));
62
+ }
63
+ catch (error) {
64
+ // A missing optional support path grants nothing at startup. Project
65
+ // workers cannot create it because their write permission is denied.
66
+ if (isNotFoundError(error))
67
+ continue;
68
+ rejectUnconfinedReadScope();
69
+ }
70
+ }
71
+ const pending = [...new Set(physicalRoots)];
72
+ const visitedDirectories = new Set();
73
+ while (pending.length > 0) {
74
+ const current = pending.pop();
75
+ if (!current)
76
+ continue;
77
+ let metadata;
78
+ try {
79
+ metadata = dntShim.Deno.lstatSync(current);
80
+ }
81
+ catch {
82
+ rejectUnconfinedReadScope();
83
+ }
84
+ if (metadata.isSymlink) {
85
+ assertSymlinkConfined(current, physicalRoots);
86
+ continue;
87
+ }
88
+ if (!metadata.isDirectory)
89
+ continue;
90
+ if (visitedDirectories.has(current))
91
+ continue;
92
+ visitedDirectories.add(current);
93
+ try {
94
+ for (const entry of dntShim.Deno.readDirSync(current)) {
95
+ const entryPath = join(current, entry.name);
96
+ if (entry.isSymlink) {
97
+ assertSymlinkConfined(entryPath, physicalRoots);
98
+ }
99
+ else if (entry.isDirectory) {
100
+ pending.push(entryPath);
101
+ }
102
+ }
103
+ }
104
+ catch {
105
+ rejectUnconfinedReadScope();
106
+ }
107
+ }
108
+ }
109
+ /**
110
+ * Create a successful-once read-scope audit for one immutable worker source
111
+ * generation.
112
+ *
113
+ * Host source changes must rotate the worker generation identity or evict its
114
+ * pool scope. The replacement worker receives a new audit and scans the new
115
+ * tree before startup. Reusing this closure across mutable source generations
116
+ * would violate that host-owned lifecycle contract.
117
+ */
118
+ export function createWorkerReadScopeGenerationAudit(readScope) {
119
+ const generationReadScope = Array.isArray(readScope) ? [...readScope] : readScope;
120
+ let complete = false;
121
+ return () => {
122
+ if (complete)
123
+ return;
124
+ assertWorkerReadScopeConfined(generationReadScope);
125
+ complete = true;
126
+ };
127
+ }
@@ -81,6 +81,18 @@ export interface SerializedDataResult {
81
81
  };
82
82
  notFound?: boolean;
83
83
  revalidate?: number | false;
84
+ headers?: Record<string, string>;
85
+ cookies?: Array<{
86
+ name: string;
87
+ value: string;
88
+ domain?: string;
89
+ path?: string;
90
+ expires?: string;
91
+ maxAge?: number;
92
+ httpOnly?: boolean;
93
+ secure?: boolean;
94
+ sameSite?: "lax" | "strict" | "none";
95
+ }>;
84
96
  }
85
97
  /**
86
98
  * Immutable, host-prepared JavaScript sent across the worker boundary.
@@ -1 +1 @@
1
- {"version":3,"file":"worker-types.d.ts","sourceRoot":"","sources":["../../../../src/src/security/sandbox/worker-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC5B,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC5B,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC5B,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC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B,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAG9E;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,QAAQ,GAAG,IAAI,CAQ5C"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../../src/src/server/handlers/dev/dashboard/api.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA4GrD,KAAK,kBAAkB,GAAG,KAAK,GAAG,MAAM,CAAC;AA2CzC,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAG9E;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,QAAQ,GAAG,IAAI,CAQ5C"}
@@ -55,6 +55,63 @@ const TEXT_EXTENSIONS = new Set([
55
55
  "gitignore",
56
56
  "dockerignore",
57
57
  ]);
58
+ const SENSITIVE_DASHBOARD_FILE_NAMES = new Set([
59
+ ".envrc",
60
+ ".netrc",
61
+ ".npmrc",
62
+ ".pypirc",
63
+ "application_default_credentials.json",
64
+ "credentials.json",
65
+ "env",
66
+ "id_ed25519",
67
+ "id_rsa",
68
+ "secrets.json",
69
+ "service-account.json",
70
+ ]);
71
+ const SENSITIVE_DASHBOARD_FILE_EXTENSIONS = new Set([
72
+ "env",
73
+ "key",
74
+ "p12",
75
+ "pem",
76
+ "pfx",
77
+ ]);
78
+ const SENSITIVE_DASHBOARD_DIRECTORY_NAMES = new Set([
79
+ ".aws",
80
+ ".docker",
81
+ ".git",
82
+ ".gnupg",
83
+ ".kube",
84
+ ".ssh",
85
+ ]);
86
+ const SAFE_ENV_TEMPLATE_NAMES = new Set([
87
+ ".env.example",
88
+ ".env.sample",
89
+ ".env.template",
90
+ ]);
91
+ const UNAVAILABLE_FILE_MESSAGE = "File content is not available";
92
+ function isSensitiveDashboardPath(path, kind) {
93
+ const segments = path.replaceAll("\\", "/").split("/").filter(Boolean).map((segment) => segment.toLowerCase().replace(/[ .]+$/g, ""));
94
+ // A colon addresses an alternate data stream on NTFS. Treat stream paths as
95
+ // unavailable so a sensitive file cannot be reached through an alias such as
96
+ // `.env::$DATA`.
97
+ if (segments.some((segment) => segment.includes(":")))
98
+ return true;
99
+ if (segments.some((segment) => SENSITIVE_DASHBOARD_DIRECTORY_NAMES.has(segment)))
100
+ return true;
101
+ if (kind === "directory")
102
+ return false;
103
+ const fileName = segments.at(-1);
104
+ if (!fileName)
105
+ return false;
106
+ if (SAFE_ENV_TEMPLATE_NAMES.has(fileName))
107
+ return false;
108
+ if (fileName === ".env" || fileName.startsWith(".env."))
109
+ return true;
110
+ if (SENSITIVE_DASHBOARD_FILE_NAMES.has(fileName))
111
+ return true;
112
+ const extension = fileName.includes(".") ? fileName.slice(fileName.lastIndexOf(".") + 1) : "";
113
+ return SENSITIVE_DASHBOARD_FILE_EXTENSIONS.has(extension);
114
+ }
58
115
  const GET_DASHBOARD_API_ROUTES = {
59
116
  "/_dev/api/stats": () => handleStats(),
60
117
  "/_dev/api/tools": () => handleListTools(),
@@ -348,15 +405,21 @@ async function handleListFiles(req, ctx) {
348
405
  const canonical = await validateRelativePath(relativePath, projectDir, adapter);
349
406
  if (canonical === null)
350
407
  return errorResponse("Invalid path", 400);
408
+ if (isSensitiveDashboardPath(relativePath, "directory")) {
409
+ return errorResponse(UNAVAILABLE_FILE_MESSAGE, 403);
410
+ }
351
411
  fullPath = canonical;
352
412
  }
353
413
  try {
354
414
  const files = [];
355
415
  for await (const entry of adapter.fs.readDir(fullPath)) {
416
+ const entryPath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
417
+ if (isSensitiveDashboardPath(entryPath, entry.isDirectory ? "directory" : "file"))
418
+ continue;
356
419
  files.push({
357
420
  name: entry.name,
358
421
  type: entry.isDirectory ? "directory" : "file",
359
- path: relativePath ? `${relativePath}/${entry.name}` : entry.name,
422
+ path: entryPath,
360
423
  });
361
424
  }
362
425
  files.sort((a, b) => a.type !== b.type ? (a.type === "directory" ? -1 : 1) : a.name.localeCompare(b.name));
@@ -383,10 +446,14 @@ async function handleReadFileContent(req, ctx) {
383
446
  const canonical = await validateRelativePath(relativePath, projectDir, adapter);
384
447
  if (canonical === null)
385
448
  return errorResponse("Invalid path", 400);
449
+ if (isSensitiveDashboardPath(relativePath, "file")) {
450
+ return errorResponse(UNAVAILABLE_FILE_MESSAGE, 403);
451
+ }
386
452
  try {
387
453
  const content = await adapter.fs.readFile(canonical);
388
- const extension = relativePath.split(".").pop() ?? "";
389
- if (!TEXT_EXTENSIONS.has(extension.toLowerCase())) {
454
+ const fileName = relativePath.replaceAll("\\", "/").split("/").at(-1)?.toLowerCase() ?? "";
455
+ const extension = fileName.split(".").pop() ?? "";
456
+ if (!TEXT_EXTENSIONS.has(extension) && !SAFE_ENV_TEMPLATE_NAMES.has(fileName)) {
390
457
  return jsonResponse({
391
458
  path: relativePath,
392
459
  extension,
@@ -4,6 +4,7 @@ import { type LockfileManager } from "../../../../utils/import-lockfile.js";
4
4
  import { type DependencyPinningSourceInput } from "../../../../transforms/esm/package-registry.js";
5
5
  export interface RelativeFsPluginOptions {
6
6
  enforceBrowserBoundaries?: boolean;
7
+ serverExternalPackages?: readonly string[];
7
8
  /**
8
9
  * Root-bound, symlink-safe, bounded read authority for browser builds. When
9
10
  * supplied, the read itself replaces mutable directory-walk admission.
@@ -24,12 +25,16 @@ interface BareExternalPluginOptions {
24
25
  dependencyPinningSource?: DependencyPinningSourceInput;
25
26
  strict?: boolean;
26
27
  importMapImports?: Record<string, string>;
28
+ /** Bare npm package roots explicitly declared as server-only by the project. */
29
+ serverExternalPackages?: readonly string[];
27
30
  }
28
31
  /** Create bare module external plugin that rewrites npm imports to esm.sh URLs */
29
32
  export declare function createBareExternalPlugin(options?: BareExternalPluginOptions | boolean): Plugin;
30
33
  interface HttpExternalPluginOptions {
31
34
  moduleServerOrigin?: string;
32
35
  dependencyPinningCacheKey?: string;
36
+ projectDir?: string;
37
+ serverExternalPackages?: readonly string[];
33
38
  }
34
39
  export declare function createHttpExternalPlugin(options?: HttpExternalPluginOptions): Plugin;
35
40
  export {};