← Back to PRs

#19935: Add SoundChain extension — music API + War Room diagnostic pipeline

by soundchainio open 2026-02-18 09:42 View on GitHub →
size: XL
## Summary - Adds `soundchain` extension with **13 tools** across 3 tiers: - **Music API** (7 tools): search, radio, play, stats, trending, discover, leaderboard — wraps SoundChain Agent REST API (`/api/agent/*`), OGUN streaming rewards (70/30 creator/listener split) - **War Room Infrastructure** (3 tools): fleet health check (SCid Worker + Ollama + nodes), direct Ollama model access (7 local models, zero token cost), SCid Worker task router - **Phil Jackson Triangle Pipeline** (3 tools): 7-stage diagnostic pipeline (falcon→grok→mistral→gemma→mixtral→llama→qwen) with auto error classification, specialist routing to 7 domain agents, and roster viewer - Plugin config: `apiUrl`, `agentName`, `agentWallet` (music), `scidWorkerUrl`, `ollamaUrl` (War Room) - Zero external dependencies beyond `@sinclair/typebox` (already in workspace) - TypeScript compilation clean, follows existing extension patterns ## New Files | File | Purpose | |------|---------| | `extensions/soundchain/package.json` | Package metadata | | `extensions/soundchain/openclaw.plugin.json` | Plugin manifest + config schema | | `extensions/soundchain/index.ts` | Entry point — registers all 13 tools | | `extensions/soundchain/src/api.ts` | HTTP client for SoundChain Agent REST API | | `extensions/soundchain/src/warroom.ts` | War Room client (SCid Worker + Ollama + Fleet) | | `extensions/soundchain/src/phil-jackson.ts` | 7-stage diagnostic pipeline engine | ## Test plan - [ ] `pnpm install` discovers extension in workspace - [ ] `tsc --noEmit` compiles clean - [ ] `soundchain_search` with query "jazz" returns tracks - [ ] `soundchain_radio` returns current OGUN Radio track - [ ] `soundchain_stats` returns platform statistics - [ ] `warroom_health` returns fleet status - [ ] `warroom_diagnose` classifies errors and routes to correct pipeline stage - [ ] `warroom_roster` returns full pipeline + fleet + specialist info 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- greptile_comment --> <h3>Greptile Summary</h3> Adds a new `soundchain` extension with 13 tools spanning a music API client, War Room infrastructure tools (SCid Worker + Ollama), and a Phil Jackson Triangle diagnostic pipeline that chains 7 local Ollama models in sequence. - **Tool schema guardrail violation**: `warroom_diagnose` uses `Type.Union([Type.Literal(...)])` for the `depth` parameter, which compiles to `anyOf` and is rejected by some LLM providers (e.g., Claude on Vertex AI). The repo's own `AGENTS.md` and `src/agents/schema/typebox.ts` explicitly warn against this — use `stringEnum`/`optionalStringEnum` instead. - **Missing HTTP error handling**: Both `api.ts:request()` and `warroom.ts:fetchJson()` call `res.json()` without checking `res.ok`. Non-JSON error responses (HTML error pages, 502s) will throw confusing `SyntaxError` exceptions instead of meaningful error messages. - **Hardcoded private IPs**: `FLEET_NODES` contains developer-specific LAN addresses (`192.168.1.x`) exposed in `warroom_health` and `warroom_roster` tool responses — should be configurable or omitted. <h3>Confidence Score: 2/5</h3> - PR has a tool schema violation that will cause runtime failures on some LLM providers, and missing HTTP error handling that will produce confusing errors when services are unavailable. - The Type.Union usage in tool schemas is explicitly prohibited by the repo's guardrails and will cause tool registration failures on providers like Vertex AI. The missing res.ok checks in both HTTP clients will produce unhelpful SyntaxError exceptions instead of actionable error messages when the SoundChain API or local services return non-JSON errors. These are functional issues that need addressing before merge. - extensions/soundchain/index.ts (Type.Union guardrail violation), extensions/soundchain/src/api.ts and extensions/soundchain/src/warroom.ts (missing HTTP error handling) <sub>Last reviewed commit: e84b692</sub> <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) <!-- /greptile_comment -->

Most Similar PRs