veryfront 0.1.1189 → 0.1.1191

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 (663) hide show
  1. package/esm/cli/commands/analyze-chunks/command.d.ts.map +1 -1
  2. package/esm/cli/commands/analyze-chunks/command.js +3 -1
  3. package/esm/cli/commands/schedule/command-help.d.ts.map +1 -1
  4. package/esm/cli/commands/schedule/command-help.js +5 -1
  5. package/esm/cli/commands/schedule/handler.d.ts +17 -0
  6. package/esm/cli/commands/schedule/handler.d.ts.map +1 -1
  7. package/esm/cli/commands/schedule/handler.js +119 -29
  8. package/esm/cli/commands/serve/command.d.ts.map +1 -1
  9. package/esm/cli/commands/serve/command.js +5 -24
  10. package/esm/cli/commands/serve/proxy-extension-composition.d.ts +6 -5
  11. package/esm/cli/commands/serve/proxy-extension-composition.d.ts.map +1 -1
  12. package/esm/cli/commands/serve/proxy-extension-composition.js +58 -29
  13. package/esm/cli/commands/serve/proxy-runtime.d.ts +17 -0
  14. package/esm/cli/commands/serve/proxy-runtime.d.ts.map +1 -0
  15. package/esm/cli/commands/serve/proxy-runtime.js +54 -0
  16. package/esm/cli/commands/webhook/command-help.d.ts.map +1 -1
  17. package/esm/cli/commands/webhook/command-help.js +5 -1
  18. package/esm/cli/commands/webhook/handler.d.ts +5 -0
  19. package/esm/cli/commands/webhook/handler.d.ts.map +1 -1
  20. package/esm/cli/commands/webhook/handler.js +62 -7
  21. package/esm/cli/mcp/dev-server-client.d.ts +6 -0
  22. package/esm/cli/mcp/dev-server-client.d.ts.map +1 -1
  23. package/esm/cli/mcp/dev-server-client.js +117 -5
  24. package/esm/cli/shared/config.d.ts +15 -1
  25. package/esm/cli/shared/config.d.ts.map +1 -1
  26. package/esm/cli/shared/config.js +24 -15
  27. package/esm/cli/shared/deployment/control-plane.d.ts +9 -2
  28. package/esm/cli/shared/deployment/control-plane.d.ts.map +1 -1
  29. package/esm/cli/shared/deployment/control-plane.js +7 -2
  30. package/esm/cli/shared/deployment/deploy-project.d.ts +2 -2
  31. package/esm/cli/shared/deployment/deploy-project.d.ts.map +1 -1
  32. package/esm/cli/shared/deployment/deploy-project.js +97 -28
  33. package/esm/cli/templates/manifest.d.ts +2 -0
  34. package/esm/cli/templates/manifest.js +9 -7
  35. package/esm/deno.d.ts +5 -0
  36. package/esm/deno.js +13 -5
  37. package/esm/extensions/ext-llm-anthropic/src/anthropic-native-content.d.ts.map +1 -1
  38. package/esm/extensions/ext-llm-anthropic/src/anthropic-native-content.js +2 -2
  39. package/esm/extensions/ext-llm-google/src/google-thought-signatures.d.ts.map +1 -1
  40. package/esm/extensions/ext-llm-google/src/google-thought-signatures.js +2 -2
  41. package/esm/extensions/ext-llm-openai/src/openai-web-search.d.ts.map +1 -1
  42. package/esm/extensions/ext-llm-openai/src/openai-web-search.js +2 -2
  43. package/esm/src/agent/conversation/durable.d.ts.map +1 -1
  44. package/esm/src/agent/conversation/durable.js +61 -50
  45. package/esm/src/agent/conversation/private-run-event.d.ts +13 -0
  46. package/esm/src/agent/conversation/private-run-event.d.ts.map +1 -0
  47. package/esm/src/agent/conversation/private-run-event.js +38 -0
  48. package/esm/src/agent/conversation/run-event-limits.d.ts +6 -3
  49. package/esm/src/agent/conversation/run-event-limits.d.ts.map +1 -1
  50. package/esm/src/agent/conversation/run-event-limits.js +17 -3
  51. package/esm/src/agent/conversation/run-event-normalization.d.ts.map +1 -1
  52. package/esm/src/agent/conversation/run-event-normalization.js +5 -3
  53. package/esm/src/agent/hosted/chat-execution-runtime.d.ts +3 -3
  54. package/esm/src/agent/hosted/chat-execution-runtime.d.ts.map +1 -1
  55. package/esm/src/agent/hosted/chat-execution-runtime.js +14 -16
  56. package/esm/src/agent/hosted/child-fork-execution-runner.d.ts.map +1 -1
  57. package/esm/src/agent/hosted/child-fork-execution-runner.js +10 -12
  58. package/esm/src/agent/hosted/child-fork-run-context.d.ts.map +1 -1
  59. package/esm/src/agent/hosted/child-fork-run-context.js +4 -1
  60. package/esm/src/agent/hosted/child-pending-tool-lifecycle.d.ts +1 -0
  61. package/esm/src/agent/hosted/child-pending-tool-lifecycle.d.ts.map +1 -1
  62. package/esm/src/agent/hosted/child-pending-tool-lifecycle.js +8 -2
  63. package/esm/src/agent/hosted/child-tool-input.d.ts +1 -0
  64. package/esm/src/agent/hosted/child-tool-input.d.ts.map +1 -1
  65. package/esm/src/agent/hosted/child-tool-input.js +14 -1
  66. package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts.map +1 -1
  67. package/esm/src/agent/hosted/cloud-agent-chat-execution.js +3 -3
  68. package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts +2 -1
  69. package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts.map +1 -1
  70. package/esm/src/agent/hosted/cloud-agent-child-tools.js +12 -6
  71. package/esm/src/agent/hosted/cloud-agent-config.d.ts +3 -0
  72. package/esm/src/agent/hosted/cloud-agent-config.d.ts.map +1 -1
  73. package/esm/src/agent/hosted/cloud-agent-config.js +5 -0
  74. package/esm/src/agent/hosted/cloud-agent-provider-bootstrap.d.ts +2 -0
  75. package/esm/src/agent/hosted/cloud-agent-provider-bootstrap.d.ts.map +1 -1
  76. package/esm/src/agent/hosted/durable-run-event-sink.d.ts +10 -0
  77. package/esm/src/agent/hosted/durable-run-event-sink.d.ts.map +1 -0
  78. package/esm/src/agent/hosted/durable-run-event-sink.js +102 -0
  79. package/esm/src/agent/hosted/project-reference-resolver.d.ts +5 -0
  80. package/esm/src/agent/hosted/project-reference-resolver.d.ts.map +1 -1
  81. package/esm/src/agent/hosted/project-reference-resolver.js +63 -8
  82. package/esm/src/agent/hosted/veryfront-cloud-agent-service.d.ts +10 -0
  83. package/esm/src/agent/hosted/veryfront-cloud-agent-service.d.ts.map +1 -1
  84. package/esm/src/agent/index.d.ts +2 -1
  85. package/esm/src/agent/index.d.ts.map +1 -1
  86. package/esm/src/agent/index.js +1 -0
  87. package/esm/src/agent/runtime/agent-invocation-contract.d.ts +9 -2
  88. package/esm/src/agent/runtime/agent-invocation-contract.d.ts.map +1 -1
  89. package/esm/src/agent/runtime/agent-invocation-contract.js +38 -3
  90. package/esm/src/agent/runtime/error-utils.d.ts +2 -0
  91. package/esm/src/agent/runtime/error-utils.d.ts.map +1 -1
  92. package/esm/src/agent/runtime/error-utils.js +300 -5
  93. package/esm/src/agent/runtime/index.d.ts.map +1 -1
  94. package/esm/src/agent/runtime/index.js +0 -6
  95. package/esm/src/agent/runtime/model-resolution.js +36 -36
  96. package/esm/src/agent/schemas/agent.schema.d.ts +4 -4
  97. package/esm/src/agent/service/config.d.ts.map +1 -1
  98. package/esm/src/agent/service/config.js +4 -1
  99. package/esm/src/agent/types.d.ts +0 -7
  100. package/esm/src/agent/types.d.ts.map +1 -1
  101. package/esm/src/build/production-build/templates.d.ts.map +1 -1
  102. package/esm/src/build/production-build/templates.js +1 -1
  103. package/esm/src/cache/config-hash.d.ts.map +1 -1
  104. package/esm/src/cache/config-hash.js +39 -26
  105. package/esm/src/cache/keys/builders/render.d.ts +4 -1
  106. package/esm/src/cache/keys/builders/render.d.ts.map +1 -1
  107. package/esm/src/cache/keys/builders/render.js +13 -3
  108. package/esm/src/channels/control-plane.d.ts +17 -0
  109. package/esm/src/channels/control-plane.d.ts.map +1 -1
  110. package/esm/src/channels/control-plane.js +32 -0
  111. package/esm/src/discovery/handlers/schedule-handler.d.ts.map +1 -1
  112. package/esm/src/discovery/handlers/schedule-handler.js +2 -1
  113. package/esm/src/discovery/handlers/webhook-handler.d.ts.map +1 -1
  114. package/esm/src/discovery/handlers/webhook-handler.js +2 -1
  115. package/esm/src/embedding/local-json-store-lock.d.ts +15 -0
  116. package/esm/src/embedding/local-json-store-lock.d.ts.map +1 -0
  117. package/esm/src/embedding/local-json-store-lock.js +457 -0
  118. package/esm/src/embedding/rag-store.d.ts.map +1 -1
  119. package/esm/src/embedding/rag-store.js +342 -165
  120. package/esm/src/errors/catalog/module-errors.d.ts.map +1 -1
  121. package/esm/src/errors/catalog/module-errors.js +10 -0
  122. package/esm/src/errors/error-registry/agent.d.ts +2 -0
  123. package/esm/src/errors/error-registry/agent.d.ts.map +1 -1
  124. package/esm/src/errors/error-registry/agent.js +8 -0
  125. package/esm/src/errors/error-registry/module.d.ts +4 -0
  126. package/esm/src/errors/error-registry/module.d.ts.map +1 -1
  127. package/esm/src/errors/error-registry/module.js +16 -0
  128. package/esm/src/errors/error-registry/server.d.ts +6 -0
  129. package/esm/src/errors/error-registry/server.d.ts.map +1 -1
  130. package/esm/src/errors/error-registry/server.js +18 -0
  131. package/esm/src/errors/error-registry.d.ts +5 -0
  132. package/esm/src/errors/error-registry.d.ts.map +1 -1
  133. package/esm/src/errors/index.d.ts +1 -1
  134. package/esm/src/errors/index.d.ts.map +1 -1
  135. package/esm/src/errors/index.js +3 -3
  136. package/esm/src/errors/types.d.ts.map +1 -1
  137. package/esm/src/errors/types.js +5 -2
  138. package/esm/src/eval/studio.d.ts +1 -1
  139. package/esm/src/extensions/builtin-extensions.d.ts +10 -10
  140. package/esm/src/extensions/builtin-extensions.d.ts.map +1 -1
  141. package/esm/src/extensions/builtin-extensions.js +22 -63
  142. package/esm/src/extensions/bundler/bundler.d.ts +8 -0
  143. package/esm/src/extensions/bundler/bundler.d.ts.map +1 -1
  144. package/esm/src/extensions/distributed/rate-limit-support.d.ts +3 -1
  145. package/esm/src/extensions/distributed/rate-limit-support.d.ts.map +1 -1
  146. package/esm/src/extensions/distributed/rate-limit-support.js +3 -1
  147. package/esm/src/extensions/first-party-defaults.d.ts +105 -0
  148. package/esm/src/extensions/first-party-defaults.d.ts.map +1 -0
  149. package/esm/src/extensions/first-party-defaults.js +178 -0
  150. package/esm/src/extensions/orchestrate.d.ts.map +1 -1
  151. package/esm/src/extensions/orchestrate.js +41 -4
  152. package/esm/src/extensions/websocket/node-websocket-server-provider.d.ts +4 -4
  153. package/esm/src/extensions/websocket/node-websocket-server-provider.d.ts.map +1 -1
  154. package/esm/src/extensions/websocket/node-websocket-server-provider.js +4 -4
  155. package/esm/src/html/dev-scripts.d.ts.map +1 -1
  156. package/esm/src/html/dev-scripts.js +2 -1
  157. package/esm/src/html/html-injection.d.ts.map +1 -1
  158. package/esm/src/html/html-injection.js +37 -3
  159. package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
  160. package/esm/src/html/index.d.ts +1 -0
  161. package/esm/src/html/index.d.ts.map +1 -1
  162. package/esm/src/html/index.js +1 -0
  163. package/esm/src/html/project-stylesheet-ids.d.ts +4 -0
  164. package/esm/src/html/project-stylesheet-ids.d.ts.map +1 -0
  165. package/esm/src/html/project-stylesheet-ids.js +6 -0
  166. package/esm/src/internal-agents/schema.d.ts +2 -0
  167. package/esm/src/internal-agents/schema.d.ts.map +1 -1
  168. package/esm/src/internal-agents/schema.js +4 -1
  169. package/esm/src/middleware/builtin/security/rate-limit.d.ts +26 -1
  170. package/esm/src/middleware/builtin/security/rate-limit.d.ts.map +1 -1
  171. package/esm/src/middleware/builtin/security/rate-limit.js +164 -36
  172. package/esm/src/middleware/builtin/security/redis-rate-limit-script.d.ts +2 -0
  173. package/esm/src/middleware/builtin/security/redis-rate-limit-script.d.ts.map +1 -0
  174. package/esm/src/middleware/builtin/security/redis-rate-limit-script.js +9 -0
  175. package/esm/src/middleware/builtin/security/redis-rate-limit.d.ts +13 -2
  176. package/esm/src/middleware/builtin/security/redis-rate-limit.d.ts.map +1 -1
  177. package/esm/src/middleware/builtin/security/redis-rate-limit.js +88 -20
  178. package/esm/src/middleware/index.d.ts +1 -1
  179. package/esm/src/middleware/index.d.ts.map +1 -1
  180. package/esm/src/modules/import-map/loader.d.ts +2 -1
  181. package/esm/src/modules/import-map/loader.d.ts.map +1 -1
  182. package/esm/src/modules/import-map/loader.js +210 -81
  183. package/esm/src/modules/import-map/merger.d.ts.map +1 -1
  184. package/esm/src/modules/import-map/merger.js +57 -11
  185. package/esm/src/modules/import-map/preloader.d.ts +83 -2
  186. package/esm/src/modules/import-map/preloader.d.ts.map +1 -1
  187. package/esm/src/modules/import-map/preloader.js +824 -25
  188. package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
  189. package/esm/src/modules/react-loader/ssr-module-loader/loader.js +28 -1
  190. package/esm/src/modules/server/browser-module-admission.d.ts +27 -0
  191. package/esm/src/modules/server/browser-module-admission.d.ts.map +1 -0
  192. package/esm/src/modules/server/browser-module-admission.js +164 -0
  193. package/esm/src/modules/server/classify.d.ts.map +1 -1
  194. package/esm/src/modules/server/classify.js +18 -2
  195. package/esm/src/modules/server/module-server.d.ts +14 -0
  196. package/esm/src/modules/server/module-server.d.ts.map +1 -1
  197. package/esm/src/modules/server/module-server.js +500 -132
  198. package/esm/src/modules/server/rate-limiter.d.ts +7 -2
  199. package/esm/src/modules/server/rate-limiter.d.ts.map +1 -1
  200. package/esm/src/modules/server/rate-limiter.js +30 -6
  201. package/esm/src/modules/server/websocket-handler.d.ts.map +1 -1
  202. package/esm/src/modules/server/websocket-handler.js +4 -5
  203. package/esm/src/observability/instruments/instruments-factory.d.ts.map +1 -1
  204. package/esm/src/observability/instruments/instruments-factory.js +0 -8
  205. package/esm/src/observability/metrics/index.d.ts +1 -14
  206. package/esm/src/observability/metrics/index.d.ts.map +1 -1
  207. package/esm/src/observability/metrics/index.js +0 -28
  208. package/esm/src/observability/metrics/recorder.d.ts +1 -9
  209. package/esm/src/observability/metrics/recorder.d.ts.map +1 -1
  210. package/esm/src/observability/metrics/recorder.js +0 -12
  211. package/esm/src/observability/metrics/types.d.ts +0 -12
  212. package/esm/src/observability/metrics/types.d.ts.map +1 -1
  213. package/esm/src/observability/metrics/types.js +1 -17
  214. package/esm/src/observability/tracing/service-tracer.d.ts.map +1 -1
  215. package/esm/src/observability/tracing/service-tracer.js +2 -10
  216. package/esm/src/platform/adapters/file-snapshot-error.d.ts +7 -0
  217. package/esm/src/platform/adapters/file-snapshot-error.d.ts.map +1 -1
  218. package/esm/src/platform/adapters/file-snapshot-error.js +13 -0
  219. package/esm/src/platform/adapters/fs/cache/file-cache.d.ts.map +1 -1
  220. package/esm/src/platform/adapters/fs/cache/file-cache.js +11 -1
  221. package/esm/src/platform/adapters/fs/cache/size-estimator.d.ts.map +1 -1
  222. package/esm/src/platform/adapters/fs/cache/size-estimator.js +12 -2
  223. package/esm/src/platform/adapters/fs/github/adapter.d.ts.map +1 -1
  224. package/esm/src/platform/adapters/fs/github/adapter.js +0 -5
  225. package/esm/src/platform/adapters/fs/github/cache-scope.d.ts +8 -0
  226. package/esm/src/platform/adapters/fs/github/cache-scope.d.ts.map +1 -0
  227. package/esm/src/platform/adapters/fs/github/cache-scope.js +12 -0
  228. package/esm/src/platform/adapters/fs/github/directory-operations.d.ts.map +1 -1
  229. package/esm/src/platform/adapters/fs/github/directory-operations.js +2 -1
  230. package/esm/src/platform/adapters/fs/github/github-api-client.d.ts +1 -0
  231. package/esm/src/platform/adapters/fs/github/github-api-client.d.ts.map +1 -1
  232. package/esm/src/platform/adapters/fs/github/github-api-client.js +81 -6
  233. package/esm/src/platform/adapters/fs/github/path-utils.d.ts.map +1 -1
  234. package/esm/src/platform/adapters/fs/github/path-utils.js +48 -4
  235. package/esm/src/platform/adapters/fs/github/read-operations.d.ts.map +1 -1
  236. package/esm/src/platform/adapters/fs/github/read-operations.js +4 -3
  237. package/esm/src/platform/adapters/fs/github/stat-operations.d.ts.map +1 -1
  238. package/esm/src/platform/adapters/fs/github/stat-operations.js +3 -2
  239. package/esm/src/platform/adapters/fs/github/types.d.ts.map +1 -1
  240. package/esm/src/platform/adapters/fs/github/types.js +12 -11
  241. package/esm/src/platform/adapters/fs/integration.d.ts.map +1 -1
  242. package/esm/src/platform/adapters/fs/integration.js +25 -32
  243. package/esm/src/platform/adapters/fs/veryfront/adapter-helpers.d.ts.map +1 -1
  244. package/esm/src/platform/adapters/fs/veryfront/adapter-helpers.js +21 -6
  245. package/esm/src/platform/adapters/fs/veryfront/path-normalizer.d.ts +2 -0
  246. package/esm/src/platform/adapters/fs/veryfront/path-normalizer.d.ts.map +1 -1
  247. package/esm/src/platform/adapters/fs/veryfront/path-normalizer.js +70 -5
  248. package/esm/src/platform/adapters/fs/veryfront/proxy-manager.d.ts +6 -2
  249. package/esm/src/platform/adapters/fs/veryfront/proxy-manager.d.ts.map +1 -1
  250. package/esm/src/platform/adapters/fs/veryfront/proxy-manager.js +207 -59
  251. package/esm/src/platform/adapters/fs/veryfront/retry.d.ts.map +1 -1
  252. package/esm/src/platform/adapters/fs/veryfront/retry.js +66 -13
  253. package/esm/src/platform/adapters/fs/veryfront/schemas/proxy-manager.schema.js +1 -1
  254. package/esm/src/platform/adapters/fs/veryfront/types.d.ts +3 -1
  255. package/esm/src/platform/adapters/fs/veryfront/types.d.ts.map +1 -1
  256. package/esm/src/platform/adapters/mock.d.ts.map +1 -1
  257. package/esm/src/platform/adapters/mock.js +3 -7
  258. package/esm/src/platform/adapters/path-containment.d.ts +9 -0
  259. package/esm/src/platform/adapters/path-containment.d.ts.map +1 -0
  260. package/esm/src/platform/adapters/path-containment.js +13 -0
  261. package/esm/src/platform/adapters/runtime/shared/native-snapshot-identity.d.ts +13 -0
  262. package/esm/src/platform/adapters/runtime/shared/native-snapshot-identity.d.ts.map +1 -0
  263. package/esm/src/platform/adapters/runtime/shared/native-snapshot-identity.js +12 -0
  264. package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.d.ts +7 -0
  265. package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.d.ts.map +1 -1
  266. package/esm/src/platform/adapters/runtime/shared/node-filesystem-adapter.js +62 -18
  267. package/esm/src/platform/adapters/veryfront-api-transport.d.ts +4 -0
  268. package/esm/src/platform/adapters/veryfront-api-transport.d.ts.map +1 -1
  269. package/esm/src/platform/adapters/veryfront-api-transport.js +20 -6
  270. package/esm/src/platform/compat/error-introspection.d.ts +12 -1
  271. package/esm/src/platform/compat/error-introspection.d.ts.map +1 -1
  272. package/esm/src/platform/compat/error-introspection.js +40 -5
  273. package/esm/src/platform/compat/path/basic-operations.d.ts.map +1 -1
  274. package/esm/src/platform/compat/path/basic-operations.js +6 -2
  275. package/esm/src/platform/compat/path/portable.d.ts.map +1 -1
  276. package/esm/src/platform/compat/path/portable.js +98 -54
  277. package/esm/src/platform/compat/path/resolution.d.ts.map +1 -1
  278. package/esm/src/platform/compat/path/resolution.js +14 -5
  279. package/esm/src/platform/compat/primordials/array.d.ts +8 -0
  280. package/esm/src/platform/compat/primordials/array.d.ts.map +1 -0
  281. package/esm/src/platform/compat/primordials/array.js +33 -0
  282. package/esm/src/platform/index.d.ts +1 -1
  283. package/esm/src/platform/index.d.ts.map +1 -1
  284. package/esm/src/platform/index.js +1 -1
  285. package/esm/src/provider/runtime-loader/json-snapshot.d.ts +12 -0
  286. package/esm/src/provider/runtime-loader/json-snapshot.d.ts.map +1 -1
  287. package/esm/src/provider/runtime-loader/json-snapshot.js +203 -57
  288. package/esm/src/provider/runtime-loader.d.ts +1 -1
  289. package/esm/src/provider/runtime-loader.d.ts.map +1 -1
  290. package/esm/src/provider/runtime-loader.js +3 -3
  291. package/esm/src/provider/shared/index.d.ts +1 -1
  292. package/esm/src/provider/shared/index.d.ts.map +1 -1
  293. package/esm/src/provider/shared/index.js +1 -1
  294. package/esm/src/proxy/control-plane-signature.d.ts +14 -0
  295. package/esm/src/proxy/control-plane-signature.d.ts.map +1 -1
  296. package/esm/src/proxy/control-plane-signature.js +131 -1
  297. package/esm/src/proxy/handler.d.ts +3 -1
  298. package/esm/src/proxy/handler.d.ts.map +1 -1
  299. package/esm/src/proxy/handler.js +56 -3
  300. package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.d.ts +12 -5
  301. package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.d.ts.map +1 -1
  302. package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.js +5 -4
  303. package/esm/src/react/components/optimized-image/OptimizedImage.d.ts +8 -2
  304. package/esm/src/react/components/optimized-image/OptimizedImage.d.ts.map +1 -1
  305. package/esm/src/react/components/optimized-image/OptimizedImage.js +7 -7
  306. package/esm/src/react/components/optimized-image/SimpleOptimizedImage.d.ts +4 -3
  307. package/esm/src/react/components/optimized-image/SimpleOptimizedImage.d.ts.map +1 -1
  308. package/esm/src/react/components/optimized-image/SimpleOptimizedImage.js +10 -7
  309. package/esm/src/react/components/optimized-image/helpers.d.ts +20 -1
  310. package/esm/src/react/components/optimized-image/helpers.d.ts.map +1 -1
  311. package/esm/src/react/components/optimized-image/helpers.js +168 -6
  312. package/esm/src/react/components/optimized-image/index.d.ts +3 -2
  313. package/esm/src/react/components/optimized-image/index.d.ts.map +1 -1
  314. package/esm/src/react/components/optimized-image/useOptimizedImage.d.ts +11 -6
  315. package/esm/src/react/components/optimized-image/useOptimizedImage.d.ts.map +1 -1
  316. package/esm/src/react/components/optimized-image/useOptimizedImage.js +6 -8
  317. package/esm/src/react/index.d.ts +1 -1
  318. package/esm/src/react/index.d.ts.map +1 -1
  319. package/esm/src/release-assets/index.d.ts +1 -1
  320. package/esm/src/release-assets/index.d.ts.map +1 -1
  321. package/esm/src/release-assets/index.js +1 -1
  322. package/esm/src/release-assets/manifest-cache.d.ts +7 -6
  323. package/esm/src/release-assets/manifest-cache.d.ts.map +1 -1
  324. package/esm/src/release-assets/manifest-cache.js +19 -5
  325. package/esm/src/release-assets/manifest-schema.d.ts +14 -2
  326. package/esm/src/release-assets/manifest-schema.d.ts.map +1 -1
  327. package/esm/src/release-assets/manifest-schema.js +21 -1
  328. package/esm/src/rendering/app-route-resolver.d.ts +4 -5
  329. package/esm/src/rendering/app-route-resolver.d.ts.map +1 -1
  330. package/esm/src/rendering/app-route-resolver.js +142 -87
  331. package/esm/src/rendering/chunk-optimizer/contracts.d.ts +49 -0
  332. package/esm/src/rendering/chunk-optimizer/contracts.d.ts.map +1 -0
  333. package/esm/src/rendering/chunk-optimizer/contracts.js +1 -0
  334. package/esm/src/rendering/chunk-optimizer/data-properties.d.ts +12 -0
  335. package/esm/src/rendering/chunk-optimizer/data-properties.d.ts.map +1 -0
  336. package/esm/src/rendering/chunk-optimizer/data-properties.js +24 -0
  337. package/esm/src/rendering/chunk-optimizer/file-discovery.d.ts +3 -0
  338. package/esm/src/rendering/chunk-optimizer/file-discovery.d.ts.map +1 -0
  339. package/esm/src/rendering/chunk-optimizer/file-discovery.js +167 -0
  340. package/esm/src/rendering/chunk-optimizer/filesystem.d.ts +7 -0
  341. package/esm/src/rendering/chunk-optimizer/filesystem.d.ts.map +1 -0
  342. package/esm/src/rendering/chunk-optimizer/filesystem.js +51 -0
  343. package/esm/src/rendering/chunk-optimizer/limits.d.ts +23 -0
  344. package/esm/src/rendering/chunk-optimizer/limits.d.ts.map +1 -0
  345. package/esm/src/rendering/chunk-optimizer/limits.js +22 -0
  346. package/esm/src/rendering/chunk-optimizer/manifest.d.ts +4 -0
  347. package/esm/src/rendering/chunk-optimizer/manifest.d.ts.map +1 -0
  348. package/esm/src/rendering/chunk-optimizer/manifest.js +220 -0
  349. package/esm/src/rendering/chunk-optimizer/source-imports.d.ts +9 -0
  350. package/esm/src/rendering/chunk-optimizer/source-imports.d.ts.map +1 -0
  351. package/esm/src/rendering/chunk-optimizer/source-imports.js +359 -0
  352. package/esm/src/rendering/chunk-optimizer/specifier.d.ts +5 -0
  353. package/esm/src/rendering/chunk-optimizer/specifier.d.ts.map +1 -0
  354. package/esm/src/rendering/chunk-optimizer/specifier.js +10 -0
  355. package/esm/src/rendering/chunk-optimizer/suggestions.d.ts +3 -0
  356. package/esm/src/rendering/chunk-optimizer/suggestions.d.ts.map +1 -0
  357. package/esm/src/rendering/chunk-optimizer/suggestions.js +164 -0
  358. package/esm/src/rendering/chunk-optimizer.d.ts +10 -43
  359. package/esm/src/rendering/chunk-optimizer.d.ts.map +1 -1
  360. package/esm/src/rendering/chunk-optimizer.js +39 -161
  361. package/esm/src/rendering/layouts/layout-applicator.d.ts.map +1 -1
  362. package/esm/src/rendering/layouts/layout-applicator.js +1 -1
  363. package/esm/src/rendering/layouts/utils/applicator.d.ts +2 -1
  364. package/esm/src/rendering/layouts/utils/applicator.d.ts.map +1 -1
  365. package/esm/src/rendering/layouts/utils/applicator.js +3 -3
  366. package/esm/src/rendering/layouts/utils/component-loader.d.ts +4 -3
  367. package/esm/src/rendering/layouts/utils/component-loader.d.ts.map +1 -1
  368. package/esm/src/rendering/layouts/utils/component-loader.js +10 -6
  369. package/esm/src/rendering/orchestrator/layout.d.ts.map +1 -1
  370. package/esm/src/rendering/orchestrator/layout.js +6 -2
  371. package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
  372. package/esm/src/rendering/orchestrator/pipeline.js +6 -2
  373. package/esm/src/rendering/page-resolution/page-resolver.d.ts +3 -2
  374. package/esm/src/rendering/page-resolution/page-resolver.d.ts.map +1 -1
  375. package/esm/src/rendering/page-resolution/page-resolver.js +21 -10
  376. package/esm/src/routing/api/module-loader/esbuild-plugin.d.ts.map +1 -1
  377. package/esm/src/routing/api/module-loader/esbuild-plugin.js +9 -3
  378. package/esm/src/runs/schemas.d.ts +11 -11
  379. package/esm/src/runtime/model-call-context.d.ts +7 -4
  380. package/esm/src/runtime/model-call-context.d.ts.map +1 -1
  381. package/esm/src/runtime/run-event-sink-context.d.ts +17 -0
  382. package/esm/src/runtime/run-event-sink-context.d.ts.map +1 -0
  383. package/esm/src/runtime/run-event-sink-context.js +47 -0
  384. package/esm/src/runtime/runtime-bridge.d.ts +0 -3
  385. package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
  386. package/esm/src/runtime/runtime-bridge.js +26 -8
  387. package/esm/src/security/http/base-handler.d.ts.map +1 -1
  388. package/esm/src/security/http/base-handler.js +5 -3
  389. package/esm/src/security/http/local-control-request.d.ts +39 -0
  390. package/esm/src/security/http/local-control-request.d.ts.map +1 -0
  391. package/esm/src/security/http/local-control-request.js +137 -0
  392. package/esm/src/security/http/outbound-fetch.d.ts +1 -0
  393. package/esm/src/security/http/outbound-fetch.d.ts.map +1 -1
  394. package/esm/src/security/http/outbound-fetch.js +14 -0
  395. package/esm/src/server/bootstrap.d.ts +1 -1
  396. package/esm/src/server/bootstrap.d.ts.map +1 -1
  397. package/esm/src/server/bootstrap.js +12 -1
  398. package/esm/src/server/context/request-context.d.ts +6 -0
  399. package/esm/src/server/context/request-context.d.ts.map +1 -1
  400. package/esm/src/server/context/request-context.js +2 -1
  401. package/esm/src/server/dev-server/server.d.ts +1 -1
  402. package/esm/src/server/dev-server/server.d.ts.map +1 -1
  403. package/esm/src/server/dev-server/server.js +1 -1
  404. package/esm/src/server/handlers/dev/dashboard/access-policy.d.ts +20 -0
  405. package/esm/src/server/handlers/dev/dashboard/access-policy.d.ts.map +1 -0
  406. package/esm/src/server/handlers/dev/dashboard/access-policy.js +106 -0
  407. package/esm/src/server/handlers/dev/dashboard/html-shell.d.ts +2 -1
  408. package/esm/src/server/handlers/dev/dashboard/html-shell.d.ts.map +1 -1
  409. package/esm/src/server/handlers/dev/dashboard/html-shell.js +8 -32
  410. package/esm/src/server/handlers/dev/dashboard/index.d.ts +3 -0
  411. package/esm/src/server/handlers/dev/dashboard/index.d.ts.map +1 -1
  412. package/esm/src/server/handlers/dev/dashboard/index.js +73 -8
  413. package/esm/src/server/handlers/dev/dashboard/ui-handler.d.ts +2 -1
  414. package/esm/src/server/handlers/dev/dashboard/ui-handler.d.ts.map +1 -1
  415. package/esm/src/server/handlers/dev/dashboard/ui-handler.js +5 -84
  416. package/esm/src/server/handlers/dev/debug-context.handler.d.ts.map +1 -1
  417. package/esm/src/server/handlers/dev/debug-context.handler.js +4 -0
  418. package/esm/src/server/handlers/dev/files/dev-file.handler.d.ts +0 -1
  419. package/esm/src/server/handlers/dev/files/dev-file.handler.d.ts.map +1 -1
  420. package/esm/src/server/handlers/dev/files/dev-file.handler.js +21 -30
  421. package/esm/src/server/handlers/dev/files/esbuild-plugins.d.ts +5 -0
  422. package/esm/src/server/handlers/dev/files/esbuild-plugins.d.ts.map +1 -1
  423. package/esm/src/server/handlers/dev/files/esbuild-plugins.js +56 -14
  424. package/esm/src/server/handlers/dev/files/path-validator.d.ts +8 -1
  425. package/esm/src/server/handlers/dev/files/path-validator.d.ts.map +1 -1
  426. package/esm/src/server/handlers/dev/files/path-validator.js +21 -8
  427. package/esm/src/server/handlers/dev/projects/api.js +1 -1
  428. package/esm/src/server/handlers/dev/projects/html-shell.d.ts +1 -1
  429. package/esm/src/server/handlers/dev/projects/html-shell.d.ts.map +1 -1
  430. package/esm/src/server/handlers/dev/projects/html-shell.js +2 -36
  431. package/esm/src/server/handlers/dev/projects/index.d.ts +3 -0
  432. package/esm/src/server/handlers/dev/projects/index.d.ts.map +1 -1
  433. package/esm/src/server/handlers/dev/projects/index.js +37 -7
  434. package/esm/src/server/handlers/dev/projects/ui-handler.d.ts +2 -1
  435. package/esm/src/server/handlers/dev/projects/ui-handler.d.ts.map +1 -1
  436. package/esm/src/server/handlers/dev/projects/ui-handler.js +5 -103
  437. package/esm/src/server/handlers/dev/scripts/hmr-scripts.d.ts.map +1 -1
  438. package/esm/src/server/handlers/dev/scripts/hmr-scripts.js +37 -13
  439. package/esm/src/server/handlers/dev/shared/dev-ui-bundle-response.d.ts +10 -0
  440. package/esm/src/server/handlers/dev/shared/dev-ui-bundle-response.d.ts.map +1 -0
  441. package/esm/src/server/handlers/dev/shared/dev-ui-bundle-response.js +50 -0
  442. package/esm/src/server/handlers/monitoring/client-log.handler.d.ts.map +1 -1
  443. package/esm/src/server/handlers/monitoring/client-log.handler.js +4 -0
  444. package/esm/src/server/handlers/monitoring/memory.handler.d.ts.map +1 -1
  445. package/esm/src/server/handlers/monitoring/memory.handler.js +4 -0
  446. package/esm/src/server/handlers/monitoring/metrics.handler.d.ts.map +1 -1
  447. package/esm/src/server/handlers/monitoring/metrics.handler.js +4 -0
  448. package/esm/src/server/handlers/preview/hmr-client-message.d.ts +2 -1
  449. package/esm/src/server/handlers/preview/hmr-client-message.d.ts.map +1 -1
  450. package/esm/src/server/handlers/preview/hmr-client-message.js +4 -13
  451. package/esm/src/server/handlers/preview/hmr.handler.d.ts.map +1 -1
  452. package/esm/src/server/handlers/preview/hmr.handler.js +3 -24
  453. package/esm/src/server/handlers/request/agent-stream.handler.d.ts +5 -0
  454. package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
  455. package/esm/src/server/handlers/request/agent-stream.handler.js +78 -60
  456. package/esm/src/server/handlers/request/api/api-handler-wrapper.d.ts.map +1 -1
  457. package/esm/src/server/handlers/request/api/api-handler-wrapper.js +7 -3
  458. package/esm/src/server/handlers/request/api/app-router-resolver.d.ts.map +1 -1
  459. package/esm/src/server/handlers/request/api/app-router-resolver.js +28 -30
  460. package/esm/src/server/handlers/request/module/module-server-handler.d.ts.map +1 -1
  461. package/esm/src/server/handlers/request/module/module-server-handler.js +2 -0
  462. package/esm/src/server/project-env/cache.d.ts +31 -8
  463. package/esm/src/server/project-env/cache.d.ts.map +1 -1
  464. package/esm/src/server/project-env/cache.js +222 -42
  465. package/esm/src/server/project-env/fetcher.d.ts +10 -3
  466. package/esm/src/server/project-env/fetcher.d.ts.map +1 -1
  467. package/esm/src/server/project-env/fetcher.js +138 -27
  468. package/esm/src/server/project-env/index.d.ts +2 -1
  469. package/esm/src/server/project-env/index.d.ts.map +1 -1
  470. package/esm/src/server/project-env/index.js +2 -1
  471. package/esm/src/server/project-env/production-environment-resolver.d.ts +40 -0
  472. package/esm/src/server/project-env/production-environment-resolver.d.ts.map +1 -0
  473. package/esm/src/server/project-env/production-environment-resolver.js +237 -0
  474. package/esm/src/server/runtime-handler/adapter-factory.d.ts.map +1 -1
  475. package/esm/src/server/runtime-handler/adapter-factory.js +4 -9
  476. package/esm/src/server/runtime-handler/environment-resolution.d.ts.map +1 -1
  477. package/esm/src/server/runtime-handler/environment-resolution.js +7 -2
  478. package/esm/src/server/runtime-handler/handler-context-builder.d.ts +9 -1
  479. package/esm/src/server/runtime-handler/handler-context-builder.d.ts.map +1 -1
  480. package/esm/src/server/runtime-handler/handler-context-builder.js +4 -0
  481. package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
  482. package/esm/src/server/runtime-handler/index.js +45 -25
  483. package/esm/src/server/runtime-handler/project-middleware.d.ts.map +1 -1
  484. package/esm/src/server/runtime-handler/project-middleware.js +15 -8
  485. package/esm/src/server/runtime-handler/project-resolution.d.ts +5 -1
  486. package/esm/src/server/runtime-handler/project-resolution.d.ts.map +1 -1
  487. package/esm/src/server/runtime-handler/project-resolution.js +30 -16
  488. package/esm/src/server/runtime-handler/project-runtime-context.d.ts +9 -8
  489. package/esm/src/server/runtime-handler/project-runtime-context.d.ts.map +1 -1
  490. package/esm/src/server/runtime-handler/project-runtime-context.js +86 -28
  491. package/esm/src/server/runtime-handler/timeout-manager.d.ts.map +1 -1
  492. package/esm/src/server/runtime-handler/timeout-manager.js +11 -4
  493. package/esm/src/server/service-server.d.ts +1 -1
  494. package/esm/src/server/service-server.d.ts.map +1 -1
  495. package/esm/src/server/services/rsc/endpoints/endpoint-router.d.ts.map +1 -1
  496. package/esm/src/server/services/rsc/endpoints/endpoint-router.js +67 -99
  497. package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.d.ts.map +1 -1
  498. package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +2 -2
  499. package/esm/src/server/shared/browser-module-bundler.d.ts +56 -1
  500. package/esm/src/server/shared/browser-module-bundler.d.ts.map +1 -1
  501. package/esm/src/server/shared/browser-module-bundler.js +626 -83
  502. package/esm/src/server/utils/proxy-trust.d.ts +9 -16
  503. package/esm/src/server/utils/proxy-trust.d.ts.map +1 -1
  504. package/esm/src/server/utils/proxy-trust.js +8 -29
  505. package/esm/src/testing/assert.d.ts +1 -1
  506. package/esm/src/testing/assert.d.ts.map +1 -1
  507. package/esm/src/testing/assert.js +3 -1
  508. package/esm/src/tool/factory.d.ts.map +1 -1
  509. package/esm/src/tool/factory.js +42 -10
  510. package/esm/src/tool/index.d.ts +1 -1
  511. package/esm/src/tool/index.d.ts.map +1 -1
  512. package/esm/src/tool/index.js +1 -1
  513. package/esm/src/tool/remote-mcp.d.ts +16 -1
  514. package/esm/src/tool/remote-mcp.d.ts.map +1 -1
  515. package/esm/src/tool/remote-mcp.js +48 -6
  516. package/esm/src/transforms/esm/http-cache-helpers.d.ts +4 -0
  517. package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
  518. package/esm/src/transforms/esm/http-cache-helpers.js +184 -62
  519. package/esm/src/transforms/esm/package-registry.d.ts +6 -0
  520. package/esm/src/transforms/esm/package-registry.d.ts.map +1 -1
  521. package/esm/src/transforms/esm/package-registry.js +9 -0
  522. package/esm/src/transforms/esm/specifier-resolver.d.ts.map +1 -1
  523. package/esm/src/transforms/esm/specifier-resolver.js +22 -9
  524. package/esm/src/transforms/esm/types.d.ts +8 -0
  525. package/esm/src/transforms/esm/types.d.ts.map +1 -1
  526. package/esm/src/transforms/import-rewriter/url-builder.d.ts.map +1 -1
  527. package/esm/src/transforms/import-rewriter/url-builder.js +40 -14
  528. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts.map +1 -1
  529. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.js +1 -1
  530. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts +1 -0
  531. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts.map +1 -1
  532. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.js +8 -4
  533. package/esm/src/transforms/mdx/esm-module-loader/module-writer.d.ts +15 -0
  534. package/esm/src/transforms/mdx/esm-module-loader/module-writer.d.ts.map +1 -1
  535. package/esm/src/transforms/mdx/esm-module-loader/module-writer.js +32 -2
  536. package/esm/src/transforms/pipeline/cache-identity.d.ts +38 -0
  537. package/esm/src/transforms/pipeline/cache-identity.d.ts.map +1 -0
  538. package/esm/src/transforms/pipeline/cache-identity.js +381 -0
  539. package/esm/src/transforms/pipeline/index.d.ts.map +1 -1
  540. package/esm/src/transforms/pipeline/index.js +71 -27
  541. package/esm/src/transforms/pipeline/stages/ssr-http-cache.d.ts.map +1 -1
  542. package/esm/src/transforms/pipeline/stages/ssr-http-cache.js +2 -0
  543. package/esm/src/transforms/pipeline/stages/ssr-vf-modules/constants.d.ts +4 -1
  544. package/esm/src/transforms/pipeline/stages/ssr-vf-modules/constants.d.ts.map +1 -1
  545. package/esm/src/transforms/pipeline/stages/ssr-vf-modules/constants.js +17 -2
  546. package/esm/src/transforms/pipeline/stages/ssr-vf-modules/index.d.ts.map +1 -1
  547. package/esm/src/transforms/pipeline/stages/ssr-vf-modules/index.js +4 -2
  548. package/esm/src/transforms/pipeline/stages/ssr-vf-modules/transform.d.ts +2 -2
  549. package/esm/src/transforms/pipeline/stages/ssr-vf-modules/transform.d.ts.map +1 -1
  550. package/esm/src/transforms/pipeline/stages/ssr-vf-modules/transform.js +10 -10
  551. package/esm/src/transforms/pipeline/types.d.ts +19 -1
  552. package/esm/src/transforms/pipeline/types.d.ts.map +1 -1
  553. package/esm/src/transforms/shared/server-only-packages.d.ts.map +1 -1
  554. package/esm/src/transforms/shared/server-only-packages.js +17 -2
  555. package/esm/src/types/entities/getEntityInfo.d.ts +57 -3
  556. package/esm/src/types/entities/getEntityInfo.d.ts.map +1 -1
  557. package/esm/src/types/entities/getEntityInfo.js +1015 -231
  558. package/esm/src/types/entities.d.ts +9 -1
  559. package/esm/src/types/entities.d.ts.map +1 -1
  560. package/esm/src/types/entities.js +92 -0
  561. package/esm/src/types/server.d.ts +8 -0
  562. package/esm/src/types/server.d.ts.map +1 -1
  563. package/esm/src/utils/base64url.d.ts.map +1 -1
  564. package/esm/src/utils/base64url.js +10 -4
  565. package/esm/src/utils/bundle-manifest.d.ts +19 -1
  566. package/esm/src/utils/bundle-manifest.d.ts.map +1 -1
  567. package/esm/src/utils/bundle-manifest.js +124 -27
  568. package/esm/src/utils/cache/eviction/eviction-manager.js +2 -2
  569. package/esm/src/utils/cache/stores/memory/entry-manager.d.ts +2 -1
  570. package/esm/src/utils/cache/stores/memory/entry-manager.d.ts.map +1 -1
  571. package/esm/src/utils/cache/stores/memory/entry-manager.js +7 -5
  572. package/esm/src/utils/cache/stores/memory/lru-cache-adapter.d.ts +7 -0
  573. package/esm/src/utils/cache/stores/memory/lru-cache-adapter.d.ts.map +1 -1
  574. package/esm/src/utils/cache/stores/memory/lru-cache-adapter.js +74 -17
  575. package/esm/src/utils/cache/stores/memory/lru-list-manager.d.ts +2 -0
  576. package/esm/src/utils/cache/stores/memory/lru-list-manager.d.ts.map +1 -1
  577. package/esm/src/utils/cache/stores/memory/lru-list-manager.js +6 -2
  578. package/esm/src/utils/cache/stores/memory/types.d.ts +2 -0
  579. package/esm/src/utils/cache/stores/memory/types.d.ts.map +1 -1
  580. package/esm/src/utils/cache-dir.d.ts +22 -1
  581. package/esm/src/utils/cache-dir.d.ts.map +1 -1
  582. package/esm/src/utils/cache-dir.js +171 -18
  583. package/esm/src/utils/cache-file-ops.d.ts +7 -3
  584. package/esm/src/utils/cache-file-ops.d.ts.map +1 -1
  585. package/esm/src/utils/cache-file-ops.js +26 -9
  586. package/esm/src/utils/cache-namespace.d.ts.map +1 -1
  587. package/esm/src/utils/cache-namespace.js +3 -1
  588. package/esm/src/utils/constants/limits.d.ts +3 -1
  589. package/esm/src/utils/constants/limits.d.ts.map +1 -1
  590. package/esm/src/utils/constants/limits.js +3 -1
  591. package/esm/src/utils/cookie-utils.d.ts.map +1 -1
  592. package/esm/src/utils/cookie-utils.js +15 -2
  593. package/esm/src/utils/env-loader.d.ts.map +1 -1
  594. package/esm/src/utils/env-loader.js +7 -2
  595. package/esm/src/utils/file-discovery.d.ts.map +1 -1
  596. package/esm/src/utils/file-discovery.js +88 -4
  597. package/esm/src/utils/hash-utils.d.ts.map +1 -1
  598. package/esm/src/utils/hash-utils.js +32 -6
  599. package/esm/src/utils/header-identity.d.ts +3 -0
  600. package/esm/src/utils/header-identity.d.ts.map +1 -0
  601. package/esm/src/utils/header-identity.js +25 -0
  602. package/esm/src/utils/id.d.ts.map +1 -1
  603. package/esm/src/utils/id.js +26 -4
  604. package/esm/src/utils/image-variant-widths.d.ts +13 -0
  605. package/esm/src/utils/image-variant-widths.d.ts.map +1 -0
  606. package/esm/src/utils/image-variant-widths.js +75 -0
  607. package/esm/src/utils/import-lockfile.d.ts +52 -1
  608. package/esm/src/utils/import-lockfile.d.ts.map +1 -1
  609. package/esm/src/utils/import-lockfile.js +1041 -58
  610. package/esm/src/utils/index.d.ts +1 -1
  611. package/esm/src/utils/index.d.ts.map +1 -1
  612. package/esm/src/utils/index.js +1 -1
  613. package/esm/src/utils/logger/logger.d.ts +1 -0
  614. package/esm/src/utils/logger/logger.d.ts.map +1 -1
  615. package/esm/src/utils/logger/logger.js +359 -78
  616. package/esm/src/utils/logger/redact.d.ts +4 -2
  617. package/esm/src/utils/logger/redact.d.ts.map +1 -1
  618. package/esm/src/utils/logger/redact.js +300 -112
  619. package/esm/src/utils/logger/serialization.d.ts +3 -0
  620. package/esm/src/utils/logger/serialization.d.ts.map +1 -0
  621. package/esm/src/utils/logger/serialization.js +81 -0
  622. package/esm/src/utils/lru-wrapper.js +2 -2
  623. package/esm/src/utils/memoize.d.ts +1 -1
  624. package/esm/src/utils/memoize.d.ts.map +1 -1
  625. package/esm/src/utils/memoize.js +16 -5
  626. package/esm/src/utils/memory/profiler.d.ts +11 -0
  627. package/esm/src/utils/memory/profiler.d.ts.map +1 -1
  628. package/esm/src/utils/memory/profiler.js +20 -5
  629. package/esm/src/utils/path-utils.d.ts.map +1 -1
  630. package/esm/src/utils/path-utils.js +4 -2
  631. package/esm/src/utils/route-path-utils.d.ts +9 -0
  632. package/esm/src/utils/route-path-utils.d.ts.map +1 -1
  633. package/esm/src/utils/route-path-utils.js +56 -20
  634. package/esm/src/utils/sleep.d.ts +8 -1
  635. package/esm/src/utils/sleep.d.ts.map +1 -1
  636. package/esm/src/utils/sleep.js +11 -2
  637. package/esm/src/utils/version-constant.d.ts +1 -1
  638. package/esm/src/utils/version-constant.js +1 -1
  639. package/esm/src/utils/websocket-message-size.d.ts +22 -0
  640. package/esm/src/utils/websocket-message-size.d.ts.map +1 -0
  641. package/esm/src/utils/websocket-message-size.js +41 -0
  642. package/esm/src/workflow/schemas/workflow.schema.d.ts +10 -10
  643. package/esm/src/workflow/worker/shared.d.ts.map +1 -1
  644. package/esm/src/workflow/worker/shared.js +16 -5
  645. package/package.json +8 -6
  646. package/esm/src/agent/conversation/model-call-context-run-event.d.ts +0 -41
  647. package/esm/src/agent/conversation/model-call-context-run-event.d.ts.map +0 -1
  648. package/esm/src/agent/conversation/model-call-context-run-event.js +0 -74
  649. package/esm/src/agent/hosted/model-call-context-run-event-recorder.d.ts +0 -35
  650. package/esm/src/agent/hosted/model-call-context-run-event-recorder.d.ts.map +0 -1
  651. package/esm/src/agent/hosted/model-call-context-run-event-recorder.js +0 -266
  652. package/esm/src/observability/instruments/model-call-context-instruments.d.ts +0 -18
  653. package/esm/src/observability/instruments/model-call-context-instruments.d.ts.map +0 -1
  654. package/esm/src/observability/instruments/model-call-context-instruments.js +0 -25
  655. package/esm/src/runtime/model-call-recorder-context.d.ts +0 -8
  656. package/esm/src/runtime/model-call-recorder-context.d.ts.map +0 -1
  657. package/esm/src/runtime/model-call-recorder-context.js +0 -14
  658. package/esm/src/server/dev-ui/manifest.d.ts +0 -33
  659. package/esm/src/server/dev-ui/manifest.d.ts.map +0 -1
  660. package/esm/src/server/dev-ui/manifest.js +0 -31
  661. package/esm/src/server/handlers/dev/shared/ui-module-transform.d.ts +0 -8
  662. package/esm/src/server/handlers/dev/shared/ui-module-transform.d.ts.map +0 -1
  663. package/esm/src/server/handlers/dev/shared/ui-module-transform.js +0 -32
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/analyze-chunks/command.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC,CA4Ef"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/analyze-chunks/command.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC,CA8Ef"}
@@ -46,7 +46,9 @@ export async function analyzeChunksCommand(options) {
46
46
  cliLogger.info("Detected heavy UI libraries shared across pages. Break them into dedicated chunks.");
47
47
  }
48
48
  }
49
- catch {
49
+ catch (error) {
50
+ const message = error instanceof Error ? error.message : String(error);
51
+ cliLogger.error(`Failed to analyze chunks: ${message}`);
50
52
  exit(1);
51
53
  }
52
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/schedule/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,YAAY,EAAE,WA2B1B,CAAC"}
1
+ {"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/schedule/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,YAAY,EAAE,WA+B1B,CAAC"}
@@ -6,7 +6,7 @@ export const scheduleHelp = {
6
6
  options: [
7
7
  {
8
8
  flag: "--input <file>",
9
- description: "JSON input file to override the schedule input (run only)",
9
+ description: "JSON object file to override the schedule input (run only)",
10
10
  },
11
11
  {
12
12
  flag: "--remote",
@@ -16,6 +16,10 @@ export const scheduleHelp = {
16
16
  flag: "--json",
17
17
  description: "Output as JSON",
18
18
  },
19
+ {
20
+ flag: "--debug",
21
+ description: "Enable debug logging (run only)",
22
+ },
19
23
  ],
20
24
  examples: [
21
25
  "veryfront schedule list",
@@ -5,6 +5,23 @@ interface RemoteSchedulePollOptions {
5
5
  now?: () => number;
6
6
  sleep?: (delayMs: number) => Promise<void>;
7
7
  }
8
+ interface LocalScheduleTimeoutOptions {
9
+ maxDelaySeconds?: number;
10
+ setTimer?: (callback: () => void, delayMs: number) => ReturnType<typeof setTimeout>;
11
+ clearTimer?: (timerId: ReturnType<typeof setTimeout>) => void;
12
+ }
13
+ export interface LocalScheduleTimeout {
14
+ readonly signal: AbortSignal | undefined;
15
+ dispose(): void;
16
+ }
17
+ /**
18
+ * Create a disposable cooperative timeout for one local schedule execution.
19
+ *
20
+ * Long durations are armed in bounded chunks so timer coercion cannot shorten
21
+ * the configured deadline.
22
+ */
23
+ export declare function createLocalScheduleTimeout(timeoutSeconds: number | undefined, options?: LocalScheduleTimeoutOptions): LocalScheduleTimeout;
24
+ export declare function normalizeLocalScheduleInput(value: unknown): Record<string, unknown>;
8
25
  export declare function waitForRemoteScheduleRun(client: Pick<VeryfrontRunsClient, "get">, accepted: CreateScheduleRunFromSourceResult, options?: RemoteSchedulePollOptions): Promise<Run>;
9
26
  export declare function formatRemoteScheduleRunOutput(run: Run): Record<string, unknown>;
10
27
  export declare function resolveRemoteScheduleTarget(run: Run, fallback: TriggerTarget): TriggerTarget;
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/schedule/handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAUxD,OAAO,EAEL,KAAK,iCAAiC,EACtC,KAAK,GAAG,EACR,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAqDrF,UAAU,yBAAyB;IACjC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5C;AAED,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,EACxC,QAAQ,EAAE,iCAAiC,EAC3C,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,GAAG,CAAC,CAiDd;AAED,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAO/E;AAED,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,aAAa,GAAG,aAAa,CAU5F;AA8BD,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAsG3E"}
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/schedule/handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAUxD,OAAO,EAEL,KAAK,iCAAiC,EACtC,KAAK,GAAG,EACR,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,+BAA+B,CAAC;AAyDvC,UAAU,yBAAyB;IACjC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5C;AAED,UAAU,2BAA2B;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;IACpF,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,KAAK,IAAI,CAAC;CAC/D;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,OAAO,GAAE,2BAAgC,GACxC,oBAAoB,CAmDtB;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAOnF;AAED,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,EACxC,QAAQ,EAAE,iCAAiC,EAC3C,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,GAAG,CAAC,CAwDd;AAED,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAO/E;AAED,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,aAAa,GAAG,aAAa,CAiB5F;AAiCD,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAgH3E"}
@@ -7,13 +7,17 @@ import { defineSchema, lazySchema } from "../../../src/schemas/index.js";
7
7
  import { DEPLOYMENT_ERROR, DEPLOYMENT_VERIFICATION_TIMEOUT, INVALID_ARGUMENT, RESOURCE_NOT_FOUND, } from "../../../src/errors/index.js";
8
8
  import { createRunsClient, } from "../../../src/runs/index.js";
9
9
  import { discoverSchedules } from "../../../src/schedule/index.js";
10
- import { runTriggerTarget } from "../../../src/trigger/index.js";
10
+ import { isTriggerId, isTriggerTarget, runTriggerTarget, } from "../../../src/trigger/index.js";
11
11
  import { outputTriggerList, outputTriggerRun, readJsonFile } from "../trigger-utils.js";
12
12
  const REMOTE_SCHEDULE_POLL_INTERVAL_MS = 1_000;
13
13
  const REMOTE_SCHEDULE_TIMEOUT_GRACE_MS = 30_000;
14
14
  // Bound how long the CLI waits for dispatch without consuming the cloud run's
15
15
  // execution budget. The run remains durable in Veryfront if this wait expires.
16
16
  const REMOTE_SCHEDULE_QUEUE_WAIT_TIMEOUT_MS = 5 * 60_000;
17
+ // Deno and Node both clamp longer setTimeout delays. Chaining bounded chunks
18
+ // preserves the authored timeout instead of firing early after host coercion.
19
+ const MAX_HOST_TIMER_DELAY_MS = 2 ** 31 - 1;
20
+ const MAX_TIMER_DELAY_SECONDS = Math.floor(MAX_HOST_TIMER_DELAY_MS / 1_000);
17
21
  const getScheduleArgsSchema = defineSchema((v) => v.object({
18
22
  action: v.enum(["run", "list"]).optional(),
19
23
  id: v.string().optional(),
@@ -49,7 +53,70 @@ async function handleScheduleList(_args) {
49
53
  });
50
54
  });
51
55
  }
56
+ /**
57
+ * Create a disposable cooperative timeout for one local schedule execution.
58
+ *
59
+ * Long durations are armed in bounded chunks so timer coercion cannot shorten
60
+ * the configured deadline.
61
+ */
62
+ export function createLocalScheduleTimeout(timeoutSeconds, options = {}) {
63
+ if (timeoutSeconds === undefined) {
64
+ return { signal: undefined, dispose() { } };
65
+ }
66
+ if (!Number.isSafeInteger(timeoutSeconds) || timeoutSeconds <= 0) {
67
+ throw new TypeError("Local schedule timeout must be a positive safe integer.");
68
+ }
69
+ const maxDelaySeconds = options.maxDelaySeconds ?? MAX_TIMER_DELAY_SECONDS;
70
+ if (!Number.isSafeInteger(maxDelaySeconds) || maxDelaySeconds <= 0) {
71
+ throw new TypeError("Local schedule timer chunk must be a positive safe integer.");
72
+ }
73
+ const setTimer = options.setTimer ?? globalThis.setTimeout;
74
+ const clearTimer = options.clearTimer ?? globalThis.clearTimeout;
75
+ const controller = new AbortController();
76
+ let remainingSeconds = timeoutSeconds;
77
+ let timerId;
78
+ let disposed = false;
79
+ const armNextChunk = () => {
80
+ if (disposed || controller.signal.aborted)
81
+ return;
82
+ const delaySeconds = Math.min(remainingSeconds, maxDelaySeconds);
83
+ remainingSeconds -= delaySeconds;
84
+ timerId = setTimer(() => {
85
+ timerId = undefined;
86
+ if (disposed)
87
+ return;
88
+ if (remainingSeconds > 0) {
89
+ armNextChunk();
90
+ return;
91
+ }
92
+ controller.abort(new DOMException("Local schedule execution exceeded its configured timeout.", "TimeoutError"));
93
+ }, delaySeconds * 1_000);
94
+ };
95
+ armNextChunk();
96
+ return {
97
+ signal: controller.signal,
98
+ dispose() {
99
+ disposed = true;
100
+ if (timerId !== undefined) {
101
+ clearTimer(timerId);
102
+ timerId = undefined;
103
+ }
104
+ },
105
+ };
106
+ }
107
+ export function normalizeLocalScheduleInput(value) {
108
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
109
+ throw INVALID_ARGUMENT.create({
110
+ detail: "--input JSON file must contain a JSON object.",
111
+ });
112
+ }
113
+ return value;
114
+ }
52
115
  export async function waitForRemoteScheduleRun(client, accepted, options = {}) {
116
+ if (!Number.isSafeInteger(accepted.timeoutSeconds) ||
117
+ accepted.timeoutSeconds <= 0) {
118
+ throw new Error("Remote schedule returned an invalid execution timeout.");
119
+ }
53
120
  const now = options.now ?? Date.now;
54
121
  const sleep = options.sleep ??
55
122
  ((delayMs) => new Promise((resolve) => setTimeout(resolve, delayMs)));
@@ -79,7 +146,8 @@ export async function waitForRemoteScheduleRun(client, accepted, options = {}) {
79
146
  throw DEPLOYMENT_ERROR.create({ detail: `Scheduled run was cancelled: ${runId}` });
80
147
  }
81
148
  const recordedTimeoutSeconds = run.timeout_seconds;
82
- const executionTimeoutSeconds = recordedTimeoutSeconds !== null &&
149
+ const executionTimeoutSeconds = Number.isSafeInteger(recordedTimeoutSeconds) &&
150
+ recordedTimeoutSeconds !== null &&
83
151
  recordedTimeoutSeconds > 0
84
152
  ? recordedTimeoutSeconds
85
153
  : accepted.timeoutSeconds;
@@ -109,17 +177,26 @@ export function formatRemoteScheduleRunOutput(run) {
109
177
  };
110
178
  }
111
179
  export function resolveRemoteScheduleTarget(run, fallback) {
112
- if (!run.target)
113
- return fallback;
180
+ const fallbackTarget = isTriggerTarget(fallback) ? { ...fallback } : null;
181
+ if (!run.target) {
182
+ if (fallbackTarget !== null)
183
+ return fallbackTarget;
184
+ throw new Error("Remote schedule returned an invalid target.");
185
+ }
114
186
  const separator = run.target.indexOf(":");
115
- if (separator < 1)
116
- return fallback;
187
+ if (separator < 1) {
188
+ if (fallbackTarget !== null)
189
+ return fallbackTarget;
190
+ throw new Error("Remote schedule returned an invalid target.");
191
+ }
117
192
  const kind = run.target.slice(0, separator);
118
193
  const id = run.target.slice(separator + 1).trim();
119
- if ((kind !== "agent" && kind !== "task" && kind !== "workflow") || id.length === 0) {
120
- return fallback;
121
- }
122
- return { kind, id };
194
+ const candidate = { kind, id };
195
+ if (isTriggerTarget(candidate))
196
+ return candidate;
197
+ if (fallbackTarget !== null)
198
+ return fallbackTarget;
199
+ throw new Error("Remote schedule returned an invalid target.");
123
200
  }
124
201
  async function runRemoteSchedule(projectDir, opts) {
125
202
  const startedAt = Date.now();
@@ -133,6 +210,9 @@ async function runRemoteSchedule(projectDir, opts) {
133
210
  sourceTriggerId: opts.id,
134
211
  idempotencyKey: `schedule-cli:${dntShim.crypto.randomUUID()}`,
135
212
  });
213
+ if (!isTriggerTarget(accepted.target)) {
214
+ throw new Error("Remote schedule returned an invalid target.");
215
+ }
136
216
  const remoteRun = await waitForRemoteScheduleRun(client, accepted);
137
217
  await outputTriggerRun({
138
218
  command: "schedule",
@@ -154,7 +234,10 @@ export async function handleScheduleCommand(args) {
154
234
  throw INVALID_ARGUMENT.create({ detail: "Usage: veryfront schedule run <id>" });
155
235
  }
156
236
  const projectDir = dntShim.Deno.cwd();
157
- if (opts.remote && opts.input) {
237
+ if (!isTriggerId(opts.id)) {
238
+ throw INVALID_ARGUMENT.create({ detail: `Invalid schedule id: "${opts.id}".` });
239
+ }
240
+ if (opts.remote && opts.input !== undefined) {
158
241
  throw INVALID_ARGUMENT.create({
159
242
  detail: "Remote schedule runs use the source already pushed to Veryfront and do not accept --input.",
160
243
  });
@@ -166,7 +249,9 @@ export async function handleScheduleCommand(args) {
166
249
  }
167
250
  await withProjectSourceContext(projectDir, async (context) => {
168
251
  const { adapter, config, configCacheKey, projectId } = context;
169
- const input = opts.input ? await readJsonFile(opts.input, "--input JSON file") : undefined;
252
+ const input = opts.input !== undefined
253
+ ? await readJsonFile(opts.input, "--input JSON file")
254
+ : undefined;
170
255
  const result = await discoverSchedules({
171
256
  projectDir,
172
257
  adapter,
@@ -182,10 +267,8 @@ export async function handleScheduleCommand(args) {
182
267
  if (!schedule) {
183
268
  throw RESOURCE_NOT_FOUND.create({ detail: `Schedule "${opts.id}" not found.` });
184
269
  }
185
- const triggerInput = input ?? schedule.input ?? {};
186
- const scheduleConfig = triggerInput && typeof triggerInput === "object" && !Array.isArray(triggerInput)
187
- ? triggerInput
188
- : {};
270
+ const triggerInput = normalizeLocalScheduleInput(opts.input === undefined ? schedule.input ?? {} : input);
271
+ const scheduleConfig = triggerInput;
189
272
  const scheduleName = schedule.name ?? schedule.id;
190
273
  const scheduleTarget = scheduleConfig._schedule_target;
191
274
  const conversationMode = scheduleTarget && typeof scheduleTarget === "object" &&
@@ -209,17 +292,26 @@ export async function handleScheduleCommand(args) {
209
292
  },
210
293
  }
211
294
  : {};
212
- const run = await runTriggerTarget({
213
- projectDir,
214
- adapter,
215
- config,
216
- cacheKey: configCacheKey,
217
- projectId,
218
- target: schedule.target,
219
- input: triggerInput,
220
- ...agentRunOptions,
221
- debug: opts.debug,
222
- });
295
+ const timeout = createLocalScheduleTimeout(schedule.timeoutSeconds);
296
+ const run = await (async () => {
297
+ try {
298
+ return await runTriggerTarget({
299
+ projectDir,
300
+ adapter,
301
+ config,
302
+ cacheKey: configCacheKey,
303
+ projectId,
304
+ target: schedule.target,
305
+ input: triggerInput,
306
+ ...agentRunOptions,
307
+ signal: timeout.signal,
308
+ debug: opts.debug,
309
+ });
310
+ }
311
+ finally {
312
+ timeout.dispose();
313
+ }
314
+ })();
223
315
  await outputTriggerRun({
224
316
  command: "schedule",
225
317
  triggerId: schedule.id,
@@ -227,8 +319,6 @@ export async function handleScheduleCommand(args) {
227
319
  output: run.output,
228
320
  durationMs: run.durationMs,
229
321
  });
230
- }).catch((error) => {
231
- throw error;
232
322
  });
233
323
  exitProcess(0);
234
324
  }
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/serve/command.ts"],"names":[],"mappings":"AAUA,KAAK,oBAAoB,GAAG;IAC1B,uBAAuB,EAAE,CACvB,KAAK,EAAE,OAAO,EACd,OAAO,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,KAC1B,MAAM,GAAG,SAAS,CAAC;IACxB,sBAAsB,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE,gBAAgB,CAAC,EAAE,CACjB,SAAS,EAAE,SAAS,GAAG,OAAO,EAC9B,KAAK,EAAE,OAAO,KACX,IAAI,CAAC;CACX,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,sBAAsB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,wBAAwB,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACzD,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,uBAAuB,EAAE,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;IACzE,sBAAsB,EAAE,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;IACvE,uBAAuB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACjD,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,4BAA4B,CAAC,CAAC,EAClD,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,GAAE,4BAAiC,GACzC,OAAO,CAAC,CAAC,CAAC,CAqBZ;AAoCD,wBAAsB,sCAAsC,CAAC,CAAC,EAC5D,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,QAAQ,EAAE,oBAAoB,EAC9B,sBAAsB,GAAE,MAAM,OAAO,CAAC,IAAI,CAA6B,EACvE,uBAAuB,GAAE,MAAM,OAAO,CAAC,OAAO,CAA2B,GACxE,OAAO,CAAC,CAAC,CAAC,CAMZ;AAwFD,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,YAAY,EACrB,YAAY,GAAE,4BAAiC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAgFf;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,YAAY,EACrB,YAAY,GAAE,wBAA6B,GAC1C,OAAO,CAAC,IAAI,CAAC,CAcf"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/serve/command.ts"],"names":[],"mappings":"AAWA,KAAK,oBAAoB,GAAG;IAC1B,uBAAuB,EAAE,CACvB,KAAK,EAAE,OAAO,EACd,OAAO,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,KAC1B,MAAM,GAAG,SAAS,CAAC;IACxB,sBAAsB,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE,gBAAgB,CAAC,EAAE,CACjB,SAAS,EAAE,SAAS,GAAG,OAAO,EAC9B,KAAK,EAAE,OAAO,KACX,IAAI,CAAC;CACX,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,sBAAsB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,wBAAwB,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACzD,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,uBAAuB,EAAE,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;IACzE,sBAAsB,EAAE,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;IACvE,uBAAuB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACjD,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,4BAA4B,CAAC,CAAC,EAClD,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,GAAE,4BAAiC,GACzC,OAAO,CAAC,CAAC,CAAC,CAqBZ;AAoCD,wBAAsB,sCAAsC,CAAC,CAAC,EAC5D,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,QAAQ,EAAE,oBAAoB,EAC9B,sBAAsB,GAAE,MAAM,OAAO,CAAC,IAAI,CAA6B,EACvE,uBAAuB,GAAE,MAAM,OAAO,CAAC,OAAO,CAA2B,GACxE,OAAO,CAAC,CAAC,CAAC,CAMZ;AA2DD,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,YAAY,EACrB,YAAY,GAAE,4BAAiC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAgFf;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,YAAY,EACrB,YAAY,GAAE,wBAA6B,GAC1C,OAAO,CAAC,IAAI,CAAC,CAcf"}
@@ -5,6 +5,7 @@ import { exitProcess, registerTerminationSignals, showHeader } from "../../utils
5
5
  import { generateDefaultProjectId } from "../../utils/project.js";
6
6
  import { startCliProductionServer } from "../../shared/server-startup.js";
7
7
  import { ensureCliBundlerContracts } from "../../shared/default-contracts.js";
8
+ import { runStandaloneProxyRuntime } from "./proxy-runtime.js";
8
9
  const STARTUP_ERROR_FLUSH_TIMEOUT_MS = 2_000;
9
10
  export async function runWithStartupErrorReporting(startup, reporter, options = {}) {
10
11
  const flushTimeoutMs = options.flushTimeoutMs ?? STARTUP_ERROR_FLUSH_TIMEOUT_MS;
@@ -75,30 +76,10 @@ async function runSplit(options) {
75
76
  });
76
77
  }
77
78
  async function runProxy(options) {
78
- showHeader();
79
- cliLogger.info(`Starting proxy server on ${options.bindAddress}:${options.port}`);
80
- const { setEnv } = await import("../../../src/platform/index.js");
81
- setEnv("PORT", String(options.port));
82
- setEnv("HOST", options.bindAddress);
83
- const { activateStandaloneProxyCacheExtension, registerStandaloneProxyCacheExtensionTeardown, } = await import("./proxy-extension-composition.js");
84
- const extensionLoader = await activateStandaloneProxyCacheExtension();
85
- const teardownCacheExtension = await registerStandaloneProxyCacheExtensionTeardown(extensionLoader);
86
- // DenoHttpServer.serve() blocks until the server stops,
87
- // so this import keeps the process alive.
88
- try {
89
- await import("../../../src/proxy/main.js");
90
- }
91
- catch (error) {
92
- try {
93
- await teardownCacheExtension();
94
- }
95
- catch (cleanupError) {
96
- cliLogger.error("Failed to clean up proxy extensions after startup failure", cleanupError);
97
- }
98
- throw error;
99
- }
100
- // Keep the process alive (Deno.serve returns immediately in compiled binaries)
101
- await new Promise(() => { });
79
+ await runStandaloneProxyRuntime({
80
+ bindAddress: options.bindAddress,
81
+ port: options.port,
82
+ });
102
83
  }
103
84
  function createDeferredProductionStartupErrorReporter() {
104
85
  let sentryModule;
@@ -2,13 +2,14 @@
2
2
  * Standalone proxy extension composition.
3
3
  *
4
4
  * This CLI/deployment boundary activates provider implementations before the
5
- * provider-neutral proxy runtime is imported. Core consumes only the
6
- * `TokenCacheStore` contract published by the extension loader.
5
+ * provider-neutral proxy runtime is imported. Core consumes the
6
+ * `TokenCacheStore` contract and the Redis runtime provider published by the
7
+ * extension loader.
7
8
  */
8
9
  import { ExtensionLoader } from "../../../src/extensions/index.js";
9
10
  import { type RegisterProxyShutdownHook } from "../../../src/proxy/shutdown-hooks.js";
10
- /** Start explicit standalone cache composition with a pinned lifecycle promise. */
11
- export declare function activateStandaloneProxyCacheExtension(): Promise<ExtensionLoader | null>;
11
+ /** Start explicit standalone proxy extension composition. */
12
+ export declare function activateStandaloneProxyExtensions(): Promise<ExtensionLoader | null>;
12
13
  /** Register exactly-once provider teardown with the proxy's shutdown owner. */
13
- export declare function registerStandaloneProxyCacheExtensionTeardown(loader: ExtensionLoader | null, registerHook?: RegisterProxyShutdownHook): Promise<() => Promise<void>>;
14
+ export declare function registerStandaloneProxyExtensionTeardown(loader: ExtensionLoader | null, registerHook?: RegisterProxyShutdownHook): Promise<() => Promise<void>>;
14
15
  //# sourceMappingURL=proxy-extension-composition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"proxy-extension-composition.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/serve/proxy-extension-composition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAyB,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAG1F,OAAO,EAEL,KAAK,yBAAyB,EAE/B,MAAM,sCAAsC,CAAC;AAsE9C,mFAAmF;AACnF,wBAAgB,qCAAqC,IAAI,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAEvF;AA2DD,+EAA+E;AAC/E,wBAAgB,6CAA6C,CAC3D,MAAM,EAAE,eAAe,GAAG,IAAI,EAC9B,YAAY,GAAE,yBAAqD,GAClE,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAI9B"}
1
+ {"version":3,"file":"proxy-extension-composition.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/serve/proxy-extension-composition.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAyB,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAG1F,OAAO,EAEL,KAAK,yBAAyB,EAE/B,MAAM,sCAAsC,CAAC;AAqG9C,6DAA6D;AAC7D,wBAAgB,iCAAiC,IAAI,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAEnF;AA2DD,+EAA+E;AAC/E,wBAAgB,wCAAwC,CACtD,MAAM,EAAE,eAAe,GAAG,IAAI,EAC9B,YAAY,GAAE,yBAAqD,GAClE,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAI9B"}
@@ -2,13 +2,14 @@
2
2
  * Standalone proxy extension composition.
3
3
  *
4
4
  * This CLI/deployment boundary activates provider implementations before the
5
- * provider-neutral proxy runtime is imported. Core consumes only the
6
- * `TokenCacheStore` contract published by the extension loader.
5
+ * provider-neutral proxy runtime is imported. Core consumes the
6
+ * `TokenCacheStore` contract and the Redis runtime provider published by the
7
+ * extension loader.
7
8
  */
8
- import { cliLogger } from "../../utils/index.js";
9
+ import { cliLogger } from "../../../src/utils/logger/index.js";
9
10
  import { ExtensionLoader } from "../../../src/extensions/index.js";
10
11
  import { importFirstPartyExtensionModule } from "../../../src/extensions/first-party-import.js";
11
- import { getEnv } from "../../../src/platform/index.js";
12
+ import { getEnv, setEnv } from "../../../src/platform/compat/process/env.js";
12
13
  import { createProxyShutdownAggregateError, registerProxyShutdownHook, } from "../../../src/proxy/shutdown-hooks.js";
13
14
  // This module is evaluated before extension activation. Pin promises created
14
15
  // by the later teardown path so extension code cannot replace Promise species
@@ -29,29 +30,57 @@ function pinCompositionPromise(promise) {
29
30
  const resolvedBeforeExtensionActivation = pinCompositionPromise(new NativePromise((resolve) => resolve()));
30
31
  const CACHE_EXTENSION_SOURCE_DIRECTORY = "ext-cache-redis";
31
32
  const CACHE_EXTENSION_PACKAGE_NAME = "@veryfront/ext-cache-redis";
33
+ const REDIS_EXTENSION_SOURCE_DIRECTORY = "ext-redis";
34
+ const REDIS_EXTENSION_PACKAGE_NAME = "@veryfront/ext-redis";
32
35
  /**
33
- * Activate the standalone proxy's explicitly selected cache extension.
34
- * Memory mode performs no extension import. The returned loader owns provider
35
- * teardown; the proxy borrows its registered `TokenCacheStore`.
36
+ * Activate the standalone proxy's explicitly selected cache and Redis runtime
37
+ * providers. The returned loader owns provider teardown.
36
38
  */
37
- async function activateStandaloneProxyCacheExtensionInternal() {
39
+ async function activateStandaloneProxyExtensionsInternal() {
38
40
  const cacheType = getEnv("CACHE_TYPE") || "memory";
39
- if (cacheType !== "memory" && cacheType !== "extension") {
40
- throw new NativeTypeError("CACHE_TYPE must be memory or extension");
41
+ if (cacheType !== "memory" && cacheType !== "extension" && cacheType !== "redis") {
42
+ throw new NativeTypeError(`CACHE_TYPE must be memory, extension, or redis (received "${cacheType}")`);
41
43
  }
42
- if (cacheType === "memory")
43
- return null;
44
- const module = await importFirstPartyExtensionModule(CACHE_EXTENSION_SOURCE_DIRECTORY, CACHE_EXTENSION_PACKAGE_NAME);
45
- if (typeof module.default !== "function") {
46
- throw new NativeTypeError(`${CACHE_EXTENSION_PACKAGE_NAME} must export an ExtensionFactory`);
44
+ const selected = [];
45
+ if (cacheType === "extension" || cacheType === "redis") {
46
+ selected.push({
47
+ origin: "standalone proxy cache selection",
48
+ packageName: CACHE_EXTENSION_PACKAGE_NAME,
49
+ sourceDirectory: CACHE_EXTENSION_SOURCE_DIRECTORY,
50
+ });
51
+ }
52
+ if (getEnv("REDIS_URL")) {
53
+ selected.push({
54
+ origin: "standalone proxy routing invalidation",
55
+ packageName: REDIS_EXTENSION_PACKAGE_NAME,
56
+ sourceDirectory: REDIS_EXTENSION_SOURCE_DIRECTORY,
57
+ });
47
58
  }
59
+ if (selected.length === 0)
60
+ return null;
61
+ const extensions = await NativePromise.all(selected.map(async (definition) => {
62
+ const module = await importFirstPartyExtensionModule(definition.sourceDirectory, definition.packageName);
63
+ if (typeof module.default !== "function") {
64
+ throw new NativeTypeError(`${definition.packageName} must export an ExtensionFactory`);
65
+ }
66
+ return {
67
+ extension: module.default(),
68
+ source: "config",
69
+ origin: definition.origin,
70
+ };
71
+ }));
48
72
  const loader = new ExtensionLoader(cliLogger);
49
73
  try {
50
- await loader.setupAll([{
51
- extension: module.default(),
52
- source: "config",
53
- origin: "standalone proxy cache selection",
54
- }], {});
74
+ await loader.setupAll(extensions, {});
75
+ // Keep the chart compatible with older universal binaries during rollout.
76
+ // This shared boundary translates the legacy value only after the
77
+ // extension-backed store is registered. The downstream cache validators
78
+ // (src/proxy/cache/index.ts, src/proxy/cache/extension-store.ts) accept
79
+ // only "memory" and "extension", so this translation must complete before
80
+ // the proxy runtime is imported. TODO: remove this rollout shim once the
81
+ // hosted charts stop passing CACHE_TYPE=redis.
82
+ if (cacheType === "redis")
83
+ setEnv("CACHE_TYPE", "extension");
55
84
  return loader;
56
85
  }
57
86
  catch (error) {
@@ -59,16 +88,16 @@ async function activateStandaloneProxyCacheExtensionInternal() {
59
88
  await loader.teardownAll();
60
89
  }
61
90
  catch (cleanupError) {
62
- cliLogger.error("Failed to clean up standalone proxy cache extension", cleanupError);
91
+ cliLogger.error("Failed to clean up standalone proxy extensions", cleanupError);
63
92
  }
64
93
  throw error;
65
94
  }
66
95
  }
67
- /** Start explicit standalone cache composition with a pinned lifecycle promise. */
68
- export function activateStandaloneProxyCacheExtension() {
69
- return pinCompositionPromise(activateStandaloneProxyCacheExtensionInternal());
96
+ /** Start explicit standalone proxy extension composition. */
97
+ export function activateStandaloneProxyExtensions() {
98
+ return pinCompositionPromise(activateStandaloneProxyExtensionsInternal());
70
99
  }
71
- async function registerStandaloneProxyCacheExtensionTeardownInternal(loader, registerHook) {
100
+ async function registerStandaloneProxyExtensionTeardownInternal(loader, registerHook) {
72
101
  if (!loader)
73
102
  return () => resolvedBeforeExtensionActivation;
74
103
  let teardownPromise = null;
@@ -90,7 +119,7 @@ async function registerStandaloneProxyCacheExtensionTeardownInternal(loader, reg
90
119
  await teardown();
91
120
  }
92
121
  catch (cleanupError) {
93
- throw createProxyShutdownAggregateError([error, cleanupError], "Failed to register and clean up standalone proxy cache extension teardown");
122
+ throw createProxyShutdownAggregateError([error, cleanupError], "Failed to register and clean up standalone proxy extension teardown");
94
123
  }
95
124
  throw error;
96
125
  }
@@ -109,7 +138,7 @@ async function registerStandaloneProxyCacheExtensionTeardownInternal(loader, reg
109
138
  }
110
139
  catch (teardownError) {
111
140
  if (disposalFailed) {
112
- throw createProxyShutdownAggregateError([disposalError, teardownError], "Failed to unregister and tear down standalone proxy cache extension");
141
+ throw createProxyShutdownAggregateError([disposalError, teardownError], "Failed to unregister and tear down standalone proxy extensions");
113
142
  }
114
143
  throw teardownError;
115
144
  }
@@ -118,6 +147,6 @@ async function registerStandaloneProxyCacheExtensionTeardownInternal(loader, reg
118
147
  })());
119
148
  }
120
149
  /** Register exactly-once provider teardown with the proxy's shutdown owner. */
121
- export function registerStandaloneProxyCacheExtensionTeardown(loader, registerHook = registerProxyShutdownHook) {
122
- return pinCompositionPromise(registerStandaloneProxyCacheExtensionTeardownInternal(loader, registerHook));
150
+ export function registerStandaloneProxyExtensionTeardown(loader, registerHook = registerProxyShutdownHook) {
151
+ return pinCompositionPromise(registerStandaloneProxyExtensionTeardownInternal(loader, registerHook));
123
152
  }
@@ -0,0 +1,17 @@
1
+ import { activateStandaloneProxyExtensions, registerStandaloneProxyExtensionTeardown } from "./proxy-extension-composition.js";
2
+ export interface StandaloneProxyRuntimeOptions {
3
+ bindAddress?: string;
4
+ port?: number;
5
+ }
6
+ interface StandaloneProxyRuntimeDependencies {
7
+ activateExtensions?: typeof activateStandaloneProxyExtensions;
8
+ keepAlive?: () => Promise<void>;
9
+ loadProxy?: () => Promise<unknown>;
10
+ registerTeardown?: typeof registerStandaloneProxyExtensionTeardown;
11
+ }
12
+ /** Create the never-settling promise that owns the standalone process lifetime. */
13
+ export declare function createStandaloneProxyKeepAlivePromise(): Promise<void>;
14
+ /** Start the standalone proxy with the same lifecycle in CLI and dedicated binaries. */
15
+ export declare function runStandaloneProxyRuntime(options?: StandaloneProxyRuntimeOptions, dependencies?: StandaloneProxyRuntimeDependencies): Promise<void>;
16
+ export {};
17
+ //# sourceMappingURL=proxy-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy-runtime.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/serve/proxy-runtime.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,iCAAiC,EACjC,wCAAwC,EACzC,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,6BAA6B;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,kCAAkC;IAC1C,kBAAkB,CAAC,EAAE,OAAO,iCAAiC,CAAC;IAC9D,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,OAAO,wCAAwC,CAAC;CACpE;AAMD,mFAAmF;AACnF,wBAAgB,qCAAqC,IAAI,OAAO,CAAC,IAAI,CAAC,CAErE;AAWD,wFAAwF;AACxF,wBAAsB,yBAAyB,CAC7C,OAAO,GAAE,6BAAkC,EAC3C,YAAY,GAAE,kCAAuC,GACpD,OAAO,CAAC,IAAI,CAAC,CA8Bf"}
@@ -0,0 +1,54 @@
1
+ import { getEnv, setEnv } from "../../../src/platform/compat/process/env.js";
2
+ import { cliLogger } from "../../../src/utils/logger/index.js";
3
+ import denoConfig from "../../../deno.js";
4
+ import { isJsonMode } from "../../shared/json-output.js";
5
+ import { bold, brand, dim } from "../../ui/colors.js";
6
+ import { activateStandaloneProxyExtensions, registerStandaloneProxyExtensionTeardown, } from "./proxy-extension-composition.js";
7
+ // Capture the constructor before extension activation so extension-owned
8
+ // global mutations cannot break the CLI-owned process lifetime promise.
9
+ const NativePromise = Promise;
10
+ /** Create the never-settling promise that owns the standalone process lifetime. */
11
+ export function createStandaloneProxyKeepAlivePromise() {
12
+ return new NativePromise(() => { });
13
+ }
14
+ function showProxyHeader() {
15
+ if (isJsonMode())
16
+ return;
17
+ const version = typeof denoConfig.version === "string" ? denoConfig.version : "0.0.0";
18
+ // Preserve the existing `veryfront serve --mode=proxy` output while the
19
+ // dedicated binary shares this runtime with the universal CLI.
20
+ console.log(`${bold(brand("Veryfront"))} ${dim(`(v${version})`)}`);
21
+ console.log();
22
+ }
23
+ /** Start the standalone proxy with the same lifecycle in CLI and dedicated binaries. */
24
+ export async function runStandaloneProxyRuntime(options = {}, dependencies = {}) {
25
+ if (options.port !== undefined)
26
+ setEnv("PORT", String(options.port));
27
+ if (options.bindAddress !== undefined)
28
+ setEnv("HOST", options.bindAddress);
29
+ const port = getEnv("PORT") || "8080";
30
+ const bindAddress = getEnv("HOST") || "0.0.0.0";
31
+ showProxyHeader();
32
+ cliLogger.info(`Starting proxy server on ${bindAddress}:${port}`);
33
+ const activateExtensions = dependencies.activateExtensions ??
34
+ activateStandaloneProxyExtensions;
35
+ const registerTeardown = dependencies.registerTeardown ??
36
+ registerStandaloneProxyExtensionTeardown;
37
+ const extensionLoader = await activateExtensions();
38
+ const teardownExtensions = await registerTeardown(extensionLoader);
39
+ try {
40
+ await (dependencies.loadProxy ?? (() => import("../../../src/proxy/main.js")))();
41
+ }
42
+ catch (error) {
43
+ try {
44
+ await teardownExtensions();
45
+ }
46
+ catch (cleanupError) {
47
+ cliLogger.error("Failed to clean up proxy extensions after startup failure", cleanupError);
48
+ }
49
+ throw error;
50
+ }
51
+ // Deno.serve returns after binding in compiled binaries, while the proxy's
52
+ // signal handlers own shutdown and extension teardown.
53
+ await (dependencies.keepAlive ?? createStandaloneProxyKeepAlivePromise)();
54
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/webhook/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,WAAW,EAAE,WAqBzB,CAAC"}
1
+ {"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/webhook/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,WAAW,EAAE,WA0BzB,CAAC"}
@@ -6,12 +6,16 @@ export const webhookHelp = {
6
6
  options: [
7
7
  {
8
8
  flag: "--payload <file>",
9
- description: "JSON payload fixture (run only)",
9
+ description: "JSON payload fixture (run only; 64 KiB maximum; filters and agent templates are applied)",
10
10
  },
11
11
  {
12
12
  flag: "--json",
13
13
  description: "Output as JSON",
14
14
  },
15
+ {
16
+ flag: "--debug",
17
+ description: "Enable debug logging (run only)",
18
+ },
15
19
  ],
16
20
  examples: [
17
21
  "veryfront webhook list",
@@ -1,3 +1,8 @@
1
1
  import type { ParsedArgs } from "../../shared/types.js";
2
+ import { type PreparedWebhookInvocation } from "../../../src/webhook/index.js";
3
+ export declare function toWebhookAgentOptions(invocation: PreparedWebhookInvocation): {
4
+ agentInput?: string;
5
+ agentContext?: Record<string, unknown>;
6
+ };
2
7
  export declare function handleWebhookCommand(args: ParsedArgs): Promise<void>;
3
8
  //# sourceMappingURL=handler.d.ts.map