@sentry/junior-plugin-api 0.198.0 → 0.199.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/index.d.ts +2021 -19
- package/package.json +4 -5
- package/dist/annotations.d.ts +0 -75
- package/dist/cli.d.ts +0 -39
- package/dist/code.d.ts +0 -37
- package/dist/context.d.ts +0 -158
- package/dist/conversation-events.d.ts +0 -80
- package/dist/credentials.d.ts +0 -184
- package/dist/dispatch.d.ts +0 -16
- package/dist/egress-policy.d.ts +0 -9
- package/dist/hooks.d.ts +0 -43
- package/dist/manifest.d.ts +0 -76
- package/dist/operations.d.ts +0 -153
- package/dist/prompt.d.ts +0 -56
- package/dist/registration.d.ts +0 -28
- package/dist/resource-events.d.ts +0 -128
- package/dist/schemas.d.ts +0 -261
- package/dist/state.d.ts +0 -10
- package/dist/tasks.d.ts +0 -250
- package/dist/tools.d.ts +0 -351
- package/dist/user-pages.d.ts +0 -97
- package/src/annotations.ts +0 -78
- package/src/cli.ts +0 -54
- package/src/code.ts +0 -37
- package/src/context.ts +0 -241
- package/src/conversation-events.ts +0 -136
- package/src/credentials.ts +0 -221
- package/src/dispatch.ts +0 -31
- package/src/egress-policy.ts +0 -15
- package/src/hooks.ts +0 -118
- package/src/index.ts +0 -29
- package/src/manifest.ts +0 -89
- package/src/operations.ts +0 -199
- package/src/prompt.ts +0 -99
- package/src/registration.ts +0 -173
- package/src/resource-events.ts +0 -320
- package/src/schemas.ts +0 -348
- package/src/state.ts +0 -15
- package/src/tasks.ts +0 -105
- package/src/tools.ts +0 -579
- package/src/user-pages.ts +0 -130
package/dist/schemas.d.ts
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
/** Exact non-blank actor user id that rejects the sentinel "unknown". */
|
|
3
|
-
export declare const actorUserIdSchema: z.ZodString;
|
|
4
|
-
export declare const nonBlankStringSchema: z.ZodString;
|
|
5
|
-
/** Complete Slack Location associated with a Conversation. */
|
|
6
|
-
export declare const slackLocationSchema: z.ZodObject<{
|
|
7
|
-
id: z.ZodString;
|
|
8
|
-
provider: z.ZodLiteral<"slack">;
|
|
9
|
-
teamId: z.ZodString;
|
|
10
|
-
channelId: z.ZodString;
|
|
11
|
-
threadTs: z.ZodOptional<z.ZodString>;
|
|
12
|
-
}, z.core.$strict>;
|
|
13
|
-
/** Complete Location types supported by Junior. */
|
|
14
|
-
export declare const locationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
15
|
-
id: z.ZodString;
|
|
16
|
-
provider: z.ZodLiteral<"slack">;
|
|
17
|
-
teamId: z.ZodString;
|
|
18
|
-
channelId: z.ZodString;
|
|
19
|
-
threadTs: z.ZodOptional<z.ZodString>;
|
|
20
|
-
}, z.core.$strict>], "provider">;
|
|
21
|
-
/** Runtime platform names supported by plugin public contracts. */
|
|
22
|
-
export declare const platformSchema: z.ZodEnum<{
|
|
23
|
-
slack: "slack";
|
|
24
|
-
local: "local";
|
|
25
|
-
}>;
|
|
26
|
-
/** Runtime source visibility visible to plugins. */
|
|
27
|
-
export declare const sourceVisibilitySchema: z.ZodEnum<{
|
|
28
|
-
public: "public";
|
|
29
|
-
private: "private";
|
|
30
|
-
}>;
|
|
31
|
-
/** Provider-neutral visibility of a routed destination. */
|
|
32
|
-
export declare const destinationVisibilitySchema: z.ZodEnum<{
|
|
33
|
-
public: "public";
|
|
34
|
-
private: "private";
|
|
35
|
-
}>;
|
|
36
|
-
/** Runtime-owned Slack address for routing future work or side effects. */
|
|
37
|
-
export declare const slackDestinationSchema: z.ZodObject<{
|
|
38
|
-
platform: z.ZodLiteral<"slack">;
|
|
39
|
-
teamId: z.ZodString;
|
|
40
|
-
channelId: z.ZodString;
|
|
41
|
-
}, z.core.$strict>;
|
|
42
|
-
/** Runtime-owned local CLI conversation address. */
|
|
43
|
-
export declare const localDestinationSchema: z.ZodObject<{
|
|
44
|
-
platform: z.ZodLiteral<"local">;
|
|
45
|
-
conversationId: z.ZodString;
|
|
46
|
-
}, z.core.$strict>;
|
|
47
|
-
/** Runtime-owned provider-neutral address for routing future work or side effects. */
|
|
48
|
-
export declare const destinationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
49
|
-
platform: z.ZodLiteral<"slack">;
|
|
50
|
-
teamId: z.ZodString;
|
|
51
|
-
channelId: z.ZodString;
|
|
52
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
-
platform: z.ZodLiteral<"local">;
|
|
54
|
-
conversationId: z.ZodString;
|
|
55
|
-
}, z.core.$strict>], "platform">;
|
|
56
|
-
/** Runtime-owned Slack input Source. */
|
|
57
|
-
export declare const slackSourceSchema: z.ZodObject<{
|
|
58
|
-
kind: z.ZodLiteral<"slack">;
|
|
59
|
-
teamId: z.ZodString;
|
|
60
|
-
channelId: z.ZodString;
|
|
61
|
-
visibility: z.ZodEnum<{
|
|
62
|
-
public: "public";
|
|
63
|
-
private: "private";
|
|
64
|
-
}>;
|
|
65
|
-
messageTs: z.ZodOptional<z.ZodString>;
|
|
66
|
-
threadTs: z.ZodOptional<z.ZodString>;
|
|
67
|
-
}, z.core.$strict>;
|
|
68
|
-
/** Runtime-owned local CLI input Source. */
|
|
69
|
-
export declare const localSourceSchema: z.ZodObject<{
|
|
70
|
-
kind: z.ZodLiteral<"local">;
|
|
71
|
-
visibility: z.ZodLiteral<"private">;
|
|
72
|
-
conversationId: z.ZodString;
|
|
73
|
-
}, z.core.$strict>;
|
|
74
|
-
/** Runtime-owned dashboard input Source. */
|
|
75
|
-
export declare const webSourceSchema: z.ZodObject<{
|
|
76
|
-
kind: z.ZodLiteral<"web">;
|
|
77
|
-
visibility: z.ZodEnum<{
|
|
78
|
-
public: "public";
|
|
79
|
-
private: "private";
|
|
80
|
-
}>;
|
|
81
|
-
conversationId: z.ZodString;
|
|
82
|
-
}, z.core.$strict>;
|
|
83
|
-
/** Runtime-owned Resource event input Source. */
|
|
84
|
-
export declare const resourceEventSourceSchema: z.ZodObject<{
|
|
85
|
-
kind: z.ZodLiteral<"resource_event">;
|
|
86
|
-
eventKey: z.ZodString;
|
|
87
|
-
eventType: z.ZodString;
|
|
88
|
-
identifier: z.ZodString;
|
|
89
|
-
namespace: z.ZodString;
|
|
90
|
-
}, z.core.$strict>;
|
|
91
|
-
/** Runtime-owned Scheduled task input Source. */
|
|
92
|
-
export declare const scheduledTaskSourceSchema: z.ZodObject<{
|
|
93
|
-
kind: z.ZodLiteral<"scheduled_task">;
|
|
94
|
-
}, z.core.$strict>;
|
|
95
|
-
/** Runtime-owned Event task input Source. */
|
|
96
|
-
export declare const eventTaskSourceSchema: z.ZodObject<{
|
|
97
|
-
kind: z.ZodLiteral<"event_task">;
|
|
98
|
-
}, z.core.$strict>;
|
|
99
|
-
/** Runtime-owned Plugin dispatch input Source. */
|
|
100
|
-
export declare const pluginDispatchSourceSchema: z.ZodObject<{
|
|
101
|
-
kind: z.ZodLiteral<"plugin_dispatch">;
|
|
102
|
-
}, z.core.$strict>;
|
|
103
|
-
/** Runtime-owned Agent invocation input Source. */
|
|
104
|
-
export declare const agentInvocationSourceSchema: z.ZodObject<{
|
|
105
|
-
kind: z.ZodLiteral<"agent_invocation">;
|
|
106
|
-
}, z.core.$strict>;
|
|
107
|
-
/** Runtime-owned input Source. Stored `platform` and Location fields normalize on read. */
|
|
108
|
-
export declare const sourceSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
109
|
-
kind: z.ZodLiteral<"slack">;
|
|
110
|
-
teamId: z.ZodString;
|
|
111
|
-
channelId: z.ZodString;
|
|
112
|
-
visibility: z.ZodEnum<{
|
|
113
|
-
public: "public";
|
|
114
|
-
private: "private";
|
|
115
|
-
}>;
|
|
116
|
-
messageTs: z.ZodOptional<z.ZodString>;
|
|
117
|
-
threadTs: z.ZodOptional<z.ZodString>;
|
|
118
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
119
|
-
kind: z.ZodLiteral<"local">;
|
|
120
|
-
visibility: z.ZodLiteral<"private">;
|
|
121
|
-
conversationId: z.ZodString;
|
|
122
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
123
|
-
kind: z.ZodLiteral<"web">;
|
|
124
|
-
visibility: z.ZodEnum<{
|
|
125
|
-
public: "public";
|
|
126
|
-
private: "private";
|
|
127
|
-
}>;
|
|
128
|
-
conversationId: z.ZodString;
|
|
129
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
130
|
-
kind: z.ZodLiteral<"resource_event">;
|
|
131
|
-
eventKey: z.ZodString;
|
|
132
|
-
eventType: z.ZodString;
|
|
133
|
-
identifier: z.ZodString;
|
|
134
|
-
namespace: z.ZodString;
|
|
135
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
136
|
-
kind: z.ZodLiteral<"scheduled_task">;
|
|
137
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
138
|
-
kind: z.ZodLiteral<"event_task">;
|
|
139
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
140
|
-
kind: z.ZodLiteral<"plugin_dispatch">;
|
|
141
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
142
|
-
kind: z.ZodLiteral<"agent_invocation">;
|
|
143
|
-
}, z.core.$strict>], "kind">, unknown>;
|
|
144
|
-
/** Stable user credential subject shape accepted from plugins. */
|
|
145
|
-
export declare const pluginCredentialSubjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
146
|
-
type: z.ZodLiteral<"user">;
|
|
147
|
-
userId: z.ZodString;
|
|
148
|
-
allowedWhen: z.ZodLiteral<"private-direct-conversation">;
|
|
149
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
150
|
-
type: z.ZodLiteral<"user">;
|
|
151
|
-
userId: z.ZodString;
|
|
152
|
-
allowedWhen: z.ZodLiteral<"scheduled-task">;
|
|
153
|
-
taskId: z.ZodString;
|
|
154
|
-
}, z.core.$strict>], "allowedWhen">;
|
|
155
|
-
export declare const slackActorSchema: z.ZodObject<{
|
|
156
|
-
platform: z.ZodLiteral<"slack">;
|
|
157
|
-
teamId: z.ZodString;
|
|
158
|
-
email: z.ZodOptional<z.ZodString>;
|
|
159
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
160
|
-
userId: z.ZodString;
|
|
161
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
162
|
-
}, z.core.$strict>;
|
|
163
|
-
export declare const localActorSchema: z.ZodObject<{
|
|
164
|
-
platform: z.ZodLiteral<"local">;
|
|
165
|
-
email: z.ZodOptional<z.ZodString>;
|
|
166
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
167
|
-
userId: z.ZodString;
|
|
168
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
169
|
-
}, z.core.$strict>;
|
|
170
|
-
export declare const webActorSchema: z.ZodObject<{
|
|
171
|
-
platform: z.ZodLiteral<"web">;
|
|
172
|
-
email: z.ZodOptional<z.ZodString>;
|
|
173
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
174
|
-
userId: z.ZodString;
|
|
175
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
176
|
-
}, z.core.$strict>;
|
|
177
|
-
export declare const systemActorSchema: z.ZodObject<{
|
|
178
|
-
platform: z.ZodLiteral<"system">;
|
|
179
|
-
name: z.ZodString;
|
|
180
|
-
}, z.core.$strict>;
|
|
181
|
-
/** Runtime-provided actor identity visible to plugin hooks. */
|
|
182
|
-
export declare const actorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
183
|
-
platform: z.ZodLiteral<"slack">;
|
|
184
|
-
teamId: z.ZodString;
|
|
185
|
-
email: z.ZodOptional<z.ZodString>;
|
|
186
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
187
|
-
userId: z.ZodString;
|
|
188
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
189
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
190
|
-
platform: z.ZodLiteral<"local">;
|
|
191
|
-
email: z.ZodOptional<z.ZodString>;
|
|
192
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
193
|
-
userId: z.ZodString;
|
|
194
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
195
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
196
|
-
platform: z.ZodLiteral<"web">;
|
|
197
|
-
email: z.ZodOptional<z.ZodString>;
|
|
198
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
199
|
-
userId: z.ZodString;
|
|
200
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
201
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
202
|
-
platform: z.ZodLiteral<"system">;
|
|
203
|
-
name: z.ZodString;
|
|
204
|
-
}, z.core.$strict>], "platform">;
|
|
205
|
-
/** Core-owned provider account linked to a user when verified. */
|
|
206
|
-
export declare const identitySchema: z.ZodObject<{
|
|
207
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
208
|
-
handle: z.ZodOptional<z.ZodString>;
|
|
209
|
-
id: z.ZodString;
|
|
210
|
-
provider: z.ZodString;
|
|
211
|
-
providerSubjectId: z.ZodString;
|
|
212
|
-
providerTenantId: z.ZodOptional<z.ZodString>;
|
|
213
|
-
}, z.core.$strict>;
|
|
214
|
-
/** Core-owned person with every linked provider identity. */
|
|
215
|
-
export declare const userSchema: z.ZodObject<{
|
|
216
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
217
|
-
email: z.ZodString;
|
|
218
|
-
id: z.ZodString;
|
|
219
|
-
identities: z.ZodArray<z.ZodObject<{
|
|
220
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
221
|
-
handle: z.ZodOptional<z.ZodString>;
|
|
222
|
-
id: z.ZodString;
|
|
223
|
-
provider: z.ZodString;
|
|
224
|
-
providerSubjectId: z.ZodString;
|
|
225
|
-
providerTenantId: z.ZodOptional<z.ZodString>;
|
|
226
|
-
}, z.core.$strict>>;
|
|
227
|
-
}, z.core.$strict>;
|
|
228
|
-
/** Compact destination-visible context explaining what produced a reply. */
|
|
229
|
-
export declare const replyAttributionSchema: z.ZodObject<{
|
|
230
|
-
label: z.ZodPipe<z.ZodString, z.ZodString>;
|
|
231
|
-
detail: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodString>>;
|
|
232
|
-
}, z.core.$strict>;
|
|
233
|
-
/** Plugin dispatch request accepted by Junior core. */
|
|
234
|
-
export declare const dispatchOptionsSchema: z.ZodObject<{
|
|
235
|
-
idempotencyKey: z.ZodPipe<z.ZodString, z.ZodString>;
|
|
236
|
-
credentialSubject: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
237
|
-
type: z.ZodLiteral<"user">;
|
|
238
|
-
userId: z.ZodString;
|
|
239
|
-
allowedWhen: z.ZodLiteral<"private-direct-conversation">;
|
|
240
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
241
|
-
type: z.ZodLiteral<"user">;
|
|
242
|
-
userId: z.ZodString;
|
|
243
|
-
allowedWhen: z.ZodLiteral<"scheduled-task">;
|
|
244
|
-
taskId: z.ZodString;
|
|
245
|
-
}, z.core.$strict>], "allowedWhen">>;
|
|
246
|
-
destination: z.ZodObject<{
|
|
247
|
-
platform: z.ZodLiteral<"slack">;
|
|
248
|
-
teamId: z.ZodString;
|
|
249
|
-
channelId: z.ZodString;
|
|
250
|
-
}, z.core.$strict>;
|
|
251
|
-
destinationVisibility: z.ZodEnum<{
|
|
252
|
-
public: "public";
|
|
253
|
-
private: "private";
|
|
254
|
-
}>;
|
|
255
|
-
input: z.ZodPipe<z.ZodString, z.ZodString>;
|
|
256
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
257
|
-
replyAttribution: z.ZodOptional<z.ZodObject<{
|
|
258
|
-
label: z.ZodPipe<z.ZodString, z.ZodString>;
|
|
259
|
-
detail: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodString>>;
|
|
260
|
-
}, z.core.$strict>>;
|
|
261
|
-
}, z.core.$strict>;
|
package/dist/state.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface PluginState {
|
|
2
|
-
delete(key: string): Promise<void>;
|
|
3
|
-
get<T = unknown>(key: string): Promise<T | undefined>;
|
|
4
|
-
set(key: string, value: unknown, ttlMs?: number): Promise<void>;
|
|
5
|
-
setIfNotExists(key: string, value: unknown, ttlMs?: number): Promise<boolean>;
|
|
6
|
-
withLock<T>(key: string, ttlMs: number, callback: () => Promise<T>): Promise<T>;
|
|
7
|
-
}
|
|
8
|
-
export interface PluginReadState {
|
|
9
|
-
get<T = unknown>(key: string): Promise<T | undefined>;
|
|
10
|
-
}
|
package/dist/tasks.d.ts
DELETED
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Public plugin background-task contracts.
|
|
3
|
-
*
|
|
4
|
-
* Plugins register small task handlers. Junior core owns scheduling, delivery,
|
|
5
|
-
* retries, and the bounded run projection.
|
|
6
|
-
*/
|
|
7
|
-
import { z } from "zod";
|
|
8
|
-
import type { PluginConversationEvents } from "./conversation-events";
|
|
9
|
-
import type { PluginContext, PluginEmbedder, PluginModel } from "./context";
|
|
10
|
-
import type { PluginState } from "./state";
|
|
11
|
-
/**
|
|
12
|
-
* Runtime-owned provenance for a transcript message: whether it is a durable
|
|
13
|
-
* instruction or ambient context, plus the actor identity when known. Missing
|
|
14
|
-
* provenance on an entry means unattributed context.
|
|
15
|
-
*/
|
|
16
|
-
export declare const pluginRunTranscriptProvenanceSchema: z.ZodObject<{
|
|
17
|
-
authority: z.ZodEnum<{
|
|
18
|
-
instruction: "instruction";
|
|
19
|
-
context: "context";
|
|
20
|
-
}>;
|
|
21
|
-
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
22
|
-
platform: z.ZodLiteral<"slack">;
|
|
23
|
-
teamId: z.ZodString;
|
|
24
|
-
email: z.ZodOptional<z.ZodString>;
|
|
25
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
26
|
-
userId: z.ZodString;
|
|
27
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
28
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
29
|
-
platform: z.ZodLiteral<"local">;
|
|
30
|
-
email: z.ZodOptional<z.ZodString>;
|
|
31
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
32
|
-
userId: z.ZodString;
|
|
33
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
34
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
35
|
-
platform: z.ZodLiteral<"web">;
|
|
36
|
-
email: z.ZodOptional<z.ZodString>;
|
|
37
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
38
|
-
userId: z.ZodString;
|
|
39
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
40
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
41
|
-
platform: z.ZodLiteral<"system">;
|
|
42
|
-
name: z.ZodString;
|
|
43
|
-
}, z.core.$strict>], "platform">>;
|
|
44
|
-
}, z.core.$strict>;
|
|
45
|
-
/** One normalized transcript entry from the completed run exposed to plugin tasks. */
|
|
46
|
-
export declare const pluginRunTranscriptEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
47
|
-
type: z.ZodLiteral<"message">;
|
|
48
|
-
role: z.ZodEnum<{
|
|
49
|
-
user: "user";
|
|
50
|
-
assistant: "assistant";
|
|
51
|
-
}>;
|
|
52
|
-
text: z.ZodString;
|
|
53
|
-
provenance: z.ZodOptional<z.ZodObject<{
|
|
54
|
-
authority: z.ZodEnum<{
|
|
55
|
-
instruction: "instruction";
|
|
56
|
-
context: "context";
|
|
57
|
-
}>;
|
|
58
|
-
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
59
|
-
platform: z.ZodLiteral<"slack">;
|
|
60
|
-
teamId: z.ZodString;
|
|
61
|
-
email: z.ZodOptional<z.ZodString>;
|
|
62
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
63
|
-
userId: z.ZodString;
|
|
64
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
65
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
66
|
-
platform: z.ZodLiteral<"local">;
|
|
67
|
-
email: z.ZodOptional<z.ZodString>;
|
|
68
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
69
|
-
userId: z.ZodString;
|
|
70
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
71
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
72
|
-
platform: z.ZodLiteral<"web">;
|
|
73
|
-
email: z.ZodOptional<z.ZodString>;
|
|
74
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
75
|
-
userId: z.ZodString;
|
|
76
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
77
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
78
|
-
platform: z.ZodLiteral<"system">;
|
|
79
|
-
name: z.ZodString;
|
|
80
|
-
}, z.core.$strict>], "platform">>;
|
|
81
|
-
}, z.core.$strict>>;
|
|
82
|
-
isRunActor: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
84
|
-
type: z.ZodLiteral<"toolResult">;
|
|
85
|
-
toolName: z.ZodString;
|
|
86
|
-
isError: z.ZodBoolean;
|
|
87
|
-
text: z.ZodOptional<z.ZodString>;
|
|
88
|
-
}, z.core.$strict>], "type">;
|
|
89
|
-
export type PluginRunTranscriptProvenance = z.output<typeof pluginRunTranscriptProvenanceSchema>;
|
|
90
|
-
/** Runtime-owned completed-run projection exposed to plugin tasks. */
|
|
91
|
-
export declare const pluginRunContextSchema: z.ZodObject<{
|
|
92
|
-
actorUserId: z.ZodOptional<z.ZodString>;
|
|
93
|
-
completedAtMs: z.ZodNumber;
|
|
94
|
-
conversationId: z.ZodString;
|
|
95
|
-
destination: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
96
|
-
platform: z.ZodLiteral<"slack">;
|
|
97
|
-
teamId: z.ZodString;
|
|
98
|
-
channelId: z.ZodString;
|
|
99
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
100
|
-
platform: z.ZodLiteral<"local">;
|
|
101
|
-
conversationId: z.ZodString;
|
|
102
|
-
}, z.core.$strict>], "platform">;
|
|
103
|
-
locationId: z.ZodOptional<z.ZodString>;
|
|
104
|
-
actors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
105
|
-
platform: z.ZodLiteral<"slack">;
|
|
106
|
-
teamId: z.ZodString;
|
|
107
|
-
email: z.ZodOptional<z.ZodString>;
|
|
108
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
109
|
-
userId: z.ZodString;
|
|
110
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
111
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
112
|
-
platform: z.ZodLiteral<"local">;
|
|
113
|
-
email: z.ZodOptional<z.ZodString>;
|
|
114
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
115
|
-
userId: z.ZodString;
|
|
116
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
117
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
118
|
-
platform: z.ZodLiteral<"web">;
|
|
119
|
-
email: z.ZodOptional<z.ZodString>;
|
|
120
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
121
|
-
userId: z.ZodString;
|
|
122
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
123
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
124
|
-
platform: z.ZodLiteral<"system">;
|
|
125
|
-
name: z.ZodString;
|
|
126
|
-
}, z.core.$strict>], "platform">>;
|
|
127
|
-
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
128
|
-
platform: z.ZodLiteral<"slack">;
|
|
129
|
-
teamId: z.ZodString;
|
|
130
|
-
email: z.ZodOptional<z.ZodString>;
|
|
131
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
132
|
-
userId: z.ZodString;
|
|
133
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
134
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
135
|
-
platform: z.ZodLiteral<"local">;
|
|
136
|
-
email: z.ZodOptional<z.ZodString>;
|
|
137
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
138
|
-
userId: z.ZodString;
|
|
139
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
140
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
141
|
-
platform: z.ZodLiteral<"web">;
|
|
142
|
-
email: z.ZodOptional<z.ZodString>;
|
|
143
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
144
|
-
userId: z.ZodString;
|
|
145
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
146
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
147
|
-
platform: z.ZodLiteral<"system">;
|
|
148
|
-
name: z.ZodString;
|
|
149
|
-
}, z.core.$strict>], "platform">>;
|
|
150
|
-
runId: z.ZodString;
|
|
151
|
-
source: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
152
|
-
kind: z.ZodLiteral<"slack">;
|
|
153
|
-
teamId: z.ZodString;
|
|
154
|
-
channelId: z.ZodString;
|
|
155
|
-
visibility: z.ZodEnum<{
|
|
156
|
-
public: "public";
|
|
157
|
-
private: "private";
|
|
158
|
-
}>;
|
|
159
|
-
messageTs: z.ZodOptional<z.ZodString>;
|
|
160
|
-
threadTs: z.ZodOptional<z.ZodString>;
|
|
161
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
162
|
-
kind: z.ZodLiteral<"local">;
|
|
163
|
-
visibility: z.ZodLiteral<"private">;
|
|
164
|
-
conversationId: z.ZodString;
|
|
165
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
166
|
-
kind: z.ZodLiteral<"web">;
|
|
167
|
-
visibility: z.ZodEnum<{
|
|
168
|
-
public: "public";
|
|
169
|
-
private: "private";
|
|
170
|
-
}>;
|
|
171
|
-
conversationId: z.ZodString;
|
|
172
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
173
|
-
kind: z.ZodLiteral<"resource_event">;
|
|
174
|
-
eventKey: z.ZodString;
|
|
175
|
-
eventType: z.ZodString;
|
|
176
|
-
identifier: z.ZodString;
|
|
177
|
-
namespace: z.ZodString;
|
|
178
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
179
|
-
kind: z.ZodLiteral<"scheduled_task">;
|
|
180
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
181
|
-
kind: z.ZodLiteral<"event_task">;
|
|
182
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
183
|
-
kind: z.ZodLiteral<"plugin_dispatch">;
|
|
184
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
185
|
-
kind: z.ZodLiteral<"agent_invocation">;
|
|
186
|
-
}, z.core.$strict>], "kind">, unknown>;
|
|
187
|
-
transcript: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
188
|
-
type: z.ZodLiteral<"message">;
|
|
189
|
-
role: z.ZodEnum<{
|
|
190
|
-
user: "user";
|
|
191
|
-
assistant: "assistant";
|
|
192
|
-
}>;
|
|
193
|
-
text: z.ZodString;
|
|
194
|
-
provenance: z.ZodOptional<z.ZodObject<{
|
|
195
|
-
authority: z.ZodEnum<{
|
|
196
|
-
instruction: "instruction";
|
|
197
|
-
context: "context";
|
|
198
|
-
}>;
|
|
199
|
-
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
200
|
-
platform: z.ZodLiteral<"slack">;
|
|
201
|
-
teamId: z.ZodString;
|
|
202
|
-
email: z.ZodOptional<z.ZodString>;
|
|
203
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
204
|
-
userId: z.ZodString;
|
|
205
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
206
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
207
|
-
platform: z.ZodLiteral<"local">;
|
|
208
|
-
email: z.ZodOptional<z.ZodString>;
|
|
209
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
210
|
-
userId: z.ZodString;
|
|
211
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
212
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
213
|
-
platform: z.ZodLiteral<"web">;
|
|
214
|
-
email: z.ZodOptional<z.ZodString>;
|
|
215
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
216
|
-
userId: z.ZodString;
|
|
217
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
218
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
219
|
-
platform: z.ZodLiteral<"system">;
|
|
220
|
-
name: z.ZodString;
|
|
221
|
-
}, z.core.$strict>], "platform">>;
|
|
222
|
-
}, z.core.$strict>>;
|
|
223
|
-
isRunActor: z.ZodOptional<z.ZodBoolean>;
|
|
224
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
225
|
-
type: z.ZodLiteral<"toolResult">;
|
|
226
|
-
toolName: z.ZodString;
|
|
227
|
-
isError: z.ZodBoolean;
|
|
228
|
-
text: z.ZodOptional<z.ZodString>;
|
|
229
|
-
}, z.core.$strict>], "type">>;
|
|
230
|
-
}, z.core.$strict>;
|
|
231
|
-
export type PluginRunTranscriptEntry = z.output<typeof pluginRunTranscriptEntrySchema>;
|
|
232
|
-
export type PluginRunContext = z.output<typeof pluginRunContextSchema>;
|
|
233
|
-
/** Runtime context passed to a plugin-owned background task. */
|
|
234
|
-
export interface PluginTaskContext extends PluginContext {
|
|
235
|
-
embedder: PluginEmbedder;
|
|
236
|
-
events: PluginConversationEvents;
|
|
237
|
-
id: string;
|
|
238
|
-
model: PluginModel;
|
|
239
|
-
name: string;
|
|
240
|
-
run: {
|
|
241
|
-
load(): Promise<PluginRunContext>;
|
|
242
|
-
};
|
|
243
|
-
state: PluginState;
|
|
244
|
-
}
|
|
245
|
-
/** Plugin task handler registered by name in a plugin manifest module. */
|
|
246
|
-
export interface PluginTaskDefinition {
|
|
247
|
-
run(ctx: PluginTaskContext): Promise<void> | void;
|
|
248
|
-
}
|
|
249
|
-
/** Task handlers keyed by the plugin-owned task name. */
|
|
250
|
-
export type PluginTasks = Record<string, PluginTaskDefinition>;
|