@feltdb/core 0.6.9 → 0.6.11
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/dist/cli/application-lifecycle.js +112 -0
- package/dist/cli/application.js +10 -0
- package/dist/cli/commands.js +407 -119
- package/dist/cli/development-session.js +54 -0
- package/dist/cli/index.js +1 -1
- package/dist/cli/workspace-integration.js +146 -20
- package/dist/collection.d.ts +110 -2
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +228 -3
- package/dist/create/cli.js +4 -2
- package/dist/create/create.js +42 -6
- package/dist/create/frameworks.js +18 -0
- package/dist/create/package-versions.js +1 -1
- package/dist/create/server-source/crates/feltdb/src/bin/feltdb_node.rs +408 -178
- package/dist/create/server-source/crates/feltdb/src/lib.rs +49 -5
- package/dist/create/server-source/crates/feltdb/src/multi_operation_transaction.rs +659 -0
- package/dist/create/server-source/crates/feltdb/src/p1_application_atomicity.rs +285 -0
- package/dist/create/server-source/crates/feltdb/src/p1_atomicity_acceptance.rs +582 -0
- package/dist/create/server-source/crates/feltdb-server/src/main.rs +141 -0
- package/dist/create/workspace-initialization.js +4 -5
- package/dist/db.d.ts +63 -1
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +145 -4
- package/dist/development-runtime-bridge.d.ts +60 -0
- package/dist/development-runtime-bridge.d.ts.map +1 -0
- package/dist/development-runtime-bridge.js +171 -0
- package/dist/embedded-transaction.d.ts +77 -0
- package/dist/embedded-transaction.d.ts.map +1 -0
- package/dist/embedded-transaction.js +102 -0
- package/dist/feltdb.d.ts +49 -1
- package/dist/feltdb.d.ts.map +1 -1
- package/dist/file-db.d.ts +33 -0
- package/dist/file-db.d.ts.map +1 -1
- package/dist/file-db.js +128 -4
- package/dist/freshness.d.ts +119 -0
- package/dist/freshness.d.ts.map +1 -0
- package/dist/freshness.js +115 -0
- package/dist/http-db.d.ts +48 -0
- package/dist/http-db.d.ts.map +1 -1
- package/dist/http-db.js +77 -1
- package/dist/index-backend.d.ts +8 -0
- package/dist/index-backend.d.ts.map +1 -1
- package/dist/index-backend.js +13 -0
- package/dist/index-core.d.ts +80 -0
- package/dist/index-core.d.ts.map +1 -0
- package/dist/index-core.js +74 -0
- package/dist/index-manager.d.ts +11 -0
- package/dist/index-manager.d.ts.map +1 -1
- package/dist/index-manager.js +30 -13
- package/dist/index-types.d.ts +17 -0
- package/dist/index-types.d.ts.map +1 -1
- package/dist/index.browser.d.ts +14 -0
- package/dist/index.browser.d.ts.map +1 -0
- package/dist/index.browser.js +13 -0
- package/dist/index.d.ts +8 -59
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -54
- package/dist/indexeddb-db.d.ts +32 -0
- package/dist/indexeddb-db.d.ts.map +1 -1
- package/dist/indexeddb-db.js +151 -1
- package/dist/memory-db.d.ts +26 -0
- package/dist/memory-db.d.ts.map +1 -1
- package/dist/memory-db.js +86 -0
- package/dist/runtime-registry.d.ts +32 -0
- package/dist/runtime-registry.d.ts.map +1 -0
- package/dist/runtime-registry.js +38 -0
- package/dist/studio/app.d.ts +2 -1
- package/dist/studio/app.d.ts.map +1 -1
- package/dist/studio/components/StateExplorer.d.ts +2 -1
- package/dist/studio/components/StateExplorer.d.ts.map +1 -1
- package/dist/studio/components/index.js +1 -1
- package/dist/studio/{components-9kDSWiGL.js → components-C5p2TfIU.js} +25 -14
- package/dist/studio/index.js +234 -160
- package/dist/studio-app/assets/{feltdb_wasm-B4wq4mqp.js → feltdb_wasm-CJv3wHzi.js} +1 -1
- package/dist/studio-app/assets/feltdb_wasm_bg-C8TG8r2n.wasm +0 -0
- package/dist/studio-app/assets/index-DospFFYE.js +28 -0
- package/dist/studio-app/index.html +1 -1
- package/dist/transaction.d.ts +98 -0
- package/dist/transaction.d.ts.map +1 -0
- package/dist/transaction.js +86 -0
- package/dist/wasm/feltdb_wasm_bg.wasm +0 -0
- package/dist/workspace/browser.d.ts +22 -0
- package/dist/workspace/browser.d.ts.map +1 -0
- package/dist/workspace/browser.js +17 -0
- package/dist/workspace/development-node.d.ts +16 -0
- package/dist/workspace/development-node.d.ts.map +1 -1
- package/dist/workspace/development-node.js +85 -1
- package/dist/workspace/git-identity.d.ts +35 -0
- package/dist/workspace/git-identity.d.ts.map +1 -0
- package/dist/workspace/git-identity.js +81 -0
- package/dist/workspace/index.d.ts +12 -2
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +7 -1
- package/dist/workspace/investigation-analysis.d.ts +47 -0
- package/dist/workspace/investigation-analysis.d.ts.map +1 -0
- package/dist/workspace/investigation-analysis.js +181 -0
- package/dist/workspace/investigation-lifecycle-manager.d.ts +88 -0
- package/dist/workspace/investigation-lifecycle-manager.d.ts.map +1 -0
- package/dist/workspace/investigation-lifecycle-manager.js +259 -0
- package/dist/workspace/investigation-supervisor.d.ts +100 -0
- package/dist/workspace/investigation-supervisor.d.ts.map +1 -0
- package/dist/workspace/investigation-supervisor.js +238 -0
- package/dist/workspace/runtime-investigation.d.ts +5 -1
- package/dist/workspace/runtime-investigation.d.ts.map +1 -1
- package/dist/workspace/runtime-investigation.js +50 -21
- package/dist/workspace/runtime-observation.d.ts +82 -0
- package/dist/workspace/runtime-observation.d.ts.map +1 -0
- package/dist/workspace/runtime-observation.js +170 -0
- package/dist/workspace/runtime-observer.d.ts +57 -0
- package/dist/workspace/runtime-observer.d.ts.map +1 -0
- package/dist/workspace/runtime-observer.js +272 -0
- package/dist/workspace/workspace-connection.d.ts.map +1 -1
- package/dist/workspace/workspace-connection.js +14 -5
- package/dist/workspace/workspace-identity.d.ts +1 -1
- package/dist/workspace/workspace-identity.d.ts.map +1 -1
- package/dist/workspace/workspace-identity.js +4 -4
- package/dist/workspace/workspace-types.d.ts +208 -0
- package/dist/workspace/workspace-types.d.ts.map +1 -1
- package/package.json +12 -4
- package/dist/create/server-source/crates/feltdb/src/phase_1c_three_node.rs +0 -523
- package/dist/studio-app/assets/feltdb_wasm_bg-Ceyi7l21.wasm +0 -0
- package/dist/studio-app/assets/index-BF45M757.js +0 -28
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared @feltdb/core surface.
|
|
3
|
+
*
|
|
4
|
+
* Everything here loads in any JavaScript environment. Modules that need Node
|
|
5
|
+
* built-ins are re-exported by `index.ts` (the Node entry) instead, so that a
|
|
6
|
+
* browser can load this graph without hitting a bare `fs` or `path`
|
|
7
|
+
* specifier.
|
|
8
|
+
*
|
|
9
|
+
* Applications import `@feltdb/core`, not this module directly.
|
|
10
|
+
*/
|
|
11
|
+
export * from './db.js';
|
|
12
|
+
export * from './collection.js';
|
|
13
|
+
export * from './transaction.js';
|
|
14
|
+
export * from './freshness.js';
|
|
15
|
+
export * from './cell.js';
|
|
16
|
+
export * from './reactive-graph.js';
|
|
17
|
+
export * from './index-types.js';
|
|
18
|
+
export * from './index-backend.js';
|
|
19
|
+
export * from './index-store.js';
|
|
20
|
+
export * from './index-recovery.js';
|
|
21
|
+
export * from './query-planner.js';
|
|
22
|
+
export * from './index-analytics.js';
|
|
23
|
+
export * from './analytics-backend.js';
|
|
24
|
+
export * from './index-dashboard.js';
|
|
25
|
+
export * from './index-monitoring.js';
|
|
26
|
+
export * from './distributed-indexing.js';
|
|
27
|
+
export * from './sharding.js';
|
|
28
|
+
export * from './recovery.js';
|
|
29
|
+
export * from './execution.js';
|
|
30
|
+
export * from './workflow.js';
|
|
31
|
+
export * from './capability.js';
|
|
32
|
+
export * from './memory-db.js';
|
|
33
|
+
export * from './http-db.js';
|
|
34
|
+
export * from './http-client.js';
|
|
35
|
+
export * from './indexeddb-db.js';
|
|
36
|
+
export * from './flowspec.js';
|
|
37
|
+
export * from './application-manifest.js';
|
|
38
|
+
export * from './state-contract.js';
|
|
39
|
+
export * from './revision-recovery.js';
|
|
40
|
+
export * from './operation-admission.js';
|
|
41
|
+
export * from './error-codes.js';
|
|
42
|
+
export * from './authorization.js';
|
|
43
|
+
export * from './sync-contract.js';
|
|
44
|
+
export * from './workload.js';
|
|
45
|
+
export * from './worker.js';
|
|
46
|
+
export * from './artifact.js';
|
|
47
|
+
export * from './bundle.js';
|
|
48
|
+
export * from './release.js';
|
|
49
|
+
export * from './observe.js';
|
|
50
|
+
export * from './provider.js';
|
|
51
|
+
export * from './identity.js';
|
|
52
|
+
export * from './development-runtime-bridge.js';
|
|
53
|
+
export * from './application-contract.js';
|
|
54
|
+
export { ProtocolHandler, type Message, type Operation as ProtocolOperation, type Response as ProtocolResponse, } from './protocol.js';
|
|
55
|
+
/**
|
|
56
|
+
* Agent Runtime APIs
|
|
57
|
+
*/
|
|
58
|
+
export * from './agent.js';
|
|
59
|
+
export * from './agent-observation.js';
|
|
60
|
+
export * from './agent-decision.js';
|
|
61
|
+
export * from './agent-memory.js';
|
|
62
|
+
export * from './agent-registry.js';
|
|
63
|
+
export * from './agent-runtime.js';
|
|
64
|
+
/**
|
|
65
|
+
* Telemetry APIs
|
|
66
|
+
*/
|
|
67
|
+
export { emitTelemetry, getTelemetryClient } from './telemetry.js';
|
|
68
|
+
export type { TelemetryEvent, TelemetryEventType } from './telemetry.js';
|
|
69
|
+
/**
|
|
70
|
+
* Observability and inspection APIs
|
|
71
|
+
*/
|
|
72
|
+
export type { ProvenanceGraph, ProvenanceNode, ProvenanceEdge, ProvenanceEdgeType, RuntimeDiagnostics, } from './db.js';
|
|
73
|
+
/**
|
|
74
|
+
* Development Workspace APIs
|
|
75
|
+
*
|
|
76
|
+
* Shared development state for coordinating Browser, IDE, and Agent clients.
|
|
77
|
+
*/
|
|
78
|
+
export * from './workspace/browser.js';
|
|
79
|
+
export * from './development-runtime-bridge.js';
|
|
80
|
+
//# sourceMappingURL=index-core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-core.d.ts","sourceRoot":"","sources":["../src/index-core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,c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AAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AAEnC;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACnE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzE;;GAEG;AACH,YAAY,EACV,eAAe,EACf,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared @feltdb/core surface.
|
|
3
|
+
*
|
|
4
|
+
* Everything here loads in any JavaScript environment. Modules that need Node
|
|
5
|
+
* built-ins are re-exported by `index.ts` (the Node entry) instead, so that a
|
|
6
|
+
* browser can load this graph without hitting a bare `fs` or `path`
|
|
7
|
+
* specifier.
|
|
8
|
+
*
|
|
9
|
+
* Applications import `@feltdb/core`, not this module directly.
|
|
10
|
+
*/
|
|
11
|
+
export * from './db.js';
|
|
12
|
+
export * from './collection.js';
|
|
13
|
+
export * from './transaction.js';
|
|
14
|
+
export * from './freshness.js';
|
|
15
|
+
export * from './cell.js';
|
|
16
|
+
export * from './reactive-graph.js';
|
|
17
|
+
export * from './index-types.js';
|
|
18
|
+
export * from './index-backend.js';
|
|
19
|
+
export * from './index-store.js';
|
|
20
|
+
export * from './index-recovery.js';
|
|
21
|
+
export * from './query-planner.js';
|
|
22
|
+
export * from './index-analytics.js';
|
|
23
|
+
export * from './analytics-backend.js';
|
|
24
|
+
export * from './index-dashboard.js';
|
|
25
|
+
export * from './index-monitoring.js';
|
|
26
|
+
export * from './distributed-indexing.js';
|
|
27
|
+
export * from './sharding.js';
|
|
28
|
+
export * from './recovery.js';
|
|
29
|
+
export * from './execution.js';
|
|
30
|
+
export * from './workflow.js';
|
|
31
|
+
export * from './capability.js';
|
|
32
|
+
export * from './memory-db.js';
|
|
33
|
+
export * from './http-db.js';
|
|
34
|
+
export * from './http-client.js';
|
|
35
|
+
export * from './indexeddb-db.js';
|
|
36
|
+
export * from './flowspec.js';
|
|
37
|
+
export * from './application-manifest.js';
|
|
38
|
+
export * from './state-contract.js';
|
|
39
|
+
export * from './revision-recovery.js';
|
|
40
|
+
export * from './operation-admission.js';
|
|
41
|
+
export * from './error-codes.js';
|
|
42
|
+
export * from './authorization.js';
|
|
43
|
+
export * from './sync-contract.js';
|
|
44
|
+
export * from './workload.js';
|
|
45
|
+
export * from './worker.js';
|
|
46
|
+
export * from './artifact.js';
|
|
47
|
+
export * from './bundle.js';
|
|
48
|
+
export * from './release.js';
|
|
49
|
+
export * from './observe.js';
|
|
50
|
+
export * from './provider.js';
|
|
51
|
+
export * from './identity.js';
|
|
52
|
+
export * from './development-runtime-bridge.js';
|
|
53
|
+
export * from './application-contract.js';
|
|
54
|
+
export { ProtocolHandler, } from './protocol.js';
|
|
55
|
+
/**
|
|
56
|
+
* Agent Runtime APIs
|
|
57
|
+
*/
|
|
58
|
+
export * from './agent.js';
|
|
59
|
+
export * from './agent-observation.js';
|
|
60
|
+
export * from './agent-decision.js';
|
|
61
|
+
export * from './agent-memory.js';
|
|
62
|
+
export * from './agent-registry.js';
|
|
63
|
+
export * from './agent-runtime.js';
|
|
64
|
+
/**
|
|
65
|
+
* Telemetry APIs
|
|
66
|
+
*/
|
|
67
|
+
export { emitTelemetry, getTelemetryClient } from './telemetry.js';
|
|
68
|
+
/**
|
|
69
|
+
* Development Workspace APIs
|
|
70
|
+
*
|
|
71
|
+
* Shared development state for coordinating Browser, IDE, and Agent clients.
|
|
72
|
+
*/
|
|
73
|
+
export * from './workspace/browser.js';
|
|
74
|
+
export * from './development-runtime-bridge.js';
|
package/dist/index-manager.d.ts
CHANGED
|
@@ -8,6 +8,17 @@ export declare class IndexManager {
|
|
|
8
8
|
private indexes;
|
|
9
9
|
private config;
|
|
10
10
|
private indexStats;
|
|
11
|
+
/** Construct an empty index from its configuration. */
|
|
12
|
+
private buildIndex;
|
|
13
|
+
/**
|
|
14
|
+
* Discard every indexed entry while keeping the index definitions.
|
|
15
|
+
*
|
|
16
|
+
* A caller that derives its indexes from a snapshot of the data needs to
|
|
17
|
+
* rebuild them when that snapshot is replaced. Without this, entries for
|
|
18
|
+
* records that are no longer present would linger and a query could return
|
|
19
|
+
* ids the caller can no longer resolve.
|
|
20
|
+
*/
|
|
21
|
+
resetEntries(): void;
|
|
11
22
|
createIndex(config: IndexConfig): void;
|
|
12
23
|
updateRecord(recordId: string, oldValue: Record<string, any> | null, newValue: Record<string, any>): void;
|
|
13
24
|
queryIndex(name: string, query: IndexQuery): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-manager.d.ts","sourceRoot":"","sources":["../src/index-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAc,UAAU,EAAE,UAAU,EAAe,SAAS,EAAiB,MAAM,kBAAkB,CAAC;AAyN/H,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAyE;IACxF,OAAO,CAAC,MAAM,CAAuC;IACrD,OAAO,CAAC,UAAU,CAAsC;IAExD,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"index-manager.d.ts","sourceRoot":"","sources":["../src/index-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAc,UAAU,EAAE,UAAU,EAAe,SAAS,EAAiB,MAAM,kBAAkB,CAAC;AAyN/H,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAyE;IACxF,OAAO,CAAC,MAAM,CAAuC;IACrD,OAAO,CAAC,UAAU,CAAsC;IAExD,uDAAuD;IACvD,OAAO,CAAC,UAAU;IAOlB;;;;;;;OAOG;IACH,YAAY,IAAI,IAAI;IAQpB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAqBtC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IA6BzG,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,EAAE;IA0BrD,WAAW,IAAI,WAAW,EAAE;IAI5B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI;IAIzC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS;CAwCvC"}
|
package/dist/index-manager.js
CHANGED
|
@@ -201,23 +201,40 @@ export class IndexManager {
|
|
|
201
201
|
this.config = new Map();
|
|
202
202
|
this.indexStats = new Map();
|
|
203
203
|
}
|
|
204
|
+
/** Construct an empty index from its configuration. */
|
|
205
|
+
buildIndex(config) {
|
|
206
|
+
if (config.type === 'hash' && config.field)
|
|
207
|
+
return new HashIndex(config.field);
|
|
208
|
+
if (config.type === 'sorted' && config.field)
|
|
209
|
+
return new SortedIndex(config.field);
|
|
210
|
+
if (config.type === 'text' && config.textFields)
|
|
211
|
+
return new TextIndex(config.textFields);
|
|
212
|
+
throw new Error(`Invalid index config: ${JSON.stringify(config)}`);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Discard every indexed entry while keeping the index definitions.
|
|
216
|
+
*
|
|
217
|
+
* A caller that derives its indexes from a snapshot of the data needs to
|
|
218
|
+
* rebuild them when that snapshot is replaced. Without this, entries for
|
|
219
|
+
* records that are no longer present would linger and a query could return
|
|
220
|
+
* ids the caller can no longer resolve.
|
|
221
|
+
*/
|
|
222
|
+
resetEntries() {
|
|
223
|
+
for (const [name, config] of this.config) {
|
|
224
|
+
this.indexes.set(name, this.buildIndex(config));
|
|
225
|
+
const stats = this.indexStats.get(name);
|
|
226
|
+
if (stats) {
|
|
227
|
+
stats.entries = 0;
|
|
228
|
+
stats.size = 0;
|
|
229
|
+
stats.lastUpdated = Date.now();
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
204
233
|
createIndex(config) {
|
|
205
234
|
if (this.indexes.has(config.name)) {
|
|
206
235
|
throw new Error(`Index ${config.name} already exists`);
|
|
207
236
|
}
|
|
208
|
-
|
|
209
|
-
if (config.type === 'hash' && config.field) {
|
|
210
|
-
index = new HashIndex(config.field);
|
|
211
|
-
}
|
|
212
|
-
else if (config.type === 'sorted' && config.field) {
|
|
213
|
-
index = new SortedIndex(config.field);
|
|
214
|
-
}
|
|
215
|
-
else if (config.type === 'text' && config.textFields) {
|
|
216
|
-
index = new TextIndex(config.textFields);
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
throw new Error(`Invalid index config: ${JSON.stringify(config)}`);
|
|
220
|
-
}
|
|
237
|
+
const index = this.buildIndex(config);
|
|
221
238
|
this.indexes.set(config.name, index);
|
|
222
239
|
this.config.set(config.name, config);
|
|
223
240
|
this.indexStats.set(config.name, {
|
package/dist/index-types.d.ts
CHANGED
|
@@ -35,6 +35,23 @@ export interface IndexQuery {
|
|
|
35
35
|
min?: any;
|
|
36
36
|
max?: any;
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* How a `Collection.find` call was answered.
|
|
40
|
+
*
|
|
41
|
+
* Distinct from `QueryPlan`, which describes the cost-based planner's output.
|
|
42
|
+
* This records what a single collection read actually did.
|
|
43
|
+
*/
|
|
44
|
+
export interface CollectionQueryPlan {
|
|
45
|
+
strategy: 'index' | 'scan';
|
|
46
|
+
/** Present when the index was used. */
|
|
47
|
+
indexName?: string;
|
|
48
|
+
field?: string;
|
|
49
|
+
/** Present when a scan was chosen, explaining why. */
|
|
50
|
+
reason?: string;
|
|
51
|
+
/** Records the predicate was applied to. */
|
|
52
|
+
candidatesExamined: number;
|
|
53
|
+
recordsReturned: number;
|
|
54
|
+
}
|
|
38
55
|
export interface IndexScanPlan {
|
|
39
56
|
indexName: string;
|
|
40
57
|
indexType: IndexType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-types.d.ts","sourceRoot":"","sources":["../src/index-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAEhE,MAAM,WAAW,WAAW;IAC1B,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IAEb,mDAAmD;IACnD,IAAI,EAAE,SAAS,CAAC;IAEhB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,2BAA2B;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG;IAC1C,GAAG,EAAE,CAAC,CAAC;IACP,MAAM,EAAE,CAAC,EAAE,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,UAAU,GAAG,YAAY,GAAG,OAAO,CAAC;IAC1F,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,GAAG,CAAC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a,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,YAAY,CAAC;IACpE,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser entry point for @feltdb/core.
|
|
3
|
+
*
|
|
4
|
+
* Selected by the `browser` condition in the package exports map, so a browser
|
|
5
|
+
* application writing `import { createFeltDB } from '@feltdb/core'` gets a
|
|
6
|
+
* module graph with no Node built-ins in it.
|
|
7
|
+
*
|
|
8
|
+
* The browser runtime itself has no Node dependencies, so it is imported
|
|
9
|
+
* directly by `db.ts`. What this entry does is leave the file runtime out of
|
|
10
|
+
* the graph, which is what makes `createFeltDB({ browser: true })` — and
|
|
11
|
+
* therefore `db.transaction()` — reachable through the public package entry.
|
|
12
|
+
*/
|
|
13
|
+
export * from './index-core.js';
|
|
14
|
+
//# sourceMappingURL=index.browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser entry point for @feltdb/core.
|
|
3
|
+
*
|
|
4
|
+
* Selected by the `browser` condition in the package exports map, so a browser
|
|
5
|
+
* application writing `import { createFeltDB } from '@feltdb/core'` gets a
|
|
6
|
+
* module graph with no Node built-ins in it.
|
|
7
|
+
*
|
|
8
|
+
* The browser runtime itself has no Node dependencies, so it is imported
|
|
9
|
+
* directly by `db.ts`. What this entry does is leave the file runtime out of
|
|
10
|
+
* the graph, which is what makes `createFeltDB({ browser: true })` — and
|
|
11
|
+
* therefore `db.transaction()` — reachable through the public package entry.
|
|
12
|
+
*/
|
|
13
|
+
export * from './index-core.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -4,71 +4,20 @@
|
|
|
4
4
|
* The primary interface for developers using FeltDB.
|
|
5
5
|
* Provides a simple, state-first API for data persistence,
|
|
6
6
|
* reactivity, and distributed operations.
|
|
7
|
+
*
|
|
8
|
+
* This is the Node entry point. It adds the runtimes and workspace tooling
|
|
9
|
+
* that need Node built-ins on top of the shared surface in `index-core.ts`.
|
|
10
|
+
* Browsers resolve `index.browser.ts` instead, through the package exports
|
|
11
|
+
* map, so that a bare `fs` import never enters a browser module graph.
|
|
7
12
|
*/
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './collection.js';
|
|
10
|
-
export * from './cell.js';
|
|
11
|
-
export * from './reactive-graph.js';
|
|
12
|
-
export * from './index-types.js';
|
|
13
|
-
export * from './index-backend.js';
|
|
14
|
-
export * from './index-store.js';
|
|
15
|
-
export * from './index-recovery.js';
|
|
16
|
-
export * from './query-planner.js';
|
|
17
|
-
export * from './index-analytics.js';
|
|
18
|
-
export * from './analytics-backend.js';
|
|
19
|
-
export * from './index-dashboard.js';
|
|
20
|
-
export * from './index-monitoring.js';
|
|
21
|
-
export * from './distributed-indexing.js';
|
|
22
|
-
export * from './sharding.js';
|
|
23
|
-
export * from './recovery.js';
|
|
24
|
-
export * from './execution.js';
|
|
25
|
-
export * from './workflow.js';
|
|
26
|
-
export * from './capability.js';
|
|
27
|
-
export * from './memory-db.js';
|
|
28
|
-
export * from './http-db.js';
|
|
29
|
-
export * from './http-client.js';
|
|
30
|
-
export * from './indexeddb-db.js';
|
|
13
|
+
export * from './index-core.js';
|
|
31
14
|
export * from './file-db.js';
|
|
32
|
-
export * from './flowspec.js';
|
|
33
|
-
export * from './application-manifest.js';
|
|
34
|
-
export * from './state-contract.js';
|
|
35
|
-
export * from './revision-recovery.js';
|
|
36
|
-
export * from './operation-admission.js';
|
|
37
|
-
export * from './error-codes.js';
|
|
38
|
-
export * from './authorization.js';
|
|
39
|
-
export * from './sync-contract.js';
|
|
40
|
-
export * from './workload.js';
|
|
41
|
-
export * from './worker.js';
|
|
42
|
-
export * from './artifact.js';
|
|
43
|
-
export * from './bundle.js';
|
|
44
|
-
export * from './release.js';
|
|
45
|
-
export * from './observe.js';
|
|
46
|
-
export * from './provider.js';
|
|
47
|
-
export * from './identity.js';
|
|
48
|
-
export * from './application-contract.js';
|
|
49
|
-
export { ProtocolHandler, type Message, type Operation as ProtocolOperation, type Response as ProtocolResponse, } from './protocol.js';
|
|
50
|
-
/**
|
|
51
|
-
* Agent Runtime APIs
|
|
52
|
-
*/
|
|
53
|
-
export * from './agent.js';
|
|
54
|
-
export * from './agent-observation.js';
|
|
55
|
-
export * from './agent-decision.js';
|
|
56
|
-
export * from './agent-memory.js';
|
|
57
|
-
export * from './agent-registry.js';
|
|
58
|
-
export * from './agent-runtime.js';
|
|
59
|
-
/**
|
|
60
|
-
* Telemetry APIs
|
|
61
|
-
*/
|
|
62
|
-
export { emitTelemetry, getTelemetryClient } from './telemetry.js';
|
|
63
|
-
export type { TelemetryEvent, TelemetryEventType } from './telemetry.js';
|
|
64
|
-
/**
|
|
65
|
-
* Observability and inspection APIs
|
|
66
|
-
*/
|
|
67
|
-
export type { ProvenanceGraph, ProvenanceNode, ProvenanceEdge, ProvenanceEdgeType, RuntimeDiagnostics, } from './db.js';
|
|
68
15
|
/**
|
|
69
16
|
* Development Workspace APIs
|
|
70
17
|
*
|
|
71
18
|
* Shared development state for coordinating Browser, IDE, and Agent clients.
|
|
19
|
+
* The Node-only pieces (durable investigation store, supervisor, local
|
|
20
|
+
* development authority, Git inspection) are available from this entry only.
|
|
72
21
|
*/
|
|
73
22
|
export * from './workspace/index.js';
|
|
74
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAE7B;;;;;;GAMG;AACH,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,65 +4,22 @@
|
|
|
4
4
|
* The primary interface for developers using FeltDB.
|
|
5
5
|
* Provides a simple, state-first API for data persistence,
|
|
6
6
|
* reactivity, and distributed operations.
|
|
7
|
+
*
|
|
8
|
+
* This is the Node entry point. It adds the runtimes and workspace tooling
|
|
9
|
+
* that need Node built-ins on top of the shared surface in `index-core.ts`.
|
|
10
|
+
* Browsers resolve `index.browser.ts` instead, through the package exports
|
|
11
|
+
* map, so that a bare `fs` import never enters a browser module graph.
|
|
7
12
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './index-types.js';
|
|
13
|
-
export * from './index-backend.js';
|
|
14
|
-
export * from './index-store.js';
|
|
15
|
-
export * from './index-recovery.js';
|
|
16
|
-
export * from './query-planner.js';
|
|
17
|
-
export * from './index-analytics.js';
|
|
18
|
-
export * from './analytics-backend.js';
|
|
19
|
-
export * from './index-dashboard.js';
|
|
20
|
-
export * from './index-monitoring.js';
|
|
21
|
-
export * from './distributed-indexing.js';
|
|
22
|
-
export * from './sharding.js';
|
|
23
|
-
export * from './recovery.js';
|
|
24
|
-
export * from './execution.js';
|
|
25
|
-
export * from './workflow.js';
|
|
26
|
-
export * from './capability.js';
|
|
27
|
-
export * from './memory-db.js';
|
|
28
|
-
export * from './http-db.js';
|
|
29
|
-
export * from './http-client.js';
|
|
30
|
-
export * from './indexeddb-db.js';
|
|
13
|
+
import { registerRuntime } from './runtime-registry.js';
|
|
14
|
+
import { FileJsDb } from './file-db.js';
|
|
15
|
+
registerRuntime('file', path => new FileJsDb(path));
|
|
16
|
+
export * from './index-core.js';
|
|
31
17
|
export * from './file-db.js';
|
|
32
|
-
export * from './flowspec.js';
|
|
33
|
-
export * from './application-manifest.js';
|
|
34
|
-
export * from './state-contract.js';
|
|
35
|
-
export * from './revision-recovery.js';
|
|
36
|
-
export * from './operation-admission.js';
|
|
37
|
-
export * from './error-codes.js';
|
|
38
|
-
export * from './authorization.js';
|
|
39
|
-
export * from './sync-contract.js';
|
|
40
|
-
export * from './workload.js';
|
|
41
|
-
export * from './worker.js';
|
|
42
|
-
export * from './artifact.js';
|
|
43
|
-
export * from './bundle.js';
|
|
44
|
-
export * from './release.js';
|
|
45
|
-
export * from './observe.js';
|
|
46
|
-
export * from './provider.js';
|
|
47
|
-
export * from './identity.js';
|
|
48
|
-
export * from './application-contract.js';
|
|
49
|
-
export { ProtocolHandler, } from './protocol.js';
|
|
50
|
-
/**
|
|
51
|
-
* Agent Runtime APIs
|
|
52
|
-
*/
|
|
53
|
-
export * from './agent.js';
|
|
54
|
-
export * from './agent-observation.js';
|
|
55
|
-
export * from './agent-decision.js';
|
|
56
|
-
export * from './agent-memory.js';
|
|
57
|
-
export * from './agent-registry.js';
|
|
58
|
-
export * from './agent-runtime.js';
|
|
59
|
-
/**
|
|
60
|
-
* Telemetry APIs
|
|
61
|
-
*/
|
|
62
|
-
export { emitTelemetry, getTelemetryClient } from './telemetry.js';
|
|
63
18
|
/**
|
|
64
19
|
* Development Workspace APIs
|
|
65
20
|
*
|
|
66
21
|
* Shared development state for coordinating Browser, IDE, and Agent clients.
|
|
22
|
+
* The Node-only pieces (durable investigation store, supervisor, local
|
|
23
|
+
* development authority, Git inspection) are available from this entry only.
|
|
67
24
|
*/
|
|
68
25
|
export * from './workspace/index.js';
|
package/dist/indexeddb-db.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { JsDb } from './feltdb.js';
|
|
2
|
+
import { type FreshnessCapability, type Revision } from './freshness.js';
|
|
3
|
+
import type { AtomicTransactionRequest, AtomicTransactionResult } from './transaction.js';
|
|
2
4
|
interface JsResult {
|
|
3
5
|
success: boolean;
|
|
4
6
|
data?: string;
|
|
@@ -38,6 +40,15 @@ export declare class IndexedDbJsDb implements JsDb {
|
|
|
38
40
|
insert(key: string, value: string): Promise<JsResult>;
|
|
39
41
|
update(key: string, value: string): Promise<JsResult>;
|
|
40
42
|
delete(key: string): Promise<JsResult>;
|
|
43
|
+
/**
|
|
44
|
+
* Commit several operations atomically and durably.
|
|
45
|
+
*
|
|
46
|
+
* Reads, precondition checks, and writes all happen inside a single
|
|
47
|
+
* IndexedDB readwrite transaction, which is the browser's own atomic commit
|
|
48
|
+
* boundary. If any step fails the transaction aborts and nothing is written,
|
|
49
|
+
* and the promise resolves only after the transaction has committed.
|
|
50
|
+
*/
|
|
51
|
+
commit_transaction(request: AtomicTransactionRequest): Promise<AtomicTransactionResult>;
|
|
41
52
|
cas(params: {
|
|
42
53
|
key: string;
|
|
43
54
|
expectedVersion: number;
|
|
@@ -70,6 +81,27 @@ export declare class IndexedDbJsDb implements JsDb {
|
|
|
70
81
|
acknowledge_peer_operations(): JsResult;
|
|
71
82
|
instance_id(): string;
|
|
72
83
|
get_sequence(): number;
|
|
84
|
+
/**
|
|
85
|
+
* IndexedDB is the serialization authority for this database.
|
|
86
|
+
*
|
|
87
|
+
* The `changes` store is `autoIncrement`, so its key is assigned by the
|
|
88
|
+
* storage engine inside the same readwrite transaction that writes the record,
|
|
89
|
+
* and the browser serializes readwrite transactions on an object store across
|
|
90
|
+
* tabs. A second tab's commit therefore advances the same durable counter,
|
|
91
|
+
* with no coordination code of our own.
|
|
92
|
+
*
|
|
93
|
+
* Note what is *not* used here: `this.sequence` counts what this handle wrote
|
|
94
|
+
* and would miss every other tab. The durable key is the authoritative value.
|
|
95
|
+
*/
|
|
96
|
+
freshness(): FreshnessCapability;
|
|
97
|
+
/**
|
|
98
|
+
* The highest durable `changes` key.
|
|
99
|
+
*
|
|
100
|
+
* Read from the store rather than from memory so a write committed by another
|
|
101
|
+
* tab is included. An empty store is revision 0, which is a real value: it
|
|
102
|
+
* means nothing has been committed, and a cache built at 0 is still current.
|
|
103
|
+
*/
|
|
104
|
+
revision(): Promise<Revision>;
|
|
73
105
|
audit_events(): Promise<ChangeRecord[]>;
|
|
74
106
|
export_operations(sinceSequence: number): Promise<ChangeRecord[]>;
|
|
75
107
|
apply_remote_operations(operations: ChangeRecord[]): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexeddb-db.d.ts","sourceRoot":"","sources":["../src/indexeddb-db.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"indexeddb-db.d.ts","sourceRoot":"","sources":["../src/indexeddb-db.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAA8B,KAAK,mBAAmB,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrG,OAAO,KAAK,EAAE,w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