Skip to content

OnlyWorlds Unity SDK 0.26.0

Choose a tag to compare

@tmoosting tmoosting released this 30 Oct 15:58
· 301 commits to main since this release

Serials 88 to 96 in Unity, with the lens and graph readers on every reading the lens profile's owner ruled ahead of
them: a hidden element a guest only knows of is out of that guest's view, a lens whose anchors are empty strings is
a filter, a served body carries the hidden mark as the wire serves it, and a link reaches only an element of its
field's type. New: OWOpeners.For and OWTools.All (the rows of an "Open with" menu), OWLinkListener and an
opt-in Windows forwarder for ow:// links, OWListParams.Filter (list by a single link) and OWReadingAids (the
Charter, Guide and Domains as the API serves them). A minor release because it adds public API (below).

Changed

  • Schema pin to v0.33.0-dist.96: two graph cases on a guest's own hidden creation (out of an unlensed graph with no
    count and no counted cut edge; a node of a lensed graph that keeps it, marked hidden, its edge to an element the
    lens never reached outside_lens), which OWGraph.Read already answered so.
  • Schema pin to v0.33.0-dist.95: five new cases across the charter, lens and message fixtures, and pairs.json
    beside presentation.json (vendored with the rest; no reader for it here yet). OWMessage.ReadMarkOf takes
    keyless, as IsToEveryone does: a mark served without a credential is ignored, since the keyless public reader
    is served no created_by or changed_by on any body.
  • Hidden beats known_of: a hidden element named in a guest's known_of that is not its own creation is not in that
    guest's view (OWLens.Resolve, OWGraph.Read, and the owner reading as that guest): no stub, no row, no node, no
    count and no mark; a link to it is left out of the guest's served lists, and the owner reading as the guest counts
    an edge to it not_visible and an anchor on it anchor_not_visible. A hidden id in a guest's whole stays its own
    creation, served whole and marked.
  • Schema pin to v0.33.0-dist.94: the charter, lens and names fixtures' twenty-four new cases. OWLens.Resolve reads
    an anchor list's empty or White_Space-only string as no id, so a lens holding only such strings is a filter; a
    served body carries hidden: true where the hidden mark keeps the element (the owner's body, and below the owner
    a guest's own creation, never a stub), and no hidden key otherwise, a stored false dropped. OWCharter's Domain
    hubs leave out an element the reader does not see as the field's type, so a proposed Object is no hub, the owner's
    view included.
  • A single link stored as "" is served as stored to every reader below the owner, in OWLens.Resolve's rows, its
    mail rows and the bodies a graph reads: "", never null, and never named in x_served_trimmed, since no id was
    left out, so a Message whose narrator is "" no longer claims a hidden sender.
  • OWLens.Resolve (and OWGraph.Read with a lens) follows the lens profile owner's rulings on readings no fixture
    case decided yet, ahead of the fixture's next serial, which carries a case for each: a link reaches only an element
    of its field's target type, and a Pin's element_type/element_id pair only when its type is one of the 22 slugs
    exactly as stored, nothing trimmed or folded, so a stored "Character" links nothing and is served to a reader below
    the owner as an unset pair (rulings 1, 2); an anchor id no element of its field's type holds, a lens's own id under
    another type's field among them, is counted for the owner as anchor_not_visible, never skipped (3); a known-of
    stub keeps the base fields (change_seq too) and its type's public fields, a public link as the reader is served
    it, every other field at its unset value and no extension key (7); the mail part keeps two messages with one
    created_at in the order of the world's list, as the message profile rules, never by id (11, as the owner
    reversed it); a whole float in an x_lens key reads whole (depth: 2.0 is 2), and only a fraction is refused
    (13). Rulings 4 and 5 (an umbrella's hop keeps a child it reaches before entering
    it; a cut lens id stays counted) were already this reader's. Each change is held by a test named for its ruling.
  • OWGraph.Read follows the owner's rulings on the graph section's silences, ahead of the same serial: a Pin's
    generic pair is placement, never an edge (G2); a node's name is the stored value, null when absent, in ToJson
    (OWGraphNode.Name stays the string, or null) (G3); OWGraphNode.Type is as stored, never folded (G4); an edge's
    Index is the target's place in the link list as served to that reader, so a contributor's counts a link to a
    proposed element (G5). An edge to an anchor the reader cannot see already carried the lens's anchor_not_visible
    (G1). Ruling 1 reaches the edge list too: a schema link to an element of another type than its field's target (a
    Character's friends naming a Location) names nothing, a dangling link, neither an edge nor counted in EdgesCut.
  • OWCharter.CharterOf reads the Charter's name, rules and skill text from its body whole, as the platform does, so a
    reader holding the Charter only as a known-of stub still gets its rules; and a skill id matches an Object whatever
    the case of either id, as the platform compares UUIDs (an Object stored with an uppercase id was dropped).
  • Schema pin to v0.33.0-dist.92: a Zone leaves map space in the lens profile's graph. Zones are nodes by default,
    for a public reader too; Map, Pin and Marker stay out until MapSpace (OWGraph.MapSpaceTypes). The lens fixture
    in Tests/Editor/Fixtures/lens/ moves from dist.88 to dist.92 byte for byte with it; seven of its graph cases were red
    on the old table and pass now.
  • Schema pin to v0.33.0-dist.93: the lens fixture carries a case for each of the rulings above, nineteen new cases
    over a ninth world (171 in all: 86 resolve, 45 graph, 5 uses), and profiles/lens.md states each reading. The keys
    case keys-an-integral-float-is-refused-where-the-text-shows is retired for keys-an-integral-float-reads-whole.
    The fixture copy in Tests/Editor/Fixtures/lens/ moves to dist.93 byte for byte; every case passes.
  • The schema pin moves to dist.91 (v0.33.0-dist.91), and folders declare format 0.3.21 (OWFolderExport.FormatVersion).
    The folder lint now lists doors, the door history the API serves to a world's members, among the server-managed
    keys an element file may carry: a member's snapshot keeps it as served and never sends it up. The export already
    wrote a served body whole, so it kept doors before this change and a test now holds that, on a whole element and
    on a stub that carries it; the reader keeps it in the extensions bag. Nothing else in the schema or the readers
    moved. The folder export's expectations (the world_for_disk cases) were re-run against the Python package
    0.88.0: only format_version changed.
  • The schema pin moves to dist.90 (v0.33.0-dist.90). The calendar profile now says in words what the reader
    already did: an intercalary entry on a calendar with no months is not a calendar, whatever its after_month, 0
    included. The calendar fixture grows to 76 cases (42 refusals, 209 steps) with one new refusal,
    refuse-intercalary-no-months-after-month-0, which OWCalendar passes unchanged. The lens profile's founder
    sentence (a lens names its founder only where the writer has a Character of their own) concerns writers; this
    SDK writes no lens. The supertype and subtype descriptions now say "within its type"; the generated models
    carry neither description, so only the serial stamps change.
  • The schema pin moves to dist.89 (v0.33.0-dist.89), by way of dist.88. dist.88 moved nothing in the schema or
    the readers: the lens fixture gains a graph case whose elements carry an empty review mark, an object and a string,
    both nodes with no proposed mark, which OWGraph passes. dist.89 amends the calendar and message profiles (below);
    the calendar fixture grows to 75 cases (41 refusals, 209 steps, one case that finds calendars in a world's
    elements) and the message fixture to 87, and every case passes. Three of its rulings the readers already kept:
    OWMessage reads created_at as an instant (an offset and a fraction of a second counted) and takes the newest
    Note wherever it stands in the list, and a format or format_intercalary that is not a string is ignored, so
    the default template prints.
  • GetMeAsync's summary says what name is: your agent's or your player's name, served on those seats only, as
    the server serves it. Docs only; parity with the TypeScript SDK 4.102.4.

Added

  • OWReadingAids.Of(answer): the world's reading aids as keel serves them, reading_aids beside front_door in a
    GET /me answer (OWClient.GetMeAsync): the Charter {id, name, rules, skill}, the Guide {id, name} and the
    Domains {id, name, sentence, hubs}, read as served for the key (keel's reading, not recomputed); null from an
    older keel. An agent's join answer carries the same packet as OWJoined.ReadingAids. ToJson writes it back
    equal as JSON to what was served. The npm package's OwReadingAids on OwMe and OwAgentJoined.
  • OWOpeners.For(tools, kind, address, surface): the rows of an "Open with" menu for a world ("world") or one of
    its elements ("element"), a port of the TypeScript SDK's openersFor and the Python package's openers_for.
    The site's page comes first, then each listed tool with a link for that kind, in the list's order, each an
    OWOpener (Id, Name, Href, State, the row's word in sentence case or null). The address is an
    OWAddressReading, the parts as JSON, or a world's id with a type word and an id; OWOpenerSurface says what the
    surface knows (Audience required, SignedIn, Browser, Phone, Tool). The whole address is checked by the
    writer in its own form (the site's when it has none), so a malformed form, lens or moment refuses (bad_form,
    bad_lens, bad_moment) though neither rides on an href, as the TypeScript SDK 4.110.0 and the Python package
    0.91.0 do. A refused address throws OWAddressException; the rest throws ArgumentException naming the key.
    Tested by the packages' shared fixture (45 cases, held by its sha256).
  • OWTools.All: the OnlyWorlds tools list (github.com/OnlyWorlds/tools, tools.json format 1) baked in at commit
    86208c8, the keys OWOpeners reads. The list is vendored at codegen/tools/tools.json and pinned in
    codegen/tools-pin.json; codegen/generate_tools.py writes the table and --check (also run by
    check_drift.py) fails when the two disagree. A tool listed after a release is offered from the next one.
  • OWTool.FromJson and OWOpenerSurface.FromJson read a tools row and a surface as JSON, refusing a wrong key or
    type by name.
  • OWListParams.Filter: list by any single link of the type, by field name, as the API now filters:
    {"parent_location": id} lists a place's rooms, and an empty value lists the rows with none. Fields go out in
    ordinal order after the named filters; a key that is not a field name (lowercase letters, digits, _) throws
    ArgumentException before anything is sent. The wire fixture follows the API document that declares them.
  • OWLinkListener: a listener on 127.0.0.1, never another interface, for an address link clicked outside Unity.
    One connection carries one line, the link, read whole by OWAddress.TryParseLink; it answers ok or
    refused <reason> (the address profile's own word, or too_long past 4096 bytes, no_line, no_receiver) and
    hands an accepted OWAddressReading to your callback through OWMainThread.Run, or a dispatch you pass.
    TryStart reports a taken port as port_taken rather than throwing, so two Editors can run side by side; a
    domain unload stops every listener. OWLinkListener.TrySend(port, link, timeout) is the sender.
  • Tools~/ow-link: an opt-in forwarder for Windows that the system runs for ow:// links. It offers the link to an
    ordered list of ports from its config (a running Editor, then a running player) and starts the configured player
    with the link when none takes it. install.ps1 registers it for the current user only (HKCU, no administrator)
    and install.ps1 -Uninstall removes it. Nothing is registered unless you run the installer.

Fixed

  • OWGraph.Read on bodies already served (OWLensReader.Served) places an edge's Index at the target's place in
    the list as given. A contributor's served list keeps a link to a proposed element whose body it is not served, and
    the reader counted only the bodies it held, so a later target's index came out one short of the contributor's own
    graph of the same world (ruling G5; dist.93's case a contributor's index counts a proposed id its served list keeps
    read through the served view).
  • OWCalendar.ReadConfig refuses a calendar whose grain is empty or white space alone: the profile's grain is a
    string with something left after trimming Unicode's White_Space (the room profile's trim, as the marks read it),
    so the field reads as no calendar and a tool shows the bare step. Before, such a grain read as a calendar.
  • OWCalendar.ReadConfig refuses a calendar with an intercalary day whose after_month names a month the year does
    not have: past the last month or below 0 (the profile, serial 89), and any intercalary day at all in a calendar
    with no months, after_month 0 included, since there is no place between months (ruled for the next serial). Such
    a day has no position. Before, it read as a calendar: the day counted in the year's length but sat in no month,
    and with no months it was ignored, or, with every_years, added a leap step.
  • OWCalendar.ReadConfig refuses an era whose start, end or year_base is a whole number past the ones a
    double holds exactly (beyond 2^53 - 1 either way), as the TypeScript reader does. Before, anything within a
    long read.