@sentry/junior 0.266.0 → 0.268.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 (87) hide show
  1. package/dist/{actor-tlxzqaRe.js → actor-CP9K2Idu.js} +9 -1
  2. package/dist/{adapter-eRFA_naf.js → adapter-04AcD2SO.js} +5 -7
  3. package/dist/{admin-tILpP51p.js → admin-DIU1QyG3.js} +1 -1
  4. package/dist/{agent-invocations-CxKldAeB.js → agent-invocations-C1RNOCs8.js} +2 -0
  5. package/dist/{agent-runner-BtYK7bht.js → agent-runner-CAYfFmU7.js} +2636 -601
  6. package/dist/api/schema.d.ts +2 -5454
  7. package/dist/api/schema.js +6 -5
  8. package/dist/api.d.ts +6 -1
  9. package/dist/api.js +255 -1208
  10. package/dist/{app-Csbi9dW7.d.ts → app-z6Uuyq3j.d.ts} +23 -4
  11. package/dist/app.d.ts +2 -2
  12. package/dist/app.js +1869 -378
  13. package/dist/{automation-BKpY9LPa.js → automation-CmeFBSEh.js} +42 -14
  14. package/dist/{briefs-DgfWMU7e.js → briefs-DQbV2jNr.js} +4 -4
  15. package/dist/{catalog-runtime-DAJjAbSx.js → catalog-runtime-BD9GSpc6.js} +1 -1
  16. package/dist/cli/chat.js +15 -15
  17. package/dist/cli/check.js +3 -3
  18. package/dist/cli/init.js +0 -1
  19. package/dist/cli/main.js +3 -3
  20. package/dist/cli/plugins.js +4 -4
  21. package/dist/cli/snapshot-create.js +4 -4
  22. package/dist/cli/upgrade.d.ts +1 -1
  23. package/dist/cli/upgrade.js +3 -3
  24. package/dist/{client-B0YZfxNy.js → client-C1yDYjoS.js} +2 -2
  25. package/dist/{config-C0UwYqDK.js → config-DrTeF80T.js} +32 -10
  26. package/dist/{connections-Bwu3VORi.js → connections-D46f8vvi.js} +12 -12
  27. package/dist/{conversation-DF4rUcjb.js → conversation-DSo310Ps.js} +8 -1
  28. package/dist/{conversation-privacy-CY7JVjxn.js → conversation-privacy-CxlOCiUo.js} +1 -1
  29. package/dist/{credential-sync-VGAMUTGp.js → credential-sync-sm9fegLY.js} +29 -34
  30. package/dist/{credentialed-enF5Bf3y.js → credentialed-lukuD-cc.js} +2933 -1026
  31. package/dist/db-BU4LQD8s.d.ts +6 -0
  32. package/dist/{executor-TnWbvL09.js → executor-4vhvsMZJ.js} +83 -6
  33. package/dist/instrumentation.js +6 -2
  34. package/dist/{assistant-reply-UyzAfZQo.js → interruption-marker-CkncDT8d.js} +8 -2
  35. package/dist/{job-queue-DBpHmKnd.js → job-queue-In9QKz-I.js} +128 -3
  36. package/dist/{web-input-B-bMjD1V.js → list-BkgnXEEB.js} +1611 -817
  37. package/dist/{logging-Ce0mXZ8J.js → logging-DLSpkSSr.js} +11 -3
  38. package/dist/{message-VZ3DFpGb.js → message-BObyg59s.js} +4 -4
  39. package/dist/nitro.d.ts +1 -1
  40. package/dist/nitro.js +3 -3
  41. package/dist/{oauth-callback-server-CpqWLjVY.js → oauth-callback-server-B-WbSdoH.js} +2 -2
  42. package/dist/{prompt-BcCGlmg2.js → prompt-BW9jFsqZ.js} +1 -1
  43. package/dist/{registry-1BEIPdbT.js → registry-BgecKva0.js} +2 -2
  44. package/dist/{web-message-id-CJSUiksE.js → reporting-window-DVCD_10C.js} +1 -10
  45. package/dist/{resolve-BSHHkEGE.js → resolve-Cpa4Bu1O.js} +3 -3
  46. package/dist/{result-CwOpzqdh.js → result-D3TSmZZ8.js} +9 -9
  47. package/dist/{runner-CEaX04kz.js → runner-DS5OKhEp.js} +11 -11
  48. package/dist/{sandbox-egress-signals-BwtGHwqa.js → sandbox-egress-signals-CnDjY5rx.js} +1 -1
  49. package/dist/{schema-RsaBHxRH.js → schema-0050HFnB.js} +82 -5
  50. package/dist/schema-ZngqcOWM.d.ts +5813 -0
  51. package/dist/{service-account-6wC76eBZ.js → service-account-CKV2WTY7.js} +3 -3
  52. package/dist/{service-account-Dg4lIbHm.js → service-account-DGjnDw9y.js} +3 -3
  53. package/dist/{session-stop-tZOw9AJD.js → session-stop-Dam1EI7B.js} +527 -134
  54. package/dist/{skills-DzyGN7wd.js → skills-CfAnfImD.js} +2 -2
  55. package/dist/{spawn-6rokq7l_.js → spawn-cmq9p4Ly.js} +2 -2
  56. package/dist/{store-DcKkzrdt.js → store-C5PN02QO.js} +4 -4
  57. package/dist/{store-CG0VJyye.d.ts → store-xMuuXRE0.d.ts} +23 -9
  58. package/dist/store-zPEoJPBB.js +295 -0
  59. package/dist/{task-queue-Bg4RS2Gy.js → task-queue-_mf28dSu.js} +10 -5
  60. package/dist/{task-runner-8N5LIkSg.js → task-runner-DMI2prDO.js} +25 -14
  61. package/dist/{tasks-DDT-J3Rf.js → tasks-SB9z-VTU.js} +1551 -54
  62. package/dist/{thread-state-cprEaxgl.js → thread-state-BbbPh0Sn.js} +8 -18
  63. package/dist/{turn-failure-response-C8sMdsdX.js → turn-failure-response-BKKmnMB5.js} +11 -16
  64. package/dist/{turn-lifecycle-DaBVoz7h.js → turn-lifecycle-oP0kVeGz.js} +1 -1
  65. package/dist/{validation-C2lllinq.js → validation--JsAGLwc.js} +1 -1
  66. package/dist/{version-oaLfxxnf.js → version-jHwJp4hC.js} +1 -1
  67. package/dist/version.js +1 -1
  68. package/dist/{viewer-BpE6Z3qf.js → viewer-CpXTGlep.js} +329 -230
  69. package/dist/web-message-id-DlHNANtd.js +132 -0
  70. package/dist/{work-VX1SHWha.js → work-3N-GHY9m.js} +10 -10
  71. package/dist/{worker-hook-y_Y.js → worker-CCdbcItd.js} +30 -19
  72. package/migrations/0064_any_resource_event_triggers.sql +2 -0
  73. package/migrations/0065_user_customization.sql +1 -0
  74. package/migrations/0066_review_items.sql +53 -0
  75. package/migrations/0067_review_item_dedupe_tenant.sql +2 -0
  76. package/migrations/0068_review_item_slack_cards.sql +10 -0
  77. package/migrations/meta/0064_snapshot.json +3505 -0
  78. package/migrations/meta/0065_snapshot.json +3511 -0
  79. package/migrations/meta/0066_snapshot.json +4099 -0
  80. package/migrations/meta/0067_snapshot.json +3921 -0
  81. package/migrations/meta/0068_snapshot.json +4176 -0
  82. package/migrations/meta/_journal.json +36 -1
  83. package/package.json +19 -4
  84. package/dist/db-BnRqQ7G5.d.ts +0 -5
  85. package/dist/images-BKQqSi5W.js +0 -64
  86. package/dist/store-FALy-JQb.js +0 -1424
  87. package/dist/turn-session-routing-a9CHX-w6.js +0 -76
@@ -1,5 +1,5 @@
1
1
  import { _ as withScope, 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 } from "./sentry-MDkYAVPV.js";
2
- import { t as JUNIOR_VERSION } from "./version-oaLfxxnf.js";
2
+ import { t as JUNIOR_VERSION } from "./version-jHwJp4hC.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";
@@ -568,7 +568,7 @@ function formatConsoleValue(value) {
568
568
  return quoteConsoleValue(value);
569
569
  }
570
570
  function shouldShowConsoleDestinationName(eventName) {
571
- return /^(app_home|oauth|queue|slash_command|slack|webhook)\./.test(eventName);
571
+ return /^(app_home|oauth|queue|slack|webhook)\./.test(eventName);
572
572
  }
573
573
  function shouldShowConsoleModel(level, eventName) {
574
574
  if (level === "warn" || level === "error") return true;
@@ -1050,6 +1050,14 @@ function getTracePropagationHeaders() {
1050
1050
  }
1051
1051
  return headers;
1052
1052
  }
1053
+ /** Return the active trace as a durable trace context, if there is one. */
1054
+ function getActiveTraceContext() {
1055
+ const { "sentry-trace": sentryTrace, baggage } = getTracePropagationHeaders();
1056
+ return sentryTrace ? {
1057
+ baggage,
1058
+ sentryTrace
1059
+ } : void 0;
1060
+ }
1053
1061
  /** Set attributes on the currently active Sentry span. */
1054
1062
  function setSpanAttributes(attributes) {
1055
1063
  const span = getActiveSpan();
@@ -1224,4 +1232,4 @@ function extractGenAiUsageAttributes(...sources) {
1224
1232
  ...cost?.total !== void 0 ? { "app.cost.total_usd": cost.total } : void 0
1225
1233
  };
1226
1234
  }
1227
- export { JUNIOR_RETENTION_CRON_SCHEDULE as A, toOptionalNumber as B, withContext as C, JUNIOR_HEARTBEAT_CRON_SCHEDULE as D, JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE as E, getDeploymentTelemetryAttributes as F, GOOGLE_IDENTITY_PROVIDER as I, isNativeIdentityProvider as L, JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE as M, LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION as N, JUNIOR_HEARTBEAT_ROUTE as O, getDeploymentServiceVersion as P, normalizeIdentityEmail as R, summarizeMessageText as S, withSpan as T, toOptionalString as V, serializeGenAiAttribute as _, extractGenAiUsageSummary as a, setSpanStatus as b, getLogContextAttributesForSpan as c, logError as d, logException as f, runBestEffort as g, normalizeGenAiFinishReason as h, extractGenAiUsageAttributes as i, JUNIOR_RETENTION_ROUTE as j, JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as k, getTracePropagationHeaders as l, logWarn as m, createChatSdkLogger as n, getActiveTraceId as o, logInfo as p, createRequestContext as r, getLogContextAttributes as s, buildTurnFailureResponse as t, logAudit as u, setSentryUser as v, withLogContext as w, setTags as x, setSpanAttributes as y, isRecord as z };
1235
+ export { JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as A, isRecord as B, summarizeMessageText as C, JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE as D, withSpan as E, getDeploymentServiceVersion as F, toOptionalString as H, getDeploymentTelemetryAttributes as I, GOOGLE_IDENTITY_PROVIDER as L, JUNIOR_RETENTION_ROUTE as M, JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE as N, JUNIOR_HEARTBEAT_CRON_SCHEDULE as O, LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION as P, isNativeIdentityProvider as R, setTags as S, withLogContext as T, toOptionalNumber as V, runBestEffort as _, extractGenAiUsageSummary as a, setSpanAttributes as b, getLogContextAttributes as c, logAudit as d, logError as f, normalizeGenAiFinishReason as g, logWarn as h, extractGenAiUsageAttributes as i, JUNIOR_RETENTION_CRON_SCHEDULE as j, JUNIOR_HEARTBEAT_ROUTE as k, getLogContextAttributesForSpan as l, logInfo as m, createChatSdkLogger as n, getActiveTraceContext as o, logException as p, createRequestContext as r, getActiveTraceId as s, buildTurnFailureResponse as t, getTracePropagationHeaders as u, serializeGenAiAttribute as v, withContext as w, setSpanStatus as x, setSentryUser as y, normalizeIdentityEmail as z };
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { $ as actorFromRun, et as toolInvocationDestination } from "./agent-runner-BtYK7bht.js";
3
- import { P as PARENT_AGENT_TARGET, i as createAgentInvocationForMessage, j as AgentMessageTargetError, o as findChildAgentConversationId, s as getActiveAgentInvocationForConversation } from "./store-DcKkzrdt.js";
4
- import { n as enqueueAgentMessageToParent } from "./result-CwOpzqdh.js";
5
- import { r as enqueueAgentInvocation } from "./work-VX1SHWha.js";
2
+ import { Bt as actorFromRun, Vt as toolInvocationDestination } from "./agent-runner-CAYfFmU7.js";
3
+ import { P as PARENT_AGENT_TARGET, i as createAgentInvocationForMessage, j as AgentMessageTargetError, o as findChildAgentConversationId, s as getActiveAgentInvocationForConversation } from "./store-C5PN02QO.js";
4
+ import { n as enqueueAgentMessageToParent } from "./result-D3TSmZZ8.js";
5
+ import { r as enqueueAgentInvocation } from "./work-3N-GHY9m.js";
6
6
  // src/chat/agent-invocations/message.ts
7
7
  var message_exports = /* @__PURE__ */ __exportAll({ bindMessageAgent: () => bindMessageAgent });
8
8
  /**
package/dist/nitro.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { r as JuniorDashboardOptions } from "./app-Csbi9dW7.js";
1
+ import { i as JuniorDashboardOptions } from "./app-z6Uuyq3j.js";
2
2
  import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
3
3
  import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
4
4
  type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
package/dist/nitro.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as JUNIOR_RETENTION_CRON_SCHEDULE, D as JUNIOR_HEARTBEAT_CRON_SCHEDULE, E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_ROUTE, P as getDeploymentServiceVersion, j as JUNIOR_RETENTION_ROUTE, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE } from "./logging-Ce0mXZ8J.js";
1
+ import { A as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, D as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, F as getDeploymentServiceVersion, M as JUNIOR_RETENTION_ROUTE, N as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_CRON_SCHEDULE, j as JUNIOR_RETENTION_CRON_SCHEDULE, k as JUNIOR_HEARTBEAT_ROUTE } from "./logging-DLSpkSSr.js";
2
2
  import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJBompdd.js";
3
- import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-DBpHmKnd.js";
3
+ import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-In9QKz-I.js";
4
4
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-DOm9Y6qI.js";
5
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-Bg4RS2Gy.js";
5
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-_mf28dSu.js";
6
6
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.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 { n as createUserTokenStore } from "./credentialed-enF5Bf3y.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-VGAMUTGp.js";
1
+ import { n as createUserTokenStore } from "./credentialed-lukuD-cc.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-sm9fegLY.js";
3
3
  import { createServer } from "node:http";
4
4
  // src/chat/local/oauth-callback-server.ts
5
5
  const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
@@ -1,4 +1,4 @@
1
- import { J as parseBriefInput, K as briefOutcomeStatusSchema, q as conversationBriefSchema } from "./conversation-DF4rUcjb.js";
1
+ import { Q as parseBriefInput, X as briefOutcomeStatusSchema, Z as conversationBriefSchema } from "./conversation-DSo310Ps.js";
2
2
  import { z } from "zod";
3
3
  // src/chat/briefs/generate.ts
4
4
  const MAX_INPUT_CHARS = 6e4;
@@ -1,5 +1,5 @@
1
- import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-Ce0mXZ8J.js";
2
- import { a as isUserActor, o as parseActorUserId } from "./actor-tlxzqaRe.js";
1
+ import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-DLSpkSSr.js";
2
+ import { o as isUserActor, s as parseActorUserId } from "./actor-CP9K2Idu.js";
3
3
  import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJBompdd.js";
4
4
  import path from "node:path";
5
5
  import { z } from "zod";
@@ -224,13 +224,4 @@ function sumUtcHoursIntoSixHours(args) {
224
224
  rows: bySix
225
225
  });
226
226
  }
227
- // src/chat/conversations/web-message-id.ts
228
- /**
229
- * Build the retry-stable Message id shared by web ingress and browser sends.
230
- * Keep the existing hash and prefix so retries still address stored Messages.
231
- */
232
- async function webMessageId(args) {
233
- const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(`${args.conversationId}\u0000${args.idempotencyKey}`));
234
- return `api-msg:${Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("").slice(0, 24)}`;
235
- }
236
- export { skillReportsSchema as C, skillReportSchema as S, pluginPackageContentItemReportSchema as _, fillUtcHours as a, pluginsSchema as b, sumUtcHoursIntoSixHours as c, trailingUtcSixHourWindow as d, utcDayKey as f, pluginOperationalReportSchema as g, pluginOperationalReportFeedSchema as h, fillUtcDays as i, trailingUtcDayWindow as l, healthReportSchema as m, DAY_MS as n, fillUtcSixHours as o, utcHourKey as p, HOUR_MS as r, startOfUtcHour as s, webMessageId as t, trailingUtcHourWindow as u, pluginPackageContentReportSchema as v, runtimeInfoReportSchema as x, pluginSchema as y };
227
+ export { skillReportsSchema as S, pluginPackageContentReportSchema as _, fillUtcSixHours as a, runtimeInfoReportSchema as b, trailingUtcDayWindow as c, utcDayKey as d, utcHourKey as f, pluginPackageContentItemReportSchema as g, pluginOperationalReportSchema as h, fillUtcHours as i, trailingUtcHourWindow as l, pluginOperationalReportFeedSchema as m, HOUR_MS as n, startOfUtcHour as o, healthReportSchema as p, fillUtcDays as r, sumUtcHoursIntoSixHours as s, DAY_MS as t, trailingUtcSixHourWindow as u, pluginSchema as v, skillReportSchema as x, pluginsSchema as y };
@@ -1,6 +1,6 @@
1
- import { T as withSpan, y as setSpanAttributes } from "./logging-Ce0mXZ8J.js";
2
- import { Cn as SANDBOX_WORKSPACE_ROOT, I as getSandboxProvider, M as create, P as isStale, on as sleep, vn as runNonInteractiveCommand, yn as SANDBOX_COMMAND_PATH } from "./credentialed-enF5Bf3y.js";
3
- import { r as getStateAdapter } from "./adapter-eRFA_naf.js";
1
+ import { E as withSpan, b as setSpanAttributes } from "./logging-DLSpkSSr.js";
2
+ import { Cn as runNonInteractiveCommand, F as getSandboxProvider, N as isStale, j as create, kn as SANDBOX_WORKSPACE_ROOT, un as sleep, wn as SANDBOX_COMMAND_PATH } from "./credentialed-lukuD-cc.js";
3
+ import { i as getStateAdapter } from "./adapter-04AcD2SO.js";
4
4
  import { z } from "zod";
5
5
  // src/chat/sandbox/resources.ts
6
6
  let configuredResources;
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { Nt as getTurnRecord, Pt as listTurnSummaries } from "./tasks-DDT-J3Rf.js";
3
- import { t as createActor } from "./actor-tlxzqaRe.js";
4
- import { f as credentialContextForActor } from "./registry-1BEIPdbT.js";
5
- import { G as listUnreportedSiblingAgents } from "./agent-runner-BtYK7bht.js";
6
- import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-BcCGlmg2.js";
7
- import { C as markAgentInvocationParentMailboxAppended, _ as getLatestAgentInvocationForConversation, a as createAgentInvocationFromLatest, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, y as isTerminalAgentInvocation } from "./store-DcKkzrdt.js";
8
- import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-tZOw9AJD.js";
9
- import { r as appendAndEnqueueInboundMessage } from "./store-FALy-JQb.js";
10
- import { r as enqueueAgentInvocation } from "./work-VX1SHWha.js";
2
+ import { Xt as listTurnSummaries, Yt as getTurnRecord } from "./tasks-SB9z-VTU.js";
3
+ import { t as createActor } from "./actor-CP9K2Idu.js";
4
+ import { f as credentialContextForActor } from "./registry-BgecKva0.js";
5
+ import { At as listUnreportedSiblingAgents } from "./agent-runner-CAYfFmU7.js";
6
+ import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-BW9jFsqZ.js";
7
+ import { C as markAgentInvocationParentMailboxAppended, _ as getLatestAgentInvocationForConversation, a as createAgentInvocationFromLatest, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, y as isTerminalAgentInvocation } from "./store-C5PN02QO.js";
8
+ import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-Dam1EI7B.js";
9
+ import { r as appendAndEnqueueInboundMessage } from "./store-zPEoJPBB.js";
10
+ import { r as enqueueAgentInvocation } from "./work-3N-GHY9m.js";
11
11
  import { z } from "zod";
12
12
  import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
13
13
  // src/chat/conversations/web-mailbox.ts
@@ -1,14 +1,14 @@
1
- import { A as commitAcceptedReply, F as loadProjection, H as recordAuthorizationCompleted, Ut as persistWithRetry, X as hydrateConversationMessages, Z as persistConversationMessages, at as buildConversationContext, dt as normalizeConversationText, ft as recordDeliveredAssistantMessage, kt as saveTurnCheckpoint, mt as upsertConversationMessage, ut as markConversationMessage, vt as authorizationId } from "./tasks-DDT-J3Rf.js";
2
- import { f as logException, w as withLogContext, x as setTags } from "./logging-Ce0mXZ8J.js";
3
- import { d as getConversationStore, l as getConversationEventStore } from "./viewer-BpE6Z3qf.js";
4
- import { f as credentialContextForActor } from "./registry-1BEIPdbT.js";
5
- import { P as messageCardText } from "./conversation-DF4rUcjb.js";
6
- import { X as markTurnFailed, Z as startActiveTurn } from "./store-DcKkzrdt.js";
7
- import { n as getAssistantReplyText } from "./assistant-reply-UyzAfZQo.js";
8
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-8N5LIkSg.js";
9
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DaBVoz7h.js";
10
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-cprEaxgl.js";
11
- import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-C8sMdsdX.js";
1
+ import { At as upsertConversationMessage, Dt as normalizeConversationText, Et as markConversationMessage, Gt as saveTurnCheckpoint, In as persistWithRetry, K as commitAcceptedReply, Ot as recordDeliveredAssistantMessage, Pt as authorizationId, Z as loadProjection, ft as hydrateConversationMessages, it as recordAuthorizationCompleted, pt as persistConversationMessages, xt as buildConversationContext } from "./tasks-SB9z-VTU.js";
2
+ import { S as setTags, T as withLogContext, p as logException } from "./logging-DLSpkSSr.js";
3
+ import { d as getConversationEventStore, p as getConversationStore } from "./viewer-CpXTGlep.js";
4
+ import { f as credentialContextForActor } from "./registry-BgecKva0.js";
5
+ import { R as messageCardText } from "./conversation-DSo310Ps.js";
6
+ import { X as markTurnFailed, Z as startActiveTurn } from "./store-C5PN02QO.js";
7
+ import { r as getAssistantReplyText } from "./interruption-marker-CkncDT8d.js";
8
+ import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-DMI2prDO.js";
9
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-oP0kVeGz.js";
10
+ import { a as persistThreadStateById, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BbbPh0Sn.js";
11
+ import { i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent, u as loadPendingMessageCards } from "./turn-failure-response-BKKmnMB5.js";
12
12
  import { randomUUID } from "node:crypto";
13
13
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
14
14
  // src/chat/local/runner.ts
@@ -1,4 +1,4 @@
1
- import { $ as sandboxEgressSignalsResponseSchema } from "./credentialed-enF5Bf3y.js";
1
+ import { xt as sandboxEgressSignalsResponseSchema } from "./credentialed-lukuD-cc.js";
2
2
  // src/chat/local/sandbox-egress-signals.ts
3
3
  const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
4
4
  const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
@@ -1,7 +1,8 @@
1
- import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-CxKldAeB.js";
2
- import { E as conversationUsageSchema, T as conversationSummaryReportSchema, j as conversationChildAgentTotalsSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema } from "./conversation-DF4rUcjb.js";
3
- import "./automation-BKpY9LPa.js";
4
- import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-CJSUiksE.js";
1
+ import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-C1RNOCs8.js";
2
+ import { E as conversationSummaryReportSchema, F as conversationChildAgentTotalsSchema, O as conversationUsageSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema } from "./conversation-DSo310Ps.js";
3
+ import { s as userInputRequestSchema } from "./web-message-id-DlHNANtd.js";
4
+ import "./automation-CmeFBSEh.js";
5
+ import { i as fillUtcHours, r as fillUtcDays, s as sumUtcHoursIntoSixHours } from "./reporting-window-DVCD_10C.js";
5
6
  import { z } from "zod";
6
7
  import { codeChangeStateSchema, eventMatchSchema } from "@sentry/junior-plugin-api";
7
8
  // src/api/schema/common.ts
@@ -467,6 +468,82 @@ const serviceAccountListSchema = z.object({ serviceAccounts: z.array(serviceAcco
467
468
  const serviceAccountParamsSchema = z.object({ provider: z.string().regex(/^[a-z][a-z0-9-]*$/).max(64) }).strict();
468
469
  const startServiceAccountSignInResponseSchema = z.object({ authorizationUrl: z.string().url() }).strict();
469
470
  const disconnectServiceAccountResponseSchema = z.object({ disconnected: z.literal(true) }).strict();
471
+ // src/api/schema/review-item.ts
472
+ const answerSchema = z.object({
473
+ other: z.string().max(4e3).optional(),
474
+ requestId: z.string().min(1),
475
+ values: z.record(z.string(), z.array(z.string().max(4e3)).max(20))
476
+ }).strict();
477
+ const personSchema = z.object({
478
+ displayName: z.string().min(1).optional(),
479
+ email: z.string().min(1),
480
+ userId: z.string().min(1)
481
+ }).strict();
482
+ /** One Review item as the viewer sees it. */
483
+ const reviewItemSchema = z.object({
484
+ addedByConversationId: z.string().min(1),
485
+ answer: answerSchema.optional(),
486
+ assignedToEveryone: z.boolean(),
487
+ assignees: z.array(personSchema),
488
+ automationId: z.string().min(1).optional(),
489
+ body: z.string(),
490
+ /** True when the viewer can take, submit, complete, or dismiss it. */
491
+ canAct: z.boolean(),
492
+ /** True when the viewer can act and is not already the only assignee. */
493
+ canTake: z.boolean(),
494
+ closeReason: z.string().min(1).optional(),
495
+ closedAt: z.string().datetime().optional(),
496
+ /** Unset for an open item, or when an agent closed it. */
497
+ closedBy: personSchema.optional(),
498
+ conversationIds: z.array(z.string().min(1)),
499
+ createdAt: z.string().datetime(),
500
+ id: z.string().min(1),
501
+ kind: z.enum(["notice", "action"]),
502
+ request: userInputRequestSchema.optional(),
503
+ status: z.enum([
504
+ "open",
505
+ "done",
506
+ "dismissed"
507
+ ]),
508
+ subject: z.object({
509
+ id: z.string().min(1),
510
+ title: z.string().min(1).optional(),
511
+ url: z.string().min(1).optional()
512
+ }).strict().optional(),
513
+ title: z.string().min(1),
514
+ updatedAt: z.string().datetime(),
515
+ visibility: z.enum(["public", "private"])
516
+ }).strict();
517
+ /** Review desk list filters. */
518
+ const reviewItemListQuerySchema = z.object({
519
+ /** `true` lists done and dismissed items instead of open ones. */
520
+ archived: z.enum(["true", "false"]).optional(),
521
+ conversationId: z.string().min(1).optional(),
522
+ q: z.string().trim().max(200).optional(),
523
+ view: z.enum([
524
+ "mine",
525
+ "everyone",
526
+ "all"
527
+ ]).optional()
528
+ }).strict();
529
+ const reviewItemListSchema = z.object({ items: z.array(reviewItemSchema) }).strict();
530
+ /** Open Review items that wait on the viewer. */
531
+ const reviewItemCountSchema = z.object({
532
+ /** Open items assigned to the viewer as a User. */
533
+ mine: z.number().int().nonnegative() }).strict();
534
+ /** Conversations with an open item assigned to the viewer or Everyone. */
535
+ const reviewItemWaitingConversationsSchema = z.object({ conversationIds: z.array(z.string().min(1)) }).strict();
536
+ const reviewItemParamsSchema = z.object({ id: z.string().min(1) }).strict();
537
+ /** One person action on a Review item. */
538
+ const reviewItemActionSchema = z.discriminatedUnion("action", [
539
+ z.object({ action: z.literal("take") }).strict(),
540
+ z.object({ action: z.literal("complete") }).strict(),
541
+ z.object({ action: z.literal("dismiss") }).strict(),
542
+ z.object({
543
+ action: z.literal("submit"),
544
+ answer: answerSchema.omit({ requestId: true })
545
+ }).strict()
546
+ ]);
470
547
  // src/api/schema/workspace.ts
471
548
  const workspaceRepoInputSchema = z.object({
472
549
  provider: z.string(),
@@ -526,4 +603,4 @@ const statsReportSchema = z.object({
526
603
  windowEnd: z.string(),
527
604
  windowStart: z.string()
528
605
  }).strict();
529
- export { activityHours as A, codeChangeSummarySchema as B, personParamsSchema as C, locationDirectoryReportSchema as D, locationDetailReportSchema as E, connectionSchema as F, codeRepositorySummarySchema as G, codePersonReportSchema as H, disconnectConnectionResponseSchema as I, conversationChildAgentSchema as J, conversationWatchSchema as K, startConnectionResponseSchema as L, dailyConversationActivitySchema as M, connectionListSchema as N, locationParamsSchema as O, connectionParamsSchema as P, apiErrorSchema as Q, codeActivityDaySchema as R, actorProfileReportSchema as S, locationActivityDayReportSchema as T, codeRepositoryParamsSchema as U, codeOverviewReportSchema as V, codeRepositoryReportSchema as W, stopConversationTurnResponseSchema as X, conversationChildAgentsReportSchema as Y, conversationStatsReportSchema as Z, personalTokenListSchema as _, workspaceBodySchema as a, revokePersonalTokenResponseSchema as b, workspaceRepoSchema as c, serviceAccountListSchema as d, serviceAccountParamsSchema as f, createdPersonalTokenSchema as g, createPersonalTokenBodySchema as h, deleteWorkspaceResponseSchema as i, activitySixHours as j, activityDays as k, workspaceSchema as l, startServiceAccountSignInResponseSchema as m, statsReportSchema as n, workspaceListSchema as o, serviceAccountSchema as p, conversationWatchesReportSchema as q, baselineSnapshotSchema as r, workspaceParamsSchema as s, statSchema as t, disconnectServiceAccountResponseSchema as u, personalTokenMetadataSchema as v, personalSpendReportSchema as w, actorDirectoryReportSchema as x, personalTokenParamsSchema as y, codeChangeSummaryReportSchema as z };
606
+ export { conversationWatchSchema as $, personParamsSchema as A, connectionListSchema as B, createdPersonalTokenSchema as C, revokePersonalTokenResponseSchema as D, personalTokenParamsSchema as E, locationParamsSchema as F, codeActivityDaySchema as G, connectionSchema as H, activityDays as I, codeOverviewReportSchema as J, codeChangeSummaryReportSchema as K, activityHours as L, locationActivityDayReportSchema as M, locationDetailReportSchema as N, actorDirectoryReportSchema as O, locationDirectoryReportSchema as P, codeRepositorySummarySchema as Q, activitySixHours as R, createPersonalTokenBodySchema as S, personalTokenMetadataSchema as T, disconnectConnectionResponseSchema as U, connectionParamsSchema as V, startConnectionResponseSchema as W, codeRepositoryParamsSchema as X, codePersonReportSchema as Y, codeRepositoryReportSchema as Z, disconnectServiceAccountResponseSchema as _, workspaceBodySchema as a, apiErrorSchema as at, serviceAccountSchema as b, workspaceRepoSchema as c, reviewItemCountSchema as d, conversationWatchesReportSchema as et, reviewItemListQuerySchema as f, reviewItemWaitingConversationsSchema as g, reviewItemSchema as h, deleteWorkspaceResponseSchema as i, conversationStatsReportSchema as it, personalSpendReportSchema as j, actorProfileReportSchema as k, workspaceSchema as l, reviewItemParamsSchema as m, statsReportSchema as n, conversationChildAgentsReportSchema as nt, workspaceListSchema as o, reviewItemListSchema as p, codeChangeSummarySchema as q, baselineSnapshotSchema as r, stopConversationTurnResponseSchema as rt, workspaceParamsSchema as s, statSchema as t, conversationChildAgentSchema as tt, reviewItemActionSchema as u, serviceAccountListSchema as v, personalTokenListSchema as w, startServiceAccountSignInResponseSchema as x, serviceAccountParamsSchema as y, dailyConversationActivitySchema as z };