@tensorix/metahub 0.5.8 → 0.6.0
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 +35 -14
- package/README.zh-CN.md +41 -13
- package/dist/cli.js +5175 -2272
- package/dist/cli.js.map +69 -48
- package/dist/core/blobs.d.ts.map +1 -1
- package/dist/core/blocks.d.ts +6 -2
- package/dist/core/blocks.d.ts.map +1 -1
- package/dist/core/compact.d.ts.map +1 -1
- package/dist/core/crdt.d.ts +5 -6
- package/dist/core/crdt.d.ts.map +1 -1
- package/dist/core/db.d.ts.map +1 -1
- package/dist/core/documents.d.ts +39 -0
- package/dist/core/documents.d.ts.map +1 -1
- package/dist/core/errors.d.ts +6 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/history-archive.d.ts +41 -0
- package/dist/core/history-archive.d.ts.map +1 -0
- package/dist/core/history.d.ts.map +1 -1
- package/dist/core/hlc.d.ts +4 -0
- package/dist/core/hlc.d.ts.map +1 -1
- package/dist/core/node.d.ts.map +1 -1
- package/dist/core/properties.d.ts +6 -0
- package/dist/core/properties.d.ts.map +1 -1
- package/dist/core/replica/drafts.d.ts +26 -0
- package/dist/core/replica/drafts.d.ts.map +1 -0
- package/dist/core/replica/rpc.d.ts +8 -0
- package/dist/core/replica/rpc.d.ts.map +1 -0
- package/dist/core/replica/service.d.ts +970 -0
- package/dist/core/replica/service.d.ts.map +1 -0
- package/dist/core/replica/sync.d.ts +55 -0
- package/dist/core/replica/sync.d.ts.map +1 -0
- package/dist/core/schema-init.d.ts +1 -1
- package/dist/core/schema-init.d.ts.map +1 -1
- package/dist/core/search.d.ts +34 -0
- package/dist/core/search.d.ts.map +1 -1
- package/dist/core/snapshot.d.ts.map +1 -1
- package/dist/core/sync/bucket-v2.d.ts +110 -0
- package/dist/core/sync/bucket-v2.d.ts.map +1 -0
- package/dist/core/sync/client.d.ts +14 -1
- package/dist/core/sync/client.d.ts.map +1 -1
- package/dist/core/sync/commit-log.d.ts +41 -0
- package/dist/core/sync/commit-log.d.ts.map +1 -0
- package/dist/core/sync/current-checkpoint.d.ts +47 -0
- package/dist/core/sync/current-checkpoint.d.ts.map +1 -0
- package/dist/core/sync/data-map-db.d.ts.map +1 -1
- package/dist/core/sync/data-version.d.ts +29 -0
- package/dist/core/sync/data-version.d.ts.map +1 -0
- package/dist/core/sync/drop-keys.d.ts.map +1 -1
- package/dist/core/sync/drop-pull.d.ts.map +1 -1
- package/dist/core/sync/e2ee.d.ts +5 -0
- package/dist/core/sync/e2ee.d.ts.map +1 -1
- package/dist/core/sync/enroll.d.ts +2 -0
- package/dist/core/sync/enroll.d.ts.map +1 -1
- package/dist/core/sync/history-observation.d.ts +5 -0
- package/dist/core/sync/history-observation.d.ts.map +1 -0
- package/dist/core/sync/http-status.d.ts.map +1 -1
- package/dist/core/sync/page-messages.d.ts +8 -0
- package/dist/core/sync/page-messages.d.ts.map +1 -1
- package/dist/core/sync/peer-v2.d.ts +9 -0
- package/dist/core/sync/peer-v2.d.ts.map +1 -0
- package/dist/core/sync/peers.d.ts +1 -0
- package/dist/core/sync/peers.d.ts.map +1 -1
- package/dist/core/sync/portable-json.d.ts +5 -0
- package/dist/core/sync/portable-json.d.ts.map +1 -0
- package/dist/core/sync/protocol.d.ts +32 -0
- package/dist/core/sync/protocol.d.ts.map +1 -1
- package/dist/core/sync/recovery-desktop.d.ts +6 -0
- package/dist/core/sync/recovery-desktop.d.ts.map +1 -0
- package/dist/core/sync/recovery-intent.d.ts +7 -0
- package/dist/core/sync/recovery-intent.d.ts.map +1 -0
- package/dist/core/sync/recovery-local.d.ts +21 -0
- package/dist/core/sync/recovery-local.d.ts.map +1 -0
- package/dist/core/sync/recovery-v2.d.ts +40 -0
- package/dist/core/sync/recovery-v2.d.ts.map +1 -0
- package/dist/core/sync/retention-executor.d.ts +77 -0
- package/dist/core/sync/retention-executor.d.ts.map +1 -0
- package/dist/core/sync/retention-protocol.d.ts +74 -0
- package/dist/core/sync/retention-protocol.d.ts.map +1 -0
- package/dist/core/sync/retention-state.d.ts +87 -0
- package/dist/core/sync/retention-state.d.ts.map +1 -0
- package/dist/core/sync/routes.d.ts +1 -1
- package/dist/core/sync/routes.d.ts.map +1 -1
- package/dist/core/sync/server.d.ts +1 -1
- package/dist/core/sync/server.d.ts.map +1 -1
- package/dist/core/sync/share-export.d.ts.map +1 -1
- package/dist/core/sync/share-serve.d.ts.map +1 -1
- package/dist/core/sync/share-tools.d.ts +10 -0
- package/dist/core/sync/share-tools.d.ts.map +1 -0
- package/dist/core/sync/storage-s3-bun.d.ts +2 -1
- package/dist/core/sync/storage-s3-bun.d.ts.map +1 -1
- package/dist/core/sync/storage-s3-fetch.d.ts +8 -0
- package/dist/core/sync/storage-s3-fetch.d.ts.map +1 -0
- package/dist/core/sync/storage-s3-sign.d.ts +3 -0
- package/dist/core/sync/storage-s3-sign.d.ts.map +1 -1
- package/dist/core/sync/storage-v2.d.ts +18 -0
- package/dist/core/sync/storage-v2.d.ts.map +1 -0
- package/dist/core/sync/storage.d.ts +47 -6
- package/dist/core/sync/storage.d.ts.map +1 -1
- package/dist/core/sync/transport.d.ts +4 -0
- package/dist/core/sync/transport.d.ts.map +1 -0
- package/dist/core/sync/v2-ingest.d.ts +10 -0
- package/dist/core/sync/v2-ingest.d.ts.map +1 -0
- package/dist/core/sync/v2-maintenance.d.ts +10 -0
- package/dist/core/sync/v2-maintenance.d.ts.map +1 -0
- package/dist/db-worker.js +212 -160
- package/dist/edge-worker.js +4952 -186
- package/dist/index.js +9243 -6455
- package/dist/index.js.map +67 -47
- package/dist/metahub-sdk.js +5 -5
- package/dist/mh-runtime.js +2 -2
- package/dist/shared/views/date.d.ts +21 -0
- package/dist/shared/views/date.d.ts.map +1 -0
- package/dist/shared/views/model.d.ts +65 -0
- package/dist/shared/views/model.d.ts.map +1 -0
- package/dist/shared/views/query.d.ts +47 -0
- package/dist/shared/views/query.d.ts.map +1 -0
- package/dist/sw.js +9 -9
- package/dist/webui/server/routes.d.ts.map +1 -1
- package/dist/webui.js +131 -131
- package/package.json +1 -1
|
@@ -63,21 +63,38 @@ export interface StoragePutOpts {
|
|
|
63
63
|
/** The minimal object-store surface storage-sync needs. Implemented per runtime:
|
|
64
64
|
* Bun.S3Client on the CLI/desktop (storage-s3-bun.ts), aws4fetch SigV4 + fetch
|
|
65
65
|
* in the browser worker (webui/data/storage-s3-browser.ts). */
|
|
66
|
+
export interface StorageReadResult {
|
|
67
|
+
bytes: Uint8Array;
|
|
68
|
+
serverDate: number | null;
|
|
69
|
+
lastModified: number | null;
|
|
70
|
+
etag: string | null;
|
|
71
|
+
}
|
|
66
72
|
export interface StorageClient {
|
|
73
|
+
/** Verified provider preconditions; absence means destructive GC unsupported. */
|
|
74
|
+
conditionalCreateCapability?(): Promise<boolean>;
|
|
75
|
+
/** Metadata is from the same response as bytes, never a separate HEAD. */
|
|
76
|
+
getWithMetadata?(key: string, options: {
|
|
77
|
+
maxBytes: number;
|
|
78
|
+
}): Promise<StorageReadResult | null>;
|
|
67
79
|
/** Keys under `prefix`, ascending, optionally only those strictly after
|
|
68
80
|
* `startAfter`. With `delimiter` ("/"), collapse one level into common
|
|
69
81
|
* prefixes (their keys end in the delimiter) to discover child "folders"
|
|
70
82
|
* cheaply — callers must tolerate a backend that ignores it and returns full
|
|
71
83
|
* keys instead. */
|
|
72
84
|
list(prefix: string, startAfter?: string, delimiter?: string): Promise<StorageObject[]>;
|
|
73
|
-
get(key: string
|
|
85
|
+
get(key: string, options?: {
|
|
86
|
+
maxBytes?: number;
|
|
87
|
+
}): Promise<Uint8Array | null>;
|
|
74
88
|
put(key: string, body: Uint8Array, opts?: StoragePutOpts): Promise<void>;
|
|
75
89
|
del(key: string): Promise<void>;
|
|
76
90
|
}
|
|
77
|
-
|
|
91
|
+
export interface StorageClientOptions {
|
|
92
|
+
signal?: AbortSignal;
|
|
93
|
+
}
|
|
94
|
+
type StorageClientFactory = (config: S3Config, options?: StorageClientOptions) => StorageClient;
|
|
78
95
|
/** Register this runtime's S3 client builder (see the per-runtime impls). */
|
|
79
96
|
export declare function setStorageClientFactory(f: StorageClientFactory): void;
|
|
80
|
-
export declare function storageClientFor(config: S3Config): StorageClient;
|
|
97
|
+
export declare function storageClientFor(config: S3Config, options?: StorageClientOptions): StorageClient;
|
|
81
98
|
/** Open a bucket's CORS for browser origins (PutBucketCors). Same runtime-adapter
|
|
82
99
|
* shape as the client factory, but unlike list/get/put/del this one has NO
|
|
83
100
|
* browser implementation and never will: PutBucketCors needs a Content-MD5 that
|
|
@@ -98,9 +115,25 @@ export declare function storageBasePrefix(prefix: string): string;
|
|
|
98
115
|
* P-256 private keys live next to keys/main.json, bucket-authoritative so any
|
|
99
116
|
* elected device can decrypt inbox envelopes. */
|
|
100
117
|
export declare function dropKeysObjectKey(prefix: string): string;
|
|
118
|
+
/** Runtime adapter for gzip; the wire format stays JSONL → gzip → AES-GCM. */
|
|
119
|
+
export interface StorageCompressionCodec {
|
|
120
|
+
gzip(bytes: Uint8Array): Promise<Uint8Array>;
|
|
121
|
+
gunzip(bytes: Uint8Array, maxBytes?: number): Promise<Uint8Array>;
|
|
122
|
+
}
|
|
123
|
+
/** Native runtimes install a codec before syncing; null restores web streams. */
|
|
124
|
+
export declare function setStorageCompressionCodec(codec: StorageCompressionCodec | null): void;
|
|
125
|
+
declare function gzip(bytes: Uint8Array): Promise<Uint8Array>;
|
|
126
|
+
declare function gunzip(bytes: Uint8Array, maxBytes?: number): Promise<Uint8Array>;
|
|
127
|
+
export { gzip as gzipStorageBytes, gunzip as gunzipStorageBytes };
|
|
101
128
|
/** Upload a blob's bytes to the bucket (idempotent via If-None-Match). Returns
|
|
102
129
|
* true when actually written, false when the object already existed. */
|
|
103
|
-
export
|
|
130
|
+
export interface BucketBlobOptions {
|
|
131
|
+
db?: DbDriver;
|
|
132
|
+
signal?: AbortSignal;
|
|
133
|
+
/** Limit plaintext attachment size; encryption overhead is accounted separately. */
|
|
134
|
+
maxBytes?: number;
|
|
135
|
+
}
|
|
136
|
+
export declare function putBucketBlob(config: S3Config, hash: string, bytes: Uint8Array, options?: BucketBlobOptions): Promise<boolean>;
|
|
104
137
|
/** Every blob hash the bucket durably holds — one paginated LIST of the `blobs/`
|
|
105
138
|
* namespace (the client loops continuation tokens internally). Used by the
|
|
106
139
|
* on-demand clear-presence verify; keeps the `<base>/blobs/<hash>` key layout
|
|
@@ -108,7 +141,7 @@ export declare function putBucketBlob(config: S3Config, hash: string, bytes: Uin
|
|
|
108
141
|
* anchor as unverified). */
|
|
109
142
|
export declare function listBucketBlobHashes(config: S3Config): Promise<Set<string>>;
|
|
110
143
|
/** Fetch a blob's bytes from the bucket, or null if absent. */
|
|
111
|
-
export declare function getBucketBlob(config: S3Config, hash: string): Promise<Uint8Array | null>;
|
|
144
|
+
export declare function getBucketBlob(config: S3Config, hash: string, options?: BucketBlobOptions): Promise<Uint8Array | null>;
|
|
112
145
|
/** Discover the node prefixes under oplog/. Asks for a delimited (one-level)
|
|
113
146
|
* listing so a backend that honors it returns just the "<node>/" folders
|
|
114
147
|
* instead of every segment; nodesFromKeys derives the same node set whether the
|
|
@@ -169,6 +202,15 @@ export declare function publishSnapshot(db: DbDriver, client: StorageClient, con
|
|
|
169
202
|
changes: number;
|
|
170
203
|
} | null>;
|
|
171
204
|
export interface StorageSyncOpts {
|
|
205
|
+
signal?: AbortSignal;
|
|
206
|
+
/** Limit own ops uploaded per round. Desktop callers retain the full-push default. */
|
|
207
|
+
pushLimit?: number;
|
|
208
|
+
/** Yield between these bounded synchronous ingest transactions. */
|
|
209
|
+
ingestBatchSize?: number;
|
|
210
|
+
/** Bound snapshot/segment downloads per round; omitted keeps desktop full pulls. */
|
|
211
|
+
pullObjectLimit?: number;
|
|
212
|
+
/** Notify a local owner after each committed ingestion chunk. */
|
|
213
|
+
onIngest?: () => void;
|
|
172
214
|
/** Publisher-only: publish a snapshot + truncate once this node's own segment
|
|
173
215
|
* count reaches this. Default 200 — high enough that typical use rarely hits
|
|
174
216
|
* it, low enough to keep the bucket bounded under heavy publisher use. */
|
|
@@ -229,5 +271,4 @@ export interface StorageSyncOpts {
|
|
|
229
271
|
* { pushed, pulled } like syncWithPeer so peers.ts status writeback is shared.
|
|
230
272
|
*/
|
|
231
273
|
export declare function syncWithStorage(db: DbDriver, peerUrl: string, client: StorageClient, config: S3Config, opts?: StorageSyncOpts): Promise<SyncResult>;
|
|
232
|
-
export {};
|
|
233
274
|
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/core/sync/storage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/core/sync/storage.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAM7C,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAQL,KAAK,WAAW,EACjB,MAAM,WAAW,CAAC;AAQnB,mFAAmF;AACnF,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,oEAAoE;IACpE,OAAO,EAAE,OAAO,CAAC;IACjB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;sEAEkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;oEAEoE;AACpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,QAAQ,GA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AS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;+EAU2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;wEAIoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;8FAC0F;IAC1F,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;yEACqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAwBD;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,EAAE,EAAE,QAAQ,EACZ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,QAAQ,EAChB,IAAI,GAAE,eAAoB,GACzB,OAAO,CAAC,UAAU,CAAC,CA+LrB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Bound the complete operation, including response decoding, on runtimes that
|
|
2
|
+
* do not provide AbortSignal.timeout/any (React Native included). */
|
|
3
|
+
export declare function withSyncBudget<T>(operation: (signal: AbortSignal) => Promise<T>, timeoutMs?: number, signal?: AbortSignal): Promise<T>;
|
|
4
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../src/core/sync/transport.ts"],"names":[],"mappings":"AAAA;qEACqE;AACrE,wBAAsB,cAAc,CAAC,CAAC,EACpC,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,EAC9C,SAAS,SAAS,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,CAAC,CAAC,CAsBZ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DbDriver } from "../driver.ts";
|
|
2
|
+
import type { BucketBatch } from "./bucket-v2.ts";
|
|
3
|
+
/** Preserve divergent same-register edits before LWW materialization. A deleted
|
|
4
|
+
* block is terminal; its late text is recoverable but cannot refill current state. */
|
|
5
|
+
export declare function ingestV2Batch(db: DbDriver, batch: BucketBatch): {
|
|
6
|
+
received: number;
|
|
7
|
+
skewed: Record<string, number>;
|
|
8
|
+
poisoned: number;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=v2-ingest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2-ingest.d.ts","sourceRoot":"","sources":["../../../src/core/sync/v2-ingest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;sFACsF;AACtF,wBAAgB,aAAa,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW;;;;EAgF7D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RetentionReport } from "./retention-executor.ts";
|
|
2
|
+
import type { DbDriver } from "../driver.ts";
|
|
3
|
+
import type { StorageClient, S3Config } from "./storage.ts";
|
|
4
|
+
/** Durable daily scheduling; bucket time authorizes age, local time never does.
|
|
5
|
+
* Enabling requires a separately recorded review; default remains dry-run. */
|
|
6
|
+
export declare function maintainV2Workspace(db: DbDriver, client: StorageClient, config: S3Config): Promise<void>;
|
|
7
|
+
/** Call only after the displayed report has been explicitly reviewed. Approval
|
|
8
|
+
* is workspace-scoped so the next checkpoint can perform delayed cleanup. */
|
|
9
|
+
export declare function approveRetentionReport(db: DbDriver, report: RetentionReport): void;
|
|
10
|
+
//# sourceMappingURL=v2-maintenance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2-maintenance.d.ts","sourceRoot":"","sources":["../../../src/core/sync/v2-maintenance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAK5D;8EAC8E;AAC9E,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,iBAqB9F;AAED;6EAC6E;AAC7E,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,CAOlF"}
|