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.
- package/.changeset/README.md +8 -0
- package/.changeset/config.json +14 -0
- package/.github/workflows/release.yml +49 -0
- package/CHANGELOG.md +36 -0
- package/README.md +5 -4
- package/dist/adapter-discord/index.d.mts.map +1 -1
- package/dist/adapter-discord/index.mjs +465 -282
- package/dist/adapter-discord/index.mjs.map +1 -1
- package/dist/adapter-google-chat/index.mjs +367 -243
- package/dist/adapter-google-chat/index.mjs.map +1 -1
- package/dist/cli/index.mjs +684 -24
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lite.mjs +43 -13
- package/dist/cli/lite.mjs.map +1 -1
- package/dist/cli/{propose-policy.mjs → manage-policies.mjs} +270 -47
- package/dist/cli/manage-policies.mjs.map +1 -0
- package/dist/cli/run-host.d.mts +1 -0
- package/dist/cli/run-host.mjs +3090 -0
- package/dist/cli/run-host.mjs.map +1 -0
- package/dist/config-CPFQIGdG.mjs +57 -0
- package/dist/config-CPFQIGdG.mjs.map +1 -0
- package/dist/config-Dvl-Pov4.mjs +76 -0
- package/dist/config-Dvl-Pov4.mjs.map +1 -0
- package/dist/daemon/index.d.mts.map +1 -1
- package/dist/daemon/index.mjs +970 -332
- package/dist/daemon/index.mjs.map +1 -1
- package/dist/supervisor-actions-CiW56eLi.mjs +843 -0
- package/dist/supervisor-actions-CiW56eLi.mjs.map +1 -0
- package/dist/turn-log-buffer-DRgW53gl.mjs +767 -0
- package/dist/turn-log-buffer-DRgW53gl.mjs.map +1 -0
- package/dist/web/_app/immutable/chunks/{Drm9vgeP.js → 3AZlWB6U.js} +1 -1
- package/dist/web/_app/immutable/chunks/BhRSsUCh.js +2 -0
- package/dist/web/_app/immutable/chunks/BiLeM2i1.js +1 -0
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/CME08kGM.js → dist/web/_app/immutable/chunks/BmBj85Ll.js} +1 -1
- package/dist/web/_app/immutable/chunks/BrERcKAH.js +1 -0
- package/dist/web/_app/immutable/chunks/Bv9252RM.js +1 -0
- package/dist/web/_app/immutable/chunks/CIXNBPKi.js +1 -0
- package/dist/web/_app/immutable/chunks/DISKL3GN.js +2 -0
- package/dist/web/_app/immutable/chunks/{Zeh-C-mx.js → DcpaLzmX.js} +1 -1
- package/dist/web/_app/immutable/chunks/DnQ3vS13.js +1 -0
- package/dist/web/_app/immutable/chunks/KsloHTKS.js +1 -0
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/Ck-be5J2.js → dist/web/_app/immutable/chunks/RsHsUj-8.js} +2 -2
- package/dist/web/_app/immutable/chunks/{vDehDcuJ.js → wpfV79dV.js} +1 -1
- package/dist/web/_app/immutable/entry/app.CIw1Qj0n.js +2 -0
- package/dist/web/_app/immutable/entry/start.Di0-Jhte.js +1 -0
- package/dist/web/_app/immutable/nodes/{0.CUGC2p-K.js → 0.DYyUA1au.js} +1 -1
- package/dist/web/_app/immutable/nodes/1.D-3QEMMZ.js +1 -0
- package/dist/web/_app/immutable/nodes/{2.BnwnD1Ki.js → 2.4olHnH7U.js} +1 -1
- package/{web/.svelte-kit/output/client/_app/immutable/nodes/3.0arZe_Uf.js → dist/web/_app/immutable/nodes/3.4w0bE-m2.js} +3 -3
- package/dist/web/_app/immutable/nodes/4.CZvjhVHt.js +60 -0
- package/dist/web/_app/immutable/nodes/{5.Bq2JzCEj.js → 5.DLbPVJY2.js} +1 -1
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +12 -12
- package/dist/workspace-oWmVh5mi.mjs +1001 -0
- package/dist/workspace-oWmVh5mi.mjs.map +1 -0
- package/docs/23_adapter_slash_autocomplete/development_log.md +19 -0
- package/docs/23_adapter_slash_autocomplete/notes.md +18 -0
- package/docs/23_adapter_slash_autocomplete/prd.md +46 -0
- package/docs/23_adapter_slash_autocomplete/questions.md +6 -0
- package/docs/23_adapter_slash_autocomplete/tickets.md +21 -0
- package/docs/24_subagent_job_policy_fixes/development_log.md +22 -0
- package/docs/24_subagent_job_policy_fixes/notes.md +28 -0
- package/docs/24_subagent_job_policy_fixes/prd.md +59 -0
- package/docs/24_subagent_job_policy_fixes/questions.md +3 -0
- package/docs/24_subagent_job_policy_fixes/tickets.md +49 -0
- package/docs/25_e2e_test_improvements/development_log.md +30 -0
- package/docs/25_e2e_test_improvements/notes.md +29 -0
- package/docs/25_e2e_test_improvements/prd.md +43 -0
- package/docs/25_e2e_test_improvements/questions.md +12 -0
- package/docs/25_e2e_test_improvements/tickets-2.md +22 -0
- package/docs/25_e2e_test_improvements/tickets.md +22 -0
- package/docs/25_policy_cwd/development_log.md +30 -0
- package/docs/25_policy_cwd/notes.md +28 -0
- package/docs/25_policy_cwd/prd.md +77 -0
- package/docs/25_policy_cwd/questions.md +6 -0
- package/docs/25_policy_cwd/tickets.md +77 -0
- package/docs/CLI_REFERENCE.md +3 -1
- package/docs/PHILOSOPHY.md +35 -0
- package/docs/adapter-visibility/SPEC.md +461 -0
- package/docs/adapter-visibility/SPEC_v2.md +202 -0
- package/docs/auto-update/SPEC.md +344 -0
- package/docs/backups/SPEC.md +296 -0
- package/docs/backups/clawmini.gitignore +69 -0
- package/docs/guides/assets/clawmini-avatar.png +0 -0
- package/docs/guides/backups.md +332 -0
- package/docs/guides/discord_adapter_setup.md +1 -1
- package/docs/guides/google_chat_adapter_setup.md +81 -0
- package/docs/unified-startup/SPEC.md +203 -0
- package/e2e/_helpers/test-environment.test.ts +49 -0
- package/e2e/_helpers/test-environment.ts +548 -0
- package/e2e/adapters/_google-chat-fixtures.ts +340 -0
- package/{src/cli/e2e → e2e/adapters}/adapter-discord.test.ts +22 -23
- package/e2e/adapters/adapter-google-chat-downtime.test.ts +157 -0
- package/e2e/adapters/adapter-google-chat-inbound.test.ts +697 -0
- package/e2e/adapters/adapter-google-chat-outbound.test.ts +297 -0
- package/e2e/adapters/adapter-google-chat-roundtrip.test.ts +56 -0
- package/e2e/adapters/adapter-google-chat-threads.test.ts +1078 -0
- package/e2e/agents/custom-api-env.test.ts +80 -0
- package/e2e/agents/export-lite-func.test.ts +104 -0
- package/e2e/agents/fallbacks.test.ts +124 -0
- package/e2e/agents/interrupt.test.ts +50 -0
- package/e2e/agents/no-reply-necessary.test.ts +57 -0
- package/e2e/agents/session-timeout-subagents.test.ts +76 -0
- package/e2e/agents/subagent-authorization.test.ts +246 -0
- package/e2e/agents/subagent-env.test.ts +49 -0
- package/e2e/agents/subagent-lifecycle.test.ts +782 -0
- package/e2e/agents/subagents-depth.test.ts +47 -0
- package/e2e/cli/agents.test.ts +176 -0
- package/e2e/cli/auto-update.test.ts +741 -0
- package/e2e/cli/basic.test.ts +44 -0
- package/{src/cli/e2e → e2e/cli}/export-lite.test.ts +16 -12
- package/e2e/cli/init-gitignore.test.ts +86 -0
- package/e2e/cli/init.test.ts +76 -0
- package/e2e/cli/messages.test.ts +363 -0
- package/e2e/cli/serve.test.ts +76 -0
- package/{src/cli/e2e → e2e/cli}/skills.test.ts +11 -10
- package/{src/cli/e2e → e2e/daemon}/daemon.test.ts +57 -195
- package/e2e/jobs/agent-jobs.test.ts +216 -0
- package/e2e/jobs/cron.test.ts +64 -0
- package/e2e/jobs/restart.test.ts +108 -0
- package/e2e/policies/approval-session.test.ts +69 -0
- package/e2e/policies/auto-create-policies-file.test.ts +35 -0
- package/e2e/policies/builtin-manage-policies.test.ts +184 -0
- package/e2e/policies/builtin-run-host.test.ts +180 -0
- package/e2e/policies/environment-policies.test.ts +177 -0
- package/e2e/policies/manage-policies.test.ts +566 -0
- package/e2e/policies/output-size.test.ts +98 -0
- package/e2e/policies/policies-context-cwd.test.ts +160 -0
- package/e2e/policies/relative-script-path.test.ts +60 -0
- package/e2e/policies/requests-show.test.ts +135 -0
- package/e2e/policies/requests.test.ts +208 -0
- package/e2e/policies/slash-policies.test.ts +308 -0
- package/e2e/policies/startup-cleanup.test.ts +48 -0
- package/e2e/routers/session-timeout.test.ts +106 -0
- package/e2e/routers/slash-model.test.ts +152 -0
- package/e2e/routers/slash-new.test.ts +50 -0
- package/e2e/routers/slash-restart-adapter.test.ts +96 -0
- package/e2e/routers/slash-restart.test.ts +114 -0
- package/e2e/routers/slash-shutdown.test.ts +55 -0
- package/e2e/routers/slash-stop.test.ts +232 -0
- package/e2e/routers/slash-upgrade.test.ts +88 -0
- package/{src/cli/e2e → e2e/sandbox}/environments.test.ts +14 -13
- package/eslint.config.js +6 -0
- package/napkin.md +1 -1
- package/package.json +8 -3
- package/src/adapter-discord/commands.test.ts +42 -0
- package/src/adapter-discord/commands.ts +33 -0
- package/src/adapter-discord/config.ts +12 -0
- package/src/adapter-discord/forwarder.test.ts +499 -21
- package/src/adapter-discord/forwarder.ts +343 -124
- package/src/adapter-discord/inbound-cache.test.ts +47 -0
- package/src/adapter-discord/inbound-cache.ts +37 -0
- package/src/adapter-discord/index.test.ts +67 -2
- package/src/adapter-discord/index.ts +84 -216
- package/src/adapter-discord/interactions.test.ts +54 -3
- package/src/adapter-discord/interactions.ts +97 -53
- package/src/adapter-discord/processMessage.ts +239 -0
- package/src/adapter-discord/state.ts +1 -0
- package/src/adapter-google-chat/auth.test.ts +9 -5
- package/src/adapter-google-chat/auth.ts +29 -23
- package/src/adapter-google-chat/cards.ts +7 -2
- package/src/adapter-google-chat/client.test.ts +37 -2
- package/src/adapter-google-chat/client.ts +138 -38
- package/src/adapter-google-chat/config.ts +19 -0
- package/src/adapter-google-chat/forwarder.test.ts +81 -56
- package/src/adapter-google-chat/forwarder.ts +394 -185
- package/src/adapter-google-chat/inbound-cache.test.ts +61 -0
- package/src/adapter-google-chat/inbound-cache.ts +36 -0
- package/src/adapter-google-chat/state.test.ts +1 -0
- package/src/adapter-google-chat/state.ts +9 -1
- package/src/adapter-google-chat/subscriptions.ts +8 -6
- package/src/cli/builtin-policies.ts +44 -0
- package/src/cli/commands/agents.ts +59 -5
- package/src/cli/commands/down.ts +54 -2
- package/src/cli/commands/environments.ts +8 -2
- package/src/cli/commands/init.ts +31 -0
- package/src/cli/commands/logs.ts +116 -0
- package/src/cli/commands/policies.ts +6 -4
- package/src/cli/commands/serve.test.ts +67 -0
- package/src/cli/commands/serve.ts +284 -0
- package/src/cli/commands/up.ts +122 -2
- package/src/cli/commands/web-api/agents.ts +3 -2
- package/src/cli/index.ts +4 -0
- package/src/cli/install-detection.test.ts +72 -0
- package/src/cli/install-detection.ts +48 -0
- package/src/cli/lite.ts +54 -22
- package/src/cli/manage-policies-utils.ts +104 -0
- package/src/cli/manage-policies.ts +291 -0
- package/src/cli/run-host.ts +45 -0
- package/src/cli/supervisor-actions.ts +267 -0
- package/src/cli/supervisor-control.test.ts +129 -0
- package/src/cli/supervisor-control.ts +155 -0
- package/src/cli/supervisor-pid.ts +68 -0
- package/src/cli/supervisor.ts +277 -0
- package/src/daemon/agent/agent-context.ts +11 -11
- package/src/daemon/agent/agent-session.ts +8 -1
- package/src/daemon/agent/chat-logger.test.ts +78 -9
- package/src/daemon/agent/chat-logger.ts +25 -5
- package/src/daemon/agent/turn-registry.test.ts +89 -0
- package/src/daemon/agent/turn-registry.ts +94 -0
- package/src/daemon/agent/types.ts +2 -0
- package/src/daemon/api/agent-policy-endpoints.ts +263 -0
- package/src/daemon/api/agent-router.ts +47 -126
- package/src/daemon/api/index.test.ts +1 -0
- package/src/daemon/api/policy-request.test.ts +7 -5
- package/src/daemon/api/router-utils.ts +6 -5
- package/src/daemon/api/subagent-router.ts +110 -74
- package/src/daemon/api/subagent-utils.test.ts +60 -0
- package/src/daemon/api/subagent-utils.ts +113 -87
- package/src/daemon/api/user-router.ts +34 -8
- package/src/daemon/auth.ts +1 -0
- package/src/daemon/cron.test.ts +62 -4
- package/src/daemon/cron.ts +42 -16
- package/src/daemon/events.ts +65 -0
- package/src/daemon/index.ts +24 -1
- package/src/daemon/message-interruption.test.ts +1 -0
- package/src/daemon/message-jobs.test.ts +1 -0
- package/src/daemon/message.ts +78 -14
- package/src/daemon/observation.test.ts +26 -18
- package/src/daemon/pending-replies.test.ts +112 -0
- package/src/daemon/pending-replies.ts +162 -0
- package/src/daemon/policy-request-service.ts +3 -1
- package/src/daemon/policy-utils.test.ts +66 -1
- package/src/daemon/policy-utils.ts +126 -1
- package/src/daemon/request-store.ts +31 -0
- package/src/daemon/routers/session-timeout.ts +4 -0
- package/src/daemon/routers/slash-model.test.ts +344 -0
- package/src/daemon/routers/slash-model.ts +207 -0
- package/src/daemon/routers/slash-policies.test.ts +38 -32
- package/src/daemon/routers/slash-policies.ts +84 -33
- package/src/daemon/routers/slash-restart.test.ts +69 -0
- package/src/daemon/routers/slash-restart.ts +36 -0
- package/src/daemon/routers/slash-shutdown.test.ts +50 -0
- package/src/daemon/routers/slash-shutdown.ts +28 -0
- package/src/daemon/routers/slash-upgrade.test.ts +116 -0
- package/src/daemon/routers/slash-upgrade.ts +76 -0
- package/src/daemon/routers/types.ts +7 -0
- package/src/daemon/routers.ts +16 -0
- package/src/shared/adapters/blockquote.test.ts +28 -0
- package/src/shared/adapters/blockquote.ts +20 -0
- package/src/shared/adapters/filtering.test.ts +224 -10
- package/src/shared/adapters/filtering.ts +95 -7
- package/src/shared/adapters/inbound-cache.test.ts +48 -0
- package/src/shared/adapters/inbound-cache.ts +54 -0
- package/src/shared/adapters/turn-log-buffer.ts +266 -0
- package/src/shared/adapters/turn-log.test.ts +389 -0
- package/src/shared/adapters/turn-log.ts +357 -0
- package/src/shared/agent-utils.ts +12 -5
- package/src/shared/chats.test.ts +4 -0
- package/src/shared/chats.ts +9 -0
- package/src/shared/config.ts +16 -1
- package/src/shared/lite.ts +76 -2
- package/src/shared/policies.ts +26 -0
- package/src/shared/template-manifest.ts +267 -0
- package/src/shared/utils/shell.ts +61 -0
- package/src/shared/version.ts +34 -0
- package/src/shared/workspace.test.ts +217 -0
- package/src/shared/workspace.ts +626 -48
- package/templates/environments/cladding/allowlist-domain.mjs +125 -0
- package/templates/environments/cladding/env.json +21 -1
- package/templates/environments/cladding/run-with-network.mjs +54 -0
- package/templates/environments/macos-proxy/allowlist-domain.mjs +95 -0
- package/templates/environments/macos-proxy/env.json +8 -1
- package/templates/environments/macos-proxy/proxy.mjs +0 -1
- package/templates/gemini/template.json +5 -0
- package/templates/gemini-claw/template.json +13 -0
- package/templates/skills/clawmini-requests/SKILL.md +69 -10
- package/templates/skills/run-host/SKILL.md +51 -0
- package/templates/skills/skill-creator/SKILL.md +4 -3
- package/templates/skills/skill-creator/scripts/validate.sh +52 -0
- package/tsdown.config.ts +10 -1
- package/vitest.config.ts +2 -2
- package/web/.svelte-kit/ambient.d.ts +292 -118
- package/web/.svelte-kit/generated/server/internal.js +1 -1
- package/web/.svelte-kit/output/client/.vite/manifest.json +126 -136
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{Drm9vgeP.js → 3AZlWB6U.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/BhRSsUCh.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/BiLeM2i1.js +1 -0
- package/{dist/web/_app/immutable/chunks/CME08kGM.js → web/.svelte-kit/output/client/_app/immutable/chunks/BmBj85Ll.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/BrERcKAH.js +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/Bv9252RM.js +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/CIXNBPKi.js +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/DISKL3GN.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{Zeh-C-mx.js → DcpaLzmX.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/DnQ3vS13.js +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/KsloHTKS.js +1 -0
- package/{dist/web/_app/immutable/chunks/Ck-be5J2.js → web/.svelte-kit/output/client/_app/immutable/chunks/RsHsUj-8.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{vDehDcuJ.js → wpfV79dV.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/app.CIw1Qj0n.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.Di0-Jhte.js +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{0.CUGC2p-K.js → 0.DYyUA1au.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/1.D-3QEMMZ.js +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{2.BnwnD1Ki.js → 2.4olHnH7U.js} +1 -1
- package/{dist/web/_app/immutable/nodes/3.0arZe_Uf.js → web/.svelte-kit/output/client/_app/immutable/nodes/3.4w0bE-m2.js} +3 -3
- package/web/.svelte-kit/output/client/_app/immutable/nodes/4.CZvjhVHt.js +60 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{5.Bq2JzCEj.js → 5.DLbPVJY2.js} +1 -1
- package/web/.svelte-kit/output/client/_app/version.json +1 -1
- package/web/.svelte-kit/output/server/.vite/manifest.json +12 -10
- package/web/.svelte-kit/output/server/chunks/Icon.js +1 -1
- package/web/.svelte-kit/output/server/chunks/client.js +1 -1
- package/web/.svelte-kit/output/server/chunks/exports.js +1 -1
- package/web/.svelte-kit/output/server/chunks/index-server.js +2 -1
- package/web/.svelte-kit/output/server/chunks/internal.js +1 -1
- package/web/.svelte-kit/output/server/chunks/render-context.js +77 -0
- package/web/.svelte-kit/output/server/chunks/root.js +739 -788
- package/web/.svelte-kit/output/server/chunks/shared.js +234 -21
- package/web/.svelte-kit/output/server/index.js +126 -90
- package/web/.svelte-kit/output/server/manifest-full.js +1 -1
- package/web/.svelte-kit/output/server/manifest.js +1 -1
- package/web/.svelte-kit/output/server/nodes/0.js +1 -1
- package/web/.svelte-kit/output/server/nodes/1.js +1 -1
- package/web/.svelte-kit/output/server/nodes/2.js +1 -1
- package/web/.svelte-kit/output/server/nodes/3.js +1 -1
- package/web/.svelte-kit/output/server/nodes/4.js +1 -1
- package/web/.svelte-kit/output/server/nodes/5.js +1 -1
- package/web/.svelte-kit/output/server/remote-entry.js +245 -81
- package/web/.svelte-kit/tsconfig.json +4 -1
- package/dist/cli/propose-policy.mjs.map +0 -1
- package/dist/lite-CBxOT1y5.mjs +0 -241
- package/dist/lite-CBxOT1y5.mjs.map +0 -1
- package/dist/routing-D8rTxtaV.mjs +0 -245
- package/dist/routing-D8rTxtaV.mjs.map +0 -1
- package/dist/web/_app/immutable/chunks/B6YN0Nuq.js +0 -1
- package/dist/web/_app/immutable/chunks/BmRlVmv6.js +0 -1
- package/dist/web/_app/immutable/chunks/CK9JZLaG.js +0 -2
- package/dist/web/_app/immutable/chunks/Ck3rYNON.js +0 -1
- package/dist/web/_app/immutable/chunks/D5iV40bG.js +0 -1
- package/dist/web/_app/immutable/chunks/DMtIqaiV.js +0 -2
- package/dist/web/_app/immutable/chunks/DhD271EB.js +0 -1
- package/dist/web/_app/immutable/chunks/DpuLqk8d.js +0 -1
- package/dist/web/_app/immutable/chunks/DsIToJCP.js +0 -1
- package/dist/web/_app/immutable/entry/app.BCSV3nrG.js +0 -2
- package/dist/web/_app/immutable/entry/start.D4eLEZUM.js +0 -1
- package/dist/web/_app/immutable/nodes/1.CGC_42IQ.js +0 -1
- package/dist/web/_app/immutable/nodes/4.ClM1bXLE.js +0 -60
- package/dist/workspace-BJmJBfKi.mjs +0 -456
- package/dist/workspace-BJmJBfKi.mjs.map +0 -1
- package/src/cli/e2e/agents.test.ts +0 -140
- package/src/cli/e2e/basic.test.ts +0 -43
- package/src/cli/e2e/cron.test.ts +0 -132
- package/src/cli/e2e/export-lite-func.test.ts +0 -206
- package/src/cli/e2e/fallbacks.test.ts +0 -175
- package/src/cli/e2e/init.test.ts +0 -77
- package/src/cli/e2e/messages.test.ts +0 -332
- package/src/cli/e2e/propose-policy.test.ts +0 -203
- package/src/cli/e2e/requests.test.ts +0 -180
- package/src/cli/e2e/session-timeout.test.ts +0 -192
- package/src/cli/e2e/slash-new.test.ts +0 -93
- package/src/cli/e2e/subagents.test.ts +0 -106
- package/src/cli/e2e/utils.ts +0 -66
- package/src/cli/propose-policy.ts +0 -91
- package/web/.svelte-kit/output/client/_app/immutable/chunks/B6YN0Nuq.js +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/BmRlVmv6.js +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/CK9JZLaG.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/Ck3rYNON.js +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/D5iV40bG.js +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/DMtIqaiV.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/DhD271EB.js +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/DpuLqk8d.js +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/DsIToJCP.js +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/app.BCSV3nrG.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.D4eLEZUM.js +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/1.CGC_42IQ.js +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/4.ClM1bXLE.js +0 -60
- package/web/.svelte-kit/output/server/chunks/false.js +0 -4
- /package/dist/cli/{propose-policy.d.mts → manage-policies.d.mts} +0 -0
- /package/{src/cli/e2e → e2e/_helpers}/global-setup.ts +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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:
|
|
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
|
-
|
|
1614
|
-
rendered = await with_request_store({ event, state:
|
|
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 {
|
|
1810
|
-
let
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
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
|
|
1817
|
-
if (
|
|
1818
|
-
|
|
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(
|
|
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
|
-
|
|
1846
|
+
store[remote_key] = result.value;
|
|
1841
1847
|
}
|
|
1842
1848
|
}
|
|
1843
1849
|
}
|
|
@@ -1850,10 +1856,18 @@ ${indent}}`);
|
|
|
1850
1856
|
}
|
|
1851
1857
|
}
|
|
1852
1858
|
};
|
|
1853
|
-
|
|
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(
|
|
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
|
|
2250
|
+
const internals = fn.__;
|
|
2231
2251
|
const transport = options2.hooks.transport;
|
|
2232
2252
|
event.tracing.current.setAttributes({
|
|
2233
|
-
"sveltekit.remote.call.type":
|
|
2234
|
-
"sveltekit.remote.call.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 (
|
|
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(
|
|
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 (
|
|
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
|
-
|
|
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 =
|
|
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(
|
|
2310
|
+
refreshes: result.issues ? void 0 : await serialize_refreshes()
|
|
2289
2311
|
}
|
|
2290
2312
|
);
|
|
2291
2313
|
}
|
|
2292
|
-
if (
|
|
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(
|
|
2324
|
+
refreshes: await serialize_refreshes()
|
|
2302
2325
|
}
|
|
2303
2326
|
);
|
|
2304
2327
|
}
|
|
2305
|
-
const payload =
|
|
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(
|
|
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(
|
|
2351
|
-
const refreshes = state.refreshes ?? {};
|
|
2352
|
-
|
|
2353
|
-
|
|
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
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
)
|
|
2373
|
-
|
|
2374
|
-
|
|
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 {
|
|
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
|
-
|
|
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
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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 = [];
|