Repository navigation
Add machine-readable health metadata - #2384
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🟠 Impact Analysis — PR #2384Risk tier: 🟠 HIGH 📊 Summary
🎯 Risk Factors
📦 Modules Affecteddocs (1 file)
root (1 file)
squad-cli (2 files)
squad-sdk (1 file)
tests (3 files)
|
🛫 PR Readiness Check
PR Scope: 📦🔧 Mixed (product + infrastructure)
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 8 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | 1 active Copilot thread(s) resolved (3 outdated skipped) |
| ❌ | CI passing | 14 check(s) still running |
Files Changed (8 files, +236 −14)
| File | +/− |
|---|---|
.changeset/blue-health-metadata.md |
+6 −0 |
docs/src/content/docs/reference/cli.md |
+5 −0 |
packages/squad-cli/src/cli/commands/health.ts |
+79 −4 |
packages/squad-cli/src/cli/commands/state-mcp.ts |
+2 −0 |
packages/squad-sdk/src/tools/index.ts |
+48 −7 |
test/cli/health-command.test.ts |
+67 −2 |
test/cli/state-mcp.test.ts |
+17 −1 |
test/tools.test.ts |
+12 −0 |
Total: +236 −14
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
🟡 Changes recommended
Health metadata misreports the resolved backend and drops team identifiers from supported state roots, causing CLI/MCP inconsistencies and indistinguishable paths for sibling teams.
2 open issues
What changed in this PR
Adds machine-readable health metadata for external coordinators using Squad’s CLI and state MCP bridge, addressing #2357 while preserving existing human-readable health output.
Changes:
- Adds version, backend, resolved team directory, and launch metadata to CLI JSON and MCP health responses.
- Extends focused tests and documents both output contracts.
- Includes patch changesets for the CLI and SDK.
| File | Description |
|---|---|
test/cli/state-mcp.test.ts |
Verifies the MCP metadata payload and aligns the SDK cache-reset import. |
test/cli/health-command.test.ts |
Checks metadata in successful and failed CLI reports. |
packages/squad-sdk/src/tools/index.ts |
Adds versioned JSON metadata to the state health tool. |
packages/squad-cli/src/cli/commands/state-mcp.ts |
Supplies CLI version and stdio launch mode to the registry. |
packages/squad-cli/src/cli/commands/health.ts |
Adds runtime metadata to structured health reports. |
docs/src/content/docs/reference/cli.md |
Documents CLI and MCP health metadata. |
.changeset/blue-health-metadata.md |
Records CLI and SDK patch releases. |
Review effort: Balanced
Part of github#2357 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Linked-team health metadata can report the shared team’s backend instead of the project’s runtime backend, causing inconsistent health results when their settings differ.
1 open issue
2 resolved since last review
Review effort: Balanced
Part of github#2357 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Passing the normalized backend setting as an override can make health metadata report two-layer while the runtime uses local for a whitespace-padded configuration value.
1 open issue
1 resolved since last review
Review effort: Balanced
Part of github#2357 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Summary
Validation
Closes #2357