@post-print/agent-harness
v2.0.10
Published
Configured coding agents and isolated Cursor, Claude Code, and OpenAI Codex sessions
Readme
@post-print/agent-harness
Configure coding agents for agent-test. Definitions are reusable; each task session owns an isolated worker and host runtime.
import { openai, claude, cursor } from "@post-print/agent-harness";
export const coder = openai({
auth: { type: "subscription" },
timeoutMs: 600_000,
skills: ["./skills/testing"],
context: { instructions: ["Run the relevant tests."], files: ["./context/project.md"] },
includeGlobalSkills: false,
});openai() runs Codex, claude() runs Claude Code, and cursor() uses the Cursor SDK. openrouter() calls an OpenRouter model through the OpenAI-compatible API. All accept model and authentication options. OpenRouter defaults to { type: "api-key", env: "OPENROUTER_API_KEY" }.
Built-in runs default to a ten-minute deadline. A finite positive timeoutMs overrides it. Timeout failures retain streamed trace evidence and surface as AgentInfrastructureError with code timeout.
Factories do not launch agents. Agent-test prepares workspaces, installs attached skills, supplies context, creates sessions, and guarantees cleanup. Custom adapters use defineAgent() and customAgent(); see the SDK guide.
Built-in continuation currently reconstructs prior conversation. Cursor does not yet support enforced read-only judge sessions; use OpenAI or Claude as the judge. ACP is not introduced by this change.
createSealedWorkspace returns a temporary workspace/ plus idempotent cleanup. A manifest outside that working tree allows startup recovery of expired dead-owner roots. Orchestrators can call recoverSealedWorkspaces({ temporaryRoot?, minimumAgeMs? }); see storage ownership for active-run protection and the 24-hour default grace period.
