mindoodb 0.0.56 → 0.0.58
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-server.md +25 -1
- package/README.md +1 -0
- package/dist/browser/index.mjs +1 -0
- package/dist/core/appendonlystores/network/IrohNetworkTransport.d.ts +93 -0
- package/dist/core/appendonlystores/network/IrohNetworkTransport.d.ts.map +1 -0
- package/dist/core/appendonlystores/network/IrohNetworkTransport.js +260 -0
- package/dist/core/appendonlystores/network/IrohNetworkTransport.js.map +1 -0
- package/dist/core/appendonlystores/network/IrohStreamIO.d.ts +121 -0
- package/dist/core/appendonlystores/network/IrohStreamIO.d.ts.map +1 -0
- package/dist/core/appendonlystores/network/IrohStreamIO.js +213 -0
- package/dist/core/appendonlystores/network/IrohStreamIO.js.map +1 -0
- package/dist/core/appendonlystores/network/irohLocator.d.ts +28 -0
- package/dist/core/appendonlystores/network/irohLocator.d.ts.map +1 -0
- package/dist/core/appendonlystores/network/irohLocator.js +94 -0
- package/dist/core/appendonlystores/network/irohLocator.js.map +1 -0
- package/dist/core/appendonlystores/network/reactNativeIrohStreamIO.d.ts +7 -0
- package/dist/core/appendonlystores/network/reactNativeIrohStreamIO.d.ts.map +1 -0
- package/dist/core/appendonlystores/network/reactNativeIrohStreamIO.js +44 -0
- package/dist/core/appendonlystores/network/reactNativeIrohStreamIO.js.map +1 -0
- package/dist/core/appendonlystores/sqlite/SqliteContentAddressedStore.d.ts +60 -0
- package/dist/core/appendonlystores/sqlite/SqliteContentAddressedStore.d.ts.map +1 -0
- package/dist/core/appendonlystores/sqlite/SqliteContentAddressedStore.js +349 -0
- package/dist/core/appendonlystores/sqlite/SqliteContentAddressedStore.js.map +1 -0
- package/dist/core/appendonlystores/sqlite/SqliteDriver.d.ts +51 -0
- package/dist/core/appendonlystores/sqlite/SqliteDriver.d.ts.map +1 -0
- package/dist/core/appendonlystores/sqlite/SqliteDriver.js +290 -0
- package/dist/core/appendonlystores/sqlite/SqliteDriver.js.map +1 -0
- package/dist/core/appendonlystores/sqlite/expoSqliteDriver.d.ts +13 -0
- package/dist/core/appendonlystores/sqlite/expoSqliteDriver.d.ts.map +1 -0
- package/dist/core/appendonlystores/sqlite/expoSqliteDriver.js +26 -0
- package/dist/core/appendonlystores/sqlite/expoSqliteDriver.js.map +1 -0
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +4 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/indexing/summary/extractSummaryFields.d.ts +19 -0
- package/dist/core/indexing/summary/extractSummaryFields.d.ts.map +1 -1
- package/dist/core/indexing/summary/extractSummaryFields.js +43 -2
- package/dist/core/indexing/summary/extractSummaryFields.js.map +1 -1
- package/dist/core/indexing/summary/index.d.ts +1 -1
- package/dist/core/indexing/summary/index.d.ts.map +1 -1
- package/dist/core/indexing/summary/index.js.map +1 -1
- package/dist/core/indexing/summary/types.d.ts +18 -0
- package/dist/core/indexing/summary/types.d.ts.map +1 -1
- package/dist/core/indexing/summary/types.js +10 -0
- package/dist/core/indexing/summary/types.js.map +1 -1
- package/dist/iroh/index.d.ts +8 -0
- package/dist/iroh/index.d.ts.map +1 -0
- package/dist/iroh/index.js +25 -0
- package/dist/iroh/index.js.map +1 -0
- package/dist/node/server/IrohServerEndpoint.d.ts +23 -0
- package/dist/node/server/IrohServerEndpoint.d.ts.map +1 -0
- package/dist/node/server/IrohServerEndpoint.js +156 -0
- package/dist/node/server/IrohServerEndpoint.js.map +1 -0
- package/dist/node/server/IrohServerRpc.d.ts +52 -0
- package/dist/node/server/IrohServerRpc.d.ts.map +1 -0
- package/dist/node/server/IrohServerRpc.js +120 -0
- package/dist/node/server/IrohServerRpc.js.map +1 -0
- package/dist/node/server/MindooDBServer.d.ts +3 -0
- package/dist/node/server/MindooDBServer.d.ts.map +1 -1
- package/dist/node/server/MindooDBServer.js +34 -0
- package/dist/node/server/MindooDBServer.js.map +1 -1
- package/dist/node/server/config.d.ts.map +1 -1
- package/dist/node/server/config.js +28 -0
- package/dist/node/server/config.js.map +1 -1
- package/dist/node/server/serverinit.js +2 -0
- package/dist/node/server/serverinit.js.map +1 -1
- package/dist/node/server/types.d.ts +16 -0
- package/dist/node/server/types.d.ts.map +1 -1
- package/dist/node/server/types.js +6 -1
- package/dist/node/server/types.js.map +1 -1
- package/dist/reactnative/index.d.ts +5 -0
- package/dist/reactnative/index.d.ts.map +1 -1
- package/dist/reactnative/index.js +20 -1
- package/dist/reactnative/index.js.map +1 -1
- package/dist/sqlite/index.d.ts +7 -0
- package/dist/sqlite/index.d.ts.map +1 -0
- package/dist/sqlite/index.js +16 -0
- package/dist/sqlite/index.js.map +1 -0
- package/package.json +14 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { DocumentSummaryStore } from "./DocumentSummaryStore";
|
|
2
2
|
export { SummaryVirtualViewDataProvider, type SummaryVirtualViewDataProviderOptions, } from "./SummaryVirtualViewDataProvider";
|
|
3
3
|
export { resolveSummaryConfig, computeSummaryConfigFingerprint, sanitizeSummaryConfig, DEFAULT_SUMMARY_MAX_VALUE_BYTES, DB_SETUP_DOC_ID, SUMMARY_SETUP_FIELD, type SummaryConfig, type ResolvedSummaryConfig, type DocumentSummaryEntry, type SummaryCoverage, } from "./types";
|
|
4
|
-
export { extractSummaryFields, getSummaryFieldValue, isFieldPathCovered, resolveFieldPath, estimateValueSize, buildSummaryEvaluationDoc, ATTACHMENTS_FIELD, type SummaryAttachmentInfo, } from "./extractSummaryFields";
|
|
4
|
+
export { extractSummaryFields, getSummaryFieldValue, isFieldPathCovered, resolveFieldPath, estimateValueSize, buildSummaryEvaluationDoc, ATTACHMENTS_FIELD, type SummaryAttachmentInfo, type SummaryRecipientInfo, } from "./extractSummaryFields";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/indexing/summary/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,8BAA8B,EAC9B,KAAK,qCAAqC,GAC3C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAC/B,qBAAqB,EACrB,+BAA+B,EAC/B,eAAe,EACf,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,eAAe,GACrB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,yBAAyB,EACzB,iBAAiB,EACjB,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/indexing/summary/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,8BAA8B,EAC9B,KAAK,qCAAqC,GAC3C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAC/B,qBAAqB,EACrB,+BAA+B,EAC/B,eAAe,EACf,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,eAAe,GACrB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,yBAAyB,EACzB,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/indexing/summary/index.ts"],"names":[],"mappings":";;;AAAA,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,mFAG0C;AAFxC,gJAAA,8BAA8B,OAAA;AAGhC,iCAWiB;AAVf,6GAAA,oBAAoB,OAAA;AACpB,wHAAA,+BAA+B,OAAA;AAC/B,8GAAA,qBAAqB,OAAA;AACrB,wHAAA,+BAA+B,OAAA;AAC/B,wGAAA,eAAe,OAAA;AACf,4GAAA,mBAAmB,OAAA;AAMrB,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/indexing/summary/index.ts"],"names":[],"mappings":";;;AAAA,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,mFAG0C;AAFxC,gJAAA,8BAA8B,OAAA;AAGhC,iCAWiB;AAVf,6GAAA,oBAAoB,OAAA;AACpB,wHAAA,+BAA+B,OAAA;AAC/B,8GAAA,qBAAqB,OAAA;AACrB,wHAAA,+BAA+B,OAAA;AAC/B,wGAAA,eAAe,OAAA;AACf,4GAAA,mBAAmB,OAAA;AAMrB,+DAUgC;AAT9B,4HAAA,oBAAoB,OAAA;AACpB,4HAAA,oBAAoB,OAAA;AACpB,0HAAA,kBAAkB,OAAA;AAClB,wHAAA,gBAAgB,OAAA;AAChB,yHAAA,iBAAiB,OAAA;AACjB,iIAAA,yBAAyB,OAAA;AACzB,yHAAA,iBAAiB,OAAA"}
|
|
@@ -57,6 +57,18 @@ export interface SummaryConfig {
|
|
|
57
57
|
* are deliberately not copied.
|
|
58
58
|
*/
|
|
59
59
|
includeAttachments?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* When `true` (default), a slim projection of the document's `_encryptFor`
|
|
62
|
+
* map (`kind`, `label`, `addedAt`, `removedAt` per recipient) is stored in
|
|
63
|
+
* the summary, so documents created with per-document sealed keys can be
|
|
64
|
+
* filtered and categorized by recipient without materializing them. The
|
|
65
|
+
* adding/removing users' full signing keys (`addedBy`, `removedBy`) and the
|
|
66
|
+
* internal `keyFingerprint` are deliberately not copied.
|
|
67
|
+
*
|
|
68
|
+
* Only sealed documents carry the field, so enabling this costs nothing for
|
|
69
|
+
* databases that do not use per-document recipients.
|
|
70
|
+
*/
|
|
71
|
+
includeRecipients?: boolean;
|
|
60
72
|
}
|
|
61
73
|
/** {@link SummaryConfig} with all defaults applied. */
|
|
62
74
|
export interface ResolvedSummaryConfig {
|
|
@@ -65,6 +77,7 @@ export interface ResolvedSummaryConfig {
|
|
|
65
77
|
include: string[];
|
|
66
78
|
exclude: string[];
|
|
67
79
|
includeAttachments: boolean;
|
|
80
|
+
includeRecipients: boolean;
|
|
68
81
|
}
|
|
69
82
|
export declare const DEFAULT_SUMMARY_MAX_VALUE_BYTES = 1024;
|
|
70
83
|
export declare function resolveSummaryConfig(config?: SummaryConfig): ResolvedSummaryConfig;
|
|
@@ -81,6 +94,11 @@ export declare function sanitizeSummaryConfig(value: unknown): SummaryConfig | u
|
|
|
81
94
|
* Deterministic fingerprint of a summary configuration. Persisted alongside
|
|
82
95
|
* the summary cache; a mismatch on restore (or a config change at runtime)
|
|
83
96
|
* marks the summary as `"rebuilding"` and triggers a backfill.
|
|
97
|
+
*
|
|
98
|
+
* Every field the extraction depends on must appear here. Adding one
|
|
99
|
+
* invalidates persisted caches written by older versions — which is the
|
|
100
|
+
* point: entries extracted before the field existed do not carry it, so
|
|
101
|
+
* serving them while reporting the field as covered would be a coverage lie.
|
|
84
102
|
*/
|
|
85
103
|
export declare function computeSummaryConfigFingerprint(config: ResolvedSummaryConfig): string;
|
|
86
104
|
/** One document's entry in the summary buffer. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/core/indexing/summary/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,WAA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,GAAG,qBAAqB,CASlF;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CA+B/E;AAED;;;;;;;;;GASG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CASrF;AAED,kDAAkD;AAClD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,YAAY,CAAC;AAEpD,wDAAwD;AACxD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,oBAAoB,EAAE,CAAC;CACjC;AAED,iEAAiE;AACjE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACpC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,oBAAoB,GAAG,IAAI,CAAC;CAC7C"}
|
|
@@ -26,6 +26,7 @@ function resolveSummaryConfig(config) {
|
|
|
26
26
|
include: [...(config?.include ?? [])],
|
|
27
27
|
exclude: [...(config?.exclude ?? [])],
|
|
28
28
|
includeAttachments: config?.includeAttachments ?? true,
|
|
29
|
+
includeRecipients: config?.includeRecipients ?? true,
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
@@ -62,12 +63,20 @@ function sanitizeSummaryConfig(value) {
|
|
|
62
63
|
if (typeof raw.includeAttachments === "boolean") {
|
|
63
64
|
config.includeAttachments = raw.includeAttachments;
|
|
64
65
|
}
|
|
66
|
+
if (typeof raw.includeRecipients === "boolean") {
|
|
67
|
+
config.includeRecipients = raw.includeRecipients;
|
|
68
|
+
}
|
|
65
69
|
return config;
|
|
66
70
|
}
|
|
67
71
|
/**
|
|
68
72
|
* Deterministic fingerprint of a summary configuration. Persisted alongside
|
|
69
73
|
* the summary cache; a mismatch on restore (or a config change at runtime)
|
|
70
74
|
* marks the summary as `"rebuilding"` and triggers a backfill.
|
|
75
|
+
*
|
|
76
|
+
* Every field the extraction depends on must appear here. Adding one
|
|
77
|
+
* invalidates persisted caches written by older versions — which is the
|
|
78
|
+
* point: entries extracted before the field existed do not carry it, so
|
|
79
|
+
* serving them while reporting the field as covered would be a coverage lie.
|
|
71
80
|
*/
|
|
72
81
|
function computeSummaryConfigFingerprint(config) {
|
|
73
82
|
return JSON.stringify({
|
|
@@ -76,6 +85,7 @@ function computeSummaryConfigFingerprint(config) {
|
|
|
76
85
|
include: [...config.include].sort(),
|
|
77
86
|
exclude: [...config.exclude].sort(),
|
|
78
87
|
includeAttachments: config.includeAttachments,
|
|
88
|
+
includeRecipients: config.includeRecipients,
|
|
79
89
|
});
|
|
80
90
|
}
|
|
81
91
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/core/indexing/summary/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/core/indexing/summary/types.ts"],"names":[],"mappings":";;;AA6FA,oDASC;AAUD,sDA+BC;AAYD,0EASC;AAlKD;;;;;;GAMG;AACU,QAAA,eAAe,GAAG,SAAS,CAAC;AAEzC;;;;GAIG;AACU,QAAA,mBAAmB,GAAG,cAAc,CAAC;AA2ErC,QAAA,+BAA+B,GAAG,IAAI,CAAC;AAEpD,SAAgB,oBAAoB,CAAC,MAAsB;IACzD,OAAO;QACL,WAAW,EAAE,MAAM,EAAE,WAAW,IAAI,IAAI;QACxC,aAAa,E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CAAC,CAAC;IACxC,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IACD,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACxC,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IACD,IAAI,OAAO,GAAG,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;QAChD,MAAM,CAAC,kBAAkB,GAAG,GAAG,CAAC,kBAAkB,CAAC;IACrD,CAAC;IACD,IAAI,OAAO,GAAG,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QAC/C,MAAM,CAAC,iBAAiB,GAAG,GAAG,CAAC,iBAAiB,CAAC;IACnD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,+BAA+B,CAAC,MAA6B;IAC3E,OAAO,IAAI,CAAC,SAAS,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,OAAO,EAAE,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE;QACnC,OAAO,EAAE,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE;QACnC,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;QAC7C,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;KAC5C,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Additive Iroh transport. Not imported by `mindoodb/browser`.
|
|
3
|
+
*/
|
|
4
|
+
export { MINDOODB_IROH_ALPN, createLoopbackIrohPair, decodeIrohFrame, encodeIrohFrame, wrapLengthPrefixedByteStream, type IrohByteStream, type IrohRpcContext, type IrohRpcRequest, type IrohRpcResponse, type IrohStreamIO, } from "../core/appendonlystores/network/IrohStreamIO";
|
|
5
|
+
export { IrohNetworkTransport, IrohPeerStore, createStoreIrohHandler, listenForIrohPeers, serveIrohRpc, type IrohRpcHandler, } from "../core/appendonlystores/network/IrohNetworkTransport";
|
|
6
|
+
export { createReactNativeIrohStreamIO } from "../core/appendonlystores/network/reactNativeIrohStreamIO";
|
|
7
|
+
export { extractEndpointIdFromTicket, isIrohLocator, parseIrohLocator, type ParsedIrohLocator, } from "../core/appendonlystores/network/irohLocator";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/iroh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,4BAA4B,EAC5B,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,GAClB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,kBAAkB,EAClB,YAAY,EACZ,KAAK,cAAc,GACpB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,0DAA0D,CAAC;AACzG,OAAO,EACL,2BAA2B,EAC3B,aAAa,EACb,gBAAgB,EAChB,KAAK,iBAAiB,GACvB,MAAM,8CAA8C,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseIrohLocator = exports.isIrohLocator = exports.extractEndpointIdFromTicket = exports.createReactNativeIrohStreamIO = exports.serveIrohRpc = exports.listenForIrohPeers = exports.createStoreIrohHandler = exports.IrohPeerStore = exports.IrohNetworkTransport = exports.wrapLengthPrefixedByteStream = exports.encodeIrohFrame = exports.decodeIrohFrame = exports.createLoopbackIrohPair = exports.MINDOODB_IROH_ALPN = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Additive Iroh transport. Not imported by `mindoodb/browser`.
|
|
6
|
+
*/
|
|
7
|
+
var IrohStreamIO_1 = require("../core/appendonlystores/network/IrohStreamIO");
|
|
8
|
+
Object.defineProperty(exports, "MINDOODB_IROH_ALPN", { enumerable: true, get: function () { return IrohStreamIO_1.MINDOODB_IROH_ALPN; } });
|
|
9
|
+
Object.defineProperty(exports, "createLoopbackIrohPair", { enumerable: true, get: function () { return IrohStreamIO_1.createLoopbackIrohPair; } });
|
|
10
|
+
Object.defineProperty(exports, "decodeIrohFrame", { enumerable: true, get: function () { return IrohStreamIO_1.decodeIrohFrame; } });
|
|
11
|
+
Object.defineProperty(exports, "encodeIrohFrame", { enumerable: true, get: function () { return IrohStreamIO_1.encodeIrohFrame; } });
|
|
12
|
+
Object.defineProperty(exports, "wrapLengthPrefixedByteStream", { enumerable: true, get: function () { return IrohStreamIO_1.wrapLengthPrefixedByteStream; } });
|
|
13
|
+
var IrohNetworkTransport_1 = require("../core/appendonlystores/network/IrohNetworkTransport");
|
|
14
|
+
Object.defineProperty(exports, "IrohNetworkTransport", { enumerable: true, get: function () { return IrohNetworkTransport_1.IrohNetworkTransport; } });
|
|
15
|
+
Object.defineProperty(exports, "IrohPeerStore", { enumerable: true, get: function () { return IrohNetworkTransport_1.IrohPeerStore; } });
|
|
16
|
+
Object.defineProperty(exports, "createStoreIrohHandler", { enumerable: true, get: function () { return IrohNetworkTransport_1.createStoreIrohHandler; } });
|
|
17
|
+
Object.defineProperty(exports, "listenForIrohPeers", { enumerable: true, get: function () { return IrohNetworkTransport_1.listenForIrohPeers; } });
|
|
18
|
+
Object.defineProperty(exports, "serveIrohRpc", { enumerable: true, get: function () { return IrohNetworkTransport_1.serveIrohRpc; } });
|
|
19
|
+
var reactNativeIrohStreamIO_1 = require("../core/appendonlystores/network/reactNativeIrohStreamIO");
|
|
20
|
+
Object.defineProperty(exports, "createReactNativeIrohStreamIO", { enumerable: true, get: function () { return reactNativeIrohStreamIO_1.createReactNativeIrohStreamIO; } });
|
|
21
|
+
var irohLocator_1 = require("../core/appendonlystores/network/irohLocator");
|
|
22
|
+
Object.defineProperty(exports, "extractEndpointIdFromTicket", { enumerable: true, get: function () { return irohLocator_1.extractEndpointIdFromTicket; } });
|
|
23
|
+
Object.defineProperty(exports, "isIrohLocator", { enumerable: true, get: function () { return irohLocator_1.isIrohLocator; } });
|
|
24
|
+
Object.defineProperty(exports, "parseIrohLocator", { enumerable: true, get: function () { return irohLocator_1.parseIrohLocator; } });
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/iroh/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,8EAWuD;AAVrD,kHAAA,kBAAkB,OAAA;AAClB,sHAAA,sBAAsB,OAAA;AACtB,+GAAA,eAAe,OAAA;AACf,+GAAA,eAAe,OAAA;AACf,4HAAA,4BAA4B,OAAA;AAO9B,8FAO+D;AAN7D,4HAAA,oBAAoB,OAAA;AACpB,qHAAA,aAAa,OAAA;AACb,8HAAA,sBAAsB,OAAA;AACtB,0HAAA,kBAAkB,OAAA;AAClB,oHAAA,YAAY,OAAA;AAGd,oGAAyG;AAAhG,wIAAA,6BAA6B,OAAA;AACtC,4EAKsD;AAJpD,0HAAA,2BAA2B,OAAA;AAC3B,4GAAA,aAAa,OAAA;AACb,+GAAA,gBAAgB,OAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type IrohRpcHandler } from "../../core/appendonlystores/network/IrohNetworkTransport";
|
|
2
|
+
import type { ServerIrohConfig } from "./types";
|
|
3
|
+
export interface IrohServerEndpointStatus {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
ticket?: string;
|
|
6
|
+
endpointId?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Optional native Iroh listen loop. `@number0/iroh` is loaded dynamically so
|
|
10
|
+
* tests and HTTP-only installs do not need the N-API binary.
|
|
11
|
+
*/
|
|
12
|
+
export declare class IrohServerEndpoint {
|
|
13
|
+
private stop;
|
|
14
|
+
private status;
|
|
15
|
+
getStatus(): IrohServerEndpointStatus;
|
|
16
|
+
start(options: {
|
|
17
|
+
dataDir: string;
|
|
18
|
+
config: ServerIrohConfig;
|
|
19
|
+
handler: IrohRpcHandler;
|
|
20
|
+
}): Promise<IrohServerEndpointStatus>;
|
|
21
|
+
stopListening(): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=IrohServerEndpoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrohServerEndpoint.d.ts","sourceRoot":"","sources":["../../../src/node/server/IrohServerEndpoint.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,0DAA0D,CAAC;AAOlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAQD;;;GAGG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,IAAI,CAAsC;IAClD,OAAO,CAAC,MAAM,CAAgD;IAE9D,SAAS,IAAI,wBAAwB;IAI/B,KAAK,CAAC,OAAO,EAAE;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,gBAAgB,CAAC;QACzB,OAAO,EAAE,cAAc,CAAC;KACzB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IA6B/B,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;CAUrC"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IrohServerEndpoint = void 0;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const crypto_1 = require("crypto");
|
|
7
|
+
const IrohNetworkTransport_1 = require("../../core/appendonlystores/network/IrohNetworkTransport");
|
|
8
|
+
const IrohStreamIO_1 = require("../../core/appendonlystores/network/IrohStreamIO");
|
|
9
|
+
/**
|
|
10
|
+
* Optional native Iroh listen loop. `@number0/iroh` is loaded dynamically so
|
|
11
|
+
* tests and HTTP-only installs do not need the N-API binary.
|
|
12
|
+
*/
|
|
13
|
+
class IrohServerEndpoint {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.stop = null;
|
|
16
|
+
this.status = { enabled: false };
|
|
17
|
+
}
|
|
18
|
+
getStatus() {
|
|
19
|
+
return this.status;
|
|
20
|
+
}
|
|
21
|
+
async start(options) {
|
|
22
|
+
await this.stopListening();
|
|
23
|
+
if (!options.config.enabled) {
|
|
24
|
+
this.status = { enabled: false };
|
|
25
|
+
return this.status;
|
|
26
|
+
}
|
|
27
|
+
const io = await createNativeIrohStreamIO(options.dataDir, options.config);
|
|
28
|
+
const abort = new AbortController();
|
|
29
|
+
const listen = (0, IrohNetworkTransport_1.listenForIrohPeers)(io, options.handler, { signal: abort.signal });
|
|
30
|
+
this.stop = async () => {
|
|
31
|
+
abort.abort();
|
|
32
|
+
await io.close?.();
|
|
33
|
+
};
|
|
34
|
+
void listen.catch((error) => {
|
|
35
|
+
console.error("[Iroh] listen loop failed:", error);
|
|
36
|
+
});
|
|
37
|
+
const ticket = await io.getLocalTicket();
|
|
38
|
+
this.status = {
|
|
39
|
+
enabled: true,
|
|
40
|
+
ticket,
|
|
41
|
+
endpointId: io.endpointId,
|
|
42
|
+
};
|
|
43
|
+
console.log(`[Iroh] Listening on ALPN ${IrohStreamIO_1.MINDOODB_IROH_ALPN}`);
|
|
44
|
+
console.log(`[Iroh] Endpoint id: ${this.status.endpointId ?? "(unknown)"}`);
|
|
45
|
+
console.log(`[Iroh] Ticket: ${ticket}`);
|
|
46
|
+
return this.status;
|
|
47
|
+
}
|
|
48
|
+
async stopListening() {
|
|
49
|
+
if (this.stop) {
|
|
50
|
+
const stop = this.stop;
|
|
51
|
+
this.stop = null;
|
|
52
|
+
await stop().catch((error) => {
|
|
53
|
+
console.error("[Iroh] stop failed:", error);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
this.status = { enabled: false };
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.IrohServerEndpoint = IrohServerEndpoint;
|
|
60
|
+
async function createNativeIrohStreamIO(dataDir, config) {
|
|
61
|
+
let iroh;
|
|
62
|
+
try {
|
|
63
|
+
iroh = await import("@number0/iroh");
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
throw new Error("Iroh is enabled in config.json but @number0/iroh is missing from the server image. " +
|
|
67
|
+
"Rebuild with ./serversetup.sh --update " +
|
|
68
|
+
`(${error instanceof Error ? error.message : String(error)}).`);
|
|
69
|
+
}
|
|
70
|
+
const secretBytes = loadOrCreateIrohSecret(dataDir, config.secretKeyPath);
|
|
71
|
+
const alpn = Array.from(Buffer.from(IrohStreamIO_1.MINDOODB_IROH_ALPN));
|
|
72
|
+
const secretKey = createSecretKey(iroh, secretBytes);
|
|
73
|
+
const endpoint = (await iroh.Endpoint.bind({
|
|
74
|
+
alpns: [alpn],
|
|
75
|
+
secretKey,
|
|
76
|
+
}));
|
|
77
|
+
const ticket = iroh.EndpointTicket.fromAddr(endpoint.addr()).toString();
|
|
78
|
+
const endpointId = endpoint.id().toString();
|
|
79
|
+
return {
|
|
80
|
+
endpointId,
|
|
81
|
+
async getLocalTicket() {
|
|
82
|
+
return ticket;
|
|
83
|
+
},
|
|
84
|
+
async connect(peerTicket, protocolAlpn) {
|
|
85
|
+
const addr = iroh.EndpointTicket.fromString(peerTicket).endpointAddr();
|
|
86
|
+
const conn = await endpoint.connect(addr, protocolAlpn ? Array.from(Buffer.from(protocolAlpn)) : alpn);
|
|
87
|
+
const bi = await conn.openBi();
|
|
88
|
+
return wrapNativeBiStream(bi);
|
|
89
|
+
},
|
|
90
|
+
async *listen() {
|
|
91
|
+
const acceptNext = endpoint.acceptNext.bind(endpoint);
|
|
92
|
+
while (true) {
|
|
93
|
+
const incoming = await acceptNext();
|
|
94
|
+
const connecting = await incoming.accept();
|
|
95
|
+
const conn = await connecting.connect();
|
|
96
|
+
const bi = await conn.acceptBi();
|
|
97
|
+
yield wrapNativeBiStream(bi);
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
async close() {
|
|
101
|
+
await endpoint.close();
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function wrapNativeBiStream(bi) {
|
|
106
|
+
return (0, IrohStreamIO_1.wrapLengthPrefixedByteStream)({
|
|
107
|
+
async write(bytes) {
|
|
108
|
+
await bi.send.writeAll(bytes);
|
|
109
|
+
},
|
|
110
|
+
async read(max) {
|
|
111
|
+
if (typeof bi.recv.read === "function") {
|
|
112
|
+
const chunk = await bi.recv.read(max);
|
|
113
|
+
return chunk ? toUint8Array(chunk) : null;
|
|
114
|
+
}
|
|
115
|
+
const chunk = await bi.recv.readToEnd?.(max);
|
|
116
|
+
return chunk ? toUint8Array(chunk) : null;
|
|
117
|
+
},
|
|
118
|
+
async close() {
|
|
119
|
+
await bi.send.finish().catch(() => undefined);
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function toUint8Array(value) {
|
|
124
|
+
return value instanceof Uint8Array ? value : new Uint8Array(value);
|
|
125
|
+
}
|
|
126
|
+
function createSecretKey(iroh, secretBytes) {
|
|
127
|
+
const SecretKey = iroh.SecretKey;
|
|
128
|
+
if (typeof SecretKey?.fromBytes === "function") {
|
|
129
|
+
return SecretKey.fromBytes(secretBytes);
|
|
130
|
+
}
|
|
131
|
+
if (typeof SecretKey?.fromString === "function") {
|
|
132
|
+
return SecretKey.fromString(Buffer.from(secretBytes).toString("hex"));
|
|
133
|
+
}
|
|
134
|
+
throw new Error("@number0/iroh SecretKey.fromBytes is not available");
|
|
135
|
+
}
|
|
136
|
+
function loadOrCreateIrohSecret(dataDir, configuredPath) {
|
|
137
|
+
const filePath = configuredPath
|
|
138
|
+
? (0, path_1.isAbsolute)(configuredPath)
|
|
139
|
+
? configuredPath
|
|
140
|
+
: (0, path_1.join)(dataDir, configuredPath)
|
|
141
|
+
: (0, path_1.join)(dataDir, "iroh-secret.key");
|
|
142
|
+
if ((0, fs_1.existsSync)(filePath)) {
|
|
143
|
+
const raw = (0, fs_1.readFileSync)(filePath, "utf-8").trim();
|
|
144
|
+
const bytes = Buffer.from(raw, raw.length === 64 ? "hex" : "base64");
|
|
145
|
+
if (bytes.length !== 32) {
|
|
146
|
+
throw new Error(`Iroh secret key at ${filePath} must be 32 bytes`);
|
|
147
|
+
}
|
|
148
|
+
return new Uint8Array(bytes);
|
|
149
|
+
}
|
|
150
|
+
const bytes = (0, crypto_1.randomBytes)(32);
|
|
151
|
+
(0, fs_1.mkdirSync)((0, path_1.dirname)(filePath), { recursive: true });
|
|
152
|
+
(0, fs_1.writeFileSync)(filePath, bytes.toString("hex"), { encoding: "utf-8", mode: 0o600 });
|
|
153
|
+
console.log(`[Iroh] Wrote new secret key to ${filePath}`);
|
|
154
|
+
return new Uint8Array(bytes);
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=IrohServerEndpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrohServerEndpoint.js","sourceRoot":"","sources":["../../../src/node/server/IrohServerEndpoint.ts"],"names":[],"mappings":";;;AAAA,2BAAwE;AACxE,+BAAiD;AACjD,mCAAqC;AAErC,mGAGkE;AAClE,mFAK0D;AAe1D;;;GAGG;AACH,MAAa,kBAAkB;IAA/B;QACU,SAAI,GAAiC,IAAI,CAAC;QAC1C,WAAM,GAA6B,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAiDhE,CAAC;IA/CC,SAAS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AAI,EAAE,CAAC,CAAC;IAClD,IAAA,kBAAa,EAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACnF,OAAO,CAAC,GAAG,CAAC,kCAAkC,QAAQ,EAAE,CAAC,CAAC;IAC1D,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { StoreKind } from "../../core/appendonlystores/types";
|
|
2
|
+
import type { IrohRpcHandler } from "../../core/appendonlystores/network/IrohNetworkTransport";
|
|
3
|
+
import type { MindooDBServerInfo } from "../../core/types";
|
|
4
|
+
import { ValidationError } from "./validation";
|
|
5
|
+
export interface IrohServerAuthService {
|
|
6
|
+
generateChallenge(username?: string, options?: {
|
|
7
|
+
signingPublicKey?: string;
|
|
8
|
+
}): Promise<string>;
|
|
9
|
+
authenticate(challenge: string, signature: Uint8Array): Promise<{
|
|
10
|
+
success: boolean;
|
|
11
|
+
token?: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
export interface IrohServerStore {
|
|
16
|
+
handleFindNewEntries(token: string, haveIds: string[]): Promise<unknown>;
|
|
17
|
+
handleFindNewEntriesForDoc(token: string, haveIds: string[], docId: string): Promise<unknown>;
|
|
18
|
+
handleFindEntries(token: string, type: unknown, creationDateFrom: number | null, creationDateUntil: number | null): Promise<unknown>;
|
|
19
|
+
handleScanEntriesSince(token: string, cursor: unknown, limit?: number, filters?: unknown): Promise<unknown>;
|
|
20
|
+
handleGetIdBloomSummary(token: string): Promise<unknown>;
|
|
21
|
+
handleGetStoreHead(token: string): Promise<unknown>;
|
|
22
|
+
handleGetCompactionStatus(token: string): Promise<unknown>;
|
|
23
|
+
handleGetCapabilities(token: string): Promise<unknown>;
|
|
24
|
+
handleGetEntries(token: string, ids: string[]): Promise<unknown>;
|
|
25
|
+
handleGetEntriesSessionWrapped(token: string, ids: string[]): Promise<unknown>;
|
|
26
|
+
handleGetEntryMetadata(token: string, id: string): Promise<unknown>;
|
|
27
|
+
handlePutEntries(token: string, entries: unknown[]): Promise<unknown>;
|
|
28
|
+
handleHasEntries(token: string, ids: string[]): Promise<unknown>;
|
|
29
|
+
handleGetAllIds(token: string): Promise<unknown>;
|
|
30
|
+
handleResolveDependencies(token: string, startId: string, options?: Record<string, unknown>): Promise<unknown>;
|
|
31
|
+
handlePlanDocumentMaterialization(token: string, docId: string, options?: unknown): Promise<unknown>;
|
|
32
|
+
handlePlanDocumentMaterializationBatch(token: string, docIds: string[], options?: unknown): Promise<unknown>;
|
|
33
|
+
handlePlanAttachmentReadByWalkingMetadata(token: string, lastChunkId: string, attachmentSize: number, options: unknown): Promise<unknown>;
|
|
34
|
+
}
|
|
35
|
+
export interface IrohServerRpcHost {
|
|
36
|
+
getServerPublicInfo(): MindooDBServerInfo | null;
|
|
37
|
+
getJsonBodyLimit?: () => {
|
|
38
|
+
limit: string;
|
|
39
|
+
bytes: number | null;
|
|
40
|
+
};
|
|
41
|
+
getClusterRole?: () => string;
|
|
42
|
+
listTenantPublicInfosFingerprints(tenantId: string): Promise<string[]>;
|
|
43
|
+
getAuthService(tenantId: string): Promise<IrohServerAuthService>;
|
|
44
|
+
getServerStore(tenantId: string, dbId: string, storeKind: StoreKind): Promise<IrohServerStore>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Inverse of {@link IrohNetworkTransport}: same method names, same args.
|
|
48
|
+
* Discovery methods are unauthenticated, matching `/.well-known/*`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function createMindooDBServerIrohHandler(host: IrohServerRpcHost): IrohRpcHandler;
|
|
51
|
+
export declare function isIrohValidationError(error: unknown): error is ValidationError;
|
|
52
|
+
//# sourceMappingURL=IrohServerRpc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,yCAAyC,CACvC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,IAAI,kBAAkB,GAAG,IAAI,CAAC;IACjD,gBAAgB,CAAC,EAAE,MAAM;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACjE,cAAc,CAAC,EAAE,MAAM,MAAM,CAAC;IAC9B,iCAAiC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACvE,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACjE,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAChG;AAyBD;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,iBAAiB,GAAG,cAAc,CA4CvF;AAsED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE9E"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createMindooDBServerIrohHandler = createMindooDBServerIrohHandler;
|
|
4
|
+
exports.isIrohValidationError = isIrohValidationError;
|
|
5
|
+
const types_1 = require("../../core/appendonlystores/types");
|
|
6
|
+
const validation_1 = require("./validation");
|
|
7
|
+
function requireTenant(ctx) {
|
|
8
|
+
const tenantId = ctx?.tenantId?.trim().toLowerCase();
|
|
9
|
+
if (!tenantId) {
|
|
10
|
+
throw new Error("Iroh RPC requires ctx.tenantId");
|
|
11
|
+
}
|
|
12
|
+
(0, validation_1.validateTenantId)(tenantId);
|
|
13
|
+
return tenantId;
|
|
14
|
+
}
|
|
15
|
+
function requireStoreScope(ctx) {
|
|
16
|
+
const tenantId = requireTenant(ctx);
|
|
17
|
+
const dbId = ctx?.dbId?.trim();
|
|
18
|
+
if (!dbId) {
|
|
19
|
+
throw new Error("Iroh RPC requires ctx.dbId");
|
|
20
|
+
}
|
|
21
|
+
const storeKind = ctx?.storeKind === types_1.StoreKind.attachments ? types_1.StoreKind.attachments : types_1.StoreKind.docs;
|
|
22
|
+
return { tenantId, dbId, storeKind };
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Inverse of {@link IrohNetworkTransport}: same method names, same args.
|
|
26
|
+
* Discovery methods are unauthenticated, matching `/.well-known/*`.
|
|
27
|
+
*/
|
|
28
|
+
function createMindooDBServerIrohHandler(host) {
|
|
29
|
+
return async (method, args, ctx) => {
|
|
30
|
+
switch (method) {
|
|
31
|
+
case "getServerInfo": {
|
|
32
|
+
const info = host.getServerPublicInfo();
|
|
33
|
+
if (!info) {
|
|
34
|
+
throw new Error("Server identity not initialized");
|
|
35
|
+
}
|
|
36
|
+
const limit = host.getJsonBodyLimit?.();
|
|
37
|
+
return {
|
|
38
|
+
...info,
|
|
39
|
+
clusterRole: host.getClusterRole?.() ?? "peer",
|
|
40
|
+
maxJsonRequestBodyLimit: limit?.limit,
|
|
41
|
+
maxJsonRequestBodyBytes: limit?.bytes ?? undefined,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
case "getTenantPublicInfosFingerprints": {
|
|
45
|
+
const tenantId = String(args[0] ?? "").trim().toLowerCase();
|
|
46
|
+
(0, validation_1.validateTenantId)(tenantId);
|
|
47
|
+
const fingerprints = await host.listTenantPublicInfosFingerprints(tenantId);
|
|
48
|
+
if (fingerprints.length === 0) {
|
|
49
|
+
throw new Error("Tenant not found on server");
|
|
50
|
+
}
|
|
51
|
+
return { tenantId, fingerprints };
|
|
52
|
+
}
|
|
53
|
+
case "requestChallenge": {
|
|
54
|
+
const tenantId = requireTenant(ctx);
|
|
55
|
+
const auth = await host.getAuthService(tenantId);
|
|
56
|
+
return auth.generateChallenge(typeof args[0] === "string" ? args[0] : undefined, args[1]);
|
|
57
|
+
}
|
|
58
|
+
case "authenticate": {
|
|
59
|
+
const tenantId = requireTenant(ctx);
|
|
60
|
+
const auth = await host.getAuthService(tenantId);
|
|
61
|
+
const challenge = String(args[0] ?? "");
|
|
62
|
+
const signature = args[1];
|
|
63
|
+
return auth.authenticate(challenge, signature);
|
|
64
|
+
}
|
|
65
|
+
default:
|
|
66
|
+
return dispatchStoreMethod(host, method, args, ctx);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
async function dispatchStoreMethod(host, method, args, ctx) {
|
|
71
|
+
const scope = requireStoreScope(ctx);
|
|
72
|
+
const store = await host.getServerStore(scope.tenantId, scope.dbId, scope.storeKind);
|
|
73
|
+
const token = String(args[0] ?? "");
|
|
74
|
+
switch (method) {
|
|
75
|
+
case "getCapabilities":
|
|
76
|
+
return store.handleGetCapabilities(token);
|
|
77
|
+
case "findNewEntries":
|
|
78
|
+
return store.handleFindNewEntries(token, args[1] ?? []);
|
|
79
|
+
case "findNewEntriesForDoc":
|
|
80
|
+
return store.handleFindNewEntriesForDoc(token, args[1] ?? [], String(args[2] ?? ""));
|
|
81
|
+
case "findEntries":
|
|
82
|
+
return store.handleFindEntries(token, args[1], args[2] ?? null, args[3] ?? null);
|
|
83
|
+
case "scanEntriesSince":
|
|
84
|
+
return store.handleScanEntriesSince(token, args[1], args[2], args[3]);
|
|
85
|
+
case "getIdBloomSummary":
|
|
86
|
+
return store.handleGetIdBloomSummary(token);
|
|
87
|
+
case "getStoreHead":
|
|
88
|
+
return store.handleGetStoreHead(token);
|
|
89
|
+
case "getCompactionStatus":
|
|
90
|
+
return store.handleGetCompactionStatus(token);
|
|
91
|
+
case "planDocumentMaterialization":
|
|
92
|
+
return store.handlePlanDocumentMaterialization(token, String(args[1] ?? ""), args[2]);
|
|
93
|
+
case "planDocumentMaterializationBatch":
|
|
94
|
+
return store.handlePlanDocumentMaterializationBatch(token, args[1] ?? [], args[2]);
|
|
95
|
+
case "planAttachmentReadByWalkingMetadata":
|
|
96
|
+
return store.handlePlanAttachmentReadByWalkingMetadata(token, String(args[1] ?? ""), Number(args[2] ?? 0), args[3]);
|
|
97
|
+
case "getEntries":
|
|
98
|
+
return store.handleGetEntries(token, args[1] ?? []);
|
|
99
|
+
case "getEntriesSessionWrapped":
|
|
100
|
+
return store.handleGetEntriesSessionWrapped(token, args[1] ?? []);
|
|
101
|
+
case "getEntryMetadata":
|
|
102
|
+
return store.handleGetEntryMetadata(token, String(args[1] ?? ""));
|
|
103
|
+
case "putEntries":
|
|
104
|
+
return store.handlePutEntries(token, args[1] ?? []);
|
|
105
|
+
case "hasEntries":
|
|
106
|
+
return store.handleHasEntries(token, args[1] ?? []);
|
|
107
|
+
case "getAllIds":
|
|
108
|
+
return store.handleGetAllIds(token);
|
|
109
|
+
case "resolveDependencies":
|
|
110
|
+
return store.handleResolveDependencies(token, String(args[1] ?? ""), args[2]);
|
|
111
|
+
case "subscribeToChanges":
|
|
112
|
+
throw new Error("subscribeToChanges is not implemented on the Iroh server path yet");
|
|
113
|
+
default:
|
|
114
|
+
throw new Error(`Unknown Iroh RPC method ${method}`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function isIrohValidationError(error) {
|
|
118
|
+
return error instanceof validation_1.ValidationError;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=IrohServerRpc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrohServerRpc.js","sourceRoot":"","sources":["../../../src/node/server/IrohServerRpc.ts"],"names":[],"mappings":";;AAqGA,0EA4C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AkB;YACrB,OAAO,KAAK,CAAC,sBAAsB,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACpE,KAAK,YAAY;YACf,OAAO,KAAK,CAAC,gBAAgB,CAAC,KAAK,EAAG,IAAI,CAAC,CAAC,CAAe,IAAI,EAAE,CAAC,CAAC;QACrE,KAAK,YAAY;YACf,OAAO,KAAK,CAAC,gBAAgB,CAAC,KAAK,EAAG,IAAI,CAAC,CAAC,CAAc,IAAI,EAAE,CAAC,CAAC;QACpE,KAAK,WAAW;YACd,OAAO,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACtC,KAAK,qBAAqB;YACxB,OAAO,KAAK,CAAC,yBAAyB,CACpC,KAAK,EACL,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,EACrB,IAAI,CAAC,CAAC,CAAwC,CAC/C,CAAC;QACJ,KAAK,oBAAoB;YACvB,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;QACvF;YACE,MAAM,IAAI,KAAK,CAAC,2BAA2B,MAAM,EAAE,CAAC,CAAC;IACzD,CAAC;AACH,CAAC;AAED,SAAgB,qBAAqB,CAAC,KAAc;IAClD,OAAO,KAAK,YAAY,4BAAe,CAAC;AAC1C,CAAC"}
|
|
@@ -59,6 +59,7 @@ export declare class MindooDBServer {
|
|
|
59
59
|
* SSRF boundary for {@link handleTimestampRequest}.
|
|
60
60
|
*/
|
|
61
61
|
private readonly tsaProviders;
|
|
62
|
+
private readonly irohEndpoint;
|
|
62
63
|
/**
|
|
63
64
|
* @param dataDir Root directory for on-disk tenant data and server identity
|
|
64
65
|
* @param serverPassword Password used to decrypt the server identity private keys
|
|
@@ -99,6 +100,8 @@ export declare class MindooDBServer {
|
|
|
99
100
|
* with Express; the `as unknown` casts bridge the type gap.
|
|
100
101
|
*/
|
|
101
102
|
listenTls(port: number, certPath: string, keyPath: string): void;
|
|
103
|
+
getIrohStatus(): import("./IrohServerEndpoint").IrohServerEndpointStatus;
|
|
104
|
+
startIrohIfEnabled(): Promise<void>;
|
|
102
105
|
/**
|
|
103
106
|
* Global middleware stack applied to every request, in order:
|
|
104
107
|
* 1. helmet — security headers (CSP, X-Frame-Options, etc.)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MindooDBServer.d.ts","sourceRoot":"","sources":["../../../src/node/server/MindooDBServer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,OAAoD,MAAM,SAAS,CAAC;AAuB3E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAwBvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAkB3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"MindooDBServer.d.ts","sourceRoot":"","sources":["../../../src/node/server/MindooDBServer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,OAAoD,MAAM,SAAS,CAAC;AAuB3E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAwBvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAkB3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAuC5C;;;;;GAKG;AACH,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,OAAO,CAAC;QAChB,UAAU,OAAO;YACf,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,WAAW,CAAC,EAAE;gBAAE,QAAQ,EAAE,MAAM,CAAC;gBAAC,aAAa,EAAE,MAAM,CAAA;aAAE,CAAC;YAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;YACvB,yFAAyF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