anon-pi 0.6.0 → 0.8.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 +40 -5
- package/dist/anon-pi.d.ts +63 -3
- package/dist/anon-pi.d.ts.map +1 -1
- package/dist/anon-pi.js +205 -11
- package/dist/anon-pi.js.map +1 -1
- package/dist/cli.js +97 -26
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/src/anon-pi.ts +240 -13
- package/src/cli.ts +119 -32
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ The **first time** you launch anon-pi with no config yet, it welcomes you and ru
|
|
|
44
44
|
`init` is interactive and re-runnable. It:
|
|
45
45
|
|
|
46
46
|
1. **Proxy** — probes common SOCKS ports, confirms SOCKS5 with a real handshake, shows the findings (evidence only, it never labels the exit provider), then runs `netcage verify` and shows the real EXIT IP as proof it is not your host IP. You confirm on that evidence.
|
|
47
|
-
2. **Local model** — captures the `host:port` of your model, probes it, then **imports models**. It merges two sources, both scoped to that endpoint: the provider in your own `~/.pi/agent/models.json` whose URL matches it (marked `[configured]` — your hand-tuned entries, with their `contextWindow`/`maxTokens`/etc.), and the endpoint's live `/v1/models` (marked `[server]`). You pick which to import (Enter/`c` = all configured, `a` = all, numbers, or `s` = skip) and which is the **default**. Because only the provider served by this endpoint (the one `--allow-direct` hole) is read, no other provider — and no other key — can ever enter the seed. It writes `models.json` +
|
|
47
|
+
2. **Local model** — captures the `host:port` of your model, probes it, then **imports models**. It merges two sources, both scoped to that endpoint: the provider in your own `~/.pi/agent/models.json` whose URL matches it (marked `[configured]` — your hand-tuned entries, with their `contextWindow`/`maxTokens`/etc.), and the endpoint's live `/v1/models` (marked `[server]`). You pick which to import (Enter/`c` = all configured, `a` = all, numbers, or `s` = skip) and which is the **default**. Because only the provider served by this endpoint (the one `--allow-direct` hole) is read, no other provider — and no other key — can ever enter the seed. It writes a **global** `models.json` + settings seed (shared by every machine, since the `llm` endpoint is global) and updates any already-seeded machine homes in place (conversations untouched). If the matching provider carries a real-looking apiKey, init **refuses** (it would put a host credential into the anon home) unless you pass `--force-allow-local-llm-api-key`.
|
|
48
48
|
3. **Image** — pick a shipped `Dockerfile` (built via `podman build`), an existing image ref, or skip.
|
|
49
49
|
4. **Projects root** — the host folder mounted at `/projects` (where bare `anon-pi` looks for projects). Defaults to `~/.anon-pi/projects/`; point it at your own dev folder if you want to jail pi into files you edit with host tools (`--mount <parent>` still overrides it per-launch).
|
|
50
50
|
|
|
@@ -55,7 +55,12 @@ It then writes `~/.anon-pi/config.json` + the `default` machine. It **never dest
|
|
|
55
55
|
```
|
|
56
56
|
anon-pi MENU: pick a project (pi), a shell, or a new project
|
|
57
57
|
anon-pi <project> pi in the project (/projects/<project>); exit pi -> host
|
|
58
|
-
anon-pi <project> <pi-args…> forward args to pi (headless
|
|
58
|
+
anon-pi <project> <pi-args…> forward args to pi (e.g. -p for a headless one-shot)
|
|
59
|
+
anon-pi --session <id> resume a pi session by id (forwarded to pi; no project needed)
|
|
60
|
+
anon-pi --continue continue your most recent pi session (also -r/--resume, --fork)
|
|
61
|
+
anon-pi --list-models list the models pi sees (also --models; no project needed)
|
|
62
|
+
anon-pi pi <pi-args…> run pi with ANY args and no project (the passthrough)
|
|
63
|
+
anon-pi --version print anon-pi's version (also -V)
|
|
59
64
|
anon-pi --shell [<project>] a jailed bash (at ~, or cd'd into <project>) - the project-hopper
|
|
60
65
|
anon-pi -m <machine> [<p>] the same, on <machine> (its own image + home + conversations)
|
|
61
66
|
anon-pi --mount <parent> [<p>] root at a HOST parent folder instead of the projects root
|
|
@@ -77,6 +82,7 @@ Every subcommand carries its own help: `anon-pi --help` (the launch surface), `a
|
|
|
77
82
|
| Just pick something to work on | `anon-pi` (the menu) |
|
|
78
83
|
| Work in a project | `anon-pi <project>` |
|
|
79
84
|
| Resume a project's conversation | `anon-pi <project>` (same machine + project ⇒ same session) |
|
|
85
|
+
| Resume a specific session by id | `anon-pi --session <id>` (or `anon-pi --continue` for the latest) |
|
|
80
86
|
| Run a one-shot prompt (scriptable) | `anon-pi <project> -p "…"` |
|
|
81
87
|
| Hop between projects / poke the box | `anon-pi --shell` then `cd /projects/<p> && pi` |
|
|
82
88
|
| A scratch pi not tied to a subfolder | `anon-pi .` |
|
|
@@ -118,12 +124,37 @@ From inside the shell you can `cd` between `/projects/*` and run `pi` yourself i
|
|
|
118
124
|
|
|
119
125
|
### Headless / one-shot
|
|
120
126
|
|
|
121
|
-
Any tokens after the project are forwarded to pi verbatim
|
|
127
|
+
Any tokens after the project are forwarded to pi verbatim. A run is headless (no TTY needed, so it fits scripts and pipes) only when you forward pi's `-p`/`--print`; other forwarded flags (like `--session`) stay interactive.
|
|
122
128
|
|
|
123
129
|
```sh
|
|
124
130
|
anon-pi recon -p "summarize the findings in ./notes"
|
|
125
131
|
```
|
|
126
132
|
|
|
133
|
+
### Resuming a session
|
|
134
|
+
|
|
135
|
+
`anon-pi <project>` already resumes that project's conversation (the session is keyed by its `/projects/<name>` cwd, so same machine + same project reopens it). To resume a **specific** session, forward pi's session flags — with no project needed, because pi finds the session by id and switches to its own project:
|
|
136
|
+
|
|
137
|
+
```sh
|
|
138
|
+
anon-pi --session <id> # resume that exact session
|
|
139
|
+
anon-pi --continue # continue your most recent session (also -r/--resume, --fork <id>)
|
|
140
|
+
anon-pi -m webveil --session <id> # on a specific machine
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
So when pi prints `To resume this session: pi --session <id>` on exit, just prefix it: `anon-pi --session <id>`.
|
|
144
|
+
|
|
145
|
+
### Running pi directly (`anon-pi pi …`)
|
|
146
|
+
|
|
147
|
+
Any tokens **after a project** are already forwarded to pi (`anon-pi recon --model qwen -p "…"`). For pi commands that need **no project** — listing models, exporting a session, any other pi flag — use the passthrough:
|
|
148
|
+
|
|
149
|
+
```sh
|
|
150
|
+
anon-pi --list-models # what models does pi see in the jail? (also --models)
|
|
151
|
+
anon-pi pi --model qwen3-coder # run pi with arbitrary flags, no project
|
|
152
|
+
anon-pi pi --export out.html --session <id> # export a session and exit
|
|
153
|
+
anon-pi -m webveil pi --version # pi's own version, on a machine
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
`anon-pi pi <args…>` is the general escape hatch: it runs pi inside the jail with exactly the args you give and no project, so you never need anon-pi to special-case each pi flag. (`--version`/`-V` on its own prints *anon-pi's* version; use `anon-pi pi --version` for pi's.)
|
|
157
|
+
|
|
127
158
|
### `--mount`: root at a host parent (the caveat)
|
|
128
159
|
|
|
129
160
|
`--mount <parent>` re-roots this launch at a HOST parent folder instead of the projects root: the parent is mounted at `/work`, and a `<project>` positional then names a subfolder under it (`/work/<project>`).
|
|
@@ -189,18 +220,22 @@ Everything anon-pi keeps lives under `~/.anon-pi/` (override with `ANON_PI_HOME`
|
|
|
189
220
|
```
|
|
190
221
|
~/.anon-pi/
|
|
191
222
|
config.json proxy, llm, defaultMachine, (optional) projects root
|
|
223
|
+
models.json the GLOBAL local-model seed (shared by every machine)
|
|
224
|
+
settings-seed.json the GLOBAL default-model selection seed
|
|
192
225
|
machines/
|
|
193
226
|
default/
|
|
194
227
|
machine.json pinned image, (optional) per-machine projects override
|
|
195
228
|
home/ the persistent $HOME bind-mounted at /root
|
|
196
229
|
.pi/agent/ pi config, extensions, sessions (your conversations)
|
|
197
|
-
models.json
|
|
230
|
+
models.json OPTIONAL per-machine override of the global seed
|
|
198
231
|
projects/ the default global projects root (mounted at /projects)
|
|
199
232
|
recon/
|
|
200
233
|
...
|
|
201
234
|
```
|
|
202
235
|
|
|
203
|
-
The
|
|
236
|
+
**The local-model seed is GLOBAL.** Because `config.json` holds one `llm` endpoint (the single `--allow-direct` hole, shared by every machine), the `models.json` describing it lives once at the workspace root and seeds **every** machine's fresh home. `anon-pi init` writes it there (and updates any already-seeded machine homes in place, without touching conversations). A machine that needs a *different* local model can override it with its own `machines/<M>/models.json`.
|
|
237
|
+
|
|
238
|
+
The home is the durable, inspectable store. On a FRESH machine home, the image's staged defaults (`/opt/anon-pi-seed/agent`) and the resolved `models.json` seed (per-machine override if present, else the global one) are promoted in once and a marker is stamped; after that pi owns the home and your changes (added models, installed extensions) are never clobbered.
|
|
204
239
|
|
|
205
240
|
## Providing a pi image
|
|
206
241
|
|
package/dist/anon-pi.d.ts
CHANGED
|
@@ -141,6 +141,33 @@ export declare function machineDir(env: AnonPiEnv, name: string): string;
|
|
|
141
141
|
export declare function machineHomeDir(env: AnonPiEnv, name: string): string;
|
|
142
142
|
/** A machine's machine.json path: <home>/machines/<name>/machine.json. */
|
|
143
143
|
export declare function machineJsonPath(env: AnonPiEnv, name: string): string;
|
|
144
|
+
/**
|
|
145
|
+
* The GLOBAL local-model models.json seed: `<home>/models.json`. The local model
|
|
146
|
+
* is a WORKSPACE-level thing (config.json holds ONE global `llm`, the single
|
|
147
|
+
* `--allow-direct` hole shared by every machine), so its generated models.json
|
|
148
|
+
* lives once at the workspace root and seeds EVERY machine's fresh home. A
|
|
149
|
+
* machine may override it with its own `machines/<M>/models.json` (see
|
|
150
|
+
* resolveModelsSeedPath) for the rare "this machine uses a different local
|
|
151
|
+
* model" case; by default all machines share this one.
|
|
152
|
+
*/
|
|
153
|
+
export declare function globalModelsSeedPath(env: AnonPiEnv): string;
|
|
154
|
+
/** The GLOBAL settings seed (the default-model selection): `<home>/settings-seed.json`. */
|
|
155
|
+
export declare function globalSettingsSeedPath(env: AnonPiEnv): string;
|
|
156
|
+
/** A machine's OPTIONAL per-machine models.json override: `machines/<M>/models.json`. */
|
|
157
|
+
export declare function machineModelsSeedPath(env: AnonPiEnv, name: string): string;
|
|
158
|
+
/** A machine's OPTIONAL per-machine settings seed override: `machines/<M>/settings-seed.json`. */
|
|
159
|
+
export declare function machineSettingsSeedPath(env: AnonPiEnv, name: string): string;
|
|
160
|
+
/**
|
|
161
|
+
* PURE: resolve the models.json SEED path for a machine, per-machine override
|
|
162
|
+
* first, else the global one. `exists` is injected (the CLI passes existsSync)
|
|
163
|
+
* so this stays pure/testable. Returns the chosen path, or undefined when
|
|
164
|
+
* NEITHER exists (a machine with no local-model seed at all — pi starts with no
|
|
165
|
+
* models). The precedence is: `machines/<M>/models.json` (a deliberate
|
|
166
|
+
* per-machine override) > `<home>/models.json` (the global default).
|
|
167
|
+
*/
|
|
168
|
+
export declare function resolveModelsSeedPath(env: AnonPiEnv, machine: string, exists: (p: string) => boolean): string | undefined;
|
|
169
|
+
/** PURE: the settings-seed path for a machine (per-machine override > global), or undefined. */
|
|
170
|
+
export declare function resolveSettingsSeedPath(env: AnonPiEnv, machine: string, exists: (p: string) => boolean): string | undefined;
|
|
144
171
|
/** The sessions dirname pi keeps its per-cwd conversation dirs under (in the agent dir). */
|
|
145
172
|
export declare const SESSIONS_DIRNAME = "sessions";
|
|
146
173
|
/**
|
|
@@ -269,6 +296,16 @@ export declare function rootCwd(kind: RootKind): string;
|
|
|
269
296
|
* This is the one seam so `anon-pi --mount <p> .` and a menu "here" entry agree.
|
|
270
297
|
*/
|
|
271
298
|
export declare function resolveCwd(kind: RootKind, token: string): string;
|
|
299
|
+
/**
|
|
300
|
+
* PURE: the launch cwd for a resolved (mode, rootKind, project). With a project
|
|
301
|
+
* token it resolves under the active root (resolveCwd). With NO project: a
|
|
302
|
+
* `shell` sits at the machine home (`/root`) — the "sit on the machine" mode —
|
|
303
|
+
* while `pi` (a `--session`/`--resume` launch that pi cwd-switches itself) starts
|
|
304
|
+
* at the projects root (`rootCwd`), a real pi launch position. `menu` never
|
|
305
|
+
* reaches here (it is argv-less). Shared by resolveRunPlan + keptContainerKey so
|
|
306
|
+
* the run cwd and the container-identity key always agree.
|
|
307
|
+
*/
|
|
308
|
+
export declare function launchCwd(mode: LaunchMode, kind: RootKind, project: string | undefined): string;
|
|
272
309
|
/** Parsed shape of config.json. All fields optional (a hand-edited file may omit any). */
|
|
273
310
|
export interface AnonPiConfig {
|
|
274
311
|
/** socks5h proxy URL. */
|
|
@@ -454,14 +491,31 @@ export interface ParsedLaunch {
|
|
|
454
491
|
keep: boolean;
|
|
455
492
|
piArgs?: string[];
|
|
456
493
|
}
|
|
494
|
+
/**
|
|
495
|
+
* The explicit pi-passthrough token: `anon-pi pi <args…>` runs pi with the given
|
|
496
|
+
* args and NO project (the general escape hatch for any pi flag). It is a
|
|
497
|
+
* RESERVED project name (see RESERVED_NAMES) so a project can never shadow it.
|
|
498
|
+
*/
|
|
499
|
+
export declare const PI_PASSTHROUGH_TOKEN = "pi";
|
|
500
|
+
/**
|
|
501
|
+
* PURE: whether forwarded pi args request pi's NON-INTERACTIVE (print) mode,
|
|
502
|
+
* i.e. contain `-p`/`--print`. This is the ONLY headless shape (it needs no
|
|
503
|
+
* TTY): other forwarded args (`--session <id>`, `--model x`, ...) are still
|
|
504
|
+
* INTERACTIVE and need a TTY + `-it`. Shared by the CLI's no-TTY discipline and
|
|
505
|
+
* the RunPlan's `-it` decision so they agree.
|
|
506
|
+
*/
|
|
507
|
+
export declare function isHeadlessPiArgs(piArgs: readonly string[] | undefined): boolean;
|
|
457
508
|
/**
|
|
458
509
|
* PURE: parse grammar A into a ParsedLaunch. Consumes the anon-pi flags
|
|
459
510
|
* (`-m <machine>`, `--shell`, `--mount <parent>`, `--keep`/`--rm`) LEFT of the
|
|
460
511
|
* project positional; the FIRST bare positional is the project (`.` allowed as
|
|
461
512
|
* the root token). In pi mode every token AFTER the project is forwarded to pi
|
|
462
513
|
* verbatim (so `anon-pi recon -p '...'` works) — anon-pi flags must come before
|
|
463
|
-
* the project.
|
|
464
|
-
*
|
|
514
|
+
* the project. A pi session-resume flag (`--session <id>`, `--continue`,
|
|
515
|
+
* `--resume`, `--fork <id>`) in the project position starts a NO-project pi
|
|
516
|
+
* launch that forwards to pi (pi resolves the session + cwd itself). In
|
|
517
|
+
* shell/menu mode a stray extra positional is an error (bash has no
|
|
518
|
+
* forwarded-args grammar; the menu takes no project).
|
|
465
519
|
*
|
|
466
520
|
* Validates the project name and the `-m` machine name via validateName (the
|
|
467
521
|
* reserved-name guard); `--mount <parent>` is a HOST path in its own namespace,
|
|
@@ -1054,6 +1108,12 @@ export declare function shippedDockerfilePath(): string | undefined;
|
|
|
1054
1108
|
* anon-pi (examples/Dockerfile.pi-webveil), or undefined if not found.
|
|
1055
1109
|
*/
|
|
1056
1110
|
export declare function shippedWebveilDockerfilePath(): string | undefined;
|
|
1111
|
+
/**
|
|
1112
|
+
* anon-pi's own version, read from the package.json shipped in the package root
|
|
1113
|
+
* (resolved via shippedFile). Returns undefined if it cannot be found/parsed, so
|
|
1114
|
+
* `--version` can fall back to a placeholder. Read-only.
|
|
1115
|
+
*/
|
|
1116
|
+
export declare function anonPiVersion(): string | undefined;
|
|
1057
1117
|
/**
|
|
1058
1118
|
* A parsed `machine <verb> …` command. A discriminated union so the CLI
|
|
1059
1119
|
* dispatches on `verb` with the already-validated fields:
|
|
@@ -1111,5 +1171,5 @@ export declare function setImageWarning(name: string, oldImage: string | undefin
|
|
|
1111
1171
|
/** Read the AnonPiEnv from a process env map (kept separate so tests inject one). */
|
|
1112
1172
|
export declare function envFromProcess(penv: Record<string, string | undefined>): AnonPiEnv;
|
|
1113
1173
|
/** The --help text (kept here so it is covered by the same module). */
|
|
1114
|
-
export declare const HELP = "anon-pi - run pi on anonymized, jailed machines (netcage: forced egress + one direct local model)\n\nUSAGE\n anon-pi MENU: pick a project (pi), a shell, or a new project\n anon-pi <project> pi in the project (/projects/<project>); exit pi -> host\n anon-pi <project> <pi-args\u2026> forward args to pi (headless
|
|
1174
|
+
export declare const HELP = "anon-pi - run pi on anonymized, jailed machines (netcage: forced egress + one direct local model)\n\nUSAGE\n anon-pi MENU: pick a project (pi), a shell, or a new project\n anon-pi <project> pi in the project (/projects/<project>); exit pi -> host\n anon-pi <project> <pi-args\u2026> forward args to pi (e.g. -p for a headless one-shot)\n anon-pi --session <id> resume a pi session by id (forwarded to pi; no project needed)\n anon-pi --continue continue your most recent pi session (also -r/--resume, --fork)\n anon-pi --list-models list the models pi sees (also --models; no project needed)\n anon-pi pi <pi-args\u2026> run pi with ANY args and no project (the passthrough)\n anon-pi --version print anon-pi's version (also -V)\n anon-pi --shell [<project>] a jailed bash (at ~, or cd'd into <project>) - the project-hopper\n anon-pi -m <machine> [<p>] the same, on <machine> (its own image + home + conversations)\n anon-pi --mount <parent> [<p>] root at a HOST parent folder instead of the projects root\n anon-pi init onboard: verify your proxy, capture your local model, pick an image\n anon-pi machine \u2026 manage machines (create / list / set-image / rm)\n anon-pi --delete-home [<m>] delete a machine's home (config + convos); keep its image pin + files\n anon-pi --delete-project <p> delete a project's files + its per-machine sessions; keep the homes\n\n <project> a folder under the projects root (mounted at /projects; pi's cwd). `.` means\n the root itself (a scratch pi at /projects, /work for --mount, or ~).\n\n [--rm] throwaway container this run (the DEFAULT; deleted on exit).\n [--keep] leave the container KEPT so its filesystem survives (apt install,\n quit, re-enter). anon-pi finds it by netcage's managed label and\n `netcage start`s it on re-entry.\n\nWHAT IT DOES\n Runs pi inside netcage with all web/DNS egress forced through the socks5h proxy\n (fail-closed) and ONE direct hole to your local model (ANON_PI_LLM). A MACHINE\n is an image + a persistent HOST home (bind-mounted at /root) holding your pi\n config, extensions, and conversations; the container is disposable, so `--rm`\n loses nothing. Files (projects) are global by default; conversations are\n per-machine. On a FRESH machine home the image's staged defaults + your\n models.json are seeded in once; after that pi owns the home. Requires `netcage`.\n\nENVIRONMENT\n ANON_PI_PROXY (required) socks5h URL of your proxy (Tor/wireproxy/ssh -D).\n No default: the proxy is what anonymizes, so it is never guessed.\n ANON_PI_LLM (required) RFC1918/link-local IP[:port] of the local model\n ANON_PI_IMAGE image with `pi` on PATH, used when a machine has no image set.\n No image yet? See the README (Providing a pi image).\n ANON_PI_HOME anon-pi workspace dir (default ~/.anon-pi; NOT under ~/.config)\n ANON_PI_PROJECTS projects root override (host dir mounted at /projects)\n\nPLATFORM\n Linux only (via netcage's netns/nft jail). On macOS/Windows it works only\n inside a Linux VM, where --allow-direct to a LAN model is VM-boundary-sensitive.\n";
|
|
1115
1175
|
//# sourceMappingURL=anon-pi.d.ts.map
|
package/d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CAEjE;AAmBD;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,MAAM,GAAG,SAAS,CASlD;AAWD;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GACvB;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAC,GAC9C;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GACd;IAAC,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,GAChD;IAAC,IAAI,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAC,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,cAAc,CAoFxE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAOlE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC9B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,QAAQ,EAAE,MAAM,GACd,MAAM,CASR;AAED,qFAAqF;AACrF,wBAAgB,cAAc,CAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GACtC,SAAS,CAaX;AAED,uEAAuE;AACvE,eAAO,MAAM,IAAI,uuGAgDhB,CAAC"}
|
package/dist/anon-pi.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
// choice-list, project usage, the run-vs-start rule, models.json generation,
|
|
30
30
|
// init's proxy detect/verify decisions). cli.ts owns only the impure edges (fs,
|
|
31
31
|
// the interactive TUI, the netcage query, the spawn).
|
|
32
|
-
import { existsSync } from 'node:fs';
|
|
32
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
33
33
|
import { homedir } from 'node:os';
|
|
34
34
|
import { dirname, join, resolve } from 'node:path';
|
|
35
35
|
import { fileURLToPath } from 'node:url';
|
|
@@ -172,6 +172,57 @@ export function machineHomeDir(env, name) {
|
|
|
172
172
|
export function machineJsonPath(env, name) {
|
|
173
173
|
return join(machineDir(env, name), 'machine.json');
|
|
174
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* The GLOBAL local-model models.json seed: `<home>/models.json`. The local model
|
|
177
|
+
* is a WORKSPACE-level thing (config.json holds ONE global `llm`, the single
|
|
178
|
+
* `--allow-direct` hole shared by every machine), so its generated models.json
|
|
179
|
+
* lives once at the workspace root and seeds EVERY machine's fresh home. A
|
|
180
|
+
* machine may override it with its own `machines/<M>/models.json` (see
|
|
181
|
+
* resolveModelsSeedPath) for the rare "this machine uses a different local
|
|
182
|
+
* model" case; by default all machines share this one.
|
|
183
|
+
*/
|
|
184
|
+
export function globalModelsSeedPath(env) {
|
|
185
|
+
return join(resolveAnonPiHome(env), MODELS_FILE);
|
|
186
|
+
}
|
|
187
|
+
/** The GLOBAL settings seed (the default-model selection): `<home>/settings-seed.json`. */
|
|
188
|
+
export function globalSettingsSeedPath(env) {
|
|
189
|
+
return join(resolveAnonPiHome(env), SETTINGS_SEED_FILE);
|
|
190
|
+
}
|
|
191
|
+
/** A machine's OPTIONAL per-machine models.json override: `machines/<M>/models.json`. */
|
|
192
|
+
export function machineModelsSeedPath(env, name) {
|
|
193
|
+
return join(machineDir(env, name), MODELS_FILE);
|
|
194
|
+
}
|
|
195
|
+
/** A machine's OPTIONAL per-machine settings seed override: `machines/<M>/settings-seed.json`. */
|
|
196
|
+
export function machineSettingsSeedPath(env, name) {
|
|
197
|
+
return join(machineDir(env, name), SETTINGS_SEED_FILE);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* PURE: resolve the models.json SEED path for a machine, per-machine override
|
|
201
|
+
* first, else the global one. `exists` is injected (the CLI passes existsSync)
|
|
202
|
+
* so this stays pure/testable. Returns the chosen path, or undefined when
|
|
203
|
+
* NEITHER exists (a machine with no local-model seed at all — pi starts with no
|
|
204
|
+
* models). The precedence is: `machines/<M>/models.json` (a deliberate
|
|
205
|
+
* per-machine override) > `<home>/models.json` (the global default).
|
|
206
|
+
*/
|
|
207
|
+
export function resolveModelsSeedPath(env, machine, exists) {
|
|
208
|
+
const perMachine = machineModelsSeedPath(env, machine);
|
|
209
|
+
if (exists(perMachine))
|
|
210
|
+
return perMachine;
|
|
211
|
+
const global = globalModelsSeedPath(env);
|
|
212
|
+
if (exists(global))
|
|
213
|
+
return global;
|
|
214
|
+
return undefined;
|
|
215
|
+
}
|
|
216
|
+
/** PURE: the settings-seed path for a machine (per-machine override > global), or undefined. */
|
|
217
|
+
export function resolveSettingsSeedPath(env, machine, exists) {
|
|
218
|
+
const perMachine = machineSettingsSeedPath(env, machine);
|
|
219
|
+
if (exists(perMachine))
|
|
220
|
+
return perMachine;
|
|
221
|
+
const global = globalSettingsSeedPath(env);
|
|
222
|
+
if (exists(global))
|
|
223
|
+
return global;
|
|
224
|
+
return undefined;
|
|
225
|
+
}
|
|
175
226
|
/** The sessions dirname pi keeps its per-cwd conversation dirs under (in the agent dir). */
|
|
176
227
|
export const SESSIONS_DIRNAME = 'sessions';
|
|
177
228
|
/**
|
|
@@ -246,7 +297,7 @@ export const ROOT_TOKEN = '.';
|
|
|
246
297
|
* reserved-name concept is explicit and extendable. `--mount`'s `/work` is a
|
|
247
298
|
* CONTAINER path, not a name in this namespace, so it needs no reservation.
|
|
248
299
|
*/
|
|
249
|
-
export const RESERVED_NAMES = ['.', '..'];
|
|
300
|
+
export const RESERVED_NAMES = ['.', '..', 'pi'];
|
|
250
301
|
/**
|
|
251
302
|
* PURE: validate a machine or project name as a safe single path segment, and
|
|
252
303
|
* return it unchanged on success. Rejects (with AnonPiError):
|
|
@@ -326,6 +377,20 @@ export function resolveCwd(kind, token) {
|
|
|
326
377
|
}
|
|
327
378
|
return `${rootCwd(kind)}/${validateName(token, 'project')}`;
|
|
328
379
|
}
|
|
380
|
+
/**
|
|
381
|
+
* PURE: the launch cwd for a resolved (mode, rootKind, project). With a project
|
|
382
|
+
* token it resolves under the active root (resolveCwd). With NO project: a
|
|
383
|
+
* `shell` sits at the machine home (`/root`) — the "sit on the machine" mode —
|
|
384
|
+
* while `pi` (a `--session`/`--resume` launch that pi cwd-switches itself) starts
|
|
385
|
+
* at the projects root (`rootCwd`), a real pi launch position. `menu` never
|
|
386
|
+
* reaches here (it is argv-less). Shared by resolveRunPlan + keptContainerKey so
|
|
387
|
+
* the run cwd and the container-identity key always agree.
|
|
388
|
+
*/
|
|
389
|
+
export function launchCwd(mode, kind, project) {
|
|
390
|
+
if (project !== undefined)
|
|
391
|
+
return resolveCwd(kind, project);
|
|
392
|
+
return mode === 'shell' ? CONTAINER_HOME_ROOT : rootCwd(kind);
|
|
393
|
+
}
|
|
329
394
|
/** Pick a string field from a parsed-JSON object, or undefined if absent/non-string. */
|
|
330
395
|
function strField(o, key) {
|
|
331
396
|
if (!o || typeof o !== 'object')
|
|
@@ -420,14 +485,85 @@ export function resolveLlm(args) {
|
|
|
420
485
|
// unit-testable; the CLI stays thin I/O.
|
|
421
486
|
/** The machine bare `anon-pi` launches when no `-m` and no config default. */
|
|
422
487
|
export const DEFAULT_MACHINE = 'default';
|
|
488
|
+
/**
|
|
489
|
+
* pi flags that make sense with NO anon-pi project, so `anon-pi <flag> ...`
|
|
490
|
+
* launches pi (at the projects root) and forwards this flag + everything after
|
|
491
|
+
* it verbatim. Two families:
|
|
492
|
+
* - SESSION selection (`--session <id>` etc.): pi finds the session file (in the
|
|
493
|
+
* always-mounted machine home) and switches to its own project cwd, so no
|
|
494
|
+
* project is needed. Mirrors pi's own resume hint (`pi --session <id>`), so
|
|
495
|
+
* pasting `anon-pi --session <id>` just works.
|
|
496
|
+
* - QUERY (`--list-models`/`--models`): pi prints + exits, no project relevant.
|
|
497
|
+
* For arbitrary pi flags with no project (e.g. `--model x`), use the explicit
|
|
498
|
+
* `anon-pi pi <args…>` passthrough instead.
|
|
499
|
+
*/
|
|
500
|
+
const PI_NO_PROJECT_FLAGS = new Set([
|
|
501
|
+
// session selection
|
|
502
|
+
'--session',
|
|
503
|
+
'--session-id',
|
|
504
|
+
'--resume',
|
|
505
|
+
'-r',
|
|
506
|
+
'--continue',
|
|
507
|
+
'-c',
|
|
508
|
+
'--fork',
|
|
509
|
+
// query-and-exit
|
|
510
|
+
'--list-models',
|
|
511
|
+
'--models',
|
|
512
|
+
]);
|
|
513
|
+
/** True iff `a` is a pi flag anon-pi accepts with no project (see PI_NO_PROJECT_FLAGS). */
|
|
514
|
+
function isPiNoProjectFlag(a) {
|
|
515
|
+
return PI_NO_PROJECT_FLAGS.has(a);
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* The explicit pi-passthrough token: `anon-pi pi <args…>` runs pi with the given
|
|
519
|
+
* args and NO project (the general escape hatch for any pi flag). It is a
|
|
520
|
+
* RESERVED project name (see RESERVED_NAMES) so a project can never shadow it.
|
|
521
|
+
*/
|
|
522
|
+
export const PI_PASSTHROUGH_TOKEN = 'pi';
|
|
523
|
+
/**
|
|
524
|
+
* PURE: whether forwarded pi args request pi's NON-INTERACTIVE (print) mode,
|
|
525
|
+
* i.e. contain `-p`/`--print`. This is the ONLY headless shape (it needs no
|
|
526
|
+
* TTY): other forwarded args (`--session <id>`, `--model x`, ...) are still
|
|
527
|
+
* INTERACTIVE and need a TTY + `-it`. Shared by the CLI's no-TTY discipline and
|
|
528
|
+
* the RunPlan's `-it` decision so they agree.
|
|
529
|
+
*/
|
|
530
|
+
export function isHeadlessPiArgs(piArgs) {
|
|
531
|
+
return !!piArgs && piArgs.some((a) => a === '-p' || a === '--print');
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Finish parsing a NO-PROJECT pi launch (`anon-pi --session <id> ...`,
|
|
535
|
+
* `anon-pi --list-models`, or the explicit `anon-pi pi <args…>`): pi mode, NO
|
|
536
|
+
* project (pi picks its own cwd / prints + exits), the flag(s) + rest forwarded.
|
|
537
|
+
* `--shell` is incompatible (a shell forwards no pi args).
|
|
538
|
+
*/
|
|
539
|
+
function finishPiNoProjectLaunch(args) {
|
|
540
|
+
if (args.keep && args.rm) {
|
|
541
|
+
args.fail('--keep and --rm are contradictory (pick one; --rm is the default)');
|
|
542
|
+
}
|
|
543
|
+
if (args.shell) {
|
|
544
|
+
args.fail('--shell forwards no pi args (a shell has no session/query). Drop --shell.');
|
|
545
|
+
}
|
|
546
|
+
return {
|
|
547
|
+
mode: 'pi',
|
|
548
|
+
machine: args.machine,
|
|
549
|
+
machineExplicit: args.machineExplicit,
|
|
550
|
+
project: undefined,
|
|
551
|
+
mountParent: args.mountParent,
|
|
552
|
+
keep: args.keep,
|
|
553
|
+
piArgs: args.piArgs,
|
|
554
|
+
};
|
|
555
|
+
}
|
|
423
556
|
/**
|
|
424
557
|
* PURE: parse grammar A into a ParsedLaunch. Consumes the anon-pi flags
|
|
425
558
|
* (`-m <machine>`, `--shell`, `--mount <parent>`, `--keep`/`--rm`) LEFT of the
|
|
426
559
|
* project positional; the FIRST bare positional is the project (`.` allowed as
|
|
427
560
|
* the root token). In pi mode every token AFTER the project is forwarded to pi
|
|
428
561
|
* verbatim (so `anon-pi recon -p '...'` works) — anon-pi flags must come before
|
|
429
|
-
* the project.
|
|
430
|
-
*
|
|
562
|
+
* the project. A pi session-resume flag (`--session <id>`, `--continue`,
|
|
563
|
+
* `--resume`, `--fork <id>`) in the project position starts a NO-project pi
|
|
564
|
+
* launch that forwards to pi (pi resolves the session + cwd itself). In
|
|
565
|
+
* shell/menu mode a stray extra positional is an error (bash has no
|
|
566
|
+
* forwarded-args grammar; the menu takes no project).
|
|
431
567
|
*
|
|
432
568
|
* Validates the project name and the `-m` machine name via validateName (the
|
|
433
569
|
* reserved-name guard); `--mount <parent>` is a HOST path in its own namespace,
|
|
@@ -483,6 +619,44 @@ export function parseLaunchArgs(args) {
|
|
|
483
619
|
i++;
|
|
484
620
|
break;
|
|
485
621
|
}
|
|
622
|
+
if (a === PI_PASSTHROUGH_TOKEN) {
|
|
623
|
+
// `anon-pi pi <args…>`: the explicit passthrough. Run pi with the
|
|
624
|
+
// following args and NO project (pi picks its own cwd, or prints + exits
|
|
625
|
+
// for a query). The general escape hatch for ANY pi flag with no project
|
|
626
|
+
// (`anon-pi pi --model x`, `anon-pi pi --export out.html --session <id>`).
|
|
627
|
+
return finishPiNoProjectLaunch({
|
|
628
|
+
machine,
|
|
629
|
+
machineExplicit: machineSet,
|
|
630
|
+
mountParent,
|
|
631
|
+
keep: keepSeen,
|
|
632
|
+
rm: rmSeen,
|
|
633
|
+
shell,
|
|
634
|
+
piArgs: args.slice(i + 1),
|
|
635
|
+
fail,
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
if (isPiNoProjectFlag(a)) {
|
|
639
|
+
// A pi flag that needs NO anon-pi project (`--session <id>`/`--continue`/
|
|
640
|
+
// `--fork` resume by id; `--list-models`/`--models` print + exit). pi
|
|
641
|
+
// resolves its own cwd (or just prints), so anon-pi launches pi at the
|
|
642
|
+
// projects root and forwards this flag + everything after it verbatim.
|
|
643
|
+
// This makes pi's own "To resume: pi --session <id>" hint usable as
|
|
644
|
+
// `anon-pi --session <id>`. (For ARBITRARY pi flags with no project, use
|
|
645
|
+
// the explicit `anon-pi pi <args…>` passthrough.)
|
|
646
|
+
piArgs = args.slice(i);
|
|
647
|
+
project = undefined;
|
|
648
|
+
i = args.length;
|
|
649
|
+
return finishPiNoProjectLaunch({
|
|
650
|
+
machine,
|
|
651
|
+
machineExplicit: machineSet,
|
|
652
|
+
mountParent,
|
|
653
|
+
keep: keepSeen,
|
|
654
|
+
rm: rmSeen,
|
|
655
|
+
shell,
|
|
656
|
+
piArgs,
|
|
657
|
+
fail,
|
|
658
|
+
});
|
|
659
|
+
}
|
|
486
660
|
if (a.startsWith('-')) {
|
|
487
661
|
fail(`unknown option: ${a}`);
|
|
488
662
|
}
|
|
@@ -580,9 +754,7 @@ export function resolveRunPlan(intent, homeFresh) {
|
|
|
580
754
|
const mounted = nonEmpty(mountParent) !== undefined;
|
|
581
755
|
// Which root the cwd resolves under: /work when --mount, else /projects.
|
|
582
756
|
const rootKind = mounted ? 'mount' : 'projects';
|
|
583
|
-
|
|
584
|
-
// project token (a name or `.`) resolves under the active root uniformly.
|
|
585
|
-
const cwd = project === undefined ? CONTAINER_HOME_ROOT : resolveCwd(rootKind, project);
|
|
757
|
+
const cwd = launchCwd(mode, rootKind, project);
|
|
586
758
|
const fresh = homeFresh(machine.home);
|
|
587
759
|
const seedVersion = intent.seedVersion ?? SEED_VERSION;
|
|
588
760
|
const directTarget = hostPortKey(llm);
|
|
@@ -592,7 +764,7 @@ export function resolveRunPlan(intent, homeFresh) {
|
|
|
592
764
|
// (podman fails to allocate a TTY on a non-tty stdin). The CLI's broader
|
|
593
765
|
// no-TTY discipline (erroring when an interactive mode has no TTY) is a later
|
|
594
766
|
// task; here the argv simply omits -it for the one headless shape.
|
|
595
|
-
const headless = mode === 'pi' &&
|
|
767
|
+
const headless = mode === 'pi' && isHeadlessPiArgs(intent.piArgs);
|
|
596
768
|
const netcageArgs = ['run'];
|
|
597
769
|
// --rm by DEFAULT (throwaway); --keep leaves the container kept.
|
|
598
770
|
if (intent.keep !== true)
|
|
@@ -704,12 +876,12 @@ function containerSeedThen(seedVersion, exec) {
|
|
|
704
876
|
* its internal shape is not a contract (compare only keys this function makes).
|
|
705
877
|
*/
|
|
706
878
|
export function keptContainerKey(intent) {
|
|
707
|
-
const { machine, projectsRoot, project, mountParent } = intent;
|
|
879
|
+
const { machine, mode, projectsRoot, project, mountParent } = intent;
|
|
708
880
|
const mounted = nonEmpty(mountParent) !== undefined;
|
|
709
881
|
const rootKind = mounted ? 'mount' : 'projects';
|
|
710
882
|
// The same cwd resolution resolveRunPlan uses, so the key names the exact
|
|
711
883
|
// container a matching launch would run in (its conversation key).
|
|
712
|
-
const cwd =
|
|
884
|
+
const cwd = launchCwd(mode, rootKind, project);
|
|
713
885
|
return [
|
|
714
886
|
`machine=${machine.name}`,
|
|
715
887
|
`projectsRoot=${projectsRoot}`,
|
|
@@ -1411,6 +1583,23 @@ function shippedFile(rel) {
|
|
|
1411
1583
|
}
|
|
1412
1584
|
return undefined;
|
|
1413
1585
|
}
|
|
1586
|
+
/**
|
|
1587
|
+
* anon-pi's own version, read from the package.json shipped in the package root
|
|
1588
|
+
* (resolved via shippedFile). Returns undefined if it cannot be found/parsed, so
|
|
1589
|
+
* `--version` can fall back to a placeholder. Read-only.
|
|
1590
|
+
*/
|
|
1591
|
+
export function anonPiVersion() {
|
|
1592
|
+
const pkg = shippedFile('package.json');
|
|
1593
|
+
if (!pkg)
|
|
1594
|
+
return undefined;
|
|
1595
|
+
try {
|
|
1596
|
+
const parsed = JSON.parse(readFileSync(pkg, 'utf8'));
|
|
1597
|
+
return typeof parsed.version === 'string' ? parsed.version : undefined;
|
|
1598
|
+
}
|
|
1599
|
+
catch {
|
|
1600
|
+
return undefined;
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1414
1603
|
/**
|
|
1415
1604
|
* PURE: parse the tokens AFTER `machine` into a MachineCommand. Validates the
|
|
1416
1605
|
* machine name via validateName (the reserved-name / traversal guard) so the CLI
|
|
@@ -1556,7 +1745,12 @@ export const HELP = `anon-pi - run pi on anonymized, jailed machines (netcage: f
|
|
|
1556
1745
|
USAGE
|
|
1557
1746
|
anon-pi MENU: pick a project (pi), a shell, or a new project
|
|
1558
1747
|
anon-pi <project> pi in the project (${CONTAINER_PROJECTS_ROOT}/<project>); exit pi -> host
|
|
1559
|
-
anon-pi <project> <pi-args…> forward args to pi (headless
|
|
1748
|
+
anon-pi <project> <pi-args…> forward args to pi (e.g. -p for a headless one-shot)
|
|
1749
|
+
anon-pi --session <id> resume a pi session by id (forwarded to pi; no project needed)
|
|
1750
|
+
anon-pi --continue continue your most recent pi session (also -r/--resume, --fork)
|
|
1751
|
+
anon-pi --list-models list the models pi sees (also --models; no project needed)
|
|
1752
|
+
anon-pi pi <pi-args…> run pi with ANY args and no project (the passthrough)
|
|
1753
|
+
anon-pi --version print anon-pi's version (also -V)
|
|
1560
1754
|
anon-pi --shell [<project>] a jailed bash (at ~, or cd'd into <project>) - the project-hopper
|
|
1561
1755
|
anon-pi -m <machine> [<p>] the same, on <machine> (its own image + home + conversations)
|
|
1562
1756
|
anon-pi --mount <parent> [<p>] root at a HOST parent folder instead of the projects root
|