@agentshouse/mdruntime-adapter 0.1.0-cda5b3be3317e → 0.1.0-ce1149641691d
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 +28 -23
- package/dist/actions.d.ts +3 -0
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +25 -7
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +143 -84
- package/dist/discovery.d.ts +3 -2
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +24 -6
- package/dist/gather.d.ts +1 -1
- package/dist/gather.d.ts.map +1 -1
- package/dist/gather.js +4 -14
- package/dist/handed.d.ts +6 -6
- package/dist/handed.d.ts.map +1 -1
- package/dist/handed.js +36 -29
- package/dist/part.d.ts +13 -0
- package/dist/part.d.ts.map +1 -0
- package/dist/part.js +80 -0
- package/dist/read.d.ts +33 -23
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +159 -120
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +57 -73
- package/dist/stream.d.ts +2 -3
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +23 -34
- package/dist/transport.d.ts +1 -0
- package/dist/transport.d.ts.map +1 -1
- package/dist/write.d.ts +12 -1
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +79 -38
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -5,8 +5,8 @@ change it, build, and push. They are documentation, not enforcement.
|
|
|
5
5
|
|
|
6
6
|
## The MD Runtime API
|
|
7
7
|
|
|
8
|
-
App code reaches the MD Runtime through the remote client. The surfaces are Rooms,
|
|
9
|
-
|
|
8
|
+
App code reaches the MD Runtime through the remote client. The surfaces are Rooms, Query,
|
|
9
|
+
Search, Observe, Types, Room Draft, Save, History, Resolve, the binary file reads, Call,
|
|
10
10
|
Reached, Log, the reported persistence answer, reauthorization, conversation, the chat
|
|
11
11
|
draft, and Presentation State. Sync Status, readiness, the Service Mode, the storage-loss
|
|
12
12
|
statement, the deployment facts and the signed-in member are observations only.
|
|
@@ -77,7 +77,7 @@ author, `{ kind: 'user', id }` or `{ kind: 'site', id, name }`; History of a Pat
|
|
|
77
77
|
document holds answers the removed document's revisions, newest first, with `deleted:
|
|
78
78
|
true`, which a link to the Path opens. Every member is asynchronous and every result a
|
|
79
79
|
detached snapshot; nothing returns the authorization, performs a request the App's code
|
|
80
|
-
composes, or exposes the browser store.
|
|
80
|
+
composes, or exposes the browser store. A Room `rooms` names `locked` shows only online.
|
|
81
81
|
|
|
82
82
|
Every refusal and failure carries `code` and `retryable`: each Call and History answer
|
|
83
83
|
other than its result, a refused Save or Room Draft write, a returned Room Draft's reason,
|
|
@@ -101,8 +101,8 @@ named; signing out answers `null`, then ends the observation with the authorizat
|
|
|
101
101
|
hears it again only when it changes, keeping every unchanged Document the same object, so
|
|
102
102
|
a component can tell what changed by identity. `{ documents, coverage }` or `{ groups,
|
|
103
103
|
coverage }` is complete for the Rooms its `coverage` names, and `{ pending }` names each
|
|
104
|
-
Room not yet acquired or
|
|
105
|
-
as loading and observe the query to hear the complete answer. A query is data:
|
|
104
|
+
Room not yet acquired, prepared or unlocked, `[{ room, awaits }]`: never read it as empty,
|
|
105
|
+
draw it as loading and observe the query to hear the complete answer. A query is data:
|
|
106
106
|
|
|
107
107
|
- **Filter.** `rooms` names Room locators and defaults to every Room. `types` names MD
|
|
108
108
|
Types, and `any` names untyped Markdown Documents. `pathPrefix` is a directory: `notes`
|
|
@@ -119,10 +119,13 @@ as loading and observe the query to hear the complete answer. A query is data:
|
|
|
119
119
|
compares in calendar order and never with a date-time. A reference compares by the
|
|
120
120
|
Room Path it resolves to. Untyped frontmatter, and a value under `oneOf` or a
|
|
121
121
|
conditional, is plain values. There is no text containment or regular expression.
|
|
122
|
-
- **Relations.** `hop: { field, types, where, pathPrefix }` keeps Documents
|
|
123
|
-
reference at pointer `field`, at any depth, points to a matching Document
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
- **Relations.** Within one Room, `hop: { field, types, where, pathPrefix }` keeps Documents
|
|
123
|
+
whose reference at pointer `field`, at any depth, points to a matching Document, and
|
|
124
|
+
`backlinks` with the same keys those a matching Document references, each once. A body
|
|
125
|
+
link, or a reference declaring `cross_room`, may name another Room's
|
|
126
|
+
`/rooms/<handle>/<path>`: `resolve(room, path, destination)` answers its `document`, the
|
|
127
|
+
`deleted` one's last `revision`, or `unreadable` where the App does not bind it or it is
|
|
128
|
+
locked.
|
|
126
129
|
- **Parts.** A Document query must `select`: `'all'`, or `fields`, `sections`,
|
|
127
130
|
`preamble`, `markdown`, `backlinks`, `change` and `fileId`, where `fields` is `'all'`
|
|
128
131
|
or a list of pointers and `sections` `'all'` or a list of names. Selected pointers
|
|
@@ -185,22 +188,24 @@ once, by words, from local state, with MiniSearch's defaults. There is no observ
|
|
|
185
188
|
|
|
186
189
|
The MD Runtime owns one durable Room Draft per Room and Path, shared by every App and tab
|
|
187
190
|
across reloads; a Room the Provider reports lost takes its Room Drafts and queue with it.
|
|
188
|
-
Write one with `roomDraft.write(room, path, revision, parts)`, naming the revision you
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
showed when it was opened, a field's as `{ value }` or
|
|
192
|
-
its first base; a binary Path entry's move or removal
|
|
193
|
-
from an older revision is refused as `stale` with the
|
|
191
|
+
Write one with `roomDraft.write(room, path, revision, parts)`, naming the revision you read
|
|
192
|
+
or `null`, and every part it now changes: fields, sections and the preamble, or the whole
|
|
193
|
+
Markdown, a creation, a move, into another Room when it names `room`, or a removal. A new
|
|
194
|
+
part names its base, the value you showed when it was opened, a field's as `{ value }` or
|
|
195
|
+
`null` for no such field, and keeps its first base; a binary Path entry's move or removal
|
|
196
|
+
takes `null`. A write or discard from an older revision is refused as `stale` with the
|
|
197
|
+
current Room Draft.
|
|
194
198
|
|
|
195
199
|
Save takes one Room and the Room Drafts of it to save, each with its revision, validates
|
|
196
|
-
locally, and on success appends one Change Batch to that Room's queue and removes those
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
200
|
+
locally, and on success appends one Change Batch to that Room's queue and removes those Room
|
|
201
|
+
Drafts. Refused as `stale`, `changed-underneath` naming each part whose base no longer
|
|
202
|
+
matches the visible state, or a local validation rule, it creates nothing and leaves every
|
|
203
|
+
Room Draft. A directory move or removal is that part on each Document and binary Path entry
|
|
204
|
+
beneath it, saved together; moves into another Room, saved alone, are one Change Batch in
|
|
205
|
+
both Rooms' queues. `saveParts(room, [{ path, parts }])` saves parts, each Path once and
|
|
206
|
+
each new part with its base, the same way but writes no Room Draft: one held at a saved Path
|
|
207
|
+
stays, one at a moved Path moves with it to a destination that holds none. Never save by
|
|
208
|
+
writing back a Room Draft read before.
|
|
204
209
|
|
|
205
210
|
Outcomes follow the Provider's answer. An Accepted Change Batch stays in the queue, drawn
|
|
206
211
|
over the confirmed layer, until that layer reaches the Room Version it was accepted at.
|
package/dist/actions.d.ts
CHANGED
|
@@ -28,6 +28,9 @@ export type AppInputs = {
|
|
|
28
28
|
readonly text?: string;
|
|
29
29
|
readonly files?: readonly SentFile[];
|
|
30
30
|
};
|
|
31
|
+
readonly 'trigger.list': {
|
|
32
|
+
readonly room_refs: readonly string[];
|
|
33
|
+
};
|
|
31
34
|
};
|
|
32
35
|
export type AppAnswers = {
|
|
33
36
|
readonly 'conversation.history': ConversationHistories;
|
package/dist/actions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAE1B,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACrB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,M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MAAM,EAAE,MAAM,CAAC,CAE5D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAKhF,CAAC;AAYJ,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,CAE3E;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,iBAAiB,EAAE,CAKvF;AAED,wBAAgB,WAAW,CACzB,SAAS,EAAE,cAAc,EACzB,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,YAAY,CAAC,CAQvB;AA6ED,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY,CAQjF;AAuKD,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CAiBtE"}
|
package/dist/actions.js
CHANGED
|
@@ -2,6 +2,7 @@ import { changeBatchIdentity, } from '@agentshouse/mdruntime';
|
|
|
2
2
|
import { doorRefusal } from './refusal.js';
|
|
3
3
|
const HISTORY_PAGE = 100;
|
|
4
4
|
const HISTORY_CONVERSATIONS = 64;
|
|
5
|
+
const TRIGGER_ROOMS = 100;
|
|
5
6
|
const OCTET_STREAM = 'application/octet-stream';
|
|
6
7
|
function mapped(door, input = (given) => given) {
|
|
7
8
|
return {
|
|
@@ -11,10 +12,11 @@ function mapped(door, input = (given) => given) {
|
|
|
11
12
|
},
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
|
-
function carried(door, carry, batched) {
|
|
15
|
+
function carried(door, carry, batched, room) {
|
|
15
16
|
return {
|
|
16
17
|
door,
|
|
17
18
|
...(batched === undefined ? {} : { batched }),
|
|
19
|
+
...(room === undefined ? {} : { room }),
|
|
18
20
|
carry: (transport, input, name) => carry(transport, `/door/${door}`, input, name),
|
|
19
21
|
};
|
|
20
22
|
}
|
|
@@ -44,7 +46,7 @@ const APP_ACTS = {
|
|
|
44
46
|
'routineAllowance.list': mapped('routines/allowance'),
|
|
45
47
|
'routineRequest.list': mapped('routines/requests'),
|
|
46
48
|
'storage.read': mapped('storage/inventory'),
|
|
47
|
-
'trigger.list':
|
|
49
|
+
'trigger.list': carried('triggers/read', triggersAction, ['room_refs'], 'room_refs'),
|
|
48
50
|
'triggerOccurrence.list': mapped('triggers/fired'),
|
|
49
51
|
};
|
|
50
52
|
export const HOUSE_APP_ACTS = Object.fromEntries(Object.entries(APP_ACTS).map(([name, act]) => [name, act.door]));
|
|
@@ -54,15 +56,15 @@ export const HOUSE_SITE_ACTS = {
|
|
|
54
56
|
};
|
|
55
57
|
export const HOUSE_APP_BATCHES = Object.fromEntries(Object.entries(APP_ACTS).flatMap(([name, act]) => act.batched === undefined ? [] : [[name, act.batched]]));
|
|
56
58
|
const APP_NAMES = new Map(Object.entries(APP_ACTS).map(([name, act]) => [act.door, name]));
|
|
59
|
+
const APP_ROOMS = new Map(Object.entries(APP_ACTS).flatMap(([name, act]) => act.room === undefined ? [] : [[name, act.room]]));
|
|
57
60
|
export function houseConversationAgents(locator) {
|
|
58
61
|
return { locator, type: 'house-agent', identity: 'agent', name: 'name', retired: 'retired' };
|
|
59
62
|
}
|
|
60
63
|
export function declaredActions(routes) {
|
|
61
|
-
return routes.map((route) =>
|
|
62
|
-
name
|
|
63
|
-
inputShape: {},
|
|
64
|
-
|
|
65
|
-
}));
|
|
64
|
+
return routes.map((route) => {
|
|
65
|
+
const name = APP_NAMES.get(route) ?? route;
|
|
66
|
+
return { name, inputShape: {}, resultKind: 'house', room: APP_ROOMS.get(name) ?? 'room_ref' };
|
|
67
|
+
});
|
|
66
68
|
}
|
|
67
69
|
export function houseAction(transport, request) {
|
|
68
70
|
if (Object.hasOwn(APP_ACTS, request.name)) {
|
|
@@ -352,6 +354,22 @@ function historyAsks(input) {
|
|
|
352
354
|
}
|
|
353
355
|
return asks;
|
|
354
356
|
}
|
|
357
|
+
async function triggersAction(transport, route, input, name) {
|
|
358
|
+
const asked = record(input).room_refs;
|
|
359
|
+
if (!Array.isArray(asked) || asked.length === 0)
|
|
360
|
+
return malformed();
|
|
361
|
+
const rooms = [];
|
|
362
|
+
for (let at = 0; at < asked.length; at += TRIGGER_ROOMS) {
|
|
363
|
+
const outcome = actionOutcome(await transport.door(route, { room_refs: asked.slice(at, at + TRIGGER_ROOMS) }), name);
|
|
364
|
+
if (outcome.kind !== 'action')
|
|
365
|
+
return outcome;
|
|
366
|
+
const answered = record(outcome.result).rooms;
|
|
367
|
+
if (!Array.isArray(answered))
|
|
368
|
+
return { kind: 'transport-uncertainty' };
|
|
369
|
+
rooms.push(...answered);
|
|
370
|
+
}
|
|
371
|
+
return { kind: 'action', result: { rooms } };
|
|
372
|
+
}
|
|
355
373
|
async function historyAction(transport, route, input, name) {
|
|
356
374
|
const asks = historyAsks(input);
|
|
357
375
|
if (asks === null)
|
package/dist/adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,OAAO,EACP,aAAa,EAmBd,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,OAAO,EACP,aAAa,EAmBd,MAAM,wBAAwB,CAAC;AA6ChC,OAAO,EASL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AA0BxB,MAAM,MAAM,yBAAyB,GACjC;IACE,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;CACrC,GACD;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAuFrD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CA4mBpF"}
|
package/dist/adapter.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
import { sortedKeys, stepped } from '@agentshouse/mdruntime';
|
|
1
2
|
import { DISCOVER_PREFIXES, capabilities, discoveredRoom, mapDiscovery, parseDiscovery, trackedFrom, } from './discovery.js';
|
|
2
3
|
import { partModels, streamedModels, viewModels } from './model.js';
|
|
3
4
|
import { gathered, gatheredEach, selections } from './gather.js';
|
|
4
5
|
import { createSiteAdapter } from './site.js';
|
|
5
|
-
import {
|
|
6
|
+
import { authorityRoot, bootstrapping, emptyScope, housePart, parseEnumeration, parseGrant, parseParted, refreshFrom, viewOf, wholeView, } from './read.js';
|
|
7
|
+
import { PART_ATTEMPTS, unverifiedPart } from './part.js';
|
|
6
8
|
import { sha256Hex } from './digest.js';
|
|
7
9
|
import { acceptedHanded, enumeratedHanded, heldHanded, scopeHanded, streamedHanded, } from './handed.js';
|
|
8
10
|
import { houseAction } from './actions.js';
|
|
9
11
|
import { classifyDoor, classifyRead, discoveryFailure, doorRefusal } from './refusal.js';
|
|
10
12
|
import { houseNotifications } from './stream.js';
|
|
11
13
|
import { DOOR_BATCH, DOOR_BATCH_UPLOAD, DOOR_BOOTSTRAP, DOOR_DISCOVER, DOOR_ENUMERATE, DOOR_FILES_GET, DOOR_REVISIONS, } from './transport.js';
|
|
12
|
-
import { batchPaths, deltaBody, deltaBytes, deltaDigest, historyOutcome, houseChanges, mutationOutcome, operationHead, rejectedMapping, revisionBody, uploadable, } from './write.js';
|
|
14
|
+
import { batchPaths, deltaBody, deltaBytes, deltaDigest, historyOutcome, houseChanges, houseMove, mutationOutcome, operationHead, rejectedMapping, revisionBody, uploadable, } from './write.js';
|
|
13
15
|
import { houseReferrer } from './referrer.js';
|
|
14
16
|
import { followsVersion, logPosition, presented, reachedVersion, roomVersion, } from './version.js';
|
|
15
17
|
const UNCERTAIN = { kind: 'transport-uncertainty' };
|
|
@@ -17,16 +19,28 @@ const UNCERTAIN_READ = { kind: 'transport-uncertainty' };
|
|
|
17
19
|
function lapsedGrant(outcome) {
|
|
18
20
|
return outcome.kind === 'rejected' && outcome.code === 'upload_unavailable';
|
|
19
21
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
const heldPaths = new WeakMap();
|
|
23
|
+
async function sortedHeld(held) {
|
|
24
|
+
const known = heldPaths.get(held.documents);
|
|
25
|
+
if (known !== undefined)
|
|
26
|
+
return known;
|
|
27
|
+
const sorted = await stepped(sortedKeys(held.documents));
|
|
28
|
+
heldPaths.set(held.documents, sorted);
|
|
29
|
+
return sorted;
|
|
30
|
+
}
|
|
31
|
+
function heldFiles(authority, held, paths, bound) {
|
|
32
|
+
const files = [];
|
|
33
|
+
let through = null;
|
|
34
|
+
for (let at = 0; at < paths.length && through === null; at += 1) {
|
|
35
|
+
const revision = held.revisions[paths[at]];
|
|
36
|
+
if (revision === undefined)
|
|
37
|
+
continue;
|
|
38
|
+
if (files.length === bound)
|
|
39
|
+
through = files.at(-1).path;
|
|
40
|
+
else
|
|
41
|
+
files.push({ path: paths[at], revision });
|
|
42
|
+
}
|
|
43
|
+
return files.length === 0 ? null : { room: authority, through, files };
|
|
30
44
|
}
|
|
31
45
|
async function reused(scope, held) {
|
|
32
46
|
const sent = new Set(scope.contents.map((entry) => entry.path));
|
|
@@ -57,42 +71,71 @@ export function createAgentsHouseAdapter(options) {
|
|
|
57
71
|
throw new Error('no Discovery declared the bounds');
|
|
58
72
|
return bounds;
|
|
59
73
|
}
|
|
60
|
-
|
|
74
|
+
function hand(locator, steps) {
|
|
75
|
+
const held = handed.get(locator);
|
|
76
|
+
const next = stepped(steps);
|
|
77
|
+
if (!(next instanceof Promise)) {
|
|
78
|
+
handed.set(locator, next);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
return next.then((room) => {
|
|
82
|
+
if (handed.get(locator) === held)
|
|
83
|
+
handed.set(locator, room);
|
|
84
|
+
else
|
|
85
|
+
handed.delete(locator);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
async function fetchedPart(entry, continued, listed) {
|
|
89
|
+
for (let attempt = 0; attempt < PART_ATTEMPTS; attempt += 1) {
|
|
90
|
+
const answered = await transport.door(DOOR_BOOTSTRAP, {
|
|
91
|
+
prefixes: [authorityRoot(entry.handle)],
|
|
92
|
+
part: listed.part,
|
|
93
|
+
...(continued.held === undefined ? {} : { held: [continued.held] }),
|
|
94
|
+
});
|
|
95
|
+
const failure = classifyRead(answered.status, answered.body, entry.locator);
|
|
96
|
+
if (failure !== null)
|
|
97
|
+
return failure;
|
|
98
|
+
const scope = await housePart(continued.room, answered.body, listed, 'credential');
|
|
99
|
+
if (scope !== null)
|
|
100
|
+
return scope;
|
|
101
|
+
}
|
|
102
|
+
return unverifiedPart(entry.locator);
|
|
103
|
+
}
|
|
104
|
+
async function partPage(asked, continued) {
|
|
61
105
|
const { entry } = asked;
|
|
62
|
-
|
|
63
|
-
|
|
106
|
+
const listed = continued.room.parts[continued.next];
|
|
107
|
+
const sent = listed === undefined
|
|
108
|
+
? emptyScope(continued.room)
|
|
109
|
+
: await fetchedPart(entry, continued, listed);
|
|
110
|
+
if ('kind' in sent)
|
|
111
|
+
return sent;
|
|
64
112
|
const scope = await reused(sent, asked.held);
|
|
65
113
|
if (scope === null) {
|
|
66
114
|
return asked.held === undefined
|
|
67
115
|
? UNCERTAIN_READ
|
|
68
|
-
:
|
|
69
|
-
? bootstrapTogether({ entry, held: undefined })
|
|
70
|
-
: continuedBootstrap({ entry, held: undefined }, continued);
|
|
116
|
+
: bootstrapTogether({ entry, held: undefined });
|
|
71
117
|
}
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
if (continued ===
|
|
75
|
-
|
|
118
|
+
const next = continued.next + 1;
|
|
119
|
+
const more = next < continued.room.parts.length;
|
|
120
|
+
if (continued.next === 0 && !more)
|
|
121
|
+
await hand(entry.locator, scopeHanded(scope));
|
|
76
122
|
else
|
|
77
123
|
handed.delete(entry.locator);
|
|
78
124
|
notifications.reach(entry.authority, scope);
|
|
79
125
|
const seen = [
|
|
80
|
-
...
|
|
126
|
+
...continued.seen,
|
|
81
127
|
...entry.schemas.filter((schema) => scope.files.some((file) => file.path === schema)),
|
|
82
128
|
];
|
|
83
|
-
const models = await partModels(scope, entry, new Set(seen),
|
|
84
|
-
const continuation = next === null
|
|
85
|
-
? null
|
|
86
|
-
: { after: next, seen, ...(cursor?.cut === undefined ? {} : { cut: cursor.cut }) };
|
|
129
|
+
const models = await partModels(scope, entry, new Set(seen), !more);
|
|
87
130
|
return {
|
|
88
|
-
...
|
|
131
|
+
...(await stepped(bootstrapping(scope))),
|
|
89
132
|
...(models === undefined ? {} : { models }),
|
|
90
|
-
...(
|
|
133
|
+
...(more ? { pageToken: JSON.stringify({ ...continued, next, seen }) } : {}),
|
|
91
134
|
};
|
|
92
135
|
}
|
|
93
136
|
async function enumeratedPage(ask, page) {
|
|
94
137
|
const answer = await transport.door(DOOR_ENUMERATE, {
|
|
95
|
-
prefixes:
|
|
138
|
+
prefixes: [authorityRoot(ask.entry.handle)],
|
|
96
139
|
positions: [
|
|
97
140
|
{
|
|
98
141
|
...presented(ask.entry.authority, { position: page.after, logEpoch: ask.from.logEpoch }),
|
|
@@ -116,10 +159,10 @@ export function createAgentsHouseAdapter(options) {
|
|
|
116
159
|
if ('kind' in view)
|
|
117
160
|
return view;
|
|
118
161
|
notifications.reach(ask.entry.authority, view);
|
|
119
|
-
const answer = refreshFrom(view, ask.fromRoomVersion);
|
|
162
|
+
const answer = await refreshFrom(view, ask.fromRoomVersion);
|
|
120
163
|
if (answer.kind !== 'net-advancement')
|
|
121
164
|
return answer;
|
|
122
|
-
|
|
165
|
+
await hand(ask.entry.locator, enumeratedHanded(view, handed.get(ask.entry.locator)));
|
|
123
166
|
const models = await viewModels(view, ask.entry);
|
|
124
167
|
return models === undefined ? answer : { ...answer, models };
|
|
125
168
|
}
|
|
@@ -127,10 +170,10 @@ export function createAgentsHouseAdapter(options) {
|
|
|
127
170
|
const held = handed.get(entry.locator);
|
|
128
171
|
if (held?.roomVersion !== request.fromRoomVersion)
|
|
129
172
|
return null;
|
|
130
|
-
const advanced = notifications.advance(entry, from, (path, revision) => held.revisions
|
|
173
|
+
const advanced = await stepped(notifications.advance(entry, from, (path, revision) => held.revisions[path] === revision));
|
|
131
174
|
if (advanced === null)
|
|
132
175
|
return null;
|
|
133
|
-
|
|
176
|
+
await hand(entry.locator, streamedHanded(held, advanced));
|
|
134
177
|
const models = await streamedModels(advanced.schemas, entry, 'credential');
|
|
135
178
|
return models === undefined ? advanced.page : { ...advanced.page, models };
|
|
136
179
|
}
|
|
@@ -146,14 +189,20 @@ export function createAgentsHouseAdapter(options) {
|
|
|
146
189
|
});
|
|
147
190
|
notifications.send(kept);
|
|
148
191
|
}
|
|
149
|
-
function
|
|
192
|
+
async function adoptedMove(entry, into, outcome) {
|
|
193
|
+
if (outcome.kind === 'accepted' && outcome.destination !== undefined) {
|
|
194
|
+
await adopted(into, { kind: 'accepted', ...outcome.destination });
|
|
195
|
+
}
|
|
196
|
+
return adopted(entry, outcome);
|
|
197
|
+
}
|
|
198
|
+
async function adopted(entry, outcome) {
|
|
150
199
|
if (outcome.kind !== 'accepted')
|
|
151
200
|
return outcome;
|
|
152
201
|
const held = handed.get(entry.locator);
|
|
153
202
|
if (held === undefined)
|
|
154
203
|
return outcome;
|
|
155
204
|
const follows = followsVersion(held.roomVersion, outcome.roomVersion);
|
|
156
|
-
|
|
205
|
+
await hand(entry.locator, acceptedHanded(held, outcome, follows ? outcome.roomVersion : held.roomVersion));
|
|
157
206
|
const at = logPosition(outcome.roomVersion);
|
|
158
207
|
if (follows && at !== null)
|
|
159
208
|
notifications.reach(entry.authority, at);
|
|
@@ -176,68 +225,62 @@ export function createAgentsHouseAdapter(options) {
|
|
|
176
225
|
return result;
|
|
177
226
|
return { ...result, at: { locator, roomVersion: roomVersion({ position, logEpoch }) } };
|
|
178
227
|
}
|
|
179
|
-
function
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
228
|
+
async function holding(asks) {
|
|
229
|
+
const bound = Math.floor(declared().max_held_files / Math.max(1, asks.filter((ask) => ask.held !== undefined).length));
|
|
230
|
+
const held = [];
|
|
231
|
+
for (const ask of asks) {
|
|
232
|
+
if (ask.held === undefined || bound === 0)
|
|
233
|
+
continue;
|
|
234
|
+
const paths = await sortedHeld(ask.held);
|
|
235
|
+
const files = heldFiles(ask.entry.authority, ask.held, paths, bound);
|
|
236
|
+
if (files !== null)
|
|
237
|
+
held.push(files);
|
|
238
|
+
}
|
|
239
|
+
return held;
|
|
185
240
|
}
|
|
186
241
|
async function bootstrapped(asks, answer) {
|
|
187
242
|
let open = asks.map((asked, ask) => ({ entry: asked.entry, asked, ask }));
|
|
188
243
|
while (open.length > 0) {
|
|
189
244
|
const unreached = [];
|
|
190
|
-
for (const part of selections(open,
|
|
191
|
-
const held = holding(part.map(({ asked }) => asked)
|
|
245
|
+
for (const part of selections(open, declared().max_prefixes)) {
|
|
246
|
+
const held = await holding(part.map(({ asked }) => asked));
|
|
192
247
|
const answered = await transport.door(DOOR_BOOTSTRAP, {
|
|
193
|
-
prefixes: part.
|
|
248
|
+
prefixes: part.map(({ entry }) => authorityRoot(entry.handle)),
|
|
194
249
|
...(held.length === 0 ? {} : { held }),
|
|
195
250
|
});
|
|
196
251
|
const classified = part.map(({ entry }) => classifyDoor(answered.status, answered.body, entry.locator));
|
|
197
|
-
const
|
|
252
|
+
const parted = classified[0] === null ? parseParted(answered.body) : null;
|
|
198
253
|
for (const [index, asked] of part.entries()) {
|
|
199
254
|
const failure = classified[index];
|
|
200
255
|
if (failure !== null && failure !== undefined) {
|
|
201
256
|
answer(asked.ask, failure);
|
|
202
257
|
continue;
|
|
203
258
|
}
|
|
204
|
-
if (
|
|
259
|
+
if (parted === null) {
|
|
205
260
|
answer(asked.ask, UNCERTAIN_READ);
|
|
206
261
|
continue;
|
|
207
262
|
}
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
263
|
+
const room = parted.rooms.find((candidate) => candidate.anchor === asked.entry.authority);
|
|
264
|
+
if (room === undefined && parted.next !== undefined) {
|
|
210
265
|
unreached.push(asked);
|
|
211
266
|
continue;
|
|
212
267
|
}
|
|
213
|
-
|
|
268
|
+
if (room === undefined) {
|
|
269
|
+
answer(asked.ask, { kind: 'room-not-readable', locator: asked.entry.locator });
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
const kept = held.find((files) => files.room === asked.entry.authority);
|
|
273
|
+
answer(asked.ask, await partPage(asked.asked, {
|
|
274
|
+
room,
|
|
275
|
+
next: 0,
|
|
276
|
+
seen: [],
|
|
277
|
+
...(kept === undefined ? {} : { held: kept }),
|
|
278
|
+
}));
|
|
214
279
|
}
|
|
215
280
|
}
|
|
216
281
|
open = unreached;
|
|
217
282
|
}
|
|
218
283
|
}
|
|
219
|
-
async function continuedBootstrap(asked, continued) {
|
|
220
|
-
const { entry } = asked;
|
|
221
|
-
const after = {
|
|
222
|
-
room: entry.authority,
|
|
223
|
-
path: continued.after,
|
|
224
|
-
...(continued.cut === undefined ? {} : { cut: continued.cut }),
|
|
225
|
-
};
|
|
226
|
-
const held = holding([asked], continued.after);
|
|
227
|
-
const answered = await transport.door(DOOR_BOOTSTRAP, {
|
|
228
|
-
prefixes: contentPrefixes(entry),
|
|
229
|
-
after,
|
|
230
|
-
...(held.length === 0 ? {} : { held }),
|
|
231
|
-
});
|
|
232
|
-
const failure = classifyRead(answered.status, answered.body, entry.locator);
|
|
233
|
-
if (failure !== null)
|
|
234
|
-
return failure;
|
|
235
|
-
const envelope = parseEnvelope(answered.body);
|
|
236
|
-
if (envelope === null)
|
|
237
|
-
return UNCERTAIN_READ;
|
|
238
|
-
const scope = envelope.scopes.find((candidate) => matchesScope(candidate, entry));
|
|
239
|
-
return bootstrappedRoom(envelope, scope, asked, continued);
|
|
240
|
-
}
|
|
241
284
|
function layered(asks) {
|
|
242
285
|
const depths = new Map();
|
|
243
286
|
const layers = [];
|
|
@@ -250,12 +293,12 @@ export function createAgentsHouseAdapter(options) {
|
|
|
250
293
|
}
|
|
251
294
|
async function enumerated(asks) {
|
|
252
295
|
const answers = [];
|
|
253
|
-
const parts = layered(asks.map((ask, index) => ({ ask, index }))).flatMap((layer) => selections(layer,
|
|
296
|
+
const parts = layered(asks.map((ask, index) => ({ ask, index }))).flatMap((layer) => selections(layer, declared().max_prefixes));
|
|
254
297
|
for (const part of parts) {
|
|
255
298
|
let open = [...part];
|
|
256
299
|
while (open.length > 0) {
|
|
257
300
|
const answer = await transport.door(DOOR_ENUMERATE, {
|
|
258
|
-
prefixes: open.
|
|
301
|
+
prefixes: open.map(({ ask }) => authorityRoot(ask.entry.handle)),
|
|
259
302
|
positions: open.map(({ ask }) => presented(ask.entry.authority, ask.from)),
|
|
260
303
|
});
|
|
261
304
|
const classified = open.map(({ ask }) => classifyRead(answer.status, answer.body, ask.entry.locator));
|
|
@@ -294,7 +337,9 @@ export function createAgentsHouseAdapter(options) {
|
|
|
294
337
|
}
|
|
295
338
|
const minted = await transport.door(DOOR_BATCH_UPLOAD, { ...head, paths, bytes, sha256 });
|
|
296
339
|
if (minted.status !== 200) {
|
|
297
|
-
return {
|
|
340
|
+
return {
|
|
341
|
+
outcome: await stepped(mutationOutcome(minted.status, minted.body, entry.locator, entry.handle)),
|
|
342
|
+
};
|
|
298
343
|
}
|
|
299
344
|
const grant = parseGrant(minted.body);
|
|
300
345
|
if (grant === null || grant.method !== 'POST')
|
|
@@ -336,7 +381,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
336
381
|
}
|
|
337
382
|
return true;
|
|
338
383
|
}
|
|
339
|
-
async function submit(batch, head, changes, delta, bytes, entry, handed, keep) {
|
|
384
|
+
async function submit(batch, head, changes, delta, bytes, entry, handed, keep, into) {
|
|
340
385
|
const inline = { ...head, changes, runtime: notifications.runtime };
|
|
341
386
|
const prepared = uploadable(inline, bytes, declared())
|
|
342
387
|
? await uploaded(head, changes, delta, bytes, entry, handed, keep)
|
|
@@ -350,7 +395,12 @@ export function createAgentsHouseAdapter(options) {
|
|
|
350
395
|
const settled = stagedFiles === null ? answer : await transport.door(DOOR_BATCH, prepared.body);
|
|
351
396
|
if (stagedFiles === true && (await staged(settled, batch)) !== null)
|
|
352
397
|
return UNCERTAIN;
|
|
353
|
-
return mutationOutcome(settled.status, settled.body, entry.locator, entry.handle
|
|
398
|
+
return stepped(mutationOutcome(settled.status, settled.body, entry.locator, entry.handle, into === undefined
|
|
399
|
+
? undefined
|
|
400
|
+
: {
|
|
401
|
+
source: { authority: entry.authority, handle: entry.handle },
|
|
402
|
+
destination: { authority: into.authority, handle: into.handle },
|
|
403
|
+
}));
|
|
354
404
|
}
|
|
355
405
|
function granted(answer, locator) {
|
|
356
406
|
const failure = classifyDoor(answer.status, answer.body, locator);
|
|
@@ -440,7 +490,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
440
490
|
return { kind: 'room-not-readable', locator: request.locator };
|
|
441
491
|
const asked = { entry, held: request.held };
|
|
442
492
|
if (request.pageToken !== undefined) {
|
|
443
|
-
return
|
|
493
|
+
return partPage(asked, JSON.parse(request.pageToken));
|
|
444
494
|
}
|
|
445
495
|
return bootstrapTogether(asked);
|
|
446
496
|
},
|
|
@@ -462,18 +512,27 @@ export function createAgentsHouseAdapter(options) {
|
|
|
462
512
|
const entry = authorityFor(request.locator);
|
|
463
513
|
if (entry === undefined)
|
|
464
514
|
return { kind: 'room-not-readable', locator: request.locator };
|
|
465
|
-
const
|
|
515
|
+
const batch = request.changeBatch;
|
|
516
|
+
const destination = batch.between?.destination.room;
|
|
517
|
+
const into = destination === undefined ? undefined : authorityFor(destination);
|
|
518
|
+
if (destination !== undefined && into === undefined) {
|
|
519
|
+
return { kind: 'room-not-readable', locator: destination };
|
|
520
|
+
}
|
|
521
|
+
const mapped = into === undefined
|
|
522
|
+
? houseChanges(batch, entry.handle)
|
|
523
|
+
: houseMove(batch, entry.handle, into.handle);
|
|
466
524
|
if (mapped.kind === 'unmapped')
|
|
467
525
|
return rejectedMapping(mapped);
|
|
468
|
-
const head = operationHead(
|
|
526
|
+
const head = operationHead(batch);
|
|
469
527
|
const delta = deltaBody(mapped.changes);
|
|
470
528
|
const bytes = deltaBytes(delta);
|
|
471
529
|
const handed = request.upload;
|
|
472
|
-
const
|
|
473
|
-
const
|
|
530
|
+
const answer = (upload) => submit(batch, head, mapped.changes, delta, bytes, entry, upload, keep, into);
|
|
531
|
+
const settle = (outcome) => into === undefined ? adopted(entry, outcome) : adoptedMove(entry, into, outcome);
|
|
532
|
+
const outcome = await answer(handed);
|
|
474
533
|
if (handed === undefined || !lapsedGrant(outcome))
|
|
475
|
-
return
|
|
476
|
-
return
|
|
534
|
+
return settle(outcome);
|
|
535
|
+
return settle(await answer(undefined));
|
|
477
536
|
},
|
|
478
537
|
async history(_authorization, request) {
|
|
479
538
|
const entry = authorityFor(request.locator);
|
package/dist/discovery.d.ts
CHANGED
|
@@ -16,13 +16,13 @@ export type HouseBounds = {
|
|
|
16
16
|
max_held_files: number;
|
|
17
17
|
change_retention_seconds: number;
|
|
18
18
|
operation_retention_seconds: number;
|
|
19
|
+
max_move_documents?: number;
|
|
19
20
|
};
|
|
20
21
|
export type HouseOperations = {
|
|
21
|
-
read: readonly string[];
|
|
22
|
-
sync: readonly string[];
|
|
23
22
|
write: readonly string[];
|
|
24
23
|
delete: readonly string[];
|
|
25
24
|
};
|
|
25
|
+
export type HouseReadLevel = 'mcp' | 'online' | 'local';
|
|
26
26
|
export type HouseModel = {
|
|
27
27
|
root: string;
|
|
28
28
|
paths: readonly string[];
|
|
@@ -35,6 +35,7 @@ export type HouseAuthority = LogPosition & {
|
|
|
35
35
|
houseModel: HouseModel | null;
|
|
36
36
|
managedReplication: 'admitted' | 'unavailable';
|
|
37
37
|
protectedPaths: readonly string[];
|
|
38
|
+
read: HouseReadLevel;
|
|
38
39
|
operations: HouseOperations;
|
|
39
40
|
};
|
|
40
41
|
export type HouseDiscoveryDocument = {
|
package/dist/discovery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACT,MAAM,EACN,aAAa,EACb,SAAS,EACV,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAA6B,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3E,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAAU,CAAC;AAE1D,MAAM,MAAM,WAAW,GAAG;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,wBAAwB,EAAE,MAAM,CAAC;IACjC,2BAA2B,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACT,MAAM,EACN,aAAa,EACb,SAAS,EACV,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAA6B,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3E,eAAO,MAAM,gBAAgB,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