@softspark/ai-toolkit 2.0.0 → 2.0.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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/scripts/migrate.py +43 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## v2.0.1 — Migration Hook Path Fix (2026-04-12)
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **settings.json hook paths** — migration now rewrites ALL hook commands (including plugin hooks with non-toolkit `_source` tags like `memory-pack`, `enterprise-pack`) from `~/.ai-toolkit/hooks/` to `~/.softspark/ai-toolkit/hooks/`
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
10
17
|
## v2.0.0 — SoftSpark Namespace Migration (2026-04-12)
|
|
11
18
|
|
|
12
19
|
### BREAKING CHANGES
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softspark/ai-toolkit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Professional-grade AI coding toolkit: 92 skills, 44 agents, multi-platform support (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Google Antigravity), machine-enforced safety constitution, persona presets, skill security auditor, expanded lifecycle hooks, 11 plugin packs, and benchmark tooling.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
package/scripts/migrate.py
CHANGED
|
@@ -163,8 +163,49 @@ def migrate_project_configs(dry_run: bool = False) -> int:
|
|
|
163
163
|
return count
|
|
164
164
|
|
|
165
165
|
|
|
166
|
+
def migrate_settings_json(dry_run: bool = False) -> int:
|
|
167
|
+
"""Rewrite hook commands in ~/.claude/settings.json from old to new path.
|
|
168
|
+
|
|
169
|
+
Replaces ALL occurrences of .ai-toolkit/hooks/ with .softspark/ai-toolkit/hooks/
|
|
170
|
+
in hook command strings, regardless of _source tag. This catches plugin hooks
|
|
171
|
+
(memory-pack, enterprise-pack, etc.) that merge-hooks.py doesn't strip.
|
|
172
|
+
|
|
173
|
+
Returns the number of commands rewritten.
|
|
174
|
+
"""
|
|
175
|
+
settings_path = Path.home() / ".claude" / "settings.json"
|
|
176
|
+
if not settings_path.is_file():
|
|
177
|
+
return 0
|
|
178
|
+
|
|
179
|
+
try:
|
|
180
|
+
with open(settings_path, encoding="utf-8") as f:
|
|
181
|
+
data = json.load(f)
|
|
182
|
+
except (json.JSONDecodeError, OSError):
|
|
183
|
+
return 0
|
|
184
|
+
|
|
185
|
+
hooks = data.get("hooks", {})
|
|
186
|
+
old_prefix = ".ai-toolkit/hooks/"
|
|
187
|
+
new_prefix = ".softspark/ai-toolkit/hooks/"
|
|
188
|
+
count = 0
|
|
189
|
+
|
|
190
|
+
for entries in hooks.values():
|
|
191
|
+
for entry in entries:
|
|
192
|
+
for hook in entry.get("hooks", []):
|
|
193
|
+
cmd = hook.get("command", "")
|
|
194
|
+
if old_prefix in cmd and new_prefix not in cmd:
|
|
195
|
+
hook["command"] = cmd.replace(old_prefix, new_prefix)
|
|
196
|
+
count += 1
|
|
197
|
+
|
|
198
|
+
if count > 0 and not dry_run:
|
|
199
|
+
with open(settings_path, "w", encoding="utf-8") as f:
|
|
200
|
+
json.dump(data, f, indent=4, ensure_ascii=False)
|
|
201
|
+
f.write("\n")
|
|
202
|
+
print(f" Rewritten: {count} hook path(s) in settings.json")
|
|
203
|
+
|
|
204
|
+
return count
|
|
205
|
+
|
|
206
|
+
|
|
166
207
|
def run_full_migration(dry_run: bool = False) -> bool:
|
|
167
|
-
"""Run complete migration: home directory + project configs.
|
|
208
|
+
"""Run complete migration: home directory + project configs + settings.json.
|
|
168
209
|
|
|
169
210
|
Returns True if any migration was performed.
|
|
170
211
|
"""
|
|
@@ -174,6 +215,7 @@ def run_full_migration(dry_run: bool = False) -> bool:
|
|
|
174
215
|
count = migrate_project_configs(dry_run=dry_run)
|
|
175
216
|
if count > 0:
|
|
176
217
|
print(f" Migrated {count} project config(s)")
|
|
218
|
+
migrate_settings_json(dry_run=dry_run)
|
|
177
219
|
|
|
178
220
|
return migrated
|
|
179
221
|
|