@1outres/dsh-bot-core
v0.4.1
Published
Bots for DeepSeek Harness: a Bots section above Workspaces in the sidebar, each bot with a name, an avatar and a Main session.
Downloads
1,120
Maintainers
Readme
@1outres/dsh-bot-core
Host-only plugin (row id bot-core) that registers the bot Cordis service. Other packages in this repository import its types from @1outres/dsh-bot-core and declare inject = ["bot"], so they stay inactive until this row is loaded.
Bot templates
A bot's Agent preset is composed from a template plus the bot's own overlay. Declare a template from any Cordis patch with the @1outres/dsh-bot-core/template row; it registers while the row is active and mounts nothing itself. Every row needs an id, and !!js nodes inside plugins are kept and evaluate when a bot's preset mounts. (Only there: !!js at the top level of the row's config, e.g. in hostTools, is not evaluated.)
- insert:
- id: bot-template-helper
name: "@1outres/dsh-bot-core/template"
config:
id: helper
name: Helper
plugins:
- id: persona
name: "@deepseek-ai/dsh-persona"
config:
prefix: You are a helpful bot.
hostTools: []Like @deepseek-ai/dsh-agent-preset, the template row marks itself as a Loader group so its child rows stay unevaluated. dsh --dump-config-schema reports such rows as an "unrecognized Loader tree carrier"; the shipped preset rows get the same diagnostic, and it does not affect loading.
Bot presets
Each bot runs under its own Agent preset, bot-<botId>, composed from its template (default unless chosen) and its overlay, inside the bot's execution environment (below). bot-core registers it once that environment is ready for the bot, re-registers it when the bot's overlay or template changes, and removes it with the bot. A rename does not re-mount it: the preset's display name ("Bot: ") keeps the old name until the preset is next registered (an overlay or template change, or a restart). Other plugins work through the bot service:
registerTemplate/templates— the template catalog (the row above uses it).previewPreset(botId, { template?, overlay? })— what a change would compose to, without storing it.configurePreset(botId, { template?, overlay? })— merged with the stored record and validated in the write queue; nothing is stored when it does not compose.presetOf(botId)—ready: true, orready: falsewith theproblem(pending: truewhile it is expected to clear by itself, such as a template row that has not mounted yet).watchBotPresets(ctx, listener)(oronPresetChange, whose unsubscriber the caller owns) reports changes.createSession(botId, { title? })— starts a bot session under its preset, in the environment'sworkspace(below), and records it as the bot's; rejects while the preset is not ready. bot-core's own UI (a bot's New session) uses it too. A new session stays blank until someone writes into it, which the browser allows once its environment answers ("Blank sessions" below).registerEnvironment/environment()— the bot environment (below).models/configureModels/modelCatalog/resolveModel/onModelsChange— the bot's model roles (below).
Bot models
Each bot has a model per role (src/shared/models.ts, BOT_MODEL_ROLES): main (its Main session and every session createSession starts), utility (a light model for formatting; stored only, no consumer yet) and delegates (the models a session the bot starts may run, a list; stored only). A choice is { kind: "profile-default" } (DSH's agentDefaultModel) or { kind: "fixed", provider, model, reasoningEffort? }. The spec is docs/specs/bot-models.md (repository root).
- Storage.
dsh_bot_models(version 1,host/models/domain.ts), tablemodelskeyed by bot id, written only byhost/models/store.ts(design rule 51). A new bot's row is written right after its record (bots.create({ …, models? }), roles not given start atDEFAULT_BOT_MODELS: both profile-default, no delegates). At start-up every bot without a row getsDEFAULT_BOT_MODELSand a row missing a role gets that role's default; readers throw on a missing row or role (the start-up completion is the only one). A deleted bot's row goes. - Checks (
host/models/catalog.ts), as DSH's model picker andsession.selectModelcheck: the provider is inllm.listProviders(), the model inllm.listModels(provider), the effort inresolveModelInfo(…).reasoning.efforts, thenllm.resolveCallConfig. A fixed choice is checked when it is stored (nothing is stored when one is refused) and when it is used. Refusals:bot-models/not-found,unknown-provider,unknown-model,invalid-effort,catalog-failed,rejected(details{ role, index? }),gateway/bad-request.llmis a required inject. - Sessions.
createSessionresolvesmainin the bot's realizer turn. A fixed model is passed as the Agent's options and recorded on the session in setup (agent.model.select, amodel/selectionevent), so resumes keep it; one DSH cannot run refuses the session (no fallback).profile-defaultgets DSH's default as live accessors, as DSH's own sessions do (it follows DSH's default until the session's first request). - Live sessions (
host/models/main.ts). A change namingmainis stored withmainPendingand recorded on the Main session (agent.model.select, effective from its next step) at once when its Agent is live, otherwise when its Agent is next created or resumed; once applied, a model picked later in DSH's own picker stays.profile-defaultapplies DSH's default of that moment. A route DSH cannot run then is warned about and stays pending. Other live sessions keep their model;utilityanddelegateschanges are stored only. - Web UI (
client/models/,client/settings/ModelsSection.tsx; spec §9). The bot's settings have a Models section after General: rows Main and Utility (a searchable model picker, DSH's default first and named after the model it is now, then the catalog's models under their provider; an effort select when the model offers efforts) and a Delegates list (effort, move up / down, remove, Add model), every change saved as it is picked throughconfigureModels. The catalog is read each time the page opens; a stored route it does not list stays as it is, marked Unavailable;mainPendingis a quiet Pending pill on Main;bot-models/*refusals are worded per code on the row that caused them. The New bot dialog has a Model row formain(DSH's default unless another is picked). On a bot session DSH's composer model seat is empty (see Composer seats under Bot session shell);/modelstill works there (no way to hide a command). botsRemote:models(id),watchModels(id)(stream),configureModels(id, change),modelCatalog()({ profileDefault, providers, failures }). There is no settings UI yet.
Bot environment
Bots run only inside an execution environment (BotEnvironment, e.g. one VM per bot) that another plugin registers with registerEnvironment. At most one is registered at a time, and only the id the environment config names (default incus-vm), with an absolute, normalized workspace; environment() returns its id, isolated services and workspace. Without one, no bot preset is registered (fail closed), presetOf reports pending, and bot-core warns once after 30 seconds.
Sessions. Every bot session runs in the environment's
workspace(e.g./home/bot/workspace, the same path in every bot's VM). bot-core never uses a Host path for a bot (the session's directory is the one inside the environment): bot-core creates the session's Agent itself (agents.create, with the session controller's own setup: model selection andagentPresets.mount; the model is the bot'smainrole, "Bot models" above), because DSH'ssessionController.createmakes the directory on the Host first. Bot sessions belong to no DSH Workspace (a Workspace is a Host directory); bot-core records which bot each session belongs to in its own storage (thesessionstable), and the browser builds the Bots tree from that (newest first; a session DSH's title projection has not named yet shows as "New session N", N its place among the bot's other sessions in creation order, archived ones counted, so the number never changes whatever the listing order) and hides the bot sessions from the stock lists (where they would show as Ungrouped; the Ungrouped heading and its "show more" button go too while no other session is ungrouped in the browser's default view, i.e. not counting archived ones; with "show archived" on, an Ungrouped bucket of only archived sessions shows its rows without the heading). A session forked from a bot session in the Web UI is recorded as the bot's too. An Agent bot-core created belongs to bot-core's context, as one the session controller creates belongs to the session controller's: unloading bot-core ends it, and the session resumes on its next use.Working directory. DSH's Host
workingDirectoryservice checks every Agent's directory with the Host's file system (on every turn, for subagents, the terminal…). For an Agent of a bot's session, bot-core answers itsworking-directory/accesswaterfall itself, without callingnext(): the directory is checked with the environment's file system (thefsinside the Agent's composition, or its parent's for a subagent not composed yet), and a change is committed the way DSH does. A directory that does not exist in the environment (a session from before this layout, in a Host path) is switched once to the environment's workspace, with DSH's notice. If the environment cannot answer (a stopped VM), the recorded directory is kept and the bot's tools fail on their own. Every other Agent goes straight tonext(), so Workspace sessions are checked by DSH as before.Composition. A bot's preset is one
cordis:grouprowbot-environmentthat holds the environment'srows(target)first, then bot-core's own rows (env-bot-core-files,env-bot-core-channel,env-bot-core-connectors,env-bot-core-schedule,env-bot-core-sessions,env-bot-core-prompt,env-bot-core-notes, the group's own@deepseek-ai/dsh-skillenv-bot-core-skillandenv-bot-core-skills, "Skills" below,env-bot-core-conversations, "Past conversations" below, then the group's own@deepseek-ai/dsh-webenv-bot-core-webandenv-bot-core-web-bridge, below, and DSH'spresentasenv-bot-core-present, "Sending files"), then the composed template and overlay rows. It isolates the environment'sisolateservices and alwaysssh,fs,subprocess,shell,sandbox,sandboxPolicy,terminals,webTerminals,ptcRuntime,workflowEngine,worktrees,officeKit,computerUse,cuaAccess,webandskills: inside the group they are the environment's or not provided, so a row needing one the environment lacks stays pending instead of reaching the Host's. The preset revision changes with the environment's rows and isolate list. A composition is never registered outside that group.Refused in templates and overlays (in every nested row: the Loader mounts a
cordis:grouprow's children whatever itsgroupflag says, so such a row must setgroup: true, and onlycordis:grouprows may; row ids are unique across the whole tree). The bot's preset reports the problem,configurePresetstores nothing,previewPresetreturns it:- the row id
bot-environmentand ids starting withenv-; - paths, URLs and Loader builtins other than
cordis:group(cordis:include…), and other row carriers (@deepseek-ai/cordis-plugin-group,cordis-plugin-include,cordis-plugin-loader,dsh-agent-preset,@1outres/dsh-bot-core); - packages that run on the Host or assume a Host path (subpaths included):
dsh-fs-local,dsh-fs-sandbox,dsh-subprocess-local,dsh-sandbox-local,dsh-bash-local,dsh-bash-sandbox,dsh-ssh,dsh-fs-ssh,dsh-subprocess-ssh,dsh-sandbox-ssh,dsh-sandbox-policy,dsh-ptc-runtime-node,dsh-tool-executor-ptc,dsh-workflow-ptc,dsh-tool-workflow,dsh-tool-office,dsh-office-kit,dsh-tool-working-directory,dsh-working-directory,dsh-tool-terminal,dsh-tool-bash-persistent,dsh-mcp-client,dsh-mcp-manager,dsh-tool-cordis,dsh-tool-session-query(it authorizes by equal working directories, and every bot shares one),dsh-tool-scheduleanddsh-schedule(they start sessions throughsessionController.create),dsh-tool-workspace-dependencies,dsh-host-open-in-app,dsh-creation-recommendations,dsh-experimental-liveshare,dsh-native-command, anything starting withdsh-pwsh-,dsh-tool-pwsh,dsh-terminal,dsh-plugin-manager,dsh-cua,dsh-computer-use,dsh-experimental-…worktree…(all@deepseek-ai/), and@1outres/dsh-bot-vm; - packages that provide a web seam or web providers, which would bypass bot-core's web settings and secrets ("Web lookup", below):
@deepseek-ai/dsh-web,dsh-web-fetch-http,dsh-web-deepseek-api,dsh-web-search-deepseek,@1outres/dsh-plugin-exaand@1outres/dsh-bot-web; - packages that provide skills, whose skills would not be the bot's
skills/("Skills", below):@deepseek-ai/dsh-skill,dsh-skill-filesystemanddsh-skill-office; isolatevalues other thantrue(falsewould un-isolate, a label joins a realm shared across the Host), and anisolateorinterceptof a service the group isolates;@deepseek-ai/dsh-tool-present(subpaths included), which bot-core puts in every bot's group itself (env-bot-core-present, "Sending files" below), andpresentinhostTools(the Host's reads Host paths);hostToolsnot listed in theallowedHostToolsconfig (default none).
- the row id
Overlays only may not set Host-path config of otherwise allowed plugins:
dshHome,agentsHomeofdsh-agent-instructions.Readiness. Registering the environment
ensures every bot; a bot created later is ensured when it is stored. The preset is registered onceensureresolved (pendingmeanwhile). A rejectedensuremakes the preset not ready with the reason (warned once per reason) and is retried after 5 s, doubling up to 5 min. The environment'sonChange(botId)re-runsensure(the bot stays ready unless it fails). Unregistering the environment unregisters every bot preset; unloading bot-core aborts runningensures and keeps the environments. A scheduled resume of a bot session waits only 15 seconds after start-up (below): if the environments take longer to come up, that resume fails.Lifecycle. Creating a bot is refused while no environment is registered. Otherwise bot-core stores the bot unlisted and waits (up to 10 minutes, outside the write queue, through failed
ensures being retried) until its environment is prepared and its preset registered; then it starts the Main session and greets as before. Every new session (createSession: a Main, a New session, one for another plugin) is prepared first: a check through the session's own file system must reach the bot's workspace (every 3 s, for up to 3 minutes; then it goes on anyway, with a warning), because a turn whose preparation cannot reach the environment fails and consumes its message, which happened to the first turn on a VM that had just booted. A new bot's greeting is sent once its Main is prepared. The browser's create dialog stays busy meanwhile and cannot be closed (a creation cannot be cancelled), and thebotsRemote reports the sessions of bots being created, so the browser hides them as it hides the listed bots'. If that does not happen in time (or the environment goes away, or bot-core unloads), the bot is not kept: its record goes, any session it started is archived, and its environment is removed. Deleting a bot archives its sessions, unregisters its preset, then callsremove(botId), retried with backoff (with no environment registered, by the next one, in memory only; the provider may clean up environments of unknown bots). What happens to the workspace's files is the environment's choice:incus-vm(@1outres/dsh-bot-vm) deletes the VM but keeps the files on the Host in~/.dsh/bots/<id>/workspace(itshostRoot), where they were all along; the delete dialog says so, and removing that folder is up to the user. A stored bot without a Main gets one when its preset becomes ready.Bots from before this layout (storage version 1) had a Host directory (
~/.dsh/bots/<id>) registered as a Workspace. At start-up bot-core records that Workspace's sessions as the bot's and deletes the Workspace registration (the Host directory itself is left alone; remove it by hand. Its path,~/.dsh/bots/<id>, is also where@1outres/dsh-bot-vmkeeps a bot'sworkspacenow; an old one is an empty directory and does no harm). Their sessions keep their oldcwdin the header and are moved to the environment's workspace on their next turn (above). The storage domain is now version 2 (it still reads version 1); an older bot-core refuses it.Known limits. Host features that read a session's directory with the Host's file system find nothing for a bot session (the bot file viewer, below, replaces the Files sidebar and file previews): @-mentions of files in the composer, changed files (DSH may log a warning per turn), and the Web terminal (bot sessions cannot open it). Attachments other than images that a person adds in the Web UI's composer are passed as Host paths, which the VM cannot read (channel attachments go to the inbox instead, above). A new file written by the bot's
writetool is mode 0600 inside the VM: dsh-fs-local's atomic write stages it with 0600 and keeps that mode for new files (an existing file keeps its mode), the same as on the Host;bashcreates files with the VM's umask. A schedule a user creates for a bot session with anewornew_oncetarget fails at delivery: DSH creates the new session through the session controller, which makes its directory (/home/bot/workspace) on the Host first and getsEACCES(/homeis root's); athis_sessiontarget only resumes the session and works. Never create/home/boton the Host: its absence is an extra fail-closed guard, since any Host feature that checks a bot session's directory with the Host's file system (a bot session resumed while bot-core is not loaded, a resumed subagent of a bot that had named a non-bot preset, a stock session creation in that path) fails there instead of running in a Host directory of that name.
A preset that cannot be realized (missing template, an overlay that no longer applies, a registration the Agent preset registry reports broken) is unregistered rather than left at its old composition, so the bot's sessions do not resume on settings that no longer hold; they resume once it is fixed. A missing template is reported only if it stays missing for 10 seconds. A due schedule that resumes a bot session within 15 seconds of start-up waits (within that window, never past an unload) for the bot's preset; DSH delivers all due tasks in one queue, so the window is shared, not per session.
A template or overlay may not let subagents pick another preset (agentPreset / allowedAgentPresets naming anything but the bot's own preset); such a composition is refused.
Trust boundary
The profile is trusted, an overlay is not. Templates (declared in the profile with the template row) may use Loader !!js and any plugin package the bot environment rules above allow. An overlay given to configurePreset / previewPreset may come from a chat message or the browser, and the Loader imports a row's name and evaluates !!js on the Host, so an overlay:
- may not carry
!!jsexpressions; - may only name plugins that a registered template uses, plugins listed in bot-core's
allowedPluginsconfig, orcordis:group(nested group rows are checked too); - may never name a path, a URL (
file:,data:, …) or a Loader row that reads other entries (cordis:include,@deepseek-ai/cordis-plugin-include,@deepseek-ai/cordis-plugin-loader), even when listed.
Stored overlays passed these checks when they were configured and are not re-checked against the allow list.
Web lookup
Every bot's web_search and web_fetch (the template's tool-web row) go through a web backend bot-core chooses, never through the Host's web service, its settings page, providers, DSH_WEB_* or keys. The spec is docs/specs/bot-web.md (repository root).
- Backends (
src/web-contract.ts, re-exported from the package entry). A plugin registers one withregisterWebBackend(@1outres/dsh-bot-webregisters Exa): an id, a name and description, its secret fields, asearchand/orfetchoperation (placement: "host"for now;run(request, { botId, secrets, signal }), failures thrown asWebError) andtest(one request with the secrets:ok, orinvalid-secret,no-credits,rate-limited,unreachable,unexpected). The descriptor is checked (host/web/catalog.ts).webBackends(),webStatus()andonWebChangeread the state. - Settings, shared by every bot: the storage domain
dsh_bot_web(version 1,host/web/domain.ts), tablesettings, one rowglobal({ backend, search, fetch }), written only byhost/web/store.ts(design rule 44). A first start storesDEFAULT_WEB_SETTINGS(Exa, both on). Secrets: one credential record per backend,bot-core/web-<backend>(agrant, payload{ version: 1, secrets },host/web/vault.ts); the browser only learns whether each is set. A backend that goes away keeps its record. Without DSH'scredentialsservice every capability is unavailable. - Status (
host/web/status.ts, pure), per capability, in this order:disabled,unavailable(not-registered,no-capability,no-credentials-service),missing-secrets(which keys),ready. - Composition. Every bot's group isolates
weband holdsenv-bot-core-web(@deepseek-ai/dsh-webwithsearchProviderandfetchProviderfixed tobot-core) andenv-bot-core-web-bridge(@1outres/dsh-bot-core/web, sealed with the revision token like bot-core's other rows), which registers thebot-coreprovider for each capability the backend has (design rule 45). Everytool-webrow (nested ones too) getssearch/fetch= what the template asks (true when absent) and what the backend has. Only the backend and its capabilities are composition inputs: their change recomposes every bot. - When changes apply. A live Agent keeps the preset revision it started with (DSH keeps it until the Agent ends; a Main lives until DSH restarts). So turning a capability on or off does not recompose: the bridge's
ready()and calls use the settings read at the calling Agent'sturn/start(agents.currentInitiator()) for that whole turn, so both directions apply from every bot's next turn, the live Main's included, and never inside a running turn. A key that is set, replaced or removed applies from the next step (ready()reads the record; tool-web asks it every step), without recomposing. Known limit: a backend registered or unregistered later (or gaining a capability) reaches live Agents only once they are created again (a restart); new sessions get it at once. The bridge accepts every revision token bot-core registered during this load, since live Agents keep using their revision's bridge. - Readiness and calls (
host/web/bridge.ts).available()is always true;ready()is true while the capability is on for that turn, the settings' backend is registered with it, and every secret is stored (no network). Until the key is set,web_search/web_fetchdo not show at all; nothing falls back to the Host's web or another backend. A call that reaches the bridge anyway is refused withWEB_PROVIDER_UNAVAILABLEorWEB_PROVIDER_CREDENTIAL_MISSING. botWebRemote (host/web/panel.ts):view(),watch(),setEnabled(capability, enabled),setSecret(key, { op: "set", value } | { op: "clear" })(trimmed, non-empty),test()(stored secrets, 15 s, one at a time). Refusals:bot-web/unknown-secret,missing-secrets,not-registered,no-capability,busy,unavailable,gateway/bad-request.- Web lookup section of the dsh-bots settings (
client/web/, registered inclient/wiring/web.ts, first): a group titled with the backend holding its key as aSecretRow(Set / Not set, never its value; Set and Replace open the inline editor, Remove asks first; a typed, unsaved key asks before it is lost) with a row button Test while the key is stored (billed as one search; for a while its result — Valid, Rejected, No credits… with the backend's message as the tooltip — replaces the pill,data-dshb-web-test-result), and a group Capabilities with aSwitchper capability (data-dshb-web-switch), saved at once and disabled without the key; a capability the backend cannot serve shows an Unavailable pill with the reason as its tooltip. No description or warning text is shown. Its badge is a warning while a capability that is on cannot be used; the Bots heading's dsh-bots settings button (a wrench,data-dshb-global-settings-open; the bot's own settings keep the gear) is marked (data-dshb-global-settings-attention) while any section of the dsh-bots settings has a warning or danger badge (client/global-settings/attention.ts). - Upgrading. The first start stores the defaults; bots have no Exa key yet, so
web_searchandweb_fetchdisappear until one is set: open dsh-bots settings → Web lookup (the Bots heading's wrench is marked) and enter the bots' Exa API key. The Host's Exa key (EXA_API_KEY) is not copied. Every bot preset's revision changes once (the new rows).allowedHostToolscould still grant the Host'sweb_search/web_fetch; do not, as they use the Host's web settings and network. Buildlib/web.js(a fullpnpm build) before DSH loads the newlib/index.js.
Welcome guide and release notes
(docs/specs/bot-onboarding.md.) Every page shows them until one finishes them; the state is the Host's, followed through the botOnboarding Remote.
- State (
host/onboarding/, storage domaindsh_bot_onboardingversion 1, one row: the guideopen/creating(its bot) /done(created,later,existing), andnotesSeen, the newest dsh-bots version whose notes were read; written only byhost/onboarding/store.ts, design rule 57). The first start decides once: stored bots, web lookup settings stored by an earlier start or a stored OAuth client make it an existing installation (guide done, every note up to now shown); otherwise the guide opens and no note is shown. A start whose versions sincenotesSeenhave no note only records the new version. - Release notes (
host/onboarding/source.ts,releases.ts,notes.ts): the running version and the repository are bot-core'spackage.jsonversionandrepository. While the stored version is behind, the Host reads the repository's GitHub releases (v<semver>tags, not drafts, newest first) after it up to the running one, once per start; their English Markdown bodies are shown on every page until one page acknowledges them. Unreadable (offline, refused, rate-limited): nothing is shown or stored, and it reads again after 1 min, doubling up to 1 h. No release with a body in between: the version is only recorded. The notes are written in the release (infra/RELEASING.md), never in the code. botOnboardingRemote (host/onboarding/panel.ts):watch()(with the channels the guide can set up: registered ones, while DSH's credential store is there);createBot(input, channels),bots.create's creation run alone among the guide's changes, refused withbot-onboarding/closedunless the guide is open (a second page cannot make a second bot); every channel setup is checked against its fields before anything is stored, then stored for the new bot through thebotChannelspanel right after its record (a setup that cannot be stored discards the bot);finishWelcome()("Create later"; while creating, done with that bot);acknowledgeReleaseNotes(version). All idempotent. The Host follows the guide's bot (host/onboarding/follow.ts): done once it is listed, open again once it is discarded, whether or not a page is open.- Browser (
client/onboarding/,client/wiring/onboarding.ts, inshell.overlay): the guide — one welcome page ("Welcome to dsh-bots!" in every language, four feature cards), Web lookup (the sameWebLookupSection), Google accounts (the sameOAuthClientGroup) and channels (each channel'ssetupsteps and the Channels settings'ChannelGroupover a draft kept on this page only,channel-drafts.ts, sent with the creation) when there is something to set up, all skippable, then the first bot with the New bot dialog's fields (client/creation/) or, without an environment, the reason with Check again and Create later, then the creation's steps. No ×, Escape or mask click closes it. A page that showed it opens the bot's Main when it is done (or shows its creation until the bot is listed). Then the release notes, a dialog of each release's Markdown (drawn byclient/markdown.ts, never as HTML) with only OK.
Bots section
The sidebar's Bots section (client/BotsSection.tsx, BotGroup.tsx, BotSessionRow.tsx, derived by client/tree.ts) sits above Workspaces, in the same viewport as the panel list ([data-sidebar-scrollport], client/placement.ts). It has no height limit or scroller of its own: like the panel list, it scrolls away before Workspaces scrolls its own rows (DSH's sidebar hands the wheel over, and the Workspaces section is at most one viewport tall), so Workspaces stays reachable however long the bots get; Show more keeps each bot short. Only the fallback placement under New Session, outside that viewport, keeps a bounded scroller.
- Tree. One WAI-ARIA tree with a single tab stop, as Workspaces: ↑/↓/Home/End move, → expands a bot or enters it, ← collapses it or returns to the bot, Enter/Space activate. A bot row opens Main; expanded, it lists Main first (it is never archived and has no archive action), then the bot's other sessions newest first, then the overflow row. Expansion is kept per bot in
localStorage(dsh-bots:expanded); a bot without one follows the selection. - Show more (
client/session-window.ts), the same rule as Workspaces' "Show more" (dsh-client-ui-workspaceSESSION_WATERMARK_BASE/SESSION_WATERMARK_AUTO_MAX): a bot lists 5 sessions besides Main, and a last row "Show N more sessions" ("Show 1 more session") adds 5 more each time (all of them once 5 or fewer remain), then reads "Show less", which folds back. The window never hides the selected session (wherever it is: opening a session from anywhere reveals it) nor a running one within the first 50, and once raised it stays for the page; collapsing the bot folds it back. The overflow row is a treeitem: Enter or Space acts on it. - Archive. Each session row but Main shows an Archive button on hover, and a right click, the menu key or Shift+F10 opens its menu (
ctx.contextMenustargetbot-session,client/session-menu.ts) with Archive session. Archiving goes through DSH's ownctx.uiWorkspace.archiveSession, as Workspaces' rows do (client/session-archive.ts): a session with running work is refused by the Host (workspace/session-active) and bot-core asks first, naming the work, then stops and archives (stopActivity); any other refusal shows on the bot's row. DSH clears the main view of an archived session; bot-core opens the bot's Main instead when the archived session was on screen (unless the user went elsewhere meanwhile). A notice then offers Undo and Show archived. - Archived sessions. The bot's menu has Show archived sessions (only while the bot has an archived session) / Hide archived sessions (per bot, kept in
localStorageasdsh-bots:archived-shown; showing them also expands the bot). Archived sessions then appear in place, newest first, grayed, under the same window, with an Unarchive button and an Unarchive session menu. As in DSH, an archived session cannot be opened (DSH clears an archived session from the main view): activating its row says so. Bot sessions stay hidden from the stock lists, archived or not, so DSH's own archived filter never lists them.
Language and formats
The browser half's copy is client/i18n.ts (en, ja), registered with dsh-client-locale under the dsh-bot-core namespace; a DSH language bot-core has no dictionary for shows the English one (DSH's fallback chain).
- One formatter (
client/locale-format.ts,localeFormat(t)). Dates and times (instant(at, "dateTime" | "time"):Nov 23, 2026, 9:28 PM/2026/11/23 21:28, or9:28:18 PM/21:28:18), relative times (relative(at, now, "largestUnit" | "seconds")withIntl.RelativeTimeFormat:in 5 minutes/5 分後) and counts (count(key, n, params)) go through it, and nothing else inclient/formats them (design rule 47). Its language is the dictionary's ownformat.localeentry, read through the samet, so formats follow the language the surrounding text is actually in, and change with DSH's language setting without a reload. - Time zone. Instants shown to a person (an approval's request, expiry and decision, a connector's next retry) are in the browser's time zone. A bot's
timezonesetting is for the bot's own schedules (Host-side), not for what the Web UI shows. - Plurals. A message that depends on a count is a family of keys
<key>.one,<key>.other(and any other CLDR category its languages use), picked withIntl.PluralRulesofformat.locale, with the number formatted for that language in{count}. Japanese words both the same.PluralKeyis the type of such families;test/locale-format.test.tschecks that every dictionary words each category its language uses.
Bot session shell
The browser half (src/client/index.tsx) only composes its parts from client/wiring/: stylesheets (styles.ts), session classification (classification.ts), the Bots section and its actions (bots-face.ts), archiving bot sessions with its confirmation and notices (archive.ts), dialogs (dialogs.ts), the file viewer (files.ts), the shell (shell.ts) and the right sidebar lockdown (rightbar.ts). State lives in React-free stores and models (store.ts, session-classification.ts, slot-priority.ts, slot-registration.ts, menu.ts, session-menu.ts, session-archive.ts, session-window.ts, tree.ts, files/*-model.ts, sidebar/lockdown-status.ts); components only draw them.
While the main view shows a bot's session, the browser replaces DSH's conversation shell with bot-core's (client/shell/): a header in DSH's conversation header measures (one 50 px row with a hairline: 24 px avatar, the bot's name, the session's name after a / when it differs, and a settings button that opens the bot's settings screen, below), the conversation on Chat only (no Chat / Trajectory / … tabs), and a vertical menu bar on the right whose first button sits on the header's centre line (Files, Notes, Actions, then the panels of the connectors the bot has on; a new session starts from the bot's row in the sidebar). At 640 px and below the menu bar folds into a menu button in the header (data-dshb-shell-menu-button, a dot while an entry waits). Bot-core adds nothing to the conversation column that shrinks the transcript: the bots list's state (reconnecting, unavailable), a failure of the bot's row actions (New session, Archive, Unarchive) and the session's notice (what the viewer could not open, or a refused right-sidebar lockdown, which outranks it until dismissed for the page) are banners floating under the header over the transcript (data-dshb-shell-banners; one look, tone by colour; a dismissible one ends in × and dismissing it moves focus to the bot's name). Every other session shows DSH's own shell, unchanged.
Bot settings (client/settings/). One large popover in shell.overlay (over a mask that closes it like ×) holds every setting of a bot: a one-line header (24px avatar, name, ×), a vertical tab list of sections on the left (↑/↓/Home/End move, Enter opens) and the open section's page on the right; on a window of 640px or less it is a full-screen sheet whose first page is the list of sections. A section may push one detail page (the frame draws the way back, named after the section). Escape leaves the detail page, then (on a sheet) the section, then the screen, and focus returns to where it was opened. It opens from the header's settings button and from the row menu (Settings…). Its state is one store, { botId, section, detail, nav } | null (settings/flow.ts), opened with openSettings(botId, section?, detail?), and closed by itself when the bot leaves the list. Sections are registered (settings/sections.ts: register({ id, order, label, icon, component, badge? })); the screen only draws them. A section receives { t, bot, page, close, confirm } (page: the detail shown, open(detail), back()): settings are saved as they change, an inline editor that holds typed text (client/ui/ TextField, SecretRow, or usePendingEdit) makes any move or closing ask before the text is dropped, and the section may close the screen after an action that ends it or ask before a step with consequences. bot-core's sections: General (the name, saved on Enter or leaving the field; the avatar, with the same AvatarPicker as the New bot dialog, saved when picked; the time zone, a searchable list saved when picked; and a last row Delete bot…), Models (the model of each role, see Bot models), Channels (one group per channel plugin, every field saved on its own; the nav shows a dot only for an incomplete (amber) or failed (red) channel) and Connectors (a list, then a page per connector and per provider of accounts). Delete bot… and the row menu's Delete… open one confirmation over whatever is open (client/DeleteBotDialog.tsx, client/bot-deletion.ts, BotsFace.confirmDelete(botId)): Delete is enabled once the bot's name is typed, and the bot's settings close once removeBot resolves. An uploaded image is cropped to its centered square and scaled to 256 px, then re-encoded (PNG, then WebP and, without transparency, JPEG at falling quality, then smaller sizes) until it fits the avatar limit; an animated GIF keeps its first frame and says so, and a file that cannot be used names why.
dsh-bots settings (client/global-settings/). Settings shared by every bot live in a second screen of the same kind, separate from any bot's: it opens from the wrench button in the Bots section's header ("dsh-bots settings") and from bot-core's dsh-bots page in DSH's own settings (settings.section, registered only while DSH's settings shell declares it), which holds one row, dsh-bots settings, with Open: the button closes DSH's settings panel (the section's close) and then opens this screen, so the two never stack and focus lands in this screen. Its state is { section, detail, nav } | null (global-settings/flow.ts); sections register like a bot's (global-settings/sections.ts, register({ id, order, label, icon, component, badge? })) but receive { t, page, close, confirm }, nothing of a bot. While none is registered the screen says there are no settings yet. The two form a modal stack (wiring/screens.ts, settings-frame/stack.ts): opening this screen from a bot's (Connectors' Open the dsh-bots settings) opens it over the bot's, which stays as it was, out of reach, and is back once this one closes; opening a bot's screen closes this one first, asking about typed text. Both screens are the same frame (client/settings-frame/: SettingsFrame draws the header, the nav, the page and the confirmations; Escape, Tab and focus go through the layer stack of client/ui/layers.ts, which bot-core's dialogs share; createSectionRegistry and createFrameFlow hold the sections and the open screen's state); settings/ and global-settings/ only say what the screen is about and what a section receives.
Shared components (client/ui/). Every section and screen composes the same parts instead of its own markup: Group (an h4 title over a hairline frame of rows), Row / BlockRow / NavRow / LinkRow / AddRow / ButtonRow (a row that is one action), RowMenu (a row's … menu), PageTitle, Switch, Segmented, Select, SearchSelect, TextField / TextFieldRow (saved on Enter or leaving the field), TextArea (a list, saved on leaving it), TextInput (the same look for a dialog's field that its form sends), SecretRow, StatusPill, Button (primary, secondary, row, icon; tone: "danger"; expanded / controls for a disclosure, form for a submit outside its form), EmptyState, ErrorText, Tag, Code; their look is client/ui/styles.ts, in DSH's measures and theme tokens. Opening a settings screen, the New bot dialog or the archive confirmation on a narrow window closes DSH's sidebar drawer first (wiring/drawer.ts, ctx.layout.toggleSidebar()).
- How it is swapped.
main.conversationis a single Slot, where the lowest priority renders alone. bot-core registers its entry there (client/slot-registration.ts, wired inclient/wiring/shell.ts) while the sessionmain.conversationis bound to is a bot's or not classified yet, and disposes the registration for every other session, so DSH's ConversationRoot renders those. That session is read from the source the Slot renderer binds the scope with, dsh-client-ui-session'sctx.uiSession.adapter.current(client/main-session.ts). Two DSH rules force registering per session: an entry mayrenderSlotonly the children its own registration declares, andconversation.headeris already declared by ConversationRoot's entry (declaring it again throws), so no entry of ours could show the stock header for a non-bot session; and a single Slot refuses a second registration at an equal priority, while bundle client plugins callctx.slots.registerdirectly (only thecordistool's dynamic packages get a priority assigned), so the priority is explicit (see Slot priorities) and tried once. A refusal (another plugin holdsmain.conversationat that same priority) is logged withconsole.error, is final until reload (no other priority is tried), and the Bots section shows it as an alert; bot sessions then show DSH's shell. - Slot priorities (
client/slot-priority.ts). Every seat bot-core takes over for bot sessions is registered at one priority,BOT_SESSION_PRIORITY(Number.MIN_SAFE_INTEGER, finite because SlotCore orders entries by subtracting priorities):main.conversation(the shell),rightbar.session(the lockdown),conversation.input.modelandconversation.input.permission(the emptied composer seats) and theconversation.composerchain entry (the interaction card). A single Slot renders its lowest entry and a chain elects its lowest first; DSH's entries sit at 0, and a plugin that replaces one of these seats for every session sits below it (thecordistool's packages at -1, -2, …,@1outres/dsh-plugin-model-pickerat -100). bot-core's entries are only registered while the main view shows a bot session (or one not classified yet), and the interaction card only elects bot-core's own carriers, so taking the floor keeps those replacements off bot sessions and leaves them in force everywhere else. bot-core's other registrations add their own cells (list and hocids, keyedkeys: the Bots section, dialogs, the settings page, the refused file tab, menu icons) and shadow nothing, so they keep the default priority. - Which sessions (
client/session-classification.ts). Once a bots list has arrived (also while it reconnects, on the last one), it decides: each bot's Main and other sessions, and those of bots being created, are bots'; everything else is stock. Until then the session list's summary decides from the session's agent preset (projectionValues.agentPreset):bot-<id>is a bot's (its bot not known yet: a pending header), another preset or the default is stock, and a session list not ready or a summary without the field leaves it unknown. An unknown session gets only a neutral placeholder ("Loading the session…": no header, no menu bar, no DSH shell), so a reload never flashes DSH's header on a bot session nor bot-core's on a Workspace session. The main view without a session is unknown too while DSH's session list or Workspace list is still pending (client/main-session.ts): ui-workspace restores the saved selection only once both are ready, synchronously for a bot session, so a reload never flashes DSH's start screen before a bot session is restored; once both lists have arrived, no session is DSH's own home (stock). The preset is provisional and wrong in two known cases, both corrected when the list arrives: a legacy Main (default preset, below) reads as stock, and a Workspace session where the user picked a bot's preset (locked down, see Isolation) reads as a bot's. Nothing about sessions is remembered inlocalStorage. - The bots list's state (
client/store.ts).loadinguntil the first list;ready;reconnectingwhen the stream broke after a list arrived (the last list stays on screen, and the Bots section and the shell header say "Reconnecting to bots…"); a broken stream is reopened after a backoff (1 s, doubling to 30 s while no list arrives), or at once when DSH's connection establishes a new generation (ctx.connection.generation), so the notice clears as soon as the transport is back;unavailablewhen no list ever arrived;failedwhen the Remote could not be mounted. While unavailable or failed, a session classified as a bot's keeps the bot shell with an alert that bots are unavailable, never DSH's shell. - Content. The shell renders DSH's
conversation.contentFactory as the main occurrence (variant: 'main': document paste reaches its composer, the hero frame and the transcript width preference work as in DSH's shell), with itsviewsposition fixed to Chat (renderSlot('conversation.session', { view: 'chat' }), as DSH's embedded subagent chat) and a copy of DSH's width handles. - Blank sessions. A bot session has no Workspace, so DSH's hero keeps the composer of a blank one inert ("Choose workspace"; dsh-client-ui-conversation
ConversationContentdisables it whileherois set and no Workspace holds the session). The shell therefore renders theconversation.contentFactory of a blank bot session withhero: falseand theactivephase (client/shell-phase.tsbotShellView; a session still replaying stayssettling): the empty chat and the normal composer, ready for input, with no turn and no model call needed. Only while the session is being prepared (BotsSnapshot.preparingSessionIds, fromhost/preparations.ts: a new session until its environment answers, a new bot's Main until its greeting is sent) or while its bot is not listed yet, the shell shows " is getting ready…" instead. A New session and a new Main that replaced the former one then take input as they are, with no greeting. - Composer seats (
client/wiring/composer-seats.ts). DSH's composer model seatconversation.input.model(ui-model-selection's picker) and permission seatconversation.input.permission(ui-permission-presets' selector) are single Slots; while the main view shows a bot session (or one not classified yet) bot-core holds each atBOT_SESSION_PRIORITYwith an entry that draws nothing, released for every other session, so a bot's model comes only from its settings and its permission is alwaysBOT_PERMISSION(see Permission and prompt). Their priority is below that of DSH's controls (0) and of a plugin that replaces one everywhere (@1outres/dsh-plugin-model-pickerholds the model seat at -100), so they render on bot sessions, and every other session keeps whichever control is in force. Each seat is registered on its own: a refusal (another plugin holds that seat atBOT_SESSION_PRIORITYitself) is final, leaves the other seat emptied, and is shown in the Bots section like the shell's. The/modeland/permissioncommands stay (DSH'scommandUicannot hide a contribution per session). - Right sidebar. DSH's right sidebar never shows on a bot session; its Files, Terminal and other tools are replaced by the bot file viewer (below).
- Failures. Everything the shell renders sits in its own error boundary: a failure logs to the console (naming DSH's
SlotAssemblyError/HocContentErrorwhen that is what it caught) and blanks the screen with a short notice ("This session cannot be shown."); the next session starts fresh. It never falls back to DSH's shell for a bot session, which would bring back the title row, tabs and the right-sidebar opener. (Only an error outside that boundary, in the registration'sinject, would make DSH's renderer retire the entry and show its own shell.) - Connector panels (
client/connector-panels/, wired inclient/wiring/connector-panels.ts). Every registered connector with apanelthat is not off for the bot gets a menu bar button after Files and Actions, with the glyph itspanel.iconnames (from the bot'sbotConnectors.watch, shared with its settings and reopened when it breaks), with a dot while itsstatus.requestis open. It opens the connector's panel in the shell's side panel frame (client/shell/SidePanelFrame.tsx, shared by Files, Actions and connectors; one side panel per session,client/shell/side-panels.ts: opening one closes the other; its width is kept per page, default 720 px). The frame shows the connector's readiness as anEmptyStatewith the connector's glyph (off with a button to its settings, waiting with the reason, preparing with the connector'spreparation.hintas title and the stage as a compact row with the elapsed time (and the current step's, once it differs), failed with Retry now) and, once ready, the keyed Slotbot-core.connector.panelthatmain.conversation's registration declares (entry key: the connector id; owner propsConnectorPanelPropsofsrc/connector-panel-contract.ts: the bot, the session, the view andopenStream(name)); a connector whose browser part is not loaded says so. A request is listed at the top of the Actions panel of every session of the bot (its reason as text only, and Open {panel}). - Menu bar entries are bot-core's own list (
client/shell-menu.ts,createShellMenu().register({ id, order, label, icon, run, pressed?, disabled? }), wherepressedanddisabledreturn observables;runalso gets the shown session's id), not a DSH Slot;client/wiring/shell.tsregisters the built-in ones.
Re-checking on DSH upgrades. client/ may not import @deepseek-ai/dsh-client-ui-* (design rule 30), so the shell copies parts of @deepseek-ai/dsh-client-ui-conversation 0.2.2-rc.5: the phase derivation of ConversationMainPanel.tsx and contract/snapshot.ts (client/shell-phase.ts), ConversationWidthControls.tsx (client/ShellWidthControls.tsx) and the .root and width-handle rules of ConversationRoot.module.css (client/styles-shell.ts). The Factory's own CSS keys some rules (sticky composer, hero centering, hidden composer while settling) on that module's hashed .root class, which the shell cannot carry; styles-shell.ts restates them on the Factory's data attributes (data-conversation-scroll, data-composer-seat, [data-slot] anchors). client/upstream.ts lists these sources and every other DSH file the shell and the lockdown rely on, each with the reason and the bot-core files relying on it (the registrations in ui-conversation's apply.ts, the Chat view id, ui-subagent's Chat-only pattern, ui-session's adapter.current, the renderer's child authorization, anchors and session remounts) with their SHA-256; test/shell-upstream.test.ts fails when a file's hash differs. It reads them from the repository's root devDependencies, pinned at UPSTREAM_DSH_VERSION (the version every package's engines.dsh and DSH dependency names; test/dsh-version.test.ts), so it always runs.
Bot files (botFiles Remote)
DSH's file features (file links, the Files sidebar, previews, @-files) read a session's directory with the Host's file system (workspaceFiles) at the session's cwd, /home/bot/workspace, which is no Host path. bot-core registers a read-only Host Remote, botFiles, that serves a bot session's files from the bot's environment instead; the bot file viewer (below) uses it; the browser face is src/client/files.ts. Its methods and semantics mirror @deepseek-ai/dsh-api-workspace-files (types in src/shared/files.ts):
| Method | Returns |
| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| stat(sessionId, path) | { absolutePath, version, bytes? } of a regular file |
| read(sessionId, path, { offset?, limit? }) | one page of UTF-8 lines, { …stat, offset, text, lines, eof } |
| readBytes(sessionId, path, { range?, baseFile? }) | a byte window or the complete file, { …stat, offset, base64, eof } |
| list(sessionId, path) | direct children of a workspace directory, { path, entries, truncated } ("" is the workspace) |
| search(sessionId, { query, excludedPaths?, includeHidden?, respectGitignore? }) | { matches, truncated, incomplete } by name or relative path |
Differences from workspaceFiles: the session is a plain sessionId; bytes come base64-encoded in base64 (bot-core's Remotes are JSON); there is no changes feed (the SSH file system cannot watch); failures are bot-file/… codes with the same suffixes and details (not-found, outside-workspace, too-large, not-text, not-regular-file, not-directory, search-failed) plus not-bot-session, unavailable and permission-denied, besides gateway/bad-request.
The wire contract. src/shared/remote-contract.ts declares every method of the bots, botFiles and botChannels Remotes: its wire arguments in order (and which may be omitted), whether it streams and whether it takes a trailing signal (ids @1outres/dsh-bot-core#<namespace>/<method>). Both faces are generated from it. On the Host, src/host/remote-contract.ts registers it with ctx.typert.register as strict definitions: DSH's Gateway dispatches an endpoint by its strict definition when one is registered, and only otherwise derives the arguments from the method's source text (Function.prototype.toString), where esbuild may rename a parameter that collides with a module-level name (options became options2, and readBytes refused the browser's options). test/remote-contract.test.ts checks the contract against the Host methods' declared parameters; test/remote-contract-bundle.test.ts builds src/index.ts with the options pnpm build uses, loads it, and checks that every @Remote method of the built Services is dispatched by a strict definition whose arguments are the browser's.
In the browser. typert registers a Remote package only once, so bot-core mounts its Host Remotes as one contribution: src/client/remote.ts declares each namespace's face and composes the descriptors from the contract (a new namespace joins the same contribution), and client/store.ts (mountBotCoreRemote) mounts it once when the client half applies. A failed mount is final and visible: it is logged with console.error and its cause, the Bots section says that bots could not start in this page, and the file viewer reports that the Remote could not be mounted (not bot-file/unavailable, which means the Host could not reach the bot's environment). The browser types every file failure (client/file-failure.ts): a Host refusal with a known bot-file/… or gateway/bad-request code, a connection failure (the call threw), a mount failure, or a protocol failure, worded apart from unavailable: the Gateway refused the call's shape (gateway/arguments-invalid, input-invalid, signature-invalid: the two faces' contracts disagree), an unknown code, a malformed refusal or result, or a rejection that is not a BotFileError. Each protocol failure is logged once with console.error, with the raw response.
- Who may read. Only a session bot-core recorded as a stored bot's (its Main,
createSession, an adopted fork; thesessionstable): anything else, a deleted bot's sessions included, is refused withbot-file/not-bot-sessionbefore any file system is touched. Known limit: a bot's subagent sessions are not recorded as the bot's (they are not navigable sessions), so their files are refused too; the parent session reads the same workspace. - Through the VM, never a Host path.
botFilesreads a bot's files through its environment only (with@1outres/dsh-bot-vmthey are on the bot's own workspace volume, which the Host never mounts): the bot creates whatever it likes there, symlinks included, and a link resolves inside the VM, where the Host's files are not. - Which file system. The one inside the bot's own composed preset, never the Host's. bot-core puts its own row
env-bot-core-files(@1outres/dsh-bot-core/files) into every bot's isolatedbot-environmentgroup, right after the environment's rows. While that preset revision is mounted — registered presets are mounted eagerly, so this holds for a cold session with no Agent — the row hands the group'sfsandsubprocessto thebotservice; it hands over a service only if it lives in a realm a group isolates (a row placed elsewhere hands over nothing). The row carries the revision's token: an HMAC, with a secret bot-core draws on every load, of the composition's digest without that row. bot-core serves only what the row of the currently registered revision handed over, so a retired revision still mounted for its Agents (or re-attaching when its row restarts) never wins, and other Host code cannot hand bot-core a file system for a bot (the attach method sits under a symbol, outside theBotcontract, and needs that token). Without the registered revision's row (the preset not registered, the environment not ready):bot-file/unavailable. Reads use that revision's SSH connection (the one its Agents use; a retired revision's Agents keep their own); nothing new is started. Templates and overlays cannot name the row (@1outres/dsh-bot-coreandenv-ids are refused there), and an environment's rows may not use its id or plugin either. Adding the row changes every bot preset's revision once, on upgrade. - Where.
listandsearchstay inside the environment's workspace (a link out of it isoutside-workspace).read,readBytesandstataccept any path the bot's own user can read in its VM, likeworkspaceFilesaccepts any path the session's file system reads, so a link in a transcript to/tmp/report.txtpreviews.files.confineReadsstays off by default: the only Host-backed directory in the VM is the shared workspace itself, so a read outside the workspace reaches the VM's own disk only (its system files and the bot's home; root-only files stay unreadable), which the bot reads with its own tools anyway. Turn it on to keep reads inside the workspace too. A final symlink is never read.listresolves a directory and then lists it in two requests, so a bot swapping it for a link in between can make it list a directory outside the workspace; that directory is inside the VM, so this reaches nothing of the Host's. - Search runs ripgrep inside the VM through the environment's
subprocess(rg --files, ignore rules unlessrespectGitignore: false, VCS metadata never), asworkspaceFilesdoes on the Host: one process listing instead of one SSH round trip per directory.files.search.ripgrepnames the executable:rg(default) is resolved by the environment (the base image installs Debian'sripgrep; DSH's packagedrgis also at the Host's path there), an absolute path is used as is. Without asubprocess, or when rg cannot run,bot-file/search-failed; there is no file-system walk fallback. A query and each of at most 256excludedPathsare at most 1024 characters. A caller's abort terminates rg. - Load. At most
files.maxConcurrentcalls per bot run at once; the others wait their turn (an abort while waiting rejects at once).
Caps (files config, refused rather than silently cut, except listings and searches, which say truncated / incomplete):
| Field | Default |
| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| files.maxBytes | 2097152 (one page or byte window; at most 32 MiB) |
| files.maxFileBytes | 8388608 (complete readBytes; at most 32 MiB, since dsh-fs-ssh sends bytes base64, 4/3 larger, in one dsh-ssh frame of at most 64 MiB; workspaceFiles defaults to 32 MiB, but here a file travels base64 over SSH and again in JSON) |
| files.maxLines | 5000 |
| files.maxEntries | 2000 |
| files.maxConcurrent | 4 (per bot) |
| files.confineReads | false |
| files.search.maxResults / maxEntries | 512 / 100000 |
| files.search.timeoutMs / graceMs / stderrMaxBytes | 30000 / 3000 / 65536 (timers at most 2147483647) |
| files.search.ripgrep | rg |
Deploying. The bot presets now name @1outres/dsh-bot-core/files (lib/files.js). After updating bot-core, run a full pnpm build (not only pnpm dev's watch, which may not have written the new entry yet) before DSH loads the new lib/index.js: a preset naming a missing lib/files.js fails to mount, so every bot preset would be unregistered until it is built.
Bot file viewer and right sidebar lockdown
On a bot session DSH's right sidebar (Files, Terminal, the guide, Browser…) cannot open, and everything that would open it there goes to bot-core's bot file viewer instead: a panel of the bot session shell between the chat and the menu bar.
- Opening it. The menu bar's Files button toggles it (
aria-pressed; closing it returns focus there). File links in the transcript, @-file chips, a deliverable card's body, skill file links and tool line refere
