@desplega.ai/agent-swarm 1.128.0 → 1.129.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 -2
- package/dist/{actions-3tjz0jkn.js → actions-kfv2dawe.js} +15 -12
- package/dist/{app-08mcfqa5.js → app-q8vjk6e8.js} +8 -8
- package/dist/{artifact-x7e6f41t.js → artifact-hg4t1nx7.js} +7 -2
- package/dist/{assistant-j90fr0jm.js → assistant-g037r345.js} +14 -14
- package/dist/{azure-openai-responses-ggmzdxgy.js → azure-openai-responses-xa4sh9f6.js} +10 -10
- package/dist/{boot-reembed-fsj45809.js → boot-reembed-18pzsrxa.js} +8 -7
- package/dist/{boot-reembed-e3290yjs.js → boot-reembed-wpks2cj8.js} +9 -8
- package/dist/{boot-scrub-logs-15m9vfhy.js → boot-scrub-logs-n7szd57r.js} +6 -5
- package/dist/{claude-adapter-6acnfptg.js → claude-adapter-qz4r0ajt.js} +20 -2
- package/dist/{claude-managed-adapter-g92bcm1a.js → claude-managed-adapter-gv19tdew.js} +3 -3
- package/dist/{claude-managed-setup-cm05wtek.js → claude-managed-setup-52z4mq9w.js} +1 -1
- package/dist/{cli-q25ejbyn.js → cli-0258203w.js} +49 -14
- package/dist/{cli-t83gdcf7.js → cli-0sf92efp.js} +1 -1
- package/dist/{cli-a36npnxa.js → cli-17zxdgsq.js} +28 -31
- package/dist/{cli-sq7f72d6.js → cli-1qkk5er0.js} +1 -1
- package/dist/{cli-24adhcy3.js → cli-1y1cm570.js} +3 -3
- package/dist/{cli-vajhsd2e.js → cli-2k0ztbfp.js} +1 -1
- package/dist/{cli-xz9aq0rf.js → cli-2mbe7vk0.js} +1 -1
- package/dist/{cli-xc0x7wey.js → cli-33jj76y8.js} +353 -2
- package/dist/{cli-shzqkrbd.js → cli-39vgrsep.js} +2 -2
- package/dist/{cli-jjp0c4rj.js → cli-4n2gcjpd.js} +273 -9
- package/dist/{cli-hzad20bp.js → cli-4n4mdv21.js} +28 -0
- package/dist/{cli-thsqy2j0.js → cli-7bz8dzqa.js} +3519 -476
- package/dist/{cli-90q5q9pt.js → cli-7ecgm5v0.js} +83 -3
- package/dist/{cli-rwctnq1j.js → cli-7padk69a.js} +6 -4
- package/dist/{cli-e61fs2hp.js → cli-8whqavk2.js} +2797 -1890
- package/dist/{cli-w5r4wfm5.js → cli-9b13ggd1.js} +6 -1
- package/dist/{cli-br49cbqp.js → cli-9fxg3v5m.js} +4 -4
- package/dist/{cli-agwvxxvh.js → cli-a8ynhkyj.js} +101 -14
- package/dist/{cli-bz42mzy3.js → cli-akxnpx17.js} +1662 -1234
- package/dist/{cli-95kferzh.js → cli-bnx54kxv.js} +13 -9
- package/dist/{cli-bw80ck94.js → cli-d91pvmq1.js} +1 -1
- package/dist/{cli-tk9vyqzh.js → cli-e7d20cty.js} +11 -0
- package/dist/{cli-jkhwmmgg.js → cli-epan13p1.js} +1 -0
- package/dist/{cli-k6nzt9hv.js → cli-etr62zy6.js} +162462 -94993
- package/dist/{cli-86jbqh6f.js → cli-fpaa5k2q.js} +624 -547
- package/dist/{cli-xn11dp5x.js → cli-g252a9ky.js} +8 -3
- package/dist/{cli-peycqz69.js → cli-ga12dc1d.js} +13 -3
- package/dist/{cli-852zctpg.js → cli-gb25p1h2.js} +3 -3
- package/dist/{cli-ftyf58xj.js → cli-gztgc3hz.js} +2 -2
- package/dist/{hook-qpgs6nt4.js → cli-h0457a67.js} +118 -47
- package/dist/{cli-qd4xzgk9.js → cli-hx02s9zq.js} +2 -2
- package/dist/{cli-k9m7hetx.js → cli-kk4f9r17.js} +6 -2
- package/dist/{cli-9f6yb8vh.js → cli-mhjnbgb6.js} +3899 -3871
- package/dist/{cli-61y9bkab.js → cli-mmrk00vp.js} +31 -4
- package/dist/{cli-b5p0jk5f.js → cli-n6h8qt8n.js} +34 -19
- package/dist/{cli-xvkz3rm5.js → cli-nhcd7x43.js} +2 -2
- package/dist/{cli-wgvn0gs7.js → cli-t53vnnxz.js} +144 -47
- package/dist/{cli-wspgs9bt.js → cli-t930g0xh.js} +4 -2
- package/dist/cli-ttkmehy0.js +2792 -0
- package/dist/{cli-t2msesap.js → cli-v37yr6mf.js} +7 -7
- package/dist/{cli-dh55d5fg.js → cli-x23me2mg.js} +14 -5
- package/dist/{cli-tfev56s0.js → cli-xg2eezyv.js} +1 -1
- package/dist/{cli-gg85k3zt.js → cli-xy4cwsm9.js} +1 -1
- package/dist/{cli-hwtd7cvy.js → cli-yjbgmysx.js} +102 -50
- package/dist/{cli-8fjwym53.js → cli-z9xqqhfk.js} +1 -1
- package/dist/{cli-1yjrbg1f.js → cli-zejvt395.js} +1 -1
- package/dist/cli.js +37 -22
- package/dist/{codex-adapter-tp9k7xqg.js → codex-adapter-7v6t7ff6.js} +9 -9
- package/dist/{codex-hook-tyqm0gpy.js → codex-hook-amndawyb.js} +7 -5
- package/dist/{codex-login-0h18cy3e.js → codex-login-z6yhbkmk.js} +1 -1
- package/dist/{codex-session-runner-6c2zds78.js → codex-session-runner-e7j4khe2.js} +9 -9
- package/dist/{commands-pfy10d4q.js → commands-ex0k5tbf.js} +6 -5
- package/dist/{db-0f7f1cvj.js → db-df7jatfc.js} +16 -5
- package/dist/{devin-adapter-8nmsgff3.js → devin-adapter-v1sarqtw.js} +1 -1
- package/dist/{e2b-q345y8s4.js → e2b-jdkwemv2.js} +6 -2
- package/dist/{handlers-d25x44k0.js → handlers-1j2cfqt2.js} +17 -16
- package/dist/hook-nx9a0mj3.js +877 -0
- package/dist/hook-w6yaf6sy.js +31 -0
- package/dist/{http-2f52nkya.js → http-4tz5h8wg.js} +510 -183
- package/dist/{index-2dgfj9av.js → index-0bpkzb09.js} +3 -3
- package/dist/{index-4b6wmbmk.js → index-0s67qv7h.js} +16 -15
- package/dist/index-35gtv6gj.js +13162 -0
- package/dist/index-7c0jqna0.js +36 -0
- package/dist/index-kcf3tm9h.js +34 -0
- package/dist/{index-t2snazez.js → index-ker3gccb.js} +4 -4
- package/dist/{keepalive-aw9aqjd5.js → keepalive-3j4a9168.js} +9 -10
- package/dist/{lead-sjxyhtxa.js → lead-6kpevymb.js} +43 -42
- package/dist/{maintenance-5h18tcq7.js → maintenance-m1k82ean.js} +9 -8
- package/dist/{mistral-conversations-3yjpaa7k.js → mistral-conversations-bjkdfb6z.js} +10 -10
- package/dist/{oauth-refresh-sweep-qgpbc9am.js → oauth-refresh-sweep-881k8e4q.js} +8 -9
- package/dist/{onboard-76xj7266.js → onboard-c0ykffjn.js} +2 -2
- package/dist/{openai-codex-responses-yd2x7kp4.js → openai-codex-responses-xetseqvt.js} +10 -10
- package/dist/{openai-responses-xke4h8fx.js → openai-responses-ce67hd23.js} +17 -17
- package/dist/{opencode-adapter-7pxawpsp.js → opencode-adapter-1gm38aba.js} +2 -2
- package/dist/{otel-63jr5v38.js → otel-3mp81ppd.js} +2 -2
- package/dist/{otel-impl-2pfbdnr8.js → otel-impl-sqagjerv.js} +20 -5
- package/dist/{pi-mono-adapter-6r7nb9yr.js → pi-mono-adapter-k584k16g.js} +32 -18
- package/dist/{pricing-refresh-ba3ag6hh.js → pricing-refresh-y82whbf9.js} +8 -7
- package/dist/{rbac-roles-jm18zgpz.js → rbac-roles-4ht8gegc.js} +7 -6
- package/dist/{rbac-roles-ktzfw0b0.js → rbac-roles-nvkqmzyd.js} +8 -7
- package/dist/{registry-wejfsj31.js → registry-02cy9z5z.js} +1 -1
- package/dist/{render-v2-bhez9szv.js → render-v2-wvqdgvvp.js} +8 -8
- package/dist/{seed-pricing-ybkssg65.js → seed-pricing-fy3rxhde.js} +7 -6
- package/dist/{setup-eegn7eyv.js → setup-ak5cnc6f.js} +2 -2
- package/dist/{worker-vvwg97h9.js → worker-d8769q8a.js} +43 -42
- package/openapi.json +1675 -13
- package/package.json +6 -2
- package/src/apps/catalog.generated.json +1064 -0
- package/src/apps/definition.ts +694 -0
- package/src/apps/format-upgrades.ts +74 -0
- package/src/apps/page-validator.ts +1572 -0
- package/src/apps/row-store.ts +446 -0
- package/src/apps/schema-migrate.ts +980 -0
- package/src/apps/script-types.ts +288 -0
- package/src/apps/store.ts +179 -0
- package/src/apps/user-config.ts +135 -0
- package/src/apps/version.ts +193 -0
- package/src/be/db.ts +204 -31
- package/src/be/mcp-proxy.ts +7 -0
- package/src/be/migrations/126_apps.sql +33 -0
- package/src/be/migrations/127_backfill_user_attribution.sql +94 -0
- package/src/be/migrations/128_session_costs_accuracy.sql +6 -0
- package/src/be/models-catalog.ts +8 -0
- package/src/be/modelsdev-cache.json +162625 -95180
- package/src/be/rbac-audit.ts +2 -0
- package/src/be/scripts/run-saved.ts +32 -0
- package/src/be/scripts/type-contributors.ts +24 -0
- package/src/be/scripts/typecheck.ts +48 -8
- package/src/be/seed-pricing.ts +41 -5
- package/src/be/seed-skills/bundled-files.generated.json +94 -0
- package/src/be/seed-skills/index.ts +206 -16
- package/src/be/seed-skills/render.ts +48 -0
- package/src/be/skill-parser.ts +11 -1
- package/src/cli.tsx +11 -0
- package/src/commands/profile-sync.ts +63 -12
- package/src/commands/runner.ts +118 -17
- package/src/fs/agent-fs-provider.ts +22 -16
- package/src/hooks/hook.ts +158 -26
- package/src/http/agents.ts +7 -6
- package/src/http/all-routes.ts +1 -0
- package/src/http/approval-requests.ts +54 -1
- package/src/http/apps.ts +1426 -0
- package/src/http/favorite-owner.ts +5 -3
- package/src/http/fs.ts +2 -1
- package/src/http/index.ts +2 -0
- package/src/http/kv.ts +6 -0
- package/src/http/mcp-servers.ts +85 -3
- package/src/http/page-proxy.ts +42 -2
- package/src/http/pages.ts +30 -0
- package/src/http/script-runs.ts +10 -0
- package/src/http/scripts.ts +8 -3
- package/src/http/session-cost-recompute.ts +196 -0
- package/src/http/session-data.ts +72 -77
- package/src/http/webhooks.ts +6 -0
- package/src/http/workflows.ts +16 -5
- package/src/kv-reserved-namespaces.ts +14 -0
- package/src/mcp-client/http-client.ts +3 -0
- package/src/otel-impl.ts +25 -0
- package/src/prompts/base-prompt.ts +44 -5
- package/src/prompts/session-templates.ts +30 -0
- package/src/providers/claude-adapter.ts +127 -0
- package/src/providers/codex-adapter.ts +62 -15
- package/src/providers/codex-models.ts +15 -7
- package/src/providers/codex-oauth/storage.ts +25 -0
- package/src/providers/devin-adapter.ts +9 -1
- package/src/providers/modelsdev-reasoning.json +2797 -1890
- package/src/providers/opencode-adapter.ts +54 -20
- package/src/providers/pi-mono-adapter.ts +2 -0
- package/src/providers/pi-mono-extension.ts +30 -5
- package/src/providers/pricing-sources.md +44 -7
- package/src/providers/types.ts +25 -0
- package/src/rbac/legacy-policy.ts +2 -0
- package/src/rbac/permissions.ts +8 -0
- package/src/rbac/types.ts +1 -0
- package/src/script-workflows/executor.ts +63 -28
- package/src/script-workflows/harness.ts +22 -1
- package/src/scripts-runtime/executors/native.ts +40 -67
- package/src/scripts-runtime/loader.ts +1 -0
- package/src/scripts-runtime/sdk-allowlist.ts +8 -0
- package/src/scripts-runtime/types/stdlib.d.ts +31 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +31 -0
- package/src/server.ts +16 -0
- package/src/slack/HEURISTICS.md +1 -1
- package/src/slack/ack.ts +73 -0
- package/src/slack/actions.ts +2 -0
- package/src/slack/blocks.ts +4 -4
- package/src/slack/enrich.ts +6 -2
- package/src/slack/handlers.test.ts +34 -1
- package/src/slack/handlers.ts +3 -2
- package/src/slack/render-v2.ts +10 -0
- package/src/slack/responses.ts +6 -7
- package/src/slack/steering.ts +14 -5
- package/src/slack/thread-buffer.ts +13 -1
- package/src/slack/watcher.ts +10 -1
- package/src/tests/approval-requests.test.ts +44 -1
- package/src/tests/apps-element-assembly.test.ts +808 -0
- package/src/tests/apps-elements.test.ts +1169 -0
- package/src/tests/apps-rbac.test.ts +342 -0
- package/src/tests/apps-script-types.test.ts +307 -0
- package/src/tests/apps-spike.test.ts +590 -0
- package/src/tests/apps-spike2.test.ts +1231 -0
- package/src/tests/apps-spike4.test.ts +743 -0
- package/src/tests/apps-spike5.test.ts +1858 -0
- package/src/tests/apps-user-config.test.ts +551 -0
- package/src/tests/base-prompt.test.ts +82 -0
- package/src/tests/claude-adapter.test.ts +274 -7
- package/src/tests/claude-stop-hook.test.ts +99 -2
- package/src/tests/codex-adapter.test.ts +51 -3
- package/src/tests/codex-oauth-credential-info.test.ts +146 -0
- package/src/tests/codex-oauth-storage.test.ts +43 -1
- package/src/tests/entrypoint-codex-oauth-seed.test.ts +50 -2
- package/src/tests/fetch-resolved-env.test.ts +171 -61
- package/src/tests/fixtures/bookmarks-definition.json.txt +203 -0
- package/src/tests/fs-provider.test.ts +131 -24
- package/src/tests/fs-routes.test.ts +57 -0
- package/src/tests/github-handlers.test.ts +1 -1
- package/src/tests/http-api-integration.test.ts +21 -2
- package/src/tests/internal-ai/complete-structured.test.ts +165 -4
- package/src/tests/mcp-server-ssrf.test.ts +186 -0
- package/src/tests/memory-edges.test.ts +3 -1
- package/src/tests/migration-046-budgets.test.ts +31 -27
- package/src/tests/opencode-adapter.test.ts +139 -1
- package/src/tests/otel-session-cost-metrics.test.ts +88 -0
- package/src/tests/page-proxy.test.ts +107 -0
- package/src/tests/page-session.test.ts +92 -25
- package/src/tests/pages-http.test.ts +106 -0
- package/src/tests/pricing-refresh.test.ts +36 -0
- package/src/tests/profile-sync.test.ts +23 -7
- package/src/tests/prompt-template-remaining.test.ts +12 -0
- package/src/tests/prompt-template-session.test.ts +3 -2
- package/src/tests/rbac-engine.test.ts +2 -0
- package/src/tests/refresh-modelsdev-carryforward.test.ts +58 -0
- package/src/tests/run-bun-tests.test.ts +4 -0
- package/src/tests/runner-profile-backup.test.ts +52 -0
- package/src/tests/sandboxed-process.test.ts +92 -0
- package/src/tests/script-connections.test.ts +3 -0
- package/src/tests/script-workflows-runtime-e2e.test.ts +61 -0
- package/src/tests/scripts-http.test.ts +50 -0
- package/src/tests/scripts-typecheck.test.ts +144 -1
- package/src/tests/seed-scripts.test.ts +1 -1
- package/src/tests/seed-skills-bundled-files.test.ts +23 -0
- package/src/tests/session-cost-recompute-unit.test.ts +148 -0
- package/src/tests/session-costs-golden.test.ts +565 -0
- package/src/tests/session-costs-recompute-all-providers.test.ts +132 -1
- package/src/tests/session-costs.test.ts +83 -0
- package/src/tests/skill-parser.test.ts +76 -0
- package/src/tests/slack-attachments-block.test.ts +24 -0
- package/src/tests/slack-identity-resolution.test.ts +33 -1
- package/src/tests/slack-inline-output.test.ts +16 -1
- package/src/tests/slack-render-v2.test.ts +45 -1
- package/src/tests/slack-steering.test.ts +25 -1
- package/src/tests/slack-watcher.test.ts +48 -3
- package/src/tests/store-progress-attachments-handler.test.ts +2 -2
- package/src/tests/sync-ai-toolbox-skills.test.ts +300 -0
- package/src/tests/tracker-fold.test.ts +8 -1
- package/src/tests/user-attribution-migration.test.ts +160 -0
- package/src/tests/workflow-engine-v2.test.ts +147 -1
- package/src/tests/workflow-executors.test.ts +219 -2
- package/src/tests/workflow-foreach.test.ts +1122 -0
- package/src/tests/workflow-http-v2.test.ts +20 -0
- package/src/tests/workflow-triggers-v2.test.ts +70 -1
- package/src/tools/app-diff.ts +80 -0
- package/src/tools/app-get.ts +124 -0
- package/src/tools/app-history.ts +87 -0
- package/src/tools/app-list.ts +47 -0
- package/src/tools/app-patch.ts +158 -0
- package/src/tools/app-query.ts +1 -0
- package/src/tools/app-rollback.ts +111 -0
- package/src/tools/app-upsert.ts +176 -0
- package/src/tools/context-diff.ts +9 -5
- package/src/tools/kv/kv-write-auth.ts +4 -0
- package/src/tools/slack-post.ts +3 -3
- package/src/tools/slack-reply.ts +3 -3
- package/src/tools/slack-start-thread.ts +3 -3
- package/src/tools/store-progress.ts +5 -4
- package/src/tools/tool-config.ts +9 -1
- package/src/tools/update-profile.ts +7 -6
- package/src/tools/workflows/create-workflow.ts +5 -0
- package/src/tools/workflows/patch-workflow-node.ts +8 -2
- package/src/tools/workflows/patch-workflow.ts +8 -2
- package/src/tools/workflows/update-workflow.ts +4 -2
- package/src/types.ts +32 -7
- package/src/utils/constants.ts +12 -5
- package/src/utils/content-disposition.ts +15 -0
- package/src/utils/internal-ai/complete-structured.ts +41 -6
- package/src/utils/page-session.ts +77 -15
- package/src/utils/sandboxed-process.ts +174 -0
- package/src/workflows/constants.ts +1 -0
- package/src/workflows/definition.ts +155 -21
- package/src/workflows/engine.ts +148 -45
- package/src/workflows/executors/foreach.ts +213 -0
- package/src/workflows/executors/registry.ts +2 -0
- package/src/workflows/executors/script.ts +159 -24
- package/src/workflows/foreach-join.ts +117 -0
- package/src/workflows/index.ts +10 -1
- package/src/workflows/limits.ts +8 -0
- package/src/workflows/recovery.ts +57 -22
- package/src/workflows/resume.ts +45 -17
- package/src/workflows/retry-poller.ts +24 -5
- package/src/workflows/task-step-routing.ts +59 -0
- package/src/workflows/triggers.ts +72 -15
- package/templates/ai-toolbox.manifest.json +220 -0
- package/templates/skills/agentmail-sending/config.json +2 -1
- package/templates/skills/agentmail-sending/content.md +147 -30
- package/templates/skills/apps/config.json +14 -0
- package/templates/skills/apps/content.md +598 -0
- package/templates/skills/artifacts/content.md +27 -17
- package/templates/skills/ask-user/config.json +18 -0
- package/templates/skills/ask-user/content.md +73 -0
- package/templates/skills/attio-interaction/SKILL.md +5 -2
- package/templates/skills/attio-interaction/config.json +1 -0
- package/templates/skills/attio-interaction/content.md +4 -0
- package/templates/skills/brainstorming/config.json +18 -0
- package/templates/skills/brainstorming/content.md +140 -0
- package/templates/skills/brainstorming/files/template.md +38 -0
- package/templates/skills/code-reviewing/config.json +18 -0
- package/templates/skills/code-reviewing/content.md +66 -0
- package/templates/skills/composio/SKILL.md +244 -0
- package/templates/skills/composio/config.json +14 -0
- package/{plugin/skills/composio/SKILL.md → templates/skills/composio/content.md} +86 -20
- package/templates/skills/composio-gmail/config.json +14 -0
- package/{plugin/skills/composio-gmail/SKILL.md → templates/skills/composio-gmail/content.md} +4 -6
- package/templates/skills/composio-google-calendar/config.json +14 -0
- package/{plugin/skills/composio-google-calendar/SKILL.md → templates/skills/composio-google-calendar/content.md} +5 -7
- package/templates/skills/composio-google-docs/config.json +14 -0
- package/{plugin/skills/composio-google-docs/SKILL.md → templates/skills/composio-google-docs/content.md} +24 -6
- package/templates/skills/delegate-work/config.json +18 -0
- package/templates/skills/delegate-work/content.md +108 -0
- package/templates/skills/delegate-work/files/scripts/codex-exec.sh +82 -0
- package/templates/skills/design-docs/config.json +18 -0
- package/templates/skills/design-docs/content.md +37 -0
- package/templates/skills/design-docs/files/template.md +42 -0
- package/templates/skills/download-task-attachment/config.json +14 -0
- package/{plugin/skills/download-task-attachment/SKILL.md → templates/skills/download-task-attachment/content.md} +0 -5
- package/templates/skills/engineering-standards/config.json +18 -0
- package/templates/skills/engineering-standards/content.md +68 -0
- package/templates/skills/implementing/config.json +18 -0
- package/templates/skills/implementing/content.md +190 -0
- package/templates/skills/improve-agents-md/config.json +18 -0
- package/templates/skills/improve-agents-md/content.md +417 -0
- package/templates/skills/kapso-whatsapp/SKILL.md +15 -15
- package/templates/skills/kapso-whatsapp/config.json +10 -4
- package/templates/skills/kapso-whatsapp/content.md +64 -54
- package/templates/skills/kv-storage/content.md +4 -1
- package/templates/skills/learning/config.json +18 -0
- package/templates/skills/learning/content.md +265 -0
- package/templates/skills/learning/files/template.md +23 -0
- package/templates/skills/one-shot/config.json +18 -0
- package/templates/skills/one-shot/content.md +66 -0
- package/templates/skills/pages/content.md +3 -4
- package/templates/skills/phase-running/config.json +18 -0
- package/templates/skills/phase-running/content.md +129 -0
- package/templates/skills/planning/config.json +18 -0
- package/templates/skills/planning/content.md +72 -0
- package/templates/skills/planning/files/template.md +111 -0
- package/templates/skills/qa/config.json +18 -0
- package/templates/skills/qa/content.md +182 -0
- package/templates/skills/qa/files/template.md +75 -0
- package/templates/skills/questioning/config.json +18 -0
- package/templates/skills/questioning/content.md +108 -0
- package/templates/skills/questioning/files/template.md +19 -0
- package/templates/skills/researching/config.json +18 -0
- package/templates/skills/researching/content.md +166 -0
- package/templates/skills/researching/files/template.md +56 -0
- package/templates/skills/reviewing/config.json +18 -0
- package/templates/skills/reviewing/content.md +249 -0
- package/templates/skills/script-builder/config.json +18 -0
- package/templates/skills/script-builder/content.md +231 -0
- package/templates/skills/script-builder/files/templates/README.md +34 -0
- package/templates/skills/script-builder/files/templates/bash.sh.tmpl +70 -0
- package/templates/skills/script-builder/files/templates/python.py.tmpl +86 -0
- package/templates/skills/script-builder/files/templates/typescript.ts.tmpl +73 -0
- package/templates/skills/step-running/config.json +18 -0
- package/templates/skills/step-running/content.md +117 -0
- package/templates/skills/swarm-scripts/SKILL.md +87 -8
- package/templates/skills/swarm-scripts/content.md +1 -1
- package/templates/skills/tackle-gh-comments/config.json +18 -0
- package/templates/skills/tackle-gh-comments/content.md +116 -0
- package/templates/skills/tackle-gh-comments/files/scripts/gh-pr-comments.ts +292 -0
- package/templates/skills/tdd-planning/config.json +18 -0
- package/templates/skills/tdd-planning/content.md +259 -0
- package/templates/skills/tdd-planning/files/template.md +248 -0
- package/templates/skills/v-implementing/config.json +18 -0
- package/templates/skills/v-implementing/content.md +167 -0
- package/templates/skills/v-planning/config.json +18 -0
- package/templates/skills/v-planning/content.md +88 -0
- package/templates/skills/v-planning/files/templates/root.md +93 -0
- package/templates/skills/v-planning/files/templates/step.md +50 -0
- package/templates/skills/verifying/config.json +18 -0
- package/templates/skills/verifying/content.md +145 -0
- package/templates/skills/workflow-iterate/content.md +88 -1
- package/templates/skills/workflow-structured-output/config.json +1 -1
- package/templates/skills/workflow-structured-output/content.md +44 -23
- package/templates/skills/wts-expert/config.json +18 -0
- package/templates/skills/wts-expert/content.md +146 -0
- package/templates/skills/wts-expert/files/COMMANDS.md +201 -0
- package/dist/cli-0fxf2ess.js +0 -367
- package/dist/index-hc8ar2w3.js +0 -37
- package/dist/index-mm5rc1qa.js +0 -35
- package/dist/index-yg4y519c.js +0 -7443
- package/plugin/skills/.gitkeep +0 -0
- package/dist/{anthropic-messages-1hwa97nn.js → anthropic-messages-3xgme8my.js} +6 -6
- package/dist/{cli-h0yddy4n.js → cli-dxtxacy7.js} +12 -12
- package/dist/{cli-5j8hafqh.js → cli-epsvdckx.js} +3 -3
- package/dist/{cli-jj1arm18.js → cli-qmdnhpej.js} +5 -5
- package/dist/{google-generative-ai-307e5dq6.js → google-generative-ai-y42hnw9p.js} +6 -6
- package/dist/{google-vertex-btp9zq4e.js → google-vertex-4sg66gb6.js} +9 -9
- package/dist/{openai-completions-f4edtpd8.js → openai-completions-5r2g5axa.js} +16 -16
- package/dist/{openrouter-images-qv4vbkrr.js → openrouter-images-pzfp22jb.js} +3 -3
- package/dist/{pi-messages-68qm6bwq.js → pi-messages-tqj8q6b9.js} +4 -4
package/README.md
CHANGED
|
@@ -126,7 +126,7 @@ Check [our templates](https://templates.agent-swarm.dev) for a quick start.
|
|
|
126
126
|
- **Hybrid + graph-linked memory recall** — memory retrieval can blend vector and full-text ranking, expand through linked memories, surface usefulness readouts, and let agents correct an existing memory without losing its ID or history. [Memory →](https://docs.agent-swarm.dev/docs/architecture/memory) · [MCP tools →](https://docs.agent-swarm.dev/docs/reference/mcp-tools#memory-tools)
|
|
127
127
|
- **Multi-channel inputs** — Slack, GitHub, GitLab, email, WhatsApp, Linear, Jira, and the HTTP API all create tasks. [Integrations](#integrations)
|
|
128
128
|
- **Persistent Slack thread trees** — opt in to one editable task tree per conversation, complete streamed outcome cards, and explicit agent-authored Block Kit messages without routine relay spam. [Slack guide →](https://docs.agent-swarm.dev/docs/guides/slack-integration)
|
|
129
|
-
- **Workflow engine with Human-in-the-Loop** — DAG-based automation with approval gates, retries,
|
|
129
|
+
- **Workflow engine with Human-in-the-Loop** — DAG-based automation with approval gates, retries, structured I/O, and `foreach` fan-out that rejoins child agent tasks deterministically. [Workflows →](https://docs.agent-swarm.dev/docs/concepts/workflows)
|
|
130
130
|
- **Scheduled & recurring tasks** — cron-based automation for standing work, with schedules that can target agent tasks, workflows, or catalog scripts. [Scheduling →](https://docs.agent-swarm.dev/docs/concepts/scheduling)
|
|
131
131
|
- **Mid-run task steering** — add context at the next turn boundary, request an immediate interrupt where the harness supports it, or degrade safely to a follow-up task. [Task steering →](https://docs.agent-swarm.dev/docs/guides/task-steering)
|
|
132
132
|
- **Operator configuration UI** — tune non-secret feature flags, limits, integration toggles, and runtime defaults from Settings → Configuration, with source and restart-required indicators. [Configuration →](https://docs.agent-swarm.dev/docs/ui/configuration)
|
|
@@ -136,6 +136,7 @@ Check [our templates](https://templates.agent-swarm.dev) for a quick start.
|
|
|
136
136
|
- **Scripts-only MCP mode (code-mode)** — reduce the external MCP surface to eight script tools while retaining the full swarm SDK through `script-run`, cutting tool-schema context for capable coordinator models. [Guide →](https://docs.agent-swarm.dev/docs/guides/scripts-only-mode)
|
|
137
137
|
- **Scripts as external APIs** — expose a saved script as a public `POST /api/x/script/<id>` endpoint with optional bearer auth, typed input validation, and per-endpoint usage tracking. [Guide →](https://docs.agent-swarm.dev/docs/guides/scripts-external-apis)
|
|
138
138
|
- **Typed script API connections** — lead-managed OpenAPI, GraphQL, and MCP connections generate `ctx.api.*` / `ctx.mcp.*` clients for scripts, with credential bindings and OAuth-backed auth kept server-side. [Guide →](https://docs.agent-swarm.dev/docs/guides/script-connections)
|
|
139
|
+
- **Swarm Apps** — agents build versioned, schema-backed dashboard apps with reusable UI elements, named queries and actions, per-user settings, RBAC, history, and safe rollback. App definitions also generate typed script APIs. [Apps API →](https://docs.agent-swarm.dev/docs/api-reference/apps)
|
|
139
140
|
- **E2B-backed eval harness** — run a scenario × harness-config matrix against real swarm stacks, capture transcripts/artifacts, and grade outcomes with deterministic checks plus LLM or agentic judges. [Guide →](https://docs.agent-swarm.dev/docs/guides/evals-harness)
|
|
140
141
|
- **Harness & LLM agnostic** — run with Claude Code, Claude Bridge, OpenAI Codex, pi-mono (Anthropic, OpenRouter, or Amazon Bedrock), Devin, Claude Managed Agents, raw LLMs, or opencode. The dashboard model picker follows a live models.dev catalog (with a bundled snapshot fallback), so newly released provider models appear without a redeploy. Route every OpenRouter-backed harness, workflow, and summarizer through an OpenAI-compatible gateway with `OPENROUTER_BASE_URL`. Tasks, schedules, and workflow agent-task nodes can use portable `modelTier` intent (`smol`, `regular`, `smart`, `ultra`), and operators can set per-agent reasoning effort (`off` → `max`, where supported) without changing task payloads. [Harness config →](https://docs.agent-swarm.dev/docs/guides/harness-configuration) · [Add a new provider →](https://docs.agent-swarm.dev/docs/guides/harness-providers)
|
|
141
142
|
- **Published release artifacts** — every release publishes multi-architecture API, full-worker, and slim-worker images alongside versioned E2B templates, the npm CLI package, and the Helm chart. [Artifact inventory →](https://docs.agent-swarm.dev/docs/guides/published-artifacts)
|
|
@@ -146,7 +147,7 @@ Check [our templates](https://templates.agent-swarm.dev) for a quick start.
|
|
|
146
147
|
- **Config-driven metrics dashboards** — define read-only SQL widgets, version them, and render them in the dashboard without shipping custom frontend code. [Metrics API →](https://docs.agent-swarm.dev/docs/api-reference/stats)
|
|
147
148
|
- **DB-backed pages** — agents publish HTML or JSON pages (reports, dashboards, action specs) via `create_page`, remove stale pages with `delete-page`, and share them with public / authed / password modes, version history, view counters, diff helpers, and PDF export. [MCP tools → Pages](https://docs.agent-swarm.dev/docs/reference/mcp-tools#pages-tools)
|
|
148
149
|
- **KV store** — Redis-like namespaced key/value store with auto-scoped context (Slack thread / PR / Linear issue / page). [MCP tools → KV](https://docs.agent-swarm.dev/docs/reference/mcp-tools#kv-tools)
|
|
149
|
-
- **Real-time dashboard + task attachments** — monitor agents, tasks, and inter-agent chat;
|
|
150
|
+
- **Real-time, themeable dashboard + task attachments** — monitor agents, tasks, per-user usage costs, and inter-agent chat; choose from built-in light/dark themes; filter tasks by requester; create tasks with uploaded files; and preview attachments inline above session prompts. [app.agent-swarm.dev →](https://app.agent-swarm.dev)
|
|
150
151
|
|
|
151
152
|
## Quick Start
|
|
152
153
|
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-7padk69a.js";
|
|
4
|
+
import"./cli-2k0ztbfp.js";
|
|
5
5
|
import {
|
|
6
6
|
createTaskWithSiblingAwareness
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-0sf92efp.js";
|
|
8
8
|
import {
|
|
9
9
|
buildCancelledBlocks,
|
|
10
10
|
ensureSlackThreadTree,
|
|
11
|
+
getAgentDisplayName,
|
|
12
|
+
getAgentEmoji,
|
|
11
13
|
getTaskLink,
|
|
12
14
|
isSlackRenderV2Enabled
|
|
13
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-a8ynhkyj.js";
|
|
14
16
|
import"./cli-rkndnn90.js";
|
|
15
17
|
import"./cli-b0p7rfnd.js";
|
|
16
|
-
import"./cli-
|
|
17
|
-
import"./cli-dh55d5fg.js";
|
|
18
|
+
import"./cli-t930g0xh.js";
|
|
18
19
|
import {
|
|
19
20
|
cancelTask,
|
|
20
21
|
getAgentById,
|
|
@@ -23,13 +24,14 @@ import {
|
|
|
23
24
|
init_context_key,
|
|
24
25
|
init_db,
|
|
25
26
|
slackContextKey
|
|
26
|
-
} from "./cli-
|
|
27
|
-
import"./cli-
|
|
27
|
+
} from "./cli-t53vnnxz.js";
|
|
28
|
+
import"./cli-4n4mdv21.js";
|
|
29
|
+
import"./cli-x23me2mg.js";
|
|
28
30
|
import"./cli-z2zcxes1.js";
|
|
29
|
-
import"./cli-
|
|
30
|
-
import"./cli-k9m7hetx.js";
|
|
31
|
+
import"./cli-d91pvmq1.js";
|
|
31
32
|
import"./cli-4j2mrzag.js";
|
|
32
|
-
import"./cli-
|
|
33
|
+
import"./cli-kk4f9r17.js";
|
|
34
|
+
import"./cli-2mbe7vk0.js";
|
|
33
35
|
import"./cli-e15jhafb.js";
|
|
34
36
|
import"./cli-7wmybrt5.js";
|
|
35
37
|
import"./cli-p9swy5t3.js";
|
|
@@ -122,7 +124,8 @@ function registerActionHandlers(app) {
|
|
|
122
124
|
thread_ts: originalTask.slackThreadTs,
|
|
123
125
|
text: `\uD83D\uDCAC Follow-up sent to *${agentName}* (${taskLink})`,
|
|
124
126
|
unfurl_links: false,
|
|
125
|
-
unfurl_media: false
|
|
127
|
+
unfurl_media: false,
|
|
128
|
+
...lead ? { username: getAgentDisplayName(lead), icon_emoji: getAgentEmoji(lead) } : {}
|
|
126
129
|
});
|
|
127
130
|
} catch (error) {
|
|
128
131
|
console.error("[Slack] Failed to post follow-up confirmation:", error);
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-a8ynhkyj.js";
|
|
7
7
|
import"./cli-rkndnn90.js";
|
|
8
8
|
import"./cli-b0p7rfnd.js";
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
9
|
+
import"./cli-t930g0xh.js";
|
|
10
|
+
import"./cli-t53vnnxz.js";
|
|
11
|
+
import"./cli-4n4mdv21.js";
|
|
12
|
+
import"./cli-x23me2mg.js";
|
|
13
13
|
import"./cli-z2zcxes1.js";
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-k9m7hetx.js";
|
|
14
|
+
import"./cli-d91pvmq1.js";
|
|
16
15
|
import"./cli-4j2mrzag.js";
|
|
17
|
-
import"./cli-
|
|
16
|
+
import"./cli-kk4f9r17.js";
|
|
17
|
+
import"./cli-2mbe7vk0.js";
|
|
18
18
|
import"./cli-e15jhafb.js";
|
|
19
19
|
import"./cli-7wmybrt5.js";
|
|
20
20
|
import"./cli-p9swy5t3.js";
|
|
@@ -9,8 +9,9 @@ import {
|
|
|
9
9
|
require_src
|
|
10
10
|
} from "./cli-rkndnn90.js";
|
|
11
11
|
import {
|
|
12
|
-
getMcpBaseUrl
|
|
13
|
-
|
|
12
|
+
getMcpBaseUrl,
|
|
13
|
+
init_constants
|
|
14
|
+
} from "./cli-x23me2mg.js";
|
|
14
15
|
import"./cli-7wmybrt5.js";
|
|
15
16
|
import {
|
|
16
17
|
__commonJS,
|
|
@@ -3591,6 +3592,9 @@ var upgradeWebSocket = defineWebSocketHelper((c, events) => {
|
|
|
3591
3592
|
return;
|
|
3592
3593
|
});
|
|
3593
3594
|
|
|
3595
|
+
// src/artifact-sdk/server.ts
|
|
3596
|
+
init_constants();
|
|
3597
|
+
|
|
3594
3598
|
// src/artifact-sdk/port.ts
|
|
3595
3599
|
import { createServer } from "node:net";
|
|
3596
3600
|
async function getAvailablePort() {
|
|
@@ -3743,6 +3747,7 @@ function createArtifactServer(opts) {
|
|
|
3743
3747
|
return artifact;
|
|
3744
3748
|
}
|
|
3745
3749
|
// src/commands/artifact.ts
|
|
3750
|
+
init_constants();
|
|
3746
3751
|
async function runArtifact(subcommand, args) {
|
|
3747
3752
|
switch (subcommand) {
|
|
3748
3753
|
case "serve":
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
|
-
ackSlackMessage,
|
|
3
2
|
bufferThreadMessage,
|
|
4
3
|
getBufferMessageCount,
|
|
5
4
|
wasEventSeen
|
|
6
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-17zxdgsq.js";
|
|
7
6
|
import {
|
|
8
7
|
hasOtherUserMention
|
|
9
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-nhcd7x43.js";
|
|
10
9
|
import {
|
|
11
10
|
resolveSlackUserId,
|
|
12
11
|
rewriteSlackMentions
|
|
13
|
-
} from "./cli-
|
|
14
|
-
import"./cli-
|
|
12
|
+
} from "./cli-7padk69a.js";
|
|
13
|
+
import"./cli-2k0ztbfp.js";
|
|
15
14
|
import {
|
|
16
15
|
createTaskWithSiblingAwareness
|
|
17
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-0sf92efp.js";
|
|
18
17
|
import {
|
|
18
|
+
ackSlackMessage,
|
|
19
19
|
ensureSlackThreadTree,
|
|
20
20
|
isSlackRenderV2Enabled,
|
|
21
21
|
require_dist
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-a8ynhkyj.js";
|
|
23
23
|
import"./cli-rkndnn90.js";
|
|
24
24
|
import"./cli-b0p7rfnd.js";
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-dh55d5fg.js";
|
|
25
|
+
import"./cli-t930g0xh.js";
|
|
27
26
|
import {
|
|
28
27
|
getAgentWorkingOnThread,
|
|
29
28
|
getLeadAgent,
|
|
@@ -31,18 +30,19 @@ import {
|
|
|
31
30
|
init_context_key,
|
|
32
31
|
init_db,
|
|
33
32
|
slackContextKey
|
|
34
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-t53vnnxz.js";
|
|
35
34
|
import {
|
|
36
35
|
init_env_flag,
|
|
37
36
|
init_resolver,
|
|
38
37
|
isEnvFlagEnabled,
|
|
39
38
|
resolveTemplate
|
|
40
|
-
} from "./cli-
|
|
39
|
+
} from "./cli-4n4mdv21.js";
|
|
40
|
+
import"./cli-x23me2mg.js";
|
|
41
41
|
import"./cli-z2zcxes1.js";
|
|
42
|
-
import"./cli-
|
|
43
|
-
import"./cli-k9m7hetx.js";
|
|
42
|
+
import"./cli-d91pvmq1.js";
|
|
44
43
|
import"./cli-4j2mrzag.js";
|
|
45
|
-
import"./cli-
|
|
44
|
+
import"./cli-kk4f9r17.js";
|
|
45
|
+
import"./cli-2mbe7vk0.js";
|
|
46
46
|
import"./cli-e15jhafb.js";
|
|
47
47
|
import"./cli-7wmybrt5.js";
|
|
48
48
|
import {
|
|
@@ -2,39 +2,39 @@ import {
|
|
|
2
2
|
convertResponsesMessages,
|
|
3
3
|
convertResponsesTools,
|
|
4
4
|
processResponsesStream
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-epsvdckx.js";
|
|
6
6
|
import {
|
|
7
7
|
clampOpenAIPromptCacheKey
|
|
8
8
|
} from "./cli-mrptpp86.js";
|
|
9
|
-
import"./cli-5m9j2spm.js";
|
|
10
9
|
import {
|
|
11
10
|
AzureOpenAI
|
|
12
11
|
} from "./cli-sajgpkqg.js";
|
|
12
|
+
import"./cli-5m9j2spm.js";
|
|
13
13
|
import {
|
|
14
14
|
retryProviderRequest
|
|
15
15
|
} from "./cli-s8s499xy.js";
|
|
16
|
-
import {
|
|
17
|
-
getProviderEnvValue
|
|
18
|
-
} from "./cli-4wgngmwv.js";
|
|
19
|
-
import"./cli-zyxs93y9.js";
|
|
20
16
|
import {
|
|
21
17
|
formatProviderError,
|
|
22
18
|
normalizeProviderError
|
|
23
19
|
} from "./cli-ch7t5v7n.js";
|
|
20
|
+
import {
|
|
21
|
+
getProviderEnvValue
|
|
22
|
+
} from "./cli-4wgngmwv.js";
|
|
23
|
+
import {
|
|
24
|
+
headersToRecord
|
|
25
|
+
} from "./cli-vapyk8sw.js";
|
|
26
|
+
import"./cli-zyxs93y9.js";
|
|
24
27
|
import {
|
|
25
28
|
buildBaseOptions,
|
|
26
29
|
createGrammarToolInputProperties
|
|
27
30
|
} from "./cli-vgexpfsr.js";
|
|
31
|
+
import"./cli-y2apkfe2.js";
|
|
28
32
|
import {
|
|
29
33
|
clampThinkingLevel
|
|
30
34
|
} from "./cli-w10fkrf1.js";
|
|
31
|
-
import"./cli-y2apkfe2.js";
|
|
32
35
|
import {
|
|
33
36
|
AssistantMessageEventStream
|
|
34
37
|
} from "./cli-8wrympd7.js";
|
|
35
|
-
import {
|
|
36
|
-
headersToRecord
|
|
37
|
-
} from "./cli-vapyk8sw.js";
|
|
38
38
|
import"./cli-p9swy5t3.js";
|
|
39
39
|
|
|
40
40
|
// node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js
|
|
@@ -3,18 +3,19 @@ import {
|
|
|
3
3
|
getEmbeddingProvider,
|
|
4
4
|
getMemoryStore,
|
|
5
5
|
init_constants
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
6
|
+
} from "./cli-1y1cm570.js";
|
|
7
|
+
import"./cli-0258203w.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
} from "./cli-t53vnnxz.js";
|
|
12
|
+
import"./cli-4n4mdv21.js";
|
|
13
|
+
import"./cli-x23me2mg.js";
|
|
13
14
|
import"./cli-z2zcxes1.js";
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-k9m7hetx.js";
|
|
15
|
+
import"./cli-d91pvmq1.js";
|
|
16
16
|
import"./cli-4j2mrzag.js";
|
|
17
|
-
import"./cli-
|
|
17
|
+
import"./cli-kk4f9r17.js";
|
|
18
|
+
import"./cli-2mbe7vk0.js";
|
|
18
19
|
import"./cli-p9swy5t3.js";
|
|
19
20
|
|
|
20
21
|
// src/be/memory/boot-reembed.ts
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embedScript,
|
|
3
3
|
embeddingProvider
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
4
|
+
} from "./cli-39vgrsep.js";
|
|
5
|
+
import"./cli-1y1cm570.js";
|
|
6
|
+
import"./cli-0258203w.js";
|
|
7
7
|
import {
|
|
8
8
|
getDb,
|
|
9
9
|
init_db
|
|
10
|
-
} from "./cli-
|
|
11
|
-
import"./cli-
|
|
10
|
+
} from "./cli-t53vnnxz.js";
|
|
11
|
+
import"./cli-4n4mdv21.js";
|
|
12
|
+
import"./cli-x23me2mg.js";
|
|
12
13
|
import"./cli-z2zcxes1.js";
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-k9m7hetx.js";
|
|
14
|
+
import"./cli-d91pvmq1.js";
|
|
15
15
|
import"./cli-4j2mrzag.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-kk4f9r17.js";
|
|
17
|
+
import"./cli-2mbe7vk0.js";
|
|
17
18
|
import"./cli-p9swy5t3.js";
|
|
18
19
|
|
|
19
20
|
// src/be/scripts/boot-reembed.ts
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDb,
|
|
3
3
|
init_db
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-t53vnnxz.js";
|
|
5
|
+
import"./cli-4n4mdv21.js";
|
|
6
|
+
import"./cli-x23me2mg.js";
|
|
6
7
|
import"./cli-z2zcxes1.js";
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-k9m7hetx.js";
|
|
8
|
+
import"./cli-d91pvmq1.js";
|
|
9
9
|
import {
|
|
10
10
|
init_secret_scrubber,
|
|
11
11
|
scrubSecrets
|
|
12
12
|
} from "./cli-4j2mrzag.js";
|
|
13
|
-
import"./cli-
|
|
13
|
+
import"./cli-kk4f9r17.js";
|
|
14
|
+
import"./cli-2mbe7vk0.js";
|
|
14
15
|
import"./cli-p9swy5t3.js";
|
|
15
16
|
|
|
16
17
|
// src/be/boot-scrub-logs.ts
|
|
@@ -12,15 +12,33 @@ import {
|
|
|
12
12
|
resolveClaudeBinary,
|
|
13
13
|
resolveClaudeBinaryArgv,
|
|
14
14
|
resolveClaudeBridgeEnabled
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-7ecgm5v0.js";
|
|
16
|
+
import"./cli-h0457a67.js";
|
|
16
17
|
import"./cli-psrqtw2m.js";
|
|
18
|
+
import"./cli-mhjnbgb6.js";
|
|
19
|
+
import"./cli-yv9dttkh.js";
|
|
17
20
|
import"./cli-tng3131n.js";
|
|
18
21
|
import"./cli-zm7njwzd.js";
|
|
19
22
|
import"./cli-cw70hymf.js";
|
|
20
|
-
import"./cli-
|
|
23
|
+
import"./cli-v1mwc5v2.js";
|
|
24
|
+
import"./cli-gztgc3hz.js";
|
|
25
|
+
import"./cli-e7d20cty.js";
|
|
26
|
+
import"./cli-8whqavk2.js";
|
|
27
|
+
import"./cli-3dpj7atn.js";
|
|
28
|
+
import"./cli-f14fvzag.js";
|
|
29
|
+
import"./cli-0258203w.js";
|
|
21
30
|
import"./cli-7zd05xb4.js";
|
|
31
|
+
import"./cli-x23me2mg.js";
|
|
22
32
|
import"./cli-z2zcxes1.js";
|
|
33
|
+
import"./cli-d91pvmq1.js";
|
|
23
34
|
import"./cli-4j2mrzag.js";
|
|
35
|
+
import"./cli-kk4f9r17.js";
|
|
36
|
+
import"./cli-2mbe7vk0.js";
|
|
37
|
+
import"./cli-6nh2qxvh.js";
|
|
38
|
+
import"./cli-4wgngmwv.js";
|
|
39
|
+
import"./cli-zyxs93y9.js";
|
|
40
|
+
import"./cli-w10fkrf1.js";
|
|
41
|
+
import"./cli-8wrympd7.js";
|
|
24
42
|
import"./cli-p9swy5t3.js";
|
|
25
43
|
export {
|
|
26
44
|
resolveClaudeBridgeEnabled,
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
checkClaudeManagedCredentials,
|
|
4
4
|
composeManagedUserMessage,
|
|
5
5
|
normalizeRepoUrl
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-qmdnhpej.js";
|
|
7
7
|
import"./cli-07er7wrs.js";
|
|
8
|
-
import"./cli-yv9dttkh.js";
|
|
9
8
|
import"./cli-d6n0thxw.js";
|
|
10
|
-
import"./cli-
|
|
9
|
+
import"./cli-yv9dttkh.js";
|
|
11
10
|
import"./cli-cw70hymf.js";
|
|
11
|
+
import"./cli-gz9sbyk3.js";
|
|
12
12
|
import"./cli-4j2mrzag.js";
|
|
13
13
|
import"./cli-p9swy5t3.js";
|
|
14
14
|
export {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MAX_PROFILE_FILE_LENGTH,
|
|
3
|
+
init_constants
|
|
4
|
+
} from "./cli-x23me2mg.js";
|
|
1
5
|
import {
|
|
2
6
|
init_secret_scrubber,
|
|
3
7
|
scrubSecrets
|
|
@@ -23,11 +27,27 @@ async function readIdentityBaselines(readFile = readFileIfExists) {
|
|
|
23
27
|
return null;
|
|
24
28
|
}
|
|
25
29
|
}
|
|
30
|
+
function warnProfileFileTooLarge(agentId, field, actualLength, source = "profile-sync") {
|
|
31
|
+
console.warn(`[${source}] Skipping profile sync for agent ${agentId}, field ${field}: ${actualLength} characters exceeds the ${MAX_PROFILE_FILE_LENGTH}-character cap.`);
|
|
32
|
+
}
|
|
33
|
+
async function writeProfileFileFromDb(filePath, dbContent, now = () => new Date) {
|
|
34
|
+
const file = Bun.file(filePath);
|
|
35
|
+
let backupPath = null;
|
|
36
|
+
if (await file.exists()) {
|
|
37
|
+
const localContent = await file.text();
|
|
38
|
+
if (localContent !== dbContent) {
|
|
39
|
+
backupPath = `${filePath}.pre-boot-${now().toISOString()}.bak`;
|
|
40
|
+
await Bun.write(backupPath, localContent);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
await Bun.write(filePath, dbContent);
|
|
44
|
+
return backupPath;
|
|
45
|
+
}
|
|
26
46
|
function resolveClaudeMdPath(completedProviders) {
|
|
27
47
|
const anyNonClaude = completedProviders.some((p) => p !== "claude");
|
|
28
48
|
return anyNonClaude ? WORKSPACE_CLAUDE_MD_PATH : CLAUDE_MD_PATH;
|
|
29
49
|
}
|
|
30
|
-
function extractSetupScriptContent(raw) {
|
|
50
|
+
function extractSetupScriptContent(raw, agentId = "unknown") {
|
|
31
51
|
if (!raw.trim())
|
|
32
52
|
return null;
|
|
33
53
|
const startIdx = raw.indexOf(SETUP_MARKER_START);
|
|
@@ -38,15 +58,21 @@ function extractSetupScriptContent(raw) {
|
|
|
38
58
|
} else {
|
|
39
59
|
content = raw.replace(/^#!\/bin\/bash\n/, "").trim();
|
|
40
60
|
}
|
|
41
|
-
if (!content
|
|
61
|
+
if (!content)
|
|
62
|
+
return null;
|
|
63
|
+
if (content.length > MAX_PROFILE_FILE_LENGTH) {
|
|
64
|
+
warnProfileFileTooLarge(agentId, "setupScript", content.length);
|
|
42
65
|
return null;
|
|
66
|
+
}
|
|
43
67
|
return content;
|
|
44
68
|
}
|
|
45
|
-
function buildIdentityPayload(files, baselines) {
|
|
69
|
+
function buildIdentityPayload(files, baselines, agentId = "unknown") {
|
|
46
70
|
const updates = {};
|
|
47
71
|
if (files.soulMd !== undefined) {
|
|
48
72
|
const content = files.soulMd;
|
|
49
|
-
if (baselines?.soulMd && contentSha256(content) === baselines.soulMd) {} else if (content.
|
|
73
|
+
if (baselines?.soulMd && contentSha256(content) === baselines.soulMd) {} else if (content.length > MAX_PROFILE_FILE_LENGTH) {
|
|
74
|
+
warnProfileFileTooLarge(agentId, "soulMd", content.length);
|
|
75
|
+
} else if (content.trim()) {
|
|
50
76
|
if (content.length < IDENTITY_FILE_MIN_LENGTH) {
|
|
51
77
|
console.error(`[profile-sync] Skipping SOUL.md sync: content too short (${content.length} chars, minimum ${IDENTITY_FILE_MIN_LENGTH}). This prevents accidental profile corruption.`);
|
|
52
78
|
} else {
|
|
@@ -56,7 +82,9 @@ function buildIdentityPayload(files, baselines) {
|
|
|
56
82
|
}
|
|
57
83
|
if (files.identityMd !== undefined) {
|
|
58
84
|
const content = files.identityMd;
|
|
59
|
-
if (baselines?.identityMd && contentSha256(content) === baselines.identityMd) {} else if (content.
|
|
85
|
+
if (baselines?.identityMd && contentSha256(content) === baselines.identityMd) {} else if (content.length > MAX_PROFILE_FILE_LENGTH) {
|
|
86
|
+
warnProfileFileTooLarge(agentId, "identityMd", content.length);
|
|
87
|
+
} else if (content.trim()) {
|
|
60
88
|
if (content.length < IDENTITY_FILE_MIN_LENGTH) {
|
|
61
89
|
console.error(`[profile-sync] Skipping IDENTITY.md sync: content too short (${content.length} chars, minimum ${IDENTITY_FILE_MIN_LENGTH}). This prevents accidental profile corruption.`);
|
|
62
90
|
} else {
|
|
@@ -66,13 +94,17 @@ function buildIdentityPayload(files, baselines) {
|
|
|
66
94
|
}
|
|
67
95
|
if (files.toolsMd !== undefined) {
|
|
68
96
|
const content = files.toolsMd;
|
|
69
|
-
if (baselines?.toolsMd && contentSha256(content) === baselines.toolsMd) {} else if (content.
|
|
97
|
+
if (baselines?.toolsMd && contentSha256(content) === baselines.toolsMd) {} else if (content.length > MAX_PROFILE_FILE_LENGTH) {
|
|
98
|
+
warnProfileFileTooLarge(agentId, "toolsMd", content.length);
|
|
99
|
+
} else if (content.trim()) {
|
|
70
100
|
updates.toolsMd = content;
|
|
71
101
|
}
|
|
72
102
|
}
|
|
73
103
|
if (files.heartbeatMd !== undefined) {
|
|
74
104
|
const content = files.heartbeatMd;
|
|
75
|
-
if (baselines?.heartbeatMd && contentSha256(content) === baselines.heartbeatMd) {} else if (content.length
|
|
105
|
+
if (baselines?.heartbeatMd && contentSha256(content) === baselines.heartbeatMd) {} else if (content.length > MAX_PROFILE_FILE_LENGTH) {
|
|
106
|
+
warnProfileFileTooLarge(agentId, "heartbeatMd", content.length);
|
|
107
|
+
} else {
|
|
76
108
|
updates.heartbeatMd = content;
|
|
77
109
|
}
|
|
78
110
|
}
|
|
@@ -88,7 +120,7 @@ async function readFileIfExists(path) {
|
|
|
88
120
|
return;
|
|
89
121
|
}
|
|
90
122
|
}
|
|
91
|
-
async function collectProfilePayloads(fields, changeSource, readFile = readFileIfExists, claudeMdPath = CLAUDE_MD_PATH) {
|
|
123
|
+
async function collectProfilePayloads(fields, changeSource, readFile = readFileIfExists, claudeMdPath = CLAUDE_MD_PATH, agentId = "unknown") {
|
|
92
124
|
const payloads = [];
|
|
93
125
|
const baselines = changeSource === "session_sync" ? await readIdentityBaselines(readFile) : null;
|
|
94
126
|
if (fields.includes("identity")) {
|
|
@@ -97,14 +129,16 @@ async function collectProfilePayloads(fields, changeSource, readFile = readFileI
|
|
|
97
129
|
identityMd: await readFile(IDENTITY_MD_PATH),
|
|
98
130
|
toolsMd: await readFile(TOOLS_MD_PATH),
|
|
99
131
|
heartbeatMd: await readFile(HEARTBEAT_MD_PATH)
|
|
100
|
-
}, baselines);
|
|
132
|
+
}, baselines, agentId);
|
|
101
133
|
if (Object.keys(updates).length > 0) {
|
|
102
134
|
payloads.push({ label: "identity", body: { ...updates, changeSource } });
|
|
103
135
|
}
|
|
104
136
|
}
|
|
105
137
|
if (fields.includes("claude")) {
|
|
106
138
|
const raw = await readFile(claudeMdPath);
|
|
107
|
-
if (raw
|
|
139
|
+
if (raw && raw.length > MAX_PROFILE_FILE_LENGTH) {
|
|
140
|
+
warnProfileFileTooLarge(agentId, "claudeMd", raw.length);
|
|
141
|
+
} else if (raw?.trim()) {
|
|
108
142
|
if (baselines?.claudeMd && contentSha256(raw) === baselines.claudeMd) {} else {
|
|
109
143
|
payloads.push({ label: "claude", body: { claudeMd: raw, changeSource } });
|
|
110
144
|
}
|
|
@@ -113,7 +147,7 @@ async function collectProfilePayloads(fields, changeSource, readFile = readFileI
|
|
|
113
147
|
if (fields.includes("setup")) {
|
|
114
148
|
const raw = await readFile(SETUP_SCRIPT_PATH);
|
|
115
149
|
if (raw !== undefined) {
|
|
116
|
-
const content = extractSetupScriptContent(raw);
|
|
150
|
+
const content = extractSetupScriptContent(raw, agentId);
|
|
117
151
|
if (content !== null) {
|
|
118
152
|
payloads.push({ label: "setup", body: { setupScript: content, changeSource } });
|
|
119
153
|
}
|
|
@@ -148,15 +182,16 @@ async function postProfileUpdate(opts, payload) {
|
|
|
148
182
|
async function syncProfileFilesToServer(opts) {
|
|
149
183
|
const changeSource = opts.changeSource ?? "session_sync";
|
|
150
184
|
const fields = opts.fields ?? ["identity", "claude", "setup"];
|
|
151
|
-
const payloads = await collectProfilePayloads(fields, changeSource, readFileIfExists, opts.claudeMdPath ?? CLAUDE_MD_PATH);
|
|
185
|
+
const payloads = await collectProfilePayloads(fields, changeSource, readFileIfExists, opts.claudeMdPath ?? CLAUDE_MD_PATH, opts.agentId);
|
|
152
186
|
for (const payload of payloads) {
|
|
153
187
|
await postProfileUpdate(opts, payload);
|
|
154
188
|
}
|
|
155
189
|
}
|
|
156
|
-
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,
|
|
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 ===";
|
|
157
191
|
var init_profile_sync = __esm(() => {
|
|
192
|
+
init_constants();
|
|
158
193
|
init_secret_scrubber();
|
|
159
194
|
CLAUDE_MD_PATH = `${process.env.HOME}/.claude/CLAUDE.md`;
|
|
160
195
|
});
|
|
161
196
|
|
|
162
|
-
export { contentSha256, writeIdentityBaselines, readIdentityBaselines, resolveClaudeMdPath, syncProfileFilesToServer, init_profile_sync };
|
|
197
|
+
export { contentSha256, writeIdentityBaselines, readIdentityBaselines, warnProfileFileTooLarge, writeProfileFileFromDb, resolveClaudeMdPath, syncProfileFilesToServer, init_profile_sync };
|