@floomhq/floom-mcp-sync 1.0.34 → 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 +93 -5
- 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,23 +1,109 @@
|
|
|
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";
|
|
9
8
|
const LOCK_TIMEOUT_MS = 15_000;
|
|
10
9
|
const LOCK_STALE_MS = 5 * 60_000;
|
|
10
|
+
const SUPPORT_DIRS = new Set([
|
|
11
|
+
".github",
|
|
12
|
+
"agents",
|
|
13
|
+
"assets",
|
|
14
|
+
"bin",
|
|
15
|
+
"canvas-fonts",
|
|
16
|
+
"checks",
|
|
17
|
+
"claude",
|
|
18
|
+
"codex",
|
|
19
|
+
"contrib",
|
|
20
|
+
"core",
|
|
21
|
+
"cursor",
|
|
22
|
+
"design",
|
|
23
|
+
"docs",
|
|
24
|
+
"evidence",
|
|
25
|
+
"examples",
|
|
26
|
+
"extension",
|
|
27
|
+
"helpers",
|
|
28
|
+
"hosts",
|
|
29
|
+
"kimi",
|
|
30
|
+
"lib",
|
|
31
|
+
"migrations",
|
|
32
|
+
"model-overlays",
|
|
33
|
+
"openclaw",
|
|
34
|
+
"opencode",
|
|
35
|
+
"reference",
|
|
36
|
+
"references",
|
|
37
|
+
"remotion-starter",
|
|
38
|
+
"scripts",
|
|
39
|
+
"sdk",
|
|
40
|
+
"schemas",
|
|
41
|
+
"src",
|
|
42
|
+
"specialists",
|
|
43
|
+
"supabase",
|
|
44
|
+
"templates",
|
|
45
|
+
"test",
|
|
46
|
+
"tests",
|
|
47
|
+
"themes",
|
|
48
|
+
"vendor",
|
|
49
|
+
]);
|
|
50
|
+
const ROOT_SUPPORT_FILES = new Set([
|
|
51
|
+
".env.example",
|
|
52
|
+
"ACKNOWLEDGEMENTS.md",
|
|
53
|
+
"AGENTS.md",
|
|
54
|
+
"ARCHITECTURE.md",
|
|
55
|
+
"BROWSER.md",
|
|
56
|
+
"CHANGELOG.md",
|
|
57
|
+
"CLAUDE.md",
|
|
58
|
+
"CONTRIBUTING.md",
|
|
59
|
+
"DESIGN.md",
|
|
60
|
+
"ETHOS.md",
|
|
61
|
+
"LICENSE",
|
|
62
|
+
"LICENSE.md",
|
|
63
|
+
"LICENSE.txt",
|
|
64
|
+
"PLAN-snapshot-dropdown-interactive.md",
|
|
65
|
+
"README.md",
|
|
66
|
+
"REMOTION_PROTOCOL.md",
|
|
67
|
+
"SKILL.md.tmpl",
|
|
68
|
+
"TODOS.md",
|
|
69
|
+
"TODOS-format.md",
|
|
70
|
+
"USING_GBRAIN_WITH_GSTACK.md",
|
|
71
|
+
"VERSION",
|
|
72
|
+
".gitlab-ci.yml",
|
|
73
|
+
"actionlint.yaml",
|
|
74
|
+
"bun.lock",
|
|
75
|
+
"checklist.md",
|
|
76
|
+
"conductor.json",
|
|
77
|
+
"design-checklist.md",
|
|
78
|
+
"dx-hall-of-fame.md",
|
|
79
|
+
"editing.md",
|
|
80
|
+
"forms.md",
|
|
81
|
+
"greptile-triage.md",
|
|
82
|
+
"instructions.md",
|
|
83
|
+
"nanobanana.py",
|
|
84
|
+
"package.json",
|
|
85
|
+
"plan.md",
|
|
86
|
+
"pptxgenjs.md",
|
|
87
|
+
"reference.md",
|
|
88
|
+
"requirements.txt",
|
|
89
|
+
"setup",
|
|
90
|
+
"skill.md",
|
|
91
|
+
"slop-scan.config.json",
|
|
92
|
+
"style_guidelines.md",
|
|
93
|
+
"theme-showcase.pdf",
|
|
94
|
+
]);
|
|
11
95
|
export function syncManifestPath() {
|
|
12
96
|
if (process.env.FLOOM_SYNC_MANIFEST_PATH)
|
|
13
97
|
return expandHome(process.env.FLOOM_SYNC_MANIFEST_PATH);
|
|
98
|
+
if (hasStaleNativeCodexEnv())
|
|
99
|
+
return join(skillsDir(), ".floom-sync-manifest.json");
|
|
14
100
|
return join(dirname(configPath()), "sync-manifest.json");
|
|
15
101
|
}
|
|
16
102
|
function expandHome(path) {
|
|
17
103
|
if (path === "~")
|
|
18
|
-
return
|
|
104
|
+
return homeDir();
|
|
19
105
|
if (path.startsWith("~/"))
|
|
20
|
-
return join(
|
|
106
|
+
return join(homeDir(), path.slice(2));
|
|
21
107
|
return path;
|
|
22
108
|
}
|
|
23
109
|
function emptyManifest() {
|
|
@@ -43,10 +129,12 @@ function isEntryForKey(key, value) {
|
|
|
43
129
|
function isPackageFilePath(packagePath) {
|
|
44
130
|
if (packagePath.length === 1 && packagePath[0] === "SKILL.md")
|
|
45
131
|
return true;
|
|
132
|
+
if (packagePath.length === 1 && ROOT_SUPPORT_FILES.has(packagePath[0] ?? ""))
|
|
133
|
+
return true;
|
|
46
134
|
if (packagePath.length < 2)
|
|
47
135
|
return false;
|
|
48
136
|
const first = packagePath[0];
|
|
49
|
-
if (first === undefined || !
|
|
137
|
+
if (first === undefined || !SUPPORT_DIRS.has(first))
|
|
50
138
|
return false;
|
|
51
139
|
return packagePath.every((segment) => segment !== "." && segment !== ".." && segment.length > 0);
|
|
52
140
|
}
|
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"]);
|