-
-
Notifications
You must be signed in to change notification settings - Fork 41
Data Model
Plain Codable structs under scarf/scarf/scarf/Core/Models/. These are the in-memory representation of Hermes state — sessions, messages, config, cron jobs, MCP servers, project dashboards. None of them own I/O; services read from ~/.hermes/ (via transport) and decode into these types.
| Type | Conformances | Notable fields | Notes |
|---|---|---|---|
HermesSession |
Identifiable, Sendable |
id, source, userId, model, title, parentSessionId, startedAt, endedAt, endReason, messageCount, toolCallCount, inputTokens, outputTokens, cacheReadTokens, cacheWriteTokens, reasoningTokens, estimatedCostUSD, actualCostUSD, costStatus, billingProvider |
isSubagent = parentSessionId != nil; displayCostUSD prefers actualCostUSD; sourceIcon calls KnownPlatforms.icon(for:source). |
HermesMessage |
Identifiable, Sendable |
id, sessionId, role, content, toolCallId, timestamp, tokenCount, finishReason, toolCalls, toolName, reasoning |
isUser/isAssistant/isToolResult helpers; hasReasoning for v0.7+ reasoning support. |
HermesToolCall (nested in HermesMessage) |
custom Codable | callId, functionName, arguments |
toolKind categorizes to .read/.edit/.execute/.fetch/.browser/.other; argumentsSummary extracts command/path/query/url or truncates to 120 chars. |
| Type | Purpose |
|---|---|
ServerContext |
The unifying handle. Holds id, displayName, kind (.local or .ssh(SSHConfig)); exposes paths, makeTransport(), and high-level helpers (readText, writeText, runHermes, openInLocalEditor). The local static is the well-known UUID 00000000-0000-0000-0000-000000000001. |
SSHConfig (nested) |
host, user?, port?, identityFile?, remoteHome?, hermesBinaryHint? |
UserHomeCache (nested) |
Process-wide cache of remote $HOME per ServerID; probed once via ssh host echo $HOME, memoized. |
HermesPathSet |
All ~/.hermes/* paths as nonisolated computed properties. Parameterized by home and isRemote. Includes hermesBinaryCandidates (~/.local/bin/hermes, /opt/homebrew/bin/hermes, /usr/local/bin/hermes, ~/.hermes/bin/hermes) and a binaryHint override for remote. |
See Hermes Paths for the full path table.
HermesConfig parses config.yaml into a typed tree. About 100+ properties grouped into nested setting structs:
-
display,terminal,browser,voice,auxiliary,security,humanDelay,compression,checkpoints,logging,delegation - Per-platform:
discord, telegram, slack, matrix, mattermost, whatsapp, homeAssistant - Top-level scalars:
model, provider, maxTurns, personality, terminalBackend, memoryEnabled, …
HermesConfig.empty provides safe defaults for empty/missing files.
| Type | Purpose |
|---|---|
HermesCronJob |
Job definition with schedule, prompt, skills?, model?, enabled, state, deliver, nextRunAt?, lastRunAt?, lastError?, preRunScript?, deliveryFailures?, timeoutType?, timeoutSeconds?, silent?. Nested CronSchedule and CronJobsFile container. |
HermesMCPServer |
MCP server config: name, transport (.stdio/.http), command?, args, url?, auth?, env, headers, timeouts, enabled, toolsInclude/Exclude, resourcesEnabled, promptsEnabled, hasOAuthToken. |
MCPServerPreset |
Curated presets gallery (Filesystem, GitHub, Postgres, Slack, Linear, Sentry, Puppeteer, Memory, Fetch). |
HermesTool, HermesToolset, KnownPlatforms
|
Tool/toolset definitions and a switch for platform icons (cli, telegram, discord, slack, whatsapp, signal, email, homeassistant, webhook, matrix, feishu, mattermost, imessage). |
HermesSkill, HermesSkillCategory
|
Installed skills with id, name, category, path, files, requiredConfig. |
The dashboard schema lives in ProjectDashboard.swift:
-
ProjectRegistry→ProjectEntry(name, path) -
ProjectDashboard→DashboardSection→DashboardWidget(.stat / .progress / .text / .table / .chart / .list / .webview) -
WidgetValueenum with.stringor.numberfor stat boxes; custom Codable. -
ChartSeries,ChartDataPoint,ListItemfor non-scalar widgets.
The full schema is also documented in scarf/docs/DASHBOARD_SCHEMA.md in the main repo.
ACPMessages.swift defines the JSON-RPC envelopes (ACPRequest, ACPRawMessage, ACPError) and the typed events (ACPEvent.messageChunk / thoughtChunk / toolCallStart / toolCallUpdate / permissionRequest / promptComplete / availableCommands / connectionLost / unknown). See ACP Subprocess for the protocol details.
HermesConstants.swift holds query defaults — sessionLimit = 100, messageSearchLimit = 50, toolCallLimit = 50, previewContentLength = 100, logLineLimit = 200 — plus SQLite C macro replacements and file-size unit constants for display formatting.
Last updated: 2026-04-20 — Scarf v2.0.1
Wiki edited via the local .wiki-worktree/ clone. See Wiki Maintenance for the workflow. Last sync: 2026-04-20.
Getting Started
ScarfGo (iOS)
User Guide
- Dashboard
- Insights & Activity
- Chat
- Slash Commands
- Memory & Skills
- Projects & Profiles
- Project Templates
- Template Catalog
- Template Ideas
- Platforms / Personalities / Quick Commands
- Servers & Remote
- MCP, Plugins, Webhooks, Tools
- Gateway / Cron / Health / Logs
Architecture
- Overview
- Core Services
- Design System
- Data Model
- Transport Layer
- ScarfCore Package
- Sidebar & Navigation
- ACP Subprocess
Developer Guide
Reference
Troubleshooting
Contributing
Release History
Legal & Support
Unsorted