@sentry/junior 0.126.1 → 0.128.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 (124) hide show
  1. package/dist/{agent-hooks-U5YGLX6Y.js → agent-hooks-F75ANGBV.js} +9 -9
  2. package/dist/api/people/spend.d.ts +4 -0
  3. package/dist/api/people/spend.query.d.ts +3 -0
  4. package/dist/api/schema/person.d.ts +9 -0
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +3 -1
  7. package/dist/api.js +141 -40
  8. package/dist/app.js +289 -146
  9. package/dist/{catalog-runtime-OUPLWD7F.js → catalog-runtime-ZPSA5QM2.js} +6 -6
  10. package/dist/chat/agent-dispatch/context.d.ts +17 -0
  11. package/dist/chat/agent-dispatch/store.d.ts +1 -1
  12. package/dist/chat/agent-dispatch/work.d.ts +1 -1
  13. package/dist/chat/credentials/context.d.ts +27 -0
  14. package/dist/chat/credentials/subject.d.ts +15 -0
  15. package/dist/chat/event-tasks/ingest.d.ts +9 -0
  16. package/dist/chat/event-tasks/store.d.ts +15 -0
  17. package/dist/chat/event-tasks/tool-support.d.ts +140 -0
  18. package/dist/chat/event-tasks/types.d.ts +44 -0
  19. package/dist/chat/plugins/agent-hooks.d.ts +4 -2
  20. package/dist/chat/plugins/viewer.d.ts +16 -0
  21. package/dist/chat/resource-events/catalog.d.ts +21 -0
  22. package/dist/chat/resource-events/ingest.d.ts +2 -1
  23. package/dist/chat/resource-events/notification.d.ts +2 -2
  24. package/dist/chat/resource-events/store.d.ts +11 -9
  25. package/dist/chat/resource-events/tool-support.d.ts +10 -0
  26. package/dist/chat/resource-events/workspace.d.ts +4 -0
  27. package/dist/chat/sandbox/command-result.d.ts +3 -22
  28. package/dist/chat/sandbox/egress/schemas.d.ts +11 -0
  29. package/dist/chat/services/guardian-action-policy.d.ts +1 -1
  30. package/dist/chat/slack/dispatch-turn.d.ts +1 -1
  31. package/dist/chat/slack/tools/canvas/create.d.ts +0 -16
  32. package/dist/chat/slack/tools/canvas/edit.d.ts +0 -16
  33. package/dist/chat/slack/tools/canvas/read.d.ts +0 -16
  34. package/dist/chat/slack/tools/canvas/write.d.ts +0 -16
  35. package/dist/chat/slack/tools/channel-list-messages.d.ts +0 -16
  36. package/dist/chat/slack/tools/conversation-search.d.ts +0 -16
  37. package/dist/chat/slack/tools/list/add-items.d.ts +0 -16
  38. package/dist/chat/slack/tools/list/create.d.ts +0 -16
  39. package/dist/chat/slack/tools/list/get-items.d.ts +0 -16
  40. package/dist/chat/slack/tools/list/update-item.d.ts +0 -16
  41. package/dist/chat/slack/tools/message-add-reaction.d.ts +0 -16
  42. package/dist/chat/slack/tools/public-search.d.ts +0 -16
  43. package/dist/chat/slack/tools/send-files.d.ts +10 -28
  44. package/dist/chat/slack/tools/thread-read.d.ts +0 -16
  45. package/dist/chat/slack/tools/user-lookup.d.ts +0 -16
  46. package/dist/chat/task-execution/slack-work.d.ts +4 -4
  47. package/dist/chat/tool-support/action-review.d.ts +1 -1
  48. package/dist/chat/tool-support/structured-result.d.ts +17 -46
  49. package/dist/chat/tool-support/text-range-result.d.ts +8 -32
  50. package/dist/chat/tool-support/zod-tool.d.ts +6 -7
  51. package/dist/chat/tools/create-event-task.d.ts +65 -0
  52. package/dist/chat/tools/definition.d.ts +4 -0
  53. package/dist/chat/tools/delete-event-task.d.ts +57 -0
  54. package/dist/chat/tools/event-tasks.d.ts +5 -0
  55. package/dist/chat/tools/handoff/tool.d.ts +0 -16
  56. package/dist/chat/tools/list-event-tasks.d.ts +55 -0
  57. package/dist/chat/tools/list-resource-event-subscriptions.d.ts +42 -0
  58. package/dist/chat/tools/query-conversation-events.d.ts +0 -16
  59. package/dist/chat/tools/resource-events.d.ts +2 -1
  60. package/dist/chat/tools/runtime/report-progress.d.ts +0 -16
  61. package/dist/chat/tools/sandbox/edit-file.d.ts +0 -23
  62. package/dist/chat/tools/sandbox/file-utils.d.ts +2 -17
  63. package/dist/chat/tools/sandbox/find-files.d.ts +5 -8
  64. package/dist/chat/tools/sandbox/grep.d.ts +1 -4
  65. package/dist/chat/tools/sandbox/list-dir.d.ts +1 -4
  66. package/dist/chat/tools/search-resource-event-types.d.ts +44 -0
  67. package/dist/chat/tools/search-tools.d.ts +0 -16
  68. package/dist/chat/tools/skill/load-skill.d.ts +0 -20
  69. package/dist/chat/tools/skill/search-mcp-tools.d.ts +0 -16
  70. package/dist/chat/tools/stop-watching-resources.d.ts +28 -0
  71. package/dist/chat/tools/system-time.d.ts +0 -16
  72. package/dist/chat/tools/types.d.ts +8 -4
  73. package/dist/chat/tools/update-event-task.d.ts +66 -0
  74. package/dist/chat/tools/watch-resource-events.d.ts +59 -0
  75. package/dist/chat/tools/web/fetch-content.d.ts +0 -2
  76. package/dist/chat/tools/web/fetch-tool.d.ts +0 -16
  77. package/dist/chat/tools/web/image-generate.d.ts +0 -16
  78. package/dist/chat/tools/web/search.d.ts +0 -16
  79. package/dist/{chunk-QVSYR5CV.js → chunk-2HTHX6XV.js} +4 -4
  80. package/dist/{chunk-Y2QRKPI7.js → chunk-3PKF6YNU.js} +1 -1
  81. package/dist/{chunk-GLNB2R42.js → chunk-5KKIBIIP.js} +12 -12
  82. package/dist/{chunk-W3U3YQYI.js → chunk-77VDLF3Z.js} +18 -1
  83. package/dist/{chunk-YZHA2L7P.js → chunk-A76LKS5W.js} +230 -102
  84. package/dist/{chunk-6ZBSTNYN.js → chunk-AFJF3RGU.js} +9 -0
  85. package/dist/{chunk-PD6J33TO.js → chunk-B6E3YA2H.js} +1 -1
  86. package/dist/{chunk-S4LM6UB7.js → chunk-B7FPRGUJ.js} +3 -3
  87. package/dist/{chunk-R3GXQJEE.js → chunk-BY43CEXN.js} +2 -2
  88. package/dist/{chunk-HDSDCEPK.js → chunk-EPBBYMNE.js} +1 -1
  89. package/dist/{chunk-YFE6VNHU.js → chunk-FJEIX3AH.js} +2 -2
  90. package/dist/{chunk-F2ARYRKC.js → chunk-G6XQODHM.js} +1 -1
  91. package/dist/{chunk-KBW6J5GA.js → chunk-HBFQLSGV.js} +4 -4
  92. package/dist/{chunk-YUPNY2HZ.js → chunk-JDCPDJ54.js} +2 -2
  93. package/dist/{chunk-WIIPHGJY.js → chunk-K5ZB3WWH.js} +2 -2
  94. package/dist/{chunk-OG6E44DH.js → chunk-KNRODVH2.js} +6 -6
  95. package/dist/{chunk-W3JHZHAN.js → chunk-KTGJAWRO.js} +1 -1
  96. package/dist/{chunk-7VF3JAVF.js → chunk-NHWE6Y7G.js} +7 -7
  97. package/dist/{chunk-HXWOZ4HG.js → chunk-OLGB5Y7R.js} +2 -2
  98. package/dist/{chunk-QMK2VF6K.js → chunk-PBWUUVVG.js} +1 -1
  99. package/dist/{chunk-7ZMY4GCG.js → chunk-RYWMDDWK.js} +1 -1
  100. package/dist/{chunk-S4PUICSB.js → chunk-SHMHHXD5.js} +34 -5
  101. package/dist/{chunk-JKV244BI.js → chunk-WZ365SQC.js} +1 -1
  102. package/dist/{chunk-SD2VFSN6.js → chunk-YY6CVET7.js} +1428 -1116
  103. package/dist/{chunk-U36WL4OL.js → chunk-Z4KTQMWW.js} +1 -1
  104. package/dist/cli/chat.js +27 -27
  105. package/dist/cli/check.js +7 -7
  106. package/dist/cli/plugins.js +13 -13
  107. package/dist/cli/snapshot-create.js +10 -10
  108. package/dist/cli/upgrade.js +8 -8
  109. package/dist/db/schema/event-tasks.d.ts +161 -0
  110. package/dist/db/schema.d.ts +163 -1
  111. package/dist/{db-FQID26JW.js → db-FYJYPAKG.js} +7 -7
  112. package/dist/instrumentation.js +4 -4
  113. package/dist/nitro.js +2 -2
  114. package/dist/{oauth-callback-server-Z5MHHKFD.js → oauth-callback-server-W3PPIHCS.js} +18 -18
  115. package/dist/{runner-PGPGKYSF.js → runner-5NOFUYKR.js} +11 -11
  116. package/dist/{sandbox-egress-signals-CDFAP67O.js → sandbox-egress-signals-A5HWIQH4.js} +2 -2
  117. package/dist/{skills-BCQHR636.js → skills-ENIBKF5V.js} +7 -7
  118. package/dist/{validation-QP3FYBLZ.js → validation-BHLBOO6K.js} +7 -7
  119. package/dist/version.js +1 -1
  120. package/migrations/0015_magical_ezekiel_stane.sql +11 -0
  121. package/migrations/meta/0015_snapshot.json +1360 -0
  122. package/migrations/meta/_journal.json +7 -0
  123. package/package.json +5 -5
  124. package/dist/chat/plugins/viewer-actors.d.ts +0 -6
@@ -16,17 +16,17 @@ import {
16
16
  instructionProvenanceFor,
17
17
  sanitizePostgresJson,
18
18
  withConversationEventLock
19
- } from "./chunk-S4LM6UB7.js";
19
+ } from "./chunk-B7FPRGUJ.js";
20
20
  import {
21
21
  getStateAdapter,
22
22
  sleep
23
- } from "./chunk-F2ARYRKC.js";
23
+ } from "./chunk-G6XQODHM.js";
24
24
  import {
25
25
  botConfig,
26
26
  escapeXml,
27
27
  resolveGatewayModel,
28
28
  unwrapCurrentInstruction
29
- } from "./chunk-WIIPHGJY.js";
29
+ } from "./chunk-K5ZB3WWH.js";
30
30
  import {
31
31
  toStoredSlackActor
32
32
  } from "./chunk-HZF5P5UN.js";
@@ -41,7 +41,7 @@ import {
41
41
  setSpanAttributes,
42
42
  toOptionalNumber,
43
43
  toOptionalString
44
- } from "./chunk-PD6J33TO.js";
44
+ } from "./chunk-B6E3YA2H.js";
45
45
 
46
46
  // src/chat/turn-context-tag.ts
47
47
  var TURN_CONTEXT_TAG = "runtime-turn-context";
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-UTL3MHPC.js";
4
4
  import {
5
5
  parseSlackThreadId
6
- } from "./chunk-QMK2VF6K.js";
6
+ } from "./chunk-PBWUUVVG.js";
7
7
  import {
8
8
  normalizeSlackConversationId
9
- } from "./chunk-YZHA2L7P.js";
9
+ } from "./chunk-A76LKS5W.js";
10
10
 
11
11
  // src/handlers/health.ts
12
12
  function readHealthReport() {
@@ -3,7 +3,7 @@ import {
3
3
  toCanonicalInputMessage,
4
4
  toCanonicalOutputMessage,
5
5
  toGenAiMessagesTraceAttributes
6
- } from "./chunk-U36WL4OL.js";
6
+ } from "./chunk-Z4KTQMWW.js";
7
7
  import {
8
8
  extractGenAiUsageAttributes,
9
9
  logException,
@@ -11,7 +11,7 @@ import {
11
11
  normalizeGenAiFinishReason,
12
12
  serializeGenAiAttribute,
13
13
  withSpan
14
- } from "./chunk-PD6J33TO.js";
14
+ } from "./chunk-B6E3YA2H.js";
15
15
 
16
16
  // src/chat/config.ts
17
17
  import { getModel as getModel2 } from "@earendil-works/pi-ai/compat";
@@ -22,7 +22,7 @@ import {
22
22
  persistThreadStateById,
23
23
  stripRuntimeTurnContext,
24
24
  updateConversationStats
25
- } from "./chunk-KBW6J5GA.js";
25
+ } from "./chunk-HBFQLSGV.js";
26
26
  import {
27
27
  createPluginConversationEvents,
28
28
  createPluginEmbedder,
@@ -30,26 +30,26 @@ import {
30
30
  createPluginModel,
31
31
  createPluginState,
32
32
  getPlugins
33
- } from "./chunk-YZHA2L7P.js";
33
+ } from "./chunk-A76LKS5W.js";
34
34
  import {
35
35
  getDb,
36
36
  sameActorIdentity
37
- } from "./chunk-S4LM6UB7.js";
37
+ } from "./chunk-B7FPRGUJ.js";
38
38
  import {
39
39
  getStateAdapter
40
- } from "./chunk-F2ARYRKC.js";
40
+ } from "./chunk-G6XQODHM.js";
41
41
  import {
42
42
  ProviderError,
43
43
  findProviderError,
44
44
  getProviderErrorAttributes,
45
45
  getProviderErrorUserMessage
46
- } from "./chunk-WIIPHGJY.js";
46
+ } from "./chunk-K5ZB3WWH.js";
47
47
  import {
48
48
  parseSlackMessageTs
49
49
  } from "./chunk-F3B2YJ76.js";
50
50
  import {
51
51
  buildTurnFailureResponse
52
- } from "./chunk-PD6J33TO.js";
52
+ } from "./chunk-B6E3YA2H.js";
53
53
 
54
54
  // src/chat/runtime/delivered-turn-state.ts
55
55
  function buildDeliveredTurnStatePatch(args) {
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@sentry/junior",
4
- version: "0.126.1",
4
+ version: "0.128.0",
5
5
  private: false,
6
6
  publishConfig: {
7
7
  access: "public"
@@ -6,25 +6,25 @@ import {
6
6
  isDmChannel,
7
7
  normalizeSlackConversationId,
8
8
  withSlackRetries
9
- } from "./chunk-YZHA2L7P.js";
9
+ } from "./chunk-A76LKS5W.js";
10
10
  import {
11
11
  getDb,
12
12
  parseDestination
13
- } from "./chunk-S4LM6UB7.js";
13
+ } from "./chunk-B7FPRGUJ.js";
14
14
  import {
15
15
  acquireActiveLock,
16
16
  getStateAdapter,
17
17
  sleep
18
- } from "./chunk-F2ARYRKC.js";
18
+ } from "./chunk-G6XQODHM.js";
19
19
  import {
20
20
  normalizeSlackEmojiName
21
- } from "./chunk-WIIPHGJY.js";
21
+ } from "./chunk-K5ZB3WWH.js";
22
22
  import {
23
23
  pluginCatalogRuntime
24
- } from "./chunk-JKV244BI.js";
24
+ } from "./chunk-WZ365SQC.js";
25
25
  import {
26
26
  fetchWithBoundedOAuthErrorBodies
27
- } from "./chunk-HXWOZ4HG.js";
27
+ } from "./chunk-OLGB5Y7R.js";
28
28
  import {
29
29
  parseSlackMessageTs,
30
30
  parseSlackUserId
@@ -33,7 +33,7 @@ import {
33
33
  isRecord,
34
34
  logInfo,
35
35
  logWarn
36
- } from "./chunk-PD6J33TO.js";
36
+ } from "./chunk-B6E3YA2H.js";
37
37
 
38
38
  // src/chat/capabilities/router.ts
39
39
  var ProviderCredentialRouter = class {
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  credentialUserSubjectId
3
- } from "./chunk-W3U3YQYI.js";
3
+ } from "./chunk-77VDLF3Z.js";
4
4
  import {
5
5
  logInfo,
6
6
  logWarn,
7
7
  setSpanAttributes
8
- } from "./chunk-PD6J33TO.js";
8
+ } from "./chunk-B6E3YA2H.js";
9
9
  import {
10
10
  discoverInstalledPluginPackageContent,
11
11
  normalizePluginPackageNames
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-F3B2YJ76.js";
6
6
  import {
7
7
  toOptionalString
8
- } from "./chunk-PD6J33TO.js";
8
+ } from "./chunk-B6E3YA2H.js";
9
9
 
10
10
  // src/chat/slack/context.ts
11
11
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  JUNIOR_VERSION
3
- } from "./chunk-W3JHZHAN.js";
3
+ } from "./chunk-KTGJAWRO.js";
4
4
 
5
5
  // src/deployment.ts
6
6
  var JUNIOR_HEARTBEAT_ROUTE = "/api/internal/heartbeat";
@@ -274,15 +274,42 @@ var juniorConversationEvents = pgTable6(
274
274
  ]
275
275
  );
276
276
 
277
+ // src/db/schema/event-tasks.ts
278
+ import { bigint, index as index5, jsonb as jsonb5, pgTable as pgTable7, text as text7 } from "drizzle-orm/pg-core";
279
+ var juniorEventTasks = pgTable7(
280
+ "junior_event_tasks",
281
+ {
282
+ id: text7("id").primaryKey(),
283
+ teamId: text7("team_id").notNull(),
284
+ namespace: text7("namespace").notNull(),
285
+ identifier: text7("identifier").notNull(),
286
+ createdAtMs: bigint("created_at_ms", { mode: "number" }).notNull(),
287
+ task: jsonb5("task_json").$type().notNull()
288
+ },
289
+ (table) => [
290
+ index5("junior_event_tasks_team_idx").on(
291
+ table.teamId,
292
+ table.createdAtMs,
293
+ table.id
294
+ ),
295
+ index5("junior_event_tasks_match_idx").on(
296
+ table.namespace,
297
+ table.identifier,
298
+ table.createdAtMs,
299
+ table.id
300
+ )
301
+ ]
302
+ );
303
+
277
304
  // src/db/schema/stats.ts
278
- import { date, integer as integer3, pgTable as pgTable7, primaryKey as primaryKey3, text as text7 } from "drizzle-orm/pg-core";
279
- var juniorStats = pgTable7(
305
+ import { date, integer as integer3, pgTable as pgTable8, primaryKey as primaryKey3, text as text8 } from "drizzle-orm/pg-core";
306
+ var juniorStats = pgTable8(
280
307
  "junior_stats",
281
308
  {
282
309
  date: date("date", { mode: "string" }).notNull(),
283
- namespace: text7("namespace").notNull(),
284
- metric: text7("metric").notNull(),
285
- name: text7("name").notNull(),
310
+ namespace: text8("namespace").notNull(),
311
+ metric: text8("metric").notNull(),
312
+ name: text8("name").notNull(),
286
313
  count: integer3("count").notNull().default(0)
287
314
  },
288
315
  (table) => [
@@ -300,6 +327,7 @@ var juniorSqlSchema = {
300
327
  juniorConversationEvents,
301
328
  juniorConversations,
302
329
  juniorDestinations,
330
+ juniorEventTasks,
303
331
  juniorIdentities,
304
332
  juniorStats,
305
333
  juniorUsers
@@ -552,6 +580,7 @@ export {
552
580
  juniorConversationAnnotations,
553
581
  juniorApiTokens,
554
582
  juniorConversationEvents,
583
+ juniorEventTasks,
555
584
  juniorStats,
556
585
  createJuniorSqlExecutor
557
586
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createPluginCatalogRuntime
3
- } from "./chunk-HXWOZ4HG.js";
3
+ } from "./chunk-OLGB5Y7R.js";
4
4
 
5
5
  // src/chat/plugins/catalog-runtime.ts
6
6
  var pluginCatalogRuntime = createPluginCatalogRuntime();