@plori/cli 0.2.7 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +92 -2
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -9,6 +9,32 @@ get_run_result → `result`, …).
9
9
 
10
10
  ## Install
11
11
 
12
+ ```sh
13
+ curl -fsSL https://plori.ai/install.sh | sh
14
+ ```
15
+
16
+ Windows:
17
+
18
+ ```powershell
19
+ irm https://plori.ai/install.ps1 | iex
20
+ ```
21
+
22
+ Both installers drop a single static binary (no sudo, no Node) and verify it
23
+ against the sha512 the npm registry publishes for that build. Re-run either one
24
+ to upgrade. `PLORI_VERSION`, `PLORI_INSTALL_DIR` and `PLORI_REGISTRY` override
25
+ the defaults.
26
+
27
+ `install.sh` installs to `~/.local/bin` and edits no shell rc file, so if that
28
+ directory is not already on your PATH the script prints the one line to add and
29
+ `plori` runs only once you have added it. `install.ps1` installs to
30
+ `%LOCALAPPDATA%\plori\bin` and does add that to your user PATH, so a new
31
+ terminal finds it. The scripts are `web/public/install.sh` and
32
+ `web/public/install.ps1` in this repository;
33
+ `.github/scripts/install-sh.test.sh` runs the shell one in clean musl and glibc
34
+ containers.
35
+
36
+ If you would rather go through npm:
37
+
12
38
  ```sh
13
39
  npm i -g @plori/cli
14
40
  ```
@@ -47,9 +73,65 @@ export PLORI_API_KEY=plori_sk_…
47
73
  `PLORI_BASE_URL` (or `--base-url`) points the CLI at a non-production
48
74
  control-plane, e.g. a local `uat-server`.
49
75
 
76
+ ## Attach
77
+
78
+ `plori attach` opens a live session in your terminal: the recent history, a
79
+ prompt, streaming output, and the approval queue in one place. It is the same
80
+ session the web app shows, so a turn you send here appears in an open browser
81
+ tab as it streams.
82
+
83
+ **The terminal does not give the agent access to your local files.** The shell,
84
+ the disk, and the files are the agent's own cloud computer. Nothing on your
85
+ machine is uploaded, and nothing the agent writes lands in the directory you
86
+ ran the command from.
87
+
88
+ ```sh
89
+ plori attach mate # the agent's most recent session
90
+ plori attach mate --session <id> # a specific session of that agent
91
+ plori attach mate --history 50 # replay 50 turns instead of the default 20
92
+ plori attach mate --read-only # tail it, no prompt
93
+ plori attach mate --verbose # also print reasoning and tool results
94
+ ```
95
+
96
+ The argument is an agent name, an agent id, or a session id, so a session id
97
+ copied out of the web app works on its own. With no stored credentials, attach
98
+ runs the browser sign-in inline and continues once it completes. `--history 0`
99
+ replays nothing; `--history all` replays everything one request can carry,
100
+ which stops at the newest 20,000 stored events. `--base-url` (or
101
+ `PLORI_BASE_URL`) points attach at a non-production control-plane, like every
102
+ other command.
103
+
104
+ While attached:
105
+
106
+ - A line of text sends a turn. If a turn is already running, the line steers
107
+ that turn instead of starting a second one, and attach prints whether the
108
+ server gave it to the model straight away or queued it for the next round.
109
+ - `Ctrl-C` cancels the running turn. Press it again within two seconds to
110
+ leave.
111
+ - `Ctrl-D` on an empty line, or `/exit` (`/quit`), detaches only. The run keeps
112
+ going on the server, and attaching again picks it up where it is.
113
+ - The slash commands are `/sessions` (list this agent's sessions), `/new`
114
+ (start one), `/model <slug>` (change the model), `/web` (print this session's
115
+ web address), `/exit`, and `/help`. Anything else that starts with `/` comes
116
+ back as unknown.
117
+
118
+ Approvals and input requests are answered where they appear: `y` or `n` for an
119
+ approval, `a` to answer yes and grant standing approval when the request
120
+ carries a consent tool, a line for a value, and a no-echo read for a secret,
121
+ which is never printed to the screen and never reaches your shell history.
122
+
123
+ The prompt needs a terminal on both ends. With `--read-only`, or when either
124
+ stdin or stdout is redirected, attach drops the prompt and tails the session
125
+ instead, so `plori attach mate | tee session.log` writes a plain transcript
126
+ with no prompt, no echoed keys, and no redraw escape codes. A tail cannot
127
+ answer, so a request that arrives during one is printed with the session's web
128
+ address to answer it at, and a secret is refused rather than read where it
129
+ would echo.
130
+
50
131
  ## Use
51
132
 
52
133
  ```sh
134
+ plori attach mate # open the live session (interactive)
53
135
  plori create mate # get-or-create an agent named "mate"
54
136
  plori run mate "clone repo X and run the tests"
55
137
  plori run mate "long job" --no-wait # returns a run id immediately
@@ -71,8 +153,10 @@ plori workflows execution "rss digest" <exec-id> # poll one run
71
153
 
72
154
  Agents are addressed by name or UUID. Every command accepts `--json`; when
73
155
  stdout is not a TTY the output is JSON automatically, so scripts and agents
74
- can parse without flags. Errors go to stderr; exit codes: 0 success, 1 API
75
- failure, 2 usage error.
156
+ can parse without flags. `plori attach` is the one exception: it is a live
157
+ stream rather than a single result, so it always writes plain text, and a
158
+ redirected stream turns it into a read-only tail. Errors go to stderr; exit
159
+ codes: 0 success, 1 API failure, 2 usage error.
76
160
 
77
161
  ## For agent authors
78
162
 
@@ -87,4 +171,10 @@ row without a `consent_tool` the flag grants nothing. Prefer one long-lived
87
171
  agent (`create` returns the existing agent for a reused name) over creating
88
172
  new ones.
89
173
 
174
+ `plori attach` is for a human at a terminal: it takes over the keyboard and
175
+ expects someone to answer approvals. A calling agent should stay on
176
+ `run`/`result`/`inputs`/`answer`, which are one-shot and parse as JSON. If you
177
+ only want to watch a session, `plori attach --read-only` is the scriptable
178
+ form, and redirecting either stdin or stdout already selects it.
179
+
90
180
  Wire-level acceptance cases live in [UAT.md](UAT.md).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@plori/cli",
3
3
  "description": "plori (plori.ai): a cloud AI agent with its own computer - persistent disk, real CLI tools, and memory. The official plori CLI.",
4
- "version": "0.2.7",
4
+ "version": "0.3.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://plori.ai",
7
7
  "repository": {
@@ -26,10 +26,10 @@
26
26
  "node": ">=18"
27
27
  },
28
28
  "optionalDependencies": {
29
- "@plori/cli-darwin-arm64": "0.2.7",
30
- "@plori/cli-darwin-x64": "0.2.7",
31
- "@plori/cli-linux-x64": "0.2.7",
32
- "@plori/cli-linux-arm64": "0.2.7",
33
- "@plori/cli-win32-x64": "0.2.7"
29
+ "@plori/cli-darwin-arm64": "0.3.0",
30
+ "@plori/cli-darwin-x64": "0.3.0",
31
+ "@plori/cli-linux-x64": "0.3.0",
32
+ "@plori/cli-linux-arm64": "0.3.0",
33
+ "@plori/cli-win32-x64": "0.3.0"
34
34
  }
35
35
  }