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

Function rowToToolPolicy

packages/core/sdk/src/policies.ts:246–254  ·  view source on GitHub ↗
(row: ToolPolicyRow)

Source from the content-addressed store, hash-verified

244// ---------------------------------------------------------------------------
245
246export const rowToToolPolicy = (row: ToolPolicyRow): ToolPolicy => ({
247 id: PolicyId.make(row.id),
248 owner: row.owner as Owner,
249 pattern: row.pattern,
250 action: row.action as ToolPolicyAction,
251 position: row.position,
252 createdAt: row.created_at,
253 updatedAt: row.updated_at,
254});
255
256export const ToolPolicyActionSchema = Schema.Literals(["approve", "require_approval", "block"]);

Callers 2

policiesCreateFunction · 0.90
policiesUpdateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected