Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ef40def4f3 | |||
| b3980e3088 | |||
| 7c9b9461b9 | |||
| bc853ead04 | |||
| 314eab4355 | |||
| 5da174628c | |||
| bd8774ddb9 | |||
| d3b8971a39 | |||
| abdc031d5b | |||
| 59316ee08d | |||
| 01e2befc7e | |||
| 5f6c214772 | |||
| bb92164271 | |||
| 77bf8a6432 | |||
| fa51d9546e | |||
| bfe5823b82 | |||
| 215aaa7cbe | |||
| a14b821a0c | |||
| 65237021e3 | |||
| 9529ad5b1f | |||
| 8f13bef875 | |||
| cf8ce21451 | |||
| a98f79cabe | |||
| 3f4ee9fdca |
@@ -1,28 +0,0 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Report a bug in Scarf
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '...'
|
||||
3. See error
|
||||
|
||||
**Expected behavior**
|
||||
What you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots.
|
||||
|
||||
**Environment**
|
||||
- macOS version:
|
||||
- Xcode version:
|
||||
- Hermes version:
|
||||
- Scarf version/commit:
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Suggest an idea for Scarf
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem?**
|
||||
A clear description of the problem.
|
||||
|
||||
**Describe the solution you'd like**
|
||||
What you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
Other solutions you've thought about.
|
||||
|
||||
**Additional context**
|
||||
Any other context, screenshots, or mockups.
|
||||
@@ -1,45 +0,0 @@
|
||||
# Xcode
|
||||
build/
|
||||
DerivedData/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata/
|
||||
*.xccheckout
|
||||
*.moved-aside
|
||||
*.hmap
|
||||
*.ipa
|
||||
*.dSYM.zip
|
||||
*.dSYM
|
||||
|
||||
# Swift Package Manager
|
||||
.build/
|
||||
Packages/
|
||||
Package.pins
|
||||
Package.resolved
|
||||
*.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/
|
||||
.swiftpm/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
|
||||
# IDE
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
.idea/
|
||||
.vscode/
|
||||
|
||||
# Claude Code
|
||||
.claude/
|
||||
scarf/standards/backups/
|
||||
@@ -1,40 +0,0 @@
|
||||
# Scarf — macOS GUI for the Hermes AI Agent
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
scarf/scarf/ Xcode project root (PBXFileSystemSynchronizedRootGroup — auto-discovers files)
|
||||
scarf/ Main app target source
|
||||
Core/Services/ HermesDataService, HermesFileService, HermesLogService, ACPClient, HermesFileWatcher
|
||||
Core/Models/ Plain structs: HermesSession, HermesMessage, HermesConfig, etc.
|
||||
Features/ MVVM-F feature modules (Dashboard, Sessions, Activity, Chat, Memory, Skills, Cron, Logs, Settings)
|
||||
Navigation/ AppCoordinator, SidebarView
|
||||
docs/ PRD, Architecture, Discovery notes
|
||||
standards/ Copied development standards (read-only reference)
|
||||
```
|
||||
|
||||
## Architecture Rules
|
||||
|
||||
- **MVVM-F**: Features never import sibling features. Cross-feature goes through services.
|
||||
- **AppCoordinator**: Single `@Observable` coordinator for all navigation state, injected via `.environment()`.
|
||||
- **No external dependencies**: System SQLite3, Foundation JSON, AttributedString markdown.
|
||||
- **Read-only DB access**: Never write to `~/.hermes/state.db`. Only write to memory files and cron jobs.
|
||||
- **Sandbox disabled**: App reads `~/.hermes/` directly.
|
||||
- **Swift 6 concurrency**: `@MainActor` default. Services use `nonisolated` + async/await.
|
||||
|
||||
## Key Paths
|
||||
|
||||
- Hermes home: `~/.hermes/`
|
||||
- SQLite DB: `~/.hermes/state.db` (WAL mode, read-only)
|
||||
- Config: `~/.hermes/config.yaml`
|
||||
- Memory: `~/.hermes/memories/MEMORY.md`, `~/.hermes/memories/USER.md`
|
||||
- Sessions: `~/.hermes/sessions/session_*.json`
|
||||
- Cron: `~/.hermes/cron/jobs.json`
|
||||
- Logs: `~/.hermes/logs/errors.log`, `~/.hermes/logs/gateway.log`
|
||||
- ACP: `hermes acp` subprocess (stdio JSON-RPC)
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
xcodebuild -project scarf/scarf.xcodeproj -scheme scarf -configuration Debug build
|
||||
```
|
||||
@@ -1,49 +0,0 @@
|
||||
# Contributing to Scarf
|
||||
|
||||
Thanks for your interest in contributing to Scarf.
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Fork and clone the repo
|
||||
2. Open `scarf/scarf.xcodeproj` in Xcode 26.3+
|
||||
3. Build and run (requires macOS 26.2+ and Hermes installed at `~/.hermes/`)
|
||||
|
||||
## Architecture
|
||||
|
||||
Scarf uses the MVVM-Feature pattern. Each feature is a self-contained module under `Features/`:
|
||||
|
||||
```
|
||||
Features/FeatureName/
|
||||
Views/ SwiftUI views
|
||||
ViewModels/ @Observable view models
|
||||
```
|
||||
|
||||
Rules:
|
||||
- Features never import sibling features directly
|
||||
- Cross-feature navigation goes through `AppCoordinator`
|
||||
- Services in `Core/Services/` are shared across features
|
||||
- Models in `Core/Models/` are plain structs
|
||||
|
||||
## Guidelines
|
||||
|
||||
- Keep it simple. Minimal dependencies, no over-engineering.
|
||||
- No commented-out code, TODOs, or deferred functionality in PRs.
|
||||
- All code must build with zero warnings.
|
||||
- Follow existing patterns — look at how similar features are built before adding new ones.
|
||||
- The app only reads from `~/.hermes/state.db` (never writes). Memory files are the exception.
|
||||
- Swift 6 strict concurrency: `@MainActor` default isolation, `nonisolated` for service methods.
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
Open an issue with:
|
||||
- What you expected to happen
|
||||
- What actually happened
|
||||
- macOS version and Hermes version
|
||||
- Steps to reproduce
|
||||
|
||||
## Pull Requests
|
||||
|
||||
- Open an issue first to discuss the change
|
||||
- One feature or fix per PR
|
||||
- Include a clear description of what changed and why
|
||||
- Ensure the project builds with `xcodebuild -project scarf/scarf.xcodeproj -scheme scarf build`
|
||||
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 Alan Wizemann
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,116 +0,0 @@
|
||||
<p align="center">
|
||||
<img src="icon.png" width="128" height="128" alt="Scarf app icon">
|
||||
</p>
|
||||
|
||||
<h1 align="center">Scarf</h1>
|
||||
|
||||
<p align="center">
|
||||
A native macOS companion app for the <a href="https://github.com/hermes-ai/hermes-agent">Hermes AI agent</a>.<br>
|
||||
Full visibility into what Hermes is doing, when, and what it creates.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/macOS-26.2+-blue" alt="macOS">
|
||||
<img src="https://img.shields.io/badge/Swift-6-orange" alt="Swift">
|
||||
<img src="https://img.shields.io/badge/license-MIT-green" alt="License">
|
||||
</p>
|
||||
|
||||
## Features
|
||||
|
||||
- **Dashboard** — System health, token usage, cost tracking, recent sessions at a glance
|
||||
- **Sessions Browser** — Full conversation history with message rendering, tool call inspection, and full-text search (FTS5)
|
||||
- **Activity Feed** — Recent tool execution log with filtering by kind (read/edit/execute/fetch/browser) and detail inspector
|
||||
- **Live Chat** — Embedded terminal running `hermes chat` with full ANSI color and Rich formatting via [SwiftTerm](https://github.com/migueldeicaza/SwiftTerm)
|
||||
- **Memory Viewer/Editor** — View and edit Hermes's MEMORY.md and USER.md with live refresh
|
||||
- **Skills Browser** — Browse all installed skills by category with file content viewer
|
||||
- **Cron Manager** — View scheduled jobs, their status, prompts, and output
|
||||
- **Log Viewer** — Real-time tailing of error and gateway logs with level filtering
|
||||
- **Settings** — Read-only config display with raw YAML viewer and Finder path links
|
||||
- **Menu Bar** — Status icon showing Hermes running state with quick actions
|
||||
|
||||
## Requirements
|
||||
|
||||
- macOS 26.2+
|
||||
- Xcode 26.3+
|
||||
- [Hermes agent](https://github.com/hermes-ai/hermes-agent) installed at `~/.hermes/`
|
||||
|
||||
## Building
|
||||
|
||||
```bash
|
||||
git clone https://github.com/awizemann/scarf.git
|
||||
cd scarf/scarf
|
||||
open scarf.xcodeproj
|
||||
```
|
||||
|
||||
Or from the command line:
|
||||
|
||||
```bash
|
||||
xcodebuild -project scarf/scarf.xcodeproj -scheme scarf -configuration Debug build
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
Scarf follows the **MVVM-Feature** pattern with zero external dependencies beyond SwiftTerm:
|
||||
|
||||
```
|
||||
scarf/
|
||||
Core/
|
||||
Models/ Plain data structs (HermesSession, HermesMessage, HermesConfig, etc.)
|
||||
Services/ Data access (SQLite reader, file I/O, log tailing, file watcher)
|
||||
Features/ Self-contained feature modules
|
||||
Dashboard/ System overview and stats
|
||||
Sessions/ Conversation browser with detail view
|
||||
Activity/ Tool execution feed with inspector
|
||||
Chat/ Embedded terminal via SwiftTerm
|
||||
Memory/ Memory viewer and editor
|
||||
Skills/ Skill browser by category
|
||||
Cron/ Scheduled job viewer
|
||||
Logs/ Real-time log viewer
|
||||
Settings/ Configuration display
|
||||
Navigation/ AppCoordinator + SidebarView
|
||||
```
|
||||
|
||||
### Data Sources
|
||||
|
||||
Scarf reads Hermes data directly from `~/.hermes/`:
|
||||
|
||||
| Source | Format | Access |
|
||||
|--------|--------|--------|
|
||||
| `state.db` | SQLite (WAL mode) | Read-only |
|
||||
| `config.yaml` | YAML | Read-only |
|
||||
| `memories/*.md` | Markdown | Read/Write |
|
||||
| `cron/jobs.json` | JSON | Read-only |
|
||||
| `logs/*.log` | Text | Read-only |
|
||||
| `gateway_state.json` | JSON | Read-only |
|
||||
| `skills/` | Directory tree | Read-only |
|
||||
| `hermes chat` | Terminal subprocess | Interactive |
|
||||
|
||||
The app **never writes** to `state.db` — it opens in read-only mode to avoid WAL contention with Hermes.
|
||||
|
||||
### Dependencies
|
||||
|
||||
| Package | Purpose |
|
||||
|---------|---------|
|
||||
| [SwiftTerm](https://github.com/migueldeicaza/SwiftTerm) | Terminal emulator for the Chat feature |
|
||||
|
||||
Everything else uses system frameworks: SQLite3 C API, Foundation JSON, AttributedString markdown, GCD file watching.
|
||||
|
||||
## How It Works
|
||||
|
||||
Scarf is a passive observer. It watches `~/.hermes/` for file changes and polls the SQLite database for new sessions and messages. The Chat tab spawns `hermes chat` as a subprocess in a pseudo-terminal, giving you the full interactive Hermes CLI experience with proper ANSI rendering.
|
||||
|
||||
The app sandbox is disabled because Scarf needs direct access to `~/.hermes/` and the ability to spawn the Hermes binary.
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome. Please open an issue to discuss what you'd like to change before submitting a PR.
|
||||
|
||||
1. Fork the repo
|
||||
2. Create your feature branch (`git checkout -b feature/my-feature`)
|
||||
3. Commit your changes (`git commit -m 'Add my feature'`)
|
||||
4. Push to the branch (`git push origin feature/my-feature`)
|
||||
5. Open a Pull Request
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
@@ -0,0 +1,106 @@
|
||||
// Scarf landing page — minimal client behavior.
|
||||
// No dependencies. Runs after defer-parse.
|
||||
|
||||
(function () {
|
||||
const root = document.documentElement;
|
||||
const STORAGE_KEY = 'scarf-theme';
|
||||
|
||||
function applyTheme(theme) {
|
||||
if (theme === 'light' || theme === 'dark') {
|
||||
root.setAttribute('data-theme', theme);
|
||||
} else {
|
||||
root.removeAttribute('data-theme');
|
||||
}
|
||||
applyImageTheme();
|
||||
}
|
||||
|
||||
// Resolve the *effective* theme — explicit data-theme wins, otherwise
|
||||
// fall back to the OS preference.
|
||||
function resolveTheme() {
|
||||
const explicit = root.getAttribute('data-theme');
|
||||
if (explicit === 'light' || explicit === 'dark') return explicit;
|
||||
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||
}
|
||||
|
||||
// Swap every <img data-dark-src="..."> between its light and dark variants.
|
||||
// Also rewrites the parent <picture>'s <source srcset> so the picture
|
||||
// algorithm doesn't override us on resize/layout passes.
|
||||
function applyImageTheme() {
|
||||
const theme = resolveTheme();
|
||||
document.querySelectorAll('img[data-dark-src]').forEach((img) => {
|
||||
if (!img.dataset.lightSrc) {
|
||||
img.dataset.lightSrc = img.getAttribute('src');
|
||||
}
|
||||
const target = theme === 'dark' ? img.dataset.darkSrc : img.dataset.lightSrc;
|
||||
if (img.getAttribute('src') !== target) img.setAttribute('src', target);
|
||||
const picture = img.parentElement;
|
||||
if (picture && picture.tagName === 'PICTURE') {
|
||||
picture.querySelectorAll('source').forEach((s) => {
|
||||
if (s.getAttribute('srcset') !== target) s.setAttribute('srcset', target);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Hydrate stored preference (if any) — runs after DOMContentLoaded since
|
||||
// the <script> is deferred. There's a brief moment of media-query default
|
||||
// before hydrate; that's acceptable here (no FOUC because the media query
|
||||
// already gets the right colors and the first images render at light by
|
||||
// default — JS swaps within a frame on dark-mode systems).
|
||||
let stored = null;
|
||||
try {
|
||||
stored = localStorage.getItem(STORAGE_KEY);
|
||||
if (stored === 'light' || stored === 'dark') applyTheme(stored);
|
||||
else applyImageTheme(); // initial pass even if no stored preference
|
||||
} catch (_) {
|
||||
applyImageTheme();
|
||||
}
|
||||
|
||||
const toggle = document.querySelector('[data-theme-toggle]');
|
||||
if (toggle) {
|
||||
toggle.addEventListener('click', () => {
|
||||
const current = root.getAttribute('data-theme');
|
||||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
let next;
|
||||
if (current === 'light') next = 'dark';
|
||||
else if (current === 'dark') next = null;
|
||||
else next = prefersDark ? 'light' : 'dark';
|
||||
|
||||
applyTheme(next);
|
||||
try {
|
||||
if (next) localStorage.setItem(STORAGE_KEY, next);
|
||||
else localStorage.removeItem(STORAGE_KEY);
|
||||
} catch (_) { /* ignore */ }
|
||||
});
|
||||
}
|
||||
|
||||
// Re-apply on system preference change so users who haven't set an
|
||||
// explicit override still get matching screenshots.
|
||||
if (window.matchMedia) {
|
||||
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
||||
const onChange = () => {
|
||||
if (!root.hasAttribute('data-theme')) applyImageTheme();
|
||||
};
|
||||
if (mql.addEventListener) mql.addEventListener('change', onChange);
|
||||
else if (mql.addListener) mql.addListener(onChange);
|
||||
}
|
||||
|
||||
// Auto-collapse sticky header on scroll-down, restore on scroll-up.
|
||||
const header = document.querySelector('.site-header');
|
||||
if (header) {
|
||||
let lastY = window.scrollY;
|
||||
let ticking = false;
|
||||
window.addEventListener('scroll', () => {
|
||||
if (ticking) return;
|
||||
window.requestAnimationFrame(() => {
|
||||
const y = window.scrollY;
|
||||
if (y > 80 && y > lastY) header.style.transform = 'translateY(-100%)';
|
||||
else header.style.transform = '';
|
||||
lastY = y;
|
||||
ticking = false;
|
||||
});
|
||||
ticking = true;
|
||||
}, { passive: true });
|
||||
header.style.transition = 'transform 0.25s ease';
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,785 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
|
||||
<channel>
|
||||
<title>Scarf Updates</title>
|
||||
<link>https://awizemann.github.io/scarf/appcast.xml</link>
|
||||
<description>Scarf macOS app updates</description>
|
||||
<language>en</language>
|
||||
<item>
|
||||
<title>Version 2.8.0</title>
|
||||
<sparkle:version>35</sparkle:version>
|
||||
<sparkle:shortVersionString>2.8.0</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Sat, 09 May 2026 19:02:51 +0000</pubDate>
|
||||
<description><![CDATA[
|
||||
<!DOCTYPE html><html><head><meta charset="utf-8"><style>body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
color: #1d1d1f;
|
||||
margin: 0;
|
||||
padding: 0 4px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 17px;
|
||||
margin: 16px 0 6px 0;
|
||||
border-bottom: 1px solid #e5e5e7;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
h3 {
|
||||
font-size: 14px;
|
||||
margin: 14px 0 4px 0;
|
||||
color: #424245;
|
||||
}
|
||||
h4 {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 2px 0;
|
||||
}
|
||||
p { margin: 6px 0; }
|
||||
ul { margin: 6px 0; padding-left: 20px; }
|
||||
li { margin: 3px 0; }
|
||||
code {
|
||||
background: #f5f5f7;
|
||||
border-radius: 3px;
|
||||
padding: 1px 4px;
|
||||
font-family: "SF Mono", Menlo, Consolas, monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
pre {
|
||||
background: #f5f5f7;
|
||||
border-radius: 5px;
|
||||
padding: 8px 10px;
|
||||
overflow-x: auto;
|
||||
font-size: 12px;
|
||||
}
|
||||
pre code { background: transparent; padding: 0; }
|
||||
a { color: #0066cc; text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
hr {
|
||||
border: none;
|
||||
border-top: 1px solid #e5e5e7;
|
||||
margin: 16px 0;
|
||||
}
|
||||
strong { color: #1d1d1f; }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body { color: #f5f5f7; background: #1c1c1e; }
|
||||
h2 { border-bottom-color: #38383a; }
|
||||
h3 { color: #c7c7cc; }
|
||||
code, pre { background: #2c2c2e; }
|
||||
hr { border-top-color: #38383a; }
|
||||
a { color: #4499ff; }
|
||||
strong { color: #f5f5f7; }
|
||||
}
|
||||
</style></head><body>
|
||||
<h2>What's in 2.8.0</h2>
|
||||
<p>A coordinated catch-up release adopting Hermes v0.13.0 (v2026.5.7) — "The Tenacity Release" — across Scarf's full surface area. v2.8.0 ships <strong>Persistent Goals</strong>, <strong>ACP <code>/queue</code></strong>, <strong>Kanban diagnostics + recovery UX</strong>, <strong>Curator archive/prune</strong>, <strong>Google Chat (20th platform) + cross-platform allowlists</strong>, a refreshed <strong>provider catalog</strong> with five new models, and a slate of settings + UX polish — all behind capability flags so pre-v0.13 hosts continue to render the v2.7.5 surface unchanged.</p>
|
||||
<p>No data migrations, no schema changes. <code>~/.hermes/state.db</code> columns are unchanged from v0.11/v0.12. Existing <code>~/.hermes/scarf/</code> sidecars are untouched. Sparkle picks the update up automatically.</p>
|
||||
<h3>New features</h3>
|
||||
<h4>Persistent Goals + ACP <code>/queue</code> (chat)</h4>
|
||||
<ul>
|
||||
<li><strong><code>/goal <text></code> slash command</strong> — locks the agent on a target that persists across turns. Surfaced via the chat slash menu (gated on <code>HermesCapabilities.hasGoals</code>) and rendered as an <code>info</code>-tinted "Goal locked: …" pill in the chat header. The pill exposes a "Clear goal" context-menu item that dispatches <code>/goal --clear</code>. Optimistic local mirror — Hermes is the authoritative owner; Scarf paints the pill the moment the user sends <code>/goal …</code> so the affordance feels instant.</li>
|
||||
<li><strong><code>/queue <text></code> slash command</strong> — queues a prompt to run after the current turn completes. Joins <code>/steer</code> and <code>/goal</code> in <code>RichChatViewModel.nonInterruptiveCommands</code> (the chat keeps "Agent working…" off when sent). A header chip shows the queued count; tap opens a popover listing prompts + relative timestamps. Per-entry deletion isn't exposed (Hermes has no remove-by-id verb), and the popover header makes that explicit so users understand the local mirror's role.</li>
|
||||
<li><strong><code>/steer</code> on idle</strong> — pre-v0.13 was a no-op when no turn was in flight; v0.13 runs it as a regular prompt. The composer's slash button now greys <code>/steer</code> only on pre-v0.13 hosts (gated on <code>hasACPSteerOnIdle</code>).</li>
|
||||
<li><strong>Static slash-menu fallbacks</strong> — pre-session, the menu surfaces <code>/new</code> (with optional <code>[<name>]</code> argument hint on v0.13). Active-session-only fallbacks (<code>/clear</code>, <code>/compact</code>, <code>/cost</code>, <code>/model</code>, <code>/tools</code>, <code>/reload-skills</code>, <code>/help</code>, <code>/exit</code>) round out resumed sessions where Hermes ACP doesn't re-emit <code>available_commands_update</code> after <code>session/load</code>. Deduped against the ACP-advertised set so the canonical entry always wins once a session opens.</li>
|
||||
</ul>
|
||||
<h4>Kanban v0.13 diagnostics + recovery UX</h4>
|
||||
<ul>
|
||||
<li><strong>Hallucination-gate verify / reject</strong> — worker-created cards land with <code>hallucination_gate_status: pending</code>. The inspector renders a yellow banner ("Created by a worker — verify before running") with a Verify and Reject button. Cards in pending state dim 0.6 with a yellow ⚠ glyph in the title row.</li>
|
||||
<li><strong>Diagnostics rendering</strong> — new typed-mirror enum <code>KanbanDiagnosticKind</code> with severity (info / warning / critical). Per-task and per-run diagnostics surface in the inspector Runs tab as chip-lists; auto-block reasons render verbatim in the existing red banner. Darwin zombie detections show as a distinct <code>darwin_zombie_detected</code> kind.</li>
|
||||
<li><strong>Per-task <code>max_retries</code></strong> — added to the create sheet (default 3) and shown as a header chip in the inspector. Write-once at create time, matching Hermes's pattern.</li>
|
||||
<li><strong>Multiline title/body</strong> — the create sheet's Title field accepts multiline input, capped to four visible rows.</li>
|
||||
<li><strong>Tolerant decoding</strong> — every new field uses <code>decodeIfPresent</code>. Pre-v0.13 JSON parses cleanly with the new fields defaulting to nil, and the v2.7.5 board surface is unchanged on older hosts.</li>
|
||||
</ul>
|
||||
<h4>Curator archive + prune</h4>
|
||||
<ul>
|
||||
<li><strong>Archived skills section</strong> in <code>CuratorView</code> showing <code>hermes curator list-archived</code> output. Each row exposes Restore (returns to the active leaderboard) and Prune (destructive — opens a custom confirm sheet matching the template-uninstall pattern, with <code>ScarfDestructiveButton</code> "Prune permanently" and Cancel as the default keyboard action).</li>
|
||||
<li><strong>Bulk prune</strong> — a header action (gated on archived list non-empty) that enumerates every archived skill in the confirm sheet before a single-tap destructive action. Per-skill prune buttons are present per row when Hermes supports <code>prune <name></code>; otherwise only the bulk action is exposed.</li>
|
||||
<li><strong>Synchronous "Run Now"</strong> — v0.13 <code>hermes curator run</code> blocks until done. The Run Now button shows a progress affordance for the duration; pre-v0.13 falls back to fire-and-forget.</li>
|
||||
<li><strong>New <code>CuratorService</code> actor</strong> in ScarfCore (<a href="scarf/Packages/ScarfCore/Sources/ScarfCore/Services/CuratorService.swift">scarf/Packages/ScarfCore/Sources/ScarfCore/Services/CuratorService.swift</a>) — pure-I/O Sendable actor mirroring <code>KanbanService</code>'s shape, with defensive <code>--json</code> retry-without-flag fallback for verbs that may not support it on all v0.13 patch releases.</li>
|
||||
<li>The legacy <code>CuratorRestoreSheet</code> flow (SAFE-list-restore for v0.12) is preserved; it predates the v0.13 archive surface and serves a distinct case.</li>
|
||||
</ul>
|
||||
<h4>Messaging Gateway expansion</h4>
|
||||
<ul>
|
||||
<li><strong>Google Chat</strong> — 20th platform. New entry in the Mac Platforms tab, gated on <code>HermesCapabilities.hasGoogleChatPlatform</code>.</li>
|
||||
<li><strong>Cross-platform allowlists</strong> — per-platform editor for <code>allowed_channels</code> (Slack / Mattermost / Google Chat), <code>allowed_chats</code> (Telegram / WhatsApp), and <code>allowed_rooms</code> (Matrix / DingTalk). New <code>AllowlistEditor</code> component plus the <code>GatewayAllowlistKind</code> / <code>GatewayPlatformSettings</code> ScarfCore types. Persisted to <code>~/.hermes/config.yaml</code> via a new <code>GatewayConfigWriter</code> since <code>hermes config set</code> doesn't write list blocks.</li>
|
||||
<li><strong>Per-platform behavior toggles</strong> — <code>busy_ack_enabled</code> (suppress per-message "agent is working…" acks), <code>gateway_restart_notification</code> (post a "Gateway restarted" notice on boot), and a slash-command auto-delete TTL (seconds, 0 to disable). Each appears in the new <code>GatewayBehaviorSection</code> component.</li>
|
||||
<li><strong><code>hermes gateway list</code> cross-profile digest</strong> — inline status row in <code>MessagingGatewayView</code> showing which profile is running which platform across all profiles. New <code>HermesGatewayListService</code> actor parses <code>hermes gateway list --json</code>. Hidden when the verb fails (pre-v0.13 hosts) or no profiles are registered.</li>
|
||||
<li><strong><code>MessagingGatewayViewModel</code></strong> — internal rename from <code>GatewayViewModel</code> to disambiguate from the v0.10 Tool Gateway feature. The user-facing label was already "Messaging Gateway" since v0.10.</li>
|
||||
<li><strong><code>[[as_document]]</code> hint</strong> — informational tooltip in skill detail surfaces explaining the new media-routing directive for skills that reference it.</li>
|
||||
</ul>
|
||||
<h4>Provider catalog refresh</h4>
|
||||
<ul>
|
||||
<li><strong>Five new models</strong> — <code>deepseek/deepseek-v4-pro</code>, <code>x-ai/grok-4.3</code>, <code>openrouter/owl-alpha</code> (free tier), <code>tencent/hy3-preview</code>, and <code>arcee/trinity-large-thinking</code> (with temperature + compression overrides). Surfaced through <code>models_dev_cache.json</code>; no manual entries required.</li>
|
||||
<li><strong>Grok rename</strong> — <code>x-ai/grok-4.20-beta</code> → <code>x-ai/grok-4.20</code>. Implemented via read-time alias resolution in <code>ModelCatalogService.modelAliases</code> so existing user configs with the <code>-beta</code> suffix keep validating without YAML rewrites. Three composite-keyed aliases cover the openrouter / xai / vercel routes.</li>
|
||||
<li><strong>Vercel AI Gateway demoted</strong> — sort comparator change in <code>loadProviders()</code> puts Vercel last, after the alphabetical group.</li>
|
||||
<li><strong><code>image_gen.model</code> honored</strong> — pre-v0.13 the key was advertised but ignored; v0.13 actually drives the image-generation path. Surfaced in <code>Settings → Auxiliary</code> with a curated picker (<code>OpenAI gpt-image-1</code>, <code>Imagen 3/4</code>, <code>Stable Image Ultra</code>, <code>FLUX 1.1 Pro</code>, <code>DALL·E 3</code>); free-form entry is also accepted. Gated on <code>hasImageGenModel</code>.</li>
|
||||
<li><strong>OpenRouter response caching</strong> — toggle in <code>Settings → Auxiliary</code> writing <code>openrouter.response_cache.enabled</code> to <code>config.yaml</code>. Off by default in Scarf's parser. Gated on <code>hasOpenRouterResponseCache</code>.</li>
|
||||
</ul>
|
||||
<h4>Settings tab additions</h4>
|
||||
<ul>
|
||||
<li><strong>MCP SSE transport</strong> — MCP add-server flow gains a Transport picker (<code>stdio</code> / <code>http</code> / <code>sse</code>) with <code>sse_read_timeout</code> field for SSE servers. The YAML round-trip preserves OAuth + headers identically to the existing <code>.http</code> shape. Gated on <code>hasMCPSSETransport</code>.</li>
|
||||
<li><strong>Cron <code>--no-agent</code> watchdog mode</strong> — toggle in the Cron edit sheet that maps to <code>hermes cron create/update --no-agent</code>. When ON, the prompt + context fields hide (the AI call is skipped). Defensive write-path strips the flag on pre-v0.13 hosts mirroring the <code>--workdir</code> pattern. New <code>HermesCronJob.noAgent: Bool</code> field with <code>decodeIfPresent</code> so pre-v0.13 reads keep parsing. Gated on <code>hasCronNoAgent</code>.</li>
|
||||
<li><strong>Web Tools per-capability backends</strong> — new <code>Settings → Web Tools</code> tab with separate pickers for <code>web_search</code> and <code>web_extract</code>. SearXNG appears in the search picker only. The legacy single <code>web_tools.backend</code> is still readable for round-trip safety on mixed-version installs. Gated on <code>hasWebToolsBackendSplit</code>.</li>
|
||||
<li><strong>Profiles <code>--no-skills</code></strong> — "Empty profile (no skills)" toggle in the create-profile flow that appends <code>--no-skills</code> to <code>hermes profile create</code>. Disabled when "Clone all" is on (mutually exclusive). Gated on <code>hasProfileNoSkills</code>.</li>
|
||||
</ul>
|
||||
<h4>UX polish</h4>
|
||||
<ul>
|
||||
<li><strong>Context compression count</strong> in the chat status bar. v0.13 emits the count alongside the token tally on the <code>session/prompt</code> response; Scarf renders a <code>🗜 ×N</code> chip next to the token count when <code>count > 0</code>. Gated on <code>hasContextCompressionCount</code>.</li>
|
||||
<li><strong><code>/new <name></code> argument hint</strong> — bracket-aware so v0.13 hosts show <code>[<name>]</code> and pre-v0.13 hosts show no hint.</li>
|
||||
<li><strong><code>HermesUpdaterCommandBuilder</code></strong> — forward-compat plumbing for <code>hermes update --yes</code>. No in-app surface in v2.8.0 (Scarf doesn't currently expose a "Run hermes update" command); the builder is wired so a future Settings affordance can opt in cleanly.</li>
|
||||
<li><strong>Redaction default-flip awareness</strong> — the existing <code>Settings → Advanced → Redaction</code> toggle hint copy now branches on <code>HermesCapabilities.isV013OrLater</code>. v0.13+ hosts read "Recommended: ON. Hermes v0.13 defaults to redacting secrets unless you opt out"; pre-v0.13 keeps the v2.7 hint.</li>
|
||||
<li><strong><code>display.language</code> picker</strong> — new <code>Settings → General → Locale</code> row. 8 options: default, zh, ja, de, es, fr, uk, tr. Hermes does the actual translation; Scarf just persists <code>display.language</code> to <code>config.yaml</code>. Gated on <code>hasDisplayLanguage</code>.</li>
|
||||
<li><strong>xAI Custom Voices badge</strong> — <code>Settings → Voice</code> shows a "Cloning supported" <code>ScarfBadge</code> next to the xAI TTS provider entry. Informational only; voice management itself happens via <code>hermes voice</code> CLI. Gated on <code>hasXAIVoiceCloning</code>.</li>
|
||||
</ul>
|
||||
<h4>ScarfGo iOS catch-up (read-only)</h4>
|
||||
<p>Following the Phase H precedent, iOS mirrors selected v2.8 surfaces as read-only — write parity is deferred to v2.8.x.</p>
|
||||
<ul>
|
||||
<li><strong>Goal pill + queue chip</strong> in the iOS chat header (<code>projectContextBar</code>). Tap is a no-op; the Mac app owns mutations.</li>
|
||||
<li><strong>Kanban v0.13 diagnostics</strong> in <code>ScarfGoKanbanDetailSheet</code> — <code>retries: N</code> chip, "Worker-created — verify on Mac" hallucination badge, red <code>auto_blocked_reason</code> banner, tappable diagnostics chip-lists with severity-tinted badges and a new <code>DiagnosticDetailSheet</code> (replacing Mac's <code>.help()</code> tooltip on touch).</li>
|
||||
<li><strong>Curator Archived list</strong> in <code>Scarf iOS/Curator/CuratorView.swift</code> — read-only, with footer pointing users to the Mac app for Restore / Prune actions.</li>
|
||||
<li><strong>Settings → Platforms extension</strong> — Google Chat status row, busy-ack and restart-notification summary rows across <code>gatewayPlatforms</code> (handles disagreement with "mixed (N platforms)"), allowlist DisclosureGroups with monospaced "platform: id" entries when expanded.</li>
|
||||
<li><strong>"v0.13 features active" badge</strong> in iOS Settings (gated on <code>caps.isV013OrLater</code>). Tap presents <code>V013FeaturesSheet</code> listing the new affordances.</li>
|
||||
</ul>
|
||||
<h3>Capability gating</h3>
|
||||
<p>v2.8.0 adds 22 new flags on <code>HermesCapabilities</code> (each gating one v0.13 surface), plus an <code>isV013OrLater</code> convenience predicate. Every new affordance is gated; pre-v0.13 hosts see the v2.7.5 surface byte-identical to before. The HermesVersionBanner threshold remains pre-v0.12 — v0.12 → v0.13 nudging happens via the iOS Settings badge (positive surface) rather than a global yellow banner (which was reserved for "missing every new feature" cases).</p>
|
||||
<h3>Bug fixes uncovered during v0.13.0 dogfooding</h3>
|
||||
<ul>
|
||||
<li><strong>Dashboard flicker on v0.13 hosts</strong> — Hermes v0.13 writes to <code>state.db-wal</code> and rotating logs at ~10 Hz during gateway activity. Each FSEvents fire ticked <code>lastChangeDate</code>, every observing view re-fired its load handler against it, and on Local hosts the dashboard stacked 5+ concurrent <code>dashboardSnapshot</code> calls in 200 ms — sqlite contention on the read-only handle surfaced as <code>BackendError error 3</code>, plus visible flicker. Two-part fix: <code>HermesFileWatcher.scheduleCoalescedTick</code> coalesces FSEvents into one observable mutation per 500 ms quiet window with a 1.5 s max-wait floor (so a coincident <code>gateway_state.json</code> Start/Stop touch can't be starved indefinitely under sustained WAL writes); <code>DashboardViewModel.load()</code> holds a single in-flight <code>Task<Void, Never></code> handle so concurrent triggers await the in-flight load instead of stacking.</li>
|
||||
<li><strong>Sparse slash menu on resumed sessions</strong> — Hermes ACP only emits <code>available_commands_update</code> after <code>session/new</code>, not after <code>session/load</code>. Combined with <code>RichChatViewModel.reset()</code> clearing <code>acpCommands</code> on every session switch, resumed sessions landed at a 4-command fallback even though the agent identity hadn't changed. Fix: stop wiping <code>acpCommands</code> in <code>reset()</code> (they're agent-level, not session-level), and add an active-session-only static fallback set covering the standard agent commands so cold-start LOAD users see a rich menu immediately.</li>
|
||||
</ul>
|
||||
<h3>Migrating from 2.7.5</h3>
|
||||
<p>Sparkle delivers the update automatically. No config migration, no schema changes — same <code>~/.hermes/state.db</code> columns as v0.11/v0.12, same Scarf-owned sidecars at <code>~/.hermes/scarf/</code>. Existing v2.7.5 Kanban tenants stay valid; existing project manifests are unchanged. Settings tabs grow new rows; existing rows render identically.</p>
|
||||
<p>If you're connecting to a Hermes v0.13.0 host for the first time after this update, the new surfaces light up automatically — no flag flip in the app. Pre-v0.13 hosts continue to render the v2.7.5 surface; nothing breaks if you upgrade Scarf before upgrading Hermes.</p>
|
||||
<h3>Known limitations</h3>
|
||||
<ul>
|
||||
<li><strong>iOS write surfaces</strong> (Verify hallucination gate, Reject, Curator archive/prune actions, allowlist editor, <code>/goal</code> send, <code>/queue</code> send) are explicitly out of scope for v2.8.0 and slated for v2.8.x. iOS surfaces are read-only mirrors per the Phase H precedent.</li>
|
||||
<li><strong>Auto-resumed-from-checkpoint indicator</strong> — Hermes v0.13's "auto-resume after gateway restart" feature is server-side; whether the ACP adapter advertises a Scarf-visible signal is unclear pending live host verification. Deferred to v2.8.1.</li>
|
||||
<li><strong>xAI voice cloning management UX</strong> — only the "Cloning supported" badge ships in v2.8.0. A full voice-management surface is a follow-up.</li>
|
||||
<li><strong>Bulk re-tag for legacy NULL-tenant Kanban tasks</strong> — carryover from v2.7.5; Hermes still has no <code>tenant</code> mutation verb post-create.</li>
|
||||
<li><strong>Cluster A wire-shape TODOs</strong> — 25 <code>// TODO(WS-N-Q<n>)</code> markers across the codebase flag fields and CLI flags whose exact shape couldn't be verified from release notes alone. Each has a tolerant-decode default that fails closed (hides the affordance rather than throwing); a pre-merge sweep on a v0.13 host can confirm or fix each in seconds.</li>
|
||||
</ul>
|
||||
<h3>Acknowledgements</h3>
|
||||
<p>v2.8.0 was driven by a 9-stream coordinated multi-agent build: WS-1 capability flag foundation through WS-9 iOS catch-up, with planning artifacts archived under <a href="scarf/docs/v2.8/">scarf/docs/v2.8/</a> for future reference. Bug fixes for the dashboard flicker and sparse-slash-menu issues were caught during a fresh end-to-end dogfood pass against a live Hermes v0.13.0 install — the kind of surface-level UX bugs that only show up under real-world <code>state.db-wal</code> write rates and real-world resume flows. As always, real bugs come from doing instead of speculating.</p>
|
||||
</body></html>
|
||||
]]></description>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.8.0/Scarf-v2.8.0-Universal.zip"
|
||||
sparkle:edSignature="m5HQUKgxfWa5u88gEVCGWMIKaogBIsjPspQG97y1KcrW1w6S5XF1s0v1oRaRWMyIlj46BD+937Inu2Ii5TbXAg=="
|
||||
length="19771149"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.7.5</title>
|
||||
<sparkle:version>34</sparkle:version>
|
||||
<sparkle:shortVersionString>2.7.5</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Fri, 08 May 2026 10:56:09 +0000</pubDate>
|
||||
<description><![CDATA[
|
||||
<!DOCTYPE html><html><head><meta charset="utf-8"><style>body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
color: #1d1d1f;
|
||||
margin: 0;
|
||||
padding: 0 4px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 17px;
|
||||
margin: 16px 0 6px 0;
|
||||
border-bottom: 1px solid #e5e5e7;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
h3 {
|
||||
font-size: 14px;
|
||||
margin: 14px 0 4px 0;
|
||||
color: #424245;
|
||||
}
|
||||
h4 {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 2px 0;
|
||||
}
|
||||
p { margin: 6px 0; }
|
||||
ul { margin: 6px 0; padding-left: 20px; }
|
||||
li { margin: 3px 0; }
|
||||
code {
|
||||
background: #f5f5f7;
|
||||
border-radius: 3px;
|
||||
padding: 1px 4px;
|
||||
font-family: "SF Mono", Menlo, Consolas, monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
pre {
|
||||
background: #f5f5f7;
|
||||
border-radius: 5px;
|
||||
padding: 8px 10px;
|
||||
overflow-x: auto;
|
||||
font-size: 12px;
|
||||
}
|
||||
pre code { background: transparent; padding: 0; }
|
||||
a { color: #0066cc; text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
hr {
|
||||
border: none;
|
||||
border-top: 1px solid #e5e5e7;
|
||||
margin: 16px 0;
|
||||
}
|
||||
strong { color: #1d1d1f; }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body { color: #f5f5f7; background: #1c1c1e; }
|
||||
h2 { border-bottom-color: #38383a; }
|
||||
h3 { color: #c7c7cc; }
|
||||
code, pre { background: #2c2c2e; }
|
||||
hr { border-top-color: #38383a; }
|
||||
a { color: #4499ff; }
|
||||
strong { color: #f5f5f7; }
|
||||
}
|
||||
</style></head><body>
|
||||
<h2>What's in 2.7.5</h2>
|
||||
<p>A feature release that lifts Scarf's Kanban surface from a read-only list (the v2.6 placeholder shipped while upstream Kanban was still mid-rework) to a full drag-and-drop board with the complete Hermes v0.12 mutation surface wired up — plus per-project boards bound to a Scarf-minted tenant slug, and a read-only board on iOS for at-a-glance status from your phone. No data migrations, no schema changes; pre-v0.12 hosts gracefully hide the surface.</p>
|
||||
<h3>New features</h3>
|
||||
<h4>Mac</h4>
|
||||
<ul>
|
||||
<li><strong>Drag-and-drop Kanban board</strong> (<a href="scarf/scarf/Features/Kanban/Views/KanbanBoardView.swift">scarf/Features/Kanban/Views/KanbanBoardView.swift</a>). Five visible columns — Triage / Up Next (<code>todo</code> + <code>ready</code>) / Running / Blocked / Done — collapsing Hermes's seven status values into a layout that doesn't waste space on <code>ready</code>, which the dispatcher only ever holds for a few seconds. Triage hides itself when empty; archived hides behind a header toggle. Drop a card onto a column and Scarf maps the gesture to the right Hermes verbs through a pure transition planner: drop-on-Running fires <code>kanban dispatch</code> (the dispatcher then spawns a worker), drop-on-Blocked opens a sheet asking for a reason and calls <code>kanban block</code>, drop-on-Done opens a result sheet and calls <code>kanban complete</code>, blocked → running chains <code>unblock</code> + <code>dispatch</code>. Forbidden transitions (anything dropped on Done; anything dragged out of Triage) reject with a red drop-target stroke and a tooltip explaining why — Done is terminal, Triage is promoted by a specifier worker, neither has a CLI verb that maps cleanly. Optimistic local updates apply on drop and revert on CLI failure with a toast, so the UI feels instant.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>Side-pane inspector</strong> (<a href="scarf/scarf/Features/Kanban/Views/KanbanInspectorPane.swift">KanbanInspectorPane.swift</a>). Click a card and a 420 px pane slides in from the trailing edge. Not a modal sheet — modal would block triaging the next card after closing. Header carries the status, an inline assignee menu (more on that below), workspace kind, and tenant; below that, four tabs render <code>hermes kanban show <id></code> data: <strong>Comments</strong> (with an inline composer that calls <code>kanban comment</code>), <strong>Events</strong> (the <code>task_events</code> log with per-kind glyphs), <strong>Runs</strong> (one row per attempt with outcome badge + summary + error), and <strong>Log</strong> — the worker's captured stdout/stderr from <code>hermes kanban log <id></code>, polled every 2 s while the task is running with a "● streaming" indicator and auto-scroll to the latest line, snapshot-only with a refresh button when the task is in a terminal state. The action bar at the bottom has all the per-status verbs — Start (which is <code>claim</code> rebranded as a user-visible action), Complete, Block, Unblock, Archive — every one with a help tooltip explaining what it does and what Hermes verb it invokes. The "Archive" tooltip explicitly notes Hermes has no hard-delete: archived tasks remain in <code>~/.hermes/kanban.db</code> and are recoverable via the "Show archived" toggle until <code>hermes kanban gc</code> runs.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>Inspector auto-refresh.</strong> While the inspector is open, the detail (header, action buttons, comments, events, runs) re-fetches every 5 s on the same cadence as the board itself, so a worker transition (e.g. running → done elsewhere) is reflected without the user having to close + reopen. The Log tab's 2 s poll runs separately and self-cancels the moment the task transitions out of <code>running</code>.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>Inline assignee picker on the inspector header.</strong> The assignee badge is a clickable menu — set means a <code>.brand</code> (rust) chip, unassigned means a <code>.warning</code> (yellow) chip so the eye catches it instantly. Tapping opens a menu of every known profile (union of <code>~/.hermes/profiles/</code>, current task assignees, and the active local profile from <code>HermesProfileResolver</code>) plus an "Unassigned" option. Selection routes through <code>kanban assign</code> and immediately follows with <code>kanban dispatch</code> so the task gets picked up promptly. Solves the "I assigned a profile but nothing happened" gap end-to-end without the user touching a terminal.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>Health banner in the inspector.</strong> Surfaces two conditions that previously left users staring at a stuck task with no explanation. <strong>Yellow</strong> when the task is unassigned in <code>ready</code> / <code>todo</code>: <em>"Won't run automatically — Hermes's dispatcher silently skips tasks with no assignee."</em> The dispatcher's own <code>--json</code> output literally lists these under <code>skipped_unassigned</code>; we now surface that to the human. <strong>Red</strong> when the most-recently-completed run ended in a non-success outcome (<code>stale_lock</code> / <code>crashed</code> / <code>gave_up</code> / <code>timed_out</code> / <code>spawn_failed</code> / <code>reclaimed</code> / <code>failed</code>): banner displays the outcome label + the raw <code>error</code> field from the run record, so you don't have to dig into the Runs tab to discover it. The red banner is suppressed while a fresh attempt is running — once status flips back to <code>running</code>, the previous outcome is stale signal and the Log tab's live stream is the right thing to look at.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>Card-level signals.</strong> Cards in <code>running</code> get a 2 px <code>ScarfColor.info</code> left edge + a subtle title shimmer so live work is obvious at a glance. Blocked cards get a 2 px <code>ScarfColor.warning</code> left edge + a ⚠ glyph next to the title. Done cards dim to 0.7 opacity in light mode, 0.55 in dark, with a green ✓ in the title row. Cards in <code>ready</code> / <code>todo</code> with no assignee get a yellow ⚠ glyph in the title row with a tooltip explaining the dispatcher won't pick them up — same signal as the inspector banner, just at the board level so triage is one keypress away.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong><code>Board | List</code> toggle at the top of the route.</strong> The v2.6 read-only list view is preserved in <code>KanbanListView.swift</code> and surfaced via a segmented picker, so users on narrow windows or anyone who prefers a flat sortable list can opt in. Choice persists across launches via <code>@AppStorage</code>.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>New Task sheet</strong> (<a href="scarf/scarf/Features/Kanban/Views/KanbanCreateSheet.swift">KanbanCreateSheet.swift</a>). Title, body (markdown supported), assignee (defaults to <code>HermesProfileResolver.activeProfileName()</code> so newly-created tasks actually run), workspace kind (segmented <code>Scratch / Worktree / Project Dir</code>; locked to Project Dir on per-project boards), priority slider, comma-separated skills with autocomplete from <code>~/.hermes/skills/</code>, optional tenant (hidden on per-project boards — the slug is implicit), and a "Send to triage" toggle. Submit fires <code>kanban create --json</code> and immediately follows with <code>kanban dispatch</code> so an assigned task transitions <code>ready</code> → <code>running</code> within seconds rather than waiting for the gateway dispatcher's internal cycle.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>Kanban moved from Manage → Monitor in the sidebar.</strong> It's runtime work-in-progress, not configuration. Sits between Activity and the rest of Manage so users see "what's happening right now" at a glance.</li>
|
||||
</ul>
|
||||
<h4>Per-project Kanban</h4>
|
||||
<ul>
|
||||
<li><strong><code>DashboardTab.kanban</code> on every project</strong>, capability-gated on <code>HermesCapabilities.hasKanban</code>. Renders a project-scoped <code>KanbanBoardView</code> filtered to the project's tenant slug. Workspace defaults in the New Task sheet are pre-pinned to <code>dir:<project.path></code>. Empty state explains the project doesn't have any tasks yet and offers a "New Task" CTA — the empty board IS the discovery surface.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>Tenant minting via <a href="scarf/scarf/Core/Services/KanbanTenantResolver.swift">KanbanTenantResolver</a>.</strong> Each Scarf project gets a stable <code>scarf:<slug></code> tenant minted on first kanban interaction and persisted to <code><project>/.scarf/manifest.json</code> (new optional <code>kanbanTenant</code> field on <code>ProjectTemplateManifest</code>). Slug rules: lowercased, hyphenated, ≤ 48 chars, <code>scarf:</code> prefix to avoid collision with hand-typed tenants. Once minted, the tenant is <strong>immutable across rename</strong> — tasks already on the board carry the original slug, so renaming the project doesn't orphan them. Bare projects (no manifest) get a sentinel manifest written with <code>id: scarf/<project-id></code> + <code>version: 0.0.0</code> + just the <code>kanbanTenant</code> set; the <code>ProjectAgentContextService</code> reader recognizes the sentinel and refuses to surface it as a "Template" line in the AGENTS.md block, so the project doesn't suddenly start advertising a fake template to the agent.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>Agent-side tenant injection.</strong> <a href="scarf/scarf/Core/Services/ProjectAgentContextService.swift">ProjectAgentContextService.renderBlock</a> emits a "Kanban tenant" line inside the <code><!-- scarf-project --></code> markers in <code><project>/AGENTS.md</code> whenever a tenant exists, instructing the agent to pass <code>--tenant scarf:<slug></code> on <code>hermes kanban create</code>. <code>ChatViewModel.startACPSession</code> already calls <code>refresh(for:)</code> before opening every project chat, so the agent reads a fresh tenant on every session start with no extra wiring. Agents are imperfect at flag discipline; a forgotten <code>--tenant</code> lands the task in the global "Untagged" group rather than failing — acceptable v2.7.5 behavior.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong><code>kanban_summary</code> dashboard widget</strong> (<a href="scarf/scarf/Features/Projects/Views/Widgets/KanbanSummaryWidgetView.swift">KanbanSummaryWidgetView.swift</a>). New widget kind for project dashboards: shows the top three <code>running</code> / <code>blocked</code> / <code>todo</code> tasks for the project's tenant by priority, plus a glance footer (<code>"12 todo · 3 running · 5 blocked"</code>) sourced from <code>kanban stats</code>. Polls every 10 s while the dashboard is foregrounded. Widget vocabulary registered in <a href="tools/widget-schema.json">tools/widget-schema.json</a> and rendered on the catalog site via <a href="site/widgets.js">site/widgets.js</a>; template authors can drop a <code>{ kind: kanban_summary, max_rows: 3 }</code> block into <code>dashboard.json</code>.</li>
|
||||
</ul>
|
||||
<h4>iOS / iPadOS</h4>
|
||||
<ul>
|
||||
<li><strong>Read-only Kanban tab on <code>ProjectDetailView</code></strong> (<a href="scarf/Scarf%20iOS/Kanban/ScarfGoKanbanView.swift">Scarf iOS/Kanban/ScarfGoKanbanView.swift</a>). Same five-column collapse rendered as a horizontally-paged segmented <code>Picker</code> of single-column lists — HIG-friendly on iPhone where a 5-column grid forces unreadable card widths. Pulls live status, assignee, workspace, skills, priority chips. Tap a card → modal <code>NavigationStack</code> detail sheet (<a href="scarf/Scarf%20iOS/Kanban/ScarfGoKanbanDetailSheet.swift">ScarfGoKanbanDetailSheet.swift</a>) with the same Comments / Events / Runs tabs the Mac inspector has. Read-only in v2.7.5 — mutations + drag-drop on iPad land in v2.8 once the Mac flow is fully shaken out. Card titles use semantic <code>.headline</code> (not <code>ScarfFont</code>) so Dynamic Type works; chrome (badges) stays on <code>ScarfBadge</code> for fixed visual weight per the project's iOS conventions.</li>
|
||||
</ul>
|
||||
<h4>ScarfCore</h4>
|
||||
<ul>
|
||||
<li><strong><code>KanbanService</code> actor</strong> (<a href="scarf/Packages/ScarfCore/Sources/ScarfCore/Services/KanbanService.swift">Packages/ScarfCore/Sources/ScarfCore/Services/KanbanService.swift</a>) — pure-I/O Sendable actor wrapping every Hermes v0.12 verb (<code>list / show / runs / stats / assignees / create / assign / claim / comment / complete / block / unblock / archive / dispatch / link / unlink / log</code>). Dispatches each CLI invocation through <code>Task.detached(priority: .utility)</code> matching the existing concurrency conventions. Errors land in <a href="scarf/Packages/ScarfCore/Sources/ScarfCore/Models/KanbanError.swift">KanbanError</a> and surface as inline banners (not modal alerts) since the board is high-frequency. The "no matching tasks" stdout sentinel is normalized to <code>[]</code> rather than thrown.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>Pure transition planner.</strong> <code>KanbanService.plan(for: KanbanTransition)</code> is a synchronous function that maps a <code>(from, to)</code> column pair to the right verb sequence — <code>(.upNext, .running) → [.dispatch]</code>, <code>(.blocked, .running) → [.unblock, .dispatch]</code>, etc. Disallowed transitions throw <code>KanbanError.forbiddenTransition</code> with a user-actionable reason. The planner is fully tested in <code>KanbanModelsTests.swift</code>. Critically: <code>dispatch</code> (not <code>claim</code>) is the verb used for Up-Next → Running. Hermes's <code>claim</code> is documented as "manual alternative to the dispatcher" and assumes the caller spawns the worker themselves — Scarf doesn't, so calling <code>claim</code> from drag-drop reserved tasks but never spawned work, and the dispatcher reclaimed them ~15 minutes later (<code>stale_lock</code>). <code>dispatch</code> is the right primitive for a GUI client.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>Cross-platform <a href="scarf/Packages/ScarfCore/Sources/ScarfCore/Services/KanbanTenantReader.swift">KanbanTenantReader</a>.</strong> Read-only projection over <code><project>/.scarf/manifest.json</code>'s <code>kanbanTenant</code> field. The full <code>ProjectTemplateManifest</code> type lives in the Mac target; this lightweight reader gives iOS a way to filter the per-project board by tenant without linking the full manifest model.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>Timestamp decoding tolerates both shapes.</strong> Hermes emits <code>created_at</code> / <code>started_at</code> / <code>completed_at</code> / <code>last_heartbeat_at</code> etc. as Unix integer seconds (its SQLite columns are INTEGER), but earlier wire docs implied ISO-8601 strings. The decoder now accepts either an integer or a string and normalizes to ISO-8601 so downstream code only handles one type. Locked in by <code>decodeUnixIntegerTimestamps</code> in <code>KanbanModelsTests</code>.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong><code>KanbanBoardViewModel</code> optimistic merge.</strong> Holds <code>optimisticOverrides: [taskId: status]</code> for in-flight drags; the polled response merges with optimistic state until the server confirms the new status, so a stale poll arriving milliseconds after a drop can't snap the card back to its old column. On CLI failure the override is removed and the message lands in the inline banner.</li>
|
||||
</ul>
|
||||
<h3>Dispatch + assignee fixes</h3>
|
||||
<p>A diagnostic round driving real tasks end-to-end exposed a connected bug pattern that the polish pass closed:</p>
|
||||
<ul>
|
||||
<li><strong>Hermes's dispatcher silently skips unassigned tasks</strong> — its <code>kanban dispatch --json</code> output literally lists them under a <code>skipped_unassigned</code> key and moves on. Tasks created without an assignee sat in <code>ready</code> indefinitely and the user had no signal anything was wrong. The New Task sheet now defaults to the active Hermes profile, the inspector header shows a yellow "Unassigned" chip + warning banner, every <code>ready</code> / <code>todo</code> card without an assignee gets a ⚠ glyph + tooltip, and the inspector's inline assignee picker fixes it in one click.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>Drag-to-Running used to call <code>claim</code></strong>, which is a manual alternative to the dispatcher. Status flipped to <code>running</code>, but no worker spawned (Scarf doesn't host workers), and 15 minutes later the dispatcher reclaimed the task with a <code>stale_lock</code> outcome. Replaced with <code>dispatch</code> end-to-end so the gateway-running dispatcher actually does the spawning.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong><code>hermes kanban assignees</code> empty-state was leaking into the picker.</strong> The CLI prints a literal sentinel <code>(no assignees — create a profile with hermes -p <name> setup)</code> when the table is empty; the parser was tokenizing it on whitespace and offering <code>(no</code> as a profile in the menu. Parser now skips the sentinel, validates each candidate against <code>^[a-zA-Z0-9_-]+$</code>, and falls back cleanly to the active local profile when the table is empty.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong><code>spawn_failed</code> from "executable not found on PATH"</strong> — most subtle of the lot. macOS GUI apps inherit a launch-services PATH (<code>/usr/bin:/bin:/usr/sbin:/sbin</code>) that doesn't include <code>~/.local/bin</code> (where pipx installs <code>hermes</code>) or <code>/opt/homebrew/bin</code>. Scarf was finding <code>hermes</code> for its own invocation via the absolute-path resolver in <code>HermesPathSet.hermesBinaryCandidates</code>, but when the dispatcher then spawned a worker process, that worker inherited Scarf's GUI PATH and couldn't find <code>hermes</code> by name — recording an <code>outcome=spawn_failed</code> run with the exact "executable not found on PATH" message. <code>LocalTransport</code> now grows an <code>environmentEnricher</code> static (mirroring <code>SSHTransport.environmentEnricher</code>) wired by <code>scarfApp.swift</code> to the same <code>HermesFileService.enrichedEnvironment()</code> login-shell probe the SSH transport uses. Every local subprocess Scarf spawns now sees the user's full PATH and credential env, so a spawned-from-Scarf hermes can spawn its children by name without reaching for absolute paths. Defense-in-depth: <code>subprocessEnvironment(forExecutable:)</code> also unconditionally prepends the executable's parent directory to PATH, so the fix works even if the enricher hasn't been wired (early startup, tests).</li>
|
||||
</ul>
|
||||
<h3>Migrating from 2.7.1</h3>
|
||||
<p>Sparkle will offer the update automatically. No config migration, no schema changes — <code>~/.hermes/kanban.db</code> is shared across all Hermes clients and Scarf only reads/writes through the documented CLI surface. Existing Scarf projects pick up the new project Kanban tab on first open; the tenant slug is minted lazily on first kanban interaction inside the project, so projects with no kanban activity stay byte-identical until the user opens the tab.</p>
|
||||
<p>If you have an existing project with a Scarf-managed <code>manifest.json</code>, the new optional <code>kanbanTenant</code> field is added on next mint and lives alongside any template-author config schema without touching it. Templates do not ship <code>kanbanTenant</code> (it's user-machine-scoped state); the export pipeline strips it.</p>
|
||||
<p>If you've been running tasks via the v2.6 read-only list and your Hermes host already runs the gateway dispatcher, your existing kanban tasks should appear on the board automatically — there's no migration step. Tasks created without an assignee in v2.6 will now show the yellow "Unassigned" warning until you fix them through the inline picker.</p>
|
||||
<h3>Known limitations</h3>
|
||||
<ul>
|
||||
<li><strong>Within-column reorder is not supported.</strong> Hermes has no <code>update</code> verb and no <code>position</code> column on the tasks table — <code>priority</code> is write-once at create time. Sort order inside each column is <code>priority DESC, created_at DESC</code>, matching the dispatcher's actual run order. We considered a client-side ordering sidecar; rejected because the on-screen order would diverge from what runs next, which is worse than no manual order. Will revisit if Hermes ships an <code>update --priority</code> verb.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>No live <code>watch</code> streaming yet.</strong> The board polls every 5 s; the inspector polls detail on the same cadence and the Log tab on a 2 s cadence while running. <code>hermes kanban watch --json</code> event streaming + reconnect-with-backoff lands in v2.8 along with iOS write surfaces.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong>No bulk re-tag for legacy NULL-tenant tasks.</strong> Tasks created before this release (assignee or no assignee) appear in the global "Untagged" group on the global board. Hermes has no <code>tenant</code> mutation verb post-create, so retagging would be archive + recreate — too destructive to ship in this release.</li>
|
||||
</ul>
|
||||
<h3>Acknowledgements</h3>
|
||||
<ul>
|
||||
<li>Driven end-to-end against a fresh local Hermes v0.12.0 install with the gateway dispatcher running. Real bug surface mostly came from doing instead of speculating: the <code>claim</code> vs <code>dispatch</code> distinction, the silent <code>skipped_unassigned</code> behavior, the <code>(no</code> parse leak, the integer-vs-ISO timestamp shape, and the stale "Last run" banner during a fresh attempt all surfaced from driving real tasks and watching what actually happened.</li>
|
||||
</ul>
|
||||
</body></html>
|
||||
]]></description>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.7.5/Scarf-v2.7.5-Universal.zip"
|
||||
sparkle:edSignature="6QLmonqLdavcU3+u7NE3oYL4Iui4wZZ0r9OWM+kj0uJ3tM32C14N35g7kXmADvo50YONIAmxqfkYWo/AIX70AA=="
|
||||
length="19346988"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.7.1</title>
|
||||
<sparkle:version>33</sparkle:version>
|
||||
<sparkle:shortVersionString>2.7.1</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Thu, 07 May 2026 10:51:54 +0000</pubDate>
|
||||
<description><![CDATA[
|
||||
<!DOCTYPE html><html><head><meta charset="utf-8"><style>body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
color: #1d1d1f;
|
||||
margin: 0;
|
||||
padding: 0 4px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 17px;
|
||||
margin: 16px 0 6px 0;
|
||||
border-bottom: 1px solid #e5e5e7;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
h3 {
|
||||
font-size: 14px;
|
||||
margin: 14px 0 4px 0;
|
||||
color: #424245;
|
||||
}
|
||||
h4 {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 2px 0;
|
||||
}
|
||||
p { margin: 6px 0; }
|
||||
ul { margin: 6px 0; padding-left: 20px; }
|
||||
li { margin: 3px 0; }
|
||||
code {
|
||||
background: #f5f5f7;
|
||||
border-radius: 3px;
|
||||
padding: 1px 4px;
|
||||
font-family: "SF Mono", Menlo, Consolas, monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
pre {
|
||||
background: #f5f5f7;
|
||||
border-radius: 5px;
|
||||
padding: 8px 10px;
|
||||
overflow-x: auto;
|
||||
font-size: 12px;
|
||||
}
|
||||
pre code { background: transparent; padding: 0; }
|
||||
a { color: #0066cc; text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
hr {
|
||||
border: none;
|
||||
border-top: 1px solid #e5e5e7;
|
||||
margin: 16px 0;
|
||||
}
|
||||
strong { color: #1d1d1f; }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body { color: #f5f5f7; background: #1c1c1e; }
|
||||
h2 { border-bottom-color: #38383a; }
|
||||
h3 { color: #c7c7cc; }
|
||||
code, pre { background: #2c2c2e; }
|
||||
hr { border-top-color: #38383a; }
|
||||
a { color: #4499ff; }
|
||||
strong { color: #f5f5f7; }
|
||||
}
|
||||
</style></head><body>
|
||||
<h2>What's in 2.7.1</h2>
|
||||
<p>A patch release covering three bug reports filed against 2.7.0, plus follow-up cleanups in the same neighborhood. No data migrations, no UI surface changes — drop-in replacement for 2.7.0 on Mac.</p>
|
||||
<h3>Bug fixes</h3>
|
||||
<h4>Mac</h4>
|
||||
<ul>
|
||||
<li><strong><a href="https://github.com/awizemann/scarf/issues/77">#77</a> — Sessions screen renders empty even when Dashboard reports sessions exist.</strong> v2.7.0 folded the Sessions tab's two SQL queries (sessions list + previews) into a single batched SSH round-trip for perf. The combined wire payload for any user with ~150+ sessions crossed macOS's 16–64 KB pipe-buffer threshold; without a concurrent reader draining the pipe, the remote <code>sqlite3 -json</code> blocked, the script never finished, our 30-second timeout fired, and the call returned an empty result. <code>SSHScriptRunner</code> now drains stdout/stderr concurrently with the running process via <code>FileHandle.readabilityHandler</code>, so the kernel pipe never fills. Same fix applied to the local-execution path. New regression test pushes 256 KB of synthetic output through the runner and asserts full delivery — would have wedged pre-fix.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong><a href="https://github.com/awizemann/scarf/issues/78">#78</a> — Skills "What's New" pill contradicts the Updates sub-tab.</strong> The pill at the top of the Skills page was rendering on every sub-tab, including Updates. It counts <strong>local</strong> file deltas since the user last clicked "Mark as seen" (e.g. "18 new" = 18 skills landed on disk that you haven't acknowledged), while the Updates body runs <code>hermes skills check</code> to find skills with newer <strong>upstream</strong> versions available — a different concept. Two surfaces using the word "update" for two different things made the screen contradict itself. Two changes: the pill now renders only on the Installed sub-tab (Mac and ScarfGo), and its label says "X <strong>changed</strong> since you last looked" instead of "X updated" so the local-file vocabulary doesn't collide with upstream-update vocabulary anywhere on the page.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong><a href="https://github.com/awizemann/scarf/issues/79">#79</a> — Skills hub search returns nothing for terms visible in Browse.</strong> With the source picker on "All Sources", <code>hermes skills search <query></code> (no <code>--source</code> flag) routes through Hermes's centralized index and skips external API sources (skills-sh, github, clawhub, lobehub, well-known) — but Browse still aggregates from those sources, so a skill like <code>honcho</code> would show up in Browse and disappear in search. Same picker, same query, contradictory results. Rather than chase Hermes's index gaps, "All Sources" search now means "filter what you can already see": Scarf caches the most recent Browse payload and runs a client-side substring filter (case-insensitive against name, description, and identifier) against it, instantly. Source-specific searches still shell out to <code>hermes skills search --source <s></code> for full upstream search semantics. Five new tests cover the filter behavior.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong><code>hermesPIDResult()</code> — narrow the Hermes "is it running?" probe to the gateway.</strong> Previously <code>pgrep -f hermes</code>, which matched any process with "hermes" in its argv: chat sessions Scarf itself spawns, <code>hermes -z</code> one-shots, log tails, even the README in an editor. The Dashboard "Hermes is running" badge could read true even when the gateway daemon was down. Tightened to a regex that matches only the gateway shape — <code>python -m hermes_cli.main gateway run …</code> and <code>/path/to/hermes gateway run …</code>. All callers (DashboardViewModel, HealthViewModel, SettingsViewModel, scarfApp, stopHermes) want the gateway PID specifically. Cherry-picked from <a href="https://github.com/awizemann/scarf/pull/76">#76</a> — thanks to <a href="https://github.com/unixwzrd">@unixwzrd</a> for the diagnosis and regex.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong><code>HealthViewModel.stopDashboard()</code> — stop the dashboard by port, not <code>pkill -f</code>.</strong> External-instance fallback used to be <code>pkill -f "hermes dashboard"</code>, broad enough to match shell history, log tails, README readers — anything with the substring in its argv. Now <code>lsof -tiTCP:<port> -sTCP:LISTEN</code> resolves the PID actually bound to the dashboard port and only that one process gets <code>SIGTERM</code>. Trusting the port is correct here: Scarf owns the configured port and the user-visible intent is "stop the thing on this port." Direction cherry-picked from <a href="https://github.com/awizemann/scarf/pull/76">#76</a>; the <code>-c hermes</code> filter from the original was dropped because Hermes installs as a Python shebang script and the kernel COMM is <code>python</code>, not <code>hermes</code> — <code>-c hermes</code> would silently miss every standard install.</li>
|
||||
</ul>
|
||||
<h3>Documentation + tooling</h3>
|
||||
<ul>
|
||||
<li><strong><code>scripts/local-build.sh</code> + <code>BUILDING.md</code> for contributor builds.</strong> New unsigned single-arch Debug build script for contributors without an Apple Developer account. Detects arm64 / x86_64, verifies xcode-select / xcrun / xcodebuild, probes the Metal toolchain (offers an interactive install on TTY, errors cleanly on CI), resolves Swift packages, builds Debug with signing disabled. Optional one-touch <code>ditto</code> to <code>/Applications/scarf.app</code> on explicit y/N. The canonical Release universal CLI in <code>README.md</code> is unchanged — <code>local-build.sh</code> is an alternative for contributors, not a replacement for the shipping build. Cherry-picked from <a href="https://github.com/awizemann/scarf/pull/76">#76</a>.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><strong><code>BUILDING.md</code> + <code>CONTRIBUTING.md</code> — restored Sonoma compatibility messaging.</strong> The runtime min is <strong>macOS 14.6 (Sonoma)</strong> — that's the <code>MACOSX_DEPLOYMENT_TARGET</code> on the main <code>scarf</code> target and is intentional. Build min is <strong>Xcode 16.0</strong> (needed for Swift 6 strict-concurrency features). The legacy CONTRIBUTING.md line had drifted to "Xcode 26.3+ / macOS 26.2+", which would have steered Sonoma contributors and users away from a build that actually runs on their box. Corrected, with a load-bearing-callout in BUILDING.md so future doc edits don't silently raise the floor again.</li>
|
||||
</ul>
|
||||
<h3>Migrating from 2.7.0</h3>
|
||||
<p>Sparkle will offer the update automatically. No config migration, no schema changes. Existing sessions, skills, and projects are untouched.</p>
|
||||
<p>If you've been working around #77 by collapsing the sidebar or restarting Scarf to repopulate the Sessions list, you can stop — sessions should load reliably now.</p>
|
||||
<h3>Acknowledgements</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/bricelb">@bricelb</a> for the three v2.7.0 bug reports (<a href="https://github.com/awizemann/scarf/issues/77">#77</a>, <a href="https://github.com/awizemann/scarf/issues/78">#78</a>, <a href="https://github.com/awizemann/scarf/issues/79">#79</a>) — well-instrumented reproductions including screenshots and environment details made the diagnosis straightforward.</li>
|
||||
<li><a href="https://github.com/unixwzrd">@unixwzrd</a> for <a href="https://github.com/awizemann/scarf/pull/76">#76</a> — the gateway-pgrep tighten, the <code>pkill -f "hermes dashboard"</code> direction, and the <code>local-build.sh</code> contributor flow are all cherry-picked from that PR.</li>
|
||||
</ul>
|
||||
</body></html>
|
||||
]]></description>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.7.1/Scarf-v2.7.1-Universal.zip"
|
||||
sparkle:edSignature="P9whuwJ264TN1XLaUNvzQK+yKmK2fiyccgKa6TixK3mkIPyVl2XrwPhyHgoMFOQ/c14l+4sizWolx67BSwXBAg=="
|
||||
length="18806277"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.7.0</title>
|
||||
<sparkle:version>32</sparkle:version>
|
||||
<sparkle:shortVersionString>2.7.0</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Tue, 05 May 2026 18:47:18 +0000</pubDate>
|
||||
<description><![CDATA[
|
||||
<!DOCTYPE html><html><head><meta charset="utf-8"><style>body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
color: #1d1d1f;
|
||||
margin: 0;
|
||||
padding: 0 4px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 17px;
|
||||
margin: 16px 0 6px 0;
|
||||
border-bottom: 1px solid #e5e5e7;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
h3 {
|
||||
font-size: 14px;
|
||||
margin: 14px 0 4px 0;
|
||||
color: #424245;
|
||||
}
|
||||
h4 {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 2px 0;
|
||||
}
|
||||
p { margin: 6px 0; }
|
||||
ul { margin: 6px 0; padding-left: 20px; }
|
||||
li { margin: 3px 0; }
|
||||
code {
|
||||
background: #f5f5f7;
|
||||
border-radius: 3px;
|
||||
padding: 1px 4px;
|
||||
font-family: "SF Mono", Menlo, Consolas, monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
pre {
|
||||
background: #f5f5f7;
|
||||
border-radius: 5px;
|
||||
padding: 8px 10px;
|
||||
overflow-x: auto;
|
||||
font-size: 12px;
|
||||
}
|
||||
pre code { background: transparent; padding: 0; }
|
||||
a { color: #0066cc; text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
hr {
|
||||
border: none;
|
||||
border-top: 1px solid #e5e5e7;
|
||||
margin: 16px 0;
|
||||
}
|
||||
strong { color: #1d1d1f; }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body { color: #f5f5f7; background: #1c1c1e; }
|
||||
h2 { border-bottom-color: #38383a; }
|
||||
h3 { color: #c7c7cc; }
|
||||
code, pre { background: #2c2c2e; }
|
||||
hr { border-top-color: #38383a; }
|
||||
a { color: #4499ff; }
|
||||
strong { color: #f5f5f7; }
|
||||
}
|
||||
</style></head><body>
|
||||
<h2>What's in 2.7.0</h2>
|
||||
<p>The biggest release since 2.6.0 — a six-week stretch covering <strong>remote-context performance</strong>, a <strong>new project authoring flow</strong>, <strong>dashboard widgets</strong>, <strong>OAuth resilience</strong>, and a top-to-bottom <strong>performance instrumentation harness</strong> that drove the bulk of the rest. 36 commits, no schema bump, no Hermes capability bump.</p>
|
||||
<p>The throughline: Scarf got materially faster and more honest on slow remote SSH links, where 30-second sqlite timeouts and silently-empty UI used to be common. The skeleton-then-hydrate pattern, SSH cancellation propagation, and ScarfMon-driven diagnosis are the shape of how that work gets done now.</p>
|
||||
<hr>
|
||||
<h3>Remote-context performance — chats and Activity in seconds, not 30s timeouts</h3>
|
||||
<p>Resuming a chat on a slow remote (a 420ms-RTT droplet, an underprovisioned VPS, a tunnel through 4G) used to fetch the full message column set in one shot, which routinely tripped the 30s SSH timeout on chats with multi-page tool result blobs. The 160-message session was broken; the 30-message session was broken too. Activity didn't load at all.</p>
|
||||
<p>v2.7 introduces a <strong>skeleton-then-hydrate pattern</strong> that bounds the wire payload by what the user actually needs to see RIGHT NOW, then fills in the heavy stuff in the background:</p>
|
||||
<ul>
|
||||
<li><strong>Chat skeleton.</strong> <a href="https://github.com/awizemann/scarf/blob/main/scarf/Packages/ScarfCore/Sources/ScarfCore/Services/HermesDataService.swift"><code>fetchSkeletonMessages</code></a> selects user + assistant rows only (skips <code>role='tool'</code>) with <code>tool_calls</code> / <code>reasoning</code> / <code>reasoning_content</code> hard-NULLed at the SQL level. Wire payload bounded by conversational text alone — typically a few KB. The chat appears in seconds. Background <code>startToolHydration</code> pages through <code>hydrateAssistantToolCalls</code> in 5-id batches to splice tool calls in. Tool-result CONTENT is <strong>opt-in</strong> via Settings → Display → "Load tool results in past chats" (default off); the inspector pane lazy-fetches per-result content via <code>fetchToolResult(callId:)</code> when you open a card.</li>
|
||||
<li><strong>Activity skeleton.</strong> <a href="https://github.com/awizemann/scarf/blob/main/scarf/Packages/ScarfCore/Sources/ScarfCore/Services/HermesDataService.swift"><code>fetchRecentToolCallSkeleton</code></a> returns metadata-only rows (id + session_id + role + timestamp; everything else NULLed). Activity opens in <1s on remote with placeholder rows; real per-call entries swap in as paged hydration completes. New "Loading tool details…" pill in the page header surfaces hydration progress.</li>
|
||||
<li><strong>Single-id whale recovery.</strong> When a 5-id batch trips the 30s timeout (one row carries an oversized <code>tool_calls</code> blob — a long Edit's args, a big diff), an L1 single-id retry isolates the offending row so the rest of the batch still hydrates. Whale row stays bare; assistant message stays readable.</li>
|
||||
<li><strong>Lazy tool result loading in the inspector.</strong> Default-off avoids the bulk fetch. When you focus a tool call card, ChatInspectorPane fires <code>loadToolResultIfMissing(callId:)</code> which splices a single result into the message stream without re-fetching anything else.</li>
|
||||
</ul>
|
||||
<p>Effect: a 160-message thinking-model session that used to time out at exactly 30s now opens in under 2 seconds with placeholder cards filling in over the next few. Activity loads in 500-800ms.</p>
|
||||
<h4>SSH cancellation that actually cancels</h4>
|
||||
<p><code>Task.detached { … }</code> doesn't inherit cancellation from the awaiting parent, and <code>Task<…> { … }</code> (unstructured) also drops the signal. Without explicit bridging, cancelling a chat-load Task only unwinds Swift state — the underlying ssh subprocess kept running for the full 30s, pinning a remote sqlite query and a ControlMaster session slot. This produced the "third chat hangs" / "dashboard spins after rapid switching" symptom.</p>
|
||||
<p>v2.7 wires <code>withTaskCancellationHandler</code> through <a href="https://github.com/awizemann/scarf/blob/main/scarf/Packages/ScarfCore/Sources/ScarfCore/Transport/SSHScriptRunner.swift"><code>SSHScriptRunner.run</code></a> and <a href="https://github.com/awizemann/scarf/blob/main/scarf/Packages/ScarfCore/Sources/ScarfCore/Services/Backends/RemoteSQLiteBackend.swift"><code>RemoteSQLiteBackend.query</code></a> so parent cancellation reaches the <code>Process</code> and calls <code>proc.terminate()</code> within 100ms. New <code>ssh.cancelled</code> ScarfMon event surfaces this.</p>
|
||||
<h4>In-flight coalescing for <code>loadRecentSessions</code></h4>
|
||||
<p>File-watcher deltas during an active stream used to stack 2-3 parallel sessions-list reload tasks (the 500ms <code>scheduleSessionsRefresh</code> debounce only suppresses a pending tick, not one already executing). Subsequent callers now await the in-flight load instead of spawning a parallel SSH subprocess. New <code>mac.loadRecentSessions.coalesced</code> event tracks dedup hits.</p>
|
||||
<h4>Loading-state UX hardening</h4>
|
||||
<p>The Mac chat sidebar greys out and disables row taps the moment a session-switch is initiated (synchronously, before <code>client.start()</code> returns), with a floating ProgressView showing the current phase: <strong>"Spawning hermes acp…"</strong> → <strong>"Authenticating…"</strong> → <strong>"Loading session…"</strong> → <strong>"Loading history…"</strong> → <strong>"Ready"</strong>. Pre-fix the sidebar looked engageable while the 5-7 second SSH+ACP boot was still in flight, and the user could queue up a second session-switch behind the first. New <code>isStartingSession</code> flag flips on user click for instant feedback.</p>
|
||||
<h4>Partial-result + mismatch + pinned-model banners</h4>
|
||||
<ul>
|
||||
<li><strong>Partial-result banner.</strong> When the skeleton fetch trips an SSH transport failure (rather than a clean empty result), the chat surfaces "Couldn't load full chat history — the connection to <em>server</em> timed out" through the existing <code>acpError</code> triplet, plus forces <code>hasMoreHistory = true</code> so the "Load earlier" affordance shows up. Replaces the pre-fix silent empty transcript.</li>
|
||||
<li><strong>Model/provider mismatch banner.</strong> <a href="https://github.com/awizemann/scarf/blob/main/scarf/Packages/ScarfCore/Sources/ScarfCore/Services/ModelPreflight.swift"><code>ModelPreflight.detectMismatch</code></a> recognizes when <code>model.default</code> carries a <code><provider>/...</code> prefix that disagrees with <code>model.provider</code> (e.g. <code>anthropic/claude-sonnet-4.6</code> + <code>provider: nous</code> after switching OAuth via Credential Pools). Banner offers one-click fix in either direction.</li>
|
||||
<li><strong>Pinned-model failure hint.</strong> ACP error classifier now recognizes <code>model_not_found</code> / <code>404 messages</code> / <code>model is not available</code> and surfaces "This session was created with a model the provider no longer offers — start a new chat to use your current model" so the pinned-model failure mode has a clear recovery path.</li>
|
||||
<li><strong>OAuth-completion provider swap.</strong> After a successful OAuth in Credential Pools, if the just-authed provider differs from <code>model.provider</code>, surface "Switch active provider to <em>name</em>?" with [Switch] / [Keep current] instead of auto-dismissing.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3>New Project from Scratch wizard + Keychain-backed cron secrets</h3>
|
||||
<p>A <strong>third project entry point</strong> alongside Browse Catalog and Add Existing Project: a wizard that scaffolds a Scarf-standard project skeleton (<code><project>/.scarf/dashboard.json</code> + AGENTS.md marker block), registers it, and hands off to a chat session that auto-activates the bundled <code>scarf-template-author</code> skill. The skill drives the rest conversationally — widgets, optional config schema, optional cron — and writes the final files itself. Wizard stays minimal because the agent does configuration better than a multi-step form. The skill ships bundled inside <code>Scarf.app/Contents/Resources/BuiltinSkills.bundle/</code> and copies into <code>~/.hermes/skills/</code> on launch (idempotent + version-gated).</p>
|
||||
<p><strong>Cron + Keychain — <code>$SCARF_<SLUG>_<FIELD></code> env vars.</strong> Cron prompts that referenced <code>secret</code>-typed config fields used to get the literal <code>keychain://...</code> URI back when reading <code>config.json</code>, producing 401s. v2.7 mirrors resolved Keychain values into <code>~/.hermes/.env</code> under a marker-bounded block keyed by template slug:</p>
|
||||
<pre><code># scarf-secrets:begin local-news-aggregator
|
||||
SCARF_LOCAL_NEWS_AGGREGATOR_API_TOKEN=actual-value
|
||||
SCARF_LOCAL_NEWS_AGGREGATOR_RSS_URL=https://example.com/feed
|
||||
# scarf-secrets:end local-news-aggregator</code></pre>
|
||||
<p>Hermes already reloads <code>~/.hermes/.env</code> per cron tick, so credential rotation is automatic — just edit the value in Configuration → next tick sees it. The mirror runs at every state-change point: install, post-install Configuration save, uninstall, "Remove from List", and on app launch (reconciliation pass over registered projects). Source of truth stays in the Keychain — <code>config.json</code> keeps <code>keychain://</code> URIs unchanged. Mode 0600 enforced on <code>~/.hermes/.env</code>.</p>
|
||||
<p>Cron prompts now reference these env vars directly:</p>
|
||||
<pre><code>{
|
||||
"prompt": "Use the terminal: curl -sS -H \"Authorization: Bearer $SCARF_LOCAL_NEWS_AGGREGATOR_API_TOKEN\" \"$SCARF_LOCAL_NEWS_AGGREGATOR_RSS_URL\" -o {{PROJECT_DIR}}/.scarf/feed.xml"
|
||||
}</code></pre>
|
||||
<p><strong>Migration.</strong> First launch of v2.7 walks the project registry and writes the managed block per schemaful project — automatic. Existing cron prompts you wrote against the old (broken) <code>config.json</code> pattern still need updating: open the cron job in Scarf's Cron sidebar and edit the prompt, or ask the agent in chat ("Update my Local News cron job's prompt to use the new env var convention") — the bundled <code>scarf-template-author</code> skill (now v1.1.0) documents the convention with worked examples.</p>
|
||||
<p>Also fixes <a href="https://github.com/awizemann/scarf/issues/75">#75</a> — <code>_NSDetectedLayoutRecursion</code> on the Configuration form for projects whose form transitioned between stages with different intrinsic heights.</p>
|
||||
<hr>
|
||||
<h3>Project dashboards — file-reading widgets, sparklines, typed status</h3>
|
||||
<p>Five new widget types, project-wide auto-refresh, and a structured error card for unknown widgets. Backwards-compatible — every existing <code>dashboard.json</code> renders byte-identically.</p>
|
||||
<ul>
|
||||
<li><strong>Project-wide auto-refresh.</strong> <a href="https://github.com/awizemann/scarf/blob/main/scarf/scarf/Core/Services/HermesFileWatcher.swift"><code>HermesFileWatcher</code></a> used to watch each project's <code>dashboard.json</code> specifically. v2.7 promotes that to a watch on the entire <code><project>/.scarf/</code> directory. A <code>markdown_file</code> or <code>log_tail</code> widget pointing at <code><project>/.scarf/reports/foo.md</code> refreshes the moment a cron job rewrites the file. <strong>By convention, place files the dashboard reads inside <code>.scarf/</code></strong> so the watch picks them up.</li>
|
||||
<li><strong><code>markdown_file</code></strong> — renders a markdown file from disk through the same <code>MarkdownContentView</code> pipeline used by inline <code>text</code> widgets.</li>
|
||||
<li><strong><code>log_tail</code></strong> — last <code>lines</code> of a file (default 20, max 200), monospaced, ANSI codes stripped.</li>
|
||||
<li><strong><code>cron_status</code></strong> — last run / next run / state for one Hermes cron job by <code>jobId</code>, plus a small inline log tail. Read-only — Run/Pause/Resume controls stay on the Cron tab.</li>
|
||||
<li><strong><code>image</code></strong> — local file (<code>path</code> relative to project root) or remote <code>url</code>. Optional <code>height</code> cap. Useful for matplotlib/Plotly PNGs the cron job generates.</li>
|
||||
<li><strong><code>status_grid</code></strong> — compact NxM grid of colored cells, one per service / item, with hover labels.</li>
|
||||
<li><strong><code>stat</code> widget gains inline sparklines.</strong> Optional <code>sparkline: [Number]</code> field. SVG-only render, dozens per dashboard cost nothing.</li>
|
||||
<li><strong>Typed status badges.</strong> <code>list</code> items and <code>status_grid</code> cells share a typed enum (<code>success</code>, <code>warning</code>, <code>danger</code>, <code>info</code>, <code>pending</code>, <code>done</code>, <code>neutral</code>) with lenient decode for synonyms (<code>ok</code>/<code>up</code> → success, <code>down</code>/<code>error</code> → danger). Unknown strings render as plain text.</li>
|
||||
<li><strong>Structured widget error card.</strong> Replaces the legacy "Unknown: \<type\>" placeholder with a card surfacing the title, specific reason, and a hint.</li>
|
||||
<li><strong>Schema mirror.</strong> The widget vocabulary lives once at <a href="https://github.com/awizemann/scarf/blob/main/tools/widget-schema.json"><code>tools/widget-schema.json</code></a>; the catalog validator reads from it and enforces per-type required fields.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3>OAuth resilience + Credential Pools</h3>
|
||||
<ul>
|
||||
<li><strong>Daily OAuth keepalive cron.</strong> Prevents Anthropic OAuth refresh tokens from expiring after weeks of inactivity. New cron job <code>[scarf:oauth-keepalive]</code> (managed by Scarf) pings Hermes on a daily cadence; the in-app Refresh All Sessions action mirrors the same path on demand.</li>
|
||||
<li><strong>Remote re-auth.</strong> Re-authenticating against a remote droplet's OAuth provider used to be blocked by the lack of a stdin path through SSHTransport. The OAuth flow now drives a remote <code>hermes auth add</code> correctly with stdin forwarded.</li>
|
||||
<li><strong>OAuth remove button.</strong> Per-provider remove action in Credential Pools (auth.json edit), with confirmation dialog. Companion auto-refresh of the view when <code>auth.json</code> changes externally (file-watcher).</li>
|
||||
<li><strong><code>resolve_provider_client</code> error classification.</strong> When an auxiliary task references a provider whose credentials aren't loaded, Hermes prints <code>resolve_provider_client: <name> requested but <Display Name> not configured</code> to stderr — pre-fix this surfaced in chat as the opaque <code>-32603 Internal error</code> with no actionable detail. Now classified into a clear hint pointing at Settings → Aux Models.</li>
|
||||
<li><strong>Aux Tab unknown-task surface.</strong> When <code>config.yaml</code> has an <code>auxiliary.<task></code> block for a task Scarf doesn't know about (newer Hermes added it; Scarf hasn't caught up), render it as a plain row with the raw provider/model values instead of dropping it silently.</li>
|
||||
<li><strong>Credential Pools refresh after OAuth sheet dismiss.</strong> Closing the OAuth sheet after a successful add now refreshes the list immediately instead of leaving the just-added pool hidden until the next file-watcher tick.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3>ScarfMon — performance instrumentation harness</h3>
|
||||
<p>The diagnostic surface that drove the bulk of the v2.7 perf work. Off by default; signpost-only mode (Instruments-friendly) is free; Full mode (4096-entry in-memory ring buffer + os.Logger) is a click away in Settings → Diagnostics → Performance. Wiki: https://github.com/awizemann/scarf/wiki/Performance-Monitoring</p>
|
||||
<ul>
|
||||
<li><strong>Phases 1-3</strong> built the core: dispatcher + ring buffer + 3 backends, chat / transport / sqlite measure points, diagnostic counters for chat-render bursts, finalize-burst dampening.</li>
|
||||
<li><strong>Tier A + B</strong> added per-feature instrumentation: iOS file watcher, sessions list, model catalog, dashboard widgets, image encoder, message hydration.</li>
|
||||
<li><strong>Nous picker investigation</strong> localized a 60s + 120s beach-ball to a specific path (Nous catalog <code>readCache</code>), then killed the 120s one with dedupe + 5s timeout.</li>
|
||||
<li><strong>Tier C catch-up</strong> (this release): instrumented Memory / Skills / Cron / Curator load paths so future captures show how often these tabs cost multiple sequential SFTP RTTs on remote.</li>
|
||||
<li><strong>Per-call bytes recorded</strong> on transport + sqlite events so captures show payload sizes alongside latencies.</li>
|
||||
<li><strong><code>mac.emptyAssistantTurn</code> event</strong> documents the Nous quirk where the model returns a thought stream with no body (the bubble looks like Hermes is "still thinking" but the turn already finished).</li>
|
||||
</ul>
|
||||
<p>Adding a new measure point is two lines. The harness covers Mac and iOS uniformly. The "Copy as JSON" button exports the ring buffer for paste-into-issue diagnosis.</p>
|
||||
<hr>
|
||||
<h3>Other fixes + polish</h3>
|
||||
<ul>
|
||||
<li><strong>Sessions sidebar reload debounce</strong> — file-watcher deltas during streaming used to flicker the sessions list. Coalesced into one trailing fetch ~500ms after the last tick.</li>
|
||||
<li><strong>Session-load pagination + race guard</strong> — switching to a small chat while a larger one is mid-fetch could last-write-wins the small chat away. Three race-checks against <code>self.sessionId</code> prevent the stale fetch from overwriting.</li>
|
||||
<li><strong>Sessions + previews batched</strong> — two separate SSH calls folded into one <code>queryBatch</code> round trip, halving the round-trips for every sidebar refresh.</li>
|
||||
<li><strong>Remote SQLite query timeout</strong> bumped 15→30s to better tolerate slow links; in-flight query coalescing dedupes concurrent identical queries.</li>
|
||||
<li><strong><code>Thread.sleep</code> spin replaced</strong> with a kernel-wait via <code>DispatchGroup</code> for <code>runLocal</code> timeout; under concurrent SSH load the old loop accumulated spin-blocked threads and produced 7-second outliers in <code>loadRecentSessions</code>.</li>
|
||||
<li><strong>Window position + size</strong> persists across launches.</li>
|
||||
<li><strong>Sidebar reorder</strong> — Projects promoted to first section; profile chip moved under server name.</li>
|
||||
<li><strong><code>stop</code> badge suppressed</strong> on metadata footer for normal turn ends (it was firing for every clean completion, looking like an error).</li>
|
||||
<li><strong>Nous picker search field</strong> + <code>model-picker</code> filter for the long Nous overlay model list.</li>
|
||||
<li><strong><code>oauth-keepalive</code> cron create</strong> — drop the <code>--silent</code> flag Hermes doesn't accept.</li>
|
||||
<li><strong>Snapshot pipeline rewritten</strong> — replaced the <code>sqlite3 .backup</code>-then-download pipeline with direct SSH-streamed query execution (issue <a href="https://github.com/awizemann/scarf/issues/74">#74</a>). Eliminates the multi-minute snapshot wait on multi-GB state.db files. Companion fix: pre-expand <code>~/</code> in Swift via <code>resolvedUserHome</code> so sqlite3 finds the DB without depending on the remote shell's tilde expansion.</li>
|
||||
<li><strong>Aux nested-YAML parser</strong> — corrected the parser so the unknown-task surface works on remote (was previously dropping aux blocks whose <code>provider:</code> value lived on a separate line).</li>
|
||||
<li><strong><code>ModelPreflight</code> newline trim bug</strong> — <code>.whitespaces</code> doesn't strip newlines; switched both trims to <code>.whitespacesAndNewlines</code> so a stray <code>\n</code> in a hand-edited config.yaml doesn't false-positive the mismatch banner.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3>What's measured today</h3>
|
||||
<p>321 ScarfCore tests pass (302 prior + 19 new ModelPreflight). New ScarfMon events documented in the <a href="https://github.com/awizemann/scarf/wiki/Performance-Monitoring">Performance-Monitoring wiki</a>.</p>
|
||||
<h3>Compatibility</h3>
|
||||
<ul>
|
||||
<li>macOS 14+ (unchanged).</li>
|
||||
<li>Hermes target: still <strong>v2026.4.30 (v0.12.0)</strong>. No new Hermes capability gates added.</li>
|
||||
<li>Existing <code>dashboard.json</code> files render unchanged.</li>
|
||||
<li>Existing <code>.scarftemplate</code> bundles install unchanged. Catalog manifest schemaVersion stays at 1/2/3 — no bump.</li>
|
||||
<li>Existing <code>~/.hermes/.env</code> content is preserved byte-identically — Scarf only writes inside its <code># scarf-secrets:begin <slug></code> / <code># scarf-secrets:end <slug></code> regions.</li>
|
||||
<li>The skeleton-then-hydrate chat loader and SSH cancellation propagation are <strong>Mac-only</strong> in this release; ScarfGo (iOS) keeps its existing chat path.</li>
|
||||
</ul>
|
||||
<h3>What's deferred</h3>
|
||||
<ul>
|
||||
<li><strong>Per-widget data sources + per-widget refresh granularity.</strong> The general "widget points at a typed data source" abstraction is the next-largest win in dashboards but materially expands the model + JS mirror + validator surface. The project-wide watch covers the common cron-driven workflow without it.</li>
|
||||
<li><strong>Cross-project health digest sidebar rollup.</strong> Counting attention-needed projects across the registry — scoped but didn't pull its weight. The typed status enum makes it cheap to add later.</li>
|
||||
<li><strong>Automatic cron-prompt rewriter on upgrade.</strong> Heuristic rewrites of free-form prompts are risky; the docs + agent-assisted path ships in v2.7. Revisit a "scan + fix" UI in v2.8 if real users miss the migration.</li>
|
||||
<li><strong>iOS New Project wizard + iOS Keychain-env mirror.</strong> ScarfGo's project surface is read-only; the wizard's chat-handoff pattern depends on Mac-only ACP plumbing.</li>
|
||||
<li><strong>iOS skeleton-then-hydrate loaders.</strong> Same data-service surfaces are public, but the iOS chat lifecycle is structured differently. Defer until iOS dogfooding shows the same payload-size pain.</li>
|
||||
<li><strong>Tier C redesigns (Memory/Skills/Cron/Curator).</strong> Instrumented in v2.7; redesign waits for capture data showing which path actually needs the skeleton-then-hydrate treatment.</li>
|
||||
</ul>
|
||||
</body></html>
|
||||
]]></description>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.7.0/Scarf-v2.7.0-Universal.zip"
|
||||
sparkle:edSignature="JfHK1sKbP3ubbznXx3uY/a3kY2szkWpTUQmtHJE54Uv970T5PxgIHCTwsimqtZCPepUTv2qK4TRQfqHJBKUmCA=="
|
||||
length="18793474"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.6.5</title>
|
||||
<sparkle:version>31</sparkle:version>
|
||||
<sparkle:shortVersionString>2.6.5</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Sun, 03 May 2026 20:20:29 +0000</pubDate>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.6.5/Scarf-v2.6.5-Universal.zip"
|
||||
sparkle:edSignature="2hYRNX/z+mQ7TjlHfDAiTHiP/Rk1BoJRjjefPvutooiptwOK6EyYq/9crnHYZYe8xvEQTDMmAvsPz4vYz823Cg=="
|
||||
length="18257858"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.6.0</title>
|
||||
<sparkle:version>29</sparkle:version>
|
||||
<sparkle:shortVersionString>2.6.0</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Fri, 01 May 2026 13:48:15 +0000</pubDate>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.6.0/Scarf-v2.6.0-Universal.zip"
|
||||
sparkle:edSignature="gI1uwJAvmwdlvngLcsSQFtMDsHyI6+DWN23ZjOX/BYmX+BqKu0XLuAXL1tztZV9RF1l5PG+vNVWGnq6ivqVQCQ=="
|
||||
length="18031081"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.5.2</title>
|
||||
<sparkle:version>28</sparkle:version>
|
||||
<sparkle:shortVersionString>2.5.2</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Wed, 29 Apr 2026 11:47:40 +0000</pubDate>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.5.2/Scarf-v2.5.2-Universal.zip"
|
||||
sparkle:edSignature="tPgE0ajkNs+OYuYGgB8jVLtY/tGTaUJlrJCf5I5AbwCU2R+Zu08D+pLB17q01A3AgwYfYTLZbnoTG+xO4ys8DQ=="
|
||||
length="17367761"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.5.1</title>
|
||||
<sparkle:version>27</sparkle:version>
|
||||
<sparkle:shortVersionString>2.5.1</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Mon, 27 Apr 2026 13:38:41 +0000</pubDate>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.5.1/Scarf-v2.5.1-Universal.zip"
|
||||
sparkle:edSignature="OArax2dY25Q7ZRFYGcviaGmCQCJsIugcBdjTET//mJ4XTT/FnnPQoSTIYaQrsV+mwFZU//G75q9PwPtnNsPiCA=="
|
||||
length="17090983"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.5.0</title>
|
||||
<sparkle:version>26</sparkle:version>
|
||||
<sparkle:shortVersionString>2.5.0</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Sat, 25 Apr 2026 15:42:47 +0000</pubDate>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.5.0/Scarf-v2.5.0-Universal.zip"
|
||||
sparkle:edSignature="YnHpGMIiL8jyDn3+h8B7Gqzrlz8SXDSyiUXGm9DD6BIkRfYfzi3AVatkxfBLMvoVhlqPGKIhKsB8ybqopgjpCw=="
|
||||
length="16994785"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.3.0</title>
|
||||
<sparkle:version>25</sparkle:version>
|
||||
<sparkle:shortVersionString>2.3.0</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Fri, 24 Apr 2026 01:20:51 +0000</pubDate>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.3.0/Scarf-v2.3.0-Universal.zip"
|
||||
sparkle:edSignature="vae/hUTU7UOSY/LYU/pt1A9wnbKgvp22+e2peGA/clmloaA22gxCnBX5JALT1w93eHYMLOtvdSf5OrNHyogHDQ=="
|
||||
length="14783787"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.2.1</title>
|
||||
<sparkle:version>24</sparkle:version>
|
||||
<sparkle:shortVersionString>2.2.1</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Thu, 23 Apr 2026 20:10:10 +0000</pubDate>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.2.1/Scarf-v2.2.1-Universal.zip"
|
||||
sparkle:edSignature="nFdO9t2wWWKeXehQCm7btr7kzCtmDDg4xsvrm4Z24fqOB+Y9ffYcIBr+e9pqnLSIJJ6r/lYcyz5FlkUMjYXyCw=="
|
||||
length="17868308"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.2.0</title>
|
||||
<sparkle:version>23</sparkle:version>
|
||||
<sparkle:shortVersionString>2.2.0</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Thu, 23 Apr 2026 16:31:53 +0000</pubDate>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.2.0/Scarf-v2.2.0-Universal.zip"
|
||||
sparkle:edSignature="mGuKLJbcugMTKdSlrkgYKjpVAaXY8CsMVhCiAo/O7b4K8S/fRaK7ZZNdbLtfSGndrbVWcSU0IIhaB1rBGaPOBQ=="
|
||||
length="17867934"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.1.0</title>
|
||||
<sparkle:version>22</sparkle:version>
|
||||
<sparkle:shortVersionString>2.1.0</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Tue, 21 Apr 2026 01:50:30 +0000</pubDate>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.1.0/Scarf-v2.1.0-Universal.zip"
|
||||
sparkle:edSignature="kllR3yC/Cze1W9fSM+WRIE5YVObubEGmV629hAvxzVhvVIJ9n+qa00WOAC3YakZLEKX46DmowEMQf5ikqQGODQ=="
|
||||
length="17243337"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.0.2</title>
|
||||
<sparkle:version>21</sparkle:version>
|
||||
<sparkle:shortVersionString>2.0.2</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Mon, 20 Apr 2026 22:50:02 +0000</pubDate>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.0.2/Scarf-v2.0.2-Universal.zip"
|
||||
sparkle:edSignature="3BF7PzLqO835wr+cCEA0Ls4kfp2hNwgDmM8YlvUKM9R/GwTs+tgtSPLTwfr1UyXNH/83uNRuSeZM8iNgV4dPDA=="
|
||||
length="17063811"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.0.0</title>
|
||||
<sparkle:version>19</sparkle:version>
|
||||
<sparkle:shortVersionString>2.0.0</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Sun, 19 Apr 2026 20:11:43 +0000</pubDate>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v2.0.0/Scarf-v2.0.0-Universal.zip"
|
||||
sparkle:edSignature="QTgPwFgHk5SbUYKrgg412o/Yc7ZhSiow/33EoWnN+julyEVw/0MwemjHNcwcX+aVQJV4arMp7xGVMzaVV/j1CQ=="
|
||||
length="16906164"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 1.6.2</title>
|
||||
<sparkle:version>18</sparkle:version>
|
||||
<sparkle:shortVersionString>1.6.2</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Sat, 18 Apr 2026 00:22:28 +0000</pubDate>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v1.6.2/Scarf-v1.6.2-Universal.zip"
|
||||
sparkle:edSignature="wtf0QjTKCvYq8BZW1meeWdWk8GMsbYopfM/DNiYw8ImdgmX6X8jN5+bIG9KvzYv0VgZ0la8ssSliiz7zdJA2CQ=="
|
||||
length="16570465"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 1.6.1</title>
|
||||
<sparkle:version>17</sparkle:version>
|
||||
<sparkle:shortVersionString>1.6.1</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>14.6</sparkle:minimumSystemVersion>
|
||||
<pubDate>Fri, 17 Apr 2026 02:11:53 +0000</pubDate>
|
||||
<enclosure url="https://github.com/awizemann/scarf/releases/download/v1.6.1/Scarf-v1.6.1-Universal.zip"
|
||||
sparkle:edSignature="hoYDb7VRQ+YDNUox1kf7eYbhckOJWYLEi8ZPfBZG59qK4L/5N2mmgV7jOCLriHkNx0F4mvM9UK8UQZIkxsX1DA=="
|
||||
length="16566934"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 391 KiB |
|
After Width: | Height: | Size: 632 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 429 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 183 KiB |
|
After Width: | Height: | Size: 514 KiB |
|
After Width: | Height: | Size: 472 KiB |
|
After Width: | Height: | Size: 750 KiB |
|
After Width: | Height: | Size: 473 KiB |
|
After Width: | Height: | Size: 539 KiB |
|
After Width: | Height: | Size: 261 KiB |
|
After Width: | Height: | Size: 600 KiB |
|
After Width: | Height: | Size: 328 KiB |
|
After Width: | Height: | Size: 750 KiB |
|
After Width: | Height: | Size: 473 KiB |
|
After Width: | Height: | Size: 412 KiB |
|
After Width: | Height: | Size: 189 KiB |
|
After Width: | Height: | Size: 553 KiB |
|
After Width: | Height: | Size: 276 KiB |
|
After Width: | Height: | Size: 501 KiB |
|
After Width: | Height: | Size: 241 KiB |
|
After Width: | Height: | Size: 790 KiB |
|
After Width: | Height: | Size: 488 KiB |
|
After Width: | Height: | Size: 577 KiB |
|
After Width: | Height: | Size: 354 KiB |
|
After Width: | Height: | Size: 591 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,684 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
|
||||
<title>Scarf — Native Mac & iOS app for your Hermes AI agent</title>
|
||||
<meta name="description" content="Scarf is the native macOS and iOS GUI for the Hermes AI agent — sessions, projects, memory, skills, cron, multi-server SSH. Free and open source.">
|
||||
<link rel="canonical" href="https://awizemann.github.io/scarf/">
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="Scarf">
|
||||
<meta property="og:title" content="Scarf — Native Mac & iOS app for your Hermes AI agent">
|
||||
<meta property="og:description" content="Native macOS and iOS GUI for the Hermes AI agent. Sessions, projects, memory, skills, cron, multi-server SSH. Free and open source.">
|
||||
<meta property="og:url" content="https://awizemann.github.io/scarf/">
|
||||
<meta property="og:image" content="https://awizemann.github.io/scarf/assets/og-image.png">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
<meta property="og:image:alt" content="Scarf — native Mac & iOS app for the Hermes AI agent">
|
||||
|
||||
<!-- Twitter -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="Scarf — Native Mac & iOS app for your Hermes AI agent">
|
||||
<meta name="twitter:description" content="Native macOS and iOS GUI for the Hermes AI agent. Sessions, projects, memory, skills, cron, multi-server SSH.">
|
||||
<meta name="twitter:image" content="https://awizemann.github.io/scarf/assets/twitter-card.png">
|
||||
|
||||
<!-- Theme + favicons -->
|
||||
<meta name="theme-color" content="#C2563D" media="(prefers-color-scheme: light)">
|
||||
<meta name="theme-color" content="#1A1818" media="(prefers-color-scheme: dark)">
|
||||
<link rel="icon" href="favicon.ico" sizes="any">
|
||||
<link rel="icon" href="assets/icon-192.png" type="image/png" sizes="192x192">
|
||||
<link rel="icon" href="assets/icon-512.png" type="image/png" sizes="512x512">
|
||||
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
||||
<link rel="manifest" href="manifest.webmanifest">
|
||||
|
||||
<!-- AI crawler hint -->
|
||||
<link rel="alternate" type="text/plain" title="LLM-friendly summary" href="llms.txt">
|
||||
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-link" href="#main">Skip to content</a>
|
||||
|
||||
<header class="site-header" role="banner">
|
||||
<a class="brand" href="./" aria-label="Scarf home">
|
||||
<img src="assets/scarf-icon-512.png" width="32" height="32" alt="" decoding="async">
|
||||
<span class="brand-name">Scarf</span>
|
||||
</a>
|
||||
<nav class="site-nav" aria-label="Primary">
|
||||
<a href="#features">Features</a>
|
||||
<a href="#ios">iPhone</a>
|
||||
<a href="templates/">Templates</a>
|
||||
<a href="#download">Download</a>
|
||||
<a href="https://github.com/awizemann/scarf" rel="noopener">GitHub</a>
|
||||
</nav>
|
||||
<button type="button" class="theme-toggle" aria-label="Toggle dark mode" data-theme-toggle>
|
||||
<svg class="theme-icon icon-sun" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="4"></circle><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"></path></svg>
|
||||
<svg class="theme-icon icon-moon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<main id="main">
|
||||
|
||||
<!-- Hero -->
|
||||
<section class="hero" id="hero" aria-labelledby="hero-title">
|
||||
<div class="hero-copy">
|
||||
<h1 id="hero-title">Native Mac & iOS app<br>for your Hermes AI agent.</h1>
|
||||
<p class="hero-lede">
|
||||
Scarf is a native macOS and iOS GUI for the
|
||||
<a href="https://github.com/hermes-ai/hermes-agent" rel="noopener">Hermes AI agent</a>.
|
||||
See every session, project, skill, memory file, and cron job — locally on your Mac
|
||||
and remotely from your iPhone over SSH.
|
||||
</p>
|
||||
<div class="cta-row">
|
||||
<a class="btn btn-primary" href="https://github.com/awizemann/scarf/releases/latest" rel="noopener">
|
||||
<span>Download for Mac</span>
|
||||
<span class="btn-meta">macOS 14.6+ · Apple Silicon & Intel</span>
|
||||
</a>
|
||||
<a class="btn btn-secondary" href="https://testflight.apple.com/join/qCrRpcTz" rel="noopener">
|
||||
<span>Get on iPhone</span>
|
||||
<span class="btn-meta">TestFlight · iOS 18+</span>
|
||||
</a>
|
||||
</div>
|
||||
<p class="hero-prereq">
|
||||
Requires <a href="https://github.com/hermes-ai/hermes-agent" rel="noopener">Hermes</a> installed at <code>~/.hermes/</code>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="hero-visual" aria-hidden="false">
|
||||
<picture class="hero-mac">
|
||||
<source media="(prefers-color-scheme: dark)" srcset="assets/screenshots/mac-hero-dark.png">
|
||||
<img data-dark-src="assets/screenshots/mac-hero-dark.png" src="assets/screenshots/mac-hero.png"
|
||||
alt="Scarf on macOS — chat view streaming a response with a tool-call card"
|
||||
width="1600" height="1000"
|
||||
fetchpriority="high" decoding="async">
|
||||
</picture>
|
||||
<picture class="hero-iphone">
|
||||
<img src="assets/screenshots/ios-chat.png"
|
||||
alt="ScarfGo on iPhone — chat with the Hermes agent over SSH"
|
||||
width="430" height="932"
|
||||
decoding="async">
|
||||
</picture>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Trust strip -->
|
||||
<aside class="trust-strip" aria-label="At a glance">
|
||||
<ul>
|
||||
<li>Native Swift 6</li>
|
||||
<li>No Electron</li>
|
||||
<li>MIT licensed</li>
|
||||
<li>Sparkle auto-updates</li>
|
||||
<li>macOS 14.6+ · iOS 18+</li>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<!-- What Scarf does (AEO load-bearing paragraph) -->
|
||||
<section class="what" id="what" aria-labelledby="what-title">
|
||||
<h2 id="what-title">What Scarf does</h2>
|
||||
<p>
|
||||
Scarf is a native macOS and iOS GUI for the Hermes AI agent. It surfaces every part of a
|
||||
running Hermes installation — chat sessions, project workspaces, memory files, installed
|
||||
skills, MCP servers, cron jobs, messaging gateways, logs, and configuration — through a
|
||||
sidebar-driven app on Mac and a tab-based companion on iPhone. Scarf reads from
|
||||
<code>~/.hermes/state.db</code> directly (read-only), streams agent replies in real time
|
||||
over the Agent Client Protocol, and connects to remote Hermes installations through your
|
||||
existing SSH config. There is no telemetry, no login, and no separate cloud service.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<!-- Mac feature blocks -->
|
||||
<section class="features" id="features" aria-labelledby="features-title">
|
||||
<h2 id="features-title" class="section-heading">Built for the way Hermes actually works</h2>
|
||||
|
||||
<article class="feature feature-flip">
|
||||
<div class="feature-text">
|
||||
<h3>Live agent sessions</h3>
|
||||
<p>
|
||||
Real-time streaming chat over the Agent Client Protocol. Tool calls render inline with
|
||||
collapsible argument and output panes. Tool-permission requests surface as interactive
|
||||
dialogs you can approve, deny, or stage. Reasoning and thinking blocks display when the
|
||||
model emits them. Resume any prior session from the sidebar, or jump back into a
|
||||
conversation that disconnected — Scarf reconnects to the same session id.
|
||||
</p>
|
||||
</div>
|
||||
<div class="feature-visual">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="assets/screenshots/mac-chat-dark.png">
|
||||
<img data-dark-src="assets/screenshots/mac-chat-dark.png" src="assets/screenshots/mac-chat.png"
|
||||
alt="Mac app — chat view with a tool-call card and a streaming response"
|
||||
width="1600" height="1000" loading="lazy" decoding="async">
|
||||
</picture>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="feature">
|
||||
<div class="feature-text">
|
||||
<h3>Project workspaces</h3>
|
||||
<p>
|
||||
Per-project chat with the agent's working directory pinned, custom dashboards rendered
|
||||
from a JSON spec the agent itself can author, project-scoped slash commands defined as
|
||||
Markdown files, and a Scarf-managed <code>AGENTS.md</code> block that gives Hermes
|
||||
project context before every session boots. Templates package these into a single
|
||||
<code>.scarftemplate</code> bundle you can share or install with one click.
|
||||
</p>
|
||||
</div>
|
||||
<div class="feature-visual">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="assets/screenshots/mac-projects-dark.png">
|
||||
<img data-dark-src="assets/screenshots/mac-projects-dark.png" src="assets/screenshots/mac-projects.png"
|
||||
alt="Mac app — project dashboard with stat boxes and a chart widget"
|
||||
width="1600" height="1000" loading="lazy" decoding="async">
|
||||
</picture>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="feature feature-flip">
|
||||
<div class="feature-text">
|
||||
<h3>Multi-server over SSH</h3>
|
||||
<p>
|
||||
One window per Hermes server. Local <code>~/.hermes/</code> is synthesized
|
||||
automatically; remote servers connect through your existing
|
||||
<code>~/.ssh/config</code>, ssh-agent, ProxyJump, and ControlMaster. File I/O routes
|
||||
through scp/sftp; the SQLite database is served from atomic snapshots; chat tunnels as
|
||||
<code>ssh -T host hermes acp</code> with JSON-RPC end-to-end. There is no companion
|
||||
service in the middle.
|
||||
</p>
|
||||
</div>
|
||||
<div class="feature-visual">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="assets/screenshots/mac-sessions-dark.png">
|
||||
<img data-dark-src="assets/screenshots/mac-sessions-dark.png" src="assets/screenshots/mac-sessions.png"
|
||||
alt="Mac app — sessions browser filtered to a remote server"
|
||||
width="1600" height="1000" loading="lazy" decoding="async">
|
||||
</picture>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="feature">
|
||||
<div class="feature-text">
|
||||
<h3>Memory, skills, MCP</h3>
|
||||
<p>
|
||||
Edit <code>MEMORY.md</code> and <code>USER.md</code> with live file-watcher refresh and
|
||||
external-provider awareness. Browse the Skills Hub across six registries, install,
|
||||
update, and inspect <code>SKILL.md</code> frontmatter. Configure MCP servers from a
|
||||
curated preset list (GitHub, Linear, Notion, Sentry, Stripe) or fully custom; test the
|
||||
connection in-app and watch the discovered tool list populate.
|
||||
</p>
|
||||
</div>
|
||||
<div class="feature-visual">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="assets/screenshots/mac-mcp-dark.png">
|
||||
<img data-dark-src="assets/screenshots/mac-mcp-dark.png" src="assets/screenshots/mac-mcp.png"
|
||||
alt="Mac app — MCP servers configuration view"
|
||||
width="1600" height="1000" loading="lazy" decoding="async">
|
||||
</picture>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="feature feature-flip">
|
||||
<div class="feature-text">
|
||||
<h3>Cron & messaging gateways</h3>
|
||||
<p>
|
||||
Create, edit, pause, resume, run-now, and delete cron jobs without touching the CLI —
|
||||
with human-readable schedules ("Every weekday at 9:00 AM") and the underlying
|
||||
expression a tap away. Native GUI for thirteen messaging platforms (Telegram, Discord,
|
||||
Slack, WhatsApp, Signal, iMessage, Email, Matrix, Mattermost, Feishu, Home Assistant,
|
||||
Webhook, CLI) with per-platform credential forms and connectivity dots.
|
||||
</p>
|
||||
</div>
|
||||
<div class="feature-visual">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="assets/screenshots/mac-cron-dark.png">
|
||||
<img data-dark-src="assets/screenshots/mac-cron-dark.png" src="assets/screenshots/mac-cron.png"
|
||||
alt="Mac app — cron manager with paused and active jobs"
|
||||
width="1600" height="1000" loading="lazy" decoding="async">
|
||||
</picture>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="feature">
|
||||
<div class="feature-text">
|
||||
<h3>Insights & health</h3>
|
||||
<p>
|
||||
Token usage and cost broken down by day, model, and platform; reasoning tokens
|
||||
tracked separately. Activity heatmaps and notable sessions across 7, 30, 90 days, or
|
||||
all time. Component-level health checks, on-demand diagnostics, and a one-click debug
|
||||
report uploader for Hermes support — with a confirmation dialog before anything
|
||||
leaves the machine.
|
||||
</p>
|
||||
</div>
|
||||
<div class="feature-visual">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="assets/screenshots/mac-dashboard-dark.png">
|
||||
<img data-dark-src="assets/screenshots/mac-dashboard-dark.png" src="assets/screenshots/mac-dashboard.png"
|
||||
alt="Mac app — dashboard with token usage, recent sessions, and health"
|
||||
width="1600" height="1000" loading="lazy" decoding="async">
|
||||
</picture>
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<!-- iOS / ScarfGo -->
|
||||
<section class="ios" id="ios" aria-labelledby="ios-title">
|
||||
<div class="ios-copy">
|
||||
<p class="eyebrow">ScarfGo for iPhone</p>
|
||||
<h2 id="ios-title">Your Hermes agent, on your phone.</h2>
|
||||
<p>
|
||||
ScarfGo is the native iOS companion to Scarf. It speaks SSH directly to your Hermes
|
||||
host using <a href="https://github.com/orlandos-nl/Citadel" rel="noopener">Citadel</a> — a
|
||||
pure-Swift SSH stack, no companion service, no developer-controlled relay. Generate an
|
||||
Ed25519 keypair on the device, paste the public half into <code>authorized_keys</code>,
|
||||
and you have full project-aware chat, session resume, memory editing, cron browsing,
|
||||
and skill management on iOS 18+.
|
||||
</p>
|
||||
<ul class="ios-points">
|
||||
<li>Pure-Swift SSH — keys live in the iOS Keychain and never leave the device.</li>
|
||||
<li>Multi-server: connect to as many Hermes hosts as you have SSH access to.</li>
|
||||
<li>Project-scoped chat writes the same Scarf-managed <code>AGENTS.md</code> block as Mac.</li>
|
||||
<li>Same session attribution, so "which project does this conversation belong to?" matches across devices.</li>
|
||||
</ul>
|
||||
<a class="btn btn-primary" href="https://testflight.apple.com/join/qCrRpcTz" rel="noopener">
|
||||
<span>Join the public TestFlight</span>
|
||||
<span class="btn-meta">iOS 18+</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="ios-gallery" role="list" aria-label="ScarfGo screenshots">
|
||||
<div class="phone-frame" role="listitem">
|
||||
<img src="assets/screenshots/ios-servers.png" alt="ScarfGo — server picker with two configured Hermes hosts" loading="lazy" decoding="async" width="430" height="932">
|
||||
</div>
|
||||
<div class="phone-frame" role="listitem">
|
||||
<img src="assets/screenshots/ios-chat.png" alt="ScarfGo — chat with the Hermes agent" loading="lazy" decoding="async" width="430" height="932">
|
||||
</div>
|
||||
<div class="phone-frame" role="listitem">
|
||||
<img src="assets/screenshots/ios-project-dashboard.png" alt="ScarfGo — project dashboard" loading="lazy" decoding="async" width="430" height="932">
|
||||
</div>
|
||||
<div class="phone-frame" role="listitem">
|
||||
<img src="assets/screenshots/ios-skills.png" alt="ScarfGo — skills browser" loading="lazy" decoding="async" width="430" height="932">
|
||||
</div>
|
||||
<div class="phone-frame" role="listitem">
|
||||
<img src="assets/screenshots/ios-system.png" alt="ScarfGo — system tab" loading="lazy" decoding="async" width="430" height="932">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Why native -->
|
||||
<section class="why" id="why" aria-labelledby="why-title">
|
||||
<h2 id="why-title" class="section-heading">Why a native app</h2>
|
||||
<div class="why-grid">
|
||||
<article class="why-card">
|
||||
<h3>Native, not Electron</h3>
|
||||
<p>
|
||||
One Mach-O binary. SwiftUI on macOS 14.6+ and iOS 18+. Kilobytes of memory and
|
||||
negligible energy use compared to a bundled Chromium. Drag-and-drop, sharing, the
|
||||
menu bar, Spotlight, and accessibility all behave the way a Mac or iPhone user
|
||||
expects.
|
||||
</p>
|
||||
</article>
|
||||
<article class="why-card">
|
||||
<h3>Read-only safe</h3>
|
||||
<p>
|
||||
Scarf opens <code>~/.hermes/state.db</code> in read-only WAL mode. The app cannot
|
||||
corrupt your Hermes data even if it crashes mid-write — because it never writes.
|
||||
Memory files and cron jobs are the only mutable surfaces, both with explicit
|
||||
confirmations.
|
||||
</p>
|
||||
</article>
|
||||
<article class="why-card">
|
||||
<h3>Open and inspectable</h3>
|
||||
<p>
|
||||
<a href="https://github.com/awizemann/scarf" rel="noopener">MIT licensed</a>, pure
|
||||
Swift, zero external runtime dependencies. Build it yourself with
|
||||
<code>xcodebuild</code> in two minutes. Sparkle auto-updates ship signed,
|
||||
notarized, EdDSA-verified zips — never silent over-the-wire mutations.
|
||||
</p>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Templates teaser -->
|
||||
<section class="templates" id="templates" aria-labelledby="templates-title">
|
||||
<h2 id="templates-title">Project templates</h2>
|
||||
<p>
|
||||
A <code>.scarftemplate</code> bundle packages a project's dashboard, skills, cron jobs,
|
||||
memory blocks, slash commands, and configuration schema into one shareable file.
|
||||
Browse the public catalog and install with a single click.
|
||||
</p>
|
||||
<a class="btn btn-secondary" href="templates/">Browse the template catalog →</a>
|
||||
</section>
|
||||
|
||||
<!-- Download -->
|
||||
<section class="download" id="download" aria-labelledby="download-title">
|
||||
<h2 id="download-title" class="section-heading">Download</h2>
|
||||
<div class="download-grid">
|
||||
<article class="download-card">
|
||||
<h3>Scarf for Mac</h3>
|
||||
<p class="download-meta">macOS 14.6 (Sonoma) or later · Apple Silicon & Intel · Universal binary</p>
|
||||
<ul class="download-points">
|
||||
<li>Notarized, code-signed Developer ID build</li>
|
||||
<li>Sparkle auto-updates with EdDSA signature verification</li>
|
||||
<li>Free and open source under the MIT license</li>
|
||||
</ul>
|
||||
<a class="btn btn-primary" href="https://github.com/awizemann/scarf/releases/latest" rel="noopener">
|
||||
<span>Get the latest release</span>
|
||||
<span class="btn-meta">GitHub Releases · .zip</span>
|
||||
</a>
|
||||
</article>
|
||||
|
||||
<article class="download-card">
|
||||
<h3>ScarfGo for iPhone</h3>
|
||||
<p class="download-meta">iOS 18.0 or later · iPhone · public TestFlight</p>
|
||||
<ul class="download-points">
|
||||
<li>Pure-Swift SSH — no companion service required</li>
|
||||
<li>Multi-server support, identical to Mac</li>
|
||||
<li>Free and open source under the MIT license</li>
|
||||
</ul>
|
||||
<a class="btn btn-primary" href="https://testflight.apple.com/join/qCrRpcTz" rel="noopener">
|
||||
<span>Join the TestFlight</span>
|
||||
<span class="btn-meta">Apple TestFlight</span>
|
||||
</a>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<p class="download-prereq">
|
||||
Both apps require <a href="https://github.com/hermes-ai/hermes-agent" rel="noopener">Hermes</a>
|
||||
installed at <code>~/.hermes/</code> on each host you want to manage. Scarf does not include
|
||||
Hermes itself — see the
|
||||
<a href="https://github.com/hermes-ai/hermes-agent#installation" rel="noopener">Hermes installation
|
||||
guide</a> first.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<!-- FAQ -->
|
||||
<section class="faq" id="faq" aria-labelledby="faq-title">
|
||||
<h2 id="faq-title" class="section-heading">Frequently asked questions</h2>
|
||||
<div class="faq-list">
|
||||
|
||||
<details>
|
||||
<summary>What is Scarf?</summary>
|
||||
<div>
|
||||
<p>Scarf is a native macOS and iOS GUI for the <a href="https://github.com/hermes-ai/hermes-agent" rel="noopener">Hermes AI agent</a>. It surfaces Hermes's sessions, projects, memory, skills, MCP servers, cron jobs, messaging gateways, logs, and configuration through a sidebar-driven Mac app and a tab-based iPhone companion called ScarfGo.</p>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Do I need Hermes installed first?</summary>
|
||||
<div>
|
||||
<p>Yes. Scarf is a client for an existing Hermes installation. It expects to find Hermes's data directory at <code>~/.hermes/</code> on each host you connect to (local or remote). Install Hermes first by following the <a href="https://github.com/hermes-ai/hermes-agent#installation" rel="noopener">Hermes installation guide</a>.</p>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Does Scarf work without internet?</summary>
|
||||
<div>
|
||||
<p>Yes for the local Hermes case — Scarf reads files and the SQLite database directly from <code>~/.hermes/</code> with no network involvement. Internet is only required when Hermes itself reaches out to model providers or MCP servers, when you connect to a remote Hermes host over SSH, or when checking for Sparkle updates.</p>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Is Scarf open source?</summary>
|
||||
<div>
|
||||
<p>Yes. Both Scarf and ScarfGo are <a href="https://github.com/awizemann/scarf/blob/main/LICENSE" rel="noopener">MIT licensed</a> and built from the same open repository at <a href="https://github.com/awizemann/scarf" rel="noopener">github.com/awizemann/scarf</a>. There are no closed-source components and no telemetry.</p>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>What macOS and iOS versions are supported?</summary>
|
||||
<div>
|
||||
<p>Scarf for Mac requires macOS 14.6 Sonoma or later, on Apple Silicon or Intel. ScarfGo for iPhone requires iOS 18.0 or later. Both are universal builds; there is no separate Apple Silicon download.</p>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>How does ScarfGo connect to my Mac?</summary>
|
||||
<div>
|
||||
<p>ScarfGo speaks SSH directly to your Hermes host using a pure-Swift SSH stack (Citadel). On first launch it generates an Ed25519 keypair on the device — the private key lives in the iOS Keychain (with <code>kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly</code>) and is excluded from iCloud sync. Paste the public key into the host's <code>~/.ssh/authorized_keys</code>, and ScarfGo can run <code>hermes acp</code> over the SSH session for chat and read the SQLite database for everything else. There is no companion service or developer-controlled relay.</p>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>What data does Scarf collect?</summary>
|
||||
<div>
|
||||
<p>None. Scarf has no telemetry, no analytics, no crash reporter, and no account system. The only outbound network connections are to GitHub Releases (when you check for updates via Sparkle), to remote Hermes hosts you explicitly add, and to Hermes's own model providers and MCP servers — all initiated by Hermes, not Scarf.</p>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Where are my conversations stored?</summary>
|
||||
<div>
|
||||
<p>In Hermes's own data directory — <code>~/.hermes/state.db</code> for session history and <code>~/.hermes/sessions/session_*.json</code> for full transcripts. Scarf reads these files but never writes to <code>state.db</code>. ScarfGo reads them through SSH-initiated SQLite snapshots and never caches them locally on the device.</p>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>How do updates work?</summary>
|
||||
<div>
|
||||
<p>Scarf for Mac uses <a href="https://sparkle-project.org/" rel="noopener">Sparkle</a> for in-app updates — signed and notarized zips with EdDSA signature verification. The appcast lives at <a href="appcast.xml">awizemann.github.io/scarf/appcast.xml</a>. ScarfGo updates through TestFlight in the usual way until it ships on the App Store.</p>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Can I use Scarf with a remote or headless Hermes server?</summary>
|
||||
<div>
|
||||
<p>Yes — that is one of the main use cases. Add the host through <strong>File → Open Server… → Add Server</strong> on Mac, or tap <strong>Add Server</strong> on the ScarfGo Servers tab. Scarf uses the system SSH config (Mac) or a device-generated key (iOS), so anything reachable through your normal terminal SSH workflow works without extra setup. The remote host needs <code>sqlite3</code> and <code>pgrep</code> on its <code>$PATH</code> and the SSH user needs read access to <code>~/.hermes/</code>.</p>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>What's the difference between Scarf and using Hermes from the terminal?</summary>
|
||||
<div>
|
||||
<p>Scarf is strictly additive — it visualizes data Hermes already produces. The terminal CLI (<code>hermes chat</code>, <code>hermes cron</code>, <code>hermes mcp</code>, etc.) remains the source of truth for everything. Scarf gives you live streaming chat with rich tool-call rendering, multi-server windows, project workspaces with custom dashboards, and a one-pane view of skills, MCP servers, cron jobs, and gateways without memorizing CLI subcommands.</p>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Is there a Windows or Linux version?</summary>
|
||||
<div>
|
||||
<p>No. Scarf is built on SwiftUI and AppKit and ships only for Apple platforms. There are no current plans for Windows or Linux ports — the
|
||||
<a href="https://github.com/hermes-ai/hermes-agent" rel="noopener">Hermes CLI</a> itself works on those platforms, and Scarf can connect to a remote Linux Hermes host from a Mac.</p>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
<footer class="site-footer" role="contentinfo">
|
||||
<div class="footer-inner">
|
||||
<div class="footer-brand">
|
||||
<img src="assets/scarf-icon-512.png" width="40" height="40" alt="" decoding="async">
|
||||
<p>Scarf is made by <a href="https://github.com/awizemann" rel="noopener">Alan Wizemann</a>. MIT licensed.</p>
|
||||
</div>
|
||||
<nav class="footer-nav" aria-label="Footer">
|
||||
<div>
|
||||
<h4>Project</h4>
|
||||
<ul>
|
||||
<li><a href="https://github.com/awizemann/scarf" rel="noopener">GitHub</a></li>
|
||||
<li><a href="https://github.com/awizemann/scarf/wiki" rel="noopener">Wiki</a></li>
|
||||
<li><a href="https://github.com/awizemann/scarf/releases" rel="noopener">Releases</a></li>
|
||||
<li><a href="https://github.com/awizemann/scarf/blob/main/LICENSE" rel="noopener">License (MIT)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Community</h4>
|
||||
<ul>
|
||||
<li><a href="templates/">Template catalog</a></li>
|
||||
<li><a href="https://github.com/awizemann/scarf/discussions" rel="noopener">Discussions</a></li>
|
||||
<li><a href="https://github.com/awizemann/scarf/issues" rel="noopener">Report a bug</a></li>
|
||||
<li><a href="https://www.buymeacoffee.com/awizemann" rel="noopener">Buy me a coffee</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Technical</h4>
|
||||
<ul>
|
||||
<li><a href="appcast.xml">Sparkle appcast</a></li>
|
||||
<li><a href="llms.txt">llms.txt</a></li>
|
||||
<li><a href="https://github.com/hermes-ai/hermes-agent" rel="noopener">Hermes agent</a></li>
|
||||
<li><a href="https://testflight.apple.com/join/qCrRpcTz" rel="noopener">TestFlight (iOS)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Structured data -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "SoftwareApplication",
|
||||
"name": "Scarf",
|
||||
"alternateName": "Scarf for Mac",
|
||||
"applicationCategory": "DeveloperApplication",
|
||||
"operatingSystem": "macOS 14.6 or later",
|
||||
"description": "Native macOS GUI for the Hermes AI agent. Sessions, projects, memory, skills, MCP servers, cron jobs, messaging gateways, multi-server SSH.",
|
||||
"url": "https://awizemann.github.io/scarf/",
|
||||
"downloadUrl": "https://github.com/awizemann/scarf/releases/latest",
|
||||
"softwareVersion": "2.5.2",
|
||||
"license": "https://opensource.org/licenses/MIT",
|
||||
"image": "https://awizemann.github.io/scarf/assets/og-image.png",
|
||||
"offers": {
|
||||
"@type": "Offer",
|
||||
"price": "0",
|
||||
"priceCurrency": "USD"
|
||||
},
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "Alan Wizemann",
|
||||
"url": "https://github.com/awizemann"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "MobileApplication",
|
||||
"name": "ScarfGo",
|
||||
"applicationCategory": "DeveloperApplication",
|
||||
"operatingSystem": "iOS 18.0 or later",
|
||||
"description": "Native iPhone companion to Scarf. Multi-server Hermes management over SSH, project-aware chat, memory editor, cron browser, skills browser.",
|
||||
"url": "https://awizemann.github.io/scarf/#ios",
|
||||
"downloadUrl": "https://testflight.apple.com/join/qCrRpcTz",
|
||||
"license": "https://opensource.org/licenses/MIT",
|
||||
"offers": {
|
||||
"@type": "Offer",
|
||||
"price": "0",
|
||||
"priceCurrency": "USD"
|
||||
},
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "Alan Wizemann",
|
||||
"url": "https://github.com/awizemann"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "FAQPage",
|
||||
"mainEntity": [
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "What is Scarf?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Scarf is a native macOS and iOS GUI for the Hermes AI agent. It surfaces Hermes's sessions, projects, memory, skills, MCP servers, cron jobs, messaging gateways, logs, and configuration through a sidebar-driven Mac app and a tab-based iPhone companion called ScarfGo."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Do I need Hermes installed first?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Yes. Scarf is a client for an existing Hermes installation. It expects to find Hermes's data directory at ~/.hermes/ on each host you connect to. Install Hermes first by following the Hermes installation guide."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Does Scarf work without internet?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Yes for the local Hermes case — Scarf reads files and the SQLite database directly from ~/.hermes/ with no network involvement. Internet is only required when Hermes itself reaches out to model providers or MCP servers, when connecting to a remote Hermes host over SSH, or when checking for Sparkle updates."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Is Scarf open source?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Yes. Both Scarf and ScarfGo are MIT licensed and built from the same open repository at github.com/awizemann/scarf. There are no closed-source components and no telemetry."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "What macOS and iOS versions are supported?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Scarf for Mac requires macOS 14.6 Sonoma or later, on Apple Silicon or Intel. ScarfGo for iPhone requires iOS 18.0 or later. Both are universal builds."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "How does ScarfGo connect to my Mac?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "ScarfGo speaks SSH directly to your Hermes host using Citadel, a pure-Swift SSH stack. On first launch it generates an Ed25519 keypair on the device — the private key lives in the iOS Keychain and never leaves the phone. Paste the public key into the host's authorized_keys and ScarfGo can run hermes acp over the SSH session for chat and read the SQLite database for everything else. There is no companion service or relay."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "What data does Scarf collect?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "None. Scarf has no telemetry, no analytics, no crash reporter, and no account system. The only outbound network connections are to GitHub Releases (Sparkle update checks), remote Hermes hosts you explicitly add, and Hermes's own model providers and MCP servers — all initiated by Hermes, not Scarf."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Where are my conversations stored?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "In Hermes's own data directory — ~/.hermes/state.db for session history and ~/.hermes/sessions/session_*.json for full transcripts. Scarf reads these files but never writes to state.db. ScarfGo reads them through SSH-initiated SQLite snapshots and never caches them locally on the device."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "How do updates work?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Scarf for Mac uses Sparkle for in-app updates — signed and notarized zips with EdDSA signature verification. The appcast lives at awizemann.github.io/scarf/appcast.xml. ScarfGo updates through TestFlight in the usual way until it ships on the App Store."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Can I use Scarf with a remote or headless Hermes server?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Yes. Add the host through File → Open Server… → Add Server on Mac, or Add Server on ScarfGo. Scarf uses the system SSH config (Mac) or a device-generated key (iOS), so anything reachable through normal terminal SSH works without extra setup. The remote host needs sqlite3 and pgrep on its PATH and the SSH user needs read access to ~/.hermes/."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "What's the difference between Scarf and using Hermes from the terminal?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Scarf is strictly additive — it visualizes data Hermes already produces. The terminal CLI remains the source of truth. Scarf gives you live streaming chat with rich tool-call rendering, multi-server windows, project workspaces with custom dashboards, and a one-pane view of skills, MCP servers, cron jobs, and gateways without memorizing CLI subcommands."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Is there a Windows or Linux version?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "No. Scarf is built on SwiftUI and AppKit and ships only for Apple platforms. The Hermes CLI itself works on those platforms, and Scarf can connect to a remote Linux Hermes host from a Mac."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="app.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,65 @@
|
||||
# Scarf
|
||||
|
||||
> Scarf is a native macOS and iOS GUI for the Hermes AI agent. It surfaces every part of a running Hermes installation — chat sessions, project workspaces, memory files, installed skills, MCP servers, cron jobs, messaging gateways, logs, and configuration — through a sidebar-driven Mac app and a tab-based iPhone companion called ScarfGo.
|
||||
|
||||
Both apps are free, MIT licensed, and built from a single open repository. Scarf reads from `~/.hermes/state.db` directly (read-only) and streams agent replies in real time over the Agent Client Protocol. It connects to remote Hermes installations using the host's existing SSH config — no companion service, no telemetry, no account.
|
||||
|
||||
## Quick facts
|
||||
|
||||
- **Platforms:** macOS 14.6+ Sonoma (Apple Silicon and Intel), iOS 18+
|
||||
- **License:** MIT
|
||||
- **Repository:** https://github.com/awizemann/scarf
|
||||
- **Author:** Alan Wizemann
|
||||
- **Hermes prerequisite:** https://github.com/hermes-ai/hermes-agent installed at `~/.hermes/`
|
||||
- **Mac download:** https://github.com/awizemann/scarf/releases/latest
|
||||
- **iOS download:** https://testflight.apple.com/join/qCrRpcTz (public TestFlight)
|
||||
- **Auto-updates (Mac):** Sparkle, with EdDSA signature verification
|
||||
- **Telemetry:** none
|
||||
|
||||
## Documentation
|
||||
|
||||
- [README](https://github.com/awizemann/scarf/blob/main/README.md): project overview, full feature list, build instructions
|
||||
- [Wiki](https://github.com/awizemann/scarf/wiki): user guide, architecture, design system reference
|
||||
- [Wiki — ScarfGo](https://github.com/awizemann/scarf/wiki/ScarfGo): iOS companion details
|
||||
- [Wiki — ScarfGo Onboarding](https://github.com/awizemann/scarf/wiki/ScarfGo-Onboarding): SSH key setup walkthrough
|
||||
- [Wiki — Platform Differences](https://github.com/awizemann/scarf/wiki/Platform-Differences): what is and isn't shared between Mac and iOS
|
||||
- [Releases](https://github.com/awizemann/scarf/releases): release notes for every version
|
||||
- [License](https://github.com/awizemann/scarf/blob/main/LICENSE): MIT
|
||||
|
||||
## Feature surfaces
|
||||
|
||||
Mac (sidebar sections):
|
||||
|
||||
- **Monitor:** Dashboard, Insights, Sessions Browser, Activity Feed
|
||||
- **Interact:** Live Chat (ACP streaming + Terminal mode), Memory Viewer/Editor, Skills Browser
|
||||
- **Configure:** Platforms, Personalities, Quick Commands, Credential Pools, Plugins, Webhooks, Profiles
|
||||
- **Manage:** Tools, MCP Servers, Gateway Control, Cron Manager, Health, Log Viewer, Settings
|
||||
- **Project Dashboards:** custom JSON-defined dashboards rendered by Scarf, populated by the agent
|
||||
- **System:** Hermes process control, menu bar status
|
||||
|
||||
iOS (ScarfGo, tabs):
|
||||
|
||||
- Servers (multi-host management with pure-Swift SSH)
|
||||
- Dashboard (stats + recent sessions per server)
|
||||
- Chat (full ACP, project-scoped)
|
||||
- Sessions (resume, attribute to projects)
|
||||
- Memory editor (read/write `MEMORY.md`, `USER.md`)
|
||||
- Cron (list view, human-readable schedules)
|
||||
- Skills browser (categories + prereq banners)
|
||||
- Settings (read-only `config.yaml`)
|
||||
|
||||
## Differentiators
|
||||
|
||||
- Native SwiftUI, not Electron — single Mach-O binary, kilobytes of memory, full system integration
|
||||
- Read-only access to `state.db` — Scarf cannot corrupt Hermes data because it never writes
|
||||
- Multi-server: one window per Hermes host on Mac, multi-server on iOS, all over standard SSH
|
||||
- Project-scoped chat with Scarf-managed `AGENTS.md` block injected before session boot
|
||||
- Portable `.scarftemplate` bundles for sharing project setups (dashboards, skills, cron jobs, slash commands)
|
||||
- Live ACP streaming with rich tool-call rendering, permission dialogs, voice control
|
||||
- 13 messaging platforms managed in one native UI (Telegram, Discord, Slack, WhatsApp, Signal, iMessage, Email, Matrix, Mattermost, Feishu, Home Assistant, Webhook, CLI)
|
||||
- Open and inspectable — pure Swift, MIT, no external runtime dependencies
|
||||
|
||||
## Optional
|
||||
|
||||
- [Templates Catalog](https://awizemann.github.io/scarf/templates/): community-contributed `.scarftemplate` bundles, one-click install
|
||||
- [Sparkle Appcast](https://awizemann.github.io/scarf/appcast.xml): the auto-update feed (RSS/XML)
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "Scarf",
|
||||
"short_name": "Scarf",
|
||||
"description": "Native macOS and iOS GUI for the Hermes AI agent.",
|
||||
"start_url": "./",
|
||||
"scope": "./",
|
||||
"display": "browser",
|
||||
"background_color": "#FAF7F2",
|
||||
"theme_color": "#C2563D",
|
||||
"icons": [
|
||||
{
|
||||
"src": "assets/icon-192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "assets/icon-512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512",
|
||||
"purpose": "any"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
User-agent: *
|
||||
Allow: /
|
||||
|
||||
Sitemap: https://awizemann.github.io/scarf/sitemap.xml
|
||||
@@ -1,111 +0,0 @@
|
||||
# Scarf — Architecture
|
||||
|
||||
## Pattern: MVVM-Feature
|
||||
|
||||
Per project standards, every feature is a self-contained module owning Models, ViewModels, and Views.
|
||||
|
||||
```
|
||||
scarf/
|
||||
Core/
|
||||
Services/ Hermes data access (SQLite, file I/O, ACP)
|
||||
Models/ Plain data structs for Hermes entities
|
||||
Features/
|
||||
Dashboard/
|
||||
Views/ DashboardView
|
||||
ViewModels/ DashboardViewModel
|
||||
Sessions/
|
||||
Views/ SessionsView, SessionDetailView
|
||||
ViewModels/ SessionsViewModel
|
||||
Activity/
|
||||
Views/ ActivityView
|
||||
ViewModels/ ActivityViewModel
|
||||
Chat/
|
||||
Views/ ChatView
|
||||
ViewModels/ ChatViewModel
|
||||
Memory/
|
||||
Views/ MemoryView
|
||||
ViewModels/ MemoryViewModel
|
||||
Skills/
|
||||
Views/ SkillsView
|
||||
ViewModels/ SkillsViewModel
|
||||
Cron/
|
||||
Views/ CronView
|
||||
ViewModels/ CronViewModel
|
||||
Logs/
|
||||
Views/ LogsView
|
||||
ViewModels/ LogsViewModel
|
||||
Settings/
|
||||
Views/ SettingsView
|
||||
ViewModels/ SettingsViewModel
|
||||
Navigation/
|
||||
AppCoordinator.swift
|
||||
SidebarView.swift
|
||||
```
|
||||
|
||||
## Navigation
|
||||
|
||||
`AppCoordinator` is `@Observable` and injected via `.environment()` at the app root. It owns:
|
||||
- `selectedSection: SidebarSection` — which feature is active
|
||||
- `selectedSessionID: String?` — drill-down into a session
|
||||
|
||||
One `NavigationSplitView` at top level, driven by the coordinator. Leaf views read but never own navigation state.
|
||||
|
||||
## Services
|
||||
|
||||
### HermesDataService
|
||||
- Opens `~/.hermes/state.db` read-only via SQLite3 C API
|
||||
- Queries `sessions` and `messages` tables
|
||||
- Provides session list, message history, search (FTS5), and aggregate stats
|
||||
- Polling-based refresh (watches WAL modification time)
|
||||
|
||||
### HermesFileService
|
||||
- Reads config.yaml (simple line parser for the YAML subset we need)
|
||||
- Reads/writes memory markdown files
|
||||
- Reads cron jobs.json, gateway_state.json, session JSON files
|
||||
- Reads skill directory structure
|
||||
|
||||
### HermesLogService
|
||||
- Tails log files using file handle + periodic polling
|
||||
- Parses log level from line format
|
||||
|
||||
### ACPClient
|
||||
- Spawns `hermes acp` via Foundation `Process`
|
||||
- Writes JSON-RPC to stdin, reads from stdout
|
||||
- Streams events: ToolCallStart, ToolCallProgress, AgentMessage, AgentThought
|
||||
- Manages session lifecycle
|
||||
|
||||
### HermesFileWatcher
|
||||
- Uses `DispatchSource.makeFileSystemObjectSource` on key directories
|
||||
- Triggers refresh callbacks when Hermes writes new data
|
||||
|
||||
## Dependencies
|
||||
|
||||
Zero external SPM packages:
|
||||
- **SQLite**: System `sqlite3` C library (available on macOS, `import SQLite3` not needed — use `libsqlite3`)
|
||||
- **JSON**: Foundation `JSONDecoder` / `JSONSerialization`
|
||||
- **YAML**: Custom lightweight parser for flat config structure
|
||||
- **Markdown**: `AttributedString(markdown:)` (built into Foundation)
|
||||
- **File watching**: GCD `DispatchSource`
|
||||
- **Subprocess**: Foundation `Process` + `Pipe`
|
||||
|
||||
## Sandbox
|
||||
|
||||
Disabled. This app reads directly from `~/.hermes/` which is outside any app sandbox container. The `ENABLE_APP_SANDBOX` build setting is set to `NO`.
|
||||
|
||||
## Concurrency
|
||||
|
||||
- Swift 6 strict concurrency with `@MainActor` default isolation
|
||||
- Services use `nonisolated` methods with async/await for I/O
|
||||
- `@Observable` ViewModels on MainActor, call into nonisolated services
|
||||
- ACP client runs its read loop on a background task
|
||||
|
||||
## Data Flow
|
||||
|
||||
```
|
||||
~/.hermes/state.db ──→ HermesDataService ──→ ViewModels ──→ Views
|
||||
~/.hermes/config.yaml ──→ HermesFileService ──→ ViewModels ──→ Views
|
||||
~/.hermes/memories/ ──→ HermesFileService ──→ ViewModels ──→ Views
|
||||
~/.hermes/logs/ ──→ HermesLogService ──→ ViewModels ──→ Views
|
||||
hermes acp (subprocess) ──→ ACPClient ──→ ChatViewModel ──→ ChatView
|
||||
HermesFileWatcher ──→ triggers refresh on all services
|
||||
```
|
||||
@@ -1,183 +0,0 @@
|
||||
# Hermes Agent — Discovery Notes
|
||||
|
||||
## Installation
|
||||
|
||||
- Binary: `~/.local/bin/hermes` (symlink to venv wrapper)
|
||||
- Codebase: `~/.hermes/hermes-agent/` (Python 3.11 venv)
|
||||
- Version: v0.6.0 (March 30, 2026)
|
||||
- Runs as daemon process
|
||||
|
||||
## What Hermes Does
|
||||
|
||||
A self-improving AI agent with tool-calling capabilities:
|
||||
- Interactive terminal chat with syntax highlighting
|
||||
- 40+ tools (terminal, file, browser, web, code execution, vision, etc.)
|
||||
- Autonomous skill creation from complex tasks
|
||||
- Persistent memory (MEMORY.md + USER.md) with periodic nudges
|
||||
- Multi-platform messaging gateway (Telegram, Discord, Slack, WhatsApp, Signal, Email)
|
||||
- Cron scheduler for recurring tasks
|
||||
- Session persistence in SQLite with FTS5 search
|
||||
- Subagent delegation for parallel workstreams
|
||||
- MCP (Model Context Protocol) integration
|
||||
- ACP (Agent Client Protocol) for IDE integration
|
||||
|
||||
## File System Layout
|
||||
|
||||
```
|
||||
~/.hermes/
|
||||
hermes-agent/ Python codebase (70 directories)
|
||||
run_agent.py Core agent loop
|
||||
cli.py Terminal UI
|
||||
model_tools.py Tool dispatcher
|
||||
toolsets.py Tool definitions
|
||||
agent/ Agent internals
|
||||
tools/ 40+ tool implementations
|
||||
gateway/ Multi-platform messaging
|
||||
cron/ Scheduler implementation
|
||||
hermes_cli/ CLI command handlers
|
||||
acp_adapter/ Agent Client Protocol server
|
||||
venv/ Python environment
|
||||
config.yaml User configuration (8.8 KB)
|
||||
.env API keys (encrypted)
|
||||
auth.json OAuth tokens
|
||||
state.db SQLite session database (WAL mode)
|
||||
sessions/ JSON conversation snapshots
|
||||
memories/ MEMORY.md, USER.md
|
||||
skills/ 29 installed skills across 15+ categories
|
||||
cron/
|
||||
jobs.json Scheduled job definitions
|
||||
output/ Job execution output
|
||||
logs/
|
||||
errors.log Application errors
|
||||
gateway.log Gateway platform logs
|
||||
gateway_state.json Gateway process lifecycle
|
||||
```
|
||||
|
||||
## SQLite Schema (state.db, version 6)
|
||||
|
||||
### sessions table
|
||||
```sql
|
||||
id TEXT PRIMARY KEY,
|
||||
source TEXT, -- 'cli', 'telegram', 'discord', etc.
|
||||
user_id TEXT,
|
||||
model TEXT,
|
||||
model_config TEXT, -- JSON
|
||||
system_prompt TEXT,
|
||||
parent_session_id TEXT, -- Session splitting on compression
|
||||
started_at REAL,
|
||||
ended_at REAL,
|
||||
end_reason TEXT,
|
||||
message_count INTEGER,
|
||||
tool_call_count INTEGER,
|
||||
input_tokens INTEGER,
|
||||
output_tokens INTEGER,
|
||||
cache_read_tokens INTEGER,
|
||||
cache_write_tokens INTEGER,
|
||||
reasoning_tokens INTEGER,
|
||||
billing_provider TEXT,
|
||||
billing_base_url TEXT,
|
||||
billing_mode TEXT,
|
||||
estimated_cost_usd REAL,
|
||||
actual_cost_usd REAL,
|
||||
cost_status TEXT,
|
||||
cost_source TEXT,
|
||||
pricing_version TEXT,
|
||||
title TEXT UNIQUE
|
||||
```
|
||||
|
||||
### messages table
|
||||
```sql
|
||||
id INTEGER PRIMARY KEY,
|
||||
session_id TEXT,
|
||||
role TEXT, -- 'user' or 'assistant'
|
||||
content TEXT,
|
||||
tool_call_id TEXT,
|
||||
tool_calls TEXT, -- JSON array of tool invocations
|
||||
tool_name TEXT,
|
||||
timestamp REAL,
|
||||
token_count INTEGER,
|
||||
finish_reason TEXT,
|
||||
reasoning TEXT,
|
||||
reasoning_details TEXT,
|
||||
codex_reasoning_items TEXT
|
||||
```
|
||||
|
||||
### messages_fts (FTS5 virtual table)
|
||||
Full-text search on message content.
|
||||
|
||||
## Session JSON Format
|
||||
|
||||
```json
|
||||
{
|
||||
"session_id": "YYYYmmdd_HHMMSS_6hexchars",
|
||||
"model": "claude-haiku-4-5-20251001",
|
||||
"platform": "cli",
|
||||
"session_start": "ISO8601",
|
||||
"last_updated": "ISO8601",
|
||||
"system_prompt": "...",
|
||||
"tools": [{"type": "function", "function": {"name": "...", "description": "...", "parameters": {...}}}],
|
||||
"messages": [
|
||||
{"role": "user", "content": "..."},
|
||||
{"role": "assistant", "content": "...", "tool_calls": [
|
||||
{"id": "call_...", "type": "function", "function": {"name": "terminal", "arguments": "{\"command\": \"...\"}"}}
|
||||
]}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Cron Jobs Format
|
||||
|
||||
```json
|
||||
{
|
||||
"jobs": [{
|
||||
"id": "12hexchars",
|
||||
"name": "Job Name",
|
||||
"prompt": "What to do",
|
||||
"skills": ["skill-name"],
|
||||
"schedule": {"kind": "once|cron", "run_at": "ISO8601", "display": "human readable"},
|
||||
"repeat": {"times": 1, "completed": 0},
|
||||
"enabled": true,
|
||||
"state": "scheduled|running|completed",
|
||||
"deliver": "origin|telegram|discord",
|
||||
"next_run_at": "ISO8601",
|
||||
"last_run_at": "ISO8601|null",
|
||||
"last_error": "string|null"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
## Config Structure (config.yaml)
|
||||
|
||||
Key sections: model (default, provider), agent (max_turns, tool_use_enforcement, personalities), terminal (backend, cwd, timeout), memory (enabled, char limits, nudge interval), display (personality, streaming, show_reasoning), platform_toolsets (tools per platform).
|
||||
|
||||
## ACP (Agent Client Protocol)
|
||||
|
||||
- Entry: `hermes acp` or `python -m acp_adapter.entry`
|
||||
- Transport: stdio JSON-RPC (not HTTP)
|
||||
- Lifecycle: initialize() -> new_session()/load_session() -> send messages
|
||||
- Events emitted: ToolCallStart, ToolCallProgress, AgentMessage, AgentThought, SessionUpdate
|
||||
- Tool kinds: read, edit, execute, fetch, search, think, other
|
||||
- Tool call IDs: `tc-{uuid.hex[:12]}`
|
||||
|
||||
## Log Format
|
||||
|
||||
```
|
||||
YYYY-MM-DD HH:MM:SS,MMM LEVEL logger_name: message
|
||||
```
|
||||
|
||||
## Gateway State
|
||||
|
||||
```json
|
||||
{
|
||||
"pid": 12345,
|
||||
"kind": "hermes-gateway",
|
||||
"gateway_state": "running|startup_failed",
|
||||
"exit_reason": "string|null",
|
||||
"platforms": {},
|
||||
"updated_at": "ISO8601"
|
||||
}
|
||||
```
|
||||
|
||||
## SQLite Contention Notes
|
||||
|
||||
Hermes uses WAL mode with aggressive retry (15 retries, 20-150ms jitter). Scarf must only open state.db in read-only mode to avoid write contention. Checkpoint every 50 writes. WAL file modification is a good signal for refresh.
|
||||
@@ -1,97 +0,0 @@
|
||||
# Scarf — Product Requirements Document
|
||||
|
||||
## Overview
|
||||
|
||||
Scarf is a native macOS application that provides a graphical interface for the Hermes AI agent. Hermes is a CLI-based AI agent with 40+ tools, multi-platform messaging, autonomous skill creation, persistent memory, and scheduled automation. Scarf gives users visibility into what Hermes is doing, when, and what it creates.
|
||||
|
||||
## Problem
|
||||
|
||||
Hermes operates entirely through CLI with no visual dashboard. Users cannot easily:
|
||||
- See what the agent is currently doing or has done
|
||||
- Browse conversation history across sessions
|
||||
- Monitor tool executions in real-time
|
||||
- Manage memory, skills, or cron jobs visually
|
||||
- Chat with the agent through a native interface
|
||||
|
||||
## Target User
|
||||
|
||||
Developer running Hermes locally on macOS who wants transparency and control over agent activity.
|
||||
|
||||
## Core Features
|
||||
|
||||
### 1. Dashboard
|
||||
- System health overview (model, provider, connection status)
|
||||
- Active session indicator
|
||||
- Token usage and cost summary (aggregated from session data)
|
||||
- Gateway platform connection status
|
||||
- Recent activity feed
|
||||
|
||||
### 2. Sessions Browser
|
||||
- List all conversation sessions with metadata (source, message count, tool calls, cost, duration)
|
||||
- Full conversation detail view with message rendering
|
||||
- Full-text search across all sessions (via SQLite FTS5)
|
||||
- Session lineage tracking (parent_session_id chains)
|
||||
|
||||
### 3. Activity Feed
|
||||
- Real-time tool execution monitoring (the core transparency feature)
|
||||
- Each entry: tool name, kind, arguments, result preview, timestamp
|
||||
- Filterable by tool type, session, time range
|
||||
- Color-coded by tool kind (read/edit/execute/fetch)
|
||||
|
||||
### 4. Live Chat
|
||||
- Send messages to Hermes via ACP (Agent Client Protocol)
|
||||
- Stream responses with tool calls shown inline
|
||||
- Session management (new, load, resume)
|
||||
|
||||
### 5. Memory Viewer/Editor
|
||||
- Display MEMORY.md and USER.md with markdown rendering
|
||||
- Edit and save changes
|
||||
- Character count vs configured limits
|
||||
|
||||
### 6. Skills Browser
|
||||
- Tree view by category
|
||||
- Skill metadata display
|
||||
- Search and filter
|
||||
|
||||
### 7. Cron Manager
|
||||
- View scheduled jobs with status, next/last run times
|
||||
- View job output
|
||||
- Enable/disable jobs
|
||||
|
||||
### 8. Log Viewer
|
||||
- Real-time log tailing (errors.log, gateway.log)
|
||||
- Level-based filtering and text search
|
||||
|
||||
### 9. Menu Bar Presence
|
||||
- Status icon showing Hermes state (running/idle/error)
|
||||
- Quick access to recent session, new chat
|
||||
|
||||
## Technical Constraints
|
||||
|
||||
- macOS 26.2+ (SwiftUI, Swift 6 concurrency)
|
||||
- No external SPM dependencies — uses system SQLite3 C API, Foundation JSON
|
||||
- Reads Hermes data from `~/.hermes/` (requires sandbox disabled)
|
||||
- ACP communication via subprocess stdio JSON-RPC
|
||||
- App sandbox disabled (developer tool needing filesystem access)
|
||||
|
||||
## Data Sources
|
||||
|
||||
| Source | Path | Format | Access |
|
||||
|--------|------|--------|--------|
|
||||
| Sessions DB | `~/.hermes/state.db` | SQLite (WAL) | Read-only |
|
||||
| Session files | `~/.hermes/sessions/*.json` | JSON | Read-only |
|
||||
| Config | `~/.hermes/config.yaml` | YAML | Read/Write |
|
||||
| Memory | `~/.hermes/memories/*.md` | Markdown | Read/Write |
|
||||
| Cron jobs | `~/.hermes/cron/jobs.json` | JSON | Read/Write |
|
||||
| Cron output | `~/.hermes/cron/output/` | Text | Read-only |
|
||||
| Logs | `~/.hermes/logs/*.log` | Text | Read-only |
|
||||
| Gateway state | `~/.hermes/gateway_state.json` | JSON | Read-only |
|
||||
| Skills | `~/.hermes/skills/` | Directory tree | Read-only |
|
||||
| ACP | `hermes acp` subprocess | JSON-RPC stdio | Bidirectional |
|
||||
|
||||
## Non-Goals (v1)
|
||||
|
||||
- Config editing UI (read-only display for v1, except memory)
|
||||
- Skill creation or management
|
||||
- Gateway platform management
|
||||
- Multi-user support
|
||||
@@ -1,610 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 77;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
53495AB62F7B992C00BD31AD /* SwiftTerm in Frameworks */ = {isa = PBXBuildFile; productRef = 53SWIFTTERM0001 /* SwiftTerm */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
534959502F7B83B700BD31AD /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 534959382F7B83B600BD31AD /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 5349593F2F7B83B600BD31AD;
|
||||
remoteInfo = scarf;
|
||||
};
|
||||
5349595A2F7B83B700BD31AD /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 534959382F7B83B600BD31AD /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 5349593F2F7B83B600BD31AD;
|
||||
remoteInfo = scarf;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
534959402F7B83B600BD31AD /* scarf.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = scarf.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5349594F2F7B83B700BD31AD /* scarfTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = scarfTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
534959592F7B83B700BD31AD /* scarfUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = scarfUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
||||
534959422F7B83B600BD31AD /* scarf */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
path = scarf;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
534959522F7B83B700BD31AD /* scarfTests */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
path = scarfTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5349595C2F7B83B700BD31AD /* scarfUITests */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
path = scarfUITests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXFileSystemSynchronizedRootGroup section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
5349593D2F7B83B600BD31AD /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
53495AB62F7B992C00BD31AD /* SwiftTerm in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5349594C2F7B83B700BD31AD /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
534959562F7B83B700BD31AD /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
534959372F7B83B600BD31AD = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
534959422F7B83B600BD31AD /* scarf */,
|
||||
534959522F7B83B700BD31AD /* scarfTests */,
|
||||
5349595C2F7B83B700BD31AD /* scarfUITests */,
|
||||
534959412F7B83B600BD31AD /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
534959412F7B83B600BD31AD /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
534959402F7B83B600BD31AD /* scarf.app */,
|
||||
5349594F2F7B83B700BD31AD /* scarfTests.xctest */,
|
||||
534959592F7B83B700BD31AD /* scarfUITests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
5349593F2F7B83B600BD31AD /* scarf */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 534959632F7B83B700BD31AD /* Build configuration list for PBXNativeTarget "scarf" */;
|
||||
buildPhases = (
|
||||
5349593C2F7B83B600BD31AD /* Sources */,
|
||||
5349593D2F7B83B600BD31AD /* Frameworks */,
|
||||
5349593E2F7B83B600BD31AD /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
534959422F7B83B600BD31AD /* scarf */,
|
||||
);
|
||||
name = scarf;
|
||||
packageProductDependencies = (
|
||||
53SWIFTTERM0001 /* SwiftTerm */,
|
||||
);
|
||||
productName = scarf;
|
||||
productReference = 534959402F7B83B600BD31AD /* scarf.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
5349594E2F7B83B700BD31AD /* scarfTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 534959662F7B83B700BD31AD /* Build configuration list for PBXNativeTarget "scarfTests" */;
|
||||
buildPhases = (
|
||||
5349594B2F7B83B700BD31AD /* Sources */,
|
||||
5349594C2F7B83B700BD31AD /* Frameworks */,
|
||||
5349594D2F7B83B700BD31AD /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
534959512F7B83B700BD31AD /* PBXTargetDependency */,
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
534959522F7B83B700BD31AD /* scarfTests */,
|
||||
);
|
||||
name = scarfTests;
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = scarfTests;
|
||||
productReference = 5349594F2F7B83B700BD31AD /* scarfTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
534959582F7B83B700BD31AD /* scarfUITests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 534959692F7B83B700BD31AD /* Build configuration list for PBXNativeTarget "scarfUITests" */;
|
||||
buildPhases = (
|
||||
534959552F7B83B700BD31AD /* Sources */,
|
||||
534959562F7B83B700BD31AD /* Frameworks */,
|
||||
534959572F7B83B700BD31AD /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
5349595B2F7B83B700BD31AD /* PBXTargetDependency */,
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
5349595C2F7B83B700BD31AD /* scarfUITests */,
|
||||
);
|
||||
name = scarfUITests;
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = scarfUITests;
|
||||
productReference = 534959592F7B83B700BD31AD /* scarfUITests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.ui-testing";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
534959382F7B83B600BD31AD /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = 1;
|
||||
LastSwiftUpdateCheck = 2630;
|
||||
LastUpgradeCheck = 2630;
|
||||
TargetAttributes = {
|
||||
5349593F2F7B83B600BD31AD = {
|
||||
CreatedOnToolsVersion = 26.3;
|
||||
};
|
||||
5349594E2F7B83B700BD31AD = {
|
||||
CreatedOnToolsVersion = 26.3;
|
||||
TestTargetID = 5349593F2F7B83B600BD31AD;
|
||||
};
|
||||
534959582F7B83B700BD31AD = {
|
||||
CreatedOnToolsVersion = 26.3;
|
||||
TestTargetID = 5349593F2F7B83B600BD31AD;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 5349593B2F7B83B600BD31AD /* Build configuration list for PBXProject "scarf" */;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 534959372F7B83B600BD31AD;
|
||||
minimizedProjectReferenceProxies = 1;
|
||||
packageReferences = (
|
||||
53SWIFTTERM0002 /* XCRemoteSwiftPackageReference "SwiftTerm" */,
|
||||
);
|
||||
preferredProjectObjectVersion = 77;
|
||||
productRefGroup = 534959412F7B83B600BD31AD /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
5349593F2F7B83B600BD31AD /* scarf */,
|
||||
5349594E2F7B83B700BD31AD /* scarfTests */,
|
||||
534959582F7B83B700BD31AD /* scarfUITests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
5349593E2F7B83B600BD31AD /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5349594D2F7B83B700BD31AD /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
534959572F7B83B700BD31AD /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
5349593C2F7B83B600BD31AD /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5349594B2F7B83B700BD31AD /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
534959552F7B83B700BD31AD /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
534959512F7B83B700BD31AD /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 5349593F2F7B83B600BD31AD /* scarf */;
|
||||
targetProxy = 534959502F7B83B700BD31AD /* PBXContainerItemProxy */;
|
||||
};
|
||||
5349595B2F7B83B700BD31AD /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 5349593F2F7B83B600BD31AD /* scarf */;
|
||||
targetProxy = 5349595A2F7B83B700BD31AD /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
534959612F7B83B700BD31AD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DEVELOPMENT_TEAM = 3Q6X2L86C4;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 26.2;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
534959622F7B83B700BD31AD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = 3Q6X2L86C4;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 26.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
534959642F7B83B700BD31AD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 3Q6X2L86C4;
|
||||
ENABLE_APP_SANDBOX = NO;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = Scarf;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.scarf;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
REGISTER_APP_GROUPS = YES;
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||
SWIFT_APPROACHABLE_CONCURRENCY = YES;
|
||||
SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
534959652F7B83B700BD31AD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 3Q6X2L86C4;
|
||||
ENABLE_APP_SANDBOX = NO;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = Scarf;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.scarf;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
REGISTER_APP_GROUPS = YES;
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||
SWIFT_APPROACHABLE_CONCURRENCY = YES;
|
||||
SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
534959672F7B83B700BD31AD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 3Q6X2L86C4;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 26.2;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.scarfTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
SWIFT_APPROACHABLE_CONCURRENCY = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/scarf.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/scarf";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
534959682F7B83B700BD31AD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 3Q6X2L86C4;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 26.2;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.scarfTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
SWIFT_APPROACHABLE_CONCURRENCY = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/scarf.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/scarf";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
5349596A2F7B83B700BD31AD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 3Q6X2L86C4;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.scarfUITests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
SWIFT_APPROACHABLE_CONCURRENCY = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_TARGET_NAME = scarf;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
5349596B2F7B83B700BD31AD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 3Q6X2L86C4;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.scarfUITests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
SWIFT_APPROACHABLE_CONCURRENCY = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_TARGET_NAME = scarf;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
5349593B2F7B83B600BD31AD /* Build configuration list for PBXProject "scarf" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
534959612F7B83B700BD31AD /* Debug */,
|
||||
534959622F7B83B700BD31AD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
534959632F7B83B700BD31AD /* Build configuration list for PBXNativeTarget "scarf" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
534959642F7B83B700BD31AD /* Debug */,
|
||||
534959652F7B83B700BD31AD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
534959662F7B83B700BD31AD /* Build configuration list for PBXNativeTarget "scarfTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
534959672F7B83B700BD31AD /* Debug */,
|
||||
534959682F7B83B700BD31AD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
534959692F7B83B700BD31AD /* Build configuration list for PBXNativeTarget "scarfUITests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
5349596A2F7B83B700BD31AD /* Debug */,
|
||||
5349596B2F7B83B700BD31AD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
|
||||
/* Begin XCRemoteSwiftPackageReference section */
|
||||
53SWIFTTERM0002 /* XCRemoteSwiftPackageReference "SwiftTerm" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/migueldeicaza/SwiftTerm.git";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 1.0.0;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
53SWIFTTERM0001 /* SwiftTerm */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 53SWIFTTERM0002 /* XCRemoteSwiftPackageReference "SwiftTerm" */;
|
||||
productName = SwiftTerm;
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
rootObject = 534959382F7B83B600BD31AD /* Project object */;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 274 KiB |
|
Before Width: | Height: | Size: 962 B |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 274 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.1 MiB |
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "AW Mac OS Applications-iOS-Default-16x16@1x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"filename" : "AW Mac OS Applications-iOS-Default-16x16@2x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"filename" : "AW Mac OS Applications-iOS-Default-32x32@1x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"filename" : "AW Mac OS Applications-iOS-Default-32x32@2x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"filename" : "AW Mac OS Applications-iOS-Default-128x128@1x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"filename" : "AW Mac OS Applications-iOS-Default-128x128@2x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"filename" : "AW Mac OS Applications-iOS-Default-256x256@1x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"filename" : "AW Mac OS Applications-iOS-Default-512x512@1x 1.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"filename" : "AW Mac OS Applications-iOS-Default-512x512@1x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "512x512"
|
||||
},
|
||||
{
|
||||
"filename" : "AW Mac OS Applications-iOS-Default-1024x1024@1x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "512x512"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
struct ContentView: View {
|
||||
@Environment(AppCoordinator.self) private var coordinator
|
||||
|
||||
var body: some View {
|
||||
NavigationSplitView {
|
||||
SidebarView()
|
||||
} detail: {
|
||||
detailView
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var detailView: some View {
|
||||
switch coordinator.selectedSection {
|
||||
case .dashboard:
|
||||
DashboardView()
|
||||
case .sessions:
|
||||
SessionsView()
|
||||
case .activity:
|
||||
ActivityView()
|
||||
case .chat:
|
||||
ChatView()
|
||||
case .memory:
|
||||
MemoryView()
|
||||
case .skills:
|
||||
SkillsView()
|
||||
case .cron:
|
||||
CronView()
|
||||
case .logs:
|
||||
LogsView()
|
||||
case .settings:
|
||||
SettingsView()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
struct HermesConfig: Sendable {
|
||||
var model: String
|
||||
var provider: String
|
||||
var maxTurns: Int
|
||||
var personality: String
|
||||
var terminalBackend: String
|
||||
var memoryEnabled: Bool
|
||||
var memoryCharLimit: Int
|
||||
var userCharLimit: Int
|
||||
var nudgeInterval: Int
|
||||
var streaming: Bool
|
||||
var showReasoning: Bool
|
||||
var verbose: Bool
|
||||
|
||||
static let empty = HermesConfig(
|
||||
model: "unknown",
|
||||
provider: "unknown",
|
||||
maxTurns: 0,
|
||||
personality: "default",
|
||||
terminalBackend: "local",
|
||||
memoryEnabled: false,
|
||||
memoryCharLimit: 0,
|
||||
userCharLimit: 0,
|
||||
nudgeInterval: 0,
|
||||
streaming: true,
|
||||
showReasoning: false,
|
||||
verbose: false
|
||||
)
|
||||
}
|
||||
|
||||
struct GatewayState: Sendable, Codable {
|
||||
let pid: Int?
|
||||
let kind: String?
|
||||
let gatewayState: String?
|
||||
let exitReason: String?
|
||||
let platforms: [String: PlatformState]?
|
||||
let updatedAt: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case pid, kind
|
||||
case gatewayState = "gateway_state"
|
||||
case exitReason = "exit_reason"
|
||||
case platforms
|
||||
case updatedAt = "updated_at"
|
||||
}
|
||||
|
||||
var isRunning: Bool {
|
||||
gatewayState == "running"
|
||||
}
|
||||
|
||||
var statusText: String {
|
||||
gatewayState ?? "unknown"
|
||||
}
|
||||
}
|
||||
|
||||
struct PlatformState: Sendable, Codable {
|
||||
let connected: Bool?
|
||||
let error: String?
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
enum HermesPaths: Sendable {
|
||||
// Using ProcessInfo to avoid main-actor isolation issues with FileManager/NSHomeDirectory
|
||||
nonisolated static let home: String = ProcessInfo.processInfo.environment["HOME"]! + "/.hermes"
|
||||
nonisolated static let stateDB: String = home + "/state.db"
|
||||
nonisolated static let configYAML: String = home + "/config.yaml"
|
||||
nonisolated static let memoriesDir: String = home + "/memories"
|
||||
nonisolated static let memoryMD: String = memoriesDir + "/MEMORY.md"
|
||||
nonisolated static let userMD: String = memoriesDir + "/USER.md"
|
||||
nonisolated static let sessionsDir: String = home + "/sessions"
|
||||
nonisolated static let cronJobsJSON: String = home + "/cron/jobs.json"
|
||||
nonisolated static let cronOutputDir: String = home + "/cron/output"
|
||||
nonisolated static let gatewayStateJSON: String = home + "/gateway_state.json"
|
||||
nonisolated static let skillsDir: String = home + "/skills"
|
||||
nonisolated static let errorsLog: String = home + "/logs/errors.log"
|
||||
nonisolated static let gatewayLog: String = home + "/logs/gateway.log"
|
||||
nonisolated static let hermesBinary: String = ProcessInfo.processInfo.environment["HOME"]! + "/.local/bin/hermes"
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
struct HermesCronJob: Identifiable, Sendable, Codable {
|
||||
let id: String
|
||||
let name: String
|
||||
let prompt: String
|
||||
let skills: [String]?
|
||||
let model: String?
|
||||
let schedule: CronSchedule
|
||||
let enabled: Bool
|
||||
let state: String
|
||||
let deliver: String?
|
||||
let nextRunAt: String?
|
||||
let lastRunAt: String?
|
||||
let lastError: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id, name, prompt, skills, model, schedule, enabled, state, deliver
|
||||
case nextRunAt = "next_run_at"
|
||||
case lastRunAt = "last_run_at"
|
||||
case lastError = "last_error"
|
||||
}
|
||||
|
||||
var stateIcon: String {
|
||||
switch state {
|
||||
case "scheduled": return "clock"
|
||||
case "running": return "play.circle"
|
||||
case "completed": return "checkmark.circle"
|
||||
case "failed": return "xmark.circle"
|
||||
default: return "questionmark.circle"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct CronSchedule: Sendable, Codable {
|
||||
let kind: String
|
||||
let runAt: String?
|
||||
let display: String?
|
||||
let expression: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case kind
|
||||
case runAt = "run_at"
|
||||
case display
|
||||
case expression
|
||||
}
|
||||
}
|
||||
|
||||
struct CronJobsFile: Sendable, Codable {
|
||||
let jobs: [HermesCronJob]
|
||||
let updatedAt: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case jobs
|
||||
case updatedAt = "updated_at"
|
||||
}
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
struct HermesMessage: Identifiable, Sendable {
|
||||
let id: Int
|
||||
let sessionId: String
|
||||
let role: String
|
||||
let content: String
|
||||
let toolCallId: String?
|
||||
let toolCalls: [HermesToolCall]
|
||||
let toolName: String?
|
||||
let timestamp: Date?
|
||||
let tokenCount: Int?
|
||||
let finishReason: String?
|
||||
|
||||
var isUser: Bool { role == "user" }
|
||||
var isAssistant: Bool { role == "assistant" }
|
||||
var isToolResult: Bool { role == "tool" }
|
||||
}
|
||||
|
||||
struct HermesToolCall: Identifiable, Sendable, Codable {
|
||||
var id: String { callId }
|
||||
let callId: String
|
||||
let functionName: String
|
||||
let arguments: String
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case callId = "id"
|
||||
case type
|
||||
case function
|
||||
}
|
||||
|
||||
enum FunctionKeys: String, CodingKey {
|
||||
case name
|
||||
case arguments
|
||||
}
|
||||
|
||||
init(callId: String, functionName: String, arguments: String) {
|
||||
self.callId = callId
|
||||
self.functionName = functionName
|
||||
self.arguments = arguments
|
||||
}
|
||||
|
||||
init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
callId = try container.decode(String.self, forKey: .callId)
|
||||
let funcContainer = try container.nestedContainer(keyedBy: FunctionKeys.self, forKey: .function)
|
||||
functionName = try funcContainer.decode(String.self, forKey: .name)
|
||||
arguments = try funcContainer.decode(String.self, forKey: .arguments)
|
||||
}
|
||||
|
||||
func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(callId, forKey: .callId)
|
||||
try container.encode("function", forKey: .type)
|
||||
var funcContainer = container.nestedContainer(keyedBy: FunctionKeys.self, forKey: .function)
|
||||
try funcContainer.encode(functionName, forKey: .name)
|
||||
try funcContainer.encode(arguments, forKey: .arguments)
|
||||
}
|
||||
|
||||
var toolKind: ToolKind {
|
||||
switch functionName {
|
||||
case "read_file", "search_files", "vision_analyze": return .read
|
||||
case "write_file", "patch": return .edit
|
||||
case "terminal": return .execute
|
||||
case "web_search", "web_extract": return .fetch
|
||||
case "browser_navigate", "browser_click", "browser_screenshot": return .browser
|
||||
default: return .other
|
||||
}
|
||||
}
|
||||
|
||||
var argumentsSummary: String {
|
||||
guard let data = arguments.data(using: .utf8),
|
||||
let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any] else {
|
||||
return arguments
|
||||
}
|
||||
if let command = json["command"] as? String {
|
||||
return command
|
||||
}
|
||||
if let path = json["path"] as? String {
|
||||
return path
|
||||
}
|
||||
if let query = json["query"] as? String {
|
||||
return query
|
||||
}
|
||||
if let url = json["url"] as? String {
|
||||
return url
|
||||
}
|
||||
return arguments.prefix(120) + (arguments.count > 120 ? "..." : "")
|
||||
}
|
||||
}
|
||||
|
||||
enum ToolKind: String, Sendable, CaseIterable {
|
||||
case read
|
||||
case edit
|
||||
case execute
|
||||
case fetch
|
||||
case browser
|
||||
case other
|
||||
|
||||
var icon: String {
|
||||
switch self {
|
||||
case .read: return "doc.text.magnifyingglass"
|
||||
case .edit: return "pencil"
|
||||
case .execute: return "terminal"
|
||||
case .fetch: return "globe"
|
||||
case .browser: return "safari"
|
||||
case .other: return "gearshape"
|
||||
}
|
||||
}
|
||||
|
||||
var color: String {
|
||||
switch self {
|
||||
case .read: return "green"
|
||||
case .edit: return "blue"
|
||||
case .execute: return "orange"
|
||||
case .fetch: return "purple"
|
||||
case .browser: return "indigo"
|
||||
case .other: return "gray"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
struct HermesSession: Identifiable, Sendable {
|
||||
let id: String
|
||||
let source: String
|
||||
let userId: String?
|
||||
let model: String?
|
||||
let title: String?
|
||||
let parentSessionId: String?
|
||||
let startedAt: Date?
|
||||
let endedAt: Date?
|
||||
let endReason: String?
|
||||
let messageCount: Int
|
||||
let toolCallCount: Int
|
||||
let inputTokens: Int
|
||||
let outputTokens: Int
|
||||
let cacheReadTokens: Int
|
||||
let cacheWriteTokens: Int
|
||||
let estimatedCostUSD: Double?
|
||||
|
||||
var totalTokens: Int { inputTokens + outputTokens }
|
||||
|
||||
var duration: TimeInterval? {
|
||||
guard let start = startedAt, let end = endedAt else { return nil }
|
||||
return end.timeIntervalSince(start)
|
||||
}
|
||||
|
||||
var displayTitle: String {
|
||||
title ?? id
|
||||
}
|
||||
|
||||
var sourceIcon: String {
|
||||
switch source {
|
||||
case "cli": return "terminal"
|
||||
case "telegram": return "paperplane"
|
||||
case "discord": return "bubble.left.and.bubble.right"
|
||||
case "slack": return "number"
|
||||
case "email": return "envelope"
|
||||
default: return "bubble.left"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
struct HermesSkillCategory: Identifiable, Sendable {
|
||||
let id: String
|
||||
let name: String
|
||||
let skills: [HermesSkill]
|
||||
}
|
||||
|
||||
struct HermesSkill: Identifiable, Sendable {
|
||||
let id: String
|
||||
let name: String
|
||||
let category: String
|
||||
let path: String
|
||||
let files: [String]
|
||||
}
|
||||
@@ -1,262 +0,0 @@
|
||||
import Foundation
|
||||
import SQLite3
|
||||
|
||||
actor HermesDataService {
|
||||
private var db: OpaquePointer?
|
||||
|
||||
func open() -> Bool {
|
||||
let path = HermesPaths.stateDB
|
||||
guard FileManager.default.fileExists(atPath: path) else { return false }
|
||||
let flags = SQLITE_OPEN_READONLY | SQLITE_OPEN_NOMUTEX
|
||||
let result = sqlite3_open_v2(path, &db, flags, nil)
|
||||
guard result == SQLITE_OK else {
|
||||
db = nil
|
||||
return false
|
||||
}
|
||||
sqlite3_exec(db, "PRAGMA journal_mode=WAL", nil, nil, nil)
|
||||
return true
|
||||
}
|
||||
|
||||
func close() {
|
||||
if let db {
|
||||
sqlite3_close(db)
|
||||
}
|
||||
db = nil
|
||||
}
|
||||
|
||||
func fetchSessions(limit: Int = 100) -> [HermesSession] {
|
||||
guard let db else { return [] }
|
||||
let sql = """
|
||||
SELECT id, source, user_id, model, title, parent_session_id,
|
||||
started_at, ended_at, end_reason, message_count, tool_call_count,
|
||||
input_tokens, output_tokens, cache_read_tokens, cache_write_tokens,
|
||||
estimated_cost_usd
|
||||
FROM sessions
|
||||
ORDER BY started_at DESC
|
||||
LIMIT ?
|
||||
"""
|
||||
var stmt: OpaquePointer?
|
||||
guard sqlite3_prepare_v2(db, sql, -1, &stmt, nil) == SQLITE_OK else { return [] }
|
||||
defer { sqlite3_finalize(stmt) }
|
||||
sqlite3_bind_int(stmt, 1, Int32(limit))
|
||||
|
||||
var sessions: [HermesSession] = []
|
||||
while sqlite3_step(stmt) == SQLITE_ROW {
|
||||
sessions.append(sessionFromRow(stmt!))
|
||||
}
|
||||
return sessions
|
||||
}
|
||||
|
||||
func fetchMessages(sessionId: String) -> [HermesMessage] {
|
||||
guard let db else { return [] }
|
||||
let sql = """
|
||||
SELECT id, session_id, role, content, tool_call_id, tool_calls,
|
||||
tool_name, timestamp, token_count, finish_reason
|
||||
FROM messages
|
||||
WHERE session_id = ?
|
||||
ORDER BY timestamp ASC
|
||||
"""
|
||||
var stmt: OpaquePointer?
|
||||
guard sqlite3_prepare_v2(db, sql, -1, &stmt, nil) == SQLITE_OK else { return [] }
|
||||
defer { sqlite3_finalize(stmt) }
|
||||
sqlite3_bind_text(stmt, 1, sessionId, -1, unsafeBitCast(-1, to: sqlite3_destructor_type.self))
|
||||
|
||||
var messages: [HermesMessage] = []
|
||||
while sqlite3_step(stmt) == SQLITE_ROW {
|
||||
messages.append(messageFromRow(stmt!))
|
||||
}
|
||||
return messages
|
||||
}
|
||||
|
||||
func searchMessages(query: String, limit: Int = 50) -> [HermesMessage] {
|
||||
guard let db else { return [] }
|
||||
let sql = """
|
||||
SELECT m.id, m.session_id, m.role, m.content, m.tool_call_id, m.tool_calls,
|
||||
m.tool_name, m.timestamp, m.token_count, m.finish_reason
|
||||
FROM messages_fts fts
|
||||
JOIN messages m ON m.id = fts.rowid
|
||||
WHERE messages_fts MATCH ?
|
||||
ORDER BY rank
|
||||
LIMIT ?
|
||||
"""
|
||||
var stmt: OpaquePointer?
|
||||
guard sqlite3_prepare_v2(db, sql, -1, &stmt, nil) == SQLITE_OK else { return [] }
|
||||
defer { sqlite3_finalize(stmt) }
|
||||
sqlite3_bind_text(stmt, 1, query, -1, unsafeBitCast(-1, to: sqlite3_destructor_type.self))
|
||||
sqlite3_bind_int(stmt, 2, Int32(limit))
|
||||
|
||||
var messages: [HermesMessage] = []
|
||||
while sqlite3_step(stmt) == SQLITE_ROW {
|
||||
messages.append(messageFromRow(stmt!))
|
||||
}
|
||||
return messages
|
||||
}
|
||||
|
||||
func fetchRecentToolCalls(limit: Int = 50) -> [HermesMessage] {
|
||||
guard let db else { return [] }
|
||||
let sql = """
|
||||
SELECT id, session_id, role, content, tool_call_id, tool_calls,
|
||||
tool_name, timestamp, token_count, finish_reason
|
||||
FROM messages
|
||||
WHERE tool_calls IS NOT NULL AND tool_calls != '[]' AND tool_calls != ''
|
||||
ORDER BY timestamp DESC
|
||||
LIMIT ?
|
||||
"""
|
||||
var stmt: OpaquePointer?
|
||||
guard sqlite3_prepare_v2(db, sql, -1, &stmt, nil) == SQLITE_OK else { return [] }
|
||||
defer { sqlite3_finalize(stmt) }
|
||||
sqlite3_bind_int(stmt, 1, Int32(limit))
|
||||
|
||||
var messages: [HermesMessage] = []
|
||||
while sqlite3_step(stmt) == SQLITE_ROW {
|
||||
messages.append(messageFromRow(stmt!))
|
||||
}
|
||||
return messages
|
||||
}
|
||||
|
||||
func fetchSessionPreviews(limit: Int = 10) -> [String: String] {
|
||||
guard let db else { return [:] }
|
||||
let sql = """
|
||||
SELECT m.session_id, substr(m.content, 1, 100)
|
||||
FROM messages m
|
||||
INNER JOIN (
|
||||
SELECT session_id, MIN(id) as min_id
|
||||
FROM messages
|
||||
WHERE role = 'user' AND content <> ''
|
||||
GROUP BY session_id
|
||||
) first ON m.id = first.min_id
|
||||
ORDER BY m.timestamp DESC
|
||||
LIMIT ?
|
||||
"""
|
||||
var stmt: OpaquePointer?
|
||||
guard sqlite3_prepare_v2(db, sql, -1, &stmt, nil) == SQLITE_OK else { return [:] }
|
||||
defer { sqlite3_finalize(stmt) }
|
||||
sqlite3_bind_int(stmt, 1, Int32(limit))
|
||||
|
||||
var previews: [String: String] = [:]
|
||||
while sqlite3_step(stmt) == SQLITE_ROW {
|
||||
let sessionId = columnText(stmt!, 0)
|
||||
let preview = columnText(stmt!, 1)
|
||||
previews[sessionId] = preview
|
||||
}
|
||||
return previews
|
||||
}
|
||||
|
||||
struct SessionStats: Sendable {
|
||||
let totalSessions: Int
|
||||
let totalMessages: Int
|
||||
let totalToolCalls: Int
|
||||
let totalInputTokens: Int
|
||||
let totalOutputTokens: Int
|
||||
let totalCostUSD: Double
|
||||
}
|
||||
|
||||
func fetchStats() -> SessionStats {
|
||||
guard let db else {
|
||||
return SessionStats(totalSessions: 0, totalMessages: 0, totalToolCalls: 0,
|
||||
totalInputTokens: 0, totalOutputTokens: 0, totalCostUSD: 0)
|
||||
}
|
||||
let sql = """
|
||||
SELECT COUNT(*), COALESCE(SUM(message_count),0), COALESCE(SUM(tool_call_count),0),
|
||||
COALESCE(SUM(input_tokens),0), COALESCE(SUM(output_tokens),0),
|
||||
COALESCE(SUM(estimated_cost_usd),0)
|
||||
FROM sessions
|
||||
"""
|
||||
var stmt: OpaquePointer?
|
||||
guard sqlite3_prepare_v2(db, sql, -1, &stmt, nil) == SQLITE_OK else {
|
||||
return SessionStats(totalSessions: 0, totalMessages: 0, totalToolCalls: 0,
|
||||
totalInputTokens: 0, totalOutputTokens: 0, totalCostUSD: 0)
|
||||
}
|
||||
defer { sqlite3_finalize(stmt) }
|
||||
|
||||
guard sqlite3_step(stmt) == SQLITE_ROW else {
|
||||
return SessionStats(totalSessions: 0, totalMessages: 0, totalToolCalls: 0,
|
||||
totalInputTokens: 0, totalOutputTokens: 0, totalCostUSD: 0)
|
||||
}
|
||||
return SessionStats(
|
||||
totalSessions: Int(sqlite3_column_int(stmt, 0)),
|
||||
totalMessages: Int(sqlite3_column_int(stmt, 1)),
|
||||
totalToolCalls: Int(sqlite3_column_int(stmt, 2)),
|
||||
totalInputTokens: Int(sqlite3_column_int(stmt, 3)),
|
||||
totalOutputTokens: Int(sqlite3_column_int(stmt, 4)),
|
||||
totalCostUSD: sqlite3_column_double(stmt, 5)
|
||||
)
|
||||
}
|
||||
|
||||
func stateDBModificationDate() -> Date? {
|
||||
let walPath = HermesPaths.stateDB + "-wal"
|
||||
let dbPath = HermesPaths.stateDB
|
||||
let fm = FileManager.default
|
||||
let walDate = (try? fm.attributesOfItem(atPath: walPath))?[.modificationDate] as? Date
|
||||
let dbDate = (try? fm.attributesOfItem(atPath: dbPath))?[.modificationDate] as? Date
|
||||
if let w = walDate, let d = dbDate {
|
||||
return max(w, d)
|
||||
}
|
||||
return walDate ?? dbDate
|
||||
}
|
||||
|
||||
// MARK: - Row Parsing
|
||||
|
||||
private func sessionFromRow(_ stmt: OpaquePointer) -> HermesSession {
|
||||
HermesSession(
|
||||
id: columnText(stmt, 0),
|
||||
source: columnText(stmt, 1),
|
||||
userId: columnOptionalText(stmt, 2),
|
||||
model: columnOptionalText(stmt, 3),
|
||||
title: columnOptionalText(stmt, 4),
|
||||
parentSessionId: columnOptionalText(stmt, 5),
|
||||
startedAt: columnDate(stmt, 6),
|
||||
endedAt: columnDate(stmt, 7),
|
||||
endReason: columnOptionalText(stmt, 8),
|
||||
messageCount: Int(sqlite3_column_int(stmt, 9)),
|
||||
toolCallCount: Int(sqlite3_column_int(stmt, 10)),
|
||||
inputTokens: Int(sqlite3_column_int(stmt, 11)),
|
||||
outputTokens: Int(sqlite3_column_int(stmt, 12)),
|
||||
cacheReadTokens: Int(sqlite3_column_int(stmt, 13)),
|
||||
cacheWriteTokens: Int(sqlite3_column_int(stmt, 14)),
|
||||
estimatedCostUSD: sqlite3_column_type(stmt, 15) != SQLITE_NULL ? sqlite3_column_double(stmt, 15) : nil
|
||||
)
|
||||
}
|
||||
|
||||
private func messageFromRow(_ stmt: OpaquePointer) -> HermesMessage {
|
||||
let toolCallsJSON = columnOptionalText(stmt, 5)
|
||||
let toolCalls = parseToolCalls(toolCallsJSON)
|
||||
return HermesMessage(
|
||||
id: Int(sqlite3_column_int(stmt, 0)),
|
||||
sessionId: columnText(stmt, 1),
|
||||
role: columnText(stmt, 2),
|
||||
content: columnText(stmt, 3),
|
||||
toolCallId: columnOptionalText(stmt, 4),
|
||||
toolCalls: toolCalls,
|
||||
toolName: columnOptionalText(stmt, 6),
|
||||
timestamp: columnDate(stmt, 7),
|
||||
tokenCount: sqlite3_column_type(stmt, 8) != SQLITE_NULL ? Int(sqlite3_column_int(stmt, 8)) : nil,
|
||||
finishReason: columnOptionalText(stmt, 9)
|
||||
)
|
||||
}
|
||||
|
||||
private func parseToolCalls(_ json: String?) -> [HermesToolCall] {
|
||||
guard let json, !json.isEmpty,
|
||||
let data = json.data(using: .utf8) else { return [] }
|
||||
return (try? JSONDecoder().decode([HermesToolCall].self, from: data)) ?? []
|
||||
}
|
||||
|
||||
private func columnText(_ stmt: OpaquePointer, _ col: Int32) -> String {
|
||||
if let cStr = sqlite3_column_text(stmt, col) {
|
||||
return String(cString: cStr)
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
private func columnOptionalText(_ stmt: OpaquePointer, _ col: Int32) -> String? {
|
||||
guard sqlite3_column_type(stmt, col) != SQLITE_NULL,
|
||||
let cStr = sqlite3_column_text(stmt, col) else { return nil }
|
||||
return String(cString: cStr)
|
||||
}
|
||||
|
||||
private func columnDate(_ stmt: OpaquePointer, _ col: Int32) -> Date? {
|
||||
guard sqlite3_column_type(stmt, col) != SQLITE_NULL else { return nil }
|
||||
let value = sqlite3_column_double(stmt, col)
|
||||
return Date(timeIntervalSince1970: value)
|
||||
}
|
||||
}
|
||||
@@ -1,159 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
struct HermesFileService: Sendable {
|
||||
|
||||
// MARK: - Config
|
||||
|
||||
func loadConfig() -> HermesConfig {
|
||||
guard let content = readFile(HermesPaths.configYAML) else { return .empty }
|
||||
return parseConfig(content)
|
||||
}
|
||||
|
||||
private func parseConfig(_ yaml: String) -> HermesConfig {
|
||||
var values: [String: String] = [:]
|
||||
var currentSection = ""
|
||||
|
||||
for line in yaml.components(separatedBy: "\n") {
|
||||
let trimmed = line.trimmingCharacters(in: .whitespaces)
|
||||
if trimmed.isEmpty || trimmed.hasPrefix("#") { continue }
|
||||
|
||||
let indent = line.prefix(while: { $0 == " " }).count
|
||||
if indent == 0 && trimmed.hasSuffix(":") {
|
||||
currentSection = String(trimmed.dropLast())
|
||||
continue
|
||||
}
|
||||
|
||||
if let colonIdx = trimmed.firstIndex(of: ":") {
|
||||
let key = String(trimmed[trimmed.startIndex..<colonIdx]).trimmingCharacters(in: .whitespaces)
|
||||
let val = String(trimmed[trimmed.index(after: colonIdx)...]).trimmingCharacters(in: .whitespaces)
|
||||
values[currentSection + "." + key] = val
|
||||
}
|
||||
}
|
||||
|
||||
return HermesConfig(
|
||||
model: values["model.default"] ?? "unknown",
|
||||
provider: values["model.provider"] ?? "unknown",
|
||||
maxTurns: Int(values["agent.max_turns"] ?? "") ?? 0,
|
||||
personality: values["display.personality"] ?? "default",
|
||||
terminalBackend: values["terminal.backend"] ?? "local",
|
||||
memoryEnabled: values["memory.memory_enabled"] == "true",
|
||||
memoryCharLimit: Int(values["memory.memory_char_limit"] ?? "") ?? 0,
|
||||
userCharLimit: Int(values["memory.user_char_limit"] ?? "") ?? 0,
|
||||
nudgeInterval: Int(values["memory.nudge_interval"] ?? "") ?? 0,
|
||||
streaming: values["display.streaming"] != "false",
|
||||
showReasoning: values["display.show_reasoning"] == "true",
|
||||
verbose: values["agent.verbose"] == "true"
|
||||
)
|
||||
}
|
||||
|
||||
// MARK: - Gateway State
|
||||
|
||||
func loadGatewayState() -> GatewayState? {
|
||||
guard let data = readFileData(HermesPaths.gatewayStateJSON) else { return nil }
|
||||
return try? JSONDecoder().decode(GatewayState.self, from: data)
|
||||
}
|
||||
|
||||
// MARK: - Memory
|
||||
|
||||
func loadMemory() -> String {
|
||||
readFile(HermesPaths.memoryMD) ?? ""
|
||||
}
|
||||
|
||||
func loadUserProfile() -> String {
|
||||
readFile(HermesPaths.userMD) ?? ""
|
||||
}
|
||||
|
||||
func saveMemory(_ content: String) {
|
||||
writeFile(HermesPaths.memoryMD, content: content)
|
||||
}
|
||||
|
||||
func saveUserProfile(_ content: String) {
|
||||
writeFile(HermesPaths.userMD, content: content)
|
||||
}
|
||||
|
||||
// MARK: - Cron
|
||||
|
||||
func loadCronJobs() -> [HermesCronJob] {
|
||||
guard let data = readFileData(HermesPaths.cronJobsJSON) else { return [] }
|
||||
let file = try? JSONDecoder().decode(CronJobsFile.self, from: data)
|
||||
return file?.jobs ?? []
|
||||
}
|
||||
|
||||
func loadCronOutput(jobId: String) -> String? {
|
||||
let dir = HermesPaths.cronOutputDir
|
||||
let fm = FileManager.default
|
||||
guard let files = try? fm.contentsOfDirectory(atPath: dir) else { return nil }
|
||||
let matching = files.filter { $0.contains(jobId) }.sorted().last
|
||||
guard let filename = matching else { return nil }
|
||||
return readFile(dir + "/" + filename)
|
||||
}
|
||||
|
||||
// MARK: - Skills
|
||||
|
||||
func loadSkills() -> [HermesSkillCategory] {
|
||||
let dir = HermesPaths.skillsDir
|
||||
let fm = FileManager.default
|
||||
guard let categories = try? fm.contentsOfDirectory(atPath: dir) else { return [] }
|
||||
|
||||
return categories.sorted().compactMap { categoryName in
|
||||
let categoryPath = dir + "/" + categoryName
|
||||
var isDir: ObjCBool = false
|
||||
guard fm.fileExists(atPath: categoryPath, isDirectory: &isDir), isDir.boolValue else { return nil }
|
||||
guard let skillNames = try? fm.contentsOfDirectory(atPath: categoryPath) else { return nil }
|
||||
|
||||
let skills = skillNames.sorted().compactMap { skillName -> HermesSkill? in
|
||||
let skillPath = categoryPath + "/" + skillName
|
||||
var isSkillDir: ObjCBool = false
|
||||
guard fm.fileExists(atPath: skillPath, isDirectory: &isSkillDir), isSkillDir.boolValue else { return nil }
|
||||
let files = (try? fm.contentsOfDirectory(atPath: skillPath)) ?? []
|
||||
return HermesSkill(
|
||||
id: categoryName + "/" + skillName,
|
||||
name: skillName,
|
||||
category: categoryName,
|
||||
path: skillPath,
|
||||
files: files.sorted()
|
||||
)
|
||||
}
|
||||
|
||||
guard !skills.isEmpty else { return nil }
|
||||
return HermesSkillCategory(id: categoryName, name: categoryName, skills: skills)
|
||||
}
|
||||
}
|
||||
|
||||
func loadSkillContent(path: String) -> String {
|
||||
readFile(path) ?? ""
|
||||
}
|
||||
|
||||
// MARK: - Hermes Process
|
||||
|
||||
func isHermesRunning() -> Bool {
|
||||
let pipe = Pipe()
|
||||
let process = Process()
|
||||
process.executableURL = URL(fileURLWithPath: "/usr/bin/pgrep")
|
||||
process.arguments = ["-f", "hermes"]
|
||||
process.standardOutput = pipe
|
||||
process.standardError = Pipe()
|
||||
do {
|
||||
try process.run()
|
||||
process.waitUntilExit()
|
||||
let data = pipe.fileHandleForReading.readDataToEndOfFile()
|
||||
return !data.isEmpty
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - File I/O
|
||||
|
||||
private func readFile(_ path: String) -> String? {
|
||||
try? String(contentsOfFile: path, encoding: .utf8)
|
||||
}
|
||||
|
||||
private func readFileData(_ path: String) -> Data? {
|
||||
FileManager.default.contents(atPath: path)
|
||||
}
|
||||
|
||||
private func writeFile(_ path: String, content: String) {
|
||||
try? content.write(toFile: path, atomically: true, encoding: .utf8)
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
@Observable
|
||||
final class HermesFileWatcher {
|
||||
private(set) var lastChangeDate = Date()
|
||||
private var sources: [DispatchSourceFileSystemObject] = []
|
||||
private var timer: Timer?
|
||||
|
||||
func startWatching() {
|
||||
let paths = [
|
||||
HermesPaths.stateDB,
|
||||
HermesPaths.stateDB + "-wal",
|
||||
HermesPaths.configYAML,
|
||||
HermesPaths.memoryMD,
|
||||
HermesPaths.userMD,
|
||||
HermesPaths.cronJobsJSON,
|
||||
HermesPaths.gatewayStateJSON,
|
||||
HermesPaths.errorsLog,
|
||||
HermesPaths.gatewayLog
|
||||
]
|
||||
|
||||
for path in paths {
|
||||
watchFile(path)
|
||||
}
|
||||
|
||||
timer = Timer.scheduledTimer(withTimeInterval: 5.0, repeats: true) { [weak self] _ in
|
||||
self?.lastChangeDate = Date()
|
||||
}
|
||||
}
|
||||
|
||||
func stopWatching() {
|
||||
for source in sources {
|
||||
source.cancel()
|
||||
}
|
||||
sources.removeAll()
|
||||
timer?.invalidate()
|
||||
timer = nil
|
||||
}
|
||||
|
||||
private func watchFile(_ path: String) {
|
||||
let fd = Darwin.open(path, O_EVTONLY)
|
||||
guard fd >= 0 else { return }
|
||||
|
||||
let source = DispatchSource.makeFileSystemObjectSource(
|
||||
fileDescriptor: fd,
|
||||
eventMask: [.write, .extend, .rename],
|
||||
queue: .main
|
||||
)
|
||||
source.setEventHandler { [weak self] in
|
||||
self?.lastChangeDate = Date()
|
||||
}
|
||||
source.setCancelHandler {
|
||||
Darwin.close(fd)
|
||||
}
|
||||
source.resume()
|
||||
sources.append(source)
|
||||
}
|
||||
|
||||
deinit {
|
||||
stopWatching()
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
struct LogEntry: Identifiable, Sendable {
|
||||
let id: Int
|
||||
let timestamp: String
|
||||
let level: LogLevel
|
||||
let logger: String
|
||||
let message: String
|
||||
let raw: String
|
||||
|
||||
enum LogLevel: String, Sendable, CaseIterable {
|
||||
case debug = "DEBUG"
|
||||
case info = "INFO"
|
||||
case warning = "WARNING"
|
||||
case error = "ERROR"
|
||||
case critical = "CRITICAL"
|
||||
|
||||
var color: String {
|
||||
switch self {
|
||||
case .debug: return "secondary"
|
||||
case .info: return "primary"
|
||||
case .warning: return "orange"
|
||||
case .error: return "red"
|
||||
case .critical: return "red"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
actor HermesLogService {
|
||||
private var fileHandle: FileHandle?
|
||||
private var currentPath: String?
|
||||
private var entryCounter = 0
|
||||
|
||||
func openLog(path: String) {
|
||||
closeLog()
|
||||
currentPath = path
|
||||
fileHandle = FileHandle(forReadingAtPath: path)
|
||||
}
|
||||
|
||||
func closeLog() {
|
||||
try? fileHandle?.close()
|
||||
fileHandle = nil
|
||||
currentPath = nil
|
||||
}
|
||||
|
||||
func readLastLines(count: Int = 200) -> [LogEntry] {
|
||||
guard let path = currentPath,
|
||||
let data = FileManager.default.contents(atPath: path) else { return [] }
|
||||
let content = String(data: data, encoding: .utf8) ?? ""
|
||||
let lines = content.components(separatedBy: "\n").filter { !$0.isEmpty }
|
||||
let lastLines = Array(lines.suffix(count))
|
||||
return lastLines.map { parseLine($0) }
|
||||
}
|
||||
|
||||
func readNewLines() -> [LogEntry] {
|
||||
guard let handle = fileHandle else { return [] }
|
||||
let data = handle.availableData
|
||||
guard !data.isEmpty else { return [] }
|
||||
let content = String(data: data, encoding: .utf8) ?? ""
|
||||
let lines = content.components(separatedBy: "\n").filter { !$0.isEmpty }
|
||||
return lines.map { parseLine($0) }
|
||||
}
|
||||
|
||||
func seekToEnd() {
|
||||
fileHandle?.seekToEndOfFile()
|
||||
}
|
||||
|
||||
private func parseLine(_ line: String) -> LogEntry {
|
||||
entryCounter += 1
|
||||
// Format: YYYY-MM-DD HH:MM:SS,MMM LEVEL logger: message
|
||||
let pattern = #"^(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3})\s+(DEBUG|INFO|WARNING|ERROR|CRITICAL)\s+(\S+?):\s+(.*)$"#
|
||||
if let regex = try? NSRegularExpression(pattern: pattern),
|
||||
let match = regex.firstMatch(in: line, range: NSRange(line.startIndex..., in: line)) {
|
||||
let timestamp = String(line[Range(match.range(at: 1), in: line)!])
|
||||
let levelStr = String(line[Range(match.range(at: 2), in: line)!])
|
||||
let logger = String(line[Range(match.range(at: 3), in: line)!])
|
||||
let message = String(line[Range(match.range(at: 4), in: line)!])
|
||||
return LogEntry(
|
||||
id: entryCounter,
|
||||
timestamp: timestamp,
|
||||
level: LogEntry.LogLevel(rawValue: levelStr) ?? .info,
|
||||
logger: logger,
|
||||
message: message,
|
||||
raw: line
|
||||
)
|
||||
}
|
||||
return LogEntry(id: entryCounter, timestamp: "", level: .info, logger: "", message: line, raw: line)
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
@Observable
|
||||
final class ActivityViewModel {
|
||||
private let dataService = HermesDataService()
|
||||
|
||||
var toolMessages: [HermesMessage] = []
|
||||
var filterKind: ToolKind?
|
||||
var selectedEntry: ActivityEntry?
|
||||
var isLoading = true
|
||||
|
||||
var filteredActivity: [ActivityEntry] {
|
||||
let entries = toolMessages.flatMap { message in
|
||||
message.toolCalls.map { call in
|
||||
ActivityEntry(
|
||||
id: call.callId,
|
||||
sessionId: message.sessionId,
|
||||
toolName: call.functionName,
|
||||
kind: call.toolKind,
|
||||
summary: call.argumentsSummary,
|
||||
arguments: call.arguments,
|
||||
messageContent: message.content,
|
||||
timestamp: message.timestamp
|
||||
)
|
||||
}
|
||||
}
|
||||
if let filterKind {
|
||||
return entries.filter { $0.kind == filterKind }
|
||||
}
|
||||
return entries
|
||||
}
|
||||
|
||||
func load() async {
|
||||
isLoading = true
|
||||
let opened = await dataService.open()
|
||||
guard opened else {
|
||||
isLoading = false
|
||||
return
|
||||
}
|
||||
toolMessages = await dataService.fetchRecentToolCalls(limit: 200)
|
||||
isLoading = false
|
||||
}
|
||||
|
||||
func cleanup() async {
|
||||
await dataService.close()
|
||||
}
|
||||
}
|
||||
|
||||
struct ActivityEntry: Identifiable, Sendable {
|
||||
let id: String
|
||||
let sessionId: String
|
||||
let toolName: String
|
||||
let kind: ToolKind
|
||||
let summary: String
|
||||
let arguments: String
|
||||
let messageContent: String
|
||||
let timestamp: Date?
|
||||
|
||||
var prettyArguments: String {
|
||||
guard let data = arguments.data(using: .utf8),
|
||||
let json = try? JSONSerialization.jsonObject(with: data, options: []),
|
||||
let pretty = try? JSONSerialization.data(withJSONObject: json, options: [.prettyPrinted, .sortedKeys]),
|
||||
let str = String(data: pretty, encoding: .utf8) else {
|
||||
return arguments
|
||||
}
|
||||
return str
|
||||
}
|
||||
}
|
||||
@@ -1,185 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
struct ActivityView: View {
|
||||
@State private var viewModel = ActivityViewModel()
|
||||
@Environment(AppCoordinator.self) private var coordinator
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
filterBar
|
||||
Divider()
|
||||
HSplitView {
|
||||
activityList
|
||||
.frame(minWidth: 350, idealWidth: 450)
|
||||
activityDetail
|
||||
.frame(minWidth: 300)
|
||||
}
|
||||
}
|
||||
.navigationTitle("Activity")
|
||||
.task { await viewModel.load() }
|
||||
.onDisappear { Task { await viewModel.cleanup() } }
|
||||
}
|
||||
|
||||
private var filterBar: some View {
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(spacing: 8) {
|
||||
FilterChip(label: "All", isSelected: viewModel.filterKind == nil) {
|
||||
viewModel.filterKind = nil
|
||||
}
|
||||
ForEach(ToolKind.allCases, id: \.rawValue) { kind in
|
||||
FilterChip(label: kind.rawValue.capitalized, isSelected: viewModel.filterKind == kind) {
|
||||
viewModel.filterKind = kind
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.horizontal)
|
||||
.padding(.vertical, 8)
|
||||
}
|
||||
}
|
||||
|
||||
private var activityList: some View {
|
||||
List(selection: Binding(
|
||||
get: { viewModel.selectedEntry?.id },
|
||||
set: { id in
|
||||
if let id {
|
||||
viewModel.selectedEntry = viewModel.filteredActivity.first(where: { $0.id == id })
|
||||
} else {
|
||||
viewModel.selectedEntry = nil
|
||||
}
|
||||
}
|
||||
)) {
|
||||
ForEach(viewModel.filteredActivity) { entry in
|
||||
HStack(spacing: 10) {
|
||||
Image(systemName: entry.kind.icon)
|
||||
.foregroundStyle(colorForKind(entry.kind))
|
||||
.frame(width: 20)
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text(entry.toolName)
|
||||
.font(.system(.body, design: .monospaced, weight: .medium))
|
||||
Text(entry.summary)
|
||||
.font(.caption.monospaced())
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(2)
|
||||
}
|
||||
Spacer()
|
||||
if let time = entry.timestamp {
|
||||
Text(time, style: .time)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
.tag(entry.id)
|
||||
.padding(.vertical, 2)
|
||||
}
|
||||
}
|
||||
.listStyle(.inset)
|
||||
.overlay {
|
||||
if viewModel.filteredActivity.isEmpty && !viewModel.isLoading {
|
||||
ContentUnavailableView("No Activity", systemImage: "bolt.horizontal", description: Text("No tool calls found"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var activityDetail: some View {
|
||||
if let entry = viewModel.selectedEntry {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
HStack(spacing: 8) {
|
||||
Image(systemName: entry.kind.icon)
|
||||
.font(.title2)
|
||||
.foregroundStyle(colorForKind(entry.kind))
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text(entry.toolName)
|
||||
.font(.title3.bold().monospaced())
|
||||
Text(entry.kind.rawValue.capitalized)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
|
||||
HStack(spacing: 16) {
|
||||
if let time = entry.timestamp {
|
||||
Label(time.formatted(.dateTime.month().day().hour().minute().second()), systemImage: "clock")
|
||||
}
|
||||
Button {
|
||||
coordinator.selectedSessionId = entry.sessionId
|
||||
coordinator.selectedSection = .sessions
|
||||
} label: {
|
||||
Label(String(entry.sessionId.prefix(20)), systemImage: "bubble.left.and.bubble.right")
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.foregroundStyle(Color.accentColor)
|
||||
.help("Open session")
|
||||
}
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
Divider()
|
||||
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text("Arguments")
|
||||
.font(.caption.bold())
|
||||
.foregroundStyle(.secondary)
|
||||
Text(entry.prettyArguments)
|
||||
.font(.system(.caption, design: .monospaced))
|
||||
.textSelection(.enabled)
|
||||
.padding(8)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.background(.quaternary.opacity(0.5))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
|
||||
if !entry.messageContent.isEmpty {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text("Assistant Message")
|
||||
.font(.caption.bold())
|
||||
.foregroundStyle(.secondary)
|
||||
Text(entry.messageContent)
|
||||
.font(.caption)
|
||||
.textSelection(.enabled)
|
||||
.padding(8)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.background(.quaternary.opacity(0.5))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity, alignment: .topLeading)
|
||||
}
|
||||
} else {
|
||||
ContentUnavailableView("Select a Tool Call", systemImage: "bolt.horizontal", description: Text("Choose an entry from the list"))
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
}
|
||||
|
||||
private func colorForKind(_ kind: ToolKind) -> Color {
|
||||
switch kind {
|
||||
case .read: return .green
|
||||
case .edit: return .blue
|
||||
case .execute: return .orange
|
||||
case .fetch: return .purple
|
||||
case .browser: return .indigo
|
||||
case .other: return .secondary
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct FilterChip: View {
|
||||
let label: String
|
||||
let isSelected: Bool
|
||||
let action: () -> Void
|
||||
|
||||
var body: some View {
|
||||
Button(action: action) {
|
||||
Text(label)
|
||||
.font(.caption)
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.vertical, 4)
|
||||
.background(isSelected ? Color.accentColor.opacity(0.2) : Color.secondary.opacity(0.1))
|
||||
.clipShape(Capsule())
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
import Foundation
|
||||
import AppKit
|
||||
import SwiftTerm
|
||||
|
||||
@Observable
|
||||
final class ChatViewModel {
|
||||
private let dataService = HermesDataService()
|
||||
|
||||
var recentSessions: [HermesSession] = []
|
||||
var sessionPreviews: [String: String] = [:]
|
||||
var terminalView: LocalProcessTerminalView?
|
||||
var hasActiveProcess = false
|
||||
private var coordinator: Coordinator?
|
||||
|
||||
var hermesBinaryExists: Bool {
|
||||
FileManager.default.fileExists(atPath: HermesPaths.hermesBinary)
|
||||
}
|
||||
|
||||
func startNewSession() {
|
||||
launchTerminal(arguments: ["chat"])
|
||||
}
|
||||
|
||||
func resumeSession(_ sessionId: String) {
|
||||
launchTerminal(arguments: ["chat", "--resume", sessionId])
|
||||
}
|
||||
|
||||
func continueLastSession() {
|
||||
launchTerminal(arguments: ["chat", "--continue"])
|
||||
}
|
||||
|
||||
func loadRecentSessions() async {
|
||||
let opened = await dataService.open()
|
||||
guard opened else { return }
|
||||
recentSessions = await dataService.fetchSessions(limit: 10)
|
||||
sessionPreviews = await dataService.fetchSessionPreviews(limit: 10)
|
||||
await dataService.close()
|
||||
}
|
||||
|
||||
func previewFor(_ session: HermesSession) -> String {
|
||||
if let title = session.title, !title.isEmpty { return title }
|
||||
if let preview = sessionPreviews[session.id], !preview.isEmpty { return preview }
|
||||
return session.id
|
||||
}
|
||||
|
||||
private func launchTerminal(arguments: [String]) {
|
||||
if let existing = terminalView {
|
||||
existing.terminate()
|
||||
existing.removeFromSuperview()
|
||||
}
|
||||
|
||||
let terminal = LocalProcessTerminalView(frame: .zero)
|
||||
terminal.font = NSFont.monospacedSystemFont(ofSize: 13, weight: .regular)
|
||||
terminal.nativeBackgroundColor = NSColor(red: 0.11, green: 0.12, blue: 0.14, alpha: 1.0)
|
||||
terminal.nativeForegroundColor = NSColor(red: 0.85, green: 0.87, blue: 0.91, alpha: 1.0)
|
||||
|
||||
let coord = Coordinator(onTerminated: { [weak self] in
|
||||
self?.hasActiveProcess = false
|
||||
})
|
||||
terminal.processDelegate = coord
|
||||
self.coordinator = coord
|
||||
|
||||
var env = ProcessInfo.processInfo.environment
|
||||
env["TERM"] = "xterm-256color"
|
||||
env["COLORTERM"] = "truecolor"
|
||||
let envArray = env.map { "\($0.key)=\($0.value)" }
|
||||
|
||||
terminal.startProcess(
|
||||
executable: HermesPaths.hermesBinary,
|
||||
args: arguments,
|
||||
environment: envArray,
|
||||
execName: nil
|
||||
)
|
||||
|
||||
self.terminalView = terminal
|
||||
self.hasActiveProcess = true
|
||||
}
|
||||
|
||||
final class Coordinator: NSObject, LocalProcessTerminalViewDelegate {
|
||||
let onTerminated: () -> Void
|
||||
|
||||
init(onTerminated: @escaping () -> Void) {
|
||||
self.onTerminated = onTerminated
|
||||
}
|
||||
|
||||
func sizeChanged(source: LocalProcessTerminalView, newCols: Int, newRows: Int) {}
|
||||
func setTerminalTitle(source: LocalProcessTerminalView, title: String) {}
|
||||
func hostCurrentDirectoryUpdate(source: TerminalView, directory: String?) {}
|
||||
|
||||
func processTerminated(source: TerminalView, exitCode: Int32?) {
|
||||
let terminal = source.getTerminal()
|
||||
terminal.feed(text: "\r\n[Process exited with code \(exitCode ?? -1). Use the toolbar to start or resume a session.]\r\n")
|
||||
DispatchQueue.main.async { self.onTerminated() }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
struct ChatView: View {
|
||||
@Environment(ChatViewModel.self) private var viewModel
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
toolbar
|
||||
Divider()
|
||||
terminalArea
|
||||
}
|
||||
.navigationTitle("Chat")
|
||||
.task { await viewModel.loadRecentSessions() }
|
||||
}
|
||||
|
||||
private var toolbar: some View {
|
||||
HStack(spacing: 12) {
|
||||
Image(systemName: "terminal")
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
if viewModel.hasActiveProcess {
|
||||
Circle()
|
||||
.fill(.green)
|
||||
.frame(width: 6, height: 6)
|
||||
Text("Active")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
} else {
|
||||
Circle()
|
||||
.fill(.secondary)
|
||||
.frame(width: 6, height: 6)
|
||||
Text("No active session")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
if !viewModel.hermesBinaryExists {
|
||||
Label("Hermes binary not found", systemImage: "exclamationmark.triangle")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.red)
|
||||
}
|
||||
|
||||
Menu {
|
||||
Button("New Session") {
|
||||
viewModel.startNewSession()
|
||||
}
|
||||
Button("Continue Last Session") {
|
||||
viewModel.continueLastSession()
|
||||
}
|
||||
if !viewModel.recentSessions.isEmpty {
|
||||
Divider()
|
||||
Text("Resume Session")
|
||||
ForEach(viewModel.recentSessions) { session in
|
||||
Button {
|
||||
viewModel.resumeSession(session.id)
|
||||
} label: {
|
||||
HStack {
|
||||
Text(viewModel.previewFor(session))
|
||||
.lineLimit(1)
|
||||
if let date = session.startedAt {
|
||||
Text("·")
|
||||
.foregroundStyle(.secondary)
|
||||
Text(date, style: .relative)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
Label("Session", systemImage: "play.circle")
|
||||
.font(.caption)
|
||||
}
|
||||
.menuStyle(.borderlessButton)
|
||||
.fixedSize()
|
||||
}
|
||||
.padding(.horizontal)
|
||||
.padding(.vertical, 6)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var terminalArea: some View {
|
||||
if let terminal = viewModel.terminalView {
|
||||
PersistentTerminalView(terminalView: terminal)
|
||||
} else if viewModel.hermesBinaryExists {
|
||||
ContentUnavailableView(
|
||||
"No Active Session",
|
||||
systemImage: "terminal",
|
||||
description: Text("Start a new session or resume an existing one from the Session menu above.")
|
||||
)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
} else {
|
||||
ContentUnavailableView(
|
||||
"Hermes Not Found",
|
||||
systemImage: "terminal",
|
||||
description: Text("Expected at \(HermesPaths.hermesBinary)")
|
||||
)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
import SwiftUI
|
||||
import AppKit
|
||||
import SwiftTerm
|
||||
|
||||
struct PersistentTerminalView: NSViewRepresentable {
|
||||
let terminalView: LocalProcessTerminalView
|
||||
|
||||
func makeNSView(context: Context) -> NSView {
|
||||
let container = NSView()
|
||||
terminalView.translatesAutoresizingMaskIntoConstraints = false
|
||||
container.addSubview(terminalView)
|
||||
NSLayoutConstraint.activate([
|
||||
terminalView.leadingAnchor.constraint(equalTo: container.leadingAnchor),
|
||||
terminalView.trailingAnchor.constraint(equalTo: container.trailingAnchor),
|
||||
terminalView.topAnchor.constraint(equalTo: container.topAnchor),
|
||||
terminalView.bottomAnchor.constraint(equalTo: container.bottomAnchor),
|
||||
])
|
||||
return container
|
||||
}
|
||||
|
||||
func updateNSView(_ nsView: NSView, context: Context) {
|
||||
if terminalView.superview !== nsView {
|
||||
nsView.subviews.forEach { $0.removeFromSuperview() }
|
||||
terminalView.translatesAutoresizingMaskIntoConstraints = false
|
||||
nsView.addSubview(terminalView)
|
||||
NSLayoutConstraint.activate([
|
||||
terminalView.leadingAnchor.constraint(equalTo: nsView.leadingAnchor),
|
||||
terminalView.trailingAnchor.constraint(equalTo: nsView.trailingAnchor),
|
||||
terminalView.topAnchor.constraint(equalTo: nsView.topAnchor),
|
||||
terminalView.bottomAnchor.constraint(equalTo: nsView.bottomAnchor),
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
@Observable
|
||||
final class CronViewModel {
|
||||
private let fileService = HermesFileService()
|
||||
|
||||
var jobs: [HermesCronJob] = []
|
||||
var selectedJob: HermesCronJob?
|
||||
var jobOutput: String?
|
||||
|
||||
func load() {
|
||||
jobs = fileService.loadCronJobs()
|
||||
}
|
||||
|
||||
func selectJob(_ job: HermesCronJob) {
|
||||
selectedJob = job
|
||||
jobOutput = fileService.loadCronOutput(jobId: job.id)
|
||||
}
|
||||
}
|
||||
@@ -1,145 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
struct CronView: View {
|
||||
@State private var viewModel = CronViewModel()
|
||||
|
||||
var body: some View {
|
||||
HSplitView {
|
||||
jobsList
|
||||
.frame(minWidth: 300, idealWidth: 350)
|
||||
jobDetail
|
||||
.frame(minWidth: 400)
|
||||
}
|
||||
.navigationTitle("Cron Jobs")
|
||||
.onAppear { viewModel.load() }
|
||||
}
|
||||
|
||||
private var jobsList: some View {
|
||||
List(selection: Binding(
|
||||
get: { viewModel.selectedJob?.id },
|
||||
set: { id in
|
||||
if let id, let job = viewModel.jobs.first(where: { $0.id == id }) {
|
||||
viewModel.selectJob(job)
|
||||
} else {
|
||||
viewModel.selectedJob = nil
|
||||
viewModel.jobOutput = nil
|
||||
}
|
||||
}
|
||||
)) {
|
||||
ForEach(viewModel.jobs) { job in
|
||||
HStack {
|
||||
Image(systemName: job.stateIcon)
|
||||
.foregroundStyle(job.enabled ? .primary : .secondary)
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text(job.name)
|
||||
.lineLimit(1)
|
||||
Text(job.schedule.display ?? job.schedule.kind)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
Spacer()
|
||||
if !job.enabled {
|
||||
Text("Disabled")
|
||||
.font(.caption2)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
.tag(job.id)
|
||||
}
|
||||
}
|
||||
.listStyle(.inset)
|
||||
.overlay {
|
||||
if viewModel.jobs.isEmpty {
|
||||
ContentUnavailableView("No Cron Jobs", systemImage: "clock.arrow.2.circlepath", description: Text("No scheduled jobs configured"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var jobDetail: some View {
|
||||
if let job = viewModel.selectedJob {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text(job.name)
|
||||
.font(.title2.bold())
|
||||
HStack(spacing: 16) {
|
||||
Label(job.state, systemImage: job.stateIcon)
|
||||
Label(job.schedule.display ?? job.schedule.kind, systemImage: "clock")
|
||||
Label(job.enabled ? "Enabled" : "Disabled", systemImage: job.enabled ? "checkmark.circle" : "xmark.circle")
|
||||
if let deliver = job.deliver {
|
||||
Label("Deliver: \(deliver)", systemImage: "paperplane")
|
||||
}
|
||||
}
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
Divider()
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text("Prompt")
|
||||
.font(.caption.bold())
|
||||
.foregroundStyle(.secondary)
|
||||
Text(job.prompt)
|
||||
.textSelection(.enabled)
|
||||
.padding(8)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.background(.quaternary.opacity(0.5))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
if let skills = job.skills, !skills.isEmpty {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text("Skills")
|
||||
.font(.caption.bold())
|
||||
.foregroundStyle(.secondary)
|
||||
HStack {
|
||||
ForEach(skills, id: \.self) { skill in
|
||||
Text(skill)
|
||||
.font(.caption.monospaced())
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.vertical, 2)
|
||||
.background(.quaternary)
|
||||
.clipShape(Capsule())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if let nextRun = job.nextRunAt {
|
||||
Label("Next run: \(nextRun)", systemImage: "arrow.forward.circle")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
if let lastRun = job.lastRunAt {
|
||||
Label("Last run: \(lastRun)", systemImage: "arrow.backward.circle")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
if let error = job.lastError {
|
||||
Label(error, systemImage: "exclamationmark.triangle")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.red)
|
||||
}
|
||||
if let output = viewModel.jobOutput {
|
||||
Divider()
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text("Last Output")
|
||||
.font(.caption.bold())
|
||||
.foregroundStyle(.secondary)
|
||||
Text(output)
|
||||
.font(.system(.caption, design: .monospaced))
|
||||
.textSelection(.enabled)
|
||||
.padding(8)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.background(.quaternary.opacity(0.5))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity, alignment: .topLeading)
|
||||
}
|
||||
} else {
|
||||
ContentUnavailableView("Select a Job", systemImage: "clock.arrow.2.circlepath", description: Text("Choose a cron job from the list"))
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
@Observable
|
||||
final class DashboardViewModel {
|
||||
private let dataService = HermesDataService()
|
||||
private let fileService = HermesFileService()
|
||||
|
||||
var stats = HermesDataService.SessionStats(
|
||||
totalSessions: 0, totalMessages: 0, totalToolCalls: 0,
|
||||
totalInputTokens: 0, totalOutputTokens: 0, totalCostUSD: 0
|
||||
)
|
||||
var recentSessions: [HermesSession] = []
|
||||
var sessionPreviews: [String: String] = [:]
|
||||
var config = HermesConfig.empty
|
||||
var gatewayState: GatewayState?
|
||||
var hermesRunning = false
|
||||
var isLoading = true
|
||||
|
||||
func load() async {
|
||||
isLoading = true
|
||||
let opened = await dataService.open()
|
||||
if opened {
|
||||
stats = await dataService.fetchStats()
|
||||
recentSessions = await dataService.fetchSessions(limit: 5)
|
||||
sessionPreviews = await dataService.fetchSessionPreviews(limit: 5)
|
||||
await dataService.close()
|
||||
}
|
||||
config = fileService.loadConfig()
|
||||
gatewayState = fileService.loadGatewayState()
|
||||
hermesRunning = fileService.isHermesRunning()
|
||||
isLoading = false
|
||||
}
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
struct DashboardView: View {
|
||||
@State private var viewModel = DashboardViewModel()
|
||||
@Environment(AppCoordinator.self) private var coordinator
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading, spacing: 20) {
|
||||
statusSection
|
||||
statsSection
|
||||
recentSessionsSection
|
||||
}
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity, alignment: .topLeading)
|
||||
}
|
||||
.navigationTitle("Dashboard")
|
||||
.task { await viewModel.load() }
|
||||
}
|
||||
|
||||
private var statusSection: some View {
|
||||
HStack(spacing: 16) {
|
||||
StatusCard(
|
||||
title: "Hermes",
|
||||
value: viewModel.hermesRunning ? "Running" : "Stopped",
|
||||
icon: "circle.fill",
|
||||
color: viewModel.hermesRunning ? .green : .secondary
|
||||
)
|
||||
StatusCard(
|
||||
title: "Model",
|
||||
value: viewModel.config.model,
|
||||
icon: "cpu",
|
||||
color: .blue
|
||||
)
|
||||
StatusCard(
|
||||
title: "Provider",
|
||||
value: viewModel.config.provider,
|
||||
icon: "cloud",
|
||||
color: .purple
|
||||
)
|
||||
StatusCard(
|
||||
title: "Gateway",
|
||||
value: viewModel.gatewayState?.statusText ?? "unknown",
|
||||
icon: "network",
|
||||
color: viewModel.gatewayState?.isRunning == true ? .green : .secondary
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private var statsSection: some View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("Usage Stats")
|
||||
.font(.headline)
|
||||
HStack(spacing: 16) {
|
||||
StatCard(label: "Sessions", value: "\(viewModel.stats.totalSessions)")
|
||||
StatCard(label: "Messages", value: "\(viewModel.stats.totalMessages)")
|
||||
StatCard(label: "Tool Calls", value: "\(viewModel.stats.totalToolCalls)")
|
||||
StatCard(label: "Tokens", value: formatTokens(viewModel.stats.totalInputTokens + viewModel.stats.totalOutputTokens))
|
||||
StatCard(label: "Est. Cost", value: String(format: "$%.2f", viewModel.stats.totalCostUSD))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var recentSessionsSection: some View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
HStack {
|
||||
Text("Recent Sessions")
|
||||
.font(.headline)
|
||||
Spacer()
|
||||
Button("View All") {
|
||||
coordinator.selectedSection = .sessions
|
||||
}
|
||||
.buttonStyle(.link)
|
||||
}
|
||||
ForEach(viewModel.recentSessions) { session in
|
||||
SessionRow(session: session, preview: viewModel.sessionPreviews[session.id])
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
coordinator.selectedSessionId = session.id
|
||||
coordinator.selectedSection = .sessions
|
||||
}
|
||||
}
|
||||
if viewModel.recentSessions.isEmpty && !viewModel.isLoading {
|
||||
Text("No sessions found")
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func formatTokens(_ count: Int) -> String {
|
||||
if count >= 1_000_000 {
|
||||
return String(format: "%.1fM", Double(count) / 1_000_000)
|
||||
} else if count >= 1_000 {
|
||||
return String(format: "%.1fK", Double(count) / 1_000)
|
||||
}
|
||||
return "\(count)"
|
||||
}
|
||||
}
|
||||
|
||||
struct StatusCard: View {
|
||||
let title: String
|
||||
let value: String
|
||||
let icon: String
|
||||
let color: Color
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: icon)
|
||||
.foregroundStyle(color)
|
||||
.font(.caption)
|
||||
Text(title)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
Text(value)
|
||||
.font(.system(.body, design: .monospaced))
|
||||
.lineLimit(1)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(12)
|
||||
.background(.quaternary.opacity(0.5))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
}
|
||||
}
|
||||
|
||||
struct StatCard: View {
|
||||
let label: String
|
||||
let value: String
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 4) {
|
||||
Text(value)
|
||||
.font(.system(.title2, design: .monospaced, weight: .semibold))
|
||||
Text(label)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(12)
|
||||
.background(.quaternary.opacity(0.5))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
}
|
||||
}
|
||||
|
||||
struct SessionRow: View {
|
||||
let session: HermesSession
|
||||
var preview: String?
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
Image(systemName: session.sourceIcon)
|
||||
.foregroundStyle(.secondary)
|
||||
.frame(width: 20)
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text(preview ?? session.displayTitle)
|
||||
.lineLimit(1)
|
||||
if let date = session.startedAt {
|
||||
Text(date, style: .relative)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
Spacer()
|
||||
HStack(spacing: 12) {
|
||||
Label("\(session.messageCount)", systemImage: "bubble.left")
|
||||
Label("\(session.toolCallCount)", systemImage: "wrench")
|
||||
}
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.padding(.vertical, 4)
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
@Observable
|
||||
final class LogsViewModel {
|
||||
private let logService = HermesLogService()
|
||||
|
||||
var entries: [LogEntry] = []
|
||||
var selectedLogFile: LogFile = .errors
|
||||
var filterLevel: LogEntry.LogLevel?
|
||||
var searchText = ""
|
||||
private var pollTimer: Timer?
|
||||
|
||||
enum LogFile: String, CaseIterable, Identifiable {
|
||||
case errors = "errors.log"
|
||||
case gateway = "gateway.log"
|
||||
|
||||
var id: String { rawValue }
|
||||
|
||||
var path: String {
|
||||
switch self {
|
||||
case .errors: return HermesPaths.errorsLog
|
||||
case .gateway: return HermesPaths.gatewayLog
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var filteredEntries: [LogEntry] {
|
||||
entries.filter { entry in
|
||||
let levelOk = filterLevel == nil || entry.level == filterLevel
|
||||
let searchOk = searchText.isEmpty || entry.raw.localizedCaseInsensitiveContains(searchText)
|
||||
return levelOk && searchOk
|
||||
}
|
||||
}
|
||||
|
||||
func load() async {
|
||||
await logService.openLog(path: selectedLogFile.path)
|
||||
entries = await logService.readLastLines(count: 500)
|
||||
await logService.seekToEnd()
|
||||
startPolling()
|
||||
}
|
||||
|
||||
func switchLogFile(_ file: LogFile) async {
|
||||
selectedLogFile = file
|
||||
entries = []
|
||||
await logService.openLog(path: file.path)
|
||||
entries = await logService.readLastLines(count: 500)
|
||||
await logService.seekToEnd()
|
||||
}
|
||||
|
||||
func startPolling() {
|
||||
pollTimer?.invalidate()
|
||||
pollTimer = Timer.scheduledTimer(withTimeInterval: 2.0, repeats: true) { [weak self] _ in
|
||||
guard let self else { return }
|
||||
Task { @MainActor in
|
||||
let newEntries = await self.logService.readNewLines()
|
||||
if !newEntries.isEmpty {
|
||||
self.entries.append(contentsOf: newEntries)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func stopPolling() {
|
||||
pollTimer?.invalidate()
|
||||
pollTimer = nil
|
||||
}
|
||||
|
||||
func cleanup() async {
|
||||
stopPolling()
|
||||
await logService.closeLog()
|
||||
}
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
struct LogsView: View {
|
||||
@State private var viewModel = LogsViewModel()
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
toolbar
|
||||
Divider()
|
||||
logList
|
||||
}
|
||||
.navigationTitle("Logs")
|
||||
.searchable(text: $viewModel.searchText, prompt: "Filter logs...")
|
||||
.task { await viewModel.load() }
|
||||
.onDisappear { Task { await viewModel.cleanup() } }
|
||||
}
|
||||
|
||||
private var toolbar: some View {
|
||||
HStack(spacing: 12) {
|
||||
Picker("Log File", selection: Binding(
|
||||
get: { viewModel.selectedLogFile },
|
||||
set: { file in Task { await viewModel.switchLogFile(file) } }
|
||||
)) {
|
||||
ForEach(LogsViewModel.LogFile.allCases) { file in
|
||||
Text(file.rawValue).tag(file)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
.frame(maxWidth: 300)
|
||||
|
||||
Spacer()
|
||||
|
||||
Picker("Level", selection: $viewModel.filterLevel) {
|
||||
Text("All Levels").tag(LogEntry.LogLevel?.none)
|
||||
ForEach(LogEntry.LogLevel.allCases, id: \.rawValue) { level in
|
||||
Text(level.rawValue).tag(LogEntry.LogLevel?.some(level))
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: 150)
|
||||
|
||||
Text("\(viewModel.filteredEntries.count) entries")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.padding(.horizontal)
|
||||
.padding(.vertical, 8)
|
||||
}
|
||||
|
||||
private var logList: some View {
|
||||
ScrollViewReader { proxy in
|
||||
List(viewModel.filteredEntries) { entry in
|
||||
HStack(alignment: .top, spacing: 8) {
|
||||
Text(entry.timestamp)
|
||||
.font(.caption.monospaced())
|
||||
.foregroundStyle(.secondary)
|
||||
.frame(width: 140, alignment: .leading)
|
||||
Text(entry.level.rawValue)
|
||||
.font(.caption.monospaced().bold())
|
||||
.foregroundStyle(colorForLevel(entry.level))
|
||||
.frame(width: 60, alignment: .leading)
|
||||
Text(entry.message)
|
||||
.font(.system(.caption, design: .monospaced))
|
||||
.textSelection(.enabled)
|
||||
.lineLimit(3)
|
||||
}
|
||||
.id(entry.id)
|
||||
}
|
||||
.listStyle(.inset)
|
||||
.onChange(of: viewModel.entries.count) {
|
||||
if let last = viewModel.filteredEntries.last {
|
||||
proxy.scrollTo(last.id, anchor: .bottom)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func colorForLevel(_ level: LogEntry.LogLevel) -> Color {
|
||||
switch level {
|
||||
case .debug: return .secondary
|
||||
case .info: return .primary
|
||||
case .warning: return .orange
|
||||
case .error, .critical: return .red
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
@Observable
|
||||
final class MemoryViewModel {
|
||||
private let fileService = HermesFileService()
|
||||
|
||||
var memoryContent = ""
|
||||
var userContent = ""
|
||||
var isEditing = false
|
||||
var editingFile: EditTarget = .memory
|
||||
var editText = ""
|
||||
|
||||
enum EditTarget {
|
||||
case memory, user
|
||||
}
|
||||
|
||||
var memoryCharCount: Int { memoryContent.count }
|
||||
var userCharCount: Int { userContent.count }
|
||||
|
||||
func load() {
|
||||
memoryContent = fileService.loadMemory()
|
||||
userContent = fileService.loadUserProfile()
|
||||
}
|
||||
|
||||
func startEditing(_ target: EditTarget) {
|
||||
editingFile = target
|
||||
editText = target == .memory ? memoryContent : userContent
|
||||
isEditing = true
|
||||
}
|
||||
|
||||
func save() {
|
||||
switch editingFile {
|
||||
case .memory:
|
||||
fileService.saveMemory(editText)
|
||||
memoryContent = editText
|
||||
case .user:
|
||||
fileService.saveUserProfile(editText)
|
||||
userContent = editText
|
||||
}
|
||||
isEditing = false
|
||||
}
|
||||
|
||||
func cancelEditing() {
|
||||
isEditing = false
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
struct MemoryView: View {
|
||||
@State private var viewModel = MemoryViewModel()
|
||||
@Environment(HermesFileWatcher.self) private var fileWatcher
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading, spacing: 20) {
|
||||
memorySection("Agent Memory", content: viewModel.memoryContent, charCount: viewModel.memoryCharCount, target: .memory)
|
||||
memorySection("User Profile", content: viewModel.userContent, charCount: viewModel.userCharCount, target: .user)
|
||||
}
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity, alignment: .topLeading)
|
||||
}
|
||||
.navigationTitle("Memory")
|
||||
.onAppear { viewModel.load() }
|
||||
.onChange(of: fileWatcher.lastChangeDate) {
|
||||
viewModel.load()
|
||||
}
|
||||
.sheet(isPresented: $viewModel.isEditing) {
|
||||
editorSheet
|
||||
}
|
||||
}
|
||||
|
||||
private func memorySection(_ title: String, content: String, charCount: Int, target: MemoryViewModel.EditTarget) -> some View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
HStack {
|
||||
Text(title)
|
||||
.font(.headline)
|
||||
Spacer()
|
||||
Text("\(charCount) chars")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
Button("Edit") {
|
||||
viewModel.startEditing(target)
|
||||
}
|
||||
.controlSize(.small)
|
||||
}
|
||||
if content.isEmpty {
|
||||
Text("Empty")
|
||||
.foregroundStyle(.secondary)
|
||||
.padding()
|
||||
} else {
|
||||
Text(markdownAttributed(content))
|
||||
.textSelection(.enabled)
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.background(.quaternary.opacity(0.5))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var editorSheet: some View {
|
||||
VStack(spacing: 0) {
|
||||
HStack {
|
||||
Text(viewModel.editingFile == .memory ? "Edit Agent Memory" : "Edit User Profile")
|
||||
.font(.headline)
|
||||
Spacer()
|
||||
Button("Cancel") { viewModel.cancelEditing() }
|
||||
Button("Save") { viewModel.save() }
|
||||
.buttonStyle(.borderedProminent)
|
||||
}
|
||||
.padding()
|
||||
Divider()
|
||||
TextEditor(text: $viewModel.editText)
|
||||
.font(.system(.body, design: .monospaced))
|
||||
.padding(8)
|
||||
}
|
||||
.frame(minWidth: 600, minHeight: 400)
|
||||
}
|
||||
|
||||
private func markdownAttributed(_ text: String) -> AttributedString {
|
||||
(try? AttributedString(markdown: text, options: .init(interpretedSyntax: .inlineOnlyPreservingWhitespace))) ?? AttributedString(text)
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
@Observable
|
||||
final class SessionsViewModel {
|
||||
private let dataService = HermesDataService()
|
||||
|
||||
var sessions: [HermesSession] = []
|
||||
var sessionPreviews: [String: String] = [:]
|
||||
var selectedSession: HermesSession?
|
||||
var messages: [HermesMessage] = []
|
||||
var searchText = ""
|
||||
var searchResults: [HermesMessage] = []
|
||||
var isSearching = false
|
||||
|
||||
func load() async {
|
||||
let opened = await dataService.open()
|
||||
guard opened else { return }
|
||||
sessions = await dataService.fetchSessions(limit: 500)
|
||||
sessionPreviews = await dataService.fetchSessionPreviews(limit: 500)
|
||||
}
|
||||
|
||||
func previewFor(_ session: HermesSession) -> String {
|
||||
if let title = session.title, !title.isEmpty { return title }
|
||||
if let preview = sessionPreviews[session.id], !preview.isEmpty { return preview }
|
||||
return session.id
|
||||
}
|
||||
|
||||
func selectSession(_ session: HermesSession) async {
|
||||
selectedSession = session
|
||||
messages = await dataService.fetchMessages(sessionId: session.id)
|
||||
}
|
||||
|
||||
func selectSessionById(_ id: String) async {
|
||||
if let session = sessions.first(where: { $0.id == id }) {
|
||||
await selectSession(session)
|
||||
}
|
||||
}
|
||||
|
||||
func search() async {
|
||||
let query = searchText.trimmingCharacters(in: .whitespaces)
|
||||
guard !query.isEmpty else {
|
||||
searchResults = []
|
||||
isSearching = false
|
||||
return
|
||||
}
|
||||
isSearching = true
|
||||
searchResults = await dataService.searchMessages(query: query)
|
||||
}
|
||||
|
||||
func cleanup() async {
|
||||
await dataService.close()
|
||||
}
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
struct SessionDetailView: View {
|
||||
let session: HermesSession
|
||||
let messages: [HermesMessage]
|
||||
var preview: String?
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
sessionHeader
|
||||
Divider()
|
||||
messagesList
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
}
|
||||
|
||||
private var sessionHeader: some View {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text(preview ?? session.displayTitle)
|
||||
.font(.title3.bold())
|
||||
HStack(spacing: 16) {
|
||||
Label(session.source, systemImage: session.sourceIcon)
|
||||
Label(session.model ?? "unknown", systemImage: "cpu")
|
||||
Label("\(session.messageCount) msgs", systemImage: "bubble.left")
|
||||
Label("\(session.toolCallCount) tools", systemImage: "wrench")
|
||||
if let cost = session.estimatedCostUSD {
|
||||
Label(String(format: "$%.4f", cost), systemImage: "dollarsign.circle")
|
||||
}
|
||||
if let date = session.startedAt {
|
||||
Label(date.formatted(.dateTime.month().day().hour().minute()), systemImage: "calendar")
|
||||
}
|
||||
}
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
|
||||
private var messagesList: some View {
|
||||
ScrollView {
|
||||
LazyVStack(alignment: .leading, spacing: 12) {
|
||||
ForEach(messages) { message in
|
||||
MessageBubble(message: message)
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct MessageBubble: View {
|
||||
let message: HermesMessage
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: message.isUser ? .trailing : .leading, spacing: 4) {
|
||||
HStack {
|
||||
if message.isUser { Spacer(minLength: 60) }
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
if !message.content.isEmpty {
|
||||
Text(message.content)
|
||||
.textSelection(.enabled)
|
||||
}
|
||||
if !message.toolCalls.isEmpty {
|
||||
ForEach(message.toolCalls) { call in
|
||||
ToolCallBadge(call: call)
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(10)
|
||||
.background(message.isUser ? Color.accentColor.opacity(0.15) : Color.secondary.opacity(0.1))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||
if !message.isUser { Spacer(minLength: 60) }
|
||||
}
|
||||
if let time = message.timestamp {
|
||||
Text(time, style: .time)
|
||||
.font(.caption2)
|
||||
.foregroundStyle(.tertiary)
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: message.isUser ? .trailing : .leading)
|
||||
}
|
||||
}
|
||||
|
||||
struct ToolCallBadge: View {
|
||||
let call: HermesToolCall
|
||||
|
||||
@State private var expanded = false
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Button {
|
||||
expanded.toggle()
|
||||
} label: {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: call.toolKind.icon)
|
||||
.foregroundStyle(toolColor)
|
||||
Text(call.functionName)
|
||||
.font(.caption.monospaced())
|
||||
Image(systemName: expanded ? "chevron.down" : "chevron.right")
|
||||
.font(.caption2)
|
||||
}
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
|
||||
if expanded {
|
||||
Text(call.argumentsSummary)
|
||||
.font(.caption.monospaced())
|
||||
.foregroundStyle(.secondary)
|
||||
.textSelection(.enabled)
|
||||
.padding(6)
|
||||
.background(.quaternary)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 4))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var toolColor: Color {
|
||||
switch call.toolKind {
|
||||
case .read: return .green
|
||||
case .edit: return .blue
|
||||
case .execute: return .orange
|
||||
case .fetch: return .purple
|
||||
case .browser: return .indigo
|
||||
case .other: return .secondary
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
struct SessionsView: View {
|
||||
@State private var viewModel = SessionsViewModel()
|
||||
@Environment(AppCoordinator.self) private var coordinator
|
||||
|
||||
var body: some View {
|
||||
HSplitView {
|
||||
sessionList
|
||||
.frame(minWidth: 280, idealWidth: 320)
|
||||
sessionDetail
|
||||
.frame(minWidth: 400)
|
||||
}
|
||||
.navigationTitle("Sessions")
|
||||
.searchable(text: $viewModel.searchText, prompt: "Search messages...")
|
||||
.onSubmit(of: .search) { Task { await viewModel.search() } }
|
||||
.onChange(of: viewModel.searchText) {
|
||||
if viewModel.searchText.isEmpty {
|
||||
viewModel.isSearching = false
|
||||
viewModel.searchResults = []
|
||||
}
|
||||
}
|
||||
.task {
|
||||
await viewModel.load()
|
||||
if let id = coordinator.selectedSessionId {
|
||||
await viewModel.selectSessionById(id)
|
||||
coordinator.selectedSessionId = nil
|
||||
}
|
||||
}
|
||||
.onDisappear { Task { await viewModel.cleanup() } }
|
||||
}
|
||||
|
||||
private var sessionList: some View {
|
||||
List(selection: Binding(
|
||||
get: { viewModel.selectedSession?.id },
|
||||
set: { id in
|
||||
if let id, let session = viewModel.sessions.first(where: { $0.id == id }) {
|
||||
Task { await viewModel.selectSession(session) }
|
||||
} else {
|
||||
viewModel.selectedSession = nil
|
||||
viewModel.messages = []
|
||||
}
|
||||
}
|
||||
)) {
|
||||
if viewModel.isSearching {
|
||||
Section("Search Results (\(viewModel.searchResults.count))") {
|
||||
ForEach(viewModel.searchResults) { message in
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text(message.content.prefix(100))
|
||||
.lineLimit(2)
|
||||
.font(.caption)
|
||||
Text(message.sessionId)
|
||||
.font(.caption2)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.tag(message.sessionId)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
Task { await viewModel.selectSessionById(message.sessionId) }
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ForEach(viewModel.sessions) { session in
|
||||
SessionRow(session: session, preview: viewModel.previewFor(session))
|
||||
.tag(session.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
.listStyle(.inset)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var sessionDetail: some View {
|
||||
if let session = viewModel.selectedSession {
|
||||
SessionDetailView(session: session, messages: viewModel.messages, preview: viewModel.previewFor(session))
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
} else {
|
||||
ContentUnavailableView("Select a Session", systemImage: "bubble.left.and.bubble.right", description: Text("Choose a session from the list"))
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
@Observable
|
||||
final class SettingsViewModel {
|
||||
private let fileService = HermesFileService()
|
||||
|
||||
var config = HermesConfig.empty
|
||||
var gatewayState: GatewayState?
|
||||
var hermesRunning = false
|
||||
var rawConfigYAML = ""
|
||||
|
||||
func load() {
|
||||
config = fileService.loadConfig()
|
||||
gatewayState = fileService.loadGatewayState()
|
||||
hermesRunning = fileService.isHermesRunning()
|
||||
rawConfigYAML = (try? String(contentsOfFile: HermesPaths.configYAML, encoding: .utf8)) ?? ""
|
||||
}
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
struct SettingsView: View {
|
||||
@State private var viewModel = SettingsViewModel()
|
||||
@State private var showRawConfig = false
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading, spacing: 20) {
|
||||
configSection
|
||||
gatewaySection
|
||||
pathsSection
|
||||
rawConfigSection
|
||||
}
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity, alignment: .topLeading)
|
||||
}
|
||||
.navigationTitle("Settings")
|
||||
.onAppear { viewModel.load() }
|
||||
}
|
||||
|
||||
private var configSection: some View {
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
Text("Configuration")
|
||||
.font(.headline)
|
||||
LazyVGrid(columns: [GridItem(.flexible()), GridItem(.flexible())], alignment: .leading, spacing: 8) {
|
||||
SettingRow(label: "Model", value: viewModel.config.model)
|
||||
SettingRow(label: "Provider", value: viewModel.config.provider)
|
||||
SettingRow(label: "Personality", value: viewModel.config.personality)
|
||||
SettingRow(label: "Max Turns", value: "\(viewModel.config.maxTurns)")
|
||||
SettingRow(label: "Terminal Backend", value: viewModel.config.terminalBackend)
|
||||
SettingRow(label: "Memory Enabled", value: viewModel.config.memoryEnabled ? "Yes" : "No")
|
||||
SettingRow(label: "Memory Char Limit", value: "\(viewModel.config.memoryCharLimit)")
|
||||
SettingRow(label: "User Char Limit", value: "\(viewModel.config.userCharLimit)")
|
||||
SettingRow(label: "Nudge Interval", value: "\(viewModel.config.nudgeInterval) turns")
|
||||
SettingRow(label: "Streaming", value: viewModel.config.streaming ? "Yes" : "No")
|
||||
SettingRow(label: "Show Reasoning", value: viewModel.config.showReasoning ? "Yes" : "No")
|
||||
SettingRow(label: "Verbose", value: viewModel.config.verbose ? "Yes" : "No")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var gatewaySection: some View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("Gateway")
|
||||
.font(.headline)
|
||||
HStack(spacing: 16) {
|
||||
Label(
|
||||
viewModel.gatewayState?.statusText ?? "unknown",
|
||||
systemImage: viewModel.gatewayState?.isRunning == true ? "circle.fill" : "circle"
|
||||
)
|
||||
.foregroundStyle(viewModel.gatewayState?.isRunning == true ? .green : .secondary)
|
||||
if let reason = viewModel.gatewayState?.exitReason {
|
||||
Text(reason)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var pathsSection: some View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("Paths")
|
||||
.font(.headline)
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
PathRow(label: "Hermes Home", path: HermesPaths.home)
|
||||
PathRow(label: "State DB", path: HermesPaths.stateDB)
|
||||
PathRow(label: "Config", path: HermesPaths.configYAML)
|
||||
PathRow(label: "Memory", path: HermesPaths.memoriesDir)
|
||||
PathRow(label: "Sessions", path: HermesPaths.sessionsDir)
|
||||
PathRow(label: "Skills", path: HermesPaths.skillsDir)
|
||||
PathRow(label: "Logs", path: HermesPaths.errorsLog)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var rawConfigSection: some View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
HStack {
|
||||
Text("Raw Config")
|
||||
.font(.headline)
|
||||
Button(showRawConfig ? "Hide" : "Show") {
|
||||
showRawConfig.toggle()
|
||||
}
|
||||
.controlSize(.small)
|
||||
}
|
||||
if showRawConfig {
|
||||
Text(viewModel.rawConfigYAML)
|
||||
.font(.system(.caption, design: .monospaced))
|
||||
.textSelection(.enabled)
|
||||
.padding(8)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.background(.quaternary.opacity(0.5))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct SettingRow: View {
|
||||
let label: String
|
||||
let value: String
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
Text(label)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
.frame(width: 120, alignment: .trailing)
|
||||
Text(value)
|
||||
.font(.system(.caption, design: .monospaced))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct PathRow: View {
|
||||
let label: String
|
||||
let path: String
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
Text(label)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
.frame(width: 100, alignment: .trailing)
|
||||
Text(path)
|
||||
.font(.system(.caption, design: .monospaced))
|
||||
.textSelection(.enabled)
|
||||
Button {
|
||||
NSWorkspace.shared.selectFile(nil, inFileViewerRootedAtPath: path)
|
||||
} label: {
|
||||
Image(systemName: "folder")
|
||||
.font(.caption)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
@Observable
|
||||
final class SkillsViewModel {
|
||||
private let fileService = HermesFileService()
|
||||
|
||||
var categories: [HermesSkillCategory] = []
|
||||
var selectedSkill: HermesSkill?
|
||||
var skillContent = ""
|
||||
var selectedFileName: String?
|
||||
var searchText = ""
|
||||
|
||||
var filteredCategories: [HermesSkillCategory] {
|
||||
guard !searchText.isEmpty else { return categories }
|
||||
return categories.compactMap { category in
|
||||
let filtered = category.skills.filter {
|
||||
$0.name.localizedCaseInsensitiveContains(searchText) ||
|
||||
$0.category.localizedCaseInsensitiveContains(searchText)
|
||||
}
|
||||
guard !filtered.isEmpty else { return nil }
|
||||
return HermesSkillCategory(id: category.id, name: category.name, skills: filtered)
|
||||
}
|
||||
}
|
||||
|
||||
var totalSkillCount: Int {
|
||||
categories.reduce(0) { $0 + $1.skills.count }
|
||||
}
|
||||
|
||||
func load() {
|
||||
categories = fileService.loadSkills()
|
||||
}
|
||||
|
||||
func selectSkill(_ skill: HermesSkill) {
|
||||
selectedSkill = skill
|
||||
let mainFile = skill.files.first(where: { $0.hasSuffix(".md") }) ?? skill.files.first
|
||||
if let file = mainFile {
|
||||
selectedFileName = file
|
||||
skillContent = fileService.loadSkillContent(path: skill.path + "/" + file)
|
||||
} else {
|
||||
selectedFileName = nil
|
||||
skillContent = ""
|
||||
}
|
||||
}
|
||||
|
||||
func selectFile(_ file: String) {
|
||||
guard let skill = selectedSkill else { return }
|
||||
selectedFileName = file
|
||||
skillContent = fileService.loadSkillContent(path: skill.path + "/" + file)
|
||||
}
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
struct SkillsView: View {
|
||||
@State private var viewModel = SkillsViewModel()
|
||||
|
||||
var body: some View {
|
||||
HSplitView {
|
||||
skillsList
|
||||
.frame(minWidth: 250, idealWidth: 300)
|
||||
skillDetail
|
||||
.frame(minWidth: 400)
|
||||
}
|
||||
.navigationTitle("Skills (\(viewModel.totalSkillCount))")
|
||||
.searchable(text: $viewModel.searchText, prompt: "Filter skills...")
|
||||
.onAppear { viewModel.load() }
|
||||
}
|
||||
|
||||
private var skillsList: some View {
|
||||
List(selection: Binding(
|
||||
get: { viewModel.selectedSkill?.id },
|
||||
set: { id in
|
||||
if let id {
|
||||
for category in viewModel.filteredCategories {
|
||||
if let skill = category.skills.first(where: { $0.id == id }) {
|
||||
viewModel.selectSkill(skill)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
viewModel.selectedSkill = nil
|
||||
viewModel.skillContent = ""
|
||||
}
|
||||
)) {
|
||||
ForEach(viewModel.filteredCategories) { category in
|
||||
Section(category.name) {
|
||||
ForEach(category.skills) { skill in
|
||||
Label(skill.name, systemImage: "lightbulb")
|
||||
.tag(skill.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.listStyle(.sidebar)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var skillDetail: some View {
|
||||
if let skill = viewModel.selectedSkill {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
Text(skill.name)
|
||||
.font(.title2.bold())
|
||||
HStack {
|
||||
Label(skill.category, systemImage: "folder")
|
||||
Label("\(skill.files.count) files", systemImage: "doc")
|
||||
}
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
Divider()
|
||||
if !skill.files.isEmpty {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text("Files")
|
||||
.font(.caption.bold())
|
||||
.foregroundStyle(.secondary)
|
||||
ForEach(skill.files, id: \.self) { file in
|
||||
Button {
|
||||
viewModel.selectFile(file)
|
||||
} label: {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: viewModel.selectedFileName == file ? "doc.fill" : "doc")
|
||||
.font(.caption)
|
||||
Text(file)
|
||||
.font(.caption.monospaced())
|
||||
}
|
||||
.foregroundStyle(viewModel.selectedFileName == file ? .primary : .secondary)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
}
|
||||
if !viewModel.skillContent.isEmpty {
|
||||
Divider()
|
||||
Text(viewModel.skillContent)
|
||||
.font(.system(.body, design: .monospaced))
|
||||
.textSelection(.enabled)
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity, alignment: .topLeading)
|
||||
}
|
||||
} else {
|
||||
ContentUnavailableView("Select a Skill", systemImage: "lightbulb", description: Text("Choose a skill from the list"))
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
enum SidebarSection: String, CaseIterable, Identifiable {
|
||||
case dashboard = "Dashboard"
|
||||
case sessions = "Sessions"
|
||||
case activity = "Activity"
|
||||
case chat = "Chat"
|
||||
case memory = "Memory"
|
||||
case skills = "Skills"
|
||||
case cron = "Cron"
|
||||
case logs = "Logs"
|
||||
case settings = "Settings"
|
||||
|
||||
var id: String { rawValue }
|
||||
|
||||
var icon: String {
|
||||
switch self {
|
||||
case .dashboard: return "gauge.with.dots.needle.33percent"
|
||||
case .sessions: return "bubble.left.and.bubble.right"
|
||||
case .activity: return "bolt.horizontal"
|
||||
case .chat: return "text.bubble"
|
||||
case .memory: return "brain"
|
||||
case .skills: return "lightbulb"
|
||||
case .cron: return "clock.arrow.2.circlepath"
|
||||
case .logs: return "doc.text"
|
||||
case .settings: return "gearshape"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Observable
|
||||
final class AppCoordinator {
|
||||
var selectedSection: SidebarSection = .dashboard
|
||||
var selectedSessionId: String?
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
struct SidebarView: View {
|
||||
@Environment(AppCoordinator.self) private var coordinator
|
||||
|
||||
var body: some View {
|
||||
@Bindable var coordinator = coordinator
|
||||
List(selection: $coordinator.selectedSection) {
|
||||
Section("Monitor") {
|
||||
ForEach([SidebarSection.dashboard, .sessions, .activity]) { section in
|
||||
Label(section.rawValue, systemImage: section.icon)
|
||||
.tag(section)
|
||||
}
|
||||
}
|
||||
Section("Interact") {
|
||||
ForEach([SidebarSection.chat, .memory, .skills]) { section in
|
||||
Label(section.rawValue, systemImage: section.icon)
|
||||
.tag(section)
|
||||
}
|
||||
}
|
||||
Section("Manage") {
|
||||
ForEach([SidebarSection.cron, .logs, .settings]) { section in
|
||||
Label(section.rawValue, systemImage: section.icon)
|
||||
.tag(section)
|
||||
}
|
||||
}
|
||||
}
|
||||
.listStyle(.sidebar)
|
||||
.navigationTitle("Scarf")
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
struct ScarfApp: App {
|
||||
@State private var coordinator = AppCoordinator()
|
||||
@State private var fileWatcher = HermesFileWatcher()
|
||||
@State private var menuBarStatus = MenuBarStatus()
|
||||
@State private var chatViewModel = ChatViewModel()
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView()
|
||||
.environment(coordinator)
|
||||
.environment(fileWatcher)
|
||||
.environment(chatViewModel)
|
||||
.onAppear {
|
||||
fileWatcher.startWatching()
|
||||
menuBarStatus.startPolling()
|
||||
}
|
||||
.onDisappear {
|
||||
fileWatcher.stopWatching()
|
||||
menuBarStatus.stopPolling()
|
||||
}
|
||||
}
|
||||
.defaultSize(width: 1100, height: 700)
|
||||
|
||||
MenuBarExtra("Scarf", systemImage: menuBarStatus.icon) {
|
||||
MenuBarMenu(status: menuBarStatus, coordinator: coordinator)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Observable
|
||||
final class MenuBarStatus {
|
||||
private let fileService = HermesFileService()
|
||||
private var timer: Timer?
|
||||
|
||||
var hermesRunning = false
|
||||
var gatewayRunning = false
|
||||
|
||||
var icon: String {
|
||||
hermesRunning ? "hare.fill" : "hare"
|
||||
}
|
||||
|
||||
func startPolling() {
|
||||
refresh()
|
||||
timer = Timer.scheduledTimer(withTimeInterval: 10.0, repeats: true) { [weak self] _ in
|
||||
self?.refresh()
|
||||
}
|
||||
}
|
||||
|
||||
func stopPolling() {
|
||||
timer?.invalidate()
|
||||
timer = nil
|
||||
}
|
||||
|
||||
private func refresh() {
|
||||
hermesRunning = fileService.isHermesRunning()
|
||||
gatewayRunning = fileService.loadGatewayState()?.isRunning ?? false
|
||||
}
|
||||
}
|
||||
|
||||
struct MenuBarMenu: View {
|
||||
let status: MenuBarStatus
|
||||
let coordinator: AppCoordinator
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
Label(status.hermesRunning ? "Hermes Running" : "Hermes Stopped", systemImage: status.hermesRunning ? "circle.fill" : "circle")
|
||||
Label(status.gatewayRunning ? "Gateway Running" : "Gateway Stopped", systemImage: status.gatewayRunning ? "circle.fill" : "circle")
|
||||
Divider()
|
||||
Button("Open Dashboard") {
|
||||
coordinator.selectedSection = .dashboard
|
||||
NSApplication.shared.activate()
|
||||
}
|
||||
Button("New Chat") {
|
||||
coordinator.selectedSection = .chat
|
||||
NSApplication.shared.activate()
|
||||
}
|
||||
Button("View Sessions") {
|
||||
coordinator.selectedSection = .sessions
|
||||
NSApplication.shared.activate()
|
||||
}
|
||||
Divider()
|
||||
Button("Quit Scarf") {
|
||||
NSApplication.shared.terminate(nil)
|
||||
}
|
||||
.keyboardShortcut("q")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
//
|
||||
// scarfTests.swift
|
||||
// scarfTests
|
||||
//
|
||||
// Created by Alan Wizemann on 3/31/26.
|
||||
//
|
||||
|
||||
import Testing
|
||||
@testable import scarf
|
||||
|
||||
struct scarfTests {
|
||||
|
||||
@Test func example() async throws {
|
||||
// Write your test here and use APIs like `#expect(...)` to check expected conditions.
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
//
|
||||
// scarfUITests.swift
|
||||
// scarfUITests
|
||||
//
|
||||
// Created by Alan Wizemann on 3/31/26.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class scarfUITests: XCTestCase {
|
||||
|
||||
override func setUpWithError() throws {
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
|
||||
// In UI tests it is usually best to stop immediately when a failure occurs.
|
||||
continueAfterFailure = false
|
||||
|
||||
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
|
||||
}
|
||||
|
||||
override func tearDownWithError() throws {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
@MainActor
|
||||
func testExample() throws {
|
||||
// UI tests must launch the application that they test.
|
||||
let app = XCUIApplication()
|
||||
app.launch()
|
||||
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
}
|
||||
|
||||
@MainActor
|
||||
func testLaunchPerformance() throws {
|
||||
// This measures how long it takes to launch your application.
|
||||
measure(metrics: [XCTApplicationLaunchMetric()]) {
|
||||
XCUIApplication().launch()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// scarfUITestsLaunchTests.swift
|
||||
// scarfUITests
|
||||
//
|
||||
// Created by Alan Wizemann on 3/31/26.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class scarfUITestsLaunchTests: XCTestCase {
|
||||
|
||||
override class var runsForEachTargetApplicationUIConfiguration: Bool {
|
||||
true
|
||||
}
|
||||
|
||||
override func setUpWithError() throws {
|
||||
continueAfterFailure = false
|
||||
}
|
||||
|
||||
@MainActor
|
||||
func testLaunch() throws {
|
||||
let app = XCUIApplication()
|
||||
app.launch()
|
||||
|
||||
// Insert steps here to perform after app launch but before taking a screenshot,
|
||||
// such as logging into a test account or navigating somewhere in the app
|
||||
|
||||
let attachment = XCTAttachment(screenshot: app.screenshot())
|
||||
attachment.name = "Launch Screen"
|
||||
attachment.lifetime = .keepAlways
|
||||
add(attachment)
|
||||
}
|
||||
}
|
||||