@sentry/junior 0.189.0 → 0.190.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.
- package/dist/{agent-hooks-6QRYH6PX.js → agent-hooks-3IG2FQW2.js} +11 -11
- package/dist/api.js +27 -27
- package/dist/app.js +86 -67
- package/dist/{catalog-runtime-IETJLJFG.js → catalog-runtime-2OT7S3ZC.js} +4 -4
- package/dist/chat/actor.d.ts +7 -2
- package/dist/chat/agent-invocations/types.d.ts +44 -308
- package/dist/chat/event-tasks/tool-support.d.ts +1 -1
- package/dist/chat/resource-events/actor.d.ts +2 -2
- package/dist/chat/source.d.ts +3 -3
- package/dist/chat/task-execution/mailbox-turn.d.ts +16 -6
- package/dist/chat/task-execution/state.d.ts +2 -2
- package/dist/chat/task-execution/store.d.ts +1 -1
- package/dist/chat/task-execution/turn-cursor.d.ts +10 -1
- package/dist/chat/tools/types.d.ts +9 -2
- package/dist/{chunk-6AUR6PWR.js → chunk-2MKHYSYL.js} +3 -3
- package/dist/{chunk-MI6ZBDTS.js → chunk-2MRF22J4.js} +25 -10
- package/dist/{chunk-OEIITG5F.js → chunk-3J3BCB4J.js} +1 -1
- package/dist/{chunk-SR6OMO5C.js → chunk-4BLFIYVK.js} +8 -8
- package/dist/{chunk-E3PDZPGV.js → chunk-4PKEJK5B.js} +1 -1
- package/dist/{chunk-CMWIMFM6.js → chunk-62DRKZQU.js} +5 -5
- package/dist/{chunk-ZV6PFUA4.js → chunk-663DQH5W.js} +1 -1
- package/dist/{chunk-GP32KD2J.js → chunk-67MMSYSE.js} +1 -1
- package/dist/{chunk-5CXCGDIL.js → chunk-6BXUSF7J.js} +1 -1
- package/dist/{chunk-WWYUYKKV.js → chunk-6H7YU6XH.js} +1 -1
- package/dist/{chunk-S3SGZUOI.js → chunk-7UJ6IJCK.js} +1 -1
- package/dist/{chunk-7R5JRPCY.js → chunk-7Y7XMI6P.js} +5 -5
- package/dist/{chunk-MFSET7Q7.js → chunk-BGOLRC36.js} +24 -8
- package/dist/{chunk-MVPLEPSI.js → chunk-BUJU6C2J.js} +1 -1
- package/dist/{chunk-KN32OWL2.js → chunk-CZXZKTAI.js} +3 -3
- package/dist/{chunk-QNIOBNOY.js → chunk-DJZGQ7OL.js} +52 -39
- package/dist/{chunk-DYXVAO2E.js → chunk-DVX6U6GI.js} +1 -1
- package/dist/{chunk-4RHJ3CXR.js → chunk-ECOR3OXY.js} +13 -12
- package/dist/{chunk-WMUAKAIF.js → chunk-F3K2267N.js} +29 -27
- package/dist/{chunk-YYZNESC3.js → chunk-FVFJ57RK.js} +8 -8
- package/dist/{chunk-PCPSX4ES.js → chunk-GWCFXTB6.js} +14 -12
- package/dist/{chunk-WDHPN2GH.js → chunk-HI5KXE3C.js} +3 -3
- package/dist/{chunk-WYDF6PGK.js → chunk-IRQ3RSX3.js} +3 -3
- package/dist/{chunk-NY2F7BZA.js → chunk-JV7U4665.js} +1 -1
- package/dist/{chunk-LHKZKAZ4.js → chunk-MNHJ4WLE.js} +3 -3
- package/dist/{chunk-YNZPOFF3.js → chunk-OJFX2FP7.js} +9 -9
- package/dist/{chunk-CUYFCI4G.js → chunk-OKAHLUSU.js} +16 -13
- package/dist/{chunk-VKQWU4PO.js → chunk-OON4IQHH.js} +1 -1
- package/dist/{chunk-AC7MDOJW.js → chunk-OYCOLHCR.js} +5 -5
- package/dist/{chunk-YYSEH2WC.js → chunk-REVH4BZU.js} +2 -2
- package/dist/{chunk-UCWO5MKP.js → chunk-RLYJYEIY.js} +4 -4
- package/dist/{chunk-ZUPDSJUE.js → chunk-T66GV7A3.js} +2 -2
- package/dist/{chunk-BYBSI5TI.js → chunk-VWNIDTFR.js} +2 -2
- package/dist/{chunk-MRXMFB4L.js → chunk-W2C4TPLB.js} +5 -5
- package/dist/{chunk-PY3EIEAF.js → chunk-Y4WL4OYD.js} +1 -1
- package/dist/{chunk-WN6VLHOU.js → chunk-YFU4DGZY.js} +4 -4
- package/dist/{chunk-O35GZCKL.js → chunk-YKIAUKYH.js} +2 -2
- package/dist/{chunk-5VWAY27R.js → chunk-ZFCO2TMB.js} +1 -1
- package/dist/cli/chat.js +33 -33
- package/dist/cli/check.js +5 -5
- package/dist/cli/plugins.js +12 -12
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +6 -6
- package/dist/db/schema/agent-invocations.d.ts +18 -6
- package/dist/db/schema.d.ts +18 -6
- package/dist/{db-LPJKR2EO.js → db-2IFDMDDY.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-DMXF4TTQ.js → oauth-callback-server-SZSS2KH6.js} +29 -29
- package/dist/{runner-L5DPVYCN.js → runner-2N4QU77X.js} +21 -21
- package/dist/{skills-NXG3LBCK.js → skills-VU2LZAKX.js} +5 -5
- package/dist/spawn-3K7RV4T5.js +42 -0
- package/dist/task-runner-52DYFHW3.js +36 -0
- package/dist/{validation-CH36LTOS.js → validation-IJGHK7NI.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-HBC5Y5VZ.js → work-DI45MLRL.js} +21 -21
- package/dist/{worker-5RDZHLXH.js → worker-FY7KWG2M.js} +10 -10
- package/package.json +5 -5
- package/dist/spawn-VRUIGKWW.js +0 -42
- package/dist/task-runner-7YTBSPXW.js +0 -36
package/dist/chat/actor.d.ts
CHANGED
|
@@ -69,9 +69,14 @@ export declare function createSlackActor(teamId: string, userId: string, profile
|
|
|
69
69
|
export declare function parseStoredSlackActor(value: unknown): StoredSlackActor | undefined;
|
|
70
70
|
/** Convert a runtime Slack actor into its durable session shape. */
|
|
71
71
|
export declare function toStoredSlackActor(actor: SlackActor): StoredSlackActor;
|
|
72
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Resolve a Slack resume actor from stored profile data and the active actor.
|
|
74
|
+
*
|
|
75
|
+
* TODO(dcramer): Require Actor and remove ID-only construction after no
|
|
76
|
+
* deployed Turn cursor can omit Actor.
|
|
77
|
+
*/
|
|
73
78
|
export declare function createSlackResumeActor(args: {
|
|
74
|
-
actor?:
|
|
79
|
+
actor?: Actor;
|
|
75
80
|
teamId: string;
|
|
76
81
|
userId: string;
|
|
77
82
|
}): SlackActor;
|
|
@@ -99,8 +99,8 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
99
99
|
xhigh: "xhigh";
|
|
100
100
|
none: "none";
|
|
101
101
|
}>>;
|
|
102
|
-
source: z.
|
|
103
|
-
|
|
102
|
+
source: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
103
|
+
kind: z.ZodLiteral<"slack">;
|
|
104
104
|
teamId: z.ZodString;
|
|
105
105
|
channelId: z.ZodString;
|
|
106
106
|
visibility: z.ZodEnum<{
|
|
@@ -109,90 +109,24 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
109
109
|
}>;
|
|
110
110
|
messageTs: z.ZodOptional<z.ZodString>;
|
|
111
111
|
threadTs: z.ZodOptional<z.ZodString>;
|
|
112
|
-
location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
113
|
-
id: z.ZodString;
|
|
114
|
-
provider: z.ZodLiteral<"slack">;
|
|
115
|
-
teamId: z.ZodString;
|
|
116
|
-
channelId: z.ZodString;
|
|
117
|
-
threadTs: z.ZodOptional<z.ZodString>;
|
|
118
|
-
}, z.core.$strict>], "provider">>;
|
|
119
112
|
}, z.core.$strict>, z.ZodObject<{
|
|
120
|
-
|
|
113
|
+
kind: z.ZodLiteral<"local">;
|
|
121
114
|
visibility: z.ZodLiteral<"private">;
|
|
122
115
|
conversationId: z.ZodString;
|
|
123
|
-
location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
124
|
-
id: z.ZodString;
|
|
125
|
-
provider: z.ZodLiteral<"slack">;
|
|
126
|
-
teamId: z.ZodString;
|
|
127
|
-
channelId: z.ZodString;
|
|
128
|
-
threadTs: z.ZodOptional<z.ZodString>;
|
|
129
|
-
}, z.core.$strict>], "provider">>;
|
|
130
116
|
}, z.core.$strict>, z.ZodObject<{
|
|
131
|
-
|
|
117
|
+
kind: z.ZodLiteral<"web">;
|
|
132
118
|
visibility: z.ZodEnum<{
|
|
133
119
|
private: "private";
|
|
134
120
|
public: "public";
|
|
135
121
|
}>;
|
|
136
122
|
conversationId: z.ZodString;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}, z.core.$strict>], "platform">, z.ZodTransform<{
|
|
145
|
-
platform: "slack";
|
|
146
|
-
teamId: string;
|
|
147
|
-
channelId: string;
|
|
148
|
-
visibility: "private" | "public";
|
|
149
|
-
messageTs?: string | undefined;
|
|
150
|
-
threadTs?: string | undefined;
|
|
151
|
-
} | {
|
|
152
|
-
platform: "local";
|
|
153
|
-
visibility: "private";
|
|
154
|
-
conversationId: string;
|
|
155
|
-
} | {
|
|
156
|
-
platform: "web";
|
|
157
|
-
visibility: "private" | "public";
|
|
158
|
-
conversationId: string;
|
|
159
|
-
}, {
|
|
160
|
-
platform: "slack";
|
|
161
|
-
teamId: string;
|
|
162
|
-
channelId: string;
|
|
163
|
-
visibility: "private" | "public";
|
|
164
|
-
messageTs?: string | undefined;
|
|
165
|
-
threadTs?: string | undefined;
|
|
166
|
-
location?: {
|
|
167
|
-
id: string;
|
|
168
|
-
provider: "slack";
|
|
169
|
-
teamId: string;
|
|
170
|
-
channelId: string;
|
|
171
|
-
threadTs?: string | undefined;
|
|
172
|
-
} | undefined;
|
|
173
|
-
} | {
|
|
174
|
-
platform: "local";
|
|
175
|
-
visibility: "private";
|
|
176
|
-
conversationId: string;
|
|
177
|
-
location?: {
|
|
178
|
-
id: string;
|
|
179
|
-
provider: "slack";
|
|
180
|
-
teamId: string;
|
|
181
|
-
channelId: string;
|
|
182
|
-
threadTs?: string | undefined;
|
|
183
|
-
} | undefined;
|
|
184
|
-
} | {
|
|
185
|
-
platform: "web";
|
|
186
|
-
visibility: "private" | "public";
|
|
187
|
-
conversationId: string;
|
|
188
|
-
location?: {
|
|
189
|
-
id: string;
|
|
190
|
-
provider: "slack";
|
|
191
|
-
teamId: string;
|
|
192
|
-
channelId: string;
|
|
193
|
-
threadTs?: string | undefined;
|
|
194
|
-
} | undefined;
|
|
195
|
-
}>>;
|
|
123
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
124
|
+
kind: z.ZodLiteral<"resource_event">;
|
|
125
|
+
eventKey: z.ZodString;
|
|
126
|
+
eventType: z.ZodString;
|
|
127
|
+
identifier: z.ZodString;
|
|
128
|
+
namespace: z.ZodString;
|
|
129
|
+
}, z.core.$strict>], "kind">>;
|
|
196
130
|
updatedAtMs: z.ZodNumber;
|
|
197
131
|
status: z.ZodEnum<{
|
|
198
132
|
pending: "pending";
|
|
@@ -292,8 +226,8 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
292
226
|
xhigh: "xhigh";
|
|
293
227
|
none: "none";
|
|
294
228
|
}>>;
|
|
295
|
-
source: z.
|
|
296
|
-
|
|
229
|
+
source: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
230
|
+
kind: z.ZodLiteral<"slack">;
|
|
297
231
|
teamId: z.ZodString;
|
|
298
232
|
channelId: z.ZodString;
|
|
299
233
|
visibility: z.ZodEnum<{
|
|
@@ -302,90 +236,24 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
302
236
|
}>;
|
|
303
237
|
messageTs: z.ZodOptional<z.ZodString>;
|
|
304
238
|
threadTs: z.ZodOptional<z.ZodString>;
|
|
305
|
-
location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
306
|
-
id: z.ZodString;
|
|
307
|
-
provider: z.ZodLiteral<"slack">;
|
|
308
|
-
teamId: z.ZodString;
|
|
309
|
-
channelId: z.ZodString;
|
|
310
|
-
threadTs: z.ZodOptional<z.ZodString>;
|
|
311
|
-
}, z.core.$strict>], "provider">>;
|
|
312
239
|
}, z.core.$strict>, z.ZodObject<{
|
|
313
|
-
|
|
240
|
+
kind: z.ZodLiteral<"local">;
|
|
314
241
|
visibility: z.ZodLiteral<"private">;
|
|
315
242
|
conversationId: z.ZodString;
|
|
316
|
-
location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
317
|
-
id: z.ZodString;
|
|
318
|
-
provider: z.ZodLiteral<"slack">;
|
|
319
|
-
teamId: z.ZodString;
|
|
320
|
-
channelId: z.ZodString;
|
|
321
|
-
threadTs: z.ZodOptional<z.ZodString>;
|
|
322
|
-
}, z.core.$strict>], "provider">>;
|
|
323
243
|
}, z.core.$strict>, z.ZodObject<{
|
|
324
|
-
|
|
244
|
+
kind: z.ZodLiteral<"web">;
|
|
325
245
|
visibility: z.ZodEnum<{
|
|
326
246
|
private: "private";
|
|
327
247
|
public: "public";
|
|
328
248
|
}>;
|
|
329
249
|
conversationId: z.ZodString;
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}, z.core.$strict>], "platform">, z.ZodTransform<{
|
|
338
|
-
platform: "slack";
|
|
339
|
-
teamId: string;
|
|
340
|
-
channelId: string;
|
|
341
|
-
visibility: "private" | "public";
|
|
342
|
-
messageTs?: string | undefined;
|
|
343
|
-
threadTs?: string | undefined;
|
|
344
|
-
} | {
|
|
345
|
-
platform: "local";
|
|
346
|
-
visibility: "private";
|
|
347
|
-
conversationId: string;
|
|
348
|
-
} | {
|
|
349
|
-
platform: "web";
|
|
350
|
-
visibility: "private" | "public";
|
|
351
|
-
conversationId: string;
|
|
352
|
-
}, {
|
|
353
|
-
platform: "slack";
|
|
354
|
-
teamId: string;
|
|
355
|
-
channelId: string;
|
|
356
|
-
visibility: "private" | "public";
|
|
357
|
-
messageTs?: string | undefined;
|
|
358
|
-
threadTs?: string | undefined;
|
|
359
|
-
location?: {
|
|
360
|
-
id: string;
|
|
361
|
-
provider: "slack";
|
|
362
|
-
teamId: string;
|
|
363
|
-
channelId: string;
|
|
364
|
-
threadTs?: string | undefined;
|
|
365
|
-
} | undefined;
|
|
366
|
-
} | {
|
|
367
|
-
platform: "local";
|
|
368
|
-
visibility: "private";
|
|
369
|
-
conversationId: string;
|
|
370
|
-
location?: {
|
|
371
|
-
id: string;
|
|
372
|
-
provider: "slack";
|
|
373
|
-
teamId: string;
|
|
374
|
-
channelId: string;
|
|
375
|
-
threadTs?: string | undefined;
|
|
376
|
-
} | undefined;
|
|
377
|
-
} | {
|
|
378
|
-
platform: "web";
|
|
379
|
-
visibility: "private" | "public";
|
|
380
|
-
conversationId: string;
|
|
381
|
-
location?: {
|
|
382
|
-
id: string;
|
|
383
|
-
provider: "slack";
|
|
384
|
-
teamId: string;
|
|
385
|
-
channelId: string;
|
|
386
|
-
threadTs?: string | undefined;
|
|
387
|
-
} | undefined;
|
|
388
|
-
}>>;
|
|
250
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
251
|
+
kind: z.ZodLiteral<"resource_event">;
|
|
252
|
+
eventKey: z.ZodString;
|
|
253
|
+
eventType: z.ZodString;
|
|
254
|
+
identifier: z.ZodString;
|
|
255
|
+
namespace: z.ZodString;
|
|
256
|
+
}, z.core.$strict>], "kind">>;
|
|
389
257
|
updatedAtMs: z.ZodNumber;
|
|
390
258
|
result: z.ZodString;
|
|
391
259
|
status: z.ZodLiteral<"completed">;
|
|
@@ -483,8 +351,8 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
483
351
|
xhigh: "xhigh";
|
|
484
352
|
none: "none";
|
|
485
353
|
}>>;
|
|
486
|
-
source: z.
|
|
487
|
-
|
|
354
|
+
source: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
355
|
+
kind: z.ZodLiteral<"slack">;
|
|
488
356
|
teamId: z.ZodString;
|
|
489
357
|
channelId: z.ZodString;
|
|
490
358
|
visibility: z.ZodEnum<{
|
|
@@ -493,90 +361,24 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
493
361
|
}>;
|
|
494
362
|
messageTs: z.ZodOptional<z.ZodString>;
|
|
495
363
|
threadTs: z.ZodOptional<z.ZodString>;
|
|
496
|
-
location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
497
|
-
id: z.ZodString;
|
|
498
|
-
provider: z.ZodLiteral<"slack">;
|
|
499
|
-
teamId: z.ZodString;
|
|
500
|
-
channelId: z.ZodString;
|
|
501
|
-
threadTs: z.ZodOptional<z.ZodString>;
|
|
502
|
-
}, z.core.$strict>], "provider">>;
|
|
503
364
|
}, z.core.$strict>, z.ZodObject<{
|
|
504
|
-
|
|
365
|
+
kind: z.ZodLiteral<"local">;
|
|
505
366
|
visibility: z.ZodLiteral<"private">;
|
|
506
367
|
conversationId: z.ZodString;
|
|
507
|
-
location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
508
|
-
id: z.ZodString;
|
|
509
|
-
provider: z.ZodLiteral<"slack">;
|
|
510
|
-
teamId: z.ZodString;
|
|
511
|
-
channelId: z.ZodString;
|
|
512
|
-
threadTs: z.ZodOptional<z.ZodString>;
|
|
513
|
-
}, z.core.$strict>], "provider">>;
|
|
514
368
|
}, z.core.$strict>, z.ZodObject<{
|
|
515
|
-
|
|
369
|
+
kind: z.ZodLiteral<"web">;
|
|
516
370
|
visibility: z.ZodEnum<{
|
|
517
371
|
private: "private";
|
|
518
372
|
public: "public";
|
|
519
373
|
}>;
|
|
520
374
|
conversationId: z.ZodString;
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
}, z.core.$strict>], "platform">, z.ZodTransform<{
|
|
529
|
-
platform: "slack";
|
|
530
|
-
teamId: string;
|
|
531
|
-
channelId: string;
|
|
532
|
-
visibility: "private" | "public";
|
|
533
|
-
messageTs?: string | undefined;
|
|
534
|
-
threadTs?: string | undefined;
|
|
535
|
-
} | {
|
|
536
|
-
platform: "local";
|
|
537
|
-
visibility: "private";
|
|
538
|
-
conversationId: string;
|
|
539
|
-
} | {
|
|
540
|
-
platform: "web";
|
|
541
|
-
visibility: "private" | "public";
|
|
542
|
-
conversationId: string;
|
|
543
|
-
}, {
|
|
544
|
-
platform: "slack";
|
|
545
|
-
teamId: string;
|
|
546
|
-
channelId: string;
|
|
547
|
-
visibility: "private" | "public";
|
|
548
|
-
messageTs?: string | undefined;
|
|
549
|
-
threadTs?: string | undefined;
|
|
550
|
-
location?: {
|
|
551
|
-
id: string;
|
|
552
|
-
provider: "slack";
|
|
553
|
-
teamId: string;
|
|
554
|
-
channelId: string;
|
|
555
|
-
threadTs?: string | undefined;
|
|
556
|
-
} | undefined;
|
|
557
|
-
} | {
|
|
558
|
-
platform: "local";
|
|
559
|
-
visibility: "private";
|
|
560
|
-
conversationId: string;
|
|
561
|
-
location?: {
|
|
562
|
-
id: string;
|
|
563
|
-
provider: "slack";
|
|
564
|
-
teamId: string;
|
|
565
|
-
channelId: string;
|
|
566
|
-
threadTs?: string | undefined;
|
|
567
|
-
} | undefined;
|
|
568
|
-
} | {
|
|
569
|
-
platform: "web";
|
|
570
|
-
visibility: "private" | "public";
|
|
571
|
-
conversationId: string;
|
|
572
|
-
location?: {
|
|
573
|
-
id: string;
|
|
574
|
-
provider: "slack";
|
|
575
|
-
teamId: string;
|
|
576
|
-
channelId: string;
|
|
577
|
-
threadTs?: string | undefined;
|
|
578
|
-
} | undefined;
|
|
579
|
-
}>>;
|
|
375
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
376
|
+
kind: z.ZodLiteral<"resource_event">;
|
|
377
|
+
eventKey: z.ZodString;
|
|
378
|
+
eventType: z.ZodString;
|
|
379
|
+
identifier: z.ZodString;
|
|
380
|
+
namespace: z.ZodString;
|
|
381
|
+
}, z.core.$strict>], "kind">>;
|
|
580
382
|
updatedAtMs: z.ZodNumber;
|
|
581
383
|
errorMessage: z.ZodString;
|
|
582
384
|
status: z.ZodEnum<{
|
|
@@ -672,8 +474,8 @@ export declare const createAgentInvocationSchema: z.ZodObject<{
|
|
|
672
474
|
xhigh: "xhigh";
|
|
673
475
|
none: "none";
|
|
674
476
|
}>>;
|
|
675
|
-
source: z.
|
|
676
|
-
|
|
477
|
+
source: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
478
|
+
kind: z.ZodLiteral<"slack">;
|
|
677
479
|
teamId: z.ZodString;
|
|
678
480
|
channelId: z.ZodString;
|
|
679
481
|
visibility: z.ZodEnum<{
|
|
@@ -682,90 +484,24 @@ export declare const createAgentInvocationSchema: z.ZodObject<{
|
|
|
682
484
|
}>;
|
|
683
485
|
messageTs: z.ZodOptional<z.ZodString>;
|
|
684
486
|
threadTs: z.ZodOptional<z.ZodString>;
|
|
685
|
-
location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
686
|
-
id: z.ZodString;
|
|
687
|
-
provider: z.ZodLiteral<"slack">;
|
|
688
|
-
teamId: z.ZodString;
|
|
689
|
-
channelId: z.ZodString;
|
|
690
|
-
threadTs: z.ZodOptional<z.ZodString>;
|
|
691
|
-
}, z.core.$strict>], "provider">>;
|
|
692
487
|
}, z.core.$strict>, z.ZodObject<{
|
|
693
|
-
|
|
488
|
+
kind: z.ZodLiteral<"local">;
|
|
694
489
|
visibility: z.ZodLiteral<"private">;
|
|
695
490
|
conversationId: z.ZodString;
|
|
696
|
-
location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
697
|
-
id: z.ZodString;
|
|
698
|
-
provider: z.ZodLiteral<"slack">;
|
|
699
|
-
teamId: z.ZodString;
|
|
700
|
-
channelId: z.ZodString;
|
|
701
|
-
threadTs: z.ZodOptional<z.ZodString>;
|
|
702
|
-
}, z.core.$strict>], "provider">>;
|
|
703
491
|
}, z.core.$strict>, z.ZodObject<{
|
|
704
|
-
|
|
492
|
+
kind: z.ZodLiteral<"web">;
|
|
705
493
|
visibility: z.ZodEnum<{
|
|
706
494
|
private: "private";
|
|
707
495
|
public: "public";
|
|
708
496
|
}>;
|
|
709
497
|
conversationId: z.ZodString;
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
}, z.core.$strict>], "platform">, z.ZodTransform<{
|
|
718
|
-
platform: "slack";
|
|
719
|
-
teamId: string;
|
|
720
|
-
channelId: string;
|
|
721
|
-
visibility: "private" | "public";
|
|
722
|
-
messageTs?: string | undefined;
|
|
723
|
-
threadTs?: string | undefined;
|
|
724
|
-
} | {
|
|
725
|
-
platform: "local";
|
|
726
|
-
visibility: "private";
|
|
727
|
-
conversationId: string;
|
|
728
|
-
} | {
|
|
729
|
-
platform: "web";
|
|
730
|
-
visibility: "private" | "public";
|
|
731
|
-
conversationId: string;
|
|
732
|
-
}, {
|
|
733
|
-
platform: "slack";
|
|
734
|
-
teamId: string;
|
|
735
|
-
channelId: string;
|
|
736
|
-
visibility: "private" | "public";
|
|
737
|
-
messageTs?: string | undefined;
|
|
738
|
-
threadTs?: string | undefined;
|
|
739
|
-
location?: {
|
|
740
|
-
id: string;
|
|
741
|
-
provider: "slack";
|
|
742
|
-
teamId: string;
|
|
743
|
-
channelId: string;
|
|
744
|
-
threadTs?: string | undefined;
|
|
745
|
-
} | undefined;
|
|
746
|
-
} | {
|
|
747
|
-
platform: "local";
|
|
748
|
-
visibility: "private";
|
|
749
|
-
conversationId: string;
|
|
750
|
-
location?: {
|
|
751
|
-
id: string;
|
|
752
|
-
provider: "slack";
|
|
753
|
-
teamId: string;
|
|
754
|
-
channelId: string;
|
|
755
|
-
threadTs?: string | undefined;
|
|
756
|
-
} | undefined;
|
|
757
|
-
} | {
|
|
758
|
-
platform: "web";
|
|
759
|
-
visibility: "private" | "public";
|
|
760
|
-
conversationId: string;
|
|
761
|
-
location?: {
|
|
762
|
-
id: string;
|
|
763
|
-
provider: "slack";
|
|
764
|
-
teamId: string;
|
|
765
|
-
channelId: string;
|
|
766
|
-
threadTs?: string | undefined;
|
|
767
|
-
} | undefined;
|
|
768
|
-
}>>;
|
|
498
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
499
|
+
kind: z.ZodLiteral<"resource_event">;
|
|
500
|
+
eventKey: z.ZodString;
|
|
501
|
+
eventType: z.ZodString;
|
|
502
|
+
identifier: z.ZodString;
|
|
503
|
+
namespace: z.ZodString;
|
|
504
|
+
}, z.core.$strict>], "kind">>;
|
|
769
505
|
}, z.core.$strict>;
|
|
770
506
|
export type AgentBinding = z.output<typeof agentBindingSchema>;
|
|
771
507
|
export type AgentInvocation = z.output<typeof agentInvocationSchema>;
|
|
@@ -23,8 +23,8 @@ export declare const RESOURCE_EVENT_SYSTEM_ACTOR: {
|
|
|
23
23
|
/**
|
|
24
24
|
* Whether a saved Message started a resource-event Turn.
|
|
25
25
|
*
|
|
26
|
-
* TODO(dcramer): Delete this marker check after
|
|
27
|
-
*
|
|
26
|
+
* TODO(dcramer): Delete this marker check after deployed Turn cursors all store
|
|
27
|
+
* Source and Actor. `eventType` only supports saved synthetic Slack input.
|
|
28
28
|
*/
|
|
29
29
|
export declare function isResourceEventConversationMessage(message: {
|
|
30
30
|
author?: {
|
package/dist/chat/source.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type Source } from "@sentry/junior-plugin-api";
|
|
2
2
|
/** Source coordinates reduced to the stable locator for one conversation. */
|
|
3
3
|
export type SessionSource = Extract<Source, {
|
|
4
|
-
|
|
4
|
+
kind: "web";
|
|
5
5
|
}> | Extract<Source, {
|
|
6
|
-
|
|
6
|
+
kind: "local";
|
|
7
7
|
}> | Omit<Extract<Source, {
|
|
8
|
-
|
|
8
|
+
kind: "slack";
|
|
9
9
|
}>, "messageTs">;
|
|
10
10
|
/**
|
|
11
11
|
* Normalize a turn Source into the session-stable locator persisted on a
|
|
@@ -10,17 +10,27 @@ export type MailboxTurnInput = {
|
|
|
10
10
|
actor: Actor;
|
|
11
11
|
author: ConversationAuthor;
|
|
12
12
|
message: InboundMessage;
|
|
13
|
-
source:
|
|
13
|
+
source: Source;
|
|
14
14
|
};
|
|
15
15
|
/** Actor and Source facts saved for one Turn. */
|
|
16
16
|
export type TurnInputFacts = Pick<MailboxTurnInput, "actor" | "author" | "source">;
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Restore Turn input facts, with saved Message fallback for legacy cursors.
|
|
19
|
+
*
|
|
20
|
+
* TODO(dcramer): Remove Actor and Source reconstruction from the saved Message
|
|
21
|
+
* after no deployed Turn cursor can omit either field.
|
|
22
|
+
*/
|
|
23
|
+
export declare function turnInputFactsFromConversationMessage(message: ConversationMessage, args: {
|
|
21
24
|
conversationId: string;
|
|
22
25
|
location?: Location;
|
|
23
|
-
|
|
26
|
+
savedActor?: Actor;
|
|
27
|
+
savedSource?: Source;
|
|
28
|
+
visibility?: ConversationPrivacy;
|
|
29
|
+
}): TurnInputFacts | undefined;
|
|
30
|
+
/** Normalize the selected mailbox Source with current Conversation visibility. */
|
|
31
|
+
export declare function sourceFromTurnInput(args: {
|
|
32
|
+
conversationId: string;
|
|
33
|
+
source: Source;
|
|
24
34
|
visibility?: ConversationPrivacy;
|
|
25
35
|
}): Source;
|
|
26
36
|
/** Return the active web Turn for one Conversation, if it has one. */
|
|
@@ -18,11 +18,11 @@ declare const inboundMessageSourceSchema: z.ZodEnum<{
|
|
|
18
18
|
slack: "slack";
|
|
19
19
|
local: "local";
|
|
20
20
|
web: "web";
|
|
21
|
+
resource_event: "resource_event";
|
|
21
22
|
plugin: "plugin";
|
|
22
23
|
api: "api";
|
|
23
24
|
scheduler: "scheduler";
|
|
24
25
|
internal: "internal";
|
|
25
|
-
resource_event: "resource_event";
|
|
26
26
|
}>;
|
|
27
27
|
export type Source = z.output<typeof inboundMessageSourceSchema>;
|
|
28
28
|
export type ExecutionStatus = "paused" | "failed" | "idle" | "pending" | "running";
|
|
@@ -72,11 +72,11 @@ export declare const inboundMessageSchema: z.ZodObject<{
|
|
|
72
72
|
slack: "slack";
|
|
73
73
|
local: "local";
|
|
74
74
|
web: "web";
|
|
75
|
+
resource_event: "resource_event";
|
|
75
76
|
plugin: "plugin";
|
|
76
77
|
api: "api";
|
|
77
78
|
scheduler: "scheduler";
|
|
78
79
|
internal: "internal";
|
|
79
|
-
resource_event: "resource_event";
|
|
80
80
|
}>;
|
|
81
81
|
}, z.core.$strict>;
|
|
82
82
|
export type InboundMessage = z.output<typeof inboundMessageSchema>;
|
|
@@ -139,7 +139,7 @@ export declare function drainConversationMailbox(args: Parameters<typeof workSta
|
|
|
139
139
|
};
|
|
140
140
|
receivedAtMs: number;
|
|
141
141
|
publishExternally: boolean;
|
|
142
|
-
source: "slack" | "local" | "web" | "
|
|
142
|
+
source: "slack" | "local" | "web" | "resource_event" | "plugin" | "api" | "scheduler" | "internal";
|
|
143
143
|
attemptCount?: number | undefined;
|
|
144
144
|
destination?: {
|
|
145
145
|
platform: "slack";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* keeps resume metadata and a committed `seq` cursor into
|
|
8
8
|
* `junior_conversation_events`.
|
|
9
9
|
*/
|
|
10
|
-
import type
|
|
10
|
+
import { type Destination, type Source } from "@sentry/junior-plugin-api";
|
|
11
11
|
import { type PiMessage } from "@/chat/pi/messages";
|
|
12
12
|
import { type Actor } from "@/chat/actor";
|
|
13
13
|
import { type ConversationMessageProvenance } from "@/chat/conversations/provenance";
|
|
@@ -20,6 +20,13 @@ export type AgentTurnSurface = "slack" | "api" | "scheduler" | "internal";
|
|
|
20
20
|
export type TurnPauseReason = "timeout" | "auth" | "yield" | "retry";
|
|
21
21
|
export type AgentDispatchOutcome = "blocked" | "completed" | "failed";
|
|
22
22
|
export interface TurnRecord {
|
|
23
|
+
/**
|
|
24
|
+
* Actor that started this Turn; absent only on stored legacy cursors.
|
|
25
|
+
*
|
|
26
|
+
* TODO(dcramer): Make this field required after no deployed Turn cursor can
|
|
27
|
+
* omit Actor.
|
|
28
|
+
*/
|
|
29
|
+
actor?: Actor;
|
|
23
30
|
channelName?: string;
|
|
24
31
|
schemaVersion: 2;
|
|
25
32
|
version: number;
|
|
@@ -44,6 +51,8 @@ export interface TurnRecord {
|
|
|
44
51
|
actors: Actor[];
|
|
45
52
|
resumeReason?: TurnPauseReason;
|
|
46
53
|
publishExternally?: boolean;
|
|
54
|
+
/** Input that started this Turn; absent only on stored legacy cursors. */
|
|
55
|
+
source?: Source;
|
|
47
56
|
resumedFromSliceId?: number;
|
|
48
57
|
turnId: string;
|
|
49
58
|
sliceId: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FileUpload } from "chat";
|
|
2
|
-
import type { WebSource, Destination, Identity, LocalDestination, LocalSource, PluginEgress, SlackDestination, SlackSource, Source, User } from "@sentry/junior-plugin-api";
|
|
2
|
+
import type { WebSource, ResourceEventSource, Destination, Identity, LocalDestination, LocalSource, PluginEgress, SlackDestination, SlackSource, Source, SystemActor, User } from "@sentry/junior-plugin-api";
|
|
3
3
|
import type { McpToolManager } from "@/chat/mcp/tool-manager";
|
|
4
4
|
import type { SandboxWorkspace } from "@/chat/sandbox/workspace";
|
|
5
5
|
import type { AgentTurnSurface } from "@/chat/task-execution/checkpoint";
|
|
@@ -109,7 +109,14 @@ interface WebToolRuntimeContext extends BaseToolRuntimeContext {
|
|
|
109
109
|
slack?: never;
|
|
110
110
|
slackActionToken?: never;
|
|
111
111
|
}
|
|
112
|
-
|
|
112
|
+
interface ResourceEventToolRuntimeContext extends BaseToolRuntimeContext {
|
|
113
|
+
destination: Destination;
|
|
114
|
+
actor?: SystemActor;
|
|
115
|
+
source: ResourceEventSource;
|
|
116
|
+
slack?: never;
|
|
117
|
+
slackActionToken?: never;
|
|
118
|
+
}
|
|
119
|
+
export type ToolRuntimeContext = LocalToolRuntimeContext | ResourceEventToolRuntimeContext | SlackToolRuntimeContext | WebToolRuntimeContext;
|
|
113
120
|
export interface ToolState {
|
|
114
121
|
getOperationResult: <T>(operationKey: string) => T | undefined;
|
|
115
122
|
setOperationResult: (operationKey: string, result: unknown) => void;
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
isStale,
|
|
7
7
|
runNonInteractiveCommand,
|
|
8
8
|
sleep
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HI5KXE3C.js";
|
|
10
10
|
import {
|
|
11
11
|
getStateAdapter
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6BXUSF7J.js";
|
|
13
13
|
import {
|
|
14
14
|
setSpanAttributes,
|
|
15
15
|
withSpan
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-Y4WL4OYD.js";
|
|
17
17
|
|
|
18
18
|
// src/chat/sandbox/resources.ts
|
|
19
19
|
var configuredResources;
|