@dosu/cli 0.61.0 → 0.62.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 (2) hide show
  1. package/bin/dosu.js +107 -105
  2. package/package.json +2 -2
package/bin/dosu.js CHANGED
@@ -1083,7 +1083,7 @@ function isNpxInvocation(channel = INSTALL_CHANNEL, env = process.env) {
1083
1083
  function getVersionString() {
1084
1084
  return `v${VERSION}`;
1085
1085
  }
1086
- var VERSION = "0.61.0", INSTALL_CHANNEL = "npm";
1086
+ var VERSION = "0.62.1", INSTALL_CHANNEL = "npm";
1087
1087
 
1088
1088
  // src/debug/logger.ts
1089
1089
  import {
@@ -11195,8 +11195,8 @@ async function resolveDeploymentId(client, activeOrgId, id) {
11195
11195
  process.exit(1);
11196
11196
  }
11197
11197
  function deploymentsCommand() {
11198
- const cmd = new Command("deployments").description("Manage deployments");
11199
- cmd.command("list").description("List all deployments").option("--json", "Output as JSON").action(async (opts) => {
11198
+ const cmd = new Command("deployments").description("Select the MCP deployment (and its Library) this CLI uses; not for Agents");
11199
+ cmd.command("list").description("List MCP deployments you can select").option("--json", "Output as JSON").action(async (opts) => {
11200
11200
  const cfg = requireConfig4();
11201
11201
  const client = createTypedClient(cfg);
11202
11202
  const allDeployments = await listAccessibleDeployments(client, cfg.active_account?.target?.org_id);
@@ -11206,7 +11206,7 @@ function deploymentsCommand() {
11206
11206
  return;
11207
11207
  }
11208
11208
  if (!deployments || deployments.length === 0) {
11209
- console.log(import_picocolors15.default.dim("No deployments found."));
11209
+ console.log(import_picocolors15.default.dim("No MCP deployments found."));
11210
11210
  return;
11211
11211
  }
11212
11212
  printTable(["ID", "Name", "Org", "Status"], deployments.map((d) => [
@@ -11220,7 +11220,7 @@ function deploymentsCommand() {
11220
11220
  ${import_picocolors15.default.dim(`Current: ${cfg.active_account?.target?.deployment_name ?? cfg.active_account?.target?.deployment_id}`)}`);
11221
11221
  }
11222
11222
  });
11223
- cmd.command("info").description("Show current deployment details").option("--json", "Output as JSON").action(async (opts) => {
11223
+ cmd.command("info").description("Show the selected MCP deployment").option("--json", "Output as JSON").action(async (opts) => {
11224
11224
  const cfg = requireConfig4();
11225
11225
  if (!cfg.active_account?.target?.deployment_id) {
11226
11226
  console.error(import_picocolors15.default.red("No deployment selected. Run 'dosu setup' or 'dosu deployments switch'."));
@@ -11247,7 +11247,7 @@ ${import_picocolors15.default.dim(`Current: ${cfg.active_account?.target?.deploy
11247
11247
  ["Created", formatDate(deployment.created_at)]
11248
11248
  ], { rawData: deployment });
11249
11249
  });
11250
- cmd.command("switch").description("Switch to a different deployment").argument("<id>", "Deployment ID (full UUID, or a unique prefix as shown by 'list')").option("--json", "Output as JSON").action(async (rawId, opts) => {
11250
+ cmd.command("switch").description("Select a different MCP deployment (mints a new API key for it)").argument("<id>", "MCP deployment ID (full UUID, or a unique prefix as shown by 'list')").option("--json", "Output as JSON").action(async (rawId, opts) => {
11251
11251
  const cfg = requireConfig4();
11252
11252
  const client = createTypedClient(cfg);
11253
11253
  const id = await resolveDeploymentId(client, cfg.active_account?.target?.org_id, rawId);
@@ -13800,7 +13800,7 @@ var init_conflicts = __esm(() => {
13800
13800
  });
13801
13801
 
13802
13802
  // src/telemetry/debug-id.ts
13803
- var BUNDLE_DEBUG_ID_PLACEHOLDER = "41cac967-78f1-f75a-6475-6e2164756e21";
13803
+ var BUNDLE_DEBUG_ID_PLACEHOLDER = "097dc848-8855-154b-6475-6e2164756e21";
13804
13804
 
13805
13805
  // src/telemetry/telemetry.ts
13806
13806
  import { randomUUID as randomUUID2 } from "node:crypto";
@@ -59898,7 +59898,94 @@ var init_skills = __esm(() => {
59898
59898
  files: [
59899
59899
  {
59900
59900
  path: "SKILL.md",
59901
- content: "---\nname: dosu\ndescription: 'Use the Dosu CLI to authenticate and configure coding agents; manage Libraries, Agents, sources, Monitor, documents, reviews, threads, topics, members, integrations, and deployments; query knowledge; or audit a repository for Dosu-generated docs. Use for Dosu platform work that should be done from a terminal instead of the web app.'\n---\n\n# Use the Dosu CLI\n\nOperate Dosu through `dosu`. Prefer structured output and let the CLI and App validate product rules.\n\n## Start correctly\n\n1. Run `dosu --version`. Do not probe installation with unrelated package-manager commands.\n2. If it is unavailable and Node is present, try `npx -y @dosu/cli --version` and use `npx -y @dosu/cli` as the command prefix for this session. Otherwise ask before installing anything.\n3. Run `dosu --help` or the relevant nested `--help` before using a command not covered by [the command reference](references/commands.md).\n4. Pass `--json` whenever that leaf command exposes it. Parse the result; do not scrape the human table.\n\n## Satisfy the right prerequisite\n\n- `dosu login` supplies the JWT used by tRPC-backed commands.\n- `dosu setup` selects an organization, Library context, and MCP deployment, creates an API key, and can configure an agent tool.\n- `dosu ask` needs an API key. `docs generate`, `docs auto-tag`, and `docs publish` need both JWT login and the API key. Other platform commands generally need JWT login; commands scoped to an organization or current Library also need the corresponding setup selection.\n- For coding-agent setup, follow the nonblocking `dosu setup --agent --tool <id>` workflow in [workflows.md](references/workflows.md). Relay its URL and execute its returned `resume_command`; never invent ticket commands.\n\n## Use current product terms\n\n- **Organization** is the account and permission boundary.\n- **Library** is the knowledge container shown in the App. Older APIs may call it a `space`; do not present that internal name to users.\n- **Data source** is an organization-level connection such as a repository, Slack channel, or Notion workspace. A Library can use already-connected sources.\n- **Agent** is a configurable GitHub, GitLab, Slack, or Teams deployment serving exactly one Library.\n- **Monitor** is per Library and source. It supports GitHub, GitLab, and Azure DevOps sources.\n- `dosu deployments` manages selectable **MCP deployments**. Do not use it as an Agent CRUD command.\n\n## Route by intent\n\n| Intent | Route |\n|---|---|\n| Set up Dosu end-to-end (\"set up dosu\", new Library from scratch) | Read the guided onboarding flow in [workflows.md](references/workflows.md) first; it is checkpoint-driven — ask, wait, then act |\n| Create or configure a Library | `dosu libraries ...` |\n| Attach existing organization sources | `dosu sources list` → `dosu libraries sources attach` |\n| Create or configure an Agent | `dosu agents ...` |\n| Ask for a synthesized answer | `dosu ask` |\n| Find source documents | `dosu knowledge search`, then `dosu docs get` |\n| Create, import, or publish docs | `dosu docs ...` |\n| Review a pending doc change or draft reply | Read [review-workflow.md](references/review-workflow.md) first |\n| Inspect conversations | `dosu threads ...` |\n| Browse managed topics | `dosu topics ...` |\n| Audit agent docs, README, architecture, or dependencies | Read [audit.md](references/audit.md) first |\n\nUse [commands.md](references/commands.md) as the sole detailed command and flag reference. Use [workflows.md](references/workflows.md) only for multi-command composition.\n\n## Apply Library and Agent semantics\n\n- To assemble a Library, list organization sources, create the Library, attach the chosen source IDs, then verify with `libraries info` and `libraries sources list`. The CLI cannot establish a brand-new OAuth connection.\n- `libraries sources config` resolves the provider on the App side. Read the command reference before choosing provider-specific options.\n- When creating a Library with a GitHub repository, or newly attaching one to an existing Library, treat Monitor as part of that setup unless the user opts out. Enable it with the whole-repository and `emoji` defaults, verify it, and explain that Monitor reviews pull requests to keep the Library's knowledge up to date. Follow [the Library workflow](references/workflows.md); do not ask the user to choose defaults.\n- Create an Agent from an existing source ID and let the App choose its defaults; do not synthesize config in shell commands. Each data source can back at most one Agent: a `CONFLICT` (409) from `agents create` means the source already has one — offer a different source or an authorized `agents move` instead of retrying.\n- Read Agent config before changing one existing leaf. Values are JSON. If a concurrent write returns `CONFLICT`, read again, re-evaluate the requested change, and retry only if it is still correct.\n- Moving an Agent replaces its Library. Verify the returned `space_id`; do not infer migration behavior for historical data from the move receipt.\n\n## Respect write boundaries\n\n- Treat an explicit, unambiguous user request for the exact mutation as authorization. Otherwise show the intended change and wait for confirmation.\n- For commands exposing `--confirm`, omit it first when a preview is useful; `{ \"confirmRequired\": true, \"applied\": false }` means nothing changed. Pass `--confirm` only after authorization.\n- Never batch-approve or batch-reject review items. Diff one item, explain it, and decide only the ID the user authorized.\n- Before deleting a Library, Agent, source, or document, state the exact target and impact. Before detaching a source, read and state the impact documented in the command reference. Some older delete commands do not enforce `--confirm`; the absence of a CLI prompt is not user approval.\n- Before attaching a source to a public Library, warn that its content becomes available to everyone who can access that Library.\n- OAuth connection and billing remain web-only. Report the boundary instead of claiming success.\n\n## Handle failures literally\n\n- `Not logged in` or an unrecoverable expired session: run `dosu login` (agent setup may instead return a ticket flow).\n- Missing organization, Library, deployment, or API-key context: run the appropriate `dosu setup` flow.\n- `confirmRequired`: no write occurred.\n- `CONFLICT` on config: reread before retrying.\n- A tRPC or backend error is a failed operation. Surface the code/path/status and do not imply the requested state exists.\n\n## References\n\n- [commands.md](references/commands.md): authoritative CLI syntax, choices, defaults, conflicts, and prerequisites\n- [workflows.md](references/workflows.md): reusable multi-command flows\n- [review-workflow.md](references/review-workflow.md): review safety and context\n- [audit.md](references/audit.md): repository audit procedure\n- [audit-findings-schema.md](references/audit-findings-schema.md): `.dosu/audit.json` contract\n",
59901
+ content: `---
59902
+ name: dosu
59903
+ description: 'Use the Dosu CLI to show the Dosu review list or review queue (items pending approval: pending doc changes and draft replies) and to review, approve, or reject one item; authenticate and configure coding agents; manage Libraries, Agents, sources, Monitor, documents, threads, topics, members, integrations, and MCP deployments; query knowledge; or audit a repository for Dosu-generated docs. Use for Dosu platform work that should be done from a terminal instead of the web app.'
59904
+ ---
59905
+
59906
+ # Use the Dosu CLI
59907
+
59908
+ Operate Dosu through \`dosu\`. Prefer structured output and let the CLI and App validate product rules.
59909
+
59910
+ ## Start correctly
59911
+
59912
+ 1. Run \`dosu --version\`. Do not probe installation with unrelated package-manager commands.
59913
+ 2. If it is unavailable and Node is present, try \`npx -y @dosu/cli --version\` and use \`npx -y @dosu/cli\` as the command prefix for this session. Otherwise ask before installing anything.
59914
+ 3. Run \`dosu --help\` or the relevant nested \`--help\` before using a command not covered by [the command reference](references/commands.md).
59915
+ 4. Pass \`--json\` whenever that leaf command exposes it. Parse the result; do not scrape the human table.
59916
+
59917
+ ## Satisfy the right prerequisite
59918
+
59919
+ - \`dosu login\` supplies the JWT used by tRPC-backed commands.
59920
+ - \`dosu setup\` selects an organization, Library context, and MCP deployment, creates an API key, and can configure an agent tool.
59921
+ - \`dosu ask\` needs an API key. \`docs generate\`, \`docs auto-tag\`, and \`docs publish\` need both JWT login and the API key. Other platform commands generally need JWT login; commands scoped to an organization or current Library also need the corresponding setup selection.
59922
+ - For coding-agent setup, follow the nonblocking \`dosu setup --agent --tool <id>\` workflow in [workflows.md](references/workflows.md). Relay its URL and execute its returned \`resume_command\`; never invent ticket commands.
59923
+
59924
+ ## Use current product terms
59925
+
59926
+ - **Organization** is the account and permission boundary.
59927
+ - **Library** is the knowledge container shown in the App. Older APIs may call it a \`space\`; do not present that internal name to users.
59928
+ - **Data source** is an organization-level connection such as a repository, Slack channel, or Notion workspace. A Library can use already-connected sources.
59929
+ - **Agent** is a configurable GitHub, GitLab, Slack, or Teams deployment serving exactly one Library.
59930
+ - **Monitor** is per Library and source. It supports GitHub, GitLab, and Azure DevOps sources.
59931
+ - **MCP deployment** is the local selection made by \`dosu setup\` or \`dosu deployments switch\`. It sets the Library that Library-scoped commands such as \`dosu review list\` read, plus the API key \`dosu ask\` uses. \`dosu deployments\` lists and switches MCP deployments; it is not an Agent command.
59932
+ - The **review queue** (\`dosu review list\`) holds pending doc changes in the selected Library plus draft replies from the selected MCP deployment. The App's **Review** page is a list of conversation threads, so its entries and counts can differ. When the user explicitly means that page, explain the difference and offer \`dosu threads list\` or \`dosu review context <thread-id>\`; do not substitute an Agent list.
59933
+
59934
+ ## Route by intent
59935
+
59936
+ | Intent | Route |
59937
+ |---|---|
59938
+ | Set up Dosu end-to-end ("set up dosu", new Library from scratch) | Read the guided onboarding flow in [workflows.md](references/workflows.md) first; it is checkpoint-driven — ask, wait, then act |
59939
+ | Create or configure a Library | \`dosu libraries ...\` |
59940
+ | Attach existing organization sources | \`dosu sources list\` → \`dosu libraries sources attach\` |
59941
+ | Create or configure an Agent | \`dosu agents ...\` |
59942
+ | Ask for a synthesized answer | \`dosu ask\` |
59943
+ | Find source documents | \`dosu knowledge search\`, then \`dosu docs get\` |
59944
+ | Create, import, or publish docs | \`dosu docs ...\` |
59945
+ | Show the review list, review queue, or what needs approval | \`dosu review list --json\`; if the scope looks wrong, follow the context check in [review-workflow.md](references/review-workflow.md) |
59946
+ | Inspect, edit, approve, or reject one review item | Read [review-workflow.md](references/review-workflow.md) first |
59947
+ | Inspect conversations | \`dosu threads ...\` |
59948
+ | Browse managed topics | \`dosu topics ...\` |
59949
+ | Audit agent docs, README, architecture, or dependencies | Read [audit.md](references/audit.md) first |
59950
+
59951
+ Use [commands.md](references/commands.md) as the sole detailed command and flag reference. Use [workflows.md](references/workflows.md) only for multi-command composition.
59952
+
59953
+ ## Apply Library and Agent semantics
59954
+
59955
+ - To assemble a Library, list organization sources, create the Library, attach the chosen source IDs, then verify with \`libraries info\` and \`libraries sources list\`. The CLI cannot establish a brand-new OAuth connection.
59956
+ - \`libraries sources config\` resolves the provider on the App side. Read the command reference before choosing provider-specific options.
59957
+ - When creating a Library with a GitHub repository, or newly attaching one to an existing Library, treat Monitor as part of that setup unless the user opts out. Enable it with the whole-repository and \`emoji\` defaults, verify it, and explain that Monitor reviews pull requests to keep the Library's knowledge up to date. Follow [the Library workflow](references/workflows.md); do not ask the user to choose defaults.
59958
+ - Create an Agent from an existing source ID and let the App choose its defaults; do not synthesize config in shell commands. Each data source can back at most one Agent: a \`CONFLICT\` (409) from \`agents create\` means the source already has one — offer a different source or an authorized \`agents move\` instead of retrying.
59959
+ - Read Agent config before changing one existing leaf. Values are JSON. If a concurrent write returns \`CONFLICT\`, read again, re-evaluate the requested change, and retry only if it is still correct.
59960
+ - Moving an Agent replaces its Library. Verify the returned \`space_id\`; do not infer migration behavior for historical data from the move receipt.
59961
+
59962
+ ## Respect write boundaries
59963
+
59964
+ - Treat an explicit, unambiguous user request for the exact mutation as authorization. Otherwise show the intended change and wait for confirmation.
59965
+ - For commands exposing \`--confirm\`, omit it first when a preview is useful; \`{ "confirmRequired": true, "applied": false }\` means nothing changed. Pass \`--confirm\` only after authorization.
59966
+ - Never batch-approve or batch-reject review items. Diff one item, explain it, and decide only the ID the user authorized.
59967
+ - Before deleting a Library, Agent, source, or document, state the exact target and impact. Before detaching a source, read and state the impact documented in the command reference. Some older delete commands do not enforce \`--confirm\`; the absence of a CLI prompt is not user approval.
59968
+ - Before attaching a source to a public Library, warn that its content becomes available to everyone who can access that Library.
59969
+ - OAuth connection and billing remain web-only. Report the boundary instead of claiming success.
59970
+
59971
+ ## Handle failures literally
59972
+
59973
+ - \`Not logged in\` or an unrecoverable expired session: run \`dosu login\` (agent setup may instead return a ticket flow).
59974
+ - Missing organization, Library, deployment, or API-key context: run the appropriate \`dosu setup\` flow.
59975
+ - Wrong or unexpected Library context: read \`dosu status --json\` and \`dosu deployments info --json\` before changing anything. Switch only to an MCP deployment the user named or confirmed; never pick the first one listed, and never switch just because a list came back empty.
59976
+ - Skill guidance out of date: \`dosu skill update\` rewrites the installed skill from the running CLI version. Some agents read skills only when a session starts, so start a new session if the change does not appear. Installed files show the skill is on disk, not that the agent loaded it.
59977
+ - \`confirmRequired\`: no write occurred.
59978
+ - \`CONFLICT\` on config: reread before retrying.
59979
+ - A tRPC or backend error is a failed operation. Surface the code/path/status and do not imply the requested state exists.
59980
+
59981
+ ## References
59982
+
59983
+ - [commands.md](references/commands.md): authoritative CLI syntax, choices, defaults, conflicts, and prerequisites
59984
+ - [workflows.md](references/workflows.md): reusable multi-command flows
59985
+ - [review-workflow.md](references/review-workflow.md): review safety and context
59986
+ - [audit.md](references/audit.md): repository audit procedure
59987
+ - [audit-findings-schema.md](references/audit-findings-schema.md): \`.dosu/audit.json\` contract
59988
+ `,
59902
59989
  executable: false
59903
59990
  },
59904
59991
  {
@@ -60249,7 +60336,7 @@ dosu docs sync-back <id> [--json]
60249
60336
  Read [review-workflow.md](review-workflow.md) before mutating a review item.
60250
60337
 
60251
60338
  \`\`\`text
60252
- dosu review list [--json]
60339
+ dosu review list [--since <when>] [--until <when>] [--json]
60253
60340
  dosu review diff <id> [--json]
60254
60341
  dosu review edit <id> [--title <title>] [--body <markdown> | --body-file <path>] [--json]
60255
60342
  dosu review context <thread-id> [--json]
@@ -60258,7 +60345,9 @@ dosu review reject <id> [--confirm] [--json]
60258
60345
  dosu review revert <id> [--json]
60259
60346
  \`\`\`
60260
60347
 
60261
- \`edit\` requires at least one field. \`approve\` and \`reject\` do not write without interactive confirmation or \`--confirm\`.
60348
+ - \`list\` reads the selected Library's pending doc changes plus the selected MCP deployment's draft replies. JSON is \`{items, truncated, total}\`: at most 50 items, newest first; \`total\` is a lower bound when \`truncated\` is true. \`--since\`/\`--until\` take \`24h\`/\`7d\`/\`2w\`, a UTC date, or an ISO-8601 datetime.
60349
+ - IDs are opaque: pass each \`id\` from \`list\` verbatim (draft replies carry a \`draft_message:\` prefix). \`revert\` takes a decided doc change's page-version ID and does not apply to drafts.
60350
+ - \`edit\` requires at least one field; drafts accept only \`--body\`/\`--body-file\`. \`approve\` and \`reject\` do not write without interactive confirmation or \`--confirm\`.
60262
60351
 
60263
60352
  ## Sources, integrations, members, and organization
60264
60353
 
@@ -60345,98 +60434,7 @@ The coding agent writes the findings; Dosu generates the selected docs. Follow [
60345
60434
  },
60346
60435
  {
60347
60436
  path: "references/review-workflow.md",
60348
- content: `# Review workflow
60349
-
60350
- How to work Dosu's review queue from the CLI: triage pending items, read the
60351
- diff, optionally edit, and apply a decision — safely.
60352
-
60353
- The queue holds **document versions** (AI-generated, user-edited, synced from
60354
- source, or API-created) and **draft messages**, all surfaced through the same
60355
- \`dosu review\` commands. Items are keyed on a single \`page-version-id\` so
60356
- \`list\` → \`diff\` → \`edit\` → \`approve\`/\`reject\` all share one ID.
60357
-
60358
- > \`list\` returns only the most recent pending items (server-capped, currently
60359
- > 50) and does not flag truncation. If the queue is large, don't assume \`list\`
60360
- > shows everything.
60361
-
60362
- ## Scope tool access for a review session
60363
-
60364
- Approving and rejecting are destructive and outward-facing. When you spin up an
60365
- agent session dedicated to reviewing, scope it to just the review commands:
60366
-
60367
- \`\`\`yaml
60368
- allowed-tools: Bash(dosu review:*)
60369
- \`\`\`
60370
-
60371
- This lets the agent triage, diff, and edit, but keeps it from running unrelated
60372
- CLI commands during a review pass.
60373
-
60374
- ## The flow
60375
-
60376
- \`\`\`bash
60377
- # 1. Triage — what's pending? Columns: ID, Kind, Title, Source, Status, Created.
60378
- dosu review list --json
60379
-
60380
- # 2. Inspect — read the exact change before deciding anything.
60381
- dosu review diff <page-version-id> --json
60382
-
60383
- # 3. (optional) Edit in place instead of rejecting a near-miss.
60384
- dosu review edit <page-version-id> --body-file ./revised.md # or --body / --title
60385
-
60386
- # 4. Decide — only on the item the user named, only after they OK it.
60387
- dosu review approve <page-version-id> --confirm --json
60388
- dosu review reject <page-version-id> --confirm --json
60389
-
60390
- # Undo a decision — back to pending.
60391
- dosu review revert <page-version-id> --json
60392
- \`\`\`
60393
-
60394
- ### \`--confirm\` is mandatory for agents
60395
-
60396
- \`approve\` and \`reject\` only prompt interactively in a TTY *without* \`--json\`.
60397
- The skill always passes \`--json\`, which suppresses both the diff preview and
60398
- the prompt — so without \`--confirm\` the command changes nothing and returns
60399
- \`{ "applied": false, "confirmRequired": true }\`. Run \`dosu review diff <id>\` to
60400
- see the change, then pass \`--confirm\` to apply — only after the user has
60401
- approved that specific item.
60402
-
60403
- ## Reading the \`Source\` column
60404
-
60405
- \`Source\` is the humanized \`origin\` field:
60406
-
60407
- | \`origin\` | Source | Meaning |
60408
- |---|---|---|
60409
- | \`manual_update\` | User created / User updated | A teammate authored or edited the doc |
60410
- | \`llm_generated\` | AI generated | Dosu drafted the change |
60411
- | \`sync_upstream\` | Synced from source | Came in from a connected source (Notion/Confluence/GitHub) |
60412
- | \`api_update\` | Created via API | Pushed in programmatically |
60413
-
60414
- ## Feeding PR / thread context
60415
-
60416
- A review often originates from a conversation thread (a GitHub issue, a Slack
60417
- message, a sync-back PR). Pull that context before deciding:
60418
-
60419
- \`\`\`bash
60420
- dosu review context <thread-id> --json
60421
- \`\`\`
60422
-
60423
- It returns the review \`type\`, the review/published page IDs, and — when the
60424
- change round-trips to an external system — a **Sync PR URL**. Use it to:
60425
-
60426
- - show the user where the change came from and where approval will land, and
60427
- - read the originating discussion so the decision matches intent.
60428
-
60429
- ## Safety rules
60430
-
60431
- - **Explicit item only.** Decide on the \`id\` the user named. "Review my queue"
60432
- → run \`list\` and show it; never decide on their behalf.
60433
- - **Diff before deciding.** Always \`diff\` and surface the change first.
60434
- - **Never batch-accept.** No loop over \`list\` that approves everything. One
60435
- item, one confirmation.
60436
- - **Extra care for sync/PR origins.** \`Synced from source\` items and anything
60437
- with a Sync PR URL push back to an upstream system on approval. Call it out
60438
- and get explicit sign-off.
60439
- `,
60437
+ content: '# Review workflow\n\nHow to work Dosu\'s review queue from the CLI: triage pending items, read the\ndiff, optionally edit, and apply a decision — safely.\n\nThe queue holds **document versions** (AI-generated, user-edited, synced from\nsource, or API-created) and **draft messages**, all surfaced through the same\n`dosu review` commands. Doc changes come from the selected Library; draft\nreplies come only from threads of the selected MCP deployment.\n\n## Read the list result\n\n`dosu review list --json` returns `{ "items": [...], "truncated": <bool>, "total": <n> }`.\n\n- `items` holds at most 50 entries, newest first, doc changes and draft\n replies merged.\n- `truncated: true` means more pending items may exist than `items` shows.\n- `total` counts what the server found before that cap. When `truncated` is\n true it is a lower bound: report "at least `total`", never an exact backlog.\n- Each `id` is opaque. A doc change\'s `id` is its page-version UUID; a draft\n reply\'s `id` looks like `draft_message:<uuid>` and has `kind: "draft_message"`.\n Pass the `id` exactly as listed to `diff`, `edit`, `approve`, and `reject`;\n do not strip the prefix or shorten it.\n- `--since <when>` and `--until <when>` narrow the list by creation time. Each\n takes a duration back from now (`24h`, `7d`, `2w`), a UTC date\n (`2026-09-01`; an `--until` date includes that whole day), or an ISO-8601\n datetime. When `truncated` is true, `--until` reaches older items.\n\nAn empty `items` array means no pending items in the current scope. It is not\na reason to switch deployments.\n\n## Check the context when the scope looks wrong\n\nRun this only when the user says the list is for the wrong Library, names a\ndifferent Library, or a command reports missing context:\n\n1. `dosu status --json`: login state and the selected MCP deployment.\n2. `dosu deployments info --json`: the selected MCP deployment. The list reads\n the Library saved in the CLI\'s config, which `dosu setup` and\n `dosu deployments switch` set to this deployment\'s `space_id`\n (`dosu libraries info <space_id> --json` gives its name).\n3. If that is not the Library the user means, run\n `dosu deployments list --json` and find the MCP deployment whose `space_id`\n matches it (`dosu libraries list --json` maps names to IDs).\n4. Switch only to a deployment the user named or confirmed:\n `dosu deployments switch <deployment-id> --json`. It changes the CLI\'s\n selection for later commands and mints a new API key, so say that it did.\n Never pick the first deployment, and ask when several match or none does.\n5. Run `dosu review list --json` again.\n\n## Draft reply limits\n\n- `edit` on a draft accepts `--body` or `--body-file` only (no `--title`).\n- `approve` publishes the draft to its thread; `reject` discards it.\n- Drafts have no `revert`. A rejected draft is regenerated on the next agent run.\n\n## Scope tool access for a review session\n\nApproving and rejecting are destructive and outward-facing. When you spin up an\nagent session dedicated to reviewing, scope it to just the review commands:\n\n```yaml\nallowed-tools: Bash(dosu review:*)\n```\n\nThis lets the agent triage, diff, and edit, but keeps it from running unrelated\nCLI commands during a review pass.\n\n## The flow\n\n```bash\n# 1. Triage — what\'s pending? Columns: ID, Kind, Title, Source, Status, Created.\ndosu review list --json\ndosu review list --since 7d --json # optional creation-time window\n\n# 2. Inspect — read the exact change before deciding anything.\ndosu review diff <id> --json\n\n# 3. (optional) Edit in place instead of rejecting a near-miss.\ndosu review edit <id> --body-file ./revised.md # or --body / --title (docs only)\n\n# 4. Decide — only on the item the user named, only after they OK it.\ndosu review approve <id> --confirm --json\ndosu review reject <id> --confirm --json\n\n# Undo a doc-change decision — back to pending (not for draft replies).\ndosu review revert <page-version-id> --json\n```\n\n### `--confirm` is mandatory for agents\n\n`approve` and `reject` only prompt interactively in a TTY *without* `--json`.\nThe skill always passes `--json`, which suppresses both the diff preview and\nthe prompt — so without `--confirm` the command changes nothing and returns\n`{ "applied": false, "confirmRequired": true }`. Run `dosu review diff <id>` to\nsee the change, then pass `--confirm` to apply — only after the user has\napproved that specific item.\n\n## Reading the `Source` column\n\n`Source` is the humanized `origin` field:\n\n| `origin` | Source | Meaning |\n|---|---|---|\n| `manual_update` | User created / User updated | A teammate authored or edited the doc |\n| `llm_generated` | AI generated | Dosu drafted the change |\n| `sync_upstream` | Synced from source | Came in from a connected source (Notion/Confluence/GitHub) |\n| `api_update` | Created via API | Pushed in programmatically |\n\n## Feeding PR / thread context\n\nA review often originates from a conversation thread (a GitHub issue, a Slack\nmessage, a sync-back PR). Pull that context before deciding:\n\n```bash\ndosu review context <thread-id> --json\n```\n\nIt returns the review `type`, the review/published page IDs, and — when the\nchange round-trips to an external system — a **Sync PR URL**. Use it to:\n\n- show the user where the change came from and where approval will land, and\n- read the originating discussion so the decision matches intent.\n\n## Safety rules\n\n- **Explicit item only.** Decide on the `id` the user named. "Review my queue"\n → run `list` and show it; never decide on their behalf.\n- **Listing is read-only.** A request to show the list authorizes no approve,\n reject, edit, API-key creation, or deployment switch.\n- **Diff before deciding.** Always `diff` and surface the change first.\n- **Never batch-accept.** No loop over `list` that approves everything. One\n item, one confirmation.\n- **Extra care for sync/PR origins.** `Synced from source` items and anything\n with a Sync PR URL push back to an upstream system on approval. Call it out\n and get explicit sign-off.\n',
60440
60438
  executable: false
60441
60439
  },
60442
60440
  {
@@ -61719,6 +61717,7 @@ var ClaudeProvider = () => createJSONProvider({
61719
61717
  paths: ["~/.claude"],
61720
61718
  globalPath: "~/.claude.json",
61721
61719
  topKey: "mcpServers",
61720
+ buildServer: ({ url, headers }) => ({ type: "http", url, headers, alwaysLoad: true }),
61722
61721
  localConfigPath: (cwd) => join24(cwd, ".mcp.json")
61723
61722
  });
61724
61723
  var init_claude = __esm(() => {
@@ -62788,7 +62787,10 @@ var init_mcp_refresh_check = __esm(() => {
62788
62787
  init_refresh();
62789
62788
  init_update_check();
62790
62789
  import_picocolors31 = __toESM(require_picocolors(), 1);
62791
- MCP_FORMAT_CHANGES = ["0.53.0"];
62790
+ MCP_FORMAT_CHANGES = [
62791
+ "0.53.0",
62792
+ "0.62.0"
62793
+ ];
62792
62794
  });
62793
62795
 
62794
62796
  // src/version/skill-update-check.ts
@@ -67627,7 +67629,7 @@ function createProgram(options = {}) {
67627
67629
  const program = new Command;
67628
67630
  let telemetryStarted = false;
67629
67631
  let telemetryValidationFailure = false;
67630
- program.name("dosu").description("Dosu CLI - Manage MCP servers for AI tools").version(getVersionString(), "-v, --version").helpCommand("help [command]", "Show help for a command").option("--debug", "Enable debug logging to stderr", false).hook("preAction", async (thisCommand, actionCommand) => {
67632
+ program.name("dosu").description("Dosu CLI - Set up Dosu MCP for AI tools and work with Dosu Libraries, docs, reviews, and more").version(getVersionString(), "-v, --version").helpCommand("help [command]", "Show help for a command").option("--debug", "Enable debug logging to stderr", false).hook("preAction", async (thisCommand, actionCommand) => {
67631
67633
  const opts = thisCommand.optsWithGlobals();
67632
67634
  logger.init({ debug: opts.debug });
67633
67635
  if (shouldRunBackgroundChecks(actionCommand.name())) {
@@ -68113,4 +68115,4 @@ main().catch((err) => {
68113
68115
  process.exit(1);
68114
68116
  });
68115
68117
 
68116
- //# debugId=41cac967-78f1-f75a-6475-6e2164756e21
68118
+ //# debugId=097dc848-8855-154b-6475-6e2164756e21
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@dosu/cli",
3
- "version": "0.61.0",
3
+ "version": "0.62.1",
4
4
  "type": "module",
5
- "description": "Dosu CLI - Manage MCP servers for AI tools",
5
+ "description": "Dosu CLI - Set up Dosu MCP for AI tools and work with Dosu Libraries, docs, and reviews",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",