@dnai/dynamicllm 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/dist/setup.js +21 -6
  2. package/package.json +1 -1
package/dist/setup.js CHANGED
@@ -32,8 +32,7 @@ function getMcpJson(networkDir) {
32
32
  return {
33
33
  mcpServers: {
34
34
  dynamicllm: {
35
- command: "npx",
36
- args: ["-y", "dynamicllm"],
35
+ command: "dynamicllm",
37
36
  env: {
38
37
  DYNAMICLLM_NETWORK_DIR: networkDir,
39
38
  },
@@ -69,13 +68,13 @@ async function registerAgent(agent, networkDir, rl) {
69
68
  case "claude": {
70
69
  const { execSync } = await import("node:child_process");
71
70
  try {
72
- execSync(`claude mcp add dynamicllm -e DYNAMICLLM_NETWORK_DIR="${networkDir}" -- npx -y dynamicllm`, { stdio: "inherit" });
73
- console.log(" Registered with Claude Code.");
71
+ execSync(`claude mcp add --scope user dynamicllm -e DYNAMICLLM_NETWORK_DIR="${networkDir}" -- dynamicllm`, { stdio: "inherit" });
72
+ console.log(" Registered with Claude Code (user-level).");
74
73
  }
75
74
  catch {
76
75
  console.log(" Could not auto-register with Claude Code.");
77
76
  console.log(" Run manually:");
78
- console.log(` claude mcp add dynamicllm -e DYNAMICLLM_NETWORK_DIR="${networkDir}" -- npx -y dynamicllm`);
77
+ console.log(` claude mcp add --scope user dynamicllm -e DYNAMICLLM_NETWORK_DIR="${networkDir}" -- dynamicllm`);
79
78
  }
80
79
  break;
81
80
  }
@@ -128,10 +127,26 @@ export async function setup() {
128
127
  console.log(" DynamicLLM Setup");
129
128
  console.log(" ───────────────");
130
129
  console.log("");
130
+ // Ensure global install so `dynamicllm` command is available
131
+ const { execSync } = await import("node:child_process");
132
+ try {
133
+ execSync("which dynamicllm", { stdio: "ignore" });
134
+ }
135
+ catch {
136
+ console.log(" Installing DynamicLLM globally...");
137
+ try {
138
+ execSync("npm install -g @dnai/dynamicllm", { stdio: "inherit" });
139
+ console.log("");
140
+ }
141
+ catch {
142
+ console.log(" Warning: Could not install globally. Run: npm install -g @dnai/dynamicllm");
143
+ console.log("");
144
+ }
145
+ }
131
146
  // 1. Network directory
132
147
  const defaultDir = existing?.networkDir ?? DEFAULT_NETWORK_DIR;
133
148
  const dirAnswer = await rl.question(` Network directory [${defaultDir}]: `);
134
- const networkDir = dirAnswer.trim() || defaultDir;
149
+ const networkDir = dirAnswer.trim().replace(/^['"]|['"]$/g, "") || defaultDir;
135
150
  if (!existsSync(networkDir)) {
136
151
  const create = await rl.question(` Directory doesn't exist. Create it? [Y/n]: `);
137
152
  if (create.trim().toLowerCase() !== "n") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnai/dynamicllm",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "DynamicLLM — perspective engine for general intelligence. MCP server providing lens analysis, quality cultivation, and virus scan diagnostics.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",