@learnrudi/cli 1.9.5 → 1.9.7

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/index.cjs +24 -10
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -4169,6 +4169,28 @@ function getVersion2(binaryPath, versionFlag = "--version") {
4169
4169
  return null;
4170
4170
  }
4171
4171
  }
4172
+ function detectKindFromFilesystem(name) {
4173
+ const agentPath = import_path8.default.join(import_core13.PATHS.agents, name, "node_modules", ".bin", name);
4174
+ if (import_fs11.default.existsSync(agentPath)) return "agent";
4175
+ const runtimePath = import_path8.default.join(import_core13.PATHS.runtimes, name, "bin", name);
4176
+ if (import_fs11.default.existsSync(runtimePath)) return "runtime";
4177
+ const binaryPath = import_path8.default.join(import_core13.PATHS.binaries, name, name);
4178
+ const binaryPath2 = import_path8.default.join(import_core13.PATHS.binaries, name);
4179
+ if (import_fs11.default.existsSync(binaryPath) || import_fs11.default.existsSync(binaryPath2)) return "binary";
4180
+ const stackPath = import_path8.default.join(import_core13.PATHS.stacks, name);
4181
+ if (import_fs11.default.existsSync(stackPath)) return "stack";
4182
+ try {
4183
+ const globalPath = (0, import_child_process8.execSync)(`which ${name} 2>/dev/null`, { encoding: "utf-8" }).trim();
4184
+ if (globalPath) {
4185
+ if (globalPath.includes("/node") || globalPath.includes("/python") || globalPath.includes("/deno") || globalPath.includes("/bun")) {
4186
+ return "runtime";
4187
+ }
4188
+ return "binary";
4189
+ }
4190
+ } catch {
4191
+ }
4192
+ return "stack";
4193
+ }
4172
4194
  async function cmdCheck(args, flags) {
4173
4195
  const packageId = args[0];
4174
4196
  if (!packageId) {
@@ -4184,16 +4206,8 @@ async function cmdCheck(args, flags) {
4184
4206
  if (packageId.includes(":")) {
4185
4207
  [kind, name] = packageId.split(":");
4186
4208
  } else {
4187
- if (["claude", "codex", "gemini", "copilot"].includes(packageId)) {
4188
- kind = "agent";
4189
- name = packageId;
4190
- } else if (["node", "python", "deno", "bun"].includes(packageId)) {
4191
- kind = "runtime";
4192
- name = packageId;
4193
- } else {
4194
- kind = "stack";
4195
- name = packageId;
4196
- }
4209
+ name = packageId;
4210
+ kind = detectKindFromFilesystem(name);
4197
4211
  }
4198
4212
  const result = {
4199
4213
  id: `${kind}:${name}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@learnrudi/cli",
3
- "version": "1.9.5",
3
+ "version": "1.9.7",
4
4
  "description": "RUDI CLI - Install and manage MCP stacks, runtimes, and AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",