@cogitator-ai/tetsu 0.5.16 → 0.5.17

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 +14 -14
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -52,19 +52,19 @@ A run that waits on a slow tool or model can stay silent for longer than the `id
52
52
 
53
53
  A Tetsu controller named `Cogitator`: `operationId`s in the OpenAPI document are `cogitatorRunAgent`, `cogitatorGetThread` and so on.
54
54
 
55
- | Option | Type | Description |
56
- | -------------------- | ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
57
- | `cogitator` | `Cogitator` | **Required.** The runtime |
58
- | `agents` | `Record<string, Agent>` | Agents by name |
59
- | `workflows` | `Record<string, Workflow>` | Workflows by name |
60
- | `swarms` | `Record<string, SwarmConfig>` | Swarms by name |
61
- | `auth` | `(ctx) => AuthContext \| undefined` or hook | Establishes the caller, see [Authentication](#authentication) |
62
- | `authorizeThread` | `(auth, threadId) => boolean` | Decides who may use a memory thread, see [Users and threads](#users-and-threads) |
63
- | `websocket` | `boolean \| { path?: string }` | Serve the WebSocket endpoint (default path `/ws`) |
64
- | `until` | `AbortSignal \| (() => AbortSignal)` | Ends open streams and sockets, such as `draining` from `@tetsujs/lifecycle` |
65
- | `sseHeartbeatMs` | `number` | Heartbeat comment interval of SSE streams (default `5000`, `0` turns it off) |
66
- | `acceptContext` | `boolean \| string[]` | Keys of a run `context` clients may send: none by default, a list, or `true` for any (it goes into the system prompt) |
67
- | `threadMessageRoles` | `ThreadMessageRole[]` | Roles `POST /threads/:id/messages` accepts (default `user` and `assistant`) |
55
+ | Option | Type | Description |
56
+ | -------------------- | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
57
+ | `cogitator` | `Cogitator` | **Required.** The runtime |
58
+ | `agents` | `Record<string, Agent>` | Agents by name |
59
+ | `workflows` | `Record<string, Workflow>` | Workflows by name |
60
+ | `swarms` | `Record<string, SwarmConfig>` | Swarms by name |
61
+ | `auth` | `(ctx) => AuthContext \| undefined` or hook | Establishes the caller, see [Authentication](#authentication) |
62
+ | `authorizeThread` | `(auth, threadId) => boolean` | Decides who may use a memory thread, see [Users and threads](#users-and-threads) |
63
+ | `websocket` | `boolean \| { path?: string }` | Serve the WebSocket endpoint (default path `/ws`) |
64
+ | `until` | `AbortSignal \| (() => AbortSignal)` | Ends open streams and sockets, such as `draining` from `@tetsujs/lifecycle` |
65
+ | `sseHeartbeatMs` | `number` | Heartbeat comment interval of SSE streams (default `5000`, `0` turns it off) |
66
+ | `acceptContext` | `boolean \| string[]` | Keys of a run `context` clients may send: none by default, a list, or `true` for any (the model reads it as data from the application) |
67
+ | `threadMessageRoles` | `ThreadMessageRole[]` | Roles `POST /threads/:id/messages` accepts (default `user` and `assistant`) |
68
68
 
69
69
  ## Endpoints
70
70
 
@@ -112,7 +112,7 @@ Request bodies:
112
112
  { role: 'user' | 'assistant' | 'system'; content: string; metadata?: Record<string, unknown> } // system only with threadMessageRoles
113
113
  ```
114
114
 
115
- The schemas are refined with the validators every Cogitator adapter shares (`@cogitator-ai/server-shared`), so Tetsu refuses the same bodies as Express, Fastify, Hono, Koa and Next, under its own `VALIDATION_FAILED` envelope. A run puts `context` into the system prompt and the model reads a `system` thread message as operator instructions, so both are refused unless the controller accepts them: `acceptContext` lists the `context` keys clients may send (or `true` for any), and `threadMessageRoles` the roles they may add (`user` and `assistant` by default). A body that is not JSON (`text/plain`, a form) is refused with `415 UNSUPPORTED_MEDIA_TYPE` before it is read, since browsers send those across origins without a CORS preflight. `options.checkpoint: true` is refused: the controller runs each workflow on a fresh executor and keeps no checkpoint store to resume from.
115
+ The schemas are refined with the validators every Cogitator adapter shares (`@cogitator-ai/server-shared`), so Tetsu refuses the same bodies as Express, Fastify, Hono, Koa and Next, under its own `VALIDATION_FAILED` envelope. A run sends `context` to the model as data the application supplied and the model reads a `system` thread message as operator instructions, so both are refused unless the controller accepts them: `acceptContext` lists the `context` keys clients may send (or `true` for any), and `threadMessageRoles` the roles they may add (`user` and `assistant` by default). A body that is not JSON (`text/plain`, a form) is refused with `415 UNSUPPORTED_MEDIA_TYPE` before it is read, since browsers send those across origins without a CORS preflight. `options.checkpoint: true` is refused: the controller runs each workflow on a fresh executor and keeps no checkpoint store to resume from.
116
116
 
117
117
  `POST /agents/:name/run` and `/resume` answer `{ output, threadId, usage, toolCalls, status, traceId }` plus, when they apply, `reasoning`, `pendingApprovals`, `structured`, `structuredError`, `truncated`, `blocked` and `iterationLimitReached`: the same object as every other adapter, built by `toAgentRunResponse()` of `@cogitator-ai/server-shared`. It never carries the system prompt, the history, trace spans or the checkpoint of a paused run. Swarm routes close the swarm they build once the run ends, so a distributed swarm leaves no Redis connections behind, and `GET /swarms` lists every agent, a router and pipeline stages included.
118
118
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cogitator-ai/tetsu",
3
- "version": "0.5.16",
3
+ "version": "0.5.17",
4
4
  "description": "Tetsu server adapter for Cogitator AI runtime — a controller with agents, threads, workflows, swarms, SSE and WebSocket on Bun",
5
5
  "type": "module",
6
6
  "exports": {
@@ -20,10 +20,10 @@
20
20
  "bun": ">=1.4"
21
21
  },
22
22
  "dependencies": {
23
- "@cogitator-ai/core": "0.49.0",
24
- "@cogitator-ai/memory": "0.16.0",
25
- "@cogitator-ai/types": "0.51.0",
26
- "@cogitator-ai/server-shared": "0.5.16",
23
+ "@cogitator-ai/core": "0.50.0",
24
+ "@cogitator-ai/memory": "0.17.0",
25
+ "@cogitator-ai/types": "0.52.0",
26
+ "@cogitator-ai/server-shared": "0.5.17",
27
27
  "zod": "^4.6.5"
28
28
  },
29
29
  "peerDependencies": {
@@ -31,12 +31,12 @@
31
31
  "@tetsujs/sse": "^0.6.1"
32
32
  },
33
33
  "optionalDependencies": {
34
- "@cogitator-ai/workflows": "0.13.3",
35
- "@cogitator-ai/swarms": "0.13.3"
34
+ "@cogitator-ai/workflows": "0.13.4",
35
+ "@cogitator-ai/swarms": "0.13.4"
36
36
  },
37
37
  "devDependencies": {
38
- "@cogitator-ai/workflows": "0.13.3",
39
- "@cogitator-ai/swarms": "0.13.3",
38
+ "@cogitator-ai/workflows": "0.13.4",
39
+ "@cogitator-ai/swarms": "0.13.4",
40
40
  "@tetsujs/core": "^0.6.1",
41
41
  "@tetsujs/openapi": "^0.6.1",
42
42
  "@tetsujs/sse": "^0.6.1",