
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
@cspell/rpc
Advanced tools
A basic client / server RPC for sending the requests over a MessagePort.
This supports Node Worker Threads, Web Workers, or anything that can provide a MessagePortLike interface.
The client and server communicate by sending messages over the MessagePort.
export interface RPCMessage {
sig: 'RPC0';
/**
* A Unique identifier for the request/response.
* Ideally this is a randomUUID.
*/
id: RequestID;
/**
* The type of message being sent.
*/
type: 'request' | 'response' | 'cancel' | 'canceled' | 'ok' | 'ready';
}
export type RPCRequestType = 'request' | 'cancel' | 'ok' | 'ready';
export type RPCResponseType = 'response' | 'canceled' | 'ok' | 'ready';
There are two types of messages: Request and Response. The client sends requests and the server sends responses.
sequenceDiagram
participant C as Client
participant S as Server
participant W as Worker
C->>+S: Request <id>
S->>+W: Method
W->>-S: Result
S->>-C: Response <id>, Result
sequenceDiagram
participant C as Client
participant S as Server
participant W as Worker
C->>+S: Request <id>, ACK
S->>C: ACK <id>
S->>+W: Method
W->>-S: Result
S->>-C: Response <id>, Result
sequenceDiagram
participant C as Client
participant S as Server
participant W as Worker
C->>+S: Request <id>, ACK
S->>C: ACK <id>
S->>+W: Method
W->>-S: Error
S->>-C: Response <id>, Error
This request is used to check if the server is ok.
sequenceDiagram
Client->>Server: OK <id>?
Server->>Client: OK <id>, Code 200
A cancellation request is used to cancel or abort a request. The server accepts the request and acknowledges that it was received. It does not wait
sequenceDiagram
participant C as Client
participant S as Server
participant W as Worker
C->>+S: Request <id>
S->>+W: Method
C->>S: Cancel <id>
S->>-C: Canceled <id>
S--xW: Cancel
W--x-S: Canceled
sequenceDiagram
participant C as Client
participant S as Server
participant W as Worker
C->>+S: Request <id>
S->>+W: Method
C->>S: Cancel <id>, Wait
S--xW: Cancel
W-->>-S: Canceled
S->>-C: Canceled <id>
It can happen that the server needs to cancel requests. This can happen if the server is getting disposed and still has pending requests. It has a couple of ways to do this:
sequenceDiagram
participant C as Client
participant S as Server
participant W as Worker
C->>+S: Request <id>
S->>+W: Method
W--x-S: Canceled
S->>-C: Canceled <id>
An abort request is the same as a Cancel request, only the client will not wait on a response and the response will be ignored.
sequenceDiagram
participant C as Client
participant S as Server
C->>S: Request <id>
C-->>S: Cancel <id>
S--xC: Canceled <id>
FAQs
Type Safe RPC library.
The npm package @cspell/rpc receives a total of 595,002 weekly downloads. As such, @cspell/rpc popularity was classified as popular.
We found that @cspell/rpc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.