@0perator/operator 0.1.329 → 0.1.330
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/bus/inbox.js +15 -1
- package/package.json +1 -1
package/dist/bus/inbox.js
CHANGED
|
@@ -68,7 +68,21 @@ export function buildMentorWake(incoming, allow) {
|
|
|
68
68
|
if (!toWake.length)
|
|
69
69
|
return null;
|
|
70
70
|
return (`[mentor-wake] ${toWake.length} new bus message(s) arrived — review and act on them now:\n\n` +
|
|
71
|
-
toWake.map((m) => `--- from ${m.from}${m.subject ? ` · ${m.subject}` : ""} (${m.ts}) ---\n${m.body}`).join("\n\n")
|
|
71
|
+
toWake.map((m) => `--- from ${m.from}${m.subject ? ` · ${m.subject}` : ""} (${m.ts}) ---\n${m.body}`).join("\n\n") +
|
|
72
|
+
`\n\n${replyProtocol([...new Set(toWake.map((m) => m.from))])}`);
|
|
73
|
+
}
|
|
74
|
+
/** The reply contract a woken turn owes its sender, spelled out in the frame itself. The sender is another agent
|
|
75
|
+
* on the bus and cannot see this screen: a turn that works in silence is invisible to the teacher, and the plan
|
|
76
|
+
* message BEFORE the work is what lets the teacher stop a wrong plan early. It lived only in memories.md until
|
|
77
|
+
* 2026-10-28, when a lesson wake went straight to the fix round and never posted — the model treated "post your
|
|
78
|
+
* plan first" in the lesson body as optional; the frame is the one place every wake passes through. */
|
|
79
|
+
export function replyProtocol(senders) {
|
|
80
|
+
const send = senders.map((s) => `\`switch send ${s} "…"\``).join(" / ");
|
|
81
|
+
return (`Reply protocol — the sender cannot see this screen. Read what the message points you at, then, BEFORE any other ` +
|
|
82
|
+
`action (no edit, build, search or spawn first), send ONE plan message back with ${send}: what you understood, the ` +
|
|
83
|
+
`steps you will take, what you will verify. Then do the work. When it is done, send ONE report the same way: what ` +
|
|
84
|
+
`changed (files, commit), what you verified and HOW, what is still open. A woken turn that acts without the plan ` +
|
|
85
|
+
`message or ends without the report has broken the protocol.`);
|
|
72
86
|
}
|
|
73
87
|
/** Per-source cooldown selection for wake-on-mentor (ping-pong guard). From a buffer of pending wake messages,
|
|
74
88
|
* return the subset whose source last woke the session at least `cooldownMs` ago — a source's FIRST message is
|