witnora

Witnora Controlled Action Runtime

The controlled action runtime is the production action-boundary layer in Witnora. packages/onegent-runtime remains an internal source module name; customers use the single public witnora package and the generated customer-owned Gateway.

Unlike MCPBench and Tripwire CI, it does not ask whether an agent should ship. It asks whether one live action should be allowed right now.

Implemented MVP

Customer integration surface

npx witnora@latest onboard --project <project-id>

The generated local Gateway client proposes high-risk actions, waits for the Hosted human decision, consumes a short-lived single-use execution grant, and routes the approved operation through the configured sandbox adapter. A separate read-only probe observes the outcome, after which Witnora issues the signed receipt automatically. Customers do not install or import the internal runtime module directly.

The internal reference implementation keeps these boundaries explicit:

The checked-in adapter path is local and deterministic:

Real systems should only be added behind explicit credential, approval, rollback, verification, and audit boundaries.

Sandbox Conformance Harness

Onegent now includes a tenant-scoped, local-only conformance harness between the mock demo and any future vendor sandbox. It enforces synthetic seed data, deny-by-default network access, target allowlists, explicit idempotency keys, identified approval, per-action and per-run limits, global and tenant kill switches, observed-state verification, rollback, and deterministic reset.

npx witnora@latest sandbox init
npx witnora@latest sandbox certify --adapter ./witnora.sandbox.mjs

The active suite emits a versioned report covering ten controls. See Sandbox Conformance Harness v0.1 for the CLI flow, control table, schema, and customer-sandbox progression.

Procurement Walkthrough

The demo scenario is a ProcurementAgent submitting a $4,850 purchase order to Acme Industrial Supply. The purchase order starts in local mock ERP state DRAFT. Because purchase orders over $1,000 require human approval, the action is classified as HIGH risk and waits for approval before execution.

After approval, the runtime updates only the local mock ERP purchase order from DRAFT to SUBMITTED, verifies that the observed mock state matches the expected state, and generates an audit packet.

Run the static demo export:

npm --prefix packages/onegent-runtime ci
npm --prefix packages/onegent-runtime run build
npm --prefix packages/onegent-runtime run demo:procurement

Run with an explicit policy file:

npm --prefix packages/onegent-runtime run demo:procurement -- --policy onegent.policy.json

Run the local server:

npm --prefix packages/onegent-runtime run serve

Open:

http://localhost:3310/action-gateway/walkthrough/procurement

Local API Routes

The current project has no web framework, so the MVP exposes framework-free local route equivalents through Node’s built-in HTTP server:

Policy-As-Code

Policy files use a small deterministic JSON format:

{
  "schemaVersion": "1",
  "rules": [
    {
      "id": "po-over-1000-requires-approval",
      "name": "Purchase orders over $1,000 require approval",
      "description": "High-value purchase order submissions must be reviewed before mock execution.",
      "actionTypes": ["SUBMIT"],
      "effect": "REQUIRE_APPROVAL",
      "enabled": true,
      "conditions": [
        {
          "field": "amount",
          "operator": "greaterThan",
          "value": 1000
        }
      ]
    }
  ]
}

Supported effects:

Supported operators:

Non-Goals

Production integrations should only be added behind explicit adapters, credential boundaries, approval controls, and rollback/compensation design.