@circuitwall/jarela 2.2.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +2 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +8 -0
- package/.next/standalone/.next/server/app/_global-error/page.js +68 -68
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +76 -76
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/v1/access/[identity]/route.js +100 -93
- package/.next/standalone/.next/server/app/api/v1/access/route.js +176 -169
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +89 -56
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/display-filters/route.js +139 -127
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/route.js +107 -100
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/thread/route.js +765 -753
- package/.next/standalone/.next/server/app/api/v1/agents/route.js +72 -65
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +371 -364
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +809 -802
- package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +9 -2
- package/.next/standalone/.next/server/app/api/v1/attachments/files/route.js +49 -49
- package/.next/standalone/.next/server/app/api/v1/attachments/images/route.js +910 -910
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +583 -16
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/[remote_jid]/route.js +41 -30
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +48 -37
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +697 -130
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js +703 -136
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js +796 -229
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/[route_id]/route.js +762 -746
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +1050 -1034
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +673 -106
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js +811 -804
- package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js +718 -706
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/config/route.js +85 -85
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js +709 -709
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/currency/route.js +10 -10
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js +796 -784
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +30 -23
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js +86 -86
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js +57 -57
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/search/route.js +385 -378
- package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js +122 -122
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/env/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/env-sync/allowlist/route.js +375 -368
- package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/events/route.js +745 -178
- package/.next/standalone/.next/server/app/api/v1/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/events/test/route.js +77 -77
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +763 -763
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/browser/activate/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +16 -9
- package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +72 -65
- package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +41 -34
- package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +211 -204
- package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +140 -133
- package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +113 -106
- package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +121 -114
- package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +141 -134
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +690 -690
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js +185 -185
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js +171 -171
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js +396 -396
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js +212 -212
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/files/[name]/route.js +235 -235
- package/.next/standalone/.next/server/app/api/v1/fs/browse/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/harnesses/[id]/route.js +228 -221
- package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +65 -58
- package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +79 -72
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/health/route.js +783 -771
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +140 -133
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/callback/route.js +370 -363
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +240 -233
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +689 -682
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +886 -879
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +115 -108
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +955 -948
- package/.next/standalone/.next/server/app/api/v1/integrations/route.js +223 -216
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +876 -847
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/local-file/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/logs/route.js +70 -70
- package/.next/standalone/.next/server/app/api/v1/maps/embed/route.js +79 -72
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +991 -979
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/registry/route.js +196 -196
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/route.js +19 -7
- package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +539 -532
- package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +86 -79
- package/.next/standalone/.next/server/app/api/v1/memory/route.js +58 -51
- package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +138 -131
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +381 -369
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +150 -143
- package/.next/standalone/.next/server/app/api/v1/models/route.js +634 -627
- package/.next/standalone/.next/server/app/api/v1/packages/catalog/route.js +445 -445
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js +120 -120
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js +234 -234
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js +407 -407
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js +107 -107
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js +228 -228
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/route.js +148 -148
- package/.next/standalone/.next/server/app/api/v1/packages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js +787 -787
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js +529 -514
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js +181 -181
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js +258 -258
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/profile/location/route.js +37 -30
- package/.next/standalone/.next/server/app/api/v1/profile/route.js +171 -164
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +15 -8
- package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +171 -164
- package/.next/standalone/.next/server/app/api/v1/providers/route.js +101 -94
- package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +457 -450
- package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +44 -37
- package/.next/standalone/.next/server/app/api/v1/redaction/route.js +65 -58
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +617 -605
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/route.js +739 -732
- package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +329 -322
- package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +204 -197
- package/.next/standalone/.next/server/app/api/v1/security/state/route.js +58 -51
- package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +183 -176
- package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +194 -187
- package/.next/standalone/.next/server/app/api/v1/setup/test-key/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/skills/[id]/route.js +776 -769
- package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +122 -115
- package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +334 -327
- package/.next/standalone/.next/server/app/api/v1/skills/route.js +873 -866
- package/.next/standalone/.next/server/app/api/v1/system/abort/route.js +838 -808
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js +177 -177
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/tailscale/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/tasks/[agent_id]/route.js +122 -115
- package/.next/standalone/.next/server/app/api/v1/tasks/route.js +30 -23
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js +1436 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js +638 -631
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js +60 -439
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +172 -173
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/route.js +925 -913
- package/.next/standalone/.next/server/app/api/v1/tools/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js +17 -17
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/route.js +570 -570
- package/.next/standalone/.next/server/app/api/v1/voice/transcribe/route.js +241 -229
- package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +989 -977
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +40 -28
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/watchers/reaction-scripts/route.js +128 -128
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/icon.svg/route.js +62 -62
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +436 -436
- package/.next/standalone/.next/server/app/page.js +1179 -743
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page.js +99 -91
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +2 -1
- package/.next/standalone/.next/server/chunks/{424.js → 1388.js} +441 -1022
- package/.next/standalone/.next/server/chunks/1433.js +1 -1
- package/.next/standalone/.next/server/chunks/1638.js +1 -2
- package/.next/standalone/.next/server/chunks/1738.js +1 -1
- package/.next/standalone/.next/server/chunks/2068.js +47 -10
- package/.next/standalone/.next/server/chunks/210.js +3 -3
- package/.next/standalone/.next/server/chunks/2151.js +31 -1
- package/.next/standalone/.next/server/chunks/2207.js +1 -0
- package/.next/standalone/.next/server/chunks/2447.js +10 -5
- package/.next/standalone/.next/server/chunks/2471.js +45 -45
- package/.next/standalone/.next/server/chunks/2504.js +1 -1
- package/.next/standalone/.next/server/chunks/2695.js +17 -17
- package/.next/standalone/.next/server/chunks/3042.js +24 -16
- package/.next/standalone/.next/server/chunks/{4540.js → 309.js} +104 -38
- package/.next/standalone/.next/server/chunks/{2350.js → 3272.js} +104 -37
- package/.next/standalone/.next/server/chunks/3399.js +526 -526
- package/.next/standalone/.next/server/chunks/3524.js +150 -67
- package/.next/standalone/.next/server/chunks/3566.js +1 -1
- package/.next/standalone/.next/server/chunks/4189.js +946 -0
- package/.next/standalone/.next/server/chunks/4433.js +146 -146
- package/.next/standalone/.next/server/chunks/4508.js +3 -3
- package/.next/standalone/.next/server/chunks/4588.js +1 -0
- package/.next/standalone/.next/server/chunks/46.js +78 -28
- package/.next/standalone/.next/server/chunks/466.js +12 -0
- package/.next/standalone/.next/server/chunks/4868.js +206 -206
- package/.next/standalone/.next/server/chunks/4992.js +13 -0
- package/.next/standalone/.next/server/chunks/5120.js +963 -0
- package/.next/standalone/.next/server/chunks/5701.js +1 -1
- package/.next/standalone/.next/server/chunks/5900.js +1 -1
- package/.next/standalone/.next/server/chunks/5908.js +63 -42
- package/.next/standalone/.next/server/chunks/6142.js +10 -2
- package/.next/standalone/.next/server/chunks/6210.js +1 -0
- package/.next/standalone/.next/server/chunks/6213.js +1 -1
- package/.next/standalone/.next/server/chunks/6649.js +3 -3
- package/.next/standalone/.next/server/chunks/6703.js +3 -3
- package/.next/standalone/.next/server/chunks/7445.js +1 -0
- package/.next/standalone/.next/server/chunks/8067.js +12 -0
- package/.next/standalone/.next/server/chunks/8461.js +24 -17
- package/.next/standalone/.next/server/chunks/8558.js +1 -1
- package/.next/standalone/.next/server/chunks/8724.js +1 -1
- package/.next/standalone/.next/server/chunks/8849.js +91 -91
- package/.next/standalone/.next/server/chunks/9032.js +4 -3
- package/.next/standalone/.next/server/chunks/{2563.js → 9164.js} +33389 -31418
- package/.next/standalone/.next/server/chunks/9237.js +396 -396
- package/.next/standalone/.next/server/chunks/{9640.js → 9304.js} +1672 -575
- package/.next/standalone/.next/server/chunks/9406.js +1 -1
- package/.next/standalone/.next/server/chunks/9590.js +68 -18
- package/.next/standalone/.next/server/chunks/9824.js +98 -98
- package/.next/standalone/.next/server/chunks/9826.js +1 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware.js +486 -415
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/preview-props.json +3 -3
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{1395-a340fb0a345382a4.js → 1395-e4a99912b8f83044.js} +13 -1
- package/.next/standalone/.next/static/chunks/app/_global-error/{page-36cb8b428b38b26a.js → page-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/{page-7017f07f8a7a083c.js → page-04748847c6ff866f.js} +1013 -585
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/css/{d80058f0b9b41c09.css → 2669e8744cc8c212.css} +2 -2
- package/.next/standalone/docs/adoption/changesets.json +358 -0
- package/.next/standalone/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/.next/standalone/package.json +3 -3
- package/CHANGELOG.md +44 -0
- package/api/client.ts +9 -0
- package/api/types.ts +29 -0
- package/app/api/v1/lifecycle/adoption/route.ts +14 -2
- package/app/api/v1/models/[name]/compact-threads/route.ts +14 -11
- package/app/api/v1/threads/[thread_id]/activity/route.ts +19 -0
- package/app/api/v1/threads/[thread_id]/context-pin/route.test.ts +1 -0
- package/app/api/v1/threads/[thread_id]/context-pin/route.ts +2 -1
- package/app/api/v1/threads/[thread_id]/route.ts +5 -1
- package/app/api/v1/threads/[thread_id]/run/route.ts +0 -1
- package/components/chat/ChatView.tsx +52 -11
- package/components/chat/ContextBoundary.test.tsx +68 -1
- package/components/chat/ContextBoundary.tsx +92 -13
- package/components/chat/MessageBubble.tsx +12 -0
- package/components/chat/MessageList.test.tsx +31 -0
- package/components/chat/MessageList.tsx +49 -28
- package/components/chat/ToolList.test.tsx +92 -16
- package/components/chat/ToolList.tsx +59 -4
- package/components/chat/chat-helpers.test.tsx +24 -1
- package/components/chat/chat-helpers.ts +47 -4
- package/components/chat/useThreadActivity.test.tsx +113 -0
- package/components/chat/useThreadActivity.ts +94 -0
- package/components/chat/useThreadData.ts +16 -16
- package/components/chat/workflow-step-retry.ts +25 -0
- package/components/integrations/NetworkSection.tsx +2 -2
- package/components/ui/BootScreen.tsx +17 -0
- package/components/ui/WorkflowChecklist.tsx +71 -33
- package/hooks/useSSE.ts +28 -3
- package/lib/agents/citation-checker.test.ts +40 -2
- package/lib/agents/citation-checker.ts +56 -11
- package/lib/agents/compaction-pipeline.test.ts +202 -0
- package/lib/agents/compaction-pipeline.ts +483 -0
- package/lib/agents/context-boundary.ts +5 -6
- package/lib/agents/conversation-summary.ts +37 -21
- package/lib/agents/instruction-edits.test.ts +120 -0
- package/lib/agents/instruction-edits.ts +65 -42
- package/lib/agents/prepare/history-window.test.ts +18 -0
- package/lib/agents/prepare/history-window.ts +11 -2
- package/lib/agents/prepare/request.ts +4 -2
- package/lib/agents/prepare/system-prompt.test.ts +49 -0
- package/lib/agents/prepare/system-prompt.ts +16 -5
- package/lib/agents/prompt-registry.test.ts +5 -140
- package/lib/agents/prompt-registry.ts +45 -1
- package/lib/agents/prompt-variants.ts +146 -0
- package/lib/agents/proposals.test.ts +76 -0
- package/lib/agents/proposals.ts +13 -5
- package/lib/agents/run-registry.test.ts +22 -0
- package/lib/agents/run-registry.ts +29 -0
- package/lib/agents/run-thread.auto-boundary.test.ts +125 -5
- package/lib/agents/run-thread.retry.test.ts +67 -1
- package/lib/agents/run-thread.ts +110 -10
- package/lib/agents/sqlite-checkpoint-saver.test.ts +91 -0
- package/lib/agents/thread-activity.test.ts +31 -0
- package/lib/agents/thread-activity.ts +27 -0
- package/lib/agents/thread-compaction-state.test.ts +82 -0
- package/lib/agents/thread-compaction-state.ts +121 -0
- package/lib/agents/thread-compaction.test.ts +83 -4
- package/lib/agents/thread-compaction.ts +34 -11
- package/lib/agents/warm-summary-background.test.ts +219 -5
- package/lib/agents/warm-summary-background.ts +346 -143
- package/lib/agents/warm-topics.test.ts +191 -0
- package/lib/agents/warm-topics.ts +317 -0
- package/lib/agents/workflow-step-retry.test.ts +96 -0
- package/lib/agents/workflow-step-retry.ts +216 -0
- package/lib/api/browser-control.ts +0 -3
- package/lib/bridges/dispatcher.ts +1 -0
- package/lib/bridges/message-role.test.ts +81 -0
- package/lib/bridges/message-role.ts +23 -10
- package/lib/bridges/types.ts +6 -0
- package/lib/bridges/whatsapp-link.test.ts +32 -0
- package/lib/bridges/whatsapp-link.ts +21 -0
- package/lib/bridges/whatsapp.inbound.test.ts +239 -0
- package/lib/bridges/whatsapp.sender.test.ts +80 -1
- package/lib/bridges/whatsapp.ts +76 -38
- package/lib/db/migrations.ts +5 -0
- package/lib/env/config.ts +2 -0
- package/lib/env/schema.ts +12 -0
- package/lib/lifecycle/changeset-build.test.ts +93 -0
- package/lib/lifecycle/changeset-build.ts +210 -0
- package/lib/lifecycle/changesets.test.ts +101 -0
- package/lib/lifecycle/changesets.ts +166 -0
- package/lib/lifecycle/surface-collect.test.ts +88 -0
- package/lib/lifecycle/surface-collect.ts +64 -0
- package/lib/lifecycle/surface-snapshot.test.ts +104 -0
- package/lib/lifecycle/surface-snapshot.ts +210 -0
- package/lib/memory/record.ts +0 -2
- package/lib/pricing/snapshot.test.ts +70 -0
- package/lib/pricing/snapshot.ts +10 -2
- package/lib/providers/external.ts +0 -2
- package/lib/proxy/dispatcher.test.ts +119 -1
- package/lib/proxy/dispatcher.ts +22 -9
- package/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/lib/stores/agent-configs.ts +10 -5
- package/lib/stores/bridges.test.ts +81 -0
- package/lib/stores/bridges.ts +9 -8
- package/lib/stores/proxy-config.test.ts +120 -0
- package/lib/stores/proxy-config.ts +22 -4
- package/lib/stores/threads.test.ts +9 -0
- package/lib/stores/threads.ts +33 -19
- package/lib/stores/version-adoption.test.ts +96 -0
- package/lib/stores/version-adoption.ts +239 -26
- package/lib/stores/workflow-progress.ts +3 -0
- package/lib/tools/communications/calendar.test.ts +43 -2
- package/lib/tools/communications/calendar.ts +2 -0
- package/lib/tools/communications/gmail.test.ts +51 -1
- package/lib/tools/communications/gmail.ts +44 -2
- package/lib/tools/communications/ms-todo.ts +0 -7
- package/lib/tools/communications/outlook-calendar.ts +2 -0
- package/lib/tools/communications/outlook.test.ts +33 -2
- package/lib/tools/communications/outlook.ts +2 -0
- package/lib/tools/filesystem/edit-match.test.ts +133 -0
- package/lib/tools/filesystem/edit-match.ts +7 -2
- package/lib/tools/general/memory.ts +1 -1
- package/lib/tools/general/workflow-progress.ts +2 -0
- package/lib/tools/runtime/catalog.ts +1 -25
- package/lib/tools/support/result-refs.test.ts +131 -0
- package/lib/tools/support/result-refs.ts +41 -9
- package/lib/triggers/registry.ts +0 -4
- package/lib/utils/source-link.test.ts +51 -0
- package/lib/utils/source-link.ts +45 -0
- package/package.json +3 -3
- package/scripts/install-to-system.ps1 +39 -11
- package/scripts/install-to-system.sh +37 -3
- package/.next/standalone/.next/server/chunks/3979.js +0 -581
- package/.next/standalone/.next/server/chunks/5936.js +0 -594
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-36cb8b428b38b26a.js +0 -17
- /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → hwujW4hR1b-r3k5WdMxZO}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → hwujW4hR1b-r3k5WdMxZO}/_ssgManifest.js +0 -0
|
@@ -47,635 +47,191 @@ module.exports = require("undici");
|
|
|
47
47
|
|
|
48
48
|
/***/ }),
|
|
49
49
|
|
|
50
|
-
/***/
|
|
51
|
-
/***/ ((
|
|
50
|
+
/***/ 10846:
|
|
51
|
+
/***/ ((module) => {
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
55
|
-
/* harmony export */ handler: () => (/* binding */ handler),
|
|
56
|
-
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
57
|
-
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
58
|
-
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
59
|
-
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
60
|
-
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
61
|
-
/* harmony export */ });
|
|
62
|
-
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
|
|
63
|
-
/* 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__);
|
|
64
|
-
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
|
|
65
|
-
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
66
|
-
/* 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__);
|
|
67
|
-
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
|
|
68
|
-
/* 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__);
|
|
69
|
-
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
|
|
70
|
-
/* 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__);
|
|
71
|
-
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
|
|
72
|
-
/* 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__);
|
|
73
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
74
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__);
|
|
75
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
76
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__);
|
|
77
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
78
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__);
|
|
79
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
80
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__);
|
|
81
|
-
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
82
|
-
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
83
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
84
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__);
|
|
85
|
-
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
86
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
87
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
88
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
89
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__);
|
|
90
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
91
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__);
|
|
92
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
93
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__);
|
|
53
|
+
module.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");
|
|
94
54
|
|
|
55
|
+
/***/ }),
|
|
95
56
|
|
|
57
|
+
/***/ 16698:
|
|
58
|
+
/***/ ((module) => {
|
|
96
59
|
|
|
60
|
+
module.exports = require("node:async_hooks");
|
|
97
61
|
|
|
62
|
+
/***/ }),
|
|
98
63
|
|
|
64
|
+
/***/ 19121:
|
|
65
|
+
/***/ ((module) => {
|
|
99
66
|
|
|
67
|
+
module.exports = require("next/dist/server/app-render/action-async-storage.external.js");
|
|
100
68
|
|
|
69
|
+
/***/ }),
|
|
101
70
|
|
|
71
|
+
/***/ 27910:
|
|
72
|
+
/***/ ((module) => {
|
|
102
73
|
|
|
74
|
+
module.exports = require("stream");
|
|
103
75
|
|
|
76
|
+
/***/ }),
|
|
104
77
|
|
|
78
|
+
/***/ 28354:
|
|
79
|
+
/***/ ((module) => {
|
|
105
80
|
|
|
81
|
+
module.exports = require("util");
|
|
106
82
|
|
|
83
|
+
/***/ }),
|
|
107
84
|
|
|
85
|
+
/***/ 29021:
|
|
86
|
+
/***/ ((module) => {
|
|
108
87
|
|
|
88
|
+
module.exports = require("fs");
|
|
109
89
|
|
|
90
|
+
/***/ }),
|
|
110
91
|
|
|
92
|
+
/***/ 29294:
|
|
93
|
+
/***/ ((module) => {
|
|
111
94
|
|
|
112
|
-
|
|
113
|
-
// module.
|
|
114
|
-
const nextConfigOutput = "standalone"
|
|
115
|
-
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
116
|
-
definition: {
|
|
117
|
-
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
118
|
-
page: "/api/v1/allowed-sites/route",
|
|
119
|
-
pathname: "/api/v1/allowed-sites",
|
|
120
|
-
filename: "route",
|
|
121
|
-
bundlePath: "app/api/v1/allowed-sites/route"
|
|
122
|
-
},
|
|
123
|
-
distDir: ".next" || 0,
|
|
124
|
-
relativeProjectDir: false || '',
|
|
125
|
-
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/allowed-sites/route.ts",
|
|
126
|
-
nextConfigOutput,
|
|
127
|
-
// The lazy require factory ensures that:
|
|
128
|
-
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
129
|
-
// correctly attributing module load time to application-code rather than
|
|
130
|
-
// framework internals.
|
|
131
|
-
// - In all modes: async modules (route files with top-level await) are
|
|
132
|
-
// handled correctly — require() returns a Promise for such modules, which
|
|
133
|
-
// ensureUserland() awaits before the first request is handled.
|
|
134
|
-
userland: ()=>__webpack_require__(58850),
|
|
135
|
-
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
136
|
-
// server HMR updates are picked up without re-executing the entry chunk.
|
|
137
|
-
// Using require() (synchronous) avoids adding async overhead that would be
|
|
138
|
-
// incorrectly attributed to application-code time in devRequestTiming.
|
|
139
|
-
... false ? 0 : {}
|
|
140
|
-
});
|
|
141
|
-
// Pull out the exports that we need to expose from the module. This should
|
|
142
|
-
// be eliminated when we've moved the other routes to the new format. These
|
|
143
|
-
// are used to hook into the route.
|
|
144
|
-
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
145
|
-
function patchFetch() {
|
|
146
|
-
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
147
|
-
workAsyncStorage,
|
|
148
|
-
workUnitAsyncStorage
|
|
149
|
-
});
|
|
150
|
-
}
|
|
95
|
+
module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
|
|
151
96
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
97
|
+
/***/ }),
|
|
98
|
+
|
|
99
|
+
/***/ 30558:
|
|
100
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
101
|
+
|
|
102
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
103
|
+
/* harmony export */ Rk: () => (/* binding */ listAllowedSites),
|
|
104
|
+
/* harmony export */ Rw: () => (/* binding */ putCookies),
|
|
105
|
+
/* harmony export */ Tp: () => (/* binding */ setSsrfBypass),
|
|
106
|
+
/* harmony export */ aQ: () => (/* binding */ getCookieHeaderForUrl),
|
|
107
|
+
/* harmony export */ hL: () => (/* binding */ addAllowedSite),
|
|
108
|
+
/* harmony export */ rh: () => (/* binding */ isHostAllowed),
|
|
109
|
+
/* harmony export */ uc: () => (/* binding */ removeAllowedSite)
|
|
110
|
+
/* harmony export */ });
|
|
111
|
+
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
|
|
112
|
+
/* harmony import */ var _lib_crypto_envelope__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10938);
|
|
113
|
+
// Allowed-sites store. A row represents a host the user has approved the
|
|
114
|
+
// agent to use as them. The single approval grants both:
|
|
115
|
+
//
|
|
116
|
+
// 1. browser-RPC navigation — the extension may drive a tab on this
|
|
117
|
+
// host on the agent's behalf
|
|
118
|
+
// 2. cookie passthrough — cookies the extension scrapes for this host
|
|
119
|
+
// (via chrome.cookies.onChanged) get attached to web_fetch requests
|
|
120
|
+
//
|
|
121
|
+
// The two capabilities live on the same row by design: removing a host
|
|
122
|
+
// instantly disables both.
|
|
123
|
+
//
|
|
124
|
+
// Hostname matching is suffix-based: an allow-list entry for `example.com`
|
|
125
|
+
// covers requests to `example.com` and `*.example.com`, but does NOT cover
|
|
126
|
+
// `notexample.com`. The matched entry is what cookies are stored under
|
|
127
|
+
// and what `last_used_at` updates against.
|
|
128
|
+
//
|
|
129
|
+
// Cookie blobs are envelope-encrypted (lib/crypto/envelope.ts) — same
|
|
130
|
+
// scheme as proxy passwords. The UI never receives cookie values; only
|
|
131
|
+
// `has_cookies: boolean` and `cookies_updated_at`.
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
const HOSTNAME_RE = /^(?:(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
135
|
+
const IPV4_RE = /^(?:25[0-5]|2[0-4]\d|[01]?\d\d?)(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d\d?)){3}$/;
|
|
136
|
+
const now = ()=>new Date().toISOString();
|
|
137
|
+
function normaliseHost(input) {
|
|
138
|
+
if (typeof input !== "string") return null;
|
|
139
|
+
const trimmed = input.trim().toLowerCase().replace(/\.+$/, "");
|
|
140
|
+
if (!trimmed) return null;
|
|
141
|
+
if (trimmed.length > 253) return null;
|
|
142
|
+
if (HOSTNAME_RE.test(trimmed)) return trimmed;
|
|
143
|
+
if (IPV4_RE.test(trimmed)) return trimmed;
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
function rowToStatus(row) {
|
|
147
|
+
return {
|
|
148
|
+
hostname: row.hostname,
|
|
149
|
+
ssrf_bypass: row.ssrf_bypass === 1,
|
|
150
|
+
has_cookies: row.cookies_blob != null,
|
|
151
|
+
created_at: row.created_at,
|
|
152
|
+
last_used_at: row.last_used_at,
|
|
153
|
+
cookies_updated_at: row.cookies_updated_at
|
|
191
154
|
};
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
155
|
+
}
|
|
156
|
+
function listAllowedSites() {
|
|
157
|
+
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
|
|
158
|
+
const rows = db.prepare("SELECT hostname, ssrf_bypass, cookies_blob, created_at, last_used_at, cookies_updated_at FROM allowed_sites ORDER BY hostname").all();
|
|
159
|
+
return rows.map(rowToStatus);
|
|
160
|
+
}
|
|
161
|
+
function addAllowedSite(input) {
|
|
162
|
+
const host = normaliseHost(input.hostname);
|
|
163
|
+
if (!host) return {
|
|
164
|
+
error: "hostname is not a valid DNS host or IPv4 address"
|
|
165
|
+
};
|
|
166
|
+
const bypass = input.ssrf_bypass === true ? 1 : 0;
|
|
167
|
+
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
|
|
168
|
+
const existing = db.prepare("SELECT * FROM allowed_sites WHERE hostname = ?").get(host);
|
|
169
|
+
if (existing) {
|
|
170
|
+
if (existing.ssrf_bypass !== bypass) {
|
|
171
|
+
db.prepare("UPDATE allowed_sites SET ssrf_bypass = ? WHERE hostname = ?").run(bypass, host);
|
|
172
|
+
existing.ssrf_bypass = bypass;
|
|
201
173
|
}
|
|
174
|
+
return rowToStatus(existing);
|
|
202
175
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
if (serverActionsManifest && clientReferenceManifest) {
|
|
213
|
-
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
214
|
-
page: srcPage,
|
|
215
|
-
clientReferenceManifest,
|
|
216
|
-
serverActionsManifest
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
const method = req.method || 'GET';
|
|
220
|
-
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
221
|
-
const activeSpan = tracer.getActiveScopeSpan();
|
|
222
|
-
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
223
|
-
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
224
|
-
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
225
|
-
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
226
|
-
globalThis.__incrementalCache = incrementalCache;
|
|
227
|
-
const context = {
|
|
228
|
-
params,
|
|
229
|
-
previewProps,
|
|
230
|
-
renderOpts: {
|
|
231
|
-
experimental: {
|
|
232
|
-
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
233
|
-
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
234
|
-
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
235
|
-
},
|
|
236
|
-
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
237
|
-
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
238
|
-
isDraftMode,
|
|
239
|
-
incrementalCache,
|
|
240
|
-
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
241
|
-
cacheLifeProfiles: nextConfig.cacheLife,
|
|
242
|
-
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
243
|
-
waitUntil: ctx.waitUntil,
|
|
244
|
-
onClose: (cb)=>{
|
|
245
|
-
res.on('close', cb);
|
|
246
|
-
},
|
|
247
|
-
onAfterTaskError: undefined
|
|
248
|
-
},
|
|
249
|
-
sharedContext: {
|
|
250
|
-
buildId,
|
|
251
|
-
deploymentId
|
|
252
|
-
}
|
|
176
|
+
const created_at = now();
|
|
177
|
+
db.prepare("INSERT INTO allowed_sites (hostname, ssrf_bypass, created_at) VALUES (?, ?, ?)").run(host, bypass, created_at);
|
|
178
|
+
return {
|
|
179
|
+
hostname: host,
|
|
180
|
+
ssrf_bypass: bypass === 1,
|
|
181
|
+
has_cookies: false,
|
|
182
|
+
created_at,
|
|
183
|
+
last_used_at: null,
|
|
184
|
+
cookies_updated_at: null
|
|
253
185
|
};
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
const
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
status: response.status,
|
|
304
|
-
body: Buffer.from(await blob.arrayBuffer()),
|
|
305
|
-
headers
|
|
306
|
-
},
|
|
307
|
-
cacheControl: {
|
|
308
|
-
revalidate,
|
|
309
|
-
expire
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
return cacheEntry;
|
|
313
|
-
} else {
|
|
314
|
-
// send response without caching if not ISR
|
|
315
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
316
|
-
return null;
|
|
317
|
-
}
|
|
318
|
-
} catch (err) {
|
|
319
|
-
// if this is a background revalidate we need to report
|
|
320
|
-
// the request error here as it won't be bubbled
|
|
321
|
-
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
322
|
-
const silenceLog = false;
|
|
323
|
-
await routeModule.onRequestError(req, err, {
|
|
324
|
-
routerKind: 'App Router',
|
|
325
|
-
routePath: srcPage,
|
|
326
|
-
routeType: 'route',
|
|
327
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
328
|
-
isStaticGeneration: cacheKey !== null,
|
|
329
|
-
isOnDemandRevalidate
|
|
330
|
-
})
|
|
331
|
-
}, silenceLog, routerServerContext);
|
|
332
|
-
}
|
|
333
|
-
throw err;
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
const handleResponse = async (currentSpan, parentSpan)=>{
|
|
337
|
-
try {
|
|
338
|
-
var _cacheEntry_value;
|
|
339
|
-
const cacheEntry = await routeModule.handleResponse({
|
|
340
|
-
req,
|
|
341
|
-
nextConfig,
|
|
342
|
-
cacheKey,
|
|
343
|
-
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
344
|
-
isFallback: false,
|
|
345
|
-
previewProps,
|
|
346
|
-
prerenderManifest,
|
|
347
|
-
isRoutePPREnabled: false,
|
|
348
|
-
isOnDemandRevalidate,
|
|
349
|
-
revalidateOnlyGenerated,
|
|
350
|
-
responseGenerator,
|
|
351
|
-
waitUntil: ctx.waitUntil,
|
|
352
|
-
isMinimalMode
|
|
353
|
-
});
|
|
354
|
-
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
355
|
-
throw cacheEntry.error;
|
|
356
|
-
}
|
|
357
|
-
// we don't create a cacheEntry for ISR
|
|
358
|
-
if (!isIsr) {
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE) {
|
|
362
|
-
var _cacheEntry_value1;
|
|
363
|
-
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
364
|
-
}
|
|
365
|
-
if (!isMinimalMode) {
|
|
366
|
-
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
367
|
-
}
|
|
368
|
-
// Draft mode should never be cached
|
|
369
|
-
if (isDraftMode) {
|
|
370
|
-
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
371
|
-
}
|
|
372
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
373
|
-
if (!(isMinimalMode && isIsr)) {
|
|
374
|
-
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
375
|
-
}
|
|
376
|
-
// If cache control is already set on the response we don't
|
|
377
|
-
// override it to allow users to customize it via next.config
|
|
378
|
-
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
379
|
-
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
380
|
-
}
|
|
381
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.
|
|
382
|
-
new Response(cacheEntry.value.body, {
|
|
383
|
-
headers,
|
|
384
|
-
status: cacheEntry.value.status || 200
|
|
385
|
-
}));
|
|
386
|
-
return;
|
|
387
|
-
} catch (err) {
|
|
388
|
-
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
389
|
-
const silenceLog = false;
|
|
390
|
-
await routeModule.onRequestError(req, err, {
|
|
391
|
-
routerKind: 'App Router',
|
|
392
|
-
routePath: normalizedSrcPage,
|
|
393
|
-
routeType: 'route',
|
|
394
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
395
|
-
isStaticGeneration: cacheKey !== null,
|
|
396
|
-
isOnDemandRevalidate
|
|
397
|
-
})
|
|
398
|
-
}, silenceLog, routerServerContext);
|
|
399
|
-
}
|
|
400
|
-
// rethrow so that we can handle serving error page
|
|
401
|
-
// If this is during static generation, throw the error again.
|
|
402
|
-
if (isIsr) throw err;
|
|
403
|
-
// Otherwise, send a 500 response unless the original response has
|
|
404
|
-
// already committed. In that case, preserve its status code for
|
|
405
|
-
// telemetry while still recording the failure and terminating a response
|
|
406
|
-
// that the failed pipeline left open.
|
|
407
|
-
if (res.headersSent) {
|
|
408
|
-
if (currentSpan) {
|
|
409
|
-
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
410
|
-
currentSpan.recordException(error);
|
|
411
|
-
currentSpan.setStatus({
|
|
412
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
413
|
-
message: error.message
|
|
414
|
-
});
|
|
415
|
-
currentSpan.setAttribute('error.type', error.name);
|
|
416
|
-
}
|
|
417
|
-
if (!res.writableEnded && !res.destroyed) {
|
|
418
|
-
res.end();
|
|
419
|
-
}
|
|
420
|
-
} else {
|
|
421
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
422
|
-
status: 500
|
|
423
|
-
}));
|
|
424
|
-
}
|
|
425
|
-
return;
|
|
426
|
-
} finally{
|
|
427
|
-
;
|
|
428
|
-
(()=>{
|
|
429
|
-
if (!currentSpan) {
|
|
430
|
-
return;
|
|
431
|
-
}
|
|
432
|
-
let statusCode = res.statusCode;
|
|
433
|
-
currentSpan.setAttributes({
|
|
434
|
-
'http.status_code': statusCode,
|
|
435
|
-
'next.rsc': false
|
|
436
|
-
});
|
|
437
|
-
if (statusCode && statusCode >= 500) {
|
|
438
|
-
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
439
|
-
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
440
|
-
currentSpan.setStatus({
|
|
441
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
442
|
-
});
|
|
443
|
-
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
444
|
-
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
445
|
-
}
|
|
446
|
-
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
447
|
-
// We were unable to get attributes, probably OTEL is not enabled
|
|
448
|
-
if (!rootSpanAttributes) {
|
|
449
|
-
return;
|
|
450
|
-
}
|
|
451
|
-
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
452
|
-
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
453
|
-
return;
|
|
454
|
-
}
|
|
455
|
-
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
456
|
-
const name = `${method} ${route}`;
|
|
457
|
-
currentSpan.setAttributes({
|
|
458
|
-
'next.route': route,
|
|
459
|
-
'http.route': route,
|
|
460
|
-
'next.span_name': name
|
|
461
|
-
});
|
|
462
|
-
currentSpan.updateName(name);
|
|
463
|
-
// Propagate http.route to the parent span if one exists (e.g.
|
|
464
|
-
// a platform-created HTTP span in adapter deployments).
|
|
465
|
-
if (parentSpan && parentSpan !== currentSpan) {
|
|
466
|
-
parentSpan.setAttribute('http.route', route);
|
|
467
|
-
parentSpan.updateName(name);
|
|
468
|
-
}
|
|
469
|
-
})();
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
// TODO: activeSpan code path is for when wrapped by
|
|
473
|
-
// next-server can be removed when this is no longer used
|
|
474
|
-
if (isWrappedByNextServer && activeSpan) {
|
|
475
|
-
await handleResponse(activeSpan, undefined);
|
|
476
|
-
} else {
|
|
477
|
-
let parentSpan = tracer.getActiveScopeSpan();
|
|
478
|
-
await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
|
|
479
|
-
spanName: `${method} ${srcPage}`,
|
|
480
|
-
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
|
|
481
|
-
attributes: {
|
|
482
|
-
'http.method': method,
|
|
483
|
-
'http.target': req.url
|
|
484
|
-
}
|
|
485
|
-
}, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
//# sourceMappingURL=app-route.js.map
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
/***/ }),
|
|
493
|
-
|
|
494
|
-
/***/ 10846:
|
|
495
|
-
/***/ ((module) => {
|
|
496
|
-
|
|
497
|
-
module.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");
|
|
498
|
-
|
|
499
|
-
/***/ }),
|
|
500
|
-
|
|
501
|
-
/***/ 16698:
|
|
502
|
-
/***/ ((module) => {
|
|
503
|
-
|
|
504
|
-
module.exports = require("node:async_hooks");
|
|
505
|
-
|
|
506
|
-
/***/ }),
|
|
507
|
-
|
|
508
|
-
/***/ 19121:
|
|
509
|
-
/***/ ((module) => {
|
|
510
|
-
|
|
511
|
-
module.exports = require("next/dist/server/app-render/action-async-storage.external.js");
|
|
512
|
-
|
|
513
|
-
/***/ }),
|
|
514
|
-
|
|
515
|
-
/***/ 27910:
|
|
516
|
-
/***/ ((module) => {
|
|
517
|
-
|
|
518
|
-
module.exports = require("stream");
|
|
519
|
-
|
|
520
|
-
/***/ }),
|
|
521
|
-
|
|
522
|
-
/***/ 28354:
|
|
523
|
-
/***/ ((module) => {
|
|
524
|
-
|
|
525
|
-
module.exports = require("util");
|
|
526
|
-
|
|
527
|
-
/***/ }),
|
|
528
|
-
|
|
529
|
-
/***/ 29021:
|
|
530
|
-
/***/ ((module) => {
|
|
531
|
-
|
|
532
|
-
module.exports = require("fs");
|
|
533
|
-
|
|
534
|
-
/***/ }),
|
|
535
|
-
|
|
536
|
-
/***/ 29294:
|
|
537
|
-
/***/ ((module) => {
|
|
538
|
-
|
|
539
|
-
module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
|
|
540
|
-
|
|
541
|
-
/***/ }),
|
|
542
|
-
|
|
543
|
-
/***/ 30558:
|
|
544
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
545
|
-
|
|
546
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
547
|
-
/* harmony export */ Rk: () => (/* binding */ listAllowedSites),
|
|
548
|
-
/* harmony export */ Rw: () => (/* binding */ putCookies),
|
|
549
|
-
/* harmony export */ Tp: () => (/* binding */ setSsrfBypass),
|
|
550
|
-
/* harmony export */ aQ: () => (/* binding */ getCookieHeaderForUrl),
|
|
551
|
-
/* harmony export */ hL: () => (/* binding */ addAllowedSite),
|
|
552
|
-
/* harmony export */ rh: () => (/* binding */ isHostAllowed),
|
|
553
|
-
/* harmony export */ uc: () => (/* binding */ removeAllowedSite)
|
|
554
|
-
/* harmony export */ });
|
|
555
|
-
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
|
|
556
|
-
/* harmony import */ var _lib_crypto_envelope__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10938);
|
|
557
|
-
// Allowed-sites store. A row represents a host the user has approved the
|
|
558
|
-
// agent to use as them. The single approval grants both:
|
|
559
|
-
//
|
|
560
|
-
// 1. browser-RPC navigation — the extension may drive a tab on this
|
|
561
|
-
// host on the agent's behalf
|
|
562
|
-
// 2. cookie passthrough — cookies the extension scrapes for this host
|
|
563
|
-
// (via chrome.cookies.onChanged) get attached to web_fetch requests
|
|
564
|
-
//
|
|
565
|
-
// The two capabilities live on the same row by design: removing a host
|
|
566
|
-
// instantly disables both.
|
|
567
|
-
//
|
|
568
|
-
// Hostname matching is suffix-based: an allow-list entry for `example.com`
|
|
569
|
-
// covers requests to `example.com` and `*.example.com`, but does NOT cover
|
|
570
|
-
// `notexample.com`. The matched entry is what cookies are stored under
|
|
571
|
-
// and what `last_used_at` updates against.
|
|
572
|
-
//
|
|
573
|
-
// Cookie blobs are envelope-encrypted (lib/crypto/envelope.ts) — same
|
|
574
|
-
// scheme as proxy passwords. The UI never receives cookie values; only
|
|
575
|
-
// `has_cookies: boolean` and `cookies_updated_at`.
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
const HOSTNAME_RE = /^(?:(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
579
|
-
const IPV4_RE = /^(?:25[0-5]|2[0-4]\d|[01]?\d\d?)(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d\d?)){3}$/;
|
|
580
|
-
const now = ()=>new Date().toISOString();
|
|
581
|
-
function normaliseHost(input) {
|
|
582
|
-
if (typeof input !== "string") return null;
|
|
583
|
-
const trimmed = input.trim().toLowerCase().replace(/\.+$/, "");
|
|
584
|
-
if (!trimmed) return null;
|
|
585
|
-
if (trimmed.length > 253) return null;
|
|
586
|
-
if (HOSTNAME_RE.test(trimmed)) return trimmed;
|
|
587
|
-
if (IPV4_RE.test(trimmed)) return trimmed;
|
|
588
|
-
return null;
|
|
589
|
-
}
|
|
590
|
-
function rowToStatus(row) {
|
|
591
|
-
return {
|
|
592
|
-
hostname: row.hostname,
|
|
593
|
-
ssrf_bypass: row.ssrf_bypass === 1,
|
|
594
|
-
has_cookies: row.cookies_blob != null,
|
|
595
|
-
created_at: row.created_at,
|
|
596
|
-
last_used_at: row.last_used_at,
|
|
597
|
-
cookies_updated_at: row.cookies_updated_at
|
|
598
|
-
};
|
|
599
|
-
}
|
|
600
|
-
function listAllowedSites() {
|
|
601
|
-
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
|
|
602
|
-
const rows = db.prepare("SELECT hostname, ssrf_bypass, cookies_blob, created_at, last_used_at, cookies_updated_at FROM allowed_sites ORDER BY hostname").all();
|
|
603
|
-
return rows.map(rowToStatus);
|
|
604
|
-
}
|
|
605
|
-
function addAllowedSite(input) {
|
|
606
|
-
const host = normaliseHost(input.hostname);
|
|
607
|
-
if (!host) return {
|
|
608
|
-
error: "hostname is not a valid DNS host or IPv4 address"
|
|
609
|
-
};
|
|
610
|
-
const bypass = input.ssrf_bypass === true ? 1 : 0;
|
|
611
|
-
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
|
|
612
|
-
const existing = db.prepare("SELECT * FROM allowed_sites WHERE hostname = ?").get(host);
|
|
613
|
-
if (existing) {
|
|
614
|
-
if (existing.ssrf_bypass !== bypass) {
|
|
615
|
-
db.prepare("UPDATE allowed_sites SET ssrf_bypass = ? WHERE hostname = ?").run(bypass, host);
|
|
616
|
-
existing.ssrf_bypass = bypass;
|
|
617
|
-
}
|
|
618
|
-
return rowToStatus(existing);
|
|
619
|
-
}
|
|
620
|
-
const created_at = now();
|
|
621
|
-
db.prepare("INSERT INTO allowed_sites (hostname, ssrf_bypass, created_at) VALUES (?, ?, ?)").run(host, bypass, created_at);
|
|
622
|
-
return {
|
|
623
|
-
hostname: host,
|
|
624
|
-
ssrf_bypass: bypass === 1,
|
|
625
|
-
has_cookies: false,
|
|
626
|
-
created_at,
|
|
627
|
-
last_used_at: null,
|
|
628
|
-
cookies_updated_at: null
|
|
629
|
-
};
|
|
630
|
-
}
|
|
631
|
-
function removeAllowedSite(hostname) {
|
|
632
|
-
const host = normaliseHost(hostname);
|
|
633
|
-
if (!host) return false;
|
|
634
|
-
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
|
|
635
|
-
const r = db.prepare("DELETE FROM allowed_sites WHERE hostname = ?").run(host);
|
|
636
|
-
return r.changes > 0;
|
|
637
|
-
}
|
|
638
|
-
function setSsrfBypass(hostname, bypass) {
|
|
639
|
-
const host = normaliseHost(hostname);
|
|
640
|
-
if (!host) return false;
|
|
641
|
-
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
|
|
642
|
-
const r = db.prepare("UPDATE allowed_sites SET ssrf_bypass = ? WHERE hostname = ?").run(bypass ? 1 : 0, host);
|
|
643
|
-
return r.changes > 0;
|
|
644
|
-
}
|
|
645
|
-
// Returns the first allow-list entry whose hostname is `host` or a parent
|
|
646
|
-
// suffix of `host` (e.g. host=foo.bar.example.com matches an entry of
|
|
647
|
-
// `bar.example.com` or `example.com`). Walking from the most specific
|
|
648
|
-
// suffix outward means a more-specific allow-list entry wins if both
|
|
649
|
-
// happen to be present. Returns null when no entry matches.
|
|
650
|
-
function findMatchingEntry(host) {
|
|
651
|
-
const lower = host.toLowerCase();
|
|
652
|
-
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
|
|
653
|
-
// Build the suffix list: foo.bar.example.com, bar.example.com,
|
|
654
|
-
// example.com, com. We could prepare a single OR-clause query, but
|
|
655
|
-
// sqlite's planner handles a small IN list cleanly enough.
|
|
656
|
-
const suffixes = [];
|
|
657
|
-
let i = 0;
|
|
658
|
-
while(i < lower.length){
|
|
659
|
-
suffixes.push(lower.slice(i));
|
|
660
|
-
const dot = lower.indexOf(".", i);
|
|
661
|
-
if (dot < 0) break;
|
|
662
|
-
i = dot + 1;
|
|
663
|
-
}
|
|
664
|
-
if (suffixes.length === 0) return null;
|
|
665
|
-
const placeholders = suffixes.map(()=>"?").join(",");
|
|
666
|
-
const rows = db.prepare(`SELECT hostname, ssrf_bypass, cookies_blob, created_at, last_used_at, cookies_updated_at
|
|
667
|
-
FROM allowed_sites WHERE hostname IN (${placeholders})`).all(...suffixes);
|
|
668
|
-
if (rows.length === 0) return null;
|
|
669
|
-
// Prefer the most-specific match (longest hostname).
|
|
670
|
-
rows.sort((a, b)=>b.hostname.length - a.hostname.length);
|
|
671
|
-
return rows[0];
|
|
672
|
-
}
|
|
673
|
-
function isHostAllowed(host) {
|
|
674
|
-
const norm = normaliseHost(host);
|
|
675
|
-
if (!norm) return {
|
|
676
|
-
allowed: false,
|
|
677
|
-
matchedHostname: null,
|
|
678
|
-
ssrfBypass: false
|
|
186
|
+
}
|
|
187
|
+
function removeAllowedSite(hostname) {
|
|
188
|
+
const host = normaliseHost(hostname);
|
|
189
|
+
if (!host) return false;
|
|
190
|
+
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
|
|
191
|
+
const r = db.prepare("DELETE FROM allowed_sites WHERE hostname = ?").run(host);
|
|
192
|
+
return r.changes > 0;
|
|
193
|
+
}
|
|
194
|
+
function setSsrfBypass(hostname, bypass) {
|
|
195
|
+
const host = normaliseHost(hostname);
|
|
196
|
+
if (!host) return false;
|
|
197
|
+
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
|
|
198
|
+
const r = db.prepare("UPDATE allowed_sites SET ssrf_bypass = ? WHERE hostname = ?").run(bypass ? 1 : 0, host);
|
|
199
|
+
return r.changes > 0;
|
|
200
|
+
}
|
|
201
|
+
// Returns the first allow-list entry whose hostname is `host` or a parent
|
|
202
|
+
// suffix of `host` (e.g. host=foo.bar.example.com matches an entry of
|
|
203
|
+
// `bar.example.com` or `example.com`). Walking from the most specific
|
|
204
|
+
// suffix outward means a more-specific allow-list entry wins if both
|
|
205
|
+
// happen to be present. Returns null when no entry matches.
|
|
206
|
+
function findMatchingEntry(host) {
|
|
207
|
+
const lower = host.toLowerCase();
|
|
208
|
+
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
|
|
209
|
+
// Build the suffix list: foo.bar.example.com, bar.example.com,
|
|
210
|
+
// example.com, com. We could prepare a single OR-clause query, but
|
|
211
|
+
// sqlite's planner handles a small IN list cleanly enough.
|
|
212
|
+
const suffixes = [];
|
|
213
|
+
let i = 0;
|
|
214
|
+
while(i < lower.length){
|
|
215
|
+
suffixes.push(lower.slice(i));
|
|
216
|
+
const dot = lower.indexOf(".", i);
|
|
217
|
+
if (dot < 0) break;
|
|
218
|
+
i = dot + 1;
|
|
219
|
+
}
|
|
220
|
+
if (suffixes.length === 0) return null;
|
|
221
|
+
const placeholders = suffixes.map(()=>"?").join(",");
|
|
222
|
+
const rows = db.prepare(`SELECT hostname, ssrf_bypass, cookies_blob, created_at, last_used_at, cookies_updated_at
|
|
223
|
+
FROM allowed_sites WHERE hostname IN (${placeholders})`).all(...suffixes);
|
|
224
|
+
if (rows.length === 0) return null;
|
|
225
|
+
// Prefer the most-specific match (longest hostname).
|
|
226
|
+
rows.sort((a, b)=>b.hostname.length - a.hostname.length);
|
|
227
|
+
return rows[0];
|
|
228
|
+
}
|
|
229
|
+
function isHostAllowed(host) {
|
|
230
|
+
const norm = normaliseHost(host);
|
|
231
|
+
if (!norm) return {
|
|
232
|
+
allowed: false,
|
|
233
|
+
matchedHostname: null,
|
|
234
|
+
ssrfBypass: false
|
|
679
235
|
};
|
|
680
236
|
const row = findMatchingEntry(norm);
|
|
681
237
|
if (!row) return {
|
|
@@ -858,206 +414,657 @@ function noStoreJson(data) {
|
|
|
858
414
|
headers: {
|
|
859
415
|
"Cache-Control": "no-store"
|
|
860
416
|
}
|
|
861
|
-
});
|
|
862
|
-
}
|
|
863
|
-
// Validate a JSON request body against a zod schema.
|
|
864
|
-
// Returns either the parsed data or a 400 NextResponse explaining the issue.
|
|
865
|
-
// Caller pattern:
|
|
866
|
-
// const parsed = await validateBody(req, Schema);
|
|
867
|
-
// if (parsed instanceof NextResponse) return parsed;
|
|
868
|
-
// // use parsed.field
|
|
869
|
-
async function validateBody(req, schema) {
|
|
870
|
-
let raw;
|
|
871
|
-
try {
|
|
872
|
-
raw = await req.json();
|
|
873
|
-
} catch {
|
|
874
|
-
return errorResponse("Request body must be valid JSON", 400);
|
|
875
|
-
}
|
|
876
|
-
const parsed = schema.safeParse(raw);
|
|
877
|
-
if (!parsed.success) {
|
|
878
|
-
return errorResponse(parsed.error.issues[0]?.message ?? "invalid body", 400);
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
// Validate a JSON request body against a zod schema.
|
|
420
|
+
// Returns either the parsed data or a 400 NextResponse explaining the issue.
|
|
421
|
+
// Caller pattern:
|
|
422
|
+
// const parsed = await validateBody(req, Schema);
|
|
423
|
+
// if (parsed instanceof NextResponse) return parsed;
|
|
424
|
+
// // use parsed.field
|
|
425
|
+
async function validateBody(req, schema) {
|
|
426
|
+
let raw;
|
|
427
|
+
try {
|
|
428
|
+
raw = await req.json();
|
|
429
|
+
} catch {
|
|
430
|
+
return errorResponse("Request body must be valid JSON", 400);
|
|
431
|
+
}
|
|
432
|
+
const parsed = schema.safeParse(raw);
|
|
433
|
+
if (!parsed.success) {
|
|
434
|
+
return errorResponse(parsed.error.issues[0]?.message ?? "invalid body", 400);
|
|
435
|
+
}
|
|
436
|
+
return parsed.data;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
/***/ }),
|
|
441
|
+
|
|
442
|
+
/***/ 44708:
|
|
443
|
+
/***/ ((module) => {
|
|
444
|
+
|
|
445
|
+
module.exports = require("node:https");
|
|
446
|
+
|
|
447
|
+
/***/ }),
|
|
448
|
+
|
|
449
|
+
/***/ 44870:
|
|
450
|
+
/***/ ((module) => {
|
|
451
|
+
|
|
452
|
+
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
453
|
+
|
|
454
|
+
/***/ }),
|
|
455
|
+
|
|
456
|
+
/***/ 48161:
|
|
457
|
+
/***/ ((module) => {
|
|
458
|
+
|
|
459
|
+
module.exports = require("node:os");
|
|
460
|
+
|
|
461
|
+
/***/ }),
|
|
462
|
+
|
|
463
|
+
/***/ 51455:
|
|
464
|
+
/***/ ((module) => {
|
|
465
|
+
|
|
466
|
+
module.exports = require("node:fs/promises");
|
|
467
|
+
|
|
468
|
+
/***/ }),
|
|
469
|
+
|
|
470
|
+
/***/ 55511:
|
|
471
|
+
/***/ ((module) => {
|
|
472
|
+
|
|
473
|
+
module.exports = require("crypto");
|
|
474
|
+
|
|
475
|
+
/***/ }),
|
|
476
|
+
|
|
477
|
+
/***/ 55591:
|
|
478
|
+
/***/ ((module) => {
|
|
479
|
+
|
|
480
|
+
module.exports = require("https");
|
|
481
|
+
|
|
482
|
+
/***/ }),
|
|
483
|
+
|
|
484
|
+
/***/ 57075:
|
|
485
|
+
/***/ ((module) => {
|
|
486
|
+
|
|
487
|
+
module.exports = require("node:stream");
|
|
488
|
+
|
|
489
|
+
/***/ }),
|
|
490
|
+
|
|
491
|
+
/***/ 57975:
|
|
492
|
+
/***/ ((module) => {
|
|
493
|
+
|
|
494
|
+
module.exports = require("node:util");
|
|
495
|
+
|
|
496
|
+
/***/ }),
|
|
497
|
+
|
|
498
|
+
/***/ 58850:
|
|
499
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
500
|
+
|
|
501
|
+
__webpack_require__.r(__webpack_exports__);
|
|
502
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
503
|
+
/* harmony export */ GET: () => (/* binding */ GET),
|
|
504
|
+
/* harmony export */ POST: () => (/* binding */ POST)
|
|
505
|
+
/* harmony export */ });
|
|
506
|
+
/* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
507
|
+
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97377);
|
|
508
|
+
/* harmony import */ var _lib_stores_allowed_sites__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30558);
|
|
509
|
+
/* harmony import */ var _lib_api_responses__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39947);
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
// Allowed-sites list. Each row is a host the user has approved the agent
|
|
515
|
+
// to use as them — granting both browser-RPC navigation and cookie
|
|
516
|
+
// passthrough. Hit by:
|
|
517
|
+
// - the Settings UI (AllowedSitesSection)
|
|
518
|
+
// - the browser extension on startup + heartbeat (cached locally so the
|
|
519
|
+
// SW knows which onChanged events to relay)
|
|
520
|
+
// - the in-browser approval popup's "Allow always" button (POST)
|
|
521
|
+
//
|
|
522
|
+
// GET returns the list (no cookie values). POST adds a host. Per-host
|
|
523
|
+
// cookie blob writes and removal live at /api/v1/allowed-sites/[hostname].
|
|
524
|
+
const AddInputSchema = zod__WEBPACK_IMPORTED_MODULE_3__/* .object */ .Ikc({
|
|
525
|
+
hostname: zod__WEBPACK_IMPORTED_MODULE_3__/* .string */ .YjP().min(1).max(253),
|
|
526
|
+
ssrf_bypass: zod__WEBPACK_IMPORTED_MODULE_3__/* .boolean */ .zMY().optional()
|
|
527
|
+
});
|
|
528
|
+
function GET() {
|
|
529
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
530
|
+
sites: (0,_lib_stores_allowed_sites__WEBPACK_IMPORTED_MODULE_1__/* .listAllowedSites */ .Rk)()
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
async function POST(req) {
|
|
534
|
+
const parsed = await (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_2__/* .validateBody */ .Jb)(req, AddInputSchema);
|
|
535
|
+
if (parsed instanceof next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse) return parsed;
|
|
536
|
+
const result = (0,_lib_stores_allowed_sites__WEBPACK_IMPORTED_MODULE_1__/* .addAllowedSite */ .hL)(parsed);
|
|
537
|
+
if ("error" in result) return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(result, {
|
|
538
|
+
status: 400
|
|
539
|
+
});
|
|
540
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
541
|
+
site: result
|
|
542
|
+
}, {
|
|
543
|
+
status: 201
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
/***/ }),
|
|
549
|
+
|
|
550
|
+
/***/ 63033:
|
|
551
|
+
/***/ ((module) => {
|
|
552
|
+
|
|
553
|
+
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
554
|
+
|
|
555
|
+
/***/ }),
|
|
556
|
+
|
|
557
|
+
/***/ 73024:
|
|
558
|
+
/***/ ((module) => {
|
|
559
|
+
|
|
560
|
+
module.exports = require("node:fs");
|
|
561
|
+
|
|
562
|
+
/***/ }),
|
|
563
|
+
|
|
564
|
+
/***/ 75919:
|
|
565
|
+
/***/ ((module) => {
|
|
566
|
+
|
|
567
|
+
module.exports = require("node:worker_threads");
|
|
568
|
+
|
|
569
|
+
/***/ }),
|
|
570
|
+
|
|
571
|
+
/***/ 76760:
|
|
572
|
+
/***/ ((module) => {
|
|
573
|
+
|
|
574
|
+
module.exports = require("node:path");
|
|
575
|
+
|
|
576
|
+
/***/ }),
|
|
577
|
+
|
|
578
|
+
/***/ 77030:
|
|
579
|
+
/***/ ((module) => {
|
|
580
|
+
|
|
581
|
+
module.exports = require("node:net");
|
|
582
|
+
|
|
583
|
+
/***/ }),
|
|
584
|
+
|
|
585
|
+
/***/ 77598:
|
|
586
|
+
/***/ ((module) => {
|
|
587
|
+
|
|
588
|
+
module.exports = require("node:crypto");
|
|
589
|
+
|
|
590
|
+
/***/ }),
|
|
591
|
+
|
|
592
|
+
/***/ 79428:
|
|
593
|
+
/***/ ((module) => {
|
|
594
|
+
|
|
595
|
+
module.exports = require("buffer");
|
|
596
|
+
|
|
597
|
+
/***/ }),
|
|
598
|
+
|
|
599
|
+
/***/ 80099:
|
|
600
|
+
/***/ ((module) => {
|
|
601
|
+
|
|
602
|
+
module.exports = require("node:sqlite");
|
|
603
|
+
|
|
604
|
+
/***/ }),
|
|
605
|
+
|
|
606
|
+
/***/ 80481:
|
|
607
|
+
/***/ ((module) => {
|
|
608
|
+
|
|
609
|
+
module.exports = require("node:readline");
|
|
610
|
+
|
|
611
|
+
/***/ }),
|
|
612
|
+
|
|
613
|
+
/***/ 81630:
|
|
614
|
+
/***/ ((module) => {
|
|
615
|
+
|
|
616
|
+
module.exports = require("http");
|
|
617
|
+
|
|
618
|
+
/***/ }),
|
|
619
|
+
|
|
620
|
+
/***/ 86439:
|
|
621
|
+
/***/ ((module) => {
|
|
622
|
+
|
|
623
|
+
module.exports = require("next/dist/shared/lib/no-fallback-error.external");
|
|
624
|
+
|
|
625
|
+
/***/ }),
|
|
626
|
+
|
|
627
|
+
/***/ 93237:
|
|
628
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
629
|
+
|
|
630
|
+
__webpack_require__.r(__webpack_exports__);
|
|
631
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
632
|
+
/* harmony export */ handler: () => (/* binding */ handler),
|
|
633
|
+
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
634
|
+
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
635
|
+
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
636
|
+
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
637
|
+
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
638
|
+
/* harmony export */ });
|
|
639
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
|
|
640
|
+
/* 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__);
|
|
641
|
+
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
|
|
642
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
643
|
+
/* 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__);
|
|
644
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
|
|
645
|
+
/* 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__);
|
|
646
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
|
|
647
|
+
/* 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__);
|
|
648
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
|
|
649
|
+
/* 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__);
|
|
650
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
651
|
+
/* 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__);
|
|
652
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
653
|
+
/* 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__);
|
|
654
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
655
|
+
/* 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__);
|
|
656
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
657
|
+
/* 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__);
|
|
658
|
+
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
659
|
+
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
660
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
661
|
+
/* 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__);
|
|
662
|
+
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
663
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
664
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
665
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
666
|
+
/* 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__);
|
|
667
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
668
|
+
/* 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__);
|
|
669
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
670
|
+
/* 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__);
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
// We inject the nextConfigOutput here so that we can use them in the route
|
|
690
|
+
// module.
|
|
691
|
+
const nextConfigOutput = "standalone"
|
|
692
|
+
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
693
|
+
definition: {
|
|
694
|
+
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
695
|
+
page: "/api/v1/allowed-sites/route",
|
|
696
|
+
pathname: "/api/v1/allowed-sites",
|
|
697
|
+
filename: "route",
|
|
698
|
+
bundlePath: "app/api/v1/allowed-sites/route"
|
|
699
|
+
},
|
|
700
|
+
distDir: ".next" || 0,
|
|
701
|
+
relativeProjectDir: false || '',
|
|
702
|
+
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/allowed-sites/route.ts",
|
|
703
|
+
nextConfigOutput,
|
|
704
|
+
// The lazy require factory ensures that:
|
|
705
|
+
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
706
|
+
// correctly attributing module load time to application-code rather than
|
|
707
|
+
// framework internals.
|
|
708
|
+
// - In all modes: async modules (route files with top-level await) are
|
|
709
|
+
// handled correctly — require() returns a Promise for such modules, which
|
|
710
|
+
// ensureUserland() awaits before the first request is handled.
|
|
711
|
+
userland: ()=>__webpack_require__(58850),
|
|
712
|
+
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
713
|
+
// server HMR updates are picked up without re-executing the entry chunk.
|
|
714
|
+
// Using require() (synchronous) avoids adding async overhead that would be
|
|
715
|
+
// incorrectly attributed to application-code time in devRequestTiming.
|
|
716
|
+
... false ? 0 : {}
|
|
717
|
+
});
|
|
718
|
+
// Pull out the exports that we need to expose from the module. This should
|
|
719
|
+
// be eliminated when we've moved the other routes to the new format. These
|
|
720
|
+
// are used to hook into the route.
|
|
721
|
+
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
722
|
+
function patchFetch() {
|
|
723
|
+
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
724
|
+
workAsyncStorage,
|
|
725
|
+
workUnitAsyncStorage
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
async function handler(req, res, ctx) {
|
|
730
|
+
if (ctx.requestMeta) {
|
|
731
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
732
|
+
}
|
|
733
|
+
if (routeModule.isDev) {
|
|
734
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
735
|
+
}
|
|
736
|
+
let srcPage = "/api/v1/allowed-sites/route";
|
|
737
|
+
// turbopack doesn't normalize `/index` in the page name
|
|
738
|
+
// so we need to to process dynamic routes properly
|
|
739
|
+
// TODO: fix turbopack providing differing value from webpack
|
|
740
|
+
if (false) {} else if (srcPage === '/index') {
|
|
741
|
+
// we always normalize /index specifically
|
|
742
|
+
srcPage = '/';
|
|
743
|
+
}
|
|
744
|
+
const multiZoneDraftMode = false;
|
|
745
|
+
const prepareResult = await routeModule.prepare(req, res, {
|
|
746
|
+
srcPage,
|
|
747
|
+
multiZoneDraftMode
|
|
748
|
+
});
|
|
749
|
+
if (!prepareResult) {
|
|
750
|
+
res.statusCode = 400;
|
|
751
|
+
res.end('Bad Request');
|
|
752
|
+
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
753
|
+
return null;
|
|
754
|
+
}
|
|
755
|
+
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
756
|
+
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
757
|
+
// Only this route's prerenders can establish ISR or admit generated params.
|
|
758
|
+
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]));
|
|
759
|
+
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
760
|
+
const render404 = async ()=>{
|
|
761
|
+
// TODO: should route-module itself handle rendering the 404
|
|
762
|
+
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
763
|
+
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
764
|
+
} else {
|
|
765
|
+
res.end('This page could not be found');
|
|
766
|
+
}
|
|
767
|
+
return null;
|
|
768
|
+
};
|
|
769
|
+
if (isIsr && !isDraftMode) {
|
|
770
|
+
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
771
|
+
if (prerenderInfo) {
|
|
772
|
+
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
773
|
+
if (nextConfig.adapterPath) {
|
|
774
|
+
return await render404();
|
|
775
|
+
}
|
|
776
|
+
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
let cacheKey = null;
|
|
781
|
+
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
782
|
+
cacheKey = resolvedPathname;
|
|
783
|
+
// ensure /index and / is normalized to one key
|
|
784
|
+
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
785
|
+
}
|
|
786
|
+
// Before rendering (which initializes component tree modules), we have to
|
|
787
|
+
// set the reference manifests to our global store so Server Action's
|
|
788
|
+
// encryption util can access to them at the top level of the page module.
|
|
789
|
+
if (serverActionsManifest && clientReferenceManifest) {
|
|
790
|
+
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
791
|
+
page: srcPage,
|
|
792
|
+
clientReferenceManifest,
|
|
793
|
+
serverActionsManifest
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
const method = req.method || 'GET';
|
|
797
|
+
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
798
|
+
const activeSpan = tracer.getActiveScopeSpan();
|
|
799
|
+
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
800
|
+
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
801
|
+
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
802
|
+
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
803
|
+
globalThis.__incrementalCache = incrementalCache;
|
|
804
|
+
const context = {
|
|
805
|
+
params,
|
|
806
|
+
previewProps,
|
|
807
|
+
renderOpts: {
|
|
808
|
+
experimental: {
|
|
809
|
+
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
810
|
+
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
811
|
+
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
812
|
+
},
|
|
813
|
+
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
814
|
+
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
815
|
+
isDraftMode,
|
|
816
|
+
incrementalCache,
|
|
817
|
+
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
818
|
+
cacheLifeProfiles: nextConfig.cacheLife,
|
|
819
|
+
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
820
|
+
waitUntil: ctx.waitUntil,
|
|
821
|
+
onClose: (cb)=>{
|
|
822
|
+
res.on('close', cb);
|
|
823
|
+
},
|
|
824
|
+
onAfterTaskError: undefined
|
|
825
|
+
},
|
|
826
|
+
sharedContext: {
|
|
827
|
+
buildId,
|
|
828
|
+
deploymentId
|
|
829
|
+
}
|
|
830
|
+
};
|
|
831
|
+
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
832
|
+
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
833
|
+
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));
|
|
834
|
+
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
835
|
+
try {
|
|
836
|
+
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
837
|
+
res.statusCode = 404;
|
|
838
|
+
// on-demand revalidate always sets this header
|
|
839
|
+
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
840
|
+
res.end('This page could not be found');
|
|
841
|
+
return null;
|
|
842
|
+
}
|
|
843
|
+
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
844
|
+
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
845
|
+
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
846
|
+
// Attempt using provided waitUntil if available
|
|
847
|
+
// if it's not we fallback to sendResponse's handling
|
|
848
|
+
if (pendingWaitUntil) {
|
|
849
|
+
if (ctx.waitUntil) {
|
|
850
|
+
ctx.waitUntil(pendingWaitUntil);
|
|
851
|
+
pendingWaitUntil = undefined;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
const cacheTags = context.renderOpts.collectedTags;
|
|
855
|
+
// If the request is for a static response, we can cache it so long
|
|
856
|
+
// as it's not edge.
|
|
857
|
+
if (isIsr) {
|
|
858
|
+
const blob = await response.blob();
|
|
859
|
+
// Copy the headers from the response.
|
|
860
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
861
|
+
if (cacheTags) {
|
|
862
|
+
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
863
|
+
}
|
|
864
|
+
if (!headers['content-type'] && blob.type) {
|
|
865
|
+
headers['content-type'] = blob.type;
|
|
866
|
+
}
|
|
867
|
+
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
868
|
+
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
|
|
869
|
+
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
870
|
+
// build-time fallback in `build/index.ts` so cache entries
|
|
871
|
+
// and the response Cache-Control header agree on the route's
|
|
872
|
+
// effective expire. Routes that opt out of revalidation
|
|
873
|
+
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
874
|
+
// keep `expire: undefined`.
|
|
875
|
+
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
876
|
+
// Create the cache entry for the response.
|
|
877
|
+
const cacheEntry = {
|
|
878
|
+
value: {
|
|
879
|
+
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
880
|
+
status: response.status,
|
|
881
|
+
body: Buffer.from(await blob.arrayBuffer()),
|
|
882
|
+
headers
|
|
883
|
+
},
|
|
884
|
+
cacheControl: {
|
|
885
|
+
revalidate,
|
|
886
|
+
expire
|
|
887
|
+
}
|
|
888
|
+
};
|
|
889
|
+
return cacheEntry;
|
|
890
|
+
} else {
|
|
891
|
+
// send response without caching if not ISR
|
|
892
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
893
|
+
return null;
|
|
894
|
+
}
|
|
895
|
+
} catch (err) {
|
|
896
|
+
// if this is a background revalidate we need to report
|
|
897
|
+
// the request error here as it won't be bubbled
|
|
898
|
+
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
899
|
+
const silenceLog = false;
|
|
900
|
+
await routeModule.onRequestError(req, err, {
|
|
901
|
+
routerKind: 'App Router',
|
|
902
|
+
routePath: srcPage,
|
|
903
|
+
routeType: 'route',
|
|
904
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
905
|
+
isStaticGeneration: cacheKey !== null,
|
|
906
|
+
isOnDemandRevalidate
|
|
907
|
+
})
|
|
908
|
+
}, silenceLog, routerServerContext);
|
|
909
|
+
}
|
|
910
|
+
throw err;
|
|
911
|
+
}
|
|
912
|
+
};
|
|
913
|
+
const handleResponse = async (currentSpan, parentSpan)=>{
|
|
914
|
+
try {
|
|
915
|
+
var _cacheEntry_value;
|
|
916
|
+
const cacheEntry = await routeModule.handleResponse({
|
|
917
|
+
req,
|
|
918
|
+
nextConfig,
|
|
919
|
+
cacheKey,
|
|
920
|
+
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
921
|
+
isFallback: false,
|
|
922
|
+
previewProps,
|
|
923
|
+
prerenderManifest,
|
|
924
|
+
isRoutePPREnabled: false,
|
|
925
|
+
isOnDemandRevalidate,
|
|
926
|
+
revalidateOnlyGenerated,
|
|
927
|
+
responseGenerator,
|
|
928
|
+
waitUntil: ctx.waitUntil,
|
|
929
|
+
isMinimalMode
|
|
930
|
+
});
|
|
931
|
+
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
932
|
+
throw cacheEntry.error;
|
|
933
|
+
}
|
|
934
|
+
// we don't create a cacheEntry for ISR
|
|
935
|
+
if (!isIsr) {
|
|
936
|
+
return;
|
|
937
|
+
}
|
|
938
|
+
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) {
|
|
939
|
+
var _cacheEntry_value1;
|
|
940
|
+
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
941
|
+
}
|
|
942
|
+
if (!isMinimalMode) {
|
|
943
|
+
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
944
|
+
}
|
|
945
|
+
// Draft mode should never be cached
|
|
946
|
+
if (isDraftMode) {
|
|
947
|
+
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
948
|
+
}
|
|
949
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
950
|
+
if (!(isMinimalMode && isIsr)) {
|
|
951
|
+
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
952
|
+
}
|
|
953
|
+
// If cache control is already set on the response we don't
|
|
954
|
+
// override it to allow users to customize it via next.config
|
|
955
|
+
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
956
|
+
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
957
|
+
}
|
|
958
|
+
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'.
|
|
959
|
+
new Response(cacheEntry.value.body, {
|
|
960
|
+
headers,
|
|
961
|
+
status: cacheEntry.value.status || 200
|
|
962
|
+
}));
|
|
963
|
+
return;
|
|
964
|
+
} catch (err) {
|
|
965
|
+
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
966
|
+
const silenceLog = false;
|
|
967
|
+
await routeModule.onRequestError(req, err, {
|
|
968
|
+
routerKind: 'App Router',
|
|
969
|
+
routePath: normalizedSrcPage,
|
|
970
|
+
routeType: 'route',
|
|
971
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
972
|
+
isStaticGeneration: cacheKey !== null,
|
|
973
|
+
isOnDemandRevalidate
|
|
974
|
+
})
|
|
975
|
+
}, silenceLog, routerServerContext);
|
|
976
|
+
}
|
|
977
|
+
// rethrow so that we can handle serving error page
|
|
978
|
+
// If this is during static generation, throw the error again.
|
|
979
|
+
if (isIsr) throw err;
|
|
980
|
+
// Otherwise, send a 500 response unless the original response has
|
|
981
|
+
// already committed. In that case, preserve its status code for
|
|
982
|
+
// telemetry while still recording the failure and terminating a response
|
|
983
|
+
// that the failed pipeline left open.
|
|
984
|
+
if (res.headersSent) {
|
|
985
|
+
if (currentSpan) {
|
|
986
|
+
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
987
|
+
currentSpan.recordException(error);
|
|
988
|
+
currentSpan.setStatus({
|
|
989
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
990
|
+
message: error.message
|
|
991
|
+
});
|
|
992
|
+
currentSpan.setAttribute('error.type', error.name);
|
|
993
|
+
}
|
|
994
|
+
if (!res.writableEnded && !res.destroyed) {
|
|
995
|
+
res.end();
|
|
996
|
+
}
|
|
997
|
+
} else {
|
|
998
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
999
|
+
status: 500
|
|
1000
|
+
}));
|
|
1001
|
+
}
|
|
1002
|
+
return;
|
|
1003
|
+
} finally{
|
|
1004
|
+
;
|
|
1005
|
+
(()=>{
|
|
1006
|
+
if (!currentSpan) {
|
|
1007
|
+
return;
|
|
1008
|
+
}
|
|
1009
|
+
let statusCode = res.statusCode;
|
|
1010
|
+
currentSpan.setAttributes({
|
|
1011
|
+
'http.status_code': statusCode,
|
|
1012
|
+
'next.rsc': false
|
|
1013
|
+
});
|
|
1014
|
+
if (statusCode && statusCode >= 500) {
|
|
1015
|
+
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
1016
|
+
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
1017
|
+
currentSpan.setStatus({
|
|
1018
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
1019
|
+
});
|
|
1020
|
+
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
1021
|
+
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
1022
|
+
}
|
|
1023
|
+
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
1024
|
+
// We were unable to get attributes, probably OTEL is not enabled
|
|
1025
|
+
if (!rootSpanAttributes) {
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1028
|
+
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
1029
|
+
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
1030
|
+
return;
|
|
1031
|
+
}
|
|
1032
|
+
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
1033
|
+
const name = `${method} ${route}`;
|
|
1034
|
+
currentSpan.setAttributes({
|
|
1035
|
+
'next.route': route,
|
|
1036
|
+
'http.route': route,
|
|
1037
|
+
'next.span_name': name
|
|
1038
|
+
});
|
|
1039
|
+
currentSpan.updateName(name);
|
|
1040
|
+
// Propagate http.route to the parent span if one exists (e.g.
|
|
1041
|
+
// a platform-created HTTP span in adapter deployments).
|
|
1042
|
+
if (parentSpan && parentSpan !== currentSpan) {
|
|
1043
|
+
parentSpan.setAttribute('http.route', route);
|
|
1044
|
+
parentSpan.updateName(name);
|
|
1045
|
+
}
|
|
1046
|
+
})();
|
|
1047
|
+
}
|
|
1048
|
+
};
|
|
1049
|
+
// TODO: activeSpan code path is for when wrapped by
|
|
1050
|
+
// next-server can be removed when this is no longer used
|
|
1051
|
+
if (isWrappedByNextServer && activeSpan) {
|
|
1052
|
+
await handleResponse(activeSpan, undefined);
|
|
1053
|
+
} else {
|
|
1054
|
+
let parentSpan = tracer.getActiveScopeSpan();
|
|
1055
|
+
await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
|
|
1056
|
+
spanName: `${method} ${srcPage}`,
|
|
1057
|
+
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
|
|
1058
|
+
attributes: {
|
|
1059
|
+
'http.method': method,
|
|
1060
|
+
'http.target': req.url
|
|
1061
|
+
}
|
|
1062
|
+
}, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
|
|
879
1063
|
}
|
|
880
|
-
return parsed.data;
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
/***/ }),
|
|
885
|
-
|
|
886
|
-
/***/ 44708:
|
|
887
|
-
/***/ ((module) => {
|
|
888
|
-
|
|
889
|
-
module.exports = require("node:https");
|
|
890
|
-
|
|
891
|
-
/***/ }),
|
|
892
|
-
|
|
893
|
-
/***/ 44870:
|
|
894
|
-
/***/ ((module) => {
|
|
895
|
-
|
|
896
|
-
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
897
|
-
|
|
898
|
-
/***/ }),
|
|
899
|
-
|
|
900
|
-
/***/ 48161:
|
|
901
|
-
/***/ ((module) => {
|
|
902
|
-
|
|
903
|
-
module.exports = require("node:os");
|
|
904
|
-
|
|
905
|
-
/***/ }),
|
|
906
|
-
|
|
907
|
-
/***/ 51455:
|
|
908
|
-
/***/ ((module) => {
|
|
909
|
-
|
|
910
|
-
module.exports = require("node:fs/promises");
|
|
911
|
-
|
|
912
|
-
/***/ }),
|
|
913
|
-
|
|
914
|
-
/***/ 55511:
|
|
915
|
-
/***/ ((module) => {
|
|
916
|
-
|
|
917
|
-
module.exports = require("crypto");
|
|
918
|
-
|
|
919
|
-
/***/ }),
|
|
920
|
-
|
|
921
|
-
/***/ 55591:
|
|
922
|
-
/***/ ((module) => {
|
|
923
|
-
|
|
924
|
-
module.exports = require("https");
|
|
925
|
-
|
|
926
|
-
/***/ }),
|
|
927
|
-
|
|
928
|
-
/***/ 57075:
|
|
929
|
-
/***/ ((module) => {
|
|
930
|
-
|
|
931
|
-
module.exports = require("node:stream");
|
|
932
|
-
|
|
933
|
-
/***/ }),
|
|
934
|
-
|
|
935
|
-
/***/ 57975:
|
|
936
|
-
/***/ ((module) => {
|
|
937
|
-
|
|
938
|
-
module.exports = require("node:util");
|
|
939
|
-
|
|
940
|
-
/***/ }),
|
|
941
|
-
|
|
942
|
-
/***/ 58850:
|
|
943
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
944
|
-
|
|
945
|
-
__webpack_require__.r(__webpack_exports__);
|
|
946
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
947
|
-
/* harmony export */ GET: () => (/* binding */ GET),
|
|
948
|
-
/* harmony export */ POST: () => (/* binding */ POST)
|
|
949
|
-
/* harmony export */ });
|
|
950
|
-
/* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
951
|
-
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97377);
|
|
952
|
-
/* harmony import */ var _lib_stores_allowed_sites__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30558);
|
|
953
|
-
/* harmony import */ var _lib_api_responses__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39947);
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
// Allowed-sites list. Each row is a host the user has approved the agent
|
|
959
|
-
// to use as them — granting both browser-RPC navigation and cookie
|
|
960
|
-
// passthrough. Hit by:
|
|
961
|
-
// - the Settings UI (AllowedSitesSection)
|
|
962
|
-
// - the browser extension on startup + heartbeat (cached locally so the
|
|
963
|
-
// SW knows which onChanged events to relay)
|
|
964
|
-
// - the in-browser approval popup's "Allow always" button (POST)
|
|
965
|
-
//
|
|
966
|
-
// GET returns the list (no cookie values). POST adds a host. Per-host
|
|
967
|
-
// cookie blob writes and removal live at /api/v1/allowed-sites/[hostname].
|
|
968
|
-
const AddInputSchema = zod__WEBPACK_IMPORTED_MODULE_3__/* .object */ .Ikc({
|
|
969
|
-
hostname: zod__WEBPACK_IMPORTED_MODULE_3__/* .string */ .YjP().min(1).max(253),
|
|
970
|
-
ssrf_bypass: zod__WEBPACK_IMPORTED_MODULE_3__/* .boolean */ .zMY().optional()
|
|
971
|
-
});
|
|
972
|
-
function GET() {
|
|
973
|
-
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
974
|
-
sites: (0,_lib_stores_allowed_sites__WEBPACK_IMPORTED_MODULE_1__/* .listAllowedSites */ .Rk)()
|
|
975
|
-
});
|
|
976
|
-
}
|
|
977
|
-
async function POST(req) {
|
|
978
|
-
const parsed = await (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_2__/* .validateBody */ .Jb)(req, AddInputSchema);
|
|
979
|
-
if (parsed instanceof next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse) return parsed;
|
|
980
|
-
const result = (0,_lib_stores_allowed_sites__WEBPACK_IMPORTED_MODULE_1__/* .addAllowedSite */ .hL)(parsed);
|
|
981
|
-
if ("error" in result) return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(result, {
|
|
982
|
-
status: 400
|
|
983
|
-
});
|
|
984
|
-
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
985
|
-
site: result
|
|
986
|
-
}, {
|
|
987
|
-
status: 201
|
|
988
|
-
});
|
|
989
1064
|
}
|
|
990
1065
|
|
|
1066
|
+
//# sourceMappingURL=app-route.js.map
|
|
991
1067
|
|
|
992
|
-
/***/ }),
|
|
993
|
-
|
|
994
|
-
/***/ 63033:
|
|
995
|
-
/***/ ((module) => {
|
|
996
|
-
|
|
997
|
-
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
998
|
-
|
|
999
|
-
/***/ }),
|
|
1000
|
-
|
|
1001
|
-
/***/ 73024:
|
|
1002
|
-
/***/ ((module) => {
|
|
1003
|
-
|
|
1004
|
-
module.exports = require("node:fs");
|
|
1005
|
-
|
|
1006
|
-
/***/ }),
|
|
1007
|
-
|
|
1008
|
-
/***/ 75919:
|
|
1009
|
-
/***/ ((module) => {
|
|
1010
|
-
|
|
1011
|
-
module.exports = require("node:worker_threads");
|
|
1012
|
-
|
|
1013
|
-
/***/ }),
|
|
1014
|
-
|
|
1015
|
-
/***/ 76760:
|
|
1016
|
-
/***/ ((module) => {
|
|
1017
|
-
|
|
1018
|
-
module.exports = require("node:path");
|
|
1019
|
-
|
|
1020
|
-
/***/ }),
|
|
1021
|
-
|
|
1022
|
-
/***/ 77598:
|
|
1023
|
-
/***/ ((module) => {
|
|
1024
|
-
|
|
1025
|
-
module.exports = require("node:crypto");
|
|
1026
|
-
|
|
1027
|
-
/***/ }),
|
|
1028
|
-
|
|
1029
|
-
/***/ 79428:
|
|
1030
|
-
/***/ ((module) => {
|
|
1031
|
-
|
|
1032
|
-
module.exports = require("buffer");
|
|
1033
|
-
|
|
1034
|
-
/***/ }),
|
|
1035
|
-
|
|
1036
|
-
/***/ 80099:
|
|
1037
|
-
/***/ ((module) => {
|
|
1038
|
-
|
|
1039
|
-
module.exports = require("node:sqlite");
|
|
1040
|
-
|
|
1041
|
-
/***/ }),
|
|
1042
|
-
|
|
1043
|
-
/***/ 80481:
|
|
1044
|
-
/***/ ((module) => {
|
|
1045
|
-
|
|
1046
|
-
module.exports = require("node:readline");
|
|
1047
|
-
|
|
1048
|
-
/***/ }),
|
|
1049
|
-
|
|
1050
|
-
/***/ 81630:
|
|
1051
|
-
/***/ ((module) => {
|
|
1052
|
-
|
|
1053
|
-
module.exports = require("http");
|
|
1054
|
-
|
|
1055
|
-
/***/ }),
|
|
1056
|
-
|
|
1057
|
-
/***/ 86439:
|
|
1058
|
-
/***/ ((module) => {
|
|
1059
|
-
|
|
1060
|
-
module.exports = require("next/dist/shared/lib/no-fallback-error.external");
|
|
1061
1068
|
|
|
1062
1069
|
/***/ }),
|
|
1063
1070
|
|
|
@@ -1082,7 +1089,7 @@ module.exports = import("@huggingface/transformers");;
|
|
|
1082
1089
|
var __webpack_require__ = require("../../../../webpack-runtime.js");
|
|
1083
1090
|
__webpack_require__.C(exports);
|
|
1084
1091
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
1085
|
-
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46], () => (__webpack_exec__(
|
|
1092
|
+
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46], () => (__webpack_exec__(93237)));
|
|
1086
1093
|
module.exports = __webpack_exports__;
|
|
1087
1094
|
|
|
1088
1095
|
})();
|