specrails-hub 1.12.0 → 1.13.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.
|
@@ -20,6 +20,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.KNOWN_VERBS = void 0;
|
|
22
22
|
exports.parseArgs = parseArgs;
|
|
23
|
+
exports.getVersion = getVersion;
|
|
23
24
|
exports.detectWebManager = detectWebManager;
|
|
24
25
|
exports.formatDuration = formatDuration;
|
|
25
26
|
exports.formatTokens = formatTokens;
|
|
@@ -89,6 +90,9 @@ function parseArgs(argv) {
|
|
|
89
90
|
i--;
|
|
90
91
|
}
|
|
91
92
|
}
|
|
93
|
+
if (args[0] === '--version' || args[0] === '-v') {
|
|
94
|
+
return { mode: 'version' };
|
|
95
|
+
}
|
|
92
96
|
if (args.length === 0 || args[0] === '--help' || args[0] === '-h') {
|
|
93
97
|
return { mode: 'help' };
|
|
94
98
|
}
|
|
@@ -125,20 +129,55 @@ function parseArgs(argv) {
|
|
|
125
129
|
const resolved = args.join(' ');
|
|
126
130
|
return { mode: 'raw', resolved, port };
|
|
127
131
|
}
|
|
132
|
+
function getVersion() {
|
|
133
|
+
for (const rel of ['../package.json', '../../package.json']) {
|
|
134
|
+
try {
|
|
135
|
+
const pkgPath = path_1.default.join(__dirname, rel);
|
|
136
|
+
const pkg = JSON.parse(fs_1.default.readFileSync(pkgPath, 'utf8'));
|
|
137
|
+
if (typeof pkg.version === 'string')
|
|
138
|
+
return pkg.version;
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
// try next
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return 'unknown';
|
|
145
|
+
}
|
|
146
|
+
function printVersion() {
|
|
147
|
+
process.stdout.write(`specrails-hub v${getVersion()}\n`);
|
|
148
|
+
}
|
|
128
149
|
function printHelp() {
|
|
150
|
+
const version = getVersion();
|
|
129
151
|
process.stdout.write(`
|
|
130
|
-
${bold(
|
|
152
|
+
${bold(`specrails-hub v${version}`)} — specrails CLI bridge
|
|
153
|
+
|
|
154
|
+
${bold('Project Required:')}
|
|
155
|
+
Every command runs in the context of a project registered for the current
|
|
156
|
+
directory. Register your project once before running any commands:
|
|
157
|
+
|
|
158
|
+
${dim('# Register your project (run once per project):')}
|
|
159
|
+
specrails-hub hub add .
|
|
160
|
+
|
|
161
|
+
${dim('# Then run commands from that directory:')}
|
|
162
|
+
specrails-hub implement #42
|
|
131
163
|
|
|
132
164
|
${bold('Usage:')}
|
|
133
165
|
specrails-hub implement #42 Run a known specrails verb (prepends /sr:)
|
|
134
|
-
specrails-hub batch-implement #40 #41
|
|
166
|
+
specrails-hub batch-implement #40 #41 Batch implementation across issues
|
|
167
|
+
specrails-hub why Explain recent changes
|
|
168
|
+
specrails-hub product-backlog View prioritized product backlog
|
|
169
|
+
specrails-hub update-product-driven-backlog Generate new feature ideas
|
|
170
|
+
specrails-hub refactor-recommender Find refactoring opportunities
|
|
171
|
+
specrails-hub health-check Run codebase health check
|
|
172
|
+
specrails-hub compat-check Check for breaking API changes
|
|
135
173
|
specrails-hub "any raw prompt" Pass a raw prompt directly to claude
|
|
136
174
|
specrails-hub --status Print manager status and exit
|
|
137
175
|
specrails-hub --jobs Print recent job history and exit
|
|
138
|
-
specrails-hub start|stop|add|list
|
|
176
|
+
specrails-hub start|stop|add|remove|list Manage the hub (shorthand, no 'hub' prefix)
|
|
139
177
|
specrails-hub hub <subcommand> Same, with explicit 'hub' prefix
|
|
140
178
|
specrails-hub --port <n> Override default port (${DEFAULT_PORT})
|
|
141
|
-
specrails-hub --
|
|
179
|
+
specrails-hub --version, -v Print version and exit
|
|
180
|
+
specrails-hub --help, -h Show this help text
|
|
142
181
|
|
|
143
182
|
${bold('Execution paths:')}
|
|
144
183
|
Manager running → POST /api/spawn + stream logs via WebSocket
|
|
@@ -928,6 +967,10 @@ ${bold('Usage:')}
|
|
|
928
967
|
async function main() {
|
|
929
968
|
const argv = process.argv.slice(2);
|
|
930
969
|
const parsed = parseArgs(argv);
|
|
970
|
+
if (parsed.mode === 'version') {
|
|
971
|
+
printVersion();
|
|
972
|
+
process.exit(0);
|
|
973
|
+
}
|
|
931
974
|
if (parsed.mode === 'help') {
|
|
932
975
|
printHelp();
|
|
933
976
|
process.exit(0);
|
package/package.json
CHANGED
|
@@ -217,6 +217,19 @@ class SetupManager {
|
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
219
|
this._initCheckpoints(projectId);
|
|
220
|
+
// Pre-create the directory structure that /setup will write to.
|
|
221
|
+
// Claude Code's Write tool does not create parent directories automatically —
|
|
222
|
+
// if a target directory doesn't exist the write fails and Claude reports a
|
|
223
|
+
// misleading "write permissions aren't enabled" error. Creating the dirs
|
|
224
|
+
// here ensures setup runs transparently without any user intervention.
|
|
225
|
+
try {
|
|
226
|
+
(0, fs_1.mkdirSync)((0, path_1.join)(projectPath, '.claude', 'agents', 'personas'), { recursive: true });
|
|
227
|
+
(0, fs_1.mkdirSync)((0, path_1.join)(projectPath, '.claude', 'commands', 'sr'), { recursive: true });
|
|
228
|
+
(0, fs_1.mkdirSync)((0, path_1.join)(projectPath, '.claude', 'rules'), { recursive: true });
|
|
229
|
+
}
|
|
230
|
+
catch (err) {
|
|
231
|
+
console.warn(`[SetupManager] Failed to pre-create setup directories: ${err}`);
|
|
232
|
+
}
|
|
220
233
|
const args = [
|
|
221
234
|
'-p', '/setup',
|
|
222
235
|
'--dangerously-skip-permissions',
|