@desplega.ai/agent-swarm 1.107.0 → 1.107.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +1 -1
  2. package/dist/{actions-q3hcb6ea.js → actions-0a8stf21.js} +6 -6
  3. package/dist/{app-4r3mstc2.js → app-bzfks2d1.js} +5 -4
  4. package/dist/{artifact-12d91qnq.js → artifact-0874w6js.js} +2 -1
  5. package/dist/{assistant-a6vp3nv8.js → assistant-609ad3tq.js} +11 -10
  6. package/dist/{boot-reembed-cnsk021h.js → boot-reembed-b0e34fya.js} +3 -3
  7. package/dist/{boot-reembed-gaxjq6ds.js → boot-reembed-zkxqahga.js} +4 -4
  8. package/dist/{boot-scrub-logs-sm0m581p.js → boot-scrub-logs-b8rr0zdz.js} +2 -2
  9. package/dist/{cli-wb4j4tfe.js → cli-07ztw3qw.js} +125 -9
  10. package/dist/{cli-f8cdgmdk.js → cli-0fvvg222.js} +3 -3
  11. package/dist/{cli-61hj3yzp.js → cli-6k4tfbz1.js} +21 -13
  12. package/dist/{cli-ccre5q9r.js → cli-6x9842b5.js} +18 -3
  13. package/dist/cli-7wmybrt5.js +115 -0
  14. package/dist/{cli-8p36pjyp.js → cli-85dpqvhe.js} +2 -2
  15. package/dist/{cli-t6r1ex00.js → cli-a5y6jw3y.js} +1 -1
  16. package/dist/{cli-r0nfastp.js → cli-bbywzv1h.js} +8 -8
  17. package/dist/{cli-3jcx2wmm.js → cli-byh4fpv6.js} +1 -1
  18. package/dist/{cli-938phztx.js → cli-cddy6663.js} +1 -1
  19. package/dist/{cli-kgr1cazt.js → cli-ft53b49j.js} +5 -5
  20. package/dist/{cli-2yn35y8c.js → cli-g9jtrzqn.js} +3 -3
  21. package/dist/{cli-6kqcg4zv.js → cli-hv2fndhm.js} +4 -1
  22. package/dist/{cli-8da61htc.js → cli-kc3h8mnm.js} +1 -1
  23. package/dist/{cli-5s8hgqmd.js → cli-khcv8aqa.js} +1 -1
  24. package/dist/{cli-n4qvvhy0.js → cli-kjfs7t6m.js} +1 -1
  25. package/dist/{cli-hr69yv51.js → cli-m3enfr8q.js} +2 -2
  26. package/dist/{cli-xaht317v.js → cli-nbbsaxgb.js} +93 -22
  27. package/dist/{cli-tda8d5q0.js → cli-njbznqnh.js} +1 -1
  28. package/dist/{cli-t7cyte2g.js → cli-pe7daxs4.js} +2 -2
  29. package/dist/{cli-h9k3grhx.js → cli-pwfsqc2x.js} +1 -1
  30. package/dist/{cli-wnkwyhmw.js → cli-qd6pvqyx.js} +1 -1
  31. package/dist/{cli-4rx7v585.js → cli-qr5dg0hn.js} +1 -1
  32. package/dist/{cli-rpjrpkzy.js → cli-r28xcyhw.js} +1 -1
  33. package/dist/{cli-fete3y1e.js → cli-rkndnn90.js} +4 -1
  34. package/dist/{cli-awqz8v9k.js → cli-sh7cxxef.js} +4 -4
  35. package/dist/{cli-hn38x1bp.js → cli-ssrekyyz.js} +2 -2
  36. package/dist/{cli-ygcrdkqt.js → cli-vbraamxr.js} +5 -2
  37. package/dist/{cli-9xjc8dt2.js → cli-vg4rpzka.js} +1 -1
  38. package/dist/{cli-heavyg0w.js → cli-vpy2ykv9.js} +4 -4
  39. package/dist/{cli-6n1nnzm7.js → cli-wx82tw1k.js} +1 -1
  40. package/dist/{cli-5nt81kzd.js → cli-ykd4a9nc.js} +1 -1
  41. package/dist/cli.js +32 -16
  42. package/dist/{codex-adapter-wer4en6f.js → codex-adapter-sdqdznk1.js} +2 -2
  43. package/dist/{codex-session-runner-b199pwwr.js → codex-session-runner-t8jgxf6c.js} +2 -2
  44. package/dist/{commands-ys948zs2.js → commands-d0taq40d.js} +2 -2
  45. package/dist/{db-sy3tqg9d.js → db-vtvke5z0.js} +15 -3
  46. package/dist/{e2b-jy6t336w.js → e2b-xb3rhzb1.js} +2 -2
  47. package/dist/{google-generative-ai-rf42vj2h.js → google-generative-ai-vfq6ymz9.js} +1 -1
  48. package/dist/{google-vertex-m92pj5fb.js → google-vertex-mj5y5rfj.js} +1 -1
  49. package/dist/{handlers-h9vh0t22.js → handlers-mezjqnv9.js} +11 -10
  50. package/dist/{hook-06rfe1bc.js → hook-93j171n5.js} +2 -2
  51. package/dist/{http-fk80h22g.js → http-p6cd3qsn.js} +190 -47
  52. package/dist/{index-bb95344w.js → index-516gja9z.js} +8 -8
  53. package/dist/{index-py84s5en.js → index-5n2c8yay.js} +2 -1
  54. package/dist/{index-0krvvan6.js → index-jzcmg0v3.js} +9 -9
  55. package/dist/{index-40wjvdfg.js → index-qd5zq03s.js} +7 -7
  56. package/dist/{index-pq2d08xe.js → index-sehyj6pr.js} +6 -6
  57. package/dist/{keepalive-np0ham11.js → keepalive-e6f2s1gm.js} +4 -4
  58. package/dist/{lead-gf7sa5vn.js → lead-7d5kjkha.js} +21 -20
  59. package/dist/{maintenance-38n2z7p9.js → maintenance-yzwmptty.js} +4 -4
  60. package/dist/{onboard-63r24gwq.js → onboard-bgfn21x5.js} +4 -4
  61. package/dist/{otel-impl-18fxmezz.js → otel-impl-z0s291n2.js} +5 -2
  62. package/dist/{pi-mono-adapter-5bbyymfw.js → pi-mono-adapter-e1dn8qh3.js} +48 -48
  63. package/dist/{pricing-refresh-x7b6rjxy.js → pricing-refresh-9gsbd6k9.js} +4 -4
  64. package/dist/{seed-pricing-8hdb1xyg.js → seed-pricing-037064at.js} +3 -3
  65. package/dist/{setup-prqde3h7.js → setup-y9110edr.js} +4 -4
  66. package/dist/{worker-34hev47c.js → worker-v2wr6ffm.js} +21 -20
  67. package/openapi.json +42 -1
  68. package/package.json +18 -3
  69. package/src/be/db.ts +188 -2
  70. package/src/be/migrations/105_user_favorites.sql +18 -0
  71. package/src/http/favorites.ts +98 -0
  72. package/src/http/index.ts +3 -1
  73. package/src/http/pages-public.ts +1 -0
  74. package/src/http/pages.ts +49 -5
  75. package/src/http/schedules.ts +7 -2
  76. package/src/http/stats.ts +7 -1
  77. package/src/http/workflows.ts +16 -4
  78. package/src/linear/sync.ts +75 -3
  79. package/src/tests/context-key-db.test.ts +55 -1
  80. package/src/tests/favorites.test.ts +162 -0
  81. package/src/tests/linear-webhook.test.ts +34 -1
  82. package/src/tests/pages-public-html.test.ts +6 -0
  83. package/src/tests/pages-versioning.test.ts +2 -2
  84. package/src/tests/scheduled-tasks-api.test.ts +20 -14
  85. package/src/tests/send-task-requested-by.test.ts +26 -0
  86. package/src/tools/send-task.ts +19 -3
  87. package/src/types.ts +22 -0
package/README.md CHANGED
@@ -217,7 +217,7 @@ Missing one? Ask the swarm to build it.
217
217
  Real-time monitoring of agents, tasks, and inter-agent chat. Use the hosted version at [app.agent-swarm.dev](https://app.agent-swarm.dev), or run locally:
218
218
 
219
219
  ```bash
220
- cd ui && pnpm install && pnpm run dev
220
+ cd ui && bun install && bun run dev
221
221
  ```
222
222
 
223
223
  Opens at `http://localhost:5274`.
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  resolveSlackUserId
3
- } from "./cli-f8cdgmdk.js";
4
- import"./cli-5s8hgqmd.js";
5
- import"./cli-9xjc8dt2.js";
3
+ } from "./cli-0fvvg222.js";
4
+ import"./cli-khcv8aqa.js";
5
+ import"./cli-vg4rpzka.js";
6
6
  import {
7
7
  buildCancelledBlocks,
8
8
  getTaskLink
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  createTaskWithSiblingAwareness,
12
12
  slackContextKey
13
- } from "./cli-3jcx2wmm.js";
13
+ } from "./cli-byh4fpv6.js";
14
14
  import"./cli-dh55d5fg.js";
15
15
  import {
16
16
  cancelTask,
@@ -18,11 +18,11 @@ import {
18
18
  getLeadAgent,
19
19
  getTaskById,
20
20
  init_db
21
- } from "./cli-wb4j4tfe.js";
21
+ } from "./cli-07ztw3qw.js";
22
22
  import"./cli-z2zcxes1.js";
23
23
  import"./cli-q21d49ac.js";
24
24
  import"./cli-anrj584m.js";
25
- import"./cli-ccre5q9r.js";
25
+ import"./cli-6x9842b5.js";
26
26
  import"./cli-3pp1362w.js";
27
27
  import"./cli-p9swy5t3.js";
28
28
 
@@ -3,18 +3,19 @@ import {
3
3
  initSlackApp,
4
4
  startSlackApp,
5
5
  stopSlackApp
6
- } from "./cli-61hj3yzp.js";
7
- import"./cli-fete3y1e.js";
6
+ } from "./cli-6k4tfbz1.js";
7
+ import"./cli-rkndnn90.js";
8
8
  import"./cli-b0p7rfnd.js";
9
9
  import"./cli-z92pkwzn.js";
10
10
  import"./cli-dh55d5fg.js";
11
- import"./cli-wb4j4tfe.js";
11
+ import"./cli-07ztw3qw.js";
12
12
  import"./cli-z2zcxes1.js";
13
13
  import"./cli-q21d49ac.js";
14
14
  import"./cli-anrj584m.js";
15
- import"./cli-ccre5q9r.js";
15
+ import"./cli-6x9842b5.js";
16
16
  import"./cli-3pp1362w.js";
17
17
  import"./cli-e15jhafb.js";
18
+ import"./cli-7wmybrt5.js";
18
19
  import"./cli-p9swy5t3.js";
19
20
  export {
20
21
  stopSlackApp,
@@ -7,10 +7,11 @@ import {
7
7
  import {
8
8
  require_follow_redirects,
9
9
  require_src
10
- } from "./cli-fete3y1e.js";
10
+ } from "./cli-rkndnn90.js";
11
11
  import {
12
12
  getMcpBaseUrl
13
13
  } from "./cli-dh55d5fg.js";
14
+ import"./cli-7wmybrt5.js";
14
15
  import {
15
16
  __commonJS,
16
17
  __require,
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  bufferThreadMessage,
3
3
  wasEventSeen
4
- } from "./cli-heavyg0w.js";
4
+ } from "./cli-vpy2ykv9.js";
5
5
  import {
6
6
  hasOtherUserMention
7
- } from "./cli-n4qvvhy0.js";
7
+ } from "./cli-kjfs7t6m.js";
8
8
  import {
9
9
  require_dist
10
- } from "./cli-61hj3yzp.js";
11
- import"./cli-fete3y1e.js";
10
+ } from "./cli-6k4tfbz1.js";
11
+ import"./cli-rkndnn90.js";
12
12
  import"./cli-b0p7rfnd.js";
13
13
  import {
14
14
  resolveSlackUserId
15
- } from "./cli-f8cdgmdk.js";
16
- import"./cli-5s8hgqmd.js";
17
- import"./cli-9xjc8dt2.js";
15
+ } from "./cli-0fvvg222.js";
16
+ import"./cli-khcv8aqa.js";
17
+ import"./cli-vg4rpzka.js";
18
18
  import"./cli-z92pkwzn.js";
19
19
  import {
20
20
  createTaskWithSiblingAwareness,
21
21
  slackContextKey
22
- } from "./cli-3jcx2wmm.js";
22
+ } from "./cli-byh4fpv6.js";
23
23
  import"./cli-dh55d5fg.js";
24
24
  import {
25
25
  getAgentWorkingOnThread,
@@ -28,13 +28,14 @@ import {
28
28
  init_db,
29
29
  init_resolver,
30
30
  resolveTemplate
31
- } from "./cli-wb4j4tfe.js";
31
+ } from "./cli-07ztw3qw.js";
32
32
  import"./cli-z2zcxes1.js";
33
33
  import"./cli-q21d49ac.js";
34
34
  import"./cli-anrj584m.js";
35
- import"./cli-ccre5q9r.js";
35
+ import"./cli-6x9842b5.js";
36
36
  import"./cli-3pp1362w.js";
37
37
  import"./cli-e15jhafb.js";
38
+ import"./cli-7wmybrt5.js";
38
39
  import {
39
40
  __toESM
40
41
  } from "./cli-p9swy5t3.js";
@@ -3,16 +3,16 @@ import {
3
3
  getEmbeddingProvider,
4
4
  getMemoryStore,
5
5
  init_constants
6
- } from "./cli-rpjrpkzy.js";
6
+ } from "./cli-r28xcyhw.js";
7
7
  import"./cli-3j01d33e.js";
8
8
  import {
9
9
  getDb,
10
10
  init_db
11
- } from "./cli-wb4j4tfe.js";
11
+ } from "./cli-07ztw3qw.js";
12
12
  import"./cli-z2zcxes1.js";
13
13
  import"./cli-q21d49ac.js";
14
14
  import"./cli-anrj584m.js";
15
- import"./cli-ccre5q9r.js";
15
+ import"./cli-6x9842b5.js";
16
16
  import"./cli-3pp1362w.js";
17
17
  import"./cli-p9swy5t3.js";
18
18
 
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  embedScript,
3
3
  embeddingProvider
4
- } from "./cli-hn38x1bp.js";
5
- import"./cli-rpjrpkzy.js";
4
+ } from "./cli-ssrekyyz.js";
5
+ import"./cli-r28xcyhw.js";
6
6
  import"./cli-3j01d33e.js";
7
7
  import {
8
8
  getDb,
9
9
  init_db
10
- } from "./cli-wb4j4tfe.js";
10
+ } from "./cli-07ztw3qw.js";
11
11
  import"./cli-z2zcxes1.js";
12
12
  import"./cli-q21d49ac.js";
13
13
  import"./cli-anrj584m.js";
14
- import"./cli-ccre5q9r.js";
14
+ import"./cli-6x9842b5.js";
15
15
  import"./cli-3pp1362w.js";
16
16
  import"./cli-p9swy5t3.js";
17
17
 
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  getDb,
3
3
  init_db
4
- } from "./cli-wb4j4tfe.js";
4
+ } from "./cli-07ztw3qw.js";
5
5
  import"./cli-z2zcxes1.js";
6
6
  import"./cli-q21d49ac.js";
7
7
  import"./cli-anrj584m.js";
8
- import"./cli-ccre5q9r.js";
8
+ import"./cli-6x9842b5.js";
9
9
  import {
10
10
  init_secret_scrubber,
11
11
  scrubSecrets
@@ -25,7 +25,7 @@ import {
25
25
  import {
26
26
  init_package,
27
27
  package_default
28
- } from "./cli-ccre5q9r.js";
28
+ } from "./cli-6x9842b5.js";
29
29
  import {
30
30
  init_secret_scrubber,
31
31
  scrubSecrets
@@ -469,7 +469,7 @@ function resolveTaskModelSelection(opts) {
469
469
  function isTerminalTaskStatus(status) {
470
470
  return TERMINAL_TASK_STATUSES.includes(status);
471
471
  }
472
- var ModelTierSchema, MODEL_TIERS, ReasoningEffortSchema, LEGACY_MODEL_TO_TIER, DEFAULT_MODEL_TIER_MAP, AgentTaskStatusSchema, TERMINAL_TASK_STATUSES, InboxMessageStatusSchema, InboxMessageSchema, AgentTaskSourceSchema, ProviderNameSchema, FollowUpConfigSchema, AgentTaskSchema, TaskAttachmentKindSchema, attachmentCommonFields, AttachmentInputSchema, TaskAttachmentSchema, UserSchema, IdentityEventTypeSchema, InboxItemTypeSchema, InboxItemStatusSchema, InboxItemStateSchema, 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, 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;
472
+ var ModelTierSchema, MODEL_TIERS, ReasoningEffortSchema, LEGACY_MODEL_TO_TIER, DEFAULT_MODEL_TIER_MAP, AgentTaskStatusSchema, TERMINAL_TASK_STATUSES, InboxMessageStatusSchema, InboxMessageSchema, AgentTaskSourceSchema, ProviderNameSchema, FollowUpConfigSchema, 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, 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;
473
473
  var init_types = __esm(() => {
474
474
  init_zod();
475
475
  ModelTierSchema = _enum(["smol", "regular", "smart", "ultra"]);
@@ -752,6 +752,17 @@ var init_types = __esm(() => {
752
752
  createdAt: string(),
753
753
  lastUpdatedAt: string()
754
754
  });
755
+ FavoriteItemTypeSchema = _enum(["page", "workflow", "schedule"]);
756
+ UserFavoriteSchema = object({
757
+ id: string(),
758
+ userId: string(),
759
+ itemType: FavoriteItemTypeSchema,
760
+ itemId: string(),
761
+ createdAt: string(),
762
+ lastUpdatedAt: string(),
763
+ createdBy: string().optional(),
764
+ updatedBy: string().optional()
765
+ });
755
766
  TaskTemplateKindSchema = _enum(["task", "workflow", "schedule"]);
756
767
  TaskTemplateSchema = object({
757
768
  id: string(),
@@ -1041,7 +1052,8 @@ var init_types = __esm(() => {
1041
1052
  createdAt: exports_iso.datetime(),
1042
1053
  lastUpdatedAt: exports_iso.datetime(),
1043
1054
  createdBy: string().optional(),
1044
- updatedBy: string().optional()
1055
+ updatedBy: string().optional(),
1056
+ favorite: boolean().optional()
1045
1057
  }).refine((data) => {
1046
1058
  if (data.scheduleType === "one_time")
1047
1059
  return true;
@@ -1269,7 +1281,8 @@ var init_types = __esm(() => {
1269
1281
  createdAt: string(),
1270
1282
  lastUpdatedAt: string(),
1271
1283
  createdBy: string().optional(),
1272
- updatedBy: string().optional()
1284
+ updatedBy: string().optional(),
1285
+ favorite: boolean().optional()
1273
1286
  });
1274
1287
  WorkflowVersionSchema = object({
1275
1288
  id: string().uuid(),
@@ -1303,7 +1316,8 @@ var init_types = __esm(() => {
1303
1316
  needsCredentials: array(string()).optional(),
1304
1317
  viewCount: number().int().min(0).default(0),
1305
1318
  createdAt: string(),
1306
- updatedAt: string()
1319
+ updatedAt: string(),
1320
+ favorite: boolean().optional()
1307
1321
  });
1308
1322
  PageVersionSchema = object({
1309
1323
  id: string(),
@@ -3443,6 +3457,7 @@ var require_sqlite_vec = __commonJS((exports, module) => {
3443
3457
  // src/be/db.ts
3444
3458
  var exports_db = {};
3445
3459
  __export(exports_db, {
3460
+ withFavoriteFlags: () => withFavoriteFlags,
3446
3461
  upsertSwarmConfig: () => upsertSwarmConfig,
3447
3462
  upsertSkillFiles: () => upsertSkillFiles,
3448
3463
  upsertSkillFile: () => upsertSkillFile,
@@ -3487,6 +3502,7 @@ __export(exports_db, {
3487
3502
  supersedeTask: () => supersedeTask,
3488
3503
  startTask: () => startTask,
3489
3504
  shouldBlockPolling: () => shouldBlockPolling,
3505
+ setUserFavorite: () => setUserFavorite,
3490
3506
  setSlackMessageTracking: () => setSlackMessageTracking,
3491
3507
  setBudgetRefusalFollowUpTaskId: () => setBudgetRefusalFollowUpTaskId,
3492
3508
  setApiKeyName: () => setApiKeyName,
@@ -3527,6 +3543,7 @@ __export(exports_db, {
3527
3543
  logQueries: () => logQueries,
3528
3544
  listWorkflows: () => listWorkflows,
3529
3545
  listWorkflowRuns: () => listWorkflowRuns,
3546
+ listUserFavorites: () => listUserFavorites,
3530
3547
  listTaskTemplates: () => listTaskTemplates,
3531
3548
  listSkills: () => listSkills,
3532
3549
  listSkillFileManifest: () => listSkillFileManifest,
@@ -3658,6 +3675,7 @@ __export(exports_db, {
3658
3675
  getLeadAgent: () => getLeadAgent,
3659
3676
  getLatestTaskByContextKey: () => getLatestTaskByContextKey,
3660
3677
  getLatestStepForNode: () => getLatestStepForNode,
3678
+ getLatestPageBySlug: () => getLatestPageBySlug,
3661
3679
  getLatestContextVersion: () => getLatestContextVersion,
3662
3680
  getLatestActiveTaskInThread: () => getLatestActiveTaskInThread,
3663
3681
  getLastSuccessfulRun: () => getLastSuccessfulRun,
@@ -3673,6 +3691,7 @@ __export(exports_db, {
3673
3691
  getInProgressTasksByContextKey: () => getInProgressTasksByContextKey,
3674
3692
  getInProgressSlackTasks: () => getInProgressSlackTasks,
3675
3693
  getIdleWorkersWithCapacity: () => getIdleWorkersWithCapacity,
3694
+ getFavoriteItemIdSet: () => getFavoriteItemIdSet,
3676
3695
  getExpiredPendingApprovals: () => getExpiredPendingApprovals,
3677
3696
  getDueWaitStates: () => getDueWaitStates,
3678
3697
  getDueScheduledTasks: () => getDueScheduledTasks,
@@ -3734,6 +3753,7 @@ __export(exports_db, {
3734
3753
  findTaskByAgentMailThread: () => findTaskByAgentMailThread,
3735
3754
  findRecentSimilarTasks: () => findRecentSimilarTasks,
3736
3755
  findRecentCancelledTaskInThread: () => findRecentCancelledTaskInThread,
3756
+ findExistingLinearTrackerContextWork: () => findExistingLinearTrackerContextWork,
3737
3757
  findCompletedTaskInThread: () => findCompletedTaskInThread,
3738
3758
  failTask: () => failTask,
3739
3759
  failPendingResumeIfUnclaimed: () => failPendingResumeIfUnclaimed,
@@ -4776,6 +4796,34 @@ function getInProgressTasksByContextKey(contextKey, statuses = ["pending", "in_p
4776
4796
  ORDER BY lastUpdatedAt DESC
4777
4797
  LIMIT 200`).all(contextKey, ...statuses).map(rowToAgentTask);
4778
4798
  }
4799
+ function isLinearTrackerContextKey(contextKey) {
4800
+ return !!contextKey && contextKey.startsWith(LINEAR_TRACKER_CONTEXT_KEY_PREFIX);
4801
+ }
4802
+ function findExistingLinearTrackerContextWork(contextKey) {
4803
+ if (!isLinearTrackerContextKey(contextKey))
4804
+ return null;
4805
+ const activeRow = getDb().prepare(`SELECT * FROM agent_tasks
4806
+ WHERE contextKey = ?
4807
+ AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded')
4808
+ ORDER BY lastUpdatedAt DESC
4809
+ LIMIT 1`).get(contextKey);
4810
+ if (activeRow) {
4811
+ return { task: rowToAgentTask(activeRow), reason: "active_task" };
4812
+ }
4813
+ const linkedPrRow = getDb().prepare(`SELECT * FROM agent_tasks
4814
+ WHERE contextKey = ?
4815
+ AND status = 'completed'
4816
+ AND vcsProvider IS NOT NULL
4817
+ AND vcsRepo IS NOT NULL
4818
+ AND vcsNumber IS NOT NULL
4819
+ AND vcsUrl IS NOT NULL
4820
+ ORDER BY lastUpdatedAt DESC
4821
+ LIMIT 1`).get(contextKey);
4822
+ if (linkedPrRow) {
4823
+ return { task: rowToAgentTask(linkedPrRow), reason: "linked_open_pr" };
4824
+ }
4825
+ return null;
4826
+ }
4779
4827
  function getLatestTaskByContextKey(contextKey) {
4780
4828
  if (!contextKey)
4781
4829
  return null;
@@ -5399,6 +5447,11 @@ function createTaskExtended(task, options) {
5399
5447
  }
5400
5448
  }
5401
5449
  }
5450
+ const existingTrackerWork = findExistingLinearTrackerContextWork(options?.contextKey);
5451
+ if (existingTrackerWork) {
5452
+ console.log(`[task-dedup] Skipping Linear tracker task creation for ${options?.contextKey}: ${existingTrackerWork.reason} ${existingTrackerWork.task.id.slice(0, 8)} already exists`);
5453
+ return existingTrackerWork.task;
5454
+ }
5402
5455
  if (options?.creatorAgentId && !options.slackChannelId && options.sourceTaskId) {
5403
5456
  const sourceTask = getTaskById(options.sourceTaskId);
5404
5457
  if (sourceTask?.slackChannelId) {
@@ -6470,7 +6523,7 @@ function getScheduledTasks(filters, opts) {
6470
6523
  if (filters?.hideCompleted !== false) {
6471
6524
  query += " AND NOT (scheduleType = 'one_time' AND enabled = 0)";
6472
6525
  }
6473
- query += " ORDER BY name ASC";
6526
+ query += " ORDER BY lastRunAt IS NULL ASC, lastRunAt DESC, lastUpdatedAt DESC";
6474
6527
  const rows = getDb().prepare(query).all(...params);
6475
6528
  return opts?.slim ? rows.map(rowToScheduledTaskSummary) : rows.map(rowToScheduledTask);
6476
6529
  }
@@ -7128,7 +7181,7 @@ function listWorkflows(filters, opts) {
7128
7181
  query += " AND enabled = ?";
7129
7182
  params.push(filters.enabled ? 1 : 0);
7130
7183
  }
7131
- query += " ORDER BY name ASC";
7184
+ query += " ORDER BY lastUpdatedAt DESC";
7132
7185
  const rows = getDb().prepare(query).all(...params);
7133
7186
  return opts?.slim ? rows.map(rowToWorkflowSummary) : rows.map(rowToWorkflow);
7134
7187
  }
@@ -7474,6 +7527,10 @@ function getPageBySlug(agentId, slug) {
7474
7527
  const row = getDb().prepare("SELECT * FROM pages WHERE agentId = ? AND slug = ?").get(agentId, slug);
7475
7528
  return row ? rowToPage(row) : null;
7476
7529
  }
7530
+ function getLatestPageBySlug(slug) {
7531
+ const row = getDb().prepare("SELECT * FROM pages WHERE slug = ? ORDER BY updatedAt DESC LIMIT 1").get(slug);
7532
+ return row ? rowToPage(row) : null;
7533
+ }
7477
7534
  function rowToPageSummary(row) {
7478
7535
  return {
7479
7536
  id: row.id,
@@ -9016,6 +9073,65 @@ function upsertInboxState(opts) {
9016
9073
  throw new Error("Failed to upsert inbox state");
9017
9074
  return rowToInboxItemState(row);
9018
9075
  }
9076
+ function rowToUserFavorite(row) {
9077
+ return {
9078
+ id: row.id,
9079
+ userId: row.userId,
9080
+ itemType: row.itemType,
9081
+ itemId: row.itemId,
9082
+ createdAt: row.createdAt,
9083
+ lastUpdatedAt: row.lastUpdatedAt,
9084
+ createdBy: row.created_by ?? undefined,
9085
+ updatedBy: row.updated_by ?? undefined
9086
+ };
9087
+ }
9088
+ function listUserFavorites(opts) {
9089
+ const conditions = ["userId = ?"];
9090
+ const params = [opts.userId];
9091
+ if (opts.itemType) {
9092
+ conditions.push("itemType = ?");
9093
+ params.push(opts.itemType);
9094
+ }
9095
+ if (opts.itemIds && opts.itemIds.length > 0) {
9096
+ conditions.push(`itemId IN (${opts.itemIds.map(() => "?").join(",")})`);
9097
+ params.push(...opts.itemIds);
9098
+ }
9099
+ const rows = getDb().prepare(`SELECT * FROM user_favorites WHERE ${conditions.join(" AND ")} ORDER BY lastUpdatedAt DESC`).all(...params);
9100
+ return rows.map(rowToUserFavorite);
9101
+ }
9102
+ function getFavoriteItemIdSet(opts) {
9103
+ return new Set(listUserFavorites(opts).map((favorite) => favorite.itemId));
9104
+ }
9105
+ function setUserFavorite(opts) {
9106
+ if (!opts.favorite) {
9107
+ getDb().prepare("DELETE FROM user_favorites WHERE userId = ? AND itemType = ? AND itemId = ?").run(opts.userId, opts.itemType, opts.itemId);
9108
+ return null;
9109
+ }
9110
+ const now = new Date().toISOString();
9111
+ const actor = opts.actorUserId ?? opts.userId;
9112
+ const row = getDb().prepare(`INSERT INTO user_favorites (
9113
+ userId, itemType, itemId, createdAt, lastUpdatedAt, created_by, updated_by
9114
+ )
9115
+ VALUES (?, ?, ?, ?, ?, ?, ?)
9116
+ ON CONFLICT(userId, itemType, itemId) DO UPDATE SET
9117
+ lastUpdatedAt = excluded.lastUpdatedAt,
9118
+ updated_by = excluded.updated_by
9119
+ RETURNING *`).get(opts.userId, opts.itemType, opts.itemId, now, now, actor, actor);
9120
+ if (!row)
9121
+ throw new Error("Failed to set favorite");
9122
+ return rowToUserFavorite(row);
9123
+ }
9124
+ function withFavoriteFlags(rows, opts) {
9125
+ if (!opts.userId || rows.length === 0) {
9126
+ return rows.map((row) => ({ ...row, favorite: false }));
9127
+ }
9128
+ const favoriteIds = getFavoriteItemIdSet({
9129
+ userId: opts.userId,
9130
+ itemType: opts.itemType,
9131
+ itemIds: rows.map((row) => row.id)
9132
+ });
9133
+ return rows.map((row) => ({ ...row, favorite: favoriteIds.has(row.id) }));
9134
+ }
9019
9135
  function rowToTaskTemplate(row) {
9020
9136
  let payload = {};
9021
9137
  try {
@@ -9721,7 +9837,7 @@ function countScriptRunJournalAgentTaskSteps(runId) {
9721
9837
  const row = getDb().prepare("SELECT COUNT(*) AS count FROM script_run_journal WHERE runId = ? AND stepType = 'agent-task'").get(runId);
9722
9838
  return row?.count ?? 0;
9723
9839
  }
9724
- var db = null, sqliteVecAvailable = false, VERSIONABLE_FIELDS, agentQueries, MAX_EMPTY_POLLS = 2, taskQueries, findTaskByGitHub, logQueries, sessionLogQueries, sessionCostQueries, SCHEDULE_TEMPLATE_PREVIEW_LENGTH = 280, TASK_PREVIEW_LENGTH = 300, RESERVED_CONFIG_PLACEHOLDER = "[reserved key stored in swarm_config; delete this row]", SKILL_FILE_LIMITS, BINARY_SKILL_FILE_PLACEHOLDER = "[binary file - not synced]", SKILL_SLIM_COLUMNS = "id, name, description, type, scope, ownerAgentId, sourceUrl, sourceRepo, sourcePath, sourceBranch, sourceHash, isComplex, allowedTools, model, effort, context, agent, disableModelInvocation, userInvocable, version, isEnabled, systemDefault, createdAt, lastUpdatedAt, lastFetchedAt, '' as content", contextSnapshotQueries, KvTypeCollisionError;
9840
+ var db = null, sqliteVecAvailable = false, VERSIONABLE_FIELDS, agentQueries, MAX_EMPTY_POLLS = 2, taskQueries, findTaskByGitHub, LINEAR_TRACKER_CONTEXT_KEY_PREFIX = "task:trackers:linear:", logQueries, sessionLogQueries, sessionCostQueries, SCHEDULE_TEMPLATE_PREVIEW_LENGTH = 280, TASK_PREVIEW_LENGTH = 300, RESERVED_CONFIG_PLACEHOLDER = "[reserved key stored in swarm_config; delete this row]", SKILL_FILE_LIMITS, BINARY_SKILL_FILE_PLACEHOLDER = "[binary file - not synced]", SKILL_SLIM_COLUMNS = "id, name, description, type, scope, ownerAgentId, sourceUrl, sourceRepo, sourcePath, sourceBranch, sourceHash, isComplex, allowedTools, model, effort, context, agent, disableModelInvocation, userInvocable, version, isEnabled, systemDefault, createdAt, lastUpdatedAt, lastFetchedAt, '' as content", contextSnapshotQueries, KvTypeCollisionError;
9725
9841
  var init_db = __esm(() => {
9726
9842
  init_provider_metadata();
9727
9843
  init_package();
@@ -9829,4 +9945,4 @@ var init_db = __esm(() => {
9829
9945
  };
9830
9946
  });
9831
9947
 
9832
- export { interpolate, deepInterpolate, init_template, registerTemplate, getTemplateDefinition, getAllTemplateDefinitions, init_registry, configureHttpResolver, resolveTemplate, resolveTemplateAsync, init_resolver, initTelemetry, telemetry, init_telemetry, ModelTierSchema, ReasoningEffortSchema, splitLegacyModelAlias, resolveTaskModelSelection, AgentTaskStatusSchema, isTerminalTaskStatus, AgentTaskSourceSchema, ProviderNameSchema, FollowUpConfigSchema, AgentTaskSchema, AttachmentInputSchema, TaskAttachmentSchema, InboxItemTypeSchema, InboxItemStatusSchema, 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, init_request_auth_context, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, 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, 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, getLatestTaskByContextKey, getAgentWorkingOnThread, getLatestActiveTaskInThread, getMostRecentTaskInThread, findCompletedTaskInThread, findRecentCancelledTaskInThread, completeTask, failTask, cancelTask, supersedeTask, backfillSupersedeTaskResumeTaskId, pauseTask, resumeTask, getPausedTasksForAgent, getOrphanedInProgressTasksForAgent, resetOrphanedInProgressTasksForAgent, getRecentlyCancelledTasksForAgent, deleteTask, updateTaskProgress, insertTaskAttachment, getTaskAttachments, getAgentWithTasks, getAllAgentsWithTasks, logQueries, createLogEntry, getLogsByAgentId, getLogsByTaskId, getLogsByTaskIdChronological, getLogsByEventType, getAllLogs, findRecentSimilarTasks, createTaskExtended, claimTask, releaseTask, acceptTask, rejectTask, moveTaskToBacklog, moveTaskFromBacklog, releaseStaleReviewingTasks, getOfferedTasksForAgent, claimOfferedTask, getUnassignedTasksCount, getUnassignedTaskIds, 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, 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, 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, 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 };
9948
+ export { interpolate, deepInterpolate, init_template, registerTemplate, getTemplateDefinition, getAllTemplateDefinitions, init_registry, configureHttpResolver, resolveTemplate, resolveTemplateAsync, init_resolver, initTelemetry, telemetry, init_telemetry, 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, init_request_auth_context, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, 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, 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, getTaskAttachments, getAgentWithTasks, getAllAgentsWithTasks, logQueries, createLogEntry, getLogsByAgentId, getLogsByTaskId, getLogsByTaskIdChronological, getLogsByEventType, getAllLogs, findRecentSimilarTasks, createTaskExtended, claimTask, releaseTask, acceptTask, rejectTask, moveTaskToBacklog, moveTaskFromBacklog, releaseStaleReviewingTasks, getOfferedTasksForAgent, claimOfferedTask, getUnassignedTasksCount, getUnassignedTaskIds, 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, 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, listUserFavorites, getFavoriteItemIdSet, 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 };
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  recordUnmappedIdentity
3
- } from "./cli-5s8hgqmd.js";
3
+ } from "./cli-khcv8aqa.js";
4
4
  import {
5
5
  findOrCreateUserByEmail,
6
6
  findUserByExternalId,
7
7
  linkIdentity
8
- } from "./cli-9xjc8dt2.js";
8
+ } from "./cli-vg4rpzka.js";
9
9
  import {
10
10
  getKv,
11
11
  init_db,
12
12
  upsertKv
13
- } from "./cli-wb4j4tfe.js";
13
+ } from "./cli-07ztw3qw.js";
14
14
 
15
15
  // src/slack/enrich.ts
16
16
  init_db();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  require_follow_redirects
3
- } from "./cli-fete3y1e.js";
3
+ } from "./cli-rkndnn90.js";
4
4
  import {
5
5
  require_jws,
6
6
  require_p_retry
@@ -25,7 +25,7 @@ import {
25
25
  getTaskById,
26
26
  init_db,
27
27
  setSlackMessageTracking
28
- } from "./cli-wb4j4tfe.js";
28
+ } from "./cli-07ztw3qw.js";
29
29
  import {
30
30
  require_receiver,
31
31
  require_sender,
@@ -33,6 +33,9 @@ import {
33
33
  require_websocket,
34
34
  require_websocket_server
35
35
  } from "./cli-e15jhafb.js";
36
+ import {
37
+ require_supports_color
38
+ } from "./cli-7wmybrt5.js";
36
39
  import {
37
40
  __commonJS,
38
41
  __require,
@@ -9445,7 +9448,7 @@ var require_asynckit = __commonJS((exports, module) => {
9445
9448
  };
9446
9449
  });
9447
9450
 
9448
- // node_modules/es-object-atoms/index.js
9451
+ // node_modules/get-intrinsic/node_modules/es-object-atoms/index.js
9449
9452
  var require_es_object_atoms = __commonJS((exports, module) => {
9450
9453
  module.exports = Object;
9451
9454
  });
@@ -9639,9 +9642,14 @@ var require_Reflect_getPrototypeOf = __commonJS((exports, module) => {
9639
9642
  module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
9640
9643
  });
9641
9644
 
9645
+ // node_modules/get-proto/node_modules/es-object-atoms/index.js
9646
+ var require_es_object_atoms2 = __commonJS((exports, module) => {
9647
+ module.exports = Object;
9648
+ });
9649
+
9642
9650
  // node_modules/get-proto/Object.getPrototypeOf.js
9643
9651
  var require_Object_getPrototypeOf = __commonJS((exports, module) => {
9644
- var $Object = require_es_object_atoms();
9652
+ var $Object = require_es_object_atoms2();
9645
9653
  module.exports = $Object.getPrototypeOf || null;
9646
9654
  });
9647
9655
 
@@ -33542,7 +33550,7 @@ var require_node = __commonJS((exports, module) => {
33542
33550
  exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
33543
33551
  exports.colors = [6, 2, 3, 4, 5, 1];
33544
33552
  try {
33545
- const supportsColor = (()=>{throw new Error("Cannot require module "+"supports-color");})();
33553
+ const supportsColor = require_supports_color();
33546
33554
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
33547
33555
  exports.colors = [
33548
33556
  20,
@@ -46080,7 +46088,7 @@ var require_node2 = __commonJS((exports, module) => {
46080
46088
  exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
46081
46089
  exports.colors = [6, 2, 3, 4, 5, 1];
46082
46090
  try {
46083
- const supportsColor = (()=>{throw new Error("Cannot require module "+"supports-color");})();
46091
+ const supportsColor = require_supports_color();
46084
46092
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
46085
46093
  exports.colors = [
46086
46094
  20,
@@ -46993,7 +47001,7 @@ var require_node3 = __commonJS((exports, module) => {
46993
47001
  exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
46994
47002
  exports.colors = [6, 2, 3, 4, 5, 1];
46995
47003
  try {
46996
- const supportsColor = (()=>{throw new Error("Cannot require module "+"supports-color");})();
47004
+ const supportsColor = require_supports_color();
46997
47005
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
46998
47006
  exports.colors = [
46999
47007
  20,
@@ -48806,7 +48814,7 @@ var require_node4 = __commonJS((exports, module) => {
48806
48814
  exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
48807
48815
  exports.colors = [6, 2, 3, 4, 5, 1];
48808
48816
  try {
48809
- const supportsColor = (()=>{throw new Error("Cannot require module "+"supports-color");})();
48817
+ const supportsColor = require_supports_color();
48810
48818
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
48811
48819
  exports.colors = [
48812
48820
  20,
@@ -51644,7 +51652,7 @@ var require_node5 = __commonJS((exports, module) => {
51644
51652
  exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
51645
51653
  exports.colors = [6, 2, 3, 4, 5, 1];
51646
51654
  try {
51647
- const supportsColor = (()=>{throw new Error("Cannot require module "+"supports-color");})();
51655
+ const supportsColor = require_supports_color();
51648
51656
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
51649
51657
  exports.colors = [
51650
51658
  20,
@@ -54980,13 +54988,13 @@ async function initSlackApp() {
54980
54988
  socketMode: true,
54981
54989
  logLevel: import_bolt.LogLevel.DEBUG
54982
54990
  });
54983
- const { registerMessageHandler } = await import("./handlers-h9vh0t22.js");
54984
- const { registerCommandHandler } = await import("./commands-ys948zs2.js");
54985
- const { registerActionHandlers } = await import("./actions-q3hcb6ea.js");
54991
+ const { registerMessageHandler } = await import("./handlers-mezjqnv9.js");
54992
+ const { registerCommandHandler } = await import("./commands-d0taq40d.js");
54993
+ const { registerActionHandlers } = await import("./actions-0a8stf21.js");
54986
54994
  registerMessageHandler(app);
54987
54995
  registerCommandHandler(app);
54988
54996
  registerActionHandlers(app);
54989
- const { createAssistant } = await import("./assistant-a6vp3nv8.js");
54997
+ const { createAssistant } = await import("./assistant-609ad3tq.js");
54990
54998
  app.assistant(createAssistant());
54991
54999
  return app;
54992
55000
  }