@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/index.js
CHANGED
|
@@ -3277,9 +3277,12 @@ Rules:
|
|
|
3277
3277
|
- Max 3 lessons per conversation
|
|
3278
3278
|
- If no real learning happened, return []`;
|
|
3279
3279
|
try {
|
|
3280
|
+
console.log(`[become] extracting lessons from ${agentId} (${detection.exchangeType}), text length: ${exchangeText.length}`);
|
|
3280
3281
|
const response = await this.analyzer.analyze(prompt);
|
|
3281
3282
|
const lessons = this.parseLessons(response);
|
|
3283
|
+
console.log(`[become] LLM returned ${lessons.length} lessons`);
|
|
3282
3284
|
for (const lesson of lessons.slice(0, 3)) {
|
|
3285
|
+
console.log(`[become] saving lesson: ${lesson.skill} (confidence: ${lesson.confidence})`);
|
|
3283
3286
|
const saved = this.store.savePending({
|
|
3284
3287
|
name: lesson.skill,
|
|
3285
3288
|
instruction: lesson.instruction.slice(0, 500),
|
|
@@ -3289,13 +3292,18 @@ Rules:
|
|
|
3289
3292
|
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
3290
3293
|
});
|
|
3291
3294
|
if (saved) {
|
|
3295
|
+
console.log(`[become] lesson saved: ${saved.id}`);
|
|
3292
3296
|
this.trust.recordLesson(agentId);
|
|
3293
3297
|
if (trustLevel === "trusted") {
|
|
3294
3298
|
this.store.approve(saved.id);
|
|
3299
|
+
console.log(`[become] auto-approved (trusted agent)`);
|
|
3295
3300
|
}
|
|
3301
|
+
} else {
|
|
3302
|
+
console.log(`[become] lesson NOT saved (duplicate or store error)`);
|
|
3296
3303
|
}
|
|
3297
3304
|
}
|
|
3298
|
-
} catch {
|
|
3305
|
+
} catch (err) {
|
|
3306
|
+
console.log(`[become] extraction error: ${err instanceof Error ? err.message : String(err)}`);
|
|
3299
3307
|
}
|
|
3300
3308
|
}
|
|
3301
3309
|
parseLessons(response) {
|