proto-socket/typescript
2026-05-21 09:52:41 +09:00
..
crosstest 기능: TypeScript 패키지를 devDependencies로 통합하고 WebSocket 기능을 개선했다 2026-05-20 11:22:04 +09:00
src chore: update typescript ws client/test and add agent-task docs 2026-05-21 09:52:41 +09:00
test chore: update typescript ws client/test and add agent-task docs 2026-05-21 09:52:41 +09:00
.gitignore feat: add typescript implementation and crosstest files 2026-04-24 07:16:37 +09:00
CROSSTEST_CHECKLIST.md feat: add typescript implementation and crosstest files 2026-04-24 07:16:37 +09:00
IMPLEMENTATION_CHECKLIST.md feat: add typescript implementation and crosstest files 2026-04-24 07:16:37 +09:00
package-lock.json 기능: TypeScript 패키지를 devDependencies로 통합하고 WebSocket 기능을 개선했다 2026-05-20 11:22:04 +09:00
package.json 기능: TypeScript 패키지를 devDependencies로 통합하고 WebSocket 기능을 개선했다 2026-05-20 11:22:04 +09:00
README.md 기능: TypeScript 패키지를 devDependencies로 통합하고 WebSocket 기능을 개선했다 2026-05-20 11:22:04 +09:00
tsconfig.json 기능: 브라우저 WebSocket 진입점을 추가한다 2026-05-20 07:30:53 +09:00

TypeScript Proto Socket

Status: planned

This package implements Proto Socket protocol version 0.1 for TypeScript.

Scope

  • Runtime targets: Node.js TCP, Node.js WebSocket, browser native WebSocket.
  • Browser entrypoint (proto-socket): Communicator, BaseClient, BrowserWsClient, connectBrowserWs. Has no ws, node:*, or Buffer dependency.
  • Node entrypoint (proto-socket/node): all of the above plus TcpClient/TcpServer, NodeWsClient/NodeWsServer, connectNodeWs/connectNodeWss using Node.js built-ins.

Import

// browser
import { connectBrowserWs } from "proto-socket";

// node
import { connectNodeWs, NodeWsServer, TcpClient } from "proto-socket/node";

Runtime Dependencies

The TypeScript runtime has no non-protobuf package dependencies. The current canonical message codec and Node.js TCP/TLS/WebSocket transports are implemented with native platform APIs, so this package has no runtime dependencies at all.

Proto Sync

The canonical schema lives in ../proto/message_common.proto. The TypeScript packet codec in src/packets/ must stay wire-compatible with that schema. After proto changes, run from the repository root:

tools/check_proto_sync.sh

Validation

cd typescript
npx tsc --noEmit
npx vitest run
cd go
go run ./crosstest/go_typescript.go