@mercury-fw/channel-http 0.13.0 → 0.13.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,11 @@
1
1
  # @mercury-fw/channel-http
2
2
 
3
+ ## 0.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f631dd5: README: a link to the package's page on Mercury's documentation site (https://lucabro81.github.io/mercury-fw/), published from this release on. The HTTP channel's README points to the HTTP API reference there, and the core's memory section to the page that explains it.
8
+
3
9
  ## 0.13.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Gives a [Mercury](https://github.com/lucabro81/mercury-fw) agent an HTTP surface to build a custom UI on: one conversational turn per request, streamed back as Server-Sent Events, plus confirmation and read-only routes over what the agent holds (conversations, the wiki, memory, its plugins).
4
4
 
5
+ On Mercury's documentation site: [its page](https://lucabro81.github.io/mercury-fw/plugins/channel-http/).
6
+
5
7
  This version is written for version 6 of the channel contract, the one that brings the channels' texts in the person's language, and needs the framework at 0.59 or later, the first whose core gives channels its version (`GET /version`). A core with an older contract skips it, and the log says why.
6
8
 
7
9
  ```bash
@@ -35,7 +37,7 @@ It's active whenever it's declared in `mercury.config.ts`'s `channels` with an a
35
37
 
36
38
  **CORS** is enabled on every response and every route answers an `OPTIONS` preflight, so a browser UI on another origin can call it. The allowed origin is `HTTP_SURFACE_CORS_ORIGIN` (default `*`: the token travels in a header, never in a cookie the browser would send on its own).
37
39
 
38
- The full contract is described by an **OpenAPI document**, served raw at `GET /openapi.yaml` and published as a rendered docs page on GitHub Pages (see `packages/channels/channel-http/openapi.yaml`, the single source of truth).
40
+ The full contract is described by an **OpenAPI document**, served raw at `GET /openapi.yaml` and published as [the HTTP API reference](https://lucabro81.github.io/mercury-fw/reference/http-api/) on the documentation site (see `packages/channels/channel-http/openapi.yaml`, the single source of truth).
39
41
 
40
42
  All responses are JSON except `POST /turn`, which streams `text/event-stream`. Every JSON response is either `{ "ok": true, ... }` or, on error, `{ "ok": false, "error": "<message>" }` with HTTP `400`/`401`/`500`.
41
43
 
@@ -47,9 +47,9 @@ export type TurnRequestDeps = {
47
47
  };
48
48
  /**
49
49
  * Serves the OpenAPI document that describes this surface — the single source
50
- * of truth in this package's `openapi.yaml`, also rendered as the GitHub Pages
51
- * API docs. Served raw as `text/yaml` (no YAML parser needed at runtime); most
52
- * tooling (Redoc, Swagger UI, Postman) reads YAML directly.
50
+ * of truth in this package's `openapi.yaml`, also rendered as the docs site's
51
+ * HTTP API reference. Served raw as `text/yaml` (no YAML parser needed at
52
+ * runtime); most tooling (Redoc, Swagger UI, Postman) reads YAML directly.
53
53
  */
54
54
  export declare function openApiResponse(corsOrigin?: string): Response;
55
55
  /**
package/http-server.ts CHANGED
@@ -153,9 +153,9 @@ function preflight(origin: string): Response {
153
153
 
154
154
  /**
155
155
  * Serves the OpenAPI document that describes this surface — the single source
156
- * of truth in this package's `openapi.yaml`, also rendered as the GitHub Pages
157
- * API docs. Served raw as `text/yaml` (no YAML parser needed at runtime); most
158
- * tooling (Redoc, Swagger UI, Postman) reads YAML directly.
156
+ * of truth in this package's `openapi.yaml`, also rendered as the docs site's
157
+ * HTTP API reference. Served raw as `text/yaml` (no YAML parser needed at
158
+ * runtime); most tooling (Redoc, Swagger UI, Postman) reads YAML directly.
159
159
  */
160
160
  export function openApiResponse(corsOrigin = "*"): Response {
161
161
  const file = Bun.file(new URL("./openapi.yaml", import.meta.url));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercury-fw/channel-http",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,8 +21,8 @@
21
21
  "@mercury-fw/channel-types": ">=0.59.0 <1.0.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@mercury-fw/channel-types": "0.59.0",
25
- "@mercury-fw/plugin-types": "0.59.0",
24
+ "@mercury-fw/channel-types": "0.59.2",
25
+ "@mercury-fw/plugin-types": "0.59.2",
26
26
  "@mercury-fw/typescript-config": "*",
27
27
  "@types/bun": "^1.4.2",
28
28
  "typescript": "^6.0.3"