@ouro.bot/cli 0.1.0-alpha.43 → 0.1.0-alpha.430

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 (337) hide show
  1. package/README.md +123 -15
  2. package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/agent.json +3 -2
  3. package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/SOUL.md +2 -2
  4. package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/the-serpent.md +1 -1
  5. package/changelog.json +2715 -9
  6. package/dist/arc/attention-types.js +8 -0
  7. package/dist/arc/cares.js +140 -0
  8. package/dist/arc/episodes.js +117 -0
  9. package/dist/arc/intentions.js +133 -0
  10. package/dist/arc/json-store.js +117 -0
  11. package/dist/arc/obligations.js +237 -0
  12. package/dist/arc/packets.js +193 -0
  13. package/dist/arc/presence.js +185 -0
  14. package/dist/arc/task-lifecycle.js +65 -0
  15. package/dist/heart/active-work.js +832 -0
  16. package/dist/heart/agent-entry.js +58 -3
  17. package/dist/heart/attachments/image-normalize.js +194 -0
  18. package/dist/heart/attachments/materialize.js +97 -0
  19. package/dist/heart/attachments/originals.js +88 -0
  20. package/dist/heart/attachments/render.js +29 -0
  21. package/dist/heart/attachments/sources/adapter.js +2 -0
  22. package/dist/heart/attachments/sources/bluebubbles.js +156 -0
  23. package/dist/heart/attachments/sources/cli-local-file.js +78 -0
  24. package/dist/heart/attachments/sources/index.js +16 -0
  25. package/dist/heart/attachments/store.js +103 -0
  26. package/dist/heart/attachments/types.js +93 -0
  27. package/dist/heart/auth/auth-flow.js +426 -0
  28. package/dist/heart/bridges/manager.js +358 -0
  29. package/dist/heart/bridges/state-machine.js +135 -0
  30. package/dist/heart/bridges/store.js +123 -0
  31. package/dist/heart/bundle-state.js +168 -0
  32. package/dist/heart/commitments.js +111 -0
  33. package/dist/heart/config-registry.js +304 -0
  34. package/dist/heart/config.js +110 -128
  35. package/dist/heart/core.js +745 -227
  36. package/dist/heart/cross-chat-delivery.js +131 -0
  37. package/dist/heart/daemon/agent-config-check.js +424 -0
  38. package/dist/heart/daemon/agent-discovery.js +79 -3
  39. package/dist/heart/daemon/agent-service.js +360 -0
  40. package/dist/heart/daemon/agentic-repair.js +214 -0
  41. package/dist/heart/daemon/bluebubbles-health-diagnostics.js +122 -0
  42. package/dist/heart/daemon/cadence.js +70 -0
  43. package/dist/heart/daemon/cli-defaults.js +604 -0
  44. package/dist/heart/daemon/cli-exec.js +5094 -0
  45. package/dist/heart/daemon/cli-help.js +428 -0
  46. package/dist/heart/daemon/cli-parse.js +1156 -0
  47. package/dist/heart/daemon/cli-render-doctor.js +57 -0
  48. package/dist/heart/daemon/cli-render.js +561 -0
  49. package/dist/heart/daemon/cli-types.js +8 -0
  50. package/dist/heart/daemon/connect-bay.js +442 -0
  51. package/dist/heart/daemon/daemon-cli.js +28 -1582
  52. package/dist/heart/daemon/daemon-entry.js +356 -3
  53. package/dist/heart/daemon/daemon-health.js +141 -0
  54. package/dist/heart/daemon/daemon-runtime-sync.js +175 -12
  55. package/dist/heart/daemon/daemon-tombstone.js +236 -0
  56. package/dist/heart/daemon/daemon.js +684 -58
  57. package/dist/heart/daemon/doctor-types.js +8 -0
  58. package/dist/heart/daemon/doctor.js +427 -0
  59. package/dist/heart/daemon/health-monitor.js +79 -1
  60. package/dist/heart/daemon/hooks/agent-config-v2.js +33 -0
  61. package/dist/heart/daemon/hooks/bundle-meta.js +115 -1
  62. package/dist/heart/daemon/http-health-probe.js +80 -0
  63. package/dist/heart/daemon/human-command-screens.js +140 -0
  64. package/dist/heart/daemon/human-readiness.js +114 -0
  65. package/dist/heart/daemon/inner-status.js +89 -0
  66. package/dist/heart/daemon/interactive-repair.js +307 -0
  67. package/dist/heart/daemon/launchd.js +46 -9
  68. package/dist/heart/daemon/log-tailer.js +82 -12
  69. package/dist/heart/daemon/logs-prune.js +105 -0
  70. package/dist/heart/daemon/message-router.js +2 -2
  71. package/dist/heart/daemon/os-cron-deps.js +134 -0
  72. package/dist/heart/daemon/ouro-bot-entry.js +4 -2
  73. package/dist/heart/daemon/ouro-entry.js +3 -1
  74. package/dist/heart/daemon/process-manager.js +214 -0
  75. package/dist/heart/daemon/provider-discovery.js +137 -0
  76. package/dist/heart/daemon/pulse.js +475 -0
  77. package/dist/heart/daemon/readiness-repair.js +275 -0
  78. package/dist/heart/daemon/run-hooks.js +2 -0
  79. package/dist/heart/daemon/runtime-logging.js +67 -16
  80. package/dist/heart/daemon/runtime-metadata.js +73 -0
  81. package/dist/heart/daemon/runtime-mode.js +67 -0
  82. package/dist/heart/daemon/safe-mode.js +161 -0
  83. package/dist/heart/daemon/sense-manager.js +145 -32
  84. package/dist/heart/daemon/session-id-resolver.js +131 -0
  85. package/dist/heart/daemon/skill-management-installer.js +94 -0
  86. package/dist/heart/daemon/socket-client.js +307 -0
  87. package/dist/heart/daemon/stale-bundle-prune.js +96 -0
  88. package/dist/heart/daemon/startup-tui.js +259 -0
  89. package/dist/heart/daemon/task-scheduler.js +3 -25
  90. package/dist/heart/daemon/terminal-ui.js +169 -0
  91. package/dist/heart/daemon/thoughts.js +510 -0
  92. package/dist/heart/daemon/up-progress.js +259 -0
  93. package/dist/heart/delegation.js +62 -0
  94. package/dist/heart/habits/habit-migration.js +189 -0
  95. package/dist/heart/habits/habit-parser.js +140 -0
  96. package/dist/heart/habits/habit-runtime-state.js +100 -0
  97. package/dist/heart/habits/habit-scheduler.js +372 -0
  98. package/dist/heart/{daemon → hatch}/hatch-flow.js +52 -117
  99. package/dist/heart/{daemon → hatch}/hatch-specialist.js +3 -3
  100. package/dist/heart/{daemon → hatch}/specialist-prompt.js +12 -9
  101. package/dist/heart/{daemon → hatch}/specialist-tools.js +35 -12
  102. package/dist/heart/identity.js +161 -65
  103. package/dist/heart/kept-notes.js +357 -0
  104. package/dist/heart/kicks.js +1 -1
  105. package/dist/heart/machine-identity.js +161 -0
  106. package/dist/heart/mcp/mcp-server.js +653 -0
  107. package/dist/heart/migrate-config.js +100 -0
  108. package/dist/heart/model-capabilities.js +59 -0
  109. package/dist/heart/outlook/outlook-http-hooks.js +64 -0
  110. package/dist/heart/outlook/outlook-http-response.js +7 -0
  111. package/dist/heart/outlook/outlook-http-routes.js +232 -0
  112. package/dist/heart/outlook/outlook-http-static.js +99 -0
  113. package/dist/heart/outlook/outlook-http-transport.js +116 -0
  114. package/dist/heart/outlook/outlook-http.js +99 -0
  115. package/dist/heart/outlook/outlook-read.js +28 -0
  116. package/dist/heart/outlook/outlook-types.js +27 -0
  117. package/dist/heart/outlook/outlook-view.js +195 -0
  118. package/dist/heart/outlook/readers/agent-machine.js +359 -0
  119. package/dist/heart/outlook/readers/continuity-readers.js +332 -0
  120. package/dist/heart/outlook/readers/runtime-readers.js +644 -0
  121. package/dist/heart/outlook/readers/sessions.js +232 -0
  122. package/dist/heart/outlook/readers/shared.js +111 -0
  123. package/dist/heart/platform.js +81 -0
  124. package/dist/heart/progress-story.js +42 -0
  125. package/dist/heart/provider-attempt.js +133 -0
  126. package/dist/heart/provider-binding-resolver.js +239 -0
  127. package/dist/heart/provider-credentials.js +391 -0
  128. package/dist/heart/provider-failover.js +266 -0
  129. package/dist/heart/provider-models.js +81 -0
  130. package/dist/heart/provider-ping.js +237 -0
  131. package/dist/heart/provider-state.js +216 -0
  132. package/dist/heart/provider-visibility.js +186 -0
  133. package/dist/heart/providers/anthropic-token.js +131 -0
  134. package/dist/heart/providers/anthropic.js +193 -55
  135. package/dist/heart/providers/azure.js +103 -12
  136. package/dist/heart/providers/error-classification.js +63 -0
  137. package/dist/heart/providers/github-copilot.js +145 -0
  138. package/dist/heart/providers/minimax-vlm.js +189 -0
  139. package/dist/heart/providers/minimax.js +29 -7
  140. package/dist/heart/providers/openai-codex.js +62 -38
  141. package/dist/heart/runtime-credentials.js +260 -0
  142. package/dist/heart/sense-truth.js +3 -0
  143. package/dist/heart/session-activity.js +190 -0
  144. package/dist/heart/session-events.js +855 -0
  145. package/dist/heart/session-transcript.js +167 -0
  146. package/dist/heart/start-of-turn-packet.js +345 -0
  147. package/dist/heart/streaming.js +36 -27
  148. package/dist/heart/sync.js +332 -0
  149. package/dist/heart/target-resolution.js +127 -0
  150. package/dist/heart/tempo.js +93 -0
  151. package/dist/heart/temporal-view.js +41 -0
  152. package/dist/heart/tool-activity-callbacks.js +36 -0
  153. package/dist/heart/tool-description.js +135 -0
  154. package/dist/heart/tool-friction.js +55 -0
  155. package/dist/heart/tool-loop.js +200 -0
  156. package/dist/heart/turn-context.js +351 -0
  157. package/dist/heart/turn-coordinator.js +28 -0
  158. package/dist/heart/{daemon → versioning}/ouro-bot-global-installer.js +1 -1
  159. package/dist/heart/{daemon → versioning}/ouro-bot-wrapper.js +1 -1
  160. package/dist/heart/versioning/ouro-path-installer.js +301 -0
  161. package/dist/heart/versioning/ouro-version-manager.js +295 -0
  162. package/dist/heart/{daemon → versioning}/staged-restart.js +40 -8
  163. package/dist/heart/{daemon → versioning}/update-checker.js +3 -1
  164. package/dist/heart/{daemon → versioning}/update-hooks.js +63 -59
  165. package/dist/mind/bundle-manifest.js +7 -1
  166. package/dist/mind/context.js +132 -93
  167. package/dist/mind/diary-integrity.js +60 -0
  168. package/dist/mind/{memory.js → diary.js} +74 -93
  169. package/dist/mind/embedding-provider.js +60 -0
  170. package/dist/mind/file-state.js +179 -0
  171. package/dist/mind/friends/channel.js +21 -0
  172. package/dist/mind/friends/group-context.js +144 -0
  173. package/dist/mind/friends/resolver.js +38 -1
  174. package/dist/mind/friends/store-file.js +39 -3
  175. package/dist/mind/friends/trust-explanation.js +74 -0
  176. package/dist/mind/friends/types.js +1 -1
  177. package/dist/mind/journal-index.js +161 -0
  178. package/dist/mind/note-search.js +268 -0
  179. package/dist/mind/obligation-steering.js +221 -0
  180. package/dist/mind/pending.js +66 -7
  181. package/dist/mind/prompt-refresh.js +3 -2
  182. package/dist/mind/prompt.js +947 -165
  183. package/dist/mind/provenance-trust.js +26 -0
  184. package/dist/mind/scrutiny.js +173 -0
  185. package/dist/nerves/cli-logging.js +7 -1
  186. package/dist/nerves/coverage/audit-rules.js +15 -6
  187. package/dist/nerves/coverage/audit.js +28 -2
  188. package/dist/nerves/coverage/cli.js +1 -1
  189. package/dist/nerves/coverage/contract.js +5 -5
  190. package/dist/nerves/coverage/file-completeness.js +83 -5
  191. package/dist/nerves/coverage/run-artifacts.js +1 -1
  192. package/dist/nerves/event-buffer.js +111 -0
  193. package/dist/nerves/index.js +224 -4
  194. package/dist/nerves/observation.js +20 -0
  195. package/dist/nerves/redact.js +79 -0
  196. package/dist/nerves/runtime.js +5 -1
  197. package/dist/outlook-ui/assets/index-BAcU08c-.css +1 -0
  198. package/dist/outlook-ui/assets/index-D7l3l4vY.js +61 -0
  199. package/dist/outlook-ui/index.html +15 -0
  200. package/dist/repertoire/ado-client.js +15 -56
  201. package/dist/repertoire/ado-semantic.js +11 -10
  202. package/dist/repertoire/api-client.js +97 -0
  203. package/dist/repertoire/bitwarden-store.js +702 -0
  204. package/dist/repertoire/bundle-templates.js +72 -0
  205. package/dist/repertoire/bw-installer.js +79 -0
  206. package/dist/repertoire/coding/codex-jsonl.js +64 -0
  207. package/dist/repertoire/coding/context-pack.js +330 -0
  208. package/dist/repertoire/coding/feedback.js +197 -30
  209. package/dist/repertoire/coding/manager.js +158 -9
  210. package/dist/repertoire/coding/spawner.js +55 -9
  211. package/dist/repertoire/coding/tools.js +170 -7
  212. package/dist/repertoire/commerce-errors.js +109 -0
  213. package/dist/repertoire/commerce-self-test.js +156 -0
  214. package/dist/repertoire/credential-access.js +111 -0
  215. package/dist/repertoire/duffel-client.js +185 -0
  216. package/dist/repertoire/github-client.js +14 -55
  217. package/dist/repertoire/graph-client.js +11 -52
  218. package/dist/repertoire/guardrails.js +371 -0
  219. package/dist/repertoire/mcp-client.js +255 -0
  220. package/dist/repertoire/mcp-manager.js +305 -0
  221. package/dist/repertoire/mcp-tools.js +63 -0
  222. package/dist/repertoire/shell-sessions.js +133 -0
  223. package/dist/repertoire/skills.js +15 -24
  224. package/dist/repertoire/stripe-client.js +131 -0
  225. package/dist/repertoire/tasks/board.js +43 -5
  226. package/dist/repertoire/tasks/fix.js +182 -0
  227. package/dist/repertoire/tasks/index.js +37 -4
  228. package/dist/repertoire/tasks/lifecycle.js +2 -2
  229. package/dist/repertoire/tasks/parser.js +3 -2
  230. package/dist/repertoire/tasks/scanner.js +194 -37
  231. package/dist/repertoire/tasks/transitions.js +16 -78
  232. package/dist/repertoire/tool-results.js +29 -0
  233. package/dist/repertoire/tools-attachments.js +317 -0
  234. package/dist/repertoire/tools-base.js +42 -690
  235. package/dist/repertoire/tools-bluebubbles.js +1 -0
  236. package/dist/repertoire/tools-bridge.js +141 -0
  237. package/dist/repertoire/tools-bundle.js +984 -0
  238. package/dist/repertoire/tools-config.js +185 -0
  239. package/dist/repertoire/tools-continuity.js +248 -0
  240. package/dist/repertoire/tools-credential.js +361 -0
  241. package/dist/repertoire/tools-files.js +342 -0
  242. package/dist/repertoire/tools-flight.js +224 -0
  243. package/dist/repertoire/tools-flow.js +105 -0
  244. package/dist/repertoire/tools-github.js +1 -7
  245. package/dist/repertoire/tools-notes.js +376 -0
  246. package/dist/repertoire/tools-session.js +739 -0
  247. package/dist/repertoire/tools-shell.js +120 -0
  248. package/dist/repertoire/tools-stripe.js +180 -0
  249. package/dist/repertoire/tools-surface.js +243 -0
  250. package/dist/repertoire/tools-teams.js +9 -39
  251. package/dist/repertoire/tools-travel.js +125 -0
  252. package/dist/repertoire/tools-user-profile.js +144 -0
  253. package/dist/repertoire/tools-vault.js +40 -0
  254. package/dist/repertoire/tools.js +144 -113
  255. package/dist/repertoire/travel-api-client.js +360 -0
  256. package/dist/repertoire/user-profile.js +131 -0
  257. package/dist/repertoire/vault-setup.js +246 -0
  258. package/dist/repertoire/vault-unlock.js +421 -0
  259. package/dist/scripts/claude-code-hook.js +41 -0
  260. package/dist/scripts/claude-code-stop-hook.js +47 -0
  261. package/dist/senses/attention-queue.js +116 -0
  262. package/dist/senses/bluebubbles/attachment-cache.js +53 -0
  263. package/dist/senses/bluebubbles/attachment-download.js +137 -0
  264. package/dist/senses/{bluebubbles-client.js → bluebubbles/client.js} +260 -9
  265. package/dist/senses/bluebubbles/entry.js +73 -0
  266. package/dist/senses/bluebubbles/inbound-log.js +113 -0
  267. package/dist/senses/bluebubbles/index.js +1620 -0
  268. package/dist/senses/{bluebubbles-media.js → bluebubbles/media.js} +121 -70
  269. package/dist/senses/{bluebubbles-model.js → bluebubbles/model.js} +33 -12
  270. package/dist/senses/{bluebubbles-mutation-log.js → bluebubbles/mutation-log.js} +45 -3
  271. package/dist/senses/bluebubbles/replay.js +129 -0
  272. package/dist/senses/bluebubbles/runtime-state.js +109 -0
  273. package/dist/senses/{bluebubbles-session-cleanup.js → bluebubbles/session-cleanup.js} +1 -1
  274. package/dist/senses/cli/bracketed-paste.js +82 -0
  275. package/dist/senses/cli/image-paste.js +287 -0
  276. package/dist/senses/cli/image-ref-navigation.js +75 -0
  277. package/dist/senses/cli/ink-app.js +156 -0
  278. package/dist/senses/cli/inline-diff.js +64 -0
  279. package/dist/senses/cli/input-keys.js +174 -0
  280. package/dist/senses/cli/kill-ring.js +86 -0
  281. package/dist/senses/cli/message-list.js +51 -0
  282. package/dist/senses/cli/ouro-tui.js +605 -0
  283. package/dist/senses/cli/spinner-imperative.js +135 -0
  284. package/dist/senses/cli/spinner.js +101 -0
  285. package/dist/senses/cli/status-line.js +60 -0
  286. package/dist/senses/cli/streaming-markdown.js +526 -0
  287. package/dist/senses/cli/tool-display.js +83 -0
  288. package/dist/senses/cli/tool-render.js +85 -0
  289. package/dist/senses/cli/tui-store.js +240 -0
  290. package/dist/senses/cli/virtual-list.js +35 -0
  291. package/dist/senses/cli-entry.js +60 -8
  292. package/dist/senses/cli-layout.js +187 -0
  293. package/dist/senses/cli.js +516 -211
  294. package/dist/senses/commands.js +66 -3
  295. package/dist/senses/habit-turn-message.js +108 -0
  296. package/dist/senses/inner-dialog-worker.js +102 -19
  297. package/dist/senses/inner-dialog.js +597 -95
  298. package/dist/senses/pipeline.js +533 -72
  299. package/dist/senses/proactive-content-guard.js +51 -0
  300. package/dist/senses/shared-turn.js +205 -0
  301. package/dist/senses/surface-tool.js +68 -0
  302. package/dist/senses/teams-entry.js +60 -8
  303. package/dist/senses/teams.js +413 -163
  304. package/dist/senses/trust-gate.js +5 -5
  305. package/package.json +29 -7
  306. package/skills/agent-commerce.md +106 -0
  307. package/skills/browser-navigation.md +117 -0
  308. package/skills/commerce-setup-guide.md +116 -0
  309. package/skills/commerce-setup.md +84 -0
  310. package/skills/configure-dev-tools.md +101 -0
  311. package/skills/travel-planning.md +138 -0
  312. package/dist/heart/daemon/ouro-path-installer.js +0 -178
  313. package/dist/heart/daemon/subagent-installer.js +0 -134
  314. package/dist/mind/associative-recall.js +0 -209
  315. package/dist/senses/bluebubbles-entry.js +0 -11
  316. package/dist/senses/bluebubbles.js +0 -854
  317. package/dist/senses/debug-activity.js +0 -127
  318. package/subagents/README.md +0 -60
  319. package/subagents/work-doer.md +0 -235
  320. package/subagents/work-merger.md +0 -618
  321. package/subagents/work-planner.md +0 -382
  322. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/basilisk.md +0 -0
  323. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/jafar.md +0 -0
  324. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/jormungandr.md +0 -0
  325. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/kaa.md +0 -0
  326. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/medusa.md +0 -0
  327. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/monty.md +0 -0
  328. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/nagini.md +0 -0
  329. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/ouroboros.md +0 -0
  330. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/python.md +0 -0
  331. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/quetzalcoatl.md +0 -0
  332. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/sir-hiss.md +0 -0
  333. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/the-snake.md +0 -0
  334. /package/dist/heart/{daemon → hatch}/hatch-animation.js +0 -0
  335. /package/dist/heart/{daemon → hatch}/specialist-orchestrator.js +0 -0
  336. /package/dist/heart/{daemon → versioning}/ouro-uti.js +0 -0
  337. /package/dist/heart/{daemon → versioning}/wrapper-publish-guard.js +0 -0
@@ -0,0 +1,428 @@
1
+ "use strict";
2
+ /**
3
+ * CLI help system — command registry, grouped help output, and per-command help.
4
+ *
5
+ * Pure data + formatting: no side effects, no daemon communication.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.COMMAND_REGISTRY = void 0;
9
+ exports.levenshteinDistance = levenshteinDistance;
10
+ exports.suggestCommand = suggestCommand;
11
+ exports.getGroupedHelp = getGroupedHelp;
12
+ exports.getCommandHelp = getCommandHelp;
13
+ // ── Registry ──
14
+ exports.COMMAND_REGISTRY = {
15
+ up: {
16
+ category: "Lifecycle",
17
+ description: "Start the ouro daemon. In a human TTY, bare `ouro` opens the home screen instead; noninteractive shells still route bare `ouro` to `ouro up`.",
18
+ usage: "ouro [up] [--no-repair]",
19
+ example: "ouro up --no-repair",
20
+ },
21
+ stop: {
22
+ category: "Lifecycle",
23
+ description: "Stop the running daemon",
24
+ usage: "ouro stop",
25
+ example: "ouro stop",
26
+ },
27
+ down: {
28
+ category: "Lifecycle",
29
+ description: "Stop the running daemon (alias for stop)",
30
+ usage: "ouro down",
31
+ example: "ouro down",
32
+ },
33
+ status: {
34
+ category: "Lifecycle",
35
+ description: "Show daemon status",
36
+ usage: "ouro status",
37
+ example: "ouro status",
38
+ },
39
+ logs: {
40
+ category: "Lifecycle",
41
+ description: "View or prune daemon logs",
42
+ usage: "ouro logs [prune]",
43
+ example: "ouro logs",
44
+ subcommands: ["prune"],
45
+ },
46
+ dev: {
47
+ category: "Lifecycle",
48
+ description: "Start daemon in development mode from a local repo",
49
+ usage: "ouro dev [--repo-path <path>] [--clone [--clone-path <path>]]",
50
+ example: "ouro dev --repo-path ~/code/ouroboros",
51
+ },
52
+ hatch: {
53
+ category: "Lifecycle",
54
+ description: "Create a new agent",
55
+ usage: "ouro hatch [--agent <name>] [--human <name>] [--provider <provider>]",
56
+ example: "ouro hatch --agent Sprout --human Ari --provider anthropic",
57
+ },
58
+ rollback: {
59
+ category: "Lifecycle",
60
+ description: "Roll back to a previous CLI version",
61
+ usage: "ouro rollback [<version>]",
62
+ example: "ouro rollback 0.1.0-alpha.250",
63
+ },
64
+ versions: {
65
+ category: "Lifecycle",
66
+ description: "List installed CLI versions",
67
+ usage: "ouro versions",
68
+ example: "ouro versions",
69
+ },
70
+ clone: {
71
+ category: "Lifecycle",
72
+ description: "Clone an existing agent bundle from a git remote onto this machine",
73
+ usage: "ouro clone <remote> [--agent <name>]",
74
+ example: "ouro clone https://github.com/user/myagent.ouro.git",
75
+ },
76
+ doctor: {
77
+ category: "Lifecycle",
78
+ description: "Run diagnostic checks on the ouro installation",
79
+ usage: "ouro doctor",
80
+ example: "ouro doctor",
81
+ },
82
+ outlook: {
83
+ category: "Agents",
84
+ description: "Show the agent's current outlook",
85
+ usage: "ouro outlook [--json]",
86
+ example: "ouro outlook --json",
87
+ },
88
+ whoami: {
89
+ category: "Agents",
90
+ description: "Show current agent identity info",
91
+ usage: "ouro whoami [--agent <name>]",
92
+ example: "ouro whoami",
93
+ },
94
+ config: {
95
+ category: "Agents",
96
+ description: "View or change agent configuration",
97
+ usage: "ouro config <subcommand> [--agent <name>]",
98
+ example: "ouro config models",
99
+ subcommands: ["model", "models"],
100
+ },
101
+ changelog: {
102
+ category: "Agents",
103
+ description: "View the agent changelog",
104
+ usage: "ouro changelog [--from <version>] [--agent <name>]",
105
+ example: "ouro changelog --from 0.1.0-alpha.250",
106
+ },
107
+ chat: {
108
+ category: "Chat",
109
+ description: "Open an interactive chat session with an agent",
110
+ usage: "ouro chat <agent>",
111
+ example: "ouro chat ouroboros",
112
+ },
113
+ msg: {
114
+ category: "Chat",
115
+ description: "Send a single message to an agent",
116
+ usage: "ouro msg --to <agent> [--session <id>] [--task <ref>] <message>",
117
+ example: "ouro msg --to ouroboros hello there",
118
+ },
119
+ task: {
120
+ category: "Tasks",
121
+ description: "Manage agent tasks",
122
+ usage: "ouro task <subcommand> [--agent <name>]",
123
+ example: "ouro task board",
124
+ subcommands: ["board", "create", "update", "show", "actionable", "deps", "sessions", "fix"],
125
+ },
126
+ poke: {
127
+ category: "Tasks",
128
+ description: "Poke an agent about a task or habit",
129
+ usage: "ouro poke <agent> --task <task-id> | --habit <name>",
130
+ example: "ouro poke ouroboros --task abc123",
131
+ },
132
+ reminder: {
133
+ category: "Tasks",
134
+ description: "Create reminders for an agent",
135
+ usage: "ouro reminder create <title> --body <body> [--at <iso>] [--cadence <interval>]",
136
+ example: "ouro reminder create standup --body 'daily standup' --cadence '1d'",
137
+ subcommands: ["create"],
138
+ },
139
+ habit: {
140
+ category: "Habits",
141
+ description: "Manage agent habits",
142
+ usage: "ouro habit <subcommand> [--agent <name>]",
143
+ example: "ouro habit list",
144
+ subcommands: ["list", "create", "poke"],
145
+ },
146
+ friend: {
147
+ category: "Friends",
148
+ description: "Manage agent friends and identity links",
149
+ usage: "ouro friend <subcommand> [--agent <name>]",
150
+ example: "ouro friend list",
151
+ subcommands: ["list", "show", "create", "update", "link", "unlink"],
152
+ },
153
+ link: {
154
+ category: "Friends",
155
+ description: "Link an external identity to an agent friend",
156
+ usage: "ouro link <agent> --friend <id> --provider <provider> --external-id <eid>",
157
+ example: "ouro link ouroboros --friend f1 --provider aad --external-id user@example.com",
158
+ },
159
+ auth: {
160
+ category: "Auth",
161
+ description: "Set up, verify, or switch agent credentials",
162
+ usage: "ouro auth [verify|switch] [--agent <name>] [--provider <provider>]",
163
+ example: "ouro auth",
164
+ subcommands: ["verify", "switch"],
165
+ },
166
+ connect: {
167
+ category: "Auth",
168
+ description: "Connect providers, portable integrations, and local senses from one guided bay",
169
+ usage: "ouro connect [providers|perplexity|embeddings|teams|bluebubbles] [--agent <name>]",
170
+ example: "ouro connect",
171
+ subcommands: ["providers", "perplexity", "embeddings", "teams", "bluebubbles"],
172
+ },
173
+ use: {
174
+ category: "Auth",
175
+ description: "Choose this machine's provider/model lane for an agent",
176
+ usage: "ouro use [--agent <name>] --lane outward|inner --provider <provider> --model <model> [--force]",
177
+ example: "ouro use --agent ouroboros --lane outward --provider minimax --model MiniMax-M2.5",
178
+ },
179
+ check: {
180
+ category: "Auth",
181
+ description: "Run a live check for this machine's selected provider/model lane",
182
+ usage: "ouro check [--agent <name>] --lane outward|inner",
183
+ example: "ouro check --agent ouroboros --lane outward",
184
+ },
185
+ repair: {
186
+ category: "Auth",
187
+ description: "Guide vault and provider readiness repair without invoking AI diagnosis for known issues",
188
+ usage: "ouro repair [--agent <name>]",
189
+ example: "ouro repair --agent ouroboros",
190
+ },
191
+ provider: {
192
+ category: "Auth",
193
+ description: "Refresh daemon provider credentials from an agent vault",
194
+ usage: "ouro provider refresh [--agent <name>]",
195
+ example: "ouro provider refresh --agent ouroboros",
196
+ subcommands: ["refresh"],
197
+ },
198
+ vault: {
199
+ category: "Auth",
200
+ description: "Create, replace, recover, unlock, inspect, and populate the agent credential vault",
201
+ usage: "ouro vault <create|replace|recover|unlock|status|config> [--agent <name>]",
202
+ example: "ouro vault status",
203
+ subcommands: ["create", "replace", "recover", "unlock", "status", "config set", "config status"],
204
+ },
205
+ thoughts: {
206
+ category: "Internal",
207
+ description: "View agent inner dialog thoughts",
208
+ usage: "ouro thoughts [--last <n>] [--json] [--follow] [--agent <name>]",
209
+ example: "ouro thoughts --last 5 --follow",
210
+ },
211
+ inner: {
212
+ category: "Internal",
213
+ description: "Show inner dialog status",
214
+ usage: "ouro inner [--agent <name>]",
215
+ example: "ouro inner",
216
+ },
217
+ attention: {
218
+ category: "Internal",
219
+ description: "View agent attention items",
220
+ usage: "ouro attention [show <id>|history] [--agent <name>]",
221
+ example: "ouro attention history",
222
+ subcommands: ["show", "history"],
223
+ },
224
+ session: {
225
+ category: "Internal",
226
+ description: "Manage agent sessions",
227
+ usage: "ouro session list [--agent <name>]",
228
+ example: "ouro session list",
229
+ subcommands: ["list"],
230
+ },
231
+ mcp: {
232
+ category: "System",
233
+ description: "Interact with MCP servers",
234
+ usage: "ouro mcp <subcommand>",
235
+ example: "ouro mcp list",
236
+ subcommands: ["list", "call"],
237
+ },
238
+ "mcp-serve": {
239
+ category: "System",
240
+ description: "Start an MCP server for dev tool integration",
241
+ usage: "ouro mcp-serve --agent <name> [--friend <id>]",
242
+ example: "ouro mcp-serve --agent ouroboros",
243
+ },
244
+ setup: {
245
+ category: "System",
246
+ description: "Register MCP server and hooks for a dev tool",
247
+ usage: "ouro setup --tool <claude-code|codex> [--agent <name>]",
248
+ example: "ouro setup --tool claude-code",
249
+ },
250
+ hook: {
251
+ category: "System",
252
+ description: "Fire a dev tool lifecycle hook",
253
+ usage: "ouro hook <event> --agent <name>",
254
+ example: "ouro hook session-start --agent ouroboros",
255
+ },
256
+ bluebubbles: {
257
+ category: "System",
258
+ description: "BlueBubbles integration commands",
259
+ usage: "ouro bluebubbles replay [--agent <name>] --message-guid <guid> [--event-type <type>] [--json]",
260
+ example: "ouro bluebubbles replay --message-guid abc123",
261
+ subcommands: ["replay"],
262
+ },
263
+ };
264
+ const SUBCOMMAND_HELP = {
265
+ "auth verify": {
266
+ description: "Verify agent provider credentials without changing provider/model lanes",
267
+ usage: "ouro auth verify [--agent <name>] [--provider <provider>]",
268
+ example: "ouro auth verify --provider openai-codex",
269
+ },
270
+ "auth switch": {
271
+ description: "Switch local provider/model lanes after credentials are available",
272
+ usage: "ouro auth switch [--agent <name>] --provider <provider> [--facing human|agent]",
273
+ example: "ouro auth switch --provider minimax",
274
+ },
275
+ "connect perplexity": {
276
+ description: "Connect Perplexity search for this agent",
277
+ usage: "ouro connect perplexity [--agent <name>]",
278
+ example: "ouro connect perplexity",
279
+ },
280
+ "connect providers": {
281
+ description: "Open provider auth from the connect bay without remembering the auth command",
282
+ usage: "ouro connect providers [--agent <name>]",
283
+ example: "ouro connect providers",
284
+ },
285
+ "connect embeddings": {
286
+ description: "Connect memory embeddings for this agent",
287
+ usage: "ouro connect embeddings [--agent <name>]",
288
+ example: "ouro connect embeddings",
289
+ },
290
+ "connect teams": {
291
+ description: "Connect Microsoft Teams credentials and enable the Teams sense",
292
+ usage: "ouro connect teams [--agent <name>]",
293
+ example: "ouro connect teams",
294
+ },
295
+ "connect bluebubbles": {
296
+ description: "Attach BlueBubbles iMessage to this machine only",
297
+ usage: "ouro connect bluebubbles [--agent <name>]",
298
+ example: "ouro connect bluebubbles",
299
+ },
300
+ "provider refresh": {
301
+ description: "Reload this agent's provider credentials from its vault into daemon memory",
302
+ usage: "ouro provider refresh [--agent <name>]",
303
+ example: "ouro provider refresh",
304
+ },
305
+ "vault create": {
306
+ description: "Create an agent credential vault and store local unlock material",
307
+ usage: "ouro vault create [--agent <name>] --email <email> [--server <url>] [--store <store>]",
308
+ example: "ouro vault create --email ouroboros@ouro.bot",
309
+ },
310
+ "vault replace": {
311
+ description: "Create an empty agent vault at the stable agent email when no unlock secret or JSON export exists",
312
+ usage: "ouro vault replace [--agent <name>] [--email <email>] [--server <url>] [--store <store>]",
313
+ example: "ouro vault replace",
314
+ },
315
+ "vault recover": {
316
+ description: "Create an agent vault at the stable agent email and import local JSON credential exports",
317
+ usage: "ouro vault recover [--agent <name>] --from <json> [--from <json> ...] [--email <email>] [--server <url>] [--store <store>]",
318
+ example: "ouro vault recover --from ./credentials.json",
319
+ },
320
+ "vault unlock": {
321
+ description: "Unlock an existing agent credential vault on this machine",
322
+ usage: "ouro vault unlock [--agent <name>] [--store <store>]",
323
+ example: "ouro vault unlock",
324
+ },
325
+ "vault status": {
326
+ description: "Show whether this machine can unlock an agent credential vault",
327
+ usage: "ouro vault status [--agent <name>] [--store <store>]",
328
+ example: "ouro vault status",
329
+ },
330
+ "vault config set": {
331
+ description: "Write runtime configuration into the agent credential vault without printing values",
332
+ usage: "ouro vault config set [--agent <name>] --key <path> [--value <value>] [--scope agent|machine]",
333
+ example: "ouro vault config set --key teams.clientSecret",
334
+ },
335
+ "vault config status": {
336
+ description: "List runtime configuration keys stored in the agent credential vault",
337
+ usage: "ouro vault config status [--agent <name>] [--scope agent|machine|all]",
338
+ example: "ouro vault config status --scope all",
339
+ },
340
+ };
341
+ // ── Levenshtein distance ──
342
+ function levenshteinDistance(a, b) {
343
+ if (a.length === 0)
344
+ return b.length;
345
+ if (b.length === 0)
346
+ return a.length;
347
+ const matrix = [];
348
+ for (let i = 0; i <= a.length; i++) {
349
+ matrix[i] = [i];
350
+ }
351
+ for (let j = 0; j <= b.length; j++) {
352
+ matrix[0][j] = j;
353
+ }
354
+ for (let i = 1; i <= a.length; i++) {
355
+ for (let j = 1; j <= b.length; j++) {
356
+ const cost = a[i - 1] === b[j - 1] ? 0 : 1;
357
+ matrix[i][j] = Math.min(matrix[i - 1][j] + 1, // deletion
358
+ matrix[i][j - 1] + 1, // insertion
359
+ matrix[i - 1][j - 1] + cost);
360
+ }
361
+ }
362
+ return matrix[a.length][b.length];
363
+ }
364
+ // ── Command suggestion ──
365
+ function suggestCommand(input) {
366
+ if (!input)
367
+ return null;
368
+ let bestMatch = null;
369
+ let bestDistance = Infinity;
370
+ for (const name of Object.keys(exports.COMMAND_REGISTRY)) {
371
+ const distance = levenshteinDistance(input, name);
372
+ if (distance < bestDistance) {
373
+ bestDistance = distance;
374
+ bestMatch = name;
375
+ }
376
+ }
377
+ return bestDistance <= 2 ? bestMatch : null;
378
+ }
379
+ // ── Category display order ──
380
+ const CATEGORY_ORDER = [
381
+ "Lifecycle",
382
+ "Agents",
383
+ "Chat",
384
+ "Tasks",
385
+ "Habits",
386
+ "Friends",
387
+ "Auth",
388
+ "Internal",
389
+ "System",
390
+ ];
391
+ // ── Grouped help output ──
392
+ function getGroupedHelp() {
393
+ const lines = ["Usage: ouro <command> [options]", ""];
394
+ for (const category of CATEGORY_ORDER) {
395
+ lines.push(` ${category}:`);
396
+ for (const [name, entry] of Object.entries(exports.COMMAND_REGISTRY)) {
397
+ if (entry.category === category) {
398
+ lines.push(` ${name.padEnd(16)} ${entry.description}`);
399
+ }
400
+ }
401
+ lines.push("");
402
+ }
403
+ lines.push("Run 'ouro help <command>' for details on a specific command.");
404
+ return lines.join("\n");
405
+ }
406
+ // ── Per-command help ──
407
+ function getCommandHelp(name) {
408
+ const entry = SUBCOMMAND_HELP[name] ?? exports.COMMAND_REGISTRY[name];
409
+ if (!entry)
410
+ return null;
411
+ const lines = [
412
+ `${name} - ${entry.description}`,
413
+ "",
414
+ `Usage: ${entry.usage}`,
415
+ ];
416
+ if (entry.subcommands && entry.subcommands.length > 0) {
417
+ lines.push("");
418
+ lines.push("Subcommands:");
419
+ for (const sub of entry.subcommands) {
420
+ lines.push(` ${sub}`);
421
+ }
422
+ }
423
+ if (entry.example) {
424
+ lines.push("");
425
+ lines.push(`Example: ${entry.example}`);
426
+ }
427
+ return lines.join("\n");
428
+ }