vigthoria-cli 1.9.10 → 1.9.19

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 (52) hide show
  1. package/README.md +4 -4
  2. package/dist/commands/auth.js +48 -65
  3. package/dist/commands/bridge.js +12 -19
  4. package/dist/commands/cancel.js +15 -22
  5. package/dist/commands/chat.d.ts +11 -0
  6. package/dist/commands/chat.js +404 -248
  7. package/dist/commands/config.js +31 -71
  8. package/dist/commands/deploy.js +83 -123
  9. package/dist/commands/device.d.ts +35 -0
  10. package/dist/commands/device.js +239 -0
  11. package/dist/commands/edit.js +32 -39
  12. package/dist/commands/explain.js +18 -25
  13. package/dist/commands/fork.js +22 -27
  14. package/dist/commands/generate.js +37 -44
  15. package/dist/commands/history.js +20 -25
  16. package/dist/commands/hub.js +95 -102
  17. package/dist/commands/index.js +41 -46
  18. package/dist/commands/legion.d.ts +1 -0
  19. package/dist/commands/legion.js +162 -209
  20. package/dist/commands/preview.js +60 -98
  21. package/dist/commands/replay.js +27 -32
  22. package/dist/commands/repo.js +103 -141
  23. package/dist/commands/review.js +29 -36
  24. package/dist/commands/security.js +5 -12
  25. package/dist/commands/update.js +15 -49
  26. package/dist/commands/workflow.d.ts +8 -1
  27. package/dist/commands/workflow.js +53 -19
  28. package/dist/index.js +409 -234
  29. package/dist/utils/api.d.ts +5 -0
  30. package/dist/utils/api.js +373 -166
  31. package/dist/utils/bridge-client.js +11 -52
  32. package/dist/utils/cli-state.d.ts +54 -0
  33. package/dist/utils/cli-state.js +185 -0
  34. package/dist/utils/config.d.ts +5 -0
  35. package/dist/utils/config.js +35 -14
  36. package/dist/utils/context-ranker.js +15 -21
  37. package/dist/utils/files.js +5 -42
  38. package/dist/utils/logger.js +42 -50
  39. package/dist/utils/post-write-validator.js +22 -29
  40. package/dist/utils/project-memory.d.ts +56 -0
  41. package/dist/utils/project-memory.js +289 -0
  42. package/dist/utils/session.d.ts +29 -3
  43. package/dist/utils/session.js +137 -85
  44. package/dist/utils/task-display.js +13 -20
  45. package/dist/utils/tools.d.ts +19 -0
  46. package/dist/utils/tools.js +84 -87
  47. package/dist/utils/workspace-cache.js +18 -26
  48. package/dist/utils/workspace-stream.js +26 -64
  49. package/install.ps1 +14 -0
  50. package/package.json +5 -3
  51. package/scripts/release/LOCAL_MACHINE_USER_VERIFICATION.md +1 -1
  52. package/scripts/release/validate-no-go-gates.sh +2 -2
package/README.md CHANGED
@@ -430,10 +430,10 @@ vigthoria repo clone 123
430
430
 
431
431
  | Short Name | Full Model ID | Size | Best For |
432
432
  |------------|---------------|------|----------|
433
- | `balanced` | `vigthoria-balanced-4b` | 4B | All-purpose tasks |
433
+ | `balanced` / `balanced-4b` | `vigthoria-v3-balanced-4b` | 4B | All-purpose tasks |
434
434
  | `code` / `code-v2` | `vigthoria-v2-code-8b` | 8B | Code generation & editing |
435
- | `code-v3-8b` | `vigthoria-v3-code-8b` | 8B | Next-gen coding (future) |
436
- | `code-v3-32b` / `code-32b` | `vigthoria-v3-code-32b` | 32B | Large-scale code projects |
435
+ | `code-9b` | `vigthoria-v3-code-9b` | 9B | Fast coding specialist |
436
+ | `code` / `code-35b` | `vigthoria-v3-code-35b` | 35B | Large-scale code projects |
437
437
  | `music` | `vigthoria-music-master-4b` | 4B | Music AI generation |
438
438
 
439
439
  ### External Models (Ollama Fallback)
@@ -453,7 +453,7 @@ vigthoria repo clone 123
453
453
  vigthoria chat -m code-v2
454
454
 
455
455
  # Use full model ID directly
456
- vigthoria chat -m vigthoria-v3-code-32b
456
+ vigthoria chat -m vigthoria-v3-code-35b
457
457
 
458
458
  # Force specific version
459
459
  vigthoria chat -m vigthoria-v2-code-8b
@@ -1,29 +1,12 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.loadAuthConfig = loadAuthConfig;
7
- exports.saveAuthConfig = saveAuthConfig;
8
- exports.clearAuthConfig = clearAuthConfig;
9
- exports.getAuthToken = getAuthToken;
10
- exports.login = login;
11
- exports.logout = logout;
12
- exports.whoami = whoami;
13
- exports.doctor = doctor;
14
- exports.handleLogin = handleLogin;
15
- exports.handleLogout = handleLogout;
16
- exports.statusAction = statusAction;
17
- exports.registerAuthCommands = registerAuthCommands;
18
- const chalk_1 = __importDefault(require("chalk"));
19
- const fs_1 = require("fs");
20
- const os_1 = require("os");
21
- const path_1 = __importDefault(require("path"));
22
- const readline_1 = __importDefault(require("readline"));
23
- const config_js_1 = require("../utils/config.js");
1
+ import chalk from 'chalk';
2
+ import { chmodSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'fs';
3
+ import { homedir } from 'os';
4
+ import path from 'path';
5
+ import readline from 'readline';
6
+ import { Config } from '../utils/config.js';
24
7
  const DEFAULT_API_URL = 'https://coder.vigthoria.io';
25
- const CONFIG_DIR = path_1.default.join((0, os_1.homedir)(), '.vigthoria');
26
- const CONFIG_FILE = path_1.default.join(CONFIG_DIR, 'config.json');
8
+ const CONFIG_DIR = path.join(homedir(), '.vigthoria');
9
+ const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
27
10
  const KNOWN_AUTH_BASE_URLS = ['https://coder.vigthoria.io', 'https://api.vigthoria.io'];
28
11
  class HttpError extends Error {
29
12
  status;
@@ -56,11 +39,11 @@ function getAuthBaseCandidates(seedBaseUrl) {
56
39
  return uniqueStrings([seed, ...(peer ? [peer] : []), ...KNOWN_AUTH_BASE_URLS]).map(trimTrailingSlash);
57
40
  }
58
41
  function ensureConfigDir() {
59
- if (!(0, fs_1.existsSync)(CONFIG_DIR)) {
60
- (0, fs_1.mkdirSync)(CONFIG_DIR, { recursive: true, mode: 0o700 });
42
+ if (!existsSync(CONFIG_DIR)) {
43
+ mkdirSync(CONFIG_DIR, { recursive: true, mode: 0o700 });
61
44
  }
62
45
  try {
63
- (0, fs_1.chmodSync)(CONFIG_DIR, 0o700);
46
+ chmodSync(CONFIG_DIR, 0o700);
64
47
  }
65
48
  catch {
66
49
  // Best-effort on non-POSIX filesystems.
@@ -68,7 +51,7 @@ function ensureConfigDir() {
68
51
  }
69
52
  function syncSharedConfig(config) {
70
53
  try {
71
- const shared = new config_js_1.Config();
54
+ const shared = new Config();
72
55
  shared.set('apiUrl', trimTrailingSlash(config.apiUrl || getApiUrl()));
73
56
  if (config.token) {
74
57
  shared.set('authToken', config.token);
@@ -86,7 +69,7 @@ function syncSharedConfig(config) {
86
69
  }
87
70
  function clearSharedConfigAuth() {
88
71
  try {
89
- const shared = new config_js_1.Config();
72
+ const shared = new Config();
90
73
  shared.set('authToken', null);
91
74
  shared.set('refreshToken', null);
92
75
  shared.set('userId', null);
@@ -133,12 +116,12 @@ function extractAuthUser(payload, fallbackEmail) {
133
116
  }
134
117
  return fallbackEmail ? { email: fallbackEmail } : undefined;
135
118
  }
136
- function loadAuthConfig() {
137
- if (!(0, fs_1.existsSync)(CONFIG_FILE)) {
119
+ export function loadAuthConfig() {
120
+ if (!existsSync(CONFIG_FILE)) {
138
121
  return { apiUrl: getApiUrl() };
139
122
  }
140
123
  try {
141
- const parsed = JSON.parse((0, fs_1.readFileSync)(CONFIG_FILE, 'utf8'));
124
+ const parsed = JSON.parse(readFileSync(CONFIG_FILE, 'utf8'));
142
125
  return {
143
126
  apiUrl: trimTrailingSlash(parsed.apiUrl || getApiUrl()),
144
127
  token: parsed.token || parsed.authToken,
@@ -146,28 +129,28 @@ function loadAuthConfig() {
146
129
  };
147
130
  }
148
131
  catch (error) {
149
- console.warn(chalk_1.default.yellow(`Warning: could not read auth config: ${humanMessage(error)}`));
132
+ console.warn(chalk.yellow(`Warning: could not read auth config: ${humanMessage(error)}`));
150
133
  return { apiUrl: getApiUrl() };
151
134
  }
152
135
  }
153
- function saveAuthConfig(config) {
136
+ export function saveAuthConfig(config) {
154
137
  ensureConfigDir();
155
- (0, fs_1.writeFileSync)(CONFIG_FILE, `${JSON.stringify(config, null, 2)}\n`, 'utf8');
138
+ writeFileSync(CONFIG_FILE, `${JSON.stringify(config, null, 2)}\n`, 'utf8');
156
139
  try {
157
- (0, fs_1.chmodSync)(CONFIG_FILE, 0o600);
140
+ chmodSync(CONFIG_FILE, 0o600);
158
141
  }
159
142
  catch {
160
143
  // Best-effort on non-POSIX filesystems.
161
144
  }
162
145
  syncSharedConfig(config);
163
146
  }
164
- function clearAuthConfig() {
165
- if ((0, fs_1.existsSync)(CONFIG_FILE)) {
166
- (0, fs_1.rmSync)(CONFIG_FILE, { force: true });
147
+ export function clearAuthConfig() {
148
+ if (existsSync(CONFIG_FILE)) {
149
+ rmSync(CONFIG_FILE, { force: true });
167
150
  }
168
151
  clearSharedConfigAuth();
169
152
  }
170
- function getAuthToken() {
153
+ export function getAuthToken() {
171
154
  return process.env.VIGTHORIA_TOKEN || loadAuthConfig().token;
172
155
  }
173
156
  async function requestJson(url, init) {
@@ -221,7 +204,7 @@ async function requestJson(url, init) {
221
204
  return body;
222
205
  }
223
206
  async function ask(question, hidden = false) {
224
- const rl = readline_1.default.createInterface({ input: process.stdin, output: process.stdout });
207
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
225
208
  if (!hidden) {
226
209
  try {
227
210
  return await new Promise((resolve) => rl.question(question, resolve));
@@ -258,7 +241,7 @@ function markSuccessExit() {
258
241
  function markErrorExit() {
259
242
  process.exitCode = 1;
260
243
  }
261
- async function login(email, password) {
244
+ export async function login(email, password) {
262
245
  try {
263
246
  const resolvedEmail = (email || '').trim();
264
247
  const resolvedPassword = password || '';
@@ -316,7 +299,7 @@ async function login(email, password) {
316
299
  throw new Error(message);
317
300
  }
318
301
  }
319
- async function logout() {
302
+ export async function logout() {
320
303
  const config = loadAuthConfig();
321
304
  if (config.token) {
322
305
  const bases = getAuthBaseCandidates(config.apiUrl || getApiUrl());
@@ -341,13 +324,13 @@ async function logout() {
341
324
  }
342
325
  }
343
326
  if (!remoteLogoutDone) {
344
- console.warn(chalk_1.default.yellow('Remote logout endpoint not reachable; local credentials were still cleared.'));
327
+ console.warn(chalk.yellow('Remote logout endpoint not reachable; local credentials were still cleared.'));
345
328
  }
346
329
  }
347
330
  clearAuthConfig();
348
331
  process.exitCode = 0;
349
332
  }
350
- async function whoami() {
333
+ export async function whoami() {
351
334
  const config = loadAuthConfig();
352
335
  if (!config.token) {
353
336
  return undefined;
@@ -395,7 +378,7 @@ async function whoami() {
395
378
  }
396
379
  throw new Error(`Unable to verify account on known auth endpoints. Tried ${attempted.join(', ')}`);
397
380
  }
398
- async function doctor() {
381
+ export async function doctor() {
399
382
  const config = loadAuthConfig();
400
383
  const report = {
401
384
  nodeVersion: process.version,
@@ -408,7 +391,7 @@ async function doctor() {
408
391
  process.exitCode = 0;
409
392
  return report;
410
393
  }
411
- async function handleLogin(options = {}) {
394
+ export async function handleLogin(options = {}) {
412
395
  try {
413
396
  if (options.token) {
414
397
  const config = {
@@ -417,14 +400,14 @@ async function handleLogin(options = {}) {
417
400
  success: true,
418
401
  };
419
402
  saveAuthConfig(config);
420
- console.log(chalk_1.default.green('Logged in successfully with API token.'));
403
+ console.log(chalk.green('Logged in successfully with API token.'));
421
404
  process.exitCode = 0;
422
405
  return config;
423
406
  }
424
407
  let email = options.email?.trim();
425
408
  let password = options.password;
426
409
  if (options.device) {
427
- console.log(chalk_1.default.yellow('Device-code login is not enabled by this Vigthoria service. Falling back to email and password authentication.'));
410
+ console.log(chalk.yellow('Device-code login is not enabled by this Vigthoria service. Falling back to email and password authentication.'));
428
411
  }
429
412
  if (!email) {
430
413
  email = (await ask('Email: ')).trim();
@@ -436,7 +419,7 @@ async function handleLogin(options = {}) {
436
419
  throw new Error('Email and password are required. Use --email and --password, or run vigthoria login interactively.');
437
420
  }
438
421
  const config = await login(email, password);
439
- console.log(chalk_1.default.green('Logged in successfully.'));
422
+ console.log(chalk.green('Logged in successfully.'));
440
423
  if (config.user?.email) {
441
424
  console.log(`Account: ${config.user.email}`);
442
425
  }
@@ -445,27 +428,27 @@ async function handleLogin(options = {}) {
445
428
  return config;
446
429
  }
447
430
  catch (error) {
448
- console.error(chalk_1.default.red(`Login failed: ${humanMessage(error)}`));
431
+ console.error(chalk.red(`Login failed: ${humanMessage(error)}`));
449
432
  process.exitCode = 1;
450
433
  return undefined;
451
434
  }
452
435
  }
453
- async function handleLogout(_options) {
436
+ export async function handleLogout(_options) {
454
437
  try {
455
438
  await logout();
456
- console.log(chalk_1.default.green('Logged out successfully.'));
439
+ console.log(chalk.green('Logged out successfully.'));
457
440
  process.exitCode = 0;
458
441
  }
459
442
  catch (error) {
460
- console.error(chalk_1.default.red(`Logout failed: ${humanMessage(error)}`));
443
+ console.error(chalk.red(`Logout failed: ${humanMessage(error)}`));
461
444
  process.exitCode = 1;
462
445
  }
463
446
  }
464
- async function statusAction() {
447
+ export async function statusAction() {
465
448
  try {
466
449
  const config = loadAuthConfig();
467
450
  if (!config.token) {
468
- console.log(chalk_1.default.yellow('Not logged in.'));
451
+ console.log(chalk.yellow('Not logged in.'));
469
452
  process.exitCode = 0;
470
453
  return;
471
454
  }
@@ -476,7 +459,7 @@ async function statusAction() {
476
459
  catch {
477
460
  // Keep local status available even if remote whoami endpoint is down.
478
461
  }
479
- const sharedConfig = new config_js_1.Config();
462
+ const sharedConfig = new Config();
480
463
  let overallStatus = 'Unknown';
481
464
  let coderStatus = 'Unknown';
482
465
  let modelsStatus = 'Unknown';
@@ -497,8 +480,8 @@ async function statusAction() {
497
480
  // Status should still render even if health probes fail.
498
481
  }
499
482
  const plan = String(sharedConfig.get('subscription')?.plan || '').trim();
500
- console.log(chalk_1.default.white('Account Status'));
501
- console.log(chalk_1.default.green('Logged in.'));
483
+ console.log(chalk.white('Account Status'));
484
+ console.log(chalk.green('Logged in.'));
502
485
  if (user?.email) {
503
486
  console.log(`Account: ${user.email}`);
504
487
  }
@@ -512,11 +495,11 @@ async function statusAction() {
512
495
  process.exitCode = 0;
513
496
  }
514
497
  catch (error) {
515
- console.error(chalk_1.default.red(`Unable to read status: ${humanMessage(error)}`));
498
+ console.error(chalk.red(`Unable to read status: ${humanMessage(error)}`));
516
499
  process.exitCode = 1;
517
500
  }
518
501
  }
519
- function registerAuthCommands(program) {
502
+ export function registerAuthCommands(program) {
520
503
  const auth = program.command('auth').description('Manage Vigthoria CLI authentication');
521
504
  auth
522
505
  .command('login')
@@ -541,16 +524,16 @@ function registerAuthCommands(program) {
541
524
  try {
542
525
  const user = await whoami();
543
526
  if (!user) {
544
- console.log(chalk_1.default.yellow('Not logged in.'));
527
+ console.log(chalk.yellow('Not logged in.'));
545
528
  process.exitCode = 0;
546
529
  return;
547
530
  }
548
- console.log(chalk_1.default.green('Logged in.'));
531
+ console.log(chalk.green('Logged in.'));
549
532
  console.log(user.email || user.name || user.id || 'Authenticated user');
550
533
  process.exitCode = 0;
551
534
  }
552
535
  catch (error) {
553
- console.error(chalk_1.default.red(`Unable to fetch account: ${humanMessage(error)}`));
536
+ console.error(chalk.red(`Unable to fetch account: ${humanMessage(error)}`));
554
537
  process.exitCode = 1;
555
538
  }
556
539
  });
@@ -1,34 +1,27 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.BridgeCommand = void 0;
7
- const chalk_1 = __importDefault(require("chalk"));
8
- const logger_js_1 = require("../utils/logger.js");
9
- const api_js_1 = require("../utils/api.js");
10
- class BridgeCommand {
1
+ import chalk from 'chalk';
2
+ import { createSpinner } from '../utils/logger.js';
3
+ import { APIClient } from '../utils/api.js';
4
+ export class BridgeCommand {
11
5
  api;
12
6
  constructor(config, logger) {
13
- this.api = new api_js_1.APIClient(config, logger);
7
+ this.api = new APIClient(config, logger);
14
8
  }
15
9
  async status() {
16
- const spinner = (0, logger_js_1.createSpinner)('Checking DevTools Bridge...').start();
10
+ const spinner = createSpinner('Checking DevTools Bridge...').start();
17
11
  const bridge = await this.api.getDevtoolsBridgeStatus();
18
12
  spinner.stop();
19
13
  console.log();
20
- console.log(chalk_1.default.white('DevTools Bridge:'));
21
- console.log(chalk_1.default.gray(' Status: ') + (bridge.ok ? chalk_1.default.green('Reachable') : chalk_1.default.yellow('Not running')));
14
+ console.log(chalk.white('DevTools Bridge:'));
15
+ console.log(chalk.gray(' Status: ') + (bridge.ok ? chalk.green('Reachable') : chalk.yellow('Not running')));
22
16
  if (!bridge.ok) {
23
17
  const detail = String(bridge.error || 'Connection refused').trim() || 'Connection refused';
24
- console.log(chalk_1.default.gray(' Error: ') + chalk_1.default.yellow(detail));
18
+ console.log(chalk.gray(' Error: ') + chalk.yellow(detail));
25
19
  }
26
- console.log(chalk_1.default.gray(' Browser tasks: ') + (bridge.ok
27
- ? chalk_1.default.green('Local browser observability is available for debugging flows.')
28
- : chalk_1.default.gray('Start the DevTools Bridge to enable local browser observability.')));
20
+ console.log(chalk.gray(' Browser tasks: ') + (bridge.ok
21
+ ? chalk.green('Local browser observability is available for debugging flows.')
22
+ : chalk.gray('Start the DevTools Bridge to enable local browser observability.')));
29
23
  console.log();
30
24
  this.api.destroy();
31
25
  process.exitCode = 0;
32
26
  }
33
27
  }
34
- exports.BridgeCommand = BridgeCommand;
@@ -1,10 +1,4 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CancelCommand = void 0;
7
- const api_js_1 = require("../utils/api.js");
1
+ import { isServerRuntime } from '../utils/api.js';
8
2
  /**
9
3
  * cancel.ts — Cancel an in-flight V3 agent run, or cancel all active runs.
10
4
  *
@@ -13,9 +7,9 @@ const api_js_1 = require("../utils/api.js");
13
7
  * vig cancel --all Cancel every currently-active run
14
8
  * vig cancel --list Just list active runs (no cancellation)
15
9
  */
16
- const chalk_1 = __importDefault(require("chalk"));
17
- const logger_js_1 = require("../utils/logger.js");
18
- class CancelCommand {
10
+ import chalk from 'chalk';
11
+ import { createSpinner, CH } from '../utils/logger.js';
12
+ export class CancelCommand {
19
13
  config;
20
14
  logger;
21
15
  constructor(config, logger) {
@@ -38,7 +32,7 @@ class CancelCommand {
38
32
  }
39
33
  getBaseUrl() {
40
34
  const configuredApiUrl = String(this.config.get('apiUrl') || 'https://coder.vigthoria.io').replace(/\/$/, '');
41
- const allowLocal = (0, api_js_1.isServerRuntime)() && process.env.VIGTHORIA_ALLOW_LOCAL_V3_AGENT === '1';
35
+ const allowLocal = isServerRuntime() && process.env.VIGTHORIA_ALLOW_LOCAL_V3_AGENT === '1';
42
36
  return (process.env.VIGTHORIA_V3_AGENT_URL ||
43
37
  process.env.V3_AGENT_URL ||
44
38
  (allowLocal ? 'http://127.0.0.1:8030' : null) ||
@@ -80,7 +74,7 @@ class CancelCommand {
80
74
  async run(contextId, options) {
81
75
  const baseUrl = this.getBaseUrl();
82
76
  if (options.list) {
83
- const spinner = (0, logger_js_1.createSpinner)('Loading active runs...').start();
77
+ const spinner = createSpinner('Loading active runs...').start();
84
78
  const active = await this.listActive(baseUrl);
85
79
  spinner.stop();
86
80
  if (!active)
@@ -90,34 +84,34 @@ class CancelCommand {
90
84
  return;
91
85
  }
92
86
  if (active.active_count === 0) {
93
- this.logger.info(chalk_1.default.dim('No active runs.'));
87
+ this.logger.info(chalk.dim('No active runs.'));
94
88
  return;
95
89
  }
96
- console.log(chalk_1.default.bold(`\n${logger_js_1.CH.success} Active Runs (${active.active_count}/${active.max_concurrent_runs})\n`));
90
+ console.log(chalk.bold(`\n${CH.success} Active Runs (${active.active_count}/${active.max_concurrent_runs})\n`));
97
91
  for (const cid of active.active_context_ids) {
98
- console.log(` ${chalk_1.default.cyan(cid)}`);
92
+ console.log(` ${chalk.cyan(cid)}`);
99
93
  }
100
94
  console.log();
101
95
  return;
102
96
  }
103
97
  if (options.all) {
104
- const spinner = (0, logger_js_1.createSpinner)('Loading active runs...').start();
98
+ const spinner = createSpinner('Loading active runs...').start();
105
99
  const active = await this.listActive(baseUrl);
106
100
  spinner.stop();
107
101
  if (!active)
108
102
  return;
109
103
  if (active.active_count === 0) {
110
- this.logger.info(chalk_1.default.dim('No active runs to cancel.'));
104
+ this.logger.info(chalk.dim('No active runs to cancel.'));
111
105
  return;
112
106
  }
113
107
  const results = [];
114
108
  for (const cid of active.active_context_ids) {
115
- const sp = (0, logger_js_1.createSpinner)(`Cancelling ${cid}...`).start();
109
+ const sp = createSpinner(`Cancelling ${cid}...`).start();
116
110
  const r = await this.cancelOne(baseUrl, cid);
117
111
  sp.stop();
118
112
  if (r) {
119
113
  results.push(r);
120
- this.logger.success(`Cancelled ${chalk_1.default.cyan(cid)} (asyncio_cancelled=${r.asyncio_cancelled})`);
114
+ this.logger.success(`Cancelled ${chalk.cyan(cid)} (asyncio_cancelled=${r.asyncio_cancelled})`);
121
115
  }
122
116
  }
123
117
  if (options.json)
@@ -128,7 +122,7 @@ class CancelCommand {
128
122
  this.logger.error('Usage: vig cancel <context_id> | --all | --list');
129
123
  return;
130
124
  }
131
- const spinner = (0, logger_js_1.createSpinner)(`Cancelling ${contextId}...`).start();
125
+ const spinner = createSpinner(`Cancelling ${contextId}...`).start();
132
126
  const r = await this.cancelOne(baseUrl, contextId);
133
127
  spinner.stop();
134
128
  if (!r)
@@ -137,8 +131,7 @@ class CancelCommand {
137
131
  console.log(JSON.stringify(r, null, 2));
138
132
  return;
139
133
  }
140
- this.logger.success(`Cancelled ${chalk_1.default.cyan(contextId)} ` +
134
+ this.logger.success(`Cancelled ${chalk.cyan(contextId)} ` +
141
135
  `(asyncio_cancelled=${r.asyncio_cancelled}, active_runs_after=${r.active_runs_after})`);
142
136
  }
143
137
  }
144
- exports.CancelCommand = CancelCommand;
@@ -24,6 +24,7 @@ export declare class ChatCommand {
24
24
  private messages;
25
25
  private tools;
26
26
  private sessionManager;
27
+ private projectMemory;
27
28
  private currentSession;
28
29
  private agentMode;
29
30
  private currentProjectPath;
@@ -79,6 +80,9 @@ export declare class ChatCommand {
79
80
  private inferAgentTaskType;
80
81
  private buildTaskShapingInstructions;
81
82
  private buildExecutionPrompt;
83
+ private isProjectBrainRuntimeDisabled;
84
+ private buildProjectBrainRuntimeContext;
85
+ private rememberBrainEvent;
82
86
  private getPromptRuntimeContext;
83
87
  private v3IterationCount;
84
88
  private v3ToolCallCount;
@@ -129,11 +133,15 @@ export declare class ChatCommand {
129
133
  private runAgentTurn;
130
134
  private runLocalAgentLoop;
131
135
  private tryDirectSingleFileFlow;
136
+ private isConfirmationFollowUp;
137
+ private getPreviousActionablePrompt;
138
+ private buildContextualAgentPrompt;
132
139
  private tryV3AgentWorkflow;
133
140
  private tryRecoverV3ServiceAndRetry;
134
141
  private startInteractiveChat;
135
142
  private showHelp;
136
143
  private showContext;
144
+ private showProjectMemory;
137
145
  private compactCurrentSession;
138
146
  private ensureAgentSystemPrompt;
139
147
  private buildAgentSystemPrompt;
@@ -155,6 +163,8 @@ export declare class ChatCommand {
155
163
  */
156
164
  private computeCrossFileKeyEvidence;
157
165
  private extractToolCalls;
166
+ private normalizeCliToolName;
167
+ private parseLegacyFunctionToolCalls;
158
168
  private parseToolPayload;
159
169
  private stripToolPayloads;
160
170
  private extractFinalFileContent;
@@ -179,6 +189,7 @@ export declare class ChatCommand {
179
189
  private executeToolCalls;
180
190
  private formatToolResult;
181
191
  private truncateText;
192
+ private getLastUserPrompt;
182
193
  private saveSession;
183
194
  private requestPermission;
184
195
  getCurrentSessionInfo(): string;