@desplega.ai/agent-swarm 1.162.0 → 1.163.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.
Files changed (100) hide show
  1. package/README.md +1 -0
  2. package/dist/{acp-adapter-74m73ae9.js → acp-adapter-kcgjfkpm.js} +1 -1
  3. package/dist/{actions-4sr14gnt.js → actions-a0b8h6ed.js} +14 -14
  4. package/dist/{app-pt68fbwp.js → app-vcj9h5py.js} +3 -3
  5. package/dist/{assistant-cv3jytks.js → assistant-rmqjkt9r.js} +15 -15
  6. package/dist/{boot-reembed-nxpcvpj9.js → boot-reembed-35hsdjh7.js} +3 -3
  7. package/dist/{boot-reembed-4ht4gqth.js → boot-reembed-8wbky6be.js} +4 -4
  8. package/dist/{boot-scrub-logs-k93kyw8k.js → boot-scrub-logs-mc0cj8cw.js} +2 -2
  9. package/dist/{boot-seeds-1skcrs0e.js → boot-seeds-b4g74mpc.js} +6 -6
  10. package/dist/{claude-adapter-r5g0tzge.js → claude-adapter-gbasvbrn.js} +3 -3
  11. package/dist/{claude-sdk-session-jxyxnrwd.js → claude-sdk-session-zkbb5phc.js} +3 -3
  12. package/dist/{cli-vc9bp061.js → cli-0jjdftee.js} +4 -4
  13. package/dist/{cli-jxs2ygaw.js → cli-109n34vn.js} +8 -8
  14. package/dist/{cli-sptrj5f5.js → cli-585swr20.js} +2 -2
  15. package/dist/{cli-2zy95vhm.js → cli-67fh0xdx.js} +2 -2
  16. package/dist/{cli-rj0gqwwp.js → cli-6q18nwg8.js} +1 -1
  17. package/dist/{cli-jf7wmv1r.js → cli-8hsexrtr.js} +2 -2
  18. package/dist/{cli-nq7yqw7b.js → cli-aezmrnah.js} +1 -1
  19. package/dist/{cli-kh04eqwe.js → cli-e2e7m2eb.js} +1 -1
  20. package/dist/{cli-zvhd3f64.js → cli-esa2g8rn.js} +2 -2
  21. package/dist/{cli-vyqs9ya8.js → cli-g4j2m281.js} +1 -1
  22. package/dist/{cli-gpqpmns7.js → cli-h45y0yh0.js} +2 -2
  23. package/dist/{cli-zxqx25nz.js → cli-hktm1f0q.js} +2 -2
  24. package/dist/{cli-sqvfa090.js → cli-j9tvyt49.js} +1 -1
  25. package/dist/{cli-wjgs5wxe.js → cli-jv2n14x1.js} +5 -5
  26. package/dist/{cli-vxe6qa4h.js → cli-k25mnm7h.js} +1 -1
  27. package/dist/{cli-vy3ed88x.js → cli-p7y8jxd7.js} +1 -1
  28. package/dist/{cli-wxkkd0e0.js → cli-rtekzxtd.js} +3 -3
  29. package/dist/{cli-kdkwd3yr.js → cli-s81xzy0b.js} +33 -10
  30. package/dist/{cli-kp42yek0.js → cli-vbz0wywh.js} +171 -53
  31. package/dist/{cli-q24re23n.js → cli-vy32s71t.js} +3 -3
  32. package/dist/{cli-5k6k8ta3.js → cli-ykph25en.js} +12 -4
  33. package/dist/{cli-5xhpb3kv.js → cli-z5swnjvr.js} +5 -5
  34. package/dist/{cli-swfmp1fx.js → cli-zv5gxh3p.js} +8 -8
  35. package/dist/cli.js +11 -11
  36. package/dist/{codex-adapter-esvmnhn7.js → codex-adapter-sfg6afn9.js} +2 -2
  37. package/dist/{codex-session-runner-ban9excr.js → codex-session-runner-xsxgyed1.js} +2 -2
  38. package/dist/{commands-75413p2n.js → commands-5tqv6f77.js} +2 -2
  39. package/dist/{db-7f5pecwg.js → db-k9rc1c3j.js} +2 -2
  40. package/dist/{dispatcher-fh9at8nz.js → dispatcher-8q94tcgt.js} +13 -13
  41. package/dist/{handlers-w13787bb.js → handlers-3t8mmc9f.js} +16 -16
  42. package/dist/{hook-4tpts2ry.js → hook-kvqw3tsq.js} +2 -2
  43. package/dist/{hook-46g1jrvx.js → hook-mxzfhg2n.js} +1 -1
  44. package/dist/{http-19pzbfrt.js → http-1fd52m3b.js} +521 -84
  45. package/dist/{index-dqmp15bq.js → index-8z4jkxdw.js} +13 -13
  46. package/dist/{index-8fd4dm4h.js → index-bgx3rpeg.js} +14 -14
  47. package/dist/{index-s75wc4wd.js → index-hn2bv5eh.js} +3 -3
  48. package/dist/{index-scptvdxg.js → index-qg0sdgyf.js} +8 -8
  49. package/dist/{index-qb4q1y3e.js → index-sj0y70m0.js} +13 -13
  50. package/dist/{keepalive-xa5ts9cd.js → keepalive-v5g82q29.js} +4 -4
  51. package/dist/{lead-qp4xkvjq.js → lead-e69ggv5r.js} +17 -17
  52. package/dist/{maintenance-rm5885hm.js → maintenance-m65cjzcn.js} +4 -4
  53. package/dist/{oauth-refresh-sweep-1csdfebf.js → oauth-refresh-sweep-3mjzggag.js} +3 -3
  54. package/dist/{onboard-r6b78cs4.js → onboard-mwz7xqmq.js} +2 -2
  55. package/dist/{otel-impl-0y9knpky.js → otel-impl-xwck38em.js} +1 -1
  56. package/dist/{pricing-refresh-mth26tgp.js → pricing-refresh-7w8yq6s4.js} +4 -4
  57. package/dist/{rbac-roles-vpk4ebm8.js → rbac-roles-cggpv8g9.js} +4 -4
  58. package/dist/{rbac-roles-kwntb23q.js → rbac-roles-t85acbb7.js} +3 -3
  59. package/dist/{render-v2-hcm7h00y.js → render-v2-qmmnkr7f.js} +3 -3
  60. package/dist/{setup-hbyzd65h.js → setup-99rktr9c.js} +2 -2
  61. package/dist/{work-objects-m09sxnhe.js → work-objects-kvb7jhes.js} +16 -16
  62. package/dist/{worker-0h35rvk4.js → worker-e1wgr2e1.js} +17 -17
  63. package/openapi.json +567 -3
  64. package/package.json +1 -1
  65. package/src/be/mcp-server-checked-update.ts +34 -0
  66. package/src/be/mcp-server-stdio-gate.ts +34 -0
  67. package/src/be/memory/key-browser.ts +304 -0
  68. package/src/be/memory/providers/sqlite-store.ts +16 -3
  69. package/src/be/migrations/194_memory_orphan_chunks.sql +15 -0
  70. package/src/be/repo-checked-update.ts +37 -0
  71. package/src/be/repo-merge-policy.ts +15 -0
  72. package/src/http/index.ts +1 -1
  73. package/src/http/mcp-servers.ts +74 -50
  74. package/src/http/memory.ts +275 -6
  75. package/src/http/repos.ts +58 -18
  76. package/src/http/request-principal.ts +19 -0
  77. package/src/http/tasks.ts +9 -1
  78. package/src/rbac/legacy-policy.ts +22 -8
  79. package/src/rbac/permissions.ts +22 -1
  80. package/src/tests/api-drain-worker-e2e.test.ts +18 -7
  81. package/src/tests/claude-adapter-binary.test.ts +24 -0
  82. package/src/tests/claude-adapter.test.ts +8 -0
  83. package/src/tests/docs-index-footprint.test.js +3 -3
  84. package/src/tests/mcp-input-ergonomics.test.ts +15 -10
  85. package/src/tests/mcp-server-stdio-gate.test.ts +438 -0
  86. package/src/tests/memory-http-access.test.ts +221 -0
  87. package/src/tests/memory-keys-endpoint.test.ts +406 -0
  88. package/src/tests/memory-store.test.ts +166 -0
  89. package/src/tests/rbac-charact-misc-tools.test.ts +18 -3
  90. package/src/tests/rbac-engine.test.ts +14 -10
  91. package/src/tests/rbac-wire-e2e.test.ts +4 -9
  92. package/src/tests/repo-allow-merge-gate.test.ts +382 -0
  93. package/src/tests/script-connections.test.ts +2 -0
  94. package/src/tests/send-task-requester-gate.test.ts +260 -0
  95. package/src/tests/write-gate.ts +68 -0
  96. package/src/tools/mcp-servers/mcp-server-create.ts +23 -1
  97. package/src/tools/mcp-servers/mcp-server-update.ts +46 -28
  98. package/src/tools/memory-delete.ts +3 -3
  99. package/src/tools/repos/update-repo.ts +26 -5
  100. package/src/tools/send-task.ts +24 -1
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  seedPricingFromModelsDev
3
- } from "./cli-vy3ed88x.js";
3
+ } from "./cli-p7y8jxd7.js";
4
4
  import {
5
5
  ensureRbacSeedsSynced,
6
6
  init_rbac_roles
7
- } from "./cli-2zy95vhm.js";
7
+ } from "./cli-67fh0xdx.js";
8
8
  import {
9
9
  getDb,
10
10
  init_db
11
- } from "./cli-jf7wmv1r.js";
11
+ } from "./cli-8hsexrtr.js";
12
12
 
13
13
  // src/be/boot-seeds.ts
14
14
  init_db();
@@ -60,6 +60,10 @@ var init_permissions = __esm(() => {
60
60
  description: "Create a task the caller owns.",
61
61
  namespace: "task"
62
62
  },
63
+ "task.requester.assign": {
64
+ description: "Attribute a new task to a user other than the requester of the caller's own current task.",
65
+ namespace: "task"
66
+ },
63
67
  "task.read.own": {
64
68
  description: "Read details of a task the principal requested.",
65
69
  namespace: "task"
@@ -100,14 +104,22 @@ var init_permissions = __esm(() => {
100
104
  description: "Write or move a memory key under a lead-maintained /longterm root (company-story, entities, timeline).",
101
105
  namespace: "memory"
102
106
  },
107
+ "memory.read.any": {
108
+ description: "List every agent's memories, beyond the caller's own and swarm-scoped entries (lead, operator, or user).",
109
+ namespace: "memory"
110
+ },
103
111
  "memory.delete.any": {
104
- description: "Delete a memory entry (own entries, or swarm-scoped entries as lead).",
112
+ description: "Delete a memory entry: own agent-scoped entries; swarm-scoped entries as lead, operator, or user; any entry as operator or user.",
105
113
  namespace: "memory"
106
114
  },
107
115
  "channel.delete": {
108
116
  description: "Delete a Slack channel.",
109
117
  namespace: "channel"
110
118
  },
119
+ "repo.merge-policy.write": {
120
+ description: "Change a repo's allowMerge guideline, which tells agents whether they may merge a PR themselves.",
121
+ namespace: "repo"
122
+ },
111
123
  "integration.kapso.manage": {
112
124
  description: "Register or unregister a Kapso inbound number.",
113
125
  namespace: "integration"
@@ -236,6 +248,10 @@ var init_permissions = __esm(() => {
236
248
  description: "Update an MCP server the caller does not own.",
237
249
  namespace: "mcp-server"
238
250
  },
251
+ "mcp-server.stdio.write": {
252
+ description: "Create an agent-scope stdio MCP server, or change or enable what a stdio server runs. A stdio server runs a command on the worker.",
253
+ namespace: "mcp-server"
254
+ },
239
255
  "mcp-server.read.secrets": {
240
256
  description: "Read resolved MCP server secret env/header values.",
241
257
  namespace: "mcp-server"
@@ -358,7 +374,7 @@ var init_admission = __esm(() => {
358
374
  function actsAsLead(principal) {
359
375
  return principal.kind === "agent" && (principal.isLead || hasLeadEquivalence(principal.agentId));
360
376
  }
361
- var leadOnly, operatorOrUser, leadOrOperatorOrUser, leadOrOperator, agentOrOperator, extensionWrite, extensionActivation, leadOrTaskCreator, leadOrResourceOwner, humanOrLeadOrResourceOwner, leadOrOwnNamespace, anyAuthenticated, requesterOwnsTask, memoryOwnerOrLeadSwarm, taskFsMutate, taskProgressWrite, LEGACY_RULES, LEGACY_POLICY;
377
+ var leadOnly, operatorOrUser, leadOrOperatorOrUser, leadOrOperator, agentOrOperator, extensionWrite, extensionActivation, leadOrTaskCreator, leadOrResourceOwner, humanOrLeadOrResourceOwner, leadOrOwnNamespace, anyAuthenticated, requesterOwnsTask, memoryDelete, taskFsMutate, taskProgressWrite, LEGACY_RULES, LEGACY_POLICY;
362
378
  var init_legacy_policy = __esm(() => {
363
379
  init_env_flag();
364
380
  init_elevated_agents();
@@ -459,15 +475,18 @@ var init_legacy_policy = __esm(() => {
459
475
  return resource?.kind === "task" && resource.requestedByUserId === principal.userId;
460
476
  }
461
477
  };
462
- memoryOwnerOrLeadSwarm = {
463
- name: "memory-owner-or-lead-swarm",
464
- denyReason: "requires memory owner, or lead agent for swarm-scoped memories",
478
+ memoryDelete = {
479
+ name: "memory-delete",
480
+ denyReason: "requires operator or user, the lead for swarm-scoped memories, or the owner for agent-scoped memories",
465
481
  evaluate: (principal, resource) => {
466
- if (principal.kind !== "agent" || resource?.kind !== "owned")
467
- return false;
468
- if (resource.ownerAgentId != null && resource.ownerAgentId === principal.agentId)
482
+ if (principal.kind === "operator" || principal.kind === "user")
469
483
  return true;
470
- return actsAsLead(principal) && resource.scope === "swarm";
484
+ if (resource?.kind !== "owned")
485
+ return false;
486
+ const isOwner = principal.agentId !== "" && resource.ownerAgentId != null && resource.ownerAgentId === principal.agentId;
487
+ if (actsAsLead(principal))
488
+ return isOwner || resource.scope === "swarm";
489
+ return isOwner && resource.scope === "agent";
471
490
  }
472
491
  };
473
492
  taskFsMutate = {
@@ -517,6 +536,7 @@ var init_legacy_policy = __esm(() => {
517
536
  "approval.cancel.any": humanOrLeadOrResourceOwner,
518
537
  "task.steer.any": leadOrTaskCreator,
519
538
  "task.create.own": anyAuthenticated,
539
+ "task.requester.assign": leadOrOperatorOrUser,
520
540
  "task.read.own": requesterOwnsTask,
521
541
  "task.cancel.own": requesterOwnsTask,
522
542
  "task.steer.own": requesterOwnsTask,
@@ -527,8 +547,10 @@ var init_legacy_policy = __esm(() => {
527
547
  "memory.learning.inject": leadOnly,
528
548
  "memory.edit.any": leadOrResourceOwner,
529
549
  "memory.write.consolidated": leadOnly,
530
- "memory.delete.any": memoryOwnerOrLeadSwarm,
550
+ "memory.read.any": leadOrOperatorOrUser,
551
+ "memory.delete.any": memoryDelete,
531
552
  "channel.delete": leadOnly,
553
+ "repo.merge-policy.write": leadOrOperatorOrUser,
532
554
  "integration.kapso.manage": leadOnly,
533
555
  "integration.slack.post": leadOnly,
534
556
  "integration.slack.read": leadOnly,
@@ -561,6 +583,7 @@ var init_legacy_policy = __esm(() => {
561
583
  "mcp-server.uninstall.any": leadOnly,
562
584
  "mcp-server.delete.any": leadOrResourceOwner,
563
585
  "mcp-server.update.any": leadOrResourceOwner,
586
+ "mcp-server.stdio.write": leadOrOperatorOrUser,
564
587
  "mcp-server.read.secrets": leadOnly,
565
588
  "mcp-oauth.authorize.any": anyAuthenticated,
566
589
  "kv.write.any": leadOrOwnNamespace,
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  ensurePricingSeeded,
17
17
  ensureRbacSeeded
18
- } from "./cli-wxkkd0e0.js";
18
+ } from "./cli-rtekzxtd.js";
19
19
  import {
20
20
  buildCatalogEntries,
21
21
  getCatalogGeneration,
@@ -25,10 +25,10 @@ import {
25
25
  requestModelCatalogRefresh,
26
26
  startPricingRefreshLoop,
27
27
  upsertModelCatalogOverlay
28
- } from "./cli-zvhd3f64.js";
28
+ } from "./cli-esa2g8rn.js";
29
29
  import {
30
30
  loadModelsDevCache
31
- } from "./cli-vy3ed88x.js";
31
+ } from "./cli-p7y8jxd7.js";
32
32
  import {
33
33
  AppDefinitionSchema,
34
34
  AppElementsSchema,
@@ -108,7 +108,7 @@ import {
108
108
  validateDefinition,
109
109
  validateScriptImports,
110
110
  writeBareImportShim
111
- } from "./cli-5xhpb3kv.js";
111
+ } from "./cli-z5swnjvr.js";
112
112
  import {
113
113
  getApiKey
114
114
  } from "./cli-f14fvzag.js";
@@ -124,7 +124,7 @@ import {
124
124
  } from "./cli-mzfth0bp.js";
125
125
  import {
126
126
  embedScript
127
- } from "./cli-sptrj5f5.js";
127
+ } from "./cli-585swr20.js";
128
128
  import {
129
129
  CANDIDATE_SET_MULTIPLIER,
130
130
  LONGTERM_ROOT,
@@ -146,7 +146,7 @@ import {
146
146
  rerank,
147
147
  resolveStoreKey,
148
148
  rowToCandidate
149
- } from "./cli-5k6k8ta3.js";
149
+ } from "./cli-ykph25en.js";
150
150
  import {
151
151
  buildAuthorizationUrl,
152
152
  createOAuthApp,
@@ -161,7 +161,7 @@ import {
161
161
  listAuthorizationsForApp,
162
162
  onAuthorizationRefreshed,
163
163
  upsertOAuthApp
164
- } from "./cli-kh04eqwe.js";
164
+ } from "./cli-e2e7m2eb.js";
165
165
  import {
166
166
  ZodFirstPartyTypeKind,
167
167
  objectType
@@ -191,7 +191,7 @@ import {
191
191
  taskCitationWarnings,
192
192
  upsertTaskCitations,
193
193
  withSpan
194
- } from "./cli-swfmp1fx.js";
194
+ } from "./cli-zv5gxh3p.js";
195
195
  import {
196
196
  init_task_attachment_links,
197
197
  taskAttachmentDisplayUrl,
@@ -200,7 +200,7 @@ import {
200
200
  import {
201
201
  getUserGrant,
202
202
  init_rbac_roles
203
- } from "./cli-2zy95vhm.js";
203
+ } from "./cli-67fh0xdx.js";
204
204
  import {
205
205
  can,
206
206
  decideAdmission,
@@ -209,7 +209,7 @@ import {
209
209
  init_rbac,
210
210
  isRbacEnabled,
211
211
  revokeLeadEquivalence
212
- } from "./cli-kdkwd3yr.js";
212
+ } from "./cli-s81xzy0b.js";
213
213
  import {
214
214
  API_DRAIN_MAX_MS_LIMIT,
215
215
  CredentialBindingSchema,
@@ -361,6 +361,7 @@ import {
361
361
  getSwarmConfigLookupById,
362
362
  getSwarmConfigs,
363
363
  getSwarmMetrics,
364
+ getSwarmRepoById,
364
365
  getSwarmRepos,
365
366
  getTaskAttachments,
366
367
  getTaskById,
@@ -480,7 +481,7 @@ import {
480
481
  upsertSwarmConfig,
481
482
  validateConfigValue,
482
483
  workflowContextKey
483
- } from "./cli-jf7wmv1r.js";
484
+ } from "./cli-8hsexrtr.js";
484
485
  import {
485
486
  $OpenAPIRegistry,
486
487
  $OpenApiGeneratorV31,
@@ -640,7 +641,7 @@ import {
640
641
  import {
641
642
  init_package,
642
643
  package_default
643
- } from "./cli-sqvfa090.js";
644
+ } from "./cli-j9tvyt49.js";
644
645
  import {
645
646
  init_secret_scrubber,
646
647
  isSensitiveKey,
@@ -14379,7 +14380,7 @@ async function notifyAutomationPreflightFailure(preflight) {
14379
14380
  return;
14380
14381
  }
14381
14382
  try {
14382
- const { getSlackApp: getSlackApp2 } = await import("./app-pt68fbwp.js");
14383
+ const { getSlackApp: getSlackApp2 } = await import("./app-vcj9h5py.js");
14383
14384
  const app = getSlackApp2();
14384
14385
  if (!app) {
14385
14386
  console.warn("[Automation Preflight] Slack not available, cannot send notification");
@@ -29025,7 +29026,7 @@ async function notifySlack(text) {
29025
29026
  return;
29026
29027
  }
29027
29028
  try {
29028
- const { getSlackApp: getSlackApp2 } = await import("./app-pt68fbwp.js");
29029
+ const { getSlackApp: getSlackApp2 } = await import("./app-vcj9h5py.js");
29029
29030
  const app = getSlackApp2();
29030
29031
  if (!app) {
29031
29032
  console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
@@ -29096,7 +29097,7 @@ async function deleteJiraWebhook(webhookId) {
29096
29097
  console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
29097
29098
  }
29098
29099
  async function overwriteWebhookIds(next) {
29099
- const { getDbClient: getDbClient2 } = await import("./db-7f5pecwg.js");
29100
+ const { getDbClient: getDbClient2 } = await import("./db-k9rc1c3j.js");
29100
29101
  await getDbClient2().transaction(async (tx) => {
29101
29102
  const row = await tx.get("SELECT metadata FROM oauth_apps WHERE provider = 'jira'");
29102
29103
  if (!row) {
@@ -102830,7 +102831,7 @@ async function reloadGlobalConfigsAndIntegrations() {
102830
102831
  return runWithoutRequestAuth(() => reloadGlobalConfigsAndIntegrationsInner());
102831
102832
  }
102832
102833
  async function reloadGlobalConfigsAndIntegrationsInner() {
102833
- const { getEmbeddingProvider: getEmbeddingProvider2, resetEmbeddingProvider } = await import("./index-s75wc4wd.js");
102834
+ const { getEmbeddingProvider: getEmbeddingProvider2, resetEmbeddingProvider } = await import("./index-hn2bv5eh.js");
102834
102835
  const wasEmbeddingsConfigured = getEmbeddingProvider2().isConfigured();
102835
102836
  const updated = await loadGlobalConfigsIntoEnv(true);
102836
102837
  await stopSlackApp();
@@ -102843,10 +102844,10 @@ async function reloadGlobalConfigsAndIntegrationsInner() {
102843
102844
  integrations.push("embeddings");
102844
102845
  }
102845
102846
  if (!wasEmbeddingsConfigured && isEmbeddingsConfigured) {
102846
- import("./boot-reembed-nxpcvpj9.js").then(({ runBootReembed }) => runBootReembed()).catch((err) => {
102847
+ import("./boot-reembed-35hsdjh7.js").then(({ runBootReembed }) => runBootReembed()).catch((err) => {
102847
102848
  console.error("[config-reload] memory backfill failed (non-fatal):", err);
102848
102849
  });
102849
- import("./boot-reembed-4ht4gqth.js").then(({ runBootReembedScripts }) => runBootReembedScripts()).catch((err) => {
102850
+ import("./boot-reembed-8wbky6be.js").then(({ runBootReembedScripts }) => runBootReembedScripts()).catch((err) => {
102850
102851
  console.error("[config-reload] script backfill failed (non-fatal):", err);
102851
102852
  });
102852
102853
  }
@@ -103668,7 +103669,7 @@ function setPreloadedTools(server, names) {
103668
103669
  async function applyPreToolCall(name, args, requestInfo, inputSchema) {
103669
103670
  if (requestInfo.callOrigin !== "mcp")
103670
103671
  return { args };
103671
- const dispatcher = await import("./dispatcher-fh9at8nz.js");
103672
+ const dispatcher = await import("./dispatcher-8q94tcgt.js");
103672
103673
  const result = await dispatcher.dispatchPre("pre.tool.call", { tool: name, args, requestInfo }, inputSchema ? {
103673
103674
  validateModify: async (data) => {
103674
103675
  const schema = normalizeObjectSchema(inputSchema) ?? inputSchema;
@@ -112841,7 +112842,7 @@ var registerMcpServerCreateTool = (server) => {
112841
112842
  createToolRegistrar(server)("mcp-server-create", {
112842
112843
  title: "Create MCP Server",
112843
112844
  annotations: { destructiveHint: false },
112844
- description: "Create a new MCP server definition. Agent-scope servers are auto-installed for the creating agent. Swarm/global scope requires lead.",
112845
+ description: "Create a new MCP server definition. Agent-scope servers are auto-installed for the creating agent. Swarm/global scope and stdio servers require lead.",
112845
112846
  inputSchema: object({
112846
112847
  name: string().describe("Server name"),
112847
112848
  description: string().optional().describe("Server description"),
@@ -112893,6 +112894,24 @@ var registerMcpServerCreateTool = (server) => {
112893
112894
  });
112894
112895
  }
112895
112896
  }
112897
+ if (scope === "agent" && args.transport === "stdio") {
112898
+ const agent = await getAgentById(requestInfo.agentId);
112899
+ const decision = can({
112900
+ principal: {
112901
+ kind: "agent",
112902
+ agentId: requestInfo.agentId,
112903
+ isLead: agent?.isLead ?? false
112904
+ },
112905
+ verb: "mcp-server.stdio.write",
112906
+ resource: { kind: "none" },
112907
+ source: "mcp"
112908
+ });
112909
+ if (!decision.allow) {
112910
+ return toolErr("Only lead agents can create or change stdio MCP servers.", {
112911
+ data: { yourAgentId: requestInfo.agentId }
112912
+ });
112913
+ }
112914
+ }
112896
112915
  const created = await createMcpServer({
112897
112916
  name: args.name,
112898
112917
  description: args.description,
@@ -113156,12 +113175,38 @@ var registerMcpServerUninstallTool = (server) => {
113156
113175
  // src/tools/mcp-servers/mcp-server-update.ts
113157
113176
  init_zod();
113158
113177
  init_db();
113178
+
113179
+ // src/be/mcp-server-checked-update.ts
113180
+ init_db();
113181
+ async function updateMcpServerChecked(id, updates, check) {
113182
+ return await getDbClient().transaction(async () => {
113183
+ const existing = await getMcpServerById(id);
113184
+ if (!existing)
113185
+ return { kind: "not-found" };
113186
+ const refusal = await check(existing);
113187
+ if (refusal !== null)
113188
+ return { kind: "refused", refusal };
113189
+ const server = await updateMcpServer(id, updates);
113190
+ return server ? { kind: "updated", server } : { kind: "not-found" };
113191
+ });
113192
+ }
113193
+
113194
+ // src/be/mcp-server-stdio-gate.ts
113195
+ var differs = (next, current) => next !== undefined && next !== current;
113196
+ function updateTouchesStdioExecution(existing, updates) {
113197
+ const resulting = updates.transport ?? existing.transport;
113198
+ if (resulting === "http" || resulting === "sse")
113199
+ return false;
113200
+ return differs(updates.transport, existing.transport) || differs(updates.command, existing.command) || differs(updates.args, existing.args) || differs(updates.envConfigKeys, existing.envConfigKeys) || updates.isEnabled !== undefined && Boolean(updates.isEnabled) && !existing.isEnabled;
113201
+ }
113202
+
113203
+ // src/tools/mcp-servers/mcp-server-update.ts
113159
113204
  init_rbac();
113160
113205
  var registerMcpServerUpdateTool = (server) => {
113161
113206
  createToolRegistrar(server)("mcp-server-update", {
113162
113207
  title: "Update MCP Server",
113163
113208
  annotations: { destructiveHint: false },
113164
- description: "Update an MCP server's configuration. Only the owner or lead can update.",
113209
+ description: "Update an MCP server's configuration. Only the owner or lead can update. Changing or enabling what a stdio server runs requires lead.",
113165
113210
  inputSchema: object({
113166
113211
  id: string().describe("ID of the MCP server to update"),
113167
113212
  name: string().optional().describe("New name"),
@@ -113185,26 +113230,6 @@ var registerMcpServerUpdateTool = (server) => {
113185
113230
  return toolErr("Agent ID not found.");
113186
113231
  }
113187
113232
  try {
113188
- const existing = await getMcpServerById(args.id);
113189
- if (!existing) {
113190
- return toolErr("MCP server not found.", { data: { yourAgentId: requestInfo.agentId } });
113191
- }
113192
- const agent = await getAgentById(requestInfo.agentId);
113193
- const decision = can({
113194
- principal: {
113195
- kind: "agent",
113196
- agentId: requestInfo.agentId,
113197
- isLead: agent?.isLead ?? false
113198
- },
113199
- verb: "mcp-server.update.any",
113200
- resource: { kind: "owned", ownerAgentId: existing.ownerAgentId },
113201
- source: "mcp"
113202
- });
113203
- if (!decision.allow) {
113204
- return toolErr("Only the owning agent or lead can update this MCP server.", {
113205
- data: { yourAgentId: requestInfo.agentId }
113206
- });
113207
- }
113208
113233
  const updates = {};
113209
113234
  if (args.name !== undefined)
113210
113235
  updates.name = args.name;
@@ -113228,10 +113253,42 @@ var registerMcpServerUpdateTool = (server) => {
113228
113253
  updates.extraAuthorizeParams = args.extraAuthorizeParams;
113229
113254
  if (args.isEnabled !== undefined)
113230
113255
  updates.isEnabled = args.isEnabled;
113231
- const updated = await updateMcpServer(args.id, updates);
113232
- if (!updated) {
113233
- return toolErr("Update failed.", { data: { yourAgentId: requestInfo.agentId } });
113256
+ const agentId = requestInfo.agentId;
113257
+ const result = await updateMcpServerChecked(args.id, updates, async (existing) => {
113258
+ const agent = await getAgentById(agentId);
113259
+ const principal = {
113260
+ kind: "agent",
113261
+ agentId,
113262
+ isLead: agent?.isLead ?? false
113263
+ };
113264
+ const decision = can({
113265
+ principal,
113266
+ verb: "mcp-server.update.any",
113267
+ resource: { kind: "owned", ownerAgentId: existing.ownerAgentId },
113268
+ source: "mcp"
113269
+ });
113270
+ if (!decision.allow)
113271
+ return "Only the owning agent or lead can update this MCP server.";
113272
+ if (updateTouchesStdioExecution(existing, updates)) {
113273
+ const stdioDecision = can({
113274
+ principal,
113275
+ verb: "mcp-server.stdio.write",
113276
+ resource: { kind: "none" },
113277
+ source: "mcp"
113278
+ });
113279
+ if (!stdioDecision.allow) {
113280
+ return "Only lead agents can create or change stdio MCP servers.";
113281
+ }
113282
+ }
113283
+ return null;
113284
+ });
113285
+ if (result.kind === "not-found") {
113286
+ return toolErr("MCP server not found.", { data: { yourAgentId: requestInfo.agentId } });
113287
+ }
113288
+ if (result.kind === "refused") {
113289
+ return toolErr(result.refusal, { data: { yourAgentId: requestInfo.agentId } });
113234
113290
  }
113291
+ const updated = result.server;
113235
113292
  return toolOk(`Updated MCP server "${updated.name}" to version ${updated.version}.`, {
113236
113293
  data: { yourAgentId: requestInfo.agentId, server: updated }
113237
113294
  });
@@ -113248,7 +113305,7 @@ init_rbac();
113248
113305
  var registerMemoryDeleteTool = (server) => {
113249
113306
  createToolRegistrar(server)("memory-delete", {
113250
113307
  title: "Delete a memory",
113251
- description: "Delete a specific memory by its ID. Agents can delete their own memories; lead agents can also delete swarm-scoped memories.",
113308
+ description: "Delete a specific memory by its ID. Agents can delete their own agent-scoped memories; only the lead can delete swarm-scoped memories.",
113252
113309
  annotations: { destructiveHint: true },
113253
113310
  inputSchema: object({
113254
113311
  memoryId: uuid().describe("The ID of the memory to delete.")
@@ -113279,7 +113336,7 @@ var registerMemoryDeleteTool = (server) => {
113279
113336
  source: "mcp"
113280
113337
  });
113281
113338
  if (!decision.allow) {
113282
- return toolErr("Permission denied. You can only delete your own memories, or swarm memories if you are the lead.", { data: { yourAgentId: requestInfo.agentId } });
113339
+ return toolErr("Permission denied. You can only delete your own agent-scoped memories; only the lead can delete swarm memories.", { data: { yourAgentId: requestInfo.agentId } });
113283
113340
  }
113284
113341
  const deleted = await store.delete(memoryId);
113285
113342
  const message = deleted ? `Memory "${memoryId}" deleted.` : `Failed to delete memory "${memoryId}".`;
@@ -116185,6 +116242,35 @@ var registerGetReposTool = (server) => {
116185
116242
  // src/tools/repos/update-repo.ts
116186
116243
  init_zod();
116187
116244
  init_db();
116245
+
116246
+ // src/be/repo-checked-update.ts
116247
+ init_db();
116248
+
116249
+ // src/be/repo-merge-policy.ts
116250
+ function changesAllowMerge(current, incoming) {
116251
+ if (incoming === undefined)
116252
+ return false;
116253
+ return incoming?.allowMerge === true !== (current?.allowMerge === true);
116254
+ }
116255
+
116256
+ // src/be/repo-checked-update.ts
116257
+ async function updateSwarmRepoChecked(id, updates, authorize) {
116258
+ return await getDbClient().transaction(async () => {
116259
+ if (updates.guidelines !== undefined) {
116260
+ const existing = await getSwarmRepoById(id);
116261
+ if (existing && changesAllowMerge(existing.guidelines, updates.guidelines)) {
116262
+ const refusal = await authorize(existing);
116263
+ if (refusal !== null)
116264
+ return { kind: "refused", refusal };
116265
+ }
116266
+ }
116267
+ const repo = await updateSwarmRepo(id, updates);
116268
+ return repo ? { kind: "updated", repo } : { kind: "not-found" };
116269
+ });
116270
+ }
116271
+
116272
+ // src/tools/repos/update-repo.ts
116273
+ init_rbac();
116188
116274
  init_types();
116189
116275
  var swarmRepoOutputShape2 = looseObject({
116190
116276
  id: string().optional(),
@@ -116206,7 +116292,7 @@ var swarmRepoOutputShape2 = looseObject({
116206
116292
  var registerUpdateRepoTool = (server) => {
116207
116293
  createToolRegistrar(server)("update-repo", {
116208
116294
  title: "Update Repo",
116209
- description: "Update a repo's configuration including guidelines (PR checks, merge policy, review guidance). The lead uses this to set guidelines after asking the user. Pass null for guidelines to clear them.",
116295
+ description: "Update a repo's configuration including guidelines (PR checks, merge policy, review guidance). The lead uses this to set guidelines after asking the user. Pass null for guidelines to clear them. Only the lead can change allowMerge: resend its current value to edit other guidelines.",
116210
116296
  annotations: { readOnlyHint: false },
116211
116297
  inputSchema: object({
116212
116298
  id: string().uuid().describe("The repo ID to update."),
@@ -116221,11 +116307,27 @@ var registerUpdateRepoTool = (server) => {
116221
116307
  outputSchema: swarmToolOutputSchema({
116222
116308
  repo: swarmRepoOutputShape2.nullable().optional()
116223
116309
  })
116224
- }, async ({ id, ...updates }) => {
116225
- const updated = await updateSwarmRepo(id, updates);
116226
- if (!updated) {
116310
+ }, async ({ id, ...updates }, requestInfo) => {
116311
+ const result = await updateSwarmRepoChecked(id, updates, async (existing) => {
116312
+ const agent = requestInfo.agentId ? await getAgentById(requestInfo.agentId) : null;
116313
+ const decision = can({
116314
+ principal: requestInfo.agentId ? { kind: "agent", agentId: requestInfo.agentId, isLead: agent?.isLead ?? false } : { kind: "operator" },
116315
+ verb: "repo.merge-policy.write",
116316
+ resource: { kind: "none" },
116317
+ source: "mcp"
116318
+ });
116319
+ if (decision.allow)
116320
+ return null;
116321
+ const current = existing.guidelines?.allowMerge === true;
116322
+ return `Only lead agents can change allowMerge (it is currently ${current}). Resend ${current} to keep it while you edit the other guidelines.`;
116323
+ });
116324
+ if (result.kind === "refused") {
116325
+ return toolErr(result.refusal, { data: { repo: null } });
116326
+ }
116327
+ if (result.kind === "not-found") {
116227
116328
  return toolErr(`Repo not found: ${id}`, { data: { repo: null } });
116228
116329
  }
116330
+ const updated = result.repo;
116229
116331
  return toolOk(`Updated repo "${updated.name}".`, {
116230
116332
  details: `Updated repo "${updated.name}" — guidelines: ${updated.guidelines ? "configured" : "not set"}`,
116231
116333
  data: { repo: updated }
@@ -124720,6 +124822,7 @@ var registerScriptUpsertTool = (server) => {
124720
124822
  // src/tools/send-task.ts
124721
124823
  init_zod();
124722
124824
  init_db();
124825
+ init_rbac();
124723
124826
  init_slack_routing();
124724
124827
 
124725
124828
  // src/tools/task-dedup.ts
@@ -124805,7 +124908,7 @@ var sendTaskInputSchema = object({
124805
124908
  slackThreadTs: string().optional().describe("Slack thread timestamp. Required with slackChannelId for thread-level updates."),
124806
124909
  slackUserId: string().optional().describe("Slack user ID of the original requester."),
124807
124910
  overrideSlackContext: boolean().default(false).describe("Explicitly route this task's Slack updates to a different channel/thread than its parent/contextKey. Requires slackChannelId AND slackThreadTs. Use only for deliberate cross-channel dispatch (e.g. escalation to another human's DM); logged for audit. Without this flag, a slackChannelId/slackThreadTs that disagrees with the parent task or inherited contextKey is rejected — omit the three Slack fields to inherit them from the parent as a unit instead."),
124808
- requestedByUserId: string().regex(/^[a-f0-9]{32}$/, "Expected a registry user ID (32 lowercase hexadecimal characters).").optional().describe("Registered requester ID (32 lowercase hexadecimal characters). When omitted, inherited from the caller's current task so the attribution flows through multi-hop delegation automatically."),
124911
+ requestedByUserId: string().regex(/^[a-f0-9]{32}$/, "Expected a registry user ID (32 lowercase hexadecimal characters).").optional().describe("Registered requester ID (32 lowercase hexadecimal characters). When omitted, inherited from the caller's current task so the attribution flows through multi-hop delegation automatically. Only lead agents can name a user other than the requester of their current task."),
124809
124912
  followUpConfig: FollowUpConfigSchema.optional().describe("Control the lead follow-up created when this task finishes. When to use `followUpConfig`: set `disabled: true` when you'll wait for this task to complete inline and no follow-up is needed; set `onCompleted` / `onFailed` with specific instructions when you need to follow up effectively on a particular outcome of a long-running flow; for normal one-shot tasks, leave it unset because defaults are fine. It is most valuable for long-running / complex flows."),
124810
124913
  outputSchema: record(string(), unknown()).optional().describe("Optional JSON Schema the assignee's final output must satisfy. store-progress rejects a completion that does not match. Supported keywords: type, required, properties, enum, const, items.")
124811
124914
  }).superRefine((data, ctx) => {
@@ -124898,6 +125001,21 @@ async function sendTaskHandler(ctx, {
124898
125001
  const creatorAgentId = ctx.kind === "owner" ? ctx.agentId : undefined;
124899
125002
  const sourceTaskId = ctx.kind === "owner" ? ctx.sourceTaskId : undefined;
124900
125003
  const requestedByUserId = ctx.kind === "user" ? ctx.userId : inputRequestedByUserId ?? undefined;
125004
+ if (ctx.kind === "owner" && creatorAgentId && requestedByUserId) {
125005
+ const ownRequester = await resolveTaskAuditUserId(sourceTaskId, creatorAgentId);
125006
+ if (requestedByUserId !== ownRequester) {
125007
+ const caller = await getAgentById(creatorAgentId);
125008
+ const decision = can({
125009
+ principal: { kind: "agent", agentId: creatorAgentId, isLead: caller?.isLead ?? false },
125010
+ verb: "task.requester.assign",
125011
+ resource: { kind: "none" },
125012
+ source: "mcp"
125013
+ });
125014
+ if (!decision.allow) {
125015
+ return toolErr("Only lead agents can set requestedByUserId to anyone but the requester of your current task. Omit it to inherit that requester.", { data: { yourAgentId: creatorAgentId } });
125016
+ }
125017
+ }
125018
+ }
124901
125019
  if (ctx.kind === "owner" && requestedByUserId && !await getUserById(requestedByUserId)) {
124902
125020
  return toolErr("requestedByUserId must identify an existing registered user.", {
124903
125021
  data: { yourAgentId: creatorAgentId }
@@ -133338,7 +133456,7 @@ class NotifyExecutor extends BaseExecutor {
133338
133456
  }
133339
133457
  }
133340
133458
  case "slack": {
133341
- const { getSlackApp: getSlackApp2 } = await import("./app-pt68fbwp.js");
133459
+ const { getSlackApp: getSlackApp2 } = await import("./app-vcj9h5py.js");
133342
133460
  const app = getSlackApp2();
133343
133461
  if (!app) {
133344
133462
  return {
@@ -134143,4 +134261,4 @@ async function initWorkflows() {
134143
134261
  logOpenWebhookTriggers();
134144
134262
  }
134145
134263
 
134146
- export { DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, findUserById, findUserByExternalId, getUserIdentities, listUserEvents, listUserTokens, recordIdentityEvent, findOrCreateUserByEmail, linkIdentity, unlinkIdentity, mintToken, revokeToken, resolveUserByToken, mintSessionToken, revokeSessionToken, fingerprintApiKey, resolveIdentity, renderIdentity, createAdditiveBuffer, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, sanitizeModelTierOverrides, parseModelTierOverridesHeader, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, referencedBundlePaths, skillDirs, TaskCreationBlockedError, recordUnmappedIdentity, MAX_TASK_ATTACHMENT_BYTES, recordTaskAttachmentUpload, buildEffectiveText, bufferedFileFailures, fetchSlackFiles, createSlackTaskWithFiles, notifySlackFileFailures, hasOtherUserMention, broadcastMatches, routeMessage, extractTaskFromMessage, extractSlackMessageText, automationIntegrationFixUrl, preflightAutomation, getAutomationSetupStates, listEnabledAutomationPreflightInputs, validateJsonSchema, workflowSaveWarnings, TriggerSchemaError, startWorkflowExecution, setupWorkflowResumeListener, retryFailedRun, cancelWorkflowRun, resumeWaitState, initWaitBusSubscriptions, subscribeWaitToBus, recoverIncompleteRuns, startRetryPoller, stopRetryPoller, validateTemplateVariables, instantiateTemplate, handleWebhookTrigger, logOpenWebhookTriggers, handleEventTrigger, handleScheduleTrigger, verifyHmacSignature, WebhookError, snapshotWorkflow, snapshotAndUpdateWorkflow, startWaitPoller, stopWaitPoller, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, getExecutorRegistry, initWorkflows, dispatchScheduleTarget, calculateNextRun, startScheduler, stopScheduler, runScheduleNow, parseSkillContent, ExtensionAssetConflictError, ExtensionOwnershipError, getExtensionFiles, getExtensionById, getExtensionByName, listExtensions, listExtensionVersions, updateExtensionMeta, listExtensionRuns, SDK_ALLOWLIST, mcpToolNameForSdkMethod, mcpOverflowAuthError, toolErr, createToolRegistrar, warnIfCorsAllowsAnyOrigin, isOriginAllowedForCredentials, allowedCredentialRedirect, setCorsHeaders, parseQueryParams, getPathSegments, wireHttpSpanLifecycle, safeRequestUrlForLog, agentWithCapacity, parseBody, BODY_TOO_LARGE, enforceContentLengthCap, json, jsonError, triggerSchemaErrorResponse, deriveApiBaseUrl, httpServerSemconvAttributes, runtimeInstanceHeader, describeRequestRoute, route, handleMcpBridge, Redacted, SCRIPT_SDK_RESPONSE_LIMIT_BYTES, readScriptSdkJsonResponse, ExtensionConfigError, ExtensionLifecycleError, setExtensionLoopbackBaseUrl, enableExtension, disableExtension, activateVersion, ExtensionAssetsInvalidError, installExtensionWithAssets, uninstallExtension, reloadExtension, loadEnabledExtensions, stopExtensionRuntime, ExtensionAbortedError, isRegistered, isExtensionAgentId, getExtensionBridgeToken, resolveBridgeCallOrigin, extensionIdForAgent, runContext, registerLoaded, unregister, listRegistered, dispatchPre, dispatchPost, stripSiblingBlock, createTaskWithSiblingAwareness, isInboxAllowed, isSenderAllowed, handleMessageReceived, isAzureDevOpsEnabled, initAzureDevOps, verifyAzureDevOpsWebhook, isAzureDevOpsUrl, canonicalAzureDevOpsRepoUrl, parseAzureDevOpsRepoUrl, createdPullRequestOf, commentedPayloadOf, handlePullRequestCreated, handlePullRequestCommented, AGENT_MAX_TASKS_CONFIG_KEY, reconcileAgentMaxTasksPolicy, resetAgentMaxTasksMirror, upsertSwarmConfigWithPolicyMirror, runtimeStaleThresholdMinutes, upsertRuntimeInstance, getRuntimeInstanceById, touchRuntimeInstance, countActiveRuntimeInstancesForAgent, listRuntimeInstancesForAgent, setRuntimeCredentialReady, reconcileAgentStatusFromRuntimes, agentsWithLiveRuntime, expireStaleRuntimeInstances, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2 as handleIssue1, handleNote, handlePipeline, repointTrackerSyncBySwarmId, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, parseCookieHeader, extractAndVerifyCookie, issuePageSessionCookie, resolveHttpRequestAuth, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, userCtx, resolveTaskAuditUserId, resolveHttpAuditUserId, resolveHttpFavoriteOwner, handleApps, cancelApprovalRequest, cancelApprovalRequestAndRun, getUserCommsPrefs, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, snapshotMetric, AssetKeyAuthorizationError, authorizeAssetKeyWrite, snapshotPage, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, scopedResourceScopeIdSchema, resolveScopedResourceId, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, resolveLeadOnlyRecoveryAssignment, getResumeGeneration, getNextResumeGeneration, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask, guardTerminalTaskResultWrite, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, reservedNamespaceError, reservedRoomKeyError, MemoryKeyError, refreshLinks, canReadMemory, getLinksForMemory, expandCandidatesWithGraph, indexMemoryContent, isApiDraining, drainApi, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, getCombConfig, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, RoomOperationSchema, removeAwarenessStates, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, canClaim, emitBudgetRefusalSideEffects, taskActionInputSchema, taskActionOutputSchema, taskActionHandler, workflowModelErrors, patchWorkflowDefinition, resolveScriptsOnlyMode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer };
134264
+ export { DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, findUserById, findUserByExternalId, getUserIdentities, listUserEvents, listUserTokens, recordIdentityEvent, findOrCreateUserByEmail, linkIdentity, unlinkIdentity, mintToken, revokeToken, resolveUserByToken, mintSessionToken, revokeSessionToken, fingerprintApiKey, resolveIdentity, renderIdentity, createAdditiveBuffer, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, sanitizeModelTierOverrides, parseModelTierOverridesHeader, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, referencedBundlePaths, skillDirs, TaskCreationBlockedError, recordUnmappedIdentity, MAX_TASK_ATTACHMENT_BYTES, recordTaskAttachmentUpload, buildEffectiveText, bufferedFileFailures, fetchSlackFiles, createSlackTaskWithFiles, notifySlackFileFailures, hasOtherUserMention, broadcastMatches, routeMessage, extractTaskFromMessage, extractSlackMessageText, automationIntegrationFixUrl, preflightAutomation, getAutomationSetupStates, listEnabledAutomationPreflightInputs, validateJsonSchema, workflowSaveWarnings, TriggerSchemaError, startWorkflowExecution, setupWorkflowResumeListener, retryFailedRun, cancelWorkflowRun, resumeWaitState, initWaitBusSubscriptions, subscribeWaitToBus, recoverIncompleteRuns, startRetryPoller, stopRetryPoller, validateTemplateVariables, instantiateTemplate, handleWebhookTrigger, logOpenWebhookTriggers, handleEventTrigger, handleScheduleTrigger, verifyHmacSignature, WebhookError, snapshotWorkflow, snapshotAndUpdateWorkflow, startWaitPoller, stopWaitPoller, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, getExecutorRegistry, initWorkflows, dispatchScheduleTarget, calculateNextRun, startScheduler, stopScheduler, runScheduleNow, parseSkillContent, ExtensionAssetConflictError, ExtensionOwnershipError, getExtensionFiles, getExtensionById, getExtensionByName, listExtensions, listExtensionVersions, updateExtensionMeta, listExtensionRuns, SDK_ALLOWLIST, mcpToolNameForSdkMethod, mcpOverflowAuthError, toolErr, createToolRegistrar, warnIfCorsAllowsAnyOrigin, isOriginAllowedForCredentials, allowedCredentialRedirect, setCorsHeaders, parseQueryParams, getPathSegments, wireHttpSpanLifecycle, safeRequestUrlForLog, agentWithCapacity, parseBody, BODY_TOO_LARGE, enforceContentLengthCap, json, jsonError, triggerSchemaErrorResponse, deriveApiBaseUrl, httpServerSemconvAttributes, runtimeInstanceHeader, describeRequestRoute, route, handleMcpBridge, Redacted, SCRIPT_SDK_RESPONSE_LIMIT_BYTES, readScriptSdkJsonResponse, ExtensionConfigError, ExtensionLifecycleError, setExtensionLoopbackBaseUrl, enableExtension, disableExtension, activateVersion, ExtensionAssetsInvalidError, installExtensionWithAssets, uninstallExtension, reloadExtension, loadEnabledExtensions, stopExtensionRuntime, ExtensionAbortedError, isRegistered, isExtensionAgentId, getExtensionBridgeToken, resolveBridgeCallOrigin, extensionIdForAgent, runContext, registerLoaded, unregister, listRegistered, dispatchPre, dispatchPost, stripSiblingBlock, createTaskWithSiblingAwareness, isInboxAllowed, isSenderAllowed, handleMessageReceived, isAzureDevOpsEnabled, initAzureDevOps, verifyAzureDevOpsWebhook, isAzureDevOpsUrl, canonicalAzureDevOpsRepoUrl, parseAzureDevOpsRepoUrl, createdPullRequestOf, commentedPayloadOf, handlePullRequestCreated, handlePullRequestCommented, AGENT_MAX_TASKS_CONFIG_KEY, reconcileAgentMaxTasksPolicy, resetAgentMaxTasksMirror, upsertSwarmConfigWithPolicyMirror, runtimeStaleThresholdMinutes, upsertRuntimeInstance, getRuntimeInstanceById, touchRuntimeInstance, countActiveRuntimeInstancesForAgent, listRuntimeInstancesForAgent, setRuntimeCredentialReady, reconcileAgentStatusFromRuntimes, agentsWithLiveRuntime, expireStaleRuntimeInstances, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2 as handleIssue1, handleNote, handlePipeline, repointTrackerSyncBySwarmId, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, parseCookieHeader, extractAndVerifyCookie, issuePageSessionCookie, resolveHttpRequestAuth, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, userCtx, resolveTaskAuditUserId, resolveHttpAuditUserId, resolveHttpFavoriteOwner, handleApps, cancelApprovalRequest, cancelApprovalRequestAndRun, getUserCommsPrefs, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, snapshotMetric, AssetKeyAuthorizationError, authorizeAssetKeyWrite, snapshotPage, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, scopedResourceScopeIdSchema, resolveScopedResourceId, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, resolveLeadOnlyRecoveryAssignment, getResumeGeneration, getNextResumeGeneration, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask, guardTerminalTaskResultWrite, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, reservedNamespaceError, reservedRoomKeyError, updateMcpServerChecked, updateTouchesStdioExecution, MemoryKeyError, refreshLinks, canReadMemory, getLinksForMemory, expandCandidatesWithGraph, indexMemoryContent, isApiDraining, drainApi, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, changesAllowMerge, updateSwarmRepoChecked, getCombConfig, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, RoomOperationSchema, removeAwarenessStates, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, canClaim, emitBudgetRefusalSideEffects, taskActionInputSchema, taskActionOutputSchema, taskActionHandler, workflowModelErrors, patchWorkflowDefinition, resolveScriptsOnlyMode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer };
@@ -17,13 +17,13 @@ import {
17
17
  recoverIncompleteRuns,
18
18
  repointTrackerSyncBySwarmId,
19
19
  resolveLeadOnlyRecoveryAssignment
20
- } from "./cli-kp42yek0.js";
20
+ } from "./cli-vbz0wywh.js";
21
21
  import {
22
22
  isMultiRuntimeEnabled
23
23
  } from "./cli-re8z5p8p.js";
24
24
  import {
25
25
  createApprovalFollowUpTask
26
- } from "./cli-5xhpb3kv.js";
26
+ } from "./cli-z5swnjvr.js";
27
27
  import {
28
28
  MAX_EMPTY_POLLS,
29
29
  assignUnassignedTaskPending,
@@ -74,7 +74,7 @@ import {
74
74
  settleSupersededTaskDependents,
75
75
  supersedeTask,
76
76
  updateAgentStatus
77
- } from "./cli-jf7wmv1r.js";
77
+ } from "./cli-8hsexrtr.js";
78
78
  import {
79
79
  init_registry,
80
80
  init_resolver,