{"record":{"id":"9f4cfd345a04a37b","repo":"ruvnet/ruflo","slug":"v-error","errorCode":null,"errorMessage":"${v.error}","messagePattern":"\\$\\{v\\.error\\}","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/mcp-tools/memory-tools.ts","lineNumber":1317,"sourceCode":"    description: 'Export memory entries to a JSON file (keys, namespaces, timestamps, and values when available). Use when native Write is wrong because the data is rows in .swarm/memory.db, not a file you can copy. For ingesting an export elsewhere use memory_import. (CSV output and embedding-vector export are follow-ups.)',\n    category: 'memory',\n    inputSchema: {\n      type: 'object',\n      properties: {\n        outputPath: { type: 'string', description: 'File path to write the JSON export to' },\n        format: { type: 'string', enum: ['json', 'csv'], description: 'Export format (csv falls back to json today)' },\n        namespace: { type: 'string', description: 'Limit export to one namespace' },\n        includeVectors: { type: 'boolean', description: 'Include embedding vectors (advisory — not exported yet)' },\n      },\n      required: ['outputPath'],\n    },\n    handler: async (input) => {\n      await ensureInitialized();\n      const { listEntries } = await getMemoryFunctions();\n      const outputPath = String(input.outputPath ?? '');\n      if (!outputPath) return { error: 'outputPath is required' };\n      const namespace = input.namespace ? String(input.namespace) : undefined;\n      if (namespace) { const v = validateIdentifier(namespace, 'namespace'); if (!v.valid) throw new Error(v.error); }\n      // #2073: pass includeContent so the value field carries the actual\n      // entry body. Without this, `value` is always null because listEntries\n      // strips content by default (callers pay for the JSON parse only when\n      // they need it).\n      const all = await listEntries({ limit: 100000, namespace, includeContent: true });\n      const payload = {\n        schema: 'ruflo-memory-export/v1',\n        exportedAt: new Date().toISOString(),\n        namespace: namespace ?? null,\n        count: all.entries.length,\n        entries: all.entries.map(e => ({\n          key: e.key,\n          namespace: e.namespace,\n          // #2073: `e.content` is the stored value string; `e.value` was a\n          // never-populated alias. Fall back to null only if content is\n          // missing for backward-compat with the schema.\n          value: typeof e.content === 'string' ? e.content : ((e as { value?: unknown }).value ?? null),\n          createdAt: e.createdAt, updatedAt: e.updatedAt, accessCount: e.accessCount, hasEmbedding: e.hasEmbedding, size: e.size,","sourceCodeStart":1299,"sourceCodeEnd":1335,"githubUrl":"https://github.com/ruvnet/ruflo/blob/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/v3/@claude-flow/cli/src/mcp-tools/memory-tools.ts#L1299-L1335","documentation":"Error \"${v.error}\" thrown in ruvnet/ruflo.","triggerScenarios":"Thrown at v3/@claude-flow/cli/src/mcp-tools/memory-tools.ts:1317 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6b01dc5a687b26b3e218f796de45ec51f8fa9e8c","analyzedAt":"2026-08-12T13:20:50.148Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}