acp-kit

module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT

README

acp-kit

CI Go Reference Go Report Card

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.
  • statusline — wire contract for the dev.acp-kit.status-line/v1 ACP extension: mood/plan header payload that agents emit on session/update._meta so relays can render a compact status line.
  • terminal — agent-side ACP terminal driver: foreground exec with timeout, a bounded pool of background commands, and leak cleanup, over a narrow Conn interface.
  • 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.
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 mcphost implements a generic, self-hosted MCP server that a consumer advertises to an ACP agent as a stdio MCP server.
Package mcphost implements a generic, self-hosted MCP server that a consumer advertises to an ACP agent as a stdio MCP server.
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 statusline defines the wire contract for the dev.acp-kit.status-line/v1 ACP extension: a tiny mood/plan header that agents emit on session/update._meta so chat relays (poe-acp, slack-acp, …) can render a compact status line ahead of the assistant's reply.
Package statusline defines the wire contract for the dev.acp-kit.status-line/v1 ACP extension: a tiny mood/plan header that agents emit on session/update._meta so chat relays (poe-acp, slack-acp, …) can render a compact status line ahead of the assistant's reply.
Package sysprompt composes relay-owned durable system prompt text.
Package sysprompt composes relay-owned durable system prompt text.
Package terminal drives ACP client-side terminals for command execution.
Package terminal drives ACP client-side terminals for command execution.

Jump to

Keyboard shortcuts

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