diff --git a/package-lock.json b/package-lock.json index e0f4b63..d16b068 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,9 +12,7 @@ "@google/generative-ai": "^0.24.1", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^20.0.0", - "@types/uuid": "^10.0.0", "dotenv": "^16.3.1", - "uuid": "^11.1.0", "zod": "^3.22.0" }, "devDependencies": { @@ -1865,12 +1863,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==", - "license": "MIT" - }, "node_modules/@types/yargs": { "version": "17.0.33", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", @@ -6556,19 +6548,6 @@ "punycode": "^2.1.0" } }, - "node_modules/uuid": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", - "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/esm/bin/uuid" - } - }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", diff --git a/package.json b/package.json index 8ff4a54..1e0cd72 100644 --- a/package.json +++ b/package.json @@ -35,9 +35,7 @@ "@google/generative-ai": "^0.24.1", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^20.0.0", - "@types/uuid": "^10.0.0", "dotenv": "^16.3.1", - "uuid": "^11.1.0", "zod": "^3.22.0" }, "devDependencies": { diff --git a/src/services/ConversationManager.ts b/src/services/ConversationManager.ts index c793a5d..6bfbe0b 100644 --- a/src/services/ConversationManager.ts +++ b/src/services/ConversationManager.ts @@ -1,4 +1,4 @@ -import { v4 as uuidv4 } from 'uuid'; +import { randomUUID } from 'node:crypto'; import { ChatSession } from '@google/generative-ai'; import { ClaudeCodeContext, DeepAnalysisResult } from '../models/types.js'; import { SessionError, SessionNotFoundError } from '../errors/index.js'; @@ -50,7 +50,7 @@ export class ConversationManager { } createSession(context: ClaudeCodeContext): string { - const sessionId = uuidv4(); + const sessionId = randomUUID(); const now = Date.now(); const state: ConversationState = { @@ -130,7 +130,7 @@ export class ConversationManager { } const turn: ConversationTurn = { - id: uuidv4(), + id: randomUUID(), role, content, timestamp: Date.now(), @@ -283,4 +283,4 @@ export class ConversationManager { .filter(s => s.status === 'active') .length; } -} \ No newline at end of file +} diff --git a/src/services/HypothesisTournamentService.ts b/src/services/HypothesisTournamentService.ts index e038abe..f5c592a 100644 --- a/src/services/HypothesisTournamentService.ts +++ b/src/services/HypothesisTournamentService.ts @@ -11,7 +11,6 @@ import type { import { ConversationalGeminiService } from './ConversationalGeminiService.js'; import { ConversationManager } from './ConversationManager.js'; import { SecureCodeReader } from '../utils/SecureCodeReader.js'; -import { v4 as uuidv4 } from 'uuid'; interface TournamentConfig { maxHypotheses: number; @@ -769,4 +768,4 @@ Do any of these insights change your analysis of the hypothesis "${result.hypoth return { primary, secondary }; } -} \ No newline at end of file +}