@sentry/junior 0.247.0 → 0.248.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 (61) hide show
  1. package/dist/{admin-BGwaqDMs.js → admin-BlHz8fGl.js} +1 -1
  2. package/dist/{agent-hooks-C72ByH0C.js → agent-hooks-DWCHBPYw.js} +24 -11
  3. package/dist/{agent-runner-DsAFAKKs.js → agent-runner-CnlFtbzb.js} +224 -89
  4. package/dist/api/schema.d.ts +171 -3
  5. package/dist/api/schema.js +3 -3
  6. package/dist/api.js +218 -155
  7. package/dist/{app-4t4mPTdS.d.ts → app-B0gT1Slp.d.ts} +3 -1
  8. package/dist/app.d.ts +1 -1
  9. package/dist/app.js +27 -27
  10. package/dist/{assistant-reply-ChOzcTBS.js → assistant-reply-BxCi7V4v.js} +1 -1
  11. package/dist/{briefs-Dc7qZrhc.js → briefs-CdkIl79U.js} +4 -4
  12. package/dist/{catalog-runtime-DS1k7fUG.js → catalog-runtime-CTBsdSam.js} +1 -1
  13. package/dist/cli/chat.js +15 -15
  14. package/dist/cli/check.js +3 -3
  15. package/dist/cli/main.js +2 -2
  16. package/dist/cli/plugins.js +4 -4
  17. package/dist/cli/snapshot-create.js +3 -3
  18. package/dist/cli/upgrade.js +3 -3
  19. package/dist/{client-BVnfNd3D.js → client-CWQtbizj.js} +2 -2
  20. package/dist/{config-CgWvImQL.js → config-aitDvTQm.js} +16 -9
  21. package/dist/{conversation-CYsbVFLx.js → conversation-Cjo9tHGm.js} +15 -1
  22. package/dist/{conversation-privacy-D3TdVM9H.js → conversation-privacy-BsqXHVBz.js} +1 -1
  23. package/dist/{credential-sync-DLw3jkv-.js → credential-sync-DqZF735a.js} +14 -14
  24. package/dist/{executor-DQazjeGA.js → executor-oIZAkQZb.js} +2 -2
  25. package/dist/{images-C3e5E-p_.js → images-Dzh3RBXY.js} +3 -3
  26. package/dist/instrumentation.js +2 -2
  27. package/dist/{job-queue-BEUqRhjC.js → job-queue-DyA2AEnY.js} +1 -1
  28. package/dist/{logging-CZEc8_v4.js → logging-OpC2jwiV.js} +1 -1
  29. package/dist/{message-BIJa7lKh.js → message-EyMrVXEf.js} +3 -3
  30. package/dist/nitro.d.ts +1 -1
  31. package/dist/nitro.js +3 -3
  32. package/dist/{oauth-callback-server-R9OSdLP1.js → oauth-callback-server-ClDv9Z5Y.js} +2 -2
  33. package/dist/{pending-auth-Oo5AQhaf.js → pending-auth-D_nf121N.js} +2 -2
  34. package/dist/{profile-aVLDAirh.js → profile-Dfg76pvk.js} +4 -4
  35. package/dist/{prompt-ZG1UCxjF.js → prompt-C7bRJ2vg.js} +1 -1
  36. package/dist/{registry-CtaDOOM5.js → registry-fpIZHoqE.js} +1 -1
  37. package/dist/{resolve-Bdw4hu7s.js → resolve-LMCZhQVg.js} +2 -2
  38. package/dist/{result-DNgmkASh.js → result-C1ZCRPLx.js} +7 -7
  39. package/dist/{runner-BUSScEu5.js → runner-DNZMviFH.js} +10 -10
  40. package/dist/{sandbox-egress-signals-E9r8bf9G.js → sandbox-egress-signals-Dcc-mwkl.js} +1 -1
  41. package/dist/{schema-tyd6hALh.js → schema-BRZsYL5-.js} +4 -3
  42. package/dist/{session-stop-CAhBfBUT.js → session-stop-dyvsZDB0.js} +11 -11
  43. package/dist/{skills-DQy-mmBC.js → skills-BgGiQt5Y.js} +2 -2
  44. package/dist/{spawn-DQ_MVWZ6.js → spawn-CpqxMPWE.js} +2 -2
  45. package/dist/{store-DjLA8GKs.js → store-OMQAFrJG.js} +6 -6
  46. package/dist/{task-queue-BT2h_t8I.js → task-queue-SWsXPSp-.js} +3 -3
  47. package/dist/{task-runner-CiPepjIB.js → task-runner-BOxv7shv.js} +10 -10
  48. package/dist/{tasks-DMmRrIVl.js → tasks-DREdnhVP.js} +49 -16
  49. package/dist/{thread-state-ehZYGpX9.js → thread-state-BoNCtSwk.js} +6 -6
  50. package/dist/{turn-failure-response-D7J10z7l.js → turn-failure-response-C6jrCPjc.js} +8 -8
  51. package/dist/{turn-lifecycle-Buswqs90.js → turn-lifecycle-cQFsZFOU.js} +1 -1
  52. package/dist/{turn-session-routing-Bw-yiSb4.js → turn-session-routing-Ba12fwXz.js} +1 -1
  53. package/dist/{validation-DTguegIe.js → validation-Dmfh2cTj.js} +1 -1
  54. package/dist/{version-BrZSE5du.js → version-ByV7nGOn.js} +1 -1
  55. package/dist/version.js +1 -1
  56. package/dist/{viewer-BlAozHer.js → viewer-CX41TWYr.js} +3 -3
  57. package/dist/{web-authorization-DwyTlkAg.js → web-authorization-rDLlKIS0.js} +6 -6
  58. package/dist/{web-input-DSYxI7Wi.js → web-input-Bn9HHZEo.js} +28 -28
  59. package/dist/{work-CRBXkJoU.js → work-CvFoEpRT.js} +10 -10
  60. package/dist/{worker-BVJKM9Ja.js → worker-CI5B63vk.js} +5 -5
  61. package/package.json +4 -4
package/dist/app.js CHANGED
@@ -1,37 +1,37 @@
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";
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-CnlFtbzb.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-OpC2jwiV.js";
3
3
  import { n as captureMessage, r as continueTrace } from "./sentry-CgWZM_kV.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";
4
+ import { t as JUNIOR_VERSION } from "./version-ByV7nGOn.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-aitDvTQm.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-BlAozHer.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-CX41TWYr.js";
8
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";
9
+ import { _ as juniorConversationEvents, a as juniorSchedulerRuns, m as juniorConversationBriefs, o as juniorSchedulerTasks } from "./executor-oIZAkQZb.js";
10
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-CTBsdSam.js";
11
+ import { C as eventAutomationRunLimitReason, F as slackMention, G as slackExternalRefIdSchema, S as admitEventAutomationRun, W as slackEntitySchema, Wt as appendConversationMessages, Xt as settleConversationTitleWork, a as readScheduledAutomation, c as scheduledRunId, d as collectEventAutomationMatchKeys, h as findMatchingEventAutomations, l as withScheduledAutomationLock, n as listScheduledAutomations, qt as projectConversationMessages, r as listScheduledAutomationsForTeam, s as saveScheduledAutomationInLock, u as blockEventAutomation } from "./tasks-DREdnhVP.js";
12
+ import { $ as verifyEventAutomationCredentialSubject, Jt as runWithWorkspaceTeamId, Mt as listConversationAnnotations, Q as bindSlackDirectCredentialSubject, U as collectEventMatchKeys, Ut as isDmChannel, Vt as getSlackClient, X as bindEventAutomationCredentialSubject, Y as takeDueTimerWatches, Z as bindScheduledAutomationCredentialSubject, a as getPluginRoutes, ct as createPluginState, d as setPlugins, dt as createPluginLogger, et as verifyScheduledAutomationCredentialSubject, f as validatePlugins, ft as readConversationAccessFromSql, h as setBriefsConfig, i as getPluginApiRoutes, it as getDashboardConversationLink, kt as resolveRootVisibility, ot as getDashboardTaskLink, q as findMatchingWatches, qt as getWorkspaceTeamId, st as setDashboardConversationLinkOptions, tt as verifySlackDirectCredentialSubject, u as getPlugins } from "./agent-hooks-DWCHBPYw.js";
13
+ import { W as annotationCard } from "./conversation-Cjo9tHGm.js";
14
+ import { O as withLock$1, w as getStateAdapter } from "./profile-Dfg76pvk.js";
15
+ import { c as getThreadStopDecision } from "./pending-auth-D_nf121N.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-dyvsZDB0.js";
17
17
  import { n as getNextRunAtMs } from "./cadence-D00SCzT1.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";
18
+ import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-LMCZhQVg.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-DyA2AEnY.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-OMQAFrJG.js";
21
21
  import { D as scheduledRunSchema } from "./automation-gznOMaQ2.js";
22
22
  import { i as setExperimentalFeatures, n as getExperimentalFeatures, r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
23
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-DTguegIe.js";
23
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-Dmfh2cTj.js";
24
24
  import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-egKWjgue.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";
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-Bn9HHZEo.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-BOxv7shv.js";
27
+ import { o as getAuthPausedConversationTurnId, t as enqueueAgentInvocationResult } from "./result-C1ZCRPLx.js";
28
+ import { r as enqueueAgentInvocation } from "./work-CvFoEpRT.js";
29
+ import { s as coerceThreadConversationState } from "./thread-state-BoNCtSwk.js";
30
+ import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-DqZF735a.js";
31
+ import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-SWsXPSp-.js";
32
+ import { t as processConversationWork } from "./worker-CI5B63vk.js";
33
+ import { t as bindMessageAgent } from "./message-EyMrVXEf.js";
34
+ import { t as bindSpawnAgent } from "./spawn-CpqxMPWE.js";
35
35
  import { createRequire } from "node:module";
36
36
  import { Hono } from "hono";
37
37
  import { z } from "zod";
@@ -1,4 +1,4 @@
1
- import { ot as extractAssistantText } from "./tasks-DMmRrIVl.js";
1
+ import { lt as extractAssistantText } from "./tasks-DREdnhVP.js";
2
2
  //#region src/chat/no-reply.ts
3
3
  const NO_REPLY_MARKER = "[[NO_REPLY]]";
4
4
  /**
@@ -1,7 +1,7 @@
1
- import { r as completeObject } from "./client-BVnfNd3D.js";
1
+ import { r as completeObject } from "./client-CWQtbizj.js";
2
2
  import { r as defaultModelId } from "./model-profile-BwU8mqwD.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";
3
+ import { U as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-Cjo9tHGm.js";
4
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-C7bRJ2vg.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-CgWvImQL.js").then((n) => n.r);
272
+ const { botConfig } = await import("./config-aitDvTQm.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-CtaDOOM5.js";
2
+ import { t as createPluginCatalogRuntime } from "./registry-fpIZHoqE.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-DsAFAKKs.js";
1
+ import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-CnlFtbzb.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-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)
103
+ import("../agent-hooks-DWCHBPYw.js").then((n) => n.t),
104
+ import("../catalog-runtime-CTBsdSam.js").then((n) => n.t),
105
+ import("../validation-Dmfh2cTj.js").then((n) => n.r),
106
+ import("../viewer-CX41TWYr.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,19 +155,19 @@ 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-C72ByH0C.js").then((n) => n.m);
158
+ const { setBriefsConfig } = await import("../agent-hooks-DWCHBPYw.js").then((n) => n.m);
159
159
  setBriefsConfig({ enabled: true });
160
- const { runLocalAgentTurn } = await import("../runner-BUSScEu5.js");
161
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-R9OSdLP1.js");
160
+ const { runLocalAgentTurn } = await import("../runner-DNZMviFH.js");
161
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-ClDv9Z5Y.js");
162
162
  const { createLocalOAuthState } = await import("../oauth-relay-CdCnu80W.js").then((n) => n.t);
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);
163
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-Dcc-mwkl.js");
164
+ const { bindSpawnAgent } = await import("../spawn-CpqxMPWE.js").then((n) => n.n);
165
+ const { bindMessageAgent } = await import("../message-EyMrVXEf.js").then((n) => n.n);
166
+ const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-CvFoEpRT.js").then((n) => n.a);
167
+ const { startAgentInvocationsForChildInput } = await import("../result-C1ZCRPLx.js").then((n) => n.r);
168
+ const { skipInputBeforeConversationStop } = await import("../session-stop-dyvsZDB0.js").then((n) => n.r);
169
169
  const { createLocalConversationWork } = await import("../conversation-work-C6y3T5Hx.js");
170
- const { processConversationWork } = await import("../worker-BVJKM9Ja.js").then((n) => n.n);
170
+ const { processConversationWork } = await import("../worker-CI5B63vk.js").then((n) => n.n);
171
171
  let agentRunner;
172
172
  const localConversationWork = createLocalConversationWork(async (message) => {
173
173
  if (!agentRunner) throw new Error("Local agent runner is not ready");
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-CZEc8_v4.js";
2
- import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-CtaDOOM5.js";
3
- import { i as parseSkillFile } from "../skills-DQy-mmBC.js";
1
+ import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-OpC2jwiV.js";
2
+ import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-fpIZHoqE.js";
3
+ import { i as parseSkillFile } from "../skills-BgGiQt5Y.js";
4
4
  import path from "node:path";
5
5
  import fs from "node:fs/promises";
6
6
  import { pathToFileURL } from "node:url";
package/dist/cli/main.js CHANGED
@@ -25,10 +25,10 @@ async function runChat(argv, pluginSet) {
25
25
  return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
26
26
  }
27
27
  async function runAdmin(argv) {
28
- return await (await import("../admin-BGwaqDMs.js")).runAdmin(argv);
28
+ return await (await import("../admin-BlHz8fGl.js")).runAdmin(argv);
29
29
  }
30
30
  async function runBriefs(argv) {
31
- return await (await import("../briefs-Dc7qZrhc.js")).runBriefs(argv);
31
+ return await (await import("../briefs-CdkIl79U.js")).runBriefs(argv);
32
32
  }
33
33
  function topLevelCommand(argv) {
34
34
  return (argv[0] === "--" ? argv.slice(1) : argv)[0];
@@ -1,7 +1,7 @@
1
- import { d as getDb } from "../viewer-BlAozHer.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-DS1k7fUG.js";
3
- import { d as setPlugins, f as validatePlugins, lt as createPluginLogger } from "../agent-hooks-C72ByH0C.js";
4
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DTguegIe.js";
1
+ import { d as getDb } from "../viewer-CX41TWYr.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-CTBsdSam.js";
3
+ import { d as setPlugins, dt as createPluginLogger, f as validatePlugins } from "../agent-hooks-DWCHBPYw.js";
4
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-Dmfh2cTj.js";
5
5
  import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-egKWjgue.js";
6
6
  import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
7
7
  import { stderr, stdout } from "node:process";
@@ -1,6 +1,6 @@
1
- import { n as pluginCatalogRuntime } from "../catalog-runtime-DS1k7fUG.js";
2
- import { S as disconnectStateAdapter, t as create } from "../profile-aVLDAirh.js";
3
- import { r as resolve } from "../resolve-Bdw4hu7s.js";
1
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-CTBsdSam.js";
2
+ import { S as disconnectStateAdapter, t as create } from "../profile-Dfg76pvk.js";
3
+ import { r as resolve } from "../resolve-LMCZhQVg.js";
4
4
  //#region src/cli/snapshot-create.ts
5
5
  const DEFAULT_RUNTIME = "node22";
6
6
  const DEFAULT_TIMEOUT_MS = 6e5;
@@ -1,6 +1,6 @@
1
- import { i as getChatConfig } from "../config-CgWvImQL.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-DQazjeGA.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-CtaDOOM5.js";
1
+ import { i as getChatConfig } from "../config-aitDvTQm.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-oIZAkQZb.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-fpIZHoqE.js";
4
4
  import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-egKWjgue.js";
5
5
  import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
6
6
  import { basename, dirname, join, resolve } from "node:path";
@@ -1,5 +1,5 @@
1
- import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-CZEc8_v4.js";
2
- import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-D3TdVM9H.js";
1
+ import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-OpC2jwiV.js";
2
+ import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-BsqXHVBz.js";
3
3
  import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
4
4
  import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
5
5
  import { createGatewayProvider } from "@ai-sdk/gateway";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-BVnfNd3D.js";
3
- import { p as logWarn } from "./logging-CZEc8_v4.js";
2
+ import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-CWQtbizj.js";
3
+ import { p as logWarn } from "./logging-OpC2jwiV.js";
4
4
  import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-BwU8mqwD.js";
5
5
  //#region src/chat/slack/emoji.ts
6
6
  const SLACK_EMOJI_NAME_RE = /^(?:[a-z0-9_+-]+)(?:::(?:skin-tone-[2-6]))?$/;
@@ -37,21 +37,26 @@ const MIN_AGENT_TURN_TIMEOUT_MS = 1e4;
37
37
  const DEFAULT_AGENT_TURN_TIMEOUT_MS = 72e4;
38
38
  const MAX_SLICES_PER_TURN = 100;
39
39
  /**
40
+ * Max model spend in USD for one turn, including later execution slices of
41
+ * that turn. Sentry span estimates put a child agent that made 250 tool calls
42
+ * of real work at about $50.
43
+ */
44
+ const MAX_TURN_COST_USD = 100;
45
+ /**
40
46
  * Max tool calls for one turn, including later execution slices of that turn.
41
- * Chosen from production dispatch traces: healthy runs cluster well under 50;
42
- * runaway CI-watch loops land in the hundreds. Raised from 150 after that cap
43
- * fired on legitimate long-form human turns, not just runaway automation.
47
+ * A backstop for models without cost data. The spend limit should stop a turn
48
+ * first. 250 calls stopped child agents that were still doing real work.
44
49
  */
45
- const MAX_TOOL_CALLS_PER_TURN = 250;
50
+ const MAX_TOOL_CALLS_PER_TURN = 1e3;
46
51
  /**
47
52
  * Max consecutive automated turns before event wakes stop until a user message.
48
53
  * Resource-event CI watches and event-automation loops are the common runaway paths.
49
54
  * Sentry telemetry has no direct instrumentation for how long real automated
50
55
  * chains run (only failure paths on the notice are logged, and those show zero
51
56
  * hits in the last 30d), so this is sized qualitatively: it stays well under
52
- * the runaway CI-watch-loop range noted for maxToolCallsPerTurn (hundreds of
53
- * tool calls) while giving multi-phase event-automation/scheduled-automation work enough
54
- * headroom to avoid pausing on legitimate longer-running automation.
57
+ * the runaway CI-watch-loop range (hundreds of tool calls) while giving
58
+ * multi-phase event-automation/scheduled-automation work enough headroom to
59
+ * avoid pausing on legitimate longer-running automation.
55
60
  */
56
61
  const MAX_CONSECUTIVE_AUTOMATED_TURNS = 25;
57
62
  /**
@@ -263,6 +268,7 @@ function readBotConfig(env, functionMaxDurationSeconds) {
263
268
  maxAgentDepth: 0,
264
269
  maxSlicesPerTurn: MAX_SLICES_PER_TURN,
265
270
  maxToolCallsPerTurn: MAX_TOOL_CALLS_PER_TURN,
271
+ maxTurnCostUsd: MAX_TURN_COST_USD,
266
272
  maxConsecutiveAutomatedTurns: MAX_CONSECUTIVE_AUTOMATED_TURNS,
267
273
  maxEventAutomationRunsPerHour: MAX_EVENT_AUTOMATION_RUNS_PER_HOUR,
268
274
  turnTimeoutMs: parseAgentTurnTimeoutMs(env.AGENT_TURN_TIMEOUT_MS, maxTurnTimeoutMs),
@@ -381,6 +387,7 @@ function setRuntimeLimits(limits) {
381
387
  if (limits?.maxEventAutomationRunsPerHour !== void 0) bot.maxEventAutomationRunsPerHour = requirePositiveLimit("maxEventAutomationRunsPerHour", limits.maxEventAutomationRunsPerHour);
382
388
  if (limits?.maxSlicesPerTurn !== void 0) bot.maxSlicesPerTurn = requirePositiveLimit("maxSlicesPerTurn", limits.maxSlicesPerTurn);
383
389
  if (limits?.maxToolCallsPerTurn !== void 0) bot.maxToolCallsPerTurn = requirePositiveLimit("maxToolCallsPerTurn", limits.maxToolCallsPerTurn);
390
+ if (limits?.maxTurnCostUsd !== void 0) bot.maxTurnCostUsd = requirePositiveLimit("maxTurnCostUsd", limits.maxTurnCostUsd);
384
391
  if (limits?.turnTimeoutMs !== void 0) bot.turnTimeoutMs = Math.min(requirePositiveLimit("turnTimeoutMs", limits.turnTimeoutMs), resolveMaxTurnTimeoutMs(chatConfig.functionMaxDurationSeconds));
385
392
  }
386
393
  /** Apply the Slack cross-actor steering mode from createApp(). */
@@ -317,6 +317,19 @@ function readMessageAttachments(value) {
317
317
  return messageAttachmentSchema.array().parse(value ?? []);
318
318
  }
319
319
  //#endregion
320
+ //#region src/api/schema/child-agent-totals.ts
321
+ /**
322
+ * The part of a Conversation total that its child agents spent, at any depth.
323
+ * Present only when the Conversation has child agents. The Conversation's own
324
+ * part is the total minus this part.
325
+ */
326
+ const conversationChildAgentTotalsSchema = z.object({
327
+ auxiliaryCostUsd: z.number().finite().nonnegative().optional(),
328
+ count: z.number().int().positive(),
329
+ cumulativeDurationMs: z.number(),
330
+ cumulativeUsage: usageSchema.optional()
331
+ }).strict();
332
+ //#endregion
320
333
  //#region src/api/schema/conversation.ts
321
334
  const conversationReportStatusSchema = z.enum([
322
335
  "active",
@@ -456,6 +469,7 @@ const conversationSummaryReportSchema = z.object({
456
469
  cumulativeDurationMs: z.number(),
457
470
  cumulativeUsage: conversationUsageSchema.optional(),
458
471
  auxiliaryCosts: conversationAuxiliaryCostsSchema.optional(),
472
+ childAgentTotals: conversationChildAgentTotalsSchema.optional(),
459
473
  conversationId: z.string(),
460
474
  isParticipant: z.boolean(),
461
475
  visibility: z.enum(["private", "public"]).optional(),
@@ -938,4 +952,4 @@ const conversationStatsReportSchema = z.object({
938
952
  windowStart: z.string()
939
953
  }).strict();
940
954
  //#endregion
941
- export { forkConversationBodySchema as A, briefOutcomeStatusSchema as B, conversationReportEventSchema as C, conversationUsageSchema as D, conversationSummaryReportSchema as E, INPUT_IMAGE_TYPES as F, messageCardText as G, parseBriefInput as H, detectImageMediaType as I, resolveMessageCards as J, readMessageCardRefs as K, isVisionImageMediaType as L, MAX_INPUT_IMAGES as M, MAX_INPUT_IMAGE_BYTES as N, createConversationBodySchema as O, readMessageAttachments as P, briefCodeChangeSchema as R, conversationReportEventDataSchema as S, conversationStatsReportSchema as T, annotationCard as U, conversationBriefSchema as V, messageCardRef as W, conversationParamsSchema as _, cancelConversationPendingMessagesBodySchema as a, conversationPendingMessageSchema as b, conversationAttachmentParamsSchema as c, conversationDetailReportSchema as d, conversationEventHistorySchema as f, conversationFeedSchema as g, conversationFeedQuerySchema as h, archiveConversationResponseSchema as i, forkConversationResponseSchema as j, createConversationMessageBodySchema as k, conversationAuxiliaryCostsSchema as l, conversationEventsQuerySchema as m, actorIdentitySchema as n, cancelConversationPendingMessagesResponseSchema as o, conversationEventPageSchema as p, removedCardSchema as q, archiveConversationBodySchema as r, conversationActivityPreviewSchema as s, acceptedConversationMessageSchema as t, conversationDetailQuerySchema as u, conversationPendingAuthorizationSchema as v, conversationStatsItemSchema as w, conversationPendingMessagesReportSchema as x, conversationPendingMessageDeliverySchema as y, briefLinkSchema as z };
955
+ export { forkConversationBodySchema as A, briefLinkSchema as B, conversationReportEventSchema as C, conversationUsageSchema as D, conversationSummaryReportSchema as E, readMessageAttachments as F, messageCardRef as G, conversationBriefSchema as H, INPUT_IMAGE_TYPES as I, removedCardSchema as J, messageCardText as K, detectImageMediaType as L, conversationChildAgentTotalsSchema as M, MAX_INPUT_IMAGES as N, createConversationBodySchema as O, MAX_INPUT_IMAGE_BYTES as P, isVisionImageMediaType as R, conversationReportEventDataSchema as S, conversationStatsReportSchema as T, parseBriefInput as U, briefOutcomeStatusSchema as V, annotationCard as W, resolveMessageCards as Y, conversationParamsSchema as _, cancelConversationPendingMessagesBodySchema as a, conversationPendingMessageSchema as b, conversationAttachmentParamsSchema as c, conversationDetailReportSchema as d, conversationEventHistorySchema as f, conversationFeedSchema as g, conversationFeedQuerySchema as h, archiveConversationResponseSchema as i, forkConversationResponseSchema as j, createConversationMessageBodySchema as k, conversationAuxiliaryCostsSchema as l, conversationEventsQuerySchema as m, actorIdentitySchema as n, cancelConversationPendingMessagesResponseSchema as o, conversationEventPageSchema as p, readMessageCardRefs as q, archiveConversationBodySchema as r, conversationActivityPreviewSchema as s, acceptedConversationMessageSchema as t, conversationDetailQuerySchema as u, conversationPendingAuthorizationSchema as v, conversationStatsItemSchema as w, conversationPendingMessagesReportSchema as x, conversationPendingMessageDeliverySchema as y, briefCodeChangeSchema as z };
@@ -1,4 +1,4 @@
1
- import { p as logWarn } from "./logging-CZEc8_v4.js";
1
+ import { p as logWarn } from "./logging-OpC2jwiV.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  //#region src/chat/conversation-privacy.ts
4
4
  const SAFE_METADATA_KEY_LIMIT = 20;
@@ -1,19 +1,19 @@
1
- import { Ft as createUserTokenStore, Mt as parseOAuthStatePayload, Nt as resolveBaseUrl, _ as resolvePluginOAuthAccount, d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, jt as formatProviderLabel, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, x as lookupSlackUserProfile, yt as getMcpProviderErrorAttributes } from "./agent-runner-DsAFAKKs.js";
2
- import { f as escapeXml } from "./client-BVnfNd3D.js";
3
- import { d as logException, h as runBestEffort, p as logWarn } from "./logging-CZEc8_v4.js";
4
- import { a as getRuntimeMetadata, n as botConfig } from "./config-CgWvImQL.js";
1
+ import { Ft as createUserTokenStore, Mt as parseOAuthStatePayload, Nt as resolveBaseUrl, _ as resolvePluginOAuthAccount, d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, jt as formatProviderLabel, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, x as lookupSlackUserProfile, yt as getMcpProviderErrorAttributes } from "./agent-runner-CnlFtbzb.js";
2
+ import { f as escapeXml } from "./client-CWQtbizj.js";
3
+ import { d as logException, h as runBestEffort, p as logWarn } from "./logging-OpC2jwiV.js";
4
+ import { a as getRuntimeMetadata, n as botConfig } from "./config-aitDvTQm.js";
5
5
  import { f as parseSlackUserId } from "./actor-BTtLaeWy.js";
6
- import { A as upsertIdentity, f as getSqlExecutor, j as upsertLinkedIdentity } from "./viewer-BlAozHer.js";
6
+ import { A as upsertIdentity, f as getSqlExecutor, j as upsertLinkedIdentity } from "./viewer-CX41TWYr.js";
7
7
  import { i as homeDir } from "./package-discovery-BVvSnQBB.js";
8
- import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-CtaDOOM5.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DS1k7fUG.js";
10
- import { t as discoverSkills } from "./skills-DQy-mmBC.js";
11
- import { Nt as recordAuthenticationLinked, Pt as recordAuthorizationCompleted, Q as getTurnRecord, V as postSlackMessage } from "./tasks-DMmRrIVl.js";
12
- import { zt as getSlackClient } from "./agent-hooks-C72ByH0C.js";
13
- import { E as acquireActiveLock, w as getStateAdapter } from "./profile-aVLDAirh.js";
14
- import { i as getConversationPendingAuth } from "./pending-auth-Oo5AQhaf.js";
15
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-ehZYGpX9.js";
16
- import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-DwyTlkAg.js";
8
+ import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-fpIZHoqE.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-CTBsdSam.js";
10
+ import { t as discoverSkills } from "./skills-BgGiQt5Y.js";
11
+ import { It as recordAuthenticationLinked, Lt as recordAuthorizationCompleted, Q as getTurnRecord, V as postSlackMessage } from "./tasks-DREdnhVP.js";
12
+ import { Vt as getSlackClient } from "./agent-hooks-DWCHBPYw.js";
13
+ import { E as acquireActiveLock, w as getStateAdapter } from "./profile-Dfg76pvk.js";
14
+ import { i as getConversationPendingAuth } from "./pending-auth-D_nf121N.js";
15
+ import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BoNCtSwk.js";
16
+ import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-rDLlKIS0.js";
17
17
  import { n as relayLocalOAuthCallback } from "./oauth-relay-CdCnu80W.js";
18
18
  import path from "node:path";
19
19
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
- import { d as logException } from "./logging-CZEc8_v4.js";
1
+ import { d as logException } from "./logging-OpC2jwiV.js";
2
2
  import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
3
- import "./config-CgWvImQL.js";
3
+ import "./config-aitDvTQm.js";
4
4
  import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { sql } from "drizzle-orm";
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-DsAFAKKs.js";
3
- import { f as getSqlExecutor } from "./viewer-BlAozHer.js";
4
- import { I as detectImageMediaType } from "./conversation-CYsbVFLx.js";
2
+ import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-CnlFtbzb.js";
3
+ import { f as getSqlExecutor } from "./viewer-CX41TWYr.js";
4
+ import { L as detectImageMediaType } from "./conversation-Cjo9tHGm.js";
5
5
  //#region src/chat/attachments/images.ts
6
6
  var images_exports = /* @__PURE__ */ __exportAll({
7
7
  decodeInputImages: () => decodeInputImages,
@@ -1,6 +1,6 @@
1
- import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-CZEc8_v4.js";
1
+ import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-OpC2jwiV.js";
2
2
  import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-CgWZM_kV.js";
3
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-D3TdVM9H.js";
3
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-BsqXHVBz.js";
4
4
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-BLvBjy_e.js";
5
5
  //#region src/chat/sentry-payload-filter.ts
6
6
  const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
@@ -1,4 +1,4 @@
1
- import { i as getChatConfig } from "./config-CgWvImQL.js";
1
+ import { i as getChatConfig } from "./config-aitDvTQm.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  import { z } from "zod";
4
4
  import { createHash, createHmac, timingSafeEqual } from "node:crypto";
@@ -1,5 +1,5 @@
1
1
  import { d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException, y as withScope } from "./sentry-CgWZM_kV.js";
2
- import { t as JUNIOR_VERSION } from "./version-BrZSE5du.js";
2
+ import { t as JUNIOR_VERSION } from "./version-ByV7nGOn.js";
3
3
  import path from "node:path";
4
4
  import { styleText } from "node:util";
5
5
  import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { Bt as toolInvocationDestination, Q as getActiveAgentInvocationForConversation, Y as createAgentInvocationForMessage, Z as findChildAgentConversationId, _t as AgentMessageTargetError, vt as PARENT_AGENT_TARGET, zt as actorFromRun } from "./agent-runner-DsAFAKKs.js";
3
- import { n as enqueueAgentMessageToParent } from "./result-DNgmkASh.js";
4
- import { r as enqueueAgentInvocation } from "./work-CRBXkJoU.js";
2
+ import { Bt as toolInvocationDestination, Q as getActiveAgentInvocationForConversation, Y as createAgentInvocationForMessage, Z as findChildAgentConversationId, _t as AgentMessageTargetError, vt as PARENT_AGENT_TARGET, zt as actorFromRun } from "./agent-runner-CnlFtbzb.js";
3
+ import { n as enqueueAgentMessageToParent } from "./result-C1ZCRPLx.js";
4
+ import { r as enqueueAgentInvocation } from "./work-CvFoEpRT.js";
5
5
  //#region src/chat/agent-invocations/message.ts
6
6
  var message_exports = /* @__PURE__ */ __exportAll({ bindMessageAgent: () => bindMessageAgent });
7
7
  /**
package/dist/nitro.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { r as JuniorDashboardOptions } from "./app-4t4mPTdS.js";
1
+ import { r as JuniorDashboardOptions } from "./app-B0gT1Slp.js";
2
2
  import { n as JuniorPluginSet } from "./plugins-CjfUP5gJ.js";
3
3
  //#region src/nitro.d.ts
4
4
  export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
package/dist/nitro.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-CZEc8_v4.js";
1
+ import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-OpC2jwiV.js";
2
2
  import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-BVvSnQBB.js";
3
- import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-BEUqRhjC.js";
3
+ import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-DyA2AEnY.js";
4
4
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
5
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-BT2h_t8I.js";
5
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-SWsXPSp-.js";
6
6
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-CVvEUSMH.js";
7
7
  import path from "node:path";
8
8
  import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
@@ -1,5 +1,5 @@
1
- import { Ft as createUserTokenStore } from "./agent-runner-DsAFAKKs.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DLw3jkv-.js";
1
+ import { Ft as createUserTokenStore } from "./agent-runner-CnlFtbzb.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DqZF735a.js";
3
3
  import { createServer } from "node:http";
4
4
  //#region src/chat/local/oauth-callback-server.ts
5
5
  const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
@@ -1,5 +1,5 @@
1
- import { v as isProviderRetryError } from "./client-BVnfNd3D.js";
2
- import { Y as abandonTurnRecord, sn as estimateTextTokens } from "./tasks-DMmRrIVl.js";
1
+ import { v as isProviderRetryError } from "./client-CWQtbizj.js";
2
+ import { Y as abandonTurnRecord, un as estimateTextTokens } from "./tasks-DREdnhVP.js";
3
3
  import { r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
4
4
  import { z } from "zod";
5
5
  //#region src/chat/state/turn-id.ts
@@ -1,7 +1,7 @@
1
- import { S as toOptionalTrimmed } from "./client-BVnfNd3D.js";
2
- import { v as setSpanAttributes, y as setSpanStatus } from "./logging-CZEc8_v4.js";
3
- import { i as getChatConfig } from "./config-CgWvImQL.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DS1k7fUG.js";
1
+ import { S as toOptionalTrimmed } from "./client-CWQtbizj.js";
2
+ import { v as setSpanAttributes, y as setSpanStatus } from "./logging-OpC2jwiV.js";
3
+ import { i as getChatConfig } from "./config-aitDvTQm.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-CTBsdSam.js";
5
5
  import { createHash } from "node:crypto";
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
7
7
  import { createRedisState } from "@chat-adapter/state-redis";
@@ -1,4 +1,4 @@
1
- import { B as briefOutcomeStatusSchema, H as parseBriefInput, V as conversationBriefSchema } from "./conversation-CYsbVFLx.js";
1
+ import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-Cjo9tHGm.js";
2
2
  import { z } from "zod";
3
3
  //#region src/chat/briefs/generate.ts
4
4
  const MAX_INPUT_CHARS = 6e4;
@@ -1,4 +1,4 @@
1
- import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-CZEc8_v4.js";
1
+ import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-OpC2jwiV.js";
2
2
  import { o as parseActorUserId } from "./actor-BTtLaeWy.js";
3
3
  import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-BVvSnQBB.js";
4
4
  import path from "node:path";
@@ -1,5 +1,5 @@
1
- import { v as setSpanAttributes, w as withSpan } from "./logging-CZEc8_v4.js";
2
- import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-aVLDAirh.js";
1
+ import { v as setSpanAttributes, w as withSpan } from "./logging-OpC2jwiV.js";
2
+ import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-Dfg76pvk.js";
3
3
  import { z } from "zod";
4
4
  import { FileSystem, Sandbox } from "@vercel/sandbox";
5
5
  //#region src/chat/sandbox/resources.ts
@@ -1,12 +1,12 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-DsAFAKKs.js";
2
+ import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-CnlFtbzb.js";
3
3
  import { t as createActor } from "./actor-BTtLaeWy.js";
4
- import { d as credentialContextForActor } from "./registry-CtaDOOM5.js";
5
- import { $ as listTurnSummaries, Q as getTurnRecord } from "./tasks-DMmRrIVl.js";
6
- import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-CAhBfBUT.js";
7
- import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-ZG1UCxjF.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-DjLA8GKs.js";
9
- import { r as enqueueAgentInvocation } from "./work-CRBXkJoU.js";
4
+ import { d as credentialContextForActor } from "./registry-fpIZHoqE.js";
5
+ import { $ as listTurnSummaries, Q as getTurnRecord } from "./tasks-DREdnhVP.js";
6
+ import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-dyvsZDB0.js";
7
+ import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-C7bRJ2vg.js";
8
+ import { r as appendAndEnqueueInboundMessage } from "./store-OMQAFrJG.js";
9
+ import { r as enqueueAgentInvocation } from "./work-CvFoEpRT.js";
10
10
  import { z } from "zod";
11
11
  import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
12
12
  //#region src/chat/task-execution/mailbox-input.ts
@@ -1,14 +1,14 @@
1
- import { C as withLogContext, b as setTags, d as logException } from "./logging-CZEc8_v4.js";
2
- import { c as getConversationEventStore, u as getConversationStore } from "./viewer-BlAozHer.js";
3
- import { d as credentialContextForActor } from "./registry-CtaDOOM5.js";
4
- import { Dt as loadProjection, Ht as hydrateConversationMessages, J as saveTurnCheckpoint, Pt as recordAuthorizationCompleted, St as commitAcceptedReply, Ut as persistConversationMessages, Zt as buildConversationContext, in as recordDeliveredAssistantMessage, nn as markConversationMessage, on as upsertConversationMessage, rn as normalizeConversationText, tt as persistWithRetry } from "./tasks-DMmRrIVl.js";
5
- import { G as messageCardText } from "./conversation-CYsbVFLx.js";
1
+ import { C as withLogContext, b as setTags, d as logException } from "./logging-OpC2jwiV.js";
2
+ import { c as getConversationEventStore, u as getConversationStore } from "./viewer-CX41TWYr.js";
3
+ import { d as credentialContextForActor } from "./registry-fpIZHoqE.js";
4
+ import { At as loadProjection, Gt as hydrateConversationMessages, J as saveTurnCheckpoint, Kt as persistConversationMessages, Lt as recordAuthorizationCompleted, Tt as commitAcceptedReply, an as markConversationMessage, en as buildConversationContext, ln as upsertConversationMessage, on as normalizeConversationText, sn as recordDeliveredAssistantMessage, tt as persistWithRetry } from "./tasks-DREdnhVP.js";
5
+ import { K as messageCardText } from "./conversation-Cjo9tHGm.js";
6
6
  import { f as markTurnFailed, p as startActiveTurn, t as authorizationId } from "./oauth-authorization-BA4Dt6a7.js";
7
- import { n as getAssistantReplyText } from "./assistant-reply-ChOzcTBS.js";
8
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-CiPepjIB.js";
9
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-Buswqs90.js";
10
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-ehZYGpX9.js";
11
- import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-D7J10z7l.js";
7
+ import { n as getAssistantReplyText } from "./assistant-reply-BxCi7V4v.js";
8
+ import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BOxv7shv.js";
9
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-cQFsZFOU.js";
10
+ import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BoNCtSwk.js";
11
+ import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-C6jrCPjc.js";
12
12
  import { randomUUID } from "node:crypto";
13
13
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
14
14
  //#region src/chat/local/runner.ts