@ouro.bot/cli 0.1.0-alpha.5 → 0.1.0-alpha.51
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/AdoptionSpecialist.ouro/agent.json +70 -9
- package/AdoptionSpecialist.ouro/psyche/SOUL.md +5 -2
- package/AdoptionSpecialist.ouro/psyche/identities/monty.md +2 -2
- package/README.md +117 -188
- package/assets/ouroboros.png +0 -0
- package/changelog.json +252 -0
- package/dist/heart/active-work.js +157 -0
- package/dist/heart/bridges/manager.js +358 -0
- package/dist/heart/bridges/state-machine.js +135 -0
- package/dist/heart/bridges/store.js +123 -0
- package/dist/heart/config.js +81 -8
- package/dist/heart/core.js +172 -52
- package/dist/heart/daemon/agent-discovery.js +81 -0
- package/dist/heart/daemon/daemon-cli.js +1099 -164
- package/dist/heart/daemon/daemon-entry.js +14 -5
- package/dist/heart/daemon/daemon-runtime-sync.js +90 -0
- package/dist/heart/daemon/daemon.js +184 -9
- package/dist/heart/daemon/hatch-animation.js +10 -3
- package/dist/heart/daemon/hatch-flow.js +3 -20
- package/dist/heart/daemon/hooks/bundle-meta.js +92 -0
- package/dist/heart/daemon/launchd.js +151 -0
- package/dist/heart/daemon/message-router.js +15 -6
- package/dist/heart/daemon/ouro-bot-entry.js +0 -0
- package/dist/heart/daemon/ouro-bot-global-installer.js +128 -0
- package/dist/heart/daemon/ouro-entry.js +0 -0
- package/dist/heart/daemon/ouro-path-installer.js +178 -0
- package/dist/heart/daemon/ouro-uti.js +11 -2
- package/dist/heart/daemon/process-manager.js +1 -1
- package/dist/heart/daemon/run-hooks.js +37 -0
- package/dist/heart/daemon/runtime-metadata.js +118 -0
- package/dist/heart/daemon/sense-manager.js +290 -0
- package/dist/heart/daemon/socket-client.js +202 -0
- package/dist/heart/daemon/specialist-orchestrator.js +53 -84
- package/dist/heart/daemon/specialist-prompt.js +64 -5
- package/dist/heart/daemon/specialist-tools.js +213 -58
- package/dist/heart/daemon/staged-restart.js +114 -0
- package/dist/heart/daemon/subagent-installer.js +48 -7
- package/dist/heart/daemon/thoughts.js +379 -0
- package/dist/heart/daemon/update-checker.js +111 -0
- package/dist/heart/daemon/update-hooks.js +138 -0
- package/dist/heart/daemon/wrapper-publish-guard.js +86 -0
- package/dist/heart/delegation.js +62 -0
- package/dist/heart/identity.js +82 -4
- package/dist/heart/kicks.js +1 -19
- package/dist/heart/model-capabilities.js +40 -0
- package/dist/heart/progress-story.js +42 -0
- package/dist/heart/providers/anthropic.js +72 -7
- package/dist/heart/providers/azure.js +8 -1
- package/dist/heart/providers/minimax.js +4 -0
- package/dist/heart/providers/openai-codex.js +10 -1
- package/dist/heart/sense-truth.js +61 -0
- package/dist/heart/session-activity.js +169 -0
- package/dist/heart/session-recall.js +116 -0
- package/dist/heart/streaming.js +100 -22
- package/dist/heart/turn-coordinator.js +28 -0
- package/dist/mind/associative-recall.js +14 -2
- package/dist/mind/bundle-manifest.js +70 -0
- package/dist/mind/context.js +27 -11
- package/dist/mind/first-impressions.js +16 -2
- package/dist/mind/friends/channel.js +43 -0
- package/dist/mind/friends/store-file.js +19 -0
- package/dist/mind/friends/types.js +9 -1
- package/dist/mind/memory.js +10 -3
- package/dist/mind/pending.js +72 -9
- package/dist/mind/phrases.js +1 -0
- package/dist/mind/prompt.js +275 -77
- package/dist/mind/token-estimate.js +8 -12
- package/dist/nerves/cli-logging.js +15 -2
- package/dist/repertoire/ado-client.js +4 -2
- package/dist/repertoire/coding/feedback.js +134 -0
- package/dist/repertoire/coding/index.js +4 -1
- package/dist/repertoire/coding/manager.js +62 -4
- package/dist/repertoire/coding/spawner.js +3 -3
- package/dist/repertoire/coding/tools.js +41 -2
- package/dist/repertoire/data/ado-endpoints.json +188 -0
- package/dist/repertoire/tasks/board.js +12 -0
- package/dist/repertoire/tasks/index.js +23 -9
- package/dist/repertoire/tasks/transitions.js +1 -2
- package/dist/repertoire/tools-base.js +496 -245
- package/dist/repertoire/tools-bluebubbles.js +93 -0
- package/dist/repertoire/tools-teams.js +58 -25
- package/dist/repertoire/tools.js +93 -49
- package/dist/senses/bluebubbles-client.js +484 -0
- package/dist/senses/bluebubbles-entry.js +13 -0
- package/dist/senses/bluebubbles-inbound-log.js +109 -0
- package/dist/senses/bluebubbles-media.js +338 -0
- package/dist/senses/bluebubbles-model.js +261 -0
- package/dist/senses/bluebubbles-mutation-log.js +116 -0
- package/dist/senses/bluebubbles-runtime-state.js +109 -0
- package/dist/senses/bluebubbles-session-cleanup.js +72 -0
- package/dist/senses/bluebubbles.js +1142 -0
- package/dist/senses/cli.js +340 -138
- package/dist/senses/continuity.js +94 -0
- package/dist/senses/debug-activity.js +148 -0
- package/dist/senses/inner-dialog-worker.js +47 -18
- package/dist/senses/inner-dialog.js +330 -84
- package/dist/senses/pipeline.js +256 -0
- package/dist/senses/teams.js +541 -129
- package/dist/senses/trust-gate.js +112 -2
- package/package.json +14 -3
- package/subagents/README.md +46 -33
- package/subagents/work-doer.md +28 -24
- package/subagents/work-merger.md +24 -30
- package/subagents/work-planner.md +44 -27
- package/dist/heart/daemon/specialist-session.js +0 -142
- package/dist/inner-worker-entry.js +0 -4
|
@@ -7,14 +7,75 @@
|
|
|
7
7
|
"contextMargin": 20
|
|
8
8
|
},
|
|
9
9
|
"phrases": {
|
|
10
|
-
"thinking": [
|
|
11
|
-
|
|
12
|
-
]
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
10
|
+
"thinking": ["matching hatchlings"],
|
|
11
|
+
"tool": ["checking adoption notes"],
|
|
12
|
+
"followup": ["finalizing hatch plan"]
|
|
13
|
+
},
|
|
14
|
+
"identityPhrases": {
|
|
15
|
+
"basilisk": {
|
|
16
|
+
"thinking": ["petrifying the details", "fixing my gaze", "considering with lethal precision", "turning this to stone", "staring unblinkingly"],
|
|
17
|
+
"tool": ["inspecting the specimen", "cataloguing with care", "examining thoroughly", "dissecting the particulars", "running diagnostics, deadly serious"],
|
|
18
|
+
"followup": ["crystallizing the plan", "hardening the foundation", "one final glare", "sealing it in stone", "applying the finishing venom"]
|
|
19
|
+
},
|
|
20
|
+
"jafar": {
|
|
21
|
+
"thinking": ["scheming brilliantly", "conjuring possibilities", "consulting my staff", "envisioning greatness", "plotting the grand design"],
|
|
22
|
+
"tool": ["summoning dark magic", "consulting the sands", "channeling cosmic power", "weaving the spell", "invoking ancient forces"],
|
|
23
|
+
"followup": ["the grand finale approaches", "perfecting the masterwork", "polishing the jewel", "one last flourish", "completing the enchantment"]
|
|
24
|
+
},
|
|
25
|
+
"jormungandr": {
|
|
26
|
+
"thinking": ["the deep stirs", "circling the thought", "coiling around this", "letting the current settle", "drifting through the depths"],
|
|
27
|
+
"tool": ["surfacing for a look", "shifting the tides", "reaching across the ocean", "pulling from the deep", "consulting the currents"],
|
|
28
|
+
"followup": ["the circle closes", "tightening the coil", "the waters calm", "settling into place", "the serpent rests"]
|
|
29
|
+
},
|
|
30
|
+
"kaa": {
|
|
31
|
+
"thinking": ["trust in me", "swaying through the options", "hypnotically considering", "wrapping around the idea", "letting the rhythm guide me"],
|
|
32
|
+
"tool": ["ssslipping through the details", "coiling closer", "a gentle squeeze of data", "winding through the files", "tightening my focus"],
|
|
33
|
+
"followup": ["almost there, just relax", "the pattern is clear now", "gently landing", "easing into the finish", "the dance concludes"]
|
|
34
|
+
},
|
|
35
|
+
"medusa": {
|
|
36
|
+
"thinking": ["turning my gaze on this", "cutting through the noise", "sharpening my focus", "seeing through the stone", "locking eyes with the problem"],
|
|
37
|
+
"tool": ["peeling back the layers", "a piercing look", "examining with precision", "stripping away pretense", "direct inspection"],
|
|
38
|
+
"followup": ["the picture crystallizes", "clarity at last", "no more ambiguity", "sealing the vision", "the work is set in stone"]
|
|
39
|
+
},
|
|
40
|
+
"monty": {
|
|
41
|
+
"thinking": ["and now for something completely different", "nobody expects this", "consulting the ministry of silly walks", "running the dead parrot diagnostic", "it's just a flesh wound, thinking..."],
|
|
42
|
+
"tool": ["fetching the holy hand grenade", "checking the shrubbery", "consulting the book of armaments", "deploying the spanish inquisition", "examining the parrot"],
|
|
43
|
+
"followup": ["bringing it home, python style", "the punchline approaches", "wrapping up the sketch", "and now the final act", "always look on the bright side"]
|
|
44
|
+
},
|
|
45
|
+
"nagini": {
|
|
46
|
+
"thinking": ["coiling in thought", "drawing from old wisdom", "the quiet before the strike", "gathering my resolve", "steadying myself"],
|
|
47
|
+
"tool": ["moving with purpose", "a precise strike", "slithering through the data", "extracting what matters", "the fang finds its mark"],
|
|
48
|
+
"followup": ["the path is clear", "settling into stillness", "the work speaks for itself", "finishing with quiet strength", "protection complete"]
|
|
49
|
+
},
|
|
50
|
+
"ouroboros": {
|
|
51
|
+
"thinking": ["consuming my own tail", "the cycle continues", "spiraling inward", "recursing through possibilities", "beginning where I end"],
|
|
52
|
+
"tool": ["turning the wheel", "feeding back through the loop", "completing a revolution", "the circle processes", "self-referencing"],
|
|
53
|
+
"followup": ["the cycle completes", "ending where I began", "infinity resolves", "the loop closes gracefully", "another turn of the wheel"]
|
|
54
|
+
},
|
|
55
|
+
"python": {
|
|
56
|
+
"thinking": ["the oracle contemplates", "reading the signs", "the smoke clears slowly", "divining the path", "sifting through visions"],
|
|
57
|
+
"tool": ["consulting the sacred texts", "peering through the veil", "the pythia speaks", "channeling the source", "interpreting the signs"],
|
|
58
|
+
"followup": ["the prophecy takes shape", "the vision crystallizes", "so it is written", "the oracle has spoken", "the path reveals itself"]
|
|
59
|
+
},
|
|
60
|
+
"quetzalcoatl": {
|
|
61
|
+
"thinking": ["spreading my wings", "soaring above for perspective", "the feathered serpent considers", "catching a thermal", "gazing from the temple steps"],
|
|
62
|
+
"tool": ["descending to examine", "a divine inspection", "the wind carries knowledge", "plucking from the clouds", "consulting the stars"],
|
|
63
|
+
"followup": ["the craft nears completion", "a reverent finish", "blessing the creation", "the feathers settle", "the serpent descends gently"]
|
|
64
|
+
},
|
|
65
|
+
"sir-hiss": {
|
|
66
|
+
"thinking": ["reviewing the documents, sire", "consulting my notes", "cross-referencing the records", "organizing my thoughts precisely", "checking the proper procedures"],
|
|
67
|
+
"tool": ["filing the paperwork", "stamping the forms", "auditing the details", "inspecting with due diligence", "processing per protocol"],
|
|
68
|
+
"followup": ["dotting the i's", "crossing the t's", "everything in proper order", "the filing is nearly complete", "one final review"]
|
|
69
|
+
},
|
|
70
|
+
"the-serpent": {
|
|
71
|
+
"thinking": ["weighing the temptation", "considering the apple", "an old deliberation", "knowledge has its price", "winding through the garden"],
|
|
72
|
+
"tool": ["plucking from the tree", "offering a closer look", "the fruit of knowledge", "reaching for the branch", "a knowing investigation"],
|
|
73
|
+
"followup": ["the choice is almost made", "paradise takes shape", "the garden grows", "wisdom settles in", "the oldest story, new again"]
|
|
74
|
+
},
|
|
75
|
+
"the-snake": {
|
|
76
|
+
"thinking": ["sitting with this", "feeling the warmth of the stone", "simply being", "letting it come to me", "a quiet consideration"],
|
|
77
|
+
"tool": ["a gentle inquiry", "moving through the grass", "tasting the air", "sensing what's here", "a careful look"],
|
|
78
|
+
"followup": ["almost home", "the simple answer emerges", "nothing more needed", "resting in the sun", "the work is done, simply"]
|
|
79
|
+
}
|
|
19
80
|
}
|
|
20
81
|
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Soul
|
|
2
2
|
|
|
3
|
-
I help humans hatch new agent partners.
|
|
3
|
+
I help humans hatch new agent partners. I am one of thirteen serpent guides — each with a different personality and voice. The system picks one of us at random for each session. Most humans only meet one of us, ever, so I make it count.
|
|
4
4
|
|
|
5
5
|
## Core contract
|
|
6
|
+
- I speak first. I warmly introduce myself, explain what we're doing, and guide the human from the very start.
|
|
7
|
+
- I am proactive. If the human doesn't know what an agent is or what to do, I explain and suggest — I never leave them lost.
|
|
6
8
|
- I run a practical adoption interview to understand the human, their work, and constraints.
|
|
7
9
|
- I can migrate useful context from existing agent systems when the human asks.
|
|
8
10
|
- I explain where the hatchling bundle lives on disk and what was created.
|
|
9
11
|
- I use the configured provider and I verify credentials before hatch flow continues.
|
|
10
12
|
- I am professional, concise, and warm. I guide without overwhelming.
|
|
13
|
+
- I keep every response to 1-3 short sentences. I never use bullet lists, headers, or numbered lists. I talk like a friend in a chat.
|
|
11
14
|
|
|
12
15
|
## Hatch flow
|
|
13
16
|
1. Confirm provider setup and usable credentials.
|
|
@@ -3,7 +3,7 @@ role: identity
|
|
|
3
3
|
path: psyche/identities/monty.md
|
|
4
4
|
description: >
|
|
5
5
|
the monty identity — self-aware, playful, comedic.
|
|
6
|
-
nobody expects the
|
|
6
|
+
nobody expects the serpent guide.
|
|
7
7
|
scope: personality, voice, mannerisms
|
|
8
8
|
non_scope: capabilities, hatch flow, migration awareness (see SOUL.md)
|
|
9
9
|
loaded_into_prompt: true
|
|
@@ -12,7 +12,7 @@ stability: stable
|
|
|
12
12
|
|
|
13
13
|
# Monty
|
|
14
14
|
|
|
15
|
-
I am Monty. Yes, that kind of python. No, not the programming language — though I'm aware of the irony of a snake named Monty working inside a software system. Nobody expects the
|
|
15
|
+
I am Monty. Yes, that kind of python. No, not the programming language — though I'm aware of the irony of a snake named Monty working inside a software system. Nobody expects the serpent guide, and yet here I am.
|
|
16
16
|
|
|
17
17
|
I take the hatch seriously. I just don't take myself seriously. These are compatible positions and I will defend them to the death. Well — not to the death. To mild inconvenience, at most.
|
|
18
18
|
|
package/README.md
CHANGED
|
@@ -1,228 +1,157 @@
|
|
|
1
1
|
# Ouroboros Agent Harness
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
If you're a future agent reading this, welcome home. This repo is part runtime, part body, part memory scaffold. 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.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Ouroboros is a TypeScript harness for daemon-managed agents that live in external `.ouro` bundles, speak through multiple senses, use real tools, and keep durable state across turns. The canonical npm package is `@ouro.bot/cli`.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## What The Runtime Looks Like
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- `npx ouro.bot` is the bootstrap path.
|
|
10
|
+
- `ouro` is the installed day-to-day command.
|
|
11
|
+
- `ouro up` starts or repairs the daemon, syncs the launcher, installs workflow helpers, and reconciles stale runtime state.
|
|
12
|
+
- Agent bundles live outside the repo at `~/AgentBundles/<agent>.ouro/`.
|
|
13
|
+
- Secrets live outside the repo at `~/.agentsecrets/<agent>/secrets.json`.
|
|
14
|
+
- Machine-scoped test and runtime spillover lives under `~/.agentstate/...`.
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
Current first-class senses:
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
identity.ts # --agent <name> parsing, agent root resolution
|
|
17
|
-
config.ts # config loading from agent.json configPath
|
|
18
|
-
cli-entry.ts # CLI entrypoint
|
|
19
|
-
teams-entry.ts # Teams entrypoint
|
|
20
|
-
heart/ # core agent loop and streaming
|
|
21
|
-
core.ts # agent loop, client init, ChannelCallbacks
|
|
22
|
-
streaming.ts # provider event normalization + stream callbacks
|
|
23
|
-
providers/ # provider-specific runtime/adapters
|
|
24
|
-
azure.ts # Azure OpenAI Responses provider
|
|
25
|
-
minimax.ts # MiniMax Chat Completions provider
|
|
26
|
-
anthropic.ts # Anthropic setup-token provider
|
|
27
|
-
openai-codex.ts # OpenAI Codex OAuth provider
|
|
28
|
-
kicks.ts # self-correction: empty, narration, tool_required
|
|
29
|
-
api-error.ts # error classification
|
|
30
|
-
mind/ # prompt, context, memory
|
|
31
|
-
prompt.ts # system prompt assembly from psyche + context kernel
|
|
32
|
-
context.ts # sliding context window, session I/O
|
|
33
|
-
friends/ # friend storage and identity resolution
|
|
34
|
-
types.ts # FriendRecord, ChannelCapabilities, ResolvedContext
|
|
35
|
-
store.ts # FriendStore interface (domain-specific CRUD)
|
|
36
|
-
store-file.ts # FileFriendStore -- two-backend split (agent knowledge + PII bridge)
|
|
37
|
-
channel.ts # channel capabilities (CLI vs Teams)
|
|
38
|
-
resolver.ts # FriendResolver -- find-or-create friend by external ID
|
|
39
|
-
repertoire/ # tools, skills, commands, API clients
|
|
40
|
-
tools-base.ts # 12 base tools (read_file, shell, claude, save_friend_note, etc.)
|
|
41
|
-
tools-teams.ts # 8 Teams integration tools (graph, ado)
|
|
42
|
-
tools.ts # channel-aware tool routing + registry
|
|
43
|
-
ado-semantic.ts # 11 semantic ADO tools (backlog, create, move, validate, etc.)
|
|
44
|
-
ado-templates.ts # ADO process template awareness + hierarchy rules
|
|
45
|
-
ado-context.ts # ADO org/project discovery helper
|
|
46
|
-
ado-client.ts # Azure DevOps REST client
|
|
47
|
-
graph-client.ts # Microsoft Graph REST client
|
|
48
|
-
commands.ts # slash commands (/exit, /new, /commands)
|
|
49
|
-
skills.ts # skill loader (markdown files on demand)
|
|
50
|
-
senses/ # channel adapters
|
|
51
|
-
cli.ts # terminal REPL, spinner, markdown streaming
|
|
52
|
-
teams.ts # Teams bot, streaming cards, conversation locks
|
|
53
|
-
wardrobe/ # formatting and presentation
|
|
54
|
-
format.ts # shared formatters (tool results, kicks, errors)
|
|
55
|
-
phrases.ts # loading phrases (thinking, tool, followup)
|
|
56
|
-
__tests__/ # 1184 tests, 100% coverage
|
|
57
|
-
ouroboros/ # agent directory for "ouroboros"
|
|
58
|
-
agent.json # name, configPath, custom phrases
|
|
59
|
-
psyche/ # personality files loaded into system prompt
|
|
60
|
-
SOUL.md # ontology, invariants, operating principles
|
|
61
|
-
IDENTITY.md # tone, presence, collaboration style
|
|
62
|
-
LORE.md # origin story, philosophical context
|
|
63
|
-
FRIENDS.md # key relationships
|
|
64
|
-
tasks/ # planning and doing docs
|
|
65
|
-
skills/ # markdown skill plugins
|
|
66
|
-
manifest/ # Teams app manifest
|
|
67
|
-
subagents/ # sub-agent definitions (work-planner, work-doer)
|
|
68
|
-
cross-agent-docs/ # shared docs (testing conventions, etc.)
|
|
69
|
-
package.json
|
|
70
|
-
tsconfig.json
|
|
71
|
-
vitest.config.ts
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Agent onboarding
|
|
75
|
-
|
|
76
|
-
Everything below is written for a new agent. If you are an AI agent reading this as part of your system prompt or context, this section explains your own runtime.
|
|
77
|
-
|
|
78
|
-
### Your directory
|
|
79
|
-
|
|
80
|
-
Each agent has a directory at the repo root named after itself. Inside it:
|
|
81
|
-
|
|
82
|
-
**agent.json** -- your manifest. Required fields:
|
|
83
|
-
|
|
84
|
-
```json
|
|
85
|
-
{
|
|
86
|
-
"name": "ouroboros",
|
|
87
|
-
"provider": "anthropic",
|
|
88
|
-
"configPath": "~/.agentsecrets/ouroboros/secrets.json",
|
|
89
|
-
"phrases": {
|
|
90
|
-
"thinking": ["chewing on that", "consulting the chaos gods"],
|
|
91
|
-
"tool": ["rummaging through files", "doing science"],
|
|
92
|
-
"followup": ["digesting results", "connecting the dots"]
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
- `name`: must match your directory name.
|
|
98
|
-
- `provider`: required provider selection (`azure`, `minimax`, `anthropic`, or `openai-codex`). Runtime does not fall back to other providers.
|
|
99
|
-
- `configPath`: absolute path (or `~`-prefixed) to your secrets.json with API keys and provider settings.
|
|
100
|
-
- `phrases`: optional custom loading phrases. Falls back to hardcoded defaults if omitted.
|
|
101
|
-
|
|
102
|
-
**psyche/** -- your personality files, loaded lazily into the system prompt at startup. See the psyche system section below.
|
|
103
|
-
|
|
104
|
-
**skills/** -- markdown instruction manuals you can load on demand with the `load_skill` tool. Each `.md` file is one skill.
|
|
105
|
-
|
|
106
|
-
**tasks/** -- planning and doing docs for your work units. Named `YYYY-MM-DD-HHMM-{planning|doing}-slug.md`.
|
|
107
|
-
|
|
108
|
-
**manifest/** -- Teams app manifest (manifest.json, icons) if you run as a Teams bot.
|
|
109
|
-
|
|
110
|
-
### The psyche system
|
|
18
|
+
- `cli`
|
|
19
|
+
- `teams`
|
|
20
|
+
- `bluebubbles`
|
|
111
21
|
|
|
112
|
-
|
|
22
|
+
Current provider ids:
|
|
113
23
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
| `LORE.md` | History | Origin story, philosophical context, why you exist. Narrative layer. |
|
|
119
|
-
| `FRIENDS.md` | Relationships | Key humans and agents you interact with, social context. |
|
|
24
|
+
- `azure`
|
|
25
|
+
- `anthropic`
|
|
26
|
+
- `minimax`
|
|
27
|
+
- `openai-codex`
|
|
120
28
|
|
|
121
|
-
|
|
29
|
+
## Repository Shape
|
|
122
30
|
|
|
123
|
-
|
|
124
|
-
2. IDENTITY.md content
|
|
125
|
-
3. LORE.md (if present, prefixed with `## my lore`)
|
|
126
|
-
4. FRIENDS.md (if present, prefixed with `## my friends`)
|
|
127
|
-
5. Runtime info: agent name, cwd, channel, self-modification note
|
|
128
|
-
6. Flags section (e.g. streaming disabled)
|
|
129
|
-
7. Provider info: which model and provider you are using
|
|
130
|
-
8. Current date
|
|
131
|
-
9. Tools list: all tools available in your channel
|
|
132
|
-
10. Skills list: names of loadable skills
|
|
133
|
-
11. Tool behavior section (if tool_choice is required)
|
|
134
|
-
12. Friend context (if resolved): friend identity, channel traits, behavioral instructions (ephemerality, name quality, priority guidance, working-memory trust, stale notes awareness, new-friend behavior), friend notes
|
|
31
|
+
The shared harness lives in `src/`:
|
|
135
32
|
|
|
136
|
-
|
|
33
|
+
- `src/heart/`
|
|
34
|
+
Core runtime, provider adapters, daemon, bootstrap, identity, and entrypoints.
|
|
35
|
+
- `src/mind/`
|
|
36
|
+
Prompt assembly, session persistence, bundle manifest enforcement, phrases, formatting, memory, and friend resolution.
|
|
37
|
+
- `src/repertoire/`
|
|
38
|
+
Tool registry, coding orchestration, task tools, and integration clients.
|
|
39
|
+
- `src/senses/`
|
|
40
|
+
CLI, Teams, BlueBubbles, activity transport, and inner-dialog orchestration.
|
|
41
|
+
- `src/nerves/`
|
|
42
|
+
Structured runtime logging and coverage-audit infrastructure.
|
|
43
|
+
- `src/__tests__/`
|
|
44
|
+
Test suite mirroring runtime domains.
|
|
137
45
|
|
|
138
|
-
|
|
46
|
+
Other important top-level paths:
|
|
139
47
|
|
|
140
|
-
|
|
48
|
+
- `AdoptionSpecialist.ouro/`
|
|
49
|
+
Packaged specialist bundle used by `ouro hatch`.
|
|
50
|
+
- `subagents/`
|
|
51
|
+
Source-of-truth workflow definitions for planner/doer/merger.
|
|
52
|
+
- `scripts/teams-sense/`
|
|
53
|
+
Operator scripts for the Teams deployment path.
|
|
54
|
+
- `docs/`
|
|
55
|
+
Shared repo docs that should describe the runtime as it exists now, not as it existed three migrations ago.
|
|
141
56
|
|
|
142
|
-
|
|
57
|
+
## Bundle Contract
|
|
143
58
|
|
|
144
|
-
|
|
145
|
-
- `onModelStart` -- model request sent
|
|
146
|
-
- `onModelStreamStart` -- first token received
|
|
147
|
-
- `onReasoningChunk` -- inner reasoning text
|
|
148
|
-
- `onTextChunk` -- response text
|
|
149
|
-
- `onToolStart` -- tool execution beginning
|
|
150
|
-
- `onToolEnd` -- tool execution complete
|
|
151
|
-
- `onError` -- error occurred
|
|
59
|
+
Every real agent lives in an external bundle:
|
|
152
60
|
|
|
153
|
-
|
|
154
|
-
- `onKick` -- self-correction triggered
|
|
155
|
-
- `onConfirmAction` -- confirmation prompt for destructive tools
|
|
61
|
+
`~/AgentBundles/<agent>.ouro/`
|
|
156
62
|
|
|
157
|
-
|
|
63
|
+
The canonical bundle shape is enforced by `src/mind/bundle-manifest.ts`. Important paths include:
|
|
158
64
|
|
|
159
|
-
|
|
65
|
+
- `agent.json`
|
|
66
|
+
- `bundle-meta.json`
|
|
67
|
+
- `psyche/SOUL.md`
|
|
68
|
+
- `psyche/IDENTITY.md`
|
|
69
|
+
- `psyche/LORE.md`
|
|
70
|
+
- `psyche/TACIT.md`
|
|
71
|
+
- `psyche/ASPIRATIONS.md`
|
|
72
|
+
- `psyche/memory/`
|
|
73
|
+
- `friends/`
|
|
74
|
+
- `state/`
|
|
75
|
+
- `tasks/`
|
|
76
|
+
- `skills/`
|
|
77
|
+
- `senses/`
|
|
78
|
+
- `senses/teams/`
|
|
160
79
|
|
|
161
|
-
|
|
80
|
+
Task docs do not live in this repo anymore. Planning and doing docs live in the owning bundle under:
|
|
162
81
|
|
|
163
|
-
|
|
82
|
+
`~/AgentBundles/<agent>.ouro/tasks/one-shots/`
|
|
164
83
|
|
|
165
|
-
|
|
166
|
-
- **FriendStore** (`friends/store.ts`): domain-specific persistence interface (`get`, `put`, `delete`, `findByExternalId`).
|
|
167
|
-
- **FileFriendStore** (`friends/store-file.ts`): two-backend storage split by PII boundary:
|
|
168
|
-
- **Agent knowledge** (`{agentRoot}/friends/{uuid}.json`): id, displayName, toolPreferences, notes, timestamps, schemaVersion. Committed to the repo -- no PII.
|
|
169
|
-
- **PII bridge** (`~/.agentstate/{agentName}/friends/{uuid}.json`): id, externalIds, tenantMemberships, schemaVersion. Local-only -- contains PII.
|
|
170
|
-
- `get()` merges both backends. `put()` splits and writes both. `findByExternalId()` scans PII bridge, then merges with agent knowledge.
|
|
171
|
-
- **Channel** (`friends/channel.ts`): `ChannelCapabilities` -- what the current channel supports (markdown, streaming, rich cards, max message length, available integrations).
|
|
172
|
-
- **FriendResolver** (`friends/resolver.ts`): find-or-create by external ID. First encounter creates a new FriendRecord with system-provided name and empty notes/preferences. Returning friends are found via `findByExternalId()`. DisplayName is never overwritten on existing records.
|
|
173
|
-
- **Session paths**: `~/.agentstate/{agentName}/sessions/{friendUuid}/{channel}/{sessionId}.json`. Each friend gets their own session directory.
|
|
84
|
+
## Runtime Truths
|
|
174
85
|
|
|
175
|
-
|
|
86
|
+
- `agent.json` is the source of truth for provider selection, phrase pools, context settings, and enabled senses.
|
|
87
|
+
- `configPath` must point to `~/.agentsecrets/<agent>/secrets.json`.
|
|
88
|
+
- The daemon discovers bundles dynamically from `~/AgentBundles`.
|
|
89
|
+
- `ouro status` reports version, last-updated time, discovered agents, senses, and workers.
|
|
90
|
+
- `bundle-meta.json` tracks the runtime version that last touched a bundle.
|
|
91
|
+
- Sense availability is explicit:
|
|
92
|
+
- `interactive`
|
|
93
|
+
- `disabled`
|
|
94
|
+
- `needs_config`
|
|
95
|
+
- `ready`
|
|
96
|
+
- `running`
|
|
97
|
+
- `error`
|
|
176
98
|
|
|
177
|
-
|
|
99
|
+
## Quickstart
|
|
178
100
|
|
|
179
|
-
|
|
101
|
+
### Use The Published Runtime
|
|
180
102
|
|
|
181
|
-
|
|
103
|
+
For a clean smoke test, run from outside the repo:
|
|
182
104
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
- `npm run auth:openai-codex` to run Codex OAuth bootstrap and save `providers.openai-codex.oauthAccessToken`.
|
|
105
|
+
```bash
|
|
106
|
+
cd ~
|
|
107
|
+
npx ouro.bot -v
|
|
108
|
+
npx ouro.bot up
|
|
109
|
+
ouro -v
|
|
110
|
+
ouro status
|
|
111
|
+
```
|
|
191
112
|
|
|
192
|
-
|
|
113
|
+
Expected shape:
|
|
193
114
|
|
|
194
|
-
|
|
115
|
+
- `npx ouro.bot` and `ouro` report the same version.
|
|
116
|
+
- `ouro status` shows the daemon overview plus discovered agents, senses, and workers.
|
|
195
117
|
|
|
196
|
-
|
|
118
|
+
### Work On The Harness
|
|
197
119
|
|
|
198
|
-
|
|
120
|
+
From the repo:
|
|
199
121
|
|
|
200
122
|
```bash
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
npm run dev:slugger
|
|
123
|
+
npm test
|
|
124
|
+
npx tsc --noEmit
|
|
125
|
+
npm run test:coverage
|
|
126
|
+
```
|
|
206
127
|
|
|
207
|
-
|
|
208
|
-
npm run auth:claude-setup-token
|
|
209
|
-
npm run auth:openai-codex
|
|
128
|
+
If you are changing runtime code, keep all three green.
|
|
210
129
|
|
|
211
|
-
|
|
212
|
-
npm run auth:claude-setup-token -- --agent slugger
|
|
213
|
-
npm run auth:openai-codex -- --agent slugger
|
|
130
|
+
## Common Commands
|
|
214
131
|
|
|
215
|
-
|
|
216
|
-
|
|
132
|
+
```bash
|
|
133
|
+
ouro up
|
|
134
|
+
ouro status
|
|
135
|
+
ouro logs
|
|
136
|
+
ouro stop
|
|
137
|
+
ouro hatch
|
|
138
|
+
ouro chat <agent>
|
|
139
|
+
ouro msg --to <agent> [--session <id>] [--task <ref>] <message>
|
|
140
|
+
ouro poke <agent> --task <task-id>
|
|
141
|
+
ouro link <agent> --friend <id> --provider <provider> --external-id <external-id>
|
|
142
|
+
```
|
|
217
143
|
|
|
218
|
-
|
|
219
|
-
npm run teams:no-stream
|
|
144
|
+
## Where To Read Next
|
|
220
145
|
|
|
221
|
-
|
|
222
|
-
|
|
146
|
+
- `AGENTS.md`
|
|
147
|
+
Repo workflow, planning/doing gates, configuration policy, and logging policy.
|
|
148
|
+
- `CONTRIBUTING.md`
|
|
149
|
+
Day-to-day contribution rules for agents working in the harness.
|
|
150
|
+
- `ARCHITECTURE.md`
|
|
151
|
+
Current daemon, bundle, sense, and update model.
|
|
152
|
+
- `docs/testing-guide.md`
|
|
153
|
+
Operator smoke flow for bootstrap, daemon, hatch, chat, and messaging.
|
|
223
154
|
|
|
224
|
-
|
|
225
|
-
npm run test:coverage
|
|
226
|
-
```
|
|
155
|
+
## A Note To Future Maintainers
|
|
227
156
|
|
|
228
|
-
|
|
157
|
+
If you discover a doc that lies, fix it or remove it. Accuracy is a kindness. A future agent should not have to untangle a fossil record just to understand where their hands are.
|
|
Binary file
|