pactkit-opencode 2.10.2__tar.gz → 2.17.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.10.2 → pactkit_opencode-2.17.0}/PKG-INFO +2 -2
  2. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/pyproject.toml +2 -2
  3. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/src/pactkit_opencode/deployer.py +15 -4
  4. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/src/pactkit_opencode.egg-info/PKG-INFO +2 -2
  5. pactkit_opencode-2.17.0/src/pactkit_opencode.egg-info/requires.txt +1 -0
  6. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/tests/test_story069_opencode_format.py +5 -4
  7. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/tests/test_story071_opencode_config_parity.py +4 -2
  8. pactkit_opencode-2.10.2/src/pactkit_opencode.egg-info/requires.txt +0 -1
  9. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/README.md +0 -0
  10. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/setup.cfg +0 -0
  11. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/src/pactkit_opencode/__init__.py +0 -0
  12. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/src/pactkit_opencode.egg-info/SOURCES.txt +0 -0
  13. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/src/pactkit_opencode.egg-info/dependency_links.txt +0 -0
  14. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/src/pactkit_opencode.egg-info/entry_points.txt +0 -0
  15. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/src/pactkit_opencode.egg-info/top_level.txt +0 -0
  16. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/tests/test_bug035_opencode_dual_layer.py +0 -0
  17. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/tests/test_deploy_opencode_parity.py +0 -0
  18. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.0}/tests/test_story070_opencode_compliance.py +0 -0
  19. {pactkit_opencode-2.10.2 → pactkit_opencode-2.17.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.10.2
3
+ Version: 2.17.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.17.0
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pactkit-opencode"
7
- version = "2.10.2"
7
+ version = "2.17.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.17.0",
13
13
  ]
14
14
 
15
15
  [project.entry-points."pactkit.deployers"]
@@ -136,6 +136,11 @@ class OpenCodeDeployer(DeployerBase):
136
136
  project_root = Path.cwd()
137
137
  _deploy_ci(ci_provider, project_root, cfg)
138
138
 
139
+ # STORY-slim-139 R2: machine-readable deployment manifest
140
+ from pactkit.deploy_manifest import write_deploy_manifest
141
+
142
+ write_deploy_manifest(opencode_root, "opencode", cfg)
143
+
139
144
  print(
140
145
  f"\n✅ OpenCode: {n_agents} Agents, {n_skills} Skills, "
141
146
  f"{n_commands} Commands → {opencode_root}"
@@ -286,14 +291,20 @@ class OpenCodeDeployer(DeployerBase):
286
291
 
287
292
  config.setdefault("$schema", "https://opencode.ai/config.json")
288
293
 
289
- credential_path = f"rules/{CREDENTIAL_SAFETY_FILE}"
294
+ # Always-load layer: the merged constitution + credential safety must be
295
+ # globally referenced (RULES_INSTRUCTIONS_CORE). Older logic stripped
296
+ # rules/* entries — that silently dropped pactkit.md (drift 2026-08-13).
297
+ from pactkit.prompts.rules import RULES_INSTRUCTIONS_CORE
298
+
299
+ managed = set(RULES_INSTRUCTIONS_CORE)
290
300
  existing = [
291
301
  i
292
302
  for i in config.get("instructions", [])
293
- if i != "rules/*.md" and not (i.startswith("rules/") and i != credential_path)
303
+ if i != "rules/*.md" and not (i.startswith("rules/") and i not in managed)
294
304
  ]
295
- if credential_path not in existing:
296
- existing.append(credential_path)
305
+ for entry in RULES_INSTRUCTIONS_CORE:
306
+ if entry not in existing:
307
+ existing.append(entry)
297
308
  config["instructions"] = existing
298
309
 
299
310
  # 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.10.2
3
+ Version: 2.17.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.17.0
@@ -0,0 +1 @@
1
+ pactkit>=2.17.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
  # ===========================================================================
@@ -156,8 +156,10 @@ class TestAC6RulesModularization:
156
156
  out = tmp_path / "oc"
157
157
  deploy(format="opencode", target=str(out))
158
158
  rule_files = list((out / "rules").glob("*.md"))
159
- # Should match VALID_RULES count
160
- assert len(rule_files) == len(VALID_RULES)
159
+ # Post-merge layout: the 8 VALID_RULES components deploy as one merged
160
+ # pactkit.md (+ user-managed credential file when present)
161
+ assert len(rule_files) >= 1
162
+ assert (out / "rules" / "pactkit.md").exists()
161
163
 
162
164
  def test_agents_md_slim(self, tmp_path):
163
165
  """AGENTS.md is slim (< 30 lines) after modularization."""
@@ -1 +0,0 @@
1
- pactkit>=2.9.0