@floomhq/skills 1.0.0 → 1.0.2
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 +24 -22
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3070,7 +3070,7 @@ import { mkdir as mkdir2, readFile as readFile3, writeFile, chmod } from "node:f
|
|
|
3070
3070
|
|
|
3071
3071
|
// src/lib/invocation.ts
|
|
3072
3072
|
var NPX_HINTS = ["_npx", "npm-cache/_npx", "npm-cache\\_npx", ".npm/_npx"];
|
|
3073
|
-
var NPX_INVOCATION = "npx -y @floomhq/
|
|
3073
|
+
var NPX_INVOCATION = "npx -y @floomhq/floom";
|
|
3074
3074
|
var GLOBAL_INVOCATION = "floom";
|
|
3075
3075
|
var cached = null;
|
|
3076
3076
|
function detect() {
|
|
@@ -3096,9 +3096,9 @@ function cliCmd(cmd) {
|
|
|
3096
3096
|
// src/config.ts
|
|
3097
3097
|
var CONFIG_DIR = join3(homedir2(), ".floom");
|
|
3098
3098
|
var AUTH_FILE = join3(CONFIG_DIR, "auth.json");
|
|
3099
|
-
var DEFAULT_APP_URL = "https://
|
|
3100
|
-
var DEFAULT_API_URL = "https://
|
|
3101
|
-
var TRUSTED_API_HOSTS = /* @__PURE__ */ new Set(["floom.dev", "
|
|
3099
|
+
var DEFAULT_APP_URL = "https://floom.dev";
|
|
3100
|
+
var DEFAULT_API_URL = "https://floom.dev/api/v1";
|
|
3101
|
+
var TRUSTED_API_HOSTS = /* @__PURE__ */ new Set(["floom.dev", "try.floom.dev"]);
|
|
3102
3102
|
var LOOPBACK_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1"]);
|
|
3103
3103
|
function devModeEnabled() {
|
|
3104
3104
|
const v = process.env.FLOOM_DEV;
|
|
@@ -3124,9 +3124,7 @@ function trustedApiUrlOrDefault(apiUrl) {
|
|
|
3124
3124
|
const trimmed = apiUrl.replace(/\/$/, "");
|
|
3125
3125
|
if (!isTrustedApiUrl(trimmed)) return DEFAULT_API_URL;
|
|
3126
3126
|
try {
|
|
3127
|
-
|
|
3128
|
-
if (hostname2 === "floom.dev" || hostname2 === "try.floom.dev") return DEFAULT_API_URL;
|
|
3129
|
-
if (hostname2 === "skills.floom.dev") return `${new URL(trimmed).origin}/api/v1`;
|
|
3127
|
+
if (TRUSTED_API_HOSTS.has(new URL(trimmed).hostname)) return DEFAULT_API_URL;
|
|
3130
3128
|
} catch {
|
|
3131
3129
|
return DEFAULT_API_URL;
|
|
3132
3130
|
}
|
|
@@ -3289,7 +3287,7 @@ async function getMachineIdentity() {
|
|
|
3289
3287
|
}
|
|
3290
3288
|
|
|
3291
3289
|
// src/version.ts
|
|
3292
|
-
var VERSION = "
|
|
3290
|
+
var VERSION = "1.0.2";
|
|
3293
3291
|
|
|
3294
3292
|
// src/api-client.ts
|
|
3295
3293
|
var DEFAULT_TIMEOUT_MS = 2e4;
|
|
@@ -3363,7 +3361,7 @@ function friendlyApiErrorMessage(code, raw, status) {
|
|
|
3363
3361
|
}
|
|
3364
3362
|
if (code === "CLI_VERSION_TOO_OLD") {
|
|
3365
3363
|
return `Your CLI is out of date.
|
|
3366
|
-
Run: npm i -g @floomhq/
|
|
3364
|
+
Run: npm i -g @floomhq/floom@latest
|
|
3367
3365
|
More help: ${HELP}`;
|
|
3368
3366
|
}
|
|
3369
3367
|
if (code === "FILE_TOO_LARGE" || code === "BUNDLE_TOO_LARGE") {
|
|
@@ -3774,7 +3772,7 @@ async function loginCommand() {
|
|
|
3774
3772
|
]);
|
|
3775
3773
|
if (cliCmd("login").startsWith("npx ")) {
|
|
3776
3774
|
log.blank();
|
|
3777
|
-
log.info(" Tip: install once with npm i -g @floomhq/
|
|
3775
|
+
log.info(" Tip: install once with npm i -g @floomhq/floom and just type `floom` after that.");
|
|
3778
3776
|
}
|
|
3779
3777
|
return;
|
|
3780
3778
|
}
|
|
@@ -4014,7 +4012,7 @@ async function readManifest(root) {
|
|
|
4014
4012
|
if (error instanceof SyntaxError || error instanceof ZodError) {
|
|
4015
4013
|
throw new Error(
|
|
4016
4014
|
`Corrupted manifest at ${manifestPath(root)}. Remove that file or run floom pull after backing up local edits.
|
|
4017
|
-
Run: rm ${manifestPath(root)} && npx -y @floomhq/
|
|
4015
|
+
Run: rm ${manifestPath(root)} && npx -y @floomhq/floom pull
|
|
4018
4016
|
More help: https://floom.dev/docs#troubleshooting`
|
|
4019
4017
|
);
|
|
4020
4018
|
}
|
|
@@ -4504,7 +4502,7 @@ function createMcpServer(deps = {}) {
|
|
|
4504
4502
|
query,
|
|
4505
4503
|
status: "error",
|
|
4506
4504
|
message: err.message,
|
|
4507
|
-
hint: "Run: npx -y @floomhq/
|
|
4505
|
+
hint: "Run: npx -y @floomhq/floom login"
|
|
4508
4506
|
});
|
|
4509
4507
|
}
|
|
4510
4508
|
}
|
|
@@ -4540,7 +4538,7 @@ function createMcpServer(deps = {}) {
|
|
|
4540
4538
|
slug,
|
|
4541
4539
|
status: "error",
|
|
4542
4540
|
message: err.message,
|
|
4543
|
-
hint: "Run: npx -y @floomhq/
|
|
4541
|
+
hint: "Run: npx -y @floomhq/floom login"
|
|
4544
4542
|
});
|
|
4545
4543
|
}
|
|
4546
4544
|
}
|
|
@@ -4592,10 +4590,10 @@ async function mcpCommand() {
|
|
|
4592
4590
|
This command is launched by your AI agent, not run directly.
|
|
4593
4591
|
|
|
4594
4592
|
Add this to your agent's MCP configuration:
|
|
4595
|
-
{"command":"npx","args":["-y","@floomhq/
|
|
4593
|
+
{"command":"npx","args":["-y","@floomhq/floom","mcp"]}
|
|
4596
4594
|
|
|
4597
4595
|
Claude Code users can instead run:
|
|
4598
|
-
claude mcp add floom -- npx -y @floomhq/
|
|
4596
|
+
claude mcp add floom -- npx -y @floomhq/floom mcp
|
|
4599
4597
|
|
|
4600
4598
|
Press Ctrl+C to stop.
|
|
4601
4599
|
`
|
|
@@ -6615,7 +6613,7 @@ async function renameDeviceCommand(newLabel) {
|
|
|
6615
6613
|
// src/commands/install.ts
|
|
6616
6614
|
init_src();
|
|
6617
6615
|
import { mkdir as mkdir6, rm as rm3, writeFile as writeFile5, stat as stat7, readFile as readFile11 } from "node:fs/promises";
|
|
6618
|
-
import { join as join12, resolve as resolve8 } from "node:path";
|
|
6616
|
+
import { dirname as dirname2, join as join12, resolve as resolve8 } from "node:path";
|
|
6619
6617
|
init_runtime();
|
|
6620
6618
|
init_prompt();
|
|
6621
6619
|
var TOKEN_RE = /^fls_[A-Za-z0-9_-]{32,}$/;
|
|
@@ -6698,6 +6696,10 @@ async function fetchPublicShare(token) {
|
|
|
6698
6696
|
}
|
|
6699
6697
|
return candidate;
|
|
6700
6698
|
}
|
|
6699
|
+
var nativePathOperations = { dirname: dirname2 };
|
|
6700
|
+
function installParentDirectory(destination, pathOperations = nativePathOperations) {
|
|
6701
|
+
return pathOperations.dirname(destination);
|
|
6702
|
+
}
|
|
6701
6703
|
async function installToDir(target, slug, files) {
|
|
6702
6704
|
const finalDir = join12(target.skillsDir, slug);
|
|
6703
6705
|
const tempDir = join12(target.skillsDir, ".floom", "tmp", `${slug}-install-${Date.now()}`);
|
|
@@ -6707,7 +6709,7 @@ async function installToDir(target, slug, files) {
|
|
|
6707
6709
|
for (const file of files) {
|
|
6708
6710
|
const safePath = safeRemotePath2(file.path);
|
|
6709
6711
|
const dest = join12(tempDir, ...safePath.split("/"));
|
|
6710
|
-
await mkdir6(
|
|
6712
|
+
await mkdir6(installParentDirectory(dest), { recursive: true });
|
|
6711
6713
|
await writeFile5(dest, bytesForShareFile(file));
|
|
6712
6714
|
}
|
|
6713
6715
|
const { rename: rename2 } = await import("node:fs/promises");
|
|
@@ -6718,7 +6720,7 @@ async function installToDir(target, slug, files) {
|
|
|
6718
6720
|
const { cp: cp4 } = await import("node:fs/promises");
|
|
6719
6721
|
const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
6720
6722
|
const backupDest = join12(target.skillsDir, ".floom", "backups", slug, stamp);
|
|
6721
|
-
await mkdir6(
|
|
6723
|
+
await mkdir6(installParentDirectory(backupDest), { recursive: true });
|
|
6722
6724
|
await cp4(finalDir, backupDest, { recursive: true });
|
|
6723
6725
|
await rename2(finalDir, replacedDir);
|
|
6724
6726
|
movedExisting = true;
|
|
@@ -7248,7 +7250,7 @@ function npmLatest() {
|
|
|
7248
7250
|
return new Promise((resolveP) => {
|
|
7249
7251
|
let child;
|
|
7250
7252
|
try {
|
|
7251
|
-
child = spawn3("npm", ["view", "@floomhq/
|
|
7253
|
+
child = spawn3("npm", ["view", "@floomhq/floom", "version"], { stdio: ["ignore", "pipe", "ignore"] });
|
|
7252
7254
|
} catch {
|
|
7253
7255
|
resolveP(null);
|
|
7254
7256
|
return;
|
|
@@ -7368,11 +7370,11 @@ async function doctorCommand(opts = {}) {
|
|
|
7368
7370
|
}
|
|
7369
7371
|
const latest = await npmLatest();
|
|
7370
7372
|
if (!latest) {
|
|
7371
|
-
checks.push({ name: "version", status: "warn", message: `@floomhq/
|
|
7373
|
+
checks.push({ name: "version", status: "warn", message: `@floomhq/floom ${VERSION}; latest version unreachable`, fix: null });
|
|
7372
7374
|
} else if (significantlyOutdated(VERSION, latest)) {
|
|
7373
|
-
checks.push({ name: "version", status: "warn", message: `@floomhq/
|
|
7375
|
+
checks.push({ name: "version", status: "warn", message: `@floomhq/floom ${VERSION} installed, latest is ${latest}`, fix: "npx -y @floomhq/floom@latest" });
|
|
7374
7376
|
} else {
|
|
7375
|
-
checks.push({ name: "version", status: "pass", message: `@floomhq/
|
|
7377
|
+
checks.push({ name: "version", status: "pass", message: `@floomhq/floom ${VERSION} is current`, fix: null });
|
|
7376
7378
|
}
|
|
7377
7379
|
const failures = checks.filter((c) => c.status === "fail");
|
|
7378
7380
|
const warnings = checks.filter((c) => c.status === "warn");
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.0.
|
|
1
|
+
export const VERSION = "1.0.2";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floomhq/skills",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Floom Skills CLI \u2014 publish, install, sync, and share AI agent skills.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://skills.floom.dev",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"type": "module",
|
|
19
19
|
"bin": {
|
|
20
|
-
"floom": "dist/index.js"
|
|
20
|
+
"floom-skills": "dist/index.js"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "tsc -p tsconfig.typecheck.json --noEmit && node scripts/build-bundle.mjs",
|