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

Function policyToResponse

packages/core/api/src/handlers/policies.ts:9–17  ·  view source on GitHub ↗
(p: ToolPolicy)

Source from the content-addressed store, hash-verified

7import { capture } from "@executor-js/api";
8
9const policyToResponse = (p: ToolPolicy) => ({
10 id: p.id,
11 owner: p.owner,
12 pattern: p.pattern,
13 action: p.action,
14 position: p.position,
15 createdAt: p.createdAt.getTime(),
16 updatedAt: p.updatedAt.getTime(),
17});
18
19export const PoliciesHandlers = HttpApiBuilder.group(ExecutorApi, "policies", (handlers) =>
20 handlers

Callers 1

policies.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected