@mnmal-ai/substrate 1.0.0-alpha.8 → 1.0.0-beta.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.
Files changed (53) hide show
  1. package/README.md +32 -14
  2. package/dist/boot-store-BMQUbHKv.js +4086 -0
  3. package/dist/{runtime-metrics-DwpDJ8vz.d.ts → bridge-DnToJedN.d.ts} +2 -87
  4. package/dist/cli-DModIbnN.js +3390 -0
  5. package/dist/client.browser.js +2507 -0
  6. package/dist/client.d.ts +222 -171
  7. package/dist/client.js +6 -7
  8. package/dist/cluster-worker.js +0 -1
  9. package/dist/{content-type-C7T28xNb.js → content-type-wLljot5M.js} +0 -1
  10. package/dist/{env-utils-CGNazUNt.js → env-utils-s25Z1YSA.js} +0 -1
  11. package/dist/{errors-D4vKuwz8.d.ts → errors-Cmkp1qxf.d.ts} +44 -4
  12. package/dist/{fake-DUVtKVSE.js → fake-DdXtb-m8.js} +0 -1
  13. package/dist/{index-D7mSOFlM.d.ts → index-BI4KqFiR.d.ts} +7 -11
  14. package/dist/msgpackr-Dq18g6Ds.js +16 -0
  15. package/dist/node-version-BtK_Nq6z.js +32 -0
  16. package/dist/pack.d.ts +75 -11
  17. package/dist/pack.js +4 -4
  18. package/dist/{plugin-B3NxUCVn.js → plugin-CEOhrEme.js} +149 -6
  19. package/dist/proposals-bootstrap.js +6 -5
  20. package/dist/proposals.config.schema.json +5 -0
  21. package/dist/proposals.d.ts +17 -5
  22. package/dist/proposals.default-config.json +2 -1
  23. package/dist/proposals.js +2 -3
  24. package/dist/recall-bootstrap.js +5 -4
  25. package/dist/recall.config.schema.json +6 -0
  26. package/dist/recall.d.ts +27 -6
  27. package/dist/recall.js +2 -3
  28. package/dist/{repl-DeKzfvNV.js → repl-BvDZy-Ut.js} +52 -26
  29. package/dist/{row-ByLFE2Wx.d.ts → row-D0If4qif.d.ts} +92 -12
  30. package/dist/run-BT123RV1.js +2443 -0
  31. package/dist/{plugin-t2g2wX0b.d.ts → schema-aIkY8sR3.d.ts} +1293 -63
  32. package/dist/{script-C6DSa_Na.js → script-ByQ9pzhC.js} +54 -26
  33. package/dist/script-runner.js +78 -0
  34. package/dist/sdk.d.ts +236 -38
  35. package/dist/sdk.js +5 -110
  36. package/dist/semver-D_zdq0hi.js +17 -0
  37. package/dist/src-BMD2OE--.js +8289 -0
  38. package/dist/{src-BLgbLq2k.js → src-B_kHkbsr.js} +780 -330
  39. package/dist/{src-DjIuRjzF.js → src-CKSJ13p8.js} +10231 -4237
  40. package/dist/{src-CkZw6xVD.js → src-CW7eRDss.js} +188 -87
  41. package/dist/{row-DZ0Fnpc6.js → src-DmiUWOLp.js} +2 -1
  42. package/dist/{src-DCy7Iy2l.js → src-DmjwFMu8.js} +900 -77
  43. package/dist/{src-DiNTSaFk.js → src-FXO5JPyk.js} +686 -856
  44. package/dist/substrate-admin.js +17 -782
  45. package/dist/substrate.js +4 -5206
  46. package/dist/testing.d.ts +473 -96
  47. package/dist/testing.js +19 -165
  48. package/dist/{ws-C72iVS5T.d.ts → ws-DW8ng02H.d.ts} +4 -5
  49. package/package.json +26 -26
  50. package/dist/dataset-jZS_4ci4.js +0 -1535
  51. package/dist/pg-edges-store-KH_FQCxx.js +0 -381
  52. package/dist/schema-g4FQLr0V.d.ts +0 -433
  53. package/dist/src-BD27zeGF.js +0 -2339
@@ -1,4 +1,3 @@
1
- import { createRequire as __binCreateRequire } from 'node:module'; const require = __binCreateRequire(import.meta.url);
2
1
  //#region ../../packages/substrate-client/src/script.ts
3
2
  const DEFAULT_MAX_WRITES = 50;
4
3
  const DEFAULT_MAX_PAGES = 200;
@@ -19,7 +18,7 @@ function assertKeys(frame, env, verb) {
19
18
  */
20
19
  async function runScript(script, opts) {
21
20
  const { client, kid, mode = "read", args = {}, maxWrites = 50, maxPages = DEFAULT_MAX_PAGES } = opts;
22
- const log = opts.log ?? ((line) => process.stderr.write(`${line}\n`));
21
+ const log = opts.log ?? ((line) => console.error(line));
23
22
  const mutations = [];
24
23
  const warnings = [];
25
24
  const stats = {
@@ -35,34 +34,53 @@ async function runScript(script, opts) {
35
34
  for (const [key, page] of Object.entries(env._pagination ?? {})) if (page.hasMore) warnings.push(`${key}: result truncated (hasMore); use queryAll for a complete read`);
36
35
  return env;
37
36
  };
37
+ async function queryAll(key, frame) {
38
+ const rows = [];
39
+ let cursor;
40
+ for (let page = 0; page < maxPages; page++) {
41
+ const params = {
42
+ ...frame.params,
43
+ ...cursor !== void 0 ? { cursor } : {}
44
+ };
45
+ stats.queries++;
46
+ const env = await client.query({ [key]: {
47
+ ...frame,
48
+ params
49
+ } });
50
+ assertKeys({ [key]: frame }, env, "query");
51
+ const data = env.data[key];
52
+ rows.push(...Array.isArray(data) ? data : [data]);
53
+ const p = env._pagination?.[key];
54
+ if (p?.hasMore !== true) return rows;
55
+ if (p.nextCursor === void 0) throw new Error(`${key}: hasMore with no nextCursor`);
56
+ cursor = p.nextCursor;
57
+ }
58
+ throw new Error(`${key}: still hasMore after ${maxPages} pages`);
59
+ }
60
+ async function byShortId(key, n, fields) {
61
+ const wanted = Array.isArray(n) ? n : [n];
62
+ if (wanted.length === 0) return [];
63
+ const unique = [...new Set(wanted)];
64
+ const rows = await queryAll(key, {
65
+ params: { where: { shortId: unique.length === 1 ? { eq: unique[0] } : { in: unique } } },
66
+ ...fields !== void 0 ? { fields: {
67
+ ...fields,
68
+ shortId: true
69
+ } } : {}
70
+ });
71
+ const byId = new Map(rows.map((r) => [Number(r.shortId), r]));
72
+ const missing = unique.filter((id) => !byId.has(id));
73
+ if (missing.length > 0) throw new Error(`${key}: no row with shortId ${missing.join(", ")}`);
74
+ const found = wanted.map((id) => byId.get(id));
75
+ return Array.isArray(n) ? found : found[0];
76
+ }
38
77
  const ctx = {
39
78
  kid,
40
79
  mode,
41
80
  args: Object.freeze({ ...args }),
42
81
  query,
43
- async queryAll(key, frame) {
44
- const rows = [];
45
- let cursor;
46
- for (let page = 0; page < maxPages; page++) {
47
- const params = {
48
- ...frame.params,
49
- ...cursor !== void 0 ? { cursor } : {}
50
- };
51
- stats.queries++;
52
- const env = await client.query({ [key]: {
53
- ...frame,
54
- params
55
- } });
56
- assertKeys({ [key]: frame }, env, "query");
57
- const data = env.data[key];
58
- rows.push(...Array.isArray(data) ? data : [data]);
59
- const p = env._pagination?.[key];
60
- if (p?.hasMore !== true) return rows;
61
- if (p.nextCursor === void 0) throw new Error(`${key}: hasMore with no nextCursor`);
62
- cursor = p.nextCursor;
63
- }
64
- throw new Error(`${key}: still hasMore after ${maxPages} pages`);
65
- },
82
+ queryAll,
83
+ byShortId,
66
84
  async recall({ query: to, row, ...params }) {
67
85
  const fields = row === void 0 ? {} : { fields: {
68
86
  id: true,
@@ -81,8 +99,18 @@ async function runScript(script, opts) {
81
99
  ...fields
82
100
  } })).data["recall/Hit"];
83
101
  },
102
+ async schema(namespace, type) {
103
+ const all = await client.federatedSchema();
104
+ if (namespace === void 0) return all;
105
+ const ns = all[namespace];
106
+ if (ns === void 0) throw new Error(`schema: unknown namespace '${namespace}'`);
107
+ if (type === void 0) return ns;
108
+ const t = ns.types[type];
109
+ if (t === void 0) throw new Error(`schema: unknown type '${namespace}/${type}'`);
110
+ return t;
111
+ },
84
112
  async mutate(frame) {
85
- if (mode === "read") throw new Error("mutate refused: read mode (pass --dry-run or --write)");
113
+ if (mode === "read") throw new Error("mutate refused: read mode (run in dry-run or write mode)");
86
114
  if (mode === "dry-run") {
87
115
  mutations.push({
88
116
  frame,
@@ -0,0 +1,78 @@
1
+ import { pathToFileURL } from "node:url";
2
+
3
+ //#region src/mcp/script-runner.ts
4
+ /**
5
+ * Child entry for a sandboxed `run`: imports the script and hands its default
6
+ * export a ScriptContext whose every call goes to the parent over IPC. The
7
+ * child runs under `--permission` with no fs beyond this file and the script,
8
+ * no network, no child processes and no workers, so the store, reached through
9
+ * the parent, is all a script can touch.
10
+ *
11
+ * Imports node builtins only: any other import would need fs access the
12
+ * sandbox does not grant.
13
+ */
14
+ const send = (m) => {
15
+ process.send?.(m);
16
+ };
17
+ const pending = /* @__PURE__ */ new Map();
18
+ let seq = 0;
19
+ function call(op, ...input) {
20
+ const id = ++seq;
21
+ return new Promise((resolve, reject) => {
22
+ pending.set(id, {
23
+ resolve,
24
+ reject
25
+ });
26
+ send({
27
+ type: "call",
28
+ id,
29
+ op,
30
+ input
31
+ });
32
+ });
33
+ }
34
+ process.on("message", (m) => {
35
+ if (m.type === "reply") {
36
+ const p = pending.get(m.id);
37
+ pending.delete(m.id);
38
+ if (m.ok) p?.resolve(m.value);
39
+ else p?.reject(new Error(m.error));
40
+ return;
41
+ }
42
+ if (m.type === "start") start(m);
43
+ });
44
+ async function start(m) {
45
+ const s = Object.freeze({
46
+ kid: m.kid,
47
+ mode: m.mode,
48
+ args: Object.freeze({ ...m.args }),
49
+ query: (frame) => call("query", frame),
50
+ queryAll: (key, frame) => call("queryAll", key, frame),
51
+ byShortId: (key, n, fields) => call("byShortId", key, n, fields),
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,9 +1,8 @@
1
- import { C as Id, D as RowMetadata, E as Row, O as RowMetadataField, S as ClientSuppliedServerFieldError, T as ROW_METADATA_FIELDS, _ as EdgesStore, a as FieldDefScalar, b as ActorIdentity, c as MutationSchema, d as TypeSchema, f as CanDeleteResult, g as EdgeWriteInput, h as EdgeRef, i as FieldDefList, l as PackEnvelope, m as EdgePatch, n as FieldDef, o as FieldDefStruct, p as Edge, r as FieldDefCrossRef, s as FieldInput, t as EnvelopeShape, u as Schema, v as OnDelete, w as IdentityKind, x as CLIENT_SUPPLIED_SERVER_FIELD, y as OnMissing } from "./schema-g4FQLr0V.js";
2
- import { a as RuntimeErrors, c as BridgeClient, d as BridgeFrame, i as RuntimeErrorEntry, l as BridgeCredential, n as ResolveObservation, o as RuntimeMetrics, r as ResolverStat, s as SlowRequest, t as ProcessStat, u as BridgeCredentialStore } from "./runtime-metrics-DwpDJ8vz.js";
3
- import { $ as PolicyProbeContext, A as ScheduledTask, B as StartOpts, C as QualifiedFrame, D as RegistryEntryInput, E as RegistryEntry, F as HttpMethod, G as WsConnection, H as SubstrateResponse, I as PluginRouter, J as AutoCrudVerb, K as WsHandler, L as RequestObservation, M as VirtualMutationDef, N as VirtualTypeDef, O as RegistryEntryKind, P as HttpHandler, Q as PolicyDecision, R as RequestObserver, S as PostWriteHook, St as WriteResult, T as RegistryBase, U as SubstrateServer, V as SubstrateRequest, W as TlsConfig, X as Obligation, Y as Identity, Z as Policy, _ as NamespaceDefinition, _t as ReadResult, a as EngineHandle, at as TypedResolver, b as PluginLifecycleContext, bt as WhereClause, c as FrameEntry, ct as Dataset, d as KernelMigrationContext, dt as DropResult, et as RequestContext, f as KernelNamespaceContribution, ft as FieldKind, g as NamespaceConfig, gt as ReadParams, h as McpToolRegistration, ht as OrderByClause, i as EncodeContext, it as RowFilterObligation, j as ScheduledTaskContext, k as RegistryEntryResolver, l as KernelLifecycleContext, lt as DatasetRegistry, m as KernelRouteClaim, mt as FilterCapabilities, n as DropParticipant, nt as ResolverArgs, o as EngineInput, ot as WriteEvent, p as KernelPlugin, pt as FieldPredicate, q as AfterTxWork, r as EmbedSourceContext, rt as ResolverReturn, s as FilterOperatorDef, st as ConditionalUpdateResult, t as CoordinatorPlugin, tt as Resolver, u as KernelMigration, ut as DeleteResult, v as NamespaceInstallContext, vt as TxScopeHandles, w as Registry, x as PluginRouteContext, xt as WriteOptions, y as NamespaceTypeDef, yt as UpdateFieldRef, z as RuntimeOp } from "./plugin-t2g2wX0b.js";
4
- import { a as ResolverFrameError, c as isAuthCause, i as ReservedField, l as isResolverFrameError, n as MissingReferentError, o as RestrictViolation, r as NamespaceMismatch, s as UnsupportedFilterError, t as BridgeUnreachableError, u as isRestrictViolation } from "./errors-D4vKuwz8.js";
5
- 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-C72iVS5T.js";
6
- import { $ as NlJudgeStep, 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 NlAskRequest, K as resolveDefaultKeyPath, L as isEncryptedKey, M as or, N as ADMIN_CAPABILITIES, O as decodeList, P as DEFAULT_CAPABILITIES, Q as NlJudgeChoice, R as makeAuthorizationProvider, S as expandFlat, T as grantIsUniform, U as AdminCredential, V as describeGrant, W as AdminEnv, X as NlEvidence, Y as NlAskResult, Z as NlJudgeAction, _ as newlyGrantedPairs, a as denyAll, at as NlPackType, b as capabilitiesFor, c as requireIdentity, ct as NlParsedData, d as KeyUpdateRefusal, dt as NlValueAlias, et as NlJudgedStatus, f as checkRevocable, ft as NlWireEvent, g as newlyGranted, gt as Query, h as grantEntriesConfer, ht as NLVocabularyHint, i as allowVerbs, it as NlPackField, j as not, k as encodeList, l as requireNamespace, lt as NlServedPack, m as grantCovers, mt as NLResult, n as row, nt as NlNamespaceRulings, o as denyVerbs, ot as NlPackValueRef, p as checkUpdatable, pt as NLBase, q as resolveDefaultKidPath, r as allowAll, rt as NlOutcome, s as requireCapability, st as NlParseStatus, t as applyRowFilters, tt as NlNamespacePack, u as KeyMutationRefusal, ut as NlTrailEvent, v as revokedAtIso, w as grantEntryError, x as encodeGrant, y as Grant, z as makeTokenProvider } from "./row-ByLFE2Wx.js";
1
+ import { $ as VirtualMutationDef, $t as WalkAgg, A as KernelLifecycleContext, An as OnMissing, At as DatasetRegistry, B as NamespaceTypeDef, Bn as WriteRow, Bt as IndexPlan, C as EmbedSourceContext, Cn as CanDeleteResult, Ct as RowFilterObligation, D as FilterOperatorDef, Dn as EdgeWriteInput, Dt as ConditionalUpdateResult, E as EngineInput, En as EdgeRef, Et as AggFn, F as KernelRouteClaim, Fn as IdentityKind, Ft as FilterCapabilities, G as Registry, Gt as ReadParams, H as PluginRouteContext, Ht as OrderByClause, I as McpToolRegistration, In as ROW_METADATA_FIELDS, It as FilterWriteLimits, J as RegistryEntryInput, Jt as StorageReport, K as RegistryBase, Kt as ReadResult, L as NamespaceConfig, Ln as Row, Lt as FilterWriteOptions, M as KernelMigrationContext, Mn as CLIENT_SUPPLIED_SERVER_FIELD, Mt as DropResult, N as KernelNamespaceContribution, Nn as ClientSuppliedServerFieldError, Nt as FieldKind, O as FrameEntry, On as EdgesStore, Ot as DEFAULT_FILTER_WRITE_LIMITS, P as KernelPlugin, Pn as Id, Pt as FieldPredicate, Q as ScheduledTaskContext, Qt as UpdateFieldRef, R as NamespaceDefinition, Rn as RowMetadata, Rt as FilterWriteResult, S as DropParticipant, Sn as FunctionSig, St as ResolverReturn, T as EngineHandle, Tn as EdgePatch, Tt as WriteEvent, U as PostWriteHook, Ut as PoolStats, V as PluginLifecycleContext, Vn as assertNoRepeatedIds, Vt as NestedSelection, W as QualifiedFrame, Wt as PromotionEvent, X as RegistryEntryResolver, Xt as TypeIndexState, Y as RegistryEntryKind, Yt as TxScopeHandles, Z as ScheduledTask, Zt as TypeStorageReport, _ as naturalOrderOf, _n as EXPR_AGGREGATES, _t as PolicyDecision, a as FieldDefCrossRef, an as WriteOptions, at as RequestObserver, b as CommittedWritesHook, bn as Expr, bt as Resolver, c as FieldDefStruct, cn as ResolveObservation, ct as SubstrateRequest, d as OrderedBy, dn as RuntimeErrors, dt as TlsConfig, en as WalkAggOperand, et as VirtualTypeDef, f as PackEnvelope, fn as RuntimeMetrics, ft as AfterTxWork, g as isColumnField, gn as DATE_UNITS, gt as Policy, h as TypeSchema, hn as ArgType, ht as Obligation, i as FieldDef, in as WhereClause, it as RequestObservation, j as KernelMigration, jn as ActorIdentity, jt as DeleteResult, k as IndexDecl, kn as OnDelete, kt as Dataset, l as FieldInput, ln as ResolverStat, lt as SubstrateResponse, m as Schema, mn as TypeStats, mt as Identity, n as Dropped, nn as WalkNode, nt as HttpMethod, o as FieldDefList, on as WriteResult, ot as RuntimeOp, p as PlanClause, pn as SlowRequest, pt as AutoCrudVerb, q as RegistryEntry, qt as RefOperand, r as EnvelopeShape, rn as WalkPick, rt as PluginRouter, s as FieldDefScalar, sn as ProcessStat, st as StartOpts, t as DEFAULT_ORDERED_BY, tn as WalkAggPredicate, tt as HttpHandler, u as MutationSchema, un as RuntimeErrorEntry, ut as SubstrateServer, v as BatchResolver, vn as EXPR_FUNCTIONS, vt as PolicyProbeContext, w as EncodeContext, wn as Edge, wt as TypedResolver, x as CoordinatorPlugin, xn as ExprType, xt as ResolverArgs, y as CommittedWriteBatch, yn as EXPR_LIMITS, yt as RequestContext, z as NamespaceInstallContext, zn as RowMetadataField, zt as FrameAgg } from "./schema-aIkY8sR3.js";
2
+ import { i as BridgeFrame, n as BridgeCredential, r as BridgeCredentialStore, t as BridgeClient } from "./bridge-DnToJedN.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-Cmkp1qxf.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-DW8ng02H.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-D0If4qif.js";
7
6
  //#region ../../packages/substrate-types/src/assert-never.d.ts
8
7
  /**
9
8
  * Exhaustiveness guard for the `default:` arm of a `switch` over a
@@ -104,6 +103,52 @@ export declare function confersAnywhere(resolved: IdentityGrant | null, capabili
104
103
  /** Every capability conferred anywhere — the union, for error messages only. */
105
104
  export declare function allCapabilities(resolved: IdentityGrant | null): string[];
106
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
131
+ //#region ../../packages/substrate-types/src/iso-timestamp.d.ts
132
+ /**
133
+ * `v` as `YYYY-MM-DDTHH:MM:SS[.ffffff](Z|±HH:MM)`, or `undefined` when it is
134
+ * outside the grammar or names a day that does not exist (Feb 30, year 0000).
135
+ * No offset is read as UTC, and a date alone as its midnight UTC.
136
+ */
137
+ export declare function normalizeIsoTimestamp(v: string): string | undefined;
138
+ /** Is `v` a timestamp every dataset reads to the same instant? */
139
+ export declare function isIsoTimestamp(v: string): boolean;
140
+ /** Does `v` have the grammar's shape but name a day that does not exist (Feb 30, month 13, year 0000)? */
141
+ export declare function isImpossibleIsoTimestamp(v: string): boolean;
142
+ /** The form a write or a filter operand must take, for error messages. */
143
+ export declare const ISO_INSTANT_FORM = "an ISO 8601 instant with a time and an offset, e.g. 2026-11-14T10:00:00Z or 2026-11-14T10:00:00+01:00";
144
+ /**
145
+ * Is `v` an instant: a real date, a time AND an offset (`Z` or `±HH:MM`)?
146
+ * What a write and a filter operand must be. Offset-less and date-only values
147
+ * name no instant on their own, so they are refused rather than read as UTC;
148
+ * `normalizeIsoTimestamp` stays lenient so rows written before this still read.
149
+ */
150
+ export declare function isIsoInstant(v: string): boolean;
151
+ //#endregion
107
152
  //#region ../../packages/substrate-types/src/keyed-mutex.d.ts
108
153
  /**
109
154
  * A process-local mutual-exclusion lock per string key.
@@ -138,13 +183,24 @@ export declare const METADATA_AUTHOR_FIELDS: {
138
183
  readonly kind: 'updatedByKind';
139
184
  };
140
185
  };
186
+ /**
187
+ * The far side of a walk hop (`{ in }` / `{ out }`): its fields and its own
188
+ * hops, or undefined when the hop does not resolve (the validator refuses it).
189
+ */
190
+ export type MetadataHop = (node: Record<string, unknown>) => {
191
+ fields: Record<string, FieldDef>;
192
+ hop: MetadataHop;
193
+ } | undefined;
194
+ /** A `_walk` / `_agg` node with its `where` rewritten against the far type. */
195
+ export declare function normaliseWalkNode(node: unknown, hop: MetadataHop | undefined): unknown;
141
196
  /**
142
197
  * Rewrites every metadata spelling in a `where` clause onto the canonical
143
- * columns, through AND / OR / NOT. A name the type declares as a field of its
144
- * own is left alone, and so is anything that is not a metadata spelling, for
145
- * the validator to judge.
198
+ * columns, through AND / OR / NOT and, given `hop`, into each `_walk` / `_agg`
199
+ * against its far type. A name the type declares as a field of its own is
200
+ * left alone, and so is anything that is not a metadata spelling, for the
201
+ * validator to judge.
146
202
  */
147
- export declare function normaliseMetadataWhere(where: unknown, fieldDefs: Record<string, FieldDef>): unknown;
203
+ export declare function normaliseMetadataWhere(where: unknown, fieldDefs: Record<string, FieldDef>, hop?: MetadataHop): unknown;
148
204
  /** Rewrites metadata spellings in an `orderBy` list; an author name sorts by its id. */
149
205
  export declare function normaliseMetadataOrderBy(orderBy: unknown, fieldDefs: Record<string, FieldDef>): unknown;
150
206
  //#endregion
@@ -337,6 +393,43 @@ interface TypeInput {
337
393
  lexical?: {
338
394
  source: (row: Row) => string | null | undefined | Promise<string | null | undefined>;
339
395
  };
396
+ /**
397
+ * Composite and unique indexes, built by the engine with the filter
398
+ * compiler's own expressions. Keys and predicate fields must be declared
399
+ * scalar (not json) or crossRef fields. See `IndexDecl`.
400
+ */
401
+ indexes?: IndexDecl[];
402
+ /**
403
+ * The type's natural order: what a read with no `orderBy` returns. Exactly
404
+ * one key, a declared date or number field or a metadata column
405
+ * (`createdAt`, `updatedAt`, or `seq` on a visible-order type). Absent
406
+ * means newest first by `createdAt`.
407
+ */
408
+ orderedBy?: OrderedBy;
409
+ /**
410
+ * `'visible'`: each inserted row gets `_metadata.seq`, strictly increasing
411
+ * per type in commit order, so a reader paging by `seq` never sees a higher
412
+ * seq before a lower one becomes visible. An upsert of an existing row keeps
413
+ * its seq. `seq` is filterable, sortable, and valid in `orderedBy`.
414
+ *
415
+ * Cost: writes to the type are serialised. Each insert holds a per-type
416
+ * transaction lock from seq assignment to commit, so one writer's open
417
+ * transaction blocks every other writer of the type until it ends. Other
418
+ * types are unaffected and pay nothing.
419
+ *
420
+ * Two transactions that write two visible-order types in opposite orders
421
+ * can deadlock; Postgres aborts one with 40P01. Write them in a consistent
422
+ * order.
423
+ *
424
+ * Making an existing type visible assigns no seq to its old rows: they keep
425
+ * a null seq and sort after every new row.
426
+ */
427
+ ordering?: 'visible';
428
+ /**
429
+ * Expected size. `large` lets the index advisor recommend for this type
430
+ * from its profile's lower `minRowsLargeHint` rather than `minRows`.
431
+ */
432
+ expectedSize?: 'small' | 'large';
340
433
  }
341
434
  interface DefineNamespaceOptions {
342
435
  /**
@@ -349,31 +442,20 @@ interface DefineNamespaceOptions {
349
442
  * consumer (`nl` for substrate-nl's rulings). Must be JSON-serialisable.
350
443
  */
351
444
  annotations?: Record<string, unknown>;
352
- /** See `NamespaceDefinition.promotedColumns`. */
445
+ /**
446
+ * @deprecated Ignored: every declared scalar is a column of its type's
447
+ * table already. See `NamespaceDefinition.promotedColumns`.
448
+ */
353
449
  promotedColumns?: NamespaceDefinition['promotedColumns'];
354
450
  }
355
451
  export declare function defineNamespace(namespace: string, types: Record<string, TypeInput>, opts?: DefineNamespaceOptions): NamespaceDefinition;
356
- //#endregion
357
- //#region ../../packages/substrate-sdk/src/autocrud/autocrud-create.d.ts
358
- interface CreateResolverOptions {
359
- /** Type field definitions. Used to detect readonly fields and drive shortId allocation. */
360
- fields?: Record<string, FieldDef>;
361
- }
362
- export declare function createResolver<T extends Row = Row>(typeName: string, dataset: Dataset, options?: CreateResolverOptions): TypedResolver<T>;
363
- //#endregion
364
- //#region ../../packages/substrate-sdk/src/autocrud/autocrud-delete.d.ts
452
+ /** Throws unless every key is a btree-indexable declared field or `createdAt`/`updatedAt`, and every predicate field a declared one. */
453
+ export declare function assertIndexDecl(typeName: string, fields: Record<string, FieldDef>, decl: IndexDecl): void;
365
454
  /**
366
- * Delete resolver return shape. Carries the row's string index signature so
367
- * it slots into `Row` (which has `[field: string]: unknown`) without cast
368
- * gymnastics — the autoCRUD registration path wants the common `Row | Row[]`
369
- * return type.
455
+ * Throws unless `orderedBy` is one key, on a date or number field or a metadata
456
+ * column; `seq` only on a type declared `ordering: 'visible'`.
370
457
  */
371
- interface DeleteResolverResult {
372
- id: Id;
373
- deleted: boolean;
374
- [field: string]: unknown;
375
- }
376
- export declare function deleteResolver(typeName: string, dataset: Dataset, edges: EdgesStore): TypedResolver<DeleteResolverResult>;
458
+ export declare function assertOrderedBy(typeName: string, def: Pick<TypeInput, 'fields' | 'orderedBy' | 'ordering'>): void;
377
459
  //#endregion
378
460
  //#region ../../packages/substrate-sdk/src/autocrud/autocrud-get.d.ts
379
461
  export declare function getResolver<T extends Row = Row>(typeName: string, dataset: Dataset): TypedResolver<T | null>;
@@ -391,7 +473,8 @@ interface PurgeResolverResult {
391
473
  purged: boolean;
392
474
  [field: string]: unknown;
393
475
  }
394
- export declare function purgeResolver(typeName: string, dataset: Dataset): TypedResolver<PurgeResolverResult>;
476
+ /** With `policy`, a row its row filters hide is left in place and answers `purged: false`. */
477
+ export declare function purgeResolver(typeName: string, dataset: Dataset, policy?: Policy): TypedResolver<PurgeResolverResult>;
395
478
  //#endregion
396
479
  //#region ../../packages/substrate-sdk/src/autocrud/autocrud-update.d.ts
397
480
  interface UpdateResolverOptions {
@@ -412,21 +495,106 @@ interface UpdateResolverOptions {
412
495
  * checks; this owns the metadata idiom so it stays single-sourced.
413
496
  */
414
497
  export declare function applyUpdatePatch(ds: Dataset, typeName: string, rowId: Id, patchFields: Record<string, unknown>, ctx: RequestContext, onWrite?: ResolverArgs['onWrite']): Promise<Row | null>;
415
- export declare function updateResolver<T extends Row = Row>(typeName: string, dataset: Dataset, edges: EdgesStore, options?: UpdateResolverOptions): TypedResolver<T | null>;
498
+ //#endregion
499
+ //#region ../../packages/substrate-sdk/src/autocrud/autocrud-delete.d.ts
500
+ /**
501
+ * Delete resolver return shape. Carries the row's string index signature so
502
+ * it slots into `Row` (which has `[field: string]: unknown`) without cast
503
+ * gymnastics — the autoCRUD registration path wants the common `Row | Row[]`
504
+ * return type.
505
+ */
506
+ interface DeleteResolverResult {
507
+ id: Id;
508
+ deleted: boolean;
509
+ [field: string]: unknown;
510
+ }
511
+ //#endregion
512
+ //#region ../../packages/substrate-sdk/src/autocrud/batch.d.ts
513
+ interface BatchResolverOptions {
514
+ /** The type's field definitions: validation, crossRefs and shortId allocation. */
515
+ fields?: Record<string, FieldDef>;
516
+ /** Update and delete: a row the policy's row filters hide answers as missing. */
517
+ policy?: Policy;
518
+ /** Create and update: runs per written row once the transaction commits. */
519
+ postWrite?: PostWriteHook;
520
+ }
521
+ /** `create<T>` without crossRef edges: the batch resolver with `edges: null`, one element. */
522
+ export declare function createResolver<T extends Row = Row>(typeName: string, dataset: Dataset, options?: Pick<BatchResolverOptions, 'fields'>): TypedResolver<T>;
523
+ /** `update<T>`: the batch resolver with one element. */
524
+ export declare function updateResolver<T extends Row = Row>(typeName: string, dataset: Dataset, edges: EdgesStore, options?: Pick<BatchResolverOptions, 'fields'>): TypedResolver<T | null>;
525
+ /** `delete<T>`: the batch resolver with one element. */
526
+ export declare function deleteResolver(typeName: string, dataset: Dataset, edges: EdgesStore, options?: Pick<BatchResolverOptions, 'policy'>): TypedResolver<DeleteResolverResult>;
527
+ //#endregion
528
+ //#region ../../packages/substrate-sdk/src/autocrud/filter-writes.d.ts
529
+ /**
530
+ * `count` is every row changed. `ids` are the changed ids in ascending order,
531
+ * compared as strings code unit by code unit, cut to the first `idsCap`; so
532
+ * the same rows give the same ids on every path and dataset, whatever order
533
+ * the store returned them in. `idsTruncated` says whether more changed.
534
+ */
535
+ interface FilterWriteMutationResult {
536
+ count: number;
537
+ ids: Id[];
538
+ idsTruncated: boolean;
539
+ }
540
+ interface FilterWriteResolverOptions extends BatchResolverOptions {
541
+ /**
542
+ * Whether the type's single-row counterpart (`update<T>` for updateMany,
543
+ * `delete<T>` for deleteMany) is still autoCRUD's own entry. When a plugin
544
+ * replaced it with custom logic, writing by filter would bypass that, so the
545
+ * resolver refuses. Absent: served.
546
+ */
547
+ ownsSingleRowWrite?: () => boolean;
548
+ }
549
+ /** `updateMany<T>`: `set` merged into every live row `where` matches. */
550
+ export declare function updateManyResolver(typeName: string, dataset: Dataset, edges: EdgesStore, opts?: FilterWriteResolverOptions): TypedResolver<FilterWriteMutationResult>;
551
+ /** `deleteMany<T>`: tombstones every live row `where` matches, behind the restrict gate. */
552
+ export declare function deleteManyResolver(typeName: string, dataset: Dataset, edges: EdgesStore, opts?: Pick<FilterWriteResolverOptions, 'policy' | 'ownsSingleRowWrite'>): TypedResolver<FilterWriteMutationResult>;
416
553
  //#endregion
417
554
  //#region ../../packages/substrate-sdk/src/autocrud/index.d.ts
555
+ /**
556
+ * The narrow surface `installAutoCrud` needs from a registry. The core
557
+ * `Registry` class satisfies this structurally.
558
+ *
559
+ * Resolver signature matches the core `Resolver` type exactly — typed against
560
+ * `(ctx, args) => Promise<Row | Row[] | null>` so autocrud's `get` can surface
561
+ * null without sentinel gymnastics.
562
+ */
418
563
  export type AutoCrudResolver = (ctx: RequestContext, args: ResolverArgs) => Promise<Row | Row[] | ReadResult | null>;
419
564
  export interface AutoCrudRegistry {
420
565
  register(typeName: string, input: {
421
566
  resolver: AutoCrudResolver;
567
+ /** Set-wise resolver for a mutate array of this mutation. */
568
+ batch?: BatchResolver;
422
569
  policy?: Policy;
423
570
  fields?: Record<string, FieldDef>;
424
571
  kind?: 'type' | 'mutation';
425
572
  params?: Record<string, FieldDef>;
426
573
  returns?: FieldDef;
574
+ orderedBy?: OrderedBy;
575
+ indexes?: IndexDecl[];
576
+ expectedSize?: 'small' | 'large';
427
577
  /** Semantic autoCRUD verb threaded to policies via ctx.verb. */
428
578
  verb?: AutoCrudVerb;
579
+ /** The type a by-filter mutation writes; the engine validates its `where`. */
580
+ filterTarget?: string;
429
581
  }): void;
582
+ /** When present, lets `installAutoCrud` refuse a type whose keys collide with another's. */
583
+ get?(typeName: string): {
584
+ kind?: string;
585
+ resolver: object;
586
+ } | undefined;
587
+ }
588
+ /**
589
+ * A namespace declares both `X` and `ManyX`: `X`'s `updateManyX` /
590
+ * `deleteManyX` are `ManyX`'s `update<T>` / `delete<T>` keys.
591
+ */
592
+ export declare class AutoCrudNameCollisionError extends Error {
593
+ readonly namespace: string;
594
+ readonly type: string;
595
+ readonly other: string;
596
+ readonly name = "AutoCrudNameCollisionError";
597
+ constructor(namespace: string, type: string, other: string);
430
598
  }
431
599
  export interface InstallAutoCrudOptions {
432
600
  /** Field definitions for the type — passed through to the registry entry. */
@@ -452,6 +620,12 @@ export interface InstallAutoCrudOptions {
452
620
  * Delete resolver does NOT invoke this hook.
453
621
  */
454
622
  postWrite?: PostWriteHook;
623
+ /** The type's natural order — published on the type entry's schema. */
624
+ orderedBy?: OrderedBy;
625
+ /** Declared indexes, kept on the type entry for storage to build (proposed types). */
626
+ indexes?: IndexDecl[];
627
+ /** Size hint, kept on the type entry for the index advisor (proposed types). */
628
+ expectedSize?: 'small' | 'large';
455
629
  }
456
630
  export interface CreateResolverWithEdgesOptions {
457
631
  /** Field definitions for the type — crossRef entries drive edge emission. */
@@ -484,6 +658,12 @@ export declare function installAutoCrud(registry: AutoCrudRegistry, typeName: st
484
658
  //#endregion
485
659
  //#region ../../packages/substrate-sdk/src/autocrud/reserved.d.ts
486
660
  export declare const RESERVED_AUTOCRUD_FIELDS: Record<string, FieldDef>;
661
+ /** Is `def` a descriptor autoCRUD injected, rather than a body field of the same name? */
662
+ export declare function isReservedAutoCrudField(def: FieldDef): boolean;
663
+ /** The server metadata names a body field may not take: expressions, where and orderBy read them as metadata. */
664
+ export declare const RESERVED_METADATA_FIELD_NAMES: readonly string[];
665
+ /** Why a field of this name cannot be declared, or undefined when it can. */
666
+ export declare function reservedMetadataFieldMessage(name: string): string | undefined;
487
667
  /** Reserved field names — useful for validation loops. */
488
668
  export declare const RESERVED_AUTOCRUD_FIELD_NAMES: string[];
489
669
  //#endregion
@@ -575,6 +755,12 @@ export declare function queryOne<T>(engine: EngineHandle, namespace: string, typ
575
755
  //#endregion
576
756
  //#region ../../packages/substrate-sdk/src/field.d.ts
577
757
  interface ScalarFieldOptions {
758
+ /**
759
+ * `true` builds a btree for this field. Leave it unset for no index: the
760
+ * field still filters and sorts, by scanning. `false` also means no index,
761
+ * and marks the field as not a search handle (long-form prose), so NL
762
+ * leaves it out.
763
+ */
578
764
  indexed?: boolean;
579
765
  nullable?: boolean;
580
766
  /**
@@ -632,9 +818,9 @@ interface StructFieldOptions {
632
818
  }
633
819
  interface ListFieldOptions {
634
820
  /**
635
- * Opt the list field into server-side `has` (element-membership) filtering
636
- * without `_allowTableScan`. The substrate binary auto-derives the backing GIN as
637
- * a tracked migration at boot — no per-field migration to author.
821
+ * Back the list field's `has` (element-membership) filter with a GIN, which
822
+ * the substrate binary derives as a tracked migration at boot — no per-field
823
+ * migration to author. Without it `has` still works, by scanning.
638
824
  * Default false. See `FieldDefList.indexed`.
639
825
  */
640
826
  indexed?: boolean;
@@ -661,6 +847,19 @@ interface JsonFieldOptions {
661
847
  export declare const field: {
662
848
  string(opts?: ScalarFieldOptions): FieldDefScalar;
663
849
  number(opts?: ScalarFieldOptions): FieldDefScalar;
850
+ /**
851
+ * Integers: pick the narrowest kind whose range holds every value the field
852
+ * will EVER take, because a kind cannot change once rows exist (moving means
853
+ * a new field and a backfill). All three filter, sort and sum as exact
854
+ * integers; they differ in storage width.
855
+ * int16 -32768 to 32767, 2 bytes: small codes, flags, ages, percentages.
856
+ * int32 about ±2.1 billion, 4 bytes: counts, durations, ids within one source.
857
+ * int64 about ±9.2e18, 8 bytes, a decimal string on the wire past 2^53: totals, epoch-ms, external ids.
858
+ * Use `number` for fractional values. When unsure, take the next width up.
859
+ */
860
+ int16(opts?: ScalarFieldOptions): FieldDefScalar;
861
+ int32(opts?: ScalarFieldOptions): FieldDefScalar;
862
+ int64(opts?: ScalarFieldOptions): FieldDefScalar;
664
863
  boolean(opts?: ScalarFieldOptions): FieldDefScalar;
665
864
  date(opts?: DateFieldOptions): FieldDefScalar;
666
865
  enum(values: readonly string[], opts?: ScalarFieldOptions): FieldDefScalar;
@@ -679,8 +878,7 @@ export declare const field: {
679
878
  * JSON body. Value round-trips unchanged. Filter a value INSIDE it with a
680
879
  * path predicate — `{ values: { path: ['year'], gt: 1990 } }` — which is
681
880
  * type-strict. `eq` / `in` / `has` are index-served only with
682
- * `{ indexed: true }`; everything else scans the type's rows and needs
683
- * `_allowTableScan`. No ordering. When inner keys are known at schema time,
881
+ * `{ indexed: true }`; everything else scans the type's rows. No ordering. When inner keys are known at schema time,
684
882
  * `field.struct` is still the better fit: declared, indexed, orderable.
685
883
  */
686
884
  json(opts?: JsonFieldOptions): FieldDefScalar;
@@ -697,4 +895,4 @@ export declare function resolveEntityId(dataset: Dataset, type: string, input: I
697
895
  */
698
896
  export declare function resolveEntityRow(dataset: Dataset, type: string, input: Id): Promise<Row | null>;
699
897
  //#endregion
700
- export { ADMIN_CAPABILITIES, ActorIdentity, type AdminCredential, type AdminEnv, AfterTxWork, AutoCrudVerb, BridgeClient, BridgeCredential, BridgeCredentialStore, BridgeFrame, BridgeRegistry, BridgeUnreachableError, CLIENT_SUPPLIED_SERVER_FIELD, CanDeleteResult, ClientSuppliedServerFieldError, ConditionalUpdateResult, CoordinatorPlugin, type CrossRefFieldOptions, DEFAULT_CAPABILITIES, Dataset, DatasetRegistry, type DateFieldOptions, type DefineNamespaceOptions, DeleteResult, type DeleteRowArgs, type DeleteRowResult, DropParticipant, DropResult, Edge, EdgePatch, EdgeRef, EdgeWriteInput, EdgesStore, EmbedSourceContext, EncodeContext, EngineHandle, EngineInput, EnvelopeShape, FieldDef, FieldDefCrossRef, FieldDefList, FieldDefScalar, FieldDefStruct, FieldInput, FieldKind, FieldPredicate, FilterCapabilities, FilterOperatorDef, FrameEntry, type Grant, HttpHandler, HttpMethod, Id, IdempotencyStore, Identity, IdentityKind, 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, NlAskRequest, NlAskResult, NlEvidence, NlJudgeAction, NlJudgeChoice, NlJudgeStep, NlJudgedStatus, NlNamespacePack, NlNamespaceRulings, NlOutcome, NlPackField, NlPackType, NlPackValueRef, NlParseStatus, NlParsedData, NlServedPack, NlTrailEvent, NlValueAlias, NlWireEvent, Obligation, OnDelete, OnMissing, OrderByClause, PackEnvelope, PluginLifecycleContext, PluginRouteContext, PluginRouter, Policy, PolicyDecision, PolicyProbeContext, PostWriteHook, ProcessStat, QualifiedFrame, Query, ROW_METADATA_FIELDS, ReadParams, ReadResult, 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, SYSTEM_NAMESPACE, type ScalarFieldOptions, ScheduledTask, ScheduledTaskContext, Schema, SlowRequest, StartOpts, type StructFieldOptions, SubstrateRequest, SubstrateResponse, SubstrateServer, SweepDeps, SweepState, TargetState, TlsConfig, type TokenProviderOpts, TxScopeHandles, type TypeInput, TypeSchema, TypedResolver, UnsupportedFilterError, UpdateFieldRef, type UpdateResolverOptions, VirtualMutationDef, VirtualTypeDef, WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, WS_REASON_SERVER_RESTART, WS_REASON_SUBSCRIPTION_OVERLOADED, WhereClause, WriteEvent, WriteOptions, WriteResult, WsConnection, WsHandler, WsRequestFrame, WsResponseFrame, WsResponseKind, adminClaimCapabilities, allowAll, allowVerbs, and, applyRowFilters, capabilitiesFor, checkRevocable, checkUpdatable, decodeList, denyAll, denyVerbs, describeGrant, encodeGrant, encodeList, expandFlat, flattenGrant, grantCovers, grantEntriesConfer, grantEntryError, grantIsUniform, intersectGrants, isActiveAdminKeyRow, isAuthCause, isEncryptedKey, isResolverFrameError, isRestrictViolation, makeAuthorizationProvider, makeTokenProvider, newlyGranted, newlyGrantedPairs, not, or, parseGrantEntries, requireCapability, requireIdentity, requireNamespace, resolveAdminCredential, resolveDefaultKeyPath, resolveDefaultKidPath, revokedAtIso, row };
898
+ 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, 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 };