@audrail/agent-runtime
v0.2.1
Published
Local-first runtime for guaranteed AI prompt capture and verified handoff generation.
Downloads
615
Maintainers
Readme
Audrail Agent Runtime
@audrail/agent-runtime is the local-first runtime layer that sits between an AI host and the repo.
Its job is to make prompt capture durable before upstream model execution starts, then convert run evidence into a checkpoint and handoff brief.
Responsibilities
- open or continue an agent session
- create or extend run records
- append prompt, command, file, verification, and sync events
- generate checkpoint and handoff files after each run
- keep the repo ready for resumable work across agents and teammates
Install
npm install @audrail/agent-runtimeUsage
import { AudrailAgentRuntime } from "@audrail/agent-runtime";
const runtime = new AudrailAgentRuntime({
projectRoot: process.cwd(),
adapter: "codex",
provider: "openai",
agent: "codex",
});
await runtime.capturePrompt({
prompt: "Fix the failing landing-page build",
title: "landing-page build fix",
threadId: "thread_123",
});
await runtime.recordCommand({
summary: "Ran landing build",
command: "npm run build --prefix apps/landing",
});
await runtime.recordVerification({
summary: "Landing build passed",
command: "npm run build --prefix apps/landing",
status: "passed",
});
const result = await runtime.finishRun({
status: "completed",
owner: "[email protected]",
nextAction: "Sync the summary to the dashboard",
});
console.log(result.checkpoint);
console.log(result.handoff);The runtime is intentionally host-agnostic. Codex, Claude, Cursor, or an MCP gateway should call this package before sending the prompt upstream.
On finish, the runtime records checkpoint and handoff artifacts that now include:
ownersafeToResume- blocker and next-step state
- local GitHub bridge metadata in
buildRuntimeSnapshot()when the repo has a GitHub remote
