# @aaac/runtime

Runtime SDK for the AaaC (Agent-Assisted Architecture Contracts) toolchain. Bridges agent-contracts DSL workflows to multiple Agent SDKs and provides AaaC-specific component binding.

## Install

```bash
npm install @aaac/runtime
```

## Capabilities

- **Task & workflow execution** — `runTask`, `runWorkflow`, `executeTask`, `executeWorkflow`, and a fluent `createRuntime()` builder API
- **SDK adapters** — Claude, OpenAI, Gemini (ADK), and Mock adapters via `createAdapter()`
- **Component binding** — `createRuntimeBinding()` dispatches operations to workflows, tasks, or deterministic handlers
- **Guardrails & plugins** — DSL-driven guardrail hooks and a plugin registry (`beforeTask`, `afterWorkflow`, etc.)
- **Memory & resume** — `MemoryRef` / `MemoryStore` with file-backed persistence and agent run logging
- **Code generator** — Handlebars-based generator for agent-runtime artifacts from DSL config

## Basic usage

```typescript
import { createRuntimeBinding, executeTask } from "@aaac/runtime";

// Component binding (generated by @aaac/contracts)
const binding = createRuntimeBinding(component, { handlers });

// High-level task execution
const result = await executeTask({
  taskId: "review",
  adapter: "claude",
  dslPath: "./agents.conf.yaml",
  input: { specPath: "./spec.md" },
});
```

For the full API reference, see [FEATURES.md](./FEATURES.md).

## License

MIT — see [LICENSE](../../LICENSE).
