@sema-agent/core
Version:
Stateless, task-oriented AI agent core
19 lines (18 loc) • 823 B
JavaScript
export const SAFETY_AXIS_VOCABULARY = {
toolEffect: ["read", "write", "idempotent"],
egress: [true, false],
irreversibility: ["never", "maybe", "always"],
safetyAxis: ["egress", "irreversible", "shell"],
severity: [1, 2, 3, 4, 5],
shellGate: ["always"],
permissionDecision: ["allow", "ask", "deny"],
};
const _toolEffectExhaustive = true;
void _toolEffectExhaustive;
export function markTightenMessage(toolName, mark) {
if (mark === "interaction")
return `tool "${toolName}" asks for a person's confirmation (server-declared) — explicit approval required`;
return mark === "egress"
? `tool "${toolName}" performs an external write (egress) — explicit approval required`
: `tool "${toolName}" performs an irreversible action — explicit approval required`;
}