Skip to content

feat!: remove interactive shell (REPL)#967

Draft
bradygaster wants to merge 12 commits intodevfrom
repl-removal
Draft

feat!: remove interactive shell (REPL)#967
bradygaster wants to merge 12 commits intodevfrom
repl-removal

Conversation

@bradygaster
Copy link
Copy Markdown
Owner

Summary

Remove the interactive shell (REPL) from Squad CLI. All product logic has been extracted to @bradygaster/squad-sdk\ runtime modules with comprehensive test coverage.

What changed

Extracted to SDK (10 modules, 194 new tests):

  • error-messages, coordinator-parser, input-router, ghost-retry, shell-types
  • session-registry, memory-manager, session-store, shell-metrics, team-manifest

Deleted:

  • \packages/squad-cli/src/cli/shell/\ — 27 source files (entire directory)
  • 33 REPL-only test files
  • \ink,
    eact, @types/react, \ink-testing-library\ dependencies
  • All ./shell/*\ package exports
  • \patch-ink-rendering.mjs\ postinstall script

Updated:

  • \cli-entry.ts\ — running \squad\ with no args now shows usage guidance directing users to GitHub Copilot CLI
  • \ sconfig.json\ — removed JSX/React config

Stats

  • -22,023 lines deleted
  • 410 tests pass (194 new SDK + 216 existing)
  • 12 commits on the branch

Breaking Changes

  • Interactive shell removed — \squad\ with no args shows guidance instead of launching REPL
  • ./shell/*\ package exports removed
  • \ink\ and
    eact\ no longer bundled

Closes #675

Copilot AI added 12 commits April 12, 2026 17:09
Brady chose Option 2 (extract first, then delete) for the REPL removal.
The 615 mixed tests must be rewritten to test against CLI/SDK directly
before the shell code is deleted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merged 5 decisions from inbox into decisions.md:
- 2026-03-26: CI deletion guard and source tree canary (Booster)
- 2026-03-26: Copilot git safety rules (RETRO)
- 2026-03-29: Versioning policy — no prerelease versions (Flight)
- 2026-04-13: REPL removal strategy — extract first (Brady/Copilot)
- 2026-04-13: Test extraction plan for REPL removal (FIDO)

All inbox files deleted after merge. Session log written.
Batch 1 extraction work can begin.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extract pure functions from CLI shell modules into SDK runtime:

- error-messages.ts: All error guidance functions (sdkDisconnectGuidance,
  teamConfigGuidance, agentSessionGuidance, rateLimitGuidance, etc.)
- coordinator-parser.ts: parseCoordinatorResponse, hasRosterEntries,
  formatConversationContext with new MessageLike interface

Shell modules become thin re-export wrappers. Old imports keep working.
New SDK test files validate the extracted functions.

Also fixes pre-existing TOKEN_PATH typo in comms-teams.ts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move parseInput() and parseDispatchTargets() plus their types
(MessageType, ParsedInput, DispatchTargets) from CLI shell/router.ts
to SDK runtime/input-router.ts. The CLI file becomes a thin re-export
shim. Dead imports of parseCoordinatorResponse and SessionRegistry
removed.

Adds 22 new tests covering slash commands, @agent routing,
case-insensitive matching, comma syntax, multi-agent dispatch,
deduplication, and plain text fallback.

Closes #0

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create packages/squad-sdk/src/runtime/ghost-retry.ts with withGhostRetry + GhostRetryOptions
- Create packages/squad-sdk/src/runtime/shell-types.ts with ShellState, ShellMessage, AgentSession
- Update CLI shell/index.ts to import from SDK and re-export for backward compatibility
- Update CLI shell/types.ts to re-export from SDK
- Add comprehensive tests: sdk-ghost-retry.test.ts (10 tests), sdk-shell-types.test.ts (7 tests)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move shell observability metrics (session duration, agent latency, error
rate, session count) from squad-cli to squad-sdk. The module's only
dependency is getMeter which already lives in the SDK.

- Create packages/squad-sdk/src/runtime/shell-metrics.ts with relative
  import of getMeter from ./otel.js
- Add barrel export in SDK index.ts and package.json exports map
- Convert CLI source to thin re-export shim
- Add 9 SDK-side tests importing from @bradygaster/squad-sdk/runtime/shell-metrics
- Update existing CLI test mock to target new otel import path

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…(Batch 4)

- SessionRegistry: pure Map wrapper for agent session tracking
- MemoryManager: buffer management with configurable limits
- session-store: filesystem session persistence using FSStorageProvider
- CLI shell modules replaced with re-export shims
- 29 new tests covering all public APIs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move parseTeamManifest, getRoleEmoji, loadWelcomeData, DiscoveredAgent,
and WelcomeData from CLI shell/lifecycle.ts to SDK runtime/team-manifest.ts.
Shell file becomes a thin re-export wrapper for backward compatibility.

14 new tests covering parsing, emoji mapping, and welcome data loading.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adversarial tests (54 cases) cover edge-case and malicious inputs for
parseInput, parseDispatchTargets, parseCoordinatorResponse, hasRosterEntries,
withGhostRetry, and parseTeamManifest — including empty/whitespace input,
Unicode (emoji, CJK, RTL, zalgo), shell injection patterns, very long inputs,
null/undefined returns, and malformed markdown tables.

Performance gate tests (9 cases) guard against regressions in parseInput,
parseCoordinatorResponse, SessionRegistry, and MemoryManager with generous
thresholds to avoid CI flakes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
BREAKING CHANGE: The interactive shell has been removed. Running `squad`
with no arguments now shows usage guidance directing users to GitHub
Copilot CLI. All product logic has been extracted to @bradygaster/squad-sdk
in prior commits. Shell-specific package exports (./shell/*) have been
removed.

Closes #675

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Archived EECOM history (kept last 10 entries, 9.4KB)
- Archived FIDO history (kept last 10 entries, 12.8KB)
- Batch 10 completion logged: shell removal, SDK extraction, gate tests
- Team update entries appended to EECOM and FIDO histories

Metrics:
- decisions.md: 34,071 bytes (Tier 1 gate triggered, no dated entries to archive)
- Inbox processed: 0 files
- Histories summarized: 2 files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants