Skip to content

[Planning][P2] TypeScript SDK for agent-rpc and sandbox IPC #104

Description

@EXboys

Summary

SkillLite ships a Python SDK (python-sdk/) that wraps the local skilllite binary via IPC (skilllite serve --stdio) and subprocess. The Rust agent-rpc module explicitly targets Python/TypeScript SDKs as consumers:

"This module belongs to the agent layer … It provides a transport-agnostic RPC interface for Python/TypeScript SDKs to call the Rust agent engine."
crates/skilllite-agent/src/rpc.rs

There is no first-party TypeScript/JavaScript SDK today. Node/TS integrators (Next.js apps, Electron sidecars, LangChain.js, custom agents) must hand-roll JSON-Lines parsing over stdio.

Goals

Capability Mechanism Notes
Sandbox skilllite serve --stdio JSON-RPC 2.0 scan_code, execute_code, run_skill, list_skills
Agent chat skilllite agent-rpc JSON-Lines Streaming events: text_chunk, tool_call, confirmation_request, done, …
Artifacts HTTP client artifact_put / artifact_get against gateway or artifact-serve
Binary management Same as Python Resolve/install skilllite binary, version check

Proposed deliverables

  1. @skilllite/sdk (or skilllite on npm) — typed client with:
    • SkillLiteClient for sandbox IPC
    • AgentRpcClient for streaming agent chat + confirm/clarify round-trips
    • Event iterator / async generator for JSON-Lines stream
  2. Protocol types — shared with optional skilllite-client Rust crate (see Assistant split P3)
  3. Examples — minimal chat bot, MCP-adjacent tool runner, artifact upload
  4. CI — contract tests against pinned skilllite release binary (golden fixtures)

Acceptance criteria

  • npm package published (or documented monorepo path under typescript-sdk/)
  • Sandbox IPC: scan_code, execute_code, run_skill covered with tests
  • Agent RPC: streaming agent_chat + confirm/clarify round-trip covered
  • README with install + quickstart (EN; link to zh docs)
  • Parity matrix documented vs Python SDK (what is/isn't supported)

Non-goals (initial release)

  • Bundling the Rust binary inside the npm package (document install/PATH flow instead)
  • Reimplementing sandbox logic in TypeScript

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackendenhancementNew feature or requestjavascriptPull requests that update javascript code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions