MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / ROW

Function ROW

packages/core/sdk/src/policies.test.ts:111–127  ·  view source on GitHub ↗
(
    id: string,
    pattern: string,
    action: "approve" | "require_approval" | "block",
    position: string,
    owner: "org" | "user" = "org",
  )

Source from the content-addressed store, hash-verified

109describe("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).

Callers 1

policies.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected