@desplega.ai/agent-swarm 2.13.0 → 2.13.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-xtj40wd8.js +17 -0
- package/dist/{acp-targets-86f0sh6g.js → acp-targets-n7vm5atw.js} +10 -10
- package/dist/{actions-zv8vcxvr.js → actions-hq6wp9xv.js} +27 -27
- package/dist/{agent-fs-provision-jqshb33y.js → agent-fs-provision-y0qc1rdd.js} +4 -4
- package/dist/{amp-adapter-gt503ywc.js → amp-adapter-1qqs6h91.js} +3 -3
- package/dist/{app-6t4k5rh1.js → app-7m4z44rv.js} +10 -10
- package/dist/{approval-notifications-fcfw063h.js → approval-notifications-8sr41gjx.js} +11 -11
- package/dist/{assistant-9dzybh12.js → assistant-hkczwfv6.js} +28 -28
- package/dist/{boot-args-schema-xzfp2feg.js → boot-args-schema-8025snev.js} +1 -1
- package/dist/{boot-reembed-r88wngfg.js → boot-reembed-15m87nr1.js} +1 -1
- package/dist/{boot-reembed-3jz0p2jk.js → boot-reembed-4bbpxjh1.js} +1 -1
- package/dist/{boot-scrub-sweep-scrqhw48.js → boot-scrub-sweep-eajr97e9.js} +2 -2
- package/dist/{boot-seeds-vb2dcrrb.js → boot-seeds-9cwy39jx.js} +4 -4
- package/dist/{boxd-68n75y1s.js → boxd-hr8rsxzq.js} +1 -1
- package/dist/{claude-adapter-h3mp9hgs.js → claude-adapter-g61wa4rt.js} +9 -9
- package/dist/{claude-managed-adapter-kpbyj2vb.js → claude-managed-adapter-znkk0prm.js} +3 -3
- package/dist/{claude-managed-setup-0efr3wkg.js → claude-managed-setup-f1wndkr2.js} +2 -2
- package/dist/{claude-sdk-session-03dw669q.js → claude-sdk-session-687xzf21.js} +20763 -19381
- package/dist/{cli-gfcv679k.js → cli-04103ryh.js} +1 -1
- package/dist/{cli-hbq0kwxz.js → cli-0a336ze7.js} +4 -4
- package/dist/{cli-1v82d2w6.js → cli-0fx95c06.js} +4 -4
- package/dist/{cli-wxwv3t11.js → cli-0m77n7ej.js} +3 -3
- package/dist/{cli-j53hpbsm.js → cli-0xwb7zpt.js} +2 -2
- package/dist/{cli-0dg7ytxm.js → cli-13t0smbk.js} +917 -23
- package/dist/{cli-0pazkmd4.js → cli-1b5axkt1.js} +4 -4
- package/dist/{cli-6h88mn9q.js → cli-1carhg8g.js} +4 -4
- package/dist/{cli-hgsxnjyg.js → cli-1dr5at77.js} +10 -10
- package/dist/{cli-0jkenasr.js → cli-2v4xxnx2.js} +1 -1
- package/dist/{cli-dnh64e8e.js → cli-32xndx6b.js} +6 -6
- package/dist/{cli-hpb9x72z.js → cli-3m8vqehw.js} +9 -9
- package/dist/{cli-ercwc8xn.js → cli-3mf04tkh.js} +1 -1
- package/dist/{cli-7dbhnsj9.js → cli-3zyme1wt.js} +4 -4
- package/dist/{cli-s6zk31gr.js → cli-43dsqhcp.js} +4 -4
- package/dist/{cli-t35hx078.js → cli-4h90xaet.js} +2 -2
- package/dist/{cli-117g15t4.js → cli-4mj5g29m.js} +8 -8
- package/dist/{cli-47hz21se.js → cli-4tbvndmm.js} +4 -5
- package/dist/{cli-tn91wc6e.js → cli-50whymxq.js} +1 -1
- package/dist/{cli-js10kdk7.js → cli-5basv0e7.js} +19 -5
- package/dist/{cli-xfjn2kyq.js → cli-5v6b2am8.js} +5 -5
- package/dist/{cli-49f5jyhh.js → cli-6r1dwegd.js} +3 -3
- package/dist/{cli-kspxjftk.js → cli-7ewre3dm.js} +15 -6
- package/dist/{cli-n3qe7tyr.js → cli-84xtgbn6.js} +35 -2
- package/dist/{cli-w14j2z4k.js → cli-8cmjkbvj.js} +2 -2
- package/dist/{cli-2m6yaq6b.js → cli-8fj8yfmk.js} +1 -1
- package/dist/{cli-9m9kyw77.js → cli-8rbkw18r.js} +2 -2
- package/dist/{cli-x05p2d05.js → cli-9tevdxyf.js} +1 -1
- package/dist/{cli-f1952kjy.js → cli-9xx36trj.js} +4 -4
- package/dist/{cli-hc6e4tac.js → cli-a8ts6x1n.js} +6 -6
- package/dist/{cli-mh7pdxe0.js → cli-aebswqmz.js} +12 -12
- package/dist/{cli-ex1y88j3.js → cli-at67kvnp.js} +1 -1
- package/dist/{cli-b2jh3dyb.js → cli-bjmq14k9.js} +4 -4
- package/dist/{cli-mz34pxbk.js → cli-byxsctca.js} +11 -11
- package/dist/{cli-dka73bak.js → cli-c0tyzt73.js} +152 -12
- package/dist/{cli-wv20kbr3.js → cli-c8kqmzzf.js} +5 -5
- package/dist/{cli-qhhb30e8.js → cli-cd9acnvd.js} +9 -9
- package/dist/{cli-wndegmns.js → cli-cmgdptmx.js} +3 -3
- package/dist/{cli-1dbv9mj9.js → cli-cn6fpa1p.js} +1 -1
- package/dist/{cli-wrhbym01.js → cli-cp0m07wb.js} +6 -6
- package/dist/{cli-3p288654.js → cli-cpkxh68d.js} +2 -2
- package/dist/{cli-g6j6ac3h.js → cli-cqxwjb93.js} +2 -2
- package/dist/{cli-8hp56wat.js → cli-d2epqm0y.js} +1 -1
- package/dist/{cli-qm3ntjqs.js → cli-dd57p1gd.js} +13 -13
- package/dist/{cli-tstj6e8e.js → cli-fn8aj7gb.js} +250 -55
- package/dist/{cli-bpje8n65.js → cli-fp65jdp2.js} +31 -6
- package/dist/{cli-2skf1mdf.js → cli-gedf48yw.js} +4 -4
- package/dist/{cli-c8v2yvej.js → cli-gq6qhmrr.js} +2 -2
- package/dist/{cli-sq913bh1.js → cli-grcc2h2g.js} +8 -8
- package/dist/{cli-qec9bynj.js → cli-h03j6je3.js} +3 -3
- package/dist/{cli-mbwmqb5w.js → cli-h0ewec3d.js} +1 -1
- package/dist/{cli-jj3c5nyb.js → cli-h9bejmkf.js} +76 -39
- package/dist/{cli-ct8sz3np.js → cli-hs3mqswp.js} +6 -6
- package/dist/{cli-tdk7jtka.js → cli-hv3820ez.js} +1 -1
- package/dist/{cli-pqfecppn.js → cli-je587f74.js} +1 -1
- package/dist/{cli-y4a4458j.js → cli-jhtvt7gn.js} +3 -3
- package/dist/{cli-dkejt425.js → cli-mmw2sjaf.js} +7 -7
- package/dist/{cli-50w82h6m.js → cli-mwxez0pz.js} +1 -0
- package/dist/{cli-avxh26pd.js → cli-nk8swfpx.js} +4 -4
- package/dist/{cli-fhvk2nvp.js → cli-p7g7wd9n.js} +9 -9
- package/dist/{cli-bhgrhedp.js → cli-q8aq48v1.js} +1 -1
- package/dist/{cli-6a40p4kv.js → cli-qn79645p.js} +1 -1
- package/dist/{cli-nc6a8b5b.js → cli-qx1dwrr5.js} +2 -2
- package/dist/{cli-sdh61g52.js → cli-s6fhqbz1.js} +2 -2
- package/dist/{cli-eb279wn3.js → cli-sfajkbd7.js} +2 -2
- package/dist/{cli-z64t9pe6.js → cli-snypfjgj.js} +1 -1
- package/dist/{cli-ytc7fpza.js → cli-t25rq8mg.js} +4 -4
- package/dist/{cli-zqmmy073.js → cli-t90k0phh.js} +18 -18
- package/dist/{cli-fz9pcjsw.js → cli-tzzas8rb.js} +4 -4
- package/dist/{cli-rtmqzat7.js → cli-vdfngx2g.js} +2 -2
- package/dist/{cli-9w8712tq.js → cli-vr4eyq6p.js} +43 -14
- package/dist/{cli-z4f346g5.js → cli-vx9acp12.js} +1 -1
- package/dist/{cli-y518qkjg.js → cli-w24f3j49.js} +10 -10
- package/dist/{cli-yn4kt85g.js → cli-w41bvvms.js} +1 -1
- package/dist/{cli-9fsagra4.js → cli-w6c6dj91.js} +1 -1
- package/dist/{cli-kde4ky90.js → cli-x5yb8zc8.js} +2 -2
- package/dist/{cli-48nvk6sb.js → cli-xhkek467.js} +2 -2
- package/dist/{cli-avqkr20b.js → cli-y6qqbpwc.js} +2 -2
- package/dist/{cli-7wy8gbwb.js → cli-ya1cj689.js} +1 -1
- package/dist/{cli-prf7kz78.js → cli-yeh3g1q6.js} +603 -78
- package/dist/{cli-ajjvqhf3.js → cli-z6m6xzxt.js} +2 -2
- package/dist/{cli-2jk4s7z1.js → cli-zaate0rd.js} +3 -3
- package/dist/{cli-n85m2wkq.js → cli-zkbz8m2q.js} +3 -2
- package/dist/{cli-0b655smz.js → cli-zvpkrgsc.js} +5 -5
- package/dist/cli.js +27 -27
- package/dist/{codex-adapter-f3yp0kaj.js → codex-adapter-ysfg6ty3.js} +8 -8
- package/dist/{codex-hook-262cekfp.js → codex-hook-c0nvm30r.js} +2 -2
- package/dist/{codex-login-1ven7yje.js → codex-login-ven5cz5j.js} +1 -1
- package/dist/{codex-session-runner-ns4mv70p.js → codex-session-runner-823scr6g.js} +9 -9
- package/dist/{commands-5bzf2tfw.js → commands-5rbm07fz.js} +3 -3
- package/dist/{controller-5xt7kvfm.js → controller-wn3vd217.js} +3 -3
- package/dist/{controllers-connect-0gg13mzp.js → controllers-connect-34jzhfft.js} +28 -28
- package/dist/core-kdehq26g.js +42 -0
- package/dist/{cursor-adapter-p0c5zv6r.js → cursor-adapter-w1681kp1.js} +2 -2
- package/dist/{db-2s68ycq7.js → db-6bkgbfwk.js} +3 -3
- package/dist/{db-q7q639k5.js → db-hcj16x7z.js} +2 -2
- package/dist/{devin-adapter-t8d86q9x.js → devin-adapter-fs90ab4v.js} +1 -1
- package/dist/{dispatcher-j2y1q7ae.js → dispatcher-jgjqrfzv.js} +25 -25
- package/dist/{docker-1b41eysj.js → docker-1h33jvh9.js} +2 -2
- package/dist/{dsh-adapter-pgnkf4st.js → dsh-adapter-g9yqv09y.js} +2 -2
- package/dist/{e2b-xm60c8ad.js → e2b-jnk0yeva.js} +2 -2
- package/dist/{e2b-ew8c5j5v.js → e2b-y7e5kmzf.js} +2 -2
- package/dist/{easter-egg-3d-0kea97jf.js → easter-egg-3d-w17nsny6.js} +1 -1
- package/dist/{embedding-space-3n6mhhmy.js → embedding-space-v06fwy7b.js} +6 -6
- package/dist/{embeddings-jfmj6yme.js → embeddings-g50dxea4.js} +1 -1
- package/dist/{event-bus-v4ywhc2p.js → event-bus-08t2b4y2.js} +1 -1
- package/dist/{execute-tjrej979.js → execute-1n36haw1.js} +1 -1
- package/dist/{external-channel-jy8w2gg3.js → external-channel-43tv8pg6.js} +2 -2
- package/dist/fx-adapter-bvh05t4a.js +20 -0
- package/dist/grok-adapter-my5j8mdf.js +20 -0
- package/dist/handlers-wyymeeqh.js +41 -0
- package/dist/heartbeat-sf3nk937.js +50 -0
- package/dist/{hook-bpnncsec.js → hook-dqph1e05.js} +8 -8
- package/dist/{hook-fv1jwrv7.js → hook-m1m9dm6w.js} +6 -6
- package/dist/{http-bpa26czn.js → http-w0th1cz9.js} +160 -102
- package/dist/index-22khdtby.js +44 -0
- package/dist/{index-mpj0z9e0.js → index-c0e8en64.js} +1 -1
- package/dist/{index-620y7jzq.js → index-e8pz8qdg.js} +3 -3
- package/dist/{index-8p0j4h4j.js → index-ez823q84.js} +94 -89
- package/dist/{index-w216g9y9.js → index-ffba0z8q.js} +35 -21
- package/dist/{index-s8re7mvq.js → index-gkpfgpg7.js} +1 -1
- package/dist/{index-4k7m5dgj.js → index-k8ajc0g0.js} +143 -103
- package/dist/index-np0582ac.js +40 -0
- package/dist/{index-52tgbhrw.js → index-pb03vans.js} +28 -28
- package/dist/index-vgkrj1jt.js +39 -0
- package/dist/{index-pe3d8jfy.js → index-whysn1wf.js} +1 -1
- package/dist/{index-0h6qd4p1.js → index-y4vd4mhn.js} +3 -4
- package/dist/{k8s-fy8hbhkg.js → k8s-8326q0rq.js} +2 -2
- package/dist/{keepalive-d6z12s04.js → keepalive-2v06q2e8.js} +5 -4
- package/dist/lead-55z813ng.js +79 -0
- package/dist/{maintenance-7kac6g2g.js → maintenance-vx7vjhhy.js} +1 -1
- package/dist/{oauth-refresh-sweep-t1xjetbh.js → oauth-refresh-sweep-g06k4bza.js} +4 -3
- package/dist/{object-webhooks-6rdagg0r.js → object-webhooks-3dzdq4fm.js} +7 -7
- package/dist/{onboard-32y1cfxy.js → onboard-232pazny.js} +4 -4
- package/dist/{opencode-adapter-enp3v31n.js → opencode-adapter-t0paqbh8.js} +8 -8
- package/dist/{otel-impl-k0tm5ptj.js → otel-impl-kmpkyp4y.js} +2 -2
- package/dist/{pending-24zebgvs.js → pending-x0z3vx1x.js} +26 -26
- package/dist/{pi-mono-adapter-yj72xxxe.js → pi-mono-adapter-7pmypn6d.js} +17 -15
- package/dist/{pricing-refresh-cf25x38j.js → pricing-refresh-ytjmtyd7.js} +2 -2
- package/dist/{rbac-roles-0wydd22m.js → rbac-roles-fgm5mxr2.js} +3 -3
- package/dist/{rbac-roles-at6crb3r.js → rbac-roles-xyaxekh3.js} +2 -2
- package/dist/{render-v2-nvcw0jd7.js → render-v2-ws972g4r.js} +10 -10
- package/dist/{resume-y4w0k5v3.js → resume-m6mjzhkp.js} +13 -13
- package/dist/{runtime-vpe43hx0.js → runtime-zzpc0c8a.js} +1 -1
- package/dist/{session-access-gkyvnfye.js → session-access-vp35xs91.js} +5 -5
- package/dist/{session-source-backfill-3w2st4m2.js → session-source-backfill-p73e8zbe.js} +2 -2
- package/dist/{setup-axxvqtys.js → setup-r4kd7rxg.js} +1 -1
- package/dist/thread-buffer-cm2nzq6t.js +42 -0
- package/dist/{tree-visibility-y4fqvab5.js → tree-visibility-07h2tbs2.js} +2 -2
- package/dist/{user-merge-jobs-kcmwvrc6.js → user-merge-jobs-96vg9rpe.js} +3 -3
- package/dist/{virtual-modules-7d92dct1.js → virtual-modules-vgn3f2x4.js} +3 -3
- package/dist/{work-objects-f708e069.js → work-objects-74hbcx3e.js} +28 -28
- package/dist/worker-5pn2vzx6.js +79 -0
- package/dist/{worker-follow-up-0by8wztc.js → worker-follow-up-ezavwn5d.js} +25 -25
- package/dist/{x-3dtaf2r9.js → x-asbrnafg.js} +2 -2
- package/openapi.json +1793 -1622
- package/package.json +10 -10
- package/src/apps/catalog.generated.json +726 -0
- package/src/apps/definition.ts +24 -7
- package/src/apps/page-validator.ts +225 -3
- package/src/be/db.ts +38 -10
- package/src/be/mcp-proxy.ts +5 -4
- package/src/be/migrations/340_api_key_spend_cap.sql +5 -0
- package/src/be/schedules/validate.ts +26 -0
- package/src/be/swarm-config-guard.ts +4 -0
- package/src/commands/credential-outcome-report.ts +5 -2
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/provider-credentials.ts +19 -0
- package/src/commands/provider-error-class.ts +4 -1
- package/src/commands/rate-limit-outcome.ts +48 -3
- package/src/commands/runner.ts +113 -55
- package/src/commands/worktree-reaper.ts +600 -0
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/http/agents.ts +4 -0
- package/src/http/api-keys.ts +27 -3
- package/src/http/pages-public.ts +40 -4
- package/src/http/pool-keys.ts +21 -2
- package/src/http/schedules.ts +28 -3
- package/src/http/script-connections.ts +12 -4
- package/src/http/script-runs.ts +12 -3
- package/src/http/tasks.ts +6 -10
- package/src/mcp-client/http-client.ts +3 -1
- package/src/oauth/identity-capture.ts +6 -1
- package/src/oauth/mcp-wrapper.ts +10 -3
- package/src/oauth/wrapper.ts +15 -3
- package/src/prompts/session-templates.ts +1 -0
- package/src/providers/acp-targets.ts +2 -2
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/dsh-adapter.ts +1 -1
- package/src/providers/pi-mono-adapter.ts +4 -2
- package/src/providers/runtime-dependencies.ts +1 -1
- package/src/rbac/legacy-policy.ts +2 -0
- package/src/rbac/permissions.ts +5 -0
- package/src/scripts-runtime/types/swarm-extension.d.ts +7 -7
- package/src/slack/enrich.ts +14 -11
- package/src/tests/agents-list-model-display.test.ts +23 -0
- package/src/tests/apps-spike2.test.ts +35 -0
- package/src/tests/base-prompt.test.ts +1 -0
- package/src/tests/deploy-guard.test.ts +24 -0
- package/src/tests/dsh-adapter.test.ts +1 -1
- package/src/tests/ensure-token.test.ts +2 -2
- package/src/tests/entrypoint-repo-autoclone-args.test.ts +202 -0
- package/src/tests/fake-dns.ts +47 -0
- package/src/tests/fixtures/base-prompt-baseline.json +12 -12
- package/src/tests/latest-model-report.test.ts +138 -0
- package/src/tests/mcp-oauth-dcr-reuse.test.ts +5 -2
- package/src/tests/mcp-oauth-ensure-token.test.ts +3 -2
- package/src/tests/mcp-oauth-manual-client.test.ts +6 -1
- package/src/tests/mcp-oauth-wrapper.test.ts +20 -4
- package/src/tests/mcp-outbound-fetch-guard.test.ts +169 -0
- package/src/tests/mcp-server-ssrf.test.ts +2 -0
- package/src/tests/memory-search-stall.test.ts +5 -0
- package/src/tests/oauth-connection-fetch-guard.test.ts +162 -0
- package/src/tests/oauth-token-endpoint-fetch-guard.test.ts +121 -0
- package/src/tests/oauth-wrapper.test.ts +1 -2
- package/src/tests/pages-head-v2.test.ts +2 -1
- package/src/tests/script-connections-http.test.ts +8 -3
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tests/slack-thread-participants.test.ts +14 -3
- package/src/tests/spend-cap-credentials.test.ts +34 -0
- package/src/tests/spend-cap-outcome.test.ts +67 -0
- package/src/tests/subscription-first.test.ts +119 -0
- package/src/tests/worktree-reaper.test.ts +424 -0
- package/src/tools/get-task-details.ts +247 -5
- package/src/tools/schedules/patch-schedule.ts +26 -1
- package/src/tools/schedules/update-schedule.ts +28 -2
- package/src/utils/credentials.ts +36 -1
- package/src/utils/egress-guard.ts +40 -10
- package/src/utils/error-tracker.ts +17 -0
- package/templates/skills/apps/SKILL.md +191 -2
- package/templates/skills/apps/content.md +191 -2
- package/templates/skills/boards-and-sheets/content.md +11 -0
- package/templates/skills/pages/content.md +11 -0
- package/templates/skills/swarm-docs/content.md +2 -0
- package/templates/skills/swarm-scripts/SKILL.md +1 -0
- package/templates/skills/swarm-scripts/content.md +1 -0
- package/templates/workflows/ralph-loop/content.md +6 -6
- package/dist/acp-adapter-cn53011z.js +0 -17
- package/dist/cli-pr0eze3x.js +0 -149
- package/dist/core-0fqtbrxa.js +0 -42
- package/dist/fx-adapter-k6w3jvz9.js +0 -20
- package/dist/grok-adapter-4q5tssw0.js +0 -20
- package/dist/handlers-qxgfvvsf.js +0 -41
- package/dist/heartbeat-6tr2w2da.js +0 -50
- package/dist/index-0mcxjdsa.js +0 -44
- package/dist/index-dz4q23ag.js +0 -40
- package/dist/index-s175jckx.js +0 -39
- package/dist/lead-p3hx7h35.js +0 -79
- package/dist/thread-buffer-rwa7d4dx.js +0 -42
- package/dist/worker-8rg9gz74.js +0 -79
|
@@ -531,9 +531,9 @@ The sidebar lists pages in definition order and marks the current one. Below 768
|
|
|
531
531
|
|
|
532
532
|
Param `kind` is `string` by default, or `number` / `boolean`; `required` defaults to false. The names `mode`, `apiUrl`, `apiKey`, `email`, and `name` are reserved. `/apps/<id>` renders `defaultPage`; `/apps/<id>/p/<page>?issueId=42` is the shareable deep link for another page. Browser navigation is client-side, so app state and polled data stay warm across page changes.
|
|
533
533
|
|
|
534
|
-
Within each page, `root` names one entry in its non-empty `elements` map. Elements are a flat, single-parent tree: ids are map keys, `children` contains ids (not nested elements), all elements must be reachable from `root`, and cycles, missing children, or shared children are invalid. Element and Form/UI ids are page-local. Element keys are `type`, `props`, `children`, `on`, `visible`, `repeat`, and `watch`; only components with a `default` child slot accept `children` (Stack, Grid, Split, Tabs, Accordion, Container, Card, Section, Drawer, and
|
|
534
|
+
Within each page, `root` names one entry in its non-empty `elements` map. Elements are a flat, single-parent tree: ids are map keys, `children` contains ids (not nested elements), all elements must be reachable from `root`, and cycles, missing children, or shared children are invalid. Element and Form/UI ids are page-local. Element keys are `type`, `props`, `children`, `on`, `visible`, `repeat`, and `watch`; only components with a `default` child slot accept `children` (Stack, Grid, Split, Tabs, Accordion, Container, Card, Section, Drawer, Dialog, and Svg). `watch` maps state paths to an action step or chain. A page may also declare `state`: page-local values read and written at `/local/<name>` (see Low-level primitives).
|
|
535
535
|
|
|
536
|
-
## Component catalog (all
|
|
536
|
+
## Component catalog (all 52)
|
|
537
537
|
|
|
538
538
|
Props reject unknown keys. A `{"$state":"..."}` binding may replace a literal prop value at any depth.
|
|
539
539
|
|
|
@@ -590,6 +590,13 @@ Tones: Badge, Metric and Progress `tone` take `neutral`, `success`, `active`, `e
|
|
|
590
590
|
| `Approval` | `requestId` | `showResolved` (default true), `compact`, `onResolved`; one approval request answered in place by the viewer; see below. |
|
|
591
591
|
| `SessionThread` | `id`, `sessionKey` | `scope`, `placeholder`, `onDispatch`, `fill`; the dashboard's session conversation (the "Session about this page" panel) for one session per viewer and key, with a composer that steers or chains tasks; the draft is mirrored to `/ui/<id>/value`; see below. |
|
|
592
592
|
| `PageFrame` | `pageId` | `device` (`desktop` default, or `mobile`: a 390 px wide frame), `height` (default `640px`), `fill`; a live, clickable swarm Page that reloads when the page changes; see below. |
|
|
593
|
+
| `Input` | none | Low-level text field: `value` (bind two-way with `$bindState` / `$bindItem`), `id` (the `ui.focus` target), `label`, `placeholder`, `type: "text"` or `"password"`, `inputMode`, `autoComplete: "off"` or `"one-time-code"`, `maxLength`, `size: "default"` or `"cell"` (square one-character box), `selectOnFocus`, `disabled`; chains `onInput`, `onPaste`, `onKeyDown:<Key>`; see Low-level primitives. |
|
|
594
|
+
| `Svg` | `width`, `height` on the outer Svg | Vector drawing in `width` x `height` user units, scaled to its container; `label` (accessible name). Children: `Rect`, `Line`, `Path`, `Circle`, `SvgText`, or a nested `Svg` (a group offset by `x`/`y`, the place for `repeat`). |
|
|
595
|
+
| `Rect` | `x`, `y`, `width`, `height` | `rx`, `fill`, `stroke`, `strokeWidth`, `opacity`, `title` (tooltip); only inside an Svg. |
|
|
596
|
+
| `Line` | `x1`, `y1`, `x2`, `y2` | `stroke`, `strokeWidth`, `opacity`, `dashed`; only inside an Svg. |
|
|
597
|
+
| `Path` | `d` | `fill`, `stroke`, `strokeWidth`, `opacity`; `d` holds path commands and numbers only; only inside an Svg. |
|
|
598
|
+
| `Circle` | `cx`, `cy`, `r` | `fill`, `stroke`, `strokeWidth`, `opacity`, `title`; only inside an Svg. |
|
|
599
|
+
| `SvgText` | `x`, `y`, `text` | `anchor: "start", "middle", "end"`, `size`, `weight: "normal"` or `"bold"`, `fill`; only inside an Svg. |
|
|
593
600
|
|
|
594
601
|
Table details:
|
|
595
602
|
|
|
@@ -858,6 +865,7 @@ Valid `$state` roots are:
|
|
|
858
865
|
- `/actions/<declaredAction>/...`
|
|
859
866
|
- `/route/page` for the active page name
|
|
860
867
|
- `/route/params/<declaredParam>` for a param declared on the current page
|
|
868
|
+
- `/local/<name>/...`, where the current page declares `<name>` in its `state`
|
|
861
869
|
|
|
862
870
|
`/route` is mirrored as `{ page, params }`. Only declared params appear. Values are coerced by their declared kind: `number` becomes a number when possible; boolean strings `true`/`1` become true; failed number coercion remains the raw string.
|
|
863
871
|
|
|
@@ -898,6 +906,178 @@ The `studio` page's `SessionThread` with `"sessionKey": { "$state": "/route/para
|
|
|
898
906
|
|
|
899
907
|
A failed step halts its chain: when `app.action`, `app.mutate`, `swarm.sdk` or `swarm.call` fails (a thrown error, a script action that returns `ok: false`, a non-2xx `swarm.call`), the steps after it do not run and the error shows as an error toast. A step's `onError` (`{ set }` or `{ action }`) runs first, and the chain still halts. So a `ui.toast` after a write is a real success message. A `Form`'s failed `app.mutate` shows inline under the fields instead of a toast. A task-backed `app.action` succeeds once the task is created; the task's own failure shows in the page banner and does not halt the chain. A Table bulk action reads each step's own outcome, as before.
|
|
900
908
|
|
|
909
|
+
## Low-level primitives
|
|
910
|
+
|
|
911
|
+
Compose custom widgets (a code input, a timeline, a Gantt chart) from page-local state, a bindable `Input`, three `ui.*` steps, expressions, and `Svg` shapes. No custom component needed.
|
|
912
|
+
|
|
913
|
+
**Page state.** `pages.<page>.state` maps names to initial JSON values. The page reads them at `{ "$state": "/local/<name>/..." }` and only this root is writable. Each page has its own `/local`, even when two pages declare the same name. The values are seeded on first render and survive navigation; patching `pages.<page>.state.<name>` replaces that entry. Reusable elements cannot read or write `/local`.
|
|
914
|
+
|
|
915
|
+
**Input.** `value: { "$bindState": "/local/<name>/..." }` binds two-way; inside a `repeat` over a `/local` list, `{ "$bindItem": "" }` binds the item itself (`"field"` binds a field of it). `$bindState` and `$bindItem` are valid only on `Input.value`. Event chains are props, run by the Input:
|
|
916
|
+
|
|
917
|
+
- `onInput`: after every edit; `{ "$chain": "value" }` is the new text.
|
|
918
|
+
- `onPaste`: instead of the browser paste; `{ "$chain": "text" }` is the clipboard text.
|
|
919
|
+
- `onKeyDown:<Key>`: instead of that key's default. Keys: `Backspace`, `Delete`, `Enter`, `Escape`, `Tab`, `ArrowLeft`, `ArrowRight`, `ArrowUp`, `ArrowDown`, `Home`, `End`.
|
|
920
|
+
|
|
921
|
+
`$state` reads inside these chains resolve at render time. To read the newest value, use `$chain`, or put the chain in a `watch`. A state write inside a `watch` chain re-runs the watch and cancels the steps after it, so make `ui.set` the last step there.
|
|
922
|
+
|
|
923
|
+
**Steps.**
|
|
924
|
+
|
|
925
|
+
- `ui.set`: `{ path, value }` writes `value` to a `/local/...` path. A literal path must name declared state; `path` may be an expression, e.g. `{ "$join": [["/local/otp", { "$index": true }], "/"] }`.
|
|
926
|
+
- `ui.focus`: `{ id, index? }` focuses the `Input` with that literal `id` on this page. Inside a `repeat`, `index` picks the item. A missing target is a no-op.
|
|
927
|
+
- `ui.when`: `{ value, eq? }` continues the chain only when `value` equals `eq` (or is truthy without `eq`); otherwise the rest of the chain is skipped quietly.
|
|
928
|
+
|
|
929
|
+
**Expressions.** An object with one operator key and an operand array, valid in any prop or action param. Operands are literals or bindings (`$state`, `$item`, `$index`, `$chain`, another expression):
|
|
930
|
+
|
|
931
|
+
| Operator | Operands | Result |
|
|
932
|
+
|---|---|---|
|
|
933
|
+
| `$add`, `$mul`, `$min`, `$max` | 1 or more numbers | sum, product, minimum, maximum |
|
|
934
|
+
| `$sub`, `$div` | exactly 2 numbers | difference, quotient |
|
|
935
|
+
| `$split` | text, separator (default `""`), optional limit | array of strings |
|
|
936
|
+
| `$join` | array, separator (default `""`) | text |
|
|
937
|
+
| `$length` | 1 value | length of a text or array (`0` for null) |
|
|
938
|
+
|
|
939
|
+
A non-numeric operand, or a division by zero, yields no value and the attribute is left out.
|
|
940
|
+
|
|
941
|
+
**Svg.** `Svg` draws in `width` x `height` user units. Shape attributes (`x`, `y`, `width`, `height`, `x1`..`y2`, `cx`, `cy`, `r`, `d`) accept expressions, so a bar is `x = 100 + (start - min) * scale`. A nested `Svg` is a group: put `repeat` on it to draw its shapes once per item. Colors are palette tokens (`chart-1`..`chart-5`, `primary`, `success`, `warning`, `error`, `info`, `muted`, `foreground`, `background`, `border`, `none`). The validator rejects unknown attributes, raw colors, a `Path.d` with anything but path commands and numbers, shapes outside an Svg, and non-shape Svg children.
|
|
942
|
+
|
|
943
|
+
### Example: 6-cell code input
|
|
944
|
+
|
|
945
|
+
Typing advances to the next cell, Backspace clears the cell and moves back, pasting a 6-character code fills every cell, and the `watch` submits once all 6 are filled. Replace the `ui.toast` step with an `app.action` to verify the code server-side.
|
|
946
|
+
|
|
947
|
+
```json
|
|
948
|
+
{
|
|
949
|
+
"models": {},
|
|
950
|
+
"defaultPage": "verify",
|
|
951
|
+
"pages": {
|
|
952
|
+
"verify": {
|
|
953
|
+
"title": "Verify",
|
|
954
|
+
"state": { "otp": ["", "", "", "", "", ""], "code": "" },
|
|
955
|
+
"root": "root",
|
|
956
|
+
"elements": {
|
|
957
|
+
"root": {
|
|
958
|
+
"type": "Stack",
|
|
959
|
+
"props": { "gap": "md", "padding": "md" },
|
|
960
|
+
"children": ["heading", "cells", "submitted"],
|
|
961
|
+
"watch": {
|
|
962
|
+
"/local/otp": [
|
|
963
|
+
{ "action": "ui.when", "params": { "value": { "$length": [{ "$join": [{ "$state": "/local/otp" }, ""] }] }, "eq": 6 } },
|
|
964
|
+
{ "action": "ui.toast", "params": { "message": "Code submitted", "tone": "success" } },
|
|
965
|
+
{ "action": "ui.set", "params": { "path": "/local/code", "value": { "$join": [{ "$state": "/local/otp" }, ""] } } }
|
|
966
|
+
]
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
"heading": { "type": "Heading", "props": { "text": "Enter the 6-digit code", "level": "h2" } },
|
|
970
|
+
"cells": {
|
|
971
|
+
"type": "Stack",
|
|
972
|
+
"props": { "direction": "row", "gap": "sm" },
|
|
973
|
+
"repeat": { "statePath": "/local/otp" },
|
|
974
|
+
"children": ["cell"]
|
|
975
|
+
},
|
|
976
|
+
"cell": {
|
|
977
|
+
"type": "Input",
|
|
978
|
+
"props": {
|
|
979
|
+
"id": "otp",
|
|
980
|
+
"value": { "$bindItem": "" },
|
|
981
|
+
"size": "cell",
|
|
982
|
+
"maxLength": 1,
|
|
983
|
+
"inputMode": "numeric",
|
|
984
|
+
"autoComplete": "one-time-code",
|
|
985
|
+
"selectOnFocus": true,
|
|
986
|
+
"onInput": [
|
|
987
|
+
{ "action": "ui.when", "params": { "value": { "$length": [{ "$chain": "value" }] }, "eq": 1 } },
|
|
988
|
+
{ "action": "ui.focus", "params": { "id": "otp", "index": { "$min": [{ "$add": [{ "$index": true }, 1] }, 5] } } }
|
|
989
|
+
],
|
|
990
|
+
"onKeyDown:Backspace": [
|
|
991
|
+
{ "action": "ui.set", "params": { "path": { "$join": [["/local/otp", { "$index": true }], "/"] }, "value": "" } },
|
|
992
|
+
{ "action": "ui.focus", "params": { "id": "otp", "index": { "$max": [{ "$sub": [{ "$index": true }, 1] }, 0] } } }
|
|
993
|
+
],
|
|
994
|
+
"onPaste": [
|
|
995
|
+
{ "action": "ui.when", "params": { "value": { "$length": [{ "$chain": "text" }] }, "eq": 6 } },
|
|
996
|
+
{ "action": "ui.set", "params": { "path": "/local/otp", "value": { "$split": [{ "$chain": "text" }, ""] } } },
|
|
997
|
+
{ "action": "ui.focus", "params": { "id": "otp", "index": 5 } }
|
|
998
|
+
]
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
"submitted": {
|
|
1002
|
+
"type": "Text",
|
|
1003
|
+
"props": { "content": { "$state": "/local/code" }, "tone": "muted" },
|
|
1004
|
+
"visible": { "$state": "/local/code" }
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
```
|
|
1011
|
+
|
|
1012
|
+
### Example: Gantt timeline
|
|
1013
|
+
|
|
1014
|
+
Each task is a bar at `x = 100 + (start - min) * scale`, `width = days * scale`, one row per item of a repeated list; the dashed line marks day 12. Bind `repeat.statePath` to `/queries/<q>/data` to draw rows from a query instead.
|
|
1015
|
+
|
|
1016
|
+
```json
|
|
1017
|
+
{
|
|
1018
|
+
"models": {},
|
|
1019
|
+
"defaultPage": "plan",
|
|
1020
|
+
"pages": {
|
|
1021
|
+
"plan": {
|
|
1022
|
+
"title": "Plan",
|
|
1023
|
+
"state": {
|
|
1024
|
+
"axis": { "min": 3, "scale": 24 },
|
|
1025
|
+
"tasks": [
|
|
1026
|
+
{ "name": "Research", "start": 3, "days": 4 },
|
|
1027
|
+
{ "name": "Design", "start": 6, "days": 5 },
|
|
1028
|
+
{ "name": "Build", "start": 10, "days": 8 },
|
|
1029
|
+
{ "name": "QA", "start": 16, "days": 4 },
|
|
1030
|
+
{ "name": "Launch", "start": 20, "days": 2 }
|
|
1031
|
+
]
|
|
1032
|
+
},
|
|
1033
|
+
"root": "card",
|
|
1034
|
+
"elements": {
|
|
1035
|
+
"card": { "type": "Card", "props": { "title": "Launch plan", "description": "Days 3-22" }, "children": ["chart"] },
|
|
1036
|
+
"chart": {
|
|
1037
|
+
"type": "Svg",
|
|
1038
|
+
"props": { "width": 640, "height": 200, "label": "Gantt chart of the launch plan" },
|
|
1039
|
+
"children": ["axis", "today", "rows"]
|
|
1040
|
+
},
|
|
1041
|
+
"axis": { "type": "Line", "props": { "x1": 100, "y1": 190, "x2": 632, "y2": 190, "stroke": "border" } },
|
|
1042
|
+
"today": {
|
|
1043
|
+
"type": "Line",
|
|
1044
|
+
"props": {
|
|
1045
|
+
"x1": { "$add": [100, { "$mul": [{ "$sub": [12, { "$state": "/local/axis/min" }] }, { "$state": "/local/axis/scale" }] }] },
|
|
1046
|
+
"y1": 8,
|
|
1047
|
+
"x2": { "$add": [100, { "$mul": [{ "$sub": [12, { "$state": "/local/axis/min" }] }, { "$state": "/local/axis/scale" }] }] },
|
|
1048
|
+
"y2": 190,
|
|
1049
|
+
"stroke": "error",
|
|
1050
|
+
"dashed": true
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
"rows": { "type": "Svg", "props": {}, "repeat": { "statePath": "/local/tasks" }, "children": ["label", "bar"] },
|
|
1054
|
+
"label": {
|
|
1055
|
+
"type": "SvgText",
|
|
1056
|
+
"props": {
|
|
1057
|
+
"x": 0,
|
|
1058
|
+
"y": { "$add": [26, { "$mul": [{ "$index": true }, 34] }] },
|
|
1059
|
+
"text": { "$item": "name" },
|
|
1060
|
+
"size": 13
|
|
1061
|
+
}
|
|
1062
|
+
},
|
|
1063
|
+
"bar": {
|
|
1064
|
+
"type": "Rect",
|
|
1065
|
+
"props": {
|
|
1066
|
+
"x": { "$add": [100, { "$mul": [{ "$sub": [{ "$item": "start" }, { "$state": "/local/axis/min" }] }, { "$state": "/local/axis/scale" }] }] },
|
|
1067
|
+
"y": { "$add": [14, { "$mul": [{ "$index": true }, 34] }] },
|
|
1068
|
+
"width": { "$mul": [{ "$item": "days" }, { "$state": "/local/axis/scale" }] },
|
|
1069
|
+
"height": 24,
|
|
1070
|
+
"rx": 4,
|
|
1071
|
+
"fill": "chart-2",
|
|
1072
|
+
"title": { "$item": "name" }
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
```
|
|
1080
|
+
|
|
901
1081
|
## Patch semantics
|
|
902
1082
|
|
|
903
1083
|
`app-patch.definition` is RFC 7396 JSON Merge Patch applied to the stored definition:
|
|
@@ -1024,6 +1204,15 @@ Create this with `app-upsert`:
|
|
|
1024
1204
|
|
|
1025
1205
|
The tool returns `{ appId, url: "/apps/<id>" }`. Open that URL to verify the live UI, then continue with the read-patch-validate loop above.
|
|
1026
1206
|
|
|
1207
|
+
## Embed a sheet or board
|
|
1208
|
+
|
|
1209
|
+
`{ "type": "ObjectEmbed", "props": { "objectId": "<object id>" } }` shows a live, editable sheet or board (see the `boards-and-sheets` skill). Optional props: `height` (160-1200), `readOnly`, and for sheets `tab` and `range`. To show the same object on an HTML page instead, use the page snippet, where `${APP_URL}` is the dashboard origin:
|
|
1210
|
+
|
|
1211
|
+
```html
|
|
1212
|
+
<script type="module" src="${APP_URL}/embed/v1/swarm-object.js"></script>
|
|
1213
|
+
<swarm-object object-id="<object id>"></swarm-object>
|
|
1214
|
+
```
|
|
1215
|
+
|
|
1027
1216
|
## View and screenshot a live app
|
|
1028
1217
|
|
|
1029
1218
|
- An app renders at `<dashboard>/apps/<id>`. Two view modes are set by query string: `?mode=full` (full-viewport overlay with a slim header) and `?mode=chromeless` (only the rendered page, the embed surface). `app.navigate` keeps only `?mode`.
|
|
@@ -526,9 +526,9 @@ The sidebar lists pages in definition order and marks the current one. Below 768
|
|
|
526
526
|
|
|
527
527
|
Param `kind` is `string` by default, or `number` / `boolean`; `required` defaults to false. The names `mode`, `apiUrl`, `apiKey`, `email`, and `name` are reserved. `/apps/<id>` renders `defaultPage`; `/apps/<id>/p/<page>?issueId=42` is the shareable deep link for another page. Browser navigation is client-side, so app state and polled data stay warm across page changes.
|
|
528
528
|
|
|
529
|
-
Within each page, `root` names one entry in its non-empty `elements` map. Elements are a flat, single-parent tree: ids are map keys, `children` contains ids (not nested elements), all elements must be reachable from `root`, and cycles, missing children, or shared children are invalid. Element and Form/UI ids are page-local. Element keys are `type`, `props`, `children`, `on`, `visible`, `repeat`, and `watch`; only components with a `default` child slot accept `children` (Stack, Grid, Split, Tabs, Accordion, Container, Card, Section, Drawer, and
|
|
529
|
+
Within each page, `root` names one entry in its non-empty `elements` map. Elements are a flat, single-parent tree: ids are map keys, `children` contains ids (not nested elements), all elements must be reachable from `root`, and cycles, missing children, or shared children are invalid. Element and Form/UI ids are page-local. Element keys are `type`, `props`, `children`, `on`, `visible`, `repeat`, and `watch`; only components with a `default` child slot accept `children` (Stack, Grid, Split, Tabs, Accordion, Container, Card, Section, Drawer, Dialog, and Svg). `watch` maps state paths to an action step or chain. A page may also declare `state`: page-local values read and written at `/local/<name>` (see Low-level primitives).
|
|
530
530
|
|
|
531
|
-
## Component catalog (all
|
|
531
|
+
## Component catalog (all 52)
|
|
532
532
|
|
|
533
533
|
Props reject unknown keys. A `{"$state":"..."}` binding may replace a literal prop value at any depth.
|
|
534
534
|
|
|
@@ -585,6 +585,13 @@ Tones: Badge, Metric and Progress `tone` take `neutral`, `success`, `active`, `e
|
|
|
585
585
|
| `Approval` | `requestId` | `showResolved` (default true), `compact`, `onResolved`; one approval request answered in place by the viewer; see below. |
|
|
586
586
|
| `SessionThread` | `id`, `sessionKey` | `scope`, `placeholder`, `onDispatch`, `fill`; the dashboard's session conversation (the "Session about this page" panel) for one session per viewer and key, with a composer that steers or chains tasks; the draft is mirrored to `/ui/<id>/value`; see below. |
|
|
587
587
|
| `PageFrame` | `pageId` | `device` (`desktop` default, or `mobile`: a 390 px wide frame), `height` (default `640px`), `fill`; a live, clickable swarm Page that reloads when the page changes; see below. |
|
|
588
|
+
| `Input` | none | Low-level text field: `value` (bind two-way with `$bindState` / `$bindItem`), `id` (the `ui.focus` target), `label`, `placeholder`, `type: "text"` or `"password"`, `inputMode`, `autoComplete: "off"` or `"one-time-code"`, `maxLength`, `size: "default"` or `"cell"` (square one-character box), `selectOnFocus`, `disabled`; chains `onInput`, `onPaste`, `onKeyDown:<Key>`; see Low-level primitives. |
|
|
589
|
+
| `Svg` | `width`, `height` on the outer Svg | Vector drawing in `width` x `height` user units, scaled to its container; `label` (accessible name). Children: `Rect`, `Line`, `Path`, `Circle`, `SvgText`, or a nested `Svg` (a group offset by `x`/`y`, the place for `repeat`). |
|
|
590
|
+
| `Rect` | `x`, `y`, `width`, `height` | `rx`, `fill`, `stroke`, `strokeWidth`, `opacity`, `title` (tooltip); only inside an Svg. |
|
|
591
|
+
| `Line` | `x1`, `y1`, `x2`, `y2` | `stroke`, `strokeWidth`, `opacity`, `dashed`; only inside an Svg. |
|
|
592
|
+
| `Path` | `d` | `fill`, `stroke`, `strokeWidth`, `opacity`; `d` holds path commands and numbers only; only inside an Svg. |
|
|
593
|
+
| `Circle` | `cx`, `cy`, `r` | `fill`, `stroke`, `strokeWidth`, `opacity`, `title`; only inside an Svg. |
|
|
594
|
+
| `SvgText` | `x`, `y`, `text` | `anchor: "start", "middle", "end"`, `size`, `weight: "normal"` or `"bold"`, `fill`; only inside an Svg. |
|
|
588
595
|
|
|
589
596
|
Table details:
|
|
590
597
|
|
|
@@ -853,6 +860,7 @@ Valid `$state` roots are:
|
|
|
853
860
|
- `/actions/<declaredAction>/...`
|
|
854
861
|
- `/route/page` for the active page name
|
|
855
862
|
- `/route/params/<declaredParam>` for a param declared on the current page
|
|
863
|
+
- `/local/<name>/...`, where the current page declares `<name>` in its `state`
|
|
856
864
|
|
|
857
865
|
`/route` is mirrored as `{ page, params }`. Only declared params appear. Values are coerced by their declared kind: `number` becomes a number when possible; boolean strings `true`/`1` become true; failed number coercion remains the raw string.
|
|
858
866
|
|
|
@@ -893,6 +901,178 @@ The `studio` page's `SessionThread` with `"sessionKey": { "$state": "/route/para
|
|
|
893
901
|
|
|
894
902
|
A failed step halts its chain: when `app.action`, `app.mutate`, `swarm.sdk` or `swarm.call` fails (a thrown error, a script action that returns `ok: false`, a non-2xx `swarm.call`), the steps after it do not run and the error shows as an error toast. A step's `onError` (`{ set }` or `{ action }`) runs first, and the chain still halts. So a `ui.toast` after a write is a real success message. A `Form`'s failed `app.mutate` shows inline under the fields instead of a toast. A task-backed `app.action` succeeds once the task is created; the task's own failure shows in the page banner and does not halt the chain. A Table bulk action reads each step's own outcome, as before.
|
|
895
903
|
|
|
904
|
+
## Low-level primitives
|
|
905
|
+
|
|
906
|
+
Compose custom widgets (a code input, a timeline, a Gantt chart) from page-local state, a bindable `Input`, three `ui.*` steps, expressions, and `Svg` shapes. No custom component needed.
|
|
907
|
+
|
|
908
|
+
**Page state.** `pages.<page>.state` maps names to initial JSON values. The page reads them at `{ "$state": "/local/<name>/..." }` and only this root is writable. Each page has its own `/local`, even when two pages declare the same name. The values are seeded on first render and survive navigation; patching `pages.<page>.state.<name>` replaces that entry. Reusable elements cannot read or write `/local`.
|
|
909
|
+
|
|
910
|
+
**Input.** `value: { "$bindState": "/local/<name>/..." }` binds two-way; inside a `repeat` over a `/local` list, `{ "$bindItem": "" }` binds the item itself (`"field"` binds a field of it). `$bindState` and `$bindItem` are valid only on `Input.value`. Event chains are props, run by the Input:
|
|
911
|
+
|
|
912
|
+
- `onInput`: after every edit; `{ "$chain": "value" }` is the new text.
|
|
913
|
+
- `onPaste`: instead of the browser paste; `{ "$chain": "text" }` is the clipboard text.
|
|
914
|
+
- `onKeyDown:<Key>`: instead of that key's default. Keys: `Backspace`, `Delete`, `Enter`, `Escape`, `Tab`, `ArrowLeft`, `ArrowRight`, `ArrowUp`, `ArrowDown`, `Home`, `End`.
|
|
915
|
+
|
|
916
|
+
`$state` reads inside these chains resolve at render time. To read the newest value, use `$chain`, or put the chain in a `watch`. A state write inside a `watch` chain re-runs the watch and cancels the steps after it, so make `ui.set` the last step there.
|
|
917
|
+
|
|
918
|
+
**Steps.**
|
|
919
|
+
|
|
920
|
+
- `ui.set`: `{ path, value }` writes `value` to a `/local/...` path. A literal path must name declared state; `path` may be an expression, e.g. `{ "$join": [["/local/otp", { "$index": true }], "/"] }`.
|
|
921
|
+
- `ui.focus`: `{ id, index? }` focuses the `Input` with that literal `id` on this page. Inside a `repeat`, `index` picks the item. A missing target is a no-op.
|
|
922
|
+
- `ui.when`: `{ value, eq? }` continues the chain only when `value` equals `eq` (or is truthy without `eq`); otherwise the rest of the chain is skipped quietly.
|
|
923
|
+
|
|
924
|
+
**Expressions.** An object with one operator key and an operand array, valid in any prop or action param. Operands are literals or bindings (`$state`, `$item`, `$index`, `$chain`, another expression):
|
|
925
|
+
|
|
926
|
+
| Operator | Operands | Result |
|
|
927
|
+
|---|---|---|
|
|
928
|
+
| `$add`, `$mul`, `$min`, `$max` | 1 or more numbers | sum, product, minimum, maximum |
|
|
929
|
+
| `$sub`, `$div` | exactly 2 numbers | difference, quotient |
|
|
930
|
+
| `$split` | text, separator (default `""`), optional limit | array of strings |
|
|
931
|
+
| `$join` | array, separator (default `""`) | text |
|
|
932
|
+
| `$length` | 1 value | length of a text or array (`0` for null) |
|
|
933
|
+
|
|
934
|
+
A non-numeric operand, or a division by zero, yields no value and the attribute is left out.
|
|
935
|
+
|
|
936
|
+
**Svg.** `Svg` draws in `width` x `height` user units. Shape attributes (`x`, `y`, `width`, `height`, `x1`..`y2`, `cx`, `cy`, `r`, `d`) accept expressions, so a bar is `x = 100 + (start - min) * scale`. A nested `Svg` is a group: put `repeat` on it to draw its shapes once per item. Colors are palette tokens (`chart-1`..`chart-5`, `primary`, `success`, `warning`, `error`, `info`, `muted`, `foreground`, `background`, `border`, `none`). The validator rejects unknown attributes, raw colors, a `Path.d` with anything but path commands and numbers, shapes outside an Svg, and non-shape Svg children.
|
|
937
|
+
|
|
938
|
+
### Example: 6-cell code input
|
|
939
|
+
|
|
940
|
+
Typing advances to the next cell, Backspace clears the cell and moves back, pasting a 6-character code fills every cell, and the `watch` submits once all 6 are filled. Replace the `ui.toast` step with an `app.action` to verify the code server-side.
|
|
941
|
+
|
|
942
|
+
```json
|
|
943
|
+
{
|
|
944
|
+
"models": {},
|
|
945
|
+
"defaultPage": "verify",
|
|
946
|
+
"pages": {
|
|
947
|
+
"verify": {
|
|
948
|
+
"title": "Verify",
|
|
949
|
+
"state": { "otp": ["", "", "", "", "", ""], "code": "" },
|
|
950
|
+
"root": "root",
|
|
951
|
+
"elements": {
|
|
952
|
+
"root": {
|
|
953
|
+
"type": "Stack",
|
|
954
|
+
"props": { "gap": "md", "padding": "md" },
|
|
955
|
+
"children": ["heading", "cells", "submitted"],
|
|
956
|
+
"watch": {
|
|
957
|
+
"/local/otp": [
|
|
958
|
+
{ "action": "ui.when", "params": { "value": { "$length": [{ "$join": [{ "$state": "/local/otp" }, ""] }] }, "eq": 6 } },
|
|
959
|
+
{ "action": "ui.toast", "params": { "message": "Code submitted", "tone": "success" } },
|
|
960
|
+
{ "action": "ui.set", "params": { "path": "/local/code", "value": { "$join": [{ "$state": "/local/otp" }, ""] } } }
|
|
961
|
+
]
|
|
962
|
+
}
|
|
963
|
+
},
|
|
964
|
+
"heading": { "type": "Heading", "props": { "text": "Enter the 6-digit code", "level": "h2" } },
|
|
965
|
+
"cells": {
|
|
966
|
+
"type": "Stack",
|
|
967
|
+
"props": { "direction": "row", "gap": "sm" },
|
|
968
|
+
"repeat": { "statePath": "/local/otp" },
|
|
969
|
+
"children": ["cell"]
|
|
970
|
+
},
|
|
971
|
+
"cell": {
|
|
972
|
+
"type": "Input",
|
|
973
|
+
"props": {
|
|
974
|
+
"id": "otp",
|
|
975
|
+
"value": { "$bindItem": "" },
|
|
976
|
+
"size": "cell",
|
|
977
|
+
"maxLength": 1,
|
|
978
|
+
"inputMode": "numeric",
|
|
979
|
+
"autoComplete": "one-time-code",
|
|
980
|
+
"selectOnFocus": true,
|
|
981
|
+
"onInput": [
|
|
982
|
+
{ "action": "ui.when", "params": { "value": { "$length": [{ "$chain": "value" }] }, "eq": 1 } },
|
|
983
|
+
{ "action": "ui.focus", "params": { "id": "otp", "index": { "$min": [{ "$add": [{ "$index": true }, 1] }, 5] } } }
|
|
984
|
+
],
|
|
985
|
+
"onKeyDown:Backspace": [
|
|
986
|
+
{ "action": "ui.set", "params": { "path": { "$join": [["/local/otp", { "$index": true }], "/"] }, "value": "" } },
|
|
987
|
+
{ "action": "ui.focus", "params": { "id": "otp", "index": { "$max": [{ "$sub": [{ "$index": true }, 1] }, 0] } } }
|
|
988
|
+
],
|
|
989
|
+
"onPaste": [
|
|
990
|
+
{ "action": "ui.when", "params": { "value": { "$length": [{ "$chain": "text" }] }, "eq": 6 } },
|
|
991
|
+
{ "action": "ui.set", "params": { "path": "/local/otp", "value": { "$split": [{ "$chain": "text" }, ""] } } },
|
|
992
|
+
{ "action": "ui.focus", "params": { "id": "otp", "index": 5 } }
|
|
993
|
+
]
|
|
994
|
+
}
|
|
995
|
+
},
|
|
996
|
+
"submitted": {
|
|
997
|
+
"type": "Text",
|
|
998
|
+
"props": { "content": { "$state": "/local/code" }, "tone": "muted" },
|
|
999
|
+
"visible": { "$state": "/local/code" }
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
```
|
|
1006
|
+
|
|
1007
|
+
### Example: Gantt timeline
|
|
1008
|
+
|
|
1009
|
+
Each task is a bar at `x = 100 + (start - min) * scale`, `width = days * scale`, one row per item of a repeated list; the dashed line marks day 12. Bind `repeat.statePath` to `/queries/<q>/data` to draw rows from a query instead.
|
|
1010
|
+
|
|
1011
|
+
```json
|
|
1012
|
+
{
|
|
1013
|
+
"models": {},
|
|
1014
|
+
"defaultPage": "plan",
|
|
1015
|
+
"pages": {
|
|
1016
|
+
"plan": {
|
|
1017
|
+
"title": "Plan",
|
|
1018
|
+
"state": {
|
|
1019
|
+
"axis": { "min": 3, "scale": 24 },
|
|
1020
|
+
"tasks": [
|
|
1021
|
+
{ "name": "Research", "start": 3, "days": 4 },
|
|
1022
|
+
{ "name": "Design", "start": 6, "days": 5 },
|
|
1023
|
+
{ "name": "Build", "start": 10, "days": 8 },
|
|
1024
|
+
{ "name": "QA", "start": 16, "days": 4 },
|
|
1025
|
+
{ "name": "Launch", "start": 20, "days": 2 }
|
|
1026
|
+
]
|
|
1027
|
+
},
|
|
1028
|
+
"root": "card",
|
|
1029
|
+
"elements": {
|
|
1030
|
+
"card": { "type": "Card", "props": { "title": "Launch plan", "description": "Days 3-22" }, "children": ["chart"] },
|
|
1031
|
+
"chart": {
|
|
1032
|
+
"type": "Svg",
|
|
1033
|
+
"props": { "width": 640, "height": 200, "label": "Gantt chart of the launch plan" },
|
|
1034
|
+
"children": ["axis", "today", "rows"]
|
|
1035
|
+
},
|
|
1036
|
+
"axis": { "type": "Line", "props": { "x1": 100, "y1": 190, "x2": 632, "y2": 190, "stroke": "border" } },
|
|
1037
|
+
"today": {
|
|
1038
|
+
"type": "Line",
|
|
1039
|
+
"props": {
|
|
1040
|
+
"x1": { "$add": [100, { "$mul": [{ "$sub": [12, { "$state": "/local/axis/min" }] }, { "$state": "/local/axis/scale" }] }] },
|
|
1041
|
+
"y1": 8,
|
|
1042
|
+
"x2": { "$add": [100, { "$mul": [{ "$sub": [12, { "$state": "/local/axis/min" }] }, { "$state": "/local/axis/scale" }] }] },
|
|
1043
|
+
"y2": 190,
|
|
1044
|
+
"stroke": "error",
|
|
1045
|
+
"dashed": true
|
|
1046
|
+
}
|
|
1047
|
+
},
|
|
1048
|
+
"rows": { "type": "Svg", "props": {}, "repeat": { "statePath": "/local/tasks" }, "children": ["label", "bar"] },
|
|
1049
|
+
"label": {
|
|
1050
|
+
"type": "SvgText",
|
|
1051
|
+
"props": {
|
|
1052
|
+
"x": 0,
|
|
1053
|
+
"y": { "$add": [26, { "$mul": [{ "$index": true }, 34] }] },
|
|
1054
|
+
"text": { "$item": "name" },
|
|
1055
|
+
"size": 13
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
"bar": {
|
|
1059
|
+
"type": "Rect",
|
|
1060
|
+
"props": {
|
|
1061
|
+
"x": { "$add": [100, { "$mul": [{ "$sub": [{ "$item": "start" }, { "$state": "/local/axis/min" }] }, { "$state": "/local/axis/scale" }] }] },
|
|
1062
|
+
"y": { "$add": [14, { "$mul": [{ "$index": true }, 34] }] },
|
|
1063
|
+
"width": { "$mul": [{ "$item": "days" }, { "$state": "/local/axis/scale" }] },
|
|
1064
|
+
"height": 24,
|
|
1065
|
+
"rx": 4,
|
|
1066
|
+
"fill": "chart-2",
|
|
1067
|
+
"title": { "$item": "name" }
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
```
|
|
1075
|
+
|
|
896
1076
|
## Patch semantics
|
|
897
1077
|
|
|
898
1078
|
`app-patch.definition` is RFC 7396 JSON Merge Patch applied to the stored definition:
|
|
@@ -1019,6 +1199,15 @@ Create this with `app-upsert`:
|
|
|
1019
1199
|
|
|
1020
1200
|
The tool returns `{ appId, url: "/apps/<id>" }`. Open that URL to verify the live UI, then continue with the read-patch-validate loop above.
|
|
1021
1201
|
|
|
1202
|
+
## Embed a sheet or board
|
|
1203
|
+
|
|
1204
|
+
`{ "type": "ObjectEmbed", "props": { "objectId": "<object id>" } }` shows a live, editable sheet or board (see the `boards-and-sheets` skill). Optional props: `height` (160-1200), `readOnly`, and for sheets `tab` and `range`. To show the same object on an HTML page instead, use the page snippet, where `${APP_URL}` is the dashboard origin:
|
|
1205
|
+
|
|
1206
|
+
```html
|
|
1207
|
+
<script type="module" src="${APP_URL}/embed/v1/swarm-object.js"></script>
|
|
1208
|
+
<swarm-object object-id="<object id>"></swarm-object>
|
|
1209
|
+
```
|
|
1210
|
+
|
|
1022
1211
|
## View and screenshot a live app
|
|
1023
1212
|
|
|
1024
1213
|
- An app renders at `<dashboard>/apps/<id>`. Two view modes are set by query string: `?mode=full` (full-viewport overlay with a slim header) and `?mode=chromeless` (only the rendered page, the embed surface). `app.navigate` keeps only `?mode`.
|
|
@@ -158,6 +158,17 @@ export default async function (args, ctx) {
|
|
|
158
158
|
- `updateElements` patches `label` (an empty string removes it), `x`, `y`, `width`, `height` and `color`. Bound labels and arrows follow. Arrows take only `label` and `color`.
|
|
159
159
|
- `removeElements` sets `isDeleted: true`. A shape takes its label with it and unbinds its arrows.
|
|
160
160
|
|
|
161
|
+
## Embed in an app or a page
|
|
162
|
+
|
|
163
|
+
An app shows a live, editable sheet or board with `{ "type": "ObjectEmbed", "props": { "objectId": "<object id>" } }`. A page shows it with this snippet, where `${APP_URL}` is the dashboard origin:
|
|
164
|
+
|
|
165
|
+
```html
|
|
166
|
+
<script type="module" src="${APP_URL}/embed/v1/swarm-object.js"></script>
|
|
167
|
+
<swarm-object object-id="<object id>"></swarm-object>
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Optional attributes: `height` (160-1200 px), `readonly`, and for sheets `tab` and `range` (`B2:F20` or `Tab!B2:F20`). Only signed-in viewers see the object. A public or password page guest sees "sign in to the swarm to view", and a page opened with the shared swarm key is read-only.
|
|
171
|
+
|
|
161
172
|
## Hand it over quietly
|
|
162
173
|
|
|
163
174
|
Put the file where the person already works: send its `link` in the thread reply, the report or the task output they asked for. Do not announce sheets or boards as a feature and do not post about them unprompted. If they ask what the link is, say it is an editable spreadsheet or diagram on the shared drive.
|
|
@@ -860,6 +860,17 @@ use `window.swarmUi.renderDiff(rootEl, diffData)`:
|
|
|
860
860
|
A full annotated-PR page using `<swarm-diff>` is bundled at
|
|
861
861
|
**`examples/annotated-pr.html`**.
|
|
862
862
|
|
|
863
|
+
### `<swarm-object>`: a live sheet or board
|
|
864
|
+
|
|
865
|
+
Embeds a sheet or board (see the `boards-and-sheets` skill) by object id. Unlike the components above, it needs one script tag from the dashboard origin `${APP_URL}`:
|
|
866
|
+
|
|
867
|
+
```html
|
|
868
|
+
<script type="module" src="${APP_URL}/embed/v1/swarm-object.js"></script>
|
|
869
|
+
<swarm-object object-id="<object id>"></swarm-object>
|
|
870
|
+
```
|
|
871
|
+
|
|
872
|
+
Optional attributes: `height` (160-1200 px), `readonly`, and for sheets `tab` and `range`. A signed-in viewer can edit, and edits save to agent-fs. A page opened with the shared swarm key is read-only. A public or password page guest sees "sign in to the swarm to view" and the embed sends no request.
|
|
873
|
+
|
|
863
874
|
## Print / PDF export
|
|
864
875
|
|
|
865
876
|
Every HTML page also gets `@media print` rules in its injected head. Print is
|
|
@@ -73,7 +73,9 @@ Fetch the page as markdown: `curl -fsSL https://docs.agent-swarm.dev/llms.mdx/do
|
|
|
73
73
|
- [Reviewing inconsistent product listings across sales channels with AI agents](https://docs.agent-swarm.dev/docs/guides/marketplace-catalog-discrepancy-review). Reference.
|
|
74
74
|
- [Handing off inventory discrepancies from operations to purchasing with AI agents](https://docs.agent-swarm.dev/docs/guides/ai-inventory-exception-handoff). Reference.
|
|
75
75
|
- [Handing off unresolved operational work between shifts with AI agents](https://docs.agent-swarm.dev/docs/guides/ai-operations-shift-handoff). Reference.
|
|
76
|
+
- [Preparing a disputed product return for a human decision with AI agents](https://docs.agent-swarm.dev/docs/guides/ai-returns-exception-handoff). Reference.
|
|
76
77
|
- [Reviewing a supplier's security evidence before onboarding with AI agents](https://docs.agent-swarm.dev/docs/guides/supplier-security-evidence-review). Reference.
|
|
78
|
+
- [Reviewing supplier performance across delivery, quality and service records with AI agents](https://docs.agent-swarm.dev/docs/guides/supplier-performance-review). Reference.
|
|
77
79
|
- [Deployment Guide](https://docs.agent-swarm.dev/docs/guides/deployment). When: Someone wants to run Agent Swarm on their own server with Docker Compose.
|
|
78
80
|
- [One-click deploy](https://docs.agent-swarm.dev/docs/guides/one-click-deploy). When: Someone has no server yet and wants Agent Swarm running in the cloud with HTTPS.
|
|
79
81
|
- [Kubernetes and Helm](https://docs.agent-swarm.dev/docs/guides/kubernetes). When: Someone wants to install Agent Swarm on Kubernetes.
|
|
@@ -75,6 +75,7 @@ export default async function (args: z.infer<typeof argsSchema>, ctx: ScriptCont
|
|
|
75
75
|
- A script invoked from a workflow node may run under a workflow identity. The node may also supply arguments the script needs: when you run that script directly, pass the same arguments the node maps. A script without a strict `argsSchema` then fails deeper in, often as a not-found or resource error instead of a validation error.
|
|
76
76
|
- Return compact structured data. Raw logs, full HTML, big JSON arrays, and file contents stay inside the script.
|
|
77
77
|
- 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.
|
|
78
|
+
- Identity: under the default `native` executor, an API server that runs as root starts the script as `nobody` (uid 65534). The script's own `$TMPDIR` is writable. A raw `Bun.write` or `node:fs` write anywhere else on the API host fails with `EACCES` unless that directory is world-writable. Persist output through `/afs` or KV instead, and put any file write after the one-shot side effect so a failed write cannot block it.
|
|
78
79
|
|
|
79
80
|
### Upserting a large source
|
|
80
81
|
|
|
@@ -70,6 +70,7 @@ export default async function (args: z.infer<typeof argsSchema>, ctx: ScriptCont
|
|
|
70
70
|
- A script invoked from a workflow node may run under a workflow identity. The node may also supply arguments the script needs: when you run that script directly, pass the same arguments the node maps. A script without a strict `argsSchema` then fails deeper in, often as a not-found or resource error instead of a validation error.
|
|
71
71
|
- Return compact structured data. Raw logs, full HTML, big JSON arrays, and file contents stay inside the script.
|
|
72
72
|
- 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.
|
|
73
|
+
- Identity: under the default `native` executor, an API server that runs as root starts the script as `nobody` (uid 65534). The script's own `$TMPDIR` is writable. A raw `Bun.write` or `node:fs` write anywhere else on the API host fails with `EACCES` unless that directory is world-writable. Persist output through `/afs` or KV instead, and put any file write after the one-shot side effect so a failed write cannot block it.
|
|
73
74
|
|
|
74
75
|
### Upserting a large source
|
|
75
76
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Template parameter: {{REPO_URL}}
|
|
4
4
|
|
|
5
|
-
A
|
|
5
|
+
A single implement → review pass. A coder agent implements the task and reports the diff; a reviewer agent checks it and returns PASS or a blocking fix list. Use this when you want automated quality control with a clear exit condition rather than open-ended implementation.
|
|
6
6
|
|
|
7
7
|
## Configuration
|
|
8
8
|
|
|
@@ -12,15 +12,15 @@ A bounded implement → review loop. A coder agent implements the task and repor
|
|
|
12
12
|
|
|
13
13
|
## What It Does
|
|
14
14
|
|
|
15
|
-
A two-node implement → review
|
|
15
|
+
A two-node implement → review pass:
|
|
16
16
|
|
|
17
17
|
1. **Implement node (coder):** Takes the `task` description and `repoUrl`, produces a working implementation, runs focused checks (lint, types, relevant tests), and reports the diff.
|
|
18
18
|
|
|
19
19
|
2. **Review node (reviewer):** Reads the implementation output, checks correctness and quality, and returns either `PASS` (implementation is accepted) or a list of blocking fixes only (no nitpicks — only what must change before this can ship).
|
|
20
20
|
|
|
21
|
-
The `maxIterations`
|
|
21
|
+
The trigger’s `maxIterations` is only a hint to the agents, not an engine-enforced ceiling. The global engine limits are `WORKFLOW_MAX_ITERATIONS` (default 100 node executions per graph walk, reset on resume) and `WORKFLOW_MAX_STEPS_PER_RUN` (default 500 total steps per run).
|
|
22
22
|
|
|
23
|
-
**Note:**
|
|
23
|
+
**Note:** The shipped definition has no back-edge, so it runs once. The engine supports native loops through port back-edges: add a separate entry node before `implement`, then a `property-match` node after review whose `false` port routes back to `implement` when the verdict is FAIL.
|
|
24
24
|
|
|
25
25
|
## When to Use
|
|
26
26
|
|
|
@@ -31,14 +31,14 @@ The `maxIterations` parameter is declarative: the reviewer signals PASS when don
|
|
|
31
31
|
|
|
32
32
|
## Customization Notes
|
|
33
33
|
|
|
34
|
-
- **`maxIterations`** is
|
|
34
|
+
- **`maxIterations`** is declared in the trigger schema but is not enforced by the engine. It's a hint to the agents — include it in the implement node's task prompt if you want the coder to self-limit attempts.
|
|
35
35
|
- **Pin `agentId`** on the implement node to a coder-capable agent with repo access. Pin the review node to a reviewer-capable agent that can reason about code quality.
|
|
36
36
|
- **Add a PR creation node:** Extend with a third agent-task node that takes the reviewer's PASS output and creates a pull request via `gh pr create`.
|
|
37
37
|
- **Add structured output to the review node:** Use `outputSchema: { "type": "object", "properties": { "verdict": { "type": "string", "enum": ["PASS", "FAIL"] }, "fixes": { "type": "array" } } }` to make the verdict machine-readable for downstream automation.
|
|
38
38
|
|
|
39
39
|
## Trade-offs
|
|
40
40
|
|
|
41
|
-
**
|
|
41
|
+
**Single pass as shipped:** Native iteration requires adding a port back-edge and an explicit budget check if you want to enforce the trigger’s `maxIterations`. The global engine limits are safety backstops, not a review-round budget.
|
|
42
42
|
|
|
43
43
|
**Reviewer quality matters:** The review node's output is only as good as the reviewer agent's judgment. For high-stakes code, add a second reviewer node or route to a human-in-the-loop step before the PASS verdict is accepted.
|
|
44
44
|
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ACPAdapter2
|
|
3
|
-
} from "./cli-wxwv3t11.js";
|
|
4
|
-
import"./cli-wrhbym01.js";
|
|
5
|
-
import"./cli-hpb9x72z.js";
|
|
6
|
-
import"./cli-xfjn2kyq.js";
|
|
7
|
-
import"./cli-0pazkmd4.js";
|
|
8
|
-
import"./cli-tdk7jtka.js";
|
|
9
|
-
import"./cli-0jkenasr.js";
|
|
10
|
-
import"./cli-c8v2yvej.js";
|
|
11
|
-
import"./cli-0726awxw.js";
|
|
12
|
-
import"./cli-j53hpbsm.js";
|
|
13
|
-
import"./cli-wndegmns.js";
|
|
14
|
-
import"./cli-rtmqzat7.js";
|
|
15
|
-
export {
|
|
16
|
-
ACPAdapter2 as ACPAdapter
|
|
17
|
-
};
|