@axiastudio/aioc 0.2.2 → 0.2.3
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 +3 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/policy-composition.d.ts +6 -0
- package/dist/policy-composition.d.ts.map +1 -0
- package/dist/policy-composition.js +23 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Project home and documentation: [https://axiastudio.github.io/aioc](https://axia
|
|
|
8
8
|
|
|
9
9
|
## Release Status
|
|
10
10
|
|
|
11
|
-
Current stable release: `0.2.
|
|
11
|
+
Current stable release: `0.2.3`.
|
|
12
12
|
The stable line started with `0.1.0`.
|
|
13
13
|
The core runtime surface is compatibility-managed. Breaking changes to the stable surface should ship only with explicit migration guidance and release notes.
|
|
14
14
|
|
|
@@ -21,6 +21,7 @@ AIOC `0.1.2` adds approval evidence helpers for application-owned approval workf
|
|
|
21
21
|
AIOC `0.2.0` adds implemented runtime utilities and the Agent Harness Descriptor API. The core runtime remains compatibility-managed; descriptor shape and loader helpers are now part of the supported `0.2.x` surface and may evolve across `0.x` minor releases only with explicit migration guidance.
|
|
22
22
|
AIOC `0.2.1` realigns the `0.2.x` package line with the current `main` history after `0.2.0` was published from the descriptor release branch.
|
|
23
23
|
AIOC `0.2.2` completes the descriptor instruction-composition surface with reusable `instruction_parts`, ordered `instructions_sequence`, and boolean `where` gates.
|
|
24
|
+
AIOC `0.2.3` adds RFC-0010 policy composition helpers for exact-name tool and handoff policy dispatch without changing runtime enforcement semantics.
|
|
24
25
|
|
|
25
26
|
- Release notes: `CHANGELOG.md`
|
|
26
27
|
- Historical beta contract snapshot: `docs/BETA-CONTRACT.md`
|
|
@@ -284,7 +285,7 @@ AIOC adopts the following non-negotiable principles:
|
|
|
284
285
|
- `docs/RFC-0007-thread-state-utilities.md` (`Accepted`)
|
|
285
286
|
- `docs/RFC-0008-run-stream-consumer-utilities.md` (`Accepted`)
|
|
286
287
|
- `docs/RFC-0009-governance-events-and-exporters.md` (`Experimental`)
|
|
287
|
-
- `docs/RFC-0010-policy-composition-helpers.md` (`
|
|
288
|
+
- `docs/RFC-0010-policy-composition-helpers.md` (`Accepted`)
|
|
288
289
|
- `docs/RFC-0011-agent-harness-descriptor.md` (`Accepted`)
|
|
289
290
|
- `docs/PRIVACY-BASELINE.md`
|
|
290
291
|
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./json";
|
|
|
9
9
|
export * from "./logger";
|
|
10
10
|
export * from "./messages";
|
|
11
11
|
export * from "./policy";
|
|
12
|
+
export * from "./policy-composition";
|
|
12
13
|
export * from "./proposal-hashing";
|
|
13
14
|
export * from "./provider-setup";
|
|
14
15
|
export * from "./providers/base";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,OAAO,CAAC;AACtB,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,OAAO,CAAC;AACtB,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ __exportStar(require("./json"), exports);
|
|
|
25
25
|
__exportStar(require("./logger"), exports);
|
|
26
26
|
__exportStar(require("./messages"), exports);
|
|
27
27
|
__exportStar(require("./policy"), exports);
|
|
28
|
+
__exportStar(require("./policy-composition"), exports);
|
|
28
29
|
__exportStar(require("./proposal-hashing"), exports);
|
|
29
30
|
__exportStar(require("./provider-setup"), exports);
|
|
30
31
|
__exportStar(require("./providers/base"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type HandoffPolicy, type ToolPolicy } from "./policy";
|
|
2
|
+
export type ToolPolicyMap<TContext = unknown> = Record<string, ToolPolicy<TContext>>;
|
|
3
|
+
export type HandoffPolicyMap<TContext = unknown> = Record<string, HandoffPolicy<TContext>>;
|
|
4
|
+
export declare function composeToolPolicies<TContext = unknown>(policies: ToolPolicyMap<TContext>): ToolPolicy<TContext>;
|
|
5
|
+
export declare function composeHandoffPolicies<TContext = unknown>(policies: HandoffPolicyMap<TContext>): HandoffPolicy<TContext>;
|
|
6
|
+
//# sourceMappingURL=policy-composition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy-composition.d.ts","sourceRoot":"","sources":["../src/policy-composition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAErE,MAAM,MAAM,aAAa,CAAC,QAAQ,GAAG,OAAO,IAAI,MAAM,CACpD,MAAM,EACN,UAAU,CAAC,QAAQ,CAAC,CACrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,QAAQ,GAAG,OAAO,IAAI,MAAM,CACvD,MAAM,EACN,aAAa,CAAC,QAAQ,CAAC,CACxB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,QAAQ,GAAG,OAAO,EACpD,QAAQ,EAAE,aAAa,CAAC,QAAQ,CAAC,GAChC,UAAU,CAAC,QAAQ,CAAC,CAUtB;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,GAAG,OAAO,EACvD,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GACnC,aAAa,CAAC,QAAQ,CAAC,CAUzB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.composeToolPolicies = composeToolPolicies;
|
|
4
|
+
exports.composeHandoffPolicies = composeHandoffPolicies;
|
|
5
|
+
const policy_1 = require("./policy");
|
|
6
|
+
function composeToolPolicies(policies) {
|
|
7
|
+
return (input) => {
|
|
8
|
+
const policy = policies[input.toolName] ?? policies["*"];
|
|
9
|
+
if (policy) {
|
|
10
|
+
return policy(input);
|
|
11
|
+
}
|
|
12
|
+
return (0, policy_1.deny)(`deny_unconfigured_tool_${input.toolName}`);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function composeHandoffPolicies(policies) {
|
|
16
|
+
return (input) => {
|
|
17
|
+
const policy = policies[input.toAgentName] ?? policies["*"];
|
|
18
|
+
if (policy) {
|
|
19
|
+
return policy(input);
|
|
20
|
+
}
|
|
21
|
+
return (0, policy_1.deny)(`deny_unconfigured_handoff_${input.toAgentName}`);
|
|
22
|
+
};
|
|
23
|
+
}
|