S258 Handoff
Documentation for Sessions
S258 Handoff — Chat Plugin Core & Native VSCode Chat
Session: 258 Date: 2026-03-23 Status: Implementation Complete — Backend endpoint pending Branch: session-254-258 (shared, no commits made)
What Was Delivered
1. @libs-ai/chat-plugin-core — New NX Library
Path: libs/libs-ai/chat-plugin-core/
Files: 29 TypeScript, 0 Angular imports
Tag: scope:ai, type:core
Structure:
src/lib/
├── types/ # ReactiveValue, ComponentRef, PluginCategory, PlatformCapability, ChatMessage, etc.
├── interfaces/ # ChatPlugin interface, provider interfaces, resolution logic
├── plugins/
│ ├── context/ # rich-context, capabilities, suggestions
│ ├── intelligence/# model, agent, mastery, learning
│ ├── generation/ # generation, module-builder, teach, prompt-library
│ ├── bridge/ # computer-use-bridge, observatory, awareness
│ └── input/ # voice, action, context-legacy
├── composition/ # createStandardPluginSet() — platform-aware preset factory
└── utils/ # isChatPlugin(), getPluginCategory(), hasCapability()
2. @libs-ai/vitto-chat — Angular Adapter
Modified files (3 remain in plugins/):
index.ts— re-exports all 17 factories from chat-plugin-corechat-plugin.interface.ts— re-exports ChatPlugin typeplugin-presets.ts— Angular adapter wrappingPluginPresetConfig→StandardPluginSetConfig
Deleted: 17 old plugin .ts files (dead code after migration)
3. VSCode Extension v0.13.0
New files:
services/ide-tool.service.ts— 7 VSCode API toolsservices/agent-session.service.ts— SSE streaming + tool execution loopservices/context-provider.service.ts— IDE context gatheringpanels/webview/components/agent/agent-chat-view.ts— Lit chat componentpanels/webview/components/agent/agent-message.ts— Message rendererpanels/webview/components/agent/plugin-bridge.ts— Plugin import bridge
Modified:
main-panel.ts— Chat tab shell + agent message handlerstypes.ts— 13 new message types + IdeContext + IdeToolResultesbuild.mjs— Path alias plugin for @libs-* resolutiontsconfig.webview.json— Extends tsconfig.base.json + rootDir fixindex.ts— Mounts agent-chat-view in #pane-agent-chatpackage.json— Version bumped to 0.13.0
4. @libs-foundational/core-models
- Added IDE RouteContext values:
ide-editor,ide-terminal,ide-debug,ide-diff - Added
ide-assistantCapabilityContext - Updated ROUTE_TO_CAPABILITY mappings
What's NOT Done
| Item | Why | Next Session |
|---|---|---|
Backend /engine/agent-session SSE endpoint |
Not in scope — requires backend-vitto-api work | Recommended next |
| Keybindings (Cmd+Shift+V) | Polish, not blocking | P1 |
| DiffContentProvider | Enhanced diff preview for write approval | P1 |
| Extension package + install testing | Built & installed v0.13.0 but no end-to-end test with live backend | After backend endpoint |
| Git commits | Session ran concurrently with S254 — all changes uncommitted | Commit after merge coordination |
Critical Conventions Established
Angular barrel avoidance — Framework-agnostic libs must never import from Angular barrel exports. Define local types or provider interfaces instead.
Webview esbuild dual resolution — Both tsconfig.webview.json (extends base) AND esbuild alias plugin are mandatory. rootDir must be set to monorepo root.
Extension reinstall workflow — Always use
yarn ext:reinstall(runs build + package + install via proper Cursor CLI path).
Build Verification Commands
# All must pass:
npx tsc -p libs/libs-ai/chat-plugin-core/tsconfig.lib.json --noEmit
npx tsc -p libs/libs-ai/vitto-chat/tsconfig.lib.json --noEmit
npx tsc -p libs/libs-foundational/core-models/tsconfig.lib.json --noEmit
cd apps/vitto-vscode-extension && node esbuild.mjs
# Verify zero Angular imports in core:
grep -r "@angular" libs/libs-ai/chat-plugin-core/src/ # Should return nothing
# Verify zero .js artifacts leaked:
find libs/ -name "*.js" -newer tsconfig.base.json | head # Should return nothing
# Reinstall extension:
yarn ext:reinstall
Spec & Plan References
- Spec:
docs/superpowers/specs/2026-03-22-chat-plugin-core-and-native-vscode-chat-design.md - Plan:
docs/superpowers/plans/2026-03-22-chat-plugin-core-and-native-vscode-chat.md - Changelog:
apps/vitto-vscode-extension/CHANGELOG.md
MCP Decisions Logged
| ID | Type | Summary |
|---|---|---|
dev_1774285299880_tfisqdy |
architecture | Framework-agnostic plugin core extraction strategy |
dev_1774285314457_hi9j9ad |
architecture | Capability negotiation over static platform lists |
dev_1774285332221_3xteg9k |
bugfix | Angular compiler TS2353 error — wire vs stored type separation |
dev_1774285350425_wh1nuwi |
infrastructure | esbuild + tsconfig dual path resolution + rootDir fix |
dev_1774285370109_89fuihs |
convention | Angular barrel import avoidance in framework-agnostic libs |
All 5 decisions reported as successful outcomes. 2 conventions added. 7 lessons captured in reflection.