@mercury-fw/channel-http 0.14.2 → 0.15.0

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,16 @@
1
1
  # @mercury-fw/channel-http
2
2
 
3
+ ## 0.15.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 148417b: - a step whose tool asks the person to log in ends the turn: no further tool calls
8
+ - the turn's text closes with `core.login.note`, naming the services to log in to (`core.login.note-any` when none has a name)
9
+ - `detectLoginRequests(step)` in `@mercury-fw/channel-types`: every login a step asks for, one per link
10
+ - HTTP channel: one `login` event per service the step asks for
11
+ - Google Chat: one login card per service the step asks for
12
+ - **Migration:** apps with their own locale files add `core.login.note` (`{services}`) and `core.login.note-any` to each non-English one
13
+
3
14
  ## 0.14.2
4
15
 
5
16
  ### Patch Changes
package/README.md CHANGED
@@ -72,7 +72,7 @@ Reasoning and answer text arrive as **incremental deltas** — never one finishe
72
72
  | `tool_finish` | `{ toolCallId, outcome }` | a tool call settles (`outcome`: `success` \| `failed` \| `pending`) |
73
73
  | `text` | `{ chunk }` | an answer-text delta |
74
74
  | `pending` | `{ command, token, choices }` | a confirm-required action was staged; send a token back to confirm it — as a later `/turn` `text`, or via `POST /confirm`. `choices` is every way to answer (`{ token, label }`, in order, each label in the caller's language; one with an empty `label` for a plain staging, which the UI words itself, a "Confirm" button): the others die with the one sent |
75
- | `login` | `{ service, url }` | the caller isn't logged in to `service` yet, which a plugin acts on as them: show them `url` to open (the model never gets it) |
75
+ | `login` | `{ service, url }` | the caller isn't logged in to `service` yet, which a plugin acts on as them: show them `url` to open (the model never gets it). One per service; the turn ends after the step that asked, its `final` text telling them to log in and write again |
76
76
  | `final` | `{ text, pendingNote? }` | the complete answer (also emitted for a token confirmation, with no model turn). `pendingNote` is there when the model wrote nothing because the turn staged an action: the core's stand-in sentence `text` begins with (then any list the turn surfaced). A UI showing its own confirmation hides it; the conversation's transcript keeps it |
77
77
  | `error` | `{ message }` | the turn failed mid-stream |
78
78
 
package/http-server.ts CHANGED
@@ -23,7 +23,7 @@
23
23
  * package never imports the app.
24
24
  */
25
25
  import {
26
- detectLoginRequired,
26
+ detectLoginRequests,
27
27
  detectPendingConfirmation,
28
28
  type HandleTurn,
29
29
  type TurnSink,
@@ -262,8 +262,7 @@ export async function handleTurnRequest(req: Request, deps: TurnRequestDeps): Pr
262
262
  onStep: (step) => {
263
263
  const pending = detectPendingConfirmation(step);
264
264
  if (pending) send("pending", { command: pending.summary, token: pending.token, choices: pending.choices });
265
- const login = detectLoginRequired(step);
266
- if (login) send("login", { service: login.service, url: login.url });
265
+ for (const login of detectLoginRequests(step)) send("login", { service: login.service, url: login.url });
267
266
  },
268
267
  onUsage: () => {},
269
268
  // The core says when the text is its stand-in for an answer the
package/openapi.yaml CHANGED
@@ -132,7 +132,8 @@ paths:
132
132
  `tool_finish` (status of a tool call), `pending` (a staged
133
133
  confirm-required action, with its command, its token and the
134
134
  choices it offers), `login` (a
135
- service the caller has to log in to first, with the link to open),
135
+ service the caller has to log in to first, with the link to open;
136
+ one per service, and the turn ends after the step that asked),
136
137
  `final` (the
137
138
  authoritative complete answer), and `error`.
138
139
  headers:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercury-fw/channel-http",
3
- "version": "0.14.2",
3
+ "version": "0.15.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,11 +18,11 @@
18
18
  "access": "public"
19
19
  },
20
20
  "peerDependencies": {
21
- "@mercury-fw/channel-types": ">=0.65.0 <1.0.0"
21
+ "@mercury-fw/channel-types": ">=0.68.0 <1.0.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@mercury-fw/channel-types": "0.67.0",
25
- "@mercury-fw/plugin-types": "0.67.0",
24
+ "@mercury-fw/channel-types": "0.68.0",
25
+ "@mercury-fw/plugin-types": "0.68.0",
26
26
  "@mercury-fw/typescript-config": "*",
27
27
  "@types/bun": "^1.4.2",
28
28
  "typescript": "^6.0.3"