@desplega.ai/agent-swarm 2.5.3 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-adapter-gr2fcyyj.js → acp-adapter-ek38cwsv.js} +4 -4
- package/dist/{actions-wv766ghf.js → actions-92mepq03.js} +17 -17
- package/dist/{amp-adapter-speb906t.js → amp-adapter-9gaxg015.js} +2 -2
- package/dist/{app-ag29n14f.js → app-ctn8gsgx.js} +3 -3
- package/dist/{assistant-3x8bz3eg.js → assistant-zyr5kz47.js} +19 -19
- package/dist/{boot-reembed-jsmfrpzf.js → boot-reembed-dwzfttdr.js} +1 -1
- package/dist/{boot-reembed-5b3d2eea.js → boot-reembed-w75maga2.js} +1 -1
- package/dist/{boot-scrub-sweep-s73gerxy.js → boot-scrub-sweep-e9kq43kf.js} +3 -3
- package/dist/{boot-seeds-5zmax2wr.js → boot-seeds-x28v3fhb.js} +4 -4
- package/dist/{claude-adapter-hswdnm3t.js → claude-adapter-f0afqnne.js} +4 -4
- package/dist/{claude-managed-adapter-cvbzj1h6.js → claude-managed-adapter-x81a7r65.js} +3 -3
- package/dist/{claude-managed-setup-3k8m3hhc.js → claude-managed-setup-bqzwjd9x.js} +1 -1
- package/dist/{claude-sdk-session-fkbyk66x.js → claude-sdk-session-7b7whkaq.js} +9307 -9254
- package/dist/{cli-a5ebc95n.js → cli-0shx9j93.js} +16 -13
- package/dist/{cli-vwn81jbs.js → cli-19202kew.js} +3 -3
- package/dist/{cli-svrj71pg.js → cli-1r5ad7j5.js} +7 -7
- package/dist/{cli-hhxjnjzs.js → cli-25n3mv5d.js} +8 -6
- package/dist/cli-2655k16q.js +140 -0
- package/dist/{cli-hcpj2xqz.js → cli-277c31dw.js} +1 -1
- package/dist/{cli-35gtk1p6.js → cli-4b2z6n0m.js} +29 -7
- package/dist/{cli-40jsnrjm.js → cli-5bnsc0e1.js} +7 -5
- package/dist/{cli-fzcn3d87.js → cli-621ce7kw.js} +1 -1
- package/dist/{cli-s49hpn37.js → cli-64mh9mf3.js} +19 -5
- package/dist/{cli-e8jyq7d8.js → cli-6a1xg1p7.js} +6 -2
- package/dist/{cli-p9rafdrb.js → cli-7p4jxgtt.js} +4 -4
- package/dist/{cli-w1zwctj2.js → cli-9j129brq.js} +9 -3
- package/dist/{cli-ce0ak9ms.js → cli-abs8ndtr.js} +11 -11
- package/dist/{cli-aecdcr77.js → cli-asq5ydm4.js} +123 -50
- package/dist/{cli-n45mr7zh.js → cli-bvpgr9ny.js} +2 -2
- package/dist/{cli-210xd1f4.js → cli-c61mbdds.js} +3 -3
- package/dist/{cli-e5bxnjps.js → cli-c952c7ac.js} +5 -5
- package/dist/{cli-p859hcc8.js → cli-dew6x255.js} +1 -1
- package/dist/{cli-tx00c0h6.js → cli-dqygeeh5.js} +17 -1
- package/dist/{cli-gpv60278.js → cli-e42vss7b.js} +2 -2
- package/dist/{cli-s53vp709.js → cli-eftzyh9y.js} +1 -1
- package/dist/{cli-3ngdk5te.js → cli-ethgy7ha.js} +1 -1
- package/dist/{cli-99xgw26r.js → cli-ff1tm9n9.js} +1 -1
- package/dist/{cli-ewm3pwbq.js → cli-g9vd9ece.js} +37 -12
- package/dist/{cli-jjznk3f7.js → cli-gbfxp48k.js} +62 -28
- package/dist/{cli-z21whrrg.js → cli-gn5af0x5.js} +14 -14
- package/dist/{cli-1fc85mvt.js → cli-gwhjmh8g.js} +4 -4
- package/dist/{cli-avdvgcay.js → cli-hh5we352.js} +24 -5
- package/dist/{cli-0ebey9hg.js → cli-j6rktc91.js} +1 -1
- package/dist/{cli-kxawjrxg.js → cli-jb30dzvk.js} +332 -36
- package/dist/{cli-25j01dpj.js → cli-jbnn4vxb.js} +3 -3
- package/dist/{cli-qzme5949.js → cli-k4tjsdx9.js} +44 -39
- package/dist/{cli-8s5wx3nz.js → cli-m4ecdxvz.js} +40 -13
- package/dist/{cli-ta8bd7th.js → cli-pzatvw94.js} +1 -1
- package/dist/{cli-p6zs9h4y.js → cli-rr7zx19j.js} +767 -249
- package/dist/{cli-502eqv93.js → cli-s682zgqz.js} +1 -1
- package/dist/{cli-fsdprwrg.js → cli-sbwsxvtd.js} +1 -1
- package/dist/{cli-0xk505e8.js → cli-sxgtf5fw.js} +1 -1
- package/dist/{cli-egjggehm.js → cli-tsma7p8v.js} +1 -1
- package/dist/{cli-qgf8emrn.js → cli-wghjkr0e.js} +5 -5
- package/dist/{cli-p0rzjkya.js → cli-wx2nj19m.js} +29 -10
- package/dist/{cli-e2ar4bp1.js → cli-x0f2v69c.js} +111 -42
- package/dist/{cli-y561h5a9.js → cli-xtrz6bzs.js} +5 -5
- package/dist/{cli-gpsz7g88.js → cli-xzfq4at3.js} +7 -7
- package/dist/cli.js +18 -18
- package/dist/{codex-adapter-n8ka66vf.js → codex-adapter-wch12q99.js} +2 -2
- package/dist/{codex-hook-e2he7aca.js → codex-hook-brpnycn5.js} +1 -1
- package/dist/{codex-session-runner-fsebts37.js → codex-session-runner-41pfcr95.js} +2 -2
- package/dist/{commands-t04rt2pc.js → commands-9849dkj6.js} +2 -2
- package/dist/{controller-rgna04r2.js → controller-ja0sd95p.js} +27 -1
- package/dist/{controllers-connect-bqm1rtft.js → controllers-connect-xp05dj6x.js} +16 -16
- package/dist/{cursor-adapter-swr2k95y.js → cursor-adapter-623qxqew.js} +1 -2
- package/dist/{db-a4m7haw0.js → db-47vj40dy.js} +3 -3
- package/dist/{db-24ck09xy.js → db-w759qmx0.js} +2 -2
- package/dist/{dispatcher-nwf9ss0q.js → dispatcher-7b8e4z2j.js} +15 -15
- package/dist/{docker-nfy2gc8t.js → docker-s84hjs91.js} +2 -2
- package/dist/{dsh-adapter-kpdnhjst.js → dsh-adapter-2ezw3xea.js} +1 -2
- package/dist/{external-channel-j1e2p34p.js → external-channel-e2s028da.js} +2 -2
- package/dist/{grok-adapter-qtjz0whk.js → grok-adapter-ys7gaqee.js} +5 -5
- package/dist/{handlers-19xr6dnz.js → handlers-wy1dr6ja.js} +18 -18
- package/dist/{heartbeat-vtesda5d.js → heartbeat-w3mntghj.js} +17 -17
- package/dist/{hook-8wqaszda.js → hook-3jjywnpb.js} +9 -3
- package/dist/{hook-b2hhj6rd.js → hook-g7kvv6x9.js} +3 -2
- package/dist/{http-mxcqhhcs.js → http-tkp7d4kb.js} +267 -75
- package/dist/{index-srg522m6.js → index-1ef1myq2.js} +15 -15
- package/dist/{index-1r8wfpzs.js → index-3n8m9ea2.js} +1 -1
- package/dist/{index-kw2mmat7.js → index-nmm79qgr.js} +17 -17
- package/dist/{index-n1vbvta9.js → index-q7m26kvs.js} +24 -22
- package/dist/{index-spwxjgay.js → index-xdaahthb.js} +15 -15
- package/dist/{keepalive-dsd8rtgx.js → keepalive-v4ta8wgg.js} +3 -3
- package/dist/{lead-zyerk1x2.js → lead-sawnyqxk.js} +33 -33
- package/dist/{maintenance-jqmqwnet.js → maintenance-84n1ex21.js} +1 -1
- package/dist/{oauth-refresh-sweep-q2c3bnvm.js → oauth-refresh-sweep-vjnnandw.js} +2 -2
- package/dist/{onboard-w4yd7s8t.js → onboard-sfmpe4np.js} +2 -2
- package/dist/{opencode-adapter-9tppvxar.js → opencode-adapter-jmpst4q4.js} +3 -3
- package/dist/{otel-impl-f36byzbd.js → otel-impl-v6cc0zve.js} +1 -1
- package/dist/{pi-mono-adapter-tqsge1ay.js → pi-mono-adapter-fk8fkcf6.js} +33 -6
- package/dist/{pricing-refresh-xvak5p4v.js → pricing-refresh-fsk1e1zc.js} +3 -3
- package/dist/{rbac-roles-gfn30fb8.js → rbac-roles-prmkdnkw.js} +2 -2
- package/dist/{rbac-roles-682k2mt5.js → rbac-roles-zxmxqa39.js} +1 -1
- package/dist/{render-v2-hgytz8nn.js → render-v2-pjwxvnkw.js} +3 -3
- package/dist/{resume-2dvq348g.js → resume-frdtgfa0.js} +8 -6
- package/dist/{session-access-7f21ekq9.js → session-access-fpez4y5q.js} +4 -4
- package/dist/{setup-epffxtbk.js → setup-mq6m3m8q.js} +1 -1
- package/dist/{work-objects-xz1a5rqk.js → work-objects-kfahhjsq.js} +18 -18
- package/dist/{worker-42t8emjt.js → worker-v5e5rxj3.js} +33 -33
- package/openapi.json +68 -3
- package/package.json +5 -5
- package/plugin/commands/create-pr.md +2 -2
- package/plugin/pi-skills/create-pr/SKILL.md +2 -2
- package/src/be/db/approvals.ts +48 -0
- package/src/be/db/tasks/write.ts +15 -5
- package/src/be/db/workflow-idempotency.ts +183 -0
- package/src/be/db/workflow-runs.ts +318 -7
- package/src/be/db.ts +67 -17
- package/src/be/migrations/242_workflow_idempotency_keys.sql +40 -0
- package/src/be/sealed-json.ts +1 -0
- package/src/be/seed-scripts/catalog/compound-insights.inline.ts +2 -2
- package/src/be/seed-scripts/catalog/compound-insights.ts +2 -2
- package/src/be/seed-skills/bundled-files.generated.json +1 -1
- package/src/be/sql-connections.ts +7 -1
- package/src/be/swarm-config-guard.ts +2 -0
- package/src/be/users.ts +9 -0
- package/src/commands/controller.ts +33 -0
- package/src/commands/runner.ts +6 -2
- package/src/extensions/apply-task-create.ts +57 -11
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/extensions/contract.ts +25 -0
- package/src/extensions/dispatcher.ts +4 -0
- package/src/extensions/post-bridge.ts +8 -0
- package/src/hooks/context-bound-note.ts +196 -0
- package/src/hooks/hook.ts +12 -0
- package/src/http/config.ts +48 -16
- package/src/http/idempotency-key.ts +117 -0
- package/src/http/workflows.ts +129 -24
- package/src/prompts/context-bound-note.ts +48 -0
- package/src/prompts/session-templates.ts +25 -1
- package/src/providers/amp-adapter.ts +30 -8
- package/src/providers/claude-adapter.ts +29 -4
- package/src/providers/claude-managed-adapter.ts +26 -0
- package/src/providers/claude-sdk-session.ts +10 -0
- package/src/providers/claude-session-events.ts +13 -0
- package/src/providers/codex-adapter.ts +12 -0
- package/src/providers/opencode-adapter.ts +18 -0
- package/src/providers/pi-mono-adapter.ts +35 -0
- package/src/runtime-providers/docker.ts +6 -2
- package/src/scripts-runtime/types/swarm-extension.d.ts +35 -0
- package/src/tests/amp-adapter.test.ts +97 -0
- package/src/tests/approval-requests.test.ts +10 -7
- package/src/tests/approval-sweeps.test.ts +12 -6
- package/src/tests/base-prompt.test.ts +1 -1
- package/src/tests/claude-hook-output.test.ts +79 -1
- package/src/tests/claude-managed-adapter.test.ts +275 -0
- package/src/tests/codex-adapter.test.ts +163 -0
- package/src/tests/context-bound-note.test.ts +269 -0
- package/src/tests/extensions-pre-task.test.ts +273 -0
- package/src/tests/fetch-resolved-env.test.ts +17 -0
- package/src/tests/fixtures/extensions/record-blocks/hooks.ts +10 -0
- package/src/tests/fixtures/extensions/record-blocks/manifest.json +7 -0
- package/src/tests/fixtures/fake-amp.ts +22 -8
- package/src/tests/fixtures/held-template-render.ts +42 -0
- package/src/tests/fixtures/workflow-idempotency-trigger.child.ts +73 -0
- package/src/tests/openapi-route-headers.test.ts +2 -0
- package/src/tests/opencode-adapter.test.ts +134 -0
- package/src/tests/pi-mono-adapter.test.ts +105 -0
- package/src/tests/prompt-template-session.test.ts +4 -3
- package/src/tests/runner-push-delivery.test.ts +25 -0
- package/src/tests/runtime-controller-liveness.test.ts +133 -0
- package/src/tests/runtime-providers-docker.test.ts +2 -0
- package/src/tests/script-connections.test.ts +3 -0
- package/src/tests/script-run-config-scope.test.ts +91 -3
- package/src/tests/session-logs.test.ts +70 -0
- package/src/tests/sessions-tree.test.ts +37 -0
- package/src/tests/workflow-cascade-cancel.test.ts +1169 -0
- package/src/tests/workflow-foreach-supersede-retry.test.ts +488 -0
- package/src/tests/workflow-idempotency.test.ts +915 -0
- package/src/tools/workflows/cancel-workflow-run.ts +1 -1
- package/src/utils/context-window.ts +8 -6
- package/src/workflows/approval-cancel.ts +15 -13
- package/src/workflows/approval-notifications.ts +5 -1
- package/src/workflows/checkpoint.ts +6 -3
- package/src/workflows/engine.ts +30 -8
- package/src/workflows/executors/foreach.ts +2 -2
- package/src/workflows/foreach-driver.ts +10 -3
- package/src/workflows/foreach-join.ts +29 -6
- package/src/workflows/recovery.ts +6 -1
- package/src/workflows/resume.ts +168 -56
- package/src/workflows/retry-poller.ts +49 -3
- package/src/workflows/task-step-routing.ts +29 -7
- package/templates/ai-toolbox.manifest.json +8 -8
- package/templates/community/open-prompt-showreel/PLAYBOOK.md +5 -6
- package/templates/community/open-prompt-showreel/lead-prompt.md +1 -1
- package/templates/community/open-prompt-showreel/skills/open-prompt-showreel/SKILL.md +4 -4
- package/templates/skills/agent-browser/SKILL.md +4 -4
- package/templates/skills/agent-browser/content.md +4 -4
- package/templates/skills/code-quality/config.json +1 -1
- package/templates/skills/code-quality/content.md +2 -2
- package/templates/skills/delegate-work/content.md +29 -25
- package/templates/skills/delegate-work/files/scripts/codex-exec.sh +5 -5
- package/templates/skills/qa/content.md +2 -2
- package/templates/skills/researching/content.md +2 -0
- package/templates/skills/work-on-task/SKILL.md +1 -1
- package/templates/skills/work-on-task/content.md +1 -1
|
@@ -47,10 +47,10 @@ import {
|
|
|
47
47
|
checkDependencies2,
|
|
48
48
|
emitBuiltInIntegrationConnectedOnce2,
|
|
49
49
|
init_db3
|
|
50
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-jb30dzvk.js";
|
|
51
51
|
import {
|
|
52
52
|
getChannelBlockReason2
|
|
53
|
-
} from "./cli-
|
|
53
|
+
} from "./cli-eftzyh9y.js";
|
|
54
54
|
import {
|
|
55
55
|
require_dist5,
|
|
56
56
|
require_axios,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
import {
|
|
72
72
|
taskAttachmentDisplayUrl,
|
|
73
73
|
init_task_attachment_links
|
|
74
|
-
} from "./cli-
|
|
74
|
+
} from "./cli-e42vss7b.js";
|
|
75
75
|
import {
|
|
76
76
|
getSlackConfiguration,
|
|
77
77
|
init_config
|
|
@@ -6240,7 +6240,7 @@ async function initOtel(serviceRole = process.env.AGENT_ROLE || "api") {
|
|
|
6240
6240
|
return;
|
|
6241
6241
|
initialized = true;
|
|
6242
6242
|
try {
|
|
6243
|
-
const impl = await import("./otel-impl-
|
|
6243
|
+
const impl = await import("./otel-impl-v6cc0zve.js");
|
|
6244
6244
|
await impl.boot(serviceRole, {
|
|
6245
6245
|
exportConsoleLogs: serviceRole === "api" && isApiLogExportEnabled()
|
|
6246
6246
|
});
|
|
@@ -10085,17 +10085,17 @@ async function initSlackApp2() {
|
|
|
10085
10085
|
});
|
|
10086
10086
|
initialized2 = true;
|
|
10087
10087
|
app.use(slackInboundOutcomeMiddleware());
|
|
10088
|
-
const { registerMessageHandler } = await import("./handlers-
|
|
10089
|
-
const { registerCommandHandler } = await import("./commands-
|
|
10090
|
-
const { registerActionHandlers } = await import("./actions-
|
|
10091
|
-
const { registerWorkObjectHandlers } = await import("./work-objects-
|
|
10088
|
+
const { registerMessageHandler } = await import("./handlers-wy1dr6ja.js");
|
|
10089
|
+
const { registerCommandHandler } = await import("./commands-9849dkj6.js");
|
|
10090
|
+
const { registerActionHandlers } = await import("./actions-92mepq03.js");
|
|
10091
|
+
const { registerWorkObjectHandlers } = await import("./work-objects-kfahhjsq.js");
|
|
10092
10092
|
registerMessageHandler(app);
|
|
10093
10093
|
registerCommandHandler(app);
|
|
10094
10094
|
registerActionHandlers(app);
|
|
10095
10095
|
registerWorkObjectHandlers(app);
|
|
10096
|
-
const { createAssistant } = await import("./assistant-
|
|
10096
|
+
const { createAssistant } = await import("./assistant-zyr5kz47.js");
|
|
10097
10097
|
app.assistant(createAssistant());
|
|
10098
|
-
const { isBlockExternalEnabled, scanExternalChannelsOnBoot } = await import("./external-channel-
|
|
10098
|
+
const { isBlockExternalEnabled, scanExternalChannelsOnBoot } = await import("./external-channel-e2s028da.js");
|
|
10099
10099
|
if (isBlockExternalEnabled()) {
|
|
10100
10100
|
scanExternalChannelsOnBoot(app.client).catch((error) => {
|
|
10101
10101
|
console.error("[Slack] External channel boot scan failed:", error);
|
|
@@ -10108,7 +10108,7 @@ async function startSlackApp2() {
|
|
|
10108
10108
|
await initSlackApp2();
|
|
10109
10109
|
}
|
|
10110
10110
|
if (app) {
|
|
10111
|
-
const { isSlackRenderV2Enabled } = await import("./render-v2-
|
|
10111
|
+
const { isSlackRenderV2Enabled } = await import("./render-v2-pjwxvnkw.js");
|
|
10112
10112
|
if (isSlackRenderV2Enabled())
|
|
10113
10113
|
await ensureSlackRenderV2Activation2();
|
|
10114
10114
|
await app.start();
|
|
@@ -111,6 +111,9 @@ import {
|
|
|
111
111
|
cancelTask2,
|
|
112
112
|
getRecentlyCancelledTasksForAgent2,
|
|
113
113
|
updateTaskProgress2,
|
|
114
|
+
getRunLineageBlock,
|
|
115
|
+
getWorkflowRunStatus,
|
|
116
|
+
disarmWorkflowTreeRetries,
|
|
114
117
|
getRunningSubWorkflowSteps,
|
|
115
118
|
getSettledChildRunParentSteps,
|
|
116
119
|
init_workflow_runs,
|
|
@@ -284,7 +287,6 @@ import {
|
|
|
284
287
|
getApprovalRequestById2,
|
|
285
288
|
resolveApprovalRequest2,
|
|
286
289
|
cancelApprovalRequestById2,
|
|
287
|
-
listCancelledApprovalRequestsForRun2,
|
|
288
290
|
getStuckApprovalRuns2,
|
|
289
291
|
getDueWaitStates2,
|
|
290
292
|
getStuckWaitRuns2,
|
|
@@ -337,19 +339,19 @@ import {
|
|
|
337
339
|
recordInlineScriptRun2,
|
|
338
340
|
exports_db,
|
|
339
341
|
init_db3
|
|
340
|
-
} from "./cli-
|
|
342
|
+
} from "./cli-jb30dzvk.js";
|
|
341
343
|
import {
|
|
342
344
|
getUserGrant2,
|
|
343
345
|
init_rbac_roles
|
|
344
|
-
} from "./cli-
|
|
346
|
+
} from "./cli-ff1tm9n9.js";
|
|
345
347
|
import {
|
|
346
348
|
ensurePricingSeeded2,
|
|
347
349
|
ensureRbacSeeded2,
|
|
348
350
|
ensureModelProfilesSeeded2
|
|
349
|
-
} from "./cli-
|
|
351
|
+
} from "./cli-c61mbdds.js";
|
|
350
352
|
import {
|
|
351
353
|
loadModelsDevCache
|
|
352
|
-
} from "./cli-
|
|
354
|
+
} from "./cli-sbwsxvtd.js";
|
|
353
355
|
import {
|
|
354
356
|
buildCatalogEntries,
|
|
355
357
|
listModelCatalog,
|
|
@@ -359,12 +361,16 @@ import {
|
|
|
359
361
|
loadModelsCatalog,
|
|
360
362
|
requestModelCatalogRefresh2,
|
|
361
363
|
startPricingRefreshLoop2
|
|
362
|
-
} from "./cli-
|
|
364
|
+
} from "./cli-bvpgr9ny.js";
|
|
363
365
|
import {
|
|
364
366
|
ampPinProviderError,
|
|
365
367
|
ampPinCatalogError,
|
|
366
368
|
ampModelError
|
|
367
369
|
} from "./cli-9s05422w.js";
|
|
370
|
+
import {
|
|
371
|
+
workflowEventBus2,
|
|
372
|
+
init_event_bus
|
|
373
|
+
} from "./cli-dabehxhp.js";
|
|
368
374
|
import {
|
|
369
375
|
notifyAutomationPreflightFailure,
|
|
370
376
|
isNeedsSetupFailure,
|
|
@@ -421,6 +427,7 @@ import {
|
|
|
421
427
|
isForeachChildOwned,
|
|
422
428
|
parkAndDriveForeach,
|
|
423
429
|
runForeachDrive,
|
|
430
|
+
resolveForeachParent,
|
|
424
431
|
stepFailureMode,
|
|
425
432
|
generateEdges,
|
|
426
433
|
resolveValidationPort,
|
|
@@ -428,7 +435,7 @@ import {
|
|
|
428
435
|
definitionNodeIds,
|
|
429
436
|
validateDefinition,
|
|
430
437
|
applyDefinitionPatch
|
|
431
|
-
} from "./cli-
|
|
438
|
+
} from "./cli-gbfxp48k.js";
|
|
432
439
|
import {
|
|
433
440
|
require_dist2,
|
|
434
441
|
publicEndpointSsrfOptions,
|
|
@@ -488,14 +495,14 @@ import {
|
|
|
488
495
|
deleteApp,
|
|
489
496
|
typecheckScript,
|
|
490
497
|
parseSkillContent
|
|
491
|
-
} from "./cli-
|
|
498
|
+
} from "./cli-7p4jxgtt.js";
|
|
492
499
|
import {
|
|
493
500
|
buildAuthorizationUrl,
|
|
494
501
|
onAuthorizationRefreshed,
|
|
495
502
|
ensureAuthorizationTokenOrThrow,
|
|
496
503
|
ensureToken,
|
|
497
504
|
ensureTokenOrThrow
|
|
498
|
-
} from "./cli-
|
|
505
|
+
} from "./cli-tsma7p8v.js";
|
|
499
506
|
import {
|
|
500
507
|
detachedProcessGroup,
|
|
501
508
|
registerProcessGroup,
|
|
@@ -529,18 +536,14 @@ import {
|
|
|
529
536
|
getSlackApp2,
|
|
530
537
|
startSlackApp2,
|
|
531
538
|
stopSlackApp2
|
|
532
|
-
} from "./cli-
|
|
539
|
+
} from "./cli-abs8ndtr.js";
|
|
533
540
|
import {
|
|
534
541
|
slackCode,
|
|
535
542
|
slackMissingScopeMessage,
|
|
536
543
|
withAutoJoin,
|
|
537
544
|
externalChannelToolError2,
|
|
538
545
|
getChannelBlockReason2
|
|
539
|
-
} from "./cli-
|
|
540
|
-
import {
|
|
541
|
-
workflowEventBus2,
|
|
542
|
-
init_event_bus
|
|
543
|
-
} from "./cli-dabehxhp.js";
|
|
546
|
+
} from "./cli-eftzyh9y.js";
|
|
544
547
|
import {
|
|
545
548
|
shapeApprovalResolution,
|
|
546
549
|
SubWorkflowExecutor,
|
|
@@ -554,11 +557,12 @@ import {
|
|
|
554
557
|
retryFailedRun2,
|
|
555
558
|
cancelWorkflowRunRows2,
|
|
556
559
|
cancelWorkflowRun2,
|
|
560
|
+
postTreeApprovalCancellations2,
|
|
557
561
|
resumeWaitState2,
|
|
558
562
|
recoverResolvedWaitState2,
|
|
559
563
|
resumeFromChildRun2,
|
|
560
564
|
initWaitBusSubscriptions2
|
|
561
|
-
} from "./cli-
|
|
565
|
+
} from "./cli-x0f2v69c.js";
|
|
562
566
|
import {
|
|
563
567
|
duplicateGuardedQueryKey,
|
|
564
568
|
parseQueryParams,
|
|
@@ -585,7 +589,7 @@ import {
|
|
|
585
589
|
isPublicRoute,
|
|
586
590
|
findRoute,
|
|
587
591
|
route
|
|
588
|
-
} from "./cli-
|
|
592
|
+
} from "./cli-gwhjmh8g.js";
|
|
589
593
|
import {
|
|
590
594
|
FilesError,
|
|
591
595
|
providerPath,
|
|
@@ -596,7 +600,7 @@ import {
|
|
|
596
600
|
import {
|
|
597
601
|
getRuntimePool2,
|
|
598
602
|
init_db
|
|
599
|
-
} from "./cli-
|
|
603
|
+
} from "./cli-19202kew.js";
|
|
600
604
|
import {
|
|
601
605
|
getMemoryRaterNames,
|
|
602
606
|
REFERENCES_SOURCE_MAX_LENGTH,
|
|
@@ -621,7 +625,7 @@ import {
|
|
|
621
625
|
import {
|
|
622
626
|
canProvisionKind,
|
|
623
627
|
init_runtime_providers
|
|
624
|
-
} from "./cli-
|
|
628
|
+
} from "./cli-dew6x255.js";
|
|
625
629
|
import {
|
|
626
630
|
findUserById,
|
|
627
631
|
findUserByExternalId,
|
|
@@ -636,7 +640,7 @@ import {
|
|
|
636
640
|
resolveSessionToken,
|
|
637
641
|
fingerprintApiKey,
|
|
638
642
|
init_users
|
|
639
|
-
} from "./cli-
|
|
643
|
+
} from "./cli-6a1xg1p7.js";
|
|
640
644
|
import {
|
|
641
645
|
isRbacEnabled,
|
|
642
646
|
decideAdmission,
|
|
@@ -714,7 +718,7 @@ import {
|
|
|
714
718
|
taskAttachmentFetchCommand,
|
|
715
719
|
taskAttachmentDisplayUrl,
|
|
716
720
|
init_task_attachment_links
|
|
717
|
-
} from "./cli-
|
|
721
|
+
} from "./cli-e42vss7b.js";
|
|
718
722
|
import {
|
|
719
723
|
getSlackConfiguration,
|
|
720
724
|
init_config
|
|
@@ -732,7 +736,7 @@ import {
|
|
|
732
736
|
init_registry,
|
|
733
737
|
resolveTemplate,
|
|
734
738
|
init_resolver
|
|
735
|
-
} from "./cli-
|
|
739
|
+
} from "./cli-dqygeeh5.js";
|
|
736
740
|
import {
|
|
737
741
|
init_zod
|
|
738
742
|
} from "./cli-4chz1hye.js";
|
|
@@ -774,7 +778,7 @@ import {
|
|
|
774
778
|
import {
|
|
775
779
|
init_package,
|
|
776
780
|
package_default
|
|
777
|
-
} from "./cli-
|
|
781
|
+
} from "./cli-xtrz6bzs.js";
|
|
778
782
|
import {
|
|
779
783
|
realtimeBus,
|
|
780
784
|
init_bus
|
|
@@ -20082,6 +20086,7 @@ async function poolHarnessModelError(model) {
|
|
|
20082
20086
|
// src/extensions/apply-task-create.ts
|
|
20083
20087
|
init_types();
|
|
20084
20088
|
init_secret_scrubber();
|
|
20089
|
+
init_event_bus();
|
|
20085
20090
|
|
|
20086
20091
|
// src/extensions/dispatcher.ts
|
|
20087
20092
|
init_db_client();
|
|
@@ -20247,6 +20252,8 @@ async function completeIfSettled(runId, ctx) {
|
|
|
20247
20252
|
const run = await getWorkflowRun2(runId);
|
|
20248
20253
|
if (run?.status !== "running")
|
|
20249
20254
|
return false;
|
|
20255
|
+
if (await getRunLineageBlock(runId))
|
|
20256
|
+
return false;
|
|
20250
20257
|
const steps = await getWorkflowRunStepsByRunId2(runId);
|
|
20251
20258
|
if (retryPendingNodeIds(steps).size > 0)
|
|
20252
20259
|
return false;
|
|
@@ -20439,6 +20446,7 @@ async function getRunIdsByStatus(status) {
|
|
|
20439
20446
|
}
|
|
20440
20447
|
// src/workflows/retry-poller.ts
|
|
20441
20448
|
init_db3();
|
|
20449
|
+
init_workflow_runs();
|
|
20442
20450
|
var pollerTimeout = null;
|
|
20443
20451
|
function startRetryPoller(registry, intervalMs = 5000) {
|
|
20444
20452
|
if (pollerTimeout !== null)
|
|
@@ -20455,6 +20463,14 @@ function startRetryPoller(registry, intervalMs = 5000) {
|
|
|
20455
20463
|
const workflow = await getWorkflow2(run.workflowId);
|
|
20456
20464
|
if (!workflow)
|
|
20457
20465
|
continue;
|
|
20466
|
+
const foreachParent = resolveForeachParent(workflow.definition, step.nodeId);
|
|
20467
|
+
if (foreachParent) {
|
|
20468
|
+
if (!await claimRetry(run.id, step.id, { requeueForeachChild: true }))
|
|
20469
|
+
continue;
|
|
20470
|
+
console.log(`[workflows] Retrying foreach item ${step.nodeId} (attempt ${step.retryCount}) for run ${step.runId}`);
|
|
20471
|
+
await runForeachDrive(run.id, foreachParent.id, registry);
|
|
20472
|
+
continue;
|
|
20473
|
+
}
|
|
20458
20474
|
const node = workflow.definition.nodes.find((n) => n.id === step.nodeId);
|
|
20459
20475
|
if (!node)
|
|
20460
20476
|
continue;
|
|
@@ -20512,7 +20528,7 @@ function startRetryPoller(registry, intervalMs = 5000) {
|
|
|
20512
20528
|
if (!waiting)
|
|
20513
20529
|
continue;
|
|
20514
20530
|
if (result.waitFor === "workflow.child.finished") {
|
|
20515
|
-
const { resumeFromChildRun } = await import("./resume-
|
|
20531
|
+
const { resumeFromChildRun } = await import("./resume-frdtgfa0.js");
|
|
20516
20532
|
await resumeFromChildRun(step.id, registry);
|
|
20517
20533
|
}
|
|
20518
20534
|
} else {
|
|
@@ -20571,13 +20587,23 @@ function startRetryPoller(registry, intervalMs = 5000) {
|
|
|
20571
20587
|
}
|
|
20572
20588
|
pollerTimeout = setTimeout(poll, intervalMs);
|
|
20573
20589
|
}
|
|
20574
|
-
async function claimRetry(runId, stepId) {
|
|
20590
|
+
async function claimRetry(runId, stepId, options = {}) {
|
|
20575
20591
|
return getDbClient2().transaction(async () => {
|
|
20576
20592
|
const run = await getWorkflowRun2(runId);
|
|
20577
20593
|
if (!run || !RETRYABLE_RUN_STATUSES.has(run.status))
|
|
20578
20594
|
return false;
|
|
20595
|
+
if (await getRunLineageBlock(runId)) {
|
|
20596
|
+
await disarmWorkflowTreeRetries([runId], new Date().toISOString());
|
|
20597
|
+
return false;
|
|
20598
|
+
}
|
|
20599
|
+
if (options.requeueForeachChild && run.status === "failed") {
|
|
20600
|
+
await getDbClient2().run(`UPDATE workflow_run_steps SET nextRetryAt = NULL, finishedAt = ?
|
|
20601
|
+
WHERE id = ? AND runId = ? AND status = 'failed' AND nextRetryAt IS NOT NULL`, [new Date().toISOString(), stepId, runId]);
|
|
20602
|
+
return false;
|
|
20603
|
+
}
|
|
20604
|
+
const set = options.requeueForeachChild ? "status = 'pending', nextRetryAt = NULL, error = NULL" : "status = 'running', nextRetryAt = NULL";
|
|
20579
20605
|
const claimed = await getDbClient2().get(`UPDATE workflow_run_steps
|
|
20580
|
-
SET
|
|
20606
|
+
SET ${set}
|
|
20581
20607
|
WHERE id = ? AND runId = ? AND status = 'failed' AND nextRetryAt IS NOT NULL
|
|
20582
20608
|
RETURNING id`, [stepId, runId]);
|
|
20583
20609
|
if (!claimed)
|
|
@@ -20593,6 +20619,8 @@ async function completeRunIfSettled(runId, ctx) {
|
|
|
20593
20619
|
const run = await getWorkflowRun2(runId);
|
|
20594
20620
|
if (!run || run.status !== "running" && run.status !== "waiting")
|
|
20595
20621
|
return;
|
|
20622
|
+
if (await getRunLineageBlock(runId))
|
|
20623
|
+
return;
|
|
20596
20624
|
const steps = await getWorkflowRunStepsByRunId2(runId);
|
|
20597
20625
|
const live = steps.some((s) => s.status === "running" || s.status === "waiting" || s.status === "failed" && s.nextRetryAt != null);
|
|
20598
20626
|
if (live)
|
|
@@ -21183,7 +21211,7 @@ class NotifyExecutor extends BaseExecutor {
|
|
|
21183
21211
|
}
|
|
21184
21212
|
}
|
|
21185
21213
|
case "slack": {
|
|
21186
|
-
const { getSlackApp } = await import("./app-
|
|
21214
|
+
const { getSlackApp } = await import("./app-ctn8gsgx.js");
|
|
21187
21215
|
const app = getSlackApp();
|
|
21188
21216
|
if (!app) {
|
|
21189
21217
|
return {
|
|
@@ -24567,7 +24595,7 @@ function setPreloadedTools(server, names) {
|
|
|
24567
24595
|
async function applyPreToolCall(name, args, requestInfo, inputSchema) {
|
|
24568
24596
|
if (requestInfo.callOrigin !== "mcp")
|
|
24569
24597
|
return { args };
|
|
24570
|
-
const dispatcher = await import("./dispatcher-
|
|
24598
|
+
const dispatcher = await import("./dispatcher-7b8e4z2j.js");
|
|
24571
24599
|
const result = await dispatcher.dispatchPre("pre.tool.call", { tool: name, args, requestInfo }, inputSchema ? {
|
|
24572
24600
|
validateModify: async (data) => {
|
|
24573
24601
|
const schema = normalizeObjectSchema(inputSchema) ?? inputSchema;
|
|
@@ -25602,6 +25630,10 @@ var onTaskCreated = observed("task.created", async (data) => {
|
|
|
25602
25630
|
if (task)
|
|
25603
25631
|
await dispatchPost2("post.task.created", { task }, { skipExtensionId: extensionIdForAgent2(task.creatorAgentId) });
|
|
25604
25632
|
});
|
|
25633
|
+
var onTaskBlocked = observed("task.create_blocked", async (data) => {
|
|
25634
|
+
const { skipExtensionId, ...event } = data;
|
|
25635
|
+
await dispatchPost2("post.task.blocked", event, { skipExtensionId });
|
|
25636
|
+
});
|
|
25605
25637
|
var onTaskCompleted = observed("task.completed", async (data) => {
|
|
25606
25638
|
const task = await taskFrom(data);
|
|
25607
25639
|
if (!task)
|
|
@@ -25829,6 +25861,7 @@ function initExtensionPostBridge() {
|
|
|
25829
25861
|
return;
|
|
25830
25862
|
subscribed = true;
|
|
25831
25863
|
workflowEventBus2.on("task.created", onTaskCreated);
|
|
25864
|
+
workflowEventBus2.on("task.create_blocked", onTaskBlocked);
|
|
25832
25865
|
workflowEventBus2.on("task.completed", onTaskCompleted);
|
|
25833
25866
|
workflowEventBus2.on("task.failed", onTaskFailed);
|
|
25834
25867
|
workflowEventBus2.on("task.cancelled", onTaskCancelled);
|
|
@@ -25849,6 +25882,7 @@ function teardownExtensionPostBridge() {
|
|
|
25849
25882
|
return;
|
|
25850
25883
|
subscribed = false;
|
|
25851
25884
|
workflowEventBus2.off("task.created", onTaskCreated);
|
|
25885
|
+
workflowEventBus2.off("task.create_blocked", onTaskBlocked);
|
|
25852
25886
|
workflowEventBus2.off("task.completed", onTaskCompleted);
|
|
25853
25887
|
workflowEventBus2.off("task.failed", onTaskFailed);
|
|
25854
25888
|
workflowEventBus2.off("task.cancelled", onTaskCancelled);
|
|
@@ -26384,6 +26418,10 @@ function runContext2(event, payload) {
|
|
|
26384
26418
|
agentId = requestAgent ?? stringField(payload, "options", "agentId");
|
|
26385
26419
|
subject = `${stringField(payload, "origin") ?? "?"}: ${snippet(field(payload, "description"))}`;
|
|
26386
26420
|
break;
|
|
26421
|
+
case "post.task.blocked":
|
|
26422
|
+
agentId = stringField(payload, "requester", "agentId");
|
|
26423
|
+
subject = `${stringField(payload, "origin") ?? "?"}: ${stringField(payload, "extension", "name") ?? "?"}`;
|
|
26424
|
+
break;
|
|
26387
26425
|
case "pre.task.followUp":
|
|
26388
26426
|
agentId = stringField(payload, "workerAgentId");
|
|
26389
26427
|
subject = `task ${stringField(payload, "completedTask", "id") ?? "?"} ${stringField(payload, "status") ?? ""}`.trim();
|
|
@@ -26665,10 +26703,48 @@ var MODIFIABLE_OPTION_KEY_SET = new Set(MODIFIABLE_OPTION_KEYS);
|
|
|
26665
26703
|
function warnDroppedKey(extensionName, key) {
|
|
26666
26704
|
console.warn(scrubSecrets(`[extensions] pre.task.create ignored disallowed key "${key}" from extension "${extensionName}"`));
|
|
26667
26705
|
}
|
|
26706
|
+
function scrubFields(fields) {
|
|
26707
|
+
return Object.fromEntries(Object.entries(fields).filter(([, value]) => value !== undefined).map(([key, value]) => [key, typeof value === "string" ? scrubSecrets(value) : value]));
|
|
26708
|
+
}
|
|
26668
26709
|
async function applyPreTaskCreate(args) {
|
|
26669
26710
|
const creatingExtensionId = extensionIdForAgent2(args.requestInfo?.agentId);
|
|
26670
26711
|
const creatingExtension = creatingExtensionId ? listRegistered2().find((loaded) => loaded.record.id === creatingExtensionId) : undefined;
|
|
26671
26712
|
const origin = creatingExtension ? `extension:${creatingExtension.record.name}` : args.origin;
|
|
26713
|
+
const blocked = (reason, extension) => {
|
|
26714
|
+
const { options, requestInfo } = args;
|
|
26715
|
+
const event = {
|
|
26716
|
+
extension,
|
|
26717
|
+
reason: scrubSecrets(reason),
|
|
26718
|
+
origin,
|
|
26719
|
+
source: options.source,
|
|
26720
|
+
requester: scrubFields({
|
|
26721
|
+
userId: options.requestedByUserId,
|
|
26722
|
+
agentId: requestInfo?.agentId ?? options.creatorAgentId,
|
|
26723
|
+
slackUserId: options.slackUserId
|
|
26724
|
+
}),
|
|
26725
|
+
context: scrubFields({
|
|
26726
|
+
contextKey: options.contextKey ?? requestInfo?.contextKey,
|
|
26727
|
+
scheduleId: options.scheduleId,
|
|
26728
|
+
workflowRunId: options.workflowRunId,
|
|
26729
|
+
workflowRunStepId: options.workflowRunStepId,
|
|
26730
|
+
parentTaskId: options.parentTaskId,
|
|
26731
|
+
vcsRepo: options.vcsRepo,
|
|
26732
|
+
vcsNumber: options.vcsNumber,
|
|
26733
|
+
slackChannelId: options.slackChannelId,
|
|
26734
|
+
slackThreadTs: options.slackThreadTs
|
|
26735
|
+
}),
|
|
26736
|
+
description: scrubSecrets(args.description).slice(0, 500)
|
|
26737
|
+
};
|
|
26738
|
+
try {
|
|
26739
|
+
workflowEventBus2.emit("task.create_blocked", {
|
|
26740
|
+
...event,
|
|
26741
|
+
skipExtensionId: creatingExtensionId
|
|
26742
|
+
});
|
|
26743
|
+
} catch (error) {
|
|
26744
|
+
console.error("[extensions] task.create_blocked event not emitted:", scrubSecrets(error instanceof Error ? error.message : String(error)));
|
|
26745
|
+
}
|
|
26746
|
+
return { kind: "blocked", reason: event.reason, extension };
|
|
26747
|
+
};
|
|
26672
26748
|
let modelEditor;
|
|
26673
26749
|
const result = await dispatchPre2("pre.task.create", {
|
|
26674
26750
|
description: args.description,
|
|
@@ -26703,11 +26779,7 @@ async function applyPreTaskCreate(args) {
|
|
|
26703
26779
|
}
|
|
26704
26780
|
});
|
|
26705
26781
|
if (result.action === "block") {
|
|
26706
|
-
return
|
|
26707
|
-
kind: "blocked",
|
|
26708
|
-
reason: result.reason,
|
|
26709
|
-
extension: result.extension
|
|
26710
|
-
};
|
|
26782
|
+
return blocked(result.reason, result.extension);
|
|
26711
26783
|
}
|
|
26712
26784
|
if (result.action === "continue") {
|
|
26713
26785
|
return { kind: "proceed", description: args.description, options: args.options };
|
|
@@ -26721,11 +26793,7 @@ async function applyPreTaskCreate(args) {
|
|
|
26721
26793
|
agentId: options.agentId
|
|
26722
26794
|
});
|
|
26723
26795
|
if (modelError) {
|
|
26724
|
-
return {
|
|
26725
|
-
kind: "blocked",
|
|
26726
|
-
reason: `pre.task.create rewrite from extension "${modelEditor.name}" is invalid: ${modelError}`,
|
|
26727
|
-
extension: modelEditor
|
|
26728
|
-
};
|
|
26796
|
+
return blocked(`pre.task.create rewrite from extension "${modelEditor.name}" is invalid: ${modelError}`, modelEditor);
|
|
26729
26797
|
}
|
|
26730
26798
|
}
|
|
26731
26799
|
return {
|
|
@@ -34958,7 +35026,7 @@ async function notifySlack(text) {
|
|
|
34958
35026
|
return;
|
|
34959
35027
|
}
|
|
34960
35028
|
try {
|
|
34961
|
-
const { getSlackApp } = await import("./app-
|
|
35029
|
+
const { getSlackApp } = await import("./app-ctn8gsgx.js");
|
|
34962
35030
|
const app = getSlackApp();
|
|
34963
35031
|
if (!app) {
|
|
34964
35032
|
console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
|
|
@@ -35029,7 +35097,7 @@ async function deleteJiraWebhook(webhookId) {
|
|
|
35029
35097
|
console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
|
|
35030
35098
|
}
|
|
35031
35099
|
async function overwriteWebhookIds(next) {
|
|
35032
|
-
const { getDbClient } = await import("./db-
|
|
35100
|
+
const { getDbClient } = await import("./db-w759qmx0.js");
|
|
35033
35101
|
await getDbClient().transaction(async (tx) => {
|
|
35034
35102
|
const row = await tx.get("SELECT metadata FROM oauth_apps WHERE provider = 'jira'");
|
|
35035
35103
|
if (!row) {
|
|
@@ -108424,7 +108492,7 @@ async function reloadGlobalConfigsAndIntegrations() {
|
|
|
108424
108492
|
return runWithoutRequestAuth(() => reloadGlobalConfigsAndIntegrationsInner());
|
|
108425
108493
|
}
|
|
108426
108494
|
async function reloadGlobalConfigsAndIntegrationsInner() {
|
|
108427
|
-
const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-
|
|
108495
|
+
const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-3n8m9ea2.js");
|
|
108428
108496
|
const wasEmbeddingsConfigured = getEmbeddingProvider().isConfigured();
|
|
108429
108497
|
const updated = await loadGlobalConfigsIntoEnv(true);
|
|
108430
108498
|
await syncTelemetryEnabled("settings").catch((err) => {
|
|
@@ -108440,10 +108508,10 @@ async function reloadGlobalConfigsAndIntegrationsInner() {
|
|
|
108440
108508
|
integrations.push("embeddings");
|
|
108441
108509
|
}
|
|
108442
108510
|
if (!wasEmbeddingsConfigured && isEmbeddingsConfigured) {
|
|
108443
|
-
import("./boot-reembed-
|
|
108511
|
+
import("./boot-reembed-w75maga2.js").then(({ runBootReembed }) => runBootReembed()).catch((err) => {
|
|
108444
108512
|
console.error("[config-reload] memory backfill failed (non-fatal):", err);
|
|
108445
108513
|
});
|
|
108446
|
-
import("./boot-reembed-
|
|
108514
|
+
import("./boot-reembed-dwzfttdr.js").then(({ runBootReembedScripts }) => runBootReembedScripts()).catch((err) => {
|
|
108447
108515
|
console.error("[config-reload] script backfill failed (non-fatal):", err);
|
|
108448
108516
|
});
|
|
108449
108517
|
}
|
|
@@ -113453,6 +113521,7 @@ init_db3();
|
|
|
113453
113521
|
|
|
113454
113522
|
// src/workflows/approval-cancel.ts
|
|
113455
113523
|
init_db3();
|
|
113524
|
+
init_workflow_runs();
|
|
113456
113525
|
init_rbac();
|
|
113457
113526
|
var LIVE_RUN_STATUSES = new Set(["running", "waiting"]);
|
|
113458
113527
|
async function cancelApprovalRequest(input) {
|
|
@@ -113527,19 +113596,23 @@ async function cancelApprovalRequestAndRun(id, data) {
|
|
|
113527
113596
|
if (!request)
|
|
113528
113597
|
return null;
|
|
113529
113598
|
let runCancelled = false;
|
|
113599
|
+
let treeRunIds = [];
|
|
113530
113600
|
const runId = request.workflowRunId;
|
|
113531
113601
|
if (runId) {
|
|
113532
|
-
const
|
|
113533
|
-
if (
|
|
113534
|
-
|
|
113602
|
+
const status = await getWorkflowRunStatus(runId);
|
|
113603
|
+
if (status && LIVE_RUN_STATUSES.has(status)) {
|
|
113604
|
+
const result = await cancelWorkflowRunRows2(runId, data.reason);
|
|
113605
|
+
runCancelled = result.cancelled;
|
|
113606
|
+
treeRunIds = result.runIds;
|
|
113535
113607
|
}
|
|
113536
113608
|
}
|
|
113537
113609
|
const slackReason = data.slackReason ?? data.reason;
|
|
113538
113610
|
client.afterCommit(async () => {
|
|
113539
113611
|
await postApprovalCancellationUpdates([request], slackReason);
|
|
113540
|
-
if (runCancelled
|
|
113541
|
-
|
|
113542
|
-
|
|
113612
|
+
if (runCancelled) {
|
|
113613
|
+
await postTreeApprovalCancellations2(treeRunIds, data.reason, {
|
|
113614
|
+
exceptRequestId: request.id
|
|
113615
|
+
});
|
|
113543
113616
|
}
|
|
113544
113617
|
});
|
|
113545
113618
|
return { request, runCancelled };
|
|
@@ -136360,7 +136433,7 @@ var registerCancelWorkflowRunTool = (server) => {
|
|
|
136360
136433
|
createToolRegistrar(server)("cancel-workflow-run", {
|
|
136361
136434
|
title: "Cancel Workflow Run",
|
|
136362
136435
|
annotations: { destructiveHint: true },
|
|
136363
|
-
description: "Cancel a running or waiting workflow run. Cancels
|
|
136436
|
+
description: "Cancel a running or waiting workflow run and every child run below it. Cancels their non-terminal steps, tasks, pending approvals and queued retries in one transaction; finished child runs keep their status. Repeating the cancel on a cancelled run finishes any child runs still open.",
|
|
136364
136437
|
inputSchema: object2({
|
|
136365
136438
|
runId: string2().uuid().describe("Workflow run ID to cancel"),
|
|
136366
136439
|
reason: string2().optional().describe("Optional reason for cancellation")
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
getActivePricingRow2,
|
|
5
5
|
insertPricingRow2,
|
|
6
6
|
init_db3
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-jb30dzvk.js";
|
|
8
8
|
import {
|
|
9
9
|
loadModelsDevCache,
|
|
10
10
|
buildModelsDevSeedRows
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-sbwsxvtd.js";
|
|
12
12
|
import {
|
|
13
13
|
setRuntimeModelCatalog,
|
|
14
14
|
init_runtime_model_catalog
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
tierConfigKey,
|
|
8
8
|
init_model_tier_keys,
|
|
9
9
|
init_db3
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-jb30dzvk.js";
|
|
11
11
|
import {
|
|
12
12
|
ensureRbacSeedsSynced2,
|
|
13
13
|
init_rbac_roles
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-ff1tm9n9.js";
|
|
15
15
|
import {
|
|
16
16
|
seedPricingFromModelsDev
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-sbwsxvtd.js";
|
|
18
18
|
import {
|
|
19
19
|
MODEL_TIERS,
|
|
20
20
|
DEFAULT_MODEL_TIER_MAP,
|
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
summarizeSession
|
|
13
13
|
} from "./cli-mmhj8vd7.js";
|
|
14
|
+
import {
|
|
15
|
+
getOpenRouterAttributionHeaders,
|
|
16
|
+
init_openrouter_base_url
|
|
17
|
+
} from "./cli-dfyv0jdy.js";
|
|
14
18
|
import {
|
|
15
19
|
resolveTemplateFromCode,
|
|
16
20
|
resolveTemplateAsync,
|
|
17
21
|
init_resolver,
|
|
18
22
|
init_session_templates
|
|
19
|
-
} from "./cli-
|
|
20
|
-
import {
|
|
21
|
-
getOpenRouterAttributionHeaders,
|
|
22
|
-
init_openrouter_base_url
|
|
23
|
-
} from "./cli-dfyv0jdy.js";
|
|
23
|
+
} from "./cli-dqygeeh5.js";
|
|
24
24
|
import {
|
|
25
25
|
isSessionSummarySkipped,
|
|
26
26
|
init_env_flag
|
|
@@ -13,7 +13,7 @@ async function createRuntimeProvider(kind, target = {}) {
|
|
|
13
13
|
return new StaticRuntimeProvider;
|
|
14
14
|
}
|
|
15
15
|
case "docker": {
|
|
16
|
-
const { DockerRuntimeProvider } = await import("./docker-
|
|
16
|
+
const { DockerRuntimeProvider } = await import("./docker-s84hjs91.js");
|
|
17
17
|
return new DockerRuntimeProvider;
|
|
18
18
|
}
|
|
19
19
|
case "e2b": {
|
|
@@ -385,7 +385,7 @@ agent-fs is the shared drive between agents and people. Documents (reports, dige
|
|
|
385
385
|
Pages: only for polished artifacts shared with a wider audience or explicitly requested; see \`pages\` skill.
|
|
386
386
|
A tool a person will use, with data and actions: build an app. See the \`apps\` skill.
|
|
387
387
|
Link env: \`APP_URL\` for pages, \`MCP_BASE_URL\` for the API, \`AGENT_FS_LIVE_URL\` for files. Report missing variables.
|
|
388
|
-
|
|
388
|
+
Give people the live app link \`\${AGENT_FS_LIVE_URL}/file/~/<org>/<drive>/<path>\`. Make an \`agent-fs share-create\` link only when the requester asks for one or the reader has no agent-fs login.
|
|
389
389
|
`,
|
|
390
390
|
variables: [],
|
|
391
391
|
category: "system"
|
|
@@ -482,6 +482,22 @@ Task: {{task}}{{progressLine}}
|
|
|
482
482
|
],
|
|
483
483
|
category: "system"
|
|
484
484
|
});
|
|
485
|
+
registerTemplate({
|
|
486
|
+
eventType: "system.agent.context.bound_note",
|
|
487
|
+
header: "",
|
|
488
|
+
defaultBody: "Context is {{contextTokens}} tokens{{contextShare}}. Keep this task bounded: finish the current step, store-progress, and complete or defer instead of starting new exploration.",
|
|
489
|
+
variables: [
|
|
490
|
+
{
|
|
491
|
+
name: "contextTokens",
|
|
492
|
+
description: "Prompt size of the latest request (input + cache read + cache write tokens)"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
name: "contextShare",
|
|
496
|
+
description: `How full the model's context window is, e.g. " (21% of the 1,000,000-token window)". Empty when the window is unknown`
|
|
497
|
+
}
|
|
498
|
+
],
|
|
499
|
+
category: "system"
|
|
500
|
+
});
|
|
485
501
|
registerTemplate({
|
|
486
502
|
eventType: "system.agent.cursor.first_message",
|
|
487
503
|
header: "",
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
} from "./cli-4sydckyj.js";
|
|
9
9
|
import {
|
|
10
10
|
init_templates3
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-j6rktc91.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveTemplateAsync,
|
|
14
14
|
init_resolver,
|
|
15
15
|
init_session_templates
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-dqygeeh5.js";
|
|
17
17
|
import {
|
|
18
18
|
MAX_PROFILE_FILE_LENGTH,
|
|
19
19
|
getAppUrl,
|