.agents/skills/rig/engines/anthropic.ts |
Implements the Anthropic engine adapter using @anthropic-ai/sdk, translating Rig agent options and tools into Anthropic API calls. |
.agents/skills/rig/engines/codex.ts |
Implements the Codex engine adapter using @openai/codex-sdk, providing an AgentFactory for running rig agents against the Codex model. |
.agents/skills/rig/engines/gemini.ts |
Implements the Gemini engine adapter by spawning a subprocess and communicating over stdio with cryptographic session IDs. |
.agents/skills/rig/engines/pi.ts |
Implements the Pi engine adapter using @earendil-works/pi-agent-core, bridging Pi tools and model configuration into the Rig AgentFactory interface. |
.agents/skills/rig/engines/utils.ts |
Provides a shared utility (objectToolSchema) for converting Rig Tool definitions into JSON Schema objects expected by engine adapters. |
.agents/skills/rig/globals.ts |
Exports ambient workflow-context helpers (call, pipeline, parallel) that delegate to the currently active workflow without requiring explicit context threading. |
.agents/skills/rig/rig.ts |
Mirror of the main core runtime used by the .agents overlay; contains the full Rig harness including schema helpers, prompt intents, agent/workflow definitions, and the Copilot engine. |
scripts/haiku.integration.test.ts |
Integration test that spawns a subprocess to run a sample rig program against the real Anthropic Haiku model and asserts on output shape. |
scripts/run-sample.test.ts |
Stub-mode sample runner that exercises each numbered sample using a synthetic Copilot SDK client, validating output schema conformance without real API calls. |
skills/rig/engines/anthropic.ts |
Canonical Anthropic engine adapter (same content as .agents mirror) used by the main skills/rig package. |
skills/rig/engines/codex.ts |
Canonical Codex engine adapter for the main skills/rig package. |
skills/rig/engines/gemini.ts |
Canonical Gemini engine adapter for the main skills/rig package. |
skills/rig/engines/pi.ts |
Canonical Pi engine adapter for the main skills/rig package. |
skills/rig/engines/utils.ts |
Canonical objectToolSchema utility shared across engine adapters. |
skills/rig/globals.ts |
Canonical ambient workflow globals export for consumer programs. |
skills/rig/rig.ts |
The primary Rig core runtime: defines agent, workflow, s.* schema helpers, p.* prompt intents, copilotEngine, repair/steering/timeout addons, and the CLI launcher. |
src/engines/anthropic.test.ts |
Vitest unit tests for the Anthropic engine adapter, using vi.mock to stub the SDK and asserting correct tool schema translation and message handling. |
src/engines/codex.test.ts |
Vitest unit tests for the Codex engine adapter, verifying AgentFactory construction and message-passing behaviour under the stub SDK. |
src/engines/copilot.test.ts |
Vitest unit tests for the Copilot engine, covering session creation, approveAll wiring, and turn-based response handling. |
src/engines/gemini.test.ts |
Vitest unit tests for the Gemini engine adapter, testing subprocess spawn, stdio communication, and error propagation. |
Global Summary
Rig is a minimal TypeScript multi-agent harness that provides typed input/output schemas, prompt intents, sub-agent delegation, and workflow orchestration. The repository contains the core runtime (
skills/rig/rig.ts), engine adapters for Anthropic, Codex, Gemini, and Pi, ambient workflow globals, 50+ sample agents, and a full vitest test suite.Individual File Summaries
.agents/skills/rig/engines/anthropic.ts@anthropic-ai/sdk, translating Rig agent options and tools into Anthropic API calls..agents/skills/rig/engines/codex.ts@openai/codex-sdk, providing anAgentFactoryfor running rig agents against the Codex model..agents/skills/rig/engines/gemini.ts.agents/skills/rig/engines/pi.ts@earendil-works/pi-agent-core, bridging Pi tools and model configuration into the RigAgentFactoryinterface..agents/skills/rig/engines/utils.tsobjectToolSchema) for converting RigTooldefinitions into JSON Schema objects expected by engine adapters..agents/skills/rig/globals.tscall,pipeline,parallel) that delegate to the currently active workflow without requiring explicit context threading..agents/skills/rig/rig.ts.agentsoverlay; contains the full Rig harness including schema helpers, prompt intents, agent/workflow definitions, and the Copilot engine.scripts/haiku.integration.test.tsscripts/run-sample.test.tsskills/rig/engines/anthropic.ts.agentsmirror) used by the mainskills/rigpackage.skills/rig/engines/codex.tsskills/rigpackage.skills/rig/engines/gemini.tsskills/rigpackage.skills/rig/engines/pi.tsskills/rigpackage.skills/rig/engines/utils.tsobjectToolSchemautility shared across engine adapters.skills/rig/globals.tsskills/rig/rig.tsagent,workflow,s.*schema helpers,p.*prompt intents,copilotEngine, repair/steering/timeout addons, and the CLI launcher.src/engines/anthropic.test.tsvi.mockto stub the SDK and asserting correct tool schema translation and message handling.src/engines/codex.test.tsAgentFactoryconstruction and message-passing behaviour under the stub SDK.src/engines/copilot.test.tsapproveAllwiring, and turn-based response handling.src/engines/gemini.test.ts