@stratusagent/cli 0.2.2 → 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.
- package/README.md +240 -5
- package/dist/bin.js +13 -4
- package/dist/bin.js.map +1 -1
- package/dist/index.d.ts +148 -50
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2041 -671
- package/dist/index.js.map +1 -1
- package/dist/logs.d.ts +123 -0
- package/dist/logs.d.ts.map +1 -0
- package/dist/logs.js +358 -0
- package/dist/logs.js.map +1 -0
- package/dist/service.d.ts +82 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +380 -0
- package/dist/service.js.map +1 -0
- package/package.json +23 -8
package/README.md
CHANGED
|
@@ -4,25 +4,49 @@ Stratus Agent CLI — create always-on agents that get smarter over time. Quickl
|
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
+
Needs **Node.js 22.13+** — the gateway's session store uses `node:sqlite`, which runs unflagged from 22.13. On the 23.x line that landed separately, in **23.4**, so 23.0–23.3 are too old despite the higher number. Every package declares the range, and the CLI checks it at startup, so an unsupported Node gets a line naming what it needs rather than a missing-builtin error later on.
|
|
8
|
+
|
|
7
9
|
```bash
|
|
8
10
|
npm install -g @stratusagent/cli
|
|
9
11
|
stratus setup
|
|
10
12
|
```
|
|
11
13
|
|
|
14
|
+
That one package is everything you need to run agents: the runtime, the
|
|
15
|
+
providers, the agent roster, and the always-on gateway all come with it.
|
|
16
|
+
|
|
17
|
+
### Optional channel packages
|
|
18
|
+
|
|
19
|
+
Channels are the exception — the CLI ships **no** transport, so an install that
|
|
20
|
+
never touches Slack never carries the Slack SDKs (~9 MB). Add the one you want
|
|
21
|
+
alongside the CLI and `stratus serve` picks it up automatically:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g @stratusagent/channel-slack
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
If tokens are stored for an agent but the package isn't installed, `stratus
|
|
28
|
+
serve` says so and starts anyway, serving every other channel.
|
|
29
|
+
|
|
30
|
+
## Setup
|
|
31
|
+
|
|
12
32
|
`stratus setup` is the whole onboarding, as a small navigable menu:
|
|
13
33
|
|
|
14
34
|
```
|
|
15
35
|
1) Providers anthropic — signed in with your Claude subscription
|
|
16
36
|
2) Models default claude-opus-5 · fallback gpt-4.1-mini
|
|
17
37
|
3) Agent ~/.stratus/agents/ava.md
|
|
18
|
-
4)
|
|
19
|
-
5)
|
|
38
|
+
4) Channels Slack: 1 agent connected
|
|
39
|
+
5) Always on stratusd runs after setup, and at every login
|
|
40
|
+
6) Test run say hello with the current settings
|
|
41
|
+
7) Save & finish
|
|
20
42
|
```
|
|
21
43
|
|
|
22
|
-
- **Providers** — sign in to one or more. For Claude, choose how you pay: a **Claude Pro/Max subscription** (run `claude setup-token`, paste the token — runs route through the Claude Code runtime, so your plan covers usage; requires Claude Code installed and signed in
|
|
44
|
+
- **Providers** — sign in to one or more. For Claude, choose how you pay: a **Claude Pro/Max subscription** (run `claude setup-token`, paste the token — runs route through the Claude Code runtime, so your plan covers usage; requires Claude Code installed and signed in. Tool runs and memory work there too, so it's the same agent as on an API key) or an **Anthropic API key**, pasted straight into the prompt (input is hidden) and checked against the live API when the endpoint supports it — a rejected key is refused; an unreachable endpoint saves the key and verifies it on your first run. OpenAI-compatible services work like API keys, including local models and proxies via a custom base URL.
|
|
23
45
|
- **Models** — pick a **default** and a **fallback**, listed live from the provider APIs where possible (subscription sign-ins and offline setups fall back to the known Claude lineup). If the default model errors mid-run, the run automatically retries on the fallback — even across providers.
|
|
24
46
|
- **Menus are keyboard-driven** — arrow keys (or `j`/`k`) to move, Enter to pick, digits to jump, Esc to go back.
|
|
25
47
|
- **Agent** — name your agent (or accept a generated identity), describe their personality, and their soul file lands in `~/.stratus/agents/`, ready to edit.
|
|
48
|
+
- **Channels** — put an agent on Slack without opening a file. Pick the agent, and setup prints the app manifest with their name already filled in, walks you through the two tokens (input hidden), verifies each against Slack before accepting it, and stores them where `stratus serve` looks. The list marks who is connected; picking a connected agent offers to replace their tokens or disconnect.
|
|
49
|
+
- **Always on** — whether the roster keeps answering once you close the terminal. On by default, because an agent you have to remember to start is not always-on, and every Slack app you connected above stays silent until `stratusd` runs. Save & finish installs it (see [Always on](#always-on)); choose *do not run it for me* and setup removes any service it previously installed.
|
|
26
50
|
- **Test run** — say hello with the current settings before saving anything.
|
|
27
51
|
|
|
28
52
|
Credentials are stored in `~/.stratus/credentials.json` (owner-read-only) and settings in `~/.stratus/config.json`, so `stratus run` works from any directory afterwards. No env vars to export, no config files to hand-edit.
|
|
@@ -30,15 +54,219 @@ Credentials are stored in `~/.stratus/credentials.json` (owner-read-only) and se
|
|
|
30
54
|
## Usage
|
|
31
55
|
|
|
32
56
|
```bash
|
|
57
|
+
stratus setup # onboarding menu: providers, models, agent, channels
|
|
58
|
+
stratus chat # talk — the conversation persists
|
|
59
|
+
stratus chat --soul ./ava.md
|
|
33
60
|
stratus run "say hello"
|
|
34
61
|
stratus run --soul ./ava.md "introduce yourself"
|
|
35
62
|
stratus run --provider anthropic --model claude-opus-5 "hello"
|
|
36
63
|
stratus run --prompt "use the echo tool" --format json
|
|
37
|
-
stratus
|
|
64
|
+
stratus serve # stratusd: the whole roster, always on
|
|
65
|
+
stratus serve --idle-timeout 120 --no-events
|
|
66
|
+
stratus service install # keep stratusd running under launchd/systemd
|
|
67
|
+
stratus service status
|
|
68
|
+
stratus logs -f # what the daemon has been doing
|
|
69
|
+
stratus logs --agent ava -n 200
|
|
70
|
+
stratus doctor # what a run would use right now, and why
|
|
71
|
+
stratus agent new # create an agent (guided on a terminal)
|
|
38
72
|
stratus agent new --format soul > ava.md
|
|
73
|
+
stratus agents # who's on the team: souls, models, memory
|
|
39
74
|
stratus dashboard # local browser dashboard
|
|
40
75
|
```
|
|
41
76
|
|
|
77
|
+
`stratus serve` runs the gateway in the foreground: every agent in your roster
|
|
78
|
+
live at once on its own provider and model, sessions in SQLite so they survive
|
|
79
|
+
restarts, delegation between agents, a watchdog for stalled turns, and any
|
|
80
|
+
installed channels connected. Ctrl+C or SIGTERM drains cleanly.
|
|
81
|
+
|
|
82
|
+
### What the daemon will do on its own
|
|
83
|
+
|
|
84
|
+
Tools declare how much damage they could do — `safe`, `gated`, or
|
|
85
|
+
`dangerous` — and the daemon runs only the safe ones without asking. Anything
|
|
86
|
+
riskier is refused, with a line in the log saying which agent wanted what:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
09:14:36 — warning: ava: shell.run is gated and nobody is available to approve it (session slack:ava:…)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
That is the honest behavior behind a service manager, where there is no
|
|
93
|
+
terminal to prompt on. Asking a human through Slack and resuming the turn on
|
|
94
|
+
their answer is the next piece of this; until then the daemon refuses rather
|
|
95
|
+
than assumes.
|
|
96
|
+
|
|
97
|
+
A tool that declares no risk counts as `gated`, never `safe` — forgetting to
|
|
98
|
+
classify something should cost a prompt, not an unattended command. Every
|
|
99
|
+
tool that ships today (`demo.echo`, `memory.remember`, `agent.delegate`) is
|
|
100
|
+
`safe`, so nothing changes until you add one that isn't.
|
|
101
|
+
|
|
102
|
+
The line is *acting outside Stratus* — the filesystem, the network, another
|
|
103
|
+
service — not cost. Every turn spends provider tokens, including the one
|
|
104
|
+
that decided to call a tool, so a policy that gated on spend would have to
|
|
105
|
+
gate the conversation itself. Delegation stays `safe` for the same reason:
|
|
106
|
+
it hands work to a teammate inside the fleet, that teammate's own tool
|
|
107
|
+
calls face this policy again under their allowlist, and the chain is depth
|
|
108
|
+
bounded.
|
|
109
|
+
|
|
110
|
+
`stratus chat` and `stratus run` are unaffected: at a terminal, `--approvals`
|
|
111
|
+
works exactly as before.
|
|
112
|
+
|
|
113
|
+
## Always on
|
|
114
|
+
|
|
115
|
+
`stratus serve` stays a foreground process on purpose — debuggable, and
|
|
116
|
+
composable with whatever supervisor you already run. Surviving logout, crashes,
|
|
117
|
+
and reboots is the platform's job, so `stratus service` hands the daemon to
|
|
118
|
+
launchd on macOS and to systemd on Linux:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
stratus service install # write the unit, start now, start at every login
|
|
122
|
+
stratus service install --no-login
|
|
123
|
+
stratus service status
|
|
124
|
+
stratus service start
|
|
125
|
+
stratus service stop
|
|
126
|
+
stratus service uninstall
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
`stratus setup` installs it for you at Save & finish unless you opt out, so
|
|
130
|
+
most people never run these by hand. What they get:
|
|
131
|
+
|
|
132
|
+
- **macOS** — a LaunchAgent at `~/Library/LaunchAgents/com.stratusagent.stratusd.plist`
|
|
133
|
+
- **Linux** — a systemd user unit at `~/.config/systemd/user/stratusd.service`
|
|
134
|
+
|
|
135
|
+
The unit runs the daemon by **absolute path** — the node binary and script of
|
|
136
|
+
the process that installed it, never a bare `stratus`. A service manager starts
|
|
137
|
+
with a minimal environment and never loads the shell profile that puts `stratus`
|
|
138
|
+
on your `PATH`. It stops with SIGTERM, so the gateway's drain actually runs.
|
|
139
|
+
|
|
140
|
+
A default install restarts the daemon if it crashes, but not after a clean
|
|
141
|
+
exit — stopping it yourself keeps it stopped. **`--no-login` gives up crash
|
|
142
|
+
restarts on macOS**, and that is launchd's rule rather than a choice: `KeepAlive`
|
|
143
|
+
implies `RunAtLoad`, so a job that must not start at login cannot ask to be
|
|
144
|
+
revived either. `stratus service install --no-login` says so when it finishes.
|
|
145
|
+
On Linux the two are independent, and `Restart=on-failure` applies either way.
|
|
146
|
+
|
|
147
|
+
`status` asks the service manager, not the unit file, whether the daemon is
|
|
148
|
+
alive, and exits non-zero when it isn't — so it works in a health check:
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
stratusd running
|
|
152
|
+
manager launchd
|
|
153
|
+
unit ~/Library/LaunchAgents/com.stratusagent.stratusd.plist
|
|
154
|
+
at login yes
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**One limit worth knowing before you rely on it.** A LaunchAgent starts at
|
|
158
|
+
**login, not at power-on**, and only while that user is logged in — an
|
|
159
|
+
unattended Mac needs automatic login turned on too. (A `LaunchDaemon` would
|
|
160
|
+
start without a login, but it runs as a system user, which breaks `~/.stratus`
|
|
161
|
+
paths and the Claude subscription token entirely, so the LaunchAgent is the
|
|
162
|
+
right choice.) The systemd equivalent is `loginctl enable-linger` on a machine
|
|
163
|
+
you don't stay logged in to. Setup says both in the menu rather than leaving
|
|
164
|
+
them to be discovered after a reboot.
|
|
165
|
+
|
|
166
|
+
## Logs
|
|
167
|
+
|
|
168
|
+
Under a service manager the daemon's stdout is gone, so everything `stratus
|
|
169
|
+
serve` says is also written to `~/.stratus/logs/stratusd.jsonl` (owner-read-only,
|
|
170
|
+
rotated at 8 MB, three generations kept). That file is the record of an
|
|
171
|
+
overnight run, and `stratus logs` reads it from any terminal:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
stratus logs # the last 50 records
|
|
175
|
+
stratus logs -f # follow, across rotations
|
|
176
|
+
stratus logs -n 200
|
|
177
|
+
stratus logs --agent ava
|
|
178
|
+
stratus logs --session slack:ava:T01ABCDEF:C07GHIJKL:1731900000.123456
|
|
179
|
+
stratus logs --format json # the raw records, for jq
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
```text
|
|
183
|
+
09:14:02 — stratusd ready — 3 agents, slack connected
|
|
184
|
+
09:14:31 ava session.created [slack:ava:T01ABCDEF:C07GHIJKL:1731900000.123456]
|
|
185
|
+
09:14:36 ava tool.completed tool=memory.remember ok=true [slack:ava:T01ABCDEF:C07GHIJKL:1731900000.123456]
|
|
186
|
+
09:21:07 — warning: anthropic returned 529; retrying on the fallback model
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Session ids are the channel's own key — `channel:agent:team:conversation[:thread]`
|
|
190
|
+
— so the id in the last column is exactly what `--session` wants, and the same
|
|
191
|
+
conversation keeps it across daemon restarts.
|
|
192
|
+
|
|
193
|
+
The log is a **trace, not a second transcript**: it records that a tool ran and
|
|
194
|
+
that a session completed, with the tool's name, the agent, and the session id.
|
|
195
|
+
Prompts, replies, and tool inputs are not written — what was said lives in the
|
|
196
|
+
session store instead.
|
|
197
|
+
|
|
198
|
+
One exception worth knowing before you paste a log anywhere. A failed session
|
|
199
|
+
records the **provider's error text verbatim**, and providers routinely quote
|
|
200
|
+
the request that failed — so a malformed prompt can end up inside an error
|
|
201
|
+
message. Skim a log before sharing it, and prefer `--agent` or `--session` to
|
|
202
|
+
narrow it to the run you actually mean.
|
|
203
|
+
|
|
204
|
+
### When the log is empty
|
|
205
|
+
|
|
206
|
+
A daemon that fails *before* it starts serving — a broken install, an
|
|
207
|
+
unreadable credentials file — never gets as far as opening the structured log,
|
|
208
|
+
so `stratus logs` shows nothing or shows yesterday. Those errors go to stderr,
|
|
209
|
+
and where stderr lands is the service manager's business, so it differs by
|
|
210
|
+
platform:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
tail ~/.stratus/logs/stratusd.err.log # macOS
|
|
214
|
+
journalctl --user-unit=stratusd.service # Linux
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
That is where a restart loop explains itself. On macOS the LaunchAgent redirects
|
|
218
|
+
both streams to files, so Stratus truncates them when `serve` starts and every
|
|
219
|
+
five minutes while it runs — a crash loop cannot fill the disk with the same
|
|
220
|
+
error a million times. On Linux systemd keeps the same output in the journal
|
|
221
|
+
instead, which does its own rotation, so there is nothing beside the JSONL to
|
|
222
|
+
bound and nothing to clean up.
|
|
223
|
+
|
|
224
|
+
## When something looks off
|
|
225
|
+
|
|
226
|
+
`stratus doctor` answers one question — *what would a run use right now, and
|
|
227
|
+
who decided that?* Every setting is shown with the file or environment variable
|
|
228
|
+
it came from, because the answer is usually that something outranks what you
|
|
229
|
+
thought you configured:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
stratus doctor
|
|
233
|
+
stratus doctor --format json
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
```text
|
|
237
|
+
Stratus Agent — what a run would use right now
|
|
238
|
+
|
|
239
|
+
provider anthropic
|
|
240
|
+
from ~/.stratus/agents/ava.md (soul frontmatter)
|
|
241
|
+
model claude-opus-5
|
|
242
|
+
from ~/.stratus/agents/ava.md (soul frontmatter)
|
|
243
|
+
soul ~/.stratus/agents/ava.md
|
|
244
|
+
from ~/.stratus/config.json
|
|
245
|
+
agent Ava (ava)
|
|
246
|
+
|
|
247
|
+
Files
|
|
248
|
+
config ~/.stratus/config.json
|
|
249
|
+
agents 1 soul file
|
|
250
|
+
|
|
251
|
+
Sign-ins
|
|
252
|
+
anthropic Claude subscription (Pro/Max) — runs go through the Claude Code runtime
|
|
253
|
+
openai not signed in
|
|
254
|
+
|
|
255
|
+
Channels
|
|
256
|
+
slack no agents connected
|
|
257
|
+
@stratusagent/channel-slack installed
|
|
258
|
+
|
|
259
|
+
1 problem found:
|
|
260
|
+
! A fallback model (gpt-4.1-mini) is configured but could not be resolved — usually
|
|
261
|
+
no sign-in for its provider. A failing primary model has nothing to retry on.
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
It resolves the config exactly the way a run does rather than re-deriving the
|
|
265
|
+
rules, so what it prints is what you would get. It exits non-zero when it finds
|
|
266
|
+
a problem, and it is the fastest answer to the two most common surprises: a run
|
|
267
|
+
that turns out to be on the `demo` provider, and an `ANTHROPIC_API_KEY` in the
|
|
268
|
+
environment quietly demoting a Claude subscription sign-in to per-token billing.
|
|
269
|
+
|
|
42
270
|
## Agents are people
|
|
43
271
|
|
|
44
272
|
An agent's identity lives in a **soul file** — markdown with frontmatter for the structured parts (name, provider, model, tool allowlists) and prose for the personality:
|
|
@@ -70,9 +298,16 @@ Agents remember: facts saved with the built-in `memory.remember` tool persist to
|
|
|
70
298
|
| `--approvals` | Tool approval mode: `always`, `ask`, or `never` |
|
|
71
299
|
| `--max-turns` | Max provider turns per run (default 8) |
|
|
72
300
|
| `--format` | `text` or `json` |
|
|
301
|
+
| `--idle-timeout` | `stratus serve`: seconds of provider silence before the watchdog aborts a turn (default 120) |
|
|
302
|
+
| `--no-events` | Hide the event log |
|
|
303
|
+
| `--no-log-file` | `stratus serve`: do not write `~/.stratus/logs/stratusd.jsonl` |
|
|
304
|
+
| `--no-login` | `stratus service install`: install without the start-at-login trigger |
|
|
305
|
+
| `-f`, `--follow` | `stratus logs`: follow the log, across rotations |
|
|
306
|
+
| `-n <count>` | `stratus logs`: how much backlog to print (default 50) |
|
|
307
|
+
| `--agent`, `--session` | `stratus logs`: show only one agent's or one session's records |
|
|
73
308
|
|
|
74
309
|
Precedence: flags → `STRATUS_*` env vars → soul file hints → config file. Project-local `stratus.config.json` outranks the global `~/.stratus/config.json`; stored sign-ins are endpoint-bound and never sent to endpoints a project config selects.
|
|
75
310
|
|
|
76
|
-
Today the CLI covers setup, one-shot runs, agent creation, and the local dashboard
|
|
311
|
+
Today the CLI covers setup, chat, one-shot runs, agent creation, the always-on gateway and its service integration, logs, diagnostics, Slack, and the local dashboard. More channels — and one control API that every surface talks to — are next.
|
|
77
312
|
|
|
78
313
|
Part of [Stratus Agent](https://github.com/stratuslabs/agent) — a tiny TypeScript agent runtime.
|
package/dist/bin.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { runCli } from "./index.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { runCli, unsupportedNodeMessage } from "./index.js";
|
|
3
|
+
// Before anything else imports: the point is to explain the floor rather
|
|
4
|
+
// than to fail somewhere further in with a builtin-module error.
|
|
5
|
+
const unsupported = unsupportedNodeMessage(process.versions.node);
|
|
6
|
+
if (unsupported) {
|
|
7
|
+
process.stderr.write(`${unsupported}\n`);
|
|
8
|
+
process.exitCode = 1;
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
const exitCode = await runCli({ argv: process.argv.slice(2) });
|
|
12
|
+
if (exitCode !== 0) {
|
|
13
|
+
process.exitCode = exitCode;
|
|
14
|
+
}
|
|
6
15
|
}
|
|
7
16
|
//# sourceMappingURL=bin.js.map
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAE5D,yEAAyE;AACzE,iEAAiE;AACjE,MAAM,WAAW,GAAG,sBAAsB,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAClE,IAAI,WAAW,EAAE,CAAC;IAChB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC;IACzC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC;KAAM,CAAC;IACN,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/D,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC9B,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type JsonValue, type Session, type StratusEvent } from '@stratusagent/core';
|
|
2
|
+
import { type CredentialProviderName, type RuntimeConfig, type StratusProviderName } from '@stratusagent/state';
|
|
3
|
+
import { type ServiceRunner } from './service.ts';
|
|
4
|
+
export { installService, launchdPlist, readServiceStatus, servicePlatform, serviceUnitPath, startService, stopService, systemdUnit, uninstallService, SERVICE_LABEL, type ServiceRunner, type ServiceStatus, } from './service.ts';
|
|
5
|
+
export { createLogWriter, currentLogPosition, truncateRedirectLogs, formatLogRecord, parseLogLines, readRecentRecords, tailLog, type LogRecord, } from './logs.ts';
|
|
6
|
+
export { createFileMemoryStore } from '@stratusagent/state';
|
|
7
|
+
export type { StoredCredential, RuntimeConfig } from '@stratusagent/state';
|
|
3
8
|
export interface CliStreams {
|
|
4
9
|
stdout: Pick<typeof process.stdout, 'write'>;
|
|
5
10
|
stderr: Pick<typeof process.stderr, 'write'>;
|
|
@@ -16,13 +21,17 @@ export interface CliEnvironment {
|
|
|
16
21
|
fetch?: typeof fetch;
|
|
17
22
|
openExternal?: (url: string) => Promise<void> | void;
|
|
18
23
|
dashboardAutoShutdownMs?: number;
|
|
24
|
+
/** Shuts down `stratus serve` the way SIGTERM would (tests). */
|
|
25
|
+
shutdownSignal?: AbortSignal;
|
|
26
|
+
/** Runs launchctl/systemctl. Injected so tests never touch the real one. */
|
|
27
|
+
serviceRunner?: ServiceRunner;
|
|
19
28
|
}
|
|
20
29
|
export interface CliRunOptions {
|
|
21
30
|
argv: string[];
|
|
22
31
|
streams?: CliStreams;
|
|
23
32
|
env?: CliEnvironment;
|
|
24
33
|
}
|
|
25
|
-
export type CliProviderName =
|
|
34
|
+
export type CliProviderName = StratusProviderName;
|
|
26
35
|
export type CliApprovalMode = 'always' | 'ask' | 'never';
|
|
27
36
|
export interface ParsedRunCommand {
|
|
28
37
|
command: 'run';
|
|
@@ -54,64 +63,97 @@ export interface ParsedAgentNewCommand {
|
|
|
54
63
|
instructions?: string;
|
|
55
64
|
format: 'text' | 'json' | 'soul';
|
|
56
65
|
}
|
|
66
|
+
export interface ParsedChatCommand {
|
|
67
|
+
command: 'chat';
|
|
68
|
+
provider?: CliProviderName;
|
|
69
|
+
model?: string;
|
|
70
|
+
baseUrl?: string;
|
|
71
|
+
configPath?: string;
|
|
72
|
+
/** Path to a soul file defining the agent to chat with. */
|
|
73
|
+
soul?: string;
|
|
74
|
+
events: boolean;
|
|
75
|
+
approvals: CliApprovalMode;
|
|
76
|
+
maxTurns?: number;
|
|
77
|
+
}
|
|
78
|
+
export interface ParsedAgentsCommand {
|
|
79
|
+
command: 'agents';
|
|
80
|
+
format: 'text' | 'json';
|
|
81
|
+
}
|
|
82
|
+
export interface ParsedDoctorCommand {
|
|
83
|
+
command: 'doctor';
|
|
84
|
+
format: 'text' | 'json';
|
|
85
|
+
configPath?: string;
|
|
86
|
+
}
|
|
87
|
+
export interface ParsedServiceCommand {
|
|
88
|
+
command: 'service';
|
|
89
|
+
action: 'install' | 'uninstall' | 'status' | 'start' | 'stop';
|
|
90
|
+
/** install only: start automatically at login. Defaults to true. */
|
|
91
|
+
runAtLogin?: boolean;
|
|
92
|
+
/** install only: the config the managed daemon should load. */
|
|
93
|
+
configPath?: string;
|
|
94
|
+
}
|
|
95
|
+
export interface ParsedLogsCommand {
|
|
96
|
+
command: 'logs';
|
|
97
|
+
/** Keep streaming new records instead of exiting after the backlog. */
|
|
98
|
+
follow: boolean;
|
|
99
|
+
/** How many recent records to show before following. */
|
|
100
|
+
limit: number;
|
|
101
|
+
agentId?: string;
|
|
102
|
+
sessionId?: string;
|
|
103
|
+
format: 'text' | 'json';
|
|
104
|
+
}
|
|
105
|
+
export interface ParsedServeCommand {
|
|
106
|
+
command: 'serve';
|
|
107
|
+
configPath?: string;
|
|
108
|
+
/** Watchdog idle timeout in milliseconds. 0 disables. */
|
|
109
|
+
idleTimeoutMs?: number;
|
|
110
|
+
events: boolean;
|
|
111
|
+
/** Write the structured log to ~/.stratus/logs. Defaults to true. */
|
|
112
|
+
logToFile?: boolean;
|
|
113
|
+
}
|
|
57
114
|
export interface ParsedHelpCommand {
|
|
58
115
|
command: 'help';
|
|
59
116
|
}
|
|
60
|
-
export type ParsedCommand = ParsedRunCommand | ParsedDashboardCommand | ParsedSetupCommand | ParsedAgentNewCommand | ParsedHelpCommand;
|
|
61
|
-
/** A resolved, ready-to-run fallback model (always a real provider). */
|
|
62
|
-
interface FallbackRuntime {
|
|
63
|
-
provider: 'anthropic' | 'openai';
|
|
64
|
-
model: string;
|
|
65
|
-
baseUrl?: string;
|
|
66
|
-
apiKey?: string;
|
|
67
|
-
authToken?: string;
|
|
68
|
-
}
|
|
69
|
-
type RuntimeConfig = {
|
|
70
|
-
provider: 'demo';
|
|
71
|
-
soul?: ParsedSoul;
|
|
72
|
-
} | {
|
|
73
|
-
provider: 'openai';
|
|
74
|
-
model: string;
|
|
75
|
-
baseUrl: string;
|
|
76
|
-
apiKey: string;
|
|
77
|
-
systemPrompt?: string;
|
|
78
|
-
fetch?: typeof fetch;
|
|
79
|
-
soul?: ParsedSoul;
|
|
80
|
-
fallback?: FallbackRuntime;
|
|
81
|
-
} | {
|
|
82
|
-
provider: 'anthropic';
|
|
83
|
-
model: string;
|
|
84
|
-
baseUrl?: string;
|
|
85
|
-
apiKey?: string;
|
|
86
|
-
/** Claude subscription auth (Claude Code setup token). */
|
|
87
|
-
authToken?: string;
|
|
88
|
-
systemPrompt?: string;
|
|
89
|
-
fetch?: typeof fetch;
|
|
90
|
-
soul?: ParsedSoul;
|
|
91
|
-
fallback?: FallbackRuntime;
|
|
92
|
-
};
|
|
93
|
-
/** A stored sign-in for a provider, kept in ~/.stratus/credentials.json. */
|
|
94
|
-
export interface StoredCredential {
|
|
95
|
-
type: 'api_key' | 'oauth_token';
|
|
96
|
-
value: string;
|
|
97
|
-
/**
|
|
98
|
-
* The endpoint this credential belongs to (openai-compatible services).
|
|
99
|
-
* Kept with the credential so a key for a local model or proxy is never
|
|
100
|
-
* sent to a different service, whatever the current default provider is.
|
|
101
|
-
*/
|
|
102
|
-
baseUrl?: string;
|
|
103
|
-
}
|
|
117
|
+
export type ParsedCommand = ParsedRunCommand | ParsedChatCommand | ParsedDashboardCommand | ParsedSetupCommand | ParsedAgentNewCommand | ParsedAgentsCommand | ParsedDoctorCommand | ParsedLogsCommand | ParsedServiceCommand | ParsedServeCommand | ParsedHelpCommand;
|
|
104
118
|
export interface DashboardServerHandle {
|
|
105
119
|
url: string;
|
|
106
120
|
close: () => Promise<void>;
|
|
107
121
|
}
|
|
108
|
-
export declare const CLI_VERSION = "0.
|
|
109
|
-
|
|
122
|
+
export declare const CLI_VERSION = "0.3.0";
|
|
123
|
+
/**
|
|
124
|
+
* The range every package declares in its `engines` field. Two floors, not
|
|
125
|
+
* one: `node:sqlite` was unflagged in 22.13.0 on the LTS line and in 23.4.0
|
|
126
|
+
* on the 23.x line, so 23.0 through 23.3 are NEWER than the 22.x floor and
|
|
127
|
+
* still ship it behind `--experimental-sqlite`. A plain `>=22.13` admits
|
|
128
|
+
* exactly those releases.
|
|
129
|
+
*/
|
|
130
|
+
export declare const SUPPORTED_NODE_RANGE = ">=22.13 <23 || >=23.4";
|
|
131
|
+
/**
|
|
132
|
+
* Why the CLI checks a version its manifests already declare: `engines` is
|
|
133
|
+
* advisory. npm and pnpm print EBADENGINE and carry on unless the user has
|
|
134
|
+
* turned on engine-strict, so an install on Node 20 succeeds and the floor
|
|
135
|
+
* is discovered later as an ERR_UNKNOWN_BUILTIN_MODULE for `node:sqlite`,
|
|
136
|
+
* thrown from a lazy import inside whichever command first needed the
|
|
137
|
+
* session store. That error names neither Node nor the version required.
|
|
138
|
+
*
|
|
139
|
+
* Returns the message to print, or undefined when the version is fine —
|
|
140
|
+
* including when it cannot be parsed at all, since an unrecognized build
|
|
141
|
+
* string is a bad reason to refuse to run.
|
|
142
|
+
*/
|
|
143
|
+
export declare const unsupportedNodeMessage: (version: string) => string | undefined;
|
|
144
|
+
declare const HELP_TEXT = "Stratus Agent CLI\n\nUsage:\n stratus setup\n stratus chat\n stratus chat --soul ./examples/souls/ava.md\n stratus run --prompt \"Use the demo tool\"\n stratus run \"Say hello\"\n ANTHROPIC_API_KEY=... stratus run --provider anthropic \"Say hello\"\n stratus run --soul ./examples/souls/ava.md \"Say hello\"\n echo \"Use the echo tool\" | stratus run --stdin\n STRATUS_PROVIDER=openai OPENAI_API_KEY=... stratus run \"Say hello\"\n stratus run --config ./stratus.config.json --provider openai \"Say hello\"\n stratus agents\n stratus doctor\n stratus service install\n stratus service status\n stratus logs -f\n stratus logs --agent ava -n 200\n stratus dashboard\n stratus dashboard --port 4123 --host 0.0.0.0 --no-open\n\nCommands:\n setup Menu-driven onboarding: pick a provider, sign in (Claude\n subscription or API key), create your agent, connect it to\n Slack, and test it \u2014 settings go to ~/.stratus/config.json,\n sign-ins and channel tokens to ~/.stratus/credentials.json\n (0600)\n chat Talk with your agent \u2014 the conversation persists across turns\n and remembered facts accumulate; /exit or Ctrl+C to leave\n run Execute one local Stratus Agent session\n serve Run stratusd, the always-on gateway: durable sessions, the\n whole roster live at once (each agent on its own provider),\n delegation, and a watchdog \u2014 Ctrl+C / SIGTERM drains cleanly\n (--idle-timeout <seconds>, --no-events, --no-log-file,\n --config <path>); everything it says is also written to\n ~/.stratus/logs, which \"stratus logs\" reads\n service Keep stratusd running under launchd (macOS) or systemd\n (Linux): install, uninstall, status, start, stop.\n Installing starts it now and at every login\n (--no-login installs without the login trigger,\n --config <path> pins the daemon to one config file)\n logs Read the daemon's log from any terminal: -f to follow,\n -n <count> for backlog, --agent / --session to filter,\n --format json for the raw records\n agent new Create an agent identity (generates a human-ish name + avatar theme)\n agents List your agents: who they are, where their souls live, what\n they run on, what they remember (also: stratus agent list)\n doctor Show what a run would use right now \u2014 provider, model, soul \u2014\n and which file or environment variable decided each, then\n flag anything that would surprise you (--format json)\n dashboard Start the local Stratus Agent dashboard and open it in your browser\n help Show this help message\n\nAgent options:\n --name Agent name (omit to have one generated)\n --instructions The agent's persona/instructions\n --format Output format for agent new: text, json, or soul (a ready-to-edit soul file)\n\nOptions:\n --prompt, -p Prompt to send to the local agent loop\n --stdin Read the prompt from stdin\n --provider Provider to use: anthropic, openai, or demo\n --model Model name for real providers (anthropic default: claude-opus-5, openai default: gpt-4.1-mini)\n --base-url Override the provider API base URL\n --soul Run as the agent defined by a soul file (markdown + frontmatter, see examples/souls)\n --config Config file path (run: load settings from it, setup: write it)\n --format Output format: text or json (default: text)\n --no-events Hide event-by-event progress lines in text mode\n --approvals Tool approval mode: always, ask, or never (default: always)\n --max-turns Maximum provider turns per run (default: 8)\n --port Dashboard port, defaults to an open local port\n --host Dashboard host (default: 127.0.0.1)\n --no-open Do not open the browser automatically\n --help, -h Show this help message\n\nConfig file:\n The CLI looks for ./stratus.config.json first, then a path from --config / STRATUS_CONFIG,\n then the global ~/.stratus/config.json written by `stratus setup`.\n A \"soul\" key (or STRATUS_SOUL) points at a soul file so every run uses that agent.\n Legacy STRATUSCLAW_* env vars and stratusclaw.config.json are still supported for compatibility.\n\nSoul files:\n A soul file is markdown with frontmatter (name, provider, model, tools, credentials)\n followed by the agent's persona in prose. See examples/souls/ava.md.\n";
|
|
110
145
|
declare const stringifyValue: (value: JsonValue) => string;
|
|
111
|
-
export declare const createFileMemoryStore: (filePath: string) => AgentMemoryStore;
|
|
112
146
|
export declare const parseCommand: (argv: string[], env?: CliEnvironment) => ParsedCommand;
|
|
113
147
|
export declare const formatEvent: (event: StratusEvent) => string | null;
|
|
114
148
|
export declare const resolveRuntimeConfig: (command: ParsedRunCommand, env?: CliEnvironment) => Promise<RuntimeConfig>;
|
|
149
|
+
/**
|
|
150
|
+
* A saved subscription sign-in silently demoted to per-token billing is the
|
|
151
|
+
* one config surprise that costs money — an API key in the environment
|
|
152
|
+
* outranks the stored credential, and the run otherwise looks identical.
|
|
153
|
+
* Detected from the resolved config: an apiKey where the stored credential
|
|
154
|
+
* is a subscription token means the environment won.
|
|
155
|
+
*/
|
|
156
|
+
export declare const warnOnCredentialOverride: (runtime: RuntimeConfig, streams: CliStreams, env?: CliEnvironment) => Promise<void>;
|
|
115
157
|
export declare const runSingleLoop: (prompt: string, streams: CliStreams, options: {
|
|
116
158
|
events?: boolean;
|
|
117
159
|
runtime: RuntimeConfig;
|
|
@@ -120,14 +162,70 @@ export declare const runSingleLoop: (prompt: string, streams: CliStreams, option
|
|
|
120
162
|
env?: CliEnvironment;
|
|
121
163
|
}) => Promise<Session>;
|
|
122
164
|
export declare const printSessionSummary: (session: Session, streams: CliStreams) => void;
|
|
165
|
+
export declare const runChat: (command: ParsedChatCommand, streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
123
166
|
export declare const openExternalUrl: (url: string) => Promise<void>;
|
|
124
167
|
export declare const startDashboardServer: (options: {
|
|
125
168
|
host: string;
|
|
126
169
|
port?: number;
|
|
127
170
|
}) => Promise<DashboardServerHandle>;
|
|
171
|
+
export declare const slackAppManifest: (agentName: string) => string;
|
|
128
172
|
export declare const runSetup: (command: ParsedSetupCommand, streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
173
|
+
export declare const runAgents: (command: ParsedAgentsCommand, streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
174
|
+
/** One resolved setting, with the thing that decided it. */
|
|
175
|
+
interface DoctorSetting {
|
|
176
|
+
value: string;
|
|
177
|
+
source: string;
|
|
178
|
+
}
|
|
179
|
+
export interface DoctorReport {
|
|
180
|
+
configInUse?: string;
|
|
181
|
+
/** Config files that exist but lost to `configInUse`, nearest first. */
|
|
182
|
+
configShadowed: string[];
|
|
183
|
+
provider: DoctorSetting;
|
|
184
|
+
model?: DoctorSetting;
|
|
185
|
+
soul?: DoctorSetting;
|
|
186
|
+
agent?: string;
|
|
187
|
+
/** The model a failing run retries on, when one is configured. */
|
|
188
|
+
fallback?: {
|
|
189
|
+
provider: string;
|
|
190
|
+
model: string;
|
|
191
|
+
};
|
|
192
|
+
signIns: Array<{
|
|
193
|
+
provider: CredentialProviderName;
|
|
194
|
+
status: string;
|
|
195
|
+
}>;
|
|
196
|
+
slackAgents: string[];
|
|
197
|
+
slackPackageInstalled: boolean;
|
|
198
|
+
rosterCount: number;
|
|
199
|
+
problems: string[];
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* `stratus doctor` — what a run would resolve to right now, and which file
|
|
203
|
+
* or variable decided each part. Every "why is it using X" question needs
|
|
204
|
+
* the precedence chain, and reading it out of the source is not something
|
|
205
|
+
* anyone should have to do.
|
|
206
|
+
*/
|
|
207
|
+
export declare const collectDoctorReport: (command: ParsedDoctorCommand, warn: (message: string) => void, env?: CliEnvironment) => Promise<DoctorReport>;
|
|
208
|
+
export declare const runDoctor: (command: ParsedDoctorCommand, streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
209
|
+
/**
|
|
210
|
+
* `stratus logs` — the daemon's structured log, filtered. `serve` streams
|
|
211
|
+
* to its own stdout, which is gone the moment it runs under a service
|
|
212
|
+
* manager; this reads the file it also writes, from any terminal.
|
|
213
|
+
*/
|
|
214
|
+
export declare const runLogs: (command: ParsedLogsCommand, streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
215
|
+
/**
|
|
216
|
+
* `stratus service` — run the daemon under launchd or systemd, so it
|
|
217
|
+
* survives logout, crashes, and reboots. `serve` itself stays a plain
|
|
218
|
+
* foreground process; this only tells the platform how to keep it up.
|
|
219
|
+
*/
|
|
220
|
+
export declare const runService: (command: ParsedServiceCommand, streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
129
221
|
export declare const runAgentNew: (command: ParsedAgentNewCommand, streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
130
222
|
export declare const runDashboard: (command: ParsedDashboardCommand, streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
223
|
+
/**
|
|
224
|
+
* `stratus serve` — run the gateway (stratusd) in the foreground: load the
|
|
225
|
+
* roster, accept dispatches, print events, and drain cleanly on SIGTERM,
|
|
226
|
+
* SIGINT, or the injected shutdown signal.
|
|
227
|
+
*/
|
|
228
|
+
export declare const runServe: (command: ParsedServeCommand, streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
131
229
|
export declare const runCli: ({ argv, streams, env }: CliRunOptions) => Promise<number>;
|
|
132
230
|
export { HELP_TEXT, stringifyValue };
|
|
133
231
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src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