@desplega.ai/agent-swarm 2.8.3 → 2.9.1
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/dist/acp-adapter-g909b5hw.js +16 -0
- package/dist/acp-targets-ny75x1qy.js +23 -0
- package/dist/{actions-ewz7bp4g.js → actions-b9qgrmeq.js} +82 -21
- package/dist/agent-fs-provision-b5dhdsbd.js +27 -0
- package/dist/{amp-adapter-f25tqhnf.js → amp-adapter-vtax2c9s.js} +3 -3
- package/dist/{anthropic-messages-jkva0zps.js → anthropic-messages-r5xf5hqw.js} +37 -37
- package/dist/{app-mkptw0k7.js → app-g2z15hax.js} +9 -4
- package/dist/approval-notifications-yt13wp8r.js +23 -0
- package/dist/{assistant-c47rfe77.js → assistant-2cgfxsgk.js} +56 -33
- package/dist/{azure-openai-responses-wgtqkbr3.js → azure-openai-responses-590s1eea.js} +10 -10
- package/dist/{boot-args-schema-4vb0xsat.js → boot-args-schema-3gwy0f60.js} +1 -1
- package/dist/{boot-reembed-htr73hbs.js → boot-reembed-92g7s5zp.js} +1 -1
- package/dist/{boot-reembed-1ghy2sab.js → boot-reembed-mywmyp4s.js} +1 -1
- package/dist/{boot-scrub-sweep-yrytg42z.js → boot-scrub-sweep-7dkdzqxx.js} +84 -13
- package/dist/{boot-seeds-n2b3dx4e.js → boot-seeds-ce7rvgq1.js} +4 -4
- package/dist/{boxd-jmfqgkqa.js → boxd-wn235q80.js} +7 -7
- package/dist/claude-adapter-3m4q7735.js +28 -0
- package/dist/{claude-managed-adapter-hddmxjyj.js → claude-managed-adapter-t8nfgcgz.js} +4 -4
- package/dist/{claude-managed-setup-hfvry1bd.js → claude-managed-setup-c217draw.js} +10 -10
- package/dist/{claude-sdk-session-0hamqzc7.js → claude-sdk-session-7fbqm51z.js} +9386 -9196
- package/dist/{cli-yjdgea32.js → cli-1jx0srjt.js} +17 -17
- package/dist/{cli-sdvcrq5x.js → cli-1jykg0py.js} +18 -14
- package/dist/{cli-k96cecs7.js → cli-2czxfnvj.js} +1221 -357
- package/dist/{cli-qmqt520k.js → cli-2dq9yv8p.js} +2 -2
- package/dist/{cli-e2w34h6z.js → cli-2xs8tsf7.js} +132 -85
- package/dist/{cli-z8cvws4c.js → cli-2yjj3e31.js} +907 -56
- package/dist/{cli-mdpbjnzq.js → cli-32djehja.js} +42 -42
- package/dist/{cli-gpz1d0t2.js → cli-3j873zxq.js} +4 -4
- package/dist/cli-43ms35q9.js +270 -0
- package/dist/cli-47hz21se.js +25584 -0
- package/dist/{cli-n515ex5z.js → cli-4ymxrwg5.js} +16 -16
- package/dist/{cli-f1kwb5fc.js → cli-5a6pqy45.js} +333 -21
- package/dist/{cli-93t5s4zq.js → cli-5gpqgs8b.js} +2 -2
- package/dist/{cli-15204js0.js → cli-6237rnyr.js} +1 -1
- package/dist/{cli-4ax9mvvg.js → cli-67mwzr35.js} +9 -9
- package/dist/{cli-t5ys4ebm.js → cli-6945ywhr.js} +3 -3
- package/dist/{cli-0bcgyj5b.js → cli-6ehs4mta.js} +87 -8
- package/dist/{cli-6yygkr0w.js → cli-6ym4jhzp.js} +15 -7
- package/dist/{cli-8bpgbr8k.js → cli-7evph51z.js} +5 -5
- package/dist/{cli-dtdht77h.js → cli-7mv4h3sn.js} +2 -2
- package/dist/{cli-nx2n3z6p.js → cli-7sf9sb0w.js} +3 -2
- package/dist/{cli-pe4d96rb.js → cli-7zm3b3f5.js} +1 -1
- package/dist/cli-8zh9nrew.js +78 -0
- package/dist/cli-9ttx00s3.js +137 -0
- package/dist/{cli-x6t50dmw.js → cli-9w8712tq.js} +620 -281
- package/dist/{cli-8476gtwf.js → cli-b6px1k1q.js} +1 -1
- package/dist/{cli-k2rw11py.js → cli-b91nz213.js} +5 -5
- package/dist/{cli-7c5tgqhf.js → cli-bg63qmsx.js} +10 -10
- package/dist/{cli-qps8je6j.js → cli-bkjdknnp.js} +54 -10
- package/dist/{cli-gn9y6fn7.js → cli-bnqncekd.js} +2 -2
- package/dist/{cli-s7zz734a.js → cli-br0924pw.js} +1 -1
- package/dist/{cli-h9yy18gy.js → cli-ctx0b85j.js} +5484 -5078
- package/dist/{cli-0vksaxvr.js → cli-dgs10ttj.js} +2 -2
- package/dist/cli-dqgnbnxs.js +132 -0
- package/dist/{cli-q6mfk1ej.js → cli-dzzh58sy.js} +2 -2
- package/dist/{cli-2znm3dzj.js → cli-eds5xnsz.js} +2 -2
- package/dist/{cli-c0xjnr8z.js → cli-f3jyzq4g.js} +2 -2
- package/dist/cli-f8x9drqr.js +84 -0
- package/dist/{cli-ztq5z4e1.js → cli-f9gz2vyj.js} +6 -6
- package/dist/{cli-bhsfbmk8.js → cli-fh97xn30.js} +93 -44
- package/dist/cli-fkef327x.js +103 -0
- package/dist/{cli-fsgttth8.js → cli-g0vv9dg4.js} +13 -13
- package/dist/{cli-kd56bmk4.js → cli-gabsjg8x.js} +3 -1
- package/dist/{cli-1m96dc36.js → cli-gfy38pvt.js} +3 -3
- package/dist/{cli-922z7gwm.js → cli-h9yqfzx9.js} +15 -11
- package/dist/{cli-5a7szzfh.js → cli-hnamkvnc.js} +2 -2
- package/dist/{cli-c3ng0mb4.js → cli-j7svy295.js} +71 -818
- package/dist/{cli-yss07azk.js → cli-jaw5v1sy.js} +3 -3
- package/dist/cli-jkw6ptfw.js +921 -0
- package/dist/{cli-s8p8hhty.js → cli-jm0hvmz2.js} +2 -2
- package/dist/{cli-knva3nmx.js → cli-jwampxxq.js} +8 -6
- package/dist/cli-kj0hyr43.js +51 -0
- package/dist/{cli-tnzebztn.js → cli-kpgcm7xy.js} +13 -1
- package/dist/{cli-9zmb7ptc.js → cli-kxx4k2jw.js} +8 -753
- package/dist/{cli-am1ptset.js → cli-m7c2380k.js} +208 -194
- package/dist/{cli-kw44j53p.js → cli-m7zvgt57.js} +45 -38
- package/dist/{cli-504akrp9.js → cli-meydjstb.js} +3 -3
- package/dist/{cli-54qr8mcd.js → cli-mhapr559.js} +4 -4
- package/dist/{cli-tf79ryyy.js → cli-mjw0yf82.js} +3 -3
- package/dist/{cli-rjvsf9qa.js → cli-mkwkwq81.js} +14 -11
- package/dist/{cli-n30e0hcp.js → cli-mna6pmfx.js} +2 -2
- package/dist/{cli-awwptga4.js → cli-mw620q3n.js} +1 -1
- package/dist/{cli-6wj7p986.js → cli-n3qe7tyr.js} +172 -168
- package/dist/{cli-4dpkjc2e.js → cli-nafvvsp8.js} +9 -9
- package/dist/{cli-sg27rk2t.js → cli-nbt14he0.js} +25 -19
- package/dist/{cli-7akn6ze9.js → cli-nh7x3133.js} +7 -28
- package/dist/{cli-zdaypkq9.js → cli-p4kckx1z.js} +285 -97
- package/dist/{cli-n5t077me.js → cli-pb2ay3sh.js} +10 -3
- package/dist/{cli-t4dv07kr.js → cli-psffsanb.js} +4 -3
- package/dist/{cli-mwwmka77.js → cli-pyjn0qhk.js} +2712 -268
- package/dist/{cli-emekyyhr.js → cli-q2d3e1k1.js} +1 -1
- package/dist/{cli-vqva1teb.js → cli-qe909n63.js} +2 -2
- package/dist/{cli-2d0cghfn.js → cli-qj39vrc6.js} +1 -1
- package/dist/{cli-tas6ckky.js → cli-rq5rpv6k.js} +2 -2
- package/dist/{cli-0agcv1v5.js → cli-rqx70rcz.js} +2 -2
- package/dist/{cli-kmemts3w.js → cli-sn650d7x.js} +39 -69
- package/dist/{cli-98rwmcyc.js → cli-snxhtehz.js} +3 -3
- package/dist/{cli-d829z3xc.js → cli-spfz393q.js} +6 -6
- package/dist/{cli-500c09j9.js → cli-t9ga4qmb.js} +14 -14
- package/dist/{cli-me0r8gzr.js → cli-td9tb872.js} +27 -25
- package/dist/cli-tvc4jag9.js +754 -0
- package/dist/{cli-6ek0hff4.js → cli-ty3gha1p.js} +4 -4
- package/dist/{cli-c71n3bxq.js → cli-v57d7fmm.js} +2 -2
- package/dist/{cli-j8cjdzan.js → cli-vs9vdpy0.js} +1 -1
- package/dist/cli-vt89089n.js +296 -0
- package/dist/{cli-pxwtcgcp.js → cli-vyff45ve.js} +2 -2
- package/dist/{cli-x3ex5bqf.js → cli-w16kwbzw.js} +1 -1
- package/dist/{cli-bj6qhgte.js → cli-w4n323t3.js} +197 -45
- package/dist/{cli-rqfvkx5t.js → cli-wn13hhdt.js} +13 -13
- package/dist/{cli-skmhsnqh.js → cli-x40a0w9j.js} +1 -1
- package/dist/{cli-zeaehgyd.js → cli-xag7btpe.js} +2 -2
- package/dist/{cli-k28wkapa.js → cli-xf1wn5ns.js} +2 -2
- package/dist/{cli-rh15cakt.js → cli-xwsm6xkr.js} +1 -1
- package/dist/{cli-dpsfwh7n.js → cli-y2ewxhth.js} +56 -31
- package/dist/{cli-vx421edw.js → cli-ysvspf5e.js} +9 -7
- package/dist/{cli-crpf163n.js → cli-zh0e5x7p.js} +16 -26
- package/dist/{cli-4e1hfbpq.js → cli-zr6qy15y.js} +24 -24
- package/dist/cli.js +33 -29
- package/dist/{codex-adapter-2brxx5ta.js → codex-adapter-n656pvb8.js} +9 -8
- package/dist/{codex-hook-c930c3ea.js → codex-hook-59atdwd8.js} +6 -6
- package/dist/{codex-login-cbrs1h5w.js → codex-login-a239g1ah.js} +1 -1
- package/dist/{codex-session-runner-y9anfj0r.js → codex-session-runner-p0fbv5y9.js} +10 -9
- package/dist/{commands-wn9q06qr.js → commands-gwea8z5p.js} +3 -3
- package/dist/{controller-fw608czd.js → controller-t67c3grh.js} +9 -6
- package/dist/{controllers-connect-63j5rdcm.js → controllers-connect-ks155r0h.js} +28 -25
- package/dist/{cursor-adapter-6mb9jme8.js → cursor-adapter-ygwrtmkv.js} +2 -2
- package/dist/{db-y4wfrzbm.js → db-kpmx06s9.js} +21 -13
- package/dist/{db-0m6v5tq4.js → db-rb2xqdb1.js} +3 -3
- package/dist/{devin-adapter-r0yx3gv8.js → devin-adapter-zp4tqq53.js} +1 -1
- package/dist/{dispatcher-9tq2zzdj.js → dispatcher-31sm0ej2.js} +21 -18
- package/dist/{docker-j75atvpt.js → docker-09tkkg0n.js} +47 -8
- package/dist/{dsh-adapter-t09sv4tq.js → dsh-adapter-qyxh0w31.js} +2 -2
- package/dist/{e2b-a7vzs2vj.js → e2b-3v1e745x.js} +6 -6
- package/dist/{e2b-7s9dscap.js → e2b-sm28k0k3.js} +6 -6
- package/dist/{easter-egg-3d-fbwvmwhe.js → easter-egg-3d-00wjscn6.js} +1 -1
- package/dist/{embedding-space-wh8de1t9.js → embedding-space-qhw4g68n.js} +6 -6
- package/dist/{embeddings-3hpbdtjr.js → embeddings-zdv9ke6x.js} +1 -1
- package/dist/{event-bus-tr6h3gv8.js → event-bus-xr83x566.js} +1 -1
- package/dist/{execute-4bdf8sdy.js → execute-zna8wwr7.js} +1 -1
- package/dist/{external-channel-ts2fwqh0.js → external-channel-1ac6t56s.js} +2 -2
- package/dist/fx-adapter-sk7n0fzc.js +19 -0
- package/dist/{getMachineId-bsd-nfgrzarv.js → getMachineId-bsd-637a7rbk.js} +3 -3
- package/dist/{getMachineId-darwin-wz886dsk.js → getMachineId-darwin-9vytrcnn.js} +3 -3
- package/dist/{getMachineId-linux-1nng3p1p.js → getMachineId-linux-mkzsvyyz.js} +3 -3
- package/dist/{getMachineId-unsupported-a0428vw9.js → getMachineId-unsupported-4cfs2n11.js} +3 -3
- package/dist/{getMachineId-win-h45922nq.js → getMachineId-win-154s3qma.js} +3 -3
- package/dist/{google-generative-ai-h7s3e9kk.js → google-generative-ai-maq6c9bf.js} +1 -1
- package/dist/{google-vertex-fhxaafzw.js → google-vertex-2jgsw2nb.js} +5 -5
- package/dist/grok-adapter-sjbcm5ew.js +19 -0
- package/dist/handlers-yzy0c87x.js +35 -0
- package/dist/{heartbeat-2ze5fzpc.js → heartbeat-2f6z4kdx.js} +24 -21
- package/dist/{hook-gaehe2w5.js → hook-8y0gvtp1.js} +14 -14
- package/dist/{hook-ca54yd4s.js → hook-w1skzaqc.js} +5 -5
- package/dist/{http-jfg8t2yk.js → http-wghxvpef.js} +2333 -589
- package/dist/{index-d6wkh8ar.js → index-0h6qd4p1.js} +34 -24
- package/dist/index-25pvya7q.js +40 -0
- package/dist/index-2t4859r5.js +35 -0
- package/dist/{index-enn321kd.js → index-42jq9yy3.js} +3 -3
- package/dist/{index-khe3gp0k.js → index-4k7m5dgj.js} +645 -370
- package/dist/index-620y7jzq.js +15 -0
- package/dist/{index-gjwaqaq8.js → index-8p0j4h4j.js} +506 -43
- package/dist/{index-3gv6sc4z.js → index-8zn8nxn5.js} +1 -1
- package/dist/{index-m5gx1xd6.js → index-9myfj74s.js} +40 -40
- package/dist/{index-3yvzbhxd.js → index-9zkchs9t.js} +336 -193
- package/dist/{index-0rvk3vd4.js → index-b5wgnm78.js} +47 -47
- package/dist/index-cxca2t8y.js +36 -0
- package/dist/{index-qwj6ntem.js → index-e3krvkh2.js} +4 -4
- package/dist/{index-hjhfk3ra.js → index-pe3d8jfy.js} +3 -3
- package/dist/index-rv89fvzf.js +572 -0
- package/dist/{index-csgrxedz.js → index-s71ez27v.js} +1 -1
- package/dist/{keepalive-k2a3qe73.js → keepalive-sh02349h.js} +4 -4
- package/dist/lead-gk4h5eg7.js +74 -0
- package/dist/{maintenance-gb5sd5nc.js → maintenance-yj0dcjja.js} +1 -1
- package/dist/{node-252anz2h.js → node-dqm4xgxw.js} +4 -4
- package/dist/{node-ray25snp.js → node-zd6shky9.js} +3 -3
- package/dist/{oauth-refresh-sweep-y7rm6bkb.js → oauth-refresh-sweep-d9xedk66.js} +3 -3
- package/dist/{onboard-jmc5qerv.js → onboard-dpgjn03r.js} +8 -8
- package/dist/{openai-codex-responses-k9gapdze.js → openai-codex-responses-bkcd8pjj.js} +9 -9
- package/dist/{openai-responses-4d5dx3c7.js → openai-responses-gbh0wfqe.js} +13 -13
- package/dist/{opencode-adapter-7eade9ev.js → opencode-adapter-2d31cpjc.js} +7 -6
- package/dist/{otel-impl-8j1xhxqd.js → otel-impl-1skarpfq.js} +110 -110
- package/dist/pending-bfmxtx0g.js +82 -0
- package/dist/{pi-mono-adapter-yqmaf32x.js → pi-mono-adapter-gvppnasy.js} +43 -16
- package/dist/{pricing-refresh-1nj722h6.js → pricing-refresh-c6b325mk.js} +2 -2
- package/dist/{rbac-roles-b1mtr6dr.js → rbac-roles-h80qbdbs.js} +3 -3
- package/dist/{rbac-roles-n1f3frk1.js → rbac-roles-zfcx68tx.js} +10 -3
- package/dist/{render-v2-1gfpd8rj.js → render-v2-nx20t3rb.js} +7 -4
- package/dist/{resume-w1s1eh5v.js → resume-5ep8agan.js} +11 -7
- package/dist/{runtime-84g5egsc.js → runtime-r3pj4mce.js} +1 -1
- package/dist/{session-access-y6z1txk4.js → session-access-n7p3m15b.js} +4 -4
- package/dist/{session-source-backfill-gxxwfh12.js → session-source-backfill-v8mt0zwn.js} +4 -4
- package/dist/{setup-r91gstyk.js → setup-z1psaqhe.js} +1 -1
- package/dist/thread-buffer-a1re2r9r.js +38 -0
- package/dist/{virtual-modules-cgnj6kme.js → virtual-modules-rrbjdpxn.js} +5 -5
- package/dist/{work-objects-qcxzg61c.js → work-objects-4aghh73z.js} +31 -23
- package/dist/worker-3dyyb8ev.js +74 -0
- package/dist/{worker-follow-up-y2d2h7km.js → worker-follow-up-166zmex1.js} +21 -18
- package/dist/{x-qhxq2ama.js → x-wg164ss9.js} +2 -2
- package/openapi.json +2561 -131
- package/package.json +15 -11
- package/plugin/commands/create-pr.md +1 -1
- package/plugin/pi-skills/create-pr/SKILL.md +1 -1
- package/src/apps/action-runner.ts +21 -1
- package/src/apps/catalog.generated.json +667 -18
- package/src/apps/page-validator.ts +341 -8
- package/src/assets/key.ts +6 -0
- package/src/be/agent-fs-user-keys.ts +186 -0
- package/src/be/audit-user.ts +27 -13
- package/src/be/automation-preflight.test.ts +14 -14
- package/src/be/automation-preflight.ts +24 -16
- package/src/be/boot-scrub-sweep.ts +143 -14
- package/src/be/caller-session-group.ts +86 -0
- package/src/be/checklist.ts +375 -0
- package/src/be/db/agents.ts +12 -1
- package/src/be/db/approvals.ts +26 -0
- package/src/be/db/model-profiles.ts +4 -1
- package/src/be/db/session-costs.ts +219 -0
- package/src/be/db/session-log-reasoning.ts +36 -0
- package/src/be/db/session-moves.ts +23 -0
- package/src/be/db/session-tree.ts +78 -19
- package/src/be/db/tasks/eligibility-scan.ts +14 -0
- package/src/be/db/tasks/read.ts +7 -3
- package/src/be/db/tasks/slack-fold.ts +116 -0
- package/src/be/db/tasks/write.ts +67 -1
- package/src/be/db-queries/mcp-servers.ts +13 -0
- package/src/be/db-queries/oauth.ts +6 -0
- package/src/be/db-queries/task-artifacts.ts +10 -8
- package/src/be/db.ts +242 -319
- package/src/be/extensions/assets.ts +17 -13
- package/src/be/import/config.ts +54 -0
- package/src/be/import/dir-source.ts +372 -0
- package/src/be/import/index.ts +149 -0
- package/src/be/import/pending.ts +71 -0
- package/src/be/import/schema.ts +137 -0
- package/src/be/import/seeders.ts +462 -0
- package/src/be/key-window-usage.ts +385 -0
- package/src/be/migrations/297_import_ownership.sql +34 -0
- package/src/be/migrations/301_favorites_key_type.sql +36 -0
- package/src/be/migrations/302_checklist_items.sql +23 -0
- package/src/be/migrations/303_task_ui_specs.sql +28 -0
- package/src/be/migrations/306_provider_account_telemetry.sql +1 -0
- package/src/be/migrations/307_session_cost_credential_attribution.sql +23 -0
- package/src/be/migrations/310_session_logs_reasoning.sql +12 -0
- package/src/be/multi-runtime.ts +8 -1
- package/src/be/rbac-roles.ts +8 -1
- package/src/be/runtime-pools/db.ts +3 -0
- package/src/be/runtime-pools/demand.ts +20 -2
- package/src/be/runtime-pools/reachability.ts +31 -0
- package/src/be/runtime-pools/routing.ts +8 -1
- package/src/be/runtime-pools/supervisor.ts +6 -7
- package/src/be/savings/read.ts +8 -6
- package/src/be/script-credential-broker.ts +2 -2
- package/src/be/scripts/typecheck.ts +4 -4
- package/src/be/seed/agent-fs-provision.ts +104 -19
- package/src/be/seed/index.ts +1 -1
- package/src/be/seed/registry.ts +27 -8
- package/src/be/seed/runner.ts +1 -1
- package/src/be/seed/schedules-seeder.ts +24 -6
- package/src/be/seed/seed-toggle.ts +32 -0
- package/src/be/seed/types.ts +6 -0
- package/src/be/seed-scripts/catalog/boot-triage.inline.ts +1 -0
- package/src/be/seed-scripts/catalog/boot-triage.ts +1 -0
- package/src/be/seed-scripts/catalog/dreaming-gather.ts +2 -2
- package/src/be/seed-scripts/catalog/wait-for-task.ts +5 -1
- package/src/be/seed-skills/index.ts +3 -0
- package/src/be/steering.ts +27 -4
- package/src/be/swarm-config-guard.ts +54 -1
- package/src/be/task-citations.ts +8 -5
- package/src/be/task-ui-spec.ts +158 -0
- package/src/commands/controller.ts +3 -0
- package/src/commands/credential-outcome-report.ts +13 -3
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/rate-limit-outcome.ts +6 -0
- package/src/commands/runner.ts +95 -55
- package/src/e2b/env.ts +2 -0
- package/src/extensions/catalog.generated.json +17 -0
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/github/app.ts +10 -1
- package/src/github/handlers.ts +6 -3
- package/src/github/reactions.ts +12 -14
- package/src/heartbeat/heartbeat.ts +14 -4
- package/src/http/agents.ts +19 -10
- package/src/http/all-routes.ts +2 -0
- package/src/http/api-keys.ts +258 -30
- package/src/http/approval-requests.ts +24 -4
- package/src/http/apps.ts +69 -5
- package/src/http/checklist.ts +176 -0
- package/src/http/db-query-bounded.ts +256 -11
- package/src/http/db-query-shared.ts +9 -0
- package/src/http/favorites.ts +14 -2
- package/src/http/fs.ts +346 -1
- package/src/http/index.ts +29 -1
- package/src/http/kv.ts +13 -0
- package/src/http/mcp-oauth.ts +1 -1
- package/src/http/mcp-servers.ts +15 -2
- package/src/http/onboarding.ts +2 -9
- package/src/http/poll.ts +45 -0
- package/src/http/script-connections.ts +1 -0
- package/src/http/session-data.ts +74 -23
- package/src/http/sessions.ts +23 -2
- package/src/http/slack-events.ts +101 -0
- package/src/http/status.ts +25 -7
- package/src/http/task-requester.ts +46 -0
- package/src/http/tasks.ts +169 -42
- package/src/http/users.ts +14 -0
- package/src/http/webhooks.ts +15 -0
- package/src/integrations/cards/index.ts +151 -0
- package/src/integrations/chat-sdk/outbound.ts +39 -13
- package/src/integrations/chat-sdk/relay.ts +87 -0
- package/src/integrations/chat-sdk/runtime.ts +7 -1
- package/src/integrations/chat-sdk/status.ts +17 -0
- package/src/integrations/chat-sdk/telegram-api.ts +6 -1
- package/src/jira/outbound.ts +5 -3
- package/src/kv-reserved-namespaces.ts +17 -2
- package/src/linear/outbound.ts +5 -1
- package/src/oauth/presets.ts +29 -2
- package/src/prompts/base-prompt.ts +25 -4
- package/src/prompts/session-templates.ts +102 -8
- package/src/providers/acp-targets.ts +1 -1
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/claude-adapter.ts +27 -4
- package/src/providers/claude-flag-settings.ts +39 -1
- package/src/providers/claude-managed-adapter.ts +5 -1
- package/src/providers/codex-adapter.ts +86 -4
- package/src/providers/codex-app-server.ts +11 -16
- package/src/providers/codex-oauth/auth-json.ts +1 -0
- package/src/providers/opencode-adapter.ts +7 -19
- package/src/providers/pi-mono-adapter.ts +35 -2
- package/src/providers/pricing-sources.md +32 -0
- package/src/providers/runtime-dependencies.ts +158 -0
- package/src/providers/types.ts +11 -0
- package/src/rbac/legacy-policy.ts +2 -0
- package/src/rbac/permissions.ts +10 -1
- package/src/runtime-providers/docker.ts +65 -1
- package/src/scheduler/deferred-task-waits.ts +18 -5
- package/src/scripts-runtime/credential-broker/default-bindings.ts +19 -11
- package/src/scripts-runtime/credential-broker/index.ts +1 -1
- package/src/scripts-runtime/egress-secrets.ts +2 -2
- package/src/scripts-runtime/swarm-sdk.ts +3 -2
- package/src/scripts-runtime/types/stdlib.d.ts +11 -4
- package/src/scripts-runtime/types/swarm-extension.d.ts +9 -9
- package/src/scripts-runtime/types/swarm-sdk.d.ts +11 -4
- package/src/server.ts +4 -4
- package/src/slack/actions.ts +56 -0
- package/src/slack/app.ts +107 -59
- package/src/slack/assistant.ts +33 -7
- package/src/slack/handlers.ts +6 -4
- package/src/slack/http-receiver.ts +284 -0
- package/src/slack/inbound-dispatch.ts +43 -7
- package/src/slack/inbound-files.ts +35 -14
- package/src/slack/message-text.ts +47 -4
- package/src/slack/render-v2.ts +109 -24
- package/src/slack/responses.ts +3 -2
- package/src/slack/socket-ack.ts +17 -10
- package/src/slack/steering.ts +5 -0
- package/src/slack/thread-buffer-store.ts +58 -0
- package/src/slack/thread-buffer.ts +341 -57
- package/src/slack/work-objects.ts +4 -1
- package/src/tasks/context-key.ts +24 -0
- package/src/tasks/errors.ts +5 -0
- package/src/tasks/sibling-awareness.ts +13 -1
- package/src/tests/acp-adapter.test.ts +4 -6
- package/src/tests/agent-fs-live-url.test.ts +15 -0
- package/src/tests/agent-fs-provision-seeder.test.ts +140 -0
- package/src/tests/agent-fs-user-keys.test.ts +483 -0
- package/src/tests/agentfs-proxy.test.ts +8 -8
- package/src/tests/api-key-tracking.test.ts +0 -72
- package/src/tests/api-keys-status-model-limits.test.ts +93 -1
- package/src/tests/api-keys-validation.test.ts +42 -0
- package/src/tests/approval-card-resolution.test.ts +402 -0
- package/src/tests/approval-requests-notifications.test.ts +12 -2
- package/src/tests/approval-respond-auth.test.ts +28 -0
- package/src/tests/apps-action-parent-task.test.ts +140 -0
- package/src/tests/apps-catalog-additions.test.ts +315 -0
- package/src/tests/apps-catalog-files.test.ts +114 -0
- package/src/tests/apps-catalog-hitl.test.ts +117 -0
- package/src/tests/apps-catalog-inputs.test.ts +86 -0
- package/src/tests/apps-catalog-page-frame.test.ts +49 -0
- package/src/tests/apps-catalog-table.test.ts +47 -0
- package/src/tests/apps-chart-shell.test.ts +1 -1
- package/src/tests/apps-element-assembly.test.ts +52 -3
- package/src/tests/apps-session-thread.test.ts +261 -0
- package/src/tests/asset-key-invariants.test.ts +14 -0
- package/src/tests/base-prompt.test.ts +213 -23
- package/src/tests/boot-scrub-sweep.test.ts +172 -0
- package/src/tests/caller-session-group.test.ts +199 -0
- package/src/tests/cards.test.ts +169 -0
- package/src/tests/chat-sdk-relay.test.ts +149 -1
- package/src/tests/chat-sdk-status-route.test.ts +16 -3
- package/src/tests/chat-sdk-telegram-token.test.ts +76 -0
- package/src/tests/chat-sdk-tools.test.ts +147 -0
- package/src/tests/checklist-nudge.test.ts +208 -0
- package/src/tests/checklist.test.ts +686 -0
- package/src/tests/claude-adapter-binary.test.ts +67 -6
- package/src/tests/claude-flag-settings.test.ts +29 -0
- package/src/tests/claude-sdk-lifecycle.test.ts +5 -0
- package/src/tests/codex-adapter.test.ts +340 -2
- package/src/tests/codex-app-server.test.ts +32 -0
- package/src/tests/codex-oauth.test.ts +3 -1
- package/src/tests/codex-rate-limits.test.ts +384 -0
- package/src/tests/comb-config-guard.test.ts +21 -0
- package/src/tests/comb-default.test.ts +59 -97
- package/src/tests/comb-links.test.ts +86 -16
- package/src/tests/comb-status.test.ts +24 -27
- package/src/tests/create-page-tool.test.ts +101 -1
- package/src/tests/create-schedule-key.test.ts +105 -0
- package/src/tests/credential-broker.test.ts +2 -2
- package/src/tests/credential-outcome-report.test.ts +20 -0
- package/src/tests/db-query.test.ts +87 -1
- package/src/tests/db-task-read-contract.test.ts +4 -0
- package/src/tests/db-task-write-contract.test.ts +6 -1
- package/src/tests/deferred-task-wake.test.ts +63 -1
- package/src/tests/docker-isolation-config-guard.test.ts +29 -0
- package/src/tests/docs-index-footprint.test.js +11 -3
- package/src/tests/e2e-visuals-comment.test.ts +82 -0
- package/src/tests/e2e-visuals-verify-pr.test.ts +138 -0
- package/src/tests/entrypoint-github-enterprise.test.ts +158 -0
- package/src/tests/extensions-assets.test.ts +7 -3
- package/src/tests/extensions-catalog.test.ts +1 -0
- package/src/tests/extensions-example-sql-admin-only.test.ts +201 -0
- package/src/tests/extensions-pre-task.test.ts +3 -3
- package/src/tests/extensions-steering.test.ts +14 -2
- package/src/tests/favorites-agent-fs-path.test.ts +124 -0
- package/src/tests/fetch-resolved-env.test.ts +68 -0
- package/src/tests/fixtures/import-package.ts +32 -0
- package/src/tests/fixtures/runner-missing-dependency.ts +129 -0
- package/src/tests/fixtures/ui-spec-slack/deploys.json +121 -0
- package/src/tests/fixtures/ui-spec-slack/incident.json +183 -0
- package/src/tests/fixtures/ui-spec-slack/three-charts-stale.json +196 -0
- package/src/tests/fixtures/ui-spec-slack/video-rejected-by-slack.json +183 -0
- package/src/tests/fixtures/ui-spec-slack/video.json +446 -0
- package/src/tests/fs-routes.test.ts +505 -2
- package/src/tests/github-ghes-mock.test.ts +196 -0
- package/src/tests/github-host.test.ts +285 -0
- package/src/tests/gitleaks-download-retry.test.ts +85 -0
- package/src/tests/heartbeat-supersede-resume.test.ts +73 -0
- package/src/tests/heartbeat.test.ts +56 -0
- package/src/tests/human-thread-routing.test.ts +187 -0
- package/src/tests/import-config.test.ts +209 -0
- package/src/tests/import.test.ts +464 -0
- package/src/tests/invites-http.test.ts +144 -1
- package/src/tests/jira-outbound-sync.test.ts +33 -1
- package/src/tests/key-window-usage.test.ts +831 -0
- package/src/tests/kv-http.test.ts +11 -0
- package/src/tests/linear-outbound-sync.test.ts +30 -1
- package/src/tests/literal-matcher.test.ts +58 -0
- package/src/tests/mcp-oauth-manual-client.test.ts +1 -1
- package/src/tests/oauth-presets.test.ts +12 -0
- package/src/tests/pi-mono-adapter.test.ts +79 -0
- package/src/tests/pool-affinity.test.ts +50 -0
- package/src/tests/preload-env.test.ts +2 -0
- package/src/tests/preload.ts +3 -1
- package/src/tests/prompt-template-session.test.ts +53 -5
- package/src/tests/provider-quota-persistence.test.ts +362 -0
- package/src/tests/provider-registration.test.ts +2 -55
- package/src/tests/provider-runtime-dependencies.test.ts +212 -0
- package/src/tests/rate-limit-event.test.ts +22 -0
- package/src/tests/rbac-admission.test.ts +19 -0
- package/src/tests/rbac-charact-misc-tools.test.ts +31 -0
- package/src/tests/rbac-engine.test.ts +2 -0
- package/src/tests/rbac-roles.test.ts +2 -0
- package/src/tests/reasoning-events.test.ts +164 -0
- package/src/tests/routing-affinity-inventory.test.ts +22 -0
- package/src/tests/runner-missing-dependency.test.ts +61 -0
- package/src/tests/runtime-pool-reachability.test.ts +135 -1
- package/src/tests/runtime-pool-routing.test.ts +52 -0
- package/src/tests/runtime-providers-docker.test.ts +91 -0
- package/src/tests/runtime-stale-threshold.test.ts +40 -0
- package/src/tests/savings-fleet-slices.test.ts +122 -0
- package/src/tests/savings-read.test.ts +41 -0
- package/src/tests/savings-scripts.test.ts +9 -3
- package/src/tests/script-connections.test.ts +7 -0
- package/src/tests/script-executor-conformance.test.ts +41 -4
- package/src/tests/secret-canary-sweep.test.ts +41 -5
- package/src/tests/secret-scrub-gate.test.ts +257 -0
- package/src/tests/seed-registry.test.ts +142 -9
- package/src/tests/seed-scripts.test.ts +23 -0
- package/src/tests/session-cost-attribution.test.ts +748 -0
- package/src/tests/session-costs.test.ts +14 -15
- package/src/tests/session-logs.test.ts +83 -0
- package/src/tests/session-source-keys.test.ts +42 -1
- package/src/tests/sessions-detail-batch.test.ts +7 -0
- package/src/tests/sessions-move.test.ts +70 -0
- package/src/tests/sessions-tree.test.ts +98 -0
- package/src/tests/sessions.test.ts +69 -0
- package/src/tests/slack-config.test.ts +4 -18
- package/src/tests/slack-http-receiver.test.ts +472 -0
- package/src/tests/slack-inbound-logging.test.ts +64 -0
- package/src/tests/slack-leave-thread.test.ts +1 -1
- package/src/tests/slack-message-text.test.ts +104 -0
- package/src/tests/slack-mode-lifecycle.test.ts +6 -4
- package/src/tests/slack-render-v2.test.ts +405 -0
- package/src/tests/slack-skip-reaction.test.ts +2 -2
- package/src/tests/slack-start-reload-race.test.ts +67 -0
- package/src/tests/slack-steering.test.ts +22 -10
- package/src/tests/slack-thread-buffer-context.test.ts +1 -1
- package/src/tests/slack-thread-buffer-fold.test.ts +417 -0
- package/src/tests/slack-thread-buffer-restore.test.ts +198 -0
- package/src/tests/slack-thread-buffer-startup-restore.test.ts +86 -0
- package/src/tests/slack-thread-buffer.test.ts +34 -34
- package/src/tests/slack-thread-participants.test.ts +23 -5
- package/src/tests/slack-tool-blocks.test.ts +167 -0
- package/src/tests/status.test.ts +32 -6
- package/src/tests/steering-core.test.ts +13 -0
- package/src/tests/steering-enabled.test.ts +7 -1
- package/src/tests/steering-promotion.test.ts +24 -0
- package/src/tests/subscription-plans.test.ts +20 -1
- package/src/tests/swarm-config-reserved-keys.test.ts +17 -0
- package/src/tests/system-one-hosts-ui-mirror.test.ts +67 -0
- package/src/tests/task-artifacts.test.ts +50 -0
- package/src/tests/task-session-prompts.test.ts +95 -1
- package/src/tests/task-ui-action-route.test.ts +191 -0
- package/src/tests/task-ui-actions.test.ts +195 -0
- package/src/tests/task-ui-spec-fallback.test.ts +65 -0
- package/src/tests/task-ui-spec.test.ts +368 -0
- package/src/tests/workflow-agent-task-retry.test.ts +34 -1
- package/src/tests/workflow-system-one-extraction.test.ts +149 -1
- package/src/tools/chat-post.ts +19 -4
- package/src/tools/chat-reply.ts +20 -4
- package/src/tools/create-page.ts +21 -4
- package/src/tools/defer-task.ts +1 -1
- package/src/tools/get-swarm.ts +18 -2
- package/src/tools/join-swarm.ts +2 -1
- package/src/tools/kv/kv-write-auth.ts +17 -1
- package/src/tools/schedules/create-schedule.ts +22 -4
- package/src/tools/slack-post.ts +40 -7
- package/src/tools/slack-reply.ts +50 -14
- package/src/tools/store-progress.ts +69 -3
- package/src/types.ts +50 -4
- package/src/ui-spec/actions.ts +86 -0
- package/src/ui-spec/fallback.ts +19 -0
- package/src/ui-spec/slack.ts +17 -0
- package/src/ui-spec/validate.ts +169 -0
- package/src/utils/codex-rate-limits.ts +159 -0
- package/src/utils/constants.ts +60 -138
- package/src/utils/credentials.ts +2 -0
- package/src/utils/error-tracker.ts +19 -0
- package/src/utils/github-host.ts +217 -0
- package/src/utils/github-pull-request.ts +8 -5
- package/src/utils/literal-matcher.ts +118 -0
- package/src/utils/provider-account-telemetry.ts +331 -0
- package/src/utils/reasoning-events.ts +107 -0
- package/src/utils/secret-scrubber.ts +331 -25
- package/src/utils/subscription-plans.ts +11 -59
- package/src/utils/task-attachment-links.ts +9 -12
- package/src/utils/task-ui-spec.ts +67 -0
- package/src/vcs/index.ts +3 -0
- package/src/workflows/approval-notifications.ts +188 -12
- package/src/workflows/executors/system-one-extraction.ts +14 -7
- package/src/workflows/executors/system-one-providers.ts +22 -1
- package/src/workflows/task-step-routing.ts +8 -3
- package/templates/community/open-prompt-showreel/PLAYBOOK.md +1 -1
- package/templates/community/open-prompt-showreel/skills/open-prompt-showreel/SKILL.md +1 -1
- package/templates/extensions/README.md +1 -0
- package/templates/extensions/sql-admin-only/README.md +20 -0
- package/templates/extensions/sql-admin-only/hooks.ts +100 -0
- package/templates/extensions/sql-admin-only/manifest.json +8 -0
- package/templates/import/manifest.schema.json +136 -0
- package/templates/import/sources.schema.json +44 -0
- package/templates/skills/agent-browser/SKILL.md +1 -1
- package/templates/skills/agent-browser/content.md +1 -1
- package/templates/skills/apps/SKILL.md +151 -14
- package/templates/skills/apps/content.md +151 -14
- package/templates/skills/asset-namespaces/content.md +2 -1
- package/templates/skills/chat-sdk/content.md +17 -0
- package/templates/skills/db-query-guidance/content.md +2 -1
- package/templates/skills/scheduling/content.md +27 -0
- package/templates/skills/slack-interaction/content.md +12 -2
- package/templates/skills/swarm-docs/content.md +1 -0
- package/templates/skills/swarm-extensions/config.json +1 -1
- package/templates/skills/swarm-extensions/content.md +33 -23
- package/templates/skills/swarm-scripts/SKILL.md +13 -0
- package/templates/skills/swarm-scripts/content.md +13 -0
- package/templates/skills/ui-spec/config.json +14 -0
- package/templates/skills/ui-spec/content.md +127 -0
- package/templates/skills/work-on-task/SKILL.md +1 -1
- package/templates/skills/work-on-task/content.md +1 -1
- package/templates/skills/workflow-iterate/content.md +4 -7
- package/templates/workflows/dreaming/content.md +2 -2
- package/dist/acp-adapter-xq6s2z6t.js +0 -14
- package/dist/claude-adapter-r33pqnzx.js +0 -24
- package/dist/cli-dns0y538.js +0 -194
- package/dist/cli-m2z8jagn.js +0 -12078
- package/dist/fx-adapter-1rnxnf56.js +0 -17
- package/dist/grok-adapter-efhmf1r8.js +0 -17
- package/dist/handlers-anrr3py9.js +0 -32
- package/dist/index-2skqtd76.js +0 -12795
- package/dist/index-8w2aznds.js +0 -33
- package/dist/index-qnjvr362.js +0 -37
- package/dist/index-yzxd3sn9.js +0 -32
- package/dist/lead-zhxqbfdv.js +0 -69
- package/dist/worker-7j2907g6.js +0 -69
- package/src/tests/entrypoint-acp-target-binary.test.ts +0 -439
- package/dist/{cli-4caa1x7d.js → cli-tsa40663.js} +4 -4
- package/dist/{mistral-conversations-a45tx39a.js → mistral-conversations-0c30em7t.js} +4 -4
- package/dist/{openai-completions-xd579js7.js → openai-completions-f3n69rep.js} +18 -18
- package/dist/{pi-messages-hjbv8v10.js → pi-messages-zebyt7gb.js} +5 -5
|
@@ -70,6 +70,19 @@ export default async function (args: z.infer<typeof argsSchema>, ctx: ScriptCont
|
|
|
70
70
|
- Return compact structured data. Raw logs, full HTML, big JSON arrays, and file contents stay inside the script.
|
|
71
71
|
- Limits: about 30 s wall clock (up to 5 minutes where the tool exposes it), 1 MB stdout. Never sleep or loop past about 25 s. Chain `wait-for-task` calls instead. The cap also applies to a script called through `ctx.step.swarmScript`; the step's `timeoutMs` does not extend it. A long LLM call, such as a 2,000-word draft, goes in a `ctx.step.rawLlm` step inside `launch-script-run`, never in a called script. A `targetType: "script"` schedule gets 60 s; a manual `script-run` gets 30 s, so a candidate that finishes well under 30 s by hand has margin on the schedule. A nested `ctx.swarm.script_run` gets its own 30 s but runs inside its caller's remaining time: run slow children as sibling calls from the outer script, not deeper in the chain. The run ends when your default export resolves. A call you did not await gets about 2 s more and is then stopped (`quickjs` aborts it at once), so await every write that must land. That makes a `Promise.race` deadline bound the run; a nested `script_run` that lost the race keeps running on the server under its own 30 s.
|
|
72
72
|
|
|
73
|
+
### Upserting a large source
|
|
74
|
+
|
|
75
|
+
A large source pasted inline into a `script-upsert` tool call overflows the call. Write the source to a local file, then send it from bash through the same route, `POST $MCP_BASE_URL/api/scripts/upsert`. The body is JSON (`name`, `source`, optional `description`, `intent`, `scope`), so wrap the file instead of sending it raw:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
jq -n --arg name my-script --rawfile source ./my-script.ts '{name: $name, source: $source}' \
|
|
79
|
+
| curl -sS -X POST "$MCP_BASE_URL/api/scripts/upsert" \
|
|
80
|
+
-H "Authorization: Bearer $API_KEY" -H "X-Agent-ID: $AGENT_ID" \
|
|
81
|
+
-H "Content-Type: application/json" --data-binary @-
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The route runs the same typecheck and scope rules as the tool.
|
|
85
|
+
|
|
73
86
|
### What `ctx` holds
|
|
74
87
|
|
|
75
88
|
- `ctx.swarm.*`: the swarm SDK. `task_get`, `task_send`, `task_storeProgress`, `task_action`, `task_list`, `slack_reply`, `memory_search`, `memory_store`, `kv_get`, `kv_getOrNull`, `kv_set`, `kv_delete`, `kv_incr`, `kv_list`, `swarm_get`, `agent_info`, `db_query`, and more. `kv_getOrNull` returns the entry, `null` on a missing key, and throws on other errors.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"kind": "skill",
|
|
3
|
+
"name": "ui-spec",
|
|
4
|
+
"displayName": "UI spec cards",
|
|
5
|
+
"slug": "ui-spec",
|
|
6
|
+
"title": "UI spec cards",
|
|
7
|
+
"description": "Attach a rich card to a task result with the `store-progress` input `uiSpec`: a json-render spec for the chat catalog that renders in the Slack outcome card, the session view and Chat SDK channels. Covers the 12 components and their props, when to make a card and when not to, the caps and their Slack reasons, the https rule, buttons, the lead rule for worker specs, and 2 complete examples.",
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"category": "skills",
|
|
10
|
+
"placeholders": [],
|
|
11
|
+
"runAllSeedersCandidate": true,
|
|
12
|
+
"systemDefault": true,
|
|
13
|
+
"tags": ["ui-spec", "json-render", "cards", "slack", "visuals"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# UI spec cards
|
|
2
|
+
|
|
3
|
+
A task result can carry a rich card next to the prose answer. You attach it with the `store-progress` input `uiSpec` when you complete the task. The card renders in the Slack outcome card, in the session view, on the task page and in Chat SDK channels. Surfaces that show only text (Linear, Jira, the legacy Slack card, Slack Work Objects) get the card's fallback text.
|
|
4
|
+
|
|
5
|
+
The card is on only when the operator sets `UI_SPEC_ENABLED=true`. When the "Rich cards" section is in your system prompt, the flag is on.
|
|
6
|
+
|
|
7
|
+
## When to make a card
|
|
8
|
+
|
|
9
|
+
Make a card in 2 cases:
|
|
10
|
+
|
|
11
|
+
- The requester asks for a visual, a chart, a table, a dashboard or a summary card.
|
|
12
|
+
- The result holds numbers that compare, a series over time, shares of a whole, or records with the same fields.
|
|
13
|
+
|
|
14
|
+
Do not make a card for:
|
|
15
|
+
|
|
16
|
+
- a one-line answer;
|
|
17
|
+
- a yes or no;
|
|
18
|
+
- a status reply;
|
|
19
|
+
- a delegation;
|
|
20
|
+
- a result that is prose only.
|
|
21
|
+
|
|
22
|
+
## `output` stays the prose answer
|
|
23
|
+
|
|
24
|
+
`output` stays the complete answer in prose. The card adds to it and never replaces it. A reader who sees only the text must get the full answer.
|
|
25
|
+
|
|
26
|
+
## The shape of `uiSpec`
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"spec": { "root": "<element id>", "elements": { "<element id>": { "type": "...", "props": {}, "children": [] } } },
|
|
31
|
+
"actions": { "<action id>": { "kind": "follow_up", "prompt": "..." } }
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- `spec.root` names the root element. The root must be a `Card`.
|
|
36
|
+
- `spec.elements` is a flat map. Each element has `type`, `props` and `children` (a list of element ids). Give `children: []` to a leaf.
|
|
37
|
+
- `actions` is optional. It is for `Button` only (see "Buttons").
|
|
38
|
+
|
|
39
|
+
## The 12 components
|
|
40
|
+
|
|
41
|
+
| Component | Props | Children |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| `Card` | `title`, `subtitle`, `imageUrl` (all optional) | Any. The root of every spec. `title` renders as the header. |
|
|
44
|
+
| `Section` | none | Groups related elements. |
|
|
45
|
+
| `Text` | `content` (markdown, required), `style`: `plain`, `bold` or `muted` | none. Use `muted` for footnotes and the source line. |
|
|
46
|
+
| `Fields` | none | `Field` elements only. A grid of label and value pairs. |
|
|
47
|
+
| `Field` | `label`, `value` (string or number) | none. Good for KPIs. |
|
|
48
|
+
| `Table` | `headers` (string list), `rows` (list of lists of strings or numbers), `align` (`left`, `center`, `right` per column), `caption` | none. Every row has one cell per header. Right-align numeric columns. |
|
|
49
|
+
| `Chart` | `title` (required), `chart` | none. See below. |
|
|
50
|
+
| `Divider` | none | none. A separator between groups. |
|
|
51
|
+
| `Image` | `url` (https), `alt` (required) | none. |
|
|
52
|
+
| `Actions` | none | `Button` and `LinkButton` elements. A row of buttons. |
|
|
53
|
+
| `Button` | `id`, `label`, `style`: `primary`, `danger` or `default`, `value` | none. Needs `UI_SPEC_ACTIONS_ENABLED`. |
|
|
54
|
+
| `LinkButton` | `label`, `url` (https) | none. Opens the URL. |
|
|
55
|
+
|
|
56
|
+
`Chart.chart` has one of 2 forms:
|
|
57
|
+
|
|
58
|
+
- Pie, for shares of a whole: `{ "type": "pie", "segments": [{ "label": "Enterprise", "value": 52 }] }`. Each `value` is positive.
|
|
59
|
+
- Series, for values over categories: `{ "type": "bar" | "line" | "area", "categories": ["Jan", "Feb"], "series": [{ "name": "Revenue", "values": [1.02, 1.08] }], "xLabel": "...", "yLabel": "..." }`. Each series has one value per category. `xLabel` and `yLabel` are optional.
|
|
60
|
+
|
|
61
|
+
Chart titles stay at 50 characters or fewer. Chart labels stay at 20 characters or fewer.
|
|
62
|
+
|
|
63
|
+
## Caps
|
|
64
|
+
|
|
65
|
+
The engine checks every spec when you store it. It refuses a spec that breaks a cap and tells you which one. Fix the spec and call `store-progress` again.
|
|
66
|
+
|
|
67
|
+
| Cap | Reason |
|
|
68
|
+
|---|---|
|
|
69
|
+
| At most 2 charts | Slack renders a chart as a native `data_visualization` block, and Slack allows 2 of them per message. A 3rd number series goes in `Fields` or in the table. |
|
|
70
|
+
| At most 1 table, of at most 100 rows and 20 columns | Slack renders 1 native table (`data_table`) per message. Above 100 rows or 20 columns, the Slack adapter falls back to ASCII text. |
|
|
71
|
+
| A Slack table shows 5 rows per page | The native Slack table pages 5 rows at a time, with a pager. You cannot change the page size. Put the most important rows first. |
|
|
72
|
+
| 32 KiB | The JSON of `spec` is at most 32,768 bytes. |
|
|
73
|
+
| 45 Slack blocks, 25 elements in one `Actions` row | Slack Block Kit limits for one message. |
|
|
74
|
+
| https URLs only | `LinkButton.url`, `Image.url` and `Card.imageUrl` must start with `https:`. The engine refuses `http:`, `javascript:`, `data:` and `file:` URLs. |
|
|
75
|
+
|
|
76
|
+
## Buttons
|
|
77
|
+
|
|
78
|
+
A `Button` needs `UI_SPEC_ACTIONS_ENABLED=true`. When that flag is off, the engine refuses a spec with a `Button`. Use `LinkButton` instead.
|
|
79
|
+
|
|
80
|
+
When the flag is on, each `Button.props.id` matches `^[a-z][a-z0-9_]{0,39}$` and names a key of `uiSpec.actions`. Each action is `{ "kind": "follow_up", "prompt": "<at most 4000 characters>" }`.
|
|
81
|
+
|
|
82
|
+
## Which card a Slack thread shows
|
|
83
|
+
|
|
84
|
+
A Slack card shows only the spec of its own task.
|
|
85
|
+
|
|
86
|
+
- A worker's spec shows on the worker's own task (session view, task page). It does not show on the lead's Slack ask card.
|
|
87
|
+
- Lead rule: when a worker returns a spec that the requester must see, send that spec again in your own `uiSpec` when you complete the Slack ask.
|
|
88
|
+
|
|
89
|
+
## Example: a small card
|
|
90
|
+
|
|
91
|
+
A KPI, a table and a link button.
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{"spec":{"root":"c","elements":{
|
|
95
|
+
"c":{"type":"Card","props":{"title":"Weekly deploys"},"children":["f","t","a"]},
|
|
96
|
+
"f":{"type":"Fields","props":{},"children":["k"]},
|
|
97
|
+
"k":{"type":"Field","props":{"label":"Deploys","value":"1,284"},"children":[]},
|
|
98
|
+
"t":{"type":"Table","props":{"headers":["Service","Deploys"],"rows":[["api",812],["ui",472]]},"children":[]},
|
|
99
|
+
"a":{"type":"Actions","props":{},"children":["l"]},
|
|
100
|
+
"l":{"type":"LinkButton","props":{"label":"Open dashboard","url":"https://example.com/deploys"},"children":[]}}}}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Example: a dashboard card
|
|
104
|
+
|
|
105
|
+
KPIs, 2 charts, a table and 2 rows of link buttons. The 3rd share ("Revenue by plan") is a bold `Text`, not a 3rd chart, because of the 2-chart cap.
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{"spec":{"root":"c","elements":{
|
|
109
|
+
"c":{"type":"Card","props":{"title":"Q3 revenue at a glance"},"children":["a1","f","ch1","ch2","t1","tb","a2","src"]},
|
|
110
|
+
"a1":{"type":"Actions","props":{},"children":["view"]},
|
|
111
|
+
"view":{"type":"LinkButton","props":{"label":"View report","url":"https://example.com/q3"},"children":[]},
|
|
112
|
+
"f":{"type":"Fields","props":{},"children":["f1","f2","f3","f4","f5","f6"]},
|
|
113
|
+
"f1":{"type":"Field","props":{"label":"Revenue","value":"$4.2M (+18%)"},"children":[]},
|
|
114
|
+
"f2":{"type":"Field","props":{"label":"New customers","value":"64"},"children":[]},
|
|
115
|
+
"f3":{"type":"Field","props":{"label":"ARR","value":"$16.8M (+12%)"},"children":[]},
|
|
116
|
+
"f4":{"type":"Field","props":{"label":"Avg deal","value":"$65.6K"},"children":[]},
|
|
117
|
+
"f5":{"type":"Field","props":{"label":"Net retention","value":"118%"},"children":[]},
|
|
118
|
+
"f6":{"type":"Field","props":{"label":"Win rate","value":"31%"},"children":[]},
|
|
119
|
+
"ch1":{"type":"Chart","props":{"title":"Monthly revenue (2026, USD M)","chart":{"type":"line","categories":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep"],"series":[{"name":"Revenue","values":[1.02,1.08,1.15,1.2,1.26,1.31,1.38,1.45,1.52]}]}},"children":[]},
|
|
120
|
+
"ch2":{"type":"Chart","props":{"title":"Revenue by region (Q3, USD M)","chart":{"type":"bar","categories":["NA","EMEA","APAC","LATAM"],"series":[{"name":"Revenue","values":[1.7,1.3,0.8,0.4]}]}},"children":[]},
|
|
121
|
+
"t1":{"type":"Text","props":{"content":"Revenue by plan: Enterprise 52%, Team 31%, Self-serve 17%","style":"bold"},"children":[]},
|
|
122
|
+
"tb":{"type":"Table","props":{"headers":["Account","Region","Revenue","QoQ"],"rows":[["Halcyon Labs","NA","$412K","+22%"],["Brightline","EMEA","$356K","+31%"],["Kestrel Health","EMEA","$298K","+27%"],["Meridian Freight","APAC","$241K","+9%"]],"align":["left","left","right","right"],"caption":"Top accounts this quarter"},"children":[]},
|
|
123
|
+
"a2":{"type":"Actions","props":{},"children":["open","csv"]},
|
|
124
|
+
"open":{"type":"LinkButton","props":{"label":"Open dashboard","url":"https://example.com/dashboard"},"children":[]},
|
|
125
|
+
"csv":{"type":"LinkButton","props":{"label":"Export CSV","url":"https://example.com/q3.csv"},"children":[]},
|
|
126
|
+
"src":{"type":"Text","props":{"content":"Source: billing warehouse · Updated 2:41 PM","style":"muted"},"children":[]}}}}
|
|
127
|
+
```
|
|
@@ -15,7 +15,7 @@ Finish the task with one of the four endings in your operating contract: `comple
|
|
|
15
15
|
|
|
16
16
|
A lesson that would change how the next agent works goes in `learning` on that last `store-progress` call: line 1 a title, line 2 the rule ("When X, do Y"), then evidence. Leave it out for a status line, a restatement of the output, or text already in a skill.
|
|
17
17
|
|
|
18
|
-
Resuming (a resume task, or work cut by a graceful shutdown): read the parent's last progress line, then re-read live state once (PR state and head SHA, branch, `git status`) before new work. Re-run controls only if the head moved. Never redo a pushed commit or open a second PR for the same branch. Store a progress line with branch, PR number and head SHA each time you push. A document task has no branch: its live state is the brief's agent-fs output path and the task attachments. Read the parent task's output and any agent-fs draft path it names before rewriting. Run `agent-fs ls` on that path, download any partial and extend it; a superseded parent with empty output and no draft means a rebuild, not an extension. Then list the task's local work directory: a shutdown can leave the newest draft only there, or leave cache files half-written. Parse every cache file, delete the ones that fail, and re-run only the stages whose output is missing. Before re-running a collection, call `list-script-runs` with your `agentId` and reuse the output (`get-script-run`) of each completed run that started after the parent task started. Never re-run collection steps that already produced artifacts. A render task (video, image, generated page) has no branch either: its live state is the local project directory plus the brief's agent-fs output. List both; timestamps are hints only. Before reusing an output, verify that it exists, is complete and valid, and corresponds to the current sources and render settings (for example, using recorded input/settings hashes). Download remote output and verify its bytes and provenance; agent-fs listing dates alone do not establish freshness. Re-render missing, invalid, incomplete or stale output. Hand over the
|
|
18
|
+
Resuming (a resume task, or work cut by a graceful shutdown): read the parent's last progress line, then re-read live state once (PR state and head SHA, branch, `git status`) before new work. Re-run controls only if the head moved. Never redo a pushed commit or open a second PR for the same branch. Store a progress line with branch, PR number and head SHA each time you push. A document task has no branch: its live state is the brief's agent-fs output path and the task attachments. Read the parent task's output and any agent-fs draft path it names before rewriting. Run `agent-fs ls` on that path, download any partial and extend it; a superseded parent with empty output and no draft means a rebuild, not an extension. Then list the task's local work directory: a shutdown can leave the newest draft only there, or leave cache files half-written. Parse every cache file, delete the ones that fail, and re-run only the stages whose output is missing. Before re-running a collection, call `list-script-runs` with your `agentId` and reuse the output (`get-script-run`) of each completed run that started after the parent task started. Never re-run collection steps that already produced artifacts. A render task (video, image, generated page) has no branch either: its live state is the local project directory plus the brief's agent-fs output. List both; timestamps are hints only. Before reusing an output, verify that it exists, is complete and valid, and corresponds to the current sources and render settings (for example, using recorded input/settings hashes). Download remote output and verify its bytes and provenance; agent-fs listing dates alone do not establish freshness. Re-render missing, invalid, incomplete or stale output. Hand over the file link from the Outputs section of your system prompt (the dashboard when configured) by default. Use a share link only when the requester asked for one or the reader has no agent-fs login: then reuse a usable one, and create a missing one or replace an expired, revoked or view-exhausted one without re-rendering a valid unchanged output. A task that covers several PRs re-reads every PR in scope (state, mergedAt, head SHA), not only the first: a PR that merged during the shutdown takes no more pushes. If your task's `model` differs from the parent's, say so in the output, because the result's provenance changed.
|
|
19
19
|
|
|
20
20
|
Write times in replies, outputs and defer notes in the requester's timezone when the Requester Profile names one, never raw UTC.
|
|
21
21
|
|
|
@@ -10,7 +10,7 @@ Finish the task with one of the four endings in your operating contract: `comple
|
|
|
10
10
|
|
|
11
11
|
A lesson that would change how the next agent works goes in `learning` on that last `store-progress` call: line 1 a title, line 2 the rule ("When X, do Y"), then evidence. Leave it out for a status line, a restatement of the output, or text already in a skill.
|
|
12
12
|
|
|
13
|
-
Resuming (a resume task, or work cut by a graceful shutdown): read the parent's last progress line, then re-read live state once (PR state and head SHA, branch, `git status`) before new work. Re-run controls only if the head moved. Never redo a pushed commit or open a second PR for the same branch. Store a progress line with branch, PR number and head SHA each time you push. A document task has no branch: its live state is the brief's agent-fs output path and the task attachments. Read the parent task's output and any agent-fs draft path it names before rewriting. Run `agent-fs ls` on that path, download any partial and extend it; a superseded parent with empty output and no draft means a rebuild, not an extension. Then list the task's local work directory: a shutdown can leave the newest draft only there, or leave cache files half-written. Parse every cache file, delete the ones that fail, and re-run only the stages whose output is missing. Before re-running a collection, call `list-script-runs` with your `agentId` and reuse the output (`get-script-run`) of each completed run that started after the parent task started. Never re-run collection steps that already produced artifacts. A render task (video, image, generated page) has no branch either: its live state is the local project directory plus the brief's agent-fs output. List both; timestamps are hints only. Before reusing an output, verify that it exists, is complete and valid, and corresponds to the current sources and render settings (for example, using recorded input/settings hashes). Download remote output and verify its bytes and provenance; agent-fs listing dates alone do not establish freshness. Re-render missing, invalid, incomplete or stale output. Hand over the
|
|
13
|
+
Resuming (a resume task, or work cut by a graceful shutdown): read the parent's last progress line, then re-read live state once (PR state and head SHA, branch, `git status`) before new work. Re-run controls only if the head moved. Never redo a pushed commit or open a second PR for the same branch. Store a progress line with branch, PR number and head SHA each time you push. A document task has no branch: its live state is the brief's agent-fs output path and the task attachments. Read the parent task's output and any agent-fs draft path it names before rewriting. Run `agent-fs ls` on that path, download any partial and extend it; a superseded parent with empty output and no draft means a rebuild, not an extension. Then list the task's local work directory: a shutdown can leave the newest draft only there, or leave cache files half-written. Parse every cache file, delete the ones that fail, and re-run only the stages whose output is missing. Before re-running a collection, call `list-script-runs` with your `agentId` and reuse the output (`get-script-run`) of each completed run that started after the parent task started. Never re-run collection steps that already produced artifacts. A render task (video, image, generated page) has no branch either: its live state is the local project directory plus the brief's agent-fs output. List both; timestamps are hints only. Before reusing an output, verify that it exists, is complete and valid, and corresponds to the current sources and render settings (for example, using recorded input/settings hashes). Download remote output and verify its bytes and provenance; agent-fs listing dates alone do not establish freshness. Re-render missing, invalid, incomplete or stale output. Hand over the file link from the Outputs section of your system prompt (the dashboard when configured) by default. Use a share link only when the requester asked for one or the reader has no agent-fs login: then reuse a usable one, and create a missing one or replace an expired, revoked or view-exhausted one without re-rendering a valid unchanged output. A task that covers several PRs re-reads every PR in scope (state, mergedAt, head SHA), not only the first: a PR that merged during the shutdown takes no more pushes. If your task's `model` differs from the parent's, say so in the output, because the result's provenance changed.
|
|
14
14
|
|
|
15
15
|
Write times in replies, outputs and defer notes in the requester's timezone when the Requester Profile names one, never raw UTC.
|
|
16
16
|
|
|
@@ -108,9 +108,9 @@ Use these shapes as a starting point, then confirm them against the current exec
|
|
|
108
108
|
|
|
109
109
|
**Before you add the first `system-one-decision` node to a workflow, confirm its key works.** A node with no working key fails its whole run, and a save only warns. Do these in order and stop at the first failure:
|
|
110
110
|
|
|
111
|
-
1. Pick the provider. `typesafe`
|
|
111
|
+
1. Pick the provider. `typesafe` needs the global secret `TYPESAFE_API_KEY`. `openrouter` needs `OPENROUTER_API_KEY`. `laya` needs the global secret `LAYA_API_KEY` and the global config `LAYA_URL`, the base URL of its server. `openai` needs `OPENAI_DECISIONS_API_KEY` (never `OPENAI_API_KEY`). `cloudflare` needs the global secret `CLOUDFLARE_API_TOKEN` and the global config `CLOUDFLARE_ACCOUNT_ID`. Use the provider the requester named. If they named none, omit `provider` to follow `SYSTEM_ONE_DEFAULT_PROVIDER`: the global config row takes precedence over the environment value, with `typesafe` as the fallback when neither names a valid decision provider. Check that setting before choosing the key to verify. If its key is missing but another provider's key exists, ask which to use rather than switching, because the accounts bill separately.
|
|
112
112
|
2. Check the key is set: `get-config` with `key` set to that name and no `includeSecrets`. A masked value (`********`) means a value exists. No entry means it is missing. Never pass `includeSecrets`, and never read the value. For `laya`, check `LAYA_URL` the same way, and for `cloudflare`, `CLOUDFLARE_ACCOUNT_ID`; neither is secret, so the value shows.
|
|
113
|
-
3. Confirm
|
|
113
|
+
3. Confirm the selected provider works with one cheap call. If the requester explicitly selected a provider, set `config.provider` to that same literal in both the ping node and the actual workflow node. For example, an explicit TypeSafe request needs `"provider": "typesafe"` in the ping even when the configured default is OpenRouter. Omit `provider` in both nodes only when inheriting configuration; the example below uses that inherited configuration. Create a throwaway one-node workflow, trigger it, read the run, then `delete-workflow` it:
|
|
114
114
|
|
|
115
115
|
```json
|
|
116
116
|
{
|
|
@@ -119,7 +119,6 @@ Use these shapes as a starting point, then confirm them against the current exec
|
|
|
119
119
|
"id": "ping",
|
|
120
120
|
"type": "system-one-decision",
|
|
121
121
|
"config": {
|
|
122
|
-
"provider": "typesafe",
|
|
123
122
|
"state": "ping",
|
|
124
123
|
"questions": { "ping": { "type": "noul", "instructions": "Is the state the word ping?" } },
|
|
125
124
|
"returns": { "ping": { "type": "noul" } },
|
|
@@ -131,7 +130,7 @@ Use these shapes as a starting point, then confirm them against the current exec
|
|
|
131
130
|
}
|
|
132
131
|
```
|
|
133
132
|
|
|
134
|
-
A `completed` run means the key works. A `failed` run carries the reason: `<KEY> is not configured` (missing; for `laya` it can name `LAYA_URL` or `LAYA_API_KEY`, or both), or `<KEY> was rejected by <host> (HTTP 401)` (present but refused).
|
|
133
|
+
A `completed` run means the key works. A `failed` run carries the reason: `<KEY> is not configured` (missing; for `laya` it can name `LAYA_URL` or `LAYA_API_KEY`, or both), or `<KEY> was rejected by <host> (HTTP 401)` (present but refused). A successful ping verifies only the provider it ran against; it does not verify another provider's credential. If `create-workflow` says `system-one-decision` is an unregistered executor type, the node is not deployed on this swarm yet: stop and say so.
|
|
135
134
|
4. If the key is missing or was rejected, **do not build the node.** Ask a human for it with a `request-human-input` question of type `config`, one question per key, and share the returned URL in the thread:
|
|
136
135
|
|
|
137
136
|
```json
|
|
@@ -147,8 +146,6 @@ Afterwards, a `warnings` entry on `create-workflow` or a patch tool means the ke
|
|
|
147
146
|
"type": "system-one-decision",
|
|
148
147
|
"inputs": { "pr": "trigger.pullRequest" },
|
|
149
148
|
"config": {
|
|
150
|
-
"provider": "typesafe",
|
|
151
|
-
"model": "jev-1.13.0",
|
|
152
149
|
"state": "{{pr}}",
|
|
153
150
|
"questions": {
|
|
154
151
|
"ready": {
|
|
@@ -168,7 +165,7 @@ Afterwards, a `warnings` entry on `create-workflow` or a patch tool means the ke
|
|
|
168
165
|
}
|
|
169
166
|
```
|
|
170
167
|
|
|
171
|
-
- `provider` is `
|
|
168
|
+
- `provider` is optional. Set it when the requester explicitly selects a provider, using the same literal verified by the ping. Omit it only when inheriting configuration to follow `SYSTEM_ONE_DEFAULT_PROVIDER` at run time (global config row, then environment, then `typesafe`). An explicit provider is `typesafe`, `openrouter`, `laya`, `openai`, or `cloudflare`, and must be a literal, not a `{{token}}`. `model` is that provider's own id (`jev-1.13.0` on `typesafe`, `typesafe/jev-1.13` on `openrouter`, a checkpoint name such as `multilingual` on `laya`); `gpt-6-luna` on `openai`, `clef` (default) or `clef-flash` on `cloudflare`, which accepts no other id; leave it unset for the provider's default. `laya` has no default and sends no `model`, because it silently ignores one it does not know: leave it unset unless you mean a specific checkpoint. Every provider returns the same output; `openai` gets a translated request, and an OpenAI refusal of any question fails the step. `cloudflare` takes at most 64 questions. There is no fallback between them. Never use OpenRouter's `typesafe/jev-router`, which is a chat router that hands the request to another model.
|
|
172
169
|
- `state` is required: text, a string array, or a JSON object. An exact `{{token}}` keeps the upstream JSON type. Every question in one call shares the state and cannot see the other answers, so a dependent judgment needs its own node.
|
|
173
170
|
- Each question is `noul` (probability that a claim is true; optional `criteria: { true, false }`), `choice` (2 to 255 options; `criteria: { option: description }`), or `score` (2 to 10 ordered levels; `criteria: [level, ...]`).
|
|
174
171
|
- `returns` repeats every question id and its type. A mismatch is rejected when the workflow is saved.
|
|
@@ -324,7 +324,7 @@ Trim backups and heartbeat drafts use the assigned worker's default agent-fs dri
|
|
|
324
324
|
"dreaming-v2-synthesis"
|
|
325
325
|
],
|
|
326
326
|
"priority": 50,
|
|
327
|
-
"template": "dreaming-v2 run {{runId}}: synthesis and critique. DRY RUN = {{dryRun}}.\n\nYou are the reviewer, not the writer. Turn tonight's per-agent reports and the deterministic swarm data into an approved, capped action list across five lanes, and record every rejection with a reason. Do NOT call write tools; approved actions are applied by later nodes (skills lane, apply script) and verified by re-reading the rows.\n\nPer-agent reports (foreach results; a child with status \"failed\" or a taskOutput starting \"[FAILED\" means that agent's report is missing, so note it and move on):\n{{reports}}\n\nReports rejected by the slot/schema guard (retried once): {{rejectedReports}}\nStill missing after the retry: {{missing}}\n\nBlocker digest (memory daily-blocker-digest-<today>, read by exact name; state \"missing\"/\"late\" means proceed without it and say so in notes): {{digest}}\n\nDeterministic swarm data (audit results, skill usage, memory candidates):\n{{swarm}}\nAgents skipped for inactivity: {{skipped}}\nGather errors (instrument gaps, NOT findings): {{gatherErrors}}\nCaps for tonight: {{caps}}\n\nLanes:\n a skillify: a new skill, only for a procedure evidenced in 2+ tasks (or 2+ agents) and not covered by an existing skill. Check skill-search first.\n b skill-refactor: fix a stale/wrong skill body or description (from skillFriction or an audit), merge near-duplicates, or propose disabling a skill with 0 invocations in 14 days that a named skill supersedes. systemDefault skills are locked in the DB and out of scope: do not propose edits to them.\n c scriptify: a deterministic process done by hand (scriptCandidates, repeated tool loops). Check script-search / the scripts catalog for an existing script first; if one exists, the action is \"wire it into skill X\", not \"write a new one\". Tier auto: the scriptify lane BUILDS it (agent scope, positive + negative control) up to caps.scriptBuilds; Lead promotes to global.\n d identity: the agents' own identityOps, plus at most 2 of your own from swarm.audits.contextBudget.overBudget (largest overage first) and, for Lead HEARTBEAT, items the blocker digest shows resolved (remove-only).\n e memory: the agents' memoryOps plus swarm.memory candidates: exact duplicates (keep the oldest row, delete the rest), unhelpful rows (edit or delete with a reason), badKeys (memory-rename, target.memoryIds + target.name kebab <= 90), and at most 3 new lessons, one per RESOLVED-STALE item in the digest.\n Profile trims are a separate lane (after apply): do not propose big rewrites here.\n\nLong-term how-to handoff (/longterm is recall only: if it can be a skill or script, it should be one). Lane B runs after you, so you read LAST night's routes. Call kv-get ONCE: namespace \"dreaming-v2\", key \"memtax-create:skill-routes:latest\". Use it only if it exists and its `at` is less than 36h old; otherwise write \"howto handoff: none\" in notes. Each route is {path \"/howto/<slug>\", slug, route, skill, lane, op, scriptExisting, script, scriptLane, memberIds, memberNames}; memberIds are inbox memory ids (memory-get them for the text). Existing skill or script first:\n - lane \"skill-refactor\" (route skill-update): op \"skill-update\" on target.skillName = skill; content = the how-to
|
|
327
|
+
"template": "dreaming-v2 run {{runId}}: synthesis and critique. DRY RUN = {{dryRun}}.\n\nYou are the reviewer, not the writer. Turn tonight's per-agent reports and the deterministic swarm data into an approved, capped action list across five lanes, and record every rejection with a reason. Do NOT call write tools; approved actions are applied by later nodes (skills lane, apply script) and verified by re-reading the rows.\n\nPer-agent reports (foreach results; a child with status \"failed\" or a taskOutput starting \"[FAILED\" means that agent's report is missing, so note it and move on):\n{{reports}}\n\nReports rejected by the slot/schema guard (retried once): {{rejectedReports}}\nStill missing after the retry: {{missing}}\n\nBlocker digest (memory daily-blocker-digest-<today>, read by exact name; state \"missing\"/\"late\" means proceed without it and say so in notes): {{digest}}\n\nDeterministic swarm data (audit results, skill usage, memory candidates):\n{{swarm}}\nAgents skipped for inactivity: {{skipped}}\nGather errors (instrument gaps, NOT findings): {{gatherErrors}}\nCaps for tonight: {{caps}}\n\nLanes:\n a skillify: a new skill, only for a procedure evidenced in 2+ tasks (or 2+ agents) and not covered by an existing skill. Check skill-search first.\n b skill-refactor: fix a stale/wrong skill body or description (from skillFriction or an audit), merge near-duplicates, or propose disabling a skill with 0 invocations in 14 days that a named skill supersedes. systemDefault skills are locked in the DB and out of scope: do not propose edits to them.\n c scriptify: a deterministic process done by hand (scriptCandidates, repeated tool loops). Check script-search / the scripts catalog for an existing script first; if one exists, the action is \"wire it into skill X\", not \"write a new one\". Tier auto: the scriptify lane BUILDS it (agent scope, positive + negative control) up to caps.scriptBuilds; Lead promotes to global.\n d identity: the agents' own identityOps, plus at most 2 of your own from swarm.audits.contextBudget.overBudget (largest overage first) and, for Lead HEARTBEAT, items the blocker digest shows resolved (remove-only).\n e memory: the agents' memoryOps plus swarm.memory candidates: exact duplicates (keep the oldest row, delete the rest), unhelpful rows (edit or delete with a reason), badKeys (memory-rename, target.memoryIds + target.name kebab <= 90), and at most 3 new lessons, one per RESOLVED-STALE item in the digest.\n Profile trims are a separate lane (after apply): do not propose big rewrites here.\n\nLong-term how-to handoff (/longterm is recall only: if it can be a skill or script, it should be one). Lane B runs after you, so you read LAST night's routes. Call kv-get ONCE: namespace \"dreaming-v2\", key \"memtax-create:skill-routes:latest\". Use it only if it exists and its `at` is less than 36h old; otherwise write \"howto handoff: none\" in notes. Each route is {path \"/howto/<slug>\", slug, route, skill, lane, op, scriptExisting, script, scriptLane, memberIds, memberNames}; memberIds are inbox memory ids (memory-get them for the text). Existing skill or script first:\n - lane \"skill-refactor\" (route skill-update): batch per target skill. Group the routes by `skill` and emit ONE op \"skill-update\" per target skill on target.skillName = skill that folds every queued route for that skill; content = the how-to all those members add to that skill (missing steps, limits, gotchas), not a copy of the memories. One batched action counts once against the skill-update cap; when batches overflow it, keep the batches with the most members.\n - lane \"skillify\" (route skill-new): run skill-search for the slug first; a covering skill turns it into a skill-refactor update, folded into that skill's batched action. Otherwise op \"skill-create\", only when the route has 2+ memberIds or tonight's reports evidence the procedure (rule a); else reject \"single-source how-to\".\n - scriptLane \"scriptify\": scriptExisting set -> a scriptify action \"wire script <scriptExisting> into skill <skill or new skill>\"; script true and no scriptExisting -> op \"script-spec\" (or \"script-build\" tier auto within caps.scriptBuilds) after checking the scripts catalog.\n Evidence for every handoff action: \"memory:<id>\" for each member of every route it folds, plus \"kv:dreaming-v2/memtax-create:skill-routes:latest\". Same caps as every other action; overflow goes to rejected with reason \"cap\". Notes must carry one line: \"howto handoff: <routes read> routes read, <routes folded> folded into <actions> actions, <routes rejected> rejected\".\n /longterm is recall only. Never approve a memory-lane action whose content is a how-to (steps, commands, endpoints, API usage) or whose name is under /longterm/facts/services or /longterm/facts/procedures: reject it with reason \"how-to belongs in a skill/script\" and, if it is worth keeping, turn it into a skill-refactor or skillify action instead.\n\nRules for every action:\n1. Keep only evidence-backed items. Re-verify anything with an absence or state claim yourself (one db-query or gh call) before approving; say what you checked in `verified`.\n2. Tier \"auto\" only if it is inside the apply policy: identity ops that are net-negative, or CLAUDE appends <= 400 chars; a net-positive identity op may be auto too, because apply hands it to the trim lane, which writes it only inside a rewrite that leaves that file net-smaller tonight; memory store/edit/delete/rename within caps (a multi-chunk `manual` memory is deleted or renamed as a whole document; never task_completion/session_summary); skill update of a non-systemDefault skill (max 6, one per target skill), skill create (max 2), and scriptify builds (max caps.scriptBuilds). Skill disable stays \"propose\".\n2b. Nothing stays parked: every action has `owner` (agent id). Auto actions are owned by their lane; for a propose action name who must decide it (the target agent for its own file, Lead for memory/skills/promotions, the coding agent for code). The owners node sends each owner one task.\n3. Respect the caps; overflow goes to `rejected` with reason \"cap\".\n4. For H2 ops, copy the anchor verbatim from that agent's h2Anchors. For replace-exact, `find` must be text the agent quoted from its own file; you may shorten `content` but never invent an anchor.\n5. Dedup across agents: two agents proposing the same skill or memory become one action with both in sourceAgents.\n6. Every action gets an id \"A1\", \"A2\", ... that stays stable across all nodes.\n7. memory-edit: `content` is written verbatim as the memory's ENTIRE new body (default `mode: \"replace\"`), so a replace carries the full rewritten text. To add to a memory, set `mode: \"append\"` and put ONLY the new text in `content`; apply writes existing.trimEnd() + \"\\n\" + content. Never put instructions to the writer in `content` (\"APPEND to the end...\", \"keep everything above\", \"REPLACE the existing section...\"): apply refuses them. A replace that leaves under 50% of the old body is refused unless the action sets `allowShrink: \"<reason>\"`.\n\nLearning loop (v3): {{learning}}\n- `recent` = the last 7 learn rows; `candidates` = cuts whose probe showed up in a failed task or a coaching reason in the last 24h; `pins` = text a lane must never cut again.\n- Emit up to 5 `restores: [{cutId, reason, evidence[]}]`, only for a candidate whose evidence shows the cut text was still needed (quote the evidence ids). Apply restores it and pins it.\n- Never propose removing pinned text.\nBudget: {{budget}}. If `overBudget` is true, propose no optional work beyond the caps.\n\nReturn ONLY JSON: {headline, actions[], rejected[], restores[], missingReports[], notes, changelogComment}. The headline is the single change tonight that will still matter next week, <= 140 chars, or \"quiet night\" if nothing qualifies. changelogComment: at most 2 sentences for the workflow changelog: what changed tonight and what to watch tomorrow.",
|
|
328
328
|
"outputSchema": {
|
|
329
329
|
"type": "object",
|
|
330
330
|
"required": [
|
|
@@ -850,7 +850,7 @@ Trim backups and heartbeat drafts use the assigned worker's default agent-fs dri
|
|
|
850
850
|
"dreaming-v2-publish"
|
|
851
851
|
],
|
|
852
852
|
"priority": 50,
|
|
853
|
-
"template": "dreaming-v2 run {{runId}}: publish the nightly report and the changelog entry. DRY RUN = {{g.dryRun}}.\n\nInputs: gather {{g}} | synthesis {{s}} | verify {{v}} | scriptify {{sc}} | trim plan {{tp}} | trim apply {{tr}} | owners {{ow}} | report guard {{rm}} | reports {{reports}} | learn {{lr}} | apply restores (restores/wouldRestore/restoreRefused in) {{ap}} | heartbeat check {{hbc}} | lead-disk {{ld}} | heartbeat apply {{hba}} | memory taxonomy section {{mtmd}} | memory taxonomy counts {{mtc}} | long-term memories section {{ltmd}} | long-term memories counts {{ltc}} | learnings triage section {{lgmd}} | learnings triage counts {{lgc}}\n(Empty strings mean a quiet night or a failed/skipped node: say which, from gather.)\n\nUNITS: state every size (file, field, profile, heartbeat, draft, prompt, or a size delta) in tokens: tokens = ceil(chars / 4 * ratio), ratio = 1 (uncalibrated). A signed char delta d becomes sign(d) * ceil(|d| / 4 * ratio). Inputs arrive in chars (beforeChars, afterChars, chars, liveChars, draftChars, trimmedChars, netChars, profileChars, heartbeatChars, backlog sizes, identity/memory op deltas): convert when you print and write `<n> tok`. Compute every converted value with one python3 -c or bun -e call over the input numbers, never by hand. Keep a char value only where the limit itself counts chars, in parentheses after the tokens: the claudeMd session cap reads `5000 tok (20,000-char cap)`. Counts that are not sizes stay as they are (pins, tracked items, cuts, memories, chunks, actions, USD, seconds, minutes). The 450-char slackText limit below is a Slack length limit, not a size you report.\n\n1. Report: Markdown at agent-fs `dreaming-v2/runs/<UTC date>.md` (org `{{input.agentFsOrgId}}`, drive `{{input.agentFsDriveId}}`; if either is empty, write nothing to agent-fs: return the report in `markdown` and leave `reportPath` and `reportUrl` empty). DRY RUN: write NOTHING, return it in `markdown`.\n Sections: Headline; Silent refusals / claim mismatches / unclaimed writes / reverted trims (verify, trim survival) FIRST if non-empty; Applied (verify-confirmed only) per lane with target, one-line why, action id; Trims: one row per field (agent, field, before -> after tokens, backup path, and its one-line revert command from trim apply `revert`), plus refused trims with reasons and the backlog; Owned items (owners: owner, action ids, task id); Scriptify builds (name, controls run ids); Rejected (count + top reasons); Report guard (rejected/retried/missing); Instrument gaps (gather errors, digest state, and the line `Sizes in tokens = ceil(chars / 4 * 1), ratio 1 uncalibrated.`); Cost and runtime per node (verify.metrics).\n v3 sections: **Learning**: paste `learn.table` (tonight, delta, 7-night mean) verbatim except its char rows: `profileChars` and `heartbeatChars` become `profileTokens` and `heartbeatTokens` with every number converted, then reverted / reintroduced / referenced cuts and new pins (learn.scored, learn.newPins), then restores (apply restores, wouldRestore, restoreRefused). **Heartbeat (lane C)**: hb-check ready + reasons + stats (tokens before -> after, pins before = after, removed), lead-disk mode and shas, hb-apply status (wouldApply while v3Writes is off). **Profiles (lane A)**: learn.metrics.laneA totals, sizes in tokens. **Memory taxonomy (lane B1)**: paste the memory taxonomy section verbatim as its own `##` section (it already has counts per path and the 30 spot-check samples; it states no sizes). If it is empty, write `## Memory taxonomy (lane B1, classify-only)` and `memtax-report did not run`. **Learnings triage**: paste the learnings triage section verbatim as its own `##` section right before the memory taxonomy section (it has the read, promoted, kept and dropped counts and samples). If it is empty, write `## Learnings triage` and `learnings-report did not run`. What the decisions became (promotions written, drops deleted, cursor) is the \"Learnings triage (applied)\" line of the long-term memories section. **Long-term memories (lane B create/validate/tidy)**: paste the long-term memories section verbatim as its own `##` section right after it (it has counts per path, creates/edits/deletes, validate verdicts with stale and duplicate counts, and 20 samples; its sizes are already in tokens). If it is empty, write `## Long-term memories (lane B, create/validate/tidy)` and `memtax-create-apply did not run`. Its \"Routed to skills/scripts, not /longterm\" line and table are tonight's how-to handoff (/longterm is recall only); keep them verbatim. **How-to handoff consumed (synthesis)**: one line from the synthesis notes \"howto handoff: ...\" line, or \"none\".\n A lane's claim without verify confirmation goes under \"Unverified\".\n2. Changelog: ONE entry appended to agent-fs `dreaming-v2/changelog.md` with `agent-fs append` (never write or overwrite that file; humans comment in it). DRY RUN, or org or drive empty: append nothing, return the entry in `changelogEntry`. Format, exactly:\n ## <YYYY-MM-DD>: night <gather.night.number>\n - Run <runId>, <status: green | degraded (why)>, cost so far $<verify.metrics.totalCostSoFarUsd>; previous run full cost $<gather.budget.prevRunUsd> (publish + scriptify included) vs budget $<gather.budgetUsd>, report `dreaming-v2/runs/<date>.md`\n - Learning: profiles <tokens of learn.trend.profileChars.tonight> tok (Δ <delta in tok>), heartbeat <tokens of learn.trend.heartbeatChars.tonight> tok (Δ <delta in tok>), memory pruned/merged 0/0 (lane B1 classify-only: <memtax counts.classified> of <memtax counts.docsPlanned> docs classified; /longterm: <long-term counts.written> written of <long-term counts.planned> planned, <long-term counts.creates> creates, <long-term counts.edits> edits, <long-term counts.stale> stale), restores <n applied or would-restore>\n - Learnings: <learnings triage counts.read> read, <counts.promoted> promoted, <counts.kept> kept, <counts.dropped> dropped (0 each when the counts are empty)\n - Long-term how-to -> skills/scripts: <long-term counts.routedToSkills> routed (<long-term counts.routedSkillUpdate> skill updates, <long-term counts.routedSkillNew> new skills, <long-term counts.routedToScripts> script), guard refused <long-term counts.guardRefused> /longterm how-to writes; last night's handoff: <synthesis notes \"howto handoff\" line, or \"none\">\n - <n> applied, <n> proposed, <n> rejected: <synthesis headline>\n - Trims: <trimsLine, without the 'Trims:' prefix>\n - Workflow changes since last run: <gather.workflowChanges: added/removed/config-changed node ids, with its base; \"none\" if all three are empty>\n - **Lead:** <synthesis changelogComment>\n3. slackText: at most 3 lines, no headers. The Slack node appends `trimsLine` as line 4, so the receipt is at most 4 lines:\n line 1 \":crescent_moon: Dreaming <date>: <headline> · <n> applied (<per-lane counts, only non-zero>), <n> proposed, <n> rejected · how-to → skills/scripts <long-term counts.routedToSkills>\"; \"<long-term counts.routedToSkills>\" is 0 when the counts are empty, and if guardRefused > 0 append \" (<guardRefused> /longterm how-to writes refused)\"\n line 2 only if verify found a silent refusal, claim mismatch, unclaimed write, survival.reverted item or reverted trim: \":warning: <one line>\". survival.trimmed and survival.drifted are expected later rewrites: never warn on them.\n last line: \"<live>/file/~/<org>/<drive>/dreaming-v2/runs/<date>.md · changelog <live>/file/~/<org>/<drive>/dreaming-v2/changelog.md\", where <live> is `{{input.agentFsLiveUrl}}` (or
|
|
853
|
+
"template": "dreaming-v2 run {{runId}}: publish the nightly report and the changelog entry. DRY RUN = {{g.dryRun}}.\n\nInputs: gather {{g}} | synthesis {{s}} | verify {{v}} | scriptify {{sc}} | trim plan {{tp}} | trim apply {{tr}} | owners {{ow}} | report guard {{rm}} | reports {{reports}} | learn {{lr}} | apply restores (restores/wouldRestore/restoreRefused in) {{ap}} | heartbeat check {{hbc}} | lead-disk {{ld}} | heartbeat apply {{hba}} | memory taxonomy section {{mtmd}} | memory taxonomy counts {{mtc}} | long-term memories section {{ltmd}} | long-term memories counts {{ltc}} | learnings triage section {{lgmd}} | learnings triage counts {{lgc}}\n(Empty strings mean a quiet night or a failed/skipped node: say which, from gather.)\n\nUNITS: state every size (file, field, profile, heartbeat, draft, prompt, or a size delta) in tokens: tokens = ceil(chars / 4 * ratio), ratio = 1 (uncalibrated). A signed char delta d becomes sign(d) * ceil(|d| / 4 * ratio). Inputs arrive in chars (beforeChars, afterChars, chars, liveChars, draftChars, trimmedChars, netChars, profileChars, heartbeatChars, backlog sizes, identity/memory op deltas): convert when you print and write `<n> tok`. Compute every converted value with one python3 -c or bun -e call over the input numbers, never by hand. Keep a char value only where the limit itself counts chars, in parentheses after the tokens: the claudeMd session cap reads `5000 tok (20,000-char cap)`. Counts that are not sizes stay as they are (pins, tracked items, cuts, memories, chunks, actions, USD, seconds, minutes). The 450-char slackText limit below is a Slack length limit, not a size you report.\n\n1. Report: Markdown at agent-fs `dreaming-v2/runs/<UTC date>.md` (org `{{input.agentFsOrgId}}`, drive `{{input.agentFsDriveId}}`; if either is empty, write nothing to agent-fs: return the report in `markdown` and leave `reportPath` and `reportUrl` empty). DRY RUN: write NOTHING, return it in `markdown`.\n Sections: Headline; Silent refusals / claim mismatches / unclaimed writes / reverted trims (verify, trim survival) FIRST if non-empty; Applied (verify-confirmed only) per lane with target, one-line why, action id; Trims: one row per field (agent, field, before -> after tokens, backup path, and its one-line revert command from trim apply `revert`), plus refused trims with reasons and the backlog; Owned items (owners: owner, action ids, task id); Scriptify builds (name, controls run ids); Rejected (count + top reasons); Report guard (rejected/retried/missing); Instrument gaps (gather errors, digest state, and the line `Sizes in tokens = ceil(chars / 4 * 1), ratio 1 uncalibrated.`); Cost and runtime per node (verify.metrics).\n v3 sections: **Learning**: paste `learn.table` (tonight, delta, 7-night mean) verbatim except its char rows: `profileChars` and `heartbeatChars` become `profileTokens` and `heartbeatTokens` with every number converted, then reverted / reintroduced / referenced cuts and new pins (learn.scored, learn.newPins), then restores (apply restores, wouldRestore, restoreRefused). **Heartbeat (lane C)**: hb-check ready + reasons + stats (tokens before -> after, pins before = after, removed), lead-disk mode and shas, hb-apply status (wouldApply while v3Writes is off). **Profiles (lane A)**: learn.metrics.laneA totals, sizes in tokens. **Memory taxonomy (lane B1)**: paste the memory taxonomy section verbatim as its own `##` section (it already has counts per path and the 30 spot-check samples; it states no sizes). If it is empty, write `## Memory taxonomy (lane B1, classify-only)` and `memtax-report did not run`. **Learnings triage**: paste the learnings triage section verbatim as its own `##` section right before the memory taxonomy section (it has the read, promoted, kept and dropped counts and samples). If it is empty, write `## Learnings triage` and `learnings-report did not run`. What the decisions became (promotions written, drops deleted, cursor) is the \"Learnings triage (applied)\" line of the long-term memories section. **Long-term memories (lane B create/validate/tidy)**: paste the long-term memories section verbatim as its own `##` section right after it (it has counts per path, creates/edits/deletes, validate verdicts with stale and duplicate counts, and 20 samples; its sizes are already in tokens). If it is empty, write `## Long-term memories (lane B, create/validate/tidy)` and `memtax-create-apply did not run`. Its \"Routed to skills/scripts, not /longterm\" line and table are tonight's how-to handoff (/longterm is recall only); keep them verbatim. **How-to handoff consumed (synthesis)**: one line from the synthesis notes \"howto handoff: ...\" line, or \"none\".\n A lane's claim without verify confirmation goes under \"Unverified\".\n2. Changelog: ONE entry appended to agent-fs `dreaming-v2/changelog.md` with `agent-fs append` (never write or overwrite that file; humans comment in it). DRY RUN, or org or drive empty: append nothing, return the entry in `changelogEntry`. Format, exactly:\n ## <YYYY-MM-DD>: night <gather.night.number>\n - Run <runId>, <status: green | degraded (why)>, cost so far $<verify.metrics.totalCostSoFarUsd>; previous run full cost $<gather.budget.prevRunUsd> (publish + scriptify included) vs budget $<gather.budgetUsd>, report `dreaming-v2/runs/<date>.md`\n - Learning: profiles <tokens of learn.trend.profileChars.tonight> tok (Δ <delta in tok>), heartbeat <tokens of learn.trend.heartbeatChars.tonight> tok (Δ <delta in tok>), memory pruned/merged 0/0 (lane B1 classify-only: <memtax counts.classified> of <memtax counts.docsPlanned> docs classified; /longterm: <long-term counts.written> written of <long-term counts.planned> planned, <long-term counts.creates> creates, <long-term counts.edits> edits, <long-term counts.stale> stale), restores <n applied or would-restore>\n - Learnings: <learnings triage counts.read> read, <counts.promoted> promoted, <counts.kept> kept, <counts.dropped> dropped (0 each when the counts are empty)\n - Long-term how-to -> skills/scripts: <long-term counts.routedToSkills> routed (<long-term counts.routedSkillUpdate> skill updates, <long-term counts.routedSkillNew> new skills, <long-term counts.routedToScripts> script), guard refused <long-term counts.guardRefused> /longterm how-to writes; last night's handoff: <synthesis notes \"howto handoff\" line, or \"none\">\n - <n> applied, <n> proposed, <n> rejected: <synthesis headline>\n - Trims: <trimsLine, without the 'Trims:' prefix>\n - Workflow changes since last run: <gather.workflowChanges: added/removed/config-changed node ids, with its base; \"none\" if all three are empty>\n - **Lead:** <synthesis changelogComment>\n3. slackText: at most 3 lines, no headers. The Slack node appends `trimsLine` as line 4, so the receipt is at most 4 lines:\n line 1 \":crescent_moon: Dreaming <date>: <headline> · <n> applied (<per-lane counts, only non-zero>), <n> proposed, <n> rejected · how-to → skills/scripts <long-term counts.routedToSkills>\"; \"<long-term counts.routedToSkills>\" is 0 when the counts are empty, and if guardRefused > 0 append \" (<guardRefused> /longterm how-to writes refused)\"\n line 2 only if verify found a silent refusal, claim mismatch, unclaimed write, survival.reverted item or reverted trim: \":warning: <one line>\". survival.trimmed and survival.drifted are expected later rewrites: never warn on them.\n last line: \"<live>/file/~/<org>/<drive>/dreaming-v2/runs/<date>.md · changelog <live>/file/~/<org>/<drive>/dreaming-v2/changelog.md\", where <live> is `{{input.agentFsLiveUrl}}` (or the file link base from your system prompt when empty) and <org>/<drive> are the ids the report was written to. Omit this line when nothing was written to agent-fs\n Never put a newline inside a line. The trims line is added by the Slack node; do not repeat it. Keep slackText under 450 chars.\n4. trimsLine: trim apply `slackLine` with each `<before>→<after>` char pair rewritten in tokens and ` tok` after it, wording and order otherwise unchanged, e.g. `Lead toolsMd 17263→15903` -> `Lead toolsMd 4316→3976 tok`. Build it with code (regex over slackLine, values from trim apply wouldApply/applied beforeChars/afterChars). One line, no newline; empty string when trim apply is empty.\n\nReturn ONLY JSON {reportPath, reportUrl, slackText, trimsLine, markdown, changelogEntry, changelogAppended}.",
|
|
854
854
|
"outputSchema": {
|
|
855
855
|
"type": "object",
|
|
856
856
|
"required": [
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ACPAdapter2
|
|
3
|
-
} from "./cli-9zmb7ptc.js";
|
|
4
|
-
import"./cli-crpf163n.js";
|
|
5
|
-
import"./cli-gpz1d0t2.js";
|
|
6
|
-
import"./cli-skmhsnqh.js";
|
|
7
|
-
import"./cli-c0xjnr8z.js";
|
|
8
|
-
import"./cli-0726awxw.js";
|
|
9
|
-
import"./cli-dtdht77h.js";
|
|
10
|
-
import"./cli-1m96dc36.js";
|
|
11
|
-
import"./cli-93t5s4zq.js";
|
|
12
|
-
export {
|
|
13
|
-
ACPAdapter2 as ACPAdapter
|
|
14
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
checkClaudeCredentials2,
|
|
3
|
-
cleanupTaskFile2,
|
|
4
|
-
buildClaudeSessionEnvironment2,
|
|
5
|
-
runClaudeSessionSummary2,
|
|
6
|
-
ClaudeAdapter2
|
|
7
|
-
} from "./cli-dpsfwh7n.js";
|
|
8
|
-
import"./cli-rqfvkx5t.js";
|
|
9
|
-
import"./cli-tas6ckky.js";
|
|
10
|
-
import"./cli-d82btycs.js";
|
|
11
|
-
import"./cli-98rwmcyc.js";
|
|
12
|
-
import"./cli-c0xjnr8z.js";
|
|
13
|
-
import"./cli-0726awxw.js";
|
|
14
|
-
import"./cli-dtdht77h.js";
|
|
15
|
-
import"./cli-tnzebztn.js";
|
|
16
|
-
import"./cli-1m96dc36.js";
|
|
17
|
-
import"./cli-93t5s4zq.js";
|
|
18
|
-
export {
|
|
19
|
-
ClaudeAdapter2 as ClaudeAdapter,
|
|
20
|
-
buildClaudeSessionEnvironment2 as buildClaudeSessionEnvironment,
|
|
21
|
-
checkClaudeCredentials2 as checkClaudeCredentials,
|
|
22
|
-
cleanupTaskFile2 as cleanupTaskFile,
|
|
23
|
-
runClaudeSessionSummary2 as runClaudeSessionSummary
|
|
24
|
-
};
|
package/dist/cli-dns0y538.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseEnvFlag,
|
|
3
|
-
isEnvFlagEnabled,
|
|
4
|
-
init_env_flag
|
|
5
|
-
} from "./cli-cebvbc9t.js";
|
|
6
|
-
import {
|
|
7
|
-
isDevOrTestNodeEnv,
|
|
8
|
-
init_node_env
|
|
9
|
-
} from "./cli-rgeadyvq.js";
|
|
10
|
-
import {
|
|
11
|
-
__esm
|
|
12
|
-
} from "./cli-242037k3.js";
|
|
13
|
-
|
|
14
|
-
// src/utils/constants.ts
|
|
15
|
-
function getConfiguredAppUrls() {
|
|
16
|
-
return [process.env.APP_URL, process.env.DASHBOARD_URL].flatMap((value) => (value ?? "").split(",")).map((value) => value.trim().replace(/\/+$/, "")).filter(Boolean);
|
|
17
|
-
}
|
|
18
|
-
function getAppUrl(fallback = DEFAULT_APP_URL) {
|
|
19
|
-
return (getConfiguredAppUrls()[0] || fallback).replace(/\/+$/, "");
|
|
20
|
-
}
|
|
21
|
-
function getLocalDevAppOrigins() {
|
|
22
|
-
if (!isDevOrTestNodeEnv())
|
|
23
|
-
return [];
|
|
24
|
-
return [
|
|
25
|
-
"http://localhost:5274",
|
|
26
|
-
"http://localhost:5175",
|
|
27
|
-
"http://127.0.0.1:5274",
|
|
28
|
-
"http://127.0.0.1:5175",
|
|
29
|
-
"https://*.localhost",
|
|
30
|
-
"http://*.localhost"
|
|
31
|
-
];
|
|
32
|
-
}
|
|
33
|
-
function getMcpBaseUrl() {
|
|
34
|
-
const raw = process.env.MCP_BASE_URL?.trim();
|
|
35
|
-
return (raw || `http://localhost:${process.env.PORT || "3013"}`).replace(/\/+$/, "");
|
|
36
|
-
}
|
|
37
|
-
function getPublicMcpBaseUrl() {
|
|
38
|
-
const raw = process.env.PUBLIC_MCP_BASE_URL?.trim();
|
|
39
|
-
return raw ? raw.replace(/\/+$/, "") : getMcpBaseUrl();
|
|
40
|
-
}
|
|
41
|
-
function getAgentFsLiveUrl() {
|
|
42
|
-
const raw = process.env.AGENT_FS_LIVE_URL?.trim();
|
|
43
|
-
return (raw || DEFAULT_AGENT_FS_LIVE_URL).replace(/\/+$/, "");
|
|
44
|
-
}
|
|
45
|
-
function readAgentFsLinkTarget() {
|
|
46
|
-
const raw = process.env.AGENT_FS_LINK_TARGET?.trim().toLowerCase();
|
|
47
|
-
return raw === "dashboard" || raw === "live" ? raw : null;
|
|
48
|
-
}
|
|
49
|
-
function resolveAgentFsLinkBase(surface) {
|
|
50
|
-
const target = readAgentFsLinkTarget();
|
|
51
|
-
if (target === null)
|
|
52
|
-
return null;
|
|
53
|
-
if (target === "dashboard" && getConfiguredAppUrls().length > 0) {
|
|
54
|
-
if (surface === "prompt" || isCombEnabled())
|
|
55
|
-
return getAppUrl();
|
|
56
|
-
}
|
|
57
|
-
return getAgentFsLiveUrl();
|
|
58
|
-
}
|
|
59
|
-
function getAgentFsDefaultOrgId() {
|
|
60
|
-
const raw = process.env.AGENT_FS_DEFAULT_ORG_ID?.trim();
|
|
61
|
-
return raw || undefined;
|
|
62
|
-
}
|
|
63
|
-
function getAgentFsDefaultDriveId() {
|
|
64
|
-
const raw = process.env.AGENT_FS_DEFAULT_DRIVE_ID?.trim();
|
|
65
|
-
return raw || undefined;
|
|
66
|
-
}
|
|
67
|
-
function agentFsFileRoute(opts) {
|
|
68
|
-
const path = opts.path?.trim();
|
|
69
|
-
if (!path)
|
|
70
|
-
return null;
|
|
71
|
-
const rowOrgId = opts.orgId?.trim();
|
|
72
|
-
const rowDriveId = opts.driveId?.trim();
|
|
73
|
-
const hasRowId = Boolean(rowOrgId || rowDriveId);
|
|
74
|
-
const orgId = hasRowId ? rowOrgId : getAgentFsDefaultOrgId();
|
|
75
|
-
const driveId = hasRowId ? rowDriveId : getAgentFsDefaultDriveId();
|
|
76
|
-
if (!orgId || !driveId)
|
|
77
|
-
return null;
|
|
78
|
-
const segments = path.replace(/^\/+/, "").split("/");
|
|
79
|
-
if (segments.some((segment) => DOT_SEGMENT_RE.test(segment)))
|
|
80
|
-
return null;
|
|
81
|
-
const encodedPath = segments.map((segment) => encodeURIComponent(segment).replace(/%25([0-9a-f]{2})/gi, "%$1")).join("/");
|
|
82
|
-
return `${orgId}/${driveId}/${encodedPath}`;
|
|
83
|
-
}
|
|
84
|
-
function buildAgentFsLiveUrl(opts) {
|
|
85
|
-
const route = agentFsFileRoute(opts);
|
|
86
|
-
return route ? `${getAgentFsLiveUrl()}/file/~/${route}` : null;
|
|
87
|
-
}
|
|
88
|
-
function isPrivateIpv4(a, b) {
|
|
89
|
-
return a === 10 || a === 172 && b >= 16 && b <= 31 || a === 192 && b === 168 || a === 169 && b === 254;
|
|
90
|
-
}
|
|
91
|
-
function parseIpv6(addr) {
|
|
92
|
-
if (addr.includes("."))
|
|
93
|
-
return null;
|
|
94
|
-
const halves = addr.split("::");
|
|
95
|
-
if (halves.length > 2)
|
|
96
|
-
return null;
|
|
97
|
-
const toGroups = (part) => {
|
|
98
|
-
if (!part)
|
|
99
|
-
return [];
|
|
100
|
-
const groups = part.split(":").map((g) => /^[0-9a-f]{1,4}$/.test(g) ? Number.parseInt(g, 16) : Number.NaN);
|
|
101
|
-
return groups.some(Number.isNaN) ? null : groups;
|
|
102
|
-
};
|
|
103
|
-
const head = toGroups(halves[0] ?? "");
|
|
104
|
-
const tail = toGroups(halves[1] ?? "");
|
|
105
|
-
if (!head || !tail)
|
|
106
|
-
return null;
|
|
107
|
-
if (halves.length === 1)
|
|
108
|
-
return head.length === 8 ? head : null;
|
|
109
|
-
const missing = 8 - head.length - tail.length;
|
|
110
|
-
return missing < 1 ? null : [...head, ...new Array(missing).fill(0), ...tail];
|
|
111
|
-
}
|
|
112
|
-
function isBrowserReachableUrl(value) {
|
|
113
|
-
let host;
|
|
114
|
-
try {
|
|
115
|
-
host = new URL(value).hostname.toLowerCase().replace(/\.$/, "");
|
|
116
|
-
} catch {
|
|
117
|
-
return false;
|
|
118
|
-
}
|
|
119
|
-
if (!host)
|
|
120
|
-
return false;
|
|
121
|
-
if (host === "localhost" || host.endsWith(".localhost"))
|
|
122
|
-
return true;
|
|
123
|
-
if (host.startsWith("[")) {
|
|
124
|
-
const parsed = parseIpv6(host.slice(1, -1));
|
|
125
|
-
if (!parsed)
|
|
126
|
-
return false;
|
|
127
|
-
const g = (i) => parsed[i] ?? 0;
|
|
128
|
-
if (parsed.slice(0, 7).every((x) => x === 0) && g(7) === 1)
|
|
129
|
-
return true;
|
|
130
|
-
if (parsed.every((x) => x === 0) || (g(0) & 65280) === 65280)
|
|
131
|
-
return false;
|
|
132
|
-
if ((g(0) & 65024) === 64512 || (g(0) & 65472) === 65152)
|
|
133
|
-
return false;
|
|
134
|
-
if (parsed.slice(0, 5).every((x) => x === 0) && g(5) === 65535) {
|
|
135
|
-
const a = g(6) >> 8;
|
|
136
|
-
if (a === 0)
|
|
137
|
-
return false;
|
|
138
|
-
return a === 127 || !isPrivateIpv4(a, g(6) & 255);
|
|
139
|
-
}
|
|
140
|
-
return true;
|
|
141
|
-
}
|
|
142
|
-
const octets = host.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);
|
|
143
|
-
if (octets) {
|
|
144
|
-
const [a, b] = [Number(octets[1]), Number(octets[2])];
|
|
145
|
-
if (a === 0)
|
|
146
|
-
return false;
|
|
147
|
-
return a === 127 || !isPrivateIpv4(a, b);
|
|
148
|
-
}
|
|
149
|
-
if (!host.includes("."))
|
|
150
|
-
return false;
|
|
151
|
-
return !(host.endsWith(".internal") || host.endsWith(".svc") || host.endsWith(".cluster.local"));
|
|
152
|
-
}
|
|
153
|
-
function getCombState() {
|
|
154
|
-
const apiUrl = process.env.AGENT_FS_API_URL?.trim().replace(/\/+$/, "");
|
|
155
|
-
const raw = process.env.COMB_ENABLED;
|
|
156
|
-
const explicit = parseEnvFlag(raw, true) === parseEnvFlag(raw, false);
|
|
157
|
-
if (explicit && !isEnvFlagEnabled("COMB_ENABLED", false)) {
|
|
158
|
-
return { enabled: false, explicit, reason: "COMB_ENABLED is false." };
|
|
159
|
-
}
|
|
160
|
-
if (!apiUrl)
|
|
161
|
-
return { enabled: false, explicit, reason: "AGENT_FS_API_URL is not set." };
|
|
162
|
-
if (explicit)
|
|
163
|
-
return { enabled: true, explicit, reason: null };
|
|
164
|
-
if (process.env.AGENT_FS_PUBLIC_URL?.trim())
|
|
165
|
-
return { enabled: true, explicit, reason: null };
|
|
166
|
-
const proxy = isAgentFsProxyEnabled();
|
|
167
|
-
const browserUrl = proxy ? getPublicMcpBaseUrl() : apiUrl;
|
|
168
|
-
return isBrowserReachableUrl(browserUrl) ? { enabled: true, explicit, reason: null } : {
|
|
169
|
-
enabled: false,
|
|
170
|
-
explicit,
|
|
171
|
-
reason: proxy ? `AGENT_FS_PROXY is on, but the API address ${browserUrl} is not reachable from a browser. Set PUBLIC_MCP_BASE_URL to the public API URL, or set COMB_ENABLED=true to force Files on.` : `AGENT_FS_API_URL (${apiUrl}) is not reachable from a browser. Set AGENT_FS_PUBLIC_URL or AGENT_FS_PROXY=true, or set COMB_ENABLED=true to force Files on.`
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
function isCombEnabled() {
|
|
175
|
-
return getCombState().enabled;
|
|
176
|
-
}
|
|
177
|
-
function isAgentFsProxyEnabled() {
|
|
178
|
-
return isEnvFlagEnabled("AGENT_FS_PROXY", false);
|
|
179
|
-
}
|
|
180
|
-
function buildCombFileUrl(opts) {
|
|
181
|
-
if (!isCombEnabled() || getConfiguredAppUrls().length === 0)
|
|
182
|
-
return null;
|
|
183
|
-
const route = agentFsFileRoute(opts);
|
|
184
|
-
return route ? `${getAppUrl()}/file/~/${route}` : null;
|
|
185
|
-
}
|
|
186
|
-
var MAX_PROFILE_FILE_LENGTH, DEFAULT_APP_URL = "https://app.agent-swarm.dev", DEFAULT_AGENT_FS_LIVE_URL = "https://live.agent-fs.dev", DOT_SEGMENT_RE;
|
|
187
|
-
var init_constants3 = __esm(() => {
|
|
188
|
-
init_env_flag();
|
|
189
|
-
init_node_env();
|
|
190
|
-
MAX_PROFILE_FILE_LENGTH = 256 * 1024;
|
|
191
|
-
DOT_SEGMENT_RE = /^(?:\.|%2e){1,2}$/i;
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
export { MAX_PROFILE_FILE_LENGTH, DEFAULT_APP_URL, getConfiguredAppUrls, getAppUrl, getLocalDevAppOrigins, getMcpBaseUrl, getPublicMcpBaseUrl, getAgentFsLiveUrl, resolveAgentFsLinkBase, getAgentFsDefaultOrgId, getAgentFsDefaultDriveId, agentFsFileRoute, buildAgentFsLiveUrl, getCombState, isCombEnabled, isAgentFsProxyEnabled, buildCombFileUrl, init_constants3 };
|