@fission-ai/openspec 1.13.2 → 1.14.1

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 (99) hide show
  1. package/dist/cli/commands/config.d.ts +8 -0
  2. package/dist/cli/commands/config.js +88 -0
  3. package/dist/cli/commands/context.d.ts +3 -0
  4. package/dist/cli/commands/context.js +20 -0
  5. package/dist/cli/commands/doctor.d.ts +3 -0
  6. package/dist/cli/commands/doctor.js +18 -0
  7. package/dist/cli/commands/schema.d.ts +6 -0
  8. package/dist/cli/commands/schema.js +57 -0
  9. package/dist/cli/commands/spec.d.ts +3 -0
  10. package/dist/cli/commands/spec.js +42 -0
  11. package/dist/cli/commands/store.d.ts +3 -0
  12. package/dist/cli/commands/store.js +130 -0
  13. package/dist/cli/commands/workset.d.ts +3 -0
  14. package/dist/cli/commands/workset.js +96 -0
  15. package/dist/cli/index.js +106 -43
  16. package/dist/commands/config.d.ts +16 -7
  17. package/dist/commands/config.js +342 -395
  18. package/dist/commands/context.d.ts +8 -2
  19. package/dist/commands/context.js +22 -37
  20. package/dist/commands/doctor.d.ts +6 -7
  21. package/dist/commands/doctor.js +14 -27
  22. package/dist/commands/schema.d.ts +19 -5
  23. package/dist/commands/schema.js +662 -702
  24. package/dist/commands/spec.d.ts +13 -4
  25. package/dist/commands/spec.js +92 -120
  26. package/dist/commands/store.d.ts +27 -2
  27. package/dist/commands/store.js +1 -120
  28. package/dist/commands/workflow/default-schema.d.ts +2 -0
  29. package/dist/commands/workflow/default-schema.js +4 -0
  30. package/dist/commands/workflow/instructions.js +32 -12
  31. package/dist/commands/workflow/shared.d.ts +3 -1
  32. package/dist/commands/workflow/shared.js +1 -1
  33. package/dist/commands/workflow/status.js +15 -2
  34. package/dist/commands/workset.d.ts +22 -2
  35. package/dist/commands/workset.js +1 -88
  36. package/dist/core/archive.js +28 -7
  37. package/dist/core/artifact-graph/instruction-loader.d.ts +7 -0
  38. package/dist/core/artifact-graph/instruction-loader.js +18 -1
  39. package/dist/core/change-metadata/schema.d.ts +3 -0
  40. package/dist/core/change-metadata/schema.js +10 -0
  41. package/dist/core/change-status-policy.d.ts +8 -0
  42. package/dist/core/change-status-policy.js +33 -2
  43. package/dist/core/command-generation/adapters/atomcode.d.ts +24 -0
  44. package/dist/core/command-generation/adapters/atomcode.js +46 -0
  45. package/dist/core/command-generation/adapters/codestudio.d.ts +13 -0
  46. package/dist/core/command-generation/adapters/codestudio.js +27 -0
  47. package/dist/core/command-generation/adapters/easycode.d.ts +17 -0
  48. package/dist/core/command-generation/adapters/easycode.js +28 -0
  49. package/dist/core/command-generation/adapters/gemini.js +1 -35
  50. package/dist/core/command-generation/adapters/gigacode.d.ts +17 -0
  51. package/dist/core/command-generation/adapters/gigacode.js +31 -0
  52. package/dist/core/command-generation/adapters/index.d.ts +4 -0
  53. package/dist/core/command-generation/adapters/index.js +4 -0
  54. package/dist/core/command-generation/registry.js +8 -0
  55. package/dist/core/command-generation/toml.d.ts +19 -0
  56. package/dist/core/command-generation/toml.js +39 -0
  57. package/dist/core/command-surface.js +1 -1
  58. package/dist/core/completion-tip.js +3 -1
  59. package/dist/core/completions/command-registry.js +19 -0
  60. package/dist/core/completions/installers/zsh-installer.js +4 -2
  61. package/dist/core/config-prompts.js +6 -6
  62. package/dist/core/config-schema.d.ts +1 -1
  63. package/dist/core/config.js +11 -1
  64. package/dist/core/init.js +35 -11
  65. package/dist/core/legacy-cleanup.js +11 -7
  66. package/dist/core/list.d.ts +2 -0
  67. package/dist/core/list.js +49 -23
  68. package/dist/core/parsers/markdown-parser.js +5 -0
  69. package/dist/core/parsers/requirement-blocks.d.ts +6 -0
  70. package/dist/core/parsers/requirement-blocks.js +9 -2
  71. package/dist/core/project-config.js +45 -1
  72. package/dist/core/references.js +3 -1
  73. package/dist/core/root-selection.d.ts +6 -0
  74. package/dist/core/root-selection.js +16 -0
  75. package/dist/core/schemas/base.schema.d.ts +3 -0
  76. package/dist/core/schemas/base.schema.js +6 -0
  77. package/dist/core/schemas/change.schema.d.ts +8 -0
  78. package/dist/core/schemas/spec.schema.d.ts +2 -0
  79. package/dist/core/templates/workflows/apply-change.js +9 -5
  80. package/dist/core/templates/workflows/archive-change.js +26 -4
  81. package/dist/core/templates/workflows/bulk-archive-change.js +6 -2
  82. package/dist/core/templates/workflows/continue-change.js +17 -0
  83. package/dist/core/templates/workflows/verify-change.js +12 -12
  84. package/dist/core/validation/constants.d.ts +1 -1
  85. package/dist/core/validation/constants.js +1 -1
  86. package/dist/core/validation/validator.js +21 -2
  87. package/dist/core/version-check.d.ts +23 -1
  88. package/dist/core/version-check.js +112 -26
  89. package/dist/core/view.d.ts +2 -0
  90. package/dist/core/view.js +36 -2
  91. package/dist/utils/change-metadata.d.ts +20 -1
  92. package/dist/utils/change-metadata.js +57 -1
  93. package/dist/utils/command-references.d.ts +1 -1
  94. package/dist/utils/command-references.js +2 -2
  95. package/dist/utils/index.d.ts +1 -1
  96. package/dist/utils/index.js +1 -1
  97. package/package.json +1 -1
  98. package/schemas/spec-driven/schema.yaml +29 -4
  99. package/schemas/spec-driven/templates/proposal.md +6 -3
@@ -1,3 +1,9 @@
1
- import { Command } from 'commander';
2
- export declare function registerContextCommand(program: Command): void;
1
+ export interface ContextOptions {
2
+ store?: string;
3
+ storePath?: string;
4
+ json?: boolean;
5
+ codeWorkspace?: string;
6
+ force?: boolean;
7
+ }
8
+ export declare function contextCommand(options: ContextOptions): Promise<void>;
3
9
  //# sourceMappingURL=context.d.ts.map
@@ -7,13 +7,10 @@
7
7
  */
8
8
  import * as fs from 'node:fs';
9
9
  import * as path from 'node:path';
10
- import { Option } from 'commander';
11
10
  import { resolveRootForCommand, } from '../core/root-selection.js';
12
11
  import { inspectRelationships } from '../core/relationship-health.js';
13
12
  import { assembleWorkingSet, buildCodeWorkspaceJson, isAvailableMember, } from '../core/working-set.js';
14
13
  import { StoreError } from '../core/store/errors.js';
15
- import { COMMAND_REGISTRY } from '../core/completions/command-registry.js';
16
- import { COMMON_FLAGS } from '../core/completions/shared-flags.js';
17
14
  import { emitFailure, printJson } from './shared-output.js';
18
15
  import { gatherRelationshipData } from './shared-gather.js';
19
16
  const FAILURE_PAYLOAD = { root: null, members: [] };
@@ -114,42 +111,30 @@ function writeCodeWorkspace(workingSet, outputPath, force) {
114
111
  // stderr keeps JSON stdout pure; for humans it reads inline.
115
112
  console.error(summary);
116
113
  }
117
- export function registerContextCommand(program) {
118
- const description = COMMAND_REGISTRY.find((entry) => entry.name === 'context')?.description ??
119
- 'Print the working context for the resolved OpenSpec root';
120
- program
121
- .command('context')
122
- .description(description)
123
- .option('--store <id>', COMMON_FLAGS.store.description)
124
- .addOption(new Option('--store-path <path>', 'Removed; register the store and use --store').hideHelp())
125
- .option('--json', 'Output the agent brief as JSON')
126
- .option('--code-workspace <path>', 'Also write a VS Code workspace file for the set')
127
- .option('--force', 'Overwrite an existing --code-workspace file')
128
- .action(async (options) => {
129
- try {
130
- const root = await resolveRootForCommand({ store: options.store, storePath: options.storePath }, { json: options.json, failurePayload: FAILURE_PAYLOAD, allowImplicitRoot: false });
131
- if (!root) {
132
- return;
133
- }
134
- const { workingSet, declaredReferenceCount } = await gatherWorkingSet(root);
135
- if (options.json) {
136
- // The write runs FIRST: a write failure must leave stdout
137
- // holding exactly one JSON document (the failure payload).
138
- if (options.codeWorkspace) {
139
- writeCodeWorkspace(workingSet, options.codeWorkspace, options.force === true);
140
- }
141
- printJson(workingSet);
142
- }
143
- else {
144
- printHumanWorkingSet(workingSet, declaredReferenceCount);
145
- if (options.codeWorkspace) {
146
- writeCodeWorkspace(workingSet, options.codeWorkspace, options.force === true);
147
- }
114
+ export async function contextCommand(options) {
115
+ try {
116
+ const root = await resolveRootForCommand({ store: options.store, storePath: options.storePath }, { json: options.json, failurePayload: FAILURE_PAYLOAD, allowImplicitRoot: false });
117
+ if (!root) {
118
+ return;
119
+ }
120
+ const { workingSet, declaredReferenceCount } = await gatherWorkingSet(root);
121
+ if (options.json) {
122
+ // The write runs FIRST: a write failure must leave stdout
123
+ // holding exactly one JSON document (the failure payload).
124
+ if (options.codeWorkspace) {
125
+ writeCodeWorkspace(workingSet, options.codeWorkspace, options.force === true);
148
126
  }
127
+ printJson(workingSet);
149
128
  }
150
- catch (error) {
151
- emitFailure(options.json, FAILURE_PAYLOAD, error, 'context_failed');
129
+ else {
130
+ printHumanWorkingSet(workingSet, declaredReferenceCount);
131
+ if (options.codeWorkspace) {
132
+ writeCodeWorkspace(workingSet, options.codeWorkspace, options.force === true);
133
+ }
152
134
  }
153
- });
135
+ }
136
+ catch (error) {
137
+ emitFailure(options.json, FAILURE_PAYLOAD, error, 'context_failed');
138
+ }
154
139
  }
155
140
  //# sourceMappingURL=context.js.map
@@ -1,8 +1,7 @@
1
- /**
2
- * `openspec doctor` (slice 3.6): the root-scoped relationship-health
3
- * report. Read-only — it answers "are the roots this work relates to
4
- * available on this machine?" and never clones, syncs, or repairs.
5
- */
6
- import { Command } from 'commander';
7
- export declare function registerDoctorCommand(program: Command): void;
1
+ export interface DoctorOptions {
2
+ store?: string;
3
+ storePath?: string;
4
+ json?: boolean;
5
+ }
6
+ export declare function doctorCommand(options: DoctorOptions): Promise<void>;
8
7
  //# sourceMappingURL=doctor.d.ts.map
@@ -3,7 +3,6 @@
3
3
  * report. Read-only — it answers "are the roots this work relates to
4
4
  * available on this machine?" and never clones, syncs, or repairs.
5
5
  */
6
- import { Option } from 'commander';
7
6
  import { resolveRootForCommand, } from '../core/root-selection.js';
8
7
  import { readOptionalStoreMetadataState } from '../core/store/foundation.js';
9
8
  import { gitOriginUrl, gitTrackingDrift, isGitRepositoryAtRoot } from '../core/store/git.js';
@@ -11,8 +10,6 @@ import { classifyOpenSpecDir, readProjectConfig, resolveConfigFilePath, } from '
11
10
  import { findRepoPlanningRootSync } from '../core/planning-home.js';
12
11
  import { gatherRelationshipData } from './shared-gather.js';
13
12
  import { inspectRelationships, } from '../core/relationship-health.js';
14
- import { COMMAND_REGISTRY } from '../core/completions/command-registry.js';
15
- import { COMMON_FLAGS } from '../core/completions/shared-flags.js';
16
13
  import { emitFailure, printJson } from './shared-output.js';
17
14
  import * as path from 'node:path';
18
15
  const FAILURE_PAYLOAD = { root: null, store: null, references: [] };
@@ -138,31 +135,21 @@ function printHumanHealth(health, declaredReferenceCount) {
138
135
  }
139
136
  }
140
137
  }
141
- export function registerDoctorCommand(program) {
142
- const description = COMMAND_REGISTRY.find((entry) => entry.name === 'doctor')?.description ??
143
- 'Report relationship health for the resolved OpenSpec root';
144
- program
145
- .command('doctor')
146
- .description(description)
147
- .option('--store <id>', COMMON_FLAGS.store.description)
148
- .addOption(new Option('--store-path <path>', 'Removed; register the store and use --store').hideHelp())
149
- .option('--json', 'Output as JSON')
150
- .action(async (options) => {
151
- try {
152
- const root = await resolveRootForCommand({ store: options.store, storePath: options.storePath }, { json: options.json, failurePayload: FAILURE_PAYLOAD, allowImplicitRoot: false });
153
- if (!root) {
154
- return;
155
- }
156
- const { health, declaredReferenceCount } = await gatherHealth(root);
157
- if (options.json) {
158
- printJson(health);
159
- return;
160
- }
161
- printHumanHealth(health, declaredReferenceCount);
138
+ export async function doctorCommand(options) {
139
+ try {
140
+ const root = await resolveRootForCommand({ store: options.store, storePath: options.storePath }, { json: options.json, failurePayload: FAILURE_PAYLOAD, allowImplicitRoot: false });
141
+ if (!root) {
142
+ return;
162
143
  }
163
- catch (error) {
164
- emitFailure(options.json, FAILURE_PAYLOAD, error, 'doctor_failed');
144
+ const { health, declaredReferenceCount } = await gatherHealth(root);
145
+ if (options.json) {
146
+ printJson(health);
147
+ return;
165
148
  }
166
- });
149
+ printHumanHealth(health, declaredReferenceCount);
150
+ }
151
+ catch (error) {
152
+ emitFailure(options.json, FAILURE_PAYLOAD, error, 'doctor_failed');
153
+ }
167
154
  }
168
155
  //# sourceMappingURL=doctor.js.map
@@ -1,11 +1,25 @@
1
- import { Command } from 'commander';
2
1
  import * as fs from 'node:fs';
3
2
  /** @internal File-operation seam for transactional failure tests. */
4
3
  export declare const schemaInitFileOperations: {
5
4
  renameSync: typeof fs.renameSync;
6
5
  };
7
- /**
8
- * Register the schema command and all its subcommands.
9
- */
10
- export declare function registerSchemaCommand(program: Command): void;
6
+ export declare function schemaWhichCommand(name?: string, options?: {
7
+ json?: boolean;
8
+ all?: boolean;
9
+ }): Promise<void>;
10
+ export declare function schemaValidateCommand(name?: string, options?: {
11
+ json?: boolean;
12
+ verbose?: boolean;
13
+ }): Promise<void>;
14
+ export declare function schemaForkCommand(source: string, name?: string, options?: {
15
+ json?: boolean;
16
+ force?: boolean;
17
+ }): Promise<void>;
18
+ export declare function schemaInitCommand(name: string, options?: {
19
+ json?: boolean;
20
+ description?: string;
21
+ artifacts?: string;
22
+ default?: boolean;
23
+ force?: boolean;
24
+ }): Promise<void>;
11
25
  //# sourceMappingURL=schema.d.ts.map