@openspecui/core 11.1.0 → 13.0.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.
Files changed (51) hide show
  1. package/dist/{active-root-config-CsFtntHf.d.mts → active-root-config-_ZXqUzpc.d.mts} +17 -17
  2. package/dist/active-root-config.d.mts +5 -5
  3. package/dist/app-daemon-control.d.mts +8 -8
  4. package/dist/{cli-projection-Dd5Gdqa2.d.mts → cli-projection-D932MJzB.d.mts} +17 -17
  5. package/dist/cli-projection.d.mts +5 -5
  6. package/dist/{command-result-DWMmDl6I.mjs → command-result-Eq147Dt4.mjs} +113 -13
  7. package/dist/{dashboard-summary-transport-wRH7oVWM.d.mts → dashboard-summary-transport-DS-bPqn1.d.mts} +4436 -4344
  8. package/dist/dashboard-summary-transport.d.mts +18 -18
  9. package/dist/{document-translation-OvsFNs-H.d.mts → document-translation-DM2eydNr.d.mts} +100 -100
  10. package/dist/document-translation.d.mts +1 -1
  11. package/dist/hosted-app.d.mts +18 -18
  12. package/dist/hosted-contract.d.mts +18 -18
  13. package/dist/{index-jbHV-sxg.d.mts → index-zESQZeBd.d.mts} +2265 -232
  14. package/dist/index.d.mts +19 -19
  15. package/dist/index.mjs +138 -59
  16. package/dist/{local-download-profiles-DXNExauZ.d.mts → local-download-profiles-Dj0nGG1k.d.mts} +1 -1
  17. package/dist/local-download-profiles.d.mts +2 -2
  18. package/dist/{notifications-B8Ael_hq.d.mts → notifications-DwiGoWFM.d.mts} +17 -17
  19. package/dist/notifications.d.mts +2 -2
  20. package/dist/{openspec-compat-DctIDxRM.mjs → openspec-compat-CNMMuTot.mjs} +21 -16
  21. package/dist/openspec-compat.d.mts +5 -5
  22. package/dist/openspec-compat.mjs +3 -3
  23. package/dist/{openspec-projection-xOnjhQ7v.d.mts → openspec-projection-MyG567IF.d.mts} +1 -1
  24. package/dist/openspec-projection.d.mts +2 -2
  25. package/dist/{opsx-entity-Dc4XotlR.d.mts → opsx-entity-BsYtWdkc.d.mts} +2 -2
  26. package/dist/opsx-entity.d.mts +7 -7
  27. package/dist/{opsx-schema-detail-BJ6wzYhq.d.mts → opsx-schema-detail-Cbg1qHlw.d.mts} +2 -2
  28. package/dist/opsx-schema-detail.d.mts +8 -8
  29. package/dist/{opsx-types-CnZ4dsxb.d.mts → opsx-types-8fxRIEhj.d.mts} +267 -245
  30. package/dist/{planning-cli-projection-pq8vZC1r.mjs → planning-cli-projection-CttkbBh9.mjs} +11 -3
  31. package/dist/planning-cli-projection.d.mts +18 -18
  32. package/dist/planning-cli-projection.mjs +3 -3
  33. package/dist/{schemas-pfpqDlAd.d.mts → schemas-CdprtB2t.d.mts} +252 -252
  34. package/dist/{sounds-B0GiWqBN.d.mts → sounds-BCmBc3Lm.d.mts} +9 -9
  35. package/dist/sounds.d.mts +1 -1
  36. package/dist/{spec-catalog-BkX0tZp9.mjs → spec-catalog-DYJ4dxTY.mjs} +31 -2
  37. package/dist/spec-catalog.d.mts +18 -18
  38. package/dist/spec-catalog.mjs +2 -2
  39. package/dist/{store-mutation-protocol-DXeWtAvN.d.mts → store-mutation-protocol-C9xgZkNh.d.mts} +24 -24
  40. package/dist/store-mutation-protocol.d.mts +1 -1
  41. package/dist/{store-types-BLW7QE7W.d.mts → store-types-Ch6RIfO6.d.mts} +1 -1
  42. package/dist/store-types.d.mts +5 -5
  43. package/dist/task-progress.d.mts +6 -6
  44. package/dist/{terminal-audio-BpfUW_eB.d.mts → terminal-audio-uas32Aa-.d.mts} +2 -2
  45. package/dist/terminal-audio.d.mts +2 -2
  46. package/dist/terminal-control.d.mts +2 -2
  47. package/dist/{terminal-invocation-DROo1wu_.d.mts → terminal-invocation-DSEgzEiU.d.mts} +45 -45
  48. package/dist/terminal-invocation.d.mts +1 -1
  49. package/dist/{translator-C5z6a5C4.d.mts → translator-2hRDPD9f.d.mts} +221 -221
  50. package/dist/translator.d.mts +1 -1
  51. package/package.json +3 -1
@@ -1,4 +1,4 @@
1
- import { At as CliRootSource, Mt as CliExecutor, Nt as CliResult, bt as CliDiagnostic, f as CliDoctor, gt as CliCommandResult, l as OpenSpecCliContractExecutor, n as CliRootSelector, u as CliContext, vt as CliJsonValue, wt as CliDoctorReferenceEntry } from "./index-jbHV-sxg.mjs";
1
+ import { Ct as CliJsonValue, Ft as CliRootSource, Lt as CliExecutor, Rt as CliResult, Tt as CliDiagnostic, f as CliDoctor, kt as CliDoctorReferenceEntry, l as OpenSpecCliContractExecutor, n as CliRootSelector, u as CliContext, xt as CliCommandResult } from "./index-zESQZeBd.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/open-spec-data-scope.d.ts
@@ -393,8 +393,8 @@ declare const ActiveRootOfficialConfigSchema: z.ZodObject<{
393
393
  } | undefined;
394
394
  }>>;
395
395
  }, "strict", z.ZodTypeAny, {
396
- context: string | null;
397
396
  schema: string | null;
397
+ context: string | null;
398
398
  rules: Record<string, string[]> | null;
399
399
  operations: {
400
400
  apply?: {
@@ -405,8 +405,8 @@ declare const ActiveRootOfficialConfigSchema: z.ZodObject<{
405
405
  } | undefined;
406
406
  } | null;
407
407
  }, {
408
- context: string | null;
409
408
  schema: string | null;
409
+ context: string | null;
410
410
  rules: Record<string, string[]> | null;
411
411
  operations: {
412
412
  apply?: {
@@ -455,8 +455,8 @@ declare const ActiveRootStructuredUpdateSchema: z.ZodObject<{
455
455
  } | null;
456
456
  }>>;
457
457
  }, "strict", z.ZodTypeAny, {
458
- context: string | null;
459
458
  schema: string;
459
+ context: string | null;
460
460
  rules: Record<string, string[]> | null;
461
461
  operations: {
462
462
  apply: {
@@ -467,8 +467,8 @@ declare const ActiveRootStructuredUpdateSchema: z.ZodObject<{
467
467
  } | null;
468
468
  } | null;
469
469
  }, {
470
- context: string | null;
471
470
  schema: string;
471
+ context: string | null;
472
472
  rules: Record<string, string[]> | null;
473
473
  operations: {
474
474
  apply: {
@@ -523,8 +523,8 @@ declare const ActiveRootMutationSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodOb
523
523
  } | null;
524
524
  }>>;
525
525
  }, "strict", z.ZodTypeAny, {
526
- context: string | null;
527
526
  schema: string;
527
+ context: string | null;
528
528
  rules: Record<string, string[]> | null;
529
529
  operations: {
530
530
  apply: {
@@ -535,8 +535,8 @@ declare const ActiveRootMutationSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodOb
535
535
  } | null;
536
536
  } | null;
537
537
  }, {
538
- context: string | null;
539
538
  schema: string;
539
+ context: string | null;
540
540
  rules: Record<string, string[]> | null;
541
541
  operations: {
542
542
  apply: {
@@ -551,11 +551,9 @@ declare const ActiveRootMutationSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodOb
551
551
  filePath: z.ZodString;
552
552
  revision: z.ZodString;
553
553
  }, "strict", z.ZodTypeAny, {
554
- filePath: string;
555
- revision: string;
556
554
  update: {
557
- context: string | null;
558
555
  schema: string;
556
+ context: string | null;
559
557
  rules: Record<string, string[]> | null;
560
558
  operations: {
561
559
  apply: {
@@ -567,13 +565,13 @@ declare const ActiveRootMutationSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodOb
567
565
  } | null;
568
566
  };
569
567
  mode: "structured";
568
+ revision: string;
569
+ filePath: string;
570
570
  ownerPath: string;
571
571
  }, {
572
- filePath: string;
573
- revision: string;
574
572
  update: {
575
- context: string | null;
576
573
  schema: string;
574
+ context: string | null;
577
575
  rules: Record<string, string[]> | null;
578
576
  operations: {
579
577
  apply: {
@@ -585,6 +583,8 @@ declare const ActiveRootMutationSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodOb
585
583
  } | null;
586
584
  };
587
585
  mode: "structured";
586
+ revision: string;
587
+ filePath: string;
588
588
  ownerPath: string;
589
589
  }>, z.ZodObject<{
590
590
  mode: z.ZodLiteral<"raw">;
@@ -593,16 +593,16 @@ declare const ActiveRootMutationSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodOb
593
593
  filePath: z.ZodString;
594
594
  revision: z.ZodString;
595
595
  }, "strict", z.ZodTypeAny, {
596
- filePath: string;
597
- revision: string;
598
596
  mode: "raw";
599
597
  content: string;
598
+ revision: string;
599
+ filePath: string;
600
600
  ownerPath: string;
601
601
  }, {
602
- filePath: string;
603
- revision: string;
604
602
  mode: "raw";
605
603
  content: string;
604
+ revision: string;
605
+ filePath: string;
606
606
  ownerPath: string;
607
607
  }>]>;
608
608
  /** Revision-aware Active Root mutation request. */
@@ -1,6 +1,6 @@
1
- import "./index-jbHV-sxg.mjs";
2
- import "./document-translation-OvsFNs-H.mjs";
3
- import "./sounds-B0GiWqBN.mjs";
4
- import "./notifications-B8Ael_hq.mjs";
5
- import { _ as ActiveRootStructuredUpdateSchema, a as ActiveRootConfigDiagnostic, c as ActiveRootMutation, d as ActiveRootOfficialConfig, f as ActiveRootOfficialConfigSchema, g as ActiveRootStructuredUpdate, h as ActiveRootRevisionSchema, i as ActiveRootConfig, l as ActiveRootMutationResult, m as ActiveRootRevision, n as patchActiveRootOfficialFields, o as ActiveRootConfigFile, p as ActiveRootRawValidation, r as validateActiveRootRawYaml, s as ActiveRootConfigInspection, t as inspectActiveRootOfficialConfig, u as ActiveRootMutationSchema, v as MAX_ACTIVE_ROOT_CONTEXT_BYTES } from "./active-root-config-CsFtntHf.mjs";
1
+ import "./index-zESQZeBd.mjs";
2
+ import "./document-translation-DM2eydNr.mjs";
3
+ import "./sounds-BCmBc3Lm.mjs";
4
+ import "./notifications-DwiGoWFM.mjs";
5
+ import { _ as ActiveRootStructuredUpdateSchema, a as ActiveRootConfigDiagnostic, c as ActiveRootMutation, d as ActiveRootOfficialConfig, f as ActiveRootOfficialConfigSchema, g as ActiveRootStructuredUpdate, h as ActiveRootRevisionSchema, i as ActiveRootConfig, l as ActiveRootMutationResult, m as ActiveRootRevision, n as patchActiveRootOfficialFields, o as ActiveRootConfigFile, p as ActiveRootRawValidation, r as validateActiveRootRawYaml, s as ActiveRootConfigInspection, t as inspectActiveRootOfficialConfig, u as ActiveRootMutationSchema, v as MAX_ACTIVE_ROOT_CONTEXT_BYTES } from "./active-root-config-_ZXqUzpc.mjs";
6
6
  export { ActiveRootConfig, ActiveRootConfigDiagnostic, ActiveRootConfigFile, ActiveRootConfigInspection, ActiveRootMutation, ActiveRootMutationResult, ActiveRootMutationSchema, ActiveRootOfficialConfig, ActiveRootOfficialConfigSchema, ActiveRootRawValidation, ActiveRootRevision, ActiveRootRevisionSchema, ActiveRootStructuredUpdate, ActiveRootStructuredUpdateSchema, MAX_ACTIVE_ROOT_CONTEXT_BYTES, inspectActiveRootOfficialConfig, patchActiveRootOfficialFields, validateActiveRootRawYaml };
@@ -302,21 +302,21 @@ declare const AppDaemonStartManagedProjectResponseSchema: z.ZodDiscriminatedUnio
302
302
  code: z.ZodEnum<["UNSUPPORTED", "INVALID_DIRECTORY", "SPAWN_FAILED", "GENERATION_MISMATCH", "INVALID_REQUEST"]>;
303
303
  message: z.ZodString;
304
304
  }, "strip", z.ZodTypeAny, {
305
- code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
305
+ code: "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH" | "INVALID_REQUEST";
306
306
  message: string;
307
307
  }, {
308
- code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
308
+ code: "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH" | "INVALID_REQUEST";
309
309
  message: string;
310
310
  }>;
311
311
  }, "strip", z.ZodTypeAny, {
312
312
  error: {
313
- code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
313
+ code: "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH" | "INVALID_REQUEST";
314
314
  message: string;
315
315
  };
316
316
  ok: false;
317
317
  }, {
318
318
  error: {
319
- code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
319
+ code: "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH" | "INVALID_REQUEST";
320
320
  message: string;
321
321
  };
322
322
  ok: false;
@@ -338,21 +338,21 @@ declare const AppDaemonStopManagedProjectResponseSchema: z.ZodDiscriminatedUnion
338
338
  code: z.ZodEnum<["UNSUPPORTED", "INVALID_DIRECTORY", "SPAWN_FAILED", "GENERATION_MISMATCH", "INVALID_REQUEST"]>;
339
339
  message: z.ZodString;
340
340
  }, "strip", z.ZodTypeAny, {
341
- code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
341
+ code: "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH" | "INVALID_REQUEST";
342
342
  message: string;
343
343
  }, {
344
- code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
344
+ code: "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH" | "INVALID_REQUEST";
345
345
  message: string;
346
346
  }>;
347
347
  }, "strip", z.ZodTypeAny, {
348
348
  error: {
349
- code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
349
+ code: "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH" | "INVALID_REQUEST";
350
350
  message: string;
351
351
  };
352
352
  ok: false;
353
353
  }, {
354
354
  error: {
355
- code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
355
+ code: "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH" | "INVALID_REQUEST";
356
356
  message: string;
357
357
  };
358
358
  ok: false;
@@ -1,4 +1,4 @@
1
- import { gt as CliCommandResult, vt as CliJsonValue } from "./index-jbHV-sxg.mjs";
1
+ import { Ct as CliJsonValue, xt as CliCommandResult } from "./index-zESQZeBd.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/cli-projection.d.ts
@@ -215,22 +215,22 @@ declare function createCliProjectionStateSchema<TOutput, TInput>(dataSchema: z.Z
215
215
  workGeneration: z.ZodNumber;
216
216
  invalidationCause: z.ZodEnum<["initial", "dependency", "explicit-refresh", "subscriber-resume"]>;
217
217
  }, "strip", z.ZodTypeAny, {
218
- identity: string;
219
- workGeneration: number;
220
- snapshotGeneration: null;
221
218
  error: null;
222
219
  state: "loading";
223
220
  data: null;
224
221
  freshness: null;
225
- invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
226
- }, {
222
+ snapshotGeneration: null;
227
223
  identity: string;
228
224
  workGeneration: number;
229
- snapshotGeneration: null;
225
+ invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
226
+ }, {
230
227
  error: null;
231
228
  state: "loading";
232
229
  data: null;
233
230
  freshness: null;
231
+ snapshotGeneration: null;
232
+ identity: string;
233
+ workGeneration: number;
234
234
  invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
235
235
  }>, z.ZodObject<{
236
236
  state: z.ZodLiteral<"ready">;
@@ -390,9 +390,6 @@ declare function createCliProjectionStateSchema<TOutput, TInput>(dataSchema: z.Z
390
390
  workGeneration: z.ZodNumber;
391
391
  invalidationCause: z.ZodEnum<["initial", "dependency", "explicit-refresh", "subscriber-resume"]>;
392
392
  }, "strip", z.ZodTypeAny, {
393
- identity: string;
394
- workGeneration: number;
395
- snapshotGeneration: null;
396
393
  error: {
397
394
  message: string;
398
395
  name: string;
@@ -415,11 +412,11 @@ declare function createCliProjectionStateSchema<TOutput, TInput>(dataSchema: z.Z
415
412
  state: "error";
416
413
  data: null;
417
414
  freshness: null;
418
- invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
419
- }, {
415
+ snapshotGeneration: null;
420
416
  identity: string;
421
417
  workGeneration: number;
422
- snapshotGeneration: null;
418
+ invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
419
+ }, {
423
420
  error: {
424
421
  message: string;
425
422
  name: string;
@@ -442,6 +439,9 @@ declare function createCliProjectionStateSchema<TOutput, TInput>(dataSchema: z.Z
442
439
  state: "error";
443
440
  data: null;
444
441
  freshness: null;
442
+ snapshotGeneration: null;
443
+ identity: string;
444
+ workGeneration: number;
445
445
  invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
446
446
  }>, z.ZodObject<{
447
447
  state: z.ZodLiteral<"refresh-error">;
@@ -761,16 +761,16 @@ declare const CliProjectionNoticeSchema: z.ZodObject<{
761
761
  state: z.ZodEnum<["loading", "ready", "revalidating", "error", "refresh-error"]>;
762
762
  invalidationCause: z.ZodEnum<["initial", "dependency", "explicit-refresh", "subscriber-resume"]>;
763
763
  }, "strip", z.ZodTypeAny, {
764
+ state: "error" | "loading" | "ready" | "revalidating" | "refresh-error";
765
+ snapshotGeneration: number | null;
764
766
  identity: string;
765
767
  workGeneration: number;
766
- snapshotGeneration: number | null;
767
- state: "loading" | "ready" | "revalidating" | "error" | "refresh-error";
768
768
  invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
769
769
  }, {
770
+ state: "error" | "loading" | "ready" | "revalidating" | "refresh-error";
771
+ snapshotGeneration: number | null;
770
772
  identity: string;
771
773
  workGeneration: number;
772
- snapshotGeneration: number | null;
773
- state: "loading" | "ready" | "revalidating" | "error" | "refresh-error";
774
774
  invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
775
775
  }>;
776
776
  type CliProjectionNotice = z.infer<typeof CliProjectionNoticeSchema>;
@@ -1,6 +1,6 @@
1
- import "./index-jbHV-sxg.mjs";
2
- import "./document-translation-OvsFNs-H.mjs";
3
- import "./sounds-B0GiWqBN.mjs";
4
- import "./notifications-B8Ael_hq.mjs";
5
- import { _ as toCliProjectionCommandEvidence, a as CliProjectionFailure, c as CliProjectionInvalidationCauseSchema, d as CliProjectionState, f as CliProjectionStateName, g as createCliProjectionStateSchema, h as cliProjectionStates, i as CliProjectionCommandEvidenceSchema, l as CliProjectionNotice, m as cliProjectionInvalidationCauses, n as CliProjectionCommandError, o as CliProjectionFailureSchema, p as CliProjectionStateNameSchema, r as CliProjectionCommandEvidence, s as CliProjectionInvalidationCause, t as CliJsonValueSchema, u as CliProjectionNoticeSchema, v as toCliProjectionFailure, y as toCliProjectionNotice } from "./cli-projection-Dd5Gdqa2.mjs";
1
+ import "./index-zESQZeBd.mjs";
2
+ import "./document-translation-DM2eydNr.mjs";
3
+ import "./sounds-BCmBc3Lm.mjs";
4
+ import "./notifications-DwiGoWFM.mjs";
5
+ import { _ as toCliProjectionCommandEvidence, a as CliProjectionFailure, c as CliProjectionInvalidationCauseSchema, d as CliProjectionState, f as CliProjectionStateName, g as createCliProjectionStateSchema, h as cliProjectionStates, i as CliProjectionCommandEvidenceSchema, l as CliProjectionNotice, m as cliProjectionInvalidationCauses, n as CliProjectionCommandError, o as CliProjectionFailureSchema, p as CliProjectionStateNameSchema, r as CliProjectionCommandEvidence, s as CliProjectionInvalidationCause, t as CliJsonValueSchema, u as CliProjectionNoticeSchema, v as toCliProjectionFailure, y as toCliProjectionNotice } from "./cli-projection-D932MJzB.mjs";
6
6
  export { CliJsonValueSchema, CliProjectionCommandError, CliProjectionCommandEvidence, CliProjectionCommandEvidenceSchema, CliProjectionFailure, CliProjectionFailureSchema, CliProjectionInvalidationCause, CliProjectionInvalidationCauseSchema, CliProjectionNotice, CliProjectionNoticeSchema, CliProjectionState, CliProjectionStateName, CliProjectionStateNameSchema, cliProjectionInvalidationCauses, cliProjectionStates, createCliProjectionStateSchema, toCliProjectionCommandEvidence, toCliProjectionFailure, toCliProjectionNotice };
@@ -3,7 +3,7 @@ import { z } from "zod";
3
3
 
4
4
  //#region src/cli-contracts/workflow.ts
5
5
  /**
6
- * Orthogonal intents (updated 2026-08-28 Asia/Shanghai):
6
+ * Orthogonal intents (updated 2026-09-12 Asia/Shanghai):
7
7
  * 1. Model camelCase workflow JSON independently from Store-family JSON.
8
8
  * 2. Preserve strict, archived, and bulk Validate plus Archive outcomes, including failure payloads.
9
9
  * 3. Preserve multiline requirement bodies from `show --json`.
@@ -11,11 +11,23 @@ import { z } from "zod";
11
11
  * 5. Export the successful Spec-document schema for browser-safe projection validation.
12
12
  * 6. Export the root-less Status payload fields and Requirement shape shared with the
13
13
  * OpenSpec 1.11 batch Status and show --diff contracts.
14
+ * 7. Model the OpenSpec 1.12 `validate --report findings` document beside (never inside) the
15
+ * full Validate report, sharing the bulk-item and summary shapes while keeping decoding
16
+ * independent of the process exit code and of full-report validation truth. Decode owns
17
+ * the upstream-guaranteed invariants (non-empty per-item issues, returnedItems bounded
18
+ * by totalItems), and the union guard validates the discriminator shape rather than
19
+ * mere `report`-key presence.
20
+ * 8. Type the OpenSpec 1.13 Apply Instructions `missingPrerequisites` (build-order closure,
21
+ * present even when ready) and `warnings` (no-delta-specs advisory) as additive optional
22
+ * success members that never gain default empty arrays, never alter `state`/`progress`/
23
+ * `tasks`/`missingArtifacts` semantics, and stay verbatim CLI evidence.
14
24
  *
15
25
  * Original request (2026-07-15): "为不同命令建立强类型适配器,不实现平行解析规则。"
16
26
  * Original request (2026-07-26): "展开全面的接口升级和内核升级和测试升级。"
17
27
  * Original request (2026-08-15): "v9的适配需要同时适配 1.8和1.9。"
18
28
  * Original request (2026-08-28): "直接将 0.10.0 和 0.11.0 一起适配,然后发布 v11。"
29
+ * Original request (2026-09-03): "Openspec 1.12.0 刚刚放出来,你更新一下,调查变更内容,然后开始规划适配工作,我们将用标准工作流worktree来推进"
30
+ * Original request (2026-09-12): "Openspec 1.13.0 释放了,你更新一下,调查变更内容,然后开始规划适配工作,我们将用标准工作流worktree来推进。让 codex 参与。"
19
31
  */
20
32
  const CliChangeListEntrySchema = z.object({
21
33
  name: z.string(),
@@ -207,6 +219,8 @@ const CliApplyInstructionsSuccessSchema = z.object({
207
219
  "ready"
208
220
  ]),
209
221
  missingArtifacts: z.array(z.string()).optional(),
222
+ missingPrerequisites: z.array(z.string()).optional(),
223
+ warnings: z.array(z.string()).optional(),
210
224
  instruction: z.string(),
211
225
  references: z.array(CliReferenceIndexEntrySchema).optional(),
212
226
  context: z.string().optional(),
@@ -240,24 +254,110 @@ const CliValidationTotalsSchema = z.object({
240
254
  passed: z.number(),
241
255
  failed: z.number()
242
256
  }).passthrough();
257
+ /** One bulk Validate item: verdict, full issue array, and runtime-dependent duration. */
258
+ const CliValidateItemSchema = z.object({
259
+ id: z.string(),
260
+ type: z.enum(["change", "spec"]),
261
+ valid: z.boolean(),
262
+ issues: z.array(CliValidationIssueSchema),
263
+ durationMs: z.number()
264
+ }).passthrough();
265
+ /** Shared Validate summary: full-run totals plus per-type totals, never the filtered view. */
266
+ const CliValidateSummarySchema = z.object({
267
+ totals: CliValidationTotalsSchema,
268
+ byType: z.record(CliValidationTotalsSchema)
269
+ }).passthrough();
243
270
  /** Typed ordinary Validate report, also used by 1.9 `validate --archived --json`. */
244
271
  const CliValidateReportSchema = z.object({
245
- items: z.array(z.object({
246
- id: z.string(),
247
- type: z.enum(["change", "spec"]),
248
- valid: z.boolean(),
249
- issues: z.array(CliValidationIssueSchema),
250
- durationMs: z.number()
251
- }).passthrough()),
252
- summary: z.object({
253
- totals: CliValidationTotalsSchema,
254
- byType: z.record(CliValidationTotalsSchema)
255
- }).passthrough(),
272
+ items: z.array(CliValidateItemSchema),
273
+ summary: CliValidateSummarySchema,
256
274
  version: z.string(),
257
275
  root: CliRootSchema
258
276
  }).passthrough();
259
277
  /** Typed strict, non-strict, or archived Validate result, including failure diagnostics. */
260
278
  const CliValidateSchema = z.union([CliValidateReportSchema, CliDiagnosticFailureSchema]);
279
+ /**
280
+ * Typed OpenSpec 1.12 `validate --report findings` document.
281
+ *
282
+ * The findings report is a filtered evidence transport beside the full report, never the
283
+ * validation truth: `itemFindings` carries only items with issues, while `summary` and
284
+ * `root` stay the full-run values the CLI computed over every item in scope.
285
+ * `report.returnedItems`/`report.totalItems` distinguish the filtered view from the run
286
+ * size, and the process exit code keeps the full-run rule (`failed > 0 -> 1`), so decoding
287
+ * never consults it. An empty scope is the success document
288
+ * `{ returnedItems: 0, totalItems: 0, itemFindings: [] }`, not a failure sum type.
289
+ *
290
+ * Two upstream-guaranteed invariants are decode-level facts (pinned v1.12.0
291
+ * `projectValidationFindings`): every `itemFindings` entry carries at least one issue
292
+ * (upstream filters `item.issues.length > 0`), and `returnedItems` never exceeds
293
+ * `totalItems` (the filtered view is a subset of the full run). Upstream also happens to
294
+ * set `returnedItems === itemFindings.length` today; that equality stays unasserted so a
295
+ * future patch-level count adjustment inside the admitted range cannot fabricate a
296
+ * contract error out of otherwise well-formed CLI evidence.
297
+ */
298
+ const CliValidateFindingsSchema = z.object({
299
+ report: z.object({
300
+ kind: z.literal("validation-findings"),
301
+ version: z.string(),
302
+ scope: z.enum([
303
+ "all",
304
+ "changes",
305
+ "specs",
306
+ "archived"
307
+ ]),
308
+ returnedItems: z.number(),
309
+ totalItems: z.number()
310
+ }).passthrough(),
311
+ itemFindings: z.array(CliValidateItemSchema),
312
+ summary: CliValidateSummarySchema,
313
+ root: CliRootSchema
314
+ }).passthrough().superRefine((document, ctx) => {
315
+ if (document.report.returnedItems > document.report.totalItems) ctx.addIssue({
316
+ code: z.ZodIssueCode.custom,
317
+ path: ["report", "returnedItems"],
318
+ message: `returnedItems (${document.report.returnedItems}) must not exceed totalItems (${document.report.totalItems}).`
319
+ });
320
+ document.itemFindings.forEach((finding, index) => {
321
+ if (finding.issues.length === 0) ctx.addIssue({
322
+ code: z.ZodIssueCode.custom,
323
+ path: [
324
+ "itemFindings",
325
+ index,
326
+ "issues"
327
+ ],
328
+ message: "Every findings item must carry at least one issue."
329
+ });
330
+ });
331
+ });
332
+ /**
333
+ * Typed findings or request-failure result of `validate --report findings --json`.
334
+ *
335
+ * Invalid requests (no bulk scope, an item name, archived+active mixing, or an unknown
336
+ * report value) produce the shared status-array failure envelope with code
337
+ * `invalid_validation_report_request`, decoded here through the shared diagnostic
338
+ * failure schema including its optional `fix` string.
339
+ */
340
+ const CliValidateFindingsResultSchema = z.union([CliValidateFindingsSchema, CliDiagnosticFailureSchema]);
341
+ /**
342
+ * Whether a findings result is the findings document rather than the request-failure
343
+ * envelope. Passthrough tolerance means a failure envelope may legally carry unknown
344
+ * keys, so mere `report`-key presence cannot discriminate the union: the guard validates
345
+ * the upstream discriminator shape — `report` is an object whose `kind` is the
346
+ * `validation-findings` literal and whose count fields are numbers.
347
+ *
348
+ * The input is deliberately `unknown`: route and evidence consumers receive the union
349
+ * of every validate transport (`CliValidate | CliValidateFindingsResult | null`), so the
350
+ * guard must accept the consumed boundary, not only the already-narrowed findings union.
351
+ * It stays a cheap shape check, never a second decode: schema-level invariants
352
+ * (issue presence, count bounds) belong to `CliValidateFindingsSchema` alone.
353
+ */
354
+ function isCliValidateFindings(result) {
355
+ if (typeof result !== "object" || result === null) return false;
356
+ const report = result.report;
357
+ if (typeof report !== "object" || report === null) return false;
358
+ const { kind, returnedItems, totalItems } = report;
359
+ return kind === "validation-findings" && typeof returnedItems === "number" && typeof totalItems === "number";
360
+ }
261
361
  const CliArchiveTotalsSchema = z.object({
262
362
  added: z.number(),
263
363
  modified: z.number(),
@@ -352,4 +452,4 @@ function parseCliCommandResult(result, schema) {
352
452
  }
353
453
 
354
454
  //#endregion
355
- export { CliValidateReportSchema as C, CliWorkflowStatusSuccessSchema as D, CliWorkflowStatusSchema as E, CliTemplatesSchema as S, CliWorkflowStatusFieldsSchema as T, CliShowSpecDocumentSchema as _, CliApplyInstructionsSuccessSchema as a, CliSpecRequirementSchema as b, CliArchiveSchema as c, CliArtifactPathSchema as d, CliChangeListSchema as f, CliSchemaWhichSchema as g, CliSchemaShadowSchema as h, CliApplyInstructionsSchema as i, CliArtifactInstructionsSchema as l, CliSchemaResolutionSchema as m, parseCliCommandResult as n, CliArchiveInstructionsSchema as o, CliPlanningHomeSchema as p, CliActionContextSchema as r, CliArchiveInstructionsSuccessSchema as s, CliCommandTransportSchema as t, CliArtifactInstructionsSuccessSchema as u, CliShowSpecSchema as v, CliValidateSchema as w, CliTemplateEntrySchema as x, CliSpecListSchema as y };
455
+ export { isCliValidateFindings as A, CliValidateFindingsResultSchema as C, CliWorkflowStatusFieldsSchema as D, CliValidateSchema as E, CliWorkflowStatusSchema as O, CliTemplatesSchema as S, CliValidateReportSchema as T, CliShowSpecDocumentSchema as _, CliApplyInstructionsSuccessSchema as a, CliSpecRequirementSchema as b, CliArchiveSchema as c, CliArtifactPathSchema as d, CliChangeListSchema as f, CliSchemaWhichSchema as g, CliSchemaShadowSchema as h, CliApplyInstructionsSchema as i, CliWorkflowStatusSuccessSchema as k, CliArtifactInstructionsSchema as l, CliSchemaResolutionSchema as m, parseCliCommandResult as n, CliArchiveInstructionsSchema as o, CliPlanningHomeSchema as p, CliActionContextSchema as r, CliArchiveInstructionsSuccessSchema as s, CliCommandTransportSchema as t, CliArtifactInstructionsSuccessSchema as u, CliShowSpecSchema as v, CliValidateFindingsSchema as w, CliTemplateEntrySchema as x, CliSpecListSchema as y };