@circuitwall/jarela 2.2.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +2 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +8 -0
- package/.next/standalone/.next/server/app/_global-error/page.js +68 -68
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +76 -76
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/v1/access/[identity]/route.js +100 -93
- package/.next/standalone/.next/server/app/api/v1/access/route.js +176 -169
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +89 -56
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/display-filters/route.js +139 -127
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/route.js +107 -100
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/thread/route.js +765 -753
- package/.next/standalone/.next/server/app/api/v1/agents/route.js +72 -65
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +371 -364
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +809 -802
- package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +9 -2
- package/.next/standalone/.next/server/app/api/v1/attachments/files/route.js +49 -49
- package/.next/standalone/.next/server/app/api/v1/attachments/images/route.js +910 -910
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +583 -16
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/[remote_jid]/route.js +41 -30
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +48 -37
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +697 -130
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js +703 -136
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js +796 -229
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/[route_id]/route.js +762 -746
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +1050 -1034
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +673 -106
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js +811 -804
- package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js +718 -706
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/config/route.js +85 -85
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js +709 -709
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/currency/route.js +10 -10
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js +796 -784
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +30 -23
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js +86 -86
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js +57 -57
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/search/route.js +385 -378
- package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js +122 -122
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/env/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/env-sync/allowlist/route.js +375 -368
- package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/events/route.js +745 -178
- package/.next/standalone/.next/server/app/api/v1/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/events/test/route.js +77 -77
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +763 -763
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/browser/activate/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +16 -9
- package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +72 -65
- package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +41 -34
- package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +211 -204
- package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +140 -133
- package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +113 -106
- package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +121 -114
- package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +141 -134
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +690 -690
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js +185 -185
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js +171 -171
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js +396 -396
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js +212 -212
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/files/[name]/route.js +235 -235
- package/.next/standalone/.next/server/app/api/v1/fs/browse/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/harnesses/[id]/route.js +228 -221
- package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +65 -58
- package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +79 -72
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/health/route.js +783 -771
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +140 -133
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/callback/route.js +370 -363
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +240 -233
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +689 -682
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +886 -879
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +115 -108
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +955 -948
- package/.next/standalone/.next/server/app/api/v1/integrations/route.js +223 -216
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +876 -847
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/local-file/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/logs/route.js +70 -70
- package/.next/standalone/.next/server/app/api/v1/maps/embed/route.js +79 -72
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +991 -979
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/registry/route.js +196 -196
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/route.js +19 -7
- package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +539 -532
- package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +86 -79
- package/.next/standalone/.next/server/app/api/v1/memory/route.js +58 -51
- package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +138 -131
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +381 -369
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +150 -143
- package/.next/standalone/.next/server/app/api/v1/models/route.js +634 -627
- package/.next/standalone/.next/server/app/api/v1/packages/catalog/route.js +445 -445
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js +120 -120
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js +234 -234
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js +407 -407
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js +107 -107
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js +228 -228
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/route.js +148 -148
- package/.next/standalone/.next/server/app/api/v1/packages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js +787 -787
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js +529 -514
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js +181 -181
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js +258 -258
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/profile/location/route.js +37 -30
- package/.next/standalone/.next/server/app/api/v1/profile/route.js +171 -164
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +15 -8
- package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +171 -164
- package/.next/standalone/.next/server/app/api/v1/providers/route.js +101 -94
- package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +457 -450
- package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +44 -37
- package/.next/standalone/.next/server/app/api/v1/redaction/route.js +65 -58
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +617 -605
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/route.js +739 -732
- package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +329 -322
- package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +204 -197
- package/.next/standalone/.next/server/app/api/v1/security/state/route.js +58 -51
- package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +183 -176
- package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +194 -187
- package/.next/standalone/.next/server/app/api/v1/setup/test-key/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/skills/[id]/route.js +776 -769
- package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +122 -115
- package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +334 -327
- package/.next/standalone/.next/server/app/api/v1/skills/route.js +873 -866
- package/.next/standalone/.next/server/app/api/v1/system/abort/route.js +838 -808
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js +177 -177
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/tailscale/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/tasks/[agent_id]/route.js +122 -115
- package/.next/standalone/.next/server/app/api/v1/tasks/route.js +30 -23
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js +1436 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js +638 -631
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js +60 -439
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +172 -173
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/route.js +925 -913
- package/.next/standalone/.next/server/app/api/v1/tools/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js +17 -17
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/route.js +570 -570
- package/.next/standalone/.next/server/app/api/v1/voice/transcribe/route.js +241 -229
- package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +989 -977
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +40 -28
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/watchers/reaction-scripts/route.js +128 -128
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/icon.svg/route.js +62 -62
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +436 -436
- package/.next/standalone/.next/server/app/page.js +1179 -743
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page.js +99 -91
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +2 -1
- package/.next/standalone/.next/server/chunks/{424.js → 1388.js} +441 -1022
- package/.next/standalone/.next/server/chunks/1433.js +1 -1
- package/.next/standalone/.next/server/chunks/1638.js +1 -2
- package/.next/standalone/.next/server/chunks/1738.js +1 -1
- package/.next/standalone/.next/server/chunks/2068.js +47 -10
- package/.next/standalone/.next/server/chunks/210.js +3 -3
- package/.next/standalone/.next/server/chunks/2151.js +31 -1
- package/.next/standalone/.next/server/chunks/2207.js +1 -0
- package/.next/standalone/.next/server/chunks/2447.js +10 -5
- package/.next/standalone/.next/server/chunks/2471.js +45 -45
- package/.next/standalone/.next/server/chunks/2504.js +1 -1
- package/.next/standalone/.next/server/chunks/2695.js +17 -17
- package/.next/standalone/.next/server/chunks/3042.js +24 -16
- package/.next/standalone/.next/server/chunks/{4540.js → 309.js} +104 -38
- package/.next/standalone/.next/server/chunks/{2350.js → 3272.js} +104 -37
- package/.next/standalone/.next/server/chunks/3399.js +526 -526
- package/.next/standalone/.next/server/chunks/3524.js +150 -67
- package/.next/standalone/.next/server/chunks/3566.js +1 -1
- package/.next/standalone/.next/server/chunks/4189.js +946 -0
- package/.next/standalone/.next/server/chunks/4433.js +146 -146
- package/.next/standalone/.next/server/chunks/4508.js +3 -3
- package/.next/standalone/.next/server/chunks/4588.js +1 -0
- package/.next/standalone/.next/server/chunks/46.js +78 -28
- package/.next/standalone/.next/server/chunks/466.js +12 -0
- package/.next/standalone/.next/server/chunks/4868.js +206 -206
- package/.next/standalone/.next/server/chunks/4992.js +13 -0
- package/.next/standalone/.next/server/chunks/5120.js +963 -0
- package/.next/standalone/.next/server/chunks/5701.js +1 -1
- package/.next/standalone/.next/server/chunks/5900.js +1 -1
- package/.next/standalone/.next/server/chunks/5908.js +63 -42
- package/.next/standalone/.next/server/chunks/6142.js +10 -2
- package/.next/standalone/.next/server/chunks/6210.js +1 -0
- package/.next/standalone/.next/server/chunks/6213.js +1 -1
- package/.next/standalone/.next/server/chunks/6649.js +3 -3
- package/.next/standalone/.next/server/chunks/6703.js +3 -3
- package/.next/standalone/.next/server/chunks/7445.js +1 -0
- package/.next/standalone/.next/server/chunks/8067.js +12 -0
- package/.next/standalone/.next/server/chunks/8461.js +24 -17
- package/.next/standalone/.next/server/chunks/8558.js +1 -1
- package/.next/standalone/.next/server/chunks/8724.js +1 -1
- package/.next/standalone/.next/server/chunks/8849.js +91 -91
- package/.next/standalone/.next/server/chunks/9032.js +4 -3
- package/.next/standalone/.next/server/chunks/{2563.js → 9164.js} +33389 -31418
- package/.next/standalone/.next/server/chunks/9237.js +396 -396
- package/.next/standalone/.next/server/chunks/{9640.js → 9304.js} +1672 -575
- package/.next/standalone/.next/server/chunks/9406.js +1 -1
- package/.next/standalone/.next/server/chunks/9590.js +68 -18
- package/.next/standalone/.next/server/chunks/9824.js +98 -98
- package/.next/standalone/.next/server/chunks/9826.js +1 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware.js +486 -415
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/preview-props.json +3 -3
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{1395-a340fb0a345382a4.js → 1395-e4a99912b8f83044.js} +13 -1
- package/.next/standalone/.next/static/chunks/app/_global-error/{page-36cb8b428b38b26a.js → page-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/{page-7017f07f8a7a083c.js → page-04748847c6ff866f.js} +1013 -585
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/css/{d80058f0b9b41c09.css → 2669e8744cc8c212.css} +2 -2
- package/.next/standalone/docs/adoption/changesets.json +358 -0
- package/.next/standalone/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/.next/standalone/package.json +3 -3
- package/CHANGELOG.md +44 -0
- package/api/client.ts +9 -0
- package/api/types.ts +29 -0
- package/app/api/v1/lifecycle/adoption/route.ts +14 -2
- package/app/api/v1/models/[name]/compact-threads/route.ts +14 -11
- package/app/api/v1/threads/[thread_id]/activity/route.ts +19 -0
- package/app/api/v1/threads/[thread_id]/context-pin/route.test.ts +1 -0
- package/app/api/v1/threads/[thread_id]/context-pin/route.ts +2 -1
- package/app/api/v1/threads/[thread_id]/route.ts +5 -1
- package/app/api/v1/threads/[thread_id]/run/route.ts +0 -1
- package/components/chat/ChatView.tsx +52 -11
- package/components/chat/ContextBoundary.test.tsx +68 -1
- package/components/chat/ContextBoundary.tsx +92 -13
- package/components/chat/MessageBubble.tsx +12 -0
- package/components/chat/MessageList.test.tsx +31 -0
- package/components/chat/MessageList.tsx +49 -28
- package/components/chat/ToolList.test.tsx +92 -16
- package/components/chat/ToolList.tsx +59 -4
- package/components/chat/chat-helpers.test.tsx +24 -1
- package/components/chat/chat-helpers.ts +47 -4
- package/components/chat/useThreadActivity.test.tsx +113 -0
- package/components/chat/useThreadActivity.ts +94 -0
- package/components/chat/useThreadData.ts +16 -16
- package/components/chat/workflow-step-retry.ts +25 -0
- package/components/integrations/NetworkSection.tsx +2 -2
- package/components/ui/BootScreen.tsx +17 -0
- package/components/ui/WorkflowChecklist.tsx +71 -33
- package/hooks/useSSE.ts +28 -3
- package/lib/agents/citation-checker.test.ts +40 -2
- package/lib/agents/citation-checker.ts +56 -11
- package/lib/agents/compaction-pipeline.test.ts +202 -0
- package/lib/agents/compaction-pipeline.ts +483 -0
- package/lib/agents/context-boundary.ts +5 -6
- package/lib/agents/conversation-summary.ts +37 -21
- package/lib/agents/instruction-edits.test.ts +120 -0
- package/lib/agents/instruction-edits.ts +65 -42
- package/lib/agents/prepare/history-window.test.ts +18 -0
- package/lib/agents/prepare/history-window.ts +11 -2
- package/lib/agents/prepare/request.ts +4 -2
- package/lib/agents/prepare/system-prompt.test.ts +49 -0
- package/lib/agents/prepare/system-prompt.ts +16 -5
- package/lib/agents/prompt-registry.test.ts +5 -140
- package/lib/agents/prompt-registry.ts +45 -1
- package/lib/agents/prompt-variants.ts +146 -0
- package/lib/agents/proposals.test.ts +76 -0
- package/lib/agents/proposals.ts +13 -5
- package/lib/agents/run-registry.test.ts +22 -0
- package/lib/agents/run-registry.ts +29 -0
- package/lib/agents/run-thread.auto-boundary.test.ts +125 -5
- package/lib/agents/run-thread.retry.test.ts +67 -1
- package/lib/agents/run-thread.ts +110 -10
- package/lib/agents/sqlite-checkpoint-saver.test.ts +91 -0
- package/lib/agents/thread-activity.test.ts +31 -0
- package/lib/agents/thread-activity.ts +27 -0
- package/lib/agents/thread-compaction-state.test.ts +82 -0
- package/lib/agents/thread-compaction-state.ts +121 -0
- package/lib/agents/thread-compaction.test.ts +83 -4
- package/lib/agents/thread-compaction.ts +34 -11
- package/lib/agents/warm-summary-background.test.ts +219 -5
- package/lib/agents/warm-summary-background.ts +346 -143
- package/lib/agents/warm-topics.test.ts +191 -0
- package/lib/agents/warm-topics.ts +317 -0
- package/lib/agents/workflow-step-retry.test.ts +96 -0
- package/lib/agents/workflow-step-retry.ts +216 -0
- package/lib/api/browser-control.ts +0 -3
- package/lib/bridges/dispatcher.ts +1 -0
- package/lib/bridges/message-role.test.ts +81 -0
- package/lib/bridges/message-role.ts +23 -10
- package/lib/bridges/types.ts +6 -0
- package/lib/bridges/whatsapp-link.test.ts +32 -0
- package/lib/bridges/whatsapp-link.ts +21 -0
- package/lib/bridges/whatsapp.inbound.test.ts +239 -0
- package/lib/bridges/whatsapp.sender.test.ts +80 -1
- package/lib/bridges/whatsapp.ts +76 -38
- package/lib/db/migrations.ts +5 -0
- package/lib/env/config.ts +2 -0
- package/lib/env/schema.ts +12 -0
- package/lib/lifecycle/changeset-build.test.ts +93 -0
- package/lib/lifecycle/changeset-build.ts +210 -0
- package/lib/lifecycle/changesets.test.ts +101 -0
- package/lib/lifecycle/changesets.ts +166 -0
- package/lib/lifecycle/surface-collect.test.ts +88 -0
- package/lib/lifecycle/surface-collect.ts +64 -0
- package/lib/lifecycle/surface-snapshot.test.ts +104 -0
- package/lib/lifecycle/surface-snapshot.ts +210 -0
- package/lib/memory/record.ts +0 -2
- package/lib/pricing/snapshot.test.ts +70 -0
- package/lib/pricing/snapshot.ts +10 -2
- package/lib/providers/external.ts +0 -2
- package/lib/proxy/dispatcher.test.ts +119 -1
- package/lib/proxy/dispatcher.ts +22 -9
- package/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/lib/stores/agent-configs.ts +10 -5
- package/lib/stores/bridges.test.ts +81 -0
- package/lib/stores/bridges.ts +9 -8
- package/lib/stores/proxy-config.test.ts +120 -0
- package/lib/stores/proxy-config.ts +22 -4
- package/lib/stores/threads.test.ts +9 -0
- package/lib/stores/threads.ts +33 -19
- package/lib/stores/version-adoption.test.ts +96 -0
- package/lib/stores/version-adoption.ts +239 -26
- package/lib/stores/workflow-progress.ts +3 -0
- package/lib/tools/communications/calendar.test.ts +43 -2
- package/lib/tools/communications/calendar.ts +2 -0
- package/lib/tools/communications/gmail.test.ts +51 -1
- package/lib/tools/communications/gmail.ts +44 -2
- package/lib/tools/communications/ms-todo.ts +0 -7
- package/lib/tools/communications/outlook-calendar.ts +2 -0
- package/lib/tools/communications/outlook.test.ts +33 -2
- package/lib/tools/communications/outlook.ts +2 -0
- package/lib/tools/filesystem/edit-match.test.ts +133 -0
- package/lib/tools/filesystem/edit-match.ts +7 -2
- package/lib/tools/general/memory.ts +1 -1
- package/lib/tools/general/workflow-progress.ts +2 -0
- package/lib/tools/runtime/catalog.ts +1 -25
- package/lib/tools/support/result-refs.test.ts +131 -0
- package/lib/tools/support/result-refs.ts +41 -9
- package/lib/triggers/registry.ts +0 -4
- package/lib/utils/source-link.test.ts +51 -0
- package/lib/utils/source-link.ts +45 -0
- package/package.json +3 -3
- package/scripts/install-to-system.ps1 +39 -11
- package/scripts/install-to-system.sh +37 -3
- package/.next/standalone/.next/server/chunks/3979.js +0 -581
- package/.next/standalone/.next/server/chunks/5936.js +0 -594
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-36cb8b428b38b26a.js +0 -17
- /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → hwujW4hR1b-r3k5WdMxZO}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → hwujW4hR1b-r3k5WdMxZO}/_ssgManifest.js +0 -0
|
@@ -47,888 +47,888 @@ module.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.j
|
|
|
47
47
|
|
|
48
48
|
/***/ }),
|
|
49
49
|
|
|
50
|
-
/***/
|
|
51
|
-
/***/ ((
|
|
50
|
+
/***/ 16698:
|
|
51
|
+
/***/ ((module) => {
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
/* 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__);
|
|
75
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
76
|
-
/* 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__);
|
|
77
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
78
|
-
/* 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__);
|
|
79
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
80
|
-
/* 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__);
|
|
81
|
-
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
82
|
-
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
83
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
84
|
-
/* 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__);
|
|
85
|
-
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
86
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
87
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
88
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
89
|
-
/* 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__);
|
|
90
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
91
|
-
/* 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__);
|
|
92
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
93
|
-
/* 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__);
|
|
53
|
+
module.exports = require("node:async_hooks");
|
|
54
|
+
|
|
55
|
+
/***/ }),
|
|
56
|
+
|
|
57
|
+
/***/ 19225:
|
|
58
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
if (false) {} else {
|
|
62
|
+
if (false) {} else {
|
|
63
|
+
if (false) {} else {
|
|
64
|
+
if (false) {} else {
|
|
65
|
+
module.exports = __webpack_require__(44870);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=module.compiled.js.map
|
|
72
|
+
|
|
73
|
+
/***/ }),
|
|
94
74
|
|
|
75
|
+
/***/ 27910:
|
|
76
|
+
/***/ ((module) => {
|
|
95
77
|
|
|
78
|
+
module.exports = require("stream");
|
|
96
79
|
|
|
80
|
+
/***/ }),
|
|
97
81
|
|
|
82
|
+
/***/ 28354:
|
|
83
|
+
/***/ ((module) => {
|
|
98
84
|
|
|
85
|
+
module.exports = require("util");
|
|
99
86
|
|
|
87
|
+
/***/ }),
|
|
100
88
|
|
|
89
|
+
/***/ 29021:
|
|
90
|
+
/***/ ((module) => {
|
|
101
91
|
|
|
92
|
+
module.exports = require("fs");
|
|
102
93
|
|
|
94
|
+
/***/ }),
|
|
103
95
|
|
|
96
|
+
/***/ 29294:
|
|
97
|
+
/***/ ((module) => {
|
|
104
98
|
|
|
99
|
+
module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
|
|
105
100
|
|
|
101
|
+
/***/ }),
|
|
106
102
|
|
|
103
|
+
/***/ 31421:
|
|
104
|
+
/***/ ((module) => {
|
|
107
105
|
|
|
106
|
+
module.exports = require("node:child_process");
|
|
108
107
|
|
|
108
|
+
/***/ }),
|
|
109
109
|
|
|
110
|
+
/***/ 33873:
|
|
111
|
+
/***/ ((module) => {
|
|
110
112
|
|
|
113
|
+
module.exports = require("path");
|
|
111
114
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
115
|
+
/***/ }),
|
|
116
|
+
|
|
117
|
+
/***/ 37067:
|
|
118
|
+
/***/ ((module) => {
|
|
119
|
+
|
|
120
|
+
module.exports = require("node:http");
|
|
121
|
+
|
|
122
|
+
/***/ }),
|
|
123
|
+
|
|
124
|
+
/***/ 38522:
|
|
125
|
+
/***/ ((module) => {
|
|
126
|
+
|
|
127
|
+
module.exports = require("node:zlib");
|
|
128
|
+
|
|
129
|
+
/***/ }),
|
|
130
|
+
|
|
131
|
+
/***/ 40610:
|
|
132
|
+
/***/ ((module) => {
|
|
133
|
+
|
|
134
|
+
module.exports = require("node:dns");
|
|
135
|
+
|
|
136
|
+
/***/ }),
|
|
137
|
+
|
|
138
|
+
/***/ 42482:
|
|
139
|
+
/***/ ((module) => {
|
|
140
|
+
|
|
141
|
+
module.exports = import("sharp");;
|
|
142
|
+
|
|
143
|
+
/***/ }),
|
|
144
|
+
|
|
145
|
+
/***/ 44708:
|
|
146
|
+
/***/ ((module) => {
|
|
147
|
+
|
|
148
|
+
module.exports = require("node:https");
|
|
149
|
+
|
|
150
|
+
/***/ }),
|
|
151
|
+
|
|
152
|
+
/***/ 44870:
|
|
153
|
+
/***/ ((module) => {
|
|
154
|
+
|
|
155
|
+
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
156
|
+
|
|
157
|
+
/***/ }),
|
|
158
|
+
|
|
159
|
+
/***/ 48161:
|
|
160
|
+
/***/ ((module) => {
|
|
161
|
+
|
|
162
|
+
module.exports = require("node:os");
|
|
163
|
+
|
|
164
|
+
/***/ }),
|
|
165
|
+
|
|
166
|
+
/***/ 51455:
|
|
167
|
+
/***/ ((module) => {
|
|
168
|
+
|
|
169
|
+
module.exports = require("node:fs/promises");
|
|
170
|
+
|
|
171
|
+
/***/ }),
|
|
172
|
+
|
|
173
|
+
/***/ 52665:
|
|
174
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
175
|
+
|
|
176
|
+
// ESM COMPAT FLAG
|
|
177
|
+
__webpack_require__.r(__webpack_exports__);
|
|
178
|
+
|
|
179
|
+
// EXPORTS
|
|
180
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
181
|
+
OPTIONS: () => (/* binding */ OPTIONS),
|
|
182
|
+
POST: () => (/* binding */ POST)
|
|
140
183
|
});
|
|
141
|
-
// Pull out the exports that we need to expose from the module. This should
|
|
142
|
-
// be eliminated when we've moved the other routes to the new format. These
|
|
143
|
-
// are used to hook into the route.
|
|
144
|
-
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
145
|
-
function patchFetch() {
|
|
146
|
-
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
147
|
-
workAsyncStorage,
|
|
148
|
-
workUnitAsyncStorage
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
184
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
srcPage,
|
|
170
|
-
multiZoneDraftMode
|
|
171
|
-
});
|
|
172
|
-
if (!prepareResult) {
|
|
173
|
-
res.statusCode = 400;
|
|
174
|
-
res.end('Bad Request');
|
|
175
|
-
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
176
|
-
return null;
|
|
177
|
-
}
|
|
178
|
-
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
179
|
-
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
180
|
-
// Only this route's prerenders can establish ISR or admit generated params.
|
|
181
|
-
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]));
|
|
182
|
-
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
183
|
-
const render404 = async ()=>{
|
|
184
|
-
// TODO: should route-module itself handle rendering the 404
|
|
185
|
-
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
186
|
-
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
187
|
-
} else {
|
|
188
|
-
res.end('This page could not be found');
|
|
189
|
-
}
|
|
190
|
-
return null;
|
|
191
|
-
};
|
|
192
|
-
if (isIsr && !isDraftMode) {
|
|
193
|
-
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
194
|
-
if (prerenderInfo) {
|
|
195
|
-
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
196
|
-
if (nextConfig.adapterPath) {
|
|
197
|
-
return await render404();
|
|
198
|
-
}
|
|
199
|
-
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
let cacheKey = null;
|
|
204
|
-
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
205
|
-
cacheKey = resolvedPathname;
|
|
206
|
-
// ensure /index and / is normalized to one key
|
|
207
|
-
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
208
|
-
}
|
|
209
|
-
// Before rendering (which initializes component tree modules), we have to
|
|
210
|
-
// set the reference manifests to our global store so Server Action's
|
|
211
|
-
// encryption util can access to them at the top level of the page module.
|
|
212
|
-
if (serverActionsManifest && clientReferenceManifest) {
|
|
213
|
-
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
214
|
-
page: srcPage,
|
|
215
|
-
clientReferenceManifest,
|
|
216
|
-
serverActionsManifest
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
const method = req.method || 'GET';
|
|
220
|
-
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
221
|
-
const activeSpan = tracer.getActiveScopeSpan();
|
|
222
|
-
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
223
|
-
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
224
|
-
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
225
|
-
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
226
|
-
globalThis.__incrementalCache = incrementalCache;
|
|
227
|
-
const context = {
|
|
228
|
-
params,
|
|
229
|
-
previewProps,
|
|
230
|
-
renderOpts: {
|
|
231
|
-
experimental: {
|
|
232
|
-
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
233
|
-
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
234
|
-
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
235
|
-
},
|
|
236
|
-
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
237
|
-
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
238
|
-
isDraftMode,
|
|
239
|
-
incrementalCache,
|
|
240
|
-
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
241
|
-
cacheLifeProfiles: nextConfig.cacheLife,
|
|
242
|
-
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
243
|
-
waitUntil: ctx.waitUntil,
|
|
244
|
-
onClose: (cb)=>{
|
|
245
|
-
res.on('close', cb);
|
|
246
|
-
},
|
|
247
|
-
onAfterTaskError: undefined
|
|
248
|
-
},
|
|
249
|
-
sharedContext: {
|
|
250
|
-
buildId,
|
|
251
|
-
deploymentId
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
255
|
-
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
256
|
-
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));
|
|
257
|
-
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
258
|
-
try {
|
|
259
|
-
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
260
|
-
res.statusCode = 404;
|
|
261
|
-
// on-demand revalidate always sets this header
|
|
262
|
-
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
263
|
-
res.end('This page could not be found');
|
|
264
|
-
return null;
|
|
265
|
-
}
|
|
266
|
-
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
267
|
-
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
268
|
-
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
269
|
-
// Attempt using provided waitUntil if available
|
|
270
|
-
// if it's not we fallback to sendResponse's handling
|
|
271
|
-
if (pendingWaitUntil) {
|
|
272
|
-
if (ctx.waitUntil) {
|
|
273
|
-
ctx.waitUntil(pendingWaitUntil);
|
|
274
|
-
pendingWaitUntil = undefined;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
const cacheTags = context.renderOpts.collectedTags;
|
|
278
|
-
// If the request is for a static response, we can cache it so long
|
|
279
|
-
// as it's not edge.
|
|
280
|
-
if (isIsr) {
|
|
281
|
-
const blob = await response.blob();
|
|
282
|
-
// Copy the headers from the response.
|
|
283
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
284
|
-
if (cacheTags) {
|
|
285
|
-
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
286
|
-
}
|
|
287
|
-
if (!headers['content-type'] && blob.type) {
|
|
288
|
-
headers['content-type'] = blob.type;
|
|
289
|
-
}
|
|
290
|
-
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
291
|
-
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
|
|
292
|
-
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
293
|
-
// build-time fallback in `build/index.ts` so cache entries
|
|
294
|
-
// and the response Cache-Control header agree on the route's
|
|
295
|
-
// effective expire. Routes that opt out of revalidation
|
|
296
|
-
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
297
|
-
// keep `expire: undefined`.
|
|
298
|
-
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
299
|
-
// Create the cache entry for the response.
|
|
300
|
-
const cacheEntry = {
|
|
301
|
-
value: {
|
|
302
|
-
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
303
|
-
status: response.status,
|
|
304
|
-
body: Buffer.from(await blob.arrayBuffer()),
|
|
305
|
-
headers
|
|
306
|
-
},
|
|
307
|
-
cacheControl: {
|
|
308
|
-
revalidate,
|
|
309
|
-
expire
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
return cacheEntry;
|
|
313
|
-
} else {
|
|
314
|
-
// send response without caching if not ISR
|
|
315
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
316
|
-
return null;
|
|
317
|
-
}
|
|
318
|
-
} catch (err) {
|
|
319
|
-
// if this is a background revalidate we need to report
|
|
320
|
-
// the request error here as it won't be bubbled
|
|
321
|
-
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
322
|
-
const silenceLog = false;
|
|
323
|
-
await routeModule.onRequestError(req, err, {
|
|
324
|
-
routerKind: 'App Router',
|
|
325
|
-
routePath: srcPage,
|
|
326
|
-
routeType: 'route',
|
|
327
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
328
|
-
isStaticGeneration: cacheKey !== null,
|
|
329
|
-
isOnDemandRevalidate
|
|
330
|
-
})
|
|
331
|
-
}, silenceLog, routerServerContext);
|
|
332
|
-
}
|
|
333
|
-
throw err;
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
const handleResponse = async (currentSpan, parentSpan)=>{
|
|
337
|
-
try {
|
|
338
|
-
var _cacheEntry_value;
|
|
339
|
-
const cacheEntry = await routeModule.handleResponse({
|
|
340
|
-
req,
|
|
341
|
-
nextConfig,
|
|
342
|
-
cacheKey,
|
|
343
|
-
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
344
|
-
isFallback: false,
|
|
345
|
-
previewProps,
|
|
346
|
-
prerenderManifest,
|
|
347
|
-
isRoutePPREnabled: false,
|
|
348
|
-
isOnDemandRevalidate,
|
|
349
|
-
revalidateOnlyGenerated,
|
|
350
|
-
responseGenerator,
|
|
351
|
-
waitUntil: ctx.waitUntil,
|
|
352
|
-
isMinimalMode
|
|
353
|
-
});
|
|
354
|
-
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
355
|
-
throw cacheEntry.error;
|
|
356
|
-
}
|
|
357
|
-
// we don't create a cacheEntry for ISR
|
|
358
|
-
if (!isIsr) {
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
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) {
|
|
362
|
-
var _cacheEntry_value1;
|
|
363
|
-
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
364
|
-
}
|
|
365
|
-
if (!isMinimalMode) {
|
|
366
|
-
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
367
|
-
}
|
|
368
|
-
// Draft mode should never be cached
|
|
369
|
-
if (isDraftMode) {
|
|
370
|
-
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
371
|
-
}
|
|
372
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
373
|
-
if (!(isMinimalMode && isIsr)) {
|
|
374
|
-
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
375
|
-
}
|
|
376
|
-
// If cache control is already set on the response we don't
|
|
377
|
-
// override it to allow users to customize it via next.config
|
|
378
|
-
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
379
|
-
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
380
|
-
}
|
|
381
|
-
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'.
|
|
382
|
-
new Response(cacheEntry.value.body, {
|
|
383
|
-
headers,
|
|
384
|
-
status: cacheEntry.value.status || 200
|
|
385
|
-
}));
|
|
386
|
-
return;
|
|
387
|
-
} catch (err) {
|
|
388
|
-
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
389
|
-
const silenceLog = false;
|
|
390
|
-
await routeModule.onRequestError(req, err, {
|
|
391
|
-
routerKind: 'App Router',
|
|
392
|
-
routePath: normalizedSrcPage,
|
|
393
|
-
routeType: 'route',
|
|
394
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
395
|
-
isStaticGeneration: cacheKey !== null,
|
|
396
|
-
isOnDemandRevalidate
|
|
397
|
-
})
|
|
398
|
-
}, silenceLog, routerServerContext);
|
|
399
|
-
}
|
|
400
|
-
// rethrow so that we can handle serving error page
|
|
401
|
-
// If this is during static generation, throw the error again.
|
|
402
|
-
if (isIsr) throw err;
|
|
403
|
-
// Otherwise, send a 500 response unless the original response has
|
|
404
|
-
// already committed. In that case, preserve its status code for
|
|
405
|
-
// telemetry while still recording the failure and terminating a response
|
|
406
|
-
// that the failed pipeline left open.
|
|
407
|
-
if (res.headersSent) {
|
|
408
|
-
if (currentSpan) {
|
|
409
|
-
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
410
|
-
currentSpan.recordException(error);
|
|
411
|
-
currentSpan.setStatus({
|
|
412
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
413
|
-
message: error.message
|
|
414
|
-
});
|
|
415
|
-
currentSpan.setAttribute('error.type', error.name);
|
|
416
|
-
}
|
|
417
|
-
if (!res.writableEnded && !res.destroyed) {
|
|
418
|
-
res.end();
|
|
419
|
-
}
|
|
420
|
-
} else {
|
|
421
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
422
|
-
status: 500
|
|
423
|
-
}));
|
|
424
|
-
}
|
|
425
|
-
return;
|
|
426
|
-
} finally{
|
|
427
|
-
;
|
|
428
|
-
(()=>{
|
|
429
|
-
if (!currentSpan) {
|
|
430
|
-
return;
|
|
431
|
-
}
|
|
432
|
-
let statusCode = res.statusCode;
|
|
433
|
-
currentSpan.setAttributes({
|
|
434
|
-
'http.status_code': statusCode,
|
|
435
|
-
'next.rsc': false
|
|
436
|
-
});
|
|
437
|
-
if (statusCode && statusCode >= 500) {
|
|
438
|
-
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
439
|
-
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
440
|
-
currentSpan.setStatus({
|
|
441
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
442
|
-
});
|
|
443
|
-
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
444
|
-
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
445
|
-
}
|
|
446
|
-
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
447
|
-
// We were unable to get attributes, probably OTEL is not enabled
|
|
448
|
-
if (!rootSpanAttributes) {
|
|
449
|
-
return;
|
|
450
|
-
}
|
|
451
|
-
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
452
|
-
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
453
|
-
return;
|
|
454
|
-
}
|
|
455
|
-
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
456
|
-
const name = `${method} ${route}`;
|
|
457
|
-
currentSpan.setAttributes({
|
|
458
|
-
'next.route': route,
|
|
459
|
-
'http.route': route,
|
|
460
|
-
'next.span_name': name
|
|
461
|
-
});
|
|
462
|
-
currentSpan.updateName(name);
|
|
463
|
-
// Propagate http.route to the parent span if one exists (e.g.
|
|
464
|
-
// a platform-created HTTP span in adapter deployments).
|
|
465
|
-
if (parentSpan && parentSpan !== currentSpan) {
|
|
466
|
-
parentSpan.setAttribute('http.route', route);
|
|
467
|
-
parentSpan.updateName(name);
|
|
468
|
-
}
|
|
469
|
-
})();
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
// TODO: activeSpan code path is for when wrapped by
|
|
473
|
-
// next-server can be removed when this is no longer used
|
|
474
|
-
if (isWrappedByNextServer && activeSpan) {
|
|
475
|
-
await handleResponse(activeSpan, undefined);
|
|
476
|
-
} else {
|
|
477
|
-
let parentSpan = tracer.getActiveScopeSpan();
|
|
478
|
-
await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
|
|
479
|
-
spanName: `${method} ${srcPage}`,
|
|
480
|
-
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
|
|
481
|
-
attributes: {
|
|
482
|
-
'http.method': method,
|
|
483
|
-
'http.target': req.url
|
|
484
|
-
}
|
|
485
|
-
}, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
//# sourceMappingURL=app-route.js.map
|
|
185
|
+
// EXTERNAL MODULE: ./node_modules/zod/v4/classic/schemas.js + 4 modules
|
|
186
|
+
var schemas = __webpack_require__(97377);
|
|
187
|
+
// EXTERNAL MODULE: ./lib/auth/access.ts
|
|
188
|
+
var access = __webpack_require__(34909);
|
|
189
|
+
// EXTERNAL MODULE: ./lib/stores/threads.ts
|
|
190
|
+
var threads = __webpack_require__(83042);
|
|
191
|
+
// EXTERNAL MODULE: ./lib/stores/agent-configs.ts
|
|
192
|
+
var agent_configs = __webpack_require__(41720);
|
|
193
|
+
// EXTERNAL MODULE: ./lib/notifications/bus.ts
|
|
194
|
+
var bus = __webpack_require__(76445);
|
|
195
|
+
// EXTERNAL MODULE: ./lib/agents/agent-turn.ts
|
|
196
|
+
var agent_turn = __webpack_require__(62032);
|
|
197
|
+
// EXTERNAL MODULE: ./lib/attachments/spill.ts + 1 modules
|
|
198
|
+
var spill = __webpack_require__(58154);
|
|
199
|
+
// EXTERNAL MODULE: ./lib/utils/error.ts
|
|
200
|
+
var error = __webpack_require__(22032);
|
|
201
|
+
;// ./lib/api/page-capture.ts
|
|
490
202
|
|
|
491
203
|
|
|
492
|
-
/***/ }),
|
|
493
204
|
|
|
494
|
-
/***/ 16698:
|
|
495
|
-
/***/ ((module) => {
|
|
496
205
|
|
|
497
|
-
module.exports = require("node:async_hooks");
|
|
498
206
|
|
|
499
|
-
/***/ }),
|
|
500
207
|
|
|
501
|
-
/***/ 19225:
|
|
502
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
503
208
|
|
|
504
209
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
210
|
+
// 100KB UTF-8 cap on captured text. The LLM context window is the real
|
|
211
|
+
// constraint; this cap exists to keep a runaway "<body>" pick from
|
|
212
|
+
// trashing the conversation. See ADR-0018.
|
|
213
|
+
const MAX_TEXT_BYTES = 100000;
|
|
214
|
+
// Hard cap on the inline element screenshot (base64 chars). 4 MB of
|
|
215
|
+
// base64 ≈ 3 MB decoded — generous for a single cropped element while
|
|
216
|
+
// still bounding the SQLite row and the LLM vision payload.
|
|
217
|
+
const MAX_SCREENSHOT_B64 = 4000000;
|
|
218
|
+
// Preamble prepended to the LLM call for the silent observer run.
|
|
219
|
+
// The captured content is already persisted in the DB — this wrapper
|
|
220
|
+
// instructs the agent to observe without replying, matching bridge
|
|
221
|
+
// silent/observer mode semantics. The user can ask about the content
|
|
222
|
+
// in a later normal turn.
|
|
223
|
+
const SILENT_CAPTURE_PREAMBLE = "[Silent page capture — observer mode] " + "A web page was just captured to your context by the user's browser extension. " + "Silently review it. You must NOT reply with content now — the user will ask questions later. " + "If nothing requires immediate attention, reply with exactly the single token NO_REPLY.";
|
|
224
|
+
const Body = schemas/* object */.Ikc({
|
|
225
|
+
url: schemas/* string */.YjP().url(),
|
|
226
|
+
title: schemas/* string */.YjP().max(500).optional(),
|
|
227
|
+
selector: schemas/* string */.YjP().max(2000).optional(),
|
|
228
|
+
tagName: schemas/* string */.YjP().max(64).optional(),
|
|
229
|
+
text: schemas/* string */.YjP(),
|
|
230
|
+
capturedAt: schemas/* string */.YjP().datetime(),
|
|
231
|
+
// Optional explicit agent target. When the browser extension has a
|
|
232
|
+
// "send to" agent picked in its popup, the SW forwards that id here so
|
|
233
|
+
// the capture lands in *that* agent's chat instead of silently routing
|
|
234
|
+
// to the system default.
|
|
235
|
+
agent_id: schemas/* string */.YjP().min(1).max(200).optional(),
|
|
236
|
+
// Optional base64-encoded PNG of just the picked element (no data: URL
|
|
237
|
+
// prefix). The content script crops `chrome.tabs.captureVisibleTab`
|
|
238
|
+
// to the element bounding box before sending. When present, it is
|
|
239
|
+
// attached to the persisted user message as an image ContentPart so
|
|
240
|
+
// the chat UI renders it inline and vision-capable agents can see it.
|
|
241
|
+
screenshot: schemas/* string */.YjP().regex(/^[A-Za-z0-9+/=]+$/).max(MAX_SCREENSHOT_B64).optional(),
|
|
242
|
+
screenshotMediaType: schemas/* string */.YjP().regex(/^image\/[a-z0-9.+-]+$/).max(64).optional()
|
|
243
|
+
});
|
|
244
|
+
function truncateUtf8(s, maxBytes) {
|
|
245
|
+
const original = Buffer.byteLength(s, "utf8");
|
|
246
|
+
if (original <= maxBytes) {
|
|
247
|
+
return {
|
|
248
|
+
text: s,
|
|
249
|
+
truncated: false,
|
|
250
|
+
originalBytes: original
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
// Trim to byte boundary by encoding then slicing then decoding without
|
|
254
|
+
// splitting a multibyte sequence. Buffer.toString("utf8") replaces an
|
|
255
|
+
// incomplete trailing sequence with U+FFFD, which is acceptable here.
|
|
256
|
+
const buf = Buffer.from(s, "utf8").subarray(0, maxBytes);
|
|
257
|
+
return {
|
|
258
|
+
text: buf.toString("utf8"),
|
|
259
|
+
truncated: true,
|
|
260
|
+
originalBytes: original
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
function pickThread(explicitAgentId) {
|
|
264
|
+
const requested = typeof explicitAgentId === "string" ? explicitAgentId.trim() : "";
|
|
265
|
+
const explicit = requested ? (0,agent_configs/* listAgentConfigs */.zb)().find((a)=>a.id === requested) ?? null : null;
|
|
266
|
+
const def = (0,agent_configs/* getDefaultAgentConfig */.vU)();
|
|
267
|
+
const agent = explicit ?? def ?? (0,agent_configs/* listAgentConfigs */.zb)()[0] ?? null;
|
|
268
|
+
if (!agent) return {
|
|
269
|
+
error: "no-agent"
|
|
270
|
+
};
|
|
271
|
+
const recent = (0,threads/* listThreadsByAgent */.Iz)(agent.id, 1);
|
|
272
|
+
if (recent.length > 0) {
|
|
273
|
+
return {
|
|
274
|
+
thread_id: recent[0].thread_id,
|
|
275
|
+
agent_id: agent.id,
|
|
276
|
+
agent_name: agent.name,
|
|
277
|
+
thread_title: recent[0].title,
|
|
278
|
+
created: false
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
const t = (0,threads/* createThread */.Nw)(agent.id, "Browser captures");
|
|
282
|
+
return {
|
|
283
|
+
thread_id: t.thread_id,
|
|
284
|
+
agent_id: agent.id,
|
|
285
|
+
agent_name: agent.name,
|
|
286
|
+
thread_title: t.title,
|
|
287
|
+
created: true
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
function composeBody(args) {
|
|
291
|
+
const heading = args.title ? `📎 Captured from [${args.title}](${args.url})` : `📎 Captured from <${args.url}>`;
|
|
292
|
+
const lines = [
|
|
293
|
+
heading
|
|
294
|
+
];
|
|
295
|
+
if (args.selector) lines.push(`Element: \`${args.selector}\``);
|
|
296
|
+
if (args.hasScreenshot) lines.push("Screenshot attached.");
|
|
297
|
+
if (args.truncated) {
|
|
298
|
+
lines.push(`> ⚠ Truncated to ${MAX_TEXT_BYTES.toLocaleString()} bytes (original was ${args.originalBytes.toLocaleString()} bytes)`);
|
|
299
|
+
}
|
|
300
|
+
lines.push("", "---", "", args.text);
|
|
301
|
+
return lines.join("\n");
|
|
302
|
+
}
|
|
303
|
+
async function handlePageCapture(req) {
|
|
304
|
+
if (!(0,access/* isLoopbackRequest */.XH)(req)) {
|
|
305
|
+
return new Response(JSON.stringify({
|
|
306
|
+
error: "loopback only"
|
|
307
|
+
}), {
|
|
308
|
+
status: 403,
|
|
309
|
+
headers: {
|
|
310
|
+
"content-type": "application/json"
|
|
510
311
|
}
|
|
511
|
-
}
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
let raw;
|
|
315
|
+
try {
|
|
316
|
+
raw = await req.json();
|
|
317
|
+
} catch {
|
|
318
|
+
return new Response(JSON.stringify({
|
|
319
|
+
error: "Request body must be valid JSON"
|
|
320
|
+
}), {
|
|
321
|
+
status: 400,
|
|
322
|
+
headers: {
|
|
323
|
+
"content-type": "application/json"
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
const parsed = Body.safeParse(raw);
|
|
328
|
+
if (!parsed.success) {
|
|
329
|
+
return new Response(JSON.stringify({
|
|
330
|
+
error: parsed.error.issues[0]?.message ?? "invalid body"
|
|
331
|
+
}), {
|
|
332
|
+
status: 400,
|
|
333
|
+
headers: {
|
|
334
|
+
"content-type": "application/json"
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
const input = parsed.data;
|
|
339
|
+
const picked = pickThread(input.agent_id);
|
|
340
|
+
if ("error" in picked) {
|
|
341
|
+
return new Response(JSON.stringify({
|
|
342
|
+
error: "no agent configured"
|
|
343
|
+
}), {
|
|
344
|
+
status: 503,
|
|
345
|
+
headers: {
|
|
346
|
+
"content-type": "application/json"
|
|
347
|
+
}
|
|
348
|
+
});
|
|
512
349
|
}
|
|
350
|
+
const { thread_id, agent_id, agent_name, thread_title, created } = picked;
|
|
351
|
+
const { text, truncated, originalBytes } = truncateUtf8(input.text, MAX_TEXT_BYTES);
|
|
352
|
+
const messageBody = composeBody({
|
|
353
|
+
url: input.url,
|
|
354
|
+
title: input.title,
|
|
355
|
+
selector: input.selector,
|
|
356
|
+
text,
|
|
357
|
+
truncated,
|
|
358
|
+
originalBytes,
|
|
359
|
+
hasScreenshot: Boolean(input.screenshot)
|
|
360
|
+
});
|
|
361
|
+
// When a screenshot is included, persist the user turn as a multipart
|
|
362
|
+
// ContentPart[] (text + image_ref) — that's the same shape the chat UI
|
|
363
|
+
// and agent runner expect for images, so the picture renders in the
|
|
364
|
+
// bubble on reload and vision-capable models can see it on the silent
|
|
365
|
+
// observer turn. The base64 payload is spilled to `<dataDir>/files/`
|
|
366
|
+
// and the message row stores only the ref (see ADR-0065). Without a
|
|
367
|
+
// screenshot we keep the legacy string body to avoid touching messages
|
|
368
|
+
// that never had an image.
|
|
369
|
+
const screenshotPart = input.screenshot ? await (0,spill/* spillImagePart */.Jb)({
|
|
370
|
+
type: "image",
|
|
371
|
+
media_type: input.screenshotMediaType ?? "image/png",
|
|
372
|
+
data: input.screenshot
|
|
373
|
+
}) : null;
|
|
374
|
+
const storedContent = screenshotPart ? JSON.stringify([
|
|
375
|
+
{
|
|
376
|
+
type: "text",
|
|
377
|
+
text: messageBody
|
|
378
|
+
},
|
|
379
|
+
screenshotPart
|
|
380
|
+
]) : messageBody;
|
|
381
|
+
const msg = (0,threads/* addMessage */.tj)(thread_id, "user", storedContent, undefined, "page_capture");
|
|
382
|
+
// Fire a silent observer run so the agent ingests the captured context
|
|
383
|
+
// without being forced to reply — matching bridge silent/observer mode.
|
|
384
|
+
// The user message is already persisted above; skip_persist_user_message
|
|
385
|
+
// prevents a duplicate. Fire-and-forget so the HTTP response is instant.
|
|
386
|
+
void (0,agent_turn.runAgentTurn)({
|
|
387
|
+
thread_id,
|
|
388
|
+
queue_source: "extension",
|
|
389
|
+
message: `${SILENT_CAPTURE_PREAMBLE}\n\n${messageBody}`,
|
|
390
|
+
attachments: screenshotPart ? [
|
|
391
|
+
screenshotPart
|
|
392
|
+
] : undefined,
|
|
393
|
+
user_category: "page_capture",
|
|
394
|
+
assistant_category: "page_capture",
|
|
395
|
+
silent: true,
|
|
396
|
+
skip_persist_user_message: true
|
|
397
|
+
}).catch((err)=>{
|
|
398
|
+
const m = (0,error/* errorMessage */.g)(err);
|
|
399
|
+
console.warn("[page-capture] silent observer run failed:", m);
|
|
400
|
+
});
|
|
401
|
+
(0,bus/* publish */.mk)({
|
|
402
|
+
type: "thread_message_added",
|
|
403
|
+
thread_id,
|
|
404
|
+
agent_id,
|
|
405
|
+
source: "page_capture",
|
|
406
|
+
ts: Date.now()
|
|
407
|
+
});
|
|
408
|
+
return new Response(JSON.stringify({
|
|
409
|
+
thread_id,
|
|
410
|
+
msg_id: msg.msg_id,
|
|
411
|
+
agent_id,
|
|
412
|
+
agent_name,
|
|
413
|
+
thread_title,
|
|
414
|
+
created_thread: created,
|
|
415
|
+
truncated,
|
|
416
|
+
originalBytes
|
|
417
|
+
}), {
|
|
418
|
+
status: 200,
|
|
419
|
+
headers: {
|
|
420
|
+
"content-type": "application/json",
|
|
421
|
+
// Echo back so the extension's preflight succeeds. The actual
|
|
422
|
+
// origin gate for this route is the loopback Host check above.
|
|
423
|
+
"access-control-allow-origin": req.headers.get("origin") ?? "*",
|
|
424
|
+
"access-control-allow-credentials": "false",
|
|
425
|
+
"vary": "origin"
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
function handlePageCaptureOptions(req) {
|
|
430
|
+
return new Response(null, {
|
|
431
|
+
status: 204,
|
|
432
|
+
headers: {
|
|
433
|
+
"access-control-allow-origin": req.headers.get("origin") ?? "*",
|
|
434
|
+
"access-control-allow-methods": "POST, OPTIONS",
|
|
435
|
+
"access-control-allow-headers": "content-type",
|
|
436
|
+
"access-control-max-age": "600",
|
|
437
|
+
"vary": "origin"
|
|
438
|
+
}
|
|
439
|
+
});
|
|
513
440
|
}
|
|
514
441
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
/***/ 28354:
|
|
527
|
-
/***/ ((module) => {
|
|
528
|
-
|
|
529
|
-
module.exports = require("util");
|
|
530
|
-
|
|
531
|
-
/***/ }),
|
|
532
|
-
|
|
533
|
-
/***/ 29021:
|
|
534
|
-
/***/ ((module) => {
|
|
442
|
+
;// ./app/api/v1/page-capture/route.ts
|
|
443
|
+
/**
|
|
444
|
+
* @public — `POST /api/v1/page-capture` (with CORS `OPTIONS` preflight)
|
|
445
|
+
*
|
|
446
|
+
* Browser-extension upload endpoint: receives the active page's URL,
|
|
447
|
+
* title, and selected/full text and routes it into the active thread.
|
|
448
|
+
* See `docs/api.md`.
|
|
449
|
+
*/
|
|
450
|
+
const POST = handlePageCapture;
|
|
451
|
+
const OPTIONS = handlePageCaptureOptions;
|
|
535
452
|
|
|
536
|
-
module.exports = require("fs");
|
|
537
453
|
|
|
538
454
|
/***/ }),
|
|
539
455
|
|
|
540
|
-
/***/
|
|
456
|
+
/***/ 55511:
|
|
541
457
|
/***/ ((module) => {
|
|
542
458
|
|
|
543
|
-
module.exports = require("
|
|
459
|
+
module.exports = require("crypto");
|
|
544
460
|
|
|
545
461
|
/***/ }),
|
|
546
462
|
|
|
547
|
-
/***/
|
|
463
|
+
/***/ 55591:
|
|
548
464
|
/***/ ((module) => {
|
|
549
465
|
|
|
550
|
-
module.exports = require("
|
|
466
|
+
module.exports = require("https");
|
|
551
467
|
|
|
552
468
|
/***/ }),
|
|
553
469
|
|
|
554
|
-
/***/
|
|
470
|
+
/***/ 57075:
|
|
555
471
|
/***/ ((module) => {
|
|
556
472
|
|
|
557
|
-
module.exports = require("
|
|
473
|
+
module.exports = require("node:stream");
|
|
558
474
|
|
|
559
475
|
/***/ }),
|
|
560
476
|
|
|
561
|
-
/***/
|
|
477
|
+
/***/ 57975:
|
|
562
478
|
/***/ ((module) => {
|
|
563
479
|
|
|
564
|
-
module.exports = require("node:
|
|
480
|
+
module.exports = require("node:util");
|
|
565
481
|
|
|
566
482
|
/***/ }),
|
|
567
483
|
|
|
568
|
-
/***/
|
|
484
|
+
/***/ 63033:
|
|
569
485
|
/***/ ((module) => {
|
|
570
486
|
|
|
571
|
-
module.exports = require("
|
|
487
|
+
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
572
488
|
|
|
573
489
|
/***/ }),
|
|
574
490
|
|
|
575
|
-
/***/
|
|
576
|
-
/***/ ((
|
|
577
|
-
|
|
578
|
-
module.exports = require("node:dns");
|
|
491
|
+
/***/ 71467:
|
|
492
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
579
493
|
|
|
580
|
-
|
|
494
|
+
__webpack_require__.r(__webpack_exports__);
|
|
495
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
496
|
+
/* harmony export */ handler: () => (/* binding */ handler),
|
|
497
|
+
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
498
|
+
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
499
|
+
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
500
|
+
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
501
|
+
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
502
|
+
/* harmony export */ });
|
|
503
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
|
|
504
|
+
/* 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__);
|
|
505
|
+
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
|
|
506
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
507
|
+
/* 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__);
|
|
508
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
|
|
509
|
+
/* 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__);
|
|
510
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
|
|
511
|
+
/* 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__);
|
|
512
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
|
|
513
|
+
/* 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__);
|
|
514
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
515
|
+
/* 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__);
|
|
516
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
517
|
+
/* 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__);
|
|
518
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
519
|
+
/* 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__);
|
|
520
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
521
|
+
/* 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__);
|
|
522
|
+
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
523
|
+
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
524
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
525
|
+
/* 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__);
|
|
526
|
+
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
527
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
528
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
529
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
530
|
+
/* 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__);
|
|
531
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
532
|
+
/* 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__);
|
|
533
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
534
|
+
/* 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__);
|
|
581
535
|
|
|
582
|
-
/***/ 42482:
|
|
583
|
-
/***/ ((module) => {
|
|
584
536
|
|
|
585
|
-
module.exports = import("sharp");;
|
|
586
537
|
|
|
587
|
-
/***/ }),
|
|
588
538
|
|
|
589
|
-
/***/ 44708:
|
|
590
|
-
/***/ ((module) => {
|
|
591
539
|
|
|
592
|
-
module.exports = require("node:https");
|
|
593
540
|
|
|
594
|
-
/***/ }),
|
|
595
541
|
|
|
596
|
-
/***/ 44870:
|
|
597
|
-
/***/ ((module) => {
|
|
598
542
|
|
|
599
|
-
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
600
543
|
|
|
601
|
-
/***/ }),
|
|
602
544
|
|
|
603
|
-
/***/ 48161:
|
|
604
|
-
/***/ ((module) => {
|
|
605
545
|
|
|
606
|
-
module.exports = require("node:os");
|
|
607
546
|
|
|
608
|
-
/***/ }),
|
|
609
547
|
|
|
610
|
-
/***/ 51455:
|
|
611
|
-
/***/ ((module) => {
|
|
612
548
|
|
|
613
|
-
module.exports = require("node:fs/promises");
|
|
614
549
|
|
|
615
|
-
/***/ }),
|
|
616
550
|
|
|
617
|
-
/***/ 52665:
|
|
618
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
619
551
|
|
|
620
|
-
// ESM COMPAT FLAG
|
|
621
|
-
__webpack_require__.r(__webpack_exports__);
|
|
622
552
|
|
|
623
|
-
//
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
553
|
+
// We inject the nextConfigOutput here so that we can use them in the route
|
|
554
|
+
// module.
|
|
555
|
+
const nextConfigOutput = "standalone"
|
|
556
|
+
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
557
|
+
definition: {
|
|
558
|
+
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
559
|
+
page: "/api/v1/page-capture/route",
|
|
560
|
+
pathname: "/api/v1/page-capture",
|
|
561
|
+
filename: "route",
|
|
562
|
+
bundlePath: "app/api/v1/page-capture/route"
|
|
563
|
+
},
|
|
564
|
+
distDir: ".next" || 0,
|
|
565
|
+
relativeProjectDir: false || '',
|
|
566
|
+
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/page-capture/route.ts",
|
|
567
|
+
nextConfigOutput,
|
|
568
|
+
// The lazy require factory ensures that:
|
|
569
|
+
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
570
|
+
// correctly attributing module load time to application-code rather than
|
|
571
|
+
// framework internals.
|
|
572
|
+
// - In all modes: async modules (route files with top-level await) are
|
|
573
|
+
// handled correctly — require() returns a Promise for such modules, which
|
|
574
|
+
// ensureUserland() awaits before the first request is handled.
|
|
575
|
+
userland: ()=>__webpack_require__(52665),
|
|
576
|
+
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
577
|
+
// server HMR updates are picked up without re-executing the entry chunk.
|
|
578
|
+
// Using require() (synchronous) avoids adding async overhead that would be
|
|
579
|
+
// incorrectly attributed to application-code time in devRequestTiming.
|
|
580
|
+
... false ? 0 : {}
|
|
627
581
|
});
|
|
582
|
+
// Pull out the exports that we need to expose from the module. This should
|
|
583
|
+
// be eliminated when we've moved the other routes to the new format. These
|
|
584
|
+
// are used to hook into the route.
|
|
585
|
+
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
586
|
+
function patchFetch() {
|
|
587
|
+
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
588
|
+
workAsyncStorage,
|
|
589
|
+
workUnitAsyncStorage
|
|
590
|
+
});
|
|
591
|
+
}
|
|
628
592
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
var access = __webpack_require__(34909);
|
|
633
|
-
// EXTERNAL MODULE: ./lib/stores/threads.ts
|
|
634
|
-
var threads = __webpack_require__(83042);
|
|
635
|
-
// EXTERNAL MODULE: ./lib/stores/agent-configs.ts
|
|
636
|
-
var agent_configs = __webpack_require__(41720);
|
|
637
|
-
// EXTERNAL MODULE: ./lib/notifications/bus.ts
|
|
638
|
-
var bus = __webpack_require__(76445);
|
|
639
|
-
// EXTERNAL MODULE: ./lib/agents/agent-turn.ts
|
|
640
|
-
var agent_turn = __webpack_require__(62032);
|
|
641
|
-
// EXTERNAL MODULE: ./lib/attachments/spill.ts + 1 modules
|
|
642
|
-
var spill = __webpack_require__(58154);
|
|
643
|
-
// EXTERNAL MODULE: ./lib/utils/error.ts
|
|
644
|
-
var error = __webpack_require__(22032);
|
|
645
|
-
;// ./lib/api/page-capture.ts
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
// 100KB UTF-8 cap on captured text. The LLM context window is the real
|
|
655
|
-
// constraint; this cap exists to keep a runaway "<body>" pick from
|
|
656
|
-
// trashing the conversation. See ADR-0018.
|
|
657
|
-
const MAX_TEXT_BYTES = 100000;
|
|
658
|
-
// Hard cap on the inline element screenshot (base64 chars). 4 MB of
|
|
659
|
-
// base64 ≈ 3 MB decoded — generous for a single cropped element while
|
|
660
|
-
// still bounding the SQLite row and the LLM vision payload.
|
|
661
|
-
const MAX_SCREENSHOT_B64 = 4000000;
|
|
662
|
-
// Preamble prepended to the LLM call for the silent observer run.
|
|
663
|
-
// The captured content is already persisted in the DB — this wrapper
|
|
664
|
-
// instructs the agent to observe without replying, matching bridge
|
|
665
|
-
// silent/observer mode semantics. The user can ask about the content
|
|
666
|
-
// in a later normal turn.
|
|
667
|
-
const SILENT_CAPTURE_PREAMBLE = "[Silent page capture — observer mode] " + "A web page was just captured to your context by the user's browser extension. " + "Silently review it. You must NOT reply with content now — the user will ask questions later. " + "If nothing requires immediate attention, reply with exactly the single token NO_REPLY.";
|
|
668
|
-
const Body = schemas/* object */.Ikc({
|
|
669
|
-
url: schemas/* string */.YjP().url(),
|
|
670
|
-
title: schemas/* string */.YjP().max(500).optional(),
|
|
671
|
-
selector: schemas/* string */.YjP().max(2000).optional(),
|
|
672
|
-
tagName: schemas/* string */.YjP().max(64).optional(),
|
|
673
|
-
text: schemas/* string */.YjP(),
|
|
674
|
-
capturedAt: schemas/* string */.YjP().datetime(),
|
|
675
|
-
// Optional explicit agent target. When the browser extension has a
|
|
676
|
-
// "send to" agent picked in its popup, the SW forwards that id here so
|
|
677
|
-
// the capture lands in *that* agent's chat instead of silently routing
|
|
678
|
-
// to the system default.
|
|
679
|
-
agent_id: schemas/* string */.YjP().min(1).max(200).optional(),
|
|
680
|
-
// Optional base64-encoded PNG of just the picked element (no data: URL
|
|
681
|
-
// prefix). The content script crops `chrome.tabs.captureVisibleTab`
|
|
682
|
-
// to the element bounding box before sending. When present, it is
|
|
683
|
-
// attached to the persisted user message as an image ContentPart so
|
|
684
|
-
// the chat UI renders it inline and vision-capable agents can see it.
|
|
685
|
-
screenshot: schemas/* string */.YjP().regex(/^[A-Za-z0-9+/=]+$/).max(MAX_SCREENSHOT_B64).optional(),
|
|
686
|
-
screenshotMediaType: schemas/* string */.YjP().regex(/^image\/[a-z0-9.+-]+$/).max(64).optional()
|
|
687
|
-
});
|
|
688
|
-
function truncateUtf8(s, maxBytes) {
|
|
689
|
-
const original = Buffer.byteLength(s, "utf8");
|
|
690
|
-
if (original <= maxBytes) {
|
|
691
|
-
return {
|
|
692
|
-
text: s,
|
|
693
|
-
truncated: false,
|
|
694
|
-
originalBytes: original
|
|
695
|
-
};
|
|
593
|
+
async function handler(req, res, ctx) {
|
|
594
|
+
if (ctx.requestMeta) {
|
|
595
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
696
596
|
}
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
function pickThread(explicitAgentId) {
|
|
708
|
-
const requested = typeof explicitAgentId === "string" ? explicitAgentId.trim() : "";
|
|
709
|
-
const explicit = requested ? (0,agent_configs/* listAgentConfigs */.zb)().find((a)=>a.id === requested) ?? null : null;
|
|
710
|
-
const def = (0,agent_configs/* getDefaultAgentConfig */.vU)();
|
|
711
|
-
const agent = explicit ?? def ?? (0,agent_configs/* listAgentConfigs */.zb)()[0] ?? null;
|
|
712
|
-
if (!agent) return {
|
|
713
|
-
error: "no-agent"
|
|
714
|
-
};
|
|
715
|
-
const recent = (0,threads/* listThreadsByAgent */.Iz)(agent.id, 1);
|
|
716
|
-
if (recent.length > 0) {
|
|
717
|
-
return {
|
|
718
|
-
thread_id: recent[0].thread_id,
|
|
719
|
-
agent_id: agent.id,
|
|
720
|
-
agent_name: agent.name,
|
|
721
|
-
thread_title: recent[0].title,
|
|
722
|
-
created: false
|
|
723
|
-
};
|
|
597
|
+
if (routeModule.isDev) {
|
|
598
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
599
|
+
}
|
|
600
|
+
let srcPage = "/api/v1/page-capture/route";
|
|
601
|
+
// turbopack doesn't normalize `/index` in the page name
|
|
602
|
+
// so we need to to process dynamic routes properly
|
|
603
|
+
// TODO: fix turbopack providing differing value from webpack
|
|
604
|
+
if (false) {} else if (srcPage === '/index') {
|
|
605
|
+
// we always normalize /index specifically
|
|
606
|
+
srcPage = '/';
|
|
724
607
|
}
|
|
725
|
-
const
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
const heading = args.title ? `📎 Captured from [${args.title}](${args.url})` : `📎 Captured from <${args.url}>`;
|
|
736
|
-
const lines = [
|
|
737
|
-
heading
|
|
738
|
-
];
|
|
739
|
-
if (args.selector) lines.push(`Element: \`${args.selector}\``);
|
|
740
|
-
if (args.hasScreenshot) lines.push("Screenshot attached.");
|
|
741
|
-
if (args.truncated) {
|
|
742
|
-
lines.push(`> ⚠ Truncated to ${MAX_TEXT_BYTES.toLocaleString()} bytes (original was ${args.originalBytes.toLocaleString()} bytes)`);
|
|
608
|
+
const multiZoneDraftMode = false;
|
|
609
|
+
const prepareResult = await routeModule.prepare(req, res, {
|
|
610
|
+
srcPage,
|
|
611
|
+
multiZoneDraftMode
|
|
612
|
+
});
|
|
613
|
+
if (!prepareResult) {
|
|
614
|
+
res.statusCode = 400;
|
|
615
|
+
res.end('Bad Request');
|
|
616
|
+
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
617
|
+
return null;
|
|
743
618
|
}
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
619
|
+
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
620
|
+
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
621
|
+
// Only this route's prerenders can establish ISR or admit generated params.
|
|
622
|
+
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]));
|
|
623
|
+
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
624
|
+
const render404 = async ()=>{
|
|
625
|
+
// TODO: should route-module itself handle rendering the 404
|
|
626
|
+
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
627
|
+
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
628
|
+
} else {
|
|
629
|
+
res.end('This page could not be found');
|
|
630
|
+
}
|
|
631
|
+
return null;
|
|
632
|
+
};
|
|
633
|
+
if (isIsr && !isDraftMode) {
|
|
634
|
+
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
635
|
+
if (prerenderInfo) {
|
|
636
|
+
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
637
|
+
if (nextConfig.adapterPath) {
|
|
638
|
+
return await render404();
|
|
639
|
+
}
|
|
640
|
+
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
755
641
|
}
|
|
756
|
-
}
|
|
642
|
+
}
|
|
757
643
|
}
|
|
758
|
-
let
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
644
|
+
let cacheKey = null;
|
|
645
|
+
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
646
|
+
cacheKey = resolvedPathname;
|
|
647
|
+
// ensure /index and / is normalized to one key
|
|
648
|
+
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
649
|
+
}
|
|
650
|
+
// Before rendering (which initializes component tree modules), we have to
|
|
651
|
+
// set the reference manifests to our global store so Server Action's
|
|
652
|
+
// encryption util can access to them at the top level of the page module.
|
|
653
|
+
if (serverActionsManifest && clientReferenceManifest) {
|
|
654
|
+
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
655
|
+
page: srcPage,
|
|
656
|
+
clientReferenceManifest,
|
|
657
|
+
serverActionsManifest
|
|
769
658
|
});
|
|
770
659
|
}
|
|
771
|
-
const
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
660
|
+
const method = req.method || 'GET';
|
|
661
|
+
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
662
|
+
const activeSpan = tracer.getActiveScopeSpan();
|
|
663
|
+
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
664
|
+
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
665
|
+
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
666
|
+
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
667
|
+
globalThis.__incrementalCache = incrementalCache;
|
|
668
|
+
const context = {
|
|
669
|
+
params,
|
|
670
|
+
previewProps,
|
|
671
|
+
renderOpts: {
|
|
672
|
+
experimental: {
|
|
673
|
+
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
674
|
+
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
675
|
+
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
676
|
+
},
|
|
677
|
+
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
678
|
+
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
679
|
+
isDraftMode,
|
|
680
|
+
incrementalCache,
|
|
681
|
+
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
682
|
+
cacheLifeProfiles: nextConfig.cacheLife,
|
|
683
|
+
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
684
|
+
waitUntil: ctx.waitUntil,
|
|
685
|
+
onClose: (cb)=>{
|
|
686
|
+
res.on('close', cb);
|
|
687
|
+
},
|
|
688
|
+
onAfterTaskError: undefined
|
|
689
|
+
},
|
|
690
|
+
sharedContext: {
|
|
691
|
+
buildId,
|
|
692
|
+
deploymentId
|
|
693
|
+
}
|
|
694
|
+
};
|
|
695
|
+
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
696
|
+
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
697
|
+
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));
|
|
698
|
+
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
699
|
+
try {
|
|
700
|
+
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
701
|
+
res.statusCode = 404;
|
|
702
|
+
// on-demand revalidate always sets this header
|
|
703
|
+
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
704
|
+
res.end('This page could not be found');
|
|
705
|
+
return null;
|
|
706
|
+
}
|
|
707
|
+
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
708
|
+
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
709
|
+
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
710
|
+
// Attempt using provided waitUntil if available
|
|
711
|
+
// if it's not we fallback to sendResponse's handling
|
|
712
|
+
if (pendingWaitUntil) {
|
|
713
|
+
if (ctx.waitUntil) {
|
|
714
|
+
ctx.waitUntil(pendingWaitUntil);
|
|
715
|
+
pendingWaitUntil = undefined;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
const cacheTags = context.renderOpts.collectedTags;
|
|
719
|
+
// If the request is for a static response, we can cache it so long
|
|
720
|
+
// as it's not edge.
|
|
721
|
+
if (isIsr) {
|
|
722
|
+
const blob = await response.blob();
|
|
723
|
+
// Copy the headers from the response.
|
|
724
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
725
|
+
if (cacheTags) {
|
|
726
|
+
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
727
|
+
}
|
|
728
|
+
if (!headers['content-type'] && blob.type) {
|
|
729
|
+
headers['content-type'] = blob.type;
|
|
730
|
+
}
|
|
731
|
+
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
732
|
+
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
|
|
733
|
+
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
734
|
+
// build-time fallback in `build/index.ts` so cache entries
|
|
735
|
+
// and the response Cache-Control header agree on the route's
|
|
736
|
+
// effective expire. Routes that opt out of revalidation
|
|
737
|
+
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
738
|
+
// keep `expire: undefined`.
|
|
739
|
+
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
740
|
+
// Create the cache entry for the response.
|
|
741
|
+
const cacheEntry = {
|
|
742
|
+
value: {
|
|
743
|
+
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
744
|
+
status: response.status,
|
|
745
|
+
body: Buffer.from(await blob.arrayBuffer()),
|
|
746
|
+
headers
|
|
747
|
+
},
|
|
748
|
+
cacheControl: {
|
|
749
|
+
revalidate,
|
|
750
|
+
expire
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
return cacheEntry;
|
|
754
|
+
} else {
|
|
755
|
+
// send response without caching if not ISR
|
|
756
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
757
|
+
return null;
|
|
758
|
+
}
|
|
759
|
+
} catch (err) {
|
|
760
|
+
// if this is a background revalidate we need to report
|
|
761
|
+
// the request error here as it won't be bubbled
|
|
762
|
+
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
763
|
+
const silenceLog = false;
|
|
764
|
+
await routeModule.onRequestError(req, err, {
|
|
765
|
+
routerKind: 'App Router',
|
|
766
|
+
routePath: srcPage,
|
|
767
|
+
routeType: 'route',
|
|
768
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
769
|
+
isStaticGeneration: cacheKey !== null,
|
|
770
|
+
isOnDemandRevalidate
|
|
771
|
+
})
|
|
772
|
+
}, silenceLog, routerServerContext);
|
|
773
|
+
}
|
|
774
|
+
throw err;
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
const handleResponse = async (currentSpan, parentSpan)=>{
|
|
778
|
+
try {
|
|
779
|
+
var _cacheEntry_value;
|
|
780
|
+
const cacheEntry = await routeModule.handleResponse({
|
|
781
|
+
req,
|
|
782
|
+
nextConfig,
|
|
783
|
+
cacheKey,
|
|
784
|
+
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
785
|
+
isFallback: false,
|
|
786
|
+
previewProps,
|
|
787
|
+
prerenderManifest,
|
|
788
|
+
isRoutePPREnabled: false,
|
|
789
|
+
isOnDemandRevalidate,
|
|
790
|
+
revalidateOnlyGenerated,
|
|
791
|
+
responseGenerator,
|
|
792
|
+
waitUntil: ctx.waitUntil,
|
|
793
|
+
isMinimalMode
|
|
794
|
+
});
|
|
795
|
+
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
796
|
+
throw cacheEntry.error;
|
|
797
|
+
}
|
|
798
|
+
// we don't create a cacheEntry for ISR
|
|
799
|
+
if (!isIsr) {
|
|
800
|
+
return;
|
|
801
|
+
}
|
|
802
|
+
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) {
|
|
803
|
+
var _cacheEntry_value1;
|
|
804
|
+
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
805
|
+
}
|
|
806
|
+
if (!isMinimalMode) {
|
|
807
|
+
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
808
|
+
}
|
|
809
|
+
// Draft mode should never be cached
|
|
810
|
+
if (isDraftMode) {
|
|
811
|
+
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
812
|
+
}
|
|
813
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
814
|
+
if (!(isMinimalMode && isIsr)) {
|
|
815
|
+
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
816
|
+
}
|
|
817
|
+
// If cache control is already set on the response we don't
|
|
818
|
+
// override it to allow users to customize it via next.config
|
|
819
|
+
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
820
|
+
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
779
821
|
}
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
822
|
+
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'.
|
|
823
|
+
new Response(cacheEntry.value.body, {
|
|
824
|
+
headers,
|
|
825
|
+
status: cacheEntry.value.status || 200
|
|
826
|
+
}));
|
|
827
|
+
return;
|
|
828
|
+
} catch (err) {
|
|
829
|
+
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
830
|
+
const silenceLog = false;
|
|
831
|
+
await routeModule.onRequestError(req, err, {
|
|
832
|
+
routerKind: 'App Router',
|
|
833
|
+
routePath: normalizedSrcPage,
|
|
834
|
+
routeType: 'route',
|
|
835
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
836
|
+
isStaticGeneration: cacheKey !== null,
|
|
837
|
+
isOnDemandRevalidate
|
|
838
|
+
})
|
|
839
|
+
}, silenceLog, routerServerContext);
|
|
791
840
|
}
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
status: 200,
|
|
863
|
-
headers: {
|
|
864
|
-
"content-type": "application/json",
|
|
865
|
-
// Echo back so the extension's preflight succeeds. The actual
|
|
866
|
-
// origin gate for this route is the loopback Host check above.
|
|
867
|
-
"access-control-allow-origin": req.headers.get("origin") ?? "*",
|
|
868
|
-
"access-control-allow-credentials": "false",
|
|
869
|
-
"vary": "origin"
|
|
870
|
-
}
|
|
871
|
-
});
|
|
872
|
-
}
|
|
873
|
-
function handlePageCaptureOptions(req) {
|
|
874
|
-
return new Response(null, {
|
|
875
|
-
status: 204,
|
|
876
|
-
headers: {
|
|
877
|
-
"access-control-allow-origin": req.headers.get("origin") ?? "*",
|
|
878
|
-
"access-control-allow-methods": "POST, OPTIONS",
|
|
879
|
-
"access-control-allow-headers": "content-type",
|
|
880
|
-
"access-control-max-age": "600",
|
|
881
|
-
"vary": "origin"
|
|
841
|
+
// rethrow so that we can handle serving error page
|
|
842
|
+
// If this is during static generation, throw the error again.
|
|
843
|
+
if (isIsr) throw err;
|
|
844
|
+
// Otherwise, send a 500 response unless the original response has
|
|
845
|
+
// already committed. In that case, preserve its status code for
|
|
846
|
+
// telemetry while still recording the failure and terminating a response
|
|
847
|
+
// that the failed pipeline left open.
|
|
848
|
+
if (res.headersSent) {
|
|
849
|
+
if (currentSpan) {
|
|
850
|
+
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
851
|
+
currentSpan.recordException(error);
|
|
852
|
+
currentSpan.setStatus({
|
|
853
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
854
|
+
message: error.message
|
|
855
|
+
});
|
|
856
|
+
currentSpan.setAttribute('error.type', error.name);
|
|
857
|
+
}
|
|
858
|
+
if (!res.writableEnded && !res.destroyed) {
|
|
859
|
+
res.end();
|
|
860
|
+
}
|
|
861
|
+
} else {
|
|
862
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
863
|
+
status: 500
|
|
864
|
+
}));
|
|
865
|
+
}
|
|
866
|
+
return;
|
|
867
|
+
} finally{
|
|
868
|
+
;
|
|
869
|
+
(()=>{
|
|
870
|
+
if (!currentSpan) {
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
let statusCode = res.statusCode;
|
|
874
|
+
currentSpan.setAttributes({
|
|
875
|
+
'http.status_code': statusCode,
|
|
876
|
+
'next.rsc': false
|
|
877
|
+
});
|
|
878
|
+
if (statusCode && statusCode >= 500) {
|
|
879
|
+
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
880
|
+
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
881
|
+
currentSpan.setStatus({
|
|
882
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
883
|
+
});
|
|
884
|
+
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
885
|
+
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
886
|
+
}
|
|
887
|
+
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
888
|
+
// We were unable to get attributes, probably OTEL is not enabled
|
|
889
|
+
if (!rootSpanAttributes) {
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
893
|
+
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
897
|
+
const name = `${method} ${route}`;
|
|
898
|
+
currentSpan.setAttributes({
|
|
899
|
+
'next.route': route,
|
|
900
|
+
'http.route': route,
|
|
901
|
+
'next.span_name': name
|
|
902
|
+
});
|
|
903
|
+
currentSpan.updateName(name);
|
|
904
|
+
// Propagate http.route to the parent span if one exists (e.g.
|
|
905
|
+
// a platform-created HTTP span in adapter deployments).
|
|
906
|
+
if (parentSpan && parentSpan !== currentSpan) {
|
|
907
|
+
parentSpan.setAttribute('http.route', route);
|
|
908
|
+
parentSpan.updateName(name);
|
|
909
|
+
}
|
|
910
|
+
})();
|
|
882
911
|
}
|
|
883
|
-
}
|
|
912
|
+
};
|
|
913
|
+
// TODO: activeSpan code path is for when wrapped by
|
|
914
|
+
// next-server can be removed when this is no longer used
|
|
915
|
+
if (isWrappedByNextServer && activeSpan) {
|
|
916
|
+
await handleResponse(activeSpan, undefined);
|
|
917
|
+
} else {
|
|
918
|
+
let parentSpan = tracer.getActiveScopeSpan();
|
|
919
|
+
await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
|
|
920
|
+
spanName: `${method} ${srcPage}`,
|
|
921
|
+
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
|
|
922
|
+
attributes: {
|
|
923
|
+
'http.method': method,
|
|
924
|
+
'http.target': req.url
|
|
925
|
+
}
|
|
926
|
+
}, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
|
|
927
|
+
}
|
|
884
928
|
}
|
|
885
929
|
|
|
886
|
-
|
|
887
|
-
/**
|
|
888
|
-
* @public — `POST /api/v1/page-capture` (with CORS `OPTIONS` preflight)
|
|
889
|
-
*
|
|
890
|
-
* Browser-extension upload endpoint: receives the active page's URL,
|
|
891
|
-
* title, and selected/full text and routes it into the active thread.
|
|
892
|
-
* See `docs/api.md`.
|
|
893
|
-
*/
|
|
894
|
-
const POST = handlePageCapture;
|
|
895
|
-
const OPTIONS = handlePageCaptureOptions;
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
/***/ }),
|
|
899
|
-
|
|
900
|
-
/***/ 55511:
|
|
901
|
-
/***/ ((module) => {
|
|
902
|
-
|
|
903
|
-
module.exports = require("crypto");
|
|
904
|
-
|
|
905
|
-
/***/ }),
|
|
906
|
-
|
|
907
|
-
/***/ 55591:
|
|
908
|
-
/***/ ((module) => {
|
|
909
|
-
|
|
910
|
-
module.exports = require("https");
|
|
911
|
-
|
|
912
|
-
/***/ }),
|
|
913
|
-
|
|
914
|
-
/***/ 57075:
|
|
915
|
-
/***/ ((module) => {
|
|
916
|
-
|
|
917
|
-
module.exports = require("node:stream");
|
|
918
|
-
|
|
919
|
-
/***/ }),
|
|
920
|
-
|
|
921
|
-
/***/ 57975:
|
|
922
|
-
/***/ ((module) => {
|
|
923
|
-
|
|
924
|
-
module.exports = require("node:util");
|
|
925
|
-
|
|
926
|
-
/***/ }),
|
|
927
|
-
|
|
928
|
-
/***/ 63033:
|
|
929
|
-
/***/ ((module) => {
|
|
930
|
+
//# sourceMappingURL=app-route.js.map
|
|
930
931
|
|
|
931
|
-
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
932
932
|
|
|
933
933
|
/***/ }),
|
|
934
934
|
|
|
@@ -1114,7 +1114,7 @@ module.exports = import("@huggingface/transformers");;
|
|
|
1114
1114
|
var __webpack_require__ = require("../../../../webpack-runtime.js");
|
|
1115
1115
|
__webpack_require__.C(exports);
|
|
1116
1116
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
1117
|
-
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,7981,513,6299,563,8808,7547,4992,46,3042,3566,2068,4377,1638,5585,3524,
|
|
1117
|
+
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,7981,513,6299,563,8808,7547,4992,46,3042,3566,2068,4377,1638,5585,9304,3524,3175,6142,540,4189,4955,5908,5120,1388], () => (__webpack_exec__(71467)));
|
|
1118
1118
|
module.exports = __webpack_exports__;
|
|
1119
1119
|
|
|
1120
1120
|
})();
|