@agentshouse/mdruntime 0.1.0-c436a939f2119 → 0.1.0-c5b50992a4193
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.
- package/AGENTS.md +75 -41
- package/README.md +11 -11
- package/dist/adapter.d.ts +81 -51
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +1 -9
- package/dist/attached-model.d.ts +11 -0
- package/dist/attached-model.d.ts.map +1 -0
- package/dist/attached-model.js +47 -0
- package/dist/bootstrap.d.ts +5 -3
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +3 -3
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +2 -6
- package/dist/client.d.ts +4 -9
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -16
- package/dist/collection.d.ts +0 -2
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +2 -12
- package/dist/connection.d.ts +11 -28
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +535 -643
- package/dist/conversation.d.ts +22 -11
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +250 -105
- package/dist/host.d.ts +7 -2
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +37 -57
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/memory.d.ts +11 -5
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +84 -27
- package/dist/model.d.ts +11 -11
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +6 -3
- package/dist/observation.d.ts +2 -0
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +24 -14
- package/dist/outcome.d.ts +5 -21
- package/dist/outcome.d.ts.map +1 -1
- package/dist/paths.d.ts +0 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +0 -16
- package/dist/query.d.ts +8 -3
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +75 -36
- package/dist/reach.d.ts +40 -0
- package/dist/reach.d.ts.map +1 -0
- package/dist/reach.js +270 -0
- package/dist/react.d.ts +32 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +62 -0
- package/dist/read-side.d.ts +4 -0
- package/dist/read-side.d.ts.map +1 -1
- package/dist/read-side.js +116 -54
- package/dist/refresh.d.ts +2 -1
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +7 -3
- package/dist/replica.d.ts +5 -5
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +16 -21
- package/dist/room-draft.d.ts +3 -0
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +6 -4
- package/dist/rows.d.ts +2 -1
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +75 -38
- package/dist/save.d.ts +1 -2
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +92 -51
- package/dist/store.d.ts +6 -16
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +10 -32
- package/dist/wire.d.ts +51 -16
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +50 -65
- package/package.json +14 -2
package/AGENTS.md
CHANGED
|
@@ -7,9 +7,19 @@ enforcement.
|
|
|
7
7
|
## The MD Runtime API
|
|
8
8
|
|
|
9
9
|
App code reaches the MD Runtime through the remote client. The surfaces are
|
|
10
|
-
Rooms,
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
Rooms, Query, Search, Observe, Types, Room Draft, Save, History, Call, Reached, Log,
|
|
11
|
+
the reported persistence answer, reauthorization, conversation, the chat draft,
|
|
12
|
+
and Presentation State. Sync Status, the Service Mode, the storage-loss
|
|
13
|
+
statement and the deployment facts are observations only.
|
|
14
|
+
|
|
15
|
+
The host attaches each port with its reach, and every member and observation
|
|
16
|
+
answers within it: a Room outside it answers as one the replica does not hold,
|
|
17
|
+
Rooms lists only the Rooms reached whole, a Room reached for single Documents
|
|
18
|
+
shows only those Documents and the Types of the models that govern them, and
|
|
19
|
+
without conversations the conversation members, the chat draft and the
|
|
20
|
+
conversation observation hold none.
|
|
21
|
+
A change of the reach reaches every open observation as its new value, a query
|
|
22
|
+
keeping every unchanged Document the same object.
|
|
13
23
|
|
|
14
24
|
Every `observe` resolves, once its first value has arrived, to a handle:
|
|
15
25
|
`current()` is the latest complete value, `subscribe(listener)` hears each later
|
|
@@ -17,29 +27,29 @@ value whole and returns its unsubscribe, and `close()` ends the observation.
|
|
|
17
27
|
Closing the port ends every handle and rejects every pending call and
|
|
18
28
|
observation; a client that reconnects observes again.
|
|
19
29
|
|
|
20
|
-
Each conversation
|
|
30
|
+
Each conversation the Provider's conversation list names is held complete in the
|
|
31
|
+
browser. `conversation.list()` and `observe('conversations')` answer each with its
|
|
32
|
+
Agent's identity and name, its name, created and finished times, last outcome and live
|
|
33
|
+
`state`: `asking` while a question waits, `working` while a turn runs, else `idle`,
|
|
34
|
+
and `started`, when the running turn began, or `null`.
|
|
21
35
|
Observe one with `observe('conversation', id, { limit })`: the view
|
|
22
36
|
holds its latest `limit` messages, or all of them, oldest first, its chat
|
|
23
37
|
draft, and what the Provider streams for it whether or not anything views it:
|
|
24
|
-
the
|
|
25
|
-
state, the CLI's commands and options
|
|
26
|
-
only in memory: the turn's
|
|
27
|
-
|
|
28
|
-
searchable.
|
|
38
|
+
the running `turn` with its message parts and its context in use and window, the
|
|
39
|
+
open questions, the process state, and the CLI's commands and options. These live
|
|
40
|
+
only in memory: the message accepted under the turn's id replaces the running turn,
|
|
41
|
+
and none of them is stored or searchable.
|
|
29
42
|
`chatDraft.write` and `chatDraft.discard` keep what the App Creator composes;
|
|
30
43
|
sending it is a Provider Action that needs the Provider reachable and is never
|
|
31
44
|
queued.
|
|
32
45
|
|
|
33
|
-
Slots answers each Slot the Provider declares, in its order, with its entries
|
|
34
|
-
in order, each a Room and its segment; a Room two Slots list is the same Room.
|
|
35
|
-
|
|
36
46
|
Each Room in Rooms lists its `attachments`, the files the Provider holds for it
|
|
37
47
|
that its Documents link by the Provider's reference, ordered by `reference`,
|
|
38
48
|
each with `name`, `byteLength`, `mediaType` and the Provider's own entry as
|
|
39
49
|
`entry`. They are as the Provider last declared them and hold no bytes;
|
|
40
50
|
open one through the Provider Action that serves it.
|
|
41
51
|
|
|
42
|
-
Rooms,
|
|
52
|
+
Rooms, Query, Search, Observe, Types, Room Draft, Save, and Reached never
|
|
43
53
|
touch the network.
|
|
44
54
|
History and Call go to the Provider through the Adapter. A Call result whose
|
|
45
55
|
effect the Provider places in a Room carries `at`, that Room and Room Version;
|
|
@@ -47,15 +57,17 @@ effect the Provider places in a Room carries `at`, that Room and Room Version;
|
|
|
47
57
|
reached it, and the MD Runtime keeps refreshing that Room until it has;
|
|
48
58
|
`reached(room, roomVersion, path)` answers whether the held confirmed copy of
|
|
49
59
|
that document was written at a later Room Version. Each History revision
|
|
50
|
-
names its author, `{ kind: 'user', id }` or `{ kind: 'site', id, name }`.
|
|
60
|
+
names its author, `{ kind: 'user', id }` or `{ kind: 'site', id, name }`.
|
|
61
|
+
History of a Path no current document holds answers the removed document's
|
|
62
|
+
revisions with `deleted: true`, newest first; that revision is what a link to
|
|
63
|
+
the Path opens. Every
|
|
51
64
|
member of the
|
|
52
65
|
client is asynchronous. Results are detached snapshots. Nothing in this
|
|
53
66
|
surface returns the authorization, performs a request the App's code
|
|
54
67
|
composes, or exposes the browser store.
|
|
55
68
|
|
|
56
|
-
Read deployment facts with `
|
|
57
|
-
|
|
58
|
-
host's contract.
|
|
69
|
+
Read the deployment facts with `observe('deployment-facts')`. Interpret the
|
|
70
|
+
opaque value using the host's contract.
|
|
59
71
|
|
|
60
72
|
The in-memory Adapter at `@agentshouse/mdruntime/memory` is for tests and
|
|
61
73
|
ships in no bundle.
|
|
@@ -70,22 +82,28 @@ data:
|
|
|
70
82
|
- **Filter.** `rooms` names Room locators and defaults to every Room. `types`
|
|
71
83
|
names MD Types, and `any` names untyped Markdown Documents. `pathPrefix` is a
|
|
72
84
|
directory: `notes` keeps `notes/a.md` and not `notes2/a.md`.
|
|
73
|
-
- **Fields.**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
85
|
+
- **Fields.** Every frontmatter value is named by JSON Pointer: `/status`,
|
|
86
|
+
`/shipping/city`, `~1` for a `/` and `~0` for a `~` in a key. A segment that
|
|
87
|
+
meets a list applies to every item and a number names one item. `where` names
|
|
88
|
+
pointers, ANDs them, and nests `$and` and `$or`; a pointer through a list holds
|
|
89
|
+
when any item satisfies it. A bare value is equality; the operators are `$eq`,
|
|
90
|
+
`$ne`, `$in`, `$nin`, `$gt`, `$gte`, `$lt`, `$lte`, `$all`, `$size` and
|
|
91
|
+
`$exists`. Equality on a list asks whether it contains the value. Missing, null and empty differ:
|
|
77
92
|
`$exists: false` keeps a missing field, `null` an explicit null, `''` empty
|
|
78
93
|
text and `$size: 0` an empty list. A date compares in calendar order and never
|
|
79
94
|
with a date-time. A reference compares by the Room Path it resolves to.
|
|
80
|
-
Untyped frontmatter
|
|
95
|
+
Untyped frontmatter, and a value under `oneOf` or a conditional, is plain
|
|
96
|
+
values. There is no text containment or regular
|
|
81
97
|
expression.
|
|
82
98
|
- **Relations.** `hop: { field, types, where, pathPrefix }` keeps Documents whose
|
|
83
|
-
reference `field
|
|
84
|
-
`backlinks: { field, types, where, pathPrefix }` keeps Documents that a
|
|
99
|
+
reference at pointer `field`, at any depth, points to a matching Document of the
|
|
100
|
+
same Room. `backlinks: { field, types, where, pathPrefix }` keeps Documents that a
|
|
85
101
|
matching Document of the same Room references. Each keeps a Document once.
|
|
86
102
|
- **Parts.** A Document query must `select`: `'all'`, or `fields`, `sections`,
|
|
87
|
-
`preamble`, `markdown`, `backlinks` and `change`, where `fields`
|
|
88
|
-
|
|
103
|
+
`preamble`, `markdown`, `backlinks` and `change`, where `fields` is `'all'` or a
|
|
104
|
+
list of pointers and `sections` `'all'` or a list of names. Selected pointers
|
|
105
|
+
return the frontmatter holding only them, nested as written. A backlink names
|
|
106
|
+
the referring Path, MD Type and the pointer it came from as `field`. Room and Path always return; a Markdown
|
|
89
107
|
Document also returns its MD Type. A non-Markdown Document or binary link
|
|
90
108
|
target returns only Room and Path. An unselected part is absent. Select only
|
|
91
109
|
what a screen shows: a list that selects the Markdown hears every edit of it.
|
|
@@ -99,8 +117,8 @@ data:
|
|
|
99
117
|
- **Order and groups.** `orderBy` sorts by `room`, `path`, `type` or `{ field }`
|
|
100
118
|
with TanStack DB's own options, and ties end with Room, then Path. `groupBy` by
|
|
101
119
|
`room`, `type` or `{ field }` answers `{ groups: [{ key, count }] }`, counted
|
|
102
|
-
over every match and ordered by `count` or a key.
|
|
103
|
-
or the groups.
|
|
120
|
+
over every match and ordered by `count` or a key. A sort or group takes only a
|
|
121
|
+
pointer that holds one value. `limit` bounds the Documents or the groups.
|
|
104
122
|
- **Results and errors.** A result carries no Room Version: read freshness from
|
|
105
123
|
Rooms and Sync Status. An invalid query fails with `invalid-query`,
|
|
106
124
|
`unknown-type`, `unknown-field` or `wrong-kind`, naming where, and never
|
|
@@ -114,7 +132,7 @@ search.
|
|
|
114
132
|
|
|
115
133
|
- **What is found.** A Document by its field values, its sections' headings and
|
|
116
134
|
text, its preamble and its Path; a message by its text. Frontmatter keys, Room
|
|
117
|
-
Drafts, chat drafts and
|
|
135
|
+
Drafts, chat drafts and a running turn's parts are never found. There are no phrases,
|
|
118
136
|
word forms, typo tolerance or prefix matching.
|
|
119
137
|
- **Narrowing.** `documents` is a Local Query filter: `rooms`, `types`, `where`,
|
|
120
138
|
`pathPrefix`, `hop` and `backlinks`. `conversations` names conversations. Both
|
|
@@ -130,7 +148,7 @@ search.
|
|
|
130
148
|
|
|
131
149
|
The MD Runtime owns one Room Draft per Room and Path, shared by every App and
|
|
132
150
|
tab. It is durable: it survives reload and navigation. A Room that Discovery
|
|
133
|
-
stops listing takes its Room Drafts
|
|
151
|
+
stops listing takes its Room Drafts and its queue with it.
|
|
134
152
|
Write a Room Draft with `roomDraft.write(room, path, revision, parts)`, naming
|
|
135
153
|
the revision you read, or `null` when there was none, and every part it should
|
|
136
154
|
now change: fields, sections and the preamble, or the whole Markdown, a
|
|
@@ -150,20 +168,21 @@ each Document and binary link target beneath it, saved together.
|
|
|
150
168
|
|
|
151
169
|
Outcomes follow the Provider's answer. An Accepted Change Batch stays in the
|
|
152
170
|
queue, drawn over the confirmed layer, until the confirmed layer reaches the
|
|
153
|
-
Room Version it was accepted at, and then leaves it. Conflicted and Rejected, an expired
|
|
171
|
+
Room Version it was accepted at, and then leaves it. Conflicted and Rejected, an expired operation, and a change that no
|
|
154
172
|
longer applies over the Room each leave the queue and return as Room Drafts on
|
|
155
173
|
the Documents they changed, marked with why: the Provider's structured refusal
|
|
156
174
|
code and fields as returned, not known to have applied, or withdrawn locally.
|
|
157
175
|
The rest of the queue keeps synchronizing, and Sync Status requires attention
|
|
158
|
-
until each returned Room Draft is saved again or discarded.
|
|
159
|
-
|
|
176
|
+
until each returned Room Draft is saved again or discarded. A Change Batch
|
|
177
|
+
keeps no outcome once it leaves the queue; `observe('queue', room)` shows each
|
|
178
|
+
Pending one, and a returned Room Draft says why it returned. Transport
|
|
160
179
|
failure and Provider unavailability keep work Pending and do not infer a
|
|
161
180
|
rejection. A refusal the Provider marks retryable stays Pending until the reset
|
|
162
181
|
it names; the MD Runtime retries the same Change Batch identity and payload and
|
|
163
182
|
never infers an outcome from transport uncertainty. The MD Runtime never
|
|
164
183
|
combines, reorders, or rebases.
|
|
165
184
|
|
|
166
|
-
`
|
|
185
|
+
`observe('service-mode')` answers the Provider's Service
|
|
167
186
|
Mode, `open` or `write-halted`. While writes are halted, Save still succeeds,
|
|
168
187
|
its Change Batch waits unsent, and the queue is submitted in order once the
|
|
169
188
|
Provider reopens writes. An Action is never held: a write the Provider refuses
|
|
@@ -196,13 +215,28 @@ an App's override respected. What an App Creator's agent adds carries none
|
|
|
196
215
|
of these promises by itself. Reading, querying and searching never wait for
|
|
197
216
|
the network. Data lives only in the App Creator's browser and with the Provider.
|
|
198
217
|
|
|
199
|
-
## App code
|
|
200
|
-
|
|
201
|
-
App code
|
|
202
|
-
`
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
218
|
+
## App code takes the client its host hands it and never constructs a Runtime
|
|
219
|
+
|
|
220
|
+
App code takes the client its host hands it: in House,
|
|
221
|
+
`connectHouseBridge().runtime` from `@agentshouse/app-bridge` resolves to the
|
|
222
|
+
client House built into the page. It never constructs a Runtime or a client.
|
|
223
|
+
It imports only types from `@agentshouse/mdruntime/client`, does not call
|
|
224
|
+
`connectMdRuntime` or `serveMdRuntime`, and does not import the package main,
|
|
225
|
+
the host entry, or the Adapter package. Hosts and tests use those entries; the
|
|
226
|
+
served App does not.
|
|
227
|
+
|
|
228
|
+
A React App may observe and save through `@agentshouse/mdruntime/react`, which
|
|
229
|
+
names React as a peer dependency. `useObserve(client, topic, ...input)` takes
|
|
230
|
+
the arguments of `observe` and returns the topic's current value, `undefined`
|
|
231
|
+
until it arrives, re-rendering on each change; a `null` client observes
|
|
232
|
+
nothing. `useSave(client)` returns `busy`, the last `outcome` or `failure`, and
|
|
233
|
+
`save(room, roomDrafts)`, which writes each Path's parts onto the Room Draft
|
|
234
|
+
already there, keeping the bases its parts have, or onto a new one, and saves
|
|
235
|
+
them together. A refused Save leaves the Room Drafts for the App to save again
|
|
236
|
+
or discard; a failure is recorded and rejects. `saveRoomDrafts(client, room,
|
|
237
|
+
roomDrafts)` is that save outside a component. A react-admin or Refine App
|
|
238
|
+
reads and writes its Rooms through the data providers of
|
|
239
|
+
`@agentshouse/mdruntime-families`.
|
|
206
240
|
|
|
207
241
|
## What an agent must never do
|
|
208
242
|
|
package/README.md
CHANGED
|
@@ -12,27 +12,27 @@ npm install @agentshouse/mdruntime
|
|
|
12
12
|
|
|
13
13
|
## Entries
|
|
14
14
|
|
|
15
|
-
| Entry | For
|
|
16
|
-
| ------------------------------- |
|
|
17
|
-
| `@agentshouse/mdruntime/client` |
|
|
18
|
-
| `@agentshouse/mdruntime/host` | The host that serves a Runtime: `serveMdRuntime`
|
|
19
|
-
| `@agentshouse/mdruntime` |
|
|
20
|
-
| `@agentshouse/mdruntime/memory` | Tests: `createMemoryAdapter`, an in-memory Adapter
|
|
15
|
+
| Entry | For |
|
|
16
|
+
| ------------------------------- | ---------------------------------------------------------------- |
|
|
17
|
+
| `@agentshouse/mdruntime/client` | The host's client: `connectMdRuntime(port)` |
|
|
18
|
+
| `@agentshouse/mdruntime/host` | The host that serves a Runtime: `serveMdRuntime` |
|
|
19
|
+
| `@agentshouse/mdruntime` | Shared types |
|
|
20
|
+
| `@agentshouse/mdruntime/memory` | Tests: `createMemoryAdapter`, an in-memory Adapter |
|
|
21
|
+
| `@agentshouse/mdruntime/react` | React over the client: `useObserve`, `useSave`, `saveRoomDrafts` |
|
|
21
22
|
|
|
22
23
|
## Usage
|
|
23
24
|
|
|
24
|
-
App code
|
|
25
|
-
it:
|
|
25
|
+
App code takes the client its host hands it; in House the App bridge hands it:
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
|
-
import {
|
|
28
|
+
import { connectHouseBridge } from '@agentshouse/app-bridge';
|
|
29
29
|
|
|
30
|
-
const runtime =
|
|
30
|
+
const runtime = await connectHouseBridge().runtime;
|
|
31
31
|
const rooms = await runtime.rooms();
|
|
32
32
|
const notes = await runtime.query({ types: ['note'], select: 'all', limit: 20 });
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
`
|
|
35
|
+
`observe('storage-loss')` reports `null` or the stable code
|
|
36
36
|
`storage-loss` when unsynchronized Room Drafts and Pending Changes were lost.
|
|
37
37
|
The host supplies the user-facing wording.
|
|
38
38
|
|
package/dist/adapter.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ModelResult } from './model.js';
|
|
2
2
|
import type { ChangeBatch } from './change.js';
|
|
3
3
|
export type Authorization = object;
|
|
4
|
-
export declare const ROOM_CONTRACT_VERSION = 1;
|
|
5
|
-
export declare const VERSION_1_CAPABILITIES: readonly ['stable-file-ids', 'ranked-provider-search', 'room-version-notifications', 'room-history', 'provider-actions', 'move-reference-rewrites'];
|
|
6
4
|
export type MdModelIdentity = {
|
|
7
5
|
identity: string;
|
|
8
6
|
version: string;
|
|
9
7
|
};
|
|
10
8
|
export type TypedSelection = {
|
|
11
9
|
roots: readonly string[];
|
|
12
|
-
attachedModel: ModelIdentity | null;
|
|
13
10
|
};
|
|
14
11
|
export type OperationScopes = {
|
|
15
12
|
read: readonly string[];
|
|
@@ -24,25 +21,32 @@ export type ReplicaAdmission = {
|
|
|
24
21
|
export type DiscoveredRoom = {
|
|
25
22
|
name: string;
|
|
26
23
|
locator: string;
|
|
24
|
+
handle: string;
|
|
27
25
|
roomVersion: string;
|
|
28
26
|
operations: OperationScopes;
|
|
29
27
|
replica: ReplicaAdmission;
|
|
30
|
-
attachedModel: ModelIdentity | null;
|
|
31
28
|
typedSelection?: TypedSelection;
|
|
32
|
-
untypedFolders?: readonly string[];
|
|
33
29
|
providerOwnedPaths: readonly string[];
|
|
34
30
|
};
|
|
35
31
|
export type Capability = {
|
|
36
32
|
name: string;
|
|
37
33
|
limits?: readonly ProviderLimit[];
|
|
38
34
|
actions?: readonly ActionDeclaration[];
|
|
39
|
-
|
|
35
|
+
conversationAgents?: ConversationAgents;
|
|
40
36
|
};
|
|
41
|
-
export type
|
|
37
|
+
export type ConversationAgents = {
|
|
42
38
|
locator: string;
|
|
43
39
|
type: string;
|
|
44
40
|
identity: string;
|
|
41
|
+
name: string;
|
|
42
|
+
};
|
|
43
|
+
export type ListedConversation = {
|
|
44
|
+
conversation: string;
|
|
45
45
|
agent: string;
|
|
46
|
+
name: string;
|
|
47
|
+
created: string;
|
|
48
|
+
finished: string | null;
|
|
49
|
+
outcome: string | null;
|
|
46
50
|
};
|
|
47
51
|
export type ConversationAction = 'conversation.create' | 'conversation.send' | 'conversation.answer' | 'conversation.interrupt' | 'conversation.kill' | 'conversation.cancel' | 'conversation.delete' | 'conversation.history';
|
|
48
52
|
export type ConversationMessage = {
|
|
@@ -68,15 +72,37 @@ export type ConversationHistoryPage = {
|
|
|
68
72
|
export type ConversationHistories = {
|
|
69
73
|
histories: readonly ConversationHistoryPage[];
|
|
70
74
|
};
|
|
71
|
-
export type
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
export type TurnContext = {
|
|
76
|
+
used: number;
|
|
77
|
+
window: number;
|
|
74
78
|
};
|
|
75
|
-
export type
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
export type TurnOperation = {
|
|
80
|
+
op: 'begin';
|
|
81
|
+
at: string;
|
|
82
|
+
} | {
|
|
83
|
+
op: 'start';
|
|
84
|
+
index: number;
|
|
85
|
+
part: unknown;
|
|
86
|
+
} | {
|
|
87
|
+
op: 'append';
|
|
88
|
+
index: number;
|
|
89
|
+
text: string;
|
|
90
|
+
} | {
|
|
91
|
+
op: 'status';
|
|
92
|
+
index: number;
|
|
78
93
|
status: string;
|
|
79
|
-
|
|
94
|
+
result: unknown;
|
|
95
|
+
} | {
|
|
96
|
+
op: 'count';
|
|
97
|
+
index: number;
|
|
98
|
+
count: number;
|
|
99
|
+
} | {
|
|
100
|
+
op: 'plan';
|
|
101
|
+
index: number;
|
|
102
|
+
entries: readonly unknown[];
|
|
103
|
+
} | ({
|
|
104
|
+
op: 'context';
|
|
105
|
+
} & TurnContext);
|
|
80
106
|
export type ProcessCommand = {
|
|
81
107
|
[field: string]: unknown;
|
|
82
108
|
name: string;
|
|
@@ -114,19 +140,10 @@ export type SessionOption = (SessionOptionNaming & {
|
|
|
114
140
|
currentValue: boolean;
|
|
115
141
|
});
|
|
116
142
|
export type ConversationEvent = {
|
|
117
|
-
kind: '
|
|
143
|
+
kind: 'turn';
|
|
118
144
|
conversation: string;
|
|
119
145
|
turn: string;
|
|
120
|
-
|
|
121
|
-
} | {
|
|
122
|
-
kind: 'plan';
|
|
123
|
-
conversation: string;
|
|
124
|
-
turn: string;
|
|
125
|
-
plan: readonly PlanStep[];
|
|
126
|
-
} | {
|
|
127
|
-
kind: 'working-note';
|
|
128
|
-
conversation: string;
|
|
129
|
-
note: WorkingNote | null;
|
|
146
|
+
operation: TurnOperation;
|
|
130
147
|
} | {
|
|
131
148
|
kind: 'questions';
|
|
132
149
|
conversation: string;
|
|
@@ -150,6 +167,15 @@ export type ConversationEvent = {
|
|
|
150
167
|
} | {
|
|
151
168
|
kind: 'gap';
|
|
152
169
|
conversation: string;
|
|
170
|
+
} | {
|
|
171
|
+
kind: 'list';
|
|
172
|
+
entries: readonly ListedConversation[];
|
|
173
|
+
} | {
|
|
174
|
+
kind: 'listed';
|
|
175
|
+
entry: ListedConversation;
|
|
176
|
+
} | {
|
|
177
|
+
kind: 'unlisted';
|
|
178
|
+
conversation: string;
|
|
153
179
|
};
|
|
154
180
|
export type ConversationStream = {
|
|
155
181
|
replicate(conversations: readonly string[]): void;
|
|
@@ -177,16 +203,7 @@ export type Retention = {
|
|
|
177
203
|
};
|
|
178
204
|
export type Discovery = {
|
|
179
205
|
kind: 'discovery';
|
|
180
|
-
supportedVersions: readonly number[];
|
|
181
|
-
mdModel: MdModelIdentity;
|
|
182
206
|
rooms: readonly DiscoveredRoom[];
|
|
183
|
-
slots?: readonly {
|
|
184
|
-
slot: string;
|
|
185
|
-
entries: readonly {
|
|
186
|
-
locator: string;
|
|
187
|
-
segment: string | null;
|
|
188
|
-
}[];
|
|
189
|
-
}[];
|
|
190
207
|
capabilities: readonly Capability[];
|
|
191
208
|
providerLimits: readonly ProviderLimit[];
|
|
192
209
|
retention: Retention;
|
|
@@ -241,9 +258,14 @@ export type BootstrapRequest = {
|
|
|
241
258
|
selection: string;
|
|
242
259
|
pageToken?: PageToken;
|
|
243
260
|
};
|
|
261
|
+
export type RoomModels = {
|
|
262
|
+
collection?: ModelResult;
|
|
263
|
+
selection?: ModelResult;
|
|
264
|
+
};
|
|
244
265
|
export type BootstrapPage = {
|
|
245
266
|
kind: 'bootstrap';
|
|
246
267
|
roomVersion: string;
|
|
268
|
+
models?: RoomModels;
|
|
247
269
|
documents: Readonly<Record<string, string>>;
|
|
248
270
|
revisions: Readonly<Record<string, string>>;
|
|
249
271
|
changes: Readonly<Record<string, HeadChange>>;
|
|
@@ -256,12 +278,12 @@ export type RefreshRequest = {
|
|
|
256
278
|
locator: string;
|
|
257
279
|
selection: string;
|
|
258
280
|
fromRoomVersion: string;
|
|
259
|
-
minPosition?: string;
|
|
260
281
|
pageToken?: PageToken;
|
|
261
282
|
};
|
|
262
283
|
export type RefreshPage = {
|
|
263
284
|
kind: 'net-advancement';
|
|
264
285
|
roomVersion: string;
|
|
286
|
+
models?: RoomModels;
|
|
265
287
|
documents: Readonly<Record<string, string>>;
|
|
266
288
|
revisions: Readonly<Record<string, string>>;
|
|
267
289
|
changes: Readonly<Record<string, HeadChange>>;
|
|
@@ -294,6 +316,7 @@ export type MutationResult = {
|
|
|
294
316
|
documents: Readonly<Record<string, string>>;
|
|
295
317
|
revisions: Readonly<Record<string, string>>;
|
|
296
318
|
removals: readonly string[];
|
|
319
|
+
attachments?: readonly RoomAttachment[];
|
|
297
320
|
author?: string;
|
|
298
321
|
time?: string;
|
|
299
322
|
} | (ProviderRefusal & {
|
|
@@ -331,6 +354,7 @@ export type HistoryResult = {
|
|
|
331
354
|
kind: 'history';
|
|
332
355
|
revisions: readonly HistoryRevision[];
|
|
333
356
|
pageToken?: PageToken;
|
|
357
|
+
deleted?: true;
|
|
334
358
|
} | {
|
|
335
359
|
kind: 'revision';
|
|
336
360
|
content: string;
|
|
@@ -352,27 +376,32 @@ export type ActionResult = {
|
|
|
352
376
|
} | (ProviderRefusal & {
|
|
353
377
|
kind: 'rejected';
|
|
354
378
|
}) | AdapterFailure;
|
|
355
|
-
export type
|
|
379
|
+
export type HeldRoom = {
|
|
356
380
|
locator: string;
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
attached: 'typed-selection';
|
|
362
|
-
roots: readonly string[];
|
|
363
|
-
model: ModelIdentity | null;
|
|
381
|
+
roomVersion: string;
|
|
382
|
+
documents: Readonly<Record<string, string>>;
|
|
383
|
+
revisions: Readonly<Record<string, string>>;
|
|
384
|
+
attachments: readonly RoomAttachment[];
|
|
364
385
|
};
|
|
365
|
-
export type
|
|
386
|
+
export type RoomStreamEvent = {
|
|
387
|
+
kind: 'opened';
|
|
388
|
+
} | {
|
|
389
|
+
kind: 'closed';
|
|
390
|
+
revoked: boolean;
|
|
391
|
+
} | {
|
|
392
|
+
kind: 'opening';
|
|
393
|
+
expired: readonly string[];
|
|
394
|
+
} | {
|
|
395
|
+
kind: 'room-version';
|
|
366
396
|
locator: string;
|
|
367
397
|
roomVersion: string;
|
|
368
|
-
modelChanged?: true;
|
|
369
398
|
};
|
|
370
|
-
export type
|
|
371
|
-
|
|
372
|
-
|
|
399
|
+
export type RoomStream = {
|
|
400
|
+
hold(rooms: readonly HeldRoom[]): void;
|
|
401
|
+
reopen(): void;
|
|
402
|
+
observe(notify: (event: RoomStreamEvent) => void): () => void;
|
|
373
403
|
};
|
|
374
404
|
export type Adapter = {
|
|
375
|
-
model(authorization: Authorization, request: ModelRequest): Promise<ModelResult>;
|
|
376
405
|
authorize(): Promise<Authorization>;
|
|
377
406
|
discover(authorization: Authorization): Promise<DiscoverResult>;
|
|
378
407
|
bootstrap(authorization: Authorization, request: BootstrapRequest): Promise<BootstrapResult>;
|
|
@@ -381,7 +410,8 @@ export type Adapter = {
|
|
|
381
410
|
history(authorization: Authorization, request: HistoryRequest): Promise<HistoryResult>;
|
|
382
411
|
action(authorization: Authorization, request: ActionRequest): Promise<ActionResult>;
|
|
383
412
|
reached(locator: string, roomVersion: string, target: string): boolean;
|
|
384
|
-
|
|
413
|
+
follows(locator: string, roomVersion: string, next: string): boolean;
|
|
414
|
+
roomStream?: RoomStream;
|
|
385
415
|
conversations?: ConversationStream;
|
|
386
416
|
serviceMode?: ServiceModeSignal;
|
|
387
417
|
};
|
package/dist/adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/ad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aAAa,CAAC,CAAC;IACvF,MAAM,CAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACpF,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACvE,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACrE,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC,CAAC"}
|
package/dist/adapter.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ModelResult, type ModelState } from './model.js';
|
|
2
|
+
export type AttachedModel = {
|
|
3
|
+
state: ModelState;
|
|
4
|
+
refused: {
|
|
5
|
+
identity: string;
|
|
6
|
+
rule: string;
|
|
7
|
+
location?: string;
|
|
8
|
+
} | null;
|
|
9
|
+
};
|
|
10
|
+
export declare function attachedModel(answer: ModelResult, previous: ModelState): AttachedModel;
|
|
11
|
+
//# sourceMappingURL=attached-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attached-model.d.ts","sourceRoot":"","sources":["../src/attached-model.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAI1E,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACvE,CAAC;AAEF,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,GAAG,aAAa,CA4CtF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { verify } from '@agentshouse/mdmodel';
|
|
2
|
+
import { MD_MODEL } from './collection.js';
|
|
3
|
+
import { sameModel } from './model.js';
|
|
4
|
+
const EMPTY_SCHEMA = { verdict: 'accept', model: { types: {} } };
|
|
5
|
+
export function attachedModel(answer, previous) {
|
|
6
|
+
if (answer.kind === 'model-unavailable') {
|
|
7
|
+
return { state: { status: 'unavailable', reason: answer.reason }, refused: null };
|
|
8
|
+
}
|
|
9
|
+
if (previous.status !== 'unavailable' &&
|
|
10
|
+
sameModel(previous.snapshot, answer.snapshot) &&
|
|
11
|
+
previous.snapshot.schema !== answer.snapshot.schema) {
|
|
12
|
+
return {
|
|
13
|
+
state: {
|
|
14
|
+
status: 'unavailable',
|
|
15
|
+
reason: 'invalid',
|
|
16
|
+
schema: answer.snapshot.schema,
|
|
17
|
+
revision: answer.snapshot.revision,
|
|
18
|
+
},
|
|
19
|
+
refused: null,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const verified = answer.snapshot.schema === null ? EMPTY_SCHEMA : verify(answer.snapshot.schema);
|
|
23
|
+
if (verified.verdict === 'refuse') {
|
|
24
|
+
return {
|
|
25
|
+
state: {
|
|
26
|
+
status: 'unavailable',
|
|
27
|
+
reason: 'invalid',
|
|
28
|
+
schema: answer.snapshot.schema,
|
|
29
|
+
revision: answer.snapshot.revision,
|
|
30
|
+
},
|
|
31
|
+
refused: {
|
|
32
|
+
identity: answer.snapshot.identity,
|
|
33
|
+
rule: verified.rule,
|
|
34
|
+
...(verified.location === undefined ? {} : { location: verified.location }),
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
state: {
|
|
40
|
+
status: 'current',
|
|
41
|
+
snapshot: structuredClone(answer.snapshot),
|
|
42
|
+
verifiedWith: MD_MODEL,
|
|
43
|
+
types: verified.model.types,
|
|
44
|
+
},
|
|
45
|
+
refused: null,
|
|
46
|
+
};
|
|
47
|
+
}
|