pactkit-opencode 2.11.0__tar.gz → 2.20.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.
Files changed (19) hide show
  1. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/PKG-INFO +2 -2
  2. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/pyproject.toml +2 -2
  3. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/src/pactkit_opencode/deployer.py +16 -6
  4. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/src/pactkit_opencode.egg-info/PKG-INFO +2 -2
  5. pactkit_opencode-2.20.0/src/pactkit_opencode.egg-info/requires.txt +1 -0
  6. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/tests/test_story069_opencode_format.py +5 -4
  7. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/tests/test_story071_opencode_config_parity.py +4 -3
  8. pactkit_opencode-2.11.0/src/pactkit_opencode.egg-info/requires.txt +0 -1
  9. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/README.md +0 -0
  10. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/setup.cfg +0 -0
  11. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/src/pactkit_opencode/__init__.py +0 -0
  12. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/src/pactkit_opencode.egg-info/SOURCES.txt +0 -0
  13. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/src/pactkit_opencode.egg-info/dependency_links.txt +0 -0
  14. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/src/pactkit_opencode.egg-info/entry_points.txt +0 -0
  15. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/src/pactkit_opencode.egg-info/top_level.txt +0 -0
  16. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/tests/test_bug035_opencode_dual_layer.py +0 -0
  17. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/tests/test_deploy_opencode_parity.py +0 -0
  18. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/tests/test_story070_opencode_compliance.py +0 -0
  19. {pactkit_opencode-2.11.0 → pactkit_opencode-2.20.0}/tests/test_story073_command_model_routing.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pactkit-opencode
3
- Version: 2.11.0
3
+ Version: 2.20.0
4
4
  Summary: PactKit adapter for OpenCode IDE
5
5
  License-Expression: MIT
6
6
  Requires-Python: >=3.10
7
- Requires-Dist: pactkit>=2.9.0
7
+ Requires-Dist: pactkit>=2.20.0
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pactkit-opencode"
7
- version = "2.11.0"
7
+ version = "2.20.0"
8
8
  description = "PactKit adapter for OpenCode IDE"
9
9
  requires-python = ">=3.10"
10
10
  license = "MIT"
11
11
  dependencies = [
12
- "pactkit>=2.9.0",
12
+ "pactkit>=2.20.0",
13
13
  ]
14
14
 
15
15
  [project.entry-points."pactkit.deployers"]
@@ -26,7 +26,6 @@ from pactkit.generators.deployer import (
26
26
  _deploy_skills,
27
27
  )
28
28
  from pactkit.profiles import get_profile
29
- from pactkit.prompts.rules import CREDENTIAL_SAFETY_FILE
30
29
  from pactkit.utils import atomic_write
31
30
 
32
31
  # Commands excluded from OpenCode deployment (require multi-agent capabilities)
@@ -113,7 +112,7 @@ class OpenCodeDeployer(DeployerBase):
113
112
  if replaced != content:
114
113
  atomic_write(cmd_md, replaced)
115
114
 
116
- n_rules = _deploy_rules(opencode_root, enabled_rules, profile=self.profile)
115
+ _deploy_rules(opencode_root, enabled_rules, profile=self.profile)
117
116
  self._deploy_agents_md_inline(opencode_root)
118
117
 
119
118
  providers = self._load_opencode_providers(opencode_root)
@@ -136,6 +135,11 @@ class OpenCodeDeployer(DeployerBase):
136
135
  project_root = Path.cwd()
137
136
  _deploy_ci(ci_provider, project_root, cfg)
138
137
 
138
+ # STORY-slim-139 R2: machine-readable deployment manifest
139
+ from pactkit.deploy_manifest import write_deploy_manifest
140
+
141
+ write_deploy_manifest(opencode_root, "opencode", cfg)
142
+
139
143
  print(
140
144
  f"\n✅ OpenCode: {n_agents} Agents, {n_skills} Skills, "
141
145
  f"{n_commands} Commands → {opencode_root}"
@@ -286,14 +290,20 @@ class OpenCodeDeployer(DeployerBase):
286
290
 
287
291
  config.setdefault("$schema", "https://opencode.ai/config.json")
288
292
 
289
- credential_path = f"rules/{CREDENTIAL_SAFETY_FILE}"
293
+ # Always-load layer: the merged constitution + credential safety must be
294
+ # globally referenced (RULES_INSTRUCTIONS_CORE). Older logic stripped
295
+ # rules/* entries — that silently dropped pactkit.md (drift 2026-08-13).
296
+ from pactkit.prompts.rules import RULES_INSTRUCTIONS_CORE
297
+
298
+ managed = set(RULES_INSTRUCTIONS_CORE)
290
299
  existing = [
291
300
  i
292
301
  for i in config.get("instructions", [])
293
- if i != "rules/*.md" and not (i.startswith("rules/") and i != credential_path)
302
+ if i != "rules/*.md" and not (i.startswith("rules/") and i not in managed)
294
303
  ]
295
- if credential_path not in existing:
296
- existing.append(credential_path)
304
+ for entry in RULES_INSTRUCTIONS_CORE:
305
+ if entry not in existing:
306
+ existing.append(entry)
297
307
  config["instructions"] = existing
298
308
 
299
309
  # OpenCode auto-discovers commands from commands/*.md directory.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pactkit-opencode
3
- Version: 2.11.0
3
+ Version: 2.20.0
4
4
  Summary: PactKit adapter for OpenCode IDE
5
5
  License-Expression: MIT
6
6
  Requires-Python: >=3.10
7
- Requires-Dist: pactkit>=2.9.0
7
+ Requires-Dist: pactkit>=2.20.0
@@ -0,0 +1 @@
1
+ pactkit>=2.20.0
@@ -159,15 +159,16 @@ class TestR4AgentsMdInlineRules:
159
159
  assert "PactKit" in content
160
160
 
161
161
  def test_rules_in_separate_files(self, tmp_path):
162
- """Core Protocol and Hierarchy of Truth are in rules/ directory."""
162
+ """Merged constitution is deployed to rules/ (post-merge layout)."""
163
163
  out = tmp_path / "opencode"
164
164
  deploy(format="opencode", target=str(out))
165
165
  rules_dir = out / "rules"
166
166
  assert rules_dir.is_dir()
167
- # Check core protocol exists in rules/
167
+ # Post-merge (slim-126+): the constitution ships as a single pactkit.md
168
168
  rule_files = {f.name for f in rules_dir.glob("*.md")}
169
- assert "01-core-protocol.md" in rule_files
170
- assert "02-hierarchy-of-truth.md" in rule_files
169
+ assert "pactkit.md" in rule_files
170
+ content = (rules_dir / "pactkit.md").read_text()
171
+ assert "Hierarchy of Truth" in content
171
172
 
172
173
 
173
174
  # ===========================================================================
@@ -5,7 +5,6 @@ Tests for rules splitting, permission config, MCP template, and global opencode.
5
5
 
6
6
  import json
7
7
 
8
- from pactkit.config import VALID_RULES
9
8
  from pactkit.generators.deployer import deploy
10
9
  from pactkit_opencode.deployer import OpenCodeDeployer
11
10
 
@@ -156,8 +155,10 @@ class TestAC6RulesModularization:
156
155
  out = tmp_path / "oc"
157
156
  deploy(format="opencode", target=str(out))
158
157
  rule_files = list((out / "rules").glob("*.md"))
159
- # Should match VALID_RULES count
160
- assert len(rule_files) == len(VALID_RULES)
158
+ # Post-merge layout: the 8 VALID_RULES components deploy as one merged
159
+ # pactkit.md (+ user-managed credential file when present)
160
+ assert len(rule_files) >= 1
161
+ assert (out / "rules" / "pactkit.md").exists()
161
162
 
162
163
  def test_agents_md_slim(self, tmp_path):
163
164
  """AGENTS.md is slim (< 30 lines) after modularization."""
@@ -1 +0,0 @@
1
- pactkit>=2.9.0