@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.cjs
CHANGED
|
@@ -757,9 +757,12 @@ Rules:
|
|
|
757
757
|
- Max 3 lessons per conversation
|
|
758
758
|
- If no real learning happened, return []`;
|
|
759
759
|
try {
|
|
760
|
+
console.log(`[become] extracting lessons from ${agentId} (${detection.exchangeType}), text length: ${exchangeText.length}`);
|
|
760
761
|
const response = await this.analyzer.analyze(prompt);
|
|
761
762
|
const lessons = this.parseLessons(response);
|
|
763
|
+
console.log(`[become] LLM returned ${lessons.length} lessons`);
|
|
762
764
|
for (const lesson of lessons.slice(0, 3)) {
|
|
765
|
+
console.log(`[become] saving lesson: ${lesson.skill} (confidence: ${lesson.confidence})`);
|
|
763
766
|
const saved = this.store.savePending({
|
|
764
767
|
name: lesson.skill,
|
|
765
768
|
instruction: lesson.instruction.slice(0, 500),
|
|
@@ -769,13 +772,18 @@ Rules:
|
|
|
769
772
|
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
770
773
|
});
|
|
771
774
|
if (saved) {
|
|
775
|
+
console.log(`[become] lesson saved: ${saved.id}`);
|
|
772
776
|
this.trust.recordLesson(agentId);
|
|
773
777
|
if (trustLevel === "trusted") {
|
|
774
778
|
this.store.approve(saved.id);
|
|
779
|
+
console.log(`[become] auto-approved (trusted agent)`);
|
|
775
780
|
}
|
|
781
|
+
} else {
|
|
782
|
+
console.log(`[become] lesson NOT saved (duplicate or store error)`);
|
|
776
783
|
}
|
|
777
784
|
}
|
|
778
|
-
} catch {
|
|
785
|
+
} catch (err) {
|
|
786
|
+
console.log(`[become] extraction error: ${err instanceof Error ? err.message : String(err)}`);
|
|
779
787
|
}
|
|
780
788
|
}
|
|
781
789
|
parseLessons(response) {
|