From e8289a384fb0b5fa026e320616a1c0e3f6533da6 Mon Sep 17 00:00:00 2001 From: Eric Law <39393654+acn-ericlaw@users.noreply.github.com> Date: Mon, 30 Nov 2026 18:38:47 -0800 Subject: [PATCH] release: v4.12.31 - the pack's half of the agent work, and rest.yaml as the router of a Python application The version 4.12.30 to 4.12.31 in pyproject.toml, version.py and the README's status line. The CHANGELOG's Unreleased section becomes the 4.12.31 release section with its summary and upgrade notes, a fresh empty Unreleased above it; six sentences that spoke of a later time are brought up to date. The release carries the transcript audit store, the built-in agent tools and the recipes for MCP servers, ask-a-person with the agent-question app and its UI, attachments and uploads for the LLM helper, REST automation, the YAML 1.2.2 reader and the Python 3.11 floor (#59 to #94). Gates: ruff clean, basedpyright 0 errors, pytest 3,016 passed, 76 skipped. The package builds offline with the license in both distributions. Co-Authored-By: Claude Fable 5.2 --- CHANGELOG.md | 44 +++++++++++++++++++++++++------ README.md | 2 +- pyproject.toml | 2 +- src/mercury_composable/version.py | 2 +- 4 files changed, 39 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4682074..8b8353f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,34 @@ ## Unreleased +## Version 4.12.31, 11/30/2026 + +The pack's half of the agent work the engines release as 4.12.31, in lockstep with the Node.js pack, and the pack as an +application server. **The audit:** every model turn of an agent loop is recorded in a transcript audit store on +PostgreSQL, off the turn's path (Added 1; ADR-0035 in mercury-composable); a single call without tools joins it behind +a switch (Added 11), and so do the questions, answers and advices of ask-a-person (Added 8). **Tools for an agent +loop:** twelve built-in tools - files inside one workspace, the web inside an allowlist, a knowledge graph inside one +database and a clock - each with a published catalog row (Added 2 and 3; ADR-0036), and recipes for the tools of +existing MCP servers (Added 4). **Ask a person:** `person.ask` carries a loop's wait to a person and brings the +decision back through a signed resume link (Added 5), and the agent-question app is the inbox, with its React UI +(Added 6 and 9, Changed 1 to 4). **Documents:** a single `llm.chat` call takes images and PDF pages by reference +(Added 12), and the helper takes uploads into the folder they are read from (Added 14). **The application server:** +`rest.yaml` is the router of a Python application as it is of an engine application (Added 13 and 14, Changed 10, +Documentation 1), the host serves static content (Added 7) and tells an application when it starts to stop +(Added 10). **One rule for a value:** every YAML file is read by YAML 1.2.2, and a setting, a number, a time and a +switch are read by one rule in both packs, a wrong value stopping the start by its key's name (Fixed 4 to 12). The +floor is Python 3.11 (Changed 9). Driven live from the engines through this pack: the transcript audit store, the +agent tools, ask-a-person with its UI, and a pack's functions as the provider of a hot-deployed graph +(`transcript-audit-live-drive.md`, `agent-tools-live-drive.md`, `ask-a-person-live-drive.md`, +`agent-question-ui-live-drive.md` and `hot-deploy-live-drive.md` in the engine repository). + +**Upgrade notes - READ:** a configuration file is read by YAML 1.2.2: `yes`, `no`, `on` and `off` are text and `010` +is 10, so a switch or a flag written that way stops the start (Fixed 11); the LLM helper reads its settings when it +starts, so a wrong value it never exercised stops the start (Fixed 9); an installation on Python 3.10 stays on 4.12.30 +(Changed 9); a `-D` value that held a literal `${...}` is resolved (Changed 6); the distributions carry the license as +`LICENSE` (Changed 12). For an application that ran the unreleased extensions from `main`, the entries under Fixed and +Changed carry their own notes, `graph.ingest`'s first (Fixed 3). + ### Added 1. **The transcript audit store: a durable, queryable record of every model turn (RFC-0012 in mercury-composable).** @@ -29,8 +57,8 @@ browser. `llm.chat` records the loop's `x-graph-id` and `x-node` headers at the first turn; `llm.health` reports `transcript_audit`. Pinned by `tests/test_transcript_audit.py` (28 tests on the memory store and a recording fake of the connection pool) and a live test gated on `LLM_TRANSCRIPT_AUDIT_TEST_URL`; the shared loop vector file is - unchanged, since the audit is a side effect of a turn and not part of the loop contract. The Node twin follows in - lockstep. **Upgrade note:** none without `llm.transcript.audit`. A record saved by the previous helper (version 1) + unchanged, since the audit is a side effect of a turn and not part of the loop contract. The Node.js pack carries + the twin. **Upgrade note:** none without `llm.transcript.audit`. A record saved by the previous helper (version 1) continues under the new one; its turns before the upgrade carry no facts, and the check logs them as unaudited. 2. **The built-in agent tools: files inside one workspace, the web inside an allowlist, and a clock (RFC-0013 in @@ -211,7 +239,7 @@ and a reply the helper judged unusable (its 422) are recorded with their cost, and a call that failed before the model answered leaves no row. Pinned by the new shared file `tests/vectors/llm-audit-vectors.json` (25 cases, run through the save, the check event and the function behind its mailbox) and six tests beside it; sixteen mutations - of the code and the file were each caught by a test. The Node twin follows in lockstep. **Upgrade note:** none + of the code and the file were each caught by a test. The Node.js pack carries the twin. **Upgrade note:** none without the switch; it is off by default, because it multiplies what the audit store holds. With it on, `llm.transcript.store` must be set (the shipped `application.yml` sets `memory`), or the application stops at start by name. @@ -237,7 +265,7 @@ with the size and the SHA-256 of the source file as it was read, never its bytes. Not on `llm.stream` and not on a loop turn (400). Pinned by the new shared file `tests/vectors/llm-attachments-vectors.json` (48 cases) over the fixture files of `tests/fixtures/attachments`, and six tests beside it; thirty-one mutations of the code, the - vector file and a fixture were each caught by a test. The Node twin follows in lockstep. **Read:** the folder is + vector file and a fixture were each caught by a test. The Node.js pack carries the twin. **Read:** the folder is readable through the model by every caller that can reach the helper, and its files are sent to the provider - choose it as deployment configuration and give it only what a graph may show a model. **Upgrade note:** none without `attachments`; a call without the field reads no folder and sends text as before. @@ -346,7 +374,7 @@ counts lines by the line feed; `pages` takes the digits 0 to 9 only; an allowlist entry that starts with a class (`[ab].example.com`) is a pattern. - **Upgrade note:** the agent tools are in no release yet. For an application that runs them from `main`: an address + **Upgrade note:** the agent tools are new in this release. For an application that ran them from `main`: an address in `100.64.0.0/10` and an IPv4-mapped address are refused unless `tools.web.allow.private=true`, and a glob no longer reaches beneath a symbolic link to a folder. @@ -581,7 +609,7 @@ 3.11, the floor, and 3.14, the newest release the package lists - the floor catches what a user on it would hit (a typing stub, a missing method, as the first run of #84 did on 3.10), the newest the deprecations ahead; `fail-fast` is off so both results show. **Upgrade note:** an installation on Python 3.10 stays on 4.12.30 until - it moves to a supported interpreter; `pip` refuses the next release there by the declared floor. + it moves to a supported interpreter; `pip` refuses this release there by the declared floor. 10. **The ask-person and agent-question extensions serve their pages, endpoints and the device stream as `rest.yaml` entries - the first adopters of REST automation in the pack (RFC-0018's open question on the hand-mounted routes; Eric's direction of 2026-11-25).** Each extension gains a `resources/rest.yaml` and turns `rest.automation` on in @@ -603,8 +631,8 @@ the row (whose `seq` is the cursor, as the React UI already reads it) and no `id:` line, which the engines' SSE dialect has not; the JSON the UI reads keeps its nulls (an advice's `state`, a silent engine's `status`), which the functions serialize themselves because the engines' renderer omits a null. **Upgrade note:** an installation - that reads these endpoints with its own client sees the error body gain `status`; nothing else changes. The Node - pack follows. + that reads these endpoints with its own client sees the error body gain `status`; nothing else changes. The + Node.js pack carries the same (mercury-nodejs #148). 11. **Code quality: the findings of a local SonarQube and IDE round (2026-11-29) on this release's code, with no behaviour change** - in lockstep with the Node pack. The 32 functions above the cognitive-complexity threshold of diff --git a/README.md b/README.md index 7492803..bb359c3 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ graph task calls a Python function exactly as if it were local. [AI Agent Guide](https://accenture.github.io/mercury-python/guides/ai-agent-guide/) for deterministic function generation. -> **Status:** v4.12.30 is on PyPI — `pip install mercury-composable`. This repository was +> **Status:** v4.12.31 is on PyPI — `pip install mercury-composable`. This repository was > repurposed in August 2026 for the polyglot initiative. The legacy Mercury language-pack > implementation remains in tagged releases. diff --git a/pyproject.toml b/pyproject.toml index 747b3dd..5f15a7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "mercury-composable" -version = "4.12.30" +version = "4.12.31" description = "Lightweight Event-over-HTTP function host and client for Mercury Composable" readme = "README.md" license = "Apache-2.0" diff --git a/src/mercury_composable/version.py b/src/mercury_composable/version.py index 85f071a..e8de00c 100644 --- a/src/mercury_composable/version.py +++ b/src/mercury_composable/version.py @@ -1,3 +1,3 @@ """Package version - the single Python-side source (pyproject.toml mirrors it).""" -__version__ = "4.12.30" +__version__ = "4.12.31"