@formthefog/stratus 2026.2.24 → 2026.3.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/.github/sentinel/action.yml +100 -0
  2. package/.github/sentinel/dist/codebase.d.ts +3 -0
  3. package/.github/sentinel/dist/codebase.d.ts.map +1 -0
  4. package/.github/sentinel/dist/context.d.ts +6 -0
  5. package/.github/sentinel/dist/context.d.ts.map +1 -0
  6. package/.github/sentinel/dist/fixer.d.ts +6 -0
  7. package/.github/sentinel/dist/fixer.d.ts.map +1 -0
  8. package/.github/sentinel/dist/index.d.ts +1 -0
  9. package/.github/sentinel/dist/index.d.ts.map +1 -0
  10. package/.github/sentinel/dist/index.js +68808 -0
  11. package/.github/sentinel/dist/index.js.map +1 -0
  12. package/.github/sentinel/dist/licenses.txt +1152 -0
  13. package/.github/sentinel/dist/models/anthropic.d.ts +26 -0
  14. package/.github/sentinel/dist/models/anthropic.d.ts.map +1 -0
  15. package/.github/sentinel/dist/models/openai.d.ts +26 -0
  16. package/.github/sentinel/dist/models/openai.d.ts.map +1 -0
  17. package/.github/sentinel/dist/models/openrouter.d.ts +31 -0
  18. package/.github/sentinel/dist/models/openrouter.d.ts.map +1 -0
  19. package/.github/sentinel/dist/models/types.d.ts +37 -0
  20. package/.github/sentinel/dist/models/types.d.ts.map +1 -0
  21. package/.github/sentinel/dist/orchestrator.d.ts +3 -0
  22. package/.github/sentinel/dist/orchestrator.d.ts.map +1 -0
  23. package/.github/sentinel/dist/policy.d.ts +15 -0
  24. package/.github/sentinel/dist/policy.d.ts.map +1 -0
  25. package/.github/sentinel/dist/reporter.d.ts +8 -0
  26. package/.github/sentinel/dist/reporter.d.ts.map +1 -0
  27. package/.github/sentinel/dist/responder.d.ts +6 -0
  28. package/.github/sentinel/dist/responder.d.ts.map +1 -0
  29. package/.github/sentinel/dist/router.d.ts +2 -0
  30. package/.github/sentinel/dist/router.d.ts.map +1 -0
  31. package/.github/sentinel/dist/schemas/config.d.ts +195 -0
  32. package/.github/sentinel/dist/schemas/config.d.ts.map +1 -0
  33. package/.github/sentinel/dist/schemas/fix.d.ts +130 -0
  34. package/.github/sentinel/dist/schemas/fix.d.ts.map +1 -0
  35. package/.github/sentinel/dist/schemas/review.d.ts +275 -0
  36. package/.github/sentinel/dist/schemas/review.d.ts.map +1 -0
  37. package/.github/sentinel/dist/sourcemap-register.js +1 -0
  38. package/.github/sentinel/dist/subway.d.ts +31 -0
  39. package/.github/sentinel/dist/subway.d.ts.map +1 -0
  40. package/.github/sentinel/dist/types.d.ts +210 -0
  41. package/.github/sentinel/dist/types.d.ts.map +1 -0
  42. package/.github/sentinel/package-lock.json +2389 -0
  43. package/.github/sentinel/package.json +29 -0
  44. package/.github/sentinel/src/codebase.ts +265 -0
  45. package/.github/sentinel/src/context.ts +182 -0
  46. package/.github/sentinel/src/fixer.ts +353 -0
  47. package/.github/sentinel/src/index.ts +263 -0
  48. package/.github/sentinel/src/models/anthropic.ts +244 -0
  49. package/.github/sentinel/src/models/openai.ts +242 -0
  50. package/.github/sentinel/src/models/openrouter.ts +319 -0
  51. package/.github/sentinel/src/models/types.ts +35 -0
  52. package/.github/sentinel/src/orchestrator.ts +287 -0
  53. package/.github/sentinel/src/policy.ts +133 -0
  54. package/.github/sentinel/src/reporter.ts +666 -0
  55. package/.github/sentinel/src/responder.ts +156 -0
  56. package/.github/sentinel/src/router.ts +308 -0
  57. package/.github/sentinel/src/schemas/config.ts +84 -0
  58. package/.github/sentinel/src/schemas/fix.ts +44 -0
  59. package/.github/sentinel/src/schemas/review.ts +73 -0
  60. package/.github/sentinel/src/subway.ts +250 -0
  61. package/.github/sentinel/src/types.ts +234 -0
  62. package/.github/sentinel/tsconfig.json +19 -0
  63. package/.github/sentinel.yml +34 -0
  64. package/.github/workflows/sentinel.yml +55 -0
  65. package/README.md +88 -102
  66. package/SECURITY.md +21 -10
  67. package/TROUBLESHOOTING.md +2 -2
  68. package/index.ts +219 -109
  69. package/openclaw.plugin.json +50 -26
  70. package/package.json +1 -1
  71. package/skills/stratus-info/SKILL.md +70 -10
  72. package/src/client.ts +78 -18
  73. package/src/config.ts +29 -8
  74. package/src/setup.ts +53 -61
  75. package/src/types.ts +11 -0
package/README.md CHANGED
@@ -10,10 +10,12 @@ Integrate Stratus V3 (X1-AC), a state-of-the-art action-conditioned JEPA (Joint-
10
10
 
11
11
  ## Features
12
12
 
13
- - **Model Provider**: Use Stratus models (GPT-4o or Claude Sonnet 4 backends) for agent conversations
13
+ - **Zero-Config**: Works out of the box with Formation pooled keys no API key needed
14
+ - **2050+ Models**: Dynamic discovery via OpenRouter — OpenAI, Anthropic, Google, and more
15
+ - **Model Provider**: Use Stratus models for agent conversations with predictive planning
14
16
  - **Embeddings Tool**: Generate 768-dimensional semantic state embeddings
15
- - **Rollout Tool**: Multi-step task planning with action sequence prediction
16
- - **Secure**: API key authentication with automatic validation
17
+ - **Rollout Tool**: Multi-step task planning via Policy Head v3 (94.4% accuracy)
18
+ - **BYOK Support**: Bring your own provider keys (`openai_key`, `anthropic_key`, `gemini_key`) for zero-markup usage
17
19
  - **Opt-in Tools**: Tools are optional and require explicit allowlisting
18
20
 
19
21
  > See [SECURITY.md](./SECURITY.md) for a full accounting of credentials accessed, network calls made, and files written.
@@ -26,23 +28,10 @@ Integrate Stratus V3 (X1-AC), a state-of-the-art action-conditioned JEPA (Joint-
26
28
 
27
29
  ## Installation
28
30
 
29
- ### Quick Start (3 Steps) ✨
31
+ ### Quick Start (2 Steps) ✨
30
32
 
31
33
  > **Note:** This plugin does NOT have an automatic postinstall script. You must run setup manually.
32
34
 
33
- **Before you begin**, export your Stratus API key. Get one at [stratus.run](https://stratus.run).
34
-
35
- ```bash
36
- export STRATUS_API_KEY=stratus_sk_your_key_here
37
- ```
38
-
39
- To persist it across sessions, add it to your shell config:
40
-
41
- ```bash
42
- echo 'export STRATUS_API_KEY=stratus_sk_your_key_here' >> ~/.zshrc
43
- source ~/.zshrc
44
- ```
45
-
46
35
  ```bash
47
36
  # 1. Install the plugin
48
37
  openclaw plugins install @formthefog/stratus
@@ -54,64 +43,24 @@ openclaw plugins install @formthefog/stratus
54
43
  /stratus verify
55
44
  ```
56
45
 
57
- **That's it!** The `/stratus setup` command handles:
58
- - ✅ API key configuration
46
+ **That's it!** No API key required — Formation pooled keys give you instant access to all 2050+ models.
47
+
48
+ The `/stratus setup` command handles:
49
+ - ✅ Zero-config auth via Formation pool (or BYOK if you have a key)
59
50
  - ✅ OpenClaw config updates
60
51
  - ✅ Auth profile creation
61
- - ✅ Model registration
52
+ - ✅ Dynamic model registration
62
53
  - ✅ Gateway restart prompt
63
54
 
64
55
  **No manual config editing required!** 🧈
65
56
 
66
- > **Tip:** Once installed, you can also access Stratus models with `/model stratus` in chat.
67
-
68
- ---
69
-
70
- ## Using the API directly
71
-
72
- Stratus is drop-in compatible with OpenAI and Anthropic SDKs. Just change the `baseURL` and use your `STRATUS_API_KEY`.
73
-
74
- **OpenAI SDK (TypeScript)**
75
- ```typescript
76
- import OpenAI from 'openai';
77
-
78
- const client = new OpenAI({
79
- baseURL: 'https://api.stratus.run/v1',
80
- apiKey: process.env.STRATUS_API_KEY
81
- });
82
-
83
- const response = await client.chat.completions.create({
84
- model: 'stratus-x1ac-base-claude-sonnet-4-5',
85
- messages: [{ role: 'user', content: 'Plan a route through 20 cities' }]
86
- });
87
- ```
88
-
89
- **Anthropic SDK (TypeScript)**
90
- ```typescript
91
- import Anthropic from '@anthropic-ai/sdk';
92
-
93
- const client = new Anthropic({
94
- baseURL: 'https://api.stratus.run/v1',
95
- apiKey: process.env.STRATUS_API_KEY
96
- });
97
-
98
- const response = await client.messages.create({
99
- model: 'stratus-x1ac-base-claude-sonnet-4-5',
100
- max_tokens: 1024,
101
- messages: [{ role: 'user', content: 'Plan a route through 20 cities' }]
102
- });
103
- ```
57
+ > **Optional BYOK (no markup):** Set `STRATUS_API_KEY` to bypass the Formation pool:
58
+ > ```bash
59
+ > export STRATUS_API_KEY=stratus_sk_your_key_here
60
+ > ```
61
+ > Then re-run `/stratus setup`.
104
62
 
105
- **cURL**
106
- ```bash
107
- curl https://api.stratus.run/v1/chat/completions \
108
- -H "Content-Type: application/json" \
109
- -H "Authorization: Bearer $STRATUS_API_KEY" \
110
- -d '{
111
- "model": "stratus-x1ac-base-claude-sonnet-4-5",
112
- "messages": [{ "role": "user", "content": "Plan a route through 20 cities" }]
113
- }'
114
- ```
63
+ > **Tip:** Once installed, you can also access Stratus models with `/model stratus` in chat.
115
64
 
116
65
  ---
117
66
 
@@ -124,6 +73,7 @@ Use these slash commands in any OpenClaw chat (TUI, Telegram, Discord, etc.):
124
73
  | `/stratus` | Show help |
125
74
  | `/stratus setup` | Interactive configuration wizard |
126
75
  | `/stratus verify` | Verify plugin is configured correctly |
76
+ | `/stratus models` | List all available models (live from API) |
127
77
 
128
78
  ---
129
79
 
@@ -131,11 +81,11 @@ Use these slash commands in any OpenClaw chat (TUI, Telegram, Discord, etc.):
131
81
 
132
82
  The interactive setup command will:
133
83
 
134
- 1. ✅ Prompt for your Stratus API key
84
+ 1. ✅ Detect auth mode (BYOK if `STRATUS_API_KEY` is set, Formation pool otherwise)
135
85
  2. ✅ Update OpenClaw configuration
136
86
  3. ✅ Configure authentication profiles
137
- 4. ✅ Add model aliases
138
- 5. ✅ (Optional) Add environment variables to your shell config
87
+ 4. ✅ Dynamically register all available models from the API
88
+ 5. ✅ Report auth mode and markup status
139
89
 
140
90
  ---
141
91
 
@@ -214,23 +164,41 @@ Edit `~/.openclaw/openclaw.json`:
214
164
  ```json
215
165
  {
216
166
  "plugins": {
217
- "stratus": {
218
- "enabled": true,
219
- "apiKey": "${STRATUS_API_KEY}",
220
- "baseUrl": "https://api.stratus.run",
221
- "provider": {
167
+ "entries": {
168
+ "stratus": {
222
169
  "enabled": true,
223
- "defaultModel": "stratus-x1ac-base-claude-sonnet-4-5"
224
- },
225
- "tools": {
226
- "embeddings": { "enabled": true },
227
- "rollout": { "enabled": true }
170
+ "config": {
171
+ "apiKey": "${STRATUS_API_KEY}",
172
+ "baseUrl": "https://api.stratus.run",
173
+ "inlineKeys": {
174
+ "openai_key": "${OPENAI_API_KEY}",
175
+ "anthropic_key": "${ANTHROPIC_API_KEY}",
176
+ "gemini_key": "${GOOGLE_API_KEY}"
177
+ },
178
+ "provider": {
179
+ "enabled": true,
180
+ "defaultModel": "stratus-x1ac-base-claude-sonnet-4-5"
181
+ },
182
+ "tools": {
183
+ "embeddings": { "enabled": true },
184
+ "rollout": { "enabled": true }
185
+ }
186
+ }
228
187
  }
229
188
  }
230
189
  }
231
190
  }
232
191
  ```
233
192
 
193
+ > **Note:** All keys are optional. Without any keys, Formation pooled keys are used automatically (25% markup). Inline provider keys (`openai_key`, `anthropic_key`, `gemini_key`) let you BYOK for specific providers while using the pool for others.
194
+
195
+ > **Important:** OpenClaw's plugin config schema requires plugin-specific settings
196
+ > to be nested under a `config` key within `plugins.entries.<id>`. Only `enabled`
197
+ > and `config` are valid top-level keys per entry. Placing keys like `apiKey` or
198
+ > `tools` at the top level will cause a config validation error and prevent the
199
+ > gateway from starting.
200
+ ```
201
+
234
202
  ## Usage
235
203
 
236
204
  ### 1. Use Stratus as a Model Provider
@@ -251,9 +219,9 @@ openclaw agent --model stratus/stratus-x1ac-small-claude-haiku-4-5 \
251
219
  "Quick question: what is JEPA?"
252
220
  ```
253
221
 
254
- **Available Models: 75 Total**
222
+ **Available Models: Dynamic (2050+ models)**
255
223
 
256
- The plugin registers all 75 Stratus chat completion models:
224
+ Models are fetched live from the Stratus API on startup via OpenRouter dynamic discovery and refreshed automatically. Run `/stratus models` to see the current full list. The plugin supports all models returned by the API.
257
225
 
258
226
  **Model Format:** `stratus-x1ac-{size}-{llm}`
259
227
 
@@ -269,9 +237,12 @@ The plugin registers all 75 Stratus chat completion models:
269
237
 
270
238
  **Anthropic LLMs (Claude 4.x):**
271
239
 
240
+ - `claude-sonnet-4-6` - Claude 4.6 Sonnet (latest)
241
+ - `claude-opus-4-6` - Claude 4.6 Opus (latest, high performance)
272
242
  - `claude-sonnet-4-5` - Claude 4.5 Sonnet (recommended)
273
243
  - `claude-opus-4-5` - Claude 4.5 Opus
274
244
  - `claude-haiku-4-5` - Claude 4.5 Haiku (fast)
245
+ - `claude-opus-4-1` - Claude 4.1 Opus
275
246
  - `claude-sonnet-4` - Claude 4 Sonnet
276
247
  - `claude-opus-4` - Claude 4 Opus
277
248
 
@@ -279,11 +250,20 @@ The plugin registers all 75 Stratus chat completion models:
279
250
 
280
251
  - `claude-3-7-sonnet`, `claude-3-5-sonnet`, `claude-3-opus`, `claude-3-sonnet`, `claude-3-haiku`
281
252
 
253
+ **Google LLMs:**
254
+
255
+ - `gemini-2.0-flash` - Gemini 2.0 Flash (1M context)
256
+ - `gemini-1.5-pro` - Gemini 1.5 Pro (2M context)
257
+ - `gemini-1.5-flash` - Gemini 1.5 Flash (1M context)
258
+ - `gemini-pro` - Gemini Pro
259
+
282
260
  **Examples:**
283
261
 
284
262
  - `stratus/stratus-x1ac-base-claude-sonnet-4-5` (recommended)
263
+ - `stratus/stratus-x1ac-base-claude-sonnet-4-6` (latest Claude)
285
264
  - `stratus/stratus-x1ac-base-gpt-4o`
286
- - `stratus/stratus-x1ac-large-claude-opus-4-5` (high performance)
265
+ - `stratus/stratus-x1ac-base-gemini-2.0-flash` (1M context window)
266
+ - `stratus/stratus-x1ac-large-claude-opus-4-6` (high performance)
287
267
  - `stratus/stratus-x1ac-small-gpt-4o-mini` (development/testing)
288
268
 
289
269
  ### 2. Use Stratus Tools
@@ -467,17 +447,9 @@ Tools are **opt-in only**:
467
447
 
468
448
  ### Quick Fixes
469
449
 
470
- #### "Stratus API key not configured"
471
-
472
- **Solution**:
473
-
474
- ```bash
475
- export STRATUS_API_KEY=stratus_sk_live_your_key_here
476
- ```
477
-
478
450
  #### "Invalid Stratus API key format"
479
451
 
480
- **Solution**: Verify your API key from stratus.run starts with `stratus_sk_`.
452
+ **Solution**: If you set `STRATUS_API_KEY`, verify it starts with `stratus_sk_`. Or remove it entirely to use Formation pool (zero-config).
481
453
 
482
454
  #### "Tool not available"
483
455
 
@@ -523,18 +495,32 @@ This follows UNIX philosophy: clean separation, composable interfaces, transpare
523
495
 
524
496
  ### Configuration Schema
525
497
 
498
+ OpenClaw plugin entries use `{ enabled, config }` at the top level. The `config`
499
+ object holds all plugin-specific settings:
500
+
526
501
  ```typescript
502
+ // What OpenClaw stores in plugins.entries.stratus
503
+ interface PluginEntryConfig {
504
+ enabled?: boolean;
505
+ config?: StratusPluginConfig;
506
+ }
507
+
508
+ // Plugin-specific config (nested under "config" key)
527
509
  interface StratusPluginConfig {
528
- enabled: boolean; // Enable plugin
529
- apiKey: string; // API key (or env var)
530
- baseUrl: string; // API base URL
531
- provider: {
532
- enabled: boolean; // Enable provider registration
533
- defaultModel: string; // Default model
510
+ apiKey?: string; // API key (optional — Formation pool used as fallback)
511
+ baseUrl?: string; // API base URL
512
+ inlineKeys?: { // BYOK keys passed per-request
513
+ openai_key?: string;
514
+ anthropic_key?: string;
515
+ gemini_key?: string; // Also sent as X-Google-Key header
516
+ };
517
+ provider?: {
518
+ enabled?: boolean; // Enable provider registration
519
+ defaultModel?: string; // Default model
534
520
  };
535
- tools: {
536
- embeddings: { enabled: boolean };
537
- rollout: { enabled: boolean };
521
+ tools?: {
522
+ embeddings?: { enabled?: boolean };
523
+ rollout?: { enabled?: boolean };
538
524
  };
539
525
  }
540
526
  ```
package/SECURITY.md CHANGED
@@ -9,21 +9,24 @@
9
9
  ## Credentials
10
10
 
11
11
  **What is accessed:**
12
- - `STRATUS_API_KEY` — read from environment or OpenClaw config (`plugins.stratus.apiKey`)
12
+ - `STRATUS_API_KEY` — read from environment or OpenClaw config (`plugins.stratus.apiKey`). **Optional** — if not set, Formation pooled keys are used automatically.
13
+ - `OPENAI_API_KEY` — optional, forwarded as inline BYOK key in request body
14
+ - `ANTHROPIC_API_KEY` — optional, forwarded as inline BYOK key in request body
15
+ - `GOOGLE_API_KEY` — optional, forwarded as inline BYOK key in request body and as `X-Google-Key` header
13
16
 
14
17
  **What is validated:**
15
- - Key must be present before any network call is made
16
- - Key must match the format `stratus_sk_*` requests with malformed keys are rejected locally, no network call is made
18
+ - If `STRATUS_API_KEY` is present, it must match the format `stratus_sk_*` — requests with malformed keys are rejected locally, no network call is made
19
+ - If no key is present, the plugin operates in Formation pool mode (zero-config, 25% markup)
17
20
 
18
21
  **What is written to disk:**
19
- - During setup, the API key is stored in `~/.openclaw/agents/main/agent/auth-profiles.json`
22
+ - During setup, the auth profile is stored in `~/.openclaw/agents/main/agent/auth-profiles.json`
20
23
  - This is the standard OpenClaw credential store, equivalent in scope to `~/.aws/credentials` or `~/.npmrc`
21
24
  - A timestamped backup of any existing file is created before writing
22
- - The key is never logged, printed, or written anywhere else by this plugin
25
+ - Keys are never logged, printed, or written anywhere else by this plugin
23
26
 
24
27
  **What is never accessed:**
25
28
  - `~/.ssh` or any SSH keys or known_hosts — nothing in this plugin reads or touches SSH paths
26
- - Other environment variables beyond `STRATUS_API_KEY`, `STRATUS_BASE_URL`, and `SHELL`
29
+ - Other environment variables beyond `STRATUS_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY`, `STRATUS_BASE_URL`, and `SHELL`
27
30
  - Browser storage, keychains, or system credential managers
28
31
 
29
32
  ---
@@ -33,8 +36,17 @@
33
36
  **Outbound endpoints:**
34
37
  | Endpoint | When | What is sent |
35
38
  |---|---|---|
36
- | `https://api.stratus.run/v1/embeddings` | `stratus_embeddings` tool call | `Authorization: Bearer <key>`, text input |
37
- | `https://api.stratus.run/v1/rollout` | `stratus_rollout` tool call | `Authorization: Bearer <key>`, goal + state |
39
+ | `https://api.stratus.run/v1/embeddings` | `stratus_embeddings` tool call | `Authorization: Bearer <key>` (if set), text input, optional inline keys |
40
+ | `https://api.stratus.run/v1/rollout` | `stratus_rollout` tool call | `Authorization: Bearer <key>` (if set), goal + state, optional inline keys |
41
+ | `https://api.stratus.run/v1/models` | Plugin startup / `/stratus models` | `Authorization: Bearer <key>` (if set) |
42
+
43
+ **Headers sent:**
44
+ - `Authorization: Bearer <key>` — only when `STRATUS_API_KEY` is configured
45
+ - `X-Google-Key: <key>` — only when a Google/Gemini key is configured
46
+ - `Content-Type: application/json` — on all POST requests
47
+
48
+ **Inline key fields in request body:**
49
+ - `openai_key`, `anthropic_key`, `gemini_key` — only when corresponding environment variables or config values are set
38
50
 
39
51
  **What is never done:**
40
52
  - No calls to any endpoint other than `api.stratus.run`
@@ -55,10 +67,9 @@ Data handling is governed by the [Stratus privacy policy](https://stratus.run/pr
55
67
 
56
68
  **Files written during setup:**
57
69
  - Same paths as above, plus timestamped `.backup-*` copies before any modification
58
- - Optionally appends `export STRATUS_API_KEY=...` to `~/.zshrc` / `~/.bashrc` / `~/.bash_profile` — only when the user explicitly answers `y` at the prompt
59
70
 
60
71
  **What is never touched:**
61
- - No files outside `~/.openclaw/`, the shell config the user selects, or the LaunchAgent plist
72
+ - No files outside `~/.openclaw/` or the LaunchAgent plist
62
73
  - No `/etc/`, `/usr/`, `/Library/` (system paths)
63
74
  - No other dotfiles or home directory contents
64
75
 
@@ -132,9 +132,9 @@ Implement Option 1 (plugin-level role mapping) as it provides maximum compatibil
132
132
 
133
133
  ### "Stratus API key not configured"
134
134
 
135
- **Cause**: No API key found in config or environment.
135
+ **Note**: As of March 2026, an API key is **no longer required**. The plugin uses Formation pooled keys by default (zero-config, 25% markup). This error should no longer appear.
136
136
 
137
- **Solution**:
137
+ If you want BYOK (no markup), set your key:
138
138
 
139
139
  ```bash
140
140
  export STRATUS_API_KEY=stratus_sk_live_your_key_here