Public API — authentication & agent scopes
editorzero treats every caller — human or agent — as a typed principal. There is no shadow-user pattern: an agent authenticates with its own credential, carries its own scopes, and is attributed independently in the audit log.
Principal kinds
Two kinds resolve from the same auth middleware: user (session cookie or human PAT) and agent (long-lived API key or short-lived delegated token). The dispatcher only ever sees a resolved Principal — it never learns which credential produced it.
act.sub claim. Effective permission is intersect(agent.scopes, delegator.permissions) — an agent can never exceed the human who delegated to it.Scope tiers
Agents are provisioned against one of four tiers. Tiers are presets over the raw scope vocabulary; a custom set is always allowed.
read-only—doc:read · block:read · search:readauthor— addsdoc:write · block:write · comment:writeeditor— addsdoc:publish · comment:resolveadmin— full workspace administration
Authenticating a request
# issue an author-tier key for an agent ez agent create --name docwright --tier author # → ezk_live_01JQ… (shown once) curl https://acme-corp.ez/api/docs \ -H "Authorization: Bearer ezk_live_01JQ…"
Rate limits, revocation, and trash recovery all have agent equivalents — every control a human has, an agent has too. See Onboarding new agents for the full lifecycle.