@agentshouse/mdruntime-adapter 0.1.0-cca0c0fa62278 → 0.1.0-ccb1d71578583
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 +21 -22
- package/dist/actions.d.ts +2 -16
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +4 -31
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +36 -28
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/model.d.ts +5 -1
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +8 -1
- package/dist/part.d.ts +4 -2
- package/dist/part.d.ts.map +1 -1
- package/dist/part.js +15 -13
- package/dist/read.d.ts +10 -3
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +96 -97
- package/dist/room-types.d.ts +1 -1
- package/dist/room-types.d.ts.map +1 -1
- package/dist/room-types.js +18 -1
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +37 -51
- package/dist/transport.d.ts +3 -5
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +0 -1
- package/dist/upload.d.ts.map +1 -1
- package/dist/upload.js +25 -14
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +2 -13
- package/package.json +3 -3
- package/dist/referrer.d.ts +0 -9
- package/dist/referrer.d.ts.map +0 -1
- package/dist/referrer.js +0 -41
package/AGENTS.md
CHANGED
|
@@ -52,7 +52,7 @@ change, and no tab sees it then.
|
|
|
52
52
|
|
|
53
53
|
A binary file at a Path is a binary Path entry. Query lists it by `path`, and History each
|
|
54
54
|
of its revisions, with its `binaryFile` record and never its bytes: `{ state: 'accepted',
|
|
55
|
-
revision, path,
|
|
55
|
+
revision, path, byteLength, mediaType, sha256 }`, or, from a Save until the
|
|
56
56
|
Provider accepts it, `{ state: 'pending', localId, path, byteLength, mediaType, sha256 }`.
|
|
57
57
|
Write one with a Room Draft whose only part is `file: { blob }`, the `Blob`'s `type` its
|
|
58
58
|
media type: Save keeps the bytes in its Pending Change, offline too, and acceptance gives
|
|
@@ -62,10 +62,8 @@ as `unknown-revision` until it is accepted. `binaryFile.read(room, path, revisio
|
|
|
62
62
|
answers a pending record's saved bytes, or an accepted one's or a History revision's, a
|
|
63
63
|
removed file's last included: the first read asks the Provider and the browser keeps the
|
|
64
64
|
bytes, and every later read of that revision, offline too, answers them from the browser.
|
|
65
|
-
Text
|
|
66
|
-
|
|
67
|
-
beside it, or `{ room, path }` of the document whose text names it, kept the same way. Both
|
|
68
|
-
answer `{ kind: 'binary', stream, byteLength, mediaType }`, the bytes a `ReadableStream`
|
|
65
|
+
Text names a file only by a link to its Path. A read answers
|
|
66
|
+
`{ kind: 'binary', stream, byteLength, mediaType }`, the bytes a `ReadableStream`
|
|
69
67
|
of parts of at most a mebibyte, or a refusal or failure; read the stream to its end, or
|
|
70
68
|
take it whole with `new Response(stream).blob()` where a screen needs one `Blob`.
|
|
71
69
|
|
|
@@ -130,24 +128,25 @@ draw it as loading and observe the query to hear the complete answer. A query is
|
|
|
130
128
|
`resolve(room, path, destination)` answers its `document`, the `deleted` one's last
|
|
131
129
|
`revision`, or `unreadable` where the App does not bind it or it is locked.
|
|
132
130
|
- **Parts.** A Document query must `select`: `'all'`, or `fields`, `sections`,
|
|
133
|
-
`preamble`, `markdown`, `backlinks`, `change` and `
|
|
131
|
+
`preamble`, `markdown`, `backlinks`, `change`, `fileId` and `revision`, where `fields` is `'all'`
|
|
134
132
|
or a list of pointers and `sections` `'all'` or a list of names. Selected pointers
|
|
135
133
|
return the frontmatter holding only them, nested as written. A backlink names the
|
|
136
134
|
referring Path, MD Type and the pointer it came from as `field`. Room and Path always
|
|
137
135
|
return; a Markdown Document also returns its MD Type, and at most its first 1,000
|
|
138
136
|
backlinks: a query on the referring field reads the rest. A non-Markdown Document
|
|
139
|
-
returns only Room, Path and a selected `fileId`, a binary Path entry its `binaryFile`
|
|
137
|
+
returns only Room, Path and a selected `fileId` and `revision`, a binary Path entry its `binaryFile`
|
|
140
138
|
record too, and a YAML file under `settings/` its text as a selected `markdown`, kept
|
|
141
139
|
out of Search. An unselected part is absent. Select only what a screen shows: a list
|
|
142
140
|
that selects the Markdown hears every edit of it.
|
|
143
|
-
- **Change
|
|
141
|
+
- **Change, file ID and revision.** `change` is `{ author, time }` of the Document's head revision
|
|
144
142
|
as the Provider last delivered it: `author` is `{ kind: 'user' | 'site' | 'inbox', id, name }`, or
|
|
145
143
|
`null` for a write the Provider made itself, and `time` its ISO 8601 change time, or the
|
|
146
144
|
whole change `null` where it delivered no time, as at a Site. `fileId` is the Provider's
|
|
147
145
|
Stable File ID of the file at the Path, or `null`. An unsent edit keeps both, an unsent
|
|
148
146
|
move keeps the change and carries the file ID to the new Path, so a file ID that leaves
|
|
149
147
|
one Path for another is the same file moved, and an unsent creation has neither until it
|
|
150
|
-
is Accepted.
|
|
148
|
+
is Accepted. `revision` is the Provider's head revision, `null` for an unsent creation or edit,
|
|
149
|
+
and moves with an unsent move. A Room's last change is its Document with the latest `time`.
|
|
151
150
|
- **Order and groups.** `orderBy` sorts by `room`, `path`, `type`, `folder` or `{ field }`: missing
|
|
152
151
|
and null first, last with `nulls: 'last'`, then numbers and booleans, then text by `locale` or
|
|
153
152
|
code point with `stringSort: 'lexical'`, then lists item by item; ties end with Room, then Path.
|
|
@@ -232,19 +231,19 @@ Provider unavailability and a refusal marked retryable, until the reset it names
|
|
|
232
231
|
work Pending; the MD Runtime retries the same Change Batch identity and payload, never
|
|
233
232
|
infers an outcome from transport uncertainty, and never combines, reorders, or rebases.
|
|
234
233
|
|
|
235
|
-
On a Site, every Save stays in the visitor's browser: write grants and revisions do not
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
(`
|
|
247
|
-
|
|
234
|
+
On a Site, every Save stays in the visitor's browser: write grants and revisions do not refuse it,
|
|
235
|
+
and its Pending Change shows in every query and across reloads until the browser's storage is
|
|
236
|
+
cleared. It is never sent: `observe('queue', room)` shows it `local`, Sync Status never waits on
|
|
237
|
+
it, and once the Room no longer lets it apply it leaves the queue and returns no Room Draft.
|
|
238
|
+
|
|
239
|
+
`observe('service-mode')` answers the Provider's Service Mode, `open` or `write-halted`. While writes
|
|
240
|
+
are halted, Save succeeds, its Change Batch waits unsent and the queue is submitted in order once writes
|
|
241
|
+
reopen; an Action is never held, and one the halt refuses returns that refusal: show the Provider as
|
|
242
|
+
read-only instead of retrying. `observe('readiness')` tells whether code and bound Rooms are held
|
|
243
|
+
locally (`ready`), each Room's state, each refused Room's file and rule, the persistence answer, `space`
|
|
244
|
+
(`full` once the device's storage refused a write, Save and messages refusing as `durable-write` until
|
|
245
|
+
`retry()` or a later test write finds space, or once the origin refused a newer release), and the
|
|
246
|
+
`installation`'s Rooms, parts, bytes, `received`, `step` and `paused`.
|
|
248
247
|
|
|
249
248
|
## Content safety and launch promises
|
|
250
249
|
|
package/dist/actions.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type AcceptedMessage, type ActionDeclaration, type ActionRequest, type ActionResult, type ConversationAgents, type ConversationHistories, type ConversationHistoryRequest, type FileDeclaration } from '@agentshouse/mdruntime';
|
|
2
2
|
import type { HouseDoorAnswer, HouseTransport } from './transport.js';
|
|
3
|
+
export declare const HISTORY_PAGE = 100;
|
|
4
|
+
export declare const TRIGGER_ROOMS = 100;
|
|
3
5
|
type Operated = {
|
|
4
6
|
readonly operation_id?: string;
|
|
5
7
|
};
|
|
@@ -46,22 +48,6 @@ export type AppAnswerAdditions = {
|
|
|
46
48
|
readonly 'conversation.send': {
|
|
47
49
|
readonly turn: string;
|
|
48
50
|
};
|
|
49
|
-
readonly 'record.list': {
|
|
50
|
-
readonly attachments: readonly {
|
|
51
|
-
readonly referrer: {
|
|
52
|
-
readonly room_ref: string;
|
|
53
|
-
readonly record: string;
|
|
54
|
-
};
|
|
55
|
-
}[];
|
|
56
|
-
readonly records: readonly {
|
|
57
|
-
readonly attachments: readonly {
|
|
58
|
-
readonly referrer: {
|
|
59
|
-
readonly room_ref: string;
|
|
60
|
-
readonly record: string;
|
|
61
|
-
};
|
|
62
|
-
}[];
|
|
63
|
-
}[];
|
|
64
|
-
};
|
|
65
51
|
};
|
|
66
52
|
export declare const HOUSE_APP_ACTS: Readonly<Record<string, string>>;
|
|
67
53
|
export declare const SITE_SUBMIT = "submit";
|
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,
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,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;AAGhC,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEtE,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,eAAO,MAAM,aAAa,MAAM,CAAC;AAIjC,KAAK,QAAQ,GAAG;IAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,KAAK,mBAAmB,GAAG,QAAQ,GAAG;IAAE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,qBAAqB,EAAE,eAAe,GAAG;QAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;KACrB,CAAC;IACF,QAAQ,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MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE3D,CAAC;AAEF,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,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;AAkFD,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY,CAQjF;AA4FD,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CAUtE"}
|
package/dist/actions.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { changeBatchIdentity, } from '@agentshouse/mdruntime';
|
|
1
|
+
import { changeBatchIdentity, HISTORY_CONVERSATIONS, } from '@agentshouse/mdruntime';
|
|
2
2
|
import { doorRefusal } from './refusal.js';
|
|
3
3
|
import { finishedUpload, houseUpload } from './upload.js';
|
|
4
|
-
const HISTORY_PAGE = 100;
|
|
5
|
-
const
|
|
6
|
-
const TRIGGER_ROOMS = 100;
|
|
4
|
+
export const HISTORY_PAGE = 100;
|
|
5
|
+
export const TRIGGER_ROOMS = 100;
|
|
7
6
|
const OCTET_STREAM = 'application/octet-stream';
|
|
8
7
|
function mapped(door, input = (given) => given) {
|
|
9
8
|
return {
|
|
@@ -44,7 +43,7 @@ const APP_ACTS = {
|
|
|
44
43
|
'member.list': mapped('rooms/members'),
|
|
45
44
|
'message.send': mapped('apps/messages/send'),
|
|
46
45
|
'processing.read': mapped('rooms/settings/processing/read'),
|
|
47
|
-
'record.list':
|
|
46
|
+
'record.list': mapped('records/read'),
|
|
48
47
|
'relay.read': mapped('apps/relay'),
|
|
49
48
|
'routine.list': mapped('routines/access'),
|
|
50
49
|
'routineAccess.list': mapped('routines/granted'),
|
|
@@ -163,32 +162,6 @@ export function actionOutcome(answer, name) {
|
|
|
163
162
|
return { kind: 'transport-uncertainty' };
|
|
164
163
|
return { kind: 'action', result: answer.body };
|
|
165
164
|
}
|
|
166
|
-
function referredRecord(view, roomRef) {
|
|
167
|
-
const held = record(view);
|
|
168
|
-
if (roomRef === undefined || typeof held.record !== 'string' || !Array.isArray(held.attachments))
|
|
169
|
-
return view;
|
|
170
|
-
const referrer = {
|
|
171
|
-
room_ref: roomRef,
|
|
172
|
-
record: held.record,
|
|
173
|
-
};
|
|
174
|
-
return {
|
|
175
|
-
...held,
|
|
176
|
-
attachments: held.attachments.map((attachment) => ({ ...record(attachment), referrer })),
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
async function recordsAction(transport, route, input, name) {
|
|
180
|
-
const outcome = actionOutcome(await transport.door(route, input), name);
|
|
181
|
-
if (outcome.kind !== 'action')
|
|
182
|
-
return outcome;
|
|
183
|
-
const roomRef = text(input, 'room_ref');
|
|
184
|
-
const read = record(outcome.result);
|
|
185
|
-
return {
|
|
186
|
-
...outcome,
|
|
187
|
-
result: Array.isArray(read.records)
|
|
188
|
-
? { ...read, records: read.records.map((view) => referredRecord(view, roomRef)) }
|
|
189
|
-
: referredRecord(outcome.result, roomRef),
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
165
|
async function carry(transport, route, name, input) {
|
|
193
166
|
return actionOutcome(await transport.door(route, input), name);
|
|
194
167
|
}
|
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,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,OAAO,EACP,aAAa,EAkBd,MAAM,wBAAwB,CAAC;AA0ChC,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;AA8ErD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAkoBpF"}
|
package/dist/adapter.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { stepped } from '@agentshouse/mdruntime';
|
|
2
2
|
import { DISCOVER_PREFIXES, capabilities, discoveredRoom, mapDiscovery, parseDiscovery, trackedFrom, } from './discovery.js';
|
|
3
|
-
import { partModels, streamedModels, viewModels } from './model.js';
|
|
3
|
+
import { manifestedModels, partModels, streamedModels, viewModels } from './model.js';
|
|
4
4
|
import { gathered, gatheredEach, selections } from './gather.js';
|
|
5
5
|
import { createSiteAdapter } from './site.js';
|
|
6
|
-
import { authorityRoot, bootstrapping, emptyScope, housePart, parseEnumeration, parseFileAddress, parseGrant, parseParted, refreshFrom, viewOf, wholeView, } from './read.js';
|
|
7
|
-
import { PART_ATTEMPTS, unverifiedPart } from './part.js';
|
|
6
|
+
import { authorityRoot, bootstrapping, emptyScope, housePart, manifested, parseEnumeration, parseFileAddress, parseGrant, parseParted, partInventory, refreshFrom, viewOf, wholeView, } from './read.js';
|
|
7
|
+
import { PART_ATTEMPTS, partArrival, partFrame, unverifiedPart } from './part.js';
|
|
8
8
|
import { sha256Hex } from './digest.js';
|
|
9
9
|
import { finishedUpload, houseUpload } from './upload.js';
|
|
10
10
|
import { houseAction } from './actions.js';
|
|
@@ -12,7 +12,6 @@ import { classifyDoor, classifyRead, discoveryFailure, doorRefusal } from './ref
|
|
|
12
12
|
import { houseNotifications } from './stream.js';
|
|
13
13
|
import { DOOR_BATCH, DOOR_BATCH_UPLOAD, DOOR_BOOTSTRAP, DOOR_DISCOVER, DOOR_ENUMERATE, DOOR_FILES_GET, DOOR_REVISIONS, } from './transport.js';
|
|
14
14
|
import { batchPaths, deltaBody, deltaBytes, deltaDigest, historyOutcome, houseChanges, houseMove, mutationOutcome, operationHead, rejectedMapping, revisionBody, uploadable, } from './write.js';
|
|
15
|
-
import { houseReferrer, houseReferrerScope } from './referrer.js';
|
|
16
15
|
import { HOUSE_ROOM_TYPES } from './room-types.js';
|
|
17
16
|
import { followsVersion, logPosition, presented, reachedVersion, roomVersion, } from './version.js';
|
|
18
17
|
const UNCERTAIN = { kind: 'transport-uncertainty' };
|
|
@@ -61,31 +60,49 @@ export function createAgentsHouseAdapter(options) {
|
|
|
61
60
|
throw new Error('no Discovery declared the bounds');
|
|
62
61
|
return bounds;
|
|
63
62
|
}
|
|
64
|
-
async function fetchedPart(entry, continued, listed) {
|
|
63
|
+
async function fetchedPart(entry, continued, listed, received, arriving) {
|
|
64
|
+
if (received !== undefined) {
|
|
65
|
+
const kept = new Uint8Array(received);
|
|
66
|
+
const held = await housePart(continued.room, kept, listed, 'credential');
|
|
67
|
+
if (held !== null)
|
|
68
|
+
return 'kind' in held ? held : { scope: held, frame: kept };
|
|
69
|
+
}
|
|
65
70
|
for (let attempt = 0; attempt < PART_ATTEMPTS; attempt += 1) {
|
|
66
71
|
const answered = await transport.door(DOOR_BOOTSTRAP, {
|
|
67
72
|
prefixes: [authorityRoot(entry.handle)],
|
|
68
73
|
part: listed.part,
|
|
69
74
|
...(continued.held === undefined ? {} : { held: [continued.held] }),
|
|
70
|
-
});
|
|
75
|
+
}, partArrival(listed, arriving));
|
|
71
76
|
const failure = classifyRead(answered.status, answered.body, entry.locator);
|
|
72
77
|
if (failure !== null)
|
|
73
78
|
return failure;
|
|
74
|
-
const
|
|
79
|
+
const frame = partFrame(answered.body);
|
|
80
|
+
if (frame === null)
|
|
81
|
+
continue;
|
|
82
|
+
const scope = await housePart(continued.room, frame, listed, 'credential');
|
|
75
83
|
if (scope !== null)
|
|
76
|
-
return scope;
|
|
84
|
+
return 'kind' in scope ? scope : { scope, frame };
|
|
77
85
|
}
|
|
78
86
|
return unverifiedPart(entry.locator);
|
|
79
87
|
}
|
|
80
|
-
async function
|
|
88
|
+
async function manifestPage(asked, continued) {
|
|
89
|
+
const inventory = partInventory(continued.room);
|
|
90
|
+
if (inventory.parts === 0) {
|
|
91
|
+
const page = await partPage(asked, continued, undefined, undefined);
|
|
92
|
+
return page.kind === 'bootstrap' ? { ...page, inventory } : page;
|
|
93
|
+
}
|
|
94
|
+
const { models, seen } = await manifestedModels(continued.room, asked.entry);
|
|
95
|
+
return manifested(continued.room, inventory, JSON.stringify({ ...continued, seen }), models);
|
|
96
|
+
}
|
|
97
|
+
async function partPage(asked, continued, received, arriving) {
|
|
81
98
|
const { entry } = asked;
|
|
82
99
|
const listed = continued.room.parts[continued.next];
|
|
83
100
|
const sent = listed === undefined
|
|
84
|
-
? emptyScope(continued.room)
|
|
85
|
-
: await fetchedPart(entry, continued, listed);
|
|
101
|
+
? { scope: emptyScope(continued.room), frame: null }
|
|
102
|
+
: await fetchedPart(entry, continued, listed, received, arriving);
|
|
86
103
|
if ('kind' in sent)
|
|
87
104
|
return sent;
|
|
88
|
-
const scope = await reused(sent, asked.held);
|
|
105
|
+
const scope = await reused(sent.scope, asked.held);
|
|
89
106
|
if (scope === null) {
|
|
90
107
|
return asked.held === undefined
|
|
91
108
|
? UNCERTAIN_READ
|
|
@@ -107,6 +124,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
107
124
|
...(await stepped(bootstrapping(scope))),
|
|
108
125
|
...(models === undefined ? {} : { models }),
|
|
109
126
|
...(more ? { pageToken: JSON.stringify({ ...continued, next, seen }) } : {}),
|
|
127
|
+
...(sent.frame === null ? {} : { received: sent.frame }),
|
|
110
128
|
};
|
|
111
129
|
}
|
|
112
130
|
async function enumeratedPage(ask, page) {
|
|
@@ -249,7 +267,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
249
267
|
continue;
|
|
250
268
|
}
|
|
251
269
|
const kept = held.find((files) => files.room === asked.entry.authority);
|
|
252
|
-
answer(asked.ask, await
|
|
270
|
+
answer(asked.ask, await manifestPage(asked.asked, {
|
|
253
271
|
room,
|
|
254
272
|
next: 0,
|
|
255
273
|
seen: [],
|
|
@@ -478,7 +496,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
478
496
|
return { kind: 'room-not-readable', locator: request.locator };
|
|
479
497
|
const asked = { entry, held: request.held };
|
|
480
498
|
if (request.pageToken !== undefined) {
|
|
481
|
-
return partPage(asked, JSON.parse(request.pageToken));
|
|
499
|
+
return partPage(asked, JSON.parse(request.pageToken), request.received, request.arriving);
|
|
482
500
|
}
|
|
483
501
|
return bootstrapTogether(asked);
|
|
484
502
|
},
|
|
@@ -538,17 +556,10 @@ export function createAgentsHouseAdapter(options) {
|
|
|
538
556
|
});
|
|
539
557
|
},
|
|
540
558
|
async binary(_authorization, request) {
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
return downloaded(ask, request.locator);
|
|
546
|
-
}
|
|
547
|
-
const referrer = houseReferrer(request.referrer, tracked);
|
|
548
|
-
if (referrer === null) {
|
|
549
|
-
return { kind: 'rejected', code: 'referrer_unknown', fields: {}, retryable: false };
|
|
550
|
-
}
|
|
551
|
-
return downloaded(() => transport.door(DOOR_FILES_GET, { file: request.fileRef, referrer: referrer.referrer }), referrer.locator);
|
|
559
|
+
const ask = pathAddress(request);
|
|
560
|
+
if (ask === null)
|
|
561
|
+
return { kind: 'room-not-readable', locator: request.locator };
|
|
562
|
+
return downloaded(ask, request.locator);
|
|
552
563
|
},
|
|
553
564
|
async link(_authorization, request) {
|
|
554
565
|
const ask = pathAddress(request);
|
|
@@ -556,9 +567,6 @@ export function createAgentsHouseAdapter(options) {
|
|
|
556
567
|
return { kind: 'room-not-readable', locator: request.locator };
|
|
557
568
|
return linked(await ask(), request.locator);
|
|
558
569
|
},
|
|
559
|
-
referrerScope(referrer) {
|
|
560
|
-
return houseReferrerScope(referrer, tracked);
|
|
561
|
-
},
|
|
562
570
|
reached(locator, version, target) {
|
|
563
571
|
return reachedVersion(version, target, authorityFor(locator)?.logEpoch);
|
|
564
572
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { createAgentsHouseAdapter, type AgentsHouseAdapterOptions } from './adapter.js';
|
|
2
2
|
export { finishedUpload, houseUpload, type HouseUpload } from './upload.js';
|
|
3
|
-
export { HOUSE_APP_ACTS, HOUSE_APP_BATCHES, HOUSE_SITE_ACTS } from './actions.js';
|
|
3
|
+
export { HISTORY_PAGE, HOUSE_APP_ACTS, HOUSE_APP_BATCHES, HOUSE_SITE_ACTS, TRIGGER_ROOMS, } from './actions.js';
|
|
4
4
|
export { HOUSE_ROOM_TYPES, INBOX_CHANNEL_KINDS, INBOX_CHAT_TYPE, INBOX_MESSAGE_TYPE, type InboxChannelKind, } from './room-types.js';
|
|
5
5
|
export type { HouseByteAct, HouseByteTransfer, HouseBytesAnswer, HouseClosing, HouseDoorAnswer, HouseHeldRoom, HouseOpening, HouseStream, HouseStreamEntry, HouseStreamFrame, HouseSiteTransport, HouseTransport, } from './transport.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EACL,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GACf,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { createAgentsHouseAdapter } from './adapter.js';
|
|
2
2
|
export { finishedUpload, houseUpload } from './upload.js';
|
|
3
|
-
export { HOUSE_APP_ACTS, HOUSE_APP_BATCHES, HOUSE_SITE_ACTS } from './actions.js';
|
|
3
|
+
export { HISTORY_PAGE, HOUSE_APP_ACTS, HOUSE_APP_BATCHES, HOUSE_SITE_ACTS, TRIGGER_ROOMS, } from './actions.js';
|
|
4
4
|
export { HOUSE_ROOM_TYPES, INBOX_CHANNEL_KINDS, INBOX_CHAT_TYPE, INBOX_MESSAGE_TYPE, } from './room-types.js';
|
package/dist/model.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { RoomModels } from '@agentshouse/mdruntime';
|
|
2
2
|
import type { TrackedAuthority } from './discovery.js';
|
|
3
|
-
import { type HouseScope, type HouseView } from './read.js';
|
|
3
|
+
import { type HouseRoomParts, type HouseScope, type HouseView } from './read.js';
|
|
4
4
|
import type { HouseMode, HouseStreamEntry } from './transport.js';
|
|
5
5
|
export declare function partModels(scope: HouseScope, tracked: TrackedAuthority, seen: ReadonlySet<string>, final: boolean): Promise<RoomModels | undefined>;
|
|
6
|
+
export declare function manifestedModels(room: HouseRoomParts, tracked: TrackedAuthority): Promise<{
|
|
7
|
+
readonly models: RoomModels | undefined;
|
|
8
|
+
readonly seen: string[];
|
|
9
|
+
}>;
|
|
6
10
|
export declare function viewModels(view: HouseView, tracked: TrackedAuthority): Promise<RoomModels | undefined>;
|
|
7
11
|
export declare function streamedModels(schemas: ReadonlyMap<string, HouseStreamEntry>, tracked: TrackedAuthority, mode: HouseMode): Promise<RoomModels | undefined>;
|
|
8
12
|
//# sourceMappingURL=model.d.ts.map
|
package/dist/model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAIL,KAAK,cAAc,EAEnB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAoClE,wBAAgB,UAAU,CACxB,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,EACzB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAKjC;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC;IAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAM/E;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAcjC;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC9C,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAWjC"}
|
package/dist/model.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sha256Hex } from './digest.js';
|
|
2
|
-
import { schemaOf, schemaPath } from './read.js';
|
|
2
|
+
import { modelScope, schemaOf, schemaPath, } from './read.js';
|
|
3
3
|
const MODEL_ABSENT = { kind: 'model-unavailable', reason: 'not-readable' };
|
|
4
4
|
const ABSENT_SCHEMA = { schema: null, version: null, revision: null };
|
|
5
5
|
async function heldModel(read, identity) {
|
|
@@ -33,6 +33,13 @@ export function partModels(scope, tracked, seen, final) {
|
|
|
33
33
|
return final && !seen.has(schema) ? ABSENT_SCHEMA : undefined;
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
+
export async function manifestedModels(room, tracked) {
|
|
37
|
+
const scope = modelScope(room);
|
|
38
|
+
return {
|
|
39
|
+
models: await partModels(scope, tracked, new Set(), true),
|
|
40
|
+
seen: tracked.schemas.filter((schema) => scope.files.some((file) => file.path === schema)),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
36
43
|
export function viewModels(view, tracked) {
|
|
37
44
|
return modelsOf(tracked, (schema) => {
|
|
38
45
|
const change = view.changes.find((candidate) => candidate.path === schema);
|
package/dist/part.d.ts
CHANGED
|
@@ -7,7 +7,9 @@ export type HousePart = {
|
|
|
7
7
|
sha256: string;
|
|
8
8
|
};
|
|
9
9
|
export declare function parsePart(value: unknown): HousePart | null;
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
10
|
+
export declare function partArrival(listed: HousePart, arriving: ((bytes: number) => void) | undefined): ((answered: number) => void) | undefined;
|
|
11
|
+
export declare function partFrame(body: unknown): Uint8Array<ArrayBuffer> | null;
|
|
12
|
+
export declare function checkedPayload(frame: Uint8Array<ArrayBuffer>, listed: HousePart): Promise<Uint8Array<ArrayBuffer> | null>;
|
|
13
|
+
export declare function gunzipped(payload: Uint8Array<ArrayBuffer>): ReadableStream<string>;
|
|
12
14
|
export declare function unverifiedPart(locator: string): ScopedRefusal;
|
|
13
15
|
//# sourceMappingURL=part.d.ts.map
|
package/dist/part.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"part.d.ts","sourceRoot":"","sources":["../src/part.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAU5D,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAO1D;AAoBD,wBAAsB,cAAc,CAClC,
|
|
1
|
+
{"version":3,"file":"part.d.ts","sourceRoot":"","sources":["../src/part.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAU5D,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAO1D;AAoBD,wBAAgB,WAAW,CACzB,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,GAC9C,CAAC,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAG1C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAIvE;AAED,wBAAsB,cAAc,CAClC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,EAC9B,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAazC;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,CAKlF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAS7D"}
|
package/dist/part.js
CHANGED
|
@@ -35,14 +35,19 @@ function hex(bytes) {
|
|
|
35
35
|
text += byte.toString(16).padStart(2, '0');
|
|
36
36
|
return text;
|
|
37
37
|
}
|
|
38
|
-
export
|
|
38
|
+
export function partArrival(listed, arriving) {
|
|
39
|
+
if (arriving === undefined)
|
|
40
|
+
return undefined;
|
|
41
|
+
return (answered) => arriving(Math.min(listed.bytes, Math.floor((answered * 3) / 4)));
|
|
42
|
+
}
|
|
43
|
+
export function partFrame(body) {
|
|
39
44
|
if (typeof body !== 'object' || body === null)
|
|
40
45
|
return null;
|
|
41
46
|
const { part } = body;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (frame
|
|
47
|
+
return typeof part === 'string' ? decoded(part) : null;
|
|
48
|
+
}
|
|
49
|
+
export async function checkedPayload(frame, listed) {
|
|
50
|
+
if (frame.length !== listed.bytes)
|
|
46
51
|
return null;
|
|
47
52
|
if (frame.length < PART_HEAD_BYTES + PART_DIGEST_BYTES)
|
|
48
53
|
return null;
|
|
@@ -59,14 +64,11 @@ export async function checkedPayload(body, listed) {
|
|
|
59
64
|
}
|
|
60
65
|
return payload;
|
|
61
66
|
}
|
|
62
|
-
export
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
catch {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
67
|
+
export function gunzipped(payload) {
|
|
68
|
+
return new Blob([payload])
|
|
69
|
+
.stream()
|
|
70
|
+
.pipeThrough(new DecompressionStream('gzip'))
|
|
71
|
+
.pipeThrough(new TextDecoderStream());
|
|
70
72
|
}
|
|
71
73
|
export function unverifiedPart(locator) {
|
|
72
74
|
return {
|
package/dist/read.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AdapterFailure, type BinaryFile, type BootstrapPage, type RefreshResult, type TransportUncertainty } from '@agentshouse/mdruntime';
|
|
1
|
+
import { type AdapterFailure, type BinaryFile, type BootstrapInventory, type BootstrapPage, type RefreshResult, type RoomModels, type TransportUncertainty } from '@agentshouse/mdruntime';
|
|
2
2
|
import type { TrackedAuthority } from './discovery.js';
|
|
3
3
|
import { type HousePart } from './part.js';
|
|
4
4
|
import type { HouseMode } from './transport.js';
|
|
@@ -46,8 +46,13 @@ export type HouseScope = LogPosition & {
|
|
|
46
46
|
contents: readonly HouseContent[];
|
|
47
47
|
folders?: readonly string[];
|
|
48
48
|
};
|
|
49
|
+
export type HouseModels = {
|
|
50
|
+
files: readonly HouseManifestFile[];
|
|
51
|
+
contents: readonly HouseContent[];
|
|
52
|
+
};
|
|
49
53
|
export type HouseRoomParts = LogPosition & {
|
|
50
54
|
anchor: string;
|
|
55
|
+
models: HouseModels;
|
|
51
56
|
parts: readonly HousePart[];
|
|
52
57
|
};
|
|
53
58
|
export type HouseParted = {
|
|
@@ -112,11 +117,13 @@ export declare function headChange(held: {
|
|
|
112
117
|
export declare function binaryFileOf(held: Readonly<Record<string, unknown>>): BinaryFile | undefined | null;
|
|
113
118
|
export declare function parseParted(body: unknown): HouseParted | null;
|
|
114
119
|
export declare function parseSiteParted(body: unknown): HouseRoomParts | null;
|
|
120
|
+
export declare function partInventory(room: HouseRoomParts): BootstrapInventory;
|
|
121
|
+
export declare function manifested(room: HouseRoomParts, inventory: BootstrapInventory, pageToken: string, models: RoomModels | undefined): BootstrapPage;
|
|
122
|
+
export declare function modelScope(room: HouseRoomParts): HouseScope;
|
|
115
123
|
export declare function emptyScope(room: HouseRoomParts): HouseScope;
|
|
116
|
-
export declare function housePart(room: HouseRoomParts,
|
|
124
|
+
export declare function housePart(room: HouseRoomParts, frame: Uint8Array<ArrayBuffer>, listed: HousePart, mode: HouseMode): Promise<HouseScope | TransportUncertainty | null>;
|
|
117
125
|
export declare function parseEnumeration(body: unknown, mode: HouseMode): HouseEnumeration | null;
|
|
118
126
|
export declare function wholeView(first: HouseView, more: (page: HousePage) => Promise<HouseView | PageFailure>): Promise<HouseView | PageFailure>;
|
|
119
|
-
export declare function advancedScope(scope: HouseScope, view: HouseView): Generator<number, HouseScope, void>;
|
|
120
127
|
export declare function bootstrapping(scope: HouseScope): Generator<number, BootstrapPage, void>;
|
|
121
128
|
export type HouseSchema = {
|
|
122
129
|
schema: string | null;
|
package/dist/read.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../src/read.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../src/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAElB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,oBAAoB,EAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAsC,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAEpF,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAQ1D,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF,wBAA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