@aventara/mcp 1.0.0-rc.11 → 1.0.0-rc.13
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,51 @@
|
|
|
1
1
|
# @aventara/mcp
|
|
2
2
|
|
|
3
|
+
## 1.0.0-rc.13
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f3b291f: A new limit, `maxTransactionWrites` (default `20`), counts the write steps of one transaction plan: each `create`,
|
|
8
|
+
`update`, `upsert` and `delete` step, and each `appTx.$sql` step, since a statement cannot be classed as a read. A
|
|
9
|
+
plan with more is refused before anything runs (`422 A2009`, one `V1014` at `["operations"]`). It is set like every
|
|
10
|
+
other limit (`limits` at the root, overridden per limit by a layer) and is part of each Contract's `limits`, so every
|
|
11
|
+
Contract hash moves with this release. `maxTransactionOperations` still counts every step, reads and `$sql` steps
|
|
12
|
+
included. The two limits are separate: `maxTransactionWrites` defaults to `20` whatever `maxTransactionOperations` is
|
|
13
|
+
set to, so raising only the step limit still caps a plan at 20 writes; raise both. The limit counts steps, not rows: a
|
|
14
|
+
`create` step with nested `$create`s is one write. `POST /_all` is bounded by `maxAll`, not by either plan limit, and its writes do not roll back together.
|
|
15
|
+
The MCP `transaction` tool's description states the write limit when it is lower than the step limit.
|
|
16
|
+
- f3b291f: `transactionsStyle` takes a third value, `"server"`: the server still opens transactions, and callers send no plans.
|
|
17
|
+
A forced call (`forceTransaction`), a write the policy checks after it runs and `ctx.$transaction` run in a
|
|
18
|
+
transaction as under `"interactive"`, while the layer has no `POST /_transactions` route, a plan sent to it answers as
|
|
19
|
+
that absent route (`404 A2002`, one `V1006` at `["operations"]`), `framework.transaction` refuses a plan of that
|
|
20
|
+
origin the same way, the generated client has no `tx` or `transaction`, and an MCP agent layer under it has no
|
|
21
|
+
`transaction` tool. `client: { transactionsStyle: "server" }` keeps forced writes atomic without letting remote
|
|
22
|
+
callers send multi-step plans. `forceTransaction` under `"none"` is still a startup error; under `"server"` it is
|
|
23
|
+
allowed. Like `"interactive"`, `"server"` needs an adapter with transactions (`COMPILER_UNAVAILABLE_CAPABILITY`
|
|
24
|
+
otherwise). The Contract's `transactions` carries the value, so a layer that states it gets a new Contract hash.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [6c3e25c]
|
|
29
|
+
- Updated dependencies [2aaa27d]
|
|
30
|
+
- Updated dependencies [f3b291f]
|
|
31
|
+
- Updated dependencies [2aaa27d]
|
|
32
|
+
- Updated dependencies [e4e8abd]
|
|
33
|
+
- Updated dependencies [e662048]
|
|
34
|
+
- Updated dependencies [f3b291f]
|
|
35
|
+
- Updated dependencies [f3b291f]
|
|
36
|
+
- Updated dependencies [6c3e25c]
|
|
37
|
+
- Updated dependencies [6c3e25c]
|
|
38
|
+
- Updated dependencies [a708188]
|
|
39
|
+
- Updated dependencies [a9260d2]
|
|
40
|
+
- @aventara/core@1.0.0-rc.13
|
|
41
|
+
|
|
42
|
+
## 1.0.0-rc.12
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [fdeee8a]
|
|
47
|
+
- @aventara/core@1.0.0-rc.12
|
|
48
|
+
|
|
3
49
|
## 1.0.0-rc.11
|
|
4
50
|
|
|
5
51
|
### Patch Changes
|
package/dist/mcp.binder.js
CHANGED
|
@@ -24,6 +24,7 @@ export function bind(framework) {
|
|
|
24
24
|
tools: compileToolCatalog({
|
|
25
25
|
surface: protocol.surface(),
|
|
26
26
|
maxTransactionOperations: agent.limits.maxTransactionOperations,
|
|
27
|
+
maxTransactionWrites: agent.limits.maxTransactionWrites,
|
|
27
28
|
me: me !== undefined,
|
|
28
29
|
}),
|
|
29
30
|
contractDocument: protocol.encodeContract({
|
|
@@ -33,10 +33,12 @@ export type McpToolDefinition = {
|
|
|
33
33
|
};
|
|
34
34
|
/** The URI of the MCP resource that holds the Agent Contract. */
|
|
35
35
|
export declare const CONTRACT_RESOURCE_URI = "aventara://contract";
|
|
36
|
-
/** What the catalog is compiled from: the agent binding's surface, its plan
|
|
36
|
+
/** What the catalog is compiled from: the agent binding's surface, its plan limits, and whether `me` is offered. */
|
|
37
37
|
export type CatalogSource = {
|
|
38
38
|
readonly surface: ReturnType<AvProtocolBinding["surface"]>;
|
|
39
39
|
readonly maxTransactionOperations: number;
|
|
40
|
+
/** Absent: no limit of its own beyond `maxTransactionOperations`. */
|
|
41
|
+
readonly maxTransactionWrites?: number;
|
|
40
42
|
/** The access provider states its `client`, so `me` has an answer. */
|
|
41
43
|
readonly me?: boolean;
|
|
42
44
|
};
|
|
@@ -149,7 +149,7 @@ function familyTool(family, offer) {
|
|
|
149
149
|
annotations: ANNOTATIONS[family],
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
function transactionTool(offers, maxTransactionOperations) {
|
|
152
|
+
function transactionTool(offers, maxTransactionOperations, maxTransactionWrites) {
|
|
153
153
|
const families = OPERATION_FAMILIES.filter((family) => offers.has(family));
|
|
154
154
|
const resources = [
|
|
155
155
|
...new Set([...offers.values()].flatMap((offer) => [...offer.keys()])),
|
|
@@ -165,7 +165,9 @@ function transactionTool(offers, maxTransactionOperations) {
|
|
|
165
165
|
READ_THE_CONTRACT,
|
|
166
166
|
"Each step is { resource, family, variant, args }, with the args of that family's tool.",
|
|
167
167
|
'A step may use a value an earlier step returned: put { "$ref": { "operation": <the earlier step\'s index>, "path": ["<a field that step selected>"] } } where the value goes. The server adds the fingerprints the protocol requires.',
|
|
168
|
-
|
|
168
|
+
maxTransactionWrites < maxTransactionOperations
|
|
169
|
+
? `At most ${maxTransactionOperations} steps, and at most ${maxTransactionWrites} of them create, update, upsert or delete steps.`
|
|
170
|
+
: `At most ${maxTransactionOperations} steps.`,
|
|
169
171
|
"A failed plan answers isError with the failing step's index (cause.operation), its code and its issues; an issue's path starts at operations[<step>].args.",
|
|
170
172
|
].join(" "),
|
|
171
173
|
inputSchema: {
|
|
@@ -217,7 +219,7 @@ export function compileToolCatalog(source) {
|
|
|
217
219
|
}
|
|
218
220
|
if (offers.size > 0 &&
|
|
219
221
|
source.surface.some((route) => route.kind === "transactions")) {
|
|
220
|
-
tools.push(transactionTool(offers, source.maxTransactionOperations));
|
|
222
|
+
tools.push(transactionTool(offers, source.maxTransactionOperations, source.maxTransactionWrites ?? source.maxTransactionOperations));
|
|
221
223
|
}
|
|
222
224
|
if (source.me === true) {
|
|
223
225
|
tools.push(ME_TOOL_DEFINITION);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aventara/mcp",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.13",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "The MCP server for an Aventara application: its agent layer as Model Context Protocol tools.",
|
|
6
6
|
"type": "module",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"CHANGELOG.md"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@aventara/core": "1.0.0-rc.
|
|
25
|
+
"@aventara/core": "1.0.0-rc.13",
|
|
26
26
|
"@modelcontextprotocol/sdk": "1.32.2",
|
|
27
27
|
"zod": "^4.6.7"
|
|
28
28
|
},
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@aventara/testing": "1.0.0-rc.
|
|
33
|
+
"@aventara/testing": "1.0.0-rc.13"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "node ../../scripts/build/build-output.cleaner.ts dist && tsc -p tsconfig.json --removeComments --declaration false && tsc -p tsconfig.json --emitDeclarationOnly && node ../../scripts/build/declaration-comments.sanitizer.ts dist",
|