@dosu/cli 0.67.0-beta.1 → 0.67.0-beta.10

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 +40 -73
  2. package/bin/dosu.js +596 -634
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -99,18 +99,15 @@ 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, 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 |
102
+ | `dosu mcp refresh` | Rewrite the Dosu MCP entry in every already-configured tool from the current setup |
106
103
  | `dosu logs` | View or manage debug logs (`--tail`, `--clear`) |
107
104
  | `dosu telemetry` | Manage usage analytics and error diagnostics (`status`, `enable`, `disable`, `reset`) |
108
105
 
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.
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.
110
107
 
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.
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 when a configured agent's MCP entry is out of date, runs `dosu setup` (or the non-interactive `dosu mcp refresh` without a TTY). An entry is out of date when it doesn't match the shape the current provider code writes. Upgrades done outside `dosu upgrade` (npm, brew, `npx @dosu/cli@latest`) get a safety net: on the first command of a new version, the CLI checks each configured provider, silently rewrites only the out-of-date 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.
112
109
 
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.
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.
114
111
 
115
112
  ### Platform commands
116
113
 
@@ -136,34 +133,28 @@ Run `dosu <command> --help` for subcommands and flags.
136
133
 
137
134
  ### Agent skills
138
135
 
139
- The `dosu` skill — which teaches coding agents how to operate Dosu through this CLI — lives in [`skills/dosu`](skills/dosu) and is embedded in the CLI at build time, so the copy an agent reads always matches the installed CLI version. `dosu setup` (and `dosu skill install`) writes it to `~/.agents/skills/dosu`, the universal location read by Cursor, Codex, Gemini CLI, Zed, Cline, Copilot, OpenCode, and Antigravity, and symlinks Claude Code's `~/.claude/skills/dosu` and Windsurf's `~/.codeium/windsurf/skills/dosu` at that copy. After a CLI upgrade, the first command re-applies the skill automatically; `dosu skill update` does the same on demand. The former standalone [`dosu-ai/dosu-skill`](https://github.com/dosu-ai/dosu-skill) repository is deprecated in favour of this bundle.
136
+ The `dosu` skill — which teaches coding agents how to operate Dosu through this CLI — lives in [`skills/dosu`](skills/dosu) and is embedded in the CLI at build time, so the copy an agent reads always matches the installed CLI version. `dosu setup` (and `dosu skill install`) writes it to `~/.agents/skills/dosu`, the universal location read by Cursor, Codex, Gemini CLI, Copilot, and OpenCode, and symlinks Claude Code's `~/.claude/skills/dosu` at that copy. After a CLI upgrade, the first command re-applies the skill automatically; `dosu skill update` does the same on demand. The former standalone [`dosu-ai/dosu-skill`](https://github.com/dosu-ai/dosu-skill) repository is deprecated in favour of this bundle.
140
137
 
141
138
  To change a skill, edit `skills/<name>/…` and run `bun run embed:skills` to regenerate `src/generated/skills.ts` (a test fails if the two drift).
142
139
 
143
140
  ### Supported AI tools
144
141
 
145
- `dosu mcp add <id>` and the setup wizard support:
142
+ `dosu mcp add <id>` and the setup wizard support the coding agents whose sessions Dosu can learn from — each one keeps a session log on disk that [`@letta-ai/trajectory`](https://github.com/letta-ai/trajectory) normalizes:
146
143
 
147
144
  | ID | Tool |
148
145
  |---|---|
149
146
  | `claude` | Claude Code |
150
- | `claude-desktop` | Claude Desktop |
151
147
  | `cursor` | Cursor |
152
- | `vscode` | VS Code |
153
148
  | `codex` | Codex CLI |
154
149
  | `gemini` | Gemini CLI |
155
- | `windsurf` | Windsurf |
156
- | `zed` | Zed |
157
- | `cline` | Cline |
158
- | `cline-cli` | Cline CLI |
159
150
  | `copilot` | GitHub Copilot CLI |
160
151
  | `opencode` | OpenCode |
152
+ | `factory` | Factory (droid) |
161
153
  | `pi` | Pi (installs the Dosu pi extension; global only) |
162
- | `antigravity` | Antigravity |
163
- | `mcporter` | MCPorter |
164
- | `factory` | Factory |
165
154
  | `manual` | Manual Configuration (prints config to paste yourself) |
166
155
 
156
+ Tools with no such log (Claude Desktop, VS Code, Windsurf, Zed, Cline, Antigravity, MCPorter, ...) can still reach Dosu's MCP server: `dosu mcp add manual` prints the entry to paste into their config. The CLI no longer writes it for them, since nothing it does for them beyond that entry could learn from their sessions.
157
+
167
158
  ### Non-interactive / agent setup
168
159
 
169
160
  For coding agents and CI, `setup` has a non-interactive mode:
@@ -174,63 +165,36 @@ dosu setup --agent --tool claude
174
165
 
175
166
  Combine with `dosu login --request` / `--check <ticket>` for human-in-the-loop authentication, and `--mode oss|cloud` to skip the mode prompt.
176
167
 
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:
168
+ ### Studying sessions: status line and incognito
169
+
170
+ With `dosu knowledge hooks enable`, Dosu studies finished coding-agent sessions in the background
171
+ and turns what it learns into shared knowledge. Two switches make that visible and controllable per
172
+ session. `dosu setup` installs both alongside the hook; they can also be managed directly:
209
173
 
210
174
  ```bash
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
175
+ dosu knowledge statusline enable|disable [claude|cursor] # status-bar line in Claude Code / Cursor CLI
176
+ dosu knowledge incognito on|off [claude|cursor|codex] # stop/resume studying an agent's sessions
177
+ dosu knowledge incognito status # which agents are incognito
214
178
  ```
215
179
 
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).
180
+ The status line shows one of `📚 Dosu studying…` (a sync run is live), `📚 Dosu on`,
181
+ `👻 Dosu incognito`, `⚪ Dosu paused`, `⚪ Dosu not studying this repo`, or `⚪ Dosu off`. Every
182
+ session is studied unless you limit studying to picked repos under `dosu` → settings → study
183
+ scope. In an interactive terminal with more than one repo, `dosu setup` asks which repos' sessions
184
+ to ship before offering the backfill of recent sessions. Selecting every repo clears the scope, so
185
+ new repos are included automatically. The choice is saved as the study scope; change it later under
186
+ `dosu` → settings → study scope or with `dosu knowledge scope set`. Notes from a session with a
187
+ known repo and branch are anchored to that branch; the rest are unanchored and reach topics
188
+ immediately. Neither setup nor `enable` replaces a status line you
189
+ already have; they print the one-liner to add to your own script instead.
190
+
191
+ `incognito on` is a saved per-agent setting: none of that agent's sessions are studied until you
192
+ turn it off. Turning it off resumes studying only new sessions going forward; sessions that
193
+ finished while incognito was on stay unstudied permanently, even if a later sync picks them up.
194
+ To keep a single chat out instead, type `/dosu-incognito` in it; setup installs that command with
195
+ the hook. It marks the session's transcript so studying skips it (the whole session, and for the
196
+ rest of it — start a new session to turn Dosu back on) and tells the model not to use Dosu
197
+ tools. See [docs/studying.md](docs/studying.md).
234
198
 
235
199
  ### Telemetry and privacy
236
200
 
@@ -252,8 +216,11 @@ and may include documented coarse setup choices. `DO_NOT_TRACK=1` and
252
216
  `DOSU_TELEMETRY_DISABLED=1` disable all telemetry for the process. Dosu never collects
253
217
  prompts, raw command lines, free-form argument or option values, user source code, file contents,
254
218
  local paths, credentials, raw error messages, or `debug.log`. Environment-variable names and values
255
- are not collected. See [Telemetry and privacy](docs/telemetry.md) for the exact event fields,
256
- destinations, retention, and controls.
219
+ are not collected, with one exception: when a managed Claude Code settings conflict prevents a
220
+ study run, Dosu reports the allowlisted public Claude Code setting/variable names that caused the
221
+ conflict (never their values) to help diagnose why knowledge sync fails due to settings conflicts.
222
+ See [Telemetry and privacy](docs/telemetry.md) for the exact event fields, destinations, retention,
223
+ and controls.
257
224
 
258
225
  ## Configuration
259
226