@orangecheck/agent-core 2.4.0 → 2.5.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/README.md +38 -16
- package/dist/canonical.js.map +1 -1
- package/dist/canonical.mjs.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -4
- package/dist/index.mjs.map +1 -1
- package/dist/scope.js +6 -1
- package/dist/scope.js.map +1 -1
- package/dist/scope.mjs +6 -1
- package/dist/scope.mjs.map +1 -1
- package/package.json +1 -1
- package/src/federation.test.ts +3 -1
- package/src/federation.ts +2 -2
- package/src/revocation-failclosed.test.ts +46 -10
- package/src/scope.test.ts +28 -0
- package/src/scope.ts +5 -0
- package/src/verify.ts +11 -9
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,12 @@ var REGISTERED_SCOPES = {
|
|
|
17
17
|
"ln:send": { keys: ["max_sats", "node", "max_fee_sats"] },
|
|
18
18
|
"mcp:invoke": { keys: ["server", "tool", "max_invocations"] },
|
|
19
19
|
// oc-pledge-protocol SPEC §7.3.
|
|
20
|
-
"pledge:create": { keys: ["max_bond_sats", "mechanism", "counterparty"] }
|
|
20
|
+
"pledge:create": { keys: ["max_bond_sats", "mechanism", "counterparty"] },
|
|
21
|
+
// The agent-stack adapters (agent-anthropic, -openai, -vercel, -langgraph).
|
|
22
|
+
"anthropic:tool": { keys: ["name"] },
|
|
23
|
+
"openai:function": { keys: ["name"] },
|
|
24
|
+
"vercel:tool": { keys: ["verb"] },
|
|
25
|
+
"langgraph:tool": { keys: ["verb"] }
|
|
21
26
|
};
|
|
22
27
|
var NUMERIC_KEYS = /* @__PURE__ */ new Set([
|
|
23
28
|
"max_bytes",
|
|
@@ -507,7 +512,7 @@ async function verifyDelegation(input) {
|
|
|
507
512
|
if (!input.skipRevocationCheck && !input.revocations) {
|
|
508
513
|
return err(
|
|
509
514
|
"E_MALFORMED",
|
|
510
|
-
|
|
515
|
+
'verifyDelegation requires `revocations` (query kind 30085 with "#t": [delegation id], SPEC \xA79.4) or an explicit skipRevocationCheck:true to state that revocation is not being checked'
|
|
511
516
|
);
|
|
512
517
|
}
|
|
513
518
|
if (input.revocations) {
|
|
@@ -635,7 +640,7 @@ async function verifyAction(input) {
|
|
|
635
640
|
if (!input.skipRevocationCheck && !input.revocations) {
|
|
636
641
|
return err(
|
|
637
642
|
"E_MALFORMED",
|
|
638
|
-
|
|
643
|
+
'verifyAction requires `revocations` (query kind 30085 with "#t": [id of every link in the chain], SPEC \xA79.4) or an explicit skipRevocationCheck:true'
|
|
639
644
|
);
|
|
640
645
|
}
|
|
641
646
|
let actionAnchor;
|
|
@@ -1099,7 +1104,7 @@ async function verifyFederationDelegation(input) {
|
|
|
1099
1104
|
if (!input.skipRevocationCheck && !input.revocations) {
|
|
1100
1105
|
return fail(
|
|
1101
1106
|
"E_MALFORMED",
|
|
1102
|
-
|
|
1107
|
+
'verifyFederationDelegation requires `revocations` (query kind 30085 with "#t": [delegation id], SPEC \xA79.4) or an explicit skipRevocationCheck:true to state that revocation is not being checked'
|
|
1103
1108
|
);
|
|
1104
1109
|
}
|
|
1105
1110
|
for (const rev of input.revocations ?? []) {
|