@fission-ai/openspec 1.1.1 → 1.3.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.
- package/README.md +8 -9
- package/dist/cli/index.js +2 -0
- package/dist/commands/config.d.ts +28 -0
- package/dist/commands/config.js +359 -5
- package/dist/commands/workflow/shared.d.ts +5 -0
- package/dist/commands/workflow/shared.js +21 -16
- package/dist/commands/workflow/status.js +18 -1
- package/dist/core/available-tools.d.ts +17 -0
- package/dist/core/available-tools.js +43 -0
- package/dist/core/command-generation/adapters/bob.d.ts +14 -0
- package/dist/core/command-generation/adapters/bob.js +45 -0
- package/dist/core/command-generation/adapters/index.d.ts +5 -0
- package/dist/core/command-generation/adapters/index.js +5 -0
- package/dist/core/command-generation/adapters/junie.d.ts +13 -0
- package/dist/core/command-generation/adapters/junie.js +26 -0
- package/dist/core/command-generation/adapters/kiro.d.ts +13 -0
- package/dist/core/command-generation/adapters/kiro.js +26 -0
- package/dist/core/command-generation/adapters/lingma.d.ts +13 -0
- package/dist/core/command-generation/adapters/lingma.js +30 -0
- package/dist/core/command-generation/adapters/opencode.d.ts +1 -1
- package/dist/core/command-generation/adapters/opencode.js +2 -2
- package/dist/core/command-generation/adapters/pi.d.ts +18 -0
- package/dist/core/command-generation/adapters/pi.js +55 -0
- package/dist/core/command-generation/registry.js +10 -0
- package/dist/core/completions/command-registry.js +5 -0
- package/dist/core/completions/installers/powershell-installer.d.ts +14 -0
- package/dist/core/completions/installers/powershell-installer.js +69 -9
- package/dist/core/config-schema.d.ts +10 -0
- package/dist/core/config-schema.js +14 -1
- package/dist/core/config.d.ts +1 -0
- package/dist/core/config.js +7 -1
- package/dist/core/global-config.d.ts +5 -0
- package/dist/core/global-config.js +12 -2
- package/dist/core/init.d.ts +5 -0
- package/dist/core/init.js +209 -52
- package/dist/core/legacy-cleanup.d.ts +1 -1
- package/dist/core/legacy-cleanup.js +23 -10
- package/dist/core/migration.d.ts +23 -0
- package/dist/core/migration.js +108 -0
- package/dist/core/profile-sync-drift.d.ts +38 -0
- package/dist/core/profile-sync-drift.js +200 -0
- package/dist/core/profiles.d.ts +26 -0
- package/dist/core/profiles.js +40 -0
- package/dist/core/shared/index.d.ts +1 -1
- package/dist/core/shared/index.js +1 -1
- package/dist/core/shared/skill-generation.d.ts +14 -7
- package/dist/core/shared/skill-generation.js +36 -20
- package/dist/core/shared/tool-detection.d.ts +8 -3
- package/dist/core/shared/tool-detection.js +18 -0
- package/dist/core/templates/index.d.ts +1 -1
- package/dist/core/templates/index.js +2 -2
- package/dist/core/templates/skill-templates.d.ts +15 -118
- package/dist/core/templates/skill-templates.js +14 -3424
- package/dist/core/templates/types.d.ts +19 -0
- package/dist/core/templates/types.js +5 -0
- package/dist/core/templates/workflows/apply-change.d.ts +10 -0
- package/dist/core/templates/workflows/apply-change.js +308 -0
- package/dist/core/templates/workflows/archive-change.d.ts +10 -0
- package/dist/core/templates/workflows/archive-change.js +271 -0
- package/dist/core/templates/workflows/bulk-archive-change.d.ts +10 -0
- package/dist/core/templates/workflows/bulk-archive-change.js +488 -0
- package/dist/core/templates/workflows/continue-change.d.ts +10 -0
- package/dist/core/templates/workflows/continue-change.js +232 -0
- package/dist/core/templates/workflows/explore.d.ts +10 -0
- package/dist/core/templates/workflows/explore.js +461 -0
- package/dist/core/templates/workflows/feedback.d.ts +9 -0
- package/dist/core/templates/workflows/feedback.js +108 -0
- package/dist/core/templates/workflows/ff-change.d.ts +10 -0
- package/dist/core/templates/workflows/ff-change.js +198 -0
- package/dist/core/templates/workflows/new-change.d.ts +10 -0
- package/dist/core/templates/workflows/new-change.js +143 -0
- package/dist/core/templates/workflows/onboard.d.ts +10 -0
- package/dist/core/templates/workflows/onboard.js +565 -0
- package/dist/core/templates/workflows/propose.d.ts +10 -0
- package/dist/core/templates/workflows/propose.js +216 -0
- package/dist/core/templates/workflows/sync-specs.d.ts +10 -0
- package/dist/core/templates/workflows/sync-specs.js +272 -0
- package/dist/core/templates/workflows/verify-change.d.ts +10 -0
- package/dist/core/templates/workflows/verify-change.js +332 -0
- package/dist/core/update.d.ts +36 -1
- package/dist/core/update.js +291 -65
- package/dist/prompts/searchable-multi-select.d.ts +3 -2
- package/dist/prompts/searchable-multi-select.js +22 -12
- package/package.json +1 -1
- package/scripts/postinstall.js +8 -72
package/scripts/postinstall.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Postinstall script
|
|
4
|
+
* Postinstall script that hints about shell completions
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Completion installation is opt-in: the user must run
|
|
7
|
+
* `openspec completion install` explicitly. This script only
|
|
8
|
+
* prints a one-line tip after npm install.
|
|
9
|
+
*
|
|
10
|
+
* The tip is suppressed when:
|
|
7
11
|
* - CI=true environment variable is set
|
|
8
12
|
* - OPENSPEC_NO_COMPLETIONS=1 environment variable is set
|
|
9
13
|
* - dist/ directory doesn't exist (dev setup scenario)
|
|
@@ -48,65 +52,6 @@ async function distExists() {
|
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
|
|
51
|
-
/**
|
|
52
|
-
* Detect the user's shell
|
|
53
|
-
*/
|
|
54
|
-
async function detectShell() {
|
|
55
|
-
try {
|
|
56
|
-
const { detectShell } = await import('../dist/utils/shell-detection.js');
|
|
57
|
-
const result = detectShell();
|
|
58
|
-
return result.shell;
|
|
59
|
-
} catch (error) {
|
|
60
|
-
// Fail silently if detection module doesn't exist
|
|
61
|
-
return undefined;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Install completions for the detected shell
|
|
67
|
-
*/
|
|
68
|
-
async function installCompletions(shell) {
|
|
69
|
-
try {
|
|
70
|
-
const { CompletionFactory } = await import('../dist/core/completions/factory.js');
|
|
71
|
-
const { COMMAND_REGISTRY } = await import('../dist/core/completions/command-registry.js');
|
|
72
|
-
|
|
73
|
-
// Check if shell is supported
|
|
74
|
-
if (!CompletionFactory.isSupported(shell)) {
|
|
75
|
-
console.log(`\nTip: Run 'openspec completion install' for shell completions`);
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// Generate completion script
|
|
80
|
-
const generator = CompletionFactory.createGenerator(shell);
|
|
81
|
-
const script = generator.generate(COMMAND_REGISTRY);
|
|
82
|
-
|
|
83
|
-
// Install completion script
|
|
84
|
-
const installer = CompletionFactory.createInstaller(shell);
|
|
85
|
-
const result = await installer.install(script);
|
|
86
|
-
|
|
87
|
-
if (result.success) {
|
|
88
|
-
// Show success message based on installation type
|
|
89
|
-
if (result.isOhMyZsh) {
|
|
90
|
-
console.log(`✓ Shell completions installed`);
|
|
91
|
-
console.log(` Restart shell: exec zsh`);
|
|
92
|
-
} else if (result.zshrcConfigured) {
|
|
93
|
-
console.log(`✓ Shell completions installed and configured`);
|
|
94
|
-
console.log(` Restart shell: exec zsh`);
|
|
95
|
-
} else {
|
|
96
|
-
console.log(`✓ Shell completions installed to ~/.zsh/completions/`);
|
|
97
|
-
console.log(` Add to ~/.zshrc: fpath=(~/.zsh/completions $fpath)`);
|
|
98
|
-
console.log(` Then: exec zsh`);
|
|
99
|
-
}
|
|
100
|
-
} else {
|
|
101
|
-
// Installation failed, show tip for manual install
|
|
102
|
-
console.log(`\nTip: Run 'openspec completion install' for shell completions`);
|
|
103
|
-
}
|
|
104
|
-
} catch (error) {
|
|
105
|
-
// Fail gracefully - show tip for manual install
|
|
106
|
-
console.log(`\nTip: Run 'openspec completion install' for shell completions`);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
55
|
/**
|
|
111
56
|
* Main function
|
|
112
57
|
*/
|
|
@@ -124,19 +69,10 @@ async function main() {
|
|
|
124
69
|
return;
|
|
125
70
|
}
|
|
126
71
|
|
|
127
|
-
//
|
|
128
|
-
|
|
129
|
-
if (!shell) {
|
|
130
|
-
console.log(`\nTip: Run 'openspec completion install' for shell completions`);
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// Install completions
|
|
135
|
-
await installCompletions(shell);
|
|
72
|
+
// Completions are opt-in — just print a hint
|
|
73
|
+
console.log(`\nTip: Run 'openspec completion install' for shell completions`);
|
|
136
74
|
} catch (error) {
|
|
137
75
|
// Fail gracefully - never break npm install
|
|
138
|
-
// Show tip for manual install
|
|
139
|
-
console.log(`\nTip: Run 'openspec completion install' for shell completions`);
|
|
140
76
|
}
|
|
141
77
|
}
|
|
142
78
|
|