@mnmal-ai/substrate 1.0.0-alpha.16 → 1.0.0-alpha.18
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 +5 -4
- package/dist/{boot-store-HxCgbvNl.js → boot-store-C8KrACZ5.js} +51 -72
- package/dist/{bridge-CvZGzNIO.d.ts → bridge-5VHZiH9o.d.ts} +1 -1
- package/dist/{cli-6mjAWiEZ.js → cli-zZ7nHhY5.js} +235 -16
- package/dist/client.d.ts +8 -3
- package/dist/client.js +4 -4
- package/dist/{errors-BXxm9eZF.d.ts → errors-DHgT7Fa8.d.ts} +8 -2
- package/dist/{index-EN-nQsX8.d.ts → index-DKJXQ031.d.ts} +1 -1
- package/dist/{node-version-C5FSmwJX.js → node-version-CxqcqECU.js} +1 -1
- package/dist/pack.d.ts +18 -2
- package/dist/pack.js +2 -2
- package/dist/{pg-edges-store-De5F1tUf.js → pg-edges-store-D7etFxNK.js} +1 -1
- package/dist/{plugin-Dpa_Y7Ep.js → plugin-DcoJGEMM.js} +2 -2
- package/dist/proposals-bootstrap.js +2 -2
- package/dist/proposals.d.ts +5 -3
- package/dist/proposals.js +1 -1
- package/dist/recall-bootstrap.js +2 -2
- package/dist/recall.d.ts +1 -1
- package/dist/recall.js +2 -2
- package/dist/{repl-2WfRPUb0.js → repl-SY8cLOZl.js} +1 -1
- package/dist/{row-Dh57ShWL.d.ts → row-DHxnCnhA.d.ts} +10 -8
- package/dist/{run-ChcHBIN3.js → run-Cr-53N3F.js} +142 -106
- package/dist/{schema-B--_bHjn.d.ts → schema-B5WBO8yh.d.ts} +79 -19
- package/dist/{script-C6DSa_Na.js → script-B-32wZGY.js} +11 -1
- package/dist/script-runner.js +78 -0
- package/dist/sdk.d.ts +51 -8
- package/dist/sdk.js +4 -4
- package/dist/{src-B4sqnLRy.js → src-B4dTiEWw.js} +77 -28
- package/dist/{src-DHLw3eCn.js → src-BcuotITf.js} +1016 -231
- package/dist/{src-DWqzrm3O.js → src-CdbUzLhB.js} +209 -36
- package/dist/{src-BMHI_rTJ.js → src-D55T3ZcP.js} +2203 -499
- package/dist/{src-Bi3NhEsT.js → src-DR_hUj2p.js} +1 -1
- package/dist/{src-CHND7-Pm.js → src-DV6PcXym.js} +2 -2
- package/dist/{src--uyAqssS.js → src-DZfgQ2gR.js} +3 -3
- package/dist/substrate-admin.js +2 -2
- package/dist/substrate.js +2 -2
- package/dist/testing.d.ts +5 -3
- package/dist/testing.js +4 -4
- package/dist/{ws-CpHWxwp9.d.ts → ws-BL9nSELO.d.ts} +2 -2
- package/package.json +21 -21
|
@@ -192,6 +192,47 @@ interface EdgesStore {
|
|
|
192
192
|
withTransaction<T>(fn: (tx: EdgesStore) => Promise<T>): Promise<T>;
|
|
193
193
|
}
|
|
194
194
|
//#endregion
|
|
195
|
+
//#region ../../packages/substrate-types/src/expression.d.ts
|
|
196
|
+
/**
|
|
197
|
+
* Typed expressions for the read grammar: the JSON form, the type lattice, the
|
|
198
|
+
* curated function catalogue and the size limits.
|
|
199
|
+
*
|
|
200
|
+
* An expression is a bare string (a field, or `_agg.<name>`), a number, boolean
|
|
201
|
+
* or `null` literal, `{ lit: "text" }` (string literal), `{ int64: "<decimal>" }`
|
|
202
|
+
* (exact int64 constant) or `{ <fn>: [args...] }` (a call, one key).
|
|
203
|
+
*/
|
|
204
|
+
type Expr = string | number | boolean | null | {
|
|
205
|
+
lit: string;
|
|
206
|
+
} | {
|
|
207
|
+
int64: string;
|
|
208
|
+
} | {
|
|
209
|
+
[fn: string]: Expr[];
|
|
210
|
+
};
|
|
211
|
+
type ExprType = 'number' | 'int64' | 'string' | 'boolean' | 'date';
|
|
212
|
+
/**
|
|
213
|
+
* An argument slot. `'any'` slots unify to one type (int64 and number compare
|
|
214
|
+
* as number); `'unit'` is a `{ lit }` date unit, `'pattern'` a `{ lit }`
|
|
215
|
+
* regex and `'likePattern'` a `{ lit }` LIKE pattern, all literal-only.
|
|
216
|
+
*/
|
|
217
|
+
type ArgType = ExprType | 'any' | 'unit' | 'pattern' | 'likePattern';
|
|
218
|
+
interface FunctionSig {
|
|
219
|
+
name: string;
|
|
220
|
+
/** Fixed argument slots, or `'variadic'` when the checker applies the function's own rules. */
|
|
221
|
+
args: ArgType[] | 'variadic';
|
|
222
|
+
/** `'any'` is the unified type of the `'any'` (and, for arithmetic, `'number'`) arguments. */
|
|
223
|
+
returns: ExprType | 'any';
|
|
224
|
+
description: string;
|
|
225
|
+
}
|
|
226
|
+
declare const EXPR_FUNCTIONS: readonly FunctionSig[];
|
|
227
|
+
declare const EXPR_LIMITS: {
|
|
228
|
+
maxDepth: number;
|
|
229
|
+
maxNodesPerExpr: number;
|
|
230
|
+
maxNodesPerFrame: number;
|
|
231
|
+
};
|
|
232
|
+
/** The aggregate names `_agg`, `having` and grouped reads accept. */
|
|
233
|
+
declare const EXPR_AGGREGATES: readonly ['count', 'countDistinct', 'sum', 'avg', 'min', 'max'];
|
|
234
|
+
declare const DATE_UNITS: readonly ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'];
|
|
235
|
+
//#endregion
|
|
195
236
|
//#region ../../packages/substrate-types/src/runtime-metrics.d.ts
|
|
196
237
|
/** Per-key resolver latency and error counts, as served by GET /substrate/v1/metrics. */
|
|
197
238
|
interface ResolverStat {
|
|
@@ -413,20 +454,19 @@ type WalkAgg = {
|
|
|
413
454
|
out?: string;
|
|
414
455
|
where?: WhereClause;
|
|
415
456
|
} & AggFn;
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
/** `diff` is a − b, `ratio` a / b, and `value` one operand as it is (to order by a walked value). */
|
|
424
|
-
type DeriveSpec = {
|
|
425
|
-
diff: [string, string];
|
|
457
|
+
/** A frame aggregate: `count: true` counts rows; every other argument is an expression. */
|
|
458
|
+
type FrameAgg = {
|
|
459
|
+
count: Expr;
|
|
460
|
+
} | {
|
|
461
|
+
countDistinct: Expr;
|
|
462
|
+
} | {
|
|
463
|
+
avg: Expr;
|
|
426
464
|
} | {
|
|
427
|
-
|
|
465
|
+
sum: Expr;
|
|
428
466
|
} | {
|
|
429
|
-
|
|
467
|
+
min: Expr;
|
|
468
|
+
} | {
|
|
469
|
+
max: Expr;
|
|
430
470
|
};
|
|
431
471
|
interface NestedSelection {
|
|
432
472
|
_walk: {
|
|
@@ -463,7 +503,6 @@ type WalkAggPredicate = {
|
|
|
463
503
|
* deterministic tie-break is what makes cursor pagination stable across pages.
|
|
464
504
|
*/
|
|
465
505
|
interface OrderByClause {
|
|
466
|
-
/** A `$`-prefixed key orders by a `params.derive` entry. */
|
|
467
506
|
[field: string]: 'asc' | 'desc';
|
|
468
507
|
}
|
|
469
508
|
interface ReadParams {
|
|
@@ -478,8 +517,14 @@ interface ReadParams {
|
|
|
478
517
|
/** Return a match count (`ReadResult.count`). */
|
|
479
518
|
count?: boolean;
|
|
480
519
|
aggregate?: Record<string, FrameAgg>;
|
|
481
|
-
|
|
482
|
-
|
|
520
|
+
/** Group keys by output name; with `aggregate`, the read returns one group per distinct key tuple. */
|
|
521
|
+
groupBy?: Record<string, Expr>;
|
|
522
|
+
/** A boolean expression over group keys and aggregate names, applied before order and limit. */
|
|
523
|
+
having?: Expr;
|
|
524
|
+
/** Groups to skip, on a grouped read. */
|
|
525
|
+
offset?: number;
|
|
526
|
+
/** Computed per-row values by output name: each row gains one key per entry, which `orderBy` may use. */
|
|
527
|
+
select?: Record<string, Expr>;
|
|
483
528
|
/** Per-row walk aggregates, lifted out of `fields` by the list resolver. */
|
|
484
529
|
agg?: Record<string, WalkAgg>;
|
|
485
530
|
/** Per-row nested selections, lifted out of `fields` by the list resolver. */
|
|
@@ -604,7 +649,7 @@ interface DropResult {
|
|
|
604
649
|
* validates every where-clause leaf against `operators[fieldKind]` and rejects
|
|
605
650
|
* ops the dataset can't execute rather than returning a silently wrong result.
|
|
606
651
|
*/
|
|
607
|
-
type FieldKind = 'scalar.number' | 'scalar.string' | 'scalar.boolean' | 'scalar.date' | 'scalar.json' | 'crossRef' | 'list';
|
|
652
|
+
type FieldKind = 'scalar.number' | 'scalar.int16' | 'scalar.int32' | 'scalar.int64' | 'scalar.string' | 'scalar.boolean' | 'scalar.date' | 'scalar.json' | 'crossRef' | 'list';
|
|
608
653
|
interface FilterCapabilities {
|
|
609
654
|
operators: Record<FieldKind, string[]>;
|
|
610
655
|
/** Does the dataset honour `orderBy`? */
|
|
@@ -806,6 +851,13 @@ interface Dataset {
|
|
|
806
851
|
* OPTIONAL. Backends with no per-type tables omit it.
|
|
807
852
|
*/
|
|
808
853
|
fieldWarnings?(): Promise<string[]>;
|
|
854
|
+
/**
|
|
855
|
+
* The connection pool right now: connections open, opening, idle and leased,
|
|
856
|
+
* and requests waiting for one. Counts only; `/health` shows it unauthenticated.
|
|
857
|
+
*
|
|
858
|
+
* OPTIONAL. Backends with no connection pool omit it.
|
|
859
|
+
*/
|
|
860
|
+
poolStats?(): PoolStats;
|
|
809
861
|
/**
|
|
810
862
|
* The database-wide storage layout and what an operator should look at:
|
|
811
863
|
* indexes this process has yet to build or failed to build, fields whose
|
|
@@ -1124,6 +1176,14 @@ interface IndexPlan {
|
|
|
1124
1176
|
}>;
|
|
1125
1177
|
expectedSize?: 'small' | 'large';
|
|
1126
1178
|
}
|
|
1179
|
+
/** A connection pool's counts, as `Dataset.poolStats` reports them. */
|
|
1180
|
+
interface PoolStats {
|
|
1181
|
+
connections: number;
|
|
1182
|
+
opening: number;
|
|
1183
|
+
idle: number;
|
|
1184
|
+
leased: number;
|
|
1185
|
+
waiting: number;
|
|
1186
|
+
}
|
|
1127
1187
|
//#endregion
|
|
1128
1188
|
//#region ../../packages/substrate-types/src/policy.d.ts
|
|
1129
1189
|
interface Identity {
|
|
@@ -2408,7 +2468,7 @@ interface KernelLifecycleContext {
|
|
|
2408
2468
|
*/
|
|
2409
2469
|
interface PlanClause {
|
|
2410
2470
|
path: string[];
|
|
2411
|
-
kind: 'hop' | 'filter' | 'order' | 'ref' | '
|
|
2471
|
+
kind: 'hop' | 'filter' | 'order' | 'ref' | 'select' | 'group' | 'agg';
|
|
2412
2472
|
served: boolean;
|
|
2413
2473
|
recommend?: IndexDecl;
|
|
2414
2474
|
/**
|
|
@@ -2438,7 +2498,7 @@ interface FieldDefScalar {
|
|
|
2438
2498
|
* freeform payloads (audit details, debug bags). When you need filterable
|
|
2439
2499
|
* inner keys, use `field.struct` instead.
|
|
2440
2500
|
*/
|
|
2441
|
-
type: 'string' | 'number' | 'boolean' | 'date' | 'json';
|
|
2501
|
+
type: 'string' | 'number' | 'int16' | 'int32' | 'int64' | 'boolean' | 'date' | 'json';
|
|
2442
2502
|
/**
|
|
2443
2503
|
* Tri-state. `true` builds an index (a btree; a GIN for json). Unset means
|
|
2444
2504
|
* no index. `false` means no index AND not a search handle: long-form
|
|
@@ -2754,4 +2814,4 @@ type FieldInput = {
|
|
|
2754
2814
|
[field: string]: true | FieldInput;
|
|
2755
2815
|
};
|
|
2756
2816
|
//#endregion
|
|
2757
|
-
export { VirtualMutationDef as $,
|
|
2817
|
+
export { VirtualMutationDef as $, TypeStorageReport as $t, KernelLifecycleContext as A, EdgesStore as An, DEFAULT_FILTER_WRITE_LIMITS as At, NamespaceTypeDef as B, RowMetadata as Bn, FilterWriteResult as Bt, EmbedSourceContext as C, ExprType as Cn, ResolverArgs as Ct, FilterOperatorDef as D, EdgePatch as Dn, WriteEvent as Dt, EngineInput as E, Edge as En, TypedResolver as Et, KernelRouteClaim as F, ClientSuppliedServerFieldError as Fn, FieldKind as Ft, Registry as G, PoolStats as Gt, PluginRouteContext as H, WriteRow as Hn, IndexPlan as Ht, McpToolRegistration as I, Id as In, FieldPredicate as It, RegistryEntryInput as J, ReadResult as Jt, RegistryBase as K, PromotionEvent as Kt, NamespaceConfig as L, IdentityKind as Ln, FilterCapabilities as Lt, KernelMigrationContext as M, OnMissing as Mn, DatasetRegistry as Mt, KernelNamespaceContribution as N, ActorIdentity as Nn, DeleteResult as Nt, FrameEntry as O, EdgeRef as On, AggFn as Ot, KernelPlugin as P, CLIENT_SUPPLIED_SERVER_FIELD as Pn, DropResult as Pt, ScheduledTaskContext as Q, TypeIndexState as Qt, NamespaceDefinition as R, ROW_METADATA_FIELDS as Rn, FilterWriteLimits as Rt, DropParticipant as S, Expr as Sn, Resolver as St, EngineHandle as T, CanDeleteResult as Tn, RowFilterObligation as Tt, PostWriteHook as U, assertNoRepeatedIds as Un, NestedSelection as Ut, PluginLifecycleContext as V, RowMetadataField as Vn, FrameAgg as Vt, QualifiedFrame as W, OrderByClause as Wt, RegistryEntryResolver as X, StorageReport as Xt, RegistryEntryKind as Y, RefOperand as Yt, ScheduledTask as Z, TxScopeHandles as Zt, naturalOrderOf as _, ArgType as _n, Obligation as _t, FieldDefCrossRef as a, WalkPick as an, RequestObserver as at, CommittedWritesHook as b, EXPR_FUNCTIONS as bn, PolicyProbeContext as bt, FieldDefStruct as c, WriteResult as cn, SubstrateRequest as ct, OrderedBy as d, ResolverStat as dn, TlsConfig as dt, UpdateFieldRef as en, VirtualTypeDef as et, PackEnvelope as f, RuntimeErrorEntry as fn, WsConnection as ft, isColumnField as g, TypeStats as gn, Identity as gt, TypeSchema as h, SlowRequest as hn, AutoCrudVerb as ht, FieldDef as i, WalkNode as in, RequestObservation as it, KernelMigration as j, OnDelete as jn, Dataset as jt, IndexDecl as k, EdgeWriteInput as kn, ConditionalUpdateResult as kt, FieldInput as l, ProcessStat as ln, SubstrateResponse as lt, Schema as m, RuntimeMetrics as mn, AfterTxWork as mt, Dropped as n, WalkAggOperand as nn, HttpMethod as nt, FieldDefList as o, WhereClause as on, RuntimeOp as ot, PlanClause as p, RuntimeErrors as pn, WsHandler as pt, RegistryEntry as q, ReadParams as qt, EnvelopeShape as r, WalkAggPredicate as rn, PluginRouter as rt, FieldDefScalar as s, WriteOptions as sn, StartOpts as st, DEFAULT_ORDERED_BY as t, WalkAgg as tn, HttpHandler as tt, MutationSchema as u, ResolveObservation as un, SubstrateServer as ut, BatchResolver as v, DATE_UNITS as vn, Policy as vt, EncodeContext as w, FunctionSig as wn, ResolverReturn as wt, CoordinatorPlugin as x, EXPR_LIMITS as xn, RequestContext as xt, CommittedWriteBatch as y, EXPR_AGGREGATES as yn, PolicyDecision as yt, NamespaceInstallContext as z, Row as zn, FilterWriteOptions as zt };
|
|
@@ -81,8 +81,18 @@ async function runScript(script, opts) {
|
|
|
81
81
|
...fields
|
|
82
82
|
} })).data["recall/Hit"];
|
|
83
83
|
},
|
|
84
|
+
async schema(namespace, type) {
|
|
85
|
+
const all = await client.federatedSchema();
|
|
86
|
+
if (namespace === void 0) return all;
|
|
87
|
+
const ns = all[namespace];
|
|
88
|
+
if (ns === void 0) throw new Error(`schema: unknown namespace '${namespace}'`);
|
|
89
|
+
if (type === void 0) return ns;
|
|
90
|
+
const t = ns.types[type];
|
|
91
|
+
if (t === void 0) throw new Error(`schema: unknown type '${namespace}/${type}'`);
|
|
92
|
+
return t;
|
|
93
|
+
},
|
|
84
94
|
async mutate(frame) {
|
|
85
|
-
if (mode === "read") throw new Error("mutate refused: read mode (
|
|
95
|
+
if (mode === "read") throw new Error("mutate refused: read mode (run in dry-run or write mode)");
|
|
86
96
|
if (mode === "dry-run") {
|
|
87
97
|
mutations.push({
|
|
88
98
|
frame,
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { createRequire as __binCreateRequire } from 'node:module'; const require = __binCreateRequire(import.meta.url);
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
3
|
+
|
|
4
|
+
//#region src/mcp/script-runner.ts
|
|
5
|
+
/**
|
|
6
|
+
* Child entry for a sandboxed `run`: imports the script and hands its default
|
|
7
|
+
* export a ScriptContext whose every call goes to the parent over IPC. The
|
|
8
|
+
* child runs under `--permission` with no fs beyond this file and the script,
|
|
9
|
+
* no network, no child processes and no workers, so the store, reached through
|
|
10
|
+
* the parent, is all a script can touch.
|
|
11
|
+
*
|
|
12
|
+
* Imports node builtins only: any other import would need fs access the
|
|
13
|
+
* sandbox does not grant.
|
|
14
|
+
*/
|
|
15
|
+
const send = (m) => {
|
|
16
|
+
process.send?.(m);
|
|
17
|
+
};
|
|
18
|
+
const pending = /* @__PURE__ */ new Map();
|
|
19
|
+
let seq = 0;
|
|
20
|
+
function call(op, ...input) {
|
|
21
|
+
const id = ++seq;
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
pending.set(id, {
|
|
24
|
+
resolve,
|
|
25
|
+
reject
|
|
26
|
+
});
|
|
27
|
+
send({
|
|
28
|
+
type: "call",
|
|
29
|
+
id,
|
|
30
|
+
op,
|
|
31
|
+
input
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
process.on("message", (m) => {
|
|
36
|
+
if (m.type === "reply") {
|
|
37
|
+
const p = pending.get(m.id);
|
|
38
|
+
pending.delete(m.id);
|
|
39
|
+
if (m.ok) p?.resolve(m.value);
|
|
40
|
+
else p?.reject(new Error(m.error));
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (m.type === "start") start(m);
|
|
44
|
+
});
|
|
45
|
+
async function start(m) {
|
|
46
|
+
const s = Object.freeze({
|
|
47
|
+
kid: m.kid,
|
|
48
|
+
mode: m.mode,
|
|
49
|
+
args: Object.freeze({ ...m.args }),
|
|
50
|
+
query: (frame) => call("query", frame),
|
|
51
|
+
queryAll: (key, frame) => call("queryAll", key, frame),
|
|
52
|
+
recall: (input) => call("recall", input),
|
|
53
|
+
schema: (namespace, type) => call("schema", namespace, type),
|
|
54
|
+
mutate: (frame) => call("mutate", frame),
|
|
55
|
+
log: (...args) => {
|
|
56
|
+
call("log", ...args);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
try {
|
|
60
|
+
const mod = await import(pathToFileURL(m.script).href);
|
|
61
|
+
if (typeof mod.default !== "function") throw new Error("the script must default-export a function (s) => result");
|
|
62
|
+
const result = await mod.default(s);
|
|
63
|
+
send({
|
|
64
|
+
type: "done",
|
|
65
|
+
ok: true,
|
|
66
|
+
result
|
|
67
|
+
});
|
|
68
|
+
} catch (err) {
|
|
69
|
+
send({
|
|
70
|
+
type: "done",
|
|
71
|
+
ok: false,
|
|
72
|
+
error: err instanceof Error ? err.message : String(err)
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
export { };
|
package/dist/sdk.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as VirtualMutationDef, $t as
|
|
2
|
-
import { i as BridgeFrame, n as BridgeCredential, r as BridgeCredentialStore, t as BridgeClient } from "./bridge-
|
|
3
|
-
import { S as isRestrictViolation, _ as
|
|
4
|
-
import { a as WsResponseFrame, c as ResolveTarget, d as TargetState, f as IdempotencyStore, i as WsRequestFrame, l as SweepDeps, n as WS_REASON_SERVER_RESTART, o as WsResponseKind, r as WS_REASON_SUBSCRIPTION_OVERLOADED, s as BridgeRegistry, t as WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, u as SweepState } from "./ws-
|
|
5
|
-
import { $ as NlJudgeAction, A as and, B as SYSTEM_NAMESPACE, C as flattenGrant, D as parseGrantEntries, E as intersectGrants, F as TokenProviderOpts, G as resolveAdminCredential, H as isActiveAdminKeyRow, I as adminClaimCapabilities, J as NlAggregate, K as resolveDefaultKeyPath, L as isEncryptedKey, M as or, N as ADMIN_CAPABILITIES, O as decodeList, P as DEFAULT_CAPABILITIES, Q as NlFieldPhrase, R as makeAuthorizationProvider, S as expandFlat, T as grantIsUniform, U as AdminCredential, V as describeGrant, W as AdminEnv, X as NlAskResult, Y as NlAskRequest, Z as NlEvidence, _ as newlyGrantedPairs, _t as NLVocabularyHint, a as denyAll, at as NlOutcome, b as capabilitiesFor, c as requireIdentity, ct as NlPackValueRef, d as KeyUpdateRefusal, dt as NlServedPack, et as NlJudgeChoice, f as checkRevocable, ft as NlTrailEvent, g as newlyGranted, gt as NLResult, h as grantEntriesConfer, ht as NLBase, i as allowVerbs, it as NlNamespaceRulings, j as not, k as encodeList, l as requireNamespace, lt as NlParseStatus, m as grantCovers, mt as NlWireEvent, n as row, nt as NlJudgedStatus, o as denyVerbs, ot as NlPackField, p as checkUpdatable, pt as NlValueAlias, q as resolveDefaultKidPath, r as allowAll, rt as NlNamespacePack, s as requireCapability, st as NlPackType, t as applyRowFilters, tt as NlJudgeStep, u as KeyMutationRefusal, ut as NlParsedData, v as revokedAtIso, vt as Query, w as grantEntryError, x as encodeGrant, y as Grant, z as makeTokenProvider } from "./row-
|
|
1
|
+
import { $ as VirtualMutationDef, $t as TypeStorageReport, A as KernelLifecycleContext, An as EdgesStore, At as DEFAULT_FILTER_WRITE_LIMITS, B as NamespaceTypeDef, Bn as RowMetadata, Bt as FilterWriteResult, C as EmbedSourceContext, Cn as ExprType, Ct as ResolverArgs, D as FilterOperatorDef, Dn as EdgePatch, Dt as WriteEvent, E as EngineInput, En as Edge, Et as TypedResolver, F as KernelRouteClaim, Fn as ClientSuppliedServerFieldError, Ft as FieldKind, G as Registry, Gt as PoolStats, H as PluginRouteContext, Hn as WriteRow, Ht as IndexPlan, I as McpToolRegistration, In as Id, It as FieldPredicate, J as RegistryEntryInput, Jt as ReadResult, K as RegistryBase, Kt as PromotionEvent, L as NamespaceConfig, Ln as IdentityKind, Lt as FilterCapabilities, M as KernelMigrationContext, Mn as OnMissing, Mt as DatasetRegistry, N as KernelNamespaceContribution, Nn as ActorIdentity, Nt as DeleteResult, O as FrameEntry, On as EdgeRef, Ot as AggFn, P as KernelPlugin, Pn as CLIENT_SUPPLIED_SERVER_FIELD, Pt as DropResult, Q as ScheduledTaskContext, Qt as TypeIndexState, R as NamespaceDefinition, Rn as ROW_METADATA_FIELDS, Rt as FilterWriteLimits, S as DropParticipant, Sn as Expr, St as Resolver, T as EngineHandle, Tn as CanDeleteResult, Tt as RowFilterObligation, U as PostWriteHook, Un as assertNoRepeatedIds, Ut as NestedSelection, V as PluginLifecycleContext, Vn as RowMetadataField, Vt as FrameAgg, W as QualifiedFrame, Wt as OrderByClause, X as RegistryEntryResolver, Xt as StorageReport, Y as RegistryEntryKind, Yt as RefOperand, Z as ScheduledTask, Zt as TxScopeHandles, _ as naturalOrderOf, _n as ArgType, _t as Obligation, a as FieldDefCrossRef, an as WalkPick, at as RequestObserver, b as CommittedWritesHook, bn as EXPR_FUNCTIONS, bt as PolicyProbeContext, c as FieldDefStruct, cn as WriteResult, ct as SubstrateRequest, d as OrderedBy, dn as ResolverStat, dt as TlsConfig, en as UpdateFieldRef, et as VirtualTypeDef, f as PackEnvelope, fn as RuntimeErrorEntry, ft as WsConnection, g as isColumnField, gn as TypeStats, gt as Identity, h as TypeSchema, hn as SlowRequest, ht as AutoCrudVerb, i as FieldDef, in as WalkNode, it as RequestObservation, j as KernelMigration, jn as OnDelete, jt as Dataset, k as IndexDecl, kn as EdgeWriteInput, kt as ConditionalUpdateResult, l as FieldInput, ln as ProcessStat, lt as SubstrateResponse, m as Schema, mn as RuntimeMetrics, mt as AfterTxWork, n as Dropped, nn as WalkAggOperand, nt as HttpMethod, o as FieldDefList, on as WhereClause, ot as RuntimeOp, p as PlanClause, pn as RuntimeErrors, pt as WsHandler, q as RegistryEntry, qt as ReadParams, r as EnvelopeShape, rn as WalkAggPredicate, rt as PluginRouter, s as FieldDefScalar, sn as WriteOptions, st as StartOpts, t as DEFAULT_ORDERED_BY, tn as WalkAgg, tt as HttpHandler, u as MutationSchema, un as ResolveObservation, ut as SubstrateServer, v as BatchResolver, vn as DATE_UNITS, vt as Policy, w as EncodeContext, wn as FunctionSig, wt as ResolverReturn, x as CoordinatorPlugin, xn as EXPR_LIMITS, xt as RequestContext, y as CommittedWriteBatch, yn as EXPR_AGGREGATES, yt as PolicyDecision, z as NamespaceInstallContext, zn as Row, zt as FilterWriteOptions } from "./schema-B5WBO8yh.js";
|
|
2
|
+
import { i as BridgeFrame, n as BridgeCredential, r as BridgeCredentialStore, t as BridgeClient } from "./bridge-5VHZiH9o.js";
|
|
3
|
+
import { C as isBatchElementError, S as isAuthCause, T as isRestrictViolation, _ as WALKS_NEED_PARTITIONED, a as NamespaceMismatch, b as WALK_UNSUPPORTED_REF, c as ROW_POLICY_BLOCKS_WALK, d as RestrictViolation, f as STORE_BUSY, g as WALKS_IN_SUBSCRIPTION, h as WALKS_IN_MUTATION, i as MissingReferentError, l as ReservedField, m as VALUE_OUT_OF_RANGE, n as BridgeUnreachableError, o as QUERY_TIMEOUT, p as UnsupportedFilterError, r as FILTER_TOO_BROAD, s as REGEX_BUDGET_EXCEEDED, t as BatchElementError, u as ResolverFrameError, v as WALKS_UNSUPPORTED_STORE, w as isResolverFrameError, x as filterTooBroad, y as WALK_BUDGET_EXCEEDED } from "./errors-DHgT7Fa8.js";
|
|
4
|
+
import { a as WsResponseFrame, c as ResolveTarget, d as TargetState, f as IdempotencyStore, i as WsRequestFrame, l as SweepDeps, n as WS_REASON_SERVER_RESTART, o as WsResponseKind, r as WS_REASON_SUBSCRIPTION_OVERLOADED, s as BridgeRegistry, t as WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, u as SweepState } from "./ws-BL9nSELO.js";
|
|
5
|
+
import { $ as NlJudgeAction, A as and, B as SYSTEM_NAMESPACE, C as flattenGrant, D as parseGrantEntries, E as intersectGrants, F as TokenProviderOpts, G as resolveAdminCredential, H as isActiveAdminKeyRow, I as adminClaimCapabilities, J as NlAggregate, K as resolveDefaultKeyPath, L as isEncryptedKey, M as or, N as ADMIN_CAPABILITIES, O as decodeList, P as DEFAULT_CAPABILITIES, Q as NlFieldPhrase, R as makeAuthorizationProvider, S as expandFlat, T as grantIsUniform, U as AdminCredential, V as describeGrant, W as AdminEnv, X as NlAskResult, Y as NlAskRequest, Z as NlEvidence, _ as newlyGrantedPairs, _t as NLVocabularyHint, a as denyAll, at as NlOutcome, b as capabilitiesFor, c as requireIdentity, ct as NlPackValueRef, d as KeyUpdateRefusal, dt as NlServedPack, et as NlJudgeChoice, f as checkRevocable, ft as NlTrailEvent, g as newlyGranted, gt as NLResult, h as grantEntriesConfer, ht as NLBase, i as allowVerbs, it as NlNamespaceRulings, j as not, k as encodeList, l as requireNamespace, lt as NlParseStatus, m as grantCovers, mt as NlWireEvent, n as row, nt as NlJudgedStatus, o as denyVerbs, ot as NlPackField, p as checkUpdatable, pt as NlValueAlias, q as resolveDefaultKidPath, r as allowAll, rt as NlNamespacePack, s as requireCapability, st as NlPackType, t as applyRowFilters, tt as NlJudgeStep, u as KeyMutationRefusal, ut as NlParsedData, v as revokedAtIso, vt as Query, w as grantEntryError, x as encodeGrant, y as Grant, z as makeTokenProvider } from "./row-DHxnCnhA.js";
|
|
6
6
|
//#region ../../packages/substrate-types/src/assert-never.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Exhaustiveness guard for the `default:` arm of a `switch` over a
|
|
@@ -103,6 +103,31 @@ export declare function confersAnywhere(resolved: IdentityGrant | null, capabili
|
|
|
103
103
|
/** Every capability conferred anywhere — the union, for error messages only. */
|
|
104
104
|
export declare function allCapabilities(resolved: IdentityGrant | null): string[];
|
|
105
105
|
//#endregion
|
|
106
|
+
//#region ../../packages/substrate-types/src/int64.d.ts
|
|
107
|
+
/**
|
|
108
|
+
* An `int64` operand or write value as a bigint: a bigint, a safe-integer
|
|
109
|
+
* number, or a canonical decimal string, within the int64 range. Anything else
|
|
110
|
+
* (a float, a number past 2^53, `'007'`, `'1e3'`, an out-of-range value) is
|
|
111
|
+
* `undefined`.
|
|
112
|
+
*/
|
|
113
|
+
export declare function parseInt64(v: unknown): bigint | undefined;
|
|
114
|
+
/** Whether `v` is an `int16` value: an integer number within the int16 range. */
|
|
115
|
+
export declare function isInt16(v: unknown): v is number;
|
|
116
|
+
/** Whether `v` is an `int32` value: an integer number within the int32 range. */
|
|
117
|
+
export declare function isInt32(v: unknown): v is number;
|
|
118
|
+
/**
|
|
119
|
+
* `JSON.stringify` that writes a bigint as a decimal string, so an `int64`
|
|
120
|
+
* keeps every digit on the JSON wire. The plain call runs first, so a value
|
|
121
|
+
* with no bigint pays nothing for the replacer.
|
|
122
|
+
*/
|
|
123
|
+
export declare function stringifyJson(value: unknown): string;
|
|
124
|
+
/**
|
|
125
|
+
* Like {@link stringifyJson}, but a bigint is written as an exact JSON number
|
|
126
|
+
* (`9223372036854775807`, not a string), for a jsonb body that `substrate_num`
|
|
127
|
+
* reads back as the number it is.
|
|
128
|
+
*/
|
|
129
|
+
export declare function stringifyJsonExact(value: unknown): string;
|
|
130
|
+
//#endregion
|
|
106
131
|
//#region ../../packages/substrate-types/src/iso-timestamp.d.ts
|
|
107
132
|
/**
|
|
108
133
|
* `v` as `YYYY-MM-DDTHH:MM:SS[.ffffff](Z|±HH:MM)`, or `undefined` when it is
|
|
@@ -439,7 +464,8 @@ interface PurgeResolverResult {
|
|
|
439
464
|
purged: boolean;
|
|
440
465
|
[field: string]: unknown;
|
|
441
466
|
}
|
|
442
|
-
|
|
467
|
+
/** With `policy`, a row its row filters hide is left in place and answers `purged: false`. */
|
|
468
|
+
export declare function purgeResolver(typeName: string, dataset: Dataset, policy?: Policy): TypedResolver<PurgeResolverResult>;
|
|
443
469
|
//#endregion
|
|
444
470
|
//#region ../../packages/substrate-sdk/src/autocrud/autocrud-update.d.ts
|
|
445
471
|
interface UpdateResolverOptions {
|
|
@@ -488,7 +514,7 @@ export declare function createResolver<T extends Row = Row>(typeName: string, da
|
|
|
488
514
|
/** `update<T>`: the batch resolver with one element. */
|
|
489
515
|
export declare function updateResolver<T extends Row = Row>(typeName: string, dataset: Dataset, edges: EdgesStore, options?: Pick<BatchResolverOptions, 'fields'>): TypedResolver<T | null>;
|
|
490
516
|
/** `delete<T>`: the batch resolver with one element. */
|
|
491
|
-
export declare function deleteResolver(typeName: string, dataset: Dataset, edges: EdgesStore): TypedResolver<DeleteResolverResult>;
|
|
517
|
+
export declare function deleteResolver(typeName: string, dataset: Dataset, edges: EdgesStore, options?: Pick<BatchResolverOptions, 'policy'>): TypedResolver<DeleteResolverResult>;
|
|
492
518
|
//#endregion
|
|
493
519
|
//#region ../../packages/substrate-sdk/src/autocrud/filter-writes.d.ts
|
|
494
520
|
/**
|
|
@@ -625,6 +651,10 @@ export declare function installAutoCrud(registry: AutoCrudRegistry, typeName: st
|
|
|
625
651
|
export declare const RESERVED_AUTOCRUD_FIELDS: Record<string, FieldDef>;
|
|
626
652
|
/** Is `def` a descriptor autoCRUD injected, rather than a body field of the same name? */
|
|
627
653
|
export declare function isReservedAutoCrudField(def: FieldDef): boolean;
|
|
654
|
+
/** The server metadata names a body field may not take: expressions, where and orderBy read them as metadata. */
|
|
655
|
+
export declare const RESERVED_METADATA_FIELD_NAMES: readonly string[];
|
|
656
|
+
/** Why a field of this name cannot be declared, or undefined when it can. */
|
|
657
|
+
export declare function reservedMetadataFieldMessage(name: string): string | undefined;
|
|
628
658
|
/** Reserved field names — useful for validation loops. */
|
|
629
659
|
export declare const RESERVED_AUTOCRUD_FIELD_NAMES: string[];
|
|
630
660
|
//#endregion
|
|
@@ -808,6 +838,19 @@ interface JsonFieldOptions {
|
|
|
808
838
|
export declare const field: {
|
|
809
839
|
string(opts?: ScalarFieldOptions): FieldDefScalar;
|
|
810
840
|
number(opts?: ScalarFieldOptions): FieldDefScalar;
|
|
841
|
+
/**
|
|
842
|
+
* Integers: pick the narrowest kind whose range holds every value the field
|
|
843
|
+
* will EVER take, because a kind cannot change once rows exist (moving means
|
|
844
|
+
* a new field and a backfill). All three filter, sort and sum as exact
|
|
845
|
+
* integers; they differ in storage width.
|
|
846
|
+
* int16 -32768 to 32767, 2 bytes: small codes, flags, ages, percentages.
|
|
847
|
+
* int32 about ±2.1 billion, 4 bytes: counts, durations, ids within one source.
|
|
848
|
+
* int64 about ±9.2e18, 8 bytes, a decimal string on the wire past 2^53: totals, epoch-ms, external ids.
|
|
849
|
+
* Use `number` for fractional values. When unsure, take the next width up.
|
|
850
|
+
*/
|
|
851
|
+
int16(opts?: ScalarFieldOptions): FieldDefScalar;
|
|
852
|
+
int32(opts?: ScalarFieldOptions): FieldDefScalar;
|
|
853
|
+
int64(opts?: ScalarFieldOptions): FieldDefScalar;
|
|
811
854
|
boolean(opts?: ScalarFieldOptions): FieldDefScalar;
|
|
812
855
|
date(opts?: DateFieldOptions): FieldDefScalar;
|
|
813
856
|
enum(values: readonly string[], opts?: ScalarFieldOptions): FieldDefScalar;
|
|
@@ -843,4 +886,4 @@ export declare function resolveEntityId(dataset: Dataset, type: string, input: I
|
|
|
843
886
|
*/
|
|
844
887
|
export declare function resolveEntityRow(dataset: Dataset, type: string, input: Id): Promise<Row | null>;
|
|
845
888
|
//#endregion
|
|
846
|
-
export { ADMIN_CAPABILITIES, ActorIdentity, type AdminCredential, type AdminEnv, AfterTxWork, AggFn, AutoCrudVerb, BatchElementError, BatchResolver, BridgeClient, BridgeCredential, BridgeCredentialStore, BridgeFrame, BridgeRegistry, BridgeUnreachableError,
|
|
889
|
+
export { ADMIN_CAPABILITIES, ActorIdentity, type AdminCredential, type AdminEnv, AfterTxWork, AggFn, ArgType, AutoCrudVerb, BatchElementError, BatchResolver, BridgeClient, BridgeCredential, BridgeCredentialStore, BridgeFrame, BridgeRegistry, BridgeUnreachableError, CLIENT_SUPPLIED_SERVER_FIELD, CanDeleteResult, ClientSuppliedServerFieldError, CommittedWriteBatch, CommittedWritesHook, ConditionalUpdateResult, CoordinatorPlugin, type CrossRefFieldOptions, DATE_UNITS, DEFAULT_CAPABILITIES, DEFAULT_FILTER_WRITE_LIMITS, DEFAULT_ORDERED_BY, Dataset, DatasetRegistry, type DateFieldOptions, type DefineNamespaceOptions, DeleteResult, type DeleteRowArgs, type DeleteRowResult, DropParticipant, DropResult, Dropped, EXPR_AGGREGATES, EXPR_FUNCTIONS, EXPR_LIMITS, Edge, EdgePatch, EdgeRef, EdgeWriteInput, EdgesStore, EmbedSourceContext, EncodeContext, EngineHandle, EngineInput, EnvelopeShape, Expr, ExprType, FILTER_TOO_BROAD, FieldDef, FieldDefCrossRef, FieldDefList, FieldDefScalar, FieldDefStruct, FieldInput, FieldKind, FieldPredicate, FilterCapabilities, FilterOperatorDef, FilterWriteLimits, type FilterWriteMutationResult, FilterWriteOptions, FilterWriteResult, FrameAgg, FrameEntry, FunctionSig, type Grant, HttpHandler, HttpMethod, Id, IdempotencyStore, Identity, IdentityKind, IndexDecl, IndexPlan, type JsonFieldOptions, KernelLifecycleContext, KernelMigration, KernelMigrationContext, KernelNamespaceContribution, KernelPlugin, KernelRouteClaim, type KeyMutationRefusal, type KeyUpdateRefusal, type ListFieldOptions, McpToolRegistration, MissingReferentError, MutationSchema, NLBase, NLResult, NLVocabularyHint, NamespaceConfig, NamespaceDefinition, NamespaceInstallContext, NamespaceMismatch, NamespaceTypeDef, NestedSelection, NlAggregate, NlAskRequest, NlAskResult, NlEvidence, NlFieldPhrase, NlJudgeAction, NlJudgeChoice, NlJudgeStep, NlJudgedStatus, NlNamespacePack, NlNamespaceRulings, NlOutcome, NlPackField, NlPackType, NlPackValueRef, NlParseStatus, NlParsedData, NlServedPack, NlTrailEvent, NlValueAlias, NlWireEvent, Obligation, OnDelete, OnMissing, OrderByClause, OrderedBy, PackEnvelope, PlanClause, PluginLifecycleContext, PluginRouteContext, PluginRouter, Policy, PolicyDecision, PolicyProbeContext, PoolStats, PostWriteHook, ProcessStat, PromotionEvent, QUERY_TIMEOUT, QualifiedFrame, Query, REGEX_BUDGET_EXCEEDED, ROW_METADATA_FIELDS, ROW_POLICY_BLOCKS_WALK, ReadParams, ReadResult, RefOperand, Registry, RegistryBase, RegistryEntry, RegistryEntryInput, RegistryEntryKind, RegistryEntryResolver, RequestContext, RequestObservation, RequestObserver, ReservedField, ResolveObservation, ResolveTarget, Resolver, ResolverArgs, ResolverFrameError, ResolverReturn, ResolverStat, RestrictViolation, Row, RowFilterObligation, RowMetadata, RowMetadataField, RuntimeErrorEntry, RuntimeErrors, RuntimeMetrics, RuntimeOp, STORE_BUSY, SYSTEM_NAMESPACE, type ScalarFieldOptions, ScheduledTask, ScheduledTaskContext, Schema, SlowRequest, StartOpts, StorageReport, type StructFieldOptions, SubstrateRequest, SubstrateResponse, SubstrateServer, SweepDeps, SweepState, TargetState, TlsConfig, type TokenProviderOpts, TxScopeHandles, TypeIndexState, type TypeInput, TypeSchema, TypeStats, TypeStorageReport, TypedResolver, UnsupportedFilterError, UpdateFieldRef, type UpdateResolverOptions, VALUE_OUT_OF_RANGE, VirtualMutationDef, VirtualTypeDef, WALKS_IN_MUTATION, WALKS_IN_SUBSCRIPTION, WALKS_NEED_PARTITIONED, WALKS_UNSUPPORTED_STORE, WALK_BUDGET_EXCEEDED, WALK_UNSUPPORTED_REF, WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, WS_REASON_SERVER_RESTART, WS_REASON_SUBSCRIPTION_OVERLOADED, WalkAgg, WalkAggOperand, WalkAggPredicate, WalkNode, WalkPick, WhereClause, WriteEvent, WriteOptions, WriteResult, WriteRow, WsConnection, WsHandler, WsRequestFrame, WsResponseFrame, WsResponseKind, adminClaimCapabilities, allowAll, allowVerbs, and, applyRowFilters, assertNoRepeatedIds, capabilitiesFor, checkRevocable, checkUpdatable, decodeList, denyAll, denyVerbs, describeGrant, encodeGrant, encodeList, expandFlat, filterTooBroad, flattenGrant, grantCovers, grantEntriesConfer, grantEntryError, grantIsUniform, intersectGrants, isActiveAdminKeyRow, isAuthCause, isBatchElementError, isColumnField, isEncryptedKey, isResolverFrameError, isRestrictViolation, makeAuthorizationProvider, makeTokenProvider, naturalOrderOf, newlyGranted, newlyGrantedPairs, not, or, parseGrantEntries, requireCapability, requireIdentity, requireNamespace, resolveAdminCredential, resolveDefaultKeyPath, resolveDefaultKidPath, revokedAtIso, row };
|
package/dist/sdk.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __binCreateRequire } from 'node:module'; const require = __binCreateRequire(import.meta.url);
|
|
2
|
-
import { $t as
|
|
2
|
+
import { $t as METADATA_FILTER_FIELDS, A as isReservedAutoCrudField, An as isAuthCause, B as createResolver, Bt as parseJsonBody, C as makeCtx, Cn as WALKS_IN_MUTATION, D as RESERVED_AUTOCRUD_FIELDS, Dn as WALK_BUDGET_EXCEEDED, E as selectAll, En as WALKS_UNSUPPORTED_STORE, F as createResolverWithEdges, Fn as ROW_METADATA_FIELDS, G as listResolver, Gt as WS_REASON_SUBSCRIPTION_OVERLOADED, H as updateResolver, I as installAutoCrud, In as assertNoRepeatedIds, It as JSON_HEADERS, J as resolveIdentity, Jt as normaliseVocabWhere, K as getResolver, Kt as canonicalVocabValue, L as deleteManyResolver, Ln as canonicalize, M as field, Mn as isResolverFrameError, N as AutoCrudNameCollisionError, Nn as isRestrictViolation, O as RESERVED_AUTOCRUD_FIELD_NAMES, On as WALK_UNSUPPORTED_REF, P as autoCrudOptionsOf, Pn as CLIENT_SUPPLIED_SERVER_FIELD, Qt as METADATA_AUTHOR_FIELDS, R as updateManyResolver, Rn as BootstrapConfigError, Rt as error400, S as EngineQueryError, Sn as VALUE_OUT_OF_RANGE, T as queryOne, Tn as WALKS_NEED_PARTITIONED, U as applyUpdatePatch, Ut as WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, V as deleteResolver, W as deleteRow, Wt as WS_REASON_SERVER_RESTART, X as resolveEntityRow, Xt as vocabImplication, Y as resolveEntityId, Yt as storedVocabSpellings, Zt as RegistryBase, _n as ReservedField, an as isIsoTimestamp, b as assertOrderedBy, bn as STORE_BUSY, cn as validateHardDeleteEnv, dn as FILTER_TOO_BROAD, en as normaliseMetadataOrderBy, fn as MissingReferentError, gn as ROW_POLICY_BLOCKS_WALK, hn as REGEX_BUDGET_EXCEEDED, in as isImpossibleIsoTimestamp, j as reservedMetadataFieldMessage, jn as isBatchElementError, k as RESERVED_METADATA_FIELD_NAMES, kn as filterTooBroad, ln as BatchElementError, mn as QUERY_TIMEOUT, nn as normaliseWalkNode, on as normalizeIsoTimestamp, pn as NamespaceMismatch, q as UnattributedWriteError, qt as normaliseVocabValues, rn as createKeyedMutex, sn as assertHardDeleteAllowed, tn as normaliseMetadataWhere, un as BridgeUnreachableError, vn as ResolverFrameError, w as queryAll, wn as WALKS_IN_SUBSCRIPTION, x as defineNamespace, xn as UnsupportedFilterError, y as assertIndexDecl, yn as RestrictViolation, z as purgeResolver, zn as defineBootstrap, zt as jsonResponse } from "./src-D55T3ZcP.js";
|
|
3
3
|
import { a as adminClaimCapabilities, c as makeTokenProvider, d as resolveDefaultKidPath, i as DEFAULT_CAPABILITIES, l as resolveAdminCredential, n as trimTrailingSlashes, o as isEncryptedKey, r as ADMIN_CAPABILITIES, s as makeAuthorizationProvider, t as parsePositiveInt, u as resolveDefaultKeyPath } from "./env-utils-CGNazUNt.js";
|
|
4
|
-
import { A as expandFlat, C as not, D as isActiveAdminKeyRow, E as describeGrant, F as parseGrantEntries, I as decodeList, L as encodeList, M as grantEntryError, N as grantIsUniform, O as capabilitiesFor, P as intersectGrants, S as and, T as SYSTEM_NAMESPACE, _ as grantCovers, a as denyAll, b as newlyGrantedPairs, c as requireIdentity, d as confersAnywhere, f as coversNamespace, g as checkUpdatable, h as checkRevocable, i as allowVerbs, j as flattenGrant, k as encodeGrant, l as requireNamespace, m as grantedIn, n as row, o as denyVerbs, p as grantOf, r as allowAll, s as requireCapability, t as applyRowFilters, u as allCapabilities, v as grantEntriesConfer, w as or, x as revokedAtIso, y as newlyGranted } from "./src-
|
|
5
|
-
import { C as
|
|
4
|
+
import { A as expandFlat, C as not, D as isActiveAdminKeyRow, E as describeGrant, F as parseGrantEntries, I as decodeList, L as encodeList, M as grantEntryError, N as grantIsUniform, O as capabilitiesFor, P as intersectGrants, S as and, T as SYSTEM_NAMESPACE, _ as grantCovers, a as denyAll, b as newlyGrantedPairs, c as requireIdentity, d as confersAnywhere, f as coversNamespace, g as checkUpdatable, h as checkRevocable, i as allowVerbs, j as flattenGrant, k as encodeGrant, l as requireNamespace, m as grantedIn, n as row, o as denyVerbs, p as grantOf, r as allowAll, s as requireCapability, t as applyRowFilters, u as allCapabilities, v as grantEntriesConfer, w as or, x as revokedAtIso, y as newlyGranted } from "./src-DR_hUj2p.js";
|
|
5
|
+
import { A as parseInt64, C as DEFAULT_ORDERED_BY, D as parseQualifiedKey, E as formatQualifiedKey, F as EXPR_FUNCTIONS, I as EXPR_LIMITS, L as DEFAULT_FILTER_WRITE_LIMITS, M as stringifyJsonExact, N as DATE_UNITS, O as isInt16, P as EXPR_AGGREGATES, R as assertNever, T as naturalOrderOf, j as stringifyJson, k as isInt32, w as isColumnField } from "./src-CdbUzLhB.js";
|
|
6
6
|
|
|
7
|
-
export { ADMIN_CAPABILITIES, AutoCrudNameCollisionError, BatchElementError, BootstrapConfigError, BridgeUnreachableError, CLIENT_SUPPLIED_SERVER_FIELD, DEFAULT_CAPABILITIES, DEFAULT_FILTER_WRITE_LIMITS, DEFAULT_ORDERED_BY, EngineQueryError, FILTER_TOO_BROAD, JSON_HEADERS, METADATA_AUTHOR_FIELDS, METADATA_FILTER_FIELDS, MissingReferentError, NamespaceMismatch, QUERY_TIMEOUT, RESERVED_AUTOCRUD_FIELDS, RESERVED_AUTOCRUD_FIELD_NAMES, ROW_METADATA_FIELDS, ROW_POLICY_BLOCKS_WALK, RegistryBase, ReservedField, ResolverFrameError, RestrictViolation, SYSTEM_NAMESPACE, UnattributedWriteError, UnsupportedFilterError, WALKS_IN_MUTATION, WALKS_IN_SUBSCRIPTION, WALKS_NEED_PARTITIONED, WALKS_UNSUPPORTED_STORE, WALK_BUDGET_EXCEEDED, WALK_UNSUPPORTED_REF, WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, WS_REASON_SERVER_RESTART, WS_REASON_SUBSCRIPTION_OVERLOADED, adminClaimCapabilities, allCapabilities, allowAll, allowVerbs, and, applyRowFilters, applyUpdatePatch, assertHardDeleteAllowed, assertIndexDecl, assertNever, assertNoRepeatedIds, assertOrderedBy, autoCrudOptionsOf, canonicalVocabValue, canonicalize, capabilitiesFor, checkRevocable, checkUpdatable, confersAnywhere, coversNamespace, createKeyedMutex, createResolver, createResolverWithEdges, decodeList, defineBootstrap, defineNamespace, deleteManyResolver, deleteResolver, deleteRow, denyAll, denyVerbs, describeGrant, encodeGrant, encodeList, error400, expandFlat, field, filterTooBroad, flattenGrant, formatQualifiedKey, getResolver, grantCovers, grantEntriesConfer, grantEntryError, grantIsUniform, grantOf, grantedIn, installAutoCrud, intersectGrants, isActiveAdminKeyRow, isAuthCause, isBatchElementError, isColumnField, isEncryptedKey, isImpossibleIsoTimestamp, isIsoTimestamp, isReservedAutoCrudField, isResolverFrameError, isRestrictViolation, jsonResponse, listResolver, makeAuthorizationProvider, makeCtx, makeTokenProvider, naturalOrderOf, newlyGranted, newlyGrantedPairs, normaliseMetadataOrderBy, normaliseMetadataWhere, normaliseVocabValues, normaliseVocabWhere, normaliseWalkNode, normalizeIsoTimestamp, not, or, parseGrantEntries, parseJsonBody, parsePositiveInt, parseQualifiedKey, purgeResolver, queryAll, queryOne, requireCapability, requireIdentity, requireNamespace, resolveAdminCredential, resolveDefaultKeyPath, resolveDefaultKidPath, resolveEntityId, resolveEntityRow, resolveIdentity, revokedAtIso, row, selectAll, storedVocabSpellings, trimTrailingSlashes, updateManyResolver, updateResolver, validateHardDeleteEnv, vocabImplication };
|
|
7
|
+
export { ADMIN_CAPABILITIES, AutoCrudNameCollisionError, BatchElementError, BootstrapConfigError, BridgeUnreachableError, CLIENT_SUPPLIED_SERVER_FIELD, DATE_UNITS, DEFAULT_CAPABILITIES, DEFAULT_FILTER_WRITE_LIMITS, DEFAULT_ORDERED_BY, EXPR_AGGREGATES, EXPR_FUNCTIONS, EXPR_LIMITS, EngineQueryError, FILTER_TOO_BROAD, JSON_HEADERS, METADATA_AUTHOR_FIELDS, METADATA_FILTER_FIELDS, MissingReferentError, NamespaceMismatch, QUERY_TIMEOUT, REGEX_BUDGET_EXCEEDED, RESERVED_AUTOCRUD_FIELDS, RESERVED_AUTOCRUD_FIELD_NAMES, RESERVED_METADATA_FIELD_NAMES, ROW_METADATA_FIELDS, ROW_POLICY_BLOCKS_WALK, RegistryBase, ReservedField, ResolverFrameError, RestrictViolation, STORE_BUSY, SYSTEM_NAMESPACE, UnattributedWriteError, UnsupportedFilterError, VALUE_OUT_OF_RANGE, WALKS_IN_MUTATION, WALKS_IN_SUBSCRIPTION, WALKS_NEED_PARTITIONED, WALKS_UNSUPPORTED_STORE, WALK_BUDGET_EXCEEDED, WALK_UNSUPPORTED_REF, WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, WS_REASON_SERVER_RESTART, WS_REASON_SUBSCRIPTION_OVERLOADED, adminClaimCapabilities, allCapabilities, allowAll, allowVerbs, and, applyRowFilters, applyUpdatePatch, assertHardDeleteAllowed, assertIndexDecl, assertNever, assertNoRepeatedIds, assertOrderedBy, autoCrudOptionsOf, canonicalVocabValue, canonicalize, capabilitiesFor, checkRevocable, checkUpdatable, confersAnywhere, coversNamespace, createKeyedMutex, createResolver, createResolverWithEdges, decodeList, defineBootstrap, defineNamespace, deleteManyResolver, deleteResolver, deleteRow, denyAll, denyVerbs, describeGrant, encodeGrant, encodeList, error400, expandFlat, field, filterTooBroad, flattenGrant, formatQualifiedKey, getResolver, grantCovers, grantEntriesConfer, grantEntryError, grantIsUniform, grantOf, grantedIn, installAutoCrud, intersectGrants, isActiveAdminKeyRow, isAuthCause, isBatchElementError, isColumnField, isEncryptedKey, isImpossibleIsoTimestamp, isInt16, isInt32, isIsoTimestamp, isReservedAutoCrudField, isResolverFrameError, isRestrictViolation, jsonResponse, listResolver, makeAuthorizationProvider, makeCtx, makeTokenProvider, naturalOrderOf, newlyGranted, newlyGrantedPairs, normaliseMetadataOrderBy, normaliseMetadataWhere, normaliseVocabValues, normaliseVocabWhere, normaliseWalkNode, normalizeIsoTimestamp, not, or, parseGrantEntries, parseInt64, parseJsonBody, parsePositiveInt, parseQualifiedKey, purgeResolver, queryAll, queryOne, requireCapability, requireIdentity, requireNamespace, reservedMetadataFieldMessage, resolveAdminCredential, resolveDefaultKeyPath, resolveDefaultKidPath, resolveEntityId, resolveEntityRow, resolveIdentity, revokedAtIso, row, selectAll, storedVocabSpellings, stringifyJson, stringifyJsonExact, trimTrailingSlashes, updateManyResolver, updateResolver, validateHardDeleteEnv, vocabImplication };
|