@kunlv/atdc 1.0.2 → 1.0.4
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/bin/add-command.py
CHANGED
|
@@ -42,10 +42,10 @@ description: {desc}。触发词:{triggers}。
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
PATHS = {
|
|
45
|
-
"opencode": f"{ATD}/commands/opencode/
|
|
46
|
-
"claude": f"{ATD}/commands/claude/
|
|
47
|
-
"codex": f"{ATD}/commands/codex/
|
|
48
|
-
"cursor": f"{ATD}/commands/cursor/
|
|
45
|
+
"opencode": f"{ATD}/commands/opencode/atdc/{{name}}.md",
|
|
46
|
+
"claude": f"{ATD}/commands/claude/atdc/{{name}}.md",
|
|
47
|
+
"codex": f"{ATD}/commands/codex/atdc-{{name}}/SKILL.md",
|
|
48
|
+
"cursor": f"{ATD}/commands/cursor/atdc-{{name}}/SKILL.md",
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
def add_command(name, desc, triggers, prompt=None, short_desc=None, from_learn=False, failure=None, dead_end=None):
|
|
@@ -99,13 +99,13 @@ def add_command(name, desc, triggers, prompt=None, short_desc=None, from_learn=F
|
|
|
99
99
|
with open(install_sh) as f:
|
|
100
100
|
content = f.read()
|
|
101
101
|
|
|
102
|
-
skill_name = f"
|
|
103
|
-
marker = "for skill in
|
|
102
|
+
skill_name = f"atdc-{name}"
|
|
103
|
+
marker = "for skill in atdc "
|
|
104
104
|
if marker in content and skill_name not in content:
|
|
105
105
|
# Find the "for skill in" line and add the new skill
|
|
106
106
|
lines = content.split("\n")
|
|
107
107
|
for i, line in enumerate(lines):
|
|
108
|
-
if "for skill in
|
|
108
|
+
if "for skill in atdc " in line and skill_name not in line:
|
|
109
109
|
# Insert before the "do" keyword
|
|
110
110
|
j = line.rfind("; do")
|
|
111
111
|
if j < 0:
|
package/install.sh
CHANGED
|
@@ -68,26 +68,26 @@ echo "Step 2.6:检查旧 flow-kit symlink 迁移..."
|
|
|
68
68
|
MIGRATED=0
|
|
69
69
|
|
|
70
70
|
# Claude Code
|
|
71
|
-
if [ -L "$HOME_DIR/.claude/commands/
|
|
72
|
-
rm -f "$HOME_DIR/.claude/commands/
|
|
73
|
-
echo " ✓ 移除旧 symlink ~/.claude/commands/
|
|
71
|
+
if [ -L "$HOME_DIR/.claude/commands/atdc.md" ]; then
|
|
72
|
+
rm -f "$HOME_DIR/.claude/commands/atdc.md"
|
|
73
|
+
echo " ✓ 移除旧 symlink ~/.claude/commands/atdc.md"
|
|
74
74
|
MIGRATED=1
|
|
75
75
|
fi
|
|
76
|
-
if [ -L "$HOME_DIR/.claude/commands/
|
|
77
|
-
rm -rf "$HOME_DIR/.claude/commands/
|
|
78
|
-
echo " ✓ 移除旧 symlink ~/.claude/commands/
|
|
76
|
+
if [ -L "$HOME_DIR/.claude/commands/atdc" ]; then
|
|
77
|
+
rm -rf "$HOME_DIR/.claude/commands/atdc"
|
|
78
|
+
echo " ✓ 移除旧 symlink ~/.claude/commands/atdc/"
|
|
79
79
|
MIGRATED=1
|
|
80
80
|
fi
|
|
81
81
|
|
|
82
82
|
# OpenCode
|
|
83
|
-
if [ -L "$HOME_DIR/.config/opencode/commands/
|
|
84
|
-
rm -f "$HOME_DIR/.config/opencode/commands/
|
|
85
|
-
echo " ✓ 移除旧 symlink ~/.config/opencode/commands/
|
|
83
|
+
if [ -L "$HOME_DIR/.config/opencode/commands/atdc.md" ]; then
|
|
84
|
+
rm -f "$HOME_DIR/.config/opencode/commands/atdc.md"
|
|
85
|
+
echo " ✓ 移除旧 symlink ~/.config/opencode/commands/atdc.md"
|
|
86
86
|
MIGRATED=1
|
|
87
87
|
fi
|
|
88
|
-
if [ -L "$HOME_DIR/.config/opencode/commands/
|
|
89
|
-
rm -rf "$HOME_DIR/.config/opencode/commands/
|
|
90
|
-
echo " ✓ 移除旧 symlink ~/.config/opencode/commands/
|
|
88
|
+
if [ -L "$HOME_DIR/.config/opencode/commands/atdc" ]; then
|
|
89
|
+
rm -rf "$HOME_DIR/.config/opencode/commands/atdc"
|
|
90
|
+
echo " ✓ 移除旧 symlink ~/.config/opencode/commands/atdc/"
|
|
91
91
|
MIGRATED=1
|
|
92
92
|
fi
|
|
93
93
|
|
|
@@ -128,16 +128,16 @@ else
|
|
|
128
128
|
if [ -L "$CLAUDE_CMD/atd.md" ] || [ -f "$CLAUDE_CMD/atd.md" ]; then
|
|
129
129
|
rm -f "$CLAUDE_CMD/atd.md"
|
|
130
130
|
fi
|
|
131
|
-
ln -s "$ATDC_DIR/commands/claude/
|
|
131
|
+
ln -s "$ATDC_DIR/commands/claude/atdc.md" "$CLAUDE_CMD/atd.md"
|
|
132
132
|
|
|
133
133
|
# atd/ 子命令目录
|
|
134
134
|
if [ -L "$CLAUDE_CMD/atd" ] || [ -d "$CLAUDE_CMD/atd" ]; then
|
|
135
135
|
rm -rf "$CLAUDE_CMD/atd"
|
|
136
136
|
fi
|
|
137
|
-
ln -s "$ATDC_DIR/commands/claude/
|
|
137
|
+
ln -s "$ATDC_DIR/commands/claude/atdc" "$CLAUDE_CMD/atd"
|
|
138
138
|
|
|
139
|
-
echo " ✓ ~/.claude/commands/
|
|
140
|
-
echo " ✓ ~/.claude/commands/
|
|
139
|
+
echo " ✓ ~/.claude/commands/atdc.md → atdc/commands/claude/atdc.md"
|
|
140
|
+
echo " ✓ ~/.claude/commands/atdc/ → atdc/commands/claude/atdc/"
|
|
141
141
|
fi
|
|
142
142
|
|
|
143
143
|
echo ""
|
|
@@ -155,15 +155,15 @@ else
|
|
|
155
155
|
if [ -L "$OPENCODE_CMD/atd.md" ] || [ -f "$OPENCODE_CMD/atd.md" ]; then
|
|
156
156
|
rm -f "$OPENCODE_CMD/atd.md"
|
|
157
157
|
fi
|
|
158
|
-
ln -s "$ATDC_DIR/commands/opencode/
|
|
158
|
+
ln -s "$ATDC_DIR/commands/opencode/atdc.md" "$OPENCODE_CMD/atd.md"
|
|
159
159
|
|
|
160
160
|
if [ -L "$OPENCODE_CMD/atd" ] || [ -d "$OPENCODE_CMD/atd" ]; then
|
|
161
161
|
rm -rf "$OPENCODE_CMD/atd"
|
|
162
162
|
fi
|
|
163
|
-
ln -s "$ATDC_DIR/commands/opencode/
|
|
163
|
+
ln -s "$ATDC_DIR/commands/opencode/atdc" "$OPENCODE_CMD/atd"
|
|
164
164
|
|
|
165
|
-
echo " ✓ ~/.config/opencode/commands/
|
|
166
|
-
echo " ✓ ~/.config/opencode/commands/
|
|
165
|
+
echo " ✓ ~/.config/opencode/commands/atdc.md → atdc/commands/opencode/atdc.md"
|
|
166
|
+
echo " ✓ ~/.config/opencode/commands/atdc/ → atdc/commands/opencode/atdc/"
|
|
167
167
|
fi
|
|
168
168
|
|
|
169
169
|
echo ""
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|