@stratusagent/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 +138 -1
- package/dist/index.d.ts +45 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +490 -92
- package/dist/index.js.map +1 -1
- package/package.json +24 -19
package/README.md
CHANGED
|
@@ -26,6 +26,10 @@ alongside the CLI and `stratus serve` picks it up automatically:
|
|
|
26
26
|
npm install -g @stratusagent/channel-slack
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
You rarely have to type that. Connect an agent in `stratus setup` → **Channels**
|
|
30
|
+
and **Save & finish** offers the install, because storing tokens is already the
|
|
31
|
+
decision to use Slack — see [What Save & finish offers](#what-save--finish-offers).
|
|
32
|
+
|
|
29
33
|
If tokens are stored for an agent but the package isn't installed, `stratus
|
|
30
34
|
serve` says so and starts anyway, serving every other channel.
|
|
31
35
|
|
|
@@ -140,6 +144,47 @@ token, so pass it with `--token` or `STRATUS_GATEWAY_TOKEN`.
|
|
|
140
144
|
- **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.
|
|
141
145
|
- **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.
|
|
142
146
|
- **Test run** — say hello with the current settings before saving anything.
|
|
147
|
+
- **Save & finish** — writes everything, offers any optional package your
|
|
148
|
+
choices imply, then installs the always-on service.
|
|
149
|
+
|
|
150
|
+
### What Save & finish offers
|
|
151
|
+
|
|
152
|
+
The CLI ships no transport and no open port, so a fresh machine finishes setup
|
|
153
|
+
missing the packages its own answers just asked for. Setup knows that before
|
|
154
|
+
the daemon does — it stored the Slack tokens itself — so **Save & finish** names
|
|
155
|
+
what is missing and offers to install it:
|
|
156
|
+
|
|
157
|
+
```text
|
|
158
|
+
2 optional packages are not installed:
|
|
159
|
+
@stratusagent/channel-slack
|
|
160
|
+
Slack tokens are stored for 1 agent(s), but nothing connects to Slack without it.
|
|
161
|
+
@stratusagent/control-api @stratusagent/dashboard
|
|
162
|
+
`stratus dashboard` needs it, and it opens an authenticated port on 127.0.0.1.
|
|
163
|
+
|
|
164
|
+
Install now with npm install -g?
|
|
165
|
+
> Install all of them now
|
|
166
|
+
Install the Slack channel only
|
|
167
|
+
Install the Web dashboard only
|
|
168
|
+
Skip
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Three things about it worth knowing:
|
|
172
|
+
|
|
173
|
+
- **It asks, and anything left uninstalled prints its command** — whether you
|
|
174
|
+
skipped the offer entirely or took only one of the two, since choosing one
|
|
175
|
+
group is not a decision about the other. The control API binds a port, and
|
|
176
|
+
installing it is how an operator says they want one open, so this stays a
|
|
177
|
+
question rather than a default.
|
|
178
|
+
- **It runs before the service install**, so the LaunchAgent comes up with
|
|
179
|
+
those packages already present. A package installed *after* a daemon starts
|
|
180
|
+
is invisible to it; that ordering is the whole reason the offer lives here
|
|
181
|
+
rather than in a closing hint.
|
|
182
|
+
- **A failed install never fails setup.** Your config and credentials are
|
|
183
|
+
already written; you get npm's exit code and the command to run yourself.
|
|
184
|
+
|
|
185
|
+
Setup only suggests `stratus dashboard` at the end when it can actually work —
|
|
186
|
+
a machine that skipped or failed that install is not told to run a command that
|
|
187
|
+
would exit with an error.
|
|
143
188
|
|
|
144
189
|
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.
|
|
145
190
|
|
|
@@ -481,6 +526,96 @@ echo every unparseable line back in its error text — which the tool returns.
|
|
|
481
526
|
A command that can be handed a path is a file reader wearing another name, so
|
|
482
527
|
`--file` is now refused in every scope, including ones you add.
|
|
483
528
|
|
|
529
|
+
## Skills: how an agent does a task well
|
|
530
|
+
|
|
531
|
+
Tools are capability; a **skill** is competence — markdown that teaches an
|
|
532
|
+
agent a procedure: the rubric for a code review, the order to check things in,
|
|
533
|
+
the format to answer in. A skill is a directory with a `SKILL.md`:
|
|
534
|
+
|
|
535
|
+
```text
|
|
536
|
+
~/.stratus/skills/
|
|
537
|
+
code-review/
|
|
538
|
+
SKILL.md
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
```markdown
|
|
542
|
+
---
|
|
543
|
+
name: Code Review
|
|
544
|
+
description: Use when reviewing a diff or a pull request.
|
|
545
|
+
---
|
|
546
|
+
|
|
547
|
+
# Code review
|
|
548
|
+
|
|
549
|
+
Lead with the verdict, then findings ordered by severity...
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
The frontmatter is the soul dialect — `name`, `description`, optional
|
|
553
|
+
`version`, and an optional `requires:` list of toolsets the procedure expects
|
|
554
|
+
(`browser.*`) — read **tolerantly**, unlike a soul's: keys other ecosystems
|
|
555
|
+
write (`license`, `allowed-tools`, nested `metadata:`) and YAML's multi-line
|
|
556
|
+
descriptions are skipped rather than refused, so a skill published for
|
|
557
|
+
another agent loads here unmodified. The directory name is the skill's id.
|
|
558
|
+
Plugins can ship skills too, declared in their manifest; those are addressed
|
|
559
|
+
by the package name verbatim (`stratus-plugin-github:pr-review`), and by the
|
|
560
|
+
bare id while no other package claims it.
|
|
561
|
+
|
|
562
|
+
### Installing skills
|
|
563
|
+
|
|
564
|
+
Anything on GitHub laid out as skill directories — including repos published
|
|
565
|
+
to [skills.sh](https://skills.sh) — installs directly:
|
|
566
|
+
|
|
567
|
+
```bash
|
|
568
|
+
stratus skill add owner/skills-repo # a whole repo of skills
|
|
569
|
+
stratus skill add owner/repo --skill hn-search --agent ava
|
|
570
|
+
stratus skill add ./my-skills # a local directory
|
|
571
|
+
stratus skills # what is installed, and who enables it
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
`skill add` takes a GitHub `owner/repo`, any git URL, or a local path; it
|
|
575
|
+
finds skills at the repo root, one level down, and in the `skills/`,
|
|
576
|
+
`.claude/skills/`, and `.agents/skills/` directories the ecosystem uses, then
|
|
577
|
+
copies each **whole directory** into `~/.stratus/skills/`. An id already
|
|
578
|
+
installed is refused per skill (`--force` replaces it), and an unparseable
|
|
579
|
+
skill is reported while the rest still install.
|
|
580
|
+
|
|
581
|
+
**Installed is not enabled.** A skill is markdown, but it is markdown your
|
|
582
|
+
agent will *follow*, so installing a repo grants no agent anything — each
|
|
583
|
+
soul still opts in through `skills:`. Pass `--agent <id>` to do both at once:
|
|
584
|
+
the command appends the installed ids to that soul's list (rendering the file
|
|
585
|
+
through the canonical formatter, like the API's field edits do).
|
|
586
|
+
|
|
587
|
+
An agent gets a skill only when its soul asks — same allowlist shape as
|
|
588
|
+
`tools:`, except that omitting it means **none** (a skill silently changing
|
|
589
|
+
how an agent behaves is worse than an agent that has to be told):
|
|
590
|
+
|
|
591
|
+
```markdown
|
|
592
|
+
---
|
|
593
|
+
name: Ava
|
|
594
|
+
tools: [fs.read, fs.search]
|
|
595
|
+
skills:
|
|
596
|
+
- code-review
|
|
597
|
+
- stratus-plugin-github:*
|
|
598
|
+
---
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
**An enabled skill costs one line per turn, not its body.** Only the name and
|
|
602
|
+
description reach the system prompt; the agent loads the full procedure with
|
|
603
|
+
the built-in `skill.read` tool when the description says it is relevant. That
|
|
604
|
+
is what lets a fleet carry thirty procedures without every turn paying for all
|
|
605
|
+
thirty. `skill.read` is part of the skills mechanism — never list it under
|
|
606
|
+
`tools:`; it appears (and works) for exactly the agents whose soul enables any
|
|
607
|
+
skill, and reads only the skills that soul allows.
|
|
608
|
+
|
|
609
|
+
**Write the description for routing.** It is the only thing the model sees
|
|
610
|
+
before deciding to load the body, so it says *when to reach for this*, not
|
|
611
|
+
what the file contains: "Use when reviewing a diff or a pull request", not "A
|
|
612
|
+
rubric with twelve sections". A skill without a description does not load.
|
|
613
|
+
|
|
614
|
+
A skill whose `requires:` names toolsets the agent's `tools:` does not cover
|
|
615
|
+
is a warning when the daemon loads the roster, never a refusal — a skill is
|
|
616
|
+
prose, and can degrade. `stratus run` and `stratus chat` serve the same skills
|
|
617
|
+
directory the daemon does, so a skill that routes locally routes in Slack.
|
|
618
|
+
|
|
484
619
|
## Always on
|
|
485
620
|
|
|
486
621
|
`stratus serve` stays a foreground process on purpose — debuggable, and
|
|
@@ -640,7 +775,7 @@ environment quietly demoting a Claude subscription sign-in to per-token billing.
|
|
|
640
775
|
|
|
641
776
|
## Agents are people
|
|
642
777
|
|
|
643
|
-
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:
|
|
778
|
+
An agent's identity lives in a **soul file** — markdown with frontmatter for the structured parts (name, provider, model, tool and skill allowlists) and prose for the personality:
|
|
644
779
|
|
|
645
780
|
```markdown
|
|
646
781
|
---
|
|
@@ -650,6 +785,8 @@ model: claude-opus-5
|
|
|
650
785
|
tools:
|
|
651
786
|
- demo.echo
|
|
652
787
|
- memory.remember
|
|
788
|
+
skills:
|
|
789
|
+
- code-review
|
|
653
790
|
---
|
|
654
791
|
|
|
655
792
|
You are a sharp, warm generalist. Answer first, explain second...
|
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,31 @@ export interface CliEnvironment {
|
|
|
25
25
|
shutdownSignal?: AbortSignal;
|
|
26
26
|
/** Runs launchctl/systemctl. Injected so tests never touch the real one. */
|
|
27
27
|
serviceRunner?: ServiceRunner;
|
|
28
|
+
/** Reports whether an optional package is installed. Injected so tests do not assert on their own node_modules. */
|
|
29
|
+
packageResolver?: PackageResolver;
|
|
30
|
+
/** Installs optional packages. Injected so tests never run npm. */
|
|
31
|
+
packageInstaller?: PackageInstaller;
|
|
28
32
|
}
|
|
33
|
+
export interface PackageInstallResult {
|
|
34
|
+
ok: boolean;
|
|
35
|
+
/** Why it failed, as a line the operator can act on. Empty on success. */
|
|
36
|
+
message: string;
|
|
37
|
+
}
|
|
38
|
+
/** Installs optional packages globally. */
|
|
39
|
+
export type PackageInstaller = (packages: string[]) => Promise<PackageInstallResult>;
|
|
40
|
+
/**
|
|
41
|
+
* Whether spawning npm needs a shell on this platform.
|
|
42
|
+
*
|
|
43
|
+
* On Windows npm is `npm.cmd`, a batch file: a bare `npm` does not exist as
|
|
44
|
+
* an executable there (PATHEXT is a shell's job, not spawn's), and naming
|
|
45
|
+
* the `.cmd` directly has thrown EINVAL since the fix for CVE-2024-27980 —
|
|
46
|
+
* both land in the caller's error handler, so a Windows setup would report
|
|
47
|
+
* that it could not install and leave Slack and the dashboard missing.
|
|
48
|
+
*
|
|
49
|
+
* Every package name reaching the shell is a constant in this file, so
|
|
50
|
+
* there is nothing user-supplied here for it to re-parse.
|
|
51
|
+
*/
|
|
52
|
+
export declare const npmNeedsShell: (platform: NodeJS.Platform) => boolean;
|
|
29
53
|
export interface CliRunOptions {
|
|
30
54
|
argv: string[];
|
|
31
55
|
streams?: CliStreams;
|
|
@@ -85,6 +109,20 @@ export interface ParsedChatCommand {
|
|
|
85
109
|
approvals: CliApprovalMode;
|
|
86
110
|
maxTurns?: number;
|
|
87
111
|
}
|
|
112
|
+
export interface ParsedSkillAddCommand {
|
|
113
|
+
command: 'skill-add';
|
|
114
|
+
/** A GitHub `owner/repo`, a git URL, or a local path. */
|
|
115
|
+
source: string;
|
|
116
|
+
/** Install only these ids (repeatable --skill). */
|
|
117
|
+
skillIds?: string[];
|
|
118
|
+
/** Replace an already-installed id instead of refusing it. */
|
|
119
|
+
force?: boolean;
|
|
120
|
+
/** Enable the installed skills in this agent's soul afterwards. */
|
|
121
|
+
agentId?: string;
|
|
122
|
+
}
|
|
123
|
+
export interface ParsedSkillsCommand {
|
|
124
|
+
command: 'skills';
|
|
125
|
+
}
|
|
88
126
|
export interface ParsedAgentsCommand {
|
|
89
127
|
command: 'agents';
|
|
90
128
|
format: 'text' | 'json';
|
|
@@ -141,8 +179,8 @@ export interface ParsedServeCommand {
|
|
|
141
179
|
export interface ParsedHelpCommand {
|
|
142
180
|
command: 'help';
|
|
143
181
|
}
|
|
144
|
-
export type ParsedCommand = ParsedRunCommand | ParsedChatCommand | ParsedDashboardCommand | ParsedSetupCommand | ParsedAgentNewCommand | ParsedAgentsCommand | ParsedDoctorCommand | ParsedLogsCommand | ParsedServiceCommand | ParsedServeCommand | ParsedHelpCommand;
|
|
145
|
-
export declare const CLI_VERSION = "0.
|
|
182
|
+
export type ParsedCommand = ParsedRunCommand | ParsedChatCommand | ParsedDashboardCommand | ParsedSetupCommand | ParsedAgentNewCommand | ParsedAgentsCommand | ParsedSkillAddCommand | ParsedSkillsCommand | ParsedDoctorCommand | ParsedLogsCommand | ParsedServiceCommand | ParsedServeCommand | ParsedHelpCommand;
|
|
183
|
+
export declare const CLI_VERSION = "0.7.0";
|
|
146
184
|
/**
|
|
147
185
|
* The range every package declares in its `engines` field. Two floors, not
|
|
148
186
|
* one: `node:sqlite` was unflagged in 22.13.0 on the LTS line and in 23.4.0
|
|
@@ -164,7 +202,7 @@ export declare const SUPPORTED_NODE_RANGE = ">=22.13 <23 || >=23.4";
|
|
|
164
202
|
* string is a bad reason to refuse to run.
|
|
165
203
|
*/
|
|
166
204
|
export declare const unsupportedNodeMessage: (version: string) => string | undefined;
|
|
167
|
-
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 agents --gateway http://127.0.0.1:4123\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>, --approvals <headless|remote>,\n --no-events, --no-log-file, --config <path>); everything it\n says is also written to ~/.stratus/logs, which\n \"stratus logs\" reads. With @stratusagent/control-api\n installed it also serves the HTTP + WebSocket control API\n on 127.0.0.1:4123 (--no-api, --api-host, --api-port, or\n the config file's \"api\" block)\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 --gateway <url> asks a running daemon instead of resolving\n locally, authenticating with ~/.stratus/gateway-token\n (override with --token or STRATUS_GATEWAY_TOKEN)\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 Open the web dashboard: finds a running daemon (or starts one),\n mints a single-use sign-in link, and opens your browser at it.\n Needs @stratusagent/control-api and @stratusagent/dashboard\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 run/chat: tool approval mode \u2014 always, ask, or never (default: always)\n serve: how the daemon reaches a human \u2014 headless (refuse every\n gated call) or remote (ask in Slack). Default headless, or\n the config file's \"approvals.mode\"\n --max-turns Maximum provider turns per run (default: 8)\n --port dashboard: port for a daemon it starts (default: 4123)\n --host dashboard: host for a daemon it starts (default: 127.0.0.1)\n --no-open Do not open the browser automatically\n --gateway agents: read the roster from a running daemon's control API\n --token Bearer token for --gateway (default: ~/.stratus/gateway-token)\n --no-api serve: do not serve the control API\n --api-host serve: control API interface (default: 127.0.0.1)\n --api-port serve: control API port (default: 4123, 0 for any free port)\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
|
|
205
|
+
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 agents --gateway http://127.0.0.1:4123\n stratus skill add stratuslabs/skill-code-review\n stratus skill add ./my-skills --skill code-review --agent ava\n stratus skills\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). Save & finish offers to install any optional\n package your answers imply (the Slack channel, the control\n API and dashboard) before it starts the daemon\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>, --approvals <headless|remote>,\n --no-events, --no-log-file, --config <path>); everything it\n says is also written to ~/.stratus/logs, which\n \"stratus logs\" reads. With @stratusagent/control-api\n installed it also serves the HTTP + WebSocket control API\n on 127.0.0.1:4123 (--no-api, --api-host, --api-port, or\n the config file's \"api\" block)\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 skill add Install skills from a GitHub repo (owner/repo or URL) or a\n local path into ~/.stratus/skills \u2014 whole directories, one\n per skill; works with skills published for other agents\n (skills.sh-style repos). Installed is not enabled: a soul\n opts in via skills:, or pass --agent <id> to enable now.\n --skill <id> picks from a multi-skill repo (repeatable),\n --force replaces an already-installed id\n skills List installed skills and which agents enable each\n (also: stratus skill list)\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 --gateway <url> asks a running daemon instead of resolving\n locally, authenticating with ~/.stratus/gateway-token\n (override with --token or STRATUS_GATEWAY_TOKEN)\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 Open the web dashboard: finds a running daemon (or starts one),\n mints a single-use sign-in link, and opens your browser at it.\n Needs @stratusagent/control-api and @stratusagent/dashboard\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 run/chat: tool approval mode \u2014 always, ask, or never (default: always)\n serve: how the daemon reaches a human \u2014 headless (refuse every\n gated call) or remote (ask in Slack). Default headless, or\n the config file's \"approvals.mode\"\n --max-turns Maximum provider turns per run (default: 8)\n --port dashboard: port for a daemon it starts (default: 4123)\n --host dashboard: host for a daemon it starts (default: 127.0.0.1)\n --no-open Do not open the browser automatically\n --gateway agents: read the roster from a running daemon's control API\n --token Bearer token for --gateway (default: ~/.stratus/gateway-token)\n --no-api serve: do not serve the control API\n --api-host serve: control API interface (default: 127.0.0.1)\n --api-port serve: control API port (default: 4123, 0 for any free port)\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\nPlugins (tools):\n Capability is optional: install a package, then list it under \"plugins\" in a\n TRUSTED config (--config, STRATUS_CONFIG, or ~/.stratus/config.json), keyed by\n package name. A plugin runs inside this process, so an auto-discovered\n project-local stratus.config.json may not enable one.\n\n \"plugins\": {\n \"@stratusagent/tool-fs\": { \"enabled\": true, \"roots\": [\"~/notes\"],\n \"agents\": { \"ava\": { \"roots\": [\"~/work/ava\"] } } },\n \"@stratusagent/tool-web\": { \"enabled\": true }\n }\n\n Available: @stratusagent/tool-fs (fs.read/list/search/write),\n @stratusagent/tool-shell (shell.run), @stratusagent/tool-web (web.fetch),\n @stratusagent/tool-browser (browser.goto/read/screenshot/act).\n Installing one grants no agent anything \u2014 each soul lists what it may call.\n\nSoul files:\n A soul file is markdown with frontmatter (name, provider, model, tools, skills, credentials)\n followed by the agent's persona in prose. See examples/souls/ava.md.\n \"tools\" takes exact names or a whole toolset: tools: [fs.read, fs.search] or\n tools: [fs.*]. Omitted means every registered tool.\n \"skills\" is the same allowlist shape over installed skills (see stratus\n skills), except omitted means none \u2014 a skill is enabled per agent, never\n by being installed.\n";
|
|
168
206
|
declare const stringifyValue: (value: JsonValue) => string;
|
|
169
207
|
export declare const parseCommand: (argv: string[], env?: CliEnvironment) => ParsedCommand;
|
|
170
208
|
export declare const formatEvent: (event: StratusEvent) => string | null;
|
|
@@ -247,6 +285,8 @@ export declare const runLogs: (command: ParsedLogsCommand, streams: CliStreams,
|
|
|
247
285
|
* foreground process; this only tells the platform how to keep it up.
|
|
248
286
|
*/
|
|
249
287
|
export declare const runService: (command: ParsedServiceCommand, streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
288
|
+
export declare const runSkillAdd: (command: ParsedSkillAddCommand, streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
289
|
+
export declare const runSkills: (streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
250
290
|
export declare const runAgentNew: (command: ParsedAgentNewCommand, streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
251
291
|
/**
|
|
252
292
|
* `stratus dashboard` — open the web UI against a running daemon, starting
|
|
@@ -258,6 +298,8 @@ export declare const runAgentNew: (command: ParsedAgentNewCommand, streams: CliS
|
|
|
258
298
|
* the first time either side gained a rule.
|
|
259
299
|
*/
|
|
260
300
|
export declare const runDashboard: (command: ParsedDashboardCommand, streams: CliStreams, env?: CliEnvironment) => Promise<number>;
|
|
301
|
+
/** Reports whether an optional package is installed. */
|
|
302
|
+
export type PackageResolver = (specifier: string) => boolean;
|
|
261
303
|
/**
|
|
262
304
|
* `stratus serve` — run the gateway (stratusd) in the foreground: load the
|
|
263
305
|
* roster, accept dispatches, print events, and drain cleanly on SIGTERM,
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAaL,KAAK,SAAS,EAGd,KAAK,OAAO,EACZ,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAyC5B,OAAO,EAsDL,KAAK,sBAAsB,EAI3B,KAAK,gBAAgB,EAErB,KAAK,aAAa,EAGlB,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EASL,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AAatB,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,KAAK,SAAS,GACf,MAAM,WAAW,CAAC;AAKnB,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE3E,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,IAAI,CAAC,OAAO,OAAO,CAAC,MAAM,EA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