fix: address GitHub issues #511, #517, #527, #531

- #511: Add gemini-3-flash model to GeminiAgent (type, RPM limits, validation)
- #517: Replace PowerShell with WMIC for Windows process management (fixes Git Bash/WSL)
- #527: Add Apple Silicon Homebrew paths for bun and uv detection
- #531: Remove duplicate type definitions from export-memories.ts using bridge file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-01-04 00:57:48 -05:00
parent bb033b95f1
commit 4d0a10c458
7 changed files with 134 additions and 96 deletions
+7 -74
View File
@@ -9,80 +9,13 @@ import { writeFileSync } from 'fs';
import { homedir } from 'os';
import { join } from 'path';
import { SettingsDefaultsManager } from '../src/shared/SettingsDefaultsManager';
interface ObservationRecord {
id: number;
memory_session_id: string;
project: string;
text: string | null;
type: string;
title: string;
subtitle: string | null;
facts: string | null;
narrative: string | null;
concepts: string | null;
files_read: string | null;
files_modified: string | null;
prompt_number: number;
discovery_tokens: number | null;
created_at: string;
created_at_epoch: number;
}
interface SdkSessionRecord {
id: number;
content_session_id: string;
memory_session_id: string;
project: string;
user_prompt: string;
started_at: string;
started_at_epoch: number;
completed_at: string | null;
completed_at_epoch: number | null;
status: string;
}
interface SessionSummaryRecord {
id: number;
memory_session_id: string;
project: string;
request: string | null;
investigated: string | null;
learned: string | null;
completed: string | null;
next_steps: string | null;
files_read: string | null;
files_edited: string | null;
notes: string | null;
prompt_number: number;
discovery_tokens: number | null;
created_at: string;
created_at_epoch: number;
}
interface UserPromptRecord {
id: number;
content_session_id: string;
prompt_number: number;
prompt_text: string;
created_at: string;
created_at_epoch: number;
}
interface ExportData {
exportedAt: string;
exportedAtEpoch: number;
query: string;
project?: string;
totalObservations: number;
totalSessions: number;
totalSummaries: number;
totalPrompts: number;
observations: ObservationRecord[];
sessions: SdkSessionRecord[];
summaries: SessionSummaryRecord[];
prompts: UserPromptRecord[];
}
import type {
ObservationRecord,
SdkSessionRecord,
SessionSummaryRecord,
UserPromptRecord,
ExportData
} from './types/export.js';
async function exportMemories(query: string, outputFile: string, project?: string) {
try {
+2 -2
View File
@@ -17,11 +17,11 @@ const IS_WINDOWS = process.platform === 'win32';
// Common installation paths (handles fresh installs before PATH reload)
const BUN_COMMON_PATHS = IS_WINDOWS
? [join(homedir(), '.bun', 'bin', 'bun.exe')]
: [join(homedir(), '.bun', 'bin', 'bun'), '/usr/local/bin/bun'];
: [join(homedir(), '.bun', 'bin', 'bun'), '/usr/local/bin/bun', '/opt/homebrew/bin/bun'];
const UV_COMMON_PATHS = IS_WINDOWS
? [join(homedir(), '.local', 'bin', 'uv.exe'), join(homedir(), '.cargo', 'bin', 'uv.exe')]
: [join(homedir(), '.local', 'bin', 'uv'), join(homedir(), '.cargo', 'bin', 'uv'), '/usr/local/bin/uv'];
: [join(homedir(), '.local', 'bin', 'uv'), join(homedir(), '.cargo', 'bin', 'uv'), '/usr/local/bin/uv', '/opt/homebrew/bin/uv'];
/**
* Get the Bun executable path (from PATH or common install locations)
+96
View File
@@ -0,0 +1,96 @@
/**
* Export/Import types for memory data
*
* These types represent the structure of exported memory data.
* They are aligned with the actual database schema and include all fields
* needed for complete data export and import operations.
*/
/**
* Observation record as stored in the database and exported
*/
export interface ObservationRecord {
id: number;
memory_session_id: string;
project: string;
text: string | null;
type: string;
title: string;
subtitle: string | null;
facts: string | null;
narrative: string | null;
concepts: string | null;
files_read: string | null;
files_modified: string | null;
prompt_number: number;
discovery_tokens: number | null;
created_at: string;
created_at_epoch: number;
}
/**
* SDK Session record as stored in the database and exported
*/
export interface SdkSessionRecord {
id: number;
content_session_id: string;
memory_session_id: string;
project: string;
user_prompt: string;
started_at: string;
started_at_epoch: number;
completed_at: string | null;
completed_at_epoch: number | null;
status: string;
}
/**
* Session Summary record as stored in the database and exported
*/
export interface SessionSummaryRecord {
id: number;
memory_session_id: string;
project: string;
request: string | null;
investigated: string | null;
learned: string | null;
completed: string | null;
next_steps: string | null;
files_read: string | null;
files_edited: string | null;
notes: string | null;
prompt_number: number;
discovery_tokens: number | null;
created_at: string;
created_at_epoch: number;
}
/**
* User Prompt record as stored in the database and exported
*/
export interface UserPromptRecord {
id: number;
content_session_id: string;
prompt_number: number;
prompt_text: string;
created_at: string;
created_at_epoch: number;
}
/**
* Complete export data structure
*/
export interface ExportData {
exportedAt: string;
exportedAtEpoch: number;
query: string;
project?: string;
totalObservations: number;
totalSessions: number;
totalSummaries: number;
totalPrompts: number;
observations: ObservationRecord[];
sessions: SdkSessionRecord[];
summaries: SessionSummaryRecord[];
prompts: UserPromptRecord[];
}