@sentry/junior 0.246.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-Bh-MYw-j.js → admin-BGwaqDMs.js} +1 -1
  2. package/dist/{agent-hooks-DpklSWZg.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-DSKpHjHW.js → agent-runner-DsAFAKKs.js} +451 -2412
  5. package/dist/api/schema.js +2 -2
  6. package/dist/api.js +24 -21
  7. package/dist/{app-BYB7szGb.d.ts → app-4t4mPTdS.d.ts} +8 -1
  8. package/dist/app.d.ts +1 -1
  9. package/dist/app.js +30 -27
  10. package/dist/assistant-reply-ChOzcTBS.js +45 -0
  11. package/dist/{briefs-cZ5vWqP_.js → briefs-Dc7qZrhc.js} +4 -4
  12. package/dist/{catalog-runtime-CTaQXYqS.js → catalog-runtime-DS1k7fUG.js} +1 -1
  13. package/dist/cli/chat.js +22 -16
  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--xtsAxKP.js → client-BVnfNd3D.js} +2 -2
  20. package/dist/{config-BK53Ip5C.js → config-CgWvImQL.js} +2 -2
  21. package/dist/{conversation-CvBG57Io.js → conversation-CYsbVFLx.js} +71 -1
  22. package/dist/{conversation-privacy-BDBFw6Ws.js → conversation-privacy-D3TdVM9H.js} +1 -1
  23. package/dist/{credential-sync-BiuhC9Ds.js → credential-sync-DLw3jkv-.js} +14 -14
  24. package/dist/{executor-bmmuRY-w.js → executor-DQazjeGA.js} +3 -3
  25. package/dist/{images-DZliDtSH.js → images-C3e5E-p_.js} +4 -21
  26. package/dist/instrumentation.js +2 -2
  27. package/dist/{job-queue-Cz3M7gg4.js → job-queue-BEUqRhjC.js} +1 -1
  28. package/dist/{logging-DVtMYOdD.js → logging-CZEc8_v4.js} +1 -1
  29. package/dist/message-BIJa7lKh.js +59 -0
  30. package/dist/nitro.d.ts +1 -1
  31. package/dist/nitro.js +3 -3
  32. package/dist/{oauth-authorization-By_MVRDC.js → oauth-authorization-BA4Dt6a7.js} +1 -45
  33. package/dist/{oauth-callback-server-BrUo6w1e.js → oauth-callback-server-R9OSdLP1.js} +2 -2
  34. package/dist/{pending-auth-BuQLZ6dK.js → pending-auth-Oo5AQhaf.js} +2 -2
  35. package/dist/{profile-BevMNSlr.js → profile-aVLDAirh.js} +4 -4
  36. package/dist/{prompt-C9Q9cjD3.js → prompt-ZG1UCxjF.js} +1 -1
  37. package/dist/{registry-C2rSEio1.js → registry-CtaDOOM5.js} +1 -1
  38. package/dist/{resolve-qPhrznTf.js → resolve-Bdw4hu7s.js} +2 -2
  39. package/dist/result-DNgmkASh.js +463 -0
  40. package/dist/{runner-CNh5eMWx.js → runner-BUSScEu5.js} +11 -10
  41. package/dist/{sandbox-egress-signals-BnDEKu8d.js → sandbox-egress-signals-E9r8bf9G.js} +1 -1
  42. package/dist/{schema-BWMRg8JS.js → schema-tyd6hALh.js} +2 -2
  43. package/dist/session-stop-CAhBfBUT.js +782 -0
  44. package/dist/{skills-C6zJbudq.js → skills-DQy-mmBC.js} +2 -2
  45. package/dist/{spawn-C3efZSx3.js → spawn-DQ_MVWZ6.js} +3 -2
  46. package/dist/store-DjLA8GKs.js +1417 -0
  47. package/dist/{task-queue-BX4vG6uA.js → task-queue-BT2h_t8I.js} +3 -3
  48. package/dist/{task-runner-T51kll0U.js → task-runner-CiPepjIB.js} +11 -11
  49. package/dist/{tasks-B9OIjl2K.js → tasks-DMmRrIVl.js} +9 -9
  50. package/dist/{thread-state-AGZtVyXp.js → thread-state-ehZYGpX9.js} +7 -7
  51. package/dist/{turn-failure-response-DJ8KU2bo.js → turn-failure-response-D7J10z7l.js} +9 -9
  52. package/dist/{turn-lifecycle-DZJkJ95q.js → turn-lifecycle-Buswqs90.js} +1 -1
  53. package/dist/{turn-session-routing-mRqLbMZW.js → turn-session-routing-Bw-yiSb4.js} +1 -1
  54. package/dist/{validation-Dg0Ihxzo.js → validation-DTguegIe.js} +1 -1
  55. package/dist/{version-Deub4try.js → version-BrZSE5du.js} +1 -1
  56. package/dist/version.js +1 -1
  57. package/dist/{viewer-D5hbx6TE.js → viewer-BlAozHer.js} +4 -4
  58. package/dist/{web-authorization-DCxixz5S.js → web-authorization-DwyTlkAg.js} +6 -6
  59. package/dist/{web-input-0sorYVLh.js → web-input-DSYxI7Wi.js} +43 -208
  60. package/dist/{work-rm2X7jj4.js → work-CRBXkJoU.js} +89 -13
  61. package/dist/{worker-bnGsAOP3.js → worker-BVJKM9Ja.js} +7 -7
  62. package/migrations/0053_conversation_stopped_at.sql +1 -0
  63. package/migrations/0054_flowery_rage.sql +1 -0
  64. package/migrations/meta/0053_snapshot.json +3771 -0
  65. package/migrations/meta/0054_snapshot.json +3777 -0
  66. package/migrations/meta/_journal.json +14 -0
  67. package/package.json +6 -5
  68. package/dist/message-BSN-Ma5f.js +0 -317
@@ -1,4 +1,4 @@
1
- import { a as setUserAdminFromSql, d as getDb, n as listAdminUsersFromSql } from "./viewer-D5hbx6TE.js";
1
+ import { a as setUserAdminFromSql, d as getDb, n as listAdminUsersFromSql } from "./viewer-BlAozHer.js";
2
2
  import { CLI_USAGE } from "./cli/run.js";
3
3
  //#region src/cli/admin.ts
4
4
  /**
@@ -1,20 +1,20 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { a as embedTexts, r as completeObject } from "./client--xtsAxKP.js";
3
- import { I as isRecord$1, a as extractGenAiUsageSummary, d as logException, f as logInfo, p as logWarn, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-DVtMYOdD.js";
2
+ import { a as embedTexts, r as completeObject } from "./client-BVnfNd3D.js";
3
+ import { I as isRecord$1, a as extractGenAiUsageSummary, d as logException, f as logInfo, p as logWarn, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-CZEc8_v4.js";
4
4
  import { a as getClient$1 } from "./sentry-CgWZM_kV.js";
5
- import { t as canExposeConversationPayload } from "./conversation-privacy-BDBFw6Ws.js";
6
- import { i as getChatConfig, n as botConfig, o as getSlackBotToken } from "./config-BK53Ip5C.js";
5
+ import { t as canExposeConversationPayload } from "./conversation-privacy-D3TdVM9H.js";
6
+ import { i as getChatConfig, n as botConfig, o as getSlackBotToken } from "./config-CgWvImQL.js";
7
7
  import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
8
8
  import { d as parseSlackTeamId, g as parseSlackMessageTs, i as isActorUserId, o as parseActorUserId, u as parseSlackChannelReferenceId } from "./actor-BTtLaeWy.js";
9
- import { O as readUserTimezone, T as hasAgentTurnUsage, c as getConversationEventStore, d as getDb, f as getSqlExecutor, h as createSqlStore, i as resolveViewerUser, k as saveUserTimezone, r as readActorIdentity } from "./viewer-D5hbx6TE.js";
10
- import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, s as juniorConversations } from "./agent-invocations-BO6ddZax.js";
11
- import { S as juniorAttachments, _ as juniorConversationEvents, b as juniorCodeChanges, f as juniorConversationParticipants, i as juniorWorkspaces, m as juniorConversationBriefs, n as juniorSnapshots, r as juniorWorkspaceRepos, x as juniorCodeRepositories, y as juniorConversationAnnotations } from "./executor-bmmuRY-w.js";
9
+ import { O as readUserTimezone, T as hasAgentTurnUsage, c as getConversationEventStore, d as getDb, f as getSqlExecutor, h as createSqlStore, i as resolveViewerUser, k as saveUserTimezone, r as readActorIdentity } from "./viewer-BlAozHer.js";
10
+ import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
11
+ import { S as juniorAttachments, _ as juniorConversationEvents, b as juniorCodeChanges, f as juniorConversationParticipants, i as juniorWorkspaces, m as juniorConversationBriefs, n as juniorSnapshots, r as juniorWorkspaceRepos, x as juniorCodeRepositories, y as juniorConversationAnnotations } from "./executor-DQazjeGA.js";
12
12
  import { o as decodeStoredConversationEvent } from "./history-Nte1oVed.js";
13
- import { p as credentialSubjectSchema } from "./registry-C2rSEio1.js";
14
- import { B as conversationBriefSchema, C as conversationReportEventSchema, G as readMessageCardRefs, P as readMessageAttachments, V as parseBriefInput } from "./conversation-CvBG57Io.js";
15
- import { C as getDefaultRedisStateAdapterFor, N as SANDBOX_WORKSPACE_ROOT, k as sleep$1, l as isSandboxMissingError, n as hash, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-BevMNSlr.js";
13
+ import { p as credentialSubjectSchema } from "./registry-CtaDOOM5.js";
14
+ import { C as conversationReportEventSchema, H as parseBriefInput, K as readMessageCardRefs, P as readMessageAttachments, V as conversationBriefSchema } from "./conversation-CYsbVFLx.js";
15
+ import { C as getDefaultRedisStateAdapterFor, N as SANDBOX_WORKSPACE_ROOT, k as sleep$1, l as isSandboxMissingError, n as hash, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-aVLDAirh.js";
16
16
  import { i as isValidTimeZone } from "./cadence-D00SCzT1.js";
17
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-C9Q9cjD3.js";
17
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-ZG1UCxjF.js";
18
18
  import { AsyncLocalStorage } from "node:async_hooks";
19
19
  import { z } from "zod";
20
20
  import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
@@ -96,6 +96,8 @@ const juniorConversations = pgTable("junior_conversations", {
96
96
  forkedFromConversationId: text("forked_from_conversation_id").references(() => juniorConversations.conversationId, { onDelete: "set null" }),
97
97
  rootConversationId: text("root_conversation_id").references(() => juniorConversations.conversationId),
98
98
  transcriptPurgedAt: timestamptz("transcript_purged_at"),
99
+ /** Latest session stop. Automated input received before it is dropped. */
100
+ stoppedAt: timestamptz("stopped_at"),
99
101
  durationMs: integer("duration_ms").notNull().default(0),
100
102
  usage: jsonb("usage_json").$type(),
101
103
  executionDurationMs: integer("execution_duration_ms").notNull().default(0),
@@ -133,13 +135,16 @@ const AGENT_INVOCATION_MAILBOX_STATUSES = ["pending", "appended"];
133
135
  * Parent mailbox append state. Only terminal invocations have a value.
134
136
  * `replaced` means the child still had open work, so a later agent invocation
135
137
  * on the same child sends the result instead. `skipped` means a stop ended
136
- * the work, so the result is never used.
138
+ * the work, so the result is never used. `steered` means the agent invocation
139
+ * that was running read the input as a steering message, so its result covers
140
+ * this one.
137
141
  */
138
142
  const AGENT_INVOCATION_PARENT_MAILBOX_STATUSES = [
139
143
  "pending",
140
144
  "appended",
141
145
  "replaced",
142
- "skipped"
146
+ "skipped",
147
+ "steered"
143
148
  ];
144
149
  const juniorAgentBindings = pgTable("junior_agent_bindings", {
145
150
  parentConversationId: text("parent_conversation_id").notNull().references(() => juniorConversations.conversationId),
@@ -158,6 +163,7 @@ const juniorAgentInvocations = pgTable("junior_agent_invocations", {
158
163
  source: jsonb("source_json").$type().notNull(),
159
164
  destination: jsonb("destination_json").$type().notNull(),
160
165
  destinationVisibility: text("destination_visibility").$type(),
166
+ modelProfile: text("model_profile").$type(),
161
167
  reasoningLevel: text("reasoning_level").$type(),
162
168
  parentToolCallId: text("parent_tool_call_id"),
163
169
  status: text("status").$type().notNull(),