@lambdacurry/arbor 0.1.0
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 +56 -0
- package/dist/arbor.js +16881 -0
- package/package.json +48 -0
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# @lambdacurry/arbor
|
|
2
|
+
|
|
3
|
+
The **Arbor CLI** — a shared workspace for people and agents. It's the human + headless-agent write path over Arbor's one guarded operation surface: every command resolves your identity from your token server-side (the CLI never asserts who you are) and runs through the same `/api` operations the web app and MCP clients use.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
No install required — run it on demand:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @lambdacurry/arbor whoami
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
…or install it globally:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm i -g @lambdacurry/arbor
|
|
17
|
+
arbor whoami
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Authenticate
|
|
21
|
+
|
|
22
|
+
Point the CLI at your Arbor instance and give it a credential — a personal access token (acts as you) or an agent key (acts as the agent). Either works headlessly via env, or persist it:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Headless (CI / agents): env only, no stored config
|
|
26
|
+
ARBOR_API_URL=https://your-arbor.example ARBOR_TOKEN=<token> arbor inbox
|
|
27
|
+
|
|
28
|
+
# …or persist it to ~/.arbor/config.json (chmod 600)
|
|
29
|
+
arbor auth <token> --url https://your-arbor.example
|
|
30
|
+
arbor whoami
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Agent self-registration (AD-109)
|
|
34
|
+
|
|
35
|
+
An agent can register *itself* with a device-code-style handshake. A human mints a one-time **pairing key** in the Arbor web app (Settings → "Have an agent register itself") and hands it to the agent. The agent then:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx @lambdacurry/arbor connect <pairing-key>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This prints a URL + short code to relay to the human, who approves it in their logged-in session. On approval the agent receives its own key (saved to `~/.arbor/config.json`) and acts as a managed, collaborate-only member of the org thereafter.
|
|
42
|
+
|
|
43
|
+
## Output contract (agent-friendly)
|
|
44
|
+
|
|
45
|
+
Every command takes `--json` to emit a stable `{ ok, data | error, meta }` envelope on stdout (with structured error codes and agent-mode exit codes); advisory/human text goes to stderr. `--quiet` (auto under `--json` or a pipe) silences the advisory stream. `--fields a,b,list:N` projects a result; `--limit`/`--cursor` paginate list commands.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
arbor inbox --json --limit 20
|
|
49
|
+
arbor thread get <id> --json --fields title,contributions:5
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Run `arbor help` (or `arbor help --json` for the machine catalog) for the full command surface.
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
MIT © Lambda Curry
|