@agentshouse/mdruntime-adapter 0.1.0-cb9b1f8bb3e9a → 0.1.0-cbbc9b36e7fd4

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 +19 -20
  2. package/package.json +2 -2
package/AGENTS.md CHANGED
@@ -20,10 +20,9 @@ reach reaches every open observation as its new value, a query keeping unchanged
20
20
  Documents the same objects.
21
21
 
22
22
  Every `observe` resolves, once its first value has arrived, to a handle: `current()` is
23
- the latest complete value, `subscribe(listener)` hears each later value whole and
24
- returns its unsubscribe, and `close()` ends the observation. Closing the port ends every
25
- handle and rejects every pending call and observation; a client that reconnects observes
26
- again.
23
+ the latest complete value, `subscribe(listener)` hears each later value whole and returns
24
+ its unsubscribe, and `close()` ends the observation. Closing the port ends every handle
25
+ and rejects every pending call and observation; a client that reconnects observes again.
27
26
 
28
27
  `observe('agents')` answers every Agent a new conversation can go to, each `{ identity,
29
28
  name }`, whether or not it has a conversation yet. Each conversation the Provider's
@@ -77,7 +76,9 @@ other than its result, a refused Save or Room Draft write, a returned Room Draft
77
76
  reason, a Room's refusal and the Connection Refusal, and every error a member rejects
78
77
  with, beside its message. A Provider refusal carries the Provider's own `retryable`.
79
78
  Every code and every value the API answers is open: handle one you do not know by its
80
- `code` and `retryable`.
79
+ `code` and `retryable`. Only a tag telling which fields a value carries, such as an
80
+ answer's `kind`, is closed so it narrows: keep a branch for a tag you do not know. A
81
+ model with no usable types answers `types: null`, whatever its `status`.
81
82
 
82
83
  Read the deployment facts with `observe('deployment-facts')`, an opaque value the host's
83
84
  contract interprets. `observe('member')` answers who uses the App: the User the Provider
@@ -127,12 +128,11 @@ observe the query to hear the complete one. A query is data:
127
128
  selected. An unselected part is absent. Select only what a screen shows: a list that
128
129
  selects the Markdown hears every edit of it.
129
130
  - **Change.** `change` is `{ author, time }` of the Document's head revision as the
130
- Provider last delivered it: `author` is `{ kind: 'user' | 'site', id, name }` or
131
- `null` for a write the Provider made itself, and `time` is the Provider's ISO 8601
132
- change time. It is `null` where the Provider delivered no time, as at a Site. An
133
- unsent edit or move keeps it, an unsent creation has none, and a saved write takes the
134
- Provider's own once it is Accepted. A Room's last change is its Document with the
135
- latest `time`.
131
+ Provider last delivered it: `author` is `{ kind: 'user' | 'site', id, name }` or `null`
132
+ for a write the Provider made itself, and `time` is the Provider's ISO 8601 change
133
+ time. It is `null` where the Provider delivered no time, as at a Site. An unsent edit
134
+ or move keeps it, an unsent creation has none, and a saved write takes the Provider's
135
+ own once it is Accepted. A Room's last change is its Document with the latest `time`.
136
136
  - **Order and groups.** `orderBy` sorts by `room`, `path`, `type` or `{ field }` with
137
137
  TanStack DB's own options, and ties end with Room, then Path. `groupBy` by `room`,
138
138
  `type` or `{ field }` answers `{ groups: [{ key, count }] }`, counted over every match
@@ -170,15 +170,14 @@ state, with MiniSearch's defaults. There is no observed search.
170
170
  ## Room Draft, Save, and outcome rules
171
171
 
172
172
  The MD Runtime owns one Room Draft per Room and Path, shared by every App and tab. It is
173
- durable: it survives reload and navigation. A Room that Discovery stops listing takes
174
- its Room Drafts and its queue with it. Write a Room Draft with `roomDraft.write(room,
175
- path, revision, parts)`, naming the revision you read, or `null` when there was none,
176
- and every part it should now change: fields, sections and the preamble, or the whole
177
- Markdown, a creation, a move, or a removal. A part new to the Room Draft names its base,
178
- the value you showed when it was opened; the MD Runtime keeps a part's first base; a
179
- binary Path entry's move or removal takes `null` as its base. A write or a discard from
180
- an older revision is refused as `stale` with the current Room Draft; read it and write
181
- again.
173
+ durable: it survives reload and navigation. A Room that Discovery stops listing takes its
174
+ Room Drafts and its queue with it. Write a Room Draft with `roomDraft.write(room, path,
175
+ revision, parts)`, naming the revision you read, or `null` when there was none, and every
176
+ part it should now change: fields, sections and the preamble, or the whole Markdown, a
177
+ creation, a move, or a removal. A part new to the Room Draft names its base, the value
178
+ you showed when it was opened; the MD Runtime keeps a part's first base; a binary Path
179
+ entry's move or removal takes `null` as its base. A write or a discard from an older
180
+ revision is refused as `stale` with the current Room Draft; read it and write again.
182
181
 
183
182
  Save takes one Room and the Room Drafts of it to save, each with its revision, validates
184
183
  locally, and on success appends one Change Batch to that Room's queue and removes those
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentshouse/mdruntime-adapter",
3
- "version": "0.1.0-cb9b1f8bb3e9a",
3
+ "version": "0.1.0-cbbc9b36e7fd4",
4
4
  "description": "Agents House Adapter for the MD Runtime",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -25,6 +25,6 @@
25
25
  "LICENSE"
26
26
  ],
27
27
  "dependencies": {
28
- "@agentshouse/mdruntime": "0.1.0-ca4dc698bd0c4"
28
+ "@agentshouse/mdruntime": "0.1.0-c8bedb8b11a62"
29
29
  }
30
30
  }