alineo-cli 0.3.0 → 0.4.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 +16 -16
- package/dist/{add-B6Xmz48s.mjs → add-BdM-DRC1.mjs} +1 -1
- package/dist/{agents-T17zA9p-.mjs → agents-CC5ZirAu.mjs} +2 -2
- package/dist/index.mjs +1349 -71
- package/dist/{list-F4RrPUBT.mjs → list-D0m4Llsl.mjs} +3 -3
- package/dist/{package-oshZF9Gd.mjs → package-Bp80ZVLp.mjs} +1 -1
- package/dist/{prompt-DoeWivoE.mjs → prompt-DBQLJudG.mjs} +2 -2
- package/dist/{sessions-data-C8XZge-w.mjs → sessions-data-CceSi5Jz.mjs} +1 -1
- package/dist/{fork-Bl-31vNc.mjs → spawn-_Q1KNp_T.mjs} +21 -21
- package/dist/{spawn-BRFkN-5J.mjs → start-Ba4NiDWn.mjs} +14 -14
- package/dist/{steer-B15HpNnn.mjs → steer-NAX3xw09.mjs} +4 -4
- package/dist/{kill-01oM3F4x.mjs → stop-CvyZQHIf.mjs} +10 -10
- package/dist/{tui-CFEiWbe1.mjs → tui-sV-uyFWI.mjs} +9 -9
- package/package.json +7 -6
- package/pi-extension/alineo.ts +41 -40
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ alineo init
|
|
|
22
22
|
|
|
23
23
|
When using a server started this way, `useServerProxy: true` is written into `alineo.config.json` automatically — sandbox containers run on Docker's bridge network and aren't reachable directly from the host.
|
|
24
24
|
|
|
25
|
-
OpenSandbox's own snapshot metadata (what makes `Alineo.
|
|
25
|
+
OpenSandbox's own snapshot metadata (what makes `Alineo.start()`'s cached-snapshot fast path possible) lives in a SQLite db bind-mounted from `~/.config/alineo/opensandbox-data` into the container — so it survives the container being stopped/started, _and_ being fully removed and recreated (a host reboot with no restart policy, `docker system prune`, a stray `docker rm`). It's only lost if that host directory itself is deleted, or you point a different machine/user at a fresh one. If a cached snapshot ever does fail to restore for some other reason, `Alineo.start()` now logs the real error (`[agent] snapshot restore failed (<real error>), rebuilding...`) instead of an undiagnosable `snapshot stale, rebuilding...`.
|
|
26
26
|
|
|
27
27
|
### `alineo add <url> [--name <n>]`
|
|
28
28
|
|
|
@@ -64,15 +64,15 @@ Also respects `ALINEO_TELEMETRY_DISABLED=1` and the cross-tool `DO_NOT_TRACK=1`
|
|
|
64
64
|
|
|
65
65
|
## Alineo — session lifecycle
|
|
66
66
|
|
|
67
|
-
These wrap `alineo`'s `Alineo.
|
|
67
|
+
These wrap `alineo`'s `Alineo.start()`/`Alineo.resume()`/`Alineo.attach()`/`Alineo.spawn()`. Sessions are always addressed by **sandbox ID**, not name — names aren't unique (running `alineo start` twice on the same spec produces two sandboxes with the same name), and a name-based lookup can hand back a sandbox that already died ungracefully. `alineo start`/`alineo spawn` print the sandbox ID; save it.
|
|
68
68
|
|
|
69
|
-
### `alineo
|
|
69
|
+
### `alineo start <spec> [--prompt <msg>] [--rebuild] [--depth <n>] [--max <n>] [--json]`
|
|
70
70
|
|
|
71
71
|
Start a **brand-new, independent** agent sandbox from a spec's own snapshot. This is the entry point for a fresh session — e.g. a host-level Pi session starting the master of a recursive-agent run.
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
|
-
alineo
|
|
75
|
-
alineo
|
|
74
|
+
alineo start ./agents/my-agent.json
|
|
75
|
+
alineo start ./agents/my-agent.json --prompt "Explain this repo" --json
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
- `--rebuild` forces a full reinstall instead of restoring from the cached snapshot.
|
|
@@ -87,17 +87,17 @@ Send one prompt to a running sandbox and print the reply.
|
|
|
87
87
|
alineo prompt 4af65c3b-24a2-4fd1-999d-918faa9b97fd "What's in /tmp?"
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
`--spec <path>` skips the ledger lookup for the spec file — needed when the sandbox's own creation event lives in a different ledger than this CLI invocation's own (e.g. a child spawned via `alineo
|
|
90
|
+
`--spec <path>` skips the ledger lookup for the spec file — needed when the sandbox's own creation event lives in a different ledger than this CLI invocation's own (e.g. a child spawned via `alineo spawn` from inside another sandbox).
|
|
91
91
|
|
|
92
|
-
### `alineo
|
|
92
|
+
### `alineo spawn <parent> <child-spec> [--prompt <msg>] [--depth <n>] [--max <n>] [--json]`
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
Spawn a child from **your own currently-running session's live sandbox** — filesystem, installed packages, everything on disk right now. Meant to be run by that session's own Pi bash tool: `parent` is the _caller's own_ running session (used only to resolve its sandbox ID; not the child's).
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
|
-
alineo
|
|
97
|
+
alineo spawn my-session ./agents/worker.json --prompt "Handle the auth module"
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
Unlike `alineo
|
|
100
|
+
Unlike `alineo start` (always starts from a spec's own snapshot), `alineo spawn` sees exactly what the calling sandbox sees right now, including uncommitted work — no install/setup steps run.
|
|
101
101
|
|
|
102
102
|
### `alineo agents [--json]`
|
|
103
103
|
|
|
@@ -107,12 +107,12 @@ List running agent sessions. Cross-checks the local ledger's "Running" entries a
|
|
|
107
107
|
alineo agents
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
### `alineo
|
|
110
|
+
### `alineo stop <sandbox-id>`
|
|
111
111
|
|
|
112
112
|
Stop a sandbox.
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
alineo
|
|
115
|
+
alineo stop 4af65c3b-24a2-4fd1-999d-918faa9b97fd
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
### `alineo logs <name> [--json]`
|
|
@@ -129,16 +129,16 @@ Print the installed version.
|
|
|
129
129
|
|
|
130
130
|
---
|
|
131
131
|
|
|
132
|
-
## Recursive spawning (`alineo
|
|
132
|
+
## Recursive spawning (`alineo spawn`)
|
|
133
133
|
|
|
134
|
-
A spec's `spawnDepth` is a nesting-depth budget — required for `alineo
|
|
134
|
+
A spec's `spawnDepth` is a nesting-depth budget — required for `alineo spawn` to be allowed from inside a session at all. Each spawn force-decrements it (`current - 1`) into the child's env; `0` means no budget left, `undefined` means spawning was never enabled for that spec.
|
|
135
135
|
|
|
136
136
|
`maxAgents` is a separate, optional ceiling on total descendants for one lineage, independent of nesting depth. Unset means uncapped. **Not** coordinated across sibling branches spawned in parallel — it's a per-lineage counter, not a global one.
|
|
137
137
|
|
|
138
138
|
```json
|
|
139
139
|
{
|
|
140
140
|
"name": "orchestrator",
|
|
141
|
-
"
|
|
141
|
+
"harness": "pi",
|
|
142
142
|
"spawnDepth": 2,
|
|
143
143
|
"maxAgents": 10
|
|
144
144
|
}
|
|
@@ -151,7 +151,7 @@ A spec's `spawnDepth` is a nesting-depth budget — required for `alineo fork` t
|
|
|
151
151
|
`pi install npm:alineo` installs the alineo extension into Pi at user scope. Once installed, any Pi session:
|
|
152
152
|
|
|
153
153
|
- Bootstraps `alineo` automatically on first use (installs it, runs `alineo init`) — no manual setup.
|
|
154
|
-
- Gets `alineo
|
|
154
|
+
- Gets `alineo start`/`alineo spawn` CLI syntax injected into its own guidance, dynamically chosen based on whether the current session is itself running inside a alineo-managed sandbox.
|
|
155
155
|
|
|
156
156
|
The extension source lives at `pi-extension/alineo.ts` in this package.
|
|
157
157
|
|
|
@@ -20,7 +20,7 @@ async function add(url, opts = {}) {
|
|
|
20
20
|
const dest = join(agentsDir, `${name}.json`);
|
|
21
21
|
await Bun.write(dest, JSON.stringify(spec, null, 2) + "\n");
|
|
22
22
|
log(`Agent spec saved: ${dest}`);
|
|
23
|
-
log(`Load it with: Alineo.
|
|
23
|
+
log(`Load it with: Alineo.start(await Bun.file("${dest}").json(), { adapter }) from alineo`);
|
|
24
24
|
}
|
|
25
25
|
async function fetchSpec(url) {
|
|
26
26
|
if (url.startsWith("http://") || url.startsWith("https://")) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getSessions, t as formatAge } from "./sessions-data-
|
|
1
|
+
import { n as getSessions, t as formatAge } from "./sessions-data-CceSi5Jz.mjs";
|
|
2
2
|
//#region src/commands/agents.ts
|
|
3
3
|
async function agents(opts = {}) {
|
|
4
4
|
const { tracked, untracked } = await getSessions();
|
|
@@ -25,7 +25,7 @@ async function agents(opts = {}) {
|
|
|
25
25
|
formatAge(s.startedAt).padEnd(cols[2]),
|
|
26
26
|
String(s.execCount).padEnd(cols[3])
|
|
27
27
|
].join(" "));
|
|
28
|
-
if (tracked.length === 0) console.log("(no running alineo-tracked sessions — run 'alineo
|
|
28
|
+
if (tracked.length === 0) console.log("(no running alineo-tracked sessions — run 'alineo start <spec>' to start one)");
|
|
29
29
|
if (untracked.length > 0) {
|
|
30
30
|
console.log(`\nUntracked (not created by alineo, e.g. agent-spawned children):`);
|
|
31
31
|
for (const id of untracked) console.log(` ${id}`);
|