@bandeira-tech/b3nd-save 0.8.1 → 0.13.1
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/esm/clients/save-client.d.ts +63 -29
- package/esm/clients/save-client.d.ts.map +1 -1
- package/esm/clients/save-client.js +148 -68
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/mod.d.ts +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/client-console/client.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/encoding/encoding.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/encrypt/mod.d.ts +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/encrypt/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/encrypt/mod.js +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/encrypt/utils.d.ts +6 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/encrypt/utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/encrypt/utils.js +12 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/functional-client/functional-client.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/match-pattern/match-pattern.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/decorators.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/network.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/peer.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/flood.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/path-vector.d.ts +3 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/network/policies/path-vector.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/path-vector.js +3 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/tell-and-read.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/types.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/observe-emitter/observe-emitter.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/connection.d.ts +13 -5
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/rig/connection.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/connection.js +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/events.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/hooks.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/identity.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/operation-handle.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/reactions.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/rig.d.ts +3 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/rig/rig.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/rig.js +46 -4
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/types.d.ts +4 -4
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/rig/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/types/types.d.ts +119 -80
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/types/types.d.ts.map +1 -0
- package/esm/dispatch.d.ts +116 -3
- package/esm/dispatch.d.ts.map +1 -1
- package/esm/dispatch.js +381 -5
- package/esm/elasticsearch/store.d.ts +124 -25
- package/esm/elasticsearch/store.d.ts.map +1 -1
- package/esm/elasticsearch/store.js +451 -92
- package/esm/entity-store.d.ts +1 -1
- package/esm/errors.d.ts +1 -1
- package/esm/errors.js +1 -1
- package/esm/fs/mod.d.ts +26 -0
- package/esm/fs/mod.d.ts.map +1 -1
- package/esm/fs/store.d.ts +100 -23
- package/esm/fs/store.d.ts.map +1 -1
- package/esm/fs/store.js +250 -66
- package/esm/glob.d.ts +114 -0
- package/esm/glob.d.ts.map +1 -0
- package/esm/glob.js +352 -0
- package/esm/identifiers.d.ts +18 -0
- package/esm/identifiers.d.ts.map +1 -0
- package/esm/identifiers.js +19 -0
- package/esm/indexeddb/fields.d.ts +32 -0
- package/esm/indexeddb/fields.d.ts.map +1 -0
- package/esm/indexeddb/fields.js +51 -0
- package/esm/indexeddb/store.d.ts +72 -17
- package/esm/indexeddb/store.d.ts.map +1 -1
- package/esm/indexeddb/store.js +362 -106
- package/esm/ipfs/mod.d.ts +19 -0
- package/esm/ipfs/mod.d.ts.map +1 -1
- package/esm/ipfs/mod.js +19 -0
- package/esm/ipfs/store.d.ts +82 -21
- package/esm/ipfs/store.d.ts.map +1 -1
- package/esm/ipfs/store.js +269 -68
- package/esm/json-fields.d.ts +61 -0
- package/esm/json-fields.d.ts.map +1 -0
- package/esm/json-fields.js +121 -0
- package/esm/localstorage/store.d.ts +89 -21
- package/esm/localstorage/store.d.ts.map +1 -1
- package/esm/localstorage/store.js +247 -54
- package/esm/memory/store.d.ts +35 -4
- package/esm/memory/store.d.ts.map +1 -1
- package/esm/memory/store.js +69 -47
- package/esm/mod.d.ts +2 -0
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +1 -0
- package/esm/mongo/fields.d.ts +53 -0
- package/esm/mongo/fields.d.ts.map +1 -0
- package/esm/mongo/fields.js +71 -0
- package/esm/mongo/mod.d.ts +19 -4
- package/esm/mongo/mod.d.ts.map +1 -1
- package/esm/mongo/mod.js +4 -2
- package/esm/mongo/store.d.ts +114 -25
- package/esm/mongo/store.d.ts.map +1 -1
- package/esm/mongo/store.js +355 -102
- package/esm/postgres/store.d.ts +50 -1
- package/esm/postgres/store.d.ts.map +1 -1
- package/esm/postgres/store.js +133 -13
- package/esm/read.d.ts +54 -7
- package/esm/read.d.ts.map +1 -1
- package/esm/read.js +141 -16
- package/esm/s3/store.d.ts +125 -23
- package/esm/s3/store.d.ts.map +1 -1
- package/esm/s3/store.js +313 -57
- package/esm/sqlite/columns.d.ts +33 -0
- package/esm/sqlite/columns.d.ts.map +1 -0
- package/esm/sqlite/columns.js +51 -0
- package/esm/sqlite/store.d.ts +73 -25
- package/esm/sqlite/store.d.ts.map +1 -1
- package/esm/sqlite/store.js +411 -107
- package/esm/types.d.ts +1 -1
- package/esm/url.d.ts +122 -19
- package/esm/url.d.ts.map +1 -1
- package/esm/url.js +218 -24
- package/esm/walk-via-ls.d.ts +122 -0
- package/esm/walk-via-ls.d.ts.map +1 -0
- package/esm/walk-via-ls.js +178 -0
- package/package.json +1 -1
- package/esm/byte-entity-shim.d.ts +0 -47
- package/esm/byte-entity-shim.d.ts.map +0 -1
- package/esm/byte-entity-shim.js +0 -138
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/src/encrypt/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/src/network/policies/path-vector.d.ts.map +0 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/src/rig/connection.d.ts.map +0 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/src/rig/rig.d.ts.map +0 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/src/rig/types.d.ts.map +0 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/src/types/types.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/mod.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/client-console/client.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/client-console/client.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/encoding/encoding.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/encoding/encoding.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/functional-client/functional-client.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/functional-client/functional-client.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/match-pattern/match-pattern.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/match-pattern/match-pattern.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/decorators.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/decorators.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/network.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/network.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/peer.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/peer.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/flood.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/flood.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/tell-and-read.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/tell-and-read.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/types.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/types.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/observe-emitter/observe-emitter.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/observe-emitter/observe-emitter.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/events.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/events.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/hooks.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/hooks.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/identity.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/identity.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/operation-handle.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/operation-handle.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/reactions.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/reactions.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/types.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/types/types.js +0 -0
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* const rig = new Rig({
|
|
43
43
|
* routes: {
|
|
44
44
|
* receive: [primary, mirror], // broadcast both
|
|
45
|
-
* read: [cache, primary], //
|
|
45
|
+
* read: [cache, primary], // cache wins on match; primary for the rest (first-match-wins)
|
|
46
46
|
* observe: [obsNarrow], // narrow namespace, primary only
|
|
47
47
|
* },
|
|
48
48
|
* });
|
|
@@ -59,12 +59,20 @@ export interface ConnectionOptions {
|
|
|
59
59
|
*/
|
|
60
60
|
id?: string;
|
|
61
61
|
}
|
|
62
|
-
/**
|
|
63
|
-
|
|
62
|
+
/**
|
|
63
|
+
* A connection: a client wrapped with a URI pattern list.
|
|
64
|
+
*
|
|
65
|
+
* Generic over the client's node type. Defaults to
|
|
66
|
+
* `ProtocolInterfaceNode` so bare `Connection` keeps meaning "full
|
|
67
|
+
* node", but a narrower client (e.g. a receive-only node) is preserved
|
|
68
|
+
* as `Connection<{ receive; status }>` — which the rig's per-verb route
|
|
69
|
+
* slots use to reject mis-wiring at compile time.
|
|
70
|
+
*/
|
|
71
|
+
export interface Connection<T = ProtocolInterfaceNode> {
|
|
64
72
|
/** Stable identifier (provided or auto-generated). */
|
|
65
73
|
readonly id: string;
|
|
66
74
|
/** The underlying client. */
|
|
67
|
-
readonly client:
|
|
75
|
+
readonly client: T;
|
|
68
76
|
/**
|
|
69
77
|
* The raw patterns — serializable for wire protocols.
|
|
70
78
|
* Send this to a remote node so it knows what to push.
|
|
@@ -84,5 +92,5 @@ export interface Connection {
|
|
|
84
92
|
* best-effort: the remote node may or may not honor the patterns,
|
|
85
93
|
* but the local rig always filters based on them.
|
|
86
94
|
*/
|
|
87
|
-
export declare function connection(client:
|
|
95
|
+
export declare function connection<T = ProtocolInterfaceNode>(client: T, patterns: string[], options?: ConnectionOptions): Connection<T>;
|
|
88
96
|
//# sourceMappingURL=connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/rig/connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAQ/D,+CAA+C;AAC/C,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,qBAAqB;IACnD,sDAAsD;IACtD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,6BAA6B;IAC7B,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAErC,6DAA6D;IAC7D,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B;AAgBD;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,CAAC,GAAG,qBAAqB,EAClD,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,MAAM,EAAE,EAClB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,UAAU,CAAC,CAAC,CAAC,CAcf"}
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* const rig = new Rig({
|
|
43
43
|
* routes: {
|
|
44
44
|
* receive: [primary, mirror], // broadcast both
|
|
45
|
-
* read: [cache, primary], //
|
|
45
|
+
* read: [cache, primary], // cache wins on match; primary for the rest (first-match-wins)
|
|
46
46
|
* observe: [obsNarrow], // narrow namespace, primary only
|
|
47
47
|
* },
|
|
48
48
|
* });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/rig/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,oCAAoC;AACpC,MAAM,MAAM,YAAY,GACpB,cAAc,GACd,YAAY,GACZ,iBAAiB,GACjB,eAAe,GACf,cAAc,GACd,YAAY,GACZ,WAAW,GACX,SAAS,CAAC;AA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|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/rig/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAI1E;;;;;;GAMG;AACH,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,kCAAkC;AAClC,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;CACb;AAID;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAC1B,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,KACb,IAAI,GAAG;IAAE,GAAG,EAAE,CAAC,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,GAAG;IAAE,GAAG,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CACzB,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,EAChB,MAAM,EAAE,OAAO,KACZ,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAI1B,gDAAgD;AAChD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAErE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,2D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W,WAAW;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC/B,aAAa,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC/B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAID,uCAAuC;AACvC,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,QAAQ,CAU3D;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC,IAAI,CAAC,CAIf;AAID;;;GAGG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,EAC1B,GAAG,EAAE,CAAC,GACL,OAAO,CAAC,CAAC,CAAC,CAOZ;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,CAAC,EAC9B,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,EACzB,GAAG,EAAE,CAAC,EACN,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,IAAI,CAAC,CAGf"}
|
package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/identity.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io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C;KACrB,GAAG,QAAQ;IASZ;;;;;;;;;;;;;OAaG;WACU,UAAU,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAoClE,mEAAmE;IAC7D,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAQ5E,kFAAkF;IAClF,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAY5D,6DAA6D;IAC7D,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI7D,4DAA4D;IAC5D,OAAO,CACL,IAAI,EAAE,UAAU,EAChB,qBAAqB,EAAE,MAAM,GAC5B,OAAO,CAAC,gBAAgB,CAAC;IAI5B,0CAA0C;IAC1C,OAAO,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IASvD;;;;;;OAMG;IACG,MAAM,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAyBzC;;;OAGG;IACH,IAAI,MAAM,IAAI;QAAE,UAAU,EAAE,SAAS,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAQ5D;CACF"}
|
package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/operation-handle.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-handle.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"operation-handle.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/rig/operation-handle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;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OAAO,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GACvD,IAAI,GACJ,SAAS,GACZ,WAAW,CAAC,QAAQ,GAAG,QAAQ,CAAC;CAGpC"}
|
package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/reactions.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactions.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"reactions.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/rig/reactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIxD;;;;;;;;;GASG;AACH,MAAM,MAAM,QAAQ,GAAG,CACrB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,KACT,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AAEvB,+DAA+D;AAC/D,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAavC;;;;;;GAMG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,OAAO,CAAuB;IAEtC;;;OAGG;IACH,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,IAAI;IAanD;;;OAGG;IACH,OAAO,CACL,GAAG,EAAE,MAAM,GACV;QACD,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,QAAQ,CAAC;KACnB,EAAE;IAUH,2CAA2C;IAC3C,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF"}
|
|
@@ -32,6 +32,9 @@ import type { OperationHandle } from "./operation-handle.js";
|
|
|
32
32
|
*
|
|
33
33
|
* @example Authenticated send
|
|
34
34
|
* ```typescript
|
|
35
|
+
* // `message()` is not in b3nd-core — import it from b3nd-canon:
|
|
36
|
+
* // import { message } from "@bandeira-tech/b3nd-canon";
|
|
37
|
+
* //
|
|
35
38
|
* // With messageDataHandler registered, the rig decomposes the
|
|
36
39
|
* // envelope into outputs + null-payload deletions for inputs.
|
|
37
40
|
* const id = await Identity.fromSeed("my-secret");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rig.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/rig/rig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAGV,MAAM,EAEN,aAAa,EACb,qBAAqB,EAIrB,aAAa,EAEb,YAAY,EACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,qBAAa,GAAG;IAEd,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA6C;IAC5E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA0C;IACtE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA6C;IAC5E,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;IAClD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiC;IAC3D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqC;IAC/D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAW;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAA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AMnC;;;;;;;;;;;OAWG;IACH,IAAI,IAAI,OAAO;IAqBf;;;OAGG;IACG,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC;IAIrC;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;IAOxB;;;;;;;;;;;;OAYG;IACH,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,GAAG,MAAM,IAAI;IAI1D,uCAAuC;IACvC,GAAG,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI;IAIrD;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,IAAI;CAGhE"}
|
|
@@ -31,6 +31,9 @@ import { OperationHandleImpl } from "./operation-handle.js";
|
|
|
31
31
|
*
|
|
32
32
|
* @example Authenticated send
|
|
33
33
|
* ```typescript
|
|
34
|
+
* // `message()` is not in b3nd-core — import it from b3nd-canon:
|
|
35
|
+
* // import { message } from "@bandeira-tech/b3nd-canon";
|
|
36
|
+
* //
|
|
34
37
|
* // With messageDataHandler registered, the rig decomposes the
|
|
35
38
|
* // envelope into outputs + null-payload deletions for inputs.
|
|
36
39
|
* const id = await Identity.fromSeed("my-secret");
|
|
@@ -793,6 +796,36 @@ async function* mergeStreams(streams, signal) {
|
|
|
793
796
|
await Promise.allSettled(forwarders);
|
|
794
797
|
}
|
|
795
798
|
}
|
|
799
|
+
/**
|
|
800
|
+
* Derive `ResourceCapabilities` from a rig's per-verb route table.
|
|
801
|
+
*
|
|
802
|
+
* For each verb (`read`, `observe`, `receive`): collect the `patterns`
|
|
803
|
+
* lists of every connection wired into that verb's route, dedupe, and
|
|
804
|
+
* report under the matching key. Patterns are emitted verbatim —
|
|
805
|
+
* wildcards (`*`, `**`) are not expanded.
|
|
806
|
+
*
|
|
807
|
+
* A verb with no connections (or whose connections declared zero
|
|
808
|
+
* patterns) is omitted from the result entirely. If all three verbs are
|
|
809
|
+
* empty, returns `undefined` so the surrounding `StatusResult` omits
|
|
810
|
+
* the `resources` field rather than serializing `{}`.
|
|
811
|
+
*
|
|
812
|
+
* This is the single source of truth for `rig.status().resources` —
|
|
813
|
+
* downstream nodes are not consulted. The rig advertises exactly what
|
|
814
|
+
* its `connection(node, patterns)` registrations say it serves.
|
|
815
|
+
*/
|
|
816
|
+
function deriveResourcesFromRoutes(routes) {
|
|
817
|
+
const result = {};
|
|
818
|
+
for (const verb of ["read", "observe", "receive"]) {
|
|
819
|
+
const seen = new Set();
|
|
820
|
+
for (const conn of routes[verb]) {
|
|
821
|
+
for (const pattern of conn.patterns)
|
|
822
|
+
seen.add(pattern);
|
|
823
|
+
}
|
|
824
|
+
if (seen.size > 0)
|
|
825
|
+
result[verb] = [...seen];
|
|
826
|
+
}
|
|
827
|
+
return Object.keys(result).length > 0 ? result : undefined;
|
|
828
|
+
}
|
|
796
829
|
/**
|
|
797
830
|
* Build dispatch from per-op route arrays.
|
|
798
831
|
*
|
|
@@ -803,7 +836,9 @@ async function* mergeStreams(streams, signal) {
|
|
|
803
836
|
* sources is the job of an aggregating client (e.g. memcache+shards),
|
|
804
837
|
* not the rig.
|
|
805
838
|
* - `observe`: per url, first connection that accepts wins.
|
|
806
|
-
* - `status`: aggregate across unique clients seen on
|
|
839
|
+
* - `status`: aggregate health/schema/fns across unique clients seen on
|
|
840
|
+
* any route. `resources` is derived from the rig's own route table
|
|
841
|
+
* (per-verb connection patterns), not from downstream `status()`.
|
|
807
842
|
*/
|
|
808
843
|
function createRouteDispatch(routes) {
|
|
809
844
|
const { receive, read, observe } = routes;
|
|
@@ -884,13 +919,20 @@ function createRouteDispatch(routes) {
|
|
|
884
919
|
}
|
|
885
920
|
}
|
|
886
921
|
const fns = allFns.size > 0 ? [...allFns] : undefined;
|
|
922
|
+
// Derive `resources` from the rig's own route table. The rig already
|
|
923
|
+
// knows what each connection serves — its `patterns` list — and this
|
|
924
|
+
// is the authoritative source. Downstream nodes are not consulted
|
|
925
|
+
// for resources; what the rig advertises is exactly what it has
|
|
926
|
+
// wired up under each verb. Patterns (including wildcards like `*`
|
|
927
|
+
// and `**`) are reported verbatim — we do not try to expand them.
|
|
928
|
+
const resources = deriveResourcesFromRoutes({ receive, read, observe });
|
|
887
929
|
const unhealthy = results.find((r) => r.status === "unhealthy");
|
|
888
930
|
if (unhealthy)
|
|
889
|
-
return { ...unhealthy, schema: [...allSchema], fns };
|
|
931
|
+
return { ...unhealthy, schema: [...allSchema], fns, resources };
|
|
890
932
|
const degraded = results.find((r) => r.status === "degraded");
|
|
891
933
|
if (degraded)
|
|
892
|
-
return { ...degraded, schema: [...allSchema], fns };
|
|
893
|
-
return { status: "healthy", schema: [...allSchema], fns };
|
|
934
|
+
return { ...degraded, schema: [...allSchema], fns, resources };
|
|
935
|
+
return { status: "healthy", schema: [...allSchema], fns, resources };
|
|
894
936
|
},
|
|
895
937
|
};
|
|
896
938
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module
|
|
3
3
|
* Types for the b3nd Rig — the universal harness.
|
|
4
4
|
*/
|
|
5
|
-
import type { CodeHandler, Program, ProtocolInterfaceNode } from "../types/types.js";
|
|
5
|
+
import type { CodeHandler, Program, ProtocolInterfaceNode, ProtocolObserveNode, ProtocolReadNode, ProtocolReceiveNode } from "../types/types.js";
|
|
6
6
|
import type { HooksConfig } from "./hooks.js";
|
|
7
7
|
import type { EventHandler, RigEventName } from "./events.js";
|
|
8
8
|
import type { ReactionHandler } from "./reactions.js";
|
|
@@ -29,9 +29,9 @@ export type { ProtocolInterfaceNode };
|
|
|
29
29
|
* for a different op means a separate `connection(...)` call.
|
|
30
30
|
*/
|
|
31
31
|
export interface RigRoutes {
|
|
32
|
-
receive?: Connection[];
|
|
33
|
-
read?: Connection[];
|
|
34
|
-
observe?: Connection[];
|
|
32
|
+
receive?: Connection<ProtocolReceiveNode>[];
|
|
33
|
+
read?: Connection<ProtocolReadNode>[];
|
|
34
|
+
observe?: Connection<ProtocolObserveNode>[];
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Configuration for `new Rig()`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/rig/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC;IAC5C,IAAI,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;IACtC,OAAO,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;;;;;;;;;;;OAeG;IACH,MAAM,EAAE,SAAS,CAAC;IAElB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAEvC;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;;;;;;;;;;;;;;;OAgBG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;IAEnD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC7C;AAED;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB,uEAAuE;IACvE,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/B,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH"}
|
|
@@ -28,6 +28,26 @@ export interface HealthStatus {
|
|
|
28
28
|
message?: string;
|
|
29
29
|
details?: Record<string, unknown>;
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* URI prefixes a node serves, per verb. A `Rig` derives this from its
|
|
33
|
+
* own route table — each `connection(node, patterns)` contributes its
|
|
34
|
+
* patterns under the verb(s) it's wired into; downstream nodes are not
|
|
35
|
+
* consulted. Custom (non-Rig) clients may populate this however they
|
|
36
|
+
* choose. Asymmetric wiring (e.g. a read-only mount) is reported
|
|
37
|
+
* faithfully — a prefix appears under exactly the verbs it serves.
|
|
38
|
+
*
|
|
39
|
+
* Discovery clients (UIs, agents) use this to find places where they
|
|
40
|
+
* can mount or observe. For example, a chat looks for prefixes that
|
|
41
|
+
* appear in both `receive` and `observe`.
|
|
42
|
+
*/
|
|
43
|
+
export interface ResourceCapabilities {
|
|
44
|
+
/** URI prefixes this node can serve `read` on. */
|
|
45
|
+
read?: string[];
|
|
46
|
+
/** URI prefixes this node can serve `observe` on. */
|
|
47
|
+
observe?: string[];
|
|
48
|
+
/** URI prefixes this node accepts on `receive`. */
|
|
49
|
+
receive?: string[];
|
|
50
|
+
}
|
|
31
51
|
/**
|
|
32
52
|
* Status response — replaces health() + getSchema().
|
|
33
53
|
* Each client reports its health + capabilities.
|
|
@@ -43,6 +63,10 @@ export interface StatusResult {
|
|
|
43
63
|
message?: string;
|
|
44
64
|
schema?: string[];
|
|
45
65
|
fns?: string[];
|
|
66
|
+
/**
|
|
67
|
+
* URI prefixes this node serves, per verb. See `ResourceCapabilities`.
|
|
68
|
+
*/
|
|
69
|
+
resources?: ResourceCapabilities;
|
|
46
70
|
details?: Record<string, unknown>;
|
|
47
71
|
}
|
|
48
72
|
/**
|
|
@@ -126,95 +150,110 @@ export interface ReceiveResult {
|
|
|
126
150
|
errorDetail?: B3ndError;
|
|
127
151
|
}
|
|
128
152
|
/**
|
|
129
|
-
*
|
|
153
|
+
* ProtocolReceive — the receive capability.
|
|
154
|
+
*
|
|
155
|
+
* `receive` is the unified entry point for all state changes. Each
|
|
156
|
+
* output is `[uri, payload]` where `uri` is the canonical resource
|
|
157
|
+
* identifier the payload is written under. Clients interpret the
|
|
158
|
+
* payload per their role (storage clients persist, audit clients
|
|
159
|
+
* append, forwarders forward). Returns one `ReceiveResult` per output.
|
|
160
|
+
*
|
|
161
|
+
* The return type is `PromiseLike` (not `Promise`) so implementations
|
|
162
|
+
* can return richer await-targets — e.g. the Rig returns an
|
|
163
|
+
* `OperationHandle` that is awaitable AND exposes per-route events.
|
|
164
|
+
* Plain `Promise<ReceiveResult[]>` still satisfies the contract.
|
|
165
|
+
*/
|
|
166
|
+
export interface ProtocolReceive {
|
|
167
|
+
receive(msgs: Output[]): PromiseLike<ReceiveResult[]>;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* ProtocolRead — the read capability.
|
|
130
171
|
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
172
|
+
* Locators are opaque to the framework: their grammar is a contract
|
|
173
|
+
* between the caller and the executing client. Returns one `Output<T>`
|
|
174
|
+
* per input locator, in input order — each `[inputLocator, payload]`,
|
|
175
|
+
* so results are addressable positionally or by lookup.
|
|
176
|
+
*
|
|
177
|
+
* Payload semantics are entirely the client's concern. What "not
|
|
178
|
+
* found" looks like, what listing shapes look like, what extension
|
|
179
|
+
* functions return — all defined by the executing client and agreed
|
|
180
|
+
* with its callers out-of-band.
|
|
181
|
+
*
|
|
182
|
+
* **Errors:** transport / programmer errors throw (network down, no
|
|
183
|
+
* route accepts, grammar violations the client rejects). Anything else
|
|
184
|
+
* — "not found", auth refusals — is encoded in the payload per the
|
|
185
|
+
* client's convention.
|
|
186
|
+
*/
|
|
187
|
+
export interface ProtocolRead {
|
|
188
|
+
read<T = unknown>(locators: string[]): Promise<Output<T>[]>;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* ProtocolObserve — the observe capability.
|
|
192
|
+
*
|
|
193
|
+
* Yields INV-style batches of uris that changed under any subscribed
|
|
194
|
+
* pattern. The observer reads each uri to learn its current state.
|
|
195
|
+
* Locators are matched against emitted uris as segment-globs — pure
|
|
196
|
+
* string pattern matching, no grammar awareness. Each yield is a
|
|
197
|
+
* non-empty `readonly string[]` of concrete uris that fired in this
|
|
198
|
+
* batch. The `signal` controls lifecycle — abort to stop observing.
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```ts
|
|
202
|
+
* const abort = new AbortController();
|
|
203
|
+
* for await (const uris of client.observe(["mutable://market/**"], abort.signal)) {
|
|
204
|
+
* const outputs = await client.read(uris);
|
|
205
|
+
* for (const [uri, payload] of outputs) console.log(uri, payload);
|
|
206
|
+
* }
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
export interface ProtocolObserve {
|
|
210
|
+
observe(locators: string[], signal: AbortSignal): AsyncIterable<readonly string[]>;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* NodeStatus — the discoverability contract.
|
|
214
|
+
*
|
|
215
|
+
* `status()` is not a fourth capability; it is what makes something a
|
|
216
|
+
* *node* rather than a bare receiving/reading/observing client. Its
|
|
217
|
+
* `resources` payload is the standard discovery surface — identical
|
|
218
|
+
* in-process and over the wire. Every wireable node implements it.
|
|
219
|
+
*
|
|
220
|
+
* Clients report health + capabilities; the rig aggregates and adds
|
|
221
|
+
* schema.
|
|
222
|
+
*/
|
|
223
|
+
export interface NodeStatus {
|
|
224
|
+
status(): Promise<StatusResult>;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* A discoverable node that receives. The capability every wireable
|
|
228
|
+
* `receive:`-route member must satisfy: `receive` + `status`.
|
|
136
229
|
*
|
|
137
230
|
* **URIs vs locators.** A *uri* is the canonical identifier of a
|
|
138
231
|
* resource — used for writes and emitted on observe so listeners learn
|
|
139
|
-
* which resource changed. A *locator* is any addressing string a
|
|
140
|
-
* passes to `read`/`observe`:
|
|
232
|
+
* which resource changed. A *locator* is any addressing string a
|
|
233
|
+
* caller passes to `read`/`observe`: a bare uri, a pattern with
|
|
141
234
|
* wildcards, or a uri decorated with request-time directives. The
|
|
142
235
|
* framework treats locators as opaque — it routes them by string
|
|
143
236
|
* pattern matching and hands them to the executing client verbatim.
|
|
144
|
-
|
|
145
|
-
|
|
237
|
+
*/
|
|
238
|
+
export interface ProtocolReceiveNode extends ProtocolReceive, NodeStatus {
|
|
239
|
+
}
|
|
240
|
+
/** A discoverable node that reads: `read` + `status`. */
|
|
241
|
+
export interface ProtocolReadNode extends ProtocolRead, NodeStatus {
|
|
242
|
+
}
|
|
243
|
+
/** A discoverable node that observes: `observe` + `status`. */
|
|
244
|
+
export interface ProtocolObserveNode extends ProtocolObserve, NodeStatus {
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* ProtocolInterfaceNode (PIN) — the full node: all three capabilities
|
|
248
|
+
* plus discoverability. The canonical interface implemented by clients
|
|
249
|
+
* that serve every verb (Memory, HTTP, WebSocket, Postgres, IndexedDB,
|
|
250
|
+
* the Rig itself, …), enabling recursive composition and uniform usage.
|
|
146
251
|
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
252
|
+
* Structurally identical to the pre-split interface — `{ receive, read,
|
|
253
|
+
* observe, status }` — so it remains a drop-in for every existing
|
|
254
|
+
* implementer and consumer.
|
|
149
255
|
*/
|
|
150
|
-
export interface ProtocolInterfaceNode {
|
|
151
|
-
/**
|
|
152
|
-
* Receive a batch of outputs — the unified entry point for all state changes.
|
|
153
|
-
*
|
|
154
|
-
* Each output is `[uri, payload]` where `uri` is the canonical
|
|
155
|
-
* resource identifier the payload is written under. Clients interpret
|
|
156
|
-
* the payload per their role (storage clients persist, audit clients
|
|
157
|
-
* append, forwarders forward). Returns one `ReceiveResult` per output.
|
|
158
|
-
*
|
|
159
|
-
* The return type is `PromiseLike` (not `Promise`) so implementations
|
|
160
|
-
* can return richer await-targets — e.g., the Rig returns an
|
|
161
|
-
* `OperationHandle` that's awaitable AND exposes per-route events.
|
|
162
|
-
* Plain `Promise<ReceiveResult[]>` still satisfies the contract.
|
|
163
|
-
*/
|
|
164
|
-
receive(msgs: Output[]): PromiseLike<ReceiveResult[]>;
|
|
165
|
-
/**
|
|
166
|
-
* Read a batch of locators.
|
|
167
|
-
*
|
|
168
|
-
* Locators are opaque to the framework: their grammar is a contract
|
|
169
|
-
* between the caller and the executing client. The rig routes each
|
|
170
|
-
* locator to the first connection whose pattern accepts it (pure
|
|
171
|
-
* string pattern matching, no normalization).
|
|
172
|
-
*
|
|
173
|
-
* **Shape: 1:1 with input.** Returns one `Output<T>` per input
|
|
174
|
-
* locator, in input order. Each output is `[inputLocator, payload]` —
|
|
175
|
-
* the first element echoes the caller's locator so results are
|
|
176
|
-
* addressable positionally or by lookup.
|
|
177
|
-
*
|
|
178
|
-
* Payload semantics are entirely the client's concern. What "not
|
|
179
|
-
* found" looks like, what listing shapes look like, what extension
|
|
180
|
-
* functions return — all defined by the executing client and agreed
|
|
181
|
-
* with its callers out-of-band.
|
|
182
|
-
*
|
|
183
|
-
* **Errors:** transport / programmer errors throw (network down, no
|
|
184
|
-
* route accepts, grammar violations the client rejects). Anything
|
|
185
|
-
* else — "not found", auth refusals, etc. — is encoded in the payload
|
|
186
|
-
* per the client's convention.
|
|
187
|
-
*/
|
|
188
|
-
read<T = unknown>(locators: string[]): Promise<Output<T>[]>;
|
|
189
|
-
/**
|
|
190
|
-
* Observe a batch of locators. Yields INV-style batches of uris that
|
|
191
|
-
* changed under any subscribed pattern. The observer reads each uri
|
|
192
|
-
* to learn its current state.
|
|
193
|
-
*
|
|
194
|
-
* Locators are matched against emitted uris as segment-globs — pure
|
|
195
|
-
* string pattern matching, no grammar awareness. Each yield is a
|
|
196
|
-
* non-empty `readonly string[]` of concrete uris that fired in this
|
|
197
|
-
* batch. Which of the caller's subscription locators matched is not
|
|
198
|
-
* surfaced; the caller can re-match locally if it needs that routing,
|
|
199
|
-
* which keeps the wire (and in-process surface) minimal.
|
|
200
|
-
*
|
|
201
|
-
* The `signal` controls lifecycle — abort to stop observing.
|
|
202
|
-
*
|
|
203
|
-
* @example
|
|
204
|
-
* ```ts
|
|
205
|
-
* const abort = new AbortController();
|
|
206
|
-
* for await (const uris of client.observe(["mutable://market/**"], abort.signal)) {
|
|
207
|
-
* const outputs = await client.read(uris);
|
|
208
|
-
* for (const [uri, payload] of outputs) console.log(uri, payload);
|
|
209
|
-
* }
|
|
210
|
-
* ```
|
|
211
|
-
*/
|
|
212
|
-
observe(locators: string[], signal: AbortSignal): AsyncIterable<readonly string[]>;
|
|
213
|
-
/**
|
|
214
|
-
* Status — health + capabilities.
|
|
215
|
-
* Clients report health. The rig aggregates and adds schema.
|
|
216
|
-
*/
|
|
217
|
-
status(): Promise<StatusResult>;
|
|
256
|
+
export interface ProtocolInterfaceNode extends ProtocolReceive, ProtocolRead, ProtocolObserve, NodeStatus {
|
|
218
257
|
}
|
|
219
258
|
/**
|
|
220
259
|
* Structured error codes for programmatic error handling.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.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AG,SAAS;yBAK7B,MAAM,YAAY,OAAO,KAAG,SAAS;2BAMnC,MAAM,QAAQ,MAAM,KAAG,SAAS;oBAKvC,MAAM,KAAG,SAAS;oBAKlB,MAAM,QAAQ,MAAM,KAAG,SAAS;wBAK5B,MAAM,QAAQ,MAAM,KAAG,SAAS;oBAKpC,MAAM,QAAQ,MAAM,KAAG,SAAS;CAKjD,CAAC;AAEF;;;GAGG;AACH,qBAAa,WAAY,SAAQ,KAAK;aAGlB,IAAI,EAAE,MAAM;aACZ,OAAO,CAAC,EAAE,OAAO;gBAFjC,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,OAAO,YAAA;CAKpC;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,CAAC,CAAC;CACT"}
|
package/esm/dispatch.d.ts
CHANGED
|
@@ -3,15 +3,45 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Every store parses the input url, switches on `fn`, and calls back
|
|
5
5
|
* into store-supplied handlers. Centralising the dispatch keeps the
|
|
6
|
-
* `read`/`ls`/`count`/`x-*` switch identical across stores so
|
|
7
|
-
* cannot drift apart.
|
|
6
|
+
* `read`/`ls`/`find`/`count`/`x-*` switch identical across stores so
|
|
7
|
+
* they cannot drift apart.
|
|
8
8
|
*
|
|
9
9
|
* Stores call `dispatchRead(urls, handlers)`; the helper handles
|
|
10
10
|
* parsing, the fn switch, and tuple assembly. Each handler receives
|
|
11
11
|
* the parsed url and returns the payload — the helper wraps it into
|
|
12
12
|
* `[inputUrl, payload]`.
|
|
13
|
+
*
|
|
14
|
+
* v2 listing-spec additions (see `.cc-chat/20260625121936-grammar-shape`):
|
|
15
|
+
*
|
|
16
|
+
* - **`find` case** — requires an explicit `handlers.find` registration
|
|
17
|
+
* (mirrors the `ext?:` opt-in pattern). When `handlers.find` is
|
|
18
|
+
* absent, dispatch throws via the same "unsupported fn" path as any
|
|
19
|
+
* unknown verb — no silent fall-back through `ls`. Stores that
|
|
20
|
+
* support deep walks must wire their own `find` handler (push-down
|
|
21
|
+
* into the backend, or an in-process recursive walk built on `ls`).
|
|
22
|
+
* See spec §3.5: a store that does not advertise `"find"` in
|
|
23
|
+
* `status().fns` MUST throw on `fn=find`.
|
|
24
|
+
*
|
|
25
|
+
* - **`count` case (URL-shape-aware)** — `fn=count` is valid under any
|
|
26
|
+
* URL shape (spec §3.2). Dispatch keeps the existing `handlers.count`
|
|
27
|
+
* path for no-wildcard and shallow-wildcard URLs. When the URL carries
|
|
28
|
+
* a `**` glob, `count` mirrors `find`'s deep walk: either the store
|
|
29
|
+
* has set `pushDownCount: true` (dispatch trusts `handlers.count` to
|
|
30
|
+
* run the deep COUNT in-backend) or dispatch calls `handlers.find` and
|
|
31
|
+
* returns the length of the walked result. If the store advertises
|
|
32
|
+
* neither (`pushDownCount` false AND no `handlers.find`), dispatch
|
|
33
|
+
* throws "unsupported fn 'count'" — no silent shallow-count fall-back,
|
|
34
|
+
* same loud-failure rule as `fn=find` (§3.5).
|
|
35
|
+
*
|
|
36
|
+
* - **cursor-as-trailing-slot** — when `find` or `ls` is called with
|
|
37
|
+
* `limit=<n>`, dispatch appends ONE extra `Output` to the returned
|
|
38
|
+
* array: `[<cursor-uri>, { next: "<opaque>" | null }]`. The cursor
|
|
39
|
+
* URI is the original locator with `cursor=<opaque>` added (or
|
|
40
|
+
* replaced). `next: null` signals end-of-result; otherwise `next` is
|
|
41
|
+
* the opaque token to re-issue the request. The caller can do
|
|
42
|
+
* `read([slot.uri])` literally and walk the next page.
|
|
13
43
|
*/
|
|
14
|
-
import type { Output } from "./deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
44
|
+
import type { Output } from "./deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/types/types.js";
|
|
15
45
|
import type { ParsedUrl } from "./url.js";
|
|
16
46
|
export interface ReadHandlers {
|
|
17
47
|
/** Point read. Return `undefined` for a miss. */
|
|
@@ -30,6 +60,89 @@ export interface ReadHandlers {
|
|
|
30
60
|
* If absent, unknown fns throw.
|
|
31
61
|
*/
|
|
32
62
|
ext?: (parsed: ParsedUrl) => unknown | Promise<unknown>;
|
|
63
|
+
/**
|
|
64
|
+
* Optional handler for `fn=find` (recursive walk). Mirrors the
|
|
65
|
+
* `ext?:` pattern: when absent, dispatch throws "unsupported fn
|
|
66
|
+
* 'find'" via the same path as any unknown verb — NO silent fall-back
|
|
67
|
+
* through `ls`. This is the v2 §3.5 contract: stores that do not
|
|
68
|
+
* advertise `"find"` in `status().fns` get a loud failure on
|
|
69
|
+
* `fn=find` calls, never plausible-but-wrong shallow results.
|
|
70
|
+
*
|
|
71
|
+
* Stores that want to support find must supply this handler — either
|
|
72
|
+
* a push-down query (set `pushDownFind: true`) or an in-process
|
|
73
|
+
* recursive walk that produces deep matches.
|
|
74
|
+
*/
|
|
75
|
+
find?: (parsed: ParsedUrl) => unknown | Promise<unknown>;
|
|
76
|
+
/**
|
|
77
|
+
* Opt-in: this handler honours `pattern` in its own ls/count
|
|
78
|
+
* queries (push-down). When true, dispatch passes `pattern`
|
|
79
|
+
* through unchanged and skips the post-filter — the backend is
|
|
80
|
+
* trusted to combine `pattern` with `limit`/`page`/`sortBy=uri`
|
|
81
|
+
* correctly inside its query. `count` with a pattern also routes
|
|
82
|
+
* to the backend's own `count` handler (push-down COUNT).
|
|
83
|
+
*
|
|
84
|
+
* When false (default), dispatch strips `pattern` + pagination from
|
|
85
|
+
* the handler call and applies them locally on the returned rows
|
|
86
|
+
* (correct but unable to leverage backend indices).
|
|
87
|
+
*/
|
|
88
|
+
pushDownPattern?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Opt-in: this handler honours `cursor` in its own ls/count
|
|
91
|
+
* queries. When true, dispatch passes `cursor` through and skips
|
|
92
|
+
* the post-filter — the backend combines `cursor` with the active
|
|
93
|
+
* sort order (`uri > cursor` for asc, `uri < cursor` for desc) and
|
|
94
|
+
* with `limit` inside its query. `count` with a cursor likewise
|
|
95
|
+
* goes through the backend's own `count` handler.
|
|
96
|
+
*
|
|
97
|
+
* When false (default), dispatch strips `cursor` + pagination from
|
|
98
|
+
* the handler call and post-filters locally.
|
|
99
|
+
*/
|
|
100
|
+
pushDownCursor?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Opt-in: this handler honours `sortBy=<field>` (any field, not
|
|
103
|
+
* just `"uri"`) in its own ls query. When true, dispatch passes
|
|
104
|
+
* the sortBy through unchanged. When false (default), dispatch
|
|
105
|
+
* post-sorts by record field in JS — the backend ignores
|
|
106
|
+
* non-uri sortBy values (or treats them as uri sort).
|
|
107
|
+
*
|
|
108
|
+
* Every backend always handles `sortBy="uri"` natively; this flag
|
|
109
|
+
* only controls non-uri sortBy.
|
|
110
|
+
*/
|
|
111
|
+
pushDownSortBy?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Opt-in: when `handlers.find` is registered, this flag says the
|
|
114
|
+
* backend honours `pattern` + pagination inside its own query
|
|
115
|
+
* (typically by removing the shallow `LIKE %/%` predicate or by
|
|
116
|
+
* swapping a `[^/]+` regex body for `.*`). When true, dispatch
|
|
117
|
+
* passes `pattern` through unchanged and skips the post-filter.
|
|
118
|
+
*
|
|
119
|
+
* When false (default) and `handlers.find` is registered, dispatch
|
|
120
|
+
* post-filters the rows the handler returned against the user's
|
|
121
|
+
* pattern — the handler is expected to return all entries under the
|
|
122
|
+
* prefix (deep walk) so the post-filter can run honestly.
|
|
123
|
+
*
|
|
124
|
+
* Has no effect when `handlers.find` is absent — that case throws
|
|
125
|
+
* "unsupported fn 'find'" at the dispatch switch.
|
|
126
|
+
*/
|
|
127
|
+
pushDownFind?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Opt-in: this backend has an efficient deep COUNT (e.g. SQL
|
|
130
|
+
* `COUNT(*)` with a `LIKE` pattern, ES `count` query) and wants
|
|
131
|
+
* `?fn=count` routed directly to `handlers.count` for ALL URL shapes
|
|
132
|
+
* — including `**` deep counts. When true, dispatch never falls back
|
|
133
|
+
* to walking via `handlers.find`; the store owns the deep-count
|
|
134
|
+
* translation just like `pushDownFind` owns the deep-walk push-down.
|
|
135
|
+
*
|
|
136
|
+
* When false (default), `?fn=count` under a `**` URL routes to
|
|
137
|
+
* `handlers.find` and dispatch returns the walked-result length. If
|
|
138
|
+
* `handlers.find` is also absent, dispatch throws "unsupported fn
|
|
139
|
+
* 'count'" (mirrors the §3.5 loud-failure rule for `fn=find`).
|
|
140
|
+
*
|
|
141
|
+
* Has no effect on no-wildcard or shallow (`*` / `?`) count URLs —
|
|
142
|
+
* those always route through `handlers.count` or the existing
|
|
143
|
+
* filtered-count `handlers.ls` path.
|
|
144
|
+
*/
|
|
145
|
+
pushDownCount?: boolean;
|
|
33
146
|
}
|
|
34
147
|
export declare function dispatchRead<T = unknown>(urls: string[], storeName: string, handlers: ReadHandlers): Promise<Output<T>[]>;
|
|
35
148
|
//# sourceMappingURL=dispatch.d.ts.map
|
package/esm/dispatch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../src/dispatch.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../src/dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kEAAkE,CAAC;AAG/F,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,UAAU,CAAC;AAGtD,MAAM,WAAW,YAAY;IAC3B,iDAAiD;IACjD,IAAI,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CA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