pactkit-codex 4.4.0__tar.gz → 4.4.2__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.0/src/pactkit_codex.egg-info → pactkit_codex-4.4.2}/PKG-INFO +2 -2
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/pyproject.toml +2 -2
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/src/pactkit_codex/deployer.py +36 -6
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2/src/pactkit_codex.egg-info}/PKG-INFO +2 -2
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/src/pactkit_codex.egg-info/requires.txt +1 -1
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/LICENSE +0 -0
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/README.md +0 -0
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/setup.cfg +0 -0
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/src/pactkit_codex/__init__.py +0 -0
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/src/pactkit_codex/declarations.py +0 -0
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/src/pactkit_codex/enforcement.py +0 -0
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/src/pactkit_codex.egg-info/SOURCES.txt +0 -0
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/src/pactkit_codex.egg-info/dependency_links.txt +0 -0
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/src/pactkit_codex.egg-info/entry_points.txt +0 -0
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/src/pactkit_codex.egg-info/top_level.txt +0 -0
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/tests/test_capability_contract.py +0 -0
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/tests/test_host_body_snapshot.py +0 -0
- {pactkit_codex-4.4.0 → pactkit_codex-4.4.2}/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.4.
|
|
3
|
+
Version: 4.4.2
|
|
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.5.0,>=4.4.
|
|
24
|
+
Requires-Dist: pactkit<4.5.0,>=4.4.2
|
|
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 = "4.4.
|
|
7
|
+
version = "4.4.2"
|
|
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>=4.4.
|
|
17
|
+
"pactkit>=4.4.2,<4.5.0",
|
|
18
18
|
"tomli>=1.1.0; python_version < '3.11'",
|
|
19
19
|
]
|
|
20
20
|
|
|
@@ -193,6 +193,7 @@ class CodexDeployer(DeployerBase):
|
|
|
193
193
|
# document must preserve the prior usable Codex deployment.
|
|
194
194
|
self._preflight_deploy_artifacts(
|
|
195
195
|
codex_root, enabled_skills, enabled_commands, cfg.get("rules", sorted(DEFAULT_RULE_IDS)),
|
|
196
|
+
config=cfg,
|
|
196
197
|
)
|
|
197
198
|
|
|
198
199
|
transaction_root = project_root if target is None else None # rollback scope
|
|
@@ -209,6 +210,7 @@ class CodexDeployer(DeployerBase):
|
|
|
209
210
|
skills_dir, self.profile, enabled_commands=enabled_commands,
|
|
210
211
|
maintainer_overlay=cfg.get("_pactkit_self_development", False),
|
|
211
212
|
enabled_rules=cfg.get("rules", sorted(DEFAULT_RULE_IDS)),
|
|
213
|
+
config=cfg,
|
|
212
214
|
)
|
|
213
215
|
_cleanup_legacy(skills_dir)
|
|
214
216
|
# Legacy prompt/playbook directories have no ownership manifest.
|
|
@@ -461,7 +463,7 @@ class CodexDeployer(DeployerBase):
|
|
|
461
463
|
json.dumps(manifest, indent=2, ensure_ascii=False) + "\n",
|
|
462
464
|
)
|
|
463
465
|
|
|
464
|
-
def _preflight_deploy_artifacts(self, codex_root, enabled_skills, enabled_commands, enabled_rules):
|
|
466
|
+
def _preflight_deploy_artifacts(self, codex_root, enabled_skills, enabled_commands, enabled_rules, config=None):
|
|
465
467
|
"""Render all managed artifacts in isolation before live deployment."""
|
|
466
468
|
codex_root.parent.mkdir(parents=True, exist_ok=True)
|
|
467
469
|
stage_root = Path(tempfile.mkdtemp(prefix=".pactkit-stage-", dir=codex_root.parent))
|
|
@@ -472,6 +474,7 @@ class CodexDeployer(DeployerBase):
|
|
|
472
474
|
skills_dir, self.profile, enabled_commands=enabled_commands,
|
|
473
475
|
maintainer_overlay=enabled_rules and "pactkit-maintainer" in enabled_rules,
|
|
474
476
|
enabled_rules=enabled_rules,
|
|
477
|
+
config=config,
|
|
475
478
|
)
|
|
476
479
|
self.deploy_codex_rules(
|
|
477
480
|
stage_root / "rules", self.profile, enabled_commands=enabled_commands,
|
|
@@ -735,12 +738,18 @@ class CodexDeployer(DeployerBase):
|
|
|
735
738
|
raw_content = _truncate_agents_md(raw_content, MAX_SIZE)
|
|
736
739
|
|
|
737
740
|
_enforce_deploy_integrity(raw_content, profile, "AGENTS.md")
|
|
738
|
-
|
|
741
|
+
# Global AGENTS.md is a user document with a PactKit-managed region;
|
|
742
|
+
# merge-semantics preserve user content (STORY-slim-20261120528a3b6615d3).
|
|
743
|
+
# No ownership gate here: the deploy transaction (rollback_paths) provides
|
|
744
|
+
# atomicity, and a project-scoped ownership record would escape it.
|
|
745
|
+
from pactkit.managed_docs import RUNTIME_INDEX_VERSION_RE, upsert_managed_block
|
|
746
|
+
upsert_managed_block(codex_root / "AGENTS.md", raw_content,
|
|
747
|
+
legacy_version_pattern=RUNTIME_INDEX_VERSION_RE)
|
|
739
748
|
|
|
740
749
|
@staticmethod
|
|
741
750
|
def deploy_codex_command_skills(
|
|
742
751
|
skills_dir, profile, enabled_commands=None, maintainer_overlay=False,
|
|
743
|
-
enabled_rules=None,
|
|
752
|
+
enabled_rules=None, config=None,
|
|
744
753
|
):
|
|
745
754
|
"""Deploy PDCA commands as skills/{name}/SKILL.md (unified with Claude Code)."""
|
|
746
755
|
deployed = 0
|
|
@@ -796,6 +805,8 @@ class CodexDeployer(DeployerBase):
|
|
|
796
805
|
description = line.split(":", 1)[1].strip().strip('"')
|
|
797
806
|
content = parts[2].lstrip("\n")
|
|
798
807
|
|
|
808
|
+
from pactkit.generators.deployer import _strip_disabled_conditional_body
|
|
809
|
+
content = _strip_disabled_conditional_body(content, cmd_name, enabled_rule_ids)
|
|
799
810
|
content = render_prompt(content, profile)
|
|
800
811
|
if cmd_name == "project-sprint":
|
|
801
812
|
description = "Sequential PDCA in the current Codex session"
|
|
@@ -831,9 +842,15 @@ class CodexDeployer(DeployerBase):
|
|
|
831
842
|
# Compose selected phase/shared rules into SKILL.md at build time.
|
|
832
843
|
# Codex does not document Claude-style Markdown @imports, so the
|
|
833
844
|
# activated skill must carry its complete operational contract.
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
845
|
+
# Unified rule selection (STORY-slim-202611230d9bcb6df0cc): honor
|
|
846
|
+
# command_rules overrides via the core selector, like the other hosts.
|
|
847
|
+
if config is not None:
|
|
848
|
+
from pactkit.generators.deployer import _get_command_rules
|
|
849
|
+
rule_keys = _get_command_rules(cmd_name, config)
|
|
850
|
+
else:
|
|
851
|
+
rule_keys = COMMAND_RULES_MAP.get(cmd_name, ["runtime"])
|
|
852
|
+
if maintainer_overlay:
|
|
853
|
+
rule_keys = [*rule_keys, "pactkit-maintainer"]
|
|
837
854
|
inline_rules = []
|
|
838
855
|
for key in rule_keys:
|
|
839
856
|
if key == "runtime":
|
|
@@ -891,6 +908,19 @@ class CodexDeployer(DeployerBase):
|
|
|
891
908
|
for filename, guide_content in GUIDES_FILES.items()
|
|
892
909
|
})
|
|
893
910
|
references_by_command[cmd_name] = command_references
|
|
911
|
+
# R4 (STORY-slim-202611230d9bcb6df0cc): a generated command must not
|
|
912
|
+
# reference a file the deployment does not produce. Fail before write
|
|
913
|
+
# so the preflight rejects and the prior usable deployment survives.
|
|
914
|
+
from pactkit.generators.deployer import (
|
|
915
|
+
DeployIntegrityError,
|
|
916
|
+
_dangling_command_references,
|
|
917
|
+
)
|
|
918
|
+
dangling = _dangling_command_references(skill_content, command_references)
|
|
919
|
+
if dangling:
|
|
920
|
+
raise DeployIntegrityError(
|
|
921
|
+
f"command_skill:{cmd_name}",
|
|
922
|
+
[f"dangling reference: references/{d}" for d in dangling],
|
|
923
|
+
)
|
|
894
924
|
|
|
895
925
|
# Rendering/validation succeeded. Capture the previous ownership but
|
|
896
926
|
# do not delete anything until selected commands and their new manifest
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pactkit-codex
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.2
|
|
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.5.0,>=4.4.
|
|
24
|
+
Requires-Dist: pactkit<4.5.0,>=4.4.2
|
|
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
|