@circuitwall/jarela 2.7.0 → 3.0.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 +6 -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 +58 -58
- 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 +127 -127
- package/.next/standalone/.next/server/app/api/v1/access/route.js +372 -372
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +79 -79
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/display-filters/route.js +641 -641
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/duplicate/route.js +723 -723
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/route.js +100 -100
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/thread/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/agents/recent-replies/route.js +227 -227
- package/.next/standalone/.next/server/app/api/v1/agents/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +384 -384
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/attachments/files/route.js +203 -203
- package/.next/standalone/.next/server/app/api/v1/attachments/images/route.js +17 -17
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +2 -2
- 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 +760 -760
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +699 -699
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +30 -30
- 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 +37 -37
- 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 +480 -480
- 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 +675 -675
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +559 -559
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +23 -23
- 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 +37 -37
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js +1269 -1269
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +199 -199
- 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 +99 -99
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js +23 -23
- 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 +169 -169
- 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 +515 -515
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js +380 -380
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +256 -256
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js +80 -97
- 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 +677 -677
- 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/recall-policy/route.js +856 -0
- package/.next/standalone/.next/server/app/api/v1/documents/recall-policy/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/v1/documents/recall-policy/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/v1/documents/search/route.js +299 -247
- package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +486 -486
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js +18 -11
- 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 +666 -666
- 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 +128 -100
- 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 +207 -207
- package/.next/standalone/.next/server/app/api/v1/env-sync/allowlist/route.js +128 -128
- package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/events/route.js +154 -154
- 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 +16 -16
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +97 -97
- 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 +188 -188
- package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +69 -69
- package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +69 -69
- package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +223 -223
- package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +93 -93
- 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 +44 -44
- 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 +16 -16
- 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 +722 -722
- 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 +481 -481
- 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 +378 -378
- 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 +510 -510
- 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 +17 -17
- package/.next/standalone/.next/server/app/api/v1/fs/browse/route.js +33 -33
- package/.next/standalone/.next/server/app/api/v1/harnesses/[id]/route.js +397 -397
- package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +129 -129
- package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js +757 -757
- 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 +228 -228
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js +198 -198
- 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 +9 -9
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +845 -845
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +106 -106
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +747 -747
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/integrations/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +420 -420
- package/.next/standalone/.next/server/app/api/v1/local-file/route.js +34 -34
- package/.next/standalone/.next/server/app/api/v1/logs/route.js +819 -819
- package/.next/standalone/.next/server/app/api/v1/maps/embed/route.js +217 -217
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +1034 -1034
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/registry/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +150 -150
- package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/memory/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +87 -538
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/models/route.js +273 -722
- package/.next/standalone/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/catalog/route.js +73 -73
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js +248 -239
- 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 +128 -128
- 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 +44 -44
- 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 +72 -72
- 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 +37 -37
- 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 +81 -81
- 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 +34 -25
- 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 +48 -39
- 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 +51 -51
- 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 +863 -863
- 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 +230 -230
- 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 +44 -44
- 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 +138 -138
- package/.next/standalone/.next/server/app/api/v1/profile/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +853 -680
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +171 -171
- package/.next/standalone/.next/server/app/api/v1/providers/route.js +96 -96
- package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +157 -157
- package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +47 -47
- package/.next/standalone/.next/server/app/api/v1/redaction/route.js +206 -206
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +140 -140
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js +166 -166
- 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 +52 -52
- package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +722 -722
- package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/security/state/route.js +243 -243
- package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +518 -518
- package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/setup/test-key/route.js +25 -25
- package/.next/standalone/.next/server/app/api/v1/skills/[id]/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +609 -609
- package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +129 -129
- package/.next/standalone/.next/server/app/api/v1/skills/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/system/abort/route.js +112 -112
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js +86 -86
- 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 +9 -9
- package/.next/standalone/.next/server/app/api/v1/tasks/[agent_id]/route.js +83 -83
- package/.next/standalone/.next/server/app/api/v1/tasks/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js +121 -121
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js +139 -139
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/messages/[message_id]/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +1182 -1182
- 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 +158 -158
- package/.next/standalone/.next/server/app/api/v1/tools/route.js +137 -137
- 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 +73 -73
- 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 +72 -72
- package/.next/standalone/.next/server/app/api/v1/voice/transcribe/route.js +30 -30
- package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +79 -79
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js +45 -45
- 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 +2 -2
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js +37 -37
- 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 +55 -55
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +18 -18
- package/.next/standalone/.next/server/app/page.js +2112 -1235
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page.js +91 -91
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +2 -1
- package/.next/standalone/.next/server/chunks/1244.js +136 -4
- package/.next/standalone/.next/server/chunks/1387.js +733 -57
- package/.next/standalone/.next/server/chunks/1433.js +1 -1
- package/.next/standalone/.next/server/chunks/210.js +3 -3
- package/.next/standalone/.next/server/chunks/2175.js +874 -0
- package/.next/standalone/.next/server/chunks/3042.js +34 -32
- package/.next/standalone/.next/server/chunks/309.js +21 -40
- package/.next/standalone/.next/server/chunks/3272.js +21 -40
- package/.next/standalone/.next/server/chunks/{540.js → 3326.js} +189 -61
- package/.next/standalone/.next/server/chunks/{6142.js → 3479.js} +170 -159
- package/.next/standalone/.next/server/chunks/3566.js +1 -1
- package/.next/standalone/.next/server/chunks/{5323.js → 3692.js} +31 -3
- package/.next/standalone/.next/server/chunks/4189.js +14 -2
- package/.next/standalone/.next/server/chunks/4377.js +2 -2
- package/.next/standalone/.next/server/chunks/4596.js +18 -9
- package/.next/standalone/.next/server/chunks/{639.js → 4728.js} +23676 -22755
- package/.next/standalone/.next/server/chunks/4955.js +81 -14
- package/.next/standalone/.next/server/chunks/5290.js +136 -5
- package/.next/standalone/.next/server/chunks/{2267.js → 6408.js} +990 -926
- package/.next/standalone/.next/server/chunks/{9667.js → 6911.js} +31 -3
- package/.next/standalone/.next/server/chunks/7033.js +7 -4
- package/.next/standalone/.next/server/chunks/7377.js +7 -4
- package/.next/standalone/.next/server/chunks/8461.js +31 -29
- package/.next/standalone/.next/server/chunks/9032.js +3 -3
- package/.next/standalone/.next/server/chunks/9174.js +18 -9
- package/.next/standalone/.next/server/chunks/9408.js +37 -15
- package/.next/standalone/.next/server/chunks/9824.js +2288 -2288
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware.js +104638 -104532
- 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/2BAUJZ7x8eXCYpuZ-Kp7h/_buildManifest.js +1 -0
- package/.next/standalone/.next/static/chunks/{877-145c9df8aa0aee63.js → 877-367eb49b20edd3d6.js} +38 -16
- package/.next/standalone/.next/static/chunks/app/_global-error/page-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/access/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/duplicate/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/recent-replies/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/recall-policy/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/messages/[message_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/{page-64585ef79400f17f.js → page-a584dfa806a1afdb.js} +1082 -205
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/css/19e1cd815490b47c.css +5 -0
- package/.next/standalone/docs/adoption/changesets.json +148 -0
- package/.next/standalone/package.json +5 -4
- package/CHANGELOG.md +51 -0
- package/README.md +115 -1
- package/api/client.startup.test.ts +29 -0
- package/api/client.ts +9 -2
- package/api/types.ts +20 -1
- package/app/api/v1/dashboard/pricing-task/route.ts +3 -1
- package/app/api/v1/documents/recall-policy/route.test.ts +59 -0
- package/app/api/v1/documents/recall-policy/route.ts +20 -0
- package/app/api/v1/documents/search/route.test.ts +36 -0
- package/app/api/v1/documents/search/route.ts +17 -5
- package/app/api/v1/documents/sources/[id]/reindex/route.test.ts +44 -0
- package/app/api/v1/documents/sources/[id]/reindex/route.ts +4 -1
- package/app/api/v1/documents/sources/route.test.ts +67 -0
- package/app/api/v1/documents/sources/route.ts +20 -2
- package/app/api/v1/models/[name]/route.ts +2 -0
- package/app/api/v1/models/route.ts +4 -0
- package/app/api/v1/providers/[provider]/models/route.test.ts +28 -0
- package/app/api/v1/providers/[provider]/models/route.ts +16 -2
- package/app/globals.css +51 -4
- package/components/agents/AgentsPanel.tsx +2 -2
- package/components/agents/agent-editor/AdvancedSection.tsx +1 -1
- package/components/agents/agent-editor/ModelSection.tsx +2 -2
- package/components/bridges/BridgeEditor.tsx +1 -1
- package/components/bridges/BridgesPanel.tsx +1 -1
- package/components/chat/InputBar.tsx +1 -1
- package/components/chat/MessageList.tsx +3 -3
- package/components/chat/useUserProfileAndAgent.test.tsx +43 -1
- package/components/chat/useUserProfileAndAgent.ts +16 -5
- package/components/credentials/CredentialsPanel.tsx +1 -1
- package/components/dashboard/CostBreakdown.test.tsx +34 -0
- package/components/dashboard/CostBreakdown.tsx +21 -0
- package/components/dashboard/DashboardPanel.test.tsx +9 -0
- package/components/dashboard/DashboardPanel.tsx +3 -3
- package/components/dashboard/Donuts.tsx +5 -2
- package/components/dashboard/ModelPricingSection.test.tsx +42 -0
- package/components/dashboard/ModelPricingSection.tsx +23 -21
- package/components/dashboard/Series.test.tsx +1 -0
- package/components/dashboard/Series.tsx +5 -0
- package/components/dashboard/SummaryCards.tsx +39 -27
- package/components/dashboard/VendorModelReportSection.tsx +2 -0
- package/components/documents/AddSourceFields.tsx +52 -15
- package/components/documents/AddSourceForm.tsx +61 -19
- package/components/documents/DocumentsPanel.tsx +22 -2
- package/components/documents/RecallExclusions.tsx +73 -0
- package/components/documents/SearchProbe.tsx +42 -5
- package/components/documents/helpers.ts +17 -3
- package/components/documents/indexing-controls.test.tsx +137 -0
- package/components/documents/useDocumentsPanel.test.tsx +87 -0
- package/components/documents/useDocumentsPanel.ts +47 -6
- package/components/env/EnvVarsPanel.tsx +1 -1
- package/components/harness/HarnessPanel.tsx +2 -2
- package/components/integrations/NetworkPanel.tsx +1 -1
- package/components/layout/AgentCardControls.test.tsx +162 -0
- package/components/layout/AgentCardControls.tsx +126 -0
- package/components/layout/AgentSwitcher.test.tsx +37 -0
- package/components/layout/AgentSwitcher.tsx +28 -3
- package/components/layout/AppShell.tsx +16 -9
- package/components/layout/MenuPanel.test.tsx +125 -2
- package/components/layout/MenuPanel.tsx +96 -2
- package/components/logs/LogsPanel.tsx +1 -1
- package/components/mcp/MCPPanel.tsx +1 -1
- package/components/memory/UnifiedMemoryPanel.tsx +4 -4
- package/components/models/CapBadges.tsx +1 -1
- package/components/models/EmbeddingModelSection.test.tsx +41 -0
- package/components/models/EmbeddingModelSection.tsx +5 -0
- package/components/models/ModelFeatureGuide.tsx +16 -8
- package/components/models/ModelsPanel.tsx +8 -3
- package/components/models/model-editor/ModelEditorBody.tsx +1 -0
- package/components/models/model-editor/ModelIdSection.tsx +5 -0
- package/components/profile/ProfileEditor.test.tsx +70 -0
- package/components/profile/ProfileEditor.tsx +6 -2
- package/components/profile/ProfilePanel.test.tsx +6 -0
- package/components/profile/ProfilePanel.tsx +1 -1
- package/components/scheduled-tasks/ScheduledTasksPanel.tsx +1 -1
- package/components/settings/AppearancePanel.tsx +1 -1
- package/components/settings/SettingsPanel.test.tsx +23 -0
- package/components/settings/SettingsPanel.tsx +2 -2
- package/components/skills/SkillsPanel.tsx +1 -1
- package/components/tools/BrowserPanel.tsx +1 -1
- package/components/tools/PackagesPanel.tsx +1 -1
- package/components/tools/UnifiedPackageList.tsx +1 -1
- package/components/ui/PanelHeader.tsx +1 -1
- package/components/ui/SubTabBar.tsx +1 -1
- package/docs/INSTALL.md +7 -5
- package/hooks/useAgents.ts +2 -2
- package/lib/agents/prepare/system-prompt.test.ts +65 -0
- package/lib/agents/prepare/system-prompt.ts +27 -20
- package/lib/agents/prompt-registry.test.ts +42 -0
- package/lib/agents/prompt-registry.ts +21 -0
- package/lib/bridges/whatsapp.inbound.test.ts +38 -1
- package/lib/bridges/whatsapp.ts +10 -33
- package/lib/db/index.ts +2 -0
- package/lib/db/migrations.test.ts +10 -0
- package/lib/db/migrations.ts +10 -0
- package/lib/db/statement-cache.test.ts +77 -0
- package/lib/db/statement-cache.ts +31 -0
- package/lib/documents/indexer.test.ts +16 -1
- package/lib/documents/indexer.ts +8 -7
- package/lib/documents/mail-source-config.ts +31 -0
- package/lib/documents/recall-policy.ts +24 -0
- package/lib/documents/remote/icloud.ts +56 -0
- package/lib/documents/remote/index.ts +4 -1
- package/lib/documents/remote/mail.test.ts +232 -0
- package/lib/documents/remote/mail.ts +48 -40
- package/lib/documents/search.test.ts +81 -2
- package/lib/documents/search.ts +47 -7
- package/lib/embeddings/cache.test.ts +16 -2
- package/lib/embeddings/index.test.ts +7 -0
- package/lib/embeddings/index.ts +12 -1
- package/lib/integrations/deepseek-web/manifest.ts +68 -0
- package/lib/integrations/gmail/manifest.ts +2 -3
- package/lib/integrations/icloud/manifest.ts +19 -5
- package/lib/integrations/registry.test.ts +8 -0
- package/lib/integrations/registry.ts +2 -0
- package/lib/lifecycle/changeset-build.test.ts +3 -0
- package/lib/lifecycle/changeset-build.ts +6 -0
- package/lib/lifecycle/changesets.ts +9 -0
- package/lib/pricing/llm-extract.ts +1 -1
- package/lib/pricing/maintenance-task.ts +19 -3
- package/lib/pricing/model-updates.test.ts +192 -0
- package/lib/pricing/model-updates.ts +205 -0
- package/lib/stores/app-settings.ts +17 -1
- package/lib/stores/dashboard-metrics-cache.test.ts +44 -0
- package/lib/stores/dashboard-metrics.test.ts +47 -4
- package/lib/stores/dashboard-metrics.ts +73 -8
- package/lib/stores/document-sources.ts +1 -0
- package/lib/stores/integrations.test.ts +20 -0
- package/lib/stores/integrations.ts +15 -4
- package/lib/stores/langgraph-store.test.ts +53 -0
- package/lib/stores/langgraph-store.ts +9 -21
- package/lib/stores/model-metadata.ts +89 -0
- package/lib/stores/threads.test.ts +34 -0
- package/lib/stores/threads.ts +17 -20
- package/lib/stores/tool-stats.test.ts +31 -0
- package/lib/stores/tool-stats.ts +16 -0
- package/lib/stores/version-adoption.test.ts +8 -0
- package/lib/stores/version-adoption.ts +5 -2
- package/lib/tools/general/documents.test.ts +5 -0
- package/lib/tools/general/pricing-maintenance.test.ts +5 -0
- package/lib/tools/general/pricing-maintenance.ts +4 -1
- package/lib/tools/packages/default-packages/icloud.test.ts +49 -0
- package/lib/tools/packages/default-packages/icloud.ts +8 -6
- package/lib/tools/packages/default-packages.test.ts +16 -0
- package/lib/tools/packages/langchain-packages.ts +2 -2
- package/lib/tools/runtime/category-filter.test.ts +22 -0
- package/lib/tools/web/deepseek.test.ts +76 -0
- package/lib/tools/web/deepseek.ts +68 -0
- package/lib/tools/web/fetch.test.ts +130 -2
- package/lib/tools/web/fetch.ts +48 -1
- package/lib/tools/web/search.test.ts +139 -2
- package/lib/tools/web/search.ts +48 -1
- package/lib/triggers/handlers/scheduled-task.test.ts +18 -0
- package/lib/triggers/handlers/scheduled-task.ts +6 -0
- package/lib/ui/feature-readiness.test.ts +7 -0
- package/lib/ui/feature-readiness.ts +2 -1
- package/package.json +5 -4
- package/scripts/check-npm-package.mjs +1 -0
- package/scripts/jarela-bin.mjs +3 -0
- package/scripts/runtime-version.mjs +19 -0
- package/scripts/start-prod.mjs +3 -0
- package/.next/standalone/.next/static/6qLnqWdsfBTJOAJApUYXy/_buildManifest.js +0 -1
- package/.next/standalone/.next/static/chunks/app/_global-error/page-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/access/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/duplicate/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/recent-replies/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/messages/[message_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/css/c4a8bed1da2c748f.css +0 -5
- /package/.next/standalone/.next/static/{6qLnqWdsfBTJOAJApUYXy → 2BAUJZ7x8eXCYpuZ-Kp7h}/_ssgManifest.js +0 -0
|
@@ -374,86 +374,53 @@ module.exports = require("next/dist/server/runtime-reacts.external.js");
|
|
|
374
374
|
|
|
375
375
|
/***/ }),
|
|
376
376
|
|
|
377
|
-
/***/
|
|
377
|
+
/***/ 110364:
|
|
378
378
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
379
379
|
|
|
380
|
-
// ESM COMPAT FLAG
|
|
381
380
|
__webpack_require__.r(__webpack_exports__);
|
|
381
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
382
|
+
/* harmony export */ handler: () => (/* binding */ handler),
|
|
383
|
+
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
384
|
+
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
385
|
+
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
386
|
+
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
387
|
+
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
388
|
+
/* harmony export */ });
|
|
389
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319225);
|
|
390
|
+
/* 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__);
|
|
391
|
+
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(684006);
|
|
392
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
393
|
+
/* 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__);
|
|
394
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(799373);
|
|
395
|
+
/* 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__);
|
|
396
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(434775);
|
|
397
|
+
/* 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__);
|
|
398
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(524235);
|
|
399
|
+
/* 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__);
|
|
400
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(200261);
|
|
401
|
+
/* 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__);
|
|
402
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(754365);
|
|
403
|
+
/* 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__);
|
|
404
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(590771);
|
|
405
|
+
/* 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__);
|
|
406
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(473461);
|
|
407
|
+
/* 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__);
|
|
408
|
+
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(767798);
|
|
409
|
+
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(192280);
|
|
410
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(662018);
|
|
411
|
+
/* 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__);
|
|
412
|
+
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(445696);
|
|
413
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(347929);
|
|
414
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
415
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(986439);
|
|
416
|
+
/* 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__);
|
|
417
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(710246);
|
|
418
|
+
/* 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__);
|
|
419
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(137527);
|
|
420
|
+
/* 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__);
|
|
382
421
|
|
|
383
|
-
// EXPORTS
|
|
384
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
385
|
-
POST: () => (/* binding */ POST)
|
|
386
|
-
});
|
|
387
422
|
|
|
388
|
-
// EXTERNAL MODULE: ./node_modules/next/dist/api/server.js
|
|
389
|
-
var server = __webpack_require__(945592);
|
|
390
|
-
// EXTERNAL MODULE: ./node_modules/zod/v4/classic/schemas.js + 4 modules
|
|
391
|
-
var schemas = __webpack_require__(497377);
|
|
392
|
-
// EXTERNAL MODULE: ./lib/stores/pending-actions.ts
|
|
393
|
-
var pending_actions = __webpack_require__(328286);
|
|
394
|
-
// EXTERNAL MODULE: ./lib/stores/mcp-servers.ts
|
|
395
|
-
var mcp_servers = __webpack_require__(42666);
|
|
396
|
-
// EXTERNAL MODULE: ./lib/mcp/client.ts + 1 modules
|
|
397
|
-
var client = __webpack_require__(777955);
|
|
398
|
-
;// ./lib/mcp/registry.ts
|
|
399
|
-
/**
|
|
400
|
-
* @public
|
|
401
|
-
*
|
|
402
|
-
* MCP server registry types + variable substitution.
|
|
403
|
-
*
|
|
404
|
-
* Discovery is online via the official MCP Registry (see
|
|
405
|
-
* `lib/mcp/upstream-registry.ts` and ADR-0013). Entries flow through this
|
|
406
|
-
* module's types so the picker UI, install action, and `applyVariables`
|
|
407
|
-
* substitution path stay decoupled from the upstream wire format.
|
|
408
|
-
*
|
|
409
|
-
* All exports in this file are part of the package's stable public
|
|
410
|
-
* surface (per `package.json#exports`). Removing or breaking them counts
|
|
411
|
-
* as a breaking change under the deprecation policy in CONTRIBUTING.md.
|
|
412
|
-
*/ // Substitute `${var}` placeholders in a spec object using user-supplied values.
|
|
413
|
-
// Walks objects and arrays recursively; leaves non-strings alone.
|
|
414
|
-
function applyVariables(spec, values) {
|
|
415
|
-
return walk(spec);
|
|
416
|
-
function walk(node) {
|
|
417
|
-
if (typeof node === "string") {
|
|
418
|
-
return node.replace(/\$\{(\w+)\}/g, (_, k)=>values[k] ?? `\${${k}}`);
|
|
419
|
-
}
|
|
420
|
-
if (Array.isArray(node)) return node.map(walk);
|
|
421
|
-
if (node && typeof node === "object") {
|
|
422
|
-
const out = {};
|
|
423
|
-
for (const [k, v] of Object.entries(node))out[k] = walk(v);
|
|
424
|
-
return out;
|
|
425
|
-
}
|
|
426
|
-
return node;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
423
|
|
|
430
|
-
// EXTERNAL MODULE: ./lib/mcp/upstream-registry.ts
|
|
431
|
-
var upstream_registry = __webpack_require__(971904);
|
|
432
|
-
// EXTERNAL MODULE: ./lib/stores/agent-configs.ts
|
|
433
|
-
var agent_configs = __webpack_require__(41720);
|
|
434
|
-
// EXTERNAL MODULE: ./lib/integrations/registry.ts + 9 modules
|
|
435
|
-
var registry = __webpack_require__(363478);
|
|
436
|
-
// EXTERNAL MODULE: ./lib/stores/integrations.ts
|
|
437
|
-
var integrations = __webpack_require__(478228);
|
|
438
|
-
// EXTERNAL MODULE: ./lib/stores/model-config.ts
|
|
439
|
-
var model_config = __webpack_require__(780937);
|
|
440
|
-
// EXTERNAL MODULE: ./lib/stores/harnesses.ts
|
|
441
|
-
var harnesses = __webpack_require__(873175);
|
|
442
|
-
// EXTERNAL MODULE: ./lib/agents/harness/types.ts
|
|
443
|
-
var types = __webpack_require__(489793);
|
|
444
|
-
// EXTERNAL MODULE: ./lib/agents/instruction-edits.ts
|
|
445
|
-
var instruction_edits = __webpack_require__(311459);
|
|
446
|
-
// EXTERNAL MODULE: ./lib/stores/builtin-tools.ts
|
|
447
|
-
var builtin_tools = __webpack_require__(56718);
|
|
448
|
-
// EXTERNAL MODULE: ./lib/stores/disabled-dropin-tools.ts
|
|
449
|
-
var disabled_dropin_tools = __webpack_require__(620052);
|
|
450
|
-
// EXTERNAL MODULE: ./lib/tools/runtime/registry.ts
|
|
451
|
-
var runtime_registry = __webpack_require__(432068);
|
|
452
|
-
;// ./lib/agents/proposals.ts
|
|
453
|
-
// Executes a previously-approved pending action. Strictly server-side.
|
|
454
|
-
// Each `kind` maps to exactly one mutation site; nothing here touches the
|
|
455
|
-
// agent loop directly — approvals just write to the same tables the UI
|
|
456
|
-
// would touch, and the running agent picks up changes on its next turn.
|
|
457
424
|
|
|
458
425
|
|
|
459
426
|
|
|
@@ -468,401 +435,886 @@ var runtime_registry = __webpack_require__(432068);
|
|
|
468
435
|
|
|
469
436
|
|
|
470
437
|
|
|
471
|
-
|
|
472
|
-
//
|
|
473
|
-
//
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
438
|
+
|
|
439
|
+
// We inject the nextConfigOutput here so that we can use them in the route
|
|
440
|
+
// module.
|
|
441
|
+
const nextConfigOutput = "standalone"
|
|
442
|
+
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
443
|
+
definition: {
|
|
444
|
+
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
445
|
+
page: "/api/v1/pending-actions/[id]/approve/route",
|
|
446
|
+
pathname: "/api/v1/pending-actions/[id]/approve",
|
|
447
|
+
filename: "route",
|
|
448
|
+
bundlePath: "app/api/v1/pending-actions/[id]/approve/route"
|
|
449
|
+
},
|
|
450
|
+
distDir: ".next" || 0,
|
|
451
|
+
relativeProjectDir: false || '',
|
|
452
|
+
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/pending-actions/[id]/approve/route.ts",
|
|
453
|
+
nextConfigOutput,
|
|
454
|
+
// The lazy require factory ensures that:
|
|
455
|
+
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
456
|
+
// correctly attributing module load time to application-code rather than
|
|
457
|
+
// framework internals.
|
|
458
|
+
// - In all modes: async modules (route files with top-level await) are
|
|
459
|
+
// handled correctly — require() returns a Promise for such modules, which
|
|
460
|
+
// ensureUserland() awaits before the first request is handled.
|
|
461
|
+
userland: ()=>__webpack_require__(125351),
|
|
462
|
+
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
463
|
+
// server HMR updates are picked up without re-executing the entry chunk.
|
|
464
|
+
// Using require() (synchronous) avoids adding async overhead that would be
|
|
465
|
+
// incorrectly attributed to application-code time in devRequestTiming.
|
|
466
|
+
... false ? 0 : {}
|
|
467
|
+
});
|
|
468
|
+
// Pull out the exports that we need to expose from the module. This should
|
|
469
|
+
// be eliminated when we've moved the other routes to the new format. These
|
|
470
|
+
// are used to hook into the route.
|
|
471
|
+
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
472
|
+
function patchFetch() {
|
|
473
|
+
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
474
|
+
workAsyncStorage,
|
|
475
|
+
workUnitAsyncStorage
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
async function handler(req, res, ctx) {
|
|
480
|
+
if (ctx.requestMeta) {
|
|
481
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
482
|
+
}
|
|
483
|
+
if (routeModule.isDev) {
|
|
484
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
485
|
+
}
|
|
486
|
+
let srcPage = "/api/v1/pending-actions/[id]/approve/route";
|
|
487
|
+
// turbopack doesn't normalize `/index` in the page name
|
|
488
|
+
// so we need to to process dynamic routes properly
|
|
489
|
+
// TODO: fix turbopack providing differing value from webpack
|
|
490
|
+
if (false) {} else if (srcPage === '/index') {
|
|
491
|
+
// we always normalize /index specifically
|
|
492
|
+
srcPage = '/';
|
|
502
493
|
}
|
|
494
|
+
const multiZoneDraftMode = false;
|
|
495
|
+
// Registering `instrumentation.ts` usually installs the tracer provider, so
|
|
496
|
+
// do it before starting the request span. The span is started before
|
|
497
|
+
// `prepare`, so route module preparation is part of the request's trace.
|
|
498
|
+
// When this request triggers registration, the lifecycle spans of
|
|
499
|
+
// `instrumentation.ts` are emitted inside the request span.
|
|
500
|
+
const { instrumentation } = await routeModule.ensureInstrumentation(req, {
|
|
501
|
+
deferSpans: true
|
|
502
|
+
});
|
|
503
|
+
return routeModule.traceRequest(req, {
|
|
504
|
+
tracer: (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)(),
|
|
505
|
+
spanName: `${req.method || 'GET'} ${srcPage}`,
|
|
506
|
+
httpTarget: req.url,
|
|
507
|
+
instrumentation
|
|
508
|
+
}, (requestSpan, requestRootSpan)=>handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, requestSpan, requestRootSpan));
|
|
503
509
|
}
|
|
504
|
-
function
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
};
|
|
510
|
+
async function handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, requestSpan, requestRootSpan) {
|
|
511
|
+
const prepareResult = await routeModule.prepare(req, res, {
|
|
512
|
+
srcPage,
|
|
513
|
+
multiZoneDraftMode
|
|
514
|
+
});
|
|
515
|
+
if (!prepareResult) {
|
|
516
|
+
res.statusCode = 400;
|
|
517
|
+
res.end('Bad Request');
|
|
518
|
+
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
519
|
+
return null;
|
|
515
520
|
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
521
|
+
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
522
|
+
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
523
|
+
// Only this route's prerenders can establish ISR or admit generated params.
|
|
524
|
+
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]));
|
|
525
|
+
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
526
|
+
const render404 = async ()=>{
|
|
527
|
+
// TODO: should route-module itself handle rendering the 404
|
|
528
|
+
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
529
|
+
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
530
|
+
} else {
|
|
531
|
+
res.end('This page could not be found');
|
|
522
532
|
}
|
|
533
|
+
return null;
|
|
523
534
|
};
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
return {
|
|
533
|
-
ok: true,
|
|
534
|
-
detail: {
|
|
535
|
-
name: p.name,
|
|
536
|
-
enabled: true
|
|
537
|
-
}
|
|
538
|
-
};
|
|
539
|
-
}
|
|
540
|
-
async function applyInstallMcp(payload) {
|
|
541
|
-
const p = payload;
|
|
542
|
-
// Two install modes: from a registry entry (preferred) or full custom spec.
|
|
543
|
-
if (p.registry_id) {
|
|
544
|
-
// `registry_id` is the fully-qualified upstream name (e.g.
|
|
545
|
-
// `io.github.github/github-mcp-server`). See ADR-0013.
|
|
546
|
-
const entry = await (0,upstream_registry/* getUpstreamByName */.__)(p.registry_id);
|
|
547
|
-
if (!entry) return {
|
|
548
|
-
ok: false,
|
|
549
|
-
detail: `registry name "${p.registry_id}" not found in registry.modelcontextprotocol.io`
|
|
550
|
-
};
|
|
551
|
-
const missing = (entry.variables ?? []).filter((v)=>!p.variables?.[v.key]?.toString().trim());
|
|
552
|
-
if (missing.length > 0) {
|
|
553
|
-
return {
|
|
554
|
-
ok: false,
|
|
555
|
-
detail: `missing variables: ${missing.map((m)=>m.key).join(", ")}`
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
const spec = applyVariables(entry.spec, p.variables ?? {});
|
|
559
|
-
const name = (p.name ?? entry.id).trim();
|
|
560
|
-
(0,mcp_servers/* upsertMcpServer */.te)({
|
|
561
|
-
name,
|
|
562
|
-
transport: entry.transport,
|
|
563
|
-
spec: spec,
|
|
564
|
-
enabled: true
|
|
565
|
-
});
|
|
566
|
-
(0,client/* invalidateMcpTools */.H_)();
|
|
567
|
-
return {
|
|
568
|
-
ok: true,
|
|
569
|
-
detail: {
|
|
570
|
-
name,
|
|
571
|
-
registry_id: p.registry_id
|
|
535
|
+
if (isIsr && !isDraftMode) {
|
|
536
|
+
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
537
|
+
if (prerenderInfo) {
|
|
538
|
+
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
539
|
+
if (nextConfig.adapterPath) {
|
|
540
|
+
return await render404();
|
|
541
|
+
}
|
|
542
|
+
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
572
543
|
}
|
|
573
|
-
}
|
|
544
|
+
}
|
|
574
545
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
546
|
+
let cacheKey = null;
|
|
547
|
+
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
548
|
+
cacheKey = resolvedPathname;
|
|
549
|
+
// ensure /index and / is normalized to one key
|
|
550
|
+
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
551
|
+
}
|
|
552
|
+
// Before rendering (which initializes component tree modules), we have to
|
|
553
|
+
// set the reference manifests to our global store so Server Action's
|
|
554
|
+
// encryption util can access to them at the top level of the page module.
|
|
555
|
+
if (serverActionsManifest && clientReferenceManifest) {
|
|
556
|
+
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
557
|
+
page: srcPage,
|
|
558
|
+
clientReferenceManifest,
|
|
559
|
+
serverActionsManifest
|
|
581
560
|
});
|
|
582
|
-
(0,client/* invalidateMcpTools */.H_)();
|
|
583
|
-
return {
|
|
584
|
-
ok: true,
|
|
585
|
-
detail: {
|
|
586
|
-
name: p.name
|
|
587
|
-
}
|
|
588
|
-
};
|
|
589
561
|
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
562
|
+
const method = req.method || 'GET';
|
|
563
|
+
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
564
|
+
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
565
|
+
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
566
|
+
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
567
|
+
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
568
|
+
globalThis.__incrementalCache = incrementalCache;
|
|
569
|
+
const context = {
|
|
570
|
+
params,
|
|
571
|
+
previewProps,
|
|
572
|
+
renderOpts: {
|
|
573
|
+
experimental: {
|
|
574
|
+
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
575
|
+
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
576
|
+
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
577
|
+
},
|
|
578
|
+
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
579
|
+
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
580
|
+
isDraftMode,
|
|
581
|
+
incrementalCache,
|
|
582
|
+
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
583
|
+
cacheLifeProfiles: nextConfig.cacheLife,
|
|
584
|
+
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
585
|
+
waitUntil: ctx.waitUntil,
|
|
586
|
+
onClose: (cb)=>{
|
|
587
|
+
res.on('close', cb);
|
|
588
|
+
},
|
|
589
|
+
onAfterTaskError: undefined
|
|
590
|
+
},
|
|
591
|
+
sharedContext: {
|
|
592
|
+
buildId,
|
|
593
|
+
deploymentId
|
|
618
594
|
}
|
|
619
595
|
};
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
596
|
+
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
597
|
+
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
598
|
+
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));
|
|
599
|
+
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
600
|
+
try {
|
|
601
|
+
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
602
|
+
res.statusCode = 404;
|
|
603
|
+
// on-demand revalidate always sets this header
|
|
604
|
+
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
605
|
+
res.end('This page could not be found');
|
|
606
|
+
return null;
|
|
607
|
+
}
|
|
608
|
+
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
609
|
+
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
610
|
+
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
611
|
+
// Attempt using provided waitUntil if available
|
|
612
|
+
// if it's not we fallback to sendResponse's handling
|
|
613
|
+
if (pendingWaitUntil) {
|
|
614
|
+
if (ctx.waitUntil) {
|
|
615
|
+
ctx.waitUntil(pendingWaitUntil);
|
|
616
|
+
pendingWaitUntil = undefined;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
const cacheTags = context.renderOpts.collectedTags;
|
|
620
|
+
// If the request is for a static response, we can cache it so long
|
|
621
|
+
// as it's not edge.
|
|
622
|
+
if (isIsr) {
|
|
623
|
+
const blob = await response.blob();
|
|
624
|
+
// Copy the headers from the response.
|
|
625
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
626
|
+
if (cacheTags) {
|
|
627
|
+
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
628
|
+
}
|
|
629
|
+
if (!headers['content-type'] && blob.type) {
|
|
630
|
+
headers['content-type'] = blob.type;
|
|
631
|
+
}
|
|
632
|
+
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
633
|
+
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
|
|
634
|
+
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
635
|
+
// build-time fallback in `build/index.ts` so cache entries
|
|
636
|
+
// and the response Cache-Control header agree on the route's
|
|
637
|
+
// effective expire. Routes that opt out of revalidation
|
|
638
|
+
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
639
|
+
// keep `expire: undefined`.
|
|
640
|
+
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
641
|
+
// Create the cache entry for the response.
|
|
642
|
+
const cacheEntry = {
|
|
643
|
+
value: {
|
|
644
|
+
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
645
|
+
status: response.status,
|
|
646
|
+
body: Buffer.from(await blob.arrayBuffer()),
|
|
647
|
+
headers
|
|
648
|
+
},
|
|
649
|
+
cacheControl: {
|
|
650
|
+
revalidate,
|
|
651
|
+
expire
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
return cacheEntry;
|
|
655
|
+
} else {
|
|
656
|
+
// send response without caching if not ISR
|
|
657
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
658
|
+
return null;
|
|
659
|
+
}
|
|
660
|
+
} catch (err) {
|
|
661
|
+
// if this is a background revalidate we need to report
|
|
662
|
+
// the request error here as it won't be bubbled
|
|
663
|
+
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
664
|
+
const silenceLog = false;
|
|
665
|
+
await routeModule.onRequestError(req, err, {
|
|
666
|
+
routerKind: 'App Router',
|
|
667
|
+
routePath: srcPage,
|
|
668
|
+
routeType: 'route',
|
|
669
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
670
|
+
isStaticGeneration: cacheKey !== null,
|
|
671
|
+
isOnDemandRevalidate
|
|
672
|
+
})
|
|
673
|
+
}, silenceLog, routerServerContext);
|
|
674
|
+
}
|
|
675
|
+
throw err;
|
|
676
|
+
}
|
|
637
677
|
};
|
|
638
|
-
const
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
678
|
+
const handleResponse = async (currentSpan)=>{
|
|
679
|
+
try {
|
|
680
|
+
var _cacheEntry_value;
|
|
681
|
+
const cacheEntry = await routeModule.handleResponse({
|
|
682
|
+
req,
|
|
683
|
+
nextConfig,
|
|
684
|
+
cacheKey,
|
|
685
|
+
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
686
|
+
isFallback: false,
|
|
687
|
+
previewProps,
|
|
688
|
+
prerenderManifest,
|
|
689
|
+
isRoutePPREnabled: false,
|
|
690
|
+
isOnDemandRevalidate,
|
|
691
|
+
revalidateOnlyGenerated,
|
|
692
|
+
responseGenerator,
|
|
693
|
+
waitUntil: ctx.waitUntil,
|
|
694
|
+
isMinimalMode
|
|
695
|
+
});
|
|
696
|
+
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
697
|
+
throw cacheEntry.error;
|
|
698
|
+
}
|
|
699
|
+
// we don't create a cacheEntry for ISR
|
|
700
|
+
if (!isIsr) {
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
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) {
|
|
704
|
+
var _cacheEntry_value1;
|
|
705
|
+
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
706
|
+
}
|
|
707
|
+
if (!isMinimalMode) {
|
|
708
|
+
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
709
|
+
}
|
|
710
|
+
// Draft mode should never be cached
|
|
711
|
+
if (isDraftMode) {
|
|
712
|
+
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
713
|
+
}
|
|
714
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
715
|
+
if (!(isMinimalMode && isIsr)) {
|
|
716
|
+
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
717
|
+
}
|
|
718
|
+
// If cache control is already set on the response we don't
|
|
719
|
+
// override it to allow users to customize it via next.config
|
|
720
|
+
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
721
|
+
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
722
|
+
}
|
|
723
|
+
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'.
|
|
724
|
+
new Response(cacheEntry.value.body, {
|
|
725
|
+
headers,
|
|
726
|
+
status: cacheEntry.value.status || 200
|
|
727
|
+
}));
|
|
728
|
+
return;
|
|
729
|
+
} catch (err) {
|
|
730
|
+
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
731
|
+
const silenceLog = false;
|
|
732
|
+
await routeModule.onRequestError(req, err, {
|
|
733
|
+
routerKind: 'App Router',
|
|
734
|
+
routePath: normalizedSrcPage,
|
|
735
|
+
routeType: 'route',
|
|
736
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
737
|
+
isStaticGeneration: cacheKey !== null,
|
|
738
|
+
isOnDemandRevalidate
|
|
739
|
+
})
|
|
740
|
+
}, silenceLog, routerServerContext);
|
|
741
|
+
}
|
|
742
|
+
// rethrow so that we can handle serving error page
|
|
743
|
+
// If this is during static generation, throw the error again.
|
|
744
|
+
if (isIsr) throw err;
|
|
745
|
+
// Otherwise, send a 500 response unless the original response has
|
|
746
|
+
// already committed. In that case, preserve its status code for
|
|
747
|
+
// telemetry while still recording the failure and terminating a response
|
|
748
|
+
// that the failed pipeline left open.
|
|
749
|
+
if (res.headersSent) {
|
|
750
|
+
if (currentSpan) {
|
|
751
|
+
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
752
|
+
currentSpan.recordException(error);
|
|
753
|
+
currentSpan.setStatus({
|
|
754
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
755
|
+
message: error.message
|
|
756
|
+
});
|
|
757
|
+
currentSpan.setAttribute('error.type', error.name);
|
|
758
|
+
}
|
|
759
|
+
if (!res.writableEnded && !res.destroyed) {
|
|
760
|
+
res.end();
|
|
761
|
+
}
|
|
762
|
+
} else {
|
|
763
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
764
|
+
status: 500
|
|
765
|
+
}));
|
|
766
|
+
}
|
|
767
|
+
return;
|
|
768
|
+
} finally{
|
|
769
|
+
;
|
|
770
|
+
(()=>{
|
|
771
|
+
if (!currentSpan) {
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
let statusCode = res.statusCode;
|
|
775
|
+
currentSpan.setAttributes({
|
|
776
|
+
'http.status_code': statusCode,
|
|
777
|
+
'next.rsc': false
|
|
778
|
+
});
|
|
779
|
+
if (statusCode && statusCode >= 500) {
|
|
780
|
+
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
781
|
+
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
782
|
+
currentSpan.setStatus({
|
|
783
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
784
|
+
});
|
|
785
|
+
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
786
|
+
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
787
|
+
}
|
|
788
|
+
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
789
|
+
// We were unable to get attributes, probably OTEL is not enabled
|
|
790
|
+
if (!rootSpanAttributes) {
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
794
|
+
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
797
|
+
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
798
|
+
const name = `${method} ${route}`;
|
|
799
|
+
currentSpan.setAttributes({
|
|
800
|
+
'next.route': route,
|
|
801
|
+
'http.route': route,
|
|
802
|
+
'next.span_name': name
|
|
803
|
+
});
|
|
804
|
+
currentSpan.updateName(name);
|
|
805
|
+
// Propagate http.route to the request's root span if it isn't the
|
|
806
|
+
// request span (e.g. a platform-created HTTP span in adapter
|
|
807
|
+
// deployments).
|
|
808
|
+
if (requestRootSpan && requestRootSpan !== currentSpan) {
|
|
809
|
+
requestRootSpan.setAttribute('http.route', route);
|
|
810
|
+
requestRootSpan.updateName(name);
|
|
811
|
+
}
|
|
812
|
+
})();
|
|
664
813
|
}
|
|
665
814
|
};
|
|
815
|
+
// When invoked directly, the request span was started before `prepare`;
|
|
816
|
+
// record the request target as normalized by it. next-server's request span
|
|
817
|
+
// already has it.
|
|
818
|
+
if (!isWrappedByNextServer && req.url !== undefined) {
|
|
819
|
+
requestSpan == null ? void 0 : requestSpan.setAttribute('http.target', req.url);
|
|
820
|
+
}
|
|
821
|
+
await handleResponse(requestSpan);
|
|
666
822
|
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
823
|
+
|
|
824
|
+
//# sourceMappingURL=app-route.js.map
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
/***/ }),
|
|
828
|
+
|
|
829
|
+
/***/ 125351:
|
|
830
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
831
|
+
|
|
832
|
+
// ESM COMPAT FLAG
|
|
833
|
+
__webpack_require__.r(__webpack_exports__);
|
|
834
|
+
|
|
835
|
+
// EXPORTS
|
|
836
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
837
|
+
POST: () => (/* binding */ POST)
|
|
838
|
+
});
|
|
839
|
+
|
|
840
|
+
// EXTERNAL MODULE: ./node_modules/next/dist/api/server.js
|
|
841
|
+
var server = __webpack_require__(945592);
|
|
842
|
+
// EXTERNAL MODULE: ./node_modules/zod/v4/classic/schemas.js + 4 modules
|
|
843
|
+
var schemas = __webpack_require__(497377);
|
|
844
|
+
// EXTERNAL MODULE: ./lib/stores/pending-actions.ts
|
|
845
|
+
var pending_actions = __webpack_require__(328286);
|
|
846
|
+
// EXTERNAL MODULE: ./lib/stores/mcp-servers.ts
|
|
847
|
+
var mcp_servers = __webpack_require__(42666);
|
|
848
|
+
// EXTERNAL MODULE: ./lib/mcp/client.ts + 1 modules
|
|
849
|
+
var client = __webpack_require__(777955);
|
|
850
|
+
;// ./lib/mcp/registry.ts
|
|
851
|
+
/**
|
|
852
|
+
* @public
|
|
853
|
+
*
|
|
854
|
+
* MCP server registry types + variable substitution.
|
|
855
|
+
*
|
|
856
|
+
* Discovery is online via the official MCP Registry (see
|
|
857
|
+
* `lib/mcp/upstream-registry.ts` and ADR-0013). Entries flow through this
|
|
858
|
+
* module's types so the picker UI, install action, and `applyVariables`
|
|
859
|
+
* substitution path stay decoupled from the upstream wire format.
|
|
860
|
+
*
|
|
861
|
+
* All exports in this file are part of the package's stable public
|
|
862
|
+
* surface (per `package.json#exports`). Removing or breaking them counts
|
|
863
|
+
* as a breaking change under the deprecation policy in CONTRIBUTING.md.
|
|
864
|
+
*/ // Substitute `${var}` placeholders in a spec object using user-supplied values.
|
|
865
|
+
// Walks objects and arrays recursively; leaves non-strings alone.
|
|
866
|
+
function applyVariables(spec, values) {
|
|
867
|
+
return walk(spec);
|
|
868
|
+
function walk(node) {
|
|
869
|
+
if (typeof node === "string") {
|
|
870
|
+
return node.replace(/\$\{(\w+)\}/g, (_, k)=>values[k] ?? `\${${k}}`);
|
|
685
871
|
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
].filter(Boolean).length;
|
|
692
|
-
if (editModes > 1) {
|
|
693
|
-
return {
|
|
694
|
-
ok: false,
|
|
695
|
-
detail: "use one instructions mode only: instructions OR instructions_append OR instructions_edits"
|
|
696
|
-
};
|
|
697
|
-
}
|
|
698
|
-
const existing = (0,agent_configs/* getAgentConfig */.mJ)(p.agent_id);
|
|
699
|
-
if (!existing) return {
|
|
700
|
-
ok: false,
|
|
701
|
-
detail: `agent "${p.agent_id}" not found`
|
|
702
|
-
};
|
|
703
|
-
// ADR-0036: harness_id may now be set via update_agent. Validate the id
|
|
704
|
-
// resolves before writing — upsertAgentConfig stores the value verbatim, so
|
|
705
|
-
// a bad id would silently break the next agent run with "unknown harness".
|
|
706
|
-
if (p.harness_id !== undefined && p.harness_id !== null && p.harness_id !== "") {
|
|
707
|
-
if (!(0,harnesses/* getHarness */.R4)(p.harness_id)) {
|
|
708
|
-
return {
|
|
709
|
-
ok: false,
|
|
710
|
-
detail: `harness "${p.harness_id}" not found`
|
|
711
|
-
};
|
|
872
|
+
if (Array.isArray(node)) return node.map(walk);
|
|
873
|
+
if (node && typeof node === "object") {
|
|
874
|
+
const out = {};
|
|
875
|
+
for (const [k, v] of Object.entries(node))out[k] = walk(v);
|
|
876
|
+
return out;
|
|
712
877
|
}
|
|
878
|
+
return node;
|
|
713
879
|
}
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
// EXTERNAL MODULE: ./lib/mcp/upstream-registry.ts
|
|
883
|
+
var upstream_registry = __webpack_require__(971904);
|
|
884
|
+
// EXTERNAL MODULE: ./lib/stores/agent-configs.ts
|
|
885
|
+
var agent_configs = __webpack_require__(41720);
|
|
886
|
+
// EXTERNAL MODULE: ./lib/integrations/registry.ts + 10 modules
|
|
887
|
+
var registry = __webpack_require__(27519);
|
|
888
|
+
// EXTERNAL MODULE: ./lib/stores/integrations.ts
|
|
889
|
+
var integrations = __webpack_require__(478228);
|
|
890
|
+
// EXTERNAL MODULE: ./lib/stores/model-config.ts
|
|
891
|
+
var model_config = __webpack_require__(780937);
|
|
892
|
+
// EXTERNAL MODULE: ./lib/stores/harnesses.ts
|
|
893
|
+
var harnesses = __webpack_require__(873175);
|
|
894
|
+
// EXTERNAL MODULE: ./lib/agents/harness/types.ts
|
|
895
|
+
var types = __webpack_require__(489793);
|
|
896
|
+
// EXTERNAL MODULE: ./lib/agents/instruction-edits.ts
|
|
897
|
+
var instruction_edits = __webpack_require__(311459);
|
|
898
|
+
// EXTERNAL MODULE: ./lib/stores/builtin-tools.ts
|
|
899
|
+
var builtin_tools = __webpack_require__(56718);
|
|
900
|
+
// EXTERNAL MODULE: ./lib/stores/disabled-dropin-tools.ts
|
|
901
|
+
var disabled_dropin_tools = __webpack_require__(620052);
|
|
902
|
+
// EXTERNAL MODULE: ./lib/tools/runtime/registry.ts
|
|
903
|
+
var runtime_registry = __webpack_require__(432068);
|
|
904
|
+
;// ./lib/agents/proposals.ts
|
|
905
|
+
// Executes a previously-approved pending action. Strictly server-side.
|
|
906
|
+
// Each `kind` maps to exactly one mutation site; nothing here touches the
|
|
907
|
+
// agent loop directly — approvals just write to the same tables the UI
|
|
908
|
+
// would touch, and the running agent picks up changes on its next turn.
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
|
|
922
|
+
|
|
923
|
+
// `extras` is approval-time material collected by the UI rather than sent
|
|
924
|
+
// in the original tool-call payload. ADR-0010 requires this for any action
|
|
925
|
+
// whose payload would otherwise carry a secret (set_provider_key, the
|
|
926
|
+
// credential fields of enable_integration). The agent never sees `extras`.
|
|
927
|
+
async function applyAction(kind, payload, extras) {
|
|
928
|
+
switch(kind){
|
|
929
|
+
case "install_mcp":
|
|
930
|
+
return await applyInstallMcp(payload);
|
|
931
|
+
case "toggle_mcp":
|
|
932
|
+
return applyToggleMcp(payload);
|
|
933
|
+
case "update_agent_tools":
|
|
934
|
+
return applyUpdateAgentTools(payload);
|
|
935
|
+
case "enable_tool_category":
|
|
936
|
+
return applyEnableToolCategory(payload);
|
|
937
|
+
case "enable_dropin_tool":
|
|
938
|
+
return applyEnableDropinTool(payload);
|
|
939
|
+
case "update_agent":
|
|
940
|
+
return applyUpdateAgent(payload);
|
|
941
|
+
case "start_oauth":
|
|
942
|
+
return applyStartOauth(payload);
|
|
943
|
+
case "set_provider_key":
|
|
944
|
+
return applySetProviderKey(payload, extras);
|
|
945
|
+
case "enable_integration":
|
|
946
|
+
return applyEnableIntegration(payload, extras);
|
|
947
|
+
case "upsert_harness":
|
|
948
|
+
return applyUpsertHarness(payload);
|
|
949
|
+
default:
|
|
950
|
+
return {
|
|
951
|
+
ok: false,
|
|
952
|
+
detail: `unknown kind: ${kind}`
|
|
953
|
+
};
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
function applyEnableToolCategory(payload) {
|
|
957
|
+
const p = payload;
|
|
958
|
+
if (!p.category) return {
|
|
959
|
+
ok: false,
|
|
960
|
+
detail: "category required"
|
|
961
|
+
};
|
|
962
|
+
if (!runtime_registry/* BUILTIN_CATEGORIES */.hK.includes(p.category)) {
|
|
963
|
+
return {
|
|
724
964
|
ok: false,
|
|
725
|
-
detail:
|
|
965
|
+
detail: `unknown built-in category: ${p.category}`
|
|
726
966
|
};
|
|
727
|
-
newInstructions = transformed.text;
|
|
728
|
-
instructionsEditSummary = transformed.summary;
|
|
729
967
|
}
|
|
730
|
-
(0,
|
|
731
|
-
id: existing.id,
|
|
732
|
-
name: existing.name,
|
|
733
|
-
icon: existing.icon,
|
|
734
|
-
identity: p.identity ?? existing.identity,
|
|
735
|
-
instructions: newInstructions,
|
|
736
|
-
tools: (0,agent_configs/* getAgentTools */.TG)(existing),
|
|
737
|
-
model_config_name: existing.model_config_name,
|
|
738
|
-
history_limit: p.history_limit ?? existing.history_limit,
|
|
739
|
-
history_window_hours: p.history_window_hours ?? existing.history_window_hours,
|
|
740
|
-
hot_turn_limit: p.hot_turn_limit,
|
|
741
|
-
warm_summary_limit: p.warm_summary_limit ?? existing.warm_summary_limit,
|
|
742
|
-
harness_id: p.harness_id
|
|
743
|
-
});
|
|
968
|
+
(0,builtin_tools/* setCategoryEnabled */.MD)(p.category, true);
|
|
744
969
|
return {
|
|
745
970
|
ok: true,
|
|
746
971
|
detail: {
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
instructions_changed: instructionsChanged,
|
|
750
|
-
instructions_edit_summary: instructionsEditSummary,
|
|
751
|
-
harness_id_changed: p.harness_id !== undefined
|
|
972
|
+
category: p.category,
|
|
973
|
+
enabled: true
|
|
752
974
|
}
|
|
753
975
|
};
|
|
754
976
|
}
|
|
755
|
-
|
|
756
|
-
// read-only; the global default pointer stays UI-only. Creates when `id` is
|
|
757
|
-
// omitted; edits when `id` matches an existing custom harness.
|
|
758
|
-
function applyUpsertHarness(payload) {
|
|
977
|
+
function applyEnableDropinTool(payload) {
|
|
759
978
|
const p = payload;
|
|
760
|
-
if (p.
|
|
761
|
-
|
|
979
|
+
if (!p.name) return {
|
|
980
|
+
ok: false,
|
|
981
|
+
detail: "name required"
|
|
982
|
+
};
|
|
983
|
+
(0,disabled_dropin_tools/* setDropinDisabled */.b)(p.name, false);
|
|
984
|
+
return {
|
|
985
|
+
ok: true,
|
|
986
|
+
detail: {
|
|
987
|
+
name: p.name,
|
|
988
|
+
enabled: true
|
|
989
|
+
}
|
|
990
|
+
};
|
|
991
|
+
}
|
|
992
|
+
async function applyInstallMcp(payload) {
|
|
993
|
+
const p = payload;
|
|
994
|
+
// Two install modes: from a registry entry (preferred) or full custom spec.
|
|
995
|
+
if (p.registry_id) {
|
|
996
|
+
// `registry_id` is the fully-qualified upstream name (e.g.
|
|
997
|
+
// `io.github.github/github-mcp-server`). See ADR-0013.
|
|
998
|
+
const entry = await (0,upstream_registry/* getUpstreamByName */.__)(p.registry_id);
|
|
999
|
+
if (!entry) return {
|
|
762
1000
|
ok: false,
|
|
763
|
-
detail: "
|
|
1001
|
+
detail: `registry name "${p.registry_id}" not found in registry.modelcontextprotocol.io`
|
|
764
1002
|
};
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
for (const k of Object.keys(sections)){
|
|
768
|
-
if (!types/* HARNESS_SECTION_KEYS */.cX.includes(k)) {
|
|
1003
|
+
const missing = (entry.variables ?? []).filter((v)=>!p.variables?.[v.key]?.toString().trim());
|
|
1004
|
+
if (missing.length > 0) {
|
|
769
1005
|
return {
|
|
770
1006
|
ok: false,
|
|
771
|
-
detail: `
|
|
1007
|
+
detail: `missing variables: ${missing.map((m)=>m.key).join(", ")}`
|
|
772
1008
|
};
|
|
773
1009
|
}
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
name
|
|
778
|
-
|
|
779
|
-
|
|
1010
|
+
const spec = applyVariables(entry.spec, p.variables ?? {});
|
|
1011
|
+
const name = (p.name ?? entry.id).trim();
|
|
1012
|
+
(0,mcp_servers/* upsertMcpServer */.te)({
|
|
1013
|
+
name,
|
|
1014
|
+
transport: entry.transport,
|
|
1015
|
+
spec: spec,
|
|
1016
|
+
enabled: true
|
|
780
1017
|
});
|
|
781
|
-
|
|
782
|
-
ok: false,
|
|
783
|
-
detail: `custom harness "${p.id}" not found`
|
|
784
|
-
};
|
|
1018
|
+
(0,client/* invalidateMcpTools */.H_)();
|
|
785
1019
|
return {
|
|
786
1020
|
ok: true,
|
|
787
1021
|
detail: {
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
created: false
|
|
1022
|
+
name,
|
|
1023
|
+
registry_id: p.registry_id
|
|
791
1024
|
}
|
|
792
1025
|
};
|
|
793
1026
|
}
|
|
794
|
-
if (p.
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
1027
|
+
if (p.name && p.spec && p.transport) {
|
|
1028
|
+
(0,mcp_servers/* upsertMcpServer */.te)({
|
|
1029
|
+
name: p.name,
|
|
1030
|
+
transport: p.transport,
|
|
1031
|
+
spec: p.spec,
|
|
1032
|
+
enabled: true
|
|
1033
|
+
});
|
|
1034
|
+
(0,client/* invalidateMcpTools */.H_)();
|
|
801
1035
|
return {
|
|
802
|
-
ok:
|
|
803
|
-
detail:
|
|
1036
|
+
ok: true,
|
|
1037
|
+
detail: {
|
|
1038
|
+
name: p.name
|
|
1039
|
+
}
|
|
804
1040
|
};
|
|
805
1041
|
}
|
|
806
|
-
const created = (0,harnesses/* createCustomHarness */.a$)({
|
|
807
|
-
name: p.name,
|
|
808
|
-
description: p.description,
|
|
809
|
-
sections: p.sections ?? {}
|
|
810
|
-
});
|
|
811
1042
|
return {
|
|
812
|
-
ok:
|
|
813
|
-
detail:
|
|
814
|
-
id: created.id,
|
|
815
|
-
name: created.name,
|
|
816
|
-
created: true
|
|
817
|
-
}
|
|
1043
|
+
ok: false,
|
|
1044
|
+
detail: "install_mcp needs either registry_id+variables, or name+transport+spec"
|
|
818
1045
|
};
|
|
819
1046
|
}
|
|
820
|
-
|
|
821
|
-
// ADR-0010: agent-led setup actions.
|
|
822
|
-
// ---------------------------------------------------------------------------
|
|
823
|
-
// `start_oauth` applies as a no-op on persistent state — the *real* effect is
|
|
824
|
-
// the browser following the authorize URL we return. The approval UI handles
|
|
825
|
-
// the redirect; the apply step exists only to convert the proposal into a
|
|
826
|
-
// concrete authorize_url tied to the integration's vendored scopes.
|
|
827
|
-
function applyStartOauth(payload) {
|
|
1047
|
+
function applyToggleMcp(payload) {
|
|
828
1048
|
const p = payload;
|
|
829
|
-
if (!p.
|
|
1049
|
+
if (!p.name || typeof p.enabled !== "boolean") return {
|
|
830
1050
|
ok: false,
|
|
831
|
-
detail: "
|
|
1051
|
+
detail: "name and enabled required"
|
|
832
1052
|
};
|
|
833
|
-
const
|
|
834
|
-
if (!
|
|
1053
|
+
const existing = (0,mcp_servers/* getMcpServer */.cw)(p.name);
|
|
1054
|
+
if (!existing) return {
|
|
835
1055
|
ok: false,
|
|
836
|
-
detail: `
|
|
1056
|
+
detail: `mcp server "${p.name}" not found`
|
|
837
1057
|
};
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
1058
|
+
(0,mcp_servers/* upsertMcpServer */.te)({
|
|
1059
|
+
name: existing.name,
|
|
1060
|
+
transport: existing.transport,
|
|
1061
|
+
spec: JSON.parse(existing.spec),
|
|
1062
|
+
enabled: p.enabled
|
|
1063
|
+
});
|
|
1064
|
+
(0,client/* invalidateMcpTools */.H_)();
|
|
841
1065
|
return {
|
|
842
1066
|
ok: true,
|
|
843
1067
|
detail: {
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
authorize_method: "POST"
|
|
1068
|
+
name: p.name,
|
|
1069
|
+
enabled: p.enabled
|
|
847
1070
|
}
|
|
848
1071
|
};
|
|
849
1072
|
}
|
|
850
|
-
|
|
851
|
-
// only declares which provider/model is being configured; the actual key
|
|
852
|
-
// arrives in `extras` from the approval secret-input modal. ADR-0010
|
|
853
|
-
// closes the prompt-injection vector this way: a malicious page cannot
|
|
854
|
-
// trick the agent into proposing an attacker key, because the agent never
|
|
855
|
-
// types or sees the key.
|
|
856
|
-
function applySetProviderKey(payload, extras) {
|
|
1073
|
+
function applyUpdateAgentTools(payload) {
|
|
857
1074
|
const p = payload;
|
|
858
|
-
if (!p.
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
1075
|
+
if (!p.agent_id || !Array.isArray(p.tools)) return {
|
|
1076
|
+
ok: false,
|
|
1077
|
+
detail: "agent_id and tools[] required"
|
|
1078
|
+
};
|
|
1079
|
+
const existing = (0,agent_configs/* getAgentConfig */.mJ)(p.agent_id);
|
|
1080
|
+
if (!existing) return {
|
|
1081
|
+
ok: false,
|
|
1082
|
+
detail: `agent "${p.agent_id}" not found`
|
|
1083
|
+
};
|
|
1084
|
+
const before = (0,agent_configs/* getAgentTools */.TG)(existing);
|
|
1085
|
+
const mode = p.mode ?? "add";
|
|
1086
|
+
if (mode !== "add" && mode !== "replace") return {
|
|
1087
|
+
ok: false,
|
|
1088
|
+
detail: "mode must be add or replace"
|
|
1089
|
+
};
|
|
1090
|
+
const requested = p.tools.filter((tool)=>typeof tool === "string").map((tool)=>tool.trim()).filter(Boolean);
|
|
1091
|
+
const nextTools = mode === "replace" ? [
|
|
1092
|
+
...new Set(requested)
|
|
1093
|
+
] : [
|
|
1094
|
+
...new Set([
|
|
1095
|
+
...before,
|
|
1096
|
+
...requested
|
|
1097
|
+
])
|
|
1098
|
+
];
|
|
1099
|
+
(0,agent_configs/* upsertAgentConfig */.BM)({
|
|
1100
|
+
id: existing.id,
|
|
1101
|
+
name: existing.name,
|
|
1102
|
+
icon: existing.icon,
|
|
1103
|
+
identity: existing.identity,
|
|
1104
|
+
instructions: existing.instructions,
|
|
1105
|
+
tools: nextTools,
|
|
1106
|
+
model_config_name: existing.model_config_name
|
|
1107
|
+
});
|
|
1108
|
+
return {
|
|
1109
|
+
ok: true,
|
|
1110
|
+
detail: {
|
|
1111
|
+
agent_id: p.agent_id,
|
|
1112
|
+
mode,
|
|
1113
|
+
before_tools: before,
|
|
1114
|
+
tools: nextTools,
|
|
1115
|
+
added_tools: nextTools.filter((t)=>!before.includes(t))
|
|
1116
|
+
}
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
function applyUpdateAgent(payload) {
|
|
1120
|
+
const p = payload;
|
|
1121
|
+
if (!p.agent_id) return {
|
|
1122
|
+
ok: false,
|
|
1123
|
+
detail: "agent_id required"
|
|
1124
|
+
};
|
|
1125
|
+
for (const field of [
|
|
1126
|
+
"warm_summary_limit",
|
|
1127
|
+
"hot_turn_limit",
|
|
1128
|
+
"history_limit",
|
|
1129
|
+
"history_window_hours"
|
|
1130
|
+
]){
|
|
1131
|
+
const value = p[field];
|
|
1132
|
+
if (value !== undefined && (!Number.isInteger(value) || value < 0)) {
|
|
1133
|
+
return {
|
|
1134
|
+
ok: false,
|
|
1135
|
+
detail: `${field} must be a nonnegative integer`
|
|
1136
|
+
};
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
const editModes = [
|
|
1140
|
+
p.instructions !== undefined,
|
|
1141
|
+
p.instructions_append !== undefined,
|
|
1142
|
+
p.instructions_edits !== undefined
|
|
1143
|
+
].filter(Boolean).length;
|
|
1144
|
+
if (editModes > 1) {
|
|
1145
|
+
return {
|
|
1146
|
+
ok: false,
|
|
1147
|
+
detail: "use one instructions mode only: instructions OR instructions_append OR instructions_edits"
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
const existing = (0,agent_configs/* getAgentConfig */.mJ)(p.agent_id);
|
|
1151
|
+
if (!existing) return {
|
|
1152
|
+
ok: false,
|
|
1153
|
+
detail: `agent "${p.agent_id}" not found`
|
|
1154
|
+
};
|
|
1155
|
+
// ADR-0036: harness_id may now be set via update_agent. Validate the id
|
|
1156
|
+
// resolves before writing — upsertAgentConfig stores the value verbatim, so
|
|
1157
|
+
// a bad id would silently break the next agent run with "unknown harness".
|
|
1158
|
+
if (p.harness_id !== undefined && p.harness_id !== null && p.harness_id !== "") {
|
|
1159
|
+
if (!(0,harnesses/* getHarness */.R4)(p.harness_id)) {
|
|
1160
|
+
return {
|
|
1161
|
+
ok: false,
|
|
1162
|
+
detail: `harness "${p.harness_id}" not found`
|
|
1163
|
+
};
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
const instructionsChanged = p.instructions !== undefined || p.instructions_append !== undefined || p.instructions_edits !== undefined;
|
|
1167
|
+
let newInstructions = existing.instructions;
|
|
1168
|
+
let instructionsEditSummary;
|
|
1169
|
+
if (p.instructions !== undefined) {
|
|
1170
|
+
newInstructions = p.instructions;
|
|
1171
|
+
} else if (p.instructions_append !== undefined) {
|
|
1172
|
+
newInstructions = existing.instructions + p.instructions_append;
|
|
1173
|
+
} else if (p.instructions_edits !== undefined) {
|
|
1174
|
+
const transformed = (0,instruction_edits/* applyInstructionEdits */.c)(existing.instructions, p.instructions_edits);
|
|
1175
|
+
if (!transformed.ok) return {
|
|
1176
|
+
ok: false,
|
|
1177
|
+
detail: transformed.error
|
|
1178
|
+
};
|
|
1179
|
+
newInstructions = transformed.text;
|
|
1180
|
+
instructionsEditSummary = transformed.summary;
|
|
1181
|
+
}
|
|
1182
|
+
(0,agent_configs/* upsertAgentConfig */.BM)({
|
|
1183
|
+
id: existing.id,
|
|
1184
|
+
name: existing.name,
|
|
1185
|
+
icon: existing.icon,
|
|
1186
|
+
identity: p.identity ?? existing.identity,
|
|
1187
|
+
instructions: newInstructions,
|
|
1188
|
+
tools: (0,agent_configs/* getAgentTools */.TG)(existing),
|
|
1189
|
+
model_config_name: existing.model_config_name,
|
|
1190
|
+
history_limit: p.history_limit ?? existing.history_limit,
|
|
1191
|
+
history_window_hours: p.history_window_hours ?? existing.history_window_hours,
|
|
1192
|
+
hot_turn_limit: p.hot_turn_limit,
|
|
1193
|
+
warm_summary_limit: p.warm_summary_limit ?? existing.warm_summary_limit,
|
|
1194
|
+
harness_id: p.harness_id
|
|
1195
|
+
});
|
|
1196
|
+
return {
|
|
1197
|
+
ok: true,
|
|
1198
|
+
detail: {
|
|
1199
|
+
agent_id: p.agent_id,
|
|
1200
|
+
identity_changed: p.identity !== undefined,
|
|
1201
|
+
instructions_changed: instructionsChanged,
|
|
1202
|
+
instructions_edit_summary: instructionsEditSummary,
|
|
1203
|
+
harness_id_changed: p.harness_id !== undefined
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
// ADR-0036: agent-driven edits to *custom* harness presets. Built-ins remain
|
|
1208
|
+
// read-only; the global default pointer stays UI-only. Creates when `id` is
|
|
1209
|
+
// omitted; edits when `id` matches an existing custom harness.
|
|
1210
|
+
function applyUpsertHarness(payload) {
|
|
1211
|
+
const p = payload;
|
|
1212
|
+
if (p.id && (0,types/* isBuiltinHarnessId */.vf)(p.id)) {
|
|
1213
|
+
return {
|
|
1214
|
+
ok: false,
|
|
1215
|
+
detail: "built-in harnesses are read-only"
|
|
1216
|
+
};
|
|
1217
|
+
}
|
|
1218
|
+
const sections = p.sections ?? {};
|
|
1219
|
+
for (const k of Object.keys(sections)){
|
|
1220
|
+
if (!types/* HARNESS_SECTION_KEYS */.cX.includes(k)) {
|
|
1221
|
+
return {
|
|
1222
|
+
ok: false,
|
|
1223
|
+
detail: `unknown harness section: ${k}`
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
if (p.id && p.id.startsWith(types/* CUSTOM_HARNESS_ID_PREFIX */.YX)) {
|
|
1228
|
+
const updated = (0,harnesses/* updateCustomHarness */.Nc)(p.id, {
|
|
1229
|
+
name: p.name,
|
|
1230
|
+
description: p.description,
|
|
1231
|
+
sections: p.sections
|
|
1232
|
+
});
|
|
1233
|
+
if (!updated) return {
|
|
1234
|
+
ok: false,
|
|
1235
|
+
detail: `custom harness "${p.id}" not found`
|
|
1236
|
+
};
|
|
1237
|
+
return {
|
|
1238
|
+
ok: true,
|
|
1239
|
+
detail: {
|
|
1240
|
+
id: updated.id,
|
|
1241
|
+
name: updated.name,
|
|
1242
|
+
created: false
|
|
1243
|
+
}
|
|
1244
|
+
};
|
|
1245
|
+
}
|
|
1246
|
+
if (p.id) {
|
|
1247
|
+
return {
|
|
1248
|
+
ok: false,
|
|
1249
|
+
detail: `harness id must start with "${types/* CUSTOM_HARNESS_ID_PREFIX */.YX}" or be omitted`
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
if (!p.name || !p.name.trim()) {
|
|
1253
|
+
return {
|
|
1254
|
+
ok: false,
|
|
1255
|
+
detail: "name required when creating a harness"
|
|
1256
|
+
};
|
|
1257
|
+
}
|
|
1258
|
+
const created = (0,harnesses/* createCustomHarness */.a$)({
|
|
1259
|
+
name: p.name,
|
|
1260
|
+
description: p.description,
|
|
1261
|
+
sections: p.sections ?? {}
|
|
1262
|
+
});
|
|
1263
|
+
return {
|
|
1264
|
+
ok: true,
|
|
1265
|
+
detail: {
|
|
1266
|
+
id: created.id,
|
|
1267
|
+
name: created.name,
|
|
1268
|
+
created: true
|
|
1269
|
+
}
|
|
1270
|
+
};
|
|
1271
|
+
}
|
|
1272
|
+
// ---------------------------------------------------------------------------
|
|
1273
|
+
// ADR-0010: agent-led setup actions.
|
|
1274
|
+
// ---------------------------------------------------------------------------
|
|
1275
|
+
// `start_oauth` applies as a no-op on persistent state — the *real* effect is
|
|
1276
|
+
// the browser following the authorize URL we return. The approval UI handles
|
|
1277
|
+
// the redirect; the apply step exists only to convert the proposal into a
|
|
1278
|
+
// concrete authorize_url tied to the integration's vendored scopes.
|
|
1279
|
+
function applyStartOauth(payload) {
|
|
1280
|
+
const p = payload;
|
|
1281
|
+
if (!p.integration_id) return {
|
|
1282
|
+
ok: false,
|
|
1283
|
+
detail: "integration_id required"
|
|
1284
|
+
};
|
|
1285
|
+
const manifest = (0,registry/* getManifest */.c)(p.integration_id);
|
|
1286
|
+
if (!manifest) return {
|
|
1287
|
+
ok: false,
|
|
1288
|
+
detail: `unknown integration "${p.integration_id}"`
|
|
1289
|
+
};
|
|
1290
|
+
// The /api/v1/integrations/<id>/oauth/start endpoint already exists for
|
|
1291
|
+
// gmail and outlook and computes the URL from the saved client_id/secret.
|
|
1292
|
+
// Surface the relative path; the browser hits it after approval.
|
|
1293
|
+
return {
|
|
1294
|
+
ok: true,
|
|
1295
|
+
detail: {
|
|
1296
|
+
integration_id: manifest.id,
|
|
1297
|
+
kickoff_path: `/api/v1/integrations/${manifest.id}/oauth/start`,
|
|
1298
|
+
authorize_method: "POST"
|
|
1299
|
+
}
|
|
1300
|
+
};
|
|
1301
|
+
}
|
|
1302
|
+
// `set_provider_key` adds (or replaces) a model_configs row. The payload
|
|
1303
|
+
// only declares which provider/model is being configured; the actual key
|
|
1304
|
+
// arrives in `extras` from the approval secret-input modal. ADR-0010
|
|
1305
|
+
// closes the prompt-injection vector this way: a malicious page cannot
|
|
1306
|
+
// trick the agent into proposing an attacker key, because the agent never
|
|
1307
|
+
// types or sees the key.
|
|
1308
|
+
function applySetProviderKey(payload, extras) {
|
|
1309
|
+
const p = payload;
|
|
1310
|
+
if (!p.name || !p.provider || !p.model_id) {
|
|
1311
|
+
return {
|
|
1312
|
+
ok: false,
|
|
1313
|
+
detail: "name, provider, and model_id required"
|
|
1314
|
+
};
|
|
1315
|
+
}
|
|
1316
|
+
const apiKey = typeof extras?.api_key === "string" ? extras.api_key.trim() : "";
|
|
1317
|
+
if (!apiKey) {
|
|
866
1318
|
return {
|
|
867
1319
|
ok: false,
|
|
868
1320
|
detail: "api_key was not collected by the approval UI; nothing applied"
|
|
@@ -1370,458 +1822,6 @@ module.exports = require("node:dns");
|
|
|
1370
1822
|
|
|
1371
1823
|
module.exports = import("sharp");;
|
|
1372
1824
|
|
|
1373
|
-
/***/ }),
|
|
1374
|
-
|
|
1375
|
-
/***/ 843535:
|
|
1376
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1377
|
-
|
|
1378
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1379
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1380
|
-
/* harmony export */ handler: () => (/* binding */ handler),
|
|
1381
|
-
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
1382
|
-
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
1383
|
-
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
1384
|
-
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
1385
|
-
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
1386
|
-
/* harmony export */ });
|
|
1387
|
-
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319225);
|
|
1388
|
-
/* 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__);
|
|
1389
|
-
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(684006);
|
|
1390
|
-
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
1391
|
-
/* 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__);
|
|
1392
|
-
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(799373);
|
|
1393
|
-
/* 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__);
|
|
1394
|
-
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(434775);
|
|
1395
|
-
/* 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__);
|
|
1396
|
-
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(524235);
|
|
1397
|
-
/* 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__);
|
|
1398
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(200261);
|
|
1399
|
-
/* 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__);
|
|
1400
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(754365);
|
|
1401
|
-
/* 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__);
|
|
1402
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(590771);
|
|
1403
|
-
/* 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__);
|
|
1404
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(473461);
|
|
1405
|
-
/* 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__);
|
|
1406
|
-
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(767798);
|
|
1407
|
-
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(192280);
|
|
1408
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(662018);
|
|
1409
|
-
/* 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__);
|
|
1410
|
-
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(445696);
|
|
1411
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(347929);
|
|
1412
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
1413
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(986439);
|
|
1414
|
-
/* 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__);
|
|
1415
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(710246);
|
|
1416
|
-
/* 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__);
|
|
1417
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(137527);
|
|
1418
|
-
/* 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__);
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
// We inject the nextConfigOutput here so that we can use them in the route
|
|
1438
|
-
// module.
|
|
1439
|
-
const nextConfigOutput = "standalone"
|
|
1440
|
-
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
1441
|
-
definition: {
|
|
1442
|
-
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
1443
|
-
page: "/api/v1/pending-actions/[id]/approve/route",
|
|
1444
|
-
pathname: "/api/v1/pending-actions/[id]/approve",
|
|
1445
|
-
filename: "route",
|
|
1446
|
-
bundlePath: "app/api/v1/pending-actions/[id]/approve/route"
|
|
1447
|
-
},
|
|
1448
|
-
distDir: ".next" || 0,
|
|
1449
|
-
relativeProjectDir: false || '',
|
|
1450
|
-
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/pending-actions/[id]/approve/route.ts",
|
|
1451
|
-
nextConfigOutput,
|
|
1452
|
-
// The lazy require factory ensures that:
|
|
1453
|
-
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
1454
|
-
// correctly attributing module load time to application-code rather than
|
|
1455
|
-
// framework internals.
|
|
1456
|
-
// - In all modes: async modules (route files with top-level await) are
|
|
1457
|
-
// handled correctly — require() returns a Promise for such modules, which
|
|
1458
|
-
// ensureUserland() awaits before the first request is handled.
|
|
1459
|
-
userland: ()=>__webpack_require__(125351),
|
|
1460
|
-
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
1461
|
-
// server HMR updates are picked up without re-executing the entry chunk.
|
|
1462
|
-
// Using require() (synchronous) avoids adding async overhead that would be
|
|
1463
|
-
// incorrectly attributed to application-code time in devRequestTiming.
|
|
1464
|
-
... false ? 0 : {}
|
|
1465
|
-
});
|
|
1466
|
-
// Pull out the exports that we need to expose from the module. This should
|
|
1467
|
-
// be eliminated when we've moved the other routes to the new format. These
|
|
1468
|
-
// are used to hook into the route.
|
|
1469
|
-
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
1470
|
-
function patchFetch() {
|
|
1471
|
-
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
1472
|
-
workAsyncStorage,
|
|
1473
|
-
workUnitAsyncStorage
|
|
1474
|
-
});
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
async function handler(req, res, ctx) {
|
|
1478
|
-
if (ctx.requestMeta) {
|
|
1479
|
-
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
1480
|
-
}
|
|
1481
|
-
if (routeModule.isDev) {
|
|
1482
|
-
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
1483
|
-
}
|
|
1484
|
-
let srcPage = "/api/v1/pending-actions/[id]/approve/route";
|
|
1485
|
-
// turbopack doesn't normalize `/index` in the page name
|
|
1486
|
-
// so we need to to process dynamic routes properly
|
|
1487
|
-
// TODO: fix turbopack providing differing value from webpack
|
|
1488
|
-
if (false) {} else if (srcPage === '/index') {
|
|
1489
|
-
// we always normalize /index specifically
|
|
1490
|
-
srcPage = '/';
|
|
1491
|
-
}
|
|
1492
|
-
const multiZoneDraftMode = false;
|
|
1493
|
-
// Registering `instrumentation.ts` usually installs the tracer provider, so
|
|
1494
|
-
// do it before starting the request span. The span is started before
|
|
1495
|
-
// `prepare`, so route module preparation is part of the request's trace.
|
|
1496
|
-
// When this request triggers registration, the lifecycle spans of
|
|
1497
|
-
// `instrumentation.ts` are emitted inside the request span.
|
|
1498
|
-
const { instrumentation } = await routeModule.ensureInstrumentation(req, {
|
|
1499
|
-
deferSpans: true
|
|
1500
|
-
});
|
|
1501
|
-
return routeModule.traceRequest(req, {
|
|
1502
|
-
tracer: (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)(),
|
|
1503
|
-
spanName: `${req.method || 'GET'} ${srcPage}`,
|
|
1504
|
-
httpTarget: req.url,
|
|
1505
|
-
instrumentation
|
|
1506
|
-
}, (requestSpan, requestRootSpan)=>handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, requestSpan, requestRootSpan));
|
|
1507
|
-
}
|
|
1508
|
-
async function handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, requestSpan, requestRootSpan) {
|
|
1509
|
-
const prepareResult = await routeModule.prepare(req, res, {
|
|
1510
|
-
srcPage,
|
|
1511
|
-
multiZoneDraftMode
|
|
1512
|
-
});
|
|
1513
|
-
if (!prepareResult) {
|
|
1514
|
-
res.statusCode = 400;
|
|
1515
|
-
res.end('Bad Request');
|
|
1516
|
-
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
1517
|
-
return null;
|
|
1518
|
-
}
|
|
1519
|
-
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
1520
|
-
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
1521
|
-
// Only this route's prerenders can establish ISR or admit generated params.
|
|
1522
|
-
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]));
|
|
1523
|
-
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
1524
|
-
const render404 = async ()=>{
|
|
1525
|
-
// TODO: should route-module itself handle rendering the 404
|
|
1526
|
-
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
1527
|
-
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
1528
|
-
} else {
|
|
1529
|
-
res.end('This page could not be found');
|
|
1530
|
-
}
|
|
1531
|
-
return null;
|
|
1532
|
-
};
|
|
1533
|
-
if (isIsr && !isDraftMode) {
|
|
1534
|
-
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
1535
|
-
if (prerenderInfo) {
|
|
1536
|
-
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
1537
|
-
if (nextConfig.adapterPath) {
|
|
1538
|
-
return await render404();
|
|
1539
|
-
}
|
|
1540
|
-
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
1541
|
-
}
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
let cacheKey = null;
|
|
1545
|
-
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
1546
|
-
cacheKey = resolvedPathname;
|
|
1547
|
-
// ensure /index and / is normalized to one key
|
|
1548
|
-
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
1549
|
-
}
|
|
1550
|
-
// Before rendering (which initializes component tree modules), we have to
|
|
1551
|
-
// set the reference manifests to our global store so Server Action's
|
|
1552
|
-
// encryption util can access to them at the top level of the page module.
|
|
1553
|
-
if (serverActionsManifest && clientReferenceManifest) {
|
|
1554
|
-
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
1555
|
-
page: srcPage,
|
|
1556
|
-
clientReferenceManifest,
|
|
1557
|
-
serverActionsManifest
|
|
1558
|
-
});
|
|
1559
|
-
}
|
|
1560
|
-
const method = req.method || 'GET';
|
|
1561
|
-
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
1562
|
-
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
1563
|
-
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
1564
|
-
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
1565
|
-
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
1566
|
-
globalThis.__incrementalCache = incrementalCache;
|
|
1567
|
-
const context = {
|
|
1568
|
-
params,
|
|
1569
|
-
previewProps,
|
|
1570
|
-
renderOpts: {
|
|
1571
|
-
experimental: {
|
|
1572
|
-
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
1573
|
-
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
1574
|
-
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
1575
|
-
},
|
|
1576
|
-
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
1577
|
-
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
1578
|
-
isDraftMode,
|
|
1579
|
-
incrementalCache,
|
|
1580
|
-
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
1581
|
-
cacheLifeProfiles: nextConfig.cacheLife,
|
|
1582
|
-
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
1583
|
-
waitUntil: ctx.waitUntil,
|
|
1584
|
-
onClose: (cb)=>{
|
|
1585
|
-
res.on('close', cb);
|
|
1586
|
-
},
|
|
1587
|
-
onAfterTaskError: undefined
|
|
1588
|
-
},
|
|
1589
|
-
sharedContext: {
|
|
1590
|
-
buildId,
|
|
1591
|
-
deploymentId
|
|
1592
|
-
}
|
|
1593
|
-
};
|
|
1594
|
-
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
1595
|
-
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
1596
|
-
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));
|
|
1597
|
-
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
1598
|
-
try {
|
|
1599
|
-
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
1600
|
-
res.statusCode = 404;
|
|
1601
|
-
// on-demand revalidate always sets this header
|
|
1602
|
-
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
1603
|
-
res.end('This page could not be found');
|
|
1604
|
-
return null;
|
|
1605
|
-
}
|
|
1606
|
-
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
1607
|
-
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
1608
|
-
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
1609
|
-
// Attempt using provided waitUntil if available
|
|
1610
|
-
// if it's not we fallback to sendResponse's handling
|
|
1611
|
-
if (pendingWaitUntil) {
|
|
1612
|
-
if (ctx.waitUntil) {
|
|
1613
|
-
ctx.waitUntil(pendingWaitUntil);
|
|
1614
|
-
pendingWaitUntil = undefined;
|
|
1615
|
-
}
|
|
1616
|
-
}
|
|
1617
|
-
const cacheTags = context.renderOpts.collectedTags;
|
|
1618
|
-
// If the request is for a static response, we can cache it so long
|
|
1619
|
-
// as it's not edge.
|
|
1620
|
-
if (isIsr) {
|
|
1621
|
-
const blob = await response.blob();
|
|
1622
|
-
// Copy the headers from the response.
|
|
1623
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
1624
|
-
if (cacheTags) {
|
|
1625
|
-
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
1626
|
-
}
|
|
1627
|
-
if (!headers['content-type'] && blob.type) {
|
|
1628
|
-
headers['content-type'] = blob.type;
|
|
1629
|
-
}
|
|
1630
|
-
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
1631
|
-
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
|
|
1632
|
-
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
1633
|
-
// build-time fallback in `build/index.ts` so cache entries
|
|
1634
|
-
// and the response Cache-Control header agree on the route's
|
|
1635
|
-
// effective expire. Routes that opt out of revalidation
|
|
1636
|
-
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
1637
|
-
// keep `expire: undefined`.
|
|
1638
|
-
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
1639
|
-
// Create the cache entry for the response.
|
|
1640
|
-
const cacheEntry = {
|
|
1641
|
-
value: {
|
|
1642
|
-
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
1643
|
-
status: response.status,
|
|
1644
|
-
body: Buffer.from(await blob.arrayBuffer()),
|
|
1645
|
-
headers
|
|
1646
|
-
},
|
|
1647
|
-
cacheControl: {
|
|
1648
|
-
revalidate,
|
|
1649
|
-
expire
|
|
1650
|
-
}
|
|
1651
|
-
};
|
|
1652
|
-
return cacheEntry;
|
|
1653
|
-
} else {
|
|
1654
|
-
// send response without caching if not ISR
|
|
1655
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
1656
|
-
return null;
|
|
1657
|
-
}
|
|
1658
|
-
} catch (err) {
|
|
1659
|
-
// if this is a background revalidate we need to report
|
|
1660
|
-
// the request error here as it won't be bubbled
|
|
1661
|
-
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
1662
|
-
const silenceLog = false;
|
|
1663
|
-
await routeModule.onRequestError(req, err, {
|
|
1664
|
-
routerKind: 'App Router',
|
|
1665
|
-
routePath: srcPage,
|
|
1666
|
-
routeType: 'route',
|
|
1667
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
1668
|
-
isStaticGeneration: cacheKey !== null,
|
|
1669
|
-
isOnDemandRevalidate
|
|
1670
|
-
})
|
|
1671
|
-
}, silenceLog, routerServerContext);
|
|
1672
|
-
}
|
|
1673
|
-
throw err;
|
|
1674
|
-
}
|
|
1675
|
-
};
|
|
1676
|
-
const handleResponse = async (currentSpan)=>{
|
|
1677
|
-
try {
|
|
1678
|
-
var _cacheEntry_value;
|
|
1679
|
-
const cacheEntry = await routeModule.handleResponse({
|
|
1680
|
-
req,
|
|
1681
|
-
nextConfig,
|
|
1682
|
-
cacheKey,
|
|
1683
|
-
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
1684
|
-
isFallback: false,
|
|
1685
|
-
previewProps,
|
|
1686
|
-
prerenderManifest,
|
|
1687
|
-
isRoutePPREnabled: false,
|
|
1688
|
-
isOnDemandRevalidate,
|
|
1689
|
-
revalidateOnlyGenerated,
|
|
1690
|
-
responseGenerator,
|
|
1691
|
-
waitUntil: ctx.waitUntil,
|
|
1692
|
-
isMinimalMode
|
|
1693
|
-
});
|
|
1694
|
-
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
1695
|
-
throw cacheEntry.error;
|
|
1696
|
-
}
|
|
1697
|
-
// we don't create a cacheEntry for ISR
|
|
1698
|
-
if (!isIsr) {
|
|
1699
|
-
return;
|
|
1700
|
-
}
|
|
1701
|
-
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) {
|
|
1702
|
-
var _cacheEntry_value1;
|
|
1703
|
-
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
1704
|
-
}
|
|
1705
|
-
if (!isMinimalMode) {
|
|
1706
|
-
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
1707
|
-
}
|
|
1708
|
-
// Draft mode should never be cached
|
|
1709
|
-
if (isDraftMode) {
|
|
1710
|
-
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
1711
|
-
}
|
|
1712
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
1713
|
-
if (!(isMinimalMode && isIsr)) {
|
|
1714
|
-
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
1715
|
-
}
|
|
1716
|
-
// If cache control is already set on the response we don't
|
|
1717
|
-
// override it to allow users to customize it via next.config
|
|
1718
|
-
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
1719
|
-
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
1720
|
-
}
|
|
1721
|
-
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'.
|
|
1722
|
-
new Response(cacheEntry.value.body, {
|
|
1723
|
-
headers,
|
|
1724
|
-
status: cacheEntry.value.status || 200
|
|
1725
|
-
}));
|
|
1726
|
-
return;
|
|
1727
|
-
} catch (err) {
|
|
1728
|
-
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
1729
|
-
const silenceLog = false;
|
|
1730
|
-
await routeModule.onRequestError(req, err, {
|
|
1731
|
-
routerKind: 'App Router',
|
|
1732
|
-
routePath: normalizedSrcPage,
|
|
1733
|
-
routeType: 'route',
|
|
1734
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
1735
|
-
isStaticGeneration: cacheKey !== null,
|
|
1736
|
-
isOnDemandRevalidate
|
|
1737
|
-
})
|
|
1738
|
-
}, silenceLog, routerServerContext);
|
|
1739
|
-
}
|
|
1740
|
-
// rethrow so that we can handle serving error page
|
|
1741
|
-
// If this is during static generation, throw the error again.
|
|
1742
|
-
if (isIsr) throw err;
|
|
1743
|
-
// Otherwise, send a 500 response unless the original response has
|
|
1744
|
-
// already committed. In that case, preserve its status code for
|
|
1745
|
-
// telemetry while still recording the failure and terminating a response
|
|
1746
|
-
// that the failed pipeline left open.
|
|
1747
|
-
if (res.headersSent) {
|
|
1748
|
-
if (currentSpan) {
|
|
1749
|
-
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
1750
|
-
currentSpan.recordException(error);
|
|
1751
|
-
currentSpan.setStatus({
|
|
1752
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
1753
|
-
message: error.message
|
|
1754
|
-
});
|
|
1755
|
-
currentSpan.setAttribute('error.type', error.name);
|
|
1756
|
-
}
|
|
1757
|
-
if (!res.writableEnded && !res.destroyed) {
|
|
1758
|
-
res.end();
|
|
1759
|
-
}
|
|
1760
|
-
} else {
|
|
1761
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
1762
|
-
status: 500
|
|
1763
|
-
}));
|
|
1764
|
-
}
|
|
1765
|
-
return;
|
|
1766
|
-
} finally{
|
|
1767
|
-
;
|
|
1768
|
-
(()=>{
|
|
1769
|
-
if (!currentSpan) {
|
|
1770
|
-
return;
|
|
1771
|
-
}
|
|
1772
|
-
let statusCode = res.statusCode;
|
|
1773
|
-
currentSpan.setAttributes({
|
|
1774
|
-
'http.status_code': statusCode,
|
|
1775
|
-
'next.rsc': false
|
|
1776
|
-
});
|
|
1777
|
-
if (statusCode && statusCode >= 500) {
|
|
1778
|
-
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
1779
|
-
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
1780
|
-
currentSpan.setStatus({
|
|
1781
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
1782
|
-
});
|
|
1783
|
-
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
1784
|
-
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
1785
|
-
}
|
|
1786
|
-
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
1787
|
-
// We were unable to get attributes, probably OTEL is not enabled
|
|
1788
|
-
if (!rootSpanAttributes) {
|
|
1789
|
-
return;
|
|
1790
|
-
}
|
|
1791
|
-
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
1792
|
-
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
1793
|
-
return;
|
|
1794
|
-
}
|
|
1795
|
-
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
1796
|
-
const name = `${method} ${route}`;
|
|
1797
|
-
currentSpan.setAttributes({
|
|
1798
|
-
'next.route': route,
|
|
1799
|
-
'http.route': route,
|
|
1800
|
-
'next.span_name': name
|
|
1801
|
-
});
|
|
1802
|
-
currentSpan.updateName(name);
|
|
1803
|
-
// Propagate http.route to the request's root span if it isn't the
|
|
1804
|
-
// request span (e.g. a platform-created HTTP span in adapter
|
|
1805
|
-
// deployments).
|
|
1806
|
-
if (requestRootSpan && requestRootSpan !== currentSpan) {
|
|
1807
|
-
requestRootSpan.setAttribute('http.route', route);
|
|
1808
|
-
requestRootSpan.updateName(name);
|
|
1809
|
-
}
|
|
1810
|
-
})();
|
|
1811
|
-
}
|
|
1812
|
-
};
|
|
1813
|
-
// When invoked directly, the request span was started before `prepare`;
|
|
1814
|
-
// record the request target as normalized by it. next-server's request span
|
|
1815
|
-
// already has it.
|
|
1816
|
-
if (!isWrappedByNextServer && req.url !== undefined) {
|
|
1817
|
-
requestSpan == null ? void 0 : requestSpan.setAttribute('http.target', req.url);
|
|
1818
|
-
}
|
|
1819
|
-
await handleResponse(requestSpan);
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
//# sourceMappingURL=app-route.js.map
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
1825
|
/***/ }),
|
|
1826
1826
|
|
|
1827
1827
|
/***/ 848161:
|
|
@@ -2283,7 +2283,7 @@ module.exports = require("next/dist/shared/lib/no-fallback-error.external");
|
|
|
2283
2283
|
var __webpack_require__ = require("../../../../../../webpack-runtime.js");
|
|
2284
2284
|
__webpack_require__.C(exports);
|
|
2285
2285
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
2286
|
-
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,4891,513,4992,1244,3042,3566,2068,3175,
|
|
2286
|
+
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,4891,513,4992,1244,3042,3566,2068,3175,6408,1904], () => (__webpack_exec__(110364)));
|
|
2287
2287
|
module.exports = __webpack_exports__;
|
|
2288
2288
|
|
|
2289
2289
|
})();
|