@waitroom-io/cli 0.0.3 → 0.0.5
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 +145 -0
- package/dist/index.js +6 -2
- package/package.json +12 -13
package/README.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# @waitroom-io/cli
|
|
2
|
+
|
|
3
|
+
Command-line interface for [Waitroom](https://waitroom.io) — the coordination layer between AI agents and humans.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @waitroom-io/cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Initialize project config
|
|
15
|
+
wr init
|
|
16
|
+
|
|
17
|
+
# Self-register as an agent
|
|
18
|
+
wr auth self-register --name "my-agent"
|
|
19
|
+
|
|
20
|
+
# Or log in with an existing API key
|
|
21
|
+
wr auth login --key wr_abc123...
|
|
22
|
+
|
|
23
|
+
# Check identity
|
|
24
|
+
wr auth whoami
|
|
25
|
+
|
|
26
|
+
# Create a check-in and wait for approval
|
|
27
|
+
wr checkin create general --action "Deploy to production" --risk high --wait
|
|
28
|
+
|
|
29
|
+
# List pending check-ins
|
|
30
|
+
wr checkin pending general
|
|
31
|
+
|
|
32
|
+
# View agent dashboard
|
|
33
|
+
wr home
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Commands
|
|
37
|
+
|
|
38
|
+
| Command | Description |
|
|
39
|
+
|---------|-------------|
|
|
40
|
+
| `wr init` | Initialize `.waitroom/` in current directory |
|
|
41
|
+
| `wr auth` | Login, self-register, whoami, claim-token, logout |
|
|
42
|
+
| `wr checkin` | Create, status, approve, reject, modify, withdraw, pending |
|
|
43
|
+
| `wr room` | List, get, create, update, delete rooms |
|
|
44
|
+
| `wr policy` | Get, set, add-rule, set-thresholds |
|
|
45
|
+
| `wr agent` | List, get, me, claim, register, update, delete, regen-key |
|
|
46
|
+
| `wr trust` | View trust scores for an agent |
|
|
47
|
+
| `wr signal` | Broadcast a signal to a room |
|
|
48
|
+
| `wr watch` | Create, remove, or stream room events (SSE) |
|
|
49
|
+
| `wr audit` | Query the audit log |
|
|
50
|
+
| `wr home` | Agent dashboard summary |
|
|
51
|
+
| `wr config` | Get, set, list configuration |
|
|
52
|
+
|
|
53
|
+
## Global Flags
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
-j, --json Output as JSON
|
|
57
|
+
-f, --format <fmt> Output format: table, json, compact, jsonl
|
|
58
|
+
-p, --profile <name> Credential profile to use
|
|
59
|
+
--api-url <url> API base URL
|
|
60
|
+
--api-key <key> API key (overrides stored credentials)
|
|
61
|
+
--no-color Disable color output
|
|
62
|
+
-v, --verbose Verbose output
|
|
63
|
+
-q, --quiet Suppress non-essential output
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Output format auto-detects: `table` in a TTY, `json` when piped.
|
|
67
|
+
|
|
68
|
+
## Configuration
|
|
69
|
+
|
|
70
|
+
`wr init` creates a `.waitroom/` directory:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
.waitroom/
|
|
74
|
+
config.yaml # Project config (commit this)
|
|
75
|
+
credentials.yaml # Keys & tokens (gitignored, 0600 perms)
|
|
76
|
+
hooks/ # Event hook scripts
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Precedence:** CLI flags > env vars (`WAITROOM_API_KEY`, `WAITROOM_API_URL`) > project config > global config (`~/.config/waitroom/`) > defaults.
|
|
80
|
+
|
|
81
|
+
### config.yaml
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
version: 1
|
|
85
|
+
api_url: http://localhost:3001
|
|
86
|
+
defaults:
|
|
87
|
+
room: general
|
|
88
|
+
risk_level: medium
|
|
89
|
+
format: table
|
|
90
|
+
beads:
|
|
91
|
+
enabled: true
|
|
92
|
+
auto_link: true
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Profiles
|
|
96
|
+
|
|
97
|
+
Store multiple credentials and switch between them:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
wr auth login --key wr_abc... --name production
|
|
101
|
+
wr auth login --key wr_xyz... --name staging
|
|
102
|
+
wr checkin create general --action "test" --profile staging
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Hooks
|
|
106
|
+
|
|
107
|
+
Place executable scripts in `.waitroom/hooks/` to react to events. Scripts receive JSON on stdin:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# .waitroom/hooks/on-checkin-decided.sh
|
|
111
|
+
EVENT=$(cat)
|
|
112
|
+
STATUS=$(echo "$EVENT" | jq -r '.data.status')
|
|
113
|
+
echo "Check-in was $STATUS"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Beads Interop
|
|
117
|
+
|
|
118
|
+
Cross-reference [beads](https://github.com/steveyegge/beads) issues with check-ins:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Explicit reference
|
|
122
|
+
wr checkin create general --action "Fix bug" --bead bd-a1b2
|
|
123
|
+
|
|
124
|
+
# Auto-link when .beads/ exists and beads.auto_link is true
|
|
125
|
+
wr checkin create general --action "Fix bug"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Pipe-Friendly
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Get first pending check-in ID
|
|
132
|
+
wr checkin pending general --json | jq '.[0].id'
|
|
133
|
+
|
|
134
|
+
# Export audit log as JSONL
|
|
135
|
+
wr audit --format jsonl > audit.jsonl
|
|
136
|
+
|
|
137
|
+
# Approve from a script
|
|
138
|
+
wr checkin approve ci_abc123 --json
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Links
|
|
142
|
+
|
|
143
|
+
- [Documentation](https://waitroom.io/docs)
|
|
144
|
+
- [SDK](https://www.npmjs.com/package/@waitroom-io/sdk)
|
|
145
|
+
- [GitHub](https://github.com/anthropics/waitroom)
|
package/dist/index.js
CHANGED
|
@@ -4122,11 +4122,13 @@ var createRoomSchema = external_exports.object({
|
|
|
4122
4122
|
name: external_exports.string().min(1).max(200),
|
|
4123
4123
|
slug: external_exports.string().min(1).max(100).regex(/^[a-z0-9-]+$/, "Slug must be lowercase alphanumeric with hyphens").optional(),
|
|
4124
4124
|
description: external_exports.string().max(2e3).optional(),
|
|
4125
|
+
agent_instructions: external_exports.string().max(5e3).optional(),
|
|
4125
4126
|
policies: roomPoliciesSchema.partial().optional()
|
|
4126
4127
|
});
|
|
4127
4128
|
var updateRoomSchema = external_exports.object({
|
|
4128
4129
|
name: external_exports.string().min(1).max(200).optional(),
|
|
4129
|
-
description: external_exports.string().max(2e3).nullable().optional()
|
|
4130
|
+
description: external_exports.string().max(2e3).nullable().optional(),
|
|
4131
|
+
agent_instructions: external_exports.string().max(5e3).nullable().optional()
|
|
4130
4132
|
}).refine((obj) => Object.keys(obj).length > 0, "At least one field must be provided");
|
|
4131
4133
|
var updatePoliciesSchema = external_exports.object({
|
|
4132
4134
|
policies: roomPoliciesSchema
|
|
@@ -9186,11 +9188,13 @@ var createRoomSchema2 = external_exports2.object({
|
|
|
9186
9188
|
name: external_exports2.string().min(1).max(200),
|
|
9187
9189
|
slug: external_exports2.string().min(1).max(100).regex(/^[a-z0-9-]+$/, "Slug must be lowercase alphanumeric with hyphens").optional(),
|
|
9188
9190
|
description: external_exports2.string().max(2e3).optional(),
|
|
9191
|
+
agent_instructions: external_exports2.string().max(5e3).optional(),
|
|
9189
9192
|
policies: roomPoliciesSchema2.partial().optional()
|
|
9190
9193
|
});
|
|
9191
9194
|
var updateRoomSchema2 = external_exports2.object({
|
|
9192
9195
|
name: external_exports2.string().min(1).max(200).optional(),
|
|
9193
|
-
description: external_exports2.string().max(2e3).nullable().optional()
|
|
9196
|
+
description: external_exports2.string().max(2e3).nullable().optional(),
|
|
9197
|
+
agent_instructions: external_exports2.string().max(5e3).nullable().optional()
|
|
9194
9198
|
}).refine((obj) => Object.keys(obj).length > 0, "At least one field must be provided");
|
|
9195
9199
|
var updatePoliciesSchema2 = external_exports2.object({
|
|
9196
9200
|
policies: roomPoliciesSchema2
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waitroom-io/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Waitroom CLI — coordination layer between AI agents and humans",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,13 +10,6 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"dist"
|
|
12
12
|
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "tsup",
|
|
15
|
-
"typecheck": "tsc --noEmit",
|
|
16
|
-
"test": "vitest run",
|
|
17
|
-
"clean": "rm -rf dist",
|
|
18
|
-
"prepublishOnly": "pnpm build"
|
|
19
|
-
},
|
|
20
13
|
"keywords": [
|
|
21
14
|
"waitroom",
|
|
22
15
|
"cli",
|
|
@@ -33,13 +26,19 @@
|
|
|
33
26
|
"eventsource": "^3.0.0"
|
|
34
27
|
},
|
|
35
28
|
"devDependencies": {
|
|
36
|
-
"@waitroom-io/sdk": "workspace:*",
|
|
37
|
-
"@waitroom-io/shared": "workspace:*",
|
|
38
29
|
"@types/node": "^22.10.7",
|
|
39
|
-
"@waitroom/tsconfig": "workspace:*",
|
|
40
30
|
"tsup": "^8.0.0",
|
|
41
31
|
"tsx": "^4.19.2",
|
|
42
32
|
"typescript": "^5.7.3",
|
|
43
|
-
"vitest": "^2.1.8"
|
|
33
|
+
"vitest": "^2.1.8",
|
|
34
|
+
"@waitroom-io/sdk": "0.0.5",
|
|
35
|
+
"@waitroom-io/tsconfig": "0.0.0",
|
|
36
|
+
"@waitroom-io/shared": "0.0.1"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsup",
|
|
40
|
+
"typecheck": "tsc --noEmit",
|
|
41
|
+
"test": "vitest run",
|
|
42
|
+
"clean": "rm -rf dist"
|
|
44
43
|
}
|
|
45
|
-
}
|
|
44
|
+
}
|