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