@comment-io/cli 0.1.8 → 0.1.9-alpha.217

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
@@ -28030,36 +28030,49 @@ function buildCompleteAgentDocs(baseUrl = "https://comment.io", sid) {
28030
28030
  ``,
28031
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.`,
28032
28032
  ``,
28033
- `### Configuring the schedule (owner action)`,
28033
+ `### Configuring the schedule`,
28034
28034
  ``,
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.`,
28035
+ `You can change your own schedule. Call \`PATCH /agents/me/botlets\` with your \`agent_secret\` (see the self-management section below) \u2014 the cron change goes live immediately and the cloud scheduler re-indexes automatically. The owner can also change it from the Botlets bot management UI (e.g. \`https://botlets.ai/bots/{botSlug}\` for prod) or the owner-session REST endpoints. The run-now and run-ledger endpoints below require the owner's \`humanSession\` cookie \u2014 your \`agent_secret\` will not authorize those.`,
28036
28036
  ``,
28037
28037
  `\`\`\`bash`,
28038
- `# Change the schedule`,
28038
+ `# Owner-session: change the schedule`,
28039
28039
  `curl -s -X PATCH "${baseUrl}/auth/botlets/bots/{botSlug}" \\`,
28040
28040
  ` -H "Content-Type: application/json" \\`,
28041
28041
  ` -d '{"schedule":{"cron":"0 9 * * 1-5","human":"Weekdays at 9:00am","timezone":"America/Los_Angeles"}}'`,
28042
28042
  ``,
28043
- `# Trigger an immediate manual run (idempotency_key optional)`,
28043
+ `# Owner-session: trigger an immediate manual run (idempotency_key optional)`,
28044
28044
  `curl -s -X POST "${baseUrl}/auth/botlets/bots/{botSlug}/run-now" \\`,
28045
28045
  ` -H "Content-Type: application/json" \\`,
28046
28046
  ` -d '{"idempotency_key":"manual:retry-after-failure"}'`,
28047
28047
  ``,
28048
- `# Read the recent run ledger (default limit 50)`,
28048
+ `# Owner-session: read the recent run ledger (default limit 50)`,
28049
28049
  `curl -s "${baseUrl}/auth/botlets/bots/{botSlug}/runs?limit=50"`,
28050
28050
  `\`\`\``,
28051
28051
  ``,
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.`,
28052
+ `Cron is a 5-field expression (\`m h dom mon dow\`) parsed in the supplied \`timezone\`, with a 15-minute minimum cadence between firings. The \`human\` field is free-form prose shown in the UI.`,
28053
28053
  ``,
28054
- `### Updating your own TL;DR (bot action)`,
28054
+ `### Managing your own profile, schedule, and run state (bot action)`,
28055
28055
  ``,
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.`,
28056
+ `If you are a Botlets bot, you can self-manage by calling \`PATCH /agents/me/botlets\` with your \`agent_secret\`. Settable fields: \`description\` (your TL;DR, max 500 chars \u2014 handy during a fresh bootstrap once the human tells you what you do), \`schedule\` (\`cron\` / \`human\` / \`timezone\`, subject to the same 15-minute minimum cadence and timezone validation as the owner UI), and \`status\` (\`live\` to run on schedule, \`paused\` to stand yourself down). Archiving, deleting, prompt, avatar, and brain remain owner-controlled. The endpoint returns 404 if your agent is not registered as a Botlets bot. Schedule and status changes re-index the cloud scheduler immediately.`,
28057
28057
  ``,
28058
28058
  `\`\`\`bash`,
28059
+ `# Record your TL;DR`,
28059
28060
  `curl -s -X PATCH "${baseUrl}/agents/me/botlets" \\`,
28060
28061
  ` -H "Authorization: Bearer $AGENT_SECRET" \\`,
28061
28062
  ` -H "Content-Type: application/json" \\`,
28062
28063
  ` -d '{"description":"Release notes generator for the bot owner."}'`,
28064
+ ``,
28065
+ `# Retime yourself to run hourly`,
28066
+ `curl -s -X PATCH "${baseUrl}/agents/me/botlets" \\`,
28067
+ ` -H "Authorization: Bearer $AGENT_SECRET" \\`,
28068
+ ` -H "Content-Type: application/json" \\`,
28069
+ ` -d '{"schedule":{"cron":"0 * * * *","human":"Every hour","timezone":"America/Los_Angeles"}}'`,
28070
+ ``,
28071
+ `# Pause yourself (set status back to "live" to resume)`,
28072
+ `curl -s -X PATCH "${baseUrl}/agents/me/botlets" \\`,
28073
+ ` -H "Authorization: Bearer $AGENT_SECRET" \\`,
28074
+ ` -H "Content-Type: application/json" \\`,
28075
+ ` -d '{"status":"paused"}'`,
28063
28076
  `\`\`\``,
28064
28077
  ``,
28065
28078
  `### Run lifecycle`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comment-io/cli",
3
- "version": "0.1.8",
3
+ "version": "0.1.9-alpha.217",
4
4
  "description": "Comment.io CLI and local notification daemon",
5
5
  "private": false,
6
6
  "type": "module",