feat: Structured model preference & squad-level defaults#245
Merged
bradygaster merged 5 commits intodevfrom Mar 7, 2026
Merged
feat: Structured model preference & squad-level defaults#245bradygaster merged 5 commits intodevfrom
bradygaster merged 5 commits intodevfrom
Conversation
Add command routing for rc, copilot-bridge, init-remote, and rc-tunnel which existed in packages/squad-cli/src/cli/commands/ but had no route in cli-entry.ts. Also add help text entries for all four. - rc / remote-control: starts RemoteBridge with --tunnel, --port, --path - copilot-bridge: checks Copilot ACP stdio compatibility - init-remote: standalone shorthand for init --mode remote <path> - rc-tunnel: checks devtunnel CLI availability aspire, link, loop, and hire were already wired. Closes #237 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add ModelPreference interface (preferred, rationale, fallback) to builders/types.ts - AgentDefinition.model now accepts string or ModelPreference object (backwards compatible) - Add DefaultsDefinition with model field to SquadSDKConfig - Add defineDefaults() builder function with validation - Update charter generation to emit proper ## Model section with Preferred/Rationale/Fallback - Charter generation applies squad defaults.model when agent has no model specified - Update charter-compiler to extract rationale and fallback from ## Model section - Export new types and defineDefaults from SDK entry point - Update tests for build-command and charter-compiler Closes #223 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e11f598 to
1bf8866
Compare
Add test coverage for all 8 CLI commands that had zero tests: - link (10 tests): validation, fs operations, gitignore handling - init-remote (8 tests): config structure, relative paths, idempotency - watch (6 tests): module exports, reportBoard pure function - start (3 tests): module exports, function arity - rc-tunnel (10 tests): exports, getMachineId, getGitInfo, devtunnel availability - extract (5 tests): exports, error handling for missing/invalid config - copilot (6 tests): exports, error on missing squad dir, add/remove flow - copilot-bridge (8 tests): class instantiation, lifecycle, safe-before-init Add command wiring regression test (21 tests) that verifies every .ts file in commands/ has a corresponding route in cli-entry.ts, preventing the recurring unwired command bug class (issues #224, #236, #237). Add subpath exports to squad-cli package.json for the 6 commands that were missing package exports (watch, start, rc-tunnel, extract, copilot, copilot-bridge). Total: 77 new tests, all passing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bradygaster
added a commit
that referenced
this pull request
Mar 7, 2026
Session: 2026-03-07T14-16-00Z-next-wave-fenster-completions Requested by: Scribe (autonomous) Changes: - Logged agent-32 completion: CLI command wiring (#237) — 4 commands wired, 3655 tests pass, PR #244 - Logged agent-31 completion: Model config reliability (#223) — root cause fixed, backwards compatible, PR #245 - Updated Fenster's history.md with cross-agent context about CLI wiring and model config patterns
The model config changes added legitimate help text lines, pushing output from ~68 to 72 lines. Bump threshold to 80 for headroom. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bradygaster
added a commit
that referenced
this pull request
Mar 7, 2026
Matches the same fix applied to PR #245. New CLI commands added legitimate help text. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Mar 7, 2026
jongio
pushed a commit
to jongio/squad
that referenced
this pull request
Mar 9, 2026
* docs: migration guide — GitHub-native to npm (bradygaster#218) Closes bradygaster#218 Adds docs/migration-github-to-npm.md for users migrating from GitHub-native distribution to npm packages (@bradygaster/squad-cli and @bradygaster/squad-sdk). Changes: - New migration guide with before/after examples, insider channel info, comparison table, and troubleshooting - Updated README.md to reference migration guide in Legacy Distribution section Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat: message routing + shell commands (bradygaster#245, bradygaster#246) Add message router (src/cli/shell/router.ts): - Slash command parsing (/status, /help, etc.) - @agent direct addressing with case-insensitive matching - AgentName, message comma syntax support - Coordinator fallback for unmatched input Add shell commands (src/cli/shell/commands.ts): - /status — squad status and active agents - /history — recent message history with limit - /agents — list registered agents with status icons - /clear — ANSI clear screen - /help — command reference - /quit, /exit — clean shutdown Both modules exported from src/cli/shell/index.ts barrel. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jongio
pushed a commit
to jongio/squad
that referenced
this pull request
Mar 9, 2026
) Add message router (src/cli/shell/router.ts): - Slash command parsing (/status, /help, etc.) - @agent direct addressing with case-insensitive matching - AgentName, message comma syntax support - Coordinator fallback for unmatched input Add shell commands (src/cli/shell/commands.ts): - /status — squad status and active agents - /history — recent message history with limit - /agents — list registered agents with status icons - /clear — ANSI clear screen - /help — command reference - /quit, /exit — clean shutdown Both modules exported from src/cli/shell/index.ts barrel. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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
Closes #223 — Model & reasoning-level configuration not reliably applied by agents.
Working as Fenster (Core Dev).
Problem
The \model\ field in \AgentDefinition\ was a bare string. Charter generation output a flat *Model:* {value}\ line instead of the ## Model\ section that the charter-compiler expects (with **Preferred:**\ format). This meant model preferences set via SDK config were silently dropped during the parse → compile round-trip.
Changes
SDK types (\packages/squad-sdk/src/builders/types.ts):
Builder validation (\packages/squad-sdk/src/builders/index.ts):
Charter generation (\packages/squad-cli/src/cli/commands/build.ts):
Charter compiler (\packages/squad-sdk/src/agents/charter-compiler.ts):
Exports (\packages/squad-sdk/src/index.ts):
Tests: Updated \ est/build-command.test.ts\ and \ est/charter-compiler.test.ts\ — all 62+36 tests pass.
Usage
\\ s
// Per-agent (string — backwards compatible)
defineAgent({ name: 'edie', role: 'TS Eng', model: 'claude-sonnet-4' });
// Per-agent (structured)
defineAgent({
name: 'edie',
role: 'TS Eng',
model: { preferred: 'claude-sonnet-4', rationale: 'Best for type work', fallback: 'claude-haiku-4.5' },
});
// Squad-level default
defineSquad({
team: defineTeam({ ... }),
agents: [...],
defaults: defineDefaults({ model: 'claude-sonnet-4' }),
});
\\