veryfront 0.1.1237 → 0.1.1239

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 (493) hide show
  1. package/esm/cli/auth/login.d.ts +24 -2
  2. package/esm/cli/auth/login.d.ts.map +1 -1
  3. package/esm/cli/auth/login.js +444 -35
  4. package/esm/cli/commands/build/error-handler.d.ts.map +1 -1
  5. package/esm/cli/commands/build/error-handler.js +41 -3
  6. package/esm/cli/commands/build/handler.d.ts.map +1 -1
  7. package/esm/cli/commands/build/handler.js +1 -1
  8. package/esm/cli/commands/dev/command.d.ts.map +1 -1
  9. package/esm/cli/commands/dev/command.js +14 -1
  10. package/esm/cli/commands/dev/inference-status.d.ts +6 -0
  11. package/esm/cli/commands/dev/inference-status.d.ts.map +1 -1
  12. package/esm/cli/commands/dev/inference-status.js +14 -2
  13. package/esm/cli/commands/generate/command.d.ts.map +1 -1
  14. package/esm/cli/commands/generate/command.js +61 -0
  15. package/esm/cli/commands/init/init-command.d.ts.map +1 -1
  16. package/esm/cli/commands/init/init-command.js +23 -31
  17. package/esm/cli/commands/install/registry.d.ts.map +1 -1
  18. package/esm/cli/commands/install/registry.js +6 -9
  19. package/esm/cli/commands/login/command-help.d.ts.map +1 -1
  20. package/esm/cli/commands/login/command-help.js +3 -1
  21. package/esm/cli/commands/pull/command.d.ts +1 -0
  22. package/esm/cli/commands/pull/command.d.ts.map +1 -1
  23. package/esm/cli/commands/pull/command.js +49 -6
  24. package/esm/cli/commands/push/command-help.d.ts.map +1 -1
  25. package/esm/cli/commands/push/command-help.js +7 -0
  26. package/esm/cli/commands/push/command.d.ts +23 -12
  27. package/esm/cli/commands/push/command.d.ts.map +1 -1
  28. package/esm/cli/commands/push/command.js +461 -44
  29. package/esm/cli/commands/push/plan.d.ts +35 -0
  30. package/esm/cli/commands/push/plan.d.ts.map +1 -0
  31. package/esm/cli/commands/push/plan.js +96 -0
  32. package/esm/cli/commands/schedule/handler.d.ts +21 -2
  33. package/esm/cli/commands/schedule/handler.d.ts.map +1 -1
  34. package/esm/cli/commands/schedule/handler.js +74 -27
  35. package/esm/cli/commands/schema/command-help.js +1 -1
  36. package/esm/cli/commands/up/command.js +1 -1
  37. package/esm/cli/commands/webhook/handler.d.ts.map +1 -1
  38. package/esm/cli/commands/webhook/handler.js +3 -1
  39. package/esm/cli/router.d.ts.map +1 -1
  40. package/esm/cli/router.js +27 -5
  41. package/esm/cli/shared/args.d.ts +15 -1
  42. package/esm/cli/shared/args.d.ts.map +1 -1
  43. package/esm/cli/shared/args.js +56 -3
  44. package/esm/cli/shared/config.d.ts +11 -2
  45. package/esm/cli/shared/config.d.ts.map +1 -1
  46. package/esm/cli/shared/config.js +72 -27
  47. package/esm/cli/shared/project-creation.js +1 -1
  48. package/esm/cli/sync/state.d.ts +20 -0
  49. package/esm/cli/sync/state.d.ts.map +1 -0
  50. package/esm/cli/sync/state.js +193 -0
  51. package/esm/deno.js +2 -2
  52. package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.d.ts.map +1 -1
  53. package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.js +852 -21
  54. package/esm/extensions/ext-observability-sentry/src/policy.d.ts +2 -0
  55. package/esm/extensions/ext-observability-sentry/src/policy.d.ts.map +1 -1
  56. package/esm/extensions/ext-observability-sentry/src/policy.js +214 -3
  57. package/esm/src/agent/conversation/delegation-policy.d.ts +2 -0
  58. package/esm/src/agent/conversation/delegation-policy.d.ts.map +1 -1
  59. package/esm/src/agent/conversation/delegation-policy.js +13 -3
  60. package/esm/src/agent/conversation/hosted-terminal.d.ts.map +1 -1
  61. package/esm/src/agent/conversation/hosted-terminal.js +6 -2
  62. package/esm/src/agent/conversation/run-chunk-mirror.d.ts.map +1 -1
  63. package/esm/src/agent/conversation/run-chunk-mirror.js +14 -2
  64. package/esm/src/agent/factory.d.ts.map +1 -1
  65. package/esm/src/agent/factory.js +22 -11
  66. package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts +2 -0
  67. package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts.map +1 -1
  68. package/esm/src/agent/hosted/chat-runtime-tool-assembly.js +6 -1
  69. package/esm/src/agent/hosted/child-fork-execution-runner.d.ts +2 -1
  70. package/esm/src/agent/hosted/child-fork-execution-runner.d.ts.map +1 -1
  71. package/esm/src/agent/hosted/child-fork-execution-runner.js +6 -3
  72. package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts +12 -3
  73. package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts.map +1 -1
  74. package/esm/src/agent/hosted/child-fork-step-message-preparation.js +16 -3
  75. package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts +1 -1
  76. package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts.map +1 -1
  77. package/esm/src/agent/hosted/cloud-agent-chat-execution.js +3 -3
  78. package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts +11 -0
  79. package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts.map +1 -1
  80. package/esm/src/agent/hosted/cloud-agent-child-tools.js +2 -3
  81. package/esm/src/agent/hosted/cloud-agent-config.d.ts +1 -0
  82. package/esm/src/agent/hosted/cloud-agent-config.d.ts.map +1 -1
  83. package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts +16 -1
  84. package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts.map +1 -1
  85. package/esm/src/agent/hosted/cloud-runtime-system-messages.js +13 -3
  86. package/esm/src/agent/hosted/default-chat-runtime.d.ts +2 -1
  87. package/esm/src/agent/hosted/default-chat-runtime.d.ts.map +1 -1
  88. package/esm/src/agent/hosted/default-chat-runtime.js +18 -7
  89. package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts +2 -1
  90. package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts.map +1 -1
  91. package/esm/src/agent/hosted/default-invoke-agent-tool.js +11 -3
  92. package/esm/src/agent/hosted/default-project-steering-refresh.d.ts +2 -1
  93. package/esm/src/agent/hosted/default-project-steering-refresh.d.ts.map +1 -1
  94. package/esm/src/agent/hosted/default-project-steering-refresh.js +4 -1
  95. package/esm/src/agent/hosted/runtime-state-resolver.d.ts +6 -4
  96. package/esm/src/agent/hosted/runtime-state-resolver.d.ts.map +1 -1
  97. package/esm/src/agent/hosted/runtime-state-resolver.js +8 -11
  98. package/esm/src/agent/index.d.ts +3 -3
  99. package/esm/src/agent/index.d.ts.map +1 -1
  100. package/esm/src/agent/project/agent-runtime.d.ts.map +1 -1
  101. package/esm/src/agent/project/agent-runtime.js +6 -3
  102. package/esm/src/agent/runtime/agent-definition.d.ts +68 -66
  103. package/esm/src/agent/runtime/agent-definition.d.ts.map +1 -1
  104. package/esm/src/agent/runtime/agent-definition.js +15 -2
  105. package/esm/src/agent/runtime/agent-invocation-contract.d.ts +2 -0
  106. package/esm/src/agent/runtime/agent-invocation-contract.d.ts.map +1 -1
  107. package/esm/src/agent/runtime/agent-markdown-adapter.js +1 -1
  108. package/esm/src/agent/runtime/agent-runtime-step.d.ts +11 -5
  109. package/esm/src/agent/runtime/agent-runtime-step.d.ts.map +1 -1
  110. package/esm/src/agent/runtime/agent-runtime-step.js +23 -6
  111. package/esm/src/agent/runtime/call-context.d.ts +42 -11
  112. package/esm/src/agent/runtime/call-context.d.ts.map +1 -1
  113. package/esm/src/agent/runtime/call-context.js +480 -42
  114. package/esm/src/agent/runtime/chat-stream-handler.d.ts +18 -0
  115. package/esm/src/agent/runtime/chat-stream-handler.d.ts.map +1 -1
  116. package/esm/src/agent/runtime/chat-stream-handler.js +38 -18
  117. package/esm/src/agent/runtime/effective-agent-system.d.ts +13 -4
  118. package/esm/src/agent/runtime/effective-agent-system.d.ts.map +1 -1
  119. package/esm/src/agent/runtime/effective-agent-system.js +29 -0
  120. package/esm/src/agent/runtime/index.d.ts +1 -0
  121. package/esm/src/agent/runtime/index.d.ts.map +1 -1
  122. package/esm/src/agent/runtime/index.js +638 -53
  123. package/esm/src/agent/runtime/load-skill-tool.d.ts +33 -3
  124. package/esm/src/agent/runtime/load-skill-tool.d.ts.map +1 -1
  125. package/esm/src/agent/runtime/load-skill-tool.js +152 -21
  126. package/esm/src/agent/runtime/model-resolution.d.ts +3 -0
  127. package/esm/src/agent/runtime/model-resolution.d.ts.map +1 -1
  128. package/esm/src/agent/runtime/model-resolution.js +14 -0
  129. package/esm/src/agent/runtime/model-transport.d.ts +1 -0
  130. package/esm/src/agent/runtime/model-transport.d.ts.map +1 -1
  131. package/esm/src/agent/runtime/model-transport.js +5 -2
  132. package/esm/src/agent/runtime/run-runtime-context.d.ts +4 -0
  133. package/esm/src/agent/runtime/run-runtime-context.d.ts.map +1 -1
  134. package/esm/src/agent/runtime/run-runtime-context.js +9 -3
  135. package/esm/src/agent/runtime/runtime-tool-config.d.ts +1 -0
  136. package/esm/src/agent/runtime/runtime-tool-config.d.ts.map +1 -1
  137. package/esm/src/agent/runtime/skill-prompt.d.ts +3 -0
  138. package/esm/src/agent/runtime/skill-prompt.d.ts.map +1 -1
  139. package/esm/src/agent/runtime/skill-prompt.js +113 -25
  140. package/esm/src/agent/runtime/streamed-assistant-message.d.ts +22 -2
  141. package/esm/src/agent/runtime/streamed-assistant-message.d.ts.map +1 -1
  142. package/esm/src/agent/runtime/streamed-assistant-message.js +26 -5
  143. package/esm/src/agent/runtime/tool-inventory.d.ts.map +1 -1
  144. package/esm/src/agent/runtime/tool-inventory.js +13 -9
  145. package/esm/src/agent/runtime/tool-result-continuation.d.ts +4 -2
  146. package/esm/src/agent/runtime/tool-result-continuation.d.ts.map +1 -1
  147. package/esm/src/agent/runtime/tool-result-continuation.js +24 -20
  148. package/esm/src/agent/schemas/agent.schema.d.ts +2 -2
  149. package/esm/src/agent/service/runtime.js +1 -1
  150. package/esm/src/agent/streaming/fork-runtime-stream.d.ts +5 -4
  151. package/esm/src/agent/streaming/fork-runtime-stream.d.ts.map +1 -1
  152. package/esm/src/agent/types.d.ts +14 -1
  153. package/esm/src/agent/types.d.ts.map +1 -1
  154. package/esm/src/chat/chat-ui-message-helpers.d.ts.map +1 -1
  155. package/esm/src/chat/chat-ui-message-helpers.js +75 -16
  156. package/esm/src/config/loader.d.ts.map +1 -1
  157. package/esm/src/config/loader.js +37 -1
  158. package/esm/src/errors/catalog/build-errors.d.ts.map +1 -1
  159. package/esm/src/errors/catalog/build-errors.js +14 -0
  160. package/esm/src/errors/error-registry/build.d.ts +2 -0
  161. package/esm/src/errors/error-registry/build.d.ts.map +1 -1
  162. package/esm/src/errors/error-registry/build.js +8 -0
  163. package/esm/src/errors/error-registry/deploy.d.ts +4 -0
  164. package/esm/src/errors/error-registry/deploy.d.ts.map +1 -1
  165. package/esm/src/errors/error-registry/deploy.js +16 -0
  166. package/esm/src/errors/error-registry.d.ts +3 -0
  167. package/esm/src/errors/error-registry.d.ts.map +1 -1
  168. package/esm/src/errors/index.d.ts +2 -1
  169. package/esm/src/errors/index.d.ts.map +1 -1
  170. package/esm/src/errors/index.js +4 -3
  171. package/esm/src/errors/tenant-classification.d.ts +25 -0
  172. package/esm/src/errors/tenant-classification.d.ts.map +1 -0
  173. package/esm/src/errors/tenant-classification.js +61 -0
  174. package/esm/src/extensions/builtin-extensions.d.ts +10 -15
  175. package/esm/src/extensions/builtin-extensions.d.ts.map +1 -1
  176. package/esm/src/extensions/builtin-extensions.js +32 -26
  177. package/esm/src/extensions/deferred-extension.d.ts +4 -4
  178. package/esm/src/extensions/deferred-extension.js +4 -4
  179. package/esm/src/extensions/index.d.ts +1 -0
  180. package/esm/src/extensions/index.d.ts.map +1 -1
  181. package/esm/src/extensions/index.js +1 -0
  182. package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
  183. package/esm/src/integrations/_data.d.ts.map +1 -1
  184. package/esm/src/integrations/_data.js +6 -0
  185. package/esm/src/integrations/schema.d.ts +8 -0
  186. package/esm/src/integrations/schema.d.ts.map +1 -1
  187. package/esm/src/integrations/schema.js +3 -0
  188. package/esm/src/integrations/types.d.ts +2 -0
  189. package/esm/src/integrations/types.d.ts.map +1 -1
  190. package/esm/src/internal-agents/run-stream.d.ts.map +1 -1
  191. package/esm/src/internal-agents/run-stream.js +35 -20
  192. package/esm/src/internal-agents/run-system-prompt.d.ts +7 -2
  193. package/esm/src/internal-agents/run-system-prompt.d.ts.map +1 -1
  194. package/esm/src/internal-agents/run-system-prompt.js +19 -13
  195. package/esm/src/internal-agents/schema.d.ts +2 -0
  196. package/esm/src/internal-agents/schema.d.ts.map +1 -1
  197. package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
  198. package/esm/src/modules/react-loader/ssr-module-loader/loader.js +2 -18
  199. package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts +11 -0
  200. package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts.map +1 -1
  201. package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.js +53 -6
  202. package/esm/src/observability/application-error-contract.d.ts +4 -0
  203. package/esm/src/observability/application-error-contract.d.ts.map +1 -1
  204. package/esm/src/observability/application-errors.d.ts.map +1 -1
  205. package/esm/src/observability/application-errors.js +64 -3
  206. package/esm/src/platform/adapters/runtime/deno/http-server.d.ts.map +1 -1
  207. package/esm/src/platform/adapters/runtime/deno/http-server.js +2 -10
  208. package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts +14 -0
  209. package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts.map +1 -1
  210. package/esm/src/platform/adapters/runtime/shared/request-peer.js +82 -0
  211. package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
  212. package/esm/src/provider/runtime-loader/provider-http.d.ts +5 -1
  213. package/esm/src/provider/runtime-loader/provider-http.d.ts.map +1 -1
  214. package/esm/src/provider/runtime-loader/provider-http.js +55 -17
  215. package/esm/src/provider/shared/index.d.ts +1 -0
  216. package/esm/src/provider/shared/index.d.ts.map +1 -1
  217. package/esm/src/provider/shared/index.js +2 -0
  218. package/esm/src/provider/types.d.ts +1 -0
  219. package/esm/src/provider/types.d.ts.map +1 -1
  220. package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts +3 -0
  221. package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts.map +1 -0
  222. package/esm/src/react/components/ui/adapter/builtin/combobox.js +204 -0
  223. package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts +3 -0
  224. package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts.map +1 -0
  225. package/esm/src/react/components/ui/adapter/builtin/dialog.js +20 -0
  226. package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts +3 -0
  227. package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts.map +1 -0
  228. package/esm/src/react/components/ui/adapter/builtin/drawer.js +21 -0
  229. package/esm/src/react/components/ui/adapter/builtin/index.d.ts.map +1 -1
  230. package/esm/src/react/components/ui/adapter/builtin/index.js +10 -0
  231. package/esm/src/react/components/ui/adapter/builtin/popover.d.ts +3 -0
  232. package/esm/src/react/components/ui/adapter/builtin/popover.d.ts.map +1 -0
  233. package/esm/src/react/components/ui/adapter/builtin/popover.js +28 -0
  234. package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts +3 -0
  235. package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts.map +1 -0
  236. package/esm/src/react/components/ui/adapter/builtin/tabs.js +73 -0
  237. package/esm/src/react/components/ui/adapter/context.d.ts.map +1 -1
  238. package/esm/src/react/components/ui/adapter/context.js +10 -0
  239. package/esm/src/react/components/ui/adapter/contract.d.ts +212 -0
  240. package/esm/src/react/components/ui/adapter/contract.d.ts.map +1 -1
  241. package/esm/src/react/components/ui/adapter/token-scope.d.ts +24 -0
  242. package/esm/src/react/components/ui/adapter/token-scope.d.ts.map +1 -0
  243. package/esm/src/react/components/ui/adapter/token-scope.js +26 -0
  244. package/esm/src/react/components/ui/alert-dialog.d.ts +101 -0
  245. package/esm/src/react/components/ui/alert-dialog.d.ts.map +1 -0
  246. package/esm/src/react/components/ui/alert-dialog.js +181 -0
  247. package/esm/src/react/components/ui/aspect-ratio.d.ts +18 -0
  248. package/esm/src/react/components/ui/aspect-ratio.d.ts.map +1 -0
  249. package/esm/src/react/components/ui/aspect-ratio.js +13 -0
  250. package/esm/src/react/components/ui/autocomplete.d.ts +67 -0
  251. package/esm/src/react/components/ui/autocomplete.d.ts.map +1 -0
  252. package/esm/src/react/components/ui/autocomplete.js +59 -0
  253. package/esm/src/react/components/ui/breadcrumb.d.ts +86 -0
  254. package/esm/src/react/components/ui/breadcrumb.d.ts.map +1 -0
  255. package/esm/src/react/components/ui/breadcrumb.js +67 -0
  256. package/esm/src/react/components/ui/calendar.d.ts +40 -0
  257. package/esm/src/react/components/ui/calendar.d.ts.map +1 -0
  258. package/esm/src/react/components/ui/calendar.js +170 -0
  259. package/esm/src/react/components/ui/combobox.d.ts +74 -0
  260. package/esm/src/react/components/ui/combobox.d.ts.map +1 -0
  261. package/esm/src/react/components/ui/combobox.js +100 -0
  262. package/esm/src/react/components/ui/context-menu.d.ts +116 -0
  263. package/esm/src/react/components/ui/context-menu.d.ts.map +1 -0
  264. package/esm/src/react/components/ui/context-menu.js +168 -0
  265. package/esm/src/react/components/ui/date-picker.d.ts +69 -0
  266. package/esm/src/react/components/ui/date-picker.d.ts.map +1 -0
  267. package/esm/src/react/components/ui/date-picker.js +96 -0
  268. package/esm/src/react/components/ui/dialog.d.ts +41 -11
  269. package/esm/src/react/components/ui/dialog.d.ts.map +1 -1
  270. package/esm/src/react/components/ui/dialog.js +47 -28
  271. package/esm/src/react/components/ui/drawer.d.ts +31 -8
  272. package/esm/src/react/components/ui/drawer.d.ts.map +1 -1
  273. package/esm/src/react/components/ui/drawer.js +33 -22
  274. package/esm/src/react/components/ui/dropdown-menu.d.ts.map +1 -1
  275. package/esm/src/react/components/ui/dropdown-menu.js +7 -75
  276. package/esm/src/react/components/ui/field.d.ts +70 -0
  277. package/esm/src/react/components/ui/field.d.ts.map +1 -0
  278. package/esm/src/react/components/ui/field.js +161 -0
  279. package/esm/src/react/components/ui/file-type.d.ts +9 -8
  280. package/esm/src/react/components/ui/file-type.d.ts.map +1 -1
  281. package/esm/src/react/components/ui/file-type.js +8 -8
  282. package/esm/src/react/components/ui/hover-card.d.ts +82 -0
  283. package/esm/src/react/components/ui/hover-card.d.ts.map +1 -0
  284. package/esm/src/react/components/ui/hover-card.js +140 -0
  285. package/esm/src/react/components/ui/index.d.ts +23 -2
  286. package/esm/src/react/components/ui/index.d.ts.map +1 -1
  287. package/esm/src/react/components/ui/index.js +21 -0
  288. package/esm/src/react/components/ui/input-otp.d.ts +37 -0
  289. package/esm/src/react/components/ui/input-otp.d.ts.map +1 -0
  290. package/esm/src/react/components/ui/input-otp.js +42 -0
  291. package/esm/src/react/components/ui/menu-keyboard.d.ts +8 -0
  292. package/esm/src/react/components/ui/menu-keyboard.d.ts.map +1 -0
  293. package/esm/src/react/components/ui/menu-keyboard.js +76 -0
  294. package/esm/src/react/components/ui/menubar.d.ts +98 -0
  295. package/esm/src/react/components/ui/menubar.d.ts.map +1 -0
  296. package/esm/src/react/components/ui/menubar.js +173 -0
  297. package/esm/src/react/components/ui/meter.d.ts +45 -0
  298. package/esm/src/react/components/ui/meter.d.ts.map +1 -0
  299. package/esm/src/react/components/ui/meter.js +59 -0
  300. package/esm/src/react/components/ui/modal-surface.d.ts +7 -1
  301. package/esm/src/react/components/ui/modal-surface.d.ts.map +1 -1
  302. package/esm/src/react/components/ui/modal-surface.js +23 -6
  303. package/esm/src/react/components/ui/navigation-menu.d.ts +101 -0
  304. package/esm/src/react/components/ui/navigation-menu.d.ts.map +1 -0
  305. package/esm/src/react/components/ui/navigation-menu.js +195 -0
  306. package/esm/src/react/components/ui/number-field.d.ts +46 -0
  307. package/esm/src/react/components/ui/number-field.d.ts.map +1 -0
  308. package/esm/src/react/components/ui/number-field.js +121 -0
  309. package/esm/src/react/components/ui/pagination.d.ts +77 -0
  310. package/esm/src/react/components/ui/pagination.d.ts.map +1 -0
  311. package/esm/src/react/components/ui/pagination.js +62 -0
  312. package/esm/src/react/components/ui/popover.d.ts +42 -13
  313. package/esm/src/react/components/ui/popover.d.ts.map +1 -1
  314. package/esm/src/react/components/ui/popover.js +25 -12
  315. package/esm/src/react/components/ui/scroll-area.d.ts +38 -0
  316. package/esm/src/react/components/ui/scroll-area.d.ts.map +1 -0
  317. package/esm/src/react/components/ui/scroll-area.js +35 -0
  318. package/esm/src/react/components/ui/separator.d.ts +20 -0
  319. package/esm/src/react/components/ui/separator.d.ts.map +1 -0
  320. package/esm/src/react/components/ui/separator.js +13 -0
  321. package/esm/src/react/components/ui/slider.d.ts +44 -0
  322. package/esm/src/react/components/ui/slider.d.ts.map +1 -0
  323. package/esm/src/react/components/ui/slider.js +46 -0
  324. package/esm/src/react/components/ui/status.d.ts +6 -5
  325. package/esm/src/react/components/ui/status.d.ts.map +1 -1
  326. package/esm/src/react/components/ui/status.js +4 -4
  327. package/esm/src/react/components/ui/tabs.d.ts +32 -9
  328. package/esm/src/react/components/ui/tabs.d.ts.map +1 -1
  329. package/esm/src/react/components/ui/tabs.js +46 -22
  330. package/esm/src/react/components/ui/toggle.d.ts +26 -0
  331. package/esm/src/react/components/ui/toggle.d.ts.map +1 -0
  332. package/esm/src/react/components/ui/toggle.js +29 -0
  333. package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts +2 -1
  334. package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts.map +1 -1
  335. package/esm/src/react/components/ui/use-isomorphic-layout-effect.js +6 -3
  336. package/esm/src/rendering/chunk-optimizer/source-imports.d.ts.map +1 -1
  337. package/esm/src/rendering/chunk-optimizer/source-imports.js +4 -114
  338. package/esm/src/rendering/orchestrator/css-candidate-manifest.d.ts.map +1 -1
  339. package/esm/src/rendering/orchestrator/css-candidate-manifest.js +30 -1
  340. package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts +10 -0
  341. package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts.map +1 -1
  342. package/esm/src/rendering/orchestrator/module-loader/build-failure.js +50 -3
  343. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts +2 -0
  344. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts.map +1 -1
  345. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.js +21 -6
  346. package/esm/src/rendering/orchestrator/module-loader/index.d.ts +2 -1
  347. package/esm/src/rendering/orchestrator/module-loader/index.d.ts.map +1 -1
  348. package/esm/src/rendering/orchestrator/module-loader/index.js +190 -7
  349. package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts +4 -0
  350. package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts.map +1 -1
  351. package/esm/src/rendering/orchestrator/module-loader/module-persistence.js +374 -7
  352. package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
  353. package/esm/src/rendering/orchestrator/pipeline.js +12 -1
  354. package/esm/src/runs/runs-client.d.ts +2 -4
  355. package/esm/src/runs/runs-client.d.ts.map +1 -1
  356. package/esm/src/runs/schemas.d.ts +18 -8
  357. package/esm/src/runs/schemas.d.ts.map +1 -1
  358. package/esm/src/runs/schemas.js +26 -0
  359. package/esm/src/runtime/model-call-context.d.ts +6 -1
  360. package/esm/src/runtime/model-call-context.d.ts.map +1 -1
  361. package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
  362. package/esm/src/runtime/runtime-bridge.js +133 -15
  363. package/esm/src/schedule/factory.d.ts +8 -2
  364. package/esm/src/schedule/factory.d.ts.map +1 -1
  365. package/esm/src/schedule/factory.js +0 -8
  366. package/esm/src/schedule/index.d.ts +10 -1
  367. package/esm/src/schedule/index.d.ts.map +1 -1
  368. package/esm/src/schedule/index.js +9 -0
  369. package/esm/src/schedule/types.d.ts +30 -11
  370. package/esm/src/schedule/types.d.ts.map +1 -1
  371. package/esm/src/schedule/validation.d.ts +17 -0
  372. package/esm/src/schedule/validation.d.ts.map +1 -1
  373. package/esm/src/schedule/validation.js +93 -5
  374. package/esm/src/security/sandbox/worker-pool.d.ts.map +1 -1
  375. package/esm/src/security/sandbox/worker-pool.js +6 -1
  376. package/esm/src/server/bootstrap.d.ts.map +1 -1
  377. package/esm/src/server/bootstrap.js +6 -0
  378. package/esm/src/server/dev-server/index.d.ts +1 -1
  379. package/esm/src/server/dev-server/index.d.ts.map +1 -1
  380. package/esm/src/server/dev-server/server.d.ts +7 -3
  381. package/esm/src/server/dev-server/server.d.ts.map +1 -1
  382. package/esm/src/server/dev-server/server.js +12 -3
  383. package/esm/src/server/dev-server/types.d.ts +7 -1
  384. package/esm/src/server/dev-server/types.d.ts.map +1 -1
  385. package/esm/src/server/dev-server.d.ts +1 -1
  386. package/esm/src/server/dev-server.d.ts.map +1 -1
  387. package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
  388. package/esm/src/server/handlers/dev/framework-candidates.generated.js +2509 -34
  389. package/esm/src/server/handlers/dev/projects/index.d.ts.map +1 -1
  390. package/esm/src/server/handlers/dev/projects/index.js +3 -0
  391. package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
  392. package/esm/src/server/handlers/request/agent-stream.handler.js +29 -24
  393. package/esm/src/server/index.d.ts +3 -3
  394. package/esm/src/server/index.d.ts.map +1 -1
  395. package/esm/src/server/index.js +10 -5
  396. package/esm/src/server/node-handler.d.ts.map +1 -1
  397. package/esm/src/server/node-handler.js +4 -1
  398. package/esm/src/server/production-server.d.ts.map +1 -1
  399. package/esm/src/server/production-server.js +2 -1
  400. package/esm/src/server/project-env/cache.d.ts +17 -0
  401. package/esm/src/server/project-env/cache.d.ts.map +1 -1
  402. package/esm/src/server/project-env/cache.js +78 -2
  403. package/esm/src/server/project-env/fetcher.d.ts.map +1 -1
  404. package/esm/src/server/project-env/fetcher.js +24 -14
  405. package/esm/src/server/project-env/index.d.ts +1 -1
  406. package/esm/src/server/project-env/index.d.ts.map +1 -1
  407. package/esm/src/server/project-env/index.js +1 -1
  408. package/esm/src/server/project-env/internal-authorization.d.ts +7 -0
  409. package/esm/src/server/project-env/internal-authorization.d.ts.map +1 -0
  410. package/esm/src/server/project-env/internal-authorization.js +32 -0
  411. package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
  412. package/esm/src/server/runtime-handler/index.js +1 -1
  413. package/esm/src/server/runtime-handler/projects-handler.d.ts +1 -1
  414. package/esm/src/server/runtime-handler/projects-handler.d.ts.map +1 -1
  415. package/esm/src/server/runtime-handler/projects-handler.js +4 -2
  416. package/esm/src/transforms/esm/http-bundler.d.ts.map +1 -1
  417. package/esm/src/transforms/esm/http-bundler.js +6 -5
  418. package/esm/src/transforms/esm/http-cache-helpers.d.ts +11 -0
  419. package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
  420. package/esm/src/transforms/esm/http-cache-helpers.js +35 -0
  421. package/esm/src/transforms/esm/http-cache.d.ts.map +1 -1
  422. package/esm/src/transforms/esm/http-cache.js +16 -10
  423. package/esm/src/transforms/esm/specifier-resolver.d.ts.map +1 -1
  424. package/esm/src/transforms/esm/specifier-resolver.js +87 -7
  425. package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts +2 -0
  426. package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts.map +1 -1
  427. package/esm/src/transforms/import-rewriter/strategies/alias-strategy.js +11 -6
  428. package/esm/src/transforms/md/compiler/md-compiler.d.ts.map +1 -1
  429. package/esm/src/transforms/md/compiler/md-compiler.js +12 -5
  430. package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts +2 -0
  431. package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts.map +1 -1
  432. package/esm/src/transforms/mdx/compiler/frontmatter-extractor.js +33 -1
  433. package/esm/src/transforms/mdx/compiler/mdx-compiler.d.ts.map +1 -1
  434. package/esm/src/transforms/mdx/compiler/mdx-compiler.js +46 -7
  435. package/esm/src/transforms/mdx/esm-module-loader/cache/index.d.ts.map +1 -1
  436. package/esm/src/transforms/mdx/esm-module-loader/cache/index.js +8 -2
  437. package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts +1 -0
  438. package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts.map +1 -1
  439. package/esm/src/transforms/mdx/esm-module-loader/cache-format.js +3 -0
  440. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts +4 -0
  441. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts.map +1 -1
  442. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.js +44 -8
  443. package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts +2 -0
  444. package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts.map +1 -1
  445. package/esm/src/transforms/mdx/esm-module-loader/missing-module.js +4 -0
  446. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts.map +1 -1
  447. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.js +5 -1
  448. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts +2 -0
  449. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts.map +1 -1
  450. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.js +50 -11
  451. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts +24 -12
  452. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts.map +1 -1
  453. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.js +201 -18
  454. package/esm/src/transforms/mdx/esm-module-loader/types.d.ts +5 -0
  455. package/esm/src/transforms/mdx/esm-module-loader/types.d.ts.map +1 -1
  456. package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts +22 -2
  457. package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts.map +1 -1
  458. package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.js +2080 -129
  459. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts +11 -1
  460. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts.map +1 -1
  461. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.js +32 -15
  462. package/esm/src/transforms/pipeline/stages/compile.d.ts.map +1 -1
  463. package/esm/src/transforms/pipeline/stages/compile.js +44 -0
  464. package/esm/src/transforms/shared/specifier-suffix.d.ts +25 -0
  465. package/esm/src/transforms/shared/specifier-suffix.d.ts.map +1 -0
  466. package/esm/src/transforms/shared/specifier-suffix.js +43 -0
  467. package/esm/src/trigger/index.d.ts +2 -2
  468. package/esm/src/trigger/index.d.ts.map +1 -1
  469. package/esm/src/trigger/index.js +1 -1
  470. package/esm/src/trigger/local-runner.d.ts +2 -2
  471. package/esm/src/trigger/local-runner.d.ts.map +1 -1
  472. package/esm/src/trigger/local-runner.js +11 -4
  473. package/esm/src/trigger/target.d.ts +97 -5
  474. package/esm/src/trigger/target.d.ts.map +1 -1
  475. package/esm/src/trigger/target.js +175 -5
  476. package/esm/src/utils/version-constant.d.ts +1 -1
  477. package/esm/src/utils/version-constant.js +1 -1
  478. package/esm/src/webhook/types.d.ts +21 -6
  479. package/esm/src/webhook/types.d.ts.map +1 -1
  480. package/esm/src/webhook/validation.d.ts.map +1 -1
  481. package/esm/src/webhook/validation.js +27 -39
  482. package/esm/templates/index.d.ts +1 -1
  483. package/esm/templates/index.d.ts.map +1 -1
  484. package/esm/templates/loader.d.ts +6 -6
  485. package/esm/templates/loader.d.ts.map +1 -1
  486. package/esm/templates/loader.js +34 -18
  487. package/esm/templates/manifest.generated.d.ts +3 -0
  488. package/esm/templates/manifest.generated.d.ts.map +1 -0
  489. package/esm/templates/manifest.generated.js +2 -0
  490. package/package.json +8 -8
  491. package/esm/templates/manifest.d.ts +0 -664
  492. package/esm/templates/manifest.d.ts.map +0 -1
  493. package/esm/templates/manifest.js +0 -662
@@ -2,24 +2,61 @@ import { recordErrorCount } from "../observability/metrics/index.js";
2
2
  import { serverLogger } from "../utils/index.js";
3
3
  import { getActiveRunEventSinks } from "./run-event-sink-context.js";
4
4
  const cloneStructuredValue = globalThis.structuredClone;
5
+ const ObjectDefineProperty = Object.defineProperty;
6
+ const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
7
+ const ObjectHasOwn = Object.hasOwn;
8
+ const ReflectApply = Reflect.apply;
9
+ const ReflectOwnKeys = Reflect.ownKeys;
5
10
  const logger = serverLogger.component("runtime-bridge");
6
- function normalizeSystemPrompt(system) {
11
+ function readSystemProviderOptions(system) {
12
+ let descriptor;
13
+ try {
14
+ descriptor = Object.getOwnPropertyDescriptor(system, "providerOptions");
15
+ }
16
+ catch {
17
+ throw new TypeError("System message providerOptions must be an own enumerable data property");
18
+ }
19
+ if (descriptor === undefined)
20
+ return undefined;
21
+ if (!Object.hasOwn(descriptor, "value") || descriptor.enumerable !== true) {
22
+ throw new TypeError("System message providerOptions must be an own enumerable data property");
23
+ }
24
+ const providerOptions = descriptor.value;
25
+ return providerOptions && typeof providerOptions === "object" &&
26
+ !Array.isArray(providerOptions)
27
+ ? providerOptions
28
+ : undefined;
29
+ }
30
+ function normalizeSystemMessages(system) {
7
31
  if (typeof system === "string") {
8
- return system;
32
+ return system.length > 0 ? [{ role: "system", content: system }] : [];
9
33
  }
10
34
  if (!system || typeof system !== "object") {
11
- return undefined;
35
+ return [];
12
36
  }
13
37
  if ("content" in system && typeof system.content === "string") {
14
- return system.content;
38
+ const providerOptions = readSystemProviderOptions(system);
39
+ return [{
40
+ role: "system",
41
+ content: system.content,
42
+ ...(providerOptions ? { providerOptions } : {}),
43
+ }];
15
44
  }
16
45
  if (Array.isArray(system)) {
17
- const parts = system.flatMap((entry) => entry && typeof entry === "object" && "content" in entry && typeof entry.content === "string"
18
- ? [entry.content]
19
- : []);
20
- return parts.length > 0 ? parts.join("\n") : undefined;
46
+ return system.flatMap((entry) => {
47
+ if (!entry || typeof entry !== "object" || !("content" in entry) ||
48
+ typeof entry.content !== "string") {
49
+ return [];
50
+ }
51
+ const providerOptions = readSystemProviderOptions(entry);
52
+ return [{
53
+ role: "system",
54
+ content: entry.content,
55
+ ...(providerOptions ? { providerOptions } : {}),
56
+ }];
57
+ });
21
58
  }
22
- return undefined;
59
+ return [];
23
60
  }
24
61
  function getProviderRequestMessages(messages) {
25
62
  const requestMessages = [...messages];
@@ -29,10 +66,11 @@ function getProviderRequestMessages(messages) {
29
66
  return requestMessages;
30
67
  }
31
68
  function toRuntimePrompt(system, messages) {
32
- const prompt = [];
33
- if (system && system.length > 0) {
34
- prompt.push({ role: "system", content: system });
35
- }
69
+ const prompt = system.map((message) => ({
70
+ role: "system",
71
+ content: message.content,
72
+ ...(message.providerOptions === undefined ? {} : { providerOptions: message.providerOptions }),
73
+ }));
36
74
  for (const message of messages) {
37
75
  switch (message.role) {
38
76
  case "system":
@@ -72,6 +110,86 @@ function toRuntimePrompt(system, messages) {
72
110
  }
73
111
  return prompt;
74
112
  }
113
+ function readOwnEnumerableDataDescriptor(value, key) {
114
+ let descriptor;
115
+ try {
116
+ descriptor = ReflectApply(ObjectGetOwnPropertyDescriptor, undefined, [
117
+ value,
118
+ key,
119
+ ]);
120
+ }
121
+ catch {
122
+ return undefined;
123
+ }
124
+ return descriptor?.enumerable === true && ObjectHasOwn(descriptor, "value")
125
+ ? descriptor
126
+ : undefined;
127
+ }
128
+ function sanitizePersistedCacheControl(value) {
129
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
130
+ return undefined;
131
+ }
132
+ const type = readOwnEnumerableDataDescriptor(value, "type");
133
+ if (type?.value !== "ephemeral") {
134
+ return undefined;
135
+ }
136
+ const ttl = readOwnEnumerableDataDescriptor(value, "ttl");
137
+ if (ttl && ttl.value !== undefined && ttl.value !== "5m" && ttl.value !== "1h") {
138
+ return undefined;
139
+ }
140
+ return {
141
+ type: "ephemeral",
142
+ ...(ttl?.value === "5m" || ttl?.value === "1h" ? { ttl: ttl.value } : {}),
143
+ };
144
+ }
145
+ function sanitizePersistedProviderOptions(value) {
146
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
147
+ return undefined;
148
+ }
149
+ let keys;
150
+ try {
151
+ keys = ReflectApply(ReflectOwnKeys, undefined, [value]);
152
+ }
153
+ catch {
154
+ return undefined;
155
+ }
156
+ const sanitized = {};
157
+ let retained = false;
158
+ for (const key of keys) {
159
+ if (typeof key !== "string") {
160
+ continue;
161
+ }
162
+ const providerBucket = readOwnEnumerableDataDescriptor(value, key)?.value;
163
+ if (!providerBucket || typeof providerBucket !== "object" || Array.isArray(providerBucket)) {
164
+ continue;
165
+ }
166
+ const cacheControl = sanitizePersistedCacheControl(readOwnEnumerableDataDescriptor(providerBucket, "cacheControl")?.value);
167
+ if (!cacheControl) {
168
+ continue;
169
+ }
170
+ ReflectApply(ObjectDefineProperty, undefined, [sanitized, key, {
171
+ configurable: true,
172
+ enumerable: true,
173
+ value: { cacheControl },
174
+ writable: true,
175
+ }]);
176
+ retained = true;
177
+ }
178
+ return retained ? sanitized : undefined;
179
+ }
180
+ function sanitizeModelCallContextMessages(messages) {
181
+ return messages.map((message) => {
182
+ if (message.role !== "system") {
183
+ return message;
184
+ }
185
+ const providerOptions = sanitizePersistedProviderOptions(message.providerOptions);
186
+ return {
187
+ role: "system",
188
+ content: message.content,
189
+ ...(providerOptions ? { providerOptions } : {}),
190
+ };
191
+ });
192
+ }
75
193
  function normalizeUsage(usage) {
76
194
  if (!usage || typeof usage !== "object") {
77
195
  return undefined;
@@ -243,7 +361,7 @@ async function resolveDirectTools(tools) {
243
361
  }
244
362
  function buildDirectModelOptions(options, tools) {
245
363
  return {
246
- prompt: toRuntimePrompt(normalizeSystemPrompt(options.system), getProviderRequestMessages(options.messages)),
364
+ prompt: toRuntimePrompt(normalizeSystemMessages(options.system), getProviderRequestMessages(options.messages)),
247
365
  maxOutputTokens: options.maxOutputTokens,
248
366
  ...(options.temperature === undefined ? {} : { temperature: options.temperature }),
249
367
  topP: options.topP,
@@ -271,7 +389,7 @@ async function emitModelCallContextEvent(directOptions) {
271
389
  return;
272
390
  const event = {
273
391
  type: "AGENT_RUN_MODEL_CALL_CONTEXT",
274
- messages: directOptions.prompt,
392
+ messages: sanitizeModelCallContextMessages(directOptions.prompt),
275
393
  ...(directOptions.tools ? { tools: directOptions.tools } : {}),
276
394
  };
277
395
  const cloneEvent = () => {
@@ -1,4 +1,4 @@
1
- import type { ScheduleConfig, ScheduleDefinition } from "./types.js";
1
+ import type { AgentScheduleConfig, ScheduleConfig, ScheduleDefinition } from "./types.js";
2
2
  /**
3
3
  * Validate and normalize a source-defined schedule configuration.
4
4
  *
@@ -6,6 +6,12 @@ import type { ScheduleConfig, ScheduleDefinition } from "./types.js";
6
6
  * weekday names are accepted, timezones must be recognized IANA names, and
7
7
  * the `cron` alias is converted to the canonical `schedule` field. Invalid
8
8
  * top-level or nested fields fail with `schedule-config-invalid`.
9
+ *
10
+ * Agent targets accept `conversationMode`, `conversationId`, and
11
+ * `agentMessage.prompt`. Task and workflow targets reject all three fields.
9
12
  */
10
- export declare function schedule(config: ScheduleConfig): ScheduleDefinition;
13
+ export declare function schedule(config: AgentScheduleConfig): ScheduleDefinition;
14
+ export declare function schedule(config: ScheduleConfig & {
15
+ agentMessage?: never;
16
+ }): ScheduleDefinition;
11
17
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/src/schedule/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGrE;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,kBAAkB,CAEnE"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/src/schedule/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAG1F;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,GAAG,kBAAkB,CAAC;AAC1E,wBAAgB,QAAQ,CACtB,MAAM,EAAE,cAAc,GAAG;IAAE,YAAY,CAAC,EAAE,KAAK,CAAA;CAAE,GAChD,kBAAkB,CAAC"}
@@ -1,12 +1,4 @@
1
1
  import { normalizeScheduleConfig } from "./validation.js";
2
- /**
3
- * Validate and normalize a source-defined schedule configuration.
4
- *
5
- * The schedule uses a bounded five-field POSIX cron expression. Month and
6
- * weekday names are accepted, timezones must be recognized IANA names, and
7
- * the `cron` alias is converted to the canonical `schedule` field. Invalid
8
- * top-level or nested fields fail with `schedule-config-invalid`.
9
- */
10
2
  export function schedule(config) {
11
3
  return normalizeScheduleConfig(config);
12
4
  }
@@ -19,8 +19,17 @@
19
19
  */
20
20
  import "../../_dnt.polyfills.js";
21
21
  export { schedule } from "./factory.js";
22
- export type { ScheduleConcurrencyPolicy, ScheduleConfig, ScheduleDefinition, ScheduleHealth, ScheduleIntegrationRequirement, ScheduleIntegrationRequirementConfig, ScheduleIntegrationResource, ScheduleIntegrationResourceIdentity, } from "./types.js";
22
+ export type { AgentScheduleConfig, ScheduleAgentMessage, ScheduleConcurrencyPolicy, ScheduleConfig, ScheduleDefinition, ScheduleHealth, ScheduleIntegrationRequirement, ScheduleIntegrationRequirementConfig, ScheduleIntegrationResource, ScheduleIntegrationResourceIdentity, } from "./types.js";
23
23
  export { isScheduleDefinition } from "./types.js";
24
24
  export { discoverSchedules } from "./discovery.js";
25
25
  export type { ScheduleDiscoveryOptions, ScheduleDiscoveryResult } from "./discovery.js";
26
+ /**
27
+ * Validate the legacy `input._schedule_target` channel's shape.
28
+ *
29
+ * Exported because `veryfront schedule run --input <file>` replaces the
30
+ * authored input without passing back through {@link schedule}, so the CLI is
31
+ * the only place that can apply this rule to an operator-supplied file. Sharing
32
+ * the one implementation keeps both entry points rejecting the same shapes.
33
+ */
34
+ export { legacyScheduleTargetDiagnostic } from "./validation.js";
26
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/schedule/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,YAAY,EACV,yBAAyB,EACzB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,8BAA8B,EAC9B,oCAAoC,EACpC,2BAA2B,EAC3B,mCAAmC,GACpC,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/schedule/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,8BAA8B,EAC9B,oCAAoC,EACpC,2BAA2B,EAC3B,mCAAmC,GACpC,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACxF;;;;;;;GAOG;AACH,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC"}
@@ -21,3 +21,12 @@ import "../../_dnt.polyfills.js";
21
21
  export { schedule } from "./factory.js";
22
22
  export { isScheduleDefinition } from "./types.js";
23
23
  export { discoverSchedules } from "./discovery.js";
24
+ /**
25
+ * Validate the legacy `input._schedule_target` channel's shape.
26
+ *
27
+ * Exported because `veryfront schedule run --input <file>` replaces the
28
+ * authored input without passing back through {@link schedule}, so the CLI is
29
+ * the only place that can apply this rule to an operator-supplied file. Sharing
30
+ * the one implementation keeps both entry points rejecting the same shapes.
31
+ */
32
+ export { legacyScheduleTargetDiagnostic } from "./validation.js";
@@ -1,4 +1,4 @@
1
- import type { TriggerTarget } from "../trigger/target.js";
1
+ import type { AgentTriggerTarget, ResolvedTriggerTarget, TriggerTargetConfig } from "../trigger/target.js";
2
2
  /** Behavior when a scheduled occurrence overlaps an active run. */
3
3
  export type ScheduleConcurrencyPolicy = "Allow" | "Forbid" | "Replace";
4
4
  /** Marks a schedule unhealthy when it has not succeeded within the given budget. */
@@ -36,6 +36,11 @@ export interface ScheduleIntegrationRequirementConfig {
36
36
  /** Unique provider resources required by the target. */
37
37
  resources?: ScheduleIntegrationResource[];
38
38
  }
39
+ /** Contains the prompt that a schedule sends to an agent target. */
40
+ export interface ScheduleAgentMessage {
41
+ /** The schedule sends this prompt. Veryfront generates a default when you omit it. */
42
+ prompt?: string;
43
+ }
39
44
  /** Validated, canonical source definition for one recurring schedule. */
40
45
  export interface ScheduleDefinition {
41
46
  /** Canonical slash-separated source trigger identifier. */
@@ -48,8 +53,10 @@ export interface ScheduleDefinition {
48
53
  schedule: string;
49
54
  /** Supported IANA timezone name; platform default when omitted. */
50
55
  timezone?: string;
51
- /** Task, workflow, or agent invoked by each occurrence. */
52
- target: TriggerTarget;
56
+ /** The schedule invokes this task, workflow, or agent on each occurrence. */
57
+ target: ResolvedTriggerTarget;
58
+ /** The schedule sends this prompt to an agent target. Other target kinds do not support this field. */
59
+ agentMessage?: ScheduleAgentMessage;
53
60
  /** Bounded JSON object copied into each target run. */
54
61
  input?: Record<string, unknown>;
55
62
  /** Positive execution timeout in seconds. */
@@ -65,19 +72,31 @@ export interface ScheduleDefinition {
65
72
  /** Integration scopes and resources required by the target. */
66
73
  integrationRequirements?: ScheduleIntegrationRequirement[];
67
74
  }
75
+ interface ScheduleConfigFields extends Omit<ScheduleDefinition, "schedule" | "integrationRequirements" | "target" | "agentMessage"> {
76
+ /** Sets a five-field POSIX expression as an alias for `schedule`. */
77
+ cron?: string;
78
+ /** Sets the schedule to a five-field POSIX cron expression. */
79
+ schedule?: string;
80
+ /** Declares required integration access. Omitted collections default to empty. */
81
+ integrationRequirements?: ScheduleIntegrationRequirementConfig[];
82
+ }
68
83
  /**
69
84
  * Author-facing recurring schedule configuration.
70
85
  *
71
86
  * `cron` is an alias for `schedule`; the factory emits only `schedule`.
72
87
  */
73
- export type ScheduleConfig = Omit<ScheduleDefinition, "schedule" | "integrationRequirements"> & {
74
- /** Alias for a five-field POSIX `schedule` expression. */
75
- cron?: string;
76
- /** Five-field POSIX cron expression. */
77
- schedule?: string;
78
- /** Integration requirements; omitted collections default to empty. */
79
- integrationRequirements?: ScheduleIntegrationRequirementConfig[];
80
- };
88
+ export interface ScheduleConfig extends ScheduleConfigFields {
89
+ /** The schedule invokes this task, workflow, or agent on each occurrence. */
90
+ target: TriggerTargetConfig;
91
+ }
92
+ /** Configures an agent schedule with an optional prompt. */
93
+ export interface AgentScheduleConfig extends ScheduleConfig {
94
+ /** The schedule invokes this agent on each occurrence. */
95
+ target: AgentTriggerTarget;
96
+ /** The schedule sends this prompt to the agent. */
97
+ agentMessage?: ScheduleAgentMessage;
98
+ }
81
99
  /** Return true only when every schedule field and nested invariant is valid. */
82
100
  export declare function isScheduleDefinition(value: unknown): value is ScheduleDefinition;
101
+ export {};
83
102
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/schedule/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,mEAAmE;AACnE,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvE,oFAAoF;AACpF,MAAM,WAAW,cAAc;IAC7B,oE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AE,CAAC;CAC5D;AAED,UAAU,oBAAqB,SAC7B,IAAI,CACF,kBAAkB,EAClB,UAAU,GAAG,yBAAyB,GAAG,QAAQ,GAAG,cAAc,CACnE;IACD,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,uBAAuB,CAAC,EAAE,oCAAoC,EAAE,CAAC;CAClE;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAe,SAAQ,oBAAoB;IAC1D,6EAA6E;IAC7E,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED,4DAA4D;AAC5D,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,0DAA0D;IAC1D,MAAM,EAAE,kBAAkB,CAAC;IAC3B,mDAAmD;IACnD,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED,gFAAgF;AAChF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAEhF"}
@@ -1,4 +1,21 @@
1
1
  import type { ScheduleDefinition } from "./types.js";
2
+ /**
3
+ * Describe why the legacy `input._schedule_target` channel is invalid, or
4
+ * return `null`.
5
+ *
6
+ * The legacy channel addresses the same hosted conversation as the canonical
7
+ * target, so it earns the same guarantees. Validating only the canonical copy
8
+ * would leave an author who addresses a conversation through the legacy
9
+ * channel alone with none of them: a misspelled key would disappear and the
10
+ * schedule would ship addressing nothing.
11
+ *
12
+ * The value is already a serializable snapshot, so plain key enumeration and
13
+ * property reads are safe.
14
+ */
15
+ export declare function legacyScheduleTargetDiagnostic(input: Record<string, unknown> | undefined, conversation: {
16
+ conversationMode: unknown;
17
+ conversationId: unknown;
18
+ }): string | null;
2
19
  export declare function normalizeScheduleConfig(value: unknown): ScheduleDefinition;
3
20
  /** Validate and copy an already-canonical source schedule definition. */
4
21
  export declare function normalizeScheduleDefinition(value: unknown): ScheduleDefinition;
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/src/schedule/validation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,kBAAkB,EAKnB,MAAM,YAAY,CAAC;AAglBpB,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAE1E;AAED,yEAAyE;AACzE,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAE9E;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAOrF"}
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/src/schedule/validation.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAGV,kBAAkB,EAKnB,MAAM,YAAY,CAAC;AA+WpB;;;;;;;;;;;;GAYG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC1C,YAAY,EAAE;IAAE,gBAAgB,EAAE,OAAO,CAAC;IAAC,cAAc,EAAE,OAAO,CAAA;CAAE,GACnE,MAAM,GAAG,IAAI,CAoBf;AA2TD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAE1E;AAED,yEAAyE;AACzE,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAE9E;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAOrF"}
@@ -1,5 +1,5 @@
1
1
  import { SCHEDULE_CONFIG_INVALID, VeryfrontError } from "../errors/index.js";
2
- import { snapshotTriggerTarget } from "../trigger/target.js";
2
+ import { agentConversationDiagnostic, conversationConflictDiagnostic, declarationConflictDiagnostic, resolveTriggerTarget, triggerTargetKeys, } from "../trigger/target.js";
3
3
  import { snapshotSerializable, validateTriggerId } from "../trigger/validation.js";
4
4
  import { isSupportedIanaTimezone, normalizeCronExpression } from "./calendar.js";
5
5
  const CONCURRENCY_POLICIES = new Set([
@@ -20,8 +20,10 @@ const MAX_NAME_LENGTH = 256;
20
20
  const MAX_DESCRIPTION_LENGTH = 4_096;
21
21
  const MAX_SCHEDULE_EXPRESSION_LENGTH = 256;
22
22
  const MAX_TIMEZONE_LENGTH = 255;
23
+ const MAX_AGENT_PROMPT_LENGTH = 20_000;
23
24
  const MAX_DIAGNOSTIC_KEY_LENGTH = 80;
24
25
  const SIMPLE_DIAGNOSTIC_KEY_PATTERN = /^[A-Za-z_$][A-Za-z0-9_$-]*$/;
26
+ const LEGACY_TARGET_KEYS = new Set(["conversationMode", "conversationId"]);
25
27
  const CONFIG_KEYS = [
26
28
  "id",
27
29
  "name",
@@ -30,6 +32,7 @@ const CONFIG_KEYS = [
30
32
  "cron",
31
33
  "timezone",
32
34
  "target",
35
+ "agentMessage",
33
36
  "input",
34
37
  "timeoutSeconds",
35
38
  "backoffLimit",
@@ -232,12 +235,81 @@ function normalizeTimezone(value, mode) {
232
235
  return timezone;
233
236
  }
234
237
  function normalizeTarget(value) {
235
- const target = snapshotDataRecord(value, "Schedule target", ["kind", "id"]);
236
- const candidate = snapshotTriggerTarget(target);
237
- if (candidate === null) {
238
+ const target = snapshotDataRecord(value, "Schedule target", triggerTargetKeys(value));
239
+ const conversationDetail = agentConversationDiagnostic("Schedule target", target.conversationMode, target.conversationId);
240
+ if (conversationDetail !== null)
241
+ invalid(conversationDetail);
242
+ const resolution = resolveTriggerTarget("Schedule target", target);
243
+ if (resolution.target === undefined) {
238
244
  invalid("Schedule target must specify a valid task, workflow, or agent id.");
239
245
  }
240
- return candidate;
246
+ return resolution.target;
247
+ }
248
+ function normalizeAgentMessage(value, target) {
249
+ if (value === undefined)
250
+ return undefined;
251
+ if (target.kind !== "agent") {
252
+ invalid("Schedule agentMessage is supported only for agent targets.");
253
+ }
254
+ const message = snapshotDataRecord(value, "Schedule agentMessage", ["prompt"]);
255
+ // An agentMessage carrying no prompt says nothing. Emitting `{}` into the
256
+ // shipped definition would ship that nothing as a field.
257
+ if (message.prompt === undefined)
258
+ return undefined;
259
+ const prompt = message.prompt;
260
+ if (typeof prompt !== "string" || prompt.trim().length === 0) {
261
+ invalid("Schedule agentMessage.prompt must be a non-empty string.");
262
+ }
263
+ if (prompt.length > MAX_AGENT_PROMPT_LENGTH) {
264
+ invalid(`Schedule agentMessage.prompt must be at most ${MAX_AGENT_PROMPT_LENGTH} characters.`);
265
+ }
266
+ return { prompt };
267
+ }
268
+ /**
269
+ * Read the conversation pair from the legacy `input._schedule_target` channel.
270
+ *
271
+ * Older SDKs addressed a scheduled agent conversation through run input. The
272
+ * value is already a serializable snapshot, so plain property reads are safe.
273
+ */
274
+ function legacyScheduleConversation(input) {
275
+ const legacyTarget = input?._schedule_target;
276
+ if (!legacyTarget || typeof legacyTarget !== "object" || Array.isArray(legacyTarget)) {
277
+ return { conversationMode: undefined, conversationId: undefined };
278
+ }
279
+ const record = legacyTarget;
280
+ return {
281
+ conversationMode: record.conversationMode,
282
+ conversationId: record.conversationId,
283
+ };
284
+ }
285
+ /**
286
+ * Describe why the legacy `input._schedule_target` channel is invalid, or
287
+ * return `null`.
288
+ *
289
+ * The legacy channel addresses the same hosted conversation as the canonical
290
+ * target, so it earns the same guarantees. Validating only the canonical copy
291
+ * would leave an author who addresses a conversation through the legacy
292
+ * channel alone with none of them: a misspelled key would disappear and the
293
+ * schedule would ship addressing nothing.
294
+ *
295
+ * The value is already a serializable snapshot, so plain key enumeration and
296
+ * property reads are safe.
297
+ */
298
+ export function legacyScheduleTargetDiagnostic(input, conversation) {
299
+ const legacyTarget = input?._schedule_target;
300
+ const label = "Schedule input._schedule_target";
301
+ if (legacyTarget === undefined)
302
+ return null;
303
+ if (legacyTarget === null || typeof legacyTarget !== "object" ||
304
+ Array.isArray(legacyTarget)) {
305
+ return `${label} must be an object.`;
306
+ }
307
+ for (const key of Object.keys(legacyTarget)) {
308
+ if (!LEGACY_TARGET_KEYS.has(key)) {
309
+ return `${formatDiagnosticProperty(label, key)} is not supported.`;
310
+ }
311
+ }
312
+ return agentConversationDiagnostic(label, conversation.conversationMode, conversation.conversationId);
241
313
  }
242
314
  function normalizeInput(value) {
243
315
  if (value === undefined)
@@ -377,7 +449,22 @@ function normalizeScheduleUnsafe(value, mode) {
377
449
  const description = optionalContractString(config.description, "Schedule description", MAX_DESCRIPTION_LENGTH, mode);
378
450
  const timezone = normalizeTimezone(config.timezone, mode);
379
451
  const target = normalizeTarget(config.target);
452
+ const agentMessage = normalizeAgentMessage(config.agentMessage, target);
380
453
  const input = normalizeInput(config.input);
454
+ // Declaring the same value in both places is how one definition stays
455
+ // correct across a platform upgrade, so only a disagreement is rejected:
456
+ // silently preferring one copy would detach the deployed schedule from what
457
+ // the other copy names. Prompt content follows the identical rule.
458
+ const legacyConversation = legacyScheduleConversation(input);
459
+ const conflictDetail = conversationConflictDiagnostic("Schedule", "input._schedule_target", target, legacyConversation.conversationMode, legacyConversation.conversationId) ??
460
+ declarationConflictDiagnostic("Schedule", "agentMessage.prompt", "input.prompt", agentMessage?.prompt, input?.prompt);
461
+ if (conflictDetail !== null)
462
+ invalid(conflictDetail);
463
+ const legacyTargetDetail = target.kind === "agent"
464
+ ? legacyScheduleTargetDiagnostic(input, legacyConversation)
465
+ : null;
466
+ if (legacyTargetDetail !== null)
467
+ invalid(legacyTargetDetail);
381
468
  const timeoutSeconds = optionalPositiveInteger(config.timeoutSeconds, "Schedule timeoutSeconds");
382
469
  const backoffLimit = optionalNonNegativeInteger(config.backoffLimit, "Schedule backoffLimit");
383
470
  const maxRuns = optionalPositiveInteger(config.maxRuns, "Schedule maxRuns");
@@ -395,6 +482,7 @@ function normalizeScheduleUnsafe(value, mode) {
395
482
  schedule,
396
483
  ...(timezone === undefined ? {} : { timezone }),
397
484
  target,
485
+ ...(agentMessage === undefined ? {} : { agentMessage }),
398
486
  ...(input === undefined ? {} : { input }),
399
487
  ...(timeoutSeconds === undefined ? {} : { timeoutSeconds }),
400
488
  ...(backoffLimit === undefined ? {} : { backoffLimit }),
@@ -1 +1 @@
1
- {"version":3,"file":"worker-pool.d.ts","sourceRoot":"","sources":["../../../../src/src/security/sandbox/worker-pool.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAY/E,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACf,MAAM,mBAAmB,CAAC;AA+C3B,qEAAqE;AACrE,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,aAAa,CAAC;IAChE,iEAAiE;IACjE,kBAAkB,CAAC,EAAE,MAAM,MAAM,CAAC;IAClC,2EAA2E;IAC3E,kCAAkC,CAAC,EAAE,MAAM,OAAO,CAAC;CACpD;AA0PD,qBAAa,UAAU;IACrB,OAAO,CAAC,IAAI,CAAgC;IAC5C,OAAO,CAAC,eAAe,CAA4B;IACnD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2B;IAClD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmD;IAChF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAe;IAClD,OAAO,CAAC,QAAQ,CAAC,kCAAkC,CAAgB;IACnE,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,eAAe,CAA8B;IAErD,OAAO,CAAC,eAAe,CAA6C;IACpE,OAAO,CAAC,mBAAmB,CAA6C;gBAGtE,MAAM,GAAE,OAAO,CAAC,gBAAgB,CAAM,EACtC,YAAY,GAAE,sBAA2B;IAmE3C;;;;;;OAMG;IACH,iBAAiB,CACf,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EAAE,GAClB,aAAa;IAIhB,OAAO,CAAC,6BAA6B;IA2FrC;;;OAGG;IACH,OAAO,CACL,SAAS,EAAE,MAAM,EACjB,SAAS,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aAAa,IAAI,UAAU,CAiC1C;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE/D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CASnD"}
@@ -1011,7 +1011,12 @@ function resolveFlags() {
1011
1011
  });
1012
1012
  }
1013
1013
  else {
1014
- logger.info("Worker isolation posture resolved", {
1014
+ // Resolution is operator-relevant only once something is actually
1015
+ // configured. A project that asked for no isolation has nothing to act on,
1016
+ // and this line would otherwise be the only output a successful dev request
1017
+ // produces, so keep the default posture at DEBUG.
1018
+ const report = effectiveSurfaces > 0 ? logger.info : logger.debug;
1019
+ report.call(logger, "Worker isolation posture resolved", {
1015
1020
  master,
1016
1021
  effectiveSurfaces,
1017
1022
  workerIsolationApi: _apiIsolation,
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../src/src/server/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAM1D,OAAO,EAAE,KAAK,eAAe,EAAqC,MAAM,wBAAwB,CAAC;AAgBjG,OAAO,EACL,KAAK,2BAA2B,EAGjC,MAAM,kCAAkC,CAAC;AA0B1C,OAAO,EAGL,KAAK,iBAAiB,EAEvB,MAAM,2BAA2B,CAAC;AAanC,MAAM,WAAW,eAAe;IAC9B,8DAA8D;IAC9D,OAAO,EAAE,cAAc,CAAC;IAExB,2BAA2B;IAC3B,MAAM,EAAE,eAAe,CAAC;IAExB,wCAAwC;IACxC,cAAc,EAAE,OAAO,CAAC;IAExB,+BAA+B;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,eAAe,EAAE,eAAe,CAAC;IAEjC,qFAAqF;IACrF,2BAA2B,CAAC,EAAE,QA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L1B;AAED,wBAAsB,YAAY,CAChC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAa1B;AAED,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAyB1B;AAmFD,wBAAgB,qCAAqC,IAAI,IAAI,CAE5D"}
@@ -21,6 +21,7 @@ import { createFileLogSubscriber, getLogBuffer, } from "../observability/index.j
21
21
  import { ReloadNotifier } from "./reload-notifier.js";
22
22
  import { createServerStyleCallbacks, createServerStyleInvalidationCallbacks, } from "./style-callbacks.js";
23
23
  import { clearDomainCache } from "./utils/domain-lookup.js";
24
+ import { getMissingProjectEnvInternalCredentialDetail } from "./project-env/internal-authorization.js";
24
25
  const bootstrapLog = logger.component("bootstrap");
25
26
  const bootstrapDevLog = logger.component("bootstrap-dev");
26
27
  const bootstrapProdLog = logger.component("bootstrap-prod");
@@ -447,6 +448,11 @@ function validateProductionEnvironment() {
447
448
  detail: "CHANNEL_DISPATCH_SIGNING_PUBLIC_KEY must be set when running in proxy mode (PROXY_MODE=1)",
448
449
  });
449
450
  }
451
+ const missingInternalCredentials = getMissingProjectEnvInternalCredentialDetail();
452
+ if (missingInternalCredentials) {
453
+ logger.error(`[Bootstrap:Prod] CRITICAL: ${missingInternalCredentials}.`);
454
+ throw INVALID_ARGUMENT.create({ detail: missingInternalCredentials });
455
+ }
450
456
  if (!isProxyTopologyTrusted()) {
451
457
  logger.error("[Bootstrap:Prod] CRITICAL: proxy mode does not trust its upstream topology. " +
452
458
  "Set VERYFRONT_TRUST_FORWARDED_HEADERS=1 only when this process is private behind a sanitising edge. " +
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export { DevServer } from "./server.js";
7
7
  export { OptimizedFileWatcher } from "./file-watcher.js";
8
- export type { DevServerOptions, FileWatcherMetrics, RouteDirectory } from "./types.js";
8
+ export type { DevServerHandler, DevServerOptions, FileWatcherMetrics, RouteDirectory, } from "./types.js";
9
9
  import type { DevServerOptions } from "./types.js";
10
10
  import type { DevServer } from "./server.js";
11
11
  /** Starts dev server. */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/server/dev-server/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,yBAAyB;AACzB,wBAAsB,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,CAKlF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/server/dev-server/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,yBAAyB;AACzB,wBAAsB,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,CAKlF"}
@@ -1,5 +1,5 @@
1
1
  import type { NodeWebSocketServerProvider } from "../../extensions/websocket/index.js";
2
- import type { DevServerOptions } from "./types.js";
2
+ import type { DevServerHandler, DevServerOptions } from "./types.js";
3
3
  import { FileWatchSetup } from "./file-watch-setup.js";
4
4
  /** Implement dev server. */
5
5
  export declare class DevServer {
@@ -25,8 +25,12 @@ export declare class DevServer {
25
25
  private logRSCStatus;
26
26
  start(): Promise<void>;
27
27
  private startAndBind;
28
- /** Return the request handler for use with external HTTP servers. */
29
- get handler(): (req: Request) => Promise<Response>;
28
+ /**
29
+ * Return the request handler for use with external HTTP servers.
30
+ * Pass the native Deno, Node, or Bun request context as the second argument
31
+ * so local-control routes can verify the transport peer.
32
+ */
33
+ get handler(): DevServerHandler;
30
34
  /** Extension-provided Node WebSocket implementation captured with this bootstrap generation. */
31
35
  get nodeWebSocketServerProvider(): Readonly<NodeWebSocketServerProvider> | undefined;
32
36
  private buildDiscoveryConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/src/server/dev-server/server.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAMvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAInD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAiDvD,4BAA4B;AAC5B,qBAAa,SAAS;IAkBR,OAAO,CAAC,OAAO;IAjB3B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,cAAc,CAAC,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,SAAS,CAA8B;IAC/C,OAAO,CAAC,4BAA4B,CAAC,CAAwC;IAC7E,OAAO,CAAC,cAAc,CAAC,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,CAAsC;IACvD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,CAAC,aAAa,CAA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