@desplega.ai/agent-swarm 1.131.0 → 1.133.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 +2 -2
- package/dist/{actions-w53mbns9.js → actions-cskpayd7.js} +11 -9
- package/dist/{anthropic-messages-rjmd2e7n.js → anthropic-messages-tpxtbx7b.js} +28 -12
- package/dist/{app-m9gwqsqv.js → app-ang77nbb.js} +8 -6
- package/dist/{assistant-bp65m6f3.js → assistant-b4exebdw.js} +16 -13
- package/dist/{azure-openai-responses-c0yjmbfd.js → azure-openai-responses-m3921t4y.js} +8 -8
- package/dist/{boot-reembed-62p0at2k.js → boot-reembed-ps2aftpb.js} +9 -7
- package/dist/{boot-reembed-xmfp6wdh.js → boot-reembed-znyk3nxb.js} +10 -8
- package/dist/{boot-scrub-logs-rr8q2dms.js → boot-scrub-logs-2ax3xgz1.js} +7 -5
- package/dist/{claude-adapter-2y47mrkd.js → claude-adapter-3ct8kgxw.js} +13 -9
- package/dist/{claude-managed-adapter-gv19tdew.js → claude-managed-adapter-akx4ntf2.js} +2 -2
- package/dist/{cli-t1xze5qh.js → cli-13w2hwkh.js} +1 -1
- package/dist/{cli-efxfnq6q.js → cli-1532szb1.js} +8 -6
- package/dist/{cli-d2tfkcga.js → cli-23d3rseb.js} +33 -17
- package/dist/{cli-nm5gtp1x.js → cli-2a75z9c5.js} +196 -7
- package/dist/{cli-fywms69x.js → cli-2t30rj0d.js} +1 -1
- package/dist/{cli-cvgjwnh1.js → cli-3c3tdgab.js} +10 -10
- package/dist/{cli-pm6xbh84.js → cli-3zzxa9jz.js} +46 -16
- package/dist/{cli-cdeg08wx.js → cli-4k6233gc.js} +1 -1
- package/dist/{cli-t55yw3a1.js → cli-5p2tz05r.js} +2 -2
- package/dist/{cli-0rcyq6d9.js → cli-5z2yhzvd.js} +125 -47
- package/dist/{cli-3kf51j15.js → cli-6zfq31nj.js} +9 -3
- package/dist/{cli-er3a4bb0.js → cli-8m9de10a.js} +6 -1
- package/dist/{cli-gm9cbhbq.js → cli-8t14vg9w.js} +27 -8
- package/dist/{cli-72q8m8gk.js → cli-9nfc2es8.js} +6 -6
- package/dist/{cli-5ze9rv97.js → cli-9ta3pwms.js} +11 -4
- package/dist/{cli-78xwvkhj.js → cli-avr0ns7z.js} +2 -2
- package/dist/{cli-n6h8qt8n.js → cli-c897wyhw.js} +12 -7
- package/dist/{cli-2q72qz2s.js → cli-dgk20ft7.js} +15 -6
- package/dist/cli-et1bbwqf.js +13 -0
- package/dist/{cli-bqw0mt1n.js → cli-f5w27pj3.js} +3 -3
- package/dist/{cli-2wadx7p2.js → cli-f8dre4bz.js} +2 -2
- package/dist/{cli-e7ckcg4v.js → cli-ftwpv451.js} +170 -387
- package/dist/{cli-g6b8x1h8.js → cli-g854s2dw.js} +1 -1
- package/dist/{cli-5kx36evn.js → cli-ggmdxeqa.js} +13 -8
- package/dist/cli-hkwfe3qj.js +530 -0
- package/dist/{cli-5dsbcjjw.js → cli-jqwnqx9m.js} +1 -1
- package/dist/{cli-9dr5qzc0.js → cli-ny122vh4.js} +21 -10
- package/dist/{cli-5v4rw6yd.js → cli-pvzqhbs9.js} +2 -2
- package/dist/cli-pzq5rjym.js +15 -0
- package/dist/{cli-xpxde7rm.js → cli-qes8ef67.js} +48 -30
- package/dist/{cli-sajgpkqg.js → cli-qs9hhsvb.js} +1723 -325
- package/dist/cli-qys3rhhz.js +27 -0
- package/dist/{cli-rzbpmxdr.js → cli-r6tpm37h.js} +2 -2
- package/dist/{cli-qv61hp37.js → cli-rch80c76.js} +2 -2
- package/dist/{cli-0258203w.js → cli-rpp0x4zy.js} +137 -17
- package/dist/{cli-5n6e5yfn.js → cli-s1k0wxhe.js} +12 -7
- package/dist/{cli-psh3c4va.js → cli-sfd9v7sj.js} +1 -1
- package/dist/{cli-70xqj0z3.js → cli-sh3ytsyj.js} +49 -39
- package/dist/{cli-zsspvvm2.js → cli-w1mp9jy7.js} +1 -1
- package/dist/{cli-d3x3x1c9.js → cli-xdb4mpnp.js} +2 -2
- package/dist/{cli-57khth04.js → cli-xmyqv00z.js} +120 -4
- package/dist/{cli-yw8vghx2.js → cli-xv8t8p3c.js} +65 -32
- package/dist/{cli-f1am9szv.js → cli-xxv5pn4f.js} +1 -1
- package/dist/{cli-t76vw5db.js → cli-y08jvxzx.js} +601 -140
- package/dist/{cli-a4jzdpa3.js → cli-zfbf3srj.js} +650 -245
- package/dist/{cli-a40rnf71.js → cli-zmq89k34.js} +6 -6
- package/dist/{cli-qmdnhpej.js → cli-zr9q011v.js} +23 -13
- package/dist/cli.js +22 -22
- package/dist/{codex-adapter-d24q75wk.js → codex-adapter-bef93pq4.js} +9 -7
- package/dist/{codex-hook-hq54t9ft.js → codex-hook-e8dba65p.js} +3 -2
- package/dist/{codex-session-runner-g50vcsex.js → codex-session-runner-5pkxys7x.js} +9 -7
- package/dist/{commands-c3nrc5hg.js → commands-e23s1bff.js} +9 -7
- package/dist/{db-nt7fg3tw.js → db-m3nabatn.js} +17 -5
- package/dist/{google-generative-ai-hysrd8qx.js → google-generative-ai-8maw55xh.js} +11 -8
- package/dist/{google-vertex-p5arrga0.js → google-vertex-8vjqmx8g.js} +11 -8
- package/dist/{handlers-fkr6swat.js → handlers-akazedvr.js} +16 -13
- package/dist/{hook-77wpvnjc.js → hook-ze4cpf0v.js} +55 -41
- package/dist/{hook-g019yehy.js → hook-zfqyyenw.js} +10 -7
- package/dist/{http-jewj0syk.js → http-sja0n6kw.js} +730 -150
- package/dist/index-0gr8vd6k.js +39 -0
- package/dist/{index-7n2xpbd4.js → index-354vkhdv.js} +154 -74
- package/dist/{index-070v4eyb.js → index-5qthek5t.js} +2 -3
- package/dist/{index-hfvggd0z.js → index-95t3cqq5.js} +16 -14
- package/dist/{index-9znhar3x.js → index-sea66619.js} +3 -4
- package/dist/{index-6gm5he8h.js → index-vpn36mma.js} +15 -13
- package/dist/{keepalive-j0fjvqfd.js → keepalive-3sp3meqj.js} +16 -10
- package/dist/{lead-1n8x30xe.js → lead-mefeewkf.js} +39 -36
- package/dist/{maintenance-gvev11sa.js → maintenance-8tbrbjfg.js} +10 -8
- package/dist/mistral-conversations-00zrp7g4.js +717 -0
- package/dist/{oauth-refresh-sweep-s9ecsvh0.js → oauth-refresh-sweep-srjwjz6m.js} +8 -6
- package/dist/{onboard-pvm5b38w.js → onboard-mt2tgyjg.js} +7 -7
- package/dist/{openai-codex-responses-5g27pd6f.js → openai-codex-responses-map32h2s.js} +18 -18
- package/dist/{openai-completions-3vkmfz2a.js → openai-completions-w871b1cq.js} +12 -11
- package/dist/{openai-responses-dg4t7j7a.js → openai-responses-b0j7xnw8.js} +15 -12
- package/dist/{opencode-adapter-1gm38aba.js → opencode-adapter-b39jefcj.js} +5 -3
- package/dist/{openrouter-images-g3gm8931.js → openrouter-images-srfkywy0.js} +4 -4
- package/dist/{otel-impl-p6jvgd9c.js → otel-impl-z6pxt3j9.js} +224 -9
- package/dist/{pi-mono-adapter-t091s27g.js → pi-mono-adapter-btvqmj58.js} +1138 -408
- package/dist/{pricing-refresh-k49rcyed.js → pricing-refresh-kyq8cezh.js} +9 -7
- package/dist/{rbac-roles-cr80g96t.js → rbac-roles-3ryfrfna.js} +8 -6
- package/dist/{rbac-roles-30pspvy7.js → rbac-roles-6qfvbee1.js} +9 -7
- package/dist/{render-v2-xm457ng1.js → render-v2-p61ppjey.js} +8 -6
- package/dist/{seed-pricing-yhpv35fr.js → seed-pricing-j56bbj4y.js} +8 -6
- package/dist/{setup-nytnmwwr.js → setup-tpr6c1kn.js} +2 -2
- package/dist/{worker-msytr2cw.js → worker-9w1v0mbb.js} +39 -36
- package/openapi.json +542 -16
- package/package.json +6 -6
- package/src/be/budget-refusal-notify.ts +14 -7
- package/src/be/db-queries/task-artifacts.ts +182 -0
- package/src/be/db.ts +783 -169
- package/src/be/events.ts +5 -0
- package/src/be/migrations/130_scratch_script_retention_grace.sql +6 -0
- package/src/be/migrations/131_session_logs_created_at_index.sql +2 -0
- package/src/be/migrations/132_multi_runtime_instances.sql +44 -0
- package/src/be/migrations/133_workflow_run_trigger_type.sql +12 -0
- package/src/be/migrations/135_backfill_task_pull_request_attachments.sql +228 -0
- package/src/be/migrations/136_task_requester_provenance.sql +37 -0
- package/src/be/migrations/137_memory_retrieval_composite_index.sql +1 -0
- package/src/be/multi-runtime.ts +430 -0
- package/src/be/scripts/db.ts +43 -1
- package/src/be/scripts/extract-schema.ts +3 -1
- package/src/be/scripts/retention.ts +164 -0
- package/src/be/scripts/run-saved.ts +16 -1
- package/src/be/scripts/typecheck.ts +3 -2
- package/src/be/seed-skills/index.ts +7 -0
- package/src/be/steering.ts +1 -1
- package/src/be/swarm-config-guard.ts +18 -0
- package/src/commands/credential-wait.ts +54 -0
- package/src/commands/onboard/steps/core-credentials.tsx +1 -1
- package/src/commands/onboard/steps/custom-templates.tsx +1 -1
- package/src/commands/onboard/steps/harness-credentials.tsx +1 -1
- package/src/commands/onboard/steps/health-check.tsx +1 -1
- package/src/commands/onboard/steps/start.tsx +1 -1
- package/src/commands/profile-sync-audit.ts +56 -0
- package/src/commands/profile-sync.ts +287 -15
- package/src/commands/provider-credentials.ts +46 -19
- package/src/commands/runner.ts +196 -33
- package/src/commands/templates.ts +22 -0
- package/src/github/handlers.ts +55 -9
- package/src/heartbeat/heartbeat.ts +71 -12
- package/src/hooks/hook.ts +49 -33
- package/src/http/active-sessions.ts +11 -1
- package/src/http/agents.ts +261 -30
- package/src/http/all-routes.ts +1 -0
- package/src/http/config.ts +13 -2
- package/src/http/core.ts +102 -4
- package/src/http/db-query-bounded.ts +313 -0
- package/src/http/db-query-shared.ts +249 -0
- package/src/http/db-query.ts +54 -42
- package/src/http/events.ts +2 -0
- package/src/http/index.ts +27 -2
- package/src/http/mcp-bridge.ts +37 -3
- package/src/http/mcp.ts +12 -0
- package/src/http/memory.ts +13 -2
- package/src/http/openapi.ts +1 -0
- package/src/http/poll.ts +70 -27
- package/src/http/route-def.ts +43 -9
- package/src/http/schedules.ts +2 -2
- package/src/http/scripts.ts +31 -4
- package/src/http/session-data.ts +44 -0
- package/src/http/tasks.ts +2 -2
- package/src/http/users.ts +74 -52
- package/src/http/webhooks.ts +5 -2
- package/src/http/workflows.ts +1 -4
- package/src/http/x.ts +14 -0
- package/src/integrations/kapso/inbound.ts +1 -1
- package/src/jira/outbound.ts +39 -8
- package/src/jira/webhook-lifecycle.ts +13 -2
- package/src/linear/outbound.ts +43 -10
- package/src/oauth/keepalive.ts +13 -2
- package/src/prompts/base-prompt.ts +1 -1
- package/src/prompts/session-templates.ts +45 -7
- package/src/providers/claude-adapter.ts +6 -0
- package/src/providers/claude-managed-models.ts +34 -10
- package/src/providers/codex-adapter.ts +6 -0
- package/src/providers/opencode-adapter.ts +6 -0
- package/src/providers/pi-mono-adapter.ts +8 -0
- package/src/providers/pricing-sources.md +24 -0
- package/src/queue-stall-alarm.ts +216 -0
- package/src/scheduler/scheduler.ts +7 -0
- package/src/script-workflows/executor.ts +2 -1
- package/src/scripts-runtime/executors/native.ts +2 -1
- package/src/scripts-runtime/executors/types.ts +5 -0
- package/src/scripts-runtime/loader.ts +5 -0
- package/src/scripts-runtime/swarm-config.ts +8 -0
- package/src/scripts-runtime/swarm-sdk.ts +7 -0
- package/src/scripts-runtime/types/stdlib.d.ts +1 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +1 -0
- package/src/tests/budget-claim-gate.test.ts +20 -0
- package/src/tests/claude-adapter.test.ts +32 -0
- package/src/tests/claude-managed-adapter.test.ts +38 -7
- package/src/tests/codex-adapter.test.ts +30 -0
- package/src/tests/create-task-validation.test.ts +128 -0
- package/src/tests/credential-wait.test.ts +67 -1
- package/src/tests/db-query.test.ts +711 -2
- package/src/tests/http-api-integration.test.ts +81 -0
- package/src/tests/http-users.test.ts +166 -1
- package/src/tests/identity-field-budget.test.ts +176 -0
- package/src/tests/mcp-tools-user.test.ts +34 -0
- package/src/tests/mcp-user-route.test.ts +17 -0
- package/src/tests/metrics-http.test.ts +44 -0
- package/src/tests/multi-runtime-registration.test.ts +2703 -0
- package/src/tests/openapi-response-contract.test.ts +24 -0
- package/src/tests/openapi-route-headers.test.ts +83 -0
- package/src/tests/opencode-adapter.test.ts +40 -0
- package/src/tests/outbound-listener-rejection.test.ts +138 -0
- package/src/tests/pi-mono-adapter.test.ts +98 -0
- package/src/tests/profile-sync-warning.test.ts +277 -0
- package/src/tests/profile-sync.test.ts +232 -6
- package/src/tests/prompt-template-session.test.ts +32 -3
- package/src/tests/queue-stall-alarm.test.ts +226 -0
- package/src/tests/requester-comms.test.ts +32 -0
- package/src/tests/runner-requester-profile.test.ts +38 -0
- package/src/tests/sandboxed-process.test.ts +45 -0
- package/src/tests/schedule-target-type.test.ts +38 -0
- package/src/tests/script-connections.test.ts +16 -3
- 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/scripts-runtime-identity.test.ts +375 -0
- package/src/tests/scripts-runtime.test.ts +4 -3
- package/src/tests/sdk-allowlist.test.ts +47 -0
- package/src/tests/send-task-requested-by.test.ts +9 -0
- package/src/tests/session-costs.test.ts +506 -1
- package/src/tests/shutdown-error-scrubbing.test.ts +92 -0
- package/src/tests/steering-core.test.ts +28 -0
- package/src/tests/task-artifacts.test.ts +386 -0
- package/src/tests/task-attachments-schema.test.ts +17 -1
- package/src/tests/task-completion-idempotency.test.ts +57 -0
- package/src/tests/task-pull-request-backfill-migration.test.ts +321 -0
- package/src/tests/update-profile-api.test.ts +67 -39
- package/src/tests/update-profile-auth.test.ts +48 -4
- package/src/tests/user-attribution-migration.test.ts +54 -0
- package/src/tests/user-identity.test.ts +72 -0
- package/src/tests/workflow-async-v2.test.ts +39 -1
- package/src/tests/workflow-http-v2.test.ts +3 -2
- package/src/tests/workflow-mcp-trigger-schema.test.ts +52 -3
- package/src/tests/workflow-retry-v2.test.ts +45 -1
- package/src/tests/workflow-swarm-script.test.ts +14 -5
- package/src/tools/db-query.ts +18 -8
- package/src/tools/get-task-details.ts +24 -3
- package/src/tools/manage-user.ts +36 -3
- package/src/tools/poll-task.ts +93 -14
- package/src/tools/script-common.ts +5 -0
- package/src/tools/send-task.ts +1 -4
- package/src/tools/store-progress.ts +13 -2
- package/src/tools/swarm-config/delete-config.ts +9 -0
- package/src/tools/swarm-config/set-config.ts +3 -2
- package/src/tools/task-action.ts +30 -0
- package/src/tools/task-tool-ctx.ts +8 -1
- package/src/tools/update-profile.ts +16 -21
- package/src/tools/utils.ts +5 -0
- package/src/tools/workflows/trigger-workflow.ts +7 -1
- package/src/types.ts +165 -1
- package/src/utils/github-pull-request.ts +76 -0
- package/src/utils/identity-field-budget.ts +73 -0
- package/src/utils/multi-runtime.ts +20 -0
- package/src/utils/requester-comms.ts +24 -0
- package/src/utils/sandboxed-process.ts +40 -14
- package/src/workflows/engine.ts +22 -2
- package/src/workflows/executors/swarm-script.ts +24 -1
- package/src/workflows/resume.ts +19 -11
- package/src/workflows/retry-poller.ts +1 -0
- package/src/workflows/triggers.ts +4 -0
- package/templates/schedules/daily-compounding-reflection/content.md +12 -3
- package/templates/skills/db-query-guidance/config.json +14 -0
- package/templates/skills/db-query-guidance/content.md +57 -0
- package/dist/cli-3te4jdkm.js +0 -225
- package/dist/cli-bmze986d.js +0 -7
- package/dist/cli-kh3ba2zf.js +0 -607
- package/dist/index-hp1kdbjj.js +0 -36
- package/dist/mistral-conversations-81fwav0j.js +0 -30578
- package/dist/otel-nqa12wf3.js +0 -3149
- package/dist/{pi-messages-tqj8q6b9.js → pi-messages-sssy32x4.js} +3 -3
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isMultiRuntimeEnabled
|
|
3
|
+
} from "./cli-pzq5rjym.js";
|
|
1
4
|
import {
|
|
2
5
|
taskAttachmentDisplayUrl
|
|
3
6
|
} from "./cli-t930g0xh.js";
|
|
@@ -9,20 +12,206 @@ import {
|
|
|
9
12
|
getDb,
|
|
10
13
|
getDependentTasks,
|
|
11
14
|
getLeadAgent,
|
|
15
|
+
getSwarmConfigs,
|
|
12
16
|
getTaskAttachments,
|
|
13
17
|
getTaskById,
|
|
14
18
|
hasNonTerminalRerouteDecisionChild,
|
|
15
19
|
init_date_utils,
|
|
16
20
|
init_db,
|
|
17
|
-
|
|
18
|
-
normalizeDateRequired
|
|
19
|
-
|
|
21
|
+
init_templates,
|
|
22
|
+
normalizeDateRequired,
|
|
23
|
+
updateAgentMaxTasks,
|
|
24
|
+
updateAgentStatus,
|
|
25
|
+
upsertSwarmConfig
|
|
26
|
+
} from "./cli-zfbf3srj.js";
|
|
20
27
|
import {
|
|
21
|
-
init_env_flag,
|
|
22
28
|
init_resolver,
|
|
23
|
-
isEnvFlagEnabled,
|
|
24
29
|
resolveTemplate
|
|
25
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-qes8ef67.js";
|
|
31
|
+
import {
|
|
32
|
+
init_env_flag,
|
|
33
|
+
isEnvFlagEnabled
|
|
34
|
+
} from "./cli-qys3rhhz.js";
|
|
35
|
+
|
|
36
|
+
// src/be/multi-runtime.ts
|
|
37
|
+
init_db();
|
|
38
|
+
var AGENT_MAX_TASKS_CONFIG_KEY = "AGENT_MAX_TASKS";
|
|
39
|
+
function parseAgentMaxTasksValue(raw) {
|
|
40
|
+
const str = raw.trim();
|
|
41
|
+
if (!/^\d+$/.test(str))
|
|
42
|
+
return null;
|
|
43
|
+
const value = Number(str);
|
|
44
|
+
return value >= 1 && value <= 100 ? value : null;
|
|
45
|
+
}
|
|
46
|
+
function defaultMaxTasksForAgent(agent) {
|
|
47
|
+
return agent.isLead ? 2 : 1;
|
|
48
|
+
}
|
|
49
|
+
function getAgentMaxTasksConfig(agentId) {
|
|
50
|
+
return getSwarmConfigs({ scope: "agent", scopeId: agentId, key: AGENT_MAX_TASKS_CONFIG_KEY })[0] ?? null;
|
|
51
|
+
}
|
|
52
|
+
function reconcileAgentMaxTasksPolicy(agentId) {
|
|
53
|
+
const agent = getAgentById(agentId);
|
|
54
|
+
if (!agent)
|
|
55
|
+
return;
|
|
56
|
+
const existing = getAgentMaxTasksConfig(agentId);
|
|
57
|
+
if (existing) {
|
|
58
|
+
const authoritative = parseAgentMaxTasksValue(existing.value);
|
|
59
|
+
if (authoritative !== null && authoritative !== (agent.maxTasks ?? 1)) {
|
|
60
|
+
updateAgentMaxTasks(agentId, authoritative);
|
|
61
|
+
}
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
upsertSwarmConfig({
|
|
65
|
+
scope: "agent",
|
|
66
|
+
scopeId: agentId,
|
|
67
|
+
key: AGENT_MAX_TASKS_CONFIG_KEY,
|
|
68
|
+
value: String(agent.maxTasks ?? defaultMaxTasksForAgent(agent)),
|
|
69
|
+
description: "Logical agent max-tasks policy (seeded from agents.maxTasks)"
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function resetAgentMaxTasksMirror(agentId) {
|
|
73
|
+
const agent = getAgentById(agentId);
|
|
74
|
+
if (!agent)
|
|
75
|
+
return;
|
|
76
|
+
updateAgentMaxTasks(agentId, defaultMaxTasksForAgent(agent));
|
|
77
|
+
}
|
|
78
|
+
function upsertSwarmConfigWithPolicyMirror(data) {
|
|
79
|
+
const scopeId = data.scope === "agent" ? data.scopeId : null;
|
|
80
|
+
if (!scopeId || data.key !== AGENT_MAX_TASKS_CONFIG_KEY) {
|
|
81
|
+
return upsertSwarmConfig(data);
|
|
82
|
+
}
|
|
83
|
+
return getDb().transaction(() => {
|
|
84
|
+
const row = upsertSwarmConfig(data);
|
|
85
|
+
const value = parseAgentMaxTasksValue(data.value);
|
|
86
|
+
if (value !== null)
|
|
87
|
+
updateAgentMaxTasks(scopeId, value);
|
|
88
|
+
return row;
|
|
89
|
+
})();
|
|
90
|
+
}
|
|
91
|
+
function rowToRuntimeInstance(row) {
|
|
92
|
+
let metadata = null;
|
|
93
|
+
if (row.metadata) {
|
|
94
|
+
try {
|
|
95
|
+
metadata = JSON.parse(row.metadata);
|
|
96
|
+
} catch {
|
|
97
|
+
metadata = null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
id: row.id,
|
|
102
|
+
agentId: row.agent_id,
|
|
103
|
+
status: row.status,
|
|
104
|
+
reportedSlots: row.reported_slots,
|
|
105
|
+
credentialReady: row.credential_ready === null ? null : row.credential_ready === 1,
|
|
106
|
+
metadata,
|
|
107
|
+
lastSeenAt: row.last_seen_at,
|
|
108
|
+
createdAt: row.created_at,
|
|
109
|
+
updatedAt: row.updated_at
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function runtimeStaleThresholdMinutes() {
|
|
113
|
+
return Number(process.env.RUNTIME_STALE_THRESHOLD_MIN) || 5;
|
|
114
|
+
}
|
|
115
|
+
function runtimeLivenessCutoff() {
|
|
116
|
+
return new Date(Date.now() - runtimeStaleThresholdMinutes() * 60 * 1000).toISOString();
|
|
117
|
+
}
|
|
118
|
+
function upsertRuntimeInstance(instance) {
|
|
119
|
+
const metadataJson = instance.metadata ? JSON.stringify(instance.metadata) : null;
|
|
120
|
+
const row = getDb().prepare(`INSERT INTO runtime_instances (id, agent_id, status, reported_slots, metadata)
|
|
121
|
+
VALUES (?, ?, 'active', ?, ?)
|
|
122
|
+
ON CONFLICT(id) DO UPDATE SET
|
|
123
|
+
status = 'active',
|
|
124
|
+
reported_slots = excluded.reported_slots,
|
|
125
|
+
metadata = COALESCE(excluded.metadata, runtime_instances.metadata),
|
|
126
|
+
last_seen_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now'),
|
|
127
|
+
updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
128
|
+
WHERE runtime_instances.agent_id = excluded.agent_id
|
|
129
|
+
RETURNING *`).get(instance.id, instance.agentId, instance.reportedSlots, metadataJson);
|
|
130
|
+
return row ? rowToRuntimeInstance(row) : null;
|
|
131
|
+
}
|
|
132
|
+
function getRuntimeInstanceById(id) {
|
|
133
|
+
const row = getDb().prepare("SELECT * FROM runtime_instances WHERE id = ?").get(id);
|
|
134
|
+
return row ? rowToRuntimeInstance(row) : null;
|
|
135
|
+
}
|
|
136
|
+
function touchRuntimeInstance(id, agentId) {
|
|
137
|
+
const result = getDb().prepare(`UPDATE runtime_instances
|
|
138
|
+
SET last_seen_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now'),
|
|
139
|
+
updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
140
|
+
WHERE id = ? AND agent_id = ? AND status = 'active' AND last_seen_at >= ?`).run(id, agentId, runtimeLivenessCutoff());
|
|
141
|
+
return result.changes > 0;
|
|
142
|
+
}
|
|
143
|
+
function markRuntimeInstanceOffline(id, agentId) {
|
|
144
|
+
const row = getDb().prepare(`UPDATE runtime_instances
|
|
145
|
+
SET status = 'offline', updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
146
|
+
WHERE id = ? AND agent_id = ? RETURNING *`).get(id, agentId);
|
|
147
|
+
return row ? rowToRuntimeInstance(row) : null;
|
|
148
|
+
}
|
|
149
|
+
function countActiveRuntimeInstancesForAgent(agentId) {
|
|
150
|
+
const result = getDb().prepare(`SELECT COUNT(*) as count FROM runtime_instances
|
|
151
|
+
WHERE agent_id = ? AND status = 'active' AND last_seen_at >= ?`).get(agentId, runtimeLivenessCutoff());
|
|
152
|
+
return result?.count ?? 0;
|
|
153
|
+
}
|
|
154
|
+
function listRuntimeInstancesForAgent(agentId) {
|
|
155
|
+
const rows = getDb().prepare(`SELECT *, (status = 'active' AND last_seen_at >= ?) AS is_live
|
|
156
|
+
FROM runtime_instances
|
|
157
|
+
WHERE agent_id = ?
|
|
158
|
+
ORDER BY created_at ASC, id ASC`).all(runtimeLivenessCutoff(), agentId);
|
|
159
|
+
return rows.map((row) => ({ ...rowToRuntimeInstance(row), isLive: row.is_live === 1 }));
|
|
160
|
+
}
|
|
161
|
+
function setRuntimeCredentialReady(id, agentId, ready) {
|
|
162
|
+
const result = getDb().prepare(`UPDATE runtime_instances
|
|
163
|
+
SET credential_ready = ?, updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
164
|
+
WHERE id = ? AND agent_id = ? AND status = 'active' AND last_seen_at >= ?`).run(ready ? 1 : 0, id, agentId, runtimeLivenessCutoff());
|
|
165
|
+
return result.changes > 0;
|
|
166
|
+
}
|
|
167
|
+
function hasReadyLiveRuntime(agentId) {
|
|
168
|
+
const row = getDb().prepare(`SELECT COUNT(*) c FROM runtime_instances
|
|
169
|
+
WHERE agent_id = ? AND status = 'active' AND last_seen_at >= ?
|
|
170
|
+
AND (credential_ready IS NULL OR credential_ready = 1)`).get(agentId, runtimeLivenessCutoff());
|
|
171
|
+
return (row?.c ?? 0) > 0;
|
|
172
|
+
}
|
|
173
|
+
function reconcileAgentStatusFromRuntimes(agentId) {
|
|
174
|
+
const agent = getAgentById(agentId);
|
|
175
|
+
if (!agent)
|
|
176
|
+
return;
|
|
177
|
+
if (countActiveRuntimeInstancesForAgent(agentId) === 0) {
|
|
178
|
+
if (agent.status !== "offline")
|
|
179
|
+
updateAgentStatus(agentId, "offline");
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
if (!hasReadyLiveRuntime(agentId)) {
|
|
183
|
+
if (agent.status !== "waiting_for_credentials") {
|
|
184
|
+
updateAgentStatus(agentId, "waiting_for_credentials");
|
|
185
|
+
}
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
const next = getActiveTaskCount(agentId) > 0 ? "busy" : "idle";
|
|
189
|
+
if (agent.status !== next)
|
|
190
|
+
updateAgentStatus(agentId, next);
|
|
191
|
+
}
|
|
192
|
+
function agentsWithLiveRuntime() {
|
|
193
|
+
const rows = getDb().prepare(`SELECT DISTINCT agent_id FROM runtime_instances
|
|
194
|
+
WHERE status = 'active' AND last_seen_at >= ?`).all(runtimeLivenessCutoff());
|
|
195
|
+
return new Set(rows.map((r) => r.agent_id));
|
|
196
|
+
}
|
|
197
|
+
function expireStaleRuntimeInstances() {
|
|
198
|
+
if (!isMultiRuntimeEnabled()) {
|
|
199
|
+
return { expired: 0, agentsOffline: 0, pruned: 0 };
|
|
200
|
+
}
|
|
201
|
+
return getDb().transaction(() => {
|
|
202
|
+
const cutoff = runtimeLivenessCutoff();
|
|
203
|
+
const stale = getDb().prepare(`SELECT id, agent_id FROM runtime_instances
|
|
204
|
+
WHERE status = 'active' AND last_seen_at < ?`).all(cutoff);
|
|
205
|
+
const pruned = getDb().prepare("DELETE FROM runtime_instances WHERE last_seen_at < ?").run(cutoff).changes;
|
|
206
|
+
let agentsOffline = 0;
|
|
207
|
+
for (const agentId of new Set(stale.map((r) => r.agent_id))) {
|
|
208
|
+
reconcileAgentStatusFromRuntimes(agentId);
|
|
209
|
+
if (getAgentById(agentId)?.status === "offline")
|
|
210
|
+
agentsOffline++;
|
|
211
|
+
}
|
|
212
|
+
return { expired: stale.length, agentsOffline, pruned };
|
|
213
|
+
})();
|
|
214
|
+
}
|
|
26
215
|
|
|
27
216
|
// src/be/db-queries/tracker.ts
|
|
28
217
|
init_date_utils();
|
|
@@ -387,4 +576,4 @@ function createPoolStarvationDecisionTask(args) {
|
|
|
387
576
|
return { kind: "created", task: created };
|
|
388
577
|
}
|
|
389
578
|
|
|
390
|
-
export { getTrackerSync, getTrackerSyncByExternalId, createTrackerSyncIfAbsent, updateTrackerSyncSwarmId, repointTrackerSyncBySwarmId, createTrackerSync, updateTrackerSync, deleteTrackerSync, hasTrackerDelivery, markTrackerDelivery, getAllTrackerSyncs, createTrackerAgentMapping, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, getResumeGeneration, getNextResumeGeneration, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask };
|
|
579
|
+
export { AGENT_MAX_TASKS_CONFIG_KEY, reconcileAgentMaxTasksPolicy, resetAgentMaxTasksMirror, upsertSwarmConfigWithPolicyMirror, runtimeStaleThresholdMinutes, upsertRuntimeInstance, getRuntimeInstanceById, touchRuntimeInstance, markRuntimeInstanceOffline, countActiveRuntimeInstancesForAgent, listRuntimeInstancesForAgent, setRuntimeCredentialReady, reconcileAgentStatusFromRuntimes, agentsWithLiveRuntime, expireStaleRuntimeInstances, getTrackerSync, getTrackerSyncByExternalId, createTrackerSyncIfAbsent, updateTrackerSyncSwarmId, repointTrackerSyncBySwarmId, createTrackerSync, updateTrackerSync, deleteTrackerSync, hasTrackerDelivery, markTrackerDelivery, getAllTrackerSyncs, createTrackerAgentMapping, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, getResumeGeneration, getNextResumeGeneration, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask };
|
|
@@ -37,15 +37,15 @@ import {
|
|
|
37
37
|
setSlackMessageTracking,
|
|
38
38
|
slackContextKey,
|
|
39
39
|
updateSlackMessageRecord
|
|
40
|
-
} from "./cli-
|
|
41
|
-
import {
|
|
42
|
-
init_env_flag,
|
|
43
|
-
isEnvFlagEnabled
|
|
44
|
-
} from "./cli-xpxde7rm.js";
|
|
40
|
+
} from "./cli-zfbf3srj.js";
|
|
45
41
|
import {
|
|
46
42
|
getAppUrl,
|
|
47
43
|
init_constants
|
|
48
44
|
} from "./cli-x23me2mg.js";
|
|
45
|
+
import {
|
|
46
|
+
init_env_flag,
|
|
47
|
+
isEnvFlagEnabled
|
|
48
|
+
} from "./cli-qys3rhhz.js";
|
|
49
49
|
import {
|
|
50
50
|
require_receiver,
|
|
51
51
|
require_sender,
|
|
@@ -55420,13 +55420,13 @@ async function initSlackApp() {
|
|
|
55420
55420
|
socketMode: true,
|
|
55421
55421
|
logLevel: import_bolt.LogLevel.DEBUG
|
|
55422
55422
|
});
|
|
55423
|
-
const { registerMessageHandler } = await import("./handlers-
|
|
55424
|
-
const { registerCommandHandler } = await import("./commands-
|
|
55425
|
-
const { registerActionHandlers } = await import("./actions-
|
|
55423
|
+
const { registerMessageHandler } = await import("./handlers-akazedvr.js");
|
|
55424
|
+
const { registerCommandHandler } = await import("./commands-e23s1bff.js");
|
|
55425
|
+
const { registerActionHandlers } = await import("./actions-cskpayd7.js");
|
|
55426
55426
|
registerMessageHandler(app);
|
|
55427
55427
|
registerCommandHandler(app);
|
|
55428
55428
|
registerActionHandlers(app);
|
|
55429
|
-
const { createAssistant } = await import("./assistant-
|
|
55429
|
+
const { createAssistant } = await import("./assistant-b4exebdw.js");
|
|
55430
55430
|
app.assistant(createAssistant());
|
|
55431
55431
|
return app;
|
|
55432
55432
|
}
|
|
@@ -55435,7 +55435,7 @@ async function startSlackApp() {
|
|
|
55435
55435
|
await initSlackApp();
|
|
55436
55436
|
}
|
|
55437
55437
|
if (app) {
|
|
55438
|
-
const { isSlackRenderV2Enabled: isSlackRenderV2Enabled2 } = await import("./render-v2-
|
|
55438
|
+
const { isSlackRenderV2Enabled: isSlackRenderV2Enabled2 } = await import("./render-v2-p61ppjey.js");
|
|
55439
55439
|
if (isSlackRenderV2Enabled2())
|
|
55440
55440
|
ensureSlackRenderV2Activation();
|
|
55441
55441
|
await app.start();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
McpHttpClient
|
|
3
|
-
} from "./cli-epan13p1.js";
|
|
4
1
|
import {
|
|
5
2
|
getApiKey
|
|
6
3
|
} from "./cli-f14fvzag.js";
|
|
4
|
+
import {
|
|
5
|
+
McpHttpClient
|
|
6
|
+
} from "./cli-epan13p1.js";
|
|
7
7
|
import {
|
|
8
8
|
embedScript
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-rch80c76.js";
|
|
10
10
|
import {
|
|
11
11
|
calculatePKCECodeChallenge,
|
|
12
12
|
ensureAuthorizationTokenOrThrow,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
oauthAppRowToProviderConfig,
|
|
19
19
|
updateAuthorizationTokens,
|
|
20
20
|
upsertAuthorization
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-g854s2dw.js";
|
|
22
22
|
import {
|
|
23
23
|
CredentialBroker,
|
|
24
24
|
DEFAULT_CREDENTIAL_BINDINGS,
|
|
@@ -38,14 +38,14 @@ import {
|
|
|
38
38
|
normalizeDateRequired,
|
|
39
39
|
placeholderForConfigKey,
|
|
40
40
|
upsertSwarmConfig
|
|
41
|
-
} from "./cli-
|
|
41
|
+
} from "./cli-zfbf3srj.js";
|
|
42
42
|
import {
|
|
43
43
|
init_env_flag,
|
|
44
44
|
isEnvFlagEnabled
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-qys3rhhz.js";
|
|
46
46
|
import {
|
|
47
47
|
init_zod
|
|
48
|
-
} from "./cli-
|
|
48
|
+
} from "./cli-w1mp9jy7.js";
|
|
49
49
|
import {
|
|
50
50
|
init_secret_scrubber,
|
|
51
51
|
refreshSecretScrubberCache,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
} from "./cli-4j2mrzag.js";
|
|
56
56
|
import {
|
|
57
57
|
exports_external
|
|
58
|
-
} from "./cli-
|
|
58
|
+
} from "./cli-jqwnqx9m.js";
|
|
59
59
|
import {
|
|
60
60
|
__commonJS,
|
|
61
61
|
__require,
|
|
@@ -171126,7 +171126,8 @@ async function upsertScriptByName(args) {
|
|
|
171126
171126
|
const argsJsonSchema2 = args.argsJsonSchema !== undefined ? args.argsJsonSchema : existing.argsJsonSchema;
|
|
171127
171127
|
const trackedMetadataChanged = args.description !== existing.description || args.intent !== existing.intent || args.signatureJson !== existing.signatureJson || argsJsonSchema2 !== existing.argsJsonSchema;
|
|
171128
171128
|
const promotedFromScratch = existing.isScratch && !isScratch2;
|
|
171129
|
-
|
|
171129
|
+
const refreshScratchLastUsed = existing.scope === "agent" && existing.name.startsWith("scratch-") && existing.isScratch && isScratch2;
|
|
171130
|
+
if (fsMode2 !== existing.fsMode || isScratch2 !== existing.isScratch || typeChecked2 !== existing.typeChecked || trackedMetadataChanged || refreshScratchLastUsed) {
|
|
171130
171131
|
const row = getDb().prepare(`UPDATE scripts
|
|
171131
171132
|
SET description = ?, intent = ?, signatureJson = ?, argsJsonSchema = ?,
|
|
171132
171133
|
isScratch = ?, typeChecked = ?, fsMode = ?, updatedAt = ?, updated_by = ?
|
|
@@ -171235,6 +171236,15 @@ function deleteScript(args) {
|
|
|
171235
171236
|
const result = getDb().run("DELETE FROM scripts WHERE id = ?", [existing.id]);
|
|
171236
171237
|
return result.changes > 0;
|
|
171237
171238
|
}
|
|
171239
|
+
function touchScratchScriptLastUsed(id, at = new Date().toISOString()) {
|
|
171240
|
+
const result = getDb().prepare(`UPDATE scripts SET updatedAt = ?
|
|
171241
|
+
WHERE id = ? AND scope = 'agent' AND isScratch = 1 AND name GLOB 'scratch-*'`).run(at, id);
|
|
171242
|
+
return result.changes > 0 ? at : null;
|
|
171243
|
+
}
|
|
171244
|
+
function restoreScratchScriptLastUsedIfUnchanged(id, priorUpdatedAt, expectedUpdatedAt) {
|
|
171245
|
+
return getDb().prepare(`UPDATE scripts SET updatedAt = ?
|
|
171246
|
+
WHERE id = ? AND scope = 'agent' AND isScratch = 1 AND name GLOB 'scratch-*' AND updatedAt = ?`).run(priorUpdatedAt, id, expectedUpdatedAt).changes > 0;
|
|
171247
|
+
}
|
|
171238
171248
|
var SCRIPT_API_ID_LEN = 12;
|
|
171239
171249
|
function rowToScriptApi(row) {
|
|
171240
171250
|
return {
|
|
@@ -171350,6 +171360,9 @@ async function buildEgressSecrets() {
|
|
|
171350
171360
|
return await broker.resolveBindings({});
|
|
171351
171361
|
}
|
|
171352
171362
|
|
|
171363
|
+
// src/scripts-runtime/executors/native.ts
|
|
171364
|
+
import { fileURLToPath } from "node:url";
|
|
171365
|
+
|
|
171353
171366
|
// src/utils/sandboxed-process.ts
|
|
171354
171367
|
var DEFAULT_SANDBOX_LIMITS = {
|
|
171355
171368
|
virtualMemoryMb: 512,
|
|
@@ -171359,23 +171372,39 @@ var DEFAULT_SANDBOX_LIMITS = {
|
|
|
171359
171372
|
maxFdCount: 64
|
|
171360
171373
|
};
|
|
171361
171374
|
var BUN_SANDBOX_VIRTUAL_MEMORY_MB = 4096;
|
|
171375
|
+
var JAVASCRIPT_RUNTIME_SANDBOX_MAX_PROCS = 512;
|
|
171376
|
+
var JAVASCRIPT_RUNTIMES = new Set(["bun", "bunx", "node", "nodejs", "npx"]);
|
|
171377
|
+
var SHELL_RUNTIMES = new Set(["bash", "dash", "sh"]);
|
|
171378
|
+
function commandBasename(command) {
|
|
171379
|
+
return command.slice(command.lastIndexOf("/") + 1);
|
|
171380
|
+
}
|
|
171381
|
+
function usesInterpreterSandboxProfile(innerCommand) {
|
|
171382
|
+
const runtime = commandBasename(innerCommand[0] ?? "");
|
|
171383
|
+
return JAVASCRIPT_RUNTIMES.has(runtime) || SHELL_RUNTIMES.has(runtime);
|
|
171384
|
+
}
|
|
171362
171385
|
function shellQuote(value) {
|
|
171363
171386
|
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
171364
171387
|
}
|
|
171365
171388
|
function buildSandboxedCommand(innerCommand, env, limits = DEFAULT_SANDBOX_LIMITS) {
|
|
171366
171389
|
if (process.platform === "win32")
|
|
171367
171390
|
return [...innerCommand];
|
|
171368
|
-
const
|
|
171391
|
+
const usesInterpreterProfile = usesInterpreterSandboxProfile(innerCommand);
|
|
171392
|
+
const virtualMemoryMb = usesInterpreterProfile ? Math.max(limits.virtualMemoryMb, BUN_SANDBOX_VIRTUAL_MEMORY_MB) : limits.virtualMemoryMb;
|
|
171393
|
+
const maxProcs = usesInterpreterProfile ? Math.max(limits.maxProcs, JAVASCRIPT_RUNTIME_SANDBOX_MAX_PROCS) : limits.maxProcs;
|
|
171369
171394
|
const ulimits = [
|
|
171370
171395
|
`ulimit -v ${Math.floor(virtualMemoryMb * 1024)} 2>/dev/null || true`,
|
|
171371
171396
|
`ulimit -t ${limits.cpuTimeSec} 2>/dev/null || true`,
|
|
171372
|
-
`ulimit -u ${
|
|
171397
|
+
`ulimit -u ${maxProcs} 2>/dev/null || true`,
|
|
171373
171398
|
`ulimit -f ${limits.maxFileKb} 2>/dev/null || true`,
|
|
171374
171399
|
`ulimit -n ${limits.maxFdCount} 2>/dev/null || true`
|
|
171375
171400
|
].join("; ");
|
|
171376
171401
|
const envAssignments = Object.entries(env).map(([key, value]) => `${key}=${shellQuote(value)}`).join(" ");
|
|
171377
171402
|
const quotedInner = innerCommand.map(shellQuote).join(" ");
|
|
171378
|
-
return [
|
|
171403
|
+
return [
|
|
171404
|
+
usesInterpreterProfile ? "bash" : "sh",
|
|
171405
|
+
"-c",
|
|
171406
|
+
`${ulimits}; exec env -i ${envAssignments} ${quotedInner}`
|
|
171407
|
+
];
|
|
171379
171408
|
}
|
|
171380
171409
|
function sandboxSpawnEnv(env) {
|
|
171381
171410
|
return process.platform === "win32" ? { ...env } : { PATH: env.PATH ?? "" };
|
|
@@ -171508,7 +171537,7 @@ class NativeScriptExecutor {
|
|
|
171508
171537
|
const sourceFile = `${tmpdir}/source.ts`;
|
|
171509
171538
|
const resultFile = `${tmpdir}/result.json`;
|
|
171510
171539
|
const errorFile = `${tmpdir}/error.json`;
|
|
171511
|
-
const harnessPath = process.env.SCRIPT_RUNTIME_DIR ? `${process.env.SCRIPT_RUNTIME_DIR}/eval-harness.bundle.js` : new URL("../eval-harness.ts", import.meta.url)
|
|
171540
|
+
const harnessPath = process.env.SCRIPT_RUNTIME_DIR ? `${process.env.SCRIPT_RUNTIME_DIR}/eval-harness.bundle.js` : fileURLToPath(new URL("../eval-harness.ts", import.meta.url));
|
|
171512
171541
|
const controller = new AbortController;
|
|
171513
171542
|
let timedOut = false;
|
|
171514
171543
|
let killed = input.signal?.aborted ?? false;
|
|
@@ -171698,7 +171727,8 @@ async function buildConfigPayload(input) {
|
|
|
171698
171727
|
mcpBaseUrl: {
|
|
171699
171728
|
value: input.mcpBaseUrl ?? process.env.MCP_BASE_URL ?? "http://localhost:3013",
|
|
171700
171729
|
isSecret: false
|
|
171701
|
-
}
|
|
171730
|
+
},
|
|
171731
|
+
...input.runtimeInstanceId ? { runtimeInstanceId: { value: input.runtimeInstanceId, isSecret: false } } : {}
|
|
171702
171732
|
},
|
|
171703
171733
|
user: input.userConfig ?? {},
|
|
171704
171734
|
egressSecrets: input.egressSecrets ?? await buildEgressSecrets(),
|
|
@@ -171822,4 +171852,4 @@ async function buildScriptCredentialBindings(input) {
|
|
|
171822
171852
|
return (await buildScriptCredentialBindingsWithFailures(input)).egressSecrets;
|
|
171823
171853
|
}
|
|
171824
171854
|
|
|
171825
|
-
export { MIN_SCRIPT_WALL_CLOCK_MS, SCRIPT_LONG_TIMEOUT_HINT_MS, MAX_SCRIPT_WALL_CLOCK_MS, DEFAULT_SCRIPT_RESOURCES, isInvalidClientError, assertUrlSafe, publicEndpointSsrfOptions, discoverProtectedResourceMetadata, discoverAuthorizationServerMetadata, normalizeTokenEndpointAuthMethod, resolveAdvertisedTokenEndpointAuthMethod, authMethodForStoredClient, selectDcrTokenEndpointAuthMethod, registerClient, buildAuthorizeUrl, exchangeCodeForTokens, refreshMcpToken, revokeMcpToken, computeExpiresAt, getMcpOAuthToken, findReusableMcpOAuthClient, invalidateMcpOAuthClient, upsertMcpOAuthToken, applyMcpOAuthRefresh, markMcpOAuthTokenStatus, deleteMcpOAuthToken, insertMcpOAuthPending, consumeMcpOAuthPending, gcMcpOAuthPending, setMcpServerAuthMethod, ensureMcpToken, callMcpServerTool, listVendoredOpenapiEntries, ConnectionAuthInputSchema, connectionAuthSummary, listRelationalCredentialBindings, upsertCredentialBinding, disableCredentialBinding, listScriptConnections, getScriptConnectionById, connectionAuthInputFromFlat, upsertScriptConnection, refreshScriptConnection, setScriptConnectionEnabled, getScriptApiConnectionDescriptors, getScriptMcpConnectionDescriptors, getScriptApiTypes, getScriptMcpTypes, upsertScriptByName, getScript, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, buildSandboxedCommand, sandboxSpawnEnv, createCappedStreamState, snapshotCapped, readStreamCapped, require_typescript, validateScriptImports, runScript, oauthAppToProviderConfig, getOAuthProviderConfig, getOAuthBindingTokenStatus, buildScriptCredentialBindingsWithFailures, buildScriptCredentialBindings };
|
|
171855
|
+
export { MIN_SCRIPT_WALL_CLOCK_MS, SCRIPT_LONG_TIMEOUT_HINT_MS, MAX_SCRIPT_WALL_CLOCK_MS, DEFAULT_SCRIPT_RESOURCES, isInvalidClientError, assertUrlSafe, publicEndpointSsrfOptions, discoverProtectedResourceMetadata, discoverAuthorizationServerMetadata, normalizeTokenEndpointAuthMethod, resolveAdvertisedTokenEndpointAuthMethod, authMethodForStoredClient, selectDcrTokenEndpointAuthMethod, registerClient, buildAuthorizeUrl, exchangeCodeForTokens, refreshMcpToken, revokeMcpToken, computeExpiresAt, getMcpOAuthToken, findReusableMcpOAuthClient, invalidateMcpOAuthClient, upsertMcpOAuthToken, applyMcpOAuthRefresh, markMcpOAuthTokenStatus, deleteMcpOAuthToken, insertMcpOAuthPending, consumeMcpOAuthPending, gcMcpOAuthPending, setMcpServerAuthMethod, ensureMcpToken, callMcpServerTool, listVendoredOpenapiEntries, ConnectionAuthInputSchema, connectionAuthSummary, listRelationalCredentialBindings, upsertCredentialBinding, disableCredentialBinding, listScriptConnections, getScriptConnectionById, connectionAuthInputFromFlat, upsertScriptConnection, refreshScriptConnection, setScriptConnectionEnabled, getScriptApiConnectionDescriptors, getScriptMcpConnectionDescriptors, getScriptApiTypes, getScriptMcpTypes, upsertScriptByName, getScript, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, touchScratchScriptLastUsed, restoreScratchScriptLastUsedIfUnchanged, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, buildSandboxedCommand, sandboxSpawnEnv, createCappedStreamState, snapshotCapped, readStreamCapped, require_typescript, validateScriptImports, runScript, oauthAppToProviderConfig, getOAuthProviderConfig, getOAuthBindingTokenStatus, buildScriptCredentialBindingsWithFailures, buildScriptCredentialBindings };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildModelsDevSeedRows,
|
|
3
3
|
loadModelsDevCache
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-13w2hwkh.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogEntry,
|
|
7
7
|
getActivePricingRow,
|
|
8
8
|
getDb,
|
|
9
9
|
init_db,
|
|
10
10
|
insertPricingRow
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-zfbf3srj.js";
|
|
12
12
|
import {
|
|
13
13
|
init_secret_scrubber,
|
|
14
14
|
scrubSecrets
|