clawmini 0.0.8 → 0.0.9

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 (367) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +14 -0
  3. package/.github/workflows/release.yml +49 -0
  4. package/CHANGELOG.md +36 -0
  5. package/README.md +5 -4
  6. package/dist/adapter-discord/index.d.mts.map +1 -1
  7. package/dist/adapter-discord/index.mjs +465 -282
  8. package/dist/adapter-discord/index.mjs.map +1 -1
  9. package/dist/adapter-google-chat/index.mjs +367 -243
  10. package/dist/adapter-google-chat/index.mjs.map +1 -1
  11. package/dist/cli/index.mjs +684 -24
  12. package/dist/cli/index.mjs.map +1 -1
  13. package/dist/cli/lite.mjs +43 -13
  14. package/dist/cli/lite.mjs.map +1 -1
  15. package/dist/cli/{propose-policy.mjs → manage-policies.mjs} +270 -47
  16. package/dist/cli/manage-policies.mjs.map +1 -0
  17. package/dist/cli/run-host.d.mts +1 -0
  18. package/dist/cli/run-host.mjs +3090 -0
  19. package/dist/cli/run-host.mjs.map +1 -0
  20. package/dist/config-CPFQIGdG.mjs +57 -0
  21. package/dist/config-CPFQIGdG.mjs.map +1 -0
  22. package/dist/config-Dvl-Pov4.mjs +76 -0
  23. package/dist/config-Dvl-Pov4.mjs.map +1 -0
  24. package/dist/daemon/index.d.mts.map +1 -1
  25. package/dist/daemon/index.mjs +970 -332
  26. package/dist/daemon/index.mjs.map +1 -1
  27. package/dist/supervisor-actions-CiW56eLi.mjs +843 -0
  28. package/dist/supervisor-actions-CiW56eLi.mjs.map +1 -0
  29. package/dist/turn-log-buffer-DRgW53gl.mjs +767 -0
  30. package/dist/turn-log-buffer-DRgW53gl.mjs.map +1 -0
  31. package/dist/web/_app/immutable/chunks/{Drm9vgeP.js → 3AZlWB6U.js} +1 -1
  32. package/dist/web/_app/immutable/chunks/BhRSsUCh.js +2 -0
  33. package/dist/web/_app/immutable/chunks/BiLeM2i1.js +1 -0
  34. package/{web/.svelte-kit/output/client/_app/immutable/chunks/CME08kGM.js → dist/web/_app/immutable/chunks/BmBj85Ll.js} +1 -1
  35. package/dist/web/_app/immutable/chunks/BrERcKAH.js +1 -0
  36. package/dist/web/_app/immutable/chunks/Bv9252RM.js +1 -0
  37. package/dist/web/_app/immutable/chunks/CIXNBPKi.js +1 -0
  38. package/dist/web/_app/immutable/chunks/DISKL3GN.js +2 -0
  39. package/dist/web/_app/immutable/chunks/{Zeh-C-mx.js → DcpaLzmX.js} +1 -1
  40. package/dist/web/_app/immutable/chunks/DnQ3vS13.js +1 -0
  41. package/dist/web/_app/immutable/chunks/KsloHTKS.js +1 -0
  42. package/{web/.svelte-kit/output/client/_app/immutable/chunks/Ck-be5J2.js → dist/web/_app/immutable/chunks/RsHsUj-8.js} +2 -2
  43. package/dist/web/_app/immutable/chunks/{vDehDcuJ.js → wpfV79dV.js} +1 -1
  44. package/dist/web/_app/immutable/entry/app.CIw1Qj0n.js +2 -0
  45. package/dist/web/_app/immutable/entry/start.Di0-Jhte.js +1 -0
  46. package/dist/web/_app/immutable/nodes/{0.CUGC2p-K.js → 0.DYyUA1au.js} +1 -1
  47. package/dist/web/_app/immutable/nodes/1.D-3QEMMZ.js +1 -0
  48. package/dist/web/_app/immutable/nodes/{2.BnwnD1Ki.js → 2.4olHnH7U.js} +1 -1
  49. package/{web/.svelte-kit/output/client/_app/immutable/nodes/3.0arZe_Uf.js → dist/web/_app/immutable/nodes/3.4w0bE-m2.js} +3 -3
  50. package/dist/web/_app/immutable/nodes/4.CZvjhVHt.js +60 -0
  51. package/dist/web/_app/immutable/nodes/{5.Bq2JzCEj.js → 5.DLbPVJY2.js} +1 -1
  52. package/dist/web/_app/version.json +1 -1
  53. package/dist/web/index.html +12 -12
  54. package/dist/workspace-oWmVh5mi.mjs +1001 -0
  55. package/dist/workspace-oWmVh5mi.mjs.map +1 -0
  56. package/docs/23_adapter_slash_autocomplete/development_log.md +19 -0
  57. package/docs/23_adapter_slash_autocomplete/notes.md +18 -0
  58. package/docs/23_adapter_slash_autocomplete/prd.md +46 -0
  59. package/docs/23_adapter_slash_autocomplete/questions.md +6 -0
  60. package/docs/23_adapter_slash_autocomplete/tickets.md +21 -0
  61. package/docs/24_subagent_job_policy_fixes/development_log.md +22 -0
  62. package/docs/24_subagent_job_policy_fixes/notes.md +28 -0
  63. package/docs/24_subagent_job_policy_fixes/prd.md +59 -0
  64. package/docs/24_subagent_job_policy_fixes/questions.md +3 -0
  65. package/docs/24_subagent_job_policy_fixes/tickets.md +49 -0
  66. package/docs/25_e2e_test_improvements/development_log.md +30 -0
  67. package/docs/25_e2e_test_improvements/notes.md +29 -0
  68. package/docs/25_e2e_test_improvements/prd.md +43 -0
  69. package/docs/25_e2e_test_improvements/questions.md +12 -0
  70. package/docs/25_e2e_test_improvements/tickets-2.md +22 -0
  71. package/docs/25_e2e_test_improvements/tickets.md +22 -0
  72. package/docs/25_policy_cwd/development_log.md +30 -0
  73. package/docs/25_policy_cwd/notes.md +28 -0
  74. package/docs/25_policy_cwd/prd.md +77 -0
  75. package/docs/25_policy_cwd/questions.md +6 -0
  76. package/docs/25_policy_cwd/tickets.md +77 -0
  77. package/docs/CLI_REFERENCE.md +3 -1
  78. package/docs/PHILOSOPHY.md +35 -0
  79. package/docs/adapter-visibility/SPEC.md +461 -0
  80. package/docs/adapter-visibility/SPEC_v2.md +202 -0
  81. package/docs/auto-update/SPEC.md +344 -0
  82. package/docs/backups/SPEC.md +296 -0
  83. package/docs/backups/clawmini.gitignore +69 -0
  84. package/docs/guides/assets/clawmini-avatar.png +0 -0
  85. package/docs/guides/backups.md +332 -0
  86. package/docs/guides/discord_adapter_setup.md +1 -1
  87. package/docs/guides/google_chat_adapter_setup.md +81 -0
  88. package/docs/unified-startup/SPEC.md +203 -0
  89. package/e2e/_helpers/test-environment.test.ts +49 -0
  90. package/e2e/_helpers/test-environment.ts +548 -0
  91. package/e2e/adapters/_google-chat-fixtures.ts +340 -0
  92. package/{src/cli/e2e → e2e/adapters}/adapter-discord.test.ts +22 -23
  93. package/e2e/adapters/adapter-google-chat-downtime.test.ts +157 -0
  94. package/e2e/adapters/adapter-google-chat-inbound.test.ts +697 -0
  95. package/e2e/adapters/adapter-google-chat-outbound.test.ts +297 -0
  96. package/e2e/adapters/adapter-google-chat-roundtrip.test.ts +56 -0
  97. package/e2e/adapters/adapter-google-chat-threads.test.ts +1078 -0
  98. package/e2e/agents/custom-api-env.test.ts +80 -0
  99. package/e2e/agents/export-lite-func.test.ts +104 -0
  100. package/e2e/agents/fallbacks.test.ts +124 -0
  101. package/e2e/agents/interrupt.test.ts +50 -0
  102. package/e2e/agents/no-reply-necessary.test.ts +57 -0
  103. package/e2e/agents/session-timeout-subagents.test.ts +76 -0
  104. package/e2e/agents/subagent-authorization.test.ts +246 -0
  105. package/e2e/agents/subagent-env.test.ts +49 -0
  106. package/e2e/agents/subagent-lifecycle.test.ts +782 -0
  107. package/e2e/agents/subagents-depth.test.ts +47 -0
  108. package/e2e/cli/agents.test.ts +176 -0
  109. package/e2e/cli/auto-update.test.ts +741 -0
  110. package/e2e/cli/basic.test.ts +44 -0
  111. package/{src/cli/e2e → e2e/cli}/export-lite.test.ts +16 -12
  112. package/e2e/cli/init-gitignore.test.ts +86 -0
  113. package/e2e/cli/init.test.ts +76 -0
  114. package/e2e/cli/messages.test.ts +363 -0
  115. package/e2e/cli/serve.test.ts +76 -0
  116. package/{src/cli/e2e → e2e/cli}/skills.test.ts +11 -10
  117. package/{src/cli/e2e → e2e/daemon}/daemon.test.ts +57 -195
  118. package/e2e/jobs/agent-jobs.test.ts +216 -0
  119. package/e2e/jobs/cron.test.ts +64 -0
  120. package/e2e/jobs/restart.test.ts +108 -0
  121. package/e2e/policies/approval-session.test.ts +69 -0
  122. package/e2e/policies/auto-create-policies-file.test.ts +35 -0
  123. package/e2e/policies/builtin-manage-policies.test.ts +184 -0
  124. package/e2e/policies/builtin-run-host.test.ts +180 -0
  125. package/e2e/policies/environment-policies.test.ts +177 -0
  126. package/e2e/policies/manage-policies.test.ts +566 -0
  127. package/e2e/policies/output-size.test.ts +98 -0
  128. package/e2e/policies/policies-context-cwd.test.ts +160 -0
  129. package/e2e/policies/relative-script-path.test.ts +60 -0
  130. package/e2e/policies/requests-show.test.ts +135 -0
  131. package/e2e/policies/requests.test.ts +208 -0
  132. package/e2e/policies/slash-policies.test.ts +308 -0
  133. package/e2e/policies/startup-cleanup.test.ts +48 -0
  134. package/e2e/routers/session-timeout.test.ts +106 -0
  135. package/e2e/routers/slash-model.test.ts +152 -0
  136. package/e2e/routers/slash-new.test.ts +50 -0
  137. package/e2e/routers/slash-restart-adapter.test.ts +96 -0
  138. package/e2e/routers/slash-restart.test.ts +114 -0
  139. package/e2e/routers/slash-shutdown.test.ts +55 -0
  140. package/e2e/routers/slash-stop.test.ts +232 -0
  141. package/e2e/routers/slash-upgrade.test.ts +88 -0
  142. package/{src/cli/e2e → e2e/sandbox}/environments.test.ts +14 -13
  143. package/eslint.config.js +6 -0
  144. package/napkin.md +1 -1
  145. package/package.json +8 -3
  146. package/src/adapter-discord/commands.test.ts +42 -0
  147. package/src/adapter-discord/commands.ts +33 -0
  148. package/src/adapter-discord/config.ts +12 -0
  149. package/src/adapter-discord/forwarder.test.ts +499 -21
  150. package/src/adapter-discord/forwarder.ts +343 -124
  151. package/src/adapter-discord/inbound-cache.test.ts +47 -0
  152. package/src/adapter-discord/inbound-cache.ts +37 -0
  153. package/src/adapter-discord/index.test.ts +67 -2
  154. package/src/adapter-discord/index.ts +84 -216
  155. package/src/adapter-discord/interactions.test.ts +54 -3
  156. package/src/adapter-discord/interactions.ts +97 -53
  157. package/src/adapter-discord/processMessage.ts +239 -0
  158. package/src/adapter-discord/state.ts +1 -0
  159. package/src/adapter-google-chat/auth.test.ts +9 -5
  160. package/src/adapter-google-chat/auth.ts +29 -23
  161. package/src/adapter-google-chat/cards.ts +7 -2
  162. package/src/adapter-google-chat/client.test.ts +37 -2
  163. package/src/adapter-google-chat/client.ts +138 -38
  164. package/src/adapter-google-chat/config.ts +19 -0
  165. package/src/adapter-google-chat/forwarder.test.ts +81 -56
  166. package/src/adapter-google-chat/forwarder.ts +394 -185
  167. package/src/adapter-google-chat/inbound-cache.test.ts +61 -0
  168. package/src/adapter-google-chat/inbound-cache.ts +36 -0
  169. package/src/adapter-google-chat/state.test.ts +1 -0
  170. package/src/adapter-google-chat/state.ts +9 -1
  171. package/src/adapter-google-chat/subscriptions.ts +8 -6
  172. package/src/cli/builtin-policies.ts +44 -0
  173. package/src/cli/commands/agents.ts +59 -5
  174. package/src/cli/commands/down.ts +54 -2
  175. package/src/cli/commands/environments.ts +8 -2
  176. package/src/cli/commands/init.ts +31 -0
  177. package/src/cli/commands/logs.ts +116 -0
  178. package/src/cli/commands/policies.ts +6 -4
  179. package/src/cli/commands/serve.test.ts +67 -0
  180. package/src/cli/commands/serve.ts +284 -0
  181. package/src/cli/commands/up.ts +122 -2
  182. package/src/cli/commands/web-api/agents.ts +3 -2
  183. package/src/cli/index.ts +4 -0
  184. package/src/cli/install-detection.test.ts +72 -0
  185. package/src/cli/install-detection.ts +48 -0
  186. package/src/cli/lite.ts +54 -22
  187. package/src/cli/manage-policies-utils.ts +104 -0
  188. package/src/cli/manage-policies.ts +291 -0
  189. package/src/cli/run-host.ts +45 -0
  190. package/src/cli/supervisor-actions.ts +267 -0
  191. package/src/cli/supervisor-control.test.ts +129 -0
  192. package/src/cli/supervisor-control.ts +155 -0
  193. package/src/cli/supervisor-pid.ts +68 -0
  194. package/src/cli/supervisor.ts +277 -0
  195. package/src/daemon/agent/agent-context.ts +11 -11
  196. package/src/daemon/agent/agent-session.ts +8 -1
  197. package/src/daemon/agent/chat-logger.test.ts +78 -9
  198. package/src/daemon/agent/chat-logger.ts +25 -5
  199. package/src/daemon/agent/turn-registry.test.ts +89 -0
  200. package/src/daemon/agent/turn-registry.ts +94 -0
  201. package/src/daemon/agent/types.ts +2 -0
  202. package/src/daemon/api/agent-policy-endpoints.ts +263 -0
  203. package/src/daemon/api/agent-router.ts +47 -126
  204. package/src/daemon/api/index.test.ts +1 -0
  205. package/src/daemon/api/policy-request.test.ts +7 -5
  206. package/src/daemon/api/router-utils.ts +6 -5
  207. package/src/daemon/api/subagent-router.ts +110 -74
  208. package/src/daemon/api/subagent-utils.test.ts +60 -0
  209. package/src/daemon/api/subagent-utils.ts +113 -87
  210. package/src/daemon/api/user-router.ts +34 -8
  211. package/src/daemon/auth.ts +1 -0
  212. package/src/daemon/cron.test.ts +62 -4
  213. package/src/daemon/cron.ts +42 -16
  214. package/src/daemon/events.ts +65 -0
  215. package/src/daemon/index.ts +24 -1
  216. package/src/daemon/message-interruption.test.ts +1 -0
  217. package/src/daemon/message-jobs.test.ts +1 -0
  218. package/src/daemon/message.ts +78 -14
  219. package/src/daemon/observation.test.ts +26 -18
  220. package/src/daemon/pending-replies.test.ts +112 -0
  221. package/src/daemon/pending-replies.ts +162 -0
  222. package/src/daemon/policy-request-service.ts +3 -1
  223. package/src/daemon/policy-utils.test.ts +66 -1
  224. package/src/daemon/policy-utils.ts +126 -1
  225. package/src/daemon/request-store.ts +31 -0
  226. package/src/daemon/routers/session-timeout.ts +4 -0
  227. package/src/daemon/routers/slash-model.test.ts +344 -0
  228. package/src/daemon/routers/slash-model.ts +207 -0
  229. package/src/daemon/routers/slash-policies.test.ts +38 -32
  230. package/src/daemon/routers/slash-policies.ts +84 -33
  231. package/src/daemon/routers/slash-restart.test.ts +69 -0
  232. package/src/daemon/routers/slash-restart.ts +36 -0
  233. package/src/daemon/routers/slash-shutdown.test.ts +50 -0
  234. package/src/daemon/routers/slash-shutdown.ts +28 -0
  235. package/src/daemon/routers/slash-upgrade.test.ts +116 -0
  236. package/src/daemon/routers/slash-upgrade.ts +76 -0
  237. package/src/daemon/routers/types.ts +7 -0
  238. package/src/daemon/routers.ts +16 -0
  239. package/src/shared/adapters/blockquote.test.ts +28 -0
  240. package/src/shared/adapters/blockquote.ts +20 -0
  241. package/src/shared/adapters/filtering.test.ts +224 -10
  242. package/src/shared/adapters/filtering.ts +95 -7
  243. package/src/shared/adapters/inbound-cache.test.ts +48 -0
  244. package/src/shared/adapters/inbound-cache.ts +54 -0
  245. package/src/shared/adapters/turn-log-buffer.ts +266 -0
  246. package/src/shared/adapters/turn-log.test.ts +389 -0
  247. package/src/shared/adapters/turn-log.ts +357 -0
  248. package/src/shared/agent-utils.ts +12 -5
  249. package/src/shared/chats.test.ts +4 -0
  250. package/src/shared/chats.ts +9 -0
  251. package/src/shared/config.ts +16 -1
  252. package/src/shared/lite.ts +76 -2
  253. package/src/shared/policies.ts +26 -0
  254. package/src/shared/template-manifest.ts +267 -0
  255. package/src/shared/utils/shell.ts +61 -0
  256. package/src/shared/version.ts +34 -0
  257. package/src/shared/workspace.test.ts +217 -0
  258. package/src/shared/workspace.ts +626 -48
  259. package/templates/environments/cladding/allowlist-domain.mjs +125 -0
  260. package/templates/environments/cladding/env.json +21 -1
  261. package/templates/environments/cladding/run-with-network.mjs +54 -0
  262. package/templates/environments/macos-proxy/allowlist-domain.mjs +95 -0
  263. package/templates/environments/macos-proxy/env.json +8 -1
  264. package/templates/environments/macos-proxy/proxy.mjs +0 -1
  265. package/templates/gemini/template.json +5 -0
  266. package/templates/gemini-claw/template.json +13 -0
  267. package/templates/skills/clawmini-requests/SKILL.md +69 -10
  268. package/templates/skills/run-host/SKILL.md +51 -0
  269. package/templates/skills/skill-creator/SKILL.md +4 -3
  270. package/templates/skills/skill-creator/scripts/validate.sh +52 -0
  271. package/tsdown.config.ts +10 -1
  272. package/vitest.config.ts +2 -2
  273. package/web/.svelte-kit/ambient.d.ts +292 -118
  274. package/web/.svelte-kit/generated/server/internal.js +1 -1
  275. package/web/.svelte-kit/output/client/.vite/manifest.json +126 -136
  276. package/web/.svelte-kit/output/client/_app/immutable/chunks/{Drm9vgeP.js → 3AZlWB6U.js} +1 -1
  277. package/web/.svelte-kit/output/client/_app/immutable/chunks/BhRSsUCh.js +2 -0
  278. package/web/.svelte-kit/output/client/_app/immutable/chunks/BiLeM2i1.js +1 -0
  279. package/{dist/web/_app/immutable/chunks/CME08kGM.js → web/.svelte-kit/output/client/_app/immutable/chunks/BmBj85Ll.js} +1 -1
  280. package/web/.svelte-kit/output/client/_app/immutable/chunks/BrERcKAH.js +1 -0
  281. package/web/.svelte-kit/output/client/_app/immutable/chunks/Bv9252RM.js +1 -0
  282. package/web/.svelte-kit/output/client/_app/immutable/chunks/CIXNBPKi.js +1 -0
  283. package/web/.svelte-kit/output/client/_app/immutable/chunks/DISKL3GN.js +2 -0
  284. package/web/.svelte-kit/output/client/_app/immutable/chunks/{Zeh-C-mx.js → DcpaLzmX.js} +1 -1
  285. package/web/.svelte-kit/output/client/_app/immutable/chunks/DnQ3vS13.js +1 -0
  286. package/web/.svelte-kit/output/client/_app/immutable/chunks/KsloHTKS.js +1 -0
  287. package/{dist/web/_app/immutable/chunks/Ck-be5J2.js → web/.svelte-kit/output/client/_app/immutable/chunks/RsHsUj-8.js} +2 -2
  288. package/web/.svelte-kit/output/client/_app/immutable/chunks/{vDehDcuJ.js → wpfV79dV.js} +1 -1
  289. package/web/.svelte-kit/output/client/_app/immutable/entry/app.CIw1Qj0n.js +2 -0
  290. package/web/.svelte-kit/output/client/_app/immutable/entry/start.Di0-Jhte.js +1 -0
  291. package/web/.svelte-kit/output/client/_app/immutable/nodes/{0.CUGC2p-K.js → 0.DYyUA1au.js} +1 -1
  292. package/web/.svelte-kit/output/client/_app/immutable/nodes/1.D-3QEMMZ.js +1 -0
  293. package/web/.svelte-kit/output/client/_app/immutable/nodes/{2.BnwnD1Ki.js → 2.4olHnH7U.js} +1 -1
  294. package/{dist/web/_app/immutable/nodes/3.0arZe_Uf.js → web/.svelte-kit/output/client/_app/immutable/nodes/3.4w0bE-m2.js} +3 -3
  295. package/web/.svelte-kit/output/client/_app/immutable/nodes/4.CZvjhVHt.js +60 -0
  296. package/web/.svelte-kit/output/client/_app/immutable/nodes/{5.Bq2JzCEj.js → 5.DLbPVJY2.js} +1 -1
  297. package/web/.svelte-kit/output/client/_app/version.json +1 -1
  298. package/web/.svelte-kit/output/server/.vite/manifest.json +12 -10
  299. package/web/.svelte-kit/output/server/chunks/Icon.js +1 -1
  300. package/web/.svelte-kit/output/server/chunks/client.js +1 -1
  301. package/web/.svelte-kit/output/server/chunks/exports.js +1 -1
  302. package/web/.svelte-kit/output/server/chunks/index-server.js +2 -1
  303. package/web/.svelte-kit/output/server/chunks/internal.js +1 -1
  304. package/web/.svelte-kit/output/server/chunks/render-context.js +77 -0
  305. package/web/.svelte-kit/output/server/chunks/root.js +739 -788
  306. package/web/.svelte-kit/output/server/chunks/shared.js +234 -21
  307. package/web/.svelte-kit/output/server/index.js +126 -90
  308. package/web/.svelte-kit/output/server/manifest-full.js +1 -1
  309. package/web/.svelte-kit/output/server/manifest.js +1 -1
  310. package/web/.svelte-kit/output/server/nodes/0.js +1 -1
  311. package/web/.svelte-kit/output/server/nodes/1.js +1 -1
  312. package/web/.svelte-kit/output/server/nodes/2.js +1 -1
  313. package/web/.svelte-kit/output/server/nodes/3.js +1 -1
  314. package/web/.svelte-kit/output/server/nodes/4.js +1 -1
  315. package/web/.svelte-kit/output/server/nodes/5.js +1 -1
  316. package/web/.svelte-kit/output/server/remote-entry.js +245 -81
  317. package/web/.svelte-kit/tsconfig.json +4 -1
  318. package/dist/cli/propose-policy.mjs.map +0 -1
  319. package/dist/lite-CBxOT1y5.mjs +0 -241
  320. package/dist/lite-CBxOT1y5.mjs.map +0 -1
  321. package/dist/routing-D8rTxtaV.mjs +0 -245
  322. package/dist/routing-D8rTxtaV.mjs.map +0 -1
  323. package/dist/web/_app/immutable/chunks/B6YN0Nuq.js +0 -1
  324. package/dist/web/_app/immutable/chunks/BmRlVmv6.js +0 -1
  325. package/dist/web/_app/immutable/chunks/CK9JZLaG.js +0 -2
  326. package/dist/web/_app/immutable/chunks/Ck3rYNON.js +0 -1
  327. package/dist/web/_app/immutable/chunks/D5iV40bG.js +0 -1
  328. package/dist/web/_app/immutable/chunks/DMtIqaiV.js +0 -2
  329. package/dist/web/_app/immutable/chunks/DhD271EB.js +0 -1
  330. package/dist/web/_app/immutable/chunks/DpuLqk8d.js +0 -1
  331. package/dist/web/_app/immutable/chunks/DsIToJCP.js +0 -1
  332. package/dist/web/_app/immutable/entry/app.BCSV3nrG.js +0 -2
  333. package/dist/web/_app/immutable/entry/start.D4eLEZUM.js +0 -1
  334. package/dist/web/_app/immutable/nodes/1.CGC_42IQ.js +0 -1
  335. package/dist/web/_app/immutable/nodes/4.ClM1bXLE.js +0 -60
  336. package/dist/workspace-BJmJBfKi.mjs +0 -456
  337. package/dist/workspace-BJmJBfKi.mjs.map +0 -1
  338. package/src/cli/e2e/agents.test.ts +0 -140
  339. package/src/cli/e2e/basic.test.ts +0 -43
  340. package/src/cli/e2e/cron.test.ts +0 -132
  341. package/src/cli/e2e/export-lite-func.test.ts +0 -206
  342. package/src/cli/e2e/fallbacks.test.ts +0 -175
  343. package/src/cli/e2e/init.test.ts +0 -77
  344. package/src/cli/e2e/messages.test.ts +0 -332
  345. package/src/cli/e2e/propose-policy.test.ts +0 -203
  346. package/src/cli/e2e/requests.test.ts +0 -180
  347. package/src/cli/e2e/session-timeout.test.ts +0 -192
  348. package/src/cli/e2e/slash-new.test.ts +0 -93
  349. package/src/cli/e2e/subagents.test.ts +0 -106
  350. package/src/cli/e2e/utils.ts +0 -66
  351. package/src/cli/propose-policy.ts +0 -91
  352. package/web/.svelte-kit/output/client/_app/immutable/chunks/B6YN0Nuq.js +0 -1
  353. package/web/.svelte-kit/output/client/_app/immutable/chunks/BmRlVmv6.js +0 -1
  354. package/web/.svelte-kit/output/client/_app/immutable/chunks/CK9JZLaG.js +0 -2
  355. package/web/.svelte-kit/output/client/_app/immutable/chunks/Ck3rYNON.js +0 -1
  356. package/web/.svelte-kit/output/client/_app/immutable/chunks/D5iV40bG.js +0 -1
  357. package/web/.svelte-kit/output/client/_app/immutable/chunks/DMtIqaiV.js +0 -2
  358. package/web/.svelte-kit/output/client/_app/immutable/chunks/DhD271EB.js +0 -1
  359. package/web/.svelte-kit/output/client/_app/immutable/chunks/DpuLqk8d.js +0 -1
  360. package/web/.svelte-kit/output/client/_app/immutable/chunks/DsIToJCP.js +0 -1
  361. package/web/.svelte-kit/output/client/_app/immutable/entry/app.BCSV3nrG.js +0 -2
  362. package/web/.svelte-kit/output/client/_app/immutable/entry/start.D4eLEZUM.js +0 -1
  363. package/web/.svelte-kit/output/client/_app/immutable/nodes/1.CGC_42IQ.js +0 -1
  364. package/web/.svelte-kit/output/client/_app/immutable/nodes/4.ClM1bXLE.js +0 -60
  365. package/web/.svelte-kit/output/server/chunks/false.js +0 -4
  366. /package/dist/cli/{propose-policy.d.mts → manage-policies.d.mts} +0 -0
  367. /package/{src/cli/e2e → e2e/_helpers}/global-setup.ts +0 -0
@@ -1,12 +1,13 @@
1
- import { B as BROWSER } from "./chunks/false.js";
2
- import { json, text, error } from "@sveltejs/kit";
1
+ import { E as ENDPOINT_METHODS, P as PAGE_METHODS, n as negotiate, m as method_not_allowed, h as handle_error_and_jsonify, g as get_status, i as is_form_content_type, a as normalize_error, b as get_global_name, s as serialize_uses, c as clarify_devalue_error, d as get_node_type, e as noop, f as escape_html, S as SVELTE_KIT_ASSETS, j as create_remote_key, k as static_error_page, r as redirect_response, p as parse_remote_arg, l as stringify, o as deserialize_binary_form, q as split_remote_key, t as once, u as has_prerendered_path, T as TRAILING_SLASH_PARAM, I as INVALIDATED_PARAM, v as handle_fatal_error, w as format_server_error } from "./chunks/shared.js";
2
+ import { B as BROWSER } from "./chunks/render-context.js";
3
+ import { json, text, isRedirect, error } from "@sveltejs/kit";
3
4
  import { Redirect, SvelteKitError, ActionFailure, HttpError } from "@sveltejs/kit/internal";
4
5
  import { with_request_store, merge_tracing, try_get_request_store } from "@sveltejs/kit/internal/server";
5
6
  import { a as assets, b as base, c as app_dir, r as relative, o as override, d as reset } from "./chunks/environment.js";
6
- import { E as ENDPOINT_METHODS, P as PAGE_METHODS, n as negotiate, m as method_not_allowed, h as handle_error_and_jsonify, g as get_status, i as is_form_content_type, a as normalize_error, b as get_global_name, s as serialize_uses, c as clarify_devalue_error, d as get_node_type, e as escape_html, S as SVELTE_KIT_ASSETS, f as create_remote_key, j as static_error_page, r as redirect_response, p as parse_remote_arg, k as stringify, l as deserialize_binary_form, o as has_prerendered_path, T as TRAILING_SLASH_PARAM, I as INVALIDATED_PARAM, q as handle_fatal_error, M as MUTATIVE_METHODS, t as format_server_error } from "./chunks/shared.js";
7
7
  import * as devalue from "devalue";
8
8
  import { m as make_trackable, d as disable_search, a as decode_params, S as SCHEME, w as writable, r as readable, v as validate_layout_server_exports, b as validate_layout_exports, c as validate_page_server_exports, e as validate_page_exports, n as normalize_path, f as resolve, g as decode_pathname, h as validate_server_exports } from "./chunks/exports.js";
9
9
  import { b as base64_encode, t as text_decoder, a as text_encoder, g as get_relative_path } from "./chunks/utils.js";
10
+ import "clsx";
10
11
  import { p as public_env, r as read_implementation, o as options, s as set_private_env, a as set_public_env, g as get_hooks, b as set_read_implementation } from "./chunks/internal.js";
11
12
  import { parse, serialize } from "cookie";
12
13
  import * as set_cookie_parser from "set-cookie-parser";
@@ -21,6 +22,7 @@ function with_resolvers() {
21
22
  }
22
23
  const NULL_BODY_STATUS = [101, 103, 204, 205, 304];
23
24
  const IN_WEBCONTAINER = !!globalThis.process?.versions?.webcontainer;
25
+ const s = JSON.stringify;
24
26
  async function render_endpoint(event, event_state, mod, state) {
25
27
  const method = (
26
28
  /** @type {import('types').HttpMethod} */
@@ -45,7 +47,6 @@ async function render_endpoint(event, event_state, mod, state) {
45
47
  }
46
48
  }
47
49
  try {
48
- event_state.allows_commands = true;
49
50
  const response = await with_request_store(
50
51
  { event, state: event_state },
51
52
  () => handler(
@@ -361,7 +362,6 @@ async function call_action(event, event_state, actions) {
361
362
  },
362
363
  fn: async (current2) => {
363
364
  const traced_event = merge_tracing(event, current2);
364
- event_state.allows_commands = true;
365
365
  const result = await with_request_store(
366
366
  { event: traced_event, state: event_state },
367
367
  () => action(traced_event)
@@ -760,8 +760,9 @@ async function load_data({
760
760
  },
761
761
  fn: async (current2) => {
762
762
  const traced_event = merge_tracing(event, current2);
763
+ const child_state = { ...event_state, is_in_universal_load: true };
763
764
  return await with_request_store(
764
- { event: traced_event, state: event_state },
765
+ { event: traced_event, state: child_state },
765
766
  () => load.call(null, {
766
767
  url: event.url,
767
768
  params: event.params,
@@ -769,8 +770,7 @@ async function load_data({
769
770
  route: event.route,
770
771
  fetch: create_universal_fetch(event, state, fetched, csr, resolve_opts),
771
772
  setHeaders: event.setHeaders,
772
- depends: () => {
773
- },
773
+ depends: noop,
774
774
  parent,
775
775
  untrack: (fn) => fn(),
776
776
  tracing: traced_event.tracing
@@ -930,8 +930,7 @@ function create_universal_fetch(event, state, fetched, csr, resolve_opts) {
930
930
  };
931
931
  return (input, init2) => {
932
932
  const response = universal_fetch(input, init2);
933
- response.catch(() => {
934
- });
933
+ response.catch(noop);
935
934
  return response;
936
935
  };
937
936
  }
@@ -1016,7 +1015,6 @@ function serialize_data(fetched, filter, prerendering = false) {
1016
1015
  }
1017
1016
  return `<script ${attrs.join(" ")}>${safe_payload}<\/script>`;
1018
1017
  }
1019
- const s = JSON.stringify;
1020
1018
  function sha256(data) {
1021
1019
  if (!key[0]) precompute();
1022
1020
  const out = init.slice(0);
@@ -1600,6 +1598,9 @@ async function render_response({
1600
1598
  transformError: error_components ? (
1601
1599
  /** @param {unknown} e */
1602
1600
  async (e) => {
1601
+ if (isRedirect(e)) {
1602
+ throw e;
1603
+ }
1603
1604
  const transformed2 = await handle_error_and_jsonify(event, event_state, options2, e);
1604
1605
  props.page.error = props.error = error2 = transformed2;
1605
1606
  props.page.status = status = get_status(e);
@@ -1610,8 +1611,8 @@ async function render_response({
1610
1611
  const fetch2 = globalThis.fetch;
1611
1612
  try {
1612
1613
  if (BROWSER) ;
1613
- event_state.allows_commands = false;
1614
- rendered = await with_request_store({ event, state: event_state }, async () => {
1614
+ const state2 = { ...event_state, is_in_render: true };
1615
+ rendered = await with_request_store({ event, state: state2 }, async () => {
1615
1616
  if (relative) override({ base: base$1, assets: assets$1 });
1616
1617
  const maybe_promise = options2.root.render(props, render_opts);
1617
1618
  const rendered2 = options2.async && "then" in maybe_promise ? (
@@ -1806,19 +1807,24 @@ ${indent} ${hydrate.join(`,
1806
1807
  ${indent} `)}
1807
1808
  ${indent}}`);
1808
1809
  }
1809
- const { remote_data: remote_cache } = event_state;
1810
- let serialized_remote_data = "";
1811
- if (remote_cache) {
1812
- const remote = {};
1813
- for (const [info, cache] of remote_cache) {
1814
- if (!info.id) continue;
1810
+ const { remote } = event_state;
1811
+ let serialized_query_data = "";
1812
+ let serialized_prerender_data = "";
1813
+ if (remote.data) {
1814
+ const query = {};
1815
+ const prerender = {};
1816
+ for (const [internals, cache] of remote.data) {
1817
+ if (!internals.id) continue;
1815
1818
  for (const key2 in cache) {
1816
- const remote_key = create_remote_key(info.id, key2);
1817
- if (event_state.refreshes?.[remote_key] !== void 0) {
1818
- remote[remote_key] = await cache[key2];
1819
+ const entry = cache[key2];
1820
+ if (!entry.serialize) continue;
1821
+ const remote_key = create_remote_key(internals.id, key2);
1822
+ const store = internals.type === "prerender" ? prerender : query;
1823
+ if (event_state.remote.refreshes?.[remote_key] !== void 0) {
1824
+ store[remote_key] = await entry.data;
1819
1825
  } else {
1820
1826
  const result = await Promise.race([
1821
- Promise.resolve(cache[key2]).then(
1827
+ Promise.resolve(entry.data).then(
1822
1828
  (v) => (
1823
1829
  /** @type {const} */
1824
1830
  { settled: true, value: v }
@@ -1837,7 +1843,7 @@ ${indent}}`);
1837
1843
  ]);
1838
1844
  if (result.settled) {
1839
1845
  if ("error" in result) throw result.error;
1840
- remote[remote_key] = result.value;
1846
+ store[remote_key] = result.value;
1841
1847
  }
1842
1848
  }
1843
1849
  }
@@ -1850,10 +1856,18 @@ ${indent}}`);
1850
1856
  }
1851
1857
  }
1852
1858
  };
1853
- serialized_remote_data = `${global}.data = ${devalue.uneval(remote, replacer)};
1859
+ if (Object.keys(query).length > 0) {
1860
+ serialized_query_data = `${global}.query = ${devalue.uneval(query, replacer)};
1854
1861
 
1855
1862
  `;
1863
+ }
1864
+ if (Object.keys(prerender).length > 0) {
1865
+ serialized_prerender_data = `${global}.prerender = ${devalue.uneval(prerender, replacer)};
1866
+
1867
+ `;
1868
+ }
1856
1869
  }
1870
+ const serialized_remote_data = `${serialized_query_data}${serialized_prerender_data}`;
1857
1871
  const boot = client.inline ? `${client.inline.script}
1858
1872
 
1859
1873
  ${serialized_remote_data}${global}.app.start(${args.join(", ")});` : client.app ? `Promise.all([
@@ -1880,8 +1894,14 @@ ${indent}}`);
1880
1894
  opts = `, ${s(service_worker_options)}`;
1881
1895
  }
1882
1896
  blocks.push(`if ('serviceWorker' in navigator) {
1897
+ const script_url = '${prefixed("service-worker.js")}';
1898
+ const policy = globalThis?.window?.trustedTypes?.createPolicy(
1899
+ 'sveltekit-trusted-url',
1900
+ { createScriptURL(url) { return url; } }
1901
+ );
1902
+ const sanitised = policy?.createScriptURL(script_url) ?? script_url;
1883
1903
  addEventListener('load', function () {
1884
- navigator.serviceWorker.register('${prefixed("service-worker.js")}'${opts});
1904
+ navigator.serviceWorker.register(sanitised${opts});
1885
1905
  });
1886
1906
  }`);
1887
1907
  }
@@ -2227,15 +2247,14 @@ async function handle_remote_call_internal(event, state, options2, manifest, id)
2227
2247
  const module = await remotes[hash2]();
2228
2248
  const fn = module.default[name];
2229
2249
  if (!fn) error(404);
2230
- const info = fn.__;
2250
+ const internals = fn.__;
2231
2251
  const transport = options2.hooks.transport;
2232
2252
  event.tracing.current.setAttributes({
2233
- "sveltekit.remote.call.type": info.type,
2234
- "sveltekit.remote.call.name": info.name
2253
+ "sveltekit.remote.call.type": internals.type,
2254
+ "sveltekit.remote.call.name": internals.name
2235
2255
  });
2236
- let form_client_refreshes;
2237
2256
  try {
2238
- if (info.type === "query_batch") {
2257
+ if (internals.type === "query_batch") {
2239
2258
  if (event.request.method !== "POST") {
2240
2259
  throw new SvelteKitError(
2241
2260
  405,
@@ -2247,7 +2266,10 @@ async function handle_remote_call_internal(event, state, options2, manifest, id)
2247
2266
  const args = await Promise.all(
2248
2267
  payloads.map((payload2) => parse_remote_arg(payload2, transport))
2249
2268
  );
2250
- const results = await with_request_store({ event, state }, () => info.run(args, options2));
2269
+ const results = await with_request_store(
2270
+ { event, state },
2271
+ () => internals.run(args, options2)
2272
+ );
2251
2273
  return json(
2252
2274
  /** @type {RemoteFunctionResponse} */
2253
2275
  {
@@ -2256,7 +2278,7 @@ async function handle_remote_call_internal(event, state, options2, manifest, id)
2256
2278
  }
2257
2279
  );
2258
2280
  }
2259
- if (info.type === "form") {
2281
+ if (internals.type === "form") {
2260
2282
  if (event.request.method !== "POST") {
2261
2283
  throw new SvelteKitError(
2262
2284
  405,
@@ -2274,23 +2296,24 @@ async function handle_remote_call_internal(event, state, options2, manifest, id)
2274
2296
  );
2275
2297
  }
2276
2298
  const { data: data2, meta, form_data } = await deserialize_binary_form(event.request);
2277
- form_client_refreshes = meta.remote_refreshes;
2299
+ state.remote.requested = create_requested_map(meta.remote_refreshes);
2278
2300
  if (additional_args && !("id" in data2)) {
2279
2301
  data2.id = JSON.parse(decodeURIComponent(additional_args));
2280
2302
  }
2281
- const fn2 = info.fn;
2303
+ const fn2 = internals.fn;
2282
2304
  const result = await with_request_store({ event, state }, () => fn2(data2, meta, form_data));
2283
2305
  return json(
2284
2306
  /** @type {RemoteFunctionResponse} */
2285
2307
  {
2286
2308
  type: "result",
2287
2309
  result: stringify(result, transport),
2288
- refreshes: result.issues ? void 0 : await serialize_refreshes(meta.remote_refreshes)
2310
+ refreshes: result.issues ? void 0 : await serialize_refreshes()
2289
2311
  }
2290
2312
  );
2291
2313
  }
2292
- if (info.type === "command") {
2314
+ if (internals.type === "command") {
2293
2315
  const { payload: payload2, refreshes } = await event.request.json();
2316
+ state.remote.requested = create_requested_map(refreshes);
2294
2317
  const arg = parse_remote_arg(payload2, transport);
2295
2318
  const data2 = await with_request_store({ event, state }, () => fn(arg));
2296
2319
  return json(
@@ -2298,11 +2321,11 @@ async function handle_remote_call_internal(event, state, options2, manifest, id)
2298
2321
  {
2299
2322
  type: "result",
2300
2323
  result: stringify(data2, transport),
2301
- refreshes: await serialize_refreshes(refreshes)
2324
+ refreshes: await serialize_refreshes()
2302
2325
  }
2303
2326
  );
2304
2327
  }
2305
- const payload = info.type === "prerender" ? additional_args : (
2328
+ const payload = internals.type === "prerender" ? additional_args : (
2306
2329
  /** @type {string} */
2307
2330
  // new URL(...) necessary because we're hiding the URL from the user in the event object
2308
2331
  new URL(event.request.url).searchParams.get("payload")
@@ -2325,7 +2348,7 @@ async function handle_remote_call_internal(event, state, options2, manifest, id)
2325
2348
  {
2326
2349
  type: "redirect",
2327
2350
  location: error2.location,
2328
- refreshes: await serialize_refreshes(form_client_refreshes)
2351
+ refreshes: await serialize_refreshes()
2329
2352
  }
2330
2353
  );
2331
2354
  }
@@ -2347,34 +2370,45 @@ async function handle_remote_call_internal(event, state, options2, manifest, id)
2347
2370
  }
2348
2371
  );
2349
2372
  }
2350
- async function serialize_refreshes(client_refreshes) {
2351
- const refreshes = state.refreshes ?? {};
2352
- if (client_refreshes) {
2353
- for (const key2 of client_refreshes) {
2354
- if (refreshes[key2] !== void 0) continue;
2355
- const [hash3, name2, payload] = key2.split("/");
2356
- const loader = manifest._.remotes[hash3];
2357
- const fn2 = (await loader?.())?.default?.[name2];
2358
- if (!fn2) error(400, "Bad Request");
2359
- refreshes[key2] = with_request_store(
2360
- { event, state },
2361
- () => fn2(parse_remote_arg(payload, transport))
2362
- );
2363
- }
2364
- }
2365
- if (Object.keys(refreshes).length === 0) {
2373
+ async function serialize_refreshes() {
2374
+ const refreshes = state.remote.refreshes ?? {};
2375
+ const entries = Object.entries(refreshes);
2376
+ if (entries.length === 0) {
2366
2377
  return void 0;
2367
2378
  }
2368
- return stringify(
2369
- Object.fromEntries(
2370
- await Promise.all(
2371
- Object.entries(refreshes).map(async ([key2, promise]) => [key2, await promise])
2372
- )
2373
- ),
2374
- transport
2379
+ const results = await Promise.all(
2380
+ entries.map(async ([key2, promise]) => {
2381
+ try {
2382
+ return [key2, { type: "result", data: await promise }];
2383
+ } catch (error2) {
2384
+ const status = error2 instanceof HttpError || error2 instanceof SvelteKitError ? error2.status : 500;
2385
+ return [
2386
+ key2,
2387
+ {
2388
+ type: "error",
2389
+ status,
2390
+ error: await handle_error_and_jsonify(event, state, options2, error2)
2391
+ }
2392
+ ];
2393
+ }
2394
+ })
2375
2395
  );
2396
+ return stringify(Object.fromEntries(results), transport);
2376
2397
  }
2377
2398
  }
2399
+ function create_requested_map(refreshes) {
2400
+ const requested = /* @__PURE__ */ new Map();
2401
+ for (const key2 of refreshes ?? []) {
2402
+ const parts = split_remote_key(key2);
2403
+ const existing = requested.get(parts.id);
2404
+ if (existing) {
2405
+ existing.push(parts.payload);
2406
+ } else {
2407
+ requested.set(parts.id, [parts.payload]);
2408
+ }
2409
+ }
2410
+ return requested;
2411
+ }
2378
2412
  async function handle_remote_form_post(event, state, manifest, id) {
2379
2413
  return record_span({
2380
2414
  name: "sveltekit.remote.form.post",
@@ -2416,7 +2450,7 @@ async function handle_remote_form_post_internal(event, state, manifest, id) {
2416
2450
  }
2417
2451
  try {
2418
2452
  const fn = (
2419
- /** @type {RemoteInfo & { type: 'form' }} */
2453
+ /** @type {RemoteFormInternals} */
2420
2454
  /** @type {any} */
2421
2455
  form.__.fn
2422
2456
  );
@@ -2590,10 +2624,8 @@ async function render_page(event, event_state, page, options2, manifest, state,
2590
2624
  }
2591
2625
  });
2592
2626
  });
2593
- for (const p of server_promises) p.catch(() => {
2594
- });
2595
- for (const p of load_promises) p.catch(() => {
2596
- });
2627
+ for (const p of server_promises) p.catch(noop);
2628
+ for (const p of load_promises) p.catch(noop);
2597
2629
  for (let i = 0; i < nodes.data.length; i += 1) {
2598
2630
  const node = nodes.data[i];
2599
2631
  if (node) {
@@ -2734,15 +2766,6 @@ async function load_error_components(options2, ssr, branch, page, manifest) {
2734
2766
  }
2735
2767
  return error_components;
2736
2768
  }
2737
- function once(fn) {
2738
- let done = false;
2739
- let result;
2740
- return () => {
2741
- if (done) return result;
2742
- done = true;
2743
- return result = fn();
2744
- };
2745
- }
2746
2769
  async function render_data(event, event_state, route, options2, manifest, state, invalidated_data_nodes, trailing_slash) {
2747
2770
  if (!route.page) {
2748
2771
  return new Response(void 0, {
@@ -3135,8 +3158,7 @@ function create_fetch({ event, options: options2, manifest, state, get_cookie_he
3135
3158
  };
3136
3159
  return (input, init2) => {
3137
3160
  const response = server_fetch(input, init2);
3138
- response.catch(() => {
3139
- });
3161
+ response.catch(noop);
3140
3162
  return response;
3141
3163
  };
3142
3164
  }
@@ -3151,8 +3173,7 @@ async function internal_fetch(request, options2, manifest, state) {
3151
3173
  if (request.signal.aborted) {
3152
3174
  throw new DOMException("The operation was aborted.", "AbortError");
3153
3175
  }
3154
- let remove_abort_listener = () => {
3155
- };
3176
+ let remove_abort_listener = noop;
3156
3177
  const abort_promise = new Promise((_, reject) => {
3157
3178
  const on_abort = () => {
3158
3179
  reject(new DOMException("The operation was aborted.", "AbortError"));
@@ -3196,7 +3217,6 @@ const default_filter = () => false;
3196
3217
  const default_preload = ({ type }) => type === "js" || type === "css";
3197
3218
  const page_methods = /* @__PURE__ */ new Set(["GET", "HEAD", "POST"]);
3198
3219
  const allowed_page_methods = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
3199
- let warned_on_devtools_json_request = false;
3200
3220
  const respond = propagate_context(internal_respond);
3201
3221
  async function internal_respond(request, options2, manifest, state) {
3202
3222
  const url = new URL(request.url);
@@ -3249,7 +3269,22 @@ async function internal_respond(request, options2, manifest, state) {
3249
3269
  tracing: {
3250
3270
  record_span
3251
3271
  },
3252
- is_in_remote_function: false
3272
+ remote: {
3273
+ data: null,
3274
+ forms: null,
3275
+ /** A map of remote function key to corresponding single-flight-mutation promise */
3276
+ refreshes: null,
3277
+ /** A map of remote function ID to payloads requested for refreshing by the client */
3278
+ requested: null,
3279
+ /**
3280
+ * A map of remote function ID to objects that have passed validation;
3281
+ * used to prevent revalidating parameters returned from `requested`
3282
+ */
3283
+ validated: null
3284
+ },
3285
+ is_in_remote_function: false,
3286
+ is_in_render: false,
3287
+ is_in_universal_load: false
3253
3288
  };
3254
3289
  const event = {
3255
3290
  cookies,
@@ -3450,7 +3485,6 @@ async function internal_respond(request, options2, manifest, state) {
3450
3485
  current: root_span
3451
3486
  }
3452
3487
  };
3453
- event_state.allows_commands = MUTATIVE_METHODS.includes(request.method);
3454
3488
  return await with_request_store(
3455
3489
  { event: traced_event, state: event_state },
3456
3490
  () => options2.hooks.handle({
@@ -3534,9 +3568,13 @@ async function internal_respond(request, options2, manifest, state) {
3534
3568
  return response;
3535
3569
  } catch (e) {
3536
3570
  if (e instanceof Redirect) {
3537
- const response = is_data_request || remote_id ? redirect_json_response(e) : route?.page && is_action_json_request(event) ? action_json_redirect(e) : redirect_response(e.status, e.location);
3538
- add_cookies_to_headers(response.headers, new_cookies.values());
3539
- return response;
3571
+ try {
3572
+ const response = is_data_request || remote_id ? redirect_json_response(e) : route?.page && is_action_json_request(event) ? action_json_redirect(e) : redirect_response(e.status, e.location);
3573
+ add_cookies_to_headers(response.headers, new_cookies.values());
3574
+ return response;
3575
+ } catch (err) {
3576
+ return await handle_fatal_error(event, event_state, options2, err);
3577
+ }
3540
3578
  }
3541
3579
  return await handle_fatal_error(event, event_state, options2, e);
3542
3580
  }
@@ -3653,7 +3691,6 @@ async function internal_respond(request, options2, manifest, state) {
3653
3691
  });
3654
3692
  }
3655
3693
  if (state.depth === 0) {
3656
- if (BROWSER && event2.url.pathname === "/.well-known/appspecific/com.chrome.devtools.json") ;
3657
3694
  return await respond_with_error({
3658
3695
  event: event2,
3659
3696
  event_state,
@@ -3786,8 +3823,7 @@ class Server {
3786
3823
  console.error("Remote function schema validation failed:", issues);
3787
3824
  return { message: "Bad Request" };
3788
3825
  }),
3789
- reroute: module.reroute || (() => {
3790
- }),
3826
+ reroute: module.reroute || noop,
3791
3827
  transport: module.transport || {}
3792
3828
  };
3793
3829
  set_app({
@@ -10,7 +10,7 @@ return {
10
10
  assets: new Set(["robots.txt"]),
11
11
  mimeTypes: {".txt":"text/plain"},
12
12
  _: {
13
- client: {start:"_app/immutable/entry/start.D4eLEZUM.js",app:"_app/immutable/entry/app.BCSV3nrG.js",imports:["_app/immutable/entry/start.D4eLEZUM.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/entry/app.BCSV3nrG.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/chunks/B6YN0Nuq.js","_app/immutable/chunks/Zeh-C-mx.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
13
+ client: {start:"_app/immutable/entry/start.Di0-Jhte.js",app:"_app/immutable/entry/app.CIw1Qj0n.js",imports:["_app/immutable/entry/start.Di0-Jhte.js","_app/immutable/chunks/Bv9252RM.js","_app/immutable/chunks/BmBj85Ll.js","_app/immutable/chunks/BiLeM2i1.js","_app/immutable/entry/app.CIw1Qj0n.js","_app/immutable/chunks/BmBj85Ll.js","_app/immutable/chunks/BhRSsUCh.js","_app/immutable/chunks/BrERcKAH.js","_app/immutable/chunks/BiLeM2i1.js","_app/immutable/chunks/KsloHTKS.js","_app/immutable/chunks/DcpaLzmX.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
14
14
  nodes: [
15
15
  __memo(() => import('./nodes/0.js')),
16
16
  __memo(() => import('./nodes/1.js')),
@@ -10,7 +10,7 @@ return {
10
10
  assets: new Set(["robots.txt"]),
11
11
  mimeTypes: {".txt":"text/plain"},
12
12
  _: {
13
- client: {start:"_app/immutable/entry/start.D4eLEZUM.js",app:"_app/immutable/entry/app.BCSV3nrG.js",imports:["_app/immutable/entry/start.D4eLEZUM.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/entry/app.BCSV3nrG.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/chunks/B6YN0Nuq.js","_app/immutable/chunks/Zeh-C-mx.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
13
+ client: {start:"_app/immutable/entry/start.Di0-Jhte.js",app:"_app/immutable/entry/app.CIw1Qj0n.js",imports:["_app/immutable/entry/start.Di0-Jhte.js","_app/immutable/chunks/Bv9252RM.js","_app/immutable/chunks/BmBj85Ll.js","_app/immutable/chunks/BiLeM2i1.js","_app/immutable/entry/app.CIw1Qj0n.js","_app/immutable/chunks/BmBj85Ll.js","_app/immutable/chunks/BhRSsUCh.js","_app/immutable/chunks/BrERcKAH.js","_app/immutable/chunks/BiLeM2i1.js","_app/immutable/chunks/KsloHTKS.js","_app/immutable/chunks/DcpaLzmX.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
14
14
  nodes: [
15
15
  __memo(() => import('./nodes/0.js')),
16
16
  __memo(() => import('./nodes/1.js')),
@@ -8,6 +8,6 @@ export const universal = {
8
8
  "load": null
9
9
  };
10
10
  export const universal_id = "src/routes/+layout.ts";
11
- export const imports = ["_app/immutable/nodes/0.CUGC2p-K.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/B6YN0Nuq.js","_app/immutable/chunks/CK9JZLaG.js","_app/immutable/chunks/Ck3rYNON.js","_app/immutable/chunks/DpuLqk8d.js","_app/immutable/chunks/Zeh-C-mx.js","_app/immutable/chunks/Ck-be5J2.js","_app/immutable/chunks/vDehDcuJ.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/Drm9vgeP.js","_app/immutable/chunks/DsIToJCP.js"];
11
+ export const imports = ["_app/immutable/nodes/0.DYyUA1au.js","_app/immutable/chunks/BrERcKAH.js","_app/immutable/chunks/BmBj85Ll.js","_app/immutable/chunks/BiLeM2i1.js","_app/immutable/chunks/BhRSsUCh.js","_app/immutable/chunks/KsloHTKS.js","_app/immutable/chunks/DISKL3GN.js","_app/immutable/chunks/CIXNBPKi.js","_app/immutable/chunks/DcpaLzmX.js","_app/immutable/chunks/RsHsUj-8.js","_app/immutable/chunks/wpfV79dV.js","_app/immutable/chunks/Bv9252RM.js","_app/immutable/chunks/3AZlWB6U.js","_app/immutable/chunks/DnQ3vS13.js"];
12
12
  export const stylesheets = ["_app/immutable/assets/0.C-4eziNy.css"];
13
13
  export const fonts = [];
@@ -3,6 +3,6 @@
3
3
  export const index = 1;
4
4
  let component_cache;
5
5
  export const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;
6
- export const imports = ["_app/immutable/nodes/1.CGC_42IQ.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/Ck3rYNON.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/DpuLqk8d.js","_app/immutable/chunks/vDehDcuJ.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/DhD271EB.js"];
6
+ export const imports = ["_app/immutable/nodes/1.D-3QEMMZ.js","_app/immutable/chunks/BrERcKAH.js","_app/immutable/chunks/BmBj85Ll.js","_app/immutable/chunks/BhRSsUCh.js","_app/immutable/chunks/wpfV79dV.js","_app/immutable/chunks/Bv9252RM.js","_app/immutable/chunks/BiLeM2i1.js"];
7
7
  export const stylesheets = [];
8
8
  export const fonts = [];
@@ -3,6 +3,6 @@
3
3
  export const index = 2;
4
4
  let component_cache;
5
5
  export const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js')).default;
6
- export const imports = ["_app/immutable/nodes/2.BnwnD1Ki.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/Ck3rYNON.js"];
6
+ export const imports = ["_app/immutable/nodes/2.4olHnH7U.js","_app/immutable/chunks/BrERcKAH.js","_app/immutable/chunks/BmBj85Ll.js","_app/immutable/chunks/CIXNBPKi.js"];
7
7
  export const stylesheets = [];
8
8
  export const fonts = [];
@@ -3,6 +3,6 @@
3
3
  export const index = 3;
4
4
  let component_cache;
5
5
  export const component = async () => component_cache ??= (await import('../entries/pages/agents/_page.svelte.js')).default;
6
- export const imports = ["_app/immutable/nodes/3.0arZe_Uf.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/B6YN0Nuq.js","_app/immutable/chunks/CK9JZLaG.js","_app/immutable/chunks/Ck3rYNON.js","_app/immutable/chunks/DpuLqk8d.js","_app/immutable/chunks/Zeh-C-mx.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/chunks/Drm9vgeP.js","_app/immutable/chunks/Ck-be5J2.js"];
6
+ export const imports = ["_app/immutable/nodes/3.4w0bE-m2.js","_app/immutable/chunks/BrERcKAH.js","_app/immutable/chunks/BmBj85Ll.js","_app/immutable/chunks/BhRSsUCh.js","_app/immutable/chunks/KsloHTKS.js","_app/immutable/chunks/DISKL3GN.js","_app/immutable/chunks/CIXNBPKi.js","_app/immutable/chunks/DcpaLzmX.js","_app/immutable/chunks/Bv9252RM.js","_app/immutable/chunks/BiLeM2i1.js","_app/immutable/chunks/3AZlWB6U.js","_app/immutable/chunks/RsHsUj-8.js"];
7
7
  export const stylesheets = [];
8
8
  export const fonts = [];
@@ -8,6 +8,6 @@ export const universal = {
8
8
  "load": null
9
9
  };
10
10
  export const universal_id = "src/routes/chats/[id]/+page.ts";
11
- export const imports = ["_app/immutable/nodes/4.ClM1bXLE.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/B6YN0Nuq.js","_app/immutable/chunks/CK9JZLaG.js","_app/immutable/chunks/Ck3rYNON.js","_app/immutable/chunks/DpuLqk8d.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/DsIToJCP.js"];
11
+ export const imports = ["_app/immutable/nodes/4.CZvjhVHt.js","_app/immutable/chunks/BrERcKAH.js","_app/immutable/chunks/BmBj85Ll.js","_app/immutable/chunks/BiLeM2i1.js","_app/immutable/chunks/BhRSsUCh.js","_app/immutable/chunks/KsloHTKS.js","_app/immutable/chunks/DISKL3GN.js","_app/immutable/chunks/CIXNBPKi.js","_app/immutable/chunks/Bv9252RM.js","_app/immutable/chunks/DnQ3vS13.js"];
12
12
  export const stylesheets = ["_app/immutable/assets/4.Cc_xwLNl.css"];
13
13
  export const fonts = [];
@@ -8,6 +8,6 @@ export const universal = {
8
8
  "load": null
9
9
  };
10
10
  export const universal_id = "src/routes/chats/[id]/settings/+page.ts";
11
- export const imports = ["_app/immutable/nodes/5.Bq2JzCEj.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/B6YN0Nuq.js","_app/immutable/chunks/CK9JZLaG.js","_app/immutable/chunks/Ck3rYNON.js","_app/immutable/chunks/DpuLqk8d.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/chunks/Drm9vgeP.js"];
11
+ export const imports = ["_app/immutable/nodes/5.DLbPVJY2.js","_app/immutable/chunks/BrERcKAH.js","_app/immutable/chunks/BmBj85Ll.js","_app/immutable/chunks/BhRSsUCh.js","_app/immutable/chunks/KsloHTKS.js","_app/immutable/chunks/DISKL3GN.js","_app/immutable/chunks/CIXNBPKi.js","_app/immutable/chunks/Bv9252RM.js","_app/immutable/chunks/BiLeM2i1.js","_app/immutable/chunks/3AZlWB6U.js"];
12
12
  export const stylesheets = [];
13
13
  export const fonts = [];