pactkit-codex 4.0.0__tar.gz → 4.1.1__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.0.0/src/pactkit_codex.egg-info → pactkit_codex-4.1.1}/PKG-INFO +2 -2
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/pyproject.toml +6 -2
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/src/pactkit_codex/deployer.py +44 -17
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1/src/pactkit_codex.egg-info}/PKG-INFO +2 -2
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/src/pactkit_codex.egg-info/requires.txt +1 -1
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/LICENSE +0 -0
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/README.md +0 -0
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/setup.cfg +0 -0
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/src/pactkit_codex/__init__.py +0 -0
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/src/pactkit_codex/declarations.py +0 -0
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/src/pactkit_codex/enforcement.py +0 -0
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/src/pactkit_codex.egg-info/SOURCES.txt +0 -0
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/src/pactkit_codex.egg-info/dependency_links.txt +0 -0
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/src/pactkit_codex.egg-info/entry_points.txt +0 -0
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/src/pactkit_codex.egg-info/top_level.txt +0 -0
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/tests/test_capability_contract.py +0 -0
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/tests/test_host_body_snapshot.py +0 -0
- {pactkit_codex-4.0.0 → pactkit_codex-4.1.1}/tests/test_profile_contract.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pactkit-codex
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.1.1
|
|
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<4.
|
|
24
|
+
Requires-Dist: pactkit<4.2.0,>=4.1.3
|
|
25
25
|
Requires-Dist: tomli>=1.1.0; python_version < "3.11"
|
|
26
26
|
Dynamic: license-file
|
|
27
27
|
|
|
@@ -4,13 +4,17 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pactkit-codex"
|
|
7
|
-
version = "4.
|
|
7
|
+
version = "4.1.1"
|
|
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
|
-
|
|
13
|
+
# 2026-10-14: the project-level AGENTS.md write goes through
|
|
14
|
+
# `pactkit.managed_docs.upsert_managed_block`, which first ships in
|
|
15
|
+
# core 4.1.3. The previous floor (>=4.1.0) allowed a released-core
|
|
16
|
+
# combination whose deploy raises ImportError.
|
|
17
|
+
"pactkit>=4.1.3,<4.2.0",
|
|
14
18
|
"tomli>=1.1.0; python_version < '3.11'",
|
|
15
19
|
]
|
|
16
20
|
|
|
@@ -85,6 +85,8 @@ _CODEX_PROJECT_AGENTS_MD = """\
|
|
|
85
85
|
|
|
86
86
|
## Dev Commands
|
|
87
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
|
+
|
|
88
90
|
```bash
|
|
89
91
|
{dev_commands}
|
|
90
92
|
```
|
|
@@ -97,7 +99,7 @@ _CODEX_LOCAL_AGENTS_MD = """\
|
|
|
97
99
|
"""
|
|
98
100
|
|
|
99
101
|
_STACK_DEV_COMMANDS = {
|
|
100
|
-
"python": "#
|
|
102
|
+
"python": "# Full acceptance suite\npython3 -m pytest tests/ -v\n\n# Lint\nruff check src/ tests/",
|
|
101
103
|
"node": "# Run tests\nnpm test\n\n# Lint\nnpm run lint",
|
|
102
104
|
"go": "# Run tests\ngo test ./...\n\n# Lint\ngolangci-lint run",
|
|
103
105
|
"java": "# Run tests\nmvn test\n\n# Lint\nmvn checkstyle:check",
|
|
@@ -156,15 +158,22 @@ class CodexDeployer(DeployerBase):
|
|
|
156
158
|
"trust_review_command": None,
|
|
157
159
|
}
|
|
158
160
|
|
|
159
|
-
def deploy(self, config=None, target=None):
|
|
160
|
-
"""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
|
+
"""
|
|
161
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()
|
|
162
171
|
|
|
163
172
|
print("🚀 PactKit Codex CLI Deployment")
|
|
164
173
|
|
|
165
174
|
from pactkit.config import find_pactkit_yaml
|
|
166
175
|
|
|
167
|
-
project_yaml = find_pactkit_yaml()
|
|
176
|
+
project_yaml = find_pactkit_yaml(project_root)
|
|
168
177
|
if config is not None:
|
|
169
178
|
cfg = config
|
|
170
179
|
elif project_yaml is not None:
|
|
@@ -174,7 +183,7 @@ class CodexDeployer(DeployerBase):
|
|
|
174
183
|
cfg = load_config(project_yaml)
|
|
175
184
|
else:
|
|
176
185
|
cfg = {}
|
|
177
|
-
cfg = activate_pactkit_maintainer_overlay(cfg,
|
|
186
|
+
cfg = activate_pactkit_maintainer_overlay(cfg, project_root)
|
|
178
187
|
|
|
179
188
|
enabled_skills = cfg.get("skills", sorted(VALID_SKILLS))
|
|
180
189
|
enabled_commands = cfg.get("commands")
|
|
@@ -186,8 +195,8 @@ class CodexDeployer(DeployerBase):
|
|
|
186
195
|
codex_root, enabled_skills, enabled_commands, cfg.get("rules", sorted(DEFAULT_RULE_IDS)),
|
|
187
196
|
)
|
|
188
197
|
|
|
189
|
-
|
|
190
|
-
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)):
|
|
191
200
|
self._cleanup_stale_command_references(
|
|
192
201
|
codex_root, enabled_commands,
|
|
193
202
|
cfg.get("rules", sorted(DEFAULT_RULE_IDS)),
|
|
@@ -219,7 +228,12 @@ class CodexDeployer(DeployerBase):
|
|
|
219
228
|
self.generate_codex_config_toml(codex_root)
|
|
220
229
|
self.remove_legacy_stop_hook(codex_root)
|
|
221
230
|
|
|
222
|
-
|
|
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:
|
|
223
237
|
self.generate_codex_project_files(project_root)
|
|
224
238
|
|
|
225
239
|
self.write_version_marker(codex_root)
|
|
@@ -1002,7 +1016,14 @@ class CodexDeployer(DeployerBase):
|
|
|
1002
1016
|
|
|
1003
1017
|
@staticmethod
|
|
1004
1018
|
def generate_codex_project_files(project_root):
|
|
1005
|
-
"""Generate project-level AGENTS.md, .codex/AGENTS.local.md, and .codex/pactkit.yaml.
|
|
1019
|
+
"""Generate project-level AGENTS.md, .codex/AGENTS.local.md, and .codex/pactkit.yaml.
|
|
1020
|
+
|
|
1021
|
+
``AGENTS.md`` is merge-semantics (2026-10-14, STORY-010 AC1/AC4
|
|
1022
|
+
re-adjudicated): it carries the project's own rules, so only PactKit's
|
|
1023
|
+
marked region is ours. The whole-file rewrite and the title-based
|
|
1024
|
+
"migration" into ``AGENTS.local.md`` are gone — a matching title was
|
|
1025
|
+
never ownership proof, and both destroyed project rules.
|
|
1026
|
+
"""
|
|
1006
1027
|
if project_root.resolve() == Path.home().resolve():
|
|
1007
1028
|
return
|
|
1008
1029
|
|
|
@@ -1014,19 +1035,18 @@ class CodexDeployer(DeployerBase):
|
|
|
1014
1035
|
agents_md_path = project_root / "AGENTS.md"
|
|
1015
1036
|
local_md_path = codex_dir / "AGENTS.local.md"
|
|
1016
1037
|
|
|
1017
|
-
if agents_md_path.exists() and not local_md_path.exists():
|
|
1018
|
-
existing = agents_md_path.read_text()
|
|
1019
|
-
expected_first_line = f"# {project_name}"
|
|
1020
|
-
first_line = existing.split("\n", 1)[0].strip()
|
|
1021
|
-
if first_line != expected_first_line:
|
|
1022
|
-
atomic_write(local_md_path, existing)
|
|
1023
|
-
|
|
1024
1038
|
dev_commands = _STACK_DEV_COMMANDS.get(stack, _STACK_DEV_COMMANDS["unknown"])
|
|
1025
1039
|
content = _CODEX_PROJECT_AGENTS_MD.format(
|
|
1026
1040
|
project_name=project_name,
|
|
1027
1041
|
dev_commands=dev_commands,
|
|
1042
|
+
).rstrip("\n")
|
|
1043
|
+
|
|
1044
|
+
from pactkit.managed_docs import upsert_managed_block
|
|
1045
|
+
|
|
1046
|
+
upsert_managed_block(
|
|
1047
|
+
agents_md_path, content,
|
|
1048
|
+
ownership=(project_root, "AGENTS.md"), backup_root=codex_dir,
|
|
1028
1049
|
)
|
|
1029
|
-
atomic_write(agents_md_path, content)
|
|
1030
1050
|
|
|
1031
1051
|
if not local_md_path.exists():
|
|
1032
1052
|
atomic_write(local_md_path, _CODEX_LOCAL_AGENTS_MD)
|
|
@@ -1229,6 +1249,13 @@ Stop at the failing stage and report the evidence needed to resume in this
|
|
|
1229
1249
|
same session. Checkpoints are optional handover context; they never block a
|
|
1230
1250
|
later command or require a run ID.
|
|
1231
1251
|
|
|
1252
|
+
Handover notes are optional. When they help, retain the current objective and
|
|
1253
|
+
confirmed corrections, target worktree/branch/revision, completed work with
|
|
1254
|
+
evidence references, remaining gaps, and the next useful action. Omit unknowns,
|
|
1255
|
+
credentials, and chat transcripts. Authorization does not carry forward;
|
|
1256
|
+
re-check the current user's instruction. A missing handover never blocks work
|
|
1257
|
+
in this session.
|
|
1258
|
+
|
|
1232
1259
|
## Backlog mode
|
|
1233
1260
|
|
|
1234
1261
|
With empty `$ARGUMENTS`, inspect the board and run eligible Stories one at a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pactkit-codex
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.1.1
|
|
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<4.
|
|
24
|
+
Requires-Dist: pactkit<4.2.0,>=4.1.3
|
|
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
|