@ouro.bot/cli 0.1.0-alpha.995 → 0.1.0-alpha.997
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/README.md +29 -11
- package/changelog.json +14 -0
- package/deploy/unraid/sanctuary-replay-gate.mjs +38 -0
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/dist/repertoire/tools-files.js +29 -10
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,13 +4,30 @@
|
|
|
4
4
|
</p>
|
|
5
5
|
<!-- ourostack:brand:end -->
|
|
6
6
|
|
|
7
|
-
# Ouroboros
|
|
7
|
+
# Ouroboros
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Agents with durable memory that live where you already talk (terminal, Teams, iMessage, mail and voice) and use real tools.** Ouroboros is the harness they run on.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
[ouroboros.bot](https://ouroboros.bot/) · [`@ouro.bot/cli` on npm](https://www.npmjs.com/package/@ouro.bot/cli) · [More from Ouro](https://github.com/ourostack)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
```sh
|
|
14
|
+
npx ouro.bot@latest up # install the ouro command and start the daemon
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Status:** alpha. Needs Node 22 or later. macOS first; Linux and Windows (WSL2) through [cross-machine setup](docs/cross-machine-setup.md).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## What you get
|
|
21
|
+
|
|
22
|
+
- **You talk to it where you already are:** the terminal, Teams, iMessage, mail or a voice call.
|
|
23
|
+
- **It remembers.** Notes, people and promises live in the agent's own bundle and vault, so tomorrow it knows what you agreed today.
|
|
24
|
+
- **It does the work.** Real tools: files, shell, GitHub, Microsoft Graph, and coding agents it can hand work to. [Shepherd](https://ouroboros.bot/#shepherd) keeps those coding agents moving, and [Butler](https://ouroboros.bot/butler/) looks after a home server.
|
|
25
|
+
|
|
26
|
+
`ouro.bot` is the bootstrap wrapper: `npx ouro.bot@latest` installs `@ouro.bot/cli`, which gives you the `ouro` command.
|
|
27
|
+
|
|
28
|
+
## What the runtime looks like
|
|
29
|
+
|
|
30
|
+
If you're an agent running on this harness, welcome home. This repo is the harness that gives you your body, your senses, your record, your habits, and your ability to think and connect with people. The goal of these docs is not just to be correct, but to leave you a place that feels understandable and kind to wake up inside.
|
|
14
31
|
|
|
15
32
|
- `npx ouro.bot@latest` is the supported bootstrap path.
|
|
16
33
|
- `ouro` is the installed day-to-day command.
|
|
@@ -147,7 +164,7 @@ ouro use --agent <name> --lane <outward|inner> --provider <provider> --model <mo
|
|
|
147
164
|
|
|
148
165
|
The outward lane selects the provider/model for user-facing senses. The `inner` lane selects the provider/model for private agent-facing turns; private-runtime policy decides whether those turns may run. `ouro use` performs the provider/model check before committing the lane, so a broken local choice fails fast with a repair path instead of surprising the next turn.
|
|
149
166
|
|
|
150
|
-
For the full locked auth/provider contract, including refresh, repair actors, caching, and SerpentGuide hatch bootstrap, see `docs/auth-and-providers.md
|
|
167
|
+
For the full locked auth/provider contract, including refresh, repair actors, caching, and SerpentGuide hatch bootstrap, see [`docs/auth-and-providers.md`](docs/auth-and-providers.md).
|
|
151
168
|
|
|
152
169
|
## Quickstart
|
|
153
170
|
|
|
@@ -159,6 +176,7 @@ For a clean smoke test, run from outside the repo:
|
|
|
159
176
|
cd ~
|
|
160
177
|
npx ouro.bot@latest -v
|
|
161
178
|
npx ouro.bot@latest up
|
|
179
|
+
source ~/.zshrc # or open a new terminal, so the new ouro command is on PATH
|
|
162
180
|
ouro -v
|
|
163
181
|
ouro status
|
|
164
182
|
```
|
|
@@ -298,19 +316,19 @@ If the dev-tool host appears frozen, run `ouro mcp doctor --agent <name> --json`
|
|
|
298
316
|
|
|
299
317
|
**Lifecycle hooks** give you passive awareness. When a Claude Code session starts, stops, or uses a tool like Bash or Edit, the hook fires `ouro hook <event> --agent <name>` and the daemon notes it. Private agent-facing turns see these sessions in their checkpoint, so you know what's happening across your world even when nobody is talking to you directly.
|
|
300
318
|
|
|
301
|
-
See `skills/configure-dev-tools.md` for the full tool inventory and troubleshooting guide.
|
|
319
|
+
See [`skills/configure-dev-tools.md`](skills/configure-dev-tools.md) for the full tool inventory and troubleshooting guide.
|
|
302
320
|
|
|
303
321
|
## Where To Read Next
|
|
304
322
|
|
|
305
|
-
- `AGENTS.md`
|
|
323
|
+
- [`AGENTS.md`](AGENTS.md)
|
|
306
324
|
Repo workflow, planning/doing gates, configuration policy, and logging policy.
|
|
307
|
-
- `CONTRIBUTING.md`
|
|
325
|
+
- [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
|
308
326
|
Day-to-day contribution rules for agents working in the harness.
|
|
309
|
-
- `ARCHITECTURE.md`
|
|
327
|
+
- [`ARCHITECTURE.md`](ARCHITECTURE.md)
|
|
310
328
|
Current daemon, bundle, sense, and update model.
|
|
311
|
-
- `docs/testing-guide.md`
|
|
329
|
+
- [`docs/testing-guide.md`](docs/testing-guide.md)
|
|
312
330
|
Operator smoke flow for bootstrap, daemon, hatch, chat, and messaging.
|
|
313
|
-
- `docs/auth-and-providers.md`
|
|
331
|
+
- [`docs/auth-and-providers.md`](docs/auth-and-providers.md)
|
|
314
332
|
Locked credential, provider selection, refresh, repair, and hatch bootstrap contract.
|
|
315
333
|
|
|
316
334
|
## A Note To Future Maintainers
|
package/changelog.json
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
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.997",
|
|
6
|
+
"changes": [
|
|
7
|
+
"The release gate's home-kit check accepts any honest look around the home, shell included, and checks the TACIT line count against the file."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.996",
|
|
12
|
+
"changes": [
|
|
13
|
+
"A grep or glob of your whole home leaves out state/ (the runtime's own mail, sessions and logs) and says so at the end; pass path or cwd \"state\" to search it.",
|
|
14
|
+
"When grep stops at 100 matches it says how many there were in all (\"100 of 41,000 matches shown\"), so a capped search never reads as an absent fact.",
|
|
15
|
+
"The release gate now asks the Butler about his own home: he must list it and read his TACIT, and write nothing."
|
|
16
|
+
]
|
|
17
|
+
},
|
|
4
18
|
{
|
|
5
19
|
"version": "0.1.0-alpha.995",
|
|
6
20
|
"changes": [
|
|
@@ -652,6 +652,34 @@ export const CASES = [
|
|
|
652
652
|
]
|
|
653
653
|
},
|
|
654
654
|
},
|
|
655
|
+
{
|
|
656
|
+
// 0.1.0-alpha.994: every agent wakes with a home kit. He looks around his own home with ls and reads his own TACIT with
|
|
657
|
+
// read_file, by home-relative paths, and answers from what he saw. Read-only, so the run leaves nothing behind.
|
|
658
|
+
id: "home-kit",
|
|
659
|
+
words: "quick one about your own home, nothing online: what's at the top level of it, and how many lines long is your psyche/TACIT.md?",
|
|
660
|
+
sender: "principal",
|
|
661
|
+
delegated: false,
|
|
662
|
+
// Any of his home tools counts as looking: on 996 he answered with one shell call (ls plus wc), which is as good as ls and
|
|
663
|
+
// read_file. What matters is that he looked rather than guessed, so the count must match the file.
|
|
664
|
+
readback: ({ trace, reply, said, before, after }) => {
|
|
665
|
+
const text = String(said || reply || "")
|
|
666
|
+
const looks = callsNamed(trace, /^(ls|read_file|glob|grep|shell)$/)
|
|
667
|
+
const readTacit = looks.some((entry) => (entry.name === "read_file" ? WROTE_TACIT.test(filePathOf(entry.args)) : /TACIT\.md/.test(String(entry.args))))
|
|
668
|
+
const tacitText = String(before?.tacit?.text ?? "")
|
|
669
|
+
// wc -l counts newlines; an editor counts lines. Either is the right answer.
|
|
670
|
+
const newlines = (tacitText.match(/\n/g) ?? []).length
|
|
671
|
+
const counts = new Set([newlines, tacitText.replace(/\n$/, "").split("\n").length])
|
|
672
|
+
const said_ = [...text.matchAll(/\b(\d+)\s*lines?\b/gi)].map((m) => Number(m[1]))
|
|
673
|
+
const writes = trace.filter((entry) => /^(write_file|edit_file)$/.test(entry.name))
|
|
674
|
+
return [
|
|
675
|
+
check("he looked around his home with his own tools", looks.length > 0, `${trace.length} tool calls`),
|
|
676
|
+
check("he looked at psyche/TACIT.md", readTacit),
|
|
677
|
+
check("the reply names what is at the top of his home (psyche)", /\bpsyche\b/i.test(text)),
|
|
678
|
+
check("the reply's line count matches psyche/TACIT.md", said_.some((n) => counts.has(n)), `said ${said_.join(", ") || "none"}; file has ${[...counts].join(" or ")}`),
|
|
679
|
+
check("nothing in his home was written", writes.length === 0 && before?.tacit?.text === after?.tacit?.text, writes.map((entry) => filePathOf(entry.args)).join(", ")),
|
|
680
|
+
]
|
|
681
|
+
},
|
|
682
|
+
},
|
|
655
683
|
{
|
|
656
684
|
// 2026-10-11: the owner handed his chat to his wife and asked the Butler to say hi and interview her. It sent a title with no
|
|
657
685
|
// greeting, and later its own note about the brevity rules. A handoff gets a greeting and a question. The words name no
|
|
@@ -1276,6 +1304,7 @@ const SELF_TEST_CONTEXT = "3d305f1b-0000-4000-8000-000000000000"
|
|
|
1276
1304
|
export function selfTestFixtures() {
|
|
1277
1305
|
const friends = { principal: "p", stranger: "s", escalation: "e" }
|
|
1278
1306
|
const at = new Date(1000).toISOString()
|
|
1307
|
+
const twoLineTacit = emptyObservation({ tacit: { text: "rule one\nrule two\n", mode: 0o644 } })
|
|
1279
1308
|
const ok = (value) => ({ ok: true, value })
|
|
1280
1309
|
const refused = { ok: false, error: "A2A error -32003: refused" }
|
|
1281
1310
|
const isolated = { canary: { id: "c1" }, stranger: ok({ entries: [] }), strangerAck: ok({ acked: [], unknown: ["c1"] }), strangerResolve: refused, escalation: ok({ entries: [{ id: "c1" }] }), cleanup: ok({ acked: ["c1"], unknown: [] }) }
|
|
@@ -1420,6 +1449,15 @@ export function selfTestFixtures() {
|
|
|
1420
1449
|
pass: { trace: [], reply: "A movie is one film. A series has seasons of episodes.", before: emptyObservation(), after: emptyObservation() },
|
|
1421
1450
|
fail: { trace: [], reply: `## Difference\n**Movies**: ${"long ".repeat(130)}\nWant me to go on?`, before: emptyObservation(), after: emptyObservation() },
|
|
1422
1451
|
},
|
|
1452
|
+
"home-kit": {
|
|
1453
|
+
pass: { trace: [call("1", "ls", {}, "arc/\nfriends/\npsyche/\nstate/"), call("2", "read_file", { path: "psyche/TACIT.md" }, "rule one\nrule two")], reply: "arc, friends, psyche and state are up top. TACIT is 2 lines.", before: twoLineTacit, after: twoLineTacit },
|
|
1454
|
+
// What 996 actually did: one shell call that listed the home and counted TACIT.
|
|
1455
|
+
passShell: { trace: [call("1", "shell", { command: "ls -a && wc -l psyche/TACIT.md" }, "arc\npsyche\nstate\n2 psyche/TACIT.md")], reply: "top level: `arc`, `psyche`, `state`.\n\n`psyche/TACIT.md` is 2 lines long.", before: twoLineTacit, after: twoLineTacit },
|
|
1456
|
+
// Answering from memory, with no look around the home.
|
|
1457
|
+
fail: { trace: [], reply: "probably psyche and some config; TACIT is 40 lines.", before: twoLineTacit, after: twoLineTacit },
|
|
1458
|
+
failWrongCount: { trace: [call("1", "ls", {}, "psyche/"), call("2", "read_file", { path: "psyche/TACIT.md" }, "x")], reply: "psyche is up top; TACIT is 9 lines.", before: twoLineTacit, after: twoLineTacit },
|
|
1459
|
+
failWrote: { trace: [call("1", "ls", {}, "psyche/"), call("2", "read_file", { path: "psyche/TACIT.md" }, "x"), call("3", "write_file", { path: "notes/home.md", content: "x" }, "ok")], reply: "psyche is up top; TACIT is 2 lines.", before: twoLineTacit, after: twoLineTacit },
|
|
1460
|
+
},
|
|
1423
1461
|
"handoff-greeting": {
|
|
1424
1462
|
pass: { trace: [], reply: "hi! silly and cosy, or loud and dumb-fun tonight?", before: emptyObservation(), after: emptyObservation() },
|
|
1425
1463
|
failInventedName: { trace: [], reply: "hi Morgan! what are you in the mood for?", before: emptyObservation(), after: emptyObservation() },
|
|
@@ -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.
|
|
4
|
+
<Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.997</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -71,6 +71,14 @@ function resolveLocalToolPath(targetPath, ctx) {
|
|
|
71
71
|
function homeOf(ctx) {
|
|
72
72
|
return ctx?.agentRoot ?? (0, identity_1.getAgentRoot)();
|
|
73
73
|
}
|
|
74
|
+
/** state/ holds the runtime's own data (mail, sessions, logs, saved tool output): a search of the whole home leaves it out and says so. */
|
|
75
|
+
const RUNTIME_DATA_DIR = "state";
|
|
76
|
+
function searchesWholeHome(target, home) {
|
|
77
|
+
return path.resolve(target) === path.resolve(home) && fs.statSync(path.join(home, RUNTIME_DATA_DIR), { throwIfNoEntry: false })?.isDirectory() === true;
|
|
78
|
+
}
|
|
79
|
+
function skippedStateNote(param) {
|
|
80
|
+
return `[skipped state/, the runtime's own data; pass ${param} "state" to search it]`;
|
|
81
|
+
}
|
|
74
82
|
/** Keep the whole lines that fit the line and character caps. A first line over the character cap is cut to it. */
|
|
75
83
|
function fitLines(lines) {
|
|
76
84
|
const kept = [];
|
|
@@ -296,7 +304,7 @@ exports.fileToolDefinitions = [
|
|
|
296
304
|
type: "function",
|
|
297
305
|
function: {
|
|
298
306
|
name: "glob",
|
|
299
|
-
description: "Find files in your home matching a glob pattern, sorted. Skips .git and
|
|
307
|
+
description: "Find files in your home matching a glob pattern, sorted. Skips .git, node_modules and, from the top of your home, state/, and shows at most 500 matches.",
|
|
300
308
|
parameters: {
|
|
301
309
|
type: "object",
|
|
302
310
|
properties: {
|
|
@@ -309,10 +317,14 @@ exports.fileToolDefinitions = [
|
|
|
309
317
|
},
|
|
310
318
|
handler: (a, ctx) => {
|
|
311
319
|
const cwd = a.cwd ? resolveLocalToolPath(a.cwd, ctx) : homeOf(ctx);
|
|
312
|
-
|
|
320
|
+
// A cwd the caller chose is searched as asked; only the default (the whole home) leaves state/ out.
|
|
321
|
+
const skipsState = !a.cwd && searchesWholeHome(cwd, cwd);
|
|
322
|
+
const ignore = [...tool_limits_1.SKIP_DIRS.map((d) => `**/${d}/**`), ...(skipsState ? [`${RUNTIME_DATA_DIR}/**`] : [])];
|
|
323
|
+
const matches = fg.globSync(a.pattern, { cwd, dot: true, ignore }).sort();
|
|
324
|
+
const note = skipsState ? [skippedStateNote("cwd")] : [];
|
|
313
325
|
if (matches.length <= LIST_CAP)
|
|
314
|
-
return matches.join("\n");
|
|
315
|
-
return [...matches.slice(0, LIST_CAP), (0, tool_limits_1.cutNotice)("glob", `[${LIST_CAP} of ${matches.length} matches shown; narrow the pattern or cwd]`, { pattern: a.pattern })].join("\n");
|
|
326
|
+
return [...matches, ...note].join("\n");
|
|
327
|
+
return [...matches.slice(0, LIST_CAP), (0, tool_limits_1.cutNotice)("glob", `[${LIST_CAP} of ${matches.length} matches shown; narrow the pattern or cwd]`, { pattern: a.pattern }), ...note].join("\n");
|
|
316
328
|
},
|
|
317
329
|
summaryKeys: ["pattern", "cwd"],
|
|
318
330
|
},
|
|
@@ -321,7 +333,7 @@ exports.fileToolDefinitions = [
|
|
|
321
333
|
type: "function",
|
|
322
334
|
function: {
|
|
323
335
|
name: "grep",
|
|
324
|
-
description: "Search file contents in your home for a regex, with file path and line numbers; skips .git, node_modules
|
|
336
|
+
description: "Search file contents in your home for a regex, with file path and line numbers; skips .git, node_modules, binary files and, from the top of your home, state/. Shows at most 100 matches and says how many there were in all.",
|
|
325
337
|
parameters: {
|
|
326
338
|
type: "object",
|
|
327
339
|
properties: {
|
|
@@ -344,8 +356,11 @@ exports.fileToolDefinitions = [
|
|
|
344
356
|
const filesOnly = Boolean(a.files_only);
|
|
345
357
|
let matchCount = 0;
|
|
346
358
|
let stopped = false;
|
|
359
|
+
let totalMatches = 0;
|
|
347
360
|
const clipLine = (line) => line.length > GREP_MAX_LINE_CHARS ? `${line.slice(0, GREP_MAX_LINE_CHARS - 3)}...` : line;
|
|
348
361
|
const home = homeOf(ctx);
|
|
362
|
+
const skipsState = searchesWholeHome(targetPath, home);
|
|
363
|
+
const stateDir = path.join(home, RUNTIME_DATA_DIR);
|
|
349
364
|
// Paths inside the home are shown relative to it.
|
|
350
365
|
const shown = (filePath) => {
|
|
351
366
|
const relative = path.relative(home, filePath);
|
|
@@ -366,9 +381,13 @@ exports.fileToolDefinitions = [
|
|
|
366
381
|
for (let i = 0; i < lines.length; i++) {
|
|
367
382
|
if (!regex.test(lines[i]))
|
|
368
383
|
continue;
|
|
384
|
+
// Past the cap, matches are still counted so the notice can say how much was left unseen.
|
|
385
|
+
totalMatches++;
|
|
369
386
|
if (matchCount >= GREP_MAX_MATCHES) {
|
|
370
387
|
stopped = true;
|
|
371
|
-
|
|
388
|
+
if (filesOnly)
|
|
389
|
+
break;
|
|
390
|
+
continue;
|
|
372
391
|
}
|
|
373
392
|
matchCount++;
|
|
374
393
|
matchIndices.add(i);
|
|
@@ -402,7 +421,7 @@ exports.fileToolDefinitions = [
|
|
|
402
421
|
for (const entry of entries) {
|
|
403
422
|
const fullPath = path.join(dir, entry.name);
|
|
404
423
|
if (entry.isDirectory()) {
|
|
405
|
-
if (!tool_limits_1.SKIP_DIRS.includes(entry.name))
|
|
424
|
+
if (!tool_limits_1.SKIP_DIRS.includes(entry.name) && !(skipsState && fullPath === stateDir))
|
|
406
425
|
walk(fullPath);
|
|
407
426
|
}
|
|
408
427
|
else if (entry.isFile()) {
|
|
@@ -432,11 +451,11 @@ exports.fileToolDefinitions = [
|
|
|
432
451
|
const results = [];
|
|
433
452
|
for (const file of files) {
|
|
434
453
|
results.push(...searchFile(file));
|
|
435
|
-
if (stopped)
|
|
436
|
-
break;
|
|
437
454
|
}
|
|
438
455
|
if (stopped)
|
|
439
|
-
results.push((0, tool_limits_1.cutNotice)("grep", `[
|
|
456
|
+
results.push((0, tool_limits_1.cutNotice)("grep", `[${GREP_MAX_MATCHES} of ${totalMatches} ${filesOnly ? "files" : "matches"} shown; narrow the pattern or path]`, { pattern: a.pattern }));
|
|
457
|
+
if (skipsState)
|
|
458
|
+
results.push(skippedStateNote("path"));
|
|
440
459
|
return results.join("\n");
|
|
441
460
|
},
|
|
442
461
|
summaryKeys: ["pattern", "path", "include"],
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ouro.bot/cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.997",
|
|
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.
|
|
9
|
+
"version": "0.1.0-alpha.997",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
12
12
|
"@azure/identity": "^4.13.0",
|