agents: add tool policy conformance snapshot (no runtime behavior change) (#6011)
This commit is contained in:
13
src/agents/tool-policy.conformance.test.ts
Normal file
13
src/agents/tool-policy.conformance.test.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { describe, expect, test } from "vitest";
|
||||
import { TOOL_POLICY_CONFORMANCE } from "./tool-policy.conformance.js";
|
||||
import { TOOL_GROUPS } from "./tool-policy.js";
|
||||
|
||||
describe("TOOL_POLICY_CONFORMANCE", () => {
|
||||
test("matches exported TOOL_GROUPS exactly", () => {
|
||||
expect(TOOL_POLICY_CONFORMANCE.toolGroups).toEqual(TOOL_GROUPS);
|
||||
});
|
||||
|
||||
test("is JSON-serializable", () => {
|
||||
expect(() => JSON.stringify(TOOL_POLICY_CONFORMANCE)).not.toThrow();
|
||||
});
|
||||
});
|
||||
17
src/agents/tool-policy.conformance.ts
Normal file
17
src/agents/tool-policy.conformance.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Conformance snapshot for tool policy.
|
||||
*
|
||||
* Security note:
|
||||
* - This is static, build-time information (no runtime I/O, no network exposure).
|
||||
* - Intended for CI/tools to detect drift between the implementation policy and
|
||||
* the formal models/extractors.
|
||||
*/
|
||||
|
||||
import { TOOL_GROUPS } from "./tool-policy.js";
|
||||
|
||||
// Tool name aliases are intentionally not exported from tool-policy today.
|
||||
// Keep the conformance snapshot focused on exported policy constants.
|
||||
|
||||
export const TOOL_POLICY_CONFORMANCE = {
|
||||
toolGroups: TOOL_GROUPS,
|
||||
} as const;
|
||||
Reference in New Issue
Block a user