Skip to content

Client ergonomics (Layer 1a): typed Ref, lossless transition, single-actor governance sugar, origin config #10

Description

@styk-tv

Reduce the code a user writes — grounded in the v1.5.4 seal-half proof, where we hit reply-shape guessing, bare() URN surgery, the propose→vote→apply dance for a single-actor act, and had to drop to raw do() because transition() sugar strips from/allowed.

Pure-client, non-breaking:

  • Typed Ref (.id/.urn/.local) returned by writes → kill reply-shape guessing and bare().
  • Lossless transition() → surface {ok, from, to, allowed} instead of a reduced writeResult (no dropping to do()).
  • Single-actor governance sugark.setTransitionMap(type, map) / generic k.govern(op, detail) = propose→vote→apply at quorum 1, returning the applied result (no manual proposal-id extraction).
  • Origin-derived config defaults — drop wssEndpoint/hydrate/dispatchTimeout boilerplate where a same-origin browser can derive them.

doFresh is the template: a method that absorbs the complexity and stays honest. This is the foundation the notation compiler (#7) stands on.

Future (separate, gated): Layer 1b — server-derived genesis state (stop passing lifecycle_state) + transitionsFrom(id) legal-now targets — needs pgCK to expose the declared lifecycle/genome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Priority 2 — soonenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions