@plaintake/scenario 1.14.0 → 1.17.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.js +23 -4
- package/dist/schema/results.d.ts +47 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1036,7 +1036,14 @@ var RunCommandResultSchema = z7.object({
|
|
|
1036
1036
|
narratedCount: z7.number().int().nonnegative(),
|
|
1037
1037
|
diagnostics: z7.array(z7.object({ code: z7.string(), cueId: z7.string(), detail: z7.string() })),
|
|
1038
1038
|
assertions: z7.array(AssertionSchema),
|
|
1039
|
-
outputs: z7.array(ArtifactRefSchema)
|
|
1039
|
+
outputs: z7.array(ArtifactRefSchema),
|
|
1040
|
+
/**
|
|
1041
|
+
* The previous bundle this run replaced, archived as a `.<timestamp>` sibling rather
|
|
1042
|
+
* than deleted. Absent when nothing occupied the output directory — the common first
|
|
1043
|
+
* run — or when `--no-archive` asked for the old replace semantics. Optional and
|
|
1044
|
+
* additive, so every result written before archives existed still parses.
|
|
1045
|
+
*/
|
|
1046
|
+
archivedPath: DISPLAY_PATH.optional()
|
|
1040
1047
|
});
|
|
1041
1048
|
var CheckAssertionSchema = AssertionSchema.extend({ message: z7.string().optional() });
|
|
1042
1049
|
var CheckCommandResultSchema = z7.object({
|
|
@@ -1045,9 +1052,10 @@ var CheckCommandResultSchema = z7.object({
|
|
|
1045
1052
|
status: StatusSchema,
|
|
1046
1053
|
assertions: z7.array(CheckAssertionSchema),
|
|
1047
1054
|
/**
|
|
1048
|
-
* Handoff notes
|
|
1049
|
-
*
|
|
1050
|
-
* this command
|
|
1055
|
+
* Handoff notes, plus a `speech.close` note when closing the narrator failed after
|
|
1056
|
+
* capture. Cue, chapter, cursor and camera diagnostics are all derived from a render plan
|
|
1057
|
+
* that `check` never builds — fabricating them would report on capabilities this command
|
|
1058
|
+
* cannot see.
|
|
1051
1059
|
*/
|
|
1052
1060
|
diagnostics: z7.array(z7.object({ code: z7.string(), cueId: z7.string(), detail: z7.string() }))
|
|
1053
1061
|
});
|
|
@@ -1082,6 +1090,17 @@ var DiffCommandResultSchema = z7.object({
|
|
|
1082
1090
|
identical: z7.boolean(),
|
|
1083
1091
|
differences: z7.array(z7.object({ category: DifferenceCategorySchema, detail: z7.string() }))
|
|
1084
1092
|
});
|
|
1093
|
+
var CompareCommandResultSchema = z7.object({
|
|
1094
|
+
...envelope("compare"),
|
|
1095
|
+
bundleA: DISPLAY_PATH,
|
|
1096
|
+
bundleB: DISPLAY_PATH,
|
|
1097
|
+
checks: z7.array(z7.object({ name: z7.string(), ok: z7.boolean(), detail: z7.string() }))
|
|
1098
|
+
});
|
|
1099
|
+
var InitResultSchema = z7.object({
|
|
1100
|
+
...envelope("init"),
|
|
1101
|
+
files: z7.array(DISPLAY_PATH),
|
|
1102
|
+
validates: z7.boolean()
|
|
1103
|
+
});
|
|
1085
1104
|
var PruneCandidateSchema = z7.object({
|
|
1086
1105
|
path: DISPLAY_PATH,
|
|
1087
1106
|
bytes: z7.number().int().nonnegative(),
|
package/dist/schema/results.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export declare const RunCommandResultSchema: z.ZodObject<{
|
|
|
47
47
|
sha256: z.ZodString;
|
|
48
48
|
bytes: z.ZodNumber;
|
|
49
49
|
}, z.core.$strip>>;
|
|
50
|
+
archivedPath: z.ZodOptional<z.ZodString>;
|
|
50
51
|
schema: z.ZodLiteral<"agent-demo.result/v1">;
|
|
51
52
|
kind: z.ZodLiteral<"run">;
|
|
52
53
|
ok: z.ZodBoolean;
|
|
@@ -257,6 +258,49 @@ export declare const DiffCommandResultSchema: z.ZodObject<{
|
|
|
257
258
|
ok: z.ZodBoolean;
|
|
258
259
|
problems: z.ZodArray<z.ZodString>;
|
|
259
260
|
}, z.core.$strip>;
|
|
261
|
+
/**
|
|
262
|
+
* `compare <bundleA> <bundleB>`'s result. Two `DISPLAY_PATH`s like `diff`, because it reads two
|
|
263
|
+
* bundles — but where `diff` is a *semantic* comparison of two different recordings and drift is
|
|
264
|
+
* never a fault, `compare` is a **render-determinism gate**: it re-hashes and re-decodes two
|
|
265
|
+
* renders that should be byte-for-byte identical, so a difference is a regression. `ok` therefore
|
|
266
|
+
* IS the verdict — the renders match — and a failing check names itself in `problems`, exactly the
|
|
267
|
+
* stance `verify` takes on a hash mismatch (unlike `diff`, whose `ok` is deliberately untied from
|
|
268
|
+
* its verdict). Exit 6, reusing `verify`'s and `diff`'s code, on drift or on a bundle whose
|
|
269
|
+
* rendered output could not be read back out. `checks` mirrors `compareRenders`'s own report so a
|
|
270
|
+
* caller sees every check, not only the failing ones. CLI-only: the MCP tool list is frozen at four.
|
|
271
|
+
*/
|
|
272
|
+
export declare const CompareCommandResultSchema: z.ZodObject<{
|
|
273
|
+
bundleA: z.ZodString;
|
|
274
|
+
bundleB: z.ZodString;
|
|
275
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
276
|
+
name: z.ZodString;
|
|
277
|
+
ok: z.ZodBoolean;
|
|
278
|
+
detail: z.ZodString;
|
|
279
|
+
}, z.core.$strip>>;
|
|
280
|
+
schema: z.ZodLiteral<"agent-demo.result/v1">;
|
|
281
|
+
kind: z.ZodLiteral<"compare">;
|
|
282
|
+
ok: z.ZodBoolean;
|
|
283
|
+
problems: z.ZodArray<z.ZodString>;
|
|
284
|
+
}, z.core.$strip>;
|
|
285
|
+
/**
|
|
286
|
+
* `init [<name>]`'s result. The scaffold is a starting point that must validate by
|
|
287
|
+
* construction — its template pins the deterministic video contract and uses no clock,
|
|
288
|
+
* randomness, network or absolute paths — but `validates` is still reported separately from
|
|
289
|
+
* `ok`, on the same pattern as `import`'s field of the same name, because the two answer
|
|
290
|
+
* different questions: `ok` says files were written; `validates` says the generated scenario
|
|
291
|
+
* passed the same `loadScenario` validate runs. A `false` there means the template drifted
|
|
292
|
+
* from the contract, not that the command failed. `files` names everything written, relative
|
|
293
|
+
* to the working directory: the scenario plus, only when none existed, a starter
|
|
294
|
+
* `plaintake.config.json` — an existing config is never touched, so it never appears here.
|
|
295
|
+
*/
|
|
296
|
+
export declare const InitResultSchema: z.ZodObject<{
|
|
297
|
+
files: z.ZodArray<z.ZodString>;
|
|
298
|
+
validates: z.ZodBoolean;
|
|
299
|
+
schema: z.ZodLiteral<"agent-demo.result/v1">;
|
|
300
|
+
kind: z.ZodLiteral<"init">;
|
|
301
|
+
ok: z.ZodBoolean;
|
|
302
|
+
problems: z.ZodArray<z.ZodString>;
|
|
303
|
+
}, z.core.$strip>;
|
|
260
304
|
/**
|
|
261
305
|
* `prune`'s result. Selection never touches disk by itself — `dryRun: true` (the default,
|
|
262
306
|
* absent `--yes`) means `candidates` names what *would* be removed and every one of them is
|
|
@@ -475,13 +519,15 @@ export type RenderCommandResult = z.infer<typeof RenderCommandResultSchema>;
|
|
|
475
519
|
export type VerificationReport = z.infer<typeof VerificationReportSchema>;
|
|
476
520
|
export type WarmCommandResult = z.infer<typeof WarmCommandResultSchema>;
|
|
477
521
|
export type DiffCommandResult = z.infer<typeof DiffCommandResultSchema>;
|
|
522
|
+
export type CompareCommandResult = z.infer<typeof CompareCommandResultSchema>;
|
|
523
|
+
export type InitResult = z.infer<typeof InitResultSchema>;
|
|
478
524
|
export type PruneCommandResult = z.infer<typeof PruneCommandResultSchema>;
|
|
479
525
|
export type ImportCommandResult = z.infer<typeof ImportCommandResultSchema>;
|
|
480
526
|
export type InspectResult = z.infer<typeof InspectResultSchema>;
|
|
481
527
|
export type DoctorResult = z.infer<typeof DoctorResultSchema>;
|
|
482
528
|
export type ActivateResult = z.infer<typeof ActivateResultSchema>;
|
|
483
529
|
export type LicenceResult = z.infer<typeof LicenceResultSchema>;
|
|
484
|
-
export type DemoResult = ValidationResult | RunCommandResult | CheckCommandResult | RenderCommandResult | VerificationReport | WarmCommandResult | DiffCommandResult | PruneCommandResult | ImportCommandResult | InspectResult | DoctorResult | ActivateResult | LicenceResult;
|
|
530
|
+
export type DemoResult = ValidationResult | RunCommandResult | CheckCommandResult | RenderCommandResult | VerificationReport | WarmCommandResult | DiffCommandResult | CompareCommandResult | InitResult | PruneCommandResult | ImportCommandResult | InspectResult | DoctorResult | ActivateResult | LicenceResult;
|
|
485
531
|
/**
|
|
486
532
|
* Renders a filesystem location for display in a result, relative to `root` when it
|
|
487
533
|
* lies inside it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plaintake/scenario",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "Authoring SDK for PlainTake demo scenarios: defineDemo and the scenario DSL types. Install for editor autocomplete; the PlainTake binary ships a runtime fallback.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|