@mnmal-ai/substrate 1.0.0-alpha.19 → 1.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{boot-store-DL2Wkzun.js → boot-store-BaDqbBS-.js} +10 -11
- package/dist/{cli-BYyPsfdY.js → cli-RRFphMtQ.js} +10 -11
- package/dist/client.browser.js +26 -19
- package/dist/client.d.ts +1 -1
- package/dist/client.js +5 -6
- package/dist/cluster-worker.js +0 -1
- package/dist/{content-type-C7T28xNb.js → content-type-wLljot5M.js} +0 -1
- package/dist/{env-utils-CGNazUNt.js → env-utils-s25Z1YSA.js} +0 -1
- package/dist/{fake-DUVtKVSE.js → fake-DdXtb-m8.js} +0 -1
- package/dist/{index-rW7fu2Af.d.ts → index-ZKeYFHDD.d.ts} +6 -2
- package/dist/msgpackr-Dq18g6Ds.js +16 -0
- package/dist/{node-version-BlYrbY2I.js → node-version-BtK_Nq6z.js} +0 -1
- package/dist/pack.d.ts +2 -2
- package/dist/pack.js +4 -4
- package/dist/{pg-edges-store-B0Krqoac.js → pg-edges-store-C-IRv-O9.js} +1 -2
- package/dist/{plugin-Dk9h__NU.js → plugin-MSbSZ6Al.js} +2 -3
- package/dist/proposals-bootstrap.js +2 -3
- package/dist/proposals.js +1 -2
- package/dist/recall-bootstrap.js +3 -4
- package/dist/recall.js +2 -3
- package/dist/{repl-D6_CBsue.js → repl-Ob5OyQqj.js} +1 -2
- package/dist/{run-BJMgCcCC.js → run-B438GGJK.js} +7 -8
- package/dist/{script-DgXaJY1Y.js → script-A9dxMRZA.js} +0 -1
- package/dist/script-runner.js +0 -1
- package/dist/sdk.js +4 -5
- package/dist/semver-D_zdq0hi.js +17 -0
- package/dist/{src-B_oTGi3X.js → src-BNdhH_Hx.js} +22 -22
- package/dist/{src-Dlmuq32R.js → src-BSL2yyVy.js} +3 -4
- package/dist/{src-B6nsPVmD.js → src-B_kHkbsr.js} +10 -34
- package/dist/{src-DreZjBk7.js → src-De9j33jv.js} +3 -4
- package/dist/{src-BcigMQdR.js → src-DkxrpQOz.js} +2 -3
- package/dist/{src-D3ACIp1y.js → src-DmiUWOLp.js} +1 -2
- package/dist/{src-oO0DtS6y.js → src-S84ef4e3.js} +50 -22
- package/dist/substrate-admin.js +2 -3
- package/dist/substrate.js +2 -3
- package/dist/testing.js +6 -7
- package/package.json +21 -20
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { et as memberKey } from "./plugin-Dk9h__NU.js";
|
|
1
|
+
import { A as isReservedAutoCrudField, Ft as HttpBridgeClient, Ln as DEFAULT_FILTER_WRITE_LIMITS, Lt as buildContext, Vt as parseAuthConfig, Wt as WS_REASON_SERVER_RESTART, Z as MemoryEdgesStore, _ as AUDIT_EVENT_TYPE, _t as getExtensionOperator, a as composeFromManifests, bt as unregisterExtensionOperator, c as MemoryDataset, et as effectiveFilterOperators, g as buildAuditRow, h as SYSTEM_TYPE_DEFS, i as PluginLoadError, n as kernelMigrationTracking, o as DEFAULT_NAMESPACE, r as mountKernelRoute, s as compose, t as composeKernelPlugins, u as isStoreProfileName, vt as listExtensionOperators, yt as registerExtensionOperator } from "./src-S84ef4e3.js";
|
|
2
|
+
import { a as adminClaimCapabilities, d as resolveDefaultKidPath, l as resolveAdminCredential, n as trimTrailingSlashes, r as ADMIN_CAPABILITIES, s as makeAuthorizationProvider, t as parsePositiveInt, u as resolveDefaultKeyPath } from "./env-utils-s25Z1YSA.js";
|
|
3
|
+
import { D as isActiveAdminKeyRow, E as describeGrant, L as encodeList, M as grantEntryError, T as SYSTEM_NAMESPACE, v as grantEntriesConfer } from "./src-DmiUWOLp.js";
|
|
4
|
+
import { r as FRAMES_JSON_MIME, s as decodeStreamFrames, u as withIdleTimeout } from "./src-B_kHkbsr.js";
|
|
5
|
+
import { C as diagnose, S as DIAGNOSE_CHECKS, T as substrateFetch, _ as SKIPPABLE_STEPS, b as planOnboarding, h as CURRENT_MARK, i as tokenAudience, v as STEP_MARKS, x as requiredOutstanding, y as currentStep } from "./src-BNdhH_Hx.js";
|
|
6
|
+
import { _ as pendingMigrations, f as assertNotMigrating, h as deriveListIndexMigration, m as assertTablesLayout, n as PgDataset, t as PgIdempotencyStore, v as runDerivedMigrations, y as runMigrations } from "./src-DkxrpQOz.js";
|
|
7
|
+
import { t as PgEdgesStore } from "./pg-edges-store-C-IRv-O9.js";
|
|
8
|
+
import { a as InMemoryLexicalStore, i as PgClusterStore, n as PgLexicalStore, o as InMemoryEmbeddingsStore, r as PgEmbeddingsStore, s as InMemoryClusterStore } from "./src-De9j33jv.js";
|
|
9
|
+
import { et as memberKey } from "./plugin-MSbSZ6Al.js";
|
|
11
10
|
import { existsSync, linkSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
12
11
|
import { homedir } from "node:os";
|
|
13
12
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -1754,7 +1753,7 @@ async function closeQuietly(sql) {
|
|
|
1754
1753
|
|
|
1755
1754
|
//#endregion
|
|
1756
1755
|
//#region package.json
|
|
1757
|
-
var version = "1.0.0-alpha.
|
|
1756
|
+
var version = "1.0.0-alpha.20";
|
|
1758
1757
|
|
|
1759
1758
|
//#endregion
|
|
1760
1759
|
//#region src/plugin-manifest.ts
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { n as PgLexicalStore, r as PgEmbeddingsStore } from "./src-DreZjBk7.js";
|
|
1
|
+
import { _ as AUDIT_EVENT_TYPE, dn as validateHardDeleteEnv, g as buildAuditRow, it as saveSweepState, m as runInviteSweep, nt as loadSweepState, rt as runSweep, u as isStoreProfileName, v as INVITE_TYPE } from "./src-S84ef4e3.js";
|
|
2
|
+
import { n as trimTrailingSlashes, s as makeAuthorizationProvider } from "./env-utils-s25Z1YSA.js";
|
|
3
|
+
import { L as encodeList, T as SYSTEM_NAMESPACE, f as coversNamespace, m as grantedIn, p as grantOf } from "./src-DmiUWOLp.js";
|
|
4
|
+
import { B as EXPR_AGGREGATES, H as EXPR_LIMITS, V as EXPR_FUNCTIONS, z as DATE_UNITS } from "./src-B_kHkbsr.js";
|
|
5
|
+
import { Y as AdminCliError, _ as openPgDataset, a as parseBridgeCreds, f as reportUnguardedIndexBuilds, g as version, i as MS_PER_DAY, m as startSentinelClient, n as resolvePluginDir, o as parseBridges, p as runDeferredIndexBuilds, s as parseEnv, t as bootStore, u as redactStoreSpec } from "./boot-store-BaDqbBS-.js";
|
|
6
|
+
import { T as substrateFetch, a as SubstrateClient, d as NetworkError, i as tokenAudience, n as resolveAgentCapabilities, p as AdminBackfillError, r as noRedirectFetch, t as createClientFromEnv, u as AuthError } from "./src-BNdhH_Hx.js";
|
|
7
|
+
import { n as runScript, t as DEFAULT_MAX_WRITES } from "./script-A9dxMRZA.js";
|
|
8
|
+
import { T as tryWithPgAdvisoryLock } from "./src-DkxrpQOz.js";
|
|
9
|
+
import { n as PgLexicalStore, r as PgEmbeddingsStore } from "./src-De9j33jv.js";
|
|
11
10
|
import { chmodSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
12
11
|
import { homedir, hostname, tmpdir } from "node:os";
|
|
13
12
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -2164,7 +2163,7 @@ async function runInit(argv) {
|
|
|
2164
2163
|
return 1;
|
|
2165
2164
|
}
|
|
2166
2165
|
if (!config.yes) try {
|
|
2167
|
-
const { runRepl } = await import("./repl-
|
|
2166
|
+
const { runRepl } = await import("./repl-Ob5OyQqj.js");
|
|
2168
2167
|
config = await runRepl(config);
|
|
2169
2168
|
} catch (err) {
|
|
2170
2169
|
if (err.message?.includes("User force closed")) return 130;
|
package/dist/client.browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as msgpackr from "msgpackr";
|
|
2
2
|
import { signal } from "@preact/signals-core";
|
|
3
3
|
|
|
4
4
|
//#region ../../packages/substrate-client/src/admin/onboard.ts
|
|
@@ -306,13 +306,6 @@ function assertNever(x) {
|
|
|
306
306
|
throw new Error(`unhandled variant: ${JSON.stringify(x)}`);
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
//#endregion
|
|
310
|
-
//#region ../../packages/substrate-types/src/dataset.ts
|
|
311
|
-
const DEFAULT_FILTER_WRITE_LIMITS = Object.freeze({
|
|
312
|
-
maxMatch: 1e4,
|
|
313
|
-
idsCap: 1e3
|
|
314
|
-
});
|
|
315
|
-
|
|
316
309
|
//#endregion
|
|
317
310
|
//#region ../../packages/substrate-types/src/env-utils.ts
|
|
318
311
|
/**
|
|
@@ -387,11 +380,6 @@ function parseQualifiedKey(key) {
|
|
|
387
380
|
};
|
|
388
381
|
}
|
|
389
382
|
|
|
390
|
-
//#endregion
|
|
391
|
-
//#region ../../packages/substrate-types/src/schema.ts
|
|
392
|
-
/** Natural order of a type that declares none: newest first. */
|
|
393
|
-
const DEFAULT_ORDERED_BY = Object.freeze({ createdAt: "desc" });
|
|
394
|
-
|
|
395
383
|
//#endregion
|
|
396
384
|
//#region ../../packages/substrate-pack/src/_plan-cache.ts
|
|
397
385
|
const isObj = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
@@ -508,6 +496,18 @@ function resolveFieldMap$1(schema, typeName, path, makeError) {
|
|
|
508
496
|
return fieldMap;
|
|
509
497
|
}
|
|
510
498
|
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region ../../packages/substrate-pack/src/msgpackr.ts
|
|
501
|
+
/**
|
|
502
|
+
* The one module that imports msgpackr. The published bundle gives it a chunk
|
|
503
|
+
* of its own, so a consumer that never packs or unpacks drops msgpackr, which
|
|
504
|
+
* does not declare itself free of load-time side effects. These are wrappers,
|
|
505
|
+
* not re-exports: a bundler resolves a re-export straight to msgpackr, which
|
|
506
|
+
* would leave every importer of this module importing msgpackr itself.
|
|
507
|
+
*/
|
|
508
|
+
const unpack = (...args) => msgpackr.unpack(...args);
|
|
509
|
+
const createUnpackr = (options) => new msgpackr.Unpackr(options);
|
|
510
|
+
|
|
511
511
|
//#endregion
|
|
512
512
|
//#region ../../packages/substrate-pack/src/encoder.ts
|
|
513
513
|
/**
|
|
@@ -905,7 +905,13 @@ function narrow(def, selection) {
|
|
|
905
905
|
* `raw as string` casts at every call site.
|
|
906
906
|
*/
|
|
907
907
|
function decodeWsEnvelope(raw, mode) {
|
|
908
|
-
if (mode === "pack")
|
|
908
|
+
if (mode === "pack") {
|
|
909
|
+
inbound ??= createUnpackr({
|
|
910
|
+
structuredClone: false,
|
|
911
|
+
mapsAsObjects: true
|
|
912
|
+
});
|
|
913
|
+
return inbound.unpack(toBytes(raw));
|
|
914
|
+
}
|
|
909
915
|
if (typeof raw === "string") return JSON.parse(raw);
|
|
910
916
|
return JSON.parse(new TextDecoder().decode(toBytes(raw)));
|
|
911
917
|
}
|
|
@@ -915,10 +921,7 @@ function decodeWsEnvelope(raw, mode) {
|
|
|
915
921
|
* plain-object maps. msgpackr's other built-in extensions are process-global
|
|
916
922
|
* and still decode, so a server checks a request with `isPlainRequestData`.
|
|
917
923
|
*/
|
|
918
|
-
|
|
919
|
-
structuredClone: false,
|
|
920
|
-
mapsAsObjects: true
|
|
921
|
-
});
|
|
924
|
+
let inbound;
|
|
922
925
|
function toBytes(raw) {
|
|
923
926
|
if (raw instanceof Uint8Array) return raw;
|
|
924
927
|
if (raw instanceof ArrayBuffer) return new Uint8Array(raw);
|
|
@@ -1882,9 +1885,13 @@ function assertSingleKey(frame) {
|
|
|
1882
1885
|
return keys[0];
|
|
1883
1886
|
}
|
|
1884
1887
|
|
|
1888
|
+
//#endregion
|
|
1889
|
+
//#region ../../packages/substrate-client/src/transport/platform-fetch.browser.ts
|
|
1890
|
+
const platformFetch = (input, init) => globalThis.fetch(input, init);
|
|
1891
|
+
|
|
1885
1892
|
//#endregion
|
|
1886
1893
|
//#region ../../packages/substrate-client/src/transport/default-fetch.ts
|
|
1887
|
-
let current =
|
|
1894
|
+
let current = platformFetch;
|
|
1888
1895
|
const substrateFetch = (input, init) => current(input, init);
|
|
1889
1896
|
|
|
1890
1897
|
//#endregion
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ln as Row, W as QualifiedFrame, dn as RuntimeErrors, f as PackEnvelope, fn as RuntimeMetrics, ln as ResolverStat, m as Schema, pn as SlowRequest, sn as ProcessStat, un as RuntimeErrorEntry } from "./schema-laGLMvMC.js";
|
|
2
2
|
import { 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, K as resolveDefaultKeyPath, L as isEncryptedKey, M as or, N as ADMIN_CAPABILITIES, O as decodeList, P as DEFAULT_CAPABILITIES, R as makeAuthorizationProvider, S as expandFlat, T as grantIsUniform, U as AdminCredential, V as describeGrant, W as AdminEnv, X as NlAskResult, Y as NlAskRequest, _ as newlyGrantedPairs, a as denyAll, at as NlOutcome, b as capabilitiesFor, c as requireIdentity, d as KeyUpdateRefusal, dt as NlServedPack, f as checkRevocable, ft as NlTrailEvent, g as newlyGranted, h as grantEntriesConfer, i as allowVerbs, j as not, k as encodeList, l as requireNamespace, m as grantCovers, mt as NlWireEvent, n as row, o as denyVerbs, p as checkUpdatable, q as resolveDefaultKidPath, r as allowAll, s as requireCapability, t as applyRowFilters, u as KeyMutationRefusal, v as revokedAtIso, w as grantEntryError, x as encodeGrant, y as Grant, z as makeTokenProvider } from "./row-CfsHSEfB.js";
|
|
3
|
-
import { o as SchemaDriftError } from "./index-
|
|
3
|
+
import { o as SchemaDriftError } from "./index-ZKeYFHDD.js";
|
|
4
4
|
import { Signal } from "@preact/signals-core";
|
|
5
5
|
//#region ../../packages/substrate-client/src/transport/h2-fetch.d.ts
|
|
6
6
|
/**
|
package/dist/client.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { C as
|
|
5
|
-
import {
|
|
6
|
-
import { n as runScript, t as DEFAULT_MAX_WRITES } from "./script-DgXaJY1Y.js";
|
|
1
|
+
import { a as adminClaimCapabilities, c as makeTokenProvider, d as resolveDefaultKidPath, i as DEFAULT_CAPABILITIES, l as resolveAdminCredential, o as isEncryptedKey, r as ADMIN_CAPABILITIES, s as makeAuthorizationProvider, u as resolveDefaultKeyPath } from "./env-utils-s25Z1YSA.js";
|
|
2
|
+
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, g as checkUpdatable, h as checkRevocable, i as allowVerbs, j as flattenGrant, k as encodeGrant, l as requireNamespace, n as row, o as denyVerbs, r as allowAll, s as requireCapability, t as applyRowFilters, v as grantEntriesConfer, w as or, x as revokedAtIso, y as newlyGranted } from "./src-DmiUWOLp.js";
|
|
3
|
+
import { x as SchemaDriftError } from "./src-B_kHkbsr.js";
|
|
4
|
+
import { C as diagnose, E as createH2Fetch, S as DIAGNOSE_CHECKS, T as substrateFetch, _ as SKIPPABLE_STEPS, a as SubstrateClient, b as planOnboarding, c as reduceSubscribeRows, d as NetworkError, f as SubscribeError, g as ONBOARD_STEPS, h as CURRENT_MARK, i as tokenAudience, l as watchRows, m as BACKFILL_CHUNK, n as resolveAgentCapabilities, o as collectDiagnostics, p as AdminBackfillError, r as noRedirectFetch, s as createDefaultDiagnosticsSink, t as createClientFromEnv, u as AuthError, v as STEP_MARKS, w as reconcileIdentities, x as requiredOutstanding, y as currentStep } from "./src-BNdhH_Hx.js";
|
|
5
|
+
import { n as runScript, t as DEFAULT_MAX_WRITES } from "./script-A9dxMRZA.js";
|
|
7
6
|
|
|
8
7
|
export { ADMIN_CAPABILITIES, AdminBackfillError, AuthError, BACKFILL_CHUNK, CURRENT_MARK, DEFAULT_CAPABILITIES, DEFAULT_MAX_WRITES, DIAGNOSE_CHECKS, NetworkError, ONBOARD_STEPS, SKIPPABLE_STEPS, STEP_MARKS, SYSTEM_NAMESPACE, SchemaDriftError, SubscribeError, SubstrateClient, adminClaimCapabilities, allowAll, allowVerbs, and, applyRowFilters, capabilitiesFor, checkRevocable, checkUpdatable, collectDiagnostics, createClientFromEnv, createDefaultDiagnosticsSink, createH2Fetch, currentStep, decodeList, denyAll, denyVerbs, describeGrant, diagnose, encodeGrant, encodeList, expandFlat, flattenGrant, grantCovers, grantEntriesConfer, grantEntryError, grantIsUniform, intersectGrants, isActiveAdminKeyRow, isEncryptedKey, makeAuthorizationProvider, makeTokenProvider, newlyGranted, newlyGrantedPairs, noRedirectFetch, not, or, parseGrantEntries, planOnboarding, reconcileIdentities, reduceSubscribeRows, requireCapability, requireIdentity, requireNamespace, requiredOutstanding, resolveAdminCredential, resolveAgentCapabilities, resolveDefaultKeyPath, resolveDefaultKidPath, revokedAtIso, row, runScript, substrateFetch, tokenAudience, watchRows };
|
package/dist/cluster-worker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as PackEnvelope, i as FieldDef, l as FieldInput, m as Schema } from "./schema-laGLMvMC.js";
|
|
2
|
-
import
|
|
2
|
+
import * as msgpackr from "msgpackr";
|
|
3
3
|
//#region ../../packages/substrate-pack/src/decoder.d.ts
|
|
4
4
|
interface DecodeContext {
|
|
5
5
|
schemas?: Record<string, Schema>;
|
|
@@ -58,4 +58,8 @@ declare function decodePositional<T = unknown>(encoded: unknown, fields: FieldIn
|
|
|
58
58
|
declare function decodePositionalFromFieldDef<T = unknown>(encoded: unknown, def: FieldDef, schema: Schema, ctx: DecodeContext, path?: string[]): T;
|
|
59
59
|
declare function decodeEnvelope(bytes: Buffer | Uint8Array, ctx: DecodeEnvelopeCtx): PackEnvelope;
|
|
60
60
|
//#endregion
|
|
61
|
-
|
|
61
|
+
//#region ../../packages/substrate-pack/src/msgpackr.d.ts
|
|
62
|
+
declare const pack: (...args: Parameters<typeof msgpackr.pack>) => ReturnType<typeof msgpackr.pack>;
|
|
63
|
+
declare const unpack: (...args: Parameters<typeof msgpackr.unpack>) => ReturnType<typeof msgpackr.unpack>;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { PackDecodeError as a, decodePositional as c, DecodeEnvelopeCtx as i, decodePositionalFromFieldDef as l, unpack as n, SchemaDriftError as o, DecodeContext as r, decodeEnvelope as s, pack as t };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as msgpackr from "msgpackr";
|
|
2
|
+
|
|
3
|
+
//#region ../../packages/substrate-pack/src/msgpackr.ts
|
|
4
|
+
/**
|
|
5
|
+
* The one module that imports msgpackr. The published bundle gives it a chunk
|
|
6
|
+
* of its own, so a consumer that never packs or unpacks drops msgpackr, which
|
|
7
|
+
* does not declare itself free of load-time side effects. These are wrappers,
|
|
8
|
+
* not re-exports: a bundler resolves a re-export straight to msgpackr, which
|
|
9
|
+
* would leave every importer of this module importing msgpackr itself.
|
|
10
|
+
*/
|
|
11
|
+
const pack = (...args) => msgpackr.pack(...args);
|
|
12
|
+
const unpack = (...args) => msgpackr.unpack(...args);
|
|
13
|
+
const createUnpackr = (options) => new msgpackr.Unpackr(options);
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { pack as n, unpack as r, createUnpackr as t };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createRequire as __binCreateRequire } from 'node:module'; const require = __binCreateRequire(import.meta.url);
|
|
2
1
|
//#region src/node-version.ts
|
|
3
2
|
/** The oldest Node the binaries run on; matches `engines.node` in package.json. */
|
|
4
3
|
const MIN_NODE_VERSION = "26.13.1";
|
package/dist/pack.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as PackEnvelope, i as FieldDef, l as FieldInput, m as Schema, u as MutationSchema } from "./schema-laGLMvMC.js";
|
|
2
|
-
import { a as PackDecodeError, c as decodePositional, i as DecodeEnvelopeCtx, l as decodePositionalFromFieldDef, n as
|
|
2
|
+
import { a as PackDecodeError, c as decodePositional, i as DecodeEnvelopeCtx, l as decodePositionalFromFieldDef, n as unpack, o as SchemaDriftError, r as DecodeContext, s as decodeEnvelope, t as pack } from "./index-ZKeYFHDD.js";
|
|
3
3
|
//#region ../../packages/substrate-pack/src/content-type.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Content-type negotiation. Spec: §7.0.
|
|
@@ -253,4 +253,4 @@ export declare function decodeStreamFrames(body: AsyncIterable<Uint8Array> | Rea
|
|
|
253
253
|
maxFrameBytes?: number;
|
|
254
254
|
}): AsyncGenerator<Uint8Array>;
|
|
255
255
|
//#endregion
|
|
256
|
-
export { type DecodeContext, type DecodeEnvelopeCtx, type DecodePlanEntry, type DecodeStreamChunkInput, type EncodeContext, type EncodeEnvelopeCtx, type EncodeStreamChunkInput, type FrameSpecEntry, type FrameStreamErrorCode, PackDecodeError, type PackStreamChunk, SchemaDriftError, type WireMode, decodeEnvelope, decodePositional, decodePositionalFromFieldDef, packFrame, unpackFrame };
|
|
256
|
+
export { type DecodeContext, type DecodeEnvelopeCtx, type DecodePlanEntry, type DecodeStreamChunkInput, type EncodeContext, type EncodeEnvelopeCtx, type EncodeStreamChunkInput, type FrameSpecEntry, type FrameStreamErrorCode, PackDecodeError, type PackStreamChunk, SchemaDriftError, type WireMode, decodeEnvelope, decodePositional, decodePositionalFromFieldDef, pack as packFrame, unpack as unpackFrame };
|
package/dist/pack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
1
|
+
import { A as positionValue, C as decodePositional, D as encodePositional, E as encodeEnvelope, O as encodePositionalFromFieldDef, S as decodeEnvelope, T as PackEncodeError, _ as encodeStreamChunk, a as FrameStreamError, b as PackDecodeError, c as encodeStreamFrame, d as applyDecodePlanInPlace, f as buildDecodePlan, g as decodeStreamChunk, h as isPlainRequestData, i as FRAMES_PACK_MIME, j as withData, k as packEnvelopeParts, l as framesEncodingFromAccept, m as encodeWsFrame, n as DEFAULT_STREAM_IDLE_MS, o as HEARTBEAT_FRAME, p as decodeWsEnvelope, r as FRAMES_JSON_MIME, s as decodeStreamFrames, t as DEFAULT_MAX_FRAME_BYTES, u as withIdleTimeout, v as MUTATION_ACK_FIELDS, w as decodePositionalFromFieldDef, x as SchemaDriftError, y as mutationReturns } from "./src-B_kHkbsr.js";
|
|
2
|
+
import { n as acceptsPack, t as PACK_MIME } from "./content-type-wLljot5M.js";
|
|
3
|
+
import { n as pack, r as unpack } from "./msgpackr-Dq18g6Ds.js";
|
|
4
4
|
|
|
5
|
-
export { DEFAULT_MAX_FRAME_BYTES, DEFAULT_STREAM_IDLE_MS, FRAMES_JSON_MIME, FRAMES_PACK_MIME, FrameStreamError, HEARTBEAT_FRAME, MUTATION_ACK_FIELDS, PACK_MIME, PackDecodeError, PackEncodeError, SchemaDriftError, acceptsPack, applyDecodePlanInPlace, buildDecodePlan, decodeEnvelope, decodePositional, decodePositionalFromFieldDef, decodeStreamChunk, decodeStreamFrames, decodeWsEnvelope, encodeEnvelope, encodePositional, encodePositionalFromFieldDef, encodeStreamChunk, encodeStreamFrame, encodeWsFrame, framesEncodingFromAccept, isPlainRequestData, mutationReturns, packEnvelopeParts, packFrame, positionValue, unpackFrame, withData, withIdleTimeout };
|
|
5
|
+
export { DEFAULT_MAX_FRAME_BYTES, DEFAULT_STREAM_IDLE_MS, FRAMES_JSON_MIME, FRAMES_PACK_MIME, FrameStreamError, HEARTBEAT_FRAME, MUTATION_ACK_FIELDS, PACK_MIME, PackDecodeError, PackEncodeError, SchemaDriftError, acceptsPack, applyDecodePlanInPlace, buildDecodePlan, decodeEnvelope, decodePositional, decodePositionalFromFieldDef, decodeStreamChunk, decodeStreamFrames, decodeWsEnvelope, encodeEnvelope, encodePositional, encodePositionalFromFieldDef, encodeStreamChunk, encodeStreamFrame, encodeWsFrame, framesEncodingFromAccept, isPlainRequestData, mutationReturns, packEnvelopeParts, pack as packFrame, positionValue, unpack as unpackFrame, withData, withIdleTimeout };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as txScopeIdFor } from "./src-BcigMQdR.js";
|
|
1
|
+
import { r as txScopeIdFor } from "./src-DkxrpQOz.js";
|
|
3
2
|
import { randomUUID } from "node:crypto";
|
|
4
3
|
|
|
5
4
|
//#region ../../packages/substrate-dataset-pg/src/pg-edges-store.ts
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "./src-B6nsPVmD.js";
|
|
1
|
+
import { Lt as buildContext, tt as applyObligations, xn as ResolverFrameError, zt as jsonResponse } from "./src-S84ef4e3.js";
|
|
2
|
+
import "./src-B_kHkbsr.js";
|
|
4
3
|
import { Worker } from "node:worker_threads";
|
|
5
4
|
|
|
6
5
|
//#region ../../plugins/substrate-recall/src/candidate-selection.ts
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as createNoopPubSub, t as createProposalsPlugin } from "./src-Dlmuq32R.js";
|
|
1
|
+
import { Un as defineBootstrap } from "./src-S84ef4e3.js";
|
|
2
|
+
import { n as createNoopPubSub, t as createProposalsPlugin } from "./src-BSL2yyVy.js";
|
|
4
3
|
import { z } from "zod";
|
|
5
4
|
|
|
6
5
|
//#region ../../plugins/substrate-proposals/src/bootstrap.ts
|
package/dist/proposals.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as ProposalError, n as createNoopPubSub, r as storageSettled, t as createProposalsPlugin } from "./src-Dlmuq32R.js";
|
|
1
|
+
import { i as ProposalError, n as createNoopPubSub, r as storageSettled, t as createProposalsPlugin } from "./src-BSL2yyVy.js";
|
|
3
2
|
|
|
4
3
|
export { ProposalError, createNoopPubSub, createProposalsPlugin, storageSettled };
|
package/dist/recall-bootstrap.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as createRecallPlugin } from "./plugin-Dk9h__NU.js";
|
|
1
|
+
import { Un as defineBootstrap } from "./src-S84ef4e3.js";
|
|
2
|
+
import { t as FakeEmbedder } from "./fake-DdXtb-m8.js";
|
|
3
|
+
import { t as createRecallPlugin } from "./plugin-MSbSZ6Al.js";
|
|
5
4
|
import { z } from "zod";
|
|
6
5
|
|
|
7
6
|
//#region ../../packages/substrate-embedder/src/types.ts
|
package/dist/recall.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { $ as CLUSTERER_BACKEND_VERSION, A as CLUSTER_MEMBER_FIELDS, C as EmbedSourceRegistry, D as makeReembed, E as makeEmbedPostWrite, F as unknownParams, G as DEFAULT_CRYSTALLISE_CONFIG, H as CRYSTALLISE_IN_FLIGHT_CODE, I as handleRecallRequest, J as runClusterer, K as handleCrystallise, L as RRF_K, M as recallRouteHandler, N as checkParams, O as crystalliseRouteHandler, P as unknownParamMessage, Q as CLUSTERER_BACKEND, R as armRanks, S as createEmbedStats, T as embedRowReporting, U as createCrystalliseGuard, X as l2normalize, _ as EMBEDDINGS_FETCH_MAX_REFS, a as REINDEX_MAX_LIMIT, b as handleLexicalCoverage, c as SALIENCE_BOOST_MAX_TARGETS, d as embeddingsMigration, et as memberKey, f as recallMcpTool, g as embeddingsFetchRouteHandler, h as embeddingSimilarOperator, i as REINDEX_DEFAULT_LIMIT, j as buildClusterSurface, k as CLUSTER_FIELDS, l as lexicalMigration, m as makeLexicalPostWrite, n as salienceBoostRouteHandler, nt as validateSelector, o as handleReindex, p as makeLexicalClassify, q as validateCrystalliseInput, r as reindexRouteHandler, s as validateReindexInput, t as createRecallPlugin, tt as SELECT_CANDIDATES_MAX_LIMIT, u as recallClustersMigration, v as embedStatsRouteHandler, w as embedAndStore, x as validateLexicalCoverageInput, y as handleEmbedStatsRequest, z as fuseByRank } from "./plugin-Dk9h__NU.js";
|
|
1
|
+
import { a as InMemoryLexicalStore, i as PgClusterStore, n as PgLexicalStore, o as InMemoryEmbeddingsStore, r as PgEmbeddingsStore, s as InMemoryClusterStore, t as RECALL_VERSION } from "./src-De9j33jv.js";
|
|
2
|
+
import { $ as CLUSTERER_BACKEND_VERSION, A as CLUSTER_MEMBER_FIELDS, C as EmbedSourceRegistry, D as makeReembed, E as makeEmbedPostWrite, F as unknownParams, G as DEFAULT_CRYSTALLISE_CONFIG, H as CRYSTALLISE_IN_FLIGHT_CODE, I as handleRecallRequest, J as runClusterer, K as handleCrystallise, L as RRF_K, M as recallRouteHandler, N as checkParams, O as crystalliseRouteHandler, P as unknownParamMessage, Q as CLUSTERER_BACKEND, R as armRanks, S as createEmbedStats, T as embedRowReporting, U as createCrystalliseGuard, X as l2normalize, _ as EMBEDDINGS_FETCH_MAX_REFS, a as REINDEX_MAX_LIMIT, b as handleLexicalCoverage, c as SALIENCE_BOOST_MAX_TARGETS, d as embeddingsMigration, et as memberKey, f as recallMcpTool, g as embeddingsFetchRouteHandler, h as embeddingSimilarOperator, i as REINDEX_DEFAULT_LIMIT, j as buildClusterSurface, k as CLUSTER_FIELDS, l as lexicalMigration, m as makeLexicalPostWrite, n as salienceBoostRouteHandler, nt as validateSelector, o as handleReindex, p as makeLexicalClassify, q as validateCrystalliseInput, r as reindexRouteHandler, s as validateReindexInput, t as createRecallPlugin, tt as SELECT_CANDIDATES_MAX_LIMIT, u as recallClustersMigration, v as embedStatsRouteHandler, w as embedAndStore, x as validateLexicalCoverageInput, y as handleEmbedStatsRequest, z as fuseByRank } from "./plugin-MSbSZ6Al.js";
|
|
4
3
|
|
|
5
4
|
export { CLUSTERER_BACKEND, CLUSTERER_BACKEND_VERSION, CLUSTER_FIELDS, CLUSTER_MEMBER_FIELDS, CRYSTALLISE_IN_FLIGHT_CODE, DEFAULT_CRYSTALLISE_CONFIG, EMBEDDINGS_FETCH_MAX_REFS, EmbedSourceRegistry, InMemoryClusterStore, InMemoryEmbeddingsStore, InMemoryLexicalStore, PgClusterStore, PgEmbeddingsStore, PgLexicalStore, RECALL_VERSION, REINDEX_DEFAULT_LIMIT, REINDEX_MAX_LIMIT, RRF_K, SALIENCE_BOOST_MAX_TARGETS, SELECT_CANDIDATES_MAX_LIMIT, armRanks, buildClusterSurface, checkParams, createCrystalliseGuard, createEmbedStats, createRecallPlugin, crystalliseRouteHandler, embedAndStore, embedRowReporting, embedStatsRouteHandler, embeddingSimilarOperator, embeddingsFetchRouteHandler, embeddingsMigration, fuseByRank, handleCrystallise, handleEmbedStatsRequest, handleLexicalCoverage, handleRecallRequest, handleReindex, l2normalize, lexicalMigration, makeEmbedPostWrite, makeLexicalClassify, makeLexicalPostWrite, makeReembed, memberKey, recallClustersMigration, recallMcpTool, recallRouteHandler, reindexRouteHandler, runClusterer, salienceBoostRouteHandler, unknownParamMessage, unknownParams, validateCrystalliseInput, validateLexicalCoverageInput, validateReindexInput, validateSelector };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as parsePositive, i as DEFAULT_SIZING, n as defaultPluginsForPersona, r as parsePort, t as KNOWN_PLUGINS } from "./cli-BYyPsfdY.js";
|
|
1
|
+
import { a as parsePositive, i as DEFAULT_SIZING, n as defaultPluginsForPersona, r as parsePort, t as KNOWN_PLUGINS } from "./cli-RRFphMtQ.js";
|
|
3
2
|
import { createRequire } from "node:module";
|
|
4
3
|
import path from "node:path";
|
|
5
4
|
import { stripVTControlCharacters, styleText } from "node:util";
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { C as copyRows, S as detectLayout, a as ensureTypeTable, b as UUID_CHECK_MIGRATION, c as typeTableRef, d as PLAIN_SCHEMA_NAME, g as isDerivedMigration, i as seqName, p as assertStoreSchema, s as loadTypeTable, u as MIGRATE_STORE_MARKER_TABLE, w as parseSourceBody, x as UUID_REGEX } from "./src-BcigMQdR.js";
|
|
1
|
+
import { _ as AUDIT_EVENT_TYPE, g as buildAuditRow } from "./src-S84ef4e3.js";
|
|
2
|
+
import { n as trimTrailingSlashes } from "./env-utils-s25Z1YSA.js";
|
|
3
|
+
import { I as decodeList, L as encodeList, M as grantEntryError, g as checkUpdatable, h as checkRevocable, y as newlyGranted } from "./src-DmiUWOLp.js";
|
|
4
|
+
import "./src-B_kHkbsr.js";
|
|
5
|
+
import { A as UPDATE_EXIT_CODES, B as readKeyById, C as grantLines, D as parseBootstrapArgs, E as formatBootstrapOutput, F as CLI_ACTOR_KID, G as validateArgv, H as resolveAdminAuth, I as base64Url, J as argvError, K as RESTART_NOTE, L as forUpdate, M as runKeyPatchViaRoute, N as ACTOR_HINT, O as runBootstrap, P as BootstrapError, R as generateAdminKeypair, S as runRegisterViaRoute, T as formatDoctorReport, U as resolveAdminTarget, V as describeAdminTarget, W as ARGV_SPEC, X as pgNoticeOptions, Y as AdminCliError, _ as openPgDataset, b as parseRegisterArgs, c as refuseContractViolation, d as registeredTypes, g as version, h as loadPluginsFromDir, j as runKeyListViaRoute, k as REVOKE_EXIT_CODES, l as buildDeferredIndexes, n as resolvePluginDir, q as USAGE, r as BINARY_CONTRACT_VERSION, s as parseEnv, t as bootStore, v as onboardCommand, w as doctorCommand, x as runRegister, y as formatRegisterOutput, z as listActiveAdminKeys } from "./boot-store-BaDqbBS-.js";
|
|
6
|
+
import { T as substrateFetch } from "./src-BNdhH_Hx.js";
|
|
7
|
+
import { C as copyRows, S as detectLayout, a as ensureTypeTable, b as UUID_CHECK_MIGRATION, c as typeTableRef, d as PLAIN_SCHEMA_NAME, g as isDerivedMigration, i as seqName, p as assertStoreSchema, s as loadTypeTable, u as MIGRATE_STORE_MARKER_TABLE, w as parseSourceBody, x as UUID_REGEX } from "./src-DkxrpQOz.js";
|
|
9
8
|
import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
|
|
10
9
|
import { dirname } from "node:path";
|
|
11
10
|
import { createHash, randomUUID } from "node:crypto";
|
package/dist/script-runner.js
CHANGED
package/dist/sdk.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
import { B as isInt32, F as isColumnField, G as EXPR_AGGREGATES, H as stringifyJson, I as naturalOrderOf, J as DEFAULT_FILTER_WRITE_LIMITS, K as EXPR_FUNCTIONS, L as formatQualifiedKey, P as DEFAULT_ORDERED_BY, R as parseQualifiedKey, U as stringifyJsonExact, V as parseInt64, W as DATE_UNITS, Y as assertNever, q as EXPR_LIMITS, z as isInt16 } from "./src-B6nsPVmD.js";
|
|
1
|
+
import { $t as naturalOrderOf, A as isReservedAutoCrudField, An as WALK_BUDGET_EXCEEDED, B as createResolver, Bn as assertNoRepeatedIds, Bt as parseJsonBody, C as makeCtx, Cn as STORE_BUSY, D as RESERVED_AUTOCRUD_FIELDS, Dn as WALKS_IN_SUBSCRIPTION, E as selectAll, En as WALKS_IN_MUTATION, F as createResolverWithEdges, Fn as isResolverFrameError, G as listResolver, Gt as WS_REASON_SUBSCRIPTION_OVERLOADED, H as updateResolver, Hn as BootstrapConfigError, I as installAutoCrud, In as isRestrictViolation, It as JSON_HEADERS, J as resolveIdentity, Jt as normaliseVocabWhere, K as getResolver, Kt as canonicalVocabValue, L as deleteManyResolver, Ln as DEFAULT_FILTER_WRITE_LIMITS, M as field, Mn as filterTooBroad, N as AutoCrudNameCollisionError, Nn as isAuthCause, O as RESERVED_AUTOCRUD_FIELD_NAMES, On as WALKS_NEED_PARTITIONED, P as autoCrudOptionsOf, Pn as isBatchElementError, Qt as isColumnField, R as updateManyResolver, Rn as CLIENT_SUPPLIED_SERVER_FIELD, Rt as error400, S as EngineQueryError, Sn as RestrictViolation, T as queryOne, Tn as VALUE_OUT_OF_RANGE, U as applyUpdatePatch, Un as defineBootstrap, Ut as WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, V as deleteResolver, Vn as canonicalize, W as deleteRow, Wt as WS_REASON_SERVER_RESTART, X as resolveEntityRow, Xt as vocabImplication, Y as resolveEntityId, Yt as storedVocabSpellings, Zt as DEFAULT_ORDERED_BY, _n as QUERY_TIMEOUT, an as normaliseWalkNode, b as assertOrderedBy, bn as ReservedField, cn as isIsoTimestamp, dn as validateHardDeleteEnv, en as RegistryBase, fn as BatchElementError, gn as NamespaceMismatch, hn as MissingReferentError, in as normaliseMetadataWhere, j as reservedMetadataFieldMessage, jn as WALK_UNSUPPORTED_REF, k as RESERVED_METADATA_FIELD_NAMES, kn as WALKS_UNSUPPORTED_STORE, ln as normalizeIsoTimestamp, mn as FILTER_TOO_BROAD, nn as METADATA_FILTER_FIELDS, on as createKeyedMutex, pn as BridgeUnreachableError, q as UnattributedWriteError, qt as normaliseVocabValues, rn as normaliseMetadataOrderBy, sn as isImpossibleIsoTimestamp, tn as METADATA_AUTHOR_FIELDS, un as assertHardDeleteAllowed, vn as REGEX_BUDGET_EXCEEDED, w as queryAll, wn as UnsupportedFilterError, x as defineNamespace, xn as ResolverFrameError, y as assertIndexDecl, yn as ROW_POLICY_BLOCKS_WALK, z as purgeResolver, zn as ROW_METADATA_FIELDS, zt as jsonResponse } from "./src-S84ef4e3.js";
|
|
2
|
+
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-s25Z1YSA.js";
|
|
3
|
+
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-DmiUWOLp.js";
|
|
4
|
+
import { B as EXPR_AGGREGATES, F as isInt32, H as EXPR_LIMITS, I as parseInt64, L as stringifyJson, M as formatQualifiedKey, N as parseQualifiedKey, P as isInt16, R as stringifyJsonExact, U as assertNever, V as EXPR_FUNCTIONS, z as DATE_UNITS } from "./src-B_kHkbsr.js";
|
|
6
5
|
|
|
7
6
|
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 };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import semver from "semver";
|
|
2
|
+
|
|
3
|
+
//#region ../../packages/substrate-compose/src/semver.ts
|
|
4
|
+
/**
|
|
5
|
+
* The one module that imports semver. The published bundle gives it a chunk of
|
|
6
|
+
* its own, so a consumer that never checks a plugin's version range drops
|
|
7
|
+
* semver, which does not declare itself free of load-time side effects.
|
|
8
|
+
*/
|
|
9
|
+
function validRange(range) {
|
|
10
|
+
return semver.validRange(range);
|
|
11
|
+
}
|
|
12
|
+
function satisfies(version, range) {
|
|
13
|
+
return semver.satisfies(version, range);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { validRange as n, satisfies as t };
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { C as SchemaDriftError, R as parseQualifiedKey, a as FRAMES_JSON_MIME, f as withIdleTimeout, h as decodeWsEnvelope, i as DEFAULT_STREAM_IDLE_MS, l as decodeStreamFrames, m as buildDecodePlan, o as FRAMES_PACK_MIME, p as applyDecodePlanInPlace, w as decodeEnvelope, x as mutationReturns } from "./src-B6nsPVmD.js";
|
|
1
|
+
import { c as makeTokenProvider, i as DEFAULT_CAPABILITIES, n as trimTrailingSlashes } from "./env-utils-s25Z1YSA.js";
|
|
2
|
+
import { D as isActiveAdminKeyRow, O as capabilitiesFor, T as SYSTEM_NAMESPACE } from "./src-DmiUWOLp.js";
|
|
3
|
+
import { N as parseQualifiedKey, S as decodeEnvelope, d as applyDecodePlanInPlace, f as buildDecodePlan, i as FRAMES_PACK_MIME, n as DEFAULT_STREAM_IDLE_MS, p as decodeWsEnvelope, r as FRAMES_JSON_MIME, s as decodeStreamFrames, u as withIdleTimeout, x as SchemaDriftError, y as mutationReturns } from "./src-B_kHkbsr.js";
|
|
5
4
|
import http2 from "node:http2";
|
|
6
5
|
import { signal } from "@preact/signals-core";
|
|
7
6
|
|
|
8
|
-
//#region ../../packages/substrate-client/src/transport/default-fetch.ts
|
|
9
|
-
let current = (input, init) => globalThis.fetch(input, init);
|
|
10
|
-
const substrateFetch = (input, init) => current(input, init);
|
|
11
|
-
/** Replace what `substrateFetch` calls. The Node entry and test setups use it. */
|
|
12
|
-
function setSubstrateFetch(fetch) {
|
|
13
|
-
current = fetch;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
7
|
//#region ../../packages/substrate-client/src/transport/h2-fetch.ts
|
|
18
8
|
/**
|
|
19
9
|
* A fetch-shaped function over `node:http2`: the transport seam's HTTP/2
|
|
@@ -301,6 +291,24 @@ function webBody(stream, pooled, signal) {
|
|
|
301
291
|
});
|
|
302
292
|
}
|
|
303
293
|
|
|
294
|
+
//#endregion
|
|
295
|
+
//#region ../../packages/substrate-client/src/transport/platform-fetch.ts
|
|
296
|
+
/**
|
|
297
|
+
* The default behind `substrateFetch` in Node and Bun: one process-wide HTTP/2
|
|
298
|
+
* session pool, opened on first use. Browser builds swap in
|
|
299
|
+
* `platform-fetch.browser.ts`.
|
|
300
|
+
*/
|
|
301
|
+
let pool;
|
|
302
|
+
const platformFetch = (input, init) => {
|
|
303
|
+
pool ??= createH2Fetch();
|
|
304
|
+
return pool(input, init);
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
//#endregion
|
|
308
|
+
//#region ../../packages/substrate-client/src/transport/default-fetch.ts
|
|
309
|
+
let current = platformFetch;
|
|
310
|
+
const substrateFetch = (input, init) => current(input, init);
|
|
311
|
+
|
|
304
312
|
//#endregion
|
|
305
313
|
//#region ../../packages/substrate-client/src/admin/diagnose.ts
|
|
306
314
|
/**
|
|
@@ -2333,12 +2341,4 @@ function createClientFromEnv(opts = {}) {
|
|
|
2333
2341
|
}
|
|
2334
2342
|
|
|
2335
2343
|
//#endregion
|
|
2336
|
-
|
|
2337
|
-
/**
|
|
2338
|
-
* The Node and Bun client: the browser surface, plus env-driven signing,
|
|
2339
|
-
* `diagnose`, and the `node:http2` fetch that `substrateFetch` uses from here on.
|
|
2340
|
-
*/
|
|
2341
|
-
setSubstrateFetch(createH2Fetch());
|
|
2342
|
-
|
|
2343
|
-
//#endregion
|
|
2344
|
-
export { diagnose as C, substrateFetch as E, DIAGNOSE_CHECKS as S, createH2Fetch as T, SKIPPABLE_STEPS as _, SubstrateClient as a, planOnboarding as b, reduceSubscribeRows as c, NetworkError as d, SubscribeError as f, ONBOARD_STEPS as g, CURRENT_MARK as h, tokenAudience as i, watchRows as l, BACKFILL_CHUNK as m, resolveAgentCapabilities as n, collectDiagnostics as o, AdminBackfillError as p, noRedirectFetch as r, createDefaultDiagnosticsSink as s, createClientFromEnv as t, AuthError as u, STEP_MARKS as v, reconcileIdentities as w, requiredOutstanding as x, currentStep as y };
|
|
2344
|
+
export { diagnose as C, createH2Fetch as E, DIAGNOSE_CHECKS as S, substrateFetch as T, SKIPPABLE_STEPS as _, SubstrateClient as a, planOnboarding as b, reduceSubscribeRows as c, NetworkError as d, SubscribeError as f, ONBOARD_STEPS as g, CURRENT_MARK as h, tokenAudience as i, watchRows as l, BACKFILL_CHUNK as m, resolveAgentCapabilities as n, collectDiagnostics as o, AdminBackfillError as p, noRedirectFetch as r, createDefaultDiagnosticsSink as s, createClientFromEnv as t, AuthError as u, STEP_MARKS as v, reconcileIdentities as w, requiredOutstanding as x, currentStep as y };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import "./src-B6nsPVmD.js";
|
|
1
|
+
import { $ as publishSchema, D as RESERVED_AUTOCRUD_FIELDS, I as installAutoCrud, It as JSON_HEADERS, J as resolveIdentity, M as field, O as RESERVED_AUTOCRUD_FIELD_NAMES, P as autoCrudOptionsOf, Vn as canonicalize$1, b as assertOrderedBy, d as uuidFromName, f as emitFieldEvents, j as reservedMetadataFieldMessage, l as planServesShape, p as migrateFieldValues, x as defineNamespace, xn as ResolverFrameError, y as assertIndexDecl } from "./src-S84ef4e3.js";
|
|
2
|
+
import { s as requireCapability } from "./src-DmiUWOLp.js";
|
|
3
|
+
import "./src-B_kHkbsr.js";
|
|
5
4
|
import { randomUUID } from "node:crypto";
|
|
6
5
|
|
|
7
6
|
//#region ../../plugins/substrate-proposals/src/capability.ts
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Unpackr, pack, pack as packFrame, unpack, unpack as unpackFrame } from "msgpackr";
|
|
1
|
+
import { n as pack, r as unpack, t as createUnpackr } from "./msgpackr-Dq18g6Ds.js";
|
|
3
2
|
|
|
4
3
|
//#region ../../packages/substrate-types/src/assert-never.ts
|
|
5
4
|
/**
|
|
@@ -11,13 +10,6 @@ function assertNever(x) {
|
|
|
11
10
|
throw new Error(`unhandled variant: ${JSON.stringify(x)}`);
|
|
12
11
|
}
|
|
13
12
|
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region ../../packages/substrate-types/src/dataset.ts
|
|
16
|
-
const DEFAULT_FILTER_WRITE_LIMITS = Object.freeze({
|
|
17
|
-
maxMatch: 1e4,
|
|
18
|
-
idsCap: 1e3
|
|
19
|
-
});
|
|
20
|
-
|
|
21
13
|
//#endregion
|
|
22
14
|
//#region ../../packages/substrate-types/src/expression.ts
|
|
23
15
|
const sig = (name, args, returns, description) => ({
|
|
@@ -170,25 +162,6 @@ function formatQualifiedKey(namespace, name) {
|
|
|
170
162
|
return `${namespace}/${name}`;
|
|
171
163
|
}
|
|
172
164
|
|
|
173
|
-
//#endregion
|
|
174
|
-
//#region ../../packages/substrate-types/src/schema.ts
|
|
175
|
-
/**
|
|
176
|
-
* True when the field's value is a typed column: a scalar other than `json` that
|
|
177
|
-
* the server does not own, or a crossRef. An explicit `null` on such a field
|
|
178
|
-
* reads back as absent. A json, struct or list field keeps its `null`, and a
|
|
179
|
-
* readonly scalar such as `shortId` is the server's.
|
|
180
|
-
*/
|
|
181
|
-
function isColumnField(def) {
|
|
182
|
-
if (def.kind === "crossRef") return true;
|
|
183
|
-
return def.kind === "scalar" && def.type !== "json" && def.readonly !== true;
|
|
184
|
-
}
|
|
185
|
-
/** Natural order of a type that declares none: newest first. */
|
|
186
|
-
const DEFAULT_ORDERED_BY = Object.freeze({ createdAt: "desc" });
|
|
187
|
-
/** The declared natural order, or {@link DEFAULT_ORDERED_BY}. */
|
|
188
|
-
function naturalOrderOf(schema) {
|
|
189
|
-
return schema.orderedBy ?? DEFAULT_ORDERED_BY;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
165
|
//#endregion
|
|
193
166
|
//#region ../../packages/substrate-pack/src/_plan-cache.ts
|
|
194
167
|
const isObj = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
@@ -1080,7 +1053,13 @@ function encodeWsFrame(value, mode) {
|
|
|
1080
1053
|
* `raw as string` casts at every call site.
|
|
1081
1054
|
*/
|
|
1082
1055
|
function decodeWsEnvelope(raw, mode) {
|
|
1083
|
-
if (mode === "pack")
|
|
1056
|
+
if (mode === "pack") {
|
|
1057
|
+
inbound ??= createUnpackr({
|
|
1058
|
+
structuredClone: false,
|
|
1059
|
+
mapsAsObjects: true
|
|
1060
|
+
});
|
|
1061
|
+
return inbound.unpack(toBytes(raw));
|
|
1062
|
+
}
|
|
1084
1063
|
if (typeof raw === "string") return JSON.parse(raw);
|
|
1085
1064
|
return JSON.parse(new TextDecoder().decode(toBytes(raw)));
|
|
1086
1065
|
}
|
|
@@ -1090,10 +1069,7 @@ function decodeWsEnvelope(raw, mode) {
|
|
|
1090
1069
|
* plain-object maps. msgpackr's other built-in extensions are process-global
|
|
1091
1070
|
* and still decode, so a server checks a request with `isPlainRequestData`.
|
|
1092
1071
|
*/
|
|
1093
|
-
|
|
1094
|
-
structuredClone: false,
|
|
1095
|
-
mapsAsObjects: true
|
|
1096
|
-
});
|
|
1072
|
+
let inbound;
|
|
1097
1073
|
const MAX_REQUEST_DEPTH = 64;
|
|
1098
1074
|
/**
|
|
1099
1075
|
* Whether a decoded request holds only JSON-shaped data (plus `Date`, which
|
|
@@ -1310,4 +1286,4 @@ async function* readableToIterable(stream) {
|
|
|
1310
1286
|
}
|
|
1311
1287
|
|
|
1312
1288
|
//#endregion
|
|
1313
|
-
export {
|
|
1289
|
+
export { positionValue as A, EXPR_AGGREGATES as B, decodePositional as C, encodePositional as D, encodeEnvelope as E, isInt32 as F, EXPR_LIMITS as H, parseInt64 as I, stringifyJson as L, formatQualifiedKey as M, parseQualifiedKey as N, encodePositionalFromFieldDef as O, isInt16 as P, stringifyJsonExact as R, decodeEnvelope as S, PackEncodeError as T, assertNever as U, EXPR_FUNCTIONS as V, encodeStreamChunk as _, FrameStreamError as a, PackDecodeError as b, encodeStreamFrame as c, applyDecodePlanInPlace as d, buildDecodePlan as f, decodeStreamChunk as g, isPlainRequestData as h, FRAMES_PACK_MIME as i, withData as j, packEnvelopeParts as k, framesEncodingFromAccept as l, encodeWsFrame as m, DEFAULT_STREAM_IDLE_MS as n, HEARTBEAT_FRAME as o, decodeWsEnvelope as p, FRAMES_JSON_MIME as r, decodeStreamFrames as s, DEFAULT_MAX_FRAME_BYTES as t, withIdleTimeout as u, MUTATION_ACK_FIELDS as v, decodePositionalFromFieldDef as w, SchemaDriftError as x, mutationReturns as y, DATE_UNITS as z };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { B as ROW_FILTER_FIELD, V as matchesRowFilter, W as inFlightError, Y as unresolvedRow, Z as cosineSimilarity, et as memberKey } from "./plugin-Dk9h__NU.js";
|
|
1
|
+
import { c as typeTableRef, l as whileNoTypeTable, o as guardedRefRead, r as txScopeIdFor } from "./src-DkxrpQOz.js";
|
|
2
|
+
import { B as ROW_FILTER_FIELD, V as matchesRowFilter, W as inFlightError, Y as unresolvedRow, Z as cosineSimilarity, et as memberKey } from "./plugin-MSbSZ6Al.js";
|
|
4
3
|
|
|
5
4
|
//#region ../../plugins/substrate-recall/package.json
|
|
6
|
-
var version = "1.0.0-alpha.
|
|
5
|
+
var version = "1.0.0-alpha.20";
|
|
7
6
|
|
|
8
7
|
//#endregion
|
|
9
8
|
//#region ../../plugins/substrate-recall/src/in-memory-cluster-store.ts
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { B as isInt32, F as isColumnField, H as stringifyJson, I as naturalOrderOf, U as stringifyJsonExact, V as parseInt64, W as DATE_UNITS, z as isInt16 } from "./src-B6nsPVmD.js";
|
|
1
|
+
import { $t as naturalOrderOf, At as encodeCursor, Bn as assertNoRepeatedIds, Cn as STORE_BUSY, Ct as walkAggExprType, Dt as endsWithEscape, Et as LIKE_TRAILING_ESCAPE, Mn as filterTooBroad, Mt as fullBuiltinOperators, Nt as applyExtensionResultMeta, Ot as CursorDecodeError, Pt as fieldRequested, Qt as isColumnField, St as metadataExprType, Tn as VALUE_OUT_OF_RANGE, Tt as isJsonPathPredicate, _n as QUERY_TIMEOUT, at as forEachWalkHop, bn as ReservedField, ct as preResolveExtensionOperatorsDetailed, dt as canRaise, ft as isDateField, gn as NamespaceMismatch, gt as refNames, ht as isRefOperand, jn as WALK_UNSUPPORTED_REF, jt as normalizeOrderBy, kt as decodeCursor, ln as normalizeIsoTimestamp, lt as aggParts, mt as groupConjuncts, nn as METADATA_FILTER_FIELDS, on as createKeyedMutex, ot as sharedPicks, pt as bindingWalks, st as windowGroupBy, ut as aggType, wn as UnsupportedFilterError, wt as assertJsonPathPredicate, xn as ResolverFrameError, xt as exprTypeOfField } from "./src-S84ef4e3.js";
|
|
2
|
+
import { F as isInt32, I as parseInt64, L as stringifyJson, P as isInt16, R as stringifyJsonExact, z as DATE_UNITS } from "./src-B_kHkbsr.js";
|
|
4
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
5
4
|
|
|
6
5
|
//#region ../../packages/substrate-dataset-pg/src/advisory-lock.ts
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
1
|
+
import { A as expandFlat, D as isActiveAdminKeyRow, F as parseGrantEntries, I as decodeList, L as encodeList, M as grantEntryError, P as intersectGrants, S as and, T as SYSTEM_NAMESPACE, d as confersAnywhere, f as coversNamespace, g as checkUpdatable, h as checkRevocable, l as requireNamespace, m as grantedIn, o as denyVerbs, p as grantOf, s as requireCapability, t as applyRowFilters, u as allCapabilities, v as grantEntriesConfer, w as or } from "./src-DmiUWOLp.js";
|
|
2
|
+
import { A as positionValue, B as EXPR_AGGREGATES, D as encodePositional, E as encodeEnvelope, F as isInt32, H as EXPR_LIMITS, I as parseInt64, L as stringifyJson, M as formatQualifiedKey, N as parseQualifiedKey, P as isInt16, U as assertNever, V as EXPR_FUNCTIONS, a as FrameStreamError, c as encodeStreamFrame, i as FRAMES_PACK_MIME, j as withData, k as packEnvelopeParts, l as framesEncodingFromAccept, o as HEARTBEAT_FRAME, r as FRAMES_JSON_MIME, v as MUTATION_ACK_FIELDS, y as mutationReturns, z as DATE_UNITS } from "./src-B_kHkbsr.js";
|
|
3
|
+
import { n as acceptsPack, t as PACK_MIME } from "./content-type-wLljot5M.js";
|
|
4
|
+
import { n as validRange, t as satisfies } from "./semver-D_zdq0hi.js";
|
|
5
5
|
import { readFileSync } from "node:fs";
|
|
6
6
|
import { createCipheriv, createDecipheriv, createHash, createHmac, createPrivateKey, createPublicKey, createVerify, hkdfSync, randomBytes, randomUUID, sign, timingSafeEqual, verify } from "node:crypto";
|
|
7
7
|
import { isIP, isIPv6 } from "node:net";
|
|
8
8
|
import { isDeepStrictEqual } from "node:util";
|
|
9
9
|
import { monitorEventLoopDelay } from "node:perf_hooks";
|
|
10
|
-
import semver from "semver";
|
|
11
10
|
|
|
12
11
|
//#region ../../packages/substrate-bootstrap/src/index.ts
|
|
13
12
|
const defineBootstrap = {
|
|
@@ -86,6 +85,13 @@ const ROW_METADATA_FIELDS = [
|
|
|
86
85
|
"updatedBy"
|
|
87
86
|
];
|
|
88
87
|
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region ../../packages/substrate-types/src/dataset.ts
|
|
90
|
+
const DEFAULT_FILTER_WRITE_LIMITS = /* @__PURE__ */ Object.freeze({
|
|
91
|
+
maxMatch: 1e4,
|
|
92
|
+
idsCap: 1e3
|
|
93
|
+
});
|
|
94
|
+
|
|
89
95
|
//#endregion
|
|
90
96
|
//#region ../../packages/substrate-types/src/errors.ts
|
|
91
97
|
/** A by-filter write matched more rows than `SUBSTRATE_FILTER_WRITE_MAX_MATCH`; nothing changed. */
|
|
@@ -613,6 +619,25 @@ var RegistryBase = class {
|
|
|
613
619
|
}
|
|
614
620
|
};
|
|
615
621
|
|
|
622
|
+
//#endregion
|
|
623
|
+
//#region ../../packages/substrate-types/src/schema.ts
|
|
624
|
+
/**
|
|
625
|
+
* True when the field's value is a typed column: a scalar other than `json` that
|
|
626
|
+
* the server does not own, or a crossRef. An explicit `null` on such a field
|
|
627
|
+
* reads back as absent. A json, struct or list field keeps its `null`, and a
|
|
628
|
+
* readonly scalar such as `shortId` is the server's.
|
|
629
|
+
*/
|
|
630
|
+
function isColumnField(def) {
|
|
631
|
+
if (def.kind === "crossRef") return true;
|
|
632
|
+
return def.kind === "scalar" && def.type !== "json" && def.readonly !== true;
|
|
633
|
+
}
|
|
634
|
+
/** Natural order of a type that declares none: newest first. */
|
|
635
|
+
const DEFAULT_ORDERED_BY = /* @__PURE__ */ Object.freeze({ createdAt: "desc" });
|
|
636
|
+
/** The declared natural order, or {@link DEFAULT_ORDERED_BY}. */
|
|
637
|
+
function naturalOrderOf(schema) {
|
|
638
|
+
return schema.orderedBy ?? DEFAULT_ORDERED_BY;
|
|
639
|
+
}
|
|
640
|
+
|
|
616
641
|
//#endregion
|
|
617
642
|
//#region ../../packages/substrate-types/src/vocab.ts
|
|
618
643
|
/**
|
|
@@ -1351,8 +1376,8 @@ function* jsonParts(envelope, frame) {
|
|
|
1351
1376
|
* Shared route utilities. HTTP boundary parsing/serialisation the engine-free
|
|
1352
1377
|
* layer needs — keep the per-route handlers shallow.
|
|
1353
1378
|
*/
|
|
1354
|
-
const JSON_HEADERS = Object.freeze({ "content-type": "application/json" });
|
|
1355
|
-
const PACK_HEADERS = Object.freeze({ "content-type": PACK_MIME });
|
|
1379
|
+
const JSON_HEADERS = /* @__PURE__ */ Object.freeze({ "content-type": "application/json" });
|
|
1380
|
+
const PACK_HEADERS = /* @__PURE__ */ Object.freeze({ "content-type": PACK_MIME });
|
|
1356
1381
|
function jsonResponse(status, value, extraHeaders) {
|
|
1357
1382
|
return {
|
|
1358
1383
|
status,
|
|
@@ -1781,9 +1806,12 @@ var HttpBridgeClient = class {
|
|
|
1781
1806
|
//#endregion
|
|
1782
1807
|
//#region ../../packages/substrate-core/src/metrics/histogram.ts
|
|
1783
1808
|
/** Upper bounds in ms: powers of √2 from 0.1 ms; the last bucket catches everything larger. */
|
|
1784
|
-
const BOUNDS =
|
|
1785
|
-
|
|
1786
|
-
|
|
1809
|
+
const BOUNDS = /* @__PURE__ */ (() => {
|
|
1810
|
+
const bounds = [];
|
|
1811
|
+
for (let b = .1; b < 6e4; b *= Math.SQRT2) bounds.push(b);
|
|
1812
|
+
bounds.push(Number.POSITIVE_INFINITY);
|
|
1813
|
+
return bounds;
|
|
1814
|
+
})();
|
|
1787
1815
|
/** O(1) observe; percentiles read off bucket upper bounds (clamped to the observed max). */
|
|
1788
1816
|
var LogHistogram = class {
|
|
1789
1817
|
#counts = new Array(BOUNDS.length).fill(0);
|
|
@@ -4882,7 +4910,7 @@ function classifyWalkService(input, indexesOf) {
|
|
|
4882
4910
|
* so the engine seals the cursor and opens it again on the way back in.
|
|
4883
4911
|
*/
|
|
4884
4912
|
const PREFIX = "s1.";
|
|
4885
|
-
let KEY = randomBytes(32);
|
|
4913
|
+
let KEY = /* @__PURE__ */ randomBytes(32);
|
|
4886
4914
|
/** Derives the seal key from a deployment secret, so every process sharing it opens the same cursors. */
|
|
4887
4915
|
function setCursorSealSecret(secret) {
|
|
4888
4916
|
KEY = Buffer.from(hkdfSync("sha256", secret, "", "substrate-cursor-seal", 32));
|
|
@@ -12945,7 +12973,7 @@ function reservedMetadataFieldMessage(name) {
|
|
|
12945
12973
|
return RESERVED_METADATA_FIELD_NAMES.includes(name) ? `\`${name}\` is a reserved field name: it is reserved for server metadata` : void 0;
|
|
12946
12974
|
}
|
|
12947
12975
|
/** Reserved field names — useful for validation loops. */
|
|
12948
|
-
const RESERVED_AUTOCRUD_FIELD_NAMES = Object.keys(RESERVED_AUTOCRUD_FIELDS);
|
|
12976
|
+
const RESERVED_AUTOCRUD_FIELD_NAMES = /* @__PURE__ */ Object.keys(RESERVED_AUTOCRUD_FIELDS);
|
|
12949
12977
|
|
|
12950
12978
|
//#endregion
|
|
12951
12979
|
//#region ../../packages/substrate-sdk/src/engine-helpers.ts
|
|
@@ -14097,15 +14125,15 @@ function mergeIdField(fields) {
|
|
|
14097
14125
|
}
|
|
14098
14126
|
/** Each `_system` type's def, which `installAutoCrud` registers and `SYSTEM_TYPE_DEFS` lists. */
|
|
14099
14127
|
const KEY_DEF = {
|
|
14100
|
-
fields: mergeIdField(KEY_FIELDS),
|
|
14128
|
+
fields: /* @__PURE__ */ mergeIdField(KEY_FIELDS),
|
|
14101
14129
|
indexes: KEY_INDEXES
|
|
14102
14130
|
};
|
|
14103
|
-
const INVITE_DEF = { fields: mergeIdField(INVITE_FIELDS) };
|
|
14104
|
-
const AUDIT_EVENT_DEF = { fields: mergeIdField(AUDIT_EVENT_FIELDS) };
|
|
14105
|
-
const ENUM_VERDICT_DEF = { fields: mergeIdField(ENUM_VERDICT_FIELDS) };
|
|
14106
|
-
const STORE_PROFILE_DEF = { fields: mergeIdField(STORE_PROFILE_FIELDS) };
|
|
14107
|
-
const INDEX_RECOMMENDATION_DEF = { fields: mergeIdField(INDEX_RECOMMENDATION_FIELDS) };
|
|
14108
|
-
const ADVISOR_STATE_DEF = { fields: mergeIdField(ADVISOR_STATE_FIELDS) };
|
|
14131
|
+
const INVITE_DEF = { fields: /* @__PURE__ */ mergeIdField(INVITE_FIELDS) };
|
|
14132
|
+
const AUDIT_EVENT_DEF = { fields: /* @__PURE__ */ mergeIdField(AUDIT_EVENT_FIELDS) };
|
|
14133
|
+
const ENUM_VERDICT_DEF = { fields: /* @__PURE__ */ mergeIdField(ENUM_VERDICT_FIELDS) };
|
|
14134
|
+
const STORE_PROFILE_DEF = { fields: /* @__PURE__ */ mergeIdField(STORE_PROFILE_FIELDS) };
|
|
14135
|
+
const INDEX_RECOMMENDATION_DEF = { fields: /* @__PURE__ */ mergeIdField(INDEX_RECOMMENDATION_FIELDS) };
|
|
14136
|
+
const ADVISOR_STATE_DEF = { fields: /* @__PURE__ */ mergeIdField(ADVISOR_STATE_FIELDS) };
|
|
14109
14137
|
/**
|
|
14110
14138
|
* Each `_system` type's fields and declared indexes, as `installSystemNamespace`
|
|
14111
14139
|
* registers them. A dataset that writes `_system` outside the engine (the admin
|
|
@@ -19240,14 +19268,14 @@ function checkContract(manifest, plugin, tier, check) {
|
|
|
19240
19268
|
declared,
|
|
19241
19269
|
hostVersion: check.hostVersion
|
|
19242
19270
|
};
|
|
19243
|
-
if (
|
|
19271
|
+
if (validRange(declared) === null) {
|
|
19244
19272
|
check.onViolation({
|
|
19245
19273
|
...base,
|
|
19246
19274
|
reason: "invalid-range"
|
|
19247
19275
|
});
|
|
19248
19276
|
return;
|
|
19249
19277
|
}
|
|
19250
|
-
if (!
|
|
19278
|
+
if (!satisfies(check.hostVersion, declared)) check.onViolation({
|
|
19251
19279
|
...base,
|
|
19252
19280
|
reason: "unsatisfied"
|
|
19253
19281
|
});
|
|
@@ -19364,4 +19392,4 @@ function kernelMigrationTracking(sql) {
|
|
|
19364
19392
|
}
|
|
19365
19393
|
|
|
19366
19394
|
//#endregion
|
|
19367
|
-
export { publishSchema as $,
|
|
19395
|
+
export { publishSchema as $, naturalOrderOf as $t, isReservedAutoCrudField as A, WALK_BUDGET_EXCEEDED as An, encodeCursor as At, createResolver as B, assertNoRepeatedIds as Bn, parseJsonBody as Bt, makeCtx as C, STORE_BUSY as Cn, walkAggExprType as Ct, RESERVED_AUTOCRUD_FIELDS as D, WALKS_IN_SUBSCRIPTION as Dn, endsWithEscape as Dt, selectAll as E, WALKS_IN_MUTATION as En, LIKE_TRAILING_ESCAPE as Et, createResolverWithEdges as F, isResolverFrameError as Fn, HttpBridgeClient as Ft, listResolver as G, WS_REASON_SUBSCRIPTION_OVERLOADED as Gt, updateResolver as H, BootstrapConfigError as Hn, signHs256 as Ht, installAutoCrud as I, isRestrictViolation as In, JSON_HEADERS as It, resolveIdentity as J, normaliseVocabWhere as Jt, getResolver as K, canonicalVocabValue as Kt, deleteManyResolver as L, DEFAULT_FILTER_WRITE_LIMITS as Ln, buildContext as Lt, field as M, filterTooBroad as Mn, fullBuiltinOperators as Mt, AutoCrudNameCollisionError as N, isAuthCause as Nn, applyExtensionResultMeta as Nt, RESERVED_AUTOCRUD_FIELD_NAMES as O, WALKS_NEED_PARTITIONED as On, CursorDecodeError as Ot, autoCrudOptionsOf as P, isBatchElementError as Pn, fieldRequested as Pt, loadPlugins as Q, isColumnField as Qt, updateManyResolver as R, CLIENT_SUPPLIED_SERVER_FIELD as Rn, error400 as Rt, EngineQueryError as S, RestrictViolation as Sn, metadataExprType as St, queryOne as T, VALUE_OUT_OF_RANGE as Tn, isJsonPathPredicate as Tt, applyUpdatePatch as U, defineBootstrap as Un, WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME as Ut, deleteResolver as V, canonicalize as Vn, parseAuthConfig as Vt, deleteRow as W, WS_REASON_SERVER_RESTART as Wt, resolveEntityRow as X, vocabImplication as Xt, resolveEntityId as Y, storedVocabSpellings as Yt, MemoryEdgesStore as Z, DEFAULT_ORDERED_BY as Zt, AUDIT_EVENT_TYPE as _, QUERY_TIMEOUT as _n, getExtensionOperator as _t, composeFromManifests as a, normaliseWalkNode as an, forEachWalkHop as at, assertOrderedBy as b, ReservedField as bn, unregisterExtensionOperator as bt, MemoryDataset as c, isIsoTimestamp as cn, preResolveExtensionOperatorsDetailed as ct, uuidFromName as d, validateHardDeleteEnv as dn, canRaise as dt, RegistryBase as en, effectiveFilterOperators as et, emitFieldEvents as f, BatchElementError as fn, isDateField as ft, buildAuditRow as g, NamespaceMismatch as gn, refNames as gt, SYSTEM_TYPE_DEFS as h, MissingReferentError as hn, isRefOperand as ht, PluginLoadError as i, normaliseMetadataWhere as in, saveSweepState as it, reservedMetadataFieldMessage as j, WALK_UNSUPPORTED_REF as jn, normalizeOrderBy as jt, RESERVED_METADATA_FIELD_NAMES as k, WALKS_UNSUPPORTED_STORE as kn, decodeCursor as kt, planServesShape as l, normalizeIsoTimestamp as ln, aggParts as lt, runInviteSweep as m, FILTER_TOO_BROAD as mn, groupConjuncts as mt, kernelMigrationTracking as n, METADATA_FILTER_FIELDS as nn, loadSweepState as nt, DEFAULT_NAMESPACE as o, createKeyedMutex as on, sharedPicks as ot, migrateFieldValues as p, BridgeUnreachableError as pn, bindingWalks as pt, UnattributedWriteError as q, normaliseVocabValues as qt, mountKernelRoute as r, normaliseMetadataOrderBy as rn, runSweep as rt, compose as s, isImpossibleIsoTimestamp as sn, windowGroupBy as st, composeKernelPlugins as t, METADATA_AUTHOR_FIELDS as tn, applyObligations as tt, isStoreProfileName as u, assertHardDeleteAllowed as un, aggType as ut, INVITE_TYPE as v, REGEX_BUDGET_EXCEEDED as vn, listExtensionOperators as vt, queryAll as w, UnsupportedFilterError as wn, assertJsonPathPredicate as wt, defineNamespace as x, ResolverFrameError as xn, exprTypeOfField as xt, assertIndexDecl as y, ROW_POLICY_BLOCKS_WALK as yn, registerExtensionOperator as yt, purgeResolver as z, ROW_METADATA_FIELDS as zn, jsonResponse as zt };
|
package/dist/substrate-admin.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { t as assertNodeVersion } from "./node-version-BlYrbY2I.js";
|
|
2
|
+
import { t as assertNodeVersion } from "./node-version-BtK_Nq6z.js";
|
|
4
3
|
import { realpathSync } from "node:fs";
|
|
5
4
|
import { pathToFileURL } from "node:url";
|
|
6
5
|
|
|
@@ -37,7 +36,7 @@ function isEntrypointPath(moduleUrl, argv1) {
|
|
|
37
36
|
*/
|
|
38
37
|
if (isEntrypointPath(import.meta.url, process.argv[1])) {
|
|
39
38
|
assertNodeVersion();
|
|
40
|
-
import("./run-
|
|
39
|
+
import("./run-B438GGJK.js").then(({ runAdminCli }) => runAdminCli());
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
//#endregion
|
package/dist/substrate.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { t as assertNodeVersion } from "./node-version-BlYrbY2I.js";
|
|
2
|
+
import { t as assertNodeVersion } from "./node-version-BtK_Nq6z.js";
|
|
4
3
|
|
|
5
4
|
//#region src/bin/substrate.ts
|
|
6
5
|
assertNodeVersion();
|
|
7
|
-
import("./cli-
|
|
6
|
+
import("./cli-RRFphMtQ.js").then(({ runCli }) => runCli(process.argv.slice(2))).then((code) => process.exit(code));
|
|
8
7
|
|
|
9
8
|
//#endregion
|
|
10
9
|
export { };
|
package/dist/testing.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "./src-
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as FakeEmbedder } from "./fake-DUVtKVSE.js";
|
|
1
|
+
import { Ht as signHs256, Q as loadPlugins, Wt as WS_REASON_SERVER_RESTART, Z as MemoryEdgesStore, c as MemoryDataset, s as compose } from "./src-S84ef4e3.js";
|
|
2
|
+
import "./src-B_kHkbsr.js";
|
|
3
|
+
import { h as deriveListIndexMigration, n as PgDataset, v as runDerivedMigrations, y as runMigrations } from "./src-DkxrpQOz.js";
|
|
4
|
+
import { t as PgEdgesStore } from "./pg-edges-store-C-IRv-O9.js";
|
|
5
|
+
import { t as FakeEmbedder } from "./fake-DdXtb-m8.js";
|
|
7
6
|
import postgres from "postgres";
|
|
8
7
|
|
|
9
8
|
//#region ../../packages/substrate-dataset-pg/src/testing.ts
|
|
@@ -356,7 +355,7 @@ var AlreadyStartedError = class extends Error {
|
|
|
356
355
|
this.name = "AlreadyStartedError";
|
|
357
356
|
}
|
|
358
357
|
};
|
|
359
|
-
const JSON_HEADERS = Object.freeze({ "content-type": "application/json" });
|
|
358
|
+
const JSON_HEADERS = /* @__PURE__ */ Object.freeze({ "content-type": "application/json" });
|
|
360
359
|
function jsonBody(obj) {
|
|
361
360
|
return Buffer.from(JSON.stringify(obj), "utf8");
|
|
362
361
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mnmal-ai/substrate",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.20",
|
|
4
4
|
"description": "Substrate — an agent-first typed-data server: the substrate and substrate-admin binaries, the built-in plugins and the SDK subpaths.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"directory": "apps/substrate"
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
|
+
"sideEffects": false,
|
|
12
13
|
"bin": {
|
|
13
14
|
"substrate": "dist/substrate.js",
|
|
14
15
|
"substrate-admin": "dist/substrate-admin.js"
|
|
@@ -34,24 +35,24 @@
|
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
36
37
|
"@inquirer/prompts": "^8.7.2",
|
|
37
|
-
"@mnmal-ai/substrate-bootstrap": "1.0.0-alpha.
|
|
38
|
-
"@mnmal-ai/substrate-client": "1.0.0-alpha.
|
|
39
|
-
"@mnmal-ai/substrate-compose": "1.0.0-alpha.
|
|
40
|
-
"@mnmal-ai/substrate-config": "1.0.0-alpha.
|
|
41
|
-
"@mnmal-ai/substrate-core": "1.0.0-alpha.
|
|
42
|
-
"@mnmal-ai/substrate-dataset-memory": "1.0.0-alpha.
|
|
43
|
-
"@mnmal-ai/substrate-dataset-pg": "1.0.0-alpha.
|
|
44
|
-
"@mnmal-ai/substrate-embedder": "1.0.0-alpha.
|
|
45
|
-
"@mnmal-ai/substrate-filter": "1.0.0-alpha.
|
|
46
|
-
"@mnmal-ai/substrate-pack": "1.0.0-alpha.
|
|
47
|
-
"@mnmal-ai/substrate-policy": "1.0.0-alpha.
|
|
48
|
-
"@mnmal-ai/substrate-proposals": "1.0.0-alpha.
|
|
49
|
-
"@mnmal-ai/substrate-recall": "1.0.0-alpha.
|
|
50
|
-
"@mnmal-ai/substrate-sdk": "1.0.0-alpha.
|
|
51
|
-
"@mnmal-ai/substrate-sentinel-client": "1.0.0-alpha.
|
|
52
|
-
"@mnmal-ai/substrate-server-fastify": "1.0.0-alpha.
|
|
53
|
-
"@mnmal-ai/substrate-server-memory": "1.0.0-alpha.
|
|
54
|
-
"@mnmal-ai/substrate-types": "1.0.0-alpha.
|
|
38
|
+
"@mnmal-ai/substrate-bootstrap": "1.0.0-alpha.20",
|
|
39
|
+
"@mnmal-ai/substrate-client": "1.0.0-alpha.20",
|
|
40
|
+
"@mnmal-ai/substrate-compose": "1.0.0-alpha.20",
|
|
41
|
+
"@mnmal-ai/substrate-config": "1.0.0-alpha.20",
|
|
42
|
+
"@mnmal-ai/substrate-core": "1.0.0-alpha.20",
|
|
43
|
+
"@mnmal-ai/substrate-dataset-memory": "1.0.0-alpha.20",
|
|
44
|
+
"@mnmal-ai/substrate-dataset-pg": "1.0.0-alpha.20",
|
|
45
|
+
"@mnmal-ai/substrate-embedder": "1.0.0-alpha.20",
|
|
46
|
+
"@mnmal-ai/substrate-filter": "1.0.0-alpha.20",
|
|
47
|
+
"@mnmal-ai/substrate-pack": "1.0.0-alpha.20",
|
|
48
|
+
"@mnmal-ai/substrate-policy": "1.0.0-alpha.20",
|
|
49
|
+
"@mnmal-ai/substrate-proposals": "1.0.0-alpha.20",
|
|
50
|
+
"@mnmal-ai/substrate-recall": "1.0.0-alpha.20",
|
|
51
|
+
"@mnmal-ai/substrate-sdk": "1.0.0-alpha.20",
|
|
52
|
+
"@mnmal-ai/substrate-sentinel-client": "1.0.0-alpha.20",
|
|
53
|
+
"@mnmal-ai/substrate-server-fastify": "1.0.0-alpha.20",
|
|
54
|
+
"@mnmal-ai/substrate-server-memory": "1.0.0-alpha.20",
|
|
55
|
+
"@mnmal-ai/substrate-types": "1.0.0-alpha.20",
|
|
55
56
|
"@mnmal-ai/surface-core": "0.17.1",
|
|
56
57
|
"@types/node": "^26.6.4",
|
|
57
58
|
"@types/semver": "^7.5.0",
|
|
@@ -110,7 +111,7 @@
|
|
|
110
111
|
]
|
|
111
112
|
},
|
|
112
113
|
"scripts": {
|
|
113
|
-
"build": "tsdown && node scripts/copy-plugin-configs.mjs && node scripts/check-browser-bundle.mjs",
|
|
114
|
+
"build": "tsdown && node scripts/copy-plugin-configs.mjs && node scripts/check-browser-bundle.mjs && node scripts/check-entry-sizes.mjs",
|
|
114
115
|
"dev": "tsx src/bin/substrate.ts serve",
|
|
115
116
|
"test": "vitest run",
|
|
116
117
|
"check-types": "tsc -p tsconfig.json --noEmit",
|