@stratusagent/cli 0.9.0 → 0.9.1
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 +52 -0
- package/dist/index.d.ts +24 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +374 -6
- package/dist/index.js.map +1 -1
- package/dist/service.d.ts +34 -2
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +104 -5
- package/dist/service.js.map +1 -1
- package/package.json +21 -21
package/README.md
CHANGED
|
@@ -206,6 +206,8 @@ stratus service status
|
|
|
206
206
|
stratus logs -f # what the daemon has been doing
|
|
207
207
|
stratus logs --agent ava -n 200
|
|
208
208
|
stratus doctor # what a run would use right now, and why
|
|
209
|
+
stratus update # the whole upgrade dance, in the safe order
|
|
210
|
+
stratus update --check # report what an update would do, do nothing
|
|
209
211
|
stratus agent new # create an agent (guided on a terminal)
|
|
210
212
|
stratus agent new --format soul > ava.md
|
|
211
213
|
stratus agents # who's on the team: souls, models, memory
|
|
@@ -755,6 +757,56 @@ right choice.) The systemd equivalent is `loginctl enable-linger` on a machine
|
|
|
755
757
|
you don't stay logged in to. Setup says both in the menu rather than leaving
|
|
756
758
|
them to be discovered after a reboot.
|
|
757
759
|
|
|
760
|
+
## Updating
|
|
761
|
+
|
|
762
|
+
`~/.stratus` is a real on-disk format — config, credentials, souls, memory,
|
|
763
|
+
the session database — so upgrading is more than `npm install -g`. Two pieces
|
|
764
|
+
handle it:
|
|
765
|
+
|
|
766
|
+
**State is versioned, and migrations run themselves.** `~/.stratus/state.json`
|
|
767
|
+
records a schema version and which migrations have been applied. On the first
|
|
768
|
+
command of a newer build — whatever installed it: npm directly, Homebrew, a
|
|
769
|
+
pinned version in CI — any pending migrations run automatically, each one
|
|
770
|
+
idempotent, applied in order, and recorded as it completes. This is deliberate:
|
|
771
|
+
an upgrade path that migrates only through one blessed command leaves the
|
|
772
|
+
other install methods on unmigrated state, and the two populations diverge
|
|
773
|
+
silently. (One constraint that keeps the automatic path honest: a migration
|
|
774
|
+
must be safe to run while a daemon is serving, because this path does not
|
|
775
|
+
stop the managed service — only `stratus update` does. A migration needing
|
|
776
|
+
exclusive access to shared state is not registered until the registry can
|
|
777
|
+
require that bracket.)
|
|
778
|
+
|
|
779
|
+
The reverse direction refuses instead of guessing: against state stamped by
|
|
780
|
+
a **newer** build than itself, anything that *writes* under `~/.stratus` —
|
|
781
|
+
`serve`, `setup`, `chat`, `run`, `skill add`, `dashboard`, `schedules
|
|
782
|
+
cancel`, `service install`/`start` — refuses with a line naming the fix,
|
|
783
|
+
because a downgraded build writing into a newer format is the one way to
|
|
784
|
+
corrupt it. Read-only commands (`logs`, `agents`, `doctor`, `service
|
|
785
|
+
status`/`stop`) warn and continue: reading is how you diagnose your way out.
|
|
786
|
+
|
|
787
|
+
**`stratus update` does the operational sequence around that, in the order
|
|
788
|
+
that cannot lose data:**
|
|
789
|
+
|
|
790
|
+
```bash
|
|
791
|
+
stratus update # stop stratusd → upgrade from npm → migrate →
|
|
792
|
+
# rewrite the service unit → restart
|
|
793
|
+
stratus update --check # report all of it, change nothing (exits 1 when
|
|
794
|
+
# something is actionable, for scripts and cron)
|
|
795
|
+
```
|
|
796
|
+
|
|
797
|
+
The service stop comes first so no daemon holds the session database while
|
|
798
|
+
state changes, and the unit rewrite is the step nothing else performs: the
|
|
799
|
+
unit runs the daemon by **absolute paths** (see [Always on](#always-on)), so
|
|
800
|
+
upgrading node — under nvm, a whole new version directory — leaves the unit
|
|
801
|
+
pointing at an interpreter that no longer exists. The service stops working
|
|
802
|
+
and nothing says so; the agents just stop answering. `stratus update` rewrites
|
|
803
|
+
the unit with the current node and entrypoint paths, preserving its `--config`
|
|
804
|
+
pin and login setting, and `stratus doctor` flags a stale unit path as a
|
|
805
|
+
problem. Every step degrades independently — with npm unreachable, `update`
|
|
806
|
+
skips the package upgrade but still migrates and repairs the unit, which is
|
|
807
|
+
exactly what the offline case needs. A daemon that was deliberately stopped
|
|
808
|
+
before the update is left stopped after it.
|
|
809
|
+
|
|
758
810
|
## Logs
|
|
759
811
|
|
|
760
812
|
Under a service manager the daemon's stdout is gone, so everything `stratus
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type JsonValue, type Session, type StratusEvent } from '@stratusagent/core';
|
|
2
2
|
import { type CredentialProviderName, type RuntimeSelection, type RuntimeConfig, type StratusProviderName } from '@stratusagent/state';
|
|
3
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';
|
|
4
|
+
export { installService, launchdPlist, readServiceCommand, readServiceStatus, servicePlatform, serviceUnitPath, startService, stopService, systemdUnit, uninstallService, SERVICE_LABEL, type ServiceRunner, type ServiceStatus, } from './service.ts';
|
|
5
5
|
export { createLogWriter, currentLogPosition, truncateRedirectLogs, formatLogRecord, parseLogLines, readRecentRecords, tailLog, type LogRecord, } from './logs.ts';
|
|
6
6
|
export { createFileMemoryStore } from '@stratusagent/state';
|
|
7
7
|
export type { StoredCredential, RuntimeConfig } from '@stratusagent/state';
|
|
@@ -25,10 +25,14 @@ 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
|
+
/** Service-manager platform override (tests) — which unit format and manager commands apply. */
|
|
29
|
+
servicePlatform?: NodeJS.Platform;
|
|
28
30
|
/** Reports whether an optional package is installed. Injected so tests do not assert on their own node_modules. */
|
|
29
31
|
packageResolver?: PackageResolver;
|
|
30
32
|
/** Installs optional packages. Injected so tests never run npm. */
|
|
31
33
|
packageInstaller?: PackageInstaller;
|
|
34
|
+
/** Looks up a package's latest published version. Injected so tests never ask npm. */
|
|
35
|
+
packageVersionFetcher?: PackageVersionFetcher;
|
|
32
36
|
}
|
|
33
37
|
export interface PackageInstallResult {
|
|
34
38
|
ok: boolean;
|
|
@@ -37,6 +41,17 @@ export interface PackageInstallResult {
|
|
|
37
41
|
}
|
|
38
42
|
/** Installs optional packages globally. */
|
|
39
43
|
export type PackageInstaller = (packages: string[]) => Promise<PackageInstallResult>;
|
|
44
|
+
/** The latest published version of a package, or undefined when the registry did not answer. */
|
|
45
|
+
export type PackageVersionFetcher = (packageName: string) => Promise<string | undefined>;
|
|
46
|
+
/** How long `stratus update` waits for npm to answer a version lookup. */
|
|
47
|
+
export declare const VERSION_LOOKUP_TIMEOUT_MS = 15000;
|
|
48
|
+
/**
|
|
49
|
+
* Dotted-numeric comparison, enough for this package's own versions:
|
|
50
|
+
* positive when `a` is newer than `b`. Anything unparseable in a segment
|
|
51
|
+
* counts as zero rather than throwing — a weird registry answer must not
|
|
52
|
+
* crash the update that would fix things.
|
|
53
|
+
*/
|
|
54
|
+
export declare const compareVersions: (a: string, b: string) => number;
|
|
40
55
|
/**
|
|
41
56
|
* Whether spawning npm needs a shell on this platform.
|
|
42
57
|
*
|
|
@@ -147,6 +162,11 @@ export interface ParsedDoctorCommand {
|
|
|
147
162
|
format: 'text' | 'json';
|
|
148
163
|
configPath?: string;
|
|
149
164
|
}
|
|
165
|
+
export interface ParsedUpdateCommand {
|
|
166
|
+
command: 'update';
|
|
167
|
+
/** Report what an update would do — version, migrations, unit health — without doing any of it. */
|
|
168
|
+
check: boolean;
|
|
169
|
+
}
|
|
150
170
|
export interface ParsedServiceCommand {
|
|
151
171
|
command: 'service';
|
|
152
172
|
action: 'install' | 'uninstall' | 'status' | 'start' | 'stop';
|
|
@@ -186,8 +206,8 @@ export interface ParsedServeCommand {
|
|
|
186
206
|
export interface ParsedHelpCommand {
|
|
187
207
|
command: 'help';
|
|
188
208
|
}
|
|
189
|
-
export type ParsedCommand = ParsedRunCommand | ParsedChatCommand | ParsedDashboardCommand | ParsedSetupCommand | ParsedAgentNewCommand | ParsedAgentsCommand | ParsedSkillAddCommand | ParsedSkillsCommand | ParsedSchedulesCommand | ParsedDoctorCommand | ParsedLogsCommand | ParsedServiceCommand | ParsedServeCommand | ParsedHelpCommand;
|
|
190
|
-
export declare const CLI_VERSION = "0.9.
|
|
209
|
+
export type ParsedCommand = ParsedRunCommand | ParsedChatCommand | ParsedDashboardCommand | ParsedSetupCommand | ParsedAgentNewCommand | ParsedAgentsCommand | ParsedSkillAddCommand | ParsedSkillsCommand | ParsedSchedulesCommand | ParsedDoctorCommand | ParsedLogsCommand | ParsedUpdateCommand | ParsedServiceCommand | ParsedServeCommand | ParsedHelpCommand;
|
|
210
|
+
export declare const CLI_VERSION = "0.9.1";
|
|
191
211
|
/**
|
|
192
212
|
* The range every package declares in its `engines` field. Two floors, not
|
|
193
213
|
* one: `node:sqlite` was unflagged in 22.13.0 on the LTS line and in 23.4.0
|
|
@@ -209,7 +229,7 @@ export declare const SUPPORTED_NODE_RANGE = ">=22.13 <23 || >=23.4";
|
|
|
209
229
|
* string is a bad reason to refuse to run.
|
|
210
230
|
*/
|
|
211
231
|
export declare const unsupportedNodeMessage: (version: string) => string | undefined;
|
|
212
|
-
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 schedules\n stratus schedules cancel <id>\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 schedules List every schedule the fleet has set \u2014 cadence, prompt,\n pre-authorized destination, next firing \u2014 straight from the\n daemon's database (--format json). \"stratus schedules\n cancel <id>\" stops the next firing and revokes the\n destination that was approved with it\n (also: stratus schedule list / schedule cancel <id>)\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";
|
|
232
|
+
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 schedules\n stratus schedules cancel <id>\n stratus doctor\n stratus update\n stratus update --check\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 schedules List every schedule the fleet has set \u2014 cadence, prompt,\n pre-authorized destination, next firing \u2014 straight from the\n daemon's database (--format json). \"stratus schedules\n cancel <id>\" stops the next firing and revokes the\n destination that was approved with it\n (also: stratus schedule list / schedule cancel <id>)\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 update The whole upgrade dance, in the order that cannot lose\n data: stop stratusd, upgrade the package from npm, run\n pending state migrations, rewrite the service unit with\n current node/entrypoint paths, restart. --check reports\n what it would do without doing any of it (exits 1 when\n something is actionable). Works offline too \u2014 an\n unreachable npm skips the upgrade but still migrates and\n repairs the unit\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";
|
|
213
233
|
declare const stringifyValue: (value: JsonValue) => string;
|
|
214
234
|
export declare const parseCommand: (argv: string[], env?: CliEnvironment) => ParsedCommand;
|
|
215
235
|
export declare const formatEvent: (event: StratusEvent) => string | null;
|
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,EAaL,KAAK,SAAS,EAGd,KAAK,OAAO,EACZ,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAgD5B,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;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