pet.trezy.createInteraction

Repository @trezy.pet did:plc:ollch4g7tes2reb5eceiwuol namespace authority
Details · procedure
Kindprocedure
Authoritytrezy.pet
Indexed

Procedure

procedure · POST

Input

application/json

drop

string

The rkey of a pet.trezy.foodDrop being consumed by this feed. OPTIONAL: petting carries none, and neither does a feed from the legacy button. ⚠ THE MORSEL IS DELETED ONLY AFTER THE ACTIVITY RECORD HAS SAVED, never before. Deleting first would let a refused feed take the food with it — which the player would experience as theft, with no error anywhere to explain where their morsel went.

pet

requiredstring · at-uri

type

requiredstring
  • knownValues: feed | pet

Output

application/json

createdAt

string · datetime

error

string

Present instead of uri/createdAt when the interaction was refused for an expected reason. A stable machine code the client branches on — add codes, never rename them. "asleep" means the pet's species is inside one of its published sleep windows — see pet.trezy.gameConfig's sleepWindows. It is reported ahead of "cooldown" when both apply, because a cooldown countdown during a nap sends the player back to be refused again by a rule nobody mentioned.

  • knownValues: invalid-type | not-your-pet | cooldown | asleep

message

string

A sentence to show the player, accompanying `error`. Free to reword; do not branch on it.

uri

string · at-uri

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • pet.trezy.dropFood

    procedure

    Put one morsel on the ground. Writes to the caller's terrarium space; the space is created lazily by the first drop, so a player who never feeds anything never gets one.

  • Settle what happened in the terrarium while nobody was watching, and report the state feeding needs. Called on load. HappyView has no scheduler — the only job trigger is job.run:<type>, fired by jobs.create — so an absence is replayed here rather than ticked by a cron. The player cannot tell the difference: they close the tab with four morsels down and come back to find the pets fed and one morsel left. What they gain is that the gap is computed at the moment it can be REPORTED, and that resolut

  • One morsel lying on the ground. Lives in the player's `pet.trezy.terrarium` SPACE, not their public repo: it is transient scenery, and a repo record would need a new OAuth scope in three places — which happyview-config.ts documents as breaking sign-in outright when the third is missed. A high price for recording that a morsel is at x=412. ⚠ NOTHING HERE IS SIGNED, SO NOTHING HERE MAY CARRY CONSEQUENCES. setPreferences.lua states the rule this obeys: a space is access control, not attestation. Fo