@absolutejs/mcp 0.11.0 → 0.11.2
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/README.md +6 -0
- package/dist/index.js +4 -19
- package/dist/manifest.js +1006 -6751
- package/dist/src/manifest.d.ts +20 -1
- package/package.json +13 -5
package/README.md
CHANGED
|
@@ -21,6 +21,12 @@ action request; allowed calls execute through a short-lived single-use lease and
|
|
|
21
21
|
produce a receipt. Requestable denials return an `absolute.action_decision`
|
|
22
22
|
payload containing the action id for an approval workflow.
|
|
23
23
|
|
|
24
|
+
Agency is a required host peer (`>=0.7.1 <0.8.0`) and is externalized from the
|
|
25
|
+
MCP build. This guarantees that every transport uses the host's one action
|
|
26
|
+
ledger instead of embedding a private enforcement runtime. The package tests
|
|
27
|
+
against exactly `0.7.1`; a new Agency minor requires an explicit compatibility
|
|
28
|
+
release.
|
|
29
|
+
|
|
24
30
|
```ts
|
|
25
31
|
import { createAgency, createMemoryAgencyStore } from "@absolutejs/agency";
|
|
26
32
|
|
package/dist/index.js
CHANGED
|
@@ -644,24 +644,8 @@ var createMcpOAuthProvider = (options) => {
|
|
|
644
644
|
}
|
|
645
645
|
};
|
|
646
646
|
};
|
|
647
|
-
//
|
|
648
|
-
|
|
649
|
-
actor,
|
|
650
|
-
call,
|
|
651
|
-
effects = ["read"],
|
|
652
|
-
requiredScopes = []
|
|
653
|
-
}) => ({
|
|
654
|
-
action: "call_tool",
|
|
655
|
-
actor,
|
|
656
|
-
context: { required_scopes: requiredScopes, source: "mcp" },
|
|
657
|
-
effects,
|
|
658
|
-
input: call.arguments,
|
|
659
|
-
resource: {
|
|
660
|
-
id: call.name,
|
|
661
|
-
properties: { server_id: call.serverId },
|
|
662
|
-
type: "mcp_tool"
|
|
663
|
-
}
|
|
664
|
-
});
|
|
647
|
+
// src/dispatch.ts
|
|
648
|
+
import { createCoazActionInput } from "@absolutejs/agency/authzen";
|
|
665
649
|
|
|
666
650
|
// src/jsonrpc.ts
|
|
667
651
|
var JSONRPC_PARSE_ERROR = -32700;
|
|
@@ -907,7 +891,8 @@ var runTool = async (config, caller, scopes, id, name, args, meta, tool, context
|
|
|
907
891
|
});
|
|
908
892
|
const amount = tool.authorization.spend ? valueAtPath(args, tool.authorization.spend.amountMinorField) : undefined;
|
|
909
893
|
const currency = tool.authorization.spend ? valueAtPath(args, tool.authorization.spend.currencyField) : undefined;
|
|
910
|
-
const
|
|
894
|
+
const idempotencyBinding = tool.authorization.idempotency;
|
|
895
|
+
const idempotencyKey = idempotencyBinding?.mode === "field" ? valueAtPath(args, idempotencyBinding.field) : undefined;
|
|
911
896
|
const requested = await agency.enforcement.request({
|
|
912
897
|
...actionInput,
|
|
913
898
|
context: {
|