@dynamicworks/br-openspec 1.3.1 → 2.0.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/LICENSE +22 -22
- package/README.md +210 -210
- package/README.pt-BR.md +212 -212
- package/bin/openspec.js +2 -2
- package/dist/commands/feedback.js +4 -4
- package/dist/commands/schema.js +60 -60
- package/dist/core/artifact-graph/instruction-loader.js +4 -4
- package/dist/core/artifact-graph/schema.js +5 -4
- package/dist/core/command-generation/adapters/amazon-q.js +5 -5
- package/dist/core/command-generation/adapters/antigravity.js +5 -5
- package/dist/core/command-generation/adapters/auggie.js +6 -6
- package/dist/core/command-generation/adapters/bob.js +6 -6
- package/dist/core/command-generation/adapters/claude.js +8 -8
- package/dist/core/command-generation/adapters/cline.js +5 -5
- package/dist/core/command-generation/adapters/codebuddy.js +7 -7
- package/dist/core/command-generation/adapters/codex.js +6 -6
- package/dist/core/command-generation/adapters/continue.js +7 -7
- package/dist/core/command-generation/adapters/costrict.js +6 -6
- package/dist/core/command-generation/adapters/crush.js +8 -8
- package/dist/core/command-generation/adapters/cursor.js +8 -8
- package/dist/core/command-generation/adapters/factory.js +6 -6
- package/dist/core/command-generation/adapters/gemini.js +5 -5
- package/dist/core/command-generation/adapters/github-copilot.js +5 -5
- package/dist/core/command-generation/adapters/iflow.js +8 -8
- package/dist/core/command-generation/adapters/junie.js +5 -5
- package/dist/core/command-generation/adapters/kilocode.js +1 -1
- package/dist/core/command-generation/adapters/kiro.js +5 -5
- package/dist/core/command-generation/adapters/lingma.js +8 -8
- package/dist/core/command-generation/adapters/opencode.js +5 -5
- package/dist/core/command-generation/adapters/pi.js +5 -5
- package/dist/core/command-generation/adapters/qoder.js +8 -8
- package/dist/core/command-generation/adapters/qwen.js +5 -5
- package/dist/core/command-generation/adapters/roocode.js +5 -5
- package/dist/core/command-generation/adapters/windsurf.js +8 -8
- package/dist/core/completions/factory.js +3 -2
- package/dist/core/completions/generators/bash-generator.js +41 -41
- package/dist/core/completions/generators/fish-generator.js +7 -7
- package/dist/core/completions/generators/powershell-generator.js +29 -29
- package/dist/core/completions/generators/zsh-generator.js +33 -33
- package/dist/core/completions/installers/fish-installer.js +13 -12
- package/dist/core/completions/installers/powershell-installer.js +16 -17
- package/dist/core/completions/installers/zsh-installer.js +1 -1
- package/dist/core/completions/templates/bash-templates.js +18 -18
- package/dist/core/completions/templates/fish-templates.js +32 -32
- package/dist/core/completions/templates/powershell-templates.js +19 -19
- package/dist/core/completions/templates/zsh-templates.js +30 -30
- package/dist/core/parsers/change-parser.js +7 -6
- package/dist/core/project-config.js +12 -13
- package/dist/core/shared/skill-generation.js +12 -12
- package/dist/core/specs-apply.js +37 -38
- package/dist/core/templates/workflows/apply-change.js +288 -288
- package/dist/core/templates/workflows/archive-change.js +251 -251
- package/dist/core/templates/workflows/bulk-archive-change.js +472 -472
- package/dist/core/templates/workflows/continue-change.js +212 -212
- package/dist/core/templates/workflows/explore.js +443 -443
- package/dist/core/templates/workflows/feedback.js +97 -97
- package/dist/core/templates/workflows/ff-change.js +178 -178
- package/dist/core/templates/workflows/propose.js +196 -196
- package/dist/core/templates/workflows/sync-specs.js +252 -252
- package/dist/core/templates/workflows/upstream-sync.js +93 -93
- package/dist/core/tools-manager.js +2 -2
- package/dist/messages/index.d.ts +111 -0
- package/dist/messages/index.js +1115 -977
- package/dist/utils/change-metadata.js +8 -7
- package/dist/utils/change-utils.js +12 -11
- package/package.json +82 -84
- package/schemas/spec-driven/schema.yaml +153 -153
- package/schemas/spec-driven/templates/design.md +19 -19
- package/schemas/spec-driven/templates/proposal.md +23 -23
- package/schemas/spec-driven/templates/spec.md +8 -8
- package/schemas/spec-driven/templates/tasks.md +9 -9
- package/scripts/postinstall.js +83 -83
|
@@ -25,47 +25,47 @@ export class BashGenerator {
|
|
|
25
25
|
// Dynamic completion helpers from template
|
|
26
26
|
const helpers = BASH_DYNAMIC_HELPERS;
|
|
27
27
|
// Assemble final script with template literal
|
|
28
|
-
return `# Bash completion script for BR-OpenSpec CLI
|
|
29
|
-
# Auto-generated - do not edit manually
|
|
30
|
-
|
|
31
|
-
_openspec_completion() {
|
|
32
|
-
local cur prev words cword
|
|
33
|
-
|
|
34
|
-
# Use _init_completion if available (from bash-completion package)
|
|
35
|
-
# The -n : option prevents colons from being treated as word separators
|
|
36
|
-
# (important for spec/change IDs that may contain colons)
|
|
37
|
-
# Otherwise, fall back to manual initialization
|
|
38
|
-
if declare -F _init_completion >/dev/null 2>&1; then
|
|
39
|
-
_init_completion -n : || return
|
|
40
|
-
else
|
|
41
|
-
# Manual fallback when bash-completion is not installed
|
|
42
|
-
COMPREPLY=()
|
|
43
|
-
cur="\${COMP_WORDS[COMP_CWORD]}"
|
|
44
|
-
prev="\${COMP_WORDS[COMP_CWORD-1]}"
|
|
45
|
-
words=("\${COMP_WORDS[@]}")
|
|
46
|
-
cword=$COMP_CWORD
|
|
47
|
-
fi
|
|
48
|
-
|
|
49
|
-
local cmd="\${words[1]}"
|
|
50
|
-
local subcmd="\${words[2]}"
|
|
51
|
-
|
|
52
|
-
# Top-level commands
|
|
53
|
-
if [[ $cword -eq 1 ]]; then
|
|
54
|
-
local commands="${commandList}"
|
|
55
|
-
COMPREPLY=($(compgen -W "$commands" -- "$cur"))
|
|
56
|
-
return 0
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
# Command-specific completion
|
|
60
|
-
case "$cmd" in
|
|
61
|
-
${commandCases}
|
|
62
|
-
esac
|
|
63
|
-
|
|
64
|
-
return 0
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
${helpers}
|
|
68
|
-
complete -F _openspec_completion openspec
|
|
28
|
+
return `# Bash completion script for BR-OpenSpec CLI
|
|
29
|
+
# Auto-generated - do not edit manually
|
|
30
|
+
|
|
31
|
+
_openspec_completion() {
|
|
32
|
+
local cur prev words cword
|
|
33
|
+
|
|
34
|
+
# Use _init_completion if available (from bash-completion package)
|
|
35
|
+
# The -n : option prevents colons from being treated as word separators
|
|
36
|
+
# (important for spec/change IDs that may contain colons)
|
|
37
|
+
# Otherwise, fall back to manual initialization
|
|
38
|
+
if declare -F _init_completion >/dev/null 2>&1; then
|
|
39
|
+
_init_completion -n : || return
|
|
40
|
+
else
|
|
41
|
+
# Manual fallback when bash-completion is not installed
|
|
42
|
+
COMPREPLY=()
|
|
43
|
+
cur="\${COMP_WORDS[COMP_CWORD]}"
|
|
44
|
+
prev="\${COMP_WORDS[COMP_CWORD-1]}"
|
|
45
|
+
words=("\${COMP_WORDS[@]}")
|
|
46
|
+
cword=$COMP_CWORD
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
local cmd="\${words[1]}"
|
|
50
|
+
local subcmd="\${words[2]}"
|
|
51
|
+
|
|
52
|
+
# Top-level commands
|
|
53
|
+
if [[ $cword -eq 1 ]]; then
|
|
54
|
+
local commands="${commandList}"
|
|
55
|
+
COMPREPLY=($(compgen -W "$commands" -- "$cur"))
|
|
56
|
+
return 0
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Command-specific completion
|
|
60
|
+
case "$cmd" in
|
|
61
|
+
${commandCases}
|
|
62
|
+
esac
|
|
63
|
+
|
|
64
|
+
return 0
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
${helpers}
|
|
68
|
+
complete -F _openspec_completion openspec
|
|
69
69
|
`;
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
@@ -31,13 +31,13 @@ export class FishGenerator {
|
|
|
31
31
|
// Dynamic completion helpers from template
|
|
32
32
|
const dynamicHelpers = FISH_DYNAMIC_HELPERS;
|
|
33
33
|
// Assemble final script with template literal
|
|
34
|
-
return `# Fish completion script for BR-OpenSpec CLI
|
|
35
|
-
# Auto-generated - do not edit manually
|
|
36
|
-
|
|
37
|
-
${helperFunctions}
|
|
38
|
-
${dynamicHelpers}
|
|
39
|
-
${topLevelCommands}
|
|
40
|
-
|
|
34
|
+
return `# Fish completion script for BR-OpenSpec CLI
|
|
35
|
+
# Auto-generated - do not edit manually
|
|
36
|
+
|
|
37
|
+
${helperFunctions}
|
|
38
|
+
${dynamicHelpers}
|
|
39
|
+
${topLevelCommands}
|
|
40
|
+
|
|
41
41
|
${commandCompletions}`;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -36,35 +36,35 @@ export class PowerShellGenerator {
|
|
|
36
36
|
// Dynamic completion helpers from template
|
|
37
37
|
const helpers = POWERSHELL_DYNAMIC_HELPERS;
|
|
38
38
|
// Assemble final script with template literal
|
|
39
|
-
return `${COMPLETION_MESSAGES.powershellCompletionHeader}
|
|
40
|
-
${COMPLETION_MESSAGES.powershellCompletionNote}
|
|
41
|
-
|
|
42
|
-
${helpers}
|
|
43
|
-
$openspecCompleter = {
|
|
44
|
-
param($wordToComplete, $commandAst, $cursorPosition)
|
|
45
|
-
|
|
46
|
-
$tokens = $commandAst.ToString() -split "\\s+"
|
|
47
|
-
$commandCount = ($tokens | Measure-Object).Count
|
|
48
|
-
|
|
49
|
-
# Top-level commands
|
|
50
|
-
if ($commandCount -eq 1 -or ($commandCount -eq 2 -and $wordToComplete)) {
|
|
51
|
-
$commands = @(
|
|
52
|
-
${topLevelCommands}
|
|
53
|
-
)
|
|
54
|
-
$commands | Where-Object { $_.Name -like "$wordToComplete*" } | ForEach-Object {
|
|
55
|
-
[System.Management.Automation.CompletionResult]::new($_.Name, $_.Name, "ParameterValue", $_.Description)
|
|
56
|
-
}
|
|
57
|
-
return
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
$command = $tokens[1]
|
|
61
|
-
|
|
62
|
-
switch ($command) {
|
|
63
|
-
${commandCases}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
Register-ArgumentCompleter -CommandName openspec -ScriptBlock $openspecCompleter
|
|
39
|
+
return `${COMPLETION_MESSAGES.powershellCompletionHeader}
|
|
40
|
+
${COMPLETION_MESSAGES.powershellCompletionNote}
|
|
41
|
+
|
|
42
|
+
${helpers}
|
|
43
|
+
$openspecCompleter = {
|
|
44
|
+
param($wordToComplete, $commandAst, $cursorPosition)
|
|
45
|
+
|
|
46
|
+
$tokens = $commandAst.ToString() -split "\\s+"
|
|
47
|
+
$commandCount = ($tokens | Measure-Object).Count
|
|
48
|
+
|
|
49
|
+
# Top-level commands
|
|
50
|
+
if ($commandCount -eq 1 -or ($commandCount -eq 2 -and $wordToComplete)) {
|
|
51
|
+
$commands = @(
|
|
52
|
+
${topLevelCommands}
|
|
53
|
+
)
|
|
54
|
+
$commands | Where-Object { $_.Name -like "$wordToComplete*" } | ForEach-Object {
|
|
55
|
+
[System.Management.Automation.CompletionResult]::new($_.Name, $_.Name, "ParameterValue", $_.Description)
|
|
56
|
+
}
|
|
57
|
+
return
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
$command = $tokens[1]
|
|
61
|
+
|
|
62
|
+
switch ($command) {
|
|
63
|
+
${commandCases}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
Register-ArgumentCompleter -CommandName openspec -ScriptBlock $openspecCompleter
|
|
68
68
|
`;
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
@@ -37,39 +37,39 @@ export class ZshGenerator {
|
|
|
37
37
|
// Dynamic completion helpers from template
|
|
38
38
|
const helpers = ZSH_DYNAMIC_HELPERS;
|
|
39
39
|
// Assemble final script with template literal
|
|
40
|
-
return `#compdef openspec
|
|
41
|
-
|
|
42
|
-
# Zsh completion script for BR-OpenSpec CLI
|
|
43
|
-
# Auto-generated - do not edit manually
|
|
44
|
-
|
|
45
|
-
_openspec() {
|
|
46
|
-
local context state line
|
|
47
|
-
typeset -A opt_args
|
|
48
|
-
|
|
49
|
-
local -a commands
|
|
50
|
-
commands=(
|
|
51
|
-
${commandList}
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
_arguments -C \\
|
|
55
|
-
"1: :->command" \\
|
|
56
|
-
"*::arg:->args"
|
|
57
|
-
|
|
58
|
-
case $state in
|
|
59
|
-
command)
|
|
60
|
-
_describe "openspec command" commands
|
|
61
|
-
;;
|
|
62
|
-
args)
|
|
63
|
-
case $words[1] in
|
|
64
|
-
${commandCases}
|
|
65
|
-
esac
|
|
66
|
-
;;
|
|
67
|
-
esac
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
${commandFunctions}
|
|
71
|
-
${helpers}
|
|
72
|
-
compdef _openspec openspec
|
|
40
|
+
return `#compdef openspec
|
|
41
|
+
|
|
42
|
+
# Zsh completion script for BR-OpenSpec CLI
|
|
43
|
+
# Auto-generated - do not edit manually
|
|
44
|
+
|
|
45
|
+
_openspec() {
|
|
46
|
+
local context state line
|
|
47
|
+
typeset -A opt_args
|
|
48
|
+
|
|
49
|
+
local -a commands
|
|
50
|
+
commands=(
|
|
51
|
+
${commandList}
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
_arguments -C \\
|
|
55
|
+
"1: :->command" \\
|
|
56
|
+
"*::arg:->args"
|
|
57
|
+
|
|
58
|
+
case $state in
|
|
59
|
+
command)
|
|
60
|
+
_describe "openspec command" commands
|
|
61
|
+
;;
|
|
62
|
+
args)
|
|
63
|
+
case $words[1] in
|
|
64
|
+
${commandCases}
|
|
65
|
+
esac
|
|
66
|
+
;;
|
|
67
|
+
esac
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
${commandFunctions}
|
|
71
|
+
${helpers}
|
|
72
|
+
compdef _openspec openspec
|
|
73
73
|
`;
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { promises as fs } from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import os from 'os';
|
|
4
|
+
import { COMPLETION_MESSAGES } from '../../../messages/index.js';
|
|
4
5
|
/**
|
|
5
6
|
* Installer for Fish completion scripts.
|
|
6
7
|
* Fish automatically loads completions from ~/.config/fish/completions/
|
|
@@ -56,10 +57,10 @@ export class FishInstaller {
|
|
|
56
57
|
return {
|
|
57
58
|
success: true,
|
|
58
59
|
installedPath: targetPath,
|
|
59
|
-
message:
|
|
60
|
+
message: COMPLETION_MESSAGES.fishAlreadyInstalled,
|
|
60
61
|
instructions: [
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
COMPLETION_MESSAGES.fishAlreadyInstalledDetail,
|
|
63
|
+
COMPLETION_MESSAGES.fishAutoLoadsHint,
|
|
63
64
|
],
|
|
64
65
|
};
|
|
65
66
|
}
|
|
@@ -81,11 +82,11 @@ export class FishInstaller {
|
|
|
81
82
|
let message;
|
|
82
83
|
if (isUpdate) {
|
|
83
84
|
message = backupPath
|
|
84
|
-
?
|
|
85
|
-
:
|
|
85
|
+
? COMPLETION_MESSAGES.fishUpdatedWithBackup
|
|
86
|
+
: COMPLETION_MESSAGES.fishUpdated;
|
|
86
87
|
}
|
|
87
88
|
else {
|
|
88
|
-
message =
|
|
89
|
+
message = COMPLETION_MESSAGES.fishInstalled;
|
|
89
90
|
}
|
|
90
91
|
return {
|
|
91
92
|
success: true,
|
|
@@ -93,15 +94,15 @@ export class FishInstaller {
|
|
|
93
94
|
backupPath,
|
|
94
95
|
message,
|
|
95
96
|
instructions: [
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
COMPLETION_MESSAGES.fishAutoLoadsDir,
|
|
98
|
+
COMPLETION_MESSAGES.fishAvailableImmediately,
|
|
98
99
|
],
|
|
99
100
|
};
|
|
100
101
|
}
|
|
101
102
|
catch (error) {
|
|
102
103
|
return {
|
|
103
104
|
success: false,
|
|
104
|
-
message:
|
|
105
|
+
message: COMPLETION_MESSAGES.fishFailedToInstall(error instanceof Error ? error.message : String(error)),
|
|
105
106
|
};
|
|
106
107
|
}
|
|
107
108
|
}
|
|
@@ -122,20 +123,20 @@ export class FishInstaller {
|
|
|
122
123
|
catch {
|
|
123
124
|
return {
|
|
124
125
|
success: false,
|
|
125
|
-
message:
|
|
126
|
+
message: COMPLETION_MESSAGES.fishNotInstalled,
|
|
126
127
|
};
|
|
127
128
|
}
|
|
128
129
|
// Remove the completion script
|
|
129
130
|
await fs.unlink(targetPath);
|
|
130
131
|
return {
|
|
131
132
|
success: true,
|
|
132
|
-
message:
|
|
133
|
+
message: COMPLETION_MESSAGES.fishUninstalled,
|
|
133
134
|
};
|
|
134
135
|
}
|
|
135
136
|
catch (error) {
|
|
136
137
|
return {
|
|
137
138
|
success: false,
|
|
138
|
-
message:
|
|
139
|
+
message: COMPLETION_MESSAGES.fishFailedToUninstall(error instanceof Error ? error.message : String(error)),
|
|
139
140
|
};
|
|
140
141
|
}
|
|
141
142
|
}
|
|
@@ -29,8 +29,7 @@ export class PowerShellInstaller {
|
|
|
29
29
|
}
|
|
30
30
|
// UTF-16 BE BOM: FE FF — not natively supported by Node
|
|
31
31
|
if (buffer.length >= 2 && buffer[0] === 0xfe && buffer[1] === 0xff) {
|
|
32
|
-
throw new Error(
|
|
33
|
-
'Please re-save as UTF-8 or UTF-16 LE, then retry.');
|
|
32
|
+
throw new Error(COMPLETION_MESSAGES.powershellUtf16BEUnsupported);
|
|
34
33
|
}
|
|
35
34
|
// UTF-8 BOM: EF BB BF
|
|
36
35
|
if (buffer.length >= 3 && buffer[0] === 0xef && buffer[1] === 0xbb && buffer[2] === 0xbf) {
|
|
@@ -274,10 +273,10 @@ export class PowerShellInstaller {
|
|
|
274
273
|
return {
|
|
275
274
|
success: true,
|
|
276
275
|
installedPath: targetPath,
|
|
277
|
-
message:
|
|
276
|
+
message: COMPLETION_MESSAGES.powershellAlreadyInstalled,
|
|
278
277
|
instructions: [
|
|
279
|
-
|
|
280
|
-
|
|
278
|
+
COMPLETION_MESSAGES.powershellAlreadyInstalledDetail,
|
|
279
|
+
COMPLETION_MESSAGES.powershellAlreadyInstalledHint,
|
|
281
280
|
],
|
|
282
281
|
};
|
|
283
282
|
}
|
|
@@ -315,13 +314,13 @@ export class PowerShellInstaller {
|
|
|
315
314
|
let message;
|
|
316
315
|
if (isUpdate) {
|
|
317
316
|
message = backupPath
|
|
318
|
-
?
|
|
319
|
-
:
|
|
317
|
+
? COMPLETION_MESSAGES.powershellUpdatedWithBackup
|
|
318
|
+
: COMPLETION_MESSAGES.powershellUpdated;
|
|
320
319
|
}
|
|
321
320
|
else {
|
|
322
321
|
message = profileConfigured
|
|
323
|
-
?
|
|
324
|
-
:
|
|
322
|
+
? COMPLETION_MESSAGES.powershellInstalledWithProfile
|
|
323
|
+
: COMPLETION_MESSAGES.powershellInstalled;
|
|
325
324
|
}
|
|
326
325
|
return {
|
|
327
326
|
success: true,
|
|
@@ -335,7 +334,7 @@ export class PowerShellInstaller {
|
|
|
335
334
|
catch (error) {
|
|
336
335
|
return {
|
|
337
336
|
success: false,
|
|
338
|
-
message:
|
|
337
|
+
message: COMPLETION_MESSAGES.powershellFailedToInstall(error instanceof Error ? error.message : String(error)),
|
|
339
338
|
};
|
|
340
339
|
}
|
|
341
340
|
}
|
|
@@ -348,16 +347,16 @@ export class PowerShellInstaller {
|
|
|
348
347
|
generateInstructions(installedPath) {
|
|
349
348
|
const profilePath = this.getProfilePath();
|
|
350
349
|
return [
|
|
351
|
-
|
|
350
|
+
COMPLETION_MESSAGES.powershellScriptInstalled,
|
|
352
351
|
'',
|
|
353
|
-
|
|
352
|
+
COMPLETION_MESSAGES.powershellEnableCompletions(profilePath),
|
|
354
353
|
'',
|
|
355
|
-
|
|
354
|
+
` ${COMPLETION_MESSAGES.powershellSourceComment}`,
|
|
356
355
|
` if (Test-Path "${installedPath}") {`,
|
|
357
356
|
` . "${installedPath}"`,
|
|
358
357
|
' }',
|
|
359
358
|
'',
|
|
360
|
-
|
|
359
|
+
COMPLETION_MESSAGES.powershellThenRestart,
|
|
361
360
|
];
|
|
362
361
|
}
|
|
363
362
|
/**
|
|
@@ -377,7 +376,7 @@ export class PowerShellInstaller {
|
|
|
377
376
|
catch {
|
|
378
377
|
return {
|
|
379
378
|
success: false,
|
|
380
|
-
message:
|
|
379
|
+
message: COMPLETION_MESSAGES.powershellNotInstalled,
|
|
381
380
|
};
|
|
382
381
|
}
|
|
383
382
|
// Remove the completion script
|
|
@@ -386,13 +385,13 @@ export class PowerShellInstaller {
|
|
|
386
385
|
await this.removeProfileConfig();
|
|
387
386
|
return {
|
|
388
387
|
success: true,
|
|
389
|
-
message:
|
|
388
|
+
message: COMPLETION_MESSAGES.powershellUninstalled,
|
|
390
389
|
};
|
|
391
390
|
}
|
|
392
391
|
catch (error) {
|
|
393
392
|
return {
|
|
394
393
|
success: false,
|
|
395
|
-
message:
|
|
394
|
+
message: COMPLETION_MESSAGES.powershellFailedToUninstall(error instanceof Error ? error.message : String(error)),
|
|
396
395
|
};
|
|
397
396
|
}
|
|
398
397
|
}
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
* Static template strings for Bash completion scripts.
|
|
3
3
|
* These are Bash-specific helper functions that never change.
|
|
4
4
|
*/
|
|
5
|
-
export const BASH_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
6
|
-
|
|
7
|
-
_openspec_complete_changes() {
|
|
8
|
-
local changes
|
|
9
|
-
changes=$(openspec __complete changes 2>/dev/null | cut -f1)
|
|
10
|
-
COMPREPLY=($(compgen -W "$changes" -- "$cur"))
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
_openspec_complete_specs() {
|
|
14
|
-
local specs
|
|
15
|
-
specs=$(openspec __complete specs 2>/dev/null | cut -f1)
|
|
16
|
-
COMPREPLY=($(compgen -W "$specs" -- "$cur"))
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
_openspec_complete_items() {
|
|
20
|
-
local items
|
|
21
|
-
items=$(openspec __complete changes 2>/dev/null | cut -f1; openspec __complete specs 2>/dev/null | cut -f1)
|
|
22
|
-
COMPREPLY=($(compgen -W "$items" -- "$cur"))
|
|
5
|
+
export const BASH_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
6
|
+
|
|
7
|
+
_openspec_complete_changes() {
|
|
8
|
+
local changes
|
|
9
|
+
changes=$(openspec __complete changes 2>/dev/null | cut -f1)
|
|
10
|
+
COMPREPLY=($(compgen -W "$changes" -- "$cur"))
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
_openspec_complete_specs() {
|
|
14
|
+
local specs
|
|
15
|
+
specs=$(openspec __complete specs 2>/dev/null | cut -f1)
|
|
16
|
+
COMPREPLY=($(compgen -W "$specs" -- "$cur"))
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
_openspec_complete_items() {
|
|
20
|
+
local items
|
|
21
|
+
items=$(openspec __complete changes 2>/dev/null | cut -f1; openspec __complete specs 2>/dev/null | cut -f1)
|
|
22
|
+
COMPREPLY=($(compgen -W "$items" -- "$cur"))
|
|
23
23
|
}`;
|
|
24
24
|
//# sourceMappingURL=bash-templates.js.map
|
|
@@ -2,38 +2,38 @@
|
|
|
2
2
|
* Static template strings for Fish completion scripts.
|
|
3
3
|
* These are Fish-specific helper functions that never change.
|
|
4
4
|
*/
|
|
5
|
-
export const FISH_STATIC_HELPERS = `# Helper function to check if a subcommand is present
|
|
6
|
-
function __fish_openspec_using_subcommand
|
|
7
|
-
set -l cmd (commandline -opc)
|
|
8
|
-
set -e cmd[1]
|
|
9
|
-
for i in $argv
|
|
10
|
-
if contains -- $i $cmd
|
|
11
|
-
return 0
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
return 1
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
function __fish_openspec_no_subcommand
|
|
18
|
-
set -l cmd (commandline -opc)
|
|
19
|
-
test (count $cmd) -eq 1
|
|
5
|
+
export const FISH_STATIC_HELPERS = `# Helper function to check if a subcommand is present
|
|
6
|
+
function __fish_openspec_using_subcommand
|
|
7
|
+
set -l cmd (commandline -opc)
|
|
8
|
+
set -e cmd[1]
|
|
9
|
+
for i in $argv
|
|
10
|
+
if contains -- $i $cmd
|
|
11
|
+
return 0
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
return 1
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
function __fish_openspec_no_subcommand
|
|
18
|
+
set -l cmd (commandline -opc)
|
|
19
|
+
test (count $cmd) -eq 1
|
|
20
20
|
end`;
|
|
21
|
-
export const FISH_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
22
|
-
|
|
23
|
-
function __fish_openspec_changes
|
|
24
|
-
openspec __complete changes 2>/dev/null | while read -l id desc
|
|
25
|
-
printf '%s\\t%s\\n' "$id" "$desc"
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
function __fish_openspec_specs
|
|
30
|
-
openspec __complete specs 2>/dev/null | while read -l id desc
|
|
31
|
-
printf '%s\\t%s\\n' "$id" "$desc"
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
function __fish_openspec_items
|
|
36
|
-
__fish_openspec_changes
|
|
37
|
-
__fish_openspec_specs
|
|
21
|
+
export const FISH_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
22
|
+
|
|
23
|
+
function __fish_openspec_changes
|
|
24
|
+
openspec __complete changes 2>/dev/null | while read -l id desc
|
|
25
|
+
printf '%s\\t%s\\n' "$id" "$desc"
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
function __fish_openspec_specs
|
|
30
|
+
openspec __complete specs 2>/dev/null | while read -l id desc
|
|
31
|
+
printf '%s\\t%s\\n' "$id" "$desc"
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
function __fish_openspec_items
|
|
36
|
+
__fish_openspec_changes
|
|
37
|
+
__fish_openspec_specs
|
|
38
38
|
end`;
|
|
39
39
|
//# sourceMappingURL=fish-templates.js.map
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
* Static template strings for PowerShell completion scripts.
|
|
3
3
|
* These are PowerShell-specific helper functions that never change.
|
|
4
4
|
*/
|
|
5
|
-
export const POWERSHELL_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
6
|
-
|
|
7
|
-
function Get-BROpenSpecChanges {
|
|
8
|
-
$output = openspec __complete changes 2>$null
|
|
9
|
-
if ($output) {
|
|
10
|
-
$output | ForEach-Object {
|
|
11
|
-
($_ -split "\\t")[0]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function Get-BROpenSpecSpecs {
|
|
17
|
-
$output = openspec __complete specs 2>$null
|
|
18
|
-
if ($output) {
|
|
19
|
-
$output | ForEach-Object {
|
|
20
|
-
($_ -split "\\t")[0]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
5
|
+
export const POWERSHELL_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
6
|
+
|
|
7
|
+
function Get-BROpenSpecChanges {
|
|
8
|
+
$output = openspec __complete changes 2>$null
|
|
9
|
+
if ($output) {
|
|
10
|
+
$output | ForEach-Object {
|
|
11
|
+
($_ -split "\\t")[0]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function Get-BROpenSpecSpecs {
|
|
17
|
+
$output = openspec __complete specs 2>$null
|
|
18
|
+
if ($output) {
|
|
19
|
+
$output | ForEach-Object {
|
|
20
|
+
($_ -split "\\t")[0]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
24
|
`;
|
|
25
25
|
//# sourceMappingURL=powershell-templates.js.map
|
|
@@ -2,35 +2,35 @@
|
|
|
2
2
|
* Static template strings for Zsh completion scripts.
|
|
3
3
|
* These are Zsh-specific helper functions that never change.
|
|
4
4
|
*/
|
|
5
|
-
export const ZSH_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
6
|
-
|
|
7
|
-
# Use openspec __complete to get available changes
|
|
8
|
-
_openspec_complete_changes() {
|
|
9
|
-
local -a changes
|
|
10
|
-
while IFS=$'\\t' read -r id desc; do
|
|
11
|
-
changes+=("$id:$desc")
|
|
12
|
-
done < <(openspec __complete changes 2>/dev/null)
|
|
13
|
-
_describe "change" changes
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
# Use openspec __complete to get available specs
|
|
17
|
-
_openspec_complete_specs() {
|
|
18
|
-
local -a specs
|
|
19
|
-
while IFS=$'\\t' read -r id desc; do
|
|
20
|
-
specs+=("$id:$desc")
|
|
21
|
-
done < <(openspec __complete specs 2>/dev/null)
|
|
22
|
-
_describe "spec" specs
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
# Get both changes and specs
|
|
26
|
-
_openspec_complete_items() {
|
|
27
|
-
local -a items
|
|
28
|
-
while IFS=$'\\t' read -r id desc; do
|
|
29
|
-
items+=("$id:$desc")
|
|
30
|
-
done < <(openspec __complete changes 2>/dev/null)
|
|
31
|
-
while IFS=$'\\t' read -r id desc; do
|
|
32
|
-
items+=("$id:$desc")
|
|
33
|
-
done < <(openspec __complete specs 2>/dev/null)
|
|
34
|
-
_describe "item" items
|
|
5
|
+
export const ZSH_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
6
|
+
|
|
7
|
+
# Use openspec __complete to get available changes
|
|
8
|
+
_openspec_complete_changes() {
|
|
9
|
+
local -a changes
|
|
10
|
+
while IFS=$'\\t' read -r id desc; do
|
|
11
|
+
changes+=("$id:$desc")
|
|
12
|
+
done < <(openspec __complete changes 2>/dev/null)
|
|
13
|
+
_describe "change" changes
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
# Use openspec __complete to get available specs
|
|
17
|
+
_openspec_complete_specs() {
|
|
18
|
+
local -a specs
|
|
19
|
+
while IFS=$'\\t' read -r id desc; do
|
|
20
|
+
specs+=("$id:$desc")
|
|
21
|
+
done < <(openspec __complete specs 2>/dev/null)
|
|
22
|
+
_describe "spec" specs
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
# Get both changes and specs
|
|
26
|
+
_openspec_complete_items() {
|
|
27
|
+
local -a items
|
|
28
|
+
while IFS=$'\\t' read -r id desc; do
|
|
29
|
+
items+=("$id:$desc")
|
|
30
|
+
done < <(openspec __complete changes 2>/dev/null)
|
|
31
|
+
while IFS=$'\\t' read -r id desc; do
|
|
32
|
+
items+=("$id:$desc")
|
|
33
|
+
done < <(openspec __complete specs 2>/dev/null)
|
|
34
|
+
_describe "item" items
|
|
35
35
|
}`;
|
|
36
36
|
//# sourceMappingURL=zsh-templates.js.map
|