@mnmal-ai/substrate 1.0.0-alpha.12 → 1.0.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -4
- package/dist/{boot-store-DHv9H1Gr.js → boot-store-0BPtJ8ne.js} +4 -4
- package/dist/{cli-_UNdneXr.js → cli-BvQqNFVn.js} +6 -5
- package/dist/client.d.ts +1 -1
- package/dist/recall.js +1 -1
- package/dist/{repl-DUJGBwie.js → repl-Dw2Fb7C1.js} +1 -1
- package/dist/{row-Cu_iRhcR.d.ts → row-Dtj3KrPH.d.ts} +7 -0
- package/dist/{run-BpsTNvdI.js → run-CgDw2c3X.js} +1 -1
- package/dist/sdk.d.ts +1 -1
- package/dist/{src-CzhKLsOV.js → src-BjWVYYoo.js} +1 -1
- package/dist/substrate-admin.js +1 -1
- package/dist/substrate.js +1 -1
- package/package.json +19 -19
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ The pieces are exported for use outside the CLI: `createClientFromEnv()` builds
|
|
|
82
82
|
|
|
83
83
|
### `substrate-admin`
|
|
84
84
|
|
|
85
|
-
A separate binary for key management: `bootstrap` (seed the genesis admin key), `doctor` (check a deployment end to end), `onboard`, `list`, `register`, `update`, `rotate`, `revoke`, and `migrate-store` (copy a store into a fresh, empty PostgreSQL 18 store on per-type tables and verify it; see [Upgrading](https://github.com/mnmal-ai/substrate/blob/main/
|
|
85
|
+
A separate binary for key management and store operations: `bootstrap` (seed the genesis admin key), `doctor` (check a deployment end to end), `onboard`, `list`, `register`, `update`, `rotate`, `revoke`, `promote-fields` (run the promotion sweep now on a running server, giving fields added at runtime their columns), and `migrate-store` (copy a store into a fresh, empty PostgreSQL 18 store on per-type tables and verify it; see [Upgrading to per-type tables](https://github.com/mnmal-ai/substrate/blob/main/docs/upgrading-to-type-tables.md)). `substrate-admin --help` documents each.
|
|
86
86
|
|
|
87
87
|
## Install
|
|
88
88
|
|
|
@@ -126,20 +126,24 @@ The repository's `docker-compose.yml` runs this binary with `substrate-nl` and `
|
|
|
126
126
|
|
|
127
127
|
## Environment variables
|
|
128
128
|
|
|
129
|
-
The main ones; `substrate --help` and the header of `apps/substrate/src/main.ts` list the rest.
|
|
129
|
+
The main ones; `substrate --help` and the header of `apps/substrate/src/main.ts` list the rest. [Operator decisions](https://github.com/mnmal-ai/substrate/blob/main/docs/operator-decisions.md) explains what each choice costs.
|
|
130
130
|
|
|
131
131
|
| Var | Purpose |
|
|
132
132
|
|---|---|
|
|
133
133
|
| `SUBSTRATE_DATABASE_URL` | `memory` (default, ephemeral) or `postgres://...`. A Postgres store keeps each type in a table of its own; a store in an old layout (`legacy` or `partitioned`) is refused at boot, naming `substrate-admin migrate-store`, which copies it into a fresh one. `SUBSTRATE_STORAGE_LAYOUT` is no longer read: setting it logs one warning. |
|
|
134
134
|
| `SUBSTRATE_PLUGIN_DIR` | Plugin install root. The loader scans `<dir>/node_modules/{*,@*/*}/package.json` for packages with a `substrate` manifest and merges each plugin's `default-config.json` with `<dir>/<basename>.config.json`. |
|
|
135
|
-
| `PORT` / `HOST` | Listen address (default `3100`
|
|
135
|
+
| `PORT` / `HOST` | Listen address (default `3100`; `HOST` defaults to `0.0.0.0` with auth on and `127.0.0.1` with auth off) |
|
|
136
|
+
| `SUBSTRATE_ALLOW_UNAUTHENTICATED_HOST` | `1` or `true` permits a non-loopback `HOST` with auth off; without it that combination refuses boot. |
|
|
136
137
|
| `SUBSTRATE_SYSTEM_ACTOR` | Who the deployment writes as while auth is off. Required in that case: the server refuses to boot rather than write unattributed rows. |
|
|
137
138
|
| `SUBSTRATE_AUTH_MODE` | `required` or `attribute` (anonymous callers allowed on non-admin routes). Setting it, or `SUBSTRATE_AUTH_KEY_REGISTRY`, enables auth. |
|
|
138
139
|
| `SUBSTRATE_AUTH_KEY_REGISTRY` | Path to a JSON key registry file. Without it, auth reads keys registered in Postgres with `substrate-admin`. |
|
|
139
140
|
| `SUBSTRATE_PUBLIC_ORIGIN` | The origins callers reach this server by, comma-separated (`https://host:3100,https://alias`). A token whose `aud` names none of them is refused. **Required when auth is enabled and `HOST` is not loopback**; on loopback it defaults to the loopback origins. |
|
|
140
141
|
| `SUBSTRATE_STREAM_TICKET_SECRET` | HMAC key signing SSE stream tickets. **Required when auth is enabled**; at least 16 characters. The ticket signature is the only authentication on `GET /substrate/v1/stream` and `GET /substrate/v1/subscribe`, because `EventSource` can send no header or body. Rotating it invalidates every outstanding ticket. |
|
|
141
142
|
| `SUBSTRATE_TLS_KEY_PATH` / `SUBSTRATE_TLS_CERT_PATH` / `SUBSTRATE_TLS_CA_PATH` | Serve HTTPS. Key and cert are required together. |
|
|
142
|
-
| `SUBSTRATE_NAMESPACE` | Default namespace for recall requests that omit one
|
|
143
|
+
| `SUBSTRATE_NAMESPACE` | Default namespace for recall requests that omit one; with neither, recall refuses with `missing_namespace`. |
|
|
144
|
+
| `SUBSTRATE_STATEMENT_TIMEOUT_MS` | Statement timeout for typed edge walk reads (default 30000). A read it cancels is refused `query_timeout`. |
|
|
145
|
+
| `SUBSTRATE_PAGE_LIMIT_DEFAULT` / `SUBSTRATE_PAGE_LIMIT_MAX` | Page size for a remote query that names no `limit` (default 100), and the largest `limit` accepted (default 1000). |
|
|
146
|
+
| `SUBSTRATE_FILTER_WRITE_MAX_MATCH` / `SUBSTRATE_FILTER_WRITE_IDS_CAP` | `updateMany<Type>` / `deleteMany<Type>`: a filter matching more rows than the max is refused `filter_too_broad` (default 10000); the result lists at most the cap of ids (default 1000). |
|
|
143
147
|
| `SUBSTRATE_SWEEP_INTERVAL_MS` | Edge-sweep cadence (default 300000) |
|
|
144
148
|
| `SUBSTRATE_INDEX_DISK_PATH` | The database volume's mount, when the database is on this host: free space there is checked before each background index build. `off` skips the check. |
|
|
145
149
|
| `SUBSTRATE_INDEX_DISK_MARGIN_MB` | Free space a build must leave (default 2048; `0` requires only the estimate). |
|
|
@@ -156,6 +160,7 @@ Natural-language query and the recall embedder are not configured by environment
|
|
|
156
160
|
|
|
157
161
|
- [Getting started](https://github.com/mnmal-ai/substrate/blob/main/docs/getting-started.md)
|
|
158
162
|
- [Design spec](https://github.com/mnmal-ai/substrate/blob/main/docs/substrate-from-first-principles.md)
|
|
163
|
+
- [Operator decisions](https://github.com/mnmal-ai/substrate/blob/main/docs/operator-decisions.md)
|
|
159
164
|
- [Upgrading to per-type tables](https://github.com/mnmal-ai/substrate/blob/main/docs/upgrading-to-type-tables.md)
|
|
160
165
|
- [Plugin author guide](https://github.com/mnmal-ai/substrate/blob/main/docs/plugin-author-guide.md)
|
|
161
166
|
|
|
@@ -6,7 +6,7 @@ import { T as DEFAULT_FILTER_WRITE_LIMITS } from "./src-DWqzrm3O.js";
|
|
|
6
6
|
import { C as diagnose, S as DIAGNOSE_CHECKS, _ 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-CHND7-Pm.js";
|
|
7
7
|
import { _ as runDerivedMigrations, d as assertNotMigrating, g as pendingMigrations, m as deriveListIndexMigration, p as assertTablesLayout, t as PgDataset, v as runMigrations } from "./src-CSe2tJDf.js";
|
|
8
8
|
import { t as PgEdgesStore } from "./pg-edges-store-B4FSN9yp.js";
|
|
9
|
-
import { a as InMemoryLexicalStore, i as PgClusterStore, n as PgLexicalStore, o as InMemoryEmbeddingsStore, r as PgEmbeddingsStore, s as InMemoryClusterStore } from "./src-
|
|
9
|
+
import { a as InMemoryLexicalStore, i as PgClusterStore, n as PgLexicalStore, o as InMemoryEmbeddingsStore, r as PgEmbeddingsStore, s as InMemoryClusterStore } from "./src-BjWVYYoo.js";
|
|
10
10
|
import { et as memberKey } from "./plugin-BLm5IRdX.js";
|
|
11
11
|
import { existsSync, linkSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { homedir } from "node:os";
|
|
@@ -247,7 +247,7 @@ const USAGE = [
|
|
|
247
247
|
" rotate <kid> --out <path> [--encrypt] rotate a Key (new key to <path>)",
|
|
248
248
|
" register <kid> --pubkey <path> --ns <csv> register an existing ed25519 pubkey as an agent Key",
|
|
249
249
|
" update <kid> [--ns <csv>] ... change a live key's namespaces/caps/name in place",
|
|
250
|
-
" migrate-store [options] copy a store into a fresh, empty
|
|
250
|
+
" migrate-store [options] copy a store into a fresh, empty PG 18 store on per-type tables",
|
|
251
251
|
" promote-fields [--url <base>] run the promotion sweep now on a running server",
|
|
252
252
|
"",
|
|
253
253
|
" register transport: drives POST /substrate/v1/_system/keys (credential + directory row,",
|
|
@@ -1794,7 +1794,7 @@ async function closeQuietly(sql) {
|
|
|
1794
1794
|
|
|
1795
1795
|
//#endregion
|
|
1796
1796
|
//#region package.json
|
|
1797
|
-
var version = "1.0.0-alpha.
|
|
1797
|
+
var version = "1.0.0-alpha.13";
|
|
1798
1798
|
|
|
1799
1799
|
//#endregion
|
|
1800
1800
|
//#region src/plugin-manifest.ts
|
|
@@ -3528,7 +3528,7 @@ function parseInviteSweepIntervalMs(env, knobs) {
|
|
|
3528
3528
|
}
|
|
3529
3529
|
/**
|
|
3530
3530
|
* Parse `SUBSTRATE_TOMBSTONE_RETENTION_DAYS` — retention window before tombstoned
|
|
3531
|
-
*
|
|
3531
|
+
* type-table rows / `edges` are hard-deleted by the sweep loop. Default 30.
|
|
3532
3532
|
*/
|
|
3533
3533
|
function parseTombstoneRetentionDays(env, knobs) {
|
|
3534
3534
|
return parsePositiveIntEnv(env, knobs, "tombstoneRetentionDays", "SUBSTRATE_TOMBSTONE_RETENTION_DAYS", DEFAULT_TOMBSTONE_RETENTION_DAYS, "days");
|
|
@@ -3,11 +3,11 @@ import { Qt as validateHardDeleteEnv, _ as AUDIT_EVENT_TYPE, et as loadSweepStat
|
|
|
3
3
|
import { n as trimTrailingSlashes, s as makeAuthorizationProvider } from "./env-utils-CGNazUNt.js";
|
|
4
4
|
import { L as encodeList, T as SYSTEM_NAMESPACE, f as coversNamespace, m as grantedIn, p as grantOf } from "./src-Bi3NhEsT.js";
|
|
5
5
|
import "./src-DWqzrm3O.js";
|
|
6
|
-
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-
|
|
6
|
+
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-0BPtJ8ne.js";
|
|
7
7
|
import { 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-CHND7-Pm.js";
|
|
8
8
|
import { n as runScript, t as DEFAULT_MAX_WRITES } from "./script-C6DSa_Na.js";
|
|
9
9
|
import { w as tryWithPgAdvisoryLock } from "./src-CSe2tJDf.js";
|
|
10
|
-
import { n as PgLexicalStore, r as PgEmbeddingsStore } from "./src-
|
|
10
|
+
import { n as PgLexicalStore, r as PgEmbeddingsStore } from "./src-BjWVYYoo.js";
|
|
11
11
|
import { chmodSync, existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { homedir, hostname } from "node:os";
|
|
13
13
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -2159,7 +2159,7 @@ async function runInit(argv) {
|
|
|
2159
2159
|
return 1;
|
|
2160
2160
|
}
|
|
2161
2161
|
if (!config.yes) try {
|
|
2162
|
-
const { runRepl } = await import("./repl-
|
|
2162
|
+
const { runRepl } = await import("./repl-Dw2Fb7C1.js");
|
|
2163
2163
|
config = await runRepl(config);
|
|
2164
2164
|
} catch (err) {
|
|
2165
2165
|
if (err.message?.includes("User force closed")) return 130;
|
|
@@ -2841,12 +2841,13 @@ function createMcpServer(endpoint, options = {}) {
|
|
|
2841
2841
|
{
|
|
2842
2842
|
name: "ask",
|
|
2843
2843
|
config: {
|
|
2844
|
-
description: "Ask a natural-language question of one namespace. The parser answers first; a constrained judge handles what it escalates; a judge outage hands off honestly. Returns { outcome, trail }, where outcome.kind is rows | recall | clarify | refuse | unknown. unknown means part of the question was dropped and the answer would change which rows count; it carries dropped and the plan, and nothing ran. rows also carries dropped (what it does not reflect) and plan. Read-only. Requires the @mnmal-ai/substrate-nl plugin (404 otherwise).",
|
|
2844
|
+
description: "Ask a natural-language question of one namespace. The parser answers first; a constrained judge handles what it escalates; a judge outage hands off honestly. Returns { outcome, trail }, where outcome.kind is rows | recall | clarify | refuse | unknown. unknown means part of the question was dropped and the answer would change which rows count; it carries dropped and the plan, and nothing ran. rows also carries dropped (what it does not reflect) and plan. Relative dates are read against asOf when given, else the server clock; the parsed trail event says which. Read-only. Requires the @mnmal-ai/substrate-nl plugin (404 otherwise).",
|
|
2845
2845
|
inputSchema: {
|
|
2846
2846
|
namespace: z.string().min(1).describe("Namespace to ask, e.g. \"notes\"."),
|
|
2847
2847
|
question: z.string().min(1).describe("The question, e.g. \"open todos in billing\"."),
|
|
2848
2848
|
project: z.string().min(1).optional().describe("Asking project; scopes project-bearing types."),
|
|
2849
|
-
type: z.string().min(1).optional().describe("force the reading to this type (resubmit a clarify option)")
|
|
2849
|
+
type: z.string().min(1).optional().describe("force the reading to this type (resubmit a clarify option)"),
|
|
2850
|
+
asOf: z.string().min(1).optional().describe("\"now\" for relative dates (\"yesterday\", \"last week\") and month-day year inference: ISO-8601 date-time with an offset, e.g. 2026-10-02T12:00:00-05:00. Default: the server clock.")
|
|
2850
2851
|
}
|
|
2851
2852
|
},
|
|
2852
2853
|
handler: createNlHandler(endpoint)
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Mn as Row, W as QualifiedFrame, f as PackEnvelope, fn as ResolverStat, gn as SlowRequest, hn as RuntimeMetrics, m as Schema, mn as RuntimeErrors, pn as RuntimeErrorEntry, un as ProcessStat } from "./schema-oXfQyo0s.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, J as NlAskRequest, 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, Y as NlAskResult, _ as newlyGrantedPairs, a as denyAll, b as capabilitiesFor, c as requireIdentity, d as KeyUpdateRefusal, dt as NlTrailEvent, f as checkRevocable, g as newlyGranted, h as grantEntriesConfer, i as allowVerbs, it as NlOutcome, j as not, k as encodeList, l as requireNamespace, m as grantCovers, n as row, o as denyVerbs, p as checkUpdatable, pt as NlWireEvent, q as resolveDefaultKidPath, r as allowAll, s as requireCapability, t as applyRowFilters, u as KeyMutationRefusal, ut as NlServedPack, v as revokedAtIso, w as grantEntryError, x as encodeGrant, y as Grant, z as makeTokenProvider } from "./row-
|
|
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, J as NlAskRequest, 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, Y as NlAskResult, _ as newlyGrantedPairs, a as denyAll, b as capabilitiesFor, c as requireIdentity, d as KeyUpdateRefusal, dt as NlTrailEvent, f as checkRevocable, g as newlyGranted, h as grantEntriesConfer, i as allowVerbs, it as NlOutcome, j as not, k as encodeList, l as requireNamespace, m as grantCovers, n as row, o as denyVerbs, p as checkUpdatable, pt as NlWireEvent, q as resolveDefaultKidPath, r as allowAll, s as requireCapability, t as applyRowFilters, u as KeyMutationRefusal, ut as NlServedPack, v as revokedAtIso, w as grantEntryError, x as encodeGrant, y as Grant, z as makeTokenProvider } from "./row-Dtj3KrPH.js";
|
|
3
3
|
import { s as SchemaDriftError } from "./index-baF5A5jU.js";
|
|
4
4
|
import { Signal } from "@preact/signals-core";
|
|
5
5
|
//#region ../../packages/substrate-client/src/admin/surgery.d.ts
|
package/dist/recall.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __binCreateRequire } from 'node:module'; const require = __binCreateRequire(import.meta.url);
|
|
2
|
-
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-
|
|
2
|
+
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-BjWVYYoo.js";
|
|
3
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-BLm5IRdX.js";
|
|
4
4
|
|
|
5
5
|
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,5 @@
|
|
|
1
1
|
import { createRequire as __binCreateRequire } from 'node:module'; const require = __binCreateRequire(import.meta.url);
|
|
2
|
-
import { a as parsePositive, i as DEFAULT_SIZING, n as defaultPluginsForPersona, r as parsePort, t as KNOWN_PLUGINS } from "./cli-
|
|
2
|
+
import { a as parsePositive, i as DEFAULT_SIZING, n as defaultPluginsForPersona, r as parsePort, t as KNOWN_PLUGINS } from "./cli-BvQqNFVn.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { stripVTControlCharacters, styleText } from "node:util";
|
|
@@ -48,6 +48,11 @@ interface NlAskRequest {
|
|
|
48
48
|
project?: string;
|
|
49
49
|
/** Force the reading to this type; resubmit a clarify option's `type`. Must name a type of the namespace. */
|
|
50
50
|
type?: string;
|
|
51
|
+
/**
|
|
52
|
+
* "Now" for relative dates and month-day year inference: ISO-8601 date-time with an
|
|
53
|
+
* offset (`2026-10-02T12:00:00-05:00`). Ranges are in its offset. Defaults to the server clock.
|
|
54
|
+
*/
|
|
55
|
+
asOf?: string;
|
|
51
56
|
}
|
|
52
57
|
type NlParseStatus = 'resolved' | 'ambiguous' | 'partial' | 'clarify' | 'refuse' | 'unparsed';
|
|
53
58
|
interface NlEvidence {
|
|
@@ -131,6 +136,8 @@ interface NlParsedData {
|
|
|
131
136
|
evidence: NlEvidence[];
|
|
132
137
|
residual: string[];
|
|
133
138
|
reason?: string;
|
|
139
|
+
/** The clock the question was read against: the request's `asOf`, else the server's. */
|
|
140
|
+
asOf?: string;
|
|
134
141
|
}
|
|
135
142
|
type NlJudgedStatus = 'resolved' | 'recall' | 'clarify' | 'refuse' | 'escalated';
|
|
136
143
|
/**
|
|
@@ -3,7 +3,7 @@ import { _ as AUDIT_EVENT_TYPE, g as buildAuditRow } from "./src-C4t1Gy-m.js";
|
|
|
3
3
|
import { n as trimTrailingSlashes } from "./env-utils-CGNazUNt.js";
|
|
4
4
|
import { I as decodeList, L as encodeList, M as grantEntryError, g as checkUpdatable, h as checkRevocable, y as newlyGranted } from "./src-Bi3NhEsT.js";
|
|
5
5
|
import "./src-DWqzrm3O.js";
|
|
6
|
-
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-
|
|
6
|
+
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-0BPtJ8ne.js";
|
|
7
7
|
import { C as parseSourceBody, S as copyRows, b as UUID_REGEX, f as assertStoreSchema, h as isDerivedMigration, i as ensureTypeTable, l as MIGRATE_STORE_MARKER_TABLE, o as loadTypeTable, r as seqName, s as typeTableRef, u as PLAIN_SCHEMA_NAME, x as detectLayout, y as UUID_CHECK_MIGRATION } from "./src-CSe2tJDf.js";
|
|
8
8
|
import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { dirname } from "node:path";
|
package/dist/sdk.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { $ as VirtualMutationDef, $t as TypeIndexState, A as KernelLifecycleCont
|
|
|
2
2
|
import { i as BridgeFrame, n as BridgeCredential, r as BridgeCredentialStore, t as BridgeClient } from "./bridge-DQyQ6Qhn.js";
|
|
3
3
|
import { S as isRestrictViolation, _ as WALK_UNSUPPORTED_REF, a as NamespaceMismatch, b as isBatchElementError, c as ReservedField, d as UnsupportedFilterError, f as WALKS_IN_MUTATION, g as WALK_BUDGET_EXCEEDED, h as WALKS_UNSUPPORTED_STORE, i as MissingReferentError, l as ResolverFrameError, m as WALKS_NEED_PARTITIONED, n as BridgeUnreachableError, o as QUERY_TIMEOUT, p as WALKS_IN_SUBSCRIPTION, r as FILTER_TOO_BROAD, s as ROW_POLICY_BLOCKS_WALK, t as BatchElementError, u as RestrictViolation, v as filterTooBroad, x as isResolverFrameError, y as isAuthCause } from "./errors-xP9Mo7Q1.js";
|
|
4
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-Dx3A2B4U.js";
|
|
5
|
-
import { $ as NlJudgeChoice, A as and, B as SYSTEM_NAMESPACE, C as flattenGrant, D as parseGrantEntries, E as intersectGrants, F as TokenProviderOpts, G as resolveAdminCredential, H as isActiveAdminKeyRow, I as adminClaimCapabilities, J as NlAskRequest, K as resolveDefaultKeyPath, L as isEncryptedKey, M as or, N as ADMIN_CAPABILITIES, O as decodeList, P as DEFAULT_CAPABILITIES, Q as NlJudgeAction, R as makeAuthorizationProvider, S as expandFlat, T as grantIsUniform, U as AdminCredential, V as describeGrant, W as AdminEnv, X as NlEvidence, Y as NlAskResult, Z as NlFieldPhrase, _ as newlyGrantedPairs, _t as Query, a as denyAll, at as NlPackField, b as capabilitiesFor, c as requireIdentity, ct as NlParseStatus, d as KeyUpdateRefusal, dt as NlTrailEvent, et as NlJudgeStep, f as checkRevocable, ft as NlValueAlias, g as newlyGranted, gt as NLVocabularyHint, h as grantEntriesConfer, ht as NLResult, i as allowVerbs, it as NlOutcome, j as not, k as encodeList, l as requireNamespace, lt as NlParsedData, m as grantCovers, mt as NLBase, n as row, nt as NlNamespacePack, o as denyVerbs, ot as NlPackType, p as checkUpdatable, pt as NlWireEvent, q as resolveDefaultKidPath, r as allowAll, rt as NlNamespaceRulings, s as requireCapability, st as NlPackValueRef, t as applyRowFilters, tt as NlJudgedStatus, u as KeyMutationRefusal, ut as NlServedPack, v as revokedAtIso, w as grantEntryError, x as encodeGrant, y as Grant, z as makeTokenProvider } from "./row-
|
|
5
|
+
import { $ as NlJudgeChoice, A as and, B as SYSTEM_NAMESPACE, C as flattenGrant, D as parseGrantEntries, E as intersectGrants, F as TokenProviderOpts, G as resolveAdminCredential, H as isActiveAdminKeyRow, I as adminClaimCapabilities, J as NlAskRequest, K as resolveDefaultKeyPath, L as isEncryptedKey, M as or, N as ADMIN_CAPABILITIES, O as decodeList, P as DEFAULT_CAPABILITIES, Q as NlJudgeAction, R as makeAuthorizationProvider, S as expandFlat, T as grantIsUniform, U as AdminCredential, V as describeGrant, W as AdminEnv, X as NlEvidence, Y as NlAskResult, Z as NlFieldPhrase, _ as newlyGrantedPairs, _t as Query, a as denyAll, at as NlPackField, b as capabilitiesFor, c as requireIdentity, ct as NlParseStatus, d as KeyUpdateRefusal, dt as NlTrailEvent, et as NlJudgeStep, f as checkRevocable, ft as NlValueAlias, g as newlyGranted, gt as NLVocabularyHint, h as grantEntriesConfer, ht as NLResult, i as allowVerbs, it as NlOutcome, j as not, k as encodeList, l as requireNamespace, lt as NlParsedData, m as grantCovers, mt as NLBase, n as row, nt as NlNamespacePack, o as denyVerbs, ot as NlPackType, p as checkUpdatable, pt as NlWireEvent, q as resolveDefaultKidPath, r as allowAll, rt as NlNamespaceRulings, s as requireCapability, st as NlPackValueRef, t as applyRowFilters, tt as NlJudgedStatus, u as KeyMutationRefusal, ut as NlServedPack, v as revokedAtIso, w as grantEntryError, x as encodeGrant, y as Grant, z as makeTokenProvider } from "./row-Dtj3KrPH.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
|
|
@@ -3,7 +3,7 @@ import { a as guardedRefRead, c as whileNoTypeTable, n as txScopeIdFor, s as typ
|
|
|
3
3
|
import { B as ROW_FILTER_FIELD, V as matchesRowFilter, W as inFlightError, Y as unresolvedRow, Z as cosineSimilarity, et as memberKey } from "./plugin-BLm5IRdX.js";
|
|
4
4
|
|
|
5
5
|
//#region ../../plugins/substrate-recall/package.json
|
|
6
|
-
var version = "1.0.0-alpha.
|
|
6
|
+
var version = "1.0.0-alpha.13";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region ../../plugins/substrate-recall/src/in-memory-cluster-store.ts
|
package/dist/substrate-admin.js
CHANGED
|
@@ -37,7 +37,7 @@ function isEntrypointPath(moduleUrl, argv1) {
|
|
|
37
37
|
*/
|
|
38
38
|
if (isEntrypointPath(import.meta.url, process.argv[1])) {
|
|
39
39
|
assertNodeVersion();
|
|
40
|
-
import("./run-
|
|
40
|
+
import("./run-CgDw2c3X.js").then(({ runAdminCli }) => runAdminCli());
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
//#endregion
|
package/dist/substrate.js
CHANGED
|
@@ -4,7 +4,7 @@ import { t as assertNodeVersion } from "./node-version-C5FSmwJX.js";
|
|
|
4
4
|
|
|
5
5
|
//#region src/bin/substrate.ts
|
|
6
6
|
assertNodeVersion();
|
|
7
|
-
import("./cli-
|
|
7
|
+
import("./cli-BvQqNFVn.js").then(({ runCli }) => runCli(process.argv.slice(2))).then((code) => process.exit(code));
|
|
8
8
|
|
|
9
9
|
//#endregion
|
|
10
10
|
export { };
|
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.13",
|
|
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": {
|
|
@@ -36,24 +36,24 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@inquirer/prompts": "^8.7.2",
|
|
39
|
-
"@mnmal-ai/substrate-bootstrap": "1.0.0-alpha.
|
|
40
|
-
"@mnmal-ai/substrate-client": "1.0.0-alpha.
|
|
41
|
-
"@mnmal-ai/substrate-compose": "1.0.0-alpha.
|
|
42
|
-
"@mnmal-ai/substrate-config": "1.0.0-alpha.
|
|
43
|
-
"@mnmal-ai/substrate-core": "1.0.0-alpha.
|
|
44
|
-
"@mnmal-ai/substrate-dataset-memory": "1.0.0-alpha.
|
|
45
|
-
"@mnmal-ai/substrate-dataset-pg": "1.0.0-alpha.
|
|
46
|
-
"@mnmal-ai/substrate-embedder": "1.0.0-alpha.
|
|
47
|
-
"@mnmal-ai/substrate-filter": "1.0.0-alpha.
|
|
48
|
-
"@mnmal-ai/substrate-pack": "1.0.0-alpha.
|
|
49
|
-
"@mnmal-ai/substrate-policy": "1.0.0-alpha.
|
|
50
|
-
"@mnmal-ai/substrate-proposals": "1.0.0-alpha.
|
|
51
|
-
"@mnmal-ai/substrate-recall": "1.0.0-alpha.
|
|
52
|
-
"@mnmal-ai/substrate-sdk": "1.0.0-alpha.
|
|
53
|
-
"@mnmal-ai/substrate-sentinel-client": "1.0.0-alpha.
|
|
54
|
-
"@mnmal-ai/substrate-server-fastify": "1.0.0-alpha.
|
|
55
|
-
"@mnmal-ai/substrate-server-memory": "1.0.0-alpha.
|
|
56
|
-
"@mnmal-ai/substrate-types": "1.0.0-alpha.
|
|
39
|
+
"@mnmal-ai/substrate-bootstrap": "1.0.0-alpha.13",
|
|
40
|
+
"@mnmal-ai/substrate-client": "1.0.0-alpha.13",
|
|
41
|
+
"@mnmal-ai/substrate-compose": "1.0.0-alpha.13",
|
|
42
|
+
"@mnmal-ai/substrate-config": "1.0.0-alpha.13",
|
|
43
|
+
"@mnmal-ai/substrate-core": "1.0.0-alpha.13",
|
|
44
|
+
"@mnmal-ai/substrate-dataset-memory": "1.0.0-alpha.13",
|
|
45
|
+
"@mnmal-ai/substrate-dataset-pg": "1.0.0-alpha.13",
|
|
46
|
+
"@mnmal-ai/substrate-embedder": "1.0.0-alpha.13",
|
|
47
|
+
"@mnmal-ai/substrate-filter": "1.0.0-alpha.13",
|
|
48
|
+
"@mnmal-ai/substrate-pack": "1.0.0-alpha.13",
|
|
49
|
+
"@mnmal-ai/substrate-policy": "1.0.0-alpha.13",
|
|
50
|
+
"@mnmal-ai/substrate-proposals": "1.0.0-alpha.13",
|
|
51
|
+
"@mnmal-ai/substrate-recall": "1.0.0-alpha.13",
|
|
52
|
+
"@mnmal-ai/substrate-sdk": "1.0.0-alpha.13",
|
|
53
|
+
"@mnmal-ai/substrate-sentinel-client": "1.0.0-alpha.13",
|
|
54
|
+
"@mnmal-ai/substrate-server-fastify": "1.0.0-alpha.13",
|
|
55
|
+
"@mnmal-ai/substrate-server-memory": "1.0.0-alpha.13",
|
|
56
|
+
"@mnmal-ai/substrate-types": "1.0.0-alpha.13",
|
|
57
57
|
"@mnmal-ai/surface-core": "0.15.0",
|
|
58
58
|
"@types/node": "^26.6.4",
|
|
59
59
|
"@types/semver": "^7.5.0",
|