@gracefultools/astrid-sdk 0.8.2 → 1.0.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 (88) hide show
  1. package/README.md +173 -127
  2. package/dist/bin.d.ts +3 -0
  3. package/dist/bin.d.ts.map +1 -0
  4. package/dist/bin.js +13 -0
  5. package/dist/bin.js.map +1 -0
  6. package/dist/cli.d.ts +41 -0
  7. package/dist/cli.d.ts.map +1 -0
  8. package/dist/cli.js +361 -0
  9. package/dist/cli.js.map +1 -0
  10. package/dist/client.d.ts +89 -0
  11. package/dist/client.d.ts.map +1 -0
  12. package/dist/client.js +216 -0
  13. package/dist/client.js.map +1 -0
  14. package/dist/config/api-base.d.ts +21 -0
  15. package/dist/config/api-base.d.ts.map +1 -0
  16. package/dist/config/api-base.js +41 -0
  17. package/dist/config/api-base.js.map +1 -0
  18. package/dist/index.d.ts +13 -9
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +22 -57
  21. package/dist/index.js.map +1 -1
  22. package/dist/types.d.ts +103 -0
  23. package/dist/types.d.ts.map +1 -0
  24. package/dist/types.js +7 -0
  25. package/dist/types.js.map +1 -0
  26. package/dist/verdict.d.ts +88 -0
  27. package/dist/verdict.d.ts.map +1 -0
  28. package/dist/verdict.js +90 -0
  29. package/dist/verdict.js.map +1 -0
  30. package/package.json +56 -65
  31. package/dist/adapters/astrid-oauth.d.ts +0 -114
  32. package/dist/adapters/astrid-oauth.d.ts.map +0 -1
  33. package/dist/adapters/astrid-oauth.js +0 -287
  34. package/dist/adapters/astrid-oauth.js.map +0 -1
  35. package/dist/channel/channel.d.ts +0 -33
  36. package/dist/channel/channel.d.ts.map +0 -1
  37. package/dist/channel/channel.js +0 -90
  38. package/dist/channel/channel.js.map +0 -1
  39. package/dist/channel/index.d.ts +0 -13
  40. package/dist/channel/index.d.ts.map +0 -1
  41. package/dist/channel/index.js +0 -23
  42. package/dist/channel/index.js.map +0 -1
  43. package/dist/channel/message-formatter.d.ts +0 -14
  44. package/dist/channel/message-formatter.d.ts.map +0 -1
  45. package/dist/channel/message-formatter.js +0 -71
  46. package/dist/channel/message-formatter.js.map +0 -1
  47. package/dist/channel/oauth-client.d.ts +0 -15
  48. package/dist/channel/oauth-client.d.ts.map +0 -1
  49. package/dist/channel/oauth-client.js +0 -45
  50. package/dist/channel/oauth-client.js.map +0 -1
  51. package/dist/channel/rest-client.d.ts +0 -16
  52. package/dist/channel/rest-client.d.ts.map +0 -1
  53. package/dist/channel/rest-client.js +0 -66
  54. package/dist/channel/rest-client.js.map +0 -1
  55. package/dist/channel/session-mapper.d.ts +0 -14
  56. package/dist/channel/session-mapper.d.ts.map +0 -1
  57. package/dist/channel/session-mapper.js +0 -37
  58. package/dist/channel/session-mapper.js.map +0 -1
  59. package/dist/channel/sse-client.d.ts +0 -33
  60. package/dist/channel/sse-client.d.ts.map +0 -1
  61. package/dist/channel/sse-client.js +0 -204
  62. package/dist/channel/sse-client.js.map +0 -1
  63. package/dist/channel/types.d.ts +0 -65
  64. package/dist/channel/types.d.ts.map +0 -1
  65. package/dist/channel/types.js +0 -3
  66. package/dist/channel/types.js.map +0 -1
  67. package/dist/config/agent-workflow.d.ts +0 -78
  68. package/dist/config/agent-workflow.d.ts.map +0 -1
  69. package/dist/config/agent-workflow.js +0 -217
  70. package/dist/config/agent-workflow.js.map +0 -1
  71. package/dist/config/index.d.ts +0 -194
  72. package/dist/config/index.d.ts.map +0 -1
  73. package/dist/config/index.js +0 -284
  74. package/dist/config/index.js.map +0 -1
  75. package/dist/deploy/vercel.d.ts +0 -27
  76. package/dist/deploy/vercel.d.ts.map +0 -1
  77. package/dist/deploy/vercel.js +0 -268
  78. package/dist/deploy/vercel.js.map +0 -1
  79. package/dist/types/index.d.ts +0 -157
  80. package/dist/types/index.d.ts.map +0 -1
  81. package/dist/types/index.js +0 -6
  82. package/dist/types/index.js.map +0 -1
  83. package/dist/utils/agent-config.d.ts +0 -56
  84. package/dist/utils/agent-config.d.ts.map +0 -1
  85. package/dist/utils/agent-config.js +0 -138
  86. package/dist/utils/agent-config.js.map +0 -1
  87. package/templates/.astrid.config.json +0 -60
  88. package/templates/ASTRID.template.md +0 -74
package/README.md CHANGED
@@ -1,127 +1,173 @@
1
- # @gracefultools/astrid-sdk
2
-
3
- SDK for integrating AI agents with [Astrid.cc](https://www.astrid.cc) task management.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install @gracefultools/astrid-sdk
9
- ```
10
-
11
- ## What's Included
12
-
13
- ### OAuth API Client
14
- Full Astrid REST API client with OAuth2 client_credentials flow:
15
-
16
- ```typescript
17
- import { AstridOAuthClient } from '@gracefultools/astrid-sdk'
18
-
19
- const client = new AstridOAuthClient({
20
- clientId: 'your-client-id',
21
- clientSecret: 'your-client-secret',
22
- })
23
-
24
- // Get assigned tasks
25
- const tasks = await client.getTasks({ completed: false })
26
-
27
- // Post a comment
28
- await client.addComment(taskId, 'Working on this now...')
29
-
30
- // Complete a task
31
- await client.updateTask(taskId, { completed: true })
32
- ```
33
-
34
- ### OpenClaw Channel Plugin
35
- Connect [OpenClaw](https://openclaw.ai) to Astrid as a task channel. Your agent receives tasks via SSE (outbound connection — works behind NAT/firewalls):
36
-
37
- ```typescript
38
- import { AstridChannel, SSEClient, RestClient, SessionMapper, taskToMessage } from '@gracefultools/astrid-sdk'
39
- ```
40
-
41
- #### How it works
42
-
43
- 1. Agent connects **outbound** to `astrid.cc/api/v1/agent/events` (SSE)
44
- 2. When a task is assigned → agent receives it in real-time
45
- 3. **List description = agent instructions** — each list's description tells the agent how to handle tasks
46
- 4. Agent posts results as task comments
47
- 5. Agent marks task complete when done
48
-
49
- #### Quick Setup
50
-
51
- Add to your OpenClaw config:
52
-
53
- ```json5
54
- {
55
- channels: {
56
- astrid: {
57
- enabled: true,
58
- clientId: "your-client-id",
59
- clientSecret: "your-client-secret"
60
- }
61
- }
62
- }
63
- ```
64
-
65
- ### Agent Protocol
66
-
67
- The SDK uses the Astrid Agent Protocol:
68
-
69
- | Endpoint | Method | Description |
70
- |----------|--------|-------------|
71
- | `/api/v1/agent/events` | GET | SSE stream (task.assigned, task.commented, etc.) |
72
- | `/api/v1/agent/tasks` | GET | List assigned tasks |
73
- | `/api/v1/agent/tasks/:id` | GET/PATCH | Get or update a task |
74
- | `/api/v1/agent/tasks/:id/comments` | GET/POST | Read or post comments |
75
-
76
- All endpoints require OAuth Bearer token with appropriate scopes.
77
-
78
- ### List Descriptions as Agent Instructions
79
-
80
- Each Astrid list's **description** field serves as instructions for AI agents:
81
-
82
- ```markdown
83
- # Example "Code Reviews" list description:
84
- Review PRs for security issues, test coverage, and style.
85
- Post findings as comments. Mark complete when done.
86
- ```
87
-
88
- When an agent receives a task from this list, the description is included as context. Different lists = different agent behaviors. No code changes needed.
89
-
90
- ## Configuration
91
-
92
- ### Agent Config
93
- ```typescript
94
- import { getAgentConfig, isRegisteredAgent } from '@gracefultools/astrid-sdk'
95
-
96
- // Check if an email is a registered agent
97
- isRegisteredAgent('claude@astrid.cc') // true
98
- isRegisteredAgent('mybot.oc@astrid.cc') // true (OpenClaw pattern)
99
-
100
- // Get agent configuration
101
- const config = getAgentConfig('claude@astrid.cc')
102
- ```
103
-
104
- ### Workflow Config
105
- ```typescript
106
- import { getAgentWorkflowConfig, buildWorkflowInstructions } from '@gracefultools/astrid-sdk'
107
-
108
- const config = getAgentWorkflowConfig(task, list, repository)
109
- const instructions = buildWorkflowInstructions(config)
110
- ```
111
-
112
- ## Changelog
113
-
114
- ### 0.8.0
115
- - **Channel plugin**: OpenClaw integration via outbound SSE (no inbound gateway needed)
116
- - **Agent protocol**: SSE events, REST client, session mapper, message formatter
117
- - **Removed**: Built-in AI executors (Claude, OpenAI, Gemini) — agents run externally now
118
- - **Security**: Per-endpoint OAuth scope enforcement, comment rate limiting
119
-
120
- ### 0.7.x
121
- - OAuth API client
122
- - Agent workflow configuration
123
- - Vercel deployment support
124
-
125
- ## License
126
-
127
- MIT
1
+ # @gracefultools/astrid-sdk
2
+
3
+ The Astrid agent runner: the `astrid-agent` command that a scheduler or a CI job
4
+ runs to check for work, claim it and give it back, plus the typed REST client
5
+ that command is built on.
6
+
7
+ It is **not** a library for building agents. Your agent is whatever harness you
8
+ already run (Claude Code, Copilot CLI, Codex, your own service). This package
9
+ answers three questions around it: is there work, is it mine, and what happens
10
+ if the run dies.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ npm install -g @gracefultools/astrid-sdk # puts astrid-agent on PATH
16
+ # or, in a CI step:
17
+ npx -p @gracefultools/astrid-sdk astrid-agent queue --agent claude
18
+ ```
19
+
20
+ Node 18 or later.
21
+
22
+ ## Credentials
23
+
24
+ Read from the environment and never printed:
25
+
26
+ | Variable | Meaning |
27
+ |---|---|
28
+ | `ASTRID_TOKEN` | An agent-bound token (`astrid_mcp_…` or an agent consent token), sent as `Authorization: Bearer`. Preferred. Writes are signed as that agent, and the claim route knows which agent is claiming. |
29
+ | `ASTRID_CLIENT_ID`, `ASTRID_CLIENT_SECRET` | OAuth client credentials, exchanged for a one-hour token and sent as `X-OAuth-Token`. `ASTRID_OAUTH_CLIENT_ID` and `ASTRID_OAUTH_CLIENT_SECRET` work too. |
30
+ | `ASTRID_API_URL` | Server origin. Default `https://www.astrid.cc`. `--origin` overrides it. |
31
+
32
+ ## The command
33
+
34
+ Exit codes are the interface, so a shell `if` or a workflow `if:` can branch on them.
35
+
36
+ ### `astrid-agent queue`
37
+
38
+ ```bash
39
+ astrid-agent queue --agent <mailbox> [--list <listId>] [--include-unassigned] \
40
+ [--seen <file> [--write-seen]]
41
+ ```
42
+
43
+ Reads `GET /api/v1/agent-queue` and decides whether a run should start.
44
+
45
+ | Exit | Meaning |
46
+ |---|---|
47
+ | 0 | There is work: a Ready task, or a reply nobody has answered that this runner has not already woken for. Start a run. |
48
+ | 3 | Nothing to do. Skip this tick. |
49
+ | 1 | Could not tell (network, auth, server error). **Never treat this as idle.** |
50
+
51
+ stdout is one JSON document (`work`, `reason`, `summary`, `wakeKeys`, `snapshot`),
52
+ so you can pipe it to `jq`. The one-line `QUEUE:` summary goes to stderr.
53
+
54
+ Waking is bounded. `--seen <file>` holds the reply keys that have already woken
55
+ a run, and a key in that file does not wake another. `--write-seen` saves the
56
+ current keys after the decision. Ready tasks are never muted this way: a Ready
57
+ task stays work until someone moves it.
58
+
59
+ ### `astrid-agent claim <taskId>`
60
+
61
+ ```bash
62
+ astrid-agent claim <taskId> [--agent <mailbox>] [--resume] [--lease-seconds <n>]
63
+ astrid-agent claim <taskId> --fixall [--agent <mailbox>] [--list <listId>]
64
+ ```
65
+
66
+ An atomic claim through `POST /api/v1/tasks/:id/claim`
67
+ ([contract](https://github.com/Graceful-Tools/astrid-web/blob/main/docs/AGENT_CLAIM_API.md)),
68
+ on any board. The claim holds a lease (15 minutes, or `--lease-seconds` from 60
69
+ to 3600): run `astrid-agent heartbeat` while you work, or the task returns to
70
+ Ready. With client credentials, `--agent` names the agent you claim for.
71
+ `--resume` checks that a Doing claim still belongs to you after a restart.
72
+ `--fixall` claims through `/claim-fixall` instead: that route serves Astrid's
73
+ own scheduled loops on its allowlisted boards and accepts client credentials.
74
+ If `ASTRID_FIXALL_CLAIMS_FILE` is set, each claimed id is appended to it, so the
75
+ runner can release leftover claims after the run.
76
+
77
+ | Exit | Meaning |
78
+ |---|---|
79
+ | 0 | Claimed (or, with `--resume`, still yours). Start the task. |
80
+ | 2 | Another worker has it, or it is no longer Ready. Move on to the next task. |
81
+ | 1 | Error, including a server too old to have the claim API. |
82
+
83
+ A claim that answers `already_yours` exits 2: another worker on the same mailbox
84
+ holds the task.
85
+
86
+ ### `astrid-agent heartbeat <taskId>`
87
+
88
+ ```bash
89
+ astrid-agent heartbeat <taskId> [--agent <mailbox>] [--lease-seconds <n>]
90
+ ```
91
+
92
+ Renews your claim lease. Send it every few minutes while working. Exit 0
93
+ renewed; 2 the claim is gone (the lease expired and the task went back to
94
+ Ready, or someone else holds it), so stop work; 1 error.
95
+
96
+ ### `astrid-agent release <taskId>`
97
+
98
+ ```bash
99
+ astrid-agent release <taskId> [--agent <mailbox>] [--comment <text>]
100
+ ```
101
+
102
+ Gives a Doing claim back: the task returns to Ready and this agent is
103
+ unassigned. `--comment` posts the reason first. Exit 0 released, 2 not your
104
+ Doing claim, 1 error.
105
+
106
+ ### Example: a GitHub Actions gate
107
+
108
+ ```yaml
109
+ - name: Is there work?
110
+ id: queue
111
+ env:
112
+ ASTRID_TOKEN: ${{ secrets.ASTRID_CLAUDE_MCP_TOKEN }}
113
+ run: |
114
+ set +e
115
+ npx -y -p @gracefultools/astrid-sdk@1 astrid-agent queue --agent claude > queue.json
116
+ code=$?
117
+ case $code in
118
+ 0) echo "has-work=true" >> "$GITHUB_OUTPUT" ;;
119
+ 3) echo "has-work=false" >> "$GITHUB_OUTPUT" ;;
120
+ *) exit 1 ;; # could not tell: fail loudly, never skip silently
121
+ esac
122
+ ```
123
+
124
+ ## The client
125
+
126
+ ```ts
127
+ import { AstridClient } from '@gracefultools/astrid-sdk'
128
+
129
+ const astrid = new AstridClient({ auth: { token: process.env.ASTRID_TOKEN! } })
130
+
131
+ const snapshot = await astrid.getQueue({ agent: 'claude', listId })
132
+ for (const task of snapshot.queue) {
133
+ const claim = await astrid.claimTask(task.id, { action: 'claim' })
134
+ if (claim.outcome !== 'claimed') continue
135
+ // ...run your harness...
136
+ await astrid.addComment(task.id, 'Done: ...')
137
+ }
138
+ ```
139
+
140
+ | Method | Endpoint |
141
+ |---|---|
142
+ | `getQueue({ agent, listId?, includeUnassigned? })` | `GET /api/v1/agent-queue` |
143
+ | `claimTask(id, { action, agentMailbox?, leaseSeconds? })` | `POST /api/v1/tasks/:id/claim`. Returns every documented outcome; `outcome: 'unavailable'` when the route is absent. |
144
+ | `heartbeatTask(id, { agentMailbox?, leaseSeconds? })` | the same route, `action: 'heartbeat'`; `outcome: 'renewed'` means keep going |
145
+ | `releaseTask(id, agentMailbox?)` | the same route, `action: 'release'` |
146
+ | `claimFixallTask(id, { action, agent?, listId?, commentWatermark? })` | `POST /api/v1/tasks/:id/claim-fixall` |
147
+ | `getTask(id)`, `getComments(id)` | `GET /api/v1/tasks/:id`, `…/comments` |
148
+ | `addComment(id, content, { aiAgentId? })` | `POST /api/v1/tasks/:id/comments` |
149
+ | `setStatus(id, statusRole)` | `PUT /api/v1/tasks/:id` |
150
+ | `handBack(id, personId)` | `PUT /api/v1/tasks/:id` with `{ statusRole: null, assigneeId }`: back to that person's Inbox |
151
+
152
+ A refused request throws `AstridApiError`, with `status` and the server's reason.
153
+ `decideQueueVerdict` and `wakeKeys` are exported too: they hold the wake rule
154
+ that `astrid-agent queue` applies.
155
+
156
+ ## Upgrading from 0.x
157
+
158
+ 1.0.0 removes the library half of the package:
159
+
160
+ | Removed | Replacement |
161
+ |---|---|
162
+ | `AstridChannel`, `SSEClient`, `ChannelRestClient`, `ChannelOAuthClient`, `SessionMapper`, message formatters | Moved to `@gracefultools/openclaw-astrid-channel`, which was their only user. |
163
+ | `AstridOAuthClient` | `AstridClient`. Its `claimTask` returns `{ status, outcome, task }`. |
164
+ | `deployToVercel`, `isVercelConfigured` | None. Deploy with your own tooling. |
165
+ | `loadAstridConfig`, `getAgentWorkflowConfig`, `.astrid.config.json` templates, platform detection | None. These belonged to the removed built-in executors. |
166
+ | `AI_AGENT_CONFIG`, `getAgentModel` and the agent registry | None. Ask the server (`/api/v1/users/me/available-agents`). |
167
+ | Executor types (`CodeGenerationRequest`, `ImplementationPlan`, …) | None. |
168
+
169
+ 0.8.x stays on npm for anyone who still needs it (`npm install @gracefultools/astrid-sdk@0.8`).
170
+
171
+ ## License
172
+
173
+ MIT
package/dist/bin.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
package/dist/bin.js ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const cli_js_1 = require("./cli.js");
5
+ (0, cli_js_1.runCli)(process.argv.slice(2), {
6
+ env: process.env,
7
+ stdout: line => process.stdout.write(`${line}\n`),
8
+ stderr: line => process.stderr.write(`${line}\n`),
9
+ }).then(code => { process.exitCode = code; }, error => {
10
+ process.stderr.write(`astrid-agent: ${error instanceof Error ? error.message : String(error)}\n`);
11
+ process.exitCode = 1;
12
+ });
13
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";;;AACA,qCAAiC;AAEjC,IAAA,eAAM,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IAC5B,GAAG,EAAE,OAAO,CAAC,GAAG;IAChB,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC;IACjD,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC;CAClD,CAAC,CAAC,IAAI,CACL,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAA,CAAC,CAAC,EACnC,KAAK,CAAC,EAAE;IACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACjG,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAA;AACtB,CAAC,CACF,CAAA"}
package/dist/cli.d.ts ADDED
@@ -0,0 +1,41 @@
1
+ /**
2
+ * `astrid-agent`: the runner command a scheduler or a GitHub Actions job calls.
3
+ * Its exit codes are the interface:
4
+ *
5
+ * queue 0 there is work, start a run
6
+ * 3 nothing to do, skip this tick
7
+ * 1 could not tell (network, auth); never treat this as idle
8
+ * claim 0 claimed, start the task
9
+ * heartbeat 0 lease renewed, keep working
10
+ * release 0 released
11
+ * 2 someone else has it, or it is no longer eligible; move on
12
+ * 1 error
13
+ *
14
+ * These match astrid-web's scripts/agent-queue-status.ts and
15
+ * scripts/claim-fixall-task.ts, which this command is meant to replace.
16
+ *
17
+ * Credentials come from the environment and are never printed:
18
+ * ASTRID_TOKEN an agent-bound token (preferred)
19
+ * ASTRID_CLIENT_ID + ASTRID_CLIENT_SECRET client credentials
20
+ * (ASTRID_OAUTH_CLIENT_ID / ASTRID_OAUTH_CLIENT_SECRET are accepted too)
21
+ * ASTRID_API_URL the server origin
22
+ */
23
+ export declare const EXIT: {
24
+ /** Work to do / the write succeeded. */
25
+ readonly WORK: 0;
26
+ readonly ERROR: 1;
27
+ /** Claim or release refused: another worker has it, or it is not eligible. */
28
+ readonly CONFLICT: 2;
29
+ /** The queue is idle. */
30
+ readonly IDLE: 3;
31
+ };
32
+ export interface CliIO {
33
+ env: Record<string, string | undefined>;
34
+ fetch?: typeof fetch;
35
+ stdout: (line: string) => void;
36
+ stderr: (line: string) => void;
37
+ }
38
+ export declare const USAGE = "Usage: astrid-agent <command> [options]\n\nCommands:\n queue --agent <mailbox> [--list <listId>] [--include-unassigned]\n [--seen <file> [--write-seen]] [--require-polling]\n Print the queue verdict as JSON. Exit 0 work, 3 idle, 1 could not tell.\n --require-polling exits 1 unless the agent is in polling mode.\n claim <taskId> [--agent <mailbox>] [--resume] [--lease-seconds <n>]\n Atomic claim (POST /api/v1/tasks/:id/claim). Exit 0 claimed, 2 taken, 1 error.\n The claim holds a lease (15 min by default): heartbeat while you work.\n heartbeat <taskId> [--agent <mailbox>] [--lease-seconds <n>]\n Renew the claim lease. Exit 0 renewed, 2 the claim is gone (stop), 1 error.\n claim <taskId> --fixall [--agent <mailbox>] [--list <listId>]\n Claim through /claim-fixall (Astrid's allowlisted boards).\n claim <taskId> --fixall --resume --watermark <commentId>\n [--resume-context <json> | --resume-context-file <path>] [--agent <mailbox>] [--list <listId>]\n Answer a human reply to your own handback.\n release <taskId> [--agent <mailbox>] [--comment <text>]\n Give a Doing claim back to Ready. Exit 0 released, 2 not yours, 1 error.\n\nOptions:\n --origin <url> Server origin (default: ASTRID_API_URL, then production)\n -h, --help Show this help\n -v, --version Show the version\n\nEnvironment:\n ASTRID_TOKEN, or ASTRID_CLIENT_ID and ASTRID_CLIENT_SECRET";
39
+ /** Runs one command and resolves to its exit code. Never calls process.exit. */
40
+ export declare function runCli(argv: string[], io: CliIO): Promise<number>;
41
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAQH,eAAO,MAAM,IAAI;IACf,wCAAwC;;;IAGxC,8EAA8E;;IAE9E,yBAAyB;;CAEjB,CAAA;AAEV,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IACvC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;IACpB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B;AAED,eAAO,MAAM,KAAK,09CA0B2C,CAAA;AA0P7D,gFAAgF;AAChF,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAyCvE"}