vigthoria-cli 1.9.2 → 1.9.8

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/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Vigthoria CLI
2
2
 
3
- AI-powered terminal coding assistant for Vigthoria Coder subscribers.
4
-
5
- AI-powered terminal coding assistant integrated with Vigthoria's AI models and subscription system.
3
+ AI-powered terminal coding assistant for Vigthoria Coder subscribers, integrated with Vigthoria's AI models, repository workflows, Cortex routing, and subscription system.
6
4
 
7
5
  ```
8
6
  ╔═══════════════════════════════════════════════════════════╗
@@ -32,7 +30,7 @@ AI-powered terminal coding assistant integrated with Vigthoria's AI models and s
32
30
 
33
31
  ## Installation
34
32
 
35
- ### Quick Install (Recommended)
33
+ Version 1.9.3 is published as `vigthoria-cli` and installs the `vigthoria`, `vig`, and `vigthoria-chat` commands. Use the platform installer for automatic setup and updates, or install the npm package globally on any Node.js 18+ platform.
36
34
 
37
35
  ### Quick Install (Linux/macOS)
38
36
 
@@ -101,7 +99,7 @@ If you see `ENOTFOUND registry.npmjs.org`, try these solutions:
101
99
  4. **Direct tarball download:**
102
100
  ```bash
103
101
  # Download directly
104
- npm install -g https://coder.vigthoria.io/releases/vigthoria-cli-1.9.2.tgz
102
+ npm install -g https://coder.vigthoria.io/releases/vigthoria-cli-1.9.8.tgz
105
103
  ```
106
104
 
107
105
  5. **Use Git clone method (no npm registry needed):**
@@ -121,6 +119,8 @@ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
121
119
 
122
120
  **Permissions:** Run PowerShell as Administrator if you get access denied errors.
123
121
 
122
+ **Update and diagnostics:** After installing or upgrading, run `vigthoria update` to check for the current release and `vigthoria doctor` to verify Node.js, platform, PATH, authentication, and network readiness.
123
+
124
124
  ## Quick Start
125
125
 
126
126
  ### 1. Login
@@ -134,6 +134,15 @@ Options:
134
134
  - API Token
135
135
  - Browser OAuth
136
136
 
137
+ Production login fixes in version 1.9.3:
138
+ - `vigthoria login --email you@example.com --password "your-password"` now performs direct email/password authentication without requiring interactive prompts.
139
+ - When device-code login is not supported by the server, the CLI falls back to a cross-platform email/password prompt.
140
+ - HTML or proxy error responses from auth endpoints are sanitized into human-readable messages, so raw HTML is never printed to the terminal.
141
+
142
+ Cortex routing in version 1.9.3:
143
+ - Use `vigthoria chat --cortex` to enable Cortex detective/architect routing through LegionOptions for deeper planning, analysis, and production-readiness audits.
144
+ - `vig c --cortex` provides the same Cortex routing shortcut for quick terminal sessions.
145
+
137
146
  ### 2. Start Chatting
138
147
 
139
148
  ```bash
@@ -216,6 +225,7 @@ Options:
216
225
  -m, --model <model> Select AI model (agent, code, code-35b, code-9b, balanced, balanced-4b, cloud, ultra)
217
226
  -p, --project <path> Set project context path
218
227
  -r, --resume Resume the latest session for this project
228
+ --cortex Enable Cortex detective/architect routing through LegionOptions for deeper planning and analysis
219
229
  ```
220
230
 
221
231
  In chat mode, you can use these special commands:
@@ -1,50 +1,40 @@
1
1
  import { Command } from 'commander';
2
- export type AuthSession = {
3
- accessToken: string;
4
- refreshToken?: string;
2
+ export interface AuthConfig {
3
+ apiUrl: string;
4
+ token?: string;
5
5
  user?: {
6
6
  id?: string;
7
7
  email?: string;
8
8
  name?: string;
9
9
  };
10
- expiresAt?: number;
10
+ }
11
+ export interface LoginResult extends AuthConfig {
12
+ success: boolean;
13
+ }
14
+ export interface DoctorReport {
15
+ nodeVersion: string;
16
+ platform: NodeJS.Platform;
17
+ arch: string;
18
+ configFile: string;
19
+ loggedIn: boolean;
11
20
  apiUrl: string;
12
- createdAt: string;
13
- updatedAt: string;
14
- };
15
- export type JwtState = {
16
- token: string | null;
17
- expiresAt: number | null;
18
- refreshToken?: string | null;
19
- apiUrl?: string | null;
20
- isExpired?: () => boolean;
21
- };
22
- export declare function readAuthSession(): AuthSession | null;
23
- export declare function clearAuthSession(state?: Partial<JwtState> | null): boolean;
24
- export declare function refreshJwtIfNeeded(state: JwtState): Promise<string | null>;
25
- export declare function loginWithToken(token: string, options?: {
26
- apiUrl?: string;
27
- }): Promise<AuthSession>;
28
- export declare function loginWithCredentials(email: string, password: string, options?: {
29
- apiUrl?: string;
30
- }): Promise<AuthSession>;
31
- export declare function loginWithDeviceCode(options?: {
32
- apiUrl?: string;
33
- pollTimeoutMs?: number;
34
- }): Promise<AuthSession>;
35
- export declare function getValidAuthSession(): Promise<AuthSession | null>;
36
- export declare function loginAction(options?: {
21
+ }
22
+ interface LoginOptions {
37
23
  token?: string;
38
24
  email?: string;
39
25
  password?: string;
40
- apiUrl?: string;
41
26
  device?: boolean;
42
- }): Promise<void>;
43
- export declare function logoutAction(state?: Partial<JwtState> | null): Promise<void>;
44
- export declare function handleLogin(config: any): Promise<void>;
45
- export declare function handleLogout(config: any): Promise<void>;
27
+ }
28
+ export declare function loadAuthConfig(): AuthConfig;
29
+ export declare function saveAuthConfig(config: AuthConfig): void;
30
+ export declare function clearAuthConfig(): void;
31
+ export declare function getAuthToken(): string | undefined;
32
+ export declare function login(email?: string, password?: string): Promise<LoginResult>;
33
+ export declare function logout(): Promise<void>;
34
+ export declare function whoami(): Promise<AuthConfig['user'] | undefined>;
35
+ export declare function doctor(): Promise<DoctorReport>;
36
+ export declare function handleLogin(options?: LoginOptions): Promise<LoginResult | undefined>;
37
+ export declare function handleLogout(_options?: unknown): Promise<void>;
46
38
  export declare function statusAction(): Promise<void>;
47
- export declare function createAuthCommand(): Command;
48
- export declare function registerAuthCommand(program: Command): Command;
49
- export declare const authCommand: Command;
50
- export default authCommand;
39
+ export declare function registerAuthCommands(program: Command): void;
40
+ export {};