MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / recordLearningEvent

Function recordLearningEvent

src/skills/learning/ledger.ts:33–41  ·  view source on GitHub ↗
(ev: Omit<LearningEvent, 'ts'>)

Source from the content-addressed store, hash-verified

31}
32
33export async function recordLearningEvent(ev: Omit<LearningEvent, 'ts'>): Promise<void> {
34 try {
35 const full = ledgerPath();
36 await fs.mkdir(path.dirname(full), { recursive: true });
37 await fs.appendFile(full, JSON.stringify({ ts: new Date().toISOString(), ...ev }) + '\n', 'utf-8');
38 } catch (e: any) {
39 logger.debug('Learning event not recorded', { err: e?.message });
40 }
41}
42
43export interface LearningStats {
44 captured: number;

Callers 3

buildSkillCommandFunction · 0.85
curateCandidatesFunction · 0.85
runSandboxedMethod · 0.85

Calls 2

ledgerPathFunction · 0.85
debugMethod · 0.80

Tested by

no test coverage detected