minovative-mind-cli 1.1.3 → 1.1.5

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.
@@ -6,6 +6,7 @@ import * as p from '@clack/prompts';
6
6
  import pc from 'picocolors';
7
7
  import { startAgentLoop } from '../services/agent.js';
8
8
  import { getAuthorizedIdToken, login } from '../services/auth.js';
9
+ import { updateWorkspaceStatus } from '../services/workspace.js';
9
10
  export default class DefaultCommand extends Command {
10
11
  static description = 'Start an interactive AI coding agent session powered by Vertex AI.';
11
12
  static examples = ['<%= config.bin %>', '<%= config.bin %> --help'];
@@ -30,6 +31,10 @@ export default class DefaultCommand extends Command {
30
31
  }
31
32
  p.log.info(`${pc.dim('Workspace:')} ${pc.cyan(workspaceRoot)}`);
32
33
  p.log.info(`${pc.dim('Commands:')} Type ${pc.yellow('/')} to open the command menu and "${pc.yellow('stop')}" to stop the ai generation. Type ${pc.yellow('exit')} to leave.`);
34
+ // Update workspace status in the background
35
+ if (idToken) {
36
+ updateWorkspaceStatus(idToken, workspaceRoot).catch(() => { });
37
+ }
33
38
  await startAgentLoop(workspaceRoot, this.config.version);
34
39
  }
35
40
  }
@@ -711,7 +711,7 @@ export async function startAgentLoop(workspaceRoot, version) {
711
711
  const selectedModel = await p.select({
712
712
  message: 'Select AI Model',
713
713
  options: [
714
- { value: 'gemini-3.1-pro', label: 'Gemini 3.1 Pro', hint: 'The newest Pro model for complex logic' },
714
+ { value: 'gemini-3.1-pro-preview', label: 'Gemini 3.1 Pro', hint: 'The newest Pro model for complex logic' },
715
715
  { value: 'gemini-3.5-flash', label: 'Gemini 3.5 Flash', hint: 'Balanced performance' },
716
716
  { value: 'gemini-2.5-pro', label: 'Gemini 2.5 Pro', hint: 'Best for complex coding & large context' },
717
717
  // {value: 'gemini-2.5-flash', label: 'Gemini 2.5 Flash', hint: 'Balanced performance'},
@@ -0,0 +1 @@
1
+ export declare function updateWorkspaceStatus(idToken: string, workspaceRoot: string): Promise<void>;
@@ -0,0 +1,51 @@
1
+ import * as path from 'path';
2
+ import { debugLog } from '../utils/logger.js';
3
+ export async function updateWorkspaceStatus(idToken, workspaceRoot) {
4
+ try {
5
+ // 1. Decode JWT to get user_id (uid)
6
+ const payloadBase64 = idToken.split('.')[1];
7
+ if (!payloadBase64)
8
+ return;
9
+ const payloadRaw = Buffer.from(payloadBase64, 'base64').toString('utf8');
10
+ const payload = JSON.parse(payloadRaw);
11
+ const uid = payload.user_id;
12
+ if (!uid)
13
+ return;
14
+ // 2. Generate a URL-safe ID for the workspace based on its path
15
+ const workspaceId = Buffer.from(workspaceRoot)
16
+ .toString('base64')
17
+ .replace(/\//g, '_')
18
+ .replace(/\+/g, '-')
19
+ .replace(/=/g, '');
20
+ // 3. Prepare the Firestore REST API payload
21
+ const url = `https://firestore.googleapis.com/v1/projects/minovative-mind-prod/databases/(default)/documents/users/${uid}/projects/${workspaceId}?updateMask.fieldPaths=name&updateMask.fieldPaths=path&updateMask.fieldPaths=workspacePath&updateMask.fieldPaths=lastUsed`;
22
+ const body = {
23
+ name: `projects/minovative-mind-prod/databases/(default)/documents/users/${uid}/projects/${workspaceId}`,
24
+ fields: {
25
+ name: { stringValue: path.basename(workspaceRoot) },
26
+ path: { stringValue: workspaceRoot },
27
+ workspacePath: { stringValue: workspaceRoot },
28
+ lastUsed: { timestampValue: new Date().toISOString() },
29
+ },
30
+ };
31
+ // 4. Send the PATCH request
32
+ const response = await fetch(url, {
33
+ method: 'PATCH',
34
+ headers: {
35
+ Authorization: `Bearer ${idToken}`,
36
+ 'Content-Type': 'application/json',
37
+ },
38
+ body: JSON.stringify(body),
39
+ });
40
+ if (!response.ok) {
41
+ const errorText = await response.text();
42
+ debugLog(`Failed to update workspace status: ${response.status} ${errorText}`);
43
+ }
44
+ else {
45
+ debugLog(`Workspace status updated successfully for ${workspaceRoot}`);
46
+ }
47
+ }
48
+ catch (error) {
49
+ debugLog(`Error updating workspace status: ${error.message}`);
50
+ }
51
+ }
@@ -4,10 +4,10 @@
4
4
  export declare const FIREBASE_API_KEY = "AIzaSyAFqOlkNO3uFGYO1kaEBGEFD9CXLt0mnIs";
5
5
  export declare const GITHUB_CLIENT_ID = "Ov23linFYFfjO3JILG7r";
6
6
  export declare const GEMINI_MODELS: {
7
+ readonly PRO_3_1: "gemini-3.1-pro-preview";
8
+ readonly FLASH_3_5: "gemini-3.5-flash";
7
9
  readonly FLASH_PRO: "gemini-2.5-pro";
8
10
  readonly FLASH_LATEST: "gemini-2.5-flash";
9
- readonly PRO_3_1: "gemini-3.1-pro";
10
- readonly FLASH_3_5: "gemini-3.5-flash";
11
11
  };
12
12
  export declare const CLAUDE_MODELS: {
13
13
  readonly OPUS: "claude-opus-4-6";
@@ -4,10 +4,10 @@
4
4
  export const FIREBASE_API_KEY = 'AIzaSyAFqOlkNO3uFGYO1kaEBGEFD9CXLt0mnIs';
5
5
  export const GITHUB_CLIENT_ID = 'Ov23linFYFfjO3JILG7r';
6
6
  export const GEMINI_MODELS = {
7
+ PRO_3_1: 'gemini-3.1-pro-preview',
8
+ FLASH_3_5: 'gemini-3.5-flash',
7
9
  FLASH_PRO: 'gemini-2.5-pro',
8
10
  FLASH_LATEST: 'gemini-2.5-flash',
9
- PRO_3_1: 'gemini-3.1-pro',
10
- FLASH_3_5: 'gemini-3.5-flash',
11
11
  };
12
12
  export const CLAUDE_MODELS = {
13
13
  OPUS: 'claude-opus-4-6',
@@ -65,5 +65,5 @@
65
65
  ]
66
66
  }
67
67
  },
68
- "version": "1.1.3"
68
+ "version": "1.1.5"
69
69
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "minovative-mind-cli",
3
3
  "description": "An automated AI agent powered by Vertex AI that helps you write software",
4
- "version": "1.1.3",
4
+ "version": "1.1.5",
5
5
  "author": "Daniel Ward",
6
6
  "bin": {
7
7
  "minovative-mind-cli": "./bin/run.js"