@agentvalet/register 0.3.7 → 0.3.8

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.js +13 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -873,6 +873,7 @@ async function writeIdeConfigs(params) {
873
873
 
874
874
  // src/config/frameworks.ts
875
875
  import { existsSync as existsSync5 } from "fs";
876
+ import { execSync as execSync2 } from "child_process";
876
877
  import os2 from "os";
877
878
  import path5 from "path";
878
879
  import prompts2 from "prompts";
@@ -890,11 +891,21 @@ function cursorInstalled() {
890
891
  }
891
892
  return existsSync5(path5.join(home, ".config", "Cursor")) || existsSync5("/usr/share/applications/cursor.desktop");
892
893
  }
894
+ function claudeCodeInstalled() {
895
+ const home = os2.homedir();
896
+ if (existsSync5(path5.join(home, ".claude"))) return true;
897
+ try {
898
+ execSync2("claude --version", { stdio: "ignore", timeout: 3e3 });
899
+ return true;
900
+ } catch {
901
+ return false;
902
+ }
903
+ }
893
904
  function detectFrameworks() {
894
905
  const home = os2.homedir();
895
906
  return {
896
907
  codex: existsSync5(path5.join(home, ".codex", "config.toml")),
897
- claudeCode: existsSync5(path5.join(home, ".claude")),
908
+ claudeCode: claudeCodeInstalled(),
898
909
  cursor: existsSync5(path5.join(process.cwd(), ".cursor")) || cursorInstalled(),
899
910
  openclaw: existsSync5(path5.join(home, ".openclaw"))
900
911
  };
@@ -1188,7 +1199,7 @@ function collectScope(value, previous) {
1188
1199
  return [...previous, value];
1189
1200
  }
1190
1201
  var program = new Command();
1191
- program.name("agentvalet-register").description("Self-register an AI agent with AgentValet").version("0.3.7").option("--owner <uuid>", "Owner ID (or set AGENTVALET_OWNER env var)").option("--name <name>", "Agent name").option("--description <desc>", "Agent description").option("--scope <platform:scope>", "Requested scope, repeatable", collectScope, []).option("--api-url <url>", "AgentValet API base URL", "https://api.agentvalet.ai").option("--output <path>", "Path to write .env file", "./.env.agentvalet").option("--key-path <path>", "Path to write private key", "./agentvalet.key").option("--json", "Machine-readable JSON output").option("--no-wait", "Register only, do not wait for approval").option("--timeout <seconds>", "Approval wait timeout in seconds", "300").action(async (opts) => {
1202
+ program.name("agentvalet-register").description("Self-register an AI agent with AgentValet").version("0.3.8").option("--owner <uuid>", "Owner ID (or set AGENTVALET_OWNER env var)").option("--name <name>", "Agent name").option("--description <desc>", "Agent description").option("--scope <platform:scope>", "Requested scope, repeatable", collectScope, []).option("--api-url <url>", "AgentValet API base URL", "https://api.agentvalet.ai").option("--output <path>", "Path to write .env file", "./.env.agentvalet").option("--key-path <path>", "Path to write private key", "./agentvalet.key").option("--json", "Machine-readable JSON output").option("--no-wait", "Register only, do not wait for approval").option("--timeout <seconds>", "Approval wait timeout in seconds", "300").action(async (opts) => {
1192
1203
  const isJson = !!opts.json;
1193
1204
  let ownerId = opts.owner ?? process.env.AGENTVALET_OWNER ?? "";
1194
1205
  let agentName = opts.name ?? "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentvalet/register",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Self-register AI agents with AgentValet",
5
5
  "type": "module",
6
6
  "bin": {