@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.
- package/dist/cli/commands/config.d.ts +8 -0
- package/dist/cli/commands/config.js +88 -0
- package/dist/cli/commands/context.d.ts +3 -0
- package/dist/cli/commands/context.js +20 -0
- package/dist/cli/commands/doctor.d.ts +3 -0
- package/dist/cli/commands/doctor.js +18 -0
- package/dist/cli/commands/schema.d.ts +6 -0
- package/dist/cli/commands/schema.js +57 -0
- package/dist/cli/commands/spec.d.ts +3 -0
- package/dist/cli/commands/spec.js +42 -0
- package/dist/cli/commands/store.d.ts +3 -0
- package/dist/cli/commands/store.js +130 -0
- package/dist/cli/commands/workset.d.ts +3 -0
- package/dist/cli/commands/workset.js +96 -0
- package/dist/cli/index.js +106 -43
- package/dist/commands/config.d.ts +16 -7
- package/dist/commands/config.js +342 -395
- package/dist/commands/context.d.ts +8 -2
- package/dist/commands/context.js +22 -37
- package/dist/commands/doctor.d.ts +6 -7
- package/dist/commands/doctor.js +14 -27
- package/dist/commands/schema.d.ts +19 -5
- package/dist/commands/schema.js +662 -702
- package/dist/commands/spec.d.ts +13 -4
- package/dist/commands/spec.js +92 -120
- package/dist/commands/store.d.ts +27 -2
- package/dist/commands/store.js +1 -120
- package/dist/commands/workflow/default-schema.d.ts +2 -0
- package/dist/commands/workflow/default-schema.js +4 -0
- package/dist/commands/workflow/instructions.js +32 -12
- package/dist/commands/workflow/shared.d.ts +3 -1
- package/dist/commands/workflow/shared.js +1 -1
- package/dist/commands/workflow/status.js +15 -2
- package/dist/commands/workset.d.ts +22 -2
- package/dist/commands/workset.js +1 -88
- package/dist/core/archive.js +28 -7
- package/dist/core/artifact-graph/instruction-loader.d.ts +7 -0
- package/dist/core/artifact-graph/instruction-loader.js +18 -1
- package/dist/core/change-metadata/schema.d.ts +3 -0
- package/dist/core/change-metadata/schema.js +10 -0
- package/dist/core/change-status-policy.d.ts +8 -0
- package/dist/core/change-status-policy.js +33 -2
- package/dist/core/command-generation/adapters/atomcode.d.ts +24 -0
- package/dist/core/command-generation/adapters/atomcode.js +46 -0
- package/dist/core/command-generation/adapters/codestudio.d.ts +13 -0
- package/dist/core/command-generation/adapters/codestudio.js +27 -0
- package/dist/core/command-generation/adapters/easycode.d.ts +17 -0
- package/dist/core/command-generation/adapters/easycode.js +28 -0
- package/dist/core/command-generation/adapters/gemini.js +1 -35
- package/dist/core/command-generation/adapters/gigacode.d.ts +17 -0
- package/dist/core/command-generation/adapters/gigacode.js +31 -0
- package/dist/core/command-generation/adapters/index.d.ts +4 -0
- package/dist/core/command-generation/adapters/index.js +4 -0
- package/dist/core/command-generation/registry.js +8 -0
- package/dist/core/command-generation/toml.d.ts +19 -0
- package/dist/core/command-generation/toml.js +39 -0
- package/dist/core/command-surface.js +1 -1
- package/dist/core/completion-tip.js +3 -1
- package/dist/core/completions/command-registry.js +19 -0
- package/dist/core/completions/installers/zsh-installer.js +4 -2
- package/dist/core/config-prompts.js +6 -6
- package/dist/core/config-schema.d.ts +1 -1
- package/dist/core/config.js +11 -1
- package/dist/core/init.js +35 -11
- package/dist/core/legacy-cleanup.js +11 -7
- package/dist/core/list.d.ts +2 -0
- package/dist/core/list.js +49 -23
- package/dist/core/parsers/markdown-parser.js +5 -0
- package/dist/core/parsers/requirement-blocks.d.ts +6 -0
- package/dist/core/parsers/requirement-blocks.js +9 -2
- package/dist/core/project-config.js +45 -1
- package/dist/core/references.js +3 -1
- package/dist/core/root-selection.d.ts +6 -0
- package/dist/core/root-selection.js +16 -0
- package/dist/core/schemas/base.schema.d.ts +3 -0
- package/dist/core/schemas/base.schema.js +6 -0
- package/dist/core/schemas/change.schema.d.ts +8 -0
- package/dist/core/schemas/spec.schema.d.ts +2 -0
- package/dist/core/templates/workflows/apply-change.js +9 -5
- package/dist/core/templates/workflows/archive-change.js +26 -4
- package/dist/core/templates/workflows/bulk-archive-change.js +6 -2
- package/dist/core/templates/workflows/continue-change.js +17 -0
- package/dist/core/templates/workflows/verify-change.js +12 -12
- package/dist/core/validation/constants.d.ts +1 -1
- package/dist/core/validation/constants.js +1 -1
- package/dist/core/validation/validator.js +21 -2
- package/dist/core/version-check.d.ts +23 -1
- package/dist/core/version-check.js +112 -26
- package/dist/core/view.d.ts +2 -0
- package/dist/core/view.js +36 -2
- package/dist/utils/change-metadata.d.ts +20 -1
- package/dist/utils/change-metadata.js +57 -1
- package/dist/utils/command-references.d.ts +1 -1
- package/dist/utils/command-references.js +2 -2
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
- package/schemas/spec-driven/schema.yaml +29 -4
- package/schemas/spec-driven/templates/proposal.md +6 -3
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
package/dist/commands/context.js
CHANGED
|
@@ -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
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
-
|
|
151
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
package/dist/commands/doctor.js
CHANGED
|
@@ -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
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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
|
-
|
|
164
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|