@maiaos/cli 0.1.0-canary.24 → 0.1.0-canary.26

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.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: maia-node
3
+ description: >
4
+ Check a Maia Node's health and reach local or remote Nodes with --node and
5
+ --profile through the public CLI. Use when an agent must find which Node a
6
+ command ran on, see whether a Node is ready, or register another Node.
7
+ ---
8
+
9
+ # Maia Node
10
+
11
+ A Node is the one place Maia keeps state and runs work. The CLI is a client of
12
+ it. Confirm each command on `maia help node --json` before use.
13
+
14
+ ## Rules
15
+
16
+ 1. Pass `--json` and read results from stdout and errors from stderr.
17
+ 2. `--node <name>` sends a Node-backed command to a registered remote Node.
18
+ `--node local` names this machine. `--profile <name>` picks a local profile.
19
+ A flag beats `MAIA_NODE` and `MAIA_PROFILE`, which beat the default.
20
+ 3. A command that manages this machine's Nodes, such as `maia node list`,
21
+ refuses `--node`.
22
+ 4. An id belongs to one Node. A missing id (`resource_not_found`, exit 66) on
23
+ the selected Node does not prove it is absent everywhere; check the Node
24
+ selection and retry with the `--node` that holds it.
25
+ 5. Exit code 69 means the Node is unavailable. Report it; do not start a Node
26
+ unless the caller asked for it.
27
+
28
+ ## Implemented
29
+
30
+ ```sh
31
+ maia --json status
32
+ maia --json node status
33
+ maia --json --node local node status
34
+ ```
35
+
36
+ `node monitor` prints a one-time loopback URL for the admin monitor.
37
+
38
+ ## Source candidates (release-disabled)
39
+
40
+ ```sh
41
+ maia --json node list
42
+ maia --json node register <host> --name <name> --dry-run
43
+ maia --json node remove <node> --dry-run
44
+ ```
45
+
46
+ `node register`, `node install` and `node remove` preview with `--dry-run`.
47
+ Confirm the preview only on the caller's request, from stdin with
48
+ `--confirm-stdin`.
49
+
50
+ ## Do not
51
+
52
+ - Do not copy a Node's credentials or tokens into a prompt, a file or a log.
53
+ - Do not expose a Node beyond loopback or its tailnet.
54
+ - Do not remove a Node with `--purge` unless the caller named that.
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: maia-sessions
3
+ description: >
4
+ Create, list, inspect and follow Maia Sessions through the public CLI, on
5
+ this machine or on a named Node with --node. Use when an agent needs to start
6
+ or watch coding work, read a Session's state, or recover after a retry.
7
+ ---
8
+
9
+ # Maia Sessions
10
+
11
+ A Session is one unit of coding work on a Maia Node. Maia Node owns its state;
12
+ the CLI only reads and requests changes. Confirm each command on
13
+ `maia help session --json` before use.
14
+
15
+ ## Rules
16
+
17
+ 1. Pass `--json`. A result, or a merged list with `ok: false`, is on stdout:
18
+ check `ok`, `error` and each `result.result.nodes[].error` before calling a
19
+ list complete. A plain refusal is JSON on stderr with empty stdout.
20
+ 2. Use exact ids. Never infer a Project, Workspace or Session from the working
21
+ folder or a previous answer.
22
+ 3. Add `--node <name>` to reach a remote Node. `--node local` names this
23
+ machine. See the maia-node Skill.
24
+ 4. A mutation names itself with `--command-id <id>`. After exit code 76
25
+ (outcome unknown), run `maia receipt show <command-id>` before any retry,
26
+ and retry with the same id.
27
+ 5. A change to an existing Session carries its current
28
+ `--expected-revision <revision>`. Exit code 75 also covers a full or held
29
+ Node and guard limits, so read `error.code` first. For `revision_conflict`
30
+ or `storage_conflict`, read the Session again and retry at its current
31
+ revision only if it is idle and the change still applies; else observe or
32
+ report. For `saturated`, `held` or `guard_*`, wait or report; never raise a
33
+ guard.
34
+
35
+ ## Implemented
36
+
37
+ ```sh
38
+ maia --json session list --project <project-id>
39
+ maia --json session show <session-id>
40
+ maia --json session create --workspace <workspace-id>
41
+ maia --json session events list --session <session-id>
42
+ maia --json session observe <session-id>
43
+ ```
44
+
45
+ `session list --all` lists Sessions of every Project. Without `--node` it also
46
+ merges the registered remote Nodes, and each row names its Node. A page cursor
47
+ (`--after`) pages one Node, so pass `--node <name>` with it. `--attention`
48
+ filters to Sessions that need attention.
49
+
50
+ ## Source candidates (release-disabled)
51
+
52
+ These work from a source build only. Use them when the caller accepts that.
53
+
54
+ ```sh
55
+ maia --json session start <session-id> --expected-revision <revision> --wait
56
+ maia --json session wait <session-id> --until running --timeout 5m
57
+ maia --json session turn queue <session-id>
58
+ maia --json session approval list --session <session-id>
59
+ ```
60
+
61
+ Send prompt text on stdin with `--prompt-stdin`, never on the command line.
62
+ Exit code 74 means a wait reached its deadline.
63
+
64
+ ## Do not
65
+
66
+ - `session observe` is one snapshot and exits 0. To watch a Session, re-run it
67
+ at a sensible pace; `session wait` is release-disabled.
68
+ - Do not read a worker's files or terminal to learn its state; read the Session.
69
+ - Do not delete or retire a Session unless the caller asked for it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiaos/cli",
3
- "version": "0.1.0-canary.24",
3
+ "version": "0.1.0-canary.26",
4
4
  "description": "The maia CLI and MCP server: start, drive, observe and stop swarms of Claude Code and Codex agents from a terminal, a script or another agent.",
5
5
  "keywords": [
6
6
  "maia",
@@ -64,9 +64,9 @@
64
64
  "dependencies": {
65
65
  "@earendil-works/pi-tui": "1.0.0",
66
66
  "@effect/platform-node-shared": "4.0.0",
67
- "@maiaos/agent": "0.1.0-canary.24",
68
- "@maiaos/client-core": "0.1.0-canary.24",
69
- "@maiaos/sdk": "0.1.0-canary.24",
67
+ "@maiaos/agent": "0.1.0-canary.26",
68
+ "@maiaos/client-core": "0.1.0-canary.26",
69
+ "@maiaos/sdk": "0.1.0-canary.26",
70
70
  "effect": "4.0.0"
71
71
  },
72
72
  "scripts": {