@sentry/junior 0.153.0 → 0.155.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 (83) hide show
  1. package/dist/{agent-hooks-7BWOB7SN.js → agent-hooks-AWVTLAV2.js} +11 -12
  2. package/dist/api/conversations/list.d.ts +5 -3
  3. package/dist/api/conversations/membership.d.ts +16 -0
  4. package/dist/api/locations/detail.d.ts +1 -0
  5. package/dist/api/schema/conversation.d.ts +3 -0
  6. package/dist/api/schema/location.d.ts +1 -0
  7. package/dist/api/schema/person.d.ts +1 -0
  8. package/dist/api/schema.js +1 -1
  9. package/dist/api.js +318 -187
  10. package/dist/app.js +39 -39
  11. package/dist/catalog-runtime-V6YD6KH5.js +16 -0
  12. package/dist/chat/conversations/sql/event-actor.d.ts +14 -0
  13. package/dist/chat/conversations/sql/event-lock.d.ts +1 -1
  14. package/dist/chat/conversations/sql/participants.d.ts +17 -0
  15. package/dist/chat/plugins/unfinished-work.d.ts +2 -0
  16. package/dist/chat/runtime/agent-runner.d.ts +2 -0
  17. package/dist/chat/runtime/slack-resume.d.ts +1 -1
  18. package/dist/chat/state/conversation.d.ts +1 -0
  19. package/dist/{chunk-O2YXWWPM.js → chunk-2AHVM3HK.js} +92 -9
  20. package/dist/{chunk-VXWTGOLW.js → chunk-2WLJDM23.js} +1 -1
  21. package/dist/{chunk-4TWLKHOM.js → chunk-37G5HJ2X.js} +4 -4
  22. package/dist/{chunk-ISEROVYZ.js → chunk-4K5N6HTX.js} +5 -5
  23. package/dist/{chunk-ET54Q4TD.js → chunk-773XC7P4.js} +116 -82
  24. package/dist/{chunk-HUO3UTAQ.js → chunk-7MA4HV4W.js} +1 -1
  25. package/dist/{chunk-HMU2QP5M.js → chunk-7NYEB2TM.js} +1 -1
  26. package/dist/{chunk-URFV5RWN.js → chunk-AENPRXCG.js} +23 -56
  27. package/dist/{chunk-TIV3PX5H.js → chunk-APHDJYN7.js} +2 -2
  28. package/dist/{chunk-RUIXF3YQ.js → chunk-BDUENQD3.js} +1 -1
  29. package/dist/{chunk-5TXDKTET.js → chunk-CPQBTTI6.js} +7 -7
  30. package/dist/{chunk-A5SROS6H.js → chunk-ELOTIL5F.js} +5 -5
  31. package/dist/{chunk-JJAMURMR.js → chunk-EORR34UB.js} +1 -1
  32. package/dist/{chunk-5QBK3QHJ.js → chunk-J2SYI36O.js} +6 -8
  33. package/dist/{chunk-K4LK6KYO.js → chunk-J7MWZFFP.js} +4 -4
  34. package/dist/{chunk-COC65LIW.js → chunk-JFZBGFNX.js} +3 -1
  35. package/dist/{chunk-YECBSG77.js → chunk-JIC33O5L.js} +2 -2
  36. package/dist/{chunk-XAYXN4EG.js → chunk-JJX77MB7.js} +366 -138
  37. package/dist/{chunk-FLEY546A.js → chunk-KBT2I5ER.js} +7 -7
  38. package/dist/{chunk-37LMRT7G.js → chunk-KTVHAHUV.js} +1 -1
  39. package/dist/{chunk-PMJAY6JS.js → chunk-LQT3SWFA.js} +5 -5
  40. package/dist/{chunk-HYEAR6HL.js → chunk-MLBH7J7J.js} +1 -1
  41. package/dist/{chunk-5DMPHA4V.js → chunk-NKFRRZIT.js} +27 -37
  42. package/dist/{chunk-HOK7MEWG.js → chunk-NWSKFYOH.js} +1 -1
  43. package/dist/{chunk-JY2HJYJT.js → chunk-RN3AWYEP.js} +2 -2
  44. package/dist/{chunk-RKW5QGGN.js → chunk-RQ62VKM7.js} +1 -1
  45. package/dist/{chunk-XQPKMLRI.js → chunk-SDRJ2LE3.js} +1 -1
  46. package/dist/{chunk-JAJVUQV7.js → chunk-TKJ7277U.js} +3 -3
  47. package/dist/{chunk-EPOA52SD.js → chunk-TVXAN43I.js} +1 -1
  48. package/dist/{chunk-2NS3ACHB.js → chunk-UWTXAYBP.js} +11 -11
  49. package/dist/{chunk-2J4VCHRX.js → chunk-V57LZDHN.js} +8 -10
  50. package/dist/{chunk-HZF5P5UN.js → chunk-V7YE4WCP.js} +58 -7
  51. package/dist/{chunk-PGJBNO3I.js → chunk-XFZLQANQ.js} +2 -2
  52. package/dist/{chunk-5XBRH3N7.js → chunk-Y6MVGU7L.js} +12 -11
  53. package/dist/{chunk-WTKAALLV.js → chunk-Y7ZUBP2K.js} +6 -6
  54. package/dist/{chunk-UG5UCHHJ.js → chunk-ZLSFOSDK.js} +2 -1
  55. package/dist/cli/chat.js +36 -36
  56. package/dist/cli/check.js +8 -9
  57. package/dist/cli/init.js +41 -7
  58. package/dist/cli/plugins.js +15 -16
  59. package/dist/cli/snapshot-create.js +11 -12
  60. package/dist/cli/upgrade.js +9 -10
  61. package/dist/db/schema/conversation-events.d.ts +20 -0
  62. package/dist/db/schema/conversation-participants.d.ts +63 -0
  63. package/dist/db/schema.d.ts +77 -1
  64. package/dist/{db-QNQM5YRR.js → db-WT7P56AH.js} +8 -8
  65. package/dist/instrumentation.js +4 -4
  66. package/dist/nitro.js +2 -2
  67. package/dist/{oauth-callback-server-ERQPIR27.js → oauth-callback-server-R2PK2MCA.js} +26 -26
  68. package/dist/{runner-BX46SQIE.js → runner-O7YYUIHT.js} +15 -16
  69. package/dist/{sandbox-egress-signals-EKPAVWQL.js → sandbox-egress-signals-U3ZX7C5W.js} +3 -4
  70. package/dist/{skills-JL44EIRX.js → skills-S6HLQRH7.js} +8 -9
  71. package/dist/spawn-B4SBFFA2.js +37 -0
  72. package/dist/{validation-UU2AIJIY.js → validation-46WD2OAR.js} +8 -9
  73. package/dist/version.js +1 -1
  74. package/dist/{work-SS7RU5CH.js → work-YT5QUBS3.js} +20 -21
  75. package/dist/worker-4C5BEDWN.js +24 -0
  76. package/migrations/0026_conversation_event_actor_and_participants.sql +140 -0
  77. package/migrations/meta/0026_snapshot.json +2424 -0
  78. package/migrations/meta/_journal.json +7 -0
  79. package/package.json +8 -6
  80. package/dist/catalog-runtime-CGUDNL3D.js +0 -17
  81. package/dist/chunk-F3B2YJ76.js +0 -57
  82. package/dist/spawn-W6FO32T4.js +0 -38
  83. package/dist/worker-5P2E7LVI.js +0 -25
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SQL_STATEMENT_TIMEOUT_MS
3
- } from "./chunk-PGJBNO3I.js";
3
+ } from "./chunk-XFZLQANQ.js";
4
4
  import {
5
5
  juniorDestinations,
6
6
  timestamptz
@@ -247,6 +247,9 @@ var juniorConversationEvents = pgTable6(
247
247
  idempotencyKey: text6("idempotency_key"),
248
248
  type: text6("type").notNull(),
249
249
  payload: jsonb4("payload").$type().notNull(),
250
+ actorIdentityId: text6("actor_identity_id").references(
251
+ () => juniorIdentities.id
252
+ ),
250
253
  createdAt: timestamptz("created_at").notNull()
251
254
  },
252
255
  (table) => [
@@ -269,6 +272,11 @@ var juniorConversationEvents = pgTable6(
269
272
  table.type,
270
273
  table.seq
271
274
  ),
275
+ index4("junior_conversation_events_actor_identity_idx").on(
276
+ table.actorIdentityId,
277
+ table.conversationId,
278
+ table.seq
279
+ ),
272
280
  index4("junior_conversation_events_message_search_idx").using("gin", sql3`to_tsvector('english', ${table.payload}->>'text')`).where(sql3`${table.type} = 'message'`),
273
281
  uniqueIndex4("junior_conversation_events_idempotency_idx").on(
274
282
  table.conversationId,
@@ -305,28 +313,52 @@ var juniorConversationBindings = pgTable7(
305
313
  ]
306
314
  );
307
315
 
316
+ // src/db/schema/conversation-participants.ts
317
+ import { index as index6, pgTable as pgTable8, primaryKey as primaryKey4, text as text8 } from "drizzle-orm/pg-core";
318
+ var juniorConversationParticipants = pgTable8(
319
+ "junior_conversation_participants",
320
+ {
321
+ userId: text8("user_id").notNull().references(() => juniorUsers.id),
322
+ rootConversationId: text8("root_conversation_id").notNull().references(() => juniorConversations.conversationId),
323
+ lastMessageAt: timestamptz("last_message_at").notNull()
324
+ },
325
+ (table) => [
326
+ primaryKey4({
327
+ name: "junior_conversation_participants_user_root_pk",
328
+ columns: [table.userId, table.rootConversationId]
329
+ }),
330
+ index6("junior_conversation_participants_user_activity_idx").on(
331
+ table.userId,
332
+ table.lastMessageAt.desc()
333
+ ),
334
+ index6("junior_conversation_participants_root_idx").on(
335
+ table.rootConversationId
336
+ )
337
+ ]
338
+ );
339
+
308
340
  // src/db/schema/agent-invocations.ts
309
341
  import {
310
- index as index6,
342
+ index as index7,
311
343
  jsonb as jsonb5,
312
- pgTable as pgTable8,
313
- primaryKey as primaryKey4,
314
- text as text8,
344
+ pgTable as pgTable9,
345
+ primaryKey as primaryKey5,
346
+ text as text9,
315
347
  uniqueIndex as uniqueIndex5
316
348
  } from "drizzle-orm/pg-core";
317
349
  var AGENT_INVOCATION_MAILBOX_STATUSES = [
318
350
  "pending",
319
351
  "appended"
320
352
  ];
321
- var juniorAgentBindings = pgTable8(
353
+ var juniorAgentBindings = pgTable9(
322
354
  "junior_agent_bindings",
323
355
  {
324
- parentConversationId: text8("parent_conversation_id").notNull().references(() => juniorConversations.conversationId),
325
- name: text8("name").notNull(),
326
- childConversationId: text8("child_conversation_id").notNull().references(() => juniorConversations.conversationId)
356
+ parentConversationId: text9("parent_conversation_id").notNull().references(() => juniorConversations.conversationId),
357
+ name: text9("name").notNull(),
358
+ childConversationId: text9("child_conversation_id").notNull().references(() => juniorConversations.conversationId)
327
359
  },
328
360
  (table) => [
329
- primaryKey4({
361
+ primaryKey5({
330
362
  columns: [table.parentConversationId, table.name]
331
363
  }),
332
364
  uniqueIndex5("junior_agent_bindings_child_idx").on(
@@ -334,35 +366,35 @@ var juniorAgentBindings = pgTable8(
334
366
  )
335
367
  ]
336
368
  );
337
- var juniorAgentInvocations = pgTable8(
369
+ var juniorAgentInvocations = pgTable9(
338
370
  "junior_agent_invocations",
339
371
  {
340
- invocationId: text8("invocation_id").primaryKey(),
341
- parentConversationId: text8("parent_conversation_id").notNull().references(() => juniorConversations.conversationId),
342
- childConversationId: text8("child_conversation_id").notNull().references(() => juniorConversations.conversationId),
343
- agentName: text8("agent_name"),
344
- input: text8("input").notNull(),
372
+ invocationId: text9("invocation_id").primaryKey(),
373
+ parentConversationId: text9("parent_conversation_id").notNull().references(() => juniorConversations.conversationId),
374
+ childConversationId: text9("child_conversation_id").notNull().references(() => juniorConversations.conversationId),
375
+ agentName: text9("agent_name"),
376
+ input: text9("input").notNull(),
345
377
  actor: jsonb5("actor_json").$type().notNull(),
346
378
  credentialContext: jsonb5(
347
379
  "credential_context_json"
348
380
  ).$type(),
349
381
  source: jsonb5("source_json").$type().notNull(),
350
382
  destination: jsonb5("destination_json").$type().notNull(),
351
- destinationVisibility: text8(
383
+ destinationVisibility: text9(
352
384
  "destination_visibility"
353
385
  ).$type(),
354
- reasoningLevel: text8("reasoning_level").$type(),
355
- status: text8("status").$type().notNull(),
356
- mailboxStatus: text8("mailbox_status").$type().notNull(),
357
- result: text8("result"),
358
- errorMessage: text8("error_message"),
386
+ reasoningLevel: text9("reasoning_level").$type(),
387
+ status: text9("status").$type().notNull(),
388
+ mailboxStatus: text9("mailbox_status").$type().notNull(),
389
+ result: text9("result"),
390
+ errorMessage: text9("error_message"),
359
391
  createdAt: timestamptz("created_at").notNull(),
360
392
  updatedAt: timestamptz("updated_at").notNull(),
361
393
  terminalAt: timestamptz("terminal_at")
362
394
  },
363
395
  (table) => [
364
- index6("junior_agent_invocations_child_idx").on(table.childConversationId),
365
- index6("junior_agent_invocations_mailbox_idx").on(
396
+ index7("junior_agent_invocations_child_idx").on(table.childConversationId),
397
+ index7("junior_agent_invocations_mailbox_idx").on(
366
398
  table.mailboxStatus,
367
399
  table.createdAt
368
400
  )
@@ -370,42 +402,42 @@ var juniorAgentInvocations = pgTable8(
370
402
  );
371
403
 
372
404
  // src/db/schema/location-configurations.ts
373
- import { pgTable as pgTable9, primaryKey as primaryKey5, text as text9 } from "drizzle-orm/pg-core";
374
- var juniorLocationConfigurations = pgTable9(
405
+ import { pgTable as pgTable10, primaryKey as primaryKey6, text as text10 } from "drizzle-orm/pg-core";
406
+ var juniorLocationConfigurations = pgTable10(
375
407
  "junior_location_configurations",
376
408
  {
377
- locationId: text9("location_id").notNull().references(() => juniorDestinations.id, { onDelete: "cascade" }),
378
- key: text9("key").notNull(),
379
- value: text9("value").notNull(),
409
+ locationId: text10("location_id").notNull().references(() => juniorDestinations.id, { onDelete: "cascade" }),
410
+ key: text10("key").notNull(),
411
+ value: text10("value").notNull(),
380
412
  updatedAt: timestamptz("updated_at").notNull(),
381
- updatedBy: text9("updated_by"),
382
- source: text9("source"),
383
- expiresAt: text9("expires_at")
413
+ updatedBy: text10("updated_by"),
414
+ source: text10("source"),
415
+ expiresAt: text10("expires_at")
384
416
  },
385
- (table) => [primaryKey5({ columns: [table.locationId, table.key] })]
417
+ (table) => [primaryKey6({ columns: [table.locationId, table.key] })]
386
418
  );
387
419
 
388
420
  // src/db/schema/event-tasks.ts
389
- import { bigint, index as index7, jsonb as jsonb6, pgTable as pgTable10, text as text10 } from "drizzle-orm/pg-core";
390
- var juniorEventTasks = pgTable10(
421
+ import { bigint, index as index8, jsonb as jsonb6, pgTable as pgTable11, text as text11 } from "drizzle-orm/pg-core";
422
+ var juniorEventTasks = pgTable11(
391
423
  "junior_event_tasks",
392
424
  {
393
- id: text10("id").primaryKey(),
394
- teamId: text10("team_id").notNull(),
395
- namespace: text10("namespace").notNull(),
396
- identifier: text10("identifier").notNull(),
425
+ id: text11("id").primaryKey(),
426
+ teamId: text11("team_id").notNull(),
427
+ namespace: text11("namespace").notNull(),
428
+ identifier: text11("identifier").notNull(),
397
429
  createdAtMs: bigint("created_at_ms", { mode: "number" }).notNull(),
398
430
  /** Short display title generated from the task instruction. */
399
- title: text10("title"),
431
+ title: text11("title"),
400
432
  task: jsonb6("task_json").$type().notNull()
401
433
  },
402
434
  (table) => [
403
- index7("junior_event_tasks_team_idx").on(
435
+ index8("junior_event_tasks_team_idx").on(
404
436
  table.teamId,
405
437
  table.createdAtMs,
406
438
  table.id
407
439
  ),
408
- index7("junior_event_tasks_match_idx").on(
440
+ index8("junior_event_tasks_match_idx").on(
409
441
  table.namespace,
410
442
  table.identifier,
411
443
  table.createdAtMs,
@@ -415,18 +447,18 @@ var juniorEventTasks = pgTable10(
415
447
  );
416
448
 
417
449
  // src/db/schema/stats.ts
418
- import { date, integer as integer3, pgTable as pgTable11, primaryKey as primaryKey6, text as text11 } from "drizzle-orm/pg-core";
419
- var juniorStats = pgTable11(
450
+ import { date, integer as integer3, pgTable as pgTable12, primaryKey as primaryKey7, text as text12 } from "drizzle-orm/pg-core";
451
+ var juniorStats = pgTable12(
420
452
  "junior_stats",
421
453
  {
422
454
  date: date("date", { mode: "string" }).notNull(),
423
- namespace: text11("namespace").notNull(),
424
- metric: text11("metric").notNull(),
425
- name: text11("name").notNull(),
455
+ namespace: text12("namespace").notNull(),
456
+ metric: text12("metric").notNull(),
457
+ name: text12("name").notNull(),
426
458
  count: integer3("count").notNull().default(0)
427
459
  },
428
460
  (table) => [
429
- primaryKey6({
461
+ primaryKey7({
430
462
  name: "junior_stats_date_namespace_metric_name_pk",
431
463
  columns: [table.date, table.namespace, table.metric, table.name]
432
464
  })
@@ -439,21 +471,21 @@ import {
439
471
  bigint as bigint2,
440
472
  check,
441
473
  foreignKey as foreignKey3,
442
- index as index8,
443
- pgTable as pgTable12,
444
- primaryKey as primaryKey7,
445
- text as text12
474
+ index as index9,
475
+ pgTable as pgTable13,
476
+ primaryKey as primaryKey8,
477
+ text as text13
446
478
  } from "drizzle-orm/pg-core";
447
- var juniorTaskExecutions = pgTable12(
479
+ var juniorTaskExecutions = pgTable13(
448
480
  "junior_task_executions",
449
481
  {
450
- executionId: text12("execution_id").notNull(),
451
- kind: text12("kind").notNull(),
452
- namespace: text12("namespace").notNull(),
453
- taskId: text12("task_id").notNull(),
454
- conversationId: text12("conversation_id"),
482
+ executionId: text13("execution_id").notNull(),
483
+ kind: text13("kind").notNull(),
484
+ namespace: text13("namespace").notNull(),
485
+ taskId: text13("task_id").notNull(),
486
+ conversationId: text13("conversation_id"),
455
487
  executedAtMs: bigint2("executed_at_ms", { mode: "number" }).notNull(),
456
- status: text12("status").$type().notNull()
488
+ status: text13("status").$type().notNull()
457
489
  },
458
490
  (table) => [
459
491
  check(
@@ -464,7 +496,7 @@ var juniorTaskExecutions = pgTable12(
464
496
  "junior_task_executions_status_check",
465
497
  sql4`${table.status} in ('blocked', 'completed', 'failed')`
466
498
  ),
467
- primaryKey7({
499
+ primaryKey8({
468
500
  name: "junior_task_executions_kind_namespace_execution_id_pk",
469
501
  columns: [table.kind, table.namespace, table.executionId]
470
502
  }),
@@ -473,17 +505,17 @@ var juniorTaskExecutions = pgTable12(
473
505
  columns: [table.conversationId],
474
506
  foreignColumns: [juniorConversations.conversationId]
475
507
  }),
476
- index8("junior_task_executions_task_time_idx").on(
508
+ index9("junior_task_executions_task_time_idx").on(
477
509
  table.kind,
478
510
  table.namespace,
479
511
  table.taskId,
480
512
  table.executedAtMs
481
513
  ),
482
- index8("junior_task_executions_time_kind_idx").on(
514
+ index9("junior_task_executions_time_kind_idx").on(
483
515
  table.executedAtMs,
484
516
  table.kind
485
517
  ),
486
- index8("junior_task_executions_conversation_time_idx").on(
518
+ index9("junior_task_executions_conversation_time_idx").on(
487
519
  table.conversationId,
488
520
  table.executedAtMs
489
521
  )
@@ -492,54 +524,54 @@ var juniorTaskExecutions = pgTable12(
492
524
 
493
525
  // src/db/schema/scheduled-tasks.ts
494
526
  import { sql as sql5 } from "drizzle-orm";
495
- import { bigint as bigint3, index as index9, jsonb as jsonb7, pgTable as pgTable13, text as text13 } from "drizzle-orm/pg-core";
496
- var juniorSchedulerTasks = pgTable13(
527
+ import { bigint as bigint3, index as index10, jsonb as jsonb7, pgTable as pgTable14, text as text14 } from "drizzle-orm/pg-core";
528
+ var juniorSchedulerTasks = pgTable14(
497
529
  "junior_scheduler_tasks",
498
530
  {
499
- id: text13("id").primaryKey(),
500
- teamId: text13("team_id").notNull(),
531
+ id: text14("id").primaryKey(),
532
+ teamId: text14("team_id").notNull(),
501
533
  // TODO(v0.128.0): Remove after v0.127.x runtimes no longer write this column.
502
- creatorSlackUserId: text13("creator_slack_user_id"),
503
- creatorIdentityId: text13("creator_identity_id"),
504
- status: text13("status").notNull(),
534
+ creatorSlackUserId: text14("creator_slack_user_id"),
535
+ creatorIdentityId: text14("creator_identity_id"),
536
+ status: text14("status").notNull(),
505
537
  nextRunAtMs: bigint3("next_run_at_ms", { mode: "number" }),
506
538
  runNowAtMs: bigint3("run_now_at_ms", { mode: "number" }),
507
539
  createdAtMs: bigint3("created_at_ms", { mode: "number" }).notNull(),
508
540
  /** Short display title generated from the task instruction. */
509
- title: text13("title"),
541
+ title: text14("title"),
510
542
  record: jsonb7("record").$type().notNull()
511
543
  },
512
544
  (table) => [
513
545
  // TODO(v0.128.0): Remove with creatorSlackUserId.
514
- index9("junior_scheduler_tasks_creator_idx").on(table.teamId, table.creatorSlackUserId, table.createdAtMs, table.id).where(sql5`${table.status} <> 'deleted'`),
515
- index9("junior_scheduler_tasks_creator_identity_idx").on(table.creatorIdentityId, table.createdAtMs, table.id).where(
546
+ index10("junior_scheduler_tasks_creator_idx").on(table.teamId, table.creatorSlackUserId, table.createdAtMs, table.id).where(sql5`${table.status} <> 'deleted'`),
547
+ index10("junior_scheduler_tasks_creator_identity_idx").on(table.creatorIdentityId, table.createdAtMs, table.id).where(
516
548
  sql5`${table.status} <> 'deleted' AND ${table.creatorIdentityId} IS NOT NULL`
517
549
  ),
518
- index9("junior_scheduler_tasks_team_status_idx").on(table.teamId, table.createdAtMs, table.id).where(sql5`${table.status} <> 'deleted'`),
519
- index9("junior_scheduler_tasks_run_now_due_idx").on(table.runNowAtMs, table.createdAtMs, table.id).where(
550
+ index10("junior_scheduler_tasks_team_status_idx").on(table.teamId, table.createdAtMs, table.id).where(sql5`${table.status} <> 'deleted'`),
551
+ index10("junior_scheduler_tasks_run_now_due_idx").on(table.runNowAtMs, table.createdAtMs, table.id).where(
520
552
  sql5`${table.status} = 'active' AND ${table.runNowAtMs} IS NOT NULL`
521
553
  ),
522
- index9("junior_scheduler_tasks_next_run_due_idx").on(table.nextRunAtMs, table.createdAtMs, table.id).where(
554
+ index10("junior_scheduler_tasks_next_run_due_idx").on(table.nextRunAtMs, table.createdAtMs, table.id).where(
523
555
  sql5`${table.status} = 'active' AND ${table.nextRunAtMs} IS NOT NULL`
524
556
  )
525
557
  ]
526
558
  );
527
- var juniorSchedulerRuns = pgTable13(
559
+ var juniorSchedulerRuns = pgTable14(
528
560
  "junior_scheduler_runs",
529
561
  {
530
- id: text13("id").primaryKey(),
531
- taskId: text13("task_id").notNull(),
532
- status: text13("status").notNull(),
562
+ id: text14("id").primaryKey(),
563
+ taskId: text14("task_id").notNull(),
564
+ status: text14("status").notNull(),
533
565
  scheduledForMs: bigint3("scheduled_for_ms", { mode: "number" }).notNull(),
534
566
  record: jsonb7("record").$type().notNull()
535
567
  },
536
568
  (table) => [
537
- index9("junior_scheduler_runs_task_status_idx").on(
569
+ index10("junior_scheduler_runs_task_status_idx").on(
538
570
  table.taskId,
539
571
  table.status,
540
572
  table.scheduledForMs
541
573
  ),
542
- index9("junior_scheduler_runs_status_idx").on(
574
+ index10("junior_scheduler_runs_status_idx").on(
543
575
  table.status,
544
576
  table.scheduledForMs
545
577
  )
@@ -554,6 +586,7 @@ var juniorSqlSchema = {
554
586
  juniorAgentInvocations,
555
587
  juniorConversationEvents,
556
588
  juniorConversationBindings,
589
+ juniorConversationParticipants,
557
590
  juniorConversations,
558
591
  juniorLocationConfigurations,
559
592
  juniorDestinations,
@@ -823,6 +856,7 @@ export {
823
856
  juniorApiTokens,
824
857
  juniorConversationEvents,
825
858
  juniorConversationBindings,
859
+ juniorConversationParticipants,
826
860
  AGENT_INVOCATION_MAILBOX_STATUSES,
827
861
  juniorAgentBindings,
828
862
  juniorAgentInvocations,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  credentialContextSchema
3
- } from "./chunk-RUIXF3YQ.js";
3
+ } from "./chunk-BDUENQD3.js";
4
4
 
5
5
  // src/chat/sandbox/egress/schemas.ts
6
6
  import { z } from "zod";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-6GWA276C.js";
10
10
  import {
11
11
  getDeploymentTelemetryAttributes
12
- } from "./chunk-JJAMURMR.js";
12
+ } from "./chunk-EORR34UB.js";
13
13
 
14
14
  // src/chat/logging.ts
15
15
  import path from "path";
@@ -7,7 +7,7 @@ import {
7
7
  PluginCredentialFailureError,
8
8
  agentNameSchema,
9
9
  createPluginAuthOrchestration
10
- } from "./chunk-5TXDKTET.js";
10
+ } from "./chunk-CPQBTTI6.js";
11
11
  import {
12
12
  authorizationId
13
13
  } from "./chunk-DIB4GX3G.js";
@@ -32,7 +32,7 @@ import {
32
32
  searchSlackUsers,
33
33
  selectPluginGrant,
34
34
  toMcpProviderError
35
- } from "./chunk-O2YXWWPM.js";
35
+ } from "./chunk-2AHVM3HK.js";
36
36
  import {
37
37
  RetryableDeliveryError,
38
38
  actorFromRun,
@@ -48,16 +48,13 @@ import {
48
48
  getSlackMessagePermalink,
49
49
  resolveBaseUrl,
50
50
  uploadFilesToConversation
51
- } from "./chunk-FLEY546A.js";
51
+ } from "./chunk-KBT2I5ER.js";
52
52
  import {
53
53
  parseSandboxEgressAuthRequiredSignal,
54
54
  parseSandboxEgressPermissionDeniedSignal,
55
55
  sandboxEgressCredentialContextSchema,
56
56
  sandboxEgressCredentialLeaseSchema
57
- } from "./chunk-HUO3UTAQ.js";
58
- import {
59
- isExperimentalFeatureEnabled
60
- } from "./chunk-5IDFPCON.js";
57
+ } from "./chunk-7MA4HV4W.js";
61
58
  import {
62
59
  bindSandboxFileSystem,
63
60
  buildCommandScript,
@@ -77,7 +74,7 @@ import {
77
74
  runNonInteractiveCommand,
78
75
  throwSandboxOperationError,
79
76
  wrapSandboxSetupError
80
- } from "./chunk-4TWLKHOM.js";
77
+ } from "./chunk-37G5HJ2X.js";
81
78
  import {
82
79
  SCHEDULED_TASK_SYSTEM_ACTOR,
83
80
  compactEventTask,
@@ -109,10 +106,10 @@ import {
109
106
  saveEventTask,
110
107
  scheduledTaskAttributes,
111
108
  writableEventTask
112
- } from "./chunk-PMJAY6JS.js";
109
+ } from "./chunk-LQT3SWFA.js";
113
110
  import {
114
111
  parseSlackThreadId
115
- } from "./chunk-TIV3PX5H.js";
112
+ } from "./chunk-APHDJYN7.js";
116
113
  import {
117
114
  AGENTS_REMOVAL_NOTICE,
118
115
  AGENTS_REPLACEMENT_NOTICE,
@@ -182,7 +179,7 @@ import {
182
179
  stripRuntimeTurnContext,
183
180
  trimTrailingAssistantMessages,
184
181
  truncateText
185
- } from "./chunk-5QBK3QHJ.js";
182
+ } from "./chunk-J2SYI36O.js";
186
183
  import {
187
184
  JUNIOR_THREAD_STATE_TTL_MS
188
185
  } from "./chunk-3Y47VMHV.js";
@@ -198,7 +195,7 @@ import {
198
195
  getSlackToolContext,
199
196
  readActorIdentity,
200
197
  resolveChannelCapabilities
201
- } from "./chunk-2J4VCHRX.js";
198
+ } from "./chunk-V57LZDHN.js";
202
199
  import {
203
200
  SlackActionError,
204
201
  downloadPrivateSlackFile,
@@ -207,7 +204,7 @@ import {
207
204
  isConversationScopedChannel,
208
205
  normalizeSlackConversationId,
209
206
  withSlackRetries
210
- } from "./chunk-JAJVUQV7.js";
207
+ } from "./chunk-TKJ7277U.js";
211
208
  import {
212
209
  KNOWN_CONVERSATION_EVENT_TYPES,
213
210
  contextProvenance,
@@ -219,10 +216,10 @@ import {
219
216
  instructionActors,
220
217
  instructionProvenanceFor,
221
218
  sameActorIdentity
222
- } from "./chunk-XAYXN4EG.js";
219
+ } from "./chunk-JJX77MB7.js";
223
220
  import {
224
221
  juniorIdentities
225
- } from "./chunk-ET54Q4TD.js";
222
+ } from "./chunk-773XC7P4.js";
226
223
  import {
227
224
  SANDBOX_DATA_ROOT,
228
225
  SANDBOX_SKILLS_ROOT,
@@ -234,7 +231,7 @@ import {
234
231
  } from "./chunk-EM225ITJ.js";
235
232
  import {
236
233
  getStateAdapter
237
- } from "./chunk-XQPKMLRI.js";
234
+ } from "./chunk-SDRJ2LE3.js";
238
235
  import {
239
236
  ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX,
240
237
  COMPACTION_SUMMARY_PREFIX,
@@ -267,7 +264,7 @@ import {
267
264
  resolveGatewayCredential,
268
265
  resolveGatewayModel,
269
266
  unwrapCurrentInstruction
270
- } from "./chunk-PGJBNO3I.js";
267
+ } from "./chunk-XFZLQANQ.js";
271
268
  import {
272
269
  canExposeConversationPayload,
273
270
  resolveConversationPrivacy,
@@ -277,16 +274,16 @@ import {
277
274
  toGenAiMessagesTraceAttributes,
278
275
  toGenAiPayloadMetadata,
279
276
  toGenAiPayloadTraceAttributes
280
- } from "./chunk-VXWTGOLW.js";
277
+ } from "./chunk-2WLJDM23.js";
281
278
  import {
282
279
  discoverSkills,
283
280
  findSkillByName,
284
281
  loadSkillsByName,
285
282
  parseSkillInvocation
286
- } from "./chunk-YECBSG77.js";
283
+ } from "./chunk-JIC33O5L.js";
287
284
  import {
288
285
  pluginCatalogRuntime
289
- } from "./chunk-EPOA52SD.js";
286
+ } from "./chunk-TVXAN43I.js";
290
287
  import {
291
288
  CredentialUnavailableError,
292
289
  OAuthProviderError,
@@ -294,18 +291,16 @@ import {
294
291
  getOAuthProviderErrorAttributes,
295
292
  resolveAuthTokenPlaceholder,
296
293
  resolvePluginCommandEnv
297
- } from "./chunk-JY2HJYJT.js";
294
+ } from "./chunk-RN3AWYEP.js";
298
295
  import {
299
296
  credentialUserSubjectId
300
- } from "./chunk-RUIXF3YQ.js";
301
- import {
302
- isUserActor
303
- } from "./chunk-HZF5P5UN.js";
297
+ } from "./chunk-BDUENQD3.js";
304
298
  import {
299
+ isUserActor,
305
300
  parseSlackChannelId,
306
301
  parseSlackMessageTs,
307
302
  parseSlackUserId
308
- } from "./chunk-F3B2YJ76.js";
303
+ } from "./chunk-V7YE4WCP.js";
309
304
  import {
310
305
  extractGenAiUsageAttributes,
311
306
  extractGenAiUsageSummary,
@@ -324,7 +319,7 @@ import {
324
319
  summarizeMessageText,
325
320
  withLogContext,
326
321
  withSpan
327
- } from "./chunk-HMU2QP5M.js";
322
+ } from "./chunk-7NYEB2TM.js";
328
323
  import {
329
324
  startInactiveSpan,
330
325
  withActiveSpan
@@ -18120,33 +18115,6 @@ async function executeAgentRunInPrivacyContext(run, conversationPrivacy, runLogC
18120
18115
  }
18121
18116
  }
18122
18117
 
18123
- // src/chat/runtime/agent-runner.ts
18124
- function createAgentRunner(execute, options) {
18125
- const streamFn = options?.streamFn;
18126
- const tracePropagation = options?.tracePropagation;
18127
- const bindSpawnAgent = options?.bindSpawnAgent;
18128
- const canBindSpawn = Boolean(bindSpawnAgent) && isExperimentalFeatureEnabled("subagents");
18129
- return {
18130
- run: async (run) => {
18131
- const spawnAgent = bindSpawnAgent && canBindSpawn && !isAgentRunFeatureDisabled(run.disabledFeatures, "subagents") ? bindSpawnAgent(run) : void 0;
18132
- const nextRun = {
18133
- ...run,
18134
- environment: {
18135
- ...run.environment,
18136
- sandboxTracePropagation: run.environment?.sandboxTracePropagation ?? tracePropagation
18137
- },
18138
- ...spawnAgent ? {
18139
- durability: {
18140
- ...run.durability,
18141
- spawnAgent
18142
- }
18143
- } : {}
18144
- };
18145
- return await execute(nextRun, streamFn);
18146
- }
18147
- };
18148
- }
18149
-
18150
18118
  export {
18151
18119
  setConfigDefaults,
18152
18120
  getConfigDefaults,
@@ -18171,6 +18139,5 @@ export {
18171
18139
  latestReportedProgress,
18172
18140
  executeCredentialedEgressRequest,
18173
18141
  createContextCompactor,
18174
- executeAgentRun,
18175
- createAgentRunner
18142
+ executeAgentRun
18176
18143
  };
@@ -2,10 +2,10 @@ import {
2
2
  parseSlackChannelId,
3
3
  parseSlackMessageTs,
4
4
  parseSlackTeamId
5
- } from "./chunk-F3B2YJ76.js";
5
+ } from "./chunk-V7YE4WCP.js";
6
6
  import {
7
7
  toOptionalString
8
- } from "./chunk-HMU2QP5M.js";
8
+ } from "./chunk-7NYEB2TM.js";
9
9
 
10
10
  // src/chat/slack/context.ts
11
11
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseActorUserId
3
- } from "./chunk-HZF5P5UN.js";
3
+ } from "./chunk-V7YE4WCP.js";
4
4
 
5
5
  // src/chat/credentials/context.ts
6
6
  import { z } from "zod";
@@ -4,27 +4,27 @@ import {
4
4
  import {
5
5
  formatProviderLabel,
6
6
  startOAuthFlow
7
- } from "./chunk-FLEY546A.js";
7
+ } from "./chunk-KBT2I5ER.js";
8
8
  import {
9
9
  parseSandboxEgressAuthRequiredSignal
10
- } from "./chunk-HUO3UTAQ.js";
10
+ } from "./chunk-7MA4HV4W.js";
11
11
  import {
12
12
  abandonReplacedPendingAuth,
13
13
  canReusePendingAuthLink,
14
14
  recordAuthorizationRequested
15
- } from "./chunk-5QBK3QHJ.js";
15
+ } from "./chunk-J2SYI36O.js";
16
16
  import {
17
17
  AGENT_INVOCATION_MAILBOX_STATUSES
18
- } from "./chunk-ET54Q4TD.js";
18
+ } from "./chunk-773XC7P4.js";
19
19
  import {
20
20
  TURN_REASONING_LEVELS
21
- } from "./chunk-PGJBNO3I.js";
21
+ } from "./chunk-XFZLQANQ.js";
22
22
  import {
23
23
  pluginCatalogRuntime
24
- } from "./chunk-EPOA52SD.js";
24
+ } from "./chunk-TVXAN43I.js";
25
25
  import {
26
26
  credentialContextSchema
27
- } from "./chunk-RUIXF3YQ.js";
27
+ } from "./chunk-BDUENQD3.js";
28
28
 
29
29
  // src/chat/services/auth-pause.ts
30
30
  var AuthorizationPauseError = class extends Error {