@agentshouse/mdruntime 0.1.0-cfb95807829be → 0.1.0-cfbb7fe185208
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/dist/acceptance.d.ts.map +1 -1
- package/dist/acceptance.js +30 -1
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +25 -5
- package/dist/adapter.d.ts +32 -10
- package/dist/adapter.d.ts.map +1 -1
- package/dist/{binary.d.ts → attachment.d.ts} +3 -3
- package/dist/attachment.d.ts.map +1 -0
- package/dist/{binary.js → attachment.js} +1 -1
- package/dist/authored.d.ts.map +1 -1
- package/dist/authored.js +2 -0
- package/dist/chain.d.ts +1 -1
- package/dist/chain.d.ts.map +1 -1
- package/dist/chain.js +5 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -3
- package/dist/collection.d.ts +1 -0
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +7 -1
- package/dist/compile.d.ts +2 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +71 -37
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +2 -0
- package/dist/conversation.d.ts +10 -3
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +5 -2
- package/dist/declaration.js +2 -2
- package/dist/download.d.ts +2 -2
- package/dist/download.d.ts.map +1 -1
- package/dist/entry.d.ts +11 -1
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +71 -23
- package/dist/figures.d.ts +1 -1
- package/dist/figures.d.ts.map +1 -1
- package/dist/figures.js +2 -2
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +2 -2
- package/dist/house-query.d.ts +8 -2
- package/dist/house-query.d.ts.map +1 -1
- package/dist/house-query.js +53 -5
- package/dist/identity.d.ts +1 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +1 -1
- package/dist/index.d.ts +10 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/live.d.ts +14 -0
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +29 -12
- package/dist/media.d.ts.map +1 -1
- package/dist/media.js +16 -3
- package/dist/memory.js +4 -4
- package/dist/model.d.ts +6 -5
- package/dist/model.d.ts.map +1 -1
- package/dist/opened.d.ts +5 -5
- package/dist/opened.d.ts.map +1 -1
- package/dist/opened.js +2 -2
- package/dist/outcome.d.ts +16 -16
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +4 -4
- package/dist/overlay.d.ts +15 -4
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +84 -26
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +1 -1
- package/dist/queries.d.ts.map +1 -1
- package/dist/queries.js +56 -13
- package/dist/query.d.ts +1 -1
- package/dist/query.d.ts.map +1 -1
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +6 -6
- package/dist/readiness.d.ts +4 -1
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +2 -1
- package/dist/reads.d.ts.map +1 -1
- package/dist/reads.js +2 -1
- package/dist/reference-forms.d.ts +4 -0
- package/dist/reference-forms.d.ts.map +1 -0
- package/dist/reference-forms.js +74 -0
- package/dist/replica.d.ts +3 -8
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +2 -2
- package/dist/room-draft.d.ts +1 -1
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +4 -4
- package/dist/room-drafts.js +2 -2
- package/dist/rows.d.ts +9 -1
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +18 -4
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +6 -6
- package/dist/saves.d.ts +3 -3
- package/dist/saves.d.ts.map +1 -1
- package/dist/saves.js +50 -44
- package/dist/selector.d.ts +3 -0
- package/dist/selector.d.ts.map +1 -0
- package/dist/selector.js +22 -0
- package/dist/store/records.d.ts +12 -5
- package/dist/store/records.d.ts.map +1 -1
- package/dist/store/records.js +10 -4
- package/dist/store.d.ts +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/stored.d.ts +9 -2
- package/dist/stored.d.ts.map +1 -1
- package/dist/stored.js +33 -11
- package/dist/tables.d.ts +14 -2
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +10 -3
- package/dist/tallies.js +2 -2
- package/dist/validation.d.ts +2 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +49 -3
- package/dist/wire.d.ts +1 -1
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +1 -1
- package/package.json +3 -3
- package/dist/binary.d.ts.map +0 -1
package/dist/house-query.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { invalid, known, plain } from '@agentshouse/mdmodel';
|
|
2
2
|
import { listedOrHeld } from './listing.js';
|
|
3
|
+
import { normalize } from './paths.js';
|
|
3
4
|
import { failure, OFFLINE, UNCERTAIN, undeclared } from './outcome.js';
|
|
4
5
|
import { askedOnline, offline } from './online.js';
|
|
5
6
|
import { holds, queriedOnly } from './reach.js';
|
|
7
|
+
import { documentKey } from './rows.js';
|
|
6
8
|
const HELD_ON_DEVICE = {
|
|
7
9
|
kind: 'rejected',
|
|
8
10
|
code: 'held-on-device',
|
|
@@ -20,25 +22,71 @@ function freshOf(options) {
|
|
|
20
22
|
invalid('fresh', 'expects true or false');
|
|
21
23
|
return fresh;
|
|
22
24
|
}
|
|
23
|
-
function
|
|
25
|
+
function viewOf(query) {
|
|
26
|
+
known(query, ['path', 'after'], '');
|
|
27
|
+
const { path, after } = query;
|
|
28
|
+
if (typeof path !== 'string' || path === '' || normalize(path) !== path)
|
|
29
|
+
invalid('path', 'names a View by its Path in the Room');
|
|
30
|
+
if (after === undefined)
|
|
31
|
+
return { path };
|
|
32
|
+
if (typeof after !== 'string')
|
|
33
|
+
invalid('after', 'expects the next an earlier page answered');
|
|
34
|
+
return { path, after };
|
|
35
|
+
}
|
|
36
|
+
function followedOf(reach) {
|
|
37
|
+
if (reach === null)
|
|
38
|
+
return {};
|
|
39
|
+
const whole = new Set([
|
|
40
|
+
...reach.rooms,
|
|
41
|
+
...(reach.queriesOnly ?? []).map(({ locator }) => locator),
|
|
42
|
+
]);
|
|
43
|
+
const documents = new Map(reach.documents
|
|
44
|
+
.filter(({ room }) => !whole.has(room))
|
|
45
|
+
.map(({ room, path }) => [documentKey(room, path), { room, path }]));
|
|
46
|
+
const followed = new Set([...whole, ...[...documents.values()].map(({ room }) => room)]);
|
|
47
|
+
const areas = new Map((reach.areas ?? [])
|
|
48
|
+
.filter(({ room }) => followed.has(room))
|
|
49
|
+
.map(({ room, path, open }) => [
|
|
50
|
+
documentKey(room, path),
|
|
51
|
+
{ room, path, open: [...new Set(open)].sort() },
|
|
52
|
+
]));
|
|
53
|
+
return {
|
|
54
|
+
follows: [
|
|
55
|
+
...[...whole].sort(),
|
|
56
|
+
...[...documents.keys()].sort().map((key) => documents.get(key)),
|
|
57
|
+
...[...areas.keys()].sort().map((key) => areas.get(key)),
|
|
58
|
+
],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function houseQueryOf(input, options, reach) {
|
|
24
62
|
if (!plain(input))
|
|
25
63
|
invalid('query', 'expects a query object');
|
|
26
64
|
const { rooms, ...query } = input;
|
|
27
65
|
if (!Array.isArray(rooms) || rooms.length !== 1 || typeof rooms[0] !== 'string')
|
|
28
66
|
invalid('rooms', 'names the one Room House answers');
|
|
29
|
-
|
|
67
|
+
const asked = { room: rooms[0], fresh: freshOf(options), ...followedOf(reach) };
|
|
68
|
+
return query.path === undefined ? { ...asked, query } : { ...asked, ...viewOf(query) };
|
|
30
69
|
}
|
|
31
70
|
async function heldHere(runtime, reach, room) {
|
|
32
71
|
return holds(reach, room) && listedOrHeld(runtime, await runtime.store.rooms([room]), room);
|
|
33
72
|
}
|
|
73
|
+
async function searchListed(runtime, room) {
|
|
74
|
+
const { roomList } = await (await runtime.store.open()).facts(['roomList']);
|
|
75
|
+
return roomList?.rooms.some((one) => one.room_ref === room && one.level === 'search') === true;
|
|
76
|
+
}
|
|
77
|
+
async function queriedHere(runtime, reach, room) {
|
|
78
|
+
if (queriedOnly(reach, runtime.socket.session.now().queriesOnly, room))
|
|
79
|
+
return true;
|
|
80
|
+
return reach === null && (await searchListed(runtime, room));
|
|
81
|
+
}
|
|
34
82
|
export async function queriedHouse(runtime, input, reach, options) {
|
|
35
83
|
const { socket } = runtime;
|
|
36
|
-
const asked = houseQueryOf(input, options);
|
|
37
|
-
await socket.ready;
|
|
38
84
|
const query = socket.queryHouse();
|
|
39
85
|
if (query === undefined)
|
|
40
86
|
return undeclared('queryHouse');
|
|
41
|
-
|
|
87
|
+
const asked = houseQueryOf(input, options, reach);
|
|
88
|
+
await socket.ready;
|
|
89
|
+
if (!(await queriedHere(runtime, reach, asked.room))) {
|
|
42
90
|
return (await heldHere(runtime, reach, asked.room))
|
|
43
91
|
? HELD_ON_DEVICE
|
|
44
92
|
: failure({ kind: 'room-not-readable', locator: asked.room });
|
package/dist/identity.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export declare function changeBatchIdentity(at?: number): string;
|
|
|
2
2
|
export declare function roomDraftRevision(): string;
|
|
3
3
|
export declare function chatDraftRevision(): string;
|
|
4
4
|
export declare function transferIdentity(): string;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function attachmentLocalId(): string;
|
|
6
6
|
//# sourceMappingURL=identity.d.ts.map
|
package/dist/identity.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,EAAE,GAAE,MAAmB,GAAG,MAAM,CAWnE;AAQD,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,wBAAgB,
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,EAAE,GAAE,MAAmB,GAAG,MAAM,CAWnE;AAQD,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
|
package/dist/identity.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export type { AcceptedMessage, AcceptedRoom, ActionDeclaration, ActionRequest, ActionResult, Adapter, AdapterFailure, AttachRequest, AttachResult, AuthorityChange, Authorization, BinaryCopy, Attachment, BinaryLinkResult, BinaryRequest, BinaryResult, BootstrapPage, BootstrapRequest, BootstrapResult, Capability, ChangeAuthor, ContractUnavailable, ConversationAction, ConversationEvent, ConversationHistories, ConversationHistoryPage, ConversationHistoryRequest, ConversationMessage, ConversationStream, DiscoverResult, DiscoveredRoom, Discovery, SavedFacts, HistoryAuthor, HistoryRequest, HistoryResult, HistoryRetention, HistoryRevision, BootstrapPart, NotReady, HeldRoom, KeyedRequest, AgentEnvironment, ListedAgent, ListedConversation, ListedOwner, ListedSpaceRef, RoomList, RoomListEntry, SpaceListEntry, MdModelIdentity, Member, MutationRequest, MutationResult, PageToken, ProviderLimit, ProviderRefusal, RefreshPage, RefreshRequest, RefreshResult, Retention, RetryableRefusal, RevokedAuthorization, RoomChange, RoomModels, RoomNotReadable, RoomStream, RoomStreamEvent, RoomVersionAt, HouseQueryAnswer, HouseQueryAsk, HouseQueryGroups, HouseQueryRows, SearchAnswer, SearchAsk, ServiceMode, ServiceModeSignal, TransportUncertainty, TurnOperation, TypedPath, TypedSelection, } from './adapter.js';
|
|
1
|
+
export type { AcceptedMessage, AcceptedRoom, ActionDeclaration, ActionRequest, ActionResult, Adapter, AdapterFailure, AttachRequest, AttachResult, AuthorityChange, Authorization, AttachmentCopy, AttachmentCopy as BinaryCopy, Attachment, AttachmentLinkResult, AttachmentLinkResult as BinaryLinkResult, AttachmentRequest, AttachmentRequest as BinaryRequest, AttachmentResult, AttachmentResult as BinaryResult, BootstrapPage, BootstrapRequest, BootstrapResult, Capability, ChangeAuthor, ContractUnavailable, ConversationAction, ConversationEvent, ConversationHistories, ConversationHistoryPage, ConversationHistoryRequest, ConversationMessage, ConversationStream, DiscoverResult, DiscoveredRoom, Discovery, SavedFacts, HistoryAuthor, HistoryRequest, HistoryResult, HistoryRetention, HistoryRevision, BootstrapPart, NotReady, HeldRoom, KeyedRequest, AgentEnvironment, ListedAgent, ListedConversation, ListedOwner, ListedSpaceRef, RoomList, RoomListEntry, SpaceListEntry, MdModelIdentity, Member, MutationRequest, MutationResult, PageToken, ProviderLimit, ProviderRefusal, RefreshPage, RefreshRequest, RefreshResult, Retention, RetryableRefusal, RevokedAuthorization, RoomChange, RoomModels, RoomNotReadable, RoomStream, RoomStreamEvent, RoomVersionAt, HouseQueryAnswer, HouseQueryAsk, HouseQueryGroups, HouseQueryRows, SearchAnswer, SearchAsk, ServiceMode, ServiceModeSignal, TransportUncertainty, TurnOperation, TypedPath, TypedSelection, } from './adapter.js';
|
|
2
2
|
export type { Change, ChangeBatch, Precondition, RoomMove, WrittenBy } from './change.js';
|
|
3
|
+
export type { Written, WrittenDocument } from './overlay.js';
|
|
4
|
+
export { unreadDocuments } from './overlay.js';
|
|
3
5
|
export { heldFacts } from './conversation-row.js';
|
|
4
6
|
export type { ConversationAsk, ConversationHeld, ConversationLast, ConversationStart, } from './conversation-row.js';
|
|
5
|
-
export type { ChatDraft, ChatDraftSurface, ConversationAgent, ConversationAnswer, ConversationEntry, ConversationOptions, ConversationRead, ConversationState, ConversationSurface, ConversationView, RequestDecision, RunningTurn, } from './conversation.js';
|
|
7
|
+
export type { ChatDraft, ChatDraftSurface, ConversationAgent, ConversationAnswer, ConversationEntry, ConversationOptions, ConversationRead, ConversationSettings, ConversationState, ConversationSurface, ConversationView, RequestDecision, RunningTurn, } from './conversation.js';
|
|
6
8
|
export type { MdRuntimeOptions } from './connection.js';
|
|
7
9
|
export { PAGE_METADATA_WORDS } from './page-metadata.js';
|
|
8
10
|
export { writeRule, type WriteRefusal } from './declaration.js';
|
|
@@ -15,9 +17,9 @@ export type { Observation } from './observation.js';
|
|
|
15
17
|
export type { DayFigures, Figures, FiguresResult, RoomFigures } from './figures.js';
|
|
16
18
|
export type { HeldApp, Holdings, RoomDocuments } from './holdings.js';
|
|
17
19
|
export type { PresentationSurface, RoomDraftSurface } from './room-drafts.js';
|
|
18
|
-
export type { AttachAnswer, BinaryAnswer, BinaryLinkAnswer, CallResult, ShownAnswer, ConversationAttachAnswer, DownloadAnswer, Failure, HistoryAnswer, Offline, QueueEntry, Resolution, Submission, } from './outcome.js';
|
|
19
|
-
export { blobOf, declaredType } from './outcome.js';
|
|
20
|
-
export type { AttachmentRecord } from './
|
|
20
|
+
export type { AttachAnswer, AttachmentAnswer, AttachmentAnswer as BinaryAnswer, AttachmentLinkAnswer, AttachmentLinkAnswer as BinaryLinkAnswer, CallResult, ShownAnswer, ConversationAttachAnswer, DownloadAnswer, Failure, HistoryAnswer, Offline, QueueEntry, Resolution, Submission, } from './outcome.js';
|
|
21
|
+
export { attachmentBlob, attachmentBlob as blobOf, declaredType } from './outcome.js';
|
|
22
|
+
export type { AttachmentRecord } from './attachment.js';
|
|
21
23
|
export type { RuntimeError } from './failure.js';
|
|
22
24
|
export { refusalError } from './failure.js';
|
|
23
25
|
export type { ChangedPart, FieldValue, Marks, ReturnReason, RoomDraft, RoomDraftCreation, RoomDraftParts, RoomDraftWrite, TextParts, } from './room-draft.js';
|
|
@@ -26,7 +28,7 @@ export type { SearchFound, SearchHit, SearchRequest, SearchResult } from './sear
|
|
|
26
28
|
export type { HouseQuery, HouseQueryOptions, HouseQueryResult } from './house-query.js';
|
|
27
29
|
export { keptFile, keptLines } from './chat-types.js';
|
|
28
30
|
export { FIGURES_DAY_MS } from './figures.js';
|
|
29
|
-
export { departure } from './change.js';
|
|
31
|
+
export { departure, isPart } from './change.js';
|
|
30
32
|
export { definitionsIn, selected } from './collection.js';
|
|
31
33
|
export { lineEnded, partsAfter, partsChanges } from './room-draft.js';
|
|
32
34
|
export { cutName, nameFrom } from './name.js';
|
|
@@ -36,8 +38,9 @@ export { runningWords } from './running.js';
|
|
|
36
38
|
export { turnLine, WORKING } from './parts.js';
|
|
37
39
|
export { changeBatchIdentity } from './identity.js';
|
|
38
40
|
export { paced, ROW_WEIGHT, stepped } from './turn.js';
|
|
39
|
-
export { authoredAt, covered } from './paths.js';
|
|
41
|
+
export { documentAt, documentAt as authoredAt, covered } from './paths.js';
|
|
40
42
|
export { untilAnswered } from './recovery.js';
|
|
43
|
+
export { selectorRewritten } from './selector.js';
|
|
41
44
|
export { createRetries, STEPS, retrying, Unanswered, uncertainError, type RetriedFailure, type Retries, type Step, } from './retried.js';
|
|
42
45
|
export { patching } from './shared.js';
|
|
43
46
|
export { acting, type Acting, type ActingRules, type Ended, type Lane, type LaneShown, type Send, } from './act-lanes.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,OAAO,EACP,cAAc,EACd,aAAa,EACb,YAAY,EACZ,eAAe,EACf,aAAa,EACb,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,OAAO,EACP,cAAc,EACd,aAAa,EACb,YAAY,EACZ,eAAe,EACf,aAAa,EACb,cAAc,EACd,cAAc,I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AC;AAC/C,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9D,YAAY,EACV,SAAS,EACT,aAAa,EACb,MAAM,EACN,QAAQ,EACR,UAAU,EACV,UAAU,EACV,WAAW,EACX,GAAG,EACH,UAAU,EACV,YAAY,EACZ,SAAS,EACT,OAAO,EACP,MAAM,EACN,KAAK,EACL,KAAK,GACN,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,MAAM,EACN,QAAQ,EACR,WAAW,EACX,cAAc,EACd,WAAW,EACX,UAAU,EACV,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,UAAU,EACV,WAAW,EACX,SAAS,GACV,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,MAAM,EACN,aAAa,EACb,aAAa,EACb,UAAU,EACV,WAAW,EACX,WAAW,EACX,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
export { unreadDocuments } from './overlay.js';
|
|
1
2
|
export { heldFacts } from './conversation-row.js';
|
|
2
3
|
export { PAGE_METADATA_WORDS } from './page-metadata.js';
|
|
3
4
|
export { writeRule } from './declaration.js';
|
|
4
|
-
export { blobOf, declaredType } from './outcome.js';
|
|
5
|
+
export { attachmentBlob, attachmentBlob as blobOf, declaredType } from './outcome.js';
|
|
5
6
|
export { refusalError } from './failure.js';
|
|
6
7
|
export { keptFile, keptLines } from './chat-types.js';
|
|
7
8
|
export { FIGURES_DAY_MS } from './figures.js';
|
|
8
|
-
export { departure } from './change.js';
|
|
9
|
+
export { departure, isPart } from './change.js';
|
|
9
10
|
export { definitionsIn, selected } from './collection.js';
|
|
10
11
|
export { lineEnded, partsAfter, partsChanges } from './room-draft.js';
|
|
11
12
|
export { cutName, nameFrom } from './name.js';
|
|
@@ -15,8 +16,9 @@ export { runningWords } from './running.js';
|
|
|
15
16
|
export { turnLine, WORKING } from './parts.js';
|
|
16
17
|
export { changeBatchIdentity } from './identity.js';
|
|
17
18
|
export { paced, ROW_WEIGHT, stepped } from './turn.js';
|
|
18
|
-
export { authoredAt, covered } from './paths.js';
|
|
19
|
+
export { documentAt, documentAt as authoredAt, covered } from './paths.js';
|
|
19
20
|
export { untilAnswered } from './recovery.js';
|
|
21
|
+
export { selectorRewritten } from './selector.js';
|
|
20
22
|
export { createRetries, STEPS, retrying, Unanswered, uncertainError, } from './retried.js';
|
|
21
23
|
export { patching } from './shared.js';
|
|
22
24
|
export { acting, } from './act-lanes.js';
|
package/dist/live.d.ts
CHANGED
|
@@ -3,12 +3,25 @@ import { type KeyedResult, type QueryMessage } from './observation.js';
|
|
|
3
3
|
import type { PendingResult, PendingRoom, Plan, QueryCoverage } from './query.js';
|
|
4
4
|
import type { Fail } from './reach.js';
|
|
5
5
|
import type { QueryRoom } from './tables.js';
|
|
6
|
+
export type AwaitedRoom = PendingRoom & {
|
|
7
|
+
readonly handle: string;
|
|
8
|
+
};
|
|
9
|
+
export type Follows = {
|
|
10
|
+
readonly held: readonly QueryRoom[];
|
|
11
|
+
readonly awaiting: readonly AwaitedRoom[];
|
|
12
|
+
};
|
|
13
|
+
export type Covered = {
|
|
14
|
+
coverage: QueryCoverage;
|
|
15
|
+
rooms: readonly QueryRoom[];
|
|
16
|
+
} | PendingResult;
|
|
6
17
|
export type Cover = {
|
|
7
18
|
coverage: QueryCoverage;
|
|
8
19
|
rooms: readonly QueryRoom[];
|
|
20
|
+
follows: Follows;
|
|
9
21
|
} | PendingResult;
|
|
10
22
|
export type Ran = KeyedResult & {
|
|
11
23
|
readonly current: () => boolean;
|
|
24
|
+
readonly cover: Cover;
|
|
12
25
|
};
|
|
13
26
|
export type Run = (plan: Plan, cover: () => Promise<Cover>) => Promise<Ran>;
|
|
14
27
|
export type PendingAt<H> = (held: H, rooms: readonly string[]) => ReadonlyMap<string, PendingRoom | null> | null;
|
|
@@ -20,6 +33,7 @@ export type LiveQueries<H> = {
|
|
|
20
33
|
close(): void;
|
|
21
34
|
};
|
|
22
35
|
export declare function readerOf(plan: Plan): (locator: string) => boolean;
|
|
36
|
+
export declare function hearerOf(plan: Plan): (locator: string) => boolean;
|
|
23
37
|
export declare function createLiveQueries<H>(run: Run, holding: () => Promise<H>): LiveQueries<H>;
|
|
24
38
|
export {};
|
|
25
39
|
//# sourceMappingURL=live.d.ts.map
|
package/dist/live.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../src/live.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAQL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../src/live.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAQL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG;IAAE,QAAQ,CAAC,M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AE,MAAM,EAChB,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,EACzB,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,EACvB,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,IAAI,GACX,MAAM,IAAI,CAAC;IACd,KAAK,IAAI,IAAI,CAAC;CACf,CAAC;AAWF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAQjE;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAEjE;AAyBD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAwKxF"}
|
package/dist/live.js
CHANGED
|
@@ -15,15 +15,24 @@ export function readerOf(plan) {
|
|
|
15
15
|
(named === null || named.has(locator)) &&
|
|
16
16
|
(reached === null || reached.has(locator));
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
18
|
+
export function hearerOf(plan) {
|
|
19
|
+
return readerOf(plan.hop === null ? plan : { ...plan, rooms: null });
|
|
20
|
+
}
|
|
21
|
+
function affected({ plan, hears }, set) {
|
|
22
|
+
if (set.rooms.some(hears))
|
|
20
23
|
return true;
|
|
21
24
|
const paths = narrowed(plan) ? new Set(plan.paths) : null;
|
|
22
|
-
return set.documents.some(({ locator, path }) =>
|
|
25
|
+
return set.documents.some(({ locator, path }) => hears(locator) && (paths === null || path === null || paths.has(path)));
|
|
26
|
+
}
|
|
27
|
+
function namingMoved(entry, set) {
|
|
28
|
+
return (entry.awaitsFollowed &&
|
|
29
|
+
(set.rooms.some(entry.reads) || set.documents.some(({ locator }) => entry.reads(locator))));
|
|
30
|
+
}
|
|
31
|
+
function coverShown(cover) {
|
|
32
|
+
return JSON.stringify('pending' in cover ? cover : [cover.coverage, cover.follows]);
|
|
23
33
|
}
|
|
24
34
|
function shown(entry, held) {
|
|
25
|
-
|
|
26
|
-
return JSON.stringify('pending' in cover ? cover : cover.coverage);
|
|
35
|
+
return coverShown(entry.cover(held));
|
|
27
36
|
}
|
|
28
37
|
export function createLiveQueries(run, holding) {
|
|
29
38
|
const entries = new Map();
|
|
@@ -31,11 +40,13 @@ export function createLiveQueries(run, holding) {
|
|
|
31
40
|
let recoveringNow = false;
|
|
32
41
|
let recoveringAll = false;
|
|
33
42
|
const recovering = new Set();
|
|
34
|
-
function deliver(entry, next) {
|
|
43
|
+
function deliver(entry, next, cover) {
|
|
35
44
|
const previous = entry.digest;
|
|
36
45
|
entry.digest = digestOf(next);
|
|
37
46
|
entry.pending = 'pending' in entry.digest ? entry.digest.pending : null;
|
|
38
|
-
entry.
|
|
47
|
+
entry.awaitsFollowed =
|
|
48
|
+
'pending' in next.result && next.result.pending.some(({ room }) => !entry.reads(room));
|
|
49
|
+
entry.covered = coverShown(cover);
|
|
39
50
|
const change = previous === undefined ? null : changeOf(previous, next);
|
|
40
51
|
if (change !== null) {
|
|
41
52
|
for (const listener of entry.ready)
|
|
@@ -48,10 +59,10 @@ export function createLiveQueries(run, holding) {
|
|
|
48
59
|
entry.fresh.clear();
|
|
49
60
|
}
|
|
50
61
|
async function delivered(entry) {
|
|
51
|
-
const { current, ...next } = await run(entry.plan, async () => entry.cover(await holding()));
|
|
62
|
+
const { current, cover, ...next } = await run(entry.plan, async () => entry.cover(await holding()));
|
|
52
63
|
if (closed || entry.listeners.size === 0)
|
|
53
64
|
return null;
|
|
54
|
-
deliver(entry, next);
|
|
65
|
+
deliver(entry, next, cover);
|
|
55
66
|
return current;
|
|
56
67
|
}
|
|
57
68
|
function schedule(entry) {
|
|
@@ -89,7 +100,11 @@ export function createLiveQueries(run, holding) {
|
|
|
89
100
|
}
|
|
90
101
|
function pendingMoved(entry, held, rooms) {
|
|
91
102
|
const { pending } = entry;
|
|
92
|
-
if (pending === null ||
|
|
103
|
+
if (pending === null ||
|
|
104
|
+
pending.size === 0 ||
|
|
105
|
+
entry.running ||
|
|
106
|
+
entry.fresh.size > 0 ||
|
|
107
|
+
entry.awaitsFollowed) {
|
|
93
108
|
return false;
|
|
94
109
|
}
|
|
95
110
|
const at = entry.pendingAt(held, rooms);
|
|
@@ -120,7 +135,7 @@ export function createLiveQueries(run, holding) {
|
|
|
120
135
|
const touched = [...recovering];
|
|
121
136
|
recoveringAll = false;
|
|
122
137
|
recovering.clear();
|
|
123
|
-
const reached = [...entries.values()].filter((entry) => all || touched.some(entry.
|
|
138
|
+
const reached = [...entries.values()].filter((entry) => all || touched.some(entry.hears));
|
|
124
139
|
for (const entry of reached) {
|
|
125
140
|
if (entry.running)
|
|
126
141
|
entry.dirty = true;
|
|
@@ -154,7 +169,7 @@ export function createLiveQueries(run, holding) {
|
|
|
154
169
|
for (const entry of entries.values()) {
|
|
155
170
|
if (!affected(entry, set))
|
|
156
171
|
continue;
|
|
157
|
-
if (entry.pending === null || entry.running) {
|
|
172
|
+
if (entry.pending === null || entry.running || namingMoved(entry, set)) {
|
|
158
173
|
schedule(entry);
|
|
159
174
|
continue;
|
|
160
175
|
}
|
|
@@ -173,6 +188,7 @@ export function createLiveQueries(run, holding) {
|
|
|
173
188
|
entry = {
|
|
174
189
|
plan,
|
|
175
190
|
reads: readerOf(plan),
|
|
191
|
+
hears: hearerOf(plan),
|
|
176
192
|
cover,
|
|
177
193
|
pendingAt,
|
|
178
194
|
listeners: new Set(),
|
|
@@ -180,6 +196,7 @@ export function createLiveQueries(run, holding) {
|
|
|
180
196
|
ready: new Set(),
|
|
181
197
|
digest: undefined,
|
|
182
198
|
pending: null,
|
|
199
|
+
awaitsFollowed: false,
|
|
183
200
|
covered: '',
|
|
184
201
|
dirty: false,
|
|
185
202
|
running: false,
|
package/dist/media.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.d.ts","sourceRoot":"","sources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,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,GAAG,IAAI,CAyOxF"}
|
package/dist/media.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isAudioType, isImageType, isVideoType } from '@agentshouse/mdmodel';
|
|
2
2
|
import { loaded } from './loaded.js';
|
|
3
3
|
import { downloadAttachment } from './download.js';
|
|
4
|
-
import {
|
|
4
|
+
import { attachmentBlob, UNCERTAIN } from './outcome.js';
|
|
5
5
|
export const ROOM_MEDIA = 'room-media';
|
|
6
6
|
export const KEYED_MEDIA = 'ahc-attachment';
|
|
7
7
|
export const MEDIA = `${ROOM_MEDIA}, ${KEYED_MEDIA}`;
|
|
@@ -160,6 +160,7 @@ export function defineRoomMedia(client) {
|
|
|
160
160
|
#drawn = null;
|
|
161
161
|
#loaded = false;
|
|
162
162
|
#relinked = 0;
|
|
163
|
+
#failedAt = 0;
|
|
163
164
|
#own = null;
|
|
164
165
|
#measuring = null;
|
|
165
166
|
constructor() {
|
|
@@ -257,7 +258,7 @@ export function defineRoomMedia(client) {
|
|
|
257
258
|
this.#unshown(asked);
|
|
258
259
|
return;
|
|
259
260
|
}
|
|
260
|
-
const copy = await
|
|
261
|
+
const copy = await attachmentBlob(shown).catch(() => null);
|
|
261
262
|
if (asked !== this.#asked)
|
|
262
263
|
return;
|
|
263
264
|
if (copy === null)
|
|
@@ -315,8 +316,19 @@ export function defineRoomMedia(client) {
|
|
|
315
316
|
if (drawn !== this.#drawn)
|
|
316
317
|
return;
|
|
317
318
|
this.#loaded = true;
|
|
318
|
-
|
|
319
|
+
if (drawn instanceof HTMLImageElement)
|
|
320
|
+
this.#relinked = 0;
|
|
319
321
|
});
|
|
322
|
+
if (drawn instanceof HTMLMediaElement) {
|
|
323
|
+
const played = () => {
|
|
324
|
+
if (drawn !== this.#drawn || drawn.seeking)
|
|
325
|
+
return;
|
|
326
|
+
if (drawn.ended || drawn.currentTime > this.#failedAt)
|
|
327
|
+
this.#relinked = 0;
|
|
328
|
+
};
|
|
329
|
+
drawn.addEventListener('timeupdate', played);
|
|
330
|
+
drawn.addEventListener('ended', played);
|
|
331
|
+
}
|
|
320
332
|
drawn.addEventListener('error', () => this.#failed(drawn));
|
|
321
333
|
}
|
|
322
334
|
this.#drawn = drawn;
|
|
@@ -336,6 +348,7 @@ export function defineRoomMedia(client) {
|
|
|
336
348
|
if (drawn instanceof HTMLMediaElement) {
|
|
337
349
|
const at = drawn.currentTime;
|
|
338
350
|
const playing = !drawn.paused;
|
|
351
|
+
this.#failedAt = at;
|
|
339
352
|
drawn.addEventListener('loadedmetadata', () => {
|
|
340
353
|
drawn.currentTime = at;
|
|
341
354
|
if (playing)
|
package/dist/memory.js
CHANGED
|
@@ -100,11 +100,11 @@ export function createMemoryAdapter(options = {}) {
|
|
|
100
100
|
const wanted = ordinals.get(`${locator}\u0000${target}`);
|
|
101
101
|
return held !== undefined && wanted !== undefined && held >= wanted;
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function heldBytes(room, path) {
|
|
104
104
|
return attached.get(`${room.locator}\u0000${path}`) ?? room.blobs?.[path];
|
|
105
105
|
}
|
|
106
106
|
function linkTo(room, path) {
|
|
107
|
-
const blob = room === undefined ? undefined :
|
|
107
|
+
const blob = room === undefined ? undefined : heldBytes(room, path);
|
|
108
108
|
if (blob === undefined)
|
|
109
109
|
return UNFOUND;
|
|
110
110
|
const url = linked.get(blob) ?? URL.createObjectURL(blob);
|
|
@@ -128,7 +128,7 @@ export function createMemoryAdapter(options = {}) {
|
|
|
128
128
|
const extension = dot > 0 ? name.slice(dot) : '';
|
|
129
129
|
for (let count = 1;; count += 1) {
|
|
130
130
|
const path = `${ATTACHMENTS}/${count === 1 ? stem : `${stem}-${count}`}${extension}`;
|
|
131
|
-
if (
|
|
131
|
+
if (heldBytes(room, path) === undefined && room.documents?.[path] === undefined)
|
|
132
132
|
return path;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
@@ -653,7 +653,7 @@ export function createMemoryAdapter(options = {}) {
|
|
|
653
653
|
const room = rooms.find((entry) => entry.locator === request.locator);
|
|
654
654
|
if (room === undefined)
|
|
655
655
|
return { kind: 'room-not-readable', locator: request.locator };
|
|
656
|
-
const blob =
|
|
656
|
+
const blob = heldBytes(room, request.path);
|
|
657
657
|
return blob === undefined
|
|
658
658
|
? { kind: 'rejected', code: 'not_found', fields: {}, retryable: false }
|
|
659
659
|
: { kind: 'binary', body: blob.stream(), mediaType: declaredType(blob) };
|
package/dist/model.d.ts
CHANGED
|
@@ -17,20 +17,21 @@ export type ModelResult = {
|
|
|
17
17
|
reason: ModelUnavailableReason;
|
|
18
18
|
};
|
|
19
19
|
export type MdType = Definition;
|
|
20
|
-
export type
|
|
20
|
+
export type StoredModel = {
|
|
21
21
|
status: 'unavailable';
|
|
22
22
|
reason: ModelUnavailableReason;
|
|
23
23
|
} | {
|
|
24
24
|
status: 'current' | 'cached';
|
|
25
25
|
snapshot: ModelSnapshot;
|
|
26
26
|
verifiedWith: ModelIdentity;
|
|
27
|
-
types: VerifiedModel['types'];
|
|
28
27
|
};
|
|
29
|
-
export type
|
|
28
|
+
export type ModelState = Extract<StoredModel, {
|
|
30
29
|
status: 'unavailable';
|
|
31
|
-
}> |
|
|
30
|
+
}> | (Extract<StoredModel, {
|
|
32
31
|
status: 'current' | 'cached';
|
|
33
|
-
}
|
|
32
|
+
}> & {
|
|
33
|
+
types: VerifiedModel['types'];
|
|
34
|
+
});
|
|
34
35
|
export type TypesResult<Types = readonly MdType[]> = {
|
|
35
36
|
status: Open<'unavailable'>;
|
|
36
37
|
reason: ModelUnavailableReason;
|
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,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,W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AAO,MAAM,QAAQ,EAAE,UAA8D,CAAC;AACtF,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,SAAS,MAAM,EAAE,CAI5E;AACD,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,CAEzD;AACD,wBAAgB,WAAW,CAAC,KAAK,EAC/B,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,KAAK,KAAK,GAC7C,WAAW,CAAC,KAAK,CAAC,CAYpB;AACD,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,CAI1D"}
|
package/dist/opened.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AttachmentResult } from './adapter.js';
|
|
2
2
|
import { type RuntimeDatabase } from './tables.js';
|
|
3
3
|
export type OpenedName = {
|
|
4
4
|
readonly locator: string;
|
|
5
5
|
readonly path: string;
|
|
6
6
|
readonly revision: string;
|
|
7
7
|
};
|
|
8
|
-
export type
|
|
8
|
+
export type KeptAttachment = {
|
|
9
9
|
readonly kind: 'binary';
|
|
10
10
|
readonly file: string;
|
|
11
11
|
readonly byteLength: number;
|
|
12
12
|
readonly mediaType: string;
|
|
13
13
|
};
|
|
14
|
-
export type KeptResult =
|
|
14
|
+
export type KeptResult = KeptAttachment | Exclude<AttachmentResult, {
|
|
15
15
|
kind: 'binary';
|
|
16
16
|
}>;
|
|
17
17
|
export type OpenedFiles = {
|
|
18
|
-
find(name: OpenedName): Promise<
|
|
19
|
-
fetch(name: OpenedName, read: () => Promise<
|
|
18
|
+
find(name: OpenedName): Promise<KeptAttachment | null>;
|
|
19
|
+
fetch(name: OpenedName, read: () => Promise<AttachmentResult>): Promise<KeptResult>;
|
|
20
20
|
};
|
|
21
21
|
export declare function openedFiles(database: RuntimeDatabase, lost: (locator: string) => boolean): OpenedFiles;
|
|
22
22
|
//# sourceMappingURL=opened.d.ts.map
|
package/dist/opened.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opened.d.ts","sourceRoot":"","sources":["../src/opened.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"opened.d.ts","sourceRoot":"","sources":["../src/opened.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrD,OAAO,EAAoC,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAErF,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,OAAO,CAAC,gBAAgB,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAC;AAExF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACvD,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACrF,CAAC;AAsBF,wBAAgB,WAAW,CACzB,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,GACjC,WAAW,CAsFb"}
|
package/dist/opened.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { digest } from './digest.js';
|
|
2
|
-
import {
|
|
2
|
+
import { attachmentLocalId } from './identity.js';
|
|
3
3
|
import { FILE_PART_BYTES } from './tables.js';
|
|
4
4
|
const UNCERTAIN = { kind: 'transport-uncertainty' };
|
|
5
5
|
function kept({ key, byteLength, mediaType }) {
|
|
@@ -27,7 +27,7 @@ export function openedFiles(database, lost) {
|
|
|
27
27
|
return held === null ? null : kept(held);
|
|
28
28
|
}
|
|
29
29
|
async function written(name, { body, mediaType, sha256 }) {
|
|
30
|
-
const key =
|
|
30
|
+
const key = attachmentLocalId();
|
|
31
31
|
const reader = body.getReader();
|
|
32
32
|
const hashed = digest();
|
|
33
33
|
const chunks = [];
|
package/dist/outcome.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ActionResult, AdapterFailure, AttachResult,
|
|
1
|
+
import type { ActionResult, AdapterFailure, AttachResult, AttachmentCopy, AttachmentLinkResult, HistoryResult, HistoryRevision, ProviderRefusal, RoomVersionAt, ScopedRefusal } from './adapter.js';
|
|
2
2
|
import type { ChangeBatch } from './change.js';
|
|
3
3
|
import type { Attempt, Retries } from './retried.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { KeptAttachment, KeptResult } from './opened.js';
|
|
5
5
|
type Refused<Kind extends string> = ProviderRefusal & {
|
|
6
6
|
kind: Kind;
|
|
7
7
|
};
|
|
@@ -20,30 +20,30 @@ export type CallResult = {
|
|
|
20
20
|
export type HistoryAnswer = Exclude<HistoryResult, {
|
|
21
21
|
kind: Failure['kind'];
|
|
22
22
|
}> | Failure;
|
|
23
|
-
type
|
|
24
|
-
export type
|
|
23
|
+
type AttachmentRefusal = Refused<'rejected'> | Refused<'absent'> | Failure;
|
|
24
|
+
export type AttachmentAnswer = {
|
|
25
25
|
kind: 'binary';
|
|
26
26
|
stream: ReadableStream<Uint8Array>;
|
|
27
27
|
byteLength: number;
|
|
28
28
|
mediaType: string;
|
|
29
|
-
} |
|
|
30
|
-
export type
|
|
31
|
-
export type
|
|
29
|
+
} | AttachmentRefusal;
|
|
30
|
+
export type HeldAttachmentAnswer = KeptAttachment | AttachmentRefusal;
|
|
31
|
+
export type AttachmentLinkAnswer = {
|
|
32
32
|
kind: 'link';
|
|
33
33
|
url: string;
|
|
34
34
|
name: string;
|
|
35
35
|
mediaType: string;
|
|
36
36
|
} | Refused<'rejected'> | Refused<'absent'> | Failure;
|
|
37
|
-
export type ShownLinkAnswer = Extract<
|
|
37
|
+
export type ShownLinkAnswer = Extract<AttachmentLinkAnswer, {
|
|
38
38
|
kind: 'link';
|
|
39
39
|
}> & {
|
|
40
|
-
copies: readonly
|
|
40
|
+
copies: readonly AttachmentCopy[];
|
|
41
41
|
};
|
|
42
|
-
type ShownRefusal = Exclude<
|
|
42
|
+
type ShownRefusal = Exclude<AttachmentLinkAnswer, {
|
|
43
43
|
kind: 'link';
|
|
44
44
|
}>;
|
|
45
|
-
export type HeldShownAnswer =
|
|
46
|
-
export type ShownAnswer =
|
|
45
|
+
export type HeldShownAnswer = KeptAttachment | ShownLinkAnswer | ShownRefusal;
|
|
46
|
+
export type ShownAnswer = AttachmentAnswer | ShownLinkAnswer | ShownRefusal;
|
|
47
47
|
export type AttachAnswer = {
|
|
48
48
|
kind: 'attached';
|
|
49
49
|
path: string;
|
|
@@ -68,13 +68,13 @@ export type Resolution = {
|
|
|
68
68
|
export declare const UNREADABLE: Refused<'unreadable'>;
|
|
69
69
|
export declare const LOCKED_UNREADABLE: Refused<'unreadable'>;
|
|
70
70
|
export declare const ABSENT_TARGET: Refused<'absent'>;
|
|
71
|
-
export declare function
|
|
71
|
+
export declare function absentAttachment(path: string): Refused<'absent'>;
|
|
72
72
|
export declare function declaredType(blob: Blob): string;
|
|
73
|
-
export declare function
|
|
73
|
+
export declare function attachmentBlob(binary: Extract<AttachmentAnswer, {
|
|
74
74
|
kind: 'binary';
|
|
75
75
|
}>): Promise<Blob>;
|
|
76
|
-
export declare function
|
|
77
|
-
export declare function
|
|
76
|
+
export declare function attachmentAnswer(result: KeptResult): HeldAttachmentAnswer;
|
|
77
|
+
export declare function attachmentLinkAnswer(result: AttachmentLinkResult, held?: string): AttachmentLinkAnswer;
|
|
78
78
|
export declare function attachAnswer(result: AttachResult): AttachAnswer;
|
|
79
79
|
export declare function linkedAnswer(result: AttachResult): ConversationAttachAnswer;
|
|
80
80
|
export declare const ROOM_LOCKED = "room-locked";
|