pactkit-codex 3.1.0__tar.gz → 4.1.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-3.1.0/src/pactkit_codex.egg-info → pactkit_codex-4.1.0}/PKG-INFO +2 -2
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/pyproject.toml +2 -2
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/src/pactkit_codex/deployer.py +32 -20
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0/src/pactkit_codex.egg-info}/PKG-INFO +2 -2
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/src/pactkit_codex.egg-info/requires.txt +1 -1
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/LICENSE +0 -0
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/README.md +0 -0
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/setup.cfg +0 -0
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/src/pactkit_codex/__init__.py +0 -0
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/src/pactkit_codex/declarations.py +0 -0
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/src/pactkit_codex/enforcement.py +0 -0
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/src/pactkit_codex.egg-info/SOURCES.txt +0 -0
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/src/pactkit_codex.egg-info/dependency_links.txt +0 -0
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/src/pactkit_codex.egg-info/entry_points.txt +0 -0
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/src/pactkit_codex.egg-info/top_level.txt +0 -0
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/tests/test_capability_contract.py +0 -0
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.0}/tests/test_host_body_snapshot.py +0 -0
- {pactkit_codex-3.1.0 → pactkit_codex-4.1.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: 4.1.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<4.2.0,>=4.1.0
|
|
25
25
|
Requires-Dist: tomli>=1.1.0; python_version < "3.11"
|
|
26
26
|
Dynamic: license-file
|
|
27
27
|
|
|
@@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pactkit-codex"
|
|
7
|
-
version = "
|
|
7
|
+
version = "4.1.0"
|
|
8
8
|
description = "PactKit adapter for OpenAI Codex CLI"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
11
11
|
requires-python = ">=3.10"
|
|
12
12
|
dependencies = [
|
|
13
|
-
"pactkit>=
|
|
13
|
+
"pactkit>=4.1.0,<4.2.0",
|
|
14
14
|
"tomli>=1.1.0; python_version < '3.11'",
|
|
15
15
|
]
|
|
16
16
|
|
|
@@ -45,7 +45,11 @@ from pactkit.generators.deployer import (
|
|
|
45
45
|
_cleanup_legacy_portable_methods,
|
|
46
46
|
_enforce_deploy_integrity,
|
|
47
47
|
)
|
|
48
|
-
from pactkit.generators.spi import
|
|
48
|
+
from pactkit.generators.spi import (
|
|
49
|
+
generate_config_if_missing,
|
|
50
|
+
render_prompt,
|
|
51
|
+
render_skill_md,
|
|
52
|
+
)
|
|
49
53
|
from pactkit.prompts.guides import GUIDES_FILES
|
|
50
54
|
from pactkit.prompts.rules import (
|
|
51
55
|
COMMAND_CONDITIONAL_RULES_MAP,
|
|
@@ -81,6 +85,8 @@ _CODEX_PROJECT_AGENTS_MD = """\
|
|
|
81
85
|
|
|
82
86
|
## Dev Commands
|
|
83
87
|
|
|
88
|
+
During development, run changed and mapped tests first (`pactkit regression --json <changed-files>`; a non-empty `not_run` means the result is partial). Run the full suite once at an explicit acceptance or release boundary.
|
|
89
|
+
|
|
84
90
|
```bash
|
|
85
91
|
{dev_commands}
|
|
86
92
|
```
|
|
@@ -93,7 +99,7 @@ _CODEX_LOCAL_AGENTS_MD = """\
|
|
|
93
99
|
"""
|
|
94
100
|
|
|
95
101
|
_STACK_DEV_COMMANDS = {
|
|
96
|
-
"python": "#
|
|
102
|
+
"python": "# Full acceptance suite\npython3 -m pytest tests/ -v\n\n# Lint\nruff check src/ tests/",
|
|
97
103
|
"node": "# Run tests\nnpm test\n\n# Lint\nnpm run lint",
|
|
98
104
|
"go": "# Run tests\ngo test ./...\n\n# Lint\ngolangci-lint run",
|
|
99
105
|
"java": "# Run tests\nmvn test\n\n# Lint\nmvn checkstyle:check",
|
|
@@ -152,15 +158,22 @@ class CodexDeployer(DeployerBase):
|
|
|
152
158
|
"trust_review_command": None,
|
|
153
159
|
}
|
|
154
160
|
|
|
155
|
-
def deploy(self, config=None, target=None):
|
|
156
|
-
"""Deploy PactKit configuration for Codex CLI.
|
|
161
|
+
def deploy(self, config=None, target=None, project_root=None, no_redetect=False):
|
|
162
|
+
"""Deploy PactKit configuration for Codex CLI.
|
|
163
|
+
|
|
164
|
+
``project_root`` is **not** the deploy root (``~/.codex`` is): it names
|
|
165
|
+
the project whose config and overlay are read, which used to resolve
|
|
166
|
+
from the caller's cwd. ``no_redetect`` is accepted because Core passes
|
|
167
|
+
it alongside; it is a no-op here — the stack probe only reads.
|
|
168
|
+
"""
|
|
157
169
|
codex_root = Path(target) if target else Path.home() / ".codex"
|
|
170
|
+
project_root = Path(project_root) if project_root is not None else Path.cwd()
|
|
158
171
|
|
|
159
172
|
print("🚀 PactKit Codex CLI Deployment")
|
|
160
173
|
|
|
161
174
|
from pactkit.config import find_pactkit_yaml
|
|
162
175
|
|
|
163
|
-
project_yaml = find_pactkit_yaml()
|
|
176
|
+
project_yaml = find_pactkit_yaml(project_root)
|
|
164
177
|
if config is not None:
|
|
165
178
|
cfg = config
|
|
166
179
|
elif project_yaml is not None:
|
|
@@ -170,7 +183,7 @@ class CodexDeployer(DeployerBase):
|
|
|
170
183
|
cfg = load_config(project_yaml)
|
|
171
184
|
else:
|
|
172
185
|
cfg = {}
|
|
173
|
-
cfg = activate_pactkit_maintainer_overlay(cfg,
|
|
186
|
+
cfg = activate_pactkit_maintainer_overlay(cfg, project_root)
|
|
174
187
|
|
|
175
188
|
enabled_skills = cfg.get("skills", sorted(VALID_SKILLS))
|
|
176
189
|
enabled_commands = cfg.get("commands")
|
|
@@ -182,8 +195,8 @@ class CodexDeployer(DeployerBase):
|
|
|
182
195
|
codex_root, enabled_skills, enabled_commands, cfg.get("rules", sorted(DEFAULT_RULE_IDS)),
|
|
183
196
|
)
|
|
184
197
|
|
|
185
|
-
|
|
186
|
-
with rollback_paths(self._transaction_paths(codex_root,
|
|
198
|
+
transaction_root = project_root if target is None else None # rollback scope
|
|
199
|
+
with rollback_paths(self._transaction_paths(codex_root, transaction_root)):
|
|
187
200
|
self._cleanup_stale_command_references(
|
|
188
201
|
codex_root, enabled_commands,
|
|
189
202
|
cfg.get("rules", sorted(DEFAULT_RULE_IDS)),
|
|
@@ -215,7 +228,12 @@ class CodexDeployer(DeployerBase):
|
|
|
215
228
|
self.generate_codex_config_toml(codex_root)
|
|
216
229
|
self.remove_legacy_stop_hook(codex_root)
|
|
217
230
|
|
|
218
|
-
|
|
231
|
+
# Gate on `target is None`, not on `project_root is not None`: the
|
|
232
|
+
# two coincided only while `project_root` was *derived* from this
|
|
233
|
+
# condition, making it a flag as much as an identity. Separate them
|
|
234
|
+
# and `-C` reaches the identity while an explicit `-t` install still
|
|
235
|
+
# touches nothing outside its target (measured 2026-10-02).
|
|
236
|
+
if target is None:
|
|
219
237
|
self.generate_codex_project_files(project_root)
|
|
220
238
|
|
|
221
239
|
self.write_version_marker(codex_root)
|
|
@@ -1027,17 +1045,11 @@ class CodexDeployer(DeployerBase):
|
|
|
1027
1045
|
if not local_md_path.exists():
|
|
1028
1046
|
atomic_write(local_md_path, _CODEX_LOCAL_AGENTS_MD)
|
|
1029
1047
|
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
f"stack: {stack}\n"
|
|
1036
|
-
f"version: 0.0.1\n"
|
|
1037
|
-
f"root: .\n"
|
|
1038
|
-
f'developer: ""\n'
|
|
1039
|
-
)
|
|
1040
|
-
atomic_write(yaml_path, yaml_content)
|
|
1048
|
+
# SPEC-4.0-22 Step 8 R-②-1: this adapter declares WHERE its config
|
|
1049
|
+
# lives and WHETHER it deploys; Core's canonical format-aware generator
|
|
1050
|
+
# owns the content. The template this replaced wrote `stack: unknown`,
|
|
1051
|
+
# a value Core's own validator rejects — see the classification row.
|
|
1052
|
+
generate_config_if_missing(format="codex", project_root=project_root)
|
|
1041
1053
|
|
|
1042
1054
|
@staticmethod
|
|
1043
1055
|
def deploy_codex_skills(skills_dir, enabled_skills, profile):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pactkit-codex
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.1.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<4.2.0,>=4.1.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
|