@circuitwall/jarela 2.2.1 → 2.3.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 +6 -5
- 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 +93 -93
- package/.next/standalone/.next/server/app/api/v1/access/route.js +169 -169
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +82 -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 +122 -122
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/route.js +100 -100
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/thread/route.js +753 -753
- package/.next/standalone/.next/server/app/api/v1/agents/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +364 -364
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +802 -802
- package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +2 -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 +589 -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 +23 -23
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +30 -30
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +703 -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 +708 -135
- 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 +802 -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 +739 -739
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +1035 -1035
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +679 -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 +804 -804
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js +700 -700
- 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 +784 -784
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +23 -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 +523 -523
- package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +44 -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 +368 -368
- package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/events/route.js +751 -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 +44 -44
- package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +34 -34
- package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +204 -204
- package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +133 -133
- package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +106 -106
- package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +114 -114
- package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +134 -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 +221 -221
- package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +72 -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 +772 -772
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +133 -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 +363 -363
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +233 -233
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +682 -682
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +879 -879
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +108 -108
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +952 -952
- package/.next/standalone/.next/server/app/api/v1/integrations/route.js +216 -216
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +864 -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 +72 -72
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +979 -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 +2 -2
- package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +381 -381
- package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +79 -79
- package/.next/standalone/.next/server/app/api/v1/memory/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +131 -131
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +374 -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 +143 -143
- package/.next/standalone/.next/server/app/api/v1/models/route.js +543 -543
- 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 +507 -507
- 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 +30 -30
- package/.next/standalone/.next/server/app/api/v1/profile/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/providers/route.js +94 -94
- package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +450 -450
- package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/redaction/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +600 -600
- 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 +732 -732
- package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +359 -359
- package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +197 -197
- package/.next/standalone/.next/server/app/api/v1/security/state/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +176 -176
- package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +190 -190
- 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 +770 -770
- package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +115 -115
- package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +327 -327
- package/.next/standalone/.next/server/app/api/v1/skills/route.js +870 -870
- 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 +115 -115
- package/.next/standalone/.next/server/app/api/v1/tasks/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js +1429 -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 +635 -634
- 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 +53 -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 -172
- 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 +908 -908
- 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 +224 -224
- package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +975 -975
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +23 -23
- 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 +1243 -854
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page.js +91 -91
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +6 -5
- package/.next/standalone/.next/server/chunks/{424.js → 1388.js} +335 -986
- 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/210.js +6 -6
- 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/2471.js +28 -28
- 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 +14 -8
- package/.next/standalone/.next/server/chunks/3399.js +1 -1
- 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/{9590.js → 423.js} +8 -3
- package/.next/standalone/.next/server/chunks/4433.js +146 -146
- package/.next/standalone/.next/server/chunks/4508.js +1 -1
- package/.next/standalone/.next/server/chunks/4588.js +1 -0
- package/.next/standalone/.next/server/chunks/46.js +5 -0
- 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/6210.js +1 -0
- package/.next/standalone/.next/server/chunks/6213.js +1 -1
- package/.next/standalone/.next/server/chunks/6649.js +2 -2
- 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 +14 -9
- 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 +6 -5
- package/.next/standalone/.next/server/chunks/{2563.js → 9164.js} +33173 -31461
- package/.next/standalone/.next/server/chunks/9237.js +396 -396
- package/.next/standalone/.next/server/chunks/{9640.js → 9304.js} +1628 -570
- package/.next/standalone/.next/server/chunks/9406.js +1 -1
- 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 +415 -397
- 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-213a623b37226452.js} +1041 -652
- 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 → 312542a5725ba0d5.css} +2 -2
- package/.next/standalone/docs/adoption/changesets.json +309 -0
- package/.next/standalone/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/.next/standalone/package.json +3 -3
- package/CHANGELOG.md +25 -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/components/chat/ChatView.tsx +52 -11
- package/components/chat/ContextBoundary.test.tsx +68 -1
- package/components/chat/ContextBoundary.tsx +92 -13
- 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/ui/BootScreen.tsx +17 -0
- package/components/ui/WorkflowChecklist.tsx +71 -33
- package/hooks/useSSE.ts +28 -3
- package/lib/agents/compaction-pipeline.test.ts +202 -0
- package/lib/agents/compaction-pipeline.ts +483 -0
- package/lib/agents/conversation-summary.ts +37 -21
- 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 -0
- package/lib/agents/prepare/system-prompt.test.ts +39 -0
- package/lib/agents/prepare/system-prompt.ts +8 -3
- 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/run-registry.test.ts +22 -0
- package/lib/agents/run-registry.ts +29 -0
- package/lib/agents/run-thread.retry.test.ts +67 -1
- package/lib/agents/run-thread.ts +86 -1
- 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 +325 -142
- package/lib/agents/warm-topics.test.ts +37 -0
- package/lib/agents/warm-topics.ts +297 -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/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/providers/external.ts +0 -2
- package/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/lib/stores/threads.test.ts +9 -0
- package/lib/stores/threads.ts +21 -11
- 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/ms-todo.ts +0 -7
- 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/triggers/registry.ts +0 -4
- 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 → bMRK5y3ruT7c3WtBfCQOG}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → bMRK5y3ruT7c3WtBfCQOG}/_ssgManifest.js +0 -0
|
@@ -94,884 +94,914 @@ module.exports = require("next/dist/server/app-render/work-async-storage.externa
|
|
|
94
94
|
|
|
95
95
|
/***/ }),
|
|
96
96
|
|
|
97
|
-
/***/
|
|
98
|
-
/***/ ((
|
|
97
|
+
/***/ 29419:
|
|
98
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
__webpack_require__.r(__webpack_exports__);
|
|
101
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
102
|
+
/* harmony export */ handler: () => (/* binding */ handler),
|
|
103
|
+
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
104
|
+
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
105
|
+
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
106
|
+
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
107
|
+
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
108
|
+
/* harmony export */ });
|
|
109
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
|
|
110
|
+
/* 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__);
|
|
111
|
+
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
|
|
112
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
113
|
+
/* 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__);
|
|
114
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
|
|
115
|
+
/* 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__);
|
|
116
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
|
|
117
|
+
/* 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__);
|
|
118
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
|
|
119
|
+
/* 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__);
|
|
120
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
121
|
+
/* 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__);
|
|
122
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
123
|
+
/* 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__);
|
|
124
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
125
|
+
/* 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__);
|
|
126
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
127
|
+
/* 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__);
|
|
128
|
+
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
129
|
+
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
130
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
131
|
+
/* 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__);
|
|
132
|
+
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
133
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
134
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
135
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
136
|
+
/* 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__);
|
|
137
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
138
|
+
/* 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__);
|
|
139
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
140
|
+
/* 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__);
|
|
101
141
|
|
|
102
|
-
/***/ }),
|
|
103
142
|
|
|
104
|
-
/***/ 44870:
|
|
105
|
-
/***/ ((module) => {
|
|
106
143
|
|
|
107
|
-
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
108
144
|
|
|
109
|
-
/***/ }),
|
|
110
145
|
|
|
111
|
-
/***/ 48161:
|
|
112
|
-
/***/ ((module) => {
|
|
113
146
|
|
|
114
|
-
module.exports = require("node:os");
|
|
115
147
|
|
|
116
|
-
/***/ }),
|
|
117
148
|
|
|
118
|
-
/***/ 55511:
|
|
119
|
-
/***/ ((module) => {
|
|
120
149
|
|
|
121
|
-
module.exports = require("crypto");
|
|
122
150
|
|
|
123
|
-
/***/ }),
|
|
124
151
|
|
|
125
|
-
/***/ 63033:
|
|
126
|
-
/***/ ((module) => {
|
|
127
152
|
|
|
128
|
-
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
129
153
|
|
|
130
|
-
/***/ }),
|
|
131
154
|
|
|
132
|
-
/***/ 68564:
|
|
133
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
134
155
|
|
|
135
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
136
|
-
/* harmony export */ AD: () => (/* binding */ startRun),
|
|
137
|
-
/* harmony export */ B1: () => (/* binding */ subscribe),
|
|
138
|
-
/* harmony export */ Cs: () => (/* binding */ waitForRun),
|
|
139
|
-
/* harmony export */ ES: () => (/* binding */ abortAllRuns),
|
|
140
|
-
/* harmony export */ JH: () => (/* binding */ finishRun),
|
|
141
|
-
/* harmony export */ KD: () => (/* binding */ abortRun),
|
|
142
|
-
/* harmony export */ Mh: () => (/* binding */ getRun),
|
|
143
|
-
/* harmony export */ QK: () => (/* binding */ drainSteering),
|
|
144
|
-
/* harmony export */ mq: () => (/* binding */ broadcast),
|
|
145
|
-
/* harmony export */ mx: () => (/* binding */ pushSteering)
|
|
146
|
-
/* harmony export */ });
|
|
147
|
-
/* unused harmony export waitForRunsToSettle */
|
|
148
|
-
/* harmony import */ var _lib_env_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67500);
|
|
149
|
-
/* harmony import */ var _lib_utils_global_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15559);
|
|
150
156
|
|
|
151
157
|
|
|
152
|
-
|
|
153
|
-
//
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
//
|
|
170
|
-
//
|
|
171
|
-
//
|
|
172
|
-
//
|
|
173
|
-
//
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
const fn = (run)=>{
|
|
191
|
-
clearTimeout(timer);
|
|
192
|
-
resolve(run);
|
|
193
|
-
};
|
|
194
|
-
set.add(fn);
|
|
195
|
-
const timer = setTimeout(()=>{
|
|
196
|
-
const cur = waiters.get(thread_id);
|
|
197
|
-
cur?.delete(fn);
|
|
198
|
-
if (cur && cur.size === 0) waiters.delete(thread_id);
|
|
199
|
-
resolve(null);
|
|
200
|
-
}, timeoutMs);
|
|
201
|
-
timer.unref?.();
|
|
158
|
+
|
|
159
|
+
// We inject the nextConfigOutput here so that we can use them in the route
|
|
160
|
+
// module.
|
|
161
|
+
const nextConfigOutput = "standalone"
|
|
162
|
+
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
163
|
+
definition: {
|
|
164
|
+
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
165
|
+
page: "/api/v1/system/abort/route",
|
|
166
|
+
pathname: "/api/v1/system/abort",
|
|
167
|
+
filename: "route",
|
|
168
|
+
bundlePath: "app/api/v1/system/abort/route"
|
|
169
|
+
},
|
|
170
|
+
distDir: ".next" || 0,
|
|
171
|
+
relativeProjectDir: false || '',
|
|
172
|
+
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/system/abort/route.ts",
|
|
173
|
+
nextConfigOutput,
|
|
174
|
+
// The lazy require factory ensures that:
|
|
175
|
+
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
176
|
+
// correctly attributing module load time to application-code rather than
|
|
177
|
+
// framework internals.
|
|
178
|
+
// - In all modes: async modules (route files with top-level await) are
|
|
179
|
+
// handled correctly — require() returns a Promise for such modules, which
|
|
180
|
+
// ensureUserland() awaits before the first request is handled.
|
|
181
|
+
userland: ()=>__webpack_require__(5839),
|
|
182
|
+
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
183
|
+
// server HMR updates are picked up without re-executing the entry chunk.
|
|
184
|
+
// Using require() (synchronous) avoids adding async overhead that would be
|
|
185
|
+
// incorrectly attributed to application-code time in devRequestTiming.
|
|
186
|
+
... false ? 0 : {}
|
|
187
|
+
});
|
|
188
|
+
// Pull out the exports that we need to expose from the module. This should
|
|
189
|
+
// be eliminated when we've moved the other routes to the new format. These
|
|
190
|
+
// are used to hook into the route.
|
|
191
|
+
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
192
|
+
function patchFetch() {
|
|
193
|
+
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
194
|
+
workAsyncStorage,
|
|
195
|
+
workUnitAsyncStorage
|
|
202
196
|
});
|
|
203
197
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
throw new Error(`A run is already active for thread ${thread_id}`);
|
|
198
|
+
|
|
199
|
+
async function handler(req, res, ctx) {
|
|
200
|
+
if (ctx.requestMeta) {
|
|
201
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
209
202
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
203
|
+
if (routeModule.isDev) {
|
|
204
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
205
|
+
}
|
|
206
|
+
let srcPage = "/api/v1/system/abort/route";
|
|
207
|
+
// turbopack doesn't normalize `/index` in the page name
|
|
208
|
+
// so we need to to process dynamic routes properly
|
|
209
|
+
// TODO: fix turbopack providing differing value from webpack
|
|
210
|
+
if (false) {} else if (srcPage === '/index') {
|
|
211
|
+
// we always normalize /index specifically
|
|
212
|
+
srcPage = '/';
|
|
213
|
+
}
|
|
214
|
+
const multiZoneDraftMode = false;
|
|
215
|
+
const prepareResult = await routeModule.prepare(req, res, {
|
|
216
|
+
srcPage,
|
|
217
|
+
multiZoneDraftMode
|
|
218
|
+
});
|
|
219
|
+
if (!prepareResult) {
|
|
220
|
+
res.statusCode = 400;
|
|
221
|
+
res.end('Bad Request');
|
|
222
|
+
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
223
|
+
return null;
|
|
224
|
+
}
|
|
225
|
+
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
226
|
+
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
227
|
+
// Only this route's prerenders can establish ISR or admit generated params.
|
|
228
|
+
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]));
|
|
229
|
+
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
230
|
+
const render404 = async ()=>{
|
|
231
|
+
// TODO: should route-module itself handle rendering the 404
|
|
232
|
+
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
233
|
+
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
234
|
+
} else {
|
|
235
|
+
res.end('This page could not be found');
|
|
236
|
+
}
|
|
237
|
+
return null;
|
|
226
238
|
};
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
239
|
+
if (isIsr && !isDraftMode) {
|
|
240
|
+
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
241
|
+
if (prerenderInfo) {
|
|
242
|
+
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
243
|
+
if (nextConfig.adapterPath) {
|
|
244
|
+
return await render404();
|
|
245
|
+
}
|
|
246
|
+
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
247
|
+
}
|
|
236
248
|
}
|
|
237
249
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
// fan it out to subscribers BEFORE flipping `status` to "error". The order
|
|
244
|
-
// matters: `broadcast()`'s status guard drops any chunk delivered after
|
|
245
|
-
// `finishRun()` has run, so calling finishRun first would silently swallow
|
|
246
|
-
// the error and the client's EventSource would just see the connection
|
|
247
|
-
// close with no terminal event — bubble keeps spinning, no toast. Doing
|
|
248
|
-
// it the other way around lets the client receive a real error event,
|
|
249
|
-
// render a "Run timed out" toast, and (if the consumer wires it up)
|
|
250
|
-
// trigger an auto-retry path. Followed by `done` so the consumer's
|
|
251
|
-
// for-await loop can break cleanly without waiting for an EOF.
|
|
252
|
-
function emitWatchdogTermination(run, code, message) {
|
|
253
|
-
if (run.status !== "running") return;
|
|
254
|
-
// Direct registry mutation so the broadcast goes through the regular
|
|
255
|
-
// path (subscribers + buffer + seq stamp) without re-entering any of
|
|
256
|
-
// the watchdog scheduling. Mirrors broadcast() but bypasses the
|
|
257
|
-
// status check we'd otherwise be racing against.
|
|
258
|
-
run.last_chunk_at = Date.now();
|
|
259
|
-
const errChunk = {
|
|
260
|
-
type: "error",
|
|
261
|
-
data: {
|
|
262
|
-
message,
|
|
263
|
-
code
|
|
264
|
-
}
|
|
265
|
-
};
|
|
266
|
-
if (run.events.length < MAX_BUFFERED) run.events.push(errChunk);
|
|
267
|
-
for (const fn of run.subscribers){
|
|
268
|
-
try {
|
|
269
|
-
fn(errChunk);
|
|
270
|
-
} catch {}
|
|
271
|
-
}
|
|
272
|
-
// Pair with a synthetic `done` so the client's consume() loop breaks
|
|
273
|
-
// on a terminal event rather than waiting for the EventSource to close.
|
|
274
|
-
const doneChunk = {
|
|
275
|
-
type: "done",
|
|
276
|
-
data: {}
|
|
277
|
-
};
|
|
278
|
-
if (run.events.length < MAX_BUFFERED) run.events.push(doneChunk);
|
|
279
|
-
for (const fn of run.subscribers){
|
|
280
|
-
try {
|
|
281
|
-
fn(doneChunk);
|
|
282
|
-
} catch {}
|
|
250
|
+
let cacheKey = null;
|
|
251
|
+
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
252
|
+
cacheKey = resolvedPathname;
|
|
253
|
+
// ensure /index and / is normalized to one key
|
|
254
|
+
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
283
255
|
}
|
|
284
|
-
|
|
285
|
-
//
|
|
286
|
-
//
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
const cur = runs.get(run.thread_id);
|
|
294
|
-
if (cur !== run) return;
|
|
295
|
-
if (run.status !== "running") return;
|
|
296
|
-
const idle = Date.now() - run.last_chunk_at;
|
|
297
|
-
if (idle < idleMs) {
|
|
298
|
-
scheduleIdleWatchdog(run);
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
if (run.inflight_tools.size > 0) {
|
|
302
|
-
// Tool execution in progress — silence here is the tool working,
|
|
303
|
-
// not a wedged provider stream. Skip the kill, re-check in idleMs.
|
|
304
|
-
// The tool_result will bump last_chunk_at when it lands.
|
|
305
|
-
setTimeout(()=>scheduleIdleWatchdog(run), idleMs).unref?.();
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
console.warn(`[run-registry] idle watchdog: force-finishing stalled run for thread ${run.thread_id} after ${idle}ms of no progress`);
|
|
309
|
-
emitWatchdogTermination(run, "run_idle_timeout", `Run timed out — no progress for ${Math.round(idle / 1000)}s. The provider stream went silent before the agent finished. Try again, or split the request into smaller steps.`);
|
|
310
|
-
try {
|
|
311
|
-
run.abort.abort("run_idle_timeout");
|
|
312
|
-
} catch {}
|
|
313
|
-
finishRun(run, "error");
|
|
314
|
-
}, fireIn).unref?.();
|
|
315
|
-
}
|
|
316
|
-
// Wall-clock elapsed minus time spent inside tool calls (both completed and
|
|
317
|
-
// currently in flight). The wall-clock watchdog uses this so a 5-minute
|
|
318
|
-
// shell exec or a slow MCP roundtrip doesn't burn the agent's budget;
|
|
319
|
-
// tools enforce their own timeouts. See ActiveRun.tool_started_at for the
|
|
320
|
-
// rationale.
|
|
321
|
-
function effectiveElapsedMs(run, now) {
|
|
322
|
-
let inflightToolMs = 0;
|
|
323
|
-
for (const startedAt of run.tool_started_at.values()){
|
|
324
|
-
inflightToolMs += Math.max(0, now - startedAt);
|
|
256
|
+
// Before rendering (which initializes component tree modules), we have to
|
|
257
|
+
// set the reference manifests to our global store so Server Action's
|
|
258
|
+
// encryption util can access to them at the top level of the page module.
|
|
259
|
+
if (serverActionsManifest && clientReferenceManifest) {
|
|
260
|
+
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
261
|
+
page: srcPage,
|
|
262
|
+
clientReferenceManifest,
|
|
263
|
+
serverActionsManifest
|
|
264
|
+
});
|
|
325
265
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
const
|
|
330
|
-
const
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
266
|
+
const method = req.method || 'GET';
|
|
267
|
+
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
268
|
+
const activeSpan = tracer.getActiveScopeSpan();
|
|
269
|
+
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
270
|
+
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
271
|
+
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
272
|
+
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
273
|
+
globalThis.__incrementalCache = incrementalCache;
|
|
274
|
+
const context = {
|
|
275
|
+
params,
|
|
276
|
+
previewProps,
|
|
277
|
+
renderOpts: {
|
|
278
|
+
experimental: {
|
|
279
|
+
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
280
|
+
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
281
|
+
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
282
|
+
},
|
|
283
|
+
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
284
|
+
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
285
|
+
isDraftMode,
|
|
286
|
+
incrementalCache,
|
|
287
|
+
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
288
|
+
cacheLifeProfiles: nextConfig.cacheLife,
|
|
289
|
+
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
290
|
+
waitUntil: ctx.waitUntil,
|
|
291
|
+
onClose: (cb)=>{
|
|
292
|
+
res.on('close', cb);
|
|
293
|
+
},
|
|
294
|
+
onAfterTaskError: undefined
|
|
295
|
+
},
|
|
296
|
+
sharedContext: {
|
|
297
|
+
buildId,
|
|
298
|
+
deploymentId
|
|
344
299
|
}
|
|
345
|
-
|
|
346
|
-
|
|
300
|
+
};
|
|
301
|
+
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
302
|
+
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
303
|
+
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));
|
|
304
|
+
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
347
305
|
try {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
// Identity-check: a superseded run must not smear trailing chunks onto
|
|
355
|
-
// the replacement entry in the registry.
|
|
356
|
-
if (runs.get(run.thread_id) !== run) return;
|
|
357
|
-
run.last_chunk_at = Date.now();
|
|
358
|
-
// Heartbeats exist solely to reset the idle watchdog when the provider
|
|
359
|
-
// is producing chunks that don't surface downstream (most commonly
|
|
360
|
-
// partial tool-call args while the model streams a large file_write
|
|
361
|
-
// body). The last_chunk_at bump above is the entire payload — don't
|
|
362
|
-
// buffer, don't fan out to subscribers, or the SSE wire would carry
|
|
363
|
-
// meaningless tick events.
|
|
364
|
-
if (chunk.type === "heartbeat") return;
|
|
365
|
-
if (chunk.type === "text_delta") {
|
|
366
|
-
run.final_text += chunk.data.delta ?? "";
|
|
367
|
-
} else if (chunk.type === "reset_text") {
|
|
368
|
-
// Output-validator retry (ADR-0037) discarding a flagged completed
|
|
369
|
-
// reply — see StreamChunk in base.ts.
|
|
370
|
-
run.final_text = "";
|
|
371
|
-
} else if (chunk.type === "tool_call") {
|
|
372
|
-
const id = chunk.data.id;
|
|
373
|
-
if (id) {
|
|
374
|
-
run.inflight_tools.add(id);
|
|
375
|
-
run.tool_started_at.set(id, Date.now());
|
|
376
|
-
}
|
|
377
|
-
} else if (chunk.type === "tool_result") {
|
|
378
|
-
const id = chunk.data.id;
|
|
379
|
-
if (id) {
|
|
380
|
-
run.inflight_tools.delete(id);
|
|
381
|
-
const startedAt = run.tool_started_at.get(id);
|
|
382
|
-
if (startedAt !== undefined) {
|
|
383
|
-
run.tool_time_ms_done += Math.max(0, Date.now() - startedAt);
|
|
384
|
-
run.tool_started_at.delete(id);
|
|
385
|
-
// The tool just gave the agent its budget back; re-arm the
|
|
386
|
-
// wall-clock watchdog against the new effective elapsed.
|
|
387
|
-
scheduleMaxWatchdog(run);
|
|
306
|
+
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
307
|
+
res.statusCode = 404;
|
|
308
|
+
// on-demand revalidate always sets this header
|
|
309
|
+
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
310
|
+
res.end('This page could not be found');
|
|
311
|
+
return null;
|
|
388
312
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
//
|
|
419
|
-
//
|
|
420
|
-
//
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
}
|
|
442
|
-
//
|
|
443
|
-
//
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
run.abort.abort(reason);
|
|
459
|
-
count++;
|
|
460
|
-
} catch {}
|
|
461
|
-
}
|
|
462
|
-
return count;
|
|
463
|
-
}
|
|
464
|
-
// Poll until every run has transitioned out of "running" (or until the
|
|
465
|
-
// caller-supplied deadline elapses). Used during graceful shutdown after
|
|
466
|
-
// `abortAllRuns()` so the stream `finally` blocks have a chance to flush
|
|
467
|
-
// the trailing error chunk and call `finishRun()`. Resolves to the count
|
|
468
|
-
// of runs still stuck in "running" when the deadline hit (0 = clean).
|
|
469
|
-
async function waitForRunsToSettle(timeoutMs) {
|
|
470
|
-
const deadline = Date.now() + Math.max(0, timeoutMs);
|
|
471
|
-
while(Date.now() < deadline){
|
|
472
|
-
let stillRunning = 0;
|
|
473
|
-
for (const run of runs.values())if (run.status === "running") stillRunning++;
|
|
474
|
-
if (stillRunning === 0) return 0;
|
|
475
|
-
await new Promise((resolve)=>setTimeout(resolve, 50));
|
|
476
|
-
}
|
|
477
|
-
let stillRunning = 0;
|
|
478
|
-
for (const run of runs.values())if (run.status === "running") stillRunning++;
|
|
479
|
-
return stillRunning;
|
|
480
|
-
}
|
|
481
|
-
// Replays buffered events synchronously, then subscribes for live ones.
|
|
482
|
-
// Returns an unsubscribe fn. Caller is responsible for calling it.
|
|
483
|
-
function subscribe(thread_id, onEvent) {
|
|
484
|
-
const run = runs.get(thread_id);
|
|
485
|
-
if (!run) return {
|
|
486
|
-
run: null,
|
|
487
|
-
unsubscribe: ()=>{}
|
|
313
|
+
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
314
|
+
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
315
|
+
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
316
|
+
// Attempt using provided waitUntil if available
|
|
317
|
+
// if it's not we fallback to sendResponse's handling
|
|
318
|
+
if (pendingWaitUntil) {
|
|
319
|
+
if (ctx.waitUntil) {
|
|
320
|
+
ctx.waitUntil(pendingWaitUntil);
|
|
321
|
+
pendingWaitUntil = undefined;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
const cacheTags = context.renderOpts.collectedTags;
|
|
325
|
+
// If the request is for a static response, we can cache it so long
|
|
326
|
+
// as it's not edge.
|
|
327
|
+
if (isIsr) {
|
|
328
|
+
const blob = await response.blob();
|
|
329
|
+
// Copy the headers from the response.
|
|
330
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
331
|
+
if (cacheTags) {
|
|
332
|
+
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
333
|
+
}
|
|
334
|
+
if (!headers['content-type'] && blob.type) {
|
|
335
|
+
headers['content-type'] = blob.type;
|
|
336
|
+
}
|
|
337
|
+
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
338
|
+
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
|
|
339
|
+
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
340
|
+
// build-time fallback in `build/index.ts` so cache entries
|
|
341
|
+
// and the response Cache-Control header agree on the route's
|
|
342
|
+
// effective expire. Routes that opt out of revalidation
|
|
343
|
+
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
344
|
+
// keep `expire: undefined`.
|
|
345
|
+
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
346
|
+
// Create the cache entry for the response.
|
|
347
|
+
const cacheEntry = {
|
|
348
|
+
value: {
|
|
349
|
+
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
350
|
+
status: response.status,
|
|
351
|
+
body: Buffer.from(await blob.arrayBuffer()),
|
|
352
|
+
headers
|
|
353
|
+
},
|
|
354
|
+
cacheControl: {
|
|
355
|
+
revalidate,
|
|
356
|
+
expire
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
return cacheEntry;
|
|
360
|
+
} else {
|
|
361
|
+
// send response without caching if not ISR
|
|
362
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
363
|
+
return null;
|
|
364
|
+
}
|
|
365
|
+
} catch (err) {
|
|
366
|
+
// if this is a background revalidate we need to report
|
|
367
|
+
// the request error here as it won't be bubbled
|
|
368
|
+
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
369
|
+
const silenceLog = false;
|
|
370
|
+
await routeModule.onRequestError(req, err, {
|
|
371
|
+
routerKind: 'App Router',
|
|
372
|
+
routePath: srcPage,
|
|
373
|
+
routeType: 'route',
|
|
374
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
375
|
+
isStaticGeneration: cacheKey !== null,
|
|
376
|
+
isOnDemandRevalidate
|
|
377
|
+
})
|
|
378
|
+
}, silenceLog, routerServerContext);
|
|
379
|
+
}
|
|
380
|
+
throw err;
|
|
381
|
+
}
|
|
488
382
|
};
|
|
489
|
-
|
|
490
|
-
for (const ev of run.events){
|
|
383
|
+
const handleResponse = async (currentSpan, parentSpan)=>{
|
|
491
384
|
try {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
385
|
+
var _cacheEntry_value;
|
|
386
|
+
const cacheEntry = await routeModule.handleResponse({
|
|
387
|
+
req,
|
|
388
|
+
nextConfig,
|
|
389
|
+
cacheKey,
|
|
390
|
+
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
391
|
+
isFallback: false,
|
|
392
|
+
previewProps,
|
|
393
|
+
prerenderManifest,
|
|
394
|
+
isRoutePPREnabled: false,
|
|
395
|
+
isOnDemandRevalidate,
|
|
396
|
+
revalidateOnlyGenerated,
|
|
397
|
+
responseGenerator,
|
|
398
|
+
waitUntil: ctx.waitUntil,
|
|
399
|
+
isMinimalMode
|
|
400
|
+
});
|
|
401
|
+
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
402
|
+
throw cacheEntry.error;
|
|
403
|
+
}
|
|
404
|
+
// we don't create a cacheEntry for ISR
|
|
405
|
+
if (!isIsr) {
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
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) {
|
|
409
|
+
var _cacheEntry_value1;
|
|
410
|
+
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
411
|
+
}
|
|
412
|
+
if (!isMinimalMode) {
|
|
413
|
+
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
414
|
+
}
|
|
415
|
+
// Draft mode should never be cached
|
|
416
|
+
if (isDraftMode) {
|
|
417
|
+
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
418
|
+
}
|
|
419
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
420
|
+
if (!(isMinimalMode && isIsr)) {
|
|
421
|
+
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
422
|
+
}
|
|
423
|
+
// If cache control is already set on the response we don't
|
|
424
|
+
// override it to allow users to customize it via next.config
|
|
425
|
+
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
426
|
+
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
427
|
+
}
|
|
428
|
+
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'.
|
|
429
|
+
new Response(cacheEntry.value.body, {
|
|
430
|
+
headers,
|
|
431
|
+
status: cacheEntry.value.status || 200
|
|
432
|
+
}));
|
|
433
|
+
return;
|
|
434
|
+
} catch (err) {
|
|
435
|
+
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
436
|
+
const silenceLog = false;
|
|
437
|
+
await routeModule.onRequestError(req, err, {
|
|
438
|
+
routerKind: 'App Router',
|
|
439
|
+
routePath: normalizedSrcPage,
|
|
440
|
+
routeType: 'route',
|
|
441
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
442
|
+
isStaticGeneration: cacheKey !== null,
|
|
443
|
+
isOnDemandRevalidate
|
|
444
|
+
})
|
|
445
|
+
}, silenceLog, routerServerContext);
|
|
446
|
+
}
|
|
447
|
+
// rethrow so that we can handle serving error page
|
|
448
|
+
// If this is during static generation, throw the error again.
|
|
449
|
+
if (isIsr) throw err;
|
|
450
|
+
// Otherwise, send a 500 response unless the original response has
|
|
451
|
+
// already committed. In that case, preserve its status code for
|
|
452
|
+
// telemetry while still recording the failure and terminating a response
|
|
453
|
+
// that the failed pipeline left open.
|
|
454
|
+
if (res.headersSent) {
|
|
455
|
+
if (currentSpan) {
|
|
456
|
+
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
457
|
+
currentSpan.recordException(error);
|
|
458
|
+
currentSpan.setStatus({
|
|
459
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
460
|
+
message: error.message
|
|
461
|
+
});
|
|
462
|
+
currentSpan.setAttribute('error.type', error.name);
|
|
463
|
+
}
|
|
464
|
+
if (!res.writableEnded && !res.destroyed) {
|
|
465
|
+
res.end();
|
|
466
|
+
}
|
|
467
|
+
} else {
|
|
468
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
469
|
+
status: 500
|
|
470
|
+
}));
|
|
471
|
+
}
|
|
472
|
+
return;
|
|
473
|
+
} finally{
|
|
474
|
+
;
|
|
475
|
+
(()=>{
|
|
476
|
+
if (!currentSpan) {
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
let statusCode = res.statusCode;
|
|
480
|
+
currentSpan.setAttributes({
|
|
481
|
+
'http.status_code': statusCode,
|
|
482
|
+
'next.rsc': false
|
|
483
|
+
});
|
|
484
|
+
if (statusCode && statusCode >= 500) {
|
|
485
|
+
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
486
|
+
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
487
|
+
currentSpan.setStatus({
|
|
488
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
489
|
+
});
|
|
490
|
+
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
491
|
+
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
492
|
+
}
|
|
493
|
+
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
494
|
+
// We were unable to get attributes, probably OTEL is not enabled
|
|
495
|
+
if (!rootSpanAttributes) {
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
499
|
+
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
503
|
+
const name = `${method} ${route}`;
|
|
504
|
+
currentSpan.setAttributes({
|
|
505
|
+
'next.route': route,
|
|
506
|
+
'http.route': route,
|
|
507
|
+
'next.span_name': name
|
|
508
|
+
});
|
|
509
|
+
currentSpan.updateName(name);
|
|
510
|
+
// Propagate http.route to the parent span if one exists (e.g.
|
|
511
|
+
// a platform-created HTTP span in adapter deployments).
|
|
512
|
+
if (parentSpan && parentSpan !== currentSpan) {
|
|
513
|
+
parentSpan.setAttribute('http.route', route);
|
|
514
|
+
parentSpan.updateName(name);
|
|
515
|
+
}
|
|
516
|
+
})();
|
|
506
517
|
}
|
|
507
518
|
};
|
|
519
|
+
// TODO: activeSpan code path is for when wrapped by
|
|
520
|
+
// next-server can be removed when this is no longer used
|
|
521
|
+
if (isWrappedByNextServer && activeSpan) {
|
|
522
|
+
await handleResponse(activeSpan, undefined);
|
|
523
|
+
} else {
|
|
524
|
+
let parentSpan = tracer.getActiveScopeSpan();
|
|
525
|
+
await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
|
|
526
|
+
spanName: `${method} ${srcPage}`,
|
|
527
|
+
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
|
|
528
|
+
attributes: {
|
|
529
|
+
'http.method': method,
|
|
530
|
+
'http.target': req.url
|
|
531
|
+
}
|
|
532
|
+
}, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
|
|
533
|
+
}
|
|
508
534
|
}
|
|
509
535
|
|
|
510
|
-
|
|
511
|
-
/***/ }),
|
|
512
|
-
|
|
513
|
-
/***/ 73024:
|
|
514
|
-
/***/ ((module) => {
|
|
515
|
-
|
|
516
|
-
module.exports = require("node:fs");
|
|
517
|
-
|
|
518
|
-
/***/ }),
|
|
519
|
-
|
|
520
|
-
/***/ 76760:
|
|
521
|
-
/***/ ((module) => {
|
|
522
|
-
|
|
523
|
-
module.exports = require("node:path");
|
|
524
|
-
|
|
525
|
-
/***/ }),
|
|
526
|
-
|
|
527
|
-
/***/ 86439:
|
|
528
|
-
/***/ ((module) => {
|
|
529
|
-
|
|
530
|
-
module.exports = require("next/dist/shared/lib/no-fallback-error.external");
|
|
531
|
-
|
|
532
|
-
/***/ }),
|
|
533
|
-
|
|
534
|
-
/***/ 95441:
|
|
535
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
536
|
-
|
|
537
|
-
__webpack_require__.r(__webpack_exports__);
|
|
538
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
539
|
-
/* harmony export */ handler: () => (/* binding */ handler),
|
|
540
|
-
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
541
|
-
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
542
|
-
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
543
|
-
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
544
|
-
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
545
|
-
/* harmony export */ });
|
|
546
|
-
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
|
|
547
|
-
/* 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__);
|
|
548
|
-
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
|
|
549
|
-
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
550
|
-
/* 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__);
|
|
551
|
-
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
|
|
552
|
-
/* 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__);
|
|
553
|
-
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
|
|
554
|
-
/* 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__);
|
|
555
|
-
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
|
|
556
|
-
/* 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__);
|
|
557
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
558
|
-
/* 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__);
|
|
559
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
560
|
-
/* 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__);
|
|
561
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
562
|
-
/* 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__);
|
|
563
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
564
|
-
/* 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__);
|
|
565
|
-
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
566
|
-
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
567
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
568
|
-
/* 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__);
|
|
569
|
-
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
570
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
571
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
572
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
573
|
-
/* 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__);
|
|
574
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
575
|
-
/* 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__);
|
|
576
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
577
|
-
/* 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__);
|
|
536
|
+
//# sourceMappingURL=app-route.js.map
|
|
578
537
|
|
|
579
538
|
|
|
539
|
+
/***/ }),
|
|
580
540
|
|
|
541
|
+
/***/ 33873:
|
|
542
|
+
/***/ ((module) => {
|
|
581
543
|
|
|
544
|
+
module.exports = require("path");
|
|
582
545
|
|
|
546
|
+
/***/ }),
|
|
583
547
|
|
|
548
|
+
/***/ 44870:
|
|
549
|
+
/***/ ((module) => {
|
|
584
550
|
|
|
551
|
+
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
585
552
|
|
|
553
|
+
/***/ }),
|
|
586
554
|
|
|
555
|
+
/***/ 48161:
|
|
556
|
+
/***/ ((module) => {
|
|
587
557
|
|
|
558
|
+
module.exports = require("node:os");
|
|
588
559
|
|
|
560
|
+
/***/ }),
|
|
589
561
|
|
|
562
|
+
/***/ 55511:
|
|
563
|
+
/***/ ((module) => {
|
|
590
564
|
|
|
565
|
+
module.exports = require("crypto");
|
|
591
566
|
|
|
567
|
+
/***/ }),
|
|
592
568
|
|
|
569
|
+
/***/ 63033:
|
|
570
|
+
/***/ ((module) => {
|
|
593
571
|
|
|
572
|
+
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
594
573
|
|
|
574
|
+
/***/ }),
|
|
595
575
|
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
const nextConfigOutput = "standalone"
|
|
599
|
-
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
600
|
-
definition: {
|
|
601
|
-
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
602
|
-
page: "/api/v1/system/abort/route",
|
|
603
|
-
pathname: "/api/v1/system/abort",
|
|
604
|
-
filename: "route",
|
|
605
|
-
bundlePath: "app/api/v1/system/abort/route"
|
|
606
|
-
},
|
|
607
|
-
distDir: ".next" || 0,
|
|
608
|
-
relativeProjectDir: false || '',
|
|
609
|
-
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/system/abort/route.ts",
|
|
610
|
-
nextConfigOutput,
|
|
611
|
-
// The lazy require factory ensures that:
|
|
612
|
-
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
613
|
-
// correctly attributing module load time to application-code rather than
|
|
614
|
-
// framework internals.
|
|
615
|
-
// - In all modes: async modules (route files with top-level await) are
|
|
616
|
-
// handled correctly — require() returns a Promise for such modules, which
|
|
617
|
-
// ensureUserland() awaits before the first request is handled.
|
|
618
|
-
userland: ()=>__webpack_require__(5839),
|
|
619
|
-
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
620
|
-
// server HMR updates are picked up without re-executing the entry chunk.
|
|
621
|
-
// Using require() (synchronous) avoids adding async overhead that would be
|
|
622
|
-
// incorrectly attributed to application-code time in devRequestTiming.
|
|
623
|
-
... false ? 0 : {}
|
|
624
|
-
});
|
|
625
|
-
// Pull out the exports that we need to expose from the module. This should
|
|
626
|
-
// be eliminated when we've moved the other routes to the new format. These
|
|
627
|
-
// are used to hook into the route.
|
|
628
|
-
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
629
|
-
function patchFetch() {
|
|
630
|
-
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
631
|
-
workAsyncStorage,
|
|
632
|
-
workUnitAsyncStorage
|
|
633
|
-
});
|
|
634
|
-
}
|
|
576
|
+
/***/ 68564:
|
|
577
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
635
578
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
579
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
580
|
+
/* harmony export */ AD: () => (/* binding */ startRun),
|
|
581
|
+
/* harmony export */ B1: () => (/* binding */ subscribe),
|
|
582
|
+
/* harmony export */ Cs: () => (/* binding */ waitForRun),
|
|
583
|
+
/* harmony export */ ES: () => (/* binding */ abortAllRuns),
|
|
584
|
+
/* harmony export */ JH: () => (/* binding */ finishRun),
|
|
585
|
+
/* harmony export */ KD: () => (/* binding */ abortRun),
|
|
586
|
+
/* harmony export */ Mh: () => (/* binding */ getRun),
|
|
587
|
+
/* harmony export */ QK: () => (/* binding */ drainSteering),
|
|
588
|
+
/* harmony export */ mq: () => (/* binding */ broadcast),
|
|
589
|
+
/* harmony export */ mx: () => (/* binding */ pushSteering)
|
|
590
|
+
/* harmony export */ });
|
|
591
|
+
/* unused harmony export waitForRunsToSettle */
|
|
592
|
+
/* harmony import */ var _lib_env_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67500);
|
|
593
|
+
/* harmony import */ var _lib_utils_global_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15559);
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
// Read once at module init. JARELA_RUN_BUFFER_SIZE / JARELA_RUN_REGISTRY_TTL_MS
|
|
597
|
+
// override the defaults.
|
|
598
|
+
const MAX_BUFFERED = (0,_lib_env_config__WEBPACK_IMPORTED_MODULE_0__/* .getConfig */ .z)().runBufferSize;
|
|
599
|
+
const RECENT_TTL_MS = (0,_lib_env_config__WEBPACK_IMPORTED_MODULE_0__/* .getConfig */ .z)().runRegistryTtlMs;
|
|
600
|
+
// Idle (no-progress) ceiling and wall-clock ceiling: read fresh per-run
|
|
601
|
+
// from getConfig() so non-restart-required env reloads take effect.
|
|
602
|
+
function runIdleMs() {
|
|
603
|
+
return (0,_lib_env_config__WEBPACK_IMPORTED_MODULE_0__/* .getConfig */ .z)().runIdleMs;
|
|
604
|
+
}
|
|
605
|
+
function runMaxMs() {
|
|
606
|
+
return (0,_lib_env_config__WEBPACK_IMPORTED_MODULE_0__/* .getConfig */ .z)().runMaxMs;
|
|
607
|
+
}
|
|
608
|
+
const registryState = (0,_lib_utils_global_state__WEBPACK_IMPORTED_MODULE_1__/* .getOrCreateGlobal */ .X)("__jarela_active_run_registry", ()=>({
|
|
609
|
+
runs: new Map(),
|
|
610
|
+
waiters: new Map()
|
|
611
|
+
}));
|
|
612
|
+
const runs = registryState.runs;
|
|
613
|
+
// Cold-attach waiters: subscribers that opened a GET /run before the
|
|
614
|
+
// server-side run actually called startRun (typical for triggers /
|
|
615
|
+
// scheduler / watcher, which submit through `after()` + the per-thread
|
|
616
|
+
// queue, so there's a real delay between the user clicking "Run now"
|
|
617
|
+
// and the registry entry appearing). Resolved by `startRun` below.
|
|
618
|
+
const waiters = registryState.waiters;
|
|
619
|
+
/** Wait up to `timeoutMs` for a run to be registered on `thread_id`.
|
|
620
|
+
* Resolves immediately with the current run if one is already active,
|
|
621
|
+
* with the new run when `startRun` fires inside the window, or with
|
|
622
|
+
* `null` on timeout. `timeoutMs <= 0` short-circuits to the current
|
|
623
|
+
* state without waiting. Caller is responsible for closing the SSE
|
|
624
|
+
* stream when this resolves null. */ function waitForRun(thread_id, timeoutMs) {
|
|
625
|
+
const existing = runs.get(thread_id);
|
|
626
|
+
if (existing) return Promise.resolve(existing);
|
|
627
|
+
if (timeoutMs <= 0) return Promise.resolve(null);
|
|
628
|
+
return new Promise((resolve)=>{
|
|
629
|
+
let set = waiters.get(thread_id);
|
|
630
|
+
if (!set) {
|
|
631
|
+
set = new Set();
|
|
632
|
+
waiters.set(thread_id, set);
|
|
633
|
+
}
|
|
634
|
+
const fn = (run)=>{
|
|
635
|
+
clearTimeout(timer);
|
|
636
|
+
resolve(run);
|
|
637
|
+
};
|
|
638
|
+
set.add(fn);
|
|
639
|
+
const timer = setTimeout(()=>{
|
|
640
|
+
const cur = waiters.get(thread_id);
|
|
641
|
+
cur?.delete(fn);
|
|
642
|
+
if (cur && cur.size === 0) waiters.delete(thread_id);
|
|
643
|
+
resolve(null);
|
|
644
|
+
}, timeoutMs);
|
|
645
|
+
timer.unref?.();
|
|
655
646
|
});
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
647
|
+
}
|
|
648
|
+
function startRun(thread_id, agent_id) {
|
|
649
|
+
// If a stale completed run exists, drop it before starting a new one.
|
|
650
|
+
const existing = runs.get(thread_id);
|
|
651
|
+
if (existing && existing.status === "running") {
|
|
652
|
+
throw new Error(`A run is already active for thread ${thread_id}`);
|
|
661
653
|
}
|
|
662
|
-
const
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
654
|
+
const now = Date.now();
|
|
655
|
+
const run = {
|
|
656
|
+
thread_id,
|
|
657
|
+
agent_id,
|
|
658
|
+
started_at: now,
|
|
659
|
+
finished_at: null,
|
|
660
|
+
status: "running",
|
|
661
|
+
events: [],
|
|
662
|
+
subscribers: new Set(),
|
|
663
|
+
final_text: "",
|
|
664
|
+
abort: new AbortController(),
|
|
665
|
+
last_chunk_at: now,
|
|
666
|
+
inflight_tools: new Set(),
|
|
667
|
+
tool_started_at: new Map(),
|
|
668
|
+
tool_time_ms_done: 0,
|
|
669
|
+
steering: [],
|
|
670
|
+
phase: "starting",
|
|
671
|
+
phase_label: "Starting…"
|
|
675
672
|
};
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
}
|
|
673
|
+
runs.set(thread_id, run);
|
|
674
|
+
// Wake any GET subscribers that attached before the run was registered.
|
|
675
|
+
const pending = waiters.get(thread_id);
|
|
676
|
+
if (pending) {
|
|
677
|
+
waiters.delete(thread_id);
|
|
678
|
+
for (const fn of pending){
|
|
679
|
+
try {
|
|
680
|
+
fn(run);
|
|
681
|
+
} catch {}
|
|
685
682
|
}
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
const
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
previewProps,
|
|
714
|
-
renderOpts: {
|
|
715
|
-
experimental: {
|
|
716
|
-
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
717
|
-
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
718
|
-
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
719
|
-
},
|
|
720
|
-
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
721
|
-
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
722
|
-
isDraftMode,
|
|
723
|
-
incrementalCache,
|
|
724
|
-
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
725
|
-
cacheLifeProfiles: nextConfig.cacheLife,
|
|
726
|
-
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
727
|
-
waitUntil: ctx.waitUntil,
|
|
728
|
-
onClose: (cb)=>{
|
|
729
|
-
res.on('close', cb);
|
|
730
|
-
},
|
|
731
|
-
onAfterTaskError: undefined
|
|
732
|
-
},
|
|
733
|
-
sharedContext: {
|
|
734
|
-
buildId,
|
|
735
|
-
deploymentId
|
|
683
|
+
}
|
|
684
|
+
scheduleIdleWatchdog(run);
|
|
685
|
+
scheduleMaxWatchdog(run);
|
|
686
|
+
return run;
|
|
687
|
+
}
|
|
688
|
+
// Synthesise a typed error chunk for the watchdog termination paths and
|
|
689
|
+
// fan it out to subscribers BEFORE flipping `status` to "error". The order
|
|
690
|
+
// matters: `broadcast()`'s status guard drops any chunk delivered after
|
|
691
|
+
// `finishRun()` has run, so calling finishRun first would silently swallow
|
|
692
|
+
// the error and the client's EventSource would just see the connection
|
|
693
|
+
// close with no terminal event — bubble keeps spinning, no toast. Doing
|
|
694
|
+
// it the other way around lets the client receive a real error event,
|
|
695
|
+
// render a "Run timed out" toast, and (if the consumer wires it up)
|
|
696
|
+
// trigger an auto-retry path. Followed by `done` so the consumer's
|
|
697
|
+
// for-await loop can break cleanly without waiting for an EOF.
|
|
698
|
+
function emitWatchdogTermination(run, code, message) {
|
|
699
|
+
if (run.status !== "running") return;
|
|
700
|
+
// Direct registry mutation so the broadcast goes through the regular
|
|
701
|
+
// path (subscribers + buffer + seq stamp) without re-entering any of
|
|
702
|
+
// the watchdog scheduling. Mirrors broadcast() but bypasses the
|
|
703
|
+
// status check we'd otherwise be racing against.
|
|
704
|
+
run.last_chunk_at = Date.now();
|
|
705
|
+
const errChunk = {
|
|
706
|
+
type: "error",
|
|
707
|
+
data: {
|
|
708
|
+
message,
|
|
709
|
+
code
|
|
736
710
|
}
|
|
737
711
|
};
|
|
738
|
-
|
|
739
|
-
const
|
|
740
|
-
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));
|
|
741
|
-
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
712
|
+
if (run.events.length < MAX_BUFFERED) run.events.push(errChunk);
|
|
713
|
+
for (const fn of run.subscribers){
|
|
742
714
|
try {
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
752
|
-
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
753
|
-
// Attempt using provided waitUntil if available
|
|
754
|
-
// if it's not we fallback to sendResponse's handling
|
|
755
|
-
if (pendingWaitUntil) {
|
|
756
|
-
if (ctx.waitUntil) {
|
|
757
|
-
ctx.waitUntil(pendingWaitUntil);
|
|
758
|
-
pendingWaitUntil = undefined;
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
const cacheTags = context.renderOpts.collectedTags;
|
|
762
|
-
// If the request is for a static response, we can cache it so long
|
|
763
|
-
// as it's not edge.
|
|
764
|
-
if (isIsr) {
|
|
765
|
-
const blob = await response.blob();
|
|
766
|
-
// Copy the headers from the response.
|
|
767
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
768
|
-
if (cacheTags) {
|
|
769
|
-
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
770
|
-
}
|
|
771
|
-
if (!headers['content-type'] && blob.type) {
|
|
772
|
-
headers['content-type'] = blob.type;
|
|
773
|
-
}
|
|
774
|
-
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
775
|
-
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
|
|
776
|
-
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
777
|
-
// build-time fallback in `build/index.ts` so cache entries
|
|
778
|
-
// and the response Cache-Control header agree on the route's
|
|
779
|
-
// effective expire. Routes that opt out of revalidation
|
|
780
|
-
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
781
|
-
// keep `expire: undefined`.
|
|
782
|
-
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
783
|
-
// Create the cache entry for the response.
|
|
784
|
-
const cacheEntry = {
|
|
785
|
-
value: {
|
|
786
|
-
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
787
|
-
status: response.status,
|
|
788
|
-
body: Buffer.from(await blob.arrayBuffer()),
|
|
789
|
-
headers
|
|
790
|
-
},
|
|
791
|
-
cacheControl: {
|
|
792
|
-
revalidate,
|
|
793
|
-
expire
|
|
794
|
-
}
|
|
795
|
-
};
|
|
796
|
-
return cacheEntry;
|
|
797
|
-
} else {
|
|
798
|
-
// send response without caching if not ISR
|
|
799
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
800
|
-
return null;
|
|
801
|
-
}
|
|
802
|
-
} catch (err) {
|
|
803
|
-
// if this is a background revalidate we need to report
|
|
804
|
-
// the request error here as it won't be bubbled
|
|
805
|
-
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
806
|
-
const silenceLog = false;
|
|
807
|
-
await routeModule.onRequestError(req, err, {
|
|
808
|
-
routerKind: 'App Router',
|
|
809
|
-
routePath: srcPage,
|
|
810
|
-
routeType: 'route',
|
|
811
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
812
|
-
isStaticGeneration: cacheKey !== null,
|
|
813
|
-
isOnDemandRevalidate
|
|
814
|
-
})
|
|
815
|
-
}, silenceLog, routerServerContext);
|
|
816
|
-
}
|
|
817
|
-
throw err;
|
|
818
|
-
}
|
|
715
|
+
fn(errChunk);
|
|
716
|
+
} catch {}
|
|
717
|
+
}
|
|
718
|
+
// Pair with a synthetic `done` so the client's consume() loop breaks
|
|
719
|
+
// on a terminal event rather than waiting for the EventSource to close.
|
|
720
|
+
const doneChunk = {
|
|
721
|
+
type: "done",
|
|
722
|
+
data: {}
|
|
819
723
|
};
|
|
820
|
-
|
|
724
|
+
if (run.events.length < MAX_BUFFERED) run.events.push(doneChunk);
|
|
725
|
+
for (const fn of run.subscribers){
|
|
821
726
|
try {
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
}
|
|
841
|
-
// we don't create a cacheEntry for ISR
|
|
842
|
-
if (!isIsr) {
|
|
843
|
-
return;
|
|
844
|
-
}
|
|
845
|
-
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) {
|
|
846
|
-
var _cacheEntry_value1;
|
|
847
|
-
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
848
|
-
}
|
|
849
|
-
if (!isMinimalMode) {
|
|
850
|
-
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
851
|
-
}
|
|
852
|
-
// Draft mode should never be cached
|
|
853
|
-
if (isDraftMode) {
|
|
854
|
-
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
855
|
-
}
|
|
856
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
857
|
-
if (!(isMinimalMode && isIsr)) {
|
|
858
|
-
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
859
|
-
}
|
|
860
|
-
// If cache control is already set on the response we don't
|
|
861
|
-
// override it to allow users to customize it via next.config
|
|
862
|
-
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
863
|
-
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
864
|
-
}
|
|
865
|
-
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'.
|
|
866
|
-
new Response(cacheEntry.value.body, {
|
|
867
|
-
headers,
|
|
868
|
-
status: cacheEntry.value.status || 200
|
|
869
|
-
}));
|
|
727
|
+
fn(doneChunk);
|
|
728
|
+
} catch {}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
// Self-rearming idle watchdog. Fires when no chunk has arrived for
|
|
732
|
+
// `idleMs`; otherwise reschedules itself for `(last_chunk_at + idleMs) -
|
|
733
|
+
// now`. We never carry a handle on the run — the closure just bails if
|
|
734
|
+
// the run is no longer the registry's entry or no longer running.
|
|
735
|
+
function scheduleIdleWatchdog(run) {
|
|
736
|
+
const idleMs = runIdleMs();
|
|
737
|
+
const fireIn = Math.max(0, run.last_chunk_at + idleMs - Date.now());
|
|
738
|
+
setTimeout(()=>{
|
|
739
|
+
const cur = runs.get(run.thread_id);
|
|
740
|
+
if (cur !== run) return;
|
|
741
|
+
if (run.status !== "running") return;
|
|
742
|
+
const idle = Date.now() - run.last_chunk_at;
|
|
743
|
+
if (idle < idleMs) {
|
|
744
|
+
scheduleIdleWatchdog(run);
|
|
870
745
|
return;
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
746
|
+
}
|
|
747
|
+
if (run.inflight_tools.size > 0) {
|
|
748
|
+
// Tool execution in progress — silence here is the tool working,
|
|
749
|
+
// not a wedged provider stream. Skip the kill, re-check in idleMs.
|
|
750
|
+
// The tool_result will bump last_chunk_at when it lands.
|
|
751
|
+
setTimeout(()=>scheduleIdleWatchdog(run), idleMs).unref?.();
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
console.warn(`[run-registry] idle watchdog: force-finishing stalled run for thread ${run.thread_id} after ${idle}ms of no progress`);
|
|
755
|
+
emitWatchdogTermination(run, "run_idle_timeout", `Run timed out — no progress for ${Math.round(idle / 1000)}s. The provider stream went silent before the agent finished. Try again, or split the request into smaller steps.`);
|
|
756
|
+
try {
|
|
757
|
+
run.abort.abort("run_idle_timeout");
|
|
758
|
+
} catch {}
|
|
759
|
+
finishRun(run, "error");
|
|
760
|
+
}, fireIn).unref?.();
|
|
761
|
+
}
|
|
762
|
+
// Wall-clock elapsed minus time spent inside tool calls (both completed and
|
|
763
|
+
// currently in flight). The wall-clock watchdog uses this so a 5-minute
|
|
764
|
+
// shell exec or a slow MCP roundtrip doesn't burn the agent's budget;
|
|
765
|
+
// tools enforce their own timeouts. See ActiveRun.tool_started_at for the
|
|
766
|
+
// rationale.
|
|
767
|
+
function effectiveElapsedMs(run, now) {
|
|
768
|
+
let inflightToolMs = 0;
|
|
769
|
+
for (const startedAt of run.tool_started_at.values()){
|
|
770
|
+
inflightToolMs += Math.max(0, now - startedAt);
|
|
771
|
+
}
|
|
772
|
+
return Math.max(0, now - run.started_at - run.tool_time_ms_done - inflightToolMs);
|
|
773
|
+
}
|
|
774
|
+
function scheduleMaxWatchdog(run) {
|
|
775
|
+
const max = runMaxMs();
|
|
776
|
+
const now = Date.now();
|
|
777
|
+
const fireIn = Math.max(0, max - effectiveElapsedMs(run, now));
|
|
778
|
+
setTimeout(()=>{
|
|
779
|
+
const cur = runs.get(run.thread_id);
|
|
780
|
+
if (cur !== run) return;
|
|
781
|
+
if (run.status !== "running") return;
|
|
782
|
+
const elapsed = effectiveElapsedMs(run, Date.now());
|
|
783
|
+
if (elapsed < max) {
|
|
784
|
+
// Tool time pushed the effective elapsed back below the ceiling —
|
|
785
|
+
// re-arm for the remaining budget. Without this, a tool that runs
|
|
786
|
+
// for longer than `max` between firing and resolving would let
|
|
787
|
+
// the next setTimeout overshoot.
|
|
788
|
+
scheduleMaxWatchdog(run);
|
|
909
789
|
return;
|
|
910
|
-
} finally{
|
|
911
|
-
;
|
|
912
|
-
(()=>{
|
|
913
|
-
if (!currentSpan) {
|
|
914
|
-
return;
|
|
915
|
-
}
|
|
916
|
-
let statusCode = res.statusCode;
|
|
917
|
-
currentSpan.setAttributes({
|
|
918
|
-
'http.status_code': statusCode,
|
|
919
|
-
'next.rsc': false
|
|
920
|
-
});
|
|
921
|
-
if (statusCode && statusCode >= 500) {
|
|
922
|
-
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
923
|
-
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
924
|
-
currentSpan.setStatus({
|
|
925
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
926
|
-
});
|
|
927
|
-
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
928
|
-
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
929
|
-
}
|
|
930
|
-
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
931
|
-
// We were unable to get attributes, probably OTEL is not enabled
|
|
932
|
-
if (!rootSpanAttributes) {
|
|
933
|
-
return;
|
|
934
|
-
}
|
|
935
|
-
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
936
|
-
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
937
|
-
return;
|
|
938
|
-
}
|
|
939
|
-
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
940
|
-
const name = `${method} ${route}`;
|
|
941
|
-
currentSpan.setAttributes({
|
|
942
|
-
'next.route': route,
|
|
943
|
-
'http.route': route,
|
|
944
|
-
'next.span_name': name
|
|
945
|
-
});
|
|
946
|
-
currentSpan.updateName(name);
|
|
947
|
-
// Propagate http.route to the parent span if one exists (e.g.
|
|
948
|
-
// a platform-created HTTP span in adapter deployments).
|
|
949
|
-
if (parentSpan && parentSpan !== currentSpan) {
|
|
950
|
-
parentSpan.setAttribute('http.route', route);
|
|
951
|
-
parentSpan.updateName(name);
|
|
952
|
-
}
|
|
953
|
-
})();
|
|
954
790
|
}
|
|
791
|
+
console.warn(`[run-registry] wall-clock watchdog: force-finishing run for thread ${run.thread_id} after ${elapsed}ms of agent time (excluding tool execution)`);
|
|
792
|
+
emitWatchdogTermination(run, "run_max_timeout", `Run exceeded the wall-clock limit (${Math.round(max / 1000)}s of agent time, excluding tool execution). The agent was force-stopped. Try a smaller scope or raise JARELA_RUN_MAX_MS if this is expected.`);
|
|
793
|
+
try {
|
|
794
|
+
run.abort.abort("run_watchdog_timeout");
|
|
795
|
+
} catch {}
|
|
796
|
+
finishRun(run, "error");
|
|
797
|
+
}, fireIn).unref?.();
|
|
798
|
+
}
|
|
799
|
+
// Mirrors the labels hooks/useSSE.ts derives from the same chunks.
|
|
800
|
+
function trackPhase(run, chunk) {
|
|
801
|
+
const data = chunk.data ?? {};
|
|
802
|
+
const set = (phase, label)=>{
|
|
803
|
+
run.phase = phase;
|
|
804
|
+
run.phase_label = label;
|
|
955
805
|
};
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
} else {
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
806
|
+
if (chunk.type === "status") {
|
|
807
|
+
const phase = typeof data.phase === "string" && data.phase ? data.phase : run.phase;
|
|
808
|
+
const label = typeof data.label === "string" && data.label.trim() ? data.label : "Thinking…";
|
|
809
|
+
set(phase, label);
|
|
810
|
+
} else if (chunk.type === "text_delta") {
|
|
811
|
+
set("responding", "Responding…");
|
|
812
|
+
} else if (chunk.type === "thinking_delta") {
|
|
813
|
+
if (run.inflight_tools.size === 0) set("thinking", "Thinking…");
|
|
814
|
+
} else if (chunk.type === "tool_call") {
|
|
815
|
+
const name = typeof data.name === "string" && data.name ? data.name : "tool";
|
|
816
|
+
set("tool", `Using ${name}…`);
|
|
817
|
+
} else if (chunk.type === "tool_result") {
|
|
818
|
+
const remaining = typeof data.id === "string" ? [
|
|
819
|
+
...run.inflight_tools
|
|
820
|
+
].filter((id)=>id !== data.id) : [
|
|
821
|
+
...run.inflight_tools
|
|
822
|
+
];
|
|
823
|
+
if (remaining.length === 0) set("thinking", "Thinking…");
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
function broadcast(run, chunk) {
|
|
827
|
+
// Identity-check: a superseded run must not smear trailing chunks onto
|
|
828
|
+
// the replacement entry in the registry.
|
|
829
|
+
if (runs.get(run.thread_id) !== run) return;
|
|
830
|
+
run.last_chunk_at = Date.now();
|
|
831
|
+
// Heartbeats exist solely to reset the idle watchdog when the provider
|
|
832
|
+
// is producing chunks that don't surface downstream (most commonly
|
|
833
|
+
// partial tool-call args while the model streams a large file_write
|
|
834
|
+
// body). The last_chunk_at bump above is the entire payload — don't
|
|
835
|
+
// buffer, don't fan out to subscribers, or the SSE wire would carry
|
|
836
|
+
// meaningless tick events.
|
|
837
|
+
if (chunk.type === "heartbeat") return;
|
|
838
|
+
trackPhase(run, chunk);
|
|
839
|
+
if (chunk.type === "text_delta") {
|
|
840
|
+
run.final_text += chunk.data.delta ?? "";
|
|
841
|
+
} else if (chunk.type === "reset_text") {
|
|
842
|
+
// Output-validator retry (ADR-0037) discarding a flagged completed
|
|
843
|
+
// reply — see StreamChunk in base.ts.
|
|
844
|
+
run.final_text = "";
|
|
845
|
+
} else if (chunk.type === "tool_call") {
|
|
846
|
+
const id = chunk.data.id;
|
|
847
|
+
if (id) {
|
|
848
|
+
run.inflight_tools.add(id);
|
|
849
|
+
run.tool_started_at.set(id, Date.now());
|
|
850
|
+
}
|
|
851
|
+
} else if (chunk.type === "tool_result") {
|
|
852
|
+
const id = chunk.data.id;
|
|
853
|
+
if (id) {
|
|
854
|
+
run.inflight_tools.delete(id);
|
|
855
|
+
const startedAt = run.tool_started_at.get(id);
|
|
856
|
+
if (startedAt !== undefined) {
|
|
857
|
+
run.tool_time_ms_done += Math.max(0, Date.now() - startedAt);
|
|
858
|
+
run.tool_started_at.delete(id);
|
|
859
|
+
// The tool just gave the agent its budget back; re-arm the
|
|
860
|
+
// wall-clock watchdog against the new effective elapsed.
|
|
861
|
+
scheduleMaxWatchdog(run);
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
if (run.events.length < MAX_BUFFERED) {
|
|
866
|
+
run.events.push(chunk);
|
|
867
|
+
}
|
|
868
|
+
for (const fn of run.subscribers){
|
|
869
|
+
try {
|
|
870
|
+
fn(chunk);
|
|
871
|
+
} catch {}
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
function finishRun(run, status) {
|
|
875
|
+
// Identity-check: a stale run finishing late must not flip the
|
|
876
|
+
// replacement's status or evict it from the registry.
|
|
877
|
+
if (runs.get(run.thread_id) !== run) return;
|
|
878
|
+
run.status = status;
|
|
879
|
+
run.finished_at = Date.now();
|
|
880
|
+
// Drop subscribers — late attachers should NOT keep getting events on a
|
|
881
|
+
// dead run. They'll get the buffered events on subscribe and that's it.
|
|
882
|
+
run.subscribers.clear();
|
|
883
|
+
// Auto-evict after TTL so memory doesn't grow with every conversation.
|
|
884
|
+
setTimeout(()=>{
|
|
885
|
+
const cur = runs.get(run.thread_id);
|
|
886
|
+
if (cur === run) runs.delete(run.thread_id);
|
|
887
|
+
}, RECENT_TTL_MS).unref?.();
|
|
888
|
+
}
|
|
889
|
+
function getRun(thread_id) {
|
|
890
|
+
return runs.get(thread_id) ?? null;
|
|
891
|
+
}
|
|
892
|
+
// Signal the agent stream to cancel. The stream loop in the route is wired
|
|
893
|
+
// to listen on the AbortController and exit early, emitting an error chunk
|
|
894
|
+
// the client (and the queue-drain hook) can react to. Idempotent.
|
|
895
|
+
function abortRun(thread_id, reason = "user_interrupted") {
|
|
896
|
+
const run = runs.get(thread_id);
|
|
897
|
+
if (!run || run.status !== "running") return false;
|
|
898
|
+
if (!run.abort.signal.aborted) {
|
|
899
|
+
try {
|
|
900
|
+
run.abort.abort(reason);
|
|
901
|
+
} catch {}
|
|
902
|
+
}
|
|
903
|
+
return true;
|
|
904
|
+
}
|
|
905
|
+
// Queue a user message typed while `thread_id` is streaming (ADR-0080).
|
|
906
|
+
// Returns false when there is nothing to steer, so the caller can fall back
|
|
907
|
+
// to starting a fresh turn.
|
|
908
|
+
function pushSteering(thread_id, text) {
|
|
909
|
+
const run = runs.get(thread_id);
|
|
910
|
+
if (!run || run.status !== "running" || run.abort.signal.aborted) return false;
|
|
911
|
+
const trimmed = text.trim();
|
|
912
|
+
if (!trimmed) return false;
|
|
913
|
+
run.steering.push(trimmed);
|
|
914
|
+
return true;
|
|
915
|
+
}
|
|
916
|
+
// Take everything queued so far, in arrival order. Deliberately not merged
|
|
917
|
+
// into a summary — collapsing several messages loses the user's intent.
|
|
918
|
+
function drainSteering(thread_id) {
|
|
919
|
+
const run = runs.get(thread_id);
|
|
920
|
+
if (!run || run.steering.length === 0) return [];
|
|
921
|
+
return run.steering.splice(0, run.steering.length);
|
|
922
|
+
}
|
|
923
|
+
// Abort every currently-running run. Used by the graceful-shutdown path so
|
|
924
|
+
// LangGraph stream loops bail out instead of continuing past process exit.
|
|
925
|
+
// Returns the number of runs that were signalled.
|
|
926
|
+
function abortAllRuns(reason = "server_shutdown") {
|
|
927
|
+
let count = 0;
|
|
928
|
+
for (const run of runs.values()){
|
|
929
|
+
if (run.status !== "running") continue;
|
|
930
|
+
if (run.abort.signal.aborted) continue;
|
|
931
|
+
try {
|
|
932
|
+
run.abort.abort(reason);
|
|
933
|
+
count++;
|
|
934
|
+
} catch {}
|
|
935
|
+
}
|
|
936
|
+
return count;
|
|
937
|
+
}
|
|
938
|
+
// Poll until every run has transitioned out of "running" (or until the
|
|
939
|
+
// caller-supplied deadline elapses). Used during graceful shutdown after
|
|
940
|
+
// `abortAllRuns()` so the stream `finally` blocks have a chance to flush
|
|
941
|
+
// the trailing error chunk and call `finishRun()`. Resolves to the count
|
|
942
|
+
// of runs still stuck in "running" when the deadline hit (0 = clean).
|
|
943
|
+
async function waitForRunsToSettle(timeoutMs) {
|
|
944
|
+
const deadline = Date.now() + Math.max(0, timeoutMs);
|
|
945
|
+
while(Date.now() < deadline){
|
|
946
|
+
let stillRunning = 0;
|
|
947
|
+
for (const run of runs.values())if (run.status === "running") stillRunning++;
|
|
948
|
+
if (stillRunning === 0) return 0;
|
|
949
|
+
await new Promise((resolve)=>setTimeout(resolve, 50));
|
|
950
|
+
}
|
|
951
|
+
let stillRunning = 0;
|
|
952
|
+
for (const run of runs.values())if (run.status === "running") stillRunning++;
|
|
953
|
+
return stillRunning;
|
|
954
|
+
}
|
|
955
|
+
// Replays buffered events synchronously, then subscribes for live ones.
|
|
956
|
+
// Returns an unsubscribe fn. Caller is responsible for calling it.
|
|
957
|
+
function subscribe(thread_id, onEvent) {
|
|
958
|
+
const run = runs.get(thread_id);
|
|
959
|
+
if (!run) return {
|
|
960
|
+
run: null,
|
|
961
|
+
unsubscribe: ()=>{}
|
|
962
|
+
};
|
|
963
|
+
// Replay buffered events first (so the new subscriber catches up).
|
|
964
|
+
for (const ev of run.events){
|
|
965
|
+
try {
|
|
966
|
+
onEvent(ev);
|
|
967
|
+
} catch {}
|
|
968
|
+
}
|
|
969
|
+
if (run.status !== "running") {
|
|
970
|
+
return {
|
|
971
|
+
run,
|
|
972
|
+
unsubscribe: ()=>{}
|
|
973
|
+
};
|
|
970
974
|
}
|
|
975
|
+
run.subscribers.add(onEvent);
|
|
976
|
+
return {
|
|
977
|
+
run,
|
|
978
|
+
unsubscribe: ()=>{
|
|
979
|
+
run.subscribers.delete(onEvent);
|
|
980
|
+
}
|
|
981
|
+
};
|
|
971
982
|
}
|
|
972
983
|
|
|
973
|
-
//# sourceMappingURL=app-route.js.map
|
|
974
984
|
|
|
985
|
+
/***/ }),
|
|
986
|
+
|
|
987
|
+
/***/ 73024:
|
|
988
|
+
/***/ ((module) => {
|
|
989
|
+
|
|
990
|
+
module.exports = require("node:fs");
|
|
991
|
+
|
|
992
|
+
/***/ }),
|
|
993
|
+
|
|
994
|
+
/***/ 76760:
|
|
995
|
+
/***/ ((module) => {
|
|
996
|
+
|
|
997
|
+
module.exports = require("node:path");
|
|
998
|
+
|
|
999
|
+
/***/ }),
|
|
1000
|
+
|
|
1001
|
+
/***/ 86439:
|
|
1002
|
+
/***/ ((module) => {
|
|
1003
|
+
|
|
1004
|
+
module.exports = require("next/dist/shared/lib/no-fallback-error.external");
|
|
975
1005
|
|
|
976
1006
|
/***/ })
|
|
977
1007
|
|
|
@@ -982,7 +1012,7 @@ async function handler(req, res, ctx) {
|
|
|
982
1012
|
var __webpack_require__ = require("../../../../../webpack-runtime.js");
|
|
983
1013
|
__webpack_require__.C(exports);
|
|
984
1014
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
985
|
-
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,4992], () => (__webpack_exec__(
|
|
1015
|
+
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,4992], () => (__webpack_exec__(29419)));
|
|
986
1016
|
module.exports = __webpack_exports__;
|
|
987
1017
|
|
|
988
1018
|
})();
|