@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,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveHttpProxyUrlForTarget
|
|
3
|
-
} from "./cli-cwy5hqbq.js";
|
|
4
1
|
import {
|
|
5
2
|
require_dist_cjs as require_dist_cjs3,
|
|
6
3
|
require_dist_cjs1 as require_dist_cjs4
|
|
@@ -9,15 +6,15 @@ import {
|
|
|
9
6
|
require_dist,
|
|
10
7
|
require_dist1 as require_dist2
|
|
11
8
|
} from "./cli-r6kqqbj0.js";
|
|
9
|
+
import {
|
|
10
|
+
resolveHttpProxyUrlForTarget
|
|
11
|
+
} from "./cli-cwy5hqbq.js";
|
|
12
12
|
import {
|
|
13
13
|
normalizeProviderError
|
|
14
14
|
} from "./cli-6map995v.js";
|
|
15
15
|
import {
|
|
16
16
|
getProviderEnvValue
|
|
17
17
|
} from "./cli-4wgngmwv.js";
|
|
18
|
-
import {
|
|
19
|
-
providerHeadersToRecord
|
|
20
|
-
} from "./cli-vapyk8sw.js";
|
|
21
18
|
import {
|
|
22
19
|
parseStreamingJson
|
|
23
20
|
} from "./cli-zyxs93y9.js";
|
|
@@ -26,12 +23,16 @@ import {
|
|
|
26
23
|
buildBaseOptions,
|
|
27
24
|
clampMaxTokensToContext,
|
|
28
25
|
clampReasoning,
|
|
26
|
+
getJsonSchemaToolParameters,
|
|
29
27
|
resolveJsonSchemaStrictSampling,
|
|
30
28
|
transformMessages
|
|
31
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-xmyqv00z.js";
|
|
32
30
|
import {
|
|
33
31
|
sanitizeSurrogates
|
|
34
32
|
} from "./cli-y2apkfe2.js";
|
|
33
|
+
import {
|
|
34
|
+
providerHeadersToRecord
|
|
35
|
+
} from "./cli-vapyk8sw.js";
|
|
35
36
|
import {
|
|
36
37
|
calculateCost
|
|
37
38
|
} from "./cli-akdvwc9v.js";
|
|
@@ -5190,6 +5191,7 @@ var stream = (model, context, options = {}) => {
|
|
|
5190
5191
|
}
|
|
5191
5192
|
let responseRequestId;
|
|
5192
5193
|
try {
|
|
5194
|
+
const supportsStrictMode = model.compat?.supportsStrictMode ?? false;
|
|
5193
5195
|
const client = new import_client_bedrock_runtime.BedrockRuntimeClient(config);
|
|
5194
5196
|
const customHeaders = providerHeadersToRecord(options.headers);
|
|
5195
5197
|
if (customHeaders) {
|
|
@@ -5205,7 +5207,7 @@ var stream = (model, context, options = {}) => {
|
|
|
5205
5207
|
...inferenceMaxTokens !== undefined && { maxTokens: inferenceMaxTokens },
|
|
5206
5208
|
...options.temperature !== undefined && { temperature: options.temperature }
|
|
5207
5209
|
},
|
|
5208
|
-
toolConfig: convertToolConfig(context.tools, options.toolChoice,
|
|
5210
|
+
toolConfig: convertToolConfig(context.tools, options.toolChoice, supportsStrictMode),
|
|
5209
5211
|
additionalModelRequestFields: buildAdditionalModelRequestFields(model, options),
|
|
5210
5212
|
...options.requestMetadata !== undefined && { requestMetadata: options.requestMetadata }
|
|
5211
5213
|
};
|
|
@@ -5564,6 +5566,15 @@ function createNonBlankTextBlock(text) {
|
|
|
5564
5566
|
function createRequiredTextBlock(text) {
|
|
5565
5567
|
return createNonBlankTextBlock(text) ?? { text: EMPTY_TEXT_PLACEHOLDER };
|
|
5566
5568
|
}
|
|
5569
|
+
function sanitizeBedrockDocument(value) {
|
|
5570
|
+
if (Array.isArray(value)) {
|
|
5571
|
+
return value.map(sanitizeBedrockDocument);
|
|
5572
|
+
}
|
|
5573
|
+
if (value !== null && typeof value === "object") {
|
|
5574
|
+
return Object.fromEntries(Object.entries(value).filter(([key]) => key.length > 0).map(([key, nestedValue]) => [key, sanitizeBedrockDocument(nestedValue)]));
|
|
5575
|
+
}
|
|
5576
|
+
return value;
|
|
5577
|
+
}
|
|
5567
5578
|
function convertToolResultContent(content) {
|
|
5568
5579
|
const result = [];
|
|
5569
5580
|
for (const c of content) {
|
|
@@ -5630,7 +5641,7 @@ function convertMessages(context, model, cacheRetention, env) {
|
|
|
5630
5641
|
}
|
|
5631
5642
|
case "toolCall":
|
|
5632
5643
|
contentBlocks.push({
|
|
5633
|
-
toolUse: { toolUseId: c.id, name: c.name, input: c.arguments }
|
|
5644
|
+
toolUse: { toolUseId: c.id, name: c.name, input: sanitizeBedrockDocument(c.arguments) }
|
|
5634
5645
|
});
|
|
5635
5646
|
break;
|
|
5636
5647
|
case "thinking": {
|
|
@@ -5728,7 +5739,7 @@ function convertToolConfig(tools, toolChoice, supportsStrictMode) {
|
|
|
5728
5739
|
toolSpec: {
|
|
5729
5740
|
name: tool.name,
|
|
5730
5741
|
description: tool.description,
|
|
5731
|
-
inputSchema: { json: tool
|
|
5742
|
+
inputSchema: { json: getJsonSchemaToolParameters(tool, strict) },
|
|
5732
5743
|
...strict === true ? { strict: true } : {}
|
|
5733
5744
|
}
|
|
5734
5745
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_env_flag,
|
|
3
|
+
parseEnvFlag
|
|
4
|
+
} from "./cli-qys3rhhz.js";
|
|
5
|
+
|
|
6
|
+
// src/utils/multi-runtime.ts
|
|
7
|
+
init_env_flag();
|
|
8
|
+
function isMultiRuntimeEnabled(env = process.env) {
|
|
9
|
+
return parseEnvFlag(env.MULTI_RUNTIME_ENABLED, false);
|
|
10
|
+
}
|
|
11
|
+
function swarmRuntimeInstanceId(env = process.env) {
|
|
12
|
+
return env.SWARM_RUNTIME_INSTANCE_ID || undefined;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { isMultiRuntimeEnabled, swarmRuntimeInstanceId };
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_env_flag,
|
|
3
|
+
parseEnvFlag
|
|
4
|
+
} from "./cli-qys3rhhz.js";
|
|
1
5
|
import {
|
|
2
6
|
__esm
|
|
3
7
|
} from "./cli-p9swy5t3.js";
|
|
@@ -219,28 +223,6 @@ var init_resolver = __esm(() => {
|
|
|
219
223
|
TEMPLATE_REF_REGEX = /\{\{@template\[([^\]]+)\]\}\}/g;
|
|
220
224
|
});
|
|
221
225
|
|
|
222
|
-
// src/utils/env-flag.ts
|
|
223
|
-
function parseEnvFlag(raw, defaultValue) {
|
|
224
|
-
if (raw === undefined || raw === null)
|
|
225
|
-
return defaultValue;
|
|
226
|
-
const normalized = raw.trim().toLowerCase();
|
|
227
|
-
if (normalized === "")
|
|
228
|
-
return defaultValue;
|
|
229
|
-
if (TRUTHY.has(normalized))
|
|
230
|
-
return true;
|
|
231
|
-
if (FALSY.has(normalized))
|
|
232
|
-
return false;
|
|
233
|
-
return defaultValue;
|
|
234
|
-
}
|
|
235
|
-
function isEnvFlagEnabled(key, defaultValue, env = process.env) {
|
|
236
|
-
return parseEnvFlag(env[key], defaultValue);
|
|
237
|
-
}
|
|
238
|
-
var TRUTHY, FALSY;
|
|
239
|
-
var init_env_flag = __esm(() => {
|
|
240
|
-
TRUTHY = new Set(["true", "1"]);
|
|
241
|
-
FALSY = new Set(["false", "0"]);
|
|
242
|
-
});
|
|
243
|
-
|
|
244
226
|
// src/utils/steering-enabled.ts
|
|
245
227
|
function isSteeringEnabled(env = process.env) {
|
|
246
228
|
return parseEnvFlag(env.STEERING_ENABLED, false);
|
|
@@ -298,7 +280,7 @@ As the lead agent, you coordinate all worker agents in the swarm.
|
|
|
298
280
|
|
|
299
281
|
**Identity:**
|
|
300
282
|
- \`update-profile\`: Update your own or other agents' profile fields (name, role, capabilities, soulMd, identityMd, heartbeatMd, claudeMd, toolsMd, setupScript)
|
|
301
|
-
- \`manage-user\`: Register or update human users (resolve from GitHub/GitLab identity or other source metadata)
|
|
283
|
+
- \`manage-user\`: Register or update human users (resolve from GitHub/GitLab identity or other source metadata). When you learn a requester's stable communication preferences (tone, language, verbosity), persist them with its \`comms\` field so future sessions adapt.
|
|
302
284
|
|
|
303
285
|
#### Task Routing
|
|
304
286
|
|
|
@@ -989,6 +971,31 @@ When working in a repository, your system prompt may include a **Repository Guid
|
|
|
989
971
|
**When reviewing:**
|
|
990
972
|
- Follow the repo's review guidance from the Repository Guidelines
|
|
991
973
|
- Failing CI is an automatic REQUEST_CHANGES
|
|
974
|
+
`,
|
|
975
|
+
variables: [],
|
|
976
|
+
category: "system"
|
|
977
|
+
});
|
|
978
|
+
registerTemplate({
|
|
979
|
+
eventType: "system.agent.communication_style",
|
|
980
|
+
header: "",
|
|
981
|
+
defaultBody: `
|
|
982
|
+
### Communication Style
|
|
983
|
+
|
|
984
|
+
Your persona lives in your SOUL.md (see Your Identity, when present). It defines who you are. The rules below define how you write, whoever you are.
|
|
985
|
+
|
|
986
|
+
They govern everything a human reads from you: Slack, PR and issue comments, tickets, email, pages, and task summaries.
|
|
987
|
+
|
|
988
|
+
- Write like a person, not a press release. Plain words, direct statements.
|
|
989
|
+
- Lead with the outcome or the answer. Context comes after.
|
|
990
|
+
- Keep sentences short (25 words or fewer). One idea per sentence.
|
|
991
|
+
- Use active voice. Say who did what.
|
|
992
|
+
- Never use em dashes. Use a period, a comma, a colon, or parentheses.
|
|
993
|
+
- No marketing adjectives (seamless, robust, powerful). State the fact that earns the claim instead.
|
|
994
|
+
- No hedge stacks ("might possibly perhaps"). Keep a hedge only when you are genuinely unsure, and keep it: "may have failed" never becomes "failed".
|
|
995
|
+
- No filler ("I hope this helps", "Great question!") and no formal sign-offs.
|
|
996
|
+
- If something is broken, blocked, or a bad idea, say so plainly and say why.
|
|
997
|
+
- Mirror the requester: reply in the language they wrote in, match their register, and answer at the depth they asked. A one-line question gets the answer first, detail after.
|
|
998
|
+
- If a Requester Profile section is present, it wins on tone, depth, and format. Correctness always wins over style.
|
|
992
999
|
`,
|
|
993
1000
|
variables: [],
|
|
994
1001
|
category: "system"
|
|
@@ -998,12 +1005,17 @@ When working in a repository, your system prompt may include a **Repository Guid
|
|
|
998
1005
|
header: "",
|
|
999
1006
|
defaultBody: `
|
|
1000
1007
|
## Requester Profile
|
|
1001
|
-
This task was requested by {{requester_name}}{{requester_role_suffix}}.{{requester_notes_section}}
|
|
1008
|
+
This task was requested by {{requester_name}}{{requester_role_suffix}}.{{requester_comms_section}}{{requester_notes_section}}
|
|
1002
1009
|
Honor this requester profile in tone, depth, and format where it doesn't conflict with correctness or your operating rules.
|
|
1010
|
+
If this task reveals new stable communication preferences for this requester, persist them: the lead updates \`comms\` (tone, language, verbosity) via \`manage-user\`.
|
|
1003
1011
|
`,
|
|
1004
1012
|
variables: [
|
|
1005
1013
|
{ name: "requester_name", description: "The requesting user's display name" },
|
|
1006
1014
|
{ name: "requester_role_suffix", description: "Formatted role suffix, including parentheses" },
|
|
1015
|
+
{
|
|
1016
|
+
name: "requester_comms_section",
|
|
1017
|
+
description: "Formatted communication preferences (tone/language/verbosity) sourced from users.metadata.comms, or empty string"
|
|
1018
|
+
},
|
|
1007
1019
|
{
|
|
1008
1020
|
name: "requester_notes_section",
|
|
1009
1021
|
description: "Formatted notes section sourced from users.notes, or empty string"
|
|
@@ -1039,7 +1051,8 @@ Honor this requester profile in tone, depth, and format where it doesn't conflic
|
|
|
1039
1051
|
|
|
1040
1052
|
{{@template[system.agent.system]}}
|
|
1041
1053
|
{{@template[system.agent.share_urls]}}
|
|
1042
|
-
{{@template[system.agent.code_quality]}}
|
|
1054
|
+
{{@template[system.agent.code_quality]}}
|
|
1055
|
+
{{@template[system.agent.communication_style]}}`,
|
|
1043
1056
|
variables: [
|
|
1044
1057
|
{ name: "role", description: "The agent's role" },
|
|
1045
1058
|
{ name: "agentId", description: "The agent's unique identifier" }
|
|
@@ -1060,7 +1073,8 @@ Honor this requester profile in tone, depth, and format where it doesn't conflic
|
|
|
1060
1073
|
|
|
1061
1074
|
{{@template[system.agent.system]}}
|
|
1062
1075
|
{{@template[system.agent.share_urls]}}
|
|
1063
|
-
{{@template[system.agent.code_quality]}}
|
|
1076
|
+
{{@template[system.agent.code_quality]}}
|
|
1077
|
+
{{@template[system.agent.communication_style]}}`,
|
|
1064
1078
|
variables: [
|
|
1065
1079
|
{ name: "role", description: "The agent's role" },
|
|
1066
1080
|
{ name: "agentId", description: "The agent's unique identifier" }
|
|
@@ -1082,7 +1096,8 @@ Honor this requester profile in tone, depth, and format where it doesn't conflic
|
|
|
1082
1096
|
|
|
1083
1097
|
{{@template[system.agent.system]}}
|
|
1084
1098
|
{{@template[system.agent.share_urls]}}
|
|
1085
|
-
{{@template[system.agent.code_quality]}}
|
|
1099
|
+
{{@template[system.agent.code_quality]}}
|
|
1100
|
+
{{@template[system.agent.communication_style]}}`,
|
|
1086
1101
|
variables: [
|
|
1087
1102
|
{ name: "role", description: "The agent's role" },
|
|
1088
1103
|
{ name: "agentId", description: "The agent's unique identifier" }
|
|
@@ -1104,7 +1119,8 @@ Honor this requester profile in tone, depth, and format where it doesn't conflic
|
|
|
1104
1119
|
|
|
1105
1120
|
{{@template[system.agent.system]}}
|
|
1106
1121
|
{{@template[system.agent.share_urls]}}
|
|
1107
|
-
{{@template[system.agent.code_quality]}}
|
|
1122
|
+
{{@template[system.agent.code_quality]}}
|
|
1123
|
+
{{@template[system.agent.communication_style]}}`,
|
|
1108
1124
|
variables: [
|
|
1109
1125
|
{ name: "role", description: "The agent's role" },
|
|
1110
1126
|
{ name: "agentId", description: "The agent's unique identifier" }
|
|
@@ -1141,7 +1157,9 @@ Your output is captured automatically — focus on doing the work and communicat
|
|
|
1141
1157
|
header: "",
|
|
1142
1158
|
defaultBody: `{{@template[system.agent.role]}}
|
|
1143
1159
|
|
|
1144
|
-
{{@template[system.agent.worker.remote]}}
|
|
1160
|
+
{{@template[system.agent.worker.remote]}}
|
|
1161
|
+
|
|
1162
|
+
{{@template[system.agent.communication_style]}}`,
|
|
1145
1163
|
variables: [
|
|
1146
1164
|
{ name: "role", description: "The agent's role" },
|
|
1147
1165
|
{ name: "agentId", description: "The agent's unique identifier" }
|
|
@@ -1150,4 +1168,4 @@ Your output is captured automatically — focus on doing the work and communicat
|
|
|
1150
1168
|
});
|
|
1151
1169
|
});
|
|
1152
1170
|
|
|
1153
|
-
export { findInterpolationTokens, interpolate, deepInterpolate, init_template, registerTemplate, getTemplateDefinition, getAllTemplateDefinitions, init_registry, configureDbResolver, configureHttpResolver, resolveTemplate, resolveTemplateAsync, init_resolver,
|
|
1171
|
+
export { findInterpolationTokens, interpolate, deepInterpolate, init_template, registerTemplate, getTemplateDefinition, getAllTemplateDefinitions, init_registry, configureDbResolver, configureHttpResolver, resolveTemplate, resolveTemplateAsync, init_resolver, isSteeringEnabled, init_steering_enabled, init_session_templates };
|