@circuitwall/jarela 2.2.1 → 2.4.0
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +2 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +8 -0
- package/.next/standalone/.next/server/app/_global-error/page.js +68 -68
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +76 -76
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/v1/access/[identity]/route.js +100 -93
- package/.next/standalone/.next/server/app/api/v1/access/route.js +176 -169
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +89 -56
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/display-filters/route.js +139 -127
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/route.js +107 -100
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/thread/route.js +765 -753
- package/.next/standalone/.next/server/app/api/v1/agents/route.js +72 -65
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +371 -364
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +809 -802
- package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +9 -2
- package/.next/standalone/.next/server/app/api/v1/attachments/files/route.js +49 -49
- package/.next/standalone/.next/server/app/api/v1/attachments/images/route.js +910 -910
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +583 -16
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/[remote_jid]/route.js +41 -30
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +48 -37
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +697 -130
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js +703 -136
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js +796 -229
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/[route_id]/route.js +762 -746
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +1050 -1034
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +673 -106
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js +811 -804
- package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js +718 -706
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/config/route.js +85 -85
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js +709 -709
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/currency/route.js +10 -10
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js +796 -784
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +30 -23
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js +86 -86
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js +57 -57
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/search/route.js +385 -378
- package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js +122 -122
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/env/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/env-sync/allowlist/route.js +375 -368
- package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/events/route.js +745 -178
- package/.next/standalone/.next/server/app/api/v1/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/events/test/route.js +77 -77
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +763 -763
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/browser/activate/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +16 -9
- package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +72 -65
- package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +41 -34
- package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +211 -204
- package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +140 -133
- package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +113 -106
- package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +121 -114
- package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +141 -134
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +690 -690
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js +185 -185
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js +171 -171
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js +396 -396
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js +212 -212
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/files/[name]/route.js +235 -235
- package/.next/standalone/.next/server/app/api/v1/fs/browse/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/harnesses/[id]/route.js +228 -221
- package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +65 -58
- package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +79 -72
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/health/route.js +783 -771
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +140 -133
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/callback/route.js +370 -363
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +240 -233
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +689 -682
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +886 -879
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +115 -108
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +955 -948
- package/.next/standalone/.next/server/app/api/v1/integrations/route.js +223 -216
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +876 -847
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/local-file/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/logs/route.js +70 -70
- package/.next/standalone/.next/server/app/api/v1/maps/embed/route.js +79 -72
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +991 -979
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/registry/route.js +196 -196
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/route.js +19 -7
- package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +539 -532
- package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +86 -79
- package/.next/standalone/.next/server/app/api/v1/memory/route.js +58 -51
- package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +138 -131
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +381 -369
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +150 -143
- package/.next/standalone/.next/server/app/api/v1/models/route.js +634 -627
- package/.next/standalone/.next/server/app/api/v1/packages/catalog/route.js +445 -445
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js +120 -120
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js +234 -234
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js +407 -407
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js +107 -107
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js +228 -228
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/route.js +148 -148
- package/.next/standalone/.next/server/app/api/v1/packages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js +787 -787
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js +529 -514
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js +181 -181
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js +258 -258
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/profile/location/route.js +37 -30
- package/.next/standalone/.next/server/app/api/v1/profile/route.js +171 -164
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +15 -8
- package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +171 -164
- package/.next/standalone/.next/server/app/api/v1/providers/route.js +101 -94
- package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +457 -450
- package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +44 -37
- package/.next/standalone/.next/server/app/api/v1/redaction/route.js +65 -58
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +617 -605
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/route.js +739 -732
- package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +329 -322
- package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +204 -197
- package/.next/standalone/.next/server/app/api/v1/security/state/route.js +58 -51
- package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +183 -176
- package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +194 -187
- package/.next/standalone/.next/server/app/api/v1/setup/test-key/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/skills/[id]/route.js +776 -769
- package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +122 -115
- package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +334 -327
- package/.next/standalone/.next/server/app/api/v1/skills/route.js +873 -866
- package/.next/standalone/.next/server/app/api/v1/system/abort/route.js +838 -808
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js +177 -177
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/tailscale/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/tasks/[agent_id]/route.js +122 -115
- package/.next/standalone/.next/server/app/api/v1/tasks/route.js +30 -23
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js +1436 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js +638 -631
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js +60 -439
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +172 -173
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/route.js +925 -913
- package/.next/standalone/.next/server/app/api/v1/tools/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js +17 -17
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/route.js +570 -570
- package/.next/standalone/.next/server/app/api/v1/voice/transcribe/route.js +241 -229
- package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +989 -977
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +40 -28
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/watchers/reaction-scripts/route.js +128 -128
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/icon.svg/route.js +62 -62
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +436 -436
- package/.next/standalone/.next/server/app/page.js +1179 -743
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page.js +99 -91
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +2 -1
- package/.next/standalone/.next/server/chunks/{424.js → 1388.js} +441 -1022
- package/.next/standalone/.next/server/chunks/1433.js +1 -1
- package/.next/standalone/.next/server/chunks/1638.js +1 -2
- package/.next/standalone/.next/server/chunks/1738.js +1 -1
- package/.next/standalone/.next/server/chunks/2068.js +47 -10
- package/.next/standalone/.next/server/chunks/210.js +3 -3
- package/.next/standalone/.next/server/chunks/2151.js +31 -1
- package/.next/standalone/.next/server/chunks/2207.js +1 -0
- package/.next/standalone/.next/server/chunks/2447.js +10 -5
- package/.next/standalone/.next/server/chunks/2471.js +45 -45
- package/.next/standalone/.next/server/chunks/2504.js +1 -1
- package/.next/standalone/.next/server/chunks/2695.js +17 -17
- package/.next/standalone/.next/server/chunks/3042.js +24 -16
- package/.next/standalone/.next/server/chunks/{4540.js → 309.js} +104 -38
- package/.next/standalone/.next/server/chunks/{2350.js → 3272.js} +104 -37
- package/.next/standalone/.next/server/chunks/3399.js +526 -526
- package/.next/standalone/.next/server/chunks/3524.js +150 -67
- package/.next/standalone/.next/server/chunks/3566.js +1 -1
- package/.next/standalone/.next/server/chunks/4189.js +946 -0
- package/.next/standalone/.next/server/chunks/4433.js +146 -146
- package/.next/standalone/.next/server/chunks/4508.js +3 -3
- package/.next/standalone/.next/server/chunks/4588.js +1 -0
- package/.next/standalone/.next/server/chunks/46.js +78 -28
- package/.next/standalone/.next/server/chunks/466.js +12 -0
- package/.next/standalone/.next/server/chunks/4868.js +206 -206
- package/.next/standalone/.next/server/chunks/4992.js +13 -0
- package/.next/standalone/.next/server/chunks/5120.js +963 -0
- package/.next/standalone/.next/server/chunks/5701.js +1 -1
- package/.next/standalone/.next/server/chunks/5900.js +1 -1
- package/.next/standalone/.next/server/chunks/5908.js +63 -42
- package/.next/standalone/.next/server/chunks/6142.js +10 -2
- package/.next/standalone/.next/server/chunks/6210.js +1 -0
- package/.next/standalone/.next/server/chunks/6213.js +1 -1
- package/.next/standalone/.next/server/chunks/6649.js +3 -3
- package/.next/standalone/.next/server/chunks/6703.js +3 -3
- package/.next/standalone/.next/server/chunks/7445.js +1 -0
- package/.next/standalone/.next/server/chunks/8067.js +12 -0
- package/.next/standalone/.next/server/chunks/8461.js +24 -17
- package/.next/standalone/.next/server/chunks/8558.js +1 -1
- package/.next/standalone/.next/server/chunks/8724.js +1 -1
- package/.next/standalone/.next/server/chunks/8849.js +91 -91
- package/.next/standalone/.next/server/chunks/9032.js +4 -3
- package/.next/standalone/.next/server/chunks/{2563.js → 9164.js} +33389 -31418
- package/.next/standalone/.next/server/chunks/9237.js +396 -396
- package/.next/standalone/.next/server/chunks/{9640.js → 9304.js} +1672 -575
- package/.next/standalone/.next/server/chunks/9406.js +1 -1
- package/.next/standalone/.next/server/chunks/9590.js +68 -18
- package/.next/standalone/.next/server/chunks/9824.js +98 -98
- package/.next/standalone/.next/server/chunks/9826.js +1 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware.js +486 -415
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/preview-props.json +3 -3
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{1395-a340fb0a345382a4.js → 1395-e4a99912b8f83044.js} +13 -1
- package/.next/standalone/.next/static/chunks/app/_global-error/{page-36cb8b428b38b26a.js → page-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/{page-7017f07f8a7a083c.js → page-04748847c6ff866f.js} +1013 -585
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/css/{d80058f0b9b41c09.css → 2669e8744cc8c212.css} +2 -2
- package/.next/standalone/docs/adoption/changesets.json +358 -0
- package/.next/standalone/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/.next/standalone/package.json +3 -3
- package/CHANGELOG.md +44 -0
- package/api/client.ts +9 -0
- package/api/types.ts +29 -0
- package/app/api/v1/lifecycle/adoption/route.ts +14 -2
- package/app/api/v1/models/[name]/compact-threads/route.ts +14 -11
- package/app/api/v1/threads/[thread_id]/activity/route.ts +19 -0
- package/app/api/v1/threads/[thread_id]/context-pin/route.test.ts +1 -0
- package/app/api/v1/threads/[thread_id]/context-pin/route.ts +2 -1
- package/app/api/v1/threads/[thread_id]/route.ts +5 -1
- package/app/api/v1/threads/[thread_id]/run/route.ts +0 -1
- package/components/chat/ChatView.tsx +52 -11
- package/components/chat/ContextBoundary.test.tsx +68 -1
- package/components/chat/ContextBoundary.tsx +92 -13
- package/components/chat/MessageBubble.tsx +12 -0
- package/components/chat/MessageList.test.tsx +31 -0
- package/components/chat/MessageList.tsx +49 -28
- package/components/chat/ToolList.test.tsx +92 -16
- package/components/chat/ToolList.tsx +59 -4
- package/components/chat/chat-helpers.test.tsx +24 -1
- package/components/chat/chat-helpers.ts +47 -4
- package/components/chat/useThreadActivity.test.tsx +113 -0
- package/components/chat/useThreadActivity.ts +94 -0
- package/components/chat/useThreadData.ts +16 -16
- package/components/chat/workflow-step-retry.ts +25 -0
- package/components/integrations/NetworkSection.tsx +2 -2
- package/components/ui/BootScreen.tsx +17 -0
- package/components/ui/WorkflowChecklist.tsx +71 -33
- package/hooks/useSSE.ts +28 -3
- package/lib/agents/citation-checker.test.ts +40 -2
- package/lib/agents/citation-checker.ts +56 -11
- package/lib/agents/compaction-pipeline.test.ts +202 -0
- package/lib/agents/compaction-pipeline.ts +483 -0
- package/lib/agents/context-boundary.ts +5 -6
- package/lib/agents/conversation-summary.ts +37 -21
- package/lib/agents/instruction-edits.test.ts +120 -0
- package/lib/agents/instruction-edits.ts +65 -42
- package/lib/agents/prepare/history-window.test.ts +18 -0
- package/lib/agents/prepare/history-window.ts +11 -2
- package/lib/agents/prepare/request.ts +4 -2
- package/lib/agents/prepare/system-prompt.test.ts +49 -0
- package/lib/agents/prepare/system-prompt.ts +16 -5
- package/lib/agents/prompt-registry.test.ts +5 -140
- package/lib/agents/prompt-registry.ts +45 -1
- package/lib/agents/prompt-variants.ts +146 -0
- package/lib/agents/proposals.test.ts +76 -0
- package/lib/agents/proposals.ts +13 -5
- package/lib/agents/run-registry.test.ts +22 -0
- package/lib/agents/run-registry.ts +29 -0
- package/lib/agents/run-thread.auto-boundary.test.ts +125 -5
- package/lib/agents/run-thread.retry.test.ts +67 -1
- package/lib/agents/run-thread.ts +110 -10
- package/lib/agents/sqlite-checkpoint-saver.test.ts +91 -0
- package/lib/agents/thread-activity.test.ts +31 -0
- package/lib/agents/thread-activity.ts +27 -0
- package/lib/agents/thread-compaction-state.test.ts +82 -0
- package/lib/agents/thread-compaction-state.ts +121 -0
- package/lib/agents/thread-compaction.test.ts +83 -4
- package/lib/agents/thread-compaction.ts +34 -11
- package/lib/agents/warm-summary-background.test.ts +219 -5
- package/lib/agents/warm-summary-background.ts +346 -143
- package/lib/agents/warm-topics.test.ts +191 -0
- package/lib/agents/warm-topics.ts +317 -0
- package/lib/agents/workflow-step-retry.test.ts +96 -0
- package/lib/agents/workflow-step-retry.ts +216 -0
- package/lib/api/browser-control.ts +0 -3
- package/lib/bridges/dispatcher.ts +1 -0
- package/lib/bridges/message-role.test.ts +81 -0
- package/lib/bridges/message-role.ts +23 -10
- package/lib/bridges/types.ts +6 -0
- package/lib/bridges/whatsapp-link.test.ts +32 -0
- package/lib/bridges/whatsapp-link.ts +21 -0
- package/lib/bridges/whatsapp.inbound.test.ts +239 -0
- package/lib/bridges/whatsapp.sender.test.ts +80 -1
- package/lib/bridges/whatsapp.ts +76 -38
- package/lib/db/migrations.ts +5 -0
- package/lib/env/config.ts +2 -0
- package/lib/env/schema.ts +12 -0
- package/lib/lifecycle/changeset-build.test.ts +93 -0
- package/lib/lifecycle/changeset-build.ts +210 -0
- package/lib/lifecycle/changesets.test.ts +101 -0
- package/lib/lifecycle/changesets.ts +166 -0
- package/lib/lifecycle/surface-collect.test.ts +88 -0
- package/lib/lifecycle/surface-collect.ts +64 -0
- package/lib/lifecycle/surface-snapshot.test.ts +104 -0
- package/lib/lifecycle/surface-snapshot.ts +210 -0
- package/lib/memory/record.ts +0 -2
- package/lib/pricing/snapshot.test.ts +70 -0
- package/lib/pricing/snapshot.ts +10 -2
- package/lib/providers/external.ts +0 -2
- package/lib/proxy/dispatcher.test.ts +119 -1
- package/lib/proxy/dispatcher.ts +22 -9
- package/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/lib/stores/agent-configs.ts +10 -5
- package/lib/stores/bridges.test.ts +81 -0
- package/lib/stores/bridges.ts +9 -8
- package/lib/stores/proxy-config.test.ts +120 -0
- package/lib/stores/proxy-config.ts +22 -4
- package/lib/stores/threads.test.ts +9 -0
- package/lib/stores/threads.ts +33 -19
- package/lib/stores/version-adoption.test.ts +96 -0
- package/lib/stores/version-adoption.ts +239 -26
- package/lib/stores/workflow-progress.ts +3 -0
- package/lib/tools/communications/calendar.test.ts +43 -2
- package/lib/tools/communications/calendar.ts +2 -0
- package/lib/tools/communications/gmail.test.ts +51 -1
- package/lib/tools/communications/gmail.ts +44 -2
- package/lib/tools/communications/ms-todo.ts +0 -7
- package/lib/tools/communications/outlook-calendar.ts +2 -0
- package/lib/tools/communications/outlook.test.ts +33 -2
- package/lib/tools/communications/outlook.ts +2 -0
- package/lib/tools/filesystem/edit-match.test.ts +133 -0
- package/lib/tools/filesystem/edit-match.ts +7 -2
- package/lib/tools/general/memory.ts +1 -1
- package/lib/tools/general/workflow-progress.ts +2 -0
- package/lib/tools/runtime/catalog.ts +1 -25
- package/lib/tools/support/result-refs.test.ts +131 -0
- package/lib/tools/support/result-refs.ts +41 -9
- package/lib/triggers/registry.ts +0 -4
- package/lib/utils/source-link.test.ts +51 -0
- package/lib/utils/source-link.ts +45 -0
- package/package.json +3 -3
- package/scripts/install-to-system.ps1 +39 -11
- package/scripts/install-to-system.sh +37 -3
- package/.next/standalone/.next/server/chunks/3979.js +0 -581
- package/.next/standalone/.next/server/chunks/5936.js +0 -594
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-36cb8b428b38b26a.js +0 -17
- /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → hwujW4hR1b-r3k5WdMxZO}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → hwujW4hR1b-r3k5WdMxZO}/_ssgManifest.js +0 -0
|
@@ -187,826 +187,833 @@ module.exports = require("node:os");
|
|
|
187
187
|
|
|
188
188
|
/***/ }),
|
|
189
189
|
|
|
190
|
-
/***/
|
|
190
|
+
/***/ 51455:
|
|
191
|
+
/***/ ((module) => {
|
|
192
|
+
|
|
193
|
+
module.exports = require("node:fs/promises");
|
|
194
|
+
|
|
195
|
+
/***/ }),
|
|
196
|
+
|
|
197
|
+
/***/ 55511:
|
|
198
|
+
/***/ ((module) => {
|
|
199
|
+
|
|
200
|
+
module.exports = require("crypto");
|
|
201
|
+
|
|
202
|
+
/***/ }),
|
|
203
|
+
|
|
204
|
+
/***/ 55591:
|
|
205
|
+
/***/ ((module) => {
|
|
206
|
+
|
|
207
|
+
module.exports = require("https");
|
|
208
|
+
|
|
209
|
+
/***/ }),
|
|
210
|
+
|
|
211
|
+
/***/ 55639:
|
|
191
212
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
192
213
|
|
|
193
214
|
__webpack_require__.r(__webpack_exports__);
|
|
194
215
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
195
|
-
/* harmony export */
|
|
196
|
-
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
197
|
-
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
198
|
-
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
199
|
-
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
200
|
-
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
216
|
+
/* harmony export */ GET: () => (/* binding */ GET)
|
|
201
217
|
/* harmony export */ });
|
|
202
|
-
/* harmony import */ var
|
|
203
|
-
/* harmony import */ var
|
|
204
|
-
/* harmony import */ var
|
|
205
|
-
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
206
|
-
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__);
|
|
207
|
-
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
|
|
208
|
-
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__);
|
|
209
|
-
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
|
|
210
|
-
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__);
|
|
211
|
-
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
|
|
212
|
-
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__);
|
|
213
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
214
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__);
|
|
215
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
216
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__);
|
|
217
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
218
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__);
|
|
219
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
220
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__);
|
|
221
|
-
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
222
|
-
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
223
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
224
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__);
|
|
225
|
-
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
226
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
227
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
228
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
229
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__);
|
|
230
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
231
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__);
|
|
232
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
233
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__);
|
|
218
|
+
/* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
219
|
+
/* harmony import */ var _lib_stores_scheduled_tasks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74891);
|
|
220
|
+
/* harmony import */ var _response__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18156);
|
|
234
221
|
|
|
235
222
|
|
|
236
223
|
|
|
224
|
+
function GET(req) {
|
|
225
|
+
const url = new URL(req.url);
|
|
226
|
+
const agent_id = url.searchParams.get("agent_id") ?? undefined;
|
|
227
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json((0,_lib_stores_scheduled_tasks__WEBPACK_IMPORTED_MODULE_1__/* .listScheduledTasks */ .G3)(agent_id).map(_response__WEBPACK_IMPORTED_MODULE_2__/* .rowResponse */ .W));
|
|
228
|
+
}
|
|
237
229
|
|
|
238
230
|
|
|
231
|
+
/***/ }),
|
|
239
232
|
|
|
233
|
+
/***/ 57075:
|
|
234
|
+
/***/ ((module) => {
|
|
240
235
|
|
|
236
|
+
module.exports = require("node:stream");
|
|
241
237
|
|
|
238
|
+
/***/ }),
|
|
242
239
|
|
|
240
|
+
/***/ 57975:
|
|
241
|
+
/***/ ((module) => {
|
|
243
242
|
|
|
243
|
+
module.exports = require("node:util");
|
|
244
244
|
|
|
245
|
+
/***/ }),
|
|
245
246
|
|
|
247
|
+
/***/ 63033:
|
|
248
|
+
/***/ ((module) => {
|
|
246
249
|
|
|
250
|
+
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
247
251
|
|
|
252
|
+
/***/ }),
|
|
248
253
|
|
|
254
|
+
/***/ 73024:
|
|
255
|
+
/***/ ((module) => {
|
|
249
256
|
|
|
257
|
+
module.exports = require("node:fs");
|
|
250
258
|
|
|
259
|
+
/***/ }),
|
|
251
260
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
const nextConfigOutput = "standalone"
|
|
255
|
-
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
256
|
-
definition: {
|
|
257
|
-
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
258
|
-
page: "/api/v1/scheduled-tasks/route",
|
|
259
|
-
pathname: "/api/v1/scheduled-tasks",
|
|
260
|
-
filename: "route",
|
|
261
|
-
bundlePath: "app/api/v1/scheduled-tasks/route"
|
|
262
|
-
},
|
|
263
|
-
distDir: ".next" || 0,
|
|
264
|
-
relativeProjectDir: false || '',
|
|
265
|
-
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/scheduled-tasks/route.ts",
|
|
266
|
-
nextConfigOutput,
|
|
267
|
-
// The lazy require factory ensures that:
|
|
268
|
-
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
269
|
-
// correctly attributing module load time to application-code rather than
|
|
270
|
-
// framework internals.
|
|
271
|
-
// - In all modes: async modules (route files with top-level await) are
|
|
272
|
-
// handled correctly — require() returns a Promise for such modules, which
|
|
273
|
-
// ensureUserland() awaits before the first request is handled.
|
|
274
|
-
userland: ()=>__webpack_require__(55639),
|
|
275
|
-
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
276
|
-
// server HMR updates are picked up without re-executing the entry chunk.
|
|
277
|
-
// Using require() (synchronous) avoids adding async overhead that would be
|
|
278
|
-
// incorrectly attributed to application-code time in devRequestTiming.
|
|
279
|
-
... false ? 0 : {}
|
|
280
|
-
});
|
|
281
|
-
// Pull out the exports that we need to expose from the module. This should
|
|
282
|
-
// be eliminated when we've moved the other routes to the new format. These
|
|
283
|
-
// are used to hook into the route.
|
|
284
|
-
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
285
|
-
function patchFetch() {
|
|
286
|
-
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
287
|
-
workAsyncStorage,
|
|
288
|
-
workUnitAsyncStorage
|
|
289
|
-
});
|
|
290
|
-
}
|
|
261
|
+
/***/ 74891:
|
|
262
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
291
263
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
264
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
265
|
+
/* harmony export */ $v: () => (/* binding */ markTasksDeferred),
|
|
266
|
+
/* harmony export */ Ar: () => (/* binding */ deleteScheduledTask),
|
|
267
|
+
/* harmony export */ Dw: () => (/* binding */ getScheduledTask),
|
|
268
|
+
/* harmony export */ G3: () => (/* binding */ listScheduledTasks),
|
|
269
|
+
/* harmony export */ QX: () => (/* binding */ computeNextRun),
|
|
270
|
+
/* harmony export */ iR: () => (/* binding */ updateScheduledTask),
|
|
271
|
+
/* harmony export */ ix: () => (/* binding */ markTaskRan),
|
|
272
|
+
/* harmony export */ n7: () => (/* binding */ createScheduledTask),
|
|
273
|
+
/* harmony export */ zO: () => (/* binding */ getDueTasks)
|
|
274
|
+
/* harmony export */ });
|
|
275
|
+
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77598);
|
|
276
|
+
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(node_crypto__WEBPACK_IMPORTED_MODULE_0__);
|
|
277
|
+
/* harmony import */ var cron_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6299);
|
|
278
|
+
/* harmony import */ var cron_parser__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cron_parser__WEBPACK_IMPORTED_MODULE_1__);
|
|
279
|
+
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46);
|
|
280
|
+
/* harmony import */ var _reaction_shared__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93348);
|
|
281
|
+
/* harmony import */ var _lib_utils_error__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22032);
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
const now = ()=>new Date().toISOString();
|
|
288
|
+
function computeNextRun(kind, schedule, after = new Date()) {
|
|
289
|
+
if (kind === "once") {
|
|
290
|
+
const ts = new Date(schedule);
|
|
291
|
+
if (Number.isNaN(ts.getTime())) throw new Error(`Invalid ISO timestamp: ${schedule}`);
|
|
292
|
+
return ts;
|
|
306
293
|
}
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
srcPage,
|
|
310
|
-
multiZoneDraftMode
|
|
294
|
+
const it = cron_parser__WEBPACK_IMPORTED_MODULE_1__.CronExpressionParser.parse(schedule, {
|
|
295
|
+
currentDate: after
|
|
311
296
|
});
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
297
|
+
return it.next().toDate();
|
|
298
|
+
}
|
|
299
|
+
function createScheduledTask(input) {
|
|
300
|
+
const id = input.id ?? (0,node_crypto__WEBPACK_IMPORTED_MODULE_0__.randomUUID)();
|
|
301
|
+
const t = now();
|
|
302
|
+
const next = computeNextRun(input.kind, input.schedule).toISOString();
|
|
303
|
+
const silent = input.silent ? 1 : 0;
|
|
304
|
+
const reaction = (0,_reaction_shared__WEBPACK_IMPORTED_MODULE_3__/* .resolveReaction */ .mM)({
|
|
305
|
+
reaction_kind: input.reaction_kind,
|
|
306
|
+
// Scheduled tasks don't carry a reaction_prompt override — the firing
|
|
307
|
+
// prompt is `input.prompt` itself when kind='agent_prompt'. Pass null
|
|
308
|
+
// so resolveReaction normalises it consistently.
|
|
309
|
+
reaction_prompt: null,
|
|
310
|
+
reaction_script: input.reaction_script,
|
|
311
|
+
reaction_script_args: input.reaction_script_args
|
|
312
|
+
});
|
|
313
|
+
if (reaction.kind === "agent_prompt" && !input.prompt) {
|
|
314
|
+
throw new Error("prompt is required when reaction_kind='agent_prompt'");
|
|
317
315
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
//
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
316
|
+
// For kind='script' we still need a non-NULL value in the prompt column
|
|
317
|
+
// (NOT NULL constraint stays). Empty string is the agreed sentinel; the
|
|
318
|
+
// discriminator decides whether prompt is read.
|
|
319
|
+
const prompt = reaction.kind === "script" ? input.prompt ?? "" : input.prompt;
|
|
320
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare(`INSERT INTO scheduled_tasks
|
|
321
|
+
(id, agent_id, prompt, description, kind, schedule, next_run_at, last_run_at, last_error, enabled, silent,
|
|
322
|
+
reaction_kind, reaction_script, reaction_script_args, created_at, updated_at)
|
|
323
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, NULL, NULL, 1, ?, ?, ?, ?, ?, ?)`).run(id, input.agent_id, prompt, input.description ?? null, input.kind, input.schedule, next, silent, reaction.kind, reaction.script, reaction.scriptArgs, t, t);
|
|
324
|
+
return {
|
|
325
|
+
id,
|
|
326
|
+
agent_id: input.agent_id,
|
|
327
|
+
prompt,
|
|
328
|
+
description: input.description ?? null,
|
|
329
|
+
kind: input.kind,
|
|
330
|
+
schedule: input.schedule,
|
|
331
|
+
next_run_at: next,
|
|
332
|
+
last_run_at: null,
|
|
333
|
+
last_error: null,
|
|
334
|
+
enabled: 1,
|
|
335
|
+
silent,
|
|
336
|
+
reaction_kind: reaction.kind,
|
|
337
|
+
reaction_script: reaction.script,
|
|
338
|
+
reaction_script_args: reaction.scriptArgs,
|
|
339
|
+
created_at: t,
|
|
340
|
+
updated_at: t
|
|
331
341
|
};
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
342
|
+
}
|
|
343
|
+
function listScheduledTasks(agentId) {
|
|
344
|
+
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)();
|
|
345
|
+
const rows = agentId ? db.prepare("SELECT * FROM scheduled_tasks WHERE agent_id=? ORDER BY next_run_at ASC").all(agentId) : db.prepare("SELECT * FROM scheduled_tasks ORDER BY next_run_at ASC").all();
|
|
346
|
+
return rows;
|
|
347
|
+
}
|
|
348
|
+
function getScheduledTask(id) {
|
|
349
|
+
const row = (0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare("SELECT * FROM scheduled_tasks WHERE id=?").get(id);
|
|
350
|
+
return row ?? null;
|
|
351
|
+
}
|
|
352
|
+
function getDueTasks(asOf = new Date()) {
|
|
353
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare("SELECT * FROM scheduled_tasks WHERE enabled=1 AND next_run_at <= ? ORDER BY next_run_at ASC").all(asOf.toISOString());
|
|
354
|
+
}
|
|
355
|
+
function deleteScheduledTask(id) {
|
|
356
|
+
const r = (0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare("DELETE FROM scheduled_tasks WHERE id=?").run(id);
|
|
357
|
+
return r.changes > 0;
|
|
358
|
+
}
|
|
359
|
+
// Patch an existing task. Only the supplied fields are touched; the rest
|
|
360
|
+
// stay as-is. Changing `kind` or `schedule` recomputes `next_run_at`
|
|
361
|
+
// against the new value so the scheduler picks the right next firing.
|
|
362
|
+
function updateScheduledTask(id, patch) {
|
|
363
|
+
const existing = getScheduledTask(id);
|
|
364
|
+
if (!existing) return null;
|
|
365
|
+
const nextKind = patch.kind ?? existing.kind;
|
|
366
|
+
const nextSchedule = patch.schedule ?? existing.schedule;
|
|
367
|
+
const t = now();
|
|
368
|
+
// If the schedule (kind or expression) changed, validate + recompute. If
|
|
369
|
+
// it didn't change we keep the existing next_run_at so a simple prompt
|
|
370
|
+
// edit doesn't accidentally re-arm an already-overdue task.
|
|
371
|
+
let nextRunAt = existing.next_run_at;
|
|
372
|
+
if (patch.kind !== undefined || patch.schedule !== undefined) {
|
|
373
|
+
nextRunAt = computeNextRun(nextKind, nextSchedule, new Date(t)).toISOString();
|
|
358
374
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
},
|
|
376
|
-
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
377
|
-
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
378
|
-
isDraftMode,
|
|
379
|
-
incrementalCache,
|
|
380
|
-
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
381
|
-
cacheLifeProfiles: nextConfig.cacheLife,
|
|
382
|
-
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
383
|
-
waitUntil: ctx.waitUntil,
|
|
384
|
-
onClose: (cb)=>{
|
|
385
|
-
res.on('close', cb);
|
|
386
|
-
},
|
|
387
|
-
onAfterTaskError: undefined
|
|
388
|
-
},
|
|
389
|
-
sharedContext: {
|
|
390
|
-
buildId,
|
|
391
|
-
deploymentId
|
|
392
|
-
}
|
|
393
|
-
};
|
|
394
|
-
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
395
|
-
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
396
|
-
const nextReq = next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.NextRequestAdapter.fromNodeNextRequest(nodeNextReq, (0,next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.signalFromNodeResponse)(res));
|
|
397
|
-
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
398
|
-
try {
|
|
399
|
-
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
400
|
-
res.statusCode = 404;
|
|
401
|
-
// on-demand revalidate always sets this header
|
|
402
|
-
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
403
|
-
res.end('This page could not be found');
|
|
404
|
-
return null;
|
|
405
|
-
}
|
|
406
|
-
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
407
|
-
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
408
|
-
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
409
|
-
// Attempt using provided waitUntil if available
|
|
410
|
-
// if it's not we fallback to sendResponse's handling
|
|
411
|
-
if (pendingWaitUntil) {
|
|
412
|
-
if (ctx.waitUntil) {
|
|
413
|
-
ctx.waitUntil(pendingWaitUntil);
|
|
414
|
-
pendingWaitUntil = undefined;
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
const cacheTags = context.renderOpts.collectedTags;
|
|
418
|
-
// If the request is for a static response, we can cache it so long
|
|
419
|
-
// as it's not edge.
|
|
420
|
-
if (isIsr) {
|
|
421
|
-
const blob = await response.blob();
|
|
422
|
-
// Copy the headers from the response.
|
|
423
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
424
|
-
if (cacheTags) {
|
|
425
|
-
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
426
|
-
}
|
|
427
|
-
if (!headers['content-type'] && blob.type) {
|
|
428
|
-
headers['content-type'] = blob.type;
|
|
429
|
-
}
|
|
430
|
-
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
431
|
-
const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? // route has a numeric `revalidate` but didn't declare an
|
|
432
|
-
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
433
|
-
// build-time fallback in `build/index.ts` so cache entries
|
|
434
|
-
// and the response Cache-Control header agree on the route's
|
|
435
|
-
// effective expire. Routes that opt out of revalidation
|
|
436
|
-
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
437
|
-
// keep `expire: undefined`.
|
|
438
|
-
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
439
|
-
// Create the cache entry for the response.
|
|
440
|
-
const cacheEntry = {
|
|
441
|
-
value: {
|
|
442
|
-
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
443
|
-
status: response.status,
|
|
444
|
-
body: Buffer.from(await blob.arrayBuffer()),
|
|
445
|
-
headers
|
|
446
|
-
},
|
|
447
|
-
cacheControl: {
|
|
448
|
-
revalidate,
|
|
449
|
-
expire
|
|
450
|
-
}
|
|
451
|
-
};
|
|
452
|
-
return cacheEntry;
|
|
453
|
-
} else {
|
|
454
|
-
// send response without caching if not ISR
|
|
455
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
456
|
-
return null;
|
|
457
|
-
}
|
|
458
|
-
} catch (err) {
|
|
459
|
-
// if this is a background revalidate we need to report
|
|
460
|
-
// the request error here as it won't be bubbled
|
|
461
|
-
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
462
|
-
const silenceLog = false;
|
|
463
|
-
await routeModule.onRequestError(req, err, {
|
|
464
|
-
routerKind: 'App Router',
|
|
465
|
-
routePath: srcPage,
|
|
466
|
-
routeType: 'route',
|
|
467
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
468
|
-
isStaticGeneration: cacheKey !== null,
|
|
469
|
-
isOnDemandRevalidate
|
|
470
|
-
})
|
|
471
|
-
}, silenceLog, routerServerContext);
|
|
472
|
-
}
|
|
473
|
-
throw err;
|
|
474
|
-
}
|
|
475
|
-
};
|
|
476
|
-
const handleResponse = async (currentSpan, parentSpan)=>{
|
|
477
|
-
try {
|
|
478
|
-
var _cacheEntry_value;
|
|
479
|
-
const cacheEntry = await routeModule.handleResponse({
|
|
480
|
-
req,
|
|
481
|
-
nextConfig,
|
|
482
|
-
cacheKey,
|
|
483
|
-
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
484
|
-
isFallback: false,
|
|
485
|
-
previewProps,
|
|
486
|
-
prerenderManifest,
|
|
487
|
-
isRoutePPREnabled: false,
|
|
488
|
-
isOnDemandRevalidate,
|
|
489
|
-
revalidateOnlyGenerated,
|
|
490
|
-
responseGenerator,
|
|
491
|
-
waitUntil: ctx.waitUntil,
|
|
492
|
-
isMinimalMode
|
|
493
|
-
});
|
|
494
|
-
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
495
|
-
throw cacheEntry.error;
|
|
496
|
-
}
|
|
497
|
-
// we don't create a cacheEntry for ISR
|
|
498
|
-
if (!isIsr) {
|
|
499
|
-
return;
|
|
500
|
-
}
|
|
501
|
-
if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE) {
|
|
502
|
-
var _cacheEntry_value1;
|
|
503
|
-
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
504
|
-
}
|
|
505
|
-
if (!isMinimalMode) {
|
|
506
|
-
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
507
|
-
}
|
|
508
|
-
// Draft mode should never be cached
|
|
509
|
-
if (isDraftMode) {
|
|
510
|
-
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
511
|
-
}
|
|
512
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
513
|
-
if (!(isMinimalMode && isIsr)) {
|
|
514
|
-
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
515
|
-
}
|
|
516
|
-
// If cache control is already set on the response we don't
|
|
517
|
-
// override it to allow users to customize it via next.config
|
|
518
|
-
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
519
|
-
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
520
|
-
}
|
|
521
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.
|
|
522
|
-
new Response(cacheEntry.value.body, {
|
|
523
|
-
headers,
|
|
524
|
-
status: cacheEntry.value.status || 200
|
|
525
|
-
}));
|
|
526
|
-
return;
|
|
527
|
-
} catch (err) {
|
|
528
|
-
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
529
|
-
const silenceLog = false;
|
|
530
|
-
await routeModule.onRequestError(req, err, {
|
|
531
|
-
routerKind: 'App Router',
|
|
532
|
-
routePath: normalizedSrcPage,
|
|
533
|
-
routeType: 'route',
|
|
534
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
535
|
-
isStaticGeneration: cacheKey !== null,
|
|
536
|
-
isOnDemandRevalidate
|
|
537
|
-
})
|
|
538
|
-
}, silenceLog, routerServerContext);
|
|
539
|
-
}
|
|
540
|
-
// rethrow so that we can handle serving error page
|
|
541
|
-
// If this is during static generation, throw the error again.
|
|
542
|
-
if (isIsr) throw err;
|
|
543
|
-
// Otherwise, send a 500 response unless the original response has
|
|
544
|
-
// already committed. In that case, preserve its status code for
|
|
545
|
-
// telemetry while still recording the failure and terminating a response
|
|
546
|
-
// that the failed pipeline left open.
|
|
547
|
-
if (res.headersSent) {
|
|
548
|
-
if (currentSpan) {
|
|
549
|
-
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
550
|
-
currentSpan.recordException(error);
|
|
551
|
-
currentSpan.setStatus({
|
|
552
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
553
|
-
message: error.message
|
|
554
|
-
});
|
|
555
|
-
currentSpan.setAttribute('error.type', error.name);
|
|
556
|
-
}
|
|
557
|
-
if (!res.writableEnded && !res.destroyed) {
|
|
558
|
-
res.end();
|
|
559
|
-
}
|
|
560
|
-
} else {
|
|
561
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
562
|
-
status: 500
|
|
563
|
-
}));
|
|
564
|
-
}
|
|
565
|
-
return;
|
|
566
|
-
} finally{
|
|
567
|
-
;
|
|
568
|
-
(()=>{
|
|
569
|
-
if (!currentSpan) {
|
|
570
|
-
return;
|
|
571
|
-
}
|
|
572
|
-
let statusCode = res.statusCode;
|
|
573
|
-
currentSpan.setAttributes({
|
|
574
|
-
'http.status_code': statusCode,
|
|
575
|
-
'next.rsc': false
|
|
576
|
-
});
|
|
577
|
-
if (statusCode && statusCode >= 500) {
|
|
578
|
-
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
579
|
-
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
580
|
-
currentSpan.setStatus({
|
|
581
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
582
|
-
});
|
|
583
|
-
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
584
|
-
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
585
|
-
}
|
|
586
|
-
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
587
|
-
// We were unable to get attributes, probably OTEL is not enabled
|
|
588
|
-
if (!rootSpanAttributes) {
|
|
589
|
-
return;
|
|
590
|
-
}
|
|
591
|
-
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
592
|
-
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
593
|
-
return;
|
|
594
|
-
}
|
|
595
|
-
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
596
|
-
const name = `${method} ${route}`;
|
|
597
|
-
currentSpan.setAttributes({
|
|
598
|
-
'next.route': route,
|
|
599
|
-
'http.route': route,
|
|
600
|
-
'next.span_name': name
|
|
601
|
-
});
|
|
602
|
-
currentSpan.updateName(name);
|
|
603
|
-
// Propagate http.route to the parent span if one exists (e.g.
|
|
604
|
-
// a platform-created HTTP span in adapter deployments).
|
|
605
|
-
if (parentSpan && parentSpan !== currentSpan) {
|
|
606
|
-
parentSpan.setAttribute('http.route', route);
|
|
607
|
-
parentSpan.updateName(name);
|
|
608
|
-
}
|
|
609
|
-
})();
|
|
375
|
+
// Compute the reaction columns. Two cases mirroring updateWatcher:
|
|
376
|
+
// 1. patch.reaction_kind is set → fully resolve as a new reaction.
|
|
377
|
+
// 2. patch.reaction_kind is absent → keep existing kind, allow the
|
|
378
|
+
// matching branch's field to be patched.
|
|
379
|
+
let reaction;
|
|
380
|
+
if (patch.reaction_kind !== undefined) {
|
|
381
|
+
reaction = (0,_reaction_shared__WEBPACK_IMPORTED_MODULE_3__/* .resolveReaction */ .mM)({
|
|
382
|
+
reaction_kind: patch.reaction_kind,
|
|
383
|
+
reaction_prompt: null,
|
|
384
|
+
reaction_script: patch.reaction_script,
|
|
385
|
+
reaction_script_args: patch.reaction_script_args
|
|
386
|
+
});
|
|
387
|
+
} else if (existing.reaction_kind === "script") {
|
|
388
|
+
const script = patch.reaction_script === undefined ? existing.reaction_script : patch.reaction_script === null ? null : (0,_reaction_shared__WEBPACK_IMPORTED_MODULE_3__/* .validateReactionScript */ .d9)(patch.reaction_script);
|
|
389
|
+
if (!script) {
|
|
390
|
+
throw new Error("reaction_script cannot be cleared while reaction_kind='script' — switch reaction_kind to 'agent_prompt' instead");
|
|
610
391
|
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
392
|
+
const scriptArgs = patch.reaction_script_args === undefined ? existing.reaction_script_args : (0,_reaction_shared__WEBPACK_IMPORTED_MODULE_3__/* .normaliseReactionScriptArgs */ .Ih)(patch.reaction_script_args);
|
|
393
|
+
reaction = {
|
|
394
|
+
kind: "script",
|
|
395
|
+
prompt: null,
|
|
396
|
+
script,
|
|
397
|
+
scriptArgs
|
|
398
|
+
};
|
|
616
399
|
} else {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
400
|
+
reaction = {
|
|
401
|
+
kind: "agent_prompt",
|
|
402
|
+
prompt: null,
|
|
403
|
+
script: null,
|
|
404
|
+
scriptArgs: null
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
// Prompt column constraint: must be non-NULL. For kind='script' we keep
|
|
408
|
+
// whatever was there (or "" if switching from script with empty existing).
|
|
409
|
+
const nextPrompt = patch.prompt !== undefined ? patch.prompt : reaction.kind === "agent_prompt" && existing.reaction_kind === "script" ? existing.prompt || "" : existing.prompt;
|
|
410
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare(`UPDATE scheduled_tasks SET
|
|
411
|
+
agent_id=?, prompt=?, description=?, kind=?, schedule=?, next_run_at=?, enabled=?, silent=?, last_error=?,
|
|
412
|
+
reaction_kind=?, reaction_script=?, reaction_script_args=?, updated_at=?
|
|
413
|
+
WHERE id=?`).run(patch.agent_id === undefined ? existing.agent_id : patch.agent_id, nextPrompt, patch.description === undefined ? existing.description : patch.description, nextKind, nextSchedule, nextRunAt, patch.enabled === undefined ? existing.enabled : patch.enabled ? 1 : 0, patch.silent === undefined ? existing.silent : patch.silent ? 1 : 0, // Clear the last error whenever the user touches the task — they've
|
|
414
|
+
// presumably fixed whatever caused it.
|
|
415
|
+
null, reaction.kind, reaction.script, reaction.scriptArgs, t, id);
|
|
416
|
+
return getScheduledTask(id);
|
|
417
|
+
}
|
|
418
|
+
function markTaskRan(id, kind, schedule, error) {
|
|
419
|
+
const t = now();
|
|
420
|
+
if (kind === "once") {
|
|
421
|
+
// One-shot tasks delete themselves after firing.
|
|
422
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare("DELETE FROM scheduled_tasks WHERE id=?").run(id);
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
let nextRun;
|
|
426
|
+
try {
|
|
427
|
+
nextRun = computeNextRun(kind, schedule, new Date(t)).toISOString();
|
|
428
|
+
} catch (e) {
|
|
429
|
+
// Invalid cron — disable the task to avoid a tight error loop.
|
|
430
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare("UPDATE scheduled_tasks SET enabled=0, last_run_at=?, last_error=?, updated_at=? WHERE id=?").run(t, `Cron parse failed: ${(0,_lib_utils_error__WEBPACK_IMPORTED_MODULE_4__/* .errorMessage */ .g)(e)}`, t, id);
|
|
431
|
+
return;
|
|
626
432
|
}
|
|
433
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare("UPDATE scheduled_tasks SET last_run_at=?, last_error=?, next_run_at=?, updated_at=? WHERE id=?").run(t, error ?? null, nextRun, t, id);
|
|
434
|
+
}
|
|
435
|
+
// Stamp `last_error` on due tasks the scheduler cannot run right now
|
|
436
|
+
// (currently: at-rest key locked). Does NOT advance next_run_at, so the
|
|
437
|
+
// rows stay due and fire as soon as the blocker clears. Only updates
|
|
438
|
+
// rows whose last_error differs, so repeated locked ticks don't churn
|
|
439
|
+
// updated_at or rewrite the row on every poll.
|
|
440
|
+
function markTasksDeferred(ids, reason) {
|
|
441
|
+
if (ids.length === 0) return 0;
|
|
442
|
+
const t = now();
|
|
443
|
+
const placeholders = ids.map(()=>"?").join(",");
|
|
444
|
+
const r = (0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare(`UPDATE scheduled_tasks SET last_error=?, updated_at=?
|
|
445
|
+
WHERE id IN (${placeholders}) AND (last_error IS NULL OR last_error != ?)`).run(reason, t, ...ids, reason);
|
|
446
|
+
return Number(r.changes ?? 0);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
/***/ }),
|
|
451
|
+
|
|
452
|
+
/***/ 75919:
|
|
453
|
+
/***/ ((module) => {
|
|
454
|
+
|
|
455
|
+
module.exports = require("node:worker_threads");
|
|
456
|
+
|
|
457
|
+
/***/ }),
|
|
458
|
+
|
|
459
|
+
/***/ 76760:
|
|
460
|
+
/***/ ((module) => {
|
|
461
|
+
|
|
462
|
+
module.exports = require("node:path");
|
|
463
|
+
|
|
464
|
+
/***/ }),
|
|
465
|
+
|
|
466
|
+
/***/ 77030:
|
|
467
|
+
/***/ ((module) => {
|
|
468
|
+
|
|
469
|
+
module.exports = require("node:net");
|
|
470
|
+
|
|
471
|
+
/***/ }),
|
|
472
|
+
|
|
473
|
+
/***/ 77598:
|
|
474
|
+
/***/ ((module) => {
|
|
475
|
+
|
|
476
|
+
module.exports = require("node:crypto");
|
|
477
|
+
|
|
478
|
+
/***/ }),
|
|
479
|
+
|
|
480
|
+
/***/ 79428:
|
|
481
|
+
/***/ ((module) => {
|
|
482
|
+
|
|
483
|
+
module.exports = require("buffer");
|
|
484
|
+
|
|
485
|
+
/***/ }),
|
|
486
|
+
|
|
487
|
+
/***/ 79748:
|
|
488
|
+
/***/ ((module) => {
|
|
489
|
+
|
|
490
|
+
module.exports = require("fs/promises");
|
|
491
|
+
|
|
492
|
+
/***/ }),
|
|
493
|
+
|
|
494
|
+
/***/ 79876:
|
|
495
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
496
|
+
|
|
497
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
498
|
+
/* harmony export */ IT: () => (/* binding */ getScript),
|
|
499
|
+
/* harmony export */ Pl: () => (/* binding */ REACTION_SCRIPT_PREFIX),
|
|
500
|
+
/* harmony export */ S$: () => (/* binding */ listReactionScripts),
|
|
501
|
+
/* harmony export */ tX: () => (/* binding */ registerScript),
|
|
502
|
+
/* harmony export */ z3: () => (/* binding */ isReactionScript)
|
|
503
|
+
/* harmony export */ });
|
|
504
|
+
/* unused harmony exports listScripts, __resetScriptRegistry */
|
|
505
|
+
/* harmony import */ var _lib_utils_global_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15559);
|
|
506
|
+
// ADR-0028. In-process script registry for ScriptFiring.
|
|
507
|
+
//
|
|
508
|
+
// Trust model: only built-ins are registered, in code, at module load
|
|
509
|
+
// time. There is NO mechanism to register a script from DB, user input,
|
|
510
|
+
// or shell-out — `script` on a ScriptFiring is just a key into this
|
|
511
|
+
// map. This keeps scripted triggers safe even though they bypass the
|
|
512
|
+
// LLM/thread machinery that gates prompt firings.
|
|
513
|
+
|
|
514
|
+
const state = (0,_lib_utils_global_state__WEBPACK_IMPORTED_MODULE_0__/* .getOrCreateGlobal */ .X)("__jarela_trigger_scripts", ()=>({
|
|
515
|
+
scripts: new Map()
|
|
516
|
+
}));
|
|
517
|
+
function registerScript(name, fn) {
|
|
518
|
+
// Idempotent re-registration is fine — HMR and repeated module imports
|
|
519
|
+
// in dev re-execute the registration calls. We just overwrite with the
|
|
520
|
+
// latest function, matching the trigger handler registry's behaviour.
|
|
521
|
+
state.scripts.set(name, fn);
|
|
522
|
+
}
|
|
523
|
+
function getScript(name) {
|
|
524
|
+
return state.scripts.get(name);
|
|
525
|
+
}
|
|
526
|
+
function listScripts() {
|
|
527
|
+
return Array.from(state.scripts.keys()).sort();
|
|
528
|
+
}
|
|
529
|
+
// ADR-0031 — names beginning with this prefix are user-attachable
|
|
530
|
+
// reaction scripts. Internal plumbing scripts (e.g.
|
|
531
|
+
// `documents.reindex_local_file`) live under other namespaces and are
|
|
532
|
+
// excluded so the watcher schedule surface can't accidentally invoke
|
|
533
|
+
// them.
|
|
534
|
+
const REACTION_SCRIPT_PREFIX = "reaction.";
|
|
535
|
+
function listReactionScripts() {
|
|
536
|
+
return listScripts().filter((n)=>n.startsWith(REACTION_SCRIPT_PREFIX));
|
|
537
|
+
}
|
|
538
|
+
function isReactionScript(name) {
|
|
539
|
+
return name.startsWith(REACTION_SCRIPT_PREFIX) && state.scripts.has(name);
|
|
540
|
+
}
|
|
541
|
+
/** Test-only helper. */ function __resetScriptRegistry() {
|
|
542
|
+
state.scripts.clear();
|
|
627
543
|
}
|
|
628
544
|
|
|
629
|
-
//# sourceMappingURL=app-route.js.map
|
|
630
545
|
|
|
546
|
+
/***/ }),
|
|
547
|
+
|
|
548
|
+
/***/ 80099:
|
|
549
|
+
/***/ ((module) => {
|
|
550
|
+
|
|
551
|
+
module.exports = require("node:sqlite");
|
|
631
552
|
|
|
632
553
|
/***/ }),
|
|
633
554
|
|
|
634
|
-
/***/
|
|
555
|
+
/***/ 80481:
|
|
635
556
|
/***/ ((module) => {
|
|
636
557
|
|
|
637
|
-
module.exports = require("node:
|
|
558
|
+
module.exports = require("node:readline");
|
|
638
559
|
|
|
639
560
|
/***/ }),
|
|
640
561
|
|
|
641
|
-
/***/
|
|
562
|
+
/***/ 81630:
|
|
642
563
|
/***/ ((module) => {
|
|
643
564
|
|
|
644
|
-
module.exports = require("
|
|
565
|
+
module.exports = require("http");
|
|
645
566
|
|
|
646
567
|
/***/ }),
|
|
647
568
|
|
|
648
|
-
/***/
|
|
569
|
+
/***/ 86439:
|
|
649
570
|
/***/ ((module) => {
|
|
650
571
|
|
|
651
|
-
module.exports = require("
|
|
572
|
+
module.exports = require("next/dist/shared/lib/no-fallback-error.external");
|
|
652
573
|
|
|
653
574
|
/***/ }),
|
|
654
575
|
|
|
655
|
-
/***/
|
|
576
|
+
/***/ 92315:
|
|
656
577
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
657
578
|
|
|
658
579
|
__webpack_require__.r(__webpack_exports__);
|
|
659
580
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
660
|
-
/* harmony export */
|
|
581
|
+
/* harmony export */ handler: () => (/* binding */ handler),
|
|
582
|
+
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
583
|
+
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
584
|
+
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
585
|
+
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
586
|
+
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
661
587
|
/* harmony export */ });
|
|
662
|
-
/* harmony import */ var
|
|
663
|
-
/* harmony import */ var
|
|
664
|
-
/* harmony import */ var
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
588
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
|
|
589
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__);
|
|
590
|
+
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
|
|
591
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
592
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__);
|
|
593
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
|
|
594
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__);
|
|
595
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
|
|
596
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__);
|
|
597
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
|
|
598
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__);
|
|
599
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
600
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__);
|
|
601
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
602
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__);
|
|
603
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
604
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__);
|
|
605
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
606
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__);
|
|
607
|
+
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
608
|
+
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
609
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
610
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__);
|
|
611
|
+
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
612
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
613
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
614
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
615
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__);
|
|
616
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
617
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__);
|
|
618
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
619
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__);
|
|
679
620
|
|
|
680
|
-
module.exports = require("node:stream");
|
|
681
621
|
|
|
682
|
-
/***/ }),
|
|
683
622
|
|
|
684
|
-
/***/ 57975:
|
|
685
|
-
/***/ ((module) => {
|
|
686
623
|
|
|
687
|
-
module.exports = require("node:util");
|
|
688
624
|
|
|
689
|
-
/***/ }),
|
|
690
625
|
|
|
691
|
-
/***/ 63033:
|
|
692
|
-
/***/ ((module) => {
|
|
693
626
|
|
|
694
|
-
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
695
627
|
|
|
696
|
-
/***/ }),
|
|
697
628
|
|
|
698
|
-
/***/ 73024:
|
|
699
|
-
/***/ ((module) => {
|
|
700
629
|
|
|
701
|
-
module.exports = require("node:fs");
|
|
702
630
|
|
|
703
|
-
/***/ }),
|
|
704
631
|
|
|
705
|
-
/***/ 74891:
|
|
706
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
707
632
|
|
|
708
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
709
|
-
/* harmony export */ $v: () => (/* binding */ markTasksDeferred),
|
|
710
|
-
/* harmony export */ Ar: () => (/* binding */ deleteScheduledTask),
|
|
711
|
-
/* harmony export */ Dw: () => (/* binding */ getScheduledTask),
|
|
712
|
-
/* harmony export */ G3: () => (/* binding */ listScheduledTasks),
|
|
713
|
-
/* harmony export */ QX: () => (/* binding */ computeNextRun),
|
|
714
|
-
/* harmony export */ iR: () => (/* binding */ updateScheduledTask),
|
|
715
|
-
/* harmony export */ ix: () => (/* binding */ markTaskRan),
|
|
716
|
-
/* harmony export */ n7: () => (/* binding */ createScheduledTask),
|
|
717
|
-
/* harmony export */ zO: () => (/* binding */ getDueTasks)
|
|
718
|
-
/* harmony export */ });
|
|
719
|
-
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77598);
|
|
720
|
-
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(node_crypto__WEBPACK_IMPORTED_MODULE_0__);
|
|
721
|
-
/* harmony import */ var cron_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6299);
|
|
722
|
-
/* harmony import */ var cron_parser__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cron_parser__WEBPACK_IMPORTED_MODULE_1__);
|
|
723
|
-
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46);
|
|
724
|
-
/* harmony import */ var _reaction_shared__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93348);
|
|
725
|
-
/* harmony import */ var _lib_utils_error__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22032);
|
|
726
633
|
|
|
727
634
|
|
|
728
635
|
|
|
729
636
|
|
|
730
637
|
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
638
|
+
// We inject the nextConfigOutput here so that we can use them in the route
|
|
639
|
+
// module.
|
|
640
|
+
const nextConfigOutput = "standalone"
|
|
641
|
+
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
642
|
+
definition: {
|
|
643
|
+
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
644
|
+
page: "/api/v1/scheduled-tasks/route",
|
|
645
|
+
pathname: "/api/v1/scheduled-tasks",
|
|
646
|
+
filename: "route",
|
|
647
|
+
bundlePath: "app/api/v1/scheduled-tasks/route"
|
|
648
|
+
},
|
|
649
|
+
distDir: ".next" || 0,
|
|
650
|
+
relativeProjectDir: false || '',
|
|
651
|
+
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/scheduled-tasks/route.ts",
|
|
652
|
+
nextConfigOutput,
|
|
653
|
+
// The lazy require factory ensures that:
|
|
654
|
+
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
655
|
+
// correctly attributing module load time to application-code rather than
|
|
656
|
+
// framework internals.
|
|
657
|
+
// - In all modes: async modules (route files with top-level await) are
|
|
658
|
+
// handled correctly — require() returns a Promise for such modules, which
|
|
659
|
+
// ensureUserland() awaits before the first request is handled.
|
|
660
|
+
userland: ()=>__webpack_require__(55639),
|
|
661
|
+
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
662
|
+
// server HMR updates are picked up without re-executing the entry chunk.
|
|
663
|
+
// Using require() (synchronous) avoids adding async overhead that would be
|
|
664
|
+
// incorrectly attributed to application-code time in devRequestTiming.
|
|
665
|
+
... false ? 0 : {}
|
|
666
|
+
});
|
|
667
|
+
// Pull out the exports that we need to expose from the module. This should
|
|
668
|
+
// be eliminated when we've moved the other routes to the new format. These
|
|
669
|
+
// are used to hook into the route.
|
|
670
|
+
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
671
|
+
function patchFetch() {
|
|
672
|
+
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
673
|
+
workAsyncStorage,
|
|
674
|
+
workUnitAsyncStorage
|
|
740
675
|
});
|
|
741
|
-
return it.next().toDate();
|
|
742
676
|
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
677
|
+
|
|
678
|
+
async function handler(req, res, ctx) {
|
|
679
|
+
if (ctx.requestMeta) {
|
|
680
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
681
|
+
}
|
|
682
|
+
if (routeModule.isDev) {
|
|
683
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
684
|
+
}
|
|
685
|
+
let srcPage = "/api/v1/scheduled-tasks/route";
|
|
686
|
+
// turbopack doesn't normalize `/index` in the page name
|
|
687
|
+
// so we need to to process dynamic routes properly
|
|
688
|
+
// TODO: fix turbopack providing differing value from webpack
|
|
689
|
+
if (false) {} else if (srcPage === '/index') {
|
|
690
|
+
// we always normalize /index specifically
|
|
691
|
+
srcPage = '/';
|
|
692
|
+
}
|
|
693
|
+
const multiZoneDraftMode = false;
|
|
694
|
+
const prepareResult = await routeModule.prepare(req, res, {
|
|
695
|
+
srcPage,
|
|
696
|
+
multiZoneDraftMode
|
|
756
697
|
});
|
|
757
|
-
if (
|
|
758
|
-
|
|
698
|
+
if (!prepareResult) {
|
|
699
|
+
res.statusCode = 400;
|
|
700
|
+
res.end('Bad Request');
|
|
701
|
+
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
702
|
+
return null;
|
|
759
703
|
}
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
//
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
kind: input.kind,
|
|
774
|
-
schedule: input.schedule,
|
|
775
|
-
next_run_at: next,
|
|
776
|
-
last_run_at: null,
|
|
777
|
-
last_error: null,
|
|
778
|
-
enabled: 1,
|
|
779
|
-
silent,
|
|
780
|
-
reaction_kind: reaction.kind,
|
|
781
|
-
reaction_script: reaction.script,
|
|
782
|
-
reaction_script_args: reaction.scriptArgs,
|
|
783
|
-
created_at: t,
|
|
784
|
-
updated_at: t
|
|
704
|
+
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
705
|
+
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
706
|
+
// Only this route's prerenders can establish ISR or admit generated params.
|
|
707
|
+
const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]) && (routeModule.isDev || (0,next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__.isRouteCacheOwner)(resolvedPathname, routeModule.cacheOwner, prerenderManifest.routes[resolvedPathname]));
|
|
708
|
+
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
709
|
+
const render404 = async ()=>{
|
|
710
|
+
// TODO: should route-module itself handle rendering the 404
|
|
711
|
+
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
712
|
+
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
713
|
+
} else {
|
|
714
|
+
res.end('This page could not be found');
|
|
715
|
+
}
|
|
716
|
+
return null;
|
|
785
717
|
};
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
}
|
|
796
|
-
function getDueTasks(asOf = new Date()) {
|
|
797
|
-
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare("SELECT * FROM scheduled_tasks WHERE enabled=1 AND next_run_at <= ? ORDER BY next_run_at ASC").all(asOf.toISOString());
|
|
798
|
-
}
|
|
799
|
-
function deleteScheduledTask(id) {
|
|
800
|
-
const r = (0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare("DELETE FROM scheduled_tasks WHERE id=?").run(id);
|
|
801
|
-
return r.changes > 0;
|
|
802
|
-
}
|
|
803
|
-
// Patch an existing task. Only the supplied fields are touched; the rest
|
|
804
|
-
// stay as-is. Changing `kind` or `schedule` recomputes `next_run_at`
|
|
805
|
-
// against the new value so the scheduler picks the right next firing.
|
|
806
|
-
function updateScheduledTask(id, patch) {
|
|
807
|
-
const existing = getScheduledTask(id);
|
|
808
|
-
if (!existing) return null;
|
|
809
|
-
const nextKind = patch.kind ?? existing.kind;
|
|
810
|
-
const nextSchedule = patch.schedule ?? existing.schedule;
|
|
811
|
-
const t = now();
|
|
812
|
-
// If the schedule (kind or expression) changed, validate + recompute. If
|
|
813
|
-
// it didn't change we keep the existing next_run_at so a simple prompt
|
|
814
|
-
// edit doesn't accidentally re-arm an already-overdue task.
|
|
815
|
-
let nextRunAt = existing.next_run_at;
|
|
816
|
-
if (patch.kind !== undefined || patch.schedule !== undefined) {
|
|
817
|
-
nextRunAt = computeNextRun(nextKind, nextSchedule, new Date(t)).toISOString();
|
|
718
|
+
if (isIsr && !isDraftMode) {
|
|
719
|
+
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
720
|
+
if (prerenderInfo) {
|
|
721
|
+
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
722
|
+
if (nextConfig.adapterPath) {
|
|
723
|
+
return await render404();
|
|
724
|
+
}
|
|
725
|
+
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
726
|
+
}
|
|
727
|
+
}
|
|
818
728
|
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
729
|
+
let cacheKey = null;
|
|
730
|
+
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
731
|
+
cacheKey = resolvedPathname;
|
|
732
|
+
// ensure /index and / is normalized to one key
|
|
733
|
+
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
734
|
+
}
|
|
735
|
+
// Before rendering (which initializes component tree modules), we have to
|
|
736
|
+
// set the reference manifests to our global store so Server Action's
|
|
737
|
+
// encryption util can access to them at the top level of the page module.
|
|
738
|
+
if (serverActionsManifest && clientReferenceManifest) {
|
|
739
|
+
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
740
|
+
page: srcPage,
|
|
741
|
+
clientReferenceManifest,
|
|
742
|
+
serverActionsManifest
|
|
830
743
|
});
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
744
|
+
}
|
|
745
|
+
const method = req.method || 'GET';
|
|
746
|
+
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
747
|
+
const activeSpan = tracer.getActiveScopeSpan();
|
|
748
|
+
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
749
|
+
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
750
|
+
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
751
|
+
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
752
|
+
globalThis.__incrementalCache = incrementalCache;
|
|
753
|
+
const context = {
|
|
754
|
+
params,
|
|
755
|
+
previewProps,
|
|
756
|
+
renderOpts: {
|
|
757
|
+
experimental: {
|
|
758
|
+
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
759
|
+
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
760
|
+
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
761
|
+
},
|
|
762
|
+
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
763
|
+
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
764
|
+
isDraftMode,
|
|
765
|
+
incrementalCache,
|
|
766
|
+
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
767
|
+
cacheLifeProfiles: nextConfig.cacheLife,
|
|
768
|
+
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
769
|
+
waitUntil: ctx.waitUntil,
|
|
770
|
+
onClose: (cb)=>{
|
|
771
|
+
res.on('close', cb);
|
|
772
|
+
},
|
|
773
|
+
onAfterTaskError: undefined
|
|
774
|
+
},
|
|
775
|
+
sharedContext: {
|
|
776
|
+
buildId,
|
|
777
|
+
deploymentId
|
|
778
|
+
}
|
|
779
|
+
};
|
|
780
|
+
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
781
|
+
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
782
|
+
const nextReq = next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.NextRequestAdapter.fromNodeNextRequest(nodeNextReq, (0,next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.signalFromNodeResponse)(res));
|
|
783
|
+
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
784
|
+
try {
|
|
785
|
+
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
786
|
+
res.statusCode = 404;
|
|
787
|
+
// on-demand revalidate always sets this header
|
|
788
|
+
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
789
|
+
res.end('This page could not be found');
|
|
790
|
+
return null;
|
|
791
|
+
}
|
|
792
|
+
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
793
|
+
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
794
|
+
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
795
|
+
// Attempt using provided waitUntil if available
|
|
796
|
+
// if it's not we fallback to sendResponse's handling
|
|
797
|
+
if (pendingWaitUntil) {
|
|
798
|
+
if (ctx.waitUntil) {
|
|
799
|
+
ctx.waitUntil(pendingWaitUntil);
|
|
800
|
+
pendingWaitUntil = undefined;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
const cacheTags = context.renderOpts.collectedTags;
|
|
804
|
+
// If the request is for a static response, we can cache it so long
|
|
805
|
+
// as it's not edge.
|
|
806
|
+
if (isIsr) {
|
|
807
|
+
const blob = await response.blob();
|
|
808
|
+
// Copy the headers from the response.
|
|
809
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
810
|
+
if (cacheTags) {
|
|
811
|
+
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
812
|
+
}
|
|
813
|
+
if (!headers['content-type'] && blob.type) {
|
|
814
|
+
headers['content-type'] = blob.type;
|
|
815
|
+
}
|
|
816
|
+
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
817
|
+
const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? // route has a numeric `revalidate` but didn't declare an
|
|
818
|
+
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
819
|
+
// build-time fallback in `build/index.ts` so cache entries
|
|
820
|
+
// and the response Cache-Control header agree on the route's
|
|
821
|
+
// effective expire. Routes that opt out of revalidation
|
|
822
|
+
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
823
|
+
// keep `expire: undefined`.
|
|
824
|
+
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
825
|
+
// Create the cache entry for the response.
|
|
826
|
+
const cacheEntry = {
|
|
827
|
+
value: {
|
|
828
|
+
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
829
|
+
status: response.status,
|
|
830
|
+
body: Buffer.from(await blob.arrayBuffer()),
|
|
831
|
+
headers
|
|
832
|
+
},
|
|
833
|
+
cacheControl: {
|
|
834
|
+
revalidate,
|
|
835
|
+
expire
|
|
836
|
+
}
|
|
837
|
+
};
|
|
838
|
+
return cacheEntry;
|
|
839
|
+
} else {
|
|
840
|
+
// send response without caching if not ISR
|
|
841
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
842
|
+
return null;
|
|
843
|
+
}
|
|
844
|
+
} catch (err) {
|
|
845
|
+
// if this is a background revalidate we need to report
|
|
846
|
+
// the request error here as it won't be bubbled
|
|
847
|
+
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
848
|
+
const silenceLog = false;
|
|
849
|
+
await routeModule.onRequestError(req, err, {
|
|
850
|
+
routerKind: 'App Router',
|
|
851
|
+
routePath: srcPage,
|
|
852
|
+
routeType: 'route',
|
|
853
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
854
|
+
isStaticGeneration: cacheKey !== null,
|
|
855
|
+
isOnDemandRevalidate
|
|
856
|
+
})
|
|
857
|
+
}, silenceLog, routerServerContext);
|
|
858
|
+
}
|
|
859
|
+
throw err;
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
const handleResponse = async (currentSpan, parentSpan)=>{
|
|
863
|
+
try {
|
|
864
|
+
var _cacheEntry_value;
|
|
865
|
+
const cacheEntry = await routeModule.handleResponse({
|
|
866
|
+
req,
|
|
867
|
+
nextConfig,
|
|
868
|
+
cacheKey,
|
|
869
|
+
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
870
|
+
isFallback: false,
|
|
871
|
+
previewProps,
|
|
872
|
+
prerenderManifest,
|
|
873
|
+
isRoutePPREnabled: false,
|
|
874
|
+
isOnDemandRevalidate,
|
|
875
|
+
revalidateOnlyGenerated,
|
|
876
|
+
responseGenerator,
|
|
877
|
+
waitUntil: ctx.waitUntil,
|
|
878
|
+
isMinimalMode
|
|
879
|
+
});
|
|
880
|
+
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
881
|
+
throw cacheEntry.error;
|
|
882
|
+
}
|
|
883
|
+
// we don't create a cacheEntry for ISR
|
|
884
|
+
if (!isIsr) {
|
|
885
|
+
return;
|
|
886
|
+
}
|
|
887
|
+
if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE) {
|
|
888
|
+
var _cacheEntry_value1;
|
|
889
|
+
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
890
|
+
}
|
|
891
|
+
if (!isMinimalMode) {
|
|
892
|
+
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
893
|
+
}
|
|
894
|
+
// Draft mode should never be cached
|
|
895
|
+
if (isDraftMode) {
|
|
896
|
+
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
897
|
+
}
|
|
898
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
899
|
+
if (!(isMinimalMode && isIsr)) {
|
|
900
|
+
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
901
|
+
}
|
|
902
|
+
// If cache control is already set on the response we don't
|
|
903
|
+
// override it to allow users to customize it via next.config
|
|
904
|
+
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
905
|
+
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
906
|
+
}
|
|
907
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.
|
|
908
|
+
new Response(cacheEntry.value.body, {
|
|
909
|
+
headers,
|
|
910
|
+
status: cacheEntry.value.status || 200
|
|
911
|
+
}));
|
|
912
|
+
return;
|
|
913
|
+
} catch (err) {
|
|
914
|
+
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
915
|
+
const silenceLog = false;
|
|
916
|
+
await routeModule.onRequestError(req, err, {
|
|
917
|
+
routerKind: 'App Router',
|
|
918
|
+
routePath: normalizedSrcPage,
|
|
919
|
+
routeType: 'route',
|
|
920
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
921
|
+
isStaticGeneration: cacheKey !== null,
|
|
922
|
+
isOnDemandRevalidate
|
|
923
|
+
})
|
|
924
|
+
}, silenceLog, routerServerContext);
|
|
925
|
+
}
|
|
926
|
+
// rethrow so that we can handle serving error page
|
|
927
|
+
// If this is during static generation, throw the error again.
|
|
928
|
+
if (isIsr) throw err;
|
|
929
|
+
// Otherwise, send a 500 response unless the original response has
|
|
930
|
+
// already committed. In that case, preserve its status code for
|
|
931
|
+
// telemetry while still recording the failure and terminating a response
|
|
932
|
+
// that the failed pipeline left open.
|
|
933
|
+
if (res.headersSent) {
|
|
934
|
+
if (currentSpan) {
|
|
935
|
+
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
936
|
+
currentSpan.recordException(error);
|
|
937
|
+
currentSpan.setStatus({
|
|
938
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
939
|
+
message: error.message
|
|
940
|
+
});
|
|
941
|
+
currentSpan.setAttribute('error.type', error.name);
|
|
942
|
+
}
|
|
943
|
+
if (!res.writableEnded && !res.destroyed) {
|
|
944
|
+
res.end();
|
|
945
|
+
}
|
|
946
|
+
} else {
|
|
947
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
948
|
+
status: 500
|
|
949
|
+
}));
|
|
950
|
+
}
|
|
951
|
+
return;
|
|
952
|
+
} finally{
|
|
953
|
+
;
|
|
954
|
+
(()=>{
|
|
955
|
+
if (!currentSpan) {
|
|
956
|
+
return;
|
|
957
|
+
}
|
|
958
|
+
let statusCode = res.statusCode;
|
|
959
|
+
currentSpan.setAttributes({
|
|
960
|
+
'http.status_code': statusCode,
|
|
961
|
+
'next.rsc': false
|
|
962
|
+
});
|
|
963
|
+
if (statusCode && statusCode >= 500) {
|
|
964
|
+
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
965
|
+
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
966
|
+
currentSpan.setStatus({
|
|
967
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
968
|
+
});
|
|
969
|
+
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
970
|
+
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
971
|
+
}
|
|
972
|
+
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
973
|
+
// We were unable to get attributes, probably OTEL is not enabled
|
|
974
|
+
if (!rootSpanAttributes) {
|
|
975
|
+
return;
|
|
976
|
+
}
|
|
977
|
+
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
978
|
+
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
979
|
+
return;
|
|
980
|
+
}
|
|
981
|
+
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
982
|
+
const name = `${method} ${route}`;
|
|
983
|
+
currentSpan.setAttributes({
|
|
984
|
+
'next.route': route,
|
|
985
|
+
'http.route': route,
|
|
986
|
+
'next.span_name': name
|
|
987
|
+
});
|
|
988
|
+
currentSpan.updateName(name);
|
|
989
|
+
// Propagate http.route to the parent span if one exists (e.g.
|
|
990
|
+
// a platform-created HTTP span in adapter deployments).
|
|
991
|
+
if (parentSpan && parentSpan !== currentSpan) {
|
|
992
|
+
parentSpan.setAttribute('http.route', route);
|
|
993
|
+
parentSpan.updateName(name);
|
|
994
|
+
}
|
|
995
|
+
})();
|
|
835
996
|
}
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
scriptArgs
|
|
842
|
-
};
|
|
997
|
+
};
|
|
998
|
+
// TODO: activeSpan code path is for when wrapped by
|
|
999
|
+
// next-server can be removed when this is no longer used
|
|
1000
|
+
if (isWrappedByNextServer && activeSpan) {
|
|
1001
|
+
await handleResponse(activeSpan, undefined);
|
|
843
1002
|
} else {
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
const nextPrompt = patch.prompt !== undefined ? patch.prompt : reaction.kind === "agent_prompt" && existing.reaction_kind === "script" ? existing.prompt || "" : existing.prompt;
|
|
854
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare(`UPDATE scheduled_tasks SET
|
|
855
|
-
agent_id=?, prompt=?, description=?, kind=?, schedule=?, next_run_at=?, enabled=?, silent=?, last_error=?,
|
|
856
|
-
reaction_kind=?, reaction_script=?, reaction_script_args=?, updated_at=?
|
|
857
|
-
WHERE id=?`).run(patch.agent_id === undefined ? existing.agent_id : patch.agent_id, nextPrompt, patch.description === undefined ? existing.description : patch.description, nextKind, nextSchedule, nextRunAt, patch.enabled === undefined ? existing.enabled : patch.enabled ? 1 : 0, patch.silent === undefined ? existing.silent : patch.silent ? 1 : 0, // Clear the last error whenever the user touches the task — they've
|
|
858
|
-
// presumably fixed whatever caused it.
|
|
859
|
-
null, reaction.kind, reaction.script, reaction.scriptArgs, t, id);
|
|
860
|
-
return getScheduledTask(id);
|
|
861
|
-
}
|
|
862
|
-
function markTaskRan(id, kind, schedule, error) {
|
|
863
|
-
const t = now();
|
|
864
|
-
if (kind === "once") {
|
|
865
|
-
// One-shot tasks delete themselves after firing.
|
|
866
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare("DELETE FROM scheduled_tasks WHERE id=?").run(id);
|
|
867
|
-
return;
|
|
868
|
-
}
|
|
869
|
-
let nextRun;
|
|
870
|
-
try {
|
|
871
|
-
nextRun = computeNextRun(kind, schedule, new Date(t)).toISOString();
|
|
872
|
-
} catch (e) {
|
|
873
|
-
// Invalid cron — disable the task to avoid a tight error loop.
|
|
874
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare("UPDATE scheduled_tasks SET enabled=0, last_run_at=?, last_error=?, updated_at=? WHERE id=?").run(t, `Cron parse failed: ${(0,_lib_utils_error__WEBPACK_IMPORTED_MODULE_4__/* .errorMessage */ .g)(e)}`, t, id);
|
|
875
|
-
return;
|
|
1003
|
+
let parentSpan = tracer.getActiveScopeSpan();
|
|
1004
|
+
await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
|
|
1005
|
+
spanName: `${method} ${srcPage}`,
|
|
1006
|
+
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
|
|
1007
|
+
attributes: {
|
|
1008
|
+
'http.method': method,
|
|
1009
|
+
'http.target': req.url
|
|
1010
|
+
}
|
|
1011
|
+
}, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
|
|
876
1012
|
}
|
|
877
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare("UPDATE scheduled_tasks SET last_run_at=?, last_error=?, next_run_at=?, updated_at=? WHERE id=?").run(t, error ?? null, nextRun, t, id);
|
|
878
|
-
}
|
|
879
|
-
// Stamp `last_error` on due tasks the scheduler cannot run right now
|
|
880
|
-
// (currently: at-rest key locked). Does NOT advance next_run_at, so the
|
|
881
|
-
// rows stay due and fire as soon as the blocker clears. Only updates
|
|
882
|
-
// rows whose last_error differs, so repeated locked ticks don't churn
|
|
883
|
-
// updated_at or rewrite the row on every poll.
|
|
884
|
-
function markTasksDeferred(ids, reason) {
|
|
885
|
-
if (ids.length === 0) return 0;
|
|
886
|
-
const t = now();
|
|
887
|
-
const placeholders = ids.map(()=>"?").join(",");
|
|
888
|
-
const r = (0,_lib_db__WEBPACK_IMPORTED_MODULE_2__/* .getDb */ .Lf)().prepare(`UPDATE scheduled_tasks SET last_error=?, updated_at=?
|
|
889
|
-
WHERE id IN (${placeholders}) AND (last_error IS NULL OR last_error != ?)`).run(reason, t, ...ids, reason);
|
|
890
|
-
return Number(r.changes ?? 0);
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
/***/ }),
|
|
895
|
-
|
|
896
|
-
/***/ 75919:
|
|
897
|
-
/***/ ((module) => {
|
|
898
|
-
|
|
899
|
-
module.exports = require("node:worker_threads");
|
|
900
|
-
|
|
901
|
-
/***/ }),
|
|
902
|
-
|
|
903
|
-
/***/ 76760:
|
|
904
|
-
/***/ ((module) => {
|
|
905
|
-
|
|
906
|
-
module.exports = require("node:path");
|
|
907
|
-
|
|
908
|
-
/***/ }),
|
|
909
|
-
|
|
910
|
-
/***/ 77598:
|
|
911
|
-
/***/ ((module) => {
|
|
912
|
-
|
|
913
|
-
module.exports = require("node:crypto");
|
|
914
|
-
|
|
915
|
-
/***/ }),
|
|
916
|
-
|
|
917
|
-
/***/ 79428:
|
|
918
|
-
/***/ ((module) => {
|
|
919
|
-
|
|
920
|
-
module.exports = require("buffer");
|
|
921
|
-
|
|
922
|
-
/***/ }),
|
|
923
|
-
|
|
924
|
-
/***/ 79748:
|
|
925
|
-
/***/ ((module) => {
|
|
926
|
-
|
|
927
|
-
module.exports = require("fs/promises");
|
|
928
|
-
|
|
929
|
-
/***/ }),
|
|
930
|
-
|
|
931
|
-
/***/ 79876:
|
|
932
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
933
|
-
|
|
934
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
935
|
-
/* harmony export */ IT: () => (/* binding */ getScript),
|
|
936
|
-
/* harmony export */ Pl: () => (/* binding */ REACTION_SCRIPT_PREFIX),
|
|
937
|
-
/* harmony export */ S$: () => (/* binding */ listReactionScripts),
|
|
938
|
-
/* harmony export */ tX: () => (/* binding */ registerScript),
|
|
939
|
-
/* harmony export */ z3: () => (/* binding */ isReactionScript)
|
|
940
|
-
/* harmony export */ });
|
|
941
|
-
/* unused harmony exports listScripts, __resetScriptRegistry */
|
|
942
|
-
/* harmony import */ var _lib_utils_global_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15559);
|
|
943
|
-
// ADR-0028. In-process script registry for ScriptFiring.
|
|
944
|
-
//
|
|
945
|
-
// Trust model: only built-ins are registered, in code, at module load
|
|
946
|
-
// time. There is NO mechanism to register a script from DB, user input,
|
|
947
|
-
// or shell-out — `script` on a ScriptFiring is just a key into this
|
|
948
|
-
// map. This keeps scripted triggers safe even though they bypass the
|
|
949
|
-
// LLM/thread machinery that gates prompt firings.
|
|
950
|
-
|
|
951
|
-
const state = (0,_lib_utils_global_state__WEBPACK_IMPORTED_MODULE_0__/* .getOrCreateGlobal */ .X)("__jarela_trigger_scripts", ()=>({
|
|
952
|
-
scripts: new Map()
|
|
953
|
-
}));
|
|
954
|
-
function registerScript(name, fn) {
|
|
955
|
-
// Idempotent re-registration is fine — HMR and repeated module imports
|
|
956
|
-
// in dev re-execute the registration calls. We just overwrite with the
|
|
957
|
-
// latest function, matching the trigger handler registry's behaviour.
|
|
958
|
-
state.scripts.set(name, fn);
|
|
959
|
-
}
|
|
960
|
-
function getScript(name) {
|
|
961
|
-
return state.scripts.get(name);
|
|
962
|
-
}
|
|
963
|
-
function listScripts() {
|
|
964
|
-
return Array.from(state.scripts.keys()).sort();
|
|
965
|
-
}
|
|
966
|
-
// ADR-0031 — names beginning with this prefix are user-attachable
|
|
967
|
-
// reaction scripts. Internal plumbing scripts (e.g.
|
|
968
|
-
// `documents.reindex_local_file`) live under other namespaces and are
|
|
969
|
-
// excluded so the watcher schedule surface can't accidentally invoke
|
|
970
|
-
// them.
|
|
971
|
-
const REACTION_SCRIPT_PREFIX = "reaction.";
|
|
972
|
-
function listReactionScripts() {
|
|
973
|
-
return listScripts().filter((n)=>n.startsWith(REACTION_SCRIPT_PREFIX));
|
|
974
|
-
}
|
|
975
|
-
function isReactionScript(name) {
|
|
976
|
-
return name.startsWith(REACTION_SCRIPT_PREFIX) && state.scripts.has(name);
|
|
977
|
-
}
|
|
978
|
-
/** Test-only helper. */ function __resetScriptRegistry() {
|
|
979
|
-
state.scripts.clear();
|
|
980
1013
|
}
|
|
981
1014
|
|
|
1015
|
+
//# sourceMappingURL=app-route.js.map
|
|
982
1016
|
|
|
983
|
-
/***/ }),
|
|
984
|
-
|
|
985
|
-
/***/ 80099:
|
|
986
|
-
/***/ ((module) => {
|
|
987
|
-
|
|
988
|
-
module.exports = require("node:sqlite");
|
|
989
|
-
|
|
990
|
-
/***/ }),
|
|
991
|
-
|
|
992
|
-
/***/ 80481:
|
|
993
|
-
/***/ ((module) => {
|
|
994
|
-
|
|
995
|
-
module.exports = require("node:readline");
|
|
996
|
-
|
|
997
|
-
/***/ }),
|
|
998
|
-
|
|
999
|
-
/***/ 81630:
|
|
1000
|
-
/***/ ((module) => {
|
|
1001
|
-
|
|
1002
|
-
module.exports = require("http");
|
|
1003
|
-
|
|
1004
|
-
/***/ }),
|
|
1005
|
-
|
|
1006
|
-
/***/ 86439:
|
|
1007
|
-
/***/ ((module) => {
|
|
1008
|
-
|
|
1009
|
-
module.exports = require("next/dist/shared/lib/no-fallback-error.external");
|
|
1010
1017
|
|
|
1011
1018
|
/***/ }),
|
|
1012
1019
|
|
|
@@ -1127,7 +1134,7 @@ module.exports = import("@huggingface/transformers");;
|
|
|
1127
1134
|
var __webpack_require__ = require("../../../../webpack-runtime.js");
|
|
1128
1135
|
__webpack_require__.C(exports);
|
|
1129
1136
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
1130
|
-
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,6299,4992,46], () => (__webpack_exec__(
|
|
1137
|
+
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,6299,4992,46], () => (__webpack_exec__(92315)));
|
|
1131
1138
|
module.exports = __webpack_exports__;
|
|
1132
1139
|
|
|
1133
1140
|
})();
|