@agentshouse/mdruntime-adapter 0.1.0-alpha.20 → 0.1.0-alpha.22

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.
Files changed (2) hide show
  1. package/AGENTS.md +16 -7
  2. package/package.json +3 -3
package/AGENTS.md CHANGED
@@ -11,8 +11,14 @@ Rooms, Slots, Query, Search, Observe, Types, Room Draft, Save, History, Call, Lo
11
11
  storage loss, the reported persistence answer, deployment facts, Sync Status, reauthorization,
12
12
  conversation, the chat draft, and Presentation State.
13
13
 
14
+ Every `observe` resolves, once its first value has arrived, to a handle:
15
+ `current()` is the latest complete value, `subscribe(listener)` hears each later
16
+ value whole and returns its unsubscribe, and `close()` ends the observation.
17
+ Closing the port ends every handle and rejects every pending call and
18
+ observation; a client that reconnects observes again.
19
+
14
20
  Each conversation a Provider card names is held complete in the browser.
15
- Observe one with `observe('conversation', id, { limit }, listener)`: the view
21
+ Observe one with `observe('conversation', id, { limit })`: the view
16
22
  holds its latest `limit` messages, or all of them, oldest first, with the
17
23
  growing text and the session summary while it is viewed, and its chat draft.
18
24
  `chatDraft.write` and `chatDraft.discard` keep what the App Creator composes;
@@ -30,7 +36,7 @@ surface returns the authorization, performs a request the App's code
30
36
  composes, or exposes the browser store.
31
37
 
32
38
  Read deployment facts with `deploymentFacts()` and observe replacements with
33
- `observe('deployment-facts', listener)`. Interpret the opaque value using the
39
+ `observe('deployment-facts')`. Interpret the opaque value using the
34
40
  host's contract. [R038](https://github.com/agentshouse/mdruntime/blob/main/docs/requirements/ledger.md#r038--runtime-host-and-remote-client)
35
41
  owns their boundary.
36
42
 
@@ -39,8 +45,10 @@ ships in no bundle.
39
45
 
40
46
  ## Local Query rules
41
47
 
42
- `query(q)` answers once from local state; `observe('query', q, listener)` hears
43
- the whole result at once and again only when it changes. A query is data:
48
+ `query(q)` answers once from local state; `observe('query', q)` holds the whole
49
+ result and hears it again only when it changes, keeping every unchanged Document
50
+ the same object, so a component can tell what changed by identity. A query is
51
+ data:
44
52
 
45
53
  - **Filter.** `rooms` names Room locators and defaults to every Room. `types`
46
54
  names MD Types, and `any` names the untyped Documents. `pathPrefix` is a
@@ -103,7 +111,8 @@ the revision you read, or `null` when there was none, and every part it should
103
111
  now change: fields, sections and the preamble, or the whole Markdown, a
104
112
  creation, a move, or a removal. A part new to the Room Draft names its base,
105
113
  the value you showed when it was opened; the MD Runtime keeps a part's first
106
- base. A write or a discard from an older revision is refused as `stale` with
114
+ base. A binary link target has a Room Draft too, for a move or a removal, with
115
+ `null` as its base. A write or a discard from an older revision is refused as `stale` with
107
116
  the current Room Draft; read it and write again.
108
117
 
109
118
  Save takes one Room and the Room Drafts of it to save, each with its revision,
@@ -111,8 +120,8 @@ validates locally, and on success appends one Change Batch to that Room's
111
120
  queue and removes those Room Drafts. It is refused as `stale`, as
112
121
  `changed-underneath` naming each part whose base no longer matches the visible
113
122
  state, or by a local validation rule, and then creates nothing and leaves every
114
- Room Draft in place. A directory move is a move part on each Document beneath
115
- it, saved together.
123
+ Room Draft in place. A directory move or removal is a move or removal part on
124
+ each Document and binary link target beneath it, saved together.
116
125
 
117
126
  Outcomes follow the Provider's answer. Accepted advances the confirmed
118
127
  layer. Conflicted and Rejected, an expired outcome record, and a change that no
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentshouse/mdruntime-adapter",
3
- "version": "0.1.0-alpha.20",
3
+ "version": "0.1.0-alpha.22",
4
4
  "description": "Agents House Adapter for the MD Runtime",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  "url": "https://github.com/agentshouse/mdruntime/issues"
34
34
  },
35
35
  "dependencies": {
36
- "@agentshouse/mdmodel": "0.1.0-alpha.14",
37
- "@agentshouse/mdruntime": "0.1.0-alpha.26"
36
+ "@agentshouse/mdmodel": "0.1.0-alpha.15",
37
+ "@agentshouse/mdruntime": "0.1.0-alpha.28"
38
38
  }
39
39
  }