@dosu/cli 0.66.0 → 0.67.0-beta.1

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 (3) hide show
  1. package/README.md +64 -30
  2. package/bin/dosu.js +24394 -58375
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -99,15 +99,18 @@ Or right-click the binary, select "Open", and click "Open" in the dialog.
99
99
  | `dosu upgrade` | Update Dosu through the package manager that installed it, re-running `dosu setup` when the update changes agent config |
100
100
  | `dosu mcp list` | List supported AI tools |
101
101
  | `dosu mcp add <tool>` | Add the Dosu MCP server to a specific tool |
102
- | `dosu mcp refresh` | Rewrite the Dosu MCP entry in every already-configured tool from the current setup |
102
+ | `dosu mcp refresh` | Rewrite the Dosu MCP entry in every already-configured tool from the current setup, and re-apply the hooks of every agent that has them on |
103
+ | `dosu mcp serve --client <agent>` | The local (stdio) Dosu MCP server that tools' MCP entries run; not run by hand |
104
+ | `dosu project show\|link\|unlink [dir]` | Show the project key Dosu memory scopes a directory by, or link a directory to a key |
105
+ | `dosu memory search <query>` / `dosu memory evidence <id>` | Search Dosu memory, or read the evidence behind one memory, as an agent's MCP tools do |
103
106
  | `dosu logs` | View or manage debug logs (`--tail`, `--clear`) |
104
107
  | `dosu telemetry` | Manage usage analytics and error diagnostics (`status`, `enable`, `disable`, `reset`) |
105
108
 
106
- `dosu mcp add` takes `-g, --global` to install for all projects instead of project-local, and `--show-secret` to print the full manual config.
109
+ `dosu mcp add` takes `-g, --global` to install for all projects instead of project-local, and `--show-secret` to print the full manual config. The entry it writes runs `dosu mcp serve`, a local proxy to Dosu's MCP endpoint that adds the API key from the CLI config and the project, branch, and agent of the session, so memory lookups are scoped to the codebase you are in. The entry runs the Dosu install that wrote it, by absolute path (the npm package through the `node` that ran it), so an older `dosu` elsewhere on PATH or a PATH without `node` does not matter. A one-off `npx @dosu/cli setup` (or `bunx`, `pnpm dlx`) writes a remote entry instead, since the runner's copy does not last.
107
110
 
108
- `dosu upgrade` delegates to npm, pnpm, Yarn Classic, or Homebrew only after confirming which manager owns the current installation. Temporary package-runner invocations stay ephemeral, ambiguous or local installs are left unchanged, and standalone binaries receive the latest safe manual download path. After a successful update it hands off to the new version, which re-applies the bundled skills and, only if the update crossed a release that changed the agent config format, runs `dosu setup` (or the non-interactive `dosu mcp refresh` without a TTY). Upgrades done outside `dosu upgrade` (npm, brew, `npx @dosu/cli@latest`) get a safety net: when the new version changed the shape of the MCP entry, the first command on it silently rewrites configured tools' MCP entries and prompts you to run `dosu setup` for the rest; the bundled agent skills are always re-applied on the first command after any version change.
111
+ `dosu upgrade` delegates to npm, pnpm, Yarn Classic, or Homebrew only after confirming which manager owns the current installation. Temporary package-runner invocations stay ephemeral, ambiguous or local installs are left unchanged, and standalone binaries receive the latest safe manual download path. After a successful update it hands off to the new version, which re-applies bundled skills and enabled agent hooks. If configured MCP entries differ from the shape the new version writes, it runs `dosu setup`, or refreshes only those entries without a TTY. Upgrades done outside `dosu upgrade` get the same safety net on the first command after each version change, including between betas: stale MCP entries are rewritten and enabled hooks and skills are re-applied. Disabled hooks stay disabled.
109
112
 
110
- Dosu also updates itself automatically. When the update check (every six hours) finds a newer release, npm, pnpm, Yarn Classic, and Homebrew installs start the same package-manager update in a detached background process. The current command runs unchanged, and your next command uses the new version, whose first run applies the skill and MCP refreshes above. Hooks, rules, and the status line still need `dosu setup` when a release changes them. Background updates never run for `npx` invocations, standalone binaries, CI, or `DOSU_DEV=true`. A failed install (for example, a global npm prefix that needs `sudo`) falls back to the "Run `dosu upgrade`" notice and is retried after six hours. Turn background updates off with `dosu upgrade --auto off` (and back on with `--auto on`), or with `DOSU_DISABLE_AUTOUPDATE=1` for a single environment.
113
+ Dosu also updates itself automatically. When the update check (every six hours) finds a newer release, npm, pnpm, Yarn Classic, and Homebrew installs start the same package-manager update in a detached background process. The current command runs unchanged, and your next command uses the new version, whose first run applies the skill, MCP, and hooks refreshes above. Rules and the status line still need `dosu setup` when a release changes them. Background updates never run for `npx` invocations, standalone binaries, CI, or `DOSU_DEV=true`. A failed install (for example, a global npm prefix that needs `sudo`) falls back to the "Run `dosu upgrade`" notice and is retried after six hours. Turn background updates off with `dosu upgrade --auto off` (and back on with `--auto on`), or with `DOSU_DISABLE_AUTOUPDATE=1` for a single environment.
111
114
 
112
115
  ### Platform commands
113
116
 
@@ -119,7 +122,7 @@ Once authenticated against a deployment, you can drive the Dosu platform without
119
122
  | `dosu knowledge` | Search and browse your knowledge base |
120
123
  | `dosu docs` | Manage documents (list, create, update, import, publish) |
121
124
  | `dosu threads` | List and manage conversation threads |
122
- | `dosu review` | Document review workflow, plus `review notifications` to route a Library's or Agent's reviews to a Slack channel |
125
+ | `dosu review` | Document review workflow for the selected Library, plus `review notifications` to route a Library's or Agent's reviews to a Slack channel |
123
126
  | `dosu sources` | Manage connected data sources (list, connect, create, sync, update) |
124
127
  | `dosu integrations` | List and inspect platform integrations (Slack, GitHub, …) |
125
128
  | `dosu topics` | List knowledge base topics and their pages |
@@ -155,6 +158,7 @@ To change a skill, edit `skills/<name>/…` and run `bun run embed:skills` to re
155
158
  | `cline-cli` | Cline CLI |
156
159
  | `copilot` | GitHub Copilot CLI |
157
160
  | `opencode` | OpenCode |
161
+ | `pi` | Pi (installs the Dosu pi extension; global only) |
158
162
  | `antigravity` | Antigravity |
159
163
  | `mcporter` | MCPorter |
160
164
  | `factory` | Factory |
@@ -170,30 +174,63 @@ dosu setup --agent --tool claude
170
174
 
171
175
  Combine with `dosu login --request` / `--check <ticket>` for human-in-the-loop authentication, and `--mode oss|cloud` to skip the mode prompt.
172
176
 
173
- ### Studying sessions: status line and incognito
174
-
175
- With `dosu knowledge hooks enable`, Dosu studies finished coding-agent sessions in the background
176
- and turns what it learns into shared knowledge. Two switches make that visible and controllable per
177
- session. `dosu setup` installs both alongside the hook; they can also be managed directly:
177
+ ### Syncing sessions to Dosu memory: status line and incognito
178
+
179
+ With `dosu knowledge hooks enable`, finished coding-agent sessions ship to Dosu memory in the
180
+ background (secrets redacted locally first), and Dosu learns from them server-side. A Claude Code
181
+ or Codex (0.160+) session ships as soon as it ends, an OpenCode session as soon as the opencode
182
+ process that ran it exits, however it exits, and a pi session as soon as pi shuts it down. OpenCode
183
+ gets a plugin and pi an extension rather than a hook; both also add memory digests to prompts, and
184
+ pi's registers Dosu's MCP server (the `dosu mcp serve` proxy) with pi's built-in MCP and adds
185
+ `/dosu-incognito` (pi run with `--no-extensions` skips it, see
186
+ [docs/syncing.md](docs/syncing.md#pi)). Cursor sessions ship with a
187
+ later sync once they have been quiet for five minutes (its end event fires every turn). A resumed
188
+ session later ships only what is new. Shipping is on by default; `dosu knowledge transcripts
189
+ disable` turns it off.
190
+ `dosu knowledge sync --status` and `dosu knowledge sessions` show what shipped and why anything did
191
+ not (too short, rejected by the server, or from an agent not supported yet);
192
+ `dosu knowledge sync --retry-rejected` tries refused sessions again. On a throwaway machine (a VM
193
+ destroyed after its last task), run `dosu knowledge sync --flush` as the last step before teardown:
194
+ it ships every session not shipped yet right away, including the ones no end event named (Cursor's,
195
+ a Codex session killed with SIGTERM, pi run with `--no-extensions`); see
196
+ [docs/syncing.md](docs/syncing.md#throwaway-machines). Running `claude -p` from an eval
197
+ harness? Some flags (`--bare`, `--safe-mode`, `--no-session-persistence`, ...) keep sessions from
198
+ reaching Dosu; see [docs/syncing.md](docs/syncing.md#claude-code-in-an-eval-harness).
199
+
200
+ When the deployment has no linked repository, memory is scoped by the codebase a session worked in:
201
+ its `origin` remote, else the repository's root commit, else its path. Set `DOSU_PROJECT` in the
202
+ agent's environment, or run `dosu project link [dir] <key>`, to name it yourself
203
+ (`dosu project show` prints the key in use). A session keeps the key it was first resolved under. See
204
+ [docs/syncing.md](docs/syncing.md#project-key).
205
+
206
+ Two switches make shipping visible and controllable. `dosu setup` installs the status line and each
207
+ agent's incognito command alongside the hook (`dosu knowledge hooks enable` installs the incognito
208
+ command with each agent's hooks); they can also be managed directly:
178
209
 
179
210
  ```bash
180
- dosu knowledge statusline enable|disable [claude|cursor] # status-bar line in Claude Code / Cursor CLI
181
- dosu knowledge incognito on|off [claude|cursor|codex] # stop/resume studying an agent's sessions
182
- dosu knowledge incognito status # which agents are incognito
211
+ dosu knowledge statusline enable|disable [claude|cursor] # status-bar line in Claude Code / Cursor CLI
212
+ dosu knowledge incognito on|off [claude|cursor|codex|opencode|pi] # turn Dosu off/on for an agent
213
+ dosu knowledge incognito status # which agents are incognito
183
214
  ```
184
215
 
185
- The status line shows one of `📚 Dosu studying…` (a sync run is live), `📚 Dosu on`,
186
- `👻 Dosu incognito`, `⚪ Dosu paused`, `⚪ Dosu not studying this repo`, or `⚪ Dosu off`. Every
187
- session is studied unless you limit studying to picked repos under `dosu` → settings → study
188
- scope. Notes from a session with a known repo and branch are anchored to that branch; the rest are
189
- unanchored and reach topics immediately. Neither setup nor `enable` replaces a status line you
190
- already have; they print the one-liner to add to your own script instead.
191
-
192
- `incognito on` is a saved per-agent setting: none of that agent's sessions are studied until you
193
- turn it off. To keep a single chat out instead, type `/dosu-incognito` in it; setup installs that
194
- command with the hook. It marks the session's transcript so studying skips it (the whole session,
195
- and for the rest of it — start a new session to turn Dosu back on) and tells the model not to use
196
- Dosu tools. See [docs/studying.md](docs/studying.md).
216
+ The status line shows one of `📚 Dosu shipping…` (a sync run is live), `📚 Dosu on`,
217
+ `👻 Dosu incognito`, `⚪ Dosu paused`, `⚪ Dosu not learning from this repo`, or `⚪ Dosu off`.
218
+ Every session is shipped unless you limit syncing to picked repos under `dosu` → settings → sync
219
+ scope (or `dosu knowledge scope set <checkout>...`; `dosu knowledge skip-backlog` passes over the
220
+ sessions waiting to ship, see [docs/syncing.md](docs/syncing.md#repo-scope)). Neither setup nor
221
+ `enable` replaces a status line you already have; they print the one-liner to add to your own
222
+ script instead.
223
+
224
+ `incognito on` is a saved per-agent setting: none of that agent's sessions ship, its prompts get no
225
+ memory lookup, and its Dosu tool calls (and `dosu memory` run as it) are refused without leaving the
226
+ machine. Turning it off later does not ship the sessions that ran while it was on, even if you
227
+ resume them, nor their subagents or forks (`off` seals any no sync has settled yet; see
228
+ [docs/syncing.md](docs/syncing.md#per-agent-incognito)). To keep a single session out instead, run
229
+ `/dosu-incognito` in it (in Codex, which has no user slash commands, mention the skill
230
+ `$dosu-incognito`); setup installs it with the hook. It marks that session's transcript so it is
231
+ never shipped (the whole session, and for the rest of it — start a new session to turn Dosu back
232
+ on) and tells the model not to use Dosu tools. See
233
+ [docs/syncing.md](docs/syncing.md#per-session-incognito).
197
234
 
198
235
  ### Telemetry and privacy
199
236
 
@@ -215,11 +252,8 @@ and may include documented coarse setup choices. `DO_NOT_TRACK=1` and
215
252
  `DOSU_TELEMETRY_DISABLED=1` disable all telemetry for the process. Dosu never collects
216
253
  prompts, raw command lines, free-form argument or option values, user source code, file contents,
217
254
  local paths, credentials, raw error messages, or `debug.log`. Environment-variable names and values
218
- are not collected, with one exception: when a managed Claude Code settings conflict prevents a
219
- study run, Dosu reports the allowlisted public Claude Code setting/variable names that caused the
220
- conflict (never their values) to help diagnose why knowledge sync fails due to settings conflicts.
221
- See [Telemetry and privacy](docs/telemetry.md) for the exact event fields, destinations, retention,
222
- and controls.
255
+ are not collected. See [Telemetry and privacy](docs/telemetry.md) for the exact event fields,
256
+ destinations, retention, and controls.
223
257
 
224
258
  ## Configuration
225
259