anon-pi 0.10.0 → 0.11.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 +32 -0
- package/dist/anon-pi.d.ts +129 -1
- package/dist/anon-pi.d.ts.map +1 -1
- package/dist/anon-pi.js +240 -0
- package/dist/anon-pi.js.map +1 -1
- package/dist/cli.js +272 -6
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/src/anon-pi.ts +314 -0
- package/src/cli.ts +315 -7
package/README.md
CHANGED
|
@@ -62,6 +62,8 @@ anon-pi --list-models list the models pi sees (also --models; no projec
|
|
|
62
62
|
anon-pi pi <pi-args…> run pi with ANY args and no project (the passthrough)
|
|
63
63
|
anon-pi --version print anon-pi's version (also -V)
|
|
64
64
|
anon-pi --shell [<project>] a jailed bash (at ~, or cd'd into <project>) - the project-hopper
|
|
65
|
+
anon-pi forward [<p>] [--port …] open a host port onto a running container's in-jail server
|
|
66
|
+
anon-pi ports [<project>] list a running container's open in-jail TCP listeners
|
|
65
67
|
anon-pi -m <machine> [<p>] the same, on <machine> (its own image + home + conversations)
|
|
66
68
|
anon-pi --mount <parent> [<p>] root at a HOST parent folder instead of the projects root
|
|
67
69
|
anon-pi init onboard: verify your proxy, capture your local model, pick an image
|
|
@@ -86,6 +88,8 @@ Every subcommand carries its own help: `anon-pi --help` (the launch surface), `a
|
|
|
86
88
|
| Fork a session into a project | `anon-pi <project> --fork <id>` (`.` for the root; created on demand) |
|
|
87
89
|
| Run a one-shot prompt (scriptable) | `anon-pi <project> -p "…"` |
|
|
88
90
|
| Hop between projects / poke the box | `anon-pi --shell` then `cd /projects/<p> && pi` |
|
|
91
|
+
| Open an in-jail server on the host | `anon-pi forward <project> --port 3001` (or `8080:3001`) |
|
|
92
|
+
| See a container's open in-jail ports | `anon-pi ports <project>` |
|
|
89
93
|
| A scratch pi not tied to a subfolder | `anon-pi .` |
|
|
90
94
|
| Use a separate anonymized environment | `anon-pi -m <machine> <project>` |
|
|
91
95
|
| Jail pi into a host folder you edit with host tools | `anon-pi --mount <host-parent> <subfolder>` |
|
|
@@ -123,6 +127,34 @@ anon-pi --shell recon # bash cd'd into /projects/recon
|
|
|
123
127
|
|
|
124
128
|
From inside the shell you can `cd` between `/projects/*` and run `pi` yourself in whichever one you want. The shell forwards no arguments (`anon-pi --shell recon extra` is an error); run pi from inside it instead. Same forced-egress jail as a pi launch.
|
|
125
129
|
|
|
130
|
+
### Reaching an in-jail server from the host (`forward` / `ports`)
|
|
131
|
+
|
|
132
|
+
A jailed tool sometimes runs a server you want to open on the host: a dev/preview server on `:3001`, a local API. The jail deliberately publishes no ports (that would open an inbound path around the forced egress), so host access is a separate, explicit verb, the way `kubectl port-forward` / `ssh -L` work. anon-pi wraps netcage's `forward` so you never handle the raw container name (needs **netcage >= 0.9.0**):
|
|
133
|
+
|
|
134
|
+
```sh
|
|
135
|
+
# terminal 1: a running session with a server inside (e.g. pi started `pnpm dev` on :3001)
|
|
136
|
+
anon-pi recon
|
|
137
|
+
# terminal 2: open that port on your host
|
|
138
|
+
anon-pi forward recon --port 3001 # host 127.0.0.1:3001 -> jail 3001, until Ctrl-C
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
The port is host-first, like docker/kubectl, so you can bind it on a **different host port**:
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
anon-pi forward recon --port 8080:3001 # host 8080 -> jail 3001
|
|
145
|
+
anon-pi forward recon --port 3001 --bind 0.0.0.0 # LAN-visible (netcage warns; loopback is the default)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The positional is always the **project** (a numeric name like `3001` is a project, never a port), and it only **filters** which containers are offered. If several sessions match (you can run `anon-pi recon` in two terminals), anon-pi shows a picker, each row annotated with that container's open in-jail ports.
|
|
149
|
+
|
|
150
|
+
**Don't know the port?** Omit `--port` and anon-pi lists the container's open listeners and prompts you (defaulting to the obvious one), then asks whether to expose it on a different host port. You can also just list them:
|
|
151
|
+
|
|
152
|
+
```sh
|
|
153
|
+
anon-pi ports recon # the container's open in-jail TCP listeners
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
`ports` reads the jail's listeners **image-independently** (netcage reads `/proc/net/tcp*` via the sidecar), so it works even for a minimal image with no `ss`/`netstat`/`nc`. An explicit `--port` may name a port that **isn't open yet**: the forward binds the host side immediately and reaches into the jail on the first connection, so you can set it up before the server starts. Forwarding works for both throwaway (`--rm`) and `--keep` containers, for as long as the container is running.
|
|
157
|
+
|
|
126
158
|
### Headless / one-shot
|
|
127
159
|
|
|
128
160
|
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.
|
package/dist/anon-pi.d.ts
CHANGED
|
@@ -680,6 +680,134 @@ export declare function keptContainerKey(intent: LaunchIntent): string;
|
|
|
680
680
|
* decision is a pure function of (intent, listing).
|
|
681
681
|
*/
|
|
682
682
|
export declare function resolveRunVsStart(intent: LaunchIntent, kept: readonly KeptContainer[]): RunVsStart;
|
|
683
|
+
/**
|
|
684
|
+
* PURE: the decoded fields of a stamped keptContainerKey (the reverse of
|
|
685
|
+
* keptContainerKey's `k=v\n` record). Used by `forward`/`ports` to filter the
|
|
686
|
+
* running managed containers by machine + project WITHOUT reconstructing the
|
|
687
|
+
* exact key (which would couple to launchCwd). Unknown/missing fields are ''.
|
|
688
|
+
*/
|
|
689
|
+
export interface KeptKeyFields {
|
|
690
|
+
machine: string;
|
|
691
|
+
projectsRoot: string;
|
|
692
|
+
mountParent: string;
|
|
693
|
+
cwd: string;
|
|
694
|
+
}
|
|
695
|
+
/** PURE: parse a stamped keptContainerKey back into its fields (best-effort). */
|
|
696
|
+
export declare function parseKeptKey(key: string): KeptKeyFields;
|
|
697
|
+
/**
|
|
698
|
+
* PURE: the leaf name of a stamped key's cwd, i.e. the project a container hosts
|
|
699
|
+
* (`/projects/recon` -> `recon`, `/projects` -> '.', `/work/x` -> `x`, `/root`
|
|
700
|
+
* -> '' for a bare shell). Used to filter the picker by `<project>` and to label
|
|
701
|
+
* each row. A root cwd (`/projects`, `/work`) maps to the `.` root token.
|
|
702
|
+
*/
|
|
703
|
+
export declare function keyProject(fields: KeptKeyFields): string;
|
|
704
|
+
/**
|
|
705
|
+
* PURE: pick the RUNNING anon-pi containers a `forward`/`ports` should offer.
|
|
706
|
+
* Filters the supplied running managed containers (each with its decoded key
|
|
707
|
+
* fields) to those on `machine`, optionally narrowed to `project` (its leaf cwd
|
|
708
|
+
* name). With no project, every anon-pi container on the machine qualifies. The
|
|
709
|
+
* caller resolves 0 (error) / 1 (auto) / many (picker).
|
|
710
|
+
*/
|
|
711
|
+
export declare function resolveManagedMatches(args: {
|
|
712
|
+
containers: readonly ManagedContainer[];
|
|
713
|
+
machine: string;
|
|
714
|
+
project?: string;
|
|
715
|
+
}): ManagedContainer[];
|
|
716
|
+
/**
|
|
717
|
+
* A RUNNING netcage-managed container the CLI surfaces to the pure forward/ports
|
|
718
|
+
* resolution: its anon-pi identity `key` (stamped label, decoded), the `ref` to
|
|
719
|
+
* pass to `netcage forward`/`ports` (id or name), and a human `name` for the
|
|
720
|
+
* picker. Mirrors KeptContainer with the display name added.
|
|
721
|
+
*/
|
|
722
|
+
export interface ManagedContainer {
|
|
723
|
+
key: string;
|
|
724
|
+
ref: string;
|
|
725
|
+
name: string;
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* A parsed, validated port argument for `forward`: the in-jail port to reach and
|
|
729
|
+
* the host port to bind it on (equal to the jail port unless a `<hostPort>:`
|
|
730
|
+
* prefix remapped it). `raw` is the exact token to hand to netcage verbatim
|
|
731
|
+
* (`3001` or `8080:3001`), so anon-pi never re-serialises netcage's grammar.
|
|
732
|
+
*/
|
|
733
|
+
export interface ForwardPort {
|
|
734
|
+
hostPort: number;
|
|
735
|
+
jailPort: number;
|
|
736
|
+
raw: string;
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* PURE: parse a `forward` port token `[<hostPort>:]<jailPort>` (docker/kubectl
|
|
740
|
+
* host-first order). One port `3001` maps host 3001 -> jail 3001; `8080:3001`
|
|
741
|
+
* maps host 8080 -> jail 3001. Both sides must be integers in 1..65535. Throws
|
|
742
|
+
* AnonPiError on a bad shape / out-of-range / extra colon, with copy-pasteable
|
|
743
|
+
* guidance. `raw` is normalised to `<host>:<jail>` only when they differ, else
|
|
744
|
+
* the bare jail port, matching netcage's own accepted forms.
|
|
745
|
+
*/
|
|
746
|
+
export declare function parsePortArg(token: string): ForwardPort;
|
|
747
|
+
/** A parsed `anon-pi forward` command (pure; the CLI does the netcage I/O). */
|
|
748
|
+
export interface ForwardCommand {
|
|
749
|
+
project?: string;
|
|
750
|
+
machine: string;
|
|
751
|
+
machineExplicit: boolean;
|
|
752
|
+
/** The parsed port, or undefined to prompt from the container's listeners. */
|
|
753
|
+
port?: ForwardPort;
|
|
754
|
+
/** `--bind <addr>` passed through to netcage verbatim (undefined => netcage default). */
|
|
755
|
+
bind?: string;
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* PURE: parse `anon-pi forward [<project>] [--port <[hostPort:]jailPort>]
|
|
759
|
+
* [--bind <addr>] [-m <machine>]`. The bare positional is ALWAYS the project (so
|
|
760
|
+
* a numeric name like `3001` is a project, never a port); the port is the
|
|
761
|
+
* `--port`/`-p` flag, removing the number-vs-project ambiguity. `--bind` is
|
|
762
|
+
* passed through to netcage (which validates 127.0.0.1 / 0.0.0.0). Throws
|
|
763
|
+
* AnonPiError on an unknown flag, a missing flag argument, a second positional,
|
|
764
|
+
* or a bad port.
|
|
765
|
+
*/
|
|
766
|
+
export declare function parseForwardArgs(args: readonly string[]): ForwardCommand;
|
|
767
|
+
/** A parsed `anon-pi ports` command (pure). */
|
|
768
|
+
export interface PortsCommand {
|
|
769
|
+
project?: string;
|
|
770
|
+
machine: string;
|
|
771
|
+
machineExplicit: boolean;
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* PURE: parse `anon-pi ports [<project>] [-m <machine>]`. Like forward but with
|
|
775
|
+
* no port/bind: it lists a container's open in-jail listeners. The bare
|
|
776
|
+
* positional is the project filter.
|
|
777
|
+
*/
|
|
778
|
+
export declare function parsePortsArgs(args: readonly string[]): PortsCommand;
|
|
779
|
+
/**
|
|
780
|
+
* A jail TCP LISTEN socket, as netcage's `ports --json` reports it: the bind
|
|
781
|
+
* `address`, the `port`, and `loopbackOnly` (bound 127.0.0.0/8 or ::1). The
|
|
782
|
+
* contract is netcage's (ADR-0015); anon-pi only consumes it.
|
|
783
|
+
*/
|
|
784
|
+
export interface NetcageListener {
|
|
785
|
+
address: string;
|
|
786
|
+
port: number;
|
|
787
|
+
loopbackOnly: boolean;
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* PURE: parse `netcage ports --json` output into listeners (best-effort). Keeps
|
|
791
|
+
* only well-formed `{address:string, port:int, loopbackOnly:bool}` entries;
|
|
792
|
+
* anything else (a netcage version drift, a non-array) yields []. The caller
|
|
793
|
+
* treats [] as "no hint", never an error.
|
|
794
|
+
*/
|
|
795
|
+
export declare function parseNetcagePortsJson(stdout: string): NetcageListener[];
|
|
796
|
+
/** netcage's in-jail DNS forwarder always listens here; anon-pi hides it from the port hint. */
|
|
797
|
+
export declare const NETCAGE_DNS_PORT = 53;
|
|
798
|
+
/**
|
|
799
|
+
* PURE: the in-jail ports worth offering as forward targets: the listeners with
|
|
800
|
+
* netcage's own `127.0.0.1:53` DNS forwarder dropped (it is never something a
|
|
801
|
+
* user forwards), de-duplicated by port, sorted ascending. A server bound on
|
|
802
|
+
* both IPv4 and IPv6 (two listeners, same port) collapses to one entry.
|
|
803
|
+
*/
|
|
804
|
+
export declare function forwardablePorts(listeners: readonly NetcageListener[]): number[];
|
|
805
|
+
/**
|
|
806
|
+
* PURE: a compact one-line hint of a container's forwardable in-jail ports for
|
|
807
|
+
* the picker / the pre-forward confirmation, e.g. `open: 3001, 5173` or
|
|
808
|
+
* `open: (none detected)`. Never includes the DNS forwarder (forwardablePorts).
|
|
809
|
+
*/
|
|
810
|
+
export declare function formatPortsHint(listeners: readonly NetcageListener[]): string;
|
|
683
811
|
/**
|
|
684
812
|
* PURE: the pi session-dir slug for a project, i.e. pathSlug of its jail cwd
|
|
685
813
|
* `/projects/<name>`. Because the cwd is the SAME on every machine (files are
|
|
@@ -1269,5 +1397,5 @@ export declare function setImageWarning(name: string, oldImage: string | undefin
|
|
|
1269
1397
|
/** Read the AnonPiEnv from a process env map (kept separate so tests inject one). */
|
|
1270
1398
|
export declare function envFromProcess(penv: Record<string, string | undefined>): AnonPiEnv;
|
|
1271
1399
|
/** The --help text (kept here so it is covered by the same module). */
|
|
1272
|
-
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, in its own project (also -r/--resume)\n anon-pi <project> --fork <id> fork a session into <project> (`.`=root; --continue too; project required)\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";
|
|
1400
|
+
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, in its own project (also -r/--resume)\n anon-pi <project> --fork <id> fork a session into <project> (`.`=root; --continue too; project required)\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 forward [<p>] [--port \u2026] open a host port onto a running container's in-jail server\n anon-pi ports [<project>] list a running container's open in-jail TCP listeners\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";
|
|
1273
1401
|
//# sourceMappingURL=anon-pi.d.ts.map
|
package/dist/anon-pi.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
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,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,i7GAkDhB,CAAC"}
|
package/dist/anon-pi.js
CHANGED
|
@@ -1079,6 +1079,244 @@ export function resolveRunVsStart(intent, kept) {
|
|
|
1079
1079
|
const match = kept.find((c) => c.key === want);
|
|
1080
1080
|
return match ? { action: 'start', ref: match.ref } : { action: 'run' };
|
|
1081
1081
|
}
|
|
1082
|
+
/** PURE: parse a stamped keptContainerKey back into its fields (best-effort). */
|
|
1083
|
+
export function parseKeptKey(key) {
|
|
1084
|
+
const out = {
|
|
1085
|
+
machine: '',
|
|
1086
|
+
projectsRoot: '',
|
|
1087
|
+
mountParent: '',
|
|
1088
|
+
cwd: '',
|
|
1089
|
+
};
|
|
1090
|
+
for (const line of key.split('\n')) {
|
|
1091
|
+
const eq = line.indexOf('=');
|
|
1092
|
+
if (eq < 0)
|
|
1093
|
+
continue;
|
|
1094
|
+
const k = line.slice(0, eq);
|
|
1095
|
+
const v = line.slice(eq + 1);
|
|
1096
|
+
if (k === 'machine')
|
|
1097
|
+
out.machine = v;
|
|
1098
|
+
else if (k === 'projectsRoot')
|
|
1099
|
+
out.projectsRoot = v;
|
|
1100
|
+
else if (k === 'mountParent')
|
|
1101
|
+
out.mountParent = v;
|
|
1102
|
+
else if (k === 'cwd')
|
|
1103
|
+
out.cwd = v;
|
|
1104
|
+
}
|
|
1105
|
+
return out;
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* PURE: the leaf name of a stamped key's cwd, i.e. the project a container hosts
|
|
1109
|
+
* (`/projects/recon` -> `recon`, `/projects` -> '.', `/work/x` -> `x`, `/root`
|
|
1110
|
+
* -> '' for a bare shell). Used to filter the picker by `<project>` and to label
|
|
1111
|
+
* each row. A root cwd (`/projects`, `/work`) maps to the `.` root token.
|
|
1112
|
+
*/
|
|
1113
|
+
export function keyProject(fields) {
|
|
1114
|
+
const cwd = fields.cwd;
|
|
1115
|
+
if (cwd === CONTAINER_PROJECTS_ROOT || cwd === CONTAINER_MOUNT_ROOT) {
|
|
1116
|
+
return ROOT_TOKEN;
|
|
1117
|
+
}
|
|
1118
|
+
if (cwd === CONTAINER_HOME_ROOT)
|
|
1119
|
+
return ''; // a bare shell, no project
|
|
1120
|
+
const slash = cwd.lastIndexOf('/');
|
|
1121
|
+
return slash < 0 ? cwd : cwd.slice(slash + 1);
|
|
1122
|
+
}
|
|
1123
|
+
/**
|
|
1124
|
+
* PURE: pick the RUNNING anon-pi containers a `forward`/`ports` should offer.
|
|
1125
|
+
* Filters the supplied running managed containers (each with its decoded key
|
|
1126
|
+
* fields) to those on `machine`, optionally narrowed to `project` (its leaf cwd
|
|
1127
|
+
* name). With no project, every anon-pi container on the machine qualifies. The
|
|
1128
|
+
* caller resolves 0 (error) / 1 (auto) / many (picker).
|
|
1129
|
+
*/
|
|
1130
|
+
export function resolveManagedMatches(args) {
|
|
1131
|
+
const { containers, machine, project } = args;
|
|
1132
|
+
return containers.filter((c) => {
|
|
1133
|
+
const f = parseKeptKey(c.key);
|
|
1134
|
+
if (f.machine !== machine)
|
|
1135
|
+
return false;
|
|
1136
|
+
if (project !== undefined && keyProject(f) !== project)
|
|
1137
|
+
return false;
|
|
1138
|
+
return true;
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* PURE: parse a `forward` port token `[<hostPort>:]<jailPort>` (docker/kubectl
|
|
1143
|
+
* host-first order). One port `3001` maps host 3001 -> jail 3001; `8080:3001`
|
|
1144
|
+
* maps host 8080 -> jail 3001. Both sides must be integers in 1..65535. Throws
|
|
1145
|
+
* AnonPiError on a bad shape / out-of-range / extra colon, with copy-pasteable
|
|
1146
|
+
* guidance. `raw` is normalised to `<host>:<jail>` only when they differ, else
|
|
1147
|
+
* the bare jail port, matching netcage's own accepted forms.
|
|
1148
|
+
*/
|
|
1149
|
+
export function parsePortArg(token) {
|
|
1150
|
+
const bad = (why) => {
|
|
1151
|
+
throw new AnonPiError(`anon-pi: invalid --port ${JSON.stringify(token)}: ${why}. ` +
|
|
1152
|
+
'Use <jailPort> (e.g. 3001) or <hostPort>:<jailPort> (e.g. 8080:3001), ' +
|
|
1153
|
+
'each 1..65535.');
|
|
1154
|
+
};
|
|
1155
|
+
const parts = token.split(':');
|
|
1156
|
+
if (parts.length > 2)
|
|
1157
|
+
bad('too many colons');
|
|
1158
|
+
const toPort = (s) => {
|
|
1159
|
+
if (!/^[0-9]+$/.test(s))
|
|
1160
|
+
bad(`${JSON.stringify(s)} is not a port number`);
|
|
1161
|
+
const n = Number(s);
|
|
1162
|
+
if (n < 1 || n > 65535)
|
|
1163
|
+
bad(`${s} is out of range (1..65535)`);
|
|
1164
|
+
return n;
|
|
1165
|
+
};
|
|
1166
|
+
if (parts.length === 1) {
|
|
1167
|
+
const p = toPort(parts[0]);
|
|
1168
|
+
return { hostPort: p, jailPort: p, raw: String(p) };
|
|
1169
|
+
}
|
|
1170
|
+
const hostPort = toPort(parts[0]);
|
|
1171
|
+
const jailPort = toPort(parts[1]);
|
|
1172
|
+
const raw = hostPort === jailPort ? String(jailPort) : `${hostPort}:${jailPort}`;
|
|
1173
|
+
return { hostPort, jailPort, raw };
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* PURE: parse `anon-pi forward [<project>] [--port <[hostPort:]jailPort>]
|
|
1177
|
+
* [--bind <addr>] [-m <machine>]`. The bare positional is ALWAYS the project (so
|
|
1178
|
+
* a numeric name like `3001` is a project, never a port); the port is the
|
|
1179
|
+
* `--port`/`-p` flag, removing the number-vs-project ambiguity. `--bind` is
|
|
1180
|
+
* passed through to netcage (which validates 127.0.0.1 / 0.0.0.0). Throws
|
|
1181
|
+
* AnonPiError on an unknown flag, a missing flag argument, a second positional,
|
|
1182
|
+
* or a bad port.
|
|
1183
|
+
*/
|
|
1184
|
+
export function parseForwardArgs(args) {
|
|
1185
|
+
const fail = (msg) => {
|
|
1186
|
+
throw new AnonPiError(`anon-pi: ${msg}\nRun \`anon-pi forward --help\`.`);
|
|
1187
|
+
};
|
|
1188
|
+
let project;
|
|
1189
|
+
let machine = DEFAULT_MACHINE;
|
|
1190
|
+
let machineExplicit = false;
|
|
1191
|
+
let port;
|
|
1192
|
+
let bind;
|
|
1193
|
+
for (let i = 0; i < args.length; i++) {
|
|
1194
|
+
const a = args[i];
|
|
1195
|
+
if (a === '-m' || a === '--machine') {
|
|
1196
|
+
const v = args[++i];
|
|
1197
|
+
if (v === undefined)
|
|
1198
|
+
fail(`${a} needs a machine name`);
|
|
1199
|
+
machine = validateName(v, 'machine');
|
|
1200
|
+
machineExplicit = true;
|
|
1201
|
+
}
|
|
1202
|
+
else if (a === '-p' || a === '--port') {
|
|
1203
|
+
const v = args[++i];
|
|
1204
|
+
if (v === undefined)
|
|
1205
|
+
fail(`${a} needs a port ([hostPort:]jailPort)`);
|
|
1206
|
+
port = parsePortArg(v);
|
|
1207
|
+
}
|
|
1208
|
+
else if (a === '--bind') {
|
|
1209
|
+
const v = args[++i];
|
|
1210
|
+
if (v === undefined)
|
|
1211
|
+
fail('--bind needs an address (127.0.0.1 or 0.0.0.0)');
|
|
1212
|
+
bind = v;
|
|
1213
|
+
}
|
|
1214
|
+
else if (a.startsWith('-')) {
|
|
1215
|
+
fail(`unknown option: ${a}`);
|
|
1216
|
+
}
|
|
1217
|
+
else if (project === undefined) {
|
|
1218
|
+
project = validateName(a, 'project');
|
|
1219
|
+
}
|
|
1220
|
+
else {
|
|
1221
|
+
fail(`unexpected argument: ${a} (forward takes at most one project)`);
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
return { project, machine, machineExplicit, port, bind };
|
|
1225
|
+
}
|
|
1226
|
+
/**
|
|
1227
|
+
* PURE: parse `anon-pi ports [<project>] [-m <machine>]`. Like forward but with
|
|
1228
|
+
* no port/bind: it lists a container's open in-jail listeners. The bare
|
|
1229
|
+
* positional is the project filter.
|
|
1230
|
+
*/
|
|
1231
|
+
export function parsePortsArgs(args) {
|
|
1232
|
+
const fail = (msg) => {
|
|
1233
|
+
throw new AnonPiError(`anon-pi: ${msg}\nRun \`anon-pi ports --help\`.`);
|
|
1234
|
+
};
|
|
1235
|
+
let project;
|
|
1236
|
+
let machine = DEFAULT_MACHINE;
|
|
1237
|
+
let machineExplicit = false;
|
|
1238
|
+
for (let i = 0; i < args.length; i++) {
|
|
1239
|
+
const a = args[i];
|
|
1240
|
+
if (a === '-m' || a === '--machine') {
|
|
1241
|
+
const v = args[++i];
|
|
1242
|
+
if (v === undefined)
|
|
1243
|
+
fail(`${a} needs a machine name`);
|
|
1244
|
+
machine = validateName(v, 'machine');
|
|
1245
|
+
machineExplicit = true;
|
|
1246
|
+
}
|
|
1247
|
+
else if (a.startsWith('-')) {
|
|
1248
|
+
fail(`unknown option: ${a}`);
|
|
1249
|
+
}
|
|
1250
|
+
else if (project === undefined) {
|
|
1251
|
+
project = validateName(a, 'project');
|
|
1252
|
+
}
|
|
1253
|
+
else {
|
|
1254
|
+
fail(`unexpected argument: ${a} (ports takes at most one project)`);
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
return { project, machine, machineExplicit };
|
|
1258
|
+
}
|
|
1259
|
+
/**
|
|
1260
|
+
* PURE: parse `netcage ports --json` output into listeners (best-effort). Keeps
|
|
1261
|
+
* only well-formed `{address:string, port:int, loopbackOnly:bool}` entries;
|
|
1262
|
+
* anything else (a netcage version drift, a non-array) yields []. The caller
|
|
1263
|
+
* treats [] as "no hint", never an error.
|
|
1264
|
+
*/
|
|
1265
|
+
export function parseNetcagePortsJson(stdout) {
|
|
1266
|
+
let parsed;
|
|
1267
|
+
try {
|
|
1268
|
+
parsed = JSON.parse(stdout);
|
|
1269
|
+
}
|
|
1270
|
+
catch {
|
|
1271
|
+
return [];
|
|
1272
|
+
}
|
|
1273
|
+
if (!Array.isArray(parsed))
|
|
1274
|
+
return [];
|
|
1275
|
+
const out = [];
|
|
1276
|
+
for (const e of parsed) {
|
|
1277
|
+
if (!e || typeof e !== 'object')
|
|
1278
|
+
continue;
|
|
1279
|
+
const r = e;
|
|
1280
|
+
if (typeof r.address === 'string' &&
|
|
1281
|
+
typeof r.port === 'number' &&
|
|
1282
|
+
typeof r.loopbackOnly === 'boolean') {
|
|
1283
|
+
out.push({
|
|
1284
|
+
address: r.address,
|
|
1285
|
+
port: r.port,
|
|
1286
|
+
loopbackOnly: r.loopbackOnly,
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
return out;
|
|
1291
|
+
}
|
|
1292
|
+
/** netcage's in-jail DNS forwarder always listens here; anon-pi hides it from the port hint. */
|
|
1293
|
+
export const NETCAGE_DNS_PORT = 53;
|
|
1294
|
+
/**
|
|
1295
|
+
* PURE: the in-jail ports worth offering as forward targets: the listeners with
|
|
1296
|
+
* netcage's own `127.0.0.1:53` DNS forwarder dropped (it is never something a
|
|
1297
|
+
* user forwards), de-duplicated by port, sorted ascending. A server bound on
|
|
1298
|
+
* both IPv4 and IPv6 (two listeners, same port) collapses to one entry.
|
|
1299
|
+
*/
|
|
1300
|
+
export function forwardablePorts(listeners) {
|
|
1301
|
+
const ports = new Set();
|
|
1302
|
+
for (const l of listeners) {
|
|
1303
|
+
if (l.port === NETCAGE_DNS_PORT && l.loopbackOnly)
|
|
1304
|
+
continue;
|
|
1305
|
+
ports.add(l.port);
|
|
1306
|
+
}
|
|
1307
|
+
return [...ports].sort((a, b) => a - b);
|
|
1308
|
+
}
|
|
1309
|
+
/**
|
|
1310
|
+
* PURE: a compact one-line hint of a container's forwardable in-jail ports for
|
|
1311
|
+
* the picker / the pre-forward confirmation, e.g. `open: 3001, 5173` or
|
|
1312
|
+
* `open: (none detected)`. Never includes the DNS forwarder (forwardablePorts).
|
|
1313
|
+
*/
|
|
1314
|
+
export function formatPortsHint(listeners) {
|
|
1315
|
+
const ports = forwardablePorts(listeners);
|
|
1316
|
+
return ports.length === 0
|
|
1317
|
+
? 'open: (none detected)'
|
|
1318
|
+
: `open: ${ports.join(', ')}`;
|
|
1319
|
+
}
|
|
1082
1320
|
// --- The bare-launch menu: choice-list + per-machine project-usage record ----
|
|
1083
1321
|
//
|
|
1084
1322
|
// anon-pi's bare launch shows a HOST-side arrow-key menu of a machine's
|
|
@@ -1969,6 +2207,8 @@ USAGE
|
|
|
1969
2207
|
anon-pi pi <pi-args…> run pi with ANY args and no project (the passthrough)
|
|
1970
2208
|
anon-pi --version print anon-pi's version (also -V)
|
|
1971
2209
|
anon-pi --shell [<project>] a jailed bash (at ~, or cd'd into <project>) - the project-hopper
|
|
2210
|
+
anon-pi forward [<p>] [--port …] open a host port onto a running container's in-jail server
|
|
2211
|
+
anon-pi ports [<project>] list a running container's open in-jail TCP listeners
|
|
1972
2212
|
anon-pi -m <machine> [<p>] the same, on <machine> (its own image + home + conversations)
|
|
1973
2213
|
anon-pi --mount <parent> [<p>] root at a HOST parent folder instead of the projects root
|
|
1974
2214
|
anon-pi init onboard: verify your proxy, capture your local model, pick an image
|