From 9dcdf57b009cdc3faf01697137274d13e77bb15d Mon Sep 17 00:00:00 2001 From: rUv Date: Wed, 14 Jan 2026 02:54:53 +0000 Subject: [PATCH] Checkpoint: File edits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-14T02:54:53Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../cli/src/mcp-tools/hooks-tools.ts | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts b/v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts index 899c3b1c08..4e1ffba3b0 100644 --- a/v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts +++ b/v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts @@ -1222,7 +1222,7 @@ export const hooksIntelligenceReset: MCPTool = { }, }; -// Intelligence trajectory hooks +// Intelligence trajectory hooks - REAL implementation using activeTrajectories export const hooksTrajectoryStart: MCPTool = { name: 'hooks/intelligence/trajectory-start', description: 'Begin SONA trajectory for reinforcement learning', @@ -1237,14 +1237,28 @@ export const hooksTrajectoryStart: MCPTool = { handler: async (params: Record) => { const task = params.task as string; const agent = (params.agent as string) || 'coder'; - const trajectoryId = `traj-${Date.now()}`; + const trajectoryId = `traj-${Date.now()}-${Math.random().toString(36).substring(7)}`; + const startedAt = new Date().toISOString(); + + // Create real trajectory entry in memory + const trajectory: TrajectoryData = { + id: trajectoryId, + task, + agent, + steps: [], + startedAt, + }; + + activeTrajectories.set(trajectoryId, trajectory); return { trajectoryId, task, agent, - started: new Date().toISOString(), + started: startedAt, status: 'recording', + implementation: 'real-trajectory-tracking', + activeCount: activeTrajectories.size, }; }, };