@openspecui/core 4.1.0 → 6.0.0-beta.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 (116) hide show
  1. package/dist/cli-projection-DxnVGm2B.d.mts +789 -0
  2. package/dist/cli-projection-vO3-FJg5.mjs +161 -0
  3. package/dist/cli-projection.d.mts +6 -0
  4. package/dist/cli-projection.mjs +4 -0
  5. package/dist/command-result-fkH3Ekdz.d.mts +8477 -0
  6. package/dist/common-D8YUK9dA.mjs +57 -0
  7. package/dist/dashboard-summary-transport-CQ4is5_e.d.mts +66227 -0
  8. package/dist/dashboard-summary-transport-D2VBAIxg.mjs +175 -0
  9. package/dist/dashboard-summary-transport.d.mts +25 -0
  10. package/dist/dashboard-summary-transport.mjs +6 -0
  11. package/dist/{document-translation-D4YK18I3.mjs → document-translation-CeJFGMoy.mjs} +1 -1
  12. package/dist/{document-translation-CIPGsZD8.d.mts → document-translation-D50BnvVh.d.mts} +100 -100
  13. package/dist/document-translation.d.mts +1 -1
  14. package/dist/document-translation.mjs +2 -2
  15. package/dist/{hosted-app-CzMRiEgY.mjs → hosted-app-BPU4OR41.mjs} +31 -9
  16. package/dist/hosted-app.d.mts +25 -2
  17. package/dist/hosted-app.mjs +7 -2
  18. package/dist/hosted-contract-CcRnb51e.mjs +234 -0
  19. package/dist/hosted-contract.d.mts +25 -0
  20. package/dist/hosted-contract.mjs +7 -0
  21. package/dist/index.d.mts +25 -2686
  22. package/dist/index.mjs +2114 -1098
  23. package/dist/{local-download-profiles-B30HrSO2.d.mts → local-download-profiles-BL_rtlVM.d.mts} +1 -1
  24. package/dist/local-download-profiles.d.mts +2 -2
  25. package/dist/local-download-profiles.mjs +1 -1
  26. package/dist/markdown-facts.d.mts +1 -1
  27. package/dist/markdown-facts.mjs +1 -1
  28. package/dist/{markdown-reading-CgXuXp6s.d.mts → markdown-reading-LUdqfbxH.d.mts} +1 -1
  29. package/dist/{markdown-reading-DdcB7run.mjs → markdown-reading-mG4OAbDO.mjs} +1 -1
  30. package/dist/markdown-reading.d.mts +2 -2
  31. package/dist/markdown-reading.mjs +2 -2
  32. package/dist/{notifications-AKAcmeKT.mjs → notifications-C2bxAzX_.mjs} +13 -2
  33. package/dist/{notifications-HYH-lklF.d.mts → notifications-CgJlLgLO.d.mts} +34 -8
  34. package/dist/notifications.d.mts +2 -2
  35. package/dist/notifications.mjs +3 -3
  36. package/dist/{openspec-annotations-CeXd0JIZ.d.mts → openspec-annotations-C58Aoi-V.d.mts} +2 -2
  37. package/dist/{openspec-annotations-D_6Pz7k4.mjs → openspec-annotations-DCfqBMal.mjs} +2 -2
  38. package/dist/openspec-annotations.d.mts +3 -3
  39. package/dist/openspec-annotations.mjs +3 -3
  40. package/dist/openspec-compat.d.mts +18 -11
  41. package/dist/openspec-compat.mjs +22 -14
  42. package/dist/{openspec-projection-B8s-KWQ7.mjs → openspec-projection-DCgToo0Q.mjs} +2 -2
  43. package/dist/{openspec-projection-BphzrwYP.d.mts → openspec-projection-RohNZI4p.d.mts} +3 -3
  44. package/dist/openspec-projection.d.mts +5 -5
  45. package/dist/openspec-projection.mjs +4 -4
  46. package/dist/opsx-display-path.d.mts +1 -1
  47. package/dist/opsx-display-path.mjs +1 -1
  48. package/dist/{opsx-entity-CFUCqev8.d.mts → opsx-entity-D7kDQsze.d.mts} +2 -2
  49. package/dist/opsx-entity.d.mts +7 -3
  50. package/dist/opsx-entity.mjs +1 -1
  51. package/dist/{opsx-schema-detail-DXKXqMQa.d.mts → opsx-schema-detail-BxDXEwDY.d.mts} +2 -2
  52. package/dist/opsx-schema-detail.d.mts +8 -4
  53. package/dist/opsx-schema-detail.mjs +1 -1
  54. package/dist/opsx-types-BJ8AjhrS.d.mts +3642 -0
  55. package/dist/opsx-workflows-BvnJqjfL.d.mts +36 -0
  56. package/dist/opsx-workflows-Ccc6U7IR.mjs +89 -0
  57. package/dist/opsx-workflows.d.mts +2 -0
  58. package/dist/opsx-workflows.mjs +3 -0
  59. package/dist/planning-cli-projection-DIRxeq2H.mjs +421 -0
  60. package/dist/planning-cli-projection.d.mts +25 -0
  61. package/dist/planning-cli-projection.mjs +9 -0
  62. package/dist/schemas-BFroDdOC.mjs +287 -0
  63. package/dist/{schemas-CNKCVc7m.d.mts → schemas-DS-JqAJ2.d.mts} +498 -52
  64. package/dist/{sounds-J6z7o4mt.d.mts → sounds-qhRgCy0F.d.mts} +5 -5
  65. package/dist/sounds.d.mts +1 -1
  66. package/dist/sounds.mjs +1 -1
  67. package/dist/spec-catalog-ZGuiZ4CE.mjs +901 -0
  68. package/dist/spec-catalog.d.mts +25 -0
  69. package/dist/spec-catalog.mjs +6 -0
  70. package/dist/store-mutation-protocol-5tfs-RmD.d.mts +727 -0
  71. package/dist/store-mutation-protocol-CSwD-xPO.mjs +63 -0
  72. package/dist/store-mutation-protocol.d.mts +2 -0
  73. package/dist/store-mutation-protocol.mjs +4 -0
  74. package/dist/{store-types-Cu41QSww.mjs → store-types-DlX1REBg.mjs} +39 -18
  75. package/dist/{store-types-BiE-Ey--.d.mts → store-types-b554wAQJ.d.mts} +22 -12
  76. package/dist/store-types.d.mts +6 -2
  77. package/dist/store-types.mjs +2 -2
  78. package/dist/task-progress-B_IWVXjA.mjs +216 -0
  79. package/dist/task-progress.d.mts +7 -4
  80. package/dist/task-progress.mjs +3 -3
  81. package/dist/{terminal-audio-TBoU2jSK.mjs → terminal-audio-d6KItUeJ.mjs} +1 -1
  82. package/dist/{terminal-audio-BeUXlQgj.d.mts → terminal-audio-tXDm_EDe.d.mts} +2 -2
  83. package/dist/terminal-audio.d.mts +2 -2
  84. package/dist/terminal-audio.mjs +2 -2
  85. package/dist/terminal-control.d.mts +2 -2
  86. package/dist/terminal-control.mjs +1 -1
  87. package/dist/{terminal-invocation-ClVh0HeM.d.mts → terminal-invocation-BOvxThym.d.mts} +203 -84
  88. package/dist/terminal-invocation.d.mts +1 -1
  89. package/dist/terminal-invocation.mjs +1 -1
  90. package/dist/terminal-theme.d.mts +1 -1
  91. package/dist/terminal-theme.mjs +1 -1
  92. package/dist/translation-language-pair.d.mts +1 -1
  93. package/dist/translation-language-pair.mjs +1 -1
  94. package/dist/{translator-D6t_LEVN.d.mts → translator-NKv1wo3o.d.mts} +208 -208
  95. package/dist/translator.d.mts +1 -1
  96. package/dist/translator.mjs +1 -1
  97. package/package.json +55 -7
  98. package/dist/hosted-app-DHs94gIR.d.mts +0 -43
  99. package/dist/opsx-types-2rgsQHsB.d.mts +0 -402
  100. package/dist/task-progress-BHn4bCoD.d.mts +0 -24
  101. package/dist/task-progress-DhHYHnTv.mjs +0 -70
  102. /package/dist/{local-download-profiles-kpNEcdF_.mjs → local-download-profiles-odzOdf96.mjs} +0 -0
  103. /package/dist/{markdown-facts-BBCTe_qq.mjs → markdown-facts-BUqLvFRf.mjs} +0 -0
  104. /package/dist/{markdown-facts-Dk7FKaaT.d.mts → markdown-facts-CCw3QdbM.d.mts} +0 -0
  105. /package/dist/{opsx-display-path-CUCOrHcM.mjs → opsx-display-path-D13XV20v.mjs} +0 -0
  106. /package/dist/{opsx-display-path-cIMKa1aw.d.mts → opsx-display-path-RXS5JTbV.d.mts} +0 -0
  107. /package/dist/{opsx-entity-c7m5CbgU.mjs → opsx-entity-Cn_Zu1J3.mjs} +0 -0
  108. /package/dist/{opsx-schema-detail-BH82X6aU.mjs → opsx-schema-detail-Beis4Ba2.mjs} +0 -0
  109. /package/dist/{sounds-CB3ubSnj.mjs → sounds-NXwveBqq.mjs} +0 -0
  110. /package/dist/{terminal-control-VpTuh17B.mjs → terminal-control-BSAlOTs8.mjs} +0 -0
  111. /package/dist/{terminal-invocation-C2MCNBhK.mjs → terminal-invocation-0p-j2eSP.mjs} +0 -0
  112. /package/dist/{terminal-theme-cevliJw2.mjs → terminal-theme-B8iRttTR.mjs} +0 -0
  113. /package/dist/{terminal-theme-hvQjTsNh.d.mts → terminal-theme-m3MSGJ7U.d.mts} +0 -0
  114. /package/dist/{translation-language-pair-DZ_WNp_M.mjs → translation-language-pair-Bbhk-LAC.mjs} +0 -0
  115. /package/dist/{translation-language-pair-DmaOfHqD.d.mts → translation-language-pair-C18GPATW.d.mts} +0 -0
  116. /package/dist/{translator-DbUT1Ayn.mjs → translator-Cjtv4tya.mjs} +0 -0
@@ -0,0 +1,36 @@
1
+ //#region src/opsx-workflows.d.ts
2
+ /**
3
+ * Orthogonal intents (created 2026-07-16 Asia/Shanghai):
4
+ * 1. Define the complete OPSX workflow vocabulary once for Core, Server, CLI, and Web.
5
+ * 2. Define profile and input-shape groups without coupling them to one transport.
6
+ * 3. Define shared labels, command capability, and official skill-directory mappings.
7
+ *
8
+ * Original request (2026-07-15): "sync、update 的完整交付链。"
9
+ */
10
+ declare const OPSX_ALL_WORKFLOWS: readonly ["propose", "explore", "new", "continue", "apply", "update", "ff", "sync", "archive", "bulk-archive", "verify", "onboard"];
11
+ /** Complete supported OPSX workflow identifier union. */
12
+ type OpsxWorkflowId = (typeof OPSX_ALL_WORKFLOWS)[number];
13
+ /** Workflows delivered by the OpenSpec core profile. */
14
+ declare const OPSX_CORE_PROFILE_WORKFLOWS: readonly ["propose", "explore", "apply", "update", "sync", "archive"];
15
+ /** OPSX actions whose primary input is free text. */
16
+ declare const OPSX_TEXT_INPUT_ACTIONS: readonly ["explore", "propose"];
17
+ /** OPSX actions whose primary input is an artifact identity. */
18
+ declare const OPSX_ARTIFACT_INPUT_ACTIONS: readonly ["continue", "ff"];
19
+ /** OPSX actions whose primary input is an existing Change identity. */
20
+ declare const OPSX_CHANGE_INPUT_ACTIONS: readonly ["apply", "update", "archive", "verify", "sync"];
21
+ /** Workflows that can be delivered as explicit agent commands. */
22
+ declare const OPSX_COMMAND_CAPABLE_WORKFLOWS: readonly ["propose", "apply", "update", "sync", "archive"];
23
+ /** Text-input OPSX action union. */
24
+ type OpsxTextInputAction = (typeof OPSX_TEXT_INPUT_ACTIONS)[number];
25
+ /** Artifact-input OPSX action union. */
26
+ type OpsxArtifactInputAction = (typeof OPSX_ARTIFACT_INPUT_ACTIONS)[number];
27
+ /** Change-input OPSX action union. */
28
+ type OpsxChangeInputAction = (typeof OPSX_CHANGE_INPUT_ACTIONS)[number];
29
+ /** User-facing labels for every supported OPSX workflow. */
30
+ declare const OPSX_WORKFLOW_LABELS: Record<OpsxWorkflowId, string>;
31
+ /** First-party skill directory selected for each OPSX workflow. */
32
+ declare const OPSX_WORKFLOW_TO_SKILL_DIR: Record<OpsxWorkflowId, string>;
33
+ /** Return whether a workflow selection exactly represents the core profile. */
34
+ declare function isOpsxCoreWorkflowSelection(workflows: readonly string[]): boolean;
35
+ //#endregion
36
+ export { OPSX_CORE_PROFILE_WORKFLOWS as a, OPSX_WORKFLOW_TO_SKILL_DIR as c, OpsxTextInputAction as d, OpsxWorkflowId as f, OPSX_COMMAND_CAPABLE_WORKFLOWS as i, OpsxArtifactInputAction as l, OPSX_ARTIFACT_INPUT_ACTIONS as n, OPSX_TEXT_INPUT_ACTIONS as o, isOpsxCoreWorkflowSelection as p, OPSX_CHANGE_INPUT_ACTIONS as r, OPSX_WORKFLOW_LABELS as s, OPSX_ALL_WORKFLOWS as t, OpsxChangeInputAction as u };
@@ -0,0 +1,89 @@
1
+ //#region src/opsx-workflows.ts
2
+ /**
3
+ * Orthogonal intents (created 2026-07-16 Asia/Shanghai):
4
+ * 1. Define the complete OPSX workflow vocabulary once for Core, Server, CLI, and Web.
5
+ * 2. Define profile and input-shape groups without coupling them to one transport.
6
+ * 3. Define shared labels, command capability, and official skill-directory mappings.
7
+ *
8
+ * Original request (2026-07-15): "sync、update 的完整交付链。"
9
+ */
10
+ const OPSX_ALL_WORKFLOWS = [
11
+ "propose",
12
+ "explore",
13
+ "new",
14
+ "continue",
15
+ "apply",
16
+ "update",
17
+ "ff",
18
+ "sync",
19
+ "archive",
20
+ "bulk-archive",
21
+ "verify",
22
+ "onboard"
23
+ ];
24
+ /** Workflows delivered by the OpenSpec core profile. */
25
+ const OPSX_CORE_PROFILE_WORKFLOWS = [
26
+ "propose",
27
+ "explore",
28
+ "apply",
29
+ "update",
30
+ "sync",
31
+ "archive"
32
+ ];
33
+ /** OPSX actions whose primary input is free text. */
34
+ const OPSX_TEXT_INPUT_ACTIONS = ["explore", "propose"];
35
+ /** OPSX actions whose primary input is an artifact identity. */
36
+ const OPSX_ARTIFACT_INPUT_ACTIONS = ["continue", "ff"];
37
+ /** OPSX actions whose primary input is an existing Change identity. */
38
+ const OPSX_CHANGE_INPUT_ACTIONS = [
39
+ "apply",
40
+ "update",
41
+ "archive",
42
+ "verify",
43
+ "sync"
44
+ ];
45
+ /** Workflows that can be delivered as explicit agent commands. */
46
+ const OPSX_COMMAND_CAPABLE_WORKFLOWS = [
47
+ "propose",
48
+ "apply",
49
+ "update",
50
+ "sync",
51
+ "archive"
52
+ ];
53
+ /** User-facing labels for every supported OPSX workflow. */
54
+ const OPSX_WORKFLOW_LABELS = {
55
+ propose: "Propose change",
56
+ explore: "Explore ideas",
57
+ new: "New change",
58
+ continue: "Continue change",
59
+ apply: "Apply tasks",
60
+ update: "Update change",
61
+ ff: "Fast-forward",
62
+ sync: "Sync specs",
63
+ archive: "Archive change",
64
+ "bulk-archive": "Bulk archive",
65
+ verify: "Verify change",
66
+ onboard: "Onboard"
67
+ };
68
+ /** First-party skill directory selected for each OPSX workflow. */
69
+ const OPSX_WORKFLOW_TO_SKILL_DIR = {
70
+ propose: "openspec-propose",
71
+ explore: "openspec-explore",
72
+ new: "openspec-new-change",
73
+ continue: "openspec-continue-change",
74
+ apply: "openspec-apply-change",
75
+ update: "openspec-update-change",
76
+ ff: "openspec-ff-change",
77
+ sync: "openspec-sync-specs",
78
+ archive: "openspec-archive-change",
79
+ "bulk-archive": "openspec-bulk-archive-change",
80
+ verify: "openspec-verify-change",
81
+ onboard: "openspec-onboard"
82
+ };
83
+ /** Return whether a workflow selection exactly represents the core profile. */
84
+ function isOpsxCoreWorkflowSelection(workflows) {
85
+ return workflows.length === OPSX_CORE_PROFILE_WORKFLOWS.length && OPSX_CORE_PROFILE_WORKFLOWS.every((workflow) => workflows.includes(workflow));
86
+ }
87
+
88
+ //#endregion
89
+ export { OPSX_CORE_PROFILE_WORKFLOWS as a, OPSX_WORKFLOW_TO_SKILL_DIR as c, OPSX_COMMAND_CAPABLE_WORKFLOWS as i, isOpsxCoreWorkflowSelection as l, OPSX_ARTIFACT_INPUT_ACTIONS as n, OPSX_TEXT_INPUT_ACTIONS as o, OPSX_CHANGE_INPUT_ACTIONS as r, OPSX_WORKFLOW_LABELS as s, OPSX_ALL_WORKFLOWS as t };
@@ -0,0 +1,2 @@
1
+ import { a as OPSX_CORE_PROFILE_WORKFLOWS, c as OPSX_WORKFLOW_TO_SKILL_DIR, d as OpsxTextInputAction, f as OpsxWorkflowId, i as OPSX_COMMAND_CAPABLE_WORKFLOWS, l as OpsxArtifactInputAction, n as OPSX_ARTIFACT_INPUT_ACTIONS, o as OPSX_TEXT_INPUT_ACTIONS, p as isOpsxCoreWorkflowSelection, r as OPSX_CHANGE_INPUT_ACTIONS, s as OPSX_WORKFLOW_LABELS, t as OPSX_ALL_WORKFLOWS, u as OpsxChangeInputAction } from "./opsx-workflows-BvnJqjfL.mjs";
2
+ export { OPSX_ALL_WORKFLOWS, OPSX_ARTIFACT_INPUT_ACTIONS, OPSX_CHANGE_INPUT_ACTIONS, OPSX_COMMAND_CAPABLE_WORKFLOWS, OPSX_CORE_PROFILE_WORKFLOWS, OPSX_TEXT_INPUT_ACTIONS, OPSX_WORKFLOW_LABELS, OPSX_WORKFLOW_TO_SKILL_DIR, OpsxArtifactInputAction, OpsxChangeInputAction, OpsxTextInputAction, OpsxWorkflowId, isOpsxCoreWorkflowSelection };
@@ -0,0 +1,3 @@
1
+ import { a as OPSX_CORE_PROFILE_WORKFLOWS, c as OPSX_WORKFLOW_TO_SKILL_DIR, i as OPSX_COMMAND_CAPABLE_WORKFLOWS, l as isOpsxCoreWorkflowSelection, n as OPSX_ARTIFACT_INPUT_ACTIONS, o as OPSX_TEXT_INPUT_ACTIONS, r as OPSX_CHANGE_INPUT_ACTIONS, s as OPSX_WORKFLOW_LABELS, t as OPSX_ALL_WORKFLOWS } from "./opsx-workflows-Ccc6U7IR.mjs";
2
+
3
+ export { OPSX_ALL_WORKFLOWS, OPSX_ARTIFACT_INPUT_ACTIONS, OPSX_CHANGE_INPUT_ACTIONS, OPSX_COMMAND_CAPABLE_WORKFLOWS, OPSX_CORE_PROFILE_WORKFLOWS, OPSX_TEXT_INPUT_ACTIONS, OPSX_WORKFLOW_LABELS, OPSX_WORKFLOW_TO_SKILL_DIR, isOpsxCoreWorkflowSelection };
@@ -0,0 +1,421 @@
1
+ import { t as createApplyInstructionProgress } from "./task-progress-B_IWVXjA.mjs";
2
+ import { a as CliRootSchema, i as CliReferenceIndexEntrySchema, n as CliDiagnosticSchema } from "./common-D8YUK9dA.mjs";
3
+ import { D as CliSchemaInfoSchema, E as CliPlanningHomeSchema, O as CliSchemaResolutionSchema, P as CliTemplateEntrySchema, a as SpecDocumentProjectionSchema, k as CliSchemaShadowSchema, o as SpecIdentitySchema, r as SpecCatalogSchema, v as CliActionContextSchema, w as CliArtifactPathSchema } from "./spec-catalog-ZGuiZ4CE.mjs";
4
+ import { r as CliProjectionCommandEvidenceSchema, u as createCliProjectionStateSchema } from "./cli-projection-vO3-FJg5.mjs";
5
+ import { z } from "zod";
6
+
7
+ //#region src/opsx-types.ts
8
+ /**
9
+ * Orthogonal intents (updated 2026-07-27 Asia/Shanghai):
10
+ * 1. Define reactive Change Status and Instructions projections.
11
+ * 2. Preserve live CLI path/action/Reference provenance versus explicit static absence.
12
+ * 3. Attribute Apply instruction progress without replacing tracked-task truth.
13
+ * 4. Define schema, template, and dependency projections for OPSX surfaces.
14
+ * 5. Publish runtime schemas for final Projection Work payloads, including transformed Apply progress.
15
+ *
16
+ * Original request (2026-07-15): "Preserve CLI-provided paths, action context, References, and diagnostics end to end."
17
+ * Original request (2026-07-23): "OPSX Status 不应等待完整 Kernel warmup,且必须保留 CLI evidence。"
18
+ * Original request (2026-07-26): "展开全面的接口升级和内核升级和测试升级。"
19
+ */
20
+ /** Check if an outputPath contains glob pattern characters */
21
+ function isGlobPattern(pattern) {
22
+ return pattern.includes("*") || pattern.includes("?") || pattern.includes("[");
23
+ }
24
+ /** Runtime schema for one JSON value retained from a CLI Status stdout document. */
25
+ const OpsxCliJsonValueSchema = z.lazy(() => z.union([
26
+ z.string(),
27
+ z.number(),
28
+ z.boolean(),
29
+ z.null(),
30
+ z.array(OpsxCliJsonValueSchema),
31
+ z.record(z.string(), OpsxCliJsonValueSchema)
32
+ ]));
33
+ /** Raw process and parser evidence retained beside one live CLI projection. */
34
+ const OpsxCliEvidenceSchema = z.object({
35
+ command: z.enum([
36
+ "status",
37
+ "instructions",
38
+ "instructions apply"
39
+ ]),
40
+ success: z.boolean(),
41
+ stdout: z.string(),
42
+ stderr: z.string(),
43
+ exitCode: z.number().int().nullable(),
44
+ payload: OpsxCliJsonValueSchema.nullable(),
45
+ diagnostics: z.array(CliDiagnosticSchema),
46
+ contractError: z.string().optional(),
47
+ selector: z.object({ store: z.string().optional() }).strict(),
48
+ root: CliRootSchema.optional()
49
+ }).passthrough();
50
+ /** Status-specific evidence kept as a narrow public contract for consumers. */
51
+ const OpsxStatusEvidenceSchema = OpsxCliEvidenceSchema.extend({ command: z.literal("status") });
52
+ const OpsxArtifactInstructionsEvidenceSchema = OpsxCliEvidenceSchema.extend({ command: z.literal("instructions") });
53
+ const OpsxApplyInstructionsEvidenceSchema = OpsxCliEvidenceSchema.extend({ command: z.literal("instructions apply") });
54
+ const ArtifactStatusSchema = z.object({
55
+ id: z.string(),
56
+ outputPath: z.string(),
57
+ status: z.enum([
58
+ "done",
59
+ "ready",
60
+ "blocked"
61
+ ]),
62
+ missingDeps: z.array(z.string()).optional(),
63
+ relativePath: z.string().optional()
64
+ });
65
+ const ChangeStatusSchema = z.object({
66
+ changeName: z.string(),
67
+ schemaName: z.string(),
68
+ isComplete: z.boolean(),
69
+ applyRequires: z.array(z.string()),
70
+ artifacts: z.array(ArtifactStatusSchema),
71
+ provenance: z.discriminatedUnion("kind", [z.object({
72
+ kind: z.literal("cli"),
73
+ planningHome: CliPlanningHomeSchema,
74
+ changeRoot: z.string(),
75
+ artifactPaths: z.record(CliArtifactPathSchema),
76
+ nextSteps: z.array(z.string()),
77
+ actionContext: CliActionContextSchema,
78
+ root: CliRootSchema,
79
+ evidence: OpsxStatusEvidenceSchema
80
+ }), z.object({ kind: z.literal("static") })])
81
+ });
82
+ const DependencyInfoSchema = z.object({
83
+ id: z.string(),
84
+ done: z.boolean(),
85
+ path: z.string(),
86
+ description: z.string()
87
+ });
88
+ const ApplyTaskSchema = z.object({
89
+ id: z.string(),
90
+ description: z.string(),
91
+ done: z.boolean()
92
+ });
93
+ const ApplyInstructionsContextFilePathsSchema = z.union([z.string(), z.array(z.string())]).transform((paths) => Array.isArray(paths) ? paths : [paths]);
94
+ const ApplyInstructionsContextFilesSchema = z.record(ApplyInstructionsContextFilePathsSchema);
95
+ const ApplyInstructionsInputSchema = z.object({
96
+ changeName: z.string(),
97
+ changeDir: z.string(),
98
+ schemaName: z.string(),
99
+ contextFiles: ApplyInstructionsContextFilesSchema,
100
+ progress: z.object({
101
+ total: z.number(),
102
+ complete: z.number(),
103
+ remaining: z.number()
104
+ }),
105
+ tasks: z.array(ApplyTaskSchema),
106
+ state: z.enum([
107
+ "blocked",
108
+ "all_done",
109
+ "ready"
110
+ ]),
111
+ missingArtifacts: z.array(z.string()).optional(),
112
+ instruction: z.string(),
113
+ references: z.array(CliReferenceIndexEntrySchema).optional(),
114
+ evidence: OpsxApplyInstructionsEvidenceSchema
115
+ });
116
+ const ApplyInstructionProgressSchema = z.object({
117
+ source: z.literal("openspec-instructions-apply"),
118
+ total: z.number(),
119
+ complete: z.number(),
120
+ remaining: z.number(),
121
+ state: z.enum([
122
+ "blocked",
123
+ "all_done",
124
+ "ready"
125
+ ]),
126
+ divergence: z.object({
127
+ kind: z.literal("tracked-task-mismatch"),
128
+ message: z.string(),
129
+ apply: z.object({
130
+ total: z.number(),
131
+ complete: z.number(),
132
+ remaining: z.number()
133
+ }),
134
+ tracked: z.object({
135
+ total: z.number(),
136
+ completed: z.number(),
137
+ remaining: z.number(),
138
+ phase: z.enum([
139
+ "no-tasks",
140
+ "in-progress",
141
+ "complete"
142
+ ])
143
+ })
144
+ }).nullable()
145
+ });
146
+ /** Runtime schema for the final transformed Apply projection returned to clients. */
147
+ const ApplyInstructionsProjectionSchema = z.object({
148
+ changeName: z.string(),
149
+ changeDir: z.string(),
150
+ schemaName: z.string(),
151
+ contextFiles: ApplyInstructionsContextFilesSchema,
152
+ tasks: z.array(ApplyTaskSchema),
153
+ state: z.enum([
154
+ "blocked",
155
+ "all_done",
156
+ "ready"
157
+ ]),
158
+ missingArtifacts: z.array(z.string()).optional(),
159
+ instruction: z.string(),
160
+ references: z.array(CliReferenceIndexEntrySchema).optional(),
161
+ evidence: OpsxApplyInstructionsEvidenceSchema,
162
+ applyInstructionProgress: ApplyInstructionProgressSchema
163
+ });
164
+ const ApplyInstructionsSchema = ApplyInstructionsInputSchema.transform(({ progress, ...instructions }) => ({
165
+ ...instructions,
166
+ applyInstructionProgress: createApplyInstructionProgress({
167
+ ...progress,
168
+ state: instructions.state
169
+ })
170
+ })).pipe(ApplyInstructionsProjectionSchema);
171
+ const NullableString = z.string().nullable().optional();
172
+ const ArtifactInstructionsSchema = z.object({
173
+ changeName: z.string(),
174
+ artifactId: z.string(),
175
+ schemaName: z.string(),
176
+ changeDir: z.string(),
177
+ outputPath: z.string(),
178
+ description: z.string(),
179
+ instruction: NullableString,
180
+ context: NullableString,
181
+ rules: z.array(z.string()).optional().nullable(),
182
+ template: z.string(),
183
+ dependencies: z.array(DependencyInfoSchema),
184
+ unlocks: z.array(z.string()),
185
+ references: z.array(CliReferenceIndexEntrySchema).optional(),
186
+ evidence: OpsxArtifactInstructionsEvidenceSchema
187
+ });
188
+ /** CLI-owned Schema list item projected by OPSX. */
189
+ const SchemaInfoSchema = CliSchemaInfoSchema;
190
+ /** CLI-owned schema resolution enriched only with display-safe paths. */
191
+ const SchemaResolutionSchema = CliSchemaResolutionSchema.extend({
192
+ displayPath: z.string().optional(),
193
+ shadows: z.array(CliSchemaShadowSchema.extend({ displayPath: z.string().optional() }))
194
+ });
195
+ /** CLI-owned template index enriched only with display-safe paths. */
196
+ const TemplatesSchema = z.record(CliTemplateEntrySchema.extend({ displayPath: z.string().optional() }));
197
+ const SchemaArtifactSchema = z.object({
198
+ id: z.string(),
199
+ outputPath: z.string(),
200
+ description: z.string().optional(),
201
+ template: z.string().optional(),
202
+ instruction: z.string().optional(),
203
+ requires: z.array(z.string())
204
+ });
205
+ const SchemaDetailSchema = z.object({
206
+ name: z.string(),
207
+ description: z.string().optional(),
208
+ version: z.union([z.string(), z.number()]).optional(),
209
+ artifacts: z.array(SchemaArtifactSchema),
210
+ applyRequires: z.array(z.string()),
211
+ applyTracks: z.string().optional(),
212
+ applyInstruction: z.string().optional()
213
+ });
214
+ /** Runtime schema for the aggregate Schema workspace projection. */
215
+ const OpsxConfigBundleSchema = z.object({
216
+ schemas: z.array(SchemaInfoSchema),
217
+ schemaDetails: z.record(z.string(), SchemaDetailSchema.nullable()),
218
+ schemaResolutions: z.record(z.string(), SchemaResolutionSchema.nullable())
219
+ });
220
+ /** Runtime schema for one resolved template body and its physical provenance. */
221
+ const TemplateContentSchema = z.object({
222
+ content: z.string().nullable(),
223
+ path: z.string(),
224
+ displayPath: z.string().optional(),
225
+ source: z.enum([
226
+ "project",
227
+ "user",
228
+ "package"
229
+ ])
230
+ });
231
+ /** Runtime schema for template bodies keyed by artifact id. */
232
+ const TemplateContentMapSchema = z.record(z.string(), TemplateContentSchema);
233
+
234
+ //#endregion
235
+ //#region src/planning-cli-projection.ts
236
+ /**
237
+ * Orthogonal intents (updated 2026-07-27 Asia/Shanghai):
238
+ * 1. Define selector-exact Planning-root CLI Projection Work contracts.
239
+ * 2. Define the runtime-environment Environment Global projection contract.
240
+ * 3. Publish browser-safe lifecycle Pull schemas without importing Node-owned Core modules.
241
+ * 4. Keep projection data discriminated so one typed registry never mixes selector payloads.
242
+ *
243
+ * Original request (2026-07-26): "展开全面的接口升级和内核升级和测试升级。"
244
+ */
245
+ /** Runtime selector for one Planning-root CLI-backed projection. */
246
+ const PlanningCliProjectionSelectorSchema = z.discriminatedUnion("kind", [
247
+ z.object({
248
+ kind: z.literal("opsx-status"),
249
+ change: z.string().min(1),
250
+ schema: z.string().optional()
251
+ }),
252
+ z.object({ kind: z.literal("opsx-change-list") }),
253
+ z.object({ kind: z.literal("opsx-status-list") }),
254
+ z.object({
255
+ kind: z.literal("opsx-instructions"),
256
+ change: z.string().min(1),
257
+ artifact: z.string().min(1),
258
+ schema: z.string().optional()
259
+ }),
260
+ z.object({
261
+ kind: z.literal("opsx-apply-instructions"),
262
+ change: z.string().min(1),
263
+ schema: z.string().optional()
264
+ }),
265
+ z.object({ kind: z.literal("opsx-config-bundle") }),
266
+ z.object({
267
+ kind: z.literal("opsx-templates"),
268
+ schema: z.string().optional()
269
+ }),
270
+ z.object({
271
+ kind: z.literal("opsx-template-contents"),
272
+ schema: z.string().optional()
273
+ }),
274
+ z.object({ kind: z.literal("spec-catalog") }),
275
+ z.object({
276
+ kind: z.literal("spec-document"),
277
+ identity: SpecIdentitySchema
278
+ })
279
+ ]);
280
+ /** Data payload retained by one Planning-root Projection Work registry. */
281
+ const PlanningCliProjectionDataSchema = z.discriminatedUnion("kind", [
282
+ z.object({
283
+ kind: z.literal("opsx-status"),
284
+ value: ChangeStatusSchema
285
+ }),
286
+ z.object({
287
+ kind: z.literal("opsx-change-list"),
288
+ value: z.array(z.string()),
289
+ evidence: CliProjectionCommandEvidenceSchema
290
+ }),
291
+ z.object({
292
+ kind: z.literal("opsx-status-list"),
293
+ value: z.array(ChangeStatusSchema),
294
+ evidence: CliProjectionCommandEvidenceSchema
295
+ }),
296
+ z.object({
297
+ kind: z.literal("opsx-instructions"),
298
+ value: ArtifactInstructionsSchema
299
+ }),
300
+ z.object({
301
+ kind: z.literal("opsx-apply-instructions"),
302
+ value: ApplyInstructionsProjectionSchema
303
+ }),
304
+ z.object({
305
+ kind: z.literal("opsx-config-bundle"),
306
+ value: OpsxConfigBundleSchema,
307
+ evidence: z.object({
308
+ schemas: CliProjectionCommandEvidenceSchema,
309
+ schemaResolutions: z.record(z.string(), CliProjectionCommandEvidenceSchema)
310
+ })
311
+ }),
312
+ z.object({
313
+ kind: z.literal("opsx-templates"),
314
+ value: TemplatesSchema,
315
+ evidence: CliProjectionCommandEvidenceSchema
316
+ }),
317
+ z.object({
318
+ kind: z.literal("opsx-template-contents"),
319
+ value: TemplateContentMapSchema,
320
+ evidence: CliProjectionCommandEvidenceSchema
321
+ }),
322
+ z.object({
323
+ kind: z.literal("spec-catalog"),
324
+ value: SpecCatalogSchema
325
+ }),
326
+ z.object({
327
+ kind: z.literal("spec-document"),
328
+ value: SpecDocumentProjectionSchema
329
+ })
330
+ ]);
331
+ /** Browser-safe lifecycle Pull schema for every selector-exact Planning-root projection. */
332
+ const PlanningCliProjectionStateSchema = createCliProjectionStateSchema(PlanningCliProjectionDataSchema);
333
+ const CliJsonValueSchema = z.lazy(() => z.union([
334
+ z.string(),
335
+ z.number(),
336
+ z.boolean(),
337
+ z.null(),
338
+ z.array(CliJsonValueSchema),
339
+ z.record(z.string(), CliJsonValueSchema)
340
+ ]));
341
+ const CliResultSchema = z.object({
342
+ success: z.boolean(),
343
+ stdout: z.string(),
344
+ stderr: z.string(),
345
+ exitCode: z.number().int().nullable()
346
+ });
347
+ const EnvironmentConfigCommandResultSchema = CliResultSchema.extend({
348
+ data: z.record(z.string(), CliJsonValueSchema).nullable(),
349
+ payload: CliJsonValueSchema.nullable(),
350
+ diagnostics: z.array(CliDiagnosticSchema),
351
+ contractError: z.string().optional()
352
+ });
353
+ /** Browser-safe runtime schema for the CLI-owned Environment Global projection. */
354
+ const EnvironmentGlobalProjectionDataSchema = z.object({
355
+ kind: z.literal("environment-global"),
356
+ owner: z.object({
357
+ kind: z.literal("runtime-environment"),
358
+ dataScope: z.object({
359
+ path: z.string(),
360
+ source: z.enum([
361
+ "xdg-data-home",
362
+ "local-app-data",
363
+ "user-home-default"
364
+ ]),
365
+ environmentVariable: z.enum(["XDG_DATA_HOME", "LOCALAPPDATA"]).nullable()
366
+ })
367
+ }),
368
+ configPath: z.string().nullable(),
369
+ config: z.record(z.string(), CliJsonValueSchema).nullable(),
370
+ profileState: z.object({
371
+ available: z.boolean(),
372
+ profile: z.enum(["core", "custom"]).nullable(),
373
+ delivery: z.enum([
374
+ "both",
375
+ "skills",
376
+ "commands"
377
+ ]).nullable(),
378
+ workflows: z.array(z.string()),
379
+ driftStatus: z.enum([
380
+ "in-sync",
381
+ "drift",
382
+ "unknown"
383
+ ]),
384
+ warningText: z.string().nullable(),
385
+ error: z.string().optional()
386
+ }),
387
+ evidence: z.object({
388
+ path: CliResultSchema,
389
+ config: EnvironmentConfigCommandResultSchema,
390
+ drift: CliResultSchema
391
+ })
392
+ });
393
+ /** Browser-safe file-native projection for the CLI-selected editable config document. */
394
+ const EnvironmentGlobalFileProjectionDataSchema = z.object({
395
+ kind: z.literal("environment-global-file"),
396
+ owner: z.object({
397
+ kind: z.literal("runtime-environment"),
398
+ dataScope: z.object({
399
+ path: z.string(),
400
+ source: z.enum([
401
+ "xdg-data-home",
402
+ "local-app-data",
403
+ "user-home-default"
404
+ ]),
405
+ environmentVariable: z.enum(["XDG_DATA_HOME", "LOCALAPPDATA"]).nullable()
406
+ })
407
+ }),
408
+ file: z.object({
409
+ path: z.string().nullable(),
410
+ format: z.literal("json"),
411
+ exists: z.boolean(),
412
+ content: z.string().nullable()
413
+ })
414
+ });
415
+ /** Browser-safe lifecycle Pull schema for the file-native config owner. */
416
+ const EnvironmentGlobalFileProjectionStateSchema = createCliProjectionStateSchema(EnvironmentGlobalFileProjectionDataSchema);
417
+ /** Browser-safe lifecycle Pull schema for the runtime-environment config/profile projection. */
418
+ const EnvironmentGlobalProjectionStateSchema = createCliProjectionStateSchema(EnvironmentGlobalProjectionDataSchema);
419
+
420
+ //#endregion
421
+ export { TemplateContentMapSchema as C, isGlobPattern as E, SchemaResolutionSchema as S, TemplatesSchema as T, OpsxConfigBundleSchema as _, PlanningCliProjectionDataSchema as a, SchemaDetailSchema as b, ApplyInstructionsContextFilesSchema as c, ApplyTaskSchema as d, ArtifactInstructionsSchema as f, OpsxCliEvidenceSchema as g, DependencyInfoSchema as h, EnvironmentGlobalProjectionStateSchema as i, ApplyInstructionsProjectionSchema as l, ChangeStatusSchema as m, EnvironmentGlobalFileProjectionStateSchema as n, PlanningCliProjectionSelectorSchema as o, ArtifactStatusSchema as p, EnvironmentGlobalProjectionDataSchema as r, PlanningCliProjectionStateSchema as s, EnvironmentGlobalFileProjectionDataSchema as t, ApplyInstructionsSchema as u, OpsxStatusEvidenceSchema as v, TemplateContentSchema as w, SchemaInfoSchema as x, SchemaArtifactSchema as y };
@@ -0,0 +1,25 @@
1
+ import "./command-result-fkH3Ekdz.mjs";
2
+ import "./document-translation-D50BnvVh.mjs";
3
+ import "./sounds-qhRgCy0F.mjs";
4
+ import "./notifications-CgJlLgLO.mjs";
5
+ import { u as CliProjectionNoticeSchema } from "./cli-projection-DxnVGm2B.mjs";
6
+ import "./schemas-DS-JqAJ2.mjs";
7
+ import "./opsx-types-BJ8AjhrS.mjs";
8
+ import "./opsx-entity-D7kDQsze.mjs";
9
+ import { Cr as PlanningCliProjectionStateSchema, Sr as PlanningCliProjectionState, _r as EnvironmentGlobalProjectionStateSchema, br as PlanningCliProjectionSelector, dr as EnvironmentGlobalFileProjectionDataSchema, fr as EnvironmentGlobalFileProjectionState, gr as EnvironmentGlobalProjectionState, hr as EnvironmentGlobalProjectionDataSchema, mr as EnvironmentGlobalProjectionData, pr as EnvironmentGlobalFileProjectionStateSchema, ur as EnvironmentGlobalFileProjectionData, vr as PlanningCliProjectionData, xr as PlanningCliProjectionSelectorSchema, yr as PlanningCliProjectionDataSchema } from "./dashboard-summary-transport-CQ4is5_e.mjs";
10
+ import "./markdown-facts-CCw3QdbM.mjs";
11
+ import "./markdown-reading-LUdqfbxH.mjs";
12
+ import "./openspec-annotations-C58Aoi-V.mjs";
13
+ import "./openspec-projection-RohNZI4p.mjs";
14
+ import "./translator-NKv1wo3o.mjs";
15
+ import "./terminal-audio-tXDm_EDe.mjs";
16
+ import "./local-download-profiles-BL_rtlVM.mjs";
17
+ import "./translation-language-pair-C18GPATW.mjs";
18
+ import "./opsx-workflows-BvnJqjfL.mjs";
19
+ import "./opsx-display-path-RXS5JTbV.mjs";
20
+ import "./store-mutation-protocol-5tfs-RmD.mjs";
21
+ import "./store-types-b554wAQJ.mjs";
22
+ import "./terminal-invocation-BOvxThym.mjs";
23
+ import "./terminal-theme-m3MSGJ7U.mjs";
24
+ import "./opsx-schema-detail-BxDXEwDY.mjs";
25
+ export { CliProjectionNoticeSchema, EnvironmentGlobalFileProjectionData, EnvironmentGlobalFileProjectionDataSchema, EnvironmentGlobalFileProjectionState, EnvironmentGlobalFileProjectionStateSchema, EnvironmentGlobalProjectionData, EnvironmentGlobalProjectionDataSchema, EnvironmentGlobalProjectionState, EnvironmentGlobalProjectionStateSchema, PlanningCliProjectionData, PlanningCliProjectionDataSchema, PlanningCliProjectionSelector, PlanningCliProjectionSelectorSchema, PlanningCliProjectionState, PlanningCliProjectionStateSchema };
@@ -0,0 +1,9 @@
1
+ import "./schemas-BFroDdOC.mjs";
2
+ import "./opsx-entity-Cn_Zu1J3.mjs";
3
+ import "./task-progress-B_IWVXjA.mjs";
4
+ import "./common-D8YUK9dA.mjs";
5
+ import "./spec-catalog-ZGuiZ4CE.mjs";
6
+ import { o as CliProjectionNoticeSchema } from "./cli-projection-vO3-FJg5.mjs";
7
+ import { a as PlanningCliProjectionDataSchema, i as EnvironmentGlobalProjectionStateSchema, n as EnvironmentGlobalFileProjectionStateSchema, o as PlanningCliProjectionSelectorSchema, r as EnvironmentGlobalProjectionDataSchema, s as PlanningCliProjectionStateSchema, t as EnvironmentGlobalFileProjectionDataSchema } from "./planning-cli-projection-DIRxeq2H.mjs";
8
+
9
+ export { CliProjectionNoticeSchema, EnvironmentGlobalFileProjectionDataSchema, EnvironmentGlobalFileProjectionStateSchema, EnvironmentGlobalProjectionDataSchema, EnvironmentGlobalProjectionStateSchema, PlanningCliProjectionDataSchema, PlanningCliProjectionSelectorSchema, PlanningCliProjectionStateSchema };