@sentry/junior 0.92.0 → 0.93.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 (30) hide show
  1. package/dist/{agent-hooks-BYSSWCNW.js → agent-hooks-ZG7IDOIN.js} +5 -5
  2. package/dist/api/people/list.js +3 -3
  3. package/dist/api/people/profile.js +3 -3
  4. package/dist/app.js +44 -15
  5. package/dist/chat/agent/tools.d.ts +2 -0
  6. package/dist/chat/pi/client.d.ts +1 -1
  7. package/dist/chat/pi/sdk.d.ts +7 -0
  8. package/dist/chat/plugins/agent-hooks.d.ts +2 -0
  9. package/dist/{chunk-H7KUZAMZ.js → chunk-6H4PP63X.js} +2 -2
  10. package/dist/{chunk-ZATRYQLR.js → chunk-7STN2ZSK.js} +1 -1
  11. package/dist/{chunk-OJP53WIU.js → chunk-HDNWZMUN.js} +3 -3
  12. package/dist/{chunk-7DVIELX3.js → chunk-JJUJ4CO2.js} +416 -415
  13. package/dist/{chunk-BMQ5DXHV.js → chunk-LE5ANBUZ.js} +2 -2
  14. package/dist/{chunk-N25HRI6B.js → chunk-LNCREA5Z.js} +2 -2
  15. package/dist/{chunk-ACJENBVF.js → chunk-MAVOJ54A.js} +7 -7
  16. package/dist/{chunk-3F54A3YM.js → chunk-NAPITCZ6.js} +12 -10
  17. package/dist/{chunk-NIFONS4W.js → chunk-NFXSLTYG.js} +1 -1
  18. package/dist/{chunk-TF5VLGA7.js → chunk-QGEWC27H.js} +2 -2
  19. package/dist/{chunk-7FS3K243.js → chunk-QL66APYJ.js} +4 -3
  20. package/dist/{chunk-OZJXGX4U.js → chunk-TNUUATT7.js} +1 -1
  21. package/dist/{chunk-VY7TVOIK.js → chunk-UUB3D2XI.js} +5 -3
  22. package/dist/{chunk-APIVR44P.js → chunk-YJ4OPVNA.js} +1 -1
  23. package/dist/cli/chat.js +13 -13
  24. package/dist/cli/plugins.js +5 -5
  25. package/dist/cli/snapshot-warmup.js +3 -3
  26. package/dist/cli/upgrade.js +5 -5
  27. package/dist/{db-GCK43OO3.js → db-YDN6AFJH.js} +2 -2
  28. package/dist/reporting.js +8 -8
  29. package/dist/{runner-XWTFA26U.js → runner-XAZPJNAQ.js} +8 -8
  30. package/package.json +8 -8
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getInterruptionMarker
3
- } from "./chunk-7FS3K243.js";
3
+ } from "./chunk-QL66APYJ.js";
4
4
  import {
5
5
  SANDBOX_DATA_ROOT,
6
6
  SANDBOX_WORKSPACE_ROOT,
@@ -10,7 +10,7 @@ import {
10
10
  TURN_CONTEXT_TAG,
11
11
  botConfig,
12
12
  escapeXml
13
- } from "./chunk-3F54A3YM.js";
13
+ } from "./chunk-NAPITCZ6.js";
14
14
  import {
15
15
  logInfo,
16
16
  logWarn
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  normalizeSlackConversationId
3
- } from "./chunk-VY7TVOIK.js";
3
+ } from "./chunk-UUB3D2XI.js";
4
4
  import {
5
5
  getStateAdapter
6
- } from "./chunk-ZATRYQLR.js";
6
+ } from "./chunk-7STN2ZSK.js";
7
7
  import {
8
8
  parseSlackThreadId
9
9
  } from "./chunk-YYBX2BD5.js";
@@ -8,29 +8,29 @@ import {
8
8
  getPersistedThreadState,
9
9
  markTurnCompleted,
10
10
  mergeArtifactsState
11
- } from "./chunk-OJP53WIU.js";
11
+ } from "./chunk-HDNWZMUN.js";
12
12
  import {
13
13
  coerceThreadConversationState
14
14
  } from "./chunk-PFXC67GJ.js";
15
15
  import {
16
16
  getAgentTurnSessionRecord,
17
17
  getInterruptionMarker
18
- } from "./chunk-7FS3K243.js";
18
+ } from "./chunk-QL66APYJ.js";
19
19
  import {
20
20
  createPluginEmbedder,
21
21
  createPluginModel,
22
22
  getPlugins
23
- } from "./chunk-VY7TVOIK.js";
23
+ } from "./chunk-UUB3D2XI.js";
24
24
  import {
25
25
  createPluginLogger,
26
26
  createPluginState
27
- } from "./chunk-OZJXGX4U.js";
27
+ } from "./chunk-TNUUATT7.js";
28
28
  import {
29
29
  getStateAdapter
30
- } from "./chunk-ZATRYQLR.js";
30
+ } from "./chunk-7STN2ZSK.js";
31
31
  import {
32
32
  getDb
33
- } from "./chunk-NIFONS4W.js";
33
+ } from "./chunk-NFXSLTYG.js";
34
34
  import {
35
35
  GEN_AI_PROVIDER_NAME,
36
36
  botConfig,
@@ -42,7 +42,7 @@ import {
42
42
  normalizeToolNameFromResult,
43
43
  resolveGatewayModel,
44
44
  stripRuntimeTurnContext
45
- } from "./chunk-3F54A3YM.js";
45
+ } from "./chunk-NAPITCZ6.js";
46
46
  import {
47
47
  buildTurnFailureResponse,
48
48
  logWarn,
@@ -176,7 +176,7 @@ function stripRuntimeTurnContext(messages) {
176
176
  }
177
177
 
178
178
  // src/chat/config.ts
179
- import { getModel } from "@earendil-works/pi-ai";
179
+ import { getModel } from "@earendil-works/pi-ai/compat";
180
180
 
181
181
  // src/chat/optional-string.ts
182
182
  function toOptionalTrimmed(value) {
@@ -187,19 +187,21 @@ function toOptionalTrimmed(value) {
187
187
  return trimmed.length > 0 ? trimmed : void 0;
188
188
  }
189
189
 
190
- // src/chat/pi/client.ts
190
+ // src/chat/pi/sdk.ts
191
191
  import {
192
192
  completeSimple,
193
193
  getEnvApiKey,
194
194
  getModels,
195
195
  registerApiProvider
196
- } from "@earendil-works/pi-ai";
196
+ } from "@earendil-works/pi-ai/compat";
197
+ import {
198
+ stream,
199
+ streamSimple
200
+ } from "@earendil-works/pi-ai/api/anthropic-messages";
201
+
202
+ // src/chat/pi/client.ts
197
203
  import { createGatewayProvider } from "@ai-sdk/gateway";
198
204
  import { embedMany, generateObject } from "ai";
199
- import {
200
- streamAnthropic,
201
- streamSimpleAnthropic
202
- } from "@earendil-works/pi-ai/anthropic";
203
205
 
204
206
  // src/chat/services/provider-retry.ts
205
207
  var PROVIDER_RETRY_DELAYS_MS = [2e3, 4e3, 8e3];
@@ -252,8 +254,8 @@ function nextProviderRetry(args) {
252
254
  // src/chat/pi/client.ts
253
255
  registerApiProvider({
254
256
  api: "anthropic-messages",
255
- stream: streamAnthropic,
256
- streamSimple: streamSimpleAnthropic
257
+ stream,
258
+ streamSimple
257
259
  });
258
260
  var GATEWAY_PROVIDER = "vercel-ai-gateway";
259
261
  var GEN_AI_PROVIDER_NAME = GATEWAY_PROVIDER;
@@ -641,7 +643,7 @@ var DEFAULT_FAST_MODEL_ID = getModel(
641
643
  ).id;
642
644
  var DEFAULT_ADVISOR_MODEL_ID = getModel(
643
645
  "vercel-ai-gateway",
644
- "openai/gpt-5.5"
646
+ "openai/gpt-5.6-sol"
645
647
  ).id;
646
648
  var DEFAULT_EMBEDDING_MODEL_ID = "openai/text-embedding-3-small";
647
649
  function validateGatewayModelId(raw) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-3F54A3YM.js";
3
+ } from "./chunk-NAPITCZ6.js";
4
4
  import {
5
5
  parseDestination,
6
6
  sameDestination
@@ -4,10 +4,10 @@ import {
4
4
  import {
5
5
  getDefaultRedisStateAdapterFor,
6
6
  getStateAdapter
7
- } from "./chunk-ZATRYQLR.js";
7
+ } from "./chunk-7STN2ZSK.js";
8
8
  import {
9
9
  getChatConfig
10
- } from "./chunk-3F54A3YM.js";
10
+ } from "./chunk-NAPITCZ6.js";
11
11
  import {
12
12
  parseDestination,
13
13
  sameDestination
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  getConnectedStateContext,
3
3
  getStateAdapter
4
- } from "./chunk-ZATRYQLR.js";
4
+ } from "./chunk-7STN2ZSK.js";
5
5
  import {
6
6
  getConversationStore
7
- } from "./chunk-NIFONS4W.js";
7
+ } from "./chunk-NFXSLTYG.js";
8
8
  import {
9
9
  getChatConfig
10
- } from "./chunk-3F54A3YM.js";
10
+ } from "./chunk-NAPITCZ6.js";
11
11
  import {
12
12
  parseDestination
13
13
  } from "./chunk-GHGPTPBL.js";
@@ -1353,6 +1353,7 @@ function getInterruptionMarker() {
1353
1353
 
1354
1354
  export {
1355
1355
  piContentMessageSchema,
1356
+ instructionActors,
1356
1357
  loadActivityEntries,
1357
1358
  loadProjection,
1358
1359
  loadProjectionWithProvenance,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getStateAdapter
3
- } from "./chunk-ZATRYQLR.js";
3
+ } from "./chunk-7STN2ZSK.js";
4
4
  import {
5
5
  logException,
6
6
  logInfo,
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  createPluginLogger,
3
3
  createPluginState
4
- } from "./chunk-OZJXGX4U.js";
4
+ } from "./chunk-TNUUATT7.js";
5
5
  import {
6
6
  SANDBOX_WORKSPACE_ROOT
7
7
  } from "./chunk-G3E7SCME.js";
8
8
  import {
9
9
  getDb
10
- } from "./chunk-NIFONS4W.js";
10
+ } from "./chunk-NFXSLTYG.js";
11
11
  import {
12
12
  botConfig,
13
13
  completeObject,
14
14
  embedTexts,
15
15
  getSlackBotToken
16
- } from "./chunk-3F54A3YM.js";
16
+ } from "./chunk-NAPITCZ6.js";
17
17
  import {
18
18
  isActorUserId,
19
19
  logInfo,
@@ -1367,6 +1367,7 @@ function createPluginHookRunner(input = {}) {
1367
1367
  async beforeToolExecute(tool) {
1368
1368
  let nextInput = { ...tool.input };
1369
1369
  const env = normalizeEnv(nextInput.env);
1370
+ const actors = input.actors?.() ?? (input.actor ? [input.actor] : []);
1370
1371
  for (const plugin of loaded) {
1371
1372
  const pluginName = plugin.manifest.name;
1372
1373
  const hook = plugin.hooks?.beforeToolExecute;
@@ -1378,6 +1379,7 @@ function createPluginHookRunner(input = {}) {
1378
1379
  await hook({
1379
1380
  ...basePluginContext(plugin),
1380
1381
  actor: input.actor,
1382
+ actors,
1381
1383
  tool: {
1382
1384
  name: tool.name,
1383
1385
  input: nextInput
@@ -4,7 +4,7 @@ import {
4
4
  juniorDestinations,
5
5
  juniorIdentities,
6
6
  juniorUsers
7
- } from "./chunk-NIFONS4W.js";
7
+ } from "./chunk-NFXSLTYG.js";
8
8
 
9
9
  // src/api/people/shared.ts
10
10
  import { and, asc, desc, eq, sql } from "drizzle-orm";
package/dist/cli/chat.js CHANGED
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  createAgentRunner,
3
3
  executeAgentRun
4
- } from "../chunk-7DVIELX3.js";
5
- import "../chunk-OJP53WIU.js";
4
+ } from "../chunk-JJUJ4CO2.js";
5
+ import "../chunk-HDNWZMUN.js";
6
6
  import "../chunk-PFXC67GJ.js";
7
- import "../chunk-H7KUZAMZ.js";
8
- import "../chunk-BMQ5DXHV.js";
9
- import "../chunk-7FS3K243.js";
7
+ import "../chunk-6H4PP63X.js";
8
+ import "../chunk-LE5ANBUZ.js";
9
+ import "../chunk-QL66APYJ.js";
10
10
  import {
11
11
  loadAppPluginSet
12
12
  } from "../chunk-Y2CM7HXH.js";
13
- import "../chunk-VY7TVOIK.js";
14
- import "../chunk-OZJXGX4U.js";
13
+ import "../chunk-UUB3D2XI.js";
14
+ import "../chunk-TNUUATT7.js";
15
15
  import "../chunk-G3E7SCME.js";
16
- import "../chunk-ZATRYQLR.js";
17
- import "../chunk-NIFONS4W.js";
18
- import "../chunk-3F54A3YM.js";
16
+ import "../chunk-7STN2ZSK.js";
17
+ import "../chunk-NFXSLTYG.js";
18
+ import "../chunk-NAPITCZ6.js";
19
19
  import "../chunk-YYBX2BD5.js";
20
20
  import "../chunk-GHGPTPBL.js";
21
21
  import "../chunk-YTNPU7I2.js";
@@ -147,10 +147,10 @@ async function configureLocalChatPlugins(pluginSet) {
147
147
  databaseModule
148
148
  ] = await Promise.all([
149
149
  import("../plugins-PZMDS7AT.js"),
150
- import("../agent-hooks-BYSSWCNW.js"),
150
+ import("../agent-hooks-ZG7IDOIN.js"),
151
151
  import("../catalog-runtime-NZHMSMYC.js"),
152
152
  import("../validation-KYAWETI4.js"),
153
- import("../db-GCK43OO3.js")
153
+ import("../db-YDN6AFJH.js")
154
154
  ]);
155
155
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
156
156
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -211,7 +211,7 @@ function newRunConversationId() {
211
211
  async function prepareLocalChatRun(io, pluginSet) {
212
212
  defaultStateAdapterForLocalChat();
213
213
  await configureLocalChatPlugins(pluginSet);
214
- const { runLocalAgentTurn } = await import("../runner-XWTFA26U.js");
214
+ const { runLocalAgentTurn } = await import("../runner-XAZPJNAQ.js");
215
215
  const deps = {
216
216
  agentRunner: createAgentRunner(executeAgentRun),
217
217
  deliverReply: async (reply) => {
@@ -13,16 +13,16 @@ import {
13
13
  import {
14
14
  setPlugins,
15
15
  validatePlugins
16
- } from "../chunk-VY7TVOIK.js";
16
+ } from "../chunk-UUB3D2XI.js";
17
17
  import {
18
18
  createPluginLogger
19
- } from "../chunk-OZJXGX4U.js";
19
+ } from "../chunk-TNUUATT7.js";
20
20
  import "../chunk-G3E7SCME.js";
21
- import "../chunk-ZATRYQLR.js";
21
+ import "../chunk-7STN2ZSK.js";
22
22
  import {
23
23
  getDb
24
- } from "../chunk-NIFONS4W.js";
25
- import "../chunk-3F54A3YM.js";
24
+ } from "../chunk-NFXSLTYG.js";
25
+ import "../chunk-NAPITCZ6.js";
26
26
  import "../chunk-YYBX2BD5.js";
27
27
  import "../chunk-GHGPTPBL.js";
28
28
  import {
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  resolveRuntimeDependencySnapshot
3
- } from "../chunk-H7KUZAMZ.js";
3
+ } from "../chunk-6H4PP63X.js";
4
4
  import "../chunk-G3E7SCME.js";
5
5
  import {
6
6
  disconnectStateAdapter
7
- } from "../chunk-ZATRYQLR.js";
8
- import "../chunk-3F54A3YM.js";
7
+ } from "../chunk-7STN2ZSK.js";
8
+ import "../chunk-NAPITCZ6.js";
9
9
  import "../chunk-YYBX2BD5.js";
10
10
  import {
11
11
  pluginCatalogRuntime
@@ -4,7 +4,7 @@ import {
4
4
  recordConversationActivity,
5
5
  recordConversationExecution,
6
6
  requestConversationWork
7
- } from "../chunk-TF5VLGA7.js";
7
+ } from "../chunk-QGEWC27H.js";
8
8
  import {
9
9
  defineJuniorPlugins,
10
10
  pluginCatalogConfigFromEnv,
@@ -21,19 +21,19 @@ import {
21
21
  import {
22
22
  createPluginLogger,
23
23
  createPluginState
24
- } from "../chunk-OZJXGX4U.js";
24
+ } from "../chunk-TNUUATT7.js";
25
25
  import {
26
26
  disconnectStateAdapter,
27
27
  getConnectedStateContext
28
- } from "../chunk-ZATRYQLR.js";
28
+ } from "../chunk-7STN2ZSK.js";
29
29
  import {
30
30
  createJuniorSqlExecutor,
31
31
  createSqlStore,
32
32
  getDb
33
- } from "../chunk-NIFONS4W.js";
33
+ } from "../chunk-NFXSLTYG.js";
34
34
  import {
35
35
  getChatConfig
36
- } from "../chunk-3F54A3YM.js";
36
+ } from "../chunk-NAPITCZ6.js";
37
37
  import "../chunk-YYBX2BD5.js";
38
38
  import {
39
39
  parseDestination,
@@ -2,8 +2,8 @@ import {
2
2
  closeDb,
3
3
  getConversationStore,
4
4
  getDb
5
- } from "./chunk-NIFONS4W.js";
6
- import "./chunk-3F54A3YM.js";
5
+ } from "./chunk-NFXSLTYG.js";
6
+ import "./chunk-NAPITCZ6.js";
7
7
  import "./chunk-YYBX2BD5.js";
8
8
  import "./chunk-GHGPTPBL.js";
9
9
  import "./chunk-S6QKIGRM.js";
package/dist/reporting.js CHANGED
@@ -6,30 +6,30 @@ import {
6
6
  getConversationDetails,
7
7
  getConversationDetailsForIds,
8
8
  resolveSlackConversationContextFromThreadId
9
- } from "./chunk-N25HRI6B.js";
9
+ } from "./chunk-LNCREA5Z.js";
10
10
  import {
11
11
  buildSystemPrompt
12
- } from "./chunk-BMQ5DXHV.js";
12
+ } from "./chunk-LE5ANBUZ.js";
13
13
  import {
14
14
  getAgentTurnSessionRecord,
15
15
  listAgentTurnSessionSummariesForConversation,
16
16
  loadActivityEntries,
17
17
  piContentMessageSchema
18
- } from "./chunk-7FS3K243.js";
18
+ } from "./chunk-QL66APYJ.js";
19
19
  import {
20
20
  getPluginOperationalReports
21
- } from "./chunk-VY7TVOIK.js";
22
- import "./chunk-OZJXGX4U.js";
21
+ } from "./chunk-UUB3D2XI.js";
22
+ import "./chunk-TNUUATT7.js";
23
23
  import "./chunk-G3E7SCME.js";
24
24
  import {
25
25
  getStateAdapter
26
- } from "./chunk-ZATRYQLR.js";
26
+ } from "./chunk-7STN2ZSK.js";
27
27
  import {
28
28
  getConversationStore
29
- } from "./chunk-NIFONS4W.js";
29
+ } from "./chunk-NFXSLTYG.js";
30
30
  import {
31
31
  unwrapCurrentInstruction
32
- } from "./chunk-3F54A3YM.js";
32
+ } from "./chunk-NAPITCZ6.js";
33
33
  import {
34
34
  canExposeConversationPayload,
35
35
  parseSlackThreadId,
@@ -8,7 +8,7 @@ import {
8
8
  scheduleSessionCompletedPluginTasks,
9
9
  updateConversationStats,
10
10
  upsertConversationMessage
11
- } from "./chunk-ACJENBVF.js";
11
+ } from "./chunk-MAVOJ54A.js";
12
12
  import "./chunk-KNFROR7R.js";
13
13
  import {
14
14
  coerceThreadArtifactsState,
@@ -18,23 +18,23 @@ import {
18
18
  markTurnFailed,
19
19
  persistThreadStateById,
20
20
  startActiveTurn
21
- } from "./chunk-OJP53WIU.js";
21
+ } from "./chunk-HDNWZMUN.js";
22
22
  import {
23
23
  coerceThreadConversationState
24
24
  } from "./chunk-PFXC67GJ.js";
25
25
  import {
26
26
  commitMessages,
27
27
  loadProjection
28
- } from "./chunk-7FS3K243.js";
29
- import "./chunk-VY7TVOIK.js";
30
- import "./chunk-OZJXGX4U.js";
28
+ } from "./chunk-QL66APYJ.js";
29
+ import "./chunk-UUB3D2XI.js";
30
+ import "./chunk-TNUUATT7.js";
31
31
  import "./chunk-G3E7SCME.js";
32
- import "./chunk-ZATRYQLR.js";
33
- import "./chunk-NIFONS4W.js";
32
+ import "./chunk-7STN2ZSK.js";
33
+ import "./chunk-NFXSLTYG.js";
34
34
  import {
35
35
  stripRuntimeTurnContext,
36
36
  trimTrailingAssistantMessages
37
- } from "./chunk-3F54A3YM.js";
37
+ } from "./chunk-NAPITCZ6.js";
38
38
  import "./chunk-YYBX2BD5.js";
39
39
  import "./chunk-GHGPTPBL.js";
40
40
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior",
3
- "version": "0.92.0",
3
+ "version": "0.93.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -54,8 +54,8 @@
54
54
  "@chat-adapter/slack": "4.29.0",
55
55
  "@chat-adapter/state-memory": "4.29.0",
56
56
  "@chat-adapter/state-redis": "4.29.0",
57
- "@earendil-works/pi-agent-core": "0.74.2",
58
- "@earendil-works/pi-ai": "0.74.2",
57
+ "@earendil-works/pi-agent-core": "0.80.5",
58
+ "@earendil-works/pi-ai": "0.80.5",
59
59
  "@logtape/logtape": "^2.1.1",
60
60
  "@modelcontextprotocol/sdk": "1.29.0",
61
61
  "@neondatabase/serverless": "^1.1.0",
@@ -78,7 +78,7 @@
78
78
  "pg": "^8.16.3",
79
79
  "yaml": "^2.9.0",
80
80
  "zod": "^4.4.3",
81
- "@sentry/junior-plugin-api": "0.92.0"
81
+ "@sentry/junior-plugin-api": "0.93.0"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@emnapi/core": "^1.10.0",
@@ -94,10 +94,10 @@
94
94
  "typescript": "^6.0.3",
95
95
  "vercel": "^54.4.0",
96
96
  "vitest": "^4.1.7",
97
- "@sentry/junior-github": "0.92.0",
98
- "@sentry/junior-memory": "0.92.0",
99
- "@sentry/junior-scheduler": "0.92.0",
100
- "@sentry/junior-testing": "0.0.0"
97
+ "@sentry/junior-memory": "0.93.0",
98
+ "@sentry/junior-testing": "0.0.0",
99
+ "@sentry/junior-github": "0.93.0",
100
+ "@sentry/junior-scheduler": "0.93.0"
101
101
  },
102
102
  "scripts": {
103
103
  "build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",