vigthoria-cli 1.13.34 → 1.13.42

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 (51) hide show
  1. package/README.md +11 -56
  2. package/SECURITY_HARDENING.md +2 -4
  3. package/dist/commands/auth.js +16 -14
  4. package/dist/commands/cancel.d.ts +1 -0
  5. package/dist/commands/cancel.js +21 -4
  6. package/dist/commands/chat.d.ts +13 -0
  7. package/dist/commands/chat.js +170 -14
  8. package/dist/commands/fork.js +8 -3
  9. package/dist/commands/history.js +8 -3
  10. package/dist/commands/legion.js +1 -1
  11. package/dist/commands/replay.js +8 -3
  12. package/dist/commands/update-registration.js +63 -206
  13. package/dist/commands/v4-menu.d.ts +0 -1
  14. package/dist/commands/v4-menu.js +8 -6
  15. package/dist/commands/v4-registration.js +0 -2
  16. package/dist/commands/v4.js +9 -4
  17. package/dist/commands/wallet.d.ts +1 -1
  18. package/dist/commands/wallet.js +3 -3
  19. package/dist/index.js +2 -3
  20. package/dist/utils/agent-stream-state.d.ts +7 -0
  21. package/dist/utils/agent-stream-state.js +31 -0
  22. package/dist/utils/agentRunOutcome.js +5 -1
  23. package/dist/utils/api.d.ts +19 -4
  24. package/dist/utils/api.js +322 -550
  25. package/dist/utils/frontend-preview-service.d.ts +10 -1
  26. package/dist/utils/frontend-preview-service.js +162 -17
  27. package/dist/utils/javascript-syntax.d.ts +19 -0
  28. package/dist/utils/javascript-syntax.js +35 -0
  29. package/dist/utils/localTestMode.js +1 -1
  30. package/dist/utils/mutation-journal.d.ts +10 -0
  31. package/dist/utils/mutation-journal.js +104 -76
  32. package/dist/utils/network-policy.js +7 -10
  33. package/dist/utils/preview-screenshot-adapter.d.ts +81 -0
  34. package/dist/utils/preview-screenshot-adapter.js +615 -38
  35. package/dist/utils/release-install.d.ts +0 -1
  36. package/dist/utils/release-install.js +44 -7
  37. package/dist/utils/requestIntent.d.ts +1 -1
  38. package/dist/utils/requestIntent.js +17 -3
  39. package/dist/utils/tools.js +21 -15
  40. package/dist/utils/update-policy.d.ts +0 -4
  41. package/dist/utils/update-policy.js +5 -9
  42. package/dist/utils/v3-agent-client.js +25 -11
  43. package/install.ps1 +30 -50
  44. package/install.sh +13 -24
  45. package/package.json +4 -2
  46. package/release-policy.json +1 -5
  47. package/scripts/release/LOCAL_MACHINE_USER_VERIFICATION.md +6 -7
  48. package/scripts/release/install-release.mjs +5 -4
  49. package/scripts/release/publish-cli-release.mjs +21 -8
  50. package/scripts/release/test-balanced-model-live.sh +4 -1
  51. package/scripts/release/validate-live-service-gates.sh +27 -5
@@ -10,9 +10,11 @@ import { type FrontendPreviewGateResult } from './frontend-preview-service.js';
10
10
  import { type APIHealthStatus, type CapabilityTruthStatus, type EndpointHealthStatus } from './capability-health-service.js';
11
11
  import { type ChatMessage, type ChatResponse } from './model-transport-service.js';
12
12
  import { type ResolvedVigFlowWorkflowTarget, type VigFlowExecutionResult, type VigFlowExecutionStatus, type VigFlowTemplateSummary, type VigFlowWorkflowCreation, type VigFlowWorkflowSummary } from './vigflow-client.js';
13
+ import { type MutationJournalReport } from './mutation-journal.js';
13
14
  export type CLIErrorCategory = 'auth' | 'repo_session' | 'model_backend' | 'bridge' | 'network' | 'timeout' | 'parsing' | 'tool_execution' | 'credits';
14
15
  export declare const VIGTHORIA_HUB_CREDITS_URL = "https://hub.vigthoria.io/credits";
15
16
  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.";
17
+ export declare function resolveSelfHostedModelAuthToken(environment?: NodeJS.ProcessEnv, userToken?: string): string;
16
18
  export type ChatRoutePreference = 'coder' | 'models' | 'selfhosted';
17
19
  export type ChatRequestOptions = {
18
20
  /** @deprecated Use connectTimeoutMs + idleTimeoutMs. Kept for legacy callers. */
@@ -118,6 +120,13 @@ export declare class APIClient {
118
120
  private pendingV3ClientToolTasks;
119
121
  /** Tracks files mutated via client_tool_request during an active V3 SSE stream. */
120
122
  private activeV3StreamedFiles;
123
+ /**
124
+ * Owns the currently open local workspace transaction for a foreground V3
125
+ * run. This must live on the API lifecycle rather than only in the async
126
+ * call stack: SIGINT/SIGTERM can otherwise terminate Node before the
127
+ * workflow catch block gets a chance to restore the workspace.
128
+ */
129
+ private activeMutationJournal;
121
130
  private lifecycleAbortController;
122
131
  private readonly frontendPreviewService;
123
132
  private withLifecycleSignal;
@@ -129,7 +138,11 @@ export declare class APIClient {
129
138
  * (e.g. `status`) to avoid the libuv UV_HANDLE_CLOSING assertion
130
139
  * on Windows / Node 25+.
131
140
  */
132
- destroy(): void;
141
+ destroy(): MutationJournalReport | null;
142
+ private trackMutationTransaction;
143
+ private releaseMutationTransaction;
144
+ private rollbackMutationTransaction;
145
+ private rollbackActiveMutationTransaction;
133
146
  /** Exposed for Balanced 4B agent routing (local inference :8016). */
134
147
  getSelfHostedModelsApiUrl(): string | null;
135
148
  login(email: string, password: string): Promise<boolean>;
@@ -212,8 +225,6 @@ export declare class APIClient {
212
225
  /** Remove duplicate functionIndex entries that poison model context after compaction. */
213
226
  private dedupeBrainPayload;
214
227
  buildMinimalV3AgentContext(context?: Record<string, any>): string;
215
- private extractEmergencyAppName;
216
- private materializeEmergencySaaSWorkspace;
217
228
  private ensureExecutionContext;
218
229
  bindExecutionContext(context?: Record<string, any>): Promise<Record<string, any>>;
219
230
  private isServerManagedTempWorkspacePath;
@@ -248,6 +259,10 @@ export declare class APIClient {
248
259
  private describeMissingV3ClientToolPath;
249
260
  private recordV3ClientToolMutation;
250
261
  private buildV3ClientToolMutation;
262
+ private validateV3ClientJavaScript;
263
+ private compactV3ClientJavaScriptSyntaxError;
264
+ private isV3ReleaseVerificationRequest;
265
+ private describeV3AuthoritativePreviewFailure;
251
266
  private executeV3ClientToolRequest;
252
267
  private handleV3ClientToolRequest;
253
268
  private writeV3AgentWorkspaceFile;
@@ -255,7 +270,7 @@ export declare class APIClient {
255
270
  normalizeAgentWorkspaceRelativePath(rawPath: string, rootPath?: string): string;
256
271
  private isExplicitSingleFileFrontendRequest;
257
272
  private isFocusedAgentRepair;
258
- private buildDirectFileRuntimeInteraction;
273
+ private buildLoopbackRuntimeInteraction;
259
274
  private buildAgentFinalPreviewContext;
260
275
  ensureAgentFrontendPolish(message?: string, context?: Record<string, any>): Promise<void>;
261
276
  private injectSectionBeforeFooter;