@sentry/junior 0.189.0 → 0.191.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-HIWWBBKO.js} +11 -11
- package/dist/api.js +27 -27
- package/dist/app.js +134 -152
- package/dist/{catalog-runtime-IETJLJFG.js → catalog-runtime-4OKH4265.js} +4 -4
- package/dist/chat/actor.d.ts +7 -2
- package/dist/chat/agent/resume.d.ts +0 -1
- package/dist/chat/agent/types.d.ts +0 -1
- package/dist/chat/agent-invocations/types.d.ts +44 -308
- package/dist/chat/event-tasks/tool-support.d.ts +1 -1
- package/dist/chat/providers/slack/runtime.d.ts +1 -2
- package/dist/chat/providers/slack/system-turn.d.ts +9 -4
- package/dist/chat/providers/slack/turn.d.ts +0 -1
- package/dist/chat/resource-events/actor.d.ts +2 -2
- package/dist/chat/services/turn-router.d.ts +1 -1
- package/dist/chat/slack/dispatch-turn.d.ts +0 -1
- package/dist/chat/slack/timestamp-param.d.ts +1 -1
- package/dist/chat/source.d.ts +3 -3
- package/dist/chat/task-execution/assistant-message.d.ts +7 -7
- package/dist/chat/task-execution/checkpoint.d.ts +0 -1
- package/dist/chat/task-execution/conversation-turn.d.ts +2 -2
- package/dist/chat/task-execution/mailbox-turn.d.ts +16 -6
- package/dist/chat/task-execution/state.d.ts +2 -5
- package/dist/chat/task-execution/store.d.ts +1 -2
- package/dist/chat/task-execution/turn-cursor.d.ts +10 -3
- package/dist/chat/task-execution/worker.d.ts +0 -1
- package/dist/chat/tools/types.d.ts +9 -2
- package/dist/{chunk-BYBSI5TI.js → chunk-2JAWOTUT.js} +2 -2
- package/dist/{chunk-WN6VLHOU.js → chunk-3PDR63SX.js} +30 -9
- package/dist/{chunk-SR6OMO5C.js → chunk-5IMKUVMS.js} +8 -11
- package/dist/{chunk-YYSEH2WC.js → chunk-6KISW5UY.js} +2 -2
- package/dist/{chunk-WDHPN2GH.js → chunk-7PYCRKQL.js} +3 -3
- package/dist/{chunk-YNZPOFF3.js → chunk-AWFSSFAX.js} +9 -11
- package/dist/{chunk-OEIITG5F.js → chunk-BVWC5DBM.js} +1 -1
- package/dist/{chunk-DYXVAO2E.js → chunk-BVYUIVXE.js} +1 -1
- package/dist/{chunk-WYDF6PGK.js → chunk-CCPOZMS4.js} +3 -3
- package/dist/{chunk-YYZNESC3.js → chunk-CECRMPXJ.js} +9 -8
- package/dist/{chunk-6AUR6PWR.js → chunk-CUUE5MGF.js} +3 -3
- package/dist/{chunk-MVPLEPSI.js → chunk-DP6H3U2X.js} +1 -1
- package/dist/{chunk-E3PDZPGV.js → chunk-EQZUBYRF.js} +1 -1
- package/dist/{chunk-PCPSX4ES.js → chunk-GQN4REF5.js} +14 -12
- package/dist/{chunk-AC7MDOJW.js → chunk-HNMRX2EN.js} +5 -5
- package/dist/{chunk-7R5JRPCY.js → chunk-K2NKG42A.js} +5 -5
- package/dist/{chunk-MFSET7Q7.js → chunk-KTW62MG5.js} +31 -13
- package/dist/{chunk-PY3EIEAF.js → chunk-L4JLLS6C.js} +1 -1
- package/dist/{chunk-CMWIMFM6.js → chunk-LOYTPSAK.js} +5 -5
- package/dist/{chunk-S3SGZUOI.js → chunk-MFZOIKET.js} +1 -1
- package/dist/{chunk-MI6ZBDTS.js → chunk-NK3UEKAW.js} +25 -10
- package/dist/{chunk-QNIOBNOY.js → chunk-NY5SJGJZ.js} +52 -46
- package/dist/{chunk-4RHJ3CXR.js → chunk-Q32BSFN4.js} +13 -12
- package/dist/{chunk-ZV6PFUA4.js → chunk-QRNJO7DZ.js} +1 -1
- package/dist/{chunk-KN32OWL2.js → chunk-RZS4F5K4.js} +3 -3
- package/dist/{chunk-CUYFCI4G.js → chunk-S7NSFCCW.js} +16 -13
- package/dist/{chunk-5VWAY27R.js → chunk-SEIZ2XLD.js} +1 -1
- package/dist/{chunk-MRXMFB4L.js → chunk-SGRL7NV6.js} +5 -5
- package/dist/{chunk-WWYUYKKV.js → chunk-TH6LMEOW.js} +1 -1
- package/dist/{chunk-WMUAKAIF.js → chunk-VGYZ3YZM.js} +85 -41
- package/dist/{chunk-ZUPDSJUE.js → chunk-WBNQYVCM.js} +2 -2
- package/dist/{chunk-GP32KD2J.js → chunk-WCSXTDOL.js} +1 -1
- package/dist/{chunk-O35GZCKL.js → chunk-WNIVCR74.js} +2 -2
- package/dist/{chunk-UCWO5MKP.js → chunk-X6PQKQTY.js} +5 -7
- package/dist/{chunk-5CXCGDIL.js → chunk-YNRLCUCB.js} +1 -1
- package/dist/{chunk-LHKZKAZ4.js → chunk-ZJRGWZZ2.js} +3 -3
- package/dist/{chunk-NY2F7BZA.js → chunk-ZNFNGDT7.js} +1 -1
- package/dist/{chunk-VKQWU4PO.js → chunk-ZRN3OS7M.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-LG4ZEWA3.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-KI7ZRTOG.js} +29 -29
- package/dist/{runner-L5DPVYCN.js → runner-K2EOSAZQ.js} +21 -21
- package/dist/{skills-NXG3LBCK.js → skills-JTRDFKMA.js} +5 -5
- package/dist/spawn-SRBETYCF.js +42 -0
- package/dist/task-runner-INQIQ4VF.js +36 -0
- package/dist/{validation-CH36LTOS.js → validation-NBWURHAP.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-HBC5Y5VZ.js → work-35TBEAUI.js} +21 -21
- package/dist/{worker-5RDZHLXH.js → worker-F762M6XM.js} +10 -10
- package/package.json +6 -6
- package/dist/spawn-VRUIGKWW.js +0 -42
- package/dist/task-runner-7YTBSPXW.js +0 -36
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-EQZUBYRF.js";
|
|
4
|
+
import "./chunk-QRNJO7DZ.js";
|
|
5
5
|
import "./chunk-CEMMLV5L.js";
|
|
6
6
|
import "./chunk-N7TMSOZH.js";
|
|
7
7
|
import "./chunk-DWPN6SCH.js";
|
|
8
8
|
import "./chunk-TXKUKMVO.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-L4JLLS6C.js";
|
|
10
10
|
import "./chunk-PEQXYSSE.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-ZNFNGDT7.js";
|
|
12
12
|
export {
|
|
13
13
|
pluginCatalogRuntime
|
|
14
14
|
};
|
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">, unknown>;
|
|
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">, unknown>;
|
|
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">, unknown>;
|
|
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">, unknown>;
|
|
769
505
|
}, z.core.$strict>;
|
|
770
506
|
export type AgentBinding = z.output<typeof agentBindingSchema>;
|
|
771
507
|
export type AgentInvocation = z.output<typeof agentInvocationSchema>;
|
|
@@ -39,7 +39,6 @@ interface SteeringDrainContext {
|
|
|
39
39
|
export interface SlackTurnOptions extends ReplyHooks {
|
|
40
40
|
conversationId?: string;
|
|
41
41
|
destination: Destination;
|
|
42
|
-
publishExternally?: boolean;
|
|
43
42
|
}
|
|
44
43
|
export interface SlackTurnRuntimeDependencies<TPreparedState> {
|
|
45
44
|
assistantUserName: string;
|
|
@@ -98,7 +97,6 @@ export interface SlackTurnRuntimeDependencies<TPreparedState> {
|
|
|
98
97
|
onTurnStatePersisted?: () => Promise<void>;
|
|
99
98
|
preparedState?: TPreparedState;
|
|
100
99
|
queuedMessages?: QueuedTurnMessage[];
|
|
101
|
-
publishExternally?: boolean;
|
|
102
100
|
drainSteeringMessages?: (accept: (messages: QueuedTurnMessage[]) => Promise<void>, context?: SteeringDrainContext) => Promise<QueuedTurnMessage[]>;
|
|
103
101
|
shouldYield?: () => boolean;
|
|
104
102
|
}) => Promise<void>;
|
|
@@ -111,5 +109,6 @@ export interface SlackTurnRuntime<_TPreparedState, TAssistantEvent extends Assis
|
|
|
111
109
|
/** Webhook entry for subscribed Slack Message traffic. */
|
|
112
110
|
handleSubscribedMessage: (thread: Thread, message: Message, hooks: SlackTurnOptions) => Promise<void>;
|
|
113
111
|
}
|
|
112
|
+
/** Build the Slack event runtime that routes mentions and subscribed messages. */
|
|
114
113
|
export declare function createSlackTurnRuntime<TPreparedState, TAssistantEvent extends AssistantLifecycleEvent = AssistantLifecycleEvent>(deps: SlackTurnRuntimeDependencies<TPreparedState>): SlackTurnRuntime<TPreparedState, TAssistantEvent>;
|
|
115
114
|
export {};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import type { SlackAdapter } from "@chat-adapter/slack";
|
|
2
2
|
import type { StateAdapter } from "chat";
|
|
3
|
-
import type {
|
|
4
|
-
/**
|
|
5
|
-
|
|
3
|
+
import type { DeliverMessage } from "@/chat/task-execution/assistant-message";
|
|
4
|
+
/**
|
|
5
|
+
* Deliver system Turn output to Slack without a webhook Message.
|
|
6
|
+
*
|
|
7
|
+
* TODO(dcramer): Replace this Location-taking function with Delivery bound to one
|
|
8
|
+
* Location after Resource event work supplies Delivery before the Run.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createSlackSystemTurnDelivery(args: {
|
|
6
11
|
getSlackAdapter: () => SlackAdapter;
|
|
7
12
|
state?: StateAdapter;
|
|
8
|
-
}):
|
|
13
|
+
}): DeliverMessage;
|
|
@@ -49,7 +49,6 @@ export declare function createSlackTurn(deps: SlackTurnDeps): (thread: Thread, m
|
|
|
49
49
|
onTurnStatePersisted?: () => Promise<void>;
|
|
50
50
|
preparedState?: PreparedTurnState;
|
|
51
51
|
queuedMessages?: QueuedTurnMessage[];
|
|
52
|
-
publishExternally?: boolean;
|
|
53
52
|
execution?: DispatchTurnContext;
|
|
54
53
|
skipBackfill?: boolean;
|
|
55
54
|
drainSteeringMessages?: (accept: (messages: QueuedTurnMessage[]) => Promise<void>, context?: {
|
|
@@ -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?: {
|
|
@@ -12,7 +12,7 @@ declare function createTurnRouteSchema(profiles: Readonly<Record<string, ModelPr
|
|
|
12
12
|
none: "none";
|
|
13
13
|
}>;
|
|
14
14
|
profile: z.ZodString;
|
|
15
|
-
confidence: z.ZodPreprocess<z.ZodNumber>;
|
|
15
|
+
confidence: z.ZodPreprocess<z.ZodNumber, unknown>;
|
|
16
16
|
reason: z.ZodString;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
18
|
export interface TurnRoute {
|
|
@@ -7,7 +7,6 @@ type ExecuteSlackTurn = (thread: ThreadImpl, message: Message, options: {
|
|
|
7
7
|
conversationId?: string;
|
|
8
8
|
destination: DispatchRecord["destination"];
|
|
9
9
|
execution: DispatchTurnContext;
|
|
10
|
-
publishExternally?: boolean;
|
|
11
10
|
onTurnDeliveryAccepted?: (messageId?: string) => void;
|
|
12
11
|
onTurnOutcome?: (result: DispatchTurnResult) => void;
|
|
13
12
|
shouldYield?: () => boolean;
|
|
@@ -15,7 +15,7 @@ type RequiredSlackTimestampParamResult = {
|
|
|
15
15
|
error: string;
|
|
16
16
|
};
|
|
17
17
|
/** Define a model-facing Slack timestamp, normalizing numeric model args to strings. */
|
|
18
|
-
export declare function slackTimestampParam(description: string): z.ZodPreprocess<z.ZodString>;
|
|
18
|
+
export declare function slackTimestampParam(description: string): z.ZodPreprocess<z.ZodString, unknown>;
|
|
19
19
|
/** Parse tool input into a branded Slack timestamp before provider calls. */
|
|
20
20
|
export declare function parseSlackTimestampParam(field: string, value: string | number | undefined): SlackTimestampParamResult;
|
|
21
21
|
/** Parse a required tool input timestamp into a branded Slack timestamp. */
|
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
|
|
@@ -2,29 +2,29 @@ import type { AssistantMessage } from "@earendil-works/pi-ai";
|
|
|
2
2
|
import type { Location } from "@/chat/conversations/location";
|
|
3
3
|
import type { ProviderConversationReference } from "@/chat/conversations/sql/bindings";
|
|
4
4
|
import type { ThreadConversationState } from "@/chat/state/conversation";
|
|
5
|
-
/** Facts returned after
|
|
6
|
-
export type
|
|
5
|
+
/** Facts returned after provider Delivery. */
|
|
6
|
+
export type DeliveryResult = {
|
|
7
7
|
providerMessageId?: string;
|
|
8
8
|
providerConversationBindings?: ProviderConversationReference[];
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Deliver one Message through the provider that owns its Location.
|
|
12
12
|
*
|
|
13
|
-
* TODO(dcramer): Delete
|
|
13
|
+
* TODO(dcramer): Delete DeliveryResult and DeliverMessage after the core Turn
|
|
14
14
|
* lifecycle stores completed assistant Messages and the mailbox worker can
|
|
15
15
|
* accept provider Delivery directly.
|
|
16
16
|
*/
|
|
17
|
-
export type
|
|
17
|
+
export type DeliverMessage = (input: {
|
|
18
18
|
conversationId: string;
|
|
19
19
|
location: Location;
|
|
20
20
|
text: string;
|
|
21
|
-
}) => Promise<
|
|
21
|
+
}) => Promise<DeliveryResult>;
|
|
22
22
|
/** Store one assistant Message and its Agent history. */
|
|
23
23
|
export declare function commitAssistantMessage(args: {
|
|
24
24
|
agentMessage?: AssistantMessage;
|
|
25
25
|
conversation: ThreadConversationState;
|
|
26
26
|
conversationId: string;
|
|
27
|
-
|
|
27
|
+
deliveryResult?: DeliveryResult;
|
|
28
28
|
sessionId: string;
|
|
29
29
|
source?: "slack" | "web";
|
|
30
30
|
text: string;
|
|
@@ -46,7 +46,6 @@ interface TurnCheckpointWrite {
|
|
|
46
46
|
destinationVisibility?: ConversationPrivacy;
|
|
47
47
|
dispatchId?: string;
|
|
48
48
|
dispatchOutcome?: AgentDispatchOutcome;
|
|
49
|
-
publishExternally?: boolean;
|
|
50
49
|
source?: Source;
|
|
51
50
|
surface?: AgentTurnSurface;
|
|
52
51
|
turnStartMessageIndex?: number;
|