@sentry/junior 0.298.0 → 0.300.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 (95) hide show
  1. package/dist/{actor-6jsm_v96.js → actor-D2iXzvlN.js} +2 -1
  2. package/dist/{state-CSuA2J1V.js → adapter-S5UkjNK3.js} +53 -136
  3. package/dist/{admin-BF3DbYGf.js → admin-UrTniSPO.js} +2 -2
  4. package/dist/{agent-runner-Q9GkoerG.js → agent-runner-bY4_0UPm.js} +1444 -1478
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +7 -7
  7. package/dist/api.d.ts +1 -1
  8. package/dist/api.js +382 -68
  9. package/dist/{app-DOg_mCtV.d.ts → app-D-AcIcCV.d.ts} +17 -4
  10. package/dist/app.d.ts +1 -1
  11. package/dist/app.js +148 -483
  12. package/dist/{automation-Cn8qmbdr.js → automation-Dw82oQ-h.js} +2 -2
  13. package/dist/{background-compaction-queue-BZhGFOK6.js → background-compaction-queue-B6U3060-.js} +9 -5
  14. package/dist/{briefs-CQrCRF6-.js → briefs-DqiwWu-n.js} +4 -4
  15. package/dist/{catalog-runtime-DZeD2WbL.js → catalog-runtime-D1oYNv04.js} +1 -1
  16. package/dist/cli/chat.js +17 -17
  17. package/dist/cli/check.js +3 -3
  18. package/dist/cli/main.js +3 -3
  19. package/dist/cli/plugins.js +5 -5
  20. package/dist/cli/snapshot-create.js +4 -4
  21. package/dist/cli/upgrade.d.ts +1 -1
  22. package/dist/cli/upgrade.js +4 -4
  23. package/dist/{config-BOByVnxe.js → config-9nHoFiJP.js} +117 -12
  24. package/dist/{connections-BNN5cJam.js → connections-DZjTN3JC.js} +6 -6
  25. package/dist/continue-in-slack-Dtv7_U42.js +176 -0
  26. package/dist/{conversation-DCkzvxqB.js → conversation-Dyjq2CZ8.js} +36 -13
  27. package/dist/{conversation-feed-CMA12Rjs.js → conversation-feed-CcDxlrlQ.js} +109 -3
  28. package/dist/{conversation-privacy-C0eRxsgb.js → conversation-privacy-D-5HTXjS.js} +1 -1
  29. package/dist/{conversation-turn-D9qvcDX6.js → conversation-turn-Cxl8WZD7.js} +85 -68
  30. package/dist/{credential-sync-B_iUpxGL.js → credential-sync-C49ClwDX.js} +18 -18
  31. package/dist/{db-DoMcnYol.d.ts → db-2resqBh1.d.ts} +1 -1
  32. package/dist/{db-CoMNr2Zm.js → db-BJNo6fK5.js} +176 -12
  33. package/dist/{executor-C-m8VrzX.js → executor-DBIaOeJ_.js} +47 -13
  34. package/dist/{media-BepyEUNm.js → history-IjdmO_r6.js} +1 -85
  35. package/dist/instrumentation.js +14 -5
  36. package/dist/lineage-0dereG7H.js +37 -0
  37. package/dist/{logging-CJTi5niy.js → logging-BIclibct.js} +1 -1
  38. package/dist/{message-Q6_5DAWR.js → message-dkOl-Iii.js} +9 -10
  39. package/dist/model-input-CLo9TaUd.js +82 -0
  40. package/dist/nitro.d.ts +1 -1
  41. package/dist/nitro.js +17 -9
  42. package/dist/{oauth-callback-server-CH5XAyo-.js → oauth-callback-server-WmpjfJgQ.js} +2 -2
  43. package/dist/{plugins-HYh_JOdw.js → plugins-BBX07Jzt.js} +1 -1
  44. package/dist/{projection-BgwEE36_.js → projection-w_X-zi7v.js} +1035 -692
  45. package/dist/{prompt-DXc9DYT9.js → prompt-B1Xw46-S.js} +4 -4
  46. package/dist/{registry-9XwqSnM-.js → registry-BmP5vnlj.js} +4 -4
  47. package/dist/{resolve-DUIAbcRL.js → resolve-goo34bJK.js} +3 -3
  48. package/dist/{result-C2Vn8QGn.js → result-PVBeU0Wf.js} +158 -69
  49. package/dist/{runner-CXGtw-Mc.js → runner-DKrfvNV6.js} +9 -9
  50. package/dist/{sandbox-egress-signals-Di3S_dO7.js → sandbox-egress-signals-DsUcqrI0.js} +1 -1
  51. package/dist/{schema-Dyp7racy.js → schema-C9iNFz5n.js} +51 -7
  52. package/dist/{schema-BnbZ-rKv.d.ts → schema-Dns-sTas.d.ts} +1285 -761
  53. package/dist/{service-account-DM3KBBeG.js → service-account-CMAAloAL.js} +3 -3
  54. package/dist/{service-account-GzAMUQ8a.js → service-account-CmowamcB.js} +4 -4
  55. package/dist/session-stop-BcAXze8a.js +3330 -0
  56. package/dist/{skills-DCK9SD_l.js → skills-DfsazET6.js} +3 -3
  57. package/dist/slack-conversation-unfurl-CzQonuWz.js +370 -0
  58. package/dist/spawn-C7o0FDDp.js +73 -0
  59. package/dist/state-zSilNpbi.js +132 -0
  60. package/dist/{user-input-request-CXNIov9n.js → statuses-Hn-HsOph.js} +115 -26
  61. package/dist/{stop-Dh2DfwpK.js → stop-CFOujp8C.js} +9105 -6007
  62. package/dist/{store-DrA17Fbz.js → store-Dkeis_8o.js} +10 -10
  63. package/dist/{store-B1zepKG8.js → store-E3x2Fg_F.js} +24 -4
  64. package/dist/{task-queue-D1rXWfFN.js → task-queue-D-hCqdZW.js} +4 -4
  65. package/dist/{task-runner-CT4M8oDz.js → task-runner-vohUPLHe.js} +10 -10
  66. package/dist/{thread-context-DnqUkbzN.js → thread-context-BzvdkgI9.js} +18 -18
  67. package/dist/{turn-session-routing-VXDVXLRl.js → turn-session-routing-Bo_LxFum.js} +5 -5
  68. package/dist/turn-user-message-D5RnVmxQ.js +355 -0
  69. package/dist/users-2bggndVg.js +424 -0
  70. package/dist/{validation-zxAJBDDy.js → validation-BbWikeSa.js} +1 -1
  71. package/dist/{version-DcZ40a0g.js → version-GVBMW2jA.js} +1 -1
  72. package/dist/version.js +1 -1
  73. package/dist/{viewer-CgiGjW10.js → viewer-BpxRliyO.js} +36 -163
  74. package/dist/{warmup-CwKbxQLl.js → warmup-BW2qwnal.js} +1140 -145
  75. package/dist/{worker-CbDUzaBA.js → worker-Cbd-iuwZ.js} +25 -20
  76. package/migrations/0104_code_change_draft.sql +1 -0
  77. package/migrations/0105_attachment_uploads.sql +14 -0
  78. package/migrations/0106_conversation_agent_config.sql +1 -0
  79. package/migrations/0107_attachment_deferred_download.sql +2 -0
  80. package/migrations/meta/0104_snapshot.json +4516 -0
  81. package/migrations/meta/0105_snapshot.json +4611 -0
  82. package/migrations/meta/0106_snapshot.json +4617 -0
  83. package/migrations/meta/0107_snapshot.json +4617 -0
  84. package/migrations/meta/_journal.json +28 -0
  85. package/package.json +10 -8
  86. package/dist/attempt-selection-ClP3MMPr.js +0 -61
  87. package/dist/locks-D-0h111u.js +0 -48
  88. package/dist/notification-Bv25xbj0.js +0 -1284
  89. package/dist/prompt-input-BUr4J9RO.js +0 -1424
  90. package/dist/session-stop-D4i7e6iT.js +0 -181
  91. package/dist/spawn-6cX6xE9G.js +0 -80
  92. package/dist/turn-cancel-l460pfGW.js +0 -201
  93. package/dist/turn-user-message-BSPmkm7X.js +0 -608
  94. package/dist/turn-wake-DVFVXyhX.js +0 -161
  95. package/dist/{oauth-relay-CsfIazeF.js → oauth-relay-DRzq73b6.js} +1 -1
@@ -729,6 +729,34 @@
729
729
  "when": 1794424481991,
730
730
  "tag": "0103_agent_invocation_fork",
731
731
  "breakpoints": true
732
+ },
733
+ {
734
+ "idx": 104,
735
+ "version": "7",
736
+ "when": 1794493721940,
737
+ "tag": "0104_code_change_draft",
738
+ "breakpoints": true
739
+ },
740
+ {
741
+ "idx": 105,
742
+ "version": "7",
743
+ "when": 1794515341853,
744
+ "tag": "0105_attachment_uploads",
745
+ "breakpoints": true
746
+ },
747
+ {
748
+ "idx": 106,
749
+ "version": "7",
750
+ "when": 1794521047106,
751
+ "tag": "0106_conversation_agent_config",
752
+ "breakpoints": true
753
+ },
754
+ {
755
+ "idx": 107,
756
+ "version": "7",
757
+ "when": 1794557567747,
758
+ "tag": "0107_attachment_deferred_download",
759
+ "breakpoints": true
732
760
  }
733
761
  ]
734
762
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior",
3
- "version": "0.298.0",
3
+ "version": "0.300.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -57,7 +57,7 @@
57
57
  "@chat-adapter/slack": "4.29.0",
58
58
  "@chat-adapter/state-memory": "4.29.0",
59
59
  "@chat-adapter/state-redis": "4.29.0",
60
- "@earendil-works/pi-agent-core": "0.84.1",
60
+ "@earendil-works/pi-agent-core": "0.85.1",
61
61
  "@earendil-works/pi-ai": "0.85.1",
62
62
  "@earendil-works/pi-codemode": "1.4.0",
63
63
  "@hono/zod-validator": "^0.9.0",
@@ -81,7 +81,7 @@
81
81
  "chat": "4.29.0",
82
82
  "commander": "^14.0.3",
83
83
  "diff": "^8.0.4",
84
- "drizzle-orm": "^0.45.2",
84
+ "drizzle-orm": "^0.45.4",
85
85
  "graphql": "^16.14.0",
86
86
  "hono": "^4.13.11",
87
87
  "jiti": "^2.7.0",
@@ -89,13 +89,14 @@
89
89
  "just-bash": "3.0.1",
90
90
  "node-html-markdown": "^2.0.0",
91
91
  "p-limit": "^7.3.1",
92
+ "parse5": "^7.3.0",
92
93
  "pg": "^8.16.3",
93
94
  "sharp": "^0.35.3",
94
95
  "undici": "7.30.1",
95
96
  "web-push": "^3.6.7",
96
97
  "yaml": "^2.9.0",
97
- "zod": "^4.5.4",
98
- "@sentry/junior-plugin-api": "0.298.0"
98
+ "zod": "^4.6.7",
99
+ "@sentry/junior-plugin-api": "0.300.0"
99
100
  },
100
101
  "peerDependencies": {
101
102
  "bullmq": "^6.5.0",
@@ -131,9 +132,9 @@
131
132
  "typescript": "^7.0.2",
132
133
  "vercel": "^54.4.0",
133
134
  "vitest": "^4.1.12",
134
- "@sentry/junior-github": "0.298.0",
135
- "@sentry/junior-memory": "0.298.0",
136
- "@sentry/junior-testing": "0.0.0"
135
+ "@sentry/junior-github": "0.300.0",
136
+ "@sentry/junior-testing": "0.0.0",
137
+ "@sentry/junior-memory": "0.300.0"
137
138
  },
138
139
  "scripts": {
139
140
  "build": "tsdown",
@@ -147,6 +148,7 @@
147
148
  "skills:check": "node --test scripts/check-skills.test.mjs && node scripts/check-skills.mjs",
148
149
  "tool-annotations:check": "node --test scripts/check-tool-annotations.test.mjs && node scripts/check-tool-annotations.mjs",
149
150
  "tool-key-casing:check": "node --test scripts/check-tool-key-casing.test.mjs && node scripts/check-tool-key-casing.mjs",
151
+ "tool-descriptions:check": "node --test scripts/check-tool-descriptions.test.mjs && node scripts/check-tool-descriptions.mjs",
150
152
  "tool-error-classification:check": "node --test scripts/check-tool-error-classification.test.mjs && node scripts/check-tool-error-classification.mjs",
151
153
  "test:coverage": "vitest run --maxWorkers=4 --coverage --reporter=default --reporter=junit --outputFile.junit=coverage/results.junit.xml"
152
154
  }
@@ -1,61 +0,0 @@
1
- import { o as isUserActor } from "./actor-6jsm_v96.js";
2
- // src/chat/task-execution/attempt-selection.ts
3
- function inputOwner(message) {
4
- return {
5
- authorId: message.input.authorId,
6
- identityId: message.input.authorIdentityId,
7
- source: message.source
8
- };
9
- }
10
- function turnOwner(turn) {
11
- return {
12
- authorId: isUserActor(turn.actor) ? turn.actor.userId : void 0,
13
- identityId: turn.actorIdentityId,
14
- source: turn.source?.kind
15
- };
16
- }
17
- /**
18
- * One Turn has one Actor and one Source: it runs with that Actor's
19
- * credentials, so input from anyone else must not join it. Every value that
20
- * both sides know must match, and they must share an Identity id or an author
21
- * id. Input with no known author matches nothing.
22
- */
23
- function hasSameOwner(a, b) {
24
- if (a.source && b.source && a.source !== b.source) return false;
25
- const sameIdentity = a.identityId && b.identityId ? a.identityId === b.identityId : void 0;
26
- const sameAuthor = a.authorId && b.authorId ? a.authorId === b.authorId : void 0;
27
- return sameIdentity !== false && sameAuthor !== false && (sameIdentity ?? sameAuthor) === true;
28
- }
29
- /** True when two Inbound messages may share one Turn. */
30
- function canShareTurn(a, b) {
31
- return hasSameOwner(inputOwner(a), inputOwner(b));
32
- }
33
- /** True when an Inbound message may join `turn`. */
34
- function canJoinTurn(turn, message) {
35
- return hasSameOwner(turnOwner(turn), inputOwner(message));
36
- }
37
- function selectContiguousTurnBatch(messages) {
38
- const first = messages[0];
39
- if (!first) return [];
40
- const nextTurnIndex = messages.findIndex((message, index) => index > 0 && !canShareTurn(first, message));
41
- return messages.slice(0, nextTurnIndex === -1 ? messages.length : nextTurnIndex);
42
- }
43
- /**
44
- * True when an interrupt can start its own attempt.
45
- *
46
- * A steered web message must not start a second Turn while a yielded Turn
47
- * waits to resume. It stays pending for that Turn's drain or the next attempt.
48
- */
49
- function isAttemptInterrupt(message, work) {
50
- return message.delivery === "interrupt" && !(work.execution.status === "paused" && message.source === "web");
51
- }
52
- /** Prioritize interrupts while keeping each attempt to one Actor and Source. */
53
- function selectAttemptMessages(work) {
54
- const messages = work.messages;
55
- const interrupts = messages.filter((message) => isAttemptInterrupt(message, work));
56
- if (interrupts.length > 0) return selectContiguousTurnBatch(interrupts);
57
- if (work.execution.status === "paused") return [];
58
- const nonEventMessages = messages.filter((message) => message.source !== "event");
59
- return selectContiguousTurnBatch(nonEventMessages.length > 0 ? nonEventMessages : messages);
60
- }
61
- export { selectAttemptMessages as i, canShareTurn as n, isAttemptInterrupt as r, canJoinTurn as t };
@@ -1,48 +0,0 @@
1
- import { setTimeout } from "node:timers/promises";
2
- // src/chat/state/locks.ts
3
- const ACTIVE_LOCK_TTL_MS = 9e4;
4
- const MUTATION_LOCK_TTL_MS = 1e4;
5
- /**
6
- * Acquire a lock for long-running work that the queued state adapter should
7
- * keep alive while the owning invocation is still making progress.
8
- */
9
- async function acquireActiveLock(state, threadId) {
10
- return await state.acquireLock(threadId, ACTIVE_LOCK_TTL_MS);
11
- }
12
- /**
13
- * Run work under one lock, optionally waiting for the current owner.
14
- * `keepAlive` is for multi-store mutations that must retain ownership until all
15
- * side effects finish; callers should still fence each blind write.
16
- */
17
- async function withLock(state, key, run, options = {}) {
18
- const ttlMs = options.ttlMs ?? 9e4;
19
- const startedAtMs = Date.now();
20
- let lock;
21
- while (true) {
22
- lock = await state.acquireLock(key, ttlMs);
23
- if (lock) break;
24
- if (Date.now() - startedAtMs >= (options.waitMs ?? 0)) return { acquired: false };
25
- await setTimeout(options.retryMs ?? 25, void 0, { ref: false });
26
- }
27
- const heartbeat = options.keepAlive ? setInterval(() => void state.extendLock(lock, ttlMs).catch(() => void 0), Math.max(1, Math.floor(ttlMs / 3))) : void 0;
28
- heartbeat?.unref();
29
- try {
30
- return {
31
- acquired: true,
32
- value: await run(lock)
33
- };
34
- } finally {
35
- if (heartbeat) clearInterval(heartbeat);
36
- await state.releaseLock(lock);
37
- }
38
- }
39
- /**
40
- * Prove lock ownership immediately before a blind write.
41
- *
42
- * Whole-record mutations must stop if their lock expired rather than overwrite
43
- * state committed by a newer owner.
44
- */
45
- async function fenceLock(state, lock, ttlMs = MUTATION_LOCK_TTL_MS) {
46
- if (!await state.extendLock(lock, ttlMs)) throw new Error(`Lock ownership was lost before write for ${lock.threadId}`);
47
- }
48
- export { withLock as a, fenceLock as i, MUTATION_LOCK_TTL_MS as n, acquireActiveLock as r, ACTIVE_LOCK_TTL_MS as t };