@ouro.bot/cli 0.1.0-alpha.7 → 0.1.0-alpha.70

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.
Files changed (123) hide show
  1. package/AdoptionSpecialist.ouro/agent.json +70 -9
  2. package/AdoptionSpecialist.ouro/psyche/SOUL.md +5 -2
  3. package/AdoptionSpecialist.ouro/psyche/identities/monty.md +2 -2
  4. package/README.md +147 -205
  5. package/assets/ouroboros.png +0 -0
  6. package/changelog.json +387 -0
  7. package/dist/heart/active-work.js +178 -0
  8. package/dist/heart/bridges/manager.js +358 -0
  9. package/dist/heart/bridges/state-machine.js +135 -0
  10. package/dist/heart/bridges/store.js +123 -0
  11. package/dist/heart/config.js +68 -23
  12. package/dist/heart/core.js +282 -92
  13. package/dist/heart/cross-chat-delivery.js +146 -0
  14. package/dist/heart/daemon/agent-discovery.js +81 -0
  15. package/dist/heart/daemon/auth-flow.js +409 -0
  16. package/dist/heart/daemon/daemon-cli.js +1395 -248
  17. package/dist/heart/daemon/daemon-entry.js +55 -6
  18. package/dist/heart/daemon/daemon-runtime-sync.js +212 -0
  19. package/dist/heart/daemon/daemon.js +216 -10
  20. package/dist/heart/daemon/hatch-animation.js +10 -3
  21. package/dist/heart/daemon/hatch-flow.js +7 -82
  22. package/dist/heart/daemon/hooks/bundle-meta.js +92 -0
  23. package/dist/heart/daemon/launchd.js +159 -0
  24. package/dist/heart/daemon/log-tailer.js +4 -3
  25. package/dist/heart/daemon/message-router.js +17 -8
  26. package/dist/heart/daemon/ouro-bot-entry.js +0 -0
  27. package/dist/heart/daemon/ouro-bot-global-installer.js +128 -0
  28. package/dist/heart/daemon/ouro-entry.js +0 -0
  29. package/dist/heart/daemon/ouro-path-installer.js +178 -0
  30. package/dist/heart/daemon/ouro-uti.js +11 -2
  31. package/dist/heart/daemon/process-manager.js +14 -1
  32. package/dist/heart/daemon/run-hooks.js +37 -0
  33. package/dist/heart/daemon/runtime-logging.js +58 -15
  34. package/dist/heart/daemon/runtime-metadata.js +219 -0
  35. package/dist/heart/daemon/runtime-mode.js +67 -0
  36. package/dist/heart/daemon/sense-manager.js +307 -0
  37. package/dist/heart/daemon/skill-management-installer.js +94 -0
  38. package/dist/heart/daemon/socket-client.js +202 -0
  39. package/dist/heart/daemon/specialist-orchestrator.js +53 -84
  40. package/dist/heart/daemon/specialist-prompt.js +64 -5
  41. package/dist/heart/daemon/specialist-tools.js +213 -58
  42. package/dist/heart/daemon/staged-restart.js +114 -0
  43. package/dist/heart/daemon/thoughts.js +379 -0
  44. package/dist/heart/daemon/update-checker.js +111 -0
  45. package/dist/heart/daemon/update-hooks.js +138 -0
  46. package/dist/heart/daemon/wrapper-publish-guard.js +86 -0
  47. package/dist/heart/delegation.js +62 -0
  48. package/dist/heart/identity.js +126 -21
  49. package/dist/heart/kicks.js +1 -19
  50. package/dist/heart/model-capabilities.js +48 -0
  51. package/dist/heart/progress-story.js +42 -0
  52. package/dist/heart/providers/anthropic.js +74 -9
  53. package/dist/heart/providers/azure.js +86 -7
  54. package/dist/heart/providers/github-copilot.js +149 -0
  55. package/dist/heart/providers/minimax.js +4 -0
  56. package/dist/heart/providers/openai-codex.js +12 -3
  57. package/dist/heart/safe-workspace.js +228 -0
  58. package/dist/heart/sense-truth.js +61 -0
  59. package/dist/heart/session-activity.js +169 -0
  60. package/dist/heart/session-recall.js +116 -0
  61. package/dist/heart/streaming.js +100 -22
  62. package/dist/heart/target-resolution.js +123 -0
  63. package/dist/heart/turn-coordinator.js +28 -0
  64. package/dist/mind/associative-recall.js +14 -2
  65. package/dist/mind/bundle-manifest.js +70 -0
  66. package/dist/mind/context.js +27 -11
  67. package/dist/mind/first-impressions.js +16 -2
  68. package/dist/mind/friends/channel.js +35 -0
  69. package/dist/mind/friends/group-context.js +144 -0
  70. package/dist/mind/friends/store-file.js +19 -0
  71. package/dist/mind/friends/trust-explanation.js +74 -0
  72. package/dist/mind/friends/types.js +8 -0
  73. package/dist/mind/memory.js +27 -26
  74. package/dist/mind/pending.js +72 -9
  75. package/dist/mind/phrases.js +1 -0
  76. package/dist/mind/prompt.js +358 -77
  77. package/dist/mind/token-estimate.js +8 -12
  78. package/dist/nerves/cli-logging.js +15 -2
  79. package/dist/nerves/coverage/run-artifacts.js +1 -1
  80. package/dist/repertoire/ado-client.js +4 -2
  81. package/dist/repertoire/coding/feedback.js +134 -0
  82. package/dist/repertoire/coding/index.js +4 -1
  83. package/dist/repertoire/coding/manager.js +62 -4
  84. package/dist/repertoire/coding/spawner.js +3 -3
  85. package/dist/repertoire/coding/tools.js +41 -2
  86. package/dist/repertoire/data/ado-endpoints.json +188 -0
  87. package/dist/repertoire/guardrails.js +279 -0
  88. package/dist/repertoire/mcp-client.js +254 -0
  89. package/dist/repertoire/mcp-manager.js +195 -0
  90. package/dist/repertoire/skills.js +3 -26
  91. package/dist/repertoire/tasks/board.js +12 -0
  92. package/dist/repertoire/tasks/index.js +23 -9
  93. package/dist/repertoire/tasks/transitions.js +1 -2
  94. package/dist/repertoire/tools-base.js +642 -251
  95. package/dist/repertoire/tools-bluebubbles.js +93 -0
  96. package/dist/repertoire/tools-teams.js +58 -25
  97. package/dist/repertoire/tools.js +93 -52
  98. package/dist/senses/bluebubbles-client.js +210 -5
  99. package/dist/senses/bluebubbles-entry.js +2 -0
  100. package/dist/senses/bluebubbles-inbound-log.js +109 -0
  101. package/dist/senses/bluebubbles-media.js +339 -0
  102. package/dist/senses/bluebubbles-model.js +12 -4
  103. package/dist/senses/bluebubbles-mutation-log.js +45 -5
  104. package/dist/senses/bluebubbles-runtime-state.js +109 -0
  105. package/dist/senses/bluebubbles-session-cleanup.js +72 -0
  106. package/dist/senses/bluebubbles.js +893 -45
  107. package/dist/senses/cli-layout.js +87 -0
  108. package/dist/senses/cli.js +348 -144
  109. package/dist/senses/continuity.js +94 -0
  110. package/dist/senses/debug-activity.js +148 -0
  111. package/dist/senses/inner-dialog-worker.js +47 -18
  112. package/dist/senses/inner-dialog.js +333 -84
  113. package/dist/senses/pipeline.js +278 -0
  114. package/dist/senses/teams.js +573 -129
  115. package/dist/senses/trust-gate.js +112 -2
  116. package/package.json +14 -3
  117. package/subagents/README.md +4 -70
  118. package/dist/heart/daemon/specialist-session.js +0 -142
  119. package/dist/heart/daemon/subagent-installer.js +0 -125
  120. package/dist/inner-worker-entry.js +0 -4
  121. package/subagents/work-doer.md +0 -233
  122. package/subagents/work-merger.md +0 -624
  123. package/subagents/work-planner.md +0 -373
package/changelog.json ADDED
@@ -0,0 +1,387 @@
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.70",
6
+ "changes": [
7
+ "New github-copilot LLM provider: use GitHub Copilot as model backend via `gh auth` token. Claude models route to /chat/completions, GPT models to /responses. Endpoint auto-discovered from your Copilot enterprise plan.",
8
+ "Auth decoupled from switching: `ouro auth --provider X` now stores credentials only. Use `ouro auth switch --provider X` to change the active provider, and `ouro auth verify` to check which stored providers have valid credentials.",
9
+ "Agents can now manage their own auth: `ouro auth`, `ouro auth verify`, and `ouro auth switch` are in the system prompt and gated at family trust level. Auth error messages include actionable recovery guidance.",
10
+ "Fix: `ouro --agent <name> <command>` now works correctly when --agent is the first argument."
11
+ ]
12
+ },
13
+ {
14
+ "version": "0.1.0-alpha.69",
15
+ "changes": [
16
+ "Generic MCP client: ouroboros agents can now connect to any MCP server (e.g., agency mcp ado, agency mcp mail) configured in agent.json. Zero new dependencies — pure JSON-RPC over stdio.",
17
+ "New `ouro mcp list` and `ouro mcp call` CLI commands route through the daemon socket to persistent MCP connections, so agents use shared server instances instead of spawning fresh ones per call.",
18
+ "MCP tools are injected into the agent's system prompt on startup, so agents know what external capabilities are available without a discovery step.",
19
+ "Trust manifest: `mcp list` requires acquaintance trust, `mcp call` requires friend trust."
20
+ ]
21
+ },
22
+ {
23
+ "version": "0.1.0-alpha.68",
24
+ "changes": [
25
+ "New no_response tool lets agents stay silent in group chats when the moment doesn't call for a reply — reactions, side conversations, and tapbacks no longer trigger unwanted responses.",
26
+ "Group chat participation prompt teaches agents to be intentional participants, comfortable with silence, and to prefer reactions over full text replies when appropriate.",
27
+ "System prompt includes --agent flag in all ouro CLI examples for non-daemon deployments. Azure startup symlinks ouro CLI into /usr/local/bin."
28
+ ]
29
+ },
30
+ {
31
+ "version": "0.1.0-alpha.66",
32
+ "changes": [
33
+ "The ouro PATH shim now uses npx --prefer-online to always check the npm registry before using cached packages. Prevents stale npx cache from serving old runtime versions on ouro up."
34
+ ]
35
+ },
36
+ {
37
+ "version": "0.1.0-alpha.65",
38
+ "changes": [
39
+ "Tool permissions overhauled: channel-level blocking removed, all tools now visible on all channels. Guardrails are invocation-level with two layers — structural (edit-requires-read, destructive pattern blocking, protected paths) always on for everyone, and trust-level (ouro CLI per-subcommand trust manifest, general CLI allowlists, bundle-scoped writes) for untrusted contexts.",
40
+ "New `ouro changelog` CLI subcommand reads changelog.json and supports `--from <version>` for delta filtering, so agents can introspect their own update history on any channel.",
41
+ "Compound shell commands (&&, ;, |, $()) are blocked for untrusted users to prevent smuggling dangerous operations behind safe prefixes.",
42
+ "Azure App Service deployment migrated from zip-deploy to npm-based harness install with persistent agent bundle and managed identity auth."
43
+ ]
44
+ },
45
+ {
46
+ "version": "0.1.0-alpha.63",
47
+ "changes": [
48
+ "ensureSkillManagement now iterates all discovered agent bundles instead of requiring a single-agent context. Fixes skill-management not being installed during ouro up."
49
+ ]
50
+ },
51
+ {
52
+ "version": "0.1.0-alpha.62",
53
+ "changes": [
54
+ "ensureSkillManagement now prints to stdout on install/failure instead of only emitting silent nerves events."
55
+ ]
56
+ },
57
+ {
58
+ "version": "0.1.0-alpha.61",
59
+ "changes": [
60
+ "Workflow skills (work-planner, work-doer, work-merger) migrated to the shared ouroboros-skills repo at github.com/ouroborosbot/ouroboros-skills.",
61
+ "Removed the subagent-installer. Skills are now installed via the skill-management bootstrap skill or manual download.",
62
+ "Skills loading simplified from 3-source to 2-source model. Canonical-protocol fallback to subagents/ removed.",
63
+ "New ensureSkillManagement() auto-installs the skill-management bootstrap skill from the shared repo on ouro up."
64
+ ]
65
+ },
66
+ {
67
+ "version": "0.1.0-alpha.60",
68
+ "changes": [
69
+ "Azure OpenAI provider now supports DefaultAzureCredential for managed identity auth in production and az-login auth for local dev, with API key as an optional fallback.",
70
+ "The @azure/identity package is lazy-loaded only when the managed identity path is used, so API key users and other providers pay no cold-start cost.",
71
+ "Auth failure errors now preserve the original cause and list all three resolution paths (API key, az login, managed identity)."
72
+ ]
73
+ },
74
+ {
75
+ "version": "0.1.0-alpha.59",
76
+ "changes": [
77
+ "Repo file edits now acquire a safe workspace before local tool writes, creating a dedicated worktree from `origin/main` when running from a clone and a scratch clone from the canonical GitHub source when running from an installed runtime.",
78
+ "The harness now has bundle-local workspace primitives for repo work plus bundle-local daemon logs, daemon logging config, message routing storage, and tool caches instead of leaning on `~/.agentstate` paths.",
79
+ "Coverage/test-run artifacts and related runtime expectations now use the new non-`~/.agentstate` locations, and daemon/tool tests cover the safe workspace decision table and the bundle-local path migration."
80
+ ]
81
+ },
82
+ {
83
+ "version": "0.1.0-alpha.58",
84
+ "changes": [
85
+ "Normal `ouro` and `ouro-bot` CLI entrypoints now stay quiet by default in the terminal while still writing runtime NDJSON logs, and explicit logging overrides still work.",
86
+ "Interactive pasted input now clears every echoed row before re-rendering its bold summary, so multi-line instructions stay legible instead of colliding with prompt redraws and streaming output.",
87
+ "Wrapped CLI text now prefers whitespace breaks for ordinary words and only splits a word mid-line when that single word is wider than the terminal."
88
+ ]
89
+ },
90
+ {
91
+ "version": "0.1.0-alpha.57",
92
+ "changes": [
93
+ "Explicit `ouro chat <agent>` now launches the local interactive chat flow instead of just printing the daemon's connection acknowledgement and exiting.",
94
+ "The explicit chat path still ensures the daemon is running first, so direct chat commands behave like the existing auto-chat flows without losing daemon setup.",
95
+ "Daemon CLI coverage now includes the explicit `chat <agent>` route so regressions in interactive chat startup get caught in tests."
96
+ ]
97
+ },
98
+ {
99
+ "version": "0.1.0-alpha.56",
100
+ "changes": [
101
+ "The installed runtime now supports `ouro auth --agent <name>` as the normal provider auth and reauth path, with `--provider <provider>` available for explicit provider add/switch flows.",
102
+ "Anthropic and OpenAI Codex hatch/signup now share the same runtime auth backbone as later reauth, so first-time setup and recovery follow one consistent mental model.",
103
+ "Provider auth failures now point at the supported `ouro auth` recovery path and tell you what to do after reauth, including retrying the failed `ouro` command or reconnecting the errored session."
104
+ ]
105
+ },
106
+ {
107
+ "version": "0.1.0-alpha.55",
108
+ "changes": [
109
+ "Memory fact dedup now catches paraphrased duplicates via cosine similarity on existing embeddings, so semantically equivalent facts no longer slip past the word-overlap check.",
110
+ "Semantic dedup gracefully handles corrupt JSONL entries with missing or undefined embeddings instead of crashing on bad data.",
111
+ "Cosine similarity is now imported from associative-recall instead of duplicated in the memory module."
112
+ ]
113
+ },
114
+ {
115
+ "version": "0.1.0-alpha.54",
116
+ "changes": [
117
+ "Disk-backed runtime config now reloads from agent and secrets files instead of being held behind stale process-level caches, so config changes are picked up truthfully.",
118
+ "`ouro up` now treats runtime drift as a real restart trigger, including repo-root drift, config-fingerprint drift, and stale launchd boot persistence after branch/worktree changes.",
119
+ "BlueBubbles status now prefers fresh runtime health over stale managed-process crash snapshots, preventing false whole-sense `error` reports when the live channel is actually healthy."
120
+ ]
121
+ },
122
+ {
123
+ "version": "0.1.0-alpha.53",
124
+ "changes": [
125
+ "Daemon plist now inherits PATH from the installing process, so child agent spawns can find node regardless of launchd's minimal default environment.",
126
+ "Daemon startup and status output now show the entry path and runtime mode (dev vs production) so it's immediately obvious where the daemon is running from and whether it's a dev repo, worktree, or npm install.",
127
+ "Agent spawn in the process manager now validates the entry script exists before calling spawn, setting the agent to crashed with a clear error instead of an opaque ENOENT.",
128
+ "Plist write warns when the entry path doesn't exist on disk, catching stale worktree paths before they cause daemon crashes."
129
+ ]
130
+ },
131
+ {
132
+ "version": "0.1.0-alpha.52",
133
+ "changes": [
134
+ "Trusted 1:1 chats can now act live across active group threads: the harness resolves candidate target chats, carries explicit trust context into the model, and delivers messages into the right live BlueBubbles or Teams session instead of only queueing for later.",
135
+ "People discovered through a relevant live group are now bootstrapped as acquaintances with shared-group context, so the agent gets a socially truthful model of who is merely unknown versus who is known through the current group.",
136
+ "Cross-chat work now returns a truthful outcome back to the asking chat, and bridge suggestions can span different outward relationships when one live piece of work is clearly happening across them."
137
+ ]
138
+ },
139
+ {
140
+ "version": "0.1.0-alpha.51",
141
+ "changes": [
142
+ "Agents can now adjust their own reasoning depth mid-conversation via a new set_reasoning_effort tool, with effort levels derived from a central model capabilities registry.",
143
+ "Anthropic extended thinking is now enabled with adaptive effort, thinking blocks are captured during streaming (including signatures and redacted blocks), persisted on conversation history, and faithfully round-tripped across turns.",
144
+ "Anthropic max_tokens now uses the model's actual output ceiling from the registry instead of a hardcoded 4096, removing artificial response length constraints.",
145
+ "Codex assistant messages are now annotated with phase labels (commentary vs final_answer) so GPT-5.4 can distinguish intermediate reasoning from completed responses in its own history.",
146
+ "Azure and Codex reasoning effort is now dynamic from the agent loop instead of hardcoded to medium."
147
+ ]
148
+ },
149
+ {
150
+ "version": "0.1.0-alpha.50",
151
+ "changes": [
152
+ "Delegated inner work can now proactively surface its completion back into the active BlueBubbles session instead of waiting for a later inbox drain.",
153
+ "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."
154
+ ]
155
+ },
156
+ {
157
+ "version": "0.1.0-alpha.49",
158
+ "changes": [
159
+ "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.",
160
+ "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.",
161
+ "`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."
162
+ ]
163
+ },
164
+ {
165
+ "version": "0.1.0-alpha.48",
166
+ "changes": [
167
+ "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.",
168
+ "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.",
169
+ "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."
170
+ ]
171
+ },
172
+ {
173
+ "version": "0.1.0-alpha.47",
174
+ "changes": [
175
+ "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.",
176
+ "`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`.",
177
+ "Inner dialog persists live runtime activity beside the transcript, so status checks can report active processing instead of stale last-turn history.",
178
+ "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."
179
+ ]
180
+ },
181
+ {
182
+ "version": "0.1.0-alpha.46",
183
+ "changes": [
184
+ "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.",
185
+ "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.",
186
+ "Vestigial `drainInbox` removed from inner dialog \u2014 pipeline already handles pending drain correctly.",
187
+ "Inner dialog nerves events now include assistant response preview, tool call names, token usage, and taskId for meaningful observability.",
188
+ "`ouro thoughts` command reads and formats inner dialog session turns with `--last`, `--json`, `--follow`, and `--agent` flags \u2014 humans can now see what the agent has been thinking.",
189
+ "`readTaskFile` searches collection subdirectories (one-shots, ongoing, habits) since the scheduler sends bare task stems without collection prefixes.",
190
+ "`ouro reminder create` accepts `--requester` to track who requested a reminder for notification round-trip.",
191
+ "Response extraction handles `tool_choice=required` models by falling back to `final_answer` tool call arguments when assistant message content is empty."
192
+ ]
193
+ },
194
+ {
195
+ "version": "0.1.0-alpha.45",
196
+ "changes": [
197
+ "`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.",
198
+ "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.",
199
+ "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."
200
+ ]
201
+ },
202
+ {
203
+ "version": "0.1.0-alpha.44",
204
+ "changes": [
205
+ "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."
206
+ ]
207
+ },
208
+ {
209
+ "version": "0.1.0-alpha.43",
210
+ "changes": [
211
+ "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.",
212
+ "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."
213
+ ]
214
+ },
215
+ {
216
+ "version": "0.1.0-alpha.42",
217
+ "changes": [
218
+ "Associative recall now skips corrupt JSONL lines instead of crashing \u2014 matches the resilient pattern already used in memory.ts."
219
+ ]
220
+ },
221
+ {
222
+ "version": "0.1.0-alpha.41",
223
+ "changes": [
224
+ "JSONL readers (memory facts, inter-agent inbox) now skip corrupt lines instead of crashing \u2014 partial writes from crashes no longer lose all data.",
225
+ "Inter-agent message router now parses before clearing the inbox file, and preserves unparsed lines so corrupt messages are not silently lost.",
226
+ "Inner-dialog checkpoint derivation no longer crashes on all-whitespace assistant content \u2014 returns fallback checkpoint instead.",
227
+ "Update checker interval now catches and logs errors from the onUpdate callback instead of silently swallowing them."
228
+ ]
229
+ },
230
+ {
231
+ "version": "0.1.0-alpha.40",
232
+ "changes": [
233
+ "Removed dead backward-compat re-exports from core.ts (tools, streaming, prompt, kicks) \u2014 consumers already import from the canonical modules.",
234
+ "Removed dead exports: baseToolHandlers, teamsToolHandlers, teamsTools, __internal (token-estimate), TASK_STEM_PATTERN, checkAndRecord403 no-op and METHOD_TO_ACTION.",
235
+ "Consolidated duplicate sanitizeKey (config.ts + bluebubbles-mutation-log.ts) and slugify (hatch-flow.ts + tasks/index.ts) into shared exports from config.ts.",
236
+ "Replaced all as-any casts in source with proper TypeScript narrowing or Record<string, unknown> \u2014 only 2 SDK-required casts remain.",
237
+ "Removed unnecessary as-unknown-as casts on readdirSync (4 locations) and spawner double-cast.",
238
+ "Cleaned up commented-out kick detection code, stale TODOs, misplaced imports, and unused type imports."
239
+ ]
240
+ },
241
+ {
242
+ "version": "0.1.0-alpha.39",
243
+ "changes": [
244
+ "All senses now route through a shared per-turn pipeline \u2014 friend resolution, trust gate, session load, pending drain, agent turn, post-turn, and token accumulation happen in one place instead of four.",
245
+ "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.",
246
+ "Tool access and prompt restrictions use a single shared isTrustedLevel check \u2014 no more scattered family/friend comparisons that could drift apart.",
247
+ "Pending messages now inject correctly into multimodal content (image attachments no longer silently drop pending messages).",
248
+ "ouro reminder create supports --agent flag, matching every other identity-scoped CLI command."
249
+ ]
250
+ },
251
+ {
252
+ "version": "0.1.0-alpha.38",
253
+ "changes": [
254
+ "You now have a proper body map \u2014 understanding of your home (bundle) and bones (harness), what each directory is for, and how to modify your own configuration.",
255
+ "Inner dialog is now genuine internal monologue with metacognitive framing, not a second CLI session. Heartbeat and bootstrap messages read as first-person awareness.",
256
+ "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.",
257
+ "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.",
258
+ "You now understand why certain tools are restricted in certain contexts \u2014 trust level and shared channels each have independent, explained gates.",
259
+ "ouro friend link/unlink commands handle orphan cleanup when linking external identities, merging duplicate friend records intelligently.",
260
+ "During onboarding, the adoption specialist can collect phone number and Teams handle to create an initial friend record with contact info."
261
+ ]
262
+ },
263
+ {
264
+ "version": "0.1.0-alpha.37",
265
+ "changes": [
266
+ "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."
267
+ ]
268
+ },
269
+ {
270
+ "version": "0.1.0-alpha.36",
271
+ "changes": [
272
+ "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."
273
+ ]
274
+ },
275
+ {
276
+ "version": "0.1.0-alpha.35",
277
+ "changes": [
278
+ "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."
279
+ ]
280
+ },
281
+ {
282
+ "version": "0.1.0-alpha.34",
283
+ "changes": [
284
+ "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.",
285
+ "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."
286
+ ]
287
+ },
288
+ {
289
+ "version": "0.1.0-alpha.33",
290
+ "changes": [
291
+ "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.",
292
+ "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.",
293
+ "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.",
294
+ "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`."
295
+ ]
296
+ },
297
+ {
298
+ "version": "0.1.0-alpha.32",
299
+ "changes": [
300
+ "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.",
301
+ "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."
302
+ ]
303
+ },
304
+ {
305
+ "version": "0.1.0-alpha.31",
306
+ "changes": [
307
+ "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.",
308
+ "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."
309
+ ]
310
+ },
311
+ {
312
+ "version": "0.1.0-alpha.30",
313
+ "changes": [
314
+ "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.",
315
+ "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?'"
316
+ ]
317
+ },
318
+ {
319
+ "version": "0.1.0-alpha.29",
320
+ "changes": [
321
+ "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.",
322
+ "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."
323
+ ]
324
+ },
325
+ {
326
+ "version": "0.1.0-alpha.28",
327
+ "changes": [
328
+ "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.",
329
+ "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.",
330
+ "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."
331
+ ]
332
+ },
333
+ {
334
+ "version": "0.1.0-alpha.27",
335
+ "changes": [
336
+ "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.",
337
+ "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."
338
+ ]
339
+ },
340
+ {
341
+ "version": "0.1.0-alpha.26",
342
+ "changes": [
343
+ "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."
344
+ ]
345
+ },
346
+ {
347
+ "version": "0.1.0-alpha.25",
348
+ "changes": [
349
+ "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.",
350
+ "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."
351
+ ]
352
+ },
353
+ {
354
+ "version": "0.1.0-alpha.24",
355
+ "changes": [
356
+ "When you run 'ouro up', you now see which agents were updated and from what version, so you know exactly what happened during startup."
357
+ ]
358
+ },
359
+ {
360
+ "version": "0.1.0-alpha.23",
361
+ "changes": [
362
+ "You can now use 'ouro down' as an alias for 'ouro stop' to pair naturally with 'ouro up'."
363
+ ]
364
+ },
365
+ {
366
+ "version": "0.1.0-alpha.22",
367
+ "changes": [
368
+ "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.",
369
+ "A changelog file is now shipped with the runtime. You can read it to understand exactly what changed between versions.",
370
+ "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.",
371
+ "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.",
372
+ "The daemon can now be managed as a macOS LaunchAgent for automatic restart on crash.",
373
+ "The daemon now auto-syncs the ouro.bot npm wrapper version on startup to keep the npx entry point current."
374
+ ]
375
+ },
376
+ {
377
+ "version": "0.1.0-alpha.21",
378
+ "changes": [
379
+ "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.",
380
+ "A changelog file is now shipped with the runtime. You can read it to understand exactly what changed between versions.",
381
+ "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.",
382
+ "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.",
383
+ "The daemon can now be managed as a macOS LaunchAgent for automatic restart on crash."
384
+ ]
385
+ }
386
+ ]
387
+ }
@@ -0,0 +1,178 @@
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
+ const target_resolution_1 = require("./target-resolution");
9
+ function activityPriority(source) {
10
+ return source === "friend-facing" ? 0 : 1;
11
+ }
12
+ function compareActivity(a, b) {
13
+ const sourceDiff = activityPriority(a.activitySource) - activityPriority(b.activitySource);
14
+ if (sourceDiff !== 0)
15
+ return sourceDiff;
16
+ return b.lastActivityMs - a.lastActivityMs;
17
+ }
18
+ function summarizeLiveTasks(taskBoard) {
19
+ const live = [
20
+ ...taskBoard.byStatus.processing,
21
+ ...taskBoard.byStatus.validating,
22
+ ...taskBoard.byStatus.collaborating,
23
+ ];
24
+ return [...new Set(live)];
25
+ }
26
+ function isActiveBridge(bridge) {
27
+ return bridge.lifecycle === "active";
28
+ }
29
+ function hasSharedObligationPressure(input) {
30
+ return (typeof input.currentObligation === "string"
31
+ && input.currentObligation.trim().length > 0) || input.mustResolveBeforeHandoff
32
+ || summarizeLiveTasks(input.taskBoard).length > 0;
33
+ }
34
+ function suggestBridgeForActiveWork(input) {
35
+ const targetCandidates = (input.targetCandidates ?? [])
36
+ .filter((candidate) => {
37
+ if (candidate.delivery.mode === "blocked") {
38
+ return false;
39
+ }
40
+ if (candidate.activitySource !== "friend-facing" || candidate.channel === "inner") {
41
+ return false;
42
+ }
43
+ if (!input.currentSession) {
44
+ return true;
45
+ }
46
+ return !(candidate.friendId === input.currentSession.friendId
47
+ && candidate.channel === input.currentSession.channel
48
+ && candidate.key === input.currentSession.key);
49
+ })
50
+ .sort((a, b) => {
51
+ return b.lastActivityMs - a.lastActivityMs;
52
+ });
53
+ if (!hasSharedObligationPressure(input) || targetCandidates.length !== 1) {
54
+ return null;
55
+ }
56
+ const targetSession = targetCandidates[0];
57
+ const activeBridge = input.bridges.find(isActiveBridge) ?? null;
58
+ if (activeBridge) {
59
+ const alreadyAttached = activeBridge.attachedSessions.some((session) => session.friendId === targetSession.friendId
60
+ && session.channel === targetSession.channel
61
+ && session.key === targetSession.key);
62
+ if (alreadyAttached) {
63
+ return null;
64
+ }
65
+ return {
66
+ kind: "attach-existing",
67
+ bridgeId: activeBridge.id,
68
+ targetSession,
69
+ reason: "shared-work-candidate",
70
+ };
71
+ }
72
+ return {
73
+ kind: "begin-new",
74
+ targetSession,
75
+ objectiveHint: input.currentObligation?.trim() || "keep this shared work aligned",
76
+ reason: "shared-work-candidate",
77
+ };
78
+ }
79
+ function formatSessionLabel(session) {
80
+ return `${session.channel}/${session.key}`;
81
+ }
82
+ function buildActiveWorkFrame(input) {
83
+ const friendSessions = input.currentSession
84
+ ? input.friendActivity
85
+ .filter((entry) => entry.friendId === input.currentSession?.friendId)
86
+ .sort(compareActivity)
87
+ : [];
88
+ const liveTaskNames = summarizeLiveTasks(input.taskBoard);
89
+ const activeBridgePresent = input.bridges.some(isActiveBridge);
90
+ const centerOfGravity = activeBridgePresent
91
+ ? "shared-work"
92
+ : (input.inner.status === "running" || input.inner.hasPending || input.mustResolveBeforeHandoff)
93
+ ? "inward-work"
94
+ : "local-turn";
95
+ const frame = {
96
+ currentSession: input.currentSession ?? null,
97
+ currentObligation: input.currentObligation?.trim() || null,
98
+ mustResolveBeforeHandoff: input.mustResolveBeforeHandoff,
99
+ centerOfGravity,
100
+ inner: input.inner,
101
+ bridges: input.bridges,
102
+ taskPressure: {
103
+ compactBoard: input.taskBoard.compact,
104
+ liveTaskNames,
105
+ activeBridges: input.taskBoard.activeBridges,
106
+ },
107
+ friendActivity: {
108
+ freshestForCurrentFriend: friendSessions[0] ?? null,
109
+ otherLiveSessionsForCurrentFriend: friendSessions,
110
+ },
111
+ targetCandidates: input.targetCandidates ?? [],
112
+ bridgeSuggestion: suggestBridgeForActiveWork({
113
+ currentSession: input.currentSession,
114
+ currentObligation: input.currentObligation,
115
+ mustResolveBeforeHandoff: input.mustResolveBeforeHandoff,
116
+ bridges: input.bridges,
117
+ taskBoard: input.taskBoard,
118
+ targetCandidates: input.targetCandidates,
119
+ }),
120
+ };
121
+ (0, runtime_1.emitNervesEvent)({
122
+ component: "engine",
123
+ event: "engine.active_work_build",
124
+ message: "built shared active-work frame",
125
+ meta: {
126
+ centerOfGravity: frame.centerOfGravity,
127
+ friendId: frame.currentSession?.friendId ?? null,
128
+ bridges: frame.bridges.length,
129
+ liveTasks: frame.taskPressure.liveTaskNames.length,
130
+ liveSessions: frame.friendActivity.otherLiveSessionsForCurrentFriend.length,
131
+ hasBridgeSuggestion: frame.bridgeSuggestion !== null,
132
+ },
133
+ });
134
+ return frame;
135
+ }
136
+ function formatActiveWorkFrame(frame) {
137
+ const lines = ["## active work"];
138
+ if (frame.currentSession) {
139
+ lines.push(`current session: ${formatSessionLabel(frame.currentSession)}`);
140
+ }
141
+ lines.push(`center: ${frame.centerOfGravity}`);
142
+ if (typeof frame.currentObligation === "string" && frame.currentObligation.trim().length > 0) {
143
+ lines.push(`obligation: ${frame.currentObligation.trim()}`);
144
+ }
145
+ if (frame.mustResolveBeforeHandoff) {
146
+ lines.push("handoff pressure: must resolve before handoff");
147
+ }
148
+ const innerStatus = frame.inner?.status ?? "idle";
149
+ const innerHasPending = frame.inner?.hasPending === true;
150
+ lines.push(`inner status: ${innerStatus}${innerHasPending ? " (pending queued)" : ""}`);
151
+ if ((frame.taskPressure?.liveTaskNames ?? []).length > 0) {
152
+ lines.push(`live tasks: ${frame.taskPressure.liveTaskNames.join(", ")}`);
153
+ }
154
+ if ((frame.bridges ?? []).length > 0) {
155
+ const bridgeLabels = frame.bridges.map((bridge) => `${bridge.id} [${(0, state_machine_1.bridgeStateLabel)(bridge)}]`);
156
+ lines.push(`bridges: ${bridgeLabels.join(", ")}`);
157
+ }
158
+ if (frame.friendActivity?.freshestForCurrentFriend) {
159
+ lines.push(`freshest friend-facing session: ${formatSessionLabel(frame.friendActivity.freshestForCurrentFriend)}`);
160
+ }
161
+ const targetCandidatesBlock = frame.targetCandidates && frame.targetCandidates.length > 0
162
+ ? (0, target_resolution_1.formatTargetSessionCandidates)(frame.targetCandidates)
163
+ : "";
164
+ if (targetCandidatesBlock) {
165
+ lines.push("");
166
+ lines.push(targetCandidatesBlock);
167
+ }
168
+ if (frame.bridgeSuggestion) {
169
+ if (frame.bridgeSuggestion.kind === "attach-existing") {
170
+ lines.push(`suggested bridge: attach ${frame.bridgeSuggestion.bridgeId} -> ${formatSessionLabel(frame.bridgeSuggestion.targetSession)}`);
171
+ }
172
+ else {
173
+ lines.push(`suggested bridge: begin -> ${formatSessionLabel(frame.bridgeSuggestion.targetSession)}`);
174
+ lines.push(`bridge objective hint: ${frame.bridgeSuggestion.objectiveHint}`);
175
+ }
176
+ }
177
+ return lines.join("\n");
178
+ }