@taskcast/server 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +61 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # @taskcast/server
2
+
3
+ Hono HTTP server for [Taskcast](https://github.com/weightwave/taskcast) — REST API, SSE streaming, JWT auth, and webhook delivery.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @taskcast/server @taskcast/core
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { TaskEngine, MemoryBroadcastProvider, MemoryShortTermStore } from '@taskcast/core'
15
+ import { createTaskcastApp } from '@taskcast/server'
16
+
17
+ const engine = new TaskEngine({
18
+ broadcast: new MemoryBroadcastProvider(),
19
+ shortTermStore: new MemoryShortTermStore(),
20
+ })
21
+
22
+ const app = createTaskcastApp({ engine })
23
+
24
+ // Mount to your existing Hono app or serve directly
25
+ export default app
26
+ ```
27
+
28
+ ### With JWT Auth
29
+
30
+ ```typescript
31
+ const app = createTaskcastApp({
32
+ engine,
33
+ auth: {
34
+ mode: 'jwt',
35
+ jwt: {
36
+ algorithm: 'HS256',
37
+ secret: process.env.JWT_SECRET,
38
+ },
39
+ },
40
+ })
41
+ ```
42
+
43
+ ## API Endpoints
44
+
45
+ | Method | Path | Description |
46
+ |--------|------|-------------|
47
+ | `POST` | `/tasks` | Create a task |
48
+ | `GET` | `/tasks/:taskId` | Get task status and metadata |
49
+ | `PATCH` | `/tasks/:taskId/status` | Transition task status |
50
+ | `DELETE` | `/tasks/:taskId` | Delete a task |
51
+ | `POST` | `/tasks/:taskId/events` | Publish event(s) |
52
+ | `GET` | `/tasks/:taskId/events` | Subscribe via SSE |
53
+ | `GET` | `/tasks/:taskId/events/history` | Query event history |
54
+
55
+ ## Part of Taskcast
56
+
57
+ This is the HTTP server package. See the [Taskcast monorepo](https://github.com/weightwave/taskcast) for the full project.
58
+
59
+ ## License
60
+
61
+ [MIT](https://github.com/weightwave/taskcast/blob/main/LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taskcast/server",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Hono HTTP server — REST + SSE + auth + webhooks for Taskcast.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,7 +31,7 @@
31
31
  "hono": "^4.6.0",
32
32
  "jose": "^5.9.0",
33
33
  "zod": "^3.23.0",
34
- "@taskcast/core": "0.1.1"
34
+ "@taskcast/core": "0.1.2"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@hono/node-server": "^1.19.9",
@@ -40,7 +40,7 @@
40
40
  "testcontainers": "^10.13.0",
41
41
  "typescript": "^5.7.0",
42
42
  "vitest": "^2.1.0",
43
- "@taskcast/redis": "0.1.1"
43
+ "@taskcast/redis": "0.1.2"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "tsc",