@agentshouse/mdruntime-adapter 0.1.0-c2c54ea2d0d14 → 0.1.0-c2d724d3c8371
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 +6 -49
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +26 -231
- package/dist/adapter.d.ts +0 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +212 -434
- package/dist/authored-path.d.ts +9 -0
- package/dist/authored-path.d.ts.map +1 -0
- package/dist/authored-path.js +34 -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 +42 -12
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +231 -51
- 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 +9 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -5
- 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 +17 -70
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +70 -351
- package/dist/refusal.d.ts +6 -5
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +27 -11
- package/dist/room-query.d.ts +4 -0
- package/dist/room-query.d.ts.map +1 -0
- package/dist/room-query.js +48 -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 +17 -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 +59 -0
- package/dist/session-content/turn.d.ts +137 -0
- package/dist/site.d.ts +0 -1
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +94 -174
- 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 +15 -16
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +242 -426
- package/dist/transport.d.ts +84 -44
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +89 -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 +3 -2
- package/dist/upload.d.ts.map +1 -1
- package/dist/upload.js +10 -8
- package/dist/version.d.ts +0 -1
- package/dist/write.d.ts +6 -3
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +39 -48
- package/package.json +3 -2
- 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 -4
- 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 -484
- package/dist/part.d.ts +0 -15
- package/dist/part.d.ts.map +0 -1
- package/dist/part.js +0 -82
- package/dist/room-types.d.ts +0 -7
- package/dist/room-types.d.ts.map +0 -1
- package/dist/room-types.js +0 -124
package/dist/read.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { TrackedAuthority } from './discovery.js';
|
|
3
|
-
import { type HousePart } from './part.js';
|
|
1
|
+
import { type BinaryFile, type BootstrapPage, type SavedFacts } from '@agentshouse/mdruntime';
|
|
4
2
|
import type { HouseMode } from './transport.js';
|
|
5
3
|
import { type LogPosition } from './version.js';
|
|
6
4
|
export type HeadChange = BootstrapPage['changes'][string];
|
|
7
5
|
export type Answered = {
|
|
8
6
|
readonly documents: Map<string, string>;
|
|
7
|
+
readonly facts: Map<string, SavedFacts>;
|
|
9
8
|
readonly revisions: Map<string, string>;
|
|
10
9
|
readonly fileIds: Map<string, string>;
|
|
10
|
+
readonly created: Map<string, string>;
|
|
11
11
|
readonly changes: Map<string, HeadChange>;
|
|
12
12
|
readonly binaryFiles: Map<string, BinaryFile>;
|
|
13
13
|
readonly removals: Set<string>;
|
|
@@ -20,8 +20,10 @@ export declare function forgotten(answer: Answered, path: string): void;
|
|
|
20
20
|
export declare function folded(answer: Answered, path: string, removed: boolean): void;
|
|
21
21
|
export declare function answered(answer: Answered): Generator<number, {
|
|
22
22
|
documents: Readonly<Record<string, string>>;
|
|
23
|
+
facts: Readonly<Record<string, SavedFacts>>;
|
|
23
24
|
revisions: Readonly<Record<string, string>>;
|
|
24
25
|
fileIds?: Readonly<Record<string, string>>;
|
|
26
|
+
created?: Readonly<Record<string, string>>;
|
|
25
27
|
changes: Readonly<Record<string, HeadChange>>;
|
|
26
28
|
binaryFiles: Readonly<Record<string, BinaryFile>>;
|
|
27
29
|
removals: readonly string[];
|
|
@@ -32,32 +34,22 @@ export type HouseManifestFile = {
|
|
|
32
34
|
path: string;
|
|
33
35
|
revision: string | undefined;
|
|
34
36
|
version: string;
|
|
35
|
-
sha256?: string;
|
|
36
37
|
head?: HeadChange;
|
|
38
|
+
created?: string;
|
|
37
39
|
binary?: BinaryFile;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
content: string;
|
|
40
|
+
facts?: SavedFacts;
|
|
41
|
+
space?: string;
|
|
42
|
+
content?: string;
|
|
42
43
|
};
|
|
43
44
|
export type HouseScope = LogPosition & {
|
|
44
45
|
anchor: string;
|
|
45
46
|
files: readonly HouseManifestFile[];
|
|
46
|
-
contents: readonly HouseContent[];
|
|
47
47
|
folders?: readonly string[];
|
|
48
48
|
};
|
|
49
|
-
export type HouseModels =
|
|
50
|
-
|
|
51
|
-
contents: readonly HouseContent[];
|
|
52
|
-
};
|
|
53
|
-
export type HouseRoomParts = LogPosition & {
|
|
49
|
+
export type HouseModels = readonly HouseManifestFile[];
|
|
50
|
+
export type HouseRoomHead = LogPosition & {
|
|
54
51
|
anchor: string;
|
|
55
52
|
models: HouseModels;
|
|
56
|
-
parts: readonly HousePart[];
|
|
57
|
-
};
|
|
58
|
-
export type HouseParted = {
|
|
59
|
-
rooms: readonly HouseRoomParts[];
|
|
60
|
-
next?: string;
|
|
61
53
|
};
|
|
62
54
|
export type HouseGrant = {
|
|
63
55
|
operation: string;
|
|
@@ -69,69 +61,24 @@ export type HouseFileAddress = {
|
|
|
69
61
|
sha256: string;
|
|
70
62
|
mediaType: string;
|
|
71
63
|
};
|
|
72
|
-
export type HouseChange = {
|
|
73
|
-
path: string;
|
|
74
|
-
removed: true;
|
|
75
|
-
} | {
|
|
76
|
-
path: string;
|
|
77
|
-
content: string;
|
|
78
|
-
revision: string | undefined;
|
|
79
|
-
version: string;
|
|
80
|
-
head?: HeadChange;
|
|
81
|
-
} | {
|
|
82
|
-
path: string;
|
|
83
|
-
binary: BinaryFile;
|
|
84
|
-
revision: string | undefined;
|
|
85
|
-
version: string;
|
|
86
|
-
head?: HeadChange;
|
|
87
|
-
};
|
|
88
|
-
export type HousePage = {
|
|
89
|
-
after: string;
|
|
90
|
-
through: string;
|
|
91
|
-
read: number;
|
|
92
|
-
};
|
|
93
|
-
export type HouseFolder = {
|
|
94
|
-
path: string;
|
|
95
|
-
removed: boolean;
|
|
96
|
-
};
|
|
97
|
-
export type HouseView = LogPosition & {
|
|
98
|
-
authority: string;
|
|
99
|
-
changes: readonly HouseChange[];
|
|
100
|
-
folders?: readonly HouseFolder[];
|
|
101
|
-
next?: HousePage;
|
|
102
|
-
};
|
|
103
|
-
type PageFailure = AdapterFailure | {
|
|
104
|
-
kind: 'beyond-horizon';
|
|
105
|
-
};
|
|
106
|
-
export type HouseEnumeration = {
|
|
107
|
-
authorities: readonly HouseView[];
|
|
108
|
-
};
|
|
109
64
|
export declare function authorityRoot(handle: string): string;
|
|
110
65
|
export declare function schemaPath(handle: string, schema: string): string;
|
|
111
66
|
export declare function parseGrant(body: unknown): HouseGrant | null;
|
|
112
67
|
export declare function parseFileAddress(body: unknown): HouseFileAddress | null;
|
|
113
68
|
export declare function headChange(held: {
|
|
114
69
|
readonly author?: unknown;
|
|
115
|
-
readonly
|
|
70
|
+
readonly changed_at?: unknown;
|
|
116
71
|
}): HeadChange | undefined | null;
|
|
117
72
|
export declare function binaryFileOf(held: Readonly<Record<string, unknown>>): BinaryFile | undefined | null;
|
|
118
|
-
export declare function
|
|
119
|
-
export declare function
|
|
120
|
-
export declare function
|
|
121
|
-
export declare function manifested(room: HouseRoomParts, inventory: BootstrapInventory, pageToken: string, models: RoomModels | undefined): BootstrapPage;
|
|
122
|
-
export declare function modelScope(room: HouseRoomParts): HouseScope;
|
|
123
|
-
export declare function emptyScope(room: HouseRoomParts): HouseScope;
|
|
124
|
-
export declare function housePart(room: HouseRoomParts, frame: Uint8Array<ArrayBuffer>, listed: HousePart, mode: HouseMode): Promise<HouseScope | TransportUncertainty | null>;
|
|
125
|
-
export declare function parseEnumeration(body: unknown, mode: HouseMode): HouseEnumeration | null;
|
|
126
|
-
export declare function wholeView(first: HouseView, more: (page: HousePage) => Promise<HouseView | PageFailure>): Promise<HouseView | PageFailure>;
|
|
73
|
+
export declare function documentEntry(value: unknown, mode: HouseMode): HouseManifestFile | null;
|
|
74
|
+
export declare function kept(answer: Answered, file: HouseManifestFile): void;
|
|
75
|
+
export declare function modelScope(room: HouseRoomHead): HouseScope;
|
|
127
76
|
export declare function bootstrapping(scope: HouseScope): Generator<number, BootstrapPage, void>;
|
|
128
77
|
export type HouseSchema = {
|
|
129
78
|
schema: string | null;
|
|
130
79
|
version: string | null;
|
|
131
80
|
revision: string | null;
|
|
81
|
+
space?: string;
|
|
132
82
|
};
|
|
83
|
+
export declare function schemaFile(file: HouseManifestFile): HouseSchema | null;
|
|
133
84
|
export declare function schemaOf(scope: HouseScope, schema: string): HouseSchema | null;
|
|
134
|
-
export declare function viewOf(enumeration: HouseEnumeration, tracked: TrackedAuthority): HouseView | undefined;
|
|
135
|
-
export declare function refreshFrom(view: HouseView, fromRoomVersion: string): Promise<RefreshResult>;
|
|
136
|
-
export {};
|
|
137
|
-
//# 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,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,EAAE,UAAU,CAAC,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,GAAG,C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