@sentry/junior 0.245.0 → 0.247.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 (68) hide show
  1. package/dist/{admin-BEbNsG87.js → admin-BGwaqDMs.js} +1 -1
  2. package/dist/{agent-hooks-Caa0Qh_Q.js → agent-hooks-C72ByH0C.js} +11 -11
  3. package/dist/{agent-invocations-BO6ddZax.js → agent-invocations-D_YoNnAn.js} +8 -2
  4. package/dist/{agent-runner-BEuPFbbv.js → agent-runner-DsAFAKKs.js} +822 -2524
  5. package/dist/api/schema.d.ts +23 -1
  6. package/dist/api/schema.js +3 -3
  7. package/dist/api.js +82 -21
  8. package/dist/{app-BYB7szGb.d.ts → app-4t4mPTdS.d.ts} +8 -1
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +37 -68
  11. package/dist/assistant-reply-ChOzcTBS.js +45 -0
  12. package/dist/{briefs-DFAh_jTW.js → briefs-Dc7qZrhc.js} +4 -4
  13. package/dist/{catalog-runtime-wmq_fqff.js → catalog-runtime-DS1k7fUG.js} +1 -1
  14. package/dist/cli/chat.js +25 -15
  15. package/dist/cli/check.js +3 -3
  16. package/dist/cli/main.js +2 -2
  17. package/dist/cli/plugins.js +4 -4
  18. package/dist/cli/snapshot-create.js +3 -3
  19. package/dist/cli/upgrade.js +3 -3
  20. package/dist/{client-Bn9SRFCi.js → client-BVnfNd3D.js} +2 -2
  21. package/dist/{config-_XAINZMN.js → config-CgWvImQL.js} +2 -2
  22. package/dist/{conversation-CvBG57Io.js → conversation-CYsbVFLx.js} +71 -1
  23. package/dist/{conversation-privacy-BN5SGxsF.js → conversation-privacy-D3TdVM9H.js} +1 -1
  24. package/dist/{credential-sync-BvaUm6HQ.js → credential-sync-DLw3jkv-.js} +14 -14
  25. package/dist/{executor-CFIqoCNJ.js → executor-DQazjeGA.js} +3 -3
  26. package/dist/{images-Ci43I3ek.js → images-C3e5E-p_.js} +4 -21
  27. package/dist/instrumentation.js +2 -2
  28. package/dist/{job-queue-CGicV7x6.js → job-queue-BEUqRhjC.js} +1 -1
  29. package/dist/{logging-Bs3dV81s.js → logging-CZEc8_v4.js} +1 -1
  30. package/dist/message-BIJa7lKh.js +59 -0
  31. package/dist/nitro.d.ts +1 -1
  32. package/dist/nitro.js +3 -3
  33. package/dist/{oauth-authorization-COzWmMjO.js → oauth-authorization-BA4Dt6a7.js} +1 -45
  34. package/dist/{oauth-callback-server-17c9_39v.js → oauth-callback-server-R9OSdLP1.js} +2 -2
  35. package/dist/{pending-auth-Bnhg7Q9k.js → pending-auth-Oo5AQhaf.js} +2 -2
  36. package/dist/{profile-BA471c-l.js → profile-aVLDAirh.js} +4 -4
  37. package/dist/{prompt-C9Q9cjD3.js → prompt-ZG1UCxjF.js} +1 -1
  38. package/dist/{registry-BYNOFO6e.js → registry-CtaDOOM5.js} +1 -1
  39. package/dist/{resolve-rpz8No2i.js → resolve-Bdw4hu7s.js} +2 -2
  40. package/dist/result-DNgmkASh.js +463 -0
  41. package/dist/{runner-C8DRk9X6.js → runner-BUSScEu5.js} +11 -10
  42. package/dist/{sandbox-egress-signals-B8hurjFt.js → sandbox-egress-signals-E9r8bf9G.js} +1 -1
  43. package/dist/{schema-WRgR9EL6.js → schema-tyd6hALh.js} +23 -3
  44. package/dist/session-stop-CAhBfBUT.js +782 -0
  45. package/dist/{skills-C4yrD2NR.js → skills-DQy-mmBC.js} +2 -2
  46. package/dist/{spawn-CdAaTXrY.js → spawn-DQ_MVWZ6.js} +3 -2
  47. package/dist/store-DjLA8GKs.js +1417 -0
  48. package/dist/{task-queue-BBxHzlIB.js → task-queue-BT2h_t8I.js} +3 -3
  49. package/dist/{task-runner-BqFapTjs.js → task-runner-CiPepjIB.js} +11 -11
  50. package/dist/{tasks-Ddd7OAkp.js → tasks-DMmRrIVl.js} +9 -9
  51. package/dist/{thread-state-DqErwbA8.js → thread-state-ehZYGpX9.js} +7 -7
  52. package/dist/{turn-failure-response-DtL1-fOl.js → turn-failure-response-D7J10z7l.js} +9 -9
  53. package/dist/{turn-lifecycle-B5pzyD6W.js → turn-lifecycle-Buswqs90.js} +1 -1
  54. package/dist/{turn-session-routing-D6pTU5uF.js → turn-session-routing-Bw-yiSb4.js} +1 -1
  55. package/dist/{validation-BAzlyNIc.js → validation-DTguegIe.js} +1 -1
  56. package/dist/{version-CiXDH3oe.js → version-BrZSE5du.js} +1 -1
  57. package/dist/version.js +1 -1
  58. package/dist/{viewer-wCn8xneI.js → viewer-BlAozHer.js} +4 -4
  59. package/dist/{web-authorization-d5MtGpfG.js → web-authorization-DwyTlkAg.js} +6 -6
  60. package/dist/{web-input-BZTiCtvP.js → web-input-DSYxI7Wi.js} +77 -378
  61. package/dist/{work-4QPqTd5_.js → work-CRBXkJoU.js} +96 -13
  62. package/dist/{worker-mc62tybz.js → worker-BVJKM9Ja.js} +7 -7
  63. package/migrations/0053_conversation_stopped_at.sql +1 -0
  64. package/migrations/0054_flowery_rage.sql +1 -0
  65. package/migrations/meta/0053_snapshot.json +3771 -0
  66. package/migrations/meta/0054_snapshot.json +3777 -0
  67. package/migrations/meta/_journal.json +14 -0
  68. package/package.json +5 -4
@@ -2419,6 +2419,28 @@ type ConversationPendingMessagesReport = z.infer<typeof conversationPendingMessa
2419
2419
  type CancelConversationPendingMessagesBody = z.infer<typeof cancelConversationPendingMessagesBodySchema>;
2420
2420
  type CancelConversationPendingMessagesResponse = z.infer<typeof cancelConversationPendingMessagesResponseSchema>;
2421
2421
  //#endregion
2422
+ //#region src/api/schema/conversation-stop.d.ts
2423
+ /**
2424
+ * Result of stopping the active Turn.
2425
+ *
2426
+ * `stoppedInboundMessageIds` lists every queued human message the stop
2427
+ * removes. `stoppedMessages` holds only the viewer's own web text, so the
2428
+ * dashboard can return it to the composer.
2429
+ */
2430
+ export declare const stopConversationTurnResponseSchema: z.ZodObject<{
2431
+ conversationId: z.ZodString;
2432
+ status: z.ZodEnum<{
2433
+ no_work: "no_work";
2434
+ requested: "requested";
2435
+ }>;
2436
+ stoppedInboundMessageIds: z.ZodArray<z.ZodString>;
2437
+ stoppedMessages: z.ZodArray<z.ZodObject<{
2438
+ inboundMessageId: z.ZodString;
2439
+ text: z.ZodString;
2440
+ }, z.core.$strict>>;
2441
+ }, z.core.$strict>;
2442
+ type StopConversationTurnResponse = z.infer<typeof stopConversationTurnResponseSchema>;
2443
+ //#endregion
2422
2444
  //#region src/api/schema/child-agent.d.ts
2423
2445
  /**
2424
2446
  * One direct child agent of a Conversation, from agent invocation records.
@@ -4827,4 +4849,4 @@ type PluginPackageContentReport = z.infer<typeof pluginPackageContentReportSchem
4827
4849
  type PluginOperationalReport = z.infer<typeof pluginOperationalReportSchema>;
4828
4850
  type PluginOperationalReportFeed = z.infer<typeof pluginOperationalReportFeedSchema>;
4829
4851
  //#endregion
4830
- export { type AcceptedConversationMessage, type ActorActivityDayReport, type ActorDirectoryReport, type ActorDirectoryWindows, type ActorIdentity, type ActorProfileReport, type ActorSummaryReport, type ActorTotalsReport, type ActorWindowMetrics, type ApiError, type ArchiveConversationBody, type ArchiveConversationResponse, type AutomationCard, type AutomationEdit, type AutomationExecution, type AutomationExecutionDay, type AutomationExecutionList, type AutomationExecutionStatusDay, type AutomationList, type AutomationListQuery, type AutomationRun, type AutomationRunList, type AutomationRunWindows, type AutomationScheduleIntent, type AutomationSummary, type AutomationUpdate, type AutomationVersion, type AutomationVersionList, type BaselineSnapshotReport, type CancelConversationPendingMessagesBody, type CancelConversationPendingMessagesResponse, type CodeActivityDay, type CodeChangeSummaryReport, type CodeOverviewReport, type CodePersonReport, type CodeRepositoryReport, type CodeRepositorySummary, type ConversationActivityPreview, type ConversationAgentTreeNode, type ConversationAuxiliaryCosts, type ConversationChildAgent, type ConversationChildAgentsReport, type ConversationCost, type ConversationDetailReport, type ConversationEventHistory, type ConversationEventPage, type ConversationFeed, type ConversationMetricDay, type ConversationModelUsage, type ConversationParams, type ConversationPendingMessage, type ConversationPendingMessageDelivery, type ConversationPendingMessagesReport, type ConversationReportEvent, type ConversationReportEventData, type ConversationReportStatus, type ConversationSourceTask, type ConversationStatsItem, type ConversationStatsReport, type ConversationSummaryReport, type ConversationSurface, type ConversationTurnFailureCode, type ConversationTurnFailureReason, type ConversationUsage, type CreateConversationBody, type CreateConversationMessageBody, type DailyConversationActivity, type GuardianMetricDay, type GuardianStats, type HealthReport, type InputImage, type LocationActivityDayReport, type LocationActorSummaryReport, type LocationDetailReport, type LocationDirectoryReport, type LocationParams, type LocationSummaryReport, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, type MessageAttachment, type MessageCard, type OwnedObjectAnnotation, type PeopleActivityDayReport, type PersonParams, type PersonalSpendReport, type PersonalTokenMetadata, type Plugin, type PluginOperationalReport, type PluginOperationalReportFeed, type PluginPackageContentItemReport, type PluginPackageContentReport, type Plugins, type RuntimeInfoReport, type SkillReport, type SkillReports, type StatReport, type StatsReport, type WorkspaceReport, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, messageCardText, resolveMessageCards };
4852
+ export { type AcceptedConversationMessage, type ActorActivityDayReport, type ActorDirectoryReport, type ActorDirectoryWindows, type ActorIdentity, type ActorProfileReport, type ActorSummaryReport, type ActorTotalsReport, type ActorWindowMetrics, type ApiError, type ArchiveConversationBody, type ArchiveConversationResponse, type AutomationCard, type AutomationEdit, type AutomationExecution, type AutomationExecutionDay, type AutomationExecutionList, type AutomationExecutionStatusDay, type AutomationList, type AutomationListQuery, type AutomationRun, type AutomationRunList, type AutomationRunWindows, type AutomationScheduleIntent, type AutomationSummary, type AutomationUpdate, type AutomationVersion, type AutomationVersionList, type BaselineSnapshotReport, type CancelConversationPendingMessagesBody, type CancelConversationPendingMessagesResponse, type CodeActivityDay, type CodeChangeSummaryReport, type CodeOverviewReport, type CodePersonReport, type CodeRepositoryReport, type CodeRepositorySummary, type ConversationActivityPreview, type ConversationAgentTreeNode, type ConversationAuxiliaryCosts, type ConversationChildAgent, type ConversationChildAgentsReport, type ConversationCost, type ConversationDetailReport, type ConversationEventHistory, type ConversationEventPage, type ConversationFeed, type ConversationMetricDay, type ConversationModelUsage, type ConversationParams, type ConversationPendingMessage, type ConversationPendingMessageDelivery, type ConversationPendingMessagesReport, type ConversationReportEvent, type ConversationReportEventData, type ConversationReportStatus, type ConversationSourceTask, type ConversationStatsItem, type ConversationStatsReport, type ConversationSummaryReport, type ConversationSurface, type ConversationTurnFailureCode, type ConversationTurnFailureReason, type ConversationUsage, type CreateConversationBody, type CreateConversationMessageBody, type DailyConversationActivity, type GuardianMetricDay, type GuardianStats, type HealthReport, type InputImage, type LocationActivityDayReport, type LocationActorSummaryReport, type LocationDetailReport, type LocationDirectoryReport, type LocationParams, type LocationSummaryReport, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, type MessageAttachment, type MessageCard, type OwnedObjectAnnotation, type PeopleActivityDayReport, type PersonParams, type PersonalSpendReport, type PersonalTokenMetadata, type Plugin, type PluginOperationalReport, type PluginOperationalReportFeed, type PluginPackageContentItemReport, type PluginPackageContentReport, type Plugins, type RuntimeInfoReport, type SkillReport, type SkillReports, type StatReport, type StatsReport, type StopConversationTurnResponse, type WorkspaceReport, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, messageCardText, resolveMessageCards };
@@ -1,6 +1,6 @@
1
1
  import { a as conversationTurnFailureReasonSchema, i as conversationTurnFailureCodeSchema } from "../history-Nte1oVed.js";
2
- import { A as forkConversationBodySchema, C as conversationReportEventSchema, E as conversationSummaryReportSchema, F as INPUT_IMAGE_TYPES, M as MAX_INPUT_IMAGES, N as MAX_INPUT_IMAGE_BYTES, O as createConversationBodySchema, S as conversationReportEventDataSchema, T as conversationStatsReportSchema, W as messageCardText, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, b as conversationPendingMessageSchema, d as conversationDetailReportSchema, f as conversationEventHistorySchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, j as forkConversationResponseSchema, k as createConversationMessageBodySchema, l as conversationAuxiliaryCostsSchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, q as resolveMessageCards, r as archiveConversationBodySchema, s as conversationActivityPreviewSchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, v as conversationPendingAuthorizationSchema, x as conversationPendingMessagesReportSchema, y as conversationPendingMessageDeliverySchema } from "../conversation-CvBG57Io.js";
2
+ import { A as forkConversationBodySchema, C as conversationReportEventSchema, E as conversationSummaryReportSchema, F as INPUT_IMAGE_TYPES, G as messageCardText, J as resolveMessageCards, M as MAX_INPUT_IMAGES, N as MAX_INPUT_IMAGE_BYTES, O as createConversationBodySchema, S as conversationReportEventDataSchema, T as conversationStatsReportSchema, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, b as conversationPendingMessageSchema, d as conversationDetailReportSchema, f as conversationEventHistorySchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, j as forkConversationResponseSchema, k as createConversationMessageBodySchema, l as conversationAuxiliaryCostsSchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, s as conversationActivityPreviewSchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, v as conversationPendingAuthorizationSchema, x as conversationPendingMessagesReportSchema, y as conversationPendingMessageDeliverySchema } from "../conversation-CYsbVFLx.js";
3
3
  import { C as eventAutomationSummarySchema, S as automationVersionSchema, _ as automationSummarySchema, a as automationExecutionSchema, b as automationVersionListSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, l as automationListQuerySchema, m as automationRunWindowsSchema, n as automationEditSchema, o as automationExecutionStatusDaySchema, p as automationRunSchema, r as automationEventCatalogSchema, s as automationExecutionStatusSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, w as scheduledAutomationSummarySchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "../automation-gznOMaQ2.js";
4
4
  import { C as skillReportsSchema, S as skillReportSchema, _ as pluginPackageContentItemReportSchema, b as pluginsSchema, g as pluginOperationalReportSchema, h as pluginOperationalReportFeedSchema, m as healthReportSchema, t as webMessageId, v as pluginPackageContentReportSchema, x as runtimeInfoReportSchema, y as pluginSchema } from "../web-message-id-xPI_EFSC.js";
5
- import { A as codeChangeSummarySchema, C as locationParamsSchema, D as dailyConversationActivitySchema, F as codeRepositorySummarySchema, I as conversationChildAgentSchema, L as conversationChildAgentsReportSchema, M as codePersonReportSchema, N as codeRepositoryParamsSchema, O as codeActivityDaySchema, P as codeRepositoryReportSchema, R as apiErrorSchema, S as locationDirectoryReportSchema, _ as actorProfileReportSchema, a as workspaceBodySchema, b as locationActivityDayReportSchema, c as workspaceRepoSchema, d as createdPersonalTokenSchema, f as personalTokenListSchema, g as actorDirectoryReportSchema, h as revokePersonalTokenResponseSchema, i as deleteWorkspaceResponseSchema, j as codeOverviewReportSchema, k as codeChangeSummaryReportSchema, l as workspaceSchema, m as personalTokenParamsSchema, n as statsReportSchema, o as workspaceListSchema, p as personalTokenMetadataSchema, r as baselineSnapshotSchema, s as workspaceParamsSchema, t as statSchema, u as createPersonalTokenBodySchema, v as personParamsSchema, x as locationDetailReportSchema, y as personalSpendReportSchema } from "../schema-WRgR9EL6.js";
6
- export { INPUT_IMAGE_TYPES, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, automationEditErrorSchema, automationEditSchema, automationEventCatalogSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationScheduleIntentSchema, automationSchedulePreviewSchema, automationSummarySchema, automationUpdateSchema, automationVersionActivateSchema, automationVersionListSchema, automationVersionParamsSchema, automationVersionSchema, baselineSnapshotSchema, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositoryParamsSchema, codeRepositoryReportSchema, codeRepositorySummarySchema, conversationActivityPreviewSchema, conversationAuxiliaryCostsSchema, conversationChildAgentSchema, conversationChildAgentsReportSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, eventAutomationSummarySchema, forkConversationBodySchema, forkConversationResponseSchema, healthReportSchema, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, messageCardText, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, resolveMessageCards, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, skillReportSchema, skillReportsSchema, statSchema, statsReportSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
5
+ import { A as codeChangeSummarySchema, C as locationParamsSchema, D as dailyConversationActivitySchema, F as codeRepositorySummarySchema, I as conversationChildAgentSchema, L as conversationChildAgentsReportSchema, M as codePersonReportSchema, N as codeRepositoryParamsSchema, O as codeActivityDaySchema, P as codeRepositoryReportSchema, R as stopConversationTurnResponseSchema, S as locationDirectoryReportSchema, _ as actorProfileReportSchema, a as workspaceBodySchema, b as locationActivityDayReportSchema, c as workspaceRepoSchema, d as createdPersonalTokenSchema, f as personalTokenListSchema, g as actorDirectoryReportSchema, h as revokePersonalTokenResponseSchema, i as deleteWorkspaceResponseSchema, j as codeOverviewReportSchema, k as codeChangeSummaryReportSchema, l as workspaceSchema, m as personalTokenParamsSchema, n as statsReportSchema, o as workspaceListSchema, p as personalTokenMetadataSchema, r as baselineSnapshotSchema, s as workspaceParamsSchema, t as statSchema, u as createPersonalTokenBodySchema, v as personParamsSchema, x as locationDetailReportSchema, y as personalSpendReportSchema, z as apiErrorSchema } from "../schema-tyd6hALh.js";
6
+ export { INPUT_IMAGE_TYPES, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, automationEditErrorSchema, automationEditSchema, automationEventCatalogSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationScheduleIntentSchema, automationSchedulePreviewSchema, automationSummarySchema, automationUpdateSchema, automationVersionActivateSchema, automationVersionListSchema, automationVersionParamsSchema, automationVersionSchema, baselineSnapshotSchema, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositoryParamsSchema, codeRepositoryReportSchema, codeRepositorySummarySchema, conversationActivityPreviewSchema, conversationAuxiliaryCostsSchema, conversationChildAgentSchema, conversationChildAgentsReportSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, eventAutomationSummarySchema, forkConversationBodySchema, forkConversationResponseSchema, healthReportSchema, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, messageCardText, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, resolveMessageCards, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, skillReportSchema, skillReportsSchema, statSchema, statsReportSchema, stopConversationTurnResponseSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
package/dist/api.js CHANGED
@@ -1,24 +1,27 @@
1
- import { $ as getChildAgentLabel, Et as cancelHumanFacingPendingMessages, It as getConversation, L as editEventAutomation, O as parseSlackThreadId, P as editScheduledAutomation, R as AutomationEditError, T as readLiveAttachment, V as resolveTaskOutcomes, bt as automationEventCatalog, g as readStats, gt as getEventCatalog, nt as listChildAgents, z as eventAutomationTriggerAvailable } from "./agent-runner-BEuPFbbv.js";
2
- import { d as logException, p as logWarn } from "./logging-Bs3dV81s.js";
1
+ import { K as listChildAgents, L as editEventAutomation, O as parseSlackThreadId, P as editScheduledAutomation, R as AutomationEditError, T as readLiveAttachment, V as resolveTaskOutcomes, g as readStats, ot as getChildAgentLabel, z as eventAutomationTriggerAvailable } from "./agent-runner-DsAFAKKs.js";
2
+ import { d as logException, p as logWarn } from "./logging-CZEc8_v4.js";
3
3
  import { d as parseSlackTeamId, g as parseSlackMessageTs, l as parseSlackChannelId } from "./actor-BTtLaeWy.js";
4
- import { E as resolveRootConversationId, T as hasAgentTurnUsage, _ as locationFromRow, b as parseSessionSource, c as getConversationEventStore, d as getDb, f as getSqlExecutor, i as resolveViewerUser, m as withConversationEventLock, o as updateViewerDisplayName, t as findUserByEmail, u as getConversationStore, w as agentTurnUsageSchema } from "./viewer-wCn8xneI.js";
5
- import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, o as conversationReadColumns, s as juniorConversations } from "./agent-invocations-BO6ddZax.js";
6
- import { _ as juniorConversationEvents, b as juniorCodeChanges, f as juniorConversationParticipants, g as juniorConversationMetrics, m as juniorConversationBriefs, v as juniorApiTokens, x as juniorCodeRepositories } from "./executor-CFIqoCNJ.js";
4
+ import { E as resolveRootConversationId, T as hasAgentTurnUsage, _ as locationFromRow, b as parseSessionSource, c as getConversationEventStore, d as getDb, f as getSqlExecutor, i as resolveViewerUser, m as withConversationEventLock, o as updateViewerDisplayName, t as findUserByEmail, u as getConversationStore, w as agentTurnUsageSchema } from "./viewer-BlAozHer.js";
5
+ import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, o as conversationReadColumns, s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
6
+ import { _ as juniorConversationEvents, b as juniorCodeChanges, f as juniorConversationParticipants, g as juniorConversationMetrics, m as juniorConversationBriefs, v as juniorApiTokens, x as juniorCodeRepositories } from "./executor-DQazjeGA.js";
7
7
  import { u as contextProvenance } from "./history-Nte1oVed.js";
8
- import { A as requireAutomationRevision, D as sameDefinitionValue, E as readAutomationVersion, O as AutomationConflictError, Ot as loadTurnProjection, a as readScheduledAutomation, b as saveEventAutomation, dn as piMessageFromHistoryItem, g as getEventAutomation, k as automationRevision, m as eventAutomationBelongsToUser, o as saveScheduledAutomation, w as automationDefinition, x as setEventAutomationStatus } from "./tasks-Ddd7OAkp.js";
9
- import { At as listConversationAnnotations, C as WorkspaceValidationError, M as workspaceRepoCheckoutPath, O as SANDBOX_RUNTIME, Pt as lookupSlackUser, S as updateWorkspace, St as buildSentryConversationUrl, Wt as withSlackRetries, _ as deleteWorkspace, _t as conversationNotArchivedForUser, b as listWorkspaces, bt as readLatestConversationBrief, dt as conversationArchiveTimes, ft as conversationArchivedForEmail, g as createWorkspace, gt as conversationNotArchivedForEmail, ht as conversationHasParticipantUser, jt as listConversationAnnotationsById, lt as createPluginLogger, mt as conversationHasParticipantEmail, pt as conversationArchivedForUser, u as getPlugins, ut as readConversationAccessFromSql, v as getWorkspace, vt as viewerConversationMembership, x as listWorkspacesByRepository, xt as readConversationEventPage, zt as getSlackClient } from "./agent-hooks-Caa0Qh_Q.js";
10
- import { A as forkConversationBodySchema, F as INPUT_IMAGE_TYPES, O as createConversationBodySchema, P as readMessageAttachments, T as conversationStatsReportSchema, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, c as conversationAttachmentParamsSchema, d as conversationDetailReportSchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, j as forkConversationResponseSchema, k as createConversationMessageBodySchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, x as conversationPendingMessagesReportSchema } from "./conversation-CvBG57Io.js";
11
- import { n as hash, t as create } from "./profile-BA471c-l.js";
8
+ import { A as requireAutomationRevision, D as sameDefinitionValue, E as readAutomationVersion, O as AutomationConflictError, Ot as loadTurnProjection, a as readScheduledAutomation, b as saveEventAutomation, dn as piMessageFromHistoryItem, g as getEventAutomation, k as automationRevision, m as eventAutomationBelongsToUser, o as saveScheduledAutomation, w as automationDefinition, x as setEventAutomationStatus } from "./tasks-DMmRrIVl.js";
9
+ import { At as listConversationAnnotations, C as WorkspaceValidationError, M as workspaceRepoCheckoutPath, O as SANDBOX_RUNTIME, Pt as lookupSlackUser, S as updateWorkspace, St as buildSentryConversationUrl, Wt as withSlackRetries, _ as deleteWorkspace, _t as conversationNotArchivedForUser, b as listWorkspaces, bt as readLatestConversationBrief, dt as conversationArchiveTimes, ft as conversationArchivedForEmail, g as createWorkspace, gt as conversationNotArchivedForEmail, ht as conversationHasParticipantUser, jt as listConversationAnnotationsById, lt as createPluginLogger, mt as conversationHasParticipantEmail, pt as conversationArchivedForUser, u as getPlugins, ut as readConversationAccessFromSql, v as getWorkspace, vt as viewerConversationMembership, x as listWorkspacesByRepository, xt as readConversationEventPage, zt as getSlackClient } from "./agent-hooks-C72ByH0C.js";
10
+ import { A as forkConversationBodySchema, F as INPUT_IMAGE_TYPES, O as createConversationBodySchema, P as readMessageAttachments, T as conversationStatsReportSchema, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, c as conversationAttachmentParamsSchema, d as conversationDetailReportSchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, j as forkConversationResponseSchema, k as createConversationMessageBodySchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, x as conversationPendingMessagesReportSchema } from "./conversation-CYsbVFLx.js";
11
+ import { n as hash, t as create } from "./profile-aVLDAirh.js";
12
+ import { l as getEventCatalog, v as automationEventCatalog } from "./session-stop-CAhBfBUT.js";
12
13
  import { t as getFirstRunAtMs } from "./cadence-D00SCzT1.js";
13
- import { t as getCachedSnapshot } from "./resolve-rpz8No2i.js";
14
- import { a as getVercelConversationWorkQueue } from "./job-queue-CGicV7x6.js";
14
+ import { t as getCachedSnapshot } from "./resolve-Bdw4hu7s.js";
15
+ import { a as getVercelConversationWorkQueue } from "./job-queue-BEUqRhjC.js";
16
+ import { a as cancelHumanFacingPendingMessages, h as getConversation } from "./store-DjLA8GKs.js";
15
17
  import { M as compileScheduleIntent, P as weekdaySchema, _ as automationSummarySchema, b as automationVersionListSchema, c as automationLifecycleSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, j as ScheduleIntentError, l as automationListQuerySchema, n as automationEditSchema, r as automationEventCatalogSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "./automation-gznOMaQ2.js";
16
18
  import { C as skillReportsSchema, a as fillUtcHours, b as pluginsSchema, c as sumUtcHoursIntoSixHours, d as trailingUtcSixHourWindow, f as utcDayKey, h as pluginOperationalReportFeedSchema, i as fillUtcDays, l as trailingUtcDayWindow, m as healthReportSchema, n as DAY_MS$1, o as fillUtcSixHours, p as utcHourKey, r as HOUR_MS$1, s as startOfUtcHour, u as trailingUtcHourWindow, x as runtimeInfoReportSchema } from "./web-message-id-xPI_EFSC.js";
17
- import { H as readHealthReport, L as createVercelAttachmentStorage, M as legacyWebMailboxMetadataSchema, _ as readViewerAutomationRuns, a as recordWebConversationActivity, b as readViewerAutomations, d as resolveSlackConversationContextFromThreadId, g as readViewerAutomationExecutions, h as readConversationSourceTask, i as createConversationId, l as getProductionSlackAdapter, m as deleteViewerTask, o as webActorFromEmail, p as ViewerTaskNotFoundError, r as createAndEnqueueConversation, t as appendAndEnqueueWebMessage, u as formatSlackConversationRedactedLabel, v as readViewerAutomationSummary, w as clearSlackPendingReactions, x as resolveViewerTaskCandidate, y as readViewerAutomationVersions } from "./web-input-BZTiCtvP.js";
18
- import { A as conversationActiveDaysColumn, M as conversationRangeColumns, j as conversationAggregateColumns } from "./task-runner-BqFapTjs.js";
19
- import { r as getWebAuthorization } from "./web-authorization-d5MtGpfG.js";
20
- import { t as decodeInputImages } from "./images-Ci43I3ek.js";
21
- import { C as locationParamsSchema, E as activitySixHours$1, L as conversationChildAgentsReportSchema, M as codePersonReportSchema, N as codeRepositoryParamsSchema, P as codeRepositoryReportSchema, R as apiErrorSchema, S as locationDirectoryReportSchema, T as activityHours$1, _ as actorProfileReportSchema, a as workspaceBodySchema, d as createdPersonalTokenSchema, f as personalTokenListSchema, g as actorDirectoryReportSchema, h as revokePersonalTokenResponseSchema, i as deleteWorkspaceResponseSchema, j as codeOverviewReportSchema, l as workspaceSchema, m as personalTokenParamsSchema, n as statsReportSchema, o as workspaceListSchema, s as workspaceParamsSchema, u as createPersonalTokenBodySchema, v as personParamsSchema, w as activityDays$1, x as locationDetailReportSchema, y as personalSpendReportSchema } from "./schema-WRgR9EL6.js";
19
+ import { B as readHealthReport, I as createVercelAttachmentStorage, _ as readViewerAutomationRuns, a as recordWebConversationActivity, b as readViewerAutomations, d as resolveSlackConversationContextFromThreadId, g as readViewerAutomationExecutions, h as readConversationSourceTask, i as createConversationId, j as stopConversationTurn, l as getProductionSlackAdapter, m as deleteViewerTask, o as webActorFromEmail, p as ViewerTaskNotFoundError, r as createAndEnqueueConversation, t as appendAndEnqueueWebMessage, u as formatSlackConversationRedactedLabel, v as readViewerAutomationSummary, w as clearSlackPendingReactions, x as resolveViewerTaskCandidate, y as readViewerAutomationVersions } from "./web-input-DSYxI7Wi.js";
20
+ import { A as conversationActiveDaysColumn, M as conversationRangeColumns, j as conversationAggregateColumns } from "./task-runner-CiPepjIB.js";
21
+ import { d as legacyWebMailboxMetadataSchema } from "./result-DNgmkASh.js";
22
+ import { r as getWebAuthorization } from "./web-authorization-DwyTlkAg.js";
23
+ import { t as decodeInputImages } from "./images-C3e5E-p_.js";
24
+ import { C as locationParamsSchema, E as activitySixHours$1, L as conversationChildAgentsReportSchema, M as codePersonReportSchema, N as codeRepositoryParamsSchema, P as codeRepositoryReportSchema, R as stopConversationTurnResponseSchema, S as locationDirectoryReportSchema, T as activityHours$1, _ as actorProfileReportSchema, a as workspaceBodySchema, d as createdPersonalTokenSchema, f as personalTokenListSchema, g as actorDirectoryReportSchema, h as revokePersonalTokenResponseSchema, i as deleteWorkspaceResponseSchema, j as codeOverviewReportSchema, l as workspaceSchema, m as personalTokenParamsSchema, n as statsReportSchema, o as workspaceListSchema, s as workspaceParamsSchema, u as createPersonalTokenBodySchema, v as personParamsSchema, w as activityDays$1, x as locationDetailReportSchema, y as personalSpendReportSchema, z as apiErrorSchema } from "./schema-tyd6hALh.js";
22
25
  import { Hono } from "hono";
23
26
  import path from "node:path";
24
27
  import { z } from "zod";
@@ -2142,6 +2145,59 @@ async function readConversationStats() {
2142
2145
  return conversationStatsReportSchema.parse(await readConversationStatsFromSql());
2143
2146
  }
2144
2147
  //#endregion
2148
+ //#region src/api/conversations/stop.ts
2149
+ /**
2150
+ * Stop the active Turn for one conversation participant.
2151
+ *
2152
+ * The stop also removes the human messages queued before it. The viewer's own
2153
+ * web text comes back in the response so the dashboard can restore it to the
2154
+ * composer instead of losing it.
2155
+ */
2156
+ async function stopConversationTurnForViewer(viewer, conversationId, services) {
2157
+ const conversationStore = getConversationStore();
2158
+ if (!await conversationStore.get({ conversationId })) throwApiError(404, "Conversation not found.");
2159
+ if (!(await readConversationAccessFromSql(getDb(), [conversationId], viewer)).get(conversationId)?.isParticipant) throwApiError(403, "Only conversation participants can stop this turn.");
2160
+ try {
2161
+ const result = await stopConversationTurn({
2162
+ conversationId,
2163
+ conversationStore,
2164
+ queue: services.queue
2165
+ });
2166
+ if (result.status === "no_work") return {
2167
+ conversationId,
2168
+ status: "no_work",
2169
+ stoppedInboundMessageIds: [],
2170
+ stoppedMessages: []
2171
+ };
2172
+ await clearSlackPendingReactions({
2173
+ getSlackAdapter: getProductionSlackAdapter,
2174
+ messages: result.pendingMessages
2175
+ });
2176
+ return {
2177
+ conversationId,
2178
+ status: "requested",
2179
+ stoppedInboundMessageIds: result.pendingMessages.map((message) => message.inboundMessageId),
2180
+ stoppedMessages: viewerWebMessages(result.pendingMessages, viewer)
2181
+ };
2182
+ } catch (error) {
2183
+ throwApiError(500, "Unable to stop the active turn.", error);
2184
+ }
2185
+ }
2186
+ function viewerWebMessages(messages, viewer) {
2187
+ const viewerUserId = webActorFromEmail(viewer.email).userId;
2188
+ return messages.flatMap((message) => {
2189
+ if (message.source !== "web") return [];
2190
+ const metadata = legacyWebMailboxMetadataSchema.safeParse(message.input.metadata);
2191
+ if (!metadata.success) return [];
2192
+ if (metadata.data.authorUserId !== viewerUserId) return [];
2193
+ const text = message.input.text.trim();
2194
+ return text ? [{
2195
+ inboundMessageId: message.inboundMessageId,
2196
+ text
2197
+ }] : [];
2198
+ });
2199
+ }
2200
+ //#endregion
2145
2201
  //#region src/api/conversations/routes.ts
2146
2202
  /** Create the HTTP routes owned by the conversations API. */
2147
2203
  function createConversationRoutes(options) {
@@ -2175,6 +2231,11 @@ function createConversationRoutes(options) {
2175
2231
  const body = context.req.valid("json");
2176
2232
  return jsonResponse(acceptedConversationMessageSchema, await appendConversationMessageForViewer(viewer, conversationId, body, options));
2177
2233
  });
2234
+ app.post("/:conversationId/stop", requireViewer, validateRequest("param", conversationParamsSchema, "Invalid route parameters."), async (context) => {
2235
+ const viewer = context.get("viewer");
2236
+ const { conversationId } = context.req.valid("param");
2237
+ return jsonResponse(stopConversationTurnResponseSchema, await stopConversationTurnForViewer(viewer, conversationId, options));
2238
+ });
2178
2239
  app.post("/:conversationId/forks", requireViewer, bodyLimit({ maxSize: 4096 }), validateRequest("param", conversationParamsSchema, "Invalid route parameters."), validateRequest("json", forkConversationBodySchema, "Invalid request body."), async (context) => jsonResponse(forkConversationResponseSchema, await forkConversationForViewer(context.get("viewer"), context.req.valid("param").conversationId, context.req.valid("json"))));
2179
2240
  app.patch("/:conversationId/archive", requireViewer, validateRequest("param", conversationParamsSchema, "Invalid route parameters."), validateRequest("json", archiveConversationBodySchema, "Invalid request body."), async (context) => {
2180
2241
  const viewer = context.get("viewer");
@@ -3457,7 +3518,7 @@ async function readPeoplePluginReports(args) {
3457
3518
  reports: [],
3458
3519
  source: "plugins"
3459
3520
  });
3460
- const { getPluginProfileReports } = await import("./agent-hooks-Caa0Qh_Q.js").then((n) => n.t);
3521
+ const { getPluginProfileReports } = await import("./agent-hooks-C72ByH0C.js").then((n) => n.t);
3461
3522
  return pluginOperationalReportFeedSchema.parse({
3462
3523
  generatedAt: new Date(nowMs).toISOString(),
3463
3524
  reports: await getPluginProfileReports({
@@ -4425,7 +4486,7 @@ function readDescriptionText(home) {
4425
4486
  }
4426
4487
  /** Read discovered skill names for authenticated runtime diagnostics. */
4427
4488
  async function readSkillReports() {
4428
- const { discoverSkills } = await import("./skills-C4yrD2NR.js").then((n) => n.o);
4489
+ const { discoverSkills } = await import("./skills-DQy-mmBC.js").then((n) => n.o);
4429
4490
  const skills = await discoverSkills();
4430
4491
  return skillReportsSchema.parse(skills.map((skill) => ({
4431
4492
  name: skill.name,
@@ -4434,7 +4495,7 @@ async function readSkillReports() {
4434
4495
  }
4435
4496
  /** Read safe configured plugin metadata for authenticated runtime diagnostics. */
4436
4497
  async function readPlugins() {
4437
- const { pluginCatalogRuntime } = await import("./catalog-runtime-wmq_fqff.js").then((n) => n.t);
4498
+ const { pluginCatalogRuntime } = await import("./catalog-runtime-DS1k7fUG.js").then((n) => n.t);
4438
4499
  return pluginsSchema.parse(pluginCatalogRuntime.getProviders().map((plugin) => ({
4439
4500
  configKeys: plugin.manifest.configKeys ?? [],
4440
4501
  description: plugin.manifest.description,
@@ -4446,7 +4507,7 @@ async function readPlugins() {
4446
4507
  async function readRuntimeInfoReport() {
4447
4508
  const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
4448
4509
  import("./package-discovery-BVvSnQBB.js").then((n) => n.r),
4449
- import("./catalog-runtime-wmq_fqff.js").then((n) => n.t),
4510
+ import("./catalog-runtime-DS1k7fUG.js").then((n) => n.t),
4450
4511
  readPlugins(),
4451
4512
  readSkillReports()
4452
4513
  ]);
@@ -4463,7 +4524,7 @@ async function readRuntimeInfoReport() {
4463
4524
  /** Read sanitized operational summaries contributed by plugins. */
4464
4525
  async function readPluginOperationalReportFeed() {
4465
4526
  const nowMs = Date.now();
4466
- const { getPluginOperationalReports } = await import("./agent-hooks-Caa0Qh_Q.js").then((n) => n.t);
4527
+ const { getPluginOperationalReports } = await import("./agent-hooks-C72ByH0C.js").then((n) => n.t);
4467
4528
  return pluginOperationalReportFeedSchema.parse({
4468
4529
  source: "plugins",
4469
4530
  generatedAt: new Date(nowMs).toISOString(),
@@ -155,7 +155,14 @@ interface InboxAttempt {
155
155
  ack(): Promise<void>;
156
156
  conversationId: string;
157
157
  destination?: Destination;
158
- drain(handle: (messages: InboundMessage[]) => Promise<readonly string[] | void>): Promise<InboundMessage[]>;
158
+ /**
159
+ * Give pending mailbox messages to the active Turn. By default only
160
+ * `interrupt` messages for this attempt are offered. With `deferred`, every
161
+ * pending message is offered, and the handler owns Actor and Source scoping.
162
+ */
163
+ drain(handle: (messages: InboundMessage[]) => Promise<readonly string[] | void>, options?: {
164
+ deferred?: boolean;
165
+ }): Promise<InboundMessage[]>;
159
166
  isFinalAttempt: boolean;
160
167
  messages: InboundMessage[];
161
168
  }
package/dist/app.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as ModelProfileInput, n as createApp, r as JuniorDashboardOptions, t as JuniorAppOptions } from "./app-BYB7szGb.js";
1
+ import { i as ModelProfileInput, n as createApp, r as JuniorDashboardOptions, t as JuniorAppOptions } from "./app-4t4mPTdS.js";
2
2
  import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-CjfUP5gJ.js";
3
3
  import { t as JUNIOR_VERSION } from "./version-CnXZ614E.js";
4
4
  export { JUNIOR_VERSION, JuniorAppOptions, type JuniorDashboardOptions, type JuniorPluginInput, type JuniorPluginSet, type JuniorPluginSetOptions, type ModelProfileInput, createApp, defineJuniorPlugins };
package/dist/app.js CHANGED
@@ -1,33 +1,37 @@
1
- import { $t as isInvalidConversationRecordError, B as effectiveTaskOutcomes, Dn as setConfigDefaults, E as requestAttachmentDeletion, En as getConfigDefaults, F as logScheduledAutomationRunSkipped, Ft as ensureConversationWake, Gt as requestConversationWork, I as scheduledAutomationRunAttributes, It as getConversation, Lt as getConversationWorkState, O as parseSlackThreadId, Rt as hasRunnableConversationWork, U as recordSubagentEnded, Ut as removeActiveConversation, Yt as CONVERSATION_WORK_STALE_ENQUEUE_MS, Zt as hasRunnableConversationWork$1, _t as SLACK_EVENT_NAMESPACE, an as shouldPropagateSandboxEgressTrace, b as unpublishedArtifactHeaders, c as deleteMcpAuthSessionsForUserProvider, cn as consumeSandboxEgressAuthRequiredSignal, dt as processWorkspaceSnapshotJob, en as renderTaskInput, fn as formatProviderLabel, ft as ingestEvent, gn as createUserTokenStore, gt as getEventCatalog, hn as startOAuthFlow, i as executeCredentialedEgressRequest, in as normalizeSandboxEgressTracePropagationDomains, it as listPendingAgentInvocationResults, kt as clearExpiredConversationLease, l as deleteMcpServerSessionId, ln as consumeSandboxEgressPermissionDeniedSignal, n as executeAgentRun, on as SANDBOX_EGRESS_PROXY_PATH, qt as stopConversationWork, rn as resolveSandboxEgressProviderForHost, rt as listPendingAgentInvocationMailboxAppends, sn as clearSandboxEgressSignals, t as createAgentRunner, u as deleteMcpStoredOAuthCredentials, un as parseSandboxEgressCredentialToken, v as publicArtifactHeaders, vt as slackChannelMessageEvent, w as collectAttachmentGarbage, wt as appendAndEnqueueInboundMessage, x as lookupSlackUserProfile, xt as eventGuidance, y as readPublicArtifact, yt as slackChannelMessageReplyThreadTs, zt as listActiveConversationIds } from "./agent-runner-BEuPFbbv.js";
2
- import { C as withLogContext, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, S as withContext, d as logException, f as logInfo, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, p as logWarn, r as createRequestContext, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-Bs3dV81s.js";
1
+ import { B as effectiveTaskOutcomes, Ct as normalizeSandboxEgressTracePropagationDomains, Dt as consumeSandboxEgressAuthRequiredSignal, E as requestAttachmentDeletion, Et as clearSandboxEgressSignals, F as logScheduledAutomationRunSkipped, Ft as createUserTokenStore, Gt as setConfigDefaults, I as scheduledAutomationRunAttributes, O as parseSlackThreadId, Ot as consumeSandboxEgressPermissionDeniedSignal, Pt as startOAuthFlow, St as resolveSandboxEgressProviderForHost, Tt as SANDBOX_EGRESS_PROXY_PATH, U as stopConversationSession, W as recordSubagentEnded, Wt as getConfigDefaults, b as unpublishedArtifactHeaders, bt as processWorkspaceSnapshotJob, c as deleteMcpAuthSessionsForUserProvider, i as executeCredentialedEgressRequest, jt as formatProviderLabel, kt as parseSandboxEgressCredentialToken, l as deleteMcpServerSessionId, lt as listPendingAgentInvocationMailboxAppends, n as executeAgentRun, t as createAgentRunner, u as deleteMcpStoredOAuthCredentials, ut as listPendingAgentInvocationResults, v as publicArtifactHeaders, w as collectAttachmentGarbage, wt as shouldPropagateSandboxEgressTrace, x as lookupSlackUserProfile, xt as ingestEvent, y as readPublicArtifact } from "./agent-runner-DsAFAKKs.js";
2
+ import { C as withLogContext, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, S as withContext, d as logException, f as logInfo, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, p as logWarn, r as createRequestContext, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-CZEc8_v4.js";
3
3
  import { n as captureMessage, r as continueTrace } from "./sentry-CgWZM_kV.js";
4
- import { t as JUNIOR_VERSION } from "./version-CiXDH3oe.js";
5
- import { _ as snapshotRuntimeConfig, d as restoreRuntimeConfig, f as setBotModelConfig, g as setSlackReactionConfig, h as setRuntimeLimits, i as getChatConfig, m as setProfiles, n as botConfig, o as getSlackBotToken, p as setCrossActorMidRunMode, u as resetRuntimeConfig } from "./config-_XAINZMN.js";
4
+ import { t as JUNIOR_VERSION } from "./version-BrZSE5du.js";
5
+ import { _ as snapshotRuntimeConfig, d as restoreRuntimeConfig, f as setBotModelConfig, g as setSlackReactionConfig, h as setRuntimeLimits, i as getChatConfig, m as setProfiles, n as botConfig, o as getSlackBotToken, p as setCrossActorMidRunMode, u as resetRuntimeConfig } from "./config-CgWvImQL.js";
6
6
  import { _ as slackMessageTsSchema, d as parseSlackTeamId, f as parseSlackUserId, h as slackUserIdSchema, m as slackTeamIdSchema, o as parseActorUserId, p as slackChannelIdSchema } from "./actor-BTtLaeWy.js";
7
- import { D as deleteProviderIdentityForSlackUser, c as getConversationEventStore, d as getDb, f as getSqlExecutor, g as withConversationMutationLock, m as withConversationEventLock, r as readActorIdentity, u as getConversationStore } from "./viewer-wCn8xneI.js";
8
- import { a as juniorAgentInvocations, d as juniorDestinations, i as juniorAgentBindings, s as juniorConversations } from "./agent-invocations-BO6ddZax.js";
9
- import { _ as juniorConversationEvents, a as juniorSchedulerRuns, m as juniorConversationBriefs, o as juniorSchedulerTasks } from "./executor-CFIqoCNJ.js";
10
- import { n as pluginCatalogRuntime } from "./catalog-runtime-wmq_fqff.js";
11
- import { C as eventAutomationRunLimitReason, F as slackMention, G as slackExternalRefIdSchema, S as admitEventAutomationRun, Vt as appendConversationMessages, W as slackEntitySchema, Wt as projectConversationMessages, a as readScheduledAutomation, c as scheduledRunId, d as collectEventAutomationMatchKeys, h as findMatchingEventAutomations, l as withScheduledAutomationLock, n as listScheduledAutomations, qt as settleConversationTitleWork, r as listScheduledAutomationsForTeam, s as saveScheduledAutomationInLock, u as blockEventAutomation } from "./tasks-Ddd7OAkp.js";
12
- import { $ as verifySlackDirectCredentialSubject, At as listConversationAnnotations, Dt as resolveRootVisibility, G as findMatchingWatches, Gt as getWorkspaceTeamId, J as bindEventAutomationCredentialSubject, Kt as runWithWorkspaceTeamId, Q as verifyScheduledAutomationCredentialSubject, V as collectEventMatchKeys, Vt as isDmChannel, X as bindSlackDirectCredentialSubject, Y as bindScheduledAutomationCredentialSubject, Z as verifyEventAutomationCredentialSubject, a as getPluginRoutes, at as setDashboardConversationLinkOptions, d as setPlugins, f as validatePlugins, h as setBriefsConfig, i as getPluginApiRoutes, it as getDashboardTaskLink, lt as createPluginLogger, nt as getDashboardConversationLink, ot as createPluginState, q as takeDueTimerWatches, u as getPlugins, ut as readConversationAccessFromSql, z as cancelSubscriptions, zt as getSlackClient } from "./agent-hooks-Caa0Qh_Q.js";
13
- import { H as annotationCard } from "./conversation-CvBG57Io.js";
14
- import { O as withLock$1, w as getStateAdapter } from "./profile-BA471c-l.js";
15
- import { c as getThreadStopDecision } from "./pending-auth-Bnhg7Q9k.js";
7
+ import { D as deleteProviderIdentityForSlackUser, c as getConversationEventStore, d as getDb, f as getSqlExecutor, g as withConversationMutationLock, m as withConversationEventLock, r as readActorIdentity, u as getConversationStore } from "./viewer-BlAozHer.js";
8
+ import { a as juniorAgentInvocations, d as juniorDestinations, i as juniorAgentBindings, s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
9
+ import { _ as juniorConversationEvents, a as juniorSchedulerRuns, m as juniorConversationBriefs, o as juniorSchedulerTasks } from "./executor-DQazjeGA.js";
10
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-DS1k7fUG.js";
11
+ import { C as eventAutomationRunLimitReason, F as slackMention, G as slackExternalRefIdSchema, S as admitEventAutomationRun, Vt as appendConversationMessages, W as slackEntitySchema, Wt as projectConversationMessages, a as readScheduledAutomation, c as scheduledRunId, d as collectEventAutomationMatchKeys, h as findMatchingEventAutomations, l as withScheduledAutomationLock, n as listScheduledAutomations, qt as settleConversationTitleWork, r as listScheduledAutomationsForTeam, s as saveScheduledAutomationInLock, u as blockEventAutomation } from "./tasks-DMmRrIVl.js";
12
+ import { $ as verifySlackDirectCredentialSubject, At as listConversationAnnotations, Dt as resolveRootVisibility, G as findMatchingWatches, Gt as getWorkspaceTeamId, J as bindEventAutomationCredentialSubject, Kt as runWithWorkspaceTeamId, Q as verifyScheduledAutomationCredentialSubject, V as collectEventMatchKeys, Vt as isDmChannel, X as bindSlackDirectCredentialSubject, Y as bindScheduledAutomationCredentialSubject, Z as verifyEventAutomationCredentialSubject, a as getPluginRoutes, at as setDashboardConversationLinkOptions, d as setPlugins, f as validatePlugins, h as setBriefsConfig, i as getPluginApiRoutes, it as getDashboardTaskLink, lt as createPluginLogger, nt as getDashboardConversationLink, ot as createPluginState, q as takeDueTimerWatches, u as getPlugins, ut as readConversationAccessFromSql, zt as getSlackClient } from "./agent-hooks-C72ByH0C.js";
13
+ import { U as annotationCard } from "./conversation-CYsbVFLx.js";
14
+ import { O as withLock$1, w as getStateAdapter } from "./profile-aVLDAirh.js";
15
+ import { c as getThreadStopDecision } from "./pending-auth-Oo5AQhaf.js";
16
+ import { O as renderTaskInput, f as slackChannelMessageEvent, l as getEventCatalog, p as slackChannelMessageReplyThreadTs, u as SLACK_EVENT_NAMESPACE, y as eventGuidance } from "./session-stop-CAhBfBUT.js";
16
17
  import { n as getNextRunAtMs } from "./cadence-D00SCzT1.js";
17
- import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-rpz8No2i.js";
18
- import { a as getVercelConversationWorkQueue, g as isConversationQueueMessageRejectedError, h as conversationQueueMessageSchema, i as verifyWorkspaceSnapshotJobMessage, o as resolveConversationWorkQueueTopic, s as verifyConversationQueueMessage, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-CGicV7x6.js";
18
+ import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-Bdw4hu7s.js";
19
+ import { a as getVercelConversationWorkQueue, g as isConversationQueueMessageRejectedError, h as conversationQueueMessageSchema, i as verifyWorkspaceSnapshotJobMessage, o as resolveConversationWorkQueueTopic, s as verifyConversationQueueMessage, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-BEUqRhjC.js";
20
+ import { A as hasRunnableConversationWork$1, M as isInvalidConversationRecordError, O as CONVERSATION_WORK_STALE_ENQUEUE_MS, S as removeActiveConversation, _ as hasRunnableConversationWork, c as clearExpiredConversationLease, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, v as listActiveConversationIds } from "./store-DjLA8GKs.js";
19
21
  import { D as scheduledRunSchema } from "./automation-gznOMaQ2.js";
20
22
  import { i as setExperimentalFeatures, n as getExperimentalFeatures, r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
21
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-BAzlyNIc.js";
23
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-DTguegIe.js";
22
24
  import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-egKWjgue.js";
23
- import { A as withNormalizedThreadId, B as enqueueAgentDispatch, C as buildSlackInboundMessage, D as isSlackMessageStopped, E as verifySlackSignature, F as parseContent, I as renderSlackObjectCard, L as createVercelAttachmentStorage, N as THREAD_OPTOUT_ACK, O as stopSlackThread, P as startProcessingReaction, R as enqueueAgentInvocationResult, S as recordSkippedConversationMessage, T as runWithSlackInstallation, V as GET$3, a as recordWebConversationActivity, c as createProductionSlackWebhookServices, f as createSlackWebApiStatusSender, j as getAuthPausedConversationTurnId, k as normalizeIncomingSlackThreadId, l as getProductionSlackAdapter, n as conversationTurnIdForMessage, o as webActorFromEmail, s as createProductionConversationWorkOptions, t as appendAndEnqueueWebMessage, v as readViewerAutomationSummary, w as clearSlackPendingReactions } from "./web-input-BZTiCtvP.js";
24
- import { _ as markDispatchFailed, a as confirmDispatchMailboxAppend, d as getPluginDispatchProjection, f as isTerminalDispatchStatus, k as recordAutomationExecution, l as getDispatchRecord, o as createOrGetDispatch, p as listPendingDispatchMailboxAppends, s as getDispatchConversationId, t as processPluginTask, y as notifyAutomationBlocked } from "./task-runner-BqFapTjs.js";
25
- import { r as enqueueAgentInvocation } from "./work-4QPqTd5_.js";
26
- import { s as coerceThreadConversationState } from "./thread-state-DqErwbA8.js";
27
- import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-BvaUm6HQ.js";
28
- import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-BBxHzlIB.js";
29
- import { t as processConversationWork } from "./worker-mc62tybz.js";
30
- import { t as bindSpawnAgent } from "./spawn-CdAaTXrY.js";
25
+ import { A as withNormalizedThreadId, C as buildSlackInboundMessage, D as isSlackMessageStopped, E as verifySlackSignature, F as renderSlackObjectCard, I as createVercelAttachmentStorage, M as THREAD_OPTOUT_ACK, N as startProcessingReaction, O as stopSlackThread, P as parseContent, R as enqueueAgentDispatch, S as recordSkippedConversationMessage, T as runWithSlackInstallation, a as recordWebConversationActivity, c as createProductionSlackWebhookServices, f as createSlackWebApiStatusSender, j as stopConversationTurn, k as normalizeIncomingSlackThreadId, l as getProductionSlackAdapter, n as conversationTurnIdForMessage, o as webActorFromEmail, s as createProductionConversationWorkOptions, t as appendAndEnqueueWebMessage, v as readViewerAutomationSummary, w as clearSlackPendingReactions, z as GET$3 } from "./web-input-DSYxI7Wi.js";
26
+ import { _ as markDispatchFailed, a as confirmDispatchMailboxAppend, d as getPluginDispatchProjection, f as isTerminalDispatchStatus, k as recordAutomationExecution, l as getDispatchRecord, o as createOrGetDispatch, p as listPendingDispatchMailboxAppends, s as getDispatchConversationId, t as processPluginTask, y as notifyAutomationBlocked } from "./task-runner-CiPepjIB.js";
27
+ import { o as getAuthPausedConversationTurnId, t as enqueueAgentInvocationResult } from "./result-DNgmkASh.js";
28
+ import { r as enqueueAgentInvocation } from "./work-CRBXkJoU.js";
29
+ import { s as coerceThreadConversationState } from "./thread-state-ehZYGpX9.js";
30
+ import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-DLw3jkv-.js";
31
+ import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-BT2h_t8I.js";
32
+ import { t as processConversationWork } from "./worker-BVJKM9Ja.js";
33
+ import { t as bindMessageAgent } from "./message-BIJa7lKh.js";
34
+ import { t as bindSpawnAgent } from "./spawn-DQ_MVWZ6.js";
31
35
  import { createRequire } from "node:module";
32
36
  import { Hono } from "hono";
33
37
  import { z } from "zod";
@@ -1922,43 +1926,6 @@ const slackInteractivePayloadSchema = z.object({
1922
1926
  }).optional()
1923
1927
  });
1924
1928
  //#endregion
1925
- //#region src/chat/conversations/stop.ts
1926
- /** Stop the current Conversation Turn and wake an idle resume when needed. */
1927
- async function stopConversationTurn(args) {
1928
- const nowMs = args.nowMs ?? Date.now();
1929
- const stop = async () => await stopConversationWork({
1930
- conversationId: args.conversationId,
1931
- conversationStore: args.conversationStore,
1932
- nowMs,
1933
- state: args.state
1934
- });
1935
- let result = await stop();
1936
- if (result.status === "no_work" && await getAuthPausedConversationTurnId(args.conversationId)) {
1937
- const conversation = await getConversation({
1938
- conversationId: args.conversationId,
1939
- state: args.state
1940
- });
1941
- await requestConversationWork({
1942
- conversationId: args.conversationId,
1943
- conversationStore: args.conversationStore,
1944
- destination: conversation?.destination,
1945
- nowMs,
1946
- state: args.state
1947
- });
1948
- result = await stop();
1949
- }
1950
- if (result.status === "requested") await ensureConversationWake({
1951
- conversationId: args.conversationId,
1952
- conversationStore: args.conversationStore,
1953
- idempotencyKey: `conversation-stop:${args.conversationId}:${result.runId}`,
1954
- nowMs,
1955
- queue: args.queue,
1956
- replaceExistingWake: true,
1957
- state: args.state
1958
- });
1959
- return result;
1960
- }
1961
- //#endregion
1962
1929
  //#region src/chat/ingress/bot-mention.ts
1963
1930
  /**
1964
1931
  * Detect Slack bot @mentions that should activate Junior.
@@ -2550,7 +2517,7 @@ async function persistSlackMessage(args) {
2550
2517
  });
2551
2518
  }
2552
2519
  /**
2553
- * Interrupt the active Run, cancel resource watches, unsubscribe, and record
2520
+ * Interrupt the active Run, stop the session, unsubscribe, and record
2554
2521
  * the stop message in history. Stop input never enters the mailbox, so a
2555
2522
  * mention-route stop cannot resubscribe the thread by starting a new Turn.
2556
2523
  *
@@ -2585,7 +2552,7 @@ async function handleSlackThreadStop(args) {
2585
2552
  messages: work?.execution.pendingMessages ?? [],
2586
2553
  state: args.state
2587
2554
  });
2588
- await cancelSubscriptions({
2555
+ await stopConversationSession({
2589
2556
  conversationId,
2590
2557
  state: args.state
2591
2558
  });
@@ -2615,12 +2582,13 @@ const SLACK_SESSION_STOP_ACK = "Stopped.";
2615
2582
  */
2616
2583
  async function handleSlackSessionStop(args) {
2617
2584
  const canonicalThreadId = `slack:${args.channelId}:${args.threadTs}`;
2585
+ const conversationId = await resolveSlackConversationId({
2586
+ canonicalThreadId,
2587
+ conversationStore: args.conversationStore,
2588
+ installation: args.installation
2589
+ });
2618
2590
  const stopped = await stopConversationTurn({
2619
- conversationId: await resolveSlackConversationId({
2620
- canonicalThreadId,
2621
- conversationStore: args.conversationStore,
2622
- installation: args.installation
2623
- }),
2591
+ conversationId,
2624
2592
  conversationStore: args.conversationStore,
2625
2593
  queue: args.queue,
2626
2594
  state: args.state
@@ -5308,6 +5276,7 @@ async function createApp(options) {
5308
5276
  const attachmentStorage = createVercelAttachmentStorage();
5309
5277
  const agentRunner = createAgentRunner(executeAgentRun, {
5310
5278
  attachmentStorage,
5279
+ bindMessageAgent: (request) => bindMessageAgent(request, { queue: conversationWorkQueue }),
5311
5280
  bindSpawnAgent: (request) => bindSpawnAgent(request, { queue: conversationWorkQueue }),
5312
5281
  tracePropagation
5313
5282
  });
@@ -0,0 +1,45 @@
1
+ import { ot as extractAssistantText } from "./tasks-DMmRrIVl.js";
2
+ //#region src/chat/no-reply.ts
3
+ const NO_REPLY_MARKER = "[[NO_REPLY]]";
4
+ /**
5
+ * True when one assistant message ends with the silence marker.
6
+ * Mid-sentence mentions do not match. Detection is per message only.
7
+ */
8
+ function isNoReplyMarker(text) {
9
+ return text.trimEnd().endsWith(NO_REPLY_MARKER);
10
+ }
11
+ //#endregion
12
+ //#region src/chat/services/assistant-reply.ts
13
+ const THINKING_XML_BLOCK_PATTERN = /[ \t]*<thinking\b[^>]*>[\s\S]*?<\/thinking>[ \t]*(?:\r?\n)?/gi;
14
+ const FENCED_CODE_BLOCK_PATTERN = /```[\s\S]*?```/g;
15
+ /** Remove provider reasoning wrappers while preserving fenced code examples. */
16
+ function sanitizeAssistantText(text) {
17
+ let result = "";
18
+ let cursor = 0;
19
+ for (const match of text.matchAll(FENCED_CODE_BLOCK_PATTERN)) {
20
+ const start = match.index;
21
+ if (start === void 0) continue;
22
+ result += text.slice(cursor, start).replace(THINKING_XML_BLOCK_PATTERN, "");
23
+ result += match[0];
24
+ cursor = start + match[0].length;
25
+ }
26
+ return (result + text.slice(cursor).replace(THINKING_XML_BLOCK_PATTERN, "")).trim();
27
+ }
28
+ /** Decide whether one completed assistant message becomes a reply. */
29
+ function decideReply(message) {
30
+ if (message.content.some((part) => part.type === "toolCall")) return { kind: "suppress" };
31
+ const text = sanitizeAssistantText(extractAssistantText(message));
32
+ if (!text) return { kind: "empty" };
33
+ if (isNoReplyMarker(text)) return { kind: "suppress" };
34
+ return {
35
+ kind: "deliver",
36
+ text
37
+ };
38
+ }
39
+ /** Return destination-visible reply text when the message is deliverable. */
40
+ function getAssistantReplyText(message) {
41
+ const decision = decideReply(message);
42
+ return decision.kind === "deliver" ? decision.text : void 0;
43
+ }
44
+ //#endregion
45
+ export { isNoReplyMarker as a, NO_REPLY_MARKER as i, getAssistantReplyText as n, sanitizeAssistantText as r, decideReply as t };
@@ -1,7 +1,7 @@
1
- import { r as completeObject } from "./client-Bn9SRFCi.js";
1
+ import { r as completeObject } from "./client-BVnfNd3D.js";
2
2
  import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
3
- import { L as briefCodeChangeSchema, V as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-CvBG57Io.js";
4
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-C9Q9cjD3.js";
3
+ import { H as parseBriefInput, R as briefCodeChangeSchema, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-CYsbVFLx.js";
4
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-ZG1UCxjF.js";
5
5
  import { CLI_USAGE } from "./cli/run.js";
6
6
  import path from "node:path";
7
7
  import { z } from "zod";
@@ -269,7 +269,7 @@ async function parseRunOptions(argv) {
269
269
  * `DATABASE_URL` at import, and `briefs pull` must work with only a token.
270
270
  */
271
271
  async function configuredDefaultModelId() {
272
- const { botConfig } = await import("./config-_XAINZMN.js").then((n) => n.r);
272
+ const { botConfig } = await import("./config-CgWvImQL.js").then((n) => n.r);
273
273
  return defaultModelId(botConfig);
274
274
  }
275
275
  function apiUrl(baseUrl, pathname) {
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { t as createPluginCatalogRuntime } from "./registry-BYNOFO6e.js";
2
+ import { t as createPluginCatalogRuntime } from "./registry-CtaDOOM5.js";
3
3
  //#region src/chat/plugins/catalog-runtime.ts
4
4
  var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
5
5
  const pluginCatalogRuntime = createPluginCatalogRuntime();
package/dist/cli/chat.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-BEuPFbbv.js";
1
+ import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-DsAFAKKs.js";
2
2
  import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
3
3
  import path from "node:path";
4
4
  import { createHash, randomUUID } from "node:crypto";
@@ -100,10 +100,10 @@ async function loadLocalPluginSet() {
100
100
  async function configureLocalChatPlugins(pluginSet) {
101
101
  const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
102
102
  import("../plugins-egKWjgue.js").then((n) => n.o),
103
- import("../agent-hooks-Caa0Qh_Q.js").then((n) => n.t),
104
- import("../catalog-runtime-wmq_fqff.js").then((n) => n.t),
105
- import("../validation-BAzlyNIc.js").then((n) => n.r),
106
- import("../viewer-wCn8xneI.js").then((n) => n.s)
103
+ import("../agent-hooks-C72ByH0C.js").then((n) => n.t),
104
+ import("../catalog-runtime-DS1k7fUG.js").then((n) => n.t),
105
+ import("../validation-DTguegIe.js").then((n) => n.r),
106
+ import("../viewer-BlAozHer.js").then((n) => n.s)
107
107
  ]);
108
108
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
109
109
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -155,22 +155,29 @@ async function prepareLocalChatRun(io, pluginSet) {
155
155
  await configureLocalChatPlugins(pluginSet);
156
156
  const { setExperimentalFeatures } = await import("../experimental-Qn9rKLgx.js").then((n) => n.t);
157
157
  setExperimentalFeatures({ subagents: true });
158
- const { setBriefsConfig } = await import("../agent-hooks-Caa0Qh_Q.js").then((n) => n.m);
158
+ const { setBriefsConfig } = await import("../agent-hooks-C72ByH0C.js").then((n) => n.m);
159
159
  setBriefsConfig({ enabled: true });
160
- const { runLocalAgentTurn } = await import("../runner-C8DRk9X6.js");
161
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-17c9_39v.js");
160
+ const { runLocalAgentTurn } = await import("../runner-BUSScEu5.js");
161
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-R9OSdLP1.js");
162
162
  const { createLocalOAuthState } = await import("../oauth-relay-CdCnu80W.js").then((n) => n.t);
163
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-B8hurjFt.js");
164
- const { bindSpawnAgent } = await import("../spawn-CdAaTXrY.js").then((n) => n.n);
165
- const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-4QPqTd5_.js").then((n) => n.a);
163
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-E9r8bf9G.js");
164
+ const { bindSpawnAgent } = await import("../spawn-DQ_MVWZ6.js").then((n) => n.n);
165
+ const { bindMessageAgent } = await import("../message-BIJa7lKh.js").then((n) => n.n);
166
+ const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-CRBXkJoU.js").then((n) => n.a);
167
+ const { startAgentInvocationsForChildInput } = await import("../result-DNgmkASh.js").then((n) => n.r);
168
+ const { skipInputBeforeConversationStop } = await import("../session-stop-CAhBfBUT.js").then((n) => n.r);
166
169
  const { createLocalConversationWork } = await import("../conversation-work-C6y3T5Hx.js");
167
- const { processConversationWork } = await import("../worker-mc62tybz.js").then((n) => n.n);
170
+ const { processConversationWork } = await import("../worker-BVJKM9Ja.js").then((n) => n.n);
168
171
  let agentRunner;
169
172
  const localConversationWork = createLocalConversationWork(async (message) => {
170
173
  if (!agentRunner) throw new Error("Local agent runner is not ready");
171
174
  const run = routeAgentInvocationWork({
172
- fallbackWorker: async () => {
173
- throw new Error("Local child queue received non-invocation work");
175
+ fallbackWorker: async (context) => {
176
+ const skipped = await skipInputBeforeConversationStop(context);
177
+ if (skipped) return skipped;
178
+ const started = await startAgentInvocationsForChildInput(context, { queue: localConversationWork.queue });
179
+ if (!started) throw new Error("Local child queue received non-invocation work");
180
+ return started;
174
181
  },
175
182
  invocationWorker: createAgentInvocationWorker(agentRunner)
176
183
  });
@@ -179,7 +186,10 @@ async function prepareLocalChatRun(io, pluginSet) {
179
186
  run
180
187
  });
181
188
  });
182
- agentRunner = createAgentRunner(executeAgentRun, { bindSpawnAgent: (request) => bindSpawnAgent(request, { queue: localConversationWork.queue }) });
189
+ agentRunner = createAgentRunner(executeAgentRun, {
190
+ bindMessageAgent: (request) => request.parentConversationId ? void 0 : bindMessageAgent(request, { queue: localConversationWork.queue }),
191
+ bindSpawnAgent: (request) => bindSpawnAgent(request, { queue: localConversationWork.queue })
192
+ });
183
193
  const oauthCallback = await startLocalOAuthCallbackServer();
184
194
  const deps = {
185
195
  agentRunner,
package/dist/cli/check.js CHANGED
@@ -1,6 +1,6 @@
1
- import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-Bs3dV81s.js";
2
- import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-BYNOFO6e.js";
3
- import { i as parseSkillFile } from "../skills-C4yrD2NR.js";
1
+ import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-CZEc8_v4.js";
2
+ import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-CtaDOOM5.js";
3
+ import { i as parseSkillFile } from "../skills-DQy-mmBC.js";
4
4
  import path from "node:path";
5
5
  import fs from "node:fs/promises";
6
6
  import { pathToFileURL } from "node:url";