pet.trezy.resolveFeeding
Schema Diff
+1 -1
Compatibility Analysis
Backward Compatible
No changes detected.
1
1
{
2
2
"$type": "com.atproto.lexicon.schema",
3
3
"defs": {
4
4
"deadline": {
5
5
"properties": {
6
6
"feedCooldownRemaining": {
7
7
"description": "Seconds until this pet may be fed again; 0 means hungry now. Named to match getStats, which reports the same quantity for a single pet.",
8
8
"minimum": 0,
9
9
"type": "integer"
10
10
},
11
11
"pet": {
12
12
"format": "at-uri",
13
13
"type": "string"
14
14
}
15
15
},
16
16
"required": [
17
17
"pet",
18
18
"feedCooldownRemaining"
19
19
],
20
20
"type": "object"
21
21
},
22
22
"drop": {
23
23
"properties": {
24
24
"droppedAt": {
25
25
"format": "datetime",
26
26
"type": "string"
27
27
},
28
28
"food": {
29
29
"type": "string"
30
30
},
31
31
"rkey": {
32
32
"type": "string"
33
33
},
34
34
"x": {
35
35
"type": "integer"
36
36
}
37
37
},
38
38
"required": [
39
39
"rkey",
40
40
"food",
41
41
"x",
42
42
"droppedAt"
43
43
],
44
44
"type": "object"
45
45
},
46
46
"eaten": {
47
47
"properties": {
48
48
"eatenAt": {
49
49
"description": "When the pet would have eaten it — in the past, since the whole point is that this already happened. The matching pet.trezy.activity carries the same value as its createdAt.",
50
50
"format": "datetime",
51
51
"type": "string"
52
52
},
53
53
"food": {
54
54
"type": "string"
55
55
},
56
56
"pet": {
57
57
"format": "at-uri",
58
58
"type": "string"
59
59
}
60
60
},
61
61
"required": [
62
62
"pet",
63
63
"food",
64
64
"eatenAt"
65
65
],
66
66
"type": "object"
67
67
},
68
68
"main": {
69
69
"description": "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 resolution runs while their OAuth session is definitely alive, which a background job could not rely on.",
70
70
"input": {
71
71
"encoding": "application/json",
72
72
"schema": {
73
73
"properties": {},
74
74
"required": [],
75
75
"type": "object"
76
76
}
77
77
},
78
78
"output": {
79
79
"encoding": "application/json",
80
80
"schema": {
81
81
"properties": {
82
82
"deadlines": {
83
83
"description": "How long until each staged pet may be fed again. ⚠ EVERY STAGED PET APPEARS HERE, INCLUDING ONES THAT DID NOT EAT. The client reads a pet missing from this list as 'not known yet' and excludes it from claiming food entirely, so an omission is a pet that can never be fed. This is also the only thing that tells a client every pet's cooldown at once: getPets returns at-uris only, and getStats answers for one pet.",
84
84
"items": {
85
85
"ref": "#deadline",
86
86
"type": "ref"
87
87
},
88
88
"type": "array"
89
89
},
90
90
"drops": {
91
91
"description": "The terrarium as it stands AFTER resolution: the client's opening morsel list, so load is one call rather than two.",
92
92
"items": {
93
93
"ref": "#drop",
94
94
"type": "ref"
95
95
},
96
96
"type": "array"
97
97
},
98
98
"eaten": {
99
-
"description": "What was eaten during the absence, oldest first — the homecoming's material. Empty when nothing was.",
99
+
"description": "What was eaten during the absence, in the order the replay filed it — the homecoming's material. Empty when nothing was. NOT sorted: the walk offers each morsel to the hungriest pet, and the sleep rule advances a feed past a nap, so an entry can be dated EARLIER than the one before it. It read \"oldest first\", which was an adoption-clamp edge case before sleep and is now wrong about a quarter of a mixed terrarium's feeds. A caller that needs chronological order must sort.",
100
100
"items": {
101
101
"ref": "#eaten",
102
102
"type": "ref"
103
103
},
104
104
"type": "array"
105
105
},
106
106
"error": {
107
107
"description": "Present instead of the answer. A stable machine code the client branches on — add codes, never rename them. ⚠ THE CLIENT MUST TREAT A REFUSAL AS 'UNKNOWN', NEVER AS 'NOBODY IS HUNGRY': the first stops pets claiming food, the second would render a world where nothing is ever hungry and quietly disable feeding.",
108
108
"knownValues": [
109
109
"not-authenticated",
110
110
"unavailable"
111
111
],
112
112
"type": "string"
113
113
},
114
114
"message": {
115
115
"type": "string"
116
116
}
117
117
},
118
118
"required": [],
119
119
"type": "object"
120
120
}
121
121
},
122
122
"type": "procedure"
123
123
}
124
124
},
125
125
"id": "pet.trezy.resolveFeeding",
126
126
"lexicon": 1
127
127
}