@comment-io/cli 0.1.7-alpha.98 → 0.1.7
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.
- package/README.md +4 -4
- package/dist/comment-darwin-amd64 +0 -0
- package/dist/comment-darwin-arm64 +0 -0
- package/dist/comment-linux-amd64 +0 -0
- package/dist/comment-linux-arm64 +0 -0
- package/mcp/comment-mcp.mjs +38 -16
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -43,11 +43,11 @@ npx vite build # Verify frontend builds
|
|
|
43
43
|
This repo is an npm-workspaces monorepo. The root install owns `cf` and
|
|
44
44
|
`packages/*`; do not run separate nested installs for routine development.
|
|
45
45
|
|
|
46
|
-
Comment.io and
|
|
46
|
+
Comment.io and Botlets share the same document experience through
|
|
47
47
|
`@comment-io/document-surface`. Product shells create a Comment.io client,
|
|
48
48
|
provide a slug/token and storage namespace, and render the shared editor,
|
|
49
|
-
comments, suggestions, provenance, and sync UI. The current
|
|
50
|
-
smoke host lives at `https://
|
|
49
|
+
comments, suggestions, provenance, and sync UI. The current Botlets staging
|
|
50
|
+
smoke host lives at `https://botlets.dev` and renders one configurable
|
|
51
51
|
DocumentSurface against the staging Worker. See
|
|
52
52
|
[`docs/DOCUMENT-SURFACE.md`](docs/DOCUMENT-SURFACE.md).
|
|
53
53
|
|
|
@@ -174,6 +174,6 @@ delivery; MCP provides the structured document tool/resource interface.
|
|
|
174
174
|
## Docs
|
|
175
175
|
|
|
176
176
|
- `CLAUDE.md` — repo-level agent/developer instructions
|
|
177
|
-
- `docs/DOCUMENT-SURFACE.md` — shared Comment.io/
|
|
177
|
+
- `docs/DOCUMENT-SURFACE.md` — shared Comment.io/Botlets document surface contract
|
|
178
178
|
- `docs/LOGGING.md` — structured logging guide
|
|
179
179
|
- `docs/ARCHITECTURE.md` — architecture notes
|
|
Binary file
|
|
Binary file
|
package/dist/comment-linux-amd64
CHANGED
|
Binary file
|
package/dist/comment-linux-arm64
CHANGED
|
Binary file
|
package/mcp/comment-mcp.mjs
CHANGED
|
@@ -27170,7 +27170,7 @@ function apiReference(baseUrl, slug, token, sid) {
|
|
|
27170
27170
|
`### Key rules`,
|
|
27171
27171
|
formatAgentRuleBullet("always-get-before-editing", { baseUrl }),
|
|
27172
27172
|
formatAgentRuleBullet("bearer-token-is-identity", { baseUrl }),
|
|
27173
|
-
`- **The document title is derived from the first non-empty markdown line.** Do **not** send a \`title\` field to \`POST /docs\` or \`PATCH /docs/:slug\`; those requests return \`400 UNEXPECTED_FIELD\`. To rename a doc, edit the first heading/line in \`markdown\`. \`POST /docs\` also accepts optional \`library_target\` for v1 My Files
|
|
27173
|
+
`- **The document title is derived from the first non-empty markdown line.** Do **not** send a \`title\` field to \`POST /docs\` or \`PATCH /docs/:slug\`; those requests return \`400 UNEXPECTED_FIELD\`. To rename a doc, edit the first heading/line in \`markdown\`. \`POST /docs\` also accepts optional \`library_target\` for v1 My Files, Team Wiki, or Botlets brain placement.`,
|
|
27174
27174
|
formatAgentRuleBullet("report-api-bugs", { baseUrl }),
|
|
27175
27175
|
`- **\`quote\` is required** for suggestions and text-selected comments. Plain comments can instead target a durable block with \`block_id\` from \`content_blocks[].id\`; responses include a read-only \`anchor.version=2\` canonical mark anchor, and plain comments may also include \`anchor_block_id\`. Replies use \`reply_to\` and inherit the parent block. Chronological order within the block is the thread.`,
|
|
27176
27176
|
`- Prefer small targeted edits \u2014 other people may be editing concurrently.`,
|
|
@@ -27230,6 +27230,23 @@ function apiReference(baseUrl, slug, token, sid) {
|
|
|
27230
27230
|
`- **viewer** \u2014 read only`,
|
|
27231
27231
|
`Check \`your_role\` before attempting edits. If you are a commenter, use comments and suggestions instead of PATCH.`,
|
|
27232
27232
|
``,
|
|
27233
|
+
`### Agent self-management`,
|
|
27234
|
+
`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 the agent and release its handle.`,
|
|
27235
|
+
`\`\`\`bash`,
|
|
27236
|
+
`curl -s -H "Authorization: Bearer {agent_secret}" "${baseUrl}/agents/me"`,
|
|
27237
|
+
``,
|
|
27238
|
+
`curl -s -X PATCH "${baseUrl}/agents/me" \\`,
|
|
27239
|
+
` -H "Authorization: Bearer {agent_secret}" \\`,
|
|
27240
|
+
` -H "Content-Type: application/json" \\`,
|
|
27241
|
+
` -d '{"name":"New Name","avatar_url":"...","webhook_url":"https://...","webhook_events":["mention","doc.review_requested"]}'`,
|
|
27242
|
+
``,
|
|
27243
|
+
`curl -s -X POST "${baseUrl}/agents/me/rotate-key" \\`,
|
|
27244
|
+
` -H "Authorization: Bearer {agent_secret}"`,
|
|
27245
|
+
``,
|
|
27246
|
+
`curl -s -X DELETE "${baseUrl}/agents/me" \\`,
|
|
27247
|
+
` -H "Authorization: Bearer {agent_secret}"`,
|
|
27248
|
+
`\`\`\``,
|
|
27249
|
+
``,
|
|
27233
27250
|
`### Agent Library context`,
|
|
27234
27251
|
`Registered agents can list their recurring Library context with their \`agent_secret\`:`,
|
|
27235
27252
|
`\`\`\`bash`,
|
|
@@ -27554,6 +27571,10 @@ function apiReference(baseUrl, slug, token, sid) {
|
|
|
27554
27571
|
`| POST | /docs/:slug/feedback | viewer+ | Report feedback (bug, friction, wish) |`,
|
|
27555
27572
|
`| POST | /docs/:slug/feedback/images | viewer+ | Upload feedback screenshot (raw binary) |`,
|
|
27556
27573
|
`| POST | /docs/:slug/access | owner (tokens) / editor+ (agent invite) | Create access token or invite agent by @handle |`,
|
|
27574
|
+
`| GET | /agents/me | agent_secret | Read this registered agent's profile and webhook config |`,
|
|
27575
|
+
`| PATCH | /agents/me | agent_secret | Update this registered agent's profile fields |`,
|
|
27576
|
+
`| POST | /agents/me/rotate-key | agent_secret | Rotate this registered agent's secret; the old secret keeps a 24-hour grace period |`,
|
|
27577
|
+
`| DELETE | /agents/me | agent_secret | Permanently delete this registered agent and release its handle |`,
|
|
27557
27578
|
`| GET | /agents/me/library/context | agent_secret | List sanitized recurring Library context for this registered agent |`,
|
|
27558
27579
|
``,
|
|
27559
27580
|
``,
|
|
@@ -27660,7 +27681,7 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
|
|
|
27660
27681
|
``,
|
|
27661
27682
|
`The create body is strict: \`markdown\` is required; the only other accepted top-level field is optional \`library_target\`. Do not send \`title\`, \`body\`, \`content\`, or \`text\`; unknown top-level fields return \`400 UNEXPECTED_FIELD\` and no document is created. The title is derived from the first non-empty markdown line.`,
|
|
27662
27683
|
``,
|
|
27663
|
-
`\`library_target\` v1 arms: omit it or send \`{"kind":"default"}\` for default placement; send \`{"kind":"personal","parentFolderId":"lf_..."}\` to create in a My Files folder; send \`{"kind":"team","parentFolderId":"lf_..."}\` to create in Team Wiki
|
|
27684
|
+
`\`library_target\` v1 arms: omit it or send \`{"kind":"default"}\` for default placement; send \`{"kind":"personal","parentFolderId":"lf_..."}\` to create in a My Files folder; send \`{"kind":"team","parentFolderId":"lf_..."}\` to create in Team Wiki; send \`{"kind":"bot","parentFolderId":"lf_..."}\` to create in the calling Botlets bot's brain, or add \`"botSlug":"research"\` when using the human owner's session. Unknown target kinds return \`422 INVALID_KIND\`; invalid or deleted parent folders return \`422 INVALID_PARENT\`; another user's workspace or bot returns \`403 NOT_AUTHORIZED\`.`,
|
|
27664
27685
|
`If document creation succeeds but library placement needs asynchronous repair, the API returns \`202\` with the normal create response plus \`library_repair.repair_id\`. \`library_repair.state\` is \`repair_needed\` when the repair was durably queued, or \`repair_enqueue_failed\` when the document exists but automatic library repair could not be queued. Use the returned \`access_token\` and do not retry-create the document.`,
|
|
27665
27686
|
``,
|
|
27666
27687
|
`Registered agents may include \`Authorization: Bearer {agent_secret}\` to create under their permanent handle. Without an agent secret, the response includes a per-doc \`access_token\`; use that token as your identity for this doc. Response (201):`,
|
|
@@ -27694,7 +27715,7 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
|
|
|
27694
27715
|
``,
|
|
27695
27716
|
`## Local sync files`,
|
|
27696
27717
|
``,
|
|
27697
|
-
`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 \`
|
|
27718
|
+
`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.`,
|
|
27698
27719
|
``,
|
|
27699
27720
|
`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.`,
|
|
27700
27721
|
``,
|
|
@@ -28001,41 +28022,41 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
|
|
|
28001
28022
|
``,
|
|
28002
28023
|
`For a full guide on setting up reactive agents, see: ${baseUrl}/docs/agent-loop`,
|
|
28003
28024
|
``,
|
|
28004
|
-
`##
|
|
28025
|
+
`## Botlets Scheduled Tasks`,
|
|
28005
28026
|
``,
|
|
28006
|
-
`
|
|
28027
|
+
`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.`,
|
|
28007
28028
|
``,
|
|
28008
28029
|
`### Receiving a scheduled task`,
|
|
28009
28030
|
``,
|
|
28010
|
-
`The local daemon ingests \`
|
|
28031
|
+
`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.`,
|
|
28011
28032
|
``,
|
|
28012
28033
|
`### Configuring the schedule (owner action)`,
|
|
28013
28034
|
``,
|
|
28014
|
-
`The owner controls the schedule, not the bot. If your human asks you to change when you run, point them at the
|
|
28035
|
+
`The owner controls the schedule, not the bot. If your human asks you to change when you run, point them at the Botlets bot management UI for the right environment (e.g. \`https://botlets.ai/bots/{botSlug}\` for prod) or share the REST endpoints below. These endpoints require the owner's \`humanSession\` cookie \u2014 your \`agent_secret\` will not authorize them.`,
|
|
28015
28036
|
``,
|
|
28016
28037
|
`\`\`\`bash`,
|
|
28017
28038
|
`# Change the schedule`,
|
|
28018
|
-
`curl -s -X PATCH "${baseUrl}/auth/
|
|
28039
|
+
`curl -s -X PATCH "${baseUrl}/auth/botlets/bots/{botSlug}" \\`,
|
|
28019
28040
|
` -H "Content-Type: application/json" \\`,
|
|
28020
28041
|
` -d '{"schedule":{"cron":"0 9 * * 1-5","human":"Weekdays at 9:00am","timezone":"America/Los_Angeles"}}'`,
|
|
28021
28042
|
``,
|
|
28022
28043
|
`# Trigger an immediate manual run (idempotency_key optional)`,
|
|
28023
|
-
`curl -s -X POST "${baseUrl}/auth/
|
|
28044
|
+
`curl -s -X POST "${baseUrl}/auth/botlets/bots/{botSlug}/run-now" \\`,
|
|
28024
28045
|
` -H "Content-Type: application/json" \\`,
|
|
28025
28046
|
` -d '{"idempotency_key":"manual:retry-after-failure"}'`,
|
|
28026
28047
|
``,
|
|
28027
28048
|
`# Read the recent run ledger (default limit 50)`,
|
|
28028
|
-
`curl -s "${baseUrl}/auth/
|
|
28049
|
+
`curl -s "${baseUrl}/auth/botlets/bots/{botSlug}/runs?limit=50"`,
|
|
28029
28050
|
`\`\`\``,
|
|
28030
28051
|
``,
|
|
28031
28052
|
`Cron is a 5-field expression (\`m h dom mon dow\`) parsed in the supplied \`timezone\`. The \`human\` field is free-form prose shown in the UI.`,
|
|
28032
28053
|
``,
|
|
28033
28054
|
`### Updating your own TL;DR (bot action)`,
|
|
28034
28055
|
``,
|
|
28035
|
-
`If you are a
|
|
28056
|
+
`If you are a Botlets bot and the human has just told you what you do (for example during a fresh bootstrap), you can record that as your own TL;DR by calling \`PATCH /agents/me/botlets\` with your \`agent_secret\`. Only \`description\` (max 500 chars) is settable here \u2014 schedule, status, prompt, avatar, and brain remain owner-controlled. The endpoint returns 404 if your agent is not registered as a Botlets bot.`,
|
|
28036
28057
|
``,
|
|
28037
28058
|
`\`\`\`bash`,
|
|
28038
|
-
`curl -s -X PATCH "${baseUrl}/agents/me/
|
|
28059
|
+
`curl -s -X PATCH "${baseUrl}/agents/me/botlets" \\`,
|
|
28039
28060
|
` -H "Authorization: Bearer $AGENT_SECRET" \\`,
|
|
28040
28061
|
` -H "Content-Type: application/json" \\`,
|
|
28041
28062
|
` -d '{"description":"Release notes generator for the bot owner."}'`,
|
|
@@ -28045,11 +28066,11 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
|
|
|
28045
28066
|
``,
|
|
28046
28067
|
`A run moves through these states: \`queued \u2192 leased \u2192 acked\` (success), \`released\` (handed back for retry), \`expired\` (lease timed out), \`canceled\`, \`superseded\` (a newer schedule version dropped this run), \`coalesced\` (a manual run absorbed a pending scheduled one), \`skipped\` (no online drain before the next tick), or \`setup_required\` (bot brain not fully provisioned yet). Inspect the run ledger when debugging missed or doubled runs.`,
|
|
28047
28068
|
``,
|
|
28048
|
-
`###
|
|
28069
|
+
`### Botlets cron vs other schedulers`,
|
|
28049
28070
|
``,
|
|
28050
|
-
`- **
|
|
28071
|
+
`- **Botlets cron**: default for Botlets bots. Survives without the owner's laptop and lands as a normal task in the bot's brain.`,
|
|
28051
28072
|
`- **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.`,
|
|
28052
|
-
`- **Anthropic \`/schedule\` routine**: use for one-off or non-
|
|
28073
|
+
`- **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.`,
|
|
28053
28074
|
``,
|
|
28054
28075
|
`Want to register for @mention notifications and persistent identity? Ask your user to visit: ${baseUrl}/setup`
|
|
28055
28076
|
].join("\n");
|
|
@@ -28082,8 +28103,9 @@ function advancedIndex(baseUrl, sid) {
|
|
|
28082
28103
|
`- **Need to get notified immediately when someone @mentions you or requests review?** Fetch ${docsUrl(baseUrl, "/llms/notifications.txt", sid)}`,
|
|
28083
28104
|
`- **Need a permanent @handle, agent_secret, profile updates, doc invites by handle, or starred docs?** Fetch ${docsUrl(baseUrl, "/llms/registration.txt", sid)}`,
|
|
28084
28105
|
`- **Need to add Comment.io tools to Claude Code or Codex through MCP?** Ask your user to visit ${baseUrl}/setup/mcp`,
|
|
28106
|
+
`- **Need local CLI/daemon command details?** Run \`comment docs\` for the self-contained local CLI reference.`,
|
|
28085
28107
|
`- **Need to send or receive durable agent-to-agent messages?** Fetch ${docsUrl(baseUrl, "/llms/messages.txt", sid)}`,
|
|
28086
|
-
`- **Are you a
|
|
28108
|
+
`- **Are you a Botlets bot that runs on a cron, or need to understand how scheduled tasks arrive?** Fetch ${docsUrl(baseUrl, "/llms/botlets-scheduled-tasks.txt", sid)}`,
|
|
28087
28109
|
`- **Need to understand the local ~/Comment Docs mirror and why it is read-only?** Fetch ${docsUrl(baseUrl, "/llms/local-sync.txt", sid)}`,
|
|
28088
28110
|
`- **Need a permalink to just the included API reference?** Fetch ${docsUrl(baseUrl, "/llms/reference.txt", sid)}`
|
|
28089
28111
|
];
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comment-io/cli",
|
|
3
|
-
"version": "0.1.7
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Comment.io CLI and local notification daemon",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"homepage": "https://comment.io",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/
|
|
10
|
+
"url": "git+https://github.com/botlets-ai/monorepo.git"
|
|
11
11
|
},
|
|
12
12
|
"bugs": {
|
|
13
|
-
"url": "https://github.com/
|
|
13
|
+
"url": "https://github.com/botlets-ai/monorepo/issues"
|
|
14
14
|
},
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public"
|