acp-kit

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2026 License: MIT

README

acp-kit

Reusable Go packages for ACP-backed chat relays such as poe-acp and slack-acp.

Module:

module github.com/kfet/acp-kit

Requires Go 1.25+ (uses os.Root sandboxing and the tool go.mod directive).

Packages

  • client — stdio ACP child process client: initialize, sessions, prompts, caps, model selection, auth hooks, fs callbacks.
  • client/auth — small schema for ACP auth method/result metadata.
  • state — conversation-key to ACP-session manager: stable cwd allocation, best-effort resume, idle GC, system-prompt fallback regime.
  • attachments — cwd-local attachment sandbox plus ACP ResourceLink / embedded text resource blocks.
  • skills — load embedded/host fir-style skills and format <available_skills> catalogs.
  • sysprompt — compose base relay prompt, operator extra text, and skill catalogs.
  • paths — XDG state/config path helpers.
  • log — opt-in debug logging.

Contracts worth preserving

  • Idle GC drops only in-memory session bindings; it never removes conversation cwds.
  • state uses two system-prompt regimes:
    • if the agent advertises session.systemPrompt, the prompt is sent via session/new._meta;
    • otherwise it is exposed once through TakePendingSystemPrompt, and re-armed after resume.
  • skills.LoadBuiltin requires an app-specific prefix so different relays do not collide in $TMPDIR.
  • attachments.Store writes through os.Root; hostile filenames cannot escape the per-message directory.

Directories

Path Synopsis
Package attachments stores prompt attachments in a cwd-local sandbox and builds ACP resource blocks that point at the stored files.
Package attachments stores prompt attachments in a cwd-local sandbox and builds ACP resource blocks that point at the stored files.
Package client wraps acp-go-sdk's low-level Connection for ACP relays.
Package client wraps acp-go-sdk's low-level Connection for ACP relays.
auth
Package auth contains the small auth schema used by ACP authenticate extensions.
Package auth contains the small auth schema used by ACP authenticate extensions.
Package log provides a tiny opt-in debug logger for ACP relay code.
Package log provides a tiny opt-in debug logger for ACP relay code.
Package paths resolves conventional XDG state/config locations for relay apps.
Package paths resolves conventional XDG state/config locations for relay apps.
Package skills loads fir-style skill catalogs from embedded bundles and host dirs.
Package skills loads fir-style skill catalogs from embedded bundles and host dirs.
Package state maps relay conversation keys to ACP sessions and stable cwd dirs.
Package state maps relay conversation keys to ACP sessions and stable cwd dirs.
Package sysprompt composes relay-owned durable system prompt text.
Package sysprompt composes relay-owned durable system prompt text.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL