@desplega.ai/agent-swarm 1.131.1 → 1.134.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/README.md +3 -3
- package/dist/{actions-jgcy477k.js → actions-7kast243.js} +20 -18
- package/dist/{anthropic-messages-rjmd2e7n.js → anthropic-messages-706yad38.js} +33 -17
- package/dist/app-0g84t8wf.js +28 -0
- package/dist/{artifact-jysj3wrg.js → artifact-dje5ke4h.js} +37 -131
- package/dist/{assistant-f2vkk1hj.js → assistant-ac4htcky.js} +25 -22
- package/dist/{azure-openai-responses-c0yjmbfd.js → azure-openai-responses-be59fbsz.js} +13 -13
- package/dist/{boot-reembed-q7mp8hcr.js → boot-reembed-b1rcqn85.js} +13 -11
- package/dist/{boot-reembed-xmw8wcx6.js → boot-reembed-kw2541c4.js} +14 -12
- package/dist/{boot-scrub-logs-dsqrv79n.js → boot-scrub-logs-ja29t92g.js} +11 -9
- package/dist/{claude-adapter-q6x7yspx.js → claude-adapter-5cg1fv8s.js} +33 -29
- package/dist/{claude-managed-adapter-wsg37bt8.js → claude-managed-adapter-9z9sdytx.js} +9 -9
- package/dist/{claude-managed-setup-52z4mq9w.js → claude-managed-setup-3zqp51cr.js} +5 -5
- package/dist/{claude-1ex232fc.js → claude-wqn3dtca.js} +1 -1
- package/dist/{cli-4wgngmwv.js → cli-00w4hbam.js} +1 -1
- package/dist/{cli-er3a4bb0.js → cli-15429qdw.js} +6 -1
- package/dist/{cli-e5dabkx0.js → cli-1cwhyvta.js} +4 -4
- package/dist/{cli-zsspvvm2.js → cli-1ybr6vw2.js} +237 -237
- package/dist/{cli-xpxde7rm.js → cli-2wv4kj0e.js} +60 -31
- package/dist/cli-34w2584r.js +530 -0
- package/dist/{cli-se2p6rkb.js → cli-38taxznr.js} +6 -6
- package/dist/{cli-9sbhdpvb.js → cli-3cgfyfzm.js} +14 -14
- package/dist/{cli-5n6e5yfn.js → cli-3zmdzfjf.js} +79 -74
- package/dist/{cli-3ty0t082.js → cli-43x36mty.js} +197 -8
- package/dist/{cli-ycrnynpw.js → cli-480nehnh.js} +29 -22
- package/dist/{cli-0258203w.js → cli-492e7ap5.js} +140 -20
- package/dist/{cli-3fj60etf.js → cli-497b685t.js} +3 -3
- package/dist/{cli-pxfxkx5m.js → cli-4bap00k0.js} +1 -1
- package/dist/{cli-w2wxd56v.js → cli-4bc8vmhm.js} +848 -770
- package/dist/{cli-aca5pz9f.js → cli-589599p9.js} +1 -1
- package/dist/{cli-t930g0xh.js → cli-5tnr64pm.js} +1 -1
- package/dist/{cli-jxg3s9ey.js → cli-65d93ves.js} +7 -7
- package/dist/{cli-6dpytdr2.js → cli-6x363v1z.js} +2 -2
- package/dist/{cli-dxak0fqd.js → cli-787ph852.js} +11 -11
- package/dist/{cli-793jvbsh.js → cli-7bv8nckk.js} +16 -11
- package/dist/{cli-zyxs93y9.js → cli-7jcc9y1r.js} +3 -3
- package/dist/{cli-f1am9szv.js → cli-87t2gstf.js} +1 -1
- package/dist/{cli-9aryf9tv.js → cli-95m51ztz.js} +1 -1
- package/dist/{cli-4w4fmq9x.js → cli-9w49enmh.js} +2 -2
- package/dist/{cli-v69vk5h0.js → cli-9y5b02vr.js} +13 -13
- package/dist/{cli-x23me2mg.js → cli-a1rrkrb4.js} +1 -1
- package/dist/{cli-psrqtw2m.js → cli-a3pkfpqs.js} +2 -2
- package/dist/{cli-h0rgxd24.js → cli-a4ajmfvp.js} +6 -6
- package/dist/{cli-ygrbmjja.js → cli-aw8bb6sf.js} +6 -6
- package/dist/{cli-g74vpjp2.js → cli-brm3et47.js} +55 -22
- package/dist/{cli-czkae1fp.js → cli-c5ddbdfj.js} +9 -9
- package/dist/{cli-114fvtmj.js → cli-c79a9zrc.js} +1 -1
- package/dist/{cli-49n9f49x.js → cli-dx3dz0ms.js} +3 -3
- package/dist/{cli-6dp3ydxa.js → cli-e07exmsb.js} +18 -14
- package/dist/cli-et1bbwqf.js +13 -0
- package/dist/{cli-yazx6hap.js → cli-f3s9dry0.js} +14 -14
- package/dist/{cli-t8d349cy.js → cli-f4wj0s3m.js} +3 -3
- package/dist/{cli-d6n0thxw.js → cli-f64gdfxc.js} +1 -1
- package/dist/{cli-pwfsqc2x.js → cli-fyd58xgb.js} +55 -55
- package/dist/{cli-7dm2zqy2.js → cli-g0j14czv.js} +2 -2
- package/dist/{cli-b0p7rfnd.js → cli-g2p9bd1z.js} +14 -14
- package/dist/{cli-z905tvmm.js → cli-g814jbst.js} +2 -2
- package/dist/{cli-5dsbcjjw.js → cli-ghexzd2d.js} +970 -970
- package/dist/{cli-jvv0g8bh.js → cli-gpt9kf01.js} +15 -15
- package/dist/{cli-rgrfzg8z.js → cli-grt6qv91.js} +380 -380
- package/dist/{cli-wz9115x0.js → cli-gtafvdy0.js} +8 -8
- package/dist/{cli-q5dzzak0.js → cli-gy07xk4s.js} +2 -2
- package/dist/{cli-sy7jk3tx.js → cli-h0djenzm.js} +2 -2
- package/dist/{cli-nrkkknat.js → cli-h37gbjbf.js} +2 -281
- package/dist/{cli-jevgrb4w.js → cli-h39xxnq6.js} +1200 -491
- package/dist/{cli-gz9sbyk3.js → cli-jepmgn7r.js} +1 -1
- package/dist/{cli-ccf9vy7q.js → cli-jmvk6et8.js} +7 -7
- package/dist/{cli-2rk0cx7s.js → cli-jxj92gkt.js} +51 -41
- package/dist/{cli-bqw0mt1n.js → cli-k46t4664.js} +18 -3
- package/dist/{cli-50vbt00w.js → cli-m07313tr.js} +1153 -696
- package/dist/{cli-4j2mrzag.js → cli-mkq1rk7b.js} +1 -1
- package/dist/{cli-1z7048dy.js → cli-mnm7w46e.js} +1 -1
- package/dist/{cli-kd1ck4rx.js → cli-mp9sg4cg.js} +14 -8
- package/dist/{cli-jbcva0xj.js → cli-mrammd8c.js} +60 -35
- package/dist/cli-nanaxrz6.js +27 -0
- package/dist/{cli-p9swy5t3.js → cli-pq2ee5ja.js} +8 -6
- package/dist/{cli-2wadx7p2.js → cli-pt43pdp1.js} +2 -2
- package/dist/{cli-7sgrxg9a.js → cli-q6d0vvey.js} +4 -4
- package/dist/{cli-k9qkf1hw.js → cli-qf9kpsve.js} +9 -9
- package/dist/cli-qh4sqfws.js +15 -0
- package/dist/{cli-e15jhafb.js → cli-qntkxysp.js} +14 -14
- package/dist/{cli-sajgpkqg.js → cli-qs9hhsvb.js} +1723 -325
- package/dist/{cli-z2zcxes1.js → cli-qt5bt3vk.js} +1 -1
- package/dist/{cli-wx82tw1k.js → cli-qtekrty1.js} +3 -3
- package/dist/{cli-g1re8r05.js → cli-rh6f3s9n.js} +3 -3
- package/dist/{cli-n0krnc6d.js → cli-rzhcrw2p.js} +2 -2
- package/dist/{cli-gecy3z2s.js → cli-snw62ze5.js} +4 -4
- package/dist/{cli-n6h8qt8n.js → cli-snz3p4yf.js} +15 -10
- package/dist/{cli-r6kqqbj0.js → cli-tkf8n6cw.js} +11 -11
- package/dist/{cli-4rkfg1wx.js → cli-tkrr24mz.js} +14 -9
- package/dist/{cli-9dr5qzc0.js → cli-tv9f1kyb.js} +54 -43
- package/dist/{cli-gm9cbhbq.js → cli-vtz6yj3v.js} +28 -9
- package/dist/{cli-2f07m0xr.js → cli-wf86d5t7.js} +1 -1
- package/dist/{cli-7zd05xb4.js → cli-whrvct19.js} +45 -45
- package/dist/{cli-ap1czx8f.js → cli-wrrea8xm.js} +3 -3
- package/dist/{cli-57khth04.js → cli-xmyqv00z.js} +120 -4
- package/dist/{cli-cwy5hqbq.js → cli-yjmk7tzc.js} +1 -1
- package/dist/{cli-6pcz9h15.js → cli-zykjrwcx.js} +180 -394
- package/dist/cli.js +45 -45
- package/dist/{codex-adapter-htjkn22b.js → codex-adapter-hsq6mz3m.js} +21 -19
- package/dist/{codex-hook-hq54t9ft.js → codex-hook-8c500gq8.js} +8 -7
- package/dist/{codex-login-z6yhbkmk.js → codex-login-x7603481.js} +3 -3
- package/dist/{codex-session-runner-wjfc7smz.js → codex-session-runner-c1x3x143.js} +15 -13
- package/dist/{commands-xhrfwqsk.js → commands-rwtddtst.js} +11 -9
- package/dist/{db-anvwb22f.js → db-j2b355vz.js} +458 -444
- package/dist/{devin-adapter-v1sarqtw.js → devin-adapter-8qmhqpy3.js} +3 -3
- package/dist/{devtools-2y1r7yqk.js → devtools-j2rnj8w7.js} +4 -4
- package/dist/{e2b-jdkwemv2.js → e2b-znpx78eg.js} +16 -16
- package/dist/{es5-vjgtkgp6.js → es5-fmqrjzy3.js} +2 -2
- package/dist/{event-bus-axn823e9.js → event-bus-n8sb35pw.js} +4 -4
- package/dist/{getMachineId-bsd-6tc9wxdj.js → getMachineId-bsd-wpzbhkm6.js} +4 -4
- package/dist/{getMachineId-darwin-sjt9sgnc.js → getMachineId-darwin-45zabjy0.js} +4 -4
- package/dist/{getMachineId-linux-v5n18y9p.js → getMachineId-linux-warnp5pd.js} +3 -3
- package/dist/{getMachineId-unsupported-yrjyqw3d.js → getMachineId-unsupported-5spent2a.js} +3 -3
- package/dist/{getMachineId-win-w3r8063c.js → getMachineId-win-v4bvcw7a.js} +4 -4
- package/dist/{google-generative-ai-hysrd8qx.js → google-generative-ai-b0wzss55.js} +17 -14
- package/dist/{google-vertex-p5arrga0.js → google-vertex-e8q4dpya.js} +18 -15
- package/dist/{handlers-b9kbc621.js → handlers-hchgrxkh.js} +32 -29
- package/dist/{hook-xkvn6c5h.js → hook-p49egqc0.js} +66 -52
- package/dist/hook-spb00w76.js +34 -0
- package/dist/{http-9xh6ta4r.js → http-nh14kkms.js} +663 -181
- package/dist/index-1qthq7vc.js +6 -0
- package/dist/{index-0g68f0p6.js → index-20xqmn3v.js} +3 -3
- package/dist/{index-vdkr5z2w.js → index-3e03k6e4.js} +114 -114
- package/dist/{index-ywds4812.js → index-4cbyhq2g.js} +43 -41
- package/dist/index-67pzqfrb.js +36 -0
- package/dist/{index-bccrkdkn.js → index-7m8yxkw5.js} +16 -16
- package/dist/{index-eaxyqcmj.js → index-dvsk64sm.js} +163 -83
- package/dist/{index-dqkpnmqm.js → index-e19s2m8k.js} +18 -18
- package/dist/{index-j30k5zxn.js → index-emvxcy98.js} +16 -16
- package/dist/{index-7ndw6ecy.js → index-gqnmr60d.js} +9 -9
- package/dist/{index-9znhar3x.js → index-j02xvjtd.js} +184 -185
- package/dist/{index-1s2442yw.js → index-ns5kksc1.js} +7 -7
- package/dist/{index-dpy2hth8.js → index-pdxc8kfh.js} +71 -71
- package/dist/{index-z1m7pw0v.js → index-ptcqm8bc.js} +107 -107
- package/dist/{index-070v4eyb.js → index-pyp7rexm.js} +5 -6
- package/dist/{index-86znjz1p.js → index-shne41sd.js} +13 -13
- package/dist/{index-2qn2qndv.js → index-t36q2v4t.js} +183 -183
- package/dist/index-tcnvv8w6.js +7 -0
- package/dist/index-w91qbfv1.js +7 -0
- package/dist/{index-fzc0mwvj.js → index-yqweff5n.js} +32 -32
- package/dist/index-yrfphye1.js +39 -0
- package/dist/{keepalive-vc7s2aa6.js → keepalive-9k51nqhc.js} +21 -15
- package/dist/lead-2xq3dxbz.js +88 -0
- package/dist/maintenance-0c0g6nym.js +28 -0
- package/dist/mistral-conversations-2njwdwhj.js +717 -0
- package/dist/{multipart-parser-qaktc7p8.js → multipart-parser-6gftesw0.js} +2 -2
- package/dist/{oauth-refresh-sweep-yecgjpk4.js → oauth-refresh-sweep-273a64r2.js} +14 -12
- package/dist/{onboard-xj0f73f9.js → onboard-tsv9wwhz.js} +12 -12
- package/dist/{openai-codex-responses-5g27pd6f.js → openai-codex-responses-kt84eq86.js} +26 -26
- package/dist/{openai-completions-3vkmfz2a.js → openai-completions-mrypq7qp.js} +17 -16
- package/dist/{openai-responses-dg4t7j7a.js → openai-responses-qhrk21ez.js} +20 -17
- package/dist/{opencode-adapter-1gm38aba.js → opencode-adapter-rar9676j.js} +13 -11
- package/dist/{openrouter-images-g3gm8931.js → openrouter-images-684fysx9.js} +5 -5
- package/dist/{otel-impl-nxg0n0b3.js → otel-impl-wp1mfzd2.js} +752 -537
- package/dist/{photon_rs-ky7dj5qw.js → photon_rs-8dwt2pzy.js} +581 -581
- package/dist/{pi-messages-tqj8q6b9.js → pi-messages-txp9f97r.js} +7 -7
- package/dist/{pi-mono-adapter-4g5kby31.js → pi-mono-adapter-yz47kk8e.js} +1910 -1180
- package/dist/pricing-refresh-jw1yw2fn.js +22 -0
- package/dist/rbac-roles-dg964c8p.js +32 -0
- package/dist/{rbac-roles-1hcxdtg7.js → rbac-roles-p53cg5cv.js} +19 -17
- package/dist/{registry-02cy9z5z.js → registry-mh12y17v.js} +4 -4
- package/dist/render-v2-56vn2rk9.js +36 -0
- package/dist/seed-pricing-52xx6z63.js +19 -0
- package/dist/{setup-46xtgq3c.js → setup-e8gp79sy.js} +7 -7
- package/dist/token-util-zy908s1a.js +6 -0
- package/dist/{token-fxkn2zf2.js → token-xg5711x5.js} +4 -4
- package/dist/worker-s17f1g46.js +88 -0
- package/dist/{x-6mg4kfpe.js → x-xkfh0w0v.js} +5 -5
- package/openapi.json +566 -22
- package/package.json +6 -6
- package/src/be/budget-refusal-notify.ts +14 -7
- package/src/be/db-queries/task-artifacts.ts +182 -0
- package/src/be/db.ts +834 -171
- package/src/be/events.ts +5 -0
- package/src/be/migrations/131_session_logs_created_at_index.sql +2 -0
- package/src/be/migrations/132_multi_runtime_instances.sql +44 -0
- package/src/be/migrations/133_workflow_run_trigger_type.sql +12 -0
- package/src/be/migrations/135_backfill_task_pull_request_attachments.sql +228 -0
- package/src/be/migrations/136_task_requester_provenance.sql +37 -0
- package/src/be/migrations/137_memory_retrieval_composite_index.sql +1 -0
- package/src/be/migrations/runner.ts +17 -11
- package/src/be/multi-runtime.ts +430 -0
- package/src/be/scripts/extract-schema.ts +3 -1
- package/src/be/scripts/typecheck.ts +6 -2
- package/src/be/seed-prompt-templates.ts +25 -2
- package/src/be/seed-skills/index.ts +7 -0
- package/src/be/steering.ts +1 -1
- package/src/be/swarm-config-guard.ts +18 -0
- package/src/commands/credential-wait.ts +54 -0
- package/src/commands/onboard/steps/core-credentials.tsx +1 -1
- package/src/commands/onboard/steps/custom-templates.tsx +1 -1
- package/src/commands/onboard/steps/harness-credentials.tsx +1 -1
- package/src/commands/onboard/steps/health-check.tsx +1 -1
- package/src/commands/onboard/steps/start.tsx +1 -1
- package/src/commands/profile-sync-audit.ts +56 -0
- package/src/commands/profile-sync.ts +287 -15
- package/src/commands/provider-credentials.ts +46 -19
- package/src/commands/runner.ts +199 -33
- package/src/commands/templates.ts +22 -0
- package/src/github/handlers.ts +55 -9
- package/src/heartbeat/heartbeat.ts +109 -17
- package/src/hooks/hook.ts +49 -33
- package/src/http/active-sessions.ts +11 -1
- package/src/http/agents.ts +261 -30
- package/src/http/all-routes.ts +1 -0
- package/src/http/config.ts +13 -2
- package/src/http/core.ts +102 -4
- package/src/http/db-query-bounded.ts +313 -0
- package/src/http/db-query-shared.ts +249 -0
- package/src/http/db-query.ts +54 -42
- package/src/http/events.ts +2 -0
- package/src/http/index.ts +23 -2
- package/src/http/mcp-bridge.ts +37 -3
- package/src/http/mcp.ts +12 -0
- package/src/http/memory.ts +13 -2
- package/src/http/openapi.ts +1 -0
- package/src/http/poll.ts +70 -27
- package/src/http/prompt-templates.ts +36 -13
- package/src/http/route-def.ts +43 -9
- package/src/http/schedules.ts +2 -2
- package/src/http/scripts.ts +10 -1
- package/src/http/session-data.ts +44 -0
- package/src/http/tasks.ts +2 -2
- package/src/http/users.ts +74 -52
- package/src/http/webhooks.ts +5 -2
- package/src/http/workflows.ts +1 -4
- package/src/integrations/kapso/inbound.ts +1 -1
- package/src/jira/outbound.ts +39 -8
- package/src/jira/webhook-lifecycle.ts +13 -2
- package/src/linear/outbound.ts +43 -10
- package/src/oauth/keepalive.ts +13 -2
- package/src/prompts/base-prompt.ts +1 -1
- package/src/prompts/default-drift.ts +21 -0
- package/src/prompts/session-templates.ts +56 -7
- package/src/providers/claude-adapter.ts +6 -0
- package/src/providers/codex-adapter.ts +6 -0
- package/src/providers/opencode-adapter.ts +6 -0
- package/src/providers/pi-mono-adapter.ts +8 -0
- package/src/providers/pricing-sources.md +24 -0
- package/src/queue-stall-alarm.ts +216 -0
- package/src/rbac/legacy-policy.ts +3 -0
- package/src/rbac/permissions.ts +12 -0
- package/src/scheduler/scheduler.ts +7 -0
- package/src/script-workflows/executor.ts +2 -1
- package/src/scripts-runtime/executors/native.ts +2 -1
- package/src/scripts-runtime/executors/types.ts +5 -0
- package/src/scripts-runtime/loader.ts +5 -0
- package/src/scripts-runtime/sdk-allowlist.ts +3 -0
- package/src/scripts-runtime/swarm-config.ts +8 -0
- package/src/scripts-runtime/swarm-sdk.ts +7 -0
- package/src/scripts-runtime/types/stdlib.d.ts +4 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +4 -0
- package/src/server.ts +6 -0
- package/src/slack/channel-join.ts +22 -3
- package/src/slack/channel-lifecycle.ts +114 -0
- package/src/tests/budget-claim-gate.test.ts +20 -0
- package/src/tests/claude-adapter.test.ts +32 -0
- package/src/tests/codex-adapter.test.ts +30 -0
- package/src/tests/create-task-validation.test.ts +128 -0
- package/src/tests/credential-wait.test.ts +67 -1
- package/src/tests/db-query.test.ts +711 -2
- package/src/tests/heartbeat-checklist.test.ts +28 -0
- package/src/tests/http-api-integration.test.ts +81 -0
- package/src/tests/http-users.test.ts +166 -1
- package/src/tests/identity-field-budget.test.ts +176 -0
- package/src/tests/mcp-tools-user.test.ts +34 -0
- package/src/tests/mcp-user-route.test.ts +17 -0
- package/src/tests/metrics-http.test.ts +44 -0
- package/src/tests/migration-failure.test.ts +86 -0
- package/src/tests/multi-runtime-registration.test.ts +2810 -0
- package/src/tests/openapi-response-contract.test.ts +24 -0
- package/src/tests/openapi-route-headers.test.ts +83 -0
- package/src/tests/opencode-adapter.test.ts +40 -0
- package/src/tests/outbound-listener-rejection.test.ts +138 -0
- package/src/tests/pi-mono-adapter.test.ts +98 -0
- package/src/tests/preload.ts +2 -0
- package/src/tests/profile-sync-warning.test.ts +277 -0
- package/src/tests/profile-sync.test.ts +232 -6
- package/src/tests/prompt-template-resolver.test.ts +177 -6
- package/src/tests/prompt-template-session.test.ts +39 -3
- package/src/tests/queue-stall-alarm.test.ts +226 -0
- package/src/tests/rbac-charact-slack.test.ts +29 -0
- package/src/tests/rbac-engine.test.ts +3 -0
- package/src/tests/requester-comms.test.ts +32 -0
- package/src/tests/runner-requester-profile.test.ts +38 -0
- package/src/tests/schedule-target-type.test.ts +38 -0
- package/src/tests/script-connections.test.ts +13 -1
- package/src/tests/scripts-runtime-identity.test.ts +375 -0
- package/src/tests/scripts-runtime.test.ts +4 -3
- package/src/tests/sdk-allowlist.test.ts +47 -0
- package/src/tests/send-task-requested-by.test.ts +9 -0
- package/src/tests/session-costs.test.ts +506 -1
- package/src/tests/shutdown-error-scrubbing.test.ts +92 -0
- package/src/tests/slack-channel-lifecycle.test.ts +241 -0
- package/src/tests/slack-render-v2.test.ts +43 -0
- package/src/tests/steering-core.test.ts +28 -0
- package/src/tests/swarm-config-reserved-keys.test.ts +22 -0
- package/src/tests/task-artifacts.test.ts +386 -0
- package/src/tests/task-attachments-schema.test.ts +17 -1
- package/src/tests/task-completion-idempotency.test.ts +57 -0
- package/src/tests/task-pull-request-backfill-migration.test.ts +321 -0
- package/src/tests/tool-annotations.test.ts +4 -0
- package/src/tests/update-profile-api.test.ts +67 -39
- package/src/tests/update-profile-auth.test.ts +48 -4
- package/src/tests/user-attribution-migration.test.ts +54 -0
- package/src/tests/user-identity.test.ts +72 -0
- package/src/tests/workflow-async-v2.test.ts +39 -1
- package/src/tests/workflow-http-v2.test.ts +3 -2
- package/src/tests/workflow-mcp-trigger-schema.test.ts +52 -3
- package/src/tests/workflow-retry-v2.test.ts +45 -1
- package/src/tools/db-query.ts +18 -8
- package/src/tools/get-task-details.ts +24 -3
- package/src/tools/manage-user.ts +36 -3
- package/src/tools/poll-task.ts +93 -14
- package/src/tools/script-common.ts +5 -0
- package/src/tools/send-task.ts +1 -4
- package/src/tools/slack-archive-channel.ts +70 -0
- package/src/tools/slack-create-channel.ts +74 -0
- package/src/tools/slack-invite-to-channel.ts +78 -0
- package/src/tools/store-progress.ts +13 -2
- package/src/tools/swarm-config/delete-config.ts +9 -0
- package/src/tools/swarm-config/set-config.ts +3 -2
- package/src/tools/task-action.ts +30 -0
- package/src/tools/task-tool-ctx.ts +8 -1
- package/src/tools/tool-config.ts +4 -1
- package/src/tools/update-profile.ts +16 -21
- package/src/tools/utils.ts +5 -0
- package/src/tools/workflows/trigger-workflow.ts +7 -1
- package/src/types.ts +165 -1
- package/src/utils/github-pull-request.ts +76 -0
- package/src/utils/identity-field-budget.ts +73 -0
- package/src/utils/multi-runtime.ts +20 -0
- package/src/utils/requester-comms.ts +24 -0
- package/src/workflows/engine.ts +22 -2
- package/src/workflows/resume.ts +19 -11
- package/src/workflows/retry-poller.ts +1 -0
- package/src/workflows/triggers.ts +4 -0
- package/templates/skills/db-query-guidance/config.json +14 -0
- package/templates/skills/db-query-guidance/content.md +57 -0
- package/dist/app-5da78bd4.js +0 -26
- package/dist/cli-3te4jdkm.js +0 -225
- package/dist/cli-bmze986d.js +0 -7
- package/dist/cli-kh3ba2zf.js +0 -607
- package/dist/hook-cgk4wxmx.js +0 -31
- package/dist/index-25wjsdv2.js +0 -34
- package/dist/index-76at2ymp.js +0 -7
- package/dist/index-hase6zbe.js +0 -6
- package/dist/index-vg4snay4.js +0 -36
- package/dist/index-vy8edt27.js +0 -7
- package/dist/lead-r2yqfmx7.js +0 -85
- package/dist/maintenance-mw70k468.js +0 -26
- package/dist/mistral-conversations-81fwav0j.js +0 -30578
- package/dist/otel-nqa12wf3.js +0 -3149
- package/dist/pricing-refresh-2cn6effr.js +0 -20
- package/dist/rbac-roles-vynday5g.js +0 -30
- package/dist/render-v2-tc0bh8kk.js +0 -34
- package/dist/seed-pricing-8kceb43f.js +0 -17
- package/dist/token-util-pqyc8kng.js +0 -6
- package/dist/worker-qrbz6hmv.js +0 -85
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isMultiRuntimeEnabled
|
|
3
|
+
} from "./cli-qh4sqfws.js";
|
|
1
4
|
import {
|
|
2
5
|
taskAttachmentDisplayUrl
|
|
3
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-5tnr64pm.js";
|
|
4
7
|
import {
|
|
5
8
|
buildRoutingAffinityFromAgent,
|
|
6
9
|
createTaskExtended,
|
|
@@ -9,20 +12,206 @@ import {
|
|
|
9
12
|
getDb,
|
|
10
13
|
getDependentTasks,
|
|
11
14
|
getLeadAgent,
|
|
15
|
+
getSwarmConfigs,
|
|
12
16
|
getTaskAttachments,
|
|
13
17
|
getTaskById,
|
|
14
18
|
hasNonTerminalRerouteDecisionChild,
|
|
15
19
|
init_date_utils,
|
|
16
20
|
init_db,
|
|
17
|
-
|
|
18
|
-
normalizeDateRequired
|
|
19
|
-
|
|
21
|
+
init_templates,
|
|
22
|
+
normalizeDateRequired,
|
|
23
|
+
updateAgentMaxTasks,
|
|
24
|
+
updateAgentStatus,
|
|
25
|
+
upsertSwarmConfig
|
|
26
|
+
} from "./cli-m07313tr.js";
|
|
20
27
|
import {
|
|
21
|
-
init_env_flag,
|
|
22
28
|
init_resolver,
|
|
23
|
-
isEnvFlagEnabled,
|
|
24
29
|
resolveTemplate
|
|
25
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-2wv4kj0e.js";
|
|
31
|
+
import {
|
|
32
|
+
init_env_flag,
|
|
33
|
+
isEnvFlagEnabled
|
|
34
|
+
} from "./cli-nanaxrz6.js";
|
|
35
|
+
|
|
36
|
+
// src/be/multi-runtime.ts
|
|
37
|
+
init_db();
|
|
38
|
+
var AGENT_MAX_TASKS_CONFIG_KEY = "AGENT_MAX_TASKS";
|
|
39
|
+
function parseAgentMaxTasksValue(raw) {
|
|
40
|
+
const str = raw.trim();
|
|
41
|
+
if (!/^\d+$/.test(str))
|
|
42
|
+
return null;
|
|
43
|
+
const value = Number(str);
|
|
44
|
+
return value >= 1 && value <= 100 ? value : null;
|
|
45
|
+
}
|
|
46
|
+
function defaultMaxTasksForAgent(agent) {
|
|
47
|
+
return agent.isLead ? 2 : 1;
|
|
48
|
+
}
|
|
49
|
+
function getAgentMaxTasksConfig(agentId) {
|
|
50
|
+
return getSwarmConfigs({ scope: "agent", scopeId: agentId, key: AGENT_MAX_TASKS_CONFIG_KEY })[0] ?? null;
|
|
51
|
+
}
|
|
52
|
+
function reconcileAgentMaxTasksPolicy(agentId) {
|
|
53
|
+
const agent = getAgentById(agentId);
|
|
54
|
+
if (!agent)
|
|
55
|
+
return;
|
|
56
|
+
const existing = getAgentMaxTasksConfig(agentId);
|
|
57
|
+
if (existing) {
|
|
58
|
+
const authoritative = parseAgentMaxTasksValue(existing.value);
|
|
59
|
+
if (authoritative !== null && authoritative !== (agent.maxTasks ?? 1)) {
|
|
60
|
+
updateAgentMaxTasks(agentId, authoritative);
|
|
61
|
+
}
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
upsertSwarmConfig({
|
|
65
|
+
scope: "agent",
|
|
66
|
+
scopeId: agentId,
|
|
67
|
+
key: AGENT_MAX_TASKS_CONFIG_KEY,
|
|
68
|
+
value: String(agent.maxTasks ?? defaultMaxTasksForAgent(agent)),
|
|
69
|
+
description: "Logical agent max-tasks policy (seeded from agents.maxTasks)"
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function resetAgentMaxTasksMirror(agentId) {
|
|
73
|
+
const agent = getAgentById(agentId);
|
|
74
|
+
if (!agent)
|
|
75
|
+
return;
|
|
76
|
+
updateAgentMaxTasks(agentId, defaultMaxTasksForAgent(agent));
|
|
77
|
+
}
|
|
78
|
+
function upsertSwarmConfigWithPolicyMirror(data) {
|
|
79
|
+
const scopeId = data.scope === "agent" ? data.scopeId : null;
|
|
80
|
+
if (!scopeId || data.key !== AGENT_MAX_TASKS_CONFIG_KEY) {
|
|
81
|
+
return upsertSwarmConfig(data);
|
|
82
|
+
}
|
|
83
|
+
return getDb().transaction(() => {
|
|
84
|
+
const row = upsertSwarmConfig(data);
|
|
85
|
+
const value = parseAgentMaxTasksValue(data.value);
|
|
86
|
+
if (value !== null)
|
|
87
|
+
updateAgentMaxTasks(scopeId, value);
|
|
88
|
+
return row;
|
|
89
|
+
})();
|
|
90
|
+
}
|
|
91
|
+
function rowToRuntimeInstance(row) {
|
|
92
|
+
let metadata = null;
|
|
93
|
+
if (row.metadata) {
|
|
94
|
+
try {
|
|
95
|
+
metadata = JSON.parse(row.metadata);
|
|
96
|
+
} catch {
|
|
97
|
+
metadata = null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
id: row.id,
|
|
102
|
+
agentId: row.agent_id,
|
|
103
|
+
status: row.status,
|
|
104
|
+
reportedSlots: row.reported_slots,
|
|
105
|
+
credentialReady: row.credential_ready === null ? null : row.credential_ready === 1,
|
|
106
|
+
metadata,
|
|
107
|
+
lastSeenAt: row.last_seen_at,
|
|
108
|
+
createdAt: row.created_at,
|
|
109
|
+
updatedAt: row.updated_at
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function runtimeStaleThresholdMinutes() {
|
|
113
|
+
return Number(process.env.RUNTIME_STALE_THRESHOLD_MIN) || 5;
|
|
114
|
+
}
|
|
115
|
+
function runtimeLivenessCutoff() {
|
|
116
|
+
return new Date(Date.now() - runtimeStaleThresholdMinutes() * 60 * 1000).toISOString();
|
|
117
|
+
}
|
|
118
|
+
function upsertRuntimeInstance(instance) {
|
|
119
|
+
const metadataJson = instance.metadata ? JSON.stringify(instance.metadata) : null;
|
|
120
|
+
const row = getDb().prepare(`INSERT INTO runtime_instances (id, agent_id, status, reported_slots, metadata)
|
|
121
|
+
VALUES (?, ?, 'active', ?, ?)
|
|
122
|
+
ON CONFLICT(id) DO UPDATE SET
|
|
123
|
+
status = 'active',
|
|
124
|
+
reported_slots = excluded.reported_slots,
|
|
125
|
+
metadata = COALESCE(excluded.metadata, runtime_instances.metadata),
|
|
126
|
+
last_seen_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now'),
|
|
127
|
+
updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
128
|
+
WHERE runtime_instances.agent_id = excluded.agent_id
|
|
129
|
+
RETURNING *`).get(instance.id, instance.agentId, instance.reportedSlots, metadataJson);
|
|
130
|
+
return row ? rowToRuntimeInstance(row) : null;
|
|
131
|
+
}
|
|
132
|
+
function getRuntimeInstanceById(id) {
|
|
133
|
+
const row = getDb().prepare("SELECT * FROM runtime_instances WHERE id = ?").get(id);
|
|
134
|
+
return row ? rowToRuntimeInstance(row) : null;
|
|
135
|
+
}
|
|
136
|
+
function touchRuntimeInstance(id, agentId) {
|
|
137
|
+
const result = getDb().prepare(`UPDATE runtime_instances
|
|
138
|
+
SET last_seen_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now'),
|
|
139
|
+
updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
140
|
+
WHERE id = ? AND agent_id = ? AND status = 'active' AND last_seen_at >= ?`).run(id, agentId, runtimeLivenessCutoff());
|
|
141
|
+
return result.changes > 0;
|
|
142
|
+
}
|
|
143
|
+
function markRuntimeInstanceOffline(id, agentId) {
|
|
144
|
+
const row = getDb().prepare(`UPDATE runtime_instances
|
|
145
|
+
SET status = 'offline', updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
146
|
+
WHERE id = ? AND agent_id = ? RETURNING *`).get(id, agentId);
|
|
147
|
+
return row ? rowToRuntimeInstance(row) : null;
|
|
148
|
+
}
|
|
149
|
+
function countActiveRuntimeInstancesForAgent(agentId) {
|
|
150
|
+
const result = getDb().prepare(`SELECT COUNT(*) as count FROM runtime_instances
|
|
151
|
+
WHERE agent_id = ? AND status = 'active' AND last_seen_at >= ?`).get(agentId, runtimeLivenessCutoff());
|
|
152
|
+
return result?.count ?? 0;
|
|
153
|
+
}
|
|
154
|
+
function listRuntimeInstancesForAgent(agentId) {
|
|
155
|
+
const rows = getDb().prepare(`SELECT *, (status = 'active' AND last_seen_at >= ?) AS is_live
|
|
156
|
+
FROM runtime_instances
|
|
157
|
+
WHERE agent_id = ?
|
|
158
|
+
ORDER BY created_at ASC, id ASC`).all(runtimeLivenessCutoff(), agentId);
|
|
159
|
+
return rows.map((row) => ({ ...rowToRuntimeInstance(row), isLive: row.is_live === 1 }));
|
|
160
|
+
}
|
|
161
|
+
function setRuntimeCredentialReady(id, agentId, ready) {
|
|
162
|
+
const result = getDb().prepare(`UPDATE runtime_instances
|
|
163
|
+
SET credential_ready = ?, updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
164
|
+
WHERE id = ? AND agent_id = ? AND status = 'active' AND last_seen_at >= ?`).run(ready ? 1 : 0, id, agentId, runtimeLivenessCutoff());
|
|
165
|
+
return result.changes > 0;
|
|
166
|
+
}
|
|
167
|
+
function hasReadyLiveRuntime(agentId) {
|
|
168
|
+
const row = getDb().prepare(`SELECT COUNT(*) c FROM runtime_instances
|
|
169
|
+
WHERE agent_id = ? AND status = 'active' AND last_seen_at >= ?
|
|
170
|
+
AND (credential_ready IS NULL OR credential_ready = 1)`).get(agentId, runtimeLivenessCutoff());
|
|
171
|
+
return (row?.c ?? 0) > 0;
|
|
172
|
+
}
|
|
173
|
+
function reconcileAgentStatusFromRuntimes(agentId) {
|
|
174
|
+
const agent = getAgentById(agentId);
|
|
175
|
+
if (!agent)
|
|
176
|
+
return;
|
|
177
|
+
if (countActiveRuntimeInstancesForAgent(agentId) === 0) {
|
|
178
|
+
if (agent.status !== "offline")
|
|
179
|
+
updateAgentStatus(agentId, "offline");
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
if (!hasReadyLiveRuntime(agentId)) {
|
|
183
|
+
if (agent.status !== "waiting_for_credentials") {
|
|
184
|
+
updateAgentStatus(agentId, "waiting_for_credentials");
|
|
185
|
+
}
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
const next = getActiveTaskCount(agentId) > 0 ? "busy" : "idle";
|
|
189
|
+
if (agent.status !== next)
|
|
190
|
+
updateAgentStatus(agentId, next);
|
|
191
|
+
}
|
|
192
|
+
function agentsWithLiveRuntime() {
|
|
193
|
+
const rows = getDb().prepare(`SELECT DISTINCT agent_id FROM runtime_instances
|
|
194
|
+
WHERE status = 'active' AND last_seen_at >= ?`).all(runtimeLivenessCutoff());
|
|
195
|
+
return new Set(rows.map((r) => r.agent_id));
|
|
196
|
+
}
|
|
197
|
+
function expireStaleRuntimeInstances() {
|
|
198
|
+
if (!isMultiRuntimeEnabled()) {
|
|
199
|
+
return { expired: 0, agentsOffline: 0, pruned: 0 };
|
|
200
|
+
}
|
|
201
|
+
return getDb().transaction(() => {
|
|
202
|
+
const cutoff = runtimeLivenessCutoff();
|
|
203
|
+
const stale = getDb().prepare(`SELECT id, agent_id FROM runtime_instances
|
|
204
|
+
WHERE status = 'active' AND last_seen_at < ?`).all(cutoff);
|
|
205
|
+
const pruned = getDb().prepare("DELETE FROM runtime_instances WHERE last_seen_at < ?").run(cutoff).changes;
|
|
206
|
+
let agentsOffline = 0;
|
|
207
|
+
for (const agentId of new Set(stale.map((r) => r.agent_id))) {
|
|
208
|
+
reconcileAgentStatusFromRuntimes(agentId);
|
|
209
|
+
if (getAgentById(agentId)?.status === "offline")
|
|
210
|
+
agentsOffline++;
|
|
211
|
+
}
|
|
212
|
+
return { expired: stale.length, agentsOffline, pruned };
|
|
213
|
+
})();
|
|
214
|
+
}
|
|
26
215
|
|
|
27
216
|
// src/be/db-queries/tracker.ts
|
|
28
217
|
init_date_utils();
|
|
@@ -387,4 +576,4 @@ function createPoolStarvationDecisionTask(args) {
|
|
|
387
576
|
return { kind: "created", task: created };
|
|
388
577
|
}
|
|
389
578
|
|
|
390
|
-
export { getTrackerSync, getTrackerSyncByExternalId, createTrackerSyncIfAbsent, updateTrackerSyncSwarmId, repointTrackerSyncBySwarmId, createTrackerSync, updateTrackerSync, deleteTrackerSync, hasTrackerDelivery, markTrackerDelivery, getAllTrackerSyncs, createTrackerAgentMapping, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, getResumeGeneration, getNextResumeGeneration, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask };
|
|
579
|
+
export { AGENT_MAX_TASKS_CONFIG_KEY, reconcileAgentMaxTasksPolicy, resetAgentMaxTasksMirror, upsertSwarmConfigWithPolicyMirror, runtimeStaleThresholdMinutes, upsertRuntimeInstance, getRuntimeInstanceById, touchRuntimeInstance, markRuntimeInstanceOffline, countActiveRuntimeInstancesForAgent, listRuntimeInstancesForAgent, setRuntimeCredentialReady, reconcileAgentStatusFromRuntimes, agentsWithLiveRuntime, expireStaleRuntimeInstances, getTrackerSync, getTrackerSyncByExternalId, createTrackerSyncIfAbsent, updateTrackerSyncSwarmId, repointTrackerSyncBySwarmId, createTrackerSync, updateTrackerSync, deleteTrackerSync, hasTrackerDelivery, markTrackerDelivery, getAllTrackerSyncs, createTrackerAgentMapping, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, getResumeGeneration, getNextResumeGeneration, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask };
|
|
@@ -2,21 +2,22 @@ import {
|
|
|
2
2
|
getExecutorRegistry,
|
|
3
3
|
handleScheduleTrigger,
|
|
4
4
|
startWorkflowExecution
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-mrammd8c.js";
|
|
6
6
|
import {
|
|
7
7
|
buildScriptCredentialBindings,
|
|
8
8
|
getScript,
|
|
9
9
|
getScriptApiConnectionDescriptors,
|
|
10
10
|
getScriptMcpConnectionDescriptors,
|
|
11
11
|
runScript
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-e07exmsb.js";
|
|
13
13
|
import {
|
|
14
14
|
createTaskWithSiblingAwareness
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-wf86d5t7.js";
|
|
16
16
|
import {
|
|
17
17
|
getDb,
|
|
18
18
|
getDueScheduledTasks,
|
|
19
19
|
getScheduledTaskById,
|
|
20
|
+
getUserById,
|
|
20
21
|
getWorkflow,
|
|
21
22
|
init_context_key,
|
|
22
23
|
init_db,
|
|
@@ -24,20 +25,20 @@ import {
|
|
|
24
25
|
scheduleContextKey,
|
|
25
26
|
telemetry,
|
|
26
27
|
updateScheduledTask
|
|
27
|
-
} from "./cli-
|
|
28
|
+
} from "./cli-m07313tr.js";
|
|
28
29
|
import {
|
|
29
30
|
__commonJS,
|
|
30
31
|
__require,
|
|
31
32
|
__toESM
|
|
32
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-pq2ee5ja.js";
|
|
33
34
|
|
|
34
35
|
// node_modules/cron-parser/dist/fields/types.js
|
|
35
|
-
var require_types = __commonJS((exports)
|
|
36
|
+
var require_types = __commonJS(function(exports) {
|
|
36
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
38
|
});
|
|
38
39
|
|
|
39
40
|
// node_modules/cron-parser/dist/fields/CronField.js
|
|
40
|
-
var require_CronField = __commonJS((exports)
|
|
41
|
+
var require_CronField = __commonJS(function(exports) {
|
|
41
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
43
|
exports.CronField = undefined;
|
|
43
44
|
|
|
@@ -142,7 +143,7 @@ var require_CronField = __commonJS((exports) => {
|
|
|
142
143
|
});
|
|
143
144
|
|
|
144
145
|
// node_modules/cron-parser/dist/fields/CronDayOfMonth.js
|
|
145
|
-
var require_CronDayOfMonth = __commonJS((exports)
|
|
146
|
+
var require_CronDayOfMonth = __commonJS(function(exports) {
|
|
146
147
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
147
148
|
exports.CronDayOfMonth = undefined;
|
|
148
149
|
var CronField_1 = require_CronField();
|
|
@@ -175,7 +176,7 @@ var require_CronDayOfMonth = __commonJS((exports) => {
|
|
|
175
176
|
});
|
|
176
177
|
|
|
177
178
|
// node_modules/cron-parser/dist/fields/CronDayOfWeek.js
|
|
178
|
-
var require_CronDayOfWeek = __commonJS((exports)
|
|
179
|
+
var require_CronDayOfWeek = __commonJS(function(exports) {
|
|
179
180
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
180
181
|
exports.CronDayOfWeek = undefined;
|
|
181
182
|
var CronField_1 = require_CronField();
|
|
@@ -211,7 +212,7 @@ var require_CronDayOfWeek = __commonJS((exports) => {
|
|
|
211
212
|
});
|
|
212
213
|
|
|
213
214
|
// node_modules/cron-parser/dist/fields/CronHour.js
|
|
214
|
-
var require_CronHour = __commonJS((exports)
|
|
215
|
+
var require_CronHour = __commonJS(function(exports) {
|
|
215
216
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
216
217
|
exports.CronHour = undefined;
|
|
217
218
|
var CronField_1 = require_CronField();
|
|
@@ -241,7 +242,7 @@ var require_CronHour = __commonJS((exports) => {
|
|
|
241
242
|
});
|
|
242
243
|
|
|
243
244
|
// node_modules/cron-parser/dist/fields/CronMinute.js
|
|
244
|
-
var require_CronMinute = __commonJS((exports)
|
|
245
|
+
var require_CronMinute = __commonJS(function(exports) {
|
|
245
246
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
246
247
|
exports.CronMinute = undefined;
|
|
247
248
|
var CronField_1 = require_CronField();
|
|
@@ -271,7 +272,7 @@ var require_CronMinute = __commonJS((exports) => {
|
|
|
271
272
|
});
|
|
272
273
|
|
|
273
274
|
// node_modules/luxon/build/node/luxon.js
|
|
274
|
-
var require_luxon = __commonJS((exports)
|
|
275
|
+
var require_luxon = __commonJS(function(exports) {
|
|
275
276
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
276
277
|
|
|
277
278
|
class LuxonError extends Error {
|
|
@@ -5139,7 +5140,7 @@ var require_luxon = __commonJS((exports) => {
|
|
|
5139
5140
|
});
|
|
5140
5141
|
|
|
5141
5142
|
// node_modules/cron-parser/dist/CronDate.js
|
|
5142
|
-
var require_CronDate = __commonJS((exports)
|
|
5143
|
+
var require_CronDate = __commonJS(function(exports) {
|
|
5143
5144
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5144
5145
|
exports.CronDate = exports.DAYS_IN_MONTH = exports.DateMathOp = exports.TimeUnit = undefined;
|
|
5145
5146
|
var luxon_1 = require_luxon();
|
|
@@ -5406,7 +5407,7 @@ var require_CronDate = __commonJS((exports) => {
|
|
|
5406
5407
|
});
|
|
5407
5408
|
|
|
5408
5409
|
// node_modules/cron-parser/dist/fields/CronMonth.js
|
|
5409
|
-
var require_CronMonth = __commonJS((exports)
|
|
5410
|
+
var require_CronMonth = __commonJS(function(exports) {
|
|
5410
5411
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5411
5412
|
exports.CronMonth = undefined;
|
|
5412
5413
|
var CronDate_1 = require_CronDate();
|
|
@@ -5440,7 +5441,7 @@ var require_CronMonth = __commonJS((exports) => {
|
|
|
5440
5441
|
});
|
|
5441
5442
|
|
|
5442
5443
|
// node_modules/cron-parser/dist/fields/CronSecond.js
|
|
5443
|
-
var require_CronSecond = __commonJS((exports)
|
|
5444
|
+
var require_CronSecond = __commonJS(function(exports) {
|
|
5444
5445
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5445
5446
|
exports.CronSecond = undefined;
|
|
5446
5447
|
var CronField_1 = require_CronField();
|
|
@@ -5470,7 +5471,7 @@ var require_CronSecond = __commonJS((exports) => {
|
|
|
5470
5471
|
});
|
|
5471
5472
|
|
|
5472
5473
|
// node_modules/cron-parser/dist/fields/index.js
|
|
5473
|
-
var require_fields = __commonJS((exports)
|
|
5474
|
+
var require_fields = __commonJS(function(exports) {
|
|
5474
5475
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
5475
5476
|
if (k2 === undefined)
|
|
5476
5477
|
k2 = k;
|
|
@@ -5503,7 +5504,7 @@ var require_fields = __commonJS((exports) => {
|
|
|
5503
5504
|
});
|
|
5504
5505
|
|
|
5505
5506
|
// node_modules/cron-parser/dist/CronFieldCollection.js
|
|
5506
|
-
var require_CronFieldCollection = __commonJS((exports)
|
|
5507
|
+
var require_CronFieldCollection = __commonJS(function(exports) {
|
|
5507
5508
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5508
5509
|
exports.CronFieldCollection = undefined;
|
|
5509
5510
|
var fields_1 = require_fields();
|
|
@@ -5723,7 +5724,7 @@ var require_CronFieldCollection = __commonJS((exports) => {
|
|
|
5723
5724
|
});
|
|
5724
5725
|
|
|
5725
5726
|
// node_modules/cron-parser/dist/CronExpression.js
|
|
5726
|
-
var require_CronExpression = __commonJS((exports)
|
|
5727
|
+
var require_CronExpression = __commonJS(function(exports) {
|
|
5727
5728
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5728
5729
|
exports.CronExpression = exports.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE = exports.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE = undefined;
|
|
5729
5730
|
var CronDate_1 = require_CronDate();
|
|
@@ -5961,7 +5962,7 @@ var require_CronExpression = __commonJS((exports) => {
|
|
|
5961
5962
|
});
|
|
5962
5963
|
|
|
5963
5964
|
// node_modules/cron-parser/dist/utils/random.js
|
|
5964
|
-
var require_random = __commonJS((exports)
|
|
5965
|
+
var require_random = __commonJS(function(exports) {
|
|
5965
5966
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5966
5967
|
exports.seededRandom = seededRandom;
|
|
5967
5968
|
function xfnv1a(str) {
|
|
@@ -5987,7 +5988,7 @@ var require_random = __commonJS((exports) => {
|
|
|
5987
5988
|
});
|
|
5988
5989
|
|
|
5989
5990
|
// node_modules/cron-parser/dist/CronExpressionParser.js
|
|
5990
|
-
var require_CronExpressionParser = __commonJS((exports)
|
|
5991
|
+
var require_CronExpressionParser = __commonJS(function(exports) {
|
|
5991
5992
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5992
5993
|
exports.CronExpressionParser = exports.DayOfWeek = exports.Months = exports.CronUnit = exports.PredefinedExpressions = undefined;
|
|
5993
5994
|
var CronFieldCollection_1 = require_CronFieldCollection();
|
|
@@ -6254,7 +6255,7 @@ var require_CronExpressionParser = __commonJS((exports) => {
|
|
|
6254
6255
|
});
|
|
6255
6256
|
|
|
6256
6257
|
// node_modules/cron-parser/dist/CronFileParser.js
|
|
6257
|
-
var require_CronFileParser = __commonJS((exports)
|
|
6258
|
+
var require_CronFileParser = __commonJS(function(exports) {
|
|
6258
6259
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
6259
6260
|
if (k2 === undefined)
|
|
6260
6261
|
k2 = k;
|
|
@@ -6354,7 +6355,7 @@ var require_CronFileParser = __commonJS((exports) => {
|
|
|
6354
6355
|
});
|
|
6355
6356
|
|
|
6356
6357
|
// node_modules/cron-parser/dist/index.js
|
|
6357
|
-
var require_dist = __commonJS((exports)
|
|
6358
|
+
var require_dist = __commonJS(function(exports) {
|
|
6358
6359
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
6359
6360
|
if (k2 === undefined)
|
|
6360
6361
|
k2 = k;
|
|
@@ -6902,7 +6903,13 @@ async function executeScheduleScript(schedule) {
|
|
|
6902
6903
|
throw new Error(output.stderr || `Script '${schedule.scriptName}' exited with code ${output.exitCode}${output.error ? ` (${output.error})` : ""}`);
|
|
6903
6904
|
}
|
|
6904
6905
|
}
|
|
6906
|
+
function withoutDeletedRequester(schedule) {
|
|
6907
|
+
if (!schedule.createdBy || getUserById(schedule.createdBy))
|
|
6908
|
+
return schedule;
|
|
6909
|
+
return { ...schedule, createdBy: undefined };
|
|
6910
|
+
}
|
|
6905
6911
|
async function dispatchScheduleTarget(schedule, extraTags = []) {
|
|
6912
|
+
schedule = withoutDeletedRequester(schedule);
|
|
6906
6913
|
switch (schedule.targetType) {
|
|
6907
6914
|
case "workflow": {
|
|
6908
6915
|
if (!schedule.workflowId) {
|
|
@@ -1,19 +1,122 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IDENTITY_FIELD_BUDGETS,
|
|
3
|
+
init_identity_field_budget,
|
|
4
|
+
init_templates
|
|
5
|
+
} from "./cli-34w2584r.js";
|
|
6
|
+
import {
|
|
7
|
+
init_resolver,
|
|
8
|
+
resolveTemplateAsync
|
|
9
|
+
} from "./cli-2wv4kj0e.js";
|
|
1
10
|
import {
|
|
2
11
|
MAX_PROFILE_FILE_LENGTH,
|
|
3
12
|
init_constants
|
|
4
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-a1rrkrb4.js";
|
|
5
14
|
import {
|
|
6
15
|
init_secret_scrubber,
|
|
7
16
|
scrubSecrets
|
|
8
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-mkq1rk7b.js";
|
|
9
18
|
import {
|
|
10
19
|
__esm
|
|
11
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-pq2ee5ja.js";
|
|
12
21
|
|
|
13
22
|
// src/commands/profile-sync.ts
|
|
14
23
|
function contentSha256(content) {
|
|
15
24
|
return new Bun.CryptoHasher("sha256").update(content).digest("hex");
|
|
16
25
|
}
|
|
26
|
+
async function renderProfileSyncRejectionBanner(event) {
|
|
27
|
+
const data = event.data;
|
|
28
|
+
const field = data?.field;
|
|
29
|
+
const diskSize = data?.diskSize;
|
|
30
|
+
const dbSize = data?.dbSize;
|
|
31
|
+
const budget = data?.budget;
|
|
32
|
+
const delta = data?.delta;
|
|
33
|
+
if (typeof field !== "string" || !(field in PROFILE_FIELD_DETAILS) || typeof diskSize !== "number" || typeof dbSize !== "number" || typeof budget !== "number" || typeof delta !== "number") {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
const details = PROFILE_FIELD_DETAILS[field];
|
|
37
|
+
const result = await resolveTemplateAsync("task.profile_sync_rejection", {
|
|
38
|
+
timestamp: event.createdAt,
|
|
39
|
+
field_label: details.label,
|
|
40
|
+
disk_size: diskSize,
|
|
41
|
+
db_size: dbSize,
|
|
42
|
+
budget,
|
|
43
|
+
delta: delta >= 0 ? `+${delta}` : String(delta),
|
|
44
|
+
event_id: event.id,
|
|
45
|
+
recovery_guidance: details.recoveryGuidance
|
|
46
|
+
});
|
|
47
|
+
return result.skipped ? null : result.text;
|
|
48
|
+
}
|
|
49
|
+
async function fetchProfileSyncRejectionBanner(config, fetchImpl = fetch, readFile = readFileIfExists) {
|
|
50
|
+
try {
|
|
51
|
+
const responses = await Promise.all(Object.keys(IDENTITY_FIELD_BUDGETS).map(async (field) => {
|
|
52
|
+
const fetchLatestEvent = async (event) => {
|
|
53
|
+
const query = new URLSearchParams({
|
|
54
|
+
event,
|
|
55
|
+
agentId: config.agentId,
|
|
56
|
+
dataField: field,
|
|
57
|
+
limit: "1"
|
|
58
|
+
});
|
|
59
|
+
const response = await fetchImpl(`${config.apiUrl}/api/events?${query}`, {
|
|
60
|
+
headers: {
|
|
61
|
+
Authorization: `Bearer ${config.apiKey}`,
|
|
62
|
+
"X-Agent-ID": config.agentId
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
if (!response.ok)
|
|
66
|
+
return null;
|
|
67
|
+
const payload = await response.json();
|
|
68
|
+
return payload.events?.[0] ?? null;
|
|
69
|
+
};
|
|
70
|
+
const [rejection, reconciliation] = await Promise.all([
|
|
71
|
+
fetchLatestEvent("system.profile_sync_rejected"),
|
|
72
|
+
fetchLatestEvent("system.profile_sync_reconciled")
|
|
73
|
+
]);
|
|
74
|
+
return { rejection, reconciliation };
|
|
75
|
+
}));
|
|
76
|
+
const latestEvents = responses.flatMap(({ rejection, reconciliation }) => rejection ? [{ rejection, reconciliation }] : []);
|
|
77
|
+
if (latestEvents.length === 0)
|
|
78
|
+
return "";
|
|
79
|
+
let profile = null;
|
|
80
|
+
const profileResponse = await fetchImpl(`${config.apiUrl}/me`, {
|
|
81
|
+
headers: {
|
|
82
|
+
Authorization: `Bearer ${config.apiKey}`,
|
|
83
|
+
"X-Agent-ID": config.agentId
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
if (profileResponse.ok) {
|
|
87
|
+
profile = await profileResponse.json();
|
|
88
|
+
}
|
|
89
|
+
let disk = null;
|
|
90
|
+
if (config.claudeMdPath) {
|
|
91
|
+
disk = {
|
|
92
|
+
soulMd: await readFile(SOUL_MD_PATH),
|
|
93
|
+
identityMd: await readFile(IDENTITY_MD_PATH),
|
|
94
|
+
claudeMd: await readFile(config.claudeMdPath),
|
|
95
|
+
toolsMd: await readFile(TOOLS_MD_PATH)
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
const unresolved = latestEvents.flatMap(({ rejection, reconciliation }) => {
|
|
99
|
+
if (reconciliation && reconciliation.createdAt > rejection.createdAt)
|
|
100
|
+
return [];
|
|
101
|
+
const event = rejection;
|
|
102
|
+
const field = event.data?.field;
|
|
103
|
+
const rejectedDbHash = event.data?.dbHash;
|
|
104
|
+
const currentValue = typeof field === "string" ? profile?.[field] : undefined;
|
|
105
|
+
const diskValue = typeof field === "string" ? disk?.[field] : undefined;
|
|
106
|
+
if (typeof currentValue === "string" && diskValue === currentValue)
|
|
107
|
+
return [];
|
|
108
|
+
return !(typeof rejectedDbHash === "string" && typeof currentValue === "string" && contentSha256(currentValue) !== rejectedDbHash) ? [event] : [];
|
|
109
|
+
});
|
|
110
|
+
const banners = await Promise.all(unresolved.map(renderProfileSyncRejectionBanner));
|
|
111
|
+
return banners.filter((banner) => banner !== null).join("");
|
|
112
|
+
} catch {
|
|
113
|
+
return "";
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
async function prependProfileSyncRejectionBanner(prompt, config, fetchImpl = fetch, readFile = readFileIfExists) {
|
|
117
|
+
const banner = await fetchProfileSyncRejectionBanner(config, fetchImpl, readFile);
|
|
118
|
+
return banner ? { prompt: banner + prompt, injected: true } : { prompt, injected: false };
|
|
119
|
+
}
|
|
17
120
|
async function writeIdentityBaselines(baselines) {
|
|
18
121
|
await Bun.write(IDENTITY_BASELINES_PATH, JSON.stringify(baselines));
|
|
19
122
|
}
|
|
@@ -47,6 +150,12 @@ function resolveClaudeMdPath(completedProviders) {
|
|
|
47
150
|
const anyNonClaude = completedProviders.some((p) => p !== "claude");
|
|
48
151
|
return anyNonClaude ? WORKSPACE_CLAUDE_MD_PATH : CLAUDE_MD_PATH;
|
|
49
152
|
}
|
|
153
|
+
function buildIndependentIdentityPayloads(updates, changeSource) {
|
|
154
|
+
return Object.entries(updates).map(([field, value]) => ({
|
|
155
|
+
label: `identity.${field}`,
|
|
156
|
+
body: { [field]: value, changeSource }
|
|
157
|
+
}));
|
|
158
|
+
}
|
|
50
159
|
function extractSetupScriptContent(raw, agentId = "unknown") {
|
|
51
160
|
if (!raw.trim())
|
|
52
161
|
return null;
|
|
@@ -70,9 +179,7 @@ function buildIdentityPayload(files, baselines, agentId = "unknown") {
|
|
|
70
179
|
const updates = {};
|
|
71
180
|
if (files.soulMd !== undefined) {
|
|
72
181
|
const content = files.soulMd;
|
|
73
|
-
if (baselines?.soulMd && contentSha256(content) === baselines.soulMd) {} else if (content.
|
|
74
|
-
warnProfileFileTooLarge(agentId, "soulMd", content.length);
|
|
75
|
-
} else if (content.trim()) {
|
|
182
|
+
if (baselines?.soulMd && contentSha256(content) === baselines.soulMd) {} else if (content.trim()) {
|
|
76
183
|
if (content.length < IDENTITY_FILE_MIN_LENGTH) {
|
|
77
184
|
console.error(`[profile-sync] Skipping SOUL.md sync: content too short (${content.length} chars, minimum ${IDENTITY_FILE_MIN_LENGTH}). This prevents accidental profile corruption.`);
|
|
78
185
|
} else {
|
|
@@ -82,9 +189,7 @@ function buildIdentityPayload(files, baselines, agentId = "unknown") {
|
|
|
82
189
|
}
|
|
83
190
|
if (files.identityMd !== undefined) {
|
|
84
191
|
const content = files.identityMd;
|
|
85
|
-
if (baselines?.identityMd && contentSha256(content) === baselines.identityMd) {} else if (content.
|
|
86
|
-
warnProfileFileTooLarge(agentId, "identityMd", content.length);
|
|
87
|
-
} else if (content.trim()) {
|
|
192
|
+
if (baselines?.identityMd && contentSha256(content) === baselines.identityMd) {} else if (content.trim()) {
|
|
88
193
|
if (content.length < IDENTITY_FILE_MIN_LENGTH) {
|
|
89
194
|
console.error(`[profile-sync] Skipping IDENTITY.md sync: content too short (${content.length} chars, minimum ${IDENTITY_FILE_MIN_LENGTH}). This prevents accidental profile corruption.`);
|
|
90
195
|
} else {
|
|
@@ -94,9 +199,7 @@ function buildIdentityPayload(files, baselines, agentId = "unknown") {
|
|
|
94
199
|
}
|
|
95
200
|
if (files.toolsMd !== undefined) {
|
|
96
201
|
const content = files.toolsMd;
|
|
97
|
-
if (baselines?.toolsMd && contentSha256(content) === baselines.toolsMd) {} else if (content.
|
|
98
|
-
warnProfileFileTooLarge(agentId, "toolsMd", content.length);
|
|
99
|
-
} else if (content.trim()) {
|
|
202
|
+
if (baselines?.toolsMd && contentSha256(content) === baselines.toolsMd) {} else if (content.trim()) {
|
|
100
203
|
updates.toolsMd = content;
|
|
101
204
|
}
|
|
102
205
|
}
|
|
@@ -130,15 +233,11 @@ async function collectProfilePayloads(fields, changeSource, readFile = readFileI
|
|
|
130
233
|
toolsMd: await readFile(TOOLS_MD_PATH),
|
|
131
234
|
heartbeatMd: await readFile(HEARTBEAT_MD_PATH)
|
|
132
235
|
}, baselines, agentId);
|
|
133
|
-
|
|
134
|
-
payloads.push({ label: "identity", body: { ...updates, changeSource } });
|
|
135
|
-
}
|
|
236
|
+
payloads.push(...buildIndependentIdentityPayloads(updates, changeSource));
|
|
136
237
|
}
|
|
137
238
|
if (fields.includes("claude")) {
|
|
138
239
|
const raw = await readFile(claudeMdPath);
|
|
139
|
-
if (raw
|
|
140
|
-
warnProfileFileTooLarge(agentId, "claudeMd", raw.length);
|
|
141
|
-
} else if (raw?.trim()) {
|
|
240
|
+
if (raw?.trim()) {
|
|
142
241
|
if (baselines?.claudeMd && contentSha256(raw) === baselines.claudeMd) {} else {
|
|
143
242
|
payloads.push({ label: "claude", body: { claudeMd: raw, changeSource } });
|
|
144
243
|
}
|
|
@@ -187,11 +286,32 @@ async function syncProfileFilesToServer(opts) {
|
|
|
187
286
|
await postProfileUpdate(opts, payload);
|
|
188
287
|
}
|
|
189
288
|
}
|
|
190
|
-
var SOUL_MD_PATH = "/workspace/SOUL.md", IDENTITY_MD_PATH = "/workspace/IDENTITY.md", TOOLS_MD_PATH = "/workspace/TOOLS.md", HEARTBEAT_MD_PATH = "/workspace/HEARTBEAT.md", SETUP_SCRIPT_PATH = "/workspace/start-up.sh", IDENTITY_BASELINES_PATH = "/tmp/identity-baselines.json", CLAUDE_MD_PATH, WORKSPACE_CLAUDE_MD_PATH = "/workspace/CLAUDE.md", IDENTITY_FILE_MIN_LENGTH = 500, SETUP_MARKER_START = "# === Agent-managed setup (from DB) ===", SETUP_MARKER_END = "# === End agent-managed setup ===";
|
|
289
|
+
var SOUL_MD_PATH = "/workspace/SOUL.md", IDENTITY_MD_PATH = "/workspace/IDENTITY.md", TOOLS_MD_PATH = "/workspace/TOOLS.md", HEARTBEAT_MD_PATH = "/workspace/HEARTBEAT.md", SETUP_SCRIPT_PATH = "/workspace/start-up.sh", IDENTITY_BASELINES_PATH = "/tmp/identity-baselines.json", PROFILE_FIELD_DETAILS, CLAUDE_MD_PATH, WORKSPACE_CLAUDE_MD_PATH = "/workspace/CLAUDE.md", IDENTITY_FILE_MIN_LENGTH = 500, SETUP_MARKER_START = "# === Agent-managed setup (from DB) ===", SETUP_MARKER_END = "# === End agent-managed setup ===";
|
|
191
290
|
var init_profile_sync = __esm(() => {
|
|
291
|
+
init_resolver();
|
|
192
292
|
init_constants();
|
|
293
|
+
init_identity_field_budget();
|
|
193
294
|
init_secret_scrubber();
|
|
295
|
+
init_templates();
|
|
296
|
+
PROFILE_FIELD_DETAILS = {
|
|
297
|
+
soulMd: {
|
|
298
|
+
label: `soulMd (${SOUL_MD_PATH})`,
|
|
299
|
+
recoveryGuidance: `Inspect and shrink the live ${SOUL_MD_PATH} first, moving durable tail content into memory. After a worker restart, use ${SOUL_MD_PATH}.pre-boot-<timestamp>.bak as the fallback copy of the rejected content.`
|
|
300
|
+
},
|
|
301
|
+
identityMd: {
|
|
302
|
+
label: `identityMd (${IDENTITY_MD_PATH})`,
|
|
303
|
+
recoveryGuidance: `Inspect and shrink the live ${IDENTITY_MD_PATH} first, moving durable tail content into memory. After a worker restart, use ${IDENTITY_MD_PATH}.pre-boot-<timestamp>.bak as the fallback copy of the rejected content.`
|
|
304
|
+
},
|
|
305
|
+
claudeMd: {
|
|
306
|
+
label: "claudeMd (/workspace/CLAUDE.md for non-Claude harnesses; ~/.claude/CLAUDE.md for Claude)",
|
|
307
|
+
recoveryGuidance: "Inspect and shrink the live CLAUDE.md source first, moving durable tail content into memory. After a worker restart, non-Claude harnesses can use /workspace/CLAUDE.md.pre-boot-<timestamp>.bak as the fallback copy; Claude's native ~/.claude/CLAUDE.md source is not archived by that boot step."
|
|
308
|
+
},
|
|
309
|
+
toolsMd: {
|
|
310
|
+
label: `toolsMd (${TOOLS_MD_PATH})`,
|
|
311
|
+
recoveryGuidance: `Inspect and shrink the live ${TOOLS_MD_PATH} first, moving durable tail content into memory. After a worker restart, use ${TOOLS_MD_PATH}.pre-boot-<timestamp>.bak as the fallback copy of the rejected content.`
|
|
312
|
+
}
|
|
313
|
+
};
|
|
194
314
|
CLAUDE_MD_PATH = `${process.env.HOME}/.claude/CLAUDE.md`;
|
|
195
315
|
});
|
|
196
316
|
|
|
197
|
-
export { contentSha256, writeIdentityBaselines, readIdentityBaselines, warnProfileFileTooLarge, writeProfileFileFromDb, resolveClaudeMdPath, syncProfileFilesToServer, init_profile_sync };
|
|
317
|
+
export { contentSha256, prependProfileSyncRejectionBanner, writeIdentityBaselines, readIdentityBaselines, warnProfileFileTooLarge, writeProfileFileFromDb, resolveClaudeMdPath, buildIndependentIdentityPayloads, syncProfileFilesToServer, init_profile_sync };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__esm,
|
|
3
3
|
__export
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-pq2ee5ja.js";
|
|
5
5
|
|
|
6
6
|
// node_modules/supports-color/index.js
|
|
7
7
|
var exports_supports_color = {};
|
|
8
8
|
__export(exports_supports_color, {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
createSupportsColor: () => createSupportsColor,
|
|
10
|
+
default: () => supports_color_default
|
|
11
11
|
});
|
|
12
12
|
import process from "node:process";
|
|
13
13
|
import os from "node:os";
|