@agentshouse/mdruntime-adapter 0.1.0-c7961b76e9077 → 0.1.0-c7c9c23528dbf
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 +65 -63
- package/dist/actions.d.ts +3 -16
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +20 -53
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +47 -42
- package/dist/app-reference.d.ts +2 -0
- package/dist/app-reference.d.ts.map +1 -0
- package/dist/app-reference.js +2 -0
- package/dist/crockford.d.ts +4 -0
- package/dist/crockford.d.ts.map +1 -0
- package/dist/crockford.js +3 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- 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 +2 -1
- package/dist/room-types.d.ts.map +1 -1
- package/dist/room-types.js +58 -1
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +39 -52
- package/dist/transport.d.ts +6 -8
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +1 -1
- package/dist/upload.d.ts +12 -0
- package/dist/upload.d.ts.map +1 -0
- package/dist/upload.js +63 -0
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +2 -13
- package/package.json +8 -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
|
|
|
@@ -126,29 +124,29 @@ draw it as loading and observe the query to hear the complete answer. A query is
|
|
|
126
124
|
- **Relations.** Within one Room, `hop: { field, types, where, pathPrefix }` keeps Documents
|
|
127
125
|
whose reference at pointer `field`, at any depth, points to a matching Document, and
|
|
128
126
|
`backlinks` with the same keys those a matching Document references, each once. A body
|
|
129
|
-
link
|
|
130
|
-
|
|
131
|
-
`
|
|
132
|
-
locked.
|
|
127
|
+
link or a `cross_room` reference may name another Room's `/rooms/<handle>/<path>`:
|
|
128
|
+
`resolve(room, path, destination)` answers its `document`, the `deleted` one's last
|
|
129
|
+
`revision`, or `unreadable` where the App does not bind it or it is locked.
|
|
133
130
|
- **Parts.** A Document query must `select`: `'all'`, or `fields`, `sections`,
|
|
134
|
-
`preamble`, `markdown`, `backlinks`, `change` and `
|
|
131
|
+
`preamble`, `markdown`, `backlinks`, `change`, `fileId` and `revision`, where `fields` is `'all'`
|
|
135
132
|
or a list of pointers and `sections` `'all'` or a list of names. Selected pointers
|
|
136
133
|
return the frontmatter holding only them, nested as written. A backlink names the
|
|
137
134
|
referring Path, MD Type and the pointer it came from as `field`. Room and Path always
|
|
138
135
|
return; a Markdown Document also returns its MD Type, and at most its first 1,000
|
|
139
136
|
backlinks: a query on the referring field reads the rest. A non-Markdown Document
|
|
140
|
-
returns only Room, Path and a selected `fileId
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
- **Change
|
|
137
|
+
returns only Room, Path and a selected `fileId` and `revision`, a binary Path entry its `binaryFile`
|
|
138
|
+
record too, and a YAML file under `settings/` its text as a selected `markdown`, kept
|
|
139
|
+
out of Search. An unselected part is absent. Select only what a screen shows: a list
|
|
140
|
+
that selects the Markdown hears every edit of it.
|
|
141
|
+
- **Change, file ID and revision.** `change` is `{ author, time }` of the Document's head revision
|
|
145
142
|
as the Provider last delivered it: `author` is `{ kind: 'user' | 'site' | 'inbox', id, name }`, or
|
|
146
143
|
`null` for a write the Provider made itself, and `time` its ISO 8601 change time, or the
|
|
147
144
|
whole change `null` where it delivered no time, as at a Site. `fileId` is the Provider's
|
|
148
145
|
Stable File ID of the file at the Path, or `null`. An unsent edit keeps both, an unsent
|
|
149
146
|
move keeps the change and carries the file ID to the new Path, so a file ID that leaves
|
|
150
147
|
one Path for another is the same file moved, and an unsent creation has neither until it
|
|
151
|
-
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`.
|
|
152
150
|
- **Order and groups.** `orderBy` sorts by `room`, `path`, `type`, `folder` or `{ field }`: missing
|
|
153
151
|
and null first, last with `nulls: 'last'`, then numbers and booleans, then text by `locale` or
|
|
154
152
|
code point with `stringSort: 'lexical'`, then lists item by item; ties end with Room, then Path.
|
|
@@ -167,28 +165,36 @@ draw it as loading and observe the query to hear the complete answer. A query is
|
|
|
167
165
|
## Local Search rules
|
|
168
166
|
|
|
169
167
|
`search({ text, documents, collection, conversations, limit, after, total })` answers
|
|
170
|
-
once, by words, from
|
|
168
|
+
once, by words, from the full-text index the browser keeps with its local state, so it
|
|
169
|
+
answers at once after a reload. There is no observed search.
|
|
171
170
|
|
|
172
|
-
- **Declaration.** Only an App whose release declares Local Search searches
|
|
173
|
-
|
|
174
|
-
`
|
|
171
|
+
- **Declaration.** Only an App whose release declares Local Search searches; any other
|
|
172
|
+
App's `search` answers the never retryable `undeclared` refusal `search-undeclared`, its
|
|
173
|
+
`fields` naming `local_search`.
|
|
175
174
|
- **What is found.** A Document by its field values, its sections' headings and text, its
|
|
176
175
|
preamble and its Path, and a message by its text, never a frontmatter key, a Room Draft,
|
|
177
|
-
a chat draft or a running turn's parts
|
|
178
|
-
|
|
176
|
+
a chat draft or a running turn's parts. Any word found ranks a hit, more found rank it
|
|
177
|
+
higher, and adjacent words higher still; case and the marks of Latin, Greek and
|
|
178
|
+
Cyrillic letters fold, English word forms stem, the last word also matches as the start
|
|
179
|
+
of a word unless the text ends with a space, and Chinese, Japanese, Korean and Thai text
|
|
180
|
+
matches by character pairs. There is no typo tolerance and no operator syntax.
|
|
179
181
|
- **Narrowing.** `documents` is a Local Query filter, and `collection: true` leaves out
|
|
180
182
|
what each Room's `typedSelection` roots hold; `conversations` names conversations. All
|
|
181
183
|
apply before `limit`, which bounds each list, at most 1,000 whatever a search names. A
|
|
182
184
|
complete answer it cuts short names `next`, which `after` takes for the next window of
|
|
183
|
-
both lists. `total: true` adds `total`, each list's count.
|
|
185
|
+
both lists. `total: true` adds `total`, each list's count. A word in very many Documents
|
|
186
|
+
ranks among a bounded set of them, the Documents of a rarer word of the search always
|
|
187
|
+
among them.
|
|
184
188
|
- **Results.** `{ documents, messages, coverage }`, or the same with `pending` naming each
|
|
185
|
-
Room
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
Room the search still waits for: show its hits, ask again, and never read pending as no
|
|
190
|
+
hits. `coverage` names the Rooms and conversations searched. Each list is ranked by
|
|
191
|
+
`score`, comparable only within it; ties come by `room`, then `path`, or by
|
|
192
|
+
`conversation`, then `identity`. A Document hit names its `room`, `path` and `type`, a
|
|
193
|
+
message hit its `conversation` and `identity`; `matches` maps each word of the search
|
|
194
|
+
to the parts it was found in: `fields`, `sections`, `preamble`, `path` or `text`. A hit
|
|
195
|
+
whose words were found carries `snippet: { part, text, at }`: the part's text around
|
|
196
|
+
the first word found, at most 80 characters on either side, and `at` that word's start
|
|
197
|
+
and end in `text`. Mark the words you show. A bad filter fails as a query does.
|
|
192
198
|
|
|
193
199
|
## Room Draft, Save, and outcome rules
|
|
194
200
|
|
|
@@ -225,19 +231,19 @@ Provider unavailability and a refusal marked retryable, until the reset it names
|
|
|
225
231
|
work Pending; the MD Runtime retries the same Change Batch identity and payload, never
|
|
226
232
|
infers an outcome from transport uncertainty, and never combines, reorders, or rebases.
|
|
227
233
|
|
|
228
|
-
On a Site, every Save stays in the visitor's browser: write grants and revisions do not
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
queue and returns no Room Draft.
|
|
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.
|
|
233
238
|
|
|
234
|
-
`observe('service-mode')` answers the Provider's Service Mode, `open` or `write-halted`.
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
`
|
|
239
|
-
(`
|
|
240
|
-
|
|
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`.
|
|
241
247
|
|
|
242
248
|
## Content safety and launch promises
|
|
243
249
|
|
|
@@ -285,26 +291,22 @@ nothing is saved. React-admin and Refine Apps use `@agentshouse/mdruntime-famili
|
|
|
285
291
|
|
|
286
292
|
## The Chat
|
|
287
293
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
`
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
294
|
+
In House the page's bridge places the Chat, one data layer for every App, which House
|
|
295
|
+
serves with the page and keeps current: install, import and bundle nothing for it, and add
|
|
296
|
+
no dependency. `const chat = await houseBridge.chat.mount(element, options)`, on the bridge
|
|
297
|
+
object House hands the page as `window.houseBridge`, which `houseBridge()` of
|
|
298
|
+
`@agentshouse/app-bridge` returns, draws it in `element` over the App's own client and
|
|
299
|
+
resolves to a handle: `chat.update(options)` replaces its options and `chat.unmount()`
|
|
300
|
+
removes it. `conversation` opens one, `null` for a
|
|
301
|
+
new chat, `agent` is the Agent a new chat goes to, `showChats` adds its conversation list,
|
|
302
|
+
`width` is `full` (the element), or `3/4`, `1/2` or `1/3` of the window docked at its right
|
|
303
|
+
edge, whole on a narrow window, `onOpen` hears each conversation it opens as `{
|
|
304
|
+
conversation, agent }`, and `onLink` takes a link without a scheme in place of the browser.
|
|
305
|
+
Theme its own styles with CSS custom properties on the element or an ancestor:
|
|
306
|
+
`--chat-background`, `--chat-surface`, `--chat-text`, `--chat-text-muted`,
|
|
297
307
|
`--chat-accent`, `--chat-line`, `--chat-attention`, `--chat-danger`, `--chat-font`,
|
|
298
308
|
`--chat-font-mono`, `--chat-font-size`, `--chat-radius` and `--chat-density` (a factor for
|
|
299
|
-
spacing); an unset one keeps House's light or dark look.
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
`ChatInput` and `ChatQuestionCard` with your own design inside a `ChatProvider`, or
|
|
304
|
-
compose assistant-ui's primitives there; `useChat()` gives `send`, the conversations, the
|
|
305
|
-
Agents, questions to `answer`, `options` to `choose`, `commands`, the queue to `edit` or
|
|
306
|
-
`unqueue`, `stop`, `kill` and outcomes; never replace its messages, sending or store. It
|
|
307
|
-
shows a conversation's latest 50 messages, and assistant-ui's `loadEarlier()` the 50
|
|
308
|
-
before, which `ChatMessageList` calls as the reader scrolls back. A secret question is
|
|
309
|
-
never answered here; typed answers live in the Presentation State members named `typed:…`:
|
|
310
|
-
leave them. `Markdown` draws Markdown safely.
|
|
309
|
+
spacing); an unset one keeps House's light or dark look. It shows conversations only where
|
|
310
|
+
the release declares them; otherwise it lists no conversation and no Agent. A secret
|
|
311
|
+
question is never answered here; typed answers live in the Presentation State members named
|
|
312
|
+
`typed:…`: leave them.
|
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
|
};
|
|
@@ -19,6 +21,7 @@ export type AppInputs = {
|
|
|
19
21
|
};
|
|
20
22
|
readonly 'conversation.create': Operated & {
|
|
21
23
|
readonly agent_id: string;
|
|
24
|
+
readonly replaces?: string;
|
|
22
25
|
};
|
|
23
26
|
readonly 'conversation.delete': ConversationControl;
|
|
24
27
|
readonly 'conversation.history': ConversationHistoryRequest;
|
|
@@ -45,22 +48,6 @@ export type AppAnswerAdditions = {
|
|
|
45
48
|
readonly 'conversation.send': {
|
|
46
49
|
readonly turn: string;
|
|
47
50
|
};
|
|
48
|
-
readonly 'record.list': {
|
|
49
|
-
readonly attachments: readonly {
|
|
50
|
-
readonly referrer: {
|
|
51
|
-
readonly room_ref: string;
|
|
52
|
-
readonly record: string;
|
|
53
|
-
};
|
|
54
|
-
}[];
|
|
55
|
-
readonly records: readonly {
|
|
56
|
-
readonly attachments: readonly {
|
|
57
|
-
readonly referrer: {
|
|
58
|
-
readonly room_ref: string;
|
|
59
|
-
readonly record: string;
|
|
60
|
-
};
|
|
61
|
-
}[];
|
|
62
|
-
}[];
|
|
63
|
-
};
|
|
64
51
|
};
|
|
65
52
|
export declare const HOUSE_APP_ACTS: Readonly<Record<string, string>>;
|
|
66
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":"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"}
|
package/dist/actions.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { changeBatchIdentity, } from '@agentshouse/mdruntime';
|
|
1
|
+
import { changeBatchIdentity, HISTORY_CONVERSATIONS, } from '@agentshouse/mdruntime';
|
|
2
2
|
import { doorRefusal } from './refusal.js';
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const TRIGGER_ROOMS = 100;
|
|
3
|
+
import { finishedUpload, houseUpload } from './upload.js';
|
|
4
|
+
export const HISTORY_PAGE = 100;
|
|
5
|
+
export const TRIGGER_ROOMS = 100;
|
|
6
6
|
const OCTET_STREAM = 'application/octet-stream';
|
|
7
7
|
function mapped(door, input = (given) => given) {
|
|
8
8
|
return {
|
|
@@ -43,7 +43,7 @@ const APP_ACTS = {
|
|
|
43
43
|
'member.list': mapped('rooms/members'),
|
|
44
44
|
'message.send': mapped('apps/messages/send'),
|
|
45
45
|
'processing.read': mapped('rooms/settings/processing/read'),
|
|
46
|
-
'record.list':
|
|
46
|
+
'record.list': mapped('records/read'),
|
|
47
47
|
'relay.read': mapped('apps/relay'),
|
|
48
48
|
'routine.list': mapped('routines/access'),
|
|
49
49
|
'routineAccess.list': mapped('routines/granted'),
|
|
@@ -109,7 +109,12 @@ function unimplemented(name) {
|
|
|
109
109
|
return { kind: 'rejected', code: 'action-unimplemented', fields: { name }, retryable: false };
|
|
110
110
|
}
|
|
111
111
|
function createBody(input) {
|
|
112
|
-
|
|
112
|
+
const replaces = text(input, 'replaces');
|
|
113
|
+
return {
|
|
114
|
+
agent_id: text(input, 'agent_id'),
|
|
115
|
+
operation_id: operationId(input),
|
|
116
|
+
...(replaces === undefined ? {} : { replaces }),
|
|
117
|
+
};
|
|
113
118
|
}
|
|
114
119
|
function controlBody(input) {
|
|
115
120
|
return { conversation_id: text(input, 'conversation'), operation_id: operationId(input) };
|
|
@@ -157,32 +162,6 @@ export function actionOutcome(answer, name) {
|
|
|
157
162
|
return { kind: 'transport-uncertainty' };
|
|
158
163
|
return { kind: 'action', result: answer.body };
|
|
159
164
|
}
|
|
160
|
-
function referredRecord(view, roomRef) {
|
|
161
|
-
const held = record(view);
|
|
162
|
-
if (roomRef === undefined || typeof held.record !== 'string' || !Array.isArray(held.attachments))
|
|
163
|
-
return view;
|
|
164
|
-
const referrer = {
|
|
165
|
-
room_ref: roomRef,
|
|
166
|
-
record: held.record,
|
|
167
|
-
};
|
|
168
|
-
return {
|
|
169
|
-
...held,
|
|
170
|
-
attachments: held.attachments.map((attachment) => ({ ...record(attachment), referrer })),
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
async function recordsAction(transport, route, input, name) {
|
|
174
|
-
const outcome = actionOutcome(await transport.door(route, input), name);
|
|
175
|
-
if (outcome.kind !== 'action')
|
|
176
|
-
return outcome;
|
|
177
|
-
const roomRef = text(input, 'room_ref');
|
|
178
|
-
const read = record(outcome.result);
|
|
179
|
-
return {
|
|
180
|
-
...outcome,
|
|
181
|
-
result: Array.isArray(read.records)
|
|
182
|
-
? { ...read, records: read.records.map((view) => referredRecord(view, roomRef)) }
|
|
183
|
-
: referredRecord(outcome.result, roomRef),
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
165
|
async function carry(transport, route, name, input) {
|
|
187
166
|
return actionOutcome(await transport.door(route, input), name);
|
|
188
167
|
}
|
|
@@ -220,14 +199,6 @@ function attachBody(input) {
|
|
|
220
199
|
media_type: mediaType !== undefined && mediaType.length > 0 ? mediaType : OCTET_STREAM,
|
|
221
200
|
};
|
|
222
201
|
}
|
|
223
|
-
function uploadGrant(answer) {
|
|
224
|
-
const upload = record(record(answer).upload);
|
|
225
|
-
if (upload.method !== 'POST')
|
|
226
|
-
return null;
|
|
227
|
-
if (typeof upload.operation !== 'string' || typeof upload.url !== 'string')
|
|
228
|
-
return null;
|
|
229
|
-
return { operation: upload.operation, url: upload.url };
|
|
230
|
-
}
|
|
231
202
|
async function attachAction(transport, route, input, name) {
|
|
232
203
|
const body = attachBody(input);
|
|
233
204
|
const blob = record(input).blob;
|
|
@@ -236,20 +207,16 @@ async function attachAction(transport, route, input, name) {
|
|
|
236
207
|
const outcome = actionOutcome(await transport.door(route, body), name);
|
|
237
208
|
if (outcome.kind !== 'action')
|
|
238
209
|
return outcome;
|
|
239
|
-
const
|
|
240
|
-
if (
|
|
210
|
+
const upload = houseUpload(record(outcome.result).upload);
|
|
211
|
+
if (upload === null)
|
|
241
212
|
return { kind: 'transport-uncertainty' };
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
const refusal = doorRefusal(sent.body);
|
|
250
|
-
return refusal === null ? { kind: 'transport-uncertainty' } : { kind: 'rejected', ...refusal };
|
|
251
|
-
}
|
|
252
|
-
const path = text(sent.body, 'path');
|
|
213
|
+
const finished = await finishedUpload(transport, upload, blob);
|
|
214
|
+
if (finished === null)
|
|
215
|
+
return { kind: 'transport-uncertainty' };
|
|
216
|
+
const settled = actionOutcome(finished, name);
|
|
217
|
+
if (settled.kind !== 'action')
|
|
218
|
+
return settled;
|
|
219
|
+
const path = text(settled.result, 'path');
|
|
253
220
|
if (path === undefined)
|
|
254
221
|
return { kind: 'transport-uncertainty' };
|
|
255
222
|
const result = { path };
|
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,CAmoBpF"}
|
package/dist/adapter.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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
|
+
import { finishedUpload, houseUpload } from './upload.js';
|
|
9
10
|
import { houseAction } from './actions.js';
|
|
10
11
|
import { classifyDoor, classifyRead, discoveryFailure, doorRefusal } from './refusal.js';
|
|
11
12
|
import { houseNotifications } from './stream.js';
|
|
12
13
|
import { DOOR_BATCH, DOOR_BATCH_UPLOAD, DOOR_BOOTSTRAP, DOOR_DISCOVER, DOOR_ENUMERATE, DOOR_FILES_GET, DOOR_REVISIONS, } from './transport.js';
|
|
13
14
|
import { batchPaths, deltaBody, deltaBytes, deltaDigest, historyOutcome, houseChanges, houseMove, mutationOutcome, operationHead, rejectedMapping, revisionBody, uploadable, } from './write.js';
|
|
14
|
-
import {
|
|
15
|
-
import { HOUSE_ROOM_TYPES } from './room-types.js';
|
|
15
|
+
import { HOUSE_NAMEABLE_ROOM_TYPES, HOUSE_ROOM_TYPES } from './room-types.js';
|
|
16
16
|
import { followsVersion, logPosition, presented, reachedVersion, roomVersion, } from './version.js';
|
|
17
17
|
const UNCERTAIN = { kind: 'transport-uncertainty' };
|
|
18
18
|
const UNCERTAIN_READ = { kind: 'transport-uncertainty' };
|
|
@@ -60,31 +60,49 @@ export function createAgentsHouseAdapter(options) {
|
|
|
60
60
|
throw new Error('no Discovery declared the bounds');
|
|
61
61
|
return bounds;
|
|
62
62
|
}
|
|
63
|
-
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
|
+
}
|
|
64
70
|
for (let attempt = 0; attempt < PART_ATTEMPTS; attempt += 1) {
|
|
65
71
|
const answered = await transport.door(DOOR_BOOTSTRAP, {
|
|
66
72
|
prefixes: [authorityRoot(entry.handle)],
|
|
67
73
|
part: listed.part,
|
|
68
74
|
...(continued.held === undefined ? {} : { held: [continued.held] }),
|
|
69
|
-
});
|
|
75
|
+
}, partArrival(listed, arriving));
|
|
70
76
|
const failure = classifyRead(answered.status, answered.body, entry.locator);
|
|
71
77
|
if (failure !== null)
|
|
72
78
|
return failure;
|
|
73
|
-
const
|
|
79
|
+
const frame = partFrame(answered.body);
|
|
80
|
+
if (frame === null)
|
|
81
|
+
continue;
|
|
82
|
+
const scope = await housePart(continued.room, frame, listed, 'credential');
|
|
74
83
|
if (scope !== null)
|
|
75
|
-
return scope;
|
|
84
|
+
return 'kind' in scope ? scope : { scope, frame };
|
|
76
85
|
}
|
|
77
86
|
return unverifiedPart(entry.locator);
|
|
78
87
|
}
|
|
79
|
-
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) {
|
|
80
98
|
const { entry } = asked;
|
|
81
99
|
const listed = continued.room.parts[continued.next];
|
|
82
100
|
const sent = listed === undefined
|
|
83
|
-
? emptyScope(continued.room)
|
|
84
|
-
: await fetchedPart(entry, continued, listed);
|
|
101
|
+
? { scope: emptyScope(continued.room), frame: null }
|
|
102
|
+
: await fetchedPart(entry, continued, listed, received, arriving);
|
|
85
103
|
if ('kind' in sent)
|
|
86
104
|
return sent;
|
|
87
|
-
const scope = await reused(sent, asked.held);
|
|
105
|
+
const scope = await reused(sent.scope, asked.held);
|
|
88
106
|
if (scope === null) {
|
|
89
107
|
return asked.held === undefined
|
|
90
108
|
? UNCERTAIN_READ
|
|
@@ -106,6 +124,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
106
124
|
...(await stepped(bootstrapping(scope))),
|
|
107
125
|
...(models === undefined ? {} : { models }),
|
|
108
126
|
...(more ? { pageToken: JSON.stringify({ ...continued, next, seen }) } : {}),
|
|
127
|
+
...(sent.frame === null ? {} : { received: sent.frame }),
|
|
109
128
|
};
|
|
110
129
|
}
|
|
111
130
|
async function enumeratedPage(ask, page) {
|
|
@@ -248,7 +267,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
248
267
|
continue;
|
|
249
268
|
}
|
|
250
269
|
const kept = held.find((files) => files.room === asked.entry.authority);
|
|
251
|
-
answer(asked.ask, await
|
|
270
|
+
answer(asked.ask, await manifestPage(asked.asked, {
|
|
252
271
|
room,
|
|
253
272
|
next: 0,
|
|
254
273
|
seen: [],
|
|
@@ -340,21 +359,16 @@ export function createAgentsHouseAdapter(options) {
|
|
|
340
359
|
const refusal = doorRefusal(answer.body);
|
|
341
360
|
if (refusal?.code !== 'files_unstaged')
|
|
342
361
|
return null;
|
|
343
|
-
const
|
|
344
|
-
if (!Array.isArray(
|
|
362
|
+
const uploads = refusal.fields.upload;
|
|
363
|
+
if (!Array.isArray(uploads))
|
|
345
364
|
return false;
|
|
346
|
-
for (const
|
|
347
|
-
const
|
|
348
|
-
const change = batch.changes.find((held) => held.kind === 'binary' && held.sha256 === sha256);
|
|
349
|
-
if (
|
|
365
|
+
for (const named of uploads) {
|
|
366
|
+
const upload = houseUpload(named);
|
|
367
|
+
const change = batch.changes.find((held) => held.kind === 'binary' && held.sha256 === named.sha256);
|
|
368
|
+
if (upload === null || change === undefined)
|
|
350
369
|
return false;
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
url,
|
|
354
|
-
body: await file(change.localId),
|
|
355
|
-
operation,
|
|
356
|
-
});
|
|
357
|
-
if (delivered.status !== 200)
|
|
370
|
+
const finished = await finishedUpload(transport, upload, await file(change.localId));
|
|
371
|
+
if (finished?.body?.staged !== true)
|
|
358
372
|
return false;
|
|
359
373
|
}
|
|
360
374
|
return true;
|
|
@@ -433,6 +447,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
433
447
|
}
|
|
434
448
|
return {
|
|
435
449
|
roomTypes: HOUSE_ROOM_TYPES,
|
|
450
|
+
nameableRoomTypes: HOUSE_NAMEABLE_ROOM_TYPES,
|
|
436
451
|
async authorize() {
|
|
437
452
|
return options.authorize();
|
|
438
453
|
},
|
|
@@ -482,7 +497,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
482
497
|
return { kind: 'room-not-readable', locator: request.locator };
|
|
483
498
|
const asked = { entry, held: request.held };
|
|
484
499
|
if (request.pageToken !== undefined) {
|
|
485
|
-
return partPage(asked, JSON.parse(request.pageToken));
|
|
500
|
+
return partPage(asked, JSON.parse(request.pageToken), request.received, request.arriving);
|
|
486
501
|
}
|
|
487
502
|
return bootstrapTogether(asked);
|
|
488
503
|
},
|
|
@@ -542,17 +557,10 @@ export function createAgentsHouseAdapter(options) {
|
|
|
542
557
|
});
|
|
543
558
|
},
|
|
544
559
|
async binary(_authorization, request) {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
return downloaded(ask, request.locator);
|
|
550
|
-
}
|
|
551
|
-
const referrer = houseReferrer(request.referrer, tracked);
|
|
552
|
-
if (referrer === null) {
|
|
553
|
-
return { kind: 'rejected', code: 'referrer_unknown', fields: {}, retryable: false };
|
|
554
|
-
}
|
|
555
|
-
return downloaded(() => transport.door(DOOR_FILES_GET, { file: request.fileRef, referrer: referrer.referrer }), referrer.locator);
|
|
560
|
+
const ask = pathAddress(request);
|
|
561
|
+
if (ask === null)
|
|
562
|
+
return { kind: 'room-not-readable', locator: request.locator };
|
|
563
|
+
return downloaded(ask, request.locator);
|
|
556
564
|
},
|
|
557
565
|
async link(_authorization, request) {
|
|
558
566
|
const ask = pathAddress(request);
|
|
@@ -560,9 +568,6 @@ export function createAgentsHouseAdapter(options) {
|
|
|
560
568
|
return { kind: 'room-not-readable', locator: request.locator };
|
|
561
569
|
return linked(await ask(), request.locator);
|
|
562
570
|
},
|
|
563
|
-
referrerScope(referrer) {
|
|
564
|
-
return houseReferrerScope(referrer, tracked);
|
|
565
|
-
},
|
|
566
571
|
reached(locator, version, target) {
|
|
567
572
|
return reachedVersion(version, target, authorityFor(locator)?.logEpoch);
|
|
568
573
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-reference.d.ts","sourceRoot":"","sources":["../src/app-reference.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,QAEjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crockford.d.ts","sourceRoot":"","sources":["../src/crockford.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,qCAAqC,CAAC;AAErE,eAAO,MAAM,mBAAmB,uCAA4B,CAAC;AAE7D,eAAO,MAAM,2BAA2B,QAAqC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { createAgentsHouseAdapter, type AgentsHouseAdapterOptions } from './adapter.js';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
2
|
+
export { finishedUpload, houseUpload, type HouseUpload } from './upload.js';
|
|
3
|
+
export { HISTORY_PAGE, HOUSE_APP_ACTS, HOUSE_APP_BATCHES, HOUSE_SITE_ACTS, TRIGGER_ROOMS, } from './actions.js';
|
|
4
|
+
export { APP_REFERENCE_PATTERN } from './app-reference.js';
|
|
5
|
+
export { CROCKFORD_ALPHABET, CROCKFORD_CHARACTER, CROCKFORD_LEADING_CHARACTER, } from './crockford.js';
|
|
6
|
+
export { HOUSE_NAMEABLE_ROOM_TYPES, HOUSE_ROOM_TYPES, INBOX_CHANNEL_KINDS, INBOX_CHAT_TYPE, INBOX_MESSAGE_TYPE, type InboxChannelKind, } from './room-types.js';
|
|
4
7
|
export type { HouseByteAct, HouseByteTransfer, HouseBytesAnswer, HouseClosing, HouseDoorAnswer, HouseHeldRoom, HouseOpening, HouseStream, HouseStreamEntry, HouseStreamFrame, HouseSiteTransport, HouseTransport, } from './transport.js';
|
|
5
8
|
//# 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,
|
|
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,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,yBAAyB,EACzB,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,3 +1,6 @@
|
|
|
1
1
|
export { createAgentsHouseAdapter } from './adapter.js';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
2
|
+
export { finishedUpload, houseUpload } from './upload.js';
|
|
3
|
+
export { HISTORY_PAGE, HOUSE_APP_ACTS, HOUSE_APP_BATCHES, HOUSE_SITE_ACTS, TRIGGER_ROOMS, } from './actions.js';
|
|
4
|
+
export { APP_REFERENCE_PATTERN } from './app-reference.js';
|
|
5
|
+
export { CROCKFORD_ALPHABET, CROCKFORD_CHARACTER, CROCKFORD_LEADING_CHARACTER, } from './crockford.js';
|
|
6
|
+
export { HOUSE_NAMEABLE_ROOM_TYPES, 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
|