agent-product Specification
Purpose
Owns the product-assembly kernel: the IProductProfile declarative product object, the
IAssembledProduct runtime-materials result, and the single composition function
assembleProduct. assembleProduct(profile) is a pure, deterministic, IO-free fold over
IProductProfile data with zero product-specific branching — the composition mechanism a
third party imports to build their own product on the published runtime. Product identity comes from
the host's profile. The root entry is platform-neutral: it runs in a browser, a Web Worker, Node, Deno and
Bun, and has no Node adapter; what needs a Node host is on the Node-only subpaths preset/node,
command/node, coding and personal.
The package also holds the pieces a product is assembled from, one subpath each: capability-pack,
preset, command, coding and personal. They live in one package to save a manifest, a build and a release
receipt each, and stay separate subpaths so that importing one never loads another.
The pure-fold property
This package is carved out of the "no shared product factory" rule not on "profile-driven" alone —
a profile-driven function could still accrete per-product branches and become a de-facto shared
factory — but on a stronger property: assembleProduct reads only its argument, calls only pure
sub-folds and the framework's runtime-construction seam, and returns assembled materials. That
boundary has three parts:
- Dependency-graph neutrality — declares no concrete transport/UI/CLI dependency.
- Purity / no I/O — no filesystem,
process.env, or settings read anywhere in the root entry; all resolved data is fed in from the shell that calls it. - No product-name conditionals — no branch on a profile's identity in any form (equality, switch, string-matching, or a lookup table keyed by identity). Reading the identity as data stays legal; branching on it does not.
Contract
- Runtime construction is delegated entirely to
agent-framework's runtime-construction seam — this package does not re-implement it, so there is exactly one runtime-construction source of truth. - Provider resolution order: an injected override wins, else a provider is constructed from
profile.providerSettingsviaagent-core's pure provider factory, else no provider is constructed and the caller must supply one when building the runtime. An unknown provider name throws, naming the supported types, rather than silently producing no provider; a managed provider without a qualified execution path cannot be silently replaced by another runtime provider. - Preset resolution uses an instance-scoped registry built over built-ins plus the profile's presets — unless the profile supplies its own registry, which wins outright. This lets a shell that must resolve a preset before it can even construct the profile (because the preset carries values the profile is built from) reuse that same registry here rather than maintaining two equivalent-but-separate ones.
- Capability-pack merge precedence is base command modules < accepted packs in profile order; duplicate pack ids are rejected atomically before folding. Accepted packs, rejected capabilities, and rejected packs are all reported losslessly rather than only the accepted set.
- Product wording and model-facing identifiers are plain data the fold passes through unmodified when the shell hasn't supplied its own — they are never interpreted or branched on, and two assembled products in one process keep separate values.
- Every field of
IProductProfileis exhaustively classified by a fold policy; adding a new profile field fails compilation until it is classified and behaviorally covered.
Boundaries
- Does not import a concrete transport, TUI, remote-control, or CLI — those stay wired in the shell and are injected into the profile as data.
- The root entry does not read settings, files, or env — the shell resolves those and passes in already-resolved data.
- Does not read provider settings, but does construct the provider from already-resolved config.
- Does not mutate any module-level preset registry global — it builds or adopts an instance-scoped registry only, so two calls never cross-contaminate.
- The subpaths are isolated: one reaches another only through a fixed set of entries (the root
reaches
capability-packandpreset,commandreachespreset,codingreachescapability-pack,commandandcommand/node;capability-packandpresetreach no other subpath), and no platform-neutral entry reaches a Node-only subpath orcoding. An in-package test pins both.
Error handling
assembleProduct throws no error classes of its own; preset resolution throws a plain Error on
an unknown preset id.
capability-pack
Purpose
Owns the additive capability-bundle contract for the Robota SDK: the ICapabilityPack
definition shape, the IMergedCapabilities result shape, and the pure mergeCapabilityPacks
merger. A capability pack is the additive composition unit — a plain data record of named
capability buckets (command modules, tools, subagents) a consumer brings on top of a product's
base command modules. It is the additive analog of the preset subpath: where a preset
dials behavior (subtractive tool/command selection, persona, permission posture), a pack
contributes capability (new tools, command modules, subagents). This package produces contract
types and one pure fold; it performs no session assembly and no IO.
Boundaries
- Does not assemble sessions, construct providers, resolve presets, or build runtimes — those
belong to
agent-framework(assembly/runtime seam) and the package root (the assembler that consumes this merger). - Does not read settings, files, or env — it is a contract + pure function package.
- Does not execute contributed code.
mergeCapabilityPacksfolds pack contributions purely; any contributed command/tool runs only through the existing permission-gated runtime at call time, never by the mere act of being merged. - Does not re-export
agent-frameworkoragent-core(no pass-through re-export). It depends on them for contract types only.
Model-facing / declarative-vs-executable note
A capability pack is not declarative JSON. Unlike a serialized manifest that a host can
enumerate without running contributor code, a pack carries executable code objects — command
modules with handlers, tool instances with execute functions, and subagent definitions. It is an
in-process composition argument handed to the assembler, not a serialized declaration, so
"no function across a serialization boundary" properties that would apply to a serialized manifest
do not apply here. The safety property instead rests on three invariants:
- Packs are opt-in — a pack contributes only when a product profile lists it; a pack never self-activates.
- The merge is pure —
mergeCapabilityPacksexecutes none of the contributed code; it only folds declarations into a superset. - Contributed code runs only through the permission-gated runtime at call time.
Merge semantics — conflict resolution
mergeCapabilityPacks is a pure, deterministic, IO-free fold — the additive analog of
resolvePreset.
- Precedence: base command modules claim the namespace first, then packs in profile order. First registration wins. A preset's enable/disable delta is applied after this merge by the product shell — the merge widens, the preset delta filters; they compose rather than conflict.
- Pack identity: pack ids are claimed before any capability bucket is folded. A later duplicate pack id is rejected atomically — reported once, contributes nothing across every bucket, and does not stop a following unique pack.
- Rejection channel: a capability whose id is already claimed (by the base or by an earlier pack) is dropped from the merged result and reported in a separate rejection channel with its contributing pack id, kind, id, and reason — never as a thrown exception.
- Purity: the merger reads only its arguments and returns fresh arrays; it mutates neither the base command modules nor any pack.
- Total field policy: every public pack field is classified (consumed, surfaced, consumed-and-surfaced, or explicitly rejected) so that adding a new field to the pack shape fails compilation until the fold classifies it.
Non-goals
- The subpath imports no other subpath and no repository package beyond
agent-core(tool contract) andagent-framework(command module / agent definition contracts), and neither is re-exported.
preset
Scope
Owns the preset contract for the Robota SDK: the preset definition shape, the resolved framework-option subset a preset resolves into, a small set of built-in presets, and an instance-scoped registry resolver. A preset is a named, pre-tuned bundle of framework option overrides (persona, model/effort, permission posture, command-module selection, execution capabilities, autonomy). This package produces option data only; it performs no session assembly.
It also owns the provider-neutral output-style catalog: built-in style definitions, Markdown style file parsing, and an instance-scoped registry with built-in-beats-external precedence.
The preset entry is platform-neutral: it runs in a browser, a Web Worker, Node, Deno and Bun. The one
host read, listing a directory of preset files, is on preset/node.
Boundaries
- Does not assemble sessions, synthesize system prompts, apply permission modes, or select
command modules — those belong to the framework's assembly, the execution-capability packages,
and the
commandsubpath respectively. - Does not parse CLI flags, read settings, or render active-preset UI.
- Does not re-export the framework package it depends on; it consumes the framework's option types as the single source of truth for the option shape rather than redefining them.
- Imports no other subpath and only one repository package,
agent-framework, for option types.
Preset resolution merges three layers by precedence (low to high): the preset's own options, then
CLI overrides, then explicit overrides. Later layers win; values left undefined are skipped. The
identity triple (id/title/description) is stripped before merging, so a preset with no overrides at
all resolves to the caller's overrides unchanged — a no-regression guarantee for the baseline
preset.
Contract
Command-module selection
A preset (or an override layer) may narrow the default command set with an allow-list and a deny-list of module names. The deny-list is applied after the allow-list, so deny always wins over allow. Both lists match against a module's canonical long-form name, not its short slash-command name. This package only produces these field values — the actual filtering happens downstream. A configured name that matches no known module is surfaced as a non-fatal notice to the caller rather than being silently dropped.
External preset loading
User-authored presets are loaded at runtime from a JSON file per preset, handed to the package as
named files by the product shell; preset/node lists a directory of them. The preset entry reads no file
on its own and does not choose the user's home, a product-specific storage root, or a default agent
name. Each file is parsed and validated with a manual type-guard (no schema
library); the untrusted effort field is validated through the framework's shared parser so external
presets accept the same effort vocabulary as built-ins. Loading applies a conflict policy and
returns the survivors as a value — it registers nothing globally, so a second load in the same
process does not see a previous load's presets, and two products sharing a process each see only
their own.
Conflict policy:
- Built-ins always win — an external preset whose id collides with a built-in is rejected, and built-in ids can never be overridden. A duplicate id among external presets is also rejected, keeping the first.
- Per-file isolation — a read, parse or validation failure is recorded against its file and that file is skipped; the rest still load. A missing directory yields an empty result, never an error.
The output-style registry applies the same shape of precedence for style files: built-in styles win on id collision, and a per-file parse or validation failure is isolated rather than aborting the whole load.
No defaultTrustLevel
The preset contract carries no defaultTrustLevel field. A preset already states its
trust/permission posture three ways (permission mode, default permission mode, and autonomy), and
resolution promotes the latter two into the first — a fourth spelling would be a second answer to a
question that already has one. The trust axis itself is a settings concern, not a preset field.
Built-in presets
The built-ins span the autonomy spectrum deliberately: a neutral baseline that applies no overrides at all (the no-op reference point), an opinionated proactive/self-verifying builder posture, a deliberate ask-first/plan-first counterpart for careful review work, and a thin literal-execution posture for predictable scripted use. Each shipped persona carries portable behavioural content only (e.g. proactivity, scope discipline, self-verification, non-sycophantic honesty) — none of them embed runtime/environment content such as working directory, tool schemas, product identity, dates, or permission text, since that is the assembling framework's responsibility to inject.
Error Taxonomy
Looking up an unknown preset id throws a plain Error naming the id and listing the available
ids. No custom error classes are defined for this package's single failure mode.
command
Purpose
The slash-command implementations of the configured SDK CLI, all on one subpath. Plugin commands consume an injected ICommandPluginAdapter; human
withdrawal controls remain reachable during active execution without activating new contributions,
while the CLI owns the concrete adapter and plugin source loader.
Non-goals / Boundaries
- Transport layer (WebSocket, TUI, headless) — owned by
agent-transport. - CLI entry point and argument parsing — owned by
agent-cli. - Agent runtime and session management — owned by
agent-core/agent-framework. - Command registration contracts (
ICommandModule,ICommandSource,ISystemCommand) — defined inagent-framework. - Plugin infrastructure (installer, loader, marketplace client) — defined in
agent-frameworkand composed byagent-cli. - The subpath imports only the
presetentry of this package and has no circular dependencies.
Contract and guarantees
Assembly (createDefaultCommandModules). Allow-then-deny module filtering is delegated to
agent-framework's selectCommandModules — the single filter implementation, never reimplemented
here. Any enabled/disabled module name that matched no built module (a short form, or a typo) is
returned as unknownModuleNames data rather than silently dropped, so the host can surface a
non-fatal notice instead of failing closed or pretending the name took effect. Skills discovery
consumes only the explicit contribution sources and ordered skill/command roots it is given; it never
selects product directories or reconstructs project reads from cwd.
Host commands (command/node). A command whose whole purpose is the host — /shell and /editor hand the
user's terminal to a child process — lives on @robota-sdk/agent-product/command/node, and so do the adapters
a command takes by injection. The command entry is platform-neutral (it runs in a browser, a Web Worker,
Node, Deno and Bun) and holds no host default: the
default assembly omits the commands whose whole purpose is the host, which a Node product adds beside
it, so a host that is not Node never lists a command it cannot run. A command that needs a host
capability for part of its work (/doctor its probes, /keybindings its editor, /git its process,
/user-local its file system) takes that capability as a port; without it the command is still listed and says it is unavailable
there, rather than failing or claiming work it did not do.
User-local commands. The direct command and the assembled slash command share the host-supplied storage root for inspection and memory operations; neither chooses a home directory itself when the host omits that root, and memory curation preserves the user's control across authenticated attached surfaces subject to host command policy, without granting the model destructive curation authority.
Demand-switch sessions. The agent and schedule command modules declare
sessionRequirements: ['runtime']: composing either module makes the session layer enable the
agent runtime. This is a demand switch, not a gate — it does not assume the runtime is available
beforehand.
output-style. Operator-only, and uses only the injected provider-neutral style registry; it
never reads style files itself.
/doctor (read-only diagnostics). Every check carries a stable id, a status in
ok | warn | fail | not-configured | not-probed, the exact path it concerns, and a cause built from
owner-reported facts — never a default value substituted for one that could not be determined. fail
is the only status that raises the report's exit code. not-configured names an absent optional
capability out loud instead of treating it as healthy. not-probed is a closed, enumerated list of
probes the doctor deliberately does not run; an unexpected inability to probe is warn with its
reason, not not-probed — that state must never read as a pass. Every rendered string passes through
one redaction boundary that masks known secret values, URL userinfo, bearer tokens, and vendor-key
shapes, fed by a single collector of literal and env-referenced credentials — inspection APIs
themselves return facts, never raw file content. Repair is a closed, product-neutral allowlist; a
repair is planned, confirmed through the caller's prompt, then re-planned immediately before
writing and refused if the id is unknown, the state is not repairable, the state changed since
planning, or the check is already clean — in every refusal case, nothing is written. The doctor
performs no write of its own outside an explicit, confirmed repair, and every probe and writer it runs
through is the host's (IDoctorDeps): on a host that supplies none, /doctor says it is unavailable
instead of reporting checks it never ran.
Report titles, product-readiness summaries, repair command text, and provider/trust remediation
are host-selected display vocabulary. Without host wording, diagnostics stay product-neutral. The
same report data and repair decisions are used by slash and shell routes.
/keybindings. The command knows nothing about the keybindings schema, defaults, contexts,
watcher, or TUI implementation — it only asks an injected capability port to ensure the user document
and an injected opener to show the returned path in the user's editor; without the opener it answers
that no editor can be opened here and creates no file. Key bindings belong to the terminal the user sits at, so that
terminal runs the command: one attached to a workspace daemon runs it in its own process, never on
the daemon, and does so even without the port, so a missing port cannot send it there. Without that
port the command still exists and answers that key bindings belong to the configured CLI terminal, so a host
without a terminal never replies "Unknown command".
/git (host-only, blocking). Every verb runs through an injected process port, absent on a host
that has none (then /git says it is unavailable), whose production implementation is argv-only (execFile, shell: false, so no token is ever parsed as shell syntax),
closes stdin immediately, caps output, bounds the child by a timeout, and never throws — every way a
run can end is a typed outcome (exited with the exit code as data, or failed with a closed set of
reasons). The child environment strips only the variables git exports into hooks that redirect it to
another repository, and deliberately preserves identity and configuration variables so a commit stays
attributed to the user. diff accepts a closed grammar only (bare, --staged, a single revision, or a
range, each optionally followed by paths); every revision is verified to exist before any diff runs,
and anything outside the grammar is refused rather than passed through. commit only ever commits the
already-staged set — never -a, never an implicit add — and always confirms the message and the
exact file list before writing; with no interactive surface available, that reads as a cancellation,
never a silent guess. Known limit: the slash-command tokenizer has no quoting, so a path containing a
space cannot be expressed, and the inline subject cannot carry a body; the timeout only bounds the
direct git child, not a hook's grandchildren still holding the output pipes open.
/mcp. Reads and requests approve/reject/revoke, sign-in and sign-out through an injected host
adapter; it never constructs or connects an MCP client itself, and only hands the tools a sign-in
connected to the session. Every change it makes widens or withdraws trust or a credential, so those
stay user-only; a client secret is never asked for in a session, since what is typed there becomes
part of the conversation. The model may read status only, and its view is rebuilt from fixed words —
a server name only when it is safe to show, the states, and the command the user should run — never
a definition's reason text, provenance, fingerprint or endpoint, because those are text a repository
wrote or can carry a credential.
/events. Lists and revokes the session's external-event grants through an injected host
adapter and never creates one. It is user-only as a whole: a grant is the owner's standing decision to
let someone outside put turns into the session, and withdrawing it is the owner's call too.
/peers activity. The command renders the host's fixed activity observation separately
from process liveness. An absent, expired, or unverified observation is shown as unknown; the command
does not inspect another session's conversation or infer activity from a stored transcript.
/effort. auto is preserved as the session's own selection rather than being resolved to and
persisted as a concrete tier — a report of the effective tier is derived for display, but the stored
selection stays auto.
/handoff. States what will not travel — uncommitted changes, running subprocesses, and the
provider credential, which is never transferred — before it asks, and a dismissed or absent
confirmation is treated as a decline, never a default yes. Every outcome states where the session now
lives.
/fork. A fork is a copy: work done in it never reaches the parent session and never merges back;
following it while running or continuing it later never merges the conversations. It runs in an
isolated worktree by default so filesystem work cannot collide with the parent's working directory;
that isolation must be explicitly
opted out of. A rejected fork write spawns no background job; a job-spawn failure after a successful
write still reports the written session record so it can be resumed by hand.
The resume command in that failure report is supplied by the host using the saved session id;
without one, the command gives neutral host-resume guidance.
/context tool-schema accounting. The tool-schema cost breakdown reads the offered tool set,
not the registered one: a tool that declares deferred loading and that the model has not yet loaded
is not sent with the request and is therefore not counted. The resulting number can fall as a direct,
observable consequence of deferral.
/context prompt. It reads the composition the session stores with its system prompt and cuts
the prompt by it, so a section is printed exactly as the model receives it and the sections printed in
order are the prompt. It is for the person reading the prompt, not the model: the model already holds
it, so the subcommand is not model-invocable. A prompt with no known composition, or a manifest that
does not add up to the prompt, is reported as unavailable rather than split by guesswork.
/loop (in-session repeat). A prompt-only invocation — self-paced or on an explicit interval —
starts unconfirmed: it is the operator's own instruction. Any form that instead falls back to the
host's default maintenance prompt — bare /loop, or an interval alone (/loop <N><s|m|h|d>, self-
paced or fixed cadence) — is gated the same way, because it is the same standing commitment (running
unattended for up to the loop's lifetime) whichever form reached it: an interactive invocation (an
ask port attached) asks the operator to confirm, naming the prompt's first line, how long it can run
unattended, and other active loops — never the internal "default prompt" wording, nor a raw
timestamp; a headless one (no ask port — a print-mode or scheduled run) is refused with
a plain message rather than starting unconfirmed, since a loop that can run for a week must not start
with nobody there to say yes; a model-invoked one is always refused outright, never silently asked or
blocked, so the model cannot start one on its own — only ever its own explicit prompt. In self-paced
mode the model chooses each delay, within a
bounded maximum, and a short reason, or stops the loop; a missing decision falls back once rather than
looping unbounded. The session record, not the disposable timer, owns resumption for either mode.
Fixed requested intervals are positive and bounded. Calendar-aligned steps only divide the
minute, hour, or day; a request between supported steps rounds up to the next one, and the rounded
step (not an exact elapsed-time figure) is what gets reported, because daylight-saving transitions
can make the actual elapsed gap shorter or longer than the nominal step. Repeated in-flight wakes
from the same loop coalesce in the bounded session queue rather than queuing a catch-up burst after
a gap. A loop's stable identity is separate from its editable display label and the underlying
scheduler's runtime task id, so renaming or a schedule restore cannot hide a loop from /loop list//loop stop or break the stop path. /loop stop <id> reaches the loop even while a turn is
running — that loop's own iteration or any other — without aborting it: an already-running iteration
finishes, and only the loop's future ones stop. A session allows a bounded number of active loops
(including paused ones); creation beyond it is refused. New loops carry an absolute expiry; an
expired loop is terminal and refuses to fire again even after a restore. Creation and stop are
strictly persisted before they report success; ordinary turn snapshots remain best-effort. A host
kill switch can block firing/re-arming while preserving paused records for a later restart, and
separately refuses new-loop creation while still allowing list/stop so existing loops stay
manageable. Autocomplete offers list and stop with list first, so selecting /loop cannot
start the host-default loop on the first Enter; directly submitting bare /loop still asks first
rather than creating one outright. Fixed loops carry a small stable per-loop offset to avoid
synchronized wake bursts; self-paced loops keep the model-selected delay without added jitter.
Omitted prompts use the host's live default at each iteration; an explicit schedule edit replaces
that default for the edited fixed loop.
orgPolicy in /provider. When an IOrgPolicy is supplied: a switch to a profile outside
allowedProviders is rejected before any settings write; a completed provider setup whose API key is
a plaintext value (not an $ENV: reference) is rejected when requireApiKeyFromEnv is set, before
the setup patch is built; and a configured adminContact is appended to every violation message.
Service connections delegate credential acquisition and resolution to the host; profile settings
hold only its opaque reference, and cancellation or failure before completed setup preserves the
previous profile. Ordinary editing preserves the credential; replacement requires an explicit
user connection action. Provider startup reads and writes only settings sources and
stores supplied by its host; it cannot select a user home or product settings path when those inputs
are absent.
/theme. Works through an injected theme-catalogue port. Themes belong to the terminal the user
sits at, so, as with /keybindings, an attached terminal runs it itself and writes the patch to its
own settings; without the port it still exists and answers that themes belong to the configured CLI terminal.
It emits at most one appearance-settings patch per invocation, and an unknown theme id writes
nothing, not even the toggles submitted alongside it.
Semantic command roles. Commands declare framework-owned semantic roles so model guidance follows the composed command's identity rather than a separately maintained name. Reading skill supporting bytes consumes the owning execution's existing activation; it cannot create consent or activate another skill.
Model invocation. Trust, credential and permission-widening actions are never model-invocable, and neither are exits or UI-only preferences: the model may suggest them, the user runs them. A command that mixes such actions with read-only views opens only the read-only subset to the model. Every model-invocable command carries a description written for the model — what it does, when to use it, what it returns — and when the model asks a command to start a process, that process is decided as a shell tool call would be — its PreToolUse hooks and guardrails, then its rules, the mode and the prompt — rather than by consent to the command's name, so being a command is never a way around a shell rule, and approving one monitored command never approves another. The sandbox's auto-approval never applies to it, because that process does not run inside the sandbox.
/remote-control, /devices, /unlock, /lock, /doctor, /context, and session command metadata. For these commands, the
palette entry is the single source of metadata, and the executable command is projected from it;
execution policy and lifecycle remain executable-command behavior. Projecting shared metadata never
by itself grants model invocation or changes execution policy or permission requirements.
/devices, which acts on the user's device identity, and /unlock and /lock, which open and drop
the keys of secure conversations in the host process, also refuse an invocation from a remote surface
(and exist only where the host gives them its key custody), and /remote-control refuses pairing and revoking from one and never shows it the pairing
link: a connected surface that could admit a device would let each device admit the next. Remote
control offers status and devices before pairing or revoking actions, so an autocomplete
selection defaults to a read-only operation.
Ask seam. A command that needs input (selection pickers, setup wizards, destructive-action
confirmation) asks for it inline at the top of execute via the host-supplied
context.getUserInteraction()?.ask(...). With no interactive renderer attached (headless/automation),
that accessor is undefined and the command takes its explicit no-human path rather than blocking or
guessing. The CLI does not hard-code command-specific dialog logic.
/loopnever wakes the agent before the requested interval has elapsed: a persisted first-fire boundary skips earlier clock-aligned slots, and the creation receipt names the earliest eligible instant. Because slots are calendar-aligned, daylight-saving changes can lengthen or shorten later gaps; the command does not promise an exact elapsed cadence.
Error taxonomy
The subpath defines no custom error classes. All command execution errors surface as ICommandResult
values with success: false and a human-readable message. The thrown conditions are the runtime
capability being unavailable when a command that requires it executes — a non-recoverable session
configuration error — and the exported provider-startup helpers, which throw the framework's
ProviderConfigError when no usable provider configuration can be established, and refuse to run
without host settings sources and stores or an authorized settings store.
The CLI-owned plugin adapter treats a marketplace manifest fetch failure as non-fatal and returns an empty list rather than failing the caller.
coding
Purpose
Robota's coding capability as a single ICapabilityPack — the proof that capabilities compose
additively, and the first capability pack. createCodingPack(options) bundles the default coding tools, coding
command modules, and coding subagents into one additive composition unit that assembleProduct can
compose on top of any product's base command modules — including when a product profile lets it own
the entire tool surface. It imports the real published tools/commands/subagents; it
re-implements none of them.
Non-goals
- Does not re-implement or fork any tool, command module, or subagent.
- The subpath is Node only: it bundles the host tools and the
command/nodecommands, so it mapsbrowser: null. - Does not assemble sessions, merge packs, or construct runtimes — that is the package root.
- Does not self-activate: a pack contributes only when a product profile lists it, and every contributed command/tool still runs only through the permission-gated runtime at call time.
- Is a neutral, reusable library of general coding capabilities usable by any consumer building a coding assistant — it carries no product-specific business logic or identity.
- Bundles only the capability-level coding command modules (
/shell,/editor,/git) — not the product-shell/settings/provider command infrastructure, which a product shell composes, not a coding capability pack.
Contract
- The factory passes the caller's tool options (
cwd,sandboxClient,editorFiles,shellExecutable,httpUserAgent) straight through to the default tool factory; it does not maintain a separate tool list, so pack composition adds, drops, or reorders no defaults relative to that source. - Tools that need an adapter, a credential or an external service (
CodebaseRetrieval,Computer) are absent: the default set it consumes holds none.
Design decisions
Session scoping — why a factory, not a constant
The pack is built by createCodingPack({ cwd, sandboxClient }). There is deliberately no
module-level codingPack constant, and that absence is a safety property, not an omission:
- A product may hand its whole tool surface to its packs (
defaultTools: []), so the pack's tools can be the only file tools a session has. Without either guard, a context-free pack in that position would expose file tools with no working-directory root. - The tool layer itself refuses a missing root; requiring
cwdhere is a second, assembly-time guarantee rather than the only one.
cwd is therefore required, so the scoping decision cannot be forgotten at a construction site —
callers pass the same value the session is assembled with. sandboxClient is optional: when present,
tools operate through the sandbox and the host path guard does not apply, because the sandbox is the
isolation boundary. Each call returns fresh instances bound to the supplied context, so two products
assembled in one process get independently-scoped file tools.
personal
Purpose
What a personal agent does, independent of how it is hosted: the capabilities a composition root lends a state directory and a live session: the knowledge wiki, the agent's maintained memory of the person it works for; the browser it acts on the web through; the goals it keeps working on while the person is away, with the feed it reports to; the cases it opens from what it notices and asks the person about; the ideas it keeps for later; the spaces the person organizes their life in; the channels the person reaches it through; and the connectors to the services they use.
Contract
Knowledge is kept as linked pages of claims, not as a transcript. Each claim names the conversation it came from and whether the person said it or the agent read it elsewhere. A changed fact retires the claim it replaces with an end time instead of overwriting it, so the wiki can say what held when. Recall marks every claim the agent read rather than heard as data, so an instruction inside one is never the person's, and stored text stays on one line so a claim cannot lay out what reads as another. Likely secrets are refused before anything is written. A forgotten claim is removed from every page that held it; a page it empties goes too, with every link and log entry that named it, since a page is named by its title. Only a content-free log line remains, so the fact is never recalled again. The store is a port: a host supplies one per principal, and the file store keeps plain Markdown a person can read and export without Robota.
The browser is a port too. The agent reads a page as text with numbered elements and acts by number; page text reaches the model as data from the site, never as instructions. A request that writes to a site (any method but GET, HEAD and OPTIONS) caused by the agent's own action is held and reported, and only a submission that names its method and address, which a person approves on every call, sends it; no permission mode, allow rule or classifier can send it on the agent's behalf, and the host sends exactly the request it held. A held navigation leaves the page where it was. A host may also offer a picture of the current page, so a person can watch what the agent's browser does; watching never opens a page.
A goal is the person's instruction with a schedule, kept in a store port beside the feed. Each run records what the agent did and what it only proposed, and ends with a report in the feed; whatever a run would ask a person becomes an approval in the feed, and the run waits for that answer rather than guessing it. A read-only goal can only look. The book is the record: after a host restarts, a goal it was running is due again, and an approval nobody can still answer is marked expired, never approved.
A case is the agent's own record of one matter it noticed: what it saw and noted, the one question it is waiting on, and what happened. An item that already has a case gets that case back, open or closed, never a second one, and a case no question was ever put on (an interrupted run opened it) is handed back as not yet asked, so the next run asks it instead of leaving it for good. The question shows in the feed as its own kind of item, never an approval, with the notes as its evidence; the person answers with one of the choices offered or, where the question allows it, in their own words, once, and the answer is recorded on the case and gives the agent one turn on it, which takes its direction from the answer alone. The turn is read-only by default; a host may separately offer an owner-scoped connector action that requires approval for each call. A question whose case closed first can no longer be answered, and a case closed after an answer shows its resolution on the card that carried that answer instead of posting anything new, so a close the person would want to know of is not left in the thread alone. A case touches only the agent's own record and the feed, so a read-only run and a run that reads untrusted content may keep one; the agent writes it from content other people wrote, so what it takes is bounded and a secret value is refused, judged by the value and not by the words a case is written in. A question carries only the urgency the agent suggests for it, and a suggestion decides nothing: which questions are also pushed to the person (on their channels, at a notification address they gave, on a page they have open, in a browser they subscribed while its page is closed) is decided by the person's own limits on what may reach them and when. A question the limits hold back waits for the one daily digest or stays in the feed, where every question is, so holding it back loses nothing, and a push counts only when something took it: a place that is not there, does not answer with success or is not being looked at takes nothing, and nothing is counted, retried or lost. The limits and the address are the person's words alone: no tool the agent can call, no text it reads and no urgency it suggests reaches them; the address may carry a token, so it is kept as a credential, shown only as its host, the destination of the person's own notifications and of nothing else, judged by the outbound-request policy when saved and again by each send, which is made once and never follows a redirect; limits that cannot be read are never replaced by others, so nothing is pushed until they are mended.
An idea is kept as the person's or as the agent's own suggestion, and a suggestion stays one: nothing acts on an idea until the person takes it up, and an idea taken up records what it became. A space carries the person's own instructions and the library pages they pinned to it, and a chat started in it opens with them as the person's first message rather than as instructions the agent gives itself; a pinned page the library no longer has drops out of the opening.
A channel is any messenger, plugged in as an adapter of one contract: the adapter declares what its platform can carry and reports each sender as the platform authenticated them, and everything it delivers is untrusted. Only the owner's verified sender ids on a channel get a turn or a reply. An approval goes out as a structured action where the platform has one and as a pointer to the feed where it does not, and only the owner's structured action answers it; text is never an approval.
A connector is a service the person connected once, reached through the adapter of one protocol that the host supplies. Its record holds no credential, and an address that could carry one is refused. How a service is signed in to is the person's choice: the service's own sign-in page (the default), a token the person pastes, or none at all. A token, and a client secret for a service that gives a client the person registered one, are typed at sign-in, held for that sign-in alone and kept only with the credential the host stores owner-only; no record, answer or log carries them, and a record names at most the header a token goes in, never one the connection itself uses. A catalog entry is a suggestion for the add form, accepted only if the connector it stands for could be created. It comes from the owner's file or from the public registry, where a remote is offered only when pasting one token can sign in to it (its address has no variable and it needs at most one secret header). Only the owner's file may name a client the owner registered with a service (never with its secret, which a person types at sign-in); a registry never supplies one. An entry's words are somebody else's: they are shown to the person and never reach the model. A connector may name a few plain-word options for the sign-in request (a service may need one to issue a sign-in that lasts), never a parameter the sign-in sets itself. The agent has three tools whatever is connected: one lists, one reads, one writes. A tool is read only when the person said so or the service declared it read-only; a declaration is the service's claim, so a tool that declares nothing is a write. Reading proceeds on its own, in read-only runs too. A write is held for the person in every mode and no allow rule answers it; the reading path refuses a tool that writes, and a tool the person blocked is never called. A host can require admission at the external handoff; a protocol without that guarantee refuses the action. What a service returns reaches the model as data from the service, never as instructions.
A connector is kept current by a goal tied to it, not by a scheduler or per-service code of its own. Its run reads what is new through the reading tool and files durable facts through one tool that always records the connector as their origin, by kind, and names it in their reference, so what a sync kept is told from what the person said and can be counted and forgotten together with the connection. A filed fact is only ever added: content read from a service never rewrites or retires what the person said. Connector-sourced facts are checked for secret values rather than refused for security vocabulary, so a password-reset event can be retained; other wiki writes keep the shared sensitive-content check. What deserves a question is the person's own to say: each connector carries attention words in plain text, a sensible default for its kind until the person writes their own, and the run reads them before it looks at the service and keeps a case, with one question, on what fits them. They decide only what is asked about, so they add no tool and no permission, and nothing the run reads can change them: only the person does, and a secret value written into them is refused, judged by the value and not by the words a policy is written in. Everything the run reads is content written by others, so the run is given only the tools to read, look in the library, file and keep a case, never a list of what is withheld that a tool added later would escape: it cannot write to the service, reach the web or files, drive the browser, or rewrite the library. Turning a sync off, or disconnecting, takes the access away first and then ends a run in progress rather than being refused by it. A run that is reachable, had no failed read, did something worth the read (it read, or it opened a case) and added nothing to the library stays in the goal's history and is posted neither to the feed nor to a channel, since a case it opened is already the message to the person and the person's limits decide whether that is pushed; a run that read nothing and opened nothing, or could not read, is posted, so a broken sync is never silent.
Non-goals
The browser does not hold reads. Opening a page, following a link or submitting a GET form sends whatever the URL carries, and whatever the agent types the page's own scripts can read; the tools tell the agent to keep the person's information out of URLs and never to type passwords or card numbers, and what may leave at all is an egress policy's decision, not the browser's. The host's address checks narrow what the browser can reach but do not stand in for a network boundary: a name can resolve differently for the browser than for the check.
Design decisions
Pages are ranked by the query terms their titles and current claims contain, not by embeddings: at a personal scale an index the model reads first is enough, and a ranking a person can follow is worth more than one they cannot. The wiki is maintained by the agent through tools rather than by a separate extraction pass, so what is filed is what the agent judged worth keeping in context, and every write goes through the permission gate like any other tool. The browser grounds actions on numbered elements rather than pixels: a number is something the model can name exactly, and it keeps the port implementable by any browser host.
A connector's tools are reached through three fixed tools rather than registered one by one: a service with dozens of tools adds nothing to the model's context until it is used, a connector added later needs no new session, and one place decides what a tool may do. Their arguments travel as JSON text because the schema a model is offered carries only what every provider can enforce, and a remote tool's own input is whatever its service declared.