You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
write scope: principal classes a plugin defines (#2524 D5 domain classes) #3080
#2524 D5 lists human, agent, runner and service as core principal classes, "domain classes from plugins". #2548 (PR #3078, ws-067) ships write scope for the four core classes only: writeScope accepts those keys, and a principal's class is read from the agent, runner and service role grants at base.
A plugin-defined class needs: a place the plugin declares the class name (data-only, like ./workspace-kinds), a rule for which role grant puts a principal in it, and writeScope accepting the name. Until then a domain principal is a human for write scope.
Design, recorded as ws-079 in #3342. A plugin names domain classes in a data-only ./workspace-principals file (a sibling of ./workspace-kinds, so older chants still read a plugin's kinds). Each class is { name, description, role }: the role whose grant in the trust policy at base puts a principal in it. writeScope takes any class name. A principal is judged by the first core role it holds (agent, runner, service), then the first domain class in pin order, else human. classesOf() in principal-classes.ts lists every class a principal is in; that is the hook #3163 uses to ask whether a forge identity or signer is in a declared class. Path pins are read at base for write scope so a change can't remap a class. A writeScope key no pin supplies fails closed: WSP003 in workspace check, and a writer judged human is refused with the new code write-scope-class-unknown.
Activity
lex00 commentedon Oct 3, 2026
Design, recorded as ws-079 in #3342. A plugin names domain classes in a data-only ./workspace-principals file (a sibling of ./workspace-kinds, so older chants still read a plugin's kinds). Each class is { name, description, role }: the role whose grant in the trust policy at base puts a principal in it. writeScope takes any class name. A principal is judged by the first core role it holds (agent, runner, service), then the first domain class in pin order, else human. classesOf() in principal-classes.ts lists every class a principal is in; that is the hook #3163 uses to ask whether a forge identity or signer is in a declared class. Path pins are read at base for write scope so a change can't remap a class. A writeScope key no pin supplies fails closed: WSP003 in workspace check, and a writer judged human is refused with the new code write-scope-class-unknown.