@sentry/junior 0.318.0 → 0.319.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 (92) hide show
  1. package/dist/{context-BKF_5zzI.js → adapter-8_S6Birm.js} +537 -537
  2. package/dist/{admin-UOHix_5P.js → admin-EsbUON1j.js} +1 -1
  3. package/dist/{agent-runner-DeYymwh2.js → agent-CtzMl32d.js} +18608 -5452
  4. package/dist/{agent-status-BA5x3Xtp.js → agent-status-Bq_AIpyp.js} +105 -1
  5. package/dist/{agent-update-delivery-DH8bx7jU.js → agent-update-delivery-pAvsbuGL.js} +4 -5
  6. package/dist/api/schema.d.ts +43 -23
  7. package/dist/api/schema.js +4 -4
  8. package/dist/api.js +70 -80
  9. package/dist/{app-DKAOuaoC.d.ts → app-tACXxJPI.d.ts} +4 -4
  10. package/dist/app.d.ts +2 -2
  11. package/dist/app.js +213 -91
  12. package/dist/{change-record-BzJgLsv7.d.ts → change-record-K-KsqNhT.d.ts} +9 -5
  13. package/dist/{channel-access-A0de5lRv.js → channel-access-DET5hzZM.js} +1 -1
  14. package/dist/{chat-core-engine-D3Wd7f5n.js → chat-core-engine-DpM3tMVi.js} +5 -5
  15. package/dist/cli/chat.d.ts +1 -1
  16. package/dist/cli/chat.js +23 -23
  17. package/dist/cli/check.js +5 -5
  18. package/dist/cli/main.js +2 -2
  19. package/dist/cli/plugins.d.ts +1 -1
  20. package/dist/cli/plugins.js +8 -8
  21. package/dist/cli/snapshot-create.js +5 -5
  22. package/dist/cli/upgrade.d.ts +1 -1
  23. package/dist/cli/upgrade.js +3 -4
  24. package/dist/{continue-in-slack-YxwMQVeR.js → continue-in-slack-CFzDyxkH.js} +3 -3
  25. package/dist/{conversation-feed-Cj7IuBtM.js → conversation-feed-DEUdD7mb.js} +2 -106
  26. package/dist/{conversation-privacy-Cr_dNW1p.js → conversation-privacy-C2vYK55O.js} +1 -1
  27. package/dist/{create-Btl1y1rq.js → create-Ta3SEIB5.js} +115 -5
  28. package/dist/{credential-sync-DTarZ63K.js → credential-sync-DyRqDmY4.js} +15 -18
  29. package/dist/{db-of6e3sGt.js → db-BCaNWl9p.js} +4579 -717
  30. package/dist/{deployment-C0qXa0FD.js → deployment-CfOew1Tm.js} +3 -3
  31. package/dist/{engine-context-C_QL_bMQ.js → engine-context-CiExoy1B.js} +144 -149
  32. package/dist/{html-9_pS9SjY.js → html-Bb2Si1bR.js} +6 -8
  33. package/dist/instrumentation.js +7 -23
  34. package/dist/list-wwDcROh9.js +5007 -0
  35. package/dist/{logging-BnOG0qz2.js → logging-BRPTXAdf.js} +8 -33
  36. package/dist/{mailbox-turn-Byrry9o1.js → markers-9QoqW5ov.js} +1675 -1255
  37. package/dist/nitro.d.ts +2 -2
  38. package/dist/nitro.js +6 -7
  39. package/dist/{oauth-callback-server-CjnnUr4o.js → oauth-callback-server-vhL9b-PZ.js} +2 -2
  40. package/dist/{oauth-relay-BvHFH0fV.js → oauth-relay-CH2v7WiB.js} +1 -1
  41. package/dist/{plugins-fBrz8PCV.d.ts → plugins-DhGXZjlu.d.ts} +1 -0
  42. package/dist/{profile-iHw1uu32.js → profile-D9LdwmZi.js} +16 -18
  43. package/dist/{prompt-DEkStuxG.js → prompt-3TqxEOtc.js} +1 -1
  44. package/dist/{reports-C1d9azyV.js → reports-K-tbtEyx.js} +2 -2
  45. package/dist/{resolve-DC6zBuDV.js → resolve-BBV2qf8A.js} +5 -5
  46. package/dist/{result-DxewDuXb.js → result-5IdGJP4M.js} +20 -9
  47. package/dist/{runner-99YxVN_r.js → runner-BK_joPlM.js} +7 -8
  48. package/dist/{sandbox-egress-signals-CgoX5CTI.js → sandbox-egress-signals-DXgWXXmm.js} +1 -1
  49. package/dist/{schema-BTojNBr5.js → schema-zWGG6VC1.js} +13 -7
  50. package/dist/{service-account-YDCPSByj.js → service-account-CateFyhw.js} +4 -5
  51. package/dist/{skills-CleC0Hze.js → skills-Ccjw8h2P.js} +9 -9
  52. package/dist/{slack-conversation-unfurl-BNQLC12R.js → slack-conversation-unfurl-ZC_TSpc4.js} +7 -7
  53. package/dist/storage-C9U7R5rM.js +273 -0
  54. package/dist/{system-prompt-table-Ci6Ck4gk.js → system-prompt-table-YBTHIFlP.js} +26 -84
  55. package/dist/topic-B2EWKKBT.js +6 -0
  56. package/dist/{package-discovery-DD9vencX.js → topics-DxuKurCX.js} +21 -1
  57. package/dist/{types-DCzTAA63.js → types-BNHkJrOP.js} +25 -11
  58. package/dist/{users-Cb9c1k9q.js → users-CCRAqYb_.js} +1 -1
  59. package/dist/{validation-BiUmWPhy.js → validation-BCUpJa8K.js} +4 -4
  60. package/dist/{version-VEXiEcZu.js → version-BNm0JYj3.js} +1 -1
  61. package/dist/version.js +1 -1
  62. package/dist/{worker-ChWYQdhm.js → worker-BhgpZ7_b.js} +4 -4
  63. package/migrations/20261127052408_space_name_nullable/migration.sql +5 -0
  64. package/migrations/20261127052408_space_name_nullable/snapshot.json +29 -0
  65. package/migrations/20261127060000_annotation_object_id_index/migration.sql +1 -0
  66. package/migrations/20261127060000_annotation_object_id_index/snapshot.json +69 -0
  67. package/migrations/20261127060001_annotation_subjects/migration.sql +78 -0
  68. package/migrations/20261127060001_annotation_subjects/snapshot.json +104 -0
  69. package/migrations/20261127060002_annotation_subject_index/migration.sql +1 -0
  70. package/migrations/20261127060002_annotation_subject_index/snapshot.json +70 -0
  71. package/migrations/20261127060003_annotation_title_url/migration.sql +84 -0
  72. package/migrations/20261127060003_annotation_title_url/snapshot.json +73 -0
  73. package/package.json +9 -7
  74. package/dist/auth-pause-state-f9hJM_zO.js +0 -113
  75. package/dist/catalog-runtime-BfdAnztW.js +0 -6
  76. package/dist/child-message-peFWLcCZ.js +0 -15
  77. package/dist/conversation-turn-Bru4w_FD.js +0 -1250
  78. package/dist/job-runner-B2XEvpif.js +0 -1505
  79. package/dist/lineage-nh4z9iQN.js +0 -36
  80. package/dist/list-HRP3TIRl.js +0 -12631
  81. package/dist/markers-CTTtJqYn.js +0 -342
  82. package/dist/message-BRUuLgrY.js +0 -153
  83. package/dist/model-input-CFC62mf-.js +0 -82
  84. package/dist/registry-Cl7Labpe.js +0 -3279
  85. package/dist/run-conversation-Cz2ubZK-.js +0 -337
  86. package/dist/sender-actors-77zTQbSG.js +0 -84
  87. package/dist/spawn-DuZfodPa.js +0 -45
  88. package/dist/task-runner-BJ9Up3bG.js +0 -1529
  89. package/dist/topic-CRYYBYp-.js +0 -7
  90. package/dist/topics-BoCkoPJJ.js +0 -21
  91. package/dist/turn-membership-VT7XZh-L.js +0 -856
  92. package/dist/turn-wake-C7HeLHAM.js +0 -151
@@ -1,151 +0,0 @@
1
- import { $r as resolveTurnResumeRouting, Nl as isTopLevel, Nr as getVercelConversationWorkQueue, fn as requestConversationWork, i as getConversationStore, n as getConversationEventStore, rn as ensureConversationWake, si as getDispatchRecord } from "./db-of6e3sGt.js";
2
- import { Sr as recordTurnSummary, br as getTurnRecord, pr as loadTurnCheckpoint, yr as failTurnRecord } from "./mailbox-turn-Byrry9o1.js";
3
- import { f as logException } from "./logging-BnOG0qz2.js";
4
- import * as z from "zod";
5
- // src/chat/task-execution/authorized-turn.ts
6
- /**
7
- * OAuth callbacks save readiness, not agent history. The conversation worker
8
- * consumes this event under its lease before it resumes the paused Turn.
9
- */
10
- const authorizationSchema = z.object({
11
- kind: z.enum(["mcp", "plugin"]),
12
- provider: z.string().min(1),
13
- actorId: z.string().min(1),
14
- authorizationId: z.string().min(1),
15
- authSessionId: z.string().optional(),
16
- scope: z.string().optional(),
17
- configuration: z.record(z.string(), z.unknown()).optional(),
18
- toolChannelId: z.string().optional()
19
- });
20
- function authorizationKey(turn) {
21
- return `turn:${turn.turnId}:authorization:${turn.version}`;
22
- }
23
- /** Save authorization for this parked boundary without changing model history. */
24
- async function recordTurnAuthorization(args) {
25
- const turn = await getTurnRecord(args.conversationId, args.turnId);
26
- if (!turn || turn.state !== "paused" || turn.resumeReason !== "auth") return;
27
- await getConversationEventStore().append(args.conversationId, [{
28
- idempotencyKey: authorizationKey(turn),
29
- createdAtMs: Date.now(),
30
- data: {
31
- type: "structured_event",
32
- namespace: "junior",
33
- name: "turn_authorized",
34
- version: 1,
35
- turnId: turn.turnId,
36
- content: authorizationSchema.parse(args)
37
- }
38
- }], { activity: "preserve" });
39
- return {
40
- conversationId: args.conversationId,
41
- destination: args.destination,
42
- turnId: turn.turnId,
43
- expectedVersion: turn.version
44
- };
45
- }
46
- /** Read authorization for the exact pause; a later auth pause needs its own callback. */
47
- async function getTurnAuthorization(turn) {
48
- const event = await getConversationEventStore().loadByIdempotencyKey(turn.conversationId, authorizationKey(turn));
49
- if (event?.data.type !== "structured_event") return void 0;
50
- return authorizationSchema.parse(event.data.content);
51
- }
52
- // src/chat/task-execution/turn-wake.ts
53
- /** Build the worker input for a paused turn. */
54
- async function getPausedTurnRequest(args) {
55
- const turn = (await loadTurnCheckpoint({
56
- conversationId: args.conversationId,
57
- turnId: args.turnId
58
- })).record;
59
- if (!turn || turn.state !== "paused" || turn.resumeReason !== "timeout" && turn.resumeReason !== "yield" && turn.resumeReason !== "retry" && !(turn.resumeReason === "auth" && await getTurnAuthorization(turn)) || turn.resumeReason === "timeout" && turn.sliceId < 2) return;
60
- let routing;
61
- try {
62
- routing = await resolveTurnResumeRouting({
63
- conversationId: args.conversationId,
64
- conversationStore: args.conversationStore,
65
- dispatchId: turn.dispatchId
66
- });
67
- } catch (error) {
68
- const failed = await failTurnRecord({
69
- conversationId: args.conversationId,
70
- expectedVersion: turn.version,
71
- turnId: args.turnId,
72
- errorMessage: error instanceof Error ? error.message : String(error)
73
- });
74
- if (failed) await recordFailedDispatchTurn(failed);
75
- return;
76
- }
77
- return {
78
- conversationId: args.conversationId,
79
- destination: routing.destination,
80
- turnId: args.turnId,
81
- expectedVersion: turn.version,
82
- traceContext: turn.traceContext
83
- };
84
- }
85
- /**
86
- * Record that a resume failed a dispatch turn for good. Without this outcome,
87
- * the dispatch runs the turn again, so a failed write is only logged.
88
- */
89
- async function recordFailedDispatchTurn(turn) {
90
- if (!turn.dispatchId) return;
91
- try {
92
- const dispatch = await getDispatchRecord(turn.dispatchId);
93
- await recordTurnSummary({
94
- conversationId: turn.conversationId,
95
- destination: dispatch?.destination,
96
- dispatchId: turn.dispatchId,
97
- dispatchOutcome: "failed",
98
- turnId: turn.turnId,
99
- sliceId: turn.sliceId,
100
- source: dispatch?.source,
101
- state: "failed",
102
- surface: turn.surface
103
- });
104
- } catch (error) {
105
- logException(error, "agent.continue.dispatch_failure_summary.failed", {
106
- "app.ai.conversation_id": turn.conversationId,
107
- "app.ai.session_id": turn.turnId
108
- });
109
- }
110
- }
111
- /** Wake the conversation worker for a paused turn. */
112
- async function wakePausedTurn(request, options = {}) {
113
- const nowMs = options.nowMs ?? Date.now();
114
- const conversation = await (options.conversationStore ?? getConversationStore()).get({ conversationId: request.conversationId });
115
- await requestConversationWork({
116
- conversationId: request.conversationId,
117
- destination: conversation && !isTopLevel(conversation) ? void 0 : request.destination,
118
- nowMs,
119
- state: options.state
120
- });
121
- const queue = options.queue ?? getVercelConversationWorkQueue();
122
- await ensureConversationWake({
123
- conversationId: request.conversationId,
124
- idempotencyKey: [
125
- "agent-continue",
126
- request.conversationId,
127
- request.turnId,
128
- request.expectedVersion,
129
- nowMs
130
- ].join(":"),
131
- nowMs,
132
- queue,
133
- state: options.state
134
- });
135
- }
136
- /** Create paused Turn operations for one app. */
137
- function createPausedTurns(options = {}) {
138
- return {
139
- get: (args) => getPausedTurnRequest({
140
- ...args,
141
- conversationStore: options.conversationStore
142
- }),
143
- wake: (request) => wakePausedTurn(request, options)
144
- };
145
- }
146
- /** Record completed authorization and wake the sole execution owner. */
147
- async function wakeAuthorizedTurn(args, queue) {
148
- const request = await recordTurnAuthorization(args);
149
- if (request) await wakePausedTurn(request, { queue });
150
- }
151
- export { wakePausedTurn as a, wakeAuthorizedTurn as i, getPausedTurnRequest as n, getTurnAuthorization as o, recordFailedDispatchTurn as r, createPausedTurns as t };