@ouro.bot/cli 0.1.0-alpha.1244 → 0.1.0-alpha.1245

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,12 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.1245",
6
+ "changes": [
7
+ "Update the Ouro UI files to Ouro UI v1.3.362."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.1244",
6
12
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1244",
2
+ "runtimeVersion": "0.1.0-alpha.1245",
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.1244</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1245</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -236,6 +236,15 @@ const registryData = [
236
236
  topics: ["context", "compaction", "notes", "performance"],
237
237
  validate: validateInteger(0, 100),
238
238
  },
239
+ {
240
+ path: "context.maxStepsPerTurn",
241
+ tier: "self",
242
+ description: "Hard ceiling on provider calls in one turn.",
243
+ default: 24,
244
+ effects: "A turn starts at 8 calls and earns 4 more each time its tools make progress, up to this ceiling. Raise it for long hands-on work so a turn is not cut off mid-task.",
245
+ topics: ["context", "turn", "steps", "limit", "performance"],
246
+ validate: validateInteger(8, 200),
247
+ },
239
248
  {
240
249
  path: "phrases.thinking",
241
250
  tier: "self",
@@ -291,6 +291,7 @@ function getContextConfig(model) {
291
291
  return {
292
292
  maxTokens: override ?? (modelId ? (0, model_limits_1.getLearnedContextWindow)(modelId) ?? (0, model_capabilities_1.getModelCapabilities)(modelId).contextWindowTokens : undefined) ?? defaults.maxTokens,
293
293
  contextMargin: typeof agentContext?.contextMargin === "number" ? agentContext.contextMargin : defaults.contextMargin,
294
+ ...(Number.isInteger(agentContext?.maxStepsPerTurn) ? { maxStepsPerTurn: agentContext.maxStepsPerTurn } : {}),
294
295
  };
295
296
  }
296
297
  function getOAuthConfig() {
@@ -1316,6 +1316,7 @@ async function runAgent(messages, callbacks, channel, signal, options) {
1316
1316
  let providerIterations = 0;
1317
1317
  // Adaptive step budget: starts at the base, grows while tool calls make progress.
1318
1318
  let stepBudget = exports.MAX_PROVIDER_ITERATIONS;
1319
+ const stepBudgetCeiling = Math.max(exports.MAX_PROVIDER_ITERATIONS, (0, config_1.getContextConfig)().maxStepsPerTurn ?? exports.MAX_PROVIDER_ITERATIONS_CEILING);
1319
1320
  let lastIterationMadeProgress = false;
1320
1321
  let stepReportIteration = null;
1321
1322
  // The one tool a turn may call after its step budget is used up: settle for conversations, rest for private turns.
@@ -1325,8 +1326,8 @@ async function runAgent(messages, callbacks, channel, signal, options) {
1325
1326
  const budgetExhausted = () => {
1326
1327
  if (providerIterations < stepBudget)
1327
1328
  return false;
1328
- if (lastIterationMadeProgress && stepBudget < exports.MAX_PROVIDER_ITERATIONS_CEILING) {
1329
- stepBudget = Math.min(exports.MAX_PROVIDER_ITERATIONS_CEILING, stepBudget + exports.STEP_BUDGET_EXTENSION);
1329
+ if (lastIterationMadeProgress && stepBudget < stepBudgetCeiling) {
1330
+ stepBudget = Math.min(stepBudgetCeiling, stepBudget + exports.STEP_BUDGET_EXTENSION);
1330
1331
  (0, runtime_1.emitNervesEvent)({ component: "engine", event: "engine.step_budget_extended", message: "tool progress extended the per-turn step budget", meta: { stepBudget } });
1331
1332
  return providerIterations >= stepBudget;
1332
1333
  }
@@ -69,6 +69,9 @@ const RESTART_DELAY_CAP_SECONDS = 600;
69
69
  const STABLE_RUN_SECONDS = 600;
70
70
  /** The circuit breaker: this many crashes inside the window stops respawning. */
71
71
  const BREAKER_CRASHES = 5;
72
+ /** The daemon's stdout log is rotated past this size (5 MB), keeping one older copy, so a small disk never fills with it. */
73
+ const LOG_MAX_BYTES = 5 * 1024 * 1024;
74
+ const LOG_CHECK_SECONDS = 300;
72
75
  const BREAKER_WINDOW_SECONDS = 600;
73
76
  /** How often a supervisor waiting for memory checks MemAvailable again. */
74
77
  const MEMORY_RECHECK_SECONDS = 30;
@@ -120,6 +123,15 @@ function generateSysvInitScript(options) {
120
123
  " echo \"$(date -u +%Y-%m-%dT%H:%M:%SZ) ouro-service: $*\" >>\"$LOG_DIR/ouro-service.log\"",
121
124
  "}",
122
125
  "",
126
+ "# The daemon's stdout log would otherwise grow until the disk is full: keep one rotated copy.",
127
+ "# Copy then truncate in place, because the daemon holds the file open for appending.",
128
+ "rotate_log() {",
129
+ " file=\"$LOG_DIR/ouro-daemon-stdout.log\"",
130
+ " size=$(wc -c <\"$file\" 2>/dev/null)",
131
+ ` [ "\${size:-0}" -gt ${LOG_MAX_BYTES} ] || return 0`,
132
+ " cp \"$file\" \"$file.1\" && : >\"$file\"",
133
+ "}",
134
+ "",
123
135
  "mem_available_kb() {",
124
136
  " while read -r key value unit; do",
125
137
  " if [ \"$key\" = \"MemAvailable:\" ]; then echo \"$value\"; return; fi",
@@ -149,9 +161,12 @@ function generateSysvInitScript(options) {
149
161
  ` delay=${RESTART_DELAY_FIRST_SECONDS}`,
150
162
  " crashes=",
151
163
  " trap 'stopping=1; [ -n \"$child\" ] && kill \"$child\" 2>/dev/null' TERM INT",
164
+ ` ( while sleep ${LOG_CHECK_SECONDS}; do rotate_log; done ) &`,
165
+ " rotator=$!",
152
166
  " while [ \"$stopping\" -eq 0 ]; do",
153
167
  " wait_for_memory",
154
168
  " [ \"$stopping\" -eq 1 ] && break",
169
+ " rotate_log",
155
170
  " started=$(date +%s)",
156
171
  " # The subshell sets oom_score_adj and then becomes node, so the daemon and its workers inherit it.",
157
172
  " (",
@@ -182,6 +197,7 @@ function generateSysvInitScript(options) {
182
197
  " delay=$((delay * 2))",
183
198
  ` [ "$delay" -gt ${RESTART_DELAY_CAP_SECONDS} ] && delay=${RESTART_DELAY_CAP_SECONDS}`,
184
199
  " done",
200
+ " kill \"$rotator\" 2>/dev/null",
185
201
  " rm -f \"$PIDFILE\"",
186
202
  "}",
187
203
  "",