vigthoria-cli 1.13.18 → 1.13.22

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 (185) hide show
  1. package/completions/_vigthoria +49 -0
  2. package/completions/vigthoria.bash +6 -0
  3. package/completions/vigthoria.fish +41 -0
  4. package/dist/commands/auth.d.ts +1 -0
  5. package/dist/commands/auth.js +84 -135
  6. package/dist/commands/background.d.ts +0 -2
  7. package/dist/commands/background.js +26 -34
  8. package/dist/commands/bridge.js +45 -41
  9. package/dist/commands/cancel.d.ts +1 -0
  10. package/dist/commands/cancel.js +22 -16
  11. package/dist/commands/chat.d.ts +5 -42
  12. package/dist/commands/chat.js +462 -1122
  13. package/dist/commands/coding-registration.d.ts +4 -0
  14. package/dist/commands/coding-registration.js +24 -0
  15. package/dist/commands/config.js +32 -42
  16. package/dist/commands/conversation-registration.d.ts +4 -0
  17. package/dist/commands/conversation-registration.js +122 -0
  18. package/dist/commands/deploy.d.ts +8 -2
  19. package/dist/commands/deploy.js +92 -90
  20. package/dist/commands/device.d.ts +1 -2
  21. package/dist/commands/device.js +37 -21
  22. package/dist/commands/doctor-registration.d.ts +4 -0
  23. package/dist/commands/doctor-registration.js +200 -0
  24. package/dist/commands/edit.js +22 -33
  25. package/dist/commands/explain.js +7 -10
  26. package/dist/commands/fork.d.ts +1 -2
  27. package/dist/commands/fork.js +72 -22
  28. package/dist/commands/game.d.ts +1 -1
  29. package/dist/commands/game.js +17 -6
  30. package/dist/commands/generate.js +7 -9
  31. package/dist/commands/history.js +11 -7
  32. package/dist/commands/hub.d.ts +2 -2
  33. package/dist/commands/hub.js +34 -35
  34. package/dist/commands/legion.d.ts +0 -1
  35. package/dist/commands/legion.js +62 -79
  36. package/dist/commands/music.d.ts +1 -2
  37. package/dist/commands/music.js +62 -27
  38. package/dist/commands/platform-registration.d.ts +4 -0
  39. package/dist/commands/platform-registration.js +45 -0
  40. package/dist/commands/preview.d.ts +0 -1
  41. package/dist/commands/preview.js +82 -35
  42. package/dist/commands/product-run-registration.d.ts +4 -0
  43. package/dist/commands/product-run-registration.js +490 -0
  44. package/dist/commands/replay.d.ts +1 -2
  45. package/dist/commands/replay.js +15 -11
  46. package/dist/commands/repo.d.ts +14 -7
  47. package/dist/commands/repo.js +245 -196
  48. package/dist/commands/review.js +9 -12
  49. package/dist/commands/security.d.ts +1 -2
  50. package/dist/commands/security.js +12 -6
  51. package/dist/commands/update-registration.d.ts +3 -0
  52. package/dist/commands/update-registration.js +338 -0
  53. package/dist/commands/v4-registration.d.ts +4 -0
  54. package/dist/commands/v4-registration.js +24 -0
  55. package/dist/commands/v4.d.ts +1 -1
  56. package/dist/commands/v4.js +46 -8
  57. package/dist/commands/wallet.d.ts +1 -3
  58. package/dist/commands/wallet.js +18 -45
  59. package/dist/commands/workflow.d.ts +2 -0
  60. package/dist/commands/workflow.js +52 -39
  61. package/dist/index.js +122 -1498
  62. package/dist/utils/agent-stream-state.d.ts +27 -0
  63. package/dist/utils/agent-stream-state.js +93 -0
  64. package/dist/utils/agentRoute.d.ts +2 -1
  65. package/dist/utils/agentRoute.js +22 -9
  66. package/dist/utils/agentRunOutcome.d.ts +16 -0
  67. package/dist/utils/agentRunOutcome.js +37 -2
  68. package/dist/utils/api-client-factory.d.ts +8 -0
  69. package/dist/utils/api-client-factory.js +8 -0
  70. package/dist/utils/api.d.ts +45 -269
  71. package/dist/utils/api.js +664 -3210
  72. package/dist/utils/auth-session.d.ts +41 -0
  73. package/dist/utils/auth-session.js +224 -0
  74. package/dist/utils/brain-hub-client.d.ts +0 -4
  75. package/dist/utils/brain-hub-client.js +6 -3
  76. package/dist/utils/bridge-client.js +2 -0
  77. package/dist/utils/capability-health-service.d.ts +48 -0
  78. package/dist/utils/capability-health-service.js +64 -0
  79. package/dist/utils/chat-prompt-policy.d.ts +18 -0
  80. package/dist/utils/chat-prompt-policy.js +61 -0
  81. package/dist/utils/chat-tool-call-parser.d.ts +11 -0
  82. package/dist/utils/chat-tool-call-parser.js +71 -0
  83. package/dist/utils/cli-state.d.ts +22 -4
  84. package/dist/utils/cli-state.js +105 -47
  85. package/dist/utils/code-operations-service.d.ts +104 -0
  86. package/dist/utils/code-operations-service.js +837 -0
  87. package/dist/utils/codebase-indexer.d.ts +1 -0
  88. package/dist/utils/codebase-indexer.js +28 -8
  89. package/dist/utils/command-contract.d.ts +61 -0
  90. package/dist/utils/command-contract.js +149 -0
  91. package/dist/utils/command-policy.d.ts +10 -0
  92. package/dist/utils/command-policy.js +54 -0
  93. package/dist/utils/config.d.ts +13 -5
  94. package/dist/utils/config.js +227 -99
  95. package/dist/utils/context-ranker.js +11 -2
  96. package/dist/utils/context-state.d.ts +39 -0
  97. package/dist/utils/context-state.js +52 -0
  98. package/dist/utils/deckEvents.d.ts +0 -5
  99. package/dist/utils/deckEvents.js +3 -2
  100. package/dist/utils/desktop-bridge-client.js +2 -0
  101. package/dist/utils/direct-output-policy.d.ts +3 -0
  102. package/dist/utils/direct-output-policy.js +76 -0
  103. package/dist/utils/durable-json.d.ts +57 -0
  104. package/dist/utils/durable-json.js +319 -0
  105. package/dist/utils/fastAgentRouter.d.ts +6 -7
  106. package/dist/utils/fastAgentRouter.js +21 -30
  107. package/dist/utils/files.js +21 -13
  108. package/dist/utils/frontend-preview-service.d.ts +76 -0
  109. package/dist/utils/frontend-preview-service.js +482 -0
  110. package/dist/utils/goaEvents.d.ts +0 -4
  111. package/dist/utils/goaEvents.js +5 -2
  112. package/dist/utils/logger.d.ts +2 -1
  113. package/dist/utils/logger.js +27 -20
  114. package/dist/utils/mcp-context-client.d.ts +24 -0
  115. package/dist/utils/mcp-context-client.js +58 -0
  116. package/dist/utils/model-governance.d.ts +18 -0
  117. package/dist/utils/model-governance.js +75 -0
  118. package/dist/utils/model-transport-service.d.ts +44 -0
  119. package/dist/utils/model-transport-service.js +111 -0
  120. package/dist/utils/mutation-journal.d.ts +42 -0
  121. package/dist/utils/mutation-journal.js +387 -0
  122. package/dist/utils/network-policy.d.ts +24 -0
  123. package/dist/utils/network-policy.js +202 -0
  124. package/dist/utils/operator-client.d.ts +45 -0
  125. package/dist/utils/operator-client.js +159 -0
  126. package/dist/utils/post-write-validator.js +7 -9
  127. package/dist/utils/preview-screenshot-adapter.d.ts +13 -0
  128. package/dist/utils/preview-screenshot-adapter.js +36 -0
  129. package/dist/utils/process-policy.d.ts +23 -0
  130. package/dist/utils/process-policy.js +284 -0
  131. package/dist/utils/project-memory.d.ts +13 -3
  132. package/dist/utils/project-memory.js +70 -17
  133. package/dist/utils/prompt-workspace-resolver.d.ts +14 -0
  134. package/dist/utils/prompt-workspace-resolver.js +64 -0
  135. package/dist/utils/release-install.d.ts +11 -0
  136. package/dist/utils/release-install.js +155 -0
  137. package/dist/utils/release-policy.d.ts +64 -0
  138. package/dist/utils/release-policy.js +293 -0
  139. package/dist/utils/requestIntent.js +22 -3
  140. package/dist/utils/runtime-capability.d.ts +8 -0
  141. package/dist/utils/runtime-capability.js +16 -0
  142. package/dist/utils/secret-policy.d.ts +20 -0
  143. package/dist/utils/secret-policy.js +160 -0
  144. package/dist/utils/session.d.ts +34 -2
  145. package/dist/utils/session.js +354 -110
  146. package/dist/utils/tool-approval-service.d.ts +17 -0
  147. package/dist/utils/tool-approval-service.js +78 -0
  148. package/dist/utils/tool-capability-providers.d.ts +57 -0
  149. package/dist/utils/tool-capability-providers.js +57 -0
  150. package/dist/utils/tools.d.ts +2 -23
  151. package/dist/utils/tools.js +216 -508
  152. package/dist/utils/update-policy.d.ts +18 -0
  153. package/dist/utils/update-policy.js +137 -0
  154. package/dist/utils/v3-agent-client.d.ts +40 -0
  155. package/dist/utils/v3-agent-client.js +165 -0
  156. package/dist/utils/v3-workspace-service.d.ts +28 -0
  157. package/dist/utils/v3-workspace-service.js +279 -0
  158. package/dist/utils/vigflow-client.d.ts +95 -0
  159. package/dist/utils/vigflow-client.js +105 -0
  160. package/dist/utils/workspace-boundary.d.ts +45 -0
  161. package/dist/utils/workspace-boundary.js +377 -0
  162. package/dist/utils/workspace-brain-service.d.ts +2 -0
  163. package/dist/utils/workspace-brain-service.js +11 -1
  164. package/dist/utils/workspace-cache.js +37 -15
  165. package/dist/utils/workspace-stream.js +35 -10
  166. package/install.ps1 +86 -143
  167. package/install.sh +76 -81
  168. package/package.json +44 -9
  169. package/release-policy.json +43 -0
  170. package/scripts/release/LOCAL_MACHINE_USER_VERIFICATION.md +1 -1
  171. package/scripts/release/generate-completions.mjs +24 -0
  172. package/scripts/release/install-release.mjs +10 -0
  173. package/scripts/release/publish-cli-release.mjs +116 -0
  174. package/scripts/release/publish-cli-release.sh +2 -70
  175. package/scripts/release/resolve-release-manifest.mjs +26 -0
  176. package/scripts/release/test-balanced-model-live.sh +42 -0
  177. package/scripts/release/validate-live-service-gates.sh +90 -0
  178. package/scripts/release/validate-no-go-gates.sh +135 -172
  179. package/scripts/release/verify-runtime-consistency.mjs +4 -1
  180. package/dist/commands/index.d.ts +0 -12
  181. package/dist/commands/index.js +0 -194
  182. package/dist/commands/update.d.ts +0 -9
  183. package/dist/commands/update.js +0 -301
  184. package/dist/utils/templateInstantPath.d.ts +0 -18
  185. package/dist/utils/templateInstantPath.js +0 -228
@@ -4,6 +4,12 @@
4
4
  */
5
5
  import { Config } from './config.js';
6
6
  import { Logger } from './logger.js';
7
+ import { type PreviewScreenshotPort } from './preview-screenshot-adapter.js';
8
+ import { type OperatorWorkflowResponse } from './operator-client.js';
9
+ import { type FrontendPreviewGateResult } from './frontend-preview-service.js';
10
+ import { type APIHealthStatus, type CapabilityTruthStatus, type EndpointHealthStatus } from './capability-health-service.js';
11
+ import { type ChatMessage, type ChatResponse } from './model-transport-service.js';
12
+ import { type ResolvedVigFlowWorkflowTarget, type VigFlowExecutionResult, type VigFlowExecutionStatus, type VigFlowTemplateSummary, type VigFlowWorkflowCreation, type VigFlowWorkflowSummary } from './vigflow-client.js';
7
13
  export type CLIErrorCategory = 'auth' | 'repo_session' | 'model_backend' | 'bridge' | 'network' | 'timeout' | 'parsing' | 'tool_execution' | 'credits';
8
14
  export declare const VIGTHORIA_HUB_CREDITS_URL = "https://hub.vigthoria.io/credits";
9
15
  export declare const VIGTHORIA_SERVER_TEMPORARILY_UNAVAILABLE_MESSAGE = "Vigthoria Server is temporarily not available. Please try again later. If the issue persists, please contact support.";
@@ -21,6 +27,9 @@ export type ChatRequestOptions = {
21
27
  onRouteAttempt?: (routeLabel: string) => void;
22
28
  onStreamDelta?: (chunk: string) => void;
23
29
  };
30
+ export interface APIClientDependencies {
31
+ screenshotAdapter?: PreviewScreenshotPort;
32
+ }
24
33
  export declare class CLIError extends Error {
25
34
  category: CLIErrorCategory;
26
35
  statusCode?: number;
@@ -43,23 +52,9 @@ export declare function classifyError(error: unknown, fallbackCategory?: CLIErro
43
52
  export declare function formatCLIError(err: CLIError): string;
44
53
  export declare function sanitizeUserFacingPathText(input: string): string;
45
54
  export declare function sanitizeUserFacingErrorText(input: string): string;
46
- export declare function isServerRuntime(): boolean;
47
55
  export declare function describeUpstreamStatus(status: number): string;
48
56
  export declare function propagateError(err: any): never;
49
- export interface ChatMessage {
50
- role: 'user' | 'assistant' | 'system';
51
- content: string;
52
- }
53
- export interface ChatResponse {
54
- id: string;
55
- message: string;
56
- model: string;
57
- usage?: {
58
- prompt_tokens: number;
59
- completion_tokens: number;
60
- total_tokens: number;
61
- };
62
- }
57
+ export type { ChatMessage, ChatResponse } from './model-transport-service.js';
63
58
  export interface V3AgentWorkflowResponse {
64
59
  content: string;
65
60
  taskId: string | null;
@@ -69,135 +64,10 @@ export interface V3AgentWorkflowResponse {
69
64
  metadata?: Record<string, unknown>;
70
65
  changedFiles?: Record<string, string>;
71
66
  }
72
- export interface FrontendPreviewGateResult {
73
- required: boolean;
74
- passed: boolean;
75
- backendUrl?: string;
76
- entryPath?: string;
77
- assetPaths?: {
78
- css: string[];
79
- js: string[];
80
- };
81
- artifacts?: {
82
- manifestPath?: string;
83
- screenshotPath?: string;
84
- previewFileUrl?: string;
85
- screenshotCaptured?: boolean;
86
- screenshotError?: string;
87
- };
88
- modes?: {
89
- design?: {
90
- ready: boolean;
91
- devices?: string[];
92
- variantCount?: number;
93
- };
94
- live?: {
95
- ready: boolean;
96
- entryPoint?: string;
97
- };
98
- production?: {
99
- ready: boolean;
100
- deploymentTarget?: string;
101
- recommendedCommand?: string;
102
- };
103
- };
104
- summary?: Record<string, unknown>;
105
- processingTimeMs?: number;
106
- error?: string;
107
- }
108
- export interface OperatorWorkflowResponse {
109
- content: string;
110
- workflowId: string | null;
111
- contextId?: string | null;
112
- backendUrl: string;
113
- savedWorkflow?: {
114
- id: string;
115
- name?: string | null;
116
- sourceWorkflowId?: string | null;
117
- } | null;
118
- metadata?: Record<string, unknown>;
119
- changedFiles?: Record<string, string>;
120
- }
121
- export interface StreamChunk {
122
- type: 'content' | 'done' | 'error';
123
- content?: string;
124
- error?: string;
125
- }
126
- export interface EndpointHealthStatus {
127
- name: string;
128
- endpoint: string;
129
- ok: boolean;
130
- error?: string;
131
- details?: Record<string, unknown>;
132
- }
133
- export interface APIHealthStatus {
134
- overallOk: boolean;
135
- coder: EndpointHealthStatus;
136
- models: EndpointHealthStatus;
137
- selfHosted: EndpointHealthStatus | null;
138
- }
139
- export interface CapabilityTruthStatus {
140
- overallOk: boolean;
141
- v3Agent: EndpointHealthStatus;
142
- hyperLoop: EndpointHealthStatus;
143
- repoMemory: EndpointHealthStatus;
144
- devtoolsBridge: EndpointHealthStatus;
145
- }
146
- export interface VigFlowTemplateSummary {
147
- id: string;
148
- name: string;
149
- description: string;
150
- category: string;
151
- icon?: string;
152
- tags: string[];
153
- isBuiltin: boolean;
154
- source: string;
155
- createdAt?: string;
156
- }
157
- export interface VigFlowWorkflowSummary {
158
- id: string;
159
- name: string;
160
- description: string;
161
- isActive: boolean;
162
- version: string;
163
- tags: string[];
164
- nodeCount: number;
165
- executionCount: number;
166
- lastExecutedAt?: string;
167
- createdAt?: string;
168
- updatedAt?: string;
169
- }
170
- export interface VigFlowWorkflowCreation {
171
- id: string;
172
- name: string;
173
- fromTemplate?: string;
174
- }
175
- export interface ResolvedVigFlowWorkflowTarget {
176
- id: string;
177
- name: string;
178
- selector: string;
179
- matchedBy: 'id' | 'name' | 'search';
180
- }
181
- export interface VigFlowExecutionResult {
182
- executionId: string;
183
- status: string;
184
- result?: unknown;
185
- error?: string;
186
- nodesExecuted?: number;
187
- }
188
- export interface VigFlowExecutionStatus {
189
- id: string;
190
- workflowId: string;
191
- status: string;
192
- startedAt?: string;
193
- completedAt?: string;
194
- nodesExecuted?: number;
195
- totalNodes?: number;
196
- result?: unknown;
197
- error?: string;
198
- progress?: Record<string, unknown>;
199
- duration?: number;
200
- }
67
+ export type { FrontendPreviewGateResult } from './frontend-preview-service.js';
68
+ export type { OperatorWorkflowResponse } from './operator-client.js';
69
+ export type { APIHealthStatus, CapabilityTruthStatus, EndpointHealthStatus } from './capability-health-service.js';
70
+ export type { ResolvedVigFlowWorkflowTarget, VigFlowExecutionResult, VigFlowExecutionStatus, VigFlowTemplateSummary, VigFlowWorkflowCreation, VigFlowWorkflowSummary, } from './vigflow-client.js';
201
71
  export interface VigthoriUser {
202
72
  id: string;
203
73
  username: string;
@@ -219,17 +89,29 @@ export declare class APIClient {
219
89
  private modelRouterClient;
220
90
  private selfHostedModelRouterClient;
221
91
  private config;
92
+ private authSession;
93
+ private unsubscribeAuthInvalidation;
222
94
  private logger;
223
- private ws;
224
- private vigFlowTokens;
95
+ private readonly modelGovernance;
96
+ private readonly codeOperations;
97
+ private readonly mcpContextClient;
98
+ private readonly v3AgentClient;
99
+ private readonly v3WorkspaceService;
100
+ private readonly capabilityHealthService;
101
+ private readonly modelTransportService;
102
+ private readonly operatorClient;
103
+ private readonly vigFlowClient;
225
104
  private _httpsAgent;
226
105
  private lastChatTransportErrors;
227
106
  private clientToolErrors;
228
107
  private pendingV3ClientToolTasks;
229
108
  /** Tracks files mutated via client_tool_request during an active V3 SSE stream. */
230
109
  private activeV3StreamedFiles;
231
- private activeV3StreamContext;
232
- constructor(config: Config, logger: Logger);
110
+ private lifecycleAbortController;
111
+ private readonly frontendPreviewService;
112
+ private withLifecycleSignal;
113
+ private fetch;
114
+ constructor(config: Config, logger: Logger, dependencies?: APIClientDependencies);
233
115
  /**
234
116
  * Destroy keep-alive sockets so the Node.js event loop can drain
235
117
  * naturally. Call this before exiting commands that run HTTP probes
@@ -241,7 +123,6 @@ export declare class APIClient {
241
123
  getSelfHostedModelsApiUrl(): string | null;
242
124
  login(email: string, password: string): Promise<boolean>;
243
125
  loginWithToken(token: string): Promise<boolean>;
244
- private extractUserProfile;
245
126
  private refreshToken;
246
127
  getSubscriptionStatus(): Promise<void>;
247
128
  private getAccessToken;
@@ -263,54 +144,14 @@ export declare class APIClient {
263
144
  getV3AgentBackgroundUrl(baseUrl: string, suffix?: string): string;
264
145
  getV3AgentApprovalUrl(baseUrl: string): string;
265
146
  getOperatorBaseUrls(): string[];
266
- getOperatorStreamUrl(baseUrl: string): string;
267
147
  getMcpBaseUrls(): string[];
268
148
  getVigFlowBaseUrls(): string[];
269
149
  getTemplateServiceBaseUrls(): string[];
270
- private isFrontendTask;
271
- /**
272
- * Returns true when the prompt describes a read-only / analysis task.
273
- * Used to suppress preview gate and other write-oriented side effects.
274
- */
275
150
  isAnalysisOnlyTask(message?: string, context?: Record<string, any>): boolean;
151
+ runTemplateServicePreviewGate(message?: string, context?: Record<string, any>): Promise<FrontendPreviewGateResult>;
276
152
  private normalizeWorkspaceRelativePath;
277
153
  private collectAgentStateSyncPaths;
278
- private listFrontendWorkspaceFiles;
279
- private chooseFrontendPreviewEntry;
280
154
  private extractLinkedFrontendAssets;
281
- private buildFrontendForPreview;
282
- private gatherFrontendPreviewArtifacts;
283
- private captureFrontendPreviewScreenshot;
284
- private evaluateFrontendVisualProof;
285
- private persistFrontendPreviewArtifacts;
286
- runTemplateServicePreviewGate(message?: string, context?: Record<string, any>): Promise<FrontendPreviewGateResult>;
287
- private getMcpContextCreateUrl;
288
- private getMcpContextUrl;
289
- private getMcpHeaders;
290
- getV3AgentHeaders(): Promise<Record<string, string>>;
291
- /**
292
- * Ensure the V3 service key is available in config.
293
- * If not already set via env or stored config, fetches it from the Coder API
294
- * using the current user's auth token and caches it for this session and beyond.
295
- */
296
- ensureV3ServiceKey(): Promise<void>;
297
- runV3HealthCheck(): Promise<{
298
- healthy: boolean;
299
- endpoint: string;
300
- error?: string;
301
- }>;
302
- private runV3AgentAuthPreflight;
303
- private executeV3AgentRunRequest;
304
- private getVigFlowAccessToken;
305
- private getVigFlowHeaders;
306
- private withVigFlow;
307
- /**
308
- * Build the correct sub-path for VigFlow endpoints.
309
- * Local servers (e.g. localhost:5060) need `/api/…` prefix.
310
- * The remote gateway URL already ends with `/api/vigflow`, so appending
311
- * another `/api/…` would double the prefix and cause 404s.
312
- */
313
- private vigFlowEndpoint;
314
155
  listVigFlowTemplates(options?: {
315
156
  category?: string;
316
157
  search?: string;
@@ -326,8 +167,15 @@ export declare class APIClient {
326
167
  executionOptions?: Record<string, unknown>;
327
168
  }): Promise<VigFlowExecutionResult>;
328
169
  getVigFlowExecutionStatus(executionId: string): Promise<VigFlowExecutionStatus>;
329
- /** Legacy cap — prefer resolveV3ContextCharLimit() for token-aligned budgets. */
330
- private static readonly V3_CONTEXT_CHAR_LIMIT;
170
+ getV3AgentHeaders(): Promise<Record<string, string>>;
171
+ ensureV3ServiceKey(): Promise<void>;
172
+ runV3HealthCheck(): Promise<{
173
+ healthy: boolean;
174
+ endpoint: string;
175
+ error?: string;
176
+ }>;
177
+ private runV3AgentAuthPreflight;
178
+ private executeV3AgentRunRequest;
331
179
  private static readonly HYDRATION_PRIORITY_BASENAMES;
332
180
  /** Keep critical workspace files for server hydration when context must shrink. */
333
181
  private compactWorkspaceFilesToBudget;
@@ -342,8 +190,8 @@ export declare class APIClient {
342
190
  * 5. Drop readmeExcerpt
343
191
  */
344
192
  private compactV3Context;
345
- /** Normalize common Unix-only commands before Windows cmd/powershell execution. */
346
- private normalizeWindowsRunCommand;
193
+ /** Remove server-side workspace aliases before delegated local execution. */
194
+ private normalizePortableRunCommand;
347
195
  private resolveRunCommandCwd;
348
196
  /** Remove duplicate functionIndex entries that poison model context after compaction. */
349
197
  private dedupeBrainPayload;
@@ -362,8 +210,7 @@ export declare class APIClient {
362
210
  private buildLocalWorkspaceSummary;
363
211
  /**
364
212
  * Build complete workspace hydration separately from model context.
365
- * Remote audits must inspect the same byte-complete assets the user has
366
- * locally; context compaction must never become filesystem compaction.
213
+ * Context compaction must not become filesystem compaction.
367
214
  */
368
215
  private buildOutOfBandWorkspaceFiles;
369
216
  /**
@@ -386,7 +233,6 @@ export declare class APIClient {
386
233
  private executeV3ClientToolRequest;
387
234
  private handleV3ClientToolRequest;
388
235
  private writeV3AgentWorkspaceFile;
389
- private deleteV3AgentWorkspaceFile;
390
236
  recoverAgentWorkspaceFiles(context?: Record<string, any>, streamedFiles?: Record<string, string>, expectedFiles?: string[]): void;
391
237
  normalizeAgentWorkspaceRelativePath(rawPath: string, rootPath?: string): string;
392
238
  ensureAgentFrontendPolish(message?: string, context?: Record<string, any>): Promise<void>;
@@ -417,7 +263,6 @@ export declare class APIClient {
417
263
  status: string;
418
264
  files: Record<string, string>;
419
265
  file_count: number;
420
- confirmed_mutations?: string[];
421
266
  local_workspace_path?: string;
422
267
  }>;
423
268
  applyV3BackgroundJobFiles(jobId: string, context?: Record<string, any>): Promise<{
@@ -425,7 +270,6 @@ export declare class APIClient {
425
270
  skipped: string[];
426
271
  status: string;
427
272
  }>;
428
- private formatOperatorResponse;
429
273
  runOperatorWorkflow(message: string, context?: Record<string, any>): Promise<OperatorWorkflowResponse>;
430
274
  /**
431
275
  * Chat API - Direct Vigthoria Models API Architecture
@@ -438,51 +282,10 @@ export declare class APIClient {
438
282
  *
439
283
  * NO localhost fallbacks - CLI is for external users, not server-side!
440
284
  */
441
- chat(messages: ChatMessage[], model: string, useLocal?: boolean): Promise<ChatResponse>;
442
- private shouldSkipCloudRoutes;
443
- private tryChatWithModel;
444
- private trySelfHostedChatWithModel;
445
- private getFallbackModelId;
446
- private isCloudModelId;
447
- private canUseCloudModel;
285
+ chat(messages: ChatMessage[], model: string, _useLocal?: boolean): Promise<ChatResponse>;
448
286
  private resolvePermittedModelId;
449
- private shouldSimulateCloudFailure;
450
- private shouldTrySelfHostedFallback;
451
- private isSelfHostedPreferredModel;
452
- private getSelfHostedFallbackModelId;
453
- chatStream(messages: ChatMessage[], model: string): AsyncGenerator<StreamChunk>;
454
- chatWithCallback(messages: ChatMessage[], model: string, onChunk: (chunk: string) => void, onDone: () => void, onError: (error: Error) => void): Promise<void>;
455
287
  private chatComplete;
456
288
  generateCode(prompt: string, language: string, model: string): Promise<string>;
457
- /**
458
- * Ensure code has balanced curly braces by appending missing closing braces.
459
- */
460
- private ensureBalancedBraces;
461
- /**
462
- * Quick JS/TS syntax validation using Node's built-in parser.
463
- * Returns true if the code parses without errors.
464
- */
465
- private validateJsSyntax;
466
- /**
467
- * Extract the first complete function/class from code.
468
- * Used as last-resort when the model keeps over-producing.
469
- */
470
- private extractFirstFunction;
471
- /**
472
- * Detect if code is excessively over-engineered for a short prompt.
473
- * E.g. a "multiply function" request producing 20+ lines.
474
- */
475
- private codeIsOverEngineered;
476
- /**
477
- * Detect if generated code contains DOM/HTML pollution inappropriate
478
- * for a pure programming language like JavaScript, Python, etc.
479
- */
480
- private codeContainsDomPollution;
481
- /**
482
- * Strip DOM pollution from generated code, keeping only the pure logic.
483
- * Used as last-resort fallback when the model repeatedly ignores constraints.
484
- */
485
- private stripDomPollution;
486
289
  generateProject(prompt: string, projectType: string, model: string): Promise<{
487
290
  code: string;
488
291
  plan?: any;
@@ -509,11 +312,6 @@ export declare class APIClient {
509
312
  }[];
510
313
  suggestions: string[];
511
314
  }>;
512
- /**
513
- * Lightweight client-side heuristic scan: catches common code smells
514
- * AND logic/arithmetic bugs so review never returns "score 30, no issues".
515
- */
516
- private heuristicCodeIssues;
517
315
  fixCode(code: string, language: string, fixType: string): Promise<{
518
316
  fixed: string;
519
317
  changes: {
@@ -523,29 +321,6 @@ export declare class APIClient {
523
321
  reason: string;
524
322
  }[];
525
323
  }>;
526
- /**
527
- * Compute a semantic diff between original and fixed code using
528
- * Longest Common Subsequence (LCS) to avoid the line-shift inflation
529
- * bug where inserting one line flags all subsequent lines as changed.
530
- */
531
- private computeSemanticDiff;
532
- /**
533
- * Lightweight client-side syntax error detection.
534
- * Returns a human-readable description of obvious errors, or empty string.
535
- */
536
- private detectSyntaxErrors;
537
- /**
538
- * Strip comment lines that the model added during a fix but were not
539
- * present in the original code. Used for syntax-only fixes where the
540
- * model tends to annotate its changes with "// Fixed ..." comments.
541
- */
542
- private stripInjectedComments;
543
- /**
544
- * Ensure the fixed code hasn't lost closing delimiters relative to the
545
- * original. Counts {, }, (, ), [, ] outside strings/comments and if
546
- * the fix has fewer closers than the original, appends the missing ones.
547
- */
548
- private repairBracketBalance;
549
324
  private resolveModelId;
550
325
  private getCoderHealth;
551
326
  /**
@@ -589,6 +364,7 @@ export declare class APIClient {
589
364
  recovered: boolean;
590
365
  message: string;
591
366
  }>;
367
+ private probeDevtoolsBridgeStatus;
592
368
  getDevtoolsBridgeStatus(): Promise<EndpointHealthStatus>;
593
369
  getCapabilityTruthStatus(context?: Record<string, any>): Promise<CapabilityTruthStatus>;
594
370
  getHealthStatus(): Promise<APIHealthStatus>;