sessionpipe-core 0.1.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/LICENSE +202 -0
- package/NOTICE +41 -0
- package/README.md +5 -0
- package/dist/index.js +2380 -0
- package/dist/index.js.map +7 -0
- package/dist/schema/v1.d.ts +579 -0
- package/dist/schema/v1.d.ts.map +1 -0
- package/dist/schema.js +248 -0
- package/dist/schema.js.map +7 -0
- package/dist/src/adapters/antigravity.d.ts +26 -0
- package/dist/src/adapters/antigravity.d.ts.map +1 -0
- package/dist/src/adapters/claude-code.d.ts +18 -0
- package/dist/src/adapters/claude-code.d.ts.map +1 -0
- package/dist/src/adapters/claude-shaped.d.ts +21 -0
- package/dist/src/adapters/claude-shaped.d.ts.map +1 -0
- package/dist/src/adapters/codex-config.d.ts +31 -0
- package/dist/src/adapters/codex-config.d.ts.map +1 -0
- package/dist/src/adapters/codex.d.ts +6 -0
- package/dist/src/adapters/codex.d.ts.map +1 -0
- package/dist/src/adapters/gemini-cli.d.ts +4 -0
- package/dist/src/adapters/gemini-cli.d.ts.map +1 -0
- package/dist/src/adapters/index.d.ts +10 -0
- package/dist/src/adapters/index.d.ts.map +1 -0
- package/dist/src/adapters/types.d.ts +90 -0
- package/dist/src/adapters/types.d.ts.map +1 -0
- package/dist/src/config.d.ts +33 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/events.d.ts +12 -0
- package/dist/src/events.d.ts.map +1 -0
- package/dist/src/index.d.ts +14 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/outbox.d.ts +41 -0
- package/dist/src/outbox.d.ts.map +1 -0
- package/dist/src/paths.d.ts +8 -0
- package/dist/src/paths.d.ts.map +1 -0
- package/dist/src/privacy/filter.d.ts +10 -0
- package/dist/src/privacy/filter.d.ts.map +1 -0
- package/dist/src/privacy/index.d.ts +4 -0
- package/dist/src/privacy/index.d.ts.map +1 -0
- package/dist/src/privacy/pii.d.ts +8 -0
- package/dist/src/privacy/pii.d.ts.map +1 -0
- package/dist/src/privacy/secrets.d.ts +13 -0
- package/dist/src/privacy/secrets.d.ts.map +1 -0
- package/dist/src/readers/files.d.ts +10 -0
- package/dist/src/readers/files.d.ts.map +1 -0
- package/dist/src/readers/git.d.ts +7 -0
- package/dist/src/readers/git.d.ts.map +1 -0
- package/dist/src/readers/transcripts.d.ts +20 -0
- package/dist/src/readers/transcripts.d.ts.map +1 -0
- package/dist/src/sinks/file.d.ts +11 -0
- package/dist/src/sinks/file.d.ts.map +1 -0
- package/dist/src/sinks/index.d.ts +4 -0
- package/dist/src/sinks/index.d.ts.map +1 -0
- package/dist/src/sinks/stdout.d.ts +11 -0
- package/dist/src/sinks/stdout.d.ts.map +1 -0
- package/dist/src/sinks/types.d.ts +27 -0
- package/dist/src/sinks/types.d.ts.map +1 -0
- package/dist/src/types.d.ts +19 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/ulid.d.ts +3 -0
- package/dist/src/ulid.d.ts.map +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,579 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PROTOCOL = 1;
|
|
3
|
+
/** Dotted, lowercase. Unknown types MUST be accepted and stored. */
|
|
4
|
+
export declare const EventType: z.ZodString;
|
|
5
|
+
export declare const KNOWN_TYPES: readonly ["session.started", "session.heartbeat", "session.ended", "session.backfill", "session.forgotten", "turn.started", "turn.ended", "turn.transcript", "tool.started", "tool.ended", "files.changed", "attention.needed", "attention.cleared", "subagent.started", "subagent.ended", "context.compacted", "native"];
|
|
6
|
+
/** The lowest tier that carries each known type. */
|
|
7
|
+
export declare const TYPE_TIER: Record<(typeof KNOWN_TYPES)[number], 0 | 1 | 2 | 3>;
|
|
8
|
+
export declare const HARNESS_NAMES: readonly ["claude-code", "codex", "gemini-cli", "antigravity", "cursor", "copilot-cli", "droid", "kiro", "opencode"];
|
|
9
|
+
export declare const Tier: z.ZodInt;
|
|
10
|
+
export declare const Ulid: z.ZodString;
|
|
11
|
+
export declare const Rfc3339: z.ZodISODateTime;
|
|
12
|
+
export declare const SessionId: z.ZodString;
|
|
13
|
+
export declare const ToolName: z.ZodString;
|
|
14
|
+
export declare const Harness: z.ZodObject<{
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
version: z.ZodOptional<z.ZodString>;
|
|
17
|
+
event: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const Session: z.ZodObject<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
seq: z.ZodInt;
|
|
22
|
+
machine: z.ZodOptional<z.ZodString>;
|
|
23
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
24
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
25
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
26
|
+
model: z.ZodOptional<z.ZodString>;
|
|
27
|
+
title: z.ZodOptional<z.ZodString>;
|
|
28
|
+
title_source: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
custom: "custom";
|
|
30
|
+
harness: "harness";
|
|
31
|
+
"first-ask": "first-ask";
|
|
32
|
+
}>>;
|
|
33
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
34
|
+
account_id: z.ZodOptional<z.ZodString>;
|
|
35
|
+
parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export declare const Privacy: z.ZodObject<{
|
|
38
|
+
rulesets: z.ZodArray<z.ZodString>;
|
|
39
|
+
pii: z.ZodBoolean;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export declare const Event: z.ZodObject<{
|
|
42
|
+
protocol: z.ZodLiteral<1>;
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
type: z.ZodString;
|
|
45
|
+
time: z.ZodISODateTime;
|
|
46
|
+
tier: z.ZodInt;
|
|
47
|
+
harness: z.ZodObject<{
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
version: z.ZodOptional<z.ZodString>;
|
|
50
|
+
event: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
session: z.ZodObject<{
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
seq: z.ZodInt;
|
|
55
|
+
machine: z.ZodOptional<z.ZodString>;
|
|
56
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
57
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
58
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
59
|
+
model: z.ZodOptional<z.ZodString>;
|
|
60
|
+
title: z.ZodOptional<z.ZodString>;
|
|
61
|
+
title_source: z.ZodOptional<z.ZodEnum<{
|
|
62
|
+
custom: "custom";
|
|
63
|
+
harness: "harness";
|
|
64
|
+
"first-ask": "first-ask";
|
|
65
|
+
}>>;
|
|
66
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
67
|
+
account_id: z.ZodOptional<z.ZodString>;
|
|
68
|
+
parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
privacy: z.ZodObject<{
|
|
71
|
+
rulesets: z.ZodArray<z.ZodString>;
|
|
72
|
+
pii: z.ZodBoolean;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
export declare const AttentionKind: z.ZodEnum<{
|
|
77
|
+
error: "error";
|
|
78
|
+
permission: "permission";
|
|
79
|
+
question: "question";
|
|
80
|
+
elicitation: "elicitation";
|
|
81
|
+
idle: "idle";
|
|
82
|
+
}>;
|
|
83
|
+
export declare const EventData: z.ZodObject<{
|
|
84
|
+
"session.started": z.ZodObject<{
|
|
85
|
+
source: z.ZodEnum<{
|
|
86
|
+
unknown: "unknown";
|
|
87
|
+
startup: "startup";
|
|
88
|
+
resume: "resume";
|
|
89
|
+
clear: "clear";
|
|
90
|
+
compact: "compact";
|
|
91
|
+
fork: "fork";
|
|
92
|
+
}>;
|
|
93
|
+
}, z.core.$loose>;
|
|
94
|
+
"session.heartbeat": z.ZodObject<{}, z.core.$loose>;
|
|
95
|
+
"session.ended": z.ZodObject<{
|
|
96
|
+
reason: z.ZodEnum<{
|
|
97
|
+
clear: "clear";
|
|
98
|
+
logout: "logout";
|
|
99
|
+
exit: "exit";
|
|
100
|
+
other: "other";
|
|
101
|
+
}>;
|
|
102
|
+
}, z.core.$loose>;
|
|
103
|
+
"session.backfill": z.ZodObject<{
|
|
104
|
+
started_at: z.ZodISODateTime;
|
|
105
|
+
last_at: z.ZodISODateTime;
|
|
106
|
+
turns: z.ZodOptional<z.ZodInt>;
|
|
107
|
+
}, z.core.$loose>;
|
|
108
|
+
"session.forgotten": z.ZodObject<{}, z.core.$loose>;
|
|
109
|
+
"turn.started": z.ZodObject<{
|
|
110
|
+
turn_id: z.ZodOptional<z.ZodString>;
|
|
111
|
+
prompt_chars: z.ZodOptional<z.ZodInt>;
|
|
112
|
+
}, z.core.$loose>;
|
|
113
|
+
"turn.ended": z.ZodObject<{
|
|
114
|
+
turn_id: z.ZodOptional<z.ZodString>;
|
|
115
|
+
reason: z.ZodEnum<{
|
|
116
|
+
error: "error";
|
|
117
|
+
stop: "stop";
|
|
118
|
+
interrupt: "interrupt";
|
|
119
|
+
}>;
|
|
120
|
+
ms: z.ZodOptional<z.ZodInt>;
|
|
121
|
+
}, z.core.$loose>;
|
|
122
|
+
"turn.transcript": z.ZodObject<{
|
|
123
|
+
turn: z.ZodInt;
|
|
124
|
+
user: z.ZodString;
|
|
125
|
+
assistant: z.ZodString;
|
|
126
|
+
at: z.ZodISODateTime;
|
|
127
|
+
}, z.core.$loose>;
|
|
128
|
+
"tool.started": z.ZodObject<{
|
|
129
|
+
tool: z.ZodString;
|
|
130
|
+
call_id: z.ZodOptional<z.ZodString>;
|
|
131
|
+
turn_id: z.ZodOptional<z.ZodString>;
|
|
132
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
133
|
+
input: z.ZodOptional<z.ZodUnknown>;
|
|
134
|
+
}, z.core.$loose>;
|
|
135
|
+
"tool.ended": z.ZodObject<{
|
|
136
|
+
tool: z.ZodString;
|
|
137
|
+
call_id: z.ZodOptional<z.ZodString>;
|
|
138
|
+
turn_id: z.ZodOptional<z.ZodString>;
|
|
139
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
140
|
+
ms: z.ZodOptional<z.ZodInt>;
|
|
141
|
+
ok: z.ZodBoolean;
|
|
142
|
+
error: z.ZodOptional<z.ZodString>;
|
|
143
|
+
input: z.ZodOptional<z.ZodUnknown>;
|
|
144
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
145
|
+
}, z.core.$loose>;
|
|
146
|
+
"files.changed": z.ZodObject<{
|
|
147
|
+
paths: z.ZodArray<z.ZodString>;
|
|
148
|
+
}, z.core.$loose>;
|
|
149
|
+
"attention.needed": z.ZodObject<{
|
|
150
|
+
attention_id: z.ZodString;
|
|
151
|
+
kind: z.ZodEnum<{
|
|
152
|
+
error: "error";
|
|
153
|
+
permission: "permission";
|
|
154
|
+
question: "question";
|
|
155
|
+
elicitation: "elicitation";
|
|
156
|
+
idle: "idle";
|
|
157
|
+
}>;
|
|
158
|
+
tool: z.ZodOptional<z.ZodString>;
|
|
159
|
+
message: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$loose>;
|
|
161
|
+
"attention.cleared": z.ZodObject<{
|
|
162
|
+
attention_id: z.ZodString;
|
|
163
|
+
how: z.ZodEnum<{
|
|
164
|
+
unknown: "unknown";
|
|
165
|
+
answered: "answered";
|
|
166
|
+
cancelled: "cancelled";
|
|
167
|
+
timeout: "timeout";
|
|
168
|
+
}>;
|
|
169
|
+
}, z.core.$loose>;
|
|
170
|
+
"subagent.started": z.ZodObject<{
|
|
171
|
+
agent_id: z.ZodString;
|
|
172
|
+
agent_type: z.ZodOptional<z.ZodString>;
|
|
173
|
+
}, z.core.$loose>;
|
|
174
|
+
"subagent.ended": z.ZodObject<{
|
|
175
|
+
agent_id: z.ZodString;
|
|
176
|
+
agent_type: z.ZodOptional<z.ZodString>;
|
|
177
|
+
}, z.core.$loose>;
|
|
178
|
+
"context.compacted": z.ZodObject<{
|
|
179
|
+
trigger: z.ZodEnum<{
|
|
180
|
+
manual: "manual";
|
|
181
|
+
auto: "auto";
|
|
182
|
+
}>;
|
|
183
|
+
}, z.core.$loose>;
|
|
184
|
+
native: z.ZodObject<{}, z.core.$loose>;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
export declare const Batch: z.ZodObject<{
|
|
187
|
+
events: z.ZodArray<z.ZodObject<{
|
|
188
|
+
protocol: z.ZodLiteral<1>;
|
|
189
|
+
id: z.ZodString;
|
|
190
|
+
type: z.ZodString;
|
|
191
|
+
time: z.ZodISODateTime;
|
|
192
|
+
tier: z.ZodInt;
|
|
193
|
+
harness: z.ZodObject<{
|
|
194
|
+
name: z.ZodString;
|
|
195
|
+
version: z.ZodOptional<z.ZodString>;
|
|
196
|
+
event: z.ZodOptional<z.ZodString>;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
session: z.ZodObject<{
|
|
199
|
+
id: z.ZodString;
|
|
200
|
+
seq: z.ZodInt;
|
|
201
|
+
machine: z.ZodOptional<z.ZodString>;
|
|
202
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
203
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
204
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
205
|
+
model: z.ZodOptional<z.ZodString>;
|
|
206
|
+
title: z.ZodOptional<z.ZodString>;
|
|
207
|
+
title_source: z.ZodOptional<z.ZodEnum<{
|
|
208
|
+
custom: "custom";
|
|
209
|
+
harness: "harness";
|
|
210
|
+
"first-ask": "first-ask";
|
|
211
|
+
}>>;
|
|
212
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
213
|
+
account_id: z.ZodOptional<z.ZodString>;
|
|
214
|
+
parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
215
|
+
}, z.core.$strip>;
|
|
216
|
+
privacy: z.ZodObject<{
|
|
217
|
+
rulesets: z.ZodArray<z.ZodString>;
|
|
218
|
+
pii: z.ZodBoolean;
|
|
219
|
+
}, z.core.$strip>;
|
|
220
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
221
|
+
}, z.core.$strip>>;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
export declare const BatchResponse: z.ZodObject<{
|
|
224
|
+
accepted: z.ZodInt;
|
|
225
|
+
duplicates: z.ZodInt;
|
|
226
|
+
rejected: z.ZodArray<z.ZodObject<{
|
|
227
|
+
id: z.ZodString;
|
|
228
|
+
reason: z.ZodString;
|
|
229
|
+
}, z.core.$strip>>;
|
|
230
|
+
max_tier: z.ZodInt;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
export declare const ErrorResponse: z.ZodObject<{
|
|
233
|
+
reason: z.ZodString;
|
|
234
|
+
supported: z.ZodOptional<z.ZodArray<z.ZodInt>>;
|
|
235
|
+
max_tier: z.ZodOptional<z.ZodInt>;
|
|
236
|
+
}, z.core.$strip>;
|
|
237
|
+
export declare const Capability: z.ZodEnum<{
|
|
238
|
+
native: "native";
|
|
239
|
+
events: "events";
|
|
240
|
+
backfill: "backfill";
|
|
241
|
+
forget: "forget";
|
|
242
|
+
control: "control";
|
|
243
|
+
}>;
|
|
244
|
+
export declare const WellKnown: z.ZodObject<{
|
|
245
|
+
protocol: z.ZodArray<z.ZodInt>;
|
|
246
|
+
max_tier: z.ZodInt;
|
|
247
|
+
capabilities: z.ZodArray<z.ZodString>;
|
|
248
|
+
auth: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
249
|
+
bearer: "bearer";
|
|
250
|
+
}>>>;
|
|
251
|
+
endpoints: z.ZodObject<{
|
|
252
|
+
events: z.ZodString;
|
|
253
|
+
control: z.ZodOptional<z.ZodString>;
|
|
254
|
+
native: z.ZodOptional<z.ZodString>;
|
|
255
|
+
}, z.core.$strip>;
|
|
256
|
+
batch: z.ZodObject<{
|
|
257
|
+
max_events: z.ZodInt;
|
|
258
|
+
max_bytes: z.ZodInt;
|
|
259
|
+
}, z.core.$strip>;
|
|
260
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
261
|
+
wait_max_s: z.ZodInt;
|
|
262
|
+
}, z.core.$strip>>;
|
|
263
|
+
}, z.core.$strip>;
|
|
264
|
+
export declare const ControlKind: z.ZodEnum<{
|
|
265
|
+
"permission.answer": "permission.answer";
|
|
266
|
+
prompt: "prompt";
|
|
267
|
+
cancel: "cancel";
|
|
268
|
+
}>;
|
|
269
|
+
export declare const ControlMessage: z.ZodObject<{
|
|
270
|
+
id: z.ZodString;
|
|
271
|
+
kind: z.ZodEnum<{
|
|
272
|
+
"permission.answer": "permission.answer";
|
|
273
|
+
prompt: "prompt";
|
|
274
|
+
cancel: "cancel";
|
|
275
|
+
}>;
|
|
276
|
+
for: z.ZodOptional<z.ZodString>;
|
|
277
|
+
decision: z.ZodOptional<z.ZodEnum<{
|
|
278
|
+
allow: "allow";
|
|
279
|
+
deny: "deny";
|
|
280
|
+
}>>;
|
|
281
|
+
text: z.ZodOptional<z.ZodString>;
|
|
282
|
+
note: z.ZodOptional<z.ZodString>;
|
|
283
|
+
at: z.ZodISODateTime;
|
|
284
|
+
expires_at: z.ZodISODateTime;
|
|
285
|
+
}, z.core.$strip>;
|
|
286
|
+
export declare const ControlPoll: z.ZodObject<{
|
|
287
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
288
|
+
id: z.ZodString;
|
|
289
|
+
kind: z.ZodEnum<{
|
|
290
|
+
"permission.answer": "permission.answer";
|
|
291
|
+
prompt: "prompt";
|
|
292
|
+
cancel: "cancel";
|
|
293
|
+
}>;
|
|
294
|
+
for: z.ZodOptional<z.ZodString>;
|
|
295
|
+
decision: z.ZodOptional<z.ZodEnum<{
|
|
296
|
+
allow: "allow";
|
|
297
|
+
deny: "deny";
|
|
298
|
+
}>>;
|
|
299
|
+
text: z.ZodOptional<z.ZodString>;
|
|
300
|
+
note: z.ZodOptional<z.ZodString>;
|
|
301
|
+
at: z.ZodISODateTime;
|
|
302
|
+
expires_at: z.ZodISODateTime;
|
|
303
|
+
}, z.core.$strip>>;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
export declare const ControlAck: z.ZodObject<{
|
|
306
|
+
acks: z.ZodArray<z.ZodObject<{
|
|
307
|
+
id: z.ZodString;
|
|
308
|
+
outcome: z.ZodEnum<{
|
|
309
|
+
delivered: "delivered";
|
|
310
|
+
expired: "expired";
|
|
311
|
+
unsupported: "unsupported";
|
|
312
|
+
failed: "failed";
|
|
313
|
+
}>;
|
|
314
|
+
at: z.ZodISODateTime;
|
|
315
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
316
|
+
}, z.core.$strip>>;
|
|
317
|
+
}, z.core.$strip>;
|
|
318
|
+
/** What `npm run schemas` writes to schemas/v1/<name>.json. */
|
|
319
|
+
export declare const SCHEMAS: {
|
|
320
|
+
readonly event: z.ZodObject<{
|
|
321
|
+
protocol: z.ZodLiteral<1>;
|
|
322
|
+
id: z.ZodString;
|
|
323
|
+
type: z.ZodString;
|
|
324
|
+
time: z.ZodISODateTime;
|
|
325
|
+
tier: z.ZodInt;
|
|
326
|
+
harness: z.ZodObject<{
|
|
327
|
+
name: z.ZodString;
|
|
328
|
+
version: z.ZodOptional<z.ZodString>;
|
|
329
|
+
event: z.ZodOptional<z.ZodString>;
|
|
330
|
+
}, z.core.$strip>;
|
|
331
|
+
session: z.ZodObject<{
|
|
332
|
+
id: z.ZodString;
|
|
333
|
+
seq: z.ZodInt;
|
|
334
|
+
machine: z.ZodOptional<z.ZodString>;
|
|
335
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
336
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
337
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
338
|
+
model: z.ZodOptional<z.ZodString>;
|
|
339
|
+
title: z.ZodOptional<z.ZodString>;
|
|
340
|
+
title_source: z.ZodOptional<z.ZodEnum<{
|
|
341
|
+
custom: "custom";
|
|
342
|
+
harness: "harness";
|
|
343
|
+
"first-ask": "first-ask";
|
|
344
|
+
}>>;
|
|
345
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
346
|
+
account_id: z.ZodOptional<z.ZodString>;
|
|
347
|
+
parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
348
|
+
}, z.core.$strip>;
|
|
349
|
+
privacy: z.ZodObject<{
|
|
350
|
+
rulesets: z.ZodArray<z.ZodString>;
|
|
351
|
+
pii: z.ZodBoolean;
|
|
352
|
+
}, z.core.$strip>;
|
|
353
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
354
|
+
}, z.core.$strip>;
|
|
355
|
+
readonly "event-data": z.ZodObject<{
|
|
356
|
+
"session.started": z.ZodObject<{
|
|
357
|
+
source: z.ZodEnum<{
|
|
358
|
+
unknown: "unknown";
|
|
359
|
+
startup: "startup";
|
|
360
|
+
resume: "resume";
|
|
361
|
+
clear: "clear";
|
|
362
|
+
compact: "compact";
|
|
363
|
+
fork: "fork";
|
|
364
|
+
}>;
|
|
365
|
+
}, z.core.$loose>;
|
|
366
|
+
"session.heartbeat": z.ZodObject<{}, z.core.$loose>;
|
|
367
|
+
"session.ended": z.ZodObject<{
|
|
368
|
+
reason: z.ZodEnum<{
|
|
369
|
+
clear: "clear";
|
|
370
|
+
logout: "logout";
|
|
371
|
+
exit: "exit";
|
|
372
|
+
other: "other";
|
|
373
|
+
}>;
|
|
374
|
+
}, z.core.$loose>;
|
|
375
|
+
"session.backfill": z.ZodObject<{
|
|
376
|
+
started_at: z.ZodISODateTime;
|
|
377
|
+
last_at: z.ZodISODateTime;
|
|
378
|
+
turns: z.ZodOptional<z.ZodInt>;
|
|
379
|
+
}, z.core.$loose>;
|
|
380
|
+
"session.forgotten": z.ZodObject<{}, z.core.$loose>;
|
|
381
|
+
"turn.started": z.ZodObject<{
|
|
382
|
+
turn_id: z.ZodOptional<z.ZodString>;
|
|
383
|
+
prompt_chars: z.ZodOptional<z.ZodInt>;
|
|
384
|
+
}, z.core.$loose>;
|
|
385
|
+
"turn.ended": z.ZodObject<{
|
|
386
|
+
turn_id: z.ZodOptional<z.ZodString>;
|
|
387
|
+
reason: z.ZodEnum<{
|
|
388
|
+
error: "error";
|
|
389
|
+
stop: "stop";
|
|
390
|
+
interrupt: "interrupt";
|
|
391
|
+
}>;
|
|
392
|
+
ms: z.ZodOptional<z.ZodInt>;
|
|
393
|
+
}, z.core.$loose>;
|
|
394
|
+
"turn.transcript": z.ZodObject<{
|
|
395
|
+
turn: z.ZodInt;
|
|
396
|
+
user: z.ZodString;
|
|
397
|
+
assistant: z.ZodString;
|
|
398
|
+
at: z.ZodISODateTime;
|
|
399
|
+
}, z.core.$loose>;
|
|
400
|
+
"tool.started": z.ZodObject<{
|
|
401
|
+
tool: z.ZodString;
|
|
402
|
+
call_id: z.ZodOptional<z.ZodString>;
|
|
403
|
+
turn_id: z.ZodOptional<z.ZodString>;
|
|
404
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
405
|
+
input: z.ZodOptional<z.ZodUnknown>;
|
|
406
|
+
}, z.core.$loose>;
|
|
407
|
+
"tool.ended": z.ZodObject<{
|
|
408
|
+
tool: z.ZodString;
|
|
409
|
+
call_id: z.ZodOptional<z.ZodString>;
|
|
410
|
+
turn_id: z.ZodOptional<z.ZodString>;
|
|
411
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
412
|
+
ms: z.ZodOptional<z.ZodInt>;
|
|
413
|
+
ok: z.ZodBoolean;
|
|
414
|
+
error: z.ZodOptional<z.ZodString>;
|
|
415
|
+
input: z.ZodOptional<z.ZodUnknown>;
|
|
416
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
417
|
+
}, z.core.$loose>;
|
|
418
|
+
"files.changed": z.ZodObject<{
|
|
419
|
+
paths: z.ZodArray<z.ZodString>;
|
|
420
|
+
}, z.core.$loose>;
|
|
421
|
+
"attention.needed": z.ZodObject<{
|
|
422
|
+
attention_id: z.ZodString;
|
|
423
|
+
kind: z.ZodEnum<{
|
|
424
|
+
error: "error";
|
|
425
|
+
permission: "permission";
|
|
426
|
+
question: "question";
|
|
427
|
+
elicitation: "elicitation";
|
|
428
|
+
idle: "idle";
|
|
429
|
+
}>;
|
|
430
|
+
tool: z.ZodOptional<z.ZodString>;
|
|
431
|
+
message: z.ZodOptional<z.ZodString>;
|
|
432
|
+
}, z.core.$loose>;
|
|
433
|
+
"attention.cleared": z.ZodObject<{
|
|
434
|
+
attention_id: z.ZodString;
|
|
435
|
+
how: z.ZodEnum<{
|
|
436
|
+
unknown: "unknown";
|
|
437
|
+
answered: "answered";
|
|
438
|
+
cancelled: "cancelled";
|
|
439
|
+
timeout: "timeout";
|
|
440
|
+
}>;
|
|
441
|
+
}, z.core.$loose>;
|
|
442
|
+
"subagent.started": z.ZodObject<{
|
|
443
|
+
agent_id: z.ZodString;
|
|
444
|
+
agent_type: z.ZodOptional<z.ZodString>;
|
|
445
|
+
}, z.core.$loose>;
|
|
446
|
+
"subagent.ended": z.ZodObject<{
|
|
447
|
+
agent_id: z.ZodString;
|
|
448
|
+
agent_type: z.ZodOptional<z.ZodString>;
|
|
449
|
+
}, z.core.$loose>;
|
|
450
|
+
"context.compacted": z.ZodObject<{
|
|
451
|
+
trigger: z.ZodEnum<{
|
|
452
|
+
manual: "manual";
|
|
453
|
+
auto: "auto";
|
|
454
|
+
}>;
|
|
455
|
+
}, z.core.$loose>;
|
|
456
|
+
native: z.ZodObject<{}, z.core.$loose>;
|
|
457
|
+
}, z.core.$strip>;
|
|
458
|
+
readonly batch: z.ZodObject<{
|
|
459
|
+
events: z.ZodArray<z.ZodObject<{
|
|
460
|
+
protocol: z.ZodLiteral<1>;
|
|
461
|
+
id: z.ZodString;
|
|
462
|
+
type: z.ZodString;
|
|
463
|
+
time: z.ZodISODateTime;
|
|
464
|
+
tier: z.ZodInt;
|
|
465
|
+
harness: z.ZodObject<{
|
|
466
|
+
name: z.ZodString;
|
|
467
|
+
version: z.ZodOptional<z.ZodString>;
|
|
468
|
+
event: z.ZodOptional<z.ZodString>;
|
|
469
|
+
}, z.core.$strip>;
|
|
470
|
+
session: z.ZodObject<{
|
|
471
|
+
id: z.ZodString;
|
|
472
|
+
seq: z.ZodInt;
|
|
473
|
+
machine: z.ZodOptional<z.ZodString>;
|
|
474
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
475
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
476
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
477
|
+
model: z.ZodOptional<z.ZodString>;
|
|
478
|
+
title: z.ZodOptional<z.ZodString>;
|
|
479
|
+
title_source: z.ZodOptional<z.ZodEnum<{
|
|
480
|
+
custom: "custom";
|
|
481
|
+
harness: "harness";
|
|
482
|
+
"first-ask": "first-ask";
|
|
483
|
+
}>>;
|
|
484
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
485
|
+
account_id: z.ZodOptional<z.ZodString>;
|
|
486
|
+
parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
487
|
+
}, z.core.$strip>;
|
|
488
|
+
privacy: z.ZodObject<{
|
|
489
|
+
rulesets: z.ZodArray<z.ZodString>;
|
|
490
|
+
pii: z.ZodBoolean;
|
|
491
|
+
}, z.core.$strip>;
|
|
492
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
493
|
+
}, z.core.$strip>>;
|
|
494
|
+
}, z.core.$strip>;
|
|
495
|
+
readonly "batch-response": z.ZodObject<{
|
|
496
|
+
accepted: z.ZodInt;
|
|
497
|
+
duplicates: z.ZodInt;
|
|
498
|
+
rejected: z.ZodArray<z.ZodObject<{
|
|
499
|
+
id: z.ZodString;
|
|
500
|
+
reason: z.ZodString;
|
|
501
|
+
}, z.core.$strip>>;
|
|
502
|
+
max_tier: z.ZodInt;
|
|
503
|
+
}, z.core.$strip>;
|
|
504
|
+
readonly error: z.ZodObject<{
|
|
505
|
+
reason: z.ZodString;
|
|
506
|
+
supported: z.ZodOptional<z.ZodArray<z.ZodInt>>;
|
|
507
|
+
max_tier: z.ZodOptional<z.ZodInt>;
|
|
508
|
+
}, z.core.$strip>;
|
|
509
|
+
readonly "well-known": z.ZodObject<{
|
|
510
|
+
protocol: z.ZodArray<z.ZodInt>;
|
|
511
|
+
max_tier: z.ZodInt;
|
|
512
|
+
capabilities: z.ZodArray<z.ZodString>;
|
|
513
|
+
auth: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
514
|
+
bearer: "bearer";
|
|
515
|
+
}>>>;
|
|
516
|
+
endpoints: z.ZodObject<{
|
|
517
|
+
events: z.ZodString;
|
|
518
|
+
control: z.ZodOptional<z.ZodString>;
|
|
519
|
+
native: z.ZodOptional<z.ZodString>;
|
|
520
|
+
}, z.core.$strip>;
|
|
521
|
+
batch: z.ZodObject<{
|
|
522
|
+
max_events: z.ZodInt;
|
|
523
|
+
max_bytes: z.ZodInt;
|
|
524
|
+
}, z.core.$strip>;
|
|
525
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
526
|
+
wait_max_s: z.ZodInt;
|
|
527
|
+
}, z.core.$strip>>;
|
|
528
|
+
}, z.core.$strip>;
|
|
529
|
+
readonly control: z.ZodObject<{
|
|
530
|
+
id: z.ZodString;
|
|
531
|
+
kind: z.ZodEnum<{
|
|
532
|
+
"permission.answer": "permission.answer";
|
|
533
|
+
prompt: "prompt";
|
|
534
|
+
cancel: "cancel";
|
|
535
|
+
}>;
|
|
536
|
+
for: z.ZodOptional<z.ZodString>;
|
|
537
|
+
decision: z.ZodOptional<z.ZodEnum<{
|
|
538
|
+
allow: "allow";
|
|
539
|
+
deny: "deny";
|
|
540
|
+
}>>;
|
|
541
|
+
text: z.ZodOptional<z.ZodString>;
|
|
542
|
+
note: z.ZodOptional<z.ZodString>;
|
|
543
|
+
at: z.ZodISODateTime;
|
|
544
|
+
expires_at: z.ZodISODateTime;
|
|
545
|
+
}, z.core.$strip>;
|
|
546
|
+
readonly "control-poll": z.ZodObject<{
|
|
547
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
548
|
+
id: z.ZodString;
|
|
549
|
+
kind: z.ZodEnum<{
|
|
550
|
+
"permission.answer": "permission.answer";
|
|
551
|
+
prompt: "prompt";
|
|
552
|
+
cancel: "cancel";
|
|
553
|
+
}>;
|
|
554
|
+
for: z.ZodOptional<z.ZodString>;
|
|
555
|
+
decision: z.ZodOptional<z.ZodEnum<{
|
|
556
|
+
allow: "allow";
|
|
557
|
+
deny: "deny";
|
|
558
|
+
}>>;
|
|
559
|
+
text: z.ZodOptional<z.ZodString>;
|
|
560
|
+
note: z.ZodOptional<z.ZodString>;
|
|
561
|
+
at: z.ZodISODateTime;
|
|
562
|
+
expires_at: z.ZodISODateTime;
|
|
563
|
+
}, z.core.$strip>>;
|
|
564
|
+
}, z.core.$strip>;
|
|
565
|
+
readonly "control-ack": z.ZodObject<{
|
|
566
|
+
acks: z.ZodArray<z.ZodObject<{
|
|
567
|
+
id: z.ZodString;
|
|
568
|
+
outcome: z.ZodEnum<{
|
|
569
|
+
delivered: "delivered";
|
|
570
|
+
expired: "expired";
|
|
571
|
+
unsupported: "unsupported";
|
|
572
|
+
failed: "failed";
|
|
573
|
+
}>;
|
|
574
|
+
at: z.ZodISODateTime;
|
|
575
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
576
|
+
}, z.core.$strip>>;
|
|
577
|
+
}, z.core.$strip>;
|
|
578
|
+
};
|
|
579
|
+
//# sourceMappingURL=v1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../schema/v1.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,QAAQ,IAAI,CAAC;AAE1B,oEAAoE;AACpE,eAAO,MAAM,SAAS,aAE2E,CAAC;AAElG,eAAO,MAAM,WAAW,2TAkBd,CAAC;AAEX,oDAAoD;AACpD,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAkBzE,CAAC;AAEF,eAAO,MAAM,aAAa,sHAUhB,CAAC;AAEX,eAAO,MAAM,IAAI,UAAwB,CAAC;AAC1C,eAAO,MAAM,IAAI,aAAuD,CAAC;AACzE,eAAO,MAAM,OAAO,kBAAkD,CAAC;AACvE,eAAO,MAAM,SAAS,aAIQ,CAAC;AAC/B,eAAO,MAAM,QAAQ,aAA+C,CAAC;AAErE,eAAO,MAAM,OAAO;;;;iBAMlB,CAAC;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;iBAiBlB,CAAC;AAEH,eAAO,MAAM,OAAO;;;iBAIlB,CAAC;AAEH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAWhB,CAAC;AAKH,eAAO,MAAM,aAAa;;;;;;EAAqE,CAAC;AAEhG,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoDpB,CAAC;AAIH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAsD,CAAC;AAEzE,eAAO,MAAM,aAAa;;;;;;;;iBAKxB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;iBAIxB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;EAAgE,CAAC;AAExF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;iBAYpB,CAAC;AAEH,eAAO,MAAM,WAAW;;;;EAAoD,CAAC;AAE7E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;iBAYzB,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;iBAAkD,CAAC;AAE3E,eAAO,MAAM,UAAU;;;;;;;;;;;;iBAWrB,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUV,CAAC"}
|