@ouro.bot/cli 0.1.0-alpha.1616 → 0.1.0-alpha.1617

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": "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.1617",
6
+ "changes": [
7
+ "Blind interviews, product U: every arm's sandbox container now has 4 GB of memory instead of 2 GB. Grading a component built on the shadcn kit peaks at about 2 GB, so at 2 GB it thrashed until the turn's time limit and the arm ended ungraded. A guest can now name its own container memory (`memory`, such as `4g`); the household and helper containers keep 2 GB."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.1616",
6
12
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1616",
2
+ "runtimeVersion": "0.1.0-alpha.1617",
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.1616</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1617</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.U_KIT = exports.U_IMAGE = exports.U_FIDELITY = exports.U_CASE = exports.U_JOB_MESSAGE = exports.U_JOB = void 0;
3
+ exports.U_KIT = exports.U_IMAGE = exports.U_FIDELITY = exports.U_MEMORY = exports.U_CASE = exports.U_JOB_MESSAGE = exports.U_JOB = void 0;
4
4
  exports.readGrade = readGrade;
5
5
  exports.gradeU = gradeU;
6
6
  /**
@@ -72,6 +72,8 @@ function gradeU(run) {
72
72
  (0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.u_graded", message: "graded a U run", meta: { failed: failed.length, escapeHits: hits.length } });
73
73
  return { passed: failed.length === 0, reason: failed.length === 0 ? null : `failed ${failed.join(", ")}`, checks };
74
74
  }
75
+ /** U's container memory, the same in every arm: grading a component bundled from the shadcn kit needs more than 2g. */
76
+ exports.U_MEMORY = "4g";
75
77
  /** What is recorded about each U arm before any session (section 3): where it differs from the kit it stands for. */
76
78
  exports.U_FIDELITY = {
77
79
  "U:all": [
@@ -84,6 +86,7 @@ exports.U_FIDELITY = {
84
86
  "the system prompt is the Butler's persona and the label line, as in every U and X arm",
85
87
  "the page runs in jsdom with no-op stand-ins for browser features jsdom lacks (CSS.supports answering false, ResizeObserver, IntersectionObserver, matchMedia never matching, scrollIntoView, pointer capture, getAnimations, dialog show, showModal and close), the same for every arm; the kits' own tests run in real browsers",
86
88
  "every word of the brand pattern is rewritten wherever it appears, inside words too (hourOffset becomes hkitffset), in the kit and in node_modules; a scan then finds none left in the template",
89
+ `every arm's container has ${exports.U_MEMORY} of memory, where other guests have 2g: grading the shadcn arm's reference peaks at about 2,058 MiB (ouro's about 802, mui's about 491, sampled once a second), so under 2g it thrashed past the turn's time limit and the U pilot's shadcn arm ended ungraded; the limit is the same in every arm, and the shadcn arm's checks still take longer (about 79 s to grade, against 23 s and 21 s), which the model doesn't see`,
87
90
  ],
88
91
  "U:ouro": [
89
92
  "Ouro UI at 45b39c4a632b ships as copy-in source; here its 135 components (each folder's component.json list) and the 280 files they import are one package, @kit/ui, with a barrel of 668 exports, an ES module build and type declarations, without its stylesheet or design tokens",
@@ -109,6 +112,7 @@ exports.U_KIT = {
109
112
  turn: { product: session.product, arm: arm.arm, labelLine: (0, protocol_1.labelLine)(session.product, arm.label), prefix: [], userText: exports.U_JOB_MESSAGE, followUps: [debrief] },
110
113
  // The U image (deploy/eval/u): the agent image with the three kits' templates and the checking tools.
111
114
  image: exports.U_IMAGE,
115
+ memory: exports.U_MEMORY,
112
116
  }),
113
117
  canonical: (_arm, obs) => obs,
114
118
  job: (id) => id === exports.U_JOB ? exports.U_CASE : undefined,
@@ -60,10 +60,16 @@ exports.BUTLER_CONTAINERS = "^/?ouro-butler(-staging|-rollback)?$";
60
60
  exports.LIBGEN_MIRRORS = ["libgen.li", "libgen.bz", "libgen.gl", "libgen.la", "libgen.vg"];
61
61
  exports.POCKETBOOK_ADDRESS = "pocketbook@example.invalid";
62
62
  const ALIASES = ["calibre-web", "smtp", ...exports.LIBGEN_MIRRORS];
63
- const HARDENING = [
64
- "--log-driver", "none", "--read-only", "--cap-drop", "ALL", "--security-opt", "no-new-privileges", "--pids-limit", "512",
65
- "--memory", "2g", "--memory-swap", "2g", "--cpus", "2", "--ulimit", `fsize=${readback_1.SNAPSHOT_LIMITS.bytes}`,
66
- ];
63
+ /** Every container's limits; `memory` is the agent container's when its guest names one (`guest.memory`), 2g otherwise. */
64
+ function hardening(memory = "2g") {
65
+ return [
66
+ "--log-driver", "none", "--read-only", "--cap-drop", "ALL", "--security-opt", "no-new-privileges", "--pids-limit", "512",
67
+ "--memory", memory, "--memory-swap", memory, "--cpus", "2", "--ulimit", `fsize=${readback_1.SNAPSHOT_LIMITS.bytes}`,
68
+ ];
69
+ }
70
+ const HARDENING = hardening();
71
+ /** A guest's memory goes to `docker run` as one argument, so it is only ever a whole number of megabytes or gigabytes. */
72
+ const GUEST_MEMORY = /^[1-9]\d*[mg]$/;
67
73
  const STDERR_TAIL = 4000;
68
74
  function dockerCli(command = "docker") {
69
75
  return {
@@ -217,6 +223,11 @@ async function runSandboxed(input) {
217
223
  const docker = input.docker ?? dockerCli();
218
224
  const images = input.images ?? { agent: exports.SANDBOX_IMAGE, household: exports.HOUSEHOLD_IMAGE };
219
225
  const agentImage = (0, images_1.agentImageOf)(images, input.guest?.image);
226
+ const memory = input.guest?.memory;
227
+ if (memory !== undefined && !GUEST_MEMORY.test(memory))
228
+ throw new Error(`a guest's memory is a whole number of m or g, such as 4g, not ${memory}`);
229
+ if (memory !== undefined)
230
+ (0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.sandbox_guest_memory", message: "the guest's container takes its own memory", meta: { memory } });
220
231
  const profile = input.profile ?? (0, agent_profile_1.sanctuaryProfile)({ bundleDir: input.bundleDir, seedBundleDir: input.seedBundleDir });
221
232
  (0, agent_profile_1.checkProfile)(profile);
222
233
  const runId = `${exports.EVAL_RUN_PREFIX}${node_crypto_1.default.randomBytes(4).toString("hex")}`;
@@ -295,7 +306,7 @@ async function runSandboxed(input) {
295
306
  const before = (0, readback_1.snapshotFiles)(bundle, [...profile.writable]);
296
307
  started.push(agentName);
297
308
  const agent = docker.start([
298
- "run", "-i", "--rm", "--name", agentName, ...runLabels, "--network", runId, "--user", "10001:10001", ...HARDENING,
309
+ "run", "-i", "--rm", "--name", agentName, ...runLabels, "--network", runId, "--user", "10001:10001", ...hardening(memory),
299
310
  "--tmpfs", "/tmp:rw,mode=1777,size=256m", "--tmpfs", "/home/ouro:rw,uid=10001,gid=10001,mode=0700,size=256m", "--env", "HOME=/home/ouro",
300
311
  ...(0, agent_profile_1.bundleMounts)(profile, bundle),
301
312
  "-v", `${tls}/ca.pem:/etc/ssl/certs/ca-certificates.crt:ro`, "-v", `${turnFile}:/eval/turn.json:ro`,
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1616",
3
+ "version": "0.1.0-alpha.1617",
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.1616",
9
+ "version": "0.1.0-alpha.1617",
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.1616",
3
+ "version": "0.1.0-alpha.1617",
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": {