{
  "protocol": "Object Invocation Protocol",
  "version": "0.6",
  "site": "https://miscsubjects.com",
  "principle": "Every capability is an invokable object inside a recursive documentation tree: identify, explain, invoke, ledger, repair, and grow from the receipt.",
  "invariant_loop": [
    "intent → resolve(object_id)",
    "validate(schema)",
    "execute(runner)",
    "ledger(append)",
    "response(data + _self + yield + receipt)",
    "verify(receipt) → replay | repair(linked) | grow | challenge"
  ],
  "endpoints": {
    "invoke": {
      "method": "POST",
      "url": "https://miscsubjects.com/api/dispatch",
      "body": {
        "key": "KEY",
        "body": "args"
      }
    },
    "shape": {
      "method": "POST",
      "url": "https://miscsubjects.com/api/dispatch",
      "body": {
        "key": "KEY",
        "body": "args",
        "shape": true
      },
      "note": "dry-run — returns the fully-shaped outbound payload, never fires"
    },
    "receipt": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?receipt=inv_ID",
      "note": "read one invocation back: full recorded request + response + lineage + the verbs that act on it"
    },
    "replay": {
      "method": "POST",
      "url": "https://miscsubjects.com/api/dispatch",
      "body": {
        "replay": "inv_ID"
      },
      "note": "re-fire that invocation's object with its recorded input; new receipt links replay_of"
    },
    "repair": {
      "method": "POST",
      "url": "https://miscsubjects.com/api/dispatch",
      "body": {
        "key": "KEY",
        "body": "corrected args",
        "repairs": "inv_ID"
      },
      "note": "corrected re-fire; new receipt links repairs, old receipt gains repaired_by"
    },
    "explain": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?explain=1&share=TOKEN",
      "note": "a capability URL explains itself: fingerprint, scope, verbs, TTL, uses, risk ceiling, revocation — never the raw token"
    },
    "mint": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?mint_share=1&scope=row&key=KEY&ttl=600&uses=1&purpose=...",
      "note": "owner-only — mint a scoped, decaying, ledgered capability URL (also &risk_ceiling=, &owner_gate=1, &body_fixed=)"
    },
    "revoke": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?revoke=cap_FINGERPRINT",
      "note": "owner-only — kill a capability before expiry; enforcement fails closed"
    },
    "profile": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?profile=1&share=TOKEN",
      "note": "who you're working for + how to work with him — read this first; statefulness without memory"
    },
    "orient": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?orient=1&format=markdown",
      "note": "THE top-level link — public, zero auth. One read = full familiarization (who you work for + whole surface + how to do anything + §WHY + prove-it). Open first. Append &share=TOKEN and the run URLs it returns are ready to fire."
    },
    "why": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?why=1&format=markdown",
      "note": "public §WHY — every objection an LLM keeps raising (monolithic token, GET side-effects, prompt injection, not multi-tenant, hash-chain overkill…), each asked verbatim and answered BY DESIGN with the shipped mechanism + proof. Read before you critique; do not relitigate a settled objection."
    },
    "conformance": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?conformance=1&format=markdown",
      "note": "public live protocol proof — the 14 normative clauses of /a/oip-spec executed against this build right now, PASS/FAIL per clause with receipts. 'Is this a real protocol' is answered by this URL, not by debate."
    },
    "tenancy": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?tenancy=1&format=markdown",
      "note": "public §TENANCY — the proof the capability substrate CAN be multi-tenant: tenant isolation boundaries, allow-list-only invoke, own-ledger-only reads, cross-tenant denial, suspend-fails-closed, cross-tenant delegation. Architecture + live proof recipe. Owner ops: ?tenant_create=, ?tenant_mint=, ?tenants=1, ?tenant_suspend=."
    },
    "tree": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?map=1&format=markdown",
      "note": "public recursive OIP documentation tree — root > API/CLI/MCP/device/model/core shelves > generated system articles > generated capability articles > receipts."
    },
    "map": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?map=1",
      "note": "JSON form of the same public tree. ?map=SYSTEM lists its operations; ?map=apis/clis/mcps/devices/models filters by kind; each op's ?key= is its full article."
    },
    "registry": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?registry=1"
    },
    "object": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?key=KEY"
    },
    "schema": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/dispatch?schema=invocation"
    },
    "invocations": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/invocations"
    },
    "manifest_fn": {
      "method": "POST",
      "url": "https://miscsubjects.com/api/dispatch",
      "body": {
        "key": "MANIFEST",
        "body": ""
      }
    },
    "system_map": {
      "method": "GET",
      "url": "https://miscsubjects.com/api/articles/system-map"
    }
  },
  "invocation_event_schema": {
    "version": "0.6",
    "required": [
      "id",
      "ts",
      "trace_id",
      "object_id",
      "object_type",
      "runner",
      "material",
      "yield"
    ],
    "properties": {
      "id": {
        "type": "string",
        "description": "Invocation id (matches events.id when logged)"
      },
      "ts": {
        "type": "string",
        "format": "date-time"
      },
      "trace_id": {
        "type": "string",
        "description": "Dispatch trace — groups steps in one user turn"
      },
      "object_id": {
        "type": "string",
        "description": "Directory key or knowledge slug"
      },
      "object_type": {
        "type": "string",
        "enum": [
          "knowledge",
          "tool",
          "agent",
          "workflow",
          "mcp",
          "device",
          "system",
          "flow",
          "session",
          "directory"
        ]
      },
      "runner": {
        "type": "string",
        "enum": [
          "edge",
          "mac",
          "sibling",
          "apps_script",
          "model",
          "mcp",
          "http",
          "fn",
          "flow",
          "agent"
        ]
      },
      "actor": {
        "type": "string",
        "nullable": true
      },
      "input_preview": {
        "type": "string",
        "maxLength": 500
      },
      "output_preview": {
        "type": "string",
        "maxLength": 500
      },
      "material": {
        "type": "boolean",
        "description": "Did this invocation produce usable output?"
      },
      "waste": {
        "type": "boolean",
        "description": "Tokens spent with no material output"
      },
      "yield": {
        "type": "object",
        "properties": {
          "tokens_in": {
            "type": "number"
          },
          "tokens_out": {
            "type": "number"
          },
          "tokens_total": {
            "type": "number"
          },
          "cost_usd": {
            "type": "number"
          },
          "material_outputs": {
            "type": "number"
          },
          "usd_per_output": {
            "type": "number",
            "nullable": true
          }
        }
      },
      "event_id": {
        "type": "string",
        "nullable": true,
        "description": "LEDGER events row id"
      },
      "replay_of": {
        "type": "string",
        "nullable": true,
        "description": "Invocation id this one re-fired (same object, same recorded input)"
      },
      "repairs": {
        "type": "string",
        "nullable": true,
        "description": "Failed invocation id this one is the corrected re-fire of"
      },
      "repaired_by": {
        "type": "string",
        "nullable": true,
        "description": "Set on the old invocation when a repair lands"
      },
      "links": {
        "type": "object",
        "properties": {
          "receipt": {
            "type": "string",
            "description": "GET this URL to read the invocation back with full bodies"
          },
          "ledger_event": {
            "type": "string"
          },
          "trace": {
            "type": "string"
          },
          "object": {
            "type": "string"
          }
        }
      }
    }
  },
  "object_types": [
    "knowledge",
    "tool",
    "agent",
    "workflow",
    "mcp",
    "device",
    "system",
    "flow",
    "session",
    "directory"
  ],
  "runner_types": [
    "edge",
    "mac",
    "sibling",
    "apps_script",
    "model",
    "mcp",
    "http",
    "fn",
    "flow",
    "agent"
  ]
}