@ouro.bot/cli 0.1.0-alpha.595 → 0.1.0-alpha.597
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/changelog.json +12 -0
- package/dist/heart/awaiting/await-alert.js +146 -0
- package/dist/heart/awaiting/await-expiry.js +108 -0
- package/dist/heart/awaiting/await-loader.js +91 -0
- package/dist/heart/awaiting/await-parser.js +141 -0
- package/dist/heart/awaiting/await-runtime-state.js +97 -0
- package/dist/heart/awaiting/await-scheduler.js +377 -0
- package/dist/heart/commitments.js +35 -4
- package/dist/heart/daemon/cli-parse.js +8 -1
- package/dist/heart/daemon/daemon-entry.js +98 -0
- package/dist/heart/daemon/daemon.js +7 -0
- package/dist/mind/prompt.js +13 -2
- package/dist/repertoire/tools-awaiting.js +360 -0
- package/dist/repertoire/tools-base.js +4 -0
- package/dist/repertoire/tools-obligations.js +142 -0
- package/dist/senses/await-turn-message.js +58 -0
- package/dist/senses/inner-dialog-worker.js +13 -3
- package/dist/senses/inner-dialog.js +42 -0
- package/package.json +1 -1
|
@@ -69,6 +69,9 @@ const manager_1 = require("../heart/bridges/manager");
|
|
|
69
69
|
const session_activity_1 = require("../heart/session-activity");
|
|
70
70
|
const bluebubbles_1 = require("./bluebubbles");
|
|
71
71
|
const habit_turn_message_1 = require("./habit-turn-message");
|
|
72
|
+
const await_turn_message_1 = require("./await-turn-message");
|
|
73
|
+
const await_parser_1 = require("../heart/awaiting/await-parser");
|
|
74
|
+
const await_runtime_state_1 = require("../heart/awaiting/await-runtime-state");
|
|
72
75
|
const journal_index_1 = require("../mind/journal-index");
|
|
73
76
|
const habit_parser_1 = require("../heart/habits/habit-parser");
|
|
74
77
|
const habit_runtime_state_1 = require("../heart/habits/habit-runtime-state");
|
|
@@ -625,6 +628,45 @@ async function runInnerDialogTurn(options) {
|
|
|
625
628
|
/* v8 ignore stop */
|
|
626
629
|
}
|
|
627
630
|
}
|
|
631
|
+
else if (reason === "await" && options?.awaitName) {
|
|
632
|
+
const agentRoot = (0, identity_1.getAgentRoot)();
|
|
633
|
+
const awaitName = options.awaitName;
|
|
634
|
+
const awaitFilePath = path.join(agentRoot, "awaiting", `${awaitName}.md`);
|
|
635
|
+
let awaitBody;
|
|
636
|
+
let condition = null;
|
|
637
|
+
let lastCheckedAt = null;
|
|
638
|
+
let lastObservation = null;
|
|
639
|
+
let checkedCount = 0;
|
|
640
|
+
let awaitFound = false;
|
|
641
|
+
try {
|
|
642
|
+
const awaitContent = fs.readFileSync(awaitFilePath, "utf-8");
|
|
643
|
+
const parsed = (0, await_runtime_state_1.applyAwaitRuntimeState)(agentRoot, (0, await_parser_1.parseAwaitFile)(awaitContent, awaitFilePath));
|
|
644
|
+
awaitFound = true;
|
|
645
|
+
awaitBody = parsed.body || undefined;
|
|
646
|
+
condition = parsed.condition;
|
|
647
|
+
lastCheckedAt = parsed.last_checked ?? null;
|
|
648
|
+
lastObservation = parsed.last_observation ?? null;
|
|
649
|
+
checkedCount = parsed.checked_count ?? 0;
|
|
650
|
+
}
|
|
651
|
+
catch {
|
|
652
|
+
// file missing — fall through to error message
|
|
653
|
+
}
|
|
654
|
+
if (!awaitFound || !condition) {
|
|
655
|
+
userContent = `await "${awaitName}" could not be read (file not found or no condition). check awaiting/${awaitName}.md.`;
|
|
656
|
+
}
|
|
657
|
+
else {
|
|
658
|
+
userContent = (0, await_turn_message_1.buildAwaitTurnMessage)({
|
|
659
|
+
awaitName,
|
|
660
|
+
condition,
|
|
661
|
+
body: awaitBody,
|
|
662
|
+
lastCheckedAt,
|
|
663
|
+
lastObservation,
|
|
664
|
+
checkedCount,
|
|
665
|
+
checkpoint: displayCheckpoint(state.checkpoint),
|
|
666
|
+
now,
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
}
|
|
628
670
|
else {
|
|
629
671
|
userContent = buildInstinctUserMessage(instincts, reason, state);
|
|
630
672
|
}
|