vigthoria-cli 1.8.19 → 1.9.5
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 +16 -10
- package/dist/commands/auth.d.ts +36 -18
- package/dist/commands/auth.js +440 -329
- package/dist/commands/chat.d.ts +12 -0
- package/dist/commands/chat.js +287 -48
- package/dist/commands/config.d.ts +2 -0
- package/dist/commands/config.js +40 -20
- package/dist/commands/index.d.ts +12 -0
- package/dist/commands/index.js +182 -0
- package/dist/commands/legion.d.ts +49 -7
- package/dist/commands/legion.js +1418 -72
- package/dist/commands/preview.js +32 -7
- package/dist/commands/repo.js +19 -13
- package/dist/commands/update.d.ts +9 -0
- package/dist/commands/update.js +235 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +472 -51
- package/dist/utils/api.d.ts +24 -9
- package/dist/utils/api.js +720 -159
- package/dist/utils/config.js +9 -10
- package/dist/utils/context-ranker.d.ts +24 -0
- package/dist/utils/context-ranker.js +147 -0
- package/dist/utils/post-write-validator.d.ts +25 -0
- package/dist/utils/post-write-validator.js +138 -0
- package/dist/utils/session.d.ts +19 -0
- package/dist/utils/session.js +91 -6
- package/dist/utils/task-display.d.ts +31 -0
- package/dist/utils/task-display.js +115 -0
- package/dist/utils/tools.d.ts +26 -0
- package/dist/utils/tools.js +563 -58
- package/dist/utils/workspace-cache.d.ts +31 -0
- package/dist/utils/workspace-cache.js +96 -0
- package/package.json +13 -3
package/dist/utils/api.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare function formatCLIError(err: CLIError): string;
|
|
|
22
22
|
export declare function sanitizeUserFacingErrorText(input: string): string;
|
|
23
23
|
export declare function isServerRuntime(): boolean;
|
|
24
24
|
export declare function describeUpstreamStatus(status: number): string;
|
|
25
|
+
export declare function propagateError(err: any): never;
|
|
25
26
|
export interface ChatMessage {
|
|
26
27
|
role: 'user' | 'assistant' | 'system';
|
|
27
28
|
content: string;
|
|
@@ -92,6 +93,7 @@ export interface OperatorWorkflowResponse {
|
|
|
92
93
|
sourceWorkflowId?: string | null;
|
|
93
94
|
} | null;
|
|
94
95
|
metadata?: Record<string, unknown>;
|
|
96
|
+
changedFiles?: Record<string, string>;
|
|
95
97
|
}
|
|
96
98
|
export interface StreamChunk {
|
|
97
99
|
type: 'content' | 'done' | 'error';
|
|
@@ -197,12 +199,18 @@ export declare class APIClient {
|
|
|
197
199
|
private logger;
|
|
198
200
|
private ws;
|
|
199
201
|
private vigFlowTokens;
|
|
202
|
+
private _httpsAgent;
|
|
200
203
|
constructor(config: Config, logger: Logger);
|
|
204
|
+
/**
|
|
205
|
+
* Destroy keep-alive sockets so the Node.js event loop can drain
|
|
206
|
+
* naturally. Call this before exiting commands that run HTTP probes
|
|
207
|
+
* (e.g. `status`) to avoid the libuv UV_HANDLE_CLOSING assertion
|
|
208
|
+
* on Windows / Node 25+.
|
|
209
|
+
*/
|
|
201
210
|
destroy(): void;
|
|
202
211
|
private getSelfHostedModelsApiUrl;
|
|
203
212
|
login(email: string, password: string): Promise<boolean>;
|
|
204
213
|
loginWithToken(token: string): Promise<boolean>;
|
|
205
|
-
private decodeJwtPayload;
|
|
206
214
|
private extractUserProfile;
|
|
207
215
|
private refreshToken;
|
|
208
216
|
getSubscriptionStatus(): Promise<void>;
|
|
@@ -286,6 +294,7 @@ export declare class APIClient {
|
|
|
286
294
|
private compactV3Context;
|
|
287
295
|
buildMinimalV3AgentContext(context?: Record<string, any>): string;
|
|
288
296
|
private extractEmergencyAppName;
|
|
297
|
+
private materializeEmergencySaaSWorkspace;
|
|
289
298
|
private ensureExecutionContext;
|
|
290
299
|
bindExecutionContext(context?: Record<string, any>): Promise<Record<string, any>>;
|
|
291
300
|
private resolveAgentTargetPath;
|
|
@@ -356,6 +365,11 @@ export declare class APIClient {
|
|
|
356
365
|
* Ensure code has balanced curly braces by appending missing closing braces.
|
|
357
366
|
*/
|
|
358
367
|
private ensureBalancedBraces;
|
|
368
|
+
/**
|
|
369
|
+
* Quick JS/TS syntax validation using Node's built-in parser.
|
|
370
|
+
* Returns true if the code parses without errors.
|
|
371
|
+
*/
|
|
372
|
+
private validateJsSyntax;
|
|
359
373
|
/**
|
|
360
374
|
* Extract the first complete function/class from code.
|
|
361
375
|
* Used as last-resort when the model keeps over-producing.
|
|
@@ -443,17 +457,18 @@ export declare class APIClient {
|
|
|
443
457
|
private getCoderHealth;
|
|
444
458
|
private getModelsHealth;
|
|
445
459
|
private getSelfHostedHealth;
|
|
446
|
-
attemptV3ServiceRecovery(reason?: string, options?: {
|
|
447
|
-
attempts?: number;
|
|
448
|
-
delayMs?: number;
|
|
449
|
-
}): Promise<{
|
|
450
|
-
recovered: boolean;
|
|
451
|
-
message: string;
|
|
452
|
-
endpoint?: string;
|
|
453
|
-
}>;
|
|
454
460
|
private getV3AgentHealth;
|
|
455
461
|
private getHyperLoopHealth;
|
|
456
462
|
private getRepoMemoryHealth;
|
|
463
|
+
runSelfHealingCycle(_originalPrompt: string, _workspacePath: string, _context?: Record<string, any>): Promise<{
|
|
464
|
+
healingAttempted: boolean;
|
|
465
|
+
passed: boolean;
|
|
466
|
+
tool: string;
|
|
467
|
+
}>;
|
|
468
|
+
attemptV3ServiceRecovery(reason?: string, _options?: Record<string, any>): Promise<{
|
|
469
|
+
recovered: boolean;
|
|
470
|
+
message: string;
|
|
471
|
+
}>;
|
|
457
472
|
getDevtoolsBridgeStatus(): Promise<EndpointHealthStatus>;
|
|
458
473
|
getCapabilityTruthStatus(context?: Record<string, any>): Promise<CapabilityTruthStatus>;
|
|
459
474
|
getHealthStatus(): Promise<APIHealthStatus>;
|