nimblebrain 0.1.1 → 0.1.2

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.
@@ -426,20 +426,35 @@ function manualSettings(agent, mcpUrl) {
426
426
  }
427
427
  async function installSkill(deps, agent) {
428
428
  if (agent === "none")
429
- return null;
430
- const res = await deps.exec("npx", [
429
+ return;
430
+ await deps.exec("npx", [
431
431
  "-y",
432
432
  "skills",
433
433
  "add",
434
434
  "nimblebraininc/skills",
435
435
  "--skill",
436
- "nimblebrain",
436
+ SKILL_NAME,
437
437
  "--agent",
438
438
  agent,
439
439
  "-g",
440
440
  "-y"
441
441
  ], { timeoutMs: 120000 });
442
- return res.code === 0 ? "nimblebrain" : null;
442
+ }
443
+ var SKILL_NAME = "nimblebrain";
444
+ function globalSkillsDir(deps, agent) {
445
+ if (agent === "claude-code")
446
+ return join2(deps.env.CLAUDE_CONFIG_DIR?.trim() || join2(deps.home, ".claude"), "skills");
447
+ if (agent === "codex")
448
+ return join2(deps.home, ".agents", "skills");
449
+ if (agent === "cursor")
450
+ return join2(deps.home, ".cursor", "skills");
451
+ return;
452
+ }
453
+ async function skillInstalled(deps, agent) {
454
+ const dir = globalSkillsDir(deps, agent);
455
+ if (!dir)
456
+ return null;
457
+ return await deps.readText(join2(dir, SKILL_NAME, "SKILL.md")) === undefined ? null : SKILL_NAME;
443
458
  }
444
459
 
445
460
  // src/compose.ts
@@ -763,7 +778,7 @@ async function setRuntimeTelemetry(deps, url, consent) {
763
778
  // package.json
764
779
  var package_default = {
765
780
  name: "nimblebrain",
766
- version: "0.1.1",
781
+ version: "0.1.2",
767
782
  description: "Install, run and connect NimbleBrain, the open-source runtime for agents and MCP apps, on this machine.",
768
783
  license: "Apache-2.0",
769
784
  type: "module",
@@ -822,7 +837,10 @@ async function status(deps, home) {
822
837
  health: up ? "ok" : "down",
823
838
  url,
824
839
  workspaces,
825
- agent: { connected: install.agent ?? null, skill: install.skill ?? null },
840
+ agent: {
841
+ connected: install.agent ?? null,
842
+ skill: install.agent ? await skillInstalled(deps, install.agent) : null
843
+ },
826
844
  model_key: modelKey,
827
845
  telemetry: await currentTelemetry(deps, home, url)
828
846
  };
@@ -930,7 +948,7 @@ async function connectChosenAgent(ctx, state) {
930
948
  const conn = await connectAgent(deps, agent, first.mcp);
931
949
  if (conn.connected) {
932
950
  state.agent = conn.connected;
933
- state.skill = await installSkill(deps, conn.connected) ?? undefined;
951
+ await installSkill(deps, conn.connected);
934
952
  await writeState(deps, home, state);
935
953
  }
936
954
  return conn.manual;
@@ -1230,7 +1248,7 @@ function statusLines(r, command) {
1230
1248
  const name = AGENT_NAMES[agent] ?? agent;
1231
1249
  lines.push(` ${name} can use NimbleBrain's tools (it loads them when its next session starts)`);
1232
1250
  if (!r.agent.skill)
1233
- lines.push(` skill: not installed; add it with npx skills add nimblebraininc/skills --skill nimblebrain`);
1251
+ lines.push(` skill: not installed; add it with npx skills add nimblebraininc/skills --skill nimblebrain --agent ${agent} -g`);
1234
1252
  } else if (r.manual) {
1235
1253
  lines.push(` agent: not connected; add it by hand: ${r.manual}`);
1236
1254
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nimblebrain",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Install, run and connect NimbleBrain, the open-source runtime for agents and MCP apps, on this machine.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",