@mnmal-ai/substrate 1.0.0-alpha.20 → 1.0.0-alpha.21

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 (31) hide show
  1. package/dist/{boot-store-BaDqbBS-.js → boot-store-Dz6PGwNY.js} +35 -18
  2. package/dist/{bridge-BhiJKwfF.d.ts → bridge-BeVye_Oj.d.ts} +1 -1
  3. package/dist/{cli-RRFphMtQ.js → cli-CH7M6ZTQ.js} +26 -9
  4. package/dist/client.d.ts +3 -3
  5. package/dist/{errors-CYOaWZ8l.d.ts → errors-CoHLKAX0.d.ts} +1 -1
  6. package/dist/{index-ZKeYFHDD.d.ts → index-D7XRAGC6.d.ts} +1 -1
  7. package/dist/pack.d.ts +2 -2
  8. package/dist/{pg-edges-store-C-IRv-O9.js → pg-edges-store-Dnaxesmy.js} +1 -1
  9. package/dist/{plugin-MSbSZ6Al.js → plugin-BIz4Pr5-.js} +1 -1
  10. package/dist/proposals-bootstrap.js +2 -2
  11. package/dist/proposals.d.ts +2 -2
  12. package/dist/proposals.js +1 -1
  13. package/dist/recall-bootstrap.js +2 -2
  14. package/dist/recall.d.ts +1 -1
  15. package/dist/recall.js +2 -2
  16. package/dist/{repl-Ob5OyQqj.js → repl-BUkd9DPZ.js} +1 -1
  17. package/dist/{row-CfsHSEfB.d.ts → row-aEWVHEsf.d.ts} +2 -2
  18. package/dist/{run-B438GGJK.js → run-Cu9w5Y10.js} +3 -3
  19. package/dist/{schema-laGLMvMC.d.ts → schema-DwnXxdjk.d.ts} +6 -0
  20. package/dist/sdk.d.ts +5 -5
  21. package/dist/sdk.js +1 -1
  22. package/dist/{src-De9j33jv.js → src--accZ5Ka.js} +3 -3
  23. package/dist/{src-BSL2yyVy.js → src-BQnDrs_E.js} +15 -1
  24. package/dist/{src-DkxrpQOz.js → src-BbCUeMsI.js} +17 -3
  25. package/dist/{src-S84ef4e3.js → src-BmJD4ScT.js} +50 -11
  26. package/dist/substrate-admin.js +1 -1
  27. package/dist/substrate.js +1 -1
  28. package/dist/testing.d.ts +2 -2
  29. package/dist/testing.js +3 -3
  30. package/dist/{ws-BT8kL1IF.d.ts → ws-DJaKruX-.d.ts} +2 -2
  31. package/package.json +19 -19
@@ -1,12 +1,12 @@
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";
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-BmJD4ScT.js";
2
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
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
4
  import { r as FRAMES_JSON_MIME, s as decodeStreamFrames, u as withIdleTimeout } from "./src-B_kHkbsr.js";
5
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";
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-BbCUeMsI.js";
7
+ import { t as PgEdgesStore } from "./pg-edges-store-Dnaxesmy.js";
8
+ import { a as InMemoryLexicalStore, i as PgClusterStore, n as PgLexicalStore, o as InMemoryEmbeddingsStore, r as PgEmbeddingsStore, s as InMemoryClusterStore } from "./src--accZ5Ka.js";
9
+ import { et as memberKey } from "./plugin-BIz4Pr5-.js";
10
10
  import { existsSync, linkSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
11
11
  import { homedir } from "node:os";
12
12
  import { basename, dirname, join, resolve } from "node:path";
@@ -1753,7 +1753,7 @@ async function closeQuietly(sql) {
1753
1753
 
1754
1754
  //#endregion
1755
1755
  //#region package.json
1756
- var version = "1.0.0-alpha.20";
1756
+ var version = "1.0.0-alpha.21";
1757
1757
 
1758
1758
  //#endregion
1759
1759
  //#region src/plugin-manifest.ts
@@ -2188,15 +2188,9 @@ var FastifySubstrateServer = class {
2188
2188
  } } : { http: { settings } }
2189
2189
  });
2190
2190
  if (requestTimeout > 0) boundH2Requests(this.fastify, requestTimeout);
2191
- if (pingIntervalMs > 0) pingSessions(this.fastify, pingIntervalMs);
2192
- this.fastify.server.on("connection", (socket) => {
2193
- this.#sockets.add(socket);
2194
- socket.once("close", () => this.#sockets.delete(socket));
2195
- });
2196
- this.fastify.server.on("secureConnection", (socket) => {
2197
- if (socket.alpnProtocol === "h2") return;
2198
- this.#refused.add(socket);
2199
- socket.once("close", () => this.#refused.delete(socket));
2191
+ this.#watch(this.fastify.server, pingIntervalMs);
2192
+ this.fastify.addHook("onListen", async () => {
2193
+ for (const server of secondaryServers(this.fastify)) this.#watch(server, pingIntervalMs);
2200
2194
  });
2201
2195
  this.fastify.addContentTypeParser("application/octet-stream", { parseAs: "buffer" }, (_req, body, done) => done(null, body));
2202
2196
  this.fastify.addContentTypeParser("application/vnd.substrate.pack", { parseAs: "buffer" }, (_req, body, done) => done(null, body));
@@ -2250,6 +2244,19 @@ var FastifySubstrateServer = class {
2250
2244
  this.errorHook(err, req ? toSubstrateRequest(req) : void 0);
2251
2245
  } catch {}
2252
2246
  }
2247
+ /** Track `server`'s connections for `stop()`, and ping its HTTP/2 sessions. */
2248
+ #watch(server, pingIntervalMs) {
2249
+ if (pingIntervalMs > 0) pingSessions(server, pingIntervalMs);
2250
+ server.on("connection", (socket) => {
2251
+ this.#sockets.add(socket);
2252
+ socket.once("close", () => this.#sockets.delete(socket));
2253
+ });
2254
+ server.on("secureConnection", (socket) => {
2255
+ if (socket.alpnProtocol === "h2") return;
2256
+ this.#refused.add(socket);
2257
+ socket.once("close", () => this.#refused.delete(socket));
2258
+ });
2259
+ }
2253
2260
  async start(opts) {
2254
2261
  if (opts?.tls && !this.hasTls) throw new Error("FastifySubstrateServer: tls must be supplied at construction time, not to start()");
2255
2262
  const host = opts?.host ?? "0.0.0.0";
@@ -2276,7 +2283,7 @@ var FastifySubstrateServer = class {
2276
2283
  this.#notifyShutdown(WS_REASON_SERVER_RESTART);
2277
2284
  if (opts?.abortInFlight === true) this.abortAllRequests("server_shutdown");
2278
2285
  for (const socket of this.#refused) socket.destroy();
2279
- const closed = this.fastify.close();
2286
+ const closed = Promise.all([this.fastify.close(), ...secondaryServers(this.fastify).filter((s) => s.listening).map((s) => new Promise((resolve) => s.once("close", resolve)))]);
2280
2287
  const grace = opts?.grace;
2281
2288
  if (grace !== void 0) {
2282
2289
  let timer;
@@ -2457,8 +2464,8 @@ function boundH2Requests(fastify, ms) {
2457
2464
  * ping can queue behind a full write buffer on a slow link, or its ack behind
2458
2465
  * a blocked event loop.
2459
2466
  */
2460
- function pingSessions(fastify, ms) {
2461
- fastify.server.on("session", (session) => {
2467
+ function pingSessions(server, ms) {
2468
+ server.on("session", (session) => {
2462
2469
  let unanswered = 0;
2463
2470
  const timer = setInterval(() => {
2464
2471
  if (unanswered >= 2) {
@@ -2476,6 +2483,16 @@ function pingSessions(fastify, ms) {
2476
2483
  session.once("close", () => clearInterval(timer));
2477
2484
  });
2478
2485
  }
2486
+ /**
2487
+ * Fastify's secondary listeners. Fastify 5 keeps them only under its private
2488
+ * `fastify.serverBindings` symbol (lib/server.js `multipleBindings`), with no
2489
+ * public accessor, so look the symbol up by its description.
2490
+ */
2491
+ function secondaryServers(fastify) {
2492
+ const key = Object.getOwnPropertySymbols(fastify).find((s) => s.description === "fastify.serverBindings");
2493
+ const bindings = key === void 0 ? void 0 : fastify[key];
2494
+ return Array.isArray(bindings) ? bindings : [];
2495
+ }
2479
2496
 
2480
2497
  //#endregion
2481
2498
  //#region ../../packages/substrate-sentinel-client/src/client.ts
@@ -1,4 +1,4 @@
1
- import { En as EdgeRef, Ln as Row, f as PackEnvelope, m as Schema } from "./schema-laGLMvMC.js";
1
+ import { En as EdgeRef, Ln as Row, f as PackEnvelope, m as Schema } from "./schema-DwnXxdjk.js";
2
2
  //#region ../../packages/substrate-types/src/bridge.d.ts
3
3
  /**
4
4
  * Per-frame bucket sent to a bridge. Same shape as `QualifiedFrame` in the
@@ -1,12 +1,12 @@
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";
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-BmJD4ScT.js";
2
2
  import { n as trimTrailingSlashes, s as makeAuthorizationProvider } from "./env-utils-s25Z1YSA.js";
3
3
  import { L as encodeList, T as SYSTEM_NAMESPACE, f as coversNamespace, m as grantedIn, p as grantOf } from "./src-DmiUWOLp.js";
4
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";
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-Dz6PGwNY.js";
6
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
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";
8
+ import { T as tryWithPgAdvisoryLock } from "./src-BbCUeMsI.js";
9
+ import { n as PgLexicalStore, r as PgEmbeddingsStore } from "./src--accZ5Ka.js";
10
10
  import { chmodSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
11
11
  import { homedir, hostname, tmpdir } from "node:os";
12
12
  import { basename, dirname, join, resolve } from "node:path";
@@ -2163,7 +2163,7 @@ async function runInit(argv) {
2163
2163
  return 1;
2164
2164
  }
2165
2165
  if (!config.yes) try {
2166
- const { runRepl } = await import("./repl-Ob5OyQqj.js");
2166
+ const { runRepl } = await import("./repl-BUkd9DPZ.js");
2167
2167
  config = await runRepl(config);
2168
2168
  } catch (err) {
2169
2169
  if (err.message?.includes("User force closed")) return 130;
@@ -2737,6 +2737,19 @@ const payloadSchema = (example) => z.unknown().transform((raw, ctx) => {
2737
2737
  }
2738
2738
  return raw;
2739
2739
  }).describe(example);
2740
+ /**
2741
+ * query/mutate input: `payload`, plus any other keys kept, so a bare
2742
+ * `{ "<ns>/<Type>": ... }` frame reaches the handler (frameOf) instead of being
2743
+ * stripped and refused. Optional, so the SDK does not refuse the bare call first.
2744
+ */
2745
+ const frameInputSchema = (example) => z.object({ payload: payloadSchema(example).optional() }).loose();
2746
+ /** The frame a call carries: its `payload`, or the arguments themselves when every key is `<ns>/<name>`. */
2747
+ function frameOf(args) {
2748
+ if (args.payload !== void 0) return args.payload;
2749
+ const keys = Object.keys(args).filter((k) => k !== "payload");
2750
+ return keys.length > 0 && keys.every((k) => k.includes("/")) ? args : void 0;
2751
+ }
2752
+ const MISSING_PAYLOAD = "missing payload: wrap the frame as { \"payload\": { \"<ns>/<Type>\": { \"params\": {...}, \"fields\": {...} } } }";
2740
2753
  function errorResult(message) {
2741
2754
  return {
2742
2755
  content: [{
@@ -2878,7 +2891,9 @@ function createSchemaHandler(endpoint) {
2878
2891
  };
2879
2892
  }
2880
2893
  function createQueryHandler(endpoint) {
2881
- return async ({ payload }) => {
2894
+ return async (args) => {
2895
+ const payload = frameOf(args);
2896
+ if (payload === void 0) return errorResult(MISSING_PAYLOAD);
2882
2897
  try {
2883
2898
  return okResult(await postSubstrate(endpoint, "/substrate/v1/query", payload));
2884
2899
  } catch (err) {
@@ -2887,7 +2902,9 @@ function createQueryHandler(endpoint) {
2887
2902
  };
2888
2903
  }
2889
2904
  function createMutateHandler(endpoint) {
2890
- return async ({ payload }) => {
2905
+ return async (args) => {
2906
+ const payload = frameOf(args);
2907
+ if (payload === void 0) return errorResult(MISSING_PAYLOAD);
2891
2908
  try {
2892
2909
  return okResult(await postSubstrate(endpoint, "/substrate/v1/mutate", payload));
2893
2910
  } catch (err) {
@@ -3031,7 +3048,7 @@ function createMcpServer(endpoint, options = {}) {
3031
3048
  name: "query",
3032
3049
  config: {
3033
3050
  description: "Query Substrate. payload is a single frame object mapping qualified keys (<ns>/<Type>) to { params, fields }. ONE call can span multiple namespaces — e.g. { \"prices/Price\": {...}, \"products/Product\": {...} }. The expression functions for select, where.$expr, groupBy and having are listed by the `schema` tool. WALKS: a reference field is followed backwards with `_walk`, which names the inbound field as \"ns/Type.field\" (the schema overview marks it `←Type.field`). It filters in `where`, aggregates in `fields._agg`, or nests rows in `fields`. Example: orders with an item priced over 50, and their item count: { \"shop/Order\": { \"params\": { \"where\": { \"_walk\": { \"in\": \"shop/Item.order\", \"where\": { \"price\": { \"gt\": 50 } } } } }, \"fields\": { \"id\": true, \"_agg\": { \"items\": { \"in\": \"shop/Item.order\", \"count\": true } } } } }. `out: \"field\"` follows a reference forwards. A `_walk` takes `quantifier` \"any\" (default), \"none\" or \"all\", or `pick` one neighbour by { \"latest\": <date> }, { \"max\": <f> } or { \"min\": <f> }; an \"any\" walk binds `as: \"L\"`, and a later comparison reads it as { \"$ref\": \"L.price\", \"times\": 1.25 } (`$.f` is the seed row, `_agg.<name>` an aggregate; `times`/`plus` scale numbers, `plus` shifts a date in ms). `_agg` also takes avg/sum/min/max: <field> or latest: { by, value }, and in `where` compares beside a comparison: { \"_agg\": { \"in\": ..., \"count\": true }, \"gte\": 3 }. Frame params: `count: true` answers { count }; `aggregate: { name: { sum: \"price\" } }` answers one group, or one per key of `groupBy: { day: { dateTrunc: [{ \"lit\": \"day\" }, \"seenAt\"] } }` (a map of names to expressions; `having` filters the groups, `offset` skips them, `orderBy` names their outputs). `select: { m: { sub: [\"_agg.x\", \"price\"] } }` adds a computed value to each row, ordered by `orderBy: [{ \"m\": \"desc\" }]`. An expression is a field name, a literal, `{ \"lit\": \"text\" }` or `{ \"fn\": [args] }`. Walks are query-only: subscribe, stream and mutate refuse them, as does a store without walks (walks_unsupported_store).",
3034
- inputSchema: { payload: payloadSchema("Query frame. Example: { \"default/Todo\": { \"params\": { \"limit\": 20 }, \"fields\": { \"id\": true, \"title\": true } } }") }
3051
+ inputSchema: frameInputSchema("Query frame. Example: { \"default/Todo\": { \"params\": { \"limit\": 20 }, \"fields\": { \"id\": true, \"title\": true } } }")
3035
3052
  },
3036
3053
  handler: createQueryHandler(endpoint)
3037
3054
  },
@@ -3039,7 +3056,7 @@ function createMcpServer(endpoint, options = {}) {
3039
3056
  name: "mutate",
3040
3057
  config: {
3041
3058
  description: "Run one or more mutations. payload is a single frame object mapping qualified keys (<ns>/<mutationName>) to { params, fields } (single-frame) or to an array of frames (batched atomic). ONE op-key can accept a single frame or an array. An ARRAY op-key is its own transaction: it commits or rolls back as a unit, independently of every other op-key in the call. The SINGLE-FRAME op-keys share one transaction when they sit on one tx scope (every namespace on one pg handle); across two tx scopes they are refused rather than split. So a single-frame op-key beside an array is NOT rolled back when the array fails — to make writes atomic together, put them in one array under one op-key. The memory dataset mints a fresh tx scope per namespace, so single-frame op-keys in two namespaces are refused there.",
3042
- inputSchema: { payload: payloadSchema("Mutation frame. Single: { \"default/createTodo\": { \"params\": { \"title\": \"...\" }, \"fields\": { \"id\": true } } }. Batched atomic: { \"default/updateTodo\": [ { \"params\": { \"id\": \"1\", \"done\": true }, \"fields\": { \"id\": true } }, { \"params\": { \"id\": \"2\", \"done\": true }, \"fields\": { \"id\": true } } ] }. By filter: { \"default/updateManyTodo\": { \"params\": { \"where\": { \"done\": { \"eq\": false } }, \"set\": { \"done\": true } }, \"fields\": { \"count\": true, \"ids\": true, \"idsTruncated\": true } } }; deleteMany<Type> takes only \"where\".") }
3059
+ inputSchema: frameInputSchema("Mutation frame. Single: { \"default/createTodo\": { \"params\": { \"title\": \"...\" }, \"fields\": { \"id\": true } } }. Batched atomic: { \"default/updateTodo\": [ { \"params\": { \"id\": \"1\", \"done\": true }, \"fields\": { \"id\": true } }, { \"params\": { \"id\": \"2\", \"done\": true }, \"fields\": { \"id\": true } } ] }. By filter: { \"default/updateManyTodo\": { \"params\": { \"where\": { \"done\": { \"eq\": false } }, \"set\": { \"done\": true } }, \"fields\": { \"count\": true, \"ids\": true, \"idsTruncated\": true } } }; deleteMany<Type> takes only \"where\".")
3043
3060
  },
3044
3061
  handler: createMutateHandler(endpoint)
3045
3062
  },
package/dist/client.d.ts CHANGED
@@ -1,6 +1,6 @@
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
- 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-ZKeYFHDD.js";
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-DwnXxdjk.js";
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-aEWVHEsf.js";
3
+ import { o as SchemaDriftError } from "./index-D7XRAGC6.js";
4
4
  import { Signal } from "@preact/signals-core";
5
5
  //#region ../../packages/substrate-client/src/transport/h2-fetch.d.ts
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { En as EdgeRef, wn as Edge } from "./schema-laGLMvMC.js";
1
+ import { En as EdgeRef, wn as Edge } from "./schema-DwnXxdjk.js";
2
2
  //#region ../../packages/substrate-types/src/errors.d.ts
3
3
  /** A by-filter write matched more rows than `SUBSTRATE_FILTER_WRITE_MAX_MATCH`; nothing changed. */
4
4
  declare const FILTER_TOO_BROAD = "filter_too_broad";
@@ -1,4 +1,4 @@
1
- import { f as PackEnvelope, i as FieldDef, l as FieldInput, m as Schema } from "./schema-laGLMvMC.js";
1
+ import { f as PackEnvelope, i as FieldDef, l as FieldInput, m as Schema } from "./schema-DwnXxdjk.js";
2
2
  import * as msgpackr from "msgpackr";
3
3
  //#region ../../packages/substrate-pack/src/decoder.d.ts
4
4
  interface DecodeContext {
package/dist/pack.d.ts CHANGED
@@ -1,5 +1,5 @@
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 unpack, o as SchemaDriftError, r as DecodeContext, s as decodeEnvelope, t as pack } from "./index-ZKeYFHDD.js";
1
+ import { f as PackEnvelope, i as FieldDef, l as FieldInput, m as Schema, u as MutationSchema } from "./schema-DwnXxdjk.js";
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-D7XRAGC6.js";
3
3
  //#region ../../packages/substrate-pack/src/content-type.d.ts
4
4
  /**
5
5
  * Content-type negotiation. Spec: §7.0.
@@ -1,4 +1,4 @@
1
- import { r as txScopeIdFor } from "./src-DkxrpQOz.js";
1
+ import { r as txScopeIdFor } from "./src-BbCUeMsI.js";
2
2
  import { randomUUID } from "node:crypto";
3
3
 
4
4
  //#region ../../packages/substrate-dataset-pg/src/pg-edges-store.ts
@@ -1,4 +1,4 @@
1
- import { Lt as buildContext, tt as applyObligations, xn as ResolverFrameError, zt as jsonResponse } from "./src-S84ef4e3.js";
1
+ import { Lt as buildContext, tt as applyObligations, xn as ResolverFrameError, zt as jsonResponse } from "./src-BmJD4ScT.js";
2
2
  import "./src-B_kHkbsr.js";
3
3
  import { Worker } from "node:worker_threads";
4
4
 
@@ -1,5 +1,5 @@
1
- import { Un as defineBootstrap } from "./src-S84ef4e3.js";
2
- import { n as createNoopPubSub, t as createProposalsPlugin } from "./src-BSL2yyVy.js";
1
+ import { Un as defineBootstrap } from "./src-BmJD4ScT.js";
2
+ import { n as createNoopPubSub, t as createProposalsPlugin } from "./src-BQnDrs_E.js";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region ../../plugins/substrate-proposals/src/bootstrap.ts
@@ -1,5 +1,5 @@
1
- import { kn as OnDelete, kt as Dataset, x as CoordinatorPlugin } from "./schema-laGLMvMC.js";
2
- import { u as ResolverFrameError } from "./errors-CYOaWZ8l.js";
1
+ import { kn as OnDelete, kt as Dataset, x as CoordinatorPlugin } from "./schema-DwnXxdjk.js";
2
+ import { u as ResolverFrameError } from "./errors-CoHLKAX0.js";
3
3
  //#region ../../plugins/substrate-proposals/src/config.d.ts
4
4
  /**
5
5
  * Multi-instance invalidation transport used by the plugin to broadcast
package/dist/proposals.js CHANGED
@@ -1,3 +1,3 @@
1
- import { i as ProposalError, n as createNoopPubSub, r as storageSettled, t as createProposalsPlugin } from "./src-BSL2yyVy.js";
1
+ import { i as ProposalError, n as createNoopPubSub, r as storageSettled, t as createProposalsPlugin } from "./src-BQnDrs_E.js";
2
2
 
3
3
  export { ProposalError, createNoopPubSub, createProposalsPlugin, storageSettled };
@@ -1,6 +1,6 @@
1
- import { Un as defineBootstrap } from "./src-S84ef4e3.js";
1
+ import { Un as defineBootstrap } from "./src-BmJD4ScT.js";
2
2
  import { t as FakeEmbedder } from "./fake-DdXtb-m8.js";
3
- import { t as createRecallPlugin } from "./plugin-MSbSZ6Al.js";
3
+ import { t as createRecallPlugin } from "./plugin-BIz4Pr5-.js";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region ../../packages/substrate-embedder/src/types.ts
package/dist/recall.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as EmbedSourceContext, D as FilterOperatorDef, I as McpToolRegistration, Ln as Row, On as EdgesStore, P as KernelPlugin, U as PostWriteHook, _t as PolicyDecision, i as FieldDef, j as KernelMigration, kt as Dataset, mt as Identity, tt as HttpHandler, vt as PolicyProbeContext, xt as ResolverArgs, yt as RequestContext } from "./schema-laGLMvMC.js";
1
+ import { C as EmbedSourceContext, D as FilterOperatorDef, I as McpToolRegistration, Ln as Row, On as EdgesStore, P as KernelPlugin, U as PostWriteHook, _t as PolicyDecision, i as FieldDef, j as KernelMigration, kt as Dataset, mt as Identity, tt as HttpHandler, vt as PolicyProbeContext, xt as ResolverArgs, yt as RequestContext } from "./schema-DwnXxdjk.js";
2
2
  import { t as Embedder } from "./types-8c0gtnd2.js";
3
3
  import postgres, { Sql } from "postgres";
4
4
  //#region ../../plugins/substrate-recall/src/candidate-selection.d.ts
package/dist/recall.js CHANGED
@@ -1,4 +1,4 @@
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";
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--accZ5Ka.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-BIz4Pr5-.js";
3
3
 
4
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,4 +1,4 @@
1
- import { a as parsePositive, i as DEFAULT_SIZING, n as defaultPluginsForPersona, r as parsePort, t as KNOWN_PLUGINS } from "./cli-RRFphMtQ.js";
1
+ import { a as parsePositive, i as DEFAULT_SIZING, n as defaultPluginsForPersona, r as parsePort, t as KNOWN_PLUGINS } from "./cli-CH7M6ZTQ.js";
2
2
  import { createRequire } from "node:module";
3
3
  import path from "node:path";
4
4
  import { stripVTControlCharacters, styleText } from "node:util";
@@ -1,5 +1,5 @@
1
- import { Ln as Row, _t as PolicyDecision, gt as Policy, in as WhereClause, l as FieldInput, n as Dropped, p as PlanClause, pt as AutoCrudVerb, yt as RequestContext } from "./schema-laGLMvMC.js";
2
- import { n as BridgeCredential } from "./bridge-BhiJKwfF.js";
1
+ import { Ln as Row, _t as PolicyDecision, gt as Policy, in as WhereClause, l as FieldInput, n as Dropped, p as PlanClause, pt as AutoCrudVerb, yt as RequestContext } from "./schema-DwnXxdjk.js";
2
+ import { n as BridgeCredential } from "./bridge-BeVye_Oj.js";
3
3
  //#region ../../packages/substrate-types/src/nl.d.ts
4
4
  /**
5
5
  * The engine-dispatchable frame a successful NL translation produces. Keys
@@ -1,10 +1,10 @@
1
- import { _ as AUDIT_EVENT_TYPE, g as buildAuditRow } from "./src-S84ef4e3.js";
1
+ import { _ as AUDIT_EVENT_TYPE, g as buildAuditRow } from "./src-BmJD4ScT.js";
2
2
  import { n as trimTrailingSlashes } from "./env-utils-s25Z1YSA.js";
3
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
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";
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-Dz6PGwNY.js";
6
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";
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-BbCUeMsI.js";
8
8
  import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
9
9
  import { dirname } from "node:path";
10
10
  import { createHash, randomUUID } from "node:crypto";
@@ -426,6 +426,12 @@ interface WalkNode {
426
426
  where?: WhereClause;
427
427
  quantifier?: 'any' | 'none' | 'all';
428
428
  pick?: WalkPick;
429
+ /**
430
+ * Pick walks only: the neighbours the pick chooses among. `where` then
431
+ * judges the picked row, so "the latest non-skipped run" is
432
+ * `{ pick: { latest: 'at' }, among: { NOT: { status: { eq: 'skipped' } } } }` (#1810).
433
+ */
434
+ among?: WhereClause;
429
435
  }
430
436
  /** `'$.f'` | `'<as>.f'` | `'_agg.<name>'` */
431
437
  interface RefOperand {
package/dist/sdk.d.ts CHANGED
@@ -1,8 +1,8 @@
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-laGLMvMC.js";
2
- import { i as BridgeFrame, n as BridgeCredential, r as BridgeCredentialStore, t as BridgeClient } from "./bridge-BhiJKwfF.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-CYOaWZ8l.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-BT8kL1IF.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-CfsHSEfB.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-DwnXxdjk.js";
2
+ import { i as BridgeFrame, n as BridgeCredential, r as BridgeCredentialStore, t as BridgeClient } from "./bridge-BeVye_Oj.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-CoHLKAX0.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-DJaKruX-.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-aEWVHEsf.js";
6
6
  //#region ../../packages/substrate-types/src/assert-never.d.ts
7
7
  /**
8
8
  * Exhaustiveness guard for the `default:` arm of a `switch` over a
package/dist/sdk.js CHANGED
@@ -1,4 +1,4 @@
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";
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-BmJD4ScT.js";
2
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
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
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";
@@ -1,8 +1,8 @@
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";
1
+ import { c as typeTableRef, l as whileNoTypeTable, o as guardedRefRead, r as txScopeIdFor } from "./src-BbCUeMsI.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-BIz4Pr5-.js";
3
3
 
4
4
  //#region ../../plugins/substrate-recall/package.json
5
- var version = "1.0.0-alpha.20";
5
+ var version = "1.0.0-alpha.21";
6
6
 
7
7
  //#endregion
8
8
  //#region ../../plugins/substrate-recall/src/in-memory-cluster-store.ts
@@ -1,4 +1,4 @@
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";
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-BmJD4ScT.js";
2
2
  import { s as requireCapability } from "./src-DmiUWOLp.js";
3
3
  import "./src-B_kHkbsr.js";
4
4
  import { randomUUID } from "node:crypto";
@@ -291,6 +291,18 @@ function stringifyFieldDef(def) {
291
291
  }
292
292
  }
293
293
  /**
294
+ * Refuse a proposed field the engine injects (`shortId`), which apply would overwrite.
295
+ * The resolvers call it, not apply: a stored proposal that names one still replays.
296
+ *
297
+ * @throws ProposalError `invalid_params` naming `fieldName`
298
+ */
299
+ function assertNotEngineInjected(fieldName) {
300
+ if (RESERVED_AUTOCRUD_FIELD_NAMES.includes(fieldName)) throw new ProposalError("invalid_params", `\`${fieldName}\` is a reserved field name, auto-injected by the engine`, {
301
+ param: "fieldName",
302
+ fieldName
303
+ });
304
+ }
305
+ /**
294
306
  * Check that `spec` parses, so a proposal can be refused before any row is
295
307
  * written for it.
296
308
  *
@@ -1569,6 +1581,7 @@ function makeProposeFieldResolver(deps) {
1569
1581
  if (!deps.ownedNamespaces.has(deps.namespace) && !deps.registryStore.has(deps.namespace)) throw new ProposalError("unowned_namespace", `Namespace '${deps.namespace}' is not owned by this plugin instance`);
1570
1582
  const input = args.params ?? {};
1571
1583
  assertValidFieldProposal(input.targetType, input.fieldName, input.fieldSpec, (ns, type) => deps.registryStore.ownsType(ns, type));
1584
+ assertNotEngineInjected(input.fieldName);
1572
1585
  if (input.proposedReason !== void 0 && typeof input.proposedReason !== "string") throw new ProposalError("invalid_params", "'proposedReason' must be a string", { param: "proposedReason" });
1573
1586
  const dataset = args.dataset ?? deps.dataset;
1574
1587
  return withProposalLock(dataset, proposalLockKey("field", deps.namespace, `${input.targetType}.${input.fieldName}`), () => proposeFieldLocked(deps, ctx, {
@@ -2057,6 +2070,7 @@ function makeProposeTypeResolver(deps) {
2057
2070
  if (!deps.ownedNamespaces.has(deps.namespace) && !deps.registryStore.has(deps.namespace)) throw new ProposalError("unowned_namespace", `Namespace '${deps.namespace}' is not owned by this plugin instance`);
2058
2071
  const input = parseInput(args.params ?? {});
2059
2072
  assertValidTypeProposal(input.typeName, input.fields, (ns, type) => ns === deps.namespace && type === input.typeName || deps.registryStore.ownsType(ns, type));
2073
+ for (const name of Object.keys(input.fields)) assertNotEngineInjected(name);
2060
2074
  try {
2061
2075
  assertValidTypeIndexOptions(input.typeName, proposedFieldDefs(input.fields), indexOptionsOf(input));
2062
2076
  } catch (cause) {
@@ -1,4 +1,4 @@
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";
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-BmJD4ScT.js";
2
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";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
 
@@ -4778,7 +4778,11 @@ function buildWalk(sql, node, table, scope) {
4778
4778
  if (node.pick !== void 0) {
4779
4779
  const [dir, field] = Object.entries(node.pick)[0];
4780
4780
  const key = sortKey(sql, farTable, field, castFor(scope, type)(field), alias);
4781
- return sql`EXISTS (SELECT 1 FROM (${firstRow(sql, sql`${a}.*`, from, alias, cond, key, dir === "min" ? "ASC" : "DESC")}) ${a}${far === null ? sql`` : sql` WHERE ${far}`})`;
4781
+ return sql`EXISTS (SELECT 1 FROM (${firstRow(sql, sql`${a}.*`, from, alias, amongCond(sql, node, cond, farTable, {
4782
+ ...scope,
4783
+ alias,
4784
+ type
4785
+ }), key, dir === "min" ? "ASC" : "DESC")}) ${a}${far === null ? sql`` : sql` WHERE ${far}`})`;
4782
4786
  }
4783
4787
  const rows = sql`SELECT 1 FROM ${sql.unsafe(from)} ${a} WHERE ${cond}`;
4784
4788
  switch (node.quantifier ?? "any") {
@@ -4787,6 +4791,12 @@ function buildWalk(sql, node, table, scope) {
4787
4791
  default: return sql`EXISTS (${rows}${far === null ? sql`` : sql` AND ${far}`})`;
4788
4792
  }
4789
4793
  }
4794
+ /** A pick's candidate condition: the hop's `cond`, AND its `among` compiled over the far row (#1810). */
4795
+ function amongCond(sql, node, cond, farTable, far) {
4796
+ if (node.among === void 0) return cond;
4797
+ const among = buildWhere(sql, node.among, castFor(far, far.type), farTable, far);
4798
+ return among === null ? cond : sql`${cond} AND ${among}`;
4799
+ }
4790
4800
  /** True when a `pick` walk sits anywhere in `where`. */
4791
4801
  const holdsPick = (where) => Array.isArray(where) ? where.some(holdsPick) : isObj(where) && Object.entries(where).some(([k, v]) => k === "_walk" && isObj(v) && v.pick !== void 0 || holdsPick(v));
4792
4802
  /**
@@ -4874,7 +4884,11 @@ function prepareSharedPicks(sql, params, base, rowCastFor, table, scope) {
4874
4884
  const farTable = scope.tableFor(type);
4875
4885
  const [dir, field] = Object.entries(pick.pick ?? {})[0];
4876
4886
  const key = sortKey(sql, farTable, field, castFor(scope, type)(field), alias);
4877
- const picked = firstRow(sql, sql`${a}.*, ${a} AS __row`, from, alias, cond, key, dir === "min" ? "ASC" : "DESC");
4887
+ const picked = firstRow(sql, sql`${a}.*, ${a} AS __row`, from, alias, amongCond(sql, pick, cond, farTable, {
4888
+ ...hubScope,
4889
+ alias,
4890
+ type
4891
+ }), key, dir === "min" ? "ASC" : "DESC");
4878
4892
  const hubOf = fieldExpr(sql, table, hub.out, "rawText", scope.seedAlias);
4879
4893
  const hubs = sql`SELECT DISTINCT ${hubOf} AS id FROM ${sql.unsafe(table.from)} ${sql.unsafe(scope.seedAlias)} WHERE ${filter}`;
4880
4894
  const own = groupConjuncts(pick.where).items.filter((i) => !whereUsesWalks(i));
@@ -3125,7 +3125,8 @@ function evaluateWalk(row, node, walk) {
3125
3125
  const where = node.where;
3126
3126
  const test = (n) => where === void 0 || evaluateWhere(n, where, fieldDefOf, far);
3127
3127
  if (node.pick !== void 0) {
3128
- const one = pickOne(rows, node.pick, fieldDefOf);
3128
+ const among = node.among;
3129
+ const one = pickOne(among === void 0 ? rows : rows.filter((n) => evaluateWhere(n, among, fieldDefOf, far)), node.pick, fieldDefOf);
3129
3130
  return one !== void 0 && test(one);
3130
3131
  }
3131
3132
  switch (node.quantifier ?? "any") {
@@ -4519,7 +4520,7 @@ const isAny$1 = (w) => w.pick === void 0 && (w.quantifier ?? "any") === "any";
4519
4520
  * aggregate), O is a top-level AND conjunct `{ _walk: { out, where } }`
4520
4521
  * of the seed's where (an `any` walk, no `as`) that reads no top-level `as`
4521
4522
  * binding, P is an inbound pick among O's where's AND conjuncts, and P's
4522
- * where reads no binding but `$` (or a frame `_agg`). Picking depends only on
4523
+ * where reads no binding but `$` (or a frame `_agg`) and its `among` none. Picking depends only on
4523
4524
  * the hub, and `$` is read after the pick, so P's where is still tested per
4524
4525
  * seed. O reading a top-level binding would compile inside that binding's
4525
4526
  * EXISTS, where the shared CTE could not be hashed.
@@ -4533,6 +4534,7 @@ function sharedPicks(params) {
4533
4534
  if ([...refNames(o.where)].some((n) => bound.has(n))) continue;
4534
4535
  for (const p of conjunctWalks(o.where)) {
4535
4536
  if (typeof p.in !== "string" || p.pick === void 0) continue;
4537
+ if (refNames(p.among).size > 0) continue;
4536
4538
  if ([...refNames(p.where)].every((n) => n === "$" || n === "_agg")) out.set(p, o);
4537
4539
  }
4538
4540
  }
@@ -4585,7 +4587,7 @@ const isObj$4 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
4585
4587
  * Visits every hop of a frame entry `{ params: { where }, fields }` seeded at
4586
4588
  * `seed`, at any depth, each before the hops beneath it. `visit` gets the hop
4587
4589
  * and its near type and returns the far type; the hops in the far rows'
4588
- * wheres (the node's `where`, then a nested selection's own `where`) and a
4590
+ * wheres (a pick's `among` and the node's `where`, then a nested selection's own `where`) and a
4589
4591
  * nested selection's `fields` are visited next. Returning `undefined` stops the
4590
4592
  * descent below that hop. A where is searched generically, under AND/OR/NOT
4591
4593
  * and anywhere else, as the walk gate does.
@@ -4607,7 +4609,10 @@ function forEachWalkHop(entry, seed, visit) {
4607
4609
  node: child,
4608
4610
  path: at
4609
4611
  }, type);
4610
- if (far !== void 0) inWhere(child.where, far, [...at, "where"]);
4612
+ if (far !== void 0) {
4613
+ inWhere(child.among, far, [...at, "among"]);
4614
+ inWhere(child.where, far, [...at, "where"]);
4615
+ }
4611
4616
  } else inWhere(child, type, at);
4612
4617
  }
4613
4618
  };
@@ -4702,6 +4707,7 @@ function walkSites(entry, seed, resolve, naturalOrder) {
4702
4707
  kind: "order"
4703
4708
  };
4704
4709
  }
4710
+ addWhere(node.among, [...path, "among"]);
4705
4711
  addWhere(node.where, [...path, "where"]);
4706
4712
  } else if (kind === "agg") {
4707
4713
  if (isObj$3(node.latest)) s.order = {
@@ -5885,7 +5891,8 @@ const WALK_KEYS = /* @__PURE__ */ new Set([
5885
5891
  "out",
5886
5892
  "where",
5887
5893
  "quantifier",
5888
- "pick"
5894
+ "pick",
5895
+ "among"
5889
5896
  ]);
5890
5897
  const IDENT = /^[A-Za-z][A-Za-z0-9_]*$/;
5891
5898
  const isObj$1 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
@@ -6051,6 +6058,10 @@ function validateWalk(node, path, scope, lookup, kindOf, validateWhere) {
6051
6058
  k
6052
6059
  ]);
6053
6060
  }
6061
+ if (node.among !== void 0) {
6062
+ if (pick === void 0) fail("walk_quantifier", "'among' narrows the rows a pick chooses from; without a pick use 'where'", [...path, "among"]);
6063
+ validateWhere(node.among, [...path, "among"], farScope(scope, hop));
6064
+ }
6054
6065
  if (node.where !== void 0) validateWhere(node.where, [...path, "where"], farScope(scope, hop));
6055
6066
  }
6056
6067
  /**
@@ -6992,7 +7003,28 @@ function runFilterGuard(deps, input) {
6992
7003
  const typeSchema = deps.schemaFor(ns).types[name];
6993
7004
  if (typeSchema) {
6994
7005
  const selectNames = entry.params?.select ?? {};
6995
- const unknown = Object.keys(entry.fields).filter((f) => !(f in typeSchema.fields) && !PROJECTION_VIRTUAL_KEYS.has(f) && computedFieldOwner(f) === void 0 && !isWalkSelection(f, entry.fields[f]) && !Object.hasOwn(selectNames, f));
7006
+ const types = deps.schemaFor(ns).types;
7007
+ const resolve = hopResolver(ns, (t) => Object.hasOwn(types, t) ? types[t] : void 0);
7008
+ const unknown = [];
7009
+ const collect = (fields, type, declared, prefix) => {
7010
+ for (const [f, sel] of Object.entries(fields)) {
7011
+ if (isWalkSelection(f, sel)) {
7012
+ if (f === "_agg") continue;
7013
+ const nested = sel;
7014
+ let far;
7015
+ try {
7016
+ far = resolve(nested._walk, type, []);
7017
+ } catch {
7018
+ continue;
7019
+ }
7020
+ const farFields = types[far]?.fields;
7021
+ if (farFields && typeof nested.fields === "object" && nested.fields !== null) collect(nested.fields, far, farFields, `${prefix}${f}.`);
7022
+ continue;
7023
+ }
7024
+ if (!(f in declared) && !PROJECTION_VIRTUAL_KEYS.has(f) && computedFieldOwner(f) === void 0 && !(prefix === "" && Object.hasOwn(selectNames, f))) unknown.push(prefix + f);
7025
+ }
7026
+ };
7027
+ collect(entry.fields, name, typeSchema.fields, "");
6996
7028
  if (unknown.length > 0) {
6997
7029
  envelope._diagnostics ??= {};
6998
7030
  envelope._diagnostics[key] = { unknownProjectionFields: unknown };
@@ -7003,27 +7035,31 @@ function runFilterGuard(deps, input) {
7003
7035
  }
7004
7036
  }
7005
7037
  }
7006
- const walks = usesWalkGrammar(entry);
7038
+ const walkPath = walkGrammarPath(entry);
7039
+ const walks = walkPath !== null;
7007
7040
  const selects = entry.params?.select !== void 0;
7008
7041
  if (where === void 0 && orderBy === void 0 && !walks && !selects) return true;
7009
7042
  return validateAgainst(deps, envelope, key, ns, name, dataset, {
7010
7043
  ...where !== void 0 ? { where } : {},
7011
7044
  ...orderBy !== void 0 ? { orderBy } : {},
7012
7045
  ...walks || selects ? walkInput(entry) : {}
7013
- });
7046
+ }, walkPath);
7014
7047
  }
7015
7048
  /**
7016
7049
  * Validates `filter` against `typeName`'s published schema. Records the
7017
7050
  * refusal and returns false on a `FilterValidationError`; a type registered
7018
- * but absent from the schema is let through with a diagnostic.
7051
+ * but absent from the schema is let through with a diagnostic, unless the
7052
+ * frame walks (`walkPath`): a walk needs the schema to resolve, so it is
7053
+ * refused there, fail-closed.
7019
7054
  */
7020
- function validateAgainst(deps, envelope, key, ns, typeName, dataset, filter) {
7055
+ function validateAgainst(deps, envelope, key, ns, typeName, dataset, filter, walkPath = null) {
7021
7056
  try {
7022
7057
  let typeSchema = deps.schemaFor(ns).types[typeName];
7023
7058
  if (typeSchema === void 0) {
7024
7059
  deps.invalidateSchemaCaches(ns);
7025
7060
  typeSchema = deps.schemaFor(ns).types[typeName];
7026
7061
  }
7062
+ if (typeSchema === void 0 && walkPath !== null) throw new FilterValidationError("walk_unknown_ref", `'${ns}/${typeName}' is absent from the '${ns}' schema, so a walk from it cannot resolve`, walkPath);
7027
7063
  if (typeSchema === void 0) {
7028
7064
  deps.metric("engine_filter_validation_skipped", {
7029
7065
  key,
@@ -9712,7 +9748,10 @@ var Engine = class {
9712
9748
  return null;
9713
9749
  }
9714
9750
  } else if (isVirtual) {
9715
- const walkPath = walkGrammarPath(frame);
9751
+ const walkPath = walkGrammarPath({
9752
+ fields: frame.fields,
9753
+ params: { where: frame.params?.where }
9754
+ });
9716
9755
  if (walkPath) {
9717
9756
  addError(envelope, [key, ...walkPath], "walks are not available on virtual types", WALK_UNSUPPORTED_REF);
9718
9757
  return null;
@@ -36,7 +36,7 @@ function isEntrypointPath(moduleUrl, argv1) {
36
36
  */
37
37
  if (isEntrypointPath(import.meta.url, process.argv[1])) {
38
38
  assertNodeVersion();
39
- import("./run-B438GGJK.js").then(({ runAdminCli }) => runAdminCli());
39
+ import("./run-Cu9w5Y10.js").then(({ runAdminCli }) => runAdminCli());
40
40
  }
41
41
 
42
42
  //#endregion
package/dist/substrate.js CHANGED
@@ -3,7 +3,7 @@ import { t as assertNodeVersion } from "./node-version-BtK_Nq6z.js";
3
3
 
4
4
  //#region src/bin/substrate.ts
5
5
  assertNodeVersion();
6
- import("./cli-RRFphMtQ.js").then(({ runCli }) => runCli(process.argv.slice(2))).then((code) => process.exit(code));
6
+ import("./cli-CH7M6ZTQ.js").then(({ runCli }) => runCli(process.argv.slice(2))).then((code) => process.exit(code));
7
7
 
8
8
  //#endregion
9
9
  export { };
package/dist/testing.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { At as DatasetRegistry, Bn as WriteRow, Bt as IndexPlan, Cn as CanDeleteResult, Dn as EdgeWriteInput, Dt as ConditionalUpdateResult, E as EngineInput, En as EdgeRef, Ft as FilterCapabilities, G as Registry$1, Gt as ReadParams, It as FilterWriteLimits, J as RegistryEntryInput, Jt as StorageReport, K as RegistryBase, Kt as ReadResult, L as NamespaceConfig, Ln as Row, Lt as FilterWriteOptions, Mt as DropResult, On as EdgesStore, P as KernelPlugin, Pn as Id, Qt as UpdateFieldRef, Rt as FilterWriteResult, S as DropParticipant, T as EngineHandle, Tn as EdgePatch, Tt as WriteEvent, Ut as PoolStats, W as QualifiedFrame, Wt as PromotionEvent, Yt as TxScopeHandles, Z as ScheduledTask, Zt as TypeStorageReport, _t as PolicyDecision, an as WriteOptions, at as RequestObserver, b as CommittedWritesHook, cn as ResolveObservation, ct as SubstrateRequest, d as OrderedBy, dn as RuntimeErrors, f as PackEnvelope, i as FieldDef, in as WhereClause, jn as ActorIdentity, jt as DeleteResult, k as IndexDecl, kt as Dataset, ln as ResolverStat, lt as SubstrateResponse, m as Schema, mn as TypeStats, mt as Identity, nt as HttpMethod, on as WriteResult, ot as RuntimeOp, pn as SlowRequest, q as RegistryEntry, rt as PluginRouter, sn as ProcessStat, st as StartOpts, tt as HttpHandler, ut as SubstrateServer, vt as PolicyProbeContext, wn as Edge, x as CoordinatorPlugin, xt as ResolverArgs, yt as RequestContext } from "./schema-laGLMvMC.js";
2
- import { a as WsResponseFrame, f as IdempotencyStore, l as SweepDeps, s as BridgeRegistry, u as SweepState } from "./ws-BT8kL1IF.js";
1
+ import { At as DatasetRegistry, Bn as WriteRow, Bt as IndexPlan, Cn as CanDeleteResult, Dn as EdgeWriteInput, Dt as ConditionalUpdateResult, E as EngineInput, En as EdgeRef, Ft as FilterCapabilities, G as Registry$1, Gt as ReadParams, It as FilterWriteLimits, J as RegistryEntryInput, Jt as StorageReport, K as RegistryBase, Kt as ReadResult, L as NamespaceConfig, Ln as Row, Lt as FilterWriteOptions, Mt as DropResult, On as EdgesStore, P as KernelPlugin, Pn as Id, Qt as UpdateFieldRef, Rt as FilterWriteResult, S as DropParticipant, T as EngineHandle, Tn as EdgePatch, Tt as WriteEvent, Ut as PoolStats, W as QualifiedFrame, Wt as PromotionEvent, Yt as TxScopeHandles, Z as ScheduledTask, Zt as TypeStorageReport, _t as PolicyDecision, an as WriteOptions, at as RequestObserver, b as CommittedWritesHook, cn as ResolveObservation, ct as SubstrateRequest, d as OrderedBy, dn as RuntimeErrors, f as PackEnvelope, i as FieldDef, in as WhereClause, jn as ActorIdentity, jt as DeleteResult, k as IndexDecl, kt as Dataset, ln as ResolverStat, lt as SubstrateResponse, m as Schema, mn as TypeStats, mt as Identity, nt as HttpMethod, on as WriteResult, ot as RuntimeOp, pn as SlowRequest, q as RegistryEntry, rt as PluginRouter, sn as ProcessStat, st as StartOpts, tt as HttpHandler, ut as SubstrateServer, vt as PolicyProbeContext, wn as Edge, x as CoordinatorPlugin, xt as ResolverArgs, yt as RequestContext } from "./schema-DwnXxdjk.js";
2
+ import { a as WsResponseFrame, f as IdempotencyStore, l as SweepDeps, s as BridgeRegistry, u as SweepState } from "./ws-DJaKruX-.js";
3
3
  import { t as Embedder } from "./types-8c0gtnd2.js";
4
4
  import { Sql, TransactionSql } from "postgres";
5
5
  //#region ../../packages/substrate-compose/src/auth.d.ts
package/dist/testing.js CHANGED
@@ -1,7 +1,7 @@
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";
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-BmJD4ScT.js";
2
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";
3
+ import { h as deriveListIndexMigration, n as PgDataset, v as runDerivedMigrations, y as runMigrations } from "./src-BbCUeMsI.js";
4
+ import { t as PgEdgesStore } from "./pg-edges-store-Dnaxesmy.js";
5
5
  import { t as FakeEmbedder } from "./fake-DdXtb-m8.js";
6
6
  import postgres from "postgres";
7
7
 
@@ -1,5 +1,5 @@
1
- import { At as DatasetRegistry, En as EdgeRef, On as EdgesStore, Pn as Id, f as PackEnvelope, l as FieldInput } from "./schema-laGLMvMC.js";
2
- import { t as BridgeClient } from "./bridge-BhiJKwfF.js";
1
+ import { At as DatasetRegistry, En as EdgeRef, On as EdgesStore, Pn as Id, f as PackEnvelope, l as FieldInput } from "./schema-DwnXxdjk.js";
2
+ import { t as BridgeClient } from "./bridge-BeVye_Oj.js";
3
3
  //#region ../../packages/substrate-types/src/idempotency.d.ts
4
4
  interface IdempotencyStore {
5
5
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mnmal-ai/substrate",
3
- "version": "1.0.0-alpha.20",
3
+ "version": "1.0.0-alpha.21",
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": {
@@ -35,24 +35,24 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@inquirer/prompts": "^8.7.2",
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",
38
+ "@mnmal-ai/substrate-bootstrap": "1.0.0-alpha.21",
39
+ "@mnmal-ai/substrate-client": "1.0.0-alpha.21",
40
+ "@mnmal-ai/substrate-compose": "1.0.0-alpha.21",
41
+ "@mnmal-ai/substrate-config": "1.0.0-alpha.21",
42
+ "@mnmal-ai/substrate-core": "1.0.0-alpha.21",
43
+ "@mnmal-ai/substrate-dataset-memory": "1.0.0-alpha.21",
44
+ "@mnmal-ai/substrate-dataset-pg": "1.0.0-alpha.21",
45
+ "@mnmal-ai/substrate-embedder": "1.0.0-alpha.21",
46
+ "@mnmal-ai/substrate-filter": "1.0.0-alpha.21",
47
+ "@mnmal-ai/substrate-pack": "1.0.0-alpha.21",
48
+ "@mnmal-ai/substrate-policy": "1.0.0-alpha.21",
49
+ "@mnmal-ai/substrate-proposals": "1.0.0-alpha.21",
50
+ "@mnmal-ai/substrate-recall": "1.0.0-alpha.21",
51
+ "@mnmal-ai/substrate-sdk": "1.0.0-alpha.21",
52
+ "@mnmal-ai/substrate-sentinel-client": "1.0.0-alpha.21",
53
+ "@mnmal-ai/substrate-server-fastify": "1.0.0-alpha.21",
54
+ "@mnmal-ai/substrate-server-memory": "1.0.0-alpha.21",
55
+ "@mnmal-ai/substrate-types": "1.0.0-alpha.21",
56
56
  "@mnmal-ai/surface-core": "0.17.1",
57
57
  "@types/node": "^26.6.4",
58
58
  "@types/semver": "^7.5.0",