@sentry/junior 0.138.0 → 0.140.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 (81) hide show
  1. package/dist/{agent-hooks-SCR74Q3E.js → agent-hooks-BFTDRFUO.js} +10 -10
  2. package/dist/api/schema/task.d.ts +104 -1
  3. package/dist/api/schema.d.ts +2 -2
  4. package/dist/api/schema.js +9 -1
  5. package/dist/api.js +198 -54
  6. package/dist/app.js +374 -607
  7. package/dist/{catalog-runtime-IU3QF4GG.js → catalog-runtime-RK664S5T.js} +6 -6
  8. package/dist/chat/agent/request.d.ts +12 -2
  9. package/dist/chat/credentials/context.d.ts +14 -0
  10. package/dist/chat/resource-events/actor.d.ts +23 -0
  11. package/dist/chat/scheduled-tasks/telemetry.d.ts +7 -0
  12. package/dist/chat/scheduled-tasks/tool-support.d.ts +10 -2
  13. package/dist/chat/scheduled-tasks/tools/create.d.ts +4 -2
  14. package/dist/chat/scheduled-tasks/tools/delete.d.ts +4 -2
  15. package/dist/chat/scheduled-tasks/tools/list.d.ts +4 -2
  16. package/dist/chat/scheduled-tasks/tools/run-now.d.ts +4 -2
  17. package/dist/chat/scheduled-tasks/tools/update.d.ts +4 -2
  18. package/dist/chat/scheduled-tasks/types.d.ts +1 -1
  19. package/dist/chat/slack/dashboard-link.d.ts +2 -0
  20. package/dist/chat/state/turn-session-keys.d.ts +2 -2
  21. package/dist/chat/state/turn-session.d.ts +16 -12
  22. package/dist/chat/tasks/execution-stats.d.ts +34 -3
  23. package/dist/chat/tasks/read.d.ts +3 -1
  24. package/dist/chunk-3B7O3GNU.js +207 -0
  25. package/dist/{chunk-N7WARMC6.js → chunk-3CUBAGA3.js} +7 -7
  26. package/dist/{chunk-5MXWHTCK.js → chunk-4PIT6O7A.js} +17 -8
  27. package/dist/{chunk-DCLLQGS6.js → chunk-557HLSNH.js} +8 -3
  28. package/dist/{chunk-SD3OFRWY.js → chunk-5KAZMR5U.js} +6 -6
  29. package/dist/{chunk-ZBSMCXKV.js → chunk-5YAWB2AX.js} +7 -6
  30. package/dist/{chunk-FEUNPTGV.js → chunk-A6BI25J3.js} +434 -12
  31. package/dist/{chunk-5LTJ4ITU.js → chunk-AA2EPMUF.js} +4 -4
  32. package/dist/{chunk-TUUDXEXU.js → chunk-BMFRFSTM.js} +68 -79
  33. package/dist/{chunk-C7ZVPO4Z.js → chunk-CPPTBHQN.js} +1 -1
  34. package/dist/{chunk-ZXNTJJIE.js → chunk-D3X2PI3D.js} +2 -2
  35. package/dist/{chunk-LPVUNO2W.js → chunk-DMDOKRPC.js} +7 -7
  36. package/dist/{chunk-TCS76X5D.js → chunk-HEFBGCCU.js} +2 -2
  37. package/dist/{chunk-EPBBYMNE.js → chunk-HUO3UTAQ.js} +1 -1
  38. package/dist/{chunk-KFRHRSCJ.js → chunk-I3OZR3HG.js} +2 -2
  39. package/dist/{chunk-BOLJOV5T.js → chunk-J5H65GY2.js} +1 -1
  40. package/dist/{chunk-RZIBSCYC.js → chunk-MYVCHWDG.js} +39 -23
  41. package/dist/{chunk-QS527AV5.js → chunk-N2I7W2VS.js} +1 -1
  42. package/dist/{chunk-JNNJZURV.js → chunk-NPL66ZWL.js} +1 -1
  43. package/dist/{chunk-A7WCHXZV.js → chunk-OGNL2QY7.js} +4 -4
  44. package/dist/{chunk-77VDLF3Z.js → chunk-RUIXF3YQ.js} +10 -0
  45. package/dist/{chunk-BYW4B4PR.js → chunk-S3FAOKQU.js} +2 -2
  46. package/dist/chunk-TGIKZJ3Y.js +115 -0
  47. package/dist/{chunk-YU5QUF67.js → chunk-TKTZ4L4Z.js} +1 -1
  48. package/dist/{chunk-VPZFVJND.js → chunk-UXMRN2ZX.js} +1 -1
  49. package/dist/{chunk-HIWJWWMT.js → chunk-VRDHAITB.js} +3 -3
  50. package/dist/{chunk-SIPKWSXK.js → chunk-WSWM6A3R.js} +3 -3
  51. package/dist/{chunk-FNLBTB4K.js → chunk-WTGLUX4K.js} +1 -1
  52. package/dist/{chunk-PB3CXNVL.js → chunk-XROWZSOY.js} +1 -1
  53. package/dist/{chunk-TDJCLNDH.js → chunk-XX2QNQN4.js} +147 -86
  54. package/dist/{chunk-KDCHVT25.js → chunk-YB363QGA.js} +9 -2
  55. package/dist/{chunk-HCIVH3JS.js → chunk-YWM6MJT4.js} +29 -1
  56. package/dist/{chunk-E5UYAIKJ.js → chunk-Z2A7BDHT.js} +17 -19
  57. package/dist/cli/chat.js +33 -33
  58. package/dist/cli/check.js +7 -7
  59. package/dist/cli/plugins.js +14 -14
  60. package/dist/cli/snapshot-create.js +10 -10
  61. package/dist/cli/upgrade.js +8 -8
  62. package/dist/db/schema/task-executions.d.ts +23 -2
  63. package/dist/db/schema.d.ts +20 -1
  64. package/dist/{db-UO2IWXGA.js → db-QOGYDDQM.js} +7 -7
  65. package/dist/instrumentation.js +4 -4
  66. package/dist/nitro.js +2 -2
  67. package/dist/{oauth-callback-server-MAQI43LX.js → oauth-callback-server-CT4RMGCP.js} +22 -21
  68. package/dist/{runner-PIUQEXKE.js → runner-PHMLHNLX.js} +18 -16
  69. package/dist/{sandbox-egress-signals-A5HWIQH4.js → sandbox-egress-signals-EKPAVWQL.js} +2 -2
  70. package/dist/{skills-4ARJADHQ.js → skills-AYRM4QGF.js} +7 -7
  71. package/dist/spawn-OGRQFUNK.js +38 -0
  72. package/dist/{validation-S3EE3HWL.js → validation-M5JNGRGL.js} +7 -7
  73. package/dist/version.js +1 -1
  74. package/dist/{work-UARRUAW3.js → work-LZWE6HK4.js} +18 -18
  75. package/dist/{worker-DOCIRVD3.js → worker-KOGPXFYK.js} +10 -10
  76. package/migrations/0022_task_execution_status.sql +3 -0
  77. package/migrations/meta/0022_snapshot.json +2186 -0
  78. package/migrations/meta/_journal.json +7 -0
  79. package/package.json +5 -5
  80. package/dist/chunk-ELKW5FIB.js +0 -233
  81. package/dist/spawn-G2AWPMCT.js +0 -38
@@ -0,0 +1,207 @@
1
+ import {
2
+ getDb
3
+ } from "./chunk-WSWM6A3R.js";
4
+ import {
5
+ juniorConversations,
6
+ juniorTaskExecutions
7
+ } from "./chunk-557HLSNH.js";
8
+ import {
9
+ logWarn
10
+ } from "./chunk-NPL66ZWL.js";
11
+
12
+ // src/chat/tasks/execution-stats.ts
13
+ import { and, asc, count, desc, eq, gte, inArray, lte, max, sql } from "drizzle-orm";
14
+ var TASK_EXECUTION_STATUSES = [
15
+ "blocked",
16
+ "completed",
17
+ "failed"
18
+ ];
19
+ function utcDate(nowMs) {
20
+ return new Date(nowMs).toISOString().slice(0, 10);
21
+ }
22
+ function emptyDay(date) {
23
+ return { date, event: 0, scheduled: 0 };
24
+ }
25
+ function emptyStatusDay(date) {
26
+ return { blocked: 0, completed: 0, date, failed: 0 };
27
+ }
28
+ async function recordTaskExecution(type, taskId, options) {
29
+ const namespace = options.namespace ?? "junior";
30
+ const nowMs = options.nowMs ?? Date.now();
31
+ const status = options.status ?? "completed";
32
+ try {
33
+ await getDb().insert(juniorTaskExecutions).values({
34
+ ...options.conversationId ? { conversationId: options.conversationId } : {},
35
+ executedAtMs: nowMs,
36
+ executionId: options.executionId,
37
+ kind: type,
38
+ namespace,
39
+ status,
40
+ taskId
41
+ }).onConflictDoNothing({
42
+ target: [
43
+ juniorTaskExecutions.kind,
44
+ juniorTaskExecutions.namespace,
45
+ juniorTaskExecutions.executionId
46
+ ]
47
+ });
48
+ } catch (error) {
49
+ logWarn("task.execution.stat_failed", {
50
+ error,
51
+ "app.task.execution.id": options.executionId,
52
+ "app.task.execution.namespace": namespace,
53
+ "app.task.execution.status": status,
54
+ "app.task.execution.task_id": taskId,
55
+ "app.task.execution.type": type
56
+ });
57
+ }
58
+ }
59
+ async function readTaskExecutionSummaries(type, namespace, options = {}) {
60
+ const sevenDaysAgoMs = (options.nowMs ?? Date.now()) - 7 * 24 * 60 * 60 * 1e3;
61
+ const db = getDb();
62
+ const latest = db.selectDistinctOn([juniorTaskExecutions.taskId], {
63
+ conversationId: juniorTaskExecutions.conversationId,
64
+ taskId: juniorTaskExecutions.taskId
65
+ }).from(juniorTaskExecutions).where(
66
+ and(
67
+ eq(juniorTaskExecutions.kind, type),
68
+ eq(juniorTaskExecutions.namespace, namespace)
69
+ )
70
+ ).orderBy(
71
+ juniorTaskExecutions.taskId,
72
+ desc(juniorTaskExecutions.executedAtMs),
73
+ desc(juniorTaskExecutions.executionId)
74
+ ).as("latest_task_execution");
75
+ const rows = await db.select({
76
+ lastConversationId: latest.conversationId,
77
+ lastExecutedAtMs: max(juniorTaskExecutions.executedAtMs),
78
+ runsLast7Days: sql`count(*) filter (where ${juniorTaskExecutions.executedAtMs} >= ${sevenDaysAgoMs})::int`,
79
+ taskId: juniorTaskExecutions.taskId,
80
+ totalRuns: sql`count(*)::int`
81
+ }).from(juniorTaskExecutions).innerJoin(latest, eq(latest.taskId, juniorTaskExecutions.taskId)).where(
82
+ and(
83
+ eq(juniorTaskExecutions.kind, type),
84
+ eq(juniorTaskExecutions.namespace, namespace)
85
+ )
86
+ ).groupBy(juniorTaskExecutions.taskId, latest.conversationId);
87
+ return new Map(
88
+ rows.map((row) => [
89
+ row.taskId,
90
+ {
91
+ ...row.lastConversationId ? { lastConversationId: row.lastConversationId } : {},
92
+ ...row.lastExecutedAtMs !== null ? { lastExecutedAtMs: row.lastExecutedAtMs } : {},
93
+ runsLast7Days: row.runsLast7Days,
94
+ totalRuns: row.totalRuns
95
+ }
96
+ ])
97
+ );
98
+ }
99
+ async function readTaskExecutionDays(dayCount = 90, options = {}) {
100
+ const nowMs = options.nowMs ?? Date.now();
101
+ const end = utcDate(nowMs);
102
+ const endMs = Date.parse(`${end}T23:59:59.999Z`);
103
+ const startMs = Date.parse(`${end}T00:00:00.000Z`) - (dayCount - 1) * 864e5;
104
+ const executionDate = sql`to_char(to_timestamp(${juniorTaskExecutions.executedAtMs} / 1000.0) at time zone 'UTC', 'YYYY-MM-DD')`;
105
+ const rows = await getDb().select({
106
+ count: count(),
107
+ date: executionDate,
108
+ kind: juniorTaskExecutions.kind
109
+ }).from(juniorTaskExecutions).where(
110
+ and(
111
+ gte(juniorTaskExecutions.executedAtMs, startMs),
112
+ lte(juniorTaskExecutions.executedAtMs, endMs),
113
+ eq(juniorTaskExecutions.status, "completed")
114
+ )
115
+ ).groupBy(executionDate, juniorTaskExecutions.kind).orderBy(asc(executionDate), asc(juniorTaskExecutions.kind));
116
+ const byDate = /* @__PURE__ */ new Map();
117
+ for (let offset = 0; offset < dayCount; offset += 1) {
118
+ const date = utcDate(startMs + offset * 864e5);
119
+ byDate.set(date, emptyDay(date));
120
+ }
121
+ for (const row of rows) {
122
+ const day = byDate.get(row.date);
123
+ if (!day) continue;
124
+ if (row.kind === "scheduled") day.scheduled = row.count;
125
+ else if (row.kind === "event") day.event = row.count;
126
+ }
127
+ return [...byDate.values()];
128
+ }
129
+ async function readTaskExecutions(args) {
130
+ const namespace = args.namespace ?? "junior";
131
+ const rows = await getDb().select({
132
+ conversationId: juniorTaskExecutions.conversationId,
133
+ executedAtMs: juniorTaskExecutions.executedAtMs,
134
+ executionId: juniorTaskExecutions.executionId,
135
+ status: juniorTaskExecutions.status,
136
+ title: juniorConversations.title
137
+ }).from(juniorTaskExecutions).leftJoin(
138
+ juniorConversations,
139
+ eq(
140
+ juniorConversations.conversationId,
141
+ juniorTaskExecutions.conversationId
142
+ )
143
+ ).where(
144
+ and(
145
+ eq(juniorTaskExecutions.kind, args.kind),
146
+ eq(juniorTaskExecutions.namespace, namespace),
147
+ eq(juniorTaskExecutions.taskId, args.taskId)
148
+ )
149
+ ).orderBy(
150
+ desc(juniorTaskExecutions.executedAtMs),
151
+ desc(juniorTaskExecutions.executionId)
152
+ ).limit(args.limit);
153
+ return rows.map((row) => {
154
+ const title = row.title?.trim();
155
+ return {
156
+ ...row.conversationId ? { conversationId: row.conversationId } : {},
157
+ executedAt: new Date(row.executedAtMs).toISOString(),
158
+ executionId: row.executionId,
159
+ status: row.status,
160
+ ...title ? { title } : {}
161
+ };
162
+ });
163
+ }
164
+ async function readTaskExecutionStatusDays(args) {
165
+ const dayCount = args.dayCount ?? 90;
166
+ const namespace = args.namespace ?? "junior";
167
+ const nowMs = args.nowMs ?? Date.now();
168
+ const end = utcDate(nowMs);
169
+ const endMs = Date.parse(`${end}T23:59:59.999Z`);
170
+ const startMs = Date.parse(`${end}T00:00:00.000Z`) - (dayCount - 1) * 864e5;
171
+ const executionDate = sql`to_char(to_timestamp(${juniorTaskExecutions.executedAtMs} / 1000.0) at time zone 'UTC', 'YYYY-MM-DD')`;
172
+ const rows = await getDb().select({
173
+ count: count(),
174
+ date: executionDate,
175
+ status: juniorTaskExecutions.status
176
+ }).from(juniorTaskExecutions).where(
177
+ and(
178
+ eq(juniorTaskExecutions.kind, args.kind),
179
+ eq(juniorTaskExecutions.namespace, namespace),
180
+ eq(juniorTaskExecutions.taskId, args.taskId),
181
+ gte(juniorTaskExecutions.executedAtMs, startMs),
182
+ lte(juniorTaskExecutions.executedAtMs, endMs),
183
+ inArray(juniorTaskExecutions.status, [...TASK_EXECUTION_STATUSES])
184
+ )
185
+ ).groupBy(executionDate, juniorTaskExecutions.status).orderBy(asc(executionDate), asc(juniorTaskExecutions.status));
186
+ const byDate = /* @__PURE__ */ new Map();
187
+ for (let offset = 0; offset < dayCount; offset += 1) {
188
+ const date = utcDate(startMs + offset * 864e5);
189
+ byDate.set(date, emptyStatusDay(date));
190
+ }
191
+ for (const row of rows) {
192
+ const day = byDate.get(row.date);
193
+ if (!day) continue;
194
+ if (row.status === "completed") day.completed = row.count;
195
+ else if (row.status === "failed") day.failed = row.count;
196
+ else if (row.status === "blocked") day.blocked = row.count;
197
+ }
198
+ return [...byDate.values()];
199
+ }
200
+
201
+ export {
202
+ recordTaskExecution,
203
+ readTaskExecutionSummaries,
204
+ readTaskExecutionDays,
205
+ readTaskExecutions,
206
+ readTaskExecutionStatusDays
207
+ };
@@ -1,30 +1,30 @@
1
1
  import {
2
2
  resolveBaseUrl
3
- } from "./chunk-SD3OFRWY.js";
3
+ } from "./chunk-5KAZMR5U.js";
4
4
  import {
5
5
  createPluginLogger,
6
6
  getPlugins
7
- } from "./chunk-5MXWHTCK.js";
7
+ } from "./chunk-4PIT6O7A.js";
8
8
  import {
9
9
  getDb,
10
10
  parseDestination
11
- } from "./chunk-SIPKWSXK.js";
11
+ } from "./chunk-WSWM6A3R.js";
12
12
  import {
13
13
  sleep
14
14
  } from "./chunk-EM225ITJ.js";
15
15
  import {
16
16
  acquireActiveLock,
17
17
  getStateAdapter
18
- } from "./chunk-BOLJOV5T.js";
18
+ } from "./chunk-J5H65GY2.js";
19
19
  import {
20
20
  pluginCatalogRuntime
21
- } from "./chunk-QS527AV5.js";
21
+ } from "./chunk-N2I7W2VS.js";
22
22
  import {
23
23
  fetchWithBoundedOAuthErrorBodies
24
- } from "./chunk-KFRHRSCJ.js";
24
+ } from "./chunk-I3OZR3HG.js";
25
25
  import {
26
26
  isRecord
27
- } from "./chunk-JNNJZURV.js";
27
+ } from "./chunk-NPL66ZWL.js";
28
28
 
29
29
  // src/chat/capabilities/router.ts
30
30
  var ProviderCredentialRouter = class {
@@ -4,30 +4,30 @@ import {
4
4
  isConversationScopedChannel,
5
5
  isDmChannel,
6
6
  normalizeSlackConversationId
7
- } from "./chunk-TCS76X5D.js";
7
+ } from "./chunk-HEFBGCCU.js";
8
8
  import {
9
9
  getConversationEventStore,
10
10
  getDb
11
- } from "./chunk-SIPKWSXK.js";
11
+ } from "./chunk-WSWM6A3R.js";
12
12
  import {
13
13
  juniorConversationAnnotations,
14
14
  juniorConversationEvents,
15
15
  juniorIdentities,
16
16
  juniorUsers
17
- } from "./chunk-DCLLQGS6.js";
17
+ } from "./chunk-557HLSNH.js";
18
18
  import {
19
19
  SANDBOX_WORKSPACE_ROOT
20
20
  } from "./chunk-EM225ITJ.js";
21
21
  import {
22
22
  getStateAdapter
23
- } from "./chunk-BOLJOV5T.js";
23
+ } from "./chunk-J5H65GY2.js";
24
24
  import {
25
25
  botConfig,
26
26
  completeObject,
27
27
  embedTexts,
28
28
  getSlackBotToken,
29
29
  standardModelId
30
- } from "./chunk-BYW4B4PR.js";
30
+ } from "./chunk-S3FAOKQU.js";
31
31
  import {
32
32
  isActorUserId,
33
33
  parseActorUserId
@@ -42,7 +42,7 @@ import {
42
42
  logInfo,
43
43
  logWarn,
44
44
  normalizeIdentityEmail
45
- } from "./chunk-JNNJZURV.js";
45
+ } from "./chunk-NPL66ZWL.js";
46
46
 
47
47
  // src/chat/plugins/agent-hooks.ts
48
48
  import {
@@ -416,7 +416,7 @@ function setDashboardConversationLinkOptions(options) {
416
416
  dashboardConversationLinkOptions = options?.disabled ? void 0 : options;
417
417
  return previous;
418
418
  }
419
- function getDashboardConversationLink(conversationId) {
419
+ function resolveDashboardPath(segmentPath) {
420
420
  if (!dashboardConversationLinkOptions) {
421
421
  return void 0;
422
422
  }
@@ -425,9 +425,17 @@ function getDashboardConversationLink(conversationId) {
425
425
  dashboardConversationLinkOptions.basePath,
426
426
  "/"
427
427
  );
428
- const path = basePath === "/" ? `/conversations/${encodeURIComponent(conversationId)}` : `${basePath}/conversations/${encodeURIComponent(conversationId)}`;
428
+ const path = basePath === "/" ? segmentPath : `${basePath}${segmentPath}`;
429
429
  return `${baseURL}${path}`;
430
430
  }
431
+ function getDashboardConversationLink(conversationId) {
432
+ return resolveDashboardPath(
433
+ `/conversations/${encodeURIComponent(conversationId)}`
434
+ );
435
+ }
436
+ function getDashboardTaskLink(taskId) {
437
+ return resolveDashboardPath(`/tasks/${encodeURIComponent(taskId)}`);
438
+ }
431
439
 
432
440
  // src/chat/resource-events/workspace.ts
433
441
  function canRouteResourceEvents() {
@@ -1803,6 +1811,7 @@ export {
1803
1811
  createPluginState,
1804
1812
  setDashboardConversationLinkOptions,
1805
1813
  getDashboardConversationLink,
1814
+ getDashboardTaskLink,
1806
1815
  canRouteResourceEvents,
1807
1816
  createResourceEventTeamIdResolver,
1808
1817
  getSlackToolContext,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SQL_STATEMENT_TIMEOUT_MS
3
- } from "./chunk-BYW4B4PR.js";
3
+ } from "./chunk-S3FAOKQU.js";
4
4
  import {
5
5
  juniorDestinations,
6
6
  timestamptz
@@ -433,14 +433,19 @@ var juniorTaskExecutions = pgTable11(
433
433
  kind: text11("kind").notNull(),
434
434
  namespace: text11("namespace").notNull(),
435
435
  taskId: text11("task_id").notNull(),
436
- conversationId: text11("conversation_id").notNull(),
437
- executedAtMs: bigint2("executed_at_ms", { mode: "number" }).notNull()
436
+ conversationId: text11("conversation_id"),
437
+ executedAtMs: bigint2("executed_at_ms", { mode: "number" }).notNull(),
438
+ status: text11("status").$type().notNull()
438
439
  },
439
440
  (table) => [
440
441
  check(
441
442
  "junior_task_executions_kind_check",
442
443
  sql4`${table.kind} in ('scheduled', 'event')`
443
444
  ),
445
+ check(
446
+ "junior_task_executions_status_check",
447
+ sql4`${table.status} in ('blocked', 'completed', 'failed')`
448
+ ),
444
449
  primaryKey6({
445
450
  name: "junior_task_executions_kind_namespace_execution_id_pk",
446
451
  columns: [table.kind, table.namespace, table.executionId]
@@ -4,19 +4,19 @@ import {
4
4
  isDmChannel,
5
5
  normalizeSlackConversationId,
6
6
  withSlackRetries
7
- } from "./chunk-TCS76X5D.js";
7
+ } from "./chunk-HEFBGCCU.js";
8
8
  import {
9
9
  parseDestination
10
- } from "./chunk-SIPKWSXK.js";
10
+ } from "./chunk-WSWM6A3R.js";
11
11
  import {
12
12
  getStateAdapter
13
- } from "./chunk-BOLJOV5T.js";
13
+ } from "./chunk-J5H65GY2.js";
14
14
  import {
15
15
  normalizeSlackEmojiName
16
- } from "./chunk-BYW4B4PR.js";
16
+ } from "./chunk-S3FAOKQU.js";
17
17
  import {
18
18
  pluginCatalogRuntime
19
- } from "./chunk-QS527AV5.js";
19
+ } from "./chunk-N2I7W2VS.js";
20
20
  import {
21
21
  parseSlackMessageTs,
22
22
  parseSlackUserId
@@ -25,7 +25,7 @@ import {
25
25
  isRecord,
26
26
  logInfo,
27
27
  logWarn
28
- } from "./chunk-JNNJZURV.js";
28
+ } from "./chunk-NPL66ZWL.js";
29
29
 
30
30
  // src/chat/slack/outbound.ts
31
31
  var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  appendAndEnqueueInboundMessage
3
- } from "./chunk-5LTJ4ITU.js";
3
+ } from "./chunk-AA2EPMUF.js";
4
4
  import {
5
5
  ConversationTurnLifecycleService
6
6
  } from "./chunk-Q6QZTTLS.js";
@@ -12,7 +12,7 @@ import {
12
12
  agentBindingSchema,
13
13
  agentInvocationSchema,
14
14
  createAgentInvocationSchema
15
- } from "./chunk-LPVUNO2W.js";
15
+ } from "./chunk-DMDOKRPC.js";
16
16
  import {
17
17
  TurnInputCommitLostError,
18
18
  coerceThreadArtifactsState,
@@ -28,16 +28,16 @@ import {
28
28
  persistCompletedSessionRecord,
29
29
  persistThreadStateById,
30
30
  persistYieldSessionRecord
31
- } from "./chunk-TUUDXEXU.js";
31
+ } from "./chunk-BMFRFSTM.js";
32
32
  import {
33
33
  getConversationEventStore,
34
34
  getConversationStore,
35
35
  getSqlExecutor
36
- } from "./chunk-SIPKWSXK.js";
36
+ } from "./chunk-WSWM6A3R.js";
37
37
  import {
38
38
  juniorAgentBindings,
39
39
  juniorAgentInvocations
40
- } from "./chunk-DCLLQGS6.js";
40
+ } from "./chunk-557HLSNH.js";
41
41
 
42
42
  // src/chat/agent-invocations/work.ts
43
43
  import { z } from "zod";
@@ -442,7 +442,8 @@ async function recoverRunningSession(invocation) {
442
442
  errorMessage: "Recovered running agent invocation after worker loss",
443
443
  messages: session.piMessages,
444
444
  modelId: session.modelId,
445
- actor: session.actor,
445
+ // Execution actor lives on the parent invocation record, not Redis.
446
+ actor: invocation.actor,
446
447
  reasoningLevel: session.reasoningLevel,
447
448
  sessionId: session.sessionId,
448
449
  surface: session.surface