Category: Leaking Abstraction
Problem
packages/adapter-sdk/src/bootstrap.ts (632 lines) is an implementation file with hardcoded logic for specific adapters, baked into what should be a generic SDK:
- Codespace paths:
/workspaces/*/ detection (line 146-149), /workspaces/.codespaces/shared/.env token read (line 389)
- Docker host:
"0.0.0.0" assumption in StartRemotePowerLineOptions.host (line 141)
- POSIX-only:
$HOME/.grackle/powerline in REMOTE_POWERLINE_DIRECTORY (utils.ts line 8) — Windows agents can't use this
- Implementation, not SDK: npm install timeouts (line 21), git credential helpers (lines 514-532), runtime catalog integration (lines 534-607), hardcoded npm registry URLs (lines 475, 582)
Proposed Fix
- Extract workspace detection into adapters via a
WorkspaceDetector interface
- Move
.codespaces token logic into CodespaceAdapter
- Move Docker host config into
DockerAdapter
- Refactor
bootstrapPowerLine() into composable utilities that adapters call, rather than a monolithic function
The SDK should export interfaces and utilities. Adapter-specific implementation belongs in the adapter packages.
Impact
High — generic SDK is not generic. Adding a new adapter type means working around codespace/docker assumptions.
Category: Leaking Abstraction
Problem
packages/adapter-sdk/src/bootstrap.ts(632 lines) is an implementation file with hardcoded logic for specific adapters, baked into what should be a generic SDK:/workspaces/*/detection (line 146-149),/workspaces/.codespaces/shared/.envtoken read (line 389)"0.0.0.0"assumption inStartRemotePowerLineOptions.host(line 141)$HOME/.grackle/powerlineinREMOTE_POWERLINE_DIRECTORY(utils.ts line 8) — Windows agents can't use thisProposed Fix
WorkspaceDetectorinterface.codespacestoken logic intoCodespaceAdapterDockerAdapterbootstrapPowerLine()into composable utilities that adapters call, rather than a monolithic functionThe SDK should export interfaces and utilities. Adapter-specific implementation belongs in the adapter packages.
Impact
High — generic SDK is not generic. Adding a new adapter type means working around codespace/docker assumptions.