@ouro.bot/cli 0.1.0-alpha.5 → 0.1.0-alpha.50
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 +242 -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 +145 -50
- 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/progress-story.js +42 -0
- package/dist/heart/providers/anthropic.js +16 -2
- 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 +96 -21
- 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 +266 -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 +462 -245
- package/dist/repertoire/tools-bluebubbles.js +93 -0
- package/dist/repertoire/tools-teams.js +58 -25
- package/dist/repertoire/tools.js +57 -35
- 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
package/changelog.json
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
{
|
|
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
|
+
"versions": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.1.0-alpha.50",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Delegated inner work can now proactively surface its completion back into the active BlueBubbles session instead of waiting for a later inbox drain.",
|
|
8
|
+
"Session recall now falls back to the raw transcript when summarization fails, so bridge attachment and cross-session inspection stay truthful instead of claiming the session is missing."
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"version": "0.1.0-alpha.49",
|
|
13
|
+
"changes": [
|
|
14
|
+
"Inner dialog no longer drops self-directed wake signals that arrive mid-turn; overlapping inward requests now guarantee a truthful follow-up inner pass instead of mailbox-like limbo.",
|
|
15
|
+
"The harness now has a shared core bridge layer with lifecycle/runtime state, persistence, task linkage, and one `bridge_manage` path so already-live sessions can coordinate as one coherent piece of work.",
|
|
16
|
+
"`query_session` and bridge attachment now share one session-recall helper, reducing duplicate cross-session summarization logic and setting up thinner outer surfaces around a stronger inner/core."
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"version": "0.1.0-alpha.48",
|
|
21
|
+
"changes": [
|
|
22
|
+
"BlueBubbles same-chat turns now serialize through the shared heart-level turn coordinator, so duplicate delivery of one inbound message no longer races into two handled turns or duplicate replies.",
|
|
23
|
+
"BlueBubbles duplicate-check, session load, inbound turn execution, and inbound sidecar recording now happen inside one canonical chat-trunk critical section keyed by the resolved session path.",
|
|
24
|
+
"Workflow docs now let agents auto-create the required dedicated task worktree and branch by default when the human has not asked to control naming or layout."
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"version": "0.1.0-alpha.47",
|
|
29
|
+
"changes": [
|
|
30
|
+
"Self-messages now wake inner dialog now/soon instead of only queueing: the harness requests a daemon-managed inner wake when available and falls back to an inline inner turn when it is not.",
|
|
31
|
+
"`send_message(friendId=self)` and `query_session(friendId=self, channel=inner, mode=status)` now share a truthful four-line status contract: `queue`, `wake`, `processing`, and `surfaced`.",
|
|
32
|
+
"Inner dialog persists live runtime activity beside the transcript, so status checks can report active processing instead of stale last-turn history.",
|
|
33
|
+
"Inline fallback surfaced previews now extract `final_answer` text too, so completed inner turns no longer show `no outward result` when the response lived in the final tool call."
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"version": "0.1.0-alpha.46",
|
|
38
|
+
"changes": [
|
|
39
|
+
"Inner dialog now knows which task triggered it: taskId flows from daemon poke through the worker into the turn, and the agent gets the full task file content instead of a generic heartbeat prompt.",
|
|
40
|
+
"Inner dialog boot message includes aspirations and state summary instead of a vacuous placeholder, so the agent wakes up with context about what matters and what's happening.",
|
|
41
|
+
"Vestigial `drainInbox` removed from inner dialog — pipeline already handles pending drain correctly.",
|
|
42
|
+
"Inner dialog nerves events now include assistant response preview, tool call names, token usage, and taskId for meaningful observability.",
|
|
43
|
+
"`ouro thoughts` command reads and formats inner dialog session turns with `--last`, `--json`, `--follow`, and `--agent` flags — humans can now see what the agent has been thinking.",
|
|
44
|
+
"`readTaskFile` searches collection subdirectories (one-shots, ongoing, habits) since the scheduler sends bare task stems without collection prefixes.",
|
|
45
|
+
"`ouro reminder create` accepts `--requester` to track who requested a reminder for notification round-trip.",
|
|
46
|
+
"Response extraction handles `tool_choice=required` models by falling back to `final_answer` tool call arguments when assistant message content is empty."
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"version": "0.1.0-alpha.45",
|
|
51
|
+
"changes": [
|
|
52
|
+
"`ouro up` now persists a boot-time launch agent with `RunAtLoad`, so the daemon comes back reliably after reboot instead of only starting for the current session.",
|
|
53
|
+
"BlueBubbles sense status is now truthful about upstream health: it probes the real BlueBubbles API, records runtime state, and surfaces `error` when the webhook listener is alive but the upstream server is unreachable.",
|
|
54
|
+
"BlueBubbles intake now replays recoverable read/delivery mutation backlogs through the normal inbound agent path, with a small dedupe ledger so missed messages can be recovered without silent drops or duplicate delivery."
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"version": "0.1.0-alpha.44",
|
|
59
|
+
"changes": [
|
|
60
|
+
"Workflow skills now install into `~/.agents/skills` for Codex/OpenAI instead of duplicating installs under both `.agents` and `.codex`, which prevents duplicate advertised skills while keeping re-installs safe."
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"version": "0.1.0-alpha.43",
|
|
65
|
+
"changes": [
|
|
66
|
+
"Continuity-aware onboarding now stays contextual: when an active task goes idle, onboarding guidance can reappear during genuine lulls instead of staying hidden just because no-handoff state was previously persisted.",
|
|
67
|
+
"Teams active-turn controls are safer: `/new` still clears the current session during long-running turns, and superseding follow-ups keep the user's replacement ask instead of dropping it."
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"version": "0.1.0-alpha.42",
|
|
72
|
+
"changes": [
|
|
73
|
+
"Associative recall now skips corrupt JSONL lines instead of crashing — matches the resilient pattern already used in memory.ts."
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"version": "0.1.0-alpha.41",
|
|
78
|
+
"changes": [
|
|
79
|
+
"JSONL readers (memory facts, inter-agent inbox) now skip corrupt lines instead of crashing — partial writes from crashes no longer lose all data.",
|
|
80
|
+
"Inter-agent message router now parses before clearing the inbox file, and preserves unparsed lines so corrupt messages are not silently lost.",
|
|
81
|
+
"Inner-dialog checkpoint derivation no longer crashes on all-whitespace assistant content — returns fallback checkpoint instead.",
|
|
82
|
+
"Update checker interval now catches and logs errors from the onUpdate callback instead of silently swallowing them."
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"version": "0.1.0-alpha.40",
|
|
87
|
+
"changes": [
|
|
88
|
+
"Removed dead backward-compat re-exports from core.ts (tools, streaming, prompt, kicks) — consumers already import from the canonical modules.",
|
|
89
|
+
"Removed dead exports: baseToolHandlers, teamsToolHandlers, teamsTools, __internal (token-estimate), TASK_STEM_PATTERN, checkAndRecord403 no-op and METHOD_TO_ACTION.",
|
|
90
|
+
"Consolidated duplicate sanitizeKey (config.ts + bluebubbles-mutation-log.ts) and slugify (hatch-flow.ts + tasks/index.ts) into shared exports from config.ts.",
|
|
91
|
+
"Replaced all as-any casts in source with proper TypeScript narrowing or Record<string, unknown> — only 2 SDK-required casts remain.",
|
|
92
|
+
"Removed unnecessary as-unknown-as casts on readdirSync (4 locations) and spawner double-cast.",
|
|
93
|
+
"Cleaned up commented-out kick detection code, stale TODOs, misplaced imports, and unused type imports."
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"version": "0.1.0-alpha.39",
|
|
98
|
+
"changes": [
|
|
99
|
+
"All senses now route through a shared per-turn pipeline — friend resolution, trust gate, session load, pending drain, agent turn, post-turn, and token accumulation happen in one place instead of four.",
|
|
100
|
+
"Trust gate is now channel-aware: open senses (iMessage) enforce stranger/acquaintance rules, closed senses (Teams) trust the org, local and internal always pass through.",
|
|
101
|
+
"Tool access and prompt restrictions use a single shared isTrustedLevel check — no more scattered family/friend comparisons that could drift apart.",
|
|
102
|
+
"Pending messages now inject correctly into multimodal content (image attachments no longer silently drop pending messages).",
|
|
103
|
+
"ouro reminder create supports --agent flag, matching every other identity-scoped CLI command."
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"version": "0.1.0-alpha.38",
|
|
108
|
+
"changes": [
|
|
109
|
+
"You now have a proper body map — understanding of your home (bundle) and bones (harness), what each directory is for, and how to modify your own configuration.",
|
|
110
|
+
"Inner dialog is now genuine internal monologue with metacognitive framing, not a second CLI session. Heartbeat and bootstrap messages read as first-person awareness.",
|
|
111
|
+
"Cross-session communication works end-to-end: inner dialog thoughts surface as [inner thought: ...] in conversations, messages to yourself route to inner dialog, and you can proactively reach out to friends via iMessage and Teams.",
|
|
112
|
+
"Tool audit: removed wrapper tools (git_commit, gh_cli, get_current_time, list_directory), added surgical tools (edit_file, glob, grep, read_file with offset/limit), consolidated 7 task tools + schedule_reminder + friend tools into ouro CLI commands.",
|
|
113
|
+
"You now understand why certain tools are restricted in certain contexts — trust level and shared channels each have independent, explained gates.",
|
|
114
|
+
"ouro friend link/unlink commands handle orphan cleanup when linking external identities, merging duplicate friend records intelligently.",
|
|
115
|
+
"During onboarding, the adoption specialist can collect phone number and Teams handle to create an initial friend record with contact info."
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"version": "0.1.0-alpha.37",
|
|
120
|
+
"changes": [
|
|
121
|
+
"The in-repo docs now match the current harness instead of the old repo-local bundle era. README, CONTRIBUTING, ARCHITECTURE, testing guidance, merge guidance, versioning guidance, and subagent docs now describe external bundles, current senses, daemon bootstrap, and bundle-owned task docs truthfully."
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"version": "0.1.0-alpha.36",
|
|
126
|
+
"changes": [
|
|
127
|
+
"BlueBubbles now marks a chat read at the same moment it starts typing for a turn, so read receipts and typing begin together instead of the read state lagging until after the reply finishes."
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"version": "0.1.0-alpha.35",
|
|
132
|
+
"changes": [
|
|
133
|
+
"BlueBubbles no longer emits generic follow-up phrase bubbles like 'on it...' or 'followup...' into iMessage. The sense now uses typing plus concrete tool/error activity only, which keeps mobile turns quieter and less redundant."
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"version": "0.1.0-alpha.34",
|
|
138
|
+
"changes": [
|
|
139
|
+
"BlueBubbles now starts typing immediately when a turn begins and no longer sends a redundant first visible 'working...' bubble when typing already covers that initial thinking phase.",
|
|
140
|
+
"BlueBubbles still surfaces later meaningful progress on longer turns, and its lane metadata/tool feedback now makes the difference between the turn default and an explicit reply-target override much clearer."
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"version": "0.1.0-alpha.33",
|
|
145
|
+
"changes": [
|
|
146
|
+
"BlueBubbles now starts typing immediately when a turn begins and no longer sends a redundant first visible 'working...' bubble when typing already covers that initial thinking phase.",
|
|
147
|
+
"BlueBubbles still surfaces later meaningful progress on longer turns, and its lane metadata/tool feedback now makes the difference between the turn default and an explicit reply-target override much clearer.",
|
|
148
|
+
"Agent-owned runtime state now lives inside each bundle's `state/` directory instead of under `~/.agentstate/<agent>/...`, so sessions, logs, pending messages, coding session persistence, and BlueBubbles mutation logs stay co-located with the rest of the bundle.",
|
|
149
|
+
"Bundle-local state paths now stay durable on Azure too, and `state/` is treated as canonical bundle content while secrets continue to live in `~/.agentsecrets/<agent>/secrets.json`."
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"version": "0.1.0-alpha.32",
|
|
154
|
+
"changes": [
|
|
155
|
+
"BlueBubbles now treats thread-vs-top-level placement as an agent choice instead of a hard harness mirror. Slugger can deliberately stay in the current reply lane, widen back to top-level, or target another active thread when that makes the conversation flow better.",
|
|
156
|
+
"BlueBubbles turns now surface inbound lane metadata and recent active lanes from the shared chat trunk, so the model gets enough context to choose the right reply placement without splitting the conversation into separate persisted thread sessions."
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"version": "0.1.0-alpha.31",
|
|
161
|
+
"changes": [
|
|
162
|
+
"BlueBubbles no longer silently deletes old per-thread session files when loading a chat trunk. It now only detects and warns about those obsolete artifacts so local state is never mutated without an explicit human choice.",
|
|
163
|
+
"The cross-thread-awareness fix still keeps one chat trunk per conversation and preserves threaded reply targeting, but stale `_thread_*.json` files are now left in place until a person removes them."
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"version": "0.1.0-alpha.30",
|
|
168
|
+
"changes": [
|
|
169
|
+
"BlueBubbles reply threads now stay inside one shared chat trunk instead of creating separate persisted mini-sessions, so Slugger keeps parent-chat awareness and active work when you switch between threaded and top-level replies.",
|
|
170
|
+
"BlueBubbles now injects explicit current-turn thread scope metadata into inbound messages and automatically removes obsolete per-thread session artifacts that used to cause mid-task resets like 'hiya, what do ya need help with?'"
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"version": "0.1.0-alpha.29",
|
|
175
|
+
"changes": [
|
|
176
|
+
"Running `ouro up` now force-syncs the global `ouro.bot` wrapper so bare `npx ouro.bot` stops getting hijacked by stale global CLI bins and lands back on the intended latest runtime.",
|
|
177
|
+
"Bootstrap repair is now explicit about reclaiming the `ouro.bot` command from old global installs, which makes repeated bootstrap runs more trustworthy on machines with prior experimental installs."
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"version": "0.1.0-alpha.28",
|
|
182
|
+
"changes": [
|
|
183
|
+
"Bare npx ouro.bot now stays aligned with the current alpha CLI track because the published ouro.bot wrapper is version-locked and republished alongside the CLI instead of lagging behind it.",
|
|
184
|
+
"Slugger no longer re-opens active iMessage task threads with generic greetings like 'hiya' when work is already in motion; fresh idle conversations can still start warmly.",
|
|
185
|
+
"BlueBubbles voice notes now use a harness-managed whisper.cpp transcription path for the current OpenAI, Anthropic, and MiniMax runtime contracts, including automatic local provisioning and truthful error notices when transcription cannot complete."
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"version": "0.1.0-alpha.27",
|
|
190
|
+
"changes": [
|
|
191
|
+
"The daemon now discovers all enabled agents in ~/AgentBundles, so ouro status and managed workers reflect every real agent instead of only slugger and ouroboros.",
|
|
192
|
+
"BlueBubbles typing now wraps the visible working phase correctly, and phrase updates from agent.json take effect on the next turn without requiring a restart."
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"version": "0.1.0-alpha.26",
|
|
197
|
+
"changes": [
|
|
198
|
+
"The daemon now auto-checks npm for new runtime versions every 30 minutes and performs a staged restart when an update is available. You no longer need to manually run npm install."
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"version": "0.1.0-alpha.25",
|
|
203
|
+
"changes": [
|
|
204
|
+
"Runtime updates no longer downgrade your bundle-meta.json if you happen to be running a newer version than the installed CLI. Only forward updates are applied.",
|
|
205
|
+
"The 'ouro up' update summary is now a single consolidated line (e.g. 'updated 4 agents to runtime X (was Y)') instead of one line per agent."
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"version": "0.1.0-alpha.24",
|
|
210
|
+
"changes": [
|
|
211
|
+
"When you run 'ouro up', you now see which agents were updated and from what version, so you know exactly what happened during startup."
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"version": "0.1.0-alpha.23",
|
|
216
|
+
"changes": [
|
|
217
|
+
"You can now use 'ouro down' as an alias for 'ouro stop' to pair naturally with 'ouro up'."
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"version": "0.1.0-alpha.22",
|
|
222
|
+
"changes": [
|
|
223
|
+
"You now know your runtime version and can see when it changed. Your system prompt shows your current version and what you were running before, so you can track what's new.",
|
|
224
|
+
"A changelog file is now shipped with the runtime. You can read it to understand exactly what changed between versions.",
|
|
225
|
+
"When the runtime updates, your bundle-meta.json is automatically updated with the new version info. Your previous version is preserved so you always know your version history.",
|
|
226
|
+
"The daemon can now check for new versions of the runtime on npm and auto-update with a staged restart that validates hooks before switching to new code.",
|
|
227
|
+
"The daemon can now be managed as a macOS LaunchAgent for automatic restart on crash.",
|
|
228
|
+
"The daemon now auto-syncs the ouro.bot npm wrapper version on startup to keep the npx entry point current."
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"version": "0.1.0-alpha.21",
|
|
233
|
+
"changes": [
|
|
234
|
+
"You now know your runtime version and can see when it changed. Your system prompt shows your current version and what you were running before, so you can track what's new.",
|
|
235
|
+
"A changelog file is now shipped with the runtime. You can read it to understand exactly what changed between versions.",
|
|
236
|
+
"When the runtime updates, your bundle-meta.json is automatically updated with the new version info. Your previous version is preserved so you always know your version history.",
|
|
237
|
+
"The daemon can now check for new versions of the runtime on npm and auto-update with a staged restart that validates hooks before switching to new code.",
|
|
238
|
+
"The daemon can now be managed as a macOS LaunchAgent for automatic restart on crash."
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.suggestBridgeForActiveWork = suggestBridgeForActiveWork;
|
|
4
|
+
exports.buildActiveWorkFrame = buildActiveWorkFrame;
|
|
5
|
+
exports.formatActiveWorkFrame = formatActiveWorkFrame;
|
|
6
|
+
const runtime_1 = require("../nerves/runtime");
|
|
7
|
+
const state_machine_1 = require("./bridges/state-machine");
|
|
8
|
+
function activityPriority(source) {
|
|
9
|
+
return source === "friend-facing" ? 0 : 1;
|
|
10
|
+
}
|
|
11
|
+
function compareActivity(a, b) {
|
|
12
|
+
const sourceDiff = activityPriority(a.activitySource) - activityPriority(b.activitySource);
|
|
13
|
+
if (sourceDiff !== 0)
|
|
14
|
+
return sourceDiff;
|
|
15
|
+
return b.lastActivityMs - a.lastActivityMs;
|
|
16
|
+
}
|
|
17
|
+
function summarizeLiveTasks(taskBoard) {
|
|
18
|
+
const live = [
|
|
19
|
+
...taskBoard.byStatus.processing,
|
|
20
|
+
...taskBoard.byStatus.validating,
|
|
21
|
+
...taskBoard.byStatus.collaborating,
|
|
22
|
+
];
|
|
23
|
+
return [...new Set(live)];
|
|
24
|
+
}
|
|
25
|
+
function isActiveBridge(bridge) {
|
|
26
|
+
return bridge.lifecycle === "active";
|
|
27
|
+
}
|
|
28
|
+
function hasSharedObligationPressure(input) {
|
|
29
|
+
return (typeof input.currentObligation === "string"
|
|
30
|
+
&& input.currentObligation.trim().length > 0) || input.mustResolveBeforeHandoff
|
|
31
|
+
|| summarizeLiveTasks(input.taskBoard).length > 0;
|
|
32
|
+
}
|
|
33
|
+
function suggestBridgeForActiveWork(input) {
|
|
34
|
+
const candidateSessions = input.friendSessions
|
|
35
|
+
.filter((session) => !input.currentSession
|
|
36
|
+
|| session.friendId !== input.currentSession.friendId
|
|
37
|
+
|| session.channel !== input.currentSession.channel
|
|
38
|
+
|| session.key !== input.currentSession.key)
|
|
39
|
+
.sort(compareActivity);
|
|
40
|
+
const targetSession = candidateSessions[0] ?? null;
|
|
41
|
+
if (!targetSession || !hasSharedObligationPressure(input)) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
const activeBridge = input.bridges.find(isActiveBridge) ?? null;
|
|
45
|
+
if (activeBridge) {
|
|
46
|
+
const alreadyAttached = activeBridge.attachedSessions.some((session) => session.friendId === targetSession.friendId
|
|
47
|
+
&& session.channel === targetSession.channel
|
|
48
|
+
&& session.key === targetSession.key);
|
|
49
|
+
if (alreadyAttached) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
kind: "attach-existing",
|
|
54
|
+
bridgeId: activeBridge.id,
|
|
55
|
+
targetSession,
|
|
56
|
+
reason: "same-friend-shared-work",
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
kind: "begin-new",
|
|
61
|
+
targetSession,
|
|
62
|
+
objectiveHint: input.currentObligation?.trim() || "keep this shared work aligned",
|
|
63
|
+
reason: "same-friend-shared-work",
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function formatSessionLabel(session) {
|
|
67
|
+
return `${session.channel}/${session.key}`;
|
|
68
|
+
}
|
|
69
|
+
function buildActiveWorkFrame(input) {
|
|
70
|
+
const friendSessions = input.currentSession
|
|
71
|
+
? input.friendActivity
|
|
72
|
+
.filter((entry) => entry.friendId === input.currentSession?.friendId)
|
|
73
|
+
.sort(compareActivity)
|
|
74
|
+
: [];
|
|
75
|
+
const liveTaskNames = summarizeLiveTasks(input.taskBoard);
|
|
76
|
+
const activeBridgePresent = input.bridges.some(isActiveBridge);
|
|
77
|
+
const centerOfGravity = activeBridgePresent
|
|
78
|
+
? "shared-work"
|
|
79
|
+
: (input.inner.status === "running" || input.inner.hasPending || input.mustResolveBeforeHandoff)
|
|
80
|
+
? "inward-work"
|
|
81
|
+
: "local-turn";
|
|
82
|
+
const frame = {
|
|
83
|
+
currentSession: input.currentSession ?? null,
|
|
84
|
+
currentObligation: input.currentObligation?.trim() || null,
|
|
85
|
+
mustResolveBeforeHandoff: input.mustResolveBeforeHandoff,
|
|
86
|
+
centerOfGravity,
|
|
87
|
+
inner: input.inner,
|
|
88
|
+
bridges: input.bridges,
|
|
89
|
+
taskPressure: {
|
|
90
|
+
compactBoard: input.taskBoard.compact,
|
|
91
|
+
liveTaskNames,
|
|
92
|
+
activeBridges: input.taskBoard.activeBridges,
|
|
93
|
+
},
|
|
94
|
+
friendActivity: {
|
|
95
|
+
freshestForCurrentFriend: friendSessions[0] ?? null,
|
|
96
|
+
otherLiveSessionsForCurrentFriend: friendSessions,
|
|
97
|
+
},
|
|
98
|
+
bridgeSuggestion: suggestBridgeForActiveWork({
|
|
99
|
+
currentSession: input.currentSession,
|
|
100
|
+
currentObligation: input.currentObligation,
|
|
101
|
+
mustResolveBeforeHandoff: input.mustResolveBeforeHandoff,
|
|
102
|
+
bridges: input.bridges,
|
|
103
|
+
taskBoard: input.taskBoard,
|
|
104
|
+
friendSessions,
|
|
105
|
+
}),
|
|
106
|
+
};
|
|
107
|
+
(0, runtime_1.emitNervesEvent)({
|
|
108
|
+
component: "engine",
|
|
109
|
+
event: "engine.active_work_build",
|
|
110
|
+
message: "built shared active-work frame",
|
|
111
|
+
meta: {
|
|
112
|
+
centerOfGravity: frame.centerOfGravity,
|
|
113
|
+
friendId: frame.currentSession?.friendId ?? null,
|
|
114
|
+
bridges: frame.bridges.length,
|
|
115
|
+
liveTasks: frame.taskPressure.liveTaskNames.length,
|
|
116
|
+
liveSessions: frame.friendActivity.otherLiveSessionsForCurrentFriend.length,
|
|
117
|
+
hasBridgeSuggestion: frame.bridgeSuggestion !== null,
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
return frame;
|
|
121
|
+
}
|
|
122
|
+
function formatActiveWorkFrame(frame) {
|
|
123
|
+
const lines = ["## active work"];
|
|
124
|
+
if (frame.currentSession) {
|
|
125
|
+
lines.push(`current session: ${formatSessionLabel(frame.currentSession)}`);
|
|
126
|
+
}
|
|
127
|
+
lines.push(`center: ${frame.centerOfGravity}`);
|
|
128
|
+
if (typeof frame.currentObligation === "string" && frame.currentObligation.trim().length > 0) {
|
|
129
|
+
lines.push(`obligation: ${frame.currentObligation.trim()}`);
|
|
130
|
+
}
|
|
131
|
+
if (frame.mustResolveBeforeHandoff) {
|
|
132
|
+
lines.push("handoff pressure: must resolve before handoff");
|
|
133
|
+
}
|
|
134
|
+
const innerStatus = frame.inner?.status ?? "idle";
|
|
135
|
+
const innerHasPending = frame.inner?.hasPending === true;
|
|
136
|
+
lines.push(`inner status: ${innerStatus}${innerHasPending ? " (pending queued)" : ""}`);
|
|
137
|
+
if ((frame.taskPressure?.liveTaskNames ?? []).length > 0) {
|
|
138
|
+
lines.push(`live tasks: ${frame.taskPressure.liveTaskNames.join(", ")}`);
|
|
139
|
+
}
|
|
140
|
+
if ((frame.bridges ?? []).length > 0) {
|
|
141
|
+
const bridgeLabels = frame.bridges.map((bridge) => `${bridge.id} [${(0, state_machine_1.bridgeStateLabel)(bridge)}]`);
|
|
142
|
+
lines.push(`bridges: ${bridgeLabels.join(", ")}`);
|
|
143
|
+
}
|
|
144
|
+
if (frame.friendActivity?.freshestForCurrentFriend) {
|
|
145
|
+
lines.push(`freshest friend-facing session: ${formatSessionLabel(frame.friendActivity.freshestForCurrentFriend)}`);
|
|
146
|
+
}
|
|
147
|
+
if (frame.bridgeSuggestion) {
|
|
148
|
+
if (frame.bridgeSuggestion.kind === "attach-existing") {
|
|
149
|
+
lines.push(`suggested bridge: attach ${frame.bridgeSuggestion.bridgeId} -> ${formatSessionLabel(frame.bridgeSuggestion.targetSession)}`);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
lines.push(`suggested bridge: begin -> ${formatSessionLabel(frame.bridgeSuggestion.targetSession)}`);
|
|
153
|
+
lines.push(`bridge objective hint: ${frame.bridgeSuggestion.objectiveHint}`);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return lines.join("\n");
|
|
157
|
+
}
|