Skip to content
Merged
43 changes: 33 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# SwiftASB

SwiftASB helps Swift apps work with the local Codex app-server without making app builders deal with Codex's raw app-server messages directly.
*Faster-Than-Light Framework for Custom Codex Apps and Integrations in Swift*

Listen to the SwiftASB Codex apps promo clip:

<audio controls src="docs/media/swiftasb-codex-apps-promo.mp3"></audio>

[Download the promo clip](docs/media/swiftasb-codex-apps-promo.mp3)

## Table of Contents

Expand All @@ -17,25 +23,42 @@ SwiftASB helps Swift apps work with the local Codex app-server without making ap

### Status

SwiftASB has a supported v1 public API for the core local Codex app-server lifecycle. `v1.2.1` is the current released baseline.
SwiftASB is actively maintained and supported by Gale. Our current API is v1, and `v1.3.0` is the current and latest release.

### What This Project Is

TBD
SwiftASB is a native Swift client/runtime layer for AI coding agent app-servers and streaming orchestration systems.

### Motivation

TBD
I built SwiftASB because I saw so many others building and forking existing Apps for agentic coding on the desktop. I wanted to build my own, of course, but I also wanted to make it easier for anyone to build a custom UI tailored to the way they like to work. SwiftASB handles the complexity and rough edges, providing a rock-solid foundation for everyone from vibecoders to staff engineers. Just grab the `swiftasb-skills` plugin from [Socket Marketplace](https://www.github.com/gaelic-ghost/socket) and you're off to the races.

## Quick Start

Add SwiftASB from the GitHub package URL:
Add SwiftASB to your `Package.swift` dependencies:

https://github.com/gaelic-ghost/SwiftASB
```swift
.package(url: "https://github.com/gaelic-ghost/SwiftASB", from: "1.3.0"),
```

Then add the library product to your target dependencies:

Use release `v1.2.1` or newer unless your project intentionally pins an older version.
```swift
.product(name: "SwiftASB", package: "SwiftASB"),
```

You also need a local Codex CLI installation with app-server support. SwiftASB currently reviews against the `0.130.x` Codex CLI app-server schema window, looks for `codex` in the usual command-line locations, and apps can provide an exact executable path when they need stricter control.
Check your Codex version:

```bash
codex --version
```
*Note: SwiftASB supports the latest version of Codex CLI, as well as the prior two minor versions. This policy will be revised once Codex CLI reaches a v1.x.x release.*

Add the Socket Marketplace to Codex and enable the SwiftASB Skills Plugin:

```bash
codex plugin marketplace add socket
```

For copy-pasteable startup code, open the DocC getting-started guide:

Expand All @@ -45,9 +68,9 @@ For copy-pasteable startup code, open the DocC getting-started guide:

Use SwiftASB when an app needs to show what Codex is doing right now, keep recent command and file activity visible, answer interactive requests, or build SwiftUI state around a running Codex turn.

For app-wide sidebars and launchers, `CodexAppServer.makeLibrary()` provides observable stored-thread lists, cwd or repository grouping, stable worktree groups, repository/worktree thread filters, refresh actions, library-local selection state, app-server-owned worktree snapshots, and app-wide model, MCP, and hook diagnostics snapshots. Thread handles can also name, archive, unarchive, compact, and roll back stored threads through thread-scoped methods.
For app-wide sidebars and launchers, `CodexAppServer.makeLibrary()` provides observable stored-thread lists, cwd or repository grouping, stable worktree groups, repository/worktree thread filters, refresh actions, library-local selection state, app-server-owned worktree snapshots, selected-worktree Git status, and app-wide model, MCP, and hook diagnostics snapshots. Thread handles can also name, archive, unarchive, compact, and roll back stored threads through thread-scoped methods.

Use `CodexAppServer.fs` when a sandboxed client needs filesystem metadata, directory listings, file bytes, file discovery, fuzzy file lookup, or file-change watches through the Codex app-server instead of reading local disk directly. File-discovery hits include match kind, matched character ranges, and ranking reasons for picker highlighting and result explanations. `CodexWorkspace` carries app-server-owned worktree, Git, workspace permission selection, active permission-profile provenance, and runtime filesystem/network permission facts for started threads and turns. Use `CodexAppServer.config` for effective config reads, and `CodexAppServer.extensions` for app, skill, plugin, and collaboration-mode inventory.
Use `CodexAppServer.fs` when a sandboxed client needs filesystem metadata, directory listings, file bytes, file discovery, fuzzy file lookup, or file-change watches through the Codex app-server instead of reading local disk directly. File-discovery hits include match kind, matched character ranges, and ranking reasons for picker highlighting and result explanations. `CodexWorkspace` carries app-server-owned worktree, Git, workspace permission selection, active permission-profile provenance, and runtime filesystem/network permission facts for started threads and turns. Use `CodexAppServer.config` for effective config reads, and `CodexAppServer.extensions` for app, skill, plugin, collaboration-mode inventory, and configured plugin-marketplace upgrades.

Use `CodexAppServer.ThreadListQD`, `CodexFS.FileDiscoveryQD`, `CodexThread.HistoryWindowQD`, `CodexThread.RecentFilesQD`, and `CodexThread.RecentCommandsQD` when a client needs to preserve repeatable list, file-discovery, history-window, or recent-activity intent without depending on Core Data, SwiftData, direct filesystem reads, or raw app-server paging details.

Expand Down
Loading