969502eba7
.vscode launch/tasks wire F5 -> Run Extension (preLaunchTask: npm build). README documents run/dev. Plan archived under docs/superpowers/plans/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
33 lines
1.2 KiB
Markdown
33 lines
1.2 KiB
Markdown
# vscode-cowriting-plugin
|
|
|
|
Non-shippable **proof-of-concept** (Feature #2 of Epic #1): a standalone VS Code
|
|
extension that drives **[`@cline/sdk`](https://www.npmjs.com/package/@cline/sdk)**
|
|
— validating Approach A (own coauthoring extension on the Cline SDK, no fork).
|
|
|
|
## What it does
|
|
|
|
Registers one command, **`Cowriting: Show Cline SDK Info`**, which loads
|
|
`@cline/sdk` and shows the SDK build version plus the agent's builtin tool
|
|
catalog (a pure, key-free SDK call) in a notification and the
|
|
"Cowriting (Cline SDK)" output channel.
|
|
|
|
## Architecture
|
|
|
|
- CommonJS extension bundled with esbuild (`src/extension.ts` → `out/extension.cjs`).
|
|
- `@cline/sdk` is ESM-only (Node ≥22) and uses `createRequire(import.meta.url)`,
|
|
so it is **not** bundled — it is shipped in `node_modules` and loaded at
|
|
runtime via dynamic `import()` from the vscode-free `src/cline.ts`.
|
|
|
|
## Run it (F5)
|
|
|
|
1. `npm install`
|
|
2. `npm run build`
|
|
3. Press **F5** (or Run → "Run Extension") to launch the Extension Development Host.
|
|
4. In the new window: **Cmd/Ctrl+Shift+P** → **"Cowriting: Show Cline SDK Info"**.
|
|
|
|
## Develop
|
|
|
|
- `npm run watch` — rebuild on change.
|
|
- `npm test` — run the unit test for the SDK driver.
|
|
- `npm run typecheck` — type-check without emit.
|