@sentry/junior 0.182.0 → 0.184.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 (98) hide show
  1. package/dist/{agent-hooks-3S25UIHO.js → agent-hooks-XTZVALGQ.js} +11 -11
  2. package/dist/api/acp/auth.d.ts +46 -0
  3. package/dist/api/acp/authorization-page.d.ts +11 -0
  4. package/dist/api/acp/conversations.d.ts +70 -0
  5. package/dist/api/acp/errors.d.ts +6 -0
  6. package/dist/api/acp/route.d.ts +16 -0
  7. package/dist/api/acp/schema.d.ts +97 -0
  8. package/dist/api/acp/sleep.d.ts +2 -0
  9. package/dist/api/acp/state.d.ts +22 -0
  10. package/dist/api/acp/transport.d.ts +113 -0
  11. package/dist/api/code/overview.d.ts +35 -0
  12. package/dist/api/code/routes.d.ts +4 -0
  13. package/dist/api/schema/code.d.ts +75 -0
  14. package/dist/api/schema.d.ts +2 -0
  15. package/dist/api/schema.js +9 -1
  16. package/dist/api.js +258 -134
  17. package/dist/app.d.ts +0 -4
  18. package/dist/app.js +2171 -220
  19. package/dist/{catalog-runtime-ESLMBQBV.js → catalog-runtime-5357XR4F.js} +4 -4
  20. package/dist/chat/agent-invocations/store.d.ts +4 -2
  21. package/dist/chat/agent-invocations/work.d.ts +1 -3
  22. package/dist/chat/app/factory.d.ts +3 -3
  23. package/dist/chat/app/services.d.ts +3 -3
  24. package/dist/chat/code/publisher.d.ts +3 -0
  25. package/dist/chat/code/store.d.ts +9 -0
  26. package/dist/chat/event-tasks/store.d.ts +10 -0
  27. package/dist/chat/ingress/slack-webhook.d.ts +1 -1
  28. package/dist/chat/plugins/agent-hooks.d.ts +5 -0
  29. package/dist/chat/{runtime/slack-runtime.d.ts → providers/slack/runtime.d.ts} +2 -2
  30. package/dist/chat/{runtime/reply-executor.d.ts → providers/slack/turn.d.ts} +10 -9
  31. package/dist/chat/resource-events/store.d.ts +12 -0
  32. package/dist/chat/runtime/turn-execution.d.ts +30 -0
  33. package/dist/chat/slack/dispatch-turn.d.ts +12 -14
  34. package/dist/chat/task-execution/slack-work.d.ts +1 -1
  35. package/dist/{chunk-SXOZIG5X.js → chunk-2ZQPVX7C.js} +6 -6
  36. package/dist/{chunk-UQP54CXZ.js → chunk-3S7ULUWW.js} +1 -1
  37. package/dist/{chunk-2CEOXDG2.js → chunk-4CNDGK25.js} +174 -6
  38. package/dist/{chunk-3THPTNN6.js → chunk-4RONS3WR.js} +4 -4
  39. package/dist/{chunk-LHQK5XCU.js → chunk-6UDPINOX.js} +2 -2
  40. package/dist/{chunk-BZD4ADQH.js → chunk-6VOYP4M6.js} +2 -3
  41. package/dist/{chunk-QHALFHZA.js → chunk-6WGC3SO4.js} +9 -9
  42. package/dist/{chunk-BDDWVY32.js → chunk-ACPDVEJO.js} +22 -20
  43. package/dist/{chunk-44BQ3TSK.js → chunk-BCHYQS4B.js} +233 -173
  44. package/dist/{chunk-SVFSYQMT.js → chunk-BHYRYYLY.js} +1 -1
  45. package/dist/{chunk-LT4QYGKM.js → chunk-BT53RIGJ.js} +160 -97
  46. package/dist/{chunk-Z7ALSQS3.js → chunk-DUKIDPF6.js} +1 -1
  47. package/dist/{chunk-PQES5LB5.js → chunk-E57WPXWY.js} +5 -5
  48. package/dist/{chunk-GGYA5NPN.js → chunk-FKEZZMXS.js} +8 -8
  49. package/dist/{chunk-LB4FWMCV.js → chunk-HIPUIPJM.js} +183 -155
  50. package/dist/{chunk-3NFHI2NA.js → chunk-HUXFMDBZ.js} +1 -1
  51. package/dist/{chunk-6TSWXBTQ.js → chunk-IZDYYYGP.js} +3 -3
  52. package/dist/{chunk-YHL2L2ZZ.js → chunk-JA43DV4Y.js} +1 -1
  53. package/dist/{chunk-V5UZCCNW.js → chunk-JM2COLGC.js} +6 -6
  54. package/dist/{chunk-A7THOQ6N.js → chunk-JNO2GUDS.js} +21 -21
  55. package/dist/{chunk-KGMHUDVF.js → chunk-K7VDC2QW.js} +6 -6
  56. package/dist/{chunk-CVBIM4Z3.js → chunk-LCP4EDKR.js} +1 -1
  57. package/dist/{chunk-4DZ62L36.js → chunk-LHXIZLFF.js} +1 -1
  58. package/dist/{chunk-D6OHGAIO.js → chunk-M5YWNMTE.js} +5 -5
  59. package/dist/{chunk-3ENUMZNG.js → chunk-MAPJFUMV.js} +3 -3
  60. package/dist/{chunk-UUMBHORH.js → chunk-MLSQX2EX.js} +1 -1
  61. package/dist/{chunk-WOIALVN2.js → chunk-PJPRXO2T.js} +1 -1
  62. package/dist/{chunk-VHMAFMHB.js → chunk-QABCY33S.js} +1 -1
  63. package/dist/{chunk-UKIHNBBD.js → chunk-SHJK75Z2.js} +3 -3
  64. package/dist/{chunk-S35OZMSL.js → chunk-UBOIHNTH.js} +13 -13
  65. package/dist/{chunk-DZR3L74W.js → chunk-UF6BUA5W.js} +3 -3
  66. package/dist/{chunk-JIOKUIAS.js → chunk-WQFEWULF.js} +2 -2
  67. package/dist/chunk-WVIA7V3M.js +975 -0
  68. package/dist/{chunk-MJISSOWB.js → chunk-YKX6MTLU.js} +1 -1
  69. package/dist/{chunk-TEFNHMO2.js → chunk-Z3QAXJR7.js} +4 -4
  70. package/dist/cli/chat.js +33 -35
  71. package/dist/cli/check.js +5 -5
  72. package/dist/cli/plugins.js +12 -12
  73. package/dist/cli/snapshot-create.js +9 -9
  74. package/dist/cli/upgrade.js +6 -6
  75. package/dist/db/schema/code.d.ts +367 -0
  76. package/dist/db/schema.d.ts +367 -1
  77. package/dist/{db-NYIWZ4L5.js → db-MA52H62H.js} +6 -6
  78. package/dist/instrumentation.js +3 -3
  79. package/dist/nitro.js +6 -6
  80. package/dist/{oauth-callback-server-A2YTPVVX.js → oauth-callback-server-DXGHKN6S.js} +25 -25
  81. package/dist/{runner-VKAEU52J.js → runner-4IXUAQNK.js} +18 -18
  82. package/dist/{skills-52GMXUTY.js → skills-X3DY7AXO.js} +5 -5
  83. package/dist/spawn-43WGS6CH.js +37 -0
  84. package/dist/task-runner-VDRKITPV.js +32 -0
  85. package/dist/{validation-VD2YQX2W.js → validation-Z6JXSTJS.js} +5 -5
  86. package/dist/version.js +1 -1
  87. package/dist/{work-ZWBTGEQP.js → work-OKWRFBDW.js} +18 -18
  88. package/dist/worker-B236AE72.js +22 -0
  89. package/migrations/0036_complex_rage.sql +32 -0
  90. package/migrations/meta/0036_snapshot.json +3186 -0
  91. package/migrations/meta/_journal.json +8 -1
  92. package/package.json +6 -7
  93. package/dist/app-adapter.d.ts +0 -85
  94. package/dist/chat/api-turns/adapter-conversations.d.ts +0 -15
  95. package/dist/chunk-CZYNWPWD.js +0 -930
  96. package/dist/spawn-GSS4EBLR.js +0 -37
  97. package/dist/task-runner-DUGDWF5O.js +0 -32
  98. package/dist/worker-XUWD5WS7.js +0 -22
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@sentry/junior",
4
- version: "0.182.0",
4
+ version: "0.184.0",
5
5
  private: false,
6
6
  publishConfig: {
7
7
  access: "public"
@@ -69,6 +69,7 @@ var package_default = {
69
69
  "test:coverage": "vitest run --maxWorkers=4 --coverage --reporter=default --reporter=junit --outputFile.junit=coverage/results.junit.xml"
70
70
  },
71
71
  dependencies: {
72
+ "@agentclientprotocol/sdk": "1.3.0",
72
73
  "@ai-sdk/gateway": "^3.0.119",
73
74
  "@chat-adapter/slack": "4.29.0",
74
75
  "@chat-adapter/state-memory": "4.29.0",
@@ -104,13 +105,11 @@ var package_default = {
104
105
  zod: "catalog:"
105
106
  },
106
107
  devDependencies: {
107
- "@agentclientprotocol/sdk": "1.3.0",
108
108
  "@emnapi/core": "^1.10.0",
109
109
  "@emnapi/runtime": "^1.10.0",
110
110
  "@hono/node-server": "1.19.14",
111
111
  "@oxlint/plugins": "1.79.0",
112
112
  "@sentry/junior-github": "workspace:*",
113
- "@sentry/junior-acp": "workspace:*",
114
113
  "@sentry/junior-memory": "workspace:*",
115
114
  "@sentry/junior-testing": "workspace:*",
116
115
  "@types/node": "^25.9.1",
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  coerceThreadConversationState,
3
3
  getPersistedThreadState
4
- } from "./chunk-PQES5LB5.js";
4
+ } from "./chunk-E57WPXWY.js";
5
5
  import {
6
6
  pluginTaskId,
7
7
  pluginTaskParamsSchema,
8
8
  sendVercelPluginTask
9
- } from "./chunk-DZR3L74W.js";
9
+ } from "./chunk-UF6BUA5W.js";
10
10
  import {
11
11
  getPiMessageRole,
12
12
  getTurnRecord,
@@ -16,7 +16,7 @@ import {
16
16
  isToolResultMessage,
17
17
  normalizeToolNameFromResult,
18
18
  stripRuntimeTurnContext
19
- } from "./chunk-SXOZIG5X.js";
19
+ } from "./chunk-2ZQPVX7C.js";
20
20
  import {
21
21
  createPluginConversationEvents,
22
22
  createPluginEmbedder,
@@ -25,7 +25,7 @@ import {
25
25
  createPluginState,
26
26
  getPlugins,
27
27
  readActorIdentity
28
- } from "./chunk-2CEOXDG2.js";
28
+ } from "./chunk-4CNDGK25.js";
29
29
  import {
30
30
  JUNIOR_THREAD_STATE_TTL_MS
31
31
  } from "./chunk-3Y47VMHV.js";
@@ -33,14 +33,14 @@ import {
33
33
  getConversationStore,
34
34
  getDb,
35
35
  sameActorIdentity
36
- } from "./chunk-6TSWXBTQ.js";
36
+ } from "./chunk-IZDYYYGP.js";
37
37
  import {
38
38
  juniorConversations,
39
39
  juniorTaskExecutions
40
- } from "./chunk-44BQ3TSK.js";
40
+ } from "./chunk-BCHYQS4B.js";
41
41
  import {
42
42
  getStateAdapter
43
- } from "./chunk-Z7ALSQS3.js";
43
+ } from "./chunk-DUKIDPF6.js";
44
44
  import {
45
45
  credentialSubjectSchema
46
46
  } from "./chunk-CEMMLV5L.js";
@@ -49,14 +49,14 @@ import {
49
49
  } from "./chunk-N7TMSOZH.js";
50
50
  import {
51
51
  logWarn
52
- } from "./chunk-UQP54CXZ.js";
52
+ } from "./chunk-3S7ULUWW.js";
53
53
 
54
54
  // src/chat/plugins/task-runner.ts
55
55
  import { pluginRunContextSchema } from "@sentry/junior-plugin-api";
56
56
 
57
57
  // src/chat/services/turn-session-routing.ts
58
58
  async function resolveTurnSessionRouting(args) {
59
- const conversationStore = args.conversationStore ?? (await import("./db-NYIWZ4L5.js")).getConversationStore();
59
+ const conversationStore = args.conversationStore ?? (await import("./db-MA52H62H.js")).getConversationStore();
60
60
  const conversation = await conversationStore.get({
61
61
  conversationId: args.conversationId
62
62
  });
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  buildSentryConversationUrl,
6
6
  deleteWebAuthorization
7
- } from "./chunk-CVBIM4Z3.js";
7
+ } from "./chunk-LCP4EDKR.js";
8
8
  import {
9
9
  buildDeliveredTurnStatePatch,
10
10
  finalizeFailedTurnReplyWithEvent,
@@ -15,11 +15,11 @@ import {
15
15
  getTurnUserSlackMessageTs,
16
16
  persistAuthPauseTurnState,
17
17
  requireTurnFailureEventId
18
- } from "./chunk-D6OHGAIO.js";
18
+ } from "./chunk-M5YWNMTE.js";
19
19
  import {
20
20
  resolveTurnSessionRouting,
21
21
  scheduleSessionCompletedPluginTasks
22
- } from "./chunk-QHALFHZA.js";
22
+ } from "./chunk-6WGC3SO4.js";
23
23
  import {
24
24
  ConversationTurnLifecycleService
25
25
  } from "./chunk-M3QYTBQ6.js";
@@ -30,7 +30,7 @@ import {
30
30
  getPersistedSandboxState,
31
31
  getPersistedThreadState,
32
32
  persistThreadStateById
33
- } from "./chunk-PQES5LB5.js";
33
+ } from "./chunk-E57WPXWY.js";
34
34
  import {
35
35
  createUserTokenStore,
36
36
  deleteMcpAuthSession,
@@ -41,7 +41,7 @@ import {
41
41
  lookupSlackUserProfile,
42
42
  resolvePluginOAuthAccount,
43
43
  runAgentWithTimeout
44
- } from "./chunk-GGYA5NPN.js";
44
+ } from "./chunk-FKEZZMXS.js";
45
45
  import {
46
46
  RetryableDeliveryError
47
47
  } from "./chunk-RF6J3DIO.js";
@@ -57,17 +57,17 @@ import {
57
57
  removeReactionFromMessage,
58
58
  resolveBaseUrl,
59
59
  truncateStatusText
60
- } from "./chunk-V5UZCCNW.js";
60
+ } from "./chunk-JM2COLGC.js";
61
61
  import {
62
62
  parseSlackThreadId,
63
63
  readSlackRawMessageContext,
64
64
  resolveSlackChannelIdFromMessage,
65
65
  resolveSlackChannelIdFromThreadId
66
- } from "./chunk-MJISSOWB.js";
66
+ } from "./chunk-YKX6MTLU.js";
67
67
  import {
68
68
  ensureConversationWake,
69
69
  requestConversationWork
70
- } from "./chunk-TEFNHMO2.js";
70
+ } from "./chunk-Z3QAXJR7.js";
71
71
  import {
72
72
  CooperativeTurnYieldError,
73
73
  clearPendingAuth,
@@ -76,7 +76,7 @@ import {
76
76
  isCooperativeTurnYieldError,
77
77
  isPendingAuthLatestRequest,
78
78
  markTurnFailed
79
- } from "./chunk-YHL2L2ZZ.js";
79
+ } from "./chunk-JA43DV4Y.js";
80
80
  import {
81
81
  TurnSliceLimitExceededError,
82
82
  abandonTurnRecord,
@@ -96,13 +96,13 @@ import {
96
96
  recordTurnSummary,
97
97
  saveTurnCheckpoint,
98
98
  turnHasReply
99
- } from "./chunk-SXOZIG5X.js";
99
+ } from "./chunk-2ZQPVX7C.js";
100
100
  import {
101
101
  getVercelConversationWorkQueue
102
102
  } from "./chunk-DKIJ2RP5.js";
103
103
  import {
104
104
  getTurnRequestDeadline
105
- } from "./chunk-UUMBHORH.js";
105
+ } from "./chunk-MLSQX2EX.js";
106
106
  import {
107
107
  SlackActionError,
108
108
  getDashboardConversationLink,
@@ -111,18 +111,18 @@ import {
111
111
  getSlackClient,
112
112
  isDmChannel,
113
113
  normalizeSlackConversationId
114
- } from "./chunk-2CEOXDG2.js";
114
+ } from "./chunk-4CNDGK25.js";
115
115
  import {
116
116
  getConversationEventStore,
117
117
  getSqlExecutor,
118
118
  requireSlackDestination,
119
119
  upsertIdentity,
120
120
  upsertLinkedIdentity
121
- } from "./chunk-6TSWXBTQ.js";
121
+ } from "./chunk-IZDYYYGP.js";
122
122
  import {
123
123
  acquireActiveLock,
124
124
  getStateAdapter
125
- } from "./chunk-Z7ALSQS3.js";
125
+ } from "./chunk-DUKIDPF6.js";
126
126
  import {
127
127
  botConfig,
128
128
  defaultModelId,
@@ -130,18 +130,18 @@ import {
130
130
  getChatConfig,
131
131
  getRuntimeMetadata,
132
132
  normalizeSlackEmojiName
133
- } from "./chunk-LHQK5XCU.js";
133
+ } from "./chunk-6UDPINOX.js";
134
134
  import {
135
135
  discoverSkills
136
- } from "./chunk-JIOKUIAS.js";
136
+ } from "./chunk-WQFEWULF.js";
137
137
  import {
138
138
  pluginCatalogRuntime
139
- } from "./chunk-WOIALVN2.js";
139
+ } from "./chunk-PJPRXO2T.js";
140
140
  import {
141
141
  buildOAuthTokenRequest,
142
142
  hasRequiredOAuthScope,
143
143
  parseOAuthTokenResponse
144
- } from "./chunk-4DZ62L36.js";
144
+ } from "./chunk-LHXIZLFF.js";
145
145
  import {
146
146
  createSlackResumeActor,
147
147
  isUserActor,
@@ -160,7 +160,7 @@ import {
160
160
  setTags,
161
161
  toOptionalString,
162
162
  withLogContext
163
- } from "./chunk-UQP54CXZ.js";
163
+ } from "./chunk-3S7ULUWW.js";
164
164
 
165
165
  // src/chat/slack/assistant-thread/status-render.ts
166
166
  var DEFAULT_STATUS_CONTEXTS = {
@@ -789,6 +789,7 @@ async function sendSlackReply(args) {
789
789
  replyAttribution: args.replyAttribution
790
790
  });
791
791
  const messageTs = [];
792
+ let threadTs = args.threadTs;
792
793
  for (const [index, text] of chunks.entries()) {
793
794
  const isFinalChunk = index === chunks.length - 1;
794
795
  const blocks = buildSlackReplyBlocks(
@@ -800,12 +801,13 @@ async function sendSlackReply(args) {
800
801
  ${escapeSlackMrkdwnText(formatReplyAttribution(args.replyAttribution))}` : text;
801
802
  const response = await postSlackMessage({
802
803
  channelId: args.channelId,
803
- threadTs: args.threadTs,
804
+ threadTs,
804
805
  text: fallbackText,
805
806
  ...blocks ? { blocks } : void 0
806
807
  });
807
808
  if (response.ts) {
808
809
  messageTs.push(response.ts);
810
+ threadTs ??= response.ts;
809
811
  }
810
812
  }
811
813
  return messageTs;