baller-maester 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/CHANGELOG.md +26 -0
- package/LICENSE +21 -0
- package/README.md +142 -0
- package/bin/maester.mjs +7 -0
- package/dist/cli/main.d.ts +4 -0
- package/dist/cli/main.js +3760 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/index.d.ts +546 -0
- package/dist/index.js +1819 -0
- package/dist/index.js.map +1 -0
- package/package.json +73 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const StateSchema: z.ZodEnum<["draft", "canon"]>;
|
|
4
|
+
type State = z.infer<typeof StateSchema>;
|
|
5
|
+
|
|
6
|
+
declare const AuthRefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
7
|
+
type: z.ZodLiteral<"none">;
|
|
8
|
+
}, "strict", z.ZodTypeAny, {
|
|
9
|
+
type: "none";
|
|
10
|
+
}, {
|
|
11
|
+
type: "none";
|
|
12
|
+
}>, z.ZodObject<{
|
|
13
|
+
type: z.ZodLiteral<"token">;
|
|
14
|
+
envVar: z.ZodString;
|
|
15
|
+
}, "strict", z.ZodTypeAny, {
|
|
16
|
+
type: "token";
|
|
17
|
+
envVar: string;
|
|
18
|
+
}, {
|
|
19
|
+
type: "token";
|
|
20
|
+
envVar: string;
|
|
21
|
+
}>]>;
|
|
22
|
+
declare const SourceSchema: z.ZodObject<{
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
url: z.ZodEffects<z.ZodString, string, string>;
|
|
25
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
26
|
+
includes: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
27
|
+
path: z.ZodEffects<z.ZodString, string, string>;
|
|
28
|
+
state: z.ZodOptional<z.ZodEnum<["draft", "canon"]>>;
|
|
29
|
+
}, "strict", z.ZodTypeAny, {
|
|
30
|
+
path: string;
|
|
31
|
+
state?: "draft" | "canon" | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
path: string;
|
|
34
|
+
state?: "draft" | "canon" | undefined;
|
|
35
|
+
}>]>, "many">>;
|
|
36
|
+
auth: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
37
|
+
type: z.ZodLiteral<"none">;
|
|
38
|
+
}, "strict", z.ZodTypeAny, {
|
|
39
|
+
type: "none";
|
|
40
|
+
}, {
|
|
41
|
+
type: "none";
|
|
42
|
+
}>, z.ZodObject<{
|
|
43
|
+
type: z.ZodLiteral<"token">;
|
|
44
|
+
envVar: z.ZodString;
|
|
45
|
+
}, "strict", z.ZodTypeAny, {
|
|
46
|
+
type: "token";
|
|
47
|
+
envVar: string;
|
|
48
|
+
}, {
|
|
49
|
+
type: "token";
|
|
50
|
+
envVar: string;
|
|
51
|
+
}>]>>;
|
|
52
|
+
destination: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
53
|
+
description: z.ZodOptional<z.ZodString>;
|
|
54
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
55
|
+
}, "strict", z.ZodTypeAny, {
|
|
56
|
+
name: string;
|
|
57
|
+
url: string;
|
|
58
|
+
includes?: (string | {
|
|
59
|
+
path: string;
|
|
60
|
+
state?: "draft" | "canon" | undefined;
|
|
61
|
+
})[] | undefined;
|
|
62
|
+
ref?: string | undefined;
|
|
63
|
+
auth?: {
|
|
64
|
+
type: "none";
|
|
65
|
+
} | {
|
|
66
|
+
type: "token";
|
|
67
|
+
envVar: string;
|
|
68
|
+
} | undefined;
|
|
69
|
+
destination?: string | undefined;
|
|
70
|
+
description?: string | undefined;
|
|
71
|
+
tags?: string[] | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
name: string;
|
|
74
|
+
url: string;
|
|
75
|
+
includes?: (string | {
|
|
76
|
+
path: string;
|
|
77
|
+
state?: "draft" | "canon" | undefined;
|
|
78
|
+
})[] | undefined;
|
|
79
|
+
ref?: string | undefined;
|
|
80
|
+
auth?: {
|
|
81
|
+
type: "none";
|
|
82
|
+
} | {
|
|
83
|
+
type: "token";
|
|
84
|
+
envVar: string;
|
|
85
|
+
} | undefined;
|
|
86
|
+
destination?: string | undefined;
|
|
87
|
+
description?: string | undefined;
|
|
88
|
+
tags?: string[] | undefined;
|
|
89
|
+
}>;
|
|
90
|
+
declare const CitadelConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
91
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
92
|
+
baseDir: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
93
|
+
sources: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
94
|
+
name: z.ZodString;
|
|
95
|
+
url: z.ZodEffects<z.ZodString, string, string>;
|
|
96
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
97
|
+
includes: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
98
|
+
path: z.ZodEffects<z.ZodString, string, string>;
|
|
99
|
+
state: z.ZodOptional<z.ZodEnum<["draft", "canon"]>>;
|
|
100
|
+
}, "strict", z.ZodTypeAny, {
|
|
101
|
+
path: string;
|
|
102
|
+
state?: "draft" | "canon" | undefined;
|
|
103
|
+
}, {
|
|
104
|
+
path: string;
|
|
105
|
+
state?: "draft" | "canon" | undefined;
|
|
106
|
+
}>]>, "many">>;
|
|
107
|
+
auth: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
108
|
+
type: z.ZodLiteral<"none">;
|
|
109
|
+
}, "strict", z.ZodTypeAny, {
|
|
110
|
+
type: "none";
|
|
111
|
+
}, {
|
|
112
|
+
type: "none";
|
|
113
|
+
}>, z.ZodObject<{
|
|
114
|
+
type: z.ZodLiteral<"token">;
|
|
115
|
+
envVar: z.ZodString;
|
|
116
|
+
}, "strict", z.ZodTypeAny, {
|
|
117
|
+
type: "token";
|
|
118
|
+
envVar: string;
|
|
119
|
+
}, {
|
|
120
|
+
type: "token";
|
|
121
|
+
envVar: string;
|
|
122
|
+
}>]>>;
|
|
123
|
+
destination: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
124
|
+
description: z.ZodOptional<z.ZodString>;
|
|
125
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
126
|
+
}, "strict", z.ZodTypeAny, {
|
|
127
|
+
name: string;
|
|
128
|
+
url: string;
|
|
129
|
+
includes?: (string | {
|
|
130
|
+
path: string;
|
|
131
|
+
state?: "draft" | "canon" | undefined;
|
|
132
|
+
})[] | undefined;
|
|
133
|
+
ref?: string | undefined;
|
|
134
|
+
auth?: {
|
|
135
|
+
type: "none";
|
|
136
|
+
} | {
|
|
137
|
+
type: "token";
|
|
138
|
+
envVar: string;
|
|
139
|
+
} | undefined;
|
|
140
|
+
destination?: string | undefined;
|
|
141
|
+
description?: string | undefined;
|
|
142
|
+
tags?: string[] | undefined;
|
|
143
|
+
}, {
|
|
144
|
+
name: string;
|
|
145
|
+
url: string;
|
|
146
|
+
includes?: (string | {
|
|
147
|
+
path: string;
|
|
148
|
+
state?: "draft" | "canon" | undefined;
|
|
149
|
+
})[] | undefined;
|
|
150
|
+
ref?: string | undefined;
|
|
151
|
+
auth?: {
|
|
152
|
+
type: "none";
|
|
153
|
+
} | {
|
|
154
|
+
type: "token";
|
|
155
|
+
envVar: string;
|
|
156
|
+
} | undefined;
|
|
157
|
+
destination?: string | undefined;
|
|
158
|
+
description?: string | undefined;
|
|
159
|
+
tags?: string[] | undefined;
|
|
160
|
+
}>, "many">>>;
|
|
161
|
+
}, "strict", z.ZodTypeAny, {
|
|
162
|
+
sources: {
|
|
163
|
+
name: string;
|
|
164
|
+
url: string;
|
|
165
|
+
includes?: (string | {
|
|
166
|
+
path: string;
|
|
167
|
+
state?: "draft" | "canon" | undefined;
|
|
168
|
+
})[] | undefined;
|
|
169
|
+
ref?: string | undefined;
|
|
170
|
+
auth?: {
|
|
171
|
+
type: "none";
|
|
172
|
+
} | {
|
|
173
|
+
type: "token";
|
|
174
|
+
envVar: string;
|
|
175
|
+
} | undefined;
|
|
176
|
+
destination?: string | undefined;
|
|
177
|
+
description?: string | undefined;
|
|
178
|
+
tags?: string[] | undefined;
|
|
179
|
+
}[];
|
|
180
|
+
schemaVersion: 1;
|
|
181
|
+
baseDir?: string | undefined;
|
|
182
|
+
}, {
|
|
183
|
+
schemaVersion: 1;
|
|
184
|
+
sources?: {
|
|
185
|
+
name: string;
|
|
186
|
+
url: string;
|
|
187
|
+
includes?: (string | {
|
|
188
|
+
path: string;
|
|
189
|
+
state?: "draft" | "canon" | undefined;
|
|
190
|
+
})[] | undefined;
|
|
191
|
+
ref?: string | undefined;
|
|
192
|
+
auth?: {
|
|
193
|
+
type: "none";
|
|
194
|
+
} | {
|
|
195
|
+
type: "token";
|
|
196
|
+
envVar: string;
|
|
197
|
+
} | undefined;
|
|
198
|
+
destination?: string | undefined;
|
|
199
|
+
description?: string | undefined;
|
|
200
|
+
tags?: string[] | undefined;
|
|
201
|
+
}[] | undefined;
|
|
202
|
+
baseDir?: string | undefined;
|
|
203
|
+
}>, {
|
|
204
|
+
sources: {
|
|
205
|
+
name: string;
|
|
206
|
+
url: string;
|
|
207
|
+
includes?: (string | {
|
|
208
|
+
path: string;
|
|
209
|
+
state?: "draft" | "canon" | undefined;
|
|
210
|
+
})[] | undefined;
|
|
211
|
+
ref?: string | undefined;
|
|
212
|
+
auth?: {
|
|
213
|
+
type: "none";
|
|
214
|
+
} | {
|
|
215
|
+
type: "token";
|
|
216
|
+
envVar: string;
|
|
217
|
+
} | undefined;
|
|
218
|
+
destination?: string | undefined;
|
|
219
|
+
description?: string | undefined;
|
|
220
|
+
tags?: string[] | undefined;
|
|
221
|
+
}[];
|
|
222
|
+
schemaVersion: 1;
|
|
223
|
+
baseDir?: string | undefined;
|
|
224
|
+
}, {
|
|
225
|
+
schemaVersion: 1;
|
|
226
|
+
sources?: {
|
|
227
|
+
name: string;
|
|
228
|
+
url: string;
|
|
229
|
+
includes?: (string | {
|
|
230
|
+
path: string;
|
|
231
|
+
state?: "draft" | "canon" | undefined;
|
|
232
|
+
})[] | undefined;
|
|
233
|
+
ref?: string | undefined;
|
|
234
|
+
auth?: {
|
|
235
|
+
type: "none";
|
|
236
|
+
} | {
|
|
237
|
+
type: "token";
|
|
238
|
+
envVar: string;
|
|
239
|
+
} | undefined;
|
|
240
|
+
destination?: string | undefined;
|
|
241
|
+
description?: string | undefined;
|
|
242
|
+
tags?: string[] | undefined;
|
|
243
|
+
}[] | undefined;
|
|
244
|
+
baseDir?: string | undefined;
|
|
245
|
+
}>;
|
|
246
|
+
type AuthRef = z.infer<typeof AuthRefSchema>;
|
|
247
|
+
type Source = z.infer<typeof SourceSchema>;
|
|
248
|
+
type CitadelConfig = z.infer<typeof CitadelConfigSchema>;
|
|
249
|
+
|
|
250
|
+
declare const PublishedDocumentSchema: z.ZodObject<{
|
|
251
|
+
path: z.ZodEffects<z.ZodString, string, string>;
|
|
252
|
+
description: z.ZodOptional<z.ZodString>;
|
|
253
|
+
category: z.ZodOptional<z.ZodString>;
|
|
254
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
255
|
+
state: z.ZodOptional<z.ZodEnum<["draft", "canon"]>>;
|
|
256
|
+
}, "strict", z.ZodTypeAny, {
|
|
257
|
+
path: string;
|
|
258
|
+
state?: "draft" | "canon" | undefined;
|
|
259
|
+
description?: string | undefined;
|
|
260
|
+
tags?: string[] | undefined;
|
|
261
|
+
category?: string | undefined;
|
|
262
|
+
}, {
|
|
263
|
+
path: string;
|
|
264
|
+
state?: "draft" | "canon" | undefined;
|
|
265
|
+
description?: string | undefined;
|
|
266
|
+
tags?: string[] | undefined;
|
|
267
|
+
category?: string | undefined;
|
|
268
|
+
}>;
|
|
269
|
+
declare const MaesterConfigSchema: z.ZodObject<{
|
|
270
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
271
|
+
documents: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
272
|
+
path: z.ZodEffects<z.ZodString, string, string>;
|
|
273
|
+
description: z.ZodOptional<z.ZodString>;
|
|
274
|
+
category: z.ZodOptional<z.ZodString>;
|
|
275
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
276
|
+
state: z.ZodOptional<z.ZodEnum<["draft", "canon"]>>;
|
|
277
|
+
}, "strict", z.ZodTypeAny, {
|
|
278
|
+
path: string;
|
|
279
|
+
state?: "draft" | "canon" | undefined;
|
|
280
|
+
description?: string | undefined;
|
|
281
|
+
tags?: string[] | undefined;
|
|
282
|
+
category?: string | undefined;
|
|
283
|
+
}, {
|
|
284
|
+
path: string;
|
|
285
|
+
state?: "draft" | "canon" | undefined;
|
|
286
|
+
description?: string | undefined;
|
|
287
|
+
tags?: string[] | undefined;
|
|
288
|
+
category?: string | undefined;
|
|
289
|
+
}>, "many">, {
|
|
290
|
+
path: string;
|
|
291
|
+
state?: "draft" | "canon" | undefined;
|
|
292
|
+
description?: string | undefined;
|
|
293
|
+
tags?: string[] | undefined;
|
|
294
|
+
category?: string | undefined;
|
|
295
|
+
}[], {
|
|
296
|
+
path: string;
|
|
297
|
+
state?: "draft" | "canon" | undefined;
|
|
298
|
+
description?: string | undefined;
|
|
299
|
+
tags?: string[] | undefined;
|
|
300
|
+
category?: string | undefined;
|
|
301
|
+
}[]>;
|
|
302
|
+
}, "strict", z.ZodTypeAny, {
|
|
303
|
+
schemaVersion: 1;
|
|
304
|
+
documents: {
|
|
305
|
+
path: string;
|
|
306
|
+
state?: "draft" | "canon" | undefined;
|
|
307
|
+
description?: string | undefined;
|
|
308
|
+
tags?: string[] | undefined;
|
|
309
|
+
category?: string | undefined;
|
|
310
|
+
}[];
|
|
311
|
+
}, {
|
|
312
|
+
schemaVersion: 1;
|
|
313
|
+
documents: {
|
|
314
|
+
path: string;
|
|
315
|
+
state?: "draft" | "canon" | undefined;
|
|
316
|
+
description?: string | undefined;
|
|
317
|
+
tags?: string[] | undefined;
|
|
318
|
+
category?: string | undefined;
|
|
319
|
+
}[];
|
|
320
|
+
}>;
|
|
321
|
+
type PublishedDocument = z.infer<typeof PublishedDocumentSchema>;
|
|
322
|
+
type MaesterConfig = z.infer<typeof MaesterConfigSchema>;
|
|
323
|
+
|
|
324
|
+
declare function loadCitadelConfig(repoRoot: string): Promise<CitadelConfig>;
|
|
325
|
+
declare function loadMaesterConfig(repoRoot: string): Promise<MaesterConfig>;
|
|
326
|
+
|
|
327
|
+
type FetchWarning = {
|
|
328
|
+
type: "no-matches";
|
|
329
|
+
name: string;
|
|
330
|
+
includes: readonly string[];
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
type SourceOfTruth = "inline" | "rule" | "default";
|
|
334
|
+
type StateBreakdown = {
|
|
335
|
+
canon: number;
|
|
336
|
+
draft: number;
|
|
337
|
+
untagged: number;
|
|
338
|
+
};
|
|
339
|
+
type BadInlineStateWarning = {
|
|
340
|
+
type: "bad-inline-state";
|
|
341
|
+
file: string;
|
|
342
|
+
raw: string;
|
|
343
|
+
};
|
|
344
|
+
type DisagreementWarning = {
|
|
345
|
+
type: "disagreement";
|
|
346
|
+
file: string;
|
|
347
|
+
inline: State;
|
|
348
|
+
rule: State;
|
|
349
|
+
};
|
|
350
|
+
type StateWarning = BadInlineStateWarning | DisagreementWarning;
|
|
351
|
+
type StateApplyDetail = {
|
|
352
|
+
file: string;
|
|
353
|
+
state: State | "untagged";
|
|
354
|
+
sourceOfTruth: SourceOfTruth | "untagged";
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
type SyncStatus = "added" | "updated" | "unchanged" | "failed";
|
|
358
|
+
type SyncOutcome = {
|
|
359
|
+
name: string;
|
|
360
|
+
status: SyncStatus;
|
|
361
|
+
destination: string;
|
|
362
|
+
ref: string | undefined;
|
|
363
|
+
commitSha?: string;
|
|
364
|
+
warnings: FetchWarning[];
|
|
365
|
+
stateBreakdown?: StateBreakdown;
|
|
366
|
+
stateWarnings?: StateWarning[];
|
|
367
|
+
stateDetails?: StateApplyDetail[];
|
|
368
|
+
error?: string;
|
|
369
|
+
};
|
|
370
|
+
type SyncResult = {
|
|
371
|
+
outcomes: SyncOutcome[];
|
|
372
|
+
failed: number;
|
|
373
|
+
};
|
|
374
|
+
type SyncOptions = {
|
|
375
|
+
repoRoot: string;
|
|
376
|
+
scope?: readonly string[];
|
|
377
|
+
concurrency?: number;
|
|
378
|
+
env?: NodeJS.ProcessEnv;
|
|
379
|
+
baseDir?: string;
|
|
380
|
+
onProgress?: (event: ProgressEvent) => void;
|
|
381
|
+
};
|
|
382
|
+
type ProgressEvent = {
|
|
383
|
+
type: "start";
|
|
384
|
+
name: string;
|
|
385
|
+
} | {
|
|
386
|
+
type: "fetched";
|
|
387
|
+
name: string;
|
|
388
|
+
commitSha: string;
|
|
389
|
+
} | {
|
|
390
|
+
type: "staged";
|
|
391
|
+
name: string;
|
|
392
|
+
status: SyncStatus;
|
|
393
|
+
} | {
|
|
394
|
+
type: "warning";
|
|
395
|
+
name: string;
|
|
396
|
+
warning: FetchWarning;
|
|
397
|
+
} | {
|
|
398
|
+
type: "failed";
|
|
399
|
+
name: string;
|
|
400
|
+
error: string;
|
|
401
|
+
};
|
|
402
|
+
declare function runSync(config: CitadelConfig, options: SyncOptions): Promise<SyncResult>;
|
|
403
|
+
|
|
404
|
+
type StatusVerdict = "up-to-date" | "behind" | "failed";
|
|
405
|
+
type BehindReason = "never-synced" | "remote-ref-advanced" | "manifest-changed";
|
|
406
|
+
type StatusOutcome = {
|
|
407
|
+
name: string;
|
|
408
|
+
verdict: "up-to-date";
|
|
409
|
+
commitSha: string;
|
|
410
|
+
} | {
|
|
411
|
+
name: string;
|
|
412
|
+
verdict: "behind";
|
|
413
|
+
reasons: readonly BehindReason[];
|
|
414
|
+
commitSha?: string;
|
|
415
|
+
resolvedSha?: string;
|
|
416
|
+
} | {
|
|
417
|
+
name: string;
|
|
418
|
+
verdict: "failed";
|
|
419
|
+
error: string;
|
|
420
|
+
};
|
|
421
|
+
type StatusCounts = {
|
|
422
|
+
upToDate: number;
|
|
423
|
+
behind: number;
|
|
424
|
+
failed: number;
|
|
425
|
+
};
|
|
426
|
+
type StatusResult = {
|
|
427
|
+
outcomes: StatusOutcome[];
|
|
428
|
+
counts: StatusCounts;
|
|
429
|
+
};
|
|
430
|
+
type StatusOptions = {
|
|
431
|
+
repoRoot: string;
|
|
432
|
+
scope?: readonly string[];
|
|
433
|
+
concurrency?: number;
|
|
434
|
+
env?: NodeJS.ProcessEnv;
|
|
435
|
+
baseDir?: string;
|
|
436
|
+
};
|
|
437
|
+
declare function runStatus(config: CitadelConfig, options: StatusOptions): Promise<StatusResult>;
|
|
438
|
+
|
|
439
|
+
type SkillTargetId = "claude-code" | "codex" | "cursor" | "agents-md";
|
|
440
|
+
type SkillAction = "installed" | "upgraded" | "unchanged" | "failed";
|
|
441
|
+
type SkillInstallOutcome = {
|
|
442
|
+
id: SkillTargetId;
|
|
443
|
+
label: string;
|
|
444
|
+
artifactPaths: readonly string[];
|
|
445
|
+
action: SkillAction;
|
|
446
|
+
installedVersion?: string;
|
|
447
|
+
error?: string;
|
|
448
|
+
};
|
|
449
|
+
type SkillInstallResult = {
|
|
450
|
+
outcomes: SkillInstallOutcome[];
|
|
451
|
+
counts: {
|
|
452
|
+
installed: number;
|
|
453
|
+
upgraded: number;
|
|
454
|
+
unchanged: number;
|
|
455
|
+
failed: number;
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
type SkillStatusOutcomeState = "up-to-date" | "outdated" | "not-installed";
|
|
459
|
+
type SkillStatusOutcome = {
|
|
460
|
+
id: SkillTargetId;
|
|
461
|
+
label: string;
|
|
462
|
+
artifactPaths: readonly string[];
|
|
463
|
+
state: SkillStatusOutcomeState;
|
|
464
|
+
installedVersion?: string;
|
|
465
|
+
currentVersion: string;
|
|
466
|
+
};
|
|
467
|
+
type SkillStatusResult = {
|
|
468
|
+
outcomes: SkillStatusOutcome[];
|
|
469
|
+
counts: {
|
|
470
|
+
upToDate: number;
|
|
471
|
+
outdated: number;
|
|
472
|
+
notInstalled: number;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
type SkillWriteInput = {
|
|
476
|
+
repoRoot: string;
|
|
477
|
+
skillVersion: string;
|
|
478
|
+
citadelBaseDir: string;
|
|
479
|
+
};
|
|
480
|
+
type SkillWriteOutcome = {
|
|
481
|
+
action: SkillAction;
|
|
482
|
+
installedVersion?: string;
|
|
483
|
+
error?: string;
|
|
484
|
+
};
|
|
485
|
+
type SkillTarget = {
|
|
486
|
+
readonly id: SkillTargetId;
|
|
487
|
+
readonly label: string;
|
|
488
|
+
/** Repo-relative paths this target writes. */
|
|
489
|
+
readonly artifactPaths: readonly string[];
|
|
490
|
+
/** Writers backing different ids may share an implementation (codex + agents-md). */
|
|
491
|
+
readonly writerKey: string;
|
|
492
|
+
write(input: SkillWriteInput): Promise<SkillWriteOutcome>;
|
|
493
|
+
/** Read the installed version marker from disk, if any. */
|
|
494
|
+
readInstalledVersion(repoRoot: string): Promise<string | undefined>;
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
declare function listSkillTargets(): readonly SkillTarget[];
|
|
498
|
+
|
|
499
|
+
type RunSkillInstallOpts = {
|
|
500
|
+
targets: readonly SkillTargetId[];
|
|
501
|
+
mode: "install" | "add-target";
|
|
502
|
+
citadelBaseDir: string;
|
|
503
|
+
};
|
|
504
|
+
declare function runSkillInstall(repoRoot: string, opts: RunSkillInstallOpts): Promise<SkillInstallResult>;
|
|
505
|
+
type RunSkillUpgradeOpts = {
|
|
506
|
+
check?: boolean;
|
|
507
|
+
citadelBaseDir: string;
|
|
508
|
+
};
|
|
509
|
+
declare function runSkillUpgrade(repoRoot: string, opts: RunSkillUpgradeOpts): Promise<SkillInstallResult>;
|
|
510
|
+
declare function runSkillStatus(repoRoot: string): Promise<SkillStatusResult>;
|
|
511
|
+
|
|
512
|
+
declare const SKILL_VERSION: string;
|
|
513
|
+
|
|
514
|
+
declare class MaesterError extends Error {
|
|
515
|
+
readonly code: string;
|
|
516
|
+
readonly cause?: unknown;
|
|
517
|
+
constructor(code: string, message: string, options?: {
|
|
518
|
+
cause?: unknown;
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
declare class ConfigError extends MaesterError {
|
|
522
|
+
readonly filePath: string | undefined;
|
|
523
|
+
readonly line?: number;
|
|
524
|
+
readonly column?: number;
|
|
525
|
+
constructor(message: string, detail?: {
|
|
526
|
+
filePath?: string;
|
|
527
|
+
line?: number;
|
|
528
|
+
column?: number;
|
|
529
|
+
cause?: unknown;
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
declare class AuthError extends MaesterError {
|
|
533
|
+
readonly envVar: string;
|
|
534
|
+
constructor(envVar: string, message?: string);
|
|
535
|
+
}
|
|
536
|
+
declare class RefNotFoundError extends MaesterError {
|
|
537
|
+
readonly ref: string;
|
|
538
|
+
readonly url: string;
|
|
539
|
+
constructor(ref: string, url: string, cause?: unknown);
|
|
540
|
+
}
|
|
541
|
+
declare class DestinationBlockedError extends MaesterError {
|
|
542
|
+
readonly destination: string;
|
|
543
|
+
constructor(destination: string, message: string);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
export { AuthError, type AuthRef, type BehindReason, type CitadelConfig, ConfigError, DestinationBlockedError, type MaesterConfig, MaesterError, type ProgressEvent, type PublishedDocument, RefNotFoundError, SKILL_VERSION, type SkillAction, type SkillInstallOutcome, type SkillInstallResult, type SkillStatusOutcome, type SkillStatusResult, type SkillTarget, type SkillTargetId, type Source, type StatusCounts, type StatusOptions, type StatusOutcome, type StatusResult, type StatusVerdict, type SyncOptions, type SyncOutcome, type SyncResult, type SyncStatus, listSkillTargets, loadCitadelConfig, loadMaesterConfig, runSkillInstall, runSkillStatus, runSkillUpgrade, runStatus, runSync };
|