vigthoria-cli 1.6.34 → 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/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/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,
|