@amalgm/shell 0.1.111 → 0.1.113
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/PURPOSE.md +8 -0
- package/dist/cli.js +24 -1
- package/dist/cli.js.map +1 -1
- package/dist/files-trace.d.ts +41 -0
- package/dist/files-trace.js +138 -0
- package/dist/files-trace.js.map +1 -0
- package/dist/gateway.js +7 -1
- package/dist/gateway.js.map +1 -1
- package/dist/machine-host.d.ts +6 -0
- package/dist/machine-host.js +25 -11
- package/dist/machine-host.js.map +1 -1
- package/dist/registry-graph.d.ts +61 -0
- package/dist/registry-graph.js +156 -0
- package/dist/registry-graph.js.map +1 -0
- package/dist/runtime-command-host.js +7 -1
- package/dist/runtime-command-host.js.map +1 -1
- package/dist/user-ground-host.d.ts +47 -0
- package/dist/user-ground-host.js +578 -168
- package/dist/user-ground-host.js.map +1 -1
- package/dist/wire-client.js +1 -1
- package/package.json +2 -2
- package/dist/paged-mutation-submit.d.ts +0 -28
- package/dist/paged-mutation-submit.js +0 -61
- package/dist/paged-mutation-submit.js.map +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The registry graph as this machine holds it.
|
|
3
|
+
*
|
|
4
|
+
* The authority stores the graph as a small head naming each root's immutable
|
|
5
|
+
* pages, so this machine holds the same shape: the head, and the records of
|
|
6
|
+
* every root that head names, grouped exactly as the head pages them. A
|
|
7
|
+
* publication rebuilds only the roots it walked — every other root carries its
|
|
8
|
+
* page list forward untouched, never re-serialized, re-hashed, or re-journaled.
|
|
9
|
+
*
|
|
10
|
+
* A resource whose authority snapshot is still records-shaped (a login's
|
|
11
|
+
* initial publication, before any head has committed) is held with a null
|
|
12
|
+
* head. Its first head commit must page every root at once, which is exactly
|
|
13
|
+
* what the authority demands of a commit over a records base.
|
|
14
|
+
*/
|
|
15
|
+
import { type CloudEntityRecord, type CloudSnapshot, type CloudGraphHead, type CloudGraphHeadReplacement, type GraphPage, type GraphPageRef, type Sha256Hex } from "@amalgm/live";
|
|
16
|
+
/** One publication's outcome: the graph it produces, the operation that
|
|
17
|
+
* commits it, the pages that must be sealed first, and the checksum the
|
|
18
|
+
* authority will hold once it lands. */
|
|
19
|
+
export interface RegistryGraphRebuild {
|
|
20
|
+
readonly graph: RegistryGraph;
|
|
21
|
+
readonly operation: CloudGraphHeadReplacement;
|
|
22
|
+
readonly pages: readonly GraphPage[];
|
|
23
|
+
readonly checksum: string;
|
|
24
|
+
}
|
|
25
|
+
export declare class RegistryGraph {
|
|
26
|
+
/** The committed head, or null while the authority still holds a
|
|
27
|
+
* records-shaped snapshot. */
|
|
28
|
+
readonly head: CloudGraphHead | null;
|
|
29
|
+
private readonly rootRecords;
|
|
30
|
+
private flat;
|
|
31
|
+
private rootIndex;
|
|
32
|
+
constructor(head: CloudGraphHead | null, rootRecords: ReadonlyMap<string, readonly CloudEntityRecord[]>);
|
|
33
|
+
/** Hold a records-shaped snapshot as the same per-root groups a head would
|
|
34
|
+
* name, so every reader above this class is shape-blind. */
|
|
35
|
+
static fromRecords(records: readonly CloudEntityRecord[]): RegistryGraph;
|
|
36
|
+
rootIds(): readonly string[];
|
|
37
|
+
recordsFor(rootId: string): readonly CloudEntityRecord[];
|
|
38
|
+
/** Every record of every root, uuid-sorted. Only whole-graph readers pay
|
|
39
|
+
* for this — a publication never calls it. */
|
|
40
|
+
records(): readonly CloudEntityRecord[];
|
|
41
|
+
/** The whole graph in the records shape the cold install and workspace
|
|
42
|
+
* selection paths read. Normalization already happened per root, so this
|
|
43
|
+
* only names the shape. */
|
|
44
|
+
snapshot(): CloudSnapshot;
|
|
45
|
+
/** Which root a record descends from, or null when the graph does not hold
|
|
46
|
+
* it. The index is built once, and only for callers that need it. */
|
|
47
|
+
rootOf(uuid: string): string | null;
|
|
48
|
+
/** The checksum the authority holds for this graph right now. */
|
|
49
|
+
checksum(sha256Hex: Sha256Hex): string;
|
|
50
|
+
/** Publish a new graph in which `rebuilt` roots carry the given records and
|
|
51
|
+
* every other root carries its committed pages forward. A root mapped to an
|
|
52
|
+
* empty record list is dropped from the graph. */
|
|
53
|
+
rebuild(rebuilt: ReadonlyMap<string, readonly CloudEntityRecord[]>, sha256Hex: Sha256Hex): RegistryGraphRebuild;
|
|
54
|
+
}
|
|
55
|
+
/** Every page identity the head names — the set a publication may skip
|
|
56
|
+
* uploading because the authority already holds it under this exact graph. */
|
|
57
|
+
export declare function graphPageIdentities(head: CloudGraphHead | null): ReadonlySet<string>;
|
|
58
|
+
/** Materialize the authority's stored snapshot bytes into this machine's
|
|
59
|
+
* graph. A head is materialized by reading the pages it names; a records-shaped
|
|
60
|
+
* snapshot is grouped in place. */
|
|
61
|
+
export declare function registryGraphFromSnapshot(bytes: Uint8Array, readPages: (refs: readonly GraphPageRef[]) => Promise<ReadonlyMap<string, Uint8Array>>, sha256Hex: Sha256Hex): Promise<RegistryGraph>;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The registry graph as this machine holds it.
|
|
3
|
+
*
|
|
4
|
+
* The authority stores the graph as a small head naming each root's immutable
|
|
5
|
+
* pages, so this machine holds the same shape: the head, and the records of
|
|
6
|
+
* every root that head names, grouped exactly as the head pages them. A
|
|
7
|
+
* publication rebuilds only the roots it walked — every other root carries its
|
|
8
|
+
* page list forward untouched, never re-serialized, re-hashed, or re-journaled.
|
|
9
|
+
*
|
|
10
|
+
* A resource whose authority snapshot is still records-shaped (a login's
|
|
11
|
+
* initial publication, before any head has committed) is held with a null
|
|
12
|
+
* head. Its first head commit must page every root at once, which is exactly
|
|
13
|
+
* what the authority demands of a commit over a records base.
|
|
14
|
+
*/
|
|
15
|
+
import { assembleRootRecords, graphHeadChecksum, graphHeadFromRootPages, graphHeadReplacement, pagesForRoot, parseGraphHead, parseSnapshot, recordsByRoot, snapshotFromRecords, stableJson, ENTITY_CLOUD_SCHEMA_VERSION, GRAPH_HEAD_KIND, } from "@amalgm/live";
|
|
16
|
+
export class RegistryGraph {
|
|
17
|
+
/** The committed head, or null while the authority still holds a
|
|
18
|
+
* records-shaped snapshot. */
|
|
19
|
+
head;
|
|
20
|
+
rootRecords;
|
|
21
|
+
flat = null;
|
|
22
|
+
rootIndex = null;
|
|
23
|
+
constructor(head, rootRecords) {
|
|
24
|
+
this.head = head;
|
|
25
|
+
this.rootRecords = rootRecords;
|
|
26
|
+
}
|
|
27
|
+
/** Hold a records-shaped snapshot as the same per-root groups a head would
|
|
28
|
+
* name, so every reader above this class is shape-blind. */
|
|
29
|
+
static fromRecords(records) {
|
|
30
|
+
return new RegistryGraph(null, recordsByRoot(records));
|
|
31
|
+
}
|
|
32
|
+
rootIds() {
|
|
33
|
+
return [...this.rootRecords.keys()];
|
|
34
|
+
}
|
|
35
|
+
recordsFor(rootId) {
|
|
36
|
+
return this.rootRecords.get(rootId.toLowerCase()) ?? [];
|
|
37
|
+
}
|
|
38
|
+
/** Every record of every root, uuid-sorted. Only whole-graph readers pay
|
|
39
|
+
* for this — a publication never calls it. */
|
|
40
|
+
records() {
|
|
41
|
+
this.flat ??= snapshotFromRecords([...this.rootRecords.values()].flat()).records;
|
|
42
|
+
return this.flat;
|
|
43
|
+
}
|
|
44
|
+
/** The whole graph in the records shape the cold install and workspace
|
|
45
|
+
* selection paths read. Normalization already happened per root, so this
|
|
46
|
+
* only names the shape. */
|
|
47
|
+
snapshot() {
|
|
48
|
+
return {
|
|
49
|
+
schemaVersion: ENTITY_CLOUD_SCHEMA_VERSION,
|
|
50
|
+
kind: "amalgm-entity-registry",
|
|
51
|
+
records: this.records(),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** Which root a record descends from, or null when the graph does not hold
|
|
55
|
+
* it. The index is built once, and only for callers that need it. */
|
|
56
|
+
rootOf(uuid) {
|
|
57
|
+
if (!this.rootIndex) {
|
|
58
|
+
const index = new Map();
|
|
59
|
+
for (const [rootId, records] of this.rootRecords) {
|
|
60
|
+
for (const record of records)
|
|
61
|
+
index.set(record.uuid, rootId);
|
|
62
|
+
}
|
|
63
|
+
this.rootIndex = index;
|
|
64
|
+
}
|
|
65
|
+
return this.rootIndex.get(uuid) ?? null;
|
|
66
|
+
}
|
|
67
|
+
/** The checksum the authority holds for this graph right now. */
|
|
68
|
+
checksum(sha256Hex) {
|
|
69
|
+
return this.head === null
|
|
70
|
+
? sha256Hex(stableJson(snapshotFromRecords(this.records())))
|
|
71
|
+
: graphHeadChecksum(this.head, sha256Hex);
|
|
72
|
+
}
|
|
73
|
+
/** Publish a new graph in which `rebuilt` roots carry the given records and
|
|
74
|
+
* every other root carries its committed pages forward. A root mapped to an
|
|
75
|
+
* empty record list is dropped from the graph. */
|
|
76
|
+
rebuild(rebuilt, sha256Hex) {
|
|
77
|
+
const replaced = new Map([...rebuilt].map(([rootId, records]) => [rootId.toLowerCase(), records]));
|
|
78
|
+
if (this.head === null) {
|
|
79
|
+
// The authority's base carries no page identities, so it can prove
|
|
80
|
+
// nothing about a root this commit leaves alone. Paging every root is
|
|
81
|
+
// the only lawful first head.
|
|
82
|
+
for (const rootId of this.rootRecords.keys()) {
|
|
83
|
+
if (!replaced.has(rootId)) {
|
|
84
|
+
throw new Error(`the first graph head must page every root, and ${rootId} is missing`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const carried = (this.head?.roots ?? []).filter((root) => !replaced.has(root.rootId));
|
|
89
|
+
const pages = [];
|
|
90
|
+
const paged = [];
|
|
91
|
+
const nextRecords = new Map(this.rootRecords);
|
|
92
|
+
for (const [rootId, records] of replaced) {
|
|
93
|
+
if (records.length === 0) {
|
|
94
|
+
nextRecords.delete(rootId);
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
const rootPages = pagesForRoot(rootId, records, sha256Hex);
|
|
98
|
+
pages.push(...rootPages);
|
|
99
|
+
paged.push({ rootId, pages: rootPages.map((page) => page.ref) });
|
|
100
|
+
nextRecords.set(rootId, rootPages.flatMap((page) => page.records));
|
|
101
|
+
}
|
|
102
|
+
const head = graphHeadFromRootPages([...carried, ...paged]);
|
|
103
|
+
return {
|
|
104
|
+
graph: new RegistryGraph(head, nextRecords),
|
|
105
|
+
operation: graphHeadReplacement(head, [...replaced.keys()]),
|
|
106
|
+
pages,
|
|
107
|
+
checksum: graphHeadChecksum(head, sha256Hex),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/** Every page identity the head names — the set a publication may skip
|
|
112
|
+
* uploading because the authority already holds it under this exact graph. */
|
|
113
|
+
export function graphPageIdentities(head) {
|
|
114
|
+
const identities = new Set();
|
|
115
|
+
for (const root of head?.roots ?? []) {
|
|
116
|
+
for (const page of root.pages)
|
|
117
|
+
identities.add(page.sha256);
|
|
118
|
+
}
|
|
119
|
+
return identities;
|
|
120
|
+
}
|
|
121
|
+
/** Materialize the authority's stored snapshot bytes into this machine's
|
|
122
|
+
* graph. A head is materialized by reading the pages it names; a records-shaped
|
|
123
|
+
* snapshot is grouped in place. */
|
|
124
|
+
export async function registryGraphFromSnapshot(bytes, readPages, sha256Hex) {
|
|
125
|
+
if (!snapshotIsGraphHead(bytes)) {
|
|
126
|
+
return RegistryGraph.fromRecords(parseSnapshot(bytes).records);
|
|
127
|
+
}
|
|
128
|
+
const head = parseGraphHead(bytes);
|
|
129
|
+
const read = await readPages(head.roots.flatMap((root) => root.pages));
|
|
130
|
+
const rootRecords = new Map();
|
|
131
|
+
for (const root of head.roots) {
|
|
132
|
+
rootRecords.set(root.rootId, assembleRootRecords(root.rootId, root.pages, root.pages.map((page) => {
|
|
133
|
+
const found = read.get(page.sha256);
|
|
134
|
+
if (!found)
|
|
135
|
+
throw new Error(`cloud graph page ${page.sha256} was not read`);
|
|
136
|
+
return found;
|
|
137
|
+
}), sha256Hex));
|
|
138
|
+
}
|
|
139
|
+
return new RegistryGraph(head, rootRecords);
|
|
140
|
+
}
|
|
141
|
+
/** Which shape the authority's snapshot bytes carry. Both shapes declare their
|
|
142
|
+
* kind ahead of their payload, and no record carries a `kind` of its own, so
|
|
143
|
+
* the first declaration in the opening bytes is the snapshot's — the shape is
|
|
144
|
+
* decided from a few bytes rather than by parsing a whole graph. */
|
|
145
|
+
function snapshotIsGraphHead(bytes) {
|
|
146
|
+
const declared = /"kind":"([^"]*)"/
|
|
147
|
+
.exec(Buffer.from(bytes.subarray(0, SNAPSHOT_KIND_PREFIX_BYTES)).toString("utf8"));
|
|
148
|
+
if (!declared)
|
|
149
|
+
throw new Error("cloud registry snapshot declares no kind");
|
|
150
|
+
return declared[1] === GRAPH_HEAD_KIND;
|
|
151
|
+
}
|
|
152
|
+
/** Enough opening bytes to hold the kind declaration of either shape, whatever
|
|
153
|
+
* small members precede it. The authority reads the same prefix to decide the
|
|
154
|
+
* same question. */
|
|
155
|
+
const SNAPSHOT_KIND_PREFIX_BYTES = 128;
|
|
156
|
+
//# sourceMappingURL=registry-graph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-graph.js","sourceRoot":"","sources":["../src/registry-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,2BAA2B,EAC3B,eAAe,GAQhB,MAAM,cAAc,CAAC;AAYtB,MAAM,OAAO,aAAa;IACxB;kCAC8B;IACrB,IAAI,CAAwB;IAEpB,WAAW,CAAoD;IAExE,IAAI,GAAwC,IAAI,CAAC;IAEjD,SAAS,GAAuC,IAAI,CAAC;IAE7D,YACE,IAA2B,EAC3B,WAA8D;QAE9D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED;gEAC4D;IAC5D,MAAM,CAAC,WAAW,CAAC,OAAqC;QACtD,OAAO,IAAI,aAAa,CAAC,IAAI,EA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C,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IACrF,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC3E,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK,eAAe,CAAC;AACzC,CAAC;AAED;;oBAEoB;AACpB,MAAM,0BAA0B,GAAG,GAAG,CAAC"}
|
|
@@ -53,7 +53,13 @@ export async function callRuntimeCommand(input, path, body) {
|
|
|
53
53
|
const message = payload && typeof payload === "object" && "error" in payload
|
|
54
54
|
? String(payload.error)
|
|
55
55
|
: `runtime responded ${response.statusCode}`;
|
|
56
|
-
|
|
56
|
+
const failure = new Error(message);
|
|
57
|
+
const stages = payload && typeof payload === "object" && "stages" in payload
|
|
58
|
+
? payload.stages
|
|
59
|
+
: undefined;
|
|
60
|
+
if (Array.isArray(stages))
|
|
61
|
+
Object.assign(failure, { stages });
|
|
62
|
+
throw failure;
|
|
57
63
|
}
|
|
58
64
|
if (!payload || typeof payload !== "object" || Array.isArray(payload)) {
|
|
59
65
|
throw new Error("Files runtime returned an invalid response");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-command-host.js","sourceRoot":"","sources":["../src/runtime-command-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,UAAU,GAAG,YAAY,CAAC;AAyBhC,6EAA6E;AAC7E,MAAM,UAAU,sBAAsB,CAAC,KAAgC;IACrE,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,KAAK,GAAG,kBAAkB,CAA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AI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc,EAAE,KAAa;IAC7C,MAAM,IAAI,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3D,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,aAAa,CAAC,CAAC;IAClD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -38,6 +38,28 @@ export interface DetectScanEvidence {
|
|
|
38
38
|
readonly plannedRows?: number;
|
|
39
39
|
readonly records?: number;
|
|
40
40
|
readonly recordBytes?: number;
|
|
41
|
+
/** Wall time inside readdir/lstat — the traversal's own cost. */
|
|
42
|
+
readonly walkMs?: number;
|
|
43
|
+
/** Wall time from the first content capture scheduled to the last settled. */
|
|
44
|
+
readonly captureMs?: number;
|
|
45
|
+
/** Summed capture task time. Divided by captureMs it is pool occupancy: at
|
|
46
|
+
* or near 1 the pool is idle-serial, near its width it is saturated. */
|
|
47
|
+
readonly captureBusyMs?: number;
|
|
48
|
+
/** Bytes read and hashed by content capture during this scan. */
|
|
49
|
+
readonly captureBytes?: number;
|
|
50
|
+
/** Wall time inside Git index inspection during the walk. */
|
|
51
|
+
readonly gitMs?: number;
|
|
52
|
+
/** Wall time proving repository identity through Git, across every
|
|
53
|
+
* repository. Repositories are sealed one at a time, so this is serial. */
|
|
54
|
+
readonly repositoryIdentityMs?: number;
|
|
55
|
+
/** Wall time packing repository transport bytes, across every repository. */
|
|
56
|
+
readonly repositoryCaptureMs?: number;
|
|
57
|
+
/** Wall time sealing and re-inspecting repository transport artifacts. */
|
|
58
|
+
readonly repositorySealMs?: number;
|
|
59
|
+
/** Wall time resolving stored UUIDs against what the walk found. */
|
|
60
|
+
readonly reconcileMs?: number;
|
|
61
|
+
/** Wall time planning and persisting rows once identity is settled. */
|
|
62
|
+
readonly persistMs?: number;
|
|
41
63
|
}
|
|
42
64
|
export interface UserGroundHostOptions {
|
|
43
65
|
readonly amalgmRoot: string;
|
|
@@ -67,6 +89,13 @@ export interface UserGroundHostOptions {
|
|
|
67
89
|
}) => Promise<void> | void;
|
|
68
90
|
/** Transient, opt-in evidence for exact stage measurement. */
|
|
69
91
|
readonly onFilesStage?: FilesStageObserver;
|
|
92
|
+
/**
|
|
93
|
+
* Is stage evidence being read right now? An observer may be permanently
|
|
94
|
+
* installed while nothing is listening, so the host asks rather than
|
|
95
|
+
* assumes: counters that cost real work on the critical path are computed
|
|
96
|
+
* only when the answer is yes.
|
|
97
|
+
*/
|
|
98
|
+
readonly filesTraceActive?: () => boolean;
|
|
70
99
|
}
|
|
71
100
|
export type WorkspaceAddStage = "intent-recorded" | "materialization-verified" | "rows-committed" | "ground-revealed" | "binding-created" | "watching";
|
|
72
101
|
export interface UserGroundCloseOptions {
|
|
@@ -102,6 +131,8 @@ export declare class UserGroundHost {
|
|
|
102
131
|
readonly port: UserGroundPort;
|
|
103
132
|
constructor(options: UserGroundHostOptions);
|
|
104
133
|
private stage;
|
|
134
|
+
/** Whether a counter worth real time on the critical path may be computed. */
|
|
135
|
+
private measuring;
|
|
105
136
|
private reportDetectScan;
|
|
106
137
|
databasePath(identity: UserGroundIdentity): string;
|
|
107
138
|
rows(identity: UserGroundIdentity): GroundRow[];
|
|
@@ -151,6 +182,14 @@ export declare class UserGroundHost {
|
|
|
151
182
|
private userRoot;
|
|
152
183
|
private cacheDir;
|
|
153
184
|
private cloudPort;
|
|
185
|
+
/** The authority's stored snapshot as this machine's graph. A head names
|
|
186
|
+
* immutable pages, so every page this machine already cached is a local read
|
|
187
|
+
* and an unchanged root never crosses the network twice. */
|
|
188
|
+
private materializeRegistry;
|
|
189
|
+
/** Read graph pages by identity: cached pages come off local disk, the rest
|
|
190
|
+
* are fetched straight from content storage and cached on the way in. Every
|
|
191
|
+
* page is re-proven against its declared identity before it is kept. */
|
|
192
|
+
private readGraphPages;
|
|
154
193
|
private localPort;
|
|
155
194
|
/** Send's small-cargo fast path: the record's sealed artifact rides the
|
|
156
195
|
* submit frame itself, so one round trip carries record, manifest, and
|
|
@@ -180,11 +219,19 @@ export declare class UserGroundHost {
|
|
|
180
219
|
* resource snapshot. */
|
|
181
220
|
private prepareSnapshotPublication;
|
|
182
221
|
private publishMaterializedSnapshot;
|
|
222
|
+
/** Close the graph-preparation stage with every leg it spent, so a slow
|
|
223
|
+
* preparation names the slow part instead of one opaque number. */
|
|
224
|
+
private finishPreparation;
|
|
183
225
|
/** Which of these heads does the authority hold sealed under the current
|
|
184
226
|
* content contract? Batched so a whole workspace costs a handful of
|
|
185
227
|
* frames; the answer is the only permission to skip an upload. */
|
|
186
228
|
private sealedContentHashes;
|
|
187
229
|
private publishPendingSnapshots;
|
|
230
|
+
/** Seal this publication's graph pages. Pages are immutable, content
|
|
231
|
+
* addressed, and already in memory, so the authority's seal inventory alone
|
|
232
|
+
* decides what still has to move and whole pages ride cargo waves. The head
|
|
233
|
+
* may not commit until every page it newly names is sealed. */
|
|
234
|
+
private uploadGraphPages;
|
|
188
235
|
private publishLoadedSnapshot;
|
|
189
236
|
}
|
|
190
237
|
/** The single opener and schema-migration entry for a user ground database.
|