@getdial/cli 0.11.1 → 0.12.1
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/skill-install.js +12 -11
- package/package.json +4 -4
- package/skills.tar.gz +0 -0
- package/skill.tar.gz +0 -0
|
@@ -3,6 +3,7 @@ import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, statSync, wri
|
|
|
3
3
|
import { homedir, tmpdir } from "node:os";
|
|
4
4
|
import { dirname, join, resolve } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
+
export const SKILL_NAME = "dial-cli";
|
|
6
7
|
export const SUPPORTED_AGENTS = [
|
|
7
8
|
"claude-code",
|
|
8
9
|
"cursor",
|
|
@@ -32,21 +33,21 @@ export function isSupportedAgent(name) {
|
|
|
32
33
|
function targetPath(agent, home, cwd) {
|
|
33
34
|
switch (agent) {
|
|
34
35
|
case "claude-code":
|
|
35
|
-
return join(home, ".claude", "skills",
|
|
36
|
+
return join(home, ".claude", "skills", SKILL_NAME, "SKILL.md");
|
|
36
37
|
case "cursor":
|
|
37
|
-
return join(home, ".cursor", "skills",
|
|
38
|
+
return join(home, ".cursor", "skills", SKILL_NAME, "SKILL.md");
|
|
38
39
|
case "codex":
|
|
39
|
-
return join(home, ".agents", "skills",
|
|
40
|
+
return join(home, ".agents", "skills", SKILL_NAME, "SKILL.md");
|
|
40
41
|
case "opencode":
|
|
41
|
-
return join(home, ".config", "opencode", "skills",
|
|
42
|
+
return join(home, ".config", "opencode", "skills", SKILL_NAME, "SKILL.md");
|
|
42
43
|
case "pi":
|
|
43
|
-
return join(home, ".pi", "agent", "skills",
|
|
44
|
+
return join(home, ".pi", "agent", "skills", SKILL_NAME, "SKILL.md");
|
|
44
45
|
case "openclaw":
|
|
45
|
-
return join(home, ".openclaw", "skills",
|
|
46
|
+
return join(home, ".openclaw", "skills", SKILL_NAME, "SKILL.md");
|
|
46
47
|
case "hermes":
|
|
47
|
-
return join(home, ".hermes", "skills",
|
|
48
|
+
return join(home, ".hermes", "skills", SKILL_NAME, "SKILL.md");
|
|
48
49
|
case "nanoclaw":
|
|
49
|
-
return join(cwd, ".claude", "skills",
|
|
50
|
+
return join(cwd, ".claude", "skills", SKILL_NAME, "SKILL.md");
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
function packageRoot() {
|
|
@@ -57,7 +58,7 @@ function packageRoot() {
|
|
|
57
58
|
return resolve(dirname(here), "..", "..");
|
|
58
59
|
}
|
|
59
60
|
export function tarballPath() {
|
|
60
|
-
return join(packageRoot(), "
|
|
61
|
+
return join(packageRoot(), "skills.tar.gz");
|
|
61
62
|
}
|
|
62
63
|
export function readSkillMarkdown(tarball = tarballPath()) {
|
|
63
64
|
if (!existsSync(tarball)) {
|
|
@@ -67,9 +68,9 @@ export function readSkillMarkdown(tarball = tarballPath()) {
|
|
|
67
68
|
const tmp = mkdtempSync(join(tmpdir(), "dial-skill-"));
|
|
68
69
|
try {
|
|
69
70
|
execFileSync("tar", ["-xzf", tarball, "-C", tmp], { stdio: "pipe" });
|
|
70
|
-
const skillFile = join(tmp, "
|
|
71
|
+
const skillFile = join(tmp, "skills", SKILL_NAME, "SKILL.md");
|
|
71
72
|
if (!existsSync(skillFile)) {
|
|
72
|
-
throw new Error(`
|
|
73
|
+
throw new Error(`skills.tar.gz does not contain skills/${SKILL_NAME}/SKILL.md (looked in ${tmp})`);
|
|
73
74
|
}
|
|
74
75
|
return readFileSync(skillFile, "utf8");
|
|
75
76
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getdial/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Dial CLI — install, sign up, and run the local listen service.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"dist",
|
|
24
|
-
"
|
|
24
|
+
"skills.tar.gz",
|
|
25
25
|
"README.md"
|
|
26
26
|
],
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "tsc -p .",
|
|
29
29
|
"test": "node --import tsx --test",
|
|
30
|
-
"clean": "rm -rf dist
|
|
31
|
-
"build:skill": "tar -czf
|
|
30
|
+
"clean": "rm -rf dist skills.tar.gz",
|
|
31
|
+
"build:skill": "tar -czf skills.tar.gz skills",
|
|
32
32
|
"prepack": "npm run build && npm run build:skill"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
package/skills.tar.gz
ADDED
|
Binary file
|
package/skill.tar.gz
DELETED
|
Binary file
|