@desplega.ai/agent-swarm 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/{acp-adapter-dgfakfpw.js → acp-adapter-ma1js5n7.js} +6 -6
- package/dist/{actions-fbqma8aa.js → actions-1vhmtvg9.js} +18 -18
- package/dist/{amp-adapter-en0jy6hs.js → amp-adapter-sxqqvmdk.js} +3 -3
- package/dist/{app-k8a5cgpp.js → app-mwx1d5a9.js} +3 -3
- package/dist/{assistant-a16433gr.js → assistant-yx1p6g82.js} +20 -20
- package/dist/{boot-reembed-f4nn561n.js → boot-reembed-5h37a2c2.js} +1 -1
- package/dist/{boot-reembed-6c1sjfnr.js → boot-reembed-7h78vmvv.js} +2 -1
- package/dist/{boot-scrub-sweep-d4w9gajf.js → boot-scrub-sweep-8mawd4gw.js} +3 -3
- package/dist/{boot-seeds-9bmkspyw.js → boot-seeds-ca84dhnn.js} +4 -4
- package/dist/{claude-adapter-nys1kjxa.js → claude-adapter-wqt4hfkq.js} +7 -7
- package/dist/{claude-managed-adapter-55207973.js → claude-managed-adapter-6fjqtr2z.js} +2 -2
- package/dist/{claude-managed-setup-3cm35gey.js → claude-managed-setup-rqv98sea.js} +2 -2
- package/dist/{claude-sdk-session-nw5yd8cp.js → claude-sdk-session-f29f3b2x.js} +7 -7
- package/dist/{cli-sxgtf5fw.js → cli-07q03xm2.js} +1 -1
- package/dist/{cli-k21gx5ht.js → cli-1hhbzkbb.js} +6 -6
- package/dist/{cli-v49fkghp.js → cli-1m9x8dr5.js} +1 -1
- package/dist/{cli-24j1jeeb.js → cli-2pvzmas1.js} +3 -3
- package/dist/{cli-w2656ka1.js → cli-2y7v133v.js} +7 -7
- package/dist/{cli-g8ka5j4j.js → cli-48gxjmcz.js} +94 -36
- package/dist/{cli-2sjhpsns.js → cli-54sj64fc.js} +1 -1
- package/dist/{cli-aj8djyqt.js → cli-60sty27p.js} +2 -2
- package/dist/{cli-4hxrf0p4.js → cli-6a9qfa8b.js} +308 -47
- package/dist/{cli-n7asmce6.js → cli-6mgdba42.js} +3 -3
- package/dist/{cli-gf95q3bm.js → cli-6srv653c.js} +3 -3
- package/dist/{cli-9abdgn5t.js → cli-86ehn4s5.js} +3 -3
- package/dist/{cli-bqztfyve.js → cli-8mbc9za9.js} +1 -1
- package/dist/{cli-a2rr0fmg.js → cli-8wmj18cz.js} +1 -1
- package/dist/{cli-c2habvsf.js → cli-9gsm2rzp.js} +8 -8
- package/dist/{cli-4rf0f5vg.js → cli-9pshx6rd.js} +4 -2
- package/dist/{cli-abkm71vr.js → cli-a6ds2epe.js} +1 -1
- package/dist/{cli-esakngh8.js → cli-a89zdqz9.js} +1 -1
- package/dist/{cli-3ndmpxxv.js → cli-ay40dnj3.js} +2 -2
- package/dist/{cli-kf4jree9.js → cli-aypd09nf.js} +1 -1
- package/dist/{cli-6y51ryva.js → cli-b3yzyc57.js} +1 -1
- package/dist/{cli-ag2yrnt5.js → cli-c668vvcf.js} +2 -2
- package/dist/{cli-5sckpqcx.js → cli-d20qvpr2.js} +1 -1
- package/dist/{cli-a34pr3w1.js → cli-e1595bgx.js} +2 -2
- package/dist/{cli-m70bajzr.js → cli-f12mr20z.js} +1 -1
- package/dist/{cli-dqygeeh5.js → cli-f1e0ptjj.js} +10 -1
- package/dist/{cli-mvjz5an3.js → cli-f4dbh7a5.js} +7 -7
- package/dist/{cli-az25fn5f.js → cli-gsfk58nw.js} +2 -2
- package/dist/{cli-1tem6ns9.js → cli-gt4h8cxw.js} +3 -2
- package/dist/{cli-cz37jqss.js → cli-h5jeg46p.js} +2 -2
- package/dist/{cli-emhjcj2y.js → cli-he9gbdx0.js} +60 -10
- package/dist/{cli-3fwqy71j.js → cli-j0ppywdr.js} +38 -31
- package/dist/{cli-5rj83bam.js → cli-j3y0x2n4.js} +34 -33
- package/dist/{cli-3gfvmzht.js → cli-j9bpmykh.js} +73 -25
- package/dist/{cli-m5a9m0ak.js → cli-kv7sbc2c.js} +3 -3
- package/dist/{cli-g20jjwt4.js → cli-m30k9777.js} +12 -12
- package/dist/{cli-683y0b3a.js → cli-m5e802r7.js} +2 -2
- package/dist/{cli-nn6vx2mq.js → cli-ptfq202x.js} +5 -3
- package/dist/{cli-d2dpf95n.js → cli-qj442fws.js} +1 -1
- package/dist/{cli-03gg9pd1.js → cli-rd5m70gj.js} +4 -4
- package/dist/{cli-gnsb1zxa.js → cli-s09j9vp5.js} +1 -1
- package/dist/{cli-zqne1qcj.js → cli-s0mgx214.js} +2 -2
- package/dist/{cli-sqma6vw1.js → cli-sgqm2582.js} +5 -5
- package/dist/{cli-nq677csy.js → cli-sjctjr48.js} +1 -1
- package/dist/{cli-3aqd4jaa.js → cli-twctnkng.js} +3 -3
- package/dist/{cli-j6rktc91.js → cli-v6shg7na.js} +1 -1
- package/dist/{cli-7enjwya9.js → cli-vz78s5wm.js} +1 -1
- package/dist/{cli-art7c1zh.js → cli-wqr7cea4.js} +4 -4
- package/dist/{cli-hfeb68z4.js → cli-x37r7qwf.js} +11 -3
- package/dist/{cli-ffvsj2qw.js → cli-yd2nreqw.js} +2 -2
- package/dist/{cli-ca6banwz.js → cli-ymjpkxgn.js} +6 -6
- package/dist/{cli-mtnj4fwa.js → cli-yxbsmx56.js} +5 -5
- package/dist/cli.js +18 -16
- package/dist/{codex-adapter-d95q4qsn.js → codex-adapter-zk59x2zh.js} +5 -5
- package/dist/{codex-hook-brpnycn5.js → codex-hook-xyjhvxwd.js} +1 -1
- package/dist/{codex-session-runner-gdwd8h0c.js → codex-session-runner-kh6s4j3n.js} +5 -5
- package/dist/{commands-jqmgk54b.js → commands-68et1qv2.js} +2 -2
- package/dist/{controller-z3jq589f.js → controller-fyrbnzg4.js} +2 -2
- package/dist/{controllers-connect-r2za39ef.js → controllers-connect-nep9h2xv.js} +19 -19
- package/dist/{cursor-adapter-4mr4jgkw.js → cursor-adapter-yss3pg7t.js} +1 -1
- package/dist/{db-w36wwb5g.js → db-28gjyvxj.js} +2 -2
- package/dist/{db-ppv2tze7.js → db-8ftwvzba.js} +3 -3
- package/dist/{dispatcher-pv5h77vf.js → dispatcher-hayexmkr.js} +17 -17
- package/dist/{dsh-adapter-d4pdpb3r.js → dsh-adapter-46wawff9.js} +1 -1
- package/dist/{easter-egg-3d-4sp4dvmc.js → easter-egg-3d-8d1e0h4m.js} +1 -1
- package/dist/{execute-jev839y1.js → execute-cjrfxfnm.js} +1 -1
- package/dist/{external-channel-y6nkzhnn.js → external-channel-xbmxcg09.js} +2 -2
- package/dist/{grok-adapter-t08b9ntm.js → grok-adapter-ag4wks2a.js} +7 -7
- package/dist/handlers-tzmevqb5.js +41 -0
- package/dist/{heartbeat-vn31xwdk.js → heartbeat-psfvcgwp.js} +20 -20
- package/dist/{hook-6d0zbvvt.js → hook-8pz04697.js} +5 -5
- package/dist/{hook-cpjs8q51.js → hook-cyq4mryn.js} +6 -6
- package/dist/{http-9c6medda.js → http-haj1nd6k.js} +109 -114
- package/dist/{index-qhjf2htm.js → index-jwt2bj6f.js} +261 -96
- package/dist/{index-g6k9tctj.js → index-q52f47pe.js} +1 -1
- package/dist/{index-pkma1yf8.js → index-syvhnvtw.js} +1 -1
- package/dist/{index-yqgbfgaj.js → index-y1ajx04a.js} +20 -20
- package/dist/{index-k0yt1tvq.js → index-z5h22pes.js} +17 -17
- package/dist/{index-38t35h0n.js → index-zyq8ct52.js} +17 -17
- package/dist/{keepalive-em0117bp.js → keepalive-xdvsamvj.js} +3 -3
- package/dist/{lead-23e7z59t.js → lead-hqg57kdp.js} +35 -35
- package/dist/{maintenance-kbme3qy9.js → maintenance-4y2xzh3a.js} +1 -1
- package/dist/{oauth-refresh-sweep-xysj4yse.js → oauth-refresh-sweep-jd4r7zbs.js} +8 -3
- package/dist/{onboard-p6q0vz97.js → onboard-18447q9q.js} +5 -5
- package/dist/{opencode-adapter-esv3k9yn.js → opencode-adapter-26b2frdf.js} +5 -5
- package/dist/{otel-impl-54qhqh1z.js → otel-impl-f9tgr8yw.js} +1 -1
- package/dist/{pi-mono-adapter-mymbwhj0.js → pi-mono-adapter-qn6qbga1.js} +33 -12
- package/dist/{pricing-refresh-yb75wv33.js → pricing-refresh-dw2tgb53.js} +3 -3
- package/dist/{rbac-roles-1vp2mw4p.js → rbac-roles-aygm2760.js} +2 -2
- package/dist/{rbac-roles-dexhc9x8.js → rbac-roles-s4nwj2m3.js} +1 -1
- package/dist/{render-v2-tjay5hhf.js → render-v2-yfvdfr0x.js} +3 -3
- package/dist/{resume-8ayf37g5.js → resume-1bmvjbf3.js} +7 -7
- package/dist/{runtime-hqe5cqcd.js → runtime-f7tpzedy.js} +1 -1
- package/dist/{session-access-fdhp987s.js → session-access-r5garej6.js} +4 -4
- package/dist/{session-source-backfill-qgtc86z1.js → session-source-backfill-424wzv0r.js} +2 -2
- package/dist/{setup-4rrmqcq3.js → setup-8tygvxkq.js} +1 -1
- package/dist/{virtual-modules-52km00d6.js → virtual-modules-xsw323b3.js} +2 -2
- package/dist/{work-objects-p28fgd70.js → work-objects-ggnghpgf.js} +20 -20
- package/dist/{worker-e3w7vye1.js → worker-sqjd1nqf.js} +35 -35
- package/openapi.json +69 -1
- package/package.json +5 -3
- package/src/be/automation-preflight.ts +2 -0
- package/src/be/db/api-keys.ts +9 -0
- package/src/be/db/workflow-runs.ts +36 -5
- package/src/be/db.ts +80 -22
- package/src/be/memory/task-learning.ts +155 -0
- package/src/be/migrations/245_script_executor.sql +3 -0
- package/src/be/oauth-refresh-sweep.ts +2 -1
- package/src/be/scripts/boot-reembed.ts +2 -0
- package/src/be/scripts/db.ts +14 -4
- package/src/be/scripts/embeddings.ts +2 -0
- package/src/be/scripts/run-saved.ts +1 -0
- package/src/be/scripts/typecheck.ts +9 -3
- package/src/be/seed-skills/index.ts +7 -0
- package/src/commands/onboard/compose-generator.ts +5 -3
- package/src/commands/provider-credentials.ts +2 -1
- package/src/heartbeat/heartbeat.ts +14 -1
- package/src/heartbeat/script-runner-probe.ts +47 -0
- package/src/http/api-keys.ts +24 -9
- package/src/http/idempotency-key.ts +1 -1
- package/src/http/index.ts +3 -3
- package/src/http/pages-public.ts +38 -5
- package/src/http/scripts.ts +27 -0
- package/src/http/workflows.ts +10 -0
- package/src/http/x.ts +5 -0
- package/src/prompts/base-prompt.ts +21 -1
- package/src/prompts/session-templates.ts +17 -3
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/dsh-adapter.ts +1 -1
- package/src/providers/pi-mono-adapter.ts +41 -11
- package/src/scheduler/scheduler.ts +2 -1
- package/src/scripts-runtime/eval-harness.ts +8 -1
- package/src/scripts-runtime/executors/native.ts +22 -16
- package/src/scripts-runtime/executors/quickjs-prelude.ts +103 -1
- package/src/scripts-runtime/executors/quickjs-runner.ts +2 -1
- package/src/scripts-runtime/executors/quickjs.ts +7 -0
- package/src/scripts-runtime/executors/registry.ts +32 -0
- package/src/scripts-runtime/executors/types.ts +7 -0
- package/src/scripts-runtime/host-validated-args.ts +133 -0
- package/src/scripts-runtime/loader.ts +30 -3
- package/src/scripts-runtime/swarm-sdk.ts +9 -2
- package/src/scripts-runtime/types/stdlib.d.ts +9 -1
- package/src/scripts-runtime/types/swarm-sdk.d.ts +9 -1
- package/src/tests/api-key-status-by-suffix.test.ts +242 -0
- package/src/tests/base-prompt.test.ts +70 -2
- package/src/tests/community-linear-delivery-loop.test.ts +2099 -0
- package/src/tests/credential-check.test.ts +4 -2
- package/src/tests/docs-index.test.ts +135 -0
- package/src/tests/dsh-adapter.test.ts +1 -1
- package/src/tests/fetch-resolved-env.test.ts +16 -2
- package/src/tests/heartbeat-checklist.test.ts +89 -0
- package/src/tests/heartbeat-script-runner-probe.test.ts +83 -0
- package/src/tests/oauth-refresh-sweep.test.ts +34 -1
- package/src/tests/onboard-compose.test.ts +20 -0
- package/src/tests/opencode-adapter.test.ts +2 -1
- package/src/tests/pages-frame-ancestors.test.ts +162 -0
- package/src/tests/pi-codemode.test.ts +2 -1
- package/src/tests/pi-mono-adapter.test.ts +54 -0
- package/src/tests/pi-native-mcp.test.ts +13 -1
- package/src/tests/pi-tool-exposure.test.ts +8 -8
- package/src/tests/probe-tool-schema-tokens.test.ts +144 -0
- package/src/tests/prompt-template-session.test.ts +4 -3
- package/src/tests/request-composition-derive.test.ts +329 -0
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tests/script-executor-conformance.test.ts +36 -1
- package/src/tests/script-executor-quickjs-pool.test.ts +50 -0
- package/src/tests/script-executor-quickjs.test.ts +140 -0
- package/src/tests/script-host-validated-args-native.test.ts +196 -0
- package/src/tests/script-per-script-executor.test.ts +415 -0
- package/src/tests/scripts-external-api.test.ts +45 -0
- package/src/tests/sdk-allowlist.test.ts +3 -2
- package/src/tests/self-improvement.test.ts +4 -4
- package/src/tests/store-progress-learning.test.ts +288 -0
- package/src/tests/ui-logs-parser.test.ts +180 -0
- package/src/tests/workflow-engine-v2.test.ts +116 -1
- package/src/tests/workflow-mcp-trigger-schema.test.ts +209 -0
- package/src/tests/workflow-run-finished-event.test.ts +263 -0
- package/src/tests/workflow-swarm-script.test.ts +34 -0
- package/src/tools/script-common.ts +1 -0
- package/src/tools/script-run.ts +7 -0
- package/src/tools/script-upsert.ts +7 -0
- package/src/tools/store-progress.ts +67 -1
- package/src/tools/workflows/trigger-workflow.ts +104 -10
- package/src/types.ts +12 -1
- package/src/utils/credentials.ts +5 -2
- package/src/workflows/engine.ts +18 -16
- package/src/workflows/executors/swarm-script.ts +5 -0
- package/src/workflows/foreach-driver.ts +5 -11
- package/src/workflows/node-timeout.ts +30 -0
- package/templates/community/linear-delivery-loop/PLAYBOOK.md +323 -0
- package/templates/community/linear-delivery-loop/README.md +38 -0
- package/templates/community/linear-delivery-loop/config.example.json +31 -0
- package/templates/community/linear-delivery-loop/lead-prompt.md +34 -0
- package/templates/community/linear-delivery-loop/schedule.json +10 -0
- package/templates/community/linear-delivery-loop/scripts/linear-delivery-setup.ts +148 -0
- package/templates/community/linear-delivery-loop/scripts/linear-delivery-tick.ts +1781 -0
- package/templates/skills/swarm-docs/config.json +14 -0
- package/templates/skills/swarm-docs/content.md +144 -0
- package/dist/handlers-eqsnmv95.js +0 -41
|
@@ -113,6 +113,11 @@ import {
|
|
|
113
113
|
cancelTask2,
|
|
114
114
|
getRecentlyCancelledTasksForAgent2,
|
|
115
115
|
updateTaskProgress2,
|
|
116
|
+
IdempotencyKeyTakenError,
|
|
117
|
+
workflowRequestFingerprint,
|
|
118
|
+
findAcceptedWorkflowOperation,
|
|
119
|
+
recordAcceptedWorkflowOperation,
|
|
120
|
+
init_workflow_idempotency,
|
|
116
121
|
getWorkflowRunSummary,
|
|
117
122
|
getWorkflowRunStepsSlimByRunId,
|
|
118
123
|
getRunLineageBlock,
|
|
@@ -343,19 +348,19 @@ import {
|
|
|
343
348
|
recordInlineScriptRun2,
|
|
344
349
|
exports_db,
|
|
345
350
|
init_db3
|
|
346
|
-
} from "./cli-
|
|
351
|
+
} from "./cli-48gxjmcz.js";
|
|
347
352
|
import {
|
|
348
353
|
getUserGrant2,
|
|
349
354
|
init_rbac_roles
|
|
350
|
-
} from "./cli-
|
|
355
|
+
} from "./cli-8wmj18cz.js";
|
|
351
356
|
import {
|
|
352
357
|
ensurePricingSeeded2,
|
|
353
358
|
ensureRbacSeeded2,
|
|
354
359
|
ensureModelProfilesSeeded2
|
|
355
|
-
} from "./cli-
|
|
360
|
+
} from "./cli-rd5m70gj.js";
|
|
356
361
|
import {
|
|
357
362
|
loadModelsDevCache
|
|
358
|
-
} from "./cli-
|
|
363
|
+
} from "./cli-d20qvpr2.js";
|
|
359
364
|
import {
|
|
360
365
|
buildCatalogEntries,
|
|
361
366
|
listModelCatalog,
|
|
@@ -365,12 +370,12 @@ import {
|
|
|
365
370
|
loadModelsCatalog,
|
|
366
371
|
requestModelCatalogRefresh2,
|
|
367
372
|
startPricingRefreshLoop2
|
|
368
|
-
} from "./cli-
|
|
373
|
+
} from "./cli-60sty27p.js";
|
|
369
374
|
import {
|
|
370
375
|
ampPinProviderError,
|
|
371
376
|
ampPinCatalogError,
|
|
372
377
|
ampModelError
|
|
373
|
-
} from "./cli-
|
|
378
|
+
} from "./cli-8mbc9za9.js";
|
|
374
379
|
import {
|
|
375
380
|
workflowEventBus2,
|
|
376
381
|
init_event_bus
|
|
@@ -439,7 +444,7 @@ import {
|
|
|
439
444
|
definitionNodeIds,
|
|
440
445
|
validateDefinition,
|
|
441
446
|
applyDefinitionPatch
|
|
442
|
-
} from "./cli-
|
|
447
|
+
} from "./cli-j0ppywdr.js";
|
|
443
448
|
import {
|
|
444
449
|
require_dist2,
|
|
445
450
|
publicEndpointSsrfOptions,
|
|
@@ -499,14 +504,14 @@ import {
|
|
|
499
504
|
deleteApp,
|
|
500
505
|
typecheckScript,
|
|
501
506
|
parseSkillContent
|
|
502
|
-
} from "./cli-
|
|
507
|
+
} from "./cli-j9bpmykh.js";
|
|
503
508
|
import {
|
|
504
509
|
buildAuthorizationUrl,
|
|
505
510
|
onAuthorizationRefreshed,
|
|
506
511
|
ensureAuthorizationTokenOrThrow,
|
|
507
512
|
ensureToken,
|
|
508
513
|
ensureTokenOrThrow
|
|
509
|
-
} from "./cli-
|
|
514
|
+
} from "./cli-aypd09nf.js";
|
|
510
515
|
import {
|
|
511
516
|
detachedProcessGroup,
|
|
512
517
|
registerProcessGroup,
|
|
@@ -540,14 +545,14 @@ import {
|
|
|
540
545
|
getSlackApp2,
|
|
541
546
|
startSlackApp2,
|
|
542
547
|
stopSlackApp2
|
|
543
|
-
} from "./cli-
|
|
548
|
+
} from "./cli-m30k9777.js";
|
|
544
549
|
import {
|
|
545
550
|
slackCode,
|
|
546
551
|
slackMissingScopeMessage,
|
|
547
552
|
withAutoJoin,
|
|
548
553
|
externalChannelToolError2,
|
|
549
554
|
getChannelBlockReason2
|
|
550
|
-
} from "./cli-
|
|
555
|
+
} from "./cli-s09j9vp5.js";
|
|
551
556
|
import {
|
|
552
557
|
shapeApprovalResolution,
|
|
553
558
|
SubWorkflowExecutor,
|
|
@@ -566,7 +571,7 @@ import {
|
|
|
566
571
|
recoverResolvedWaitState2,
|
|
567
572
|
resumeFromChildRun2,
|
|
568
573
|
initWaitBusSubscriptions2
|
|
569
|
-
} from "./cli-
|
|
574
|
+
} from "./cli-twctnkng.js";
|
|
570
575
|
import {
|
|
571
576
|
duplicateGuardedQueryKey,
|
|
572
577
|
parseQueryParams,
|
|
@@ -593,7 +598,7 @@ import {
|
|
|
593
598
|
isPublicRoute,
|
|
594
599
|
findRoute,
|
|
595
600
|
route
|
|
596
|
-
} from "./cli-
|
|
601
|
+
} from "./cli-wqr7cea4.js";
|
|
597
602
|
import {
|
|
598
603
|
FilesError,
|
|
599
604
|
providerPath,
|
|
@@ -604,7 +609,7 @@ import {
|
|
|
604
609
|
import {
|
|
605
610
|
getRuntimePool2,
|
|
606
611
|
init_db
|
|
607
|
-
} from "./cli-
|
|
612
|
+
} from "./cli-6srv653c.js";
|
|
608
613
|
import {
|
|
609
614
|
getMemoryRaterNames,
|
|
610
615
|
REFERENCES_SOURCE_MAX_LENGTH,
|
|
@@ -644,7 +649,7 @@ import {
|
|
|
644
649
|
resolveSessionToken,
|
|
645
650
|
fingerprintApiKey,
|
|
646
651
|
init_users
|
|
647
|
-
} from "./cli-
|
|
652
|
+
} from "./cli-a89zdqz9.js";
|
|
648
653
|
import {
|
|
649
654
|
isRbacEnabled,
|
|
650
655
|
decideAdmission,
|
|
@@ -714,7 +719,7 @@ import {
|
|
|
714
719
|
KvNamespaceSchema,
|
|
715
720
|
KvKeySchema,
|
|
716
721
|
init_types
|
|
717
|
-
} from "./cli-
|
|
722
|
+
} from "./cli-9pshx6rd.js";
|
|
718
723
|
import {
|
|
719
724
|
generateDefaultClaudeMd2,
|
|
720
725
|
generateDefaultSoulMd2,
|
|
@@ -722,8 +727,10 @@ import {
|
|
|
722
727
|
init_defaults,
|
|
723
728
|
taskAttachmentFetchCommand,
|
|
724
729
|
taskAttachmentDisplayUrl,
|
|
725
|
-
init_task_attachment_links
|
|
726
|
-
|
|
730
|
+
init_task_attachment_links,
|
|
731
|
+
contentSha256,
|
|
732
|
+
init_profile_sync
|
|
733
|
+
} from "./cli-x37r7qwf.js";
|
|
727
734
|
import {
|
|
728
735
|
isSteeringEnabled2,
|
|
729
736
|
init_steering_enabled
|
|
@@ -735,7 +742,7 @@ import {
|
|
|
735
742
|
import {
|
|
736
743
|
selectCredential,
|
|
737
744
|
init_credentials
|
|
738
|
-
} from "./cli-
|
|
745
|
+
} from "./cli-gt4h8cxw.js";
|
|
739
746
|
import {
|
|
740
747
|
findInterpolationTokens,
|
|
741
748
|
interpolate,
|
|
@@ -745,7 +752,7 @@ import {
|
|
|
745
752
|
init_registry,
|
|
746
753
|
resolveTemplate,
|
|
747
754
|
init_resolver
|
|
748
|
-
} from "./cli-
|
|
755
|
+
} from "./cli-f1e0ptjj.js";
|
|
749
756
|
import {
|
|
750
757
|
init_zod
|
|
751
758
|
} from "./cli-4chz1hye.js";
|
|
@@ -787,7 +794,7 @@ import {
|
|
|
787
794
|
import {
|
|
788
795
|
init_package,
|
|
789
796
|
package_default
|
|
790
|
-
} from "./cli-
|
|
797
|
+
} from "./cli-ptfq202x.js";
|
|
791
798
|
import {
|
|
792
799
|
realtimeBus,
|
|
793
800
|
init_bus
|
|
@@ -20537,7 +20544,7 @@ function startRetryPoller(registry, intervalMs = 5000) {
|
|
|
20537
20544
|
if (!waiting)
|
|
20538
20545
|
continue;
|
|
20539
20546
|
if (result.waitFor === "workflow.child.finished") {
|
|
20540
|
-
const { resumeFromChildRun } = await import("./resume-
|
|
20547
|
+
const { resumeFromChildRun } = await import("./resume-1bmvjbf3.js");
|
|
20541
20548
|
await resumeFromChildRun(step.id, registry);
|
|
20542
20549
|
}
|
|
20543
20550
|
} else {
|
|
@@ -21220,7 +21227,7 @@ class NotifyExecutor extends BaseExecutor {
|
|
|
21220
21227
|
}
|
|
21221
21228
|
}
|
|
21222
21229
|
case "slack": {
|
|
21223
|
-
const { getSlackApp } = await import("./app-
|
|
21230
|
+
const { getSlackApp } = await import("./app-mwx1d5a9.js");
|
|
21224
21231
|
const app = getSlackApp();
|
|
21225
21232
|
if (!app) {
|
|
21226
21233
|
return {
|
|
@@ -21643,6 +21650,7 @@ class SwarmScriptExecutor extends BaseExecutor {
|
|
|
21643
21650
|
source: resolved.source,
|
|
21644
21651
|
args: config.args,
|
|
21645
21652
|
fsMode: "none",
|
|
21653
|
+
executor: resolved.script.executor,
|
|
21646
21654
|
agentId: agentId ?? "workflow",
|
|
21647
21655
|
mcpBaseUrl: getMcpBaseUrl(),
|
|
21648
21656
|
egressSecrets: credentials.egressSecrets,
|
|
@@ -21651,7 +21659,8 @@ class SwarmScriptExecutor extends BaseExecutor {
|
|
|
21651
21659
|
agentFs: credentials.agentFs,
|
|
21652
21660
|
apiConnections: getScriptApiConnectionDescriptors({ agentId: agentId ?? undefined }),
|
|
21653
21661
|
mcpConnections: getScriptMcpConnectionDescriptors({ agentId: agentId ?? undefined }),
|
|
21654
|
-
timeoutMs: config.timeoutMs
|
|
21662
|
+
timeoutMs: config.timeoutMs,
|
|
21663
|
+
signal: meta.signal
|
|
21655
21664
|
});
|
|
21656
21665
|
if (output.exitCode === 0 && !output.error && !output.runtimeError) {
|
|
21657
21666
|
await touchScratchScriptLastUsed(resolved.script.id);
|
|
@@ -22333,6 +22342,7 @@ async function executeScheduleScript(schedule) {
|
|
|
22333
22342
|
source: script.source,
|
|
22334
22343
|
args,
|
|
22335
22344
|
fsMode: "none",
|
|
22345
|
+
executor: script.executor,
|
|
22336
22346
|
agentId,
|
|
22337
22347
|
egressSecrets: credentials.egressSecrets,
|
|
22338
22348
|
userConfig: credentials.userConfig,
|
|
@@ -24604,7 +24614,7 @@ function setPreloadedTools(server, names) {
|
|
|
24604
24614
|
async function applyPreToolCall(name, args, requestInfo, inputSchema) {
|
|
24605
24615
|
if (requestInfo.callOrigin !== "mcp")
|
|
24606
24616
|
return { args };
|
|
24607
|
-
const dispatcher = await import("./dispatcher-
|
|
24617
|
+
const dispatcher = await import("./dispatcher-hayexmkr.js");
|
|
24608
24618
|
const result = await dispatcher.dispatchPre("pre.tool.call", { tool: name, args, requestInfo }, inputSchema ? {
|
|
24609
24619
|
validateModify: async (data) => {
|
|
24610
24620
|
const schema = normalizeObjectSchema(inputSchema) ?? inputSchema;
|
|
@@ -25263,10 +25273,12 @@ function bridgeRequestFor(name, args) {
|
|
|
25263
25273
|
const id = typeof body.id === "string" ? body.id : undefined;
|
|
25264
25274
|
if (!id)
|
|
25265
25275
|
throw new Error("workflow_trigger requires string `id`");
|
|
25276
|
+
const path = `/api/workflows/${encodeURIComponent(id)}/trigger`;
|
|
25266
25277
|
return {
|
|
25267
25278
|
method: "POST",
|
|
25268
|
-
path:
|
|
25269
|
-
body: body.triggerData ?? {}
|
|
25279
|
+
path: body.wait === false ? `${path}?wait=false` : path,
|
|
25280
|
+
body: body.triggerData ?? {},
|
|
25281
|
+
...typeof body.idempotencyKey === "string" ? { headers: { "Idempotency-Key": body.idempotencyKey } } : {}
|
|
25270
25282
|
};
|
|
25271
25283
|
}
|
|
25272
25284
|
case "workflow_retryRun": {
|
|
@@ -25379,7 +25391,7 @@ async function callBridgeApi(name, args, config, options = {}) {
|
|
|
25379
25391
|
}
|
|
25380
25392
|
const res = await fetch(`${baseUrl}${request.path}`, {
|
|
25381
25393
|
method: request.method,
|
|
25382
|
-
headers: headers(config),
|
|
25394
|
+
headers: { ...headers(config), ...request.headers },
|
|
25383
25395
|
body: request.body === undefined ? undefined : JSON.stringify(request.body)
|
|
25384
25396
|
});
|
|
25385
25397
|
const data = await readScriptSdkJsonResponse(res, `ctx.swarm.${name}`);
|
|
@@ -35086,7 +35098,7 @@ async function notifySlack(text) {
|
|
|
35086
35098
|
return;
|
|
35087
35099
|
}
|
|
35088
35100
|
try {
|
|
35089
|
-
const { getSlackApp } = await import("./app-
|
|
35101
|
+
const { getSlackApp } = await import("./app-mwx1d5a9.js");
|
|
35090
35102
|
const app = getSlackApp();
|
|
35091
35103
|
if (!app) {
|
|
35092
35104
|
console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
|
|
@@ -35157,7 +35169,7 @@ async function deleteJiraWebhook(webhookId) {
|
|
|
35157
35169
|
console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
|
|
35158
35170
|
}
|
|
35159
35171
|
async function overwriteWebhookIds(next) {
|
|
35160
|
-
const { getDbClient } = await import("./db-
|
|
35172
|
+
const { getDbClient } = await import("./db-28gjyvxj.js");
|
|
35161
35173
|
await getDbClient().transaction(async (tx) => {
|
|
35162
35174
|
const row = await tx.get("SELECT metadata FROM oauth_apps WHERE provider = 'jira'");
|
|
35163
35175
|
if (!row) {
|
|
@@ -108556,7 +108568,7 @@ async function reloadGlobalConfigsAndIntegrations() {
|
|
|
108556
108568
|
return runWithoutRequestAuth(() => reloadGlobalConfigsAndIntegrationsInner());
|
|
108557
108569
|
}
|
|
108558
108570
|
async function reloadGlobalConfigsAndIntegrationsInner() {
|
|
108559
|
-
const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-
|
|
108571
|
+
const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-q52f47pe.js");
|
|
108560
108572
|
const wasEmbeddingsConfigured = getEmbeddingProvider().isConfigured();
|
|
108561
108573
|
const updated = await loadGlobalConfigsIntoEnv(true);
|
|
108562
108574
|
await syncTelemetryEnabled("settings").catch((err) => {
|
|
@@ -108572,10 +108584,10 @@ async function reloadGlobalConfigsAndIntegrationsInner() {
|
|
|
108572
108584
|
integrations.push("embeddings");
|
|
108573
108585
|
}
|
|
108574
108586
|
if (!wasEmbeddingsConfigured && isEmbeddingsConfigured) {
|
|
108575
|
-
import("./boot-reembed-
|
|
108587
|
+
import("./boot-reembed-5h37a2c2.js").then(({ runBootReembed }) => runBootReembed()).catch((err) => {
|
|
108576
108588
|
console.error("[config-reload] memory backfill failed (non-fatal):", err);
|
|
108577
108589
|
});
|
|
108578
|
-
import("./boot-reembed-
|
|
108590
|
+
import("./boot-reembed-7h78vmvv.js").then(({ runBootReembedScripts }) => runBootReembedScripts()).catch((err) => {
|
|
108579
108591
|
console.error("[config-reload] script backfill failed (non-fatal):", err);
|
|
108580
108592
|
});
|
|
108581
108593
|
}
|
|
@@ -117683,6 +117695,7 @@ var SCRIPT_TRANSPORT_ERROR = "script_* tools require HTTP MCP transport — agen
|
|
|
117683
117695
|
var scriptNameSchema = string2().min(1).max(200);
|
|
117684
117696
|
var scriptScopeSchema = _enum2(["agent", "global"]);
|
|
117685
117697
|
var scriptFsModeSchema = _enum2(["none", "workspace-rw"]);
|
|
117698
|
+
var scriptExecutorSchema = _enum2(["native", "quickjs"]);
|
|
117686
117699
|
var scriptToolOutputSchema = swarmToolOutputSchema({
|
|
117687
117700
|
status: number2().optional(),
|
|
117688
117701
|
data: unknown().optional()
|
|
@@ -131097,6 +131110,7 @@ var registerScriptRunTool = (server) => {
|
|
|
131097
131110
|
intent: string2().default("").describe("Why this script is being run."),
|
|
131098
131111
|
scope: scriptScopeSchema.optional().describe("Optional scope for named script resolution."),
|
|
131099
131112
|
fsMode: scriptFsModeSchema.default("none").describe("Filesystem mode. v1 supports none only."),
|
|
131113
|
+
executor: scriptExecutorSchema.nullable().optional().describe('Optional executor override ("native" or "quickjs"). When omitted, named scripts use their saved executor or SCRIPT_EXECUTOR.'),
|
|
131100
131114
|
idempotencyKey: string2().max(200).optional().describe("When set, output is auto-persisted to kv under script:executions/{key}. Re-running with the same key overwrites. Queryable via kv-get.")
|
|
131101
131115
|
}),
|
|
131102
131116
|
outputSchema: scriptToolOutputSchema
|
|
@@ -131302,7 +131316,8 @@ var registerScriptUpsertTool = (server) => {
|
|
|
131302
131316
|
description: string2().default("").describe("Human-readable script description."),
|
|
131303
131317
|
intent: string2().default("").describe("Why this script exists."),
|
|
131304
131318
|
scope: scriptScopeSchema.default("agent").describe("Persist under agent or global scope."),
|
|
131305
|
-
fsMode: scriptFsModeSchema.default("none").describe("Filesystem mode. v1 supports none only.")
|
|
131319
|
+
fsMode: scriptFsModeSchema.default("none").describe("Filesystem mode. v1 supports none only."),
|
|
131320
|
+
executor: scriptExecutorSchema.nullable().optional().describe('Optional per-script executor override ("native" or "quickjs"). Null or omitted inherits SCRIPT_EXECUTOR.')
|
|
131306
131321
|
}),
|
|
131307
131322
|
outputSchema: scriptToolOutputSchema
|
|
131308
131323
|
}, async (args, requestInfo) => proxyScriptsApi({
|
|
@@ -134554,6 +134569,94 @@ var registerSteerTaskTool = (server) => {
|
|
|
134554
134569
|
// src/tools/store-progress.ts
|
|
134555
134570
|
init_zod();
|
|
134556
134571
|
init_db3();
|
|
134572
|
+
|
|
134573
|
+
// src/be/memory/task-learning.ts
|
|
134574
|
+
init_db3();
|
|
134575
|
+
init_profile_sync();
|
|
134576
|
+
init_secret_scrubber();
|
|
134577
|
+
var LEARNING_MAX_CHARS = 2000;
|
|
134578
|
+
var LEARNING_MAX_TAGS = 5;
|
|
134579
|
+
var LEARNINGS_ROOT = "/learnings";
|
|
134580
|
+
var SEGMENT_MAX_CHARS = 60;
|
|
134581
|
+
var KEY_ATTEMPTS = 4;
|
|
134582
|
+
function toKebab(value, maxChars = SEGMENT_MAX_CHARS) {
|
|
134583
|
+
return value.normalize("NFKD").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+/, "").slice(0, maxChars).replace(/-+$/, "");
|
|
134584
|
+
}
|
|
134585
|
+
function resolveLearningWorkstream(explicit, vcsRepo) {
|
|
134586
|
+
const fromExplicit = explicit ? toKebab(explicit) : "";
|
|
134587
|
+
if (fromExplicit)
|
|
134588
|
+
return fromExplicit;
|
|
134589
|
+
const repoName = vcsRepo?.trim().replace(/\/+$/, "").split("/").pop()?.replace(/\.git$/, "");
|
|
134590
|
+
const fromRepo = repoName ? toKebab(repoName) : "";
|
|
134591
|
+
return fromRepo || "general";
|
|
134592
|
+
}
|
|
134593
|
+
async function storeTaskLearning(params) {
|
|
134594
|
+
const { agentId, isLead, task } = params;
|
|
134595
|
+
const input = typeof params.learning === "string" ? { text: params.learning } : params.learning;
|
|
134596
|
+
const text = scrubSecrets(input.text).trim();
|
|
134597
|
+
if (!text)
|
|
134598
|
+
return { status: "failed", error: "learning text is empty" };
|
|
134599
|
+
if (text.length > LEARNING_MAX_CHARS) {
|
|
134600
|
+
return {
|
|
134601
|
+
status: "failed",
|
|
134602
|
+
error: `learning text is over ~500 tokens (${LEARNING_MAX_CHARS} characters); shorten it`
|
|
134603
|
+
};
|
|
134604
|
+
}
|
|
134605
|
+
const tags = [
|
|
134606
|
+
...new Set((input.tags ?? []).map((tag) => toKebab(scrubSecrets(tag))).filter(Boolean))
|
|
134607
|
+
].filter((tag) => tag !== "learning");
|
|
134608
|
+
if (tags.length > LEARNING_MAX_TAGS) {
|
|
134609
|
+
return { status: "failed", error: `learning takes at most ${LEARNING_MAX_TAGS} tags` };
|
|
134610
|
+
}
|
|
134611
|
+
const workstream = resolveLearningWorkstream(input.workstream === undefined ? undefined : scrubSecrets(input.workstream), task.vcsRepo === undefined ? undefined : scrubSecrets(task.vcsRepo));
|
|
134612
|
+
try {
|
|
134613
|
+
return await getDbClient2().transaction(() => insertLearning({ agentId, isLead, taskId: task.id, text, tags, workstream }));
|
|
134614
|
+
} catch (err) {
|
|
134615
|
+
return {
|
|
134616
|
+
status: "failed",
|
|
134617
|
+
error: scrubSecrets(err instanceof Error ? err.message : String(err))
|
|
134618
|
+
};
|
|
134619
|
+
}
|
|
134620
|
+
}
|
|
134621
|
+
async function insertLearning(params) {
|
|
134622
|
+
const { agentId, isLead, taskId, text, tags, workstream } = params;
|
|
134623
|
+
const contentHash = contentSha256(text);
|
|
134624
|
+
const replay = await getDbClient2().get(`SELECT id, key FROM agent_memory
|
|
134625
|
+
WHERE sourceTaskId = ? AND contentHash = ? AND key LIKE '${LEARNINGS_ROOT}/%'
|
|
134626
|
+
LIMIT 1`, [taskId, contentHash]);
|
|
134627
|
+
if (replay)
|
|
134628
|
+
return { status: "replayed", memoryId: replay.id, key: replay.key };
|
|
134629
|
+
const title = text.split(/\r?\n/, 1)[0].trim().slice(0, 200);
|
|
134630
|
+
const baseKey = `${LEARNINGS_ROOT}/${workstream}/${toKebab(title) || "learning"}`;
|
|
134631
|
+
for (let attempt = 0;attempt < KEY_ATTEMPTS; attempt++) {
|
|
134632
|
+
const key = attempt === 0 ? baseKey : `${baseKey}-${crypto.randomUUID().slice(0, 6)}`;
|
|
134633
|
+
const taken = await getDbClient2().get("SELECT id FROM agent_memory WHERE scope = 'swarm' AND key = ? LIMIT 1", [key]);
|
|
134634
|
+
if (taken)
|
|
134635
|
+
continue;
|
|
134636
|
+
try {
|
|
134637
|
+
const result = await indexMemoryContent({
|
|
134638
|
+
agentId,
|
|
134639
|
+
content: text,
|
|
134640
|
+
name: title,
|
|
134641
|
+
scope: "swarm",
|
|
134642
|
+
source: "manual",
|
|
134643
|
+
sourceTaskId: taskId,
|
|
134644
|
+
tags: ["learning", ...tags],
|
|
134645
|
+
intent: "store-progress learning",
|
|
134646
|
+
key,
|
|
134647
|
+
writer: { principal: { kind: "agent", agentId, isLead }, source: "mcp" }
|
|
134648
|
+
});
|
|
134649
|
+
return { status: "stored", memoryId: result.memoryIds[0], key, workstream };
|
|
134650
|
+
} catch (err) {
|
|
134651
|
+
if (/UNIQUE constraint failed/i.test(err.message))
|
|
134652
|
+
continue;
|
|
134653
|
+
throw err;
|
|
134654
|
+
}
|
|
134655
|
+
}
|
|
134656
|
+
return { status: "failed", error: `no free key under ${baseKey}` };
|
|
134657
|
+
}
|
|
134658
|
+
|
|
134659
|
+
// src/tools/store-progress.ts
|
|
134557
134660
|
init_rbac();
|
|
134558
134661
|
init_types();
|
|
134559
134662
|
init_secret_scrubber();
|
|
@@ -134582,8 +134685,22 @@ var storeProgressOutputSchema = swarmToolOutputSchema({
|
|
|
134582
134685
|
yourAgentId: string2().optional(),
|
|
134583
134686
|
wasNoOp: boolean().optional().describe("True when the call was a no-op because the task was already in a terminal state (completed/failed/cancelled). First-call-wins."),
|
|
134584
134687
|
wasForcedOverwrite: boolean().optional().describe("True when force: true replaced output and/or failureReason on an already-terminal task without replaying completion side effects."),
|
|
134585
|
-
blockedWaitingElapsedMs: number2().optional().describe("Present only when this progress text reads as blocked-waiting: milliseconds since the task's prior update. Drives the store-progress nudge toward defer-task.")
|
|
134586
|
-
|
|
134688
|
+
blockedWaitingElapsedMs: number2().optional().describe("Present only when this progress text reads as blocked-waiting: milliseconds since the task's prior update. Drives the store-progress nudge toward defer-task."),
|
|
134689
|
+
learning: looseObject({
|
|
134690
|
+
status: string2().optional(),
|
|
134691
|
+
key: string2().optional(),
|
|
134692
|
+
memoryId: string2().optional(),
|
|
134693
|
+
workstream: string2().optional(),
|
|
134694
|
+
error: string2().optional()
|
|
134695
|
+
}).optional().describe("Present when the call carried a learning: stored, replayed (same text already stored for this task), or failed with error.")
|
|
134696
|
+
});
|
|
134697
|
+
function learningSentence(result) {
|
|
134698
|
+
if (result.status === "stored")
|
|
134699
|
+
return `Learning stored at ${result.key}.`;
|
|
134700
|
+
if (result.status === "replayed")
|
|
134701
|
+
return `Learning already stored at ${result.key}; skipped.`;
|
|
134702
|
+
return `Learning not stored: ${result.error}.`;
|
|
134703
|
+
}
|
|
134587
134704
|
var registerStoreProgressTool = (server) => {
|
|
134588
134705
|
createToolRegistrar(server)("store-progress", {
|
|
134589
134706
|
title: "Store task progress",
|
|
@@ -134597,6 +134714,14 @@ var registerStoreProgressTool = (server) => {
|
|
|
134597
134714
|
failureReason: string2().optional().describe("The reason for failure (used when failing)."),
|
|
134598
134715
|
attachments: array2(AttachmentInputSchema).max(20).optional().describe("Pointer-based artifacts produced by this step — agent-fs path, URL, shared-fs path, or swarm Page. No inline file data; upload to agent-fs first and attach by path. Agent-fs pointers are verified before task state changes, using the explicit org/drive pair or the registering agent's configured defaults. May be sent on any call (progress or completion) and accumulates across calls; duplicates are de-duped by sha256 (when present) or by (kind, pointer, name)."),
|
|
134599
134716
|
citations: array2(CitationInputSchema).max(MAX_TASK_CITATIONS).catch([]).optional().describe('Claim sources, upserted by index across calls. Use only for factual claims the reader cannot already see in the thread or task tree, 1-2 sources; none on delegation, routing, acks, or status replies. Reference each one in output with [citation:N], or set general: true for a source that backs the whole answer (it renders under "General sources"). ref per kind: task = task UUID; memory = memory UUID (optional quote must appear verbatim in it); github = owner/repo#N, owner/repo@<sha>, or a github.com pull, issues, or commit URL; slack = permalink or channel/ts; agent-fs = file path; page = page id; script-run = script run id; url = http(s) URL. The first completing call is refused, and the task stays in progress, if a marker has no entry, a citation fails validation, or a non-general citation is unreferenced; the response lists each problem. After one refusal, completion proceeds and those markers and sources are dropped from rendered output. At most 50 citations per call/task, refs up to 2048 characters, labels up to 200. Invalid or oversized batches are ignored; existing indices can still be updated at capacity.'),
|
|
134717
|
+
learning: union2([
|
|
134718
|
+
string2(),
|
|
134719
|
+
object2({
|
|
134720
|
+
text: string2(),
|
|
134721
|
+
workstream: string2().optional(),
|
|
134722
|
+
tags: array2(string2()).optional()
|
|
134723
|
+
})
|
|
134724
|
+
]).optional().describe(`A lesson to keep. Add one only when it would change how the next agent works: a gotcha, a dead end, a pattern that worked. Not a progress line. Stored as a swarm memory at /learnings/<workstream>/<slug>, tagged "learning" and tied to this task. The first line of text is the title. At most ~500 tokens and ${LEARNING_MAX_TAGS} kebab tags. workstream defaults to the task's repo name, else "general". Send it on or before the completing call: a call on a finished task stores nothing. A failed learning write is reported in the result and never blocks the progress update.`),
|
|
134600
134725
|
persistMemory: boolean().optional().describe("Opt in to task_completion memory persistence for automatic/recurring tasks. Manual tasks are persisted by default; scheduled, system, heartbeat/boot-triage, monitor, and digest tasks are skipped unless this is true."),
|
|
134601
134726
|
force: boolean().optional().describe("On an already-terminal task, overwrite explicitly provided output and/or failureReason text while preserving status and finishedAt and without replaying events, memory writes, follow-up creation, business-use ensure, or capacity updates. Differing terminal text is otherwise discarded and reported as a failure.")
|
|
134602
134727
|
}),
|
|
@@ -134609,6 +134734,7 @@ var registerStoreProgressTool = (server) => {
|
|
|
134609
134734
|
failureReason,
|
|
134610
134735
|
attachments,
|
|
134611
134736
|
citations,
|
|
134737
|
+
learning,
|
|
134612
134738
|
persistMemory,
|
|
134613
134739
|
force
|
|
134614
134740
|
}, requestInfo, _meta) => {
|
|
@@ -134702,6 +134828,7 @@ var registerStoreProgressTool = (server) => {
|
|
|
134702
134828
|
return toolErr(`${verificationError} No attachment was registered and task state was unchanged.`);
|
|
134703
134829
|
}
|
|
134704
134830
|
}
|
|
134831
|
+
let learningWrite;
|
|
134705
134832
|
const result = await getDbClient2().transaction(async () => {
|
|
134706
134833
|
const agent = await getAgentById2(requestInfo.agentId ?? "");
|
|
134707
134834
|
if (!agent) {
|
|
@@ -134768,6 +134895,21 @@ var registerStoreProgressTool = (server) => {
|
|
|
134768
134895
|
if (citations?.length && existingTask.agentId === agent.id) {
|
|
134769
134896
|
await upsertTaskCitations(taskId, citations);
|
|
134770
134897
|
}
|
|
134898
|
+
if (learning && isTerminal) {
|
|
134899
|
+
learningWrite = Promise.resolve({
|
|
134900
|
+
status: "failed",
|
|
134901
|
+
error: "the task is already finished; use memory-store"
|
|
134902
|
+
});
|
|
134903
|
+
} else if (learning) {
|
|
134904
|
+
learningWrite = new Promise((resolve) => {
|
|
134905
|
+
getDbClient2().afterCommit(() => storeTaskLearning({
|
|
134906
|
+
agentId: agent.id,
|
|
134907
|
+
isLead: agent.isLead === true,
|
|
134908
|
+
task: existingTask,
|
|
134909
|
+
learning
|
|
134910
|
+
}).then(resolve, (err) => resolve({ status: "failed", error: scrubSecrets(String(err)) })));
|
|
134911
|
+
});
|
|
134912
|
+
}
|
|
134771
134913
|
const terminalResultGuard = await guardTerminalTaskResultWrite(existingTask, {
|
|
134772
134914
|
status,
|
|
134773
134915
|
output,
|
|
@@ -134890,7 +135032,9 @@ This check refuses once per task; the next completion is accepted and unfixed ci
|
|
|
134890
135032
|
persistMemory
|
|
134891
135033
|
});
|
|
134892
135034
|
}
|
|
134893
|
-
const
|
|
135035
|
+
const learningResult = await learningWrite;
|
|
135036
|
+
const { success } = result;
|
|
135037
|
+
const message = learningResult ? `${result.message} ${learningSentence(learningResult)}` : result.message;
|
|
134894
135038
|
const task = result.task ? {
|
|
134895
135039
|
id: result.task.id,
|
|
134896
135040
|
status: result.task.status,
|
|
@@ -134901,7 +135045,8 @@ This check refuses once per task; the next completion is accepted and unfixed ci
|
|
|
134901
135045
|
...task ? { task } : {},
|
|
134902
135046
|
..."wasNoOp" in result && result.wasNoOp ? { wasNoOp: true } : {},
|
|
134903
135047
|
..."wasForcedOverwrite" in result && result.wasForcedOverwrite ? { wasForcedOverwrite: true } : {},
|
|
134904
|
-
..."blockedWaitingElapsedMs" in result && typeof result.blockedWaitingElapsedMs === "number" ? { blockedWaitingElapsedMs: result.blockedWaitingElapsedMs } : {}
|
|
135048
|
+
..."blockedWaitingElapsedMs" in result && typeof result.blockedWaitingElapsedMs === "number" ? { blockedWaitingElapsedMs: result.blockedWaitingElapsedMs } : {},
|
|
135049
|
+
...learningResult ? { learning: learningResult } : {}
|
|
134905
135050
|
};
|
|
134906
135051
|
const warnings = success && status === "completed" ? taskCitationWarnings(result.task?.output ?? output ?? "", await getTaskCitations(taskId)) : [];
|
|
134907
135052
|
return success ? toolOk(message, { data, details: warnings.length ? warnings.join(`
|
|
@@ -137095,6 +137240,82 @@ var registerRetryWorkflowRunTool = (server) => {
|
|
|
137095
137240
|
// src/tools/workflows/trigger-workflow.ts
|
|
137096
137241
|
init_zod();
|
|
137097
137242
|
init_db3();
|
|
137243
|
+
init_workflow_idempotency();
|
|
137244
|
+
|
|
137245
|
+
// src/http/idempotency-key.ts
|
|
137246
|
+
init_zod();
|
|
137247
|
+
init_workflow_idempotency();
|
|
137248
|
+
init_request_auth_context();
|
|
137249
|
+
var IDEMPOTENCY_KEY_PATTERN = /^[\x21-\x7E]{1,255}$/;
|
|
137250
|
+
var IDEMPOTENT_REPLAYED_HEADER = "Idempotent-Replayed";
|
|
137251
|
+
var idempotencyKeyHeader = (accepted) => object2({
|
|
137252
|
+
"Idempotency-Key": string2().regex(IDEMPOTENCY_KEY_PATTERN).optional().describe("Optional client-generated key, 1-255 visible ASCII characters (a UUID works). " + `The first request the server accepts under a key ${accepted}; a retry with the same key ` + "and an equivalent body gets that request's status and body back (with " + `\`${IDEMPOTENT_REPLAYED_HEADER}: true\`) and changes nothing. The key is scoped to the ` + "caller's identity and this operation; it is not a credential. The same key with a " + "different body is a 409. A request rejected before it is accepted (validation, auth, " + "not found, disabled) does not use up the key. Accepted keys do not expire.")
|
|
137253
|
+
});
|
|
137254
|
+
function idempotencyPrincipal(req, myAgentId) {
|
|
137255
|
+
const auth = getRequestAuth(req);
|
|
137256
|
+
switch (auth?.kind) {
|
|
137257
|
+
case "user":
|
|
137258
|
+
return `user:${auth.userId}`;
|
|
137259
|
+
case "agent":
|
|
137260
|
+
return `agent:${auth.agentId}`;
|
|
137261
|
+
case "controller":
|
|
137262
|
+
return `controller:${auth.controllerId}`;
|
|
137263
|
+
case "guest":
|
|
137264
|
+
return null;
|
|
137265
|
+
default:
|
|
137266
|
+
return myAgentId ? `agent:${myAgentId}` : "operator";
|
|
137267
|
+
}
|
|
137268
|
+
}
|
|
137269
|
+
function readIdempotencyKey(req, res, myAgentId) {
|
|
137270
|
+
const raw = req.headers["idempotency-key"];
|
|
137271
|
+
if (raw === undefined)
|
|
137272
|
+
return;
|
|
137273
|
+
const key = Array.isArray(raw) ? raw.join(", ") : raw;
|
|
137274
|
+
if (!IDEMPOTENCY_KEY_PATTERN.test(key)) {
|
|
137275
|
+
jsonError(res, "Idempotency-Key must be 1-255 visible ASCII characters", 400);
|
|
137276
|
+
return null;
|
|
137277
|
+
}
|
|
137278
|
+
const principal = idempotencyPrincipal(req, myAgentId);
|
|
137279
|
+
if (!principal) {
|
|
137280
|
+
jsonError(res, "Idempotency-Key needs an identified caller", 400);
|
|
137281
|
+
return null;
|
|
137282
|
+
}
|
|
137283
|
+
return { principal, key };
|
|
137284
|
+
}
|
|
137285
|
+
async function replayAcceptedOperation(res, claim, send) {
|
|
137286
|
+
const accepted = await findAcceptedWorkflowOperation(claim);
|
|
137287
|
+
if (!accepted)
|
|
137288
|
+
return false;
|
|
137289
|
+
if (accepted.fingerprint !== claim.fingerprint) {
|
|
137290
|
+
jsonError(res, "Idempotency-Key was already used for a different request", 409);
|
|
137291
|
+
} else if (accepted.resourceDeletedAt !== null) {
|
|
137292
|
+
jsonError(res, "The workflow this Idempotency-Key created or triggered was deleted; send a new key to start over", 410);
|
|
137293
|
+
} else {
|
|
137294
|
+
res.setHeader(IDEMPOTENT_REPLAYED_HEADER, "true");
|
|
137295
|
+
send(accepted.body);
|
|
137296
|
+
}
|
|
137297
|
+
return true;
|
|
137298
|
+
}
|
|
137299
|
+
|
|
137300
|
+
// src/tools/workflows/trigger-workflow.ts
|
|
137301
|
+
async function replayAcceptedTrigger(claim) {
|
|
137302
|
+
const accepted = await findAcceptedWorkflowOperation(claim);
|
|
137303
|
+
if (!accepted)
|
|
137304
|
+
return null;
|
|
137305
|
+
if (accepted.fingerprint !== claim.fingerprint) {
|
|
137306
|
+
return toolErr("idempotencyKey was already used to trigger this workflow with other data.", {
|
|
137307
|
+
data: { idempotencyConflict: true }
|
|
137308
|
+
});
|
|
137309
|
+
}
|
|
137310
|
+
if (accepted.resourceDeletedAt !== null) {
|
|
137311
|
+
return toolErr("The workflow this idempotencyKey triggered was deleted; send a new key to start over.");
|
|
137312
|
+
}
|
|
137313
|
+
const { runId, skipped } = accepted.body;
|
|
137314
|
+
return toolOk("Run already accepted under this idempotencyKey; nothing new was started.", {
|
|
137315
|
+
details: `Replayed the run accepted under this idempotencyKey — run ID: ${runId}.`,
|
|
137316
|
+
data: { runId, skipped, replayed: true }
|
|
137317
|
+
});
|
|
137318
|
+
}
|
|
137098
137319
|
var registerTriggerWorkflowTool = (server) => {
|
|
137099
137320
|
createToolRegistrar(server)("trigger-workflow", {
|
|
137100
137321
|
title: "Trigger Workflow",
|
|
@@ -137102,16 +137323,35 @@ var registerTriggerWorkflowTool = (server) => {
|
|
|
137102
137323
|
description: "Manually trigger a workflow execution, optionally passing trigger data as context. Respects cooldown configuration. " + "If the workflow has a triggerSchema, the payload is validated first; on failure, the response includes structured validationErrors plus the workflow's triggerSchema for self-correction.",
|
|
137103
137324
|
inputSchema: object2({
|
|
137104
137325
|
id: string2().uuid().describe("Workflow ID to trigger"),
|
|
137105
|
-
triggerData: record2(string2(), unknown()).optional().describe("Optional data to pass as trigger context to the workflow")
|
|
137326
|
+
triggerData: record2(string2(), unknown()).optional().describe("Optional data to pass as trigger context to the workflow"),
|
|
137327
|
+
wait: boolean().optional().describe("Default true: return after the run's instant steps ran, when it finishes or parks at its first async step. " + "false: return as soon as the run is created and walk it in the background. Use false from a script or step that only needs the runId."),
|
|
137328
|
+
idempotencyKey: string2().regex(IDEMPOTENCY_KEY_PATTERN).optional().describe("Optional, 1-255 visible ASCII characters, scoped to the calling agent and this workflow. " + "The first trigger accepted under a key starts one run; the key is recorded in the run's own transaction and never expires. " + "A retry with the same key and triggerData starts nothing and returns that run (replayed: true), even if the earlier call was killed before it saw the answer. " + "The same key with other triggerData is an error with idempotencyConflict: true.")
|
|
137106
137329
|
}),
|
|
137107
137330
|
outputSchema: swarmToolOutputSchema({
|
|
137108
137331
|
runId: string2().optional(),
|
|
137109
137332
|
skipped: boolean().optional(),
|
|
137333
|
+
replayed: boolean().optional(),
|
|
137334
|
+
idempotencyConflict: boolean().optional(),
|
|
137110
137335
|
validationErrors: array2(string2()).optional(),
|
|
137111
137336
|
triggerSchema: record2(string2(), unknown()).optional()
|
|
137112
137337
|
})
|
|
137113
|
-
}, async ({ id, triggerData }, requestInfo) => {
|
|
137338
|
+
}, async ({ id, triggerData, wait, idempotencyKey }, requestInfo) => {
|
|
137114
137339
|
try {
|
|
137340
|
+
if (idempotencyKey !== undefined && !requestInfo.agentId) {
|
|
137341
|
+
return toolErr("idempotencyKey needs an identified caller (X-Agent-ID).");
|
|
137342
|
+
}
|
|
137343
|
+
const claim = idempotencyKey === undefined ? undefined : {
|
|
137344
|
+
principal: `agent:${requestInfo.agentId}`,
|
|
137345
|
+
key: idempotencyKey,
|
|
137346
|
+
operation: "workflow.trigger",
|
|
137347
|
+
targetId: id,
|
|
137348
|
+
fingerprint: workflowRequestFingerprint("workflow.trigger", triggerData ?? {})
|
|
137349
|
+
};
|
|
137350
|
+
if (claim) {
|
|
137351
|
+
const replayed = await replayAcceptedTrigger(claim);
|
|
137352
|
+
if (replayed)
|
|
137353
|
+
return replayed;
|
|
137354
|
+
}
|
|
137115
137355
|
const workflow = await getWorkflow2(id);
|
|
137116
137356
|
if (!workflow) {
|
|
137117
137357
|
return toolErr(`Workflow not found: ${id}`);
|
|
@@ -137119,12 +137359,33 @@ var registerTriggerWorkflowTool = (server) => {
|
|
|
137119
137359
|
if (!workflow.enabled) {
|
|
137120
137360
|
return toolErr(`Workflow "${workflow.name}" is disabled.`);
|
|
137121
137361
|
}
|
|
137122
|
-
|
|
137123
|
-
|
|
137124
|
-
|
|
137125
|
-
|
|
137126
|
-
|
|
137127
|
-
|
|
137362
|
+
let accepted;
|
|
137363
|
+
let runId;
|
|
137364
|
+
try {
|
|
137365
|
+
runId = await startWorkflowExecution2(workflow, triggerData ?? {}, getExecutorRegistry2(), {
|
|
137366
|
+
triggerType: "manual",
|
|
137367
|
+
requestedByUserId: await resolveTaskAuditUserId(requestInfo.sourceTaskId, requestInfo.agentId) ?? undefined,
|
|
137368
|
+
detach: wait === false,
|
|
137369
|
+
accept: claim ? async (run) => {
|
|
137370
|
+
const response = { runId: run.runId, skipped: run.skipped };
|
|
137371
|
+
await recordAcceptedWorkflowOperation(claim, {
|
|
137372
|
+
workflowId: workflow.id,
|
|
137373
|
+
runId: run.runId,
|
|
137374
|
+
status: 201,
|
|
137375
|
+
body: response
|
|
137376
|
+
});
|
|
137377
|
+
accepted = response;
|
|
137378
|
+
} : undefined
|
|
137379
|
+
});
|
|
137380
|
+
} catch (err) {
|
|
137381
|
+
if (claim && err instanceof IdempotencyKeyTakenError) {
|
|
137382
|
+
const replayed = await replayAcceptedTrigger(claim);
|
|
137383
|
+
if (replayed)
|
|
137384
|
+
return replayed;
|
|
137385
|
+
}
|
|
137386
|
+
throw err;
|
|
137387
|
+
}
|
|
137388
|
+
const skipped = accepted ? accepted.skipped : (await getWorkflowRun2(runId))?.status === "skipped";
|
|
137128
137389
|
if (skipped) {
|
|
137129
137390
|
return toolOk(`Workflow "${workflow.name}" skipped (cooldown).`, {
|
|
137130
137391
|
details: `Workflow "${workflow.name}" skipped (cooldown active) — run ID: ${runId}.`,
|
|
@@ -137626,4 +137887,4 @@ async function createServer(opts = {}) {
|
|
|
137626
137887
|
return server;
|
|
137627
137888
|
}
|
|
137628
137889
|
|
|
137629
|
-
export { DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, resolveIdentity, renderIdentity, createAdditiveBuffer, taskModelPin, resumedTaskModelSelection, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, sanitizeModelTierOverrides, parseModelTierOverridesHeader, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, referencedBundlePaths, skillDirs, TaskCreationBlockedError, recordUnmappedIdentity, MAX_TASK_ATTACHMENT_BYTES, recordTaskAttachmentUpload, scopeFromAttachment, backingProviderId, transcribeAudioNotes, buildEffectiveText, bufferedFileFailures, fetchSlackFiles, createSlackTaskWithFiles, notifySlackFileFailures, isRuntimePoolWakeable, isAgentReachable, hasOtherUserMention, broadcastMatches, routeMessage, extractTaskFromMessage, extractSlackMessageText, recoverIncompleteRuns, handleWebhookTrigger, verifyHmacSignature, WebhookError, snapshotAndUpdateWorkflow, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, getExecutorRegistry2, initWorkflows2, dispatchScheduleTarget, calculateNextRun2, startScheduler2, stopScheduler2, runScheduleNow2, ExtensionAssetConflictError, ExtensionOwnershipError, getExtensionFiles, getExtensionById, getExtensionByName, listExtensions, listExtensionVersions, updateExtensionMeta, listExtensionRuns, SDK_ALLOWLIST, mcpToolNameForSdkMethod, mcpOverflowAuthError, hasKvViewArgs, resolveKvView, toolErr, createToolRegistrar, handleMcpBridge, Redacted, SCRIPT_SDK_RESPONSE_LIMIT_BYTES, readScriptSdkJsonResponse, ExtensionConfigError, ExtensionLifecycleError, setExtensionLoopbackBaseUrl, enableExtension, disableExtension, activateVersion, ExtensionAssetsInvalidError, installExtensionWithAssets, uninstallExtension, reloadExtension, loadEnabledExtensions, stopExtensionRuntime, ExtensionAbortedError2, isRegistered2, isExtensionAgentId2, getExtensionBridgeToken2, resolveBridgeCallOrigin2, extensionIdForAgent2, runContext2, registerLoaded2, unregister2, listRegistered2, dispatchPre2, dispatchPost2, stripSiblingBlock, createTaskWithSiblingAwareness, isInboxAllowed, isSenderAllowed, handleMessageReceived, isAzureDevOpsEnabled, initAzureDevOps, verifyAzureDevOpsWebhook, repointTrackerSyncBySwarmId, isAzureDevOpsUrl, canonicalAzureDevOpsRepoUrl, parseAzureDevOpsRepoUrl, createdPullRequestOf, commentedPayloadOf, handlePullRequestCreated, handlePullRequestCommented, handleWorkItemCreated, handleWorkItemUpdated, handleWorkItemCommented, handleWorkItemDeleted, handleWorkItemRestored, initAzureDevOpsOutbound, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, getTelemetryIngestAnchor, initApiTelemetry, syncTelemetryEnabled, isBitbucketEnabled, initBitbucket, verifyBitbucketWebhook, isDuplicateDelivery, markDeliveryProcessed, pullRequestEventOf, pullRequestCommentEventOf, handlePullRequestCreated2, handlePullRequestCommentCreated, handlePullRequestClosed, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2, handleNote, handlePipeline, isChatSdkEnabled, getChatSdkConfig, errorMessage, resolveAdapterApiUrl, trackBackground, TelegramBotApiError, callTelegramBotApi, isTrustedTeamsServiceUrl, getSessionLabels, rememberSessionLabel, isChatSdkStopping, startChatSdk, getChatInstance, isChatAdapterConfigured, getChatSdkHealth, stopChatSdk, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, isCookieSafePageId, extractPageSession, extractLegacyPageSession, extractAndVerifyCookie, pageSessionSetCookies, resolveHttpRequestAuth, getDeploymentEnvValue, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, MCP_MAX_TOOL_INPUT_ELEMENTS, MCP_MAX_REQUEST_BODY_BYTES, userCtx, requestPrincipal, agentFirstPrincipal, rejectGuest, handleApps, cancelApprovalRequest, cancelApprovalRequestAndRun, getUserCommsPrefs, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, snapshotMetric, AssetKeyAuthorizationError, authorizeAssetKeyWrite, getPageEditCounter, snapshotPage, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, scopedResourceScopeIdSchema, resolveScopedResourceId, MemoryKeyError, refreshLinks, indexMemoryContent, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, resolveLeadOnlyRecoveryAssignment, getResumeGeneration, getNextResumeGeneration, inheritedModelSelection, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask, guardTerminalTaskResultWrite, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, reservedNamespaceError, privateNamespaceError, reservedRoomKeyError, updateMcpServerChecked, updateTouchesStdioExecution, canReadMemory, getLinksForMemory, expandCandidatesWithGraph, isApiDraining, drainApi, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, changesAllowMerge, updateSwarmRepoChecked, getCombConfig, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, sessionAccessTopic, sessionPresenceRoot, RoomOperationSchema, removeAwarenessStates, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, MEMORY_KEYS_DEFAULT_PREFIX, MEMORY_KEYS_MAX_LIMIT, estimateTokens, posteriorMean, listMemoryKeys, checkChunkIntegrity, getMemoryChunks, getPosteriorsByIds, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, canClaim, emitBudgetRefusalSideEffects, workflowModelErrors, patchWorkflowDefinition, resolveScriptsOnlyMode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer };
|
|
137890
|
+
export { DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, resolveIdentity, renderIdentity, createAdditiveBuffer, taskModelPin, resumedTaskModelSelection, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, sanitizeModelTierOverrides, parseModelTierOverridesHeader, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, referencedBundlePaths, skillDirs, TaskCreationBlockedError, recordUnmappedIdentity, MAX_TASK_ATTACHMENT_BYTES, recordTaskAttachmentUpload, scopeFromAttachment, backingProviderId, transcribeAudioNotes, buildEffectiveText, bufferedFileFailures, fetchSlackFiles, createSlackTaskWithFiles, notifySlackFileFailures, isRuntimePoolWakeable, isAgentReachable, hasOtherUserMention, broadcastMatches, routeMessage, extractTaskFromMessage, extractSlackMessageText, recoverIncompleteRuns, handleWebhookTrigger, verifyHmacSignature, WebhookError, snapshotAndUpdateWorkflow, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, getExecutorRegistry2, initWorkflows2, dispatchScheduleTarget, calculateNextRun2, startScheduler2, stopScheduler2, runScheduleNow2, ExtensionAssetConflictError, ExtensionOwnershipError, getExtensionFiles, getExtensionById, getExtensionByName, listExtensions, listExtensionVersions, updateExtensionMeta, listExtensionRuns, SDK_ALLOWLIST, mcpToolNameForSdkMethod, mcpOverflowAuthError, hasKvViewArgs, resolveKvView, toolErr, createToolRegistrar, handleMcpBridge, Redacted, SCRIPT_SDK_RESPONSE_LIMIT_BYTES, readScriptSdkJsonResponse, ExtensionConfigError, ExtensionLifecycleError, setExtensionLoopbackBaseUrl, enableExtension, disableExtension, activateVersion, ExtensionAssetsInvalidError, installExtensionWithAssets, uninstallExtension, reloadExtension, loadEnabledExtensions, stopExtensionRuntime, ExtensionAbortedError2, isRegistered2, isExtensionAgentId2, getExtensionBridgeToken2, resolveBridgeCallOrigin2, extensionIdForAgent2, runContext2, registerLoaded2, unregister2, listRegistered2, dispatchPre2, dispatchPost2, stripSiblingBlock, createTaskWithSiblingAwareness, isInboxAllowed, isSenderAllowed, handleMessageReceived, isAzureDevOpsEnabled, initAzureDevOps, verifyAzureDevOpsWebhook, repointTrackerSyncBySwarmId, isAzureDevOpsUrl, canonicalAzureDevOpsRepoUrl, parseAzureDevOpsRepoUrl, createdPullRequestOf, commentedPayloadOf, handlePullRequestCreated, handlePullRequestCommented, handleWorkItemCreated, handleWorkItemUpdated, handleWorkItemCommented, handleWorkItemDeleted, handleWorkItemRestored, initAzureDevOpsOutbound, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, getTelemetryIngestAnchor, initApiTelemetry, syncTelemetryEnabled, isBitbucketEnabled, initBitbucket, verifyBitbucketWebhook, isDuplicateDelivery, markDeliveryProcessed, pullRequestEventOf, pullRequestCommentEventOf, handlePullRequestCreated2, handlePullRequestCommentCreated, handlePullRequestClosed, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2, handleNote, handlePipeline, isChatSdkEnabled, getChatSdkConfig, errorMessage, resolveAdapterApiUrl, trackBackground, TelegramBotApiError, callTelegramBotApi, isTrustedTeamsServiceUrl, getSessionLabels, rememberSessionLabel, isChatSdkStopping, startChatSdk, getChatInstance, isChatAdapterConfigured, getChatSdkHealth, stopChatSdk, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, isCookieSafePageId, extractPageSession, extractLegacyPageSession, extractAndVerifyCookie, pageSessionSetCookies, resolveHttpRequestAuth, getDeploymentEnvValue, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, MCP_MAX_TOOL_INPUT_ELEMENTS, MCP_MAX_REQUEST_BODY_BYTES, userCtx, requestPrincipal, agentFirstPrincipal, rejectGuest, handleApps, cancelApprovalRequest, cancelApprovalRequestAndRun, getUserCommsPrefs, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, snapshotMetric, AssetKeyAuthorizationError, authorizeAssetKeyWrite, getPageEditCounter, snapshotPage, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, scopedResourceScopeIdSchema, resolveScopedResourceId, MemoryKeyError, refreshLinks, indexMemoryContent, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, resolveLeadOnlyRecoveryAssignment, getResumeGeneration, getNextResumeGeneration, inheritedModelSelection, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask, guardTerminalTaskResultWrite, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, reservedNamespaceError, privateNamespaceError, reservedRoomKeyError, updateMcpServerChecked, updateTouchesStdioExecution, canReadMemory, getLinksForMemory, expandCandidatesWithGraph, isApiDraining, drainApi, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, changesAllowMerge, updateSwarmRepoChecked, getCombConfig, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, sessionAccessTopic, sessionPresenceRoot, RoomOperationSchema, removeAwarenessStates, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, MEMORY_KEYS_DEFAULT_PREFIX, MEMORY_KEYS_MAX_LIMIT, estimateTokens, posteriorMean, listMemoryKeys, checkChunkIntegrity, getMemoryChunks, getPosteriorsByIds, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, canClaim, emitBudgetRefusalSideEffects, workflowModelErrors, patchWorkflowDefinition, idempotencyKeyHeader, readIdempotencyKey, replayAcceptedOperation, resolveScriptsOnlyMode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer };
|