Function
ROW
(
id: string,
pattern: string,
action: "approve" | "require_approval" | "block",
position: string,
owner: "org" | "user" = "org",
)
Source from the content-addressed store, hash-verified
| 109 | describe("resolveToolPolicy", () => { |
| 110 | // v2: policy rows carry `owner` (org|user) instead of a scope id. |
| 111 | const ROW = ( |
| 112 | id: string, |
| 113 | pattern: string, |
| 114 | action: "approve" | "require_approval" | "block", |
| 115 | position: string, |
| 116 | owner: "org" | "user" = "org", |
| 117 | ): ToolPolicyRow => |
| 118 | ({ |
| 119 | id, |
| 120 | owner, |
| 121 | subject: owner === "org" ? "" : "u", |
| 122 | pattern, |
| 123 | action, |
| 124 | position, |
| 125 | created_at: new Date(0), |
| 126 | updated_at: new Date(0), |
| 127 | }) as ToolPolicyRow; |
| 128 | |
| 129 | const flatRank = () => 0; // single-owner tests |
| 130 | // user = 0 (inner), org = 1 (outer). |
Tested by
no test coverage detected