@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
|
@@ -100,873 +100,873 @@ module.exports = require("next/dist/server/app-render/work-async-storage.externa
|
|
|
100
100
|
|
|
101
101
|
/***/ }),
|
|
102
102
|
|
|
103
|
-
/***/
|
|
104
|
-
/***/ ((
|
|
103
|
+
/***/ 31421:
|
|
104
|
+
/***/ ((module) => {
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
127
|
-
/* 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__);
|
|
128
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
129
|
-
/* 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__);
|
|
130
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
131
|
-
/* 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__);
|
|
132
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
133
|
-
/* 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__);
|
|
134
|
-
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
135
|
-
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
136
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
137
|
-
/* 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__);
|
|
138
|
-
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
139
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
140
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
141
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
142
|
-
/* 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__);
|
|
143
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
144
|
-
/* 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__);
|
|
145
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
146
|
-
/* 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__);
|
|
106
|
+
module.exports = require("node:child_process");
|
|
107
|
+
|
|
108
|
+
/***/ }),
|
|
109
|
+
|
|
110
|
+
/***/ 33873:
|
|
111
|
+
/***/ ((module) => {
|
|
112
|
+
|
|
113
|
+
module.exports = require("path");
|
|
114
|
+
|
|
115
|
+
/***/ }),
|
|
116
|
+
|
|
117
|
+
/***/ 37067:
|
|
118
|
+
/***/ ((module) => {
|
|
119
|
+
|
|
120
|
+
module.exports = require("node:http");
|
|
121
|
+
|
|
122
|
+
/***/ }),
|
|
123
|
+
|
|
124
|
+
/***/ 38522:
|
|
125
|
+
/***/ ((module) => {
|
|
147
126
|
|
|
127
|
+
module.exports = require("node:zlib");
|
|
148
128
|
|
|
129
|
+
/***/ }),
|
|
149
130
|
|
|
131
|
+
/***/ 40610:
|
|
132
|
+
/***/ ((module) => {
|
|
150
133
|
|
|
134
|
+
module.exports = require("node:dns");
|
|
151
135
|
|
|
136
|
+
/***/ }),
|
|
152
137
|
|
|
138
|
+
/***/ 42482:
|
|
139
|
+
/***/ ((module) => {
|
|
153
140
|
|
|
141
|
+
module.exports = import("sharp");;
|
|
154
142
|
|
|
143
|
+
/***/ }),
|
|
155
144
|
|
|
145
|
+
/***/ 44708:
|
|
146
|
+
/***/ ((module) => {
|
|
156
147
|
|
|
148
|
+
module.exports = require("node:https");
|
|
157
149
|
|
|
150
|
+
/***/ }),
|
|
158
151
|
|
|
152
|
+
/***/ 44870:
|
|
153
|
+
/***/ ((module) => {
|
|
159
154
|
|
|
155
|
+
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
160
156
|
|
|
157
|
+
/***/ }),
|
|
161
158
|
|
|
159
|
+
/***/ 48161:
|
|
160
|
+
/***/ ((module) => {
|
|
162
161
|
|
|
162
|
+
module.exports = require("node:os");
|
|
163
163
|
|
|
164
|
+
/***/ }),
|
|
164
165
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
182
|
-
// correctly attributing module load time to application-code rather than
|
|
183
|
-
// framework internals.
|
|
184
|
-
// - In all modes: async modules (route files with top-level await) are
|
|
185
|
-
// handled correctly — require() returns a Promise for such modules, which
|
|
186
|
-
// ensureUserland() awaits before the first request is handled.
|
|
187
|
-
userland: ()=>__webpack_require__(52339),
|
|
188
|
-
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
189
|
-
// server HMR updates are picked up without re-executing the entry chunk.
|
|
190
|
-
// Using require() (synchronous) avoids adding async overhead that would be
|
|
191
|
-
// incorrectly attributed to application-code time in devRequestTiming.
|
|
192
|
-
... false ? 0 : {}
|
|
166
|
+
/***/ 51455:
|
|
167
|
+
/***/ ((module) => {
|
|
168
|
+
|
|
169
|
+
module.exports = require("node:fs/promises");
|
|
170
|
+
|
|
171
|
+
/***/ }),
|
|
172
|
+
|
|
173
|
+
/***/ 51903:
|
|
174
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
// EXPORTS
|
|
178
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
179
|
+
CZ: () => (/* binding */ handleExtensionAgents),
|
|
180
|
+
dT: () => (/* binding */ handleExtensionTurn),
|
|
181
|
+
eH: () => (/* binding */ handleGenericExtensionTurn)
|
|
193
182
|
});
|
|
194
|
-
// Pull out the exports that we need to expose from the module. This should
|
|
195
|
-
// be eliminated when we've moved the other routes to the new format. These
|
|
196
|
-
// are used to hook into the route.
|
|
197
|
-
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
198
|
-
function patchFetch() {
|
|
199
|
-
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
200
|
-
workAsyncStorage,
|
|
201
|
-
workUnitAsyncStorage
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
183
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
184
|
+
// UNUSED EXPORTS: ExtensionAction
|
|
185
|
+
|
|
186
|
+
// EXTERNAL MODULE: ./node_modules/zod/v4/classic/schemas.js + 4 modules
|
|
187
|
+
var schemas = __webpack_require__(97377);
|
|
188
|
+
// EXTERNAL MODULE: ./lib/stores/threads.ts
|
|
189
|
+
var threads = __webpack_require__(83042);
|
|
190
|
+
// EXTERNAL MODULE: ./lib/stores/agent-configs.ts
|
|
191
|
+
var agent_configs = __webpack_require__(41720);
|
|
192
|
+
// EXTERNAL MODULE: ./lib/agents/agent-turn.ts
|
|
193
|
+
var agent_turn = __webpack_require__(62032);
|
|
194
|
+
// EXTERNAL MODULE: ./lib/notifications/bus.ts
|
|
195
|
+
var bus = __webpack_require__(76445);
|
|
196
|
+
;// ./lib/api/extension-turn-prompt.ts
|
|
197
|
+
// Browser-extension turn message (refine / fill / rewrite_clipboard).
|
|
198
|
+
// `composePrompt` lives next to the server handler so the format is
|
|
199
|
+
// authored once. `parseExtensionTurn` reverses it for the chat UI so the
|
|
200
|
+
// user bubble can show a tight collapsible card instead of raw text.
|
|
201
|
+
|
|
202
|
+
const ExtensionActionEnum = schemas/* enum */.k5n([
|
|
203
|
+
"refine",
|
|
204
|
+
"fill",
|
|
205
|
+
"rewrite_clipboard"
|
|
206
|
+
]);
|
|
207
|
+
function composePrompt(action, input) {
|
|
208
|
+
const header = action === "refine" ? "[Extension refine turn] Improve or refine the selected content based on the instruction below." : action === "fill" ? "[Extension fill turn] Produce text intended to be inserted into the currently focused editable field. Use nearby form context and page context to stay relevant. Return only the final field text." : "[Extension rewrite to clipboard turn] Rewrite ONLY the text under 'Selected context:' according to the instruction. Ignore any URL/title/heading hints — they are NOT the rewrite target. Return ONLY the rewritten text, no commentary, no quotes, no labels.";
|
|
209
|
+
const lines = [
|
|
210
|
+
header,
|
|
211
|
+
`Instruction: ${input.instruction}`
|
|
212
|
+
];
|
|
213
|
+
// rewrite_clipboard is intentionally selection-sovereign: the selection IS
|
|
214
|
+
// the input. Page metadata adds noise and the model has been observed
|
|
215
|
+
// echoing the page H1/H2 as the "rewrite" instead of operating on the
|
|
216
|
+
// selection. Strip every page hint for this action.
|
|
217
|
+
if (action !== "rewrite_clipboard") {
|
|
218
|
+
if (input.url) lines.push(`URL: ${input.url}`);
|
|
219
|
+
if (input.title) lines.push(`Title: ${input.title}`);
|
|
220
|
+
if (input.selector) lines.push(`Selector: ${input.selector}`);
|
|
221
|
+
if (input.page_context) lines.push("", "Page/form context:", input.page_context);
|
|
208
222
|
}
|
|
209
|
-
|
|
210
|
-
|
|
223
|
+
lines.push("", "Selected context:", input.text && input.text.trim().length > 0 ? input.text : "(none provided)");
|
|
224
|
+
return lines.join("\n");
|
|
225
|
+
}
|
|
226
|
+
const ACTION_LABEL = {
|
|
227
|
+
fill: "Fill focused field",
|
|
228
|
+
refine: "Refine selection",
|
|
229
|
+
rewrite_clipboard: "Rewrite to clipboard"
|
|
230
|
+
};
|
|
231
|
+
function parseExtensionTurn(raw) {
|
|
232
|
+
const headerRe = /^\[Extension (refine|fill|rewrite to clipboard) turn\][^\n]*\n/;
|
|
233
|
+
const hm = headerRe.exec(raw);
|
|
234
|
+
if (!hm) return null;
|
|
235
|
+
const actionWord = hm[1];
|
|
236
|
+
const action = actionWord === "fill" ? "fill" : actionWord === "refine" ? "refine" : "rewrite_clipboard";
|
|
237
|
+
let rest = raw.slice(hm[0].length);
|
|
238
|
+
function takeLine(label) {
|
|
239
|
+
const re = new RegExp(`^${label}:\\s*([^\\n]*)\\n?`);
|
|
240
|
+
const m = re.exec(rest);
|
|
241
|
+
if (!m) return null;
|
|
242
|
+
rest = rest.slice(m[0].length);
|
|
243
|
+
return m[1].trim() || null;
|
|
211
244
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
245
|
+
const instruction = takeLine("Instruction") ?? "";
|
|
246
|
+
const url = takeLine("URL");
|
|
247
|
+
const title = takeLine("Title");
|
|
248
|
+
const selector = takeLine("Selector");
|
|
249
|
+
let pageContext = null;
|
|
250
|
+
const pageHeaderRe = /^\nPage\/form context:\n/;
|
|
251
|
+
if (pageHeaderRe.test(rest)) {
|
|
252
|
+
rest = rest.replace(pageHeaderRe, "");
|
|
253
|
+
const idx = rest.indexOf("\n\nSelected context:");
|
|
254
|
+
if (idx >= 0) {
|
|
255
|
+
pageContext = rest.slice(0, idx).trim() || null;
|
|
256
|
+
rest = rest.slice(idx + 2);
|
|
257
|
+
}
|
|
219
258
|
}
|
|
220
|
-
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
res.statusCode = 400;
|
|
227
|
-
res.end('Bad Request');
|
|
228
|
-
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
229
|
-
return null;
|
|
259
|
+
let selectedText = null;
|
|
260
|
+
const selHeaderRe = /^\n?Selected context:\n([\s\S]*)$/;
|
|
261
|
+
const sm = selHeaderRe.exec(rest);
|
|
262
|
+
if (sm) {
|
|
263
|
+
const body = sm[1].trim();
|
|
264
|
+
selectedText = body === "(none provided)" ? null : body || null;
|
|
230
265
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
266
|
+
return {
|
|
267
|
+
action,
|
|
268
|
+
actionLabel: ACTION_LABEL[action],
|
|
269
|
+
instruction,
|
|
270
|
+
url,
|
|
271
|
+
title,
|
|
272
|
+
selector,
|
|
273
|
+
pageContext,
|
|
274
|
+
selectedText
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
;// ./lib/api/extension-turn.ts
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
const ExtensionAction = ExtensionActionEnum;
|
|
286
|
+
const Body = schemas/* object */.Ikc({
|
|
287
|
+
instruction: schemas/* string */.YjP().trim().min(1).max(16000),
|
|
288
|
+
text: schemas/* string */.YjP().max(120000).optional(),
|
|
289
|
+
url: schemas/* string */.YjP().url().optional(),
|
|
290
|
+
title: schemas/* string */.YjP().max(500).optional(),
|
|
291
|
+
selector: schemas/* string */.YjP().max(2000).optional(),
|
|
292
|
+
page_context: schemas/* string */.YjP().max(30000).optional(),
|
|
293
|
+
agent_id: schemas/* string */.YjP().trim().min(1).max(200).optional()
|
|
294
|
+
});
|
|
295
|
+
const GenericBody = Body.extend({
|
|
296
|
+
action: ExtensionAction
|
|
297
|
+
});
|
|
298
|
+
function normalizeAgentIconKey(raw) {
|
|
299
|
+
if (!raw) return null;
|
|
300
|
+
const v = raw.trim().toLowerCase();
|
|
301
|
+
if (v.startsWith("bundle:")) {
|
|
302
|
+
const k = v.slice("bundle:".length).trim();
|
|
303
|
+
if (k === "blue" || k === "white") return k;
|
|
304
|
+
return null;
|
|
261
305
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
306
|
+
if (v === "blue" || v === "white") return v;
|
|
307
|
+
return null;
|
|
308
|
+
}
|
|
309
|
+
// All extension calls land on the agent's most recent thread (or a fresh
|
|
310
|
+
// "Extension turns" thread if there isn't one yet). LLM-side context
|
|
311
|
+
// isolation is handled by the per-category context profile in
|
|
312
|
+
// `lib/agents/turn-profile.ts`, not by spinning a new thread per call —
|
|
313
|
+
// that would just spam the chat list with one entry per fill / rewrite.
|
|
314
|
+
function pickThread(agentId) {
|
|
315
|
+
const requested = agentId ? (0,agent_configs/* getAgentConfig */.mJ)(agentId) : null;
|
|
316
|
+
const def = (0,agent_configs/* getDefaultAgentConfig */.vU)();
|
|
317
|
+
const agent = requested ?? def ?? (0,agent_configs/* listAgentConfigs */.zb)()[0] ?? null;
|
|
318
|
+
if (!agent) return {
|
|
319
|
+
error: "no-agent"
|
|
320
|
+
};
|
|
321
|
+
const recent = (0,threads/* listThreadsByAgent */.Iz)(agent.id, 1);
|
|
322
|
+
if (recent.length > 0) {
|
|
323
|
+
return {
|
|
324
|
+
thread_id: recent[0].thread_id,
|
|
325
|
+
agent_id: agent.id,
|
|
326
|
+
agent_name: agent.name,
|
|
327
|
+
agent_icon_key: normalizeAgentIconKey(agent.icon),
|
|
328
|
+
thread_title: recent[0].title,
|
|
329
|
+
created: false
|
|
330
|
+
};
|
|
271
331
|
}
|
|
272
|
-
const
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
const context = {
|
|
281
|
-
params,
|
|
282
|
-
previewProps,
|
|
283
|
-
renderOpts: {
|
|
284
|
-
experimental: {
|
|
285
|
-
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
286
|
-
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
287
|
-
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
288
|
-
},
|
|
289
|
-
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
290
|
-
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
291
|
-
isDraftMode,
|
|
292
|
-
incrementalCache,
|
|
293
|
-
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
294
|
-
cacheLifeProfiles: nextConfig.cacheLife,
|
|
295
|
-
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
296
|
-
waitUntil: ctx.waitUntil,
|
|
297
|
-
onClose: (cb)=>{
|
|
298
|
-
res.on('close', cb);
|
|
299
|
-
},
|
|
300
|
-
onAfterTaskError: undefined
|
|
301
|
-
},
|
|
302
|
-
sharedContext: {
|
|
303
|
-
buildId,
|
|
304
|
-
deploymentId
|
|
305
|
-
}
|
|
332
|
+
const t = (0,threads/* createThread */.Nw)(agent.id, "Extension turns");
|
|
333
|
+
return {
|
|
334
|
+
thread_id: t.thread_id,
|
|
335
|
+
agent_id: agent.id,
|
|
336
|
+
agent_name: agent.name,
|
|
337
|
+
agent_icon_key: normalizeAgentIconKey(agent.icon),
|
|
338
|
+
thread_title: t.title,
|
|
339
|
+
created: true
|
|
306
340
|
};
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
const
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
return null;
|
|
318
|
-
}
|
|
319
|
-
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
320
|
-
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
321
|
-
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
322
|
-
// Attempt using provided waitUntil if available
|
|
323
|
-
// if it's not we fallback to sendResponse's handling
|
|
324
|
-
if (pendingWaitUntil) {
|
|
325
|
-
if (ctx.waitUntil) {
|
|
326
|
-
ctx.waitUntil(pendingWaitUntil);
|
|
327
|
-
pendingWaitUntil = undefined;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
const cacheTags = context.renderOpts.collectedTags;
|
|
331
|
-
// If the request is for a static response, we can cache it so long
|
|
332
|
-
// as it's not edge.
|
|
333
|
-
if (isIsr) {
|
|
334
|
-
const blob = await response.blob();
|
|
335
|
-
// Copy the headers from the response.
|
|
336
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
337
|
-
if (cacheTags) {
|
|
338
|
-
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
339
|
-
}
|
|
340
|
-
if (!headers['content-type'] && blob.type) {
|
|
341
|
-
headers['content-type'] = blob.type;
|
|
342
|
-
}
|
|
343
|
-
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
344
|
-
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
|
|
345
|
-
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
346
|
-
// build-time fallback in `build/index.ts` so cache entries
|
|
347
|
-
// and the response Cache-Control header agree on the route's
|
|
348
|
-
// effective expire. Routes that opt out of revalidation
|
|
349
|
-
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
350
|
-
// keep `expire: undefined`.
|
|
351
|
-
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
352
|
-
// Create the cache entry for the response.
|
|
353
|
-
const cacheEntry = {
|
|
354
|
-
value: {
|
|
355
|
-
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
356
|
-
status: response.status,
|
|
357
|
-
body: Buffer.from(await blob.arrayBuffer()),
|
|
358
|
-
headers
|
|
359
|
-
},
|
|
360
|
-
cacheControl: {
|
|
361
|
-
revalidate,
|
|
362
|
-
expire
|
|
363
|
-
}
|
|
364
|
-
};
|
|
365
|
-
return cacheEntry;
|
|
366
|
-
} else {
|
|
367
|
-
// send response without caching if not ISR
|
|
368
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
369
|
-
return null;
|
|
370
|
-
}
|
|
371
|
-
} catch (err) {
|
|
372
|
-
// if this is a background revalidate we need to report
|
|
373
|
-
// the request error here as it won't be bubbled
|
|
374
|
-
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
375
|
-
const silenceLog = false;
|
|
376
|
-
await routeModule.onRequestError(req, err, {
|
|
377
|
-
routerKind: 'App Router',
|
|
378
|
-
routePath: srcPage,
|
|
379
|
-
routeType: 'route',
|
|
380
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
381
|
-
isStaticGeneration: cacheKey !== null,
|
|
382
|
-
isOnDemandRevalidate
|
|
383
|
-
})
|
|
384
|
-
}, silenceLog, routerServerContext);
|
|
341
|
+
}
|
|
342
|
+
async function runExtensionAction(action, input) {
|
|
343
|
+
const picked = pickThread(input.agent_id);
|
|
344
|
+
if ("error" in picked) {
|
|
345
|
+
return new Response(JSON.stringify({
|
|
346
|
+
error: "no agent configured"
|
|
347
|
+
}), {
|
|
348
|
+
status: 503,
|
|
349
|
+
headers: {
|
|
350
|
+
"content-type": "application/json"
|
|
385
351
|
}
|
|
386
|
-
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
const prompt = composePrompt(action, input);
|
|
355
|
+
const run = await (0,agent_turn.runAgentTurn)({
|
|
356
|
+
thread_id: picked.thread_id,
|
|
357
|
+
queue_source: "extension",
|
|
358
|
+
message: prompt,
|
|
359
|
+
user_category: "extension",
|
|
360
|
+
assistant_category: "extension",
|
|
361
|
+
// The extension types `assistantContent` directly into the user's
|
|
362
|
+
// input field. The stall-retry wrapper and the strict-citation audit
|
|
363
|
+
// would otherwise inject the `↻` separator, the original stalled
|
|
364
|
+
// prose, and audit-retry continuations into that text — pollution
|
|
365
|
+
// the user then has to manually scrub. Both gates are chat
|
|
366
|
+
// affordances; skip them for one-shot writes.
|
|
367
|
+
disable_quality_gates: true
|
|
368
|
+
});
|
|
369
|
+
// Ping the events bus so any open chat view on this thread re-fetches.
|
|
370
|
+
// Same mechanism page-capture uses — without this the HTTP chat window
|
|
371
|
+
// only updates after the next manual refresh.
|
|
372
|
+
(0,bus/* publish */.mk)({
|
|
373
|
+
type: "thread_message_added",
|
|
374
|
+
thread_id: picked.thread_id,
|
|
375
|
+
agent_id: picked.agent_id,
|
|
376
|
+
source: "extension",
|
|
377
|
+
ts: Date.now()
|
|
378
|
+
});
|
|
379
|
+
return new Response(JSON.stringify({
|
|
380
|
+
ok: true,
|
|
381
|
+
action,
|
|
382
|
+
thread_id: picked.thread_id,
|
|
383
|
+
agent_id: picked.agent_id,
|
|
384
|
+
agent_name: picked.agent_name,
|
|
385
|
+
agent_icon_key: picked.agent_icon_key,
|
|
386
|
+
thread_title: picked.thread_title,
|
|
387
|
+
created_thread: picked.created,
|
|
388
|
+
assistant: run.assistantContent,
|
|
389
|
+
preview: run.preview,
|
|
390
|
+
skipped_assistant: run.skippedAssistant
|
|
391
|
+
}), {
|
|
392
|
+
status: 200,
|
|
393
|
+
headers: {
|
|
394
|
+
"content-type": "application/json"
|
|
387
395
|
}
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
isOnDemandRevalidate,
|
|
402
|
-
revalidateOnlyGenerated,
|
|
403
|
-
responseGenerator,
|
|
404
|
-
waitUntil: ctx.waitUntil,
|
|
405
|
-
isMinimalMode
|
|
406
|
-
});
|
|
407
|
-
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
408
|
-
throw cacheEntry.error;
|
|
409
|
-
}
|
|
410
|
-
// we don't create a cacheEntry for ISR
|
|
411
|
-
if (!isIsr) {
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
|
-
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) {
|
|
415
|
-
var _cacheEntry_value1;
|
|
416
|
-
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
417
|
-
}
|
|
418
|
-
if (!isMinimalMode) {
|
|
419
|
-
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
420
|
-
}
|
|
421
|
-
// Draft mode should never be cached
|
|
422
|
-
if (isDraftMode) {
|
|
423
|
-
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
424
|
-
}
|
|
425
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
426
|
-
if (!(isMinimalMode && isIsr)) {
|
|
427
|
-
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
async function handleExtensionTurn(action, req) {
|
|
399
|
+
let raw;
|
|
400
|
+
try {
|
|
401
|
+
raw = await req.json();
|
|
402
|
+
} catch {
|
|
403
|
+
return new Response(JSON.stringify({
|
|
404
|
+
error: "Request body must be valid JSON"
|
|
405
|
+
}), {
|
|
406
|
+
status: 400,
|
|
407
|
+
headers: {
|
|
408
|
+
"content-type": "application/json"
|
|
428
409
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
const parsed = Body.safeParse(raw);
|
|
413
|
+
if (!parsed.success) {
|
|
414
|
+
return new Response(JSON.stringify({
|
|
415
|
+
error: parsed.error.issues[0]?.message ?? "invalid body"
|
|
416
|
+
}), {
|
|
417
|
+
status: 400,
|
|
418
|
+
headers: {
|
|
419
|
+
"content-type": "application/json"
|
|
433
420
|
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
isOnDemandRevalidate
|
|
450
|
-
})
|
|
451
|
-
}, silenceLog, routerServerContext);
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
return runExtensionAction(action, parsed.data);
|
|
424
|
+
}
|
|
425
|
+
async function handleGenericExtensionTurn(req) {
|
|
426
|
+
let raw;
|
|
427
|
+
try {
|
|
428
|
+
raw = await req.json();
|
|
429
|
+
} catch {
|
|
430
|
+
return new Response(JSON.stringify({
|
|
431
|
+
error: "Request body must be valid JSON"
|
|
432
|
+
}), {
|
|
433
|
+
status: 400,
|
|
434
|
+
headers: {
|
|
435
|
+
"content-type": "application/json"
|
|
452
436
|
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
currentSpan.recordException(error);
|
|
464
|
-
currentSpan.setStatus({
|
|
465
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
466
|
-
message: error.message
|
|
467
|
-
});
|
|
468
|
-
currentSpan.setAttribute('error.type', error.name);
|
|
469
|
-
}
|
|
470
|
-
if (!res.writableEnded && !res.destroyed) {
|
|
471
|
-
res.end();
|
|
472
|
-
}
|
|
473
|
-
} else {
|
|
474
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
475
|
-
status: 500
|
|
476
|
-
}));
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
const parsed = GenericBody.safeParse(raw);
|
|
440
|
+
if (!parsed.success) {
|
|
441
|
+
return new Response(JSON.stringify({
|
|
442
|
+
error: parsed.error.issues[0]?.message ?? "invalid body"
|
|
443
|
+
}), {
|
|
444
|
+
status: 400,
|
|
445
|
+
headers: {
|
|
446
|
+
"content-type": "application/json"
|
|
477
447
|
}
|
|
478
|
-
|
|
479
|
-
} finally{
|
|
480
|
-
;
|
|
481
|
-
(()=>{
|
|
482
|
-
if (!currentSpan) {
|
|
483
|
-
return;
|
|
484
|
-
}
|
|
485
|
-
let statusCode = res.statusCode;
|
|
486
|
-
currentSpan.setAttributes({
|
|
487
|
-
'http.status_code': statusCode,
|
|
488
|
-
'next.rsc': false
|
|
489
|
-
});
|
|
490
|
-
if (statusCode && statusCode >= 500) {
|
|
491
|
-
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
492
|
-
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
493
|
-
currentSpan.setStatus({
|
|
494
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
495
|
-
});
|
|
496
|
-
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
497
|
-
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
498
|
-
}
|
|
499
|
-
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
500
|
-
// We were unable to get attributes, probably OTEL is not enabled
|
|
501
|
-
if (!rootSpanAttributes) {
|
|
502
|
-
return;
|
|
503
|
-
}
|
|
504
|
-
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
505
|
-
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
506
|
-
return;
|
|
507
|
-
}
|
|
508
|
-
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
509
|
-
const name = `${method} ${route}`;
|
|
510
|
-
currentSpan.setAttributes({
|
|
511
|
-
'next.route': route,
|
|
512
|
-
'http.route': route,
|
|
513
|
-
'next.span_name': name
|
|
514
|
-
});
|
|
515
|
-
currentSpan.updateName(name);
|
|
516
|
-
// Propagate http.route to the parent span if one exists (e.g.
|
|
517
|
-
// a platform-created HTTP span in adapter deployments).
|
|
518
|
-
if (parentSpan && parentSpan !== currentSpan) {
|
|
519
|
-
parentSpan.setAttribute('http.route', route);
|
|
520
|
-
parentSpan.updateName(name);
|
|
521
|
-
}
|
|
522
|
-
})();
|
|
523
|
-
}
|
|
524
|
-
};
|
|
525
|
-
// TODO: activeSpan code path is for when wrapped by
|
|
526
|
-
// next-server can be removed when this is no longer used
|
|
527
|
-
if (isWrappedByNextServer && activeSpan) {
|
|
528
|
-
await handleResponse(activeSpan, undefined);
|
|
529
|
-
} else {
|
|
530
|
-
let parentSpan = tracer.getActiveScopeSpan();
|
|
531
|
-
await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
|
|
532
|
-
spanName: `${method} ${srcPage}`,
|
|
533
|
-
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
|
|
534
|
-
attributes: {
|
|
535
|
-
'http.method': method,
|
|
536
|
-
'http.target': req.url
|
|
537
|
-
}
|
|
538
|
-
}, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
|
|
448
|
+
});
|
|
539
449
|
}
|
|
450
|
+
return runExtensionAction(parsed.data.action, parsed.data);
|
|
451
|
+
}
|
|
452
|
+
async function handleExtensionAgents() {
|
|
453
|
+
const all = (0,agent_configs/* listAgentConfigs */.zb)();
|
|
454
|
+
const def = (0,agent_configs/* getDefaultAgentConfig */.vU)();
|
|
455
|
+
return new Response(JSON.stringify({
|
|
456
|
+
ok: true,
|
|
457
|
+
default_agent_id: def?.id ?? null,
|
|
458
|
+
agents: all.map((a)=>({
|
|
459
|
+
id: a.id,
|
|
460
|
+
name: a.name,
|
|
461
|
+
icon: a.icon,
|
|
462
|
+
icon_key: normalizeAgentIconKey(a.icon),
|
|
463
|
+
is_default: a.is_default === 1
|
|
464
|
+
}))
|
|
465
|
+
}), {
|
|
466
|
+
status: 200,
|
|
467
|
+
headers: {
|
|
468
|
+
"content-type": "application/json"
|
|
469
|
+
}
|
|
470
|
+
});
|
|
540
471
|
}
|
|
541
472
|
|
|
542
|
-
//# sourceMappingURL=app-route.js.map
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
/***/ }),
|
|
546
|
-
|
|
547
|
-
/***/ 31421:
|
|
548
|
-
/***/ ((module) => {
|
|
549
|
-
|
|
550
|
-
module.exports = require("node:child_process");
|
|
551
473
|
|
|
552
474
|
/***/ }),
|
|
553
475
|
|
|
554
|
-
/***/
|
|
555
|
-
/***/ ((
|
|
556
|
-
|
|
557
|
-
module.exports = require("path");
|
|
476
|
+
/***/ 52339:
|
|
477
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
558
478
|
|
|
559
|
-
|
|
479
|
+
__webpack_require__.r(__webpack_exports__);
|
|
480
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
481
|
+
/* harmony export */ GET: () => (/* binding */ GET)
|
|
482
|
+
/* harmony export */ });
|
|
483
|
+
/* harmony import */ var _lib_api_extension_turn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51903);
|
|
560
484
|
|
|
561
|
-
|
|
562
|
-
|
|
485
|
+
/**
|
|
486
|
+
* @public-internal — browser-extension agent listing.
|
|
487
|
+
*/ async function GET() {
|
|
488
|
+
return (0,_lib_api_extension_turn__WEBPACK_IMPORTED_MODULE_0__/* .handleExtensionAgents */ .CZ)();
|
|
489
|
+
}
|
|
563
490
|
|
|
564
|
-
module.exports = require("node:http");
|
|
565
491
|
|
|
566
492
|
/***/ }),
|
|
567
493
|
|
|
568
|
-
/***/
|
|
494
|
+
/***/ 55511:
|
|
569
495
|
/***/ ((module) => {
|
|
570
496
|
|
|
571
|
-
module.exports = require("
|
|
497
|
+
module.exports = require("crypto");
|
|
572
498
|
|
|
573
499
|
/***/ }),
|
|
574
500
|
|
|
575
|
-
/***/
|
|
501
|
+
/***/ 55591:
|
|
576
502
|
/***/ ((module) => {
|
|
577
503
|
|
|
578
|
-
module.exports = require("
|
|
504
|
+
module.exports = require("https");
|
|
579
505
|
|
|
580
506
|
/***/ }),
|
|
581
507
|
|
|
582
|
-
/***/
|
|
508
|
+
/***/ 57075:
|
|
583
509
|
/***/ ((module) => {
|
|
584
510
|
|
|
585
|
-
module.exports =
|
|
511
|
+
module.exports = require("node:stream");
|
|
586
512
|
|
|
587
513
|
/***/ }),
|
|
588
514
|
|
|
589
|
-
/***/
|
|
515
|
+
/***/ 57975:
|
|
590
516
|
/***/ ((module) => {
|
|
591
517
|
|
|
592
|
-
module.exports = require("node:
|
|
518
|
+
module.exports = require("node:util");
|
|
593
519
|
|
|
594
520
|
/***/ }),
|
|
595
521
|
|
|
596
|
-
/***/
|
|
522
|
+
/***/ 63033:
|
|
597
523
|
/***/ ((module) => {
|
|
598
524
|
|
|
599
|
-
module.exports = require("next/dist/
|
|
525
|
+
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
600
526
|
|
|
601
527
|
/***/ }),
|
|
602
528
|
|
|
603
|
-
/***/
|
|
604
|
-
/***/ ((
|
|
529
|
+
/***/ 70803:
|
|
530
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
605
531
|
|
|
606
|
-
|
|
532
|
+
__webpack_require__.r(__webpack_exports__);
|
|
533
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
534
|
+
/* harmony export */ handler: () => (/* binding */ handler),
|
|
535
|
+
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
536
|
+
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
537
|
+
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
538
|
+
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
539
|
+
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
540
|
+
/* harmony export */ });
|
|
541
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
|
|
542
|
+
/* 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__);
|
|
543
|
+
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
|
|
544
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
545
|
+
/* 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__);
|
|
546
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
|
|
547
|
+
/* 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__);
|
|
548
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
|
|
549
|
+
/* 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__);
|
|
550
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
|
|
551
|
+
/* 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__);
|
|
552
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
553
|
+
/* 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__);
|
|
554
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
555
|
+
/* 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__);
|
|
556
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
557
|
+
/* 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__);
|
|
558
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
559
|
+
/* 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__);
|
|
560
|
+
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
561
|
+
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
562
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
563
|
+
/* 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__);
|
|
564
|
+
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
565
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
566
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
567
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
568
|
+
/* 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__);
|
|
569
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
570
|
+
/* 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__);
|
|
571
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
572
|
+
/* 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__);
|
|
607
573
|
|
|
608
|
-
/***/ }),
|
|
609
574
|
|
|
610
|
-
/***/ 51455:
|
|
611
|
-
/***/ ((module) => {
|
|
612
575
|
|
|
613
|
-
module.exports = require("node:fs/promises");
|
|
614
576
|
|
|
615
|
-
/***/ }),
|
|
616
577
|
|
|
617
|
-
/***/ 51903:
|
|
618
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
619
578
|
|
|
620
579
|
|
|
621
|
-
// EXPORTS
|
|
622
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
623
|
-
CZ: () => (/* binding */ handleExtensionAgents),
|
|
624
|
-
dT: () => (/* binding */ handleExtensionTurn),
|
|
625
|
-
eH: () => (/* binding */ handleGenericExtensionTurn)
|
|
626
|
-
});
|
|
627
580
|
|
|
628
|
-
// UNUSED EXPORTS: ExtensionAction
|
|
629
581
|
|
|
630
|
-
// EXTERNAL MODULE: ./node_modules/zod/v4/classic/schemas.js + 4 modules
|
|
631
|
-
var schemas = __webpack_require__(97377);
|
|
632
|
-
// EXTERNAL MODULE: ./lib/stores/threads.ts
|
|
633
|
-
var threads = __webpack_require__(83042);
|
|
634
|
-
// EXTERNAL MODULE: ./lib/stores/agent-configs.ts
|
|
635
|
-
var agent_configs = __webpack_require__(41720);
|
|
636
|
-
// EXTERNAL MODULE: ./lib/agents/agent-turn.ts
|
|
637
|
-
var agent_turn = __webpack_require__(62032);
|
|
638
|
-
// EXTERNAL MODULE: ./lib/notifications/bus.ts
|
|
639
|
-
var bus = __webpack_require__(76445);
|
|
640
|
-
;// ./lib/api/extension-turn-prompt.ts
|
|
641
|
-
// Browser-extension turn message (refine / fill / rewrite_clipboard).
|
|
642
|
-
// `composePrompt` lives next to the server handler so the format is
|
|
643
|
-
// authored once. `parseExtensionTurn` reverses it for the chat UI so the
|
|
644
|
-
// user bubble can show a tight collapsible card instead of raw text.
|
|
645
582
|
|
|
646
|
-
const ExtensionActionEnum = schemas/* enum */.k5n([
|
|
647
|
-
"refine",
|
|
648
|
-
"fill",
|
|
649
|
-
"rewrite_clipboard"
|
|
650
|
-
]);
|
|
651
|
-
function composePrompt(action, input) {
|
|
652
|
-
const header = action === "refine" ? "[Extension refine turn] Improve or refine the selected content based on the instruction below." : action === "fill" ? "[Extension fill turn] Produce text intended to be inserted into the currently focused editable field. Use nearby form context and page context to stay relevant. Return only the final field text." : "[Extension rewrite to clipboard turn] Rewrite ONLY the text under 'Selected context:' according to the instruction. Ignore any URL/title/heading hints — they are NOT the rewrite target. Return ONLY the rewritten text, no commentary, no quotes, no labels.";
|
|
653
|
-
const lines = [
|
|
654
|
-
header,
|
|
655
|
-
`Instruction: ${input.instruction}`
|
|
656
|
-
];
|
|
657
|
-
// rewrite_clipboard is intentionally selection-sovereign: the selection IS
|
|
658
|
-
// the input. Page metadata adds noise and the model has been observed
|
|
659
|
-
// echoing the page H1/H2 as the "rewrite" instead of operating on the
|
|
660
|
-
// selection. Strip every page hint for this action.
|
|
661
|
-
if (action !== "rewrite_clipboard") {
|
|
662
|
-
if (input.url) lines.push(`URL: ${input.url}`);
|
|
663
|
-
if (input.title) lines.push(`Title: ${input.title}`);
|
|
664
|
-
if (input.selector) lines.push(`Selector: ${input.selector}`);
|
|
665
|
-
if (input.page_context) lines.push("", "Page/form context:", input.page_context);
|
|
666
|
-
}
|
|
667
|
-
lines.push("", "Selected context:", input.text && input.text.trim().length > 0 ? input.text : "(none provided)");
|
|
668
|
-
return lines.join("\n");
|
|
669
|
-
}
|
|
670
|
-
const ACTION_LABEL = {
|
|
671
|
-
fill: "Fill focused field",
|
|
672
|
-
refine: "Refine selection",
|
|
673
|
-
rewrite_clipboard: "Rewrite to clipboard"
|
|
674
|
-
};
|
|
675
|
-
function parseExtensionTurn(raw) {
|
|
676
|
-
const headerRe = /^\[Extension (refine|fill|rewrite to clipboard) turn\][^\n]*\n/;
|
|
677
|
-
const hm = headerRe.exec(raw);
|
|
678
|
-
if (!hm) return null;
|
|
679
|
-
const actionWord = hm[1];
|
|
680
|
-
const action = actionWord === "fill" ? "fill" : actionWord === "refine" ? "refine" : "rewrite_clipboard";
|
|
681
|
-
let rest = raw.slice(hm[0].length);
|
|
682
|
-
function takeLine(label) {
|
|
683
|
-
const re = new RegExp(`^${label}:\\s*([^\\n]*)\\n?`);
|
|
684
|
-
const m = re.exec(rest);
|
|
685
|
-
if (!m) return null;
|
|
686
|
-
rest = rest.slice(m[0].length);
|
|
687
|
-
return m[1].trim() || null;
|
|
688
|
-
}
|
|
689
|
-
const instruction = takeLine("Instruction") ?? "";
|
|
690
|
-
const url = takeLine("URL");
|
|
691
|
-
const title = takeLine("Title");
|
|
692
|
-
const selector = takeLine("Selector");
|
|
693
|
-
let pageContext = null;
|
|
694
|
-
const pageHeaderRe = /^\nPage\/form context:\n/;
|
|
695
|
-
if (pageHeaderRe.test(rest)) {
|
|
696
|
-
rest = rest.replace(pageHeaderRe, "");
|
|
697
|
-
const idx = rest.indexOf("\n\nSelected context:");
|
|
698
|
-
if (idx >= 0) {
|
|
699
|
-
pageContext = rest.slice(0, idx).trim() || null;
|
|
700
|
-
rest = rest.slice(idx + 2);
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
let selectedText = null;
|
|
704
|
-
const selHeaderRe = /^\n?Selected context:\n([\s\S]*)$/;
|
|
705
|
-
const sm = selHeaderRe.exec(rest);
|
|
706
|
-
if (sm) {
|
|
707
|
-
const body = sm[1].trim();
|
|
708
|
-
selectedText = body === "(none provided)" ? null : body || null;
|
|
709
|
-
}
|
|
710
|
-
return {
|
|
711
|
-
action,
|
|
712
|
-
actionLabel: ACTION_LABEL[action],
|
|
713
|
-
instruction,
|
|
714
|
-
url,
|
|
715
|
-
title,
|
|
716
|
-
selector,
|
|
717
|
-
pageContext,
|
|
718
|
-
selectedText
|
|
719
|
-
};
|
|
720
|
-
}
|
|
721
583
|
|
|
722
|
-
;// ./lib/api/extension-turn.ts
|
|
723
584
|
|
|
724
585
|
|
|
725
586
|
|
|
726
587
|
|
|
727
588
|
|
|
728
589
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
590
|
+
|
|
591
|
+
// We inject the nextConfigOutput here so that we can use them in the route
|
|
592
|
+
// module.
|
|
593
|
+
const nextConfigOutput = "standalone"
|
|
594
|
+
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
595
|
+
definition: {
|
|
596
|
+
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
597
|
+
page: "/api/v1/extension/agents/route",
|
|
598
|
+
pathname: "/api/v1/extension/agents",
|
|
599
|
+
filename: "route",
|
|
600
|
+
bundlePath: "app/api/v1/extension/agents/route"
|
|
601
|
+
},
|
|
602
|
+
distDir: ".next" || 0,
|
|
603
|
+
relativeProjectDir: false || '',
|
|
604
|
+
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/extension/agents/route.ts",
|
|
605
|
+
nextConfigOutput,
|
|
606
|
+
// The lazy require factory ensures that:
|
|
607
|
+
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
608
|
+
// correctly attributing module load time to application-code rather than
|
|
609
|
+
// framework internals.
|
|
610
|
+
// - In all modes: async modules (route files with top-level await) are
|
|
611
|
+
// handled correctly — require() returns a Promise for such modules, which
|
|
612
|
+
// ensureUserland() awaits before the first request is handled.
|
|
613
|
+
userland: ()=>__webpack_require__(52339),
|
|
614
|
+
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
615
|
+
// server HMR updates are picked up without re-executing the entry chunk.
|
|
616
|
+
// Using require() (synchronous) avoids adding async overhead that would be
|
|
617
|
+
// incorrectly attributed to application-code time in devRequestTiming.
|
|
618
|
+
... false ? 0 : {}
|
|
741
619
|
});
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
620
|
+
// Pull out the exports that we need to expose from the module. This should
|
|
621
|
+
// be eliminated when we've moved the other routes to the new format. These
|
|
622
|
+
// are used to hook into the route.
|
|
623
|
+
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
624
|
+
function patchFetch() {
|
|
625
|
+
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
626
|
+
workAsyncStorage,
|
|
627
|
+
workUnitAsyncStorage
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
async function handler(req, res, ctx) {
|
|
632
|
+
if (ctx.requestMeta) {
|
|
633
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
634
|
+
}
|
|
635
|
+
if (routeModule.isDev) {
|
|
636
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
637
|
+
}
|
|
638
|
+
let srcPage = "/api/v1/extension/agents/route";
|
|
639
|
+
// turbopack doesn't normalize `/index` in the page name
|
|
640
|
+
// so we need to to process dynamic routes properly
|
|
641
|
+
// TODO: fix turbopack providing differing value from webpack
|
|
642
|
+
if (false) {} else if (srcPage === '/index') {
|
|
643
|
+
// we always normalize /index specifically
|
|
644
|
+
srcPage = '/';
|
|
645
|
+
}
|
|
646
|
+
const multiZoneDraftMode = false;
|
|
647
|
+
const prepareResult = await routeModule.prepare(req, res, {
|
|
648
|
+
srcPage,
|
|
649
|
+
multiZoneDraftMode
|
|
650
|
+
});
|
|
651
|
+
if (!prepareResult) {
|
|
652
|
+
res.statusCode = 400;
|
|
653
|
+
res.end('Bad Request');
|
|
654
|
+
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
748
655
|
return null;
|
|
749
656
|
}
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
//
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
error: "no-agent"
|
|
764
|
-
};
|
|
765
|
-
const recent = (0,threads/* listThreadsByAgent */.Iz)(agent.id, 1);
|
|
766
|
-
if (recent.length > 0) {
|
|
767
|
-
return {
|
|
768
|
-
thread_id: recent[0].thread_id,
|
|
769
|
-
agent_id: agent.id,
|
|
770
|
-
agent_name: agent.name,
|
|
771
|
-
agent_icon_key: normalizeAgentIconKey(agent.icon),
|
|
772
|
-
thread_title: recent[0].title,
|
|
773
|
-
created: false
|
|
774
|
-
};
|
|
775
|
-
}
|
|
776
|
-
const t = (0,threads/* createThread */.Nw)(agent.id, "Extension turns");
|
|
777
|
-
return {
|
|
778
|
-
thread_id: t.thread_id,
|
|
779
|
-
agent_id: agent.id,
|
|
780
|
-
agent_name: agent.name,
|
|
781
|
-
agent_icon_key: normalizeAgentIconKey(agent.icon),
|
|
782
|
-
thread_title: t.title,
|
|
783
|
-
created: true
|
|
657
|
+
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
658
|
+
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
659
|
+
// Only this route's prerenders can establish ISR or admit generated params.
|
|
660
|
+
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]));
|
|
661
|
+
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
662
|
+
const render404 = async ()=>{
|
|
663
|
+
// TODO: should route-module itself handle rendering the 404
|
|
664
|
+
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
665
|
+
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
666
|
+
} else {
|
|
667
|
+
res.end('This page could not be found');
|
|
668
|
+
}
|
|
669
|
+
return null;
|
|
784
670
|
};
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
headers: {
|
|
794
|
-
"content-type": "application/json"
|
|
671
|
+
if (isIsr && !isDraftMode) {
|
|
672
|
+
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
673
|
+
if (prerenderInfo) {
|
|
674
|
+
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
675
|
+
if (nextConfig.adapterPath) {
|
|
676
|
+
return await render404();
|
|
677
|
+
}
|
|
678
|
+
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
795
679
|
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
let cacheKey = null;
|
|
683
|
+
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
684
|
+
cacheKey = resolvedPathname;
|
|
685
|
+
// ensure /index and / is normalized to one key
|
|
686
|
+
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
687
|
+
}
|
|
688
|
+
// Before rendering (which initializes component tree modules), we have to
|
|
689
|
+
// set the reference manifests to our global store so Server Action's
|
|
690
|
+
// encryption util can access to them at the top level of the page module.
|
|
691
|
+
if (serverActionsManifest && clientReferenceManifest) {
|
|
692
|
+
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
693
|
+
page: srcPage,
|
|
694
|
+
clientReferenceManifest,
|
|
695
|
+
serverActionsManifest
|
|
796
696
|
});
|
|
797
697
|
}
|
|
798
|
-
const
|
|
799
|
-
const
|
|
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
|
-
created_thread: picked.created,
|
|
832
|
-
assistant: run.assistantContent,
|
|
833
|
-
preview: run.preview,
|
|
834
|
-
skipped_assistant: run.skippedAssistant
|
|
835
|
-
}), {
|
|
836
|
-
status: 200,
|
|
837
|
-
headers: {
|
|
838
|
-
"content-type": "application/json"
|
|
698
|
+
const method = req.method || 'GET';
|
|
699
|
+
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
700
|
+
const activeSpan = tracer.getActiveScopeSpan();
|
|
701
|
+
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
702
|
+
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
703
|
+
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
704
|
+
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
705
|
+
globalThis.__incrementalCache = incrementalCache;
|
|
706
|
+
const context = {
|
|
707
|
+
params,
|
|
708
|
+
previewProps,
|
|
709
|
+
renderOpts: {
|
|
710
|
+
experimental: {
|
|
711
|
+
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
712
|
+
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
713
|
+
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
714
|
+
},
|
|
715
|
+
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
716
|
+
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
717
|
+
isDraftMode,
|
|
718
|
+
incrementalCache,
|
|
719
|
+
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
720
|
+
cacheLifeProfiles: nextConfig.cacheLife,
|
|
721
|
+
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
722
|
+
waitUntil: ctx.waitUntil,
|
|
723
|
+
onClose: (cb)=>{
|
|
724
|
+
res.on('close', cb);
|
|
725
|
+
},
|
|
726
|
+
onAfterTaskError: undefined
|
|
727
|
+
},
|
|
728
|
+
sharedContext: {
|
|
729
|
+
buildId,
|
|
730
|
+
deploymentId
|
|
839
731
|
}
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
732
|
+
};
|
|
733
|
+
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
734
|
+
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
735
|
+
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));
|
|
736
|
+
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
737
|
+
try {
|
|
738
|
+
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
739
|
+
res.statusCode = 404;
|
|
740
|
+
// on-demand revalidate always sets this header
|
|
741
|
+
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
742
|
+
res.end('This page could not be found');
|
|
743
|
+
return null;
|
|
744
|
+
}
|
|
745
|
+
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
746
|
+
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
747
|
+
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
748
|
+
// Attempt using provided waitUntil if available
|
|
749
|
+
// if it's not we fallback to sendResponse's handling
|
|
750
|
+
if (pendingWaitUntil) {
|
|
751
|
+
if (ctx.waitUntil) {
|
|
752
|
+
ctx.waitUntil(pendingWaitUntil);
|
|
753
|
+
pendingWaitUntil = undefined;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
const cacheTags = context.renderOpts.collectedTags;
|
|
757
|
+
// If the request is for a static response, we can cache it so long
|
|
758
|
+
// as it's not edge.
|
|
759
|
+
if (isIsr) {
|
|
760
|
+
const blob = await response.blob();
|
|
761
|
+
// Copy the headers from the response.
|
|
762
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
763
|
+
if (cacheTags) {
|
|
764
|
+
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
765
|
+
}
|
|
766
|
+
if (!headers['content-type'] && blob.type) {
|
|
767
|
+
headers['content-type'] = blob.type;
|
|
768
|
+
}
|
|
769
|
+
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
770
|
+
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
|
|
771
|
+
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
772
|
+
// build-time fallback in `build/index.ts` so cache entries
|
|
773
|
+
// and the response Cache-Control header agree on the route's
|
|
774
|
+
// effective expire. Routes that opt out of revalidation
|
|
775
|
+
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
776
|
+
// keep `expire: undefined`.
|
|
777
|
+
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
778
|
+
// Create the cache entry for the response.
|
|
779
|
+
const cacheEntry = {
|
|
780
|
+
value: {
|
|
781
|
+
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
782
|
+
status: response.status,
|
|
783
|
+
body: Buffer.from(await blob.arrayBuffer()),
|
|
784
|
+
headers
|
|
785
|
+
},
|
|
786
|
+
cacheControl: {
|
|
787
|
+
revalidate,
|
|
788
|
+
expire
|
|
789
|
+
}
|
|
790
|
+
};
|
|
791
|
+
return cacheEntry;
|
|
792
|
+
} else {
|
|
793
|
+
// send response without caching if not ISR
|
|
794
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
795
|
+
return null;
|
|
796
|
+
}
|
|
797
|
+
} catch (err) {
|
|
798
|
+
// if this is a background revalidate we need to report
|
|
799
|
+
// the request error here as it won't be bubbled
|
|
800
|
+
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
801
|
+
const silenceLog = false;
|
|
802
|
+
await routeModule.onRequestError(req, err, {
|
|
803
|
+
routerKind: 'App Router',
|
|
804
|
+
routePath: srcPage,
|
|
805
|
+
routeType: 'route',
|
|
806
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
807
|
+
isStaticGeneration: cacheKey !== null,
|
|
808
|
+
isOnDemandRevalidate
|
|
809
|
+
})
|
|
810
|
+
}, silenceLog, routerServerContext);
|
|
811
|
+
}
|
|
812
|
+
throw err;
|
|
813
|
+
}
|
|
814
|
+
};
|
|
815
|
+
const handleResponse = async (currentSpan, parentSpan)=>{
|
|
816
|
+
try {
|
|
817
|
+
var _cacheEntry_value;
|
|
818
|
+
const cacheEntry = await routeModule.handleResponse({
|
|
819
|
+
req,
|
|
820
|
+
nextConfig,
|
|
821
|
+
cacheKey,
|
|
822
|
+
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
823
|
+
isFallback: false,
|
|
824
|
+
previewProps,
|
|
825
|
+
prerenderManifest,
|
|
826
|
+
isRoutePPREnabled: false,
|
|
827
|
+
isOnDemandRevalidate,
|
|
828
|
+
revalidateOnlyGenerated,
|
|
829
|
+
responseGenerator,
|
|
830
|
+
waitUntil: ctx.waitUntil,
|
|
831
|
+
isMinimalMode
|
|
832
|
+
});
|
|
833
|
+
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
834
|
+
throw cacheEntry.error;
|
|
853
835
|
}
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
if (!parsed.success) {
|
|
858
|
-
return new Response(JSON.stringify({
|
|
859
|
-
error: parsed.error.issues[0]?.message ?? "invalid body"
|
|
860
|
-
}), {
|
|
861
|
-
status: 400,
|
|
862
|
-
headers: {
|
|
863
|
-
"content-type": "application/json"
|
|
836
|
+
// we don't create a cacheEntry for ISR
|
|
837
|
+
if (!isIsr) {
|
|
838
|
+
return;
|
|
864
839
|
}
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
}
|
|
869
|
-
async function handleGenericExtensionTurn(req) {
|
|
870
|
-
let raw;
|
|
871
|
-
try {
|
|
872
|
-
raw = await req.json();
|
|
873
|
-
} catch {
|
|
874
|
-
return new Response(JSON.stringify({
|
|
875
|
-
error: "Request body must be valid JSON"
|
|
876
|
-
}), {
|
|
877
|
-
status: 400,
|
|
878
|
-
headers: {
|
|
879
|
-
"content-type": "application/json"
|
|
840
|
+
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) {
|
|
841
|
+
var _cacheEntry_value1;
|
|
842
|
+
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
880
843
|
}
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
const parsed = GenericBody.safeParse(raw);
|
|
884
|
-
if (!parsed.success) {
|
|
885
|
-
return new Response(JSON.stringify({
|
|
886
|
-
error: parsed.error.issues[0]?.message ?? "invalid body"
|
|
887
|
-
}), {
|
|
888
|
-
status: 400,
|
|
889
|
-
headers: {
|
|
890
|
-
"content-type": "application/json"
|
|
844
|
+
if (!isMinimalMode) {
|
|
845
|
+
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
891
846
|
}
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
847
|
+
// Draft mode should never be cached
|
|
848
|
+
if (isDraftMode) {
|
|
849
|
+
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
850
|
+
}
|
|
851
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
852
|
+
if (!(isMinimalMode && isIsr)) {
|
|
853
|
+
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
854
|
+
}
|
|
855
|
+
// If cache control is already set on the response we don't
|
|
856
|
+
// override it to allow users to customize it via next.config
|
|
857
|
+
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
858
|
+
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
859
|
+
}
|
|
860
|
+
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'.
|
|
861
|
+
new Response(cacheEntry.value.body, {
|
|
862
|
+
headers,
|
|
863
|
+
status: cacheEntry.value.status || 200
|
|
864
|
+
}));
|
|
865
|
+
return;
|
|
866
|
+
} catch (err) {
|
|
867
|
+
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
868
|
+
const silenceLog = false;
|
|
869
|
+
await routeModule.onRequestError(req, err, {
|
|
870
|
+
routerKind: 'App Router',
|
|
871
|
+
routePath: normalizedSrcPage,
|
|
872
|
+
routeType: 'route',
|
|
873
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
874
|
+
isStaticGeneration: cacheKey !== null,
|
|
875
|
+
isOnDemandRevalidate
|
|
876
|
+
})
|
|
877
|
+
}, silenceLog, routerServerContext);
|
|
878
|
+
}
|
|
879
|
+
// rethrow so that we can handle serving error page
|
|
880
|
+
// If this is during static generation, throw the error again.
|
|
881
|
+
if (isIsr) throw err;
|
|
882
|
+
// Otherwise, send a 500 response unless the original response has
|
|
883
|
+
// already committed. In that case, preserve its status code for
|
|
884
|
+
// telemetry while still recording the failure and terminating a response
|
|
885
|
+
// that the failed pipeline left open.
|
|
886
|
+
if (res.headersSent) {
|
|
887
|
+
if (currentSpan) {
|
|
888
|
+
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
889
|
+
currentSpan.recordException(error);
|
|
890
|
+
currentSpan.setStatus({
|
|
891
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
892
|
+
message: error.message
|
|
893
|
+
});
|
|
894
|
+
currentSpan.setAttribute('error.type', error.name);
|
|
895
|
+
}
|
|
896
|
+
if (!res.writableEnded && !res.destroyed) {
|
|
897
|
+
res.end();
|
|
898
|
+
}
|
|
899
|
+
} else {
|
|
900
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
901
|
+
status: 500
|
|
902
|
+
}));
|
|
903
|
+
}
|
|
904
|
+
return;
|
|
905
|
+
} finally{
|
|
906
|
+
;
|
|
907
|
+
(()=>{
|
|
908
|
+
if (!currentSpan) {
|
|
909
|
+
return;
|
|
910
|
+
}
|
|
911
|
+
let statusCode = res.statusCode;
|
|
912
|
+
currentSpan.setAttributes({
|
|
913
|
+
'http.status_code': statusCode,
|
|
914
|
+
'next.rsc': false
|
|
915
|
+
});
|
|
916
|
+
if (statusCode && statusCode >= 500) {
|
|
917
|
+
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
918
|
+
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
919
|
+
currentSpan.setStatus({
|
|
920
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
921
|
+
});
|
|
922
|
+
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
923
|
+
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
924
|
+
}
|
|
925
|
+
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
926
|
+
// We were unable to get attributes, probably OTEL is not enabled
|
|
927
|
+
if (!rootSpanAttributes) {
|
|
928
|
+
return;
|
|
929
|
+
}
|
|
930
|
+
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
931
|
+
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
932
|
+
return;
|
|
933
|
+
}
|
|
934
|
+
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
935
|
+
const name = `${method} ${route}`;
|
|
936
|
+
currentSpan.setAttributes({
|
|
937
|
+
'next.route': route,
|
|
938
|
+
'http.route': route,
|
|
939
|
+
'next.span_name': name
|
|
940
|
+
});
|
|
941
|
+
currentSpan.updateName(name);
|
|
942
|
+
// Propagate http.route to the parent span if one exists (e.g.
|
|
943
|
+
// a platform-created HTTP span in adapter deployments).
|
|
944
|
+
if (parentSpan && parentSpan !== currentSpan) {
|
|
945
|
+
parentSpan.setAttribute('http.route', route);
|
|
946
|
+
parentSpan.updateName(name);
|
|
947
|
+
}
|
|
948
|
+
})();
|
|
913
949
|
}
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
* @public-internal — browser-extension agent listing.
|
|
931
|
-
*/ async function GET() {
|
|
932
|
-
return (0,_lib_api_extension_turn__WEBPACK_IMPORTED_MODULE_0__/* .handleExtensionAgents */ .CZ)();
|
|
950
|
+
};
|
|
951
|
+
// TODO: activeSpan code path is for when wrapped by
|
|
952
|
+
// next-server can be removed when this is no longer used
|
|
953
|
+
if (isWrappedByNextServer && activeSpan) {
|
|
954
|
+
await handleResponse(activeSpan, undefined);
|
|
955
|
+
} else {
|
|
956
|
+
let parentSpan = tracer.getActiveScopeSpan();
|
|
957
|
+
await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
|
|
958
|
+
spanName: `${method} ${srcPage}`,
|
|
959
|
+
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
|
|
960
|
+
attributes: {
|
|
961
|
+
'http.method': method,
|
|
962
|
+
'http.target': req.url
|
|
963
|
+
}
|
|
964
|
+
}, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
|
|
965
|
+
}
|
|
933
966
|
}
|
|
934
967
|
|
|
968
|
+
//# sourceMappingURL=app-route.js.map
|
|
935
969
|
|
|
936
|
-
/***/ }),
|
|
937
|
-
|
|
938
|
-
/***/ 55511:
|
|
939
|
-
/***/ ((module) => {
|
|
940
|
-
|
|
941
|
-
module.exports = require("crypto");
|
|
942
|
-
|
|
943
|
-
/***/ }),
|
|
944
|
-
|
|
945
|
-
/***/ 55591:
|
|
946
|
-
/***/ ((module) => {
|
|
947
|
-
|
|
948
|
-
module.exports = require("https");
|
|
949
|
-
|
|
950
|
-
/***/ }),
|
|
951
|
-
|
|
952
|
-
/***/ 57075:
|
|
953
|
-
/***/ ((module) => {
|
|
954
|
-
|
|
955
|
-
module.exports = require("node:stream");
|
|
956
|
-
|
|
957
|
-
/***/ }),
|
|
958
|
-
|
|
959
|
-
/***/ 57975:
|
|
960
|
-
/***/ ((module) => {
|
|
961
|
-
|
|
962
|
-
module.exports = require("node:util");
|
|
963
|
-
|
|
964
|
-
/***/ }),
|
|
965
|
-
|
|
966
|
-
/***/ 63033:
|
|
967
|
-
/***/ ((module) => {
|
|
968
|
-
|
|
969
|
-
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
970
970
|
|
|
971
971
|
/***/ }),
|
|
972
972
|
|
|
@@ -1152,7 +1152,7 @@ module.exports = import("@huggingface/transformers");;
|
|
|
1152
1152
|
var __webpack_require__ = require("../../../../../webpack-runtime.js");
|
|
1153
1153
|
__webpack_require__.C(exports);
|
|
1154
1154
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
1155
|
-
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,7981,513,6299,563,8808,7547,4992,46,3042,3566,2068,4377,1638,5585,3524,
|
|
1155
|
+
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__(70803)));
|
|
1156
1156
|
module.exports = __webpack_exports__;
|
|
1157
1157
|
|
|
1158
1158
|
})();
|