Skip to content

Commit 00632ab

Browse files
committed
Merge channel base modes and independent Auto/Lean options
Signed-off-by: Tiberiu Socaci <tsocaci@makeitfuture.com>
2 parents 1d5452a + d007ce0 commit 00632ab

22 files changed

Lines changed: 339 additions & 207 deletions

‎AGENTS.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,11 @@ post/edit Slack message in the thread
8181
(gateway control MCP + dual Composio identities; Skills/Toolbox use channel→user→org). Slack
8282
beyond the gateway's own bot tools is the **Composio** Slack toolkit — there is no separate hosted
8383
Slack MCP.
84-
- `src/gateway/modes.js` — the read/bash/auto/admin mode → tool-permission mapping (read = read-only
85-
tools, bash = shell + file writes, auto = permission prompts auto-approved, admin =
86-
`--dangerously-skip-permissions` for an admin author). A mode is a TOOL preset; none of them
87-
changes what the channel's container mounts.
84+
- `src/gateway/modes.js` — three base modes: Read-only, Worker (shell + file writes), and Admin
85+
(Worker for members; `--dangerously-skip-permissions` only for trusted admin authors). Auto and
86+
Lean are independent options. Auto approves tool requests for both roles; Lean removes optional
87+
skills/connectors, but admins in Admin mode retain full context. A mode is a TOOL preset; runtime
88+
mount policy remains separately defined by the container backend.
8889
- `src/runtimes/` — WHERE an engine process runs: the `RuntimeBackend` contract (`contract.js`),
8990
`resolve.js` (the one place that builds the RuntimeTarget a turn, a background job and the memory
9091
reviewer all receive — each resolves at its OWN spawn), and `container/` — the rootless Podman

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ product overview.
1818
1919
## Unreleased
2020

21+
- Channels: use Read-only, Worker, and Admin as the three base modes, with independent Auto and
22+
Lean side toggles in channel, DM, and template editors. Slack Settings can now select Admin
23+
for authorized admins. Admin gives other members Worker plus their selected options; Auto
24+
approves tools for both roles, while Lean applies only to non-admins in an Admin channel.
25+
Existing Full access records now get the promised Worker fallback.
26+
2127
- Repository cleanup: remove unused Gemini/Hermes instruction aliases and the superseded working
2228
audit. Keep canonical agent instructions, project records and active release acceptance gates.
2329

‎FEATURES.md‎

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,37 +1346,27 @@ A categorized catalog of what's shipped. Cross-linked to `TEST-PLAN.md` checks.
13461346
Customized/restored via the **`get_gateway_guide`** (anyone) / **`update_gateway_guide`** /
13471347
**`reset_gateway_guide`** (admins) gateway MCP tools — per-file or whole-guide restore-to-default.
13481348
→ TEST-PLAN: Gateway-usage skill.
1349-
- **Retired 2026-09-03 (Linux + containers only):** the OS-sandbox half of this bullet — the four modes stay as TOOL-permission presets (read =
1350-
read-only tools, bash = shell + file writes, auto = prompts auto-approved, admin =
1351-
`--dangerously-skip-permissions` for an admin author), and none of them changes what the channel's
1352-
container can see. Four channel **modes** (set with `/mode`): `read` (Read/Glob/Grep only, every
1353-
other tool asks for approval — the shell is named in the lockdown's `permissions.ask`, not merely
1354-
left out of `permissions.allow`: Claude Code answers a simple command whose argv head is on its
1355-
own built-in read-only list (`id`, `cat`, `head`, `strings`, …) BEFORE consulting
1356-
`--permission-prompt-tool`, so omission alone let a read-mode turn run `id -un` with no approval
1357-
card; an `ask` rule outranks that layer and routes every command — simple or compound — to the
1358-
approval card), `bash` (Bash + file writes, sandboxed to the folder), `auto`
1359-
(autonomous — permission prompts auto-approve, still fully sandboxed), and `admin` (full tools,
1360-
sandbox off — requires an **admin author** as well). `admin` is org-admin-only to select; the safe
1361-
modes honor the channel's "who can manage" policy. The **admin-run settings variant** — the file
1362-
handed only to an admin author's escalated turn in an admin-mode channel — grants the shell tools
1363-
outright and carries no `ask` rule at all: that turn spawns with
1364-
`--dangerously-skip-permissions`, so the rule widens nothing, and inheriting read mode's
1365-
`ask: ["Bash"]` instead made Claude Code deny a bare `pwd` and demote the whole turn to read-only
1366-
(the `full` profile sets `adminMode` alone, never `allowBash`). The SHARED file of the same
1367-
channel is unchanged — a non-admin author there still routes every command to the approval card.
1368-
→ TEST-PLAN: Modes & approvals.
1349+
- **Three base modes with independent options:** Read-only, Worker, and Admin. Read-only
1350+
routes edits and commands to approval; Worker grants commands and file writes inside the channel
1351+
container. Admin grants Worker to non-admin members and the permission bypass only to trusted
1352+
admin authors. The shared settings file always disables bypass, even when it grants Worker tools.
1353+
**Auto** and **Lean** are independent side toggles: Auto approves tool requests for every admitted
1354+
member; Lean removes optional skills and connectors. In Admin mode, Lean applies to non-admins,
1355+
while admins retain their configured tools and context. Changing Worker ↔ Admin preserves both
1356+
toggles. Choosing Read-only clears Auto; enabling Auto on Read-only selects Worker. Existing Full
1357+
access records gain the documented Worker fallback; existing Auto and Lean flags are preserved.
1358+
Network remains a separate setting. → TEST-PLAN: Base modes and independent options.
13691359
- Read mode's filesystem contract is engine-neutral: ordinary runs get bounded gateway MCP tools
13701360
to list, read, and literal-search the effective channel workdir. They realpath-check every target,
13711361
refuse traversal and escaping symlinks, cap file/search output, and expose no write or shell
13721362
operation. Claude may keep using its native Read/Glob/Grep; Codex uses these tools when its
13731363
read-only permission profile intentionally withholds command execution. → TEST-PLAN: Engines.
1374-
- **Capability profiles** (admin UI, one dropdown instead of a grid of toggles): **Read-only** /
1375-
**Worker** / **Autonomous** / **Full access** / **Lean** — each with example help text — expand to
1376-
the underlying `adminMode`/`allowBash`/`autoMode`/`cleanMode` flags; **Custom…** unlocks the flags
1377-
for hand-editing. Legacy channels derive their profile from existing flags (no DB migration). The
1378-
network toggle + the rarely-touched knobs (memory, nudges, refuse-org-tokens, work-dir, engine/
1379-
model/effort) live under an **Advanced** disclosure. → TEST-PLAN: channel access model.
1364+
- The web channel editor, custom DMs, and default templates share the three-mode picker and
1365+
side toggles. The Slack reply's **Settings** button exposes Read-only/Worker/Admin plus Auto/Lean
1366+
on its Runtime tab; only current gateway admins can select Admin. Every click rechecks user
1367+
authorization and channel membership, and every change is audited. `/mode read|worker|admin` changes the
1368+
base while preserving applicable options (`bash` remains a compatibility alias). Legacy run-API
1369+
presets remain accepted with their existing capability-reduction boundary.
13801370
- **Two-axis access model** (per channel, both editable in the admin UI): **Who can use** (`meta.access`:
13811371
Approved members / Admins only / Locked) and **Who can manage** (`meta.manageAccess`: Org admins only /
13821372
Channel members / Custom + `meta.managers[]`). A channel manager may change SAFE settings (capability

‎TEST-PLAN.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,32 @@
33
Cumulative functional + security regression. Extended per slice. Run top-to-bottom for a full
44
pass. Many checks are manual (require a real Slack workspace + an authenticated `claude` CLI).
55

6+
## Base modes and independent options (2026-09-08)
7+
8+
- Automated: `modes`, `channel-settings-modal`, `mode-command-audit`, `folders-settings`,
9+
`folders-generator-paths`, `run-grant-isolation`, `runtime-integration-surfaces`, and `run-api`
10+
cover legacy flag interpretation, three base selections, toggle persistence, admin-only selection,
11+
untrusted-author boundaries, per-run settings, and engine-independent settings rendering.
12+
- UI acceptance (engine-independent): in the web channel editor and DM/template editor, select
13+
Worker, check Auto and Lean, then select Admin. Exactly three base choices appear, with both
14+
options still checked. Save/reopen and verify all flags. Select Read-only: Auto clears, Lean
15+
stays. Enable Auto: Worker is selected. At wide widths options sit beside the base choices;
16+
narrow screens stack without overflow.
17+
- Slack Settings acceptance (engine-independent): as an admin fixture actor open a recent reply's
18+
Settings button, choose Admin, and toggle Auto/Lean independently. Reopen and verify persistence
19+
and the `slack-settings` audit event. A member-manager sees Read-only/Worker and both options;
20+
a forged Admin action or revoked authorization/membership grant is rejected before mutation.
21+
- Runtime acceptance (Claude AND Codex): in an isolated fixture set Admin + Auto + Lean. As the
22+
approved non-admin fixture actor ask "Create mode-check.txt containing MODE_OK, read it back,
23+
and reply with its contents." Pass only with matching saved bytes, no approval click/card,
24+
`autoMode=true`, `clean=true`, and `dangerouslySkip=false`. Repeat as an admin fixture actor:
25+
matching file, no approval click/card, `clean=false`, `dangerouslySkip=true`. Check run-private
26+
MCP/skill artifacts to distinguish Lean from a model merely claiming it ran bare. Restore the
27+
fixture configuration. A direct harness run establishes runtime behavior, not Slack delivery.
28+
- Legacy acceptance: start with `profile=full`, `adminMode=true`, `allowBash=false`, Auto off.
29+
An ordinary member can edit and run shell commands as Worker; their bypass remains disabled.
30+
Existing `profile=auto` and `profile=lean` records retain their respective modifiers on reopen.
31+
632
## Release readiness remediation (2026-09-07)
733

834
The source changes address audit findings 1–4, 6, 7 and 9–17. Findings 5 and 8 (retiring the

0 commit comments

Comments
 (0)