@sentry/junior 0.298.0 → 0.299.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 (94) hide show
  1. package/dist/{actor-6jsm_v96.js → actor-D2iXzvlN.js} +2 -1
  2. package/dist/{state-CSuA2J1V.js → adapter-AgCNqqsG.js} +49 -133
  3. package/dist/{admin-BF3DbYGf.js → admin-1VwEXztm.js} +2 -2
  4. package/dist/{agent-runner-Q9GkoerG.js → agent-runner-Ciet8_nn.js} +977 -1316
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +8 -7
  7. package/dist/api.d.ts +1 -1
  8. package/dist/api.js +125 -43
  9. package/dist/{app-DOg_mCtV.d.ts → app--ky-Eu33.d.ts} +6 -4
  10. package/dist/app.d.ts +1 -1
  11. package/dist/app.js +126 -299
  12. package/dist/{automation-Cn8qmbdr.js → automation-M3RFJUBf.js} +1 -1
  13. package/dist/{background-compaction-queue-BZhGFOK6.js → background-compaction-queue-CnimvRdk.js} +4 -4
  14. package/dist/{briefs-CQrCRF6-.js → briefs-CwzvgdCa.js} +4 -4
  15. package/dist/{catalog-runtime-DZeD2WbL.js → catalog-runtime-DaBaHY7u.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-CAXIpWQb.js} +80 -6
  24. package/dist/{connections-BNN5cJam.js → connections-Dy0hPdUq.js} +6 -6
  25. package/dist/continue-in-slack-DIOjFj76.js +176 -0
  26. package/dist/{conversation-DCkzvxqB.js → conversation-fCWD9Az3.js} +24 -12
  27. package/dist/{conversation-feed-CMA12Rjs.js → conversation-feed-BPK8vkkZ.js} +88 -3
  28. package/dist/{conversation-privacy-C0eRxsgb.js → conversation-privacy-DUgtRkf8.js} +1 -1
  29. package/dist/{conversation-turn-D9qvcDX6.js → conversation-turn-DkJB6yMF.js} +85 -68
  30. package/dist/{credential-sync-B_iUpxGL.js → credential-sync-RX24Y8aY.js} +18 -18
  31. package/dist/{db-DoMcnYol.d.ts → db-B07FtU9g.d.ts} +1 -1
  32. package/dist/{db-CoMNr2Zm.js → db-COYOGzYS.js} +171 -12
  33. package/dist/{executor-C-m8VrzX.js → executor-BWmAgSyi.js} +40 -11
  34. package/dist/{media-BepyEUNm.js → history-IjdmO_r6.js} +1 -85
  35. package/dist/instrumentation.js +2 -2
  36. package/dist/lineage-D-5jm_oj.js +37 -0
  37. package/dist/{logging-CJTi5niy.js → logging-DPLEa8Bn.js} +1 -1
  38. package/dist/media-BAHvgkok.js +85 -0
  39. package/dist/{message-Q6_5DAWR.js → message-BIHR1yRk.js} +9 -10
  40. package/dist/model-input-BPZYH8Nd.js +82 -0
  41. package/dist/nitro.d.ts +1 -1
  42. package/dist/nitro.js +17 -9
  43. package/dist/{oauth-callback-server-CH5XAyo-.js → oauth-callback-server-R7qvSzFG.js} +2 -2
  44. package/dist/{plugins-HYh_JOdw.js → plugins-CBW2Prb_.js} +1 -1
  45. package/dist/{projection-BgwEE36_.js → projection-DEdP1q6f.js} +261 -36
  46. package/dist/{prompt-DXc9DYT9.js → prompt-4M98h_tC.js} +4 -4
  47. package/dist/{registry-9XwqSnM-.js → registry-BTKmKM-r.js} +3 -3
  48. package/dist/{resolve-DUIAbcRL.js → resolve-B8hXNVZ3.js} +3 -3
  49. package/dist/{result-C2Vn8QGn.js → result-g-XAaOj6.js} +158 -69
  50. package/dist/{runner-CXGtw-Mc.js → runner-BlPSA5A8.js} +9 -9
  51. package/dist/{sandbox-egress-signals-Di3S_dO7.js → sandbox-egress-signals-Pai-MzEY.js} +1 -1
  52. package/dist/{schema-Dyp7racy.js → schema-BNnY_trV.js} +47 -7
  53. package/dist/{schema-BnbZ-rKv.d.ts → schema-DbuWR-DN.d.ts} +657 -346
  54. package/dist/{service-account-GzAMUQ8a.js → service-account-9OLNQMyz.js} +4 -4
  55. package/dist/{service-account-DM3KBBeG.js → service-account-BYGZ08DQ.js} +3 -3
  56. package/dist/session-stop-2XJrcNCy.js +3356 -0
  57. package/dist/{skills-DCK9SD_l.js → skills-DpBQoeHV.js} +3 -3
  58. package/dist/slack-conversation-unfurl-BcDIWo67.js +370 -0
  59. package/dist/spawn-09GssFod.js +73 -0
  60. package/dist/state-Cufq0_rH.js +132 -0
  61. package/dist/{user-input-request-CXNIov9n.js → statuses-B8mUfghF.js} +30 -25
  62. package/dist/{stop-Dh2DfwpK.js → stop-U7iUrR1g.js} +6008 -5772
  63. package/dist/{store-B1zepKG8.js → store-BHiaHCQu.js} +24 -4
  64. package/dist/{store-DrA17Fbz.js → store-CSgUTMdv.js} +10 -10
  65. package/dist/{task-queue-D1rXWfFN.js → task-queue-bMNq0clp.js} +4 -4
  66. package/dist/{task-runner-CT4M8oDz.js → task-runner-B__rxwxU.js} +10 -10
  67. package/dist/{thread-context-DnqUkbzN.js → thread-context-d0ceWbVT.js} +18 -18
  68. package/dist/{turn-session-routing-VXDVXLRl.js → turn-session-routing-BVZHBFCF.js} +5 -5
  69. package/dist/turn-user-message-BEw7acTP.js +355 -0
  70. package/dist/users-BK3dbxZL.js +424 -0
  71. package/dist/{validation-zxAJBDDy.js → validation-BDVJjO2E.js} +1 -1
  72. package/dist/{version-DcZ40a0g.js → version-DQgZoQ3D.js} +1 -1
  73. package/dist/version.js +1 -1
  74. package/dist/{viewer-CgiGjW10.js → viewer-CAWfFo29.js} +25 -54
  75. package/dist/{warmup-CwKbxQLl.js → warmup-9ySPacF9.js} +1137 -144
  76. package/dist/{worker-CbDUzaBA.js → worker-D8jJO-WO.js} +8 -7
  77. package/migrations/0104_code_change_draft.sql +1 -0
  78. package/migrations/0105_attachment_uploads.sql +14 -0
  79. package/migrations/0106_conversation_agent_config.sql +1 -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/_journal.json +21 -0
  84. package/package.json +4 -4
  85. package/dist/attempt-selection-ClP3MMPr.js +0 -61
  86. package/dist/locks-D-0h111u.js +0 -48
  87. package/dist/notification-Bv25xbj0.js +0 -1284
  88. package/dist/prompt-input-BUr4J9RO.js +0 -1424
  89. package/dist/session-stop-D4i7e6iT.js +0 -181
  90. package/dist/spawn-6cX6xE9G.js +0 -80
  91. package/dist/turn-cancel-l460pfGW.js +0 -201
  92. package/dist/turn-user-message-BSPmkm7X.js +0 -608
  93. package/dist/turn-wake-DVFVXyhX.js +0 -161
  94. package/dist/{oauth-relay-CsfIazeF.js → oauth-relay-DRzq73b6.js} +1 -1
@@ -729,6 +729,27 @@
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
732
753
  }
733
754
  ]
734
755
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior",
3
- "version": "0.298.0",
3
+ "version": "0.299.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -95,7 +95,7 @@
95
95
  "web-push": "^3.6.7",
96
96
  "yaml": "^2.9.0",
97
97
  "zod": "^4.5.4",
98
- "@sentry/junior-plugin-api": "0.298.0"
98
+ "@sentry/junior-plugin-api": "0.299.0"
99
99
  },
100
100
  "peerDependencies": {
101
101
  "bullmq": "^6.5.0",
@@ -131,8 +131,8 @@
131
131
  "typescript": "^7.0.2",
132
132
  "vercel": "^54.4.0",
133
133
  "vitest": "^4.1.12",
134
- "@sentry/junior-github": "0.298.0",
135
- "@sentry/junior-memory": "0.298.0",
134
+ "@sentry/junior-memory": "0.299.0",
135
+ "@sentry/junior-github": "0.299.0",
136
136
  "@sentry/junior-testing": "0.0.0"
137
137
  },
138
138
  "scripts": {
@@ -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 };