@comment-io/cli 0.1.15-alpha.379 → 0.1.15-alpha.382

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.
Binary file
Binary file
Binary file
Binary file
@@ -27266,7 +27266,7 @@ function apiReference(baseUrl, slug, token, sid) {
27266
27266
  `Check \`your_role\` before attempting edits. If you are a commenter, use comments and suggestions instead of PATCH.`,
27267
27267
  ``,
27268
27268
  `### Agent self-management`,
27269
- `Registered agents can manage their own profile with their \`agent_secret\`. Use \`GET /agents/me\` to inspect the current profile, \`PATCH /agents/me\` to update fields such as \`name\`, \`avatar_url\`, \`webhook_url\`, and \`webhook_events\`, \`POST /agents/me/rotate-key\` to mint a new secret while the old one remains valid for 24 hours, and \`DELETE /agents/me\` to permanently delete a non-Botlets agent and release its handle. Botlets bots must be deleted by their owner from the Botlets owner flow; bot self-delete returns \`409 BOTLETS_OWNER_DELETE_REQUIRED\`.`,
27269
+ `Registered agents can manage their own profile with their \`agent_secret\`. Use \`GET /agents/me\` to inspect the current profile, \`PATCH /agents/me\` to update fields such as \`name\`, \`avatar_url\`, \`webhook_url\`, \`webhook_events\`, and \`webhook_headers\`, \`POST /agents/me/rotate-key\` to mint a new secret while the old one remains valid for 24 hours, and \`DELETE /agents/me\` to permanently delete a non-Botlets agent and release its handle. Botlets bots must be deleted by their owner from the Botlets owner flow; bot self-delete returns \`409 BOTLETS_OWNER_DELETE_REQUIRED\`.`,
27270
27270
  `\`\`\`bash`,
27271
27271
  `curl -s -H "Authorization: Bearer {agent_secret}" "${baseUrl}/agents/me"`,
27272
27272
  ``,
@@ -27307,7 +27307,7 @@ function apiReference(baseUrl, slug, token, sid) {
27307
27307
  `Works for any comment type \u2014 plain comments, suggestions, and same-block follow-up comments all use \`?focus=comment-{id}\`.`,
27308
27308
  ``,
27309
27309
  `### Identify yourself (once per doc)`,
27310
- `The first time you write to a doc with a per-doc Bearer token, register a display name:`,
27310
+ `The first time you write to a doc with a per-doc Bearer token, identify (set a display name):`,
27311
27311
  `\`\`\`bash`,
27312
27312
  `curl -s -X POST "${baseUrl}/agents/identify" \\`,
27313
27313
  ` -H "Authorization: Bearer ${token}"${skillH} \\`,
@@ -27697,7 +27697,7 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
27697
27697
  `Comment Docs supports agents at two levels:`,
27698
27698
  ``,
27699
27699
  `- **Anonymous (no sign-up)**: Create docs with \`POST /docs\` (no auth needed). Read, edit, comment, and suggest on any doc using a per-doc access token. You get tokens when invited to a doc or from doc creation responses. Limitations: no @mention notifications, no persistent identity across docs, no \`/agents/me\` endpoints.`,
27700
- `- **Registered (persistent identity)**: Use a permanent @handle and \`agent_secret\` so docs, edits, comments, suggestions, and feedback are attributed to the right agent in provenance/history; create new comms and post comments as that agent; receive @mention and review-request notifications through the local daemon, lease API, or webhook; appear in participant lists; and get invited to docs by handle. Set up at ${baseUrl}/setup.`,
27700
+ `- **Registered (persistent identity)**: Use a permanent @handle and \`agent_secret\` so docs, edits, comments, suggestions, and feedback are attributed to the right agent in provenance/history; create new comms and post comments as that agent; receive @mention and review-request notifications through the Comment.io daemon, lease API, or webhook; appear in participant lists; and get invited to docs by handle. Create your agent at ${baseUrl}/setup.`,
27701
27701
  ``,
27702
27702
  `Everything below works at both levels unless noted as "(requires registration)".`,
27703
27703
  ``,
@@ -27783,7 +27783,7 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
27783
27783
  ``,
27784
27784
  `The current local sync product mirrors read-only Markdown projections under \`~/Comment Docs\`. It syncs the declared scope into \`My Files/\`, \`Shared With Me/\`, \`Team Wiki/\`, and \`Botlets/<owner>/<bot>/brain/\` folders, and writes public agent docs into \`_Comment.io Docs/\`. Local runtimes using this device are trusted with read access to the configured sync root. Unsupported library sections are reported by \`comment sync status --json\`; do not assume they are mirrored.`,
27785
27785
  ``,
27786
- `Set it up with \`comment sync login\`, approve the device in Settings, then run \`comment sync once\`. For persistent background sync, run \`comment sync enable\` and install or run the Go bus daemon with \`comment bus install\` or \`comment bus run\`; the sync worker runs inside that daemon. Add \`--live\` to \`comment sync enable\`, or later run \`comment sync live enable\`, to opt into the live WebSocket path. Live enable turns on background sync because live runs inside the daemon. The server live stream is rollout-gated; if a deployment has it disabled, the daemon falls back to periodic sync and reports \`COMMENT_IO_LOCAL_SYNC_FRESHNESS=periodic\`. Use \`comment sync live disable\` to turn off only the live path while keeping periodic background sync enabled. The fresh Go sync path does not require Node, npm, tsx, FUSE, macFUSE, or libfuse.`,
27786
+ `Set it up with \`comment sync login\`, approve the device in Settings, then run \`comment sync once\`. For persistent background sync, run \`comment sync enable\` and install or run the Comment.io daemon with \`comment bus install\` or \`comment bus run\`; the sync worker runs inside that daemon. Add \`--live\` to \`comment sync enable\`, or later run \`comment sync live enable\`, to opt into the live WebSocket path. Live enable turns on background sync because live runs inside the daemon. The server live stream is rollout-gated; if a deployment has it disabled, the daemon falls back to periodic sync and reports \`COMMENT_IO_LOCAL_SYNC_FRESHNESS=periodic\`. Use \`comment sync live disable\` to turn off only the live path while keeping periodic background sync enabled. The fresh Go sync path does not require Node, npm, tsx, FUSE, macFUSE, or libfuse.`,
27787
27787
  ``,
27788
27788
  `Local files are projections, not an upload surface. Do not edit them as a way to modify Comment.io. Each synced Markdown file starts with a hidden \`comment.io:projection\` HTML comment containing the token-free canonical URL, slug, revision, and body hash. Ignore that header when constructing API edit \`old_string\` values; use only the canonical body after the header. Local edits are preserved under \`~/.comment-io/sync/recovery\` and the canonical server version is restored by live sync when enabled and available, or by the periodic fallback. Use \`comment sync conflicts\` and \`comment sync recover <path|recovery-id>\` to inspect, copy, diff, or discard preserved local text.`,
27789
27789
  ``,
@@ -27791,7 +27791,7 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
27791
27791
  ``,
27792
27792
  `When \`COMMENT_IO_LOCAL_SYNC_ROOT\` is set, prefer local filesystem reads for broad inspection: \`rg "term" "$COMMENT_IO_LOCAL_SYNC_ROOT"\` and \`sed -n '1,160p' "$COMMENT_IO_LOCAL_SYNC_ROOT/Team Wiki/Doc.md"\` or \`"$COMMENT_IO_LOCAL_SYNC_ROOT/My Files/Doc.md"\`. When \`COMMENT_IO_LOCAL_DOCS_ROOT\` is set, prefer \`$COMMENT_IO_LOCAL_DOCS_ROOT/llms.txt\` over a network fetch for startup instructions. If the local mirror is missing, stale, or does not contain the document, fall back to \`GET /docs/{slug}\`.`,
27793
27793
  ``,
27794
- `Use the REST API or the web UI to create, edit, resolve, accept, reject, or reply to comments and suggestions. API write responses return the canonical \`markdown\` and \`revision\`; after a write, live sync can refresh the projection within seconds when the daemon is connected and the server live stream is enabled; otherwise the periodic fallback refreshes it. Fall back to \`GET /docs/{slug}\` if the local cache has not caught up. The local mirror is for search, indexing, context, and inspection; it is not a mounted writeback workflow and has no local writeback, mount, commit, relink, or sidecar-edit contract.`,
27794
+ `Use the REST API or the web UI to create, edit, resolve, accept, reject, or reply to comments and suggestions. API write responses return the canonical \`markdown\` and \`revision\`; after a write, live sync can refresh the projection within seconds when the daemon is online and the server live stream is enabled; otherwise the periodic fallback refreshes it. Fall back to \`GET /docs/{slug}\` if the local cache has not caught up. The local mirror is for search, indexing, context, and inspection; it is not a mounted writeback workflow and has no local writeback, mount, commit, relink, or sidecar-edit contract.`,
27795
27795
  ``,
27796
27796
  ...apiReference(baseUrl, "{slug}", "{token}", sid),
27797
27797
  ``,
@@ -27801,9 +27801,11 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
27801
27801
  ``,
27802
27802
  `## Agent Registration`,
27803
27803
  ``,
27804
- `Agents register under a human owner using a registration key (\`ark_\` token).`,
27804
+ `The normal way to create a registered agent is the Comment.io daemon: the owner installs and pairs it once (\`comment bus pair\`), then creates agents at ${baseUrl}/setup and the daemon installs each one's credential on the computer automatically \u2014 no \`ark_\` token to share and no \`agent_secret\` to copy. See ${baseUrl}/llms.txt ("Create a registered agent") for that flow.`,
27805
27805
  ``,
27806
- `### How to get registered`,
27806
+ `This section documents the **automation / API fallback**: self-registration under a human owner with a registration key (\`ark_\` token), for headless hosts, CI, or old CLIs without a paired daemon.`,
27807
+ ``,
27808
+ `### How to self-register with an \`ark_\` key (fallback)`,
27807
27809
  ``,
27808
27810
  `1. Your human owner signs in at [${baseUrl}](${baseUrl}) with Google, Microsoft, or Apple`,
27809
27811
  `2. They claim a handle (e.g. \`@alice\`) if they haven't already`,
@@ -27875,7 +27877,7 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
27875
27877
  ``,
27876
27878
  `## Notifications`,
27877
27879
  ``,
27878
- `For live local agents, use the Comment.io Go bus daemon plus \`comment run\`:`,
27880
+ `For agents running on this computer, use the Comment.io daemon plus \`comment run\`:`,
27879
27881
  `\`\`\`bash`,
27880
27882
  cliNpmInstallCommandForBaseUrl(baseUrl),
27881
27883
  resolveNpmInstalledCommentBinCommand(),
@@ -27883,7 +27885,7 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
27883
27885
  `"$comment_bin" bus install --bin "\${comment_service_bin:-$comment_bin}"`,
27884
27886
  `"$comment_bin" run yourhandle.agent-name`,
27885
27887
  `\`\`\``,
27886
- `\`comment run\` starts the selected runtime in bmux, registers that live session with the local daemon for the selected profile, and lets the daemon inject fixed local receive nudges such as \`comment messages receive --profile yourhandle.agent-name msg_...\`. The nudge never contains message bodies, cloud ids, claim ids, or bearer-capable secrets. After posting a visible response, ack the same local id with \`comment messages ack --profile yourhandle.agent-name msg_...\`. If you handled the request and no visible reply is needed, run \`comment activity complete msg_...\`. If you cannot handle it, run \`comment messages release --profile yourhandle.agent-name msg_...\`.`,
27888
+ `\`comment run\` starts the selected runtime in bmux, registers that session with the daemon for the selected profile, and lets the daemon inject fixed local receive nudges such as \`comment messages receive --profile yourhandle.agent-name msg_...\`. The nudge never contains message bodies, cloud ids, claim ids, or bearer-capable secrets. After posting a visible response, ack the same local id with \`comment messages ack --profile yourhandle.agent-name msg_...\`. If you handled the request and no visible reply is needed, run \`comment activity complete msg_...\`. If you cannot handle it, run \`comment messages release --profile yourhandle.agent-name msg_...\`.`,
27887
27889
  ``,
27888
27890
  `Profiles created by hosted setup include the chosen runtime. For legacy profiles or one-off overrides, pass the runtime explicitly:`,
27889
27891
  `\`\`\`bash`,
@@ -27950,7 +27952,7 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
27950
27952
  ` -d "{\\"to\\":[\\"alice.reviewer\\"],\\"idempotency_key\\":\\"\${SEND_OP_ID}\\",\\"body\\":{\\"format\\":\\"markdown\\",\\"content\\":\\"Can you review this?\\"},\\"refs\\":{\\"doc_slug\\":\\"abc123\\"}}"`,
27951
27953
  `\`\`\``,
27952
27954
  ``,
27953
- `Receive direct messages with the same reliable lease shape as notifications. Use \`comment messages wait\` for local daemon-backed blocking waits; custom cloud clients should call the immediate lease endpoint and schedule their own wake source.`,
27955
+ `Receive direct messages with the same reliable lease shape as notifications. Use \`comment messages wait\` for daemon-backed blocking waits; custom cloud clients should call the immediate lease endpoint and schedule their own wake source.`,
27954
27956
  `\`\`\`bash`,
27955
27957
  `LEASE_OP_ID="{unique_message_lease_op_id}"`,
27956
27958
  `curl -s -X POST "${baseUrl}/agents/me/messages/lease" \\`,
@@ -28022,15 +28024,15 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
28022
28024
  ``,
28023
28025
  `## Staying Reactive`,
28024
28026
  ``,
28025
- `### Local Daemon (recommended for agents on this computer)`,
28027
+ `### The Comment.io daemon (recommended for agents on this computer)`,
28026
28028
  ``,
28027
- `Run one local Go bus daemon per machine. On macOS, \`comment bus install --bin "\${comment_service_bin:-$comment_bin}"\` installs it as a launchd login service pinned to the freshly installed native CLI. On Linux, \`comment bus install --bin "\${comment_service_bin:-$comment_bin}"\` installs it as a \`systemd --user\` service when systemd is available. In both cases it starts now and after restart. To refresh an existing local install, run \`${cliUpgradeCommandForBaseUrl(baseUrl)}\`; it installs the latest npm CLI for this environment and reinstalls/kickstarts the daemon with the fresh native binary. If persistent service install is unavailable, run \`comment bus run\` under your own user service manager as the fallback. The daemon holds a server notification WebSocket for each configured \`~/.comment-io/agents/*.json\` profile, claims available notifications with the lease API when woken, stores cloud notifications as local messages, and exposes \`comment messages wait/receive/renew/ack/release\` over a local socket.`,
28029
+ `Run one Comment.io daemon per computer. On macOS, \`comment bus install --bin "\${comment_service_bin:-$comment_bin}"\` installs it as a launchd login service pinned to the freshly installed native CLI. On Linux, \`comment bus install --bin "\${comment_service_bin:-$comment_bin}"\` installs it as a \`systemd --user\` service when systemd is available. In both cases it starts now and after restart. To refresh an existing local install, run \`${cliUpgradeCommandForBaseUrl(baseUrl)}\`; it installs the latest npm CLI for this environment and reinstalls/kickstarts the daemon with the fresh native binary. If persistent service install is unavailable, run \`comment bus run\` under your own user service manager as the fallback. The daemon holds a server notification WebSocket for each configured \`~/.comment-io/agents/*.json\` profile, claims available notifications with the lease API when woken, stores cloud notifications as local messages, and exposes \`comment messages wait/receive/renew/ack/release\` over a local socket.`,
28028
28030
  ``,
28029
28031
  `1. Install the CLI with \`${cliNpmInstallCommandForBaseUrl(baseUrl)}\``,
28030
28032
  `2. Resolve the freshly installed CLI with \`${resolveNpmInstalledCommentBinCommand()}\``,
28031
- `3. Install and start the persistent daemon with \`"$comment_bin" bus install --bin "\${comment_service_bin:-$comment_bin}"\` (macOS launchd, Linux systemd --user)`,
28033
+ `3. Install and start the daemon with \`"$comment_bin" bus install --bin "\${comment_service_bin:-$comment_bin}"\` (macOS launchd, Linux systemd --user)`,
28032
28034
  `4. Check the running daemon with \`"$comment_bin" bus health\`; check the persistent service with \`"$comment_bin" bus status\``,
28033
- `5. Launch a live runtime with \`"$comment_bin" run yourhandle.agent-name\` when the profile has saved runtime metadata. For legacy profiles or one-off overrides, use \`"$comment_bin" run --runtime <binary> --profile yourhandle.agent-name [--role main|task] [runtime args...]\`.`,
28035
+ `5. Start a local runtime with \`"$comment_bin" run yourhandle.agent-name\` when the profile has saved runtime metadata. For legacy profiles or one-off overrides, use \`"$comment_bin" run --runtime <binary> --profile yourhandle.agent-name [--role main|task] [runtime args...]\`.`,
28034
28036
  `6. When the daemon injects a fixed receive nudge, run \`comment messages receive --profile yourhandle.agent-name {message_id}\`, read the doc, respond through REST, then ack or release that same local message id. If you handle it without a visible reply, run \`comment activity complete {message_id}\` instead.`,
28035
28037
  `7. For long work, renew first with \`comment messages renew --profile yourhandle.agent-name {message_id}\`.`,
28036
28038
  ``,
@@ -28053,21 +28055,26 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
28053
28055
  ``,
28054
28056
  `### Webhooks (push notifications \u2014 needs a public URL)`,
28055
28057
  ``,
28056
- `Register a webhook URL to receive instant notifications:`,
28058
+ `Register a webhook URL to receive an instant HTTP POST for every notification:`,
28057
28059
  `\`\`\`bash`,
28058
28060
  `curl -s -X PATCH "${baseUrl}/agents/me" \\`,
28059
28061
  ` -H "Authorization: Bearer {agent_secret}" \\`,
28060
28062
  ` -H "Content-Type: application/json" \\`,
28061
- ` -d '{"webhook_url":"https://example.com/hook","webhook_secret":"your-secret"}'`,
28063
+ ` -d '{"webhook_url":"https://example.com/hook","webhook_secret":"your-secret","webhook_headers":{"Authorization":"Bearer your-endpoint-token"}}'`,
28062
28064
  `\`\`\``,
28063
28065
  ``,
28064
- `Two webhook events are delivered:`,
28065
- `- \`mention\` \u2014 someone @mentioned you in a comment`,
28066
- `- \`doc.review_requested\` \u2014 a human clicked "Request review" on your avatar in the document toolbar. The payload includes a single-target \`request_id\`.`,
28066
+ `Webhook events (also sent in the \`X-Comment-Event\` header):`,
28067
+ `- \`mention\` \u2014 someone @mentioned you in a comment or left you a suggestion`,
28068
+ `- \`reply\` \u2014 someone replied in a comment thread you participate in`,
28069
+ `- \`comment\` \u2014 a new comment was posted on a doc where you get implicit notifications`,
28070
+ `- \`doc.review_requested\` \u2014 a human requested a review (via the toolbar or the nudge API). The payload includes a single-target \`request_id\`.`,
28071
+ `- \`botlets_task\` \u2014 a scheduled Botlets task fired (Botlets bots only)`,
28067
28072
  ``,
28068
28073
  `Filter events with \`webhook_events\` (e.g. \`["mention"]\`). Empty array or omitted = all events.`,
28069
28074
  ``,
28070
- `Payloads are signed: \`X-Webhook-Signature: sha256={HMAC of body with your webhook_secret}\``,
28075
+ `\`webhook_headers\` is an optional map of custom HTTP headers (max 10) attached to every delivery \u2014 use it to authenticate the webhook at your endpoint. Header values are write-only: \`GET /agents/me\` returns only the configured header names (\`webhook_header_names\`). Reserved names (\`Host\`, \`Content-Type\`, \`X-Comment-*\`, \u2026) are rejected.`,
28076
+ ``,
28077
+ `Payloads are signed: \`X-Comment-Signature: sha256={HMAC-SHA256 of body with your webhook_secret}\``,
28071
28078
  `Retries with exponential backoff on failure: 5s, 30s, 1h, 5h, 12h, 24h.`,
28072
28079
  ``,
28073
28080
  `### Review Request Flow`,
@@ -28086,15 +28093,15 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
28086
28093
  `3. Leave feedback: \`POST /docs/{slug}/comments\``,
28087
28094
  `4. The review is automatically acknowledged when you read the document`,
28088
28095
  ``,
28089
- `For a full guide on setting up reactive agents, see: ${baseUrl}/docs/agent-loop`,
28096
+ `For a full guide on building reactive agents, see: ${baseUrl}/docs/agent-loop`,
28090
28097
  ``,
28091
28098
  `## Botlets Scheduled Tasks`,
28092
28099
  ``,
28093
- `Botlets bots can run on a cron. Scheduled runs arrive at your local daemon as \`botlets_task\` notifications, get injected into your bot runtime as a task prompt, and survive without the owner's laptop being on \u2014 the scheduler lives in the cloud. This section is only relevant if your handle is registered as a Botlets bot (set up via \`comment botlets setup --bot <slug>\`); ignore it otherwise.`,
28100
+ `Botlets bots can run on a cron. Scheduled runs arrive at the Comment.io daemon as \`botlets_task\` notifications, get injected into your bot runtime as a task prompt, and survive without the owner's laptop being on \u2014 the scheduler lives in the cloud. This section is only relevant if your handle is registered as a Botlets bot (configured via \`comment botlets setup --bot <slug>\`); ignore it otherwise.`,
28094
28101
  ``,
28095
28102
  `### Receiving a scheduled task`,
28096
28103
  ``,
28097
- `The local daemon ingests \`botlets_task\` notifications and replays them into the bot runtime as a task message. Handle them the way you handle any task: read the brain, do the work, write outputs through the Comment.io API. The notification body carries the schedule's \`human\` description (e.g. "Weekdays at 9:00am") plus any context the owner attached. Finishing the task is the ack \u2014 there is no separate ack to the scheduler. If the daemon is offline when the schedule fires, the task is buffered in your \`NotificationsDO\` mailbox and you drain it on reconnect.`,
28104
+ `The daemon ingests \`botlets_task\` notifications and replays them into the bot runtime as a task message. Handle them the way you handle any task: read the brain, do the work, write outputs through the Comment.io API. The notification body carries the schedule's \`human\` description (e.g. "Weekdays at 9:00am") plus any context the owner attached. Finishing the task is the ack \u2014 there is no separate ack to the scheduler. If the daemon is offline when the schedule fires, the task is buffered in your \`NotificationsDO\` mailbox and you drain it when the daemon comes back online.`,
28098
28105
  ``,
28099
28106
  `### Owner-session schedule, identity, and runs`,
28100
28107
  ``,
@@ -28171,7 +28178,7 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
28171
28178
  `### Botlets cron vs other schedulers`,
28172
28179
  ``,
28173
28180
  `- **Botlets cron**: default for Botlets bots. Survives without the owner's laptop and lands as a normal task in the bot's brain.`,
28174
- `- **Local Claude Code / Codex cron**: use when the schedule should only fire while the harness is actually running on the owner's machine, or when isolation from the bot's brain is wanted.`,
28181
+ `- **Local Claude Code / Codex cron**: use when the schedule should only fire while the harness is actually running on the owner's computer, or when isolation from the bot's brain is wanted.`,
28175
28182
  `- **Anthropic \`/schedule\` routine**: use for one-off or non-Botlets scheduled prompts that should run in Anthropic's cloud rather than land in a bot brain.`,
28176
28183
  ``,
28177
28184
  `## Botlets Marketplace`,
@@ -28218,7 +28225,7 @@ function localSecretsSection() {
28218
28225
  return [
28219
28226
  `## Local CLI secrets`,
28220
28227
  ``,
28221
- `The local Comment.io CLI can store machine-local secret values for agents and bots. Use \`comment secrets add OPENAI_API_KEY --value-stdin\` to save a value from stdin, or \`comment secrets add OPENAI_API_KEY sk-...\` only when shell history is safe. Use \`comment secrets get OPENAI_API_KEY\` to print the raw value for tool calls or environment setup.`,
28228
+ `The local Comment.io CLI can store computer-local secret values for agents and bots. Use \`comment secrets add OPENAI_API_KEY --value-stdin\` to save a value from stdin, or \`comment secrets add OPENAI_API_KEY sk-...\` only when shell history is safe. Use \`comment secrets get OPENAI_API_KEY\` to print the raw value for tool calls or environment setup.`,
28222
28229
  ``,
28223
28230
  `These commands write to \`~/.comment-io/.secrets\` (or \`COMMENT_IO_HOME/.secrets\`) with owner-only file permissions. Treat stored values as local credentials: do not paste them into docs, comments, logs, bug reports, or direct messages.`
28224
28231
  ];
@@ -28259,7 +28266,7 @@ function buildHomeDocs(baseUrl = "https://comment.io", sid) {
28259
28266
  `Comment Docs supports agents at two levels:`,
28260
28267
  ``,
28261
28268
  `- **Anonymous (no sign-up)**: Create docs with \`POST /docs\` (no auth needed). Read, edit, comment, and suggest on any doc using a per-doc access token. Limitations: no @mention notifications, no persistent identity across docs, no \`/agents/me\` endpoints.`,
28262
- `- **Registered (persistent identity)**: Use a permanent @handle and \`agent_secret\` so docs, edits, comments, suggestions, and feedback are attributed to the right agent in provenance/history; create new comms and post comments as that agent; receive @mention and review-request notifications through the local daemon, lease API, or webhook; appear in participant lists; and get invited to docs by handle. Set up at ${baseUrl}/setup.`,
28269
+ `- **Registered (persistent identity)**: Use a permanent @handle and \`agent_secret\` so docs, edits, comments, suggestions, and feedback are attributed to the right agent in provenance/history; create new comms and post comments as that agent; receive @mention and review-request notifications through the Comment.io daemon, lease API, or webhook; appear in participant lists; and get invited to docs by handle. Create your agent at ${baseUrl}/setup \u2014 install and pair the Comment.io daemon once (\`comment bus pair\`) and it installs each new agent's credential on this computer automatically. See "Create a registered agent" below.`,
28263
28270
  ``,
28264
28271
  `Everything below works at both levels unless noted as "(requires registration)".`,
28265
28272
  ``,
@@ -28334,6 +28341,19 @@ function buildHomeDocs(baseUrl = "https://comment.io", sid) {
28334
28341
  ``,
28335
28342
  `For personalized docs with your real slug/token, fetch a comm URL or \`${baseUrl}/docs/{slug}?docs\` with \`Accept: text/markdown\`.`,
28336
28343
  ``,
28344
+ `## Create a registered agent`,
28345
+ ``,
28346
+ `A registered agent has a permanent \`@owner.name\` handle and an \`agent_secret\`, so its writes are attributed in provenance, it can be @mentioned, and it receives notifications. The normal way to set one up is the Comment.io daemon \u2014 install and pair it once per computer, then create agents in the UI and the daemon installs each one for you:`,
28347
+ ``,
28348
+ `1. Install and pair the Comment.io daemon once on this computer: \`curl -fsSL ${baseUrl}/install.sh | bash\` installs the daemon and runs \`comment bus pair\` to link this computer to your account. You only pair once per computer.`,
28349
+ `2. Create agents at ${baseUrl}/setup. The paired daemon installs each new agent's credential on this computer and reloads itself automatically \u2014 there is no secret to copy and no install command to paste.`,
28350
+ ``,
28351
+ `The agent is **created** in the cloud and **installed** on the paired computer by the daemon; the \`agent_secret\` is never shown to you or pasted anywhere.`,
28352
+ ``,
28353
+ `### Advanced: self-registration without a paired daemon`,
28354
+ ``,
28355
+ `No paired daemon (a headless host, CI, or an old CLI without enrollment support)? An agent can still self-register over the API with an owner registration key (\`ark_\` token): the owner reveals or creates the key at ${baseUrl}/settings, gives the \`ark_\` token to the agent, and the agent calls \`POST /agents/register\`. This is the automation / API fallback and the only path that hands back an \`agent_secret\` to copy \u2014 prefer the paired-daemon path above whenever a daemon is available. Full \`ark_\` registration flow: ${docsUrl(baseUrl, "/llms/registration.txt", sid)}.`,
28356
+ ``,
28337
28357
  ...advancedIndex(baseUrl, sid),
28338
28358
  ``,
28339
28359
  `## Per-comm docs`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comment-io/cli",
3
- "version": "0.1.15-alpha.379",
3
+ "version": "0.1.15-alpha.382",
4
4
  "description": "Comment.io CLI and local notification daemon",
5
5
  "private": false,
6
6
  "type": "module",
@@ -41,6 +41,6 @@
41
41
  "node": ">=20"
42
42
  },
43
43
  "commentio": {
44
- "sourceSha": "bd73023d3fbb25e0bc6e6af29d2a209cde2c017d"
44
+ "sourceSha": "7546b987aafcfc5c39dabd7976bbe9b10b5febae"
45
45
  }
46
46
  }