vigthoria-cli 1.10.48 → 1.10.49
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/dist/commands/agent-session-menu.js +2 -8
- package/dist/commands/bridge.js +36 -9
- package/dist/commands/chat.d.ts +3 -28
- package/dist/commands/chat.js +326 -295
- package/dist/commands/fork.js +1 -1
- package/dist/commands/history.js +1 -1
- package/dist/commands/replay.js +1 -1
- package/dist/index.js +40 -214
- package/dist/utils/api.d.ts +25 -53
- package/dist/utils/api.js +300 -1443
- package/dist/utils/config.d.ts +0 -3
- package/dist/utils/config.js +2 -0
- package/dist/utils/desktop-bridge-client.d.ts +12 -0
- package/dist/utils/desktop-bridge-client.js +30 -0
- package/dist/utils/post-write-validator.js +5 -5
- package/dist/utils/tools.d.ts +0 -7
- package/dist/utils/tools.js +15 -87
- package/package.json +2 -1
- package/scripts/release/validate-no-go-gates.sh +7 -4
|
@@ -6,7 +6,6 @@ import inquirer from 'inquirer';
|
|
|
6
6
|
import * as fs from 'fs';
|
|
7
7
|
import * as os from 'os';
|
|
8
8
|
import * as path from 'path';
|
|
9
|
-
|
|
10
9
|
function validateExistingDirectory(input) {
|
|
11
10
|
const trimmed = String(input || '').trim().replace(/^['"]|['"]$/g, '');
|
|
12
11
|
if (!trimmed) {
|
|
@@ -22,11 +21,11 @@ function validateExistingDirectory(input) {
|
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
catch (error) {
|
|
25
|
-
|
|
24
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
25
|
+
return `Cannot access path: ${message}`;
|
|
26
26
|
}
|
|
27
27
|
return true;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
29
|
export function shouldShowAgentSessionMenu(options = {}) {
|
|
31
30
|
if (options.prompt) {
|
|
32
31
|
return false;
|
|
@@ -42,7 +41,6 @@ export function shouldShowAgentSessionMenu(options = {}) {
|
|
|
42
41
|
}
|
|
43
42
|
return Boolean(process.stdout.isTTY && process.stdin.isTTY);
|
|
44
43
|
}
|
|
45
|
-
|
|
46
44
|
export async function runAgentSessionMenu(defaults = {}) {
|
|
47
45
|
const session = {
|
|
48
46
|
workspacePath: path.resolve(String(defaults.workspacePath || process.cwd())),
|
|
@@ -50,7 +48,6 @@ export async function runAgentSessionMenu(defaults = {}) {
|
|
|
50
48
|
autoApprove: defaults.autoApprove === true,
|
|
51
49
|
autoSave: defaults.autoSave !== false,
|
|
52
50
|
};
|
|
53
|
-
const recentHint = String(defaults.configuredRoot || '').trim();
|
|
54
51
|
let done = false;
|
|
55
52
|
let menuPass = 0;
|
|
56
53
|
while (!done) {
|
|
@@ -64,9 +61,6 @@ export async function runAgentSessionMenu(defaults = {}) {
|
|
|
64
61
|
}
|
|
65
62
|
menuPass += 1;
|
|
66
63
|
console.log(chalk.gray(`Workspace: ${session.workspacePath}`));
|
|
67
|
-
if (recentHint && recentHint !== session.workspacePath) {
|
|
68
|
-
console.log(chalk.gray(`Configured default: ${recentHint}`));
|
|
69
|
-
}
|
|
70
64
|
console.log(chalk.gray(`Debug: ${session.debugMode ? 'on' : 'off'} | Auto-approve: ${session.autoApprove ? 'on' : 'off'} | Auto-save: ${session.autoSave ? 'on' : 'off'}`));
|
|
71
65
|
console.log();
|
|
72
66
|
const { action } = await inquirer.prompt([
|
package/dist/commands/bridge.js
CHANGED
|
@@ -1,25 +1,52 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { createSpinner } from '../utils/logger.js';
|
|
3
3
|
import { APIClient } from '../utils/api.js';
|
|
4
|
+
import { getDesktopBridgeStatus } from '../utils/desktop-bridge-client.js';
|
|
4
5
|
export class BridgeCommand {
|
|
5
6
|
api;
|
|
6
7
|
constructor(config, logger) {
|
|
7
8
|
this.api = new APIClient(config, logger);
|
|
8
9
|
}
|
|
9
10
|
async status() {
|
|
10
|
-
const spinner = createSpinner('Checking
|
|
11
|
-
const
|
|
11
|
+
const spinner = createSpinner('Checking bridges...').start();
|
|
12
|
+
const [devtoolsBridge, desktopBridge] = await Promise.all([
|
|
13
|
+
this.api.getDevtoolsBridgeStatus(),
|
|
14
|
+
getDesktopBridgeStatus(),
|
|
15
|
+
]);
|
|
12
16
|
spinner.stop();
|
|
13
17
|
console.log();
|
|
14
|
-
console.log(chalk.white('DevTools Bridge:'));
|
|
15
|
-
console.log(chalk.gray(' Status: ') + (
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
+
console.log(chalk.white('DevTools Bridge (browser, port 4016):'));
|
|
19
|
+
console.log(chalk.gray(' Status: ') + (devtoolsBridge.ok ? chalk.green('Reachable') : chalk.yellow('Not running')));
|
|
20
|
+
if (devtoolsBridge.ok) {
|
|
21
|
+
console.log(chalk.gray(' Endpoint: ') + devtoolsBridge.endpoint);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const detail = String(devtoolsBridge.error || 'Connection refused').trim() || 'Connection refused';
|
|
25
|
+
console.log(chalk.gray(' Error: ') + chalk.yellow(detail));
|
|
26
|
+
}
|
|
27
|
+
console.log(chalk.gray(' Use for: ') + (devtoolsBridge.ok
|
|
28
|
+
? chalk.green('Local browser observability in CLI chat flows.')
|
|
29
|
+
: chalk.gray('Start vigthoria-devtools-bridge on port 4016.')));
|
|
30
|
+
console.log();
|
|
31
|
+
console.log(chalk.white('Desktop Bridge (Windows desktop, port 49160):'));
|
|
32
|
+
console.log(chalk.gray(' Status: ') + (desktopBridge.ok ? chalk.green('Reachable') : chalk.yellow('Not running')));
|
|
33
|
+
if (desktopBridge.ok) {
|
|
34
|
+
console.log(chalk.gray(' Endpoint: ') + desktopBridge.endpoint);
|
|
35
|
+
if (desktopBridge.service)
|
|
36
|
+
console.log(chalk.gray(' Service: ') + desktopBridge.service);
|
|
37
|
+
if (desktopBridge.version)
|
|
38
|
+
console.log(chalk.gray(' Version: ') + desktopBridge.version);
|
|
39
|
+
console.log(chalk.gray(' Control: ') + (desktopBridge.controlEnabled ? chalk.green('enabled') : chalk.yellow('disabled')));
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
const detail = String(desktopBridge.error || 'Connection refused').trim() || 'Connection refused';
|
|
18
43
|
console.log(chalk.gray(' Error: ') + chalk.yellow(detail));
|
|
44
|
+
console.log(chalk.gray(' Windows setup: ') + 'Run extension.vigthoria.io/downloads/vigthoria-desktop-bridge-bringup.ps1');
|
|
45
|
+
console.log(chalk.gray(' Tunnel: ') + 'ssh -N -R 127.0.0.1:49160:127.0.0.1:49160 root@78.46.154.201');
|
|
19
46
|
}
|
|
20
|
-
console.log(chalk.gray('
|
|
21
|
-
? chalk.green('
|
|
22
|
-
: chalk.gray('Start
|
|
47
|
+
console.log(chalk.gray(' Use for: ') + (desktopBridge.ok
|
|
48
|
+
? chalk.green('Remote Vigthoria Code screenshots, input, and Electron DevTools (9229).')
|
|
49
|
+
: chalk.gray('Start local-desktop-bridge.js on Windows, then open the SSH reverse tunnel.')));
|
|
23
50
|
console.log();
|
|
24
51
|
this.api.destroy();
|
|
25
52
|
process.exitCode = 0;
|
package/dist/commands/chat.d.ts
CHANGED
|
@@ -26,7 +26,6 @@ export declare class ChatCommand {
|
|
|
26
26
|
private tools;
|
|
27
27
|
private sessionManager;
|
|
28
28
|
private projectMemory;
|
|
29
|
-
private workspaceBrain;
|
|
30
29
|
private currentSession;
|
|
31
30
|
private agentMode;
|
|
32
31
|
private currentProjectPath;
|
|
@@ -45,6 +44,7 @@ export declare class ChatCommand {
|
|
|
45
44
|
private modelGovernanceFallback;
|
|
46
45
|
private retryPromptSignature;
|
|
47
46
|
private retryPromptStreak;
|
|
47
|
+
private v3SuppressThinkingStream;
|
|
48
48
|
private lastAgentRunOutcome;
|
|
49
49
|
private isJwtExpirationError;
|
|
50
50
|
private isNetworkError;
|
|
@@ -62,10 +62,6 @@ export declare class ChatCommand {
|
|
|
62
62
|
private isLegacyAgentFallbackAllowed;
|
|
63
63
|
private resolveAgentExecutionPolicy;
|
|
64
64
|
private getMessagesForModel;
|
|
65
|
-
private normalizeClientV3ToolPath;
|
|
66
|
-
private resolveClientV3ToolPath;
|
|
67
|
-
private normalizeClientV3ToolArgs;
|
|
68
|
-
private executeClientV3Tool;
|
|
69
65
|
private getActivePersonaMode;
|
|
70
66
|
private buildActivePersonaOverlay;
|
|
71
67
|
private isDiagnosticPrompt;
|
|
@@ -74,9 +70,6 @@ export declare class ChatCommand {
|
|
|
74
70
|
* question — these should use analysis_only workflow, not full_autonomy.
|
|
75
71
|
*/
|
|
76
72
|
private isAnalysisLookupPrompt;
|
|
77
|
-
private isImplementationPrompt;
|
|
78
|
-
private getWindowsPromptPathRoots;
|
|
79
|
-
private findPromptDirectoryByName;
|
|
80
73
|
private extractExplicitLocalPath;
|
|
81
74
|
private isUnscopedPromptPathOverrideAllowed;
|
|
82
75
|
private isPathWithinRoot;
|
|
@@ -98,24 +91,16 @@ export declare class ChatCommand {
|
|
|
98
91
|
*/
|
|
99
92
|
private isRepoGroundedPrompt;
|
|
100
93
|
private inferAgentTaskType;
|
|
101
|
-
private bindPromptWorkspace;
|
|
102
94
|
private buildTaskShapingInstructions;
|
|
103
95
|
private buildExecutionPrompt;
|
|
104
96
|
private isProjectBrainRuntimeDisabled;
|
|
105
97
|
private buildProjectBrainRuntimeContext;
|
|
106
98
|
private rememberBrainEvent;
|
|
107
|
-
private initializeWorkspaceBrain;
|
|
108
|
-
private bootstrapWorkspaceBrain;
|
|
109
|
-
private reindexWorkspaceBrain;
|
|
110
|
-
private showBrainIndexStatus;
|
|
111
99
|
private getPromptRuntimeContext;
|
|
112
100
|
private v3IterationCount;
|
|
113
101
|
private v3ToolCallCount;
|
|
114
102
|
private v3LastActivity;
|
|
115
103
|
private v3StreamingStarted;
|
|
116
|
-
private v3StreamedTextBuffer;
|
|
117
|
-
private v3LiveToolEvidence;
|
|
118
|
-
private v3PendingToolCalls;
|
|
119
104
|
/**
|
|
120
105
|
* Strip server-internal path prefixes from tool output strings.
|
|
121
106
|
* Prevents exposing paths like /var/www/V3-Code-Agent/... to end users.
|
|
@@ -126,13 +111,7 @@ export declare class ChatCommand {
|
|
|
126
111
|
private isRawV3StreamPayload;
|
|
127
112
|
private consumeV3StreamPayload;
|
|
128
113
|
private writeV3StreamText;
|
|
129
|
-
private
|
|
130
|
-
private hasAlreadyStreamedV3Content;
|
|
131
|
-
private isThinV3Summary;
|
|
132
|
-
private shouldPrintV3FinalContent;
|
|
133
|
-
private rememberV3ToolEvidence;
|
|
134
|
-
private buildUserFacingV3RunReport;
|
|
135
|
-
private printV3UserReport;
|
|
114
|
+
private sanitizeV3VisibleStreamText;
|
|
136
115
|
private updateV3AgentSpinner;
|
|
137
116
|
private updateOperatorSpinner;
|
|
138
117
|
constructor(config: Config, logger: Logger);
|
|
@@ -168,14 +147,11 @@ export declare class ChatCommand {
|
|
|
168
147
|
private runOperatorDirectAnswer;
|
|
169
148
|
private runSimplePrompt;
|
|
170
149
|
private runAgentTurn;
|
|
171
|
-
private localAgentIterationCount;
|
|
172
|
-
private buildLocalAgentChatOptions;
|
|
173
|
-
private printChatModelPreflight;
|
|
174
150
|
private runLocalAgentLoop;
|
|
175
|
-
private primeAgentWorkspaceDiscovery;
|
|
176
151
|
private primeBypassedTargetFileContext;
|
|
177
152
|
private tryDirectSingleFileFlow;
|
|
178
153
|
private isConfirmationFollowUp;
|
|
154
|
+
private taskRequiresWorkspaceChanges;
|
|
179
155
|
private getPreviousActionablePrompt;
|
|
180
156
|
private buildContextualAgentPrompt;
|
|
181
157
|
private tryV3AgentWorkflow;
|
|
@@ -249,7 +225,6 @@ export declare class ChatCommand {
|
|
|
249
225
|
private buildLocalAnalysisFallback;
|
|
250
226
|
private tryDeterministicSingleFileRewrite;
|
|
251
227
|
private extractExactTextRequirement;
|
|
252
|
-
private tryLocalToolFallback;
|
|
253
228
|
private executeToolCalls;
|
|
254
229
|
private formatToolResult;
|
|
255
230
|
private truncateText;
|