@agentshouse/skills 0.1.0-c96bb2a2009d2 → 0.1.0-c99fae1f41245
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,7 +5,7 @@ How an App reads and writes its Rooms on the device, offline too.
|
|
|
5
5
|
- The runtime holds every bound Room on the device and streams in every change from any device, App or agent. `query` and `observe` answer from the device and never wait on the network; `search` asks House ([Search rules](apps/search)).
|
|
6
6
|
- Draw from `observe` at once, with no request of your own; an observation hears each later change by itself, so never poll, refetch or subscribe. An answer is `{ pending }` while a Room it reads has not reached this device or been prepared on it: draw the page without those documents; keep the empty state for a complete answer. `rooms` answers once the runtime knows the Rooms the page reaches. Offer binding a Room when it is empty while the sync status's `providerUnreachable` is false and `observe('connection-refusal')` answers `null`; any other empty list says only that nothing can be listed yet.
|
|
7
7
|
- Show no loading state: draw the last state the device holds. A wait shows only after an act the User pressed whose answer comes from outside the stream, such as `bridge.callExternal`, until it arrives.
|
|
8
|
-
- Write optimistically: write a Room Draft, then `save`. The change shows in every query at once as a Pending Change and reaches House when it can. `save` refuses at once, with its `code`, a change that is `stale`, `changed-underneath` or against the schema: say so and keep the form.
|
|
8
|
+
- Write optimistically: write a Room Draft, then `save`. The change shows in every query at once as a Pending Change and reaches House when it can. `save` refuses at once, with its `code`, a change that is `stale`, `changed-underneath` or against the schema: say so and keep the form. After `changed-underneath`, draw the joined Room Draft and its `marks` ([Room Drafts](apps/room-drafts)).
|
|
9
9
|
- Show what the runtime reports: `observe('queue', room)` lists changes House has not confirmed yet, and `observe('sync-status')`'s `attentionRequired` lists each change House refused, returned as a Room Draft with why, to save again or discard.
|
|
10
10
|
- Keep what the User types in the Room Draft (`roomDraft.write`) as they type; it survives a new release replacing the page, a reload and another tab. Draw a form again only when its page changes, never on a streamed change.
|
|
11
11
|
- A document has one Room Draft, shared by every tab and App, and `save` takes all of it. A write replaces every part and names the revision it read, so write onto the parts it holds; one from an older revision answers `stale` with the current Room Draft: show that one. A field part names as its `base` the value the page showed, `{ value }`, or `null` when the document has no such field.
|
|
@@ -15,21 +15,27 @@ current Room Draft.
|
|
|
15
15
|
|
|
16
16
|
Save takes one Room and the Room Drafts of it to save, each with its revision, validates
|
|
17
17
|
locally, and on success appends one Change Batch to that Room's queue and removes those Room
|
|
18
|
-
Drafts. Refused as `stale`, `changed-underneath` naming each part
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
Drafts. Refused as `stale`, `changed-underneath` naming each part changed underneath, or a
|
|
19
|
+
local validation rule, it creates nothing and removes no Room Draft. On `changed-underneath`
|
|
20
|
+
it first joins each one over the current Document under a new revision: show that one. A
|
|
21
|
+
field, a move, a removal and a replaced file keep yours; a section, the preamble, and a
|
|
22
|
+
whole Markdown whose sections do not match hold the current text, then yours; a whole
|
|
23
|
+
Markdown otherwise joins section by section. `marks`, keyed like `parts`,
|
|
24
|
+
names each part holding both sides with the `change`, `{ author, time }` or `null`, that
|
|
25
|
+
saved the current side, and a field's or file's `current`. Offer only Save and Discard; a
|
|
26
|
+
write keeps the marks of the parts it still names. A directory move or removal is that part
|
|
27
|
+
on each Document and binary Path entry beneath it, saved together; moves into another Room,
|
|
28
|
+
saved alone, are one Change Batch in both Rooms' queues. `saveParts(room, [{ path, parts
|
|
29
|
+
}])` saves parts, each Path once and each new part with its base, the same way but writes no
|
|
30
|
+
Room Draft: one held at a saved Path stays, one at a moved Path moves with it to a
|
|
31
|
+
destination that holds none. Never save by writing back a Room Draft read before.
|
|
26
32
|
|
|
27
33
|
Outcomes follow the Provider's answer. An Accepted Change Batch stays in the queue, drawn
|
|
28
34
|
over the confirmed layer, until that layer reaches the Room Version it was accepted at.
|
|
29
35
|
Conflicted and Rejected, and a change that no longer applies, each
|
|
30
|
-
leave the queue and return as Room Drafts on their Documents,
|
|
31
|
-
Provider's structured refusal code and fields as returned, not known to have
|
|
32
|
-
withdrawn locally. The rest of the queue keeps synchronizing, and Sync Status requires
|
|
36
|
+
leave the queue and return as Room Drafts on their Documents, joined as above and marked
|
|
37
|
+
with why: the Provider's structured refusal code and fields as returned, not known to have
|
|
38
|
+
applied, or withdrawn locally. The rest of the queue keeps synchronizing, and Sync Status requires
|
|
33
39
|
attention until each returned Room Draft is saved or discarded. `observe('queue', room)`
|
|
34
40
|
shows each Pending Change Batch, which keeps no outcome once it leaves. Transport failure,
|
|
35
41
|
Provider unavailability and a refusal marked retryable, until the reset it names, keep
|
|
@@ -29,9 +29,11 @@ or remove one as a Document, its bytes following.
|
|
|
29
29
|
- `<room-media room path width height alt>` draws an image, video or audio file of the
|
|
30
30
|
Room. It reserves the box `width` and `height` set, in the file's own pixels, or a 16:9
|
|
31
31
|
one, before any byte; asks for the file only as it nears the view; draws a file the
|
|
32
|
-
browser keeps from its bytes, offline too, and reads and keeps an image;
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
browser keeps from its bytes, offline too, and reads and keeps an image; shows a video's
|
|
33
|
+
first frame with a play mark and plays it only in House's full-screen viewer, which a
|
|
34
|
+
press on it opens, and plays an audio file, loading only either's metadata from the
|
|
35
|
+
Provider's address; asks again when a shown file's address lapses; asks again while the
|
|
36
|
+
file cannot be shown yet, such as
|
|
35
37
|
while the Room does not hold it or House did not answer, until House refuses it for
|
|
36
38
|
good; and shows its children where the file cannot be read.
|
|
37
39
|
- `binaryFile.read(room, path, revision?)` answers `{ kind: 'binary', stream, byteLength,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/skills",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-c99fae1f41245",
|
|
4
4
|
"description": "The upstream Skills agents.house serves its agents, verbatim, and the texts it writes for them: the Guide, its own Skills among the pages, and the Agent instructions",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|