Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/review-findings-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@bradygaster/squad-cli': patch
---

fix: address post-merge review findings — catch unknown narrowing and deprecation warnings for start/rc commands
6 changes: 6 additions & 0 deletions .squad/agents/eecom/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

## Learnings

### PR #942 rebase — cherry-pick from insider-based fork branch (2026-04-12)

**Context:** PR #942 from tamirdresher's fork was retargeted from `insider` to `dev`, causing 29 files in the diff when only 3 commits (4 files relevant to dev) were the actual fix. Cherry-picked the 3 fix commits onto a clean `squad/942-rebase-type-safety` branch from dev, resolving conflicts where insider-only files (skill.ts, cross-package-exports.test.ts) didn't exist on dev. Dropped the `escapeYamlValue` import and APM YAML generation function from init.ts since skill.ts doesn't exist on dev. Opened #963 as the clean replacement, closed #942.

**Key lesson:** When cherry-picking from an insider-based branch to dev, expect modify/delete conflicts for files that only exist on insider. Always verify the base assumptions of each change — imports referencing insider-only modules must be dropped or adapted.

### Loop command: second-round review fixes (#767) (2025-07-26)

**Context:** Three Copilot review comments on PR #767: (1) `teamRoot` was set to `workTreeRoot` but `.squad/` may live in the main checkout when running inside a git worktree — should derive from `detectSquadDir().path`, (2) `generateLoopFile()` hardcoded the full loop.md scaffold inline, duplicating `templates/loop.md`, (3) docs said `gh` was optional but code hard-requires `gh copilot` unless `--agent-cmd` is passed.
Expand Down
4 changes: 4 additions & 0 deletions packages/squad-cli/src/cli-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,8 @@ async function main(): Promise<void> {
}

if (cmd === 'start') {
console.log(`\n${YELLOW}⚠ DEPRECATED:${RESET} "squad start" is deprecated and will be removed in a future release.`);
console.log(` Use the GitHub Copilot CLI directly: ${BOLD}gh copilot${RESET}\n`);
const { runStart } = await import('./cli/commands/start.js');
const hasTunnel = args.includes('--tunnel');
const portIdx = args.indexOf('--port');
Expand Down Expand Up @@ -834,6 +836,8 @@ async function main(): Promise<void> {
}

if (cmd === 'rc' || cmd === 'remote-control') {
console.log(`\n${YELLOW}⚠ DEPRECATED:${RESET} "squad rc" is deprecated and will be removed in a future release.`);
console.log(` Use the GitHub Copilot CLI directly: ${BOLD}gh copilot${RESET}\n`);
const { runRC } = await import('./cli/commands/rc.js');
const hasTunnel = args.includes('--tunnel');
const portIdx = args.indexOf('--port');
Expand Down
5 changes: 3 additions & 2 deletions packages/squad-cli/src/cli/commands/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ export async function runPlugin(dest: string, args: string[]): Promise<void> {
{ timeout: TIMEOUTS.PLUGIN_FETCH_MS }
);
entries = JSON.parse(stdout.trim());
} catch (err: any) {
fatal(`Could not browse ${marketplace.source} — ${err.message}`);
} catch (err: unknown) {
const message = err instanceof Error ? err.message : String(err);
fatal(`Could not browse ${marketplace.source} — ${message}`);
}

if (!entries || entries.length === 0) {
Expand Down
5 changes: 3 additions & 2 deletions packages/squad-cli/src/cli/core/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,10 @@ export async function runInit(dest: string, options: RunInitOptions = {}): Promi
let result;
try {
result = await sdkInitSquad(initOptions);
} catch (err: any) {
} catch (err: unknown) {
process.off('SIGINT', sigintHandler);
fatal(`Failed to initialize squad: ${err.message}`);
const message = err instanceof Error ? err.message : String(err);
fatal(`Failed to initialize squad: ${message}`);
return; // Unreachable but makes TS happy
}

Expand Down