run-cg-agent-harness

Build, run, and smoke-test the cgagentharness Rust server and browser console with a fake local model.

Updated Sep 7, 2026
One-click install
npx skills add https://github.com/cgfixit/CG-agent-harness --skill run-cg-agent-harness-cgfixit
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: run-cg-agent-harness
Source: https://github.com/cgfixit/CG-agent-harness/tree/main/.claude/skills/run-cg-agent-harness
Command: npx skills add https://github.com/cgfixit/CG-agent-harness --skill run-cg-agent-harness-cgfixit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright.

What problem does it solve? Verifying the cgagentharness console end-to-end on a headless Linux box is difficult because fresh homes require HTTPS, account login, and a real model server. This Skill automates building the Rust backend, launching it against a fake OpenAI-compatible model, and running API smoke tests and browser screenshot checks. ## Core Features & Use Cases - Automated acceptance testing: Runs the maintained Python backend suite and Node browser acceptance suite with disposable homes, HTTPS login, and a mock local model. - Headless browser verification: Drives the real console UI in headless Chromium via Playwright, executes console commands, and captures full-page screenshots. - API smoke testing: Exercises the guard chain (CSRF, same-origin checks), session creation, chat round-trips, tool wiring, and verifies that agentic gates ship closed. - Use Case: After modifying the harness code, run the smoke mode to confirm the server boots, enforces CSRF and Origin protections, and round-trips chat through the fixture model before committing. ## Quick Start Ask the agent to build the release binary and run the smoke test for the cgagentharness console using the run-cg-agent-harness skill.

Frequently Asked Questions about run-cg-agent-harness

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I smoke-test the cgagentharness server end-to-end?▼

Build the release binary with cargo build --release --locked, then run scripts/test-desktop-backend.py for the backend suite and scripts/chat-browser-acceptance.mjs for the browser suite. Both use disposable homes, HTTPS account login, and a mock local model.

How to screenshot a web console in headless Chromium?▼

Use the driver's shot mode, which launches Chromium via Playwright with --no-sandbox, runs console commands through the real UI, waits for stream updates, and writes a full-page screenshot. CHROME_BIN selects the Chrome executable.

Can I attach the driver to an already-running server?▼

Yes, set CGAH_BASE to the server's base URL to skip launching; CGAGENTHARNESS_API_KEY is sent as a bearer token if set. In attach mode, fixture-specific assertions relax and the agent run probe is skipped to avoid starting a real run.

Why does the smoke test expect a 409 from the agent run endpoint?▼

The coding pipeline ships closed behind six gates, so /api/agent/run must return 409 with code AGENTIC_DISABLED. This confirms repository mutation and agentic execution remain disabled until an operator explicitly arms the gates.

Does this Linux-based testing verify the macOS desktop app?▼

No. Native desktop verification is macOS-specific and recorded separately in docs/DESKTOP_ACCEPTANCE.md. Linux builds do not establish equivalent sandbox or native WebKit behavior.