@sentry/junior 0.107.1 → 0.109.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/{agent-hooks-ICPIJAFY.js → agent-hooks-FHHVLNPA.js} +12 -12
  2. package/dist/api/conversations/events.d.ts +1 -1
  3. package/dist/api/conversations/list.d.ts +1 -0
  4. package/dist/api/conversations/schema.d.ts +57 -6
  5. package/dist/api/schema.js +1 -1
  6. package/dist/api.js +116 -27
  7. package/dist/app.d.ts +1 -0
  8. package/dist/app.js +1741 -458
  9. package/dist/{catalog-runtime-FOFNPR3P.js → catalog-runtime-DMGJSLV2.js} +6 -4
  10. package/dist/chat/conversations/history.d.ts +16 -5
  11. package/dist/chat/conversations/message-projection.d.ts +3 -5
  12. package/dist/chat/conversations/sql/store.d.ts +0 -7
  13. package/dist/chat/log-context.d.ts +40 -0
  14. package/dist/chat/logging.d.ts +3 -26
  15. package/dist/chat/resource-events/store.d.ts +6 -0
  16. package/dist/chat/runtime/slack-resume.d.ts +2 -2
  17. package/dist/chat/runtime/slack-runtime.d.ts +3 -0
  18. package/dist/chat/services/turn-session-record.d.ts +0 -2
  19. package/dist/chat/slack/reply.d.ts +7 -19
  20. package/dist/chat/state/conversation.d.ts +1 -0
  21. package/dist/chat/task-execution/slack-work.d.ts +237 -10
  22. package/dist/chat/tool-support/turn-deadline-result.d.ts +3 -0
  23. package/dist/chunk-3SXUV423.js +10 -0
  24. package/dist/{chunk-YFQ7CQDE.js → chunk-72OMGPDS.js} +1017 -39
  25. package/dist/{chunk-2XXEKR44.js → chunk-7Q6WCISF.js} +1 -1
  26. package/dist/{chunk-NVOTGWYX.js → chunk-FENLIFJD.js} +97 -601
  27. package/dist/{chunk-IGHMVDWI.js → chunk-FWJRXN4F.js} +3 -3
  28. package/dist/{chunk-PUAMO4PI.js → chunk-HHVY4SMP.js} +41 -7
  29. package/dist/{chunk-SPUAJVVH.js → chunk-HO5NT6OE.js} +5 -7
  30. package/dist/{chunk-O24R4DCK.js → chunk-ISMWX44P.js} +93 -55
  31. package/dist/{chunk-7FBGKXPE.js → chunk-IVVGFRQQ.js} +5 -0
  32. package/dist/{chunk-EDLNHZH3.js → chunk-IXKSQGIO.js} +226 -191
  33. package/dist/{chunk-SS67LUOK.js → chunk-JNAVF45E.js} +6 -7
  34. package/dist/{chunk-DY7TRYB5.js → chunk-MGUMR35T.js} +1 -1
  35. package/dist/{chunk-CQ7KSO2B.js → chunk-MXW4GL53.js} +11 -15
  36. package/dist/{chunk-RT5BUHR5.js → chunk-O3JMSZLI.js} +1 -1
  37. package/dist/chunk-OCD3OZRK.js +125 -0
  38. package/dist/{chunk-B2Z2H66D.js → chunk-OUHNWH46.js} +60 -5
  39. package/dist/{chunk-VIXFG2VC.js → chunk-PLB7MRCQ.js} +1 -2
  40. package/dist/{chunk-RMVOAJRL.js → chunk-QY636HZU.js} +114 -12
  41. package/dist/{chunk-VH6KWKG2.js → chunk-RGX4V75M.js} +3 -3
  42. package/dist/{chunk-B7PUBQQM.js → chunk-SYAQIR5Z.js} +1 -1
  43. package/dist/chunk-TMBRFULF.js +471 -0
  44. package/dist/{chunk-YIPD3L6L.js → chunk-TT6GMXNA.js} +8 -10
  45. package/dist/{chunk-YT72TOEK.js → chunk-WHMOBKT7.js} +2 -2
  46. package/dist/cli/chat.js +23 -23
  47. package/dist/cli/check.js +8 -6
  48. package/dist/cli/plugins.js +16 -16
  49. package/dist/cli/snapshot-warmup.js +10 -9
  50. package/dist/cli/upgrade.js +314 -3505
  51. package/dist/db/db.d.ts +1 -1
  52. package/dist/{db-DIGO4TGW.js → db-V3NU72O2.js} +8 -6
  53. package/dist/instrumentation.js +3 -2
  54. package/dist/nitro.js +5 -4
  55. package/dist/{runner-ACR2HAIC.js → runner-JYBCQBLK.js} +17 -20
  56. package/dist/{skills-ITNHBARB.js → skills-U6MDAST7.js} +7 -5
  57. package/dist/{validation-AGQ46ZGV.js → validation-72N3JVRU.js} +7 -5
  58. package/dist/version.d.ts +2 -0
  59. package/dist/version.js +7 -0
  60. package/migrations/0006_drop_legacy_conversation_messages.sql +1 -0
  61. package/migrations/README.md +12 -9
  62. package/migrations/meta/0006_snapshot.json +948 -0
  63. package/migrations/meta/_journal.json +7 -0
  64. package/package.json +11 -7
  65. package/dist/chunk-4YF7Z6IA.js +0 -1061
  66. package/dist/chunk-AUUOHQAT.js +0 -115
  67. package/dist/chunk-G3E7SCME.js +0 -28
  68. package/dist/chunk-YNP2ATQX.js +0 -1282
@@ -1,115 +0,0 @@
1
- import {
2
- getStateAdapter
3
- } from "./chunk-B2Z2H66D.js";
4
- import {
5
- logException,
6
- logInfo,
7
- logWarn
8
- } from "./chunk-O24R4DCK.js";
9
-
10
- // src/chat/plugins/logging.ts
11
- function createPluginLogger(plugin) {
12
- return {
13
- info(message, metadata) {
14
- logInfo(
15
- "agent_plugin_log_info",
16
- {},
17
- { "app.plugin.name": plugin, ...metadata },
18
- message
19
- );
20
- },
21
- warn(message, metadata) {
22
- logWarn(
23
- "agent_plugin_log_warn",
24
- {},
25
- { "app.plugin.name": plugin, ...metadata },
26
- message
27
- );
28
- },
29
- error(message, metadata) {
30
- logException(
31
- new Error(message),
32
- "agent_plugin_log_error",
33
- {},
34
- { "app.plugin.name": plugin, ...metadata },
35
- message
36
- );
37
- }
38
- };
39
- }
40
-
41
- // src/chat/plugins/state.ts
42
- import { createHash } from "crypto";
43
- var MAX_PLUGIN_STATE_KEY_LENGTH = 512;
44
- function hashKeyPart(value) {
45
- return createHash("sha256").update(value).digest("hex").slice(0, 32);
46
- }
47
- function pluginStateKey(plugin, key) {
48
- const pluginPrefix = `junior:${plugin}`;
49
- if (key === pluginPrefix || key.startsWith(`${pluginPrefix}:`)) {
50
- return key;
51
- }
52
- return `junior:plugin_state:${hashKeyPart(plugin)}:${hashKeyPart(key)}`;
53
- }
54
- function validatePluginStateKey(key) {
55
- if (!key.trim()) {
56
- throw new Error("Plugin state key is required");
57
- }
58
- if (key.length > MAX_PLUGIN_STATE_KEY_LENGTH) {
59
- throw new Error("Plugin state key exceeds the maximum length");
60
- }
61
- }
62
- function createPluginState(plugin, adapter) {
63
- const getAdapter = () => adapter ?? getStateAdapter();
64
- return {
65
- async delete(key) {
66
- validatePluginStateKey(key);
67
- const state = getAdapter();
68
- await state.connect();
69
- await state.delete(pluginStateKey(plugin, key));
70
- },
71
- async get(key) {
72
- validatePluginStateKey(key);
73
- const state = getAdapter();
74
- await state.connect();
75
- const value = await state.get(pluginStateKey(plugin, key));
76
- return value ?? void 0;
77
- },
78
- async set(key, value, ttlMs) {
79
- validatePluginStateKey(key);
80
- const state = getAdapter();
81
- await state.connect();
82
- await state.set(pluginStateKey(plugin, key), value, ttlMs);
83
- },
84
- async setIfNotExists(key, value, ttlMs) {
85
- validatePluginStateKey(key);
86
- const state = getAdapter();
87
- await state.connect();
88
- return await state.setIfNotExists(
89
- pluginStateKey(plugin, key),
90
- value,
91
- ttlMs
92
- );
93
- },
94
- async withLock(key, ttlMs, callback) {
95
- validatePluginStateKey(key);
96
- const state = getAdapter();
97
- await state.connect();
98
- const lockKey = pluginStateKey(plugin, key);
99
- const lock = await state.acquireLock(lockKey, ttlMs);
100
- if (!lock) {
101
- throw new Error(`Could not acquire plugin state lock for ${key}`);
102
- }
103
- try {
104
- return await callback();
105
- } finally {
106
- await state.releaseLock(lock);
107
- }
108
- }
109
- };
110
- }
111
-
112
- export {
113
- createPluginLogger,
114
- createPluginState
115
- };
@@ -1,28 +0,0 @@
1
- // src/chat/sandbox/paths.ts
2
- function normalizeWorkspaceRoot(input) {
3
- const candidate = (input ?? "").trim();
4
- if (!candidate) {
5
- return "/vercel/sandbox";
6
- }
7
- const normalized = candidate.replace(/\/+$/, "");
8
- return normalized.startsWith("/") ? normalized : `/${normalized}`;
9
- }
10
- var SANDBOX_WORKSPACE_ROOT = normalizeWorkspaceRoot(
11
- process.env.VERCEL_SANDBOX_WORKSPACE_DIR
12
- );
13
- var SANDBOX_SKILLS_ROOT = `${SANDBOX_WORKSPACE_ROOT}/skills`;
14
- var SANDBOX_DATA_ROOT = `${SANDBOX_WORKSPACE_ROOT}/data`;
15
- function sandboxSkillDir(skillName) {
16
- return `${SANDBOX_SKILLS_ROOT}/${skillName}`;
17
- }
18
- function sandboxSkillFile(skillName) {
19
- return `${sandboxSkillDir(skillName)}/SKILL.md`;
20
- }
21
-
22
- export {
23
- SANDBOX_WORKSPACE_ROOT,
24
- SANDBOX_SKILLS_ROOT,
25
- SANDBOX_DATA_ROOT,
26
- sandboxSkillDir,
27
- sandboxSkillFile
28
- };