framework-py 0.1.0.dev28__py3-none-any.whl → 0.1.0.dev29__py3-none-any.whl
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.
- framework/__init__.py +2 -1
- framework/ai.py +9 -3
- framework/skill_pull.py +1181 -105
- framework/skill_sync.py +421 -44
- framework/sync_all.py +59 -22
- framework/upgrade.py +33 -4
- {framework_py-0.1.0.dev28.dist-info → framework_py-0.1.0.dev29.dist-info}/METADATA +7 -1
- {framework_py-0.1.0.dev28.dist-info → framework_py-0.1.0.dev29.dist-info}/RECORD +10 -10
- {framework_py-0.1.0.dev28.dist-info → framework_py-0.1.0.dev29.dist-info}/WHEEL +0 -0
- {framework_py-0.1.0.dev28.dist-info → framework_py-0.1.0.dev29.dist-info}/licenses/LICENSE +0 -0
framework/__init__.py
CHANGED
|
@@ -129,7 +129,7 @@ from framework.scaffold import project_info, scaffold, status
|
|
|
129
129
|
from framework.scratch import scratch_capture, scratch_clean
|
|
130
130
|
from framework.security import AuditResult, git_security_audit
|
|
131
131
|
from framework.settings import settings, settings_read, settings_write
|
|
132
|
-
from framework.skill_pull import pull_skills, push_skills
|
|
132
|
+
from framework.skill_pull import pull_skills, push_skills, skills_copy
|
|
133
133
|
from framework.skill_sync import skills_sync
|
|
134
134
|
from framework.snippets import load_ipython_extension as load_ipython_extension
|
|
135
135
|
from framework.snippets import snippet
|
|
@@ -275,6 +275,7 @@ __all__ = [
|
|
|
275
275
|
"settings_read",
|
|
276
276
|
"settings_write",
|
|
277
277
|
"show_table",
|
|
278
|
+
"skills_copy",
|
|
278
279
|
"skills_sync",
|
|
279
280
|
"snippet",
|
|
280
281
|
"spec_check",
|
framework/ai.py
CHANGED
|
@@ -27,7 +27,11 @@ def assistant_targets(spec: dict[str, Any]) -> tuple[list[str], list[str]]:
|
|
|
27
27
|
With no assistants selected, skills go to ``.agents/skills`` only, the
|
|
28
28
|
folder more tools read.
|
|
29
29
|
"""
|
|
30
|
-
|
|
30
|
+
chosen = spec.get("ai", {}).get("assistants", {})
|
|
31
|
+
# A mapping selects the assistants whose value is true; a list selects each one listed
|
|
32
|
+
if isinstance(chosen, dict):
|
|
33
|
+
chosen = [name for name, on in chosen.items() if on]
|
|
34
|
+
selected = [name for name in chosen if name in ASSISTANTS]
|
|
31
35
|
if not selected:
|
|
32
36
|
return [AGENTS_DEFAULT], []
|
|
33
37
|
folders = list(dict.fromkeys(ASSISTANTS[name][0] for name in selected))
|
|
@@ -141,11 +145,13 @@ def write_ai_files(root: Path, spec: dict[str, Any]) -> list[str]:
|
|
|
141
145
|
if entry.get("package") is True:
|
|
142
146
|
from framework.skill_sync import install_package
|
|
143
147
|
|
|
144
|
-
install_package(_shipped(name), root, target, name)
|
|
148
|
+
if not install_package(_shipped(name), root, target, name):
|
|
149
|
+
continue # Declined (an existing edited or Cloud copy): not written
|
|
145
150
|
elif entry.get("sync") and entry.get("bundle"):
|
|
146
151
|
from framework.skill_sync import install_cloud
|
|
147
152
|
|
|
148
|
-
install_cloud(root, target, entry)
|
|
153
|
+
if not install_cloud(root, target, entry):
|
|
154
|
+
continue
|
|
149
155
|
else:
|
|
150
156
|
_write(root, f"{target}/SKILL.md", entry["content"])
|
|
151
157
|
for relative, content in (entry.get("files") or {}).items():
|