@desplega.ai/agent-swarm 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/{acp-adapter-v85a2bqy.js → acp-adapter-kedstxx6.js} +6 -6
- package/dist/{actions-zgcxfspj.js → actions-vget6r1k.js} +18 -16
- package/dist/{amp-adapter-jw9xfz42.js → amp-adapter-xeb5mktv.js} +2 -2
- package/dist/{app-4e1s4675.js → app-mqap8t8m.js} +3 -3
- package/dist/{assistant-v238n9dk.js → assistant-h0gv97mv.js} +20 -18
- package/dist/{boot-reembed-p666cw5n.js → boot-reembed-qr8a894z.js} +1 -1
- package/dist/{boot-reembed-w6pm64j4.js → boot-reembed-rj85jjhw.js} +1 -1
- package/dist/{boot-scrub-sweep-jcyjagn3.js → boot-scrub-sweep-eyfvn6v9.js} +3 -3
- package/dist/{boot-seeds-gbedmamp.js → boot-seeds-xs9a8dx1.js} +4 -4
- package/dist/{claude-adapter-q7wspzt8.js → claude-adapter-bm23cye7.js} +5 -5
- package/dist/{claude-managed-adapter-n7ahjyx6.js → claude-managed-adapter-1mwrsm9d.js} +2 -2
- package/dist/{claude-managed-setup-wza784fb.js → claude-managed-setup-gkfgks4j.js} +1 -1
- package/dist/{claude-sdk-session-yf400ptr.js → claude-sdk-session-apb4ypz3.js} +5 -5
- package/dist/cli-02vhhssk.js +848 -0
- package/dist/{cli-4ync7m60.js → cli-0ebey9hg.js} +1 -1
- package/dist/{cli-665j3feb.js → cli-0xk505e8.js} +1 -1
- package/dist/{cli-30m5q8mc.js → cli-1cevz46c.js} +5 -5
- package/dist/{cli-gzvb3d4a.js → cli-1jx0srjt.js} +3 -3
- package/dist/{cli-zj4d6afs.js → cli-1pa3rz69.js} +21 -6
- package/dist/{cli-fhvqt2fp.js → cli-2rwet3r7.js} +1 -1
- package/dist/{cli-azs9bhc5.js → cli-3wjs22x3.js} +2 -2
- package/dist/{cli-dxwh4j32.js → cli-4fhyq711.js} +45 -36
- package/dist/{cli-yv3n83x8.js → cli-5ff2sjyt.js} +1 -1
- package/dist/{cli-6vcyw6v7.js → cli-5s5hx57y.js} +5 -3
- package/dist/{cli-hz64bcnj.js → cli-6ftrrwm1.js} +9 -371
- package/dist/{cli-zes4tsbb.js → cli-8b9wvjps.js} +1 -1
- package/dist/cli-8cxkw1f5.js +382 -0
- package/dist/{cli-4s1kqrqg.js → cli-8rwvksbc.js} +2 -2
- package/dist/{cli-e09hj50q.js → cli-8wkb09q5.js} +11 -11
- package/dist/{cli-yv0vgscc.js → cli-a1esmmee.js} +13 -2
- package/dist/{cli-4hmaheb6.js → cli-avmqhatn.js} +7 -7
- package/dist/{cli-g6p7c2my.js → cli-b80a1100.js} +1 -1
- package/dist/{cli-tr24eeny.js → cli-bfc3k1x5.js} +3 -3
- package/dist/{cli-ka01m5rb.js → cli-bhwa8rzc.js} +13 -11
- package/dist/{cli-8cvvytad.js → cli-bn26xbcs.js} +2 -2
- package/dist/{cli-k28p6xh7.js → cli-c8fwpgqb.js} +1 -1
- package/dist/{cli-rc3r0bnh.js → cli-ccn0eybf.js} +1 -1
- package/dist/{cli-9td5ss65.js → cli-dsgj3e7a.js} +2 -2
- package/dist/{cli-a17tzmn0.js → cli-ecshf504.js} +2 -2
- package/dist/{cli-d43xqzbe.js → cli-eqgfs202.js} +1 -1
- package/dist/{cli-ppapy34w.js → cli-f3nx1h8z.js} +2 -2
- package/dist/{cli-ea7chd26.js → cli-ffbrkh1r.js} +74 -35
- package/dist/{cli-xgn4rwyv.js → cli-kk2r80n5.js} +4 -4
- package/dist/{cli-hn3pftj2.js → cli-kz116kvw.js} +3 -3
- package/dist/{cli-1v8w782f.js → cli-mvg2hf8p.js} +4 -4
- package/dist/{cli-5d1m1qca.js → cli-mz1ezzzh.js} +1 -1
- package/dist/{cli-jhmjwqcg.js → cli-nme7wery.js} +6 -6
- package/dist/{cli-65q70v2v.js → cli-nrrg0fvy.js} +18 -4
- package/dist/{cli-8jtrekpy.js → cli-p1m2b6gc.js} +7 -7
- package/dist/{cli-re4wkbzx.js → cli-rg7ntypm.js} +328 -47
- package/dist/{cli-fp4xbw07.js → cli-rsd7ga7v.js} +10 -8
- package/dist/{cli-etvn5ej2.js → cli-sppc0cmw.js} +1 -1
- package/dist/{cli-qrwp40st.js → cli-tg9ksbn8.js} +1 -1
- package/dist/{cli-6p7ddg72.js → cli-tgvpmnwz.js} +2 -2
- package/dist/{cli-q1812jbw.js → cli-tj4j2ts4.js} +6 -6
- package/dist/{cli-kqypty34.js → cli-ttaz6c7m.js} +2 -2
- package/dist/{cli-w7z94e6c.js → cli-tx00c0h6.js} +4 -2
- package/dist/{cli-4g629sgr.js → cli-wrv09v7q.js} +20 -1
- package/dist/{cli-cby329ny.js → cli-wyrr38xm.js} +2 -2
- package/dist/{cli-y3dvz6ge.js → cli-x1p5dhq2.js} +3 -3
- package/dist/{cli-8qsx817b.js → cli-x719j3vs.js} +219 -629
- package/dist/{cli-9e9kjqsj.js → cli-xfe63zx3.js} +1 -1
- package/dist/{cli-wtg6edvd.js → cli-ywyrffff.js} +1 -1
- package/dist/{cli-0rh20bp3.js → cli-zvze9rbm.js} +1 -1
- package/dist/cli.js +14 -14
- package/dist/{codex-adapter-nhjj2veb.js → codex-adapter-pp2gq8gr.js} +3 -3
- package/dist/{codex-hook-x6tm6y5m.js → codex-hook-qwzccd64.js} +1 -1
- package/dist/{codex-session-runner-6hggrjbx.js → codex-session-runner-0vzn09t8.js} +3 -3
- package/dist/{commands-mrw1ph2w.js → commands-psqhkttb.js} +2 -2
- package/dist/{controller-pt1zam5w.js → controller-t20vz2k8.js} +2 -2
- package/dist/{controllers-connect-ymw5541d.js → controllers-connect-gkxmqw9d.js} +24 -20
- package/dist/{cursor-adapter-cf4zh5x0.js → cursor-adapter-3v542qe5.js} +1 -1
- package/dist/{db-hy80219q.js → db-2xbyenjr.js} +2 -2
- package/dist/{db-hhpy6m4x.js → db-nc1rd869.js} +3 -2
- package/dist/{dispatcher-6pdjtkr1.js → dispatcher-ewceb8ts.js} +17 -15
- package/dist/{dsh-adapter-fbx06re2.js → dsh-adapter-75xwh78t.js} +1 -1
- package/dist/{easter-egg-3d-6hg2r942.js → easter-egg-3d-xsc47jwf.js} +1 -1
- package/dist/{execute-bcqc69a5.js → execute-gzmw1mnw.js} +1 -1
- package/dist/{external-channel-j6vb6ya1.js → external-channel-a5dsmxn4.js} +2 -2
- package/dist/{google-generative-ai-phpmwxvg.js → google-generative-ai-bmq8gkf3.js} +1 -1
- package/dist/{google-vertex-es9ybgdy.js → google-vertex-b1rvp52s.js} +1 -1
- package/dist/{grok-adapter-1193sprp.js → grok-adapter-vj88xr23.js} +7 -7
- package/dist/handlers-zbs90bny.js +39 -0
- package/dist/{heartbeat-h1w1ktce.js → heartbeat-t2m9r3wa.js} +20 -18
- package/dist/{hook-skrbja18.js → hook-8femx1bg.js} +4 -4
- package/dist/{hook-ejja4bpe.js → hook-xa677f8r.js} +5 -5
- package/dist/{http-mzh41mfj.js → http-xpmmq028.js} +868 -253
- package/dist/{index-vjn3wbzf.js → index-8pwc1jc8.js} +17 -15
- package/dist/{index-epr2gnbw.js → index-cdzyfrsp.js} +1 -1
- package/dist/{index-xmmkyx82.js → index-dg2tmj99.js} +17 -15
- package/dist/index-nxa6me0q.js +41 -0
- package/dist/{index-6rmnn89d.js → index-s7ckdajq.js} +9 -9
- package/dist/{index-wgsw9xcz.js → index-syztqdt6.js} +1 -1
- package/dist/{index-x0q2a4f9.js → index-ysd45kgc.js} +1 -1
- package/dist/{index-g909y089.js → index-zgvqzjsw.js} +8 -8
- package/dist/{keepalive-4djvbm2j.js → keepalive-3nr4st3r.js} +3 -3
- package/dist/{lead-61kqp604.js → lead-td8h2sfn.js} +33 -31
- package/dist/{maintenance-f3xhnjsm.js → maintenance-verwpe2c.js} +1 -1
- package/dist/{oauth-refresh-sweep-fpd6x6rw.js → oauth-refresh-sweep-9q2t0y3q.js} +2 -2
- package/dist/{onboard-196tjgyn.js → onboard-aytqedmq.js} +2 -2
- package/dist/{opencode-adapter-eeesgfqk.js → opencode-adapter-f4hryjny.js} +4 -4
- package/dist/{otel-impl-g8fh4c21.js → otel-impl-hckw4wt1.js} +1 -1
- package/dist/{pi-mono-adapter-zasp3ze3.js → pi-mono-adapter-hxby0ce1.js} +6 -6
- package/dist/{pricing-refresh-sdcf5yaz.js → pricing-refresh-5nvme3sm.js} +3 -3
- package/dist/{rbac-roles-bsp5657v.js → rbac-roles-pd8c26m1.js} +5 -3
- package/dist/{rbac-roles-2x4g1wb5.js → rbac-roles-vbpy21mg.js} +2 -2
- package/dist/{render-v2-0pyb39bb.js → render-v2-7nqgvk2q.js} +3 -3
- package/dist/{resume-a86tkj6r.js → resume-b6djcj3c.js} +6 -6
- package/dist/{runtime-ar8310ba.js → runtime-txrxc9za.js} +1 -1
- package/dist/session-access-fc3f9y12.js +25 -0
- package/dist/{setup-ypbzcapd.js → setup-n39szm6b.js} +1 -1
- package/dist/{virtual-modules-wzk6jf3a.js → virtual-modules-wyp2k6z3.js} +2 -2
- package/dist/{work-objects-yjp8de12.js → work-objects-jem2fre0.js} +20 -18
- package/dist/{worker-4ptnn1ge.js → worker-wr6xgfr2.js} +33 -31
- package/openapi.json +844 -110
- package/package.json +1 -1
- package/src/apps/action-caller.ts +6 -0
- package/src/apps/script-types.ts +16 -3
- package/src/be/db/active-sessions.ts +5 -0
- package/src/be/db/session-visibility.ts +29 -0
- package/src/be/db/tasks/read.ts +61 -3
- package/src/be/db/tasks/write.ts +15 -6
- package/src/be/db.ts +92 -33
- package/src/be/events.ts +11 -0
- package/src/be/migrations/230_session_shares.sql +23 -0
- package/src/be/rbac-roles.ts +2 -0
- package/src/be/session-shares.ts +244 -0
- package/src/be/swarm-config-guard.ts +23 -2
- package/src/commands/runner.ts +11 -0
- package/src/http/active-sessions.ts +13 -2
- package/src/http/agents.ts +10 -3
- package/src/http/all-routes.ts +1 -0
- package/src/http/api-keys.ts +3 -1
- package/src/http/approval-requests.ts +2 -1
- package/src/http/apps.ts +36 -11
- package/src/http/config.ts +3 -0
- package/src/http/context.ts +2 -0
- package/src/http/core.ts +39 -2
- package/src/http/events.ts +6 -2
- package/src/http/favorite-owner.ts +1 -1
- package/src/http/fs.ts +38 -3
- package/src/http/index.ts +3 -1
- package/src/http/memory.ts +3 -1
- package/src/http/ranking.ts +367 -0
- package/src/http/realtime.ts +26 -21
- package/src/http/route-def.ts +77 -11
- package/src/http/script-runs.ts +2 -1
- package/src/http/scripts.ts +8 -0
- package/src/http/session-access.ts +179 -0
- package/src/http/session-data.ts +10 -2
- package/src/http/sessions.ts +212 -12
- package/src/http/stats.ts +7 -3
- package/src/http/tasks.ts +83 -7
- package/src/http/used-by.ts +11 -3
- package/src/prompts/session-templates.ts +3 -1
- package/src/providers/amp-adapter.ts +1 -1
- package/src/ranking/telemetry-ranking.ts +147 -0
- package/src/ranking/usage.ts +57 -0
- package/src/rbac/admission.ts +22 -7
- package/src/rbac/legacy-policy.ts +2 -0
- package/src/rbac/permissions.ts +9 -0
- package/src/realtime/auth.ts +69 -0
- package/src/realtime/tickets.ts +4 -1
- package/src/realtime/transport.ts +77 -9
- package/src/slack/blocks.ts +18 -0
- package/src/slack/dm.ts +29 -0
- package/src/telemetry-contract/EVENTS.md +3 -0
- package/src/telemetry-contract/SOURCE.json +37 -4
- package/src/telemetry-contract/catalog.json +69 -0
- package/src/telemetry-contract/ranking/fixtures/expected.json +30 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/bad-category.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/bad-claim.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/blank-description.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/blank-name.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/description-too-long.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/domain-uppercase.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/domain-with-scheme.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/domain-with-www.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/http-source-url.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/missing-description.json +10 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/missing-version.json +10 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/name-not-string.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/name-too-long.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/not-object.json +1 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/null.json +1 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/other-with-subcategory.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/oversize.json +1 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/short-claim.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/subcategory-other-category.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/trailing-data.json +1 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/unknown-field.json +12 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/unsupported-version.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/updated-at-not-date.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/updated-at-offset.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/wrong-case-field.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/valid/category-without-subcategory.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/valid/full.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/valid/minimal.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/valid/padded-text.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/valid/unicode-name.json +11 -0
- package/src/telemetry-contract/ranking/listing.v1.schema.json +61 -0
- package/src/telemetry-contract/ranking/taxonomy.json +8 -0
- package/src/telemetry-contract/ranking-taxonomy.gen.ts +11 -0
- package/src/telemetry-contract/types.gen.ts +708 -1
- package/src/telemetry.ts +26 -2
- package/src/tests/apps-rbac.test.ts +189 -2
- package/src/tests/apps-script-types.test.ts +16 -3
- package/src/tests/check-pr-body.test.ts +23 -0
- package/src/tests/check-ranking-entry.test.ts +146 -0
- package/src/tests/db-extraction-contract.test.ts +1 -0
- package/src/tests/db-task-read-contract.test.ts +1 -0
- package/src/tests/docs-index-footprint.test.js +2 -2
- package/src/tests/org-identity.test.ts +44 -0
- package/src/tests/ranking-listing.test.ts +112 -0
- package/src/tests/ranking-route.test.ts +319 -0
- package/src/tests/ranking-usage.test.ts +50 -0
- package/src/tests/rbac-admission-e2e.test.ts +8 -0
- package/src/tests/rbac-admission.test.ts +38 -0
- package/src/tests/rbac-charact-http.test.ts +4 -3
- package/src/tests/rbac-engine.test.ts +2 -0
- package/src/tests/rbac-roles.test.ts +2 -0
- package/src/tests/realtime-room-surfaces.test.ts +3 -1
- package/src/tests/realtime-session-join-race.test.ts +142 -0
- package/src/tests/realtime-tickets.test.ts +24 -17
- package/src/tests/realtime-transport.test.ts +91 -0
- package/src/tests/session-route-posture.test.ts +639 -0
- package/src/tests/session-sharing-routes.test.ts +282 -0
- package/src/tests/session-sharing.test.ts +526 -0
- package/src/tests/sessions-detail-batch.test.ts +7 -1
- package/src/tests/slack-tool-blocks.test.ts +101 -0
- package/src/tests/slack-update.test.ts +55 -0
- package/src/tests/slack-user-dm.test.ts +177 -0
- package/src/tests/used-by-route.test.ts +10 -0
- package/src/tools/slack-post.ts +18 -12
- package/src/tools/slack-read.ts +13 -1
- package/src/tools/slack-reply.ts +7 -10
- package/src/tools/slack-start-thread.ts +18 -11
- package/src/tools/slack-update.ts +2 -9
- package/src/types.ts +35 -0
- package/src/utils/org-identity.ts +33 -0
- package/templates/skills/apps/SKILL.md +17 -0
- package/templates/skills/apps/content.md +17 -0
- package/dist/handlers-tb3xgjnm.js +0 -37
- package/dist/index-nyfcdpky.js +0 -39
- package/dist/{cli-n5mrsg0f.js → cli-60cgh1rv.js} +3 -3
- /package/dist/{cli-j0v75y13.js → cli-y83zk5sb.js} +0 -0
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
getStaleApprovalRequests2,
|
|
67
67
|
upsertKv2,
|
|
68
68
|
init_db3
|
|
69
|
-
} from "./cli-
|
|
69
|
+
} from "./cli-rg7ntypm.js";
|
|
70
70
|
import {
|
|
71
71
|
poolTaskRunsOnHarness,
|
|
72
72
|
isRuntimePoolWakeable,
|
|
@@ -91,32 +91,34 @@ import {
|
|
|
91
91
|
createRerouteDecisionTask,
|
|
92
92
|
createPoolStarvationDecisionTask,
|
|
93
93
|
canClaim
|
|
94
|
-
} from "./cli-
|
|
94
|
+
} from "./cli-x719j3vs.js";
|
|
95
95
|
import {
|
|
96
|
-
mintToken,
|
|
97
|
-
init_users,
|
|
98
96
|
listRuntimePools2,
|
|
99
97
|
init_db
|
|
100
|
-
} from "./cli-
|
|
98
|
+
} from "./cli-6ftrrwm1.js";
|
|
101
99
|
import {
|
|
102
100
|
createApprovalFollowUpTask
|
|
103
|
-
} from "./cli-
|
|
101
|
+
} from "./cli-tj4j2ts4.js";
|
|
104
102
|
import {
|
|
105
103
|
remediateStalledRuntime
|
|
106
|
-
} from "./cli-
|
|
104
|
+
} from "./cli-rsd7ga7v.js";
|
|
107
105
|
import {
|
|
108
106
|
runSavedScriptAsAgent
|
|
109
|
-
} from "./cli-
|
|
107
|
+
} from "./cli-nrrg0fvy.js";
|
|
108
|
+
import {
|
|
109
|
+
mintToken,
|
|
110
|
+
init_users
|
|
111
|
+
} from "./cli-8cxkw1f5.js";
|
|
110
112
|
import {
|
|
111
113
|
TERMINAL_TASK_STATUSES,
|
|
112
114
|
init_types
|
|
113
|
-
} from "./cli-
|
|
115
|
+
} from "./cli-a1esmmee.js";
|
|
114
116
|
import {
|
|
115
117
|
registerTemplate,
|
|
116
118
|
init_registry,
|
|
117
119
|
resolveTemplate,
|
|
118
120
|
init_resolver
|
|
119
|
-
} from "./cli-
|
|
121
|
+
} from "./cli-tx00c0h6.js";
|
|
120
122
|
import {
|
|
121
123
|
DEFAULT_OPENROUTER_BASE_URL,
|
|
122
124
|
getOpenRouterBaseUrl,
|
|
@@ -125,7 +127,7 @@ import {
|
|
|
125
127
|
import {
|
|
126
128
|
init_package,
|
|
127
129
|
package_default
|
|
128
|
-
} from "./cli-
|
|
130
|
+
} from "./cli-mz1ezzzh.js";
|
|
129
131
|
import {
|
|
130
132
|
isEnvFlagEnabled,
|
|
131
133
|
init_env_flag
|
|
@@ -13206,9 +13206,9 @@ var anthropicMessagesApi = () => lazyApi(() => import("./anthropic-messages-g6pq
|
|
|
13206
13206
|
// node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.lazy.js
|
|
13207
13207
|
var azureOpenAIResponsesApi = () => lazyApi(() => import("./azure-openai-responses-9dbmj346.js"));
|
|
13208
13208
|
// node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.lazy.js
|
|
13209
|
-
var googleGenerativeAIApi = () => lazyApi(() => import("./google-generative-ai-
|
|
13209
|
+
var googleGenerativeAIApi = () => lazyApi(() => import("./google-generative-ai-bmq8gkf3.js"));
|
|
13210
13210
|
// node_modules/@earendil-works/pi-ai/dist/api/google-vertex.lazy.js
|
|
13211
|
-
var googleVertexApi = () => lazyApi(() => import("./google-vertex-
|
|
13211
|
+
var googleVertexApi = () => lazyApi(() => import("./google-vertex-b1rvp52s.js"));
|
|
13212
13212
|
// node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.lazy.js
|
|
13213
13213
|
var mistralConversationsApi = () => lazyApi(() => import("./mistral-conversations-1medfwv7.js"));
|
|
13214
13214
|
// node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.lazy.js
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
} from "./cli-0726awxw.js";
|
|
11
11
|
import {
|
|
12
12
|
summarizeSession
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-sppc0cmw.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveTemplateFromCode,
|
|
16
16
|
resolveTemplateAsync,
|
|
17
17
|
init_resolver,
|
|
18
18
|
init_session_templates
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-tx00c0h6.js";
|
|
20
20
|
import {
|
|
21
21
|
getOpenRouterAttributionHeaders,
|
|
22
22
|
init_openrouter_base_url
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
applyOpenRouterBaseUrlOverride2,
|
|
20
20
|
buildOpenAICompatibleProviderBlock2
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-ccn0eybf.js";
|
|
22
22
|
import {
|
|
23
23
|
fetchInstalledMcpServers
|
|
24
24
|
} from "./cli-bst1vp7e.js";
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
import {
|
|
44
44
|
init_package,
|
|
45
45
|
package_default
|
|
46
|
-
} from "./cli-
|
|
46
|
+
} from "./cli-mz1ezzzh.js";
|
|
47
47
|
import {
|
|
48
48
|
scrubSecrets,
|
|
49
49
|
init_secret_scrubber
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
resolveConfigValueOrThrow,
|
|
9
9
|
resolveHeadersOrThrow,
|
|
10
10
|
FileAuthStorageBackend
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-p1m2b6gc.js";
|
|
12
12
|
import {
|
|
13
13
|
oauthSuccessHtml,
|
|
14
14
|
oauthErrorHtml
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-bn26xbcs.js";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
18
|
} from "./cli-242037k3.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderSteeringDelivery
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-0xk505e8.js";
|
|
4
4
|
import {
|
|
5
5
|
authJsonToCredentialSelection,
|
|
6
6
|
credentialsToAuthJson,
|
|
@@ -14,6 +14,13 @@ import {
|
|
|
14
14
|
skillFromToolArgs,
|
|
15
15
|
createSkillInvokeTracker
|
|
16
16
|
} from "./cli-77cd6gy8.js";
|
|
17
|
+
import {
|
|
18
|
+
isLeadChannelMonitoringEnabled,
|
|
19
|
+
orgIdentityStatus,
|
|
20
|
+
renderMemoriesPrompt,
|
|
21
|
+
isUnknownModelError,
|
|
22
|
+
writeSkillsToFilesystem
|
|
23
|
+
} from "./cli-wrv09v7q.js";
|
|
17
24
|
import {
|
|
18
25
|
isPollTracingEnabled,
|
|
19
26
|
initOtel,
|
|
@@ -23,7 +30,7 @@ import {
|
|
|
23
30
|
injectTraceContext2,
|
|
24
31
|
initialize,
|
|
25
32
|
ensure
|
|
26
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-4fhyq711.js";
|
|
27
34
|
import {
|
|
28
35
|
getContextWindowSize
|
|
29
36
|
} from "./cli-jhp7w1fy.js";
|
|
@@ -44,7 +51,7 @@ import {
|
|
|
44
51
|
canonicalAzureDevOpsRepoUrl,
|
|
45
52
|
parseAzureDevOpsRepoUrl,
|
|
46
53
|
resolveScriptsOnlyMode
|
|
47
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-x719j3vs.js";
|
|
48
55
|
import {
|
|
49
56
|
ACP_TARGET_IDS,
|
|
50
57
|
isAcpTarget
|
|
@@ -52,38 +59,32 @@ import {
|
|
|
52
59
|
import {
|
|
53
60
|
checkAmpCredentials2,
|
|
54
61
|
liveTestAmpCredentials2
|
|
55
|
-
} from "./cli-
|
|
62
|
+
} from "./cli-tgvpmnwz.js";
|
|
56
63
|
import {
|
|
57
64
|
checkClaudeCredentials2
|
|
58
|
-
} from "./cli-
|
|
65
|
+
} from "./cli-kz116kvw.js";
|
|
59
66
|
import {
|
|
60
67
|
checkClaudeManagedCredentials2
|
|
61
|
-
} from "./cli-
|
|
68
|
+
} from "./cli-y83zk5sb.js";
|
|
62
69
|
import {
|
|
63
70
|
codexUserHome,
|
|
64
71
|
checkCodexCredentials2
|
|
65
|
-
} from "./cli-
|
|
72
|
+
} from "./cli-bfc3k1x5.js";
|
|
66
73
|
import {
|
|
67
74
|
checkCursorCredentials2
|
|
68
|
-
} from "./cli-
|
|
75
|
+
} from "./cli-8rwvksbc.js";
|
|
69
76
|
import {
|
|
70
77
|
checkDevinCredentials2
|
|
71
78
|
} from "./cli-zv4vy2b0.js";
|
|
72
79
|
import {
|
|
73
80
|
checkDshCredentials2
|
|
74
|
-
} from "./cli-
|
|
81
|
+
} from "./cli-8b9wvjps.js";
|
|
75
82
|
import {
|
|
76
83
|
checkOpencodeCredentials2
|
|
77
|
-
} from "./cli-
|
|
84
|
+
} from "./cli-ccn0eybf.js";
|
|
78
85
|
import {
|
|
79
86
|
checkGrokCredentials2
|
|
80
|
-
} from "./cli-
|
|
81
|
-
import {
|
|
82
|
-
isLeadChannelMonitoringEnabled,
|
|
83
|
-
renderMemoriesPrompt,
|
|
84
|
-
isUnknownModelError,
|
|
85
|
-
writeSkillsToFilesystem
|
|
86
|
-
} from "./cli-4g629sgr.js";
|
|
87
|
+
} from "./cli-zvze9rbm.js";
|
|
87
88
|
import {
|
|
88
89
|
CODEX_OAUTH_POOL_SLOTS_ENV,
|
|
89
90
|
isCodexOAuthConfigKey,
|
|
@@ -92,7 +93,7 @@ import {
|
|
|
92
93
|
} from "./cli-j4bwnpkm.js";
|
|
93
94
|
import {
|
|
94
95
|
validateJsonSchema
|
|
95
|
-
} from "./cli-
|
|
96
|
+
} from "./cli-nme7wery.js";
|
|
96
97
|
import {
|
|
97
98
|
mapTriggerSurface,
|
|
98
99
|
init_telemetry_context,
|
|
@@ -110,7 +111,7 @@ import {
|
|
|
110
111
|
init_vcs_repo_match,
|
|
111
112
|
isApiDrainingResponse,
|
|
112
113
|
init_api_drain
|
|
113
|
-
} from "./cli-
|
|
114
|
+
} from "./cli-rg7ntypm.js";
|
|
114
115
|
import {
|
|
115
116
|
parseWorkerModelTierOverrides,
|
|
116
117
|
resolveTaskModelSelection,
|
|
@@ -118,7 +119,7 @@ import {
|
|
|
118
119
|
ProviderNameSchema,
|
|
119
120
|
WorkerNudgeSchema,
|
|
120
121
|
init_types
|
|
121
|
-
} from "./cli-
|
|
122
|
+
} from "./cli-a1esmmee.js";
|
|
122
123
|
import {
|
|
123
124
|
generateDefaultClaudeMd2,
|
|
124
125
|
generateDefaultSoulMd2,
|
|
@@ -142,7 +143,7 @@ import {
|
|
|
142
143
|
resolveClaudeMdPath,
|
|
143
144
|
syncProfileFilesToServer,
|
|
144
145
|
init_profile_sync
|
|
145
|
-
} from "./cli-
|
|
146
|
+
} from "./cli-wyrr38xm.js";
|
|
146
147
|
import {
|
|
147
148
|
isSteeringEnabled2,
|
|
148
149
|
init_steering_enabled
|
|
@@ -156,14 +157,14 @@ import {
|
|
|
156
157
|
} from "./cli-yxqag76b.js";
|
|
157
158
|
import {
|
|
158
159
|
init_templates3
|
|
159
|
-
} from "./cli-
|
|
160
|
+
} from "./cli-0ebey9hg.js";
|
|
160
161
|
import {
|
|
161
162
|
interpolate,
|
|
162
163
|
init_template,
|
|
163
164
|
configureHttpResolver,
|
|
164
165
|
resolveTemplateAsync,
|
|
165
166
|
init_resolver
|
|
166
|
-
} from "./cli-
|
|
167
|
+
} from "./cli-tx00c0h6.js";
|
|
167
168
|
import {
|
|
168
169
|
modelFamilyOf,
|
|
169
170
|
windowForModelFamily,
|
|
@@ -190,6 +191,10 @@ import {
|
|
|
190
191
|
getMcpBaseUrl,
|
|
191
192
|
init_constants2
|
|
192
193
|
} from "./cli-w9g4sz81.js";
|
|
194
|
+
import {
|
|
195
|
+
isEnvFlagEnabled,
|
|
196
|
+
init_env_flag
|
|
197
|
+
} from "./cli-0hyhdkdk.js";
|
|
193
198
|
import {
|
|
194
199
|
getApiKey,
|
|
195
200
|
init_api_key
|
|
@@ -241,19 +246,19 @@ async function materializeCodexAuthJson(_slot, creds, deps = {}) {
|
|
|
241
246
|
async function createProviderAdapter(provider) {
|
|
242
247
|
switch (provider) {
|
|
243
248
|
case "claude": {
|
|
244
|
-
const { ClaudeAdapter } = await import("./claude-adapter-
|
|
249
|
+
const { ClaudeAdapter } = await import("./claude-adapter-bm23cye7.js");
|
|
245
250
|
return new ClaudeAdapter;
|
|
246
251
|
}
|
|
247
252
|
case "pi": {
|
|
248
|
-
const { PiMonoAdapter } = await import("./pi-mono-adapter-
|
|
253
|
+
const { PiMonoAdapter } = await import("./pi-mono-adapter-hxby0ce1.js");
|
|
249
254
|
return new PiMonoAdapter;
|
|
250
255
|
}
|
|
251
256
|
case "codex": {
|
|
252
|
-
const { CodexAdapter } = await import("./codex-adapter-
|
|
257
|
+
const { CodexAdapter } = await import("./codex-adapter-pp2gq8gr.js");
|
|
253
258
|
return new CodexAdapter;
|
|
254
259
|
}
|
|
255
260
|
case "claude-managed": {
|
|
256
|
-
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-
|
|
261
|
+
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-1mwrsm9d.js");
|
|
257
262
|
return new ClaudeManagedAdapter;
|
|
258
263
|
}
|
|
259
264
|
case "devin": {
|
|
@@ -261,27 +266,27 @@ async function createProviderAdapter(provider) {
|
|
|
261
266
|
return new DevinAdapter;
|
|
262
267
|
}
|
|
263
268
|
case "opencode": {
|
|
264
|
-
const { OpencodeAdapter } = await import("./opencode-adapter-
|
|
269
|
+
const { OpencodeAdapter } = await import("./opencode-adapter-f4hryjny.js");
|
|
265
270
|
return new OpencodeAdapter;
|
|
266
271
|
}
|
|
267
272
|
case "dsh": {
|
|
268
|
-
const { DshAdapter } = await import("./dsh-adapter-
|
|
273
|
+
const { DshAdapter } = await import("./dsh-adapter-75xwh78t.js");
|
|
269
274
|
return new DshAdapter;
|
|
270
275
|
}
|
|
271
276
|
case "amp": {
|
|
272
|
-
const { AmpAdapter } = await import("./amp-adapter-
|
|
277
|
+
const { AmpAdapter } = await import("./amp-adapter-xeb5mktv.js");
|
|
273
278
|
return new AmpAdapter;
|
|
274
279
|
}
|
|
275
280
|
case "cursor": {
|
|
276
|
-
const { CursorAdapter } = await import("./cursor-adapter-
|
|
281
|
+
const { CursorAdapter } = await import("./cursor-adapter-3v542qe5.js");
|
|
277
282
|
return new CursorAdapter;
|
|
278
283
|
}
|
|
279
284
|
case "grok": {
|
|
280
|
-
const { GrokAdapter } = await import("./grok-adapter-
|
|
285
|
+
const { GrokAdapter } = await import("./grok-adapter-vj88xr23.js");
|
|
281
286
|
return new GrokAdapter;
|
|
282
287
|
}
|
|
283
288
|
case "acp": {
|
|
284
|
-
const { ACPAdapter } = await import("./acp-adapter-
|
|
289
|
+
const { ACPAdapter } = await import("./acp-adapter-kedstxx6.js");
|
|
285
290
|
return new ACPAdapter;
|
|
286
291
|
}
|
|
287
292
|
default:
|
|
@@ -289,6 +294,32 @@ async function createProviderAdapter(provider) {
|
|
|
289
294
|
}
|
|
290
295
|
}
|
|
291
296
|
|
|
297
|
+
// src/ranking/usage.ts
|
|
298
|
+
init_env_flag();
|
|
299
|
+
var tokens = (value) => typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.floor(value) : 0;
|
|
300
|
+
function rankingUsageProps(cost, session, env = process.env) {
|
|
301
|
+
if (!isEnvFlagEnabled("ANONYMIZED_TELEMETRY", true, env))
|
|
302
|
+
return null;
|
|
303
|
+
if (!isEnvFlagEnabled("PUBLIC_RANKING_ENABLED", false, env))
|
|
304
|
+
return null;
|
|
305
|
+
const identity = { SWARM_ORG_NAME: env.SWARM_ORG_NAME, SWARM_ORG_WEBSITE: env.SWARM_ORG_WEBSITE };
|
|
306
|
+
if (!orgIdentityStatus(identity).ok)
|
|
307
|
+
return null;
|
|
308
|
+
const input = tokens(cost.inputTokens);
|
|
309
|
+
const output = tokens(cost.outputTokens);
|
|
310
|
+
const cacheRead = tokens(cost.cacheReadTokens);
|
|
311
|
+
const cacheWrite = tokens(cost.cacheWriteTokens);
|
|
312
|
+
return {
|
|
313
|
+
model: session.model,
|
|
314
|
+
provider: session.provider,
|
|
315
|
+
totalTokens: input + cacheRead + cacheWrite + output,
|
|
316
|
+
inputTokens: input,
|
|
317
|
+
outputTokens: output,
|
|
318
|
+
...cost.cacheReadTokens != null ? { cacheReadTokens: cacheRead } : {},
|
|
319
|
+
...cost.cacheWriteTokens != null ? { cacheWriteTokens: cacheWrite } : {}
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
|
|
292
323
|
// src/realtime/worker-client.ts
|
|
293
324
|
init_types();
|
|
294
325
|
init_api_key();
|
|
@@ -1174,7 +1205,7 @@ var CREDENTIAL_PROVIDER_CHECKERS = {
|
|
|
1174
1205
|
devin: (env) => checkDevinCredentials2(env),
|
|
1175
1206
|
opencode: (env, opts) => checkOpencodeCredentials2(env, opts),
|
|
1176
1207
|
pi: async (env, opts) => {
|
|
1177
|
-
const { checkPiMonoCredentials } = await import("./pi-mono-adapter-
|
|
1208
|
+
const { checkPiMonoCredentials } = await import("./pi-mono-adapter-hxby0ce1.js");
|
|
1178
1209
|
return checkPiMonoCredentials(env, opts);
|
|
1179
1210
|
},
|
|
1180
1211
|
acp: (env) => {
|
|
@@ -1443,7 +1474,7 @@ async function validateProviderCredentials(provider, env = process.env, presence
|
|
|
1443
1474
|
latency_ms: Date.now() - startedAt
|
|
1444
1475
|
};
|
|
1445
1476
|
}
|
|
1446
|
-
const { liveTestCursorKey } = await import("./cursor-adapter-
|
|
1477
|
+
const { liveTestCursorKey } = await import("./cursor-adapter-3v542qe5.js");
|
|
1447
1478
|
const result = await liveTestCursorKey(apiKey);
|
|
1448
1479
|
return result.ok ? { ok: true, latency_ms: Date.now() - startedAt } : { ok: false, error: result.error, latency_ms: Date.now() - startedAt };
|
|
1449
1480
|
}
|
|
@@ -2466,6 +2497,8 @@ var RELOADABLE_ENV_KEYS = new Set([
|
|
|
2466
2497
|
"TEMPLATE_REGISTRY_URL",
|
|
2467
2498
|
"SLACK_DISABLE",
|
|
2468
2499
|
"SWARM_ORG_NAME",
|
|
2500
|
+
"SWARM_ORG_WEBSITE",
|
|
2501
|
+
"PUBLIC_RANKING_ENABLED",
|
|
2469
2502
|
"PI_TOOL_DEFERRAL",
|
|
2470
2503
|
"PI_CODEMODE",
|
|
2471
2504
|
"PI_CODEMODE_MODELS",
|
|
@@ -4642,6 +4675,12 @@ async function spawnProviderProcess(adapter, opts, logDir, isYolo) {
|
|
|
4642
4675
|
numTurns: result.cost.numTurns,
|
|
4643
4676
|
isError: result.cost.isError
|
|
4644
4677
|
}, { userId: opts.requestedByUserId ?? null });
|
|
4678
|
+
const rankingUsage = rankingUsageProps(result.cost, {
|
|
4679
|
+
model: result.cost.model,
|
|
4680
|
+
provider: result.cost.provider ?? opts.harnessProvider
|
|
4681
|
+
});
|
|
4682
|
+
if (rankingUsage)
|
|
4683
|
+
telemetry.ranking("usage", rankingUsage);
|
|
4645
4684
|
}
|
|
4646
4685
|
if (result.cost && realTaskId) {
|
|
4647
4686
|
fetch(`${opts.apiUrl}/api/tasks/${realTaskId}/context`, {
|
|
@@ -7,20 +7,20 @@ import {
|
|
|
7
7
|
tierConfigKey,
|
|
8
8
|
init_model_tier_keys,
|
|
9
9
|
init_db3
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-rg7ntypm.js";
|
|
11
11
|
import {
|
|
12
12
|
ensureRbacSeedsSynced2,
|
|
13
13
|
init_rbac_roles
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-5s5hx57y.js";
|
|
15
15
|
import {
|
|
16
16
|
seedPricingFromModelsDev
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-tg9ksbn8.js";
|
|
18
18
|
import {
|
|
19
19
|
MODEL_TIERS,
|
|
20
20
|
DEFAULT_MODEL_TIER_MAP,
|
|
21
21
|
ProviderNameSchema,
|
|
22
22
|
init_types
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-a1esmmee.js";
|
|
24
24
|
|
|
25
25
|
// src/be/boot-seeds.ts
|
|
26
26
|
init_db3();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runStopHookSessionSummarySubprocess
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-mvg2hf8p.js";
|
|
4
4
|
import {
|
|
5
5
|
CONTEXT_FORMULA,
|
|
6
6
|
getContextWindowSize,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
import {
|
|
48
48
|
withFileLock,
|
|
49
49
|
init_file_lock
|
|
50
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-wyrr38xm.js";
|
|
51
51
|
import {
|
|
52
52
|
CLAUDE_CREDENTIALS_HINT,
|
|
53
53
|
validateClaudeCredentials,
|
|
@@ -1236,7 +1236,7 @@ class ClaudeAdapter2 {
|
|
|
1236
1236
|
if (transport === "sdk" && isClaudeBridgeEffective(sourceEnv)) {
|
|
1237
1237
|
throw new Error("CLAUDE_TRANSPORT=sdk cannot run with an effective Claude Bridge configuration. Select CLI transport or disable the bridge.");
|
|
1238
1238
|
}
|
|
1239
|
-
const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-
|
|
1239
|
+
const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-apb4ypz3.js") : undefined;
|
|
1240
1240
|
claudeSdk?.validateClaudeSdkAdditionalArgs([
|
|
1241
1241
|
...claudeBinaryArgv.slice(1),
|
|
1242
1242
|
...config.additionalArgs ?? []
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
materializeClaudeMd,
|
|
10
10
|
stopClaudeMd
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-c8fwpgqb.js";
|
|
12
12
|
import {
|
|
13
13
|
summarizeSession
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-sppc0cmw.js";
|
|
15
15
|
import {
|
|
16
16
|
guardGhPrBody
|
|
17
17
|
} from "./cli-c5sbmw1v.js";
|
|
@@ -26,11 +26,11 @@ import {
|
|
|
26
26
|
warnProfileFileTooLarge,
|
|
27
27
|
buildIndependentIdentityPayloads,
|
|
28
28
|
init_profile_sync
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-wyrr38xm.js";
|
|
30
30
|
import {
|
|
31
31
|
init_package,
|
|
32
32
|
package_default
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-mz1ezzzh.js";
|
|
34
34
|
import {
|
|
35
35
|
MAX_PROFILE_FILE_LENGTH,
|
|
36
36
|
getMcpBaseUrl,
|
|
@@ -7,7 +7,7 @@ var package_default;
|
|
|
7
7
|
var init_package = __esm(() => {
|
|
8
8
|
package_default = {
|
|
9
9
|
name: "@desplega.ai/agent-swarm",
|
|
10
|
-
version: "2.
|
|
10
|
+
version: "2.4.0",
|
|
11
11
|
description: "agent-swarm.dev — an open-source operating system for AI work: a lead agent breaks goals into tasks, routes them to specialized workers such as Claude Code or Codex, runs each worker in an isolated container, and preserves shared memory, tools, schedules, and review gates so delegated work compounds across sessions.",
|
|
12
12
|
keywords: [
|
|
13
13
|
"agent-swarm.dev",
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
getPendingWaitsByEvent2,
|
|
40
40
|
resolveWaitState2,
|
|
41
41
|
init_db3
|
|
42
|
-
} from "./cli-
|
|
42
|
+
} from "./cli-rg7ntypm.js";
|
|
43
43
|
import {
|
|
44
44
|
BaseExecutor,
|
|
45
45
|
postApprovalCancellationUpdates,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
findEntryNodes,
|
|
51
51
|
resolveValidationPort,
|
|
52
52
|
getSuccessors
|
|
53
|
-
} from "./cli-
|
|
53
|
+
} from "./cli-tj4j2ts4.js";
|
|
54
54
|
import {
|
|
55
55
|
workflowEventBus2,
|
|
56
56
|
init_event_bus
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
import {
|
|
59
59
|
RetryPolicySchema,
|
|
60
60
|
init_types
|
|
61
|
-
} from "./cli-
|
|
61
|
+
} from "./cli-a1esmmee.js";
|
|
62
62
|
import {
|
|
63
63
|
getSlackConfiguration,
|
|
64
64
|
isSlackConfigured,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
import {
|
|
68
68
|
deepInterpolate,
|
|
69
69
|
init_template
|
|
70
|
-
} from "./cli-
|
|
70
|
+
} from "./cli-tx00c0h6.js";
|
|
71
71
|
import {
|
|
72
72
|
init_zod
|
|
73
73
|
} from "./cli-4chz1hye.js";
|
|
@@ -106,7 +106,7 @@ async function notifyAutomationPreflightFailure(preflight) {
|
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
108
|
try {
|
|
109
|
-
const { getSlackApp } = await import("./app-
|
|
109
|
+
const { getSlackApp } = await import("./app-mqap8t8m.js");
|
|
110
110
|
const app = getSlackApp();
|
|
111
111
|
if (!app) {
|
|
112
112
|
console.warn("[Automation Preflight] Slack not available, cannot send notification");
|
|
@@ -1434,7 +1434,7 @@ async function runClaimedStep(def, runId, ctx, node, registry, existingStep, ste
|
|
|
1434
1434
|
if ("async" in result && result.async) {
|
|
1435
1435
|
const waiting = await checkpointStepWaiting(runId, stepId, ctx);
|
|
1436
1436
|
if (waiting && result.waitFor === "workflow.child.finished") {
|
|
1437
|
-
const { resumeFromChildRun } = await import("./resume-
|
|
1437
|
+
const { resumeFromChildRun } = await import("./resume-b6djcj3c.js");
|
|
1438
1438
|
await resumeFromChildRun(stepId, registry);
|
|
1439
1439
|
}
|
|
1440
1440
|
return { outcome: waiting ? "waiting" : "completed", successors: [] };
|
|
@@ -38,14 +38,14 @@ import {
|
|
|
38
38
|
getResolvedConfig2,
|
|
39
39
|
getMcpServerById2,
|
|
40
40
|
init_db3
|
|
41
|
-
} from "./cli-
|
|
41
|
+
} from "./cli-rg7ntypm.js";
|
|
42
42
|
import {
|
|
43
43
|
generateRandomCodeVerifier,
|
|
44
44
|
generateRandomState,
|
|
45
45
|
calculatePKCECodeChallenge,
|
|
46
46
|
oauthAppRowToProviderConfig,
|
|
47
47
|
ensureAuthorizationTokenOrThrow
|
|
48
|
-
} from "./cli-
|
|
48
|
+
} from "./cli-b80a1100.js";
|
|
49
49
|
import {
|
|
50
50
|
detachedProcessGroup,
|
|
51
51
|
registerProcessGroup,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
import {
|
|
58
58
|
defaultAssetKey,
|
|
59
59
|
init_key
|
|
60
|
-
} from "./cli-
|
|
60
|
+
} from "./cli-a1esmmee.js";
|
|
61
61
|
import {
|
|
62
62
|
init_zod
|
|
63
63
|
} from "./cli-4chz1hye.js";
|
|
@@ -183434,6 +183434,13 @@ var APP_TYPES_PREAMBLE = `// ── Swarm Apps: generated per-app types (source:
|
|
|
183434
183434
|
// Rows are the app's declared columns plus the 5 system columns. Query
|
|
183435
183435
|
// overloads narrow only when appId AND query are string literals.
|
|
183436
183436
|
|
|
183437
|
+
export type AppActionCaller = {
|
|
183438
|
+
kind: "user" | "agent" | "operator" | "guest";
|
|
183439
|
+
id: string | null;
|
|
183440
|
+
name?: string;
|
|
183441
|
+
pageId?: string;
|
|
183442
|
+
};
|
|
183443
|
+
|
|
183437
183444
|
export interface SwarmAppQueryResult<Row> {
|
|
183438
183445
|
success: boolean;
|
|
183439
183446
|
status: number;
|
|
@@ -183553,7 +183560,7 @@ function renderQuery(app, namespace, queryName, query, modelInterfaceName) {
|
|
|
183553
183560
|
}): Promise<SwarmAppQueryResult<${namespace}.${modelInterfaceName}>>;`;
|
|
183554
183561
|
}
|
|
183555
183562
|
function renderApp(app, namespace) {
|
|
183556
|
-
const modelNames = new Set(["ActionName"]);
|
|
183563
|
+
const modelNames = new Set(["ActionName", "ActionArgs", "AppActionCaller"]);
|
|
183557
183564
|
const renderedModels = Object.entries(app.definition.models).map(([modelName, model]) => renderModel(modelName, model, modelNames));
|
|
183558
183565
|
const modelInterfaces = new Map(Object.keys(app.definition.models).map((modelName, index) => [
|
|
183559
183566
|
modelName,
|
|
@@ -183571,6 +183578,13 @@ ${renderedModels.map((model) => model.source).join(`
|
|
|
183571
183578
|
|
|
183572
183579
|
/** Declared actions. Invocation is REST-only: POST /api/apps/<id>/actions/<name>. */
|
|
183573
183580
|
export type ActionName = ${actionType};
|
|
183581
|
+
|
|
183582
|
+
/** Script action arguments include server-stamped app and caller context. */
|
|
183583
|
+
export interface ActionArgs {
|
|
183584
|
+
app: { id: ${JSON.stringify(app.id)} };
|
|
183585
|
+
caller: AppActionCaller;
|
|
183586
|
+
[key: string]: unknown;
|
|
183587
|
+
}
|
|
183574
183588
|
}
|
|
183575
183589
|
|
|
183576
183590
|
export interface SwarmSdk {
|