@invictus-group-ai/core 0.5.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 +21 -0
- package/README.md +87 -0
- package/dist/canonical.d.ts +20 -0
- package/dist/canonical.d.ts.map +1 -0
- package/dist/canonical.js +52 -0
- package/dist/canonical.js.map +1 -0
- package/dist/cbor.d.ts +20 -0
- package/dist/cbor.d.ts.map +1 -0
- package/dist/cbor.js +236 -0
- package/dist/cbor.js.map +1 -0
- package/dist/devid.d.ts +54 -0
- package/dist/devid.d.ts.map +1 -0
- package/dist/devid.js +80 -0
- package/dist/devid.js.map +1 -0
- package/dist/eventlog.d.ts +75 -0
- package/dist/eventlog.d.ts.map +1 -0
- package/dist/eventlog.js +166 -0
- package/dist/eventlog.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest.d.ts +42 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +85 -0
- package/dist/manifest.js.map +1 -0
- package/dist/schemas.d.ts +613 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +265 -0
- package/dist/schemas.js.map +1 -0
- package/dist/trailer.d.ts +66 -0
- package/dist/trailer.d.ts.map +1 -0
- package/dist/trailer.js +140 -0
- package/dist/trailer.js.map +1 -0
- package/dist/types.d.ts +281 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +46 -0
- package/dist/types.js.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,613 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas mirroring the types in `types.ts`, plus parse helpers.
|
|
3
|
+
*
|
|
4
|
+
* Compile-time assertions at the bottom of this file keep the schemas and
|
|
5
|
+
* the hand-written interfaces from drifting apart.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { type EventLogEntry, type FragmentMeta, type HookInput, type HookOutput, type Manifest, type TrailerPayload } from './types.js';
|
|
9
|
+
export declare const DEV_ID_RE: RegExp;
|
|
10
|
+
export declare const SHA256_HEX_RE: RegExp;
|
|
11
|
+
export declare const HASH_PREFIX_RE: RegExp;
|
|
12
|
+
export declare const SEMVER_RE: RegExp;
|
|
13
|
+
export declare const FRAGMENT_ID_RE: RegExp;
|
|
14
|
+
export declare const REQ_ID_RE: RegExp;
|
|
15
|
+
export declare const devIdSchema: z.ZodString;
|
|
16
|
+
export declare const sha256HexSchema: z.ZodString;
|
|
17
|
+
export declare const hashPrefixSchema: z.ZodString;
|
|
18
|
+
export declare const manifestFragmentSchema: z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
version: z.ZodString;
|
|
21
|
+
sha256: z.ZodString;
|
|
22
|
+
}, "strict", z.ZodTypeAny, {
|
|
23
|
+
sha256: string;
|
|
24
|
+
id: string;
|
|
25
|
+
version: string;
|
|
26
|
+
}, {
|
|
27
|
+
sha256: string;
|
|
28
|
+
id: string;
|
|
29
|
+
version: string;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const manifestDevSchema: z.ZodObject<{
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
gitEmailHash: z.ZodString;
|
|
34
|
+
}, "strict", z.ZodTypeAny, {
|
|
35
|
+
id: string;
|
|
36
|
+
gitEmailHash: string;
|
|
37
|
+
}, {
|
|
38
|
+
id: string;
|
|
39
|
+
gitEmailHash: string;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const manifestSchema: z.ZodObject<{
|
|
42
|
+
schema: z.ZodLiteral<1>;
|
|
43
|
+
kit: z.ZodString;
|
|
44
|
+
installedAt: z.ZodString;
|
|
45
|
+
language: z.ZodObject<{
|
|
46
|
+
source: z.ZodString;
|
|
47
|
+
render: z.ZodString;
|
|
48
|
+
}, "strict", z.ZodTypeAny, {
|
|
49
|
+
source: string;
|
|
50
|
+
render: string;
|
|
51
|
+
}, {
|
|
52
|
+
source: string;
|
|
53
|
+
render: string;
|
|
54
|
+
}>;
|
|
55
|
+
runtime: z.ZodArray<z.ZodString, "many">;
|
|
56
|
+
project: z.ZodObject<{
|
|
57
|
+
baseBranch: z.ZodString;
|
|
58
|
+
protectedBranches: z.ZodArray<z.ZodString, "many">;
|
|
59
|
+
ticketPattern: z.ZodEffects<z.ZodString, string, string>;
|
|
60
|
+
catastrophicRisk: z.ZodString;
|
|
61
|
+
forge: z.ZodOptional<z.ZodEnum<["github", "gitlab", "gitea", "bitbucket"]>>;
|
|
62
|
+
workspaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
63
|
+
}, "strict", z.ZodTypeAny, {
|
|
64
|
+
baseBranch: string;
|
|
65
|
+
protectedBranches: string[];
|
|
66
|
+
ticketPattern: string;
|
|
67
|
+
catastrophicRisk: string;
|
|
68
|
+
forge?: "github" | "gitlab" | "gitea" | "bitbucket" | undefined;
|
|
69
|
+
workspaces?: Record<string, Record<string, string>> | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
baseBranch: string;
|
|
72
|
+
protectedBranches: string[];
|
|
73
|
+
ticketPattern: string;
|
|
74
|
+
catastrophicRisk: string;
|
|
75
|
+
forge?: "github" | "gitlab" | "gitea" | "bitbucket" | undefined;
|
|
76
|
+
workspaces?: Record<string, Record<string, string>> | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
fragments: z.ZodArray<z.ZodObject<{
|
|
79
|
+
id: z.ZodString;
|
|
80
|
+
version: z.ZodString;
|
|
81
|
+
sha256: z.ZodString;
|
|
82
|
+
}, "strict", z.ZodTypeAny, {
|
|
83
|
+
sha256: string;
|
|
84
|
+
id: string;
|
|
85
|
+
version: string;
|
|
86
|
+
}, {
|
|
87
|
+
sha256: string;
|
|
88
|
+
id: string;
|
|
89
|
+
version: string;
|
|
90
|
+
}>, "many">;
|
|
91
|
+
skills: z.ZodArray<z.ZodString, "many">;
|
|
92
|
+
hooks: z.ZodArray<z.ZodString, "many">;
|
|
93
|
+
devs: z.ZodArray<z.ZodObject<{
|
|
94
|
+
id: z.ZodString;
|
|
95
|
+
gitEmailHash: z.ZodString;
|
|
96
|
+
}, "strict", z.ZodTypeAny, {
|
|
97
|
+
id: string;
|
|
98
|
+
gitEmailHash: string;
|
|
99
|
+
}, {
|
|
100
|
+
id: string;
|
|
101
|
+
gitEmailHash: string;
|
|
102
|
+
}>, "many">;
|
|
103
|
+
}, "strict", z.ZodTypeAny, {
|
|
104
|
+
schema: 1;
|
|
105
|
+
kit: string;
|
|
106
|
+
installedAt: string;
|
|
107
|
+
language: {
|
|
108
|
+
source: string;
|
|
109
|
+
render: string;
|
|
110
|
+
};
|
|
111
|
+
runtime: string[];
|
|
112
|
+
project: {
|
|
113
|
+
baseBranch: string;
|
|
114
|
+
protectedBranches: string[];
|
|
115
|
+
ticketPattern: string;
|
|
116
|
+
catastrophicRisk: string;
|
|
117
|
+
forge?: "github" | "gitlab" | "gitea" | "bitbucket" | undefined;
|
|
118
|
+
workspaces?: Record<string, Record<string, string>> | undefined;
|
|
119
|
+
};
|
|
120
|
+
fragments: {
|
|
121
|
+
sha256: string;
|
|
122
|
+
id: string;
|
|
123
|
+
version: string;
|
|
124
|
+
}[];
|
|
125
|
+
skills: string[];
|
|
126
|
+
hooks: string[];
|
|
127
|
+
devs: {
|
|
128
|
+
id: string;
|
|
129
|
+
gitEmailHash: string;
|
|
130
|
+
}[];
|
|
131
|
+
}, {
|
|
132
|
+
schema: 1;
|
|
133
|
+
kit: string;
|
|
134
|
+
installedAt: string;
|
|
135
|
+
language: {
|
|
136
|
+
source: string;
|
|
137
|
+
render: string;
|
|
138
|
+
};
|
|
139
|
+
runtime: string[];
|
|
140
|
+
project: {
|
|
141
|
+
baseBranch: string;
|
|
142
|
+
protectedBranches: string[];
|
|
143
|
+
ticketPattern: string;
|
|
144
|
+
catastrophicRisk: string;
|
|
145
|
+
forge?: "github" | "gitlab" | "gitea" | "bitbucket" | undefined;
|
|
146
|
+
workspaces?: Record<string, Record<string, string>> | undefined;
|
|
147
|
+
};
|
|
148
|
+
fragments: {
|
|
149
|
+
sha256: string;
|
|
150
|
+
id: string;
|
|
151
|
+
version: string;
|
|
152
|
+
}[];
|
|
153
|
+
skills: string[];
|
|
154
|
+
hooks: string[];
|
|
155
|
+
devs: {
|
|
156
|
+
id: string;
|
|
157
|
+
gitEmailHash: string;
|
|
158
|
+
}[];
|
|
159
|
+
}>;
|
|
160
|
+
/** Token ceilings per fragment class (§4). Categories not listed have no ceiling here. */
|
|
161
|
+
export declare const FRAGMENT_TOKEN_CEILINGS: Readonly<Record<string, number>>;
|
|
162
|
+
export declare const fragmentMetaSchema: z.ZodEffects<z.ZodObject<{
|
|
163
|
+
id: z.ZodString;
|
|
164
|
+
version: z.ZodString;
|
|
165
|
+
lang: z.ZodString;
|
|
166
|
+
summary: z.ZodString;
|
|
167
|
+
detect: z.ZodOptional<z.ZodObject<{
|
|
168
|
+
deps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
169
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
170
|
+
score: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
}, "strict", z.ZodTypeAny, {
|
|
172
|
+
deps?: Record<string, string> | undefined;
|
|
173
|
+
files?: string[] | undefined;
|
|
174
|
+
score?: number | undefined;
|
|
175
|
+
}, {
|
|
176
|
+
deps?: Record<string, string> | undefined;
|
|
177
|
+
files?: string[] | undefined;
|
|
178
|
+
score?: number | undefined;
|
|
179
|
+
}>>;
|
|
180
|
+
requires: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
181
|
+
conflicts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
182
|
+
tokens: z.ZodNumber;
|
|
183
|
+
}, "strict", z.ZodTypeAny, {
|
|
184
|
+
id: string;
|
|
185
|
+
version: string;
|
|
186
|
+
lang: string;
|
|
187
|
+
summary: string;
|
|
188
|
+
requires: string[];
|
|
189
|
+
conflicts: string[];
|
|
190
|
+
tokens: number;
|
|
191
|
+
detect?: {
|
|
192
|
+
deps?: Record<string, string> | undefined;
|
|
193
|
+
files?: string[] | undefined;
|
|
194
|
+
score?: number | undefined;
|
|
195
|
+
} | undefined;
|
|
196
|
+
}, {
|
|
197
|
+
id: string;
|
|
198
|
+
version: string;
|
|
199
|
+
lang: string;
|
|
200
|
+
summary: string;
|
|
201
|
+
tokens: number;
|
|
202
|
+
detect?: {
|
|
203
|
+
deps?: Record<string, string> | undefined;
|
|
204
|
+
files?: string[] | undefined;
|
|
205
|
+
score?: number | undefined;
|
|
206
|
+
} | undefined;
|
|
207
|
+
requires?: string[] | undefined;
|
|
208
|
+
conflicts?: string[] | undefined;
|
|
209
|
+
}>, {
|
|
210
|
+
id: string;
|
|
211
|
+
version: string;
|
|
212
|
+
lang: string;
|
|
213
|
+
summary: string;
|
|
214
|
+
requires: string[];
|
|
215
|
+
conflicts: string[];
|
|
216
|
+
tokens: number;
|
|
217
|
+
detect?: {
|
|
218
|
+
deps?: Record<string, string> | undefined;
|
|
219
|
+
files?: string[] | undefined;
|
|
220
|
+
score?: number | undefined;
|
|
221
|
+
} | undefined;
|
|
222
|
+
}, {
|
|
223
|
+
id: string;
|
|
224
|
+
version: string;
|
|
225
|
+
lang: string;
|
|
226
|
+
summary: string;
|
|
227
|
+
tokens: number;
|
|
228
|
+
detect?: {
|
|
229
|
+
deps?: Record<string, string> | undefined;
|
|
230
|
+
files?: string[] | undefined;
|
|
231
|
+
score?: number | undefined;
|
|
232
|
+
} | undefined;
|
|
233
|
+
requires?: string[] | undefined;
|
|
234
|
+
conflicts?: string[] | undefined;
|
|
235
|
+
}>;
|
|
236
|
+
export declare const eventTypeSchema: z.ZodEnum<["session.start", "session.end", "task.commit", "decision", "checkpoint", "verify", "gate", "hook.error", "journal.note", "req.event", "task.event"]>;
|
|
237
|
+
export declare const eventLogEntrySchema: z.ZodObject<{
|
|
238
|
+
v: z.ZodLiteral<1>;
|
|
239
|
+
ts: z.ZodNumber;
|
|
240
|
+
dev: z.ZodString;
|
|
241
|
+
sid: z.ZodString;
|
|
242
|
+
type: z.ZodEnum<["session.start", "session.end", "task.commit", "decision", "checkpoint", "verify", "gate", "hook.error", "journal.note", "req.event", "task.event"]>;
|
|
243
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
244
|
+
h: z.ZodString;
|
|
245
|
+
prev: z.ZodNullable<z.ZodString>;
|
|
246
|
+
}, "strict", z.ZodTypeAny, {
|
|
247
|
+
v: 1;
|
|
248
|
+
type: "session.start" | "session.end" | "task.commit" | "decision" | "checkpoint" | "verify" | "gate" | "hook.error" | "journal.note" | "req.event" | "task.event";
|
|
249
|
+
ts: number;
|
|
250
|
+
dev: string;
|
|
251
|
+
sid: string;
|
|
252
|
+
data: Record<string, unknown>;
|
|
253
|
+
h: string;
|
|
254
|
+
prev: string | null;
|
|
255
|
+
}, {
|
|
256
|
+
v: 1;
|
|
257
|
+
type: "session.start" | "session.end" | "task.commit" | "decision" | "checkpoint" | "verify" | "gate" | "hook.error" | "journal.note" | "req.event" | "task.event";
|
|
258
|
+
ts: number;
|
|
259
|
+
dev: string;
|
|
260
|
+
sid: string;
|
|
261
|
+
data: Record<string, unknown>;
|
|
262
|
+
h: string;
|
|
263
|
+
prev: string | null;
|
|
264
|
+
}>;
|
|
265
|
+
export declare const trailerPayloadSchema: z.ZodObject<{
|
|
266
|
+
v: z.ZodLiteral<1>;
|
|
267
|
+
kit: z.ZodString;
|
|
268
|
+
tool: z.ZodString;
|
|
269
|
+
dev: z.ZodString;
|
|
270
|
+
cli_ent: z.ZodString;
|
|
271
|
+
ts: z.ZodNumber;
|
|
272
|
+
s: z.ZodArray<z.ZodString, "many">;
|
|
273
|
+
t: z.ZodObject<{
|
|
274
|
+
i: z.ZodNumber;
|
|
275
|
+
o: z.ZodNumber;
|
|
276
|
+
cr: z.ZodNumber;
|
|
277
|
+
cw: z.ZodNumber;
|
|
278
|
+
}, "strict", z.ZodTypeAny, {
|
|
279
|
+
i: number;
|
|
280
|
+
o: number;
|
|
281
|
+
cr: number;
|
|
282
|
+
cw: number;
|
|
283
|
+
}, {
|
|
284
|
+
i: number;
|
|
285
|
+
o: number;
|
|
286
|
+
cr: number;
|
|
287
|
+
cw: number;
|
|
288
|
+
}>;
|
|
289
|
+
usd: z.ZodNumber;
|
|
290
|
+
m: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
291
|
+
loc: z.ZodObject<{
|
|
292
|
+
aa: z.ZodNumber;
|
|
293
|
+
ad: z.ZodNumber;
|
|
294
|
+
ha: z.ZodNumber;
|
|
295
|
+
hd: z.ZodNumber;
|
|
296
|
+
}, "strict", z.ZodTypeAny, {
|
|
297
|
+
aa: number;
|
|
298
|
+
ad: number;
|
|
299
|
+
ha: number;
|
|
300
|
+
hd: number;
|
|
301
|
+
}, {
|
|
302
|
+
aa: number;
|
|
303
|
+
ad: number;
|
|
304
|
+
ha: number;
|
|
305
|
+
hd: number;
|
|
306
|
+
}>;
|
|
307
|
+
px: z.ZodNumber;
|
|
308
|
+
tl: z.ZodNumber;
|
|
309
|
+
acc: z.ZodNumber;
|
|
310
|
+
rej: z.ZodNumber;
|
|
311
|
+
act: z.ZodNumber;
|
|
312
|
+
dur: z.ZodNumber;
|
|
313
|
+
req: z.ZodArray<z.ZodString, "many">;
|
|
314
|
+
ph: z.ZodOptional<z.ZodString>;
|
|
315
|
+
j: z.ZodString;
|
|
316
|
+
prev: z.ZodNullable<z.ZodString>;
|
|
317
|
+
}, "strict", z.ZodTypeAny, {
|
|
318
|
+
v: 1;
|
|
319
|
+
kit: string;
|
|
320
|
+
ts: number;
|
|
321
|
+
dev: string;
|
|
322
|
+
prev: string | null;
|
|
323
|
+
tool: string;
|
|
324
|
+
cli_ent: string;
|
|
325
|
+
s: string[];
|
|
326
|
+
t: {
|
|
327
|
+
i: number;
|
|
328
|
+
o: number;
|
|
329
|
+
cr: number;
|
|
330
|
+
cw: number;
|
|
331
|
+
};
|
|
332
|
+
usd: number;
|
|
333
|
+
m: Record<string, number>;
|
|
334
|
+
loc: {
|
|
335
|
+
aa: number;
|
|
336
|
+
ad: number;
|
|
337
|
+
ha: number;
|
|
338
|
+
hd: number;
|
|
339
|
+
};
|
|
340
|
+
px: number;
|
|
341
|
+
tl: number;
|
|
342
|
+
acc: number;
|
|
343
|
+
rej: number;
|
|
344
|
+
act: number;
|
|
345
|
+
dur: number;
|
|
346
|
+
req: string[];
|
|
347
|
+
j: string;
|
|
348
|
+
ph?: string | undefined;
|
|
349
|
+
}, {
|
|
350
|
+
v: 1;
|
|
351
|
+
kit: string;
|
|
352
|
+
ts: number;
|
|
353
|
+
dev: string;
|
|
354
|
+
prev: string | null;
|
|
355
|
+
tool: string;
|
|
356
|
+
cli_ent: string;
|
|
357
|
+
s: string[];
|
|
358
|
+
t: {
|
|
359
|
+
i: number;
|
|
360
|
+
o: number;
|
|
361
|
+
cr: number;
|
|
362
|
+
cw: number;
|
|
363
|
+
};
|
|
364
|
+
usd: number;
|
|
365
|
+
m: Record<string, number>;
|
|
366
|
+
loc: {
|
|
367
|
+
aa: number;
|
|
368
|
+
ad: number;
|
|
369
|
+
ha: number;
|
|
370
|
+
hd: number;
|
|
371
|
+
};
|
|
372
|
+
px: number;
|
|
373
|
+
tl: number;
|
|
374
|
+
acc: number;
|
|
375
|
+
rej: number;
|
|
376
|
+
act: number;
|
|
377
|
+
dur: number;
|
|
378
|
+
req: string[];
|
|
379
|
+
j: string;
|
|
380
|
+
ph?: string | undefined;
|
|
381
|
+
}>;
|
|
382
|
+
export declare const hookInputSchema: z.ZodObject<{
|
|
383
|
+
session_id: z.ZodString;
|
|
384
|
+
transcript_path: z.ZodString;
|
|
385
|
+
cwd: z.ZodString;
|
|
386
|
+
hook_event_name: z.ZodString;
|
|
387
|
+
prompt_id: z.ZodOptional<z.ZodString>;
|
|
388
|
+
tool_name: z.ZodOptional<z.ZodString>;
|
|
389
|
+
tool_input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
390
|
+
tool_response: z.ZodOptional<z.ZodUnknown>;
|
|
391
|
+
stop_hook_active: z.ZodOptional<z.ZodBoolean>;
|
|
392
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
393
|
+
source: z.ZodOptional<z.ZodString>;
|
|
394
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
395
|
+
message: z.ZodOptional<z.ZodString>;
|
|
396
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
397
|
+
custom_instructions: z.ZodOptional<z.ZodString>;
|
|
398
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
399
|
+
session_id: z.ZodString;
|
|
400
|
+
transcript_path: z.ZodString;
|
|
401
|
+
cwd: z.ZodString;
|
|
402
|
+
hook_event_name: z.ZodString;
|
|
403
|
+
prompt_id: z.ZodOptional<z.ZodString>;
|
|
404
|
+
tool_name: z.ZodOptional<z.ZodString>;
|
|
405
|
+
tool_input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
406
|
+
tool_response: z.ZodOptional<z.ZodUnknown>;
|
|
407
|
+
stop_hook_active: z.ZodOptional<z.ZodBoolean>;
|
|
408
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
409
|
+
source: z.ZodOptional<z.ZodString>;
|
|
410
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
411
|
+
message: z.ZodOptional<z.ZodString>;
|
|
412
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
413
|
+
custom_instructions: z.ZodOptional<z.ZodString>;
|
|
414
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
415
|
+
session_id: z.ZodString;
|
|
416
|
+
transcript_path: z.ZodString;
|
|
417
|
+
cwd: z.ZodString;
|
|
418
|
+
hook_event_name: z.ZodString;
|
|
419
|
+
prompt_id: z.ZodOptional<z.ZodString>;
|
|
420
|
+
tool_name: z.ZodOptional<z.ZodString>;
|
|
421
|
+
tool_input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
422
|
+
tool_response: z.ZodOptional<z.ZodUnknown>;
|
|
423
|
+
stop_hook_active: z.ZodOptional<z.ZodBoolean>;
|
|
424
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
425
|
+
source: z.ZodOptional<z.ZodString>;
|
|
426
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
427
|
+
message: z.ZodOptional<z.ZodString>;
|
|
428
|
+
trigger: z.ZodOptional<z.ZodString>;
|
|
429
|
+
custom_instructions: z.ZodOptional<z.ZodString>;
|
|
430
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
431
|
+
export declare const hookSpecificOutputSchema: z.ZodObject<{
|
|
432
|
+
hookEventName: z.ZodString;
|
|
433
|
+
additionalContext: z.ZodOptional<z.ZodString>;
|
|
434
|
+
permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
|
|
435
|
+
permissionDecisionReason: z.ZodOptional<z.ZodString>;
|
|
436
|
+
}, "strict", z.ZodTypeAny, {
|
|
437
|
+
hookEventName: string;
|
|
438
|
+
additionalContext?: string | undefined;
|
|
439
|
+
permissionDecision?: "allow" | "deny" | "ask" | undefined;
|
|
440
|
+
permissionDecisionReason?: string | undefined;
|
|
441
|
+
}, {
|
|
442
|
+
hookEventName: string;
|
|
443
|
+
additionalContext?: string | undefined;
|
|
444
|
+
permissionDecision?: "allow" | "deny" | "ask" | undefined;
|
|
445
|
+
permissionDecisionReason?: string | undefined;
|
|
446
|
+
}>;
|
|
447
|
+
export declare const hookJsonOutputSchema: z.ZodObject<{
|
|
448
|
+
continue: z.ZodOptional<z.ZodBoolean>;
|
|
449
|
+
stopReason: z.ZodOptional<z.ZodString>;
|
|
450
|
+
suppressOutput: z.ZodOptional<z.ZodBoolean>;
|
|
451
|
+
decision: z.ZodOptional<z.ZodEnum<["approve", "block"]>>;
|
|
452
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
453
|
+
systemMessage: z.ZodOptional<z.ZodString>;
|
|
454
|
+
hookSpecificOutput: z.ZodOptional<z.ZodObject<{
|
|
455
|
+
hookEventName: z.ZodString;
|
|
456
|
+
additionalContext: z.ZodOptional<z.ZodString>;
|
|
457
|
+
permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
|
|
458
|
+
permissionDecisionReason: z.ZodOptional<z.ZodString>;
|
|
459
|
+
}, "strict", z.ZodTypeAny, {
|
|
460
|
+
hookEventName: string;
|
|
461
|
+
additionalContext?: string | undefined;
|
|
462
|
+
permissionDecision?: "allow" | "deny" | "ask" | undefined;
|
|
463
|
+
permissionDecisionReason?: string | undefined;
|
|
464
|
+
}, {
|
|
465
|
+
hookEventName: string;
|
|
466
|
+
additionalContext?: string | undefined;
|
|
467
|
+
permissionDecision?: "allow" | "deny" | "ask" | undefined;
|
|
468
|
+
permissionDecisionReason?: string | undefined;
|
|
469
|
+
}>>;
|
|
470
|
+
}, "strict", z.ZodTypeAny, {
|
|
471
|
+
decision?: "approve" | "block" | undefined;
|
|
472
|
+
reason?: string | undefined;
|
|
473
|
+
continue?: boolean | undefined;
|
|
474
|
+
stopReason?: string | undefined;
|
|
475
|
+
suppressOutput?: boolean | undefined;
|
|
476
|
+
systemMessage?: string | undefined;
|
|
477
|
+
hookSpecificOutput?: {
|
|
478
|
+
hookEventName: string;
|
|
479
|
+
additionalContext?: string | undefined;
|
|
480
|
+
permissionDecision?: "allow" | "deny" | "ask" | undefined;
|
|
481
|
+
permissionDecisionReason?: string | undefined;
|
|
482
|
+
} | undefined;
|
|
483
|
+
}, {
|
|
484
|
+
decision?: "approve" | "block" | undefined;
|
|
485
|
+
reason?: string | undefined;
|
|
486
|
+
continue?: boolean | undefined;
|
|
487
|
+
stopReason?: string | undefined;
|
|
488
|
+
suppressOutput?: boolean | undefined;
|
|
489
|
+
systemMessage?: string | undefined;
|
|
490
|
+
hookSpecificOutput?: {
|
|
491
|
+
hookEventName: string;
|
|
492
|
+
additionalContext?: string | undefined;
|
|
493
|
+
permissionDecision?: "allow" | "deny" | "ask" | undefined;
|
|
494
|
+
permissionDecisionReason?: string | undefined;
|
|
495
|
+
} | undefined;
|
|
496
|
+
}>;
|
|
497
|
+
export declare const hookOutputSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
|
|
498
|
+
mode: z.ZodLiteral<"exit">;
|
|
499
|
+
exitCode: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
500
|
+
stdout: z.ZodOptional<z.ZodString>;
|
|
501
|
+
stderr: z.ZodOptional<z.ZodString>;
|
|
502
|
+
}, "strict", z.ZodTypeAny, {
|
|
503
|
+
mode: "exit";
|
|
504
|
+
exitCode: 0 | 1 | 2;
|
|
505
|
+
stdout?: string | undefined;
|
|
506
|
+
stderr?: string | undefined;
|
|
507
|
+
}, {
|
|
508
|
+
mode: "exit";
|
|
509
|
+
exitCode: 0 | 1 | 2;
|
|
510
|
+
stdout?: string | undefined;
|
|
511
|
+
stderr?: string | undefined;
|
|
512
|
+
}>, z.ZodObject<{
|
|
513
|
+
mode: z.ZodLiteral<"json">;
|
|
514
|
+
json: z.ZodObject<{
|
|
515
|
+
continue: z.ZodOptional<z.ZodBoolean>;
|
|
516
|
+
stopReason: z.ZodOptional<z.ZodString>;
|
|
517
|
+
suppressOutput: z.ZodOptional<z.ZodBoolean>;
|
|
518
|
+
decision: z.ZodOptional<z.ZodEnum<["approve", "block"]>>;
|
|
519
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
520
|
+
systemMessage: z.ZodOptional<z.ZodString>;
|
|
521
|
+
hookSpecificOutput: z.ZodOptional<z.ZodObject<{
|
|
522
|
+
hookEventName: z.ZodString;
|
|
523
|
+
additionalContext: z.ZodOptional<z.ZodString>;
|
|
524
|
+
permissionDecision: z.ZodOptional<z.ZodEnum<["allow", "deny", "ask"]>>;
|
|
525
|
+
permissionDecisionReason: z.ZodOptional<z.ZodString>;
|
|
526
|
+
}, "strict", z.ZodTypeAny, {
|
|
527
|
+
hookEventName: string;
|
|
528
|
+
additionalContext?: string | undefined;
|
|
529
|
+
permissionDecision?: "allow" | "deny" | "ask" | undefined;
|
|
530
|
+
permissionDecisionReason?: string | undefined;
|
|
531
|
+
}, {
|
|
532
|
+
hookEventName: string;
|
|
533
|
+
additionalContext?: string | undefined;
|
|
534
|
+
permissionDecision?: "allow" | "deny" | "ask" | undefined;
|
|
535
|
+
permissionDecisionReason?: string | undefined;
|
|
536
|
+
}>>;
|
|
537
|
+
}, "strict", z.ZodTypeAny, {
|
|
538
|
+
decision?: "approve" | "block" | undefined;
|
|
539
|
+
reason?: string | undefined;
|
|
540
|
+
continue?: boolean | undefined;
|
|
541
|
+
stopReason?: string | undefined;
|
|
542
|
+
suppressOutput?: boolean | undefined;
|
|
543
|
+
systemMessage?: string | undefined;
|
|
544
|
+
hookSpecificOutput?: {
|
|
545
|
+
hookEventName: string;
|
|
546
|
+
additionalContext?: string | undefined;
|
|
547
|
+
permissionDecision?: "allow" | "deny" | "ask" | undefined;
|
|
548
|
+
permissionDecisionReason?: string | undefined;
|
|
549
|
+
} | undefined;
|
|
550
|
+
}, {
|
|
551
|
+
decision?: "approve" | "block" | undefined;
|
|
552
|
+
reason?: string | undefined;
|
|
553
|
+
continue?: boolean | undefined;
|
|
554
|
+
stopReason?: string | undefined;
|
|
555
|
+
suppressOutput?: boolean | undefined;
|
|
556
|
+
systemMessage?: string | undefined;
|
|
557
|
+
hookSpecificOutput?: {
|
|
558
|
+
hookEventName: string;
|
|
559
|
+
additionalContext?: string | undefined;
|
|
560
|
+
permissionDecision?: "allow" | "deny" | "ask" | undefined;
|
|
561
|
+
permissionDecisionReason?: string | undefined;
|
|
562
|
+
} | undefined;
|
|
563
|
+
}>;
|
|
564
|
+
}, "strict", z.ZodTypeAny, {
|
|
565
|
+
json: {
|
|
566
|
+
decision?: "approve" | "block" | undefined;
|
|
567
|
+
reason?: string | undefined;
|
|
568
|
+
continue?: boolean | undefined;
|
|
569
|
+
stopReason?: string | undefined;
|
|
570
|
+
suppressOutput?: boolean | undefined;
|
|
571
|
+
systemMessage?: string | undefined;
|
|
572
|
+
hookSpecificOutput?: {
|
|
573
|
+
hookEventName: string;
|
|
574
|
+
additionalContext?: string | undefined;
|
|
575
|
+
permissionDecision?: "allow" | "deny" | "ask" | undefined;
|
|
576
|
+
permissionDecisionReason?: string | undefined;
|
|
577
|
+
} | undefined;
|
|
578
|
+
};
|
|
579
|
+
mode: "json";
|
|
580
|
+
}, {
|
|
581
|
+
json: {
|
|
582
|
+
decision?: "approve" | "block" | undefined;
|
|
583
|
+
reason?: string | undefined;
|
|
584
|
+
continue?: boolean | undefined;
|
|
585
|
+
stopReason?: string | undefined;
|
|
586
|
+
suppressOutput?: boolean | undefined;
|
|
587
|
+
systemMessage?: string | undefined;
|
|
588
|
+
hookSpecificOutput?: {
|
|
589
|
+
hookEventName: string;
|
|
590
|
+
additionalContext?: string | undefined;
|
|
591
|
+
permissionDecision?: "allow" | "deny" | "ask" | undefined;
|
|
592
|
+
permissionDecisionReason?: string | undefined;
|
|
593
|
+
} | undefined;
|
|
594
|
+
};
|
|
595
|
+
mode: "json";
|
|
596
|
+
}>]>;
|
|
597
|
+
export declare class InvictusValidationError extends Error {
|
|
598
|
+
readonly issues: ReadonlyArray<{
|
|
599
|
+
path: string;
|
|
600
|
+
message: string;
|
|
601
|
+
}>;
|
|
602
|
+
constructor(what: string, issues: ReadonlyArray<{
|
|
603
|
+
path: string;
|
|
604
|
+
message: string;
|
|
605
|
+
}>);
|
|
606
|
+
}
|
|
607
|
+
export declare function parseManifest(value: unknown): Manifest;
|
|
608
|
+
export declare function parseFragmentMeta(value: unknown): FragmentMeta;
|
|
609
|
+
export declare function parseEventLogEntry(value: unknown): EventLogEntry;
|
|
610
|
+
export declare function parseTrailerPayload(value: unknown): TrailerPayload;
|
|
611
|
+
export declare function parseHookInput(value: unknown): HookInput;
|
|
612
|
+
export declare function parseHookOutput(value: unknown): HookOutput;
|
|
613
|
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