@ouro.bot/cli 0.1.0-alpha.1480 → 0.1.0-alpha.1482

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 CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "_note": "Each pull request writes its own change note under changes/; the release job on main gives each landed change its version and adds the notes here (scripts/release-version.cjs). On main this file stops at the last version set by hand; the published package has every release. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.1482",
6
+ "changes": [
7
+ "The eval's real Telegram turn can now take two optional inputs, for the blind interviews' H product. One is a line added to the end of every request's system prompt (the label line). The other is a list of later owner messages answered in the same chat (the debrief), each its own turn with its own start, reply, outcome and call count. The job's reply and outcome stay the first message's. Without either input, a replay-eval turn runs and reports exactly as before.",
8
+ "A blind-interview session now reserves 45 calls before it starts, up from 44. The extra call covers the one nudge the choice question may get, so a session can never use more than it reserved. This follows the pilot amendment of 2026-11-23."
9
+ ]
10
+ },
4
11
  {
5
12
  "version": "0.1.0-alpha.1480",
6
13
  "changes": [
@@ -27,11 +34,16 @@
27
34
  {
28
35
  "version": "0.1.0-alpha.1477",
29
36
  "changes": [
30
- "New: `npm run eval:watch -- --agent-root <path>` reads a live agent's nerves logs and prints its turns as counts a day by channel: turns, how they ended, steps, step-budget stops, tool calls and errors, `find_tools` use, provider fallbacks and tokens. It reads only the lines added since its last run, follows log rotation, and stops after 30 seconds of CPU at the lowest priority. A scheduler should run the built file with `nice -n 19 node dist/eval/watch-entry.js`, since the npm script builds first. It keeps private rows under `~/.ouro-eval/watch/<agent>/` (owner-only), naming each turn only by a salted hash. It reads logs and nothing else: it never opens a session, sends nothing, starts no process, makes no model call, and refuses any write under `~/AgentBundles/` or the agent's folder. A summary line with a missing or malformed field is counted as rejected and never copied, and a field it doesn't know is left out. If it fails, it prints only an error code.",
31
- "`engine.turn_summary` is now written at every log level, so turns on the iMessage, mail and voice senses (which log only warnings and errors) are counted too. It also names the runtime version.",
32
37
  "Update the Ouro UI files to Ouro UI v1.3.488."
33
38
  ]
34
39
  },
40
+ {
41
+ "version": "0.1.0-alpha.1476",
42
+ "changes": [
43
+ "New: `npm run eval:watch -- --agent-root <path>` reads a live agent's nerves logs and prints its turns as counts a day by channel: turns, how they ended, steps, step-budget stops, tool calls and errors, `find_tools` use, provider fallbacks and tokens. It reads only the lines added since its last run, follows log rotation, and stops after 30 seconds of CPU at the lowest priority. A scheduler should run the built file with `nice -n 19 node dist/eval/watch-entry.js`, since the npm script builds first. It keeps private rows under `~/.ouro-eval/watch/<agent>/` (owner-only), naming each turn only by a salted hash. It reads logs and nothing else: it never opens a session, sends nothing, starts no process, makes no model call, and refuses any write under `~/AgentBundles/` or the agent's folder. A summary line with a missing or malformed field is counted as rejected and never copied, and a field it doesn't know is left out. If it fails, it prints only an error code.",
44
+ "`engine.turn_summary` is now written at every log level, so turns on the iMessage, mail and voice senses (which log only warnings and errors) are counted too. It also names the runtime version."
45
+ ]
46
+ },
35
47
  {
36
48
  "version": "0.1.0-alpha.1475",
37
49
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1480",
2
+ "runtimeVersion": "0.1.0-alpha.1482",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-09-03T00:00:00.000Z"
5
5
  }
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0"?>
2
2
  <Container version="2">
3
3
  <Name>ouro-butler</Name>
4
- <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1480</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1482</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -7,8 +7,11 @@ exports.guardedRuntime = guardedRuntime;
7
7
  const runtime_1 = require("../../nerves/runtime");
8
8
  const budget_1 = require("../budget");
9
9
  const protocol_1 = require("./protocol");
10
- /** A session's most calls: three jobs at 12, three debriefs at 2, the choice and the blinding check at 1 (36 + 6 + 2). */
11
- exports.SESSION_CALLS = 44;
10
+ /**
11
+ * A session's most calls: three jobs at 12, three debriefs at 2, the choice and the blinding check at 1, and the one
12
+ * nudge the choice may get (36 + 6 + 2 + 1). The pilot amendment of 2026-11-23 reserves the nudge's call too.
13
+ */
14
+ exports.SESSION_CALLS = 45;
12
15
  exports.CALL_LIMITS = { job: 12, debrief: 2, choose: 1, identify: 1 };
13
16
  function createInterviewLatch(input) {
14
17
  return {
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.recordModelTraffic = recordModelTraffic;
7
+ exports.withSystemLine = withSystemLine;
7
8
  exports.runTelegramTurn = runTelegramTurn;
8
9
  /**
9
10
  * Runs one owner Telegram turn through the production path, in-process, with an injected provider: the real
@@ -103,6 +104,31 @@ function recordModelTraffic(inner, timeline) {
103
104
  });
104
105
  return { runtime, steps: () => steps };
105
106
  }
107
+ /**
108
+ * Adds one line to the end of every request's system prompt: to the structured prompt's volatile part and to the
109
+ * system message the turn puts first, which is that prompt flattened. The turn's own state is left as it is.
110
+ */
111
+ function withSystemLine(inner, line) {
112
+ const add = (text) => text ? `${text}\n\n${line}` : line;
113
+ const withLine = (messages) => messages.map((message, index) => index === 0 && message.role === "system" && typeof message.content === "string" ? { ...message, content: add(message.content) } : message);
114
+ const streamTurn = (request) => inner.streamTurn({
115
+ ...request,
116
+ messages: withLine(request.messages),
117
+ ...(request.systemPrompt ? { systemPrompt: { ...request.systemPrompt, volatile: add(request.systemPrompt.volatile) } } : {}),
118
+ });
119
+ // A Responses-API runtime builds its instructions from the messages it was reset with, so those carry the line too.
120
+ const resetTurnState = (messages) => inner.resetTurnState(withLine(messages));
121
+ return new Proxy(inner, {
122
+ get(target, property) {
123
+ if (property === "streamTurn")
124
+ return streamTurn;
125
+ if (property === "resetTurnState")
126
+ return resetTurnState;
127
+ const value = Reflect.get(target, property);
128
+ return typeof value === "function" ? value.bind(target) : value;
129
+ },
130
+ });
131
+ }
106
132
  const idle = async () => undefined;
107
133
  const ENTITIES = { amp: "&", lt: "<", gt: ">", quot: "\"", "#39": "'" };
108
134
  /** Telegram HTML as sent, back to the text the person reads. */
@@ -123,7 +149,7 @@ async function runTelegramTurn(input) {
123
149
  node_fs_1.default.mkdirSync(node_path_1.default.dirname(sessionPath), { recursive: true });
124
150
  (0, context_1.saveSession)(sessionPath, [{ role: "system", content: "" }, ...input.prefix]);
125
151
  const timeline = [];
126
- const recorded = recordModelTraffic(input.providerRuntime, timeline);
152
+ const recorded = recordModelTraffic(input.systemLine ? withSystemLine(input.providerRuntime, input.systemLine) : input.providerRuntime, timeline);
127
153
  const withButtons = new Map();
128
154
  let messageId = 1;
129
155
  const api = {
@@ -175,24 +201,35 @@ async function runTelegramTurn(input) {
175
201
  }
176
202
  },
177
203
  });
204
+ const turns = [];
178
205
  try {
179
- await onMessage({ updateId: 1, messageId: "1", userId: OWNER_USER, chatId: OWNER_USER, text: input.userText });
206
+ // The owner's messages, one Telegram update each, in the same chat: the job, then any later ones.
207
+ for (const [index, text] of [input.userText, ...input.followUps ?? []].entries()) {
208
+ turn = undefined;
209
+ const start = timeline.length;
210
+ const stepsBefore = recorded.steps();
211
+ await onMessage({ updateId: index + 1, messageId: String(index + 1), userId: OWNER_USER, chatId: OWNER_USER, text });
212
+ if (turnError)
213
+ throw turnError;
214
+ // A bundle that already answered this message has its outcome recorded, and the sense does not run it again.
215
+ if (!turn)
216
+ throw new Error("the sense did not run the turn: this bundle already has an outcome for its message, so use a fresh bundle");
217
+ // The answer is every message sent after the model's last tool call: Telegram splits a long one into several.
218
+ const own = timeline.slice(start);
219
+ const lastCall = own.findLastIndex((entry) => entry.kind === "call");
220
+ const finalReply = own.slice(lastCall + 1).filter((entry) => !withButtons.get(entry)).map((entry) => entry.text).join("\n");
221
+ turns.push({ start, finalReply, outcome: String(turn.turnOutcome), calls: recorded.steps() - stepsBefore });
222
+ }
180
223
  }
181
224
  finally {
182
225
  await app.stop();
183
226
  }
184
- if (turnError)
185
- throw turnError;
186
- // A bundle that already answered this message has its outcome recorded, and the sense does not run it again.
187
- if (!turn)
188
- throw new Error("the sense did not run the turn: this bundle already has an outcome for its message, so use a fresh bundle");
189
- // The answer is every message sent after the model's last tool call: Telegram splits a long one into several.
190
- const lastCall = timeline.findLastIndex((entry) => entry.kind === "call");
191
227
  const result = {
192
228
  timeline,
193
- finalReply: timeline.slice(lastCall + 1).filter((entry) => !withButtons.get(entry)).map((entry) => entry.text).join("\n"),
194
- outcome: String(turn.turnOutcome),
229
+ finalReply: turns[0].finalReply,
230
+ outcome: turns[0].outcome,
195
231
  steps: recorded.steps(),
232
+ ...(input.followUps ? { turns } : {}),
196
233
  };
197
234
  (0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.telegram_turn_end", message: "eval Telegram turn finished", meta: { outcome: result.outcome, steps: result.steps } });
198
235
  return result;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1480",
3
+ "version": "0.1.0-alpha.1482",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@ouro.bot/cli",
9
- "version": "0.1.0-alpha.1480",
9
+ "version": "0.1.0-alpha.1482",
10
10
  "bundleDependencies": [
11
11
  "@ouro.bot/friends"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1480",
3
+ "version": "0.1.0-alpha.1482",
4
4
  "description": "Ouroboros, the agent harness: agents with durable memory that live where you talk (terminal, Teams, iMessage, mail, voice) and use real tools. Start with npx ouro.bot@latest.",
5
5
  "homepage": "https://ouroboros.bot/",
6
6
  "engines": {