@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
|
@@ -322,834 +322,846 @@ module.exports = require("node:http");
|
|
|
322
322
|
|
|
323
323
|
/***/ }),
|
|
324
324
|
|
|
325
|
-
/***/
|
|
326
|
-
/***/ ((
|
|
327
|
-
|
|
328
|
-
__webpack_require__.r(__webpack_exports__);
|
|
329
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
330
|
-
/* harmony export */ handler: () => (/* binding */ handler),
|
|
331
|
-
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
332
|
-
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
333
|
-
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
334
|
-
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
335
|
-
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
336
|
-
/* harmony export */ });
|
|
337
|
-
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
|
|
338
|
-
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__);
|
|
339
|
-
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
|
|
340
|
-
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
341
|
-
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__);
|
|
342
|
-
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
|
|
343
|
-
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__);
|
|
344
|
-
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
|
|
345
|
-
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__);
|
|
346
|
-
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
|
|
347
|
-
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__);
|
|
348
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
349
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__);
|
|
350
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
351
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__);
|
|
352
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
353
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__);
|
|
354
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
355
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__);
|
|
356
|
-
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
357
|
-
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
358
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
359
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__);
|
|
360
|
-
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
361
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
362
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
363
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
364
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__);
|
|
365
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
366
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__);
|
|
367
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
368
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__);
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
325
|
+
/***/ 38522:
|
|
326
|
+
/***/ ((module) => {
|
|
381
327
|
|
|
328
|
+
module.exports = require("node:zlib");
|
|
382
329
|
|
|
330
|
+
/***/ }),
|
|
383
331
|
|
|
332
|
+
/***/ 41720:
|
|
333
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
384
334
|
|
|
335
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
336
|
+
/* harmony export */ BM: () => (/* binding */ upsertAgentConfig),
|
|
337
|
+
/* harmony export */ E1: () => (/* binding */ updateAgentDisplayFilters),
|
|
338
|
+
/* harmony export */ P2: () => (/* binding */ parseCitationStrictness),
|
|
339
|
+
/* harmony export */ S2: () => (/* binding */ getAgentToolCredentials),
|
|
340
|
+
/* harmony export */ SJ: () => (/* binding */ generateAgentId),
|
|
341
|
+
/* harmony export */ TG: () => (/* binding */ getAgentTools),
|
|
342
|
+
/* harmony export */ bg: () => (/* binding */ parseDelegateTargets),
|
|
343
|
+
/* harmony export */ d2: () => (/* binding */ DISPLAY_FILTER_KEYS),
|
|
344
|
+
/* harmony export */ fg: () => (/* binding */ getAgentTierProportions),
|
|
345
|
+
/* harmony export */ mJ: () => (/* binding */ getAgentConfig),
|
|
346
|
+
/* harmony export */ nV: () => (/* binding */ getAgentDisplayFilters),
|
|
347
|
+
/* harmony export */ vU: () => (/* binding */ getDefaultAgentConfig),
|
|
348
|
+
/* harmony export */ vi: () => (/* binding */ DISPLAY_FILTER_DEFAULTS),
|
|
349
|
+
/* harmony export */ xi: () => (/* binding */ deleteAgentConfig),
|
|
350
|
+
/* harmony export */ zb: () => (/* binding */ listAgentConfigs)
|
|
351
|
+
/* harmony export */ });
|
|
352
|
+
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
|
|
353
|
+
/* harmony import */ var _lib_db_transaction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99043);
|
|
354
|
+
/* harmony import */ var _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66849);
|
|
385
355
|
|
|
386
356
|
|
|
387
|
-
// We inject the nextConfigOutput here so that we can use them in the route
|
|
388
|
-
// module.
|
|
389
|
-
const nextConfigOutput = "standalone"
|
|
390
|
-
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
391
|
-
definition: {
|
|
392
|
-
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
393
|
-
page: "/api/v1/health/route",
|
|
394
|
-
pathname: "/api/v1/health",
|
|
395
|
-
filename: "route",
|
|
396
|
-
bundlePath: "app/api/v1/health/route"
|
|
397
|
-
},
|
|
398
|
-
distDir: ".next" || 0,
|
|
399
|
-
relativeProjectDir: false || '',
|
|
400
|
-
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/health/route.ts",
|
|
401
|
-
nextConfigOutput,
|
|
402
|
-
// The lazy require factory ensures that:
|
|
403
|
-
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
404
|
-
// correctly attributing module load time to application-code rather than
|
|
405
|
-
// framework internals.
|
|
406
|
-
// - In all modes: async modules (route files with top-level await) are
|
|
407
|
-
// handled correctly — require() returns a Promise for such modules, which
|
|
408
|
-
// ensureUserland() awaits before the first request is handled.
|
|
409
|
-
userland: ()=>__webpack_require__(8081),
|
|
410
|
-
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
411
|
-
// server HMR updates are picked up without re-executing the entry chunk.
|
|
412
|
-
// Using require() (synchronous) avoids adding async overhead that would be
|
|
413
|
-
// incorrectly attributed to application-code time in devRequestTiming.
|
|
414
|
-
... false ? 0 : {}
|
|
415
|
-
});
|
|
416
|
-
// Pull out the exports that we need to expose from the module. This should
|
|
417
|
-
// be eliminated when we've moved the other routes to the new format. These
|
|
418
|
-
// are used to hook into the route.
|
|
419
|
-
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
420
|
-
function patchFetch() {
|
|
421
|
-
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
422
|
-
workAsyncStorage,
|
|
423
|
-
workUnitAsyncStorage
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
357
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
433
|
-
}
|
|
434
|
-
let srcPage = "/api/v1/health/route";
|
|
435
|
-
// turbopack doesn't normalize `/index` in the page name
|
|
436
|
-
// so we need to to process dynamic routes properly
|
|
437
|
-
// TODO: fix turbopack providing differing value from webpack
|
|
438
|
-
if (false) {} else if (srcPage === '/index') {
|
|
439
|
-
// we always normalize /index specifically
|
|
440
|
-
srcPage = '/';
|
|
358
|
+
const now = ()=>new Date().toISOString();
|
|
359
|
+
/** Coerce arbitrary input (DB row TEXT, API body, undefined) to the enum.
|
|
360
|
+
* Returns `null` for null/undefined/unknown values so callers can default. */ function parseCitationStrictness(value) {
|
|
361
|
+
if (value === "off" || value === "informational" || value === "standard" || value === "strict") {
|
|
362
|
+
return value;
|
|
441
363
|
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
364
|
+
return null;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Parse the JSON-encoded per-agent override of context tier proportions.
|
|
368
|
+
* Returns `null` for NULL, blank, malformed JSON, or any payload that
|
|
369
|
+
* doesn't have three finite non-negative numeric fields. Callers fall
|
|
370
|
+
* back to the model config's value (or built-in defaults) on null.
|
|
371
|
+
*/ function getAgentTierProportions(row) {
|
|
372
|
+
const raw = row.context_tier_proportions;
|
|
373
|
+
if (!raw) return null;
|
|
374
|
+
try {
|
|
375
|
+
const parsed = JSON.parse(raw);
|
|
376
|
+
const hot = Number(parsed.hot);
|
|
377
|
+
const warm = Number(parsed.warm);
|
|
378
|
+
const facts = Number(parsed.facts);
|
|
379
|
+
if (![
|
|
380
|
+
hot,
|
|
381
|
+
warm,
|
|
382
|
+
facts
|
|
383
|
+
].every((n)=>Number.isFinite(n) && n >= 0)) return null;
|
|
384
|
+
if (hot + warm + facts <= 0) return null;
|
|
385
|
+
return {
|
|
386
|
+
hot,
|
|
387
|
+
warm,
|
|
388
|
+
facts
|
|
389
|
+
};
|
|
390
|
+
} catch {
|
|
451
391
|
return null;
|
|
452
392
|
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
//
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
393
|
+
}
|
|
394
|
+
function listAgentConfigs() {
|
|
395
|
+
// Default agent always first; then by the timestamp of each agent's latest message.
|
|
396
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare(`SELECT a.*
|
|
397
|
+
FROM agent_configs a
|
|
398
|
+
LEFT JOIN (
|
|
399
|
+
SELECT t.agent_id, MAX(m.created_at) AS last_message_at
|
|
400
|
+
FROM threads t
|
|
401
|
+
JOIN messages m ON m.thread_id = t.thread_id
|
|
402
|
+
GROUP BY t.agent_id
|
|
403
|
+
) latest ON latest.agent_id = a.id
|
|
404
|
+
ORDER BY a.is_default DESC, COALESCE(latest.last_message_at, a.created_at) DESC, a.id ASC`).all();
|
|
405
|
+
}
|
|
406
|
+
function getDefaultAgentConfig() {
|
|
407
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE is_default=1 LIMIT 1").get() ?? null;
|
|
408
|
+
}
|
|
409
|
+
function getAgentConfig(id) {
|
|
410
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE id=?").get(id) ?? null;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Parse the JSON-encoded delegate whitelist into a deduped string[]. Returns
|
|
414
|
+
* an empty array for NULL, blank, or malformed JSON (delegation is opt-in).
|
|
415
|
+
*/ /**
|
|
416
|
+
* Parse the agent's tool allowlist (`tools` column, stored as a JSON string).
|
|
417
|
+
* Returns an empty array on NULL/blank/malformed JSON — same defensive shape
|
|
418
|
+
* as parseDelegateTargets. Callers that previously did `JSON.parse(cfg.tools)`
|
|
419
|
+
* inline should switch to this getter so the serialization contract stays
|
|
420
|
+
* owned by this store.
|
|
421
|
+
*/ function getAgentTools(cfg) {
|
|
422
|
+
if (!cfg?.tools) return [];
|
|
423
|
+
try {
|
|
424
|
+
const parsed = JSON.parse(cfg.tools);
|
|
425
|
+
if (!Array.isArray(parsed)) return [];
|
|
426
|
+
return parsed.filter((x)=>typeof x === "string" && x.length > 0);
|
|
427
|
+
} catch {
|
|
428
|
+
return [];
|
|
477
429
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
430
|
+
}
|
|
431
|
+
function parseDelegateTargets(raw) {
|
|
432
|
+
if (!raw) return [];
|
|
433
|
+
try {
|
|
434
|
+
const parsed = JSON.parse(raw);
|
|
435
|
+
if (!Array.isArray(parsed)) return [];
|
|
436
|
+
const ids = parsed.filter((x)=>typeof x === "string" && x.length > 0);
|
|
437
|
+
return Array.from(new Set(ids));
|
|
438
|
+
} catch {
|
|
439
|
+
return [];
|
|
483
440
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
499
|
-
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
500
|
-
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
501
|
-
globalThis.__incrementalCache = incrementalCache;
|
|
502
|
-
const context = {
|
|
503
|
-
params,
|
|
504
|
-
previewProps,
|
|
505
|
-
renderOpts: {
|
|
506
|
-
experimental: {
|
|
507
|
-
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
508
|
-
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
509
|
-
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
510
|
-
},
|
|
511
|
-
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
512
|
-
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
513
|
-
isDraftMode,
|
|
514
|
-
incrementalCache,
|
|
515
|
-
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
516
|
-
cacheLifeProfiles: nextConfig.cacheLife,
|
|
517
|
-
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
518
|
-
waitUntil: ctx.waitUntil,
|
|
519
|
-
onClose: (cb)=>{
|
|
520
|
-
res.on('close', cb);
|
|
521
|
-
},
|
|
522
|
-
onAfterTaskError: undefined
|
|
523
|
-
},
|
|
524
|
-
sharedContext: {
|
|
525
|
-
buildId,
|
|
526
|
-
deploymentId
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Parse the per-agent `{ toolName: credentialId }` override map stored in
|
|
444
|
+
* the `tool_credentials` column. Returns an empty record on NULL / blank /
|
|
445
|
+
* malformed JSON / non-string entries so downstream code can treat the
|
|
446
|
+
* result as a plain lookup without further validation.
|
|
447
|
+
*/ function getAgentToolCredentials(cfg) {
|
|
448
|
+
if (!cfg?.tool_credentials) return {};
|
|
449
|
+
try {
|
|
450
|
+
const parsed = JSON.parse(cfg.tool_credentials);
|
|
451
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
452
|
+
const out = {};
|
|
453
|
+
for (const [k, v] of Object.entries(parsed)){
|
|
454
|
+
if (typeof v === "string" && v.length > 0) out[k] = v;
|
|
527
455
|
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
456
|
+
return out;
|
|
457
|
+
} catch {
|
|
458
|
+
return {};
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
function upsertAgentConfig(input) {
|
|
462
|
+
return (0,_lib_db_transaction__WEBPACK_IMPORTED_MODULE_1__/* .withDbTransaction */ .J)(()=>upsertAgentConfigTransaction(input));
|
|
463
|
+
}
|
|
464
|
+
function upsertAgentConfigTransaction(input) {
|
|
465
|
+
const t = now();
|
|
466
|
+
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
|
|
467
|
+
const existing = getAgentConfig(input.id);
|
|
468
|
+
const created_at = existing?.created_at ?? t;
|
|
469
|
+
const existingMbti = toMbti(existing?.adaptive_mbti);
|
|
470
|
+
const mbti = input.adaptive_mbti ?? existingMbti ?? "INTJ";
|
|
471
|
+
const preset = _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__/* .MBTI_PRESETS */ .e[mbti];
|
|
472
|
+
// Omitted sliders keep their tuned values; they only fall back to the
|
|
473
|
+
// preset when the type changes or the agent is new. Otherwise every
|
|
474
|
+
// partial update (approved proposals, tool edits) reset them.
|
|
475
|
+
const keepTuned = existing !== null && existing !== undefined && mbti === existingMbti;
|
|
476
|
+
const strength = input.adaptive_persona_strength ?? (keepTuned ? existing.adaptive_persona_strength : preset.strength);
|
|
477
|
+
const empathy = input.adaptive_empathy ?? (keepTuned ? existing.adaptive_empathy : preset.empathy);
|
|
478
|
+
const expressiveness = input.adaptive_expressiveness ?? (keepTuned ? existing.adaptive_expressiveness : preset.expressiveness);
|
|
479
|
+
const verbosity = input.adaptive_verbosity ?? (keepTuned ? existing.adaptive_verbosity : preset.verbosity);
|
|
480
|
+
if (input.is_default) db.prepare("UPDATE agent_configs SET is_default=0").run();
|
|
481
|
+
// harness_id: explicit `undefined` means "keep existing"; explicit `null`
|
|
482
|
+
// means "use the global default". Empty string is normalised to null too,
|
|
483
|
+
// matching how the AgentEditor sends "" for the inherit option.
|
|
484
|
+
const harnessId = input.harness_id === undefined ? existing?.harness_id ?? null : input.harness_id && input.harness_id.length > 0 ? input.harness_id : null;
|
|
485
|
+
// delegate_targets: undefined = keep existing; explicit empty array clears.
|
|
486
|
+
const delegateTargets = input.delegate_targets === undefined ? existing?.delegate_targets ?? null : JSON.stringify(Array.from(new Set(input.delegate_targets.filter((id)=>id && id !== input.id))));
|
|
487
|
+
// context_tier_proportions: undefined = keep existing; null = clear and
|
|
488
|
+
// inherit from the model; object = serialise as JSON. Negative values are
|
|
489
|
+
// clamped to 0 so the upsert can't poison the column with bad data.
|
|
490
|
+
const tierProportions = input.context_tier_proportions === undefined ? existing?.context_tier_proportions ?? null : input.context_tier_proportions === null ? null : JSON.stringify({
|
|
491
|
+
hot: Math.max(0, Number(input.context_tier_proportions.hot) || 0),
|
|
492
|
+
warm: Math.max(0, Number(input.context_tier_proportions.warm) || 0),
|
|
493
|
+
facts: Math.max(0, Number(input.context_tier_proportions.facts) || 0)
|
|
494
|
+
});
|
|
495
|
+
// Anti-hallucination override: `undefined` keeps existing; `null` clears
|
|
496
|
+
// the override (inherits env). Empty-string model is normalised to null
|
|
497
|
+
// so the editor can ship "" for the inherit option.
|
|
498
|
+
const antiHallucMode = input.anti_hallucination_mode === undefined ? existing?.anti_hallucination_mode ?? null : input.anti_hallucination_mode === null ? null : input.anti_hallucination_mode === "off" || input.anti_hallucination_mode === "regex" || input.anti_hallucination_mode === "model" ? input.anti_hallucination_mode : null;
|
|
499
|
+
const antiHallucModel = input.anti_hallucination_model_config === undefined ? existing?.anti_hallucination_model_config ?? null : input.anti_hallucination_model_config && input.anti_hallucination_model_config.trim().length > 0 ? input.anti_hallucination_model_config.trim() : null;
|
|
500
|
+
const citationStrictness = input.citation_strictness === undefined ? parseCitationStrictness(existing?.citation_strictness) ?? "off" : parseCitationStrictness(input.citation_strictness) ?? "off";
|
|
501
|
+
const toolCredentials = serialiseToolCredentials(input.tool_credentials, existing?.tool_credentials ?? null);
|
|
502
|
+
const VALID_ROUTER_POLICIES = new Set([
|
|
503
|
+
"cheap",
|
|
504
|
+
"fast",
|
|
505
|
+
"balanced",
|
|
506
|
+
"quality"
|
|
507
|
+
]);
|
|
508
|
+
const routerPolicy = input.router_policy === undefined ? existing?.router_policy ?? null : input.router_policy !== null && VALID_ROUTER_POLICIES.has(input.router_policy) ? input.router_policy : null;
|
|
509
|
+
const routerEnabled = input.router_enabled === undefined ? existing?.router_enabled ?? null : input.router_enabled === null ? null : input.router_enabled ? 1 : 0;
|
|
510
|
+
const VALID_USAGE_STRATEGIES = new Set([
|
|
511
|
+
"cost_saving",
|
|
512
|
+
"fast",
|
|
513
|
+
"balanced",
|
|
514
|
+
"high_reasoning"
|
|
515
|
+
]);
|
|
516
|
+
const usageStrategy = input.usage_strategy === undefined ? existing?.usage_strategy ?? null : input.usage_strategy !== null && VALID_USAGE_STRATEGIES.has(input.usage_strategy) ? input.usage_strategy : null;
|
|
517
|
+
const requestedWarmSummaryLimit = input.warm_summary_limit ?? existing?.warm_summary_limit ?? 50;
|
|
518
|
+
const warmSummaryLimit = Number.isFinite(requestedWarmSummaryLimit) ? Math.max(0, Math.floor(requestedWarmSummaryLimit)) : existing?.warm_summary_limit ?? 50;
|
|
519
|
+
db.prepare(`INSERT OR REPLACE INTO agent_configs
|
|
520
|
+
(id, name, icon, identity, instructions, tools, model_config_name, is_default,
|
|
521
|
+
history_limit, history_window_hours, warm_summary_limit, never_reply,
|
|
522
|
+
hot_turn_limit,
|
|
523
|
+
adaptive_persona_enabled, adaptive_persona_strength, adaptive_empathy, adaptive_expressiveness, adaptive_verbosity, adaptive_mbti,
|
|
524
|
+
voice_enabled, voice_model, voice_name, voice_stt_model, voice_auto_speak,
|
|
525
|
+
harness_id, delegate_targets, context_tier_proportions,
|
|
526
|
+
anti_hallucination_mode, anti_hallucination_model_config, citation_strictness,
|
|
527
|
+
tool_credentials, router_policy, router_enabled, usage_strategy,
|
|
528
|
+
created_at, updated_at)
|
|
529
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(input.id, input.name, input.icon ?? null, input.identity, input.instructions, JSON.stringify(input.tools), input.model_config_name ?? null, input.is_default ? 1 : existing?.is_default ?? 0, input.history_limit ?? existing?.history_limit ?? 50, input.history_window_hours ?? existing?.history_window_hours ?? 8, warmSummaryLimit, // never_reply is a boolean toggle — explicit `undefined` means "keep existing"
|
|
530
|
+
// (important for PATCH-style updates that omit the field).
|
|
531
|
+
input.never_reply === undefined ? existing?.never_reply ?? 0 : input.never_reply ? 1 : 0, Math.max(0, Math.floor(input.hot_turn_limit ?? existing?.hot_turn_limit ?? 12)), input.adaptive_persona_enabled === undefined ? existing?.adaptive_persona_enabled ?? 0 : input.adaptive_persona_enabled ? 1 : 0, clampPercent(strength, existing?.adaptive_persona_strength ?? 50), clampPercent(empathy, existing?.adaptive_empathy ?? 50), clampPercent(expressiveness, existing?.adaptive_expressiveness ?? 50), clampPercent(verbosity, existing?.adaptive_verbosity ?? 50), mbti, input.voice_enabled === undefined ? existing?.voice_enabled ?? 0 : input.voice_enabled ? 1 : 0, (input.voice_model ?? existing?.voice_model ?? "gemini-2.5-flash-preview-tts").trim() || "gemini-2.5-flash-preview-tts", (input.voice_name ?? existing?.voice_name ?? "Kore").trim() || "Kore", (input.voice_stt_model ?? existing?.voice_stt_model ?? "gemini-2.5-flash").trim() || "gemini-2.5-flash", input.voice_auto_speak === undefined ? existing?.voice_auto_speak ?? 1 : input.voice_auto_speak ? 1 : 0, harnessId, delegateTargets, tierProportions, antiHallucMode, antiHallucModel, citationStrictness, toolCredentials, routerPolicy, routerEnabled, usageStrategy, created_at, t);
|
|
532
|
+
return getAgentConfig(input.id);
|
|
533
|
+
}
|
|
534
|
+
function clampPercent(next, fallback) {
|
|
535
|
+
const n = Number.isFinite(next) ? Number(next) : fallback;
|
|
536
|
+
return Math.max(0, Math.min(100, Math.round(n)));
|
|
537
|
+
}
|
|
538
|
+
function serialiseToolCredentials(input, existing) {
|
|
539
|
+
if (input === undefined) return existing;
|
|
540
|
+
const cleaned = {};
|
|
541
|
+
for (const [k, v] of Object.entries(input)){
|
|
542
|
+
if (typeof k === "string" && k.length > 0 && typeof v === "string" && v.length > 0) {
|
|
543
|
+
cleaned[k] = v;
|
|
609
544
|
}
|
|
545
|
+
}
|
|
546
|
+
if (Object.keys(cleaned).length === 0) return null;
|
|
547
|
+
return JSON.stringify(cleaned);
|
|
548
|
+
}
|
|
549
|
+
function toMbti(v) {
|
|
550
|
+
if (!v) return null;
|
|
551
|
+
return v in _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__/* .MBTI_PRESETS */ .e ? v : null;
|
|
552
|
+
}
|
|
553
|
+
function deleteAgentConfig(id) {
|
|
554
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("DELETE FROM agent_configs WHERE id=?").run(id).changes > 0;
|
|
555
|
+
}
|
|
556
|
+
function generateAgentId(name) {
|
|
557
|
+
const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
|
|
558
|
+
const suffix = Math.random().toString(36).slice(2, 6);
|
|
559
|
+
return slug ? `${slug}-${suffix}` : `agent-${suffix}`;
|
|
560
|
+
}
|
|
561
|
+
// ── ADR-0022: per-agent message-channel display filters ─────────────────
|
|
562
|
+
// Canonical channel keys mirrored in `hooks/useMessageFilters.ts`. Kept
|
|
563
|
+
// in sync there by importing this constant — single source of truth.
|
|
564
|
+
const DISPLAY_FILTER_KEYS = [
|
|
565
|
+
"scheduled_task",
|
|
566
|
+
"watcher",
|
|
567
|
+
"bridge",
|
|
568
|
+
"extension",
|
|
569
|
+
"page_capture",
|
|
570
|
+
"synthetic",
|
|
571
|
+
"tool_use",
|
|
572
|
+
"thinking"
|
|
573
|
+
];
|
|
574
|
+
const DISPLAY_FILTER_DEFAULTS = {
|
|
575
|
+
scheduled_task: true,
|
|
576
|
+
watcher: true,
|
|
577
|
+
bridge: true,
|
|
578
|
+
extension: true,
|
|
579
|
+
page_capture: true,
|
|
580
|
+
synthetic: true,
|
|
581
|
+
tool_use: true,
|
|
582
|
+
thinking: true
|
|
583
|
+
};
|
|
584
|
+
function parseDisplayFilters(raw) {
|
|
585
|
+
if (!raw) return {
|
|
586
|
+
...DISPLAY_FILTER_DEFAULTS
|
|
610
587
|
};
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
646
|
-
}
|
|
647
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
648
|
-
if (!(isMinimalMode && isIsr)) {
|
|
649
|
-
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
650
|
-
}
|
|
651
|
-
// If cache control is already set on the response we don't
|
|
652
|
-
// override it to allow users to customize it via next.config
|
|
653
|
-
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
654
|
-
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
655
|
-
}
|
|
656
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.
|
|
657
|
-
new Response(cacheEntry.value.body, {
|
|
658
|
-
headers,
|
|
659
|
-
status: cacheEntry.value.status || 200
|
|
660
|
-
}));
|
|
661
|
-
return;
|
|
662
|
-
} catch (err) {
|
|
663
|
-
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
664
|
-
const silenceLog = false;
|
|
665
|
-
await routeModule.onRequestError(req, err, {
|
|
666
|
-
routerKind: 'App Router',
|
|
667
|
-
routePath: normalizedSrcPage,
|
|
668
|
-
routeType: 'route',
|
|
669
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
670
|
-
isStaticGeneration: cacheKey !== null,
|
|
671
|
-
isOnDemandRevalidate
|
|
672
|
-
})
|
|
673
|
-
}, silenceLog, routerServerContext);
|
|
674
|
-
}
|
|
675
|
-
// rethrow so that we can handle serving error page
|
|
676
|
-
// If this is during static generation, throw the error again.
|
|
677
|
-
if (isIsr) throw err;
|
|
678
|
-
// Otherwise, send a 500 response unless the original response has
|
|
679
|
-
// already committed. In that case, preserve its status code for
|
|
680
|
-
// telemetry while still recording the failure and terminating a response
|
|
681
|
-
// that the failed pipeline left open.
|
|
682
|
-
if (res.headersSent) {
|
|
683
|
-
if (currentSpan) {
|
|
684
|
-
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
685
|
-
currentSpan.recordException(error);
|
|
686
|
-
currentSpan.setStatus({
|
|
687
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
688
|
-
message: error.message
|
|
689
|
-
});
|
|
690
|
-
currentSpan.setAttribute('error.type', error.name);
|
|
691
|
-
}
|
|
692
|
-
if (!res.writableEnded && !res.destroyed) {
|
|
693
|
-
res.end();
|
|
694
|
-
}
|
|
695
|
-
} else {
|
|
696
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
697
|
-
status: 500
|
|
698
|
-
}));
|
|
699
|
-
}
|
|
700
|
-
return;
|
|
701
|
-
} finally{
|
|
702
|
-
;
|
|
703
|
-
(()=>{
|
|
704
|
-
if (!currentSpan) {
|
|
705
|
-
return;
|
|
706
|
-
}
|
|
707
|
-
let statusCode = res.statusCode;
|
|
708
|
-
currentSpan.setAttributes({
|
|
709
|
-
'http.status_code': statusCode,
|
|
710
|
-
'next.rsc': false
|
|
711
|
-
});
|
|
712
|
-
if (statusCode && statusCode >= 500) {
|
|
713
|
-
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
714
|
-
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
715
|
-
currentSpan.setStatus({
|
|
716
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
717
|
-
});
|
|
718
|
-
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
719
|
-
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
720
|
-
}
|
|
721
|
-
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
722
|
-
// We were unable to get attributes, probably OTEL is not enabled
|
|
723
|
-
if (!rootSpanAttributes) {
|
|
724
|
-
return;
|
|
725
|
-
}
|
|
726
|
-
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
727
|
-
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
728
|
-
return;
|
|
729
|
-
}
|
|
730
|
-
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
731
|
-
const name = `${method} ${route}`;
|
|
732
|
-
currentSpan.setAttributes({
|
|
733
|
-
'next.route': route,
|
|
734
|
-
'http.route': route,
|
|
735
|
-
'next.span_name': name
|
|
736
|
-
});
|
|
737
|
-
currentSpan.updateName(name);
|
|
738
|
-
// Propagate http.route to the parent span if one exists (e.g.
|
|
739
|
-
// a platform-created HTTP span in adapter deployments).
|
|
740
|
-
if (parentSpan && parentSpan !== currentSpan) {
|
|
741
|
-
parentSpan.setAttribute('http.route', route);
|
|
742
|
-
parentSpan.updateName(name);
|
|
743
|
-
}
|
|
744
|
-
})();
|
|
745
|
-
}
|
|
588
|
+
try {
|
|
589
|
+
const parsed = JSON.parse(raw);
|
|
590
|
+
// Merge over defaults so newly-added channels stay visible on old rows.
|
|
591
|
+
return {
|
|
592
|
+
...DISPLAY_FILTER_DEFAULTS,
|
|
593
|
+
...parsed
|
|
594
|
+
};
|
|
595
|
+
} catch {
|
|
596
|
+
return {
|
|
597
|
+
...DISPLAY_FILTER_DEFAULTS
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
function getAgentDisplayFilters(id) {
|
|
602
|
+
const row = getAgentConfig(id);
|
|
603
|
+
if (!row) return null;
|
|
604
|
+
return parseDisplayFilters(row.display_filters);
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Merge a partial filter map into the agent's stored prefs. Pass `null` to
|
|
608
|
+
* reset to defaults (clears the column). Safe against concurrent toggles
|
|
609
|
+
* from multiple browser tabs because the merge happens server-side.
|
|
610
|
+
*/ function updateAgentDisplayFilters(id, patch) {
|
|
611
|
+
const row = getAgentConfig(id);
|
|
612
|
+
if (!row) return null;
|
|
613
|
+
if (patch === null) {
|
|
614
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("UPDATE agent_configs SET display_filters=NULL, updated_at=? WHERE id=?").run(now(), id);
|
|
615
|
+
return {
|
|
616
|
+
...DISPLAY_FILTER_DEFAULTS
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
const current = parseDisplayFilters(row.display_filters);
|
|
620
|
+
const next = {
|
|
621
|
+
...current
|
|
746
622
|
};
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
if (isWrappedByNextServer && activeSpan) {
|
|
750
|
-
await handleResponse(activeSpan, undefined);
|
|
751
|
-
} else {
|
|
752
|
-
let parentSpan = tracer.getActiveScopeSpan();
|
|
753
|
-
await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
|
|
754
|
-
spanName: `${method} ${srcPage}`,
|
|
755
|
-
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
|
|
756
|
-
attributes: {
|
|
757
|
-
'http.method': method,
|
|
758
|
-
'http.target': req.url
|
|
759
|
-
}
|
|
760
|
-
}, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
|
|
623
|
+
for (const k of DISPLAY_FILTER_KEYS){
|
|
624
|
+
if (k in patch && typeof patch[k] === "boolean") next[k] = patch[k];
|
|
761
625
|
}
|
|
626
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("UPDATE agent_configs SET display_filters=?, updated_at=? WHERE id=?").run(JSON.stringify(next), now(), id);
|
|
627
|
+
return next;
|
|
762
628
|
}
|
|
763
629
|
|
|
764
|
-
//# sourceMappingURL=app-route.js.map
|
|
765
630
|
|
|
631
|
+
/***/ }),
|
|
632
|
+
|
|
633
|
+
/***/ 44708:
|
|
634
|
+
/***/ ((module) => {
|
|
635
|
+
|
|
636
|
+
module.exports = require("node:https");
|
|
766
637
|
|
|
767
638
|
/***/ }),
|
|
768
639
|
|
|
769
|
-
/***/
|
|
640
|
+
/***/ 44870:
|
|
770
641
|
/***/ ((module) => {
|
|
771
642
|
|
|
772
|
-
module.exports = require("
|
|
643
|
+
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
773
644
|
|
|
774
645
|
/***/ }),
|
|
775
646
|
|
|
776
|
-
/***/
|
|
777
|
-
/***/ ((
|
|
647
|
+
/***/ 48161:
|
|
648
|
+
/***/ ((module) => {
|
|
778
649
|
|
|
779
|
-
|
|
780
|
-
/* harmony export */ BM: () => (/* binding */ upsertAgentConfig),
|
|
781
|
-
/* harmony export */ E1: () => (/* binding */ updateAgentDisplayFilters),
|
|
782
|
-
/* harmony export */ P2: () => (/* binding */ parseCitationStrictness),
|
|
783
|
-
/* harmony export */ S2: () => (/* binding */ getAgentToolCredentials),
|
|
784
|
-
/* harmony export */ SJ: () => (/* binding */ generateAgentId),
|
|
785
|
-
/* harmony export */ TG: () => (/* binding */ getAgentTools),
|
|
786
|
-
/* harmony export */ bg: () => (/* binding */ parseDelegateTargets),
|
|
787
|
-
/* harmony export */ d2: () => (/* binding */ DISPLAY_FILTER_KEYS),
|
|
788
|
-
/* harmony export */ fg: () => (/* binding */ getAgentTierProportions),
|
|
789
|
-
/* harmony export */ mJ: () => (/* binding */ getAgentConfig),
|
|
790
|
-
/* harmony export */ nV: () => (/* binding */ getAgentDisplayFilters),
|
|
791
|
-
/* harmony export */ vU: () => (/* binding */ getDefaultAgentConfig),
|
|
792
|
-
/* harmony export */ vi: () => (/* binding */ DISPLAY_FILTER_DEFAULTS),
|
|
793
|
-
/* harmony export */ xi: () => (/* binding */ deleteAgentConfig),
|
|
794
|
-
/* harmony export */ zb: () => (/* binding */ listAgentConfigs)
|
|
795
|
-
/* harmony export */ });
|
|
796
|
-
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
|
|
797
|
-
/* harmony import */ var _lib_db_transaction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99043);
|
|
798
|
-
/* harmony import */ var _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66849);
|
|
650
|
+
module.exports = require("node:os");
|
|
799
651
|
|
|
652
|
+
/***/ }),
|
|
800
653
|
|
|
654
|
+
/***/ 51455:
|
|
655
|
+
/***/ ((module) => {
|
|
801
656
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
657
|
+
module.exports = require("node:fs/promises");
|
|
658
|
+
|
|
659
|
+
/***/ }),
|
|
660
|
+
|
|
661
|
+
/***/ 55511:
|
|
662
|
+
/***/ ((module) => {
|
|
663
|
+
|
|
664
|
+
module.exports = require("crypto");
|
|
665
|
+
|
|
666
|
+
/***/ }),
|
|
667
|
+
|
|
668
|
+
/***/ 55591:
|
|
669
|
+
/***/ ((module) => {
|
|
670
|
+
|
|
671
|
+
module.exports = require("https");
|
|
672
|
+
|
|
673
|
+
/***/ }),
|
|
674
|
+
|
|
675
|
+
/***/ 57075:
|
|
676
|
+
/***/ ((module) => {
|
|
677
|
+
|
|
678
|
+
module.exports = require("node:stream");
|
|
679
|
+
|
|
680
|
+
/***/ }),
|
|
681
|
+
|
|
682
|
+
/***/ 57975:
|
|
683
|
+
/***/ ((module) => {
|
|
684
|
+
|
|
685
|
+
module.exports = require("node:util");
|
|
686
|
+
|
|
687
|
+
/***/ }),
|
|
688
|
+
|
|
689
|
+
/***/ 63033:
|
|
690
|
+
/***/ ((module) => {
|
|
691
|
+
|
|
692
|
+
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
693
|
+
|
|
694
|
+
/***/ }),
|
|
695
|
+
|
|
696
|
+
/***/ 73024:
|
|
697
|
+
/***/ ((module) => {
|
|
698
|
+
|
|
699
|
+
module.exports = require("node:fs");
|
|
700
|
+
|
|
701
|
+
/***/ }),
|
|
702
|
+
|
|
703
|
+
/***/ 75355:
|
|
704
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
705
|
+
|
|
706
|
+
__webpack_require__.r(__webpack_exports__);
|
|
707
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
708
|
+
/* harmony export */ handler: () => (/* binding */ handler),
|
|
709
|
+
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
710
|
+
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
711
|
+
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
712
|
+
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
713
|
+
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
714
|
+
/* harmony export */ });
|
|
715
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
|
|
716
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__);
|
|
717
|
+
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
|
|
718
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
719
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__);
|
|
720
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
|
|
721
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__);
|
|
722
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
|
|
723
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__);
|
|
724
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
|
|
725
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__);
|
|
726
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
727
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__);
|
|
728
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
729
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__);
|
|
730
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
731
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__);
|
|
732
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
733
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__);
|
|
734
|
+
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
735
|
+
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
736
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
737
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__);
|
|
738
|
+
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
739
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
740
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
741
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
742
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__);
|
|
743
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
744
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__);
|
|
745
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
746
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__);
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
// We inject the nextConfigOutput here so that we can use them in the route
|
|
766
|
+
// module.
|
|
767
|
+
const nextConfigOutput = "standalone"
|
|
768
|
+
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
769
|
+
definition: {
|
|
770
|
+
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
771
|
+
page: "/api/v1/health/route",
|
|
772
|
+
pathname: "/api/v1/health",
|
|
773
|
+
filename: "route",
|
|
774
|
+
bundlePath: "app/api/v1/health/route"
|
|
775
|
+
},
|
|
776
|
+
distDir: ".next" || 0,
|
|
777
|
+
relativeProjectDir: false || '',
|
|
778
|
+
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/health/route.ts",
|
|
779
|
+
nextConfigOutput,
|
|
780
|
+
// The lazy require factory ensures that:
|
|
781
|
+
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
782
|
+
// correctly attributing module load time to application-code rather than
|
|
783
|
+
// framework internals.
|
|
784
|
+
// - In all modes: async modules (route files with top-level await) are
|
|
785
|
+
// handled correctly — require() returns a Promise for such modules, which
|
|
786
|
+
// ensureUserland() awaits before the first request is handled.
|
|
787
|
+
userland: ()=>__webpack_require__(8081),
|
|
788
|
+
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
789
|
+
// server HMR updates are picked up without re-executing the entry chunk.
|
|
790
|
+
// Using require() (synchronous) avoids adding async overhead that would be
|
|
791
|
+
// incorrectly attributed to application-code time in devRequestTiming.
|
|
792
|
+
... false ? 0 : {}
|
|
793
|
+
});
|
|
794
|
+
// Pull out the exports that we need to expose from the module. This should
|
|
795
|
+
// be eliminated when we've moved the other routes to the new format. These
|
|
796
|
+
// are used to hook into the route.
|
|
797
|
+
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
798
|
+
function patchFetch() {
|
|
799
|
+
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
800
|
+
workAsyncStorage,
|
|
801
|
+
workUnitAsyncStorage
|
|
802
|
+
});
|
|
855
803
|
}
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
* Parse the agent's tool allowlist (`tools` column, stored as a JSON string).
|
|
861
|
-
* Returns an empty array on NULL/blank/malformed JSON — same defensive shape
|
|
862
|
-
* as parseDelegateTargets. Callers that previously did `JSON.parse(cfg.tools)`
|
|
863
|
-
* inline should switch to this getter so the serialization contract stays
|
|
864
|
-
* owned by this store.
|
|
865
|
-
*/ function getAgentTools(cfg) {
|
|
866
|
-
if (!cfg?.tools) return [];
|
|
867
|
-
try {
|
|
868
|
-
const parsed = JSON.parse(cfg.tools);
|
|
869
|
-
if (!Array.isArray(parsed)) return [];
|
|
870
|
-
return parsed.filter((x)=>typeof x === "string" && x.length > 0);
|
|
871
|
-
} catch {
|
|
872
|
-
return [];
|
|
804
|
+
|
|
805
|
+
async function handler(req, res, ctx) {
|
|
806
|
+
if (ctx.requestMeta) {
|
|
807
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
873
808
|
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
if (!raw) return [];
|
|
877
|
-
try {
|
|
878
|
-
const parsed = JSON.parse(raw);
|
|
879
|
-
if (!Array.isArray(parsed)) return [];
|
|
880
|
-
const ids = parsed.filter((x)=>typeof x === "string" && x.length > 0);
|
|
881
|
-
return Array.from(new Set(ids));
|
|
882
|
-
} catch {
|
|
883
|
-
return [];
|
|
809
|
+
if (routeModule.isDev) {
|
|
810
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
884
811
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
if (!cfg?.tool_credentials) return {};
|
|
893
|
-
try {
|
|
894
|
-
const parsed = JSON.parse(cfg.tool_credentials);
|
|
895
|
-
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
896
|
-
const out = {};
|
|
897
|
-
for (const [k, v] of Object.entries(parsed)){
|
|
898
|
-
if (typeof v === "string" && v.length > 0) out[k] = v;
|
|
899
|
-
}
|
|
900
|
-
return out;
|
|
901
|
-
} catch {
|
|
902
|
-
return {};
|
|
812
|
+
let srcPage = "/api/v1/health/route";
|
|
813
|
+
// turbopack doesn't normalize `/index` in the page name
|
|
814
|
+
// so we need to to process dynamic routes properly
|
|
815
|
+
// TODO: fix turbopack providing differing value from webpack
|
|
816
|
+
if (false) {} else if (srcPage === '/index') {
|
|
817
|
+
// we always normalize /index specifically
|
|
818
|
+
srcPage = '/';
|
|
903
819
|
}
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
function upsertAgentConfigTransaction(input) {
|
|
909
|
-
const t = now();
|
|
910
|
-
const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
|
|
911
|
-
const existing = getAgentConfig(input.id);
|
|
912
|
-
const created_at = existing?.created_at ?? t;
|
|
913
|
-
const mbti = input.adaptive_mbti ?? toMbti(existing?.adaptive_mbti) ?? "INTJ";
|
|
914
|
-
const preset = _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__/* .MBTI_PRESETS */ .e[mbti];
|
|
915
|
-
const strength = input.adaptive_persona_strength ?? preset.strength;
|
|
916
|
-
const empathy = input.adaptive_empathy ?? preset.empathy;
|
|
917
|
-
const expressiveness = input.adaptive_expressiveness ?? preset.expressiveness;
|
|
918
|
-
const verbosity = input.adaptive_verbosity ?? preset.verbosity;
|
|
919
|
-
if (input.is_default) db.prepare("UPDATE agent_configs SET is_default=0").run();
|
|
920
|
-
// harness_id: explicit `undefined` means "keep existing"; explicit `null`
|
|
921
|
-
// means "use the global default". Empty string is normalised to null too,
|
|
922
|
-
// matching how the AgentEditor sends "" for the inherit option.
|
|
923
|
-
const harnessId = input.harness_id === undefined ? existing?.harness_id ?? null : input.harness_id && input.harness_id.length > 0 ? input.harness_id : null;
|
|
924
|
-
// delegate_targets: undefined = keep existing; explicit empty array clears.
|
|
925
|
-
const delegateTargets = input.delegate_targets === undefined ? existing?.delegate_targets ?? null : JSON.stringify(Array.from(new Set(input.delegate_targets.filter((id)=>id && id !== input.id))));
|
|
926
|
-
// context_tier_proportions: undefined = keep existing; null = clear and
|
|
927
|
-
// inherit from the model; object = serialise as JSON. Negative values are
|
|
928
|
-
// clamped to 0 so the upsert can't poison the column with bad data.
|
|
929
|
-
const tierProportions = input.context_tier_proportions === undefined ? existing?.context_tier_proportions ?? null : input.context_tier_proportions === null ? null : JSON.stringify({
|
|
930
|
-
hot: Math.max(0, Number(input.context_tier_proportions.hot) || 0),
|
|
931
|
-
warm: Math.max(0, Number(input.context_tier_proportions.warm) || 0),
|
|
932
|
-
facts: Math.max(0, Number(input.context_tier_proportions.facts) || 0)
|
|
820
|
+
const multiZoneDraftMode = false;
|
|
821
|
+
const prepareResult = await routeModule.prepare(req, res, {
|
|
822
|
+
srcPage,
|
|
823
|
+
multiZoneDraftMode
|
|
933
824
|
});
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
const
|
|
941
|
-
const
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
825
|
+
if (!prepareResult) {
|
|
826
|
+
res.statusCode = 400;
|
|
827
|
+
res.end('Bad Request');
|
|
828
|
+
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
829
|
+
return null;
|
|
830
|
+
}
|
|
831
|
+
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
832
|
+
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
833
|
+
// Only this route's prerenders can establish ISR or admit generated params.
|
|
834
|
+
const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]) && (routeModule.isDev || (0,next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__.isRouteCacheOwner)(resolvedPathname, routeModule.cacheOwner, prerenderManifest.routes[resolvedPathname]));
|
|
835
|
+
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
836
|
+
const render404 = async ()=>{
|
|
837
|
+
// TODO: should route-module itself handle rendering the 404
|
|
838
|
+
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
839
|
+
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
840
|
+
} else {
|
|
841
|
+
res.end('This page could not be found');
|
|
842
|
+
}
|
|
843
|
+
return null;
|
|
844
|
+
};
|
|
845
|
+
if (isIsr && !isDraftMode) {
|
|
846
|
+
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
847
|
+
if (prerenderInfo) {
|
|
848
|
+
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
849
|
+
if (nextConfig.adapterPath) {
|
|
850
|
+
return await render404();
|
|
851
|
+
}
|
|
852
|
+
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
let cacheKey = null;
|
|
857
|
+
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
858
|
+
cacheKey = resolvedPathname;
|
|
859
|
+
// ensure /index and / is normalized to one key
|
|
860
|
+
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
861
|
+
}
|
|
862
|
+
// Before rendering (which initializes component tree modules), we have to
|
|
863
|
+
// set the reference manifests to our global store so Server Action's
|
|
864
|
+
// encryption util can access to them at the top level of the page module.
|
|
865
|
+
if (serverActionsManifest && clientReferenceManifest) {
|
|
866
|
+
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
867
|
+
page: srcPage,
|
|
868
|
+
clientReferenceManifest,
|
|
869
|
+
serverActionsManifest
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
const method = req.method || 'GET';
|
|
873
|
+
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
874
|
+
const activeSpan = tracer.getActiveScopeSpan();
|
|
875
|
+
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
876
|
+
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
877
|
+
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
878
|
+
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
879
|
+
globalThis.__incrementalCache = incrementalCache;
|
|
880
|
+
const context = {
|
|
881
|
+
params,
|
|
882
|
+
previewProps,
|
|
883
|
+
renderOpts: {
|
|
884
|
+
experimental: {
|
|
885
|
+
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
886
|
+
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
887
|
+
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
888
|
+
},
|
|
889
|
+
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
890
|
+
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
891
|
+
isDraftMode,
|
|
892
|
+
incrementalCache,
|
|
893
|
+
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
894
|
+
cacheLifeProfiles: nextConfig.cacheLife,
|
|
895
|
+
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
896
|
+
waitUntil: ctx.waitUntil,
|
|
897
|
+
onClose: (cb)=>{
|
|
898
|
+
res.on('close', cb);
|
|
899
|
+
},
|
|
900
|
+
onAfterTaskError: undefined
|
|
901
|
+
},
|
|
902
|
+
sharedContext: {
|
|
903
|
+
buildId,
|
|
904
|
+
deploymentId
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
908
|
+
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
909
|
+
const nextReq = next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.NextRequestAdapter.fromNodeNextRequest(nodeNextReq, (0,next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.signalFromNodeResponse)(res));
|
|
910
|
+
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
911
|
+
try {
|
|
912
|
+
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
913
|
+
res.statusCode = 404;
|
|
914
|
+
// on-demand revalidate always sets this header
|
|
915
|
+
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
916
|
+
res.end('This page could not be found');
|
|
917
|
+
return null;
|
|
918
|
+
}
|
|
919
|
+
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
920
|
+
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
921
|
+
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
922
|
+
// Attempt using provided waitUntil if available
|
|
923
|
+
// if it's not we fallback to sendResponse's handling
|
|
924
|
+
if (pendingWaitUntil) {
|
|
925
|
+
if (ctx.waitUntil) {
|
|
926
|
+
ctx.waitUntil(pendingWaitUntil);
|
|
927
|
+
pendingWaitUntil = undefined;
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
const cacheTags = context.renderOpts.collectedTags;
|
|
931
|
+
// If the request is for a static response, we can cache it so long
|
|
932
|
+
// as it's not edge.
|
|
933
|
+
if (isIsr) {
|
|
934
|
+
const blob = await response.blob();
|
|
935
|
+
// Copy the headers from the response.
|
|
936
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
937
|
+
if (cacheTags) {
|
|
938
|
+
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
939
|
+
}
|
|
940
|
+
if (!headers['content-type'] && blob.type) {
|
|
941
|
+
headers['content-type'] = blob.type;
|
|
942
|
+
}
|
|
943
|
+
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
944
|
+
const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? // route has a numeric `revalidate` but didn't declare an
|
|
945
|
+
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
946
|
+
// build-time fallback in `build/index.ts` so cache entries
|
|
947
|
+
// and the response Cache-Control header agree on the route's
|
|
948
|
+
// effective expire. Routes that opt out of revalidation
|
|
949
|
+
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
950
|
+
// keep `expire: undefined`.
|
|
951
|
+
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
952
|
+
// Create the cache entry for the response.
|
|
953
|
+
const cacheEntry = {
|
|
954
|
+
value: {
|
|
955
|
+
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
956
|
+
status: response.status,
|
|
957
|
+
body: Buffer.from(await blob.arrayBuffer()),
|
|
958
|
+
headers
|
|
959
|
+
},
|
|
960
|
+
cacheControl: {
|
|
961
|
+
revalidate,
|
|
962
|
+
expire
|
|
963
|
+
}
|
|
964
|
+
};
|
|
965
|
+
return cacheEntry;
|
|
966
|
+
} else {
|
|
967
|
+
// send response without caching if not ISR
|
|
968
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
969
|
+
return null;
|
|
970
|
+
}
|
|
971
|
+
} catch (err) {
|
|
972
|
+
// if this is a background revalidate we need to report
|
|
973
|
+
// the request error here as it won't be bubbled
|
|
974
|
+
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
975
|
+
const silenceLog = false;
|
|
976
|
+
await routeModule.onRequestError(req, err, {
|
|
977
|
+
routerKind: 'App Router',
|
|
978
|
+
routePath: srcPage,
|
|
979
|
+
routeType: 'route',
|
|
980
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
981
|
+
isStaticGeneration: cacheKey !== null,
|
|
982
|
+
isOnDemandRevalidate
|
|
983
|
+
})
|
|
984
|
+
}, silenceLog, routerServerContext);
|
|
985
|
+
}
|
|
986
|
+
throw err;
|
|
987
|
+
}
|
|
988
|
+
};
|
|
989
|
+
const handleResponse = async (currentSpan, parentSpan)=>{
|
|
990
|
+
try {
|
|
991
|
+
var _cacheEntry_value;
|
|
992
|
+
const cacheEntry = await routeModule.handleResponse({
|
|
993
|
+
req,
|
|
994
|
+
nextConfig,
|
|
995
|
+
cacheKey,
|
|
996
|
+
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
997
|
+
isFallback: false,
|
|
998
|
+
previewProps,
|
|
999
|
+
prerenderManifest,
|
|
1000
|
+
isRoutePPREnabled: false,
|
|
1001
|
+
isOnDemandRevalidate,
|
|
1002
|
+
revalidateOnlyGenerated,
|
|
1003
|
+
responseGenerator,
|
|
1004
|
+
waitUntil: ctx.waitUntil,
|
|
1005
|
+
isMinimalMode
|
|
1006
|
+
});
|
|
1007
|
+
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
1008
|
+
throw cacheEntry.error;
|
|
1009
|
+
}
|
|
1010
|
+
// we don't create a cacheEntry for ISR
|
|
1011
|
+
if (!isIsr) {
|
|
1012
|
+
return;
|
|
1013
|
+
}
|
|
1014
|
+
if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE) {
|
|
1015
|
+
var _cacheEntry_value1;
|
|
1016
|
+
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
1017
|
+
}
|
|
1018
|
+
if (!isMinimalMode) {
|
|
1019
|
+
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
1020
|
+
}
|
|
1021
|
+
// Draft mode should never be cached
|
|
1022
|
+
if (isDraftMode) {
|
|
1023
|
+
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
1024
|
+
}
|
|
1025
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
1026
|
+
if (!(isMinimalMode && isIsr)) {
|
|
1027
|
+
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
1028
|
+
}
|
|
1029
|
+
// If cache control is already set on the response we don't
|
|
1030
|
+
// override it to allow users to customize it via next.config
|
|
1031
|
+
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
1032
|
+
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
1033
|
+
}
|
|
1034
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.
|
|
1035
|
+
new Response(cacheEntry.value.body, {
|
|
1036
|
+
headers,
|
|
1037
|
+
status: cacheEntry.value.status || 200
|
|
1038
|
+
}));
|
|
1039
|
+
return;
|
|
1040
|
+
} catch (err) {
|
|
1041
|
+
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
1042
|
+
const silenceLog = false;
|
|
1043
|
+
await routeModule.onRequestError(req, err, {
|
|
1044
|
+
routerKind: 'App Router',
|
|
1045
|
+
routePath: normalizedSrcPage,
|
|
1046
|
+
routeType: 'route',
|
|
1047
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
1048
|
+
isStaticGeneration: cacheKey !== null,
|
|
1049
|
+
isOnDemandRevalidate
|
|
1050
|
+
})
|
|
1051
|
+
}, silenceLog, routerServerContext);
|
|
1052
|
+
}
|
|
1053
|
+
// rethrow so that we can handle serving error page
|
|
1054
|
+
// If this is during static generation, throw the error again.
|
|
1055
|
+
if (isIsr) throw err;
|
|
1056
|
+
// Otherwise, send a 500 response unless the original response has
|
|
1057
|
+
// already committed. In that case, preserve its status code for
|
|
1058
|
+
// telemetry while still recording the failure and terminating a response
|
|
1059
|
+
// that the failed pipeline left open.
|
|
1060
|
+
if (res.headersSent) {
|
|
1061
|
+
if (currentSpan) {
|
|
1062
|
+
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
1063
|
+
currentSpan.recordException(error);
|
|
1064
|
+
currentSpan.setStatus({
|
|
1065
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
1066
|
+
message: error.message
|
|
1067
|
+
});
|
|
1068
|
+
currentSpan.setAttribute('error.type', error.name);
|
|
1069
|
+
}
|
|
1070
|
+
if (!res.writableEnded && !res.destroyed) {
|
|
1071
|
+
res.end();
|
|
1072
|
+
}
|
|
1073
|
+
} else {
|
|
1074
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
1075
|
+
status: 500
|
|
1076
|
+
}));
|
|
1077
|
+
}
|
|
1078
|
+
return;
|
|
1079
|
+
} finally{
|
|
1080
|
+
;
|
|
1081
|
+
(()=>{
|
|
1082
|
+
if (!currentSpan) {
|
|
1083
|
+
return;
|
|
1084
|
+
}
|
|
1085
|
+
let statusCode = res.statusCode;
|
|
1086
|
+
currentSpan.setAttributes({
|
|
1087
|
+
'http.status_code': statusCode,
|
|
1088
|
+
'next.rsc': false
|
|
1089
|
+
});
|
|
1090
|
+
if (statusCode && statusCode >= 500) {
|
|
1091
|
+
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
1092
|
+
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
1093
|
+
currentSpan.setStatus({
|
|
1094
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
1095
|
+
});
|
|
1096
|
+
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
1097
|
+
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
1098
|
+
}
|
|
1099
|
+
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
1100
|
+
// We were unable to get attributes, probably OTEL is not enabled
|
|
1101
|
+
if (!rootSpanAttributes) {
|
|
1102
|
+
return;
|
|
1103
|
+
}
|
|
1104
|
+
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
1105
|
+
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
1109
|
+
const name = `${method} ${route}`;
|
|
1110
|
+
currentSpan.setAttributes({
|
|
1111
|
+
'next.route': route,
|
|
1112
|
+
'http.route': route,
|
|
1113
|
+
'next.span_name': name
|
|
1114
|
+
});
|
|
1115
|
+
currentSpan.updateName(name);
|
|
1116
|
+
// Propagate http.route to the parent span if one exists (e.g.
|
|
1117
|
+
// a platform-created HTTP span in adapter deployments).
|
|
1118
|
+
if (parentSpan && parentSpan !== currentSpan) {
|
|
1119
|
+
parentSpan.setAttribute('http.route', route);
|
|
1120
|
+
parentSpan.updateName(name);
|
|
1121
|
+
}
|
|
1122
|
+
})();
|
|
983
1123
|
}
|
|
984
|
-
}
|
|
985
|
-
if (Object.keys(cleaned).length === 0) return null;
|
|
986
|
-
return JSON.stringify(cleaned);
|
|
987
|
-
}
|
|
988
|
-
function toMbti(v) {
|
|
989
|
-
if (!v) return null;
|
|
990
|
-
return v in _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__/* .MBTI_PRESETS */ .e ? v : null;
|
|
991
|
-
}
|
|
992
|
-
function deleteAgentConfig(id) {
|
|
993
|
-
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("DELETE FROM agent_configs WHERE id=?").run(id).changes > 0;
|
|
994
|
-
}
|
|
995
|
-
function generateAgentId(name) {
|
|
996
|
-
const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
|
|
997
|
-
const suffix = Math.random().toString(36).slice(2, 6);
|
|
998
|
-
return slug ? `${slug}-${suffix}` : `agent-${suffix}`;
|
|
999
|
-
}
|
|
1000
|
-
// ── ADR-0022: per-agent message-channel display filters ─────────────────
|
|
1001
|
-
// Canonical channel keys mirrored in `hooks/useMessageFilters.ts`. Kept
|
|
1002
|
-
// in sync there by importing this constant — single source of truth.
|
|
1003
|
-
const DISPLAY_FILTER_KEYS = [
|
|
1004
|
-
"scheduled_task",
|
|
1005
|
-
"watcher",
|
|
1006
|
-
"bridge",
|
|
1007
|
-
"extension",
|
|
1008
|
-
"page_capture",
|
|
1009
|
-
"synthetic",
|
|
1010
|
-
"tool_use",
|
|
1011
|
-
"thinking"
|
|
1012
|
-
];
|
|
1013
|
-
const DISPLAY_FILTER_DEFAULTS = {
|
|
1014
|
-
scheduled_task: true,
|
|
1015
|
-
watcher: true,
|
|
1016
|
-
bridge: true,
|
|
1017
|
-
extension: true,
|
|
1018
|
-
page_capture: true,
|
|
1019
|
-
synthetic: true,
|
|
1020
|
-
tool_use: true,
|
|
1021
|
-
thinking: true
|
|
1022
|
-
};
|
|
1023
|
-
function parseDisplayFilters(raw) {
|
|
1024
|
-
if (!raw) return {
|
|
1025
|
-
...DISPLAY_FILTER_DEFAULTS
|
|
1026
|
-
};
|
|
1027
|
-
try {
|
|
1028
|
-
const parsed = JSON.parse(raw);
|
|
1029
|
-
// Merge over defaults so newly-added channels stay visible on old rows.
|
|
1030
|
-
return {
|
|
1031
|
-
...DISPLAY_FILTER_DEFAULTS,
|
|
1032
|
-
...parsed
|
|
1033
|
-
};
|
|
1034
|
-
} catch {
|
|
1035
|
-
return {
|
|
1036
|
-
...DISPLAY_FILTER_DEFAULTS
|
|
1037
|
-
};
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
function getAgentDisplayFilters(id) {
|
|
1041
|
-
const row = getAgentConfig(id);
|
|
1042
|
-
if (!row) return null;
|
|
1043
|
-
return parseDisplayFilters(row.display_filters);
|
|
1044
|
-
}
|
|
1045
|
-
/**
|
|
1046
|
-
* Merge a partial filter map into the agent's stored prefs. Pass `null` to
|
|
1047
|
-
* reset to defaults (clears the column). Safe against concurrent toggles
|
|
1048
|
-
* from multiple browser tabs because the merge happens server-side.
|
|
1049
|
-
*/ function updateAgentDisplayFilters(id, patch) {
|
|
1050
|
-
const row = getAgentConfig(id);
|
|
1051
|
-
if (!row) return null;
|
|
1052
|
-
if (patch === null) {
|
|
1053
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("UPDATE agent_configs SET display_filters=NULL, updated_at=? WHERE id=?").run(now(), id);
|
|
1054
|
-
return {
|
|
1055
|
-
...DISPLAY_FILTER_DEFAULTS
|
|
1056
|
-
};
|
|
1057
|
-
}
|
|
1058
|
-
const current = parseDisplayFilters(row.display_filters);
|
|
1059
|
-
const next = {
|
|
1060
|
-
...current
|
|
1061
1124
|
};
|
|
1062
|
-
for
|
|
1063
|
-
|
|
1125
|
+
// TODO: activeSpan code path is for when wrapped by
|
|
1126
|
+
// next-server can be removed when this is no longer used
|
|
1127
|
+
if (isWrappedByNextServer && activeSpan) {
|
|
1128
|
+
await handleResponse(activeSpan, undefined);
|
|
1129
|
+
} else {
|
|
1130
|
+
let parentSpan = tracer.getActiveScopeSpan();
|
|
1131
|
+
await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
|
|
1132
|
+
spanName: `${method} ${srcPage}`,
|
|
1133
|
+
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
|
|
1134
|
+
attributes: {
|
|
1135
|
+
'http.method': method,
|
|
1136
|
+
'http.target': req.url
|
|
1137
|
+
}
|
|
1138
|
+
}, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
|
|
1064
1139
|
}
|
|
1065
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("UPDATE agent_configs SET display_filters=?, updated_at=? WHERE id=?").run(JSON.stringify(next), now(), id);
|
|
1066
|
-
return next;
|
|
1067
1140
|
}
|
|
1068
1141
|
|
|
1142
|
+
//# sourceMappingURL=app-route.js.map
|
|
1069
1143
|
|
|
1070
|
-
/***/ }),
|
|
1071
|
-
|
|
1072
|
-
/***/ 44708:
|
|
1073
|
-
/***/ ((module) => {
|
|
1074
|
-
|
|
1075
|
-
module.exports = require("node:https");
|
|
1076
|
-
|
|
1077
|
-
/***/ }),
|
|
1078
|
-
|
|
1079
|
-
/***/ 44870:
|
|
1080
|
-
/***/ ((module) => {
|
|
1081
|
-
|
|
1082
|
-
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
1083
|
-
|
|
1084
|
-
/***/ }),
|
|
1085
|
-
|
|
1086
|
-
/***/ 48161:
|
|
1087
|
-
/***/ ((module) => {
|
|
1088
|
-
|
|
1089
|
-
module.exports = require("node:os");
|
|
1090
|
-
|
|
1091
|
-
/***/ }),
|
|
1092
|
-
|
|
1093
|
-
/***/ 51455:
|
|
1094
|
-
/***/ ((module) => {
|
|
1095
|
-
|
|
1096
|
-
module.exports = require("node:fs/promises");
|
|
1097
|
-
|
|
1098
|
-
/***/ }),
|
|
1099
|
-
|
|
1100
|
-
/***/ 55511:
|
|
1101
|
-
/***/ ((module) => {
|
|
1102
|
-
|
|
1103
|
-
module.exports = require("crypto");
|
|
1104
|
-
|
|
1105
|
-
/***/ }),
|
|
1106
|
-
|
|
1107
|
-
/***/ 55591:
|
|
1108
|
-
/***/ ((module) => {
|
|
1109
|
-
|
|
1110
|
-
module.exports = require("https");
|
|
1111
|
-
|
|
1112
|
-
/***/ }),
|
|
1113
|
-
|
|
1114
|
-
/***/ 57075:
|
|
1115
|
-
/***/ ((module) => {
|
|
1116
|
-
|
|
1117
|
-
module.exports = require("node:stream");
|
|
1118
|
-
|
|
1119
|
-
/***/ }),
|
|
1120
|
-
|
|
1121
|
-
/***/ 57975:
|
|
1122
|
-
/***/ ((module) => {
|
|
1123
|
-
|
|
1124
|
-
module.exports = require("node:util");
|
|
1125
|
-
|
|
1126
|
-
/***/ }),
|
|
1127
|
-
|
|
1128
|
-
/***/ 63033:
|
|
1129
|
-
/***/ ((module) => {
|
|
1130
|
-
|
|
1131
|
-
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
1132
1144
|
|
|
1133
1145
|
/***/ }),
|
|
1134
1146
|
|
|
1135
|
-
/***/
|
|
1147
|
+
/***/ 75919:
|
|
1136
1148
|
/***/ ((module) => {
|
|
1137
1149
|
|
|
1138
|
-
module.exports = require("node:
|
|
1150
|
+
module.exports = require("node:worker_threads");
|
|
1139
1151
|
|
|
1140
1152
|
/***/ }),
|
|
1141
1153
|
|
|
1142
|
-
/***/
|
|
1154
|
+
/***/ 76760:
|
|
1143
1155
|
/***/ ((module) => {
|
|
1144
1156
|
|
|
1145
|
-
module.exports = require("node:
|
|
1157
|
+
module.exports = require("node:path");
|
|
1146
1158
|
|
|
1147
1159
|
/***/ }),
|
|
1148
1160
|
|
|
1149
|
-
/***/
|
|
1161
|
+
/***/ 77030:
|
|
1150
1162
|
/***/ ((module) => {
|
|
1151
1163
|
|
|
1152
|
-
module.exports = require("node:
|
|
1164
|
+
module.exports = require("node:net");
|
|
1153
1165
|
|
|
1154
1166
|
/***/ }),
|
|
1155
1167
|
|
|
@@ -1257,7 +1269,7 @@ module.exports = import("@huggingface/transformers");;
|
|
|
1257
1269
|
var __webpack_require__ = require("../../../../webpack-runtime.js");
|
|
1258
1270
|
__webpack_require__.C(exports);
|
|
1259
1271
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
1260
|
-
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46], () => (__webpack_exec__(
|
|
1272
|
+
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46], () => (__webpack_exec__(75355)));
|
|
1261
1273
|
module.exports = __webpack_exports__;
|
|
1262
1274
|
|
|
1263
1275
|
})();
|