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
@@ -1,8 +1,35 @@
1
+ import WebSocket from 'ws';
1
2
  export type PreviewRuntimeInteractionOptions = {
2
3
  key?: string;
3
4
  expectText?: string;
4
5
  requireStateChange?: boolean;
5
6
  waitMs?: number;
7
+ timeoutMs?: number;
8
+ steps?: PreviewRuntimeStep[];
9
+ workspaceRoot?: string;
10
+ };
11
+ export type PreviewRuntimeStep = {
12
+ action: 'assert' | 'click' | 'fill' | 'select' | 'press' | 'focus' | 'wait' | 'reload';
13
+ selector?: string;
14
+ value?: string;
15
+ wait_ms?: number;
16
+ offset_x_ratio?: number;
17
+ offset_y_ratio?: number;
18
+ expect_selector?: string;
19
+ expect_count?: number;
20
+ expect_text?: string;
21
+ expect_text_not?: string;
22
+ expect_canvas_nonblank?: boolean;
23
+ expect_value?: string;
24
+ expect_visible?: boolean;
25
+ expect_hidden?: boolean;
26
+ expect_attribute?: string;
27
+ expect_attribute_value?: string;
28
+ expect_attribute_absent?: string;
29
+ expect_attribute_token?: string;
30
+ expect_attribute_token_absent?: string;
31
+ expect_focused?: boolean;
32
+ expect_focus_within?: string;
6
33
  };
7
34
  export type PreviewScreenshotResult = {
8
35
  captured: boolean;
@@ -16,6 +43,9 @@ export type PreviewRuntimeInteractionResult = PreviewScreenshotResult & {
16
43
  bodyChanged?: boolean;
17
44
  visualChanged?: boolean;
18
45
  runtimeErrors?: string[];
46
+ interactionStepsRequested?: number;
47
+ interactionStepsPassed?: number;
48
+ interactionFailures?: string[];
19
49
  };
20
50
  export interface PreviewScreenshotPort {
21
51
  capture(entryAbsolutePath: string, screenshotPath: string): Promise<PreviewScreenshotResult>;
@@ -33,10 +63,61 @@ type PreviewRuntimeBrowserObservation = {
33
63
  bodyChanged: boolean;
34
64
  visualChanged: boolean;
35
65
  runtimeErrors: string[];
66
+ interactionStepsRequested?: number;
67
+ interactionStepsPassed?: number;
68
+ interactionFailures?: string[];
36
69
  };
37
70
  export type PreviewRuntimeBrowserRunner = (executablePath: string, args: readonly string[], platform: NodeJS.Platform, environment: NodeJS.ProcessEnv, screenshotPath: string, options: PreviewRuntimeInteractionOptions) => Promise<PreviewRuntimeBrowserObservation>;
71
+ export declare function assertPreviewBrowserSandboxUser(platform?: NodeJS.Platform, effectiveUserId?: number | undefined): void;
38
72
  export declare function resolvePreviewBrowserExecutable(environment?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, exists?: (candidate: string) => boolean): PreviewBrowserResolution | null;
39
73
  export declare const runPreviewBrowser: PreviewBrowserRunner;
74
+ type CdpResponse = {
75
+ id?: number;
76
+ method?: string;
77
+ params?: Record<string, any>;
78
+ result?: Record<string, any>;
79
+ error?: {
80
+ message?: string;
81
+ };
82
+ sessionId?: string;
83
+ };
84
+ declare class PreviewCdpClient {
85
+ private readonly socket;
86
+ private nextId;
87
+ private readonly pending;
88
+ private readonly eventListeners;
89
+ constructor(socket: WebSocket);
90
+ onEvent(listener: (event: CdpResponse) => void): () => void;
91
+ send(method: string, params?: Record<string, any>, sessionId?: string): Promise<Record<string, any>>;
92
+ close(): void;
93
+ private rejectPending;
94
+ }
95
+ type RuntimeKeyDefinition = {
96
+ key: string;
97
+ code: string;
98
+ virtualKeyCode: number;
99
+ text?: string;
100
+ };
101
+ type RuntimeModifierDefinition = RuntimeKeyDefinition & {
102
+ bit: number;
103
+ };
104
+ export declare function runtimeKeyChordDefinition(rawKey?: string): {
105
+ key: RuntimeKeyDefinition;
106
+ modifiers: RuntimeModifierDefinition[];
107
+ modifierMask: number;
108
+ } | null;
109
+ export declare function applyRuntimeStepAction(client: PreviewCdpClient, sessionId: string, step: PreviewRuntimeStep): Promise<void>;
110
+ export declare function waitForRuntimeActionTarget(client: PreviewCdpClient, sessionId: string, selector: string, scenarioDeadline: number): Promise<void>;
111
+ export declare function runtimeAttributeExpectationFailures(step: Pick<PreviewRuntimeStep, 'expect_attribute' | 'expect_attribute_value' | 'expect_attribute_absent' | 'expect_attribute_token' | 'expect_attribute_token_absent'>, snapshot: {
112
+ attributeValue: string | null;
113
+ absentAttributeValue: string | null;
114
+ }): string[];
115
+ export declare function runtimeVisibilityExpectationFailures(step: Pick<PreviewRuntimeStep, 'expect_visible' | 'expect_hidden'>, snapshot: {
116
+ visible: boolean;
117
+ hiddenAttribute: boolean;
118
+ hiddenProperty: boolean;
119
+ computedDisplay: string;
120
+ }): string[];
40
121
  export declare const runPreviewRuntimeBrowser: PreviewRuntimeBrowserRunner;
41
122
  /** Dependency-free system-browser adapter. No browser download or archive
42
123
  * extractor is shipped, and only fixed operating-system installation paths