monad-developers / monad-developers/ultrafuzz
Add a tight Pi adapter for OpenRouter
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 85
- Forks
- 18
- Avg merge
- 11h 10m
- Merged PRs (30d)
- 194
Description
Part of #653. Smithers already ships the Pi harness in its built-in registry (smithers agents capabilities --format json lists id pi, binary pi, export PiAgent), and its options already expose provider, model, apiKey, mode, session, sessionDir, thinking, tools and skills, with env / inheritEnv on the base CLI options. This issue is therefore a tight adapter, not an integration.
Scope
Add packages/runtime/src/templates/smithers/agents/pi.tsx modelled line-for-line on claude.tsx:
- Construct the Smithers Pi agent with
modelandprovidertaken from the model profile. - Never set
apiKey— that option is the only path that puts a credential into argv (it emits--api-key). Pass the credential throughenv: workflowControlChildEnvironment(...)instead. - Pass the isolation and telemetry-suppression variables through the same
env, and setsessionDirto a run-scoped path so no state lands in the operator's real home. - Read only
auth/api_key_env/config_dirfrom[agents.PiAgent]via the shared TOML reader, offULTRAFUZZ_CONFIG_PATH. - Keep the subclass to the
buildCommandenv scrub and nothing else.
Register in agentFactories (agents/index.tsx) and AGENT_TEMPLATES (packages/runtime/src/init.ts). Add PiAgent: "pi" to AGENT_EXECUTABLES in packages/runtime/src/doctor.ts with a --version pin assertion. Ship an opt-in [models.pi] profile, non-default.
Prerequisites (do these first)
- Resolve the actual Pi CLI package name and the version to pin — it is not installed in the reference environment.
- Confirm whether Smithers' Pi diagnostics recognise an OpenRouter provider at all; their provider mapping may cover only the first-party vendors. If it does not, that is an upstream Smithers issue, not something to patch around in the adapter.
Acceptance criteria
- Adapter is under ~100 lines, imports nothing from
node:fsexceptreadFileSync, and overrides onlybuildCommand. - Unit test: the built argv contains no credential value.
- Unit test: the credential is present in the child env and the env went through
workflowControlChildEnvironment. -
ultrafuzz doctorrequires the pinned Pi CLI and reports a version mismatch. - One real OpenRouter smoke run completes an ultrafuzz node end to end.
Explicitly out of scope
The G1-G8/G10 conformance suite. Capability truth is smithers agents capabilities / doctor / test; ultrafuzz does not define a second contract.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
First resolve the Pi CLI package and pinned version, then check smithers agents capabilities --format json and Pi diagnostics for OpenRouter support. Read packages/runtime/src/templates/smithers/agents/claude.tsx, update the named registry, template, doctor, and model-profile locations, and add the specified unit tests. Done means the credential stays out of argv, reaches the child environment, doctor detects version mismatches, and an OpenRouter smoke run completes an ultrafuzz node.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100