{"record":{"id":"5f7fb3971beb0865","repo":"ruvnet/ruflo","slug":"sona-is-disabled","errorCode":null,"errorMessage":"SONA is disabled","messagePattern":"SONA is disabled","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/mcp/tools/sona-tools.ts","lineNumber":320,"sourceCode":"  }\n}\n\nfunction getState(): SONAState {\n  return SONAState.getInstance();\n}\n\n// ============================================================================\n// Tool Handlers\n// ============================================================================\n\nasync function handleTrajectoryBegin(\n  input: z.infer<typeof trajectoryBeginSchema>,\n  context?: ToolContext\n): Promise<{ trajectoryId: string; sessionId: string; startedAt: string }> {\n  const state = getState();\n\n  if (!state.enabled) {\n    throw new Error('SONA is disabled');\n  }\n\n  const trajectoryId = state.generateId('traj');\n  const sessionId = input.sessionId || state.generateId('session');\n\n  const trajectory: Trajectory = {\n    id: trajectoryId,\n    sessionId,\n    startedAt: new Date(),\n    steps: [],\n    context: input.context || {},\n  };\n\n  state.trajectories.set(trajectoryId, trajectory);\n  state.stats.trajectoryCount++;\n\n  return {\n    trajectoryId,","sourceCodeStart":302,"sourceCodeEnd":338,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/mcp/tools/sona-tools.ts#L302-L338","documentation":"A SONA trajectory/profile tool handler ran while the shared SONAState has enabled=false. The neural-optimization subsystem was switched off by configuration, so every SONA MCP tool refuses work with this sentinel error instead of silently no-oping.","triggerScenarios":"Thrown at v3/mcp/tools/sona-tools.ts:320 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable SONA in the configuration before calling SONA tools.","Check the feature flag or environment variable that disables SONA."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}