@circuitwall/jarela 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +6 -5
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +8 -0
- package/.next/standalone/.next/server/app/_global-error/page.js +68 -68
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +76 -76
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/v1/access/[identity]/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/access/route.js +169 -169
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +82 -56
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/display-filters/route.js +122 -122
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/route.js +100 -100
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/thread/route.js +753 -753
- package/.next/standalone/.next/server/app/api/v1/agents/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +364 -364
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +802 -802
- package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/attachments/files/route.js +49 -49
- package/.next/standalone/.next/server/app/api/v1/attachments/images/route.js +910 -910
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +589 -16
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/[remote_jid]/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +30 -30
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +703 -130
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js +708 -135
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js +802 -229
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/[route_id]/route.js +739 -739
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +1035 -1035
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +679 -106
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js +804 -804
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js +700 -700
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/config/route.js +85 -85
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js +709 -709
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/currency/route.js +10 -10
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js +784 -784
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js +86 -86
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js +57 -57
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/search/route.js +523 -523
- package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js +122 -122
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/env/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/env-sync/allowlist/route.js +368 -368
- package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/events/route.js +751 -178
- package/.next/standalone/.next/server/app/api/v1/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/events/test/route.js +77 -77
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +763 -763
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/browser/activate/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +34 -34
- package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +204 -204
- package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +133 -133
- package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +106 -106
- package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +114 -114
- package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +134 -134
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +690 -690
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js +185 -185
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js +171 -171
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js +396 -396
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js +212 -212
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/files/[name]/route.js +235 -235
- package/.next/standalone/.next/server/app/api/v1/fs/browse/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/harnesses/[id]/route.js +221 -221
- package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/health/route.js +772 -772
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +133 -133
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/callback/route.js +363 -363
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +233 -233
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +682 -682
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +879 -879
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +108 -108
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +952 -952
- package/.next/standalone/.next/server/app/api/v1/integrations/route.js +216 -216
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +864 -847
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/local-file/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/logs/route.js +70 -70
- package/.next/standalone/.next/server/app/api/v1/maps/embed/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +979 -979
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/registry/route.js +196 -196
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +381 -381
- package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +79 -79
- package/.next/standalone/.next/server/app/api/v1/memory/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +131 -131
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +374 -369
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +143 -143
- package/.next/standalone/.next/server/app/api/v1/models/route.js +543 -543
- package/.next/standalone/.next/server/app/api/v1/packages/catalog/route.js +445 -445
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js +120 -120
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js +234 -234
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js +407 -407
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js +107 -107
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js +228 -228
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/route.js +148 -148
- package/.next/standalone/.next/server/app/api/v1/packages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js +787 -787
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js +507 -507
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js +181 -181
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js +258 -258
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/profile/location/route.js +30 -30
- package/.next/standalone/.next/server/app/api/v1/profile/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/providers/route.js +94 -94
- package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +450 -450
- package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/redaction/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +600 -600
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/route.js +732 -732
- package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +359 -359
- package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +197 -197
- package/.next/standalone/.next/server/app/api/v1/security/state/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +176 -176
- package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +190 -190
- package/.next/standalone/.next/server/app/api/v1/setup/test-key/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/skills/[id]/route.js +770 -770
- package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +115 -115
- package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +327 -327
- package/.next/standalone/.next/server/app/api/v1/skills/route.js +870 -870
- package/.next/standalone/.next/server/app/api/v1/system/abort/route.js +838 -808
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js +177 -177
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/tailscale/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/tasks/[agent_id]/route.js +115 -115
- package/.next/standalone/.next/server/app/api/v1/tasks/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js +1429 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js +635 -634
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js +53 -439
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +172 -172
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/route.js +908 -908
- package/.next/standalone/.next/server/app/api/v1/tools/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js +17 -17
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/route.js +570 -570
- package/.next/standalone/.next/server/app/api/v1/voice/transcribe/route.js +224 -224
- package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +975 -975
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/watchers/reaction-scripts/route.js +128 -128
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/icon.svg/route.js +62 -62
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +436 -436
- package/.next/standalone/.next/server/app/page.js +1243 -854
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page.js +91 -91
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +6 -5
- package/.next/standalone/.next/server/chunks/{424.js → 1388.js} +335 -986
- package/.next/standalone/.next/server/chunks/1433.js +1 -1
- package/.next/standalone/.next/server/chunks/1638.js +1 -2
- package/.next/standalone/.next/server/chunks/1738.js +1 -1
- package/.next/standalone/.next/server/chunks/210.js +6 -6
- package/.next/standalone/.next/server/chunks/2151.js +31 -1
- package/.next/standalone/.next/server/chunks/2207.js +1 -0
- package/.next/standalone/.next/server/chunks/2471.js +28 -28
- package/.next/standalone/.next/server/chunks/2504.js +1 -1
- package/.next/standalone/.next/server/chunks/2695.js +17 -17
- package/.next/standalone/.next/server/chunks/3042.js +14 -8
- package/.next/standalone/.next/server/chunks/3399.js +1 -1
- package/.next/standalone/.next/server/chunks/3566.js +1 -1
- package/.next/standalone/.next/server/chunks/4189.js +946 -0
- package/.next/standalone/.next/server/chunks/{9590.js → 423.js} +8 -3
- package/.next/standalone/.next/server/chunks/4433.js +146 -146
- package/.next/standalone/.next/server/chunks/4508.js +1 -1
- package/.next/standalone/.next/server/chunks/4588.js +1 -0
- package/.next/standalone/.next/server/chunks/46.js +5 -0
- package/.next/standalone/.next/server/chunks/466.js +12 -0
- package/.next/standalone/.next/server/chunks/4868.js +206 -206
- package/.next/standalone/.next/server/chunks/4992.js +13 -0
- package/.next/standalone/.next/server/chunks/5120.js +963 -0
- package/.next/standalone/.next/server/chunks/5701.js +1 -1
- package/.next/standalone/.next/server/chunks/5900.js +1 -1
- package/.next/standalone/.next/server/chunks/6210.js +1 -0
- package/.next/standalone/.next/server/chunks/6213.js +1 -1
- package/.next/standalone/.next/server/chunks/6649.js +2 -2
- package/.next/standalone/.next/server/chunks/6703.js +3 -3
- package/.next/standalone/.next/server/chunks/7445.js +1 -0
- package/.next/standalone/.next/server/chunks/8067.js +12 -0
- package/.next/standalone/.next/server/chunks/8461.js +14 -9
- package/.next/standalone/.next/server/chunks/8558.js +1 -1
- package/.next/standalone/.next/server/chunks/8724.js +1 -1
- package/.next/standalone/.next/server/chunks/8849.js +91 -91
- package/.next/standalone/.next/server/chunks/9032.js +6 -5
- package/.next/standalone/.next/server/chunks/{2563.js → 9164.js} +33173 -31461
- package/.next/standalone/.next/server/chunks/9237.js +396 -396
- package/.next/standalone/.next/server/chunks/{9640.js → 9304.js} +1628 -570
- package/.next/standalone/.next/server/chunks/9406.js +1 -1
- package/.next/standalone/.next/server/chunks/9824.js +98 -98
- package/.next/standalone/.next/server/chunks/9826.js +1 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware.js +415 -397
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/preview-props.json +3 -3
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{1395-a340fb0a345382a4.js → 1395-e4a99912b8f83044.js} +13 -1
- package/.next/standalone/.next/static/chunks/app/_global-error/{page-36cb8b428b38b26a.js → page-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/{page-7017f07f8a7a083c.js → page-213a623b37226452.js} +1041 -652
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/css/{d80058f0b9b41c09.css → 312542a5725ba0d5.css} +2 -2
- package/.next/standalone/docs/adoption/changesets.json +309 -0
- package/.next/standalone/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/.next/standalone/package.json +3 -3
- package/CHANGELOG.md +25 -0
- package/api/client.ts +9 -0
- package/api/types.ts +29 -0
- package/app/api/v1/lifecycle/adoption/route.ts +14 -2
- package/app/api/v1/models/[name]/compact-threads/route.ts +14 -11
- package/app/api/v1/threads/[thread_id]/activity/route.ts +19 -0
- package/app/api/v1/threads/[thread_id]/context-pin/route.test.ts +1 -0
- package/app/api/v1/threads/[thread_id]/context-pin/route.ts +2 -1
- package/app/api/v1/threads/[thread_id]/route.ts +5 -1
- package/components/chat/ChatView.tsx +52 -11
- package/components/chat/ContextBoundary.test.tsx +68 -1
- package/components/chat/ContextBoundary.tsx +92 -13
- package/components/chat/MessageList.test.tsx +31 -0
- package/components/chat/MessageList.tsx +49 -28
- package/components/chat/ToolList.test.tsx +92 -16
- package/components/chat/ToolList.tsx +59 -4
- package/components/chat/chat-helpers.test.tsx +24 -1
- package/components/chat/chat-helpers.ts +47 -4
- package/components/chat/useThreadActivity.test.tsx +113 -0
- package/components/chat/useThreadActivity.ts +94 -0
- package/components/chat/useThreadData.ts +16 -16
- package/components/chat/workflow-step-retry.ts +25 -0
- package/components/ui/BootScreen.tsx +17 -0
- package/components/ui/WorkflowChecklist.tsx +71 -33
- package/hooks/useSSE.ts +28 -3
- package/lib/agents/compaction-pipeline.test.ts +202 -0
- package/lib/agents/compaction-pipeline.ts +483 -0
- package/lib/agents/conversation-summary.ts +37 -21
- package/lib/agents/prepare/history-window.test.ts +18 -0
- package/lib/agents/prepare/history-window.ts +11 -2
- package/lib/agents/prepare/request.ts +4 -0
- package/lib/agents/prepare/system-prompt.test.ts +39 -0
- package/lib/agents/prepare/system-prompt.ts +8 -3
- package/lib/agents/prompt-registry.test.ts +5 -140
- package/lib/agents/prompt-registry.ts +45 -1
- package/lib/agents/prompt-variants.ts +146 -0
- package/lib/agents/run-registry.test.ts +22 -0
- package/lib/agents/run-registry.ts +29 -0
- package/lib/agents/run-thread.retry.test.ts +67 -1
- package/lib/agents/run-thread.ts +86 -1
- package/lib/agents/thread-activity.test.ts +31 -0
- package/lib/agents/thread-activity.ts +27 -0
- package/lib/agents/thread-compaction-state.test.ts +82 -0
- package/lib/agents/thread-compaction-state.ts +121 -0
- package/lib/agents/thread-compaction.test.ts +83 -4
- package/lib/agents/thread-compaction.ts +34 -11
- package/lib/agents/warm-summary-background.test.ts +219 -5
- package/lib/agents/warm-summary-background.ts +325 -142
- package/lib/agents/warm-topics.test.ts +37 -0
- package/lib/agents/warm-topics.ts +297 -0
- package/lib/agents/workflow-step-retry.test.ts +96 -0
- package/lib/agents/workflow-step-retry.ts +216 -0
- package/lib/api/browser-control.ts +0 -3
- package/lib/db/migrations.ts +5 -0
- package/lib/env/config.ts +2 -0
- package/lib/env/schema.ts +12 -0
- package/lib/lifecycle/changeset-build.test.ts +93 -0
- package/lib/lifecycle/changeset-build.ts +210 -0
- package/lib/lifecycle/changesets.test.ts +101 -0
- package/lib/lifecycle/changesets.ts +166 -0
- package/lib/lifecycle/surface-collect.test.ts +88 -0
- package/lib/lifecycle/surface-collect.ts +64 -0
- package/lib/lifecycle/surface-snapshot.test.ts +104 -0
- package/lib/lifecycle/surface-snapshot.ts +210 -0
- package/lib/memory/record.ts +0 -2
- package/lib/providers/external.ts +0 -2
- package/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/lib/stores/threads.test.ts +9 -0
- package/lib/stores/threads.ts +21 -11
- package/lib/stores/version-adoption.test.ts +96 -0
- package/lib/stores/version-adoption.ts +239 -26
- package/lib/stores/workflow-progress.ts +3 -0
- package/lib/tools/communications/ms-todo.ts +0 -7
- package/lib/tools/general/memory.ts +1 -1
- package/lib/tools/general/workflow-progress.ts +2 -0
- package/lib/tools/runtime/catalog.ts +1 -25
- package/lib/triggers/registry.ts +0 -4
- package/package.json +3 -3
- package/scripts/install-to-system.ps1 +39 -11
- package/scripts/install-to-system.sh +37 -3
- package/.next/standalone/.next/server/chunks/3979.js +0 -581
- package/.next/standalone/.next/server/chunks/5936.js +0 -594
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-36cb8b428b38b26a.js +0 -17
- /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → bMRK5y3ruT7c3WtBfCQOG}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → bMRK5y3ruT7c3WtBfCQOG}/_ssgManifest.js +0 -0
|
@@ -68,183 +68,627 @@ module.exports = require("next/dist/server/app-render/action-async-storage.exter
|
|
|
68
68
|
|
|
69
69
|
/***/ }),
|
|
70
70
|
|
|
71
|
-
/***/
|
|
72
|
-
/***/ ((
|
|
73
|
-
|
|
74
|
-
module.exports = require("stream");
|
|
75
|
-
|
|
76
|
-
/***/ }),
|
|
77
|
-
|
|
78
|
-
/***/ 28354:
|
|
79
|
-
/***/ ((module) => {
|
|
80
|
-
|
|
81
|
-
module.exports = require("util");
|
|
82
|
-
|
|
83
|
-
/***/ }),
|
|
84
|
-
|
|
85
|
-
/***/ 29021:
|
|
86
|
-
/***/ ((module) => {
|
|
87
|
-
|
|
88
|
-
module.exports = require("fs");
|
|
89
|
-
|
|
90
|
-
/***/ }),
|
|
71
|
+
/***/ 23417:
|
|
72
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
91
73
|
|
|
92
|
-
|
|
93
|
-
|
|
74
|
+
__webpack_require__.r(__webpack_exports__);
|
|
75
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
76
|
+
/* harmony export */ handler: () => (/* binding */ handler),
|
|
77
|
+
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
78
|
+
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
79
|
+
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
80
|
+
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
81
|
+
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
82
|
+
/* harmony export */ });
|
|
83
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
|
|
84
|
+
/* 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__);
|
|
85
|
+
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
|
|
86
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
87
|
+
/* 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__);
|
|
88
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
|
|
89
|
+
/* 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__);
|
|
90
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
|
|
91
|
+
/* 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__);
|
|
92
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
|
|
93
|
+
/* 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__);
|
|
94
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
95
|
+
/* 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__);
|
|
96
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
97
|
+
/* 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__);
|
|
98
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
99
|
+
/* 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__);
|
|
100
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
101
|
+
/* 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__);
|
|
102
|
+
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
103
|
+
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
104
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
105
|
+
/* 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__);
|
|
106
|
+
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
107
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
108
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
109
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
110
|
+
/* 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__);
|
|
111
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
112
|
+
/* 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__);
|
|
113
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
114
|
+
/* 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__);
|
|
94
115
|
|
|
95
|
-
module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
|
|
96
116
|
|
|
97
|
-
/***/ }),
|
|
98
117
|
|
|
99
|
-
/***/ 31421:
|
|
100
|
-
/***/ ((module) => {
|
|
101
118
|
|
|
102
|
-
module.exports = require("node:child_process");
|
|
103
119
|
|
|
104
|
-
/***/ }),
|
|
105
120
|
|
|
106
|
-
/***/ 33873:
|
|
107
|
-
/***/ ((module) => {
|
|
108
121
|
|
|
109
|
-
module.exports = require("path");
|
|
110
122
|
|
|
111
|
-
/***/ }),
|
|
112
123
|
|
|
113
|
-
/***/ 37067:
|
|
114
|
-
/***/ ((module) => {
|
|
115
124
|
|
|
116
|
-
module.exports = require("node:http");
|
|
117
125
|
|
|
118
|
-
/***/ }),
|
|
119
126
|
|
|
120
|
-
/***/ 38522:
|
|
121
|
-
/***/ ((module) => {
|
|
122
127
|
|
|
123
|
-
module.exports = require("node:zlib");
|
|
124
128
|
|
|
125
|
-
/***/ }),
|
|
126
129
|
|
|
127
|
-
/***/ 41720:
|
|
128
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
129
130
|
|
|
130
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
131
|
-
/* harmony export */ BM: () => (/* binding */ upsertAgentConfig),
|
|
132
|
-
/* harmony export */ E1: () => (/* binding */ updateAgentDisplayFilters),
|
|
133
|
-
/* harmony export */ P2: () => (/* binding */ parseCitationStrictness),
|
|
134
|
-
/* harmony export */ S2: () => (/* binding */ getAgentToolCredentials),
|
|
135
|
-
/* harmony export */ SJ: () => (/* binding */ generateAgentId),
|
|
136
|
-
/* harmony export */ TG: () => (/* binding */ getAgentTools),
|
|
137
|
-
/* harmony export */ bg: () => (/* binding */ parseDelegateTargets),
|
|
138
|
-
/* harmony export */ d2: () => (/* binding */ DISPLAY_FILTER_KEYS),
|
|
139
|
-
/* harmony export */ fg: () => (/* binding */ getAgentTierProportions),
|
|
140
|
-
/* harmony export */ mJ: () => (/* binding */ getAgentConfig),
|
|
141
|
-
/* harmony export */ nV: () => (/* binding */ getAgentDisplayFilters),
|
|
142
|
-
/* harmony export */ vU: () => (/* binding */ getDefaultAgentConfig),
|
|
143
|
-
/* harmony export */ vi: () => (/* binding */ DISPLAY_FILTER_DEFAULTS),
|
|
144
|
-
/* harmony export */ xi: () => (/* binding */ deleteAgentConfig),
|
|
145
|
-
/* harmony export */ zb: () => (/* binding */ listAgentConfigs)
|
|
146
|
-
/* harmony export */ });
|
|
147
|
-
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
|
|
148
|
-
/* harmony import */ var _lib_db_transaction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99043);
|
|
149
|
-
/* harmony import */ var _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66849);
|
|
150
131
|
|
|
151
132
|
|
|
133
|
+
// We inject the nextConfigOutput here so that we can use them in the route
|
|
134
|
+
// module.
|
|
135
|
+
const nextConfigOutput = "standalone"
|
|
136
|
+
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
137
|
+
definition: {
|
|
138
|
+
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
139
|
+
page: "/api/v1/bridges/[id]/routes/[route_id]/route",
|
|
140
|
+
pathname: "/api/v1/bridges/[id]/routes/[route_id]",
|
|
141
|
+
filename: "route",
|
|
142
|
+
bundlePath: "app/api/v1/bridges/[id]/routes/[route_id]/route"
|
|
143
|
+
},
|
|
144
|
+
distDir: ".next" || 0,
|
|
145
|
+
relativeProjectDir: false || '',
|
|
146
|
+
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/bridges/[id]/routes/[route_id]/route.ts",
|
|
147
|
+
nextConfigOutput,
|
|
148
|
+
// The lazy require factory ensures that:
|
|
149
|
+
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
150
|
+
// correctly attributing module load time to application-code rather than
|
|
151
|
+
// framework internals.
|
|
152
|
+
// - In all modes: async modules (route files with top-level await) are
|
|
153
|
+
// handled correctly — require() returns a Promise for such modules, which
|
|
154
|
+
// ensureUserland() awaits before the first request is handled.
|
|
155
|
+
userland: ()=>__webpack_require__(57870),
|
|
156
|
+
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
157
|
+
// server HMR updates are picked up without re-executing the entry chunk.
|
|
158
|
+
// Using require() (synchronous) avoids adding async overhead that would be
|
|
159
|
+
// incorrectly attributed to application-code time in devRequestTiming.
|
|
160
|
+
... false ? 0 : {}
|
|
161
|
+
});
|
|
162
|
+
// Pull out the exports that we need to expose from the module. This should
|
|
163
|
+
// be eliminated when we've moved the other routes to the new format. These
|
|
164
|
+
// are used to hook into the route.
|
|
165
|
+
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
166
|
+
function patchFetch() {
|
|
167
|
+
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
168
|
+
workAsyncStorage,
|
|
169
|
+
workUnitAsyncStorage
|
|
170
|
+
});
|
|
171
|
+
}
|
|
152
172
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
if (value === "off" || value === "informational" || value === "standard" || value === "strict") {
|
|
157
|
-
return value;
|
|
173
|
+
async function handler(req, res, ctx) {
|
|
174
|
+
if (ctx.requestMeta) {
|
|
175
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
158
176
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Parse the JSON-encoded per-agent override of context tier proportions.
|
|
163
|
-
* Returns `null` for NULL, blank, malformed JSON, or any payload that
|
|
164
|
-
* doesn't have three finite non-negative numeric fields. Callers fall
|
|
165
|
-
* back to the model config's value (or built-in defaults) on null.
|
|
166
|
-
*/ function getAgentTierProportions(row) {
|
|
167
|
-
const raw = row.context_tier_proportions;
|
|
168
|
-
if (!raw) return null;
|
|
169
|
-
try {
|
|
170
|
-
const parsed = JSON.parse(raw);
|
|
171
|
-
const hot = Number(parsed.hot);
|
|
172
|
-
const warm = Number(parsed.warm);
|
|
173
|
-
const facts = Number(parsed.facts);
|
|
174
|
-
if (![
|
|
175
|
-
hot,
|
|
176
|
-
warm,
|
|
177
|
-
facts
|
|
178
|
-
].every((n)=>Number.isFinite(n) && n >= 0)) return null;
|
|
179
|
-
if (hot + warm + facts <= 0) return null;
|
|
180
|
-
return {
|
|
181
|
-
hot,
|
|
182
|
-
warm,
|
|
183
|
-
facts
|
|
184
|
-
};
|
|
185
|
-
} catch {
|
|
186
|
-
return null;
|
|
177
|
+
if (routeModule.isDev) {
|
|
178
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
187
179
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
//
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
FROM threads t
|
|
196
|
-
JOIN messages m ON m.thread_id = t.thread_id
|
|
197
|
-
GROUP BY t.agent_id
|
|
198
|
-
) latest ON latest.agent_id = a.id
|
|
199
|
-
ORDER BY a.is_default DESC, COALESCE(latest.last_message_at, a.created_at) DESC, a.id ASC`).all();
|
|
200
|
-
}
|
|
201
|
-
function getDefaultAgentConfig() {
|
|
202
|
-
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE is_default=1 LIMIT 1").get() ?? null;
|
|
203
|
-
}
|
|
204
|
-
function getAgentConfig(id) {
|
|
205
|
-
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE id=?").get(id) ?? null;
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Parse the JSON-encoded delegate whitelist into a deduped string[]. Returns
|
|
209
|
-
* an empty array for NULL, blank, or malformed JSON (delegation is opt-in).
|
|
210
|
-
*/ /**
|
|
211
|
-
* Parse the agent's tool allowlist (`tools` column, stored as a JSON string).
|
|
212
|
-
* Returns an empty array on NULL/blank/malformed JSON — same defensive shape
|
|
213
|
-
* as parseDelegateTargets. Callers that previously did `JSON.parse(cfg.tools)`
|
|
214
|
-
* inline should switch to this getter so the serialization contract stays
|
|
215
|
-
* owned by this store.
|
|
216
|
-
*/ function getAgentTools(cfg) {
|
|
217
|
-
if (!cfg?.tools) return [];
|
|
218
|
-
try {
|
|
219
|
-
const parsed = JSON.parse(cfg.tools);
|
|
220
|
-
if (!Array.isArray(parsed)) return [];
|
|
221
|
-
return parsed.filter((x)=>typeof x === "string" && x.length > 0);
|
|
222
|
-
} catch {
|
|
223
|
-
return [];
|
|
180
|
+
let srcPage = "/api/v1/bridges/[id]/routes/[route_id]/route";
|
|
181
|
+
// turbopack doesn't normalize `/index` in the page name
|
|
182
|
+
// so we need to to process dynamic routes properly
|
|
183
|
+
// TODO: fix turbopack providing differing value from webpack
|
|
184
|
+
if (false) {} else if (srcPage === '/index') {
|
|
185
|
+
// we always normalize /index specifically
|
|
186
|
+
srcPage = '/';
|
|
224
187
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
return
|
|
188
|
+
const multiZoneDraftMode = false;
|
|
189
|
+
const prepareResult = await routeModule.prepare(req, res, {
|
|
190
|
+
srcPage,
|
|
191
|
+
multiZoneDraftMode
|
|
192
|
+
});
|
|
193
|
+
if (!prepareResult) {
|
|
194
|
+
res.statusCode = 400;
|
|
195
|
+
res.end('Bad Request');
|
|
196
|
+
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
197
|
+
return null;
|
|
235
198
|
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
199
|
+
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
200
|
+
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
201
|
+
// Only this route's prerenders can establish ISR or admit generated params.
|
|
202
|
+
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]));
|
|
203
|
+
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
204
|
+
const render404 = async ()=>{
|
|
205
|
+
// TODO: should route-module itself handle rendering the 404
|
|
206
|
+
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
207
|
+
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
208
|
+
} else {
|
|
209
|
+
res.end('This page could not be found');
|
|
210
|
+
}
|
|
211
|
+
return null;
|
|
212
|
+
};
|
|
213
|
+
if (isIsr && !isDraftMode) {
|
|
214
|
+
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
215
|
+
if (prerenderInfo) {
|
|
216
|
+
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
217
|
+
if (nextConfig.adapterPath) {
|
|
218
|
+
return await render404();
|
|
219
|
+
}
|
|
220
|
+
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
let cacheKey = null;
|
|
225
|
+
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
226
|
+
cacheKey = resolvedPathname;
|
|
227
|
+
// ensure /index and / is normalized to one key
|
|
228
|
+
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
229
|
+
}
|
|
230
|
+
// Before rendering (which initializes component tree modules), we have to
|
|
231
|
+
// set the reference manifests to our global store so Server Action's
|
|
232
|
+
// encryption util can access to them at the top level of the page module.
|
|
233
|
+
if (serverActionsManifest && clientReferenceManifest) {
|
|
234
|
+
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
235
|
+
page: srcPage,
|
|
236
|
+
clientReferenceManifest,
|
|
237
|
+
serverActionsManifest
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
const method = req.method || 'GET';
|
|
241
|
+
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
242
|
+
const activeSpan = tracer.getActiveScopeSpan();
|
|
243
|
+
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
244
|
+
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
245
|
+
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
246
|
+
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
247
|
+
globalThis.__incrementalCache = incrementalCache;
|
|
248
|
+
const context = {
|
|
249
|
+
params,
|
|
250
|
+
previewProps,
|
|
251
|
+
renderOpts: {
|
|
252
|
+
experimental: {
|
|
253
|
+
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
254
|
+
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
255
|
+
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
256
|
+
},
|
|
257
|
+
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
258
|
+
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
259
|
+
isDraftMode,
|
|
260
|
+
incrementalCache,
|
|
261
|
+
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
262
|
+
cacheLifeProfiles: nextConfig.cacheLife,
|
|
263
|
+
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
264
|
+
waitUntil: ctx.waitUntil,
|
|
265
|
+
onClose: (cb)=>{
|
|
266
|
+
res.on('close', cb);
|
|
267
|
+
},
|
|
268
|
+
onAfterTaskError: undefined
|
|
269
|
+
},
|
|
270
|
+
sharedContext: {
|
|
271
|
+
buildId,
|
|
272
|
+
deploymentId
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
276
|
+
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
277
|
+
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));
|
|
278
|
+
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
279
|
+
try {
|
|
280
|
+
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
281
|
+
res.statusCode = 404;
|
|
282
|
+
// on-demand revalidate always sets this header
|
|
283
|
+
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
284
|
+
res.end('This page could not be found');
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
288
|
+
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
289
|
+
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
290
|
+
// Attempt using provided waitUntil if available
|
|
291
|
+
// if it's not we fallback to sendResponse's handling
|
|
292
|
+
if (pendingWaitUntil) {
|
|
293
|
+
if (ctx.waitUntil) {
|
|
294
|
+
ctx.waitUntil(pendingWaitUntil);
|
|
295
|
+
pendingWaitUntil = undefined;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
const cacheTags = context.renderOpts.collectedTags;
|
|
299
|
+
// If the request is for a static response, we can cache it so long
|
|
300
|
+
// as it's not edge.
|
|
301
|
+
if (isIsr) {
|
|
302
|
+
const blob = await response.blob();
|
|
303
|
+
// Copy the headers from the response.
|
|
304
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
305
|
+
if (cacheTags) {
|
|
306
|
+
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
307
|
+
}
|
|
308
|
+
if (!headers['content-type'] && blob.type) {
|
|
309
|
+
headers['content-type'] = blob.type;
|
|
310
|
+
}
|
|
311
|
+
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
312
|
+
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
|
|
313
|
+
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
314
|
+
// build-time fallback in `build/index.ts` so cache entries
|
|
315
|
+
// and the response Cache-Control header agree on the route's
|
|
316
|
+
// effective expire. Routes that opt out of revalidation
|
|
317
|
+
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
318
|
+
// keep `expire: undefined`.
|
|
319
|
+
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
320
|
+
// Create the cache entry for the response.
|
|
321
|
+
const cacheEntry = {
|
|
322
|
+
value: {
|
|
323
|
+
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
324
|
+
status: response.status,
|
|
325
|
+
body: Buffer.from(await blob.arrayBuffer()),
|
|
326
|
+
headers
|
|
327
|
+
},
|
|
328
|
+
cacheControl: {
|
|
329
|
+
revalidate,
|
|
330
|
+
expire
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
return cacheEntry;
|
|
334
|
+
} else {
|
|
335
|
+
// send response without caching if not ISR
|
|
336
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
337
|
+
return null;
|
|
338
|
+
}
|
|
339
|
+
} catch (err) {
|
|
340
|
+
// if this is a background revalidate we need to report
|
|
341
|
+
// the request error here as it won't be bubbled
|
|
342
|
+
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
343
|
+
const silenceLog = false;
|
|
344
|
+
await routeModule.onRequestError(req, err, {
|
|
345
|
+
routerKind: 'App Router',
|
|
346
|
+
routePath: srcPage,
|
|
347
|
+
routeType: 'route',
|
|
348
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
349
|
+
isStaticGeneration: cacheKey !== null,
|
|
350
|
+
isOnDemandRevalidate
|
|
351
|
+
})
|
|
352
|
+
}, silenceLog, routerServerContext);
|
|
353
|
+
}
|
|
354
|
+
throw err;
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
const handleResponse = async (currentSpan, parentSpan)=>{
|
|
358
|
+
try {
|
|
359
|
+
var _cacheEntry_value;
|
|
360
|
+
const cacheEntry = await routeModule.handleResponse({
|
|
361
|
+
req,
|
|
362
|
+
nextConfig,
|
|
363
|
+
cacheKey,
|
|
364
|
+
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
365
|
+
isFallback: false,
|
|
366
|
+
previewProps,
|
|
367
|
+
prerenderManifest,
|
|
368
|
+
isRoutePPREnabled: false,
|
|
369
|
+
isOnDemandRevalidate,
|
|
370
|
+
revalidateOnlyGenerated,
|
|
371
|
+
responseGenerator,
|
|
372
|
+
waitUntil: ctx.waitUntil,
|
|
373
|
+
isMinimalMode
|
|
374
|
+
});
|
|
375
|
+
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
376
|
+
throw cacheEntry.error;
|
|
377
|
+
}
|
|
378
|
+
// we don't create a cacheEntry for ISR
|
|
379
|
+
if (!isIsr) {
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
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) {
|
|
383
|
+
var _cacheEntry_value1;
|
|
384
|
+
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
385
|
+
}
|
|
386
|
+
if (!isMinimalMode) {
|
|
387
|
+
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
388
|
+
}
|
|
389
|
+
// Draft mode should never be cached
|
|
390
|
+
if (isDraftMode) {
|
|
391
|
+
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
392
|
+
}
|
|
393
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
394
|
+
if (!(isMinimalMode && isIsr)) {
|
|
395
|
+
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
396
|
+
}
|
|
397
|
+
// If cache control is already set on the response we don't
|
|
398
|
+
// override it to allow users to customize it via next.config
|
|
399
|
+
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
400
|
+
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
401
|
+
}
|
|
402
|
+
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'.
|
|
403
|
+
new Response(cacheEntry.value.body, {
|
|
404
|
+
headers,
|
|
405
|
+
status: cacheEntry.value.status || 200
|
|
406
|
+
}));
|
|
407
|
+
return;
|
|
408
|
+
} catch (err) {
|
|
409
|
+
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
410
|
+
const silenceLog = false;
|
|
411
|
+
await routeModule.onRequestError(req, err, {
|
|
412
|
+
routerKind: 'App Router',
|
|
413
|
+
routePath: normalizedSrcPage,
|
|
414
|
+
routeType: 'route',
|
|
415
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
416
|
+
isStaticGeneration: cacheKey !== null,
|
|
417
|
+
isOnDemandRevalidate
|
|
418
|
+
})
|
|
419
|
+
}, silenceLog, routerServerContext);
|
|
420
|
+
}
|
|
421
|
+
// rethrow so that we can handle serving error page
|
|
422
|
+
// If this is during static generation, throw the error again.
|
|
423
|
+
if (isIsr) throw err;
|
|
424
|
+
// Otherwise, send a 500 response unless the original response has
|
|
425
|
+
// already committed. In that case, preserve its status code for
|
|
426
|
+
// telemetry while still recording the failure and terminating a response
|
|
427
|
+
// that the failed pipeline left open.
|
|
428
|
+
if (res.headersSent) {
|
|
429
|
+
if (currentSpan) {
|
|
430
|
+
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
431
|
+
currentSpan.recordException(error);
|
|
432
|
+
currentSpan.setStatus({
|
|
433
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
434
|
+
message: error.message
|
|
435
|
+
});
|
|
436
|
+
currentSpan.setAttribute('error.type', error.name);
|
|
437
|
+
}
|
|
438
|
+
if (!res.writableEnded && !res.destroyed) {
|
|
439
|
+
res.end();
|
|
440
|
+
}
|
|
441
|
+
} else {
|
|
442
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
443
|
+
status: 500
|
|
444
|
+
}));
|
|
445
|
+
}
|
|
446
|
+
return;
|
|
447
|
+
} finally{
|
|
448
|
+
;
|
|
449
|
+
(()=>{
|
|
450
|
+
if (!currentSpan) {
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
let statusCode = res.statusCode;
|
|
454
|
+
currentSpan.setAttributes({
|
|
455
|
+
'http.status_code': statusCode,
|
|
456
|
+
'next.rsc': false
|
|
457
|
+
});
|
|
458
|
+
if (statusCode && statusCode >= 500) {
|
|
459
|
+
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
460
|
+
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
461
|
+
currentSpan.setStatus({
|
|
462
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
463
|
+
});
|
|
464
|
+
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
465
|
+
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
466
|
+
}
|
|
467
|
+
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
468
|
+
// We were unable to get attributes, probably OTEL is not enabled
|
|
469
|
+
if (!rootSpanAttributes) {
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
473
|
+
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
477
|
+
const name = `${method} ${route}`;
|
|
478
|
+
currentSpan.setAttributes({
|
|
479
|
+
'next.route': route,
|
|
480
|
+
'http.route': route,
|
|
481
|
+
'next.span_name': name
|
|
482
|
+
});
|
|
483
|
+
currentSpan.updateName(name);
|
|
484
|
+
// Propagate http.route to the parent span if one exists (e.g.
|
|
485
|
+
// a platform-created HTTP span in adapter deployments).
|
|
486
|
+
if (parentSpan && parentSpan !== currentSpan) {
|
|
487
|
+
parentSpan.setAttribute('http.route', route);
|
|
488
|
+
parentSpan.updateName(name);
|
|
489
|
+
}
|
|
490
|
+
})();
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
// TODO: activeSpan code path is for when wrapped by
|
|
494
|
+
// next-server can be removed when this is no longer used
|
|
495
|
+
if (isWrappedByNextServer && activeSpan) {
|
|
496
|
+
await handleResponse(activeSpan, undefined);
|
|
497
|
+
} else {
|
|
498
|
+
let parentSpan = tracer.getActiveScopeSpan();
|
|
499
|
+
await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
|
|
500
|
+
spanName: `${method} ${srcPage}`,
|
|
501
|
+
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
|
|
502
|
+
attributes: {
|
|
503
|
+
'http.method': method,
|
|
504
|
+
'http.target': req.url
|
|
505
|
+
}
|
|
506
|
+
}, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
//# sourceMappingURL=app-route.js.map
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
/***/ }),
|
|
514
|
+
|
|
515
|
+
/***/ 27910:
|
|
516
|
+
/***/ ((module) => {
|
|
517
|
+
|
|
518
|
+
module.exports = require("stream");
|
|
519
|
+
|
|
520
|
+
/***/ }),
|
|
521
|
+
|
|
522
|
+
/***/ 28354:
|
|
523
|
+
/***/ ((module) => {
|
|
524
|
+
|
|
525
|
+
module.exports = require("util");
|
|
526
|
+
|
|
527
|
+
/***/ }),
|
|
528
|
+
|
|
529
|
+
/***/ 29021:
|
|
530
|
+
/***/ ((module) => {
|
|
531
|
+
|
|
532
|
+
module.exports = require("fs");
|
|
533
|
+
|
|
534
|
+
/***/ }),
|
|
535
|
+
|
|
536
|
+
/***/ 29294:
|
|
537
|
+
/***/ ((module) => {
|
|
538
|
+
|
|
539
|
+
module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
|
|
540
|
+
|
|
541
|
+
/***/ }),
|
|
542
|
+
|
|
543
|
+
/***/ 31421:
|
|
544
|
+
/***/ ((module) => {
|
|
545
|
+
|
|
546
|
+
module.exports = require("node:child_process");
|
|
547
|
+
|
|
548
|
+
/***/ }),
|
|
549
|
+
|
|
550
|
+
/***/ 33873:
|
|
551
|
+
/***/ ((module) => {
|
|
552
|
+
|
|
553
|
+
module.exports = require("path");
|
|
554
|
+
|
|
555
|
+
/***/ }),
|
|
556
|
+
|
|
557
|
+
/***/ 37067:
|
|
558
|
+
/***/ ((module) => {
|
|
559
|
+
|
|
560
|
+
module.exports = require("node:http");
|
|
561
|
+
|
|
562
|
+
/***/ }),
|
|
563
|
+
|
|
564
|
+
/***/ 38522:
|
|
565
|
+
/***/ ((module) => {
|
|
566
|
+
|
|
567
|
+
module.exports = require("node:zlib");
|
|
568
|
+
|
|
569
|
+
/***/ }),
|
|
570
|
+
|
|
571
|
+
/***/ 41720:
|
|
572
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
573
|
+
|
|
574
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
575
|
+
/* harmony export */ BM: () => (/* binding */ upsertAgentConfig),
|
|
576
|
+
/* harmony export */ E1: () => (/* binding */ updateAgentDisplayFilters),
|
|
577
|
+
/* harmony export */ P2: () => (/* binding */ parseCitationStrictness),
|
|
578
|
+
/* harmony export */ S2: () => (/* binding */ getAgentToolCredentials),
|
|
579
|
+
/* harmony export */ SJ: () => (/* binding */ generateAgentId),
|
|
580
|
+
/* harmony export */ TG: () => (/* binding */ getAgentTools),
|
|
581
|
+
/* harmony export */ bg: () => (/* binding */ parseDelegateTargets),
|
|
582
|
+
/* harmony export */ d2: () => (/* binding */ DISPLAY_FILTER_KEYS),
|
|
583
|
+
/* harmony export */ fg: () => (/* binding */ getAgentTierProportions),
|
|
584
|
+
/* harmony export */ mJ: () => (/* binding */ getAgentConfig),
|
|
585
|
+
/* harmony export */ nV: () => (/* binding */ getAgentDisplayFilters),
|
|
586
|
+
/* harmony export */ vU: () => (/* binding */ getDefaultAgentConfig),
|
|
587
|
+
/* harmony export */ vi: () => (/* binding */ DISPLAY_FILTER_DEFAULTS),
|
|
588
|
+
/* harmony export */ xi: () => (/* binding */ deleteAgentConfig),
|
|
589
|
+
/* harmony export */ zb: () => (/* binding */ listAgentConfigs)
|
|
590
|
+
/* harmony export */ });
|
|
591
|
+
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
|
|
592
|
+
/* harmony import */ var _lib_db_transaction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99043);
|
|
593
|
+
/* harmony import */ var _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66849);
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
const now = ()=>new Date().toISOString();
|
|
598
|
+
/** Coerce arbitrary input (DB row TEXT, API body, undefined) to the enum.
|
|
599
|
+
* Returns `null` for null/undefined/unknown values so callers can default. */ function parseCitationStrictness(value) {
|
|
600
|
+
if (value === "off" || value === "informational" || value === "standard" || value === "strict") {
|
|
601
|
+
return value;
|
|
602
|
+
}
|
|
603
|
+
return null;
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Parse the JSON-encoded per-agent override of context tier proportions.
|
|
607
|
+
* Returns `null` for NULL, blank, malformed JSON, or any payload that
|
|
608
|
+
* doesn't have three finite non-negative numeric fields. Callers fall
|
|
609
|
+
* back to the model config's value (or built-in defaults) on null.
|
|
610
|
+
*/ function getAgentTierProportions(row) {
|
|
611
|
+
const raw = row.context_tier_proportions;
|
|
612
|
+
if (!raw) return null;
|
|
613
|
+
try {
|
|
614
|
+
const parsed = JSON.parse(raw);
|
|
615
|
+
const hot = Number(parsed.hot);
|
|
616
|
+
const warm = Number(parsed.warm);
|
|
617
|
+
const facts = Number(parsed.facts);
|
|
618
|
+
if (![
|
|
619
|
+
hot,
|
|
620
|
+
warm,
|
|
621
|
+
facts
|
|
622
|
+
].every((n)=>Number.isFinite(n) && n >= 0)) return null;
|
|
623
|
+
if (hot + warm + facts <= 0) return null;
|
|
624
|
+
return {
|
|
625
|
+
hot,
|
|
626
|
+
warm,
|
|
627
|
+
facts
|
|
628
|
+
};
|
|
629
|
+
} catch {
|
|
630
|
+
return null;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
function listAgentConfigs() {
|
|
634
|
+
// Default agent always first; then by the timestamp of each agent's latest message.
|
|
635
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare(`SELECT a.*
|
|
636
|
+
FROM agent_configs a
|
|
637
|
+
LEFT JOIN (
|
|
638
|
+
SELECT t.agent_id, MAX(m.created_at) AS last_message_at
|
|
639
|
+
FROM threads t
|
|
640
|
+
JOIN messages m ON m.thread_id = t.thread_id
|
|
641
|
+
GROUP BY t.agent_id
|
|
642
|
+
) latest ON latest.agent_id = a.id
|
|
643
|
+
ORDER BY a.is_default DESC, COALESCE(latest.last_message_at, a.created_at) DESC, a.id ASC`).all();
|
|
644
|
+
}
|
|
645
|
+
function getDefaultAgentConfig() {
|
|
646
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE is_default=1 LIMIT 1").get() ?? null;
|
|
647
|
+
}
|
|
648
|
+
function getAgentConfig(id) {
|
|
649
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE id=?").get(id) ?? null;
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Parse the JSON-encoded delegate whitelist into a deduped string[]. Returns
|
|
653
|
+
* an empty array for NULL, blank, or malformed JSON (delegation is opt-in).
|
|
654
|
+
*/ /**
|
|
655
|
+
* Parse the agent's tool allowlist (`tools` column, stored as a JSON string).
|
|
656
|
+
* Returns an empty array on NULL/blank/malformed JSON — same defensive shape
|
|
657
|
+
* as parseDelegateTargets. Callers that previously did `JSON.parse(cfg.tools)`
|
|
658
|
+
* inline should switch to this getter so the serialization contract stays
|
|
659
|
+
* owned by this store.
|
|
660
|
+
*/ function getAgentTools(cfg) {
|
|
661
|
+
if (!cfg?.tools) return [];
|
|
662
|
+
try {
|
|
663
|
+
const parsed = JSON.parse(cfg.tools);
|
|
664
|
+
if (!Array.isArray(parsed)) return [];
|
|
665
|
+
return parsed.filter((x)=>typeof x === "string" && x.length > 0);
|
|
666
|
+
} catch {
|
|
667
|
+
return [];
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
function parseDelegateTargets(raw) {
|
|
671
|
+
if (!raw) return [];
|
|
672
|
+
try {
|
|
673
|
+
const parsed = JSON.parse(raw);
|
|
674
|
+
if (!Array.isArray(parsed)) return [];
|
|
675
|
+
const ids = parsed.filter((x)=>typeof x === "string" && x.length > 0);
|
|
676
|
+
return Array.from(new Set(ids));
|
|
677
|
+
} catch {
|
|
678
|
+
return [];
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Parse the per-agent `{ toolName: credentialId }` override map stored in
|
|
683
|
+
* the `tool_credentials` column. Returns an empty record on NULL / blank /
|
|
684
|
+
* malformed JSON / non-string entries so downstream code can treat the
|
|
685
|
+
* result as a plain lookup without further validation.
|
|
686
|
+
*/ function getAgentToolCredentials(cfg) {
|
|
687
|
+
if (!cfg?.tool_credentials) return {};
|
|
688
|
+
try {
|
|
689
|
+
const parsed = JSON.parse(cfg.tool_credentials);
|
|
690
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
691
|
+
const out = {};
|
|
248
692
|
for (const [k, v] of Object.entries(parsed)){
|
|
249
693
|
if (typeof v === "string" && v.length > 0) out[k] = v;
|
|
250
694
|
}
|
|
@@ -415,617 +859,173 @@ function getAgentDisplayFilters(id) {
|
|
|
415
859
|
}
|
|
416
860
|
(0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("UPDATE agent_configs SET display_filters=?, updated_at=? WHERE id=?").run(JSON.stringify(next), now(), id);
|
|
417
861
|
return next;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
/***/ }),
|
|
422
|
-
|
|
423
|
-
/***/ 44708:
|
|
424
|
-
/***/ ((module) => {
|
|
425
|
-
|
|
426
|
-
module.exports = require("node:https");
|
|
427
|
-
|
|
428
|
-
/***/ }),
|
|
429
|
-
|
|
430
|
-
/***/ 44870:
|
|
431
|
-
/***/ ((module) => {
|
|
432
|
-
|
|
433
|
-
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
434
|
-
|
|
435
|
-
/***/ }),
|
|
436
|
-
|
|
437
|
-
/***/ 48161:
|
|
438
|
-
/***/ ((module) => {
|
|
439
|
-
|
|
440
|
-
module.exports = require("node:os");
|
|
441
|
-
|
|
442
|
-
/***/ }),
|
|
443
|
-
|
|
444
|
-
/***/ 51455:
|
|
445
|
-
/***/ ((module) => {
|
|
446
|
-
|
|
447
|
-
module.exports = require("node:fs/promises");
|
|
448
|
-
|
|
449
|
-
/***/ }),
|
|
450
|
-
|
|
451
|
-
/***/ 55511:
|
|
452
|
-
/***/ ((module) => {
|
|
453
|
-
|
|
454
|
-
module.exports = require("crypto");
|
|
455
|
-
|
|
456
|
-
/***/ }),
|
|
457
|
-
|
|
458
|
-
/***/ 55591:
|
|
459
|
-
/***/ ((module) => {
|
|
460
|
-
|
|
461
|
-
module.exports = require("https");
|
|
462
|
-
|
|
463
|
-
/***/ }),
|
|
464
|
-
|
|
465
|
-
/***/ 57075:
|
|
466
|
-
/***/ ((module) => {
|
|
467
|
-
|
|
468
|
-
module.exports = require("node:stream");
|
|
469
|
-
|
|
470
|
-
/***/ }),
|
|
471
|
-
|
|
472
|
-
/***/ 57870:
|
|
473
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
474
|
-
|
|
475
|
-
__webpack_require__.r(__webpack_exports__);
|
|
476
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
477
|
-
/* harmony export */ DELETE: () => (/* binding */ DELETE),
|
|
478
|
-
/* harmony export */ PATCH: () => (/* binding */ PATCH)
|
|
479
|
-
/* harmony export */ });
|
|
480
|
-
/* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
481
|
-
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97377);
|
|
482
|
-
/* harmony import */ var _lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(78361);
|
|
483
|
-
/* harmony import */ var _lib_stores_agent_configs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41720);
|
|
484
|
-
/* harmony import */ var _lib_utils_error__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22032);
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
function toResponse(r) {
|
|
491
|
-
return {
|
|
492
|
-
id: r.id,
|
|
493
|
-
bridge_id: r.bridge_id,
|
|
494
|
-
remote_jid: r.remote_jid,
|
|
495
|
-
agent_id: r.agent_id,
|
|
496
|
-
label: r.label,
|
|
497
|
-
silent_mode: r.silent_mode === 1,
|
|
498
|
-
respond_to: r.respond_to,
|
|
499
|
-
created_at: r.created_at,
|
|
500
|
-
updated_at: r.updated_at
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
|
-
const RouteJidSchema = zod__WEBPACK_IMPORTED_MODULE_3__/* .union */ .KCZ([
|
|
504
|
-
zod__WEBPACK_IMPORTED_MODULE_3__/* .literal */ .euz("*"),
|
|
505
|
-
zod__WEBPACK_IMPORTED_MODULE_3__/* .string */ .YjP().trim().min(3)
|
|
506
|
-
]);
|
|
507
|
-
const PatchSchema = zod__WEBPACK_IMPORTED_MODULE_3__/* .object */ .Ikc({
|
|
508
|
-
remote_jid: RouteJidSchema.optional(),
|
|
509
|
-
agent_id: zod__WEBPACK_IMPORTED_MODULE_3__/* .string */ .YjP().trim().min(1).optional(),
|
|
510
|
-
label: zod__WEBPACK_IMPORTED_MODULE_3__/* .string */ .YjP().trim().max(120).nullable().optional(),
|
|
511
|
-
silent_mode: zod__WEBPACK_IMPORTED_MODULE_3__/* .boolean */ .zMY().optional(),
|
|
512
|
-
respond_to: zod__WEBPACK_IMPORTED_MODULE_3__/* ["enum"] */ .k5n([
|
|
513
|
-
"user",
|
|
514
|
-
"counterpart"
|
|
515
|
-
]).optional()
|
|
516
|
-
});
|
|
517
|
-
async function PATCH(req, { params }) {
|
|
518
|
-
const { route_id } = await params;
|
|
519
|
-
const existing = (0,_lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__/* .getRoute */ .aM)(route_id);
|
|
520
|
-
if (!existing) return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
521
|
-
error: "not found"
|
|
522
|
-
}, {
|
|
523
|
-
status: 404
|
|
524
|
-
});
|
|
525
|
-
const parsed = PatchSchema.safeParse(await req.json().catch(()=>({})));
|
|
526
|
-
if (!parsed.success) {
|
|
527
|
-
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
528
|
-
error: parsed.error.issues[0]?.message ?? "invalid body"
|
|
529
|
-
}, {
|
|
530
|
-
status: 400
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
if (parsed.data.agent_id && !(0,_lib_stores_agent_configs__WEBPACK_IMPORTED_MODULE_2__/* .getAgentConfig */ .mJ)(parsed.data.agent_id)) {
|
|
534
|
-
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
535
|
-
error: `agent ${parsed.data.agent_id} not found`
|
|
536
|
-
}, {
|
|
537
|
-
status: 400
|
|
538
|
-
});
|
|
539
|
-
}
|
|
540
|
-
try {
|
|
541
|
-
const updated = (0,_lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__/* .updateRoute */ .DL)(route_id, parsed.data);
|
|
542
|
-
if (!updated) return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
543
|
-
error: "update failed"
|
|
544
|
-
}, {
|
|
545
|
-
status: 500
|
|
546
|
-
});
|
|
547
|
-
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(toResponse(updated));
|
|
548
|
-
} catch (err) {
|
|
549
|
-
const m = (0,_lib_utils_error__WEBPACK_IMPORTED_MODULE_4__/* .errorMessage */ .g)(err);
|
|
550
|
-
if (/UNIQUE/.test(m)) {
|
|
551
|
-
const reason = /agent_id/.test(m) ? "That agent is already the target of another route." : "That chat is already routed.";
|
|
552
|
-
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
553
|
-
error: reason
|
|
554
|
-
}, {
|
|
555
|
-
status: 409
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
throw err;
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
async function DELETE(_req, { params }) {
|
|
562
|
-
const { route_id } = await params;
|
|
563
|
-
const ok = (0,_lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__/* .deleteRoute */ .V7)(route_id);
|
|
564
|
-
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
565
|
-
deleted: ok
|
|
566
|
-
}, {
|
|
567
|
-
status: ok ? 200 : 404
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
/***/ }),
|
|
573
|
-
|
|
574
|
-
/***/ 57975:
|
|
575
|
-
/***/ ((module) => {
|
|
576
|
-
|
|
577
|
-
module.exports = require("node:util");
|
|
578
|
-
|
|
579
|
-
/***/ }),
|
|
580
|
-
|
|
581
|
-
/***/ 63033:
|
|
582
|
-
/***/ ((module) => {
|
|
583
|
-
|
|
584
|
-
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
585
|
-
|
|
586
|
-
/***/ }),
|
|
587
|
-
|
|
588
|
-
/***/ 64915:
|
|
589
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
590
|
-
|
|
591
|
-
__webpack_require__.r(__webpack_exports__);
|
|
592
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
593
|
-
/* harmony export */ handler: () => (/* binding */ handler),
|
|
594
|
-
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
595
|
-
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
596
|
-
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
597
|
-
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
598
|
-
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
599
|
-
/* harmony export */ });
|
|
600
|
-
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
|
|
601
|
-
/* 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__);
|
|
602
|
-
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
|
|
603
|
-
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
604
|
-
/* 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__);
|
|
605
|
-
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
|
|
606
|
-
/* 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__);
|
|
607
|
-
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
|
|
608
|
-
/* 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__);
|
|
609
|
-
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
|
|
610
|
-
/* 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__);
|
|
611
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
612
|
-
/* 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__);
|
|
613
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
614
|
-
/* 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__);
|
|
615
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
616
|
-
/* 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__);
|
|
617
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
618
|
-
/* 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__);
|
|
619
|
-
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
620
|
-
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
621
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
622
|
-
/* 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__);
|
|
623
|
-
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
624
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
625
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
626
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
627
|
-
/* 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__);
|
|
628
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
629
|
-
/* 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__);
|
|
630
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
631
|
-
/* 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__);
|
|
862
|
+
}
|
|
632
863
|
|
|
633
864
|
|
|
865
|
+
/***/ }),
|
|
634
866
|
|
|
867
|
+
/***/ 44708:
|
|
868
|
+
/***/ ((module) => {
|
|
635
869
|
|
|
870
|
+
module.exports = require("node:https");
|
|
636
871
|
|
|
872
|
+
/***/ }),
|
|
637
873
|
|
|
874
|
+
/***/ 44870:
|
|
875
|
+
/***/ ((module) => {
|
|
638
876
|
|
|
877
|
+
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
639
878
|
|
|
879
|
+
/***/ }),
|
|
640
880
|
|
|
881
|
+
/***/ 48161:
|
|
882
|
+
/***/ ((module) => {
|
|
641
883
|
|
|
884
|
+
module.exports = require("node:os");
|
|
642
885
|
|
|
886
|
+
/***/ }),
|
|
643
887
|
|
|
888
|
+
/***/ 51455:
|
|
889
|
+
/***/ ((module) => {
|
|
644
890
|
|
|
891
|
+
module.exports = require("node:fs/promises");
|
|
645
892
|
|
|
893
|
+
/***/ }),
|
|
646
894
|
|
|
895
|
+
/***/ 55511:
|
|
896
|
+
/***/ ((module) => {
|
|
647
897
|
|
|
898
|
+
module.exports = require("crypto");
|
|
648
899
|
|
|
900
|
+
/***/ }),
|
|
649
901
|
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
const nextConfigOutput = "standalone"
|
|
653
|
-
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
654
|
-
definition: {
|
|
655
|
-
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
656
|
-
page: "/api/v1/bridges/[id]/routes/[route_id]/route",
|
|
657
|
-
pathname: "/api/v1/bridges/[id]/routes/[route_id]",
|
|
658
|
-
filename: "route",
|
|
659
|
-
bundlePath: "app/api/v1/bridges/[id]/routes/[route_id]/route"
|
|
660
|
-
},
|
|
661
|
-
distDir: ".next" || 0,
|
|
662
|
-
relativeProjectDir: false || '',
|
|
663
|
-
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/bridges/[id]/routes/[route_id]/route.ts",
|
|
664
|
-
nextConfigOutput,
|
|
665
|
-
// The lazy require factory ensures that:
|
|
666
|
-
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
667
|
-
// correctly attributing module load time to application-code rather than
|
|
668
|
-
// framework internals.
|
|
669
|
-
// - In all modes: async modules (route files with top-level await) are
|
|
670
|
-
// handled correctly — require() returns a Promise for such modules, which
|
|
671
|
-
// ensureUserland() awaits before the first request is handled.
|
|
672
|
-
userland: ()=>__webpack_require__(57870),
|
|
673
|
-
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
674
|
-
// server HMR updates are picked up without re-executing the entry chunk.
|
|
675
|
-
// Using require() (synchronous) avoids adding async overhead that would be
|
|
676
|
-
// incorrectly attributed to application-code time in devRequestTiming.
|
|
677
|
-
... false ? 0 : {}
|
|
678
|
-
});
|
|
679
|
-
// Pull out the exports that we need to expose from the module. This should
|
|
680
|
-
// be eliminated when we've moved the other routes to the new format. These
|
|
681
|
-
// are used to hook into the route.
|
|
682
|
-
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
683
|
-
function patchFetch() {
|
|
684
|
-
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
685
|
-
workAsyncStorage,
|
|
686
|
-
workUnitAsyncStorage
|
|
687
|
-
});
|
|
688
|
-
}
|
|
902
|
+
/***/ 55591:
|
|
903
|
+
/***/ ((module) => {
|
|
689
904
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
if (isIsr && !isDraftMode) {
|
|
731
|
-
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
732
|
-
if (prerenderInfo) {
|
|
733
|
-
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
734
|
-
if (nextConfig.adapterPath) {
|
|
735
|
-
return await render404();
|
|
736
|
-
}
|
|
737
|
-
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
let cacheKey = null;
|
|
742
|
-
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
743
|
-
cacheKey = resolvedPathname;
|
|
744
|
-
// ensure /index and / is normalized to one key
|
|
745
|
-
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
746
|
-
}
|
|
747
|
-
// Before rendering (which initializes component tree modules), we have to
|
|
748
|
-
// set the reference manifests to our global store so Server Action's
|
|
749
|
-
// encryption util can access to them at the top level of the page module.
|
|
750
|
-
if (serverActionsManifest && clientReferenceManifest) {
|
|
751
|
-
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
752
|
-
page: srcPage,
|
|
753
|
-
clientReferenceManifest,
|
|
754
|
-
serverActionsManifest
|
|
755
|
-
});
|
|
756
|
-
}
|
|
757
|
-
const method = req.method || 'GET';
|
|
758
|
-
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
759
|
-
const activeSpan = tracer.getActiveScopeSpan();
|
|
760
|
-
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
761
|
-
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
762
|
-
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
763
|
-
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
764
|
-
globalThis.__incrementalCache = incrementalCache;
|
|
765
|
-
const context = {
|
|
766
|
-
params,
|
|
767
|
-
previewProps,
|
|
768
|
-
renderOpts: {
|
|
769
|
-
experimental: {
|
|
770
|
-
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
771
|
-
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
772
|
-
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
773
|
-
},
|
|
774
|
-
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
775
|
-
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
776
|
-
isDraftMode,
|
|
777
|
-
incrementalCache,
|
|
778
|
-
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
779
|
-
cacheLifeProfiles: nextConfig.cacheLife,
|
|
780
|
-
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
781
|
-
waitUntil: ctx.waitUntil,
|
|
782
|
-
onClose: (cb)=>{
|
|
783
|
-
res.on('close', cb);
|
|
784
|
-
},
|
|
785
|
-
onAfterTaskError: undefined
|
|
786
|
-
},
|
|
787
|
-
sharedContext: {
|
|
788
|
-
buildId,
|
|
789
|
-
deploymentId
|
|
790
|
-
}
|
|
791
|
-
};
|
|
792
|
-
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
793
|
-
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
794
|
-
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));
|
|
795
|
-
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
796
|
-
try {
|
|
797
|
-
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
798
|
-
res.statusCode = 404;
|
|
799
|
-
// on-demand revalidate always sets this header
|
|
800
|
-
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
801
|
-
res.end('This page could not be found');
|
|
802
|
-
return null;
|
|
803
|
-
}
|
|
804
|
-
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
805
|
-
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
806
|
-
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
807
|
-
// Attempt using provided waitUntil if available
|
|
808
|
-
// if it's not we fallback to sendResponse's handling
|
|
809
|
-
if (pendingWaitUntil) {
|
|
810
|
-
if (ctx.waitUntil) {
|
|
811
|
-
ctx.waitUntil(pendingWaitUntil);
|
|
812
|
-
pendingWaitUntil = undefined;
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
const cacheTags = context.renderOpts.collectedTags;
|
|
816
|
-
// If the request is for a static response, we can cache it so long
|
|
817
|
-
// as it's not edge.
|
|
818
|
-
if (isIsr) {
|
|
819
|
-
const blob = await response.blob();
|
|
820
|
-
// Copy the headers from the response.
|
|
821
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
822
|
-
if (cacheTags) {
|
|
823
|
-
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
824
|
-
}
|
|
825
|
-
if (!headers['content-type'] && blob.type) {
|
|
826
|
-
headers['content-type'] = blob.type;
|
|
827
|
-
}
|
|
828
|
-
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
829
|
-
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
|
|
830
|
-
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
831
|
-
// build-time fallback in `build/index.ts` so cache entries
|
|
832
|
-
// and the response Cache-Control header agree on the route's
|
|
833
|
-
// effective expire. Routes that opt out of revalidation
|
|
834
|
-
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
835
|
-
// keep `expire: undefined`.
|
|
836
|
-
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
837
|
-
// Create the cache entry for the response.
|
|
838
|
-
const cacheEntry = {
|
|
839
|
-
value: {
|
|
840
|
-
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
841
|
-
status: response.status,
|
|
842
|
-
body: Buffer.from(await blob.arrayBuffer()),
|
|
843
|
-
headers
|
|
844
|
-
},
|
|
845
|
-
cacheControl: {
|
|
846
|
-
revalidate,
|
|
847
|
-
expire
|
|
848
|
-
}
|
|
849
|
-
};
|
|
850
|
-
return cacheEntry;
|
|
851
|
-
} else {
|
|
852
|
-
// send response without caching if not ISR
|
|
853
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
854
|
-
return null;
|
|
855
|
-
}
|
|
856
|
-
} catch (err) {
|
|
857
|
-
// if this is a background revalidate we need to report
|
|
858
|
-
// the request error here as it won't be bubbled
|
|
859
|
-
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
860
|
-
const silenceLog = false;
|
|
861
|
-
await routeModule.onRequestError(req, err, {
|
|
862
|
-
routerKind: 'App Router',
|
|
863
|
-
routePath: srcPage,
|
|
864
|
-
routeType: 'route',
|
|
865
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
866
|
-
isStaticGeneration: cacheKey !== null,
|
|
867
|
-
isOnDemandRevalidate
|
|
868
|
-
})
|
|
869
|
-
}, silenceLog, routerServerContext);
|
|
870
|
-
}
|
|
871
|
-
throw err;
|
|
872
|
-
}
|
|
905
|
+
module.exports = require("https");
|
|
906
|
+
|
|
907
|
+
/***/ }),
|
|
908
|
+
|
|
909
|
+
/***/ 57075:
|
|
910
|
+
/***/ ((module) => {
|
|
911
|
+
|
|
912
|
+
module.exports = require("node:stream");
|
|
913
|
+
|
|
914
|
+
/***/ }),
|
|
915
|
+
|
|
916
|
+
/***/ 57870:
|
|
917
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
918
|
+
|
|
919
|
+
__webpack_require__.r(__webpack_exports__);
|
|
920
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
921
|
+
/* harmony export */ DELETE: () => (/* binding */ DELETE),
|
|
922
|
+
/* harmony export */ PATCH: () => (/* binding */ PATCH)
|
|
923
|
+
/* harmony export */ });
|
|
924
|
+
/* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
925
|
+
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97377);
|
|
926
|
+
/* harmony import */ var _lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(78361);
|
|
927
|
+
/* harmony import */ var _lib_stores_agent_configs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41720);
|
|
928
|
+
/* harmony import */ var _lib_utils_error__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22032);
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
function toResponse(r) {
|
|
935
|
+
return {
|
|
936
|
+
id: r.id,
|
|
937
|
+
bridge_id: r.bridge_id,
|
|
938
|
+
remote_jid: r.remote_jid,
|
|
939
|
+
agent_id: r.agent_id,
|
|
940
|
+
label: r.label,
|
|
941
|
+
silent_mode: r.silent_mode === 1,
|
|
942
|
+
respond_to: r.respond_to,
|
|
943
|
+
created_at: r.created_at,
|
|
944
|
+
updated_at: r.updated_at
|
|
873
945
|
};
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
946
|
+
}
|
|
947
|
+
const RouteJidSchema = zod__WEBPACK_IMPORTED_MODULE_3__/* .union */ .KCZ([
|
|
948
|
+
zod__WEBPACK_IMPORTED_MODULE_3__/* .literal */ .euz("*"),
|
|
949
|
+
zod__WEBPACK_IMPORTED_MODULE_3__/* .string */ .YjP().trim().min(3)
|
|
950
|
+
]);
|
|
951
|
+
const PatchSchema = zod__WEBPACK_IMPORTED_MODULE_3__/* .object */ .Ikc({
|
|
952
|
+
remote_jid: RouteJidSchema.optional(),
|
|
953
|
+
agent_id: zod__WEBPACK_IMPORTED_MODULE_3__/* .string */ .YjP().trim().min(1).optional(),
|
|
954
|
+
label: zod__WEBPACK_IMPORTED_MODULE_3__/* .string */ .YjP().trim().max(120).nullable().optional(),
|
|
955
|
+
silent_mode: zod__WEBPACK_IMPORTED_MODULE_3__/* .boolean */ .zMY().optional(),
|
|
956
|
+
respond_to: zod__WEBPACK_IMPORTED_MODULE_3__/* ["enum"] */ .k5n([
|
|
957
|
+
"user",
|
|
958
|
+
"counterpart"
|
|
959
|
+
]).optional()
|
|
960
|
+
});
|
|
961
|
+
async function PATCH(req, { params }) {
|
|
962
|
+
const { route_id } = await params;
|
|
963
|
+
const existing = (0,_lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__/* .getRoute */ .aM)(route_id);
|
|
964
|
+
if (!existing) return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
965
|
+
error: "not found"
|
|
966
|
+
}, {
|
|
967
|
+
status: 404
|
|
968
|
+
});
|
|
969
|
+
const parsed = PatchSchema.safeParse(await req.json().catch(()=>({})));
|
|
970
|
+
if (!parsed.success) {
|
|
971
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
972
|
+
error: parsed.error.issues[0]?.message ?? "invalid body"
|
|
973
|
+
}, {
|
|
974
|
+
status: 400
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
if (parsed.data.agent_id && !(0,_lib_stores_agent_configs__WEBPACK_IMPORTED_MODULE_2__/* .getAgentConfig */ .mJ)(parsed.data.agent_id)) {
|
|
978
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
979
|
+
error: `agent ${parsed.data.agent_id} not found`
|
|
980
|
+
}, {
|
|
981
|
+
status: 400
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
try {
|
|
985
|
+
const updated = (0,_lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__/* .updateRoute */ .DL)(route_id, parsed.data);
|
|
986
|
+
if (!updated) return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
987
|
+
error: "update failed"
|
|
988
|
+
}, {
|
|
989
|
+
status: 500
|
|
990
|
+
});
|
|
991
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(toResponse(updated));
|
|
992
|
+
} catch (err) {
|
|
993
|
+
const m = (0,_lib_utils_error__WEBPACK_IMPORTED_MODULE_4__/* .errorMessage */ .g)(err);
|
|
994
|
+
if (/UNIQUE/.test(m)) {
|
|
995
|
+
const reason = /agent_id/.test(m) ? "That agent is already the target of another route." : "That chat is already routed.";
|
|
996
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
997
|
+
error: reason
|
|
998
|
+
}, {
|
|
999
|
+
status: 409
|
|
891
1000
|
});
|
|
892
|
-
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
893
|
-
throw cacheEntry.error;
|
|
894
|
-
}
|
|
895
|
-
// we don't create a cacheEntry for ISR
|
|
896
|
-
if (!isIsr) {
|
|
897
|
-
return;
|
|
898
|
-
}
|
|
899
|
-
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) {
|
|
900
|
-
var _cacheEntry_value1;
|
|
901
|
-
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
902
|
-
}
|
|
903
|
-
if (!isMinimalMode) {
|
|
904
|
-
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
905
|
-
}
|
|
906
|
-
// Draft mode should never be cached
|
|
907
|
-
if (isDraftMode) {
|
|
908
|
-
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
909
|
-
}
|
|
910
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
911
|
-
if (!(isMinimalMode && isIsr)) {
|
|
912
|
-
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
913
|
-
}
|
|
914
|
-
// If cache control is already set on the response we don't
|
|
915
|
-
// override it to allow users to customize it via next.config
|
|
916
|
-
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
917
|
-
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
918
|
-
}
|
|
919
|
-
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'.
|
|
920
|
-
new Response(cacheEntry.value.body, {
|
|
921
|
-
headers,
|
|
922
|
-
status: cacheEntry.value.status || 200
|
|
923
|
-
}));
|
|
924
|
-
return;
|
|
925
|
-
} catch (err) {
|
|
926
|
-
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
927
|
-
const silenceLog = false;
|
|
928
|
-
await routeModule.onRequestError(req, err, {
|
|
929
|
-
routerKind: 'App Router',
|
|
930
|
-
routePath: normalizedSrcPage,
|
|
931
|
-
routeType: 'route',
|
|
932
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
933
|
-
isStaticGeneration: cacheKey !== null,
|
|
934
|
-
isOnDemandRevalidate
|
|
935
|
-
})
|
|
936
|
-
}, silenceLog, routerServerContext);
|
|
937
|
-
}
|
|
938
|
-
// rethrow so that we can handle serving error page
|
|
939
|
-
// If this is during static generation, throw the error again.
|
|
940
|
-
if (isIsr) throw err;
|
|
941
|
-
// Otherwise, send a 500 response unless the original response has
|
|
942
|
-
// already committed. In that case, preserve its status code for
|
|
943
|
-
// telemetry while still recording the failure and terminating a response
|
|
944
|
-
// that the failed pipeline left open.
|
|
945
|
-
if (res.headersSent) {
|
|
946
|
-
if (currentSpan) {
|
|
947
|
-
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
948
|
-
currentSpan.recordException(error);
|
|
949
|
-
currentSpan.setStatus({
|
|
950
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
951
|
-
message: error.message
|
|
952
|
-
});
|
|
953
|
-
currentSpan.setAttribute('error.type', error.name);
|
|
954
|
-
}
|
|
955
|
-
if (!res.writableEnded && !res.destroyed) {
|
|
956
|
-
res.end();
|
|
957
|
-
}
|
|
958
|
-
} else {
|
|
959
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
960
|
-
status: 500
|
|
961
|
-
}));
|
|
962
|
-
}
|
|
963
|
-
return;
|
|
964
|
-
} finally{
|
|
965
|
-
;
|
|
966
|
-
(()=>{
|
|
967
|
-
if (!currentSpan) {
|
|
968
|
-
return;
|
|
969
|
-
}
|
|
970
|
-
let statusCode = res.statusCode;
|
|
971
|
-
currentSpan.setAttributes({
|
|
972
|
-
'http.status_code': statusCode,
|
|
973
|
-
'next.rsc': false
|
|
974
|
-
});
|
|
975
|
-
if (statusCode && statusCode >= 500) {
|
|
976
|
-
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
977
|
-
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
978
|
-
currentSpan.setStatus({
|
|
979
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
980
|
-
});
|
|
981
|
-
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
982
|
-
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
983
|
-
}
|
|
984
|
-
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
985
|
-
// We were unable to get attributes, probably OTEL is not enabled
|
|
986
|
-
if (!rootSpanAttributes) {
|
|
987
|
-
return;
|
|
988
|
-
}
|
|
989
|
-
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
990
|
-
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
991
|
-
return;
|
|
992
|
-
}
|
|
993
|
-
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
994
|
-
const name = `${method} ${route}`;
|
|
995
|
-
currentSpan.setAttributes({
|
|
996
|
-
'next.route': route,
|
|
997
|
-
'http.route': route,
|
|
998
|
-
'next.span_name': name
|
|
999
|
-
});
|
|
1000
|
-
currentSpan.updateName(name);
|
|
1001
|
-
// Propagate http.route to the parent span if one exists (e.g.
|
|
1002
|
-
// a platform-created HTTP span in adapter deployments).
|
|
1003
|
-
if (parentSpan && parentSpan !== currentSpan) {
|
|
1004
|
-
parentSpan.setAttribute('http.route', route);
|
|
1005
|
-
parentSpan.updateName(name);
|
|
1006
|
-
}
|
|
1007
|
-
})();
|
|
1008
1001
|
}
|
|
1009
|
-
|
|
1010
|
-
// TODO: activeSpan code path is for when wrapped by
|
|
1011
|
-
// next-server can be removed when this is no longer used
|
|
1012
|
-
if (isWrappedByNextServer && activeSpan) {
|
|
1013
|
-
await handleResponse(activeSpan, undefined);
|
|
1014
|
-
} else {
|
|
1015
|
-
let parentSpan = tracer.getActiveScopeSpan();
|
|
1016
|
-
await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
|
|
1017
|
-
spanName: `${method} ${srcPage}`,
|
|
1018
|
-
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
|
|
1019
|
-
attributes: {
|
|
1020
|
-
'http.method': method,
|
|
1021
|
-
'http.target': req.url
|
|
1022
|
-
}
|
|
1023
|
-
}, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
|
|
1002
|
+
throw err;
|
|
1024
1003
|
}
|
|
1025
1004
|
}
|
|
1005
|
+
async function DELETE(_req, { params }) {
|
|
1006
|
+
const { route_id } = await params;
|
|
1007
|
+
const ok = (0,_lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__/* .deleteRoute */ .V7)(route_id);
|
|
1008
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
1009
|
+
deleted: ok
|
|
1010
|
+
}, {
|
|
1011
|
+
status: ok ? 200 : 404
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1026
1014
|
|
|
1027
|
-
//# sourceMappingURL=app-route.js.map
|
|
1028
1015
|
|
|
1016
|
+
/***/ }),
|
|
1017
|
+
|
|
1018
|
+
/***/ 57975:
|
|
1019
|
+
/***/ ((module) => {
|
|
1020
|
+
|
|
1021
|
+
module.exports = require("node:util");
|
|
1022
|
+
|
|
1023
|
+
/***/ }),
|
|
1024
|
+
|
|
1025
|
+
/***/ 63033:
|
|
1026
|
+
/***/ ((module) => {
|
|
1027
|
+
|
|
1028
|
+
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
1029
1029
|
|
|
1030
1030
|
/***/ }),
|
|
1031
1031
|
|
|
@@ -1311,7 +1311,7 @@ module.exports = import("@huggingface/transformers");;
|
|
|
1311
1311
|
var __webpack_require__ = require("../../../../../../../webpack-runtime.js");
|
|
1312
1312
|
__webpack_require__.C(exports);
|
|
1313
1313
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
1314
|
-
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46], () => (__webpack_exec__(
|
|
1314
|
+
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46], () => (__webpack_exec__(23417)));
|
|
1315
1315
|
module.exports = __webpack_exports__;
|
|
1316
1316
|
|
|
1317
1317
|
})();
|