refactor(sandbox): drop legacy memory shorthand
This commit is contained in:
@@ -79,8 +79,6 @@ Available groups:
|
|||||||
- `group:sessions`: `sessions_list`, `sessions_history`, `sessions_send`, `sessions_spawn`, `session_status`
|
- `group:sessions`: `sessions_list`, `sessions_history`, `sessions_send`, `sessions_spawn`, `session_status`
|
||||||
- `group:memory`: `memory_search`, `memory_get`
|
- `group:memory`: `memory_search`, `memory_get`
|
||||||
|
|
||||||
Legacy shorthand: `memory` expands to `group:memory`.
|
|
||||||
|
|
||||||
## Elevated: exec-only “run on host”
|
## Elevated: exec-only “run on host”
|
||||||
|
|
||||||
Elevated does **not** grant extra tools; it only affects `exec`.
|
Elevated does **not** grant extra tools; it only affects `exec`.
|
||||||
|
|||||||
@@ -182,8 +182,6 @@ Sandbox tool policy supports `group:*` entries that expand to multiple concrete
|
|||||||
- `group:sessions`: `sessions_list`, `sessions_history`, `sessions_send`, `sessions_spawn`, `session_status`
|
- `group:sessions`: `sessions_list`, `sessions_history`, `sessions_send`, `sessions_spawn`, `session_status`
|
||||||
- `group:memory`: `memory_search`, `memory_get`
|
- `group:memory`: `memory_search`, `memory_get`
|
||||||
|
|
||||||
Legacy shorthand: `memory` expands to `group:memory`.
|
|
||||||
|
|
||||||
### Elevated Mode
|
### Elevated Mode
|
||||||
`tools.elevated` is the global baseline (sender-based allowlist). `agents.list[].tools.elevated` can further restrict elevated for specific agents (both must allow).
|
`tools.elevated` is the global baseline (sender-based allowlist). `agents.list[].tools.elevated` can further restrict elevated for specific agents (both must allow).
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ describe("sandbox explain helpers", () => {
|
|||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("supports legacy 'memory' shorthand and deny wins after expansion", () => {
|
it("denies still win after group expansion", () => {
|
||||||
const cfg: ClawdbotConfig = {
|
const cfg: ClawdbotConfig = {
|
||||||
agents: {
|
agents: {
|
||||||
defaults: {
|
defaults: {
|
||||||
@@ -75,7 +75,7 @@ describe("sandbox explain helpers", () => {
|
|||||||
tools: {
|
tools: {
|
||||||
sandbox: {
|
sandbox: {
|
||||||
tools: {
|
tools: {
|
||||||
allow: ["memory"],
|
allow: ["group:memory"],
|
||||||
deny: ["memory_get"],
|
deny: ["memory_get"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -269,9 +269,6 @@ function expandToolGroupEntry(entry: string): string[] {
|
|||||||
if (!raw) return [];
|
if (!raw) return [];
|
||||||
const lower = raw.toLowerCase();
|
const lower = raw.toLowerCase();
|
||||||
|
|
||||||
// Back-compat shorthand: "memory" => "group:memory"
|
|
||||||
if (lower === "memory") return TOOL_GROUPS["group:memory"];
|
|
||||||
|
|
||||||
const group = TOOL_GROUPS[lower];
|
const group = TOOL_GROUPS[lower];
|
||||||
if (group) return group;
|
if (group) return group;
|
||||||
return [raw];
|
return [raw];
|
||||||
|
|||||||
Reference in New Issue
Block a user