@mnmal-ai/substrate 1.0.0-alpha.1 → 1.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -6
- package/dist/boot-store-BVqfFxh1.js +4060 -0
- package/dist/{runtime-metrics-DwpDJ8vz.d.ts → bridge-Cp4PaIYO.d.ts} +2 -87
- package/dist/cli-hSCBywhE.js +3126 -0
- package/dist/client.d.ts +130 -8
- package/dist/client.js +6 -5
- package/dist/{plugin-t2g2wX0b.d.ts → dataset-CejF-Fr_.d.ts} +1640 -1320
- package/dist/{agent-token-BIboWOU0.js → env-utils-CGNazUNt.js} +31 -2
- package/dist/{errors-D4vKuwz8.d.ts → errors-7mycvNGq.d.ts} +1 -1
- package/dist/{index-D7mSOFlM.d.ts → index-DgSfwx7M.d.ts} +1 -1
- package/dist/node-version-C5FSmwJX.js +26 -0
- package/dist/pack.d.ts +2 -2
- package/dist/pack.js +1 -1
- package/dist/pg-edges-store-Lxsl5ZnK.js +381 -0
- package/dist/{plugin-BuQQEzL-.js → plugin-CtwOINCM.js} +171 -18
- package/dist/proposals-bootstrap.js +6 -4
- package/dist/proposals.config.schema.json +5 -0
- package/dist/proposals.d.ts +15 -4
- package/dist/proposals.default-config.json +2 -1
- package/dist/proposals.js +2 -2
- package/dist/recall-bootstrap.js +13 -4
- package/dist/recall.config.schema.json +12 -0
- package/dist/recall.d.ts +54 -9
- package/dist/recall.js +2 -2
- package/dist/{repl-C52wyfMs.js → repl-DqfHelK7.js} +62 -29
- package/dist/{row-ByLFE2Wx.d.ts → row-BKKCXIG6.d.ts} +5 -3
- package/dist/run-B5dTbZ3g.js +1997 -0
- package/dist/{schema-g4FQLr0V.d.ts → schema-DoSc-4ig.d.ts} +44 -7
- package/dist/script-C6DSa_Na.js +134 -0
- package/dist/sdk.d.ts +90 -12
- package/dist/sdk.js +5 -110
- package/dist/{src-YXlv_RyL.js → src-5SJ5GEIM.js} +1555 -326
- package/dist/{src-DuopV8u7.js → src-7CUSMK66.js} +148 -19
- package/dist/{src-zcyUofMJ.js → src-Bi849yhn.js} +39 -15
- package/dist/{src-5hVbeiAu.js → src-CqT-QWZ_.js} +697 -57
- package/dist/src-CyvV7dCK.js +4333 -0
- package/dist/{row-DK7lPZVe.js → src-Da0t6si5.js} +11 -11
- package/dist/{src-C4DzaIQZ.js → src-hZb8wfvg.js} +12 -1
- package/dist/substrate-admin.js +17 -781
- package/dist/substrate.js +4 -5476
- package/dist/testing.d.ts +557 -8
- package/dist/testing.js +39 -3
- package/dist/{ws-C72iVS5T.d.ts → ws-ByZyHk7m.d.ts} +3 -3
- package/package.json +21 -20
- package/dist/dataset-DOXGRz50.js +0 -1535
- package/dist/env-utils-B7SGmoeJ.js +0 -21
- package/dist/src-CjEwiKXw.js +0 -2327
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { createRequire as __binCreateRequire } from 'node:module'; const require = __binCreateRequire(import.meta.url);
|
|
2
|
+
import "./src-hZb8wfvg.js";
|
|
3
|
+
|
|
2
4
|
//#region ../../packages/substrate-policy/src/encoding.ts
|
|
3
5
|
/**
|
|
4
6
|
* Comma-separated string-list encoding. Spec §5.12.
|
|
@@ -388,18 +390,16 @@ function newlyGranted(prev, next) {
|
|
|
388
390
|
* facing refusal message.
|
|
389
391
|
*/
|
|
390
392
|
function newlyGrantedPairs(prev, next) {
|
|
391
|
-
const
|
|
392
|
-
const direct = prev[ns];
|
|
393
|
-
if (Array.isArray(direct) && direct.includes(cap)) return true;
|
|
394
|
-
const wild = prev["*"];
|
|
395
|
-
return Array.isArray(wild) && wild.includes(cap);
|
|
396
|
-
};
|
|
393
|
+
const effective = (grant, ns) => grant[ns] ?? grant["*"] ?? [];
|
|
397
394
|
const byNs = /* @__PURE__ */ new Map();
|
|
398
|
-
for (const
|
|
399
|
-
|
|
400
|
-
const
|
|
401
|
-
|
|
402
|
-
|
|
395
|
+
for (const ns of /* @__PURE__ */ new Set([...Object.keys(prev), ...Object.keys(next)])) {
|
|
396
|
+
const had = effective(prev, ns);
|
|
397
|
+
for (const cap of effective(next, ns)) {
|
|
398
|
+
if (had.includes(cap)) continue;
|
|
399
|
+
const bucket = byNs.get(ns);
|
|
400
|
+
if (bucket === void 0) byNs.set(ns, [cap]);
|
|
401
|
+
else bucket.push(cap);
|
|
402
|
+
}
|
|
403
403
|
}
|
|
404
404
|
return [...byNs.entries()].map(([ns, caps]) => `${ns}:${[...caps].sort().join("+")}`).sort();
|
|
405
405
|
}
|
|
@@ -29,6 +29,15 @@ function formatQualifiedKey(namespace, name) {
|
|
|
29
29
|
return `${namespace}/${name}`;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region ../../packages/substrate-types/src/schema.ts
|
|
34
|
+
/** Natural order of a type that declares none: newest first. */
|
|
35
|
+
const DEFAULT_ORDERED_BY = Object.freeze({ createdAt: "desc" });
|
|
36
|
+
/** The declared natural order, or {@link DEFAULT_ORDERED_BY}. */
|
|
37
|
+
function naturalOrderOf(schema) {
|
|
38
|
+
return schema.orderedBy ?? DEFAULT_ORDERED_BY;
|
|
39
|
+
}
|
|
40
|
+
|
|
32
41
|
//#endregion
|
|
33
42
|
//#region ../../packages/substrate-pack/src/_plan-cache.ts
|
|
34
43
|
/**
|
|
@@ -208,6 +217,7 @@ function decodeEnvelope(bytes, ctx) {
|
|
|
208
217
|
if (raw._meta !== void 0) out._meta = raw._meta;
|
|
209
218
|
if (raw._pagination !== void 0) out._pagination = raw._pagination;
|
|
210
219
|
if (raw._completeness !== void 0) out._completeness = raw._completeness;
|
|
220
|
+
if (raw._diagnostics !== void 0) out._diagnostics = raw._diagnostics;
|
|
211
221
|
if (raw.errors !== void 0) out.errors = raw.errors;
|
|
212
222
|
return out;
|
|
213
223
|
}
|
|
@@ -482,6 +492,7 @@ function encodeEnvelope(envelope, ctx) {
|
|
|
482
492
|
if (envelope._meta !== void 0) out._meta = envelope._meta;
|
|
483
493
|
if (envelope._pagination !== void 0) out._pagination = envelope._pagination;
|
|
484
494
|
if (envelope._completeness !== void 0) out._completeness = envelope._completeness;
|
|
495
|
+
if (envelope._diagnostics !== void 0) out._diagnostics = envelope._diagnostics;
|
|
485
496
|
if (envelope.errors !== void 0) out.errors = envelope.errors;
|
|
486
497
|
return Buffer.from(pack(out));
|
|
487
498
|
}
|
|
@@ -834,4 +845,4 @@ function applyDecodePlanInPlace(envelope, plan) {
|
|
|
834
845
|
const WS_SUBPROTOCOL_SUBSTRATE_PACK = "substrate-pack";
|
|
835
846
|
|
|
836
847
|
//#endregion
|
|
837
|
-
export {
|
|
848
|
+
export { parseQualifiedKey as C, formatQualifiedKey as S, decodeEnvelope as _, buildDecodePlan as a, DEFAULT_ORDERED_BY as b, isPlainRequestData as c, PackEncodeError as d, encodeEnvelope as f, SchemaDriftError as g, PackDecodeError as h, applyDecodePlanInPlace as i, decodeStreamChunk as l, encodePositionalFromFieldDef as m, packFrame as n, decodeWsEnvelope as o, encodePositional as p, unpackFrame as r, encodeWsFrame as s, WS_SUBPROTOCOL_SUBSTRATE_PACK as t, encodeStreamChunk as u, decodePositional as v, assertNever as w, naturalOrderOf as x, decodePositionalFromFieldDef as y };
|