@fission-ai/openspec 0.17.0 → 0.17.2

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.
@@ -1,4 +1,3 @@
1
- import { confirm } from '@inquirer/prompts';
2
1
  import { spawn } from 'node:child_process';
3
2
  import * as fs from 'node:fs';
4
3
  import { getGlobalConfigPath, getGlobalConfig, saveGlobalConfig, } from '../core/global-config.js';
@@ -123,6 +122,7 @@ export function registerConfigCommand(program) {
123
122
  return;
124
123
  }
125
124
  if (!options.yes) {
125
+ const { confirm } = await import('@inquirer/prompts');
126
126
  const confirmed = await confirm({
127
127
  message: 'Reset all configuration to defaults?',
128
128
  default: false,
@@ -6,6 +6,7 @@ interface ExecuteOptions {
6
6
  strict?: boolean;
7
7
  json?: boolean;
8
8
  noInteractive?: boolean;
9
+ interactive?: boolean;
9
10
  concurrency?: string;
10
11
  }
11
12
  export declare class ValidateCommand {
@@ -1,7 +1,7 @@
1
1
  import ora from 'ora';
2
2
  import path from 'path';
3
3
  import { Validator } from '../core/validation/validator.js';
4
- import { isInteractive } from '../utils/interactive.js';
4
+ import { isInteractive, resolveNoInteractive } from '../utils/interactive.js';
5
5
  import { getActiveChangeIds, getSpecIds } from '../utils/item-discovery.js';
6
6
  import { nearestMatches } from '../utils/match.js';
7
7
  export class ValidateCommand {
@@ -12,7 +12,7 @@ export class ValidateCommand {
12
12
  await this.runBulkValidation({
13
13
  changes: !!options.all || !!options.changes,
14
14
  specs: !!options.all || !!options.specs,
15
- }, { strict: !!options.strict, json: !!options.json, concurrency: options.concurrency });
15
+ }, { strict: !!options.strict, json: !!options.json, concurrency: options.concurrency, noInteractive: resolveNoInteractive(options) });
16
16
  return;
17
17
  }
18
18
  // No item and no flags
@@ -150,7 +150,7 @@ export class ValidateCommand {
150
150
  bullets.forEach(b => console.error(` ${b}`));
151
151
  }
152
152
  async runBulkValidation(scope, opts) {
153
- const spinner = !opts.json ? ora('Validating...').start() : undefined;
153
+ const spinner = !opts.json && !opts.noInteractive ? ora('Validating...').start() : undefined;
154
154
  const [changeIds, specIds] = await Promise.all([
155
155
  scope.changes ? getActiveChangeIds() : Promise.resolve([]),
156
156
  scope.specs ? getSpecIds() : Promise.resolve([]),
@@ -1,4 +1,4 @@
1
- type InteractiveOptions = {
1
+ export type InteractiveOptions = {
2
2
  /**
3
3
  * Explicit "disable prompts" flag passed by internal callers.
4
4
  */
@@ -8,6 +8,11 @@ type InteractiveOptions = {
8
8
  */
9
9
  interactive?: boolean;
10
10
  };
11
+ /**
12
+ * Resolves whether non-interactive mode is requested.
13
+ * Handles both explicit `noInteractive: true` and Commander.js style `interactive: false`.
14
+ * Use this helper instead of manually checking options.noInteractive to avoid bugs.
15
+ */
16
+ export declare function resolveNoInteractive(value?: boolean | InteractiveOptions): boolean;
11
17
  export declare function isInteractive(value?: boolean | InteractiveOptions): boolean;
12
- export {};
13
18
  //# sourceMappingURL=interactive.d.ts.map
@@ -1,4 +1,9 @@
1
- function resolveNoInteractive(value) {
1
+ /**
2
+ * Resolves whether non-interactive mode is requested.
3
+ * Handles both explicit `noInteractive: true` and Commander.js style `interactive: false`.
4
+ * Use this helper instead of manually checking options.noInteractive to avoid bugs.
5
+ */
6
+ export function resolveNoInteractive(value) {
2
7
  if (typeof value === 'boolean')
3
8
  return value;
4
9
  return value?.noInteractive === true || value?.interactive === false;
@@ -8,6 +13,9 @@ export function isInteractive(value) {
8
13
  return false;
9
14
  if (process.env.OPEN_SPEC_INTERACTIVE === '0')
10
15
  return false;
16
+ // Respect the standard CI environment variable (set by GitHub Actions, GitLab CI, Travis, etc.)
17
+ if ('CI' in process.env)
18
+ return false;
11
19
  return !!process.stdin.isTTY;
12
20
  }
13
21
  //# sourceMappingURL=interactive.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fission-ai/openspec",
3
- "version": "0.17.0",
3
+ "version": "0.17.2",
4
4
  "description": "AI-native system for spec-driven development",
5
5
  "keywords": [
6
6
  "openspec",
@@ -44,7 +44,9 @@
44
44
  "@changesets/cli": "^2.27.7",
45
45
  "@types/node": "^24.2.0",
46
46
  "@vitest/ui": "^3.2.4",
47
+ "eslint": "^9.39.2",
47
48
  "typescript": "^5.9.3",
49
+ "typescript-eslint": "^8.50.1",
48
50
  "vitest": "^3.2.4"
49
51
  },
50
52
  "dependencies": {
@@ -56,6 +58,7 @@
56
58
  "zod": "^4.0.17"
57
59
  },
58
60
  "scripts": {
61
+ "lint": "eslint src/",
59
62
  "build": "node build.js",
60
63
  "dev": "tsc --watch",
61
64
  "dev:cli": "pnpm build && node bin/openspec.js",