RTQ

RTQ Documentation

Dependency-free capability-security runtime. Every operation is an explicitly registered capability; every authorization is a short-lived, single-use, cryptographically-signed ticket.

Command → Capability (registered) → Risk (authoritative) → Policy (default-deny)
   → Clarification → Approval (human/device) → Ticket (signed, single-use)
   → Execution (OS-sandboxed) → Audit (redacted)

Quick start

import { createRTQ } from "@rtq/security";

const rtq = createRTQ({ signingKey: process.env.RTQ_SIGNING_KEY! });

rtq.registerCapability({
  name: "files.read",
  version: 1,
  description: "Read a file inside the workspace",
  inputSchema: { type: "object", properties: { path: { type: "string" } }, required: ["path"] },
  risk: { base: "low" },
  execute: async (ctx, input) => ({ ok: true, data: { input } }),
});