@softspark/ai-toolkit 2.0.1 → 2.1.0
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 +37 -0
- package/README.md +49 -20
- package/app/ARCHITECTURE.md +1 -1
- package/app/plugins/README.md +6 -2
- package/app/skills/plugin-creator/SKILL.md +3 -4
- package/bin/ai-toolkit.js +20 -7
- package/kb/procedures/maintenance-sop.md +64 -16
- package/kb/procedures/release-preparation-sop.md +4 -2
- package/kb/procedures/release-verification-sop.md +15 -13
- package/kb/reference/architecture-overview.md +44 -5
- package/kb/reference/claude-ecosystem-expansion-foundations.md +4 -4
- package/kb/reference/codex-cli-compatibility.md +136 -0
- package/kb/reference/extension-api.md +23 -6
- package/kb/reference/global-install-model.md +62 -5
- package/kb/reference/mcp-editor-compatibility.md +62 -0
- package/kb/reference/mcp-templates.md +32 -6
- package/kb/reference/plugin-pack-conventions.md +22 -21
- package/kb/reference/skills-catalog.md +27 -5
- package/llms-full.txt +508 -84
- package/llms.txt +2 -0
- package/package.json +5 -4
- package/scripts/codex_skill_adapter.py +295 -0
- package/scripts/dir_rules_shared.py +46 -7
- package/scripts/generate_cline_rules.py +11 -2
- package/scripts/generate_codex.py +92 -0
- package/scripts/generate_codex_hooks.py +78 -0
- package/scripts/generate_codex_rules.py +51 -0
- package/scripts/install_steps/ai_tools.py +83 -4
- package/scripts/mcp_editors.py +340 -0
- package/scripts/mcp_manager.py +125 -13
- package/scripts/migrate.py +11 -27
- package/scripts/plugin.py +745 -301
- package/scripts/plugin_schema.py +16 -1
package/scripts/migrate.py
CHANGED
|
@@ -21,7 +21,6 @@ import json
|
|
|
21
21
|
import os
|
|
22
22
|
import shutil
|
|
23
23
|
import sys
|
|
24
|
-
from datetime import datetime, timezone
|
|
25
24
|
from pathlib import Path
|
|
26
25
|
|
|
27
26
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
@@ -36,14 +35,16 @@ from paths import (
|
|
|
36
35
|
)
|
|
37
36
|
|
|
38
37
|
|
|
39
|
-
MIGRATED_MARKER = LEGACY_DATA_DIR / ".migrated"
|
|
40
|
-
|
|
41
|
-
|
|
42
38
|
def needs_migration() -> bool:
|
|
43
|
-
"""Check if legacy directory exists and
|
|
39
|
+
"""Check if legacy directory exists and needs migration.
|
|
40
|
+
|
|
41
|
+
Returns True only when ~/.ai-toolkit/ exists AND contains real data
|
|
42
|
+
(not just an empty dir). After migration the directory is removed entirely.
|
|
43
|
+
"""
|
|
44
44
|
if not LEGACY_DATA_DIR.is_dir():
|
|
45
45
|
return False
|
|
46
|
-
|
|
46
|
+
# Empty dir (or only hidden files) — nothing to migrate
|
|
47
|
+
if not any(LEGACY_DATA_DIR.iterdir()):
|
|
47
48
|
return False
|
|
48
49
|
# Don't migrate if AI_TOOLKIT_HOME is set (custom setup)
|
|
49
50
|
if os.environ.get("AI_TOOLKIT_HOME"):
|
|
@@ -77,11 +78,10 @@ def migrate_home_directory(dry_run: bool = False) -> bool:
|
|
|
77
78
|
else:
|
|
78
79
|
# Clean move
|
|
79
80
|
shutil.move(str(LEGACY_DATA_DIR), str(TOOLKIT_DATA_DIR))
|
|
80
|
-
# Recreate legacy dir for marker
|
|
81
|
-
LEGACY_DATA_DIR.mkdir(parents=True, exist_ok=True)
|
|
82
81
|
|
|
83
|
-
#
|
|
84
|
-
|
|
82
|
+
# Remove legacy directory entirely
|
|
83
|
+
if LEGACY_DATA_DIR.exists():
|
|
84
|
+
shutil.rmtree(str(LEGACY_DATA_DIR), ignore_errors=True)
|
|
85
85
|
|
|
86
86
|
print(f" Migrated: {TOOLKIT_DATA_DIR}")
|
|
87
87
|
return True
|
|
@@ -103,21 +103,6 @@ def _merge_directories(src: Path, dst: Path) -> None:
|
|
|
103
103
|
shutil.move(str(item), str(dest_item))
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
def _write_marker() -> None:
|
|
107
|
-
"""Write .migrated marker pointing to new location."""
|
|
108
|
-
LEGACY_DATA_DIR.mkdir(parents=True, exist_ok=True)
|
|
109
|
-
now = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
|
110
|
-
marker_data = {
|
|
111
|
-
"migrated_to": str(TOOLKIT_DATA_DIR),
|
|
112
|
-
"migrated_at": now,
|
|
113
|
-
"message": "ai-toolkit data has moved to ~/.softspark/ai-toolkit/. "
|
|
114
|
-
"This directory is kept as a marker. Safe to delete.",
|
|
115
|
-
}
|
|
116
|
-
with open(MIGRATED_MARKER, "w", encoding="utf-8") as f:
|
|
117
|
-
json.dump(marker_data, f, indent=2)
|
|
118
|
-
f.write("\n")
|
|
119
|
-
|
|
120
|
-
|
|
121
106
|
def migrate_project_configs(dry_run: bool = False) -> int:
|
|
122
107
|
"""Rename .ai-toolkit.json → .softspark-toolkit.json in registered projects.
|
|
123
108
|
|
|
@@ -231,8 +216,7 @@ def main() -> None:
|
|
|
231
216
|
|
|
232
217
|
if success:
|
|
233
218
|
print()
|
|
234
|
-
print("Migration complete.
|
|
235
|
-
print("migration marker and can be safely deleted.")
|
|
219
|
+
print("Migration complete. ~/.ai-toolkit/ has been removed.")
|
|
236
220
|
elif not dry_run:
|
|
237
221
|
print("Migration skipped.")
|
|
238
222
|
|