testagent

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package testagent is a scripted ACP agent for tests. It speaks ACP over stdio and reacts to commands in the prompt text:

echo <text>     reply with <text>
slow <n>        send n chunks, 100 ms apart
permission      ask the client for permission, reply with the outcome
ask             send an elicitation, reply with the answer
fs              call fs/read_text_file, reply with the result or error
caps            reply with the client capabilities from initialize
cwd             reply with the session cwd
mcp             reply with the session MCP servers
dirs            reply with the session additionalDirectories
meta            reply with the session request's _meta
mode            reply with the session mode
exitplan        ask permission with mode options (like Claude's plan exit) and switch to the pick
crash           exit with code 3
burst-crash <n> send n chunks, then exit with code 4
late-burst-crash <n>  like burst-crash, after 300 ms

Like Claude's adapter, a session starts in the mode that <cwd>/.claude/settings.json (or settings.local.json) names in permissions.defaultMode. Test-only keys there: actpTest.modes (the modes offered) and actpTest.refuseSetMode.

Sessions are stored as files under $ACTP_TESTAGENT_STORE so session/load works from a fresh process. With ACTP_TESTAGENT_SCENARIO=auth-required, session/new fails with an authentication error.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(r io.Reader, w io.Writer) error

Run serves ACP on r/w until r closes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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