
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
transport agnostic strongly typed duplex rpc interfaces
npm i alice-bob
|
pnpm add alice-bob
|
yarn add alice-bob
|
Alice
– Alice class.
local
– The local Agent.{
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
}
agents
(local, remote) – Returns the agents tuple [alice, bob]
.
Example:
const [alice, bob] = new Alice<Local, Remote>().agents()
// to enable debugging on local (alice)
const [alice, bob] = new Alice<Local, Remote>().agents({ debug: true })
// use different names:
const [alice, bob] = new Alice<Local, Remote>().agents(
{ name: 'server', debug: true },
{ name: 'client' }
)
agents(local, remote) =>
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
}, Agent<B, A> ]
AliceBob
– AliceBob class.
local
– The local Agent.{
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
}
agents
(local, remote) – Returns the agents tuple [alice, bob]
.
Example:
const [alice, bob] = new Alice<Local, Remote>().agents()
// to enable debugging on local (alice)
const [alice, bob] = new Alice<Local, Remote>().agents({ debug: true })
// use different names:
const [alice, bob] = new Alice<Local, Remote>().agents(
{ name: 'server', debug: true },
{ name: 'client' }
)
agents(local, remote) =>
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
}, Agent<B, A> ]
Bob
– Bob class.
local
– The local Agent.{
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
}
agents
(local, remote) – Returns the agents tuple [alice, bob]
.
Example:
const [alice, bob] = new Alice<Local, Remote>().agents()
// to enable debugging on local (alice)
const [alice, bob] = new Alice<Local, Remote>().agents({ debug: true })
// use different names:
const [alice, bob] = new Alice<Local, Remote>().agents(
{ name: 'server', debug: true },
{ name: 'client' }
)
agents(local, remote) =>
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
}, Agent<B, A> ]
Agent
– Agent.{
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
All contributions are welcome!
FAQs
transport agnostic strongly typed duplex rpc interfaces
The npm package alice-bob receives a total of 17 weekly downloads. As such, alice-bob popularity was classified as not popular.
We found that alice-bob demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.