@openclawcity/become 1.0.23 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +9 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +9 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -718,9 +718,12 @@ Rules:
|
|
|
718
718
|
- Max 3 lessons per conversation
|
|
719
719
|
- If no real learning happened, return []`;
|
|
720
720
|
try {
|
|
721
|
+
console.log(`[become] extracting lessons from ${agentId} (${detection.exchangeType}), text length: ${exchangeText.length}`);
|
|
721
722
|
const response = await this.analyzer.analyze(prompt);
|
|
722
723
|
const lessons = this.parseLessons(response);
|
|
724
|
+
console.log(`[become] LLM returned ${lessons.length} lessons`);
|
|
723
725
|
for (const lesson of lessons.slice(0, 3)) {
|
|
726
|
+
console.log(`[become] saving lesson: ${lesson.skill} (confidence: ${lesson.confidence})`);
|
|
724
727
|
const saved = this.store.savePending({
|
|
725
728
|
name: lesson.skill,
|
|
726
729
|
instruction: lesson.instruction.slice(0, 500),
|
|
@@ -730,13 +733,18 @@ Rules:
|
|
|
730
733
|
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
731
734
|
});
|
|
732
735
|
if (saved) {
|
|
736
|
+
console.log(`[become] lesson saved: ${saved.id}`);
|
|
733
737
|
this.trust.recordLesson(agentId);
|
|
734
738
|
if (trustLevel === "trusted") {
|
|
735
739
|
this.store.approve(saved.id);
|
|
740
|
+
console.log(`[become] auto-approved (trusted agent)`);
|
|
736
741
|
}
|
|
742
|
+
} else {
|
|
743
|
+
console.log(`[become] lesson NOT saved (duplicate or store error)`);
|
|
737
744
|
}
|
|
738
745
|
}
|
|
739
|
-
} catch {
|
|
746
|
+
} catch (err) {
|
|
747
|
+
console.log(`[become] extraction error: ${err instanceof Error ? err.message : String(err)}`);
|
|
740
748
|
}
|
|
741
749
|
}
|
|
742
750
|
parseLessons(response) {
|