@decionis/agent-safe-pipeline 0.4.1 → 0.5.0
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 +10 -0
- package/dist/Index.d.ts +6 -0
- package/dist/Index.d.ts.map +1 -1
- package/dist/Index.js +6 -0
- package/dist/Index.js.map +1 -1
- package/dist/execution/ActionRegistry.d.ts +12 -0
- package/dist/execution/ActionRegistry.d.ts.map +1 -1
- package/dist/execution/ActionRegistry.js +14 -0
- package/dist/execution/ActionRegistry.js.map +1 -1
- package/dist/execution/GovernedExecutionRunner.d.ts +8 -0
- package/dist/execution/GovernedExecutionRunner.d.ts.map +1 -1
- package/dist/execution/GovernedExecutionRunner.js +28 -0
- package/dist/execution/GovernedExecutionRunner.js.map +1 -1
- package/dist/execution/NativeExecutor.d.ts +13 -0
- package/dist/execution/NativeExecutor.d.ts.map +1 -1
- package/dist/execution/NativeExecutor.js.map +1 -1
- package/dist/intent/ExecutionIntent.d.ts +11 -0
- package/dist/intent/ExecutionIntent.d.ts.map +1 -1
- package/dist/intent/ExecutionIntent.js +15 -0
- package/dist/intent/ExecutionIntent.js.map +1 -1
- package/dist/intent/ExecutionSignals.d.ts +9 -1
- package/dist/intent/ExecutionSignals.d.ts.map +1 -1
- package/dist/intent/ExecutionSignals.js +9 -0
- package/dist/intent/ExecutionSignals.js.map +1 -1
- package/dist/intent/IntentCapture.d.ts.map +1 -1
- package/dist/intent/IntentCapture.js +15 -4
- package/dist/intent/IntentCapture.js.map +1 -1
- package/dist/intent/TargetPrecondition.d.ts +36 -0
- package/dist/intent/TargetPrecondition.d.ts.map +1 -0
- package/dist/intent/TargetPrecondition.js +57 -0
- package/dist/intent/TargetPrecondition.js.map +1 -0
- package/dist/manifest/ActionManifest.d.ts +112 -0
- package/dist/manifest/ActionManifest.d.ts.map +1 -0
- package/dist/manifest/ActionManifest.js +182 -0
- package/dist/manifest/ActionManifest.js.map +1 -0
- package/dist/plan/GovernedPlan.d.ts +109 -0
- package/dist/plan/GovernedPlan.d.ts.map +1 -0
- package/dist/plan/GovernedPlan.js +187 -0
- package/dist/plan/GovernedPlan.js.map +1 -0
- package/dist/plan/PlanState.d.ts +94 -0
- package/dist/plan/PlanState.d.ts.map +1 -0
- package/dist/plan/PlanState.js +240 -0
- package/dist/plan/PlanState.js.map +1 -0
- package/dist/plan/PlanStepReference.d.ts +16 -0
- package/dist/plan/PlanStepReference.d.ts.map +1 -0
- package/dist/plan/PlanStepReference.js +25 -0
- package/dist/plan/PlanStepReference.js.map +1 -0
- package/dist/profile/ApiProfile.d.ts +202 -2
- package/dist/profile/ApiProfile.d.ts.map +1 -1
- package/dist/profile/ApiProfile.js +397 -11
- package/dist/profile/ApiProfile.js.map +1 -1
- package/dist/profile/BuiltInApiProfiles.d.ts.map +1 -1
- package/dist/profile/BuiltInApiProfiles.js +199 -1
- package/dist/profile/BuiltInApiProfiles.js.map +1 -1
- package/dist/profile/McpToolProfile.d.ts +129 -0
- package/dist/profile/McpToolProfile.d.ts.map +1 -0
- package/dist/profile/McpToolProfile.js +270 -0
- package/dist/profile/McpToolProfile.js.map +1 -0
- package/dist/testing/Index.d.ts +3 -1
- package/dist/testing/Index.d.ts.map +1 -1
- package/dist/testing/Index.js +2 -0
- package/dist/testing/Index.js.map +1 -1
- package/dist/testing/LocalAssumptionBreaches.d.ts +96 -0
- package/dist/testing/LocalAssumptionBreaches.d.ts.map +1 -0
- package/dist/testing/LocalAssumptionBreaches.js +109 -0
- package/dist/testing/LocalAssumptionBreaches.js.map +1 -0
- package/dist/testing/LocalAuthority.d.ts +152 -5
- package/dist/testing/LocalAuthority.d.ts.map +1 -1
- package/dist/testing/LocalAuthority.js +294 -18
- package/dist/testing/LocalAuthority.js.map +1 -1
- package/dist/testing/LocalPlans.d.ts +43 -0
- package/dist/testing/LocalPlans.d.ts.map +1 -0
- package/dist/testing/LocalPlans.js +124 -0
- package/dist/testing/LocalPlans.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionIntent.js","sourceRoot":"","sources":["../../src/intent/ExecutionIntent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"ExecutionIntent.js","sourceRoot":"","sources":["../../src/intent/ExecutionIntent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACpD,MAAM,UAAU,GAAG,CAAC;KACjB,MAAM,EAAE;KACR,IAAI,EAAE;KACN,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,GAAG,CAAC;KACR,KAAK,CAAC,sBAAsB,CAAC,CAAC;AACjC,qFAAqF;AACrF,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;AAE/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACzC,UAAU,EAAE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,GAAG,CAAC;IACzC,UAAU,EAAE,gBAAgB;IAC5B,gBAAgB,EAAE,sBAAsB;IACxC,OAAO,EAAE,gBAAgB;IACzB,aAAa,EAAE,SAAS,CAAC,QAAQ,EAAE;IACnC,oBAAoB,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC7C,gBAAgB,EAAE,sBAAsB,CAAC,QAAQ,EAAE;IACnD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CAClD,CAAC;KACD,MAAM,EAAE,CAAC"}
|
|
@@ -2,8 +2,16 @@ import { z } from "zod";
|
|
|
2
2
|
import type { JsonObject } from "./JsonValue.js";
|
|
3
3
|
export declare const RESERVED_CONTEXT_BOUNDARY = "enforcement_boundary";
|
|
4
4
|
export declare const RESERVED_CONTEXT_WORKLOAD = "workload";
|
|
5
|
+
/**
|
|
6
|
+
* The namespace the authority rebuilds for itself on every evaluation (the
|
|
7
|
+
* verified approval, signed signals, plan facts). The runtime writes two
|
|
8
|
+
* entries into it, each only when it has one: `plan`, the step of a governed
|
|
9
|
+
* plan an intent is, and `precondition`, the target's state version it read
|
|
10
|
+
* before asking. The authority copies only the entries it validates.
|
|
11
|
+
*/
|
|
12
|
+
export declare const RESERVED_CONTEXT_AGENT_SAFE = "agent_safe";
|
|
5
13
|
/** Every reserved context key, so one refusal covers them all. */
|
|
6
|
-
export declare const RESERVED_CONTEXT_KEYS: readonly ["enforcement_boundary", "workload"];
|
|
14
|
+
export declare const RESERVED_CONTEXT_KEYS: readonly ["enforcement_boundary", "workload", "agent_safe"];
|
|
7
15
|
/**
|
|
8
16
|
* Where the boundary sits, as the operator configured it. Only stable
|
|
9
17
|
* placement belongs here: it survives a restart, it is what a policy means by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionSignals.d.ts","sourceRoot":"","sources":["../../src/intent/ExecutionSignals.ts"],"names":[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xE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,GAAG,UAAU,CAMnE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,yBAAyB,GAAG,IAAI,CAGhF;AAED,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,cAAc,GAAG,IAAI,CAGrE"}
|
|
@@ -26,10 +26,19 @@ const token = z
|
|
|
26
26
|
.regex(/^[a-z0-9][\w.:/-]*$/i);
|
|
27
27
|
export const RESERVED_CONTEXT_BOUNDARY = "enforcement_boundary";
|
|
28
28
|
export const RESERVED_CONTEXT_WORKLOAD = "workload";
|
|
29
|
+
/**
|
|
30
|
+
* The namespace the authority rebuilds for itself on every evaluation (the
|
|
31
|
+
* verified approval, signed signals, plan facts). The runtime writes two
|
|
32
|
+
* entries into it, each only when it has one: `plan`, the step of a governed
|
|
33
|
+
* plan an intent is, and `precondition`, the target's state version it read
|
|
34
|
+
* before asking. The authority copies only the entries it validates.
|
|
35
|
+
*/
|
|
36
|
+
export const RESERVED_CONTEXT_AGENT_SAFE = "agent_safe";
|
|
29
37
|
/** Every reserved context key, so one refusal covers them all. */
|
|
30
38
|
export const RESERVED_CONTEXT_KEYS = [
|
|
31
39
|
RESERVED_CONTEXT_BOUNDARY,
|
|
32
40
|
RESERVED_CONTEXT_WORKLOAD,
|
|
41
|
+
RESERVED_CONTEXT_AGENT_SAFE,
|
|
33
42
|
];
|
|
34
43
|
/**
|
|
35
44
|
* Where the boundary sits, as the operator configured it. Only stable
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionSignals.js","sourceRoot":"","sources":["../../src/intent/ExecutionSignals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,OAAO,GAAG,CAAC,GAAW,EAAe,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEhF,qEAAqE;AACrE,MAAM,KAAK,GAAG,CAAC;KACZ,MAAM,EAAE;KACR,IAAI,EAAE;KACN,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,GAAG,CAAC;KACR,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AAChE,MAAM,CAAC,MAAM,yBAAyB,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ExecutionSignals.js","sourceRoot":"","sources":["../../src/intent/ExecutionSignals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,OAAO,GAAG,CAAC,GAAW,EAAe,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEhF,qEAAqE;AACrE,MAAM,KAAK,GAAG,CAAC;KACZ,MAAM,EAAE;KACR,IAAI,EAAE;KACN,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,GAAG,CAAC;KACR,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AAChE,MAAM,CAAC,MAAM,yBA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S,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACnD,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,UAAU,CAAC,OAAmB;IAC5C,MAAM,SAAS,GAAG,oBAAoB,CAAC,SAAS,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC,CAAC;IACrF,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntentCapture.d.ts","sourceRoot":"","sources":["../../src/intent/IntentCapture.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAKL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"IntentCapture.d.ts","sourceRoot":"","sources":["../../src/intent/IntentCapture.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAKL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,qBAAqB,CAAC;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwB;IAC/C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAe;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA4B;gBAE/B,OAAO,CAAC,EAAE,oBAAoB;IAQ1C,OAAO,CAAC,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,oBAAoB,GAAG,cAAc;IAmDhG,6EAA6E;IAChE,eAAe,CAC1B,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,oBAAoB,GACjC,OAAO,CAAC,cAAc,CAAC;CAK3B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { AgentProposalSchema, ExecutionIntentSchema, RESERVED_CONTEXT_IDEMPOTENCY_KEY, TrustedIntentContextSchema, } from "./ExecutionIntent.js";
|
|
3
|
-
import { RESERVED_CONTEXT_KEYS, signalContext } from "./ExecutionSignals.js";
|
|
3
|
+
import { RESERVED_CONTEXT_AGENT_SAFE, RESERVED_CONTEXT_KEYS, signalContext, } from "./ExecutionSignals.js";
|
|
4
4
|
import { CanonicalIntentHasher } from "./CanonicalIntentHasher.js";
|
|
5
5
|
export class IntentCapture {
|
|
6
6
|
hasher;
|
|
@@ -27,6 +27,13 @@ export class IntentCapture {
|
|
|
27
27
|
if (reserved.some((key) => Object.hasOwn(trusted.context, key))) {
|
|
28
28
|
throw new Error("INTENT_CONTEXT_KEY_RESERVED");
|
|
29
29
|
}
|
|
30
|
+
// The runtime's entries in the `agent_safe` namespace, each only when it
|
|
31
|
+
// has one, so an intent with neither carries no such key and hashes as
|
|
32
|
+
// it did before either existed.
|
|
33
|
+
const agentSafe = {
|
|
34
|
+
...(trusted.plan === undefined ? {} : { plan: { ...trusted.plan } }),
|
|
35
|
+
...(trusted.precondition === undefined ? {} : { precondition: { ...trusted.precondition } }),
|
|
36
|
+
};
|
|
30
37
|
const capturedAt = this.clock();
|
|
31
38
|
const expiresAt = new Date(capturedAt.valueOf() + this.ttlSeconds * 1_000);
|
|
32
39
|
const intent = ExecutionIntentSchema.parse({
|
|
@@ -40,9 +47,13 @@ export class IntentCapture {
|
|
|
40
47
|
target: proposal.target,
|
|
41
48
|
parameters: proposal.parameters,
|
|
42
49
|
downstreamTarget: trusted.downstreamTarget,
|
|
43
|
-
context:
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
context: {
|
|
51
|
+
...trusted.context,
|
|
52
|
+
...(trusted.signals === undefined ? {} : signalContext(trusted.signals)),
|
|
53
|
+
...(Object.keys(agentSafe).length === 0
|
|
54
|
+
? {}
|
|
55
|
+
: { [RESERVED_CONTEXT_AGENT_SAFE]: agentSafe }),
|
|
56
|
+
},
|
|
46
57
|
...(trusted.correlationId === undefined ? {} : { correlationId: trusted.correlationId }),
|
|
47
58
|
...(trusted.expectedEffectDigest === undefined
|
|
48
59
|
? {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntentCapture.js","sourceRoot":"","sources":["../../src/intent/IntentCapture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,gCAAgC,EAChC,0BAA0B,GAI3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"IntentCapture.js","sourceRoot":"","sources":["../../src/intent/IntentCapture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,gCAAgC,EAChC,0BAA0B,GAI3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAA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gBACxE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC;oBACrC,CAAC,CAAC,EAAE;oBACJ,CAAC,CAAC,EAAE,CAAC,2BAA2B,CAAC,EAAE,SAAS,EAAE,CAAC;aAClD;YACD,GAAG,CAAC,OAAO,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC;YACxF,GAAG,CAAC,OAAO,CAAC,oBAAoB,KAAK,SAAS;gBAC5C,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,EAAE,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,EAAE,CAAC;YAC3D,GAAG,CAAC,OAAO,CAAC,gBAAgB,KAAK,SAAS;gBACxC,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,EAAE,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,EAAE,CAAC;YACnD,cAAc,EAAE,OAAO,CAAC,cAAc;SACvC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAED,6EAA6E;IACtE,KAAK,CAAC,eAAe,CAC1B,aAA4B,EAC5B,YAAkC;QAElC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;QAC3D,MAAM,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,QAAQ,EAAE,CAAC,CAAC;QACrE,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { JsonObject } from "./JsonValue.js";
|
|
3
|
+
/**
|
|
4
|
+
* The state of the target an intent was decided against, as the trusted
|
|
5
|
+
* runtime read it immediately before the authority was asked: its version
|
|
6
|
+
* (an ETag, a resource version, a row version), what the read said its state
|
|
7
|
+
* was, which read said so, and when.
|
|
8
|
+
*
|
|
9
|
+
* Revalidation at the claim catches a policy or a signal that changed. It
|
|
10
|
+
* cannot catch a target that changed underneath an unchanged policy: the
|
|
11
|
+
* firewall rule edited by someone else between the grant and the commit.
|
|
12
|
+
* The version closes that. It rides inside the hashed `context` under
|
|
13
|
+
* `agent_safe.precondition`, so a grant is issued for exactly that version;
|
|
14
|
+
* the authority carries it into the claim's attestation as
|
|
15
|
+
* `binding.expected_state_version`; and a verifying provider applies it as
|
|
16
|
+
* the precondition of its write, as an `If-Match` is, refusing
|
|
17
|
+
* `TARGET_STATE_CHANGED` when the target is no longer at that version.
|
|
18
|
+
*
|
|
19
|
+
* The runtime states it, never the agent: an agent's proposal cannot reach
|
|
20
|
+
* `context`, and a caller that writes the reserved key by hand is refused.
|
|
21
|
+
* An intent without one carries no `agent_safe` key at all and hashes
|
|
22
|
+
* exactly as it did before this existed.
|
|
23
|
+
*/
|
|
24
|
+
export declare const TargetPreconditionSchema: z.ZodObject<{
|
|
25
|
+
version: z.ZodString;
|
|
26
|
+
state: z.ZodOptional<z.ZodString>;
|
|
27
|
+
source: z.ZodString;
|
|
28
|
+
read_at: z.ZodString;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
export type TargetPrecondition = z.infer<typeof TargetPreconditionSchema>;
|
|
31
|
+
/**
|
|
32
|
+
* The precondition an intent was captured with, read back from its context.
|
|
33
|
+
* Anything that does not parse is no precondition rather than a partial one.
|
|
34
|
+
*/
|
|
35
|
+
export declare function preconditionOf(context: JsonObject): TargetPrecondition | null;
|
|
36
|
+
//# sourceMappingURL=TargetPrecondition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TargetPrecondition.d.ts","sourceRoot":"","sources":["../../src/intent/TargetPrecondition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB;;;;;kBAqBnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,kBAAkB,GAAG,IAAI,CAQ7E"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { RESERVED_CONTEXT_AGENT_SAFE } from "./ExecutionSignals.js";
|
|
3
|
+
/**
|
|
4
|
+
* The state of the target an intent was decided against, as the trusted
|
|
5
|
+
* runtime read it immediately before the authority was asked: its version
|
|
6
|
+
* (an ETag, a resource version, a row version), what the read said its state
|
|
7
|
+
* was, which read said so, and when.
|
|
8
|
+
*
|
|
9
|
+
* Revalidation at the claim catches a policy or a signal that changed. It
|
|
10
|
+
* cannot catch a target that changed underneath an unchanged policy: the
|
|
11
|
+
* firewall rule edited by someone else between the grant and the commit.
|
|
12
|
+
* The version closes that. It rides inside the hashed `context` under
|
|
13
|
+
* `agent_safe.precondition`, so a grant is issued for exactly that version;
|
|
14
|
+
* the authority carries it into the claim's attestation as
|
|
15
|
+
* `binding.expected_state_version`; and a verifying provider applies it as
|
|
16
|
+
* the precondition of its write, as an `If-Match` is, refusing
|
|
17
|
+
* `TARGET_STATE_CHANGED` when the target is no longer at that version.
|
|
18
|
+
*
|
|
19
|
+
* The runtime states it, never the agent: an agent's proposal cannot reach
|
|
20
|
+
* `context`, and a caller that writes the reserved key by hand is refused.
|
|
21
|
+
* An intent without one carries no `agent_safe` key at all and hashes
|
|
22
|
+
* exactly as it did before this existed.
|
|
23
|
+
*/
|
|
24
|
+
export const TargetPreconditionSchema = z.strictObject({
|
|
25
|
+
/**
|
|
26
|
+
* Opaque, compared byte for byte: visible ASCII, so an entity tag keeps its
|
|
27
|
+
* quotes and its `W/`, and nothing in it can break a header line.
|
|
28
|
+
*/
|
|
29
|
+
version: z.string().regex(/^[\x21-\x7e]{1,256}$/),
|
|
30
|
+
/** The target's state as the read named it, for a transition rule to match; absent when the read names none. */
|
|
31
|
+
state: z
|
|
32
|
+
.string()
|
|
33
|
+
.min(1)
|
|
34
|
+
.max(200)
|
|
35
|
+
.regex(/^\P{Cc}+$/u)
|
|
36
|
+
.optional(),
|
|
37
|
+
/** Which read produced the version: `<profile>#<operation>` for a profile, or the adapter's own name. */
|
|
38
|
+
source: z
|
|
39
|
+
.string()
|
|
40
|
+
.min(1)
|
|
41
|
+
.max(200)
|
|
42
|
+
.regex(/^[a-z0-9][\w.:/#-]*$/i),
|
|
43
|
+
/** When the runtime read it, as `toISOString()` writes it. */
|
|
44
|
+
read_at: z.string().datetime(),
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* The precondition an intent was captured with, read back from its context.
|
|
48
|
+
* Anything that does not parse is no precondition rather than a partial one.
|
|
49
|
+
*/
|
|
50
|
+
export function preconditionOf(context) {
|
|
51
|
+
const namespace = context[RESERVED_CONTEXT_AGENT_SAFE];
|
|
52
|
+
const candidate = TargetPreconditionSchema.safeParse(namespace !== null && typeof namespace === "object" && !Array.isArray(namespace)
|
|
53
|
+
? namespace["precondition"]
|
|
54
|
+
: undefined);
|
|
55
|
+
return candidate.success ? candidate.data : null;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=TargetPrecondition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TargetPrecondition.js","sourceRoot":"","sources":["../../src/intent/TargetPrecondition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,YAAY,CAAC;IACrD;;;OAGG;IACH,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,sBAAsB,CAAC;IACjD,gHAAgH;IAChH,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,KAAK,CAAC,YAAY,CAAC;SACnB,QAAQ,EAAE;IACb,yGAAyG;IACzG,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,KAAK,CAAC,uBAAuB,CAAC;IACjC,8DAA8D;IAC9D,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAIH;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,OAAmB;IAChD,MAAM,SAAS,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACvD,MAAM,SAAS,GAAG,wBAAwB,CAAC,SAAS,CAClD,SAAS,KAAK,IAAI,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;QAC9E,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC;QAC3B,CAAC,CAAC,SAAS,CACd,CAAC;IACF,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ActionRegistry } from "../execution/ActionRegistry.js";
|
|
3
|
+
import { type JsonObject } from "../intent/JsonValue.js";
|
|
4
|
+
import { ApiProfile } from "../profile/ApiProfile.js";
|
|
5
|
+
import { type McpToolProfile } from "../profile/McpToolProfile.js";
|
|
6
|
+
/**
|
|
7
|
+
* `agent-safe.actions/1`: the action space an executor can run, as one
|
|
8
|
+
* document. Each entry is an action an intent can name, where it comes from
|
|
9
|
+
* (a family registered in code, an API profile's writes, an MCP profile's
|
|
10
|
+
* tools), the JSON Schema its parameters are admitted against, the target
|
|
11
|
+
* scopes it acts on, and the effect it produces when its source says.
|
|
12
|
+
*
|
|
13
|
+
* The authority reads it as the inventory a policy release has to cover:
|
|
14
|
+
* Decionis refuses a release that leaves a manifest action matched by no
|
|
15
|
+
* rule but its default. The contract is Decionis's (`ActionManifest` in its
|
|
16
|
+
* OpenAPI); this is the producer.
|
|
17
|
+
*/
|
|
18
|
+
export declare const ACTION_MANIFEST_CONTRACT = "agent-safe.actions/1";
|
|
19
|
+
/** The most actions one manifest lists, and the most target scopes one action names. */
|
|
20
|
+
export declare const MAX_MANIFEST_ACTIONS = 500;
|
|
21
|
+
export declare const MAX_ACTION_TARGETS = 64;
|
|
22
|
+
export declare const ActionManifestSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
23
|
+
kind: z.ZodLiteral<"registry">;
|
|
24
|
+
family: z.ZodString;
|
|
25
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
26
|
+
kind: z.ZodLiteral<"api">;
|
|
27
|
+
profile: z.ZodString;
|
|
28
|
+
operations: z.ZodArray<z.ZodString>;
|
|
29
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
30
|
+
kind: z.ZodLiteral<"mcp">;
|
|
31
|
+
profile: z.ZodString;
|
|
32
|
+
tool: z.ZodString;
|
|
33
|
+
}, z.core.$strict>], "kind">;
|
|
34
|
+
export declare const ActionManifestEntrySchema: z.ZodObject<{
|
|
35
|
+
action: z.ZodString;
|
|
36
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
37
|
+
kind: z.ZodLiteral<"registry">;
|
|
38
|
+
family: z.ZodString;
|
|
39
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
40
|
+
kind: z.ZodLiteral<"api">;
|
|
41
|
+
profile: z.ZodString;
|
|
42
|
+
operations: z.ZodArray<z.ZodString>;
|
|
43
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
44
|
+
kind: z.ZodLiteral<"mcp">;
|
|
45
|
+
profile: z.ZodString;
|
|
46
|
+
tool: z.ZodString;
|
|
47
|
+
}, z.core.$strict>], "kind">;
|
|
48
|
+
parameters: z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>;
|
|
49
|
+
targets: z.ZodArray<z.ZodString>;
|
|
50
|
+
effect_type: z.ZodNullable<z.ZodString>;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
export declare const ActionManifestSchema: z.ZodObject<{
|
|
53
|
+
manifest: z.ZodLiteral<"agent-safe.actions/1">;
|
|
54
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
55
|
+
action: z.ZodString;
|
|
56
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
57
|
+
kind: z.ZodLiteral<"registry">;
|
|
58
|
+
family: z.ZodString;
|
|
59
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
60
|
+
kind: z.ZodLiteral<"api">;
|
|
61
|
+
profile: z.ZodString;
|
|
62
|
+
operations: z.ZodArray<z.ZodString>;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
kind: z.ZodLiteral<"mcp">;
|
|
65
|
+
profile: z.ZodString;
|
|
66
|
+
tool: z.ZodString;
|
|
67
|
+
}, z.core.$strict>], "kind">;
|
|
68
|
+
parameters: z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>;
|
|
69
|
+
targets: z.ZodArray<z.ZodString>;
|
|
70
|
+
effect_type: z.ZodNullable<z.ZodString>;
|
|
71
|
+
}, z.core.$strict>>;
|
|
72
|
+
}, z.core.$strict>;
|
|
73
|
+
export type ActionManifestSource = z.infer<typeof ActionManifestSourceSchema>;
|
|
74
|
+
export type ActionManifestEntry = z.infer<typeof ActionManifestEntrySchema>;
|
|
75
|
+
export type ActionManifestDocument = z.infer<typeof ActionManifestSchema>;
|
|
76
|
+
/** What a registry cannot say about an action and its family can: where it acts, and its effect. */
|
|
77
|
+
export interface ActionAnnotation {
|
|
78
|
+
readonly targets: readonly string[];
|
|
79
|
+
readonly effectType: string | null;
|
|
80
|
+
}
|
|
81
|
+
export declare class ActionManifestError extends Error {
|
|
82
|
+
readonly code: "ACTION_MANIFEST_DUPLICATE_ACTION" | "ACTION_MANIFEST_INVALID";
|
|
83
|
+
readonly detail: string;
|
|
84
|
+
constructor(code: "ACTION_MANIFEST_DUPLICATE_ACTION" | "ACTION_MANIFEST_INVALID", detail: string);
|
|
85
|
+
}
|
|
86
|
+
export declare class ActionManifest {
|
|
87
|
+
/**
|
|
88
|
+
* A parameters schema as JSON Schema: the input side, since that is what an
|
|
89
|
+
* intent carries, and a check zod cannot express (a refinement, a custom
|
|
90
|
+
* type) as an open schema rather than a refusal to describe the action.
|
|
91
|
+
*/
|
|
92
|
+
static parametersJsonSchema(schema: z.ZodType): JsonObject;
|
|
93
|
+
/** A sealed registry's actions, each annotated by the family that registered it. */
|
|
94
|
+
static fromRegistry(registry: ActionRegistry, family: string, annotate: (action: string) => ActionAnnotation): ActionManifestEntry[];
|
|
95
|
+
/**
|
|
96
|
+
* An API profile's write actions, one entry each, with every operation that
|
|
97
|
+
* becomes it and that operation's method and path template as a target. A
|
|
98
|
+
* read is never an intent, so it is not in the action space.
|
|
99
|
+
*/
|
|
100
|
+
static fromApiProfile(profile: ApiProfile, parametersSchema: z.ZodType): ActionManifestEntry[];
|
|
101
|
+
/** An MCP profile's tools, one entry each, admitted against the tool's declared arguments. */
|
|
102
|
+
static fromMcpProfile(profile: McpToolProfile): ActionManifestEntry[];
|
|
103
|
+
/**
|
|
104
|
+
* The document: every entry once, in code-point order of its action, held
|
|
105
|
+
* to the contract. An action two sources both produce is refused by name,
|
|
106
|
+
* since a grant names an action and only one handler can run under it.
|
|
107
|
+
*/
|
|
108
|
+
static document(entries: readonly ActionManifestEntry[]): ActionManifestDocument;
|
|
109
|
+
/** `sha256:` over the RFC 8785 form: what a signed release manifest records as `actionManifestDigest`. */
|
|
110
|
+
static digest(document: ActionManifestDocument): `sha256:${string}`;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=ActionManifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionManifest.d.ts","sourceRoot":"","sources":["../../src/manifest/ActionManifest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EAAoB,KAAK,UAAU,EAAkB,MAAM,wBAAwB,CAAC;AAC3F,OAAO,EAEL,UAAU,EAEX,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,8BAA8B,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,yBAAyB,CAAC;AAE/D,wFAAwF;AACxF,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAOrC,eAAO,MAAM,0BAA0B;;;;;;;;;;;4BAqBrC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;kBAYpC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;kBAe7B,CAAC;AAEL,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE1E,oGAAoG;AACpG,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,qBAAa,mBAAoB,SAAQ,KAAK;aAE1B,IAAI,EAAE,kCAAkC,GAAG,yBAAyB;aACpE,MAAM,EAAE,MAAM;gBADd,IAAI,EAAE,kCAAkC,GAAG,yBAAyB,EACpE,MAAM,EAAE,MAAM;CAKjC;AAED,qBAAa,cAAc;IACzB;;;;OAIG;WACW,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,UAAU;IAUjE,oFAAoF;WACtE,YAAY,CACxB,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,gBAAgB,GAC7C,mBAAmB,EAAE;IAaxB;;;;OAIG;WACW,cAAc,CAC1B,OAAO,EAAE,UAAU,EACnB,gBAAgB,EAAE,CAAC,CAAC,OAAO,GAC1B,mBAAmB,EAAE;IAsBxB,8FAA8F;WAChF,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,mBAAmB,EAAE;IAa5E;;;;OAIG;WACW,QAAQ,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,GAAG,sBAAsB;IAsBvF,0GAA0G;WAC5F,MAAM,CAAC,QAAQ,EAAE,sBAAsB,GAAG,UAAU,MAAM,EAAE;CAI3E"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { CanonicalIntentHasher } from "../intent/CanonicalIntentHasher.js";
|
|
4
|
+
import { JsonObjectSchema } from "../intent/JsonValue.js";
|
|
5
|
+
import { ApiOperationSchema, ApiProfile, ApiProfileDefinitionSchema, } from "../profile/ApiProfile.js";
|
|
6
|
+
import { McpProfileDefinitionSchema, McpToolSchema, } from "../profile/McpToolProfile.js";
|
|
7
|
+
/**
|
|
8
|
+
* `agent-safe.actions/1`: the action space an executor can run, as one
|
|
9
|
+
* document. Each entry is an action an intent can name, where it comes from
|
|
10
|
+
* (a family registered in code, an API profile's writes, an MCP profile's
|
|
11
|
+
* tools), the JSON Schema its parameters are admitted against, the target
|
|
12
|
+
* scopes it acts on, and the effect it produces when its source says.
|
|
13
|
+
*
|
|
14
|
+
* The authority reads it as the inventory a policy release has to cover:
|
|
15
|
+
* Decionis refuses a release that leaves a manifest action matched by no
|
|
16
|
+
* rule but its default. The contract is Decionis's (`ActionManifest` in its
|
|
17
|
+
* OpenAPI); this is the producer.
|
|
18
|
+
*/
|
|
19
|
+
export const ACTION_MANIFEST_CONTRACT = "agent-safe.actions/1";
|
|
20
|
+
/** The most actions one manifest lists, and the most target scopes one action names. */
|
|
21
|
+
export const MAX_MANIFEST_ACTIONS = 500;
|
|
22
|
+
export const MAX_ACTION_TARGETS = 64;
|
|
23
|
+
const actionName = z
|
|
24
|
+
.string()
|
|
25
|
+
.max(120)
|
|
26
|
+
.regex(/^[a-z][a-z0-9._:-]*$/);
|
|
27
|
+
export const ActionManifestSourceSchema = z.discriminatedUnion("kind", [
|
|
28
|
+
/** A family registered in code, by the name its registration goes by. */
|
|
29
|
+
z.strictObject({
|
|
30
|
+
kind: z.literal("registry"),
|
|
31
|
+
family: z
|
|
32
|
+
.string()
|
|
33
|
+
.max(40)
|
|
34
|
+
.regex(/^[a-z][a-z0-9]*$/),
|
|
35
|
+
}),
|
|
36
|
+
/** An API profile's writes: the operations, in profile order, that become this action. */
|
|
37
|
+
z.strictObject({
|
|
38
|
+
kind: z.literal("api"),
|
|
39
|
+
profile: ApiProfileDefinitionSchema.shape.id,
|
|
40
|
+
operations: z.array(ApiOperationSchema.shape.id).min(1).max(200),
|
|
41
|
+
}),
|
|
42
|
+
/** An MCP profile's tool that becomes this action. */
|
|
43
|
+
z.strictObject({
|
|
44
|
+
kind: z.literal("mcp"),
|
|
45
|
+
profile: McpProfileDefinitionSchema.shape.id,
|
|
46
|
+
tool: McpToolSchema.shape.tool,
|
|
47
|
+
}),
|
|
48
|
+
]);
|
|
49
|
+
export const ActionManifestEntrySchema = z.strictObject({
|
|
50
|
+
action: actionName,
|
|
51
|
+
source: ActionManifestSourceSchema,
|
|
52
|
+
/** The JSON Schema (draft 2020-12, without `$schema`) the intent's parameters are admitted against. */
|
|
53
|
+
parameters: JsonObjectSchema,
|
|
54
|
+
/** Scope templates with `{name}` placeholders; none when the proposal names the target. */
|
|
55
|
+
targets: z.array(z.string().min(1).max(500)).max(MAX_ACTION_TARGETS),
|
|
56
|
+
/** The effect the action produces, when its source declares one. */
|
|
57
|
+
effect_type: z
|
|
58
|
+
.string()
|
|
59
|
+
.regex(/^[A-Z][A-Z0-9_]{0,119}$/)
|
|
60
|
+
.nullable(),
|
|
61
|
+
});
|
|
62
|
+
export const ActionManifestSchema = z
|
|
63
|
+
.strictObject({
|
|
64
|
+
manifest: z.literal(ACTION_MANIFEST_CONTRACT),
|
|
65
|
+
actions: z.array(ActionManifestEntrySchema).min(1).max(MAX_MANIFEST_ACTIONS),
|
|
66
|
+
})
|
|
67
|
+
.superRefine((value, context) => {
|
|
68
|
+
// Strictly ascending is sorted and unique at once: one action, one entry.
|
|
69
|
+
for (let index = 1; index < value.actions.length; index += 1) {
|
|
70
|
+
if (value.actions[index - 1].action >= value.actions[index].action)
|
|
71
|
+
context.addIssue({
|
|
72
|
+
code: "custom",
|
|
73
|
+
path: ["actions", index, "action"],
|
|
74
|
+
message: "actions are listed once each, in code-point order",
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
export class ActionManifestError extends Error {
|
|
79
|
+
code;
|
|
80
|
+
detail;
|
|
81
|
+
constructor(code, detail) {
|
|
82
|
+
super(code);
|
|
83
|
+
this.code = code;
|
|
84
|
+
this.detail = detail;
|
|
85
|
+
this.name = "ActionManifestError";
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export class ActionManifest {
|
|
89
|
+
/**
|
|
90
|
+
* A parameters schema as JSON Schema: the input side, since that is what an
|
|
91
|
+
* intent carries, and a check zod cannot express (a refinement, a custom
|
|
92
|
+
* type) as an open schema rather than a refusal to describe the action.
|
|
93
|
+
*/
|
|
94
|
+
static parametersJsonSchema(schema) {
|
|
95
|
+
const generated = z.toJSONSchema(schema, {
|
|
96
|
+
target: "draft-2020-12",
|
|
97
|
+
io: "input",
|
|
98
|
+
unrepresentable: "any",
|
|
99
|
+
});
|
|
100
|
+
delete generated["$schema"];
|
|
101
|
+
return generated;
|
|
102
|
+
}
|
|
103
|
+
/** A sealed registry's actions, each annotated by the family that registered it. */
|
|
104
|
+
static fromRegistry(registry, family, annotate) {
|
|
105
|
+
return registry.describe().map(({ action, parametersSchema }) => {
|
|
106
|
+
const annotation = annotate(action);
|
|
107
|
+
return {
|
|
108
|
+
action,
|
|
109
|
+
source: { kind: "registry", family },
|
|
110
|
+
parameters: ActionManifest.parametersJsonSchema(parametersSchema),
|
|
111
|
+
targets: [...annotation.targets],
|
|
112
|
+
effect_type: annotation.effectType,
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* An API profile's write actions, one entry each, with every operation that
|
|
118
|
+
* becomes it and that operation's method and path template as a target. A
|
|
119
|
+
* read is never an intent, so it is not in the action space.
|
|
120
|
+
*/
|
|
121
|
+
static fromApiProfile(profile, parametersSchema) {
|
|
122
|
+
const parameters = ActionManifest.parametersJsonSchema(parametersSchema);
|
|
123
|
+
return profile.actions().map((action) => {
|
|
124
|
+
const operations = profile.definition.operations.filter((operation) => !ApiProfile.isRead(operation) && operation.action === action);
|
|
125
|
+
return {
|
|
126
|
+
action,
|
|
127
|
+
source: {
|
|
128
|
+
kind: "api",
|
|
129
|
+
profile: profile.id,
|
|
130
|
+
operations: operations.map((operation) => operation.id),
|
|
131
|
+
},
|
|
132
|
+
parameters,
|
|
133
|
+
targets: [
|
|
134
|
+
...new Set(operations.map((operation) => `${operation.method} ${operation.path}`)),
|
|
135
|
+
],
|
|
136
|
+
effect_type: null,
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/** An MCP profile's tools, one entry each, admitted against the tool's declared arguments. */
|
|
141
|
+
static fromMcpProfile(profile) {
|
|
142
|
+
return profile.tools().map((name) => {
|
|
143
|
+
const tool = profile.tool(name);
|
|
144
|
+
return {
|
|
145
|
+
action: tool.action,
|
|
146
|
+
source: { kind: "mcp", profile: profile.id, tool: tool.tool },
|
|
147
|
+
parameters: ActionManifest.parametersJsonSchema(profile.argumentsSchema(name)),
|
|
148
|
+
targets: [tool.target],
|
|
149
|
+
effect_type: null,
|
|
150
|
+
};
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* The document: every entry once, in code-point order of its action, held
|
|
155
|
+
* to the contract. An action two sources both produce is refused by name,
|
|
156
|
+
* since a grant names an action and only one handler can run under it.
|
|
157
|
+
*/
|
|
158
|
+
static document(entries) {
|
|
159
|
+
const seen = new Set();
|
|
160
|
+
for (const entry of entries) {
|
|
161
|
+
if (seen.has(entry.action))
|
|
162
|
+
throw new ActionManifestError("ACTION_MANIFEST_DUPLICATE_ACTION", entry.action);
|
|
163
|
+
seen.add(entry.action);
|
|
164
|
+
}
|
|
165
|
+
const parsed = ActionManifestSchema.safeParse({
|
|
166
|
+
manifest: ACTION_MANIFEST_CONTRACT,
|
|
167
|
+
actions: [...entries].sort((a, b) => (a.action < b.action ? -1 : 1)),
|
|
168
|
+
});
|
|
169
|
+
if (!parsed.success)
|
|
170
|
+
throw new ActionManifestError("ACTION_MANIFEST_INVALID", parsed.error.issues
|
|
171
|
+
.slice(0, 3)
|
|
172
|
+
.map((issue) => `${issue.path.join(".") || "(root)"}: ${issue.message}`)
|
|
173
|
+
.join("; "));
|
|
174
|
+
return parsed.data;
|
|
175
|
+
}
|
|
176
|
+
/** `sha256:` over the RFC 8785 form: what a signed release manifest records as `actionManifestDigest`. */
|
|
177
|
+
static digest(document) {
|
|
178
|
+
const canonical = CanonicalIntentHasher.stringify(document);
|
|
179
|
+
return `sha256:${createHash("sha256").update(canonical, "utf8").digest("hex")}`;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=ActionManifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionManifest.js","sourceRoot":"","sources":["../../src/manifest/ActionManifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAmC,MAAM,wBAAwB,CAAC;AAC3F,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,0BAA0B,EAC1B,aAAa,GAEd,MAAM,8BAA8B,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAE/D,wFAAwF;AACxF,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACxC,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAErC,MAAM,UAAU,GAAG,CAAC;KACjB,MAAM,EAAE;KACR,GAAG,CAAC,GAAG,CAAC;KACR,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACrE,yEAAyE;IACzE,CAAC,CAAC,YAAY,CAAC;QACb,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;QAC3B,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,CAAC,EAAE,CAAC;aACP,KAAK,CAAC,kBAAkB,CAAC;KAC7B,CAAC;IACF,0FAA0F;IAC1F,CAAC,CAAC,YAAY,CAAC;QACb,IAAI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