@mercury-fw/channel-http 0.14.0 → 0.14.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @mercury-fw/channel-http
2
2
 
3
+ ## 0.14.2
4
+
5
+ ### Patch Changes
6
+
7
+ - c4f4fd3: - a cancelled turn is archived: the person's message, then an answer marked `interrupted`
8
+ - `reads.conversation`: an interrupted answer comes with `interrupted: true` and an empty `content`
9
+ - `reads.conversations`: the preview skips an interrupted answer
10
+ - `GET /conversation` documents `interrupted` on `Message`
11
+
12
+ ## 0.14.1
13
+
14
+ ### Patch Changes
15
+
16
+ - 9b2e1bf: - README: `GET /version` describes the app's version without saying how the app moves it.
17
+
3
18
  ## 0.14.0
4
19
 
5
20
  ### Minor Changes
package/README.md CHANGED
@@ -60,7 +60,7 @@ Runs one conversational turn; the reply streams back as Server-Sent Events.
60
60
 
61
61
  **Time zone.** The model reads each message with the time the person wrote it, in their time zone: the one they saved, else the one the request's `X-Time-Zone` header names (an IANA name such as `Europe/Rome`, what `Intl.DateTimeFormat().resolvedOptions().timeZone` gives in a browser), else the app's. A UI saves the person's with `PATCH /me`.
62
62
 
63
- Reasoning and answer text arrive as **incremental deltas** — never one finished block — so a UI renders them live; treat the `final` event as the authoritative text. **To cancel** a turn (e.g. a generation that's diverging), close the connection: Mercury aborts the in-flight generation.
63
+ Reasoning and answer text arrive as **incremental deltas** — never one finished block — so a UI renders them live; treat the `final` event as the authoritative text. **To cancel** a turn (e.g. a generation that's diverging), close the connection: Mercury aborts the in-flight generation. Any connection that closes mid-turn cancels it, a page reload included. Nothing of the half answer is kept: once the model was answering, the conversation's transcript keeps your message and an answer marked `interrupted` (see `GET /conversation`); an opening, or a turn still waiting behind another, leaves nothing.
64
64
 
65
65
  **SSE events** — each is `event: <name>` followed by `data: <json>`:
66
66
 
@@ -107,8 +107,8 @@ All `GET`, all JSON, all reporting state already held in-process. They need an a
107
107
 
108
108
  | endpoint | `data` on success |
109
109
  |---|---|
110
- | `GET /conversation?id=<conversationId>&limit=<n>&offset=<cursor>` | `{ messages: [{ role, content, timestamp }], nextOffset }` — one of your conversations, its durable transcript in order, each answer as you saw it with the lists it showed (empty for an id that isn't yours); `400` if `id` is missing or has other characters than `/turn` accepts |
111
- | `GET /conversations?limit=<n>` | `{ conversations: [{ conversationId, lastTimestamp, preview }] }` — your conversations, most-recently-active first |
110
+ | `GET /conversation?id=<conversationId>&limit=<n>&offset=<cursor>` | `{ messages: [{ role, content, interrupted?, timestamp }], nextOffset }` — one of your conversations, its durable transcript in order, each answer as you saw it with the lists it showed (empty for an id that isn't yours). An answer whose turn was cancelled has `interrupted: true` and an empty `content`: the question before it was left unanswered. `400` if `id` is missing or has other characters than `/turn` accepts |
111
+ | `GET /conversations?limit=<n>` | `{ conversations: [{ conversationId, lastTimestamp, preview }] }` — your conversations, most-recently-active first; the preview is the newest message that shows something, so the question when the last answer was interrupted |
112
112
  | `GET /manifest` | `{ manifest: { coreApiVersion, plugins: [{ name, apiVersion, active, skills, hasBuild, customStatus }], activeClis, skills } }` |
113
113
  | `GET /confirmations` | `{ pending: [{ sessionKey, summary, expiresAt }] }` — your pending confirmations; tokens are deliberately never included |
114
114
  | `GET /me` | `{ name, language, timeZone }` — how you asked the assistant to call you, the language you asked it to use and the time zone you saved, `null` when you never said; `language` and `timeZone` are missing on a core that doesn't know them, and the route isn't there on a core older than this channel |
@@ -117,11 +117,11 @@ All `GET`, all JSON, all reporting state already held in-process. They need an a
117
117
  | `GET /wiki/list` | `{ files: [...] }` — `curated/...` and `personal/...` paths |
118
118
  | `GET /wiki/read?path=<path>` | `{ content }` — a path as `/wiki/list` gives it; `400` if `path` is missing, `404` if it isn't among yours |
119
119
  | `GET /wiki/grep?pattern=<regex>` | `{ matches: [...] }` — `400` if `pattern` is missing |
120
- | `GET /memory/scroll?collection=<name>&limit=<n>&offset=<cursor>` | one page of your points in a collection kept per person (verbatim archive, episodic memory, semantic facts), each with its whole payload (a verbatim answer's `displays` and `calls` included); `400` for any other collection |
120
+ | `GET /memory/scroll?collection=<name>&limit=<n>&offset=<cursor>` | one page of your points in a collection kept per person (verbatim archive, episodic memory, semantic facts), each with its whole payload (a verbatim answer's `displays` and `calls` included, and an interrupted answer's `interrupted: true` with the note the model gets in its `content`); `400` for any other collection |
121
121
  | `GET /openapi.yaml` | the OpenAPI document for this surface (`text/yaml`) |
122
122
 
123
123
  Conversation history and the conversation list are backed by the durable verbatim archive; they degrade to empty when the vector store is unreachable.
124
124
 
125
125
  ## `GET /version`
126
126
 
127
- Which Mercury this is, for a UI to show: `{ ok: true, version }`, the framework's version as `major.minor.patch` (`"0.59.0"`), the one of `@mercury-fw/core`, not this channel's own. When the app's config declares its own version (`version` in `mercury.config.ts`, its `package.json`'s, as a scaffolded app does), it comes too, as it is: `{ ok: true, version: "0.65.0", app: { version: "1.2.0" } }`. The app moves that number itself, and a new one shows once the app is rebuilt. It needs no token, so anyone who reaches the port sees both.
127
+ Which Mercury this is, for a UI to show: `{ ok: true, version }`, the framework's version as `major.minor.patch` (`"0.59.0"`), the one of `@mercury-fw/core`, not this channel's own. When the app's config declares its own version (`version` in `mercury.config.ts`, its `package.json`'s, as a scaffolded app does), it comes too, as it is: `{ ok: true, version: "0.65.0", app: { version: "1.2.0" } }`. A new one shows once the app is rebuilt. It needs no token, so anyone who reaches the port sees both.
package/openapi.yaml CHANGED
@@ -825,6 +825,10 @@ components:
825
825
  content:
826
826
  type: string
827
827
  description: The message as the person saw it. For an answer, the lists the turn showed after it are included, as in the turn's `final` text.
828
+ interrupted:
829
+ type: boolean
830
+ enum: [true]
831
+ description: "On an answer whose turn was stopped before it was finished (the client closed the stream): `content` is empty. The question before it was left unanswered."
828
832
  timestamp:
829
833
  type: string
830
834
  description: ISO 8601, millisecond precision — the durable ordering key.
@@ -853,6 +857,7 @@ components:
853
857
  type: string
854
858
  preview:
855
859
  type: string
860
+ description: The newest message that shows something, as the person saw it, so the question when the last answer was interrupted.
856
861
  ConversationList:
857
862
  type: object
858
863
  required: [ok, conversations]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercury-fw/channel-http",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,8 +21,8 @@
21
21
  "@mercury-fw/channel-types": ">=0.65.0 <1.0.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@mercury-fw/channel-types": "0.65.0",
25
- "@mercury-fw/plugin-types": "0.65.0",
24
+ "@mercury-fw/channel-types": "0.67.0",
25
+ "@mercury-fw/plugin-types": "0.67.0",
26
26
  "@mercury-fw/typescript-config": "*",
27
27
  "@types/bun": "^1.4.2",
28
28
  "typescript": "^6.0.3"