Skip to content

write scope: principal classes a plugin defines (#2524 D5 domain classes) #3080

Closed

Description

@lex00

#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.

Found while doing #2548.

Activity

  1. added
    area:workspace
    level:3
    on Oct 1, 2026
  2. lex00 commented on Oct 3, 2026

    @lex00
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workspacelevel:3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions