Docs assistant

Searches these docs locally; a configured answer service can generate responses.

Ask about this page or the wider Carina docs. Try: “How do I roll back a patch?”

llms.txt

Skip to content

Markdown

Policy & capabilities

Capability types, permission profiles, command risk levels — policy before every side effect.

Every meaningful side effect is gated. The model decides; the Rust kernel authorizes.

  • The fourteen capability types
  • Built-in profiles (safe-edit, read-only, …)
  • Command risk levels 0–5
  • How approvals show up in the CLI/TUI

Carina’s edge is not “another coding chat.” It is policy before effect:

  1. Agent proposes an action
  2. Kernel returns allow / deny / require-approval
  3. Decision is audited; side effects reference that decision

Without this page, the rest of the product looks like a generic runner.

  1. Least privilege by default
  2. No access outside the workspace
  3. Secrets unreadable by default
  4. Network restricted by default
  5. Destructive commands denied by default
  6. All patches are transactional
  7. Plugins start with zero permissions
  • protocol/capabilities/
    • capabilities.json
    • profiles/ (TOML examples)
  • .carina/ (runtime)
    • sessions/ (profile recorded per session)
    • audit/
FileRead FileWrite CommandExec NetworkAccess SecretRead
GitOperation PatchApply ProcessSpawn PluginLoad RemoteExecute
MemoryWrite CodeIndex ContextCompress SubagentSpawn

A request carries: principal (agent / plugin / user), resource (path, command, host), session id, task id.
The kernel returns a PermissionDecision with the producing policy. Every decision is an audit event.

SubagentSpawnChild agents receive a strict subset of the parent profile — never more. uses resource form agent:NAME:profile:PROFILE and requires approval by default.

ProfileSummarySample config
read-onlyFileRead in workspace only; everything else deniedprotocol/capabilities/profiles/read-only.toml
safe-editFileRead; FileWrite only via PatchApply; CommandExec allowlist; network needs approval; secrets denied…/safe-edit.toml
full-workspaceR/W in workspace; commands up to level 3 with approval…/full-workspace.toml
ci-runnertest/build allowed; no arbitrary shell; secrets only when scoped…/ci-runner.toml
sandboxed · trusted-local · enterprise-restrictedNamed in capabilities.json for org/runtime bundlesNo shipped sample toml yet — treat as registry names until you add custom profiles

Profiles are session-scoped and stored in session metadata. Custom profiles are supported.

carina run creates a safe-edit session in the current directory unless you attach another way.

carina profile SESSION
LevelClassDefault under safe-edit
0read-onlyauto allow
1test / build / lintauto allow
2package installrequire approval
3file mutation commandsrequire approval
4network / deploy / credentialsdeny or explicit profile
5destructive (rm -rf, curl | sh, …)deny by default

Deleting many files · lockfile churn · dependency install · remote scripts · reading secrets · paths outside workspace · push/deploy · network · CI config changes.

  1. Pending decision

    TUI prompts, or use CLI:

    carina approve SESSION DECISION_ID [role]
    carina deny SESSION DECISION_ID [reason]
  2. Inspect afterward

    carina audit SESSION
    carina report SESSION
  • Agents cannot access paths outside allowed workspace paths
  • Symlinks are resolved before policy — they cannot escape the boundary
  • Oversized / ignored files stay out of model context by default
  1. Agents never read the environment directly
  2. Secrets go through a broker as opaque handles
  3. Logs never contain secret plaintext
  4. Command output is redacted against known secret values
carina secret grant SESSION NAME VALUE
carina secret request SESSION NAME
safe-edit

Default for carina run. Writes via PatchApply; network needs approval.

read-only

Explore without side effects — FileRead only.

SymptomMeaning
Constant approvalsRisk ≥ 2 or network — tighten the task or use a broader profile consciously
Deny on pathOutside workspace or symlink escape attempt
Plugin does nothingPlugins start at zero permissions — inspect with carina plugin inspect
  • docs/security-model.md
  • protocol/capabilities/capabilities.json
  • Kernel / profiles: crates/carina-policy
  • Related: Audit & rollback · Glossary

Was this page helpful?

One vote per page is recorded during this session.