pactkit-codex 4.4.2__tar.gz → 5.0.0__tar.gz
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_codex-4.4.2/src/pactkit_codex.egg-info → pactkit_codex-5.0.0}/PKG-INFO +2 -2
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/pyproject.toml +2 -2
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/src/pactkit_codex/deployer.py +62 -46
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0/src/pactkit_codex.egg-info}/PKG-INFO +2 -2
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/src/pactkit_codex.egg-info/requires.txt +1 -1
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/LICENSE +0 -0
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/README.md +0 -0
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/setup.cfg +0 -0
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/src/pactkit_codex/__init__.py +0 -0
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/src/pactkit_codex/declarations.py +0 -0
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/src/pactkit_codex/enforcement.py +0 -0
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/src/pactkit_codex.egg-info/SOURCES.txt +0 -0
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/src/pactkit_codex.egg-info/dependency_links.txt +0 -0
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/src/pactkit_codex.egg-info/entry_points.txt +0 -0
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/src/pactkit_codex.egg-info/top_level.txt +0 -0
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/tests/test_capability_contract.py +0 -0
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/tests/test_host_body_snapshot.py +0 -0
- {pactkit_codex-4.4.2 → pactkit_codex-5.0.0}/tests/test_profile_contract.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pactkit-codex
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0.0
|
|
4
4
|
Summary: PactKit adapter for OpenAI Codex CLI
|
|
5
5
|
Author: Slim
|
|
6
6
|
License: MIT
|
|
@@ -21,7 +21,7 @@ Classifier: Topic :: Software Development :: Quality Assurance
|
|
|
21
21
|
Requires-Python: >=3.10
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
|
-
Requires-Dist: pactkit<
|
|
24
|
+
Requires-Dist: pactkit<5.1.0,>=5.0.0
|
|
25
25
|
Requires-Dist: tomli>=1.1.0; python_version < "3.11"
|
|
26
26
|
Dynamic: license-file
|
|
27
27
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pactkit-codex"
|
|
7
|
-
version = "
|
|
7
|
+
version = "5.0.0"
|
|
8
8
|
description = "PactKit adapter for OpenAI Codex CLI"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -14,7 +14,7 @@ dependencies = [
|
|
|
14
14
|
# `pactkit.managed_docs.upsert_managed_block`, which first ships in
|
|
15
15
|
# core 4.1.3. The previous floor (>=4.1.0) allowed a released-core
|
|
16
16
|
# combination whose deploy raises ImportError.
|
|
17
|
-
"pactkit>=
|
|
17
|
+
"pactkit>=5.0.0,<5.1.0",
|
|
18
18
|
"tomli>=1.1.0; python_version < '3.11'",
|
|
19
19
|
]
|
|
20
20
|
|
|
@@ -158,14 +158,22 @@ class CodexDeployer(DeployerBase):
|
|
|
158
158
|
"trust_review_command": None,
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
def deploy(self, config=None, target=None, project_root=None, no_redetect=False
|
|
161
|
+
def deploy(self, config=None, target=None, project_root=None, no_redetect=False,
|
|
162
|
+
global_only=False, project_only=False):
|
|
162
163
|
"""Deploy PactKit configuration for Codex CLI.
|
|
163
164
|
|
|
164
165
|
``project_root`` is **not** the deploy root (``~/.codex`` is): it names
|
|
165
166
|
the project whose config and overlay are read, which used to resolve
|
|
166
167
|
from the caller's cwd. ``no_redetect`` is accepted because Core passes
|
|
167
168
|
it alongside; it is a no-op here — the stack probe only reads.
|
|
169
|
+
|
|
170
|
+
``global_only`` (STORY-slim-20261125f4db76f08fc5): a global Host
|
|
171
|
+
deployment must not read or write any project file. ``project_only``
|
|
172
|
+
(R3, ``pactkit integrate``) is the inverse: write only project files,
|
|
173
|
+
never re-deploy the machine-global Codex components other projects load.
|
|
168
174
|
"""
|
|
175
|
+
if global_only and project_only:
|
|
176
|
+
raise ValueError("global_only and project_only are mutually exclusive")
|
|
169
177
|
codex_root = Path(target) if target else Path.home() / ".codex"
|
|
170
178
|
project_root = Path(project_root) if project_root is not None else Path.cwd()
|
|
171
179
|
|
|
@@ -173,7 +181,7 @@ class CodexDeployer(DeployerBase):
|
|
|
173
181
|
|
|
174
182
|
from pactkit.config import find_pactkit_yaml
|
|
175
183
|
|
|
176
|
-
project_yaml = find_pactkit_yaml(project_root)
|
|
184
|
+
project_yaml = None if global_only else find_pactkit_yaml(project_root)
|
|
177
185
|
if config is not None:
|
|
178
186
|
cfg = config
|
|
179
187
|
elif project_yaml is not None:
|
|
@@ -183,63 +191,71 @@ class CodexDeployer(DeployerBase):
|
|
|
183
191
|
cfg = load_config(project_yaml)
|
|
184
192
|
else:
|
|
185
193
|
cfg = {}
|
|
186
|
-
|
|
194
|
+
if not global_only:
|
|
195
|
+
cfg = activate_pactkit_maintainer_overlay(cfg, project_root)
|
|
187
196
|
|
|
188
197
|
enabled_skills = cfg.get("skills", sorted(VALID_SKILLS))
|
|
189
198
|
enabled_commands = cfg.get("commands")
|
|
190
199
|
|
|
191
|
-
|
|
192
|
-
#
|
|
193
|
-
#
|
|
194
|
-
|
|
195
|
-
codex_root, enabled_skills, enabled_commands, cfg.get("rules", sorted(DEFAULT_RULE_IDS)),
|
|
196
|
-
config=cfg,
|
|
197
|
-
)
|
|
198
|
-
|
|
199
|
-
transaction_root = project_root if target is None else None # rollback scope
|
|
200
|
+
n_skills = n_commands = 0
|
|
201
|
+
# A global-only deployment never touches the project, so the rollback
|
|
202
|
+
# scope must not include project paths either.
|
|
203
|
+
transaction_root = project_root if (target is None and not global_only) else None
|
|
200
204
|
with rollback_paths(self._transaction_paths(codex_root, transaction_root)):
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
205
|
+
# Project-only integration writes NO machine-global Codex components
|
|
206
|
+
# (R3): integrating a project must not re-select what other projects
|
|
207
|
+
# load. Only the default mixed path deploys global components.
|
|
208
|
+
if not project_only:
|
|
209
|
+
# Validate the complete generated artifact set before touching the
|
|
210
|
+
# current installation. A rejected rule, command, skill, or AGENTS
|
|
211
|
+
# document must preserve the prior usable Codex deployment.
|
|
212
|
+
self._preflight_deploy_artifacts(
|
|
213
|
+
codex_root, enabled_skills, enabled_commands, cfg.get("rules", sorted(DEFAULT_RULE_IDS)),
|
|
214
|
+
config=cfg,
|
|
215
|
+
)
|
|
216
|
+
self._cleanup_stale_command_references(
|
|
217
|
+
codex_root, enabled_commands,
|
|
218
|
+
cfg.get("rules", sorted(DEFAULT_RULE_IDS)),
|
|
219
|
+
)
|
|
220
|
+
skills_dir = codex_root / "skills"
|
|
221
|
+
skills_dir.mkdir(parents=True, exist_ok=True)
|
|
222
|
+
_cleanup_legacy_portable_methods(skills_dir, self.profile)
|
|
223
|
+
n_skills = self.deploy_codex_skills(skills_dir, enabled_skills, self.profile)
|
|
224
|
+
n_commands = self.deploy_codex_command_skills(
|
|
225
|
+
skills_dir, self.profile, enabled_commands=enabled_commands,
|
|
226
|
+
maintainer_overlay=cfg.get("_pactkit_self_development", False),
|
|
227
|
+
enabled_rules=cfg.get("rules", sorted(DEFAULT_RULE_IDS)),
|
|
228
|
+
config=cfg,
|
|
229
|
+
)
|
|
230
|
+
_cleanup_legacy(skills_dir)
|
|
231
|
+
# Legacy prompt/playbook directories have no ownership manifest.
|
|
232
|
+
# Their names alone are not deletion authority, so leave them for
|
|
233
|
+
# explicit user review instead of recursively deleting user content.
|
|
234
|
+
|
|
235
|
+
rules_dir = codex_root / "rules"
|
|
236
|
+
rules_dir.mkdir(parents=True, exist_ok=True)
|
|
237
|
+
self.deploy_codex_rules(
|
|
238
|
+
rules_dir, self.profile, enabled_commands=enabled_commands,
|
|
239
|
+
enabled_rules=cfg.get("rules", sorted(DEFAULT_RULE_IDS)),
|
|
240
|
+
)
|
|
241
|
+
self.deploy_codex_agents_md(
|
|
242
|
+
codex_root, self.profile, enabled_commands=enabled_commands,
|
|
243
|
+
enabled_rules=cfg.get("rules", sorted(DEFAULT_RULE_IDS)),
|
|
244
|
+
)
|
|
245
|
+
self.generate_codex_config_toml(codex_root)
|
|
246
|
+
self.remove_legacy_stop_hook(codex_root)
|
|
232
247
|
|
|
233
248
|
# Gate on `target is None`, not on `project_root is not None`: the
|
|
234
249
|
# two coincided only while `project_root` was *derived* from this
|
|
235
250
|
# condition, making it a flag as much as an identity. Separate them
|
|
236
251
|
# and `-C` reaches the identity while an explicit `-t` install still
|
|
237
252
|
# touches nothing outside its target (measured 2026-10-02).
|
|
238
|
-
if target is None:
|
|
253
|
+
if target is None and not global_only:
|
|
239
254
|
self.generate_codex_project_files(project_root)
|
|
240
255
|
|
|
241
|
-
|
|
242
|
-
|
|
256
|
+
if not project_only:
|
|
257
|
+
self.write_version_marker(codex_root)
|
|
258
|
+
self._write_deployment_manifest(codex_root, cfg)
|
|
243
259
|
|
|
244
260
|
print(
|
|
245
261
|
f"\n✅ Codex CLI: {n_skills} Skills, {n_commands} Commands → {codex_root}"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pactkit-codex
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0.0
|
|
4
4
|
Summary: PactKit adapter for OpenAI Codex CLI
|
|
5
5
|
Author: Slim
|
|
6
6
|
License: MIT
|
|
@@ -21,7 +21,7 @@ Classifier: Topic :: Software Development :: Quality Assurance
|
|
|
21
21
|
Requires-Python: >=3.10
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
|
-
Requires-Dist: pactkit<
|
|
24
|
+
Requires-Dist: pactkit<5.1.0,>=5.0.0
|
|
25
25
|
Requires-Dist: tomli>=1.1.0; python_version < "3.11"
|
|
26
26
|
Dynamic: license-file
|
|
27
27
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|