feat: swarm foundation for nostown consensus extension#3624
Open
kab0rn wants to merge 7 commits intogastownhall:mainfrom
Open
feat: swarm foundation for nostown consensus extension#3624kab0rn wants to merge 7 commits intogastownhall:mainfrom
kab0rn wants to merge 7 commits intogastownhall:mainfrom
Conversation
Adds TierCustomGroqOpus ("custom-groq-opus") which routes
mayor/polecat/crew to the default Opus model and all patrol/utility
roles (deacon, witness, refinery, boot, dog) to Groq Compound for
cost savings on background orchestration work.
- Adds TierCustomGroqOpus constant
- Adds groqCompoundPreset() RuntimeConfig helper
- Wires groq-compound agent into CostTierAgents
- Updates ValidCostTiers, IsValidTier, TierDescription
- ApplyCostTier now cleans up groq-compound on TierStandard switch
- Add AgentGroqCompound builtin preset in agents.go with correct ANTHROPIC_BASE_URL and GROQ_API_KEY→ANTHROPIC_API_KEY env injection so claude CLI routes requests to Groq's OpenAI-compatible endpoint. - Update groqCompoundPreset() in cost_tier.go to use the builtin RuntimeConfigFromPreset() path instead of a bare ad-hoc RuntimeConfig, so all claude SDK / hooks / tmux detection plumbing is inherited. - Model string is groq/compound-beta (Groq's compound reasoning model). - ANTHROPIC_API_KEY is expanded at runtime from $GROQ_API_KEY so no secrets are hardcoded; falls back gracefully when GROQ_API_KEY unset.
- Add TierCustomGroqOpus cost tier: mayor/crew on Opus, everything else on groq-compound - Move polecat to groq-compound in this tier - Fix hardcoded Groq API key: now reads GROQ_API_KEY from environment at runtime - Fix model name: groq/compound → compound-beta (actual Groq API model ID) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds custom-groq-sonnet cost tier that uses: - Claude Sonnet for mayor (quality-critical work) - Groq compound-beta for all other roles (fast, low-cost)
This document provides an overview of NOS Town's integration with Gas Town, detailing architecture, configuration, workflow, and key differences.
The PR evolved through multiple commits that left cost_tier.go and agents.go in an internally inconsistent state post-rebase: - Commit 22c6408 introduced TierCustomGroqSonnet with mis-indented code (stray tabs breaking the switch syntax). - agents.go used --model arg for groq-compound, while the PR test expected ANTHROPIC_MODEL env var. - ANTHROPIC_API_KEY was stored as literal \"\$GROQ_API_KEY\" string, while the test expected the resolved env value. Resolution: - Reformat TierCustomGroqSonnet block and the IsValidTier switch. - AgentGroqCompound: drop --model arg, set ANTHROPIC_MODEL=compound-beta in Env, keep the base-URL + API-key overrides. - groqCompoundPreset: resolve \$GROQ_API_KEY at preset build time. - Update TestValidCostTiers to expect 5 tiers (adds custom-groq-sonnet). Co-authored-by: kab0rn <37914030+kab0rn@users.noreply.github.com>
…guard, groq JSON enforcement, doctor probe, nostown hook Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prepares GasTown for multi-agent swarm consensus via the nostown extension.
All existing behavior is unchanged — swarm path only activates when
SlingParams.SwarmConfig is non-nil, which no existing caller sets.
The nostown binary is optional; if absent, single-agent fallback runs with a warning.
Changes
SwarmConfig+NonInteractiveConfigtypes to SlingParamstrySwarmDelegatehook inexecuteSling— subprocess JSON protocol to nostowngt doctorgroq-compound JSON probe checkTest checklist
go build ./...passesgt doctorpasses with new probe (skips gracefully if groq not configured)gt slinginvocations unaffectedgt slingwith SwarmConfig set delegates to nostown when binary present