@maiaos/cli 0.1.0-canary.3 → 0.1.0-canary.30
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 +2 -2
- package/dist/agents/client.d.ts +35 -27
- package/dist/agents/client.js +10 -3
- package/dist/agents/commands.d.ts +1 -0
- package/dist/agents/commands.js +7 -1
- package/dist/agents/index.d.ts +1 -1
- package/dist/agents/index.js +1 -1
- package/dist/agents/input.d.ts +3 -1
- package/dist/agents/input.js +6 -0
- package/dist/agents/output/format.d.ts +2 -2
- package/dist/agents/output/format.js +8 -0
- package/dist/agents/tree/tree.js +13 -1
- package/dist/bin/maia.cdx.json +19 -19
- package/dist/bin/maia.mjs +1 -1
- package/dist/bootstrap/run.js +5 -2
- package/dist/cli/cli.d.ts +8 -2
- package/dist/cli/cli.js +25 -6
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/command-line/context.d.ts +1 -0
- package/dist/command-line/index.d.ts +1 -1
- package/dist/command-line/index.js +1 -1
- package/dist/command-line/input/arguments.d.ts +7 -0
- package/dist/command-line/input/arguments.js +22 -10
- package/dist/command-line/input/index.d.ts +1 -1
- package/dist/command-line/input/index.js +1 -1
- package/dist/connection/access/client.d.ts +13 -0
- package/dist/connection/access/client.js +19 -0
- package/dist/connection/access/commands.d.ts +6 -0
- package/dist/connection/access/commands.js +60 -0
- package/dist/connection/access/format.d.ts +8 -0
- package/dist/connection/access/format.js +61 -0
- package/dist/connection/access/index.d.ts +3 -0
- package/dist/connection/access/index.js +3 -0
- package/dist/connection/access/input.d.ts +53 -0
- package/dist/connection/access/input.js +83 -0
- package/dist/connection/client.d.ts +6 -0
- package/dist/connection/client.js +2 -0
- package/dist/connection/index.d.ts +1 -0
- package/dist/connection/index.js +1 -0
- package/dist/connection/tree/tree.js +45 -7
- package/dist/local-node/client.d.ts +1 -0
- package/dist/local-node/client.js +1 -0
- package/dist/local-node/index.d.ts +2 -1
- package/dist/local-node/index.js +2 -1
- package/dist/local-node/wait.d.ts +10 -0
- package/dist/local-node/wait.js +17 -0
- package/dist/mcp/calls.js +2 -1
- package/dist/reference/resolve.js +9 -2
- package/dist/remote-node/connector.js +8 -1
- package/dist/session/agent-permission.d.ts +2 -2
- package/dist/session/approval/commands.js +7 -3
- package/dist/session/client.d.ts +10 -3
- package/dist/session/client.js +14 -2
- package/dist/session/commands.d.ts +1 -0
- package/dist/session/commands.js +45 -5
- package/dist/session/index.d.ts +1 -1
- package/dist/session/index.js +1 -1
- package/dist/session/output/human.d.ts +1 -0
- package/dist/session/output/human.js +1 -1
- package/dist/session/output/index.d.ts +1 -1
- package/dist/session/output/index.js +1 -1
- package/dist/session/tree/tree.js +12 -1
- package/dist/session/turn/client.js +7 -9
- package/dist/session/turn/commands.js +1 -6
- package/dist/status/client.d.ts +6 -1
- package/dist/status/command.js +3 -1
- package/dist/status/doctor.d.ts +5 -1
- package/dist/status/doctor.js +10 -4
- package/dist/status/output/compact.d.ts +1 -0
- package/dist/status/output/compact.js +3 -0
- package/dist/status/output/human.js +10 -0
- package/dist/terminal/control-commands.js +26 -9
- package/dist/terminal/keys.d.ts +12 -0
- package/dist/terminal/keys.js +62 -0
- package/dist/terminal/tree/tree.js +1 -1
- package/guidance/maia-cli/SKILL.md +1 -1
- package/guidance/maia-node/SKILL.md +54 -0
- package/guidance/maia-orchestration/SKILL.md +1 -2
- package/guidance/maia-sessions/SKILL.md +69 -0
- package/package.json +6 -6
|
@@ -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.
|
|
3
|
+
"version": "0.1.0-canary.30",
|
|
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,15 +64,15 @@
|
|
|
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.
|
|
68
|
-
"@maiaos/client-core": "0.1.0-canary.
|
|
69
|
-
"@maiaos/sdk": "0.1.0-canary.
|
|
67
|
+
"@maiaos/agent": "0.1.0-canary.30",
|
|
68
|
+
"@maiaos/client-core": "0.1.0-canary.30",
|
|
69
|
+
"@maiaos/sdk": "0.1.0-canary.30",
|
|
70
70
|
"effect": "4.0.0"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "node -e \"require('node:fs').rmSync('dist',{force:true,recursive:true})\" && tsc --project tsconfig.build.json && node scripts/build-executable.mjs",
|
|
74
|
-
"lint": "eslint src scripts --max-warnings 0",
|
|
74
|
+
"lint": "eslint src scripts --max-warnings 0 --cache --cache-location node_modules/.cache/eslint/ --cache-strategy content",
|
|
75
75
|
"test": "node -e \"require('node:fs').rmSync('.test-dist',{force:true,recursive:true})\" && tsc --project tsconfig.test.json && node --import ../../scripts/lib/test-environment.mjs --test --test-concurrency=2 --enable-source-maps \".test-dist/**/*.test.js\"",
|
|
76
|
-
"typecheck": "tsc --project tsconfig.json --noEmit && tsc --project scripts/tsconfig.json --noEmit"
|
|
76
|
+
"typecheck": "tsc --project tsconfig.json --noEmit --incremental --tsBuildInfoFile node_modules/.cache/tsc/typecheck.tsbuildinfo && tsc --project scripts/tsconfig.json --noEmit --incremental --tsBuildInfoFile node_modules/.cache/tsc/scripts.tsbuildinfo"
|
|
77
77
|
}
|
|
78
78
|
}
|