@floomhq/floom 1.0.26 → 1.0.28
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/README.md +6 -5
- package/dist/cli.js +61 -242
- package/dist/config.js +1 -51
- package/dist/doctor.js +12 -40
- package/dist/errors.js +1 -1
- package/dist/install.js +19 -74
- package/dist/login.js +8 -67
- package/dist/mcp.js +5 -2
- package/dist/package.js +177 -81
- package/dist/publish.js +41 -51
- package/dist/push-watch.js +245 -0
- package/dist/setup.js +87 -25
- package/dist/sync-manifest.js +44 -37
- package/dist/sync.js +15 -26
- package/dist/targets.js +45 -12
- package/package.json +1 -1
package/dist/targets.js
CHANGED
|
@@ -1,16 +1,49 @@
|
|
|
1
1
|
import { homedir } from "node:os";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
3
|
+
export const AGENT_TARGETS = ["claude", "codex", "cursor", "opencode", "kimi"];
|
|
4
|
+
const TARGETS = {
|
|
5
|
+
claude: {
|
|
6
|
+
label: "Claude Code",
|
|
7
|
+
skillsDirEnv: "CLAUDE_SKILLS_DIR",
|
|
8
|
+
defaultSkillsDir: () => join(homedir(), ".claude", "skills"),
|
|
9
|
+
},
|
|
10
|
+
codex: {
|
|
11
|
+
label: "Codex",
|
|
12
|
+
skillsDirEnv: "CODEX_SKILLS_DIR",
|
|
13
|
+
defaultSkillsDir: () => join(process.env.CODEX_HOME ?? join(homedir(), ".codex"), "skills"),
|
|
14
|
+
},
|
|
15
|
+
cursor: {
|
|
16
|
+
label: "Cursor",
|
|
17
|
+
skillsDirEnv: "CURSOR_SKILLS_DIR",
|
|
18
|
+
defaultSkillsDir: () => join(homedir(), ".cursor", "skills-cursor"),
|
|
19
|
+
},
|
|
20
|
+
opencode: {
|
|
21
|
+
label: "OpenCode",
|
|
22
|
+
skillsDirEnv: "OPENCODE_SKILLS_DIR",
|
|
23
|
+
defaultSkillsDir: () => join(homedir(), ".config", "opencode", "skills"),
|
|
24
|
+
},
|
|
25
|
+
kimi: {
|
|
26
|
+
label: "Kimi",
|
|
27
|
+
skillsDirEnv: "KIMI_SKILLS_DIR",
|
|
28
|
+
defaultSkillsDir: () => join(homedir(), ".kimi", "skills"),
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
export const TARGET_HINT = AGENT_TARGETS.join("|");
|
|
32
|
+
export function isAgentTarget(value) {
|
|
33
|
+
return AGENT_TARGETS.includes(value);
|
|
11
34
|
}
|
|
12
|
-
export function
|
|
13
|
-
if (
|
|
14
|
-
return
|
|
15
|
-
|
|
35
|
+
export function parseAgentTarget(value) {
|
|
36
|
+
if (isAgentTarget(value))
|
|
37
|
+
return value;
|
|
38
|
+
throw new Error(`Invalid agent target: ${value}`);
|
|
39
|
+
}
|
|
40
|
+
export function targetLabel(target) {
|
|
41
|
+
return TARGETS[target].label;
|
|
42
|
+
}
|
|
43
|
+
export function targetSkillsDir(target) {
|
|
44
|
+
const info = TARGETS[target];
|
|
45
|
+
return process.env[info.skillsDirEnv] ?? info.defaultSkillsDir();
|
|
46
|
+
}
|
|
47
|
+
export function targetSkillsDirEnv(target) {
|
|
48
|
+
return TARGETS[target].skillsDirEnv;
|
|
16
49
|
}
|