Skip to content

[Spec 0602][Phase 1] Shared types, monorepo restructure, approved spec + plan#666

Merged
waleedkadous merged 10 commits intomainfrom
spir/0602-vscode-extension
Apr 13, 2026
Merged

[Spec 0602][Phase 1] Shared types, monorepo restructure, approved spec + plan#666
waleedkadous merged 10 commits intomainfrom
spir/0602-vscode-extension

Conversation

@amrmelsayed
Copy link
Copy Markdown
Collaborator

@amrmelsayed amrmelsayed commented Apr 13, 2026

Summary

  • Approved spec and plan for VS Code extension (two consultation rounds each)
  • Extract @cluesmith/codev-types shared types package
  • Move dashboard to packages/dashboard/ as standalone workspace member
  • Add @cluesmith/codev-config shared tsconfig
  • Standardize folder naming (drop redundant codev- prefix)
  • codev-types as devDependency only (no runtime import, global install works)

Packages

Folder npm name Purpose
packages/codev @cluesmith/codev CLI + Tower
packages/types @cluesmith/codev-types Shared types (dev only)
packages/config @cluesmith/config Shared tsconfig
packages/dashboard @cluesmith/codev-dashboard React dashboard
packages/vscode codev VS Code extension

Test plan

  • npm install from root resolves all workspace members
  • npm run build in packages/codev passes (including dashboard build + copy)
  • npm test -- --run in packages/codev passes (2422 tests)
  • npm pack + npm install -g from tarball succeeds (no codev-types 404)
  • npm run check-types in packages/vscode passes
  • CI workflows may need updating (install from root, not packages/codev)

Ref #602

Spec reviewed, consulted (Gemini, Codex, Claude), team feedback
incorporated. All open questions resolved. Ready for Plan phase.
8 phases with V1 cut line after Phase 5. Shared types extraction,
Connection Manager, terminal integration, unified sidebar, commands.
Post-V1: analytics Webview, review comments, file link URI scheme.
…aude)

- Split Phase 2 into 2a (connection + auth) and 2b (SSE + auto-start)
- Move Review Comments into V1 (Phase 6, zero dependencies)
- Add Phase 7: V1 Polish + Packaging (vsce verification)
- V1 cut line now Phases 1-7
- Add WebSocket auth control message, proxy support, activation events
- Add cross-platform afx open, ws esbuild fix, context menu no-ops
- Expand risk table from 7 to 14 risks
…ter rationale

- Add Extension Touch Points table (15 VS Code surfaces)
- Replace conflicting Cmd+Shift shortcuts with chord bindings (Cmd+K, A/M/G)
- Add rationale for native Pseudoterminal over xterm.js Webview
- Rename WebSocket Binary Protocol Translation to Binary Protocol Adapter
Plan approved after two rounds of consultation (Gemini, Codex, Claude).

Fixes: Cmd+K,D for send (M conflicts), activation event uses
.codev/config.json, dependency map self-reference, Phase 8/9 CLI
reference, Phase 7 JSON id, explicit ws dependency in Phase 2a,
activation time target in Phase 7, UX walkthrough V1 accuracy.
Create @cluesmith/codev-types with WebSocket protocol constants,
control message types, SSE event types, and API response shapes.
Create @cluesmith/config with shared tsconfig.base.json.

- Server ws-protocol.ts imports constants/types from shared package
- Extension imports and verifies cross-package resolution
- All packages extend config/tsconfig.base.json
- Dual exports: types → source (dev), default → dist (runtime)
Post-V1 shared runtime package renamed from @cluesmith/codev-api-client
to @cluesmith/codev-shared to host utilities beyond the API client
(EscapeBuffer, auth helpers, workspace path encoding).
Move packages/codev/dashboard/ to packages/dashboard/ as a proper
workspace member. Dashboard can now import @cluesmith/codev-types.

- Build script copies dashboard dist into packages/codev/dashboard-dist/
- Tower runtime path updated to reference dashboard-dist
- Test imports use @cluesmith/codev-dashboard package instead of
  relative paths crossing workspace boundaries
- All 2422 tests pass
Rename codev-types → types, codev-vscode → vscode. Folder names
drop the codev- prefix (scope provides namespace). npm package
names unchanged. Update .vscode/, .gitignore references.
Re-declare FRAME_CONTROL/FRAME_DATA constants locally in ws-protocol.ts
to eliminate runtime dependency on @cluesmith/codev-types. Type imports
use import type (erased at compile time). Compiled dist has zero
imports from codev-types. Global npm install now succeeds.
@waleedkadous waleedkadous merged commit 4aa3443 into main Apr 13, 2026
6 checks passed
waleedkadous added a commit that referenced this pull request Apr 13, 2026
… monorepo restructure

PR #666 moved the dashboard to packages/dashboard/ and changed the
build output from dashboard/dist to dashboard-dist in packages/codev.
The npm pack E2E test still expected the old path.
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