@stratusagent/tool-shell 0.11.8 → 0.11.10
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 +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +105 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ read would not have said so.
|
|
|
75
75
|
| `passEnv` | `PATH`, `HOME`, `LANG`, `LC_ALL`, `TZ` | Names forwarded from the daemon's environment. Nothing on the default list is a secret; that is the test for adding one. Under the always-on service the daemon's `PATH` is the one the service was installed from — see [Always on](../../docs/guides/always-on.md). |
|
|
76
76
|
| `env` | none | Variables set outright. Where a token goes if a command genuinely needs one — deliberately, in config, where an auditor can see it. An agent's own `env` under `agents.<id>` **adds to** the shared one, its names winning, so one agent's token doesn't cost it the shared `PATH`. Set a name to `null` there to withhold it from that agent, whether it came from the shared `env` or from the daemon through `passEnv`. Every other key an agent sets replaces the shared value. |
|
|
77
77
|
| `cwd` | the agent's workspace | Where commands start; a leading `~` is your home directory. The default — `~/.stratus/agents/<agent-id>/workspace`, which the host answers for — is created on first use; a directory you name is not, and a missing one is reported by name rather than as a spawn failure. |
|
|
78
|
-
| `timeoutMs` | `60000` | Killed with its whole process group after this. A process the command left in its own session (`setsid`, a daemon that detaches itself) survives, but no longer holds the call open — see [the guide](https://github.com/stratuslabs/agent/blob/main/docs/guides/shell.md#timeouts-and-background-processes). |
|
|
78
|
+
| `timeoutMs` | `60000` | Killed with its whole process group after this, and never later than the executor's ceiling, five minutes (`300000`) in a stock install, whatever the config or the call asks for; a call that asked for longer is told so in the timeout message. A process the command left in its own session (`setsid`, a daemon that detaches itself) survives, but no longer holds the call open — see [the guide](https://github.com/stratuslabs/agent/blob/main/docs/guides/shell.md#timeouts-and-background-processes). |
|
|
79
79
|
| `maxOutputBytes` | `100000` | Per stream, then a truncation marker. Enforced as the output is read, so a command that floods stdout is never held whole in the daemon's memory. |
|
|
80
80
|
| `shell` | `/bin/sh` | The interpreter. |
|
|
81
81
|
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,11 @@ export interface ShellPluginConfig extends JsonObject {
|
|
|
18
18
|
*/
|
|
19
19
|
workspaceRoot?: string;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Environment variables that carry options for a command the permission
|
|
23
|
+
* engine judges by its arguments. Never passed to a child: see `settingsFor`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const COMMAND_OPTION_VARIABLES: readonly ["RIPGREP_CONFIG_PATH", "GREP_OPTIONS"];
|
|
21
26
|
export interface ShellToolOptions {
|
|
22
27
|
/** The environment to grant *from*. Defaults to the daemon's. */
|
|
23
28
|
processEnv?: NodeJS.ProcessEnv;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,UAAU,EAEf,KAAK,MAAM,EAEZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,UAAU,EAEf,KAAK,MAAM,EAEZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAC;AAWtC,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACnD,+EAA+E;IAC/E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,6CAA6C;IAC7C,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA8BD;;;GAGG;AAIH,eAAO,MAAM,wBAAwB,kDAAmD,CAAC;AA4IzF,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IAC/B;;;;OAIG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,eAAe,GAAI,SAAQ,UAAe,EAAE,UAAS,gBAAqB,KAAG,gBA2HzF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAQ,UAAe,EAAE,UAAS,gBAAqB,KAAG,MAa1F,CAAC;AAEH,4DAA4D;AAC5D,eAAO,MAAM,YAAY,YAhBiB,UAAU,YAAgB,gBAAgB,KAAQ,MAgB/C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { mkdir, stat } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
2
3
|
import { DEFAULT_SUBPROCESS_PASS_ENV, } from '@stratusagent/core';
|
|
3
|
-
import { defineLocalCommandTool, } from '@stratusagent/executor-local';
|
|
4
|
-
import { expandHome, resolvePluginAgentConfig, workspacePreparer } from '@stratusagent/plugins';
|
|
4
|
+
import { defineLocalCommandTool, LOCAL_COMMAND_MAX_TIMEOUT_MS, } from '@stratusagent/executor-local';
|
|
5
|
+
import { expandHome, resolvePluginAgentConfig, workspacePreparer, workspaceResolver } from '@stratusagent/plugins';
|
|
5
6
|
const DEFAULT_TIMEOUT_MS = 60_000;
|
|
6
7
|
const DEFAULT_MAX_OUTPUT_BYTES = 100_000;
|
|
7
8
|
// What the child is allowed to inherit by name — the kernel's one list,
|
|
@@ -29,6 +30,43 @@ const truncate = (value, maxBytes, dropped) => {
|
|
|
29
30
|
* something — into a failed tool result somebody retries.
|
|
30
31
|
*/
|
|
31
32
|
const maxOutputBytesFor = (config, session) => asNumber(resolvePluginAgentConfig(config, session.agent.id).maxOutputBytes, DEFAULT_MAX_OUTPUT_BYTES);
|
|
33
|
+
/**
|
|
34
|
+
* Environment variables that carry options for a command the permission
|
|
35
|
+
* engine judges by its arguments. Never passed to a child: see `settingsFor`.
|
|
36
|
+
*/
|
|
37
|
+
// Not POSIXLY_CORRECT: macOS's /bin/sh exports it to every command it runs,
|
|
38
|
+
// so the permission engine reads arguments both ways instead (see
|
|
39
|
+
// `operandsToo` in @stratusagent/permissions).
|
|
40
|
+
export const COMMAND_OPTION_VARIABLES = ['RIPGREP_CONFIG_PATH', 'GREP_OPTIONS'];
|
|
41
|
+
/**
|
|
42
|
+
* Flags that stop a shell from running its user startup files before the
|
|
43
|
+
* command. Without them zsh sources `$HOME/.zshenv`, tcsh and csh
|
|
44
|
+
* `~/.tcshrc`/`~/.cshrc`, and fish its config, even non-interactively, and any
|
|
45
|
+
* of them can redefine `cat`. bash, `sh`, dash, and ksh read none when not
|
|
46
|
+
* interactive, once `BASH_ENV`/`ENV` are withheld. Another shell named in
|
|
47
|
+
* config is the operator's choice, startup files and all.
|
|
48
|
+
*/
|
|
49
|
+
const startupOff = (shell) => {
|
|
50
|
+
const name = path.basename(shell);
|
|
51
|
+
// zsh, tcsh, and csh all spell it `-f`.
|
|
52
|
+
if (name === 'zsh' || name === 'tcsh' || name === 'csh') {
|
|
53
|
+
return ['-f'];
|
|
54
|
+
}
|
|
55
|
+
if (name === 'fish') {
|
|
56
|
+
return ['--no-config'];
|
|
57
|
+
}
|
|
58
|
+
return [];
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Variables that make git use a repository other than the one the command
|
|
62
|
+
* runs in, which the permission engine finds from the working directory.
|
|
63
|
+
* Identity and config (`GIT_CONFIG_GLOBAL`, author names) are untouched.
|
|
64
|
+
*/
|
|
65
|
+
const GIT_REPOSITORY_VARIABLES = [
|
|
66
|
+
'GIT_DIR', 'GIT_WORK_TREE', 'GIT_COMMON_DIR', 'GIT_INDEX_FILE', 'GIT_OBJECT_DIRECTORY', 'GIT_ALTERNATE_OBJECT_DIRECTORIES', 'GIT_NAMESPACE',
|
|
67
|
+
];
|
|
68
|
+
/** Variables that make a shell run code before the command. Never passed. */
|
|
69
|
+
const SHELL_STARTUP_VARIABLES = ['BASH_ENV', 'ENV', 'ZDOTDIR'];
|
|
32
70
|
const settingsFor = (config, session, env, workspaces, home) => {
|
|
33
71
|
// `env` merges rather than replacing: an agent given its own token keeps
|
|
34
72
|
// the fleet's PATH (#205). A `null` withholds a shared variable from one
|
|
@@ -72,6 +110,49 @@ const settingsFor = (config, session, env, workspaces, home) => {
|
|
|
72
110
|
}
|
|
73
111
|
}
|
|
74
112
|
}
|
|
113
|
+
// Variables that hand a judged command options the command line never
|
|
114
|
+
// shows: `rg pattern` with RIPGREP_CONFIG_PATH can be `rg --pre … --follow
|
|
115
|
+
// pattern`, and BSD grep reads GREP_OPTIONS. The permission engine judges
|
|
116
|
+
// the command as written, so what it judges has to be what runs. Withheld
|
|
117
|
+
// whatever the config says.
|
|
118
|
+
for (const name of COMMAND_OPTION_VARIABLES) {
|
|
119
|
+
delete granted[name];
|
|
120
|
+
}
|
|
121
|
+
// And what a shell runs before the command: a startup file (`BASH_ENV`,
|
|
122
|
+
// `ENV`, `ZDOTDIR`'s `.zshenv`) or an exported function (`BASH_FUNC_*`)
|
|
123
|
+
// can define `cat` as anything. The command judged is the command run.
|
|
124
|
+
for (const name of Object.keys(granted)) {
|
|
125
|
+
if (SHELL_STARTUP_VARIABLES.includes(name) || GIT_REPOSITORY_VARIABLES.includes(name) || name.startsWith('BASH_FUNC_')) {
|
|
126
|
+
delete granted[name];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// A PATH entry the agent can write to is a program the agent chose
|
|
130
|
+
// running under a command name the permission engine trusts: a workspace
|
|
131
|
+
// `cat` or `git` would be approved as the real one. Relative entries (`.`,
|
|
132
|
+
// empty) resolve to the working directory, which is the workspace. Kept
|
|
133
|
+
// out, whatever env or passEnv says; the system's own paths are unchanged.
|
|
134
|
+
if (typeof granted.PATH === 'string') {
|
|
135
|
+
const owned = [cwd, workspaceResolver(workspaces, workspaceRoot)?.(session.agent.id)]
|
|
136
|
+
.filter((dir) => typeof dir === 'string' && dir.length > 0);
|
|
137
|
+
granted.PATH = granted.PATH
|
|
138
|
+
.split(':')
|
|
139
|
+
.filter((entry) => entry.length > 0 && path.isAbsolute(entry) && !owned.some((dir) => {
|
|
140
|
+
const relative = path.relative(dir, path.resolve(entry));
|
|
141
|
+
return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));
|
|
142
|
+
}))
|
|
143
|
+
.join(':');
|
|
144
|
+
// An empty PATH is the current directory to `sh`, the one thing this
|
|
145
|
+
// filter exists to keep out.
|
|
146
|
+
if (granted.PATH.length === 0) {
|
|
147
|
+
granted.PATH = '/usr/bin:/bin';
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// No terminal, so an editor can only hang or, named in a repository's
|
|
151
|
+
// config, run a program nobody approved. `true` exits at once: git takes
|
|
152
|
+
// the message it already has (or aborts an empty one) instead. The
|
|
153
|
+
// environment variables win over `core.editor` and `sequence.editor`.
|
|
154
|
+
granted.GIT_EDITOR = 'true';
|
|
155
|
+
granted.GIT_SEQUENCE_EDITOR = 'true';
|
|
75
156
|
return {
|
|
76
157
|
...(cwd ? { cwd } : {}),
|
|
77
158
|
// Whether this agent's directory is ours to create. The workspace is —
|
|
@@ -108,7 +189,16 @@ export const createShellTool = (config = {}, options = {}) => {
|
|
|
108
189
|
type: 'object',
|
|
109
190
|
properties: {
|
|
110
191
|
command: { type: 'string', description: 'The command line to run.' },
|
|
111
|
-
timeoutMs: {
|
|
192
|
+
timeoutMs: {
|
|
193
|
+
type: 'number',
|
|
194
|
+
// The host's executor owns the ceiling and may set its own, so
|
|
195
|
+
// this states the stock one as a default, not as the rule; a call
|
|
196
|
+
// cut to whatever ceiling applies is told so in its result.
|
|
197
|
+
description: 'How long to wait before killing the command, in milliseconds. '
|
|
198
|
+
+ `The host caps it, at ${LOCAL_COMMAND_MAX_TIMEOUT_MS} (${LOCAL_COMMAND_MAX_TIMEOUT_MS / 60_000} minutes) unless configured otherwise, and a command cut to the cap is told so. `
|
|
199
|
+
+ 'For work that may run longer, start it in the background with its output redirected to a file '
|
|
200
|
+
+ '(`long-job > job.log 2>&1 &`) and check the file in a later call.',
|
|
201
|
+
},
|
|
112
202
|
},
|
|
113
203
|
required: ['command'],
|
|
114
204
|
},
|
|
@@ -137,7 +227,7 @@ export const createShellTool = (config = {}, options = {}) => {
|
|
|
137
227
|
}
|
|
138
228
|
return {
|
|
139
229
|
command: settings.shell,
|
|
140
|
-
args: ['-c', command],
|
|
230
|
+
args: [...startupOff(settings.shell), '-c', command],
|
|
141
231
|
...(settings.cwd ? { cwd: settings.cwd } : {}),
|
|
142
232
|
env: settings.env,
|
|
143
233
|
// Required, not preferred. The daemon's environment holds every key
|
|
@@ -178,6 +268,17 @@ export const createShellTool = (config = {}, options = {}) => {
|
|
|
178
268
|
* with the first one the day either changed.
|
|
179
269
|
*/
|
|
180
270
|
commandFor: (input) => (typeof input.command === 'string' ? input.command.trim() : undefined),
|
|
271
|
+
// Where the command would run, resolved the way `createCommand` resolves
|
|
272
|
+
// it but without creating anything: this is asked before the call is
|
|
273
|
+
// approved. A configured cwd wins, as it does there.
|
|
274
|
+
cwdFor: (session) => {
|
|
275
|
+
const resolved = resolvePluginAgentConfig(config, session.agent.id, { mergeKeys: ['env'] });
|
|
276
|
+
if (typeof resolved.cwd === 'string' && resolved.cwd.length > 0) {
|
|
277
|
+
return expandHome(resolved.cwd, options.home);
|
|
278
|
+
}
|
|
279
|
+
const workspaceRoot = typeof resolved.workspaceRoot === 'string' ? resolved.workspaceRoot : undefined;
|
|
280
|
+
return workspaceResolver(options.workspaces, workspaceRoot)?.(session.agent.id);
|
|
281
|
+
},
|
|
181
282
|
};
|
|
182
283
|
};
|
|
183
284
|
/**
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,2BAA2B,GAM5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,sBAAsB,EACtB,4BAA4B,GAI7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAEnH,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAEzC,wEAAwE;AACxE,uEAAuE;AACvE,sEAAsE;AACtE,MAAM,gBAAgB,GAAG,CAAC,GAAG,2BAA2B,CAAC,CAAC;AAqB1D,MAAM,QAAQ,GAAG,CAAC,KAA4B,EAAE,QAAgB,EAAU,EAAE,CAC1E,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;AAEtF,MAAM,SAAS,GAAG,CAAC,KAA4B,EAAE,QAAkB,EAAY,EAAE,CAC/E,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,OAAO,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,CAAC;QAClF,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAqB,EAAE,EAAE,UAA4B,EAAE,EAAU,EAAE,CAAC,CAAC;IACrG,IAAI,EAAE,0BAA0B;IAChC,KAAK,CAAC,OAAO;QACX,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,eAAe,CAAC,MAAM,EAAE;YAC7C,GAAG,OAAO;YACV,kEAAkE;YAClE,sEAAsE;YACtE,6CAA6C;YAC7C,GAAG,CAAC,OAAO,CAAC,UAAU,KAAK,SAAS,IAAI,OAAO,CAAC,UAAU,KAAK,SAAS;gBACtE,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE;gBACpC,CAAC,CAAC,EAAE,CAAC;SACR,CAAC,CAAC,CAAC;IACN,CAAC;CACF,CAAC,CAAC;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,YAAY,GAAG,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stratusagent/tool-shell",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
"node": ">=22.13 <23 || >=23.4"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@stratusagent/
|
|
22
|
-
"@stratusagent/executor-local": "0.11.
|
|
23
|
-
"@stratusagent/
|
|
21
|
+
"@stratusagent/core": "0.11.10",
|
|
22
|
+
"@stratusagent/executor-local": "0.11.10",
|
|
23
|
+
"@stratusagent/plugins": "0.11.10"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "^24.6.0",
|
|
27
27
|
"typescript": "^5.9.3",
|
|
28
|
-
"@stratusagent/permissions": "0.11.
|
|
28
|
+
"@stratusagent/permissions": "0.11.10"
|
|
29
29
|
},
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"repository": {
|