@agentshouse/mdruntime-adapter 0.1.0-cedb8e57837a7 → 0.1.0-cf1ebfb67feeb
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 -69
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +7 -357
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +204 -411
- 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/discovery.d.ts +21 -13
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +73 -53
- package/dist/history.d.ts +12 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +92 -0
- package/dist/house-model.d.ts +719 -0
- package/dist/house-model.d.ts.map +1 -0
- package/dist/house-model.js +393 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/model.d.ts +5 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +10 -29
- package/dist/part.d.ts +14 -0
- package/dist/part.d.ts.map +1 -0
- package/dist/part.js +90 -0
- package/dist/read.d.ts +35 -59
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +178 -266
- package/dist/refusal.d.ts +0 -3
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +0 -5
- package/dist/room-stream.d.ts +19 -0
- package/dist/room-stream.d.ts.map +1 -0
- package/dist/room-stream.js +57 -0
- package/dist/room-types.d.ts +7 -0
- package/dist/room-types.d.ts.map +1 -0
- package/dist/room-types.js +123 -0
- package/dist/search.d.ts +5 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +47 -0
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +83 -193
- package/dist/stream.d.ts +13 -13
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +166 -411
- package/dist/transport.d.ts +54 -40
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +54 -11
- 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 +6 -1
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +28 -39
- package/package.json +8 -4
- package/AGENTS.md +0 -304
- package/dist/gather.d.ts +0 -4
- package/dist/gather.d.ts.map +0 -1
- package/dist/gather.js +0 -35
- package/dist/handed.d.ts +0 -15
- package/dist/handed.d.ts.map +0 -1
- package/dist/handed.js +0 -45
- package/dist/referrer.d.ts +0 -7
- package/dist/referrer.d.ts.map +0 -1
- package/dist/referrer.js +0 -35
package/dist/read.d.ts
CHANGED
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { TrackedAuthority } from './discovery.js';
|
|
1
|
+
import { type BinaryFile, type BootstrapPage, type SavedFacts, type RoomModels, type TransportUncertainty } 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
10
|
readonly changes: Map<string, HeadChange>;
|
|
11
11
|
readonly binaryFiles: Map<string, BinaryFile>;
|
|
12
12
|
readonly removals: Set<string>;
|
|
13
|
+
readonly folders: Set<string>;
|
|
14
|
+
readonly folderRemovals: Set<string>;
|
|
13
15
|
};
|
|
14
16
|
export declare function answering(): Answered;
|
|
15
17
|
export declare function revised(answer: Answered, path: string, revision: string): void;
|
|
16
18
|
export declare function forgotten(answer: Answered, path: string): void;
|
|
19
|
+
export declare function folded(answer: Answered, path: string, removed: boolean): void;
|
|
17
20
|
export declare function answered(answer: Answered): Generator<number, {
|
|
18
21
|
documents: Readonly<Record<string, string>>;
|
|
22
|
+
facts: Readonly<Record<string, SavedFacts>>;
|
|
19
23
|
revisions: Readonly<Record<string, string>>;
|
|
20
24
|
fileIds?: Readonly<Record<string, string>>;
|
|
21
25
|
changes: Readonly<Record<string, HeadChange>>;
|
|
22
26
|
binaryFiles: Readonly<Record<string, BinaryFile>>;
|
|
23
27
|
removals: readonly string[];
|
|
28
|
+
folders?: readonly string[];
|
|
29
|
+
folderRemovals?: readonly string[];
|
|
24
30
|
}, void>;
|
|
25
31
|
export type HouseManifestFile = {
|
|
26
32
|
path: string;
|
|
@@ -29,6 +35,7 @@ export type HouseManifestFile = {
|
|
|
29
35
|
sha256?: string;
|
|
30
36
|
head?: HeadChange;
|
|
31
37
|
binary?: BinaryFile;
|
|
38
|
+
facts?: SavedFacts;
|
|
32
39
|
};
|
|
33
40
|
export type HouseContent = {
|
|
34
41
|
path: string;
|
|
@@ -38,76 +45,48 @@ export type HouseScope = LogPosition & {
|
|
|
38
45
|
anchor: string;
|
|
39
46
|
files: readonly HouseManifestFile[];
|
|
40
47
|
contents: readonly HouseContent[];
|
|
48
|
+
folders?: readonly string[];
|
|
41
49
|
};
|
|
42
|
-
export type
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
46
|
-
export type HouseCursor = {
|
|
47
|
-
room: string;
|
|
48
|
-
path: string | null;
|
|
49
|
-
cut?: HouseCut;
|
|
50
|
+
export type HouseModels = {
|
|
51
|
+
files: readonly HouseManifestFile[];
|
|
52
|
+
contents: readonly HouseContent[];
|
|
50
53
|
};
|
|
51
|
-
export type
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
export type HouseRoomHead = LogPosition & {
|
|
55
|
+
anchor: string;
|
|
56
|
+
models: HouseModels;
|
|
54
57
|
};
|
|
55
58
|
export type HouseGrant = {
|
|
56
|
-
method: 'GET';
|
|
57
|
-
url: string;
|
|
58
|
-
} | {
|
|
59
|
-
method: 'POST';
|
|
60
59
|
operation: string;
|
|
61
60
|
url: string;
|
|
62
61
|
};
|
|
63
|
-
export type
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
content: string;
|
|
69
|
-
revision: string | undefined;
|
|
70
|
-
version: string;
|
|
71
|
-
head?: HeadChange;
|
|
72
|
-
} | {
|
|
73
|
-
path: string;
|
|
74
|
-
binary: BinaryFile;
|
|
75
|
-
revision: string | undefined;
|
|
76
|
-
version: string;
|
|
77
|
-
head?: HeadChange;
|
|
78
|
-
};
|
|
79
|
-
export type HousePage = {
|
|
80
|
-
after: string;
|
|
81
|
-
through: string;
|
|
82
|
-
read: number;
|
|
83
|
-
};
|
|
84
|
-
export type HouseView = LogPosition & {
|
|
85
|
-
authority: string;
|
|
86
|
-
changes: readonly HouseChange[];
|
|
87
|
-
next?: HousePage;
|
|
88
|
-
};
|
|
89
|
-
type PageFailure = AdapterFailure | {
|
|
90
|
-
kind: 'beyond-horizon';
|
|
91
|
-
};
|
|
92
|
-
export type HouseEnumeration = {
|
|
93
|
-
authorities: readonly HouseView[];
|
|
62
|
+
export type HouseFileAddress = {
|
|
63
|
+
url: string;
|
|
64
|
+
name: string;
|
|
65
|
+
sha256: string;
|
|
66
|
+
mediaType: string;
|
|
94
67
|
};
|
|
95
68
|
export declare function authorityRoot(handle: string): string;
|
|
96
69
|
export declare function schemaPath(handle: string, schema: string): string;
|
|
97
70
|
export declare function parseGrant(body: unknown): HouseGrant | null;
|
|
71
|
+
export declare function parseFileAddress(body: unknown): HouseFileAddress | null;
|
|
98
72
|
export declare function headChange(held: {
|
|
99
73
|
readonly author?: unknown;
|
|
100
74
|
readonly created_at?: unknown;
|
|
101
75
|
}): HeadChange | undefined | null;
|
|
102
76
|
export declare function binaryFileOf(held: Readonly<Record<string, unknown>>): BinaryFile | undefined | null;
|
|
103
|
-
export declare function
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
export declare function
|
|
109
|
-
export declare function
|
|
110
|
-
export declare function
|
|
77
|
+
export declare function carriedFacts(held: Readonly<Record<string, unknown>>): {
|
|
78
|
+
facts?: undefined;
|
|
79
|
+
} | {
|
|
80
|
+
facts: SavedFacts;
|
|
81
|
+
};
|
|
82
|
+
export declare function roomHead(payload: Uint8Array<ArrayBuffer>, mode: HouseMode): Promise<HouseRoomHead | null>;
|
|
83
|
+
export declare function manifested(room: HouseRoomHead, pageToken: string, models: RoomModels | undefined): BootstrapPage;
|
|
84
|
+
export declare function modelScope(room: HouseRoomHead): HouseScope;
|
|
85
|
+
export declare function emptyScope(room: HouseRoomHead): HouseScope;
|
|
86
|
+
export declare function housePart(room: HouseRoomHead, payload: Uint8Array<ArrayBuffer>, mode: HouseMode): Promise<{
|
|
87
|
+
scope: HouseScope;
|
|
88
|
+
ended: boolean;
|
|
89
|
+
} | TransportUncertainty>;
|
|
111
90
|
export declare function bootstrapping(scope: HouseScope): Generator<number, BootstrapPage, void>;
|
|
112
91
|
export type HouseSchema = {
|
|
113
92
|
schema: string | null;
|
|
@@ -115,7 +94,4 @@ export type HouseSchema = {
|
|
|
115
94
|
revision: string | null;
|
|
116
95
|
};
|
|
117
96
|
export declare function schemaOf(scope: HouseScope, schema: string): HouseSchema | null;
|
|
118
|
-
export declare function viewOf(enumeration: HouseEnumeration, tracked: TrackedAuthority): HouseView | undefined;
|
|
119
|
-
export declare function refreshFrom(view: HouseView, fromRoomVersion: string): Promise<RefreshResult>;
|
|
120
|
-
export {};
|
|
121
97
|
//# 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,EAIL,KAAK,
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../src/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAI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