vigthoria-cli 1.6.5 → 1.6.9
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 +9 -1
- package/dist/commands/auth.d.ts +0 -1
- package/dist/commands/auth.js +57 -6
- package/dist/commands/bridge.d.ts +7 -0
- package/dist/commands/bridge.js +31 -0
- package/dist/commands/chat.d.ts +27 -1
- package/dist/commands/chat.js +508 -14
- package/dist/commands/config.d.ts +0 -1
- package/dist/commands/config.js +10 -3
- package/dist/commands/deploy.d.ts +0 -1
- package/dist/commands/deploy.js +0 -1
- package/dist/commands/edit.d.ts +0 -1
- package/dist/commands/edit.js +0 -1
- package/dist/commands/explain.d.ts +0 -1
- package/dist/commands/explain.js +0 -1
- package/dist/commands/generate.d.ts +0 -1
- package/dist/commands/generate.js +0 -1
- package/dist/commands/hub.d.ts +0 -1
- package/dist/commands/hub.js +0 -1
- package/dist/commands/repo.d.ts +0 -1
- package/dist/commands/repo.js +0 -1
- package/dist/commands/review.d.ts +0 -1
- package/dist/commands/review.js +0 -1
- package/dist/commands/workflow.d.ts +31 -0
- package/dist/commands/workflow.js +140 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +135 -11
- package/dist/utils/api.d.ts +210 -1
- package/dist/utils/api.js +1789 -47
- package/dist/utils/config.d.ts +14 -7
- package/dist/utils/config.js +22 -11
- package/dist/utils/files.d.ts +0 -1
- package/dist/utils/files.js +0 -1
- package/dist/utils/logger.d.ts +0 -1
- package/dist/utils/logger.js +0 -1
- package/dist/utils/session.d.ts +14 -2
- package/dist/utils/session.js +105 -4
- package/dist/utils/tools.d.ts +0 -1
- package/dist/utils/tools.js +0 -1
- package/package.json +23 -4
- package/dist/commands/auth.d.ts.map +0 -1
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/chat.d.ts.map +0 -1
- package/dist/commands/chat.js.map +0 -1
- package/dist/commands/config.d.ts.map +0 -1
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/deploy.d.ts.map +0 -1
- package/dist/commands/deploy.js.map +0 -1
- package/dist/commands/edit.d.ts.map +0 -1
- package/dist/commands/edit.js.map +0 -1
- package/dist/commands/explain.d.ts.map +0 -1
- package/dist/commands/explain.js.map +0 -1
- package/dist/commands/generate.d.ts.map +0 -1
- package/dist/commands/generate.js.map +0 -1
- package/dist/commands/hub.d.ts.map +0 -1
- package/dist/commands/hub.js.map +0 -1
- package/dist/commands/repo.d.ts.map +0 -1
- package/dist/commands/repo.js.map +0 -1
- package/dist/commands/review.d.ts.map +0 -1
- package/dist/commands/review.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/utils/api.d.ts.map +0 -1
- package/dist/utils/api.js.map +0 -1
- package/dist/utils/config.d.ts.map +0 -1
- package/dist/utils/config.js.map +0 -1
- package/dist/utils/files.d.ts.map +0 -1
- package/dist/utils/files.js.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/session.d.ts.map +0 -1
- package/dist/utils/session.js.map +0 -1
- package/dist/utils/tools.d.ts.map +0 -1
- package/dist/utils/tools.js.map +0 -1
package/dist/utils/api.d.ts
CHANGED
|
@@ -18,11 +18,142 @@ export interface ChatResponse {
|
|
|
18
18
|
total_tokens: number;
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
+
export interface V3AgentWorkflowResponse {
|
|
22
|
+
content: string;
|
|
23
|
+
taskId: string | null;
|
|
24
|
+
contextId?: string | null;
|
|
25
|
+
backendUrl: string;
|
|
26
|
+
partial?: boolean;
|
|
27
|
+
metadata?: Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
export interface FrontendPreviewGateResult {
|
|
30
|
+
required: boolean;
|
|
31
|
+
passed: boolean;
|
|
32
|
+
backendUrl?: string;
|
|
33
|
+
entryPath?: string;
|
|
34
|
+
assetPaths?: {
|
|
35
|
+
css: string[];
|
|
36
|
+
js: string[];
|
|
37
|
+
};
|
|
38
|
+
artifacts?: {
|
|
39
|
+
manifestPath?: string;
|
|
40
|
+
screenshotPath?: string;
|
|
41
|
+
previewFileUrl?: string;
|
|
42
|
+
screenshotCaptured?: boolean;
|
|
43
|
+
screenshotError?: string;
|
|
44
|
+
};
|
|
45
|
+
modes?: {
|
|
46
|
+
design?: {
|
|
47
|
+
ready: boolean;
|
|
48
|
+
devices?: string[];
|
|
49
|
+
variantCount?: number;
|
|
50
|
+
};
|
|
51
|
+
live?: {
|
|
52
|
+
ready: boolean;
|
|
53
|
+
entryPoint?: string;
|
|
54
|
+
};
|
|
55
|
+
production?: {
|
|
56
|
+
ready: boolean;
|
|
57
|
+
deploymentTarget?: string;
|
|
58
|
+
recommendedCommand?: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
summary?: Record<string, unknown>;
|
|
62
|
+
processingTimeMs?: number;
|
|
63
|
+
error?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface OperatorWorkflowResponse {
|
|
66
|
+
content: string;
|
|
67
|
+
workflowId: string | null;
|
|
68
|
+
contextId?: string | null;
|
|
69
|
+
backendUrl: string;
|
|
70
|
+
savedWorkflow?: {
|
|
71
|
+
id: string;
|
|
72
|
+
name?: string | null;
|
|
73
|
+
sourceWorkflowId?: string | null;
|
|
74
|
+
} | null;
|
|
75
|
+
metadata?: Record<string, unknown>;
|
|
76
|
+
}
|
|
21
77
|
export interface StreamChunk {
|
|
22
78
|
type: 'content' | 'done' | 'error';
|
|
23
79
|
content?: string;
|
|
24
80
|
error?: string;
|
|
25
81
|
}
|
|
82
|
+
export interface EndpointHealthStatus {
|
|
83
|
+
name: string;
|
|
84
|
+
endpoint: string;
|
|
85
|
+
ok: boolean;
|
|
86
|
+
error?: string;
|
|
87
|
+
details?: Record<string, unknown>;
|
|
88
|
+
}
|
|
89
|
+
export interface APIHealthStatus {
|
|
90
|
+
overallOk: boolean;
|
|
91
|
+
coder: EndpointHealthStatus;
|
|
92
|
+
models: EndpointHealthStatus;
|
|
93
|
+
selfHosted: EndpointHealthStatus | null;
|
|
94
|
+
}
|
|
95
|
+
export interface CapabilityTruthStatus {
|
|
96
|
+
overallOk: boolean;
|
|
97
|
+
v3Agent: EndpointHealthStatus;
|
|
98
|
+
hyperLoop: EndpointHealthStatus;
|
|
99
|
+
repoMemory: EndpointHealthStatus;
|
|
100
|
+
devtoolsBridge: EndpointHealthStatus;
|
|
101
|
+
}
|
|
102
|
+
export interface VigFlowTemplateSummary {
|
|
103
|
+
id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
description: string;
|
|
106
|
+
category: string;
|
|
107
|
+
icon?: string;
|
|
108
|
+
tags: string[];
|
|
109
|
+
isBuiltin: boolean;
|
|
110
|
+
source: string;
|
|
111
|
+
createdAt?: string;
|
|
112
|
+
}
|
|
113
|
+
export interface VigFlowWorkflowSummary {
|
|
114
|
+
id: string;
|
|
115
|
+
name: string;
|
|
116
|
+
description: string;
|
|
117
|
+
isActive: boolean;
|
|
118
|
+
version: string;
|
|
119
|
+
tags: string[];
|
|
120
|
+
nodeCount: number;
|
|
121
|
+
executionCount: number;
|
|
122
|
+
lastExecutedAt?: string;
|
|
123
|
+
createdAt?: string;
|
|
124
|
+
updatedAt?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface VigFlowWorkflowCreation {
|
|
127
|
+
id: string;
|
|
128
|
+
name: string;
|
|
129
|
+
fromTemplate?: string;
|
|
130
|
+
}
|
|
131
|
+
export interface ResolvedVigFlowWorkflowTarget {
|
|
132
|
+
id: string;
|
|
133
|
+
name: string;
|
|
134
|
+
selector: string;
|
|
135
|
+
matchedBy: 'id' | 'name' | 'search';
|
|
136
|
+
}
|
|
137
|
+
export interface VigFlowExecutionResult {
|
|
138
|
+
executionId: string;
|
|
139
|
+
status: string;
|
|
140
|
+
result?: unknown;
|
|
141
|
+
error?: string;
|
|
142
|
+
nodesExecuted?: number;
|
|
143
|
+
}
|
|
144
|
+
export interface VigFlowExecutionStatus {
|
|
145
|
+
id: string;
|
|
146
|
+
workflowId: string;
|
|
147
|
+
status: string;
|
|
148
|
+
startedAt?: string;
|
|
149
|
+
completedAt?: string;
|
|
150
|
+
nodesExecuted?: number;
|
|
151
|
+
totalNodes?: number;
|
|
152
|
+
result?: unknown;
|
|
153
|
+
error?: string;
|
|
154
|
+
progress?: Record<string, unknown>;
|
|
155
|
+
duration?: number;
|
|
156
|
+
}
|
|
26
157
|
export interface VigthoriUser {
|
|
27
158
|
id: string;
|
|
28
159
|
username: string;
|
|
@@ -46,11 +177,77 @@ export declare class APIClient {
|
|
|
46
177
|
private config;
|
|
47
178
|
private logger;
|
|
48
179
|
private ws;
|
|
180
|
+
private vigFlowTokens;
|
|
49
181
|
constructor(config: Config, logger: Logger);
|
|
182
|
+
private getSelfHostedModelsApiUrl;
|
|
50
183
|
login(email: string, password: string): Promise<boolean>;
|
|
51
184
|
loginWithToken(token: string): Promise<boolean>;
|
|
185
|
+
private extractUserProfile;
|
|
52
186
|
private refreshToken;
|
|
53
187
|
getSubscriptionStatus(): Promise<void>;
|
|
188
|
+
private getAccessToken;
|
|
189
|
+
getV3AgentBaseUrls(): string[];
|
|
190
|
+
getV3AgentRunUrl(baseUrl: string): string;
|
|
191
|
+
getOperatorBaseUrls(): string[];
|
|
192
|
+
getOperatorStreamUrl(baseUrl: string): string;
|
|
193
|
+
getMcpBaseUrls(): string[];
|
|
194
|
+
getVigFlowBaseUrls(): string[];
|
|
195
|
+
getTemplateServiceBaseUrls(): string[];
|
|
196
|
+
private isFrontendTask;
|
|
197
|
+
private normalizeWorkspaceRelativePath;
|
|
198
|
+
private listFrontendWorkspaceFiles;
|
|
199
|
+
private chooseFrontendPreviewEntry;
|
|
200
|
+
private extractLinkedFrontendAssets;
|
|
201
|
+
private gatherFrontendPreviewArtifacts;
|
|
202
|
+
private captureFrontendPreviewScreenshot;
|
|
203
|
+
private evaluateFrontendVisualProof;
|
|
204
|
+
private persistFrontendPreviewArtifacts;
|
|
205
|
+
runTemplateServicePreviewGate(message?: string, context?: Record<string, any>): Promise<FrontendPreviewGateResult>;
|
|
206
|
+
private getMcpContextCreateUrl;
|
|
207
|
+
private getMcpContextUrl;
|
|
208
|
+
private getMcpHeaders;
|
|
209
|
+
getV3AgentHeaders(): Promise<Record<string, string>>;
|
|
210
|
+
private executeV3AgentRunRequest;
|
|
211
|
+
private getVigFlowAccessToken;
|
|
212
|
+
private getVigFlowHeaders;
|
|
213
|
+
private withVigFlow;
|
|
214
|
+
listVigFlowTemplates(options?: {
|
|
215
|
+
category?: string;
|
|
216
|
+
search?: string;
|
|
217
|
+
}): Promise<VigFlowTemplateSummary[]>;
|
|
218
|
+
listVigFlowWorkflows(): Promise<VigFlowWorkflowSummary[]>;
|
|
219
|
+
resolveVigFlowWorkflow(selector: string): Promise<ResolvedVigFlowWorkflowTarget>;
|
|
220
|
+
useVigFlowTemplate(templateId: string, options?: {
|
|
221
|
+
name?: string;
|
|
222
|
+
variables?: Record<string, unknown>;
|
|
223
|
+
}): Promise<VigFlowWorkflowCreation>;
|
|
224
|
+
runVigFlowWorkflow(workflowId: string, options?: {
|
|
225
|
+
data?: Record<string, unknown>;
|
|
226
|
+
executionOptions?: Record<string, unknown>;
|
|
227
|
+
}): Promise<VigFlowExecutionResult>;
|
|
228
|
+
getVigFlowExecutionStatus(executionId: string): Promise<VigFlowExecutionStatus>;
|
|
229
|
+
buildV3AgentContext(context?: Record<string, any>): string;
|
|
230
|
+
private ensureExecutionContext;
|
|
231
|
+
bindExecutionContext(context?: Record<string, any>): Promise<Record<string, any>>;
|
|
232
|
+
private resolveAgentTargetPath;
|
|
233
|
+
hasAgentWorkspaceOutput(context?: Record<string, any>): boolean;
|
|
234
|
+
getAgentWorkspaceSnapshot(rootPath: string): {
|
|
235
|
+
fileCount: number;
|
|
236
|
+
paths: string[];
|
|
237
|
+
signature: string;
|
|
238
|
+
};
|
|
239
|
+
waitForAgentWorkspaceSettle(context?: Record<string, any>, options?: Record<string, any>): Promise<void>;
|
|
240
|
+
extractExpectedWorkspaceFiles(message?: string, context?: Record<string, any>): string[];
|
|
241
|
+
captureV3AgentStreamMutation(event: any, streamedFiles: Record<string, string>): void;
|
|
242
|
+
recoverAgentWorkspaceFiles(context?: Record<string, any>, streamedFiles?: Record<string, string>, expectedFiles?: string[]): void;
|
|
243
|
+
ensureAgentFrontendPolish(message?: string, context?: Record<string, any>): Promise<void>;
|
|
244
|
+
private injectSectionBeforeFooter;
|
|
245
|
+
private injectNavLink;
|
|
246
|
+
formatV3AgentResponse(data: any): string;
|
|
247
|
+
collectV3AgentStream(response: Response, context?: Record<string, any>): Promise<any>;
|
|
248
|
+
runV3AgentWorkflow(message: string, context?: Record<string, any>): Promise<V3AgentWorkflowResponse>;
|
|
249
|
+
private formatOperatorResponse;
|
|
250
|
+
runOperatorWorkflow(message: string, context?: Record<string, any>): Promise<OperatorWorkflowResponse>;
|
|
54
251
|
/**
|
|
55
252
|
* Chat API - Direct Vigthoria Models API Architecture
|
|
56
253
|
*
|
|
@@ -63,9 +260,13 @@ export declare class APIClient {
|
|
|
63
260
|
* NO localhost fallbacks - CLI is for external users, not server-side!
|
|
64
261
|
*/
|
|
65
262
|
chat(messages: ChatMessage[], model: string, useLocal?: boolean): Promise<ChatResponse>;
|
|
263
|
+
private shouldSkipCloudRoutes;
|
|
66
264
|
private tryChatWithModel;
|
|
67
265
|
private trySelfHostedChatWithModel;
|
|
68
266
|
private getFallbackModelId;
|
|
267
|
+
private isCloudModelId;
|
|
268
|
+
private canUseCloudModel;
|
|
269
|
+
private resolvePermittedModelId;
|
|
69
270
|
private shouldSimulateCloudFailure;
|
|
70
271
|
private shouldTrySelfHostedFallback;
|
|
71
272
|
private isSelfHostedPreferredModel;
|
|
@@ -109,6 +310,14 @@ export declare class APIClient {
|
|
|
109
310
|
}[];
|
|
110
311
|
}>;
|
|
111
312
|
private resolveModelId;
|
|
313
|
+
private getCoderHealth;
|
|
314
|
+
private getModelsHealth;
|
|
315
|
+
private getSelfHostedHealth;
|
|
316
|
+
private getV3AgentHealth;
|
|
317
|
+
private getHyperLoopHealth;
|
|
318
|
+
private getRepoMemoryHealth;
|
|
319
|
+
getDevtoolsBridgeStatus(): Promise<EndpointHealthStatus>;
|
|
320
|
+
getCapabilityTruthStatus(context?: Record<string, any>): Promise<CapabilityTruthStatus>;
|
|
321
|
+
getHealthStatus(): Promise<APIHealthStatus>;
|
|
112
322
|
healthCheck(): Promise<boolean>;
|
|
113
323
|
}
|
|
114
|
-
//# sourceMappingURL=api.d.ts.map
|