nimblebrain 0.5.0 → 0.6.0
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 +1 -1
- package/dist/nimblebrain.js +108 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ later.
|
|
|
36
36
|
`--json` makes every command answer one JSON object, `{"ok": true, ...}` or
|
|
37
37
|
`{"ok": false, "error": "<CODE>", "fix": "..."}`, for scripts and coding agents.
|
|
38
38
|
`--yes` takes every default. `--agent claude-code|cursor|codex|none` names the agent to
|
|
39
|
-
connect. `npx nimblebrain help --json` lists every command, flag and error code.
|
|
39
|
+
connect. `npx nimblebrain help --json` lists every command with the fields it answers, every flag and every error code.
|
|
40
40
|
|
|
41
41
|
When a newer CLI or NimbleBrain release exists, the CLI says so on stderr after its
|
|
42
42
|
answer (once a day at most; it never updates anything itself).
|
package/dist/nimblebrain.js
CHANGED
|
@@ -519,7 +519,7 @@ var FLAG_SPECS = {
|
|
|
519
519
|
provider: {
|
|
520
520
|
type: "string",
|
|
521
521
|
takes: "name",
|
|
522
|
-
description: "The model provider for key (default anthropic)",
|
|
522
|
+
description: "The model provider for key (default anthropic); the installed release decides which it takes, and key lists them",
|
|
523
523
|
commands: ["key"]
|
|
524
524
|
},
|
|
525
525
|
"local-model": {
|
|
@@ -560,7 +560,7 @@ var FLAG_SPECS = {
|
|
|
560
560
|
help: {
|
|
561
561
|
type: "boolean",
|
|
562
562
|
short: "h",
|
|
563
|
-
description: "The commands and flags; with --json, these and every error code as JSON"
|
|
563
|
+
description: "The commands and flags; with --json, these, each command's answer and every error code as JSON"
|
|
564
564
|
},
|
|
565
565
|
version: { type: "boolean", short: "v", description: "This CLI's version" }
|
|
566
566
|
};
|
|
@@ -861,23 +861,112 @@ function gib(bytes) {
|
|
|
861
861
|
return `${(bytes / 1024 ** 3).toFixed(1)} GB`;
|
|
862
862
|
}
|
|
863
863
|
|
|
864
|
+
// src/answers.ts
|
|
865
|
+
var STATE = {
|
|
866
|
+
version: "The NimbleBrain runtime release installed, without the leading v",
|
|
867
|
+
cli_version: "This CLI's version; it moves independently of the runtime",
|
|
868
|
+
health: "ok when NimbleBrain answers, else down",
|
|
869
|
+
url: "Where the web UI and API answer, on 127.0.0.1",
|
|
870
|
+
workspaces: "Each workspace as {id, name, mcp}, mcp being its MCP URL; empty while down",
|
|
871
|
+
agent: "{connected, skill}: the coding agent init connected (or null), and the nimblebrain skill's name when that agent has it (else null)",
|
|
872
|
+
model_key: "set or missing: whether the install's .env holds a model key (never the key)",
|
|
873
|
+
host_loopback: "Whether this release can reach a server on this machine; mcp add needs it, update brings it",
|
|
874
|
+
local_model: "The Ollama model NimbleBrain's agents run on, or null for a hosted model key",
|
|
875
|
+
telemetry: "{state, locked?, ask?, set?}: on, off or undecided; locked says why no one can change it here; ask and set, only while undecided, are the question to pass to the person and the command that answers it",
|
|
876
|
+
updates: "{cli?, runtime?}, each {current, latest}: what the last cached lookup found; absent when nothing is known or the check is off"
|
|
877
|
+
};
|
|
878
|
+
var OLLAMA_STARTED = "The command that started Ollama, when this run started it";
|
|
879
|
+
var ANSWER_FIELDS = {
|
|
880
|
+
init: {
|
|
881
|
+
...STATE,
|
|
882
|
+
already: "true when an install was already here; it was reported, not changed",
|
|
883
|
+
manual: "The settings to add to the coding agent by hand, when connecting it failed",
|
|
884
|
+
opened: "Whether the browser opened, when init tried (a new install, a person at a terminal)",
|
|
885
|
+
ollama_started: OLLAMA_STARTED
|
|
886
|
+
},
|
|
887
|
+
doctor: {
|
|
888
|
+
checks: "Each check run, in order, as {check, ok, detail}",
|
|
889
|
+
arch: "The CPU architecture Docker reports",
|
|
890
|
+
ollama_started: `${OLLAMA_STARTED}; on a local model only`
|
|
891
|
+
},
|
|
892
|
+
status: STATE,
|
|
893
|
+
open: {
|
|
894
|
+
url: "The web UI's URL, to open by hand when opened is false",
|
|
895
|
+
opened: "Whether a browser was started"
|
|
896
|
+
},
|
|
897
|
+
key: {
|
|
898
|
+
provider: "The provider the key was entered for",
|
|
899
|
+
model_key: "set"
|
|
900
|
+
},
|
|
901
|
+
"local-model": {
|
|
902
|
+
local_model: "The model NimbleBrain's agents now run on (nimblebrain-<model>)",
|
|
903
|
+
ollama_started: OLLAMA_STARTED
|
|
904
|
+
},
|
|
905
|
+
telemetry: { telemetry: STATE.telemetry },
|
|
906
|
+
up: { ...STATE, ollama_started: OLLAMA_STARTED },
|
|
907
|
+
down: { health: "down" },
|
|
908
|
+
logs: { lines: "The runtime's last log lines, up to 100" },
|
|
909
|
+
update: {
|
|
910
|
+
...STATE,
|
|
911
|
+
already: "true when the install was already on that release",
|
|
912
|
+
from: "The release moved from, as vX.Y.Z, when it moved",
|
|
913
|
+
skill_update: "What happened to the connected agent's nimblebrain skill: updated, unchanged, not_installed or failed; absent with no agent"
|
|
914
|
+
},
|
|
915
|
+
uninstall: { removed: "true" },
|
|
916
|
+
"mcp add": {
|
|
917
|
+
serverName: "The name the server was added under",
|
|
918
|
+
url: "The URL as given",
|
|
919
|
+
dialed: "Where NimbleBrain, inside Docker, connects to it",
|
|
920
|
+
placements: "Where the server's UI appears, from its Server Card",
|
|
921
|
+
wsId: "The workspace it was added to",
|
|
922
|
+
warning: "Why the server is not connected yet (it was added anyway), when it is not",
|
|
923
|
+
notice: "Anything else NimbleBrain says about the server, when it says something"
|
|
924
|
+
},
|
|
925
|
+
"mcp list": {
|
|
926
|
+
wsId: "The workspace listed",
|
|
927
|
+
servers: "Each server as {serverName, displayName?, url?, state?, status?, statusReason?, toolCount?}"
|
|
928
|
+
},
|
|
929
|
+
"mcp remove": {
|
|
930
|
+
serverName: "The server removed",
|
|
931
|
+
wsId: "The workspace it was removed from"
|
|
932
|
+
},
|
|
933
|
+
help: {
|
|
934
|
+
cli_version: "This CLI's version",
|
|
935
|
+
commands: "Each command as {name, args, description, answer}",
|
|
936
|
+
flags: "Each flag as {name, short?, takes, description, commands?}",
|
|
937
|
+
errors: "Each error code as {code, fix, exit}"
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
|
|
864
941
|
// src/help.ts
|
|
865
942
|
var HELP_COMMAND = {
|
|
866
943
|
name: "help",
|
|
867
944
|
args: [],
|
|
868
|
-
description: "These commands and flags; with --json, these and every error code as JSON"
|
|
945
|
+
description: "These commands and flags; with --json, these, each command's answer and every error code as JSON",
|
|
946
|
+
answer: { ...ANSWER_FIELDS.help }
|
|
869
947
|
};
|
|
870
948
|
function commands() {
|
|
871
949
|
const list = Object.keys(COMMAND_SPECS).flatMap((name) => {
|
|
872
950
|
if (name === "mcp") {
|
|
873
|
-
return Object.
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
951
|
+
return Object.keys(MCP_SUBCOMMANDS).map((sub) => {
|
|
952
|
+
const spec = MCP_SUBCOMMANDS[sub];
|
|
953
|
+
return {
|
|
954
|
+
name: `mcp ${sub}`,
|
|
955
|
+
args: spec.operand ? [`<${spec.operand}>`] : [],
|
|
956
|
+
description: spec.description,
|
|
957
|
+
answer: { ...ANSWER_FIELDS[`mcp ${sub}`] }
|
|
958
|
+
};
|
|
959
|
+
});
|
|
878
960
|
}
|
|
879
961
|
const spec = COMMAND_SPECS[name];
|
|
880
|
-
return [
|
|
962
|
+
return [
|
|
963
|
+
{
|
|
964
|
+
name,
|
|
965
|
+
args: [...spec.args],
|
|
966
|
+
description: spec.description,
|
|
967
|
+
answer: { ...ANSWER_FIELDS[name] }
|
|
968
|
+
}
|
|
969
|
+
];
|
|
881
970
|
});
|
|
882
971
|
return [...list, HELP_COMMAND];
|
|
883
972
|
}
|
|
@@ -903,7 +992,13 @@ function errors() {
|
|
|
903
992
|
}));
|
|
904
993
|
}
|
|
905
994
|
function describe(version) {
|
|
906
|
-
return {
|
|
995
|
+
return {
|
|
996
|
+
ok: true,
|
|
997
|
+
cli_version: version,
|
|
998
|
+
commands: commands(),
|
|
999
|
+
flags: flags(),
|
|
1000
|
+
errors: errors()
|
|
1001
|
+
};
|
|
907
1002
|
}
|
|
908
1003
|
function helpText(version) {
|
|
909
1004
|
const cmds = commands().map((c) => [[c.name, ...c.args].join(" "), c.description]);
|
|
@@ -924,7 +1019,7 @@ function helpText(version) {
|
|
|
924
1019
|
"Flags:",
|
|
925
1020
|
...fls.map(row),
|
|
926
1021
|
"",
|
|
927
|
-
"
|
|
1022
|
+
"What each command answers, and every error code and its fix: npx nimblebrain help --json",
|
|
928
1023
|
""
|
|
929
1024
|
].join(`
|
|
930
1025
|
`);
|
|
@@ -1183,7 +1278,7 @@ async function setRuntimeTelemetry(deps, url, consent) {
|
|
|
1183
1278
|
// package.json
|
|
1184
1279
|
var package_default = {
|
|
1185
1280
|
name: "nimblebrain",
|
|
1186
|
-
version: "0.
|
|
1281
|
+
version: "0.6.0",
|
|
1187
1282
|
description: "Install, run and connect NimbleBrain, the open-source runtime for agents and MCP apps, on this machine.",
|
|
1188
1283
|
license: "Apache-2.0",
|
|
1189
1284
|
type: "module",
|
|
@@ -1396,7 +1491,7 @@ async function openWhenDone(ctx, result) {
|
|
|
1396
1491
|
const { deps, flags } = ctx;
|
|
1397
1492
|
if (!deps.interactive || flags.json || flags.noOpen)
|
|
1398
1493
|
return result;
|
|
1399
|
-
if (result.health !== "ok"
|
|
1494
|
+
if (result.health !== "ok")
|
|
1400
1495
|
return result;
|
|
1401
1496
|
return { ...result, opened: await openBrowser(deps, result.url) };
|
|
1402
1497
|
}
|
package/package.json
CHANGED