@openspecui/core 9.0.2 → 10.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 (59) hide show
  1. package/dist/{active-root-config-DxYz3yKb.d.mts → active-root-config-N3lOotoq.d.mts} +13 -13
  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-Bf5KrMN0.d.mts → cli-projection-bB650ru4.d.mts} +9 -9
  5. package/dist/cli-projection.d.mts +5 -5
  6. package/dist/{workflow-CmQ4pFYC.mjs → command-result-DWMmDl6I.mjs} +91 -80
  7. package/dist/{dashboard-summary-transport-BNOPiGUP.d.mts → dashboard-summary-transport-DcyVID8z.d.mts} +3728 -3631
  8. package/dist/dashboard-summary-transport.d.mts +18 -18
  9. package/dist/{document-translation-CBqubtWC.d.mts → document-translation-DM2eydNr.d.mts} +2 -2
  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-CajHC-38.d.mts → index-CW5hcqKC.d.mts} +12277 -7316
  14. package/dist/index.d.mts +19 -19
  15. package/dist/index.mjs +513 -184
  16. package/dist/{local-download-profiles-Cu0nXbF1.d.mts → local-download-profiles-DXmw0Zs3.d.mts} +1 -1
  17. package/dist/local-download-profiles.d.mts +2 -2
  18. package/dist/local-download-profiles.mjs +1 -1
  19. package/dist/{notifications-D0M-01SA.d.mts → notifications-BQhnmovr.d.mts} +13 -13
  20. package/dist/notifications.d.mts +2 -2
  21. package/dist/{openspec-compat-B246EQNW.mjs → openspec-compat-DctIDxRM.mjs} +23 -17
  22. package/dist/openspec-compat.d.mts +4 -76
  23. package/dist/openspec-compat.mjs +2 -2
  24. package/dist/{openspec-projection-DKHk3L2e.d.mts → openspec-projection-FKuNsfBp.d.mts} +1 -1
  25. package/dist/openspec-projection.d.mts +2 -2
  26. package/dist/{opsx-entity-eoJAox1u.d.mts → opsx-entity-CulylXeK.d.mts} +2 -2
  27. package/dist/opsx-entity.d.mts +7 -7
  28. package/dist/{opsx-schema-detail-C3xm4DKk.d.mts → opsx-schema-detail-C9kNWQmO.d.mts} +2 -2
  29. package/dist/opsx-schema-detail.d.mts +8 -8
  30. package/dist/{opsx-types-DXBwJP68.d.mts → opsx-types-BeQJ4Le_.d.mts} +81 -81
  31. package/dist/{planning-cli-projection-DV22v3Xl.mjs → planning-cli-projection-pq8vZC1r.mjs} +2 -2
  32. package/dist/planning-cli-projection.d.mts +18 -18
  33. package/dist/planning-cli-projection.mjs +3 -3
  34. package/dist/{schemas-CxBYcq-e.d.mts → schemas-BIaPbul1.d.mts} +66 -66
  35. package/dist/{sounds-X-Wf5v3V.d.mts → sounds-CxSkCgKh.d.mts} +8 -8
  36. package/dist/sounds.d.mts +1 -1
  37. package/dist/{spec-catalog-Ce3uSLSc.mjs → spec-catalog-BkX0tZp9.mjs} +149 -2
  38. package/dist/spec-catalog.d.mts +18 -18
  39. package/dist/spec-catalog.mjs +2 -2
  40. package/dist/{store-mutation-protocol-B0e6UlO3.d.mts → store-mutation-protocol-DXeWtAvN.d.mts} +36 -36
  41. package/dist/store-mutation-protocol.d.mts +1 -1
  42. package/dist/{store-types-DhoV8sV7.d.mts → store-types-TDbmbvPx.d.mts} +1 -1
  43. package/dist/store-types.d.mts +5 -5
  44. package/dist/task-progress.d.mts +6 -6
  45. package/dist/{terminal-audio-D5CfhorV.d.mts → terminal-audio-R-3VBy0x.d.mts} +1 -1
  46. package/dist/terminal-audio.d.mts +2 -2
  47. package/dist/terminal-audio.mjs +1 -1
  48. package/dist/terminal-control.d.mts +2 -2
  49. package/dist/{terminal-invocation-C71aMyAX.d.mts → terminal-invocation-C8mSioBZ.d.mts} +93 -93
  50. package/dist/terminal-invocation.d.mts +1 -1
  51. package/dist/terminal-theme.mjs +1 -1
  52. package/dist/translation-language-pair.mjs +1 -1
  53. package/dist/{translator-BgCkaOkw.d.mts → translator-CVkc7MHh.d.mts} +91 -91
  54. package/dist/translator.d.mts +1 -1
  55. package/package.json +3 -2
  56. /package/dist/{local-download-profiles-BRsR1-kK.mjs → local-download-profiles-3I8AOUJj.mjs} +0 -0
  57. /package/dist/{terminal-audio-ELHVH24M.mjs → terminal-audio-CLEDFFpW.mjs} +0 -0
  58. /package/dist/{terminal-theme-C6BPfQ2G.mjs → terminal-theme-Bse1UdaX.mjs} +0 -0
  59. /package/dist/{translation-language-pair-CWLlH7Ab.mjs → translation-language-pair-BTfLQehX.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import { N as CliDoctor, Y as CliJsonValue, Z as CliDiagnostic, c as OpenSpecCliContractExecutor, j as CliContext, lt as CliExecutor, q as CliCommandResult, st as CliRootSource, t as CliRootSelector, tt as CliDoctorReferenceEntry, ut as CliResult } from "./index-CajHC-38.mjs";
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-CW5hcqKC.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: {
@@ -553,10 +553,9 @@ declare const ActiveRootMutationSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodOb
553
553
  }, "strict", z.ZodTypeAny, {
554
554
  revision: string;
555
555
  mode: "structured";
556
- filePath: string;
557
556
  update: {
558
- context: string | null;
559
557
  schema: string;
558
+ context: string | null;
560
559
  rules: Record<string, string[]> | null;
561
560
  operations: {
562
561
  apply: {
@@ -568,13 +567,13 @@ declare const ActiveRootMutationSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodOb
568
567
  } | null;
569
568
  };
570
569
  ownerPath: string;
570
+ filePath: string;
571
571
  }, {
572
572
  revision: string;
573
573
  mode: "structured";
574
- filePath: string;
575
574
  update: {
576
- context: string | null;
577
575
  schema: string;
576
+ context: string | null;
578
577
  rules: Record<string, string[]> | null;
579
578
  operations: {
580
579
  apply: {
@@ -586,6 +585,7 @@ declare const ActiveRootMutationSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodOb
586
585
  } | null;
587
586
  };
588
587
  ownerPath: string;
588
+ filePath: string;
589
589
  }>, z.ZodObject<{
590
590
  mode: z.ZodLiteral<"raw">;
591
591
  content: z.ZodString;
@@ -596,14 +596,14 @@ declare const ActiveRootMutationSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodOb
596
596
  revision: string;
597
597
  mode: "raw";
598
598
  content: string;
599
- filePath: string;
600
599
  ownerPath: string;
600
+ filePath: string;
601
601
  }, {
602
602
  revision: string;
603
603
  mode: "raw";
604
604
  content: string;
605
- filePath: string;
606
605
  ownerPath: string;
606
+ filePath: string;
607
607
  }>]>;
608
608
  /** Revision-aware Active Root mutation request. */
609
609
  type ActiveRootMutation = z.infer<typeof ActiveRootMutationSchema>;
@@ -1,6 +1,6 @@
1
- import "./document-translation-CBqubtWC.mjs";
2
- import "./sounds-X-Wf5v3V.mjs";
3
- import "./notifications-D0M-01SA.mjs";
4
- import "./index-CajHC-38.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-DxYz3yKb.mjs";
1
+ import "./index-CW5hcqKC.mjs";
2
+ import "./document-translation-DM2eydNr.mjs";
3
+ import "./sounds-CxSkCgKh.mjs";
4
+ import "./notifications-BQhnmovr.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-N3lOotoq.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,22 +302,22 @@ 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
  ok: false;
313
313
  error: {
314
- code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
314
+ code: "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH" | "INVALID_REQUEST";
315
315
  message: string;
316
316
  };
317
317
  }, {
318
318
  ok: false;
319
319
  error: {
320
- code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
320
+ code: "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH" | "INVALID_REQUEST";
321
321
  message: string;
322
322
  };
323
323
  }>]>;
@@ -338,22 +338,22 @@ 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
  ok: false;
349
349
  error: {
350
- code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
350
+ code: "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH" | "INVALID_REQUEST";
351
351
  message: string;
352
352
  };
353
353
  }, {
354
354
  ok: false;
355
355
  error: {
356
- code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
356
+ code: "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH" | "INVALID_REQUEST";
357
357
  message: string;
358
358
  };
359
359
  }>]>;
@@ -1,4 +1,4 @@
1
- import { Y as CliJsonValue, q as CliCommandResult } from "./index-CajHC-38.mjs";
1
+ import { gt as CliCommandResult, vt as CliJsonValue } from "./index-CW5hcqKC.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/cli-projection.d.ts
@@ -222,7 +222,7 @@ declare function createCliProjectionStateSchema<TOutput, TInput>(dataSchema: z.Z
222
222
  snapshotGeneration: null;
223
223
  identity: string;
224
224
  workGeneration: number;
225
- invalidationCause: "dependency" | "initial" | "explicit-refresh" | "subscriber-resume";
225
+ invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
226
226
  }, {
227
227
  error: null;
228
228
  state: "loading";
@@ -231,7 +231,7 @@ declare function createCliProjectionStateSchema<TOutput, TInput>(dataSchema: z.Z
231
231
  snapshotGeneration: null;
232
232
  identity: string;
233
233
  workGeneration: number;
234
- invalidationCause: "dependency" | "initial" | "explicit-refresh" | "subscriber-resume";
234
+ invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
235
235
  }>, z.ZodObject<{
236
236
  state: z.ZodLiteral<"ready">;
237
237
  data: z.ZodType<TOutput, z.ZodTypeDef, TInput>;
@@ -415,7 +415,7 @@ declare function createCliProjectionStateSchema<TOutput, TInput>(dataSchema: z.Z
415
415
  snapshotGeneration: null;
416
416
  identity: string;
417
417
  workGeneration: number;
418
- invalidationCause: "dependency" | "initial" | "explicit-refresh" | "subscriber-resume";
418
+ invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
419
419
  }, {
420
420
  error: {
421
421
  message: string;
@@ -442,7 +442,7 @@ declare function createCliProjectionStateSchema<TOutput, TInput>(dataSchema: z.Z
442
442
  snapshotGeneration: null;
443
443
  identity: string;
444
444
  workGeneration: number;
445
- invalidationCause: "dependency" | "initial" | "explicit-refresh" | "subscriber-resume";
445
+ invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
446
446
  }>, z.ZodObject<{
447
447
  state: z.ZodLiteral<"refresh-error">;
448
448
  data: z.ZodType<TOutput, z.ZodTypeDef, TInput>;
@@ -761,17 +761,17 @@ 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";
764
+ state: "error" | "ready" | "loading" | "revalidating" | "refresh-error";
765
765
  snapshotGeneration: number | null;
766
766
  identity: string;
767
767
  workGeneration: number;
768
- invalidationCause: "dependency" | "initial" | "explicit-refresh" | "subscriber-resume";
768
+ invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
769
769
  }, {
770
- state: "error" | "loading" | "ready" | "revalidating" | "refresh-error";
770
+ state: "error" | "ready" | "loading" | "revalidating" | "refresh-error";
771
771
  snapshotGeneration: number | null;
772
772
  identity: string;
773
773
  workGeneration: number;
774
- invalidationCause: "dependency" | "initial" | "explicit-refresh" | "subscriber-resume";
774
+ invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
775
775
  }>;
776
776
  type CliProjectionNotice = z.infer<typeof CliProjectionNoticeSchema>;
777
777
  /** Error raised by a typed CLI reader while retaining its complete command evidence. */
@@ -1,6 +1,6 @@
1
- import "./document-translation-CBqubtWC.mjs";
2
- import "./sounds-X-Wf5v3V.mjs";
3
- import "./notifications-D0M-01SA.mjs";
4
- import "./index-CajHC-38.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-Bf5KrMN0.mjs";
1
+ import "./index-CW5hcqKC.mjs";
2
+ import "./document-translation-DM2eydNr.mjs";
3
+ import "./sounds-CxSkCgKh.mjs";
4
+ import "./notifications-BQhnmovr.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-bB650ru4.mjs";
6
6
  export { CliJsonValueSchema, CliProjectionCommandError, CliProjectionCommandEvidence, CliProjectionCommandEvidenceSchema, CliProjectionFailure, CliProjectionFailureSchema, CliProjectionInvalidationCause, CliProjectionInvalidationCauseSchema, CliProjectionNotice, CliProjectionNoticeSchema, CliProjectionState, CliProjectionStateName, CliProjectionStateNameSchema, cliProjectionInvalidationCauses, cliProjectionStates, createCliProjectionStateSchema, toCliProjectionCommandEvidence, toCliProjectionFailure, toCliProjectionNotice };
@@ -1,91 +1,21 @@
1
1
  import { a as CliRootSchema, i as CliReferenceIndexEntrySchema, n as CliDiagnosticSchema, t as CliDiagnosticFailureSchema } from "./common-BRL_34xt.mjs";
2
2
  import { z } from "zod";
3
3
 
4
- //#region src/cli-contracts/command-result.ts
5
- /**
6
- * Orthogonal intents (updated 2026-08-15 Asia/Shanghai):
7
- * 1. Preserve every process-level fact from an OpenSpec CLI invocation.
8
- * 2. Validate command payloads without discarding the raw JSON document.
9
- * 3. Surface contract drift separately from CLI command failure.
10
- * 4. Provide the runtime transport-envelope schema for browser evidence boundaries.
11
- *
12
- * Original request (2026-07-15): "对新增字段保持可扩展,对必需语义严格验证。"
13
- * Original request (2026-08-15): "v9的适配需要同时适配 1.8和1.9。"
14
- */
15
- /** Runtime schema for one JSON value retained verbatim from CLI stdout. */
16
- const CliJsonValueSchema = z.lazy(() => z.union([
17
- z.string(),
18
- z.number(),
19
- z.boolean(),
20
- z.null(),
21
- z.array(CliJsonValueSchema),
22
- z.record(z.string(), CliJsonValueSchema)
23
- ]));
24
- /** Runtime transport envelope for one CLI command result. */
25
- const CliCommandTransportSchema = z.object({
26
- success: z.boolean(),
27
- stdout: z.string(),
28
- stderr: z.string(),
29
- exitCode: z.number().int().nullable(),
30
- data: CliJsonValueSchema.nullable(),
31
- payload: CliJsonValueSchema.nullable(),
32
- diagnostics: z.array(CliDiagnosticSchema),
33
- contractError: z.string().optional()
34
- });
35
- function formatContractError(error) {
36
- return error.issues.map((issue) => {
37
- return `${issue.path.length > 0 ? issue.path.join(".") : "<root>"}: ${issue.message}`;
38
- }).join("; ");
39
- }
40
- function extractDiagnostics(payload) {
41
- if (typeof payload !== "object" || payload === null || !("status" in payload)) return [];
42
- const parsed = z.array(CliDiagnosticSchema).safeParse(payload.status);
43
- return parsed.success ? parsed.data : [];
44
- }
45
- /** Parse one CLI JSON document while retaining all process and raw-payload evidence. */
46
- function parseCliCommandResult(result, schema) {
47
- let payload;
48
- try {
49
- payload = JSON.parse(result.stdout);
50
- } catch (error) {
51
- const message = error instanceof Error ? error.message : String(error);
52
- return {
53
- ...result,
54
- data: null,
55
- payload: null,
56
- diagnostics: [],
57
- contractError: `OpenSpec CLI stdout is not one JSON document: ${message}`
58
- };
59
- }
60
- const parsed = schema.safeParse(payload);
61
- if (!parsed.success) return {
62
- ...result,
63
- data: null,
64
- payload,
65
- diagnostics: extractDiagnostics(payload),
66
- contractError: formatContractError(parsed.error)
67
- };
68
- return {
69
- ...result,
70
- data: parsed.data,
71
- payload,
72
- diagnostics: extractDiagnostics(parsed.data)
73
- };
74
- }
75
-
76
- //#endregion
77
4
  //#region src/cli-contracts/workflow.ts
78
5
  /**
79
- * Orthogonal intents (updated 2026-08-15 Asia/Shanghai):
6
+ * Orthogonal intents (updated 2026-08-28 Asia/Shanghai):
80
7
  * 1. Model camelCase workflow JSON independently from Store-family JSON.
81
8
  * 2. Preserve strict, archived, and bulk Validate plus Archive outcomes, including failure payloads.
82
9
  * 3. Preserve multiline requirement bodies from `show --json`.
83
- * 4. Preserve complete OpenSpec 1.8/1.9 Status and operation-Instruction contracts as CLI facts.
10
+ * 4. Preserve complete admitted-line (1.10/1.11) Status and operation-Instruction contracts as CLI facts.
84
11
  * 5. Export the successful Spec-document schema for browser-safe projection validation.
12
+ * 6. Export the root-less Status payload fields and Requirement shape shared with the
13
+ * OpenSpec 1.11 batch Status and show --diff contracts.
85
14
  *
86
15
  * Original request (2026-07-15): "为不同命令建立强类型适配器,不实现平行解析规则。"
87
16
  * Original request (2026-07-26): "展开全面的接口升级和内核升级和测试升级。"
88
17
  * Original request (2026-08-15): "v9的适配需要同时适配 1.8和1.9。"
18
+ * Original request (2026-08-28): "直接将 0.10.0 和 0.11.0 一起适配,然后发布 v11。"
89
19
  */
90
20
  const CliChangeListEntrySchema = z.object({
91
21
  name: z.string(),
@@ -145,6 +75,7 @@ const CliTemplateEntrySchema = z.object({
145
75
  ])
146
76
  }).passthrough();
147
77
  const CliTemplatesSchema = z.record(CliTemplateEntrySchema);
78
+ /** One requirement body shared by Spec documents and Change deltas. */
148
79
  const CliSpecRequirementSchema = z.object({
149
80
  text: z.string(),
150
81
  scenarios: z.array(z.object({ rawText: z.string() }).passthrough())
@@ -200,8 +131,14 @@ const CliStatusArtifactSchema = z.object({
200
131
  requires: z.array(z.string()),
201
132
  missingDeps: z.array(z.string()).optional()
202
133
  }).passthrough();
203
- /** Complete successful Status payload for one OpenSpec change. */
204
- const CliWorkflowStatusSuccessSchema = z.object({
134
+ /**
135
+ * Root-less Status payload fields for one OpenSpec change.
136
+ *
137
+ * The single-change command attaches `root` itself; the OpenSpec 1.11 batch
138
+ * envelope (`status --all --json`) reuses exactly these fields per entry while
139
+ * the envelope owns the single root.
140
+ */
141
+ const CliWorkflowStatusFieldsSchema = z.object({
205
142
  changeName: z.string(),
206
143
  schemaName: z.string(),
207
144
  planningHome: CliPlanningHomeSchema,
@@ -212,9 +149,10 @@ const CliWorkflowStatusSuccessSchema = z.object({
212
149
  applyRequires: z.array(z.string()),
213
150
  nextSteps: z.array(z.string()),
214
151
  actionContext: CliActionContextSchema,
215
- artifacts: z.array(CliStatusArtifactSchema),
216
- root: CliRootSchema
152
+ artifacts: z.array(CliStatusArtifactSchema)
217
153
  }).passthrough();
154
+ /** Complete successful Status payload for one OpenSpec change. */
155
+ const CliWorkflowStatusSuccessSchema = CliWorkflowStatusFieldsSchema.extend({ root: CliRootSchema }).passthrough();
218
156
  /** Typed success or diagnostic failure result of the CLI Status JSON command. */
219
157
  const CliWorkflowStatusSchema = z.union([CliWorkflowStatusSuccessSchema, CliDiagnosticFailureSchema]);
220
158
  const CliInstructionDependencySchema = z.object({
@@ -341,4 +279,77 @@ const CliArchiveSchema = z.object({
341
279
  }).passthrough();
342
280
 
343
281
  //#endregion
344
- export { CliWorkflowStatusSuccessSchema as C, CliWorkflowStatusSchema as S, parseCliCommandResult as T, CliSpecListSchema as _, CliArchiveInstructionsSuccessSchema as a, CliValidateReportSchema as b, CliArtifactInstructionsSuccessSchema as c, CliPlanningHomeSchema as d, CliSchemaResolutionSchema as f, CliShowSpecSchema as g, CliShowSpecDocumentSchema as h, CliArchiveInstructionsSchema as i, CliArtifactPathSchema as l, CliSchemaWhichSchema as m, CliApplyInstructionsSchema as n, CliArchiveSchema as o, CliSchemaShadowSchema as p, CliApplyInstructionsSuccessSchema as r, CliArtifactInstructionsSchema as s, CliActionContextSchema as t, CliChangeListSchema as u, CliTemplateEntrySchema as v, CliCommandTransportSchema as w, CliValidateSchema as x, CliTemplatesSchema as y };
282
+ //#region src/cli-contracts/command-result.ts
283
+ /**
284
+ * Orthogonal intents (updated 2026-08-15 Asia/Shanghai):
285
+ * 1. Preserve every process-level fact from an OpenSpec CLI invocation.
286
+ * 2. Validate command payloads without discarding the raw JSON document.
287
+ * 3. Surface contract drift separately from CLI command failure.
288
+ * 4. Provide the runtime transport-envelope schema for browser evidence boundaries.
289
+ *
290
+ * Original request (2026-07-15): "对新增字段保持可扩展,对必需语义严格验证。"
291
+ * Original request (2026-08-15): "v9的适配需要同时适配 1.8和1.9。"
292
+ */
293
+ /** Runtime schema for one JSON value retained verbatim from CLI stdout. */
294
+ const CliJsonValueSchema = z.lazy(() => z.union([
295
+ z.string(),
296
+ z.number(),
297
+ z.boolean(),
298
+ z.null(),
299
+ z.array(CliJsonValueSchema),
300
+ z.record(z.string(), CliJsonValueSchema)
301
+ ]));
302
+ /** Runtime transport envelope for one CLI command result. */
303
+ const CliCommandTransportSchema = z.object({
304
+ success: z.boolean(),
305
+ stdout: z.string(),
306
+ stderr: z.string(),
307
+ exitCode: z.number().int().nullable(),
308
+ data: CliJsonValueSchema.nullable(),
309
+ payload: CliJsonValueSchema.nullable(),
310
+ diagnostics: z.array(CliDiagnosticSchema),
311
+ contractError: z.string().optional()
312
+ });
313
+ function formatContractError(error) {
314
+ return error.issues.map((issue) => {
315
+ return `${issue.path.length > 0 ? issue.path.join(".") : "<root>"}: ${issue.message}`;
316
+ }).join("; ");
317
+ }
318
+ function extractDiagnostics(payload) {
319
+ if (typeof payload !== "object" || payload === null || !("status" in payload)) return [];
320
+ const parsed = z.array(CliDiagnosticSchema).safeParse(payload.status);
321
+ return parsed.success ? parsed.data : [];
322
+ }
323
+ /** Parse one CLI JSON document while retaining all process and raw-payload evidence. */
324
+ function parseCliCommandResult(result, schema) {
325
+ let payload;
326
+ try {
327
+ payload = JSON.parse(result.stdout);
328
+ } catch (error) {
329
+ const message = error instanceof Error ? error.message : String(error);
330
+ return {
331
+ ...result,
332
+ data: null,
333
+ payload: null,
334
+ diagnostics: [],
335
+ contractError: `OpenSpec CLI stdout is not one JSON document: ${message}`
336
+ };
337
+ }
338
+ const parsed = schema.safeParse(payload);
339
+ if (!parsed.success) return {
340
+ ...result,
341
+ data: null,
342
+ payload,
343
+ diagnostics: extractDiagnostics(payload),
344
+ contractError: formatContractError(parsed.error)
345
+ };
346
+ return {
347
+ ...result,
348
+ data: parsed.data,
349
+ payload,
350
+ diagnostics: extractDiagnostics(parsed.data)
351
+ };
352
+ }
353
+
354
+ //#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 };