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

Function rowToToolPolicy

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

Source from the content-addressed store, hash-verified

285// ---------------------------------------------------------------------------
286
287export const rowToToolPolicy = (row: ToolPolicyRow): ToolPolicy => ({
288 id: PolicyId.make(row.id),
289 owner: row.owner as Owner,
290 pattern: row.pattern,
291 action: row.action as ToolPolicyAction,
292 position: row.position,
293 createdAt: row.created_at,
294 updatedAt: row.updated_at,
295});
296
297export 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