4 Commits
Author SHA1 Message Date
WylabbandClaude Opus 4.6 c183c68f12 Parse port from CLAW_WORKER_BIND_ADDR
Build TS Worker / build (push) Successful in 1m9s
CI / Typecheck & Lint (push) Failing after 1m44s
The gateway passes CLAW_WORKER_BIND_ADDR as "host:port" (e.g.
"0.0.0.0:8080"). Parse both from it instead of using a separate
CLAW_WORKER_PORT env var. Default to port 8080 to match the
gateway's DEFAULT_GATEWAY_WORKER_BIND_PORT.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 23:25:40 +02:00
WylabbandClaude Opus 4.6 a2d8e804db Use @anthropic-ai/sdk directly instead of QueryEngine
Build TS Worker / build (push) Successful in 3m58s
CI / Typecheck & Lint (push) Failing after 1m46s
Replace the QueryEngine-based engine with direct Anthropic SDK calls.
QueryEngine requires bun:bundle feature flags that only exist in
bundled builds, making it unusable in the Docker image. The SDK
works directly from source.

Also fix the Dockerfile: install curl and git for healthcheck and
app library, copy only src/worker/ instead of the entire tree.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:29:44 +02:00
WylabbandClaude Opus 4.6 1c2666db31 Add CI workflow to build and push TS worker image
Build TS Worker / build (push) Successful in 1m37s
CI / Typecheck & Lint (push) Failing after 1m48s
Builds src/worker/Dockerfile and pushes to
git.wylab.me/wylab/claw-ts-worker:latest on every push to main.
Same pattern as claw-code-parity's build-telegram.yml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 21:59:09 +02:00
WylabbandClaude Opus 4.6 388c7dbf6c Add TS worker implementing gateway-worker protocol
CI / Typecheck & Lint (push) Failing after 2m14s
Bun HTTP server that replaces the Rust worker surface with a
TypeScript implementation backed by Anthropic's QueryEngine.

Components:
- server.ts: full HTTP/SSE server matching worker-protocol/openapi.yaml
- engine/TelegramWorkerEngine.ts: QueryEngine wrapper for headless mode
- permissions/ApprovalBroker.ts: tool approval with session-scoped rules
- events/WorkerEventTranslator.ts: SDKMessage → WorkerTurnEvent mapping
- state/: TaskStore, TeamStore, FeedStore, AppLibraryStore (git-backed)
- protocol.ts + state/records.ts: wire types mirroring the Rust records
- Dockerfile + docker-compose for containerized deployment

The worker runs in stub mode when QueryEngine deps aren't available
(unbundled source) and switches to real engine mode after bun build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 20:13:22 +02:00