@circuitwall/jarela 2.7.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +2 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +6 -0
- package/.next/standalone/.next/server/app/_global-error/page.js +68 -68
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +58 -58
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/v1/access/[identity]/route.js +127 -127
- package/.next/standalone/.next/server/app/api/v1/access/route.js +372 -372
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +79 -79
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/display-filters/route.js +641 -641
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/duplicate/route.js +723 -723
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/route.js +100 -100
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/thread/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/agents/recent-replies/route.js +227 -227
- package/.next/standalone/.next/server/app/api/v1/agents/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +384 -384
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/attachments/files/route.js +203 -203
- package/.next/standalone/.next/server/app/api/v1/attachments/images/route.js +17 -17
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/[remote_jid]/route.js +760 -760
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +699 -699
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +30 -30
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js +480 -480
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/[route_id]/route.js +675 -675
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +559 -559
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js +1269 -1269
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +199 -199
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/config/route.js +99 -99
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js +169 -169
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/currency/route.js +515 -515
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js +380 -380
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +256 -256
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js +80 -97
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js +677 -677
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/recall-policy/route.js +856 -0
- package/.next/standalone/.next/server/app/api/v1/documents/recall-policy/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/v1/documents/recall-policy/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/v1/documents/search/route.js +299 -247
- package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +486 -486
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js +18 -11
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js +666 -666
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js +128 -100
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/env/route.js +207 -207
- package/.next/standalone/.next/server/app/api/v1/env-sync/allowlist/route.js +128 -128
- package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/events/route.js +154 -154
- package/.next/standalone/.next/server/app/api/v1/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/events/test/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +97 -97
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/browser/activate/route.js +188 -188
- package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +69 -69
- package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +69 -69
- package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +223 -223
- package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js +722 -722
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js +481 -481
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js +378 -378
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js +510 -510
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/files/[name]/route.js +17 -17
- package/.next/standalone/.next/server/app/api/v1/fs/browse/route.js +33 -33
- package/.next/standalone/.next/server/app/api/v1/harnesses/[id]/route.js +397 -397
- package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +129 -129
- package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js +757 -757
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/health/route.js +228 -228
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js +198 -198
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/callback/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +845 -845
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +106 -106
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +747 -747
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/integrations/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +420 -420
- package/.next/standalone/.next/server/app/api/v1/local-file/route.js +34 -34
- package/.next/standalone/.next/server/app/api/v1/logs/route.js +819 -819
- package/.next/standalone/.next/server/app/api/v1/maps/embed/route.js +217 -217
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +1034 -1034
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/registry/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +150 -150
- package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/memory/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +87 -538
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/models/route.js +273 -722
- package/.next/standalone/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/catalog/route.js +73 -73
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js +248 -239
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js +128 -128
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js +81 -81
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js +34 -25
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/route.js +48 -39
- package/.next/standalone/.next/server/app/api/v1/packages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js +863 -863
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js +230 -230
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/profile/location/route.js +138 -138
- package/.next/standalone/.next/server/app/api/v1/profile/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +853 -680
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +171 -171
- package/.next/standalone/.next/server/app/api/v1/providers/route.js +96 -96
- package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +157 -157
- package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +47 -47
- package/.next/standalone/.next/server/app/api/v1/redaction/route.js +206 -206
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +140 -140
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js +166 -166
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/route.js +52 -52
- package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +722 -722
- package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/security/state/route.js +243 -243
- package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +518 -518
- package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/setup/test-key/route.js +25 -25
- package/.next/standalone/.next/server/app/api/v1/skills/[id]/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +609 -609
- package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +129 -129
- package/.next/standalone/.next/server/app/api/v1/skills/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/system/abort/route.js +112 -112
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js +86 -86
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/tailscale/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/tasks/[agent_id]/route.js +83 -83
- package/.next/standalone/.next/server/app/api/v1/tasks/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js +121 -121
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js +139 -139
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/messages/[message_id]/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +1182 -1182
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/route.js +158 -158
- package/.next/standalone/.next/server/app/api/v1/tools/route.js +137 -137
- package/.next/standalone/.next/server/app/api/v1/tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js +73 -73
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/voice/transcribe/route.js +30 -30
- package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +79 -79
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js +45 -45
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/watchers/reaction-scripts/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/icon.svg/route.js +55 -55
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +18 -18
- package/.next/standalone/.next/server/app/page.js +2112 -1235
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page.js +91 -91
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +2 -1
- package/.next/standalone/.next/server/chunks/1244.js +136 -4
- package/.next/standalone/.next/server/chunks/1387.js +733 -57
- package/.next/standalone/.next/server/chunks/1433.js +1 -1
- package/.next/standalone/.next/server/chunks/210.js +3 -3
- package/.next/standalone/.next/server/chunks/2175.js +874 -0
- package/.next/standalone/.next/server/chunks/3042.js +34 -32
- package/.next/standalone/.next/server/chunks/309.js +21 -40
- package/.next/standalone/.next/server/chunks/3272.js +21 -40
- package/.next/standalone/.next/server/chunks/{540.js → 3326.js} +189 -61
- package/.next/standalone/.next/server/chunks/{6142.js → 3479.js} +170 -159
- package/.next/standalone/.next/server/chunks/3566.js +1 -1
- package/.next/standalone/.next/server/chunks/{5323.js → 3692.js} +31 -3
- package/.next/standalone/.next/server/chunks/4189.js +14 -2
- package/.next/standalone/.next/server/chunks/4377.js +2 -2
- package/.next/standalone/.next/server/chunks/4596.js +18 -9
- package/.next/standalone/.next/server/chunks/{639.js → 4728.js} +23676 -22755
- package/.next/standalone/.next/server/chunks/4955.js +81 -14
- package/.next/standalone/.next/server/chunks/5290.js +136 -5
- package/.next/standalone/.next/server/chunks/{2267.js → 6408.js} +990 -926
- package/.next/standalone/.next/server/chunks/{9667.js → 6911.js} +31 -3
- package/.next/standalone/.next/server/chunks/7033.js +7 -4
- package/.next/standalone/.next/server/chunks/7377.js +7 -4
- package/.next/standalone/.next/server/chunks/8461.js +31 -29
- package/.next/standalone/.next/server/chunks/9032.js +3 -3
- package/.next/standalone/.next/server/chunks/9174.js +18 -9
- package/.next/standalone/.next/server/chunks/9408.js +37 -15
- package/.next/standalone/.next/server/chunks/9824.js +2288 -2288
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware.js +104638 -104532
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/preview-props.json +3 -3
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/2BAUJZ7x8eXCYpuZ-Kp7h/_buildManifest.js +1 -0
- package/.next/standalone/.next/static/chunks/{877-145c9df8aa0aee63.js → 877-367eb49b20edd3d6.js} +38 -16
- package/.next/standalone/.next/static/chunks/app/_global-error/page-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/access/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/duplicate/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/recent-replies/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/recall-policy/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/messages/[message_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/{page-64585ef79400f17f.js → page-a584dfa806a1afdb.js} +1082 -205
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/css/19e1cd815490b47c.css +5 -0
- package/.next/standalone/docs/adoption/changesets.json +148 -0
- package/.next/standalone/package.json +5 -4
- package/CHANGELOG.md +51 -0
- package/README.md +115 -1
- package/api/client.startup.test.ts +29 -0
- package/api/client.ts +9 -2
- package/api/types.ts +20 -1
- package/app/api/v1/dashboard/pricing-task/route.ts +3 -1
- package/app/api/v1/documents/recall-policy/route.test.ts +59 -0
- package/app/api/v1/documents/recall-policy/route.ts +20 -0
- package/app/api/v1/documents/search/route.test.ts +36 -0
- package/app/api/v1/documents/search/route.ts +17 -5
- package/app/api/v1/documents/sources/[id]/reindex/route.test.ts +44 -0
- package/app/api/v1/documents/sources/[id]/reindex/route.ts +4 -1
- package/app/api/v1/documents/sources/route.test.ts +67 -0
- package/app/api/v1/documents/sources/route.ts +20 -2
- package/app/api/v1/models/[name]/route.ts +2 -0
- package/app/api/v1/models/route.ts +4 -0
- package/app/api/v1/providers/[provider]/models/route.test.ts +28 -0
- package/app/api/v1/providers/[provider]/models/route.ts +16 -2
- package/app/globals.css +51 -4
- package/components/agents/AgentsPanel.tsx +2 -2
- package/components/agents/agent-editor/AdvancedSection.tsx +1 -1
- package/components/agents/agent-editor/ModelSection.tsx +2 -2
- package/components/bridges/BridgeEditor.tsx +1 -1
- package/components/bridges/BridgesPanel.tsx +1 -1
- package/components/chat/InputBar.tsx +1 -1
- package/components/chat/MessageList.tsx +3 -3
- package/components/chat/useUserProfileAndAgent.test.tsx +43 -1
- package/components/chat/useUserProfileAndAgent.ts +16 -5
- package/components/credentials/CredentialsPanel.tsx +1 -1
- package/components/dashboard/CostBreakdown.test.tsx +34 -0
- package/components/dashboard/CostBreakdown.tsx +21 -0
- package/components/dashboard/DashboardPanel.test.tsx +9 -0
- package/components/dashboard/DashboardPanel.tsx +3 -3
- package/components/dashboard/Donuts.tsx +5 -2
- package/components/dashboard/ModelPricingSection.test.tsx +42 -0
- package/components/dashboard/ModelPricingSection.tsx +23 -21
- package/components/dashboard/Series.test.tsx +1 -0
- package/components/dashboard/Series.tsx +5 -0
- package/components/dashboard/SummaryCards.tsx +39 -27
- package/components/dashboard/VendorModelReportSection.tsx +2 -0
- package/components/documents/AddSourceFields.tsx +52 -15
- package/components/documents/AddSourceForm.tsx +61 -19
- package/components/documents/DocumentsPanel.tsx +22 -2
- package/components/documents/RecallExclusions.tsx +73 -0
- package/components/documents/SearchProbe.tsx +42 -5
- package/components/documents/helpers.ts +17 -3
- package/components/documents/indexing-controls.test.tsx +137 -0
- package/components/documents/useDocumentsPanel.test.tsx +87 -0
- package/components/documents/useDocumentsPanel.ts +47 -6
- package/components/env/EnvVarsPanel.tsx +1 -1
- package/components/harness/HarnessPanel.tsx +2 -2
- package/components/integrations/NetworkPanel.tsx +1 -1
- package/components/layout/AgentCardControls.test.tsx +162 -0
- package/components/layout/AgentCardControls.tsx +126 -0
- package/components/layout/AgentSwitcher.test.tsx +37 -0
- package/components/layout/AgentSwitcher.tsx +28 -3
- package/components/layout/AppShell.tsx +16 -9
- package/components/layout/MenuPanel.test.tsx +125 -2
- package/components/layout/MenuPanel.tsx +96 -2
- package/components/logs/LogsPanel.tsx +1 -1
- package/components/mcp/MCPPanel.tsx +1 -1
- package/components/memory/UnifiedMemoryPanel.tsx +4 -4
- package/components/models/CapBadges.tsx +1 -1
- package/components/models/EmbeddingModelSection.test.tsx +41 -0
- package/components/models/EmbeddingModelSection.tsx +5 -0
- package/components/models/ModelFeatureGuide.tsx +16 -8
- package/components/models/ModelsPanel.tsx +8 -3
- package/components/models/model-editor/ModelEditorBody.tsx +1 -0
- package/components/models/model-editor/ModelIdSection.tsx +5 -0
- package/components/profile/ProfileEditor.test.tsx +70 -0
- package/components/profile/ProfileEditor.tsx +6 -2
- package/components/profile/ProfilePanel.test.tsx +6 -0
- package/components/profile/ProfilePanel.tsx +1 -1
- package/components/scheduled-tasks/ScheduledTasksPanel.tsx +1 -1
- package/components/settings/AppearancePanel.tsx +1 -1
- package/components/settings/SettingsPanel.test.tsx +23 -0
- package/components/settings/SettingsPanel.tsx +2 -2
- package/components/skills/SkillsPanel.tsx +1 -1
- package/components/tools/BrowserPanel.tsx +1 -1
- package/components/tools/PackagesPanel.tsx +1 -1
- package/components/tools/UnifiedPackageList.tsx +1 -1
- package/components/ui/PanelHeader.tsx +1 -1
- package/components/ui/SubTabBar.tsx +1 -1
- package/docs/INSTALL.md +7 -5
- package/hooks/useAgents.ts +2 -2
- package/lib/agents/prepare/system-prompt.test.ts +65 -0
- package/lib/agents/prepare/system-prompt.ts +27 -20
- package/lib/agents/prompt-registry.test.ts +42 -0
- package/lib/agents/prompt-registry.ts +21 -0
- package/lib/bridges/whatsapp.inbound.test.ts +38 -1
- package/lib/bridges/whatsapp.ts +10 -33
- package/lib/db/index.ts +2 -0
- package/lib/db/migrations.test.ts +10 -0
- package/lib/db/migrations.ts +10 -0
- package/lib/db/statement-cache.test.ts +77 -0
- package/lib/db/statement-cache.ts +31 -0
- package/lib/documents/indexer.test.ts +16 -1
- package/lib/documents/indexer.ts +8 -7
- package/lib/documents/mail-source-config.ts +31 -0
- package/lib/documents/recall-policy.ts +24 -0
- package/lib/documents/remote/icloud.ts +56 -0
- package/lib/documents/remote/index.ts +4 -1
- package/lib/documents/remote/mail.test.ts +232 -0
- package/lib/documents/remote/mail.ts +48 -40
- package/lib/documents/search.test.ts +81 -2
- package/lib/documents/search.ts +47 -7
- package/lib/embeddings/cache.test.ts +16 -2
- package/lib/embeddings/index.test.ts +7 -0
- package/lib/embeddings/index.ts +12 -1
- package/lib/integrations/deepseek-web/manifest.ts +68 -0
- package/lib/integrations/gmail/manifest.ts +2 -3
- package/lib/integrations/icloud/manifest.ts +19 -5
- package/lib/integrations/registry.test.ts +8 -0
- package/lib/integrations/registry.ts +2 -0
- package/lib/lifecycle/changeset-build.test.ts +3 -0
- package/lib/lifecycle/changeset-build.ts +6 -0
- package/lib/lifecycle/changesets.ts +9 -0
- package/lib/pricing/llm-extract.ts +1 -1
- package/lib/pricing/maintenance-task.ts +19 -3
- package/lib/pricing/model-updates.test.ts +192 -0
- package/lib/pricing/model-updates.ts +205 -0
- package/lib/stores/app-settings.ts +17 -1
- package/lib/stores/dashboard-metrics-cache.test.ts +44 -0
- package/lib/stores/dashboard-metrics.test.ts +47 -4
- package/lib/stores/dashboard-metrics.ts +73 -8
- package/lib/stores/document-sources.ts +1 -0
- package/lib/stores/integrations.test.ts +20 -0
- package/lib/stores/integrations.ts +15 -4
- package/lib/stores/langgraph-store.test.ts +53 -0
- package/lib/stores/langgraph-store.ts +9 -21
- package/lib/stores/model-metadata.ts +89 -0
- package/lib/stores/threads.test.ts +34 -0
- package/lib/stores/threads.ts +17 -20
- package/lib/stores/tool-stats.test.ts +31 -0
- package/lib/stores/tool-stats.ts +16 -0
- package/lib/stores/version-adoption.test.ts +8 -0
- package/lib/stores/version-adoption.ts +5 -2
- package/lib/tools/general/documents.test.ts +5 -0
- package/lib/tools/general/pricing-maintenance.test.ts +5 -0
- package/lib/tools/general/pricing-maintenance.ts +4 -1
- package/lib/tools/packages/default-packages/icloud.test.ts +49 -0
- package/lib/tools/packages/default-packages/icloud.ts +8 -6
- package/lib/tools/packages/default-packages.test.ts +16 -0
- package/lib/tools/packages/langchain-packages.ts +2 -2
- package/lib/tools/runtime/category-filter.test.ts +22 -0
- package/lib/tools/web/deepseek.test.ts +76 -0
- package/lib/tools/web/deepseek.ts +68 -0
- package/lib/tools/web/fetch.test.ts +130 -2
- package/lib/tools/web/fetch.ts +48 -1
- package/lib/tools/web/search.test.ts +139 -2
- package/lib/tools/web/search.ts +48 -1
- package/lib/triggers/handlers/scheduled-task.test.ts +18 -0
- package/lib/triggers/handlers/scheduled-task.ts +6 -0
- package/lib/ui/feature-readiness.test.ts +7 -0
- package/lib/ui/feature-readiness.ts +2 -1
- package/package.json +5 -4
- package/scripts/check-npm-package.mjs +1 -0
- package/scripts/jarela-bin.mjs +3 -0
- package/scripts/runtime-version.mjs +19 -0
- package/scripts/start-prod.mjs +3 -0
- package/.next/standalone/.next/static/6qLnqWdsfBTJOAJApUYXy/_buildManifest.js +0 -1
- package/.next/standalone/.next/static/chunks/app/_global-error/page-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/access/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/duplicate/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/recent-replies/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/messages/[message_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/css/c4a8bed1da2c748f.css +0 -5
- /package/.next/standalone/.next/static/{6qLnqWdsfBTJOAJApUYXy → 2BAUJZ7x8eXCYpuZ-Kp7h}/_ssgManifest.js +0 -0
|
@@ -33,587 +33,173 @@ module.exports = require("https");
|
|
|
33
33
|
|
|
34
34
|
/***/ }),
|
|
35
35
|
|
|
36
|
-
/***/
|
|
37
|
-
/***/ ((
|
|
38
|
-
|
|
39
|
-
module.exports = require("node:sqlite");
|
|
40
|
-
|
|
41
|
-
/***/ }),
|
|
42
|
-
|
|
43
|
-
/***/ 108128:
|
|
44
|
-
/***/ ((module) => {
|
|
45
|
-
|
|
46
|
-
module.exports = require("next/dist/server/runtime-reacts.external.js");
|
|
47
|
-
|
|
48
|
-
/***/ }),
|
|
49
|
-
|
|
50
|
-
/***/ 157075:
|
|
51
|
-
/***/ ((module) => {
|
|
52
|
-
|
|
53
|
-
module.exports = require("node:stream");
|
|
54
|
-
|
|
55
|
-
/***/ }),
|
|
56
|
-
|
|
57
|
-
/***/ 176760:
|
|
58
|
-
/***/ ((module) => {
|
|
59
|
-
|
|
60
|
-
module.exports = require("node:path");
|
|
61
|
-
|
|
62
|
-
/***/ }),
|
|
63
|
-
|
|
64
|
-
/***/ 200261:
|
|
65
|
-
/***/ ((module) => {
|
|
66
|
-
|
|
67
|
-
module.exports = require("next/dist/shared/lib/router/utils/app-paths");
|
|
68
|
-
|
|
69
|
-
/***/ }),
|
|
70
|
-
|
|
71
|
-
/***/ 257975:
|
|
72
|
-
/***/ ((module) => {
|
|
73
|
-
|
|
74
|
-
module.exports = require("node:util");
|
|
75
|
-
|
|
76
|
-
/***/ }),
|
|
77
|
-
|
|
78
|
-
/***/ 309956:
|
|
79
|
-
/***/ ((module) => {
|
|
80
|
-
|
|
81
|
-
module.exports = require("undici");
|
|
82
|
-
|
|
83
|
-
/***/ }),
|
|
84
|
-
|
|
85
|
-
/***/ 328354:
|
|
86
|
-
/***/ ((module) => {
|
|
87
|
-
|
|
88
|
-
module.exports = require("util");
|
|
89
|
-
|
|
90
|
-
/***/ }),
|
|
91
|
-
|
|
92
|
-
/***/ 333873:
|
|
93
|
-
/***/ ((module) => {
|
|
94
|
-
|
|
95
|
-
module.exports = require("path");
|
|
96
|
-
|
|
97
|
-
/***/ }),
|
|
98
|
-
|
|
99
|
-
/***/ 344708:
|
|
100
|
-
/***/ ((module) => {
|
|
101
|
-
|
|
102
|
-
module.exports = require("node:https");
|
|
103
|
-
|
|
104
|
-
/***/ }),
|
|
105
|
-
|
|
106
|
-
/***/ 379551:
|
|
107
|
-
/***/ ((module) => {
|
|
36
|
+
/***/ 57414:
|
|
37
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
108
38
|
|
|
109
|
-
|
|
39
|
+
__webpack_require__.r(__webpack_exports__);
|
|
40
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
41
|
+
/* harmony export */ handler: () => (/* binding */ handler),
|
|
42
|
+
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
43
|
+
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
44
|
+
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
45
|
+
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
46
|
+
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
47
|
+
/* harmony export */ });
|
|
48
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319225);
|
|
49
|
+
/* 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__);
|
|
50
|
+
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(684006);
|
|
51
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
52
|
+
/* 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__);
|
|
53
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(799373);
|
|
54
|
+
/* 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__);
|
|
55
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(434775);
|
|
56
|
+
/* 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__);
|
|
57
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(524235);
|
|
58
|
+
/* 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__);
|
|
59
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(200261);
|
|
60
|
+
/* 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__);
|
|
61
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(754365);
|
|
62
|
+
/* 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__);
|
|
63
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(590771);
|
|
64
|
+
/* 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__);
|
|
65
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(473461);
|
|
66
|
+
/* 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__);
|
|
67
|
+
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(767798);
|
|
68
|
+
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(192280);
|
|
69
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(662018);
|
|
70
|
+
/* 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__);
|
|
71
|
+
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(445696);
|
|
72
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(347929);
|
|
73
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
74
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(986439);
|
|
75
|
+
/* 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__);
|
|
76
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(710246);
|
|
77
|
+
/* 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__);
|
|
78
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(137527);
|
|
79
|
+
/* 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__);
|
|
110
80
|
|
|
111
|
-
/***/ }),
|
|
112
81
|
|
|
113
|
-
/***/ 380481:
|
|
114
|
-
/***/ ((module) => {
|
|
115
82
|
|
|
116
|
-
module.exports = require("node:readline");
|
|
117
83
|
|
|
118
|
-
/***/ }),
|
|
119
84
|
|
|
120
|
-
/***/ 399253:
|
|
121
|
-
/***/ ((module) => {
|
|
122
85
|
|
|
123
|
-
module.exports = import("@huggingface/transformers");;
|
|
124
86
|
|
|
125
|
-
/***/ }),
|
|
126
87
|
|
|
127
|
-
/***/ 419121:
|
|
128
|
-
/***/ ((module) => {
|
|
129
88
|
|
|
130
|
-
module.exports = require("next/dist/server/app-render/action-async-storage.external.js");
|
|
131
89
|
|
|
132
|
-
/***/ }),
|
|
133
90
|
|
|
134
|
-
/***/ 455511:
|
|
135
|
-
/***/ ((module) => {
|
|
136
91
|
|
|
137
|
-
module.exports = require("crypto");
|
|
138
92
|
|
|
139
|
-
/***/ }),
|
|
140
93
|
|
|
141
|
-
/***/ 478361:
|
|
142
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143
94
|
|
|
144
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
145
|
-
/* harmony export */ $6: () => (/* binding */ findRoute),
|
|
146
|
-
/* harmony export */ Bn: () => (/* binding */ listRoutes),
|
|
147
|
-
/* harmony export */ DL: () => (/* binding */ updateRoute),
|
|
148
|
-
/* harmony export */ GB: () => (/* binding */ addIgnore),
|
|
149
|
-
/* harmony export */ KC: () => (/* binding */ bumpRouteLastSeenTs),
|
|
150
|
-
/* harmony export */ OO: () => (/* binding */ createBridge),
|
|
151
|
-
/* harmony export */ Pu: () => (/* binding */ deleteBridge),
|
|
152
|
-
/* harmony export */ V7: () => (/* binding */ deleteRoute),
|
|
153
|
-
/* harmony export */ X9: () => (/* binding */ listBridges),
|
|
154
|
-
/* harmony export */ aM: () => (/* binding */ getRoute),
|
|
155
|
-
/* harmony export */ e1: () => (/* binding */ getBridge),
|
|
156
|
-
/* harmony export */ gH: () => (/* binding */ getRouteLastSeenTsMap),
|
|
157
|
-
/* harmony export */ kZ: () => (/* binding */ listIgnores),
|
|
158
|
-
/* harmony export */ nE: () => (/* binding */ removeIgnore),
|
|
159
|
-
/* harmony export */ pi: () => (/* binding */ isIgnored),
|
|
160
|
-
/* harmony export */ po: () => (/* binding */ updateBridge),
|
|
161
|
-
/* harmony export */ un: () => (/* binding */ createRoute)
|
|
162
|
-
/* harmony export */ });
|
|
163
|
-
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(977598);
|
|
164
|
-
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(node_crypto__WEBPACK_IMPORTED_MODULE_0__);
|
|
165
|
-
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251244);
|
|
166
|
-
/* harmony import */ var _lib_db_transaction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(999043);
|
|
167
95
|
|
|
168
96
|
|
|
169
97
|
|
|
170
|
-
|
|
171
|
-
//
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
status: patch.status ?? existing.status,
|
|
208
|
-
qr: patch.qr !== undefined ? patch.qr : existing.qr,
|
|
209
|
-
last_error: patch.last_error !== undefined ? patch.last_error : existing.last_error,
|
|
210
|
-
paired_id: patch.paired_id !== undefined ? patch.paired_id : existing.paired_id,
|
|
211
|
-
forward_group_profile_updates: patch.forward_group_profile_updates !== undefined ? patch.forward_group_profile_updates : existing.forward_group_profile_updates,
|
|
212
|
-
forward_group_participants_updates: patch.forward_group_participants_updates !== undefined ? patch.forward_group_participants_updates : existing.forward_group_participants_updates,
|
|
213
|
-
updated_at: now()
|
|
214
|
-
};
|
|
215
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare(`UPDATE bridges
|
|
216
|
-
SET name=?, enabled=?, status=?, qr=?, last_error=?, paired_id=?, forward_group_profile_updates=?, forward_group_participants_updates=?, updated_at=?
|
|
217
|
-
WHERE id=?`).run(merged.name, merged.enabled, merged.status, merged.qr, merged.last_error, merged.paired_id, merged.forward_group_profile_updates, merged.forward_group_participants_updates, merged.updated_at, id);
|
|
218
|
-
return merged;
|
|
219
|
-
}
|
|
220
|
-
function deleteBridge(id) {
|
|
221
|
-
return (0,_lib_db_transaction__WEBPACK_IMPORTED_MODULE_2__/* .withDbTransaction */ .J)(()=>{
|
|
222
|
-
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)();
|
|
223
|
-
db.prepare("DELETE FROM bridge_routes WHERE bridge_id=?").run(id);
|
|
224
|
-
db.prepare("DELETE FROM bridge_ignores WHERE bridge_id=?").run(id);
|
|
225
|
-
const r = db.prepare("DELETE FROM bridges WHERE id=?").run(id);
|
|
226
|
-
return r.changes > 0;
|
|
98
|
+
// We inject the nextConfigOutput here so that we can use them in the route
|
|
99
|
+
// module.
|
|
100
|
+
const nextConfigOutput = "standalone"
|
|
101
|
+
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
102
|
+
definition: {
|
|
103
|
+
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
104
|
+
page: "/api/v1/bridges/[id]/ignores/route",
|
|
105
|
+
pathname: "/api/v1/bridges/[id]/ignores",
|
|
106
|
+
filename: "route",
|
|
107
|
+
bundlePath: "app/api/v1/bridges/[id]/ignores/route"
|
|
108
|
+
},
|
|
109
|
+
distDir: ".next" || 0,
|
|
110
|
+
relativeProjectDir: false || '',
|
|
111
|
+
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/bridges/[id]/ignores/route.ts",
|
|
112
|
+
nextConfigOutput,
|
|
113
|
+
// The lazy require factory ensures that:
|
|
114
|
+
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
115
|
+
// correctly attributing module load time to application-code rather than
|
|
116
|
+
// framework internals.
|
|
117
|
+
// - In all modes: async modules (route files with top-level await) are
|
|
118
|
+
// handled correctly — require() returns a Promise for such modules, which
|
|
119
|
+
// ensureUserland() awaits before the first request is handled.
|
|
120
|
+
userland: ()=>__webpack_require__(541903),
|
|
121
|
+
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
122
|
+
// server HMR updates are picked up without re-executing the entry chunk.
|
|
123
|
+
// Using require() (synchronous) avoids adding async overhead that would be
|
|
124
|
+
// incorrectly attributed to application-code time in devRequestTiming.
|
|
125
|
+
... false ? 0 : {}
|
|
126
|
+
});
|
|
127
|
+
// Pull out the exports that we need to expose from the module. This should
|
|
128
|
+
// be eliminated when we've moved the other routes to the new format. These
|
|
129
|
+
// are used to hook into the route.
|
|
130
|
+
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
131
|
+
function patchFetch() {
|
|
132
|
+
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
133
|
+
workAsyncStorage,
|
|
134
|
+
workUnitAsyncStorage
|
|
227
135
|
});
|
|
228
136
|
}
|
|
229
|
-
// ---------------------------------------------------------------------------
|
|
230
|
-
// Route CRUD
|
|
231
|
-
// ---------------------------------------------------------------------------
|
|
232
|
-
function listRoutes(bridgeId) {
|
|
233
|
-
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT * FROM bridge_routes WHERE bridge_id=? ORDER BY created_at ASC").all(bridgeId);
|
|
234
|
-
}
|
|
235
|
-
function getRoute(id) {
|
|
236
|
-
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT * FROM bridge_routes WHERE id=?").get(id) ?? null;
|
|
237
|
-
}
|
|
238
|
-
function findRoute(bridgeId, remoteJid) {
|
|
239
|
-
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT * FROM bridge_routes WHERE bridge_id=? AND remote_jid=?").get(bridgeId, remoteJid) ?? null;
|
|
240
|
-
}
|
|
241
|
-
function createRoute(input) {
|
|
242
|
-
const id = (0,node_crypto__WEBPACK_IMPORTED_MODULE_0__.randomUUID)();
|
|
243
|
-
const t = now();
|
|
244
|
-
const silent = input.silent_mode ? 1 : 0;
|
|
245
|
-
const respondTo = input.respond_to ?? "counterpart";
|
|
246
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare(`INSERT INTO bridge_routes (id, bridge_id, remote_jid, agent_id, label, silent_mode, respond_to, created_at, updated_at)
|
|
247
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, input.bridge_id, input.remote_jid, input.agent_id, input.label ?? null, silent, respondTo, t, t);
|
|
248
|
-
return {
|
|
249
|
-
id,
|
|
250
|
-
bridge_id: input.bridge_id,
|
|
251
|
-
remote_jid: input.remote_jid,
|
|
252
|
-
agent_id: input.agent_id,
|
|
253
|
-
label: input.label ?? null,
|
|
254
|
-
silent_mode: silent,
|
|
255
|
-
respond_to: respondTo,
|
|
256
|
-
last_seen_ts: null,
|
|
257
|
-
created_at: t,
|
|
258
|
-
updated_at: t
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
function updateRoute(id, patch) {
|
|
262
|
-
const existing = getRoute(id);
|
|
263
|
-
if (!existing) return null;
|
|
264
|
-
const merged = {
|
|
265
|
-
...existing,
|
|
266
|
-
remote_jid: patch.remote_jid ?? existing.remote_jid,
|
|
267
|
-
agent_id: patch.agent_id ?? existing.agent_id,
|
|
268
|
-
label: patch.label !== undefined ? patch.label : existing.label,
|
|
269
|
-
silent_mode: patch.silent_mode !== undefined ? patch.silent_mode ? 1 : 0 : existing.silent_mode,
|
|
270
|
-
respond_to: patch.respond_to ?? existing.respond_to,
|
|
271
|
-
updated_at: now()
|
|
272
|
-
};
|
|
273
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("UPDATE bridge_routes SET remote_jid=?, agent_id=?, label=?, silent_mode=?, respond_to=?, updated_at=? WHERE id=?").run(merged.remote_jid, merged.agent_id, merged.label, merged.silent_mode, merged.respond_to, merged.updated_at, id);
|
|
274
|
-
return merged;
|
|
275
|
-
}
|
|
276
|
-
function deleteRoute(id) {
|
|
277
|
-
const r = (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("DELETE FROM bridge_routes WHERE id=?").run(id);
|
|
278
|
-
return r.changes > 0;
|
|
279
|
-
}
|
|
280
|
-
// Catch-up watermark. The WhatsApp adapter calls this with the
|
|
281
|
-
// messageTimestamp (epoch ms) of the most recent inbound that reached the
|
|
282
|
-
// agent. Only writes when `ts` is strictly greater than the persisted
|
|
283
|
-
// value so out-of-order replays from the server-side backlog can't roll
|
|
284
|
-
// the watermark backward. No-op when no route exists for the pair
|
|
285
|
-
// (catch-all routing handles those at the dispatcher layer).
|
|
286
|
-
function bumpRouteLastSeenTs(bridgeId, remoteJid, ts) {
|
|
287
|
-
if (!Number.isFinite(ts) || ts <= 0) return;
|
|
288
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("UPDATE bridge_routes SET last_seen_ts=? WHERE bridge_id=? AND remote_jid=? AND (last_seen_ts IS NULL OR last_seen_ts < ?)").run(ts, bridgeId, remoteJid, ts);
|
|
289
|
-
}
|
|
290
|
-
// Per-chat watermarks for every explicitly routed chat on a bridge, loaded
|
|
291
|
-
// once per upsert batch. Each chat is gated only by its own progress: a
|
|
292
|
-
// bridge-wide maximum would drop chat B's offline backlog as soon as a newer
|
|
293
|
-
// message from chat A had been delivered.
|
|
294
|
-
function getRouteLastSeenTsMap(bridgeId) {
|
|
295
|
-
const rows = (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT remote_jid, last_seen_ts FROM bridge_routes WHERE bridge_id=? AND last_seen_ts IS NOT NULL").all(bridgeId);
|
|
296
|
-
return new Map(rows.map((r)=>[
|
|
297
|
-
r.remote_jid,
|
|
298
|
-
r.last_seen_ts
|
|
299
|
-
]));
|
|
300
|
-
}
|
|
301
|
-
// ---------------------------------------------------------------------------
|
|
302
|
-
// Ignore-list CRUD (per-bridge chat blocklist)
|
|
303
|
-
//
|
|
304
|
-
// Independent from routes: an ignore entry short-circuits the router even
|
|
305
|
-
// when an explicit route or catch-all would otherwise match. The intent
|
|
306
|
-
// is "listen to everything EXCEPT these chats" — messages from ignored
|
|
307
|
-
// chats are dropped before any agent runs, so no history, no memory, no
|
|
308
|
-
// tools. Delete the entry to resume forwarding.
|
|
309
|
-
// ---------------------------------------------------------------------------
|
|
310
|
-
function listIgnores(bridgeId) {
|
|
311
|
-
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT * FROM bridge_ignores WHERE bridge_id=? ORDER BY created_at ASC").all(bridgeId);
|
|
312
|
-
}
|
|
313
|
-
function isIgnored(bridgeId, remoteJid) {
|
|
314
|
-
const row = (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT 1 FROM bridge_ignores WHERE bridge_id=? AND remote_jid=? LIMIT 1").get(bridgeId, remoteJid);
|
|
315
|
-
return !!row;
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* Add a chat to the bridge's ignore list. Idempotent — re-adding the
|
|
319
|
-
* same (bridge_id, remote_jid) throws a SQLite UNIQUE violation which
|
|
320
|
-
* the caller can surface as a 409. Callers who want upsert semantics
|
|
321
|
-
* should catch and update the label separately.
|
|
322
|
-
*/ function addIgnore(input) {
|
|
323
|
-
const id = (0,node_crypto__WEBPACK_IMPORTED_MODULE_0__.randomUUID)();
|
|
324
|
-
const t = now();
|
|
325
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare(`INSERT INTO bridge_ignores (id, bridge_id, remote_jid, label, created_at)
|
|
326
|
-
VALUES (?, ?, ?, ?, ?)`).run(id, input.bridge_id, input.remote_jid, input.label ?? null, t);
|
|
327
|
-
return {
|
|
328
|
-
id,
|
|
329
|
-
bridge_id: input.bridge_id,
|
|
330
|
-
remote_jid: input.remote_jid,
|
|
331
|
-
label: input.label ?? null,
|
|
332
|
-
created_at: t
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
function removeIgnore(bridgeId, remoteJid) {
|
|
336
|
-
const r = (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("DELETE FROM bridge_ignores WHERE bridge_id=? AND remote_jid=?").run(bridgeId, remoteJid);
|
|
337
|
-
return r.changes > 0;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
/***/ }),
|
|
342
|
-
|
|
343
|
-
/***/ 529294:
|
|
344
|
-
/***/ ((module) => {
|
|
345
|
-
|
|
346
|
-
module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
|
|
347
|
-
|
|
348
|
-
/***/ }),
|
|
349
|
-
|
|
350
|
-
/***/ 541903:
|
|
351
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
352
|
-
|
|
353
|
-
__webpack_require__.r(__webpack_exports__);
|
|
354
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
355
|
-
/* harmony export */ GET: () => (/* binding */ GET),
|
|
356
|
-
/* harmony export */ POST: () => (/* binding */ POST)
|
|
357
|
-
/* harmony export */ });
|
|
358
|
-
/* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(945592);
|
|
359
|
-
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(497377);
|
|
360
|
-
/* harmony import */ var _lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(478361);
|
|
361
|
-
/* harmony import */ var _lib_utils_error__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(922032);
|
|
362
|
-
/* harmony import */ var _lib_api_responses__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(739947);
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
137
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
}
|
|
382
|
-
|
|
138
|
+
async function handler(req, res, ctx) {
|
|
139
|
+
if (ctx.requestMeta) {
|
|
140
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
141
|
+
}
|
|
142
|
+
if (routeModule.isDev) {
|
|
143
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
144
|
+
}
|
|
145
|
+
let srcPage = "/api/v1/bridges/[id]/ignores/route";
|
|
146
|
+
// turbopack doesn't normalize `/index` in the page name
|
|
147
|
+
// so we need to to process dynamic routes properly
|
|
148
|
+
// TODO: fix turbopack providing differing value from webpack
|
|
149
|
+
if (false) {} else if (srcPage === '/index') {
|
|
150
|
+
// we always normalize /index specifically
|
|
151
|
+
srcPage = '/';
|
|
152
|
+
}
|
|
153
|
+
const multiZoneDraftMode = false;
|
|
154
|
+
// Registering `instrumentation.ts` usually installs the tracer provider, so
|
|
155
|
+
// do it before starting the request span. The span is started before
|
|
156
|
+
// `prepare`, so route module preparation is part of the request's trace.
|
|
157
|
+
// When this request triggers registration, the lifecycle spans of
|
|
158
|
+
// `instrumentation.ts` are emitted inside the request span.
|
|
159
|
+
const { instrumentation } = await routeModule.ensureInstrumentation(req, {
|
|
160
|
+
deferSpans: true
|
|
383
161
|
});
|
|
384
|
-
return
|
|
162
|
+
return routeModule.traceRequest(req, {
|
|
163
|
+
tracer: (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)(),
|
|
164
|
+
spanName: `${req.method || 'GET'} ${srcPage}`,
|
|
165
|
+
httpTarget: req.url,
|
|
166
|
+
instrumentation
|
|
167
|
+
}, (requestSpan, requestRootSpan)=>handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, requestSpan, requestRootSpan));
|
|
385
168
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
remote_jid: zod__WEBPACK_IMPORTED_MODULE_3__/* .string */ .YjP().trim().min(3).refine((v)=>v !== "*", {
|
|
391
|
-
message: "Cannot ignore the catch-all sentinel ('*'). Delete the catch-all route instead."
|
|
392
|
-
}),
|
|
393
|
-
label: zod__WEBPACK_IMPORTED_MODULE_3__/* .string */ .YjP().trim().max(120).optional().nullable()
|
|
394
|
-
});
|
|
395
|
-
async function POST(req, { params }) {
|
|
396
|
-
const { id } = await params;
|
|
397
|
-
if (!(0,_lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__/* .getBridge */ .e1)(id)) return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
398
|
-
error: "not found"
|
|
399
|
-
}, {
|
|
400
|
-
status: 404
|
|
169
|
+
async function handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, requestSpan, requestRootSpan) {
|
|
170
|
+
const prepareResult = await routeModule.prepare(req, res, {
|
|
171
|
+
srcPage,
|
|
172
|
+
multiZoneDraftMode
|
|
401
173
|
});
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
if (
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
module.exports = require("events");
|
|
433
|
-
|
|
434
|
-
/***/ }),
|
|
435
|
-
|
|
436
|
-
/***/ 629021:
|
|
437
|
-
/***/ ((module) => {
|
|
438
|
-
|
|
439
|
-
module.exports = require("fs");
|
|
440
|
-
|
|
441
|
-
/***/ }),
|
|
442
|
-
|
|
443
|
-
/***/ 638522:
|
|
444
|
-
/***/ ((module) => {
|
|
445
|
-
|
|
446
|
-
module.exports = require("node:zlib");
|
|
447
|
-
|
|
448
|
-
/***/ }),
|
|
449
|
-
|
|
450
|
-
/***/ 649525:
|
|
451
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
452
|
-
|
|
453
|
-
__webpack_require__.r(__webpack_exports__);
|
|
454
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
455
|
-
/* harmony export */ handler: () => (/* binding */ handler),
|
|
456
|
-
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
457
|
-
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
458
|
-
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
459
|
-
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
460
|
-
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
461
|
-
/* harmony export */ });
|
|
462
|
-
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319225);
|
|
463
|
-
/* 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__);
|
|
464
|
-
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(684006);
|
|
465
|
-
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
466
|
-
/* 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__);
|
|
467
|
-
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(799373);
|
|
468
|
-
/* 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__);
|
|
469
|
-
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(434775);
|
|
470
|
-
/* 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__);
|
|
471
|
-
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(524235);
|
|
472
|
-
/* 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__);
|
|
473
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(200261);
|
|
474
|
-
/* 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__);
|
|
475
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(754365);
|
|
476
|
-
/* 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__);
|
|
477
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(590771);
|
|
478
|
-
/* 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__);
|
|
479
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(473461);
|
|
480
|
-
/* 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__);
|
|
481
|
-
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(767798);
|
|
482
|
-
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(192280);
|
|
483
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(662018);
|
|
484
|
-
/* 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__);
|
|
485
|
-
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(445696);
|
|
486
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(347929);
|
|
487
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
488
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(986439);
|
|
489
|
-
/* 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__);
|
|
490
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(710246);
|
|
491
|
-
/* 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__);
|
|
492
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(137527);
|
|
493
|
-
/* 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__);
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
// We inject the nextConfigOutput here so that we can use them in the route
|
|
513
|
-
// module.
|
|
514
|
-
const nextConfigOutput = "standalone"
|
|
515
|
-
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
516
|
-
definition: {
|
|
517
|
-
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
518
|
-
page: "/api/v1/bridges/[id]/ignores/route",
|
|
519
|
-
pathname: "/api/v1/bridges/[id]/ignores",
|
|
520
|
-
filename: "route",
|
|
521
|
-
bundlePath: "app/api/v1/bridges/[id]/ignores/route"
|
|
522
|
-
},
|
|
523
|
-
distDir: ".next" || 0,
|
|
524
|
-
relativeProjectDir: false || '',
|
|
525
|
-
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/bridges/[id]/ignores/route.ts",
|
|
526
|
-
nextConfigOutput,
|
|
527
|
-
// The lazy require factory ensures that:
|
|
528
|
-
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
529
|
-
// correctly attributing module load time to application-code rather than
|
|
530
|
-
// framework internals.
|
|
531
|
-
// - In all modes: async modules (route files with top-level await) are
|
|
532
|
-
// handled correctly — require() returns a Promise for such modules, which
|
|
533
|
-
// ensureUserland() awaits before the first request is handled.
|
|
534
|
-
userland: ()=>__webpack_require__(541903),
|
|
535
|
-
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
536
|
-
// server HMR updates are picked up without re-executing the entry chunk.
|
|
537
|
-
// Using require() (synchronous) avoids adding async overhead that would be
|
|
538
|
-
// incorrectly attributed to application-code time in devRequestTiming.
|
|
539
|
-
... false ? 0 : {}
|
|
540
|
-
});
|
|
541
|
-
// Pull out the exports that we need to expose from the module. This should
|
|
542
|
-
// be eliminated when we've moved the other routes to the new format. These
|
|
543
|
-
// are used to hook into the route.
|
|
544
|
-
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
545
|
-
function patchFetch() {
|
|
546
|
-
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
547
|
-
workAsyncStorage,
|
|
548
|
-
workUnitAsyncStorage
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
async function handler(req, res, ctx) {
|
|
553
|
-
if (ctx.requestMeta) {
|
|
554
|
-
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
555
|
-
}
|
|
556
|
-
if (routeModule.isDev) {
|
|
557
|
-
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
558
|
-
}
|
|
559
|
-
let srcPage = "/api/v1/bridges/[id]/ignores/route";
|
|
560
|
-
// turbopack doesn't normalize `/index` in the page name
|
|
561
|
-
// so we need to to process dynamic routes properly
|
|
562
|
-
// TODO: fix turbopack providing differing value from webpack
|
|
563
|
-
if (false) {} else if (srcPage === '/index') {
|
|
564
|
-
// we always normalize /index specifically
|
|
565
|
-
srcPage = '/';
|
|
566
|
-
}
|
|
567
|
-
const multiZoneDraftMode = false;
|
|
568
|
-
// Registering `instrumentation.ts` usually installs the tracer provider, so
|
|
569
|
-
// do it before starting the request span. The span is started before
|
|
570
|
-
// `prepare`, so route module preparation is part of the request's trace.
|
|
571
|
-
// When this request triggers registration, the lifecycle spans of
|
|
572
|
-
// `instrumentation.ts` are emitted inside the request span.
|
|
573
|
-
const { instrumentation } = await routeModule.ensureInstrumentation(req, {
|
|
574
|
-
deferSpans: true
|
|
575
|
-
});
|
|
576
|
-
return routeModule.traceRequest(req, {
|
|
577
|
-
tracer: (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)(),
|
|
578
|
-
spanName: `${req.method || 'GET'} ${srcPage}`,
|
|
579
|
-
httpTarget: req.url,
|
|
580
|
-
instrumentation
|
|
581
|
-
}, (requestSpan, requestRootSpan)=>handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, requestSpan, requestRootSpan));
|
|
582
|
-
}
|
|
583
|
-
async function handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, requestSpan, requestRootSpan) {
|
|
584
|
-
const prepareResult = await routeModule.prepare(req, res, {
|
|
585
|
-
srcPage,
|
|
586
|
-
multiZoneDraftMode
|
|
587
|
-
});
|
|
588
|
-
if (!prepareResult) {
|
|
589
|
-
res.statusCode = 400;
|
|
590
|
-
res.end('Bad Request');
|
|
591
|
-
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
592
|
-
return null;
|
|
593
|
-
}
|
|
594
|
-
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
595
|
-
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
596
|
-
// Only this route's prerenders can establish ISR or admit generated params.
|
|
597
|
-
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]));
|
|
598
|
-
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
599
|
-
const render404 = async ()=>{
|
|
600
|
-
// TODO: should route-module itself handle rendering the 404
|
|
601
|
-
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
602
|
-
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
603
|
-
} else {
|
|
604
|
-
res.end('This page could not be found');
|
|
605
|
-
}
|
|
606
|
-
return null;
|
|
607
|
-
};
|
|
608
|
-
if (isIsr && !isDraftMode) {
|
|
609
|
-
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
610
|
-
if (prerenderInfo) {
|
|
611
|
-
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
612
|
-
if (nextConfig.adapterPath) {
|
|
613
|
-
return await render404();
|
|
614
|
-
}
|
|
615
|
-
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
616
|
-
}
|
|
174
|
+
if (!prepareResult) {
|
|
175
|
+
res.statusCode = 400;
|
|
176
|
+
res.end('Bad Request');
|
|
177
|
+
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
181
|
+
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
182
|
+
// Only this route's prerenders can establish ISR or admit generated params.
|
|
183
|
+
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]));
|
|
184
|
+
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
185
|
+
const render404 = async ()=>{
|
|
186
|
+
// TODO: should route-module itself handle rendering the 404
|
|
187
|
+
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
188
|
+
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
189
|
+
} else {
|
|
190
|
+
res.end('This page could not be found');
|
|
191
|
+
}
|
|
192
|
+
return null;
|
|
193
|
+
};
|
|
194
|
+
if (isIsr && !isDraftMode) {
|
|
195
|
+
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
196
|
+
if (prerenderInfo) {
|
|
197
|
+
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
198
|
+
if (nextConfig.adapterPath) {
|
|
199
|
+
return await render404();
|
|
200
|
+
}
|
|
201
|
+
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
202
|
+
}
|
|
617
203
|
}
|
|
618
204
|
}
|
|
619
205
|
let cacheKey = null;
|
|
@@ -748,154 +334,568 @@ async function handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, request
|
|
|
748
334
|
throw err;
|
|
749
335
|
}
|
|
750
336
|
};
|
|
751
|
-
const handleResponse = async (currentSpan)=>{
|
|
752
|
-
try {
|
|
753
|
-
var _cacheEntry_value;
|
|
754
|
-
const cacheEntry = await routeModule.handleResponse({
|
|
755
|
-
req,
|
|
756
|
-
nextConfig,
|
|
757
|
-
cacheKey,
|
|
758
|
-
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
759
|
-
isFallback: false,
|
|
760
|
-
previewProps,
|
|
761
|
-
prerenderManifest,
|
|
762
|
-
isRoutePPREnabled: false,
|
|
763
|
-
isOnDemandRevalidate,
|
|
764
|
-
revalidateOnlyGenerated,
|
|
765
|
-
responseGenerator,
|
|
766
|
-
waitUntil: ctx.waitUntil,
|
|
767
|
-
isMinimalMode
|
|
337
|
+
const handleResponse = async (currentSpan)=>{
|
|
338
|
+
try {
|
|
339
|
+
var _cacheEntry_value;
|
|
340
|
+
const cacheEntry = await routeModule.handleResponse({
|
|
341
|
+
req,
|
|
342
|
+
nextConfig,
|
|
343
|
+
cacheKey,
|
|
344
|
+
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
345
|
+
isFallback: false,
|
|
346
|
+
previewProps,
|
|
347
|
+
prerenderManifest,
|
|
348
|
+
isRoutePPREnabled: false,
|
|
349
|
+
isOnDemandRevalidate,
|
|
350
|
+
revalidateOnlyGenerated,
|
|
351
|
+
responseGenerator,
|
|
352
|
+
waitUntil: ctx.waitUntil,
|
|
353
|
+
isMinimalMode
|
|
354
|
+
});
|
|
355
|
+
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
356
|
+
throw cacheEntry.error;
|
|
357
|
+
}
|
|
358
|
+
// we don't create a cacheEntry for ISR
|
|
359
|
+
if (!isIsr) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
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) {
|
|
363
|
+
var _cacheEntry_value1;
|
|
364
|
+
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
365
|
+
}
|
|
366
|
+
if (!isMinimalMode) {
|
|
367
|
+
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
368
|
+
}
|
|
369
|
+
// Draft mode should never be cached
|
|
370
|
+
if (isDraftMode) {
|
|
371
|
+
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
372
|
+
}
|
|
373
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
374
|
+
if (!(isMinimalMode && isIsr)) {
|
|
375
|
+
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
376
|
+
}
|
|
377
|
+
// If cache control is already set on the response we don't
|
|
378
|
+
// override it to allow users to customize it via next.config
|
|
379
|
+
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
380
|
+
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
381
|
+
}
|
|
382
|
+
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'.
|
|
383
|
+
new Response(cacheEntry.value.body, {
|
|
384
|
+
headers,
|
|
385
|
+
status: cacheEntry.value.status || 200
|
|
386
|
+
}));
|
|
387
|
+
return;
|
|
388
|
+
} catch (err) {
|
|
389
|
+
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
390
|
+
const silenceLog = false;
|
|
391
|
+
await routeModule.onRequestError(req, err, {
|
|
392
|
+
routerKind: 'App Router',
|
|
393
|
+
routePath: normalizedSrcPage,
|
|
394
|
+
routeType: 'route',
|
|
395
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
396
|
+
isStaticGeneration: cacheKey !== null,
|
|
397
|
+
isOnDemandRevalidate
|
|
398
|
+
})
|
|
399
|
+
}, silenceLog, routerServerContext);
|
|
400
|
+
}
|
|
401
|
+
// rethrow so that we can handle serving error page
|
|
402
|
+
// If this is during static generation, throw the error again.
|
|
403
|
+
if (isIsr) throw err;
|
|
404
|
+
// Otherwise, send a 500 response unless the original response has
|
|
405
|
+
// already committed. In that case, preserve its status code for
|
|
406
|
+
// telemetry while still recording the failure and terminating a response
|
|
407
|
+
// that the failed pipeline left open.
|
|
408
|
+
if (res.headersSent) {
|
|
409
|
+
if (currentSpan) {
|
|
410
|
+
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
411
|
+
currentSpan.recordException(error);
|
|
412
|
+
currentSpan.setStatus({
|
|
413
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
414
|
+
message: error.message
|
|
415
|
+
});
|
|
416
|
+
currentSpan.setAttribute('error.type', error.name);
|
|
417
|
+
}
|
|
418
|
+
if (!res.writableEnded && !res.destroyed) {
|
|
419
|
+
res.end();
|
|
420
|
+
}
|
|
421
|
+
} else {
|
|
422
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
423
|
+
status: 500
|
|
424
|
+
}));
|
|
425
|
+
}
|
|
426
|
+
return;
|
|
427
|
+
} finally{
|
|
428
|
+
;
|
|
429
|
+
(()=>{
|
|
430
|
+
if (!currentSpan) {
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
let statusCode = res.statusCode;
|
|
434
|
+
currentSpan.setAttributes({
|
|
435
|
+
'http.status_code': statusCode,
|
|
436
|
+
'next.rsc': false
|
|
437
|
+
});
|
|
438
|
+
if (statusCode && statusCode >= 500) {
|
|
439
|
+
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
440
|
+
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
441
|
+
currentSpan.setStatus({
|
|
442
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
443
|
+
});
|
|
444
|
+
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
445
|
+
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
446
|
+
}
|
|
447
|
+
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
448
|
+
// We were unable to get attributes, probably OTEL is not enabled
|
|
449
|
+
if (!rootSpanAttributes) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
453
|
+
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
457
|
+
const name = `${method} ${route}`;
|
|
458
|
+
currentSpan.setAttributes({
|
|
459
|
+
'next.route': route,
|
|
460
|
+
'http.route': route,
|
|
461
|
+
'next.span_name': name
|
|
462
|
+
});
|
|
463
|
+
currentSpan.updateName(name);
|
|
464
|
+
// Propagate http.route to the request's root span if it isn't the
|
|
465
|
+
// request span (e.g. a platform-created HTTP span in adapter
|
|
466
|
+
// deployments).
|
|
467
|
+
if (requestRootSpan && requestRootSpan !== currentSpan) {
|
|
468
|
+
requestRootSpan.setAttribute('http.route', route);
|
|
469
|
+
requestRootSpan.updateName(name);
|
|
470
|
+
}
|
|
471
|
+
})();
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
// When invoked directly, the request span was started before `prepare`;
|
|
475
|
+
// record the request target as normalized by it. next-server's request span
|
|
476
|
+
// already has it.
|
|
477
|
+
if (!isWrappedByNextServer && req.url !== undefined) {
|
|
478
|
+
requestSpan == null ? void 0 : requestSpan.setAttribute('http.target', req.url);
|
|
479
|
+
}
|
|
480
|
+
await handleResponse(requestSpan);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
//# sourceMappingURL=app-route.js.map
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
/***/ }),
|
|
487
|
+
|
|
488
|
+
/***/ 79868:
|
|
489
|
+
/***/ ((module) => {
|
|
490
|
+
|
|
491
|
+
module.exports = require("node:sqlite");
|
|
492
|
+
|
|
493
|
+
/***/ }),
|
|
494
|
+
|
|
495
|
+
/***/ 108128:
|
|
496
|
+
/***/ ((module) => {
|
|
497
|
+
|
|
498
|
+
module.exports = require("next/dist/server/runtime-reacts.external.js");
|
|
499
|
+
|
|
500
|
+
/***/ }),
|
|
501
|
+
|
|
502
|
+
/***/ 157075:
|
|
503
|
+
/***/ ((module) => {
|
|
504
|
+
|
|
505
|
+
module.exports = require("node:stream");
|
|
506
|
+
|
|
507
|
+
/***/ }),
|
|
508
|
+
|
|
509
|
+
/***/ 176760:
|
|
510
|
+
/***/ ((module) => {
|
|
511
|
+
|
|
512
|
+
module.exports = require("node:path");
|
|
513
|
+
|
|
514
|
+
/***/ }),
|
|
515
|
+
|
|
516
|
+
/***/ 200261:
|
|
517
|
+
/***/ ((module) => {
|
|
518
|
+
|
|
519
|
+
module.exports = require("next/dist/shared/lib/router/utils/app-paths");
|
|
520
|
+
|
|
521
|
+
/***/ }),
|
|
522
|
+
|
|
523
|
+
/***/ 257975:
|
|
524
|
+
/***/ ((module) => {
|
|
525
|
+
|
|
526
|
+
module.exports = require("node:util");
|
|
527
|
+
|
|
528
|
+
/***/ }),
|
|
529
|
+
|
|
530
|
+
/***/ 309956:
|
|
531
|
+
/***/ ((module) => {
|
|
532
|
+
|
|
533
|
+
module.exports = require("undici");
|
|
534
|
+
|
|
535
|
+
/***/ }),
|
|
536
|
+
|
|
537
|
+
/***/ 328354:
|
|
538
|
+
/***/ ((module) => {
|
|
539
|
+
|
|
540
|
+
module.exports = require("util");
|
|
541
|
+
|
|
542
|
+
/***/ }),
|
|
543
|
+
|
|
544
|
+
/***/ 333873:
|
|
545
|
+
/***/ ((module) => {
|
|
546
|
+
|
|
547
|
+
module.exports = require("path");
|
|
548
|
+
|
|
549
|
+
/***/ }),
|
|
550
|
+
|
|
551
|
+
/***/ 344708:
|
|
552
|
+
/***/ ((module) => {
|
|
553
|
+
|
|
554
|
+
module.exports = require("node:https");
|
|
555
|
+
|
|
556
|
+
/***/ }),
|
|
557
|
+
|
|
558
|
+
/***/ 379551:
|
|
559
|
+
/***/ ((module) => {
|
|
560
|
+
|
|
561
|
+
module.exports = require("url");
|
|
562
|
+
|
|
563
|
+
/***/ }),
|
|
564
|
+
|
|
565
|
+
/***/ 380481:
|
|
566
|
+
/***/ ((module) => {
|
|
567
|
+
|
|
568
|
+
module.exports = require("node:readline");
|
|
569
|
+
|
|
570
|
+
/***/ }),
|
|
571
|
+
|
|
572
|
+
/***/ 399253:
|
|
573
|
+
/***/ ((module) => {
|
|
574
|
+
|
|
575
|
+
module.exports = import("@huggingface/transformers");;
|
|
576
|
+
|
|
577
|
+
/***/ }),
|
|
578
|
+
|
|
579
|
+
/***/ 419121:
|
|
580
|
+
/***/ ((module) => {
|
|
581
|
+
|
|
582
|
+
module.exports = require("next/dist/server/app-render/action-async-storage.external.js");
|
|
583
|
+
|
|
584
|
+
/***/ }),
|
|
585
|
+
|
|
586
|
+
/***/ 455511:
|
|
587
|
+
/***/ ((module) => {
|
|
588
|
+
|
|
589
|
+
module.exports = require("crypto");
|
|
590
|
+
|
|
591
|
+
/***/ }),
|
|
592
|
+
|
|
593
|
+
/***/ 478361:
|
|
594
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
595
|
+
|
|
596
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
597
|
+
/* harmony export */ $6: () => (/* binding */ findRoute),
|
|
598
|
+
/* harmony export */ Bn: () => (/* binding */ listRoutes),
|
|
599
|
+
/* harmony export */ DL: () => (/* binding */ updateRoute),
|
|
600
|
+
/* harmony export */ GB: () => (/* binding */ addIgnore),
|
|
601
|
+
/* harmony export */ KC: () => (/* binding */ bumpRouteLastSeenTs),
|
|
602
|
+
/* harmony export */ OO: () => (/* binding */ createBridge),
|
|
603
|
+
/* harmony export */ Pu: () => (/* binding */ deleteBridge),
|
|
604
|
+
/* harmony export */ V7: () => (/* binding */ deleteRoute),
|
|
605
|
+
/* harmony export */ X9: () => (/* binding */ listBridges),
|
|
606
|
+
/* harmony export */ aM: () => (/* binding */ getRoute),
|
|
607
|
+
/* harmony export */ e1: () => (/* binding */ getBridge),
|
|
608
|
+
/* harmony export */ gH: () => (/* binding */ getRouteLastSeenTsMap),
|
|
609
|
+
/* harmony export */ kZ: () => (/* binding */ listIgnores),
|
|
610
|
+
/* harmony export */ nE: () => (/* binding */ removeIgnore),
|
|
611
|
+
/* harmony export */ pi: () => (/* binding */ isIgnored),
|
|
612
|
+
/* harmony export */ po: () => (/* binding */ updateBridge),
|
|
613
|
+
/* harmony export */ un: () => (/* binding */ createRoute)
|
|
614
|
+
/* harmony export */ });
|
|
615
|
+
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(977598);
|
|
616
|
+
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(node_crypto__WEBPACK_IMPORTED_MODULE_0__);
|
|
617
|
+
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251244);
|
|
618
|
+
/* harmony import */ var _lib_db_transaction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(999043);
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
const now = ()=>new Date().toISOString();
|
|
623
|
+
// ---------------------------------------------------------------------------
|
|
624
|
+
// Bridge CRUD
|
|
625
|
+
// ---------------------------------------------------------------------------
|
|
626
|
+
function listBridges() {
|
|
627
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT * FROM bridges ORDER BY created_at ASC").all();
|
|
628
|
+
}
|
|
629
|
+
function getBridge(id) {
|
|
630
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT * FROM bridges WHERE id=?").get(id) ?? null;
|
|
631
|
+
}
|
|
632
|
+
function createBridge(input) {
|
|
633
|
+
const id = (0,node_crypto__WEBPACK_IMPORTED_MODULE_0__.randomUUID)();
|
|
634
|
+
const t = now();
|
|
635
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare(`INSERT INTO bridges (id, kind, name, status, qr, last_error, paired_id, enabled, forward_group_profile_updates, forward_group_participants_updates, created_at, updated_at)
|
|
636
|
+
VALUES (?, ?, ?, 'disconnected', NULL, NULL, NULL, 0, 1, 1, ?, ?)`).run(id, input.kind, input.name, t, t);
|
|
637
|
+
return {
|
|
638
|
+
id,
|
|
639
|
+
kind: input.kind,
|
|
640
|
+
name: input.name,
|
|
641
|
+
status: "disconnected",
|
|
642
|
+
qr: null,
|
|
643
|
+
last_error: null,
|
|
644
|
+
paired_id: null,
|
|
645
|
+
enabled: 0,
|
|
646
|
+
forward_group_profile_updates: 1,
|
|
647
|
+
forward_group_participants_updates: 1,
|
|
648
|
+
created_at: t,
|
|
649
|
+
updated_at: t
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
function updateBridge(id, patch) {
|
|
653
|
+
const existing = getBridge(id);
|
|
654
|
+
if (!existing) return null;
|
|
655
|
+
const merged = {
|
|
656
|
+
...existing,
|
|
657
|
+
name: patch.name ?? existing.name,
|
|
658
|
+
enabled: patch.enabled ?? existing.enabled,
|
|
659
|
+
status: patch.status ?? existing.status,
|
|
660
|
+
qr: patch.qr !== undefined ? patch.qr : existing.qr,
|
|
661
|
+
last_error: patch.last_error !== undefined ? patch.last_error : existing.last_error,
|
|
662
|
+
paired_id: patch.paired_id !== undefined ? patch.paired_id : existing.paired_id,
|
|
663
|
+
forward_group_profile_updates: patch.forward_group_profile_updates !== undefined ? patch.forward_group_profile_updates : existing.forward_group_profile_updates,
|
|
664
|
+
forward_group_participants_updates: patch.forward_group_participants_updates !== undefined ? patch.forward_group_participants_updates : existing.forward_group_participants_updates,
|
|
665
|
+
updated_at: now()
|
|
666
|
+
};
|
|
667
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare(`UPDATE bridges
|
|
668
|
+
SET name=?, enabled=?, status=?, qr=?, last_error=?, paired_id=?, forward_group_profile_updates=?, forward_group_participants_updates=?, updated_at=?
|
|
669
|
+
WHERE id=?`).run(merged.name, merged.enabled, merged.status, merged.qr, merged.last_error, merged.paired_id, merged.forward_group_profile_updates, merged.forward_group_participants_updates, merged.updated_at, id);
|
|
670
|
+
return merged;
|
|
671
|
+
}
|
|
672
|
+
function deleteBridge(id) {
|
|
673
|
+
return (0,_lib_db_transaction__WEBPACK_IMPORTED_MODULE_2__/* .withDbTransaction */ .J)(()=>{
|
|
674
|
+
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)();
|
|
675
|
+
db.prepare("DELETE FROM bridge_routes WHERE bridge_id=?").run(id);
|
|
676
|
+
db.prepare("DELETE FROM bridge_ignores WHERE bridge_id=?").run(id);
|
|
677
|
+
const r = db.prepare("DELETE FROM bridges WHERE id=?").run(id);
|
|
678
|
+
return r.changes > 0;
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
// ---------------------------------------------------------------------------
|
|
682
|
+
// Route CRUD
|
|
683
|
+
// ---------------------------------------------------------------------------
|
|
684
|
+
function listRoutes(bridgeId) {
|
|
685
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT * FROM bridge_routes WHERE bridge_id=? ORDER BY created_at ASC").all(bridgeId);
|
|
686
|
+
}
|
|
687
|
+
function getRoute(id) {
|
|
688
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT * FROM bridge_routes WHERE id=?").get(id) ?? null;
|
|
689
|
+
}
|
|
690
|
+
function findRoute(bridgeId, remoteJid) {
|
|
691
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT * FROM bridge_routes WHERE bridge_id=? AND remote_jid=?").get(bridgeId, remoteJid) ?? null;
|
|
692
|
+
}
|
|
693
|
+
function createRoute(input) {
|
|
694
|
+
const id = (0,node_crypto__WEBPACK_IMPORTED_MODULE_0__.randomUUID)();
|
|
695
|
+
const t = now();
|
|
696
|
+
const silent = input.silent_mode ? 1 : 0;
|
|
697
|
+
const respondTo = input.respond_to ?? "counterpart";
|
|
698
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare(`INSERT INTO bridge_routes (id, bridge_id, remote_jid, agent_id, label, silent_mode, respond_to, created_at, updated_at)
|
|
699
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, input.bridge_id, input.remote_jid, input.agent_id, input.label ?? null, silent, respondTo, t, t);
|
|
700
|
+
return {
|
|
701
|
+
id,
|
|
702
|
+
bridge_id: input.bridge_id,
|
|
703
|
+
remote_jid: input.remote_jid,
|
|
704
|
+
agent_id: input.agent_id,
|
|
705
|
+
label: input.label ?? null,
|
|
706
|
+
silent_mode: silent,
|
|
707
|
+
respond_to: respondTo,
|
|
708
|
+
last_seen_ts: null,
|
|
709
|
+
created_at: t,
|
|
710
|
+
updated_at: t
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
function updateRoute(id, patch) {
|
|
714
|
+
const existing = getRoute(id);
|
|
715
|
+
if (!existing) return null;
|
|
716
|
+
const merged = {
|
|
717
|
+
...existing,
|
|
718
|
+
remote_jid: patch.remote_jid ?? existing.remote_jid,
|
|
719
|
+
agent_id: patch.agent_id ?? existing.agent_id,
|
|
720
|
+
label: patch.label !== undefined ? patch.label : existing.label,
|
|
721
|
+
silent_mode: patch.silent_mode !== undefined ? patch.silent_mode ? 1 : 0 : existing.silent_mode,
|
|
722
|
+
respond_to: patch.respond_to ?? existing.respond_to,
|
|
723
|
+
updated_at: now()
|
|
724
|
+
};
|
|
725
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("UPDATE bridge_routes SET remote_jid=?, agent_id=?, label=?, silent_mode=?, respond_to=?, updated_at=? WHERE id=?").run(merged.remote_jid, merged.agent_id, merged.label, merged.silent_mode, merged.respond_to, merged.updated_at, id);
|
|
726
|
+
return merged;
|
|
727
|
+
}
|
|
728
|
+
function deleteRoute(id) {
|
|
729
|
+
const r = (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("DELETE FROM bridge_routes WHERE id=?").run(id);
|
|
730
|
+
return r.changes > 0;
|
|
731
|
+
}
|
|
732
|
+
// Catch-up watermark. The WhatsApp adapter calls this with the
|
|
733
|
+
// messageTimestamp (epoch ms) of the most recent inbound that reached the
|
|
734
|
+
// agent. Only writes when `ts` is strictly greater than the persisted
|
|
735
|
+
// value so out-of-order replays from the server-side backlog can't roll
|
|
736
|
+
// the watermark backward. No-op when no route exists for the pair
|
|
737
|
+
// (catch-all routing handles those at the dispatcher layer).
|
|
738
|
+
function bumpRouteLastSeenTs(bridgeId, remoteJid, ts) {
|
|
739
|
+
if (!Number.isFinite(ts) || ts <= 0) return;
|
|
740
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("UPDATE bridge_routes SET last_seen_ts=? WHERE bridge_id=? AND remote_jid=? AND (last_seen_ts IS NULL OR last_seen_ts < ?)").run(ts, bridgeId, remoteJid, ts);
|
|
741
|
+
}
|
|
742
|
+
// Per-chat watermarks for every explicitly routed chat on a bridge, loaded
|
|
743
|
+
// once per upsert batch. Each chat is gated only by its own progress: a
|
|
744
|
+
// bridge-wide maximum would drop chat B's offline backlog as soon as a newer
|
|
745
|
+
// message from chat A had been delivered.
|
|
746
|
+
function getRouteLastSeenTsMap(bridgeId) {
|
|
747
|
+
const rows = (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT remote_jid, last_seen_ts FROM bridge_routes WHERE bridge_id=? AND last_seen_ts IS NOT NULL").all(bridgeId);
|
|
748
|
+
return new Map(rows.map((r)=>[
|
|
749
|
+
r.remote_jid,
|
|
750
|
+
r.last_seen_ts
|
|
751
|
+
]));
|
|
752
|
+
}
|
|
753
|
+
// ---------------------------------------------------------------------------
|
|
754
|
+
// Ignore-list CRUD (per-bridge chat blocklist)
|
|
755
|
+
//
|
|
756
|
+
// Independent from routes: an ignore entry short-circuits the router even
|
|
757
|
+
// when an explicit route or catch-all would otherwise match. The intent
|
|
758
|
+
// is "listen to everything EXCEPT these chats" — messages from ignored
|
|
759
|
+
// chats are dropped before any agent runs, so no history, no memory, no
|
|
760
|
+
// tools. Delete the entry to resume forwarding.
|
|
761
|
+
// ---------------------------------------------------------------------------
|
|
762
|
+
function listIgnores(bridgeId) {
|
|
763
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT * FROM bridge_ignores WHERE bridge_id=? ORDER BY created_at ASC").all(bridgeId);
|
|
764
|
+
}
|
|
765
|
+
function isIgnored(bridgeId, remoteJid) {
|
|
766
|
+
const row = (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT 1 FROM bridge_ignores WHERE bridge_id=? AND remote_jid=? LIMIT 1").get(bridgeId, remoteJid);
|
|
767
|
+
return !!row;
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Add a chat to the bridge's ignore list. Idempotent — re-adding the
|
|
771
|
+
* same (bridge_id, remote_jid) throws a SQLite UNIQUE violation which
|
|
772
|
+
* the caller can surface as a 409. Callers who want upsert semantics
|
|
773
|
+
* should catch and update the label separately.
|
|
774
|
+
*/ function addIgnore(input) {
|
|
775
|
+
const id = (0,node_crypto__WEBPACK_IMPORTED_MODULE_0__.randomUUID)();
|
|
776
|
+
const t = now();
|
|
777
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare(`INSERT INTO bridge_ignores (id, bridge_id, remote_jid, label, created_at)
|
|
778
|
+
VALUES (?, ?, ?, ?, ?)`).run(id, input.bridge_id, input.remote_jid, input.label ?? null, t);
|
|
779
|
+
return {
|
|
780
|
+
id,
|
|
781
|
+
bridge_id: input.bridge_id,
|
|
782
|
+
remote_jid: input.remote_jid,
|
|
783
|
+
label: input.label ?? null,
|
|
784
|
+
created_at: t
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
function removeIgnore(bridgeId, remoteJid) {
|
|
788
|
+
const r = (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("DELETE FROM bridge_ignores WHERE bridge_id=? AND remote_jid=?").run(bridgeId, remoteJid);
|
|
789
|
+
return r.changes > 0;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
/***/ }),
|
|
794
|
+
|
|
795
|
+
/***/ 529294:
|
|
796
|
+
/***/ ((module) => {
|
|
797
|
+
|
|
798
|
+
module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
|
|
799
|
+
|
|
800
|
+
/***/ }),
|
|
801
|
+
|
|
802
|
+
/***/ 541903:
|
|
803
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
804
|
+
|
|
805
|
+
__webpack_require__.r(__webpack_exports__);
|
|
806
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
807
|
+
/* harmony export */ GET: () => (/* binding */ GET),
|
|
808
|
+
/* harmony export */ POST: () => (/* binding */ POST)
|
|
809
|
+
/* harmony export */ });
|
|
810
|
+
/* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(945592);
|
|
811
|
+
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(497377);
|
|
812
|
+
/* harmony import */ var _lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(478361);
|
|
813
|
+
/* harmony import */ var _lib_utils_error__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(922032);
|
|
814
|
+
/* harmony import */ var _lib_api_responses__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(739947);
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
function toResponse(r) {
|
|
821
|
+
return {
|
|
822
|
+
id: r.id,
|
|
823
|
+
bridge_id: r.bridge_id,
|
|
824
|
+
remote_jid: r.remote_jid,
|
|
825
|
+
label: r.label,
|
|
826
|
+
created_at: r.created_at
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
async function GET(_req, { params }) {
|
|
830
|
+
const { id } = await params;
|
|
831
|
+
if (!(0,_lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__/* .getBridge */ .e1)(id)) return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
832
|
+
error: "not found"
|
|
833
|
+
}, {
|
|
834
|
+
status: 404
|
|
835
|
+
});
|
|
836
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json((0,_lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__/* .listIgnores */ .kZ)(id).map(toResponse));
|
|
837
|
+
}
|
|
838
|
+
// The catch-all sentinel ('*') is deliberately rejected here — ignoring
|
|
839
|
+
// the catch-all would silently mute an entire bridge, which is what
|
|
840
|
+
// disabling or deleting the catch-all route already achieves cleanly.
|
|
841
|
+
const CreateSchema = zod__WEBPACK_IMPORTED_MODULE_3__/* .object */ .Ikc({
|
|
842
|
+
remote_jid: zod__WEBPACK_IMPORTED_MODULE_3__/* .string */ .YjP().trim().min(3).refine((v)=>v !== "*", {
|
|
843
|
+
message: "Cannot ignore the catch-all sentinel ('*'). Delete the catch-all route instead."
|
|
844
|
+
}),
|
|
845
|
+
label: zod__WEBPACK_IMPORTED_MODULE_3__/* .string */ .YjP().trim().max(120).optional().nullable()
|
|
846
|
+
});
|
|
847
|
+
async function POST(req, { params }) {
|
|
848
|
+
const { id } = await params;
|
|
849
|
+
if (!(0,_lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__/* .getBridge */ .e1)(id)) return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
850
|
+
error: "not found"
|
|
851
|
+
}, {
|
|
852
|
+
status: 404
|
|
853
|
+
});
|
|
854
|
+
const parsed = await (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_2__/* .validateBody */ .Jb)(req, CreateSchema);
|
|
855
|
+
if (parsed instanceof next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse) return parsed;
|
|
856
|
+
try {
|
|
857
|
+
const row = (0,_lib_stores_bridges__WEBPACK_IMPORTED_MODULE_1__/* .addIgnore */ .GB)({
|
|
858
|
+
bridge_id: id,
|
|
859
|
+
remote_jid: parsed.remote_jid,
|
|
860
|
+
label: parsed.label ?? null
|
|
861
|
+
});
|
|
862
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(toResponse(row), {
|
|
863
|
+
status: 201
|
|
864
|
+
});
|
|
865
|
+
} catch (err) {
|
|
866
|
+
const m = (0,_lib_utils_error__WEBPACK_IMPORTED_MODULE_4__/* .errorMessage */ .g)(err);
|
|
867
|
+
if (/UNIQUE/.test(m)) {
|
|
868
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
869
|
+
error: "That chat is already on the ignore list."
|
|
870
|
+
}, {
|
|
871
|
+
status: 409
|
|
768
872
|
});
|
|
769
|
-
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
770
|
-
throw cacheEntry.error;
|
|
771
|
-
}
|
|
772
|
-
// we don't create a cacheEntry for ISR
|
|
773
|
-
if (!isIsr) {
|
|
774
|
-
return;
|
|
775
|
-
}
|
|
776
|
-
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) {
|
|
777
|
-
var _cacheEntry_value1;
|
|
778
|
-
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
779
|
-
}
|
|
780
|
-
if (!isMinimalMode) {
|
|
781
|
-
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
782
|
-
}
|
|
783
|
-
// Draft mode should never be cached
|
|
784
|
-
if (isDraftMode) {
|
|
785
|
-
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
786
|
-
}
|
|
787
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
788
|
-
if (!(isMinimalMode && isIsr)) {
|
|
789
|
-
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
790
|
-
}
|
|
791
|
-
// If cache control is already set on the response we don't
|
|
792
|
-
// override it to allow users to customize it via next.config
|
|
793
|
-
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
794
|
-
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
795
|
-
}
|
|
796
|
-
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'.
|
|
797
|
-
new Response(cacheEntry.value.body, {
|
|
798
|
-
headers,
|
|
799
|
-
status: cacheEntry.value.status || 200
|
|
800
|
-
}));
|
|
801
|
-
return;
|
|
802
|
-
} catch (err) {
|
|
803
|
-
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
804
|
-
const silenceLog = false;
|
|
805
|
-
await routeModule.onRequestError(req, err, {
|
|
806
|
-
routerKind: 'App Router',
|
|
807
|
-
routePath: normalizedSrcPage,
|
|
808
|
-
routeType: 'route',
|
|
809
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
810
|
-
isStaticGeneration: cacheKey !== null,
|
|
811
|
-
isOnDemandRevalidate
|
|
812
|
-
})
|
|
813
|
-
}, silenceLog, routerServerContext);
|
|
814
|
-
}
|
|
815
|
-
// rethrow so that we can handle serving error page
|
|
816
|
-
// If this is during static generation, throw the error again.
|
|
817
|
-
if (isIsr) throw err;
|
|
818
|
-
// Otherwise, send a 500 response unless the original response has
|
|
819
|
-
// already committed. In that case, preserve its status code for
|
|
820
|
-
// telemetry while still recording the failure and terminating a response
|
|
821
|
-
// that the failed pipeline left open.
|
|
822
|
-
if (res.headersSent) {
|
|
823
|
-
if (currentSpan) {
|
|
824
|
-
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
825
|
-
currentSpan.recordException(error);
|
|
826
|
-
currentSpan.setStatus({
|
|
827
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
828
|
-
message: error.message
|
|
829
|
-
});
|
|
830
|
-
currentSpan.setAttribute('error.type', error.name);
|
|
831
|
-
}
|
|
832
|
-
if (!res.writableEnded && !res.destroyed) {
|
|
833
|
-
res.end();
|
|
834
|
-
}
|
|
835
|
-
} else {
|
|
836
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
837
|
-
status: 500
|
|
838
|
-
}));
|
|
839
|
-
}
|
|
840
|
-
return;
|
|
841
|
-
} finally{
|
|
842
|
-
;
|
|
843
|
-
(()=>{
|
|
844
|
-
if (!currentSpan) {
|
|
845
|
-
return;
|
|
846
|
-
}
|
|
847
|
-
let statusCode = res.statusCode;
|
|
848
|
-
currentSpan.setAttributes({
|
|
849
|
-
'http.status_code': statusCode,
|
|
850
|
-
'next.rsc': false
|
|
851
|
-
});
|
|
852
|
-
if (statusCode && statusCode >= 500) {
|
|
853
|
-
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
854
|
-
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
855
|
-
currentSpan.setStatus({
|
|
856
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
857
|
-
});
|
|
858
|
-
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
859
|
-
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
860
|
-
}
|
|
861
|
-
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
862
|
-
// We were unable to get attributes, probably OTEL is not enabled
|
|
863
|
-
if (!rootSpanAttributes) {
|
|
864
|
-
return;
|
|
865
|
-
}
|
|
866
|
-
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
867
|
-
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
868
|
-
return;
|
|
869
|
-
}
|
|
870
|
-
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
871
|
-
const name = `${method} ${route}`;
|
|
872
|
-
currentSpan.setAttributes({
|
|
873
|
-
'next.route': route,
|
|
874
|
-
'http.route': route,
|
|
875
|
-
'next.span_name': name
|
|
876
|
-
});
|
|
877
|
-
currentSpan.updateName(name);
|
|
878
|
-
// Propagate http.route to the request's root span if it isn't the
|
|
879
|
-
// request span (e.g. a platform-created HTTP span in adapter
|
|
880
|
-
// deployments).
|
|
881
|
-
if (requestRootSpan && requestRootSpan !== currentSpan) {
|
|
882
|
-
requestRootSpan.setAttribute('http.route', route);
|
|
883
|
-
requestRootSpan.updateName(name);
|
|
884
|
-
}
|
|
885
|
-
})();
|
|
886
873
|
}
|
|
887
|
-
|
|
888
|
-
// When invoked directly, the request span was started before `prepare`;
|
|
889
|
-
// record the request target as normalized by it. next-server's request span
|
|
890
|
-
// already has it.
|
|
891
|
-
if (!isWrappedByNextServer && req.url !== undefined) {
|
|
892
|
-
requestSpan == null ? void 0 : requestSpan.setAttribute('http.target', req.url);
|
|
874
|
+
throw err;
|
|
893
875
|
}
|
|
894
|
-
await handleResponse(requestSpan);
|
|
895
876
|
}
|
|
896
877
|
|
|
897
|
-
//# sourceMappingURL=app-route.js.map
|
|
898
878
|
|
|
879
|
+
/***/ }),
|
|
880
|
+
|
|
881
|
+
/***/ 594735:
|
|
882
|
+
/***/ ((module) => {
|
|
883
|
+
|
|
884
|
+
module.exports = require("events");
|
|
885
|
+
|
|
886
|
+
/***/ }),
|
|
887
|
+
|
|
888
|
+
/***/ 629021:
|
|
889
|
+
/***/ ((module) => {
|
|
890
|
+
|
|
891
|
+
module.exports = require("fs");
|
|
892
|
+
|
|
893
|
+
/***/ }),
|
|
894
|
+
|
|
895
|
+
/***/ 638522:
|
|
896
|
+
/***/ ((module) => {
|
|
897
|
+
|
|
898
|
+
module.exports = require("node:zlib");
|
|
899
899
|
|
|
900
900
|
/***/ }),
|
|
901
901
|
|
|
@@ -1096,7 +1096,7 @@ module.exports = require("next/dist/shared/lib/no-fallback-error.external");
|
|
|
1096
1096
|
var __webpack_require__ = require("../../../../../../webpack-runtime.js");
|
|
1097
1097
|
__webpack_require__.C(exports);
|
|
1098
1098
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
1099
|
-
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,4891,4992,1244], () => (__webpack_exec__(
|
|
1099
|
+
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,4891,4992,1244], () => (__webpack_exec__(57414)));
|
|
1100
1100
|
module.exports = __webpack_exports__;
|
|
1101
1101
|
|
|
1102
1102
|
})();
|