@circuitwall/jarela 2.7.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +2 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +6 -0
- package/.next/standalone/.next/server/app/_global-error/page.js +68 -68
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +58 -58
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/v1/access/[identity]/route.js +127 -127
- package/.next/standalone/.next/server/app/api/v1/access/route.js +372 -372
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +79 -79
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/display-filters/route.js +641 -641
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/duplicate/route.js +723 -723
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/route.js +100 -100
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/thread/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/agents/recent-replies/route.js +227 -227
- package/.next/standalone/.next/server/app/api/v1/agents/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +384 -384
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/attachments/files/route.js +203 -203
- package/.next/standalone/.next/server/app/api/v1/attachments/images/route.js +17 -17
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/[remote_jid]/route.js +760 -760
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +699 -699
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +30 -30
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js +480 -480
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/[route_id]/route.js +675 -675
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +559 -559
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js +1269 -1269
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +199 -199
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/config/route.js +99 -99
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js +169 -169
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/currency/route.js +515 -515
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js +380 -380
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +256 -256
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js +80 -97
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js +677 -677
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/recall-policy/route.js +856 -0
- package/.next/standalone/.next/server/app/api/v1/documents/recall-policy/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/v1/documents/recall-policy/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/v1/documents/search/route.js +299 -247
- package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +486 -486
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js +18 -11
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js +666 -666
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js +128 -100
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/env/route.js +207 -207
- package/.next/standalone/.next/server/app/api/v1/env-sync/allowlist/route.js +128 -128
- package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/events/route.js +154 -154
- package/.next/standalone/.next/server/app/api/v1/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/events/test/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +97 -97
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/browser/activate/route.js +188 -188
- package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +69 -69
- package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +69 -69
- package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +223 -223
- package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js +722 -722
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js +481 -481
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js +378 -378
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js +510 -510
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/files/[name]/route.js +17 -17
- package/.next/standalone/.next/server/app/api/v1/fs/browse/route.js +33 -33
- package/.next/standalone/.next/server/app/api/v1/harnesses/[id]/route.js +397 -397
- package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +129 -129
- package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js +757 -757
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/health/route.js +228 -228
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js +198 -198
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/callback/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +845 -845
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +106 -106
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +747 -747
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/integrations/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +420 -420
- package/.next/standalone/.next/server/app/api/v1/local-file/route.js +34 -34
- package/.next/standalone/.next/server/app/api/v1/logs/route.js +819 -819
- package/.next/standalone/.next/server/app/api/v1/maps/embed/route.js +217 -217
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +1034 -1034
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/registry/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +150 -150
- package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/memory/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +87 -538
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/models/route.js +273 -722
- package/.next/standalone/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/catalog/route.js +73 -73
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js +248 -239
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js +128 -128
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js +81 -81
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js +34 -25
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/route.js +48 -39
- package/.next/standalone/.next/server/app/api/v1/packages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js +863 -863
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js +230 -230
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/profile/location/route.js +138 -138
- package/.next/standalone/.next/server/app/api/v1/profile/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +853 -680
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +171 -171
- package/.next/standalone/.next/server/app/api/v1/providers/route.js +96 -96
- package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +157 -157
- package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +47 -47
- package/.next/standalone/.next/server/app/api/v1/redaction/route.js +206 -206
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +140 -140
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js +166 -166
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/route.js +52 -52
- package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +722 -722
- package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/security/state/route.js +243 -243
- package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +518 -518
- package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/setup/test-key/route.js +25 -25
- package/.next/standalone/.next/server/app/api/v1/skills/[id]/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +609 -609
- package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +129 -129
- package/.next/standalone/.next/server/app/api/v1/skills/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/system/abort/route.js +112 -112
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js +86 -86
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/tailscale/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/tasks/[agent_id]/route.js +83 -83
- package/.next/standalone/.next/server/app/api/v1/tasks/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js +121 -121
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js +139 -139
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/messages/[message_id]/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +1182 -1182
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/route.js +158 -158
- package/.next/standalone/.next/server/app/api/v1/tools/route.js +137 -137
- package/.next/standalone/.next/server/app/api/v1/tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js +73 -73
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/voice/transcribe/route.js +30 -30
- package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +79 -79
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js +45 -45
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/watchers/reaction-scripts/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/icon.svg/route.js +55 -55
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +18 -18
- package/.next/standalone/.next/server/app/page.js +2112 -1235
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page.js +91 -91
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +2 -1
- package/.next/standalone/.next/server/chunks/1244.js +136 -4
- package/.next/standalone/.next/server/chunks/1387.js +733 -57
- package/.next/standalone/.next/server/chunks/1433.js +1 -1
- package/.next/standalone/.next/server/chunks/210.js +3 -3
- package/.next/standalone/.next/server/chunks/2175.js +874 -0
- package/.next/standalone/.next/server/chunks/3042.js +34 -32
- package/.next/standalone/.next/server/chunks/309.js +21 -40
- package/.next/standalone/.next/server/chunks/3272.js +21 -40
- package/.next/standalone/.next/server/chunks/{540.js → 3326.js} +189 -61
- package/.next/standalone/.next/server/chunks/{6142.js → 3479.js} +170 -159
- package/.next/standalone/.next/server/chunks/3566.js +1 -1
- package/.next/standalone/.next/server/chunks/{5323.js → 3692.js} +31 -3
- package/.next/standalone/.next/server/chunks/4189.js +14 -2
- package/.next/standalone/.next/server/chunks/4377.js +2 -2
- package/.next/standalone/.next/server/chunks/4596.js +18 -9
- package/.next/standalone/.next/server/chunks/{639.js → 4728.js} +23676 -22755
- package/.next/standalone/.next/server/chunks/4955.js +81 -14
- package/.next/standalone/.next/server/chunks/5290.js +136 -5
- package/.next/standalone/.next/server/chunks/{2267.js → 6408.js} +990 -926
- package/.next/standalone/.next/server/chunks/{9667.js → 6911.js} +31 -3
- package/.next/standalone/.next/server/chunks/7033.js +7 -4
- package/.next/standalone/.next/server/chunks/7377.js +7 -4
- package/.next/standalone/.next/server/chunks/8461.js +31 -29
- package/.next/standalone/.next/server/chunks/9032.js +3 -3
- package/.next/standalone/.next/server/chunks/9174.js +18 -9
- package/.next/standalone/.next/server/chunks/9408.js +37 -15
- package/.next/standalone/.next/server/chunks/9824.js +2288 -2288
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware.js +104638 -104532
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/preview-props.json +3 -3
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/2BAUJZ7x8eXCYpuZ-Kp7h/_buildManifest.js +1 -0
- package/.next/standalone/.next/static/chunks/{877-145c9df8aa0aee63.js → 877-367eb49b20edd3d6.js} +38 -16
- package/.next/standalone/.next/static/chunks/app/_global-error/page-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/access/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/duplicate/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/recent-replies/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/recall-policy/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/messages/[message_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/{page-64585ef79400f17f.js → page-a584dfa806a1afdb.js} +1082 -205
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/css/19e1cd815490b47c.css +5 -0
- package/.next/standalone/docs/adoption/changesets.json +148 -0
- package/.next/standalone/package.json +5 -4
- package/CHANGELOG.md +51 -0
- package/README.md +115 -1
- package/api/client.startup.test.ts +29 -0
- package/api/client.ts +9 -2
- package/api/types.ts +20 -1
- package/app/api/v1/dashboard/pricing-task/route.ts +3 -1
- package/app/api/v1/documents/recall-policy/route.test.ts +59 -0
- package/app/api/v1/documents/recall-policy/route.ts +20 -0
- package/app/api/v1/documents/search/route.test.ts +36 -0
- package/app/api/v1/documents/search/route.ts +17 -5
- package/app/api/v1/documents/sources/[id]/reindex/route.test.ts +44 -0
- package/app/api/v1/documents/sources/[id]/reindex/route.ts +4 -1
- package/app/api/v1/documents/sources/route.test.ts +67 -0
- package/app/api/v1/documents/sources/route.ts +20 -2
- package/app/api/v1/models/[name]/route.ts +2 -0
- package/app/api/v1/models/route.ts +4 -0
- package/app/api/v1/providers/[provider]/models/route.test.ts +28 -0
- package/app/api/v1/providers/[provider]/models/route.ts +16 -2
- package/app/globals.css +51 -4
- package/components/agents/AgentsPanel.tsx +2 -2
- package/components/agents/agent-editor/AdvancedSection.tsx +1 -1
- package/components/agents/agent-editor/ModelSection.tsx +2 -2
- package/components/bridges/BridgeEditor.tsx +1 -1
- package/components/bridges/BridgesPanel.tsx +1 -1
- package/components/chat/InputBar.tsx +1 -1
- package/components/chat/MessageList.tsx +3 -3
- package/components/chat/useUserProfileAndAgent.test.tsx +43 -1
- package/components/chat/useUserProfileAndAgent.ts +16 -5
- package/components/credentials/CredentialsPanel.tsx +1 -1
- package/components/dashboard/CostBreakdown.test.tsx +34 -0
- package/components/dashboard/CostBreakdown.tsx +21 -0
- package/components/dashboard/DashboardPanel.test.tsx +9 -0
- package/components/dashboard/DashboardPanel.tsx +3 -3
- package/components/dashboard/Donuts.tsx +5 -2
- package/components/dashboard/ModelPricingSection.test.tsx +42 -0
- package/components/dashboard/ModelPricingSection.tsx +23 -21
- package/components/dashboard/Series.test.tsx +1 -0
- package/components/dashboard/Series.tsx +5 -0
- package/components/dashboard/SummaryCards.tsx +39 -27
- package/components/dashboard/VendorModelReportSection.tsx +2 -0
- package/components/documents/AddSourceFields.tsx +52 -15
- package/components/documents/AddSourceForm.tsx +61 -19
- package/components/documents/DocumentsPanel.tsx +22 -2
- package/components/documents/RecallExclusions.tsx +73 -0
- package/components/documents/SearchProbe.tsx +42 -5
- package/components/documents/helpers.ts +17 -3
- package/components/documents/indexing-controls.test.tsx +137 -0
- package/components/documents/useDocumentsPanel.test.tsx +87 -0
- package/components/documents/useDocumentsPanel.ts +47 -6
- package/components/env/EnvVarsPanel.tsx +1 -1
- package/components/harness/HarnessPanel.tsx +2 -2
- package/components/integrations/NetworkPanel.tsx +1 -1
- package/components/layout/AgentCardControls.test.tsx +162 -0
- package/components/layout/AgentCardControls.tsx +126 -0
- package/components/layout/AgentSwitcher.test.tsx +37 -0
- package/components/layout/AgentSwitcher.tsx +28 -3
- package/components/layout/AppShell.tsx +16 -9
- package/components/layout/MenuPanel.test.tsx +125 -2
- package/components/layout/MenuPanel.tsx +96 -2
- package/components/logs/LogsPanel.tsx +1 -1
- package/components/mcp/MCPPanel.tsx +1 -1
- package/components/memory/UnifiedMemoryPanel.tsx +4 -4
- package/components/models/CapBadges.tsx +1 -1
- package/components/models/EmbeddingModelSection.test.tsx +41 -0
- package/components/models/EmbeddingModelSection.tsx +5 -0
- package/components/models/ModelFeatureGuide.tsx +16 -8
- package/components/models/ModelsPanel.tsx +8 -3
- package/components/models/model-editor/ModelEditorBody.tsx +1 -0
- package/components/models/model-editor/ModelIdSection.tsx +5 -0
- package/components/profile/ProfileEditor.test.tsx +70 -0
- package/components/profile/ProfileEditor.tsx +6 -2
- package/components/profile/ProfilePanel.test.tsx +6 -0
- package/components/profile/ProfilePanel.tsx +1 -1
- package/components/scheduled-tasks/ScheduledTasksPanel.tsx +1 -1
- package/components/settings/AppearancePanel.tsx +1 -1
- package/components/settings/SettingsPanel.test.tsx +23 -0
- package/components/settings/SettingsPanel.tsx +2 -2
- package/components/skills/SkillsPanel.tsx +1 -1
- package/components/tools/BrowserPanel.tsx +1 -1
- package/components/tools/PackagesPanel.tsx +1 -1
- package/components/tools/UnifiedPackageList.tsx +1 -1
- package/components/ui/PanelHeader.tsx +1 -1
- package/components/ui/SubTabBar.tsx +1 -1
- package/docs/INSTALL.md +7 -5
- package/hooks/useAgents.ts +2 -2
- package/lib/agents/prepare/system-prompt.test.ts +65 -0
- package/lib/agents/prepare/system-prompt.ts +27 -20
- package/lib/agents/prompt-registry.test.ts +42 -0
- package/lib/agents/prompt-registry.ts +21 -0
- package/lib/bridges/whatsapp.inbound.test.ts +38 -1
- package/lib/bridges/whatsapp.ts +10 -33
- package/lib/db/index.ts +2 -0
- package/lib/db/migrations.test.ts +10 -0
- package/lib/db/migrations.ts +10 -0
- package/lib/db/statement-cache.test.ts +77 -0
- package/lib/db/statement-cache.ts +31 -0
- package/lib/documents/indexer.test.ts +16 -1
- package/lib/documents/indexer.ts +8 -7
- package/lib/documents/mail-source-config.ts +31 -0
- package/lib/documents/recall-policy.ts +24 -0
- package/lib/documents/remote/icloud.ts +56 -0
- package/lib/documents/remote/index.ts +4 -1
- package/lib/documents/remote/mail.test.ts +232 -0
- package/lib/documents/remote/mail.ts +48 -40
- package/lib/documents/search.test.ts +81 -2
- package/lib/documents/search.ts +47 -7
- package/lib/embeddings/cache.test.ts +16 -2
- package/lib/embeddings/index.test.ts +7 -0
- package/lib/embeddings/index.ts +12 -1
- package/lib/integrations/deepseek-web/manifest.ts +68 -0
- package/lib/integrations/gmail/manifest.ts +2 -3
- package/lib/integrations/icloud/manifest.ts +19 -5
- package/lib/integrations/registry.test.ts +8 -0
- package/lib/integrations/registry.ts +2 -0
- package/lib/lifecycle/changeset-build.test.ts +3 -0
- package/lib/lifecycle/changeset-build.ts +6 -0
- package/lib/lifecycle/changesets.ts +9 -0
- package/lib/pricing/llm-extract.ts +1 -1
- package/lib/pricing/maintenance-task.ts +19 -3
- package/lib/pricing/model-updates.test.ts +192 -0
- package/lib/pricing/model-updates.ts +205 -0
- package/lib/stores/app-settings.ts +17 -1
- package/lib/stores/dashboard-metrics-cache.test.ts +44 -0
- package/lib/stores/dashboard-metrics.test.ts +47 -4
- package/lib/stores/dashboard-metrics.ts +73 -8
- package/lib/stores/document-sources.ts +1 -0
- package/lib/stores/integrations.test.ts +20 -0
- package/lib/stores/integrations.ts +15 -4
- package/lib/stores/langgraph-store.test.ts +53 -0
- package/lib/stores/langgraph-store.ts +9 -21
- package/lib/stores/model-metadata.ts +89 -0
- package/lib/stores/threads.test.ts +34 -0
- package/lib/stores/threads.ts +17 -20
- package/lib/stores/tool-stats.test.ts +31 -0
- package/lib/stores/tool-stats.ts +16 -0
- package/lib/stores/version-adoption.test.ts +8 -0
- package/lib/stores/version-adoption.ts +5 -2
- package/lib/tools/general/documents.test.ts +5 -0
- package/lib/tools/general/pricing-maintenance.test.ts +5 -0
- package/lib/tools/general/pricing-maintenance.ts +4 -1
- package/lib/tools/packages/default-packages/icloud.test.ts +49 -0
- package/lib/tools/packages/default-packages/icloud.ts +8 -6
- package/lib/tools/packages/default-packages.test.ts +16 -0
- package/lib/tools/packages/langchain-packages.ts +2 -2
- package/lib/tools/runtime/category-filter.test.ts +22 -0
- package/lib/tools/web/deepseek.test.ts +76 -0
- package/lib/tools/web/deepseek.ts +68 -0
- package/lib/tools/web/fetch.test.ts +130 -2
- package/lib/tools/web/fetch.ts +48 -1
- package/lib/tools/web/search.test.ts +139 -2
- package/lib/tools/web/search.ts +48 -1
- package/lib/triggers/handlers/scheduled-task.test.ts +18 -0
- package/lib/triggers/handlers/scheduled-task.ts +6 -0
- package/lib/ui/feature-readiness.test.ts +7 -0
- package/lib/ui/feature-readiness.ts +2 -1
- package/package.json +5 -4
- package/scripts/check-npm-package.mjs +1 -0
- package/scripts/jarela-bin.mjs +3 -0
- package/scripts/runtime-version.mjs +19 -0
- package/scripts/start-prod.mjs +3 -0
- package/.next/standalone/.next/static/6qLnqWdsfBTJOAJApUYXy/_buildManifest.js +0 -1
- package/.next/standalone/.next/static/chunks/app/_global-error/page-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/access/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/duplicate/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/recent-replies/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/messages/[message_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/css/c4a8bed1da2c748f.css +0 -5
- /package/.next/standalone/.next/static/{6qLnqWdsfBTJOAJApUYXy → 2BAUJZ7x8eXCYpuZ-Kp7h}/_ssgManifest.js +0 -0
|
@@ -1,1047 +1,1111 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports.id =
|
|
3
|
-
exports.ids = [
|
|
2
|
+
exports.id = 6408;
|
|
3
|
+
exports.ids = [6408];
|
|
4
4
|
exports.modules = {
|
|
5
5
|
|
|
6
|
-
/***/
|
|
7
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
-
|
|
9
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
-
/* harmony export */ KA: () => (/* binding */ setMcpServerError),
|
|
11
|
-
/* harmony export */ cw: () => (/* binding */ getMcpServer),
|
|
12
|
-
/* harmony export */ le: () => (/* binding */ deleteMcpServer),
|
|
13
|
-
/* harmony export */ n7: () => (/* binding */ listMcpServers),
|
|
14
|
-
/* harmony export */ te: () => (/* binding */ upsertMcpServer)
|
|
15
|
-
/* harmony export */ });
|
|
16
|
-
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(251244);
|
|
17
|
-
/* harmony import */ var _lib_crypto_envelope__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(710938);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const now = ()=>new Date().toISOString();
|
|
21
|
-
// `spec` may contain MCP env vars like GITHUB_TOKEN, GOOGLE_MAPS_API_KEY,
|
|
22
|
-
// BRAVE_API_KEY etc. — encrypted at rest (ADR-0005). Decrypt on read.
|
|
23
|
-
function decryptRow(row) {
|
|
24
|
-
return {
|
|
25
|
-
...row,
|
|
26
|
-
spec: (0,_lib_crypto_envelope__WEBPACK_IMPORTED_MODULE_1__/* .decryptIfNeeded */ .qU)(row.spec)
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function listMcpServers() {
|
|
30
|
-
const rows = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM mcp_servers ORDER BY name ASC").all();
|
|
31
|
-
return rows.map(decryptRow);
|
|
32
|
-
}
|
|
33
|
-
function getMcpServer(name) {
|
|
34
|
-
const row = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM mcp_servers WHERE name=?").get(name) ?? null;
|
|
35
|
-
return row ? decryptRow(row) : null;
|
|
36
|
-
}
|
|
37
|
-
function upsertMcpServer(input) {
|
|
38
|
-
const t = now();
|
|
39
|
-
const existing = getMcpServer(input.name);
|
|
40
|
-
const created_at = existing?.created_at ?? t;
|
|
41
|
-
const enabled = input.enabled === false ? 0 : 1;
|
|
42
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare(`INSERT OR REPLACE INTO mcp_servers (name, transport, spec, enabled, last_error, created_at, updated_at)
|
|
43
|
-
VALUES (?, ?, ?, ?, NULL, ?, ?)`).run(input.name, input.transport, (0,_lib_crypto_envelope__WEBPACK_IMPORTED_MODULE_1__/* .encrypt */ .w)(JSON.stringify(input.spec)), enabled, created_at, t);
|
|
44
|
-
return getMcpServer(input.name);
|
|
45
|
-
}
|
|
46
|
-
function deleteMcpServer(name) {
|
|
47
|
-
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("DELETE FROM mcp_servers WHERE name=?").run(name).changes > 0;
|
|
48
|
-
}
|
|
49
|
-
function setMcpServerError(name, error) {
|
|
50
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("UPDATE mcp_servers SET last_error=?, updated_at=? WHERE name=?").run(error, now(), name);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
/***/ }),
|
|
55
|
-
|
|
56
|
-
/***/ 56718:
|
|
6
|
+
/***/ 27519:
|
|
57
7
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
58
8
|
|
|
59
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
60
|
-
/* harmony export */ HP: () => (/* binding */ disabledCategories),
|
|
61
|
-
/* harmony export */ MD: () => (/* binding */ setCategoryEnabled),
|
|
62
|
-
/* harmony export */ Oj: () => (/* binding */ isCategoryEnabled)
|
|
63
|
-
/* harmony export */ });
|
|
64
|
-
/* unused harmony export listCategoryStates */
|
|
65
|
-
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(251244);
|
|
66
|
-
// Built-in tool category toggles.
|
|
67
|
-
//
|
|
68
|
-
// A category is "enabled" unless an explicit row in `builtin_tool_categories`
|
|
69
|
-
// says otherwise. Default-enabled semantics mean upgrading installs keep
|
|
70
|
-
// every category working with zero migration work.
|
|
71
|
-
//
|
|
72
|
-
// Disabled categories are filtered at three layers:
|
|
73
|
-
// - GET /api/v1/tools (so the agent editor never offers them as permissions)
|
|
74
|
-
// - getAllTools / getAllToolsAsync (so the agent runtime can't see them)
|
|
75
|
-
// - executeTool (defense in depth, blocks stale agent configs)
|
|
76
|
-
|
|
77
|
-
const now = ()=>new Date().toISOString();
|
|
78
|
-
// Every agent can always list/read/write skills, regardless of its own tool
|
|
79
|
-
// selection (lib/agents/run-thread.ts#SELF_CONFIG_TOOLS) — so unlike other
|
|
80
|
-
// builtin categories, this one can never be disabled.
|
|
81
|
-
const ALWAYS_ON = new Set([
|
|
82
|
-
"Skills"
|
|
83
|
-
]);
|
|
84
|
-
function isCategoryEnabled(category) {
|
|
85
|
-
if (ALWAYS_ON.has(category)) return true;
|
|
86
|
-
const row = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT enabled FROM builtin_tool_categories WHERE category=?").get(category);
|
|
87
|
-
return row ? row.enabled === 1 : true;
|
|
88
|
-
}
|
|
89
|
-
function disabledCategories() {
|
|
90
|
-
const rows = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT category FROM builtin_tool_categories WHERE enabled=0").all();
|
|
91
|
-
const disabled = new Set(rows.map((r)=>r.category));
|
|
92
|
-
for (const c of ALWAYS_ON)disabled.delete(c);
|
|
93
|
-
return disabled;
|
|
94
|
-
}
|
|
95
|
-
function listCategoryStates() {
|
|
96
|
-
const rows = getDb().prepare("SELECT category, enabled, updated_at FROM builtin_tool_categories").all();
|
|
97
|
-
return rows.map((r)=>({
|
|
98
|
-
category: r.category,
|
|
99
|
-
enabled: ALWAYS_ON.has(r.category) ? true : r.enabled === 1,
|
|
100
|
-
updated_at: r.updated_at
|
|
101
|
-
}));
|
|
102
|
-
}
|
|
103
|
-
function setCategoryEnabled(category, enabled) {
|
|
104
|
-
if (ALWAYS_ON.has(category) && !enabled) return;
|
|
105
|
-
(0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare(`INSERT INTO builtin_tool_categories (category, enabled, updated_at)
|
|
106
|
-
VALUES (?, ?, ?)
|
|
107
|
-
ON CONFLICT(category) DO UPDATE SET enabled=excluded.enabled, updated_at=excluded.updated_at`).run(category, enabled ? 1 : 0, now());
|
|
108
|
-
}
|
|
109
9
|
|
|
10
|
+
// EXPORTS
|
|
11
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
12
|
+
c: () => (/* binding */ getManifest),
|
|
13
|
+
p: () => (/* binding */ listManifests)
|
|
14
|
+
});
|
|
110
15
|
|
|
111
|
-
|
|
16
|
+
;// ./lib/integrations/atlassian/manifest.ts
|
|
17
|
+
const atlassianManifest = {
|
|
18
|
+
id: "atlassian",
|
|
19
|
+
name: "Atlassian (Jira + Confluence)",
|
|
20
|
+
summary: "Lets the agent search and modify Jira issues, read and post comments, and " + "read Confluence pages. Also powers smart-indexed document RAG over selected " + "Jira projects/JQL and Confluence spaces/CQL via the documents_add_remote_source " + "tool (ADR-0026). Authenticates with an Atlassian API token tied to your account email.",
|
|
21
|
+
category: "issue-tracker",
|
|
22
|
+
prerequisites: [
|
|
23
|
+
{
|
|
24
|
+
check: "credentials",
|
|
25
|
+
detail: "An Atlassian Cloud account with access to the site (e.g. https://your-team.atlassian.net) " + "and permission to view the projects/spaces you want the agent to read."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
check: "credentials",
|
|
29
|
+
detail: "An API token created at id.atlassian.com → Security → API tokens. " + "The token is bound to your account email — you'll provide both. For a scoped token, " + "also provide the Atlassian Cloud ID so Jira and Confluence use their product API gateways.",
|
|
30
|
+
docs_url: "https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
steps: [
|
|
34
|
+
{
|
|
35
|
+
id: "create-token",
|
|
36
|
+
title: "Create an Atlassian API token",
|
|
37
|
+
description: "Open id.atlassian.com → Security → API tokens, click Create API token, give it " + "a label like 'Jarela', and copy the token immediately — Atlassian only shows it once.",
|
|
38
|
+
docs_url: "https://id.atlassian.com/manage-profile/security/api-tokens"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "save-credentials",
|
|
42
|
+
title: "Save the credentials in Jarela",
|
|
43
|
+
description: "Propose enabling the integration. The user will be asked for the site URL, " + "their account email, and the API token. Scoped tokens also need the Cloud ID. " + "The token is stored encrypted at rest.",
|
|
44
|
+
proposes: "enable_integration"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "configure-rag",
|
|
48
|
+
title: "Optional: scope a Jira/Confluence document source for semantic search (ADR-0026)",
|
|
49
|
+
description: "After credentials are saved, suggest adding a scoped RAG source so the agent " + "can answer questions from Atlassian content without reading everything. Use " + "documents_add_remote_source with one of: kind='confluence_space' " + "(config.space_key='ENG'), kind='jira_project' (config.project_key='ABC', " + "optional config.recency_days=90), kind='confluence_cql' (config.cql='label = \"runbook\"'), " + "or kind='jira_jql' (config.jql='project = ABC AND status != Done'). Indexing runs " + "incrementally on the existing scheduler sweep; results are searchable via documents_search."
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
troubleshooting: [
|
|
53
|
+
{
|
|
54
|
+
when: "tool returns 401 Unauthorized",
|
|
55
|
+
say: "The API token or email is wrong, or the token was revoked. Ask the user to regenerate " + "the token at id.atlassian.com → Security → API tokens and re-enter both the email and the new token."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
when: "tool returns 403 Forbidden on a specific issue or page",
|
|
59
|
+
say: "The account doesn't have permission for that resource. Either the project/space hasn't been " + "shared with this user, or the issue is restricted. Ask the user to verify in the Atlassian web UI."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
when: "tool returns 404 on a Confluence page id",
|
|
63
|
+
say: "Confluence page ids change when pages are moved between spaces. Ask the user to re-share " + "the page URL — the integration will resolve it to the current id."
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
};
|
|
112
67
|
|
|
113
|
-
|
|
114
|
-
|
|
68
|
+
;// ./lib/integrations/deepseek-web/manifest.ts
|
|
69
|
+
const deepseekWebManifest = {
|
|
70
|
+
id: "deepseek-web",
|
|
71
|
+
name: "DeepSeek Search & Fetch",
|
|
72
|
+
summary: "Optional backend for Jarela's web_search and web_fetch tools. This is separate from DeepSeek model capability " + "badges and is not enabled by configuring a DeepSeek chat-model credential.",
|
|
73
|
+
category: "other",
|
|
74
|
+
prerequisites: [
|
|
75
|
+
{
|
|
76
|
+
check: "credentials",
|
|
77
|
+
detail: "A DeepSeek API key. Jarela sends web queries and URLs to DeepSeek only after this separate integration is configured. " + "DeepSeek documents Search and Fetch at $0.75 per 1,000 successful requests for each API; empty searches and failed " + "requests are not billed. Prices and terms can change.",
|
|
78
|
+
docs_url: "https://api-docs.deepseek.com/guides/search"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
steps: [
|
|
82
|
+
{
|
|
83
|
+
id: "review-search-fetch",
|
|
84
|
+
title: "Review DeepSeek Search & Fetch",
|
|
85
|
+
description: "Read DeepSeek's Search & Fetch documentation and pricing. These are separate APIs from DeepSeek chat completions.",
|
|
86
|
+
docs_url: "https://api-docs.deepseek.com/guides/search"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "create-api-key",
|
|
90
|
+
title: "Get a DeepSeek API key",
|
|
91
|
+
description: "Create or reuse a DeepSeek API key from the platform. You may use the same key as the chat-model integration, but it must be saved separately here to opt web tools in.",
|
|
92
|
+
docs_url: "https://platform.deepseek.com/api_keys"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: "save-api-key",
|
|
96
|
+
title: "Enable DeepSeek for Jarela web tools",
|
|
97
|
+
description: "Save the key in Settings → Credentials → DeepSeek Search & Fetch. It is stored encrypted at rest. Setup does not make a search request; once configured, web_search and eligible public text-mode web_fetch requests use DeepSeek. HTML requests, Allowed sites, and private-fetch overrides keep direct fetch. Removing this credential restores the existing backends.",
|
|
98
|
+
proposes: "enable_integration"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: "verify-web-tools",
|
|
102
|
+
title: "Verify search and fetch after opting in",
|
|
103
|
+
description: "With the user's approval for potentially billed requests, run web_search with a public test query and verify provider='deepseek', " + "no error, and source URLs in the results. Then run web_fetch on a returned public URL and verify fetcher='deepseek', " + "content_type='text/markdown', and non-empty content. Credential presence alone does not verify API access. " + "There is deliberately no automatic paid search probe."
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
troubleshooting: [
|
|
107
|
+
{
|
|
108
|
+
when: "DeepSeek Search or Fetch returns HTTP 402",
|
|
109
|
+
say: "The DeepSeek API account has insufficient balance. Check the DeepSeek platform billing page."
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
when: "DeepSeek Search or Fetch returns HTTP 429",
|
|
113
|
+
say: "The account-level Search or Fetch request limit was exceeded. Wait before retrying; Fetch also has per-domain limits."
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
when: "DeepSeek Fetch returns HTTP 403 or 404",
|
|
117
|
+
say: "DeepSeek rejected the URL under its security policy or could not retrieve usable page content. Verify that the URL is publicly reachable and supports extraction."
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
};
|
|
115
121
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return {
|
|
132
|
-
ok: false,
|
|
133
|
-
error: `instructions_edits[${i}] must be an object`
|
|
134
|
-
};
|
|
122
|
+
;// ./lib/integrations/github/manifest.ts
|
|
123
|
+
const githubManifest = {
|
|
124
|
+
id: "github",
|
|
125
|
+
name: "GitHub",
|
|
126
|
+
summary: "Lets the agent search, read, create, comment on, open/merge, and review GitHub issues " + "and pull requests, list branches, read repo files, and search code via the REST API. " + "Authenticates with a Personal Access Token.",
|
|
127
|
+
category: "issue-tracker",
|
|
128
|
+
prerequisites: [
|
|
129
|
+
{
|
|
130
|
+
check: "credentials",
|
|
131
|
+
detail: "A GitHub account with access to the repos you want the agent to read or write. " + "For org repos, the org must allow PAT access (Settings → Third-party Access → Personal access tokens)."
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
check: "credentials",
|
|
135
|
+
detail: "A Personal Access Token (classic or fine-grained) created at github.com/settings/tokens. " + "Classic tokens need `repo` (or `public_repo` for public-only). Fine-grained tokens need " + "Contents: read, Issues: read/write, and Pull requests: read/write on the selected repositories. " + "`read:org` is only needed for organization-specific operations such as team reviewer lookup.",
|
|
136
|
+
docs_url: "https://docs.github.com/en/rest/overview/permissions-required-for-fine-grained-personal-access-tokens"
|
|
135
137
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
],
|
|
139
|
+
steps: [
|
|
140
|
+
{
|
|
141
|
+
id: "create-pat",
|
|
142
|
+
title: "Create a GitHub Personal Access Token",
|
|
143
|
+
description: "Open github.com/settings/tokens → Generate new token. For classic tokens, tick `repo` (or " + "`public_repo` for public repos only); add `read:org` only if you need organization team reviewer " + "lookup. For fine-grained tokens, pick the repos and grant Contents: Read-only, Issues: Read+Write, " + "and Pull requests: Read+Write. Copy the token immediately — GitHub only " + "shows it once.",
|
|
144
|
+
docs_url: "https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
id: "save-credentials",
|
|
148
|
+
title: "Save the token in Jarela",
|
|
149
|
+
description: "Propose enabling the integration. The user will be asked for the token; it is stored encrypted at rest.",
|
|
150
|
+
proposes: "enable_integration"
|
|
142
151
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
});
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
case "prepend":
|
|
164
|
-
{
|
|
165
|
-
if (typeof op.text !== "string") {
|
|
166
|
-
return {
|
|
167
|
-
ok: false,
|
|
168
|
-
error: `instructions_edits[${i}].text must be a string`
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
const ifMissing = !!op.if_missing;
|
|
172
|
-
const ignoreCase = !!op.ignore_case;
|
|
173
|
-
const shouldPrepend = !ifMissing || !containsText(text, op.text, ignoreCase);
|
|
174
|
-
if (shouldPrepend) text = op.text + text;
|
|
175
|
-
summary.push({
|
|
176
|
-
index: i,
|
|
177
|
-
op: "prepend",
|
|
178
|
-
applied: shouldPrepend
|
|
179
|
-
});
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
case "replace":
|
|
183
|
-
{
|
|
184
|
-
if (typeof op.find !== "string") {
|
|
185
|
-
return {
|
|
186
|
-
ok: false,
|
|
187
|
-
error: `instructions_edits[${i}].find must be a string`
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
if (typeof op.replace !== "string") {
|
|
191
|
-
return {
|
|
192
|
-
ok: false,
|
|
193
|
-
error: `instructions_edits[${i}].replace must be a string`
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
const out = replaceLiteral(text, op.find, op.replace, !!op.all, !!op.ignore_case);
|
|
197
|
-
text = out.text;
|
|
198
|
-
summary.push({
|
|
199
|
-
index: i,
|
|
200
|
-
op: "replace",
|
|
201
|
-
replacements: out.replacements
|
|
202
|
-
});
|
|
203
|
-
break;
|
|
204
|
-
}
|
|
205
|
-
case "remove":
|
|
206
|
-
{
|
|
207
|
-
if (typeof op.text !== "string") {
|
|
208
|
-
return {
|
|
209
|
-
ok: false,
|
|
210
|
-
error: `instructions_edits[${i}].text must be a string`
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
const out = replaceLiteral(text, op.text, "", !!op.all, !!op.ignore_case);
|
|
214
|
-
text = out.text;
|
|
215
|
-
summary.push({
|
|
216
|
-
index: i,
|
|
217
|
-
op: "remove",
|
|
218
|
-
removals: out.replacements
|
|
219
|
-
});
|
|
220
|
-
break;
|
|
221
|
-
}
|
|
222
|
-
case "dedupe_lines":
|
|
223
|
-
{
|
|
224
|
-
const out = dedupeLines(text, {
|
|
225
|
-
trim: op.trim !== false,
|
|
226
|
-
ignoreCase: op.ignore_case !== false,
|
|
227
|
-
skipBlank: op.skip_blank !== false,
|
|
228
|
-
keep: op.keep === "last" ? "last" : "first"
|
|
229
|
-
});
|
|
230
|
-
text = out.text;
|
|
231
|
-
summary.push({
|
|
232
|
-
index: i,
|
|
233
|
-
op: "dedupe_lines",
|
|
234
|
-
removed: out.removed
|
|
235
|
-
});
|
|
236
|
-
break;
|
|
237
|
-
}
|
|
238
|
-
case "dedupe_paragraphs":
|
|
239
|
-
{
|
|
240
|
-
const out = dedupeParagraphs(text, {
|
|
241
|
-
trim: op.trim !== false,
|
|
242
|
-
ignoreCase: op.ignore_case !== false,
|
|
243
|
-
keep: op.keep === "last" ? "last" : "first"
|
|
244
|
-
});
|
|
245
|
-
text = out.text;
|
|
246
|
-
summary.push({
|
|
247
|
-
index: i,
|
|
248
|
-
op: "dedupe_paragraphs",
|
|
249
|
-
removed: out.removed
|
|
250
|
-
});
|
|
251
|
-
break;
|
|
252
|
-
}
|
|
253
|
-
default:
|
|
254
|
-
return {
|
|
255
|
-
ok: false,
|
|
256
|
-
error: `instructions_edits[${i}].op is not supported`
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
return {
|
|
261
|
-
ok: true,
|
|
262
|
-
text,
|
|
263
|
-
summary
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
function escapeRegex(literal) {
|
|
267
|
-
return literal.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
268
|
-
}
|
|
269
|
-
function replaceLiteral(source, find, replacement, all, ignoreCase) {
|
|
270
|
-
if (!find) return {
|
|
271
|
-
text: source,
|
|
272
|
-
replacements: 0
|
|
273
|
-
};
|
|
274
|
-
if (!ignoreCase) {
|
|
275
|
-
if (all) {
|
|
276
|
-
const parts = source.split(find);
|
|
277
|
-
if (parts.length <= 1) return {
|
|
278
|
-
text: source,
|
|
279
|
-
replacements: 0
|
|
280
|
-
};
|
|
281
|
-
return {
|
|
282
|
-
text: parts.join(replacement),
|
|
283
|
-
replacements: parts.length - 1
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
const idx = source.indexOf(find);
|
|
287
|
-
if (idx < 0) return {
|
|
288
|
-
text: source,
|
|
289
|
-
replacements: 0
|
|
290
|
-
};
|
|
291
|
-
return {
|
|
292
|
-
text: source.slice(0, idx) + replacement + source.slice(idx + find.length),
|
|
293
|
-
replacements: 1
|
|
294
|
-
};
|
|
295
|
-
}
|
|
296
|
-
const flags = all ? "gi" : "i";
|
|
297
|
-
const re = new RegExp(escapeRegex(find), flags);
|
|
298
|
-
let replacements = 0;
|
|
299
|
-
const text = source.replace(re, ()=>{
|
|
300
|
-
replacements += 1;
|
|
301
|
-
return replacement;
|
|
302
|
-
});
|
|
303
|
-
return {
|
|
304
|
-
text,
|
|
305
|
-
replacements
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
function containsText(source, needle, ignoreCase) {
|
|
309
|
-
if (!ignoreCase) return source.includes(needle);
|
|
310
|
-
return source.toLowerCase().includes(needle.toLowerCase());
|
|
311
|
-
}
|
|
312
|
-
const FENCE_RE = /^\s{0,3}(`{3,}|~{3,})/;
|
|
313
|
-
const HORIZONTAL_RULE_RE = /^\s{0,3}([-*_])(?:\s*\1){2,}\s*$/;
|
|
314
|
-
/**
|
|
315
|
-
* Drop duplicate segments from `parts`, which alternates content (even
|
|
316
|
-
* indexes) and the original separator that follows it (odd indexes).
|
|
317
|
-
* Separators are preserved verbatim, so only removed segments change the
|
|
318
|
-
* text. `keyOf` returns null for a segment that must always be kept.
|
|
319
|
-
*/ function dedupeSegments(parts, keyOf, keep) {
|
|
320
|
-
const contentIdx = parts.map((_, i)=>i).filter((i)=>i % 2 === 0);
|
|
321
|
-
const visit = keep === "first" ? contentIdx : [
|
|
322
|
-
...contentIdx
|
|
323
|
-
].reverse();
|
|
324
|
-
const seen = new Set();
|
|
325
|
-
const dropped = new Set();
|
|
326
|
-
for (const idx of visit){
|
|
327
|
-
const key = keyOf(idx);
|
|
328
|
-
if (key === null) continue;
|
|
329
|
-
if (seen.has(key)) dropped.add(idx);
|
|
330
|
-
else seen.add(key);
|
|
331
|
-
}
|
|
332
|
-
if (dropped.size === 0) return {
|
|
333
|
-
text: parts.join(""),
|
|
334
|
-
removed: 0
|
|
335
|
-
};
|
|
336
|
-
let text = "";
|
|
337
|
-
let emitted = false;
|
|
338
|
-
for (const idx of contentIdx){
|
|
339
|
-
if (dropped.has(idx)) continue;
|
|
340
|
-
if (emitted && idx > 0) text += parts[idx - 1];
|
|
341
|
-
text += parts[idx];
|
|
342
|
-
emitted = true;
|
|
343
|
-
}
|
|
344
|
-
return {
|
|
345
|
-
text,
|
|
346
|
-
removed: dropped.size
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
function dedupeLines(source, opts) {
|
|
350
|
-
const parts = source.split(/(\r?\n)/);
|
|
351
|
-
// Fence markers, fenced code and horizontal rules repeat by design; a
|
|
352
|
-
// closing ``` is always a "duplicate" of the opening one.
|
|
353
|
-
const protectedIdx = new Set();
|
|
354
|
-
let fence = null;
|
|
355
|
-
for(let i = 0; i < parts.length; i += 2){
|
|
356
|
-
const marker = FENCE_RE.exec(parts[i])?.[1];
|
|
357
|
-
if (fence !== null) {
|
|
358
|
-
protectedIdx.add(i);
|
|
359
|
-
if (marker && marker[0] === fence[0] && marker.length >= fence.length && /^\s*[`~]+\s*$/.test(parts[i])) fence = null;
|
|
360
|
-
} else if (marker) {
|
|
361
|
-
protectedIdx.add(i);
|
|
362
|
-
fence = marker;
|
|
363
|
-
} else if (HORIZONTAL_RULE_RE.test(parts[i])) {
|
|
364
|
-
protectedIdx.add(i);
|
|
152
|
+
],
|
|
153
|
+
troubleshooting: [
|
|
154
|
+
{
|
|
155
|
+
when: "tool returns 401 Unauthorized",
|
|
156
|
+
say: "The token is wrong, expired, or was revoked. Ask the user to regenerate it at " + "github.com/settings/tokens and re-enter it in the Integrations panel."
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
when: "tool returns 403 with rate-limit message",
|
|
160
|
+
say: "GitHub rate-limited this token. Wait until the reset window indicated in the response, or ask the " + "user to switch to a token with higher limits (authenticated requests get 5000/hr)."
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
when: "tool returns 403 'Resource not accessible by personal access token'",
|
|
164
|
+
say: "Fine-grained tokens are scoped to specific repos AND specific permissions. Either widen the token's " + "repo selection, grant the missing permission (Issues / Pull requests: Read+Write), or fall back to a " + "classic token with the `repo` scope."
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
when: "tool returns 404 on a repo the user can see in the browser",
|
|
168
|
+
say: "The token can't see the repo. For org-owned private repos, the org must allow PAT access " + "(org Settings → Third-party Access). Ask the user to verify the org's PAT policy."
|
|
365
169
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
if (protectedIdx.has(i)) return null;
|
|
369
|
-
const normalized = opts.trim ? parts[i].trim() : parts[i];
|
|
370
|
-
if (opts.skipBlank && normalized.length === 0) return null;
|
|
371
|
-
return opts.ignoreCase ? normalized.toLowerCase() : normalized;
|
|
372
|
-
}, opts.keep);
|
|
373
|
-
}
|
|
374
|
-
function dedupeParagraphs(source, opts) {
|
|
375
|
-
const tail = /\s*$/.exec(source)?.[0] ?? "";
|
|
376
|
-
const parts = source.slice(0, source.length - tail.length).split(/(\r?\n(?:[ \t]*\r?\n)+)/);
|
|
377
|
-
const out = dedupeSegments(parts, (i)=>{
|
|
378
|
-
if (parts[i].trim().length === 0) return null;
|
|
379
|
-
const base = opts.trim ? parts[i].trim() : parts[i];
|
|
380
|
-
return opts.ignoreCase ? base.toLowerCase() : base;
|
|
381
|
-
}, opts.keep);
|
|
382
|
-
return {
|
|
383
|
-
text: out.text + tail,
|
|
384
|
-
removed: out.removed
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
/***/ }),
|
|
390
|
-
|
|
391
|
-
/***/ 328286:
|
|
392
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
393
|
-
|
|
394
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
395
|
-
/* harmony export */ Hx: () => (/* binding */ reservePendingApproval),
|
|
396
|
-
/* harmony export */ JP: () => (/* binding */ listPendingActions),
|
|
397
|
-
/* harmony export */ iV: () => (/* binding */ createPendingAction),
|
|
398
|
-
/* harmony export */ p$: () => (/* binding */ setActionStatus),
|
|
399
|
-
/* harmony export */ wv: () => (/* binding */ getPendingAction)
|
|
400
|
-
/* harmony export */ });
|
|
401
|
-
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(977598);
|
|
402
|
-
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(node_crypto__WEBPACK_IMPORTED_MODULE_0__);
|
|
403
|
-
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251244);
|
|
404
|
-
/* harmony import */ var _threads__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(783042);
|
|
405
|
-
/* harmony import */ var _system_signals__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(441982);
|
|
406
|
-
/* harmony import */ var _lib_lifecycle_system_signals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(583566);
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
170
|
+
]
|
|
171
|
+
};
|
|
411
172
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
sql += " AND status=?";
|
|
428
|
-
params.push(opts.status);
|
|
429
|
-
}
|
|
430
|
-
if (opts.agent_id) {
|
|
431
|
-
sql += " AND agent_id=?";
|
|
432
|
-
params.push(opts.agent_id);
|
|
433
|
-
}
|
|
434
|
-
sql += " ORDER BY created_at DESC LIMIT 200";
|
|
435
|
-
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare(sql).all(...params);
|
|
436
|
-
}
|
|
437
|
-
function reservePendingApproval(id) {
|
|
438
|
-
return (0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .withSystemSignalTransaction */ .yg)(()=>{
|
|
439
|
-
const action = getPendingAction(id);
|
|
440
|
-
if (!action || action.status !== "pending" || (0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .getSystemOperation */ .pd)(`approval:${id}`)) return null;
|
|
441
|
-
const thread = (0,_threads__WEBPACK_IMPORTED_MODULE_2__/* .getOrCreateAgentThread */ .xH)(action.agent_id);
|
|
442
|
-
(0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .beginSystemOperation */ .Wo)({
|
|
443
|
-
operationId: `approval:${id}`,
|
|
444
|
-
kind: "approval",
|
|
445
|
-
agentId: action.agent_id,
|
|
446
|
-
threadId: thread.thread_id,
|
|
447
|
-
originInstance: (0,_lib_lifecycle_system_signals__WEBPACK_IMPORTED_MODULE_4__/* .runtimeInstanceId */ .V)(),
|
|
448
|
-
payload: {
|
|
449
|
-
proposal_id: id
|
|
450
|
-
}
|
|
451
|
-
});
|
|
452
|
-
return action;
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
|
-
function setActionStatus(id, status, result) {
|
|
456
|
-
return (0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .withSystemSignalTransaction */ .yg)(()=>{
|
|
457
|
-
const prior = getPendingAction(id);
|
|
458
|
-
if (prior && prior.status !== "pending") {
|
|
459
|
-
if (prior.status === status) return prior;
|
|
460
|
-
throw new Error("Approval already has a terminal outcome; do not replace it");
|
|
461
|
-
}
|
|
462
|
-
if (status === "denied" && (0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .getSystemOperation */ .pd)(`approval:${id}`)?.state === "accepted") {
|
|
463
|
-
throw new Error("Approval application is already in progress; verify its outcome instead of denying it");
|
|
173
|
+
;// ./lib/integrations/gmail/manifest.ts
|
|
174
|
+
const gmailManifest = {
|
|
175
|
+
id: "gmail",
|
|
176
|
+
name: "Gmail + Google Calendar",
|
|
177
|
+
summary: "Lets the agent search/read mail, create drafts, send mail when explicitly asked, " + "label/archive, and read or modify calendar events.",
|
|
178
|
+
category: "mail",
|
|
179
|
+
prerequisites: [
|
|
180
|
+
{
|
|
181
|
+
check: "credentials",
|
|
182
|
+
detail: "A Google account whose Gmail and Calendar the agent should reach. The user clicks " + "Connect Gmail in the Integrations panel, signs in to Google, and grants the requested " + "scopes (Gmail read+modify+compose, Calendar events read+write). No Google Cloud project " + "or OAuth client setup is required \u2014 Jarela ships a bundled Desktop OAuth client_id " + "and uses PKCE (RFC 7636) as the per-flow proof. No client secret ships in the binary."
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
check: "oauth_app",
|
|
186
|
+
detail: "ADVANCED ONLY: forks that prefer their own GCP project can set the env var " + "JARELA_GMAIL_CLIENT_ID, or paste a client_id (+ optional client_secret for Web app types) " + "into the integration's Advanced fields. The bundled client_id is used otherwise.",
|
|
187
|
+
docs_url: "https://console.cloud.google.com/apis/credentials"
|
|
464
188
|
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
status,
|
|
475
|
-
...unknownOutcome ? {
|
|
476
|
-
outcome: "unknown"
|
|
477
|
-
} : {}
|
|
478
|
-
});
|
|
479
|
-
} else {
|
|
480
|
-
(0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .emitSystemSignal */ .rm)({
|
|
481
|
-
kind,
|
|
482
|
-
operationId: `approval:${id}:${status}`,
|
|
483
|
-
agentId: action.agent_id,
|
|
484
|
-
threadId: thread.thread_id,
|
|
485
|
-
originInstance: (0,_lib_lifecycle_system_signals__WEBPACK_IMPORTED_MODULE_4__/* .runtimeInstanceId */ .V)(),
|
|
486
|
-
payload: {
|
|
487
|
-
proposal_id: id,
|
|
488
|
-
status
|
|
489
|
-
}
|
|
490
|
-
});
|
|
189
|
+
],
|
|
190
|
+
steps: [
|
|
191
|
+
{
|
|
192
|
+
id: "connect-gmail",
|
|
193
|
+
title: "Click Connect Gmail",
|
|
194
|
+
description: "Open Settings \u2192 Credentials \u2192 Gmail and click Connect Gmail. A Google sign-in " + "popup appears. Sign in, review the requested scopes (mail read/modify/compose, calendar " + "events read/write), and grant access. The popup closes automatically and the integration " + "is connected.",
|
|
195
|
+
proposes: "start_oauth",
|
|
196
|
+
verify: {
|
|
197
|
+
tool: "gmail_list_labels"
|
|
491
198
|
}
|
|
492
199
|
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
200
|
+
],
|
|
201
|
+
troubleshooting: [
|
|
202
|
+
{
|
|
203
|
+
when: "consent screen shows 'Google hasn't verified this app'",
|
|
204
|
+
say: "Until Jarela passes Google's OAuth verification process the bundled client shows this " + "warning. Click Advanced \u2192 Go to Jarela (unsafe) to continue. The agent's access is " + "limited to exactly the scopes shown on the consent screen."
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
when: "OAuth consent says 'access_denied' or 'app blocked by org'",
|
|
208
|
+
say: "The user's Google Workspace admin has blocked unverified third-party OAuth apps. The user " + "needs admin approval, or can switch to a BYO OAuth client in the Advanced fields using " + "their own GCP project."
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
when: "tool returns 403 invalid_scope or insufficient_permissions for calendar",
|
|
212
|
+
say: "An older Gmail-only consent didn't include the Calendar scopes. Click Connect Gmail again \u2014 " + "the new consent will request both Gmail and Calendar scopes and overwrite the refresh token."
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
when: "tool returns 401 invalid_grant",
|
|
216
|
+
say: "The refresh token was revoked (often because the user revoked access at " + "myaccount.google.com/permissions). Click Connect Gmail again to re-authorize."
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
};
|
|
502
220
|
|
|
221
|
+
;// ./lib/integrations/google/manifest.ts
|
|
222
|
+
const googleManifest = {
|
|
223
|
+
id: "google",
|
|
224
|
+
name: "Google AI (Gemini + Imagen)",
|
|
225
|
+
summary: "Powers the generate_image tool via Google's Gemini and Imagen models. " + "Independent from the Gmail integration — this is just an API key, no OAuth.",
|
|
226
|
+
category: "llm",
|
|
227
|
+
prerequisites: [
|
|
228
|
+
{
|
|
229
|
+
check: "credentials",
|
|
230
|
+
detail: "A Google AI Studio API key. Free tier is sufficient for most use; " + "Imagen requires a paid project.",
|
|
231
|
+
docs_url: "https://aistudio.google.com/apikey"
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
steps: [
|
|
235
|
+
{
|
|
236
|
+
id: "get-api-key",
|
|
237
|
+
title: "Create an API key in Google AI Studio",
|
|
238
|
+
description: "Open aistudio.google.com/apikey, sign in, click Create API key, " + "and copy the value (starts with AIza). Keep the tab open until it's saved in Jarela.",
|
|
239
|
+
docs_url: "https://aistudio.google.com/apikey"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
id: "save-key",
|
|
243
|
+
title: "Save the key in Jarela",
|
|
244
|
+
description: "Propose enabling the integration. The user will paste the API key into " + "a secure field; it's stored encrypted at rest and never sent to the model in plaintext.",
|
|
245
|
+
proposes: "enable_integration"
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
troubleshooting: [
|
|
249
|
+
{
|
|
250
|
+
when: "generate_image returns 'API key not valid'",
|
|
251
|
+
say: "The Google AI key is wrong or revoked. Ask the user to regenerate it at " + "aistudio.google.com/apikey and re-save in the Integrations panel."
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
when: "generate_image returns 'Imagen requires a paid plan'",
|
|
255
|
+
say: "The free Gemini key doesn't include Imagen. Ask the user to enable billing on the " + "Google Cloud project linked to the AI Studio key, or pick a Gemini-only image variant."
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
};
|
|
503
259
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
260
|
+
;// ./lib/integrations/icloud/manifest.ts
|
|
261
|
+
const icloudManifest = {
|
|
262
|
+
id: "icloud",
|
|
263
|
+
name: "iCloud Mail + Calendar + Reminders",
|
|
264
|
+
summary: "Lets the agent list/read iCloud Mail, create drafts, send mail when explicitly asked, " + "move/flag/trash messages, manage calendar events, and create/complete reminders.",
|
|
265
|
+
category: "mail",
|
|
266
|
+
prerequisites: [
|
|
267
|
+
{
|
|
268
|
+
check: "custom",
|
|
269
|
+
detail: "Two-factor authentication must be enabled on the Apple ID. App-specific passwords are " + "only available for accounts that protect themselves with 2FA.",
|
|
270
|
+
docs_url: "https://support.apple.com/en-us/HT204915"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
check: "credentials",
|
|
274
|
+
detail: "An app-specific password generated at appleid.apple.com. This is a 16-character one-off " + "credential that Apple issues for third-party apps; it can be revoked any time without " + "touching the main Apple ID password.",
|
|
275
|
+
docs_url: "https://support.apple.com/en-us/HT204397"
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
steps: [
|
|
279
|
+
{
|
|
280
|
+
id: "enable-2fa",
|
|
281
|
+
title: "Enable two-factor authentication on the Apple ID",
|
|
282
|
+
description: "Open appleid.apple.com → Sign-In and Security → Two-Factor Authentication and turn it on. " + "This is purely an instructional step — Jarela can't toggle 2FA for the user.",
|
|
283
|
+
docs_url: "https://support.apple.com/en-us/HT204915"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
id: "generate-app-password",
|
|
287
|
+
title: "Generate an app-specific password",
|
|
288
|
+
description: "appleid.apple.com → Sign-In and Security → App-Specific Passwords → Generate. Label it " + "something like 'Jarela'. Apple shows the 16-character password once — copy it into the " + "next step before closing the dialog.",
|
|
289
|
+
docs_url: "https://support.apple.com/en-us/HT204397"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: "save-credentials",
|
|
293
|
+
title: "Save the Apple ID + app-specific password in Jarela",
|
|
294
|
+
description: "Propose enabling the integration. The user pastes their full Apple ID email and the " + "16-character app-specific password into the secure form. Both are stored encrypted at " + "rest. Dashes in the password are stripped automatically. If your Apple ID is not your " + "iCloud Mail address, also save the full iCloud Mail address for SMTP sending. " + "The folder check verifies IMAP only; it does not prove SMTP sending is authorized.",
|
|
295
|
+
proposes: "enable_integration",
|
|
296
|
+
verify: {
|
|
297
|
+
tool: "icloud_mail_list_folders"
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
troubleshooting: [
|
|
302
|
+
{
|
|
303
|
+
when: "SMTP authentication or sender is rejected",
|
|
304
|
+
say: "SMTP uses the full iCloud Mail address, not the IMAP short username. Check the optional " + "mail address field and app-specific password. SMTP requires smtp.mail.me.com port 587 " + "with STARTTLS. An IMAP or CalDAV connection alone does not prove SMTP access."
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
when: "send reports partial acceptance or an unknown delivery status",
|
|
308
|
+
say: "Do not automatically resend: some recipients may already have received the email. " + "Check the accepted/rejected recipients and confirm delivery before retrying."
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
when: "tool returns AUTHENTICATIONFAILED / 401 from IMAP or CalDAV",
|
|
312
|
+
say: "The app-specific password was revoked or the Apple ID disabled 2FA. Generate a fresh " + "app-specific password at appleid.apple.com and save it in Settings → Credentials → iCloud."
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
when: "IMAP mail tools (not SMTP sending) return 'NO LOGIN' or 'too many requests'",
|
|
316
|
+
say: "iCloud throttles new IMAP sessions per minute. Wait 60 seconds and retry. If it keeps " + "failing, regenerate the app-specific password — Apple sometimes invalidates an old one " + "after a security event without telling the user."
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
when: "icloud_calendar_list_calendars returns an empty list",
|
|
320
|
+
say: "The user might be on a brand-new iCloud account where the calendar home set hasn't been " + "provisioned yet. Ask the user to open Calendar.app or icloud.com/calendar once — Apple " + "lazy-creates the home set on first UI use."
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
};
|
|
509
324
|
|
|
510
|
-
;// ./lib/integrations/
|
|
511
|
-
const
|
|
512
|
-
id: "
|
|
513
|
-
name: "
|
|
514
|
-
summary: "Lets the agent search and modify Jira
|
|
325
|
+
;// ./lib/integrations/jira_align/manifest.ts
|
|
326
|
+
const jiraAlignManifest = {
|
|
327
|
+
id: "jira_align",
|
|
328
|
+
name: "Jira Align",
|
|
329
|
+
summary: "Lets the agent search and modify Jira Align work items (epics, capabilities, features, " + "stories, themes, tasks, defects, objectives), walk the program / team / release / sprint / " + "portfolio / value-stream hierarchy, manage comments and dependencies, and create or edit " + "hierarchy entities. Different surface from Jira Cloud — this is the portfolio-level product. " + "Authenticates with a bearer API token tied to a personal access token in Jira Align.",
|
|
515
330
|
category: "issue-tracker",
|
|
516
331
|
prerequisites: [
|
|
517
332
|
{
|
|
518
333
|
check: "credentials",
|
|
519
|
-
detail: "
|
|
334
|
+
detail: "A Jira Align account on your instance (typically https://<your-company>.jiraalign.com) " + "with permission to view (and modify, if you want write tools enabled) the work items, " + "programs, and teams the agent should reach."
|
|
520
335
|
},
|
|
521
336
|
{
|
|
522
337
|
check: "credentials",
|
|
523
|
-
detail: "
|
|
524
|
-
docs_url: "https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/"
|
|
338
|
+
detail: "A personal access token created in Jira Align under Settings → Personal Access Tokens. " + "Jira Align uses bearer auth — there is no email + token pairing like Jira Cloud."
|
|
525
339
|
}
|
|
526
340
|
],
|
|
527
341
|
steps: [
|
|
528
342
|
{
|
|
529
343
|
id: "create-token",
|
|
530
|
-
title: "Create
|
|
531
|
-
description: "Open
|
|
532
|
-
docs_url: "https://id.atlassian.com/manage-profile/security/api-tokens"
|
|
344
|
+
title: "Create a Jira Align personal access token",
|
|
345
|
+
description: "Open your Jira Align instance, click the gear menu → Settings → Personal Access Tokens, " + "click New Token, give it a label like 'Jarela', set an expiry, and copy the token. The " + "token is shown once — copy it before closing the dialog."
|
|
533
346
|
},
|
|
534
347
|
{
|
|
535
348
|
id: "save-credentials",
|
|
536
349
|
title: "Save the credentials in Jarela",
|
|
537
|
-
description: "Propose enabling the integration. The user will be asked for the
|
|
538
|
-
proposes: "enable_integration"
|
|
350
|
+
description: "Propose enabling the integration. The user will be asked for the instance URL and the " + "API token. The token is stored encrypted at rest. Verify with a read-only call such as " + "jira_align_list_entities (entity_type='program') to confirm the token works before " + "exercising any write tools.",
|
|
351
|
+
proposes: "enable_integration",
|
|
352
|
+
verify: {
|
|
353
|
+
tool: "jira_align_list_entities",
|
|
354
|
+
args: {
|
|
355
|
+
entity_type: "program",
|
|
356
|
+
max_results: 1
|
|
357
|
+
}
|
|
358
|
+
}
|
|
539
359
|
},
|
|
540
360
|
{
|
|
541
|
-
id: "
|
|
542
|
-
title: "Optional: scope
|
|
543
|
-
description: "
|
|
361
|
+
id: "review-write-permissions",
|
|
362
|
+
title: "Optional: scope write access in the AgentEditor",
|
|
363
|
+
description: "Jira Align tools are split by capability (read / write / execute) so the user can flip " + "groups independently. By default the agent should be configured read-only. Only enable " + "the write tools (jira_align_create_*, jira_align_update_*, jira_align_delete_*, " + "jira_align_add_comment, jira_align_create_dependency, …) once the user has confirmed " + "they want the agent to mutate items. Delete tools require an explicit `confirm` arg per " + "call as a second guard against accidental destruction."
|
|
544
364
|
}
|
|
545
365
|
],
|
|
546
366
|
troubleshooting: [
|
|
547
367
|
{
|
|
548
368
|
when: "tool returns 401 Unauthorized",
|
|
549
|
-
say: "The
|
|
369
|
+
say: "The bearer token is wrong, expired, or was revoked. Ask the user to regenerate the token " + "in Jira Align under Settings → Personal Access Tokens and re-enter it in the Integrations panel."
|
|
550
370
|
},
|
|
551
371
|
{
|
|
552
|
-
when: "tool returns 403 Forbidden on a specific
|
|
553
|
-
say: "The account doesn't have permission for that resource. Either the
|
|
372
|
+
when: "tool returns 403 Forbidden on a specific item or entity",
|
|
373
|
+
say: "The account doesn't have permission for that resource. Either the program/team isn't in " + "the user's portfolio or the item is restricted by workflow. Ask the user to verify " + "access in the Jira Align web UI."
|
|
554
374
|
},
|
|
555
375
|
{
|
|
556
|
-
when: "tool returns 404 on a
|
|
557
|
-
say: "
|
|
376
|
+
when: "tool returns 404 on a known item id",
|
|
377
|
+
say: "Jira Align v2 has no generic /items collection — every item lives under its type-specific " + "collection (/epics, /features, /stories, …). Make sure the `type` argument matches the " + "item's actual type. If it does, the item may have been deleted or moved to a portfolio " + "the user can't see."
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
when: "endpoint shape doesn't match what the tool expects",
|
|
381
|
+
say: "Field names and sub-resource paths vary across Jira Align versions and editions. The " + "authoritative reference is the instance's own Swagger at " + "<instance>.jiraalign.com/rest/align/api/docs/. Ask the user to share the exact field " + "names from that page if a write call rejects a field."
|
|
558
382
|
}
|
|
559
383
|
]
|
|
560
384
|
};
|
|
561
385
|
|
|
562
|
-
;// ./lib/integrations/
|
|
563
|
-
const
|
|
564
|
-
id: "
|
|
565
|
-
name: "
|
|
566
|
-
summary: "Lets the agent
|
|
567
|
-
category: "
|
|
386
|
+
;// ./lib/integrations/openai-codex/manifest.ts
|
|
387
|
+
const openaiCodexManifest = {
|
|
388
|
+
id: "openai-codex",
|
|
389
|
+
name: "OpenAI Codex (ChatGPT)",
|
|
390
|
+
summary: "Lets the agent delegate a coding task to the locally installed Codex CLI, using your existing ChatGPT sign-in or an OpenAI API key for trusted automation.",
|
|
391
|
+
category: "infrastructure",
|
|
568
392
|
prerequisites: [
|
|
569
393
|
{
|
|
570
394
|
check: "credentials",
|
|
571
|
-
detail: "A
|
|
395
|
+
detail: "A ChatGPT account with Codex access, or an OpenAI Platform API key for usage-based automation.",
|
|
396
|
+
docs_url: "https://learn.chatgpt.com/docs/auth"
|
|
572
397
|
},
|
|
573
398
|
{
|
|
574
|
-
check: "
|
|
575
|
-
detail: "
|
|
576
|
-
docs_url: "https://
|
|
399
|
+
check: "env",
|
|
400
|
+
detail: "Codex CLI installed locally. Run `npm install -g @openai/codex`, then run `codex login` to complete browser sign-in with ChatGPT.",
|
|
401
|
+
docs_url: "https://learn.chatgpt.com/docs/codex/cli"
|
|
577
402
|
}
|
|
578
403
|
],
|
|
579
404
|
steps: [
|
|
580
405
|
{
|
|
581
|
-
id: "
|
|
582
|
-
title: "
|
|
583
|
-
description: "
|
|
584
|
-
docs_url: "https://
|
|
406
|
+
id: "install-codex",
|
|
407
|
+
title: "Install and sign in to Codex",
|
|
408
|
+
description: "Install the Codex CLI with `npm install -g @openai/codex`. In a terminal, run `codex login` and complete the browser sign-in with ChatGPT. The CLI reuses that local login when Jarela calls it.",
|
|
409
|
+
docs_url: "https://learn.chatgpt.com/docs/codex/cli"
|
|
585
410
|
},
|
|
586
411
|
{
|
|
587
|
-
id: "
|
|
588
|
-
title: "
|
|
589
|
-
description: "Propose enabling the integration.
|
|
412
|
+
id: "configure-codex",
|
|
413
|
+
title: "Configure Codex in Jarela",
|
|
414
|
+
description: "Propose enabling the integration and enter `codex` as the CLI command. A saved API key is optional and is intended only for trusted automated runs; leave it blank to use the Codex CLI's ChatGPT sign-in. Codex runs inherit your enabled Codex plugins, skills, MCP servers, and their own approval policies from the local or project config.",
|
|
590
415
|
proposes: "enable_integration"
|
|
591
416
|
}
|
|
592
417
|
],
|
|
593
418
|
troubleshooting: [
|
|
594
419
|
{
|
|
595
|
-
when: "
|
|
596
|
-
say: "
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
when: "tool returns 403 with rate-limit message",
|
|
600
|
-
say: "GitHub rate-limited this token. Wait until the reset window indicated in the response, or ask the " + "user to switch to a token with higher limits (authenticated requests get 5000/hr)."
|
|
420
|
+
when: "codex CLI not found",
|
|
421
|
+
say: "Install it with `npm install -g @openai/codex`, or set its executable path in Settings -> Credentials -> OpenAI Codex (ChatGPT)."
|
|
601
422
|
},
|
|
602
423
|
{
|
|
603
|
-
when: "
|
|
604
|
-
say: "
|
|
424
|
+
when: "Codex reports that authentication is required",
|
|
425
|
+
say: "Run `codex login` in a terminal to sign in with ChatGPT. Alternatively, save a valid OpenAI API key for this integration; API-key use is billed at standard Platform API rates."
|
|
605
426
|
},
|
|
606
427
|
{
|
|
607
|
-
when: "
|
|
608
|
-
say: "
|
|
428
|
+
when: "codex_delegate returns SAFETY_BLOCKED",
|
|
429
|
+
say: "codex_delegate refuses to run under JARELA_TOOL_SAFETY=safe, since spawning Codex grants it workspace-write access. Raise the tier to 'mostly_safe' (the default) or 'bypass'."
|
|
609
430
|
}
|
|
610
431
|
]
|
|
611
432
|
};
|
|
612
433
|
|
|
613
|
-
;// ./lib/integrations/
|
|
614
|
-
const
|
|
615
|
-
id: "
|
|
616
|
-
name: "
|
|
617
|
-
summary: "Lets the agent search/read mail, create drafts
|
|
434
|
+
;// ./lib/integrations/outlook/manifest.ts
|
|
435
|
+
const outlookManifest = {
|
|
436
|
+
id: "outlook",
|
|
437
|
+
name: "Outlook + Microsoft Calendar + To Do",
|
|
438
|
+
summary: "Lets the agent search/read mail, create drafts, and send mail when explicitly asked, move messages between " + "folders, read or modify Microsoft 365 calendar events, and manage Microsoft To Do " + "task lists and tasks.",
|
|
618
439
|
category: "mail",
|
|
619
440
|
prerequisites: [
|
|
620
441
|
{
|
|
621
|
-
check: "
|
|
622
|
-
detail: "
|
|
442
|
+
check: "oauth_app",
|
|
443
|
+
detail: "An Azure app registration with delegated Mail.ReadWrite, Mail.Send, Calendars.ReadWrite, " + "Tasks.ReadWrite, People.Read, Files.Read.All, Sites.Read.All, User.Read, and offline_access " + "permissions. Files.Read.All and Sites.Read.All enable Microsoft Search across OneDrive/SharePoint. " + "Mail, calendar, and To Do work with personal and M365 accounts; Microsoft Search requires a " + "work/school account. Both account types are supported via the 'common' tenant.",
|
|
444
|
+
docs_url: "https://learn.microsoft.com/en-us/graph/api/search-query?view=graph-rest-1.0"
|
|
623
445
|
},
|
|
624
446
|
{
|
|
625
|
-
check: "
|
|
626
|
-
detail: "
|
|
627
|
-
docs_url: "https://console.cloud.google.com/apis/credentials"
|
|
447
|
+
check: "custom",
|
|
448
|
+
detail: "The Azure app's redirect URI must be of type 'Web' and match where Jarela is reachable. " + "For local use that's typically http://localhost:4312/api/v1/integrations/outlook/oauth/callback."
|
|
628
449
|
}
|
|
629
450
|
],
|
|
630
451
|
steps: [
|
|
631
452
|
{
|
|
632
|
-
id: "
|
|
633
|
-
title: "
|
|
634
|
-
description: "Open
|
|
453
|
+
id: "register-app",
|
|
454
|
+
title: "Register an Azure application",
|
|
455
|
+
description: "Open portal.azure.com → Microsoft Entra ID → App registrations → New registration. " + "Name it (e.g. 'Jarela'), pick 'Accounts in any organizational directory and personal Microsoft accounts', " + "and set the redirect URI of type Web to match the prerequisite above.",
|
|
456
|
+
docs_url: "https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
id: "create-secret",
|
|
460
|
+
title: "Create a client secret",
|
|
461
|
+
description: "Inside the app registration, open Certificates & secrets → Client secrets → New client secret. " + "Copy the Value (not the Secret ID) immediately — Azure only shows it once."
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
id: "grant-scopes",
|
|
465
|
+
title: "Grant the required Graph permissions",
|
|
466
|
+
description: "API permissions → Add a permission → Microsoft Graph → Delegated permissions. " + "Add Mail.ReadWrite, Mail.Send, Calendars.ReadWrite, Tasks.ReadWrite, People.Read, " + "Files.Read.All, Sites.Read.All, User.Read, offline_access. " + "No admin consent required for personal accounts; M365 tenants may need an admin to consent."
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
id: "save-client",
|
|
470
|
+
title: "Save the OAuth client in Jarela",
|
|
471
|
+
description: "Propose enabling the integration. The user pastes Application (client) ID and the client secret value. " + "Both are stored encrypted at rest.",
|
|
472
|
+
proposes: "enable_integration"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
id: "authorize",
|
|
476
|
+
title: "Run the OAuth consent flow",
|
|
477
|
+
description: "Once client credentials are saved, propose start_oauth. The user approves, Microsoft's consent " + "screen opens in a new tab, and a refresh_token is captured on success.",
|
|
635
478
|
proposes: "start_oauth",
|
|
636
479
|
verify: {
|
|
637
|
-
tool: "
|
|
480
|
+
tool: "outlook_list_folders"
|
|
638
481
|
}
|
|
639
482
|
}
|
|
640
483
|
],
|
|
641
484
|
troubleshooting: [
|
|
642
485
|
{
|
|
643
|
-
when: "consent
|
|
644
|
-
say: "
|
|
486
|
+
when: "consent fails with AADSTS50011 redirect_uri mismatch",
|
|
487
|
+
say: "The redirect URI in the Azure app registration doesn't match. Open the app → Authentication, " + "and verify the Web redirect URI matches exactly (scheme, host, port, path)."
|
|
645
488
|
},
|
|
646
489
|
{
|
|
647
|
-
when: "
|
|
648
|
-
say: "
|
|
490
|
+
when: "token endpoint returns AADSTS900144 'scope' missing",
|
|
491
|
+
say: "Microsoft's v2 endpoint requires the scope parameter on every token call. This is a Jarela bug " + "— file an issue. Workaround: re-run start_oauth, the consent flow includes the scope."
|
|
649
492
|
},
|
|
650
493
|
{
|
|
651
|
-
when: "tool returns 403
|
|
652
|
-
say: "
|
|
494
|
+
when: "tool returns 403 InsufficientScope",
|
|
495
|
+
say: "The user consented to fewer scopes than the integration needs. Propose start_oauth — the " + "consent screen will re-prompt for the missing permission."
|
|
653
496
|
},
|
|
654
497
|
{
|
|
655
|
-
when: "
|
|
656
|
-
say: "The
|
|
498
|
+
when: "M365 work account fails with 'admin consent required'",
|
|
499
|
+
say: "The tenant admin has restricted user consent. Either ask the admin to grant tenant-wide " + "consent for the Jarela app registration, or use a personal Microsoft account instead."
|
|
657
500
|
}
|
|
658
501
|
]
|
|
659
502
|
};
|
|
660
503
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
504
|
+
// EXTERNAL MODULE: ./node_modules/zod/v4/classic/schemas.js + 4 modules
|
|
505
|
+
var schemas = __webpack_require__(497377);
|
|
506
|
+
;// ./lib/integrations/manifest.ts
|
|
507
|
+
// Integration manifest contract — see ADR-0010.
|
|
508
|
+
//
|
|
509
|
+
// Every directory under lib/integrations/ must export a `manifest` from
|
|
510
|
+
// `manifest.ts` matching this schema. The manifest is the single source of
|
|
511
|
+
// truth for both the agent's setup guidance and the static Integrations
|
|
512
|
+
// panel. A lint check (scripts/check-integration-manifests.mjs) enforces
|
|
513
|
+
// presence at build time.
|
|
514
|
+
|
|
515
|
+
const PrerequisiteSchema = schemas/* object */.Ikc({
|
|
516
|
+
check: schemas/* enum */.k5n([
|
|
517
|
+
"provider_key",
|
|
518
|
+
"oauth_app",
|
|
519
|
+
"env",
|
|
520
|
+
"credentials",
|
|
521
|
+
"custom"
|
|
522
|
+
]),
|
|
523
|
+
detail: schemas/* string */.YjP().min(1),
|
|
524
|
+
docs_url: schemas/* string */.YjP().url().optional()
|
|
525
|
+
});
|
|
526
|
+
const SetupStepSchema = schemas/* object */.Ikc({
|
|
527
|
+
id: schemas/* string */.YjP().min(1),
|
|
528
|
+
title: schemas/* string */.YjP().min(1),
|
|
529
|
+
description: schemas/* string */.YjP().min(1),
|
|
530
|
+
// Which propose_config_change kind (if any) implements this step.
|
|
531
|
+
// When unset, the step is purely instructional (e.g. "create an Azure app
|
|
532
|
+
// registration in the Azure portal" — no Jarela-side mutation).
|
|
533
|
+
proposes: schemas/* enum */.k5n([
|
|
534
|
+
"install_mcp",
|
|
535
|
+
"toggle_mcp",
|
|
536
|
+
"update_agent_tools",
|
|
537
|
+
"update_agent",
|
|
538
|
+
"start_oauth",
|
|
539
|
+
"set_provider_key",
|
|
540
|
+
"enable_integration"
|
|
541
|
+
]).optional(),
|
|
542
|
+
// Optional self-test the agent can run after the step completes.
|
|
543
|
+
verify: schemas/* object */.Ikc({
|
|
544
|
+
tool: schemas/* string */.YjP(),
|
|
545
|
+
args: schemas/* record */.g1P(schemas/* string */.YjP(), schemas/* unknown */.L5J()).optional()
|
|
546
|
+
}).optional(),
|
|
547
|
+
docs_url: schemas/* string */.YjP().url().optional()
|
|
548
|
+
});
|
|
549
|
+
const TroubleshootingSchema = schemas/* object */.Ikc({
|
|
550
|
+
when: schemas/* string */.YjP().min(1),
|
|
551
|
+
say: schemas/* string */.YjP().min(1)
|
|
552
|
+
});
|
|
553
|
+
const IntegrationManifestSchema = schemas/* object */.Ikc({
|
|
554
|
+
id: schemas/* string */.YjP().min(1)// Lowercase, alnum + '-' + '_'. Underscores are allowed so the manifest
|
|
555
|
+
// id can match legacy INTEGRATIONS keys (e.g. 'jira_align') without a
|
|
556
|
+
// separate alias mapping in manifestStatus().
|
|
557
|
+
.regex(/^[a-z][a-z0-9_-]*$/, "id must be lowercase alnum with '-' or '_' separators"),
|
|
558
|
+
name: schemas/* string */.YjP().min(1),
|
|
559
|
+
summary: schemas/* string */.YjP().min(1),
|
|
560
|
+
category: schemas/* enum */.k5n([
|
|
561
|
+
"llm",
|
|
562
|
+
"mail",
|
|
563
|
+
"calendar",
|
|
564
|
+
"issue-tracker",
|
|
565
|
+
"chat",
|
|
566
|
+
"infrastructure",
|
|
567
|
+
"other"
|
|
568
|
+
]),
|
|
569
|
+
prerequisites: schemas/* array */.YOg(PrerequisiteSchema),
|
|
570
|
+
steps: schemas/* array */.YOg(SetupStepSchema).min(1),
|
|
571
|
+
troubleshooting: schemas/* array */.YOg(TroubleshootingSchema)
|
|
572
|
+
});
|
|
573
|
+
function validateManifest(m) {
|
|
574
|
+
return IntegrationManifestSchema.parse(m);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
;// ./lib/integrations/registry.ts
|
|
578
|
+
// Static registry of all integration manifests. New integrations must be
|
|
579
|
+
// added here AND ship a manifest.ts; the lint check
|
|
580
|
+
// (scripts/check-integration-manifests.mjs) verifies the two stay in sync.
|
|
581
|
+
//
|
|
582
|
+
// We use static imports rather than a dynamic `import.meta.glob`-style
|
|
583
|
+
// loader because the Next.js bundler needs the imports visible at build
|
|
584
|
+
// time (the agent tools that read manifests run server-side in the same
|
|
585
|
+
// runtime as the Next API routes).
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
const RAW = [
|
|
597
|
+
atlassianManifest,
|
|
598
|
+
deepseekWebManifest,
|
|
599
|
+
githubManifest,
|
|
600
|
+
gmailManifest,
|
|
601
|
+
googleManifest,
|
|
602
|
+
icloudManifest,
|
|
603
|
+
jiraAlignManifest,
|
|
604
|
+
openaiCodexManifest,
|
|
605
|
+
outlookManifest
|
|
606
|
+
];
|
|
607
|
+
// Validate at module load. A bad manifest is a build-time bug we want to
|
|
608
|
+
// surface immediately, not a runtime surprise the agent papers over.
|
|
609
|
+
const MANIFESTS = RAW.map((m)=>validateManifest(m));
|
|
610
|
+
function listManifests() {
|
|
611
|
+
return MANIFESTS.slice();
|
|
612
|
+
}
|
|
613
|
+
function getManifest(id) {
|
|
614
|
+
return MANIFESTS.find((m)=>m.id === id) ?? null;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
/***/ }),
|
|
619
|
+
|
|
620
|
+
/***/ 42666:
|
|
621
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
622
|
+
|
|
623
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
624
|
+
/* harmony export */ KA: () => (/* binding */ setMcpServerError),
|
|
625
|
+
/* harmony export */ cw: () => (/* binding */ getMcpServer),
|
|
626
|
+
/* harmony export */ le: () => (/* binding */ deleteMcpServer),
|
|
627
|
+
/* harmony export */ n7: () => (/* binding */ listMcpServers),
|
|
628
|
+
/* harmony export */ te: () => (/* binding */ upsertMcpServer)
|
|
629
|
+
/* harmony export */ });
|
|
630
|
+
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(251244);
|
|
631
|
+
/* harmony import */ var _lib_crypto_envelope__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(710938);
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
const now = ()=>new Date().toISOString();
|
|
635
|
+
// `spec` may contain MCP env vars like GITHUB_TOKEN, GOOGLE_MAPS_API_KEY,
|
|
636
|
+
// BRAVE_API_KEY etc. — encrypted at rest (ADR-0005). Decrypt on read.
|
|
637
|
+
function decryptRow(row) {
|
|
638
|
+
return {
|
|
639
|
+
...row,
|
|
640
|
+
spec: (0,_lib_crypto_envelope__WEBPACK_IMPORTED_MODULE_1__/* .decryptIfNeeded */ .qU)(row.spec)
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
function listMcpServers() {
|
|
644
|
+
const rows = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM mcp_servers ORDER BY name ASC").all();
|
|
645
|
+
return rows.map(decryptRow);
|
|
646
|
+
}
|
|
647
|
+
function getMcpServer(name) {
|
|
648
|
+
const row = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM mcp_servers WHERE name=?").get(name) ?? null;
|
|
649
|
+
return row ? decryptRow(row) : null;
|
|
650
|
+
}
|
|
651
|
+
function upsertMcpServer(input) {
|
|
652
|
+
const t = now();
|
|
653
|
+
const existing = getMcpServer(input.name);
|
|
654
|
+
const created_at = existing?.created_at ?? t;
|
|
655
|
+
const enabled = input.enabled === false ? 0 : 1;
|
|
656
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare(`INSERT OR REPLACE INTO mcp_servers (name, transport, spec, enabled, last_error, created_at, updated_at)
|
|
657
|
+
VALUES (?, ?, ?, ?, NULL, ?, ?)`).run(input.name, input.transport, (0,_lib_crypto_envelope__WEBPACK_IMPORTED_MODULE_1__/* .encrypt */ .w)(JSON.stringify(input.spec)), enabled, created_at, t);
|
|
658
|
+
return getMcpServer(input.name);
|
|
659
|
+
}
|
|
660
|
+
function deleteMcpServer(name) {
|
|
661
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("DELETE FROM mcp_servers WHERE name=?").run(name).changes > 0;
|
|
662
|
+
}
|
|
663
|
+
function setMcpServerError(name, error) {
|
|
664
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("UPDATE mcp_servers SET last_error=?, updated_at=? WHERE name=?").run(error, now(), name);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
/***/ }),
|
|
669
|
+
|
|
670
|
+
/***/ 56718:
|
|
671
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
672
|
+
|
|
673
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
674
|
+
/* harmony export */ HP: () => (/* binding */ disabledCategories),
|
|
675
|
+
/* harmony export */ MD: () => (/* binding */ setCategoryEnabled),
|
|
676
|
+
/* harmony export */ Oj: () => (/* binding */ isCategoryEnabled)
|
|
677
|
+
/* harmony export */ });
|
|
678
|
+
/* unused harmony export listCategoryStates */
|
|
679
|
+
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(251244);
|
|
680
|
+
// Built-in tool category toggles.
|
|
681
|
+
//
|
|
682
|
+
// A category is "enabled" unless an explicit row in `builtin_tool_categories`
|
|
683
|
+
// says otherwise. Default-enabled semantics mean upgrading installs keep
|
|
684
|
+
// every category working with zero migration work.
|
|
685
|
+
//
|
|
686
|
+
// Disabled categories are filtered at three layers:
|
|
687
|
+
// - GET /api/v1/tools (so the agent editor never offers them as permissions)
|
|
688
|
+
// - getAllTools / getAllToolsAsync (so the agent runtime can't see them)
|
|
689
|
+
// - executeTool (defense in depth, blocks stale agent configs)
|
|
690
|
+
|
|
691
|
+
const now = ()=>new Date().toISOString();
|
|
692
|
+
// Every agent can always list/read/write skills, regardless of its own tool
|
|
693
|
+
// selection (lib/agents/run-thread.ts#SELF_CONFIG_TOOLS) — so unlike other
|
|
694
|
+
// builtin categories, this one can never be disabled.
|
|
695
|
+
const ALWAYS_ON = new Set([
|
|
696
|
+
"Skills"
|
|
697
|
+
]);
|
|
698
|
+
function isCategoryEnabled(category) {
|
|
699
|
+
if (ALWAYS_ON.has(category)) return true;
|
|
700
|
+
const row = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT enabled FROM builtin_tool_categories WHERE category=?").get(category);
|
|
701
|
+
return row ? row.enabled === 1 : true;
|
|
702
|
+
}
|
|
703
|
+
function disabledCategories() {
|
|
704
|
+
const rows = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT category FROM builtin_tool_categories WHERE enabled=0").all();
|
|
705
|
+
const disabled = new Set(rows.map((r)=>r.category));
|
|
706
|
+
for (const c of ALWAYS_ON)disabled.delete(c);
|
|
707
|
+
return disabled;
|
|
708
|
+
}
|
|
709
|
+
function listCategoryStates() {
|
|
710
|
+
const rows = getDb().prepare("SELECT category, enabled, updated_at FROM builtin_tool_categories").all();
|
|
711
|
+
return rows.map((r)=>({
|
|
712
|
+
category: r.category,
|
|
713
|
+
enabled: ALWAYS_ON.has(r.category) ? true : r.enabled === 1,
|
|
714
|
+
updated_at: r.updated_at
|
|
715
|
+
}));
|
|
716
|
+
}
|
|
717
|
+
function setCategoryEnabled(category, enabled) {
|
|
718
|
+
if (ALWAYS_ON.has(category) && !enabled) return;
|
|
719
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare(`INSERT INTO builtin_tool_categories (category, enabled, updated_at)
|
|
720
|
+
VALUES (?, ?, ?)
|
|
721
|
+
ON CONFLICT(category) DO UPDATE SET enabled=excluded.enabled, updated_at=excluded.updated_at`).run(category, enabled ? 1 : 0, now());
|
|
722
|
+
}
|
|
699
723
|
|
|
700
|
-
;// ./lib/integrations/icloud/manifest.ts
|
|
701
|
-
const icloudManifest = {
|
|
702
|
-
id: "icloud",
|
|
703
|
-
name: "iCloud Mail + Calendar + Reminders",
|
|
704
|
-
summary: "Lets the agent list/read iCloud Mail, create drafts (never send), move/flag/trash messages, " + "manage calendar events, and create/complete reminders. Drafts-only is a deliberate safety " + "choice — this integration intentionally cannot send mail on the user's behalf.",
|
|
705
|
-
category: "mail",
|
|
706
|
-
prerequisites: [
|
|
707
|
-
{
|
|
708
|
-
check: "custom",
|
|
709
|
-
detail: "Two-factor authentication must be enabled on the Apple ID. App-specific passwords are " + "only available for accounts that protect themselves with 2FA.",
|
|
710
|
-
docs_url: "https://support.apple.com/en-us/HT204915"
|
|
711
|
-
},
|
|
712
|
-
{
|
|
713
|
-
check: "credentials",
|
|
714
|
-
detail: "An app-specific password generated at appleid.apple.com. This is a 16-character one-off " + "credential that Apple issues for third-party apps; it can be revoked any time without " + "touching the main Apple ID password.",
|
|
715
|
-
docs_url: "https://support.apple.com/en-us/HT204397"
|
|
716
|
-
}
|
|
717
|
-
],
|
|
718
|
-
steps: [
|
|
719
|
-
{
|
|
720
|
-
id: "enable-2fa",
|
|
721
|
-
title: "Enable two-factor authentication on the Apple ID",
|
|
722
|
-
description: "Open appleid.apple.com → Sign-In and Security → Two-Factor Authentication and turn it on. " + "This is purely an instructional step — Jarela can't toggle 2FA for the user.",
|
|
723
|
-
docs_url: "https://support.apple.com/en-us/HT204915"
|
|
724
|
-
},
|
|
725
|
-
{
|
|
726
|
-
id: "generate-app-password",
|
|
727
|
-
title: "Generate an app-specific password",
|
|
728
|
-
description: "appleid.apple.com → Sign-In and Security → App-Specific Passwords → Generate. Label it " + "something like 'Jarela'. Apple shows the 16-character password once — copy it into the " + "next step before closing the dialog.",
|
|
729
|
-
docs_url: "https://support.apple.com/en-us/HT204397"
|
|
730
|
-
},
|
|
731
|
-
{
|
|
732
|
-
id: "save-credentials",
|
|
733
|
-
title: "Save the Apple ID + app-specific password in Jarela",
|
|
734
|
-
description: "Propose enabling the integration. The user pastes their full Apple ID email and the " + "16-character app-specific password into the secure form. Both are stored encrypted at " + "rest. Dashes in the password are stripped automatically.",
|
|
735
|
-
proposes: "enable_integration",
|
|
736
|
-
verify: {
|
|
737
|
-
tool: "icloud_mail_list_folders"
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
],
|
|
741
|
-
troubleshooting: [
|
|
742
|
-
{
|
|
743
|
-
when: "tool returns AUTHENTICATIONFAILED / 401 from IMAP or CalDAV",
|
|
744
|
-
say: "The app-specific password was revoked or the Apple ID disabled 2FA. Generate a fresh " + "app-specific password at appleid.apple.com and save it in Settings → Credentials → iCloud."
|
|
745
|
-
},
|
|
746
|
-
{
|
|
747
|
-
when: "icloud_mail_* tools return 'NO LOGIN' or 'too many requests'",
|
|
748
|
-
say: "iCloud throttles new IMAP sessions per minute. Wait 60 seconds and retry. If it keeps " + "failing, regenerate the app-specific password — Apple sometimes invalidates an old one " + "after a security event without telling the user."
|
|
749
|
-
},
|
|
750
|
-
{
|
|
751
|
-
when: "icloud_calendar_list_calendars returns an empty list",
|
|
752
|
-
say: "The user might be on a brand-new iCloud account where the calendar home set hasn't been " + "provisioned yet. Ask the user to open Calendar.app or icloud.com/calendar once — Apple " + "lazy-creates the home set on first UI use."
|
|
753
|
-
}
|
|
754
|
-
]
|
|
755
|
-
};
|
|
756
724
|
|
|
757
|
-
|
|
758
|
-
const jiraAlignManifest = {
|
|
759
|
-
id: "jira_align",
|
|
760
|
-
name: "Jira Align",
|
|
761
|
-
summary: "Lets the agent search and modify Jira Align work items (epics, capabilities, features, " + "stories, themes, tasks, defects, objectives), walk the program / team / release / sprint / " + "portfolio / value-stream hierarchy, manage comments and dependencies, and create or edit " + "hierarchy entities. Different surface from Jira Cloud — this is the portfolio-level product. " + "Authenticates with a bearer API token tied to a personal access token in Jira Align.",
|
|
762
|
-
category: "issue-tracker",
|
|
763
|
-
prerequisites: [
|
|
764
|
-
{
|
|
765
|
-
check: "credentials",
|
|
766
|
-
detail: "A Jira Align account on your instance (typically https://<your-company>.jiraalign.com) " + "with permission to view (and modify, if you want write tools enabled) the work items, " + "programs, and teams the agent should reach."
|
|
767
|
-
},
|
|
768
|
-
{
|
|
769
|
-
check: "credentials",
|
|
770
|
-
detail: "A personal access token created in Jira Align under Settings → Personal Access Tokens. " + "Jira Align uses bearer auth — there is no email + token pairing like Jira Cloud."
|
|
771
|
-
}
|
|
772
|
-
],
|
|
773
|
-
steps: [
|
|
774
|
-
{
|
|
775
|
-
id: "create-token",
|
|
776
|
-
title: "Create a Jira Align personal access token",
|
|
777
|
-
description: "Open your Jira Align instance, click the gear menu → Settings → Personal Access Tokens, " + "click New Token, give it a label like 'Jarela', set an expiry, and copy the token. The " + "token is shown once — copy it before closing the dialog."
|
|
778
|
-
},
|
|
779
|
-
{
|
|
780
|
-
id: "save-credentials",
|
|
781
|
-
title: "Save the credentials in Jarela",
|
|
782
|
-
description: "Propose enabling the integration. The user will be asked for the instance URL and the " + "API token. The token is stored encrypted at rest. Verify with a read-only call such as " + "jira_align_list_entities (entity_type='program') to confirm the token works before " + "exercising any write tools.",
|
|
783
|
-
proposes: "enable_integration",
|
|
784
|
-
verify: {
|
|
785
|
-
tool: "jira_align_list_entities",
|
|
786
|
-
args: {
|
|
787
|
-
entity_type: "program",
|
|
788
|
-
max_results: 1
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
},
|
|
792
|
-
{
|
|
793
|
-
id: "review-write-permissions",
|
|
794
|
-
title: "Optional: scope write access in the AgentEditor",
|
|
795
|
-
description: "Jira Align tools are split by capability (read / write / execute) so the user can flip " + "groups independently. By default the agent should be configured read-only. Only enable " + "the write tools (jira_align_create_*, jira_align_update_*, jira_align_delete_*, " + "jira_align_add_comment, jira_align_create_dependency, …) once the user has confirmed " + "they want the agent to mutate items. Delete tools require an explicit `confirm` arg per " + "call as a second guard against accidental destruction."
|
|
796
|
-
}
|
|
797
|
-
],
|
|
798
|
-
troubleshooting: [
|
|
799
|
-
{
|
|
800
|
-
when: "tool returns 401 Unauthorized",
|
|
801
|
-
say: "The bearer token is wrong, expired, or was revoked. Ask the user to regenerate the token " + "in Jira Align under Settings → Personal Access Tokens and re-enter it in the Integrations panel."
|
|
802
|
-
},
|
|
803
|
-
{
|
|
804
|
-
when: "tool returns 403 Forbidden on a specific item or entity",
|
|
805
|
-
say: "The account doesn't have permission for that resource. Either the program/team isn't in " + "the user's portfolio or the item is restricted by workflow. Ask the user to verify " + "access in the Jira Align web UI."
|
|
806
|
-
},
|
|
807
|
-
{
|
|
808
|
-
when: "tool returns 404 on a known item id",
|
|
809
|
-
say: "Jira Align v2 has no generic /items collection — every item lives under its type-specific " + "collection (/epics, /features, /stories, …). Make sure the `type` argument matches the " + "item's actual type. If it does, the item may have been deleted or moved to a portfolio " + "the user can't see."
|
|
810
|
-
},
|
|
811
|
-
{
|
|
812
|
-
when: "endpoint shape doesn't match what the tool expects",
|
|
813
|
-
say: "Field names and sub-resource paths vary across Jira Align versions and editions. The " + "authoritative reference is the instance's own Swagger at " + "<instance>.jiraalign.com/rest/align/api/docs/. Ask the user to share the exact field " + "names from that page if a write call rejects a field."
|
|
814
|
-
}
|
|
815
|
-
]
|
|
816
|
-
};
|
|
725
|
+
/***/ }),
|
|
817
726
|
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
description: "Install the Codex CLI with `npm install -g @openai/codex`. In a terminal, run `codex login` and complete the browser sign-in with ChatGPT. The CLI reuses that local login when Jarela calls it.",
|
|
841
|
-
docs_url: "https://learn.chatgpt.com/docs/codex/cli"
|
|
842
|
-
},
|
|
843
|
-
{
|
|
844
|
-
id: "configure-codex",
|
|
845
|
-
title: "Configure Codex in Jarela",
|
|
846
|
-
description: "Propose enabling the integration and enter `codex` as the CLI command. A saved API key is optional and is intended only for trusted automated runs; leave it blank to use the Codex CLI's ChatGPT sign-in. Codex runs inherit your enabled Codex plugins, skills, MCP servers, and their own approval policies from the local or project config.",
|
|
847
|
-
proposes: "enable_integration"
|
|
727
|
+
/***/ 311459:
|
|
728
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
729
|
+
|
|
730
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
731
|
+
/* harmony export */ c: () => (/* binding */ applyInstructionEdits)
|
|
732
|
+
/* harmony export */ });
|
|
733
|
+
function applyInstructionEdits(base, editsInput) {
|
|
734
|
+
if (!Array.isArray(editsInput)) {
|
|
735
|
+
return {
|
|
736
|
+
ok: false,
|
|
737
|
+
error: "instructions_edits must be an array"
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
let text = base;
|
|
741
|
+
const summary = [];
|
|
742
|
+
for(let i = 0; i < editsInput.length; i += 1){
|
|
743
|
+
const raw = editsInput[i];
|
|
744
|
+
if (!raw || typeof raw !== "object") {
|
|
745
|
+
return {
|
|
746
|
+
ok: false,
|
|
747
|
+
error: `instructions_edits[${i}] must be an object`
|
|
748
|
+
};
|
|
848
749
|
}
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
{
|
|
856
|
-
when: "Codex reports that authentication is required",
|
|
857
|
-
say: "Run `codex login` in a terminal to sign in with ChatGPT. Alternatively, save a valid OpenAI API key for this integration; API-key use is billed at standard Platform API rates."
|
|
858
|
-
},
|
|
859
|
-
{
|
|
860
|
-
when: "codex_delegate returns SAFETY_BLOCKED",
|
|
861
|
-
say: "codex_delegate refuses to run under JARELA_TOOL_SAFETY=safe, since spawning Codex grants it workspace-write access. Raise the tier to 'mostly_safe' (the default) or 'bypass'."
|
|
750
|
+
const op = raw;
|
|
751
|
+
if (typeof op.op !== "string") {
|
|
752
|
+
return {
|
|
753
|
+
ok: false,
|
|
754
|
+
error: `instructions_edits[${i}].op is required`
|
|
755
|
+
};
|
|
862
756
|
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
757
|
+
switch(op.op){
|
|
758
|
+
case "append":
|
|
759
|
+
{
|
|
760
|
+
if (typeof op.text !== "string") {
|
|
761
|
+
return {
|
|
762
|
+
ok: false,
|
|
763
|
+
error: `instructions_edits[${i}].text must be a string`
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
const ifMissing = !!op.if_missing;
|
|
767
|
+
const ignoreCase = !!op.ignore_case;
|
|
768
|
+
const shouldAppend = !ifMissing || !containsText(text, op.text, ignoreCase);
|
|
769
|
+
if (shouldAppend) text += op.text;
|
|
770
|
+
summary.push({
|
|
771
|
+
index: i,
|
|
772
|
+
op: "append",
|
|
773
|
+
applied: shouldAppend
|
|
774
|
+
});
|
|
775
|
+
break;
|
|
776
|
+
}
|
|
777
|
+
case "prepend":
|
|
778
|
+
{
|
|
779
|
+
if (typeof op.text !== "string") {
|
|
780
|
+
return {
|
|
781
|
+
ok: false,
|
|
782
|
+
error: `instructions_edits[${i}].text must be a string`
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
const ifMissing = !!op.if_missing;
|
|
786
|
+
const ignoreCase = !!op.ignore_case;
|
|
787
|
+
const shouldPrepend = !ifMissing || !containsText(text, op.text, ignoreCase);
|
|
788
|
+
if (shouldPrepend) text = op.text + text;
|
|
789
|
+
summary.push({
|
|
790
|
+
index: i,
|
|
791
|
+
op: "prepend",
|
|
792
|
+
applied: shouldPrepend
|
|
793
|
+
});
|
|
794
|
+
break;
|
|
795
|
+
}
|
|
796
|
+
case "replace":
|
|
797
|
+
{
|
|
798
|
+
if (typeof op.find !== "string") {
|
|
799
|
+
return {
|
|
800
|
+
ok: false,
|
|
801
|
+
error: `instructions_edits[${i}].find must be a string`
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
if (typeof op.replace !== "string") {
|
|
805
|
+
return {
|
|
806
|
+
ok: false,
|
|
807
|
+
error: `instructions_edits[${i}].replace must be a string`
|
|
808
|
+
};
|
|
809
|
+
}
|
|
810
|
+
const out = replaceLiteral(text, op.find, op.replace, !!op.all, !!op.ignore_case);
|
|
811
|
+
text = out.text;
|
|
812
|
+
summary.push({
|
|
813
|
+
index: i,
|
|
814
|
+
op: "replace",
|
|
815
|
+
replacements: out.replacements
|
|
816
|
+
});
|
|
817
|
+
break;
|
|
818
|
+
}
|
|
819
|
+
case "remove":
|
|
820
|
+
{
|
|
821
|
+
if (typeof op.text !== "string") {
|
|
822
|
+
return {
|
|
823
|
+
ok: false,
|
|
824
|
+
error: `instructions_edits[${i}].text must be a string`
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
const out = replaceLiteral(text, op.text, "", !!op.all, !!op.ignore_case);
|
|
828
|
+
text = out.text;
|
|
829
|
+
summary.push({
|
|
830
|
+
index: i,
|
|
831
|
+
op: "remove",
|
|
832
|
+
removals: out.replacements
|
|
833
|
+
});
|
|
834
|
+
break;
|
|
835
|
+
}
|
|
836
|
+
case "dedupe_lines":
|
|
837
|
+
{
|
|
838
|
+
const out = dedupeLines(text, {
|
|
839
|
+
trim: op.trim !== false,
|
|
840
|
+
ignoreCase: op.ignore_case !== false,
|
|
841
|
+
skipBlank: op.skip_blank !== false,
|
|
842
|
+
keep: op.keep === "last" ? "last" : "first"
|
|
843
|
+
});
|
|
844
|
+
text = out.text;
|
|
845
|
+
summary.push({
|
|
846
|
+
index: i,
|
|
847
|
+
op: "dedupe_lines",
|
|
848
|
+
removed: out.removed
|
|
849
|
+
});
|
|
850
|
+
break;
|
|
851
|
+
}
|
|
852
|
+
case "dedupe_paragraphs":
|
|
853
|
+
{
|
|
854
|
+
const out = dedupeParagraphs(text, {
|
|
855
|
+
trim: op.trim !== false,
|
|
856
|
+
ignoreCase: op.ignore_case !== false,
|
|
857
|
+
keep: op.keep === "last" ? "last" : "first"
|
|
858
|
+
});
|
|
859
|
+
text = out.text;
|
|
860
|
+
summary.push({
|
|
861
|
+
index: i,
|
|
862
|
+
op: "dedupe_paragraphs",
|
|
863
|
+
removed: out.removed
|
|
864
|
+
});
|
|
865
|
+
break;
|
|
866
|
+
}
|
|
867
|
+
default:
|
|
868
|
+
return {
|
|
869
|
+
ok: false,
|
|
870
|
+
error: `instructions_edits[${i}].op is not supported`
|
|
871
|
+
};
|
|
881
872
|
}
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
title: "Run the OAuth consent flow",
|
|
909
|
-
description: "Once client credentials are saved, propose start_oauth. The user approves, Microsoft's consent " + "screen opens in a new tab, and a refresh_token is captured on success.",
|
|
910
|
-
proposes: "start_oauth",
|
|
911
|
-
verify: {
|
|
912
|
-
tool: "outlook_list_folders"
|
|
913
|
-
}
|
|
873
|
+
}
|
|
874
|
+
return {
|
|
875
|
+
ok: true,
|
|
876
|
+
text,
|
|
877
|
+
summary
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
function escapeRegex(literal) {
|
|
881
|
+
return literal.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
882
|
+
}
|
|
883
|
+
function replaceLiteral(source, find, replacement, all, ignoreCase) {
|
|
884
|
+
if (!find) return {
|
|
885
|
+
text: source,
|
|
886
|
+
replacements: 0
|
|
887
|
+
};
|
|
888
|
+
if (!ignoreCase) {
|
|
889
|
+
if (all) {
|
|
890
|
+
const parts = source.split(find);
|
|
891
|
+
if (parts.length <= 1) return {
|
|
892
|
+
text: source,
|
|
893
|
+
replacements: 0
|
|
894
|
+
};
|
|
895
|
+
return {
|
|
896
|
+
text: parts.join(replacement),
|
|
897
|
+
replacements: parts.length - 1
|
|
898
|
+
};
|
|
914
899
|
}
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
900
|
+
const idx = source.indexOf(find);
|
|
901
|
+
if (idx < 0) return {
|
|
902
|
+
text: source,
|
|
903
|
+
replacements: 0
|
|
904
|
+
};
|
|
905
|
+
return {
|
|
906
|
+
text: source.slice(0, idx) + replacement + source.slice(idx + find.length),
|
|
907
|
+
replacements: 1
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
const flags = all ? "gi" : "i";
|
|
911
|
+
const re = new RegExp(escapeRegex(find), flags);
|
|
912
|
+
let replacements = 0;
|
|
913
|
+
const text = source.replace(re, ()=>{
|
|
914
|
+
replacements += 1;
|
|
915
|
+
return replacement;
|
|
916
|
+
});
|
|
917
|
+
return {
|
|
918
|
+
text,
|
|
919
|
+
replacements
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
function containsText(source, needle, ignoreCase) {
|
|
923
|
+
if (!ignoreCase) return source.includes(needle);
|
|
924
|
+
return source.toLowerCase().includes(needle.toLowerCase());
|
|
925
|
+
}
|
|
926
|
+
const FENCE_RE = /^\s{0,3}(`{3,}|~{3,})/;
|
|
927
|
+
const HORIZONTAL_RULE_RE = /^\s{0,3}([-*_])(?:\s*\1){2,}\s*$/;
|
|
928
|
+
/**
|
|
929
|
+
* Drop duplicate segments from `parts`, which alternates content (even
|
|
930
|
+
* indexes) and the original separator that follows it (odd indexes).
|
|
931
|
+
* Separators are preserved verbatim, so only removed segments change the
|
|
932
|
+
* text. `keyOf` returns null for a segment that must always be kept.
|
|
933
|
+
*/ function dedupeSegments(parts, keyOf, keep) {
|
|
934
|
+
const contentIdx = parts.map((_, i)=>i).filter((i)=>i % 2 === 0);
|
|
935
|
+
const visit = keep === "first" ? contentIdx : [
|
|
936
|
+
...contentIdx
|
|
937
|
+
].reverse();
|
|
938
|
+
const seen = new Set();
|
|
939
|
+
const dropped = new Set();
|
|
940
|
+
for (const idx of visit){
|
|
941
|
+
const key = keyOf(idx);
|
|
942
|
+
if (key === null) continue;
|
|
943
|
+
if (seen.has(key)) dropped.add(idx);
|
|
944
|
+
else seen.add(key);
|
|
945
|
+
}
|
|
946
|
+
if (dropped.size === 0) return {
|
|
947
|
+
text: parts.join(""),
|
|
948
|
+
removed: 0
|
|
949
|
+
};
|
|
950
|
+
let text = "";
|
|
951
|
+
let emitted = false;
|
|
952
|
+
for (const idx of contentIdx){
|
|
953
|
+
if (dropped.has(idx)) continue;
|
|
954
|
+
if (emitted && idx > 0) text += parts[idx - 1];
|
|
955
|
+
text += parts[idx];
|
|
956
|
+
emitted = true;
|
|
957
|
+
}
|
|
958
|
+
return {
|
|
959
|
+
text,
|
|
960
|
+
removed: dropped.size
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
function dedupeLines(source, opts) {
|
|
964
|
+
const parts = source.split(/(\r?\n)/);
|
|
965
|
+
// Fence markers, fenced code and horizontal rules repeat by design; a
|
|
966
|
+
// closing ``` is always a "duplicate" of the opening one.
|
|
967
|
+
const protectedIdx = new Set();
|
|
968
|
+
let fence = null;
|
|
969
|
+
for(let i = 0; i < parts.length; i += 2){
|
|
970
|
+
const marker = FENCE_RE.exec(parts[i])?.[1];
|
|
971
|
+
if (fence !== null) {
|
|
972
|
+
protectedIdx.add(i);
|
|
973
|
+
if (marker && marker[0] === fence[0] && marker.length >= fence.length && /^\s*[`~]+\s*$/.test(parts[i])) fence = null;
|
|
974
|
+
} else if (marker) {
|
|
975
|
+
protectedIdx.add(i);
|
|
976
|
+
fence = marker;
|
|
977
|
+
} else if (HORIZONTAL_RULE_RE.test(parts[i])) {
|
|
978
|
+
protectedIdx.add(i);
|
|
932
979
|
}
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
"custom"
|
|
954
|
-
]),
|
|
955
|
-
detail: schemas/* string */.YjP().min(1),
|
|
956
|
-
docs_url: schemas/* string */.YjP().url().optional()
|
|
957
|
-
});
|
|
958
|
-
const SetupStepSchema = schemas/* object */.Ikc({
|
|
959
|
-
id: schemas/* string */.YjP().min(1),
|
|
960
|
-
title: schemas/* string */.YjP().min(1),
|
|
961
|
-
description: schemas/* string */.YjP().min(1),
|
|
962
|
-
// Which propose_config_change kind (if any) implements this step.
|
|
963
|
-
// When unset, the step is purely instructional (e.g. "create an Azure app
|
|
964
|
-
// registration in the Azure portal" — no Jarela-side mutation).
|
|
965
|
-
proposes: schemas/* enum */.k5n([
|
|
966
|
-
"install_mcp",
|
|
967
|
-
"toggle_mcp",
|
|
968
|
-
"update_agent_tools",
|
|
969
|
-
"update_agent",
|
|
970
|
-
"start_oauth",
|
|
971
|
-
"set_provider_key",
|
|
972
|
-
"enable_integration"
|
|
973
|
-
]).optional(),
|
|
974
|
-
// Optional self-test the agent can run after the step completes.
|
|
975
|
-
verify: schemas/* object */.Ikc({
|
|
976
|
-
tool: schemas/* string */.YjP(),
|
|
977
|
-
args: schemas/* record */.g1P(schemas/* string */.YjP(), schemas/* unknown */.L5J()).optional()
|
|
978
|
-
}).optional(),
|
|
979
|
-
docs_url: schemas/* string */.YjP().url().optional()
|
|
980
|
-
});
|
|
981
|
-
const TroubleshootingSchema = schemas/* object */.Ikc({
|
|
982
|
-
when: schemas/* string */.YjP().min(1),
|
|
983
|
-
say: schemas/* string */.YjP().min(1)
|
|
984
|
-
});
|
|
985
|
-
const IntegrationManifestSchema = schemas/* object */.Ikc({
|
|
986
|
-
id: schemas/* string */.YjP().min(1)// Lowercase, alnum + '-' + '_'. Underscores are allowed so the manifest
|
|
987
|
-
// id can match legacy INTEGRATIONS keys (e.g. 'jira_align') without a
|
|
988
|
-
// separate alias mapping in manifestStatus().
|
|
989
|
-
.regex(/^[a-z][a-z0-9_-]*$/, "id must be lowercase alnum with '-' or '_' separators"),
|
|
990
|
-
name: schemas/* string */.YjP().min(1),
|
|
991
|
-
summary: schemas/* string */.YjP().min(1),
|
|
992
|
-
category: schemas/* enum */.k5n([
|
|
993
|
-
"llm",
|
|
994
|
-
"mail",
|
|
995
|
-
"calendar",
|
|
996
|
-
"issue-tracker",
|
|
997
|
-
"chat",
|
|
998
|
-
"infrastructure",
|
|
999
|
-
"other"
|
|
1000
|
-
]),
|
|
1001
|
-
prerequisites: schemas/* array */.YOg(PrerequisiteSchema),
|
|
1002
|
-
steps: schemas/* array */.YOg(SetupStepSchema).min(1),
|
|
1003
|
-
troubleshooting: schemas/* array */.YOg(TroubleshootingSchema)
|
|
1004
|
-
});
|
|
1005
|
-
function validateManifest(m) {
|
|
1006
|
-
return IntegrationManifestSchema.parse(m);
|
|
980
|
+
}
|
|
981
|
+
return dedupeSegments(parts, (i)=>{
|
|
982
|
+
if (protectedIdx.has(i)) return null;
|
|
983
|
+
const normalized = opts.trim ? parts[i].trim() : parts[i];
|
|
984
|
+
if (opts.skipBlank && normalized.length === 0) return null;
|
|
985
|
+
return opts.ignoreCase ? normalized.toLowerCase() : normalized;
|
|
986
|
+
}, opts.keep);
|
|
987
|
+
}
|
|
988
|
+
function dedupeParagraphs(source, opts) {
|
|
989
|
+
const tail = /\s*$/.exec(source)?.[0] ?? "";
|
|
990
|
+
const parts = source.slice(0, source.length - tail.length).split(/(\r?\n(?:[ \t]*\r?\n)+)/);
|
|
991
|
+
const out = dedupeSegments(parts, (i)=>{
|
|
992
|
+
if (parts[i].trim().length === 0) return null;
|
|
993
|
+
const base = opts.trim ? parts[i].trim() : parts[i];
|
|
994
|
+
return opts.ignoreCase ? base.toLowerCase() : base;
|
|
995
|
+
}, opts.keep);
|
|
996
|
+
return {
|
|
997
|
+
text: out.text + tail,
|
|
998
|
+
removed: out.removed
|
|
999
|
+
};
|
|
1007
1000
|
}
|
|
1008
|
-
|
|
1009
|
-
;// ./lib/integrations/registry.ts
|
|
1010
|
-
// Static registry of all integration manifests. New integrations must be
|
|
1011
|
-
// added here AND ship a manifest.ts; the lint check
|
|
1012
|
-
// (scripts/check-integration-manifests.mjs) verifies the two stay in sync.
|
|
1013
|
-
//
|
|
1014
|
-
// We use static imports rather than a dynamic `import.meta.glob`-style
|
|
1015
|
-
// loader because the Next.js bundler needs the imports visible at build
|
|
1016
|
-
// time (the agent tools that read manifests run server-side in the same
|
|
1017
|
-
// runtime as the Next API routes).
|
|
1018
1001
|
|
|
1019
1002
|
|
|
1003
|
+
/***/ }),
|
|
1020
1004
|
|
|
1005
|
+
/***/ 328286:
|
|
1006
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1021
1007
|
|
|
1008
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1009
|
+
/* harmony export */ Hx: () => (/* binding */ reservePendingApproval),
|
|
1010
|
+
/* harmony export */ JP: () => (/* binding */ listPendingActions),
|
|
1011
|
+
/* harmony export */ iV: () => (/* binding */ createPendingAction),
|
|
1012
|
+
/* harmony export */ p$: () => (/* binding */ setActionStatus),
|
|
1013
|
+
/* harmony export */ wv: () => (/* binding */ getPendingAction)
|
|
1014
|
+
/* harmony export */ });
|
|
1015
|
+
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(977598);
|
|
1016
|
+
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(node_crypto__WEBPACK_IMPORTED_MODULE_0__);
|
|
1017
|
+
/* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251244);
|
|
1018
|
+
/* harmony import */ var _threads__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(783042);
|
|
1019
|
+
/* harmony import */ var _system_signals__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(441982);
|
|
1020
|
+
/* harmony import */ var _lib_lifecycle_system_signals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(583566);
|
|
1022
1021
|
|
|
1023
1022
|
|
|
1024
1023
|
|
|
1025
1024
|
|
|
1026
1025
|
|
|
1027
|
-
const
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
openaiCodexManifest,
|
|
1035
|
-
outlookManifest
|
|
1036
|
-
];
|
|
1037
|
-
// Validate at module load. A bad manifest is a build-time bug we want to
|
|
1038
|
-
// surface immediately, not a runtime surprise the agent papers over.
|
|
1039
|
-
const MANIFESTS = RAW.map((m)=>validateManifest(m));
|
|
1040
|
-
function listManifests() {
|
|
1041
|
-
return MANIFESTS.slice();
|
|
1026
|
+
const now = ()=>new Date().toISOString();
|
|
1027
|
+
function createPendingAction(input) {
|
|
1028
|
+
const id = (0,node_crypto__WEBPACK_IMPORTED_MODULE_0__.randomUUID)();
|
|
1029
|
+
const t = now();
|
|
1030
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare(`INSERT INTO pending_actions (id, agent_id, kind, payload, reason, status, result, created_at, decided_at)
|
|
1031
|
+
VALUES (?, ?, ?, ?, ?, 'pending', NULL, ?, NULL)`).run(id, input.agent_id, input.kind, JSON.stringify(input.payload), input.reason ?? null, t);
|
|
1032
|
+
return getPendingAction(id);
|
|
1042
1033
|
}
|
|
1043
|
-
function
|
|
1044
|
-
return
|
|
1034
|
+
function getPendingAction(id) {
|
|
1035
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("SELECT * FROM pending_actions WHERE id=?").get(id) ?? null;
|
|
1036
|
+
}
|
|
1037
|
+
function listPendingActions(opts = {}) {
|
|
1038
|
+
let sql = "SELECT * FROM pending_actions WHERE 1=1";
|
|
1039
|
+
const params = [];
|
|
1040
|
+
if (opts.status) {
|
|
1041
|
+
sql += " AND status=?";
|
|
1042
|
+
params.push(opts.status);
|
|
1043
|
+
}
|
|
1044
|
+
if (opts.agent_id) {
|
|
1045
|
+
sql += " AND agent_id=?";
|
|
1046
|
+
params.push(opts.agent_id);
|
|
1047
|
+
}
|
|
1048
|
+
sql += " ORDER BY created_at DESC LIMIT 200";
|
|
1049
|
+
return (0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare(sql).all(...params);
|
|
1050
|
+
}
|
|
1051
|
+
function reservePendingApproval(id) {
|
|
1052
|
+
return (0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .withSystemSignalTransaction */ .yg)(()=>{
|
|
1053
|
+
const action = getPendingAction(id);
|
|
1054
|
+
if (!action || action.status !== "pending" || (0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .getSystemOperation */ .pd)(`approval:${id}`)) return null;
|
|
1055
|
+
const thread = (0,_threads__WEBPACK_IMPORTED_MODULE_2__/* .getOrCreateAgentThread */ .xH)(action.agent_id);
|
|
1056
|
+
(0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .beginSystemOperation */ .Wo)({
|
|
1057
|
+
operationId: `approval:${id}`,
|
|
1058
|
+
kind: "approval",
|
|
1059
|
+
agentId: action.agent_id,
|
|
1060
|
+
threadId: thread.thread_id,
|
|
1061
|
+
originInstance: (0,_lib_lifecycle_system_signals__WEBPACK_IMPORTED_MODULE_4__/* .runtimeInstanceId */ .V)(),
|
|
1062
|
+
payload: {
|
|
1063
|
+
proposal_id: id
|
|
1064
|
+
}
|
|
1065
|
+
});
|
|
1066
|
+
return action;
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1069
|
+
function setActionStatus(id, status, result) {
|
|
1070
|
+
return (0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .withSystemSignalTransaction */ .yg)(()=>{
|
|
1071
|
+
const prior = getPendingAction(id);
|
|
1072
|
+
if (prior && prior.status !== "pending") {
|
|
1073
|
+
if (prior.status === status) return prior;
|
|
1074
|
+
throw new Error("Approval already has a terminal outcome; do not replace it");
|
|
1075
|
+
}
|
|
1076
|
+
if (status === "denied" && (0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .getSystemOperation */ .pd)(`approval:${id}`)?.state === "accepted") {
|
|
1077
|
+
throw new Error("Approval application is already in progress; verify its outcome instead of denying it");
|
|
1078
|
+
}
|
|
1079
|
+
(0,_lib_db__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .Lf)().prepare("UPDATE pending_actions SET status=?, result=?, decided_at=? WHERE id=?").run(status, result === undefined ? null : JSON.stringify(result), now(), id);
|
|
1080
|
+
const action = getPendingAction(id);
|
|
1081
|
+
if (action && prior?.status !== status && status !== "pending") {
|
|
1082
|
+
const thread = (0,_threads__WEBPACK_IMPORTED_MODULE_2__/* .getOrCreateAgentThread */ .xH)(action.agent_id);
|
|
1083
|
+
const kind = status === "approved" ? "approval.approved" : status === "denied" ? "approval.denied" : "approval.failed";
|
|
1084
|
+
if ((0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .getSystemOperation */ .pd)(`approval:${id}`)?.state === "accepted") {
|
|
1085
|
+
const unknownOutcome = result && typeof result === "object" && "outcome" in result && result.outcome === "unknown";
|
|
1086
|
+
(0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .finishSystemOperation */ .IP)(`approval:${id}`, unknownOutcome ? "outcome_unknown" : status === "failed" ? "failed" : "completed", kind, {
|
|
1087
|
+
proposal_id: id,
|
|
1088
|
+
status,
|
|
1089
|
+
...unknownOutcome ? {
|
|
1090
|
+
outcome: "unknown"
|
|
1091
|
+
} : {}
|
|
1092
|
+
});
|
|
1093
|
+
} else {
|
|
1094
|
+
(0,_system_signals__WEBPACK_IMPORTED_MODULE_3__/* .emitSystemSignal */ .rm)({
|
|
1095
|
+
kind,
|
|
1096
|
+
operationId: `approval:${id}:${status}`,
|
|
1097
|
+
agentId: action.agent_id,
|
|
1098
|
+
threadId: thread.thread_id,
|
|
1099
|
+
originInstance: (0,_lib_lifecycle_system_signals__WEBPACK_IMPORTED_MODULE_4__/* .runtimeInstanceId */ .V)(),
|
|
1100
|
+
payload: {
|
|
1101
|
+
proposal_id: id,
|
|
1102
|
+
status
|
|
1103
|
+
}
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
return action;
|
|
1108
|
+
});
|
|
1045
1109
|
}
|
|
1046
1110
|
|
|
1047
1111
|
|
|
@@ -1355,4 +1419,4 @@ function buildSubprocessEnv(userEnv) {
|
|
|
1355
1419
|
|
|
1356
1420
|
};
|
|
1357
1421
|
;
|
|
1358
|
-
//# sourceMappingURL=
|
|
1422
|
+
//# sourceMappingURL=6408.js.map
|