- Remove retired recoder-web app surface (~2.1k files) - Add a2a-sdk package, agent-OS scripts, MCP/A2A smoke + verification tooling - Update docker-backend src/dist, .claude rules/hooks, packages (auth, shared)
17 lines
621 B
TypeScript
17 lines
621 B
TypeScript
import type { PolicyDecision } from '@recoder/agent-os';
|
|
import type { PolicyInput } from './engine';
|
|
|
|
export function decision(input: PolicyInput, effect: PolicyDecision['effect'], reason: string, findings?: Array<Record<string, unknown>>): PolicyDecision {
|
|
return {
|
|
decisionId: `policy_${Date.now()}_${Math.random().toString(16).slice(2)}`,
|
|
effect,
|
|
action: input.action,
|
|
actorAgentId: input.actor.agentId,
|
|
taskId: input.task?.taskId,
|
|
reason,
|
|
createdAt: input.now ?? new Date().toISOString(),
|
|
approval: effect === 'needs_approval' ? { required: true } : undefined,
|
|
findings,
|
|
};
|
|
}
|