@mercury-fw/channel-http 0.15.0 → 0.15.1

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,17 @@
1
1
  # @mercury-fw/channel-http
2
2
 
3
+ ## 0.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 9e2fbe4: - the verbatim archive keeps, with each answer, what its turn showed besides the text, as `trace`: reasoning blocks, tool status lines with their outcome, confirmations staged, logins asked for (no tokens, no login links)
8
+ - a stopped turn's interrupted answer keeps its `trace` up to the stop
9
+ - an answer that only staged an action keeps its `pendingNote`
10
+ - a resolved confirmation is archived in its conversation as a message with `confirmation: { id, status, choice? }`, its `content` the reply the person got
11
+ - `GET /conversation` returns `trace`, `pendingNote` and `confirmation`; `recall_verbatim` and a conversation rebuilt from the archive leave them out
12
+ - `ConfirmDeps.onResolved` (`@mercury-fw/confirm-engine`): told how a staged action was resolved
13
+ - `openapi.yaml`: `Message.trace`, `Message.pendingNote`, `Message.confirmation`, `TraceEntry`
14
+
3
15
  ## 0.15.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -107,7 +107,7 @@ 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, 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 |
110
+ | `GET /conversation?id=<conversationId>&limit=<n>&offset=<cursor>` | `{ messages: [{ role, content, interrupted?, trace?, pendingNote?, confirmation?, 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. An answer's `trace` is what its turn showed besides the text, in order, as the events above showed it: each reasoning block in full, each status line with its tool and outcome, each confirmation staged (its command and its choices' labels, named by an `id`, never a token), each login asked for (its service, never the link); up to the stop for a cancelled turn. `pendingNote` is the turn's `final` one. A message with `confirmation: { id, status, choice? }` says how the staged action with that `id` (its trace entry) was resolved (`ok`, `failed`, or `resume`, whose answer is the next message): its `content` is the reply you got, empty for `resume`. Answers archived before these fields have none of them. `400` if `id` is missing or has other characters than `/turn` accepts |
111
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 |
package/openapi.yaml CHANGED
@@ -262,7 +262,7 @@ paths:
262
262
  "503":
263
263
  $ref: "#/components/responses/NotAdmitted"
264
264
  "200":
265
- description: The conversation's messages in chronological order; none when it isn't one of the caller's.
265
+ description: The conversation's messages in chronological order, each answer with what its turn showed besides the text; none when it isn't one of the caller's.
266
266
  content:
267
267
  application/json:
268
268
  schema:
@@ -830,9 +830,93 @@ components:
830
830
  type: boolean
831
831
  enum: [true]
832
832
  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."
833
+ trace:
834
+ type: array
835
+ description: >
836
+ On an answer: what the person saw of the turn besides its text, in
837
+ the order it happened, as the turn's events showed it (up to the
838
+ stop, for an interrupted one). Absent when there was nothing, and
839
+ on answers archived before it was kept.
840
+ items:
841
+ $ref: "#/components/schemas/TraceEntry"
842
+ pendingNote:
843
+ type: string
844
+ description: >
845
+ On an answer whose model wrote nothing because the turn staged an
846
+ action: the core's stand-in sentence `content` begins with, as the
847
+ turn's `final` event gave it. A UI showing the confirmation from
848
+ the trace hides it.
849
+ confirmation:
850
+ type: object
851
+ description: >
852
+ On the message saying how a staged action was resolved (a token
853
+ sent back, a choice clicked): `content` is the reply the person
854
+ got, empty when the confirmed action's result went back to the
855
+ model (`resume`), whose answer is the next message. `id` is the
856
+ one of the trace's `confirmation` entry it resolves, which says
857
+ what the action was.
858
+ required: [id, status]
859
+ properties:
860
+ id:
861
+ type: string
862
+ status:
863
+ type: string
864
+ enum: [ok, failed, resume]
865
+ choice:
866
+ type: string
867
+ description: The label of the choice taken, when the action was offered as several.
833
868
  timestamp:
834
869
  type: string
835
870
  description: ISO 8601, millisecond precision — the durable ordering key.
871
+ TraceEntry:
872
+ type: object
873
+ description: >
874
+ One thing a turn showed besides its text. `reasoning`: a reasoning
875
+ block in full, `failed` when it was cut. `tool`: a status line, with
876
+ the tool the model called (`name`, absent for Mercury's own lines) and
877
+ how it went (`outcome`, absent when it never finished). `confirmation`:
878
+ an action staged, with the labels of its choices (one empty label for a
879
+ plain confirmation); `id` names it, never its token. `login`: a login
880
+ asked for, by service, never its link.
881
+ required: [type]
882
+ properties:
883
+ type:
884
+ type: string
885
+ enum: [reasoning, tool, confirmation, login]
886
+ text:
887
+ type: string
888
+ description: On `reasoning`.
889
+ failed:
890
+ type: boolean
891
+ enum: [true]
892
+ description: On `reasoning`.
893
+ label:
894
+ type: string
895
+ description: On `tool`.
896
+ detail:
897
+ type: string
898
+ description: On `tool`.
899
+ name:
900
+ type: string
901
+ description: On `tool`.
902
+ outcome:
903
+ type: string
904
+ enum: [success, failed, pending]
905
+ description: On `tool`.
906
+ id:
907
+ type: string
908
+ description: On `confirmation`.
909
+ command:
910
+ type: string
911
+ description: On `confirmation`.
912
+ choices:
913
+ type: array
914
+ items:
915
+ type: string
916
+ description: On `confirmation`.
917
+ service:
918
+ type: string
919
+ description: On `login`.
836
920
  ConversationPage:
837
921
  type: object
838
922
  required: [ok, messages]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercury-fw/channel-http",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,8 +21,8 @@
21
21
  "@mercury-fw/channel-types": ">=0.68.0 <1.0.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@mercury-fw/channel-types": "0.68.0",
25
- "@mercury-fw/plugin-types": "0.68.0",
24
+ "@mercury-fw/channel-types": "0.69.0",
25
+ "@mercury-fw/plugin-types": "0.69.0",
26
26
  "@mercury-fw/typescript-config": "*",
27
27
  "@types/bun": "^1.4.2",
28
28
  "typescript": "^6.0.3"