@desplega.ai/agent-swarm 1.135.2 → 1.136.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 (97) hide show
  1. package/dist/{actions-3az2vwwn.js → actions-agcbc8nd.js} +6 -6
  2. package/dist/{app-vygnfvrh.js → app-g2s78xya.js} +3 -3
  3. package/dist/{assistant-2jr2frrm.js → assistant-yd3jkb9d.js} +8 -8
  4. package/dist/{boot-reembed-y7r9cxt0.js → boot-reembed-6spqw4q0.js} +3 -3
  5. package/dist/{boot-reembed-ncbg16rb.js → boot-reembed-b22s9w5x.js} +4 -4
  6. package/dist/{boot-scrub-logs-t82rwa0y.js → boot-scrub-logs-6h3cqkc0.js} +2 -2
  7. package/dist/{claude-adapter-vvx2aw3v.js → claude-adapter-ng5y8zd7.js} +4 -4
  8. package/dist/{cli-mfa2eaef.js → cli-35jknh9e.js} +5 -5
  9. package/dist/{cli-cv2vjg2y.js → cli-3y553gws.js} +1 -1
  10. package/dist/{cli-nhvym0d2.js → cli-4gzv54ss.js} +15 -6
  11. package/dist/{cli-4dakdn30.js → cli-4r4jkqep.js} +6 -6
  12. package/dist/{cli-83razmqg.js → cli-54ht104h.js} +3 -3
  13. package/dist/{cli-6290n4yz.js → cli-5bnz1t86.js} +1 -1
  14. package/dist/{cli-6bz2hzvw.js → cli-68vayryq.js} +2 -2
  15. package/dist/{cli-1z01xdqh.js → cli-6gwgzdgw.js} +2 -2
  16. package/dist/{cli-1dfatkzm.js → cli-84vrhesc.js} +1 -1
  17. package/dist/{cli-jfrh963q.js → cli-8v57p983.js} +10 -10
  18. package/dist/{cli-3f0tnh34.js → cli-ads0hfw2.js} +81 -23
  19. package/dist/{cli-fmha74ga.js → cli-bnq8h7ea.js} +3 -3
  20. package/dist/{cli-j3xnd5b4.js → cli-d5ygfv18.js} +7 -6
  21. package/dist/{cli-8f4h27gm.js → cli-edwrx42s.js} +1 -1
  22. package/dist/{cli-r5vwg1ma.js → cli-fpjmcbhz.js} +4 -4
  23. package/dist/{cli-w0ygcv43.js → cli-gpdtxzar.js} +6 -4
  24. package/dist/{cli-4rdjdddh.js → cli-hz5hp6wn.js} +1 -1
  25. package/dist/{cli-6mmwmy45.js → cli-j7qp8gtf.js} +1 -1
  26. package/dist/{cli-5a5nrq3g.js → cli-jjhnma34.js} +5 -5
  27. package/dist/{cli-ey09krp2.js → cli-m3z53bed.js} +1 -1
  28. package/dist/{cli-cf6vq6qa.js → cli-mgef08pc.js} +1 -1
  29. package/dist/{cli-0jhyxtdj.js → cli-qckgdqmr.js} +2 -2
  30. package/dist/{cli-a1zrc2g6.js → cli-qhfkxrpg.js} +108 -33
  31. package/dist/{cli-yw2z5kj9.js → cli-spf767vc.js} +1 -1
  32. package/dist/{cli-1857msnd.js → cli-tee8w7tq.js} +1 -1
  33. package/dist/{cli-qxn3g3yx.js → cli-tmn19cdz.js} +61 -6
  34. package/dist/{cli-7ccy0h4r.js → cli-y16cesaq.js} +2 -2
  35. package/dist/{cli-cm4z7w7w.js → cli-z6e8eqrm.js} +2 -2
  36. package/dist/cli.js +16 -16
  37. package/dist/{codex-adapter-6p290yq3.js → codex-adapter-kw11ps3j.js} +2 -2
  38. package/dist/{codex-session-runner-7b3dhpmx.js → codex-session-runner-sffb69v7.js} +2 -2
  39. package/dist/{commands-wxg1g4nq.js → commands-0xxp4tz8.js} +2 -2
  40. package/dist/{db-8fqeheve.js → db-0npp39zd.js} +6 -2
  41. package/dist/{handlers-gwtqp17c.js → handlers-5p7a1jx6.js} +15 -9
  42. package/dist/{hook-gd9fwfp0.js → hook-hpefr0a8.js} +2 -2
  43. package/dist/{hook-mrqygs7p.js → hook-jjpxn4se.js} +3 -3
  44. package/dist/{http-x4mc1mqg.js → http-wfp33653.js} +322 -61
  45. package/dist/{index-yd654kac.js → index-17h657rg.js} +12 -8
  46. package/dist/{index-pzgasj16.js → index-m2p7ctyh.js} +10 -10
  47. package/dist/{index-2mdqrd0n.js → index-racb4wfq.js} +9 -9
  48. package/dist/{index-4djjkp9z.js → index-zh66wm65.js} +8 -8
  49. package/dist/{keepalive-3tycspcy.js → keepalive-wxjd633a.js} +4 -4
  50. package/dist/{lead-js1h3z7d.js → lead-359ec2z0.js} +23 -23
  51. package/dist/{maintenance-y91ry8q4.js → maintenance-rr03qjtb.js} +4 -4
  52. package/dist/{mistral-conversations-hdmnkf6h.js → mistral-conversations-qdrnmrb8.js} +1 -1
  53. package/dist/{oauth-refresh-sweep-s33gtxrw.js → oauth-refresh-sweep-jwj22yb8.js} +3 -3
  54. package/dist/{onboard-vndj64mb.js → onboard-asnhchcv.js} +2 -2
  55. package/dist/{openai-completions-cwy2kkzg.js → openai-completions-yzftqrft.js} +33 -4
  56. package/dist/{otel-impl-d2p84k6e.js → otel-impl-54cra6mw.js} +18 -4
  57. package/dist/{pi-mono-adapter-1phspz2y.js → pi-mono-adapter-29g7axgj.js} +669 -335
  58. package/dist/{pricing-refresh-c2bwsyk5.js → pricing-refresh-mkyy7c2y.js} +4 -4
  59. package/dist/{rbac-roles-2pedz5e9.js → rbac-roles-ak56tr75.js} +2 -2
  60. package/dist/{rbac-roles-reef5y2d.js → rbac-roles-kb3afm95.js} +3 -3
  61. package/dist/{render-v2-zd5r5wgf.js → render-v2-434asg49.js} +3 -3
  62. package/dist/{seed-pricing-2kyk1vhg.js → seed-pricing-nbmd7ah8.js} +3 -3
  63. package/dist/{setup-5ys9pwyr.js → setup-wh4qmjs4.js} +2 -2
  64. package/dist/{worker-nb1f7k04.js → worker-j1d27tjv.js} +23 -23
  65. package/openapi.json +167 -2
  66. package/package.json +6 -6
  67. package/src/be/db-retention.ts +275 -0
  68. package/src/be/db.ts +82 -7
  69. package/src/be/swarm-config-guard.ts +30 -0
  70. package/src/heartbeat/heartbeat.ts +21 -0
  71. package/src/http/index.ts +33 -33
  72. package/src/http/route-def.ts +93 -4
  73. package/src/http/stats.ts +37 -1
  74. package/src/http/tasks.ts +93 -0
  75. package/src/http/utils.ts +94 -0
  76. package/src/otel-impl.ts +21 -3
  77. package/src/otel.ts +15 -4
  78. package/src/slack/blocks.ts +1 -0
  79. package/src/slack/handlers.ts +7 -0
  80. package/src/tasks/sibling-awareness.ts +1 -0
  81. package/src/tasks/sibling-block.ts +17 -4
  82. package/src/tests/artifact-sdk.test.ts +20 -15
  83. package/src/tests/db-retention.test.ts +344 -0
  84. package/src/tests/docs-index-footprint.test.js +4 -5
  85. package/src/tests/draft-task-dispatch-race.test.ts +189 -0
  86. package/src/tests/events-http.test.ts +70 -27
  87. package/src/tests/otel-abort-span.test.ts +156 -0
  88. package/src/tests/otel-span-kind.test.ts +59 -0
  89. package/src/tests/promote-draft-task-route.test.ts +175 -0
  90. package/src/tests/route-def-find-route.test.ts +90 -4
  91. package/src/tests/sibling-block.test.ts +29 -1
  92. package/src/tests/slack-assistant-comention-production.test.ts +7 -1
  93. package/src/tests/steering-enabled.test.ts +6 -0
  94. package/src/tests/swarm-config-reserved-keys.test.ts +27 -0
  95. package/src/types.ts +2 -1
  96. package/templates/skills/swarm-scripts/SKILL.md +4 -0
  97. package/templates/skills/swarm-scripts/content.md +4 -0
@@ -28,7 +28,7 @@ import {
28
28
  updateTrackerSync,
29
29
  updateTrackerSyncSwarmId,
30
30
  upsertSwarmConfigWithPolicyMirror
31
- } from "./cli-6290n4yz.js";
31
+ } from "./cli-5bnz1t86.js";
32
32
  import {
33
33
  isMultiRuntimeEnabled
34
34
  } from "./cli-qh4sqfws.js";
@@ -37,17 +37,17 @@ import {
37
37
  ensure,
38
38
  require_dist,
39
39
  runScheduleNow
40
- } from "./cli-r5vwg1ma.js";
40
+ } from "./cli-fpjmcbhz.js";
41
41
  import {
42
42
  startPricingRefreshLoop
43
- } from "./cli-cm4z7w7w.js";
43
+ } from "./cli-z6e8eqrm.js";
44
44
  import {
45
45
  seedPricingFromModelsDev
46
- } from "./cli-1857msnd.js";
46
+ } from "./cli-tee8w7tq.js";
47
47
  import {
48
48
  ensureRbacSeedsSynced,
49
49
  getUserGrant
50
- } from "./cli-cv2vjg2y.js";
50
+ } from "./cli-3y553gws.js";
51
51
  import {
52
52
  can,
53
53
  decideAdmission,
@@ -74,7 +74,7 @@ import {
74
74
  runSavedScriptAsAgent,
75
75
  updateApp,
76
76
  upgradeAppDefinition
77
- } from "./cli-6bz2hzvw.js";
77
+ } from "./cli-68vayryq.js";
78
78
  import {
79
79
  TriggerSchemaError,
80
80
  applyDefinitionPatch,
@@ -88,7 +88,7 @@ import {
88
88
  startWorkflowExecution,
89
89
  validateDefinition,
90
90
  validateJsonSchema
91
- } from "./cli-5a5nrq3g.js";
91
+ } from "./cli-jjhnma34.js";
92
92
  import {
93
93
  ConnectionAuthInputSchema,
94
94
  SCRIPT_LONG_TIMEOUT_HINT_MS,
@@ -107,7 +107,7 @@ import {
107
107
  setScriptConnectionEnabled,
108
108
  upsertCredentialBinding,
109
109
  upsertScriptConnection
110
- } from "./cli-fmha74ga.js";
110
+ } from "./cli-bnq8h7ea.js";
111
111
  import {
112
112
  getApiKey
113
113
  } from "./cli-f14fvzag.js";
@@ -122,7 +122,7 @@ import {
122
122
  isGraphExpansionEnabled,
123
123
  rerank,
124
124
  rowToCandidate
125
- } from "./cli-4rdjdddh.js";
125
+ } from "./cli-hz5hp6wn.js";
126
126
  import {
127
127
  buildAuthorizationUrl,
128
128
  createOAuthApp,
@@ -137,7 +137,7 @@ import {
137
137
  listAuthorizationsForApp,
138
138
  onAuthorizationRefreshed,
139
139
  upsertOAuthApp
140
- } from "./cli-ey09krp2.js";
140
+ } from "./cli-m3z53bed.js";
141
141
  import {
142
142
  ZodFirstPartyTypeKind,
143
143
  objectType
@@ -149,7 +149,7 @@ import {
149
149
  createAdditiveBuffer,
150
150
  extractSlackMessageText,
151
151
  parseSlackTs
152
- } from "./cli-1dfatkzm.js";
152
+ } from "./cli-84vrhesc.js";
153
153
  import {
154
154
  findOrCreateUserByEmail,
155
155
  findUserByExternalId,
@@ -165,10 +165,10 @@ import {
165
165
  resolveIdentityByEmail,
166
166
  resolveUserByToken,
167
167
  unlinkIdentity
168
- } from "./cli-yw2z5kj9.js";
168
+ } from "./cli-spf767vc.js";
169
169
  import {
170
170
  createTaskWithSiblingAwareness
171
- } from "./cli-w0ygcv43.js";
171
+ } from "./cli-gpdtxzar.js";
172
172
  import {
173
173
  getAgentDisplayName,
174
174
  getAgentEmoji,
@@ -177,7 +177,7 @@ import {
177
177
  markdownToSlack,
178
178
  startSlackApp,
179
179
  stopSlackApp
180
- } from "./cli-j3xnd5b4.js";
180
+ } from "./cli-d5ygfv18.js";
181
181
  import {
182
182
  $OpenAPIRegistry,
183
183
  $OpenApiGeneratorV31,
@@ -422,7 +422,7 @@ import {
422
422
  upsertPromptTemplate,
423
423
  upsertService,
424
424
  validateConfigValue
425
- } from "./cli-qxn3g3yx.js";
425
+ } from "./cli-tmn19cdz.js";
426
426
  import {
427
427
  generateDefaultClaudeMd,
428
428
  generateDefaultIdentityMd,
@@ -464,7 +464,7 @@ import {
464
464
  import {
465
465
  init_package,
466
466
  package_default
467
- } from "./cli-4dakdn30.js";
467
+ } from "./cli-4r4jkqep.js";
468
468
  import {
469
469
  $ZodObject,
470
470
  $ZodType,
@@ -22956,7 +22956,7 @@ async function notifySlack(text) {
22956
22956
  return;
22957
22957
  }
22958
22958
  try {
22959
- const { getSlackApp: getSlackApp2 } = await import("./app-vygnfvrh.js");
22959
+ const { getSlackApp: getSlackApp2 } = await import("./app-g2s78xya.js");
22960
22960
  const app = getSlackApp2();
22961
22961
  if (!app) {
22962
22962
  console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
@@ -23027,7 +23027,7 @@ async function deleteJiraWebhook(webhookId) {
23027
23027
  console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
23028
23028
  }
23029
23029
  async function overwriteWebhookIds(next) {
23030
- const { getDbClient: getDbClient2 } = await import("./db-8fqeheve.js");
23030
+ const { getDbClient: getDbClient2 } = await import("./db-0npp39zd.js");
23031
23031
  await getDbClient2().transaction(async (tx) => {
23032
23032
  const row = await tx.get("SELECT metadata FROM oauth_apps WHERE provider = 'jira'");
23033
23033
  if (!row) {
@@ -95932,6 +95932,46 @@ function getPathSegments(url) {
95932
95932
  const path = pathEnd === -1 ? url : url.slice(0, pathEnd);
95933
95933
  return path.split("/").filter(Boolean);
95934
95934
  }
95935
+ function abortedStatusCodeAttribute(headersSent, statusCode) {
95936
+ return headersSent ? statusCode : undefined;
95937
+ }
95938
+ function wireHttpSpanLifecycle(res, span, getStatusCode, startTime) {
95939
+ let spanEnded = false;
95940
+ res.on("finish", () => {
95941
+ if (spanEnded)
95942
+ return;
95943
+ spanEnded = true;
95944
+ const statusCode = getStatusCode();
95945
+ span.setAttributes({
95946
+ "http.response.status_code": statusCode,
95947
+ "agentswarm.http.duration_ms": Math.round((performance.now() - startTime) * 10) / 10
95948
+ });
95949
+ if (statusCode >= 500) {
95950
+ span.setStatus({ code: 2, message: `HTTP ${statusCode}` });
95951
+ }
95952
+ span.end();
95953
+ });
95954
+ res.on("error", (err) => {
95955
+ if (spanEnded)
95956
+ return;
95957
+ spanEnded = true;
95958
+ if (err)
95959
+ span.recordException(err);
95960
+ span.setStatus({ code: 2, message: err?.message });
95961
+ span.end();
95962
+ });
95963
+ res.on("close", () => {
95964
+ if (spanEnded)
95965
+ return;
95966
+ spanEnded = true;
95967
+ span.setAttributes({
95968
+ "http.response.status_code": abortedStatusCodeAttribute(res.headersSent, getStatusCode()),
95969
+ "agentswarm.http.duration_ms": Math.round((performance.now() - startTime) * 10) / 10,
95970
+ "agentswarm.http.aborted": true
95971
+ });
95972
+ span.end();
95973
+ });
95974
+ }
95935
95975
  function safeRequestUrlForLog(rawUrl) {
95936
95976
  if (!rawUrl)
95937
95977
  return "";
@@ -96067,11 +96107,29 @@ function findRoute(method, pathSegments) {
96067
96107
  }
96068
96108
  return;
96069
96109
  }
96070
- function describeRequestRoute(method, pathSegments) {
96110
+ var CORE_ROUTE_TEMPLATES = {
96111
+ health: { path: "/health" },
96112
+ "openapi.json": { path: "/openapi.json" },
96113
+ docs: { path: "/docs", toleratesTrailingSlash: true },
96114
+ me: { path: "/me", methods: ["GET"], toleratesQueryString: true },
96115
+ "cancelled-tasks": {
96116
+ path: "/cancelled-tasks",
96117
+ methods: ["GET"],
96118
+ toleratesQueryString: true
96119
+ },
96120
+ "internal/reload-config": { path: "/internal/reload-config", methods: ["POST"] },
96121
+ mcp: { path: "/mcp", methods: ["GET", "POST", "DELETE"] },
96122
+ "mcp-user": { path: "/mcp-user", methods: ["GET", "POST", "DELETE"] }
96123
+ };
96124
+ function describeRequestRoute(method, pathSegments, hasQueryString = false, hasTrailingSlash = false) {
96071
96125
  const m = (method ?? "").toUpperCase() || "UNKNOWN";
96072
96126
  const matched = findRoute(method, pathSegments);
96073
96127
  if (matched)
96074
96128
  return { spanName: `${m} ${matched.path}`, httpRoute: matched.path };
96129
+ const coreTemplate = CORE_ROUTE_TEMPLATES[pathSegments.join("/")];
96130
+ if (coreTemplate && (!coreTemplate.methods || coreTemplate.methods.includes(m)) && (!hasQueryString || coreTemplate.toleratesQueryString) && (!hasTrailingSlash || coreTemplate.toleratesTrailingSlash)) {
96131
+ return { spanName: `${m} ${coreTemplate.path}`, httpRoute: coreTemplate.path };
96132
+ }
96075
96133
  const first = pathSegments[0];
96076
96134
  return { spanName: first ? `${m} /${first}` : m };
96077
96135
  }
@@ -96654,7 +96712,7 @@ async function initOtel(serviceRole = process.env.AGENT_ROLE || "api") {
96654
96712
  return;
96655
96713
  initialized6 = true;
96656
96714
  try {
96657
- const impl = await import("./otel-impl-d2p84k6e.js");
96715
+ const impl = await import("./otel-impl-54cra6mw.js");
96658
96716
  await impl.boot(serviceRole);
96659
96717
  realWithSpan = impl.withSpan;
96660
96718
  realStartSpan = impl.startSpan;
@@ -96674,11 +96732,11 @@ async function withSpan(name, fn, attributes) {
96674
96732
  }
96675
96733
  return realWithSpan(name, fn, attributes);
96676
96734
  }
96677
- function startSpan(name, attributes) {
96735
+ function startSpan(name, attributes, options) {
96678
96736
  if (!otelConfigured() || !realStartSpan) {
96679
96737
  return NOOP_SPAN;
96680
96738
  }
96681
- return realStartSpan(name, attributes);
96739
+ return realStartSpan(name, attributes, options);
96682
96740
  }
96683
96741
  function withSpanContext(span, fn) {
96684
96742
  if (!otelConfigured() || !realWithSpanContext) {
@@ -115430,4 +115488,4 @@ function writeSkillsToFilesystem(entries, harnessType = "all", home) {
115430
115488
  return { synced, removed, errors };
115431
115489
  }
115432
115490
 
115433
- export { safeParseAsync2 as safeParseAsync, normalizeObjectSchema, getParseErrorMessage, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, isInboxAllowed, isSenderAllowed, handleMessageReceived, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2 as handleIssue1, handleNote, handlePipeline, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, setCorsHeaders, parseQueryParams, getPathSegments, safeRequestUrlForLog, agentWithCapacity, parseBody, BODY_TOO_LARGE, enforceContentLengthCap, json, jsonError, triggerSchemaErrorResponse, deriveApiBaseUrl, httpServerSemconvAttributes, runtimeInstanceHeader, describeRequestRoute, route, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, mcpOverflowAuthError, isPollTracingEnabled, initOtel, withSpan, startSpan, withSpanContext, withRemoteContext, injectTraceContext, recordSessionCost, markScriptSdkRequestOrigin, toolErr, createToolRegistrar, userCtx, resolveTaskAuditUserId, resolveHttpAuditUserId, resolveHttpFavoriteOwner, handleApps, getUserCommsPrefs, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, snapshotMetric, AssetKeyAuthorizationError, authorizeAssetKeyWrite, snapshotPage, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, scopedResourceScopeIdSchema, resolveScopedResourceId, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, reservedNamespaceError, refreshLinks, canReadMemory, getLinksForMemory, recordRetrievals, expandCandidatesWithGraph, indexMemoryContent, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, sendTaskOutputSchema, sendTaskHandler, parseSkillContent, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, guardTerminalTaskResultWrite, canClaim, emitBudgetRefusalSideEffects, taskActionInputSchema, taskActionOutputSchema, taskActionHandler, patchWorkflowDefinition, resolveScriptsOnlyMode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer, writeSkillsToFilesystem };
115491
+ export { safeParseAsync2 as safeParseAsync, normalizeObjectSchema, getParseErrorMessage, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, isInboxAllowed, isSenderAllowed, handleMessageReceived, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2 as handleIssue1, handleNote, handlePipeline, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, setCorsHeaders, parseQueryParams, getPathSegments, wireHttpSpanLifecycle, safeRequestUrlForLog, agentWithCapacity, parseBody, BODY_TOO_LARGE, enforceContentLengthCap, json, jsonError, triggerSchemaErrorResponse, deriveApiBaseUrl, httpServerSemconvAttributes, runtimeInstanceHeader, describeRequestRoute, route, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, mcpOverflowAuthError, isPollTracingEnabled, initOtel, withSpan, startSpan, withSpanContext, withRemoteContext, injectTraceContext, recordSessionCost, markScriptSdkRequestOrigin, toolErr, createToolRegistrar, userCtx, resolveTaskAuditUserId, resolveHttpAuditUserId, resolveHttpFavoriteOwner, handleApps, getUserCommsPrefs, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, snapshotMetric, AssetKeyAuthorizationError, authorizeAssetKeyWrite, snapshotPage, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, scopedResourceScopeIdSchema, resolveScopedResourceId, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, reservedNamespaceError, refreshLinks, canReadMemory, getLinksForMemory, recordRetrievals, expandCandidatesWithGraph, indexMemoryContent, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, sendTaskOutputSchema, sendTaskHandler, parseSkillContent, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, guardTerminalTaskResultWrite, canClaim, emitBudgetRefusalSideEffects, taskActionInputSchema, taskActionOutputSchema, taskActionHandler, patchWorkflowDefinition, resolveScriptsOnlyMode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer, writeSkillsToFilesystem };
@@ -6,7 +6,7 @@ import {
6
6
  } from "./cli-f14fvzag.js";
7
7
  import {
8
8
  embedScript
9
- } from "./cli-0jhyxtdj.js";
9
+ } from "./cli-qckgdqmr.js";
10
10
  import {
11
11
  calculatePKCECodeChallenge,
12
12
  ensureAuthorizationTokenOrThrow,
@@ -18,7 +18,7 @@ import {
18
18
  oauthAppRowToProviderConfig,
19
19
  updateAuthorizationTokens,
20
20
  upsertAuthorization
21
- } from "./cli-ey09krp2.js";
21
+ } from "./cli-m3z53bed.js";
22
22
  import {
23
23
  CredentialBroker,
24
24
  DEFAULT_CREDENTIAL_BINDINGS,
@@ -39,7 +39,7 @@ import {
39
39
  normalizeDateRequired,
40
40
  placeholderForConfigKey,
41
41
  upsertSwarmConfig
42
- } from "./cli-qxn3g3yx.js";
42
+ } from "./cli-tmn19cdz.js";
43
43
  import {
44
44
  init_env_flag,
45
45
  isEnvFlagEnabled
@@ -37,7 +37,7 @@ import {
37
37
  setSlackMessageTracking,
38
38
  slackContextKey,
39
39
  updateSlackMessageRecord
40
- } from "./cli-qxn3g3yx.js";
40
+ } from "./cli-tmn19cdz.js";
41
41
  import {
42
42
  getAppUrl,
43
43
  init_constants
@@ -54156,6 +54156,7 @@ function buildBufferFlushBlocks(opts) {
54156
54156
  return [contextBlock(`\uD83D\uDCE1 _${text}_ (${taskLink})`)];
54157
54157
  }
54158
54158
  var STATUS_ICON = {
54159
+ draft: "\uD83D\uDCCE",
54159
54160
  backlog: "\uD83D\uDDC2️",
54160
54161
  unassigned: "\uD83D\uDCED",
54161
54162
  offered: "\uD83D\uDCE8",
@@ -55182,13 +55183,13 @@ async function initSlackApp() {
55182
55183
  socketMode: true,
55183
55184
  logLevel: import_bolt.LogLevel.DEBUG
55184
55185
  });
55185
- const { registerMessageHandler } = await import("./handlers-gwtqp17c.js");
55186
- const { registerCommandHandler } = await import("./commands-wxg1g4nq.js");
55187
- const { registerActionHandlers } = await import("./actions-3az2vwwn.js");
55186
+ const { registerMessageHandler } = await import("./handlers-5p7a1jx6.js");
55187
+ const { registerCommandHandler } = await import("./commands-0xxp4tz8.js");
55188
+ const { registerActionHandlers } = await import("./actions-agcbc8nd.js");
55188
55189
  registerMessageHandler(app);
55189
55190
  registerCommandHandler(app);
55190
55191
  registerActionHandlers(app);
55191
- const { createAssistant } = await import("./assistant-2jr2frrm.js");
55192
+ const { createAssistant } = await import("./assistant-yd3jkb9d.js");
55192
55193
  app.assistant(createAssistant());
55193
55194
  return app;
55194
55195
  }
@@ -55197,7 +55198,7 @@ async function startSlackApp() {
55197
55198
  await initSlackApp();
55198
55199
  }
55199
55200
  if (app) {
55200
- const { isSlackRenderV2Enabled: isSlackRenderV2Enabled2 } = await import("./render-v2-zd5r5wgf.js");
55201
+ const { isSlackRenderV2Enabled: isSlackRenderV2Enabled2 } = await import("./render-v2-434asg49.js");
55201
55202
  if (isSlackRenderV2Enabled2())
55202
55203
  await ensureSlackRenderV2Activation();
55203
55204
  await app.start();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runStopHookSessionSummarySubprocess
3
- } from "./cli-1z01xdqh.js";
3
+ } from "./cli-6gwgzdgw.js";
4
4
  import {
5
5
  SessionErrorTracker,
6
6
  buildOtelTraceparentEnv,
@@ -2,17 +2,17 @@ import {
2
2
  getExecutorRegistry,
3
3
  handleScheduleTrigger,
4
4
  startWorkflowExecution
5
- } from "./cli-5a5nrq3g.js";
5
+ } from "./cli-jjhnma34.js";
6
6
  import {
7
7
  buildScriptCredentialBindings,
8
8
  getScript,
9
9
  getScriptApiConnectionDescriptors,
10
10
  getScriptMcpConnectionDescriptors,
11
11
  runScript
12
- } from "./cli-fmha74ga.js";
12
+ } from "./cli-bnq8h7ea.js";
13
13
  import {
14
14
  createTaskWithSiblingAwareness
15
- } from "./cli-w0ygcv43.js";
15
+ } from "./cli-gpdtxzar.js";
16
16
  import {
17
17
  getDbClient,
18
18
  getDueScheduledTasks,
@@ -25,7 +25,7 @@ import {
25
25
  scheduleContextKey,
26
26
  telemetry,
27
27
  updateScheduledTask
28
- } from "./cli-qxn3g3yx.js";
28
+ } from "./cli-tmn19cdz.js";
29
29
  import {
30
30
  __commonJS,
31
31
  __require,
@@ -3,7 +3,7 @@ import {
3
3
  getAgentById,
4
4
  getInProgressTasksByContextKey,
5
5
  init_db
6
- } from "./cli-qxn3g3yx.js";
6
+ } from "./cli-tmn19cdz.js";
7
7
 
8
8
  // src/tasks/sibling-awareness.ts
9
9
  init_db();
@@ -66,8 +66,9 @@ function renderSiblingBlock(contextKey, siblings, now = Date.now()) {
66
66
  lines.push("");
67
67
  for (const s of siblings) {
68
68
  const agentLabel = s.agentName ? `agent:${s.agentName}` : s.agentId ? `agent:${s.agentId}` : "agent:unassigned";
69
- const rel = formatRelativeTime(s.updatedAt, now);
70
- lines.push(`- [${s.status}] task:${s.id} — ${agentLabel} — started ${rel} ago`);
69
+ const lastActive = `last active ${formatRelativeTime(s.updatedAt, now)} ago`;
70
+ const timing = s.createdAt ? `started ${formatRelativeTime(s.createdAt, now)} ago, ${lastActive}` : lastActive;
71
+ lines.push(`- [${s.status}] task:${s.id} — ${agentLabel} — ${timing}`);
71
72
  lines.push(` "${truncateForBlock(s.description)}"`);
72
73
  }
73
74
  lines.push("</sibling_tasks_in_progress>");
@@ -115,7 +116,8 @@ async function toSiblingTaskInfo(task) {
115
116
  agentId: task.agentId,
116
117
  agentName: agent?.name ?? null,
117
118
  description: stripSiblingBlock(task.task),
118
- updatedAt: task.lastUpdatedAt
119
+ updatedAt: task.lastUpdatedAt,
120
+ createdAt: task.createdAt
119
121
  };
120
122
  }
121
123
  async function applySiblingAwareness(input) {
@@ -11,7 +11,7 @@ import {
11
11
  getDbClient,
12
12
  init_db,
13
13
  isSqliteVecAvailable
14
- } from "./cli-qxn3g3yx.js";
14
+ } from "./cli-tmn19cdz.js";
15
15
  import {
16
16
  __esm,
17
17
  __export,
@@ -13,7 +13,7 @@ import {
13
13
  } from "./cli-a3pkfpqs.js";
14
14
  import {
15
15
  summarizeSession
16
- } from "./cli-a1zrc2g6.js";
16
+ } from "./cli-qhfkxrpg.js";
17
17
  import {
18
18
  CTX_MODE_NUDGE_EVERY
19
19
  } from "./cli-zm7njwzd.js";
@@ -18,10 +18,10 @@ import {
18
18
  sandboxSpawnEnv,
19
19
  snapshotCapped,
20
20
  touchScratchScriptLastUsed
21
- } from "./cli-fmha74ga.js";
21
+ } from "./cli-bnq8h7ea.js";
22
22
  import {
23
23
  withSiblingAwareness
24
- } from "./cli-w0ygcv43.js";
24
+ } from "./cli-gpdtxzar.js";
25
25
  import {
26
26
  FollowUpConfigSchema,
27
27
  ModelTierSchema,
@@ -67,7 +67,7 @@ import {
67
67
  updateWorkflowRun,
68
68
  updateWorkflowRunStep,
69
69
  workflowContextKey
70
- } from "./cli-qxn3g3yx.js";
70
+ } from "./cli-tmn19cdz.js";
71
71
  import {
72
72
  deepInterpolate,
73
73
  findInterpolationTokens,
@@ -3194,7 +3194,7 @@ class HumanInTheLoopExecutor extends BaseExecutor {
3194
3194
  }
3195
3195
  if (notification.channel === "slack") {
3196
3196
  try {
3197
- const { getSlackApp } = await import("./app-vygnfvrh.js");
3197
+ const { getSlackApp } = await import("./app-g2s78xya.js");
3198
3198
  const slackApp = getSlackApp();
3199
3199
  if (!slackApp) {
3200
3200
  console.warn("[HITL] Slack not initialized — cannot send notification");
@@ -3310,7 +3310,7 @@ class NotifyExecutor extends BaseExecutor {
3310
3310
  }
3311
3311
  }
3312
3312
  case "slack": {
3313
- const { getSlackApp } = await import("./app-vygnfvrh.js");
3313
+ const { getSlackApp } = await import("./app-g2s78xya.js");
3314
3314
  const app = getSlackApp();
3315
3315
  if (!app) {
3316
3316
  return {
@@ -7,7 +7,7 @@ import {
7
7
  init_date_utils,
8
8
  init_db,
9
9
  normalizeDateRequired
10
- } from "./cli-qxn3g3yx.js";
10
+ } from "./cli-tmn19cdz.js";
11
11
  import {
12
12
  init_secret_scrubber,
13
13
  registerVolatileSecret,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_package,
3
3
  package_default
4
- } from "./cli-4dakdn30.js";
4
+ } from "./cli-4r4jkqep.js";
5
5
 
6
6
  // src/commands/shared/client-config.ts
7
7
  init_package();
@@ -4,11 +4,11 @@ import {
4
4
  getEmbeddingProvider,
5
5
  init_embedding,
6
6
  serializeEmbedding
7
- } from "./cli-4rdjdddh.js";
7
+ } from "./cli-hz5hp6wn.js";
8
8
  import {
9
9
  getDbClient,
10
10
  init_db
11
- } from "./cli-qxn3g3yx.js";
11
+ } from "./cli-tmn19cdz.js";
12
12
  import {
13
13
  init_secret_scrubber,
14
14
  scrubSecrets