@sentry/junior 0.177.0 → 0.179.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 (102) hide show
  1. package/dist/{agent-hooks-IYHCN7CO.js → agent-hooks-32IDCLMW.js} +12 -12
  2. package/dist/api/conversations/archive.d.ts +5 -2
  3. package/dist/api/conversations/list.d.ts +0 -1
  4. package/dist/api/conversations/membership.d.ts +14 -0
  5. package/dist/api/conversations/projection.d.ts +2 -1
  6. package/dist/api/locations/detail.d.ts +1 -1
  7. package/dist/api/people/shared.d.ts +2 -2
  8. package/dist/api/schema/conversation.d.ts +4 -4
  9. package/dist/api/schema/location.d.ts +1 -1
  10. package/dist/api/schema/person.d.ts +1 -1
  11. package/dist/api/schema.js +1 -1
  12. package/dist/api.js +399 -287
  13. package/dist/app.js +573 -198
  14. package/dist/{catalog-runtime-2TD4CXSB.js → catalog-runtime-FBVA6WAQ.js} +5 -5
  15. package/dist/chat/agent/sandbox.d.ts +2 -0
  16. package/dist/chat/conversations/sql/participants.d.ts +1 -0
  17. package/dist/chat/conversations/store.d.ts +0 -1
  18. package/dist/chat/sandbox/errors.d.ts +4 -0
  19. package/dist/chat/sandbox/noninteractive-command.d.ts +1 -0
  20. package/dist/chat/sandbox/prepare-workspace.d.ts +27 -3
  21. package/dist/chat/sandbox/sandbox.d.ts +2 -0
  22. package/dist/chat/sandbox/session.d.ts +2 -0
  23. package/dist/chat/sandbox/snapshot/builder-sandbox.d.ts +5 -0
  24. package/dist/chat/sandbox/snapshot/install.d.ts +2 -2
  25. package/dist/chat/sandbox/snapshot/span.d.ts +3 -0
  26. package/dist/chat/sandbox/snapshot/store.d.ts +20 -17
  27. package/dist/chat/sandbox/snapshot/waiting-error.d.ts +15 -0
  28. package/dist/chat/sandbox/snapshot/workspace.d.ts +17 -0
  29. package/dist/chat/scheduled-tasks/personal.d.ts +5 -8
  30. package/dist/chat/scheduled-tasks/runs.d.ts +49 -0
  31. package/dist/chat/scheduled-tasks/schedule-intent.d.ts +1 -1
  32. package/dist/chat/scheduled-tasks/tasks.d.ts +27 -0
  33. package/dist/chat/scheduled-tasks/tool-support.d.ts +0 -4
  34. package/dist/chat/scheduled-tasks/tools/create.d.ts +1 -1
  35. package/dist/chat/scheduled-tasks/tools/update.d.ts +1 -1
  36. package/dist/chat/scheduled-tasks/types.d.ts +127 -78
  37. package/dist/chat/services/workspace-snapshot-wait.d.ts +27 -0
  38. package/dist/chat/workspaces/types.d.ts +1 -0
  39. package/dist/{chunk-CAWBLVBY.js → chunk-2HIPYNQI.js} +6 -6
  40. package/dist/{chunk-ZCYABD7N.js → chunk-3AFVR5UC.js} +5 -5
  41. package/dist/{chunk-PA7QDS7P.js → chunk-3I7XE3PA.js} +204 -100
  42. package/dist/{chunk-VGDOEKO2.js → chunk-3TM3FYLQ.js} +1 -1
  43. package/dist/{chunk-6NZRKJWU.js → chunk-4GWXAILB.js} +1 -1
  44. package/dist/{chunk-LFZODSAY.js → chunk-5IRROPA5.js} +4 -4
  45. package/dist/{chunk-N4YEVOEC.js → chunk-B6ECUSVX.js} +45 -276
  46. package/dist/{chunk-4TWDRU64.js → chunk-CJLBLELR.js} +5 -5
  47. package/dist/{chunk-3FWXQZJJ.js → chunk-FAS6AIMF.js} +1 -1
  48. package/dist/{chunk-I7PKGMKI.js → chunk-FIDMHAO6.js} +6 -6
  49. package/dist/{chunk-4SVAFAI2.js → chunk-FTGD2FBP.js} +1 -1
  50. package/dist/{chunk-LVL5NG5G.js → chunk-G2CAC4CV.js} +19 -19
  51. package/dist/{chunk-DLTP6TUJ.js → chunk-GENV6KF2.js} +2 -2
  52. package/dist/{chunk-FVVYHML7.js → chunk-GPLAT6H7.js} +6 -6
  53. package/dist/{chunk-7CVYXUOJ.js → chunk-HQNE5APD.js} +1 -1
  54. package/dist/{chunk-Q362TECJ.js → chunk-JMJNFEDC.js} +331 -2
  55. package/dist/{chunk-AFOFVEXP.js → chunk-JT4WMD3C.js} +124 -13
  56. package/dist/{chunk-7ZFESKJ2.js → chunk-KJLHIHFF.js} +9 -9
  57. package/dist/{chunk-QLLOX7JY.js → chunk-Q5B3WTGG.js} +8 -8
  58. package/dist/{chunk-DGGIKWYQ.js → chunk-R5NWWYIS.js} +1 -1
  59. package/dist/{chunk-WCQUKX74.js → chunk-R6U7N4FS.js} +14 -5
  60. package/dist/{chunk-WYO2HXY5.js → chunk-RTRBYSF3.js} +1 -1
  61. package/dist/{chunk-2IMQLZHS.js → chunk-RZRYOLCE.js} +1144 -136
  62. package/dist/{chunk-7B6NW4P7.js → chunk-SLGGOASN.js} +1 -1
  63. package/dist/{chunk-SNPQGTHJ.js → chunk-TIEKUH4Q.js} +1 -1
  64. package/dist/{chunk-ELEAIRTG.js → chunk-TKB25A3L.js} +2 -2
  65. package/dist/{chunk-UB5YB2ED.js → chunk-U4TKB6F6.js} +6 -6
  66. package/dist/{chunk-ORMJY4RG.js → chunk-UT6X7XN7.js} +1 -1
  67. package/dist/{chunk-LPMLAJYR.js → chunk-VP4OVRDD.js} +11 -17
  68. package/dist/{chunk-7PZDAXIK.js → chunk-XSPSCWLH.js} +1 -1
  69. package/dist/chunk-XZY6G5YZ.js +1088 -0
  70. package/dist/{chunk-J2EWL6GJ.js → chunk-YFNAMRGE.js} +1 -1
  71. package/dist/{chunk-6KGMMVHF.js → chunk-ZQMG3CL5.js} +2 -2
  72. package/dist/cli/chat.js +31 -30
  73. package/dist/cli/check.js +6 -6
  74. package/dist/cli/plugins.js +13 -13
  75. package/dist/cli/snapshot-create.js +10 -10
  76. package/dist/cli/upgrade.js +7 -7
  77. package/dist/db/schema/conversation-participants.d.ts +17 -0
  78. package/dist/db/schema/conversations.d.ts +629 -1
  79. package/dist/db/schema/scheduled-tasks.d.ts +29 -5
  80. package/dist/db/schema/snapshots.d.ts +1 -1
  81. package/dist/db/schema.d.ts +46 -5
  82. package/dist/{db-A3CB76US.js → db-EJAV7JL6.js} +7 -7
  83. package/dist/instrumentation.js +4 -4
  84. package/dist/nitro.js +2 -2
  85. package/dist/{oauth-callback-server-64QMI3IB.js → oauth-callback-server-GAVSUBTQ.js} +23 -23
  86. package/dist/{runner-EIAE2BGD.js → runner-34JL64JF.js} +15 -15
  87. package/dist/{skills-ZADWFKDG.js → skills-U545HALM.js} +6 -6
  88. package/dist/spawn-I2S4IDUQ.js +37 -0
  89. package/dist/{validation-4I6AF4CV.js → validation-EVXVGA44.js} +6 -6
  90. package/dist/version.js +1 -1
  91. package/dist/{work-BS6BZ66U.js → work-QOAUPDBU.js} +18 -18
  92. package/dist/worker-5GX2IKLZ.js +24 -0
  93. package/migrations/0033_workspace_snapshot_active_build.sql +1 -0
  94. package/migrations/0034_strong_randall.sql +31 -0
  95. package/migrations/meta/0033_snapshot.json +2914 -0
  96. package/migrations/meta/0034_snapshot.json +3038 -0
  97. package/migrations/meta/_journal.json +15 -1
  98. package/package.json +4 -4
  99. package/dist/chat/scheduled-tasks/store.d.ts +0 -78
  100. package/dist/chunk-4TRHPYTL.js +0 -1944
  101. package/dist/spawn-DVUOUFFC.js +0 -37
  102. package/dist/worker-RS5PWTCE.js +0 -24
@@ -2,7 +2,7 @@ import {
2
2
  coerceThreadConversationState,
3
3
  getPersistedThreadState,
4
4
  persistThreadStateById
5
- } from "./chunk-4TWDRU64.js";
5
+ } from "./chunk-CJLBLELR.js";
6
6
  import {
7
7
  pluginTaskId,
8
8
  pluginTaskParamsSchema,
@@ -22,7 +22,7 @@ import {
22
22
  markTurnCompleted,
23
23
  normalizeToolNameFromResult,
24
24
  stripRuntimeTurnContext
25
- } from "./chunk-I7PKGMKI.js";
25
+ } from "./chunk-FIDMHAO6.js";
26
26
  import {
27
27
  createPluginConversationEvents,
28
28
  createPluginEmbedder,
@@ -30,7 +30,7 @@ import {
30
30
  createPluginModel,
31
31
  createPluginState,
32
32
  getPlugins
33
- } from "./chunk-PA7QDS7P.js";
33
+ } from "./chunk-3I7XE3PA.js";
34
34
  import {
35
35
  JUNIOR_THREAD_STATE_TTL_MS
36
36
  } from "./chunk-3Y47VMHV.js";
@@ -38,20 +38,20 @@ import {
38
38
  getConversationStore,
39
39
  getDb,
40
40
  sameActorIdentity
41
- } from "./chunk-LPMLAJYR.js";
41
+ } from "./chunk-VP4OVRDD.js";
42
42
  import {
43
43
  juniorConversations,
44
44
  juniorTaskExecutions
45
- } from "./chunk-WCQUKX74.js";
45
+ } from "./chunk-R6U7N4FS.js";
46
46
  import {
47
47
  getStateAdapter
48
- } from "./chunk-VGDOEKO2.js";
48
+ } from "./chunk-3TM3FYLQ.js";
49
49
  import {
50
50
  ProviderError,
51
51
  findProviderError,
52
52
  getProviderErrorAttributes,
53
53
  getProviderErrorUserMessage
54
- } from "./chunk-DLTP6TUJ.js";
54
+ } from "./chunk-GENV6KF2.js";
55
55
  import {
56
56
  credentialSubjectSchema
57
57
  } from "./chunk-CGA4ERJ5.js";
@@ -61,7 +61,7 @@ import {
61
61
  import {
62
62
  buildTurnFailureResponse,
63
63
  logWarn
64
- } from "./chunk-7CVYXUOJ.js";
64
+ } from "./chunk-HQNE5APD.js";
65
65
 
66
66
  // src/chat/runtime/delivered-turn-state.ts
67
67
  function buildDeliveredTurnStatePatch(args) {
@@ -87,7 +87,7 @@ import { pluginRunContextSchema } from "@sentry/junior-plugin-api";
87
87
 
88
88
  // src/chat/services/turn-session-routing.ts
89
89
  async function resolveTurnSessionRouting(args) {
90
- const conversationStore = args.conversationStore ?? (await import("./db-A3CB76US.js")).getConversationStore();
90
+ const conversationStore = args.conversationStore ?? (await import("./db-EJAV7JL6.js")).getConversationStore();
91
91
  const conversation = await conversationStore.get({
92
92
  conversationId: args.conversationId
93
93
  });
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RF6J3DIO.js";
4
4
  import {
5
5
  resolveBaseUrl
6
- } from "./chunk-CAWBLVBY.js";
6
+ } from "./chunk-2HIPYNQI.js";
7
7
  import {
8
8
  isExperimentalFeatureEnabled
9
9
  } from "./chunk-VRS6WDK5.js";
@@ -12,27 +12,27 @@ import {
12
12
  getPlugins,
13
13
  getSlackClient,
14
14
  withSlackRetries
15
- } from "./chunk-PA7QDS7P.js";
15
+ } from "./chunk-3I7XE3PA.js";
16
16
  import {
17
17
  getDb,
18
18
  parseDestination
19
- } from "./chunk-LPMLAJYR.js";
19
+ } from "./chunk-VP4OVRDD.js";
20
20
  import {
21
21
  sleep
22
- } from "./chunk-Q362TECJ.js";
22
+ } from "./chunk-JMJNFEDC.js";
23
23
  import {
24
24
  acquireActiveLock,
25
25
  getStateAdapter
26
- } from "./chunk-VGDOEKO2.js";
26
+ } from "./chunk-3TM3FYLQ.js";
27
27
  import {
28
28
  pluginCatalogRuntime
29
- } from "./chunk-J2EWL6GJ.js";
29
+ } from "./chunk-YFNAMRGE.js";
30
30
  import {
31
31
  fetchWithBoundedOAuthErrorBodies
32
- } from "./chunk-7B6NW4P7.js";
32
+ } from "./chunk-SLGGOASN.js";
33
33
  import {
34
34
  isRecord
35
- } from "./chunk-7CVYXUOJ.js";
35
+ } from "./chunk-HQNE5APD.js";
36
36
 
37
37
  // src/chat/capabilities/router.ts
38
38
  var ProviderCredentialRouter = class {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createAndEnqueueAgentInvocation
3
- } from "./chunk-FVVYHML7.js";
3
+ } from "./chunk-GPLAT6H7.js";
4
4
  import {
5
5
  actorFromRun,
6
6
  toolInvocationDestination
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SQL_STATEMENT_TIMEOUT_MS
3
- } from "./chunk-DLTP6TUJ.js";
3
+ } from "./chunk-GENV6KF2.js";
4
4
  import {
5
5
  juniorDestinations,
6
6
  timestamptz
@@ -56,7 +56,7 @@ var juniorArtifacts = pgTable(
56
56
  import { index as index4, integer as integer3, pgTable as pgTable5, text as text5 } from "drizzle-orm/pg-core";
57
57
 
58
58
  // src/db/schema/conversations.ts
59
- import { sql as sql2 } from "drizzle-orm";
59
+ import { getTableColumns, sql as sql2 } from "drizzle-orm";
60
60
  import {
61
61
  index as index3,
62
62
  integer as integer2,
@@ -181,7 +181,8 @@ var juniorConversations = pgTable4(
181
181
  executionDurationMs: integer2("execution_duration_ms").notNull().default(0),
182
182
  executionUsage: jsonb2("execution_usage_json").$type(),
183
183
  metricRunId: text4("metric_run_id"),
184
- archivedAt: timestamptz("archived_at")
184
+ // Keep the legacy column in the schema. Runtime code must not read or write it.
185
+ legacyArchivedAt: timestamptz("archived_at")
185
186
  },
186
187
  (table) => [
187
188
  index3("junior_conversations_last_activity_idx").on(
@@ -210,6 +211,11 @@ var juniorConversations = pgTable4(
210
211
  index3("junior_conversations_root_idx").on(table.rootConversationId)
211
212
  ]
212
213
  );
214
+ function conversationReadColumns() {
215
+ const { legacyArchivedAt, ...columns } = getTableColumns(juniorConversations);
216
+ void legacyArchivedAt;
217
+ return columns;
218
+ }
213
219
 
214
220
  // src/db/schema/attachments.ts
215
221
  var juniorAttachments = pgTable5(
@@ -387,7 +393,8 @@ var juniorConversationParticipants = pgTable10(
387
393
  {
388
394
  userId: text10("user_id").notNull().references(() => juniorUsers.id),
389
395
  rootConversationId: text10("root_conversation_id").notNull().references(() => juniorConversations.conversationId),
390
- lastMessageAt: timestamptz("last_message_at").notNull()
396
+ lastMessageAt: timestamptz("last_message_at").notNull(),
397
+ archivedAt: timestamptz("archived_at")
391
398
  },
392
399
  (table) => [
393
400
  primaryKey4({
@@ -693,7 +700,7 @@ var juniorSnapshots = pgTable18(
693
700
  snapshotId: text18("snapshot_id"),
694
701
  buildDurationMs: integer6("build_duration_ms"),
695
702
  generatedAt: timestamptz("generated_at"),
696
- // In-flight builder references for check-in across execution slices.
703
+ // Builder references for check-in and snapshot-owner cleanup.
697
704
  buildStartedAt: timestamptz("build_started_at"),
698
705
  buildPhase: text18("build_phase").$type(),
699
706
  buildSandboxName: text18("build_sandbox_name"),
@@ -731,6 +738,7 @@ var juniorSnapshots = pgTable18(
731
738
  table.profileHash,
732
739
  table.status
733
740
  ),
741
+ uniqueIndex8("junior_snapshots_active_build_uidx").on(table.workspaceId, table.profileHash).where(sql6`${table.status} = 'building'`),
734
742
  index13("junior_snapshots_workspace_status_idx").on(
735
743
  table.workspaceId,
736
744
  table.status
@@ -1018,6 +1026,7 @@ export {
1018
1026
  juniorUsers,
1019
1027
  juniorIdentities,
1020
1028
  juniorConversations,
1029
+ conversationReadColumns,
1021
1030
  juniorAttachments,
1022
1031
  juniorConversationAnnotations,
1023
1032
  juniorApiTokens,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-J2EWL6GJ.js";
3
+ } from "./chunk-YFNAMRGE.js";
4
4
 
5
5
  // src/chat/plugins/validation.ts
6
6
  import { isDeepStrictEqual } from "util";