@desplega.ai/agent-swarm 2.9.0 → 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-swxq55dr.js → acp-targets-ny75x1qy.js} +7 -7
- package/dist/{actions-pb678g3e.js → actions-b9qgrmeq.js} +81 -21
- package/dist/{agent-fs-provision-dmhnc38q.js → agent-fs-provision-b5dhdsbd.js} +4 -4
- package/dist/{amp-adapter-3pa66q27.js → amp-adapter-vtax2c9s.js} +2 -2
- package/dist/{anthropic-messages-x2cp5fvf.js → anthropic-messages-r5xf5hqw.js} +10 -10
- package/dist/{app-17d12ev4.js → app-g2z15hax.js} +6 -3
- package/dist/{approval-notifications-h7vd9pmg.js → approval-notifications-yt13wp8r.js} +8 -5
- package/dist/{assistant-t7k39ree.js → assistant-2cgfxsgk.js} +23 -21
- package/dist/{boot-args-schema-0gqmkfbe.js → boot-args-schema-3gwy0f60.js} +1 -1
- package/dist/{boot-reembed-n6anc01d.js → boot-reembed-92g7s5zp.js} +1 -1
- package/dist/{boot-reembed-f064w382.js → boot-reembed-mywmyp4s.js} +1 -1
- package/dist/{boot-scrub-sweep-ejd5dnrz.js → boot-scrub-sweep-7dkdzqxx.js} +3 -3
- package/dist/{boot-seeds-f99fjs5q.js → boot-seeds-ce7rvgq1.js} +4 -4
- package/dist/{claude-adapter-gvznwxgc.js → claude-adapter-3m4q7735.js} +7 -7
- package/dist/{claude-managed-adapter-pbrbvc64.js → claude-managed-adapter-t8nfgcgz.js} +2 -2
- package/dist/{claude-managed-setup-kdxttvc3.js → claude-managed-setup-c217draw.js} +3 -3
- package/dist/{claude-sdk-session-0t2teq6n.js → claude-sdk-session-7fbqm51z.js} +7 -7
- package/dist/{cli-9a2rtd77.js → cli-1jykg0py.js} +6 -4
- package/dist/{cli-5ntc4we6.js → cli-2czxfnvj.js} +235 -2003
- package/dist/{cli-dd37e0cm.js → cli-2dq9yv8p.js} +1 -1
- package/dist/{cli-c07v0qfa.js → cli-2xs8tsf7.js} +69 -66
- package/dist/{cli-7fx9jyfs.js → cli-2yjj3e31.js} +64 -10
- package/dist/{cli-4ghh072d.js → cli-32djehja.js} +36 -36
- package/dist/{cli-cw7mc1je.js → cli-3j873zxq.js} +3 -3
- 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-5gygrr67.js → cli-67mwzr35.js} +1 -1
- package/dist/{cli-5kcmxwxv.js → cli-6945ywhr.js} +1 -1
- package/dist/{cli-812paz57.js → cli-6ehs4mta.js} +18 -2
- package/dist/{cli-95930z69.js → cli-6ym4jhzp.js} +2 -2
- package/dist/{cli-zg3z63x3.js → cli-7mv4h3sn.js} +1 -1
- package/dist/{cli-eg437b5p.js → cli-7sf9sb0w.js} +2 -1
- package/dist/{cli-nr46j5pw.js → cli-8zh9nrew.js} +1 -1
- package/dist/{cli-wr1h0k28.js → cli-9w8712tq.js} +617 -278
- package/dist/{cli-ssvdrk4y.js → cli-b6px1k1q.js} +1 -1
- package/dist/{cli-7831nhaw.js → cli-b91nz213.js} +3 -3
- package/dist/{cli-7cgf614g.js → cli-bg63qmsx.js} +2 -2
- package/dist/{cli-me4maa4j.js → cli-bkjdknnp.js} +9 -5
- package/dist/{cli-rts1qvb4.js → cli-bnqncekd.js} +2 -2
- package/dist/{cli-25nstr34.js → cli-br0924pw.js} +1 -1
- package/dist/{cli-ymct0ycy.js → cli-ctx0b85j.js} +5222 -4978
- package/dist/{cli-kqh27v2y.js → cli-dgs10ttj.js} +1 -1
- package/dist/{cli-kmvcm34h.js → cli-f3jyzq4g.js} +2 -2
- package/dist/cli-f8x9drqr.js +84 -0
- package/dist/{cli-8axx8vnw.js → cli-f9gz2vyj.js} +5 -5
- package/dist/{cli-vvgaz8t6.js → cli-fh97xn30.js} +2 -2
- package/dist/{cli-8x8y70av.js → cli-fkef327x.js} +2 -2
- package/dist/{cli-js8zrfyg.js → cli-gfy38pvt.js} +2 -2
- package/dist/{cli-kaa4bd7x.js → cli-h9yqfzx9.js} +7 -6
- package/dist/{cli-svc803vq.js → cli-j7svy295.js} +11 -11
- package/dist/{cli-nhq5js1b.js → cli-jaw5v1sy.js} +3 -3
- package/dist/{cli-w7dxb2fj.js → cli-jkw6ptfw.js} +6 -6
- package/dist/{cli-1tvdx9t5.js → cli-jm0hvmz2.js} +1 -1
- package/dist/{cli-e9973bf0.js → cli-jwampxxq.js} +2 -2
- package/dist/{cli-dx439zpg.js → cli-kpgcm7xy.js} +13 -1
- package/dist/{cli-pz1c00aa.js → cli-kxx4k2jw.js} +2 -2
- package/dist/{cli-aa8s22gn.js → cli-m7c2380k.js} +191 -182
- package/dist/{cli-2kg31ted.js → cli-m7zvgt57.js} +11 -11
- package/dist/{cli-57pvhnyt.js → cli-mhapr559.js} +1 -1
- package/dist/{cli-gddgcnav.js → cli-mjw0yf82.js} +1 -1
- package/dist/{cli-h474mvp5.js → cli-mkwkwq81.js} +7 -4
- package/dist/{cli-jd3kxppb.js → cli-mw620q3n.js} +1 -1
- package/dist/{cli-spzkdgtg.js → cli-n3qe7tyr.js} +172 -168
- package/dist/{cli-3zxdz9r7.js → cli-nafvvsp8.js} +3 -3
- package/dist/{cli-fnh4b12r.js → cli-nbt14he0.js} +6 -6
- package/dist/{cli-7akn6ze9.js → cli-nh7x3133.js} +7 -28
- package/dist/{cli-faf46gdq.js → cli-p4kckx1z.js} +10 -10
- package/dist/{cli-k7pt28ad.js → cli-pb2ay3sh.js} +2 -2
- package/dist/{cli-pn1v1pb0.js → cli-psffsanb.js} +3 -2
- package/dist/{cli-2tnbc3gw.js → cli-pyjn0qhk.js} +2257 -61
- package/dist/{cli-fgphc007.js → cli-rq5rpv6k.js} +1 -1
- package/dist/{cli-vw5x18yj.js → cli-sn650d7x.js} +9 -9
- package/dist/{cli-mc1fx4xd.js → cli-td9tb872.js} +10 -10
- package/dist/{cli-6dp0jkfj.js → cli-tvc4jag9.js} +3 -3
- package/dist/{cli-a9hfzg2r.js → cli-ty3gha1p.js} +6 -6
- package/dist/{cli-pwsax0vp.js → cli-v57d7fmm.js} +1 -1
- package/dist/{cli-nmcpzbty.js → cli-vt89089n.js} +4 -4
- package/dist/{cli-sn4pc4qx.js → cli-vyff45ve.js} +2 -2
- package/dist/{cli-m1fbz2wj.js → cli-w4n323t3.js} +175 -16
- package/dist/{cli-g3zzby8t.js → cli-wn13hhdt.js} +5 -5
- package/dist/{cli-q8cfh1t9.js → cli-xag7btpe.js} +1 -1
- package/dist/{cli-c5cspahx.js → cli-y2ewxhth.js} +38 -13
- package/dist/{cli-k09cxm6m.js → cli-ysvspf5e.js} +2 -2
- package/dist/{cli-eepnpee7.js → cli-zh0e5x7p.js} +4 -4
- package/dist/{cli-bk9v1xrv.js → cli-zr6qy15y.js} +11 -11
- package/dist/cli.js +21 -20
- package/dist/{codex-adapter-44yq2fkn.js → codex-adapter-n656pvb8.js} +6 -6
- package/dist/{codex-hook-h1zb7cfk.js → codex-hook-59atdwd8.js} +1 -1
- package/dist/{codex-login-cdyrr5y1.js → codex-login-a239g1ah.js} +1 -1
- package/dist/{codex-session-runner-zbh26gbw.js → codex-session-runner-p0fbv5y9.js} +6 -6
- package/dist/{commands-54f02v5b.js → commands-gwea8z5p.js} +3 -3
- package/dist/{controller-9gpwcdek.js → controller-t67c3grh.js} +6 -3
- package/dist/{controllers-connect-61re6k1n.js → controllers-connect-ks155r0h.js} +22 -20
- package/dist/{cursor-adapter-7e4g81vd.js → cursor-adapter-ygwrtmkv.js} +1 -1
- package/dist/{db-dg2gc7fd.js → db-kpmx06s9.js} +8 -2
- package/dist/{db-wnh0qjy1.js → db-rb2xqdb1.js} +3 -3
- package/dist/{dispatcher-jrm24r43.js → dispatcher-31sm0ej2.js} +20 -18
- package/dist/{docker-9aq30pp2.js → docker-09tkkg0n.js} +42 -3
- package/dist/{dsh-adapter-1yqk267c.js → dsh-adapter-qyxh0w31.js} +1 -1
- package/dist/{easter-egg-3d-r4h9cs9m.js → easter-egg-3d-00wjscn6.js} +1 -1
- package/dist/{embedding-space-bafjr5f7.js → embedding-space-qhw4g68n.js} +6 -6
- package/dist/{embeddings-7xmgqe0e.js → embeddings-zdv9ke6x.js} +1 -1
- package/dist/{execute-d6jg5ns0.js → execute-zna8wwr7.js} +1 -1
- package/dist/{external-channel-frq1xvq2.js → external-channel-1ac6t56s.js} +2 -2
- package/dist/fx-adapter-sk7n0fzc.js +19 -0
- package/dist/{google-generative-ai-hh7strj3.js → google-generative-ai-maq6c9bf.js} +1 -1
- package/dist/{google-vertex-fy5bw2pm.js → google-vertex-2jgsw2nb.js} +1 -1
- package/dist/grok-adapter-sjbcm5ew.js +19 -0
- package/dist/handlers-yzy0c87x.js +35 -0
- package/dist/{heartbeat-6bpa611t.js → heartbeat-2f6z4kdx.js} +23 -21
- package/dist/{hook-w12k146y.js → hook-8y0gvtp1.js} +6 -6
- package/dist/{hook-hvm5nf46.js → hook-w1skzaqc.js} +5 -5
- package/dist/{http-43tthdvs.js → http-wghxvpef.js} +714 -145
- package/dist/{index-1f0vypbg.js → index-0h6qd4p1.js} +34 -24
- package/dist/index-25pvya7q.js +40 -0
- package/dist/index-2t4859r5.js +35 -0
- package/dist/{index-4b1q8kan.js → index-4k7m5dgj.js} +629 -354
- package/dist/index-620y7jzq.js +15 -0
- package/dist/{index-cret47a5.js → index-8p0j4h4j.js} +506 -43
- package/dist/{index-mhq4sh5w.js → index-8zn8nxn5.js} +1 -1
- package/dist/{index-m5gx1xd6.js → index-9myfj74s.js} +40 -40
- package/dist/{index-ftywhyr0.js → index-9zkchs9t.js} +221 -65
- package/dist/{index-bs7gw5fd.js → index-b5wgnm78.js} +44 -44
- package/dist/index-cxca2t8y.js +36 -0
- package/dist/{index-585gyczt.js → index-pe3d8jfy.js} +3 -3
- package/dist/{index-tx9mc2ap.js → index-rv89fvzf.js} +24 -22
- package/dist/{index-fn054vsf.js → index-s71ez27v.js} +1 -1
- package/dist/{keepalive-rk0j0jvh.js → keepalive-sh02349h.js} +3 -3
- package/dist/lead-gk4h5eg7.js +74 -0
- package/dist/{maintenance-g6z6kaxw.js → maintenance-yj0dcjja.js} +1 -1
- package/dist/{node-jftbyawr.js → node-dqm4xgxw.js} +1 -1
- package/dist/{oauth-refresh-sweep-2k3g2q4w.js → oauth-refresh-sweep-d9xedk66.js} +2 -2
- package/dist/{onboard-6fdbvh3v.js → onboard-dpgjn03r.js} +2 -2
- package/dist/{opencode-adapter-fdbsvts7.js → opencode-adapter-2d31cpjc.js} +6 -6
- package/dist/{otel-impl-rvwtc09q.js → otel-impl-1skarpfq.js} +1 -1
- package/dist/{pending-sqkrb836.js → pending-bfmxtx0g.js} +21 -19
- package/dist/{pi-mono-adapter-asqayqcg.js → pi-mono-adapter-gvppnasy.js} +40 -13
- package/dist/{pricing-refresh-f5tkgmw2.js → pricing-refresh-c6b325mk.js} +2 -2
- package/dist/{rbac-roles-06s555fa.js → rbac-roles-h80qbdbs.js} +3 -3
- package/dist/{rbac-roles-szxsg8t1.js → rbac-roles-zfcx68tx.js} +2 -2
- package/dist/{render-v2-103p266q.js → render-v2-nx20t3rb.js} +6 -3
- package/dist/{resume-v7kjewt9.js → resume-5ep8agan.js} +10 -7
- package/dist/{runtime-f1gmk0b7.js → runtime-r3pj4mce.js} +1 -1
- package/dist/{session-access-6shev8ts.js → session-access-n7p3m15b.js} +4 -4
- package/dist/{session-source-backfill-bd7spzjd.js → session-source-backfill-v8mt0zwn.js} +3 -3
- package/dist/{setup-kmxmztdb.js → setup-z1psaqhe.js} +1 -1
- package/dist/thread-buffer-a1re2r9r.js +38 -0
- package/dist/{virtual-modules-57eje5wy.js → virtual-modules-rrbjdpxn.js} +3 -3
- package/dist/{work-objects-zr47ygmf.js → work-objects-4aghh73z.js} +29 -23
- package/dist/worker-3dyyb8ev.js +74 -0
- package/dist/{worker-follow-up-grrr3fda.js → worker-follow-up-166zmex1.js} +20 -18
- package/openapi.json +1387 -13
- package/package.json +7 -6
- package/src/apps/catalog.generated.json +43 -3
- package/src/apps/page-validator.ts +27 -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/tasks/read.ts +7 -3
- package/src/be/db/tasks/write.ts +33 -1
- package/src/be/db.ts +200 -304
- package/src/be/key-window-usage.ts +385 -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/runtime-pools/db.ts +3 -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/wait-for-task.ts +5 -1
- package/src/be/seed-skills/index.ts +3 -0
- package/src/be/swarm-config-guard.ts +24 -1
- 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/rate-limit-outcome.ts +6 -0
- package/src/commands/runner.ts +34 -53
- package/src/extensions/catalog.generated.json +3 -3
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/http/api-keys.ts +258 -30
- package/src/http/session-data.ts +74 -23
- package/src/http/sessions.ts +6 -2
- package/src/http/tasks.ts +105 -5
- package/src/integrations/chat-sdk/relay.ts +87 -0
- package/src/jira/outbound.ts +5 -3
- package/src/linear/outbound.ts +5 -1
- package/src/prompts/base-prompt.ts +8 -0
- package/src/prompts/session-templates.ts +19 -2
- 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/codex-adapter.ts +85 -3
- package/src/providers/codex-app-server.ts +9 -5
- package/src/providers/codex-oauth/auth-json.ts +1 -0
- package/src/providers/pi-mono-adapter.ts +35 -2
- package/src/providers/pricing-sources.md +32 -0
- package/src/providers/types.ts +11 -0
- package/src/runtime-providers/docker.ts +65 -1
- package/src/scheduler/deferred-task-waits.ts +18 -5
- package/src/scripts-runtime/types/swarm-extension.d.ts +8 -8
- package/src/slack/actions.ts +56 -0
- package/src/slack/app.ts +22 -15
- package/src/slack/inbound-files.ts +2 -0
- package/src/slack/render-v2.ts +107 -23
- package/src/slack/responses.ts +3 -2
- package/src/slack/work-objects.ts +4 -1
- package/src/tasks/errors.ts +5 -0
- package/src/tests/acp-adapter.test.ts +4 -6
- 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 +7 -1
- package/src/tests/approval-requests-notifications.test.ts +11 -1
- package/src/tests/apps-catalog-page-frame.test.ts +49 -0
- package/src/tests/apps-session-thread.test.ts +79 -0
- package/src/tests/base-prompt.test.ts +111 -5
- package/src/tests/chat-sdk-relay.test.ts +149 -1
- 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 +16 -0
- package/src/tests/codex-oauth.test.ts +3 -1
- package/src/tests/codex-rate-limits.test.ts +384 -0
- package/src/tests/credential-outcome-report.test.ts +20 -0
- package/src/tests/db-task-read-contract.test.ts +3 -0
- package/src/tests/db-task-write-contract.test.ts +4 -0
- 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/extensions-example-sql-admin-only.test.ts +7 -4
- 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/gitleaks-download-retry.test.ts +85 -0
- package/src/tests/human-thread-routing.test.ts +187 -0
- package/src/tests/jira-outbound-sync.test.ts +33 -1
- package/src/tests/key-window-usage.test.ts +831 -0
- package/src/tests/linear-outbound-sync.test.ts +30 -1
- package/src/tests/pi-mono-adapter.test.ts +79 -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 +4 -3
- package/src/tests/provider-quota-persistence.test.ts +362 -0
- package/src/tests/rate-limit-event.test.ts +22 -0
- package/src/tests/reasoning-events.test.ts +164 -0
- package/src/tests/routing-affinity-inventory.test.ts +22 -0
- package/src/tests/runtime-providers-docker.test.ts +91 -0
- package/src/tests/script-connections.test.ts +5 -0
- package/src/tests/secret-canary-sweep.test.ts +41 -5
- 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/sessions-detail-batch.test.ts +7 -0
- package/src/tests/slack-render-v2.test.ts +357 -0
- package/src/tests/slack-start-reload-race.test.ts +67 -0
- package/src/tests/subscription-plans.test.ts +20 -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/tools/defer-task.ts +1 -1
- package/src/tools/store-progress.ts +69 -3
- package/src/types.ts +7 -2
- 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/credentials.ts +2 -0
- package/src/utils/error-tracker.ts +19 -0
- package/src/utils/provider-account-telemetry.ts +331 -0
- package/src/utils/reasoning-events.ts +107 -0
- package/src/utils/subscription-plans.ts +11 -59
- package/src/utils/task-ui-spec.ts +67 -0
- package/src/workflows/task-step-routing.ts +8 -3
- package/templates/extensions/sql-admin-only/README.md +2 -1
- package/templates/extensions/sql-admin-only/hooks.ts +7 -3
- package/templates/extensions/sql-admin-only/manifest.json +1 -1
- package/templates/skills/apps/SKILL.md +32 -5
- package/templates/skills/apps/content.md +32 -5
- package/templates/skills/ui-spec/config.json +14 -0
- package/templates/skills/ui-spec/content.md +127 -0
- package/dist/acp-adapter-jqn86aam.js +0 -16
- package/dist/cli-srtkr1h2.js +0 -12078
- package/dist/fx-adapter-0zrkfbkd.js +0 -19
- package/dist/grok-adapter-3db1c538.js +0 -19
- package/dist/handlers-k22n8mnn.js +0 -33
- package/dist/index-8xcyd3mc.js +0 -33
- package/dist/index-9sy2bh6n.js +0 -38
- package/dist/index-b24j7t2m.js +0 -12797
- package/dist/index-wjd56k1v.js +0 -34
- package/dist/lead-atxf3q6e.js +0 -72
- package/dist/thread-buffer-4yz236d0.js +0 -36
- package/dist/worker-p4hbtcy3.js +0 -72
- package/dist/{cli-j49yqpvh.js → cli-7evph51z.js} +3 -3
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
checkDeepSeekApiKey,
|
|
12
12
|
checkOpenAICompatibleProvider,
|
|
13
13
|
writeSkillsToFilesystem
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-f9gz2vyj.js";
|
|
15
15
|
import {
|
|
16
16
|
renderSteeringDelivery
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-b6px1k1q.js";
|
|
18
18
|
import {
|
|
19
19
|
effectiveReasoningEffort
|
|
20
20
|
} from "./cli-5gpqgs8b.js";
|
|
21
21
|
import {
|
|
22
22
|
validateProviderDependencies
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-fkef327x.js";
|
|
24
24
|
import {
|
|
25
25
|
isSkillLoaderCall,
|
|
26
26
|
skillFromToolArgs,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
CODEX_CREDITS_EXHAUSTED_COOLDOWN_MS,
|
|
34
34
|
resolveCodexCreditsExhaustedCooldownMs,
|
|
35
35
|
parseRateLimitResetTime
|
|
36
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-kpgcm7xy.js";
|
|
37
37
|
import {
|
|
38
38
|
ACP_TARGET_IDS,
|
|
39
39
|
isAcpTarget
|
|
@@ -41,35 +41,35 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
checkAmpCredentials2,
|
|
43
43
|
liveTestAmpCredentials2
|
|
44
|
-
} from "./cli-
|
|
44
|
+
} from "./cli-nafvvsp8.js";
|
|
45
45
|
import {
|
|
46
46
|
checkClaudeCredentials2
|
|
47
|
-
} from "./cli-
|
|
47
|
+
} from "./cli-y2ewxhth.js";
|
|
48
48
|
import {
|
|
49
49
|
checkClaudeManagedCredentials2
|
|
50
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-6ym4jhzp.js";
|
|
51
51
|
import {
|
|
52
52
|
codexUserHome,
|
|
53
53
|
checkCodexCredentials2
|
|
54
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-w4n323t3.js";
|
|
55
55
|
import {
|
|
56
56
|
checkCursorCredentials2
|
|
57
|
-
} from "./cli-
|
|
57
|
+
} from "./cli-bg63qmsx.js";
|
|
58
58
|
import {
|
|
59
59
|
checkDevinCredentials2
|
|
60
60
|
} from "./cli-6237rnyr.js";
|
|
61
61
|
import {
|
|
62
62
|
checkDshCredentials2
|
|
63
|
-
} from "./cli-
|
|
63
|
+
} from "./cli-67mwzr35.js";
|
|
64
64
|
import {
|
|
65
65
|
checkOpencodeCredentials2
|
|
66
|
-
} from "./cli-
|
|
66
|
+
} from "./cli-zh0e5x7p.js";
|
|
67
67
|
import {
|
|
68
68
|
checkFxCredentials2
|
|
69
|
-
} from "./cli-
|
|
69
|
+
} from "./cli-ysvspf5e.js";
|
|
70
70
|
import {
|
|
71
71
|
checkGrokCredentials2
|
|
72
|
-
} from "./cli-
|
|
72
|
+
} from "./cli-jwampxxq.js";
|
|
73
73
|
import {
|
|
74
74
|
CODEX_OAUTH_POOL_SLOTS_ENV,
|
|
75
75
|
isCodexOAuthConfigKey,
|
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
init_azure_devops,
|
|
88
88
|
resolveScriptsOnlyMode,
|
|
89
89
|
init_scripts_only_mode
|
|
90
|
-
} from "./cli-
|
|
90
|
+
} from "./cli-2czxfnvj.js";
|
|
91
91
|
import {
|
|
92
92
|
terminateRegisteredProcessGroups,
|
|
93
93
|
init_process_group
|
|
@@ -95,14 +95,14 @@ import {
|
|
|
95
95
|
import {
|
|
96
96
|
validateJsonSchema,
|
|
97
97
|
init_json_schema_validator
|
|
98
|
-
} from "./cli-
|
|
98
|
+
} from "./cli-j7svy295.js";
|
|
99
99
|
import {
|
|
100
100
|
authJsonToCredentialSelection,
|
|
101
101
|
credentialsToAuthJson,
|
|
102
102
|
init_auth_json,
|
|
103
103
|
loadAllCodexOAuthSlots,
|
|
104
104
|
init_storage
|
|
105
|
-
} from "./cli-
|
|
105
|
+
} from "./cli-7sf9sb0w.js";
|
|
106
106
|
import {
|
|
107
107
|
getApiKey,
|
|
108
108
|
init_api_key
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
initialize,
|
|
119
119
|
ensure,
|
|
120
120
|
init_business_use
|
|
121
|
-
} from "./cli-
|
|
121
|
+
} from "./cli-pyjn0qhk.js";
|
|
122
122
|
import {
|
|
123
123
|
sourceOfKey,
|
|
124
124
|
init_source_key,
|
|
@@ -140,7 +140,7 @@ import {
|
|
|
140
140
|
init_vcs_repo_match,
|
|
141
141
|
resumedTaskModelSelection,
|
|
142
142
|
init_model_pin
|
|
143
|
-
} from "./cli-
|
|
143
|
+
} from "./cli-ctx0b85j.js";
|
|
144
144
|
import {
|
|
145
145
|
isCodexAuthFailureReason,
|
|
146
146
|
init_codex_auth_failure
|
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
ProviderNameSchema,
|
|
155
155
|
WorkerNudgeSchema,
|
|
156
156
|
init_types5
|
|
157
|
-
} from "./cli-
|
|
157
|
+
} from "./cli-bkjdknnp.js";
|
|
158
158
|
import {
|
|
159
159
|
getGitHubLinkConfig,
|
|
160
160
|
scopeGitHubTokenToEnterprise,
|
|
@@ -162,12 +162,12 @@ import {
|
|
|
162
162
|
init_github_host
|
|
163
163
|
} from "./cli-9ttx00s3.js";
|
|
164
164
|
import {
|
|
165
|
+
init_templates4,
|
|
165
166
|
generateDefaultClaudeMd2,
|
|
166
167
|
generateDefaultSoulMd2,
|
|
167
168
|
generateDefaultIdentityMd2,
|
|
168
169
|
generateDefaultToolsMd2,
|
|
169
170
|
init_defaults,
|
|
170
|
-
init_templates4,
|
|
171
171
|
getBasePrompt,
|
|
172
172
|
getTaskContextPrompt,
|
|
173
173
|
init_base_prompt,
|
|
@@ -186,7 +186,7 @@ import {
|
|
|
186
186
|
resolveClaudeMdPath,
|
|
187
187
|
syncProfileFilesToServer,
|
|
188
188
|
init_profile_sync
|
|
189
|
-
} from "./cli-
|
|
189
|
+
} from "./cli-m7c2380k.js";
|
|
190
190
|
import {
|
|
191
191
|
isSteeringEnabled2,
|
|
192
192
|
init_steering_enabled
|
|
@@ -208,14 +208,14 @@ import {
|
|
|
208
208
|
CLAUDE_CREDENTIALS_HINT,
|
|
209
209
|
resolveCredentialPools,
|
|
210
210
|
init_credentials2
|
|
211
|
-
} from "./cli-
|
|
211
|
+
} from "./cli-psffsanb.js";
|
|
212
212
|
import {
|
|
213
213
|
interpolate,
|
|
214
214
|
init_template2,
|
|
215
215
|
configureHttpResolver,
|
|
216
216
|
resolveTemplateAsync,
|
|
217
217
|
init_resolver
|
|
218
|
-
} from "./cli-
|
|
218
|
+
} from "./cli-6ehs4mta.js";
|
|
219
219
|
import {
|
|
220
220
|
runtimeHarnessSections,
|
|
221
221
|
refreshRuntimeModelCatalog,
|
|
@@ -286,19 +286,19 @@ init_storage();
|
|
|
286
286
|
async function createProviderAdapter(provider) {
|
|
287
287
|
switch (provider) {
|
|
288
288
|
case "claude": {
|
|
289
|
-
const { ClaudeAdapter } = await import("./claude-adapter-
|
|
289
|
+
const { ClaudeAdapter } = await import("./claude-adapter-3m4q7735.js");
|
|
290
290
|
return new ClaudeAdapter;
|
|
291
291
|
}
|
|
292
292
|
case "pi": {
|
|
293
|
-
const { PiMonoAdapter } = await import("./pi-mono-adapter-
|
|
293
|
+
const { PiMonoAdapter } = await import("./pi-mono-adapter-gvppnasy.js");
|
|
294
294
|
return new PiMonoAdapter;
|
|
295
295
|
}
|
|
296
296
|
case "codex": {
|
|
297
|
-
const { CodexAdapter } = await import("./codex-adapter-
|
|
297
|
+
const { CodexAdapter } = await import("./codex-adapter-n656pvb8.js");
|
|
298
298
|
return new CodexAdapter;
|
|
299
299
|
}
|
|
300
300
|
case "claude-managed": {
|
|
301
|
-
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-
|
|
301
|
+
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-t8nfgcgz.js");
|
|
302
302
|
return new ClaudeManagedAdapter;
|
|
303
303
|
}
|
|
304
304
|
case "devin": {
|
|
@@ -306,31 +306,31 @@ async function createProviderAdapter(provider) {
|
|
|
306
306
|
return new DevinAdapter;
|
|
307
307
|
}
|
|
308
308
|
case "opencode": {
|
|
309
|
-
const { OpencodeAdapter } = await import("./opencode-adapter-
|
|
309
|
+
const { OpencodeAdapter } = await import("./opencode-adapter-2d31cpjc.js");
|
|
310
310
|
return new OpencodeAdapter;
|
|
311
311
|
}
|
|
312
312
|
case "dsh": {
|
|
313
|
-
const { DshAdapter } = await import("./dsh-adapter-
|
|
313
|
+
const { DshAdapter } = await import("./dsh-adapter-qyxh0w31.js");
|
|
314
314
|
return new DshAdapter;
|
|
315
315
|
}
|
|
316
316
|
case "amp": {
|
|
317
|
-
const { AmpAdapter } = await import("./amp-adapter-
|
|
317
|
+
const { AmpAdapter } = await import("./amp-adapter-vtax2c9s.js");
|
|
318
318
|
return new AmpAdapter;
|
|
319
319
|
}
|
|
320
320
|
case "cursor": {
|
|
321
|
-
const { CursorAdapter } = await import("./cursor-adapter-
|
|
321
|
+
const { CursorAdapter } = await import("./cursor-adapter-ygwrtmkv.js");
|
|
322
322
|
return new CursorAdapter;
|
|
323
323
|
}
|
|
324
324
|
case "grok": {
|
|
325
|
-
const { GrokAdapter } = await import("./grok-adapter-
|
|
325
|
+
const { GrokAdapter } = await import("./grok-adapter-sjbcm5ew.js");
|
|
326
326
|
return new GrokAdapter;
|
|
327
327
|
}
|
|
328
328
|
case "fx": {
|
|
329
|
-
const { FxAdapter } = await import("./fx-adapter-
|
|
329
|
+
const { FxAdapter } = await import("./fx-adapter-sk7n0fzc.js");
|
|
330
330
|
return new FxAdapter;
|
|
331
331
|
}
|
|
332
332
|
case "acp": {
|
|
333
|
-
const { ACPAdapter } = await import("./acp-adapter-
|
|
333
|
+
const { ACPAdapter } = await import("./acp-adapter-g909b5hw.js");
|
|
334
334
|
return new ACPAdapter;
|
|
335
335
|
}
|
|
336
336
|
default:
|
|
@@ -1228,8 +1228,8 @@ async function reportKeyRateLimit(apiUrl, apiKey, keyType, keySuffix, keyIndex,
|
|
|
1228
1228
|
console.log(`[credentials] Reported key ...${keySuffix} as rate-limited until ${rateLimitedUntil}`);
|
|
1229
1229
|
} catch {}
|
|
1230
1230
|
}
|
|
1231
|
-
async function reportKeyRateLimitWindows(apiUrl, apiKey, keyType, keySuffix, keyIndex, windows, logKeySuffix = true) {
|
|
1232
|
-
if (Object.keys(windows).length === 0)
|
|
1231
|
+
async function reportKeyRateLimitWindows(apiUrl, apiKey, keyType, keySuffix, keyIndex, windows, logKeySuffix = true, account, replace) {
|
|
1232
|
+
if (Object.keys(windows).length === 0 && !account && !replace?.length)
|
|
1233
1233
|
return;
|
|
1234
1234
|
const response = await fetch(`${apiUrl}/api/keys/report-rate-limit-windows`, {
|
|
1235
1235
|
method: "POST",
|
|
@@ -1241,7 +1241,9 @@ async function reportKeyRateLimitWindows(apiUrl, apiKey, keyType, keySuffix, key
|
|
|
1241
1241
|
keyType,
|
|
1242
1242
|
keySuffix,
|
|
1243
1243
|
keyIndex,
|
|
1244
|
-
windows
|
|
1244
|
+
windows,
|
|
1245
|
+
account,
|
|
1246
|
+
replace
|
|
1245
1247
|
})
|
|
1246
1248
|
});
|
|
1247
1249
|
if (!response.ok) {
|
|
@@ -1270,8 +1272,8 @@ async function reportCredentialOutcomeThenFinish(input, finish) {
|
|
|
1270
1272
|
console.log(`[credential] ${outcome.model} weekly window exhausted (${outcome.window}) on key #${credentialInfo.keyIndex} until ${resetsAtIso}`);
|
|
1271
1273
|
}
|
|
1272
1274
|
const finalWindows = buildFinalRateLimitWindows(result.rateLimitWindows, outcome, new Date().toISOString());
|
|
1273
|
-
if (finalWindows) {
|
|
1274
|
-
const report = reportKeyRateLimitWindows(apiUrl, apiKey, credentialInfo.keyType, credentialInfo.keySuffix, credentialInfo.keyIndex, finalWindows, outcome.kind !== "model").catch((err) => {
|
|
1275
|
+
if (finalWindows || result.providerAccount || result.rateLimitReplacements?.length) {
|
|
1276
|
+
const report = reportKeyRateLimitWindows(apiUrl, apiKey, credentialInfo.keyType, credentialInfo.keySuffix, credentialInfo.keyIndex, finalWindows ?? {}, outcome.kind !== "model", result.providerAccount, result.rateLimitReplacements).catch((err) => {
|
|
1275
1277
|
console.warn(`[credential] Failed to report rate-limit windows: ${err instanceof Error ? err.message : String(err)}`);
|
|
1276
1278
|
});
|
|
1277
1279
|
if (outcome.kind === "model")
|
|
@@ -1334,7 +1336,7 @@ var CREDENTIAL_PROVIDER_CHECKERS = {
|
|
|
1334
1336
|
devin: (env) => checkDevinCredentials2(env),
|
|
1335
1337
|
opencode: (env, opts) => checkOpencodeCredentials2(env, opts),
|
|
1336
1338
|
pi: async (env, opts) => {
|
|
1337
|
-
const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-
|
|
1339
|
+
const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-gvppnasy.js");
|
|
1338
1340
|
return {
|
|
1339
1341
|
...await checkPiMonoCredentials(env, opts),
|
|
1340
1342
|
opencodeGoModels: listPiOpencodeGoModelIds()
|
|
@@ -1613,7 +1615,7 @@ async function validateProviderCredentials(provider, env = process.env, presence
|
|
|
1613
1615
|
latency_ms: Date.now() - startedAt
|
|
1614
1616
|
};
|
|
1615
1617
|
}
|
|
1616
|
-
const { liveTestCursorKey } = await import("./cursor-adapter-
|
|
1618
|
+
const { liveTestCursorKey } = await import("./cursor-adapter-ygwrtmkv.js");
|
|
1617
1619
|
return checkEachKey("CURSOR_API_KEY", apiKey, async (member) => {
|
|
1618
1620
|
const start = Date.now();
|
|
1619
1621
|
const result = await liveTestCursorKey(member);
|
|
@@ -3260,7 +3262,8 @@ async function reportKeyUsage(apiUrl, apiKey, keyType, selection, taskId) {
|
|
|
3260
3262
|
keySuffix: selection.keySuffix,
|
|
3261
3263
|
keyIndex: selection.index,
|
|
3262
3264
|
taskId,
|
|
3263
|
-
...selection.plan ? { plan: selection.plan } : {}
|
|
3265
|
+
...selection.plan ? { plan: selection.plan } : {},
|
|
3266
|
+
...selection.planRaw ? { planRaw: selection.planRaw } : {}
|
|
3264
3267
|
})
|
|
3265
3268
|
});
|
|
3266
3269
|
} catch {}
|
|
@@ -3671,7 +3674,7 @@ async function saveCostData(cost, apiUrl, apiKey, deadline) {
|
|
|
3671
3674
|
headers.Authorization = `Bearer ${apiKey}`;
|
|
3672
3675
|
}
|
|
3673
3676
|
try {
|
|
3674
|
-
const body = { ...cost, id: crypto.randomUUID() };
|
|
3677
|
+
const body = { ...cost, id: cost.id ?? crypto.randomUUID() };
|
|
3675
3678
|
const response = await postWithRetry(`${apiUrl}/api/session-costs`, headers, body, deadline, "Session cost POST");
|
|
3676
3679
|
if (response.status === 401) {
|
|
3677
3680
|
console.warn("[runner] Cost data: runtime token revoked or expired. Cost saving stopped.");
|
|
@@ -4674,8 +4677,7 @@ async function spawnProviderProcess(adapter, opts, logDir) {
|
|
|
4674
4677
|
const oauthInfo = await resolveCodexOAuthCredentialInfo(opts.apiUrl, opts.apiKey);
|
|
4675
4678
|
oauthSelection = oauthInfo?.selection;
|
|
4676
4679
|
oauthIsPoolBacked = oauthInfo?.isPoolBacked ?? false;
|
|
4677
|
-
|
|
4678
|
-
if (oauthSelection && realTaskId && oauthIsPrimary) {
|
|
4680
|
+
if (oauthSelection && realTaskId) {
|
|
4679
4681
|
reportKeyUsage(opts.apiUrl, opts.apiKey, oauthSelection.keyType, oauthSelection, realTaskId).catch(() => {});
|
|
4680
4682
|
}
|
|
4681
4683
|
} else if (adapter.name === "pi" && isChatgptSubscriptionModel(model)) {
|
|
@@ -4688,6 +4690,19 @@ async function spawnProviderProcess(adapter, opts, logDir) {
|
|
|
4688
4690
|
reportKeyUsage(opts.apiUrl, opts.apiKey, oauthSelection.keyType, oauthSelection, realTaskId).catch(() => {});
|
|
4689
4691
|
}
|
|
4690
4692
|
}
|
|
4693
|
+
const primarySelection = oauthSelection ?? credentialSelections[0];
|
|
4694
|
+
const credentialInfo = primarySelection ? {
|
|
4695
|
+
keyType: primarySelection.keyType,
|
|
4696
|
+
keySuffix: primarySelection.keySuffix,
|
|
4697
|
+
keyIndex: primarySelection.index,
|
|
4698
|
+
authFence: primarySelection.authFailureFence
|
|
4699
|
+
} : undefined;
|
|
4700
|
+
const costAttribution = {
|
|
4701
|
+
id: crypto.randomUUID(),
|
|
4702
|
+
credentialKeyType: credentialInfo?.keyType ?? null,
|
|
4703
|
+
credentialKeySuffix: credentialInfo?.keySuffix ?? null,
|
|
4704
|
+
harness: opts.harnessProvider
|
|
4705
|
+
};
|
|
4691
4706
|
const skillInvokes = createSkillInvokeTracker();
|
|
4692
4707
|
const config = {
|
|
4693
4708
|
prompt: opts.prompt,
|
|
@@ -4971,6 +4986,8 @@ async function spawnProviderProcess(adapter, opts, logDir) {
|
|
|
4971
4986
|
case "result":
|
|
4972
4987
|
lastCostHolder.value = {
|
|
4973
4988
|
...event.cost,
|
|
4989
|
+
...costAttribution,
|
|
4990
|
+
agentId: opts.agentId,
|
|
4974
4991
|
taskId: realTaskId,
|
|
4975
4992
|
sessionId: opts.runnerSessionId
|
|
4976
4993
|
};
|
|
@@ -5136,7 +5153,13 @@ async function spawnProviderProcess(adapter, opts, logDir) {
|
|
|
5136
5153
|
}
|
|
5137
5154
|
result.cost ??= lastCostHolder.value;
|
|
5138
5155
|
if (result.cost) {
|
|
5139
|
-
result.cost = {
|
|
5156
|
+
result.cost = {
|
|
5157
|
+
...result.cost,
|
|
5158
|
+
...costAttribution,
|
|
5159
|
+
agentId: opts.agentId,
|
|
5160
|
+
taskId: realTaskId,
|
|
5161
|
+
sessionId: opts.runnerSessionId
|
|
5162
|
+
};
|
|
5140
5163
|
sessionSpan.setAttributes({
|
|
5141
5164
|
"gen_ai.response.model": result.cost.model,
|
|
5142
5165
|
"gen_ai.usage.input_tokens": result.cost.inputTokens ?? 0,
|
|
@@ -5224,26 +5247,6 @@ async function spawnProviderProcess(adapter, opts, logDir) {
|
|
|
5224
5247
|
scheduleRunnerGc("session error");
|
|
5225
5248
|
throw error;
|
|
5226
5249
|
}));
|
|
5227
|
-
let primarySelection;
|
|
5228
|
-
const firstCred = credentialSelections[0];
|
|
5229
|
-
if (oauthSelection && oauthIsPoolBacked) {
|
|
5230
|
-
primarySelection = oauthSelection;
|
|
5231
|
-
} else if (firstCred && oauthSelection) {
|
|
5232
|
-
if (firstCred.isRateLimitFallback && !oauthSelection.isRateLimitFallback) {
|
|
5233
|
-
primarySelection = oauthSelection;
|
|
5234
|
-
console.log(`[credentials] Cross-keyType failover: ${firstCred.keyType} all rate-limited, using ${oauthSelection.keyType} [...${oauthSelection.keySuffix}]`);
|
|
5235
|
-
} else {
|
|
5236
|
-
primarySelection = firstCred;
|
|
5237
|
-
}
|
|
5238
|
-
} else {
|
|
5239
|
-
primarySelection = firstCred ?? oauthSelection;
|
|
5240
|
-
}
|
|
5241
|
-
const credentialInfo = primarySelection ? {
|
|
5242
|
-
keyType: primarySelection.keyType,
|
|
5243
|
-
keySuffix: primarySelection.keySuffix,
|
|
5244
|
-
keyIndex: primarySelection.index,
|
|
5245
|
-
authFence: primarySelection.authFailureFence
|
|
5246
|
-
} : undefined;
|
|
5247
5250
|
const runningTask = {
|
|
5248
5251
|
taskId: effectiveTaskId,
|
|
5249
5252
|
session,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
getWorkflowVersions2,
|
|
47
47
|
getMcpServerById2,
|
|
48
48
|
init_db4
|
|
49
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-ctx0b85j.js";
|
|
50
50
|
import {
|
|
51
51
|
McpHttpClient,
|
|
52
52
|
init_http_client
|
|
@@ -61,11 +61,11 @@ import {
|
|
|
61
61
|
oauthAppRowToProviderConfig,
|
|
62
62
|
ensureAuthorizationTokenOrThrow,
|
|
63
63
|
init_ensure_token
|
|
64
|
-
} from "./cli-
|
|
64
|
+
} from "./cli-jm0hvmz2.js";
|
|
65
65
|
import {
|
|
66
66
|
validateDefinition,
|
|
67
67
|
init_definition2
|
|
68
|
-
} from "./cli-
|
|
68
|
+
} from "./cli-j7svy295.js";
|
|
69
69
|
import {
|
|
70
70
|
getApiKey,
|
|
71
71
|
init_api_key
|
|
@@ -77,18 +77,18 @@ import {
|
|
|
77
77
|
refreshMcpToken,
|
|
78
78
|
computeExpiresAt,
|
|
79
79
|
init_mcp_wrapper
|
|
80
|
-
} from "./cli-
|
|
80
|
+
} from "./cli-2dq9yv8p.js";
|
|
81
81
|
import {
|
|
82
82
|
mintScriptRunToken,
|
|
83
83
|
revokeSessionToken,
|
|
84
84
|
init_users
|
|
85
|
-
} from "./cli-
|
|
85
|
+
} from "./cli-v57d7fmm.js";
|
|
86
86
|
import {
|
|
87
87
|
defaultAssetKey,
|
|
88
88
|
init_key,
|
|
89
89
|
AppIconSchema,
|
|
90
90
|
init_types5
|
|
91
|
-
} from "./cli-
|
|
91
|
+
} from "./cli-bkjdknnp.js";
|
|
92
92
|
import {
|
|
93
93
|
init_zod
|
|
94
94
|
} from "./cli-zcfpsfzf.js";
|
|
@@ -179539,6 +179539,7 @@ var init_catalog_generated = __esm(() => {
|
|
|
179539
179539
|
"Timeline",
|
|
179540
179540
|
"SchemaForm",
|
|
179541
179541
|
"SessionThread",
|
|
179542
|
+
"PageFrame",
|
|
179542
179543
|
"ElementRef",
|
|
179543
179544
|
"ElementSlot"
|
|
179544
179545
|
],
|
|
@@ -181704,7 +181705,7 @@ var init_catalog_generated = __esm(() => {
|
|
|
181704
181705
|
}
|
|
181705
181706
|
},
|
|
181706
181707
|
Form: {
|
|
181707
|
-
description: 'Field form. Values live in state under `/forms/<id>/<field>`; `onSubmit` chains receive `$form` (all collected values) and `$form: "<field>"` for one. `app.mutate` failures in the chain surface inline under the fields (not the page banner), and the submit button shows a pending spinner while the chain runs. `kind: "file"` attaches agent-fs files with the VIEWER\'s own agent-fs key (swarm default drive): `source: "upload"` (default) picks local files and uploads them on submit, before the chain, to `<dir>/<timestamp>-<id>-<n>-<name>` (unique per file, across fields and submits); `"pick"` opens a browser of `dir` (or `/`) to attach a file that already exists; `"both"` offers both. `$form.<name>` is the path, or an array of paths with `multiple: true`. `accept` filters the file picker. An upload failure stops the chain and keeps the values. Without an agent-fs connection the field shows a "Connect agent-fs" card, and a required file field disables submit.',
|
|
181708
|
+
description: 'Field form. Values live in state under `/forms/<id>/<field>`; `onSubmit` chains receive `$form` (all collected values) and `$form: "<field>"` for one. `app.mutate` failures in the chain surface inline under the fields (not the page banner), and the submit button shows a pending spinner while the chain runs. `kind: "file"` attaches agent-fs files with the VIEWER\'s own agent-fs key (swarm default drive): `source: "upload"` (default) picks local files and uploads them on submit, before the chain, to `<dir>/<timestamp>-<id>-<n>-<name>` (unique per file, across fields and submits); `"pick"` opens a browser of `dir` (or `/`) to attach a file that already exists; `"both"` offers both. `$form.<name>` is the path, or an array of paths with `multiple: true`. `accept` filters the file picker. An upload failure stops the chain and keeps the values. After an `app.mutate` create step, later steps read the new row\'s id as `{ "$chain": "createdRowId" }` (to open it, or as an `app.action` session key); before one runs the key is null and its param is dropped. Use it, not `$state`: the renderer resolves a chain\'s `$state` reads when the form renders. Without an agent-fs connection the field shows a "Connect agent-fs" card, and a required file field disables submit.',
|
|
181708
181709
|
props: {
|
|
181709
181710
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
181710
181711
|
type: "object",
|
|
@@ -182932,7 +182933,7 @@ var init_catalog_generated = __esm(() => {
|
|
|
182932
182933
|
}
|
|
182933
182934
|
},
|
|
182934
182935
|
SessionThread: {
|
|
182935
|
-
description: 'A chat on an app page, rendered as the dashboard\'s session conversation (the same turn timeline and composer as the "Session about this page" panel). The session is found by key, not stored in a row: the server keys each task an `app.action` step creates as `task:app:<appId>:<sessionKey>:user:<viewer>`, and the thread shows the viewer\'s newest session with that key. The viewer must have an identity: with none picked the composer is disabled. `scope: "shared"` (one session for everyone) comes in a follow-up PR and is rejected today. A person bubble shows the `message` of an app-action input (cut at 4,000 characters), not the whole agent prompt. Sending routes three ways: no session yet → run `onDispatch`, whose `app.action` creates the session\'s root task; a task in the session not finished → the shared composer steers the newest unfinished task on any agent (steering source `app-page`; Queue, or Interrupt where the harness supports it); every task finished → run `onDispatch` again, chaining off the newest task via `"parentTaskId": { "$chain": "leafTaskId" }`. `$chain.leafTaskId` is `null` when there is no session, and a null `$chain` key drops the param, so one `onDispatch` covers the first message and follow-ups. Each `app.action` step is sent with the session and `followUp: false` (unless it sets `followUp` itself), so the Lead adds no review task. Messages are text only (no attachments or mic). After each send the composer stays busy until the new task shows up (at most 30 s). "New session" starts over: the next message creates a new root, and the older session is no longer shown. The composer draft is mirrored to `/ui/<id>/value` (namespaced per instance inside an element). The thread is 420 px tall; `fill: true` fills a `fill`-aware parent instead, with the timeline scrolling inside it and the composer pinned to the bottom.',
|
|
182936
|
+
description: 'A chat on an app page, rendered as the dashboard\'s session conversation (the same turn timeline and composer as the "Session about this page" panel). The session is found by key, not stored in a row: the server keys each task an `app.action` step creates as `task:app:<appId>:<sessionKey>:user:<viewer>`, and the thread shows the viewer\'s newest session with that key. The viewer must have an identity: with none picked the composer is disabled. `scope: "shared"` (one session for everyone) comes in a follow-up PR and is rejected today. A person bubble shows the `message` of an app-action input (cut at 4,000 characters), not the whole agent prompt. Sending routes three ways: no session yet → run `onDispatch`, whose `app.action` creates the session\'s root task; a task in the session not finished → the shared composer steers the newest unfinished task on any agent (steering source `app-page`; Queue, or Interrupt where the harness supports it); every task finished → run `onDispatch` again, chaining off the newest task via `"parentTaskId": { "$chain": "leafTaskId" }`. `$chain.leafTaskId` is `null` when there is no session, and a null `$chain` key drops the param, so one `onDispatch` covers the first message and follow-ups. Each `app.action` step is sent with the session and `followUp: false` (unless it sets `followUp` itself), so the Lead adds no review task. A chain elsewhere can start the session for the viewer before the thread mounts: an `app.action` step with `session: { key: <this sessionKey> }` (e.g. a create form that sends the idea, then navigates here) creates the root, and the thread shows it as its first message with no second send. Messages are text only (no attachments or mic). After each send the composer stays busy until the new task shows up (at most 30 s). "New session" starts over: the next message creates a new root, and the older session is no longer shown. The composer draft is mirrored to `/ui/<id>/value` (namespaced per instance inside an element). The thread is 420 px tall; `fill: true` fills a `fill`-aware parent instead, with the timeline scrolling inside it and the composer pinned to the bottom.',
|
|
182936
182937
|
props: {
|
|
182937
182938
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
182938
182939
|
type: "object",
|
|
@@ -182981,6 +182982,30 @@ var init_catalog_generated = __esm(() => {
|
|
|
182981
182982
|
additionalProperties: false
|
|
182982
182983
|
}
|
|
182983
182984
|
},
|
|
182985
|
+
PageFrame: {
|
|
182986
|
+
description: 'A live swarm Page: the same body `/pages/<pageId>` shows, clickable. An HTML page runs in a sandboxed iframe (scripts, forms and popups, never top navigation); a JSON page renders inline. It checks the page every 3 s and reloads by itself when the page changes (a new version, a restore, a theme switch), with no viewer action; a reload resets scroll and any state inside the page. Bind `pageId` to a row or route param (`{ "$state": "/queries/<name>/data/0/pageId" }`). The viewer needs read access to the page: an authed page launches a page session for them, a password page asks for the password. `device: "mobile"` narrows the frame to 390 px, so the page\'s own media queries see a phone (a JSON page follows the dashboard viewport instead). 640 px tall by default; `height` sets it, `fill: true` grows inside a `fill`-aware parent. An empty `pageId` shows "No page selected".',
|
|
182987
|
+
props: {
|
|
182988
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
182989
|
+
type: "object",
|
|
182990
|
+
properties: {
|
|
182991
|
+
pageId: {
|
|
182992
|
+
type: "string"
|
|
182993
|
+
},
|
|
182994
|
+
device: {
|
|
182995
|
+
type: "string",
|
|
182996
|
+
enum: ["desktop", "mobile"]
|
|
182997
|
+
},
|
|
182998
|
+
height: {
|
|
182999
|
+
type: "string"
|
|
183000
|
+
},
|
|
183001
|
+
fill: {
|
|
183002
|
+
type: "boolean"
|
|
183003
|
+
}
|
|
183004
|
+
},
|
|
183005
|
+
required: ["pageId"],
|
|
183006
|
+
additionalProperties: false
|
|
183007
|
+
}
|
|
183008
|
+
},
|
|
182984
183009
|
ElementRef: {
|
|
182985
183010
|
description: "Reference a reusable element from this app or an exported element from another app. Consumer children are inserted at the target's ElementSlot.",
|
|
182986
183011
|
slots: ["default"],
|
|
@@ -183197,7 +183222,7 @@ var init_catalog_generated = __esm(() => {
|
|
|
183197
183222
|
}
|
|
183198
183223
|
},
|
|
183199
183224
|
"app.action": {
|
|
183200
|
-
description: "Invoke a named custom action from the app definition's `actions` map (script- or task-backed). Result lands in state at `/actions/<name>`.",
|
|
183225
|
+
description: "Invoke a named custom action from the app definition's `actions` map (script- or task-backed). Result lands in state at `/actions/<name>`. `session: { key, scope? }` files a task-kind action's task under a SessionThread session for the viewer (see that param), so a Form chain like create row → `app.action` with `session: { key: { $chain: \"createdRowId\" } }` → `app.navigate` to the page whose SessionThread uses that id starts the chat in one click.",
|
|
183201
183226
|
params: {
|
|
183202
183227
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
183203
183228
|
type: "object",
|
|
@@ -183214,6 +183239,21 @@ var init_catalog_generated = __esm(() => {
|
|
|
183214
183239
|
},
|
|
183215
183240
|
parentTaskId: {
|
|
183216
183241
|
type: "string"
|
|
183242
|
+
},
|
|
183243
|
+
session: {
|
|
183244
|
+
description: 'Task-kind actions only — start or join the viewer\'s SessionThread session from any chain, e.g. a create form that sends the idea as the chat\'s first message. `key` is the SessionThread `sessionKey` to file the task under: a plain token (^[A-Za-z0-9_-]{1,128}$) or a binding such as { "$chain": "createdRowId" } (in a Form chain, the row an earlier create step just made). The server keys the task as task:app:<appId>:<key>:user:<viewer>, the exact key a SessionThread with that `sessionKey` reads, so the thread shows it as its first message. `scope` "user" (default); "shared" is rejected today. A session step defaults to `followUp: false`. Inside a SessionThread `onDispatch` the thread\'s own session replaces this param.',
|
|
183245
|
+
type: "object",
|
|
183246
|
+
properties: {
|
|
183247
|
+
key: {
|
|
183248
|
+
type: "string"
|
|
183249
|
+
},
|
|
183250
|
+
scope: {
|
|
183251
|
+
type: "string",
|
|
183252
|
+
enum: ["user", "shared"]
|
|
183253
|
+
}
|
|
183254
|
+
},
|
|
183255
|
+
required: ["key"],
|
|
183256
|
+
additionalProperties: false
|
|
183217
183257
|
}
|
|
183218
183258
|
},
|
|
183219
183259
|
required: ["name"],
|
|
@@ -183563,6 +183603,16 @@ function actionParams(step, path, definition, catalog, validateNavigation = fals
|
|
|
183563
183603
|
if (typeof params.name !== "string" || !Object.hasOwn(definition.actions ?? {}, params.name)) {
|
|
183564
183604
|
result.issues.push(issue(appendPath(paramsPath, "name"), `unknown app action "${String(params.name)}"`));
|
|
183565
183605
|
}
|
|
183606
|
+
const session = params.session;
|
|
183607
|
+
if (isPlainObject(session)) {
|
|
183608
|
+
const sessionPath = appendPath(paramsPath, "session");
|
|
183609
|
+
if (typeof session.key === "string" && !SESSION_KEY.test(session.key)) {
|
|
183610
|
+
result.issues.push(issue(appendPath(sessionPath, "key"), "session key must match ^[A-Za-z0-9_-]{1,128}$"));
|
|
183611
|
+
}
|
|
183612
|
+
if (session.scope === "shared") {
|
|
183613
|
+
result.issues.push(issue(appendPath(sessionPath, "scope"), 'scope "shared" is not supported yet'));
|
|
183614
|
+
}
|
|
183615
|
+
}
|
|
183566
183616
|
} else if (step.action === "ui.toast") {
|
|
183567
183617
|
const undo = toastUndoChain(step);
|
|
183568
183618
|
if (Array.isArray(undo)) {
|
|
@@ -184344,6 +184394,9 @@ function validatePage(definition, catalog, target) {
|
|
|
184344
184394
|
if (type === "File" || type === "Files") {
|
|
184345
184395
|
issues.push(...agentFsPropIssues(type, rawElement.props, elementPath));
|
|
184346
184396
|
}
|
|
184397
|
+
if (type === "PageFrame" && typeof rawElement.props.pageId === "string" && rawElement.props.pageId !== "" && !PAGE_FRAME_ID.test(rawElement.props.pageId)) {
|
|
184398
|
+
issues.push(issue(`${elementPath}.props.pageId`, "must be a page id (32 hex characters)"));
|
|
184399
|
+
}
|
|
184347
184400
|
if (type === "Form")
|
|
184348
184401
|
issues.push(...formFileFieldIssues(rawElement.props, elementPath));
|
|
184349
184402
|
if (type === "DateRange")
|
|
@@ -184636,7 +184689,7 @@ function validatePage(definition, catalog, target) {
|
|
|
184636
184689
|
}
|
|
184637
184690
|
return dedupeIssues(issues);
|
|
184638
184691
|
}
|
|
184639
|
-
var ELEMENT_KEYS, UI_STATE_COMPONENTS, SCHEMA_FORM_ID, PLAIN_TOKEN_ID_COMPONENTS, SESSION_KEY, RESERVED_UI_IDS, PROP_ACTION_CHAINS, ITEM_ACTION_CHAINS, ROUTE_PANEL_TYPES, APPROVAL_CHAIN_KEYS, DATA_FIELD_PROPS, CONDITION_KEYS, COMPARISON_KEYS, POPOVER_MAX_FIELDS = 12, LINK_FIELD_PROPS, MAX_ELEMENT_REF_DEPTH = 5, MAX_ELEMENT_REF_EXPANSION_WORK = 100, MAX_ELEMENT_REF_EXPANSION_ISSUES = 100, CHART_MAX_SERIES = 8, CURRENCY_CODE, FILE_ROW_FIELDS;
|
|
184692
|
+
var ELEMENT_KEYS, UI_STATE_COMPONENTS, SCHEMA_FORM_ID, PLAIN_TOKEN_ID_COMPONENTS, SESSION_KEY, RESERVED_UI_IDS, PROP_ACTION_CHAINS, ITEM_ACTION_CHAINS, ROUTE_PANEL_TYPES, APPROVAL_CHAIN_KEYS, DATA_FIELD_PROPS, CONDITION_KEYS, COMPARISON_KEYS, POPOVER_MAX_FIELDS = 12, LINK_FIELD_PROPS, MAX_ELEMENT_REF_DEPTH = 5, MAX_ELEMENT_REF_EXPANSION_WORK = 100, MAX_ELEMENT_REF_EXPANSION_ISSUES = 100, CHART_MAX_SERIES = 8, CURRENCY_CODE, FILE_ROW_FIELDS, PAGE_FRAME_ID;
|
|
184640
184693
|
var init_page_validator = __esm(() => {
|
|
184641
184694
|
init_definition();
|
|
184642
184695
|
ELEMENT_KEYS = new Set([
|
|
@@ -184703,6 +184756,7 @@ var init_page_validator = __esm(() => {
|
|
|
184703
184756
|
};
|
|
184704
184757
|
CURRENCY_CODE = /^[A-Z]{3}$/;
|
|
184705
184758
|
FILE_ROW_FIELDS = new Set(["path", "name", "type", "size", "modifiedAt"]);
|
|
184759
|
+
PAGE_FRAME_ID = /^[a-f0-9]{32}$/i;
|
|
184706
184760
|
});
|
|
184707
184761
|
|
|
184708
184762
|
// src/apps/sync-run-as.ts
|