nimblebrain 0.2.0 → 0.2.1

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.
@@ -389,6 +389,10 @@ function setEnvLines(text, values) {
389
389
  `)}
390
390
  `;
391
391
  }
392
+ function keyProvider(envText, composeText) {
393
+ const set = Object.entries(providers(composeText)).find(([, v]) => hasKey(envText, [v]));
394
+ return set ? set[0] : null;
395
+ }
392
396
  function hasKey(envText, vars) {
393
397
  return vars.some((v) => new RegExp(`^${v}=\\S`, "m").test(envText));
394
398
  }
@@ -884,7 +888,7 @@ async function setRuntimeTelemetry(deps, url, consent) {
884
888
  // package.json
885
889
  var package_default = {
886
890
  name: "nimblebrain",
887
- version: "0.2.0",
891
+ version: "0.2.1",
888
892
  description: "Install, run and connect NimbleBrain, the open-source runtime for agents and MCP apps, on this machine.",
889
893
  license: "Apache-2.0",
890
894
  type: "module",
@@ -1031,9 +1035,12 @@ async function install(ctx, answer, rec, begun) {
1031
1035
  if (state.agent)
1032
1036
  rec.record("cli.agent_connected", { agent: state.agent });
1033
1037
  const result = { ...await status(deps, home), manual };
1038
+ const finalEnv = await deps.readText(paths(home).env) ?? "";
1034
1039
  rec.record("cli.init_completed", {
1035
1040
  duration_ms: Date.now() - begun,
1036
- model_key: result.model_key
1041
+ model_key: result.model_key,
1042
+ provider: localModelOf(finalEnv) ? "ollama" : keyProvider(finalEnv, composeText),
1043
+ agent: state.agent ?? null
1037
1044
  });
1038
1045
  await rec.settle(home, consent);
1039
1046
  if (result.model_key === "missing" && !result.local_model) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nimblebrain",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
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",