stratum-cli 0.4.0 → 0.6.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/.stratumrc.json.example +79 -4
- package/README.md +4 -4
- package/dist/index.js +6998 -3664
- package/package.json +4 -1
package/.stratumrc.json.example
CHANGED
|
@@ -39,13 +39,34 @@
|
|
|
39
39
|
"tools": {
|
|
40
40
|
"confirmDestructive": true,
|
|
41
41
|
"bashTimeout": 30000,
|
|
42
|
+
"execMaxBytes": 1048576,
|
|
43
|
+
"auditLog": true,
|
|
44
|
+
"redaction": {
|
|
45
|
+
"extraPatterns": [
|
|
46
|
+
{
|
|
47
|
+
"value": "internal.corp.example",
|
|
48
|
+
"reason": "internal domain"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
42
52
|
"testCommand": "npm test",
|
|
43
53
|
"webSearch": {
|
|
44
54
|
"backend": "meta",
|
|
45
55
|
"tavilyApiKey": "${TAVILY_API_KEY}",
|
|
46
56
|
"maxResults": 10
|
|
47
57
|
},
|
|
48
|
-
"destructivePatterns": [
|
|
58
|
+
"destructivePatterns": [
|
|
59
|
+
"rm",
|
|
60
|
+
"rmdir",
|
|
61
|
+
"dd",
|
|
62
|
+
"mkfs",
|
|
63
|
+
"format",
|
|
64
|
+
"DROP",
|
|
65
|
+
"DELETE",
|
|
66
|
+
"truncate",
|
|
67
|
+
"shred",
|
|
68
|
+
"wipefs"
|
|
69
|
+
],
|
|
49
70
|
"guardedCommands": {
|
|
50
71
|
"gitPushForce": "confirm",
|
|
51
72
|
"gitResetHard": "confirm",
|
|
@@ -66,7 +87,9 @@
|
|
|
66
87
|
{
|
|
67
88
|
"name": "filesystem",
|
|
68
89
|
"package": "@modelcontextprotocol/server-filesystem@2025.8.21",
|
|
69
|
-
"args": [
|
|
90
|
+
"args": [
|
|
91
|
+
"/home/user/projects"
|
|
92
|
+
],
|
|
70
93
|
"startupTimeout": 15000
|
|
71
94
|
},
|
|
72
95
|
{
|
|
@@ -76,7 +99,10 @@
|
|
|
76
99
|
{
|
|
77
100
|
"name": "legacy-npx",
|
|
78
101
|
"command": "npx",
|
|
79
|
-
"args": [
|
|
102
|
+
"args": [
|
|
103
|
+
"-y",
|
|
104
|
+
"some-mcp-server@latest"
|
|
105
|
+
]
|
|
80
106
|
}
|
|
81
107
|
]
|
|
82
108
|
},
|
|
@@ -110,7 +136,6 @@
|
|
|
110
136
|
}
|
|
111
137
|
},
|
|
112
138
|
"ssh": {
|
|
113
|
-
"auditLog": true,
|
|
114
139
|
"hosts": {
|
|
115
140
|
"bastion": {
|
|
116
141
|
"host": "bastion.example.com",
|
|
@@ -133,5 +158,55 @@
|
|
|
133
158
|
"useAgent": true
|
|
134
159
|
}
|
|
135
160
|
}
|
|
161
|
+
},
|
|
162
|
+
"desktop": {
|
|
163
|
+
"maxConcurrentTurns": 2,
|
|
164
|
+
"notifications": {
|
|
165
|
+
"enabled": true,
|
|
166
|
+
"minSeconds": 10
|
|
167
|
+
},
|
|
168
|
+
"globalHotkey": "CommandOrControl+Shift+Space",
|
|
169
|
+
"workspaces": {
|
|
170
|
+
"root": "~/.stratum/desktop/workspaces",
|
|
171
|
+
"maxFileMB": 25,
|
|
172
|
+
"maxWorkspaceMB": 250,
|
|
173
|
+
"compressAfterDays": 7,
|
|
174
|
+
"deleteAfterDays": 30
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"environments": {
|
|
178
|
+
"prod": {
|
|
179
|
+
"match": [
|
|
180
|
+
"ssh:prod-*"
|
|
181
|
+
],
|
|
182
|
+
"tier": "production",
|
|
183
|
+
"requirePlan": true
|
|
184
|
+
},
|
|
185
|
+
"staging": {
|
|
186
|
+
"match": [
|
|
187
|
+
"ssh:stg-*"
|
|
188
|
+
],
|
|
189
|
+
"tier": "staging"
|
|
190
|
+
},
|
|
191
|
+
"lab": {
|
|
192
|
+
"match": [
|
|
193
|
+
"ssh:dev-*"
|
|
194
|
+
],
|
|
195
|
+
"policy": "allow"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"session": {
|
|
199
|
+
"profile": "auto",
|
|
200
|
+
"profiles": {
|
|
201
|
+
"ops": {
|
|
202
|
+
"description": "guardias",
|
|
203
|
+
"allowedTools": [
|
|
204
|
+
"exec",
|
|
205
|
+
"read_file",
|
|
206
|
+
"grep",
|
|
207
|
+
"mcp__*"
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
}
|
|
136
211
|
}
|
|
137
212
|
}
|
package/README.md
CHANGED
|
@@ -56,8 +56,8 @@ stratum run --plan "Refactoriza el módulo de autenticación"
|
|
|
56
56
|
|---|---|
|
|
57
57
|
| Loop ReAct + streaming | Iteraciones con tool calls, compresión de contexto automática |
|
|
58
58
|
| Provider router | Fallback automático entre providers, health check en background, `/provider` en sesión |
|
|
59
|
-
| Tools built-in | `read_file`, `write_file`, `edit_file`, `glob`, `list_directory`, `grep`, `
|
|
60
|
-
| SSH nativo | `
|
|
59
|
+
| Tools built-in | `read_file`, `write_file`, `edit_file`, `glob`, `list_directory`, `grep`, `exec`, `web_search`, `web_fetch`, `question` |
|
|
60
|
+
| SSH nativo | `exec` con `target: "ssh:<alias>"`, `ssh_upload`, `ssh_download` sobre `ssh2` — nunca invoca el binario `ssh` del sistema |
|
|
61
61
|
| Confirmación destructiva | Interactiva en `chat`, readline en `run`, deny automático sin TTY |
|
|
62
62
|
| Cliente MCP | Arranque lazy/eager, heartbeat, backoff, carpeta gestionada `~/.stratum/mcp/` |
|
|
63
63
|
| Memoria en 3 capas | `STRATUM.md` · `decisions.json` · índice semántico `vectors.db` |
|
|
@@ -92,7 +92,7 @@ stratum run --plan "Refactoriza el módulo de autenticación"
|
|
|
92
92
|
|
|
93
93
|
### Hosts remotos (SSH)
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
Los targets `ssh:<alias>` de `exec` y las tools `ssh_upload`/`ssh_download` **solo existen si defines un inventario** — sin sección `ssh`, el modelo ni siquiera los ve. El agente se refiere a los hosts **solo por su alias**; las credenciales nunca pasan por el modelo.
|
|
96
96
|
|
|
97
97
|
```json
|
|
98
98
|
{
|
|
@@ -105,7 +105,7 @@ Las tools `ssh_exec`, `ssh_upload` y `ssh_download` **solo se registran si defin
|
|
|
105
105
|
}
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
-
La primera conexión muestra el fingerprint y pregunta (TOFU); después verifica en silencio contra `~/.stratum/known_hosts.json`. Si la host key cambia, la conexión se **aborta siempre** — no hay override interactivo. Cada comando remoto queda registrado en `~/.stratum/logs/
|
|
108
|
+
La primera conexión muestra el fingerprint y pregunta (TOFU); después verifica en silencio contra `~/.stratum/known_hosts.json`. Si la host key cambia, la conexión se **aborta siempre** — no hay override interactivo. Cada comando que ejecuta el agente, local o remoto, queda registrado en `~/.stratum/logs/exec-audit.jsonl` (`tools.auditLog`).
|
|
109
109
|
|
|
110
110
|
> **Sobre la detección de comandos destructivos:** es una red de seguridad blanda contra descuidos del modelo, no un control real — un `base64 -d | sh` la esquiva sin esfuerzo. La defensa de verdad en hosts de producción es `confirmAll: true`.
|
|
111
111
|
|