vigthoria-cli 1.6.33 → 1.6.35
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/commands/auth.js +14 -18
- package/dist/commands/chat.d.ts +6 -0
- package/dist/commands/chat.js +15 -0
- package/dist/commands/edit.js +3 -3
- package/dist/utils/api.js +13 -6
- package/package.json +1 -1
package/dist/commands/auth.js
CHANGED
|
@@ -217,29 +217,25 @@ class AuthCommand {
|
|
|
217
217
|
console.log();
|
|
218
218
|
console.log(chalk_1.default.white('Capability Truth:'));
|
|
219
219
|
console.log(chalk_1.default.gray(' Overall: ') + (capabilityStatus.overallOk ? chalk_1.default.green('Verified') : chalk_1.default.yellow('Partial')));
|
|
220
|
-
// V3 Agent — used by agent/chat commands
|
|
221
|
-
console.log(chalk_1.default.gray(' V3 Agent: ') + (capabilityStatus.v3Agent.ok ? chalk_1.default.green('Reachable') : chalk_1.default.
|
|
222
|
-
if (capabilityStatus.v3Agent.error) {
|
|
223
|
-
|
|
220
|
+
// V3 Agent — used by agent/chat commands (routed through model API)
|
|
221
|
+
console.log(chalk_1.default.gray(' V3 Agent: ') + (capabilityStatus.v3Agent.ok ? chalk_1.default.green('Reachable') : chalk_1.default.gray('Not deployed (routed through model API)')));
|
|
222
|
+
if (capabilityStatus.v3Agent.error && capabilityStatus.v3Agent.ok === false) {
|
|
223
|
+
// Only show the raw error when it's an unexpected failure, not a
|
|
224
|
+
// simple timeout/unreachable which is already covered by the label.
|
|
225
|
+
const err = capabilityStatus.v3Agent.error;
|
|
226
|
+
if (!/timed? out|not reachable|No V3 agent/i.test(err)) {
|
|
227
|
+
console.log(chalk_1.default.gray(' Error: ') + chalk_1.default.red(err));
|
|
228
|
+
}
|
|
224
229
|
}
|
|
225
230
|
// Hyper Loop — optional orchestration layer
|
|
226
|
-
console.log(chalk_1.default.gray(' Hyper Loop: ') + (capabilityStatus.hyperLoop.ok ? chalk_1.default.green('Reachable') : chalk_1.default.
|
|
227
|
-
if (capabilityStatus.hyperLoop.error) {
|
|
228
|
-
console.log(chalk_1.default.gray(' Error: ') + chalk_1.default.yellow(capabilityStatus.hyperLoop.error));
|
|
229
|
-
}
|
|
231
|
+
console.log(chalk_1.default.gray(' Hyper Loop: ') + (capabilityStatus.hyperLoop.ok ? chalk_1.default.green('Reachable') : chalk_1.default.gray('Not deployed (optional)')));
|
|
230
232
|
// Repo Memory — separate auth scope, only affects repo commands
|
|
231
|
-
console.log(chalk_1.default.gray(' Repo Memory: ') + (capabilityStatus.repoMemory.ok ? chalk_1.default.green('Active') : chalk_1.default.
|
|
233
|
+
console.log(chalk_1.default.gray(' Repo Memory: ') + (capabilityStatus.repoMemory.ok ? chalk_1.default.green('Active') : chalk_1.default.gray('Not deployed (optional)')));
|
|
232
234
|
if (capabilityStatus.repoMemory.details?.compactContextLength !== undefined) {
|
|
233
235
|
console.log(chalk_1.default.gray(' Compact Context: ') + chalk_1.default.cyan(`${capabilityStatus.repoMemory.details.compactContextLength} chars`));
|
|
234
236
|
}
|
|
235
|
-
if (capabilityStatus.repoMemory.error) {
|
|
236
|
-
console.log(chalk_1.default.gray(' Error: ') + chalk_1.default.yellow(capabilityStatus.repoMemory.error));
|
|
237
|
-
}
|
|
238
237
|
// DevTools Bridge — local service, not required
|
|
239
|
-
console.log(chalk_1.default.gray(' DevTools Bridge: ') + (capabilityStatus.devtoolsBridge.ok ? chalk_1.default.green('
|
|
240
|
-
if (capabilityStatus.devtoolsBridge.error) {
|
|
241
|
-
console.log(chalk_1.default.gray(' Error: ') + chalk_1.default.gray(capabilityStatus.devtoolsBridge.error));
|
|
242
|
-
}
|
|
238
|
+
console.log(chalk_1.default.gray(' DevTools Bridge: ') + (capabilityStatus.devtoolsBridge.ok ? chalk_1.default.green('Connected') : chalk_1.default.gray('Not running (optional)')));
|
|
243
239
|
// Auth scope summary — use a real server-side probe for Model Auth
|
|
244
240
|
const tokenValidation = await this.api.validateToken();
|
|
245
241
|
console.log();
|
|
@@ -248,8 +244,8 @@ class AuthCommand {
|
|
|
248
244
|
if (!tokenValidation.valid && tokenValidation.error) {
|
|
249
245
|
console.log(chalk_1.default.gray(' ') + chalk_1.default.red(tokenValidation.error));
|
|
250
246
|
}
|
|
251
|
-
console.log(chalk_1.default.gray(' Repo Auth: ') + (capabilityStatus.repoMemory.ok ? chalk_1.default.green('Active') : chalk_1.default.
|
|
252
|
-
console.log(chalk_1.default.gray(' Bridge Auth: ') + (capabilityStatus.devtoolsBridge.ok ? chalk_1.default.green('Connected') : chalk_1.default.gray('N/A')) + chalk_1.default.gray(' (used by --bridge flag only)'));
|
|
247
|
+
console.log(chalk_1.default.gray(' Repo Auth: ') + (capabilityStatus.repoMemory.ok ? chalk_1.default.green('Active') : chalk_1.default.gray('N/A — repo memory not deployed')) + chalk_1.default.gray(' (used by repo push/pull/list only)'));
|
|
248
|
+
console.log(chalk_1.default.gray(' Bridge Auth: ') + (capabilityStatus.devtoolsBridge.ok ? chalk_1.default.green('Connected') : chalk_1.default.gray('N/A — bridge not running')) + chalk_1.default.gray(' (used by --bridge flag only)'));
|
|
253
249
|
console.log();
|
|
254
250
|
}
|
|
255
251
|
printLoginSuccess() {
|
package/dist/commands/chat.d.ts
CHANGED
|
@@ -53,6 +53,12 @@ export declare class ChatCommand {
|
|
|
53
53
|
*/
|
|
54
54
|
private isAnalysisLookupPrompt;
|
|
55
55
|
private isBrowserTaskPrompt;
|
|
56
|
+
/**
|
|
57
|
+
* Returns true when a prompt can be answered directly without the full
|
|
58
|
+
* BMAD operator workflow. Matches analysis/lookup questions.
|
|
59
|
+
* Infrastructure action verbs are already filtered at the routing level.
|
|
60
|
+
*/
|
|
61
|
+
private isOperatorDirectAnswerable;
|
|
56
62
|
private inferAgentTaskType;
|
|
57
63
|
private buildTaskShapingInstructions;
|
|
58
64
|
private buildExecutionPrompt;
|
package/dist/commands/chat.js
CHANGED
|
@@ -206,6 +206,14 @@ class ChatCommand {
|
|
|
206
206
|
isBrowserTaskPrompt(prompt) {
|
|
207
207
|
return /(browser|chrome|devtools|console|dom|network tab|network request|frontend runtime|client-side|client side|rendering|page load|websocket|ui bug|inspect element)/i.test(prompt);
|
|
208
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Returns true when a prompt can be answered directly without the full
|
|
211
|
+
* BMAD operator workflow. Matches analysis/lookup questions.
|
|
212
|
+
* Infrastructure action verbs are already filtered at the routing level.
|
|
213
|
+
*/
|
|
214
|
+
isOperatorDirectAnswerable(prompt) {
|
|
215
|
+
return this.isAnalysisLookupPrompt(prompt.trim());
|
|
216
|
+
}
|
|
209
217
|
inferAgentTaskType(prompt) {
|
|
210
218
|
if (this.isDiagnosticPrompt(prompt))
|
|
211
219
|
return 'debugging';
|
|
@@ -665,6 +673,13 @@ class ChatCommand {
|
|
|
665
673
|
this.logger.error(this.operatorAccessMessage());
|
|
666
674
|
return;
|
|
667
675
|
}
|
|
676
|
+
// Smart routing: infrastructure action verbs always need the BMAD
|
|
677
|
+
// workflow. Everything else can be answered with a direct chat.
|
|
678
|
+
const isInfraAction = /(deploy|provision|scale|replicas|rollback|roll back|migrate|tear.?down|restart|stop\s+\w+|start\s+\w+|configure|set.?up|upgrade|pipeline)/i.test(prompt.trim());
|
|
679
|
+
if (!isInfraAction && (this.isSimpleDirectPrompt(prompt) || this.isOperatorDirectAnswerable(prompt))) {
|
|
680
|
+
await this.runSimplePrompt(prompt);
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
668
683
|
await this.runOperatorTurn(prompt);
|
|
669
684
|
return;
|
|
670
685
|
}
|
package/dist/commands/edit.js
CHANGED
|
@@ -316,9 +316,9 @@ Return the complete modified file content:`,
|
|
|
316
316
|
// 3+ identical (trimmed) lines is almost certainly stutter — keep one
|
|
317
317
|
deduped.push(lines[i]);
|
|
318
318
|
}
|
|
319
|
-
else if (runLen === 2 && isAtEffectiveEnd && lines[i] === lines[i + 1]) {
|
|
320
|
-
// Exactly 2 identical lines (
|
|
321
|
-
deduped.push(lines[i]);
|
|
319
|
+
else if (runLen === 2 && isAtEffectiveEnd && lines[i].trimEnd() === lines[i + 1].trimEnd()) {
|
|
320
|
+
// Exactly 2 identical lines (same leading indent) at end
|
|
321
|
+
deduped.push(lines[i].trimEnd());
|
|
322
322
|
}
|
|
323
323
|
else {
|
|
324
324
|
// 1 line, or a pair in the middle — keep all
|
package/dist/utils/api.js
CHANGED
|
@@ -4331,7 +4331,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
4331
4331
|
for (const endpoint of candidates) {
|
|
4332
4332
|
try {
|
|
4333
4333
|
const controller = new AbortController();
|
|
4334
|
-
const timer = setTimeout(() => controller.abort(),
|
|
4334
|
+
const timer = setTimeout(() => controller.abort(), 3000);
|
|
4335
4335
|
const response = await fetch(endpoint, {
|
|
4336
4336
|
method: 'GET',
|
|
4337
4337
|
headers,
|
|
@@ -4379,7 +4379,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
4379
4379
|
const runUrl = this.getV3AgentRunUrl(baseUrl);
|
|
4380
4380
|
try {
|
|
4381
4381
|
const controller = new AbortController();
|
|
4382
|
-
const timer = setTimeout(() => controller.abort(),
|
|
4382
|
+
const timer = setTimeout(() => controller.abort(), 2000);
|
|
4383
4383
|
const probe = await fetch(runUrl, { method: 'OPTIONS', headers, signal: controller.signal });
|
|
4384
4384
|
clearTimeout(timer);
|
|
4385
4385
|
if (probe.ok || probe.status === 204 || probe.status === 405) {
|
|
@@ -4536,11 +4536,18 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
4536
4536
|
});
|
|
4537
4537
|
}
|
|
4538
4538
|
async getCapabilityTruthStatus(context = {}) {
|
|
4539
|
+
// Wrap each probe with its own 6 s timeout so they always resolve
|
|
4540
|
+
// before the outer 8 s race in auth.ts, producing real error messages
|
|
4541
|
+
// (ECONNREFUSED, 404, etc.) instead of the generic "Timed out (8s)".
|
|
4542
|
+
const withTimeout = (p, name) => Promise.race([
|
|
4543
|
+
p,
|
|
4544
|
+
new Promise(resolve => setTimeout(() => resolve({ name, endpoint: '', ok: false, error: 'Service not reachable (6 s timeout)' }), 6000)),
|
|
4545
|
+
]);
|
|
4539
4546
|
const [v3Agent, hyperLoop, repoMemory, devtoolsBridge] = await Promise.all([
|
|
4540
|
-
this.getV3AgentHealth(),
|
|
4541
|
-
this.getHyperLoopHealth(),
|
|
4542
|
-
this.getRepoMemoryHealth(context),
|
|
4543
|
-
this.getDevtoolsBridgeStatus(),
|
|
4547
|
+
withTimeout(this.getV3AgentHealth(), 'V3 Agent'),
|
|
4548
|
+
withTimeout(this.getHyperLoopHealth(), 'Hyper Loop'),
|
|
4549
|
+
withTimeout(this.getRepoMemoryHealth(context), 'Repo Memory'),
|
|
4550
|
+
withTimeout(this.getDevtoolsBridgeStatus(), 'DevTools Bridge'),
|
|
4544
4551
|
]);
|
|
4545
4552
|
return {
|
|
4546
4553
|
overallOk: v3Agent.ok && hyperLoop.ok && repoMemory.ok,
|