Minor Changes
- b65ff77: Guided Discord onboarding in
bot-celly/bot-celly setup: the bot token is now verified against Discord, the required Gateway Intents are checked (with a direct Developer Portal link when one is off), a ready-made invite URL is printed, and the guilds the bot can see are listed so you can pick one instead of pasting IDs.bot-celly doctorgained a Discord row that reports the bot identity, the intent state, and a bad token (hard) versus an unreachable API (advisory). Everything still works offline, falling back to the previous manual token/guild entry.
Patch Changes
- 602d28a: Fix projects failing to wake after
GITHUB_TOKENis added or removed: the sandbox policy files are now rewritten on every (re)start, and a server still running with the old baked policy is rebooted automatically instead of failing the wake with “celly permission policy was not enforced”.
Patch Changes
- 0fc724a:
bot-celly setupcan now update a single value without re-running the whole wizard: pass--token,--guilds, or--github-tokento rewrite just those keys in the env file (an empty--github-tokenremoves it). The interactive wizard also shows existing values and keeps them on Enter, and the GitHub prompt now offers keep/update/remove.
Minor Changes
- cb1aca6: When a managed thread is archived, post a notice in its parent channel
(replying to the thread’s originating message when known) offering to remove
the session. Remove session deletes the OpenCode session and the thread
record and folds its usage into the channel totals so
/costhistory is preserved; the archived Discord thread is kept. Keep dismisses the notice. Any authorized member can answer. - ba33e54: Add
npx bot-celly@latest: a guided first-run setup for the Discord token and guild IDs, abot-celly doctorprerequisite check, a hidden-token wizard, and asetup/help/versionCLI surface. Config and data now default to~/.bot-celly(override withCELLY_HOME), and the package publishes to npm asbot-celly. - bd1e3bb: Rebuild the loopback admin page as an ops console: live project cards, usage and cost, audit trail, per-project logs and sessions, and project create/remove, served with vendored htmx 4 and server-sent events. The existing JSON API is unchanged and gains restart, create, and delete routes.
- 5a16c2c: Add an optional shared GitHub token. The setup wizard now asks whether to add
one (and there is a
--github-tokenflag for headless setups);GITHUB_TOKEN(withGH_TOKENas a fallback) is copied into every sandbox over stdin at mode0600intoopencode.envand agithub.comgit credential store, so the agent can clone, fetch, and push private repos. When a token is configured,git pushmoves from the hard deny list to the normal approval flow (runs inauto, asks inbuttons, rejected inplan); without one it stays blocked. The token is host-only, shared across projects, and never stored by Celly. - 55a9c87: Smart thread names: managed threads now show a live status prefix
(
🟢 working,⛔ blocked,⏸️ idle,❌ error,⏹️ stopping) and let the session agent author a short title once, in-band, before it locks. The newSMART_THREAD_NAMESsetting (default on) gates the feature; sandboxes get a global naming instruction at bootstrap.
Patch Changes
- 6920b88: Render context-usage token counts with the same
k/Mformatting as/cost, and render non-Error command failures as their thrown value instead ofundefined. - 683ca18: Add an owner-only
/dashboardcommand that posts the loopback admin console URL to Discord, and print the console URL in the startup banner. The link is only reachable on the Celly host;/dashboardreports the console as disabled whenADMIN_PORT=0. - 0fb2057: Evaluate the whole bash command in the permission policy: deny-listed commands
hidden behind separators (
;,&&,||,|,&), command substitutions ($(...), backticks), or heredoc bodies are now rejected, and commands the policy cannot statically analyze fail closed (approval in buttons mode, rejection in auto and plan). - f68d1f5: Fix broken code blocks in long Discord replies: Celly now always emits fences of exactly three backticks and reopens a split code block with its language, instead of escalating to four-backtick fences that Discord renders as literal text. One-shot notices and errors (handler failures, project stopped, sandbox missing, project connected, idle timeout) are now posted as Components v2 cards with a tone-coloured accent.
- 68f5315: Docs recheck: document the loopback ops console (live project cards, usage and
cost, audit trail, per-project logs and sessions, project create/remove, and
server-sent-event updates) and its full JSON API; refresh the architecture
module map and create saga; list
CELLY_ASCIIin.env.example; and correct the audit-trail,/modescope, and shell-output notes. - 5b006b6: Fix the sensitive-path denylist rejecting every project when Celly’s working
directory contains
PROJECTS_ROOT. The default systemd unit runs Celly withWorkingDirectory=%h, soprocess.cwd()(home) overlapped the default~/Celly/projectsand every project under it was treated as sensitive. The working directory is now skipped when it is an ancestor ofPROJECTS_ROOT; the bot repository itself stays denied in every other case. - 23cf07f: Stop echoing the prompt twice in a streamed reply. opencode publishes
message.part.updatedfor the user’s own message parts, which the renderer pushed after the> **you** · …quote; the event router now tracks each message’s role frommessage.updatedand drops user-authored parts so only the assistant output is rendered. - 43ed42a: Fix agent questions never reaching opencode: reply to v1 (
question.asked) requests through the instance/question/:id/replyroute (v2 sessions keep the session-scoped route), react to server-side question.replied/rejected events, clear pending questions when a run idles, and abort instead of wedging forever when a reply can no longer be delivered. - 9286ec2: Render agent questions inline in the streamed reply instead of posting them as separate messages that split the answer around the question. The question (and its answers) now appears in order in the agent’s output, with its buttons/selects/modals attached to the message holding the question and removed once the request is answered, rejected, timed out, or dropped. Question text is also formatted with numbered headers, option descriptions, and per-question answer lines.
- cd6f898: Log the cause when a pending approval or question is dropped without a decision (
run-ended,server-resolved,permission-replied,question-replied,question-rejected, ortimeout), with the thread, session, and request id. A later “this request is no longer active” click can now be traced to the request that was dropped. - e9d054c: Verify the bot-enforced permission policy before writing it. A config
PATCHdisposes the project’s OpenCode instance and aborts every running thread, so Celly now reads the running policy after each wake and health check and only re-writes it when a rule is missing or weakened. This stops a message in one thread from aborting every other concurrent thread in the same project. - 43ed42a: Show question answers in the Discord question message: each answer appears as it lands, unanswered questions stay marked as waiting (with their controls still usable), and the final edit lists every selected answer under the original question.
- 9f3f494: Add
/thinkingto pick a model’s thinking depth (an OpenCode model variant, for examplelow/high/max) per thread or as a project channel default. The depth is sent with each prompt, and unsupported variants are ignored. - 937481c: Show a persistent Stop button on a run’s streamed reply. Clicking it aborts
that thread’s run, the same as
/abort, and the button disappears when the run ends. - 3552879: Start new sessions in their own git worktree. Add
WORKTREE_DEFAULT(global, seeded once intosettings.worktree_default), an owner-only/worktree default state:<inherit|on|off>per-project override, and anew_worktreeoption on/fork. Non-git projects, an unresolved sandbox path, or a failedgit worktree addfall back to the project root with a console warning instead of failing session creation.
Minor Changes
- d32df6a: Add the loopback (localhost only) admin page (
ADMIN_PORT), size-based log rotation (LOG_MAX_BYTES/LOG_MAX_FILES), scheduled SQLite backups (BACKUP_INTERVAL_HOURS/BACKUP_KEEP), and recurring/taskprompts. - ec1dbba: Add approval modes (
auto/buttons/plan), Discord permission approval buttons, interactive agent questions with custom answer modals, and a best-effort 0600 audit log atDATA_DIR/audit.jsonl. - 3db6777: Add conversation UX:
/queuewith Remove/Clear buttons,/undo,/redo,/diff,/share,/unshare,/compact,/context-usage, autocomplete for/resume,/model, and/agent, per-channel default model/agent, and tool titles with elapsed time in streamed replies. - 405734b: Auto-stop idle project sandboxes.
IDLE_STOP_MINUTES(default0, disabled; set minutes to enable) stops a project after that many minutes without messages, prompts, or!shellactivity and posts a notice in its channel. The next message wakes the project again. - 0364586: Multi-guild support:
DISCORD_GUILD_IDSaccepts a comma-separated list (withDISCORD_GUILD_IDstill supported) and Celly deploys its commands, boot subscription, and thread reconcile across every configured guild. - b879cf3: Add per-session usage and cost tracking (
/cost) and per-channel session budgets (/budget,SESSION_BUDGET_USD). Providersbx secretmanagement from Discord remains deferred and host-only. - 806baac: Add
/attachand/session-idfor driving the same OpenCode session from a terminal inside the sandbox, and add the optionalATTACH_AUTO_THREADsetting to auto-create Discord threads for terminal-started sessions. - 495681b: Add per-thread git worktrees (
/worktree status|new|merge|remove), session forks (/fork,/btw), ephemeral/last-sessions, andclone:/branch:options for/project create.
Highlights
Initial release: a Discord control surface for OpenCode agents, with one isolatedsbx sandbox per project.Core model
- Channel = project (one sandbox, one host directory); thread = session (one OpenCode conversation).
- The bot runs natively on the
sbxhost and supervises a long-livedsbx exec ... opencode servechild per project.
Commands
- Project lifecycle:
/project add,create,list,status,start,stop,remove. - Sessions:
/new,/resume,/abort,/model,/agent. !<command>runs a shell command inside the sandbox.
Features
- Streaming replies throttled into a single live message, with fence-aware chunking.
- Session resume and per-thread model/agent overrides.
- Text attachments written to a validated
.celly/inbox. - Access control via guild owner,
Manage Guild/Administrator, an access role, and a block role. - Terminal coexistence: the same sessions are reachable from an attached terminal.
Security
- argv-only
sbxspawns, per-project microVM isolation, path containment, and a sensitive-path denylist. - Loopback-only server with a generated password.
- Bot-enforced permission policy re-asserted after every wake.
Known limitations
- The in-memory message queue is lost on restart.
- Role configuration accepts role IDs only.
- The finalization token/duration footer is descoped.