@taskcast/client 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 +48 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # @taskcast/client
2
+
3
+ Browser SSE subscription client for [Taskcast](https://github.com/weightwave/taskcast). Subscribe to task event streams with automatic reconnection and cursor-based resumption.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @taskcast/client
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { TaskcastClient } from '@taskcast/client'
15
+
16
+ const client = new TaskcastClient({
17
+ baseUrl: 'http://localhost:3721',
18
+ token: 'your-jwt-token', // optional
19
+ })
20
+
21
+ await client.subscribe(taskId, {
22
+ filter: {
23
+ types: ['llm.*'],
24
+ since: { index: 0 },
25
+ },
26
+ onEvent: (envelope) => {
27
+ console.log(envelope.data) // { text: "Once upon a time..." }
28
+ },
29
+ onDone: (reason) => {
30
+ console.log(`Task ${reason}`) // "Task completed"
31
+ },
32
+ })
33
+ ```
34
+
35
+ ## Features
36
+
37
+ - SSE-based real-time event streaming
38
+ - Wildcard type filtering (`llm.*`, `tool.call`)
39
+ - Cursor-based resumption (by event ID, index, or timestamp)
40
+ - Automatic reconnection on disconnect
41
+
42
+ ## Part of Taskcast
43
+
44
+ This is the browser client package. See the [Taskcast monorepo](https://github.com/weightwave/taskcast) for the full project. For React integration, see [`@taskcast/react`](https://www.npmjs.com/package/@taskcast/react).
45
+
46
+ ## License
47
+
48
+ [MIT](https://github.com/weightwave/taskcast/blob/main/LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taskcast/client",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Browser SSE subscription client for Taskcast.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "eventsource-parser": "^2.0.1",
32
- "@taskcast/core": "0.1.1"
32
+ "@taskcast/core": "0.1.2"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "^5.7.0",