@4pm/cli 1.2.3 → 1.2.4
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/LICENSE +30 -0
- package/README.md +40 -20
- package/dist/index.js +483 -5326
- package/package.json +2 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
4PM CLI — Source-Available License (All Rights Reserved)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 4PM. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This source code is made publicly viewable for transparency and security auditing
|
|
6
|
+
only. It is NOT open source and NOT free software.
|
|
7
|
+
|
|
8
|
+
You ARE permitted to:
|
|
9
|
+
- View and read this source code.
|
|
10
|
+
- Audit it for security and correctness.
|
|
11
|
+
|
|
12
|
+
You are NOT permitted, without a separate prior written agreement from the
|
|
13
|
+
copyright holder, to:
|
|
14
|
+
- Use, run, or execute this source (other than the official distributions —
|
|
15
|
+
the `@4pm/cli` npm package and the official container images — under their
|
|
16
|
+
own terms);
|
|
17
|
+
- Copy, modify, adapt, translate, or create derivative works;
|
|
18
|
+
- Redistribute, sublicense, sell, or otherwise make the source available; or
|
|
19
|
+
- Remove or alter this notice.
|
|
20
|
+
|
|
21
|
+
Contributions are accepted only under a separate Contributor License Agreement.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
25
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
26
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
27
|
+
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
28
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
29
|
+
|
|
30
|
+
Licensing inquiries: hiroshi.kaze1994@gmail.com
|
package/README.md
CHANGED
|
@@ -1,32 +1,52 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 4PM CLI (`@4pm/cli`)
|
|
2
2
|
|
|
3
|
-
**
|
|
4
|
-
the AI CLIs (`claude` / `codex`) plus
|
|
5
|
-
|
|
3
|
+
**The agent that runs on a 4PM worker machine.** It pairs with the 4PM server, opens an
|
|
4
|
+
encrypted WebSocket, and orchestrates the AI CLIs (`claude` / `codex`) plus `git` / `gh` /
|
|
5
|
+
`glab` / shell on your machine — streaming their output back to the 4PM dashboard.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
> **This repository is the public, source-available mirror of the 4PM CLI.** It is published
|
|
8
|
+
> for transparency and security auditing — you run an agent that spawns processes and uses
|
|
9
|
+
> your git credentials locally, so you can read exactly what it does. It is **not** open
|
|
10
|
+
> source: see [`LICENSE`](./LICENSE) (source-available, all rights reserved).
|
|
11
|
+
|
|
12
|
+
## Install (users)
|
|
10
13
|
|
|
11
14
|
```bash
|
|
12
|
-
|
|
15
|
+
npm i -g @4pm/cli # official distribution (npm)
|
|
16
|
+
4pm link # pair with your 4PM server, then:
|
|
17
|
+
4pm start # run the worker
|
|
13
18
|
```
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
Container images are published to `ghcr.io/4azuo/4pm-cli`. Configuration is via `4pm link`
|
|
21
|
+
+ the profile's `config.json`; environment variables are documented in
|
|
22
|
+
[`.env.example`](./.env.example).
|
|
23
|
+
|
|
24
|
+
> **Security note:** use an `https://` server URL in production. The WebSocket session
|
|
25
|
+
> encryption (ephemeral ECDH) protects confidentiality but does **not** authenticate the
|
|
26
|
+
> server — TLS does. Connecting over plaintext to a non-local host emits a warning.
|
|
27
|
+
|
|
28
|
+
## Build from source
|
|
16
29
|
|
|
17
|
-
|
|
18
|
-
|
|
30
|
+
The repository is standalone — it needs no other 4PM code. The `@4pm/*` shared packages are
|
|
31
|
+
provided as a trimmed, vendored subset under [`vendor/`](./vendor) (only the code the CLI
|
|
32
|
+
actually uses; server-internal types are excluded).
|
|
19
33
|
|
|
20
34
|
```bash
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
docker compose -f 31-docker/docker-compose.cli.yml exec cli 4pm attach # TUI (optional)
|
|
35
|
+
pnpm install
|
|
36
|
+
pnpm build # → dist/index.js (self-contained bundle)
|
|
37
|
+
pnpm typecheck
|
|
25
38
|
```
|
|
26
39
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
## How this repo relates to 4PM
|
|
41
|
+
|
|
42
|
+
The 4PM CLI is developed inside the private 4PM monorepo and embedded there as a git
|
|
43
|
+
submodule. The `vendor/` subset is generated from the monorepo's shared packages by
|
|
44
|
+
`scripts/vendor-shared.mjs`; do not hand-edit it. Releases are built and signed from the
|
|
45
|
+
monorepo and published here (npm + GitHub Release tarball + GHCR image).
|
|
46
|
+
|
|
47
|
+
## Layout
|
|
30
48
|
|
|
31
|
-
|
|
32
|
-
|
|
49
|
+
- `src/core/` — orchestration; `src/commands/` — subcommands (`link`/`start`/`attach`/…).
|
|
50
|
+
- `src/services/` — server REST calls; `src/ui/` — the Ink TUI (`4pm start` on a TTY).
|
|
51
|
+
- `src/common/`, `src/utils/`, `src/config/` — shared helpers, pure functions, config.
|
|
52
|
+
- `vendor/@4pm/*` — generated trimmed shared subset (see above).
|