vigthoria-cli 1.6.8 → 1.6.13

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.
Files changed (74) hide show
  1. package/README.md +1 -1
  2. package/dist/commands/auth.d.ts +0 -1
  3. package/dist/commands/auth.js +34 -2
  4. package/dist/commands/bridge.d.ts +7 -0
  5. package/dist/commands/bridge.js +31 -0
  6. package/dist/commands/chat.d.ts +50 -3
  7. package/dist/commands/chat.js +1033 -70
  8. package/dist/commands/config.d.ts +0 -1
  9. package/dist/commands/config.js +0 -1
  10. package/dist/commands/deploy.d.ts +0 -1
  11. package/dist/commands/deploy.js +0 -1
  12. package/dist/commands/edit.d.ts +0 -1
  13. package/dist/commands/edit.js +0 -1
  14. package/dist/commands/explain.d.ts +0 -1
  15. package/dist/commands/explain.js +0 -1
  16. package/dist/commands/generate.d.ts +0 -1
  17. package/dist/commands/generate.js +0 -1
  18. package/dist/commands/hub.d.ts +0 -1
  19. package/dist/commands/hub.js +0 -1
  20. package/dist/commands/repo.d.ts +0 -1
  21. package/dist/commands/repo.js +0 -1
  22. package/dist/commands/review.d.ts +0 -1
  23. package/dist/commands/review.js +0 -1
  24. package/dist/commands/workflow.d.ts +31 -0
  25. package/dist/commands/workflow.js +140 -0
  26. package/dist/index.d.ts +2 -1
  27. package/dist/index.js +137 -17
  28. package/dist/utils/api.d.ts +172 -2
  29. package/dist/utils/api.js +2046 -69
  30. package/dist/utils/config.d.ts +14 -7
  31. package/dist/utils/config.js +27 -12
  32. package/dist/utils/files.d.ts +0 -1
  33. package/dist/utils/files.js +0 -1
  34. package/dist/utils/logger.d.ts +0 -1
  35. package/dist/utils/logger.js +0 -1
  36. package/dist/utils/session.d.ts +2 -2
  37. package/dist/utils/session.js +2 -2
  38. package/dist/utils/tools.d.ts +0 -1
  39. package/dist/utils/tools.js +33 -7
  40. package/package.json +21 -3
  41. package/dist/commands/auth.d.ts.map +0 -1
  42. package/dist/commands/auth.js.map +0 -1
  43. package/dist/commands/chat.d.ts.map +0 -1
  44. package/dist/commands/chat.js.map +0 -1
  45. package/dist/commands/config.d.ts.map +0 -1
  46. package/dist/commands/config.js.map +0 -1
  47. package/dist/commands/deploy.d.ts.map +0 -1
  48. package/dist/commands/deploy.js.map +0 -1
  49. package/dist/commands/edit.d.ts.map +0 -1
  50. package/dist/commands/edit.js.map +0 -1
  51. package/dist/commands/explain.d.ts.map +0 -1
  52. package/dist/commands/explain.js.map +0 -1
  53. package/dist/commands/generate.d.ts.map +0 -1
  54. package/dist/commands/generate.js.map +0 -1
  55. package/dist/commands/hub.d.ts.map +0 -1
  56. package/dist/commands/hub.js.map +0 -1
  57. package/dist/commands/repo.d.ts.map +0 -1
  58. package/dist/commands/repo.js.map +0 -1
  59. package/dist/commands/review.d.ts.map +0 -1
  60. package/dist/commands/review.js.map +0 -1
  61. package/dist/index.d.ts.map +0 -1
  62. package/dist/index.js.map +0 -1
  63. package/dist/utils/api.d.ts.map +0 -1
  64. package/dist/utils/api.js.map +0 -1
  65. package/dist/utils/config.d.ts.map +0 -1
  66. package/dist/utils/config.js.map +0 -1
  67. package/dist/utils/files.d.ts.map +0 -1
  68. package/dist/utils/files.js.map +0 -1
  69. package/dist/utils/logger.d.ts.map +0 -1
  70. package/dist/utils/logger.js.map +0 -1
  71. package/dist/utils/session.d.ts.map +0 -1
  72. package/dist/utils/session.js.map +0 -1
  73. package/dist/utils/tools.d.ts.map +0 -1
  74. package/dist/utils/tools.js.map +0 -1
@@ -21,10 +21,59 @@ export interface ChatResponse {
21
21
  export interface V3AgentWorkflowResponse {
22
22
  content: string;
23
23
  taskId: string | null;
24
+ contextId?: string | null;
24
25
  backendUrl: string;
25
26
  partial?: boolean;
26
27
  metadata?: Record<string, unknown>;
27
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
+ }
28
77
  export interface StreamChunk {
29
78
  type: 'content' | 'done' | 'error';
30
79
  content?: string;
@@ -43,6 +92,68 @@ export interface APIHealthStatus {
43
92
  models: EndpointHealthStatus;
44
93
  selfHosted: EndpointHealthStatus | null;
45
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
+ }
46
157
  export interface VigthoriUser {
47
158
  id: string;
48
159
  username: string;
@@ -66,6 +177,7 @@ export declare class APIClient {
66
177
  private config;
67
178
  private logger;
68
179
  private ws;
180
+ private vigFlowTokens;
69
181
  constructor(config: Config, logger: Logger);
70
182
  private getSelfHostedModelsApiUrl;
71
183
  login(email: string, password: string): Promise<boolean>;
@@ -74,11 +186,56 @@ export declare class APIClient {
74
186
  private refreshToken;
75
187
  getSubscriptionStatus(): Promise<void>;
76
188
  private getAccessToken;
77
- getV3AgentBaseUrls(): string[];
189
+ getV3AgentBaseUrls(preferLocal?: boolean): string[];
78
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;
79
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>;
80
229
  buildV3AgentContext(context?: Record<string, any>): string;
230
+ buildMinimalV3AgentContext(context?: Record<string, any>): string;
231
+ private extractEmergencyAppName;
232
+ private materializeEmergencySaaSWorkspace;
233
+ private ensureExecutionContext;
234
+ bindExecutionContext(context?: Record<string, any>): Promise<Record<string, any>>;
81
235
  private resolveAgentTargetPath;
236
+ private isLikelyWindowsPath;
237
+ private resolveServerBindableWorkspacePath;
238
+ private buildLocalWorkspaceSummary;
82
239
  hasAgentWorkspaceOutput(context?: Record<string, any>): boolean;
83
240
  getAgentWorkspaceSnapshot(rootPath: string): {
84
241
  fileCount: number;
@@ -89,12 +246,19 @@ export declare class APIClient {
89
246
  extractExpectedWorkspaceFiles(message?: string, context?: Record<string, any>): string[];
90
247
  captureV3AgentStreamMutation(event: any, streamedFiles: Record<string, string>): void;
91
248
  recoverAgentWorkspaceFiles(context?: Record<string, any>, streamedFiles?: Record<string, string>, expectedFiles?: string[]): void;
249
+ normalizeAgentWorkspaceRelativePath(rawPath: string, rootPath?: string): string;
92
250
  ensureAgentFrontendPolish(message?: string, context?: Record<string, any>): Promise<void>;
93
251
  private injectSectionBeforeFooter;
94
252
  private injectNavLink;
253
+ private ensureReferencedFrontendAssets;
254
+ private buildFallbackFrontendCss;
255
+ private buildFallbackFrontendJs;
256
+ private replaceMissingLocalAssetReferences;
95
257
  formatV3AgentResponse(data: any): string;
96
258
  collectV3AgentStream(response: Response, context?: Record<string, any>): Promise<any>;
97
259
  runV3AgentWorkflow(message: string, context?: Record<string, any>): Promise<V3AgentWorkflowResponse>;
260
+ private formatOperatorResponse;
261
+ runOperatorWorkflow(message: string, context?: Record<string, any>): Promise<OperatorWorkflowResponse>;
98
262
  /**
99
263
  * Chat API - Direct Vigthoria Models API Architecture
100
264
  *
@@ -107,11 +271,13 @@ export declare class APIClient {
107
271
  * NO localhost fallbacks - CLI is for external users, not server-side!
108
272
  */
109
273
  chat(messages: ChatMessage[], model: string, useLocal?: boolean): Promise<ChatResponse>;
274
+ private shouldSkipCloudRoutes;
110
275
  private tryChatWithModel;
111
276
  private trySelfHostedChatWithModel;
112
277
  private getFallbackModelId;
113
278
  private isCloudModelId;
114
279
  private canUseCloudModel;
280
+ private resolvePermittedModelId;
115
281
  private shouldSimulateCloudFailure;
116
282
  private shouldTrySelfHostedFallback;
117
283
  private isSelfHostedPreferredModel;
@@ -158,7 +324,11 @@ export declare class APIClient {
158
324
  private getCoderHealth;
159
325
  private getModelsHealth;
160
326
  private getSelfHostedHealth;
327
+ private getV3AgentHealth;
328
+ private getHyperLoopHealth;
329
+ private getRepoMemoryHealth;
330
+ getDevtoolsBridgeStatus(): Promise<EndpointHealthStatus>;
331
+ getCapabilityTruthStatus(context?: Record<string, any>): Promise<CapabilityTruthStatus>;
161
332
  getHealthStatus(): Promise<APIHealthStatus>;
162
333
  healthCheck(): Promise<boolean>;
163
334
  }
164
- //# sourceMappingURL=api.d.ts.map