caelum0x 256d9f9e77 Retire recoder-web and land agent-OS/A2A runtime infra
- 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)
2026-06-09 18:53:34 +03:00

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,
};
}