@mnmal-ai/substrate-tui 1.0.0-alpha.6 → 1.0.0-alpha.8
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @mnmal-ai/substrate-tui
|
|
2
2
|
|
|
3
|
-
A terminal UI for Substrate: ask questions in natural language, browse the federated schema, watch service status and metrics, and, with an unlocked admin identity, run admin operations. Install it with `pnpm add -g @mnmal-ai/substrate-tui`, then run `substrate-tui` in an interactive terminal with `SUBSTRATE_URL` set.
|
|
3
|
+
A terminal UI for Substrate: ask questions in natural language, browse the federated schema, watch service status and metrics, and, with an unlocked admin identity, run admin operations. Install it with `pnpm add -g @mnmal-ai/substrate-tui@next`, then run `substrate-tui` in an interactive terminal with `SUBSTRATE_URL` set.
|
|
4
4
|
|
|
5
5
|
Without an admin identity it is read-only.
|
|
6
6
|
|
|
@@ -25,7 +25,7 @@ Without an admin identity it is read-only.
|
|
|
25
25
|
|
|
26
26
|
## Status row
|
|
27
27
|
|
|
28
|
-
`● LIVE`, `● OFFLINE` or `● RECONNECTING` (polled from `/health` every 10 s), the service version, the agent kid (`anon` when unauthenticated, `anon?` when whoami fails) and the active namespace.
|
|
28
|
+
`● LIVE`, `● OFFLINE` or `● RECONNECTING` (polled from `/health` every 10 s), the service version, the agent kid (key id; `anon` when unauthenticated, `anon?` when whoami fails) and the active namespace.
|
|
29
29
|
|
|
30
30
|
## Environment
|
|
31
31
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { i as isKeyRejection, t as adminCapabilityOf } from "./session-C1D5Ermr.js";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
|
-
import { AdminBackfillError, AuthError, CURRENT_MARK, NetworkError, STEP_MARKS, adminClaimCapabilities, capabilitiesFor, checkRevocable, checkUpdatable, currentStep, decodeList, describeGrant, diagnose, encodeGrant, flattenGrant, grantEntriesConfer, isActiveAdminKeyRow, isEncryptedKey, makeTokenProvider, parseGrantEntries, planOnboarding, resolveAdminCredential } from "@mnmal-ai/substrate/client";
|
|
4
|
+
import { AdminBackfillError, AuthError, CURRENT_MARK, NetworkError, STEP_MARKS, adminClaimCapabilities, capabilitiesFor, checkRevocable, checkUpdatable, currentStep, decodeList, describeGrant, diagnose, encodeGrant, flattenGrant, grantEntriesConfer, isActiveAdminKeyRow, isEncryptedKey, makeTokenProvider, parseGrantEntries, planOnboarding, resolveAdminCredential, tokenAudience } from "@mnmal-ai/substrate/client";
|
|
5
5
|
import { createApp, defineModule, sanitise } from "@mnmal-ai/surface-core";
|
|
6
6
|
import { marathon } from "@mnmal-ai/surface-theme";
|
|
7
7
|
import { complete } from "@mnmal-ai/substrate-nl/complete";
|
|
@@ -76,6 +76,7 @@ function adminModule(deps, io = {}) {
|
|
|
76
76
|
kid
|
|
77
77
|
}, {
|
|
78
78
|
capabilities: adminClaimCapabilities(deps.adminEnv),
|
|
79
|
+
audience: tokenAudience(deps.endpoint),
|
|
79
80
|
...passphrase !== void 0 ? { passphrase } : {}
|
|
80
81
|
});
|
|
81
82
|
return verifyAndUnlock(() => `Bearer ${getToken()}`, keyPath, kid, getToken);
|
|
@@ -3687,6 +3688,7 @@ function substrateAppOptions(deps, opts = {}) {
|
|
|
3687
3688
|
defaultTurn: "substrate.ask:ask",
|
|
3688
3689
|
band: true,
|
|
3689
3690
|
gutter: 2,
|
|
3691
|
+
anchored: true,
|
|
3690
3692
|
terminal: false
|
|
3691
3693
|
};
|
|
3692
3694
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { t as colorDepthEnv } from "../terminal-XfKFiD7r.js";
|
|
3
3
|
import { basename } from "node:path";
|
|
4
|
-
import { DEFAULT_CAPABILITIES, makeTokenProvider } from "@mnmal-ai/substrate/client";
|
|
4
|
+
import { DEFAULT_CAPABILITIES, makeTokenProvider, tokenAudience } from "@mnmal-ai/substrate/client";
|
|
5
5
|
import { trimTrailingSlashes } from "@mnmal-ai/substrate/sdk";
|
|
6
6
|
|
|
7
7
|
//#region src/config.ts
|
|
@@ -20,7 +20,10 @@ function readConfig(env, cwd) {
|
|
|
20
20
|
token = makeTokenProvider({
|
|
21
21
|
keyPath,
|
|
22
22
|
kid
|
|
23
|
-
}, {
|
|
23
|
+
}, {
|
|
24
|
+
capabilities: raw !== void 0 && raw.length > 0 ? raw : DEFAULT_CAPABILITIES,
|
|
25
|
+
audience: tokenAudience(endpoint)
|
|
26
|
+
});
|
|
24
27
|
} catch (err) {
|
|
25
28
|
return { error: `agent identity: ${message(err)}` };
|
|
26
29
|
}
|
|
@@ -48,7 +51,7 @@ async function main() {
|
|
|
48
51
|
}
|
|
49
52
|
Object.assign(process.env, colorDepthEnv(process.env));
|
|
50
53
|
const [{ createTui }, { makeDeps }, { prepareTerminal }, { terminalOptions }] = await Promise.all([
|
|
51
|
-
import("../app-
|
|
54
|
+
import("../app-D0ccrk1L.js"),
|
|
52
55
|
import("../deps-WzqsHHiC.js"),
|
|
53
56
|
import("@mnmal-ai/surface-core/pure"),
|
|
54
57
|
import("../terminal-CVX2CKWu.js")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mnmal-ai/substrate-tui",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.8",
|
|
4
4
|
"description": "Terminal UI for Substrate: ask in natural language, browse the schema, see the service status.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
12
|
"bin": {
|
|
13
|
-
"substrate-tui": "dist/bin/tui.js"
|
|
13
|
+
"substrate-tui": "dist/bin/substrate-tui.js"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@mnmal-ai/substrate": "1.0.0-alpha.
|
|
24
|
-
"@mnmal-ai/substrate-nl": "1.0.0-alpha.
|
|
25
|
-
"@mnmal-ai/surface-core": "0.14.
|
|
26
|
-
"@mnmal-ai/surface-kit": "0.14.
|
|
27
|
-
"@mnmal-ai/surface-theme": "0.14.
|
|
23
|
+
"@mnmal-ai/substrate": "1.0.0-alpha.8",
|
|
24
|
+
"@mnmal-ai/substrate-nl": "1.0.0-alpha.8",
|
|
25
|
+
"@mnmal-ai/surface-core": "0.14.6",
|
|
26
|
+
"@mnmal-ai/surface-kit": "0.14.6",
|
|
27
|
+
"@mnmal-ai/surface-theme": "0.14.6",
|
|
28
28
|
"ink": "^7.1.1",
|
|
29
29
|
"react": "^19.3.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@biomejs/biome": "
|
|
33
|
-
"@mnmal-ai/substrate-config": "1.0.0-alpha.
|
|
32
|
+
"@biomejs/biome": "2.6.2",
|
|
33
|
+
"@mnmal-ai/substrate-config": "1.0.0-alpha.8",
|
|
34
34
|
"@types/node": "^26.6.4",
|
|
35
35
|
"@types/react": "^19.2.0",
|
|
36
36
|
"ink-testing-library": "^4.0.0",
|