pactkit-opencode 5.0.3__py3-none-any.whl → 5.2.1__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.
- pactkit_opencode/deployer.py +9 -8
- {pactkit_opencode-5.0.3.dist-info → pactkit_opencode-5.2.1.dist-info}/METADATA +2 -2
- pactkit_opencode-5.2.1.dist-info/RECORD +9 -0
- pactkit_opencode-5.0.3.dist-info/RECORD +0 -9
- {pactkit_opencode-5.0.3.dist-info → pactkit_opencode-5.2.1.dist-info}/WHEEL +0 -0
- {pactkit_opencode-5.0.3.dist-info → pactkit_opencode-5.2.1.dist-info}/entry_points.txt +0 -0
- {pactkit_opencode-5.0.3.dist-info → pactkit_opencode-5.2.1.dist-info}/top_level.txt +0 -0
pactkit_opencode/deployer.py
CHANGED
|
@@ -10,7 +10,6 @@ from pathlib import Path
|
|
|
10
10
|
from pactkit import __version__
|
|
11
11
|
from pactkit.config import (
|
|
12
12
|
DEFAULT_RULE_IDS,
|
|
13
|
-
VALID_AGENTS,
|
|
14
13
|
VALID_COMMANDS,
|
|
15
14
|
VALID_SKILLS,
|
|
16
15
|
activate_pactkit_maintainer_overlay,
|
|
@@ -21,7 +20,6 @@ from pactkit.generators.deploy_base import DeployerBase, register_deployer
|
|
|
21
20
|
from pactkit.generators.deployer import (
|
|
22
21
|
_cleanup_legacy,
|
|
23
22
|
_cleanup_legacy_portable_methods,
|
|
24
|
-
_deploy_agents,
|
|
25
23
|
_deploy_ci,
|
|
26
24
|
_deploy_commands,
|
|
27
25
|
_deploy_guides,
|
|
@@ -147,6 +145,11 @@ class OpenCodeDeployer(DeployerBase):
|
|
|
147
145
|
"""
|
|
148
146
|
if global_only and project_only:
|
|
149
147
|
raise ValueError("global_only and project_only are mutually exclusive")
|
|
148
|
+
# Protect direct calls and forced installs before any target changes.
|
|
149
|
+
try:
|
|
150
|
+
from pactkit.deploy_manifest import retire_bundled_roles
|
|
151
|
+
except ImportError as exc:
|
|
152
|
+
raise RuntimeError("PactKit Core 5.0.4 or newer is required by the opencode adapter") from exc
|
|
150
153
|
opencode_root = Path(target) if target else Path.home() / ".config" / "opencode"
|
|
151
154
|
project_root = Path(project_root) if project_root is not None else Path.cwd()
|
|
152
155
|
|
|
@@ -163,13 +166,12 @@ class OpenCodeDeployer(DeployerBase):
|
|
|
163
166
|
|
|
164
167
|
# Prepare directories (global components only; project-only integration
|
|
165
168
|
# writes no machine-global OpenCode state).
|
|
166
|
-
agents_dir = opencode_root / "agents"
|
|
167
169
|
skills_dir = opencode_root / "skills"
|
|
168
170
|
commands_dir = opencode_root / "commands"
|
|
169
171
|
rules_dir = opencode_root / "rules"
|
|
170
172
|
|
|
171
173
|
if not project_only:
|
|
172
|
-
for d in [opencode_root,
|
|
174
|
+
for d in [opencode_root, skills_dir, commands_dir, rules_dir]:
|
|
173
175
|
_mkdir_within(opencode_root, d)
|
|
174
176
|
|
|
175
177
|
# STORY-slim-008 R1+R2: Load config from project-level pactkit.yaml.
|
|
@@ -202,7 +204,6 @@ class OpenCodeDeployer(DeployerBase):
|
|
|
202
204
|
if not global_only:
|
|
203
205
|
cfg = activate_pactkit_maintainer_overlay(cfg, project_root)
|
|
204
206
|
|
|
205
|
-
enabled_agents = cfg.get("agents", sorted(VALID_AGENTS))
|
|
206
207
|
enabled_skills = cfg.get("skills", sorted(VALID_SKILLS))
|
|
207
208
|
enabled_commands = cfg.get("commands", sorted(VALID_COMMANDS))
|
|
208
209
|
enabled_rules = cfg.get("rules", sorted(DEFAULT_RULE_IDS))
|
|
@@ -210,7 +211,7 @@ class OpenCodeDeployer(DeployerBase):
|
|
|
210
211
|
# Apply explicit format exclusions (currently none).
|
|
211
212
|
enabled_commands = [c for c in enabled_commands if c not in OPENCODE_EXCLUDED_COMMANDS]
|
|
212
213
|
|
|
213
|
-
n_skills = n_commands =
|
|
214
|
+
n_skills = n_commands = n_plugins = 0
|
|
214
215
|
if not project_only:
|
|
215
216
|
# Deploy embedded skills (pactkit-board, pactkit-visualize, etc.)
|
|
216
217
|
# round21 #2: CLI-to-script conversion happens INSIDE _deploy_skills
|
|
@@ -275,7 +276,7 @@ class OpenCodeDeployer(DeployerBase):
|
|
|
275
276
|
_deploy_guides(opencode_root, profile=self.profile)
|
|
276
277
|
self._deploy_agents_md_inline(opencode_root)
|
|
277
278
|
|
|
278
|
-
|
|
279
|
+
retire_bundled_roles(opencode_root)
|
|
279
280
|
|
|
280
281
|
|
|
281
282
|
if not global_only:
|
|
@@ -307,7 +308,7 @@ class OpenCodeDeployer(DeployerBase):
|
|
|
307
308
|
write_deploy_manifest(opencode_root, "opencode", cfg, extra_files=extra_files)
|
|
308
309
|
|
|
309
310
|
print(
|
|
310
|
-
f"\n✅ OpenCode: {
|
|
311
|
+
f"\n✅ OpenCode: {n_skills} Skills, "
|
|
311
312
|
f"{n_commands} Commands, {n_plugins} Gate plugin → {opencode_root}"
|
|
312
313
|
)
|
|
313
314
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
pactkit_opencode/__init__.py,sha256=eUyhW1gUrXXAgcGgPjNm-eddx7rji35WuzncsAqiW5U,934
|
|
2
|
+
pactkit_opencode/declarations.py,sha256=UNPSQZWn9aeZv4cEvyzeT0mztgsMyft_hkoYGA25ceI,9257
|
|
3
|
+
pactkit_opencode/deployer.py,sha256=2cOIOIr5a9hcZXbzuYvJk1iXLCXL6FVoi3r3B1IBVWI,27923
|
|
4
|
+
pactkit_opencode/enforcement.py,sha256=aOaNYU30rF67PfJNSLXubAwJJfw88UbkE1JDDb7XGec,2897
|
|
5
|
+
pactkit_opencode-5.2.1.dist-info/METADATA,sha256=OfF5FtYwXx7RxR76WDEZ932le9gP5VbrSFtdW3LKKNE,187
|
|
6
|
+
pactkit_opencode-5.2.1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
7
|
+
pactkit_opencode-5.2.1.dist-info/entry_points.txt,sha256=By7lE89sPCfucVIOpDRWK2biKi_ZarkCltUidcCAo6Y,65
|
|
8
|
+
pactkit_opencode-5.2.1.dist-info/top_level.txt,sha256=kmFfcuDMNxmyylzdSsieob_DGbBJ43YN1_DOZMIrudA,17
|
|
9
|
+
pactkit_opencode-5.2.1.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
pactkit_opencode/__init__.py,sha256=eUyhW1gUrXXAgcGgPjNm-eddx7rji35WuzncsAqiW5U,934
|
|
2
|
-
pactkit_opencode/declarations.py,sha256=UNPSQZWn9aeZv4cEvyzeT0mztgsMyft_hkoYGA25ceI,9257
|
|
3
|
-
pactkit_opencode/deployer.py,sha256=4nh0SDpcrIb_bMj95lDmRtG8DDejsyzoiz712gQZ5MA,27852
|
|
4
|
-
pactkit_opencode/enforcement.py,sha256=aOaNYU30rF67PfJNSLXubAwJJfw88UbkE1JDDb7XGec,2897
|
|
5
|
-
pactkit_opencode-5.0.3.dist-info/METADATA,sha256=nhrOoF8QGmmOWtv55twew0hX_VWdts_QoaX7vO38HCo,187
|
|
6
|
-
pactkit_opencode-5.0.3.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
7
|
-
pactkit_opencode-5.0.3.dist-info/entry_points.txt,sha256=By7lE89sPCfucVIOpDRWK2biKi_ZarkCltUidcCAo6Y,65
|
|
8
|
-
pactkit_opencode-5.0.3.dist-info/top_level.txt,sha256=kmFfcuDMNxmyylzdSsieob_DGbBJ43YN1_DOZMIrudA,17
|
|
9
|
-
pactkit_opencode-5.0.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|