From cdcd2ca063487f740bfeca247f91605d9a510639 Mon Sep 17 00:00:00 2001 From: Copilot Date: Wed, 8 Apr 2026 19:23:13 +0300 Subject: [PATCH 1/5] fix: address post-merge review findings (#876, #900, #875) - Add YAML value escaping helper for skill metadata - Replace catch(err: any) with catch(err: unknown) + narrowing - Add type guards to replace unsafe type assertions - Standardize deprecation messages on `gh copilot` - Fix unsafe exports type cast in cross-package test Closes #924, #925, #926 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- packages/squad-cli/src/cli-entry.ts | 4 ++++ packages/squad-cli/src/cli/commands/plugin.ts | 5 +++-- packages/squad-cli/src/cli/core/init.ts | 5 +++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/squad-cli/src/cli-entry.ts b/packages/squad-cli/src/cli-entry.ts index 39705a984..c30760f8a 100644 --- a/packages/squad-cli/src/cli-entry.ts +++ b/packages/squad-cli/src/cli-entry.ts @@ -753,6 +753,8 @@ async function main(): Promise { } 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'); @@ -834,6 +836,8 @@ async function main(): Promise { } 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'); diff --git a/packages/squad-cli/src/cli/commands/plugin.ts b/packages/squad-cli/src/cli/commands/plugin.ts index 691f8dd28..b51a7d26f 100644 --- a/packages/squad-cli/src/cli/commands/plugin.ts +++ b/packages/squad-cli/src/cli/commands/plugin.ts @@ -156,8 +156,9 @@ export async function runPlugin(dest: string, args: string[]): Promise { { 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) { diff --git a/packages/squad-cli/src/cli/core/init.ts b/packages/squad-cli/src/cli/core/init.ts index 592de5aef..c0619dd21 100644 --- a/packages/squad-cli/src/cli/core/init.ts +++ b/packages/squad-cli/src/cli/core/init.ts @@ -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 } From 538a10c1c7d68ed931bcb28cd3ee9cb5a44a0c1d Mon Sep 17 00:00:00 2001 From: Copilot Date: Wed, 8 Apr 2026 19:24:58 +0300 Subject: [PATCH 2/5] chore: add changeset for review findings fix Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .changeset/review-findings-fix.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/review-findings-fix.md diff --git a/.changeset/review-findings-fix.md b/.changeset/review-findings-fix.md new file mode 100644 index 000000000..3e50d8330 --- /dev/null +++ b/.changeset/review-findings-fix.md @@ -0,0 +1,6 @@ +--- +'@bradygaster/squad-cli': patch +--- + +fix: address post-merge review findings — YAML escaping, type safety, deprecation messages + From a1699d3aa29d5458bf482c1521945a90778ebbce Mon Sep 17 00:00:00 2001 From: Copilot Date: Thu, 9 Apr 2026 07:53:55 +0300 Subject: [PATCH 3/5] chore: trigger CI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .changeset/review-findings-fix.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.changeset/review-findings-fix.md b/.changeset/review-findings-fix.md index 3e50d8330..e557bf007 100644 --- a/.changeset/review-findings-fix.md +++ b/.changeset/review-findings-fix.md @@ -3,4 +3,3 @@ --- fix: address post-merge review findings — YAML escaping, type safety, deprecation messages - From 889053667860a7b4bcfc5b3dea07288c7994d016 Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 10:11:27 -0700 Subject: [PATCH 4/5] =?UTF-8?q?chore(.squad):=20EECOM=20history=20?= =?UTF-8?q?=E2=80=94=20PR=20#942=20rebase=20learnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .squad/agents/eecom/history.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.squad/agents/eecom/history.md b/.squad/agents/eecom/history.md index 2b4ee011a..cf00ea8ac 100644 --- a/.squad/agents/eecom/history.md +++ b/.squad/agents/eecom/history.md @@ -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. From d32b744b11588831e25dab6f6648efab9e9b3a65 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 17:15:10 +0000 Subject: [PATCH 5/5] chore: update changeset to accurately reflect PR changes (drop YAML escaping reference) Agent-Logs-Url: https://github.com/bradygaster/squad/sessions/54f41407-61bf-4977-85b7-572341c47b62 Co-authored-by: bradygaster <41929050+bradygaster@users.noreply.github.com> --- .changeset/review-findings-fix.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/review-findings-fix.md b/.changeset/review-findings-fix.md index e557bf007..45b641b97 100644 --- a/.changeset/review-findings-fix.md +++ b/.changeset/review-findings-fix.md @@ -2,4 +2,4 @@ '@bradygaster/squad-cli': patch --- -fix: address post-merge review findings — YAML escaping, type safety, deprecation messages +fix: address post-merge review findings — catch unknown narrowing and deprecation warnings for start/rc commands