@floomhq/floom-mcp-sync 1.0.35 → 1.0.36
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/lib/config.js +1 -1
- package/dist/lib/manifest.js +5 -4
- package/dist/lib/paths.js +13 -7
- package/dist/server.js +1 -1
- package/package.json +1 -1
package/dist/lib/config.js
CHANGED
|
@@ -3,7 +3,7 @@ import { dirname } from "node:path";
|
|
|
3
3
|
import { configPath } from "./paths.js";
|
|
4
4
|
export const DEFAULT_API_URL = "https://floom.dev";
|
|
5
5
|
export function apiUrlFromConfig(cfg) {
|
|
6
|
-
return (
|
|
6
|
+
return (process.env.FLOOM_API_URL ?? cfg.apiUrl ?? DEFAULT_API_URL).replace(/\/$/, "");
|
|
7
7
|
}
|
|
8
8
|
export async function readConfig() {
|
|
9
9
|
try {
|
package/dist/lib/manifest.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { constants } from "node:fs";
|
|
2
2
|
import { lstat, mkdir, open, rename, rm, stat } from "node:fs/promises";
|
|
3
|
-
import { homedir } from "node:os";
|
|
4
3
|
import { basename, dirname, join, relative, resolve, sep } from "node:path";
|
|
5
|
-
import { configPath } from "./paths.js";
|
|
4
|
+
import { configPath, hasStaleNativeCodexEnv, homeDir, skillsDir } from "./paths.js";
|
|
6
5
|
const MANIFEST_VERSION = 1;
|
|
7
6
|
const SLUG_RE = /^[A-Za-z0-9_-]{1,128}$/;
|
|
8
7
|
const FD_PATH_ROOT = "/proc/self/fd";
|
|
@@ -96,13 +95,15 @@ const ROOT_SUPPORT_FILES = new Set([
|
|
|
96
95
|
export function syncManifestPath() {
|
|
97
96
|
if (process.env.FLOOM_SYNC_MANIFEST_PATH)
|
|
98
97
|
return expandHome(process.env.FLOOM_SYNC_MANIFEST_PATH);
|
|
98
|
+
if (hasStaleNativeCodexEnv())
|
|
99
|
+
return join(skillsDir(), ".floom-sync-manifest.json");
|
|
99
100
|
return join(dirname(configPath()), "sync-manifest.json");
|
|
100
101
|
}
|
|
101
102
|
function expandHome(path) {
|
|
102
103
|
if (path === "~")
|
|
103
|
-
return
|
|
104
|
+
return homeDir();
|
|
104
105
|
if (path.startsWith("~/"))
|
|
105
|
-
return join(
|
|
106
|
+
return join(homeDir(), path.slice(2));
|
|
106
107
|
return path;
|
|
107
108
|
}
|
|
108
109
|
function emptyManifest() {
|
package/dist/lib/paths.js
CHANGED
|
@@ -2,14 +2,20 @@ import { homedir } from "node:os";
|
|
|
2
2
|
import { isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
3
3
|
import { assertValidSlug } from "./slug.js";
|
|
4
4
|
export function configPath() {
|
|
5
|
-
return process.env.FLOOM_CONFIG_PATH ?? join(
|
|
5
|
+
return process.env.FLOOM_CONFIG_PATH ?? join(homeDir(), ".floom", "config.json");
|
|
6
6
|
}
|
|
7
|
-
export function
|
|
8
|
-
|
|
7
|
+
export function homeDir() {
|
|
8
|
+
return process.env.HOME ? resolve(process.env.HOME) : homedir();
|
|
9
|
+
}
|
|
10
|
+
export function hasStaleNativeCodexEnv() {
|
|
11
|
+
return Boolean(!process.env.FLOOM_SKILLS_DIR &&
|
|
9
12
|
!process.env.FLOOM_ALLOW_NATIVE_CODEX_SYNC &&
|
|
10
13
|
process.env.CODEX_SKILLS_DIR &&
|
|
11
|
-
resolve(expandHome(process.env.CODEX_SKILLS_DIR)) === resolve(join(
|
|
12
|
-
|
|
14
|
+
resolve(expandHome(process.env.CODEX_SKILLS_DIR)) === resolve(join(homeDir(), ".codex", "skills")));
|
|
15
|
+
}
|
|
16
|
+
export function skillsDir() {
|
|
17
|
+
if (hasStaleNativeCodexEnv()) {
|
|
18
|
+
return join(homeDir(), ".floom", "skill-cache", "codex");
|
|
13
19
|
}
|
|
14
20
|
return expandHome(process.env.FLOOM_SKILLS_DIR
|
|
15
21
|
?? process.env.CLAUDE_SKILLS_DIR
|
|
@@ -21,9 +27,9 @@ export function skillsDir() {
|
|
|
21
27
|
}
|
|
22
28
|
function expandHome(path) {
|
|
23
29
|
if (path === "~")
|
|
24
|
-
return
|
|
30
|
+
return homeDir();
|
|
25
31
|
if (path.startsWith("~/"))
|
|
26
|
-
return join(
|
|
32
|
+
return join(homeDir(), path.slice(2));
|
|
27
33
|
return path;
|
|
28
34
|
}
|
|
29
35
|
export function skillPath(slug) {
|
package/dist/server.js
CHANGED
|
@@ -5,7 +5,7 @@ import { autoSync } from "./auto-sync.js";
|
|
|
5
5
|
import { getSkill } from "./tools/get.js";
|
|
6
6
|
import { searchSkills } from "./tools/search.js";
|
|
7
7
|
import { syncStatus } from "./tools/status.js";
|
|
8
|
-
const SERVER_VERSION = "1.0.
|
|
8
|
+
const SERVER_VERSION = "1.0.36";
|
|
9
9
|
const DEFAULT_INTERVAL_MS = 60_000;
|
|
10
10
|
const MIN_INTERVAL_MS = 10_000;
|
|
11
11
|
const SEARCH_TYPES = new Set(["knowledge", "instruction", "workflow", "skill"]);
|