@agentshouse/mdruntime-adapter 0.1.0-c2bcef775f3b3 → 0.1.0-c2c0ec6c1f436
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/README.md +2 -2
- package/dist/actions.d.ts +4 -53
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +48 -231
- package/dist/adapter.d.ts +0 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +217 -366
- package/dist/authored-path.d.ts +61 -0
- package/dist/authored-path.d.ts.map +1 -0
- package/dist/authored-path.js +166 -0
- package/dist/chunks.d.ts +36 -0
- package/dist/chunks.d.ts.map +1 -0
- package/dist/chunks.js +281 -0
- package/dist/digest.d.ts +0 -1
- package/dist/discovery.d.ts +40 -10
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +226 -45
- package/dist/history.d.ts +6 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +85 -0
- package/dist/index.d.ts +10 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -7
- package/dist/map.d.ts +0 -1
- package/dist/model.d.ts +6 -10
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +27 -42
- package/dist/read.d.ts +20 -67
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +106 -347
- package/dist/refusal.d.ts +6 -5
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +27 -11
- package/dist/renamed.d.ts +10 -0
- package/dist/renamed.d.ts.map +1 -0
- package/dist/renamed.js +20 -0
- package/dist/room-query.d.ts +4 -0
- package/dist/room-query.d.ts.map +1 -0
- package/dist/room-query.js +63 -0
- package/dist/search.d.ts +4 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +47 -0
- package/dist/session-content/check.d.ts +20 -0
- package/dist/session-content/index.d.ts +6 -0
- package/dist/session-content/parts.d.ts +30 -0
- package/dist/session-content/state.d.ts +54 -0
- package/dist/session-content/turn.d.ts +147 -0
- package/dist/site.d.ts +0 -1
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +114 -130
- package/dist/space-schema.d.ts +6 -0
- package/dist/space-schema.d.ts.map +1 -0
- package/dist/space-schema.js +11 -0
- package/dist/stream.d.ts +16 -16
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +308 -434
- package/dist/transport.d.ts +111 -54
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +92 -12
- package/dist/uncertain.d.ts +5 -0
- package/dist/uncertain.d.ts.map +1 -0
- package/dist/uncertain.js +11 -0
- package/dist/upload.d.ts +7 -2
- package/dist/upload.d.ts.map +1 -1
- package/dist/upload.js +51 -8
- package/dist/version.d.ts +0 -1
- package/dist/write.d.ts +2 -8
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +94 -129
- package/package.json +4 -3
- package/dist/app-reference.d.ts +0 -2
- package/dist/app-reference.d.ts.map +0 -1
- package/dist/app-reference.js +0 -2
- package/dist/crockford.d.ts +0 -4
- package/dist/crockford.d.ts.map +0 -1
- package/dist/crockford.js +0 -3
- package/dist/gather.d.ts +0 -3
- package/dist/gather.d.ts.map +0 -1
- package/dist/gather.js +0 -35
- package/dist/house-model.d.ts +0 -2
- package/dist/house-model.d.ts.map +0 -1
- package/dist/house-model.js +0 -490
- package/dist/part.d.ts +0 -14
- package/dist/part.d.ts.map +0 -1
- package/dist/part.js +0 -90
- package/dist/room-stream.d.ts +0 -19
- package/dist/room-stream.d.ts.map +0 -1
- package/dist/room-stream.js +0 -57
- package/dist/room-types.d.ts +0 -7
- package/dist/room-types.d.ts.map +0 -1
- package/dist/room-types.js +0 -126
package/dist/read.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { TrackedAuthority } from './discovery.js';
|
|
1
|
+
import { type AttachmentCopy, type Attachment, type BootstrapPage, type SavedFacts } from '@agentshouse/mdruntime';
|
|
3
2
|
import type { HouseMode } from './transport.js';
|
|
4
3
|
import { type LogPosition } from './version.js';
|
|
5
4
|
export type HeadChange = BootstrapPage['changes'][string];
|
|
6
5
|
export type Answered = {
|
|
7
6
|
readonly documents: Map<string, string>;
|
|
7
|
+
readonly facts: Map<string, SavedFacts>;
|
|
8
8
|
readonly revisions: Map<string, string>;
|
|
9
9
|
readonly fileIds: Map<string, string>;
|
|
10
|
+
readonly created: Map<string, string>;
|
|
10
11
|
readonly changes: Map<string, HeadChange>;
|
|
11
|
-
readonly
|
|
12
|
+
readonly attachments: Map<string, Attachment>;
|
|
12
13
|
readonly removals: Set<string>;
|
|
13
14
|
readonly folders: Set<string>;
|
|
14
15
|
readonly folderRemovals: Set<string>;
|
|
@@ -19,10 +20,12 @@ export declare function forgotten(answer: Answered, path: string): void;
|
|
|
19
20
|
export declare function folded(answer: Answered, path: string, removed: boolean): void;
|
|
20
21
|
export declare function answered(answer: Answered): Generator<number, {
|
|
21
22
|
documents: Readonly<Record<string, string>>;
|
|
23
|
+
facts: Readonly<Record<string, SavedFacts>>;
|
|
22
24
|
revisions: Readonly<Record<string, string>>;
|
|
23
25
|
fileIds?: Readonly<Record<string, string>>;
|
|
26
|
+
created?: Readonly<Record<string, string>>;
|
|
24
27
|
changes: Readonly<Record<string, HeadChange>>;
|
|
25
|
-
|
|
28
|
+
attachments: Readonly<Record<string, Attachment>>;
|
|
26
29
|
removals: readonly string[];
|
|
27
30
|
folders?: readonly string[];
|
|
28
31
|
folderRemovals?: readonly string[];
|
|
@@ -31,24 +34,19 @@ export type HouseManifestFile = {
|
|
|
31
34
|
path: string;
|
|
32
35
|
revision: string | undefined;
|
|
33
36
|
version: string;
|
|
34
|
-
sha256?: string;
|
|
35
37
|
head?: HeadChange;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
content
|
|
38
|
+
created?: string;
|
|
39
|
+
binary?: Attachment;
|
|
40
|
+
facts?: SavedFacts;
|
|
41
|
+
space?: string;
|
|
42
|
+
content?: string;
|
|
41
43
|
};
|
|
42
44
|
export type HouseScope = LogPosition & {
|
|
43
45
|
anchor: string;
|
|
44
46
|
files: readonly HouseManifestFile[];
|
|
45
|
-
contents: readonly HouseContent[];
|
|
46
47
|
folders?: readonly string[];
|
|
47
48
|
};
|
|
48
|
-
export type HouseModels =
|
|
49
|
-
files: readonly HouseManifestFile[];
|
|
50
|
-
contents: readonly HouseContent[];
|
|
51
|
-
};
|
|
49
|
+
export type HouseModels = readonly HouseManifestFile[];
|
|
52
50
|
export type HouseRoomHead = LogPosition & {
|
|
53
51
|
anchor: string;
|
|
54
52
|
models: HouseModels;
|
|
@@ -62,43 +60,7 @@ export type HouseFileAddress = {
|
|
|
62
60
|
name: string;
|
|
63
61
|
sha256: string;
|
|
64
62
|
mediaType: string;
|
|
65
|
-
|
|
66
|
-
export type HouseChange = {
|
|
67
|
-
path: string;
|
|
68
|
-
removed: true;
|
|
69
|
-
} | {
|
|
70
|
-
path: string;
|
|
71
|
-
content: string;
|
|
72
|
-
revision: string | undefined;
|
|
73
|
-
version: string;
|
|
74
|
-
head?: HeadChange;
|
|
75
|
-
} | {
|
|
76
|
-
path: string;
|
|
77
|
-
binary: BinaryFile;
|
|
78
|
-
revision: string | undefined;
|
|
79
|
-
version: string;
|
|
80
|
-
head?: HeadChange;
|
|
81
|
-
};
|
|
82
|
-
export type HousePage = {
|
|
83
|
-
after: string;
|
|
84
|
-
through: string;
|
|
85
|
-
read: number;
|
|
86
|
-
};
|
|
87
|
-
export type HouseFolder = {
|
|
88
|
-
path: string;
|
|
89
|
-
removed: boolean;
|
|
90
|
-
};
|
|
91
|
-
export type HouseView = LogPosition & {
|
|
92
|
-
authority: string;
|
|
93
|
-
changes: readonly HouseChange[];
|
|
94
|
-
folders?: readonly HouseFolder[];
|
|
95
|
-
next?: HousePage;
|
|
96
|
-
};
|
|
97
|
-
type PageFailure = AdapterFailure | {
|
|
98
|
-
kind: 'beyond-horizon';
|
|
99
|
-
};
|
|
100
|
-
export type HouseEnumeration = {
|
|
101
|
-
authorities: readonly HouseView[];
|
|
63
|
+
copies: readonly AttachmentCopy[];
|
|
102
64
|
};
|
|
103
65
|
export declare function authorityRoot(handle: string): string;
|
|
104
66
|
export declare function schemaPath(handle: string, schema: string): string;
|
|
@@ -106,27 +68,18 @@ export declare function parseGrant(body: unknown): HouseGrant | null;
|
|
|
106
68
|
export declare function parseFileAddress(body: unknown): HouseFileAddress | null;
|
|
107
69
|
export declare function headChange(held: {
|
|
108
70
|
readonly author?: unknown;
|
|
109
|
-
readonly
|
|
71
|
+
readonly changed_at?: unknown;
|
|
110
72
|
}): HeadChange | undefined | null;
|
|
111
|
-
export declare function
|
|
112
|
-
export declare function
|
|
113
|
-
export declare function
|
|
73
|
+
export declare function attachmentOf(held: Readonly<Record<string, unknown>>): Attachment | undefined | null;
|
|
74
|
+
export declare function documentEntry(value: unknown, mode: HouseMode): HouseManifestFile | null;
|
|
75
|
+
export declare function kept(answer: Answered, file: HouseManifestFile): void;
|
|
114
76
|
export declare function modelScope(room: HouseRoomHead): HouseScope;
|
|
115
|
-
export declare function emptyScope(room: HouseRoomHead): HouseScope;
|
|
116
|
-
export declare function housePart(room: HouseRoomHead, payload: Uint8Array<ArrayBuffer>, mode: HouseMode): Promise<{
|
|
117
|
-
scope: HouseScope;
|
|
118
|
-
ended: boolean;
|
|
119
|
-
} | TransportUncertainty>;
|
|
120
|
-
export declare function parseEnumeration(body: unknown, mode: HouseMode): HouseEnumeration | null;
|
|
121
|
-
export declare function wholeView(first: HouseView, more: (page: HousePage) => Promise<HouseView | PageFailure>): Promise<HouseView | PageFailure>;
|
|
122
77
|
export declare function bootstrapping(scope: HouseScope): Generator<number, BootstrapPage, void>;
|
|
123
78
|
export type HouseSchema = {
|
|
124
79
|
schema: string | null;
|
|
125
80
|
version: string | null;
|
|
126
81
|
revision: string | null;
|
|
82
|
+
space?: string;
|
|
127
83
|
};
|
|
84
|
+
export declare function schemaFile(file: HouseManifestFile): HouseSchema | null;
|
|
128
85
|
export declare function schemaOf(scope: HouseScope, schema: string): HouseSchema | null;
|
|
129
|
-
export declare function viewOf(enumeration: HouseEnumeration, tracked: TrackedAuthority): HouseView | undefined;
|
|
130
|
-
export declare function refreshFrom(view: HouseView, fromRoomVersion: string): Promise<RefreshResult>;
|
|
131
|
-
export {};
|
|
132
|
-
//# sourceMappingURL=read.d.ts.map
|
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,EAGL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,aAAa,EAElB,KAAK,UAAU,EAChB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAA6B,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3E,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAM1D,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,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,MAAM,CAAC,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EA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