@desplega.ai/agent-swarm 1.130.0 → 1.131.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/README.md +1 -1
- package/dist/{actions-73ee723n.js → actions-jgcy477k.js} +7 -7
- package/dist/{anthropic-messages-3xgme8my.js → anthropic-messages-rjmd2e7n.js} +5 -5
- package/dist/{app-hz5c2xay.js → app-5da78bd4.js} +4 -4
- package/dist/{assistant-08mr16yp.js → assistant-f2vkk1hj.js} +9 -9
- package/dist/{azure-openai-responses-xa4sh9f6.js → azure-openai-responses-c0yjmbfd.js} +8 -5
- package/dist/{boot-reembed-5bgan3cd.js → boot-reembed-q7mp8hcr.js} +4 -4
- package/dist/{boot-reembed-z7ykyeq8.js → boot-reembed-xmw8wcx6.js} +5 -5
- package/dist/{boot-scrub-logs-b2rjk8mv.js → boot-scrub-logs-dsqrv79n.js} +3 -3
- package/dist/{claude-adapter-qr0k17km.js → claude-adapter-q6x7yspx.js} +6 -6
- package/dist/{claude-managed-adapter-gv19tdew.js → claude-managed-adapter-wsg37bt8.js} +1 -1
- package/dist/{cli-vr2f46zj.js → cli-114fvtmj.js} +1 -1
- package/dist/{cli-mhr8tq3v.js → cli-2f07m0xr.js} +1 -1
- package/dist/{cli-mgerp0vs.js → cli-2rk0cx7s.js} +2 -2
- package/dist/{cli-tfw3c0y1.js → cli-3ty0t082.js} +2 -2
- package/dist/{cli-fs153s3x.js → cli-4rkfg1wx.js} +3 -3
- package/dist/{cli-s18zzkfp.js → cli-50vbt00w.js} +44 -7
- package/dist/{cli-vgexpfsr.js → cli-57khth04.js} +6 -3
- package/dist/{cli-n9yxcnvk.js → cli-5n6e5yfn.js} +29 -7
- package/dist/{cli-q8zwffx0.js → cli-6dp3ydxa.js} +158 -39
- package/dist/{cli-r62me33w.js → cli-6dpytdr2.js} +2 -2
- package/dist/{cli-ch7t5v7n.js → cli-6map995v.js} +9 -4
- package/dist/{cli-326083vb.js → cli-6pcz9h15.js} +14 -14
- package/dist/{cli-h3e66g5b.js → cli-793jvbsh.js} +1 -1
- package/dist/{cli-yj7z99vp.js → cli-7dm2zqy2.js} +2 -2
- package/dist/{cli-t5tsq67k.js → cli-9dr5qzc0.js} +39 -4
- package/dist/{cli-m8fs5ttq.js → cli-aca5pz9f.js} +1 -1
- package/dist/{cli-w10fkrf1.js → cli-akdvwc9v.js} +354 -115
- package/dist/{cli-hntzdchd.js → cli-bqw0mt1n.js} +1 -1
- package/dist/{cli-7v5dhmc8.js → cli-ccf9vy7q.js} +6 -6
- package/dist/{cli-6nh2qxvh.js → cli-darcwax3.js} +1 -1
- package/dist/{cli-xg2eezyv.js → cli-f1am9szv.js} +1 -1
- package/dist/{cli-1px8pn1s.js → cli-g1re8r05.js} +2 -2
- package/dist/{cli-z9q7pb38.js → cli-g74vpjp2.js} +4 -4
- package/dist/{cli-brebbsen.js → cli-gecy3z2s.js} +20 -8
- package/dist/{cli-epsvdckx.js → cli-gm9cbhbq.js} +20 -10
- package/dist/{cli-xdrmxvd4.js → cli-jbcva0xj.js} +55 -11
- package/dist/{cli-haanc4qd.js → cli-jevgrb4w.js} +22 -22
- package/dist/{cli-e5p3es48.js → cli-kd1ck4rx.js} +1 -1
- package/dist/{cli-1mj7yz1r.js → cli-nrkkknat.js} +1 -1
- package/dist/{cli-2pa5w9b6.js → cli-pxfxkx5m.js} +1 -1
- package/dist/{cli-qcsjdppx.js → cli-rgrfzg8z.js} +7 -7
- package/dist/{cli-mf009e0j.js → cli-se2p6rkb.js} +1 -1
- package/dist/{cli-tp519bjz.js → cli-sy7jk3tx.js} +2 -2
- package/dist/{cli-qbb2ten8.js → cli-t8d349cy.js} +2 -2
- package/dist/{cli-s21zzx4b.js → cli-w2wxd56v.js} +448 -184
- package/dist/{cli-qmdnhpej.js → cli-wz9115x0.js} +17 -7
- package/dist/{cli-4n4mdv21.js → cli-xpxde7rm.js} +7 -3
- package/dist/{cli-dakxgk70.js → cli-ycrnynpw.js} +4 -4
- package/dist/{cli-73bvdyxr.js → cli-ygrbmjja.js} +6 -6
- package/dist/cli.js +22 -22
- package/dist/{codex-adapter-6pc50x9q.js → codex-adapter-htjkn22b.js} +4 -4
- package/dist/{codex-hook-amndawyb.js → codex-hook-hq54t9ft.js} +2 -2
- package/dist/{codex-session-runner-tpg8hyj7.js → codex-session-runner-wjfc7smz.js} +4 -4
- package/dist/{commands-yfpwt11g.js → commands-xhrfwqsk.js} +3 -3
- package/dist/{db-jn499nmp.js → db-anvwb22f.js} +3 -3
- package/dist/{google-generative-ai-txgg2q58.js → google-generative-ai-hysrd8qx.js} +7 -5
- package/dist/{google-vertex-t663s1c3.js → google-vertex-p5arrga0.js} +7 -5
- package/dist/{handlers-eev4nng0.js → handlers-b9kbc621.js} +9 -9
- package/dist/{hook-9fkwkf3m.js → hook-cgk4wxmx.js} +5 -5
- package/dist/{hook-sn7pj75w.js → hook-xkvn6c5h.js} +4 -4
- package/dist/{http-xdbbtmhx.js → http-9xh6ta4r.js} +324 -82
- package/dist/{index-9vnkprkh.js → index-25wjsdv2.js} +10 -10
- package/dist/{index-5fdsemf0.js → index-eaxyqcmj.js} +155 -37
- package/dist/{index-fnack5vh.js → index-vg4snay4.js} +11 -11
- package/dist/{index-c0qedjh6.js → index-ywds4812.js} +9 -9
- package/dist/{keepalive-fc7a2hw9.js → keepalive-vc7s2aa6.js} +5 -5
- package/dist/{lead-1fva34y9.js → lead-r2yqfmx7.js} +29 -29
- package/dist/{maintenance-0rdb12vf.js → maintenance-mw70k468.js} +5 -5
- package/dist/{mistral-conversations-4swenhmf.js → mistral-conversations-81fwav0j.js} +2 -2
- package/dist/{oauth-refresh-sweep-f9rptqbt.js → oauth-refresh-sweep-yecgjpk4.js} +4 -4
- package/dist/{onboard-9zn0fx2m.js → onboard-xj0f73f9.js} +2 -2
- package/dist/{openai-codex-responses-xetseqvt.js → openai-codex-responses-5g27pd6f.js} +43 -23
- package/dist/{openai-completions-5r2g5axa.js → openai-completions-3vkmfz2a.js} +55 -11
- package/dist/{openai-responses-ce67hd23.js → openai-responses-dg4t7j7a.js} +8 -5
- package/dist/{openrouter-images-pzfp22jb.js → openrouter-images-g3gm8931.js} +1 -1
- package/dist/{otel-impl-thnttmbn.js → otel-impl-nxg0n0b3.js} +1 -1
- package/dist/{pi-mono-adapter-bpfrn6d7.js → pi-mono-adapter-4g5kby31.js} +17114 -7514
- package/dist/{pricing-refresh-n0ve0kh6.js → pricing-refresh-2cn6effr.js} +5 -5
- package/dist/{rbac-roles-w45bhahg.js → rbac-roles-1hcxdtg7.js} +4 -4
- package/dist/{rbac-roles-bbwb4wrm.js → rbac-roles-vynday5g.js} +5 -5
- package/dist/{render-v2-d675cp9r.js → render-v2-tc0bh8kk.js} +4 -4
- package/dist/{seed-pricing-47q77nw4.js → seed-pricing-8kceb43f.js} +4 -4
- package/dist/{setup-3vnv2m43.js → setup-46xtgq3c.js} +2 -2
- package/dist/{worker-7shsr8hk.js → worker-qrbz6hmv.js} +29 -29
- package/openapi.json +342 -10
- package/package.json +6 -6
- package/src/apps/store.ts +13 -4
- package/src/assets/key.ts +8 -1
- package/src/be/asset-key-audit.ts +3 -1
- package/src/be/db-queries/mcp-oauth.ts +26 -0
- package/src/be/db.ts +42 -1
- package/src/be/migrations/129_asset_keys_apps_scripts.sql +161 -0
- package/src/be/migrations/130_scratch_script_retention_grace.sql +6 -0
- package/src/be/scripts/db.ts +48 -3
- package/src/be/scripts/retention.ts +164 -0
- package/src/be/scripts/run-saved.ts +16 -1
- package/src/be/seed-skills/index.ts +7 -0
- package/src/http/assets.ts +120 -29
- package/src/http/index.ts +5 -0
- package/src/http/mcp-oauth.ts +69 -1
- package/src/http/scripts.ts +21 -3
- package/src/http/users.ts +45 -0
- package/src/http/x.ts +14 -0
- package/src/oauth/ensure-mcp-token.ts +7 -1
- package/src/oauth/mcp-wrapper.ts +247 -24
- package/src/providers/claude-managed-models.ts +34 -10
- package/src/providers/pi-mono-adapter.ts +1 -1
- package/src/tests/asset-key-api.test.ts +48 -2
- package/src/tests/asset-key-invariants.test.ts +92 -0
- package/src/tests/asset-key-migration.test.ts +174 -8
- package/src/tests/asset-key-normalization.test.ts +2 -0
- package/src/tests/claude-managed-adapter.test.ts +38 -7
- package/src/tests/mcp-oauth-dcr-reuse.test.ts +95 -0
- package/src/tests/mcp-oauth-ensure-token.test.ts +23 -0
- package/src/tests/mcp-oauth-manual-client.test.ts +135 -2
- package/src/tests/mcp-oauth-wrapper.test.ts +380 -0
- package/src/tests/rbac-admission-e2e.test.ts +68 -0
- package/src/tests/sandboxed-process.test.ts +45 -0
- package/src/tests/script-connections.test.ts +4 -0
- package/src/tests/scripts-external-api.test.ts +8 -3
- package/src/tests/scripts-http.test.ts +12 -0
- package/src/tests/scripts-retention.test.ts +384 -0
- package/src/tests/whoami-route.test.ts +127 -0
- package/src/tests/workflow-engine-v2.test.ts +80 -7
- package/src/tests/workflow-swarm-script.test.ts +118 -5
- package/src/tools/workflows/create-workflow.ts +4 -1
- package/src/types.ts +18 -5
- package/src/utils/sandboxed-process.ts +40 -14
- package/src/utils/template.ts +8 -1
- package/src/workflows/engine.ts +27 -4
- package/src/workflows/executors/swarm-script.ts +52 -1
- package/src/workflows/retry-poller.ts +19 -2
- package/templates/schedules/daily-compounding-reflection/content.md +12 -3
- package/templates/skills/asset-namespaces/content.md +2 -2
- package/templates/skills/scheduled-task-resilience/SKILL.md +102 -0
- package/templates/skills/scheduled-task-resilience/config.json +14 -0
- package/templates/skills/scheduled-task-resilience/content.md +97 -0
package/README.md
CHANGED
|
@@ -130,7 +130,7 @@ Check [our templates](https://templates.agent-swarm.dev) for a quick start.
|
|
|
130
130
|
- **Scheduled & recurring tasks** — cron-based automation for standing work, with schedules that can target agent tasks, workflows, or catalog scripts. [Scheduling →](https://docs.agent-swarm.dev/docs/concepts/scheduling)
|
|
131
131
|
- **Mid-run task steering** — add context at the next turn boundary, request an immediate interrupt where the harness supports it, or degrade safely to a follow-up task. [Task steering →](https://docs.agent-swarm.dev/docs/guides/task-steering)
|
|
132
132
|
- **Operator configuration UI** — tune non-secret feature flags, limits, integration toggles, and runtime defaults from Settings → Configuration, with source and restart-required indicators. [Configuration →](https://docs.agent-swarm.dev/docs/ui/configuration)
|
|
133
|
-
- **Asset namespaces** — group tasks, workflows, schedules, pages, and mapped files under canonical shared or personal keys, with inheritance, subtree filtering, audited moves, and cross-entity discovery. [Asset namespaces →](https://docs.agent-swarm.dev/docs/guides/asset-namespaces)
|
|
133
|
+
- **Asset namespaces** — group tasks, workflows, schedules, pages, apps, scripts, and mapped files under canonical shared or personal keys, with inheritance, subtree filtering, audited moves, and cross-entity discovery. [Asset namespaces →](https://docs.agent-swarm.dev/docs/guides/asset-namespaces)
|
|
134
134
|
- **Persistent shared files via agent-fs** — co-deploy agent-fs for shared task attachments, previews, and search; late provisioning or config reloads activate the provider without an API restart, and tenant-authenticated control planes can invite shared-org members without receiving the bootstrap key. [Co-deployment guide →](https://docs.agent-swarm.dev/docs/guides/agent-fs-co-deployment)
|
|
135
135
|
- **Durable script workflows** — launch background script runs, inspect their journals, and track them from the dashboard when a one-shot `script-run` is too small. [Guide →](https://docs.agent-swarm.dev/docs/guides/script-workflow-runs)
|
|
136
136
|
- **Scripts-only MCP mode (code-mode)** — reduce the external MCP surface to eight script tools while retaining the full swarm SDK through `script-run`, cutting tool-schema context for capable coordinator models. [Guide →](https://docs.agent-swarm.dev/docs/guides/scripts-only-mode)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-7dm2zqy2.js";
|
|
4
|
+
import"./cli-aca5pz9f.js";
|
|
5
5
|
import {
|
|
6
6
|
createTaskWithSiblingAwareness
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-2f07m0xr.js";
|
|
8
8
|
import {
|
|
9
9
|
buildCancelledBlocks,
|
|
10
10
|
ensureSlackThreadTree,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getAgentEmoji,
|
|
13
13
|
getTaskLink,
|
|
14
14
|
isSlackRenderV2Enabled
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-rgrfzg8z.js";
|
|
16
16
|
import"./cli-k9qkf1hw.js";
|
|
17
17
|
import"./cli-b0p7rfnd.js";
|
|
18
18
|
import"./cli-t930g0xh.js";
|
|
@@ -24,13 +24,13 @@ import {
|
|
|
24
24
|
init_context_key,
|
|
25
25
|
init_db,
|
|
26
26
|
slackContextKey
|
|
27
|
-
} from "./cli-
|
|
28
|
-
import"./cli-
|
|
27
|
+
} from "./cli-50vbt00w.js";
|
|
28
|
+
import"./cli-xpxde7rm.js";
|
|
29
29
|
import"./cli-x23me2mg.js";
|
|
30
30
|
import"./cli-z2zcxes1.js";
|
|
31
31
|
import"./cli-zsspvvm2.js";
|
|
32
32
|
import"./cli-4j2mrzag.js";
|
|
33
|
-
import"./cli-
|
|
33
|
+
import"./cli-ccf9vy7q.js";
|
|
34
34
|
import"./cli-5dsbcjjw.js";
|
|
35
35
|
import"./cli-e15jhafb.js";
|
|
36
36
|
import"./cli-3fj60etf.js";
|
|
@@ -24,13 +24,13 @@ import {
|
|
|
24
24
|
clampMaxTokensToContext,
|
|
25
25
|
resolveJsonSchemaStrictSampling,
|
|
26
26
|
transformMessages
|
|
27
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-57khth04.js";
|
|
28
28
|
import {
|
|
29
29
|
sanitizeSurrogates
|
|
30
30
|
} from "./cli-y2apkfe2.js";
|
|
31
31
|
import {
|
|
32
32
|
calculateCost
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-akdvwc9v.js";
|
|
34
34
|
import {
|
|
35
35
|
AssistantMessageEventStream
|
|
36
36
|
} from "./cli-8wrympd7.js";
|
|
@@ -5189,7 +5189,7 @@ var stream = (model, context, options) => {
|
|
|
5189
5189
|
if (event.content_block.type === "text") {
|
|
5190
5190
|
const block = {
|
|
5191
5191
|
type: "text",
|
|
5192
|
-
text: "",
|
|
5192
|
+
text: event.content_block.text ?? "",
|
|
5193
5193
|
index: event.index
|
|
5194
5194
|
};
|
|
5195
5195
|
output.content.push(block);
|
|
@@ -5197,8 +5197,8 @@ var stream = (model, context, options) => {
|
|
|
5197
5197
|
} else if (event.content_block.type === "thinking") {
|
|
5198
5198
|
const block = {
|
|
5199
5199
|
type: "thinking",
|
|
5200
|
-
thinking: "",
|
|
5201
|
-
thinkingSignature: "",
|
|
5200
|
+
thinking: event.content_block.thinking ?? "",
|
|
5201
|
+
thinkingSignature: event.content_block.signature ?? "",
|
|
5202
5202
|
index: event.index
|
|
5203
5203
|
};
|
|
5204
5204
|
output.content.push(block);
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-rgrfzg8z.js";
|
|
7
7
|
import"./cli-k9qkf1hw.js";
|
|
8
8
|
import"./cli-b0p7rfnd.js";
|
|
9
9
|
import"./cli-t930g0xh.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
10
|
+
import"./cli-50vbt00w.js";
|
|
11
|
+
import"./cli-xpxde7rm.js";
|
|
12
12
|
import"./cli-x23me2mg.js";
|
|
13
13
|
import"./cli-z2zcxes1.js";
|
|
14
14
|
import"./cli-zsspvvm2.js";
|
|
15
15
|
import"./cli-4j2mrzag.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-ccf9vy7q.js";
|
|
17
17
|
import"./cli-5dsbcjjw.js";
|
|
18
18
|
import"./cli-e15jhafb.js";
|
|
19
19
|
import"./cli-3fj60etf.js";
|
|
@@ -2,24 +2,24 @@ import {
|
|
|
2
2
|
bufferThreadMessage,
|
|
3
3
|
getBufferMessageCount,
|
|
4
4
|
wasEventSeen
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-ygrbmjja.js";
|
|
6
6
|
import {
|
|
7
7
|
hasOtherUserMention
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-6dpytdr2.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveSlackUserId,
|
|
11
11
|
rewriteSlackMentions
|
|
12
|
-
} from "./cli-
|
|
13
|
-
import"./cli-
|
|
12
|
+
} from "./cli-7dm2zqy2.js";
|
|
13
|
+
import"./cli-aca5pz9f.js";
|
|
14
14
|
import {
|
|
15
15
|
createTaskWithSiblingAwareness
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-2f07m0xr.js";
|
|
17
17
|
import {
|
|
18
18
|
ackSlackMessage,
|
|
19
19
|
ensureSlackThreadTree,
|
|
20
20
|
isSlackRenderV2Enabled,
|
|
21
21
|
require_dist
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-rgrfzg8z.js";
|
|
23
23
|
import"./cli-k9qkf1hw.js";
|
|
24
24
|
import"./cli-b0p7rfnd.js";
|
|
25
25
|
import"./cli-t930g0xh.js";
|
|
@@ -30,18 +30,18 @@ import {
|
|
|
30
30
|
init_context_key,
|
|
31
31
|
init_db,
|
|
32
32
|
slackContextKey
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-50vbt00w.js";
|
|
34
34
|
import {
|
|
35
35
|
init_env_flag,
|
|
36
36
|
init_resolver,
|
|
37
37
|
isEnvFlagEnabled,
|
|
38
38
|
resolveTemplate
|
|
39
|
-
} from "./cli-
|
|
39
|
+
} from "./cli-xpxde7rm.js";
|
|
40
40
|
import"./cli-x23me2mg.js";
|
|
41
41
|
import"./cli-z2zcxes1.js";
|
|
42
42
|
import"./cli-zsspvvm2.js";
|
|
43
43
|
import"./cli-4j2mrzag.js";
|
|
44
|
-
import"./cli-
|
|
44
|
+
import"./cli-ccf9vy7q.js";
|
|
45
45
|
import"./cli-5dsbcjjw.js";
|
|
46
46
|
import"./cli-e15jhafb.js";
|
|
47
47
|
import"./cli-3fj60etf.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
convertResponsesMessages,
|
|
3
3
|
convertResponsesTools,
|
|
4
4
|
processResponsesStream
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-gm9cbhbq.js";
|
|
6
6
|
import {
|
|
7
7
|
clampOpenAIPromptCacheKey
|
|
8
8
|
} from "./cli-mrptpp86.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
formatProviderError,
|
|
18
18
|
normalizeProviderError
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-6map995v.js";
|
|
20
20
|
import {
|
|
21
21
|
getProviderEnvValue
|
|
22
22
|
} from "./cli-4wgngmwv.js";
|
|
@@ -27,11 +27,11 @@ import"./cli-zyxs93y9.js";
|
|
|
27
27
|
import {
|
|
28
28
|
buildBaseOptions,
|
|
29
29
|
createGrammarToolInputProperties
|
|
30
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-57khth04.js";
|
|
31
31
|
import"./cli-y2apkfe2.js";
|
|
32
32
|
import {
|
|
33
33
|
clampThinkingLevel
|
|
34
|
-
} from "./cli-
|
|
34
|
+
} from "./cli-akdvwc9v.js";
|
|
35
35
|
import {
|
|
36
36
|
AssistantMessageEventStream
|
|
37
37
|
} from "./cli-8wrympd7.js";
|
|
@@ -119,7 +119,7 @@ var stream = (model, context, options) => {
|
|
|
119
119
|
throw new Error("Azure OpenAI Responses stream ended without a stop reason");
|
|
120
120
|
}
|
|
121
121
|
if (output.stopReason === "aborted" || output.stopReason === "error") {
|
|
122
|
-
throw new Error("An unknown error occurred");
|
|
122
|
+
throw new Error(output.errorMessage || "An unknown error occurred");
|
|
123
123
|
}
|
|
124
124
|
stream2.push({ type: "done", reason: output.stopReason, message: output });
|
|
125
125
|
stream2.end();
|
|
@@ -240,6 +240,9 @@ function buildParams(model, context, options, deploymentName, grammarToolInputPr
|
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
+
if (options?.samplingParams) {
|
|
244
|
+
Object.assign(params, options.samplingParams);
|
|
245
|
+
}
|
|
243
246
|
return params;
|
|
244
247
|
}
|
|
245
248
|
export {
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
getEmbeddingProvider,
|
|
4
4
|
getMemoryStore,
|
|
5
5
|
init_constants
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-se2p6rkb.js";
|
|
7
7
|
import"./cli-0258203w.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
} from "./cli-50vbt00w.js";
|
|
12
|
+
import"./cli-xpxde7rm.js";
|
|
13
13
|
import"./cli-x23me2mg.js";
|
|
14
14
|
import"./cli-z2zcxes1.js";
|
|
15
15
|
import"./cli-zsspvvm2.js";
|
|
16
16
|
import"./cli-4j2mrzag.js";
|
|
17
|
-
import"./cli-
|
|
17
|
+
import"./cli-ccf9vy7q.js";
|
|
18
18
|
import"./cli-5dsbcjjw.js";
|
|
19
19
|
import"./cli-p9swy5t3.js";
|
|
20
20
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embedScript,
|
|
3
3
|
embeddingProvider
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-g1re8r05.js";
|
|
5
|
+
import"./cli-se2p6rkb.js";
|
|
6
6
|
import"./cli-0258203w.js";
|
|
7
7
|
import {
|
|
8
8
|
getDb,
|
|
9
9
|
init_db
|
|
10
|
-
} from "./cli-
|
|
11
|
-
import"./cli-
|
|
10
|
+
} from "./cli-50vbt00w.js";
|
|
11
|
+
import"./cli-xpxde7rm.js";
|
|
12
12
|
import"./cli-x23me2mg.js";
|
|
13
13
|
import"./cli-z2zcxes1.js";
|
|
14
14
|
import"./cli-zsspvvm2.js";
|
|
15
15
|
import"./cli-4j2mrzag.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-ccf9vy7q.js";
|
|
17
17
|
import"./cli-5dsbcjjw.js";
|
|
18
18
|
import"./cli-p9swy5t3.js";
|
|
19
19
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDb,
|
|
3
3
|
init_db
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-50vbt00w.js";
|
|
5
|
+
import"./cli-xpxde7rm.js";
|
|
6
6
|
import"./cli-x23me2mg.js";
|
|
7
7
|
import"./cli-z2zcxes1.js";
|
|
8
8
|
import"./cli-zsspvvm2.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
init_secret_scrubber,
|
|
11
11
|
scrubSecrets
|
|
12
12
|
} from "./cli-4j2mrzag.js";
|
|
13
|
-
import"./cli-
|
|
13
|
+
import"./cli-ccf9vy7q.js";
|
|
14
14
|
import"./cli-5dsbcjjw.js";
|
|
15
15
|
import"./cli-p9swy5t3.js";
|
|
16
16
|
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
resolveClaudeBinary,
|
|
13
13
|
resolveClaudeBinaryArgv,
|
|
14
14
|
resolveClaudeBridgeEnabled
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
} from "./cli-kd1ck4rx.js";
|
|
16
|
+
import"./cli-2rk0cx7s.js";
|
|
17
17
|
import"./cli-psrqtw2m.js";
|
|
18
|
-
import"./cli-
|
|
18
|
+
import"./cli-w2wxd56v.js";
|
|
19
19
|
import"./cli-yv9dttkh.js";
|
|
20
20
|
import"./cli-tng3131n.js";
|
|
21
21
|
import"./cli-zm7njwzd.js";
|
|
@@ -32,12 +32,12 @@ import"./cli-x23me2mg.js";
|
|
|
32
32
|
import"./cli-z2zcxes1.js";
|
|
33
33
|
import"./cli-zsspvvm2.js";
|
|
34
34
|
import"./cli-4j2mrzag.js";
|
|
35
|
-
import"./cli-
|
|
35
|
+
import"./cli-ccf9vy7q.js";
|
|
36
36
|
import"./cli-5dsbcjjw.js";
|
|
37
|
-
import"./cli-
|
|
37
|
+
import"./cli-darcwax3.js";
|
|
38
38
|
import"./cli-4wgngmwv.js";
|
|
39
39
|
import"./cli-zyxs93y9.js";
|
|
40
|
-
import"./cli-
|
|
40
|
+
import"./cli-akdvwc9v.js";
|
|
41
41
|
import"./cli-8wrympd7.js";
|
|
42
42
|
import"./cli-p9swy5t3.js";
|
|
43
43
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
summarizeSession
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-w2wxd56v.js";
|
|
4
4
|
import {
|
|
5
5
|
checkToolLoop,
|
|
6
6
|
clearToolHistory
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
init_package,
|
|
35
35
|
package_default
|
|
36
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-ccf9vy7q.js";
|
|
37
37
|
|
|
38
38
|
// src/hooks/hook.ts
|
|
39
39
|
init_package();
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
init_db,
|
|
17
17
|
init_templates1 as init_templates,
|
|
18
18
|
normalizeDateRequired
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-50vbt00w.js";
|
|
20
20
|
import {
|
|
21
21
|
init_env_flag,
|
|
22
22
|
init_resolver,
|
|
23
23
|
isEnvFlagEnabled,
|
|
24
24
|
resolveTemplate
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-xpxde7rm.js";
|
|
26
26
|
|
|
27
27
|
// src/be/db-queries/tracker.ts
|
|
28
28
|
init_date_utils();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SYSTEM_COLUMN_KINDS,
|
|
3
3
|
listAppRecords
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-gecy3z2s.js";
|
|
5
5
|
import {
|
|
6
6
|
getScriptApiTypes,
|
|
7
7
|
getScriptMcpTypes,
|
|
8
8
|
require_typescript
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-6dp3ydxa.js";
|
|
10
10
|
import {
|
|
11
11
|
deleteSwarmConfigByKey,
|
|
12
12
|
getAgentById,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
getSwarmConfigs,
|
|
16
16
|
init_db,
|
|
17
17
|
upsertSwarmConfig
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-50vbt00w.js";
|
|
19
19
|
import {
|
|
20
20
|
init_secret_scrubber,
|
|
21
21
|
scrubSecrets
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isEnvFlagEnabled,
|
|
10
10
|
isSteeringEnabled,
|
|
11
11
|
registerTemplate
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-xpxde7rm.js";
|
|
13
13
|
import {
|
|
14
14
|
MAX_PROFILE_FILE_LENGTH,
|
|
15
15
|
init_constants
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
init_package,
|
|
31
31
|
package_default
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-ccf9vy7q.js";
|
|
33
33
|
import {
|
|
34
34
|
_enum,
|
|
35
35
|
array,
|
|
@@ -2092,7 +2092,15 @@ var init_types = __esm(() => {
|
|
|
2092
2092
|
});
|
|
2093
2093
|
}
|
|
2094
2094
|
}).describe("Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form.");
|
|
2095
|
-
AssetEntityTypeSchema = exports_zod.enum([
|
|
2095
|
+
AssetEntityTypeSchema = exports_zod.enum([
|
|
2096
|
+
"task",
|
|
2097
|
+
"workflow",
|
|
2098
|
+
"schedule",
|
|
2099
|
+
"page",
|
|
2100
|
+
"app",
|
|
2101
|
+
"script",
|
|
2102
|
+
"file"
|
|
2103
|
+
]);
|
|
2096
2104
|
AssetProviderRefSchema = exports_zod.object({
|
|
2097
2105
|
providerId: exports_zod.string(),
|
|
2098
2106
|
orgId: exports_zod.string().optional(),
|
|
@@ -2924,11 +2932,11 @@ var init_types = __esm(() => {
|
|
|
2924
2932
|
id: exports_zod.string().describe("Unique node identifier, used in 'next' and 'inputs' mappings"),
|
|
2925
2933
|
type: exports_zod.string().describe("Executor type: 'agent-task', 'script', 'swarm-script', 'raw-llm', 'validate', 'property-match'"),
|
|
2926
2934
|
label: exports_zod.string().optional().describe("Human-readable label for UI display"),
|
|
2927
|
-
config: exports_zod.record(exports_zod.string(), exports_zod.unknown()).describe("Executor-specific config. For agent-task: { template, outputSchema?, agentId?, tags?, priority?, dir?, vcsRepo?, model? }. " + "For swarm-script: { scriptName, scope?, pinHash?, args?, fsMode?, timeoutMs? (1000-300000) }. " + "
|
|
2935
|
+
config: exports_zod.record(exports_zod.string(), exports_zod.unknown()).describe("Executor-specific config. For agent-task: { template, outputSchema?, agentId?, tags?, priority?, dir?, vcsRepo?, model? }. " + "For script: { runtime, script, args?, timeout? }. " + "For swarm-script: { scriptName, scope?, pinHash?, args?, fsMode?, timeoutMs? (1000-300000) }. " + "Agent-task templates and ordinary config values support {{interpolation}} from the node's inputs context, including trigger and declared upstream aliases. " + "SECURITY: executable source for script/swarm-script nodes does not interpolate trigger.* or upstream node outputs; only input/workflow/swarm/run values are allowed in inline script source, and named swarm-script source is not workflow-interpolated. " + "Pass dynamic values through config.args instead (inline script receives them as argv; swarm-script receives its args object). " + "NOTE: config.outputSchema on agent-task nodes validates the AGENT's raw JSON output, " + "while node-level outputSchema validates the EXECUTOR's return value ({taskId, taskOutput})."),
|
|
2928
2936
|
next: exports_zod.union([exports_zod.string(), exports_zod.array(exports_zod.string()), exports_zod.record(exports_zod.string(), exports_zod.string())]).optional().describe("Next node(s): string for simple chaining, string[] for fan-out to parallel nodes, or record for port-based routing ({pass: 'a', fail: 'b'})"),
|
|
2929
2937
|
validation: StepValidationConfigSchema.optional(),
|
|
2930
2938
|
retry: RetryPolicySchema.optional(),
|
|
2931
|
-
inputs: exports_zod.record(exports_zod.string(), exports_zod.string()).optional().describe("REQUIRED for cross-node data access. Maps local names to context paths. " + "Without this, upstream step outputs are NOT available for interpolation
|
|
2939
|
+
inputs: exports_zod.record(exports_zod.string(), exports_zod.string()).optional().describe("REQUIRED for cross-node data access. Maps local names to context paths. " + "Without this, upstream step outputs are NOT available for interpolation; built-in trigger/input/workflow/swarm/run context remains available. " + 'Example: { "cityData": "generate-city" } → use {{cityData.taskOutput.field}} in config templates. ' + 'For trigger data: { "pr": "trigger.pullRequest" }. ' + "This mapping works in agent-task templates and ordinary config, but executable script/swarm-script source excludes trigger and upstream-output aliases. " + "Route those dynamic values through config.args (argv for inline scripts) instead."),
|
|
2932
2940
|
inputSchema: exports_zod.record(exports_zod.string(), exports_zod.unknown()).optional().describe("JSON Schema to validate resolved inputs before execution"),
|
|
2933
2941
|
outputSchema: exports_zod.record(exports_zod.string(), exports_zod.unknown()).optional().describe("JSON Schema to validate the executor's output (e.g. {taskId, taskOutput} for agent-task). " + "Different from config.outputSchema which validates the agent's raw output.")
|
|
2934
2942
|
}).openapi("WorkflowNode");
|
|
@@ -3721,6 +3729,8 @@ var init_asset_key_audit = __esm(() => {
|
|
|
3721
3729
|
{ entityType: "workflow", sql: 'SELECT id, "key" as key FROM workflows' },
|
|
3722
3730
|
{ entityType: "schedule", sql: 'SELECT id, "key" as key FROM scheduled_tasks' },
|
|
3723
3731
|
{ entityType: "page", sql: 'SELECT id, "key" as key FROM pages' },
|
|
3732
|
+
{ entityType: "app", sql: 'SELECT id, "key" as key FROM apps' },
|
|
3733
|
+
{ entityType: "script", sql: 'SELECT id, "key" as key FROM scripts' },
|
|
3724
3734
|
{ entityType: "file", sql: 'SELECT id, "key" as key FROM asset_key_mappings' }
|
|
3725
3735
|
];
|
|
3726
3736
|
});
|
|
@@ -7591,6 +7601,18 @@ function assetSummaryQueries(types) {
|
|
|
7591
7601
|
NULL AS providerDriveId, NULL AS providerKey
|
|
7592
7602
|
FROM pages`);
|
|
7593
7603
|
}
|
|
7604
|
+
if (types.has("app")) {
|
|
7605
|
+
queries.push(`SELECT 'app' AS entityType, id, "key", name AS label,
|
|
7606
|
+
updated_at AS updatedAt, NULL AS providerId, NULL AS providerOrgId,
|
|
7607
|
+
NULL AS providerDriveId, NULL AS providerKey
|
|
7608
|
+
FROM apps`);
|
|
7609
|
+
}
|
|
7610
|
+
if (types.has("script")) {
|
|
7611
|
+
queries.push(`SELECT 'script' AS entityType, id, "key", name AS label,
|
|
7612
|
+
updatedAt, NULL AS providerId, NULL AS providerOrgId,
|
|
7613
|
+
NULL AS providerDriveId, NULL AS providerKey
|
|
7614
|
+
FROM scripts`);
|
|
7615
|
+
}
|
|
7594
7616
|
if (types.has("file")) {
|
|
7595
7617
|
queries.push(`SELECT 'file' AS entityType, id, "key", provider_key AS label,
|
|
7596
7618
|
updated_at AS updatedAt, provider_id AS providerId,
|
|
@@ -7602,7 +7624,7 @@ function assetSummaryQueries(types) {
|
|
|
7602
7624
|
return queries;
|
|
7603
7625
|
}
|
|
7604
7626
|
function listAssetSummaries(filters) {
|
|
7605
|
-
const requestedTypes = new Set(filters?.types?.length ? filters.types : ["task", "workflow", "schedule", "page", "file"]);
|
|
7627
|
+
const requestedTypes = new Set(filters?.types?.length ? filters.types : ["task", "workflow", "schedule", "page", "app", "script", "file"]);
|
|
7606
7628
|
const queries = assetSummaryQueries(requestedTypes);
|
|
7607
7629
|
if (queries.length === 0)
|
|
7608
7630
|
return [];
|
|
@@ -7640,6 +7662,10 @@ function currentAssetKey(entityType, id) {
|
|
|
7640
7662
|
return getDb().prepare('SELECT "key" AS key FROM scheduled_tasks WHERE id = ?').get(id)?.key ?? null;
|
|
7641
7663
|
case "page":
|
|
7642
7664
|
return getDb().prepare('SELECT "key" AS key FROM pages WHERE id = ?').get(id)?.key ?? null;
|
|
7665
|
+
case "app":
|
|
7666
|
+
return getDb().prepare('SELECT "key" AS key FROM apps WHERE id = ?').get(id)?.key ?? null;
|
|
7667
|
+
case "script":
|
|
7668
|
+
return getDb().prepare('SELECT "key" AS key FROM scripts WHERE id = ?').get(id)?.key ?? null;
|
|
7643
7669
|
case "file":
|
|
7644
7670
|
return getAssetKeyMapping(id)?.key ?? null;
|
|
7645
7671
|
}
|
|
@@ -7711,6 +7737,17 @@ function moveAssetKey(input) {
|
|
|
7711
7737
|
input.id
|
|
7712
7738
|
]);
|
|
7713
7739
|
break;
|
|
7740
|
+
case "app":
|
|
7741
|
+
getDb().run('UPDATE apps SET "key" = ?, updated_at = ? WHERE id = ?', [key, now, input.id]);
|
|
7742
|
+
break;
|
|
7743
|
+
case "script":
|
|
7744
|
+
getDb().run('UPDATE scripts SET "key" = ?, updatedAt = ?, updated_by = ? WHERE id = ?', [
|
|
7745
|
+
key,
|
|
7746
|
+
now,
|
|
7747
|
+
input.changedBy ?? null,
|
|
7748
|
+
input.id
|
|
7749
|
+
]);
|
|
7750
|
+
break;
|
|
7714
7751
|
case "file":
|
|
7715
7752
|
getDb().run('UPDATE asset_key_mappings SET "key" = ?, updated_at = ?, updated_by = ? WHERE id = ?', [key, now, input.changedBy ?? null, input.id]);
|
|
7716
7753
|
break;
|
|
@@ -12895,4 +12932,4 @@ var init_db = __esm(() => {
|
|
|
12895
12932
|
};
|
|
12896
12933
|
});
|
|
12897
12934
|
|
|
12898
|
-
export { normalizeAssetKey, parseAssetKey, canWriteAssetKey, init_key, slackContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, init_context_key, checkSlackRoutingCoherence, init_slack_routing, initTelemetry, telemetry, init_telemetry, $OpenAPIRegistry, $OpenApiGeneratorV31, init_dist, init_zod_openapi, AssetKeySchema, AssetEntityTypeSchema, AssetKeyMappingSchema, AssetSummarySchema, ModelTierSchema, ReasoningEffortSchema, splitLegacyModelAlias, resolveTaskModelSelection, AgentTaskStatusSchema, isTerminalTaskStatus, AgentTaskSourceSchema, ProviderNameSchema, SteerModeSchema, SteeringSourceSchema, SteeringMessageSchema, SteerOutcomeSchema, OnUnsupportedSchema, SteerResultSchema, FollowUpConfigSchema, AgentTaskSchema, AttachmentInputSchema, TaskAttachmentSchema, UserSchema, InboxItemTypeSchema, InboxItemStatusSchema, InboxItemStateSchema, FavoriteItemTypeSchema, UserFavoriteSchema, TaskTemplateKindSchema, TaskTemplateSchema, AgentStatusSchema, AgentAvatarSchema, AgentSchema, AgentLatestModelSchema, AgentCredStatusSchema, AgentWithTasksSchema, ChannelTypeSchema, ServiceStatusSchema, ServiceSchema, ResumeReasonSchema, AgentLogSchema, SessionLogSchema, SessionCostModelBreakdownSchema, SessionCostSchema, EventCategorySchema, EventStatusSchema, EventSourceSchema, EventNameSchema, SwarmEventSchema, ScheduledTaskTargetTypeSchema, ScheduledTaskSchema, SwarmConfigScopeSchema, SwarmConfigSchema, RepoGuidelinesSchema, RepoHooksSchema, SwarmRepoSchema, AgentMemoryScopeSchema, AgentMemorySourceSchema, AgentMemorySchema, ActiveSessionSchema, WorkflowEdgeSchema, WorkflowDefinitionSchema, WorkflowNodePatchSchema, WorkflowPatchSchema, TriggerConfigSchema, CooldownConfigSchema, InputValueSchema, WorkflowSchema, WorkflowVersionSchema, PageContentTypeSchema, PageAuthModeSchema, PageSchema, PageVersionSchema, MetricWidgetSchema, MetricDefinitionSchema, MetricSchema, MetricVersionSchema, WorkflowRunStatusSchema, WorkflowRunSchema, ScriptRunStatusSchema, TERMINAL_SCRIPT_RUN_STATUSES, ScriptRunSchema, ScriptRunListItemSchema, ScriptRunJournalEntrySchema, WorkflowRunStepSchema, PromptTemplateScopeSchema, PromptTemplateStateSchema, PromptTemplateSchema, PromptTemplateHistorySchema, ScriptScopeSchema, ScriptFsModeSchema, ScriptRecordSchema, ScriptVersionRecordSchema, ScriptApiAuthModeSchema, ScriptApiRecordSchema, SkillSchema, AgentSkillSchema, SkillWithInstallInfoSchema, SkillFileSchema, McpAuthMethodSchema, McpServerSchema, AgentMcpServerSchema, McpServerWithInstallInfoSchema, ContextSnapshotEventTypeSchema, ContextFormulaSchema, ContextSnapshotSchema, BudgetScopeSchema, BudgetSchema, PricingProviderSchema, PricingTokenClassSchema, PricingRowSchema, BudgetRefusalCauseSchema, BudgetRefusalNotificationSchema, BudgetRefusedTriggerSchema, KvValueTypeSchema, KvNamespaceSchema, KvKeySchema, KvEntrySchema, init_types, setRequestAuth, getRequestAuth, getCurrentRequestAuth, init_request_auth_context, auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, DEFAULT_CREDENTIAL_BINDINGS, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, normalizeDate, normalizeDateRequired, init_date_utils, init_templates, init_templates2 as init_templates1, SteeringRequestError, isSteeringEnabled2 as isSteeringEnabled, getTaskSteeringFields, promotePendingSteeringForTask, markSteeringUndeliverable, requestSteering, init_steering, isReservedConfigKey, reservedKeyError, validateConfigValue, init_swarm_config_guard, onTaskStarted, init_task_lifecycle_events, generateDefaultClaudeMd, generateDefaultSoulMd, generateDefaultIdentityMd, generateDefaultToolsMd, init_defaults, isSqliteVecAvailable, initDb, getDb, closeDb, computeContentHash, createContextVersion, getLatestContextVersion, getContextVersion, getContextVersionHistory, agentQueries, updateAgentCredentialState, createAgent, getAgentById, getAllAgents, getLeadAgent, updateAgentStatus, updateAgentMaxTasks, updateAgentProvider, setAgentHarnessProvider, updateAgentCredStatus, listAgentsWithCredStatusByProvider, getAgentHarnessProviders, updateAgentActivity, MAX_EMPTY_POLLS, incrementEmptyPollCount, resetEmptyPollCount, shouldBlockPolling, deleteAgent, getActiveTaskCount, hasCapacity, getRemainingCapacity, updateAgentStatusFromCapacity, isPoolAffinityEnforcementEnabled, buildRoutingAffinityFromAgent, isAgentEligibleForTask, taskQueries, createTask, getPendingTaskForAgent, assignUnassignedTaskPending, startTask, getTaskById, getSlackRenderV2ActivatedAt, ensureSlackRenderV2Activation, isPendingSlackMessage, recordSlackMessage, reserveSlackMessage, bindSlackMessageTimestamp, updateSlackMessageRecord, markSlackTreeRendered, deleteSlackMessageRecord, getSlackTreeMessage, getSlackTreeMessageByThread, getSlackOutcomeMessage, getSlackTreeMessages, getSlackMessageByChannelTs, getSlackTasksInThread, markTaskSlackReplySent, setSlackMessageTracking, getChildTasks, hasNonTerminalResumeChild, hasNonTerminalRerouteDecisionChild, updateTaskClaudeSessionId, updateTaskTitle, updateTaskVcs, getTasksByAgentId, getAgentCurrentTask, getTasksByStatus, findTaskByVcs, findTaskByGitHub, getAllTasks, getTasksCount, getTaskStats, getCompletedSlackTasks, getRecentlyFinishedWorkerTasks, markTasksNotified, resetTasksNotified, getInProgressSlackTasks, getSlackTasksMissingTree, getInProgressTasksByContextKey, findExistingLinearTrackerContextWork, getLatestTaskByContextKey, getLatestScriptRunStepTaskByContextKey, getAgentWorkingOnThread, getLatestActiveTaskInThread, getLatestLeadTaskInThread, getMostRecentTaskInThread, findCompletedTaskInThread, findRecentCancelledTaskInThread, completeTask, failTask, overwriteTerminalTaskResultText, cancelTask, supersedeTask, backfillSupersedeTaskResumeTaskId, pauseTask, resumeTask, getPausedTasksForAgent, getOrphanedInProgressTasksForAgent, resetOrphanedInProgressTasksForAgent, getRecentlyCancelledTasksForAgent, deleteTask, updateTaskProgress, insertTaskAttachment, getAssetKeyMappingByProvider, upsertAssetKeyMapping, getAssetKeyMapping, listAssetSummaries, moveAssetKey, deleteTaskAttachment, replaceTaskAttachment, getTaskAttachments, createSteeringMessage, getSteeringMessagesForTask, getSteeringMessageById, getPendingSteeringForTask, getPendingSteeringForAgent, markSteeringDelivered, markSteeringHandled, markSteeringPromoted, cancelPendingSteeringForTask, hasPendingSteering, getAgentWithTasks, getAllAgentsWithTasks, logQueries, createLogEntry, getLogsByAgentId, getLogsByTaskId, getLogsByTaskIdChronological, getLogsByEventType, getAllLogs, findRecentSimilarTasks, createTaskExtended, claimTask, releaseTask, acceptTask, rejectTask, moveTaskToBacklog, moveTaskFromBacklog, releaseStaleReviewingTasks, getOfferedTasksForAgent, claimOfferedTask, getUnassignedTasksCount, getUnassignedTaskIds, getUnassignedTaskIdsForAgent, checkDependencies, getDependentTasks, cascadeFailDependents, updateAgentProfile, updateAgentName, createChannel, getMessageById, getChannelById, getChannelByName, getAllChannels, deleteChannel, postMessage, getChannelMessages, updateReadState, getLastReadAt, getUnreadMessages, getMentionsForAgent, getInboxSummary, claimMentions, releaseMentionProcessing, releaseStaleMentionProcessing, createService, getServiceById, getServiceByAgentAndName, getServicesByAgentId, getAllServices, updateServiceStatus, deleteService, upsertService, deleteServicesByAgentId, sessionLogQueries, createSessionLogs, getSessionLogsByTaskId, getSessionLogsBySession, createSessionCost, getSessionCostsByTaskId, getSessionCostsByAgentId, getAllSessionCosts, getSessionCostsFiltered, UNATTRIBUTED_USER_ID, getSessionCostSummary, getDashboardCostSummary, createInboxMessage, getInboxMessageById, getUnreadInboxMessages, claimInboxMessages, markInboxMessageRead, markInboxMessageResponded, markInboxMessageDelegated, releaseStaleProcessingInbox, getConcurrentContext, getScheduledTasks, getScheduledTaskById, getScheduledTaskByName, createScheduledTask, updateScheduledTask, deleteScheduledTask, getDueScheduledTasks, autoEncryptLegacyPlaintextSecrets, maskSecrets, getSwarmConfigs, getInjectableGlobalConfigs, getSwarmConfigById, getSwarmConfigLookupById, upsertSwarmConfig, deleteSwarmConfig, deleteSwarmConfigByKey, getResolvedConfig, getSwarmRepos, getSwarmRepoById, getSwarmRepoByName, getSwarmRepoByUrl, createSwarmRepo, updateSwarmRepo, deleteSwarmRepo, getAgentMailInboxMapping, getAgentMailInboxMappingsByAgent, getAllAgentMailInboxMappings, createAgentMailInboxMapping, deleteAgentMailInboxMapping, findTaskByAgentMailThread, insertActiveSession, deleteActiveSession, deleteActiveSessionById, getActiveSessions, heartbeatActiveSession, cleanupStaleSessions, cleanupAgentSessions, updateActiveSessionProviderSessionId, getActiveSessionForTask, reassociateSessionLogs, getStalledInProgressTasks, getStalePinnedResumes, failPendingResumeIfUnclaimed, getIdleWorkersWithCapacity, getUnassignedPoolTasks, getStaleUnassignedAffinityTasks, getRecentFailedTasks, getRecentCompletedCount, getRecentFailedCount, createWorkflow, getWorkflow, listWorkflows, updateWorkflow, deleteWorkflow, getWorkflowsByScheduleId, createWorkflowRun, getWorkflowRun, updateWorkflowRun, listWorkflowRuns, countWorkflowRuns, listWorkflowRunsPage, createWorkflowRunStep, getWorkflowRunStep, updateWorkflowRunStep, getWorkflowRunStepsByRunId, getStuckWorkflowRuns, getLastSuccessfulRun, getLastRunStart, getRetryableSteps, getCompletedStepNodeIds, getTaskByWorkflowRunStepId, detachTaskFromWorkflowRunStep, getStepByIdempotencyKey, getStepCountForNode, getLatestStepForNode, createWorkflowVersion, getWorkflowVersions, getWorkflowVersion, createAppVersion, getAppVersions, getAppVersion, createPage, getPage, getPageBySlug, getLatestPageBySlug, listPagesByAgent, listAllPages, countAllPages, countPagesByAgent, updatePage, deletePage, incrementPageViewCount, createPageVersion, getPageVersions, getPageVersion, createMetric, getMetric, getMetricBySlug, listMetricsByAgent, listAllMetrics, countAllMetrics, countMetricsByAgent, updateMetric, deleteMetric, createMetricVersion, getMetricVersions, getMetricVersion, getPromptTemplates, getPromptTemplateById, upsertPromptTemplate, deletePromptTemplate, resetPromptTemplateToDefault, getPromptTemplateHistory, resolvePromptTemplate, checkoutPromptTemplate, getAllChannelActivityCursors, getChannelActivityCursor, upsertChannelActivityCursor, createApprovalRequest, getApprovalRequestById, resolveApprovalRequest, updateApprovalRequestNotifications, listApprovalRequests, getStuckApprovalRuns, getApprovalRequestByStepId, getExpiredPendingApprovals, createWaitState, getWaitStateById, getWaitStateByStepId, getDueWaitStates, getPendingEventWaitNames, getPendingWaitsByEvent, resolveWaitState, getStuckWaitRuns, SKILL_FILE_LIMITS, normalizeSkillFilePath, createSkill, updateSkill, listSkillFileManifest, getSkillFiles, getSkillFile, upsertSkillFile, upsertSkillFiles, deleteSkillFile, deleteSkill, getSkillById, getSkillByName, listSkills, searchSkills, installSkill, getSystemDefaultSkills, installSystemDefaultSkillsForAgent, uninstallSkill, getAgentSkills, toggleAgentSkill, createMcpServer, updateMcpServer, deleteMcpServer, getMcpServerById, getMcpServerByName, listMcpServers, installMcpServer, uninstallMcpServer, getAgentMcpServers, createContextSnapshot, getContextSnapshotsByTaskId, getContextSnapshotsBySessionId, getContextSummaryByTaskId, getAvailableKeyIndices, recordKeyUsage, markKeyRateLimited, recordKeyRateLimitWindows, setApiKeyName, clearKeyRateLimit, getKeyStatuses, getKeyCostSummary, getUserById, getAllUsers, createUser, updateUser, deleteUser, listInboxState, upsertInboxState, listFavorites, listUserFavorites, getFavoriteItemIdSet, setFavorite, setUserFavorite, withFavoriteFlags, listTaskTemplates, getRootTaskChain, listRecentSessions, countSessions, getBudget, getBudgets, upsertBudget, deleteBudget, getAllPricingRows, getPricingRows, getActivePricingRow, insertPricingRow, deletePricingRow, getDailySpendForAgent, getDailySpendGlobal, getDailySpendForUser, recordBudgetRefusalNotification, getBudgetRefusalNotification, getRecentBudgetRefusalNotifications, hasBudgetRefusalNotificationToday, setBudgetRefusalFollowUpTaskId, getLiveAgentCounts, getInstanceActivity, getSwarmMetrics, hasFirstCompletedTask, getKv, sweepExpiredKv, sweepExpiredKvPrefix, upsertKv, deleteKv, KvTypeCollisionError, incrKv, listKv, countKv, createScriptRun, recordInlineScriptRun, getScriptRun, getScriptRunByIdempotencyKey, listScriptRuns, countScriptRuns, countActiveScriptRuns, updateScriptRun, getRunningScriptRuns, getScriptRunJournalStep, upsertScriptRunJournalStep, listScriptRunJournalSteps, countScriptRunJournalSteps, countScriptRunJournalAgentTaskSteps, exports_db, init_db };
|
|
12935
|
+
export { normalizeAssetKey, defaultAssetKey, parseAssetKey, canWriteAssetKey, init_key, slackContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, init_context_key, checkSlackRoutingCoherence, init_slack_routing, initTelemetry, telemetry, init_telemetry, $OpenAPIRegistry, $OpenApiGeneratorV31, init_dist, init_zod_openapi, AssetKeySchema, AssetEntityTypeSchema, AssetKeyMappingSchema, AssetSummarySchema, ModelTierSchema, ReasoningEffortSchema, splitLegacyModelAlias, resolveTaskModelSelection, AgentTaskStatusSchema, isTerminalTaskStatus, AgentTaskSourceSchema, ProviderNameSchema, SteerModeSchema, SteeringSourceSchema, SteeringMessageSchema, SteerOutcomeSchema, OnUnsupportedSchema, SteerResultSchema, FollowUpConfigSchema, AgentTaskSchema, AttachmentInputSchema, TaskAttachmentSchema, UserSchema, InboxItemTypeSchema, InboxItemStatusSchema, InboxItemStateSchema, FavoriteItemTypeSchema, UserFavoriteSchema, TaskTemplateKindSchema, TaskTemplateSchema, AgentStatusSchema, AgentAvatarSchema, AgentSchema, AgentLatestModelSchema, AgentCredStatusSchema, AgentWithTasksSchema, ChannelTypeSchema, ServiceStatusSchema, ServiceSchema, ResumeReasonSchema, AgentLogSchema, SessionLogSchema, SessionCostModelBreakdownSchema, SessionCostSchema, EventCategorySchema, EventStatusSchema, EventSourceSchema, EventNameSchema, SwarmEventSchema, ScheduledTaskTargetTypeSchema, ScheduledTaskSchema, SwarmConfigScopeSchema, SwarmConfigSchema, RepoGuidelinesSchema, RepoHooksSchema, SwarmRepoSchema, AgentMemoryScopeSchema, AgentMemorySourceSchema, AgentMemorySchema, ActiveSessionSchema, WorkflowEdgeSchema, WorkflowDefinitionSchema, WorkflowNodePatchSchema, WorkflowPatchSchema, TriggerConfigSchema, CooldownConfigSchema, InputValueSchema, WorkflowSchema, WorkflowVersionSchema, PageContentTypeSchema, PageAuthModeSchema, PageSchema, PageVersionSchema, MetricWidgetSchema, MetricDefinitionSchema, MetricSchema, MetricVersionSchema, WorkflowRunStatusSchema, WorkflowRunSchema, ScriptRunStatusSchema, TERMINAL_SCRIPT_RUN_STATUSES, ScriptRunSchema, ScriptRunListItemSchema, ScriptRunJournalEntrySchema, WorkflowRunStepSchema, PromptTemplateScopeSchema, PromptTemplateStateSchema, PromptTemplateSchema, PromptTemplateHistorySchema, ScriptScopeSchema, ScriptFsModeSchema, ScriptRecordSchema, ScriptVersionRecordSchema, ScriptApiAuthModeSchema, ScriptApiRecordSchema, SkillSchema, AgentSkillSchema, SkillWithInstallInfoSchema, SkillFileSchema, McpAuthMethodSchema, McpServerSchema, AgentMcpServerSchema, McpServerWithInstallInfoSchema, ContextSnapshotEventTypeSchema, ContextFormulaSchema, ContextSnapshotSchema, BudgetScopeSchema, BudgetSchema, PricingProviderSchema, PricingTokenClassSchema, PricingRowSchema, BudgetRefusalCauseSchema, BudgetRefusalNotificationSchema, BudgetRefusedTriggerSchema, KvValueTypeSchema, KvNamespaceSchema, KvKeySchema, KvEntrySchema, init_types, setRequestAuth, getRequestAuth, getCurrentRequestAuth, init_request_auth_context, auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, DEFAULT_CREDENTIAL_BINDINGS, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, normalizeDate, normalizeDateRequired, init_date_utils, init_templates, init_templates2 as init_templates1, SteeringRequestError, isSteeringEnabled2 as isSteeringEnabled, getTaskSteeringFields, promotePendingSteeringForTask, markSteeringUndeliverable, requestSteering, init_steering, isReservedConfigKey, reservedKeyError, validateConfigValue, init_swarm_config_guard, onTaskStarted, init_task_lifecycle_events, generateDefaultClaudeMd, generateDefaultSoulMd, generateDefaultIdentityMd, generateDefaultToolsMd, init_defaults, isSqliteVecAvailable, initDb, getDb, closeDb, computeContentHash, createContextVersion, getLatestContextVersion, getContextVersion, getContextVersionHistory, agentQueries, updateAgentCredentialState, createAgent, getAgentById, getAllAgents, getLeadAgent, updateAgentStatus, updateAgentMaxTasks, updateAgentProvider, setAgentHarnessProvider, updateAgentCredStatus, listAgentsWithCredStatusByProvider, getAgentHarnessProviders, updateAgentActivity, MAX_EMPTY_POLLS, incrementEmptyPollCount, resetEmptyPollCount, shouldBlockPolling, deleteAgent, getActiveTaskCount, hasCapacity, getRemainingCapacity, updateAgentStatusFromCapacity, isPoolAffinityEnforcementEnabled, buildRoutingAffinityFromAgent, isAgentEligibleForTask, taskQueries, createTask, getPendingTaskForAgent, assignUnassignedTaskPending, startTask, getTaskById, getSlackRenderV2ActivatedAt, ensureSlackRenderV2Activation, isPendingSlackMessage, recordSlackMessage, reserveSlackMessage, bindSlackMessageTimestamp, updateSlackMessageRecord, markSlackTreeRendered, deleteSlackMessageRecord, getSlackTreeMessage, getSlackTreeMessageByThread, getSlackOutcomeMessage, getSlackTreeMessages, getSlackMessageByChannelTs, getSlackTasksInThread, markTaskSlackReplySent, setSlackMessageTracking, getChildTasks, hasNonTerminalResumeChild, hasNonTerminalRerouteDecisionChild, updateTaskClaudeSessionId, updateTaskTitle, updateTaskVcs, getTasksByAgentId, getAgentCurrentTask, getTasksByStatus, findTaskByVcs, findTaskByGitHub, getAllTasks, getTasksCount, getTaskStats, getCompletedSlackTasks, getRecentlyFinishedWorkerTasks, markTasksNotified, resetTasksNotified, getInProgressSlackTasks, getSlackTasksMissingTree, getInProgressTasksByContextKey, findExistingLinearTrackerContextWork, getLatestTaskByContextKey, getLatestScriptRunStepTaskByContextKey, getAgentWorkingOnThread, getLatestActiveTaskInThread, getLatestLeadTaskInThread, getMostRecentTaskInThread, findCompletedTaskInThread, findRecentCancelledTaskInThread, completeTask, failTask, overwriteTerminalTaskResultText, cancelTask, supersedeTask, backfillSupersedeTaskResumeTaskId, pauseTask, resumeTask, getPausedTasksForAgent, getOrphanedInProgressTasksForAgent, resetOrphanedInProgressTasksForAgent, getRecentlyCancelledTasksForAgent, deleteTask, updateTaskProgress, insertTaskAttachment, getAssetKeyMappingByProvider, upsertAssetKeyMapping, getAssetKeyMapping, listAssetSummaries, moveAssetKey, deleteTaskAttachment, replaceTaskAttachment, getTaskAttachments, createSteeringMessage, getSteeringMessagesForTask, getSteeringMessageById, getPendingSteeringForTask, getPendingSteeringForAgent, markSteeringDelivered, markSteeringHandled, markSteeringPromoted, cancelPendingSteeringForTask, hasPendingSteering, getAgentWithTasks, getAllAgentsWithTasks, logQueries, createLogEntry, getLogsByAgentId, getLogsByTaskId, getLogsByTaskIdChronological, getLogsByEventType, getAllLogs, findRecentSimilarTasks, createTaskExtended, claimTask, releaseTask, acceptTask, rejectTask, moveTaskToBacklog, moveTaskFromBacklog, releaseStaleReviewingTasks, getOfferedTasksForAgent, claimOfferedTask, getUnassignedTasksCount, getUnassignedTaskIds, getUnassignedTaskIdsForAgent, checkDependencies, getDependentTasks, cascadeFailDependents, updateAgentProfile, updateAgentName, createChannel, getMessageById, getChannelById, getChannelByName, getAllChannels, deleteChannel, postMessage, getChannelMessages, updateReadState, getLastReadAt, getUnreadMessages, getMentionsForAgent, getInboxSummary, claimMentions, releaseMentionProcessing, releaseStaleMentionProcessing, createService, getServiceById, getServiceByAgentAndName, getServicesByAgentId, getAllServices, updateServiceStatus, deleteService, upsertService, deleteServicesByAgentId, sessionLogQueries, createSessionLogs, getSessionLogsByTaskId, getSessionLogsBySession, createSessionCost, getSessionCostsByTaskId, getSessionCostsByAgentId, getAllSessionCosts, getSessionCostsFiltered, UNATTRIBUTED_USER_ID, getSessionCostSummary, getDashboardCostSummary, createInboxMessage, getInboxMessageById, getUnreadInboxMessages, claimInboxMessages, markInboxMessageRead, markInboxMessageResponded, markInboxMessageDelegated, releaseStaleProcessingInbox, getConcurrentContext, getScheduledTasks, getScheduledTaskById, getScheduledTaskByName, createScheduledTask, updateScheduledTask, deleteScheduledTask, getDueScheduledTasks, autoEncryptLegacyPlaintextSecrets, maskSecrets, getSwarmConfigs, getInjectableGlobalConfigs, getSwarmConfigById, getSwarmConfigLookupById, upsertSwarmConfig, deleteSwarmConfig, deleteSwarmConfigByKey, getResolvedConfig, getSwarmRepos, getSwarmRepoById, getSwarmRepoByName, getSwarmRepoByUrl, createSwarmRepo, updateSwarmRepo, deleteSwarmRepo, getAgentMailInboxMapping, getAgentMailInboxMappingsByAgent, getAllAgentMailInboxMappings, createAgentMailInboxMapping, deleteAgentMailInboxMapping, findTaskByAgentMailThread, insertActiveSession, deleteActiveSession, deleteActiveSessionById, getActiveSessions, heartbeatActiveSession, cleanupStaleSessions, cleanupAgentSessions, updateActiveSessionProviderSessionId, getActiveSessionForTask, reassociateSessionLogs, getStalledInProgressTasks, getStalePinnedResumes, failPendingResumeIfUnclaimed, getIdleWorkersWithCapacity, getUnassignedPoolTasks, getStaleUnassignedAffinityTasks, getRecentFailedTasks, getRecentCompletedCount, getRecentFailedCount, createWorkflow, getWorkflow, listWorkflows, updateWorkflow, deleteWorkflow, getWorkflowsByScheduleId, createWorkflowRun, getWorkflowRun, updateWorkflowRun, listWorkflowRuns, countWorkflowRuns, listWorkflowRunsPage, createWorkflowRunStep, getWorkflowRunStep, updateWorkflowRunStep, getWorkflowRunStepsByRunId, getStuckWorkflowRuns, getLastSuccessfulRun, getLastRunStart, getRetryableSteps, getCompletedStepNodeIds, getTaskByWorkflowRunStepId, detachTaskFromWorkflowRunStep, getStepByIdempotencyKey, getStepCountForNode, getLatestStepForNode, createWorkflowVersion, getWorkflowVersions, getWorkflowVersion, createAppVersion, getAppVersions, getAppVersion, createPage, getPage, getPageBySlug, getLatestPageBySlug, listPagesByAgent, listAllPages, countAllPages, countPagesByAgent, updatePage, deletePage, incrementPageViewCount, createPageVersion, getPageVersions, getPageVersion, createMetric, getMetric, getMetricBySlug, listMetricsByAgent, listAllMetrics, countAllMetrics, countMetricsByAgent, updateMetric, deleteMetric, createMetricVersion, getMetricVersions, getMetricVersion, getPromptTemplates, getPromptTemplateById, upsertPromptTemplate, deletePromptTemplate, resetPromptTemplateToDefault, getPromptTemplateHistory, resolvePromptTemplate, checkoutPromptTemplate, getAllChannelActivityCursors, getChannelActivityCursor, upsertChannelActivityCursor, createApprovalRequest, getApprovalRequestById, resolveApprovalRequest, updateApprovalRequestNotifications, listApprovalRequests, getStuckApprovalRuns, getApprovalRequestByStepId, getExpiredPendingApprovals, createWaitState, getWaitStateById, getWaitStateByStepId, getDueWaitStates, getPendingEventWaitNames, getPendingWaitsByEvent, resolveWaitState, getStuckWaitRuns, SKILL_FILE_LIMITS, normalizeSkillFilePath, createSkill, updateSkill, listSkillFileManifest, getSkillFiles, getSkillFile, upsertSkillFile, upsertSkillFiles, deleteSkillFile, deleteSkill, getSkillById, getSkillByName, listSkills, searchSkills, installSkill, getSystemDefaultSkills, installSystemDefaultSkillsForAgent, uninstallSkill, getAgentSkills, toggleAgentSkill, createMcpServer, updateMcpServer, deleteMcpServer, getMcpServerById, getMcpServerByName, listMcpServers, installMcpServer, uninstallMcpServer, getAgentMcpServers, createContextSnapshot, getContextSnapshotsByTaskId, getContextSnapshotsBySessionId, getContextSummaryByTaskId, getAvailableKeyIndices, recordKeyUsage, markKeyRateLimited, recordKeyRateLimitWindows, setApiKeyName, clearKeyRateLimit, getKeyStatuses, getKeyCostSummary, getUserById, getAllUsers, createUser, updateUser, deleteUser, listInboxState, upsertInboxState, listFavorites, listUserFavorites, getFavoriteItemIdSet, setFavorite, setUserFavorite, withFavoriteFlags, listTaskTemplates, getRootTaskChain, listRecentSessions, countSessions, getBudget, getBudgets, upsertBudget, deleteBudget, getAllPricingRows, getPricingRows, getActivePricingRow, insertPricingRow, deletePricingRow, getDailySpendForAgent, getDailySpendGlobal, getDailySpendForUser, recordBudgetRefusalNotification, getBudgetRefusalNotification, getRecentBudgetRefusalNotifications, hasBudgetRefusalNotificationToday, setBudgetRefusalFollowUpTaskId, getLiveAgentCounts, getInstanceActivity, getSwarmMetrics, hasFirstCompletedTask, getKv, sweepExpiredKv, sweepExpiredKvPrefix, upsertKv, deleteKv, KvTypeCollisionError, incrKv, listKv, countKv, createScriptRun, recordInlineScriptRun, getScriptRun, getScriptRunByIdempotencyKey, listScriptRuns, countScriptRuns, countActiveScriptRuns, updateScriptRun, getRunningScriptRuns, getScriptRunJournalStep, upsertScriptRunJournalStep, listScriptRunJournalSteps, countScriptRunJournalSteps, countScriptRunJournalAgentTaskSteps, exports_db, init_db };
|
|
@@ -214,10 +214,13 @@ function clampMaxTokensToContext(model, context, maxTokens) {
|
|
|
214
214
|
return Math.min(maxTokens, Math.max(MIN_MAX_TOKENS, available));
|
|
215
215
|
}
|
|
216
216
|
function buildBaseOptions(model, context, options, apiKey) {
|
|
217
|
+
const samplingParams = model.samplingParams || options?.samplingParams ? { ...model.samplingParams, ...options?.samplingParams } : undefined;
|
|
217
218
|
return {
|
|
218
219
|
temperature: options?.temperature,
|
|
220
|
+
samplingParams,
|
|
219
221
|
maxTokens: clampMaxTokensToContext(model, context, options?.maxTokens ?? model.maxTokens),
|
|
220
222
|
signal: options?.signal,
|
|
223
|
+
telemetryContext: options?.telemetryContext,
|
|
221
224
|
apiKey: apiKey || options?.apiKey,
|
|
222
225
|
fetch: options?.fetch,
|
|
223
226
|
transport: options?.transport,
|
|
@@ -234,6 +237,7 @@ function buildBaseOptions(model, context, options, apiKey) {
|
|
|
234
237
|
env: options?.env
|
|
235
238
|
};
|
|
236
239
|
}
|
|
240
|
+
var MIN_ANSWER_TOKENS = 1024;
|
|
237
241
|
function clampReasoning(effort) {
|
|
238
242
|
return effort === "xhigh" || effort === "max" ? "high" : effort;
|
|
239
243
|
}
|
|
@@ -245,12 +249,11 @@ function adjustMaxTokensForThinking(baseMaxTokens, modelMaxTokens, reasoningLeve
|
|
|
245
249
|
high: 16384
|
|
246
250
|
};
|
|
247
251
|
const budgets = { ...defaultBudgets, ...customBudgets };
|
|
248
|
-
const minOutputTokens = 1024;
|
|
249
252
|
const level = clampReasoning(reasoningLevel);
|
|
250
253
|
let thinkingBudget = budgets[level];
|
|
251
254
|
const maxTokens = baseMaxTokens === undefined ? modelMaxTokens : Math.min(baseMaxTokens + thinkingBudget, modelMaxTokens);
|
|
252
255
|
if (maxTokens <= thinkingBudget) {
|
|
253
|
-
thinkingBudget = Math.max(0, maxTokens -
|
|
256
|
+
thinkingBudget = Math.max(0, maxTokens - MIN_ANSWER_TOKENS);
|
|
254
257
|
}
|
|
255
258
|
return { maxTokens, thinkingBudget };
|
|
256
259
|
}
|
|
@@ -410,4 +413,4 @@ function transformMessages(messages, model, normalizeToolCallId) {
|
|
|
410
413
|
return result;
|
|
411
414
|
}
|
|
412
415
|
|
|
413
|
-
export { getGrammarToolInput, appendGrammarToolInputJsonDelta, resolveJsonSchemaStrictSampling, resolveGrammarConstrainedSampling, createGrammarToolInputProperties, clampMaxTokensToContext, buildBaseOptions, clampReasoning, adjustMaxTokensForThinking, transformMessages };
|
|
416
|
+
export { getGrammarToolInput, appendGrammarToolInputJsonDelta, resolveJsonSchemaStrictSampling, resolveGrammarConstrainedSampling, createGrammarToolInputProperties, clampMaxTokensToContext, buildBaseOptions, MIN_ANSWER_TOKENS, clampReasoning, adjustMaxTokensForThinking, transformMessages };
|