@desplega.ai/agent-swarm 1.123.0 → 1.123.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/{actions-e4c9f0xy.js → actions-3ntn8s3f.js} +6 -6
- package/dist/{app-vmvmj2v3.js → app-pej7g57x.js} +4 -4
- package/dist/{assistant-yn7a792a.js → assistant-pxa36zjn.js} +9 -9
- package/dist/{boot-reembed-xg1r86h2.js → boot-reembed-wdwde4vr.js} +3 -3
- package/dist/{boot-reembed-chxty50a.js → boot-reembed-ybq960bh.js} +4 -4
- package/dist/{boot-scrub-logs-exwddvp5.js → boot-scrub-logs-ndqxg6e3.js} +2 -2
- package/dist/{cli-ngbsk4yx.js → cli-0pmkqg1d.js} +1 -1
- package/dist/{cli-kmm1rwmp.js → cli-1cah98w1.js} +1 -1
- package/dist/{cli-zdp11t8m.js → cli-1kv5sydm.js} +1 -1
- package/dist/{cli-hbbxmhec.js → cli-256kb8p5.js} +4 -4
- package/dist/{cli-822d4bjk.js → cli-2e5t0yjj.js} +7 -7
- package/dist/{cli-c9m59f83.js → cli-333x50bh.js} +1 -1
- package/dist/{cli-5arfywtm.js → cli-5ncdb7ff.js} +19 -9
- package/dist/{cli-mepk1j0t.js → cli-7qvpf14x.js} +2 -2
- package/dist/{cli-zkj6f2sk.js → cli-7rk0bbfr.js} +90 -4
- package/dist/{cli-vz9drmce.js → cli-7yn0n4fp.js} +11 -2
- package/dist/{cli-3tv9z4wx.js → cli-82eq5zf5.js} +1 -1
- package/dist/{cli-byv3720g.js → cli-ca32n52j.js} +2 -2
- package/dist/{cli-n8mf7x4b.js → cli-g4bfr1e7.js} +2 -2
- package/dist/{cli-mkpf4ndf.js → cli-hgkf9zmd.js} +2833 -5545
- package/dist/{cli-9eka6jwv.js → cli-k3yfwe8g.js} +2 -2
- package/dist/{cli-mngsj9fx.js → cli-kqgkfpz7.js} +1 -1
- package/dist/{cli-9hj1adgp.js → cli-mb3gz7qr.js} +1 -1
- package/dist/{cli-8ef5ky75.js → cli-mntyk3cr.js} +1 -1
- package/dist/{cli-we91ywvy.js → cli-pjvdm39a.js} +6 -6
- package/dist/{cli-4509mwm5.js → cli-qrnhnhma.js} +8 -8
- package/dist/{cli-fjf04hpa.js → cli-r07fhvsk.js} +48 -56
- package/dist/{cli-p11rf59d.js → cli-sj43m5z0.js} +3 -3
- package/dist/{cli-np0yhmmk.js → cli-vw0acwe7.js} +3 -3
- package/dist/{cli-8cq4z4x7.js → cli-x2hk4m81.js} +135 -17
- package/dist/{cli-1592nfd6.js → cli-xv09zc8e.js} +1 -1
- package/dist/{cli-h2say6xk.js → cli-zvbxe7pf.js} +3 -1
- package/dist/cli.js +12 -10
- package/dist/{commands-sjk3zfyr.js → commands-5p0erxye.js} +2 -2
- package/dist/{db-2je5agjb.js → db-yp9e9nvs.js} +2 -2
- package/dist/{e2b-2s4psnbf.js → e2b-q345y8s4.js} +0 -4
- package/dist/{handlers-yzv369hf.js → handlers-3hqw1dsr.js} +9 -9
- package/dist/{hook-rfsj2r8x.js → hook-5981d59r.js} +1 -40
- package/dist/{http-v9rr144m.js → http-ek9ctgth.js} +85 -40
- package/dist/{index-smjdc3h9.js → index-1cnvzmh4.js} +7 -7
- package/dist/{index-nr2199m6.js → index-33eb3q08.js} +11 -11
- package/dist/{index-3xtk777g.js → index-8j9b86c9.js} +9 -9
- package/dist/{index-c3tan44f.js → index-chcty242.js} +10 -10
- package/dist/{keepalive-5ds53bjd.js → keepalive-rrvxy1fy.js} +5 -5
- package/dist/{lead-5xhez25b.js → lead-jvw8b413.js} +21 -21
- package/dist/{maintenance-b43d24q6.js → maintenance-3zjnr2wa.js} +4 -4
- package/dist/{oauth-refresh-sweep-qe286vn2.js → oauth-refresh-sweep-vfhvqmby.js} +4 -4
- package/dist/{onboard-c4r3ds3z.js → onboard-kvntqz8h.js} +6 -2
- package/dist/{otel-impl-nv3rjw61.js → otel-impl-61tsn4bx.js} +1 -1
- package/dist/{pi-mono-adapter-2syx1x4d.js → pi-mono-adapter-z6h98fva.js} +4 -38
- package/dist/{pricing-refresh-5ct2wp4k.js → pricing-refresh-jcp6ntbk.js} +4 -4
- package/dist/{rbac-roles-b82cxpxn.js → rbac-roles-r3j4z9vs.js} +4 -4
- package/dist/{rbac-roles-m502w0qv.js → rbac-roles-xcbab18x.js} +3 -3
- package/dist/{seed-pricing-jhjphbf0.js → seed-pricing-bd669a7j.js} +3 -3
- package/dist/{setup-zbaspydq.js → setup-pg03xran.js} +2 -2
- package/dist/{worker-snvhpax5.js → worker-q5n4qwvq.js} +21 -21
- package/openapi.json +124 -1
- package/package.json +3 -1
- package/src/be/models-catalog.ts +156 -0
- package/src/be/modelsdev-cache.ts +14 -1
- package/src/be/pricing-refresh.ts +2 -0
- package/src/be/scripts/typecheck.ts +9 -0
- package/src/commands/onboard/env-generator.ts +12 -0
- package/src/e2b/env.ts +0 -4
- package/src/hooks/hook.ts +0 -67
- package/src/http/all-routes.ts +1 -0
- package/src/http/index.ts +2 -0
- package/src/http/models-catalog.ts +65 -0
- package/src/prompts/base-prompt.ts +8 -7
- package/src/prompts/session-templates.ts +103 -12
- package/src/providers/pi-mono-adapter.ts +12 -2
- package/src/providers/pi-mono-extension.ts +0 -64
- package/src/providers/pricing-sources.md +16 -1
- package/src/scripts-runtime/eval-harness.ts +18 -1
- package/src/scripts-runtime/types/stdlib.d.ts +9 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +9 -0
- package/src/server-user.ts +4 -7
- package/src/slack/blocks.ts +21 -8
- package/src/slack/responses.ts +27 -51
- package/src/slack/watcher.ts +22 -5
- package/src/telemetry.ts +166 -3
- package/src/tests/base-prompt.test.ts +79 -0
- package/src/tests/mcp-tools-user.test.ts +62 -16
- package/src/tests/mcp-tools.test.ts +4 -1
- package/src/tests/memory-edit.test.ts +21 -4
- package/src/tests/model-groups-live-catalog.test.ts +65 -0
- package/src/tests/models-catalog.test.ts +119 -0
- package/src/tests/oauth-access-token-tool.test.ts +71 -1
- package/src/tests/pricing-refresh.test.ts +25 -0
- package/src/tests/prompt-template-session.test.ts +135 -5
- package/src/tests/rbac-charact-skills.test.ts +81 -14
- package/src/tests/script-apis-mcp.test.ts +56 -8
- package/src/tests/scripts-mcp-e2e.test.ts +108 -8
- package/src/tests/slack-blocks.test.ts +2 -1
- package/src/tests/slack-inline-output.test.ts +24 -30
- package/src/tests/slack-watcher.test.ts +42 -0
- package/src/tests/steer-task-tool.test.ts +37 -8
- package/src/tests/steering-transport.test.ts +18 -3
- package/src/tests/swarm-tool-result-gate.test.ts +364 -0
- package/src/tests/task-tools-ctx.test.ts +19 -16
- package/src/tests/task-tools-ownership.test.ts +41 -13
- package/src/tests/telemetry-init.test.ts +379 -2
- package/src/tests/tool-output-agent-id.test.ts +14 -2
- package/src/tools/accept-steer.ts +45 -53
- package/src/tools/cancel-task.ts +31 -41
- package/src/tools/context-diff.ts +19 -63
- package/src/tools/context-history.ts +22 -51
- package/src/tools/create-channel.ts +24 -39
- package/src/tools/create-metric.ts +19 -82
- package/src/tools/create-page.ts +20 -81
- package/src/tools/credential-bindings/tool.ts +125 -246
- package/src/tools/db-query.ts +13 -24
- package/src/tools/delete-channel.ts +25 -71
- package/src/tools/delete-page.ts +27 -75
- package/src/tools/get-metrics.ts +29 -22
- package/src/tools/get-swarm.ts +44 -15
- package/src/tools/get-task-details.ts +150 -32
- package/src/tools/get-tasks.ts +24 -29
- package/src/tools/inject-learning.ts +8 -38
- package/src/tools/join-swarm.ts +45 -47
- package/src/tools/kv/kv-delete.ts +13 -37
- package/src/tools/kv/kv-get.ts +38 -29
- package/src/tools/kv/kv-incr.ts +28 -56
- package/src/tools/kv/kv-list.ts +40 -31
- package/src/tools/kv/kv-set.ts +34 -76
- package/src/tools/list-channels.ts +24 -17
- package/src/tools/list-services.ts +37 -45
- package/src/tools/manage-user.ts +53 -66
- package/src/tools/mcp-servers/mcp-server-create.ts +19 -55
- package/src/tools/mcp-servers/mcp-server-delete.ts +9 -39
- package/src/tools/mcp-servers/mcp-server-get.ts +9 -35
- package/src/tools/mcp-servers/mcp-server-install.ts +13 -60
- package/src/tools/mcp-servers/mcp-server-list.ts +28 -26
- package/src/tools/mcp-servers/mcp-server-uninstall.ts +10 -36
- package/src/tools/mcp-servers/mcp-server-update.ts +13 -57
- package/src/tools/memory-delete.ts +16 -46
- package/src/tools/memory-edit.ts +48 -49
- package/src/tools/memory-get.ts +40 -36
- package/src/tools/memory-rate.ts +14 -44
- package/src/tools/memory-search.ts +46 -52
- package/src/tools/my-agent-info.ts +39 -33
- package/src/tools/oauth-access-token.ts +9 -24
- package/src/tools/poll-task.ts +50 -77
- package/src/tools/post-message.ts +24 -38
- package/src/tools/prompt-templates/delete.ts +16 -48
- package/src/tools/prompt-templates/get.ts +45 -42
- package/src/tools/prompt-templates/list.ts +29 -44
- package/src/tools/prompt-templates/preview.ts +14 -40
- package/src/tools/prompt-templates/set.ts +30 -52
- package/src/tools/read-messages.ts +45 -54
- package/src/tools/register-agentmail-inbox.ts +28 -84
- package/src/tools/register-kapso-number.ts +20 -50
- package/src/tools/register-service.ts +36 -44
- package/src/tools/repos/get-repos.ts +29 -21
- package/src/tools/repos/update-repo.ts +30 -27
- package/src/tools/request-human-input.ts +10 -33
- package/src/tools/resolve-user.ts +59 -16
- package/src/tools/schedules/create-schedule.ts +58 -173
- package/src/tools/schedules/delete-schedule.ts +16 -56
- package/src/tools/schedules/list-schedules.ts +41 -67
- package/src/tools/schedules/patch-schedule.ts +57 -153
- package/src/tools/schedules/run-schedule-now.ts +18 -59
- package/src/tools/schedules/update-schedule.ts +57 -153
- package/src/tools/script-apis.ts +46 -28
- package/src/tools/script-common.ts +129 -34
- package/src/tools/script-connections/tool.ts +59 -154
- package/src/tools/script-query-types.ts +43 -3
- package/src/tools/script-run.ts +40 -1
- package/src/tools/script-runs.ts +69 -1
- package/src/tools/script-search.ts +24 -1
- package/src/tools/script-upsert.ts +17 -2
- package/src/tools/send-task.ts +32 -81
- package/src/tools/skills/skill-create.ts +14 -39
- package/src/tools/skills/skill-delete.ts +14 -42
- package/src/tools/skills/skill-get-file.ts +10 -43
- package/src/tools/skills/skill-get.ts +9 -32
- package/src/tools/skills/skill-install-remote.ts +16 -52
- package/src/tools/skills/skill-install.ts +14 -52
- package/src/tools/skills/skill-list.ts +24 -26
- package/src/tools/skills/skill-publish.ts +18 -54
- package/src/tools/skills/skill-search.ts +21 -18
- package/src/tools/skills/skill-sync-remote.ts +12 -24
- package/src/tools/skills/skill-uninstall.ts +10 -26
- package/src/tools/skills/skill-update.ts +24 -81
- package/src/tools/slack-delete.ts +8 -32
- package/src/tools/slack-download-file.ts +17 -57
- package/src/tools/slack-list-channels.ts +16 -43
- package/src/tools/slack-post.ts +11 -40
- package/src/tools/slack-read.ts +33 -103
- package/src/tools/slack-reply.ts +16 -53
- package/src/tools/slack-start-thread.ts +14 -55
- package/src/tools/slack-update.ts +8 -35
- package/src/tools/slack-upload-file.ts +22 -122
- package/src/tools/steer-task.ts +22 -35
- package/src/tools/store-progress.ts +11 -26
- package/src/tools/swarm-config/delete-config.ts +19 -57
- package/src/tools/swarm-config/get-config.ts +36 -44
- package/src/tools/swarm-config/list-config.ts +36 -44
- package/src/tools/swarm-config/set-config.ts +35 -73
- package/src/tools/swarm-x.ts +20 -26
- package/src/tools/task-action.ts +26 -46
- package/src/tools/task-tool-ctx.ts +5 -13
- package/src/tools/tracker/tracker-link-task.ts +8 -22
- package/src/tools/tracker/tracker-map-agent.ts +8 -22
- package/src/tools/tracker/tracker-status.ts +27 -19
- package/src/tools/tracker/tracker-sync-status.ts +8 -18
- package/src/tools/tracker/tracker-unlink.ts +4 -16
- package/src/tools/unregister-service.ts +19 -59
- package/src/tools/update-profile.ts +60 -100
- package/src/tools/update-service-status.ts +42 -67
- package/src/tools/utils.ts +183 -8
- package/src/tools/whatsapp-message.ts +19 -32
- package/src/tools/workflows/cancel-workflow-run.ts +4 -16
- package/src/tools/workflows/create-workflow.ts +9 -38
- package/src/tools/workflows/delete-workflow.ts +5 -17
- package/src/tools/workflows/get-workflow-run.ts +41 -31
- package/src/tools/workflows/get-workflow.ts +10 -21
- package/src/tools/workflows/list-workflow-runs.ts +19 -17
- package/src/tools/workflows/list-workflows.ts +5 -17
- package/src/tools/workflows/patch-workflow-node.ts +11 -39
- package/src/tools/workflows/patch-workflow.ts +11 -36
- package/src/tools/workflows/retry-workflow-run.ts +4 -16
- package/src/tools/workflows/trigger-workflow.ts +22 -58
- package/src/tools/workflows/update-workflow.ts +10 -42
- package/templates/skills/swarm-scripts/SKILL.md +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-g4bfr1e7.js";
|
|
4
|
+
import"./cli-xv09zc8e.js";
|
|
5
5
|
import {
|
|
6
6
|
createTaskWithSiblingAwareness
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-1cah98w1.js";
|
|
8
8
|
import {
|
|
9
9
|
buildCancelledBlocks,
|
|
10
10
|
getTaskLink
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-5ncdb7ff.js";
|
|
12
12
|
import"./cli-wspgs9bt.js";
|
|
13
13
|
import"./cli-dh55d5fg.js";
|
|
14
14
|
import {
|
|
@@ -19,9 +19,9 @@ import {
|
|
|
19
19
|
init_context_key,
|
|
20
20
|
init_db,
|
|
21
21
|
slackContextKey
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-x2hk4m81.js";
|
|
23
23
|
import"./cli-z2zcxes1.js";
|
|
24
|
-
import"./cli-
|
|
24
|
+
import"./cli-zvbxe7pf.js";
|
|
25
25
|
import"./cli-4j2mrzag.js";
|
|
26
26
|
import"./cli-bw80ck94.js";
|
|
27
27
|
import"./cli-xz9aq0rf.js";
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-r07fhvsk.js";
|
|
7
7
|
import"./cli-rkndnn90.js";
|
|
8
8
|
import"./cli-b0p7rfnd.js";
|
|
9
|
-
import"./cli-
|
|
9
|
+
import"./cli-5ncdb7ff.js";
|
|
10
10
|
import"./cli-wspgs9bt.js";
|
|
11
11
|
import"./cli-dh55d5fg.js";
|
|
12
|
-
import"./cli-
|
|
12
|
+
import"./cli-x2hk4m81.js";
|
|
13
13
|
import"./cli-z2zcxes1.js";
|
|
14
|
-
import"./cli-
|
|
14
|
+
import"./cli-zvbxe7pf.js";
|
|
15
15
|
import"./cli-4j2mrzag.js";
|
|
16
16
|
import"./cli-bw80ck94.js";
|
|
17
17
|
import"./cli-xz9aq0rf.js";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bufferThreadMessage,
|
|
3
3
|
wasEventSeen
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-pjvdm39a.js";
|
|
5
5
|
import {
|
|
6
6
|
hasOtherUserMention
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-82eq5zf5.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveSlackUserId,
|
|
10
10
|
rewriteSlackMentions
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
} from "./cli-g4bfr1e7.js";
|
|
12
|
+
import"./cli-xv09zc8e.js";
|
|
13
13
|
import {
|
|
14
14
|
createTaskWithSiblingAwareness
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-1cah98w1.js";
|
|
16
16
|
import {
|
|
17
17
|
require_dist
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-r07fhvsk.js";
|
|
19
19
|
import"./cli-rkndnn90.js";
|
|
20
20
|
import"./cli-b0p7rfnd.js";
|
|
21
|
-
import"./cli-
|
|
21
|
+
import"./cli-5ncdb7ff.js";
|
|
22
22
|
import"./cli-wspgs9bt.js";
|
|
23
23
|
import"./cli-dh55d5fg.js";
|
|
24
24
|
import {
|
|
@@ -32,9 +32,9 @@ import {
|
|
|
32
32
|
isEnvFlagEnabled,
|
|
33
33
|
resolveTemplate,
|
|
34
34
|
slackContextKey
|
|
35
|
-
} from "./cli-
|
|
35
|
+
} from "./cli-x2hk4m81.js";
|
|
36
36
|
import"./cli-z2zcxes1.js";
|
|
37
|
-
import"./cli-
|
|
37
|
+
import"./cli-zvbxe7pf.js";
|
|
38
38
|
import"./cli-4j2mrzag.js";
|
|
39
39
|
import"./cli-bw80ck94.js";
|
|
40
40
|
import"./cli-xz9aq0rf.js";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
getEmbeddingProvider,
|
|
4
4
|
getMemoryStore,
|
|
5
5
|
init_constants
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-1kv5sydm.js";
|
|
7
7
|
import"./cli-q25ejbyn.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-x2hk4m81.js";
|
|
12
12
|
import"./cli-z2zcxes1.js";
|
|
13
|
-
import"./cli-
|
|
13
|
+
import"./cli-zvbxe7pf.js";
|
|
14
14
|
import"./cli-4j2mrzag.js";
|
|
15
15
|
import"./cli-bw80ck94.js";
|
|
16
16
|
import"./cli-xz9aq0rf.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embedScript,
|
|
3
3
|
embeddingProvider
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-ca32n52j.js";
|
|
5
|
+
import"./cli-1kv5sydm.js";
|
|
6
6
|
import"./cli-q25ejbyn.js";
|
|
7
7
|
import {
|
|
8
8
|
getDb,
|
|
9
9
|
init_db
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-x2hk4m81.js";
|
|
11
11
|
import"./cli-z2zcxes1.js";
|
|
12
|
-
import"./cli-
|
|
12
|
+
import"./cli-zvbxe7pf.js";
|
|
13
13
|
import"./cli-4j2mrzag.js";
|
|
14
14
|
import"./cli-bw80ck94.js";
|
|
15
15
|
import"./cli-xz9aq0rf.js";
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
handleScheduleTrigger,
|
|
5
5
|
runScript,
|
|
6
6
|
startWorkflowExecution
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-2e5t0yjj.js";
|
|
8
8
|
import {
|
|
9
9
|
getScript,
|
|
10
10
|
getScriptApiConnectionDescriptors,
|
|
11
11
|
getScriptMcpConnectionDescriptors
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-sj43m5z0.js";
|
|
13
13
|
import {
|
|
14
14
|
createTaskWithSiblingAwareness
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-1cah98w1.js";
|
|
16
16
|
import {
|
|
17
17
|
getDb,
|
|
18
18
|
getDueScheduledTasks,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
scheduleContextKey,
|
|
25
25
|
telemetry,
|
|
26
26
|
updateScheduledTask
|
|
27
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-x2hk4m81.js";
|
|
28
28
|
import {
|
|
29
29
|
__commonJS,
|
|
30
30
|
__require,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
ensureAuthorizationTokenOrThrow,
|
|
9
9
|
oauthAppRowToProviderConfig
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-333x50bh.js";
|
|
11
11
|
import {
|
|
12
12
|
getScript,
|
|
13
13
|
getScriptApiConnectionDescriptors,
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
getScriptVersion,
|
|
16
16
|
listRelationalCredentialBindings,
|
|
17
17
|
validateScriptImports
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-sj43m5z0.js";
|
|
19
19
|
import {
|
|
20
20
|
getAuthorizationById,
|
|
21
21
|
getOAuthApp,
|
|
22
22
|
getOAuthAppById
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-mb3gz7qr.js";
|
|
24
24
|
import {
|
|
25
25
|
withSiblingAwareness
|
|
26
|
-
} from "./cli-
|
|
26
|
+
} from "./cli-1cah98w1.js";
|
|
27
27
|
import {
|
|
28
28
|
getAppUrl
|
|
29
29
|
} from "./cli-dh55d5fg.js";
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
updateWorkflowRun,
|
|
78
78
|
updateWorkflowRunStep,
|
|
79
79
|
workflowContextKey
|
|
80
|
-
} from "./cli-
|
|
80
|
+
} from "./cli-x2hk4m81.js";
|
|
81
81
|
import {
|
|
82
82
|
init_secret_scrubber,
|
|
83
83
|
isSensitiveKey,
|
|
@@ -2627,7 +2627,7 @@ class HumanInTheLoopExecutor extends BaseExecutor {
|
|
|
2627
2627
|
}
|
|
2628
2628
|
if (notification.channel === "slack") {
|
|
2629
2629
|
try {
|
|
2630
|
-
const { getSlackApp } = await import("./app-
|
|
2630
|
+
const { getSlackApp } = await import("./app-pej7g57x.js");
|
|
2631
2631
|
const slackApp = getSlackApp();
|
|
2632
2632
|
if (!slackApp) {
|
|
2633
2633
|
console.warn("[HITL] Slack not initialized — cannot send notification");
|
|
@@ -2741,7 +2741,7 @@ class NotifyExecutor extends BaseExecutor {
|
|
|
2741
2741
|
}
|
|
2742
2742
|
}
|
|
2743
2743
|
case "slack": {
|
|
2744
|
-
const { getSlackApp } = await import("./app-
|
|
2744
|
+
const { getSlackApp } = await import("./app-pej7g57x.js");
|
|
2745
2745
|
const app = getSlackApp();
|
|
2746
2746
|
if (!app) {
|
|
2747
2747
|
return {
|
|
@@ -185,13 +185,23 @@ var MAX_VISIBLE_CHILDREN = 8;
|
|
|
185
185
|
var MAX_OUTPUT_LENGTH = 120;
|
|
186
186
|
function truncateOutput(text) {
|
|
187
187
|
const sentenceEnd = text.search(/\.\s/);
|
|
188
|
-
const
|
|
189
|
-
if (
|
|
190
|
-
return
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
const sentenceCut = sentenceEnd !== -1 ? sentenceEnd + 1 : text.length;
|
|
189
|
+
if (sentenceCut === text.length && text.length <= MAX_OUTPUT_LENGTH) {
|
|
190
|
+
return { text, truncated: false };
|
|
191
|
+
}
|
|
192
|
+
let cut = Math.min(sentenceCut, MAX_OUTPUT_LENGTH);
|
|
193
|
+
if (cut === MAX_OUTPUT_LENGTH) {
|
|
194
|
+
const boundary = text.lastIndexOf(" ", MAX_OUTPUT_LENGTH);
|
|
195
|
+
cut = boundary >= MAX_OUTPUT_LENGTH / 2 ? boundary : MAX_OUTPUT_LENGTH;
|
|
196
|
+
}
|
|
193
197
|
const omitted = text.length - cut;
|
|
194
|
-
return
|
|
198
|
+
return {
|
|
199
|
+
text: `${text.slice(0, cut).trimEnd()}… (${omitted} more chars; open task for full output)`,
|
|
200
|
+
truncated: true
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
function isTreeOutputTruncated(text) {
|
|
204
|
+
return truncateOutput(text).truncated;
|
|
195
205
|
}
|
|
196
206
|
function renderNodeLine(node) {
|
|
197
207
|
const icon = STATUS_ICON[node.status] ?? "•";
|
|
@@ -212,7 +222,7 @@ function renderChildDetail(node, indent) {
|
|
|
212
222
|
lines.push(`${indent}${node.progress}`);
|
|
213
223
|
}
|
|
214
224
|
if (node.status === "completed" && !node.slackReplySent && node.output) {
|
|
215
|
-
lines.push(`${indent}${truncateOutput(markdownToSlack(node.output))}`);
|
|
225
|
+
lines.push(`${indent}${truncateOutput(markdownToSlack(node.output)).text}`);
|
|
216
226
|
}
|
|
217
227
|
return lines;
|
|
218
228
|
}
|
|
@@ -227,7 +237,7 @@ function renderTree(root) {
|
|
|
227
237
|
lines.push(` Error: ${root.failureReason}`);
|
|
228
238
|
}
|
|
229
239
|
if (root.status === "completed" && !root.slackReplySent && root.output) {
|
|
230
|
-
lines.push(` ${truncateOutput(markdownToSlack(root.output))}`);
|
|
240
|
+
lines.push(` ${truncateOutput(markdownToSlack(root.output)).text}`);
|
|
231
241
|
}
|
|
232
242
|
return lines.join(`
|
|
233
243
|
`);
|
|
@@ -296,4 +306,4 @@ function buildTreeBlocks(roots) {
|
|
|
296
306
|
return blocks;
|
|
297
307
|
}
|
|
298
308
|
|
|
299
|
-
export { getTaskLink, markdownToSlack, splitSlackSectionText, formatAttachmentsBlockForSlack, formatDuration, buildCompletedBlocks, buildCompletedBlockBatches, buildFailedBlocks, buildProgressBlocks, buildCancelledBlocks, buildBufferFlushBlocks, buildTreeBlocks };
|
|
309
|
+
export { getTaskLink, markdownToSlack, splitSlackSectionText, formatAttachmentsBlockForSlack, formatDuration, buildCompletedBlocks, buildCompletedBlockBatches, buildFailedBlocks, buildProgressBlocks, buildCancelledBlocks, buildBufferFlushBlocks, isTreeOutputTruncated, buildTreeBlocks };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDb,
|
|
3
3
|
init_db
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-x2hk4m81.js";
|
|
5
5
|
|
|
6
6
|
// src/be/seed-pricing.ts
|
|
7
7
|
init_db();
|
|
@@ -195,4 +195,4 @@ function seedPricingFromModelsDev(opts) {
|
|
|
195
195
|
return { inserted, modelsdevFound: !!cache };
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
export { normalizeModelKey, buildModelsDevSeedRows, seedPricingFromModelsDev };
|
|
198
|
+
export { loadModelsDevCache, normalizeModelKey, buildModelsDevSeedRows, seedPricingFromModelsDev };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
buildModelsDevSeedRows
|
|
3
|
-
|
|
2
|
+
buildModelsDevSeedRows,
|
|
3
|
+
loadModelsDevCache
|
|
4
|
+
} from "./cli-7qvpf14x.js";
|
|
4
5
|
import {
|
|
5
6
|
createLogEntry,
|
|
6
7
|
getActivePricingRow,
|
|
7
8
|
getDb,
|
|
8
9
|
init_db,
|
|
9
10
|
insertPricingRow
|
|
10
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-x2hk4m81.js";
|
|
11
12
|
import {
|
|
12
13
|
init_secret_scrubber,
|
|
13
14
|
scrubSecrets
|
|
@@ -16,6 +17,90 @@ import {
|
|
|
16
17
|
// src/be/pricing-refresh.ts
|
|
17
18
|
init_secret_scrubber();
|
|
18
19
|
init_db();
|
|
20
|
+
|
|
21
|
+
// src/be/models-catalog.ts
|
|
22
|
+
var CATALOG_PROVIDER_IDS = [
|
|
23
|
+
"openrouter",
|
|
24
|
+
"anthropic",
|
|
25
|
+
"openai",
|
|
26
|
+
"amazon-bedrock"
|
|
27
|
+
];
|
|
28
|
+
var PINNED_MODELSDEV_ENTRIES = [
|
|
29
|
+
"anthropic/claude-mythos-5",
|
|
30
|
+
"anthropic/claude-sonnet-5",
|
|
31
|
+
"amazon-bedrock/anthropic.claude-sonnet-5"
|
|
32
|
+
];
|
|
33
|
+
function slimModel(modelKey, model) {
|
|
34
|
+
const reasoningOptions = Array.isArray(model.reasoning_options) ? model.reasoning_options.filter((o) => typeof o.type === "string").map((o) => ({
|
|
35
|
+
type: o.type,
|
|
36
|
+
...Array.isArray(o.values) ? { values: o.values } : {}
|
|
37
|
+
})) : [];
|
|
38
|
+
return {
|
|
39
|
+
id: model.id ?? modelKey,
|
|
40
|
+
...model.name !== undefined ? { name: model.name } : {},
|
|
41
|
+
...model.cost !== undefined ? { cost: { input: model.cost.input, output: model.cost.output } } : {},
|
|
42
|
+
...model.limit?.context !== undefined ? { limit: { context: model.limit.context } } : {},
|
|
43
|
+
...model.reasoning !== undefined ? { reasoning: model.reasoning } : {},
|
|
44
|
+
...reasoningOptions.length > 0 ? { reasoning_options: reasoningOptions } : {}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function buildModelsCatalog(cache) {
|
|
48
|
+
const catalog = {};
|
|
49
|
+
for (const providerId of CATALOG_PROVIDER_IDS) {
|
|
50
|
+
const provider = cache[providerId];
|
|
51
|
+
if (!provider?.models)
|
|
52
|
+
continue;
|
|
53
|
+
const models = {};
|
|
54
|
+
for (const [modelKey, model] of Object.entries(provider.models)) {
|
|
55
|
+
models[modelKey] = slimModel(modelKey, model);
|
|
56
|
+
}
|
|
57
|
+
catalog[providerId] = {
|
|
58
|
+
id: provider.id ?? providerId,
|
|
59
|
+
...provider.name !== undefined ? { name: provider.name } : {},
|
|
60
|
+
models
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return catalog;
|
|
64
|
+
}
|
|
65
|
+
var liveCatalog = null;
|
|
66
|
+
var liveUpdatedAt = null;
|
|
67
|
+
var snapshotCatalog;
|
|
68
|
+
function bundledSnapshotCatalog() {
|
|
69
|
+
if (snapshotCatalog === undefined) {
|
|
70
|
+
const raw = loadModelsDevCache();
|
|
71
|
+
snapshotCatalog = raw ? buildModelsCatalog(raw) : null;
|
|
72
|
+
}
|
|
73
|
+
return snapshotCatalog ?? {};
|
|
74
|
+
}
|
|
75
|
+
function mergePinnedEntries(catalog) {
|
|
76
|
+
const snapshot = bundledSnapshotCatalog();
|
|
77
|
+
for (const entryPath of PINNED_MODELSDEV_ENTRIES) {
|
|
78
|
+
const slashIndex = entryPath.indexOf("/");
|
|
79
|
+
const providerId = entryPath.slice(0, slashIndex);
|
|
80
|
+
const modelId = entryPath.slice(slashIndex + 1);
|
|
81
|
+
if (catalog[providerId]?.models[modelId])
|
|
82
|
+
continue;
|
|
83
|
+
const pinned = snapshot[providerId]?.models[modelId];
|
|
84
|
+
if (!pinned)
|
|
85
|
+
continue;
|
|
86
|
+
catalog[providerId] ??= { id: providerId, models: {} };
|
|
87
|
+
catalog[providerId].models[modelId] = pinned;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function updateLiveModelsCatalog(cache, now = Date.now()) {
|
|
91
|
+
const catalog = buildModelsCatalog(cache);
|
|
92
|
+
mergePinnedEntries(catalog);
|
|
93
|
+
liveCatalog = catalog;
|
|
94
|
+
liveUpdatedAt = now;
|
|
95
|
+
}
|
|
96
|
+
function getModelsCatalog() {
|
|
97
|
+
if (liveCatalog) {
|
|
98
|
+
return { source: "live", updatedAt: liveUpdatedAt, providers: liveCatalog };
|
|
99
|
+
}
|
|
100
|
+
return { source: "snapshot", updatedAt: null, providers: bundledSnapshotCatalog() };
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// src/be/pricing-refresh.ts
|
|
19
104
|
var MODELSDEV_API_URL = "https://models.dev/api.json";
|
|
20
105
|
var PRICING_REFRESH_INTERVAL_MS = 12 * 60 * 60 * 1000;
|
|
21
106
|
var lastETag = null;
|
|
@@ -116,6 +201,7 @@ async function refreshPricingFromModelsDev(opts = {}) {
|
|
|
116
201
|
}
|
|
117
202
|
const cache = await response.json();
|
|
118
203
|
const etag = response.headers.get("etag");
|
|
204
|
+
updateLiveModelsCatalog(cache, now);
|
|
119
205
|
const rows = buildModelsDevSeedRows(cache);
|
|
120
206
|
const { inserted, unchanged } = insertChangedPricingRows(rows, now);
|
|
121
207
|
const pruned = prunePricingHistory(2);
|
|
@@ -151,4 +237,4 @@ function startPricingRefreshLoop() {
|
|
|
151
237
|
interval.unref?.();
|
|
152
238
|
}
|
|
153
239
|
|
|
154
|
-
export { PRICING_REFRESH_INTERVAL_MS, refreshPricingFromModelsDev, startPricingRefreshLoop };
|
|
240
|
+
export { getModelsCatalog, PRICING_REFRESH_INTERVAL_MS, refreshPricingFromModelsDev, startPricingRefreshLoop };
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getScriptApiTypes,
|
|
3
3
|
getScriptMcpTypes,
|
|
4
4
|
require_typescript
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-sj43m5z0.js";
|
|
6
6
|
import {
|
|
7
7
|
deleteSwarmConfigByKey,
|
|
8
8
|
getAgentById,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getSwarmConfigs,
|
|
12
12
|
init_db,
|
|
13
13
|
upsertSwarmConfig
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-x2hk4m81.js";
|
|
15
15
|
import {
|
|
16
16
|
init_secret_scrubber,
|
|
17
17
|
scrubSecrets
|
|
@@ -646,6 +646,15 @@ export interface ScriptContext {
|
|
|
646
646
|
logger: ScriptLogger;
|
|
647
647
|
}
|
|
648
648
|
|
|
649
|
+
/**
|
|
650
|
+
* A swarm script's default export. \`args\` comes FIRST, \`ctx\` second — never swap them.
|
|
651
|
+
*
|
|
652
|
+
* @example
|
|
653
|
+
* export default async function (args: { name: string }, ctx: ScriptContext) {
|
|
654
|
+
* await ctx.logger.log(\`hello \${args.name}\`);
|
|
655
|
+
* return { ok: true };
|
|
656
|
+
* }
|
|
657
|
+
*/
|
|
649
658
|
// biome-ignore lint/suspicious/noExplicitAny: scripts may narrow their args type at the entrypoint.
|
|
650
659
|
export type ScriptMain = (args: any, ctx: ScriptContext) => unknown | Promise<unknown>;
|
|
651
660
|
`;
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
getEmbeddingProvider,
|
|
5
5
|
init_embedding,
|
|
6
6
|
serializeEmbedding
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-1kv5sydm.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-x2hk4m81.js";
|
|
12
12
|
import {
|
|
13
13
|
init_secret_scrubber,
|
|
14
14
|
scrubSecrets
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
linkIdentity,
|
|
5
5
|
recordUnmappedIdentity,
|
|
6
6
|
resolveIdentity
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-xv09zc8e.js";
|
|
8
8
|
import {
|
|
9
9
|
getKv,
|
|
10
10
|
init_db,
|
|
11
11
|
upsertKv
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-x2hk4m81.js";
|
|
13
13
|
|
|
14
14
|
// src/slack/enrich.ts
|
|
15
15
|
init_db();
|