@taskcast/server
v0.1.2
Published
Hono HTTP server — REST + SSE + auth + webhooks for Taskcast.
Downloads
273
Readme
@taskcast/server
Hono HTTP server for Taskcast — REST API, SSE streaming, JWT auth, and webhook delivery.
Install
pnpm add @taskcast/server @taskcast/coreUsage
import { TaskEngine, MemoryBroadcastProvider, MemoryShortTermStore } from '@taskcast/core'
import { createTaskcastApp } from '@taskcast/server'
const engine = new TaskEngine({
broadcast: new MemoryBroadcastProvider(),
shortTermStore: new MemoryShortTermStore(),
})
const app = createTaskcastApp({ engine })
// Mount to your existing Hono app or serve directly
export default appWith JWT Auth
const app = createTaskcastApp({
engine,
auth: {
mode: 'jwt',
jwt: {
algorithm: 'HS256',
secret: process.env.JWT_SECRET,
},
},
})API Endpoints
| Method | Path | Description |
|--------|------|-------------|
| POST | /tasks | Create a task |
| GET | /tasks/:taskId | Get task status and metadata |
| PATCH | /tasks/:taskId/status | Transition task status |
| DELETE | /tasks/:taskId | Delete a task |
| POST | /tasks/:taskId/events | Publish event(s) |
| GET | /tasks/:taskId/events | Subscribe via SSE |
| GET | /tasks/:taskId/events/history | Query event history |
Part of Taskcast
This is the HTTP server package. See the Taskcast monorepo for the full project.
