@circuitwall/jarela 2.2.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +2 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +8 -0
- package/.next/standalone/.next/server/app/_global-error/page.js +68 -68
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +76 -76
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/v1/access/[identity]/route.js +100 -93
- package/.next/standalone/.next/server/app/api/v1/access/route.js +176 -169
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +89 -56
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/display-filters/route.js +139 -127
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/route.js +107 -100
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/thread/route.js +765 -753
- package/.next/standalone/.next/server/app/api/v1/agents/route.js +72 -65
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +371 -364
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +809 -802
- package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +9 -2
- package/.next/standalone/.next/server/app/api/v1/attachments/files/route.js +49 -49
- package/.next/standalone/.next/server/app/api/v1/attachments/images/route.js +910 -910
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +583 -16
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/[remote_jid]/route.js +41 -30
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +48 -37
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +697 -130
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js +703 -136
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js +796 -229
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/[route_id]/route.js +762 -746
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +1050 -1034
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +673 -106
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js +811 -804
- package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js +718 -706
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/config/route.js +85 -85
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js +709 -709
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/currency/route.js +10 -10
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js +796 -784
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +30 -23
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js +86 -86
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js +57 -57
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/search/route.js +385 -378
- package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js +122 -122
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/env/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/env-sync/allowlist/route.js +375 -368
- package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/events/route.js +745 -178
- package/.next/standalone/.next/server/app/api/v1/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/events/test/route.js +77 -77
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +763 -763
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/browser/activate/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +16 -9
- package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +72 -65
- package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +41 -34
- package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +211 -204
- package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +140 -133
- package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +113 -106
- package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +121 -114
- package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +141 -134
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +690 -690
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js +185 -185
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js +171 -171
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js +396 -396
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js +212 -212
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/files/[name]/route.js +235 -235
- package/.next/standalone/.next/server/app/api/v1/fs/browse/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/harnesses/[id]/route.js +228 -221
- package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +65 -58
- package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +79 -72
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/health/route.js +783 -771
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +140 -133
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/callback/route.js +370 -363
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +240 -233
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +689 -682
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +886 -879
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +115 -108
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +955 -948
- package/.next/standalone/.next/server/app/api/v1/integrations/route.js +223 -216
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +876 -847
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/local-file/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/logs/route.js +70 -70
- package/.next/standalone/.next/server/app/api/v1/maps/embed/route.js +79 -72
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +991 -979
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/registry/route.js +196 -196
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/route.js +19 -7
- package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +539 -532
- package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +86 -79
- package/.next/standalone/.next/server/app/api/v1/memory/route.js +58 -51
- package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +138 -131
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +381 -369
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +150 -143
- package/.next/standalone/.next/server/app/api/v1/models/route.js +634 -627
- package/.next/standalone/.next/server/app/api/v1/packages/catalog/route.js +445 -445
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js +120 -120
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js +234 -234
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js +407 -407
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js +107 -107
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js +228 -228
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/route.js +148 -148
- package/.next/standalone/.next/server/app/api/v1/packages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js +787 -787
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js +529 -514
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js +181 -181
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js +258 -258
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/profile/location/route.js +37 -30
- package/.next/standalone/.next/server/app/api/v1/profile/route.js +171 -164
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +51 -44
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +15 -8
- package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +171 -164
- package/.next/standalone/.next/server/app/api/v1/providers/route.js +101 -94
- package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +457 -450
- package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +44 -37
- package/.next/standalone/.next/server/app/api/v1/redaction/route.js +65 -58
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +617 -605
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/route.js +739 -732
- package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +329 -322
- package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +204 -197
- package/.next/standalone/.next/server/app/api/v1/security/state/route.js +58 -51
- package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +183 -176
- package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +194 -187
- package/.next/standalone/.next/server/app/api/v1/setup/test-key/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/skills/[id]/route.js +776 -769
- package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +122 -115
- package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +334 -327
- package/.next/standalone/.next/server/app/api/v1/skills/route.js +873 -866
- package/.next/standalone/.next/server/app/api/v1/system/abort/route.js +838 -808
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js +177 -177
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/tailscale/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/tasks/[agent_id]/route.js +122 -115
- package/.next/standalone/.next/server/app/api/v1/tasks/route.js +30 -23
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js +1436 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js +638 -631
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js +60 -439
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +172 -173
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/route.js +925 -913
- package/.next/standalone/.next/server/app/api/v1/tools/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js +17 -17
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/route.js +570 -570
- package/.next/standalone/.next/server/app/api/v1/voice/transcribe/route.js +241 -229
- package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +989 -977
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +40 -28
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/watchers/reaction-scripts/route.js +128 -128
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/icon.svg/route.js +62 -62
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +436 -436
- package/.next/standalone/.next/server/app/page.js +1179 -743
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page.js +99 -91
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +2 -1
- package/.next/standalone/.next/server/chunks/{424.js → 1388.js} +441 -1022
- package/.next/standalone/.next/server/chunks/1433.js +1 -1
- package/.next/standalone/.next/server/chunks/1638.js +1 -2
- package/.next/standalone/.next/server/chunks/1738.js +1 -1
- package/.next/standalone/.next/server/chunks/2068.js +47 -10
- package/.next/standalone/.next/server/chunks/210.js +3 -3
- package/.next/standalone/.next/server/chunks/2151.js +31 -1
- package/.next/standalone/.next/server/chunks/2207.js +1 -0
- package/.next/standalone/.next/server/chunks/2447.js +10 -5
- package/.next/standalone/.next/server/chunks/2471.js +45 -45
- package/.next/standalone/.next/server/chunks/2504.js +1 -1
- package/.next/standalone/.next/server/chunks/2695.js +17 -17
- package/.next/standalone/.next/server/chunks/3042.js +24 -16
- package/.next/standalone/.next/server/chunks/{4540.js → 309.js} +104 -38
- package/.next/standalone/.next/server/chunks/{2350.js → 3272.js} +104 -37
- package/.next/standalone/.next/server/chunks/3399.js +526 -526
- package/.next/standalone/.next/server/chunks/3524.js +150 -67
- package/.next/standalone/.next/server/chunks/3566.js +1 -1
- package/.next/standalone/.next/server/chunks/4189.js +946 -0
- package/.next/standalone/.next/server/chunks/4433.js +146 -146
- package/.next/standalone/.next/server/chunks/4508.js +3 -3
- package/.next/standalone/.next/server/chunks/4588.js +1 -0
- package/.next/standalone/.next/server/chunks/46.js +78 -28
- package/.next/standalone/.next/server/chunks/466.js +12 -0
- package/.next/standalone/.next/server/chunks/4868.js +206 -206
- package/.next/standalone/.next/server/chunks/4992.js +13 -0
- package/.next/standalone/.next/server/chunks/5120.js +963 -0
- package/.next/standalone/.next/server/chunks/5701.js +1 -1
- package/.next/standalone/.next/server/chunks/5900.js +1 -1
- package/.next/standalone/.next/server/chunks/5908.js +63 -42
- package/.next/standalone/.next/server/chunks/6142.js +10 -2
- package/.next/standalone/.next/server/chunks/6210.js +1 -0
- package/.next/standalone/.next/server/chunks/6213.js +1 -1
- package/.next/standalone/.next/server/chunks/6649.js +3 -3
- package/.next/standalone/.next/server/chunks/6703.js +3 -3
- package/.next/standalone/.next/server/chunks/7445.js +1 -0
- package/.next/standalone/.next/server/chunks/8067.js +12 -0
- package/.next/standalone/.next/server/chunks/8461.js +24 -17
- package/.next/standalone/.next/server/chunks/8558.js +1 -1
- package/.next/standalone/.next/server/chunks/8724.js +1 -1
- package/.next/standalone/.next/server/chunks/8849.js +91 -91
- package/.next/standalone/.next/server/chunks/9032.js +4 -3
- package/.next/standalone/.next/server/chunks/{2563.js → 9164.js} +33389 -31418
- package/.next/standalone/.next/server/chunks/9237.js +396 -396
- package/.next/standalone/.next/server/chunks/{9640.js → 9304.js} +1672 -575
- package/.next/standalone/.next/server/chunks/9406.js +1 -1
- package/.next/standalone/.next/server/chunks/9590.js +68 -18
- package/.next/standalone/.next/server/chunks/9824.js +98 -98
- package/.next/standalone/.next/server/chunks/9826.js +1 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware.js +486 -415
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/preview-props.json +3 -3
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{1395-a340fb0a345382a4.js → 1395-e4a99912b8f83044.js} +13 -1
- package/.next/standalone/.next/static/chunks/app/_global-error/{page-36cb8b428b38b26a.js → page-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/{page-7017f07f8a7a083c.js → page-04748847c6ff866f.js} +1013 -585
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/css/{d80058f0b9b41c09.css → 2669e8744cc8c212.css} +2 -2
- package/.next/standalone/docs/adoption/changesets.json +358 -0
- package/.next/standalone/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/.next/standalone/package.json +3 -3
- package/CHANGELOG.md +44 -0
- package/api/client.ts +9 -0
- package/api/types.ts +29 -0
- package/app/api/v1/lifecycle/adoption/route.ts +14 -2
- package/app/api/v1/models/[name]/compact-threads/route.ts +14 -11
- package/app/api/v1/threads/[thread_id]/activity/route.ts +19 -0
- package/app/api/v1/threads/[thread_id]/context-pin/route.test.ts +1 -0
- package/app/api/v1/threads/[thread_id]/context-pin/route.ts +2 -1
- package/app/api/v1/threads/[thread_id]/route.ts +5 -1
- package/app/api/v1/threads/[thread_id]/run/route.ts +0 -1
- package/components/chat/ChatView.tsx +52 -11
- package/components/chat/ContextBoundary.test.tsx +68 -1
- package/components/chat/ContextBoundary.tsx +92 -13
- package/components/chat/MessageBubble.tsx +12 -0
- package/components/chat/MessageList.test.tsx +31 -0
- package/components/chat/MessageList.tsx +49 -28
- package/components/chat/ToolList.test.tsx +92 -16
- package/components/chat/ToolList.tsx +59 -4
- package/components/chat/chat-helpers.test.tsx +24 -1
- package/components/chat/chat-helpers.ts +47 -4
- package/components/chat/useThreadActivity.test.tsx +113 -0
- package/components/chat/useThreadActivity.ts +94 -0
- package/components/chat/useThreadData.ts +16 -16
- package/components/chat/workflow-step-retry.ts +25 -0
- package/components/integrations/NetworkSection.tsx +2 -2
- package/components/ui/BootScreen.tsx +17 -0
- package/components/ui/WorkflowChecklist.tsx +71 -33
- package/hooks/useSSE.ts +28 -3
- package/lib/agents/citation-checker.test.ts +40 -2
- package/lib/agents/citation-checker.ts +56 -11
- package/lib/agents/compaction-pipeline.test.ts +202 -0
- package/lib/agents/compaction-pipeline.ts +483 -0
- package/lib/agents/context-boundary.ts +5 -6
- package/lib/agents/conversation-summary.ts +37 -21
- package/lib/agents/instruction-edits.test.ts +120 -0
- package/lib/agents/instruction-edits.ts +65 -42
- package/lib/agents/prepare/history-window.test.ts +18 -0
- package/lib/agents/prepare/history-window.ts +11 -2
- package/lib/agents/prepare/request.ts +4 -2
- package/lib/agents/prepare/system-prompt.test.ts +49 -0
- package/lib/agents/prepare/system-prompt.ts +16 -5
- package/lib/agents/prompt-registry.test.ts +5 -140
- package/lib/agents/prompt-registry.ts +45 -1
- package/lib/agents/prompt-variants.ts +146 -0
- package/lib/agents/proposals.test.ts +76 -0
- package/lib/agents/proposals.ts +13 -5
- package/lib/agents/run-registry.test.ts +22 -0
- package/lib/agents/run-registry.ts +29 -0
- package/lib/agents/run-thread.auto-boundary.test.ts +125 -5
- package/lib/agents/run-thread.retry.test.ts +67 -1
- package/lib/agents/run-thread.ts +110 -10
- package/lib/agents/sqlite-checkpoint-saver.test.ts +91 -0
- package/lib/agents/thread-activity.test.ts +31 -0
- package/lib/agents/thread-activity.ts +27 -0
- package/lib/agents/thread-compaction-state.test.ts +82 -0
- package/lib/agents/thread-compaction-state.ts +121 -0
- package/lib/agents/thread-compaction.test.ts +83 -4
- package/lib/agents/thread-compaction.ts +34 -11
- package/lib/agents/warm-summary-background.test.ts +219 -5
- package/lib/agents/warm-summary-background.ts +346 -143
- package/lib/agents/warm-topics.test.ts +191 -0
- package/lib/agents/warm-topics.ts +317 -0
- package/lib/agents/workflow-step-retry.test.ts +96 -0
- package/lib/agents/workflow-step-retry.ts +216 -0
- package/lib/api/browser-control.ts +0 -3
- package/lib/bridges/dispatcher.ts +1 -0
- package/lib/bridges/message-role.test.ts +81 -0
- package/lib/bridges/message-role.ts +23 -10
- package/lib/bridges/types.ts +6 -0
- package/lib/bridges/whatsapp-link.test.ts +32 -0
- package/lib/bridges/whatsapp-link.ts +21 -0
- package/lib/bridges/whatsapp.inbound.test.ts +239 -0
- package/lib/bridges/whatsapp.sender.test.ts +80 -1
- package/lib/bridges/whatsapp.ts +76 -38
- package/lib/db/migrations.ts +5 -0
- package/lib/env/config.ts +2 -0
- package/lib/env/schema.ts +12 -0
- package/lib/lifecycle/changeset-build.test.ts +93 -0
- package/lib/lifecycle/changeset-build.ts +210 -0
- package/lib/lifecycle/changesets.test.ts +101 -0
- package/lib/lifecycle/changesets.ts +166 -0
- package/lib/lifecycle/surface-collect.test.ts +88 -0
- package/lib/lifecycle/surface-collect.ts +64 -0
- package/lib/lifecycle/surface-snapshot.test.ts +104 -0
- package/lib/lifecycle/surface-snapshot.ts +210 -0
- package/lib/memory/record.ts +0 -2
- package/lib/pricing/snapshot.test.ts +70 -0
- package/lib/pricing/snapshot.ts +10 -2
- package/lib/providers/external.ts +0 -2
- package/lib/proxy/dispatcher.test.ts +119 -1
- package/lib/proxy/dispatcher.ts +22 -9
- package/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/lib/stores/agent-configs.ts +10 -5
- package/lib/stores/bridges.test.ts +81 -0
- package/lib/stores/bridges.ts +9 -8
- package/lib/stores/proxy-config.test.ts +120 -0
- package/lib/stores/proxy-config.ts +22 -4
- package/lib/stores/threads.test.ts +9 -0
- package/lib/stores/threads.ts +33 -19
- package/lib/stores/version-adoption.test.ts +96 -0
- package/lib/stores/version-adoption.ts +239 -26
- package/lib/stores/workflow-progress.ts +3 -0
- package/lib/tools/communications/calendar.test.ts +43 -2
- package/lib/tools/communications/calendar.ts +2 -0
- package/lib/tools/communications/gmail.test.ts +51 -1
- package/lib/tools/communications/gmail.ts +44 -2
- package/lib/tools/communications/ms-todo.ts +0 -7
- package/lib/tools/communications/outlook-calendar.ts +2 -0
- package/lib/tools/communications/outlook.test.ts +33 -2
- package/lib/tools/communications/outlook.ts +2 -0
- package/lib/tools/filesystem/edit-match.test.ts +133 -0
- package/lib/tools/filesystem/edit-match.ts +7 -2
- package/lib/tools/general/memory.ts +1 -1
- package/lib/tools/general/workflow-progress.ts +2 -0
- package/lib/tools/runtime/catalog.ts +1 -25
- package/lib/tools/support/result-refs.test.ts +131 -0
- package/lib/tools/support/result-refs.ts +41 -9
- package/lib/triggers/registry.ts +0 -4
- package/lib/utils/source-link.test.ts +51 -0
- package/lib/utils/source-link.ts +45 -0
- package/package.json +3 -3
- package/scripts/install-to-system.ps1 +39 -11
- package/scripts/install-to-system.sh +37 -3
- package/.next/standalone/.next/server/chunks/3979.js +0 -581
- package/.next/standalone/.next/server/chunks/5936.js +0 -594
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-36cb8b428b38b26a.js +0 -17
- /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → hwujW4hR1b-r3k5WdMxZO}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → hwujW4hR1b-r3k5WdMxZO}/_ssgManifest.js +0 -0
|
@@ -31,6 +31,573 @@ module.exports = require("url");
|
|
|
31
31
|
|
|
32
32
|
module.exports = require("next/dist/server/app-render/after-task-async-storage.external.js");
|
|
33
33
|
|
|
34
|
+
/***/ }),
|
|
35
|
+
|
|
36
|
+
/***/ 3979:
|
|
37
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
// EXPORTS
|
|
41
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
42
|
+
AX: () => (/* binding */ getBridgeRuntimeStatus),
|
|
43
|
+
HQ: () => (/* binding */ isBridgeRunning),
|
|
44
|
+
FN: () => (/* binding */ listBridgeChats),
|
|
45
|
+
qM: () => (/* binding */ lookupBridgeChat),
|
|
46
|
+
s: () => (/* binding */ removeBridgeAuth),
|
|
47
|
+
V_: () => (/* binding */ repairBridge),
|
|
48
|
+
kn: () => (/* binding */ startAllBridges),
|
|
49
|
+
c0: () => (/* binding */ startBridge),
|
|
50
|
+
aq: () => (/* binding */ stopBridge)
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
// UNUSED EXPORTS: restartBridge, stopAllBridges
|
|
54
|
+
|
|
55
|
+
// EXTERNAL MODULE: ./lib/stores/bridges.ts
|
|
56
|
+
var bridges = __webpack_require__(78361);
|
|
57
|
+
// EXTERNAL MODULE: ./lib/notifications/bus.ts
|
|
58
|
+
var bus = __webpack_require__(76445);
|
|
59
|
+
// EXTERNAL MODULE: ./lib/utils/global-state.ts
|
|
60
|
+
var global_state = __webpack_require__(15559);
|
|
61
|
+
// EXTERNAL MODULE: ./lib/stores/threads.ts
|
|
62
|
+
var threads = __webpack_require__(83042);
|
|
63
|
+
// EXTERNAL MODULE: ./lib/stores/agent-configs.ts
|
|
64
|
+
var agent_configs = __webpack_require__(41720);
|
|
65
|
+
// EXTERNAL MODULE: ./lib/agents/agent-turn.ts
|
|
66
|
+
var agent_turn = __webpack_require__(62032);
|
|
67
|
+
;// ./lib/bridges/router.ts
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Resolve which agent should handle an inbound message on (bridge, remote_jid).
|
|
71
|
+
* 0) Chat is on the ignore list → null (message dropped before any agent
|
|
72
|
+
* thread, memory write, or tool call runs — the "listen to everything
|
|
73
|
+
* except these chats" primitive).
|
|
74
|
+
* 1) Exact route match on (bridge_id, remote_jid)
|
|
75
|
+
* 2) Bridge-level catch-all route (`remote_jid='*'`) when present
|
|
76
|
+
* 3) null (dispatcher drops the message silently)
|
|
77
|
+
*
|
|
78
|
+
* Catch-all lets one agent handle all otherwise-unrouted chats on a bridge.
|
|
79
|
+
* This is especially useful for "triage" or "observer" agents. The ignore
|
|
80
|
+
* list is checked FIRST so it wins over both explicit routes and the
|
|
81
|
+
* catch-all — deleting an ignore entry is how you "resume listening".
|
|
82
|
+
*/ function resolveRoute(bridge_id, remote_jid) {
|
|
83
|
+
if ((0,bridges/* isIgnored */.pi)(bridge_id, remote_jid)) return null;
|
|
84
|
+
return (0,bridges/* findRoute */.$6)(bridge_id, remote_jid) ?? (0,bridges/* findRoute */.$6)(bridge_id, "*");
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// EXTERNAL MODULE: ./lib/utils/source-link.ts
|
|
88
|
+
var source_link = __webpack_require__(12262);
|
|
89
|
+
;// ./lib/bridges/message-role.ts
|
|
90
|
+
/**
|
|
91
|
+
* Cross-adapter framing for bridge inbound messages.
|
|
92
|
+
*
|
|
93
|
+
* Bridge conversations are inherently multi-party: the paired user, one or
|
|
94
|
+
* more counterparts (1:1 partner or group members), and the agent that's
|
|
95
|
+
* observing/assisting. Without role framing, the LLM tends to read every
|
|
96
|
+
* inbound message as a direct command — even when the message was sent by
|
|
97
|
+
* the user's chat partner, who has no idea an agent is in the loop.
|
|
98
|
+
*
|
|
99
|
+
* This module is the single source of truth for that framing. Every bridge
|
|
100
|
+
* adapter (WhatsApp today; Telegram/Slack/Discord/email tomorrow) populates
|
|
101
|
+
* `InboundMessage.role` with one of these values, and the dispatcher feeds
|
|
102
|
+
* the message through `formatBridgePrompt` to produce the prefix the agent
|
|
103
|
+
* sees. Adding a new adapter is a matter of mapping its platform-specific
|
|
104
|
+
* "who sent this" signal onto `MessageRole`; the framing code does not need
|
|
105
|
+
* to change.
|
|
106
|
+
*/
|
|
107
|
+
/**
|
|
108
|
+
* Build the prompt prefix the agent receives for one bridge-inbound message.
|
|
109
|
+
*
|
|
110
|
+
* Output shape:
|
|
111
|
+
*
|
|
112
|
+
* <one-line semantic note framing the role>
|
|
113
|
+
*
|
|
114
|
+
* [bridge:<id>]
|
|
115
|
+
* [chat_id:<id>]
|
|
116
|
+
* [chat_name:<label>]
|
|
117
|
+
* [chat_type:dm|group]
|
|
118
|
+
* [message_role:user|counterpart|agent]
|
|
119
|
+
* [sender_id:<id>]
|
|
120
|
+
* [sender_name:<label>]
|
|
121
|
+
* ([chat_link:<https url>] when the platform has a permalink for the chat)
|
|
122
|
+
* ([group_name:<label>] [participant_id:<id>] [participant_name:<label>] for groups)
|
|
123
|
+
*
|
|
124
|
+
* <raw text>
|
|
125
|
+
*
|
|
126
|
+
* The metadata block is keyed-tag for parseability; the leading note is
|
|
127
|
+
* prose so the LLM has an explicit framing without having to learn the
|
|
128
|
+
* convention. Both are stable across adapters.
|
|
129
|
+
*/ function formatBridgePrompt(input) {
|
|
130
|
+
const note = roleNote(input.role, input.is_group, input.silent === true, input.event);
|
|
131
|
+
// Header values come from the platform (display names, group subjects) and
|
|
132
|
+
// are sender-controlled: a line break would forge extra headers or end the
|
|
133
|
+
// header block early, so every value is flattened onto one line.
|
|
134
|
+
const h = (value)=>String(value ?? "").replace(/[\r\n\u0085\u2028\u2029]+/g, " ");
|
|
135
|
+
const lines = [
|
|
136
|
+
`[bridge:${h(input.bridge_id)}]`,
|
|
137
|
+
`[chat_id:${h(input.chat_id)}]`,
|
|
138
|
+
`[chat_name:${h(input.chat_name)}]`,
|
|
139
|
+
`[chat_type:${input.is_group ? "group" : "dm"}]`,
|
|
140
|
+
`[message_role:${input.role}]`,
|
|
141
|
+
`[sender_id:${h(input.sender_id)}]`,
|
|
142
|
+
`[sender_name:${h(input.sender_name)}]`
|
|
143
|
+
];
|
|
144
|
+
const chatLink = (0,source_link/* httpsUrlOrNull */.N)(input.chat_link);
|
|
145
|
+
if (chatLink) lines.push(`[chat_link:${chatLink}]`);
|
|
146
|
+
if (input.event) {
|
|
147
|
+
lines.push(`[event_type:${input.event.type}]`);
|
|
148
|
+
lines.push(`[event_subtype:${h(input.event.subtype)}]`);
|
|
149
|
+
}
|
|
150
|
+
if (input.is_group) {
|
|
151
|
+
lines.push(`[group_name:${h(input.chat_name)}]`);
|
|
152
|
+
lines.push(`[participant_id:${h(input.sender_id)}]`);
|
|
153
|
+
lines.push(`[participant_name:${h(input.sender_name)}]`);
|
|
154
|
+
}
|
|
155
|
+
return `${note}\n\n${lines.join("\n")}\n\n${input.text}`;
|
|
156
|
+
}
|
|
157
|
+
// Parses bridge prompt envelopes rendered by formatBridgePrompt().
|
|
158
|
+
// Back-compat: also accepts legacy keys (chat_jid/sender_jid) and optional
|
|
159
|
+
// prose preface before the [bridge:...] metadata block.
|
|
160
|
+
function parseBridgePrompt(raw) {
|
|
161
|
+
const start = raw.indexOf("[bridge:");
|
|
162
|
+
if (start < 0) return null;
|
|
163
|
+
const src = raw.slice(start);
|
|
164
|
+
const headers = {};
|
|
165
|
+
const lines = src.split("\n");
|
|
166
|
+
let i = 0;
|
|
167
|
+
for(; i < lines.length; i++){
|
|
168
|
+
const line = lines[i].replace(/\r$/, "");
|
|
169
|
+
if (line === "") {
|
|
170
|
+
i++;
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
const m = /^\[([a-z_]+):([\s\S]*)\]$/.exec(line);
|
|
174
|
+
if (!m) return null;
|
|
175
|
+
headers[m[1]] = m[2];
|
|
176
|
+
}
|
|
177
|
+
const chatId = headers.chat_id || headers.chat_jid;
|
|
178
|
+
const senderId = headers.sender_id || headers.sender_jid || chatId;
|
|
179
|
+
if (!headers.bridge || !chatId || !headers.chat_type) return null;
|
|
180
|
+
return {
|
|
181
|
+
bridgeId: headers.bridge,
|
|
182
|
+
chatJid: chatId,
|
|
183
|
+
chatName: headers.chat_name || chatId,
|
|
184
|
+
isGroup: headers.chat_type === "group",
|
|
185
|
+
senderJid: senderId,
|
|
186
|
+
senderName: headers.sender_name || senderId || "Unknown",
|
|
187
|
+
chatLink: httpsUrlOrNull(headers.chat_link),
|
|
188
|
+
body: lines.slice(i).join("\n").trimEnd()
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function roleNote(role, isGroup, silent, event) {
|
|
192
|
+
if (event) {
|
|
193
|
+
const evt = event.type === "group_profile_update" ? "group profile/settings update" : "group participant update";
|
|
194
|
+
return `The payload below is a ${evt} (${event.subtype}) emitted by the platform, not a normal chat message typed by a participant. ` + "Use it as conversation state/context. Do not assume someone is directly addressing you unless your instructions explicitly require replying to system events.";
|
|
195
|
+
}
|
|
196
|
+
if (silent) {
|
|
197
|
+
// Observer mode overrides the per-role framing: the agent is forbidden
|
|
198
|
+
// from speaking on the chat regardless of who sent the inbound message.
|
|
199
|
+
// It may still use the event as context and take non-chat actions that
|
|
200
|
+
// its normal instructions require.
|
|
201
|
+
if (role === "agent") {
|
|
202
|
+
return "The message below is your own prior output, surfaced again because the bridge adapter could not suppress its echo. Use it only as a record of what you previously said — do not respond to it.";
|
|
203
|
+
}
|
|
204
|
+
return "Silent / observer mode is enabled for this route. You are standing on the paired user's side and listening to the chat for context, memory, risk, or tasks that matter to the paired user's instructions. " + "Do not write to the chat, draft a chat reply, imitate a participant, or answer the sender conversationally. " + "Act only through allowed non-chat tools or internal state when your normal instructions require it. " + "Most observed messages need no visible response: if there is no important internal note, risk, or user-actionable item for the paired user inside Jarela, reply with exactly the single token NO_REPLY and nothing else.";
|
|
205
|
+
}
|
|
206
|
+
switch(role){
|
|
207
|
+
case "user":
|
|
208
|
+
return "The paired user themselves sent the message below in this conversation. Treat it as the user's own reaction/input to the prior chat — they are speaking to the other party, not directly to you. Use it to update your understanding of the user's intent.";
|
|
209
|
+
case "counterpart":
|
|
210
|
+
return isGroup ? "The message below was sent by another member of this group chat, addressed to the paired user. Respond on the user's behalf, in their voice, following your agent instructions and persona — do not introduce yourself as an assistant or break character. If your instructions tell you to stay silent or escalate to the user, do that instead." : "The message below was sent by the user's counterpart in this 1:1 chat, addressed to the paired user. Respond on the user's behalf, in their voice, following your agent instructions and persona — do not introduce yourself as an assistant or break character. If your instructions tell you to stay silent or escalate to the user, do that instead.";
|
|
211
|
+
case "agent":
|
|
212
|
+
return "The message below is your own prior output, surfaced again because the bridge adapter could not suppress its echo. Use it only as a record of what you previously said — do not respond to it.";
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// EXTERNAL MODULE: ./lib/utils/error.ts
|
|
217
|
+
var error = __webpack_require__(22032);
|
|
218
|
+
// EXTERNAL MODULE: ./lib/agents/run-queue.ts
|
|
219
|
+
var run_queue = __webpack_require__(3944);
|
|
220
|
+
// EXTERNAL MODULE: ./lib/stores/automation-activity.ts
|
|
221
|
+
var automation_activity = __webpack_require__(26316);
|
|
222
|
+
;// ./lib/bridges/dispatcher.ts
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Handle one inbound message from a bridge adapter:
|
|
235
|
+
* 1. Resolve the chat → agent route. Unrouted → publish an advisory
|
|
236
|
+
* event and drop. No thread created, no reply sent.
|
|
237
|
+
* 2. Use `getOrCreateAgentThread(agent_id)` (one-thread-per-agent
|
|
238
|
+
* invariant — `UNIQUE(agent_id)` on bridge_routes ensures no chat
|
|
239
|
+
* interleaving).
|
|
240
|
+
* 3. Drive the agent via the canonical `runAgentTurn` helper used by
|
|
241
|
+
* every external context turn.
|
|
242
|
+
* 4. Persist the assistant message and send the reply back through the
|
|
243
|
+
* adapter on the originating channel.
|
|
244
|
+
*
|
|
245
|
+
* Top-level try/catch — adapter callbacks must never throw into the Baileys
|
|
246
|
+
* socket event handler (would tear down the WS).
|
|
247
|
+
*/ async function handleInboundMessage(adapter, msg) {
|
|
248
|
+
try {
|
|
249
|
+
const route = resolveRoute(adapter.bridge_id, msg.remote_jid);
|
|
250
|
+
if (!route) {
|
|
251
|
+
// Unrouted chats are silently dropped. We intentionally do NOT publish
|
|
252
|
+
// a notification here — the user already declared "this chat isn't
|
|
253
|
+
// monitored" by not configuring a route, so popping a toast for every
|
|
254
|
+
// inbound message in an active group would be noise. The console log
|
|
255
|
+
// remains for debugging; the chat picker in BridgeEditor still shows
|
|
256
|
+
// observed chats so a route can be added on demand.
|
|
257
|
+
console.log(`[bridge ${adapter.bridge_id}] dropped: no route for ${msg.remote_jid} (${msg.push_name ?? "?"})`);
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
const agentId = route.agent_id;
|
|
261
|
+
const agent = (0,agent_configs/* getAgentConfig */.mJ)(agentId);
|
|
262
|
+
if (!agent) {
|
|
263
|
+
console.warn(`[bridge ${adapter.bridge_id}] route points at missing agent ${agentId}, dropping`);
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
const thread = (0,threads/* getOrCreateAgentThread */.xH)(agentId);
|
|
267
|
+
// Stamp bridge/chat provenance + sender role onto every inbound prompt.
|
|
268
|
+
// Role framing (user / counterpart / agent) is shared across every
|
|
269
|
+
// bridge adapter via `formatBridgePrompt` — see lib/bridges/message-role.ts.
|
|
270
|
+
const chatName = msg.chat_name ?? msg.push_name ?? "unknown";
|
|
271
|
+
const senderJid = msg.sender_jid ?? msg.participant_jid ?? msg.remote_jid;
|
|
272
|
+
const senderName = msg.sender_name ?? msg.push_name ?? senderJid;
|
|
273
|
+
const silent = route.silent_mode === 1;
|
|
274
|
+
const willReply = !silent && msg.role === route.respond_to;
|
|
275
|
+
const activity = (0,automation_activity/* createAutomationActivity */.P2)({
|
|
276
|
+
threadId: thread.thread_id,
|
|
277
|
+
sourceKind: "bridge",
|
|
278
|
+
sourceId: `${adapter.bridge_id}:${msg.remote_jid}`,
|
|
279
|
+
label: `Message from ${senderName}`,
|
|
280
|
+
state: "checking",
|
|
281
|
+
detail: msg.text
|
|
282
|
+
});
|
|
283
|
+
const publishActivity = ()=>{
|
|
284
|
+
(0,bus/* publish */.mk)({
|
|
285
|
+
type: "automation_activity",
|
|
286
|
+
thread_id: thread.thread_id,
|
|
287
|
+
agent_id: agentId,
|
|
288
|
+
ts: Date.now()
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
publishActivity();
|
|
292
|
+
const promptText = formatBridgePrompt({
|
|
293
|
+
bridge_id: adapter.bridge_id,
|
|
294
|
+
chat_id: msg.remote_jid,
|
|
295
|
+
chat_name: chatName,
|
|
296
|
+
is_group: msg.is_group,
|
|
297
|
+
role: msg.role,
|
|
298
|
+
sender_id: senderJid,
|
|
299
|
+
sender_name: senderName,
|
|
300
|
+
chat_link: adapter.chatLink?.(msg.remote_jid) ?? null,
|
|
301
|
+
text: msg.text,
|
|
302
|
+
silent,
|
|
303
|
+
event: msg.event
|
|
304
|
+
});
|
|
305
|
+
const bridgeConversation = {
|
|
306
|
+
key: `${adapter.bridge_id}:${msg.remote_jid}`,
|
|
307
|
+
bridge_id: adapter.bridge_id,
|
|
308
|
+
chat_id: msg.remote_jid
|
|
309
|
+
};
|
|
310
|
+
// Keep typing outside the queue so users still see "thinking" while
|
|
311
|
+
// waiting behind other queued turns for the same thread.
|
|
312
|
+
let typingActive = willReply;
|
|
313
|
+
if (willReply) {
|
|
314
|
+
void adapter.sendTyping(msg.remote_jid, true).catch(()=>{});
|
|
315
|
+
}
|
|
316
|
+
const typingTimer = setInterval(()=>{
|
|
317
|
+
if (!typingActive) return;
|
|
318
|
+
void adapter.sendTyping(msg.remote_jid, true).catch(()=>{});
|
|
319
|
+
}, 8000);
|
|
320
|
+
typingTimer.unref?.();
|
|
321
|
+
let reply = "";
|
|
322
|
+
let suppressAssistant = false;
|
|
323
|
+
let aborted = false;
|
|
324
|
+
try {
|
|
325
|
+
// Surface the bridge kind+name in the system prompt so the agent
|
|
326
|
+
// knows it's answering on e.g. WhatsApp — fixes the "I don't have
|
|
327
|
+
// access to WhatsApp" reply on bridge-delivered turns. Falls back
|
|
328
|
+
// to bridge_id when the row was deleted between fetch and dispatch.
|
|
329
|
+
const bridge = (0,bridges/* getBridge */.e1)(adapter.bridge_id);
|
|
330
|
+
let result;
|
|
331
|
+
try {
|
|
332
|
+
result = await (0,agent_turn.runAgentTurn)({
|
|
333
|
+
thread_id: thread.thread_id,
|
|
334
|
+
queue_source: "bridge",
|
|
335
|
+
message: promptText,
|
|
336
|
+
attachments: msg.attachments,
|
|
337
|
+
user_category: "bridge",
|
|
338
|
+
assistant_category: "bridge",
|
|
339
|
+
user_message_metadata: {
|
|
340
|
+
bridge_conversation: bridgeConversation
|
|
341
|
+
},
|
|
342
|
+
assistant_message_metadata: {
|
|
343
|
+
bridge_conversation: bridgeConversation
|
|
344
|
+
},
|
|
345
|
+
history_bridge_key: bridgeConversation.key,
|
|
346
|
+
silent,
|
|
347
|
+
queue_lane: willReply ? "interactive" : "background",
|
|
348
|
+
queue_expires_at: willReply ? undefined : Date.now() + 5 * 60000,
|
|
349
|
+
on_queue_state: (state)=>{
|
|
350
|
+
(0,automation_activity/* updateAutomationActivity */.ou)(activity.msg_id, {
|
|
351
|
+
state: state === "queued" ? "queued" : "checking"
|
|
352
|
+
});
|
|
353
|
+
publishActivity();
|
|
354
|
+
},
|
|
355
|
+
delivery_channel: {
|
|
356
|
+
kind: bridge?.kind ?? "bridge",
|
|
357
|
+
name: bridge?.name ?? null
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
} catch (err) {
|
|
361
|
+
if (err instanceof run_queue/* QueueExpiredError */.vR) {
|
|
362
|
+
(0,automation_activity/* finalizeAutomationActivity */.lU)(activity.msg_id, {
|
|
363
|
+
disposition: "expired"
|
|
364
|
+
});
|
|
365
|
+
publishActivity();
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
(0,automation_activity/* finalizeAutomationActivity */.lU)(activity.msg_id, {
|
|
369
|
+
disposition: "failed",
|
|
370
|
+
error: (0,error/* errorMessage */.g)(err)
|
|
371
|
+
});
|
|
372
|
+
publishActivity();
|
|
373
|
+
throw err;
|
|
374
|
+
}
|
|
375
|
+
reply = result.assistantContent.trim();
|
|
376
|
+
suppressAssistant = result.skippedAssistant;
|
|
377
|
+
aborted = result.aborted;
|
|
378
|
+
} finally{
|
|
379
|
+
typingActive = false;
|
|
380
|
+
clearInterval(typingTimer);
|
|
381
|
+
if (willReply) {
|
|
382
|
+
void adapter.sendTyping(msg.remote_jid, false).catch(()=>{});
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
// Outbound reply gate: silent_mode (master switch) AND respond_to
|
|
386
|
+
// (per-role trigger). Both must clear for a message to leave the
|
|
387
|
+
// dispatcher. The WhatsApp adapter also re-checks `route.silent_mode`
|
|
388
|
+
// inside its own sendText as a belt-and-suspenders guard, so even a
|
|
389
|
+
// tool that called adapter.sendText directly would be dropped.
|
|
390
|
+
let sendError = null;
|
|
391
|
+
if (reply.length > 0 && willReply) {
|
|
392
|
+
try {
|
|
393
|
+
await adapter.sendText(msg.remote_jid, reply);
|
|
394
|
+
} catch (sendErr) {
|
|
395
|
+
const m = (0,error/* errorMessage */.g)(sendErr);
|
|
396
|
+
sendError = m;
|
|
397
|
+
console.error(`[bridge ${adapter.bridge_id}] sendText failed:`, m);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
(0,automation_activity/* finalizeAutomationActivity */.lU)(activity.msg_id, aborted ? {
|
|
401
|
+
disposition: "cancelled"
|
|
402
|
+
} : sendError ? {
|
|
403
|
+
disposition: "failed",
|
|
404
|
+
error: sendError
|
|
405
|
+
} : {
|
|
406
|
+
disposition: reply.length > 0 && !suppressAssistant ? "action" : "no_action",
|
|
407
|
+
preview: suppressAssistant ? undefined : reply.replace(/\s+/g, " ").slice(0, 120)
|
|
408
|
+
});
|
|
409
|
+
publishActivity();
|
|
410
|
+
if (!silent || !suppressAssistant) {
|
|
411
|
+
(0,bus/* publish */.mk)({
|
|
412
|
+
type: "bridge_message_received",
|
|
413
|
+
bridge_id: adapter.bridge_id,
|
|
414
|
+
remote_jid: msg.remote_jid,
|
|
415
|
+
push_name: msg.push_name,
|
|
416
|
+
is_group: msg.is_group,
|
|
417
|
+
thread_id: thread.thread_id,
|
|
418
|
+
agent_id: agentId,
|
|
419
|
+
preview: suppressAssistant ? "" : reply.replace(/\s+/g, " ").slice(0, 120),
|
|
420
|
+
ts: Date.now()
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
} catch (err) {
|
|
424
|
+
const m = (0,error/* errorMessage */.g)(err);
|
|
425
|
+
console.error(`[bridge ${adapter.bridge_id}] dispatcher error on ${msg.remote_jid}:`, m);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
// EXTERNAL MODULE: ./lib/bridges/registry.ts + 5 modules
|
|
430
|
+
var registry = __webpack_require__(70309);
|
|
431
|
+
;// ./lib/bridges/runtime.ts
|
|
432
|
+
/**
|
|
433
|
+
* Bridge lifecycle manager.
|
|
434
|
+
*
|
|
435
|
+
* Owns a `Map<bridge_id, BridgeAdapter>` plus a `Map<bridge_id, StatusUpdate>`
|
|
436
|
+
* of the latest known status per bridge (so the HTTP status endpoint can
|
|
437
|
+
* return live QR / connection state without consulting the adapter directly).
|
|
438
|
+
*
|
|
439
|
+
* - `startAllBridges()` — called at app boot; scans `bridges` for
|
|
440
|
+
* `enabled=1` rows and spins up their adapters.
|
|
441
|
+
* - `startBridge(id)` / `stopBridge(id)` / `restartBridge(id)` — called from
|
|
442
|
+
* the HTTP layer (toggle enabled, re-pair, delete).
|
|
443
|
+
*
|
|
444
|
+
* Pinned to globalThis so dev HMR doesn't double-start (same pattern as
|
|
445
|
+
* lib/scheduler/index.ts).
|
|
446
|
+
*/
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
const state = (0,global_state/* getOrCreateGlobal */.X)("__jarela_bridges", ()=>({
|
|
453
|
+
adapters: new Map(),
|
|
454
|
+
status: new Map(),
|
|
455
|
+
started: false
|
|
456
|
+
}));
|
|
457
|
+
function makeAdapter(bridge_id, kind) {
|
|
458
|
+
const bridgeModule = (0,registry/* getBridgeModule */.ut)(kind);
|
|
459
|
+
if (!bridgeModule) throw new Error(`Unknown bridge kind: ${kind}`);
|
|
460
|
+
return bridgeModule.createAdapter(bridge_id);
|
|
461
|
+
}
|
|
462
|
+
async function removeBridgeAuth(bridge_id) {
|
|
463
|
+
const bridge = (0,bridges/* getBridge */.e1)(bridge_id);
|
|
464
|
+
if (!bridge) return;
|
|
465
|
+
await (0,registry/* getBridgeModule */.ut)(bridge.kind)?.removeAuth(bridge_id);
|
|
466
|
+
}
|
|
467
|
+
function wireAdapter(adapter) {
|
|
468
|
+
adapter.onInboundMessage((msg)=>handleInboundMessage(adapter, msg));
|
|
469
|
+
adapter.onStatusChange((update)=>{
|
|
470
|
+
state.status.set(adapter.bridge_id, update);
|
|
471
|
+
// Persist the user-visible bits so they survive a process restart.
|
|
472
|
+
const patch = {
|
|
473
|
+
status: update.status,
|
|
474
|
+
qr: update.qr_data_url ?? null,
|
|
475
|
+
last_error: update.error ?? null
|
|
476
|
+
};
|
|
477
|
+
if (update.paired_id !== undefined) patch.paired_id = update.paired_id;
|
|
478
|
+
(0,bridges/* updateBridge */.po)(adapter.bridge_id, patch);
|
|
479
|
+
(0,bus/* publish */.mk)({
|
|
480
|
+
type: "bridge_status",
|
|
481
|
+
bridge_id: adapter.bridge_id,
|
|
482
|
+
status: update.status,
|
|
483
|
+
error: update.error ?? null,
|
|
484
|
+
paired_id: update.paired_id ?? null,
|
|
485
|
+
ts: Date.now()
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
async function startBridge(bridge_id) {
|
|
490
|
+
if (state.adapters.has(bridge_id)) return;
|
|
491
|
+
const row = (0,bridges/* getBridge */.e1)(bridge_id);
|
|
492
|
+
if (!row) throw new Error(`Bridge ${bridge_id} not found`);
|
|
493
|
+
const adapter = makeAdapter(bridge_id, row.kind);
|
|
494
|
+
state.adapters.set(bridge_id, adapter);
|
|
495
|
+
wireAdapter(adapter);
|
|
496
|
+
try {
|
|
497
|
+
await adapter.start();
|
|
498
|
+
} catch (err) {
|
|
499
|
+
state.adapters.delete(bridge_id);
|
|
500
|
+
const m = (0,error/* errorMessage */.g)(err);
|
|
501
|
+
(0,bridges/* updateBridge */.po)(bridge_id, {
|
|
502
|
+
status: "error",
|
|
503
|
+
last_error: m
|
|
504
|
+
});
|
|
505
|
+
throw err;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
async function stopBridge(bridge_id) {
|
|
509
|
+
const adapter = state.adapters.get(bridge_id);
|
|
510
|
+
state.adapters.delete(bridge_id);
|
|
511
|
+
state.status.delete(bridge_id);
|
|
512
|
+
if (adapter) {
|
|
513
|
+
try {
|
|
514
|
+
await adapter.stop();
|
|
515
|
+
} catch (err) {
|
|
516
|
+
console.error(`[bridge ${bridge_id}] stop failed:`, err);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
// Persist that the bridge is down (in case status callback didn't fire).
|
|
520
|
+
(0,bridges/* updateBridge */.po)(bridge_id, {
|
|
521
|
+
status: "disconnected",
|
|
522
|
+
qr: null
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
async function restartBridge(bridge_id) {
|
|
526
|
+
await stopBridge(bridge_id);
|
|
527
|
+
await startBridge(bridge_id);
|
|
528
|
+
}
|
|
529
|
+
async function repairBridge(bridge_id) {
|
|
530
|
+
const bridge = (0,bridges/* getBridge */.e1)(bridge_id);
|
|
531
|
+
if (!bridge) throw new Error(`Bridge ${bridge_id} not found`);
|
|
532
|
+
const bridgeModule = (0,registry/* getBridgeModule */.ut)(bridge.kind);
|
|
533
|
+
if (!bridgeModule?.pairing) throw new Error(`Bridge kind "${bridge.kind}" does not support pairing`);
|
|
534
|
+
await stopBridge(bridge_id);
|
|
535
|
+
await bridgeModule.removeAuth(bridge_id);
|
|
536
|
+
(0,bridges/* updateBridge */.po)(bridge_id, {
|
|
537
|
+
status: "disconnected",
|
|
538
|
+
qr: null,
|
|
539
|
+
last_error: null,
|
|
540
|
+
paired_id: null
|
|
541
|
+
});
|
|
542
|
+
await startBridge(bridge_id);
|
|
543
|
+
}
|
|
544
|
+
function getBridgeRuntimeStatus(bridge_id) {
|
|
545
|
+
return state.status.get(bridge_id) ?? null;
|
|
546
|
+
}
|
|
547
|
+
function isBridgeRunning(bridge_id) {
|
|
548
|
+
return state.adapters.has(bridge_id);
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Snapshot of chats the adapter has observed since connecting. Returns []
|
|
552
|
+
* when the bridge isn't running yet. Triggers a background refresh so that
|
|
553
|
+
* subsequent calls see newly-fetched group metadata.
|
|
554
|
+
*/ function listBridgeChats(bridge_id) {
|
|
555
|
+
const adapter = state.adapters.get(bridge_id);
|
|
556
|
+
if (!adapter?.listChats) return [];
|
|
557
|
+
// Fire-and-forget — refreshChats hits a WS round-trip; HTTP shouldn't
|
|
558
|
+
// wait. The next poll will pick up any new entries.
|
|
559
|
+
void adapter.refreshChats?.().catch(()=>{});
|
|
560
|
+
return adapter.listChats();
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Look up a freeform phone number (or other identifier) against the bridge
|
|
564
|
+
* and return the resolved chat if it exists, else null. Returns null also
|
|
565
|
+
* if the bridge isn't running.
|
|
566
|
+
*/ async function lookupBridgeChat(bridge_id, input) {
|
|
567
|
+
const adapter = state.adapters.get(bridge_id);
|
|
568
|
+
if (!adapter?.lookupChat) return null;
|
|
569
|
+
return adapter.lookupChat(input);
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Boot hook. Idempotent — safe to call from a layout module that may be
|
|
573
|
+
* evaluated multiple times in Next.js dev HMR.
|
|
574
|
+
*/ async function startAllBridges() {
|
|
575
|
+
if (state.started) return;
|
|
576
|
+
state.started = true;
|
|
577
|
+
const rows = (0,bridges/* listBridges */.X9)();
|
|
578
|
+
for (const row of rows){
|
|
579
|
+
if (row.enabled !== 1) continue;
|
|
580
|
+
try {
|
|
581
|
+
await startBridge(row.id);
|
|
582
|
+
} catch (err) {
|
|
583
|
+
const m = (0,error/* errorMessage */.g)(err);
|
|
584
|
+
console.error(`[bridge ${row.id}] failed to start at boot:`, m);
|
|
585
|
+
// updateBridge already happened inside startBridge's catch.
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
// Stop every running bridge. Called from the graceful-shutdown path so
|
|
590
|
+
// WhatsApp WS sockets etc. close cleanly before the process exits. We
|
|
591
|
+
// await in parallel — a single slow `adapter.stop()` shouldn't gate the
|
|
592
|
+
// others — but the whole call is still bounded by the outer shutdown
|
|
593
|
+
// timeout in `lib/lifecycle/shutdown.ts`.
|
|
594
|
+
async function stopAllBridges() {
|
|
595
|
+
const ids = Array.from(state.adapters.keys());
|
|
596
|
+
await Promise.allSettled(ids.map((id)=>stopBridge(id)));
|
|
597
|
+
state.started = false;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
|
|
34
601
|
/***/ }),
|
|
35
602
|
|
|
36
603
|
/***/ 8128:
|
|
@@ -169,63 +736,274 @@ async function DELETE(_req, { params }) {
|
|
|
169
736
|
|
|
170
737
|
/***/ }),
|
|
171
738
|
|
|
172
|
-
/***/ 19121:
|
|
739
|
+
/***/ 19121:
|
|
740
|
+
/***/ ((module) => {
|
|
741
|
+
|
|
742
|
+
module.exports = require("next/dist/server/app-render/action-async-storage.external.js");
|
|
743
|
+
|
|
744
|
+
/***/ }),
|
|
745
|
+
|
|
746
|
+
/***/ 27910:
|
|
747
|
+
/***/ ((module) => {
|
|
748
|
+
|
|
749
|
+
module.exports = require("stream");
|
|
750
|
+
|
|
751
|
+
/***/ }),
|
|
752
|
+
|
|
753
|
+
/***/ 28354:
|
|
754
|
+
/***/ ((module) => {
|
|
755
|
+
|
|
756
|
+
module.exports = require("util");
|
|
757
|
+
|
|
758
|
+
/***/ }),
|
|
759
|
+
|
|
760
|
+
/***/ 29021:
|
|
761
|
+
/***/ ((module) => {
|
|
762
|
+
|
|
763
|
+
module.exports = require("fs");
|
|
764
|
+
|
|
765
|
+
/***/ }),
|
|
766
|
+
|
|
767
|
+
/***/ 29294:
|
|
768
|
+
/***/ ((module) => {
|
|
769
|
+
|
|
770
|
+
module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
|
|
771
|
+
|
|
772
|
+
/***/ }),
|
|
773
|
+
|
|
774
|
+
/***/ 31421:
|
|
775
|
+
/***/ ((module) => {
|
|
776
|
+
|
|
777
|
+
module.exports = require("node:child_process");
|
|
778
|
+
|
|
779
|
+
/***/ }),
|
|
780
|
+
|
|
781
|
+
/***/ 33873:
|
|
782
|
+
/***/ ((module) => {
|
|
783
|
+
|
|
784
|
+
module.exports = require("path");
|
|
785
|
+
|
|
786
|
+
/***/ }),
|
|
787
|
+
|
|
788
|
+
/***/ 37067:
|
|
789
|
+
/***/ ((module) => {
|
|
790
|
+
|
|
791
|
+
module.exports = require("node:http");
|
|
792
|
+
|
|
793
|
+
/***/ }),
|
|
794
|
+
|
|
795
|
+
/***/ 38522:
|
|
796
|
+
/***/ ((module) => {
|
|
797
|
+
|
|
798
|
+
module.exports = require("node:zlib");
|
|
799
|
+
|
|
800
|
+
/***/ }),
|
|
801
|
+
|
|
802
|
+
/***/ 39947:
|
|
803
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
804
|
+
|
|
805
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
806
|
+
/* harmony export */ Bm: () => (/* binding */ cachedJson),
|
|
807
|
+
/* harmony export */ HN: () => (/* binding */ notFoundResponse),
|
|
808
|
+
/* harmony export */ Jb: () => (/* binding */ validateBody),
|
|
809
|
+
/* harmony export */ K2: () => (/* binding */ createdResponse),
|
|
810
|
+
/* harmony export */ Ng: () => (/* binding */ noStoreJson),
|
|
811
|
+
/* harmony export */ yj: () => (/* binding */ errorResponse)
|
|
812
|
+
/* harmony export */ });
|
|
813
|
+
/* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
814
|
+
// Shared HTTP response builders for app/api/v1/** route handlers.
|
|
815
|
+
//
|
|
816
|
+
// Goal: every error/success payload across the v1 surface has the same
|
|
817
|
+
// shape. Before this lived inline, response bodies drifted —
|
|
818
|
+
// `{error: "x"}` vs `{message: "x"}`, 400 vs 422 for the same condition,
|
|
819
|
+
// some routes returned Zod's raw issue array, others stringified it.
|
|
820
|
+
|
|
821
|
+
function errorResponse(message, status = 400) {
|
|
822
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
823
|
+
error: message
|
|
824
|
+
}, {
|
|
825
|
+
status
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
function notFoundResponse(message = "Not found") {
|
|
829
|
+
return errorResponse(message, 404);
|
|
830
|
+
}
|
|
831
|
+
function createdResponse(data) {
|
|
832
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
|
|
833
|
+
status: 201
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
// Wrap a 200 JSON response with a private Cache-Control header. Use on safe
|
|
837
|
+
// GET endpoints that serve user-scoped data the client refetches often (panel
|
|
838
|
+
// mounts, navigation back/forward) but mutates rarely. The TTL is short
|
|
839
|
+
// enough that explicit mutations — which patch the client-side ApiClient
|
|
840
|
+
// cache in place — stay observably consistent without an extra roundtrip.
|
|
841
|
+
//
|
|
842
|
+
// swrSeconds (optional): stale-while-revalidate window. When set, the browser
|
|
843
|
+
// serves the cached response immediately and refreshes in the background,
|
|
844
|
+
// making navigation feel instant. Use for data that can tolerate brief
|
|
845
|
+
// staleness (tool list, agent configs, model list). Omit for real-time data
|
|
846
|
+
// (dashboard metrics, credential state).
|
|
847
|
+
function cachedJson(data, maxAgeSeconds, swrSeconds) {
|
|
848
|
+
const swr = swrSeconds ? `, stale-while-revalidate=${swrSeconds}` : "";
|
|
849
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
|
|
850
|
+
headers: {
|
|
851
|
+
"Cache-Control": `private, max-age=${maxAgeSeconds}${swr}`
|
|
852
|
+
}
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
// Use for endpoints whose response contains live state that must never be
|
|
856
|
+
// served from cache — credentials, connection status, live config values.
|
|
857
|
+
function noStoreJson(data) {
|
|
858
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
|
|
859
|
+
headers: {
|
|
860
|
+
"Cache-Control": "no-store"
|
|
861
|
+
}
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
// Validate a JSON request body against a zod schema.
|
|
865
|
+
// Returns either the parsed data or a 400 NextResponse explaining the issue.
|
|
866
|
+
// Caller pattern:
|
|
867
|
+
// const parsed = await validateBody(req, Schema);
|
|
868
|
+
// if (parsed instanceof NextResponse) return parsed;
|
|
869
|
+
// // use parsed.field
|
|
870
|
+
async function validateBody(req, schema) {
|
|
871
|
+
let raw;
|
|
872
|
+
try {
|
|
873
|
+
raw = await req.json();
|
|
874
|
+
} catch {
|
|
875
|
+
return errorResponse("Request body must be valid JSON", 400);
|
|
876
|
+
}
|
|
877
|
+
const parsed = schema.safeParse(raw);
|
|
878
|
+
if (!parsed.success) {
|
|
879
|
+
return errorResponse(parsed.error.issues[0]?.message ?? "invalid body", 400);
|
|
880
|
+
}
|
|
881
|
+
return parsed.data;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
/***/ }),
|
|
886
|
+
|
|
887
|
+
/***/ 40610:
|
|
888
|
+
/***/ ((module) => {
|
|
889
|
+
|
|
890
|
+
module.exports = require("node:dns");
|
|
891
|
+
|
|
892
|
+
/***/ }),
|
|
893
|
+
|
|
894
|
+
/***/ 42482:
|
|
895
|
+
/***/ ((module) => {
|
|
896
|
+
|
|
897
|
+
module.exports = import("sharp");;
|
|
898
|
+
|
|
899
|
+
/***/ }),
|
|
900
|
+
|
|
901
|
+
/***/ 44708:
|
|
902
|
+
/***/ ((module) => {
|
|
903
|
+
|
|
904
|
+
module.exports = require("node:https");
|
|
905
|
+
|
|
906
|
+
/***/ }),
|
|
907
|
+
|
|
908
|
+
/***/ 44870:
|
|
909
|
+
/***/ ((module) => {
|
|
910
|
+
|
|
911
|
+
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
912
|
+
|
|
913
|
+
/***/ }),
|
|
914
|
+
|
|
915
|
+
/***/ 48161:
|
|
916
|
+
/***/ ((module) => {
|
|
917
|
+
|
|
918
|
+
module.exports = require("node:os");
|
|
919
|
+
|
|
920
|
+
/***/ }),
|
|
921
|
+
|
|
922
|
+
/***/ 51455:
|
|
923
|
+
/***/ ((module) => {
|
|
924
|
+
|
|
925
|
+
module.exports = require("node:fs/promises");
|
|
926
|
+
|
|
927
|
+
/***/ }),
|
|
928
|
+
|
|
929
|
+
/***/ 55511:
|
|
930
|
+
/***/ ((module) => {
|
|
931
|
+
|
|
932
|
+
module.exports = require("crypto");
|
|
933
|
+
|
|
934
|
+
/***/ }),
|
|
935
|
+
|
|
936
|
+
/***/ 55591:
|
|
937
|
+
/***/ ((module) => {
|
|
938
|
+
|
|
939
|
+
module.exports = require("https");
|
|
940
|
+
|
|
941
|
+
/***/ }),
|
|
942
|
+
|
|
943
|
+
/***/ 57075:
|
|
173
944
|
/***/ ((module) => {
|
|
174
945
|
|
|
175
|
-
module.exports = require("
|
|
946
|
+
module.exports = require("node:stream");
|
|
176
947
|
|
|
177
948
|
/***/ }),
|
|
178
949
|
|
|
179
|
-
/***/
|
|
950
|
+
/***/ 57975:
|
|
180
951
|
/***/ ((module) => {
|
|
181
952
|
|
|
182
|
-
module.exports = require("
|
|
953
|
+
module.exports = require("node:util");
|
|
183
954
|
|
|
184
955
|
/***/ }),
|
|
185
956
|
|
|
186
|
-
/***/
|
|
957
|
+
/***/ 63033:
|
|
187
958
|
/***/ ((module) => {
|
|
188
959
|
|
|
189
|
-
module.exports = require("
|
|
960
|
+
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
190
961
|
|
|
191
962
|
/***/ }),
|
|
192
963
|
|
|
193
|
-
/***/
|
|
964
|
+
/***/ 73024:
|
|
194
965
|
/***/ ((module) => {
|
|
195
966
|
|
|
196
|
-
module.exports = require("fs");
|
|
967
|
+
module.exports = require("node:fs");
|
|
197
968
|
|
|
198
969
|
/***/ }),
|
|
199
970
|
|
|
200
|
-
/***/
|
|
971
|
+
/***/ 74075:
|
|
201
972
|
/***/ ((module) => {
|
|
202
973
|
|
|
203
|
-
module.exports = require("
|
|
974
|
+
module.exports = require("zlib");
|
|
204
975
|
|
|
205
976
|
/***/ }),
|
|
206
977
|
|
|
207
|
-
/***/
|
|
978
|
+
/***/ 75919:
|
|
208
979
|
/***/ ((module) => {
|
|
209
980
|
|
|
210
|
-
module.exports = require("node:
|
|
981
|
+
module.exports = require("node:worker_threads");
|
|
211
982
|
|
|
212
983
|
/***/ }),
|
|
213
984
|
|
|
214
|
-
/***/
|
|
985
|
+
/***/ 76760:
|
|
215
986
|
/***/ ((module) => {
|
|
216
987
|
|
|
217
|
-
module.exports = require("path");
|
|
988
|
+
module.exports = require("node:path");
|
|
218
989
|
|
|
219
990
|
/***/ }),
|
|
220
991
|
|
|
221
|
-
/***/
|
|
992
|
+
/***/ 77030:
|
|
222
993
|
/***/ ((module) => {
|
|
223
994
|
|
|
224
|
-
module.exports = require("node:
|
|
995
|
+
module.exports = require("node:net");
|
|
996
|
+
|
|
997
|
+
/***/ }),
|
|
998
|
+
|
|
999
|
+
/***/ 77598:
|
|
1000
|
+
/***/ ((module) => {
|
|
1001
|
+
|
|
1002
|
+
module.exports = require("node:crypto");
|
|
225
1003
|
|
|
226
1004
|
/***/ }),
|
|
227
1005
|
|
|
228
|
-
/***/
|
|
1006
|
+
/***/ 78507:
|
|
229
1007
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
230
1008
|
|
|
231
1009
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -667,217 +1445,6 @@ async function handler(req, res, ctx) {
|
|
|
667
1445
|
//# sourceMappingURL=app-route.js.map
|
|
668
1446
|
|
|
669
1447
|
|
|
670
|
-
/***/ }),
|
|
671
|
-
|
|
672
|
-
/***/ 38522:
|
|
673
|
-
/***/ ((module) => {
|
|
674
|
-
|
|
675
|
-
module.exports = require("node:zlib");
|
|
676
|
-
|
|
677
|
-
/***/ }),
|
|
678
|
-
|
|
679
|
-
/***/ 39947:
|
|
680
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
681
|
-
|
|
682
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
683
|
-
/* harmony export */ Bm: () => (/* binding */ cachedJson),
|
|
684
|
-
/* harmony export */ HN: () => (/* binding */ notFoundResponse),
|
|
685
|
-
/* harmony export */ Jb: () => (/* binding */ validateBody),
|
|
686
|
-
/* harmony export */ K2: () => (/* binding */ createdResponse),
|
|
687
|
-
/* harmony export */ Ng: () => (/* binding */ noStoreJson),
|
|
688
|
-
/* harmony export */ yj: () => (/* binding */ errorResponse)
|
|
689
|
-
/* harmony export */ });
|
|
690
|
-
/* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
691
|
-
// Shared HTTP response builders for app/api/v1/** route handlers.
|
|
692
|
-
//
|
|
693
|
-
// Goal: every error/success payload across the v1 surface has the same
|
|
694
|
-
// shape. Before this lived inline, response bodies drifted —
|
|
695
|
-
// `{error: "x"}` vs `{message: "x"}`, 400 vs 422 for the same condition,
|
|
696
|
-
// some routes returned Zod's raw issue array, others stringified it.
|
|
697
|
-
|
|
698
|
-
function errorResponse(message, status = 400) {
|
|
699
|
-
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
700
|
-
error: message
|
|
701
|
-
}, {
|
|
702
|
-
status
|
|
703
|
-
});
|
|
704
|
-
}
|
|
705
|
-
function notFoundResponse(message = "Not found") {
|
|
706
|
-
return errorResponse(message, 404);
|
|
707
|
-
}
|
|
708
|
-
function createdResponse(data) {
|
|
709
|
-
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
|
|
710
|
-
status: 201
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
|
-
// Wrap a 200 JSON response with a private Cache-Control header. Use on safe
|
|
714
|
-
// GET endpoints that serve user-scoped data the client refetches often (panel
|
|
715
|
-
// mounts, navigation back/forward) but mutates rarely. The TTL is short
|
|
716
|
-
// enough that explicit mutations — which patch the client-side ApiClient
|
|
717
|
-
// cache in place — stay observably consistent without an extra roundtrip.
|
|
718
|
-
//
|
|
719
|
-
// swrSeconds (optional): stale-while-revalidate window. When set, the browser
|
|
720
|
-
// serves the cached response immediately and refreshes in the background,
|
|
721
|
-
// making navigation feel instant. Use for data that can tolerate brief
|
|
722
|
-
// staleness (tool list, agent configs, model list). Omit for real-time data
|
|
723
|
-
// (dashboard metrics, credential state).
|
|
724
|
-
function cachedJson(data, maxAgeSeconds, swrSeconds) {
|
|
725
|
-
const swr = swrSeconds ? `, stale-while-revalidate=${swrSeconds}` : "";
|
|
726
|
-
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
|
|
727
|
-
headers: {
|
|
728
|
-
"Cache-Control": `private, max-age=${maxAgeSeconds}${swr}`
|
|
729
|
-
}
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
// Use for endpoints whose response contains live state that must never be
|
|
733
|
-
// served from cache — credentials, connection status, live config values.
|
|
734
|
-
function noStoreJson(data) {
|
|
735
|
-
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
|
|
736
|
-
headers: {
|
|
737
|
-
"Cache-Control": "no-store"
|
|
738
|
-
}
|
|
739
|
-
});
|
|
740
|
-
}
|
|
741
|
-
// Validate a JSON request body against a zod schema.
|
|
742
|
-
// Returns either the parsed data or a 400 NextResponse explaining the issue.
|
|
743
|
-
// Caller pattern:
|
|
744
|
-
// const parsed = await validateBody(req, Schema);
|
|
745
|
-
// if (parsed instanceof NextResponse) return parsed;
|
|
746
|
-
// // use parsed.field
|
|
747
|
-
async function validateBody(req, schema) {
|
|
748
|
-
let raw;
|
|
749
|
-
try {
|
|
750
|
-
raw = await req.json();
|
|
751
|
-
} catch {
|
|
752
|
-
return errorResponse("Request body must be valid JSON", 400);
|
|
753
|
-
}
|
|
754
|
-
const parsed = schema.safeParse(raw);
|
|
755
|
-
if (!parsed.success) {
|
|
756
|
-
return errorResponse(parsed.error.issues[0]?.message ?? "invalid body", 400);
|
|
757
|
-
}
|
|
758
|
-
return parsed.data;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
/***/ }),
|
|
763
|
-
|
|
764
|
-
/***/ 40610:
|
|
765
|
-
/***/ ((module) => {
|
|
766
|
-
|
|
767
|
-
module.exports = require("node:dns");
|
|
768
|
-
|
|
769
|
-
/***/ }),
|
|
770
|
-
|
|
771
|
-
/***/ 42482:
|
|
772
|
-
/***/ ((module) => {
|
|
773
|
-
|
|
774
|
-
module.exports = import("sharp");;
|
|
775
|
-
|
|
776
|
-
/***/ }),
|
|
777
|
-
|
|
778
|
-
/***/ 44708:
|
|
779
|
-
/***/ ((module) => {
|
|
780
|
-
|
|
781
|
-
module.exports = require("node:https");
|
|
782
|
-
|
|
783
|
-
/***/ }),
|
|
784
|
-
|
|
785
|
-
/***/ 44870:
|
|
786
|
-
/***/ ((module) => {
|
|
787
|
-
|
|
788
|
-
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
789
|
-
|
|
790
|
-
/***/ }),
|
|
791
|
-
|
|
792
|
-
/***/ 48161:
|
|
793
|
-
/***/ ((module) => {
|
|
794
|
-
|
|
795
|
-
module.exports = require("node:os");
|
|
796
|
-
|
|
797
|
-
/***/ }),
|
|
798
|
-
|
|
799
|
-
/***/ 51455:
|
|
800
|
-
/***/ ((module) => {
|
|
801
|
-
|
|
802
|
-
module.exports = require("node:fs/promises");
|
|
803
|
-
|
|
804
|
-
/***/ }),
|
|
805
|
-
|
|
806
|
-
/***/ 55511:
|
|
807
|
-
/***/ ((module) => {
|
|
808
|
-
|
|
809
|
-
module.exports = require("crypto");
|
|
810
|
-
|
|
811
|
-
/***/ }),
|
|
812
|
-
|
|
813
|
-
/***/ 55591:
|
|
814
|
-
/***/ ((module) => {
|
|
815
|
-
|
|
816
|
-
module.exports = require("https");
|
|
817
|
-
|
|
818
|
-
/***/ }),
|
|
819
|
-
|
|
820
|
-
/***/ 57075:
|
|
821
|
-
/***/ ((module) => {
|
|
822
|
-
|
|
823
|
-
module.exports = require("node:stream");
|
|
824
|
-
|
|
825
|
-
/***/ }),
|
|
826
|
-
|
|
827
|
-
/***/ 57975:
|
|
828
|
-
/***/ ((module) => {
|
|
829
|
-
|
|
830
|
-
module.exports = require("node:util");
|
|
831
|
-
|
|
832
|
-
/***/ }),
|
|
833
|
-
|
|
834
|
-
/***/ 63033:
|
|
835
|
-
/***/ ((module) => {
|
|
836
|
-
|
|
837
|
-
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
838
|
-
|
|
839
|
-
/***/ }),
|
|
840
|
-
|
|
841
|
-
/***/ 73024:
|
|
842
|
-
/***/ ((module) => {
|
|
843
|
-
|
|
844
|
-
module.exports = require("node:fs");
|
|
845
|
-
|
|
846
|
-
/***/ }),
|
|
847
|
-
|
|
848
|
-
/***/ 74075:
|
|
849
|
-
/***/ ((module) => {
|
|
850
|
-
|
|
851
|
-
module.exports = require("zlib");
|
|
852
|
-
|
|
853
|
-
/***/ }),
|
|
854
|
-
|
|
855
|
-
/***/ 75919:
|
|
856
|
-
/***/ ((module) => {
|
|
857
|
-
|
|
858
|
-
module.exports = require("node:worker_threads");
|
|
859
|
-
|
|
860
|
-
/***/ }),
|
|
861
|
-
|
|
862
|
-
/***/ 76760:
|
|
863
|
-
/***/ ((module) => {
|
|
864
|
-
|
|
865
|
-
module.exports = require("node:path");
|
|
866
|
-
|
|
867
|
-
/***/ }),
|
|
868
|
-
|
|
869
|
-
/***/ 77030:
|
|
870
|
-
/***/ ((module) => {
|
|
871
|
-
|
|
872
|
-
module.exports = require("node:net");
|
|
873
|
-
|
|
874
|
-
/***/ }),
|
|
875
|
-
|
|
876
|
-
/***/ 77598:
|
|
877
|
-
/***/ ((module) => {
|
|
878
|
-
|
|
879
|
-
module.exports = require("node:crypto");
|
|
880
|
-
|
|
881
1448
|
/***/ }),
|
|
882
1449
|
|
|
883
1450
|
/***/ 79428:
|
|
@@ -1127,7 +1694,7 @@ module.exports = import("@huggingface/transformers");;
|
|
|
1127
1694
|
var __webpack_require__ = require("../../../../../webpack-runtime.js");
|
|
1128
1695
|
__webpack_require__.C(exports);
|
|
1129
1696
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
1130
|
-
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,513,6299,563,8808,7547,4992,46,3042,3566,2068,4377,1638,5585,3524,
|
|
1697
|
+
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,513,6299,563,8808,7547,4992,46,3042,3566,2068,4377,1638,5585,9304,3524,3175,6142,540,4189,4955,5908,5120,1388,309], () => (__webpack_exec__(78507)));
|
|
1131
1698
|
module.exports = __webpack_exports__;
|
|
1132
1699
|
|
|
1133
1700
|
})();
|