@kontourai/station-cli 0.6.0 → 0.7.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 +97 -81
- package/dist/station.mjs +492 -352
- package/package.json +13 -14
package/README.md
CHANGED
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
# @kontourai/station-cli
|
|
2
2
|
|
|
3
|
-
Station is Kontour's local-first agent workspace
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
server, or another machine on your tailnet.
|
|
3
|
+
Station is Kontour's local-first agent workspace. It keeps execution history
|
|
4
|
+
and configured workflow evidence beside the work, on your laptop, a home
|
|
5
|
+
server, or another machine you connect to. A completed run is not a passed gate.
|
|
7
6
|
|
|
8
7
|
This package is the **client** CLI for those Stations. It is a terminal front end
|
|
9
8
|
for Stations that are already running: chat with agents, read and interrupt
|
|
10
|
-
sessions,
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
sessions, and manage projects, tasks, and skills over HTTP. It also supports
|
|
10
|
+
selected host-local operations against an
|
|
11
|
+
existing installation. Building and installing a backend remain checkout
|
|
12
|
+
operations; see [What this CLI does not do](#what-this-cli-does-not-do).
|
|
13
13
|
|
|
14
14
|
## Availability
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@kontourai/station-cli`) — until then they 404, and `./station` from a
|
|
19
|
-
Station checkout, further down this section, is the way to run the CLI.
|
|
16
|
+
`@kontourai/station-cli` is published on npm. Check the live version and
|
|
17
|
+
available dist-tags before scripting an install:
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
```bash
|
|
20
|
+
npm view @kontourai/station-cli version dist-tags
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Run the published stable client with `npx`:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
npx @kontourai/station-cli@latest --help
|
|
27
|
-
npx @kontourai/station-cli@nightly --help
|
|
28
27
|
```
|
|
29
28
|
|
|
30
|
-
`npx` resolves and caches
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
call: `npm install -g @kontourai/station-cli@<tag>`.
|
|
29
|
+
`npx` resolves and caches the published version per invocation. For
|
|
30
|
+
latency-sensitive or scripted use, an explicit global install pins one version
|
|
31
|
+
instead: `npm install -g @kontourai/station-cli@<version-or-published-tag>`.
|
|
32
|
+
Use a channel tag only after `npm view` reports it.
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
The examples below use `station` for a globally installed command. With `npx`,
|
|
35
|
+
keep the `npx @kontourai/station-cli@latest` prefix on subsequent commands too.
|
|
36
|
+
|
|
37
|
+
**Inside a Station checkout**, `./station` runs that tree's TypeScript sources
|
|
37
38
|
— this is the local-invocation path when the registry isn't the point (working
|
|
38
39
|
on the CLI itself, or a channel tag you don't want to depend on):
|
|
39
40
|
|
|
@@ -41,28 +42,33 @@ on the CLI itself, or a channel tag you don't want to depend on):
|
|
|
41
42
|
./station <command> [args]
|
|
42
43
|
```
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
The separate `station-dev` shim runs the checkout's built CLI bundle and
|
|
46
|
+
checks its source timestamps for obvious staleness. That check is approximate;
|
|
47
|
+
`./station` does not use it. See [the CLI reference](https://github.com/kontourai/station/blob/main/docs/reference/cli.md#invocation)
|
|
48
|
+
for the entry-point and build boundaries.
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
`station --version` reports the CLI version. Bundles also report their stamped
|
|
51
|
+
build channel and source revision; the source launcher reports
|
|
52
|
+
`development source checkout` without a revision.
|
|
52
53
|
|
|
53
|
-
##
|
|
54
|
+
## Connect to a Station
|
|
54
55
|
|
|
55
56
|
Choose a Station you can reach. Setup saves it on this device, performs pairing
|
|
56
57
|
when needed, and deliberately selects the default Station.
|
|
57
58
|
|
|
58
59
|
```bash
|
|
59
60
|
npx @kontourai/station-cli@latest setup existing box-b https://box-b.tailnet.ts.net --pair
|
|
60
|
-
# or
|
|
61
|
+
# or select the configured hosted endpoint
|
|
61
62
|
npx @kontourai/station-cli@latest setup hosted
|
|
62
63
|
```
|
|
63
64
|
|
|
65
|
+
`setup hosted` pairs with the fixed endpoint `https://station.kontourai.io`.
|
|
66
|
+
That command's existence does not establish service availability or your access
|
|
67
|
+
to it. Use `setup existing` for an endpoint you choose.
|
|
68
|
+
|
|
64
69
|
The CLI registers a device request and waits. An operator approves it **on the
|
|
65
|
-
host** (`station environment access approve <request-id>` there
|
|
70
|
+
host** (`station environment access approve <request-id>` there, with the
|
|
71
|
+
existing Station home selected). When they do,
|
|
66
72
|
the CLI stores the issued bearer credential in the operating-system keyring and
|
|
67
73
|
saves only its reference with the Station entry. That Station becomes the
|
|
68
74
|
default only after pairing succeeds.
|
|
@@ -110,7 +116,7 @@ $ station stations list
|
|
|
110
116
|
* = default Station.
|
|
111
117
|
```
|
|
112
118
|
|
|
113
|
-
|
|
119
|
+
Commands using the shared target resolver select a Station in this order:
|
|
114
120
|
|
|
115
121
|
| | Source | Example |
|
|
116
122
|
|---|---|---|
|
|
@@ -140,12 +146,17 @@ sandbox, an ephemeral session, and user config ignored, or Claude in safe plan
|
|
|
140
146
|
mode with only Read/Glob/Grep tools, using argv arrays and a run-local prompt
|
|
141
147
|
file. With both available,
|
|
142
148
|
select one explicitly. No available agent still
|
|
143
|
-
leaves portable artifacts successfully. The bundled
|
|
144
|
-
local host filesystem or run the source-only doctor report.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
leaves portable artifacts successfully. The bundled triage command does not
|
|
150
|
+
collect local host filesystem diagnostics or run the source-only doctor report.
|
|
151
|
+
`--search-issues` (or the equivalent TTY confirmation) authorizes a fixed,
|
|
152
|
+
read-only Station issue search. Launching an agent separately makes the run files
|
|
153
|
+
available to that agent and its configured model service; use `--context-only`
|
|
154
|
+
to collect without launching one. The first 64 KiB of agent stdout is re-redacted
|
|
155
|
+
into local `diagnosis.md` and `issue-draft.md`, including after an unsuccessful
|
|
156
|
+
exit. Live stdout is forwarded before redaction and stderr is inherited directly.
|
|
157
|
+
Stored-artifact redaction does not protect terminal output. Triage has no GitHub
|
|
158
|
+
write or repair operation; its mode flags are requests to the installed agent,
|
|
159
|
+
not independent proof of that agent's enforcement.
|
|
149
160
|
|
|
150
161
|
The versioned store lives at `$STATION_ROOT/config/profiles.json` (default
|
|
151
162
|
`~/.station/config/profiles.json`) and is shared with native Desktop. It
|
|
@@ -166,57 +177,58 @@ records the canonical invoked directory and selected Station in the
|
|
|
166
177
|
owner-controlled shared store; repository files cannot redirect the target.
|
|
167
178
|
The selection names a saved Station and never embeds an endpoint or credential.
|
|
168
179
|
|
|
169
|
-
|
|
180
|
+
SDK-backed requests give up after 30 seconds. Override with
|
|
170
181
|
`STATION_REQUEST_TIMEOUT_MS=<ms>`, or `0` to disable the deadline. Streams —
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
182
|
+
orchestration and approval events and live monitoring — have no overall
|
|
183
|
+
deadline. Chat sends a bounded JSON acceptance request, then observes the turn
|
|
184
|
+
on a separate event stream. Knowledge reindexing and migration also opt out of
|
|
185
|
+
the request deadline. The current checkpoint-restore and Operate event-stream
|
|
186
|
+
paths bypass the shared credential client and cannot authenticate to a protected
|
|
187
|
+
Station; see the reference.
|
|
174
188
|
|
|
175
189
|
## What this CLI does not do
|
|
176
190
|
|
|
177
|
-
**It does not
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
`
|
|
182
|
-
`upgrade
|
|
183
|
-
|
|
184
|
-
They are not part of the published CLI. Run them from the root of a Station
|
|
185
|
-
checkout with its own launcher, which is where they have always lived:
|
|
191
|
+
**It does not build or install a backend.** Source-oriented commands such as
|
|
192
|
+
`build`, `dev`, `fresh`, `home`, `link`, `shortcut`, `start`, `stop`, and
|
|
193
|
+
`upgrade`, plus `setup local` and service installation, require a Station
|
|
194
|
+
repository checkout, not this published CLI. (A prebuilt server archive that
|
|
195
|
+
`install.sh` installed carries its own lifecycle CLI, which can also install a
|
|
196
|
+
service and run `upgrade`; see the reference.) Use the checkout's launcher:
|
|
186
197
|
|
|
187
198
|
```console
|
|
188
199
|
$ station start
|
|
189
200
|
Error: `station start` runs against a Station repository checkout, so it is not part of the published CLI.
|
|
190
201
|
Run it from the root of a Station checkout with the bundled launcher:
|
|
191
202
|
./station start
|
|
192
|
-
The published CLI drives Stations that are already running — see `station stations
|
|
203
|
+
The published CLI drives Stations that are already running — see `station stations` and `--api-base`.
|
|
193
204
|
```
|
|
194
205
|
|
|
195
|
-
**
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
Error: Environment security commands require the Station repository launcher (./station).
|
|
204
|
-
```
|
|
206
|
+
**Selected local operations are available in the published CLI.** `open`,
|
|
207
|
+
`doctor`, `environment show`, `environment credential show`, `environment offer`,
|
|
208
|
+
`environment access list|approve|deny|devices|scope`, and `service status|start|stop` support
|
|
209
|
+
an existing local installation. Local authorization validates the selected
|
|
210
|
+
owner-only home and the loopback listener; it does not create a missing home.
|
|
211
|
+
Service start/stop controls an existing OS service rather than building or
|
|
212
|
+
installing a backend. See the [availability table](../../docs/reference/cli.md)
|
|
213
|
+
for the full boundary and prerequisites.
|
|
205
214
|
|
|
206
|
-
`
|
|
207
|
-
|
|
215
|
+
`environment peers`, `environment credential rotate`, and `environment reset`
|
|
216
|
+
remain checkout-only. `station environment access request` is the requester
|
|
217
|
+
side of pairing and works as a remote client operation.
|
|
208
218
|
|
|
209
|
-
The packaged CLI never starts
|
|
210
|
-
Station backend implicitly. A bare invocation (including `--inline`,
|
|
219
|
+
The packaged CLI never creates or starts a backend implicitly. A bare invocation (including `--inline`,
|
|
211
220
|
`--service`, and `--temp-home`) explains how to pair with an existing host or
|
|
212
|
-
how to use `./station` from a checkout.
|
|
213
|
-
|
|
221
|
+
how to use `./station` from a checkout. The command admission authority is
|
|
222
|
+
[distribution.ts](src/distribution.ts); command behavior is composed in
|
|
223
|
+
[cli.ts](src/cli.ts). This distribution distinction also appears in the
|
|
224
|
+
[architecture reading path](../../docs/architecture.md#reading-path).
|
|
214
225
|
|
|
215
226
|
`station --version` reports immutable bundle metadata: the CLI version, its
|
|
216
227
|
build channel, and the source revision stamped when that artifact was built.
|
|
217
|
-
It does not inspect a nearby checkout or a backend build manifest.
|
|
218
|
-
|
|
219
|
-
|
|
228
|
+
It does not inspect a nearby checkout or a backend build manifest. Invoking
|
|
229
|
+
`./station --version` reports `development source checkout`, independent of
|
|
230
|
+
`STATION_CHANNEL`; it does not print a source SHA. A locally built bundle has
|
|
231
|
+
its own build-time provenance, including a dirty revision when applicable.
|
|
220
232
|
|
|
221
233
|
The package test packs one exact tarball, records its SHA-256, then installs
|
|
222
234
|
that same tarball into an isolated consumer with `npm install --ignore-scripts`.
|
|
@@ -224,17 +236,19 @@ This proves dependency resolution without claiming publication or
|
|
|
224
236
|
native-keyring behavior. Windows and physical native-keyring verification are
|
|
225
237
|
**NOT_VERIFIED** until exercised on those platforms.
|
|
226
238
|
|
|
227
|
-
`station --help`
|
|
228
|
-
|
|
239
|
+
`station --help` includes a checkout-command note. That note currently lists
|
|
240
|
+
`service` as a whole; the supported packaged exceptions are
|
|
241
|
+
`service status|start|stop`, as described above.
|
|
229
242
|
|
|
230
243
|
## Requirements
|
|
231
244
|
|
|
232
245
|
- **Node 24** (`engines: 24.x`). The CLI is a bundle, not a binary; it needs a
|
|
233
246
|
host Node.
|
|
234
|
-
- **A reachable Station.**
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
247
|
+
- **A reachable Station for API commands.** With no Station saved, API commands
|
|
248
|
+
use a running local desktop Station when available, then fall back to the
|
|
249
|
+
selected channel's runtime-resolver loopback origin. Saved-Station management,
|
|
250
|
+
local diagnostics, and existing-service control also use host-local storage
|
|
251
|
+
or operating-system services; they are not all HTTP calls.
|
|
238
252
|
|
|
239
253
|
Transport failures name the Station that was targeted *and where that address
|
|
240
254
|
came from*, so a wrong-target mistake never looks like a broken Station:
|
|
@@ -253,11 +267,13 @@ station --version
|
|
|
253
267
|
```
|
|
254
268
|
|
|
255
269
|
`--help` is recognised at any depth, and per-command help carries the flag
|
|
256
|
-
detail. Unknown
|
|
257
|
-
|
|
270
|
+
detail. Unknown commands and actions fail with a diagnostic. Flag validation
|
|
271
|
+
belongs to each command; use the documented spelling, including
|
|
272
|
+
`--model-option=key=value` rather than a space-separated value.
|
|
258
273
|
|
|
259
|
-
The
|
|
260
|
-
|
|
274
|
+
The prose reference and availability table ship with the Station repository as
|
|
275
|
+
`docs/reference/cli.md`. Its implementation links and stated limits distinguish
|
|
276
|
+
current behavior from commands that need further qualification.
|
|
261
277
|
|
|
262
278
|
## Related packages
|
|
263
279
|
|