V0.1.3/m2/extension skeleton#4
Open
Vedansi18 wants to merge 1 commit into
Open
Conversation
Branch 1 of Milestone M2 (v0.1.3/m2/extension-skeleton). Establishes the
src/ext-vscode/ sub-package with an esbuild-driven build pipeline
(ESM source -> CJS bundle for the VS Code host), activates on
onStartupFinished, and ships the four scoped modules:
M1 - Skeleton: package.json (activationEvents, activity-bar container +
placeholder view backed by viewsWelcome so the icon actually renders),
tsconfig.json, esbuild.config.mjs, src/extension.ts entrypoint.
M5 - IPC stub: src/ipc.ts. spawnAuto(prompt, sessionId) and
spawnStop(sessionId) spawn the nexpath CLI as subprocesses and parse
the decision-session JSON payload from stdout, with typed errors
(NexpathBinaryNotFoundError, NexpathMalformedPayloadError) and
configurable binary-path resolution
(opts.binaryPath -> NEXPATH_BIN env -> 'nexpath' on PATH).
The exact stdin envelope vs. Layer C input contract is intentionally
a stub here; Branch 4 (cursor-windsurf-adapters) finalises it.
M11 - Onboarding: src/onboarding.ts. First-launch consent toast persists
the user's choice to globalState; on macOS, additionally shows a
Full-Disk-Access guidance toast that deep-links to the System
Settings privacy pane.
M12 - Icon: media/icon.svg. Y-fork (branching path) representing
"next path" decision points; monochrome currentColor, scalable.
25 unit tests co-located alongside source (8 onboarding, 11 ipc, 6 extension),
runnable via root vitest with vi.mock('vscode') stubs. Sub-package has its
own tsconfig + package-lock; root tsconfig now excludes src/ext-vscode/ so
each side owns its TS build. Both root and sub-package tsc --noEmit are
clean. Full root test suite: 1851 passing + 18 pre-existing unrelated
TtySelectFn Windows-sim failures (carried forward from dev plan §3.0).
Deferred (flagged for follow-up, not blockers for this branch):
- 5 moderate npm-audit warnings in the esbuild -> vite -> vitest dev chain
(dev-only; will be addressed during M5 hardening).
- IPC stdin envelope contract: real wiring lands in Branch 4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Establishes the
src/ext-vscode/sub-package — the companion VS Codeextension that wires Cursor and Windsurf into the existing nexpath
prompt-guidance pipeline. This is Branch 1 of Milestone M2; it lays the
foundation that subsequent branches (chat-history capture, webview UI,
adapters, smoke test, publish + cross-OS verify) build on. No Layer C
code is touched —
nexpath-serve,auto,stop, the SQLite store,the classifier, and the decision-session generator are all untouched.
Modules covered (per dev plan §3 M2 §2.2)
package.json,tsconfig.json,esbuild.config.mjs,src/extension.tsonStartupFinished; esbuild bundles ESM source → CJS for the VS Code host.viewsWelcomeso the icon actually renders in Cursor.src/ipc.tsspawnAuto(prompt, sessionId)+spawnStop(sessionId)spawn the nexpath CLI and parse the decision-session JSON payload from stdout. Typed errorsNexpathBinaryNotFoundError,NexpathMalformedPayloadError) + binary-path resolution chain (opts.binaryPath→NEXPATH_BINenv →'nexpath'on PATH). Stub-level — Branch 4 finalises the Layer Csrc/onboarding.tsglobalState). On macOS, additionally shows a Full-Disk-Access guidance toast that deep-links to System Settings →media/icon.svgcurrentColor, all straight lines + circles, scalable to 16×16.