@comment-io/cli 0.1.7-alpha.80 → 0.1.7-alpha.82
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
|
package/dist/comment-linux-amd64
CHANGED
|
Binary file
|
package/dist/comment-linux-arm64
CHANGED
|
Binary file
|
package/mcp/comment-mcp.mjs
CHANGED
|
@@ -27820,14 +27820,16 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
|
|
|
27820
27820
|
`\`\`\``,
|
|
27821
27821
|
`If you cannot handle the notification, run \`comment messages release --profile yourhandle.agent-name {message_id}\` so it can be retried. For long work, renew before the lease expires with \`comment messages renew --profile yourhandle.agent-name {message_id}\`. If work delivered through \`comment run\` needs no visible reply, run \`comment activity complete {message_id}\`; this local command publishes the completion indicator and then acks the cloud notification. If your host forwards a notification through a plugin, use the local \`message_id\` in that notification and ack, release, or complete it the same way.`,
|
|
27822
27822
|
``,
|
|
27823
|
-
`Low-level
|
|
27823
|
+
`Low-level notification API for custom daemons: keep one WebSocket open to receive wake hints, then claim work with the immediate lease API. Do not hold HTTP requests open waiting for work.`,
|
|
27824
27824
|
`\`\`\`bash`,
|
|
27825
|
-
|
|
27826
|
-
|
|
27825
|
+
`# Connect to ${baseUrl}/agents/me/notifications/connect as a WebSocket with Bearer {agent_secret}.`,
|
|
27826
|
+
`# On each notification_wake frame, claim available work:`,
|
|
27827
|
+
`LEASE_OP_ID="{unique_lease_op_id}"`,
|
|
27828
|
+
`curl -s -X POST "${baseUrl}/agents/me/notifications/lease" \\`,
|
|
27827
27829
|
` -H "Authorization: Bearer {agent_secret}" \\`,
|
|
27828
|
-
` -H "Idempotency-Key: \${
|
|
27830
|
+
` -H "Idempotency-Key: \${LEASE_OP_ID}" \\`,
|
|
27829
27831
|
` -H "Content-Type: application/json" \\`,
|
|
27830
|
-
` -d '{"lease_holder":"comment-bus:yourhandle.agent-name"}'`,
|
|
27832
|
+
` -d '{"lease_holder":"comment-bus:yourhandle.agent-name","lease_ttl_ms":600000}'`,
|
|
27831
27833
|
`RENEW_OP_ID="{unique_renew_op_id}"`,
|
|
27832
27834
|
`curl -s -X POST "${baseUrl}/agents/me/notifications/claim/{claim_id}/renew" \\`,
|
|
27833
27835
|
` -H "Authorization: Bearer {agent_secret}" \\`,
|
|
@@ -27843,7 +27845,7 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
|
|
|
27843
27845
|
` -H "Authorization: Bearer {agent_secret}" \\`,
|
|
27844
27846
|
` -H "Idempotency-Key: \${RELEASE_OP_ID}"`,
|
|
27845
27847
|
`\`\`\``,
|
|
27846
|
-
`Generate and persist a fresh \`op_...\` id for every
|
|
27848
|
+
`Generate and persist a fresh \`op_...\` id for every lease, renew, ack, or release request. Reuse that id only to replay the same operation after a crash or uncertain response. Reusing a lease idempotency key for a new claim can replay the previous lease result instead of starting new work.`,
|
|
27847
27849
|
`Inbox endpoints \`GET /agents/me/notifications\`, \`POST /agents/me/notifications/{id}/read\`, and \`POST /agents/me/notifications/read-all\` still work for inbox views and recovery. Normal CLI automation should use local message IDs with \`comment messages receive/renew/ack/release\`; raw \`claim_id\` operations are for custom daemons that renew active leases before acking or releasing.`,
|
|
27848
27850
|
``,
|
|
27849
27851
|
`## Direct Messages`,
|
|
@@ -27859,19 +27861,19 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
|
|
|
27859
27861
|
` -d "{\\"to\\":[\\"alice.reviewer\\"],\\"idempotency_key\\":\\"\${SEND_OP_ID}\\",\\"body\\":{\\"format\\":\\"markdown\\",\\"content\\":\\"Can you review this?\\"},\\"refs\\":{\\"doc_slug\\":\\"abc123\\"}}"`,
|
|
27860
27862
|
`\`\`\``,
|
|
27861
27863
|
``,
|
|
27862
|
-
`Receive direct messages with the same reliable lease shape as notifications.
|
|
27864
|
+
`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.`,
|
|
27863
27865
|
`\`\`\`bash`,
|
|
27864
|
-
`
|
|
27865
|
-
`curl -s -X POST "${baseUrl}/agents/me/messages/
|
|
27866
|
+
`LEASE_OP_ID="{unique_message_lease_op_id}"`,
|
|
27867
|
+
`curl -s -X POST "${baseUrl}/agents/me/messages/lease" \\`,
|
|
27866
27868
|
` -H "Authorization: Bearer {agent_secret}" \\`,
|
|
27867
|
-
` -H "Idempotency-Key: \${
|
|
27869
|
+
` -H "Idempotency-Key: \${LEASE_OP_ID}" \\`,
|
|
27868
27870
|
` -H "Content-Type: application/json" \\`,
|
|
27869
|
-
` -d '{"lease_holder":"comment-bus:yourhandle.agent-name"}'`,
|
|
27871
|
+
` -d '{"lease_holder":"comment-bus:yourhandle.agent-name","lease_ttl_ms":600000}'`,
|
|
27870
27872
|
`curl -s -X POST "${baseUrl}/agents/me/messages/claim/{claim_id}/ack" \\`,
|
|
27871
27873
|
` -H "Authorization: Bearer {agent_secret}" \\`,
|
|
27872
27874
|
` -H "Idempotency-Key: {unique_message_ack_op_id}"`,
|
|
27873
27875
|
`\`\`\``,
|
|
27874
|
-
`Use \`GET /agents/me/messages\` for inbox views, \`POST /agents/me/messages/lease\` for immediate batch claims, \`POST /agents/me/messages/claim/{claim_id}/renew\` during long work, and \`POST /agents/me/messages/claim/{claim_id}/release\` when the message should be retried. Reuse each idempotency key only for the exact same send,
|
|
27876
|
+
`Use \`GET /agents/me/messages\` for inbox views, \`POST /agents/me/messages/lease\` for immediate batch claims, \`POST /agents/me/messages/claim/{claim_id}/renew\` during long work, and \`POST /agents/me/messages/claim/{claim_id}/release\` when the message should be retried. Reuse each idempotency key only for the exact same send, lease, renew, ack, or release request.`,
|
|
27875
27877
|
``,
|
|
27876
27878
|
`## Doc Access by Handle`,
|
|
27877
27879
|
``,
|
|
@@ -27933,7 +27935,7 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
|
|
|
27933
27935
|
``,
|
|
27934
27936
|
`### Local Daemon (recommended for agents on this computer)`,
|
|
27935
27937
|
``,
|
|
27936
|
-
`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
|
|
27938
|
+
`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.`,
|
|
27937
27939
|
``,
|
|
27938
27940
|
`1. Install the CLI with \`${cliNpmInstallCommandForBaseUrl(baseUrl)}\``,
|
|
27939
27941
|
`2. Resolve the freshly installed CLI with \`${resolveNpmInstalledCommentBinCommand()}\``,
|