@desplega.ai/agent-swarm 1.151.0 → 1.152.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/README.md +3 -1
  2. package/dist/{acp-adapter-ex8hzjfc.js → acp-adapter-4s7q25ft.js} +1 -1
  3. package/dist/{actions-2bgpyhww.js → actions-cs6rhmvc.js} +13 -13
  4. package/dist/{app-1706zhr1.js → app-j54aq0dj.js} +3 -3
  5. package/dist/{assistant-bavke5p7.js → assistant-w1pgn7vf.js} +14 -14
  6. package/dist/{boot-reembed-3cmrrmpa.js → boot-reembed-42vgkrrj.js} +4 -4
  7. package/dist/{boot-reembed-nafcmmmc.js → boot-reembed-smy30z32.js} +3 -3
  8. package/dist/{boot-scrub-logs-cd6a2sq0.js → boot-scrub-logs-b6s72fsw.js} +2 -2
  9. package/dist/{claude-adapter-wfp2gzvz.js → claude-adapter-fh7rmcj9.js} +3 -3
  10. package/dist/{claude-sdk-session-bht9jjak.js → claude-sdk-session-xhynatn9.js} +3 -3
  11. package/dist/{cli-f1wky6zp.js → cli-3g61md6v.js} +1 -1
  12. package/dist/{cli-a1z3h107.js → cli-3pft2z6r.js} +4 -4
  13. package/dist/{cli-5tpgq60f.js → cli-72tgtzr1.js} +152 -23
  14. package/dist/{cli-0qb1z6s2.js → cli-7bwaerjt.js} +1 -1
  15. package/dist/{cli-czjtgfys.js → cli-b4dyetqt.js} +2 -2
  16. package/dist/{cli-s14agm5s.js → cli-bdt7w021.js} +12 -3
  17. package/dist/{cli-sjaae6ff.js → cli-dsyg66vt.js} +3 -3
  18. package/dist/{cli-2tbvf1z1.js → cli-ftdjz1mk.js} +8 -8
  19. package/dist/{cli-zkxymas5.js → cli-gfez0qmk.js} +1 -1
  20. package/dist/{cli-q88st9aj.js → cli-gxf2ebyz.js} +2 -2
  21. package/dist/{cli-ppm4975n.js → cli-jtvs5m8q.js} +1 -1
  22. package/dist/{cli-7tgcstn2.js → cli-jytf5mw9.js} +2 -2
  23. package/dist/{cli-g69fdc9g.js → cli-kf8qp2vf.js} +2 -2
  24. package/dist/{cli-5jd2z7av.js → cli-ks8a1cgq.js} +6 -2
  25. package/dist/{cli-gjyvhmmh.js → cli-ng4q6a9t.js} +5 -5
  26. package/dist/{cli-3v9xhjcn.js → cli-sakxd2rg.js} +2 -2
  27. package/dist/{cli-frcta2w4.js → cli-sqmh7jj1.js} +1 -1
  28. package/dist/{cli-vwm416m6.js → cli-v9sk4dzw.js} +1 -1
  29. package/dist/{cli-j9xczhaq.js → cli-vbk025fm.js} +1 -1
  30. package/dist/{cli-r2q6pevn.js → cli-wfve107r.js} +43 -21
  31. package/dist/{cli-9004vfdf.js → cli-y8tayczk.js} +2 -2
  32. package/dist/{cli-gbfwcd3k.js → cli-zfzznn7c.js} +7 -6
  33. package/dist/cli.js +11 -11
  34. package/dist/{codex-adapter-jjjk8w4m.js → codex-adapter-k6yq95sn.js} +2 -2
  35. package/dist/{codex-session-runner-nd6ayxkx.js → codex-session-runner-3rp84pk8.js} +2 -2
  36. package/dist/{commands-9v4psyq1.js → commands-pbr5jzy5.js} +2 -2
  37. package/dist/{db-wnt58tpe.js → db-z0xaa59a.js} +2 -2
  38. package/dist/{dispatcher-05jh1aqk.js → dispatcher-pwpgsj0x.js} +12 -12
  39. package/dist/{handlers-tw90pkh5.js → handlers-5mzk4mbg.js} +15 -15
  40. package/dist/{hook-sxe3r349.js → hook-8bz33zee.js} +1 -1
  41. package/dist/{hook-123e2scb.js → hook-kbh84zb1.js} +2 -2
  42. package/dist/{http-ecsar8ez.js → http-pppxg5vr.js} +100 -36
  43. package/dist/{index-hw26vj40.js → index-68bd9b5f.js} +12 -12
  44. package/dist/{index-16js521z.js → index-k1hq1qt6.js} +8 -8
  45. package/dist/{index-zj518gf9.js → index-mjpxsr6k.js} +13 -13
  46. package/dist/{index-ymn7em0p.js → index-y0te09pn.js} +3 -3
  47. package/dist/{index-nnrbpcjp.js → index-z0zwjtkn.js} +12 -12
  48. package/dist/{keepalive-asqtcm4y.js → keepalive-xvmwnh1d.js} +4 -4
  49. package/dist/{lead-xbfr7fvt.js → lead-pf8nvxt8.js} +16 -16
  50. package/dist/{maintenance-qma55qvw.js → maintenance-jk4q0wgg.js} +4 -4
  51. package/dist/{oauth-refresh-sweep-3s04c6qw.js → oauth-refresh-sweep-6207x9sj.js} +3 -3
  52. package/dist/{onboard-drskd386.js → onboard-b0csgm0q.js} +2 -2
  53. package/dist/{otel-impl-943c96er.js → otel-impl-b6rfehth.js} +1 -1
  54. package/dist/{pricing-refresh-mx51az05.js → pricing-refresh-4e201wtd.js} +4 -4
  55. package/dist/{rbac-roles-wcmrg6sv.js → rbac-roles-mkc5n5qa.js} +4 -4
  56. package/dist/{rbac-roles-78baecqd.js → rbac-roles-zp6e4geh.js} +3 -3
  57. package/dist/{render-v2-8zjntgf5.js → render-v2-4fazz9tf.js} +3 -3
  58. package/dist/{seed-pricing-jqjs6cws.js → seed-pricing-thxpn9vn.js} +3 -3
  59. package/dist/{setup-4pks0vfk.js → setup-wb0z8cat.js} +2 -2
  60. package/dist/{work-objects-wangt792.js → work-objects-h3498kwe.js} +18 -17
  61. package/dist/{worker-p2mr422x.js → worker-2m2tzxp3.js} +16 -16
  62. package/openapi.json +5 -5
  63. package/package.json +1 -1
  64. package/src/agentmail/inbound-archive.ts +71 -0
  65. package/src/agentmail/types.ts +2 -0
  66. package/src/be/db.ts +1 -1
  67. package/src/be/scripts/typecheck.ts +4 -0
  68. package/src/be/swarm-config-guard.ts +7 -1
  69. package/src/extensions/lifecycle.ts +26 -4
  70. package/src/http/extensions.ts +8 -3
  71. package/src/http/webhooks.ts +13 -5
  72. package/src/rbac/legacy-policy.ts +13 -1
  73. package/src/scripts-runtime/sdk-allowlist.ts +4 -0
  74. package/src/scripts-runtime/types/stdlib.d.ts +4 -0
  75. package/src/scripts-runtime/types/swarm-sdk.d.ts +4 -0
  76. package/src/server.ts +12 -0
  77. package/src/slack/render-v2.ts +10 -4
  78. package/src/slack/responses.ts +7 -4
  79. package/src/slack/task-output.ts +21 -0
  80. package/src/slack/watcher.ts +3 -2
  81. package/src/slack/work-objects.ts +2 -1
  82. package/src/tests/agentmail-inbound-archive.test.ts +418 -0
  83. package/src/tests/extensions-example-mcp-install.test.ts +2 -2
  84. package/src/tests/extensions-http.test.ts +84 -3
  85. package/src/tests/extensions-lead-equivalence.test.ts +21 -0
  86. package/src/tests/extensions-mcp-tools.test.ts +111 -3
  87. package/src/tests/fixtures/store-progress-malformed-output.json +4 -0
  88. package/src/tests/rbac-admission-e2e.test.ts +35 -4
  89. package/src/tests/rbac-e2e-helpers.ts +18 -0
  90. package/src/tests/rbac-engine.test.ts +2 -2
  91. package/src/tests/rbac-mcp-admission-e2e.test.ts +22 -4
  92. package/src/tests/reload-config.test.ts +17 -0
  93. package/src/tests/scripts-only-gating.test.ts +4 -0
  94. package/src/tests/slack-render-v2.test.ts +24 -2
  95. package/src/tests/slack-task-output.test.ts +36 -0
  96. package/src/tests/store-progress-attachments-handler.test.ts +100 -1
  97. package/src/tests/swarm-config-reserved-keys.test.ts +6 -1
  98. package/src/tests/tool-annotations.test.ts +1 -1
  99. package/src/tools/extension-activate-version.ts +38 -0
  100. package/src/tools/extension-common.ts +2 -1
  101. package/src/tools/extension-delete.ts +29 -0
  102. package/src/tools/extension-disable.ts +36 -0
  103. package/src/tools/extension-enable.ts +36 -0
  104. package/src/tools/extension-install.ts +2 -2
  105. package/src/tools/store-progress.ts +30 -0
  106. package/src/tools/tool-config.ts +5 -1
  107. package/templates/skills/agent-browser/SKILL.md +84 -0
  108. package/templates/skills/agent-browser/content.md +21 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runStopHookSessionSummarySubprocess
3
- } from "./cli-frcta2w4.js";
3
+ } from "./cli-sqmh7jj1.js";
4
4
  import {
5
5
  fetchInstalledMcpServers
6
6
  } from "./cli-tng3131n.js";
@@ -819,7 +819,7 @@ class ClaudeAdapter {
819
819
  if (transport === "sdk" && isClaudeBridgeEffective(sourceEnv)) {
820
820
  throw new Error("CLAUDE_TRANSPORT=sdk cannot run with an effective Claude Bridge configuration. Select CLI transport or disable the bridge.");
821
821
  }
822
- const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-bht9jjak.js") : undefined;
822
+ const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-xhynatn9.js") : undefined;
823
823
  claudeSdk?.validateClaudeSdkAdditionalArgs([
824
824
  ...claudeBinaryArgv.slice(1),
825
825
  ...config.additionalArgs ?? []
@@ -35,7 +35,7 @@ import {
35
35
  import {
36
36
  init_package,
37
37
  package_default
38
- } from "./cli-zkxymas5.js";
38
+ } from "./cli-gfez0qmk.js";
39
39
  import {
40
40
  init_secret_scrubber,
41
41
  scrubSecrets
@@ -49,7 +49,7 @@ import {
49
49
  import {
50
50
  init_package,
51
51
  package_default
52
- } from "./cli-zkxymas5.js";
52
+ } from "./cli-gfez0qmk.js";
53
53
  import {
54
54
  init_secret_scrubber,
55
55
  scrubSecrets
@@ -7,7 +7,7 @@ import {
7
7
  init_date_utils,
8
8
  init_db,
9
9
  normalizeDateRequired
10
- } from "./cli-s14agm5s.js";
10
+ } from "./cli-bdt7w021.js";
11
11
  import {
12
12
  init_secret_scrubber,
13
13
  registerVolatileSecret,
@@ -49,7 +49,7 @@ import {
49
49
  setSlackMessageTracking,
50
50
  slackContextKey,
51
51
  updateSlackMessageRecord
52
- } from "./cli-s14agm5s.js";
52
+ } from "./cli-bdt7w021.js";
53
53
  import {
54
54
  getAppUrl,
55
55
  init_constants
@@ -54475,7 +54475,7 @@ async function initOtel(serviceRole = process.env.AGENT_ROLE || "api") {
54475
54475
  return;
54476
54476
  initialized = true;
54477
54477
  try {
54478
- const impl = await import("./otel-impl-943c96er.js");
54478
+ const impl = await import("./otel-impl-b6rfehth.js");
54479
54479
  await impl.boot(serviceRole);
54480
54480
  realWithSpan = impl.withSpan;
54481
54481
  realStartSpan = impl.startSpan;
@@ -54871,6 +54871,24 @@ function buildTreeBlocks(roots) {
54871
54871
 
54872
54872
  // src/slack/responses.ts
54873
54873
  init_db();
54874
+
54875
+ // src/slack/task-output.ts
54876
+ function slackTaskOutput(task) {
54877
+ const output = task.output ?? undefined;
54878
+ if (task.status !== "completed" || task.outputSchema || !task.tags?.includes("deferred")) {
54879
+ return output;
54880
+ }
54881
+ const notice = output?.match(/^Deferred until [^\n]+? \([^\n]+?\) -> (.*)$/);
54882
+ if (!notice)
54883
+ return output;
54884
+ const pending = notice[1]?.trim();
54885
+ return pending ? `Pending: ${pending}` : "";
54886
+ }
54887
+ function isSlackEtaOnlyNotice(task) {
54888
+ return !!task.output && slackTaskOutput(task) === "";
54889
+ }
54890
+
54891
+ // src/slack/responses.ts
54874
54892
  function classifySlackUpdateError(error) {
54875
54893
  const errorCode = error?.data?.error;
54876
54894
  if (errorCode === "message_not_found" || errorCode === "channel_not_found" || errorCode === "thread_not_found") {
@@ -54890,7 +54908,7 @@ function shouldPostInlineCompletionOutput(task) {
54890
54908
  return false;
54891
54909
  if (task.slackReplySent)
54892
54910
  return false;
54893
- const output = task.output?.trim();
54911
+ const output = slackTaskOutput(task)?.trim();
54894
54912
  return !!output && isTreeOutputTruncated(markdownToSlack(output));
54895
54913
  }
54896
54914
  function formatInlineCompletionOutputChunks(opts) {
@@ -54913,7 +54931,7 @@ async function sendInlineTaskOutput(task) {
54913
54931
  const chunks = formatInlineCompletionOutputChunks({
54914
54932
  agentName: agent.name,
54915
54933
  taskId: task.id,
54916
- output: task.output
54934
+ output: slackTaskOutput(task) ?? ""
54917
54935
  });
54918
54936
  try {
54919
54937
  for (let i = 0;i < chunks.length; i += MAX_INLINE_OUTPUT_BLOCKS_PER_MESSAGE) {
@@ -54940,6 +54958,8 @@ async function sendInlineTaskOutput(task) {
54940
54958
  }
54941
54959
  }
54942
54960
  async function sendTaskResponse(task) {
54961
+ if (isSlackEtaOnlyNotice(task))
54962
+ return true;
54943
54963
  const app = getSlackApp();
54944
54964
  if (!app || !task.slackChannelId || !task.slackThreadTs) {
54945
54965
  return false;
@@ -54957,7 +54977,7 @@ async function sendTaskResponse(task) {
54957
54977
  const agentName = agent.name;
54958
54978
  try {
54959
54979
  if (task.status === "completed") {
54960
- const output = task.output || "Task completed.";
54980
+ const output = slackTaskOutput(task) || "Task completed.";
54961
54981
  const slackOutput = markdownToSlack(output);
54962
54982
  const attachmentsBlock = formatAttachmentsBlockForSlack(await getTaskAttachments(task.id));
54963
54983
  const body = slackOutput + attachmentsBlock;
@@ -55065,6 +55085,8 @@ async function updateProgressInPlace(task, progress, messageTs) {
55065
55085
  }
55066
55086
  }
55067
55087
  async function updateToFinal(task, messageTs) {
55088
+ if (isSlackEtaOnlyNotice(task))
55089
+ return "ok";
55068
55090
  const app = getSlackApp();
55069
55091
  if (!app || !task.slackChannelId || !task.agentId)
55070
55092
  return "failed";
@@ -55076,7 +55098,7 @@ async function updateToFinal(task, messageTs) {
55076
55098
  let text;
55077
55099
  let completionBlockBatches;
55078
55100
  if (task.status === "completed") {
55079
- const output = task.output || "Task completed.";
55101
+ const output = slackTaskOutput(task) || "Task completed.";
55080
55102
  const slackOutput = markdownToSlack(output);
55081
55103
  const attachmentsBlock = formatAttachmentsBlockForSlack(await getTaskAttachments(task.id));
55082
55104
  const body = slackOutput + attachmentsBlock;
@@ -55265,7 +55287,7 @@ async function buildTreeNodes(tree) {
55265
55287
  progress: child.progress ?? undefined,
55266
55288
  duration: childDuration,
55267
55289
  slackReplySent: child.slackReplySent,
55268
- output: child.output ?? undefined,
55290
+ output: slackTaskOutput(child),
55269
55291
  failureReason: child.failureReason ?? undefined,
55270
55292
  attachments: childAttachments,
55271
55293
  steered: childSteered,
@@ -55283,7 +55305,7 @@ async function buildTreeNodes(tree) {
55283
55305
  progress: task.progress ?? undefined,
55284
55306
  duration,
55285
55307
  slackReplySent: task.slackReplySent,
55286
- output: task.output ?? undefined,
55308
+ output: slackTaskOutput(task),
55287
55309
  failureReason: task.failureReason ?? undefined,
55288
55310
  attachments: rootAttachments,
55289
55311
  steered: rootSteered,
@@ -55793,15 +55815,15 @@ async function initSlackApp() {
55793
55815
  logLevel: import_bolt.LogLevel.DEBUG,
55794
55816
  ...slackApiUrl ? { clientOptions: { slackApiUrl } } : {}
55795
55817
  });
55796
- const { registerMessageHandler } = await import("./handlers-tw90pkh5.js");
55797
- const { registerCommandHandler } = await import("./commands-9v4psyq1.js");
55798
- const { registerActionHandlers } = await import("./actions-2bgpyhww.js");
55799
- const { registerWorkObjectHandlers } = await import("./work-objects-wangt792.js");
55818
+ const { registerMessageHandler } = await import("./handlers-5mzk4mbg.js");
55819
+ const { registerCommandHandler } = await import("./commands-pbr5jzy5.js");
55820
+ const { registerActionHandlers } = await import("./actions-cs6rhmvc.js");
55821
+ const { registerWorkObjectHandlers } = await import("./work-objects-h3498kwe.js");
55800
55822
  registerMessageHandler(app);
55801
55823
  registerCommandHandler(app);
55802
55824
  registerActionHandlers(app);
55803
55825
  registerWorkObjectHandlers(app);
55804
- const { createAssistant } = await import("./assistant-bavke5p7.js");
55826
+ const { createAssistant } = await import("./assistant-w1pgn7vf.js");
55805
55827
  app.assistant(createAssistant());
55806
55828
  return app;
55807
55829
  }
@@ -55810,7 +55832,7 @@ async function startSlackApp() {
55810
55832
  await initSlackApp();
55811
55833
  }
55812
55834
  if (app) {
55813
- const { isSlackRenderV2Enabled: isSlackRenderV2Enabled2 } = await import("./render-v2-8zjntgf5.js");
55835
+ const { isSlackRenderV2Enabled: isSlackRenderV2Enabled2 } = await import("./render-v2-4fazz9tf.js");
55814
55836
  if (isSlackRenderV2Enabled2())
55815
55837
  await ensureSlackRenderV2Activation();
55816
55838
  await app.start();
@@ -56513,7 +56535,7 @@ ${outcomeText(task.failureReason, "Task was cancelled.")}`;
56513
56535
  }
56514
56536
  return `✅
56515
56537
 
56516
- ${outcomeText(task.output, "Task completed.")}`;
56538
+ ${outcomeText(slackTaskOutput(task), "Task completed.")}`;
56517
56539
  }
56518
56540
  async function agentDisplayNameFor(task) {
56519
56541
  return task.agentId ? (await getAgentById(task.agentId))?.name ?? "Agent" : "Agent";
@@ -56530,23 +56552,23 @@ ${outcomeText(task.failureReason, "Task failed.")}`;
56530
56552
  }
56531
56553
  return `↳ ✅ ${agentName} — result
56532
56554
 
56533
- ${outcomeText(task.output, "Task completed.")}`;
56555
+ ${outcomeText(slackTaskOutput(task), "Task completed.")}`;
56534
56556
  }
56535
56557
  function isSlackContinuation(task) {
56536
56558
  return task.source === "schedule" && task.taskType === "deferred" && !!task.slackChannelId && !!task.slackThreadTs;
56537
56559
  }
56538
56560
  function isChildCardCandidate(task, delegationActivatedAt) {
56539
- return task.source !== "slack" && !isSlackContinuation(task) && !!task.slackChannelId && !!task.slackThreadTs && (task.status === "completed" || task.status === "failed") && task.taskType !== "follow-up" && task.taskType !== "reroute-decision" && task.createdAt >= delegationActivatedAt;
56561
+ return !isSlackEtaOnlyNotice(task) && task.source !== "slack" && !isSlackContinuation(task) && !!task.slackChannelId && !!task.slackThreadTs && (task.status === "completed" || task.status === "failed") && task.taskType !== "follow-up" && task.taskType !== "reroute-decision" && task.createdAt >= delegationActivatedAt;
56540
56562
  }
56541
56563
  function taskNeedsDirectOutcome(task, activatedAt) {
56542
- return (task.source === "slack" && isAskOutcomeStatus(task.status) || isSlackContinuation(task) && isOutcomeStatus(task.status)) && task.createdAt >= activatedAt;
56564
+ return !isSlackEtaOnlyNotice(task) && (task.source === "slack" && isAskOutcomeStatus(task.status) || isSlackContinuation(task) && isOutcomeStatus(task.status)) && task.createdAt >= activatedAt;
56543
56565
  }
56544
56566
  async function conclusionResultsLines(closure) {
56545
56567
  const lines = [];
56546
56568
  for (const member of closure) {
56547
56569
  if (member.taskType === "follow-up" || member.taskType === "reroute-decision")
56548
56570
  continue;
56549
- if (!isOutcomeStatus(member.status))
56571
+ if (!isOutcomeStatus(member.status) || isSlackEtaOnlyNotice(member))
56550
56572
  continue;
56551
56573
  const glyph = await taskStateGlyph(member, new Date);
56552
56574
  const agentName = await agentDisplayNameFor(member);
@@ -56555,7 +56577,7 @@ async function conclusionResultsLines(closure) {
56555
56577
  lines.push(`↳ ${glyph} ${agentName} — ${card.permalink}`);
56556
56578
  continue;
56557
56579
  }
56558
- const raw = outcomeText(member.status === "failed" ? member.failureReason : member.output, "");
56580
+ const raw = outcomeText(member.status === "failed" ? member.failureReason : slackTaskOutput(member), "");
56559
56581
  const digest = raw.length > CONCLUSION_DIGEST_LENGTH ? `${raw.slice(0, CONCLUSION_DIGEST_LENGTH).trimEnd()}…` : raw;
56560
56582
  const label = digest ? `${agentName} — ${digest}` : agentName;
56561
56583
  lines.push(`↳ ${glyph} ${label} ${getTaskLink(member.id)}`);
@@ -57051,4 +57073,4 @@ function _resetSlackRenderV2ForTests() {
57051
57073
  outcomeDeliveryFailures.clear();
57052
57074
  }
57053
57075
 
57054
- export { initialize, ensure, isPollTracingEnabled, initOtel, withSpan, startSpan, withSpanContext, withRemoteContext, injectTraceContext, recordSessionCost, recordDbRetentionSweep, recordDbRetentionStatement, require_dist7 as require_dist, ackSlackMessage, getTaskLink, getTaskUrl, markdownToSlack, buildCancelledBlocks, buildBufferFlushBlocks, buildTreeBlocks, getAgentDisplayName, getAgentEmoji, isSlackRenderV2Enabled, isSlackDelegationEnabled, callSlackWithRetry, formatV2Duration, renderThreadTree, ensureSlackThreadTree, childOutcomeContent, streamOutcomeCard, processSlackRenderV2, _resetSlackRenderV2ForTests, registerTreeMessage, getSlackApp, initSlackApp, startSlackApp, stopSlackApp };
57076
+ export { initialize, ensure, isPollTracingEnabled, initOtel, withSpan, startSpan, withSpanContext, withRemoteContext, injectTraceContext, recordSessionCost, recordDbRetentionSweep, recordDbRetentionStatement, require_dist7 as require_dist, ackSlackMessage, getTaskLink, getTaskUrl, markdownToSlack, buildCancelledBlocks, buildBufferFlushBlocks, buildTreeBlocks, slackTaskOutput, getAgentDisplayName, getAgentEmoji, isSlackRenderV2Enabled, isSlackDelegationEnabled, callSlackWithRetry, formatV2Duration, renderThreadTree, ensureSlackThreadTree, childOutcomeContent, streamOutcomeCard, processSlackRenderV2, _resetSlackRenderV2ForTests, registerTreeMessage, getSlackApp, initSlackApp, startSlackApp, stopSlackApp };
@@ -15,7 +15,7 @@ import {
15
15
  recoverIncompleteRuns,
16
16
  repointTrackerSyncBySwarmId,
17
17
  resolveLeadOnlyRecoveryAssignment
18
- } from "./cli-5tpgq60f.js";
18
+ } from "./cli-72tgtzr1.js";
19
19
  import {
20
20
  isMultiRuntimeEnabled
21
21
  } from "./cli-re8z5p8p.js";
@@ -61,7 +61,7 @@ import {
61
61
  releaseStaleReviewingTasks,
62
62
  supersedeTask,
63
63
  updateAgentStatus
64
- } from "./cli-s14agm5s.js";
64
+ } from "./cli-bdt7w021.js";
65
65
  import {
66
66
  init_registry,
67
67
  init_resolver,
@@ -315,6 +315,7 @@ function decideToolAdmission(input) {
315
315
  return { allow: false, reason: "admission: tool has no permission verb (operator-only)" };
316
316
  }
317
317
  // src/rbac/legacy-policy.ts
318
+ init_env_flag();
318
319
  function actsAsLead(principal) {
319
320
  return principal.kind === "agent" && (principal.isLead || hasLeadEquivalence(principal.agentId));
320
321
  }
@@ -323,16 +324,16 @@ var leadOnly = {
323
324
  denyReason: "requires lead agent",
324
325
  evaluate: (principal) => actsAsLead(principal)
325
326
  };
326
- var operatorOrUser = {
327
- name: "operator-or-user",
328
- denyReason: "requires operator or user authentication",
329
- evaluate: (principal) => principal.kind === "operator" || principal.kind === "user"
330
- };
331
327
  var leadOrOperatorOrUser = {
332
328
  name: "lead-or-operator-or-user",
333
329
  denyReason: "requires lead agent, operator, or user authentication",
334
330
  evaluate: (principal) => principal.kind === "operator" || principal.kind === "user" || actsAsLead(principal)
335
331
  };
332
+ var extensionActivation = {
333
+ name: "extension-activation",
334
+ denyReason: "requires operator/user authentication, or a lead with EXTENSION_ALLOW_LEAD_ACTIVATION enabled",
335
+ evaluate: (principal) => principal.kind === "operator" || principal.kind === "user" || actsAsLead(principal) && isEnvFlagEnabled("EXTENSION_ALLOW_LEAD_ACTIVATION", true)
336
+ };
336
337
  var leadOrTaskCreator = {
337
338
  name: "lead-or-task-creator",
338
339
  denyReason: "requires lead agent or task creator",
@@ -466,7 +467,7 @@ var LEGACY_POLICY = {
466
467
  "script.api.rotate": leadOnly,
467
468
  "script.api.delete": leadOnly,
468
469
  "extension.write": leadOrOperatorOrUser,
469
- "extension.activate": operatorOrUser
470
+ "extension.activate": extensionActivation
470
471
  };
471
472
 
472
473
  // src/rbac/can.ts
package/dist/cli.js CHANGED
@@ -65,7 +65,7 @@ var import_react = __toESM(require_react(), 1);
65
65
  // package.json
66
66
  var package_default = {
67
67
  name: "@desplega.ai/agent-swarm",
68
- version: "1.151.0",
68
+ version: "1.152.1",
69
69
  description: "agent-swarm.dev — an open-source operating system for AI work: a lead agent breaks goals into tasks, routes them to specialized workers such as Claude Code or Codex, runs each worker in an isolated container, and preserves shared memory, tools, schedules, and review gates so delegated work compounds across sessions.",
70
70
  keywords: [
71
71
  "agent-swarm.dev",
@@ -742,7 +742,7 @@ function McpServer({ port, apiKey, dbPath }) {
742
742
  if (dbPath) {
743
743
  process.env.DATABASE_PATH = dbPath;
744
744
  }
745
- import("./http-ecsar8ez.js").then(() => {
745
+ import("./http-pppxg5vr.js").then(() => {
746
746
  setStatus("running");
747
747
  }).catch((err) => {
748
748
  setStatus("error");
@@ -828,7 +828,7 @@ function WorkerRunner({
828
828
  }) {
829
829
  const { exit } = use_app_default();
830
830
  import_react.useEffect(() => {
831
- import("./worker-p2mr422x.js").then(({ runWorker }) => runWorker({
831
+ import("./worker-2m2tzxp3.js").then(({ runWorker }) => runWorker({
832
832
  prompt: prompt || undefined,
833
833
  yolo,
834
834
  systemPrompt: systemPrompt || undefined,
@@ -845,7 +845,7 @@ function WorkerRunner({
845
845
  function LeadRunner({ prompt, yolo, systemPrompt, systemPromptFile, additionalArgs }) {
846
846
  const { exit } = use_app_default();
847
847
  import_react.useEffect(() => {
848
- import("./lead-xbfr7fvt.js").then(({ runLead }) => runLead({
848
+ import("./lead-pf8nvxt8.js").then(({ runLead }) => runLead({
849
849
  prompt: prompt || undefined,
850
850
  yolo,
851
851
  systemPrompt: systemPrompt || undefined,
@@ -885,8 +885,8 @@ function LazyComponent({
885
885
  }
886
886
  return import_react.createElement(Component, props);
887
887
  }
888
- var loadOnboard = () => import("./onboard-drskd386.js").then(({ Onboard }) => Onboard);
889
- var loadConnect = () => import("./setup-4pks0vfk.js").then(({ Setup }) => Setup);
888
+ var loadOnboard = () => import("./onboard-b0csgm0q.js").then(({ Onboard }) => Onboard);
889
+ var loadConnect = () => import("./setup-wb0z8cat.js").then(({ Setup }) => Setup);
890
890
  function UnknownCommand({ command }) {
891
891
  const { exit } = use_app_default();
892
892
  import_react.useEffect(() => {
@@ -1007,14 +1007,14 @@ ${binName} docs \u2014 v${package_default.version}
1007
1007
  }
1008
1008
  process.exit(0);
1009
1009
  } else if (args.command === "hook") {
1010
- const { runHook } = await import("./hook-123e2scb.js");
1010
+ const { runHook } = await import("./hook-kbh84zb1.js");
1011
1011
  await runHook();
1012
1012
  } else if (args.command === "codex-hook") {
1013
1013
  const { handleCodexHook } = await import("./codex-hook-8jexc34x.js");
1014
1014
  await handleCodexHook();
1015
1015
  process.exit(0);
1016
1016
  } else if (args.command === "session-summary-stdin") {
1017
- const { runSessionSummaryFromStdin } = await import("./hook-sxe3r349.js");
1017
+ const { runSessionSummaryFromStdin } = await import("./hook-8bz33zee.js");
1018
1018
  await runSessionSummaryFromStdin();
1019
1019
  process.exit(process.exitCode ?? 0);
1020
1020
  } else if (args.command === "artifact") {
@@ -1035,7 +1035,7 @@ ${binName} docs \u2014 v${package_default.version}
1035
1035
  printHelp("scripts");
1036
1036
  process.exit(scriptsArgs[0] === "reembed" || args.showHelp ? 0 : 1);
1037
1037
  }
1038
- const { runScriptsMaintenanceCommand } = await import("./maintenance-qma55qvw.js");
1038
+ const { runScriptsMaintenanceCommand } = await import("./maintenance-jk4q0wgg.js");
1039
1039
  await runScriptsMaintenanceCommand(scriptsArgs);
1040
1040
  console.log("Scripts re-embedded.");
1041
1041
  } else if (args.command === "rbac") {
@@ -1045,14 +1045,14 @@ ${binName} docs \u2014 v${package_default.version}
1045
1045
  printHelp("rbac");
1046
1046
  process.exit(args.showHelp ? 0 : 1);
1047
1047
  }
1048
- const { runRbacCliCommand } = await import("./rbac-roles-78baecqd.js");
1048
+ const { runRbacCliCommand } = await import("./rbac-roles-zp6e4geh.js");
1049
1049
  await runRbacCliCommand(rbacArgs);
1050
1050
  } else if (args.command === "codex-login") {
1051
1051
  const { runCodexLogin } = await import("./codex-login-vx7ghkzj.js");
1052
1052
  const codexLoginArgs = process.argv.slice(process.argv.indexOf("codex-login") + 1);
1053
1053
  await runCodexLogin(codexLoginArgs);
1054
1054
  } else if (args.command === "codex-session-runner") {
1055
- const { runCodexSessionRunner } = await import("./codex-session-runner-nd6ayxkx.js");
1055
+ const { runCodexSessionRunner } = await import("./codex-session-runner-3rp84pk8.js");
1056
1056
  await runCodexSessionRunner();
1057
1057
  } else if (args.command === "claude-managed-setup") {
1058
1058
  const { runClaudeManagedSetup } = await import("./claude-managed-setup-48dwg9bv.js");
@@ -6,7 +6,7 @@ import {
6
6
  createInProcessCodexSession,
7
7
  resolveCodexAuthMode,
8
8
  resolveCodexRunnerArgv
9
- } from "./cli-vwm416m6.js";
9
+ } from "./cli-v9sk4dzw.js";
10
10
  import"./cli-hsxj0yar.js";
11
11
  import"./cli-r94z9p1z.js";
12
12
  import"./cli-b5b30yzk.js";
@@ -26,7 +26,7 @@ import"./cli-bsakbbkm.js";
26
26
  import"./cli-ej6gbxfb.js";
27
27
  import"./cli-sd0mxa3c.js";
28
28
  import"./cli-w5e1d1vv.js";
29
- import"./cli-zkxymas5.js";
29
+ import"./cli-gfez0qmk.js";
30
30
  import"./cli-r2ap2czm.js";
31
31
  import"./cli-knd276ed.js";
32
32
  import"./cli-c4eeb5q2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createInProcessCodexSession
3
- } from "./cli-vwm416m6.js";
3
+ } from "./cli-v9sk4dzw.js";
4
4
  import"./cli-hsxj0yar.js";
5
5
  import"./cli-r94z9p1z.js";
6
6
  import"./cli-b5b30yzk.js";
@@ -20,7 +20,7 @@ import"./cli-bsakbbkm.js";
20
20
  import"./cli-ej6gbxfb.js";
21
21
  import"./cli-sd0mxa3c.js";
22
22
  import"./cli-w5e1d1vv.js";
23
- import"./cli-zkxymas5.js";
23
+ import"./cli-gfez0qmk.js";
24
24
  import {
25
25
  init_secret_scrubber,
26
26
  scrubSecrets
@@ -2,7 +2,7 @@ import {
2
2
  getAllAgents,
3
3
  getAllTasks,
4
4
  init_db
5
- } from "./cli-s14agm5s.js";
5
+ } from "./cli-bdt7w021.js";
6
6
  import"./cli-ht5rs63n.js";
7
7
  import"./cli-z61ykvam.js";
8
8
  import"./cli-dv6cdjs2.js";
@@ -13,7 +13,7 @@ import {
13
13
  } from "./cli-ej6gbxfb.js";
14
14
  import"./cli-sd0mxa3c.js";
15
15
  import"./cli-w5e1d1vv.js";
16
- import"./cli-zkxymas5.js";
16
+ import"./cli-gfez0qmk.js";
17
17
  import"./cli-r2ap2czm.js";
18
18
  import"./cli-zf8jjwex.js";
19
19
  import"./cli-bc05qbss.js";
@@ -455,7 +455,7 @@ import {
455
455
  upsertSkillFiles,
456
456
  upsertSwarmConfig,
457
457
  withFavoriteFlags
458
- } from "./cli-s14agm5s.js";
458
+ } from "./cli-bdt7w021.js";
459
459
  import {
460
460
  generateDefaultClaudeMd,
461
461
  generateDefaultIdentityMd,
@@ -468,7 +468,7 @@ import"./cli-c2mk1kgf.js";
468
468
  import"./cli-ej6gbxfb.js";
469
469
  import"./cli-sd0mxa3c.js";
470
470
  import"./cli-w5e1d1vv.js";
471
- import"./cli-zkxymas5.js";
471
+ import"./cli-gfez0qmk.js";
472
472
  import"./cli-r2ap2czm.js";
473
473
  import"./cli-zf8jjwex.js";
474
474
  import"./cli-bc05qbss.js";
@@ -11,34 +11,34 @@ import {
11
11
  resolveBridgeCallOrigin,
12
12
  runContext,
13
13
  unregister
14
- } from "./cli-5tpgq60f.js";
14
+ } from "./cli-72tgtzr1.js";
15
15
  import"./cli-0z2v4nhw.js";
16
16
  import"./cli-4wppfkcm.js";
17
17
  import"./cli-e7d20cty.js";
18
18
  import"./cli-re8z5p8p.js";
19
19
  import"./cli-3dpj7atn.js";
20
- import"./cli-g69fdc9g.js";
21
- import"./cli-7tgcstn2.js";
22
- import"./cli-gbfwcd3k.js";
23
- import"./cli-sjaae6ff.js";
20
+ import"./cli-kf8qp2vf.js";
21
+ import"./cli-jytf5mw9.js";
22
+ import"./cli-zfzznn7c.js";
23
+ import"./cli-dsyg66vt.js";
24
24
  import"./cli-epan13p1.js";
25
25
  import"./cli-y89t4nca.js";
26
26
  import"./cli-f14fvzag.js";
27
27
  import"./cli-fad8m16k.js";
28
- import"./cli-j9xczhaq.js";
29
- import"./cli-0qb1z6s2.js";
28
+ import"./cli-vbk025fm.js";
29
+ import"./cli-7bwaerjt.js";
30
30
  import"./cli-bsakbbkm.js";
31
- import"./cli-q88st9aj.js";
31
+ import"./cli-gxf2ebyz.js";
32
32
  import"./cli-51tf7ac3.js";
33
- import"./cli-r2q6pevn.js";
33
+ import"./cli-wfve107r.js";
34
34
  import"./cli-q51yprfq.js";
35
35
  import"./cli-yatxqynm.js";
36
- import"./cli-ppm4975n.js";
36
+ import"./cli-jtvs5m8q.js";
37
37
  import"./cli-fm4ytsdk.js";
38
38
  import"./cli-aehm1rbq.js";
39
39
  import"./cli-2658f6at.js";
40
40
  import"./cli-jsp14b6c.js";
41
- import"./cli-s14agm5s.js";
41
+ import"./cli-bdt7w021.js";
42
42
  import"./cli-ht5rs63n.js";
43
43
  import"./cli-z61ykvam.js";
44
44
  import"./cli-dv6cdjs2.js";
@@ -46,7 +46,7 @@ import"./cli-c2mk1kgf.js";
46
46
  import"./cli-ej6gbxfb.js";
47
47
  import"./cli-sd0mxa3c.js";
48
48
  import"./cli-w5e1d1vv.js";
49
- import"./cli-zkxymas5.js";
49
+ import"./cli-gfez0qmk.js";
50
50
  import"./cli-r2ap2czm.js";
51
51
  import"./cli-pzxba7gw.js";
52
52
  import"./cli-f7kvq46p.js";
@@ -5,37 +5,37 @@ import {
5
5
  isUserAllowed,
6
6
  registerMessageHandler,
7
7
  resetSlackHandlerCachesForTesting
8
- } from "./cli-gjyvhmmh.js";
9
- import"./cli-a1z3h107.js";
10
- import"./cli-czjtgfys.js";
11
- import"./cli-5tpgq60f.js";
8
+ } from "./cli-ng4q6a9t.js";
9
+ import"./cli-3pft2z6r.js";
10
+ import"./cli-b4dyetqt.js";
11
+ import"./cli-72tgtzr1.js";
12
12
  import"./cli-0z2v4nhw.js";
13
13
  import"./cli-4wppfkcm.js";
14
14
  import"./cli-e7d20cty.js";
15
15
  import"./cli-re8z5p8p.js";
16
16
  import"./cli-3dpj7atn.js";
17
- import"./cli-g69fdc9g.js";
18
- import"./cli-7tgcstn2.js";
19
- import"./cli-gbfwcd3k.js";
20
- import"./cli-sjaae6ff.js";
17
+ import"./cli-kf8qp2vf.js";
18
+ import"./cli-jytf5mw9.js";
19
+ import"./cli-zfzznn7c.js";
20
+ import"./cli-dsyg66vt.js";
21
21
  import"./cli-epan13p1.js";
22
22
  import"./cli-y89t4nca.js";
23
23
  import"./cli-f14fvzag.js";
24
24
  import"./cli-fad8m16k.js";
25
- import"./cli-j9xczhaq.js";
26
- import"./cli-0qb1z6s2.js";
25
+ import"./cli-vbk025fm.js";
26
+ import"./cli-7bwaerjt.js";
27
27
  import"./cli-bsakbbkm.js";
28
- import"./cli-q88st9aj.js";
28
+ import"./cli-gxf2ebyz.js";
29
29
  import"./cli-51tf7ac3.js";
30
- import"./cli-r2q6pevn.js";
30
+ import"./cli-wfve107r.js";
31
31
  import"./cli-q51yprfq.js";
32
32
  import"./cli-yatxqynm.js";
33
- import"./cli-ppm4975n.js";
33
+ import"./cli-jtvs5m8q.js";
34
34
  import"./cli-fm4ytsdk.js";
35
35
  import"./cli-aehm1rbq.js";
36
36
  import"./cli-2658f6at.js";
37
37
  import"./cli-jsp14b6c.js";
38
- import"./cli-s14agm5s.js";
38
+ import"./cli-bdt7w021.js";
39
39
  import"./cli-ht5rs63n.js";
40
40
  import"./cli-z61ykvam.js";
41
41
  import"./cli-dv6cdjs2.js";
@@ -43,7 +43,7 @@ import"./cli-c2mk1kgf.js";
43
43
  import"./cli-ej6gbxfb.js";
44
44
  import"./cli-sd0mxa3c.js";
45
45
  import"./cli-w5e1d1vv.js";
46
- import"./cli-zkxymas5.js";
46
+ import"./cli-gfez0qmk.js";
47
47
  import"./cli-r2ap2czm.js";
48
48
  import"./cli-pzxba7gw.js";
49
49
  import"./cli-f7kvq46p.js";
@@ -45,7 +45,7 @@ import"./cli-w5e1d1vv.js";
45
45
  import {
46
46
  init_package,
47
47
  package_default
48
- } from "./cli-zkxymas5.js";
48
+ } from "./cli-gfez0qmk.js";
49
49
  import {
50
50
  init_secret_scrubber,
51
51
  scrubSecrets
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  handleHook
3
- } from "./cli-frcta2w4.js";
3
+ } from "./cli-sqmh7jj1.js";
4
4
  import"./cli-wbyk465z.js";
5
5
  import"./cli-j4nv2wqy.js";
6
6
  import"./cli-hp1n6zq3.js";
@@ -17,7 +17,7 @@ import"./cli-dv6cdjs2.js";
17
17
  import"./cli-ej6gbxfb.js";
18
18
  import"./cli-sd0mxa3c.js";
19
19
  import"./cli-w5e1d1vv.js";
20
- import"./cli-zkxymas5.js";
20
+ import"./cli-gfez0qmk.js";
21
21
  import"./cli-r2ap2czm.js";
22
22
  import"./cli-c4eeb5q2.js";
23
23
  import"./cli-rgvp6r2x.js";