Agent Surface Changes
This commit is contained in:
@@ -334,7 +334,7 @@ discord-bot --help
|
||||
| `/upload` | `file` **(required)**, optional `path` | Attach a file (Discord CDN). The bot then runs guest **`wget -O dest URL`** into the **`/r` cwd** (or `path` if given: a directory gets `path/filename`, a file path is `-O`). Writable trees only (`~/`, `/tmp`). 60s timeout. If `BARE_OS_HTTP_ALLOWLIST` is set, include `cdn.discordapp.com` and `media.discordapp.net` |
|
||||
| `/hdms` | `list` `help` `health` `hints` `show` `create` `add` `remove` `invite` `pair` | Full Hyperdrive manager (`ctx.runHdms` / `/bin/hdms`). Default **list** is an interactive HUD: pick a drive, show, browse `/mnt/<label>`, invite (pair / RW), remove (confirm). **create** / **add** / **pair** open modals when args are omitted. **invite** prints the Autopass z32. **pair** defers (can wait up to the CLI timeout). **health** / **hints** read `/proc/bare_os/hdms_*.json` (no secrets). Requires **unlocked** identity. Writer secrets in `show` are redacted. `/mnt/…` is now allowed for `/fs` and `/files` (VFS still enforces RO mounts) |
|
||||
| `/holesail` | `list` `help` `status` `path` `logs` `show` `url` `add` `edit` `remove` `start` `stop` `restart` `enable` `disable` `service` | Full Holesail manager (`ctx.bareOsRunHolesailCli` / `/bin/holesail`). Default **list** is an interactive HUD: pick a tunnel, show, start/stop, enable/disable, edit (modal), remove (confirm). **Add server** / **Add client** open modals. No selection exposes **start/stop/restart** for the **`bare-holesail`** unit (`systemctl`). **show** / **url** print the shareable **`hs://`** key; **seed** material is never shown (64-hex redacted). **service** `start` `stop` `restart` `status` the initd unit. Live tunnel ops defer. |
|
||||
| `/agent` | `list` `help` `status` `config` `ask` `reset` `stop` | Guest `/bin/agent` from Discord when **configured**. Ready means: `~/.agent/config.json` exists **and** (QVAC model + `ctx.bareOsQvacAvailable`, or REST + `rest_api_key`). Default **list** is an HUD: Ask (modal), Stop, Reset chat, Status, Config (non-secret keys only). **ask** `prompt` runs one turn via `execLine` with `BARE_OS_AGENT_PLAIN=1` (shared `~/.agent/history.json`, up to 13 minutes, progress from `progress.txt`). Unconfigured HUD explains `agent --setup`. API keys never appear in Discord. Whitelist still applies. |
|
||||
| `/agent` | `list` `help` `status` `config` `models` `ask` `skills` `todos` `plan` `hooks` `history` `recap` `undo` `rewind` `compact` `export` `remember` `reset` `stop` | Full guest `/bin/agent` harness from Discord when **configured**. Ready means: `~/.agent/config.json` exists **and** (QVAC model + `ctx.bareOsQvacAvailable`, or REST + `rest_api_key` + `rest_base_url`). Default **list** is an HUD: Ask (modal), Stop, Reset, Models, Recap, Compact, plus an **Inspect / session** menu (skills, todos, plan, history, hooks, undo, rewind, export, remember). **ask** `prompt` (required) runs one turn via `execLine` with `BARE_OS_AGENT_DISCORD=1` (Discord-flavored Markdown, shared `~/.agent/history.json`, up to 13 minutes, live progress from `progress.txt`). Optional ask flags: `new`, `plan`, `auto`, `compact`, `max_turns`, `model`. Inspect subs call the same CLI as TTY (`agent skills`, `agent remember …`, …). Unconfigured HUD explains `agent --setup`. API keys never appear in Discord. Whitelist still applies. |
|
||||
| `/files` | `path` | File manager: browse, paginate, open, new file/folder, rename, copy, delete (writable trees only) |
|
||||
| `/settings` | — | Live session settings editor. Categories: appearance (theme, color depth, `LS_COLORS`, TUI), shell flags (`errexit`, `pipefail`, completion, …), session (`HOSTNAME`, `TZ`, `EDITOR`), Discord (guild / whitelist / user-install / debug — **never** the token), agent (`~/.agent/config.json` non-secret keys), IRC nick/autojoin, aliases. Changes persist to `~/.barerc`, `~/.discord/.env`, or app JSON and apply live when the guest already honors the knob |
|
||||
| `/r` | `cmd` **(required)** | Full non-interactive guest shell as the unlocked user (short name, was `/run`). Discord always prompts for `cmd` (autocomplete: commands, `cd` dirs, flags, history). Persistent **cwd** per Discord user. Pipes, `&&`, redirects, `$VAR` work. `exit` does not stop the bot. 20s exec timeout. **All command output** (`ctx.console`, `bareOsBinWrite`, `process.stdout`/`stderr`, `writeScreen`) is captured into the Discord reply and is not printed on the booter TTY. The shell HUD stays available from **`/panel` → Shell** and from buttons after a command |
|
||||
@@ -360,7 +360,7 @@ Bare OS has two layers of configuration: **host/boot** flags (read once when the
|
||||
| Shell | `BARE_OS_COMPACT_MENU`, `BARE_OS_SHELL_ERREXIT`, `NOUNSET`, `NOGLOB`, `PIPEFAIL`, `PIPESTATUS`, `POSIX_MODE`, `GROUPING`, `DOUBLE_BRACKET`, `CMDSUBST`, `STREAMING`, `BRACE_EXPANSION`, `PARAM_EXPANSION`, `UNTIL`, `LOOP_CONTROL`, `READ_BUILTIN` | Next matching command / Tab / pipeline (the shell reads these from env) | `export` in `~/.barerc` |
|
||||
| Session | `HOSTNAME` (needs host `BARE_OS_HOSTNAME_SET=1` for `hostname --set`), `TZ`, `LANG`, `EDITOR`, `PAGER` | Hostname now when mutation is allowed; others next consumer | `export` in `~/.barerc` |
|
||||
| Discord | `DISCORD_GUILD_ID`, `DISCORD_ID_WHITELIST`, `DISCORD_DEBUG`, `DISCORD_MESSAGE_CONTENT`, `DISCORD_LOGIN_TIMEOUT_MS` | Whitelist is next slash command. Guild / debug / intents / timeout need a bot restart | Non-secret keys only in `~/.discord/.env` (existing `DISCORD_TOKEN` is left untouched) |
|
||||
| Agent | `backend`, `qvac_profile`, `model`, `qvac_model`, `owner_name`, `agent_label`, `rest_base_url`, `temperature`, `max_tokens`, `max_iterations`, `stream`, `allow_delete`, `show_reasoning`, `reasoning_mode`, host-bridge flags | Next `agent` run | `~/.agent/config.json` — **never** `rest_api_key` / confirm tokens |
|
||||
| Agent | `backend`, `qvac_profile`, `qvac_device`, `qvac_ctx_size`, `qvac_gpu_layers`, `qvac_main_gpu`, `model` / `qvac_model`, `owner_name`, `agent_label`, `rest_base_url`, `temperature`, `max_tokens`, `max_iterations`, `stream`, `access_policy`, `context_compaction`, `compaction_keep_recent`, `autonomous_mode_enabled`, `todo_nudge_enabled`, `tool_parallelism`, `request_timeout_ms`, `allow_delete`, `show_reasoning`, `reasoning_mode`, host-bridge flags, `emergency_stop_mutations` | Next `agent` run | `~/.agent/config.json` — **never** `rest_api_key` / confirm tokens |
|
||||
| IRC | `nick`, `autojoin`, `shareChannels` | Next `irc` | `~/.irc/config.json` — **never** `~/.irc/secrets.json` |
|
||||
| Aliases | add `name=command`, remove an alias | Immediate (`ctx.shellAliases`) | `alias` / `unalias` lines in `~/.barerc` (`barerc` only understands `export`, `alias`, `unalias`, `theme`) |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user