@dexh/shannon-agent-sdk
v0.0.1
Published
Claude Agent SDK-compatible facade for Shannon.
Maintainers
Readme
@dexh/shannon-agent-sdk
Claude Agent SDK-compatible facade for Shannon. It
re-exports Shannon's implemented SDK surface from @dexh/shannon.
Full Claude Agent SDK parity is a work in progress (see the repo's
GOAL_PROGRESS.md).
Requirements
- Bun
claudeonPATHtmuxonPATH- A working Claude Code login/configuration
Install
npm install @dexh/shannon-agent-sdkThe Shannon CLI is also available via npx:
npx @dexh/shannon -p "Reply with exactly: hello" --output-format=stream-json --verboseSDK usage
import { query } from "@dexh/shannon-agent-sdk";
for await (const message of query({
prompt: "Reply with exactly: hello",
options: {
outputFormat: "stream-json",
verbose: true,
},
})) {
console.log(JSON.stringify(message));
}Async input is also accepted for finite user-message streams:
import { query, type ShannonUserMessage } from "@dexh/shannon-agent-sdk";
async function* messages(): AsyncIterable<ShannonUserMessage> {
yield {
type: "user",
message: {
role: "user",
content: [{ type: "text", text: "Reply with exactly: hello" }],
},
parent_tool_use_id: null,
session_id: "",
};
}
for await (const message of query({ prompt: messages() })) {
console.log(JSON.stringify(message));
}Zod schemas for the current Shannon message, options, and query parameter surface are also re-exported:
import { shannonMessageSchema, shannonQueryOptionsSchema } from "@dexh/shannon-agent-sdk";