@floomhq/skills 0.2.6 → 0.2.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.
package/dist/index.js CHANGED
@@ -2024,6 +2024,23 @@ var COMPATIBLE_AGENTS = {
2024
2024
  opencode: ["OpenCode", "Claude Code", "Codex CLI", "Kimi CLI"],
2025
2025
  kimi: ["Kimi CLI", "Claude Code", "OpenCode"]
2026
2026
  };
2027
+ var TARGET_ENV_DIRS = {
2028
+ generic: ["FLOOM_SKILLS_DIR", "AGENTS_SKILLS_DIR"],
2029
+ all: ["FLOOM_SKILLS_DIR", "AGENTS_SKILLS_DIR"],
2030
+ claude: ["FLOOM_SKILLS_DIR", "CLAUDE_SKILLS_DIR"],
2031
+ codex: ["FLOOM_SKILLS_DIR", "CODEX_SKILLS_DIR", "AGENTS_SKILLS_DIR"],
2032
+ cursor: ["FLOOM_SKILLS_DIR", "CURSOR_SKILLS_DIR", "AGENTS_SKILLS_DIR"],
2033
+ gemini: ["FLOOM_SKILLS_DIR", "GEMINI_SKILLS_DIR", "AGENTS_SKILLS_DIR"],
2034
+ opencode: ["FLOOM_SKILLS_DIR", "OPENCODE_SKILLS_DIR", "AGENTS_SKILLS_DIR"],
2035
+ kimi: ["FLOOM_SKILLS_DIR", "KIMI_SKILLS_DIR", "AGENTS_SKILLS_DIR"]
2036
+ };
2037
+ function envDirForTarget(target) {
2038
+ for (const key of TARGET_ENV_DIRS[target]) {
2039
+ const value = process.env[key]?.trim();
2040
+ if (value) return value;
2041
+ }
2042
+ return null;
2043
+ }
2027
2044
  function presetDir(target, opts) {
2028
2045
  const cwd = opts.cwd ?? process.cwd();
2029
2046
  const root = opts.global ? homedir() : cwd;
@@ -2051,10 +2068,11 @@ function resolveInstallDir(args) {
2051
2068
  compatibleAgents: COMPATIBLE_AGENTS[args.target ?? "generic"]
2052
2069
  };
2053
2070
  }
2054
- if (process.env.FLOOM_SKILLS_DIR) {
2071
+ const targetEnvDir = envDirForTarget(args.target ?? "generic");
2072
+ if (targetEnvDir) {
2055
2073
  return {
2056
2074
  target: args.target ?? "generic",
2057
- dir: process.env.FLOOM_SKILLS_DIR,
2075
+ dir: targetEnvDir,
2058
2076
  origin: "env",
2059
2077
  compatibleAgents: COMPATIBLE_AGENTS[args.target ?? "generic"]
2060
2078
  };
@@ -2430,7 +2448,7 @@ function isLegacyApiUrl(apiUrl) {
2430
2448
  }
2431
2449
 
2432
2450
  // src/version.ts
2433
- var VERSION = "0.2.6";
2451
+ var VERSION = "0.2.7";
2434
2452
 
2435
2453
  // src/api-client.ts
2436
2454
  var DEFAULT_TIMEOUT_MS = 2e4;
@@ -2621,6 +2639,7 @@ async function whoamiCommand() {
2621
2639
  const envToken = process.env.FLOOM_API_TOKEN?.trim();
2622
2640
  if (!auth && !envToken) {
2623
2641
  log.info("Not logged in. Run: floom login");
2642
+ process.exitCode = 1;
2624
2643
  return;
2625
2644
  }
2626
2645
  let me;