@desplega.ai/agent-swarm 1.120.0 → 1.121.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 (128) hide show
  1. package/README.md +2 -2
  2. package/dist/{actions-rym7jyg2.js → actions-mwshtkf7.js} +6 -6
  3. package/dist/{anthropic-messages-qjxzsabf.js → anthropic-messages-4gn944cn.js} +29 -13
  4. package/dist/{app-ss3a0nfj.js → app-skbty91x.js} +4 -4
  5. package/dist/{assistant-8sd2b21b.js → assistant-tg7dhfj8.js} +13 -13
  6. package/dist/{azure-openai-responses-ntfd05zd.js → azure-openai-responses-79zc0wyy.js} +28 -13
  7. package/dist/{boot-reembed-eh18r04f.js → boot-reembed-ntjmeyh2.js} +4 -4
  8. package/dist/{boot-reembed-7bs0d0sj.js → boot-reembed-q5x0xpcp.js} +5 -5
  9. package/dist/{boot-scrub-logs-v8ch000n.js → boot-scrub-logs-5gznsfbe.js} +4 -4
  10. package/dist/{claude-adapter-9n3nzt65.js → claude-adapter-vxvcym3r.js} +3 -3
  11. package/dist/{claude-managed-adapter-pv2nbqy4.js → claude-managed-adapter-g807894s.js} +2 -2
  12. package/dist/{cli-py8z9bjq.js → cli-072t49hf.js} +9 -9
  13. package/dist/{cli-383wyw2f.js → cli-0df2g86x.js} +61 -17
  14. package/dist/{cli-84j2vp67.js → cli-1728qh70.js} +1 -1
  15. package/dist/{cli-kyqs14qe.js → cli-3b1ayz83.js} +5 -5
  16. package/dist/{cli-0ap79nha.js → cli-3fxqwfh3.js} +1 -1
  17. package/dist/{cli-w6rhc30s.js → cli-3jrdwnn9.js} +20 -5
  18. package/dist/{cli-gq12jc1m.js → cli-46etyprn.js} +7 -5
  19. package/dist/{cli-j59bj3vs.js → cli-4pfweq4x.js} +8 -8
  20. package/dist/{cli-2r7s8jhp.js → cli-5c4327dx.js} +7 -1
  21. package/dist/{cli-4cb3p8pj.js → cli-5hpvd15x.js} +2 -2
  22. package/dist/{cli-branks1w.js → cli-6s3ytc5x.js} +1 -1
  23. package/dist/{cli-da3x3btq.js → cli-7pt9sc83.js} +2 -2
  24. package/dist/{cli-n745f8e5.js → cli-7pzae66m.js} +1 -1
  25. package/dist/{cli-qs7nb3zn.js → cli-8wrympd7.js} +27 -1
  26. package/dist/{cli-zxnp21rf.js → cli-95rbe11h.js} +13 -13
  27. package/dist/{cli-v65h59hn.js → cli-agdrxyex.js} +1 -1
  28. package/dist/{cli-wr706gez.js → cli-av2s7my4.js} +167 -66
  29. package/dist/{cli-t91zbm2s.js → cli-avw9ev3x.js} +55 -21
  30. package/dist/{cli-shdvvj0n.js → cli-b2mqkg1h.js} +2 -2
  31. package/dist/{cli-1arw00dp.js → cli-ccjwgarc.js} +12 -3
  32. package/dist/{cli-pscrc6tw.js → cli-ch7t5v7n.js} +5 -0
  33. package/dist/{cli-tghre7g6.js → cli-cw70hymf.js} +1 -0
  34. package/dist/{cli-n61x2aph.js → cli-dmzv0986.js} +816 -1335
  35. package/dist/{cli-0kkggfr9.js → cli-g9vva2qh.js} +2 -2
  36. package/dist/{cli-dnx98dwa.js → cli-gdpx70nc.js} +38185 -38141
  37. package/dist/{cli-vmhqfnp1.js → cli-ghq3v4c9.js} +2 -2
  38. package/dist/{cli-w5em21am.js → cli-ky8esb8t.js} +3 -3
  39. package/dist/{cli-f6c6y7fw.js → cli-nf7sadev.js} +2 -2
  40. package/dist/{cli-zxeb2qe3.js → cli-p9w7kb3h.js} +1 -1
  41. package/dist/{cli-xeatwfbe.js → cli-ry656xem.js} +24 -17
  42. package/dist/{cli-th08nm8p.js → cli-s8bdcke2.js} +1 -1
  43. package/dist/cli-s8s499xy.js +81 -0
  44. package/dist/{cli-d2eyq90a.js → cli-srjqn7fd.js} +1 -1
  45. package/dist/{cli-gad984jj.js → cli-tv7vekye.js} +1 -1
  46. package/dist/{cli-kyfx7z3d.js → cli-vg3zrw6h.js} +4 -4
  47. package/dist/{cli-sbh0b9r1.js → cli-vp9r4ap4.js} +5 -4
  48. package/dist/{cli-mg280wsv.js → cli-we156bmz.js} +1 -1
  49. package/dist/{cli-e0y603nn.js → cli-x0e0yvnq.js} +101 -1
  50. package/dist/{cli-mw3xpgwb.js → cli-x4apc9t3.js} +4 -4
  51. package/dist/cli.js +23 -21
  52. package/dist/{codex-adapter-6j2b38tg.js → codex-adapter-mmy741zd.js} +8 -9
  53. package/dist/{codex-session-runner-vz215wgw.js → codex-session-runner-sazmx9zt.js} +8 -9
  54. package/dist/{commands-w1swgcgg.js → commands-cxxye5e4.js} +3 -3
  55. package/dist/{db-yv6y0fxw.js → db-ab1954b7.js} +5 -3
  56. package/dist/{google-generative-ai-n1d3xt4n.js → google-generative-ai-wwa2ked5.js} +14 -18
  57. package/dist/{google-vertex-mxst23gy.js → google-vertex-71xmdd7n.js} +14 -18
  58. package/dist/{handlers-yjyafdwk.js → handlers-fmfe2343.js} +13 -13
  59. package/dist/{hook-6nvc6p19.js → hook-ygnw3cvt.js} +7 -8
  60. package/dist/{http-g6j8rc6h.js → http-kactcc0z.js} +142 -64
  61. package/dist/{index-b2rarbkn.js → index-6erq0wvk.js} +11 -11
  62. package/dist/{index-7betnvg6.js → index-g86j2yt5.js} +9 -9
  63. package/dist/{index-64th6eqs.js → index-gmzs6a2q.js} +10 -10
  64. package/dist/{index-cbknx39k.js → index-hmp82wn0.js} +12 -12
  65. package/dist/{keepalive-j8c99r3m.js → keepalive-3cvt26dw.js} +6 -6
  66. package/dist/{lead-8xe71m3s.js → lead-ysf26cjr.js} +30 -31
  67. package/dist/{maintenance-eqnmrwb2.js → maintenance-9npwptbb.js} +5 -5
  68. package/dist/{mistral-conversations-ykcg66za.js → mistral-conversations-26ya4yah.js} +17 -13
  69. package/dist/{oauth-refresh-sweep-c5dy1653.js → oauth-refresh-sweep-0r2v76vw.js} +6 -6
  70. package/dist/{onboard-4avg01c1.js → onboard-ddb1674a.js} +2 -2
  71. package/dist/{openai-codex-responses-zy0907j9.js → openai-codex-responses-6rr2ye0s.js} +78 -38
  72. package/dist/{openai-completions-xk4p56n9.js → openai-completions-zfa9nkvt.js} +130 -33
  73. package/dist/{openai-responses-4gv3ca5d.js → openai-responses-9wmdks0g.js} +38 -14
  74. package/dist/{opencode-adapter-5bwzvbwj.js → opencode-adapter-h6rkxwrk.js} +2 -2
  75. package/dist/{openrouter-images-4fsrrzes.js → openrouter-images-dgq98729.js} +10 -3
  76. package/dist/{otel-impl-z4cwkp40.js → otel-impl-b43bkq8e.js} +4 -4
  77. package/dist/{pi-messages-zb8v76wx.js → pi-messages-nzjbbz47.js} +4 -6
  78. package/dist/{pi-mono-adapter-9sg69kg3.js → pi-mono-adapter-ke789738.js} +2328 -1281
  79. package/dist/{pricing-refresh-dts9429d.js → pricing-refresh-2rqf114z.js} +5 -5
  80. package/dist/{rbac-roles-4f64wch6.js → rbac-roles-5wkhc8xv.js} +4 -4
  81. package/dist/{rbac-roles-24cvsejy.js → rbac-roles-6vtafvzb.js} +3 -3
  82. package/dist/{seed-pricing-74ph9wap.js → seed-pricing-23wrb873.js} +4 -4
  83. package/dist/{setup-9q0n8rvd.js → setup-6rny4fk6.js} +2 -2
  84. package/dist/{worker-x7g344z8.js → worker-yapewe14.js} +30 -31
  85. package/openapi.json +169 -85
  86. package/package.json +7 -5
  87. package/plugin/commands/swarm-chat.md +2 -0
  88. package/plugin/pi-skills/swarm-chat/SKILL.md +2 -0
  89. package/src/be/db.ts +61 -5
  90. package/src/be/migrations/119_agent_avatar.sql +7 -0
  91. package/src/be/migrations/120_task_title.sql +3 -0
  92. package/src/be/scripts/typecheck.ts +3 -2
  93. package/src/be/seed-capabilities.ts +62 -0
  94. package/src/be/seed-pricing.ts +1 -1
  95. package/src/be/seed-scripts/catalog/ops-catalog-audit.inline.ts +1 -1
  96. package/src/be/seed-scripts/catalog/ops-catalog-audit.ts +1 -1
  97. package/src/commands/runner.ts +69 -6
  98. package/src/http/agents.ts +23 -5
  99. package/src/http/core.ts +8 -5
  100. package/src/http/index.ts +11 -0
  101. package/src/http/mcp-bridge.ts +5 -2
  102. package/src/http/poll.ts +5 -1
  103. package/src/http/sessions.ts +1 -1
  104. package/src/http/tasks.ts +35 -0
  105. package/src/prompts/base-prompt.ts +48 -4
  106. package/src/prompts/session-templates.ts +13 -1
  107. package/src/providers/claude-managed-models.ts +8 -0
  108. package/src/scripts-runtime/types/stdlib.d.ts +11 -0
  109. package/src/server.ts +230 -126
  110. package/src/tests/agent-avatar-resolution.test.ts +123 -0
  111. package/src/tests/agents-list-model-display.test.ts +10 -0
  112. package/src/tests/base-prompt.test.ts +72 -0
  113. package/src/tests/claude-managed-adapter.test.ts +6 -0
  114. package/src/tests/context-window.test.ts +1 -0
  115. package/src/tests/list-endpoint-slimming.test.ts +45 -0
  116. package/src/tests/prompt-template-session.test.ts +6 -5
  117. package/src/tests/script-connections.test.ts +1 -0
  118. package/src/tests/sdk-allowlist.test.ts +4 -1
  119. package/src/tests/seed-capabilities.test.ts +92 -0
  120. package/src/tests/session-costs-model-key-normalize.test.ts +1 -0
  121. package/src/tests/sessions.test.ts +46 -0
  122. package/src/tests/task-title-route.test.ts +106 -0
  123. package/src/tests/tool-annotations.test.ts +6 -3
  124. package/src/tools/update-profile.ts +15 -5
  125. package/src/types.ts +29 -0
  126. package/src/utils/context-window.ts +1 -0
  127. package/dist/cli-z9gzq07x.js +0 -27
  128. package/dist/{otel-g299k41b.js → otel-63jr5v38.js} +1 -1
@@ -2,6 +2,14 @@ import {
2
2
  deriveProviderFromKeyType,
3
3
  init_credentials
4
4
  } from "./cli-z2zcxes1.js";
5
+ import {
6
+ init_package,
7
+ package_default
8
+ } from "./cli-46etyprn.js";
9
+ import {
10
+ init_secret_scrubber,
11
+ scrubSecrets
12
+ } from "./cli-4j2mrzag.js";
5
13
  import {
6
14
  init_zod
7
15
  } from "./cli-bw80ck94.js";
@@ -23,14 +31,6 @@ import {
23
31
  unknown,
24
32
  uuid
25
33
  } from "./cli-xz9aq0rf.js";
26
- import {
27
- init_package,
28
- package_default
29
- } from "./cli-gq12jc1m.js";
30
- import {
31
- init_secret_scrubber,
32
- scrubSecrets
33
- } from "./cli-4j2mrzag.js";
34
34
  import {
35
35
  __commonJS,
36
36
  __esm,
@@ -803,7 +803,7 @@ function resolveTaskModelSelection(opts) {
803
803
  function isTerminalTaskStatus(status) {
804
804
  return TERMINAL_TASK_STATUSES.includes(status);
805
805
  }
806
- var AssetKeySchema, AssetEntityTypeSchema, AssetProviderRefSchema, AssetKeyMappingSchema, AssetSummarySchema, ModelTierSchema, MODEL_TIERS, ReasoningEffortSchema, LEGACY_MODEL_TO_TIER, DEFAULT_MODEL_TIER_MAP, AgentTaskStatusSchema, TERMINAL_TASK_STATUSES, InboxMessageStatusSchema, InboxMessageSchema, AgentTaskSourceSchema, ProviderNameSchema, FollowUpConfigSchema, RoutingAffinitySchema, AgentTaskSchema, TaskAttachmentKindSchema, attachmentCommonFields, AttachmentInputSchema, TaskAttachmentSchema, UserSchema, IdentityEventTypeSchema, InboxItemTypeSchema, InboxItemStatusSchema, InboxItemStateSchema, FavoriteItemTypeSchema, UserFavoriteSchema, TaskTemplateKindSchema, TaskTemplateSchema, AgentStatusSchema, AgentSchema, AgentCredStatusLiveTestSchema, AgentLatestModelSchema, AgentBedrockStatusSchema, AgentCredStatusSchema, AgentWithTasksSchema, ChangeSourceSchema, VersionableFieldSchema, ContextVersionSchema, ChannelTypeSchema, ChannelSchema, ChannelMessageSchema, ServiceStatusSchema, ServiceSchema, AgentLogEventTypeSchema, ResumeReasonSchema, AgentLogSchema, SessionLogSchema, SessionCostSourceSchema, SessionCostSchema, EventCategorySchema, EventStatusSchema, EventSourceSchema, EventNameSchema, SwarmEventSchema, ScheduledTaskTargetTypeSchema, ScheduledTaskSchema, SwarmConfigScopeSchema, SwarmConfigSchema, RepoGuidelinesSchema, RepoHooksSchema, SwarmRepoSchema, AgentMemoryScopeSchema, AgentMemorySourceSchema, AgentMemorySchema, ActiveSessionSchema, RetryPolicySchema, ExecutorMetaSchema, ValidationResultSchema, StepValidationConfigSchema, SwarmScriptNodeConfigSchema, WorkflowNodeSchema, WorkflowEdgeSchema, WorkflowDefinitionSchema, WorkflowNodePatchSchema, WorkflowPatchSchema, WebhookVerificationSchema, TriggerConfigSchema, CooldownConfigSchema, InputValueSchema, WorkflowTemplateSchema, WorkflowSnapshotSchema, WorkflowSchema, WorkflowVersionSchema, PageContentTypeSchema, PageAuthModeSchema, PageSnapshotSchema, PageSchema, PageVersionSchema, MetricParamSchema, MetricVariableTypeSchema, MetricFormatSchema, MetricVisualizationSchema, MetricQuerySchema, MetricVariableSchema, MetricVizConfigSchema, MetricWidgetSchema, MetricDefinitionSchema, MetricSnapshotSchema, MetricSchema, MetricVersionSchema, WorkflowRunStatusSchema, WorkflowRunSchema, ScriptRunStatusSchema, TERMINAL_SCRIPT_RUN_STATUSES, ScriptRunKindSchema, ScriptRunSchema, ScriptRunListItemSchema, ScriptRunJournalEntrySchema, WorkflowRunStepStatusSchema, WorkflowRunStepSchema, WaitModeSchema, WaitStateStatusSchema, WaitStateRowSchema, PromptTemplateScopeSchema, PromptTemplateStateSchema, PromptTemplateSchema, PromptTemplateHistorySchema, ScriptScopeSchema, ScriptFsModeSchema, ScriptRecordSchema, ScriptVersionRecordSchema, ScriptApiAuthModeSchema, ScriptApiRecordSchema, SkillTypeSchema, SkillScopeSchema, SkillSchema, AgentSkillSchema, SkillWithInstallInfoSchema, SkillFileSchema, McpServerTransportSchema, McpServerScopeSchema, McpAuthMethodSchema, McpServerSchema, AgentMcpServerSchema, McpServerWithInstallInfoSchema, ContextSnapshotEventTypeSchema, ContextFormulaSchema, ContextSnapshotSchema, BudgetScopeSchema, BudgetSchema, PricingProviderSchema, PricingTokenClassSchema, PricingRowSchema, BudgetRefusalCauseSchema, BudgetRefusalNotificationSchema, BudgetRefusedTriggerSchema, KvValueTypeSchema, KV_NAME_REGEX, KvNamespaceSchema, KvKeySchema, KvEntrySchema;
806
+ var AssetKeySchema, AssetEntityTypeSchema, AssetProviderRefSchema, AssetKeyMappingSchema, AssetSummarySchema, ModelTierSchema, MODEL_TIERS, ReasoningEffortSchema, LEGACY_MODEL_TO_TIER, DEFAULT_MODEL_TIER_MAP, AgentTaskStatusSchema, TERMINAL_TASK_STATUSES, InboxMessageStatusSchema, InboxMessageSchema, AgentTaskSourceSchema, ProviderNameSchema, FollowUpConfigSchema, RoutingAffinitySchema, AgentTaskSchema, TaskAttachmentKindSchema, attachmentCommonFields, AttachmentInputSchema, TaskAttachmentSchema, UserSchema, IdentityEventTypeSchema, InboxItemTypeSchema, InboxItemStatusSchema, InboxItemStateSchema, FavoriteItemTypeSchema, UserFavoriteSchema, TaskTemplateKindSchema, TaskTemplateSchema, AgentStatusSchema, AgentAvatarSchema, AgentSchema, AgentCredStatusLiveTestSchema, AgentLatestModelSchema, AgentBedrockStatusSchema, AgentCredStatusSchema, AgentWithTasksSchema, ChangeSourceSchema, VersionableFieldSchema, ContextVersionSchema, ChannelTypeSchema, ChannelSchema, ChannelMessageSchema, ServiceStatusSchema, ServiceSchema, AgentLogEventTypeSchema, ResumeReasonSchema, AgentLogSchema, SessionLogSchema, SessionCostSourceSchema, SessionCostSchema, EventCategorySchema, EventStatusSchema, EventSourceSchema, EventNameSchema, SwarmEventSchema, ScheduledTaskTargetTypeSchema, ScheduledTaskSchema, SwarmConfigScopeSchema, SwarmConfigSchema, RepoGuidelinesSchema, RepoHooksSchema, SwarmRepoSchema, AgentMemoryScopeSchema, AgentMemorySourceSchema, AgentMemorySchema, ActiveSessionSchema, RetryPolicySchema, ExecutorMetaSchema, ValidationResultSchema, StepValidationConfigSchema, SwarmScriptNodeConfigSchema, WorkflowNodeSchema, WorkflowEdgeSchema, WorkflowDefinitionSchema, WorkflowNodePatchSchema, WorkflowPatchSchema, WebhookVerificationSchema, TriggerConfigSchema, CooldownConfigSchema, InputValueSchema, WorkflowTemplateSchema, WorkflowSnapshotSchema, WorkflowSchema, WorkflowVersionSchema, PageContentTypeSchema, PageAuthModeSchema, PageSnapshotSchema, PageSchema, PageVersionSchema, MetricParamSchema, MetricVariableTypeSchema, MetricFormatSchema, MetricVisualizationSchema, MetricQuerySchema, MetricVariableSchema, MetricVizConfigSchema, MetricWidgetSchema, MetricDefinitionSchema, MetricSnapshotSchema, MetricSchema, MetricVersionSchema, WorkflowRunStatusSchema, WorkflowRunSchema, ScriptRunStatusSchema, TERMINAL_SCRIPT_RUN_STATUSES, ScriptRunKindSchema, ScriptRunSchema, ScriptRunListItemSchema, ScriptRunJournalEntrySchema, WorkflowRunStepStatusSchema, WorkflowRunStepSchema, WaitModeSchema, WaitStateStatusSchema, WaitStateRowSchema, PromptTemplateScopeSchema, PromptTemplateStateSchema, PromptTemplateSchema, PromptTemplateHistorySchema, ScriptScopeSchema, ScriptFsModeSchema, ScriptRecordSchema, ScriptVersionRecordSchema, ScriptApiAuthModeSchema, ScriptApiRecordSchema, SkillTypeSchema, SkillScopeSchema, SkillSchema, AgentSkillSchema, SkillWithInstallInfoSchema, SkillFileSchema, McpServerTransportSchema, McpServerScopeSchema, McpAuthMethodSchema, McpServerSchema, AgentMcpServerSchema, McpServerWithInstallInfoSchema, ContextSnapshotEventTypeSchema, ContextFormulaSchema, ContextSnapshotSchema, BudgetScopeSchema, BudgetSchema, PricingProviderSchema, PricingTokenClassSchema, PricingRowSchema, BudgetRefusalCauseSchema, BudgetRefusalNotificationSchema, BudgetRefusedTriggerSchema, KvValueTypeSchema, KV_NAME_REGEX, KvNamespaceSchema, KvKeySchema, KvEntrySchema;
807
807
  var init_types = __esm(() => {
808
808
  init_zod();
809
809
  init_key();
@@ -968,6 +968,7 @@ var init_types = __esm(() => {
968
968
  agentId: uuid().nullable(),
969
969
  creatorAgentId: uuid().optional(),
970
970
  task: string().min(1),
971
+ title: string().optional(),
971
972
  status: AgentTaskStatusSchema,
972
973
  source: AgentTaskSourceSchema.default("mcp"),
973
974
  taskType: string().max(50).optional(),
@@ -1166,6 +1167,13 @@ var init_types = __esm(() => {
1166
1167
  createdAt: string()
1167
1168
  });
1168
1169
  AgentStatusSchema = _enum(["idle", "busy", "offline", "waiting_for_credentials"]);
1170
+ AgentAvatarSchema = discriminatedUnion("type", [
1171
+ object({
1172
+ type: literal("lucide"),
1173
+ icon: string().regex(/^[a-z0-9-]+$/).max(64),
1174
+ color: string().regex(/^#[0-9a-fA-F]{6}$/).optional()
1175
+ })
1176
+ ]);
1169
1177
  AgentSchema = object({
1170
1178
  id: uuid(),
1171
1179
  name: string().min(1),
@@ -1187,6 +1195,7 @@ var init_types = __esm(() => {
1187
1195
  harnessProvider: ProviderNameSchema.nullable().optional(),
1188
1196
  credentialMissing: array(string()).nullable().optional(),
1189
1197
  credStatus: lazy(() => AgentCredStatusSchema).nullable().optional(),
1198
+ avatar: lazy(() => AgentAvatarSchema).nullable().optional(),
1190
1199
  createdAt: exports_iso.datetime().default(() => new Date().toISOString()),
1191
1200
  lastUpdatedAt: exports_iso.datetime().default(() => new Date().toISOString())
1192
1201
  });
@@ -3078,7 +3087,6 @@ As a worker agent of the swarm, you are responsible for executing tasks assigned
3078
3087
 
3079
3088
  - \`store-progress\`: Save your work progress on tasks (critical!)
3080
3089
  - \`task-action\`: Manage tasks - claim from pool, release, accept/reject offered tasks
3081
- - \`read-messages\`: Read messages from the lead or other workers
3082
3090
 
3083
3091
  #### Completing Tasks
3084
3092
 
@@ -3108,6 +3116,18 @@ curl -H "Authorization: Bearer lin_oauth_abc123..." https://api.example.com
3108
3116
  \`\`\`
3109
3117
 
3110
3118
  The same applies to \`store-progress\` output — never include raw secret values in progress text, output, or failure reasons.
3119
+ `,
3120
+ variables: [],
3121
+ category: "system"
3122
+ });
3123
+ registerTemplate({
3124
+ eventType: "system.agent.messaging",
3125
+ header: "",
3126
+ defaultBody: `
3127
+ #### Swarm Messaging
3128
+
3129
+ - \`post-message\`: Post a message to a swarm channel (use \`mentions\` to notify specific agents, \`replyTo\` to thread)
3130
+ - \`read-messages\`: Read messages from the lead or other agents (filters: \`unreadOnly\`, \`mentionsOnly\`)
3111
3131
  `,
3112
3132
  variables: [],
3113
3133
  category: "system"
@@ -4417,6 +4437,7 @@ __export(exports_db, {
4417
4437
  updateWorkflow: () => updateWorkflow,
4418
4438
  updateUser: () => updateUser,
4419
4439
  updateTaskVcs: () => updateTaskVcs,
4440
+ updateTaskTitle: () => updateTaskTitle,
4420
4441
  updateTaskProgress: () => updateTaskProgress,
4421
4442
  updateTaskClaudeSessionId: () => updateTaskClaudeSessionId,
4422
4443
  updateSwarmRepo: () => updateSwarmRepo,
@@ -5035,6 +5056,16 @@ function seedContextVersions() {
5035
5056
  }
5036
5057
  }
5037
5058
  }
5059
+ function parseAgentAvatar(raw) {
5060
+ if (!raw)
5061
+ return null;
5062
+ try {
5063
+ const parsed = AgentAvatarSchema.safeParse(JSON.parse(raw));
5064
+ return parsed.success ? parsed.data : null;
5065
+ } catch {
5066
+ return null;
5067
+ }
5068
+ }
5038
5069
  function rowToAgent(row, slim = false) {
5039
5070
  const base = {
5040
5071
  id: row.id,
@@ -5052,7 +5083,8 @@ function rowToAgent(row, slim = false) {
5052
5083
  createdAt: row.createdAt,
5053
5084
  lastUpdatedAt: row.lastUpdatedAt,
5054
5085
  credentialMissing: row.credentialMissing ? JSON.parse(row.credentialMissing) : null,
5055
- credStatus: row.cred_status ? JSON.parse(row.cred_status) : null
5086
+ credStatus: row.cred_status ? JSON.parse(row.cred_status) : null,
5087
+ avatar: parseAgentAvatar(row.avatar)
5056
5088
  };
5057
5089
  if (slim)
5058
5090
  return base;
@@ -5279,6 +5311,7 @@ function rowToAgentTask(row) {
5279
5311
  agentId: row.agentId,
5280
5312
  creatorAgentId: row.creatorAgentId ?? undefined,
5281
5313
  task: row.task,
5314
+ title: row.title ?? undefined,
5282
5315
  status: row.status,
5283
5316
  source: row.source,
5284
5317
  taskType: row.taskType ?? undefined,
@@ -5353,6 +5386,7 @@ function rowToAgentTaskSummary(row) {
5353
5386
  agentId: t.agentId,
5354
5387
  creatorAgentId: t.creatorAgentId,
5355
5388
  task: previewText(t.task, TASK_PREVIEW_LENGTH),
5389
+ title: t.title,
5356
5390
  status: t.status,
5357
5391
  source: t.source,
5358
5392
  taskType: t.taskType,
@@ -5535,6 +5569,11 @@ function updateTaskClaudeSessionId(taskId, claudeSessionId, provider, providerMe
5535
5569
  const row = getDb().prepare(`UPDATE agent_tasks SET ${setClauses.join(", ")} WHERE id = ? RETURNING *`).get(...params);
5536
5570
  return row ? rowToAgentTask(row) : null;
5537
5571
  }
5572
+ function updateTaskTitle(taskId, title) {
5573
+ const normalized = title === null ? null : title.trim() || null;
5574
+ const row = getDb().prepare("UPDATE agent_tasks SET title = ? WHERE id = ? RETURNING *").get(normalized, taskId);
5575
+ return row ? rowToAgentTask(row) : null;
5576
+ }
5538
5577
  function updateTaskVcs(taskId, vcs) {
5539
5578
  const row = getDb().prepare(`UPDATE agent_tasks
5540
5579
  SET vcsProvider = ?, vcsRepo = ?, vcsNumber = ?, vcsUrl = ?, lastUpdatedAt = ?
@@ -7182,6 +7221,8 @@ function updateAgentProfile(id, updates, meta) {
7182
7221
  previousVersionId: latestVersion?.id ?? null
7183
7222
  });
7184
7223
  }
7224
+ const avatarProvided = Object.hasOwn(updates, "avatar");
7225
+ const avatarJson = updates.avatar ? JSON.stringify(updates.avatar) : null;
7185
7226
  const now = new Date().toISOString();
7186
7227
  const row = database.prepare(`UPDATE agents SET
7187
7228
  description = COALESCE(?, description),
@@ -7193,8 +7234,9 @@ function updateAgentProfile(id, updates, meta) {
7193
7234
  setupScript = COALESCE(?, setupScript),
7194
7235
  toolsMd = COALESCE(?, toolsMd),
7195
7236
  heartbeatMd = COALESCE(?, heartbeatMd),
7237
+ avatar = CASE WHEN ? = 1 THEN ? ELSE avatar END,
7196
7238
  lastUpdatedAt = ?
7197
- WHERE id = ? RETURNING *`).get(updates.description ?? null, updates.role ?? null, updates.capabilities ? JSON.stringify(updates.capabilities) : null, updates.claudeMd ?? null, updates.soulMd ?? null, updates.identityMd ?? null, updates.setupScript ?? null, updates.toolsMd ?? null, updates.heartbeatMd ?? null, now, id);
7239
+ WHERE id = ? RETURNING *`).get(updates.description ?? null, updates.role ?? null, updates.capabilities ? JSON.stringify(updates.capabilities) : null, updates.claudeMd ?? null, updates.soulMd ?? null, updates.identityMd ?? null, updates.setupScript ?? null, updates.toolsMd ?? null, updates.heartbeatMd ?? null, avatarProvided ? 1 : 0, avatarJson, now, id);
7198
7240
  return row ? rowToAgent(row) : null;
7199
7241
  })();
7200
7242
  }
@@ -10762,8 +10804,9 @@ function listRecentSessions(opts) {
10762
10804
  params.push(...sources);
10763
10805
  }
10764
10806
  if (q && q.length > 0) {
10765
- conditions.push("lower(r.task) LIKE ?");
10766
- params.push(`%${q.toLowerCase()}%`);
10807
+ conditions.push("(lower(r.task) LIKE ? OR lower(COALESCE(r.title, '')) LIKE ?)");
10808
+ const like = `%${q.toLowerCase()}%`;
10809
+ params.push(like, like);
10767
10810
  }
10768
10811
  if (requestedByUserId) {
10769
10812
  conditions.push("r.requestedByUserId = ?");
@@ -10835,8 +10878,9 @@ function countSessions(opts) {
10835
10878
  params.push(...sources);
10836
10879
  }
10837
10880
  if (q && q.length > 0) {
10838
- conditions.push("lower(task) LIKE ?");
10839
- params.push(`%${q.toLowerCase()}%`);
10881
+ conditions.push("(lower(task) LIKE ? OR lower(COALESCE(title, '')) LIKE ?)");
10882
+ const like = `%${q.toLowerCase()}%`;
10883
+ params.push(like, like);
10840
10884
  }
10841
10885
  if (requestedByUserId) {
10842
10886
  conditions.push("requestedByUserId = ?");
@@ -11517,4 +11561,4 @@ var init_db = __esm(() => {
11517
11561
  };
11518
11562
  });
11519
11563
 
11520
- export { normalizeAssetKey, parseAssetKey, canWriteAssetKey, init_key, interpolate, deepInterpolate, init_template, registerTemplate, getTemplateDefinition, getAllTemplateDefinitions, init_registry, configureHttpResolver, resolveTemplate, resolveTemplateAsync, init_resolver, slackContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, init_context_key, checkSlackRoutingCoherence, init_slack_routing, initTelemetry, telemetry, init_telemetry, AssetKeySchema, AssetEntityTypeSchema, ModelTierSchema, ReasoningEffortSchema, splitLegacyModelAlias, resolveTaskModelSelection, AgentTaskStatusSchema, isTerminalTaskStatus, AgentTaskSourceSchema, ProviderNameSchema, FollowUpConfigSchema, AgentTaskSchema, AttachmentInputSchema, TaskAttachmentSchema, InboxItemTypeSchema, InboxItemStatusSchema, FavoriteItemTypeSchema, TaskTemplateKindSchema, AgentSchema, AgentLatestModelSchema, AgentCredStatusSchema, ChannelTypeSchema, ChannelSchema, ChannelMessageSchema, ServiceStatusSchema, ServiceSchema, ResumeReasonSchema, AgentLogSchema, EventCategorySchema, EventStatusSchema, EventSourceSchema, EventNameSchema, ScheduledTaskTargetTypeSchema, SwarmConfigScopeSchema, SwarmConfigSchema, RepoGuidelinesSchema, RepoHooksSchema, SwarmRepoSchema, AgentMemoryScopeSchema, AgentMemorySourceSchema, AgentMemorySchema, WorkflowDefinitionSchema, WorkflowNodePatchSchema, WorkflowPatchSchema, TriggerConfigSchema, CooldownConfigSchema, InputValueSchema, PageContentTypeSchema, PageAuthModeSchema, MetricDefinitionSchema, MetricVersionSchema, WorkflowRunStatusSchema, ScriptRunStatusSchema, TERMINAL_SCRIPT_RUN_STATUSES, PromptTemplateScopeSchema, PromptTemplateStateSchema, PromptTemplateSchema, PromptTemplateHistorySchema, ScriptScopeSchema, ScriptFsModeSchema, ScriptApiAuthModeSchema, ContextSnapshotEventTypeSchema, ContextFormulaSchema, BudgetScopeSchema, BudgetSchema, PricingProviderSchema, PricingTokenClassSchema, PricingRowSchema, BudgetRefusalCauseSchema, BudgetRefusalNotificationSchema, KvValueTypeSchema, KvNamespaceSchema, KvKeySchema, KvEntrySchema, init_types, setRequestAuth, getRequestAuth, getCurrentRequestAuth, init_request_auth_context, auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, DEFAULT_CREDENTIAL_BINDINGS, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, normalizeDate, normalizeDateRequired, init_date_utils, init_session_templates, init_templates, init_templates2 as init_templates1, isReservedConfigKey, reservedKeyError, validateConfigValue, init_swarm_config_guard, onTaskStarted, init_task_lifecycle_events, generateDefaultClaudeMd, generateDefaultSoulMd, generateDefaultIdentityMd, generateDefaultToolsMd, init_defaults, isSqliteVecAvailable, initDb, getDb, closeDb, computeContentHash, createContextVersion, getLatestContextVersion, getContextVersion, getContextVersionHistory, agentQueries, updateAgentCredentialState, createAgent, getAgentById, getAllAgents, getLeadAgent, updateAgentStatus, updateAgentMaxTasks, updateAgentProvider, setAgentHarnessProvider, updateAgentCredStatus, listAgentsWithCredStatusByProvider, getAgentHarnessProviders, updateAgentActivity, MAX_EMPTY_POLLS, incrementEmptyPollCount, resetEmptyPollCount, shouldBlockPolling, deleteAgent, getActiveTaskCount, hasCapacity, getRemainingCapacity, updateAgentStatusFromCapacity, isPoolAffinityEnforcementEnabled, buildRoutingAffinityFromAgent, isAgentEligibleForTask, taskQueries, createTask, getPendingTaskForAgent, assignUnassignedTaskPending, startTask, getTaskById, markTaskSlackReplySent, setSlackMessageTracking, getChildTasks, hasNonTerminalResumeChild, hasNonTerminalRerouteDecisionChild, updateTaskClaudeSessionId, updateTaskVcs, getTasksByAgentId, getAgentCurrentTask, getTasksByStatus, findTaskByVcs, findTaskByGitHub, getAllTasks, getTasksCount, getTaskStats, getCompletedSlackTasks, getRecentlyFinishedWorkerTasks, markTasksNotified, resetTasksNotified, getInProgressSlackTasks, getInProgressTasksByContextKey, findExistingLinearTrackerContextWork, getLatestTaskByContextKey, getAgentWorkingOnThread, getLatestActiveTaskInThread, getMostRecentTaskInThread, findCompletedTaskInThread, findRecentCancelledTaskInThread, completeTask, failTask, cancelTask, supersedeTask, backfillSupersedeTaskResumeTaskId, pauseTask, resumeTask, getPausedTasksForAgent, getOrphanedInProgressTasksForAgent, resetOrphanedInProgressTasksForAgent, getRecentlyCancelledTasksForAgent, deleteTask, updateTaskProgress, insertTaskAttachment, getAssetKeyMappingByProvider, upsertAssetKeyMapping, getAssetKeyMapping, listAssetSummaries, moveAssetKey, deleteTaskAttachment, replaceTaskAttachment, getTaskAttachments, getAgentWithTasks, getAllAgentsWithTasks, logQueries, createLogEntry, getLogsByAgentId, getLogsByTaskId, getLogsByTaskIdChronological, getLogsByEventType, getAllLogs, findRecentSimilarTasks, createTaskExtended, claimTask, releaseTask, acceptTask, rejectTask, moveTaskToBacklog, moveTaskFromBacklog, releaseStaleReviewingTasks, getOfferedTasksForAgent, claimOfferedTask, getUnassignedTasksCount, getUnassignedTaskIds, getUnassignedTaskIdsForAgent, checkDependencies, getDependentTasks, cascadeFailDependents, updateAgentProfile, updateAgentName, createChannel, getMessageById, getChannelById, getChannelByName, getAllChannels, deleteChannel, postMessage, getChannelMessages, updateReadState, getLastReadAt, getUnreadMessages, getMentionsForAgent, getInboxSummary, claimMentions, releaseMentionProcessing, releaseStaleMentionProcessing, createService, getServiceById, getServiceByAgentAndName, getServicesByAgentId, getAllServices, updateServiceStatus, deleteService, upsertService, deleteServicesByAgentId, sessionLogQueries, createSessionLogs, getSessionLogsByTaskId, getSessionLogsBySession, createSessionCost, getSessionCostsByTaskId, getSessionCostsByAgentId, getAllSessionCosts, getSessionCostsFiltered, getSessionCostSummary, getDashboardCostSummary, createInboxMessage, getInboxMessageById, getUnreadInboxMessages, claimInboxMessages, markInboxMessageRead, markInboxMessageResponded, markInboxMessageDelegated, releaseStaleProcessingInbox, getConcurrentContext, getScheduledTasks, getScheduledTaskById, getScheduledTaskByName, createScheduledTask, updateScheduledTask, deleteScheduledTask, getDueScheduledTasks, autoEncryptLegacyPlaintextSecrets, maskSecrets, getSwarmConfigs, getInjectableGlobalConfigs, getSwarmConfigById, getSwarmConfigLookupById, upsertSwarmConfig, deleteSwarmConfig, deleteSwarmConfigByKey, getResolvedConfig, getSwarmRepos, getSwarmRepoById, getSwarmRepoByName, getSwarmRepoByUrl, createSwarmRepo, updateSwarmRepo, deleteSwarmRepo, getAgentMailInboxMapping, getAgentMailInboxMappingsByAgent, getAllAgentMailInboxMappings, createAgentMailInboxMapping, deleteAgentMailInboxMapping, findTaskByAgentMailThread, insertActiveSession, deleteActiveSession, deleteActiveSessionById, getActiveSessions, heartbeatActiveSession, cleanupStaleSessions, cleanupAgentSessions, updateActiveSessionProviderSessionId, getActiveSessionForTask, reassociateSessionLogs, getStalledInProgressTasks, getStalePinnedResumes, failPendingResumeIfUnclaimed, getIdleWorkersWithCapacity, getUnassignedPoolTasks, getStaleUnassignedAffinityTasks, getRecentFailedTasks, getRecentCompletedCount, getRecentFailedCount, createWorkflow, getWorkflow, listWorkflows, updateWorkflow, deleteWorkflow, getWorkflowsByScheduleId, createWorkflowRun, getWorkflowRun, updateWorkflowRun, listWorkflowRuns, createWorkflowRunStep, getWorkflowRunStep, updateWorkflowRunStep, getWorkflowRunStepsByRunId, getStuckWorkflowRuns, getLastSuccessfulRun, getLastRunStart, getRetryableSteps, getCompletedStepNodeIds, getTaskByWorkflowRunStepId, getStepByIdempotencyKey, getStepCountForNode, getLatestStepForNode, createWorkflowVersion, getWorkflowVersions, getWorkflowVersion, createPage, getPage, getPageBySlug, getLatestPageBySlug, listPagesByAgent, listAllPages, countAllPages, countPagesByAgent, updatePage, deletePage, incrementPageViewCount, createPageVersion, getPageVersions, getPageVersion, createMetric, getMetric, getMetricBySlug, listMetricsByAgent, listAllMetrics, countAllMetrics, countMetricsByAgent, updateMetric, deleteMetric, createMetricVersion, getMetricVersions, getMetricVersion, getPromptTemplates, getPromptTemplateById, upsertPromptTemplate, deletePromptTemplate, resetPromptTemplateToDefault, getPromptTemplateHistory, resolvePromptTemplate, checkoutPromptTemplate, getAllChannelActivityCursors, getChannelActivityCursor, upsertChannelActivityCursor, createApprovalRequest, getApprovalRequestById, resolveApprovalRequest, updateApprovalRequestNotifications, listApprovalRequests, getStuckApprovalRuns, getApprovalRequestByStepId, getExpiredPendingApprovals, createWaitState, getWaitStateById, getWaitStateByStepId, getDueWaitStates, getPendingEventWaitNames, getPendingWaitsByEvent, resolveWaitState, getStuckWaitRuns, SKILL_FILE_LIMITS, normalizeSkillFilePath, createSkill, updateSkill, listSkillFileManifest, getSkillFiles, getSkillFile, upsertSkillFile, upsertSkillFiles, deleteSkillFile, deleteSkill, getSkillById, getSkillByName, listSkills, searchSkills, installSkill, getSystemDefaultSkills, installSystemDefaultSkillsForAgent, uninstallSkill, getAgentSkills, toggleAgentSkill, createMcpServer, updateMcpServer, deleteMcpServer, getMcpServerById, getMcpServerByName, listMcpServers, installMcpServer, uninstallMcpServer, getAgentMcpServers, createContextSnapshot, getContextSnapshotsByTaskId, getContextSnapshotsBySessionId, getContextSummaryByTaskId, getAvailableKeyIndices, recordKeyUsage, markKeyRateLimited, recordKeyRateLimitWindows, setApiKeyName, clearKeyRateLimit, getKeyStatuses, getKeyCostSummary, getUserById, getAllUsers, createUser, updateUser, deleteUser, listInboxState, upsertInboxState, listFavorites, listUserFavorites, getFavoriteItemIdSet, setFavorite, setUserFavorite, withFavoriteFlags, listTaskTemplates, getRootTaskChain, listRecentSessions, countSessions, getBudget, getBudgets, upsertBudget, deleteBudget, getAllPricingRows, getPricingRows, getActivePricingRow, insertPricingRow, deletePricingRow, getDailySpendForAgent, getDailySpendGlobal, getDailySpendForUser, recordBudgetRefusalNotification, getBudgetRefusalNotification, getRecentBudgetRefusalNotifications, hasBudgetRefusalNotificationToday, setBudgetRefusalFollowUpTaskId, getLiveAgentCounts, getInstanceActivity, getSwarmMetrics, hasFirstCompletedTask, getKv, upsertKv, deleteKv, KvTypeCollisionError, incrKv, listKv, countKv, createScriptRun, recordInlineScriptRun, getScriptRun, getScriptRunByIdempotencyKey, listScriptRuns, countScriptRuns, countActiveScriptRuns, updateScriptRun, getRunningScriptRuns, getScriptRunJournalStep, upsertScriptRunJournalStep, listScriptRunJournalSteps, countScriptRunJournalSteps, countScriptRunJournalAgentTaskSteps, exports_db, init_db };
11564
+ export { normalizeAssetKey, parseAssetKey, canWriteAssetKey, init_key, interpolate, deepInterpolate, init_template, registerTemplate, getTemplateDefinition, getAllTemplateDefinitions, init_registry, configureHttpResolver, resolveTemplate, resolveTemplateAsync, init_resolver, slackContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, init_context_key, checkSlackRoutingCoherence, init_slack_routing, initTelemetry, telemetry, init_telemetry, AssetKeySchema, AssetEntityTypeSchema, ModelTierSchema, ReasoningEffortSchema, splitLegacyModelAlias, resolveTaskModelSelection, AgentTaskStatusSchema, isTerminalTaskStatus, AgentTaskSourceSchema, ProviderNameSchema, FollowUpConfigSchema, AgentTaskSchema, AttachmentInputSchema, TaskAttachmentSchema, InboxItemTypeSchema, InboxItemStatusSchema, FavoriteItemTypeSchema, TaskTemplateKindSchema, AgentAvatarSchema, AgentSchema, AgentLatestModelSchema, AgentCredStatusSchema, ChannelTypeSchema, ChannelSchema, ChannelMessageSchema, ServiceStatusSchema, ServiceSchema, ResumeReasonSchema, AgentLogSchema, EventCategorySchema, EventStatusSchema, EventSourceSchema, EventNameSchema, ScheduledTaskTargetTypeSchema, SwarmConfigScopeSchema, SwarmConfigSchema, RepoGuidelinesSchema, RepoHooksSchema, SwarmRepoSchema, AgentMemoryScopeSchema, AgentMemorySourceSchema, AgentMemorySchema, WorkflowDefinitionSchema, WorkflowNodePatchSchema, WorkflowPatchSchema, TriggerConfigSchema, CooldownConfigSchema, InputValueSchema, PageContentTypeSchema, PageAuthModeSchema, MetricDefinitionSchema, MetricVersionSchema, WorkflowRunStatusSchema, ScriptRunStatusSchema, TERMINAL_SCRIPT_RUN_STATUSES, PromptTemplateScopeSchema, PromptTemplateStateSchema, PromptTemplateSchema, PromptTemplateHistorySchema, ScriptScopeSchema, ScriptFsModeSchema, ScriptApiAuthModeSchema, ContextSnapshotEventTypeSchema, ContextFormulaSchema, BudgetScopeSchema, BudgetSchema, PricingProviderSchema, PricingTokenClassSchema, PricingRowSchema, BudgetRefusalCauseSchema, BudgetRefusalNotificationSchema, KvValueTypeSchema, KvNamespaceSchema, KvKeySchema, KvEntrySchema, init_types, setRequestAuth, getRequestAuth, getCurrentRequestAuth, init_request_auth_context, auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, DEFAULT_CREDENTIAL_BINDINGS, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, normalizeDate, normalizeDateRequired, init_date_utils, init_session_templates, init_templates, init_templates2 as init_templates1, isReservedConfigKey, reservedKeyError, validateConfigValue, init_swarm_config_guard, onTaskStarted, init_task_lifecycle_events, generateDefaultClaudeMd, generateDefaultSoulMd, generateDefaultIdentityMd, generateDefaultToolsMd, init_defaults, isSqliteVecAvailable, initDb, getDb, closeDb, computeContentHash, createContextVersion, getLatestContextVersion, getContextVersion, getContextVersionHistory, agentQueries, updateAgentCredentialState, createAgent, getAgentById, getAllAgents, getLeadAgent, updateAgentStatus, updateAgentMaxTasks, updateAgentProvider, setAgentHarnessProvider, updateAgentCredStatus, listAgentsWithCredStatusByProvider, getAgentHarnessProviders, updateAgentActivity, MAX_EMPTY_POLLS, incrementEmptyPollCount, resetEmptyPollCount, shouldBlockPolling, deleteAgent, getActiveTaskCount, hasCapacity, getRemainingCapacity, updateAgentStatusFromCapacity, isPoolAffinityEnforcementEnabled, buildRoutingAffinityFromAgent, isAgentEligibleForTask, taskQueries, createTask, getPendingTaskForAgent, assignUnassignedTaskPending, startTask, getTaskById, markTaskSlackReplySent, setSlackMessageTracking, getChildTasks, hasNonTerminalResumeChild, hasNonTerminalRerouteDecisionChild, updateTaskClaudeSessionId, updateTaskTitle, updateTaskVcs, getTasksByAgentId, getAgentCurrentTask, getTasksByStatus, findTaskByVcs, findTaskByGitHub, getAllTasks, getTasksCount, getTaskStats, getCompletedSlackTasks, getRecentlyFinishedWorkerTasks, markTasksNotified, resetTasksNotified, getInProgressSlackTasks, getInProgressTasksByContextKey, findExistingLinearTrackerContextWork, getLatestTaskByContextKey, getAgentWorkingOnThread, getLatestActiveTaskInThread, getMostRecentTaskInThread, findCompletedTaskInThread, findRecentCancelledTaskInThread, completeTask, failTask, cancelTask, supersedeTask, backfillSupersedeTaskResumeTaskId, pauseTask, resumeTask, getPausedTasksForAgent, getOrphanedInProgressTasksForAgent, resetOrphanedInProgressTasksForAgent, getRecentlyCancelledTasksForAgent, deleteTask, updateTaskProgress, insertTaskAttachment, getAssetKeyMappingByProvider, upsertAssetKeyMapping, getAssetKeyMapping, listAssetSummaries, moveAssetKey, deleteTaskAttachment, replaceTaskAttachment, getTaskAttachments, getAgentWithTasks, getAllAgentsWithTasks, logQueries, createLogEntry, getLogsByAgentId, getLogsByTaskId, getLogsByTaskIdChronological, getLogsByEventType, getAllLogs, findRecentSimilarTasks, createTaskExtended, claimTask, releaseTask, acceptTask, rejectTask, moveTaskToBacklog, moveTaskFromBacklog, releaseStaleReviewingTasks, getOfferedTasksForAgent, claimOfferedTask, getUnassignedTasksCount, getUnassignedTaskIds, getUnassignedTaskIdsForAgent, checkDependencies, getDependentTasks, cascadeFailDependents, updateAgentProfile, updateAgentName, createChannel, getMessageById, getChannelById, getChannelByName, getAllChannels, deleteChannel, postMessage, getChannelMessages, updateReadState, getLastReadAt, getUnreadMessages, getMentionsForAgent, getInboxSummary, claimMentions, releaseMentionProcessing, releaseStaleMentionProcessing, createService, getServiceById, getServiceByAgentAndName, getServicesByAgentId, getAllServices, updateServiceStatus, deleteService, upsertService, deleteServicesByAgentId, sessionLogQueries, createSessionLogs, getSessionLogsByTaskId, getSessionLogsBySession, createSessionCost, getSessionCostsByTaskId, getSessionCostsByAgentId, getAllSessionCosts, getSessionCostsFiltered, getSessionCostSummary, getDashboardCostSummary, createInboxMessage, getInboxMessageById, getUnreadInboxMessages, claimInboxMessages, markInboxMessageRead, markInboxMessageResponded, markInboxMessageDelegated, releaseStaleProcessingInbox, getConcurrentContext, getScheduledTasks, getScheduledTaskById, getScheduledTaskByName, createScheduledTask, updateScheduledTask, deleteScheduledTask, getDueScheduledTasks, autoEncryptLegacyPlaintextSecrets, maskSecrets, getSwarmConfigs, getInjectableGlobalConfigs, getSwarmConfigById, getSwarmConfigLookupById, upsertSwarmConfig, deleteSwarmConfig, deleteSwarmConfigByKey, getResolvedConfig, getSwarmRepos, getSwarmRepoById, getSwarmRepoByName, getSwarmRepoByUrl, createSwarmRepo, updateSwarmRepo, deleteSwarmRepo, getAgentMailInboxMapping, getAgentMailInboxMappingsByAgent, getAllAgentMailInboxMappings, createAgentMailInboxMapping, deleteAgentMailInboxMapping, findTaskByAgentMailThread, insertActiveSession, deleteActiveSession, deleteActiveSessionById, getActiveSessions, heartbeatActiveSession, cleanupStaleSessions, cleanupAgentSessions, updateActiveSessionProviderSessionId, getActiveSessionForTask, reassociateSessionLogs, getStalledInProgressTasks, getStalePinnedResumes, failPendingResumeIfUnclaimed, getIdleWorkersWithCapacity, getUnassignedPoolTasks, getStaleUnassignedAffinityTasks, getRecentFailedTasks, getRecentCompletedCount, getRecentFailedCount, createWorkflow, getWorkflow, listWorkflows, updateWorkflow, deleteWorkflow, getWorkflowsByScheduleId, createWorkflowRun, getWorkflowRun, updateWorkflowRun, listWorkflowRuns, createWorkflowRunStep, getWorkflowRunStep, updateWorkflowRunStep, getWorkflowRunStepsByRunId, getStuckWorkflowRuns, getLastSuccessfulRun, getLastRunStart, getRetryableSteps, getCompletedStepNodeIds, getTaskByWorkflowRunStepId, getStepByIdempotencyKey, getStepCountForNode, getLatestStepForNode, createWorkflowVersion, getWorkflowVersions, getWorkflowVersion, createPage, getPage, getPageBySlug, getLatestPageBySlug, listPagesByAgent, listAllPages, countAllPages, countPagesByAgent, updatePage, deletePage, incrementPageViewCount, createPageVersion, getPageVersions, getPageVersion, createMetric, getMetric, getMetricBySlug, listMetricsByAgent, listAllMetrics, countAllMetrics, countMetricsByAgent, updateMetric, deleteMetric, createMetricVersion, getMetricVersions, getMetricVersion, getPromptTemplates, getPromptTemplateById, upsertPromptTemplate, deletePromptTemplate, resetPromptTemplateToDefault, getPromptTemplateHistory, resolvePromptTemplate, checkoutPromptTemplate, getAllChannelActivityCursors, getChannelActivityCursor, upsertChannelActivityCursor, createApprovalRequest, getApprovalRequestById, resolveApprovalRequest, updateApprovalRequestNotifications, listApprovalRequests, getStuckApprovalRuns, getApprovalRequestByStepId, getExpiredPendingApprovals, createWaitState, getWaitStateById, getWaitStateByStepId, getDueWaitStates, getPendingEventWaitNames, getPendingWaitsByEvent, resolveWaitState, getStuckWaitRuns, SKILL_FILE_LIMITS, normalizeSkillFilePath, createSkill, updateSkill, listSkillFileManifest, getSkillFiles, getSkillFile, upsertSkillFile, upsertSkillFiles, deleteSkillFile, deleteSkill, getSkillById, getSkillByName, listSkills, searchSkills, installSkill, getSystemDefaultSkills, installSystemDefaultSkillsForAgent, uninstallSkill, getAgentSkills, toggleAgentSkill, createMcpServer, updateMcpServer, deleteMcpServer, getMcpServerById, getMcpServerByName, listMcpServers, installMcpServer, uninstallMcpServer, getAgentMcpServers, createContextSnapshot, getContextSnapshotsByTaskId, getContextSnapshotsBySessionId, getContextSummaryByTaskId, getAvailableKeyIndices, recordKeyUsage, markKeyRateLimited, recordKeyRateLimitWindows, setApiKeyName, clearKeyRateLimit, getKeyStatuses, getKeyCostSummary, getUserById, getAllUsers, createUser, updateUser, deleteUser, listInboxState, upsertInboxState, listFavorites, listUserFavorites, getFavoriteItemIdSet, setFavorite, setUserFavorite, withFavoriteFlags, listTaskTemplates, getRootTaskChain, listRecentSessions, countSessions, getBudget, getBudgets, upsertBudget, deleteBudget, getAllPricingRows, getPricingRows, getActivePricingRow, insertPricingRow, deletePricingRow, getDailySpendForAgent, getDailySpendGlobal, getDailySpendForUser, recordBudgetRefusalNotification, getBudgetRefusalNotification, getRecentBudgetRefusalNotifications, hasBudgetRefusalNotificationToday, setBudgetRefusalFollowUpTaskId, getLiveAgentCounts, getInstanceActivity, getSwarmMetrics, hasFirstCompletedTask, getKv, upsertKv, deleteKv, KvTypeCollisionError, incrKv, listKv, countKv, createScriptRun, recordInlineScriptRun, getScriptRun, getScriptRunByIdempotencyKey, listScriptRuns, countScriptRuns, countActiveScriptRuns, updateScriptRun, getRunningScriptRuns, getScriptRunJournalStep, upsertScriptRunJournalStep, listScriptRunJournalSteps, countScriptRunJournalSteps, countScriptRunJournalAgentTaskSteps, exports_db, init_db };
@@ -7,7 +7,7 @@ import {
7
7
  init_date_utils,
8
8
  init_db,
9
9
  normalizeDateRequired
10
- } from "./cli-383wyw2f.js";
10
+ } from "./cli-0df2g86x.js";
11
11
 
12
12
  // src/be/db-queries/oauth.ts
13
13
  init_crypto();
@@ -27,7 +27,7 @@ import {
27
27
  getTaskById,
28
28
  init_db,
29
29
  setSlackMessageTracking
30
- } from "./cli-383wyw2f.js";
30
+ } from "./cli-0df2g86x.js";
31
31
  import {
32
32
  require_receiver,
33
33
  require_sender,
@@ -55073,13 +55073,13 @@ async function initSlackApp() {
55073
55073
  socketMode: true,
55074
55074
  logLevel: import_bolt.LogLevel.DEBUG
55075
55075
  });
55076
- const { registerMessageHandler } = await import("./handlers-yjyafdwk.js");
55077
- const { registerCommandHandler } = await import("./commands-w1swgcgg.js");
55078
- const { registerActionHandlers } = await import("./actions-rym7jyg2.js");
55076
+ const { registerMessageHandler } = await import("./handlers-fmfe2343.js");
55077
+ const { registerCommandHandler } = await import("./commands-cxxye5e4.js");
55078
+ const { registerActionHandlers } = await import("./actions-mwshtkf7.js");
55079
55079
  registerMessageHandler(app);
55080
55080
  registerCommandHandler(app);
55081
55081
  registerActionHandlers(app);
55082
- const { createAssistant } = await import("./assistant-8sd2b21b.js");
55082
+ const { createAssistant } = await import("./assistant-tg7dhfj8.js");
55083
55083
  app.assistant(createAssistant());
55084
55084
  return app;
55085
55085
  }
@@ -6,7 +6,7 @@ import {
6
6
  getDb,
7
7
  init_db,
8
8
  isSqliteVecAvailable
9
- } from "./cli-383wyw2f.js";
9
+ } from "./cli-0df2g86x.js";
10
10
  import {
11
11
  __esm,
12
12
  __export,
@@ -1,14 +1,15 @@
1
+ import {
2
+ import_websocket
3
+ } from "./cli-4w4fmq9x.js";
1
4
  import {
2
5
  require_ecdsa_sig_formatter,
3
6
  require_jws,
4
7
  require_p_retry
5
8
  } from "./cli-b0p7rfnd.js";
6
9
  import {
7
- import_websocket
8
- } from "./cli-4w4fmq9x.js";
9
- import {
10
+ resolveJsonSchemaStrictSampling,
10
11
  transformMessages
11
- } from "./cli-e0y603nn.js";
12
+ } from "./cli-x0e0yvnq.js";
12
13
  import {
13
14
  sanitizeSurrogates
14
15
  } from "./cli-y2apkfe2.js";
@@ -25227,6 +25228,10 @@ function convertTools(tools, useParameters = false) {
25227
25228
  }
25228
25229
  ];
25229
25230
  }
25231
+ function supportsGoogleStrictToolSampling(modelId) {
25232
+ const majorVersion = getGeminiMajorVersion(modelId);
25233
+ return majorVersion !== undefined && majorVersion >= 3;
25234
+ }
25230
25235
  function mapToolChoice(choice) {
25231
25236
  switch (choice) {
25232
25237
  case "auto":
@@ -25239,6 +25244,16 @@ function mapToolChoice(choice) {
25239
25244
  return FunctionCallingConfigMode.AUTO;
25240
25245
  }
25241
25246
  }
25247
+ function resolveGoogleFunctionCallingMode(tools, toolChoice, supportsStrictMode) {
25248
+ const useStrictMode = tools.some((tool) => resolveJsonSchemaStrictSampling(tool, supportsStrictMode) === true);
25249
+ if (toolChoice === "none" || toolChoice === "any") {
25250
+ return mapToolChoice(toolChoice);
25251
+ }
25252
+ if (useStrictMode) {
25253
+ return FunctionCallingConfigMode.VALIDATED;
25254
+ }
25255
+ return toolChoice ? mapToolChoice(toolChoice) : undefined;
25256
+ }
25242
25257
  function mapStopReason(reason) {
25243
25258
  switch (reason) {
25244
25259
  case FinishReason.STOP:
@@ -25268,4 +25283,4 @@ function mapStopReason(reason) {
25268
25283
  }
25269
25284
  }
25270
25285
 
25271
- export { ThinkingLevel, ResourceScope, GoogleGenAI, isThinkingPart, retainThoughtSignature, convertMessages, convertTools, mapToolChoice, mapStopReason };
25286
+ export { ThinkingLevel, ResourceScope, GoogleGenAI, isThinkingPart, retainThoughtSignature, convertMessages, convertTools, supportsGoogleStrictToolSampling, resolveGoogleFunctionCallingMode, mapStopReason };
@@ -7,7 +7,7 @@ var package_default;
7
7
  var init_package = __esm(() => {
8
8
  package_default = {
9
9
  name: "@desplega.ai/agent-swarm",
10
- version: "1.120.0",
10
+ version: "1.121.0",
11
11
  description: "Multi-agent orchestration for Claude Code, Codex, Gemini CLI, and other AI coding assistants",
12
12
  license: "MIT",
13
13
  author: "desplega.sh <contact@desplega.sh>",
@@ -66,6 +66,7 @@ var init_package = __esm(() => {
66
66
  ],
67
67
  scripts: {
68
68
  "build:pi-skills": "bun run plugin/build-pi-skills.ts",
69
+ "build:script-types": "bun scripts/bundle-script-types.ts",
69
70
  "build:cli": "bun run scripts/build-cli.ts",
70
71
  "mono:build": "turbo run build",
71
72
  "mono:test": "turbo run test",
@@ -78,6 +79,7 @@ var init_package = __esm(() => {
78
79
  "check:api-key-boundary": "bash scripts/check-api-key-boundary.sh",
79
80
  "check:vendored-openapi": "bun scripts/check-vendored-openapi.ts",
80
81
  "check:rbac-coverage": "bun scripts/check-rbac-coverage.ts",
82
+ "check:script-types": "bash scripts/check-script-types-freshness.sh",
81
83
  "check:audit-columns": "bash scripts/check-audit-columns.sh",
82
84
  "lint:structure": "konsistent check",
83
85
  "prepare-release": "bun scripts/prepare-release.ts",
@@ -150,14 +152,14 @@ var init_package = __esm(() => {
150
152
  "@aws-sdk/client-bedrock": "3.1048.0",
151
153
  "@desplega.ai/business-use": "^0.4.2",
152
154
  "@desplega.ai/localtunnel": "^2.2.0",
153
- "@earendil-works/pi-agent-core": "^0.81.1",
154
- "@earendil-works/pi-ai": "^0.81.1",
155
- "@earendil-works/pi-coding-agent": "^0.81.1",
155
+ "@earendil-works/pi-agent-core": "^0.82.1",
156
+ "@earendil-works/pi-ai": "^0.82.1",
157
+ "@earendil-works/pi-coding-agent": "^0.82.1",
156
158
  "@inkjs/ui": "^2.0.0",
157
159
  "@linear/sdk": "^77.0.0",
158
160
  "@modelcontextprotocol/sdk": "^1.25.1",
159
161
  "@openai/codex-sdk": "^0.145.0",
160
- "@opencode-ai/sdk": "^1.18.4",
162
+ "@opencode-ai/sdk": "^1.18.5",
161
163
  "@openfort/openfort-node": "^0.9.1",
162
164
  "@opentelemetry/api": "^1.9.1",
163
165
  "@opentelemetry/exporter-metrics-otlp-http": "^0.218.0",
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  createAdditiveBuffer,
3
3
  extractSlackMessageText
4
- } from "./cli-0kkggfr9.js";
5
- import {
6
- getSlackApp,
7
- registerTreeMessage
8
- } from "./cli-kyqs14qe.js";
4
+ } from "./cli-g9vva2qh.js";
9
5
  import {
10
6
  rewriteSlackMentions
11
- } from "./cli-f6c6y7fw.js";
7
+ } from "./cli-nf7sadev.js";
12
8
  import {
13
9
  createTaskWithSiblingAwareness
14
- } from "./cli-th08nm8p.js";
10
+ } from "./cli-s8bdcke2.js";
11
+ import {
12
+ getSlackApp,
13
+ registerTreeMessage
14
+ } from "./cli-3b1ayz83.js";
15
15
  import {
16
16
  buildBufferFlushBlocks
17
17
  } from "./cli-ma04faw5.js";
@@ -24,7 +24,7 @@ import {
24
24
  init_registry,
25
25
  registerTemplate,
26
26
  slackContextKey
27
- } from "./cli-383wyw2f.js";
27
+ } from "./cli-0df2g86x.js";
28
28
 
29
29
  // src/slack/event-dedup.ts
30
30
  var DEFAULT_TTL_MS = 300000;
@@ -15,7 +15,7 @@ import {
15
15
  clampContextPercent,
16
16
  computeContextUsedUnified,
17
17
  getContextWindowSize
18
- } from "./cli-tghre7g6.js";
18
+ } from "./cli-cw70hymf.js";
19
19
  import {
20
20
  init_secret_scrubber,
21
21
  scrubSecrets
@@ -26,6 +26,12 @@ init_secret_scrubber();
26
26
 
27
27
  // src/providers/claude-managed-models.ts
28
28
  var CLAUDE_MANAGED_MODEL_PRICING = {
29
+ "claude-opus-5": {
30
+ inputPerMillion: 5,
31
+ outputPerMillion: 25,
32
+ cacheReadPerMillion: 0.5,
33
+ cacheWritePerMillion: 6.25
34
+ },
29
35
  "claude-fable-5": {
30
36
  inputPerMillion: 10,
31
37
  outputPerMillion: 50,
@@ -4,11 +4,11 @@ import {
4
4
  getEmbeddingProvider,
5
5
  init_embedding,
6
6
  serializeEmbedding
7
- } from "./cli-0ap79nha.js";
7
+ } from "./cli-3fxqwfh3.js";
8
8
  import {
9
9
  getDb,
10
10
  init_db
11
- } from "./cli-383wyw2f.js";
11
+ } from "./cli-0df2g86x.js";
12
12
  import {
13
13
  init_secret_scrubber,
14
14
  scrubSecrets
@@ -17,7 +17,7 @@ import {
17
17
  CONTEXT_FORMULA,
18
18
  clampContextPercent,
19
19
  getContextWindowSize
20
- } from "./cli-tghre7g6.js";
20
+ } from "./cli-cw70hymf.js";
21
21
  import {
22
22
  applyReasoningEffort
23
23
  } from "./cli-e61fs2hp.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./cli-r94z9p1z.js";
7
7
  import {
8
8
  summarizeSession
9
- } from "./cli-n61x2aph.js";
9
+ } from "./cli-dmzv0986.js";
10
10
  import {
11
11
  readPkgVersion
12
12
  } from "./cli-d6n0thxw.js";
@@ -31,7 +31,7 @@ import {
31
31
  CONTEXT_FORMULA,
32
32
  clampContextPercent,
33
33
  computeContextUsedUnified
34
- } from "./cli-tghre7g6.js";
34
+ } from "./cli-cw70hymf.js";
35
35
  import {
36
36
  applyReasoningEffort
37
37
  } from "./cli-e61fs2hp.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getDb,
6
6
  init_db
7
- } from "./cli-383wyw2f.js";
7
+ } from "./cli-0df2g86x.js";
8
8
 
9
9
  // src/be/rbac-roles.ts
10
10
  init_db();
@@ -73,4 +73,30 @@ function createAssistantMessageEventStream() {
73
73
  return new AssistantMessageEventStream;
74
74
  }
75
75
 
76
- export { EventStream, AssistantMessageEventStream, createAssistantMessageEventStream };
76
+ // node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.js
77
+ function formatThrownValue(value) {
78
+ if (value instanceof Error)
79
+ return value.message || value.name;
80
+ if (typeof value === "string")
81
+ return value;
82
+ return String(value);
83
+ }
84
+ function extractDiagnosticError(error) {
85
+ if (!(error instanceof Error))
86
+ return { name: "ThrownValue", message: formatThrownValue(error) };
87
+ const code = error.code;
88
+ return {
89
+ name: error.name || undefined,
90
+ message: error.message || error.name,
91
+ stack: error.stack,
92
+ code: typeof code === "string" || typeof code === "number" ? code : undefined
93
+ };
94
+ }
95
+ function createAssistantMessageDiagnostic(type, error, details) {
96
+ return { type, timestamp: Date.now(), error: extractDiagnosticError(error), details };
97
+ }
98
+ function appendAssistantMessageDiagnostic(message, diagnostic) {
99
+ message.diagnostics = [...message.diagnostics ?? [], diagnostic];
100
+ }
101
+
102
+ export { EventStream, AssistantMessageEventStream, createAssistantMessageEventStream, formatThrownValue, extractDiagnosticError, createAssistantMessageDiagnostic, appendAssistantMessageDiagnostic };
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  ensureAuthorizationTokenOrThrow,
6
6
  oauthAppRowToProviderConfig
7
- } from "./cli-gad984jj.js";
7
+ } from "./cli-tv7vekye.js";
8
8
  import {
9
9
  getScript,
10
10
  getScriptApiConnectionDescriptors,
@@ -12,15 +12,15 @@ import {
12
12
  getScriptVersion,
13
13
  listRelationalCredentialBindings,
14
14
  validateScriptImports
15
- } from "./cli-py8z9bjq.js";
15
+ } from "./cli-072t49hf.js";
16
16
  import {
17
17
  getAuthorizationById,
18
18
  getOAuthApp,
19
19
  getOAuthAppById
20
- } from "./cli-84j2vp67.js";
20
+ } from "./cli-1728qh70.js";
21
21
  import {
22
22
  withSiblingAwareness
23
- } from "./cli-th08nm8p.js";
23
+ } from "./cli-s8bdcke2.js";
24
24
  import {
25
25
  getAppUrl
26
26
  } from "./cli-dh55d5fg.js";
@@ -74,13 +74,7 @@ import {
74
74
  updateWorkflowRun,
75
75
  updateWorkflowRunStep,
76
76
  workflowContextKey
77
- } from "./cli-383wyw2f.js";
78
- import {
79
- init_zod
80
- } from "./cli-bw80ck94.js";
81
- import {
82
- exports_external
83
- } from "./cli-xz9aq0rf.js";
77
+ } from "./cli-0df2g86x.js";
84
78
  import {
85
79
  init_secret_scrubber,
86
80
  isSensitiveKey,
@@ -88,6 +82,12 @@ import {
88
82
  scrubObject,
89
83
  scrubSecrets
90
84
  } from "./cli-4j2mrzag.js";
85
+ import {
86
+ init_zod
87
+ } from "./cli-bw80ck94.js";
88
+ import {
89
+ exports_external
90
+ } from "./cli-xz9aq0rf.js";
91
91
  import {
92
92
  init_event_bus,
93
93
  workflowEventBus
@@ -2620,7 +2620,7 @@ class HumanInTheLoopExecutor extends BaseExecutor {
2620
2620
  }
2621
2621
  if (notification.channel === "slack") {
2622
2622
  try {
2623
- const { getSlackApp } = await import("./app-ss3a0nfj.js");
2623
+ const { getSlackApp } = await import("./app-skbty91x.js");
2624
2624
  const slackApp = getSlackApp();
2625
2625
  if (!slackApp) {
2626
2626
  console.warn("[HITL] Slack not initialized — cannot send notification");
@@ -2734,7 +2734,7 @@ class NotifyExecutor extends BaseExecutor {
2734
2734
  }
2735
2735
  }
2736
2736
  case "slack": {
2737
- const { getSlackApp } = await import("./app-ss3a0nfj.js");
2737
+ const { getSlackApp } = await import("./app-skbty91x.js");
2738
2738
  const app = getSlackApp();
2739
2739
  if (!app) {
2740
2740
  return {
@@ -18,7 +18,7 @@ import {
18
18
  init_templates1 as init_templates,
19
19
  normalizeDateRequired,
20
20
  resolveTemplate
21
- } from "./cli-383wyw2f.js";
21
+ } from "./cli-0df2g86x.js";
22
22
 
23
23
  // src/be/db-queries/tracker.ts
24
24
  init_date_utils();