{"record":{"id":"8a05f9c5665f7421","repo":"ruvnet/ruflo","slug":"audit-service-not-found","errorCode":null,"errorMessage":"Audit service not found","messagePattern":"Audit service not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/plugin-agent-federation/src/cli-commands.ts","lineNumber":173,"sourceCode":"          console.log(`Known Peers:     ${status.knownPeers}`);\n          console.log(`Healthy:         ${status.healthy}`);\n        }\n      },\n    },\n    {\n      name: 'federation audit',\n      description: 'Query and export federation audit logs',\n      options: [\n        { name: 'compliance', description: 'Compliance mode filter (hipaa, soc2, gdpr)', type: 'string' },\n        { name: 'since', description: 'ISO 8601 start date', type: 'string' },\n        { name: 'export', short: 'e', description: 'Export format (json, csv, ndjson)', type: 'string' },\n        { name: 'limit', short: 'l', description: 'Maximum results', type: 'number', default: 50 },\n      ],\n      handler: async (args) => {\n        const context = getContext();\n        if (!context) throw new Error('Plugin not initialized');\n        const audit = context.services.get<import('./domain/services/audit-service.js').AuditService>('federation:audit');\n        if (!audit) throw new Error('Audit service not found');\n\n        const exportFormat = args['export'] as string | undefined;\n        const query = {\n          since: args['since'] ? new Date(args['since'] as string) : undefined,\n          limit: args['limit'] as number,\n        };\n\n        if (exportFormat) {\n          const output = await audit.export(query, exportFormat as any);\n          console.log(output);\n        } else {\n          const events = await audit.query(query);\n          console.log(JSON.stringify(events, null, 2));\n        }\n      },\n    },\n    {\n      name: 'federation trust elevate',","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/plugin-agent-federation/src/cli-commands.ts#L155-L191","documentation":"The 'federation audit' CLI handler found no audit service in the initialized plugin context. The plugin is up but the audit component is absent (not provided by this build or failed to register), so the audit command cannot execute.","triggerScenarios":"A CLI command requests the audit service but it is not registered in the plugin's service container.","commonSituations":"Audit service disabled or not wired during plugin setup, or wrong service key used.","solutions":["Register/inject the audit service during plugin initialization.","Verify the service key used for lookup matches the registration key."],"exampleFix":null,"handlingStrategy":"try-catch","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"}