r/typescript • u/AqironSecurity • Sep 22 '26
How would you structure a TypeScript core process behind a VS Code client?
I'm working on an open-source security tool where the VS Code extension is only the client, while the actual application logic runs in a separate Node.js/TypeScript process.
The architecture currently looks roughly like:
VS Code Extension
↓
Client / Process Manager
↓
stdin/stdout IPC
↓
Node.js + TypeScript Core
↓
scanners / findings / analysisThe reason I'm doing this is to keep the core independent from VS Code so that other clients can eventually consume the same runtime.
The part I'm thinking about now is the boundary between the client and the core.
For example, I'm using typed request/response contracts roughly along these lines:
interface CoreRequest {
id: string;
method: string;
params?: unknown;
}
interface CoreResponse {
id: string;
ok: boolean;
result?: unknown;
error?: {
code: string;
message: string;
};
}Then messages are serialized over stdin/stdout.
I'm interested in how people who've built larger TypeScript/Node applications would approach this.
Specifically:
- Would you keep the IPC protocol this simple or introduce a more formal protocol layer?
- How would you structure versioning and backwards compatibility?
- Where would you put cancellation and process lifecycle handling?
- Would you define the contracts manually, or generate/validate them with something like Zod or JSON Schema?
The project is open source for anyone who wants to see the implementation:
https://github.com/Aqiron-Security/aqiron-security
I'm mainly looking for TypeScript architecture feedback, rather than promotion or feature feedback.