pactkit-opencode 5.1.0__tar.gz → 5.2.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_opencode-5.1.0 → pactkit_opencode-5.2.2}/PKG-INFO +2 -2
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/pyproject.toml +2 -2
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/src/pactkit_opencode/enforcement.py +3 -6
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/src/pactkit_opencode.egg-info/PKG-INFO +2 -2
- pactkit_opencode-5.2.2/src/pactkit_opencode.egg-info/requires.txt +1 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_opencode_enforcement_channel.py +13 -15
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_story_work_units.py +2 -1
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_user_command_scope.py +17 -9
- pactkit_opencode-5.1.0/src/pactkit_opencode.egg-info/requires.txt +0 -1
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/README.md +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/setup.cfg +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/src/pactkit_opencode/__init__.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/src/pactkit_opencode/declarations.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/src/pactkit_opencode/deployer.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/src/pactkit_opencode.egg-info/SOURCES.txt +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/src/pactkit_opencode.egg-info/dependency_links.txt +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/src/pactkit_opencode.egg-info/entry_points.txt +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/src/pactkit_opencode.egg-info/top_level.txt +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_a1_config_recovery.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_a2_mcp_retired.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_bug035_opencode_dual_layer.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_capability_contract.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_command_models_honesty.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_deploy_opencode_parity.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_gate_plugin_deploy.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_global_agents_ownership.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_host_body_snapshot.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_legacy_agents_migration.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_profile_contract.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_review_round13_order.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_review_round14.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_step6_self_sufficiency.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_step8_declaration_search_producer.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_story069_opencode_format.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_story070_opencode_compliance.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_story071_opencode_config_parity.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_story073_command_model_routing.py +0 -0
- {pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_wire_format_contract.py +0 -0
|
@@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pactkit-opencode"
|
|
7
|
-
version = "5.
|
|
7
|
+
version = "5.2.2"
|
|
8
8
|
description = "PactKit adapter for OpenCode IDE"
|
|
9
9
|
requires-python = ">=3.10"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
dependencies = [
|
|
12
12
|
# round4 #4: resolve_integration_config first ships in core 5.0.2.
|
|
13
|
-
"pactkit>=5.
|
|
13
|
+
"pactkit>=5.2.2,<5.3.0",
|
|
14
14
|
]
|
|
15
15
|
|
|
16
16
|
[project.entry-points."pactkit.deployers"]
|
|
@@ -13,12 +13,9 @@ opencode and ``deploy("all")`` skips it, both correct — the plugin is this
|
|
|
13
13
|
adapter's to deploy and always was.
|
|
14
14
|
|
|
15
15
|
What registering buys is the *other* reader. ``gate_matrix.host_channel_registered``
|
|
16
|
-
asks "did this host register?"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Measured 2026-09-22: those two gates flipped from ``not_enforced`` to
|
|
20
|
-
``enforced`` with the registration and nothing else, and no deploy behaviour
|
|
21
|
-
changed.
|
|
16
|
+
asks "did this host register?" so ``gate_coverage("opencode")`` can credit
|
|
17
|
+
the host's ``tamper_guard`` protection. Registration does not change deployment
|
|
18
|
+
or guarantee that the plugin reached disk.
|
|
22
19
|
|
|
23
20
|
The looseness is the same one Codex already carries, accepted deliberately
|
|
24
21
|
(owner ruling 2026-09-22): registration is evidence that the *adapter* is
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pactkit<5.3.0,>=5.2.2
|
{pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_opencode_enforcement_channel.py
RENAMED
|
@@ -9,9 +9,8 @@ That makes this the one host whose channel is registered but not installable
|
|
|
9
9
|
by Core, and the distinction is the whole point of the file:
|
|
10
10
|
|
|
11
11
|
* registering is what makes `gate_matrix.host_channel_registered` answer yes,
|
|
12
|
-
which is what makes `gate_coverage("opencode")` credit
|
|
13
|
-
`tamper_guard`
|
|
14
|
-
to `enforced` with this registration and nothing else;
|
|
12
|
+
which is what makes `gate_coverage("opencode")` credit the host's
|
|
13
|
+
`tamper_guard` protection;
|
|
15
14
|
* it must NOT make Core write anything, because the plugin is already this
|
|
16
15
|
adapter's to deploy and is global by design.
|
|
17
16
|
|
|
@@ -48,28 +47,27 @@ class TestRegistration:
|
|
|
48
47
|
def test_the_registration_is_what_credits_the_host_gates(self):
|
|
49
48
|
"""The observable consequence, and the reason this module exists.
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
them back — so the credit is coming from the registry, not from the
|
|
55
|
-
channel list alone.
|
|
50
|
+
Registration credits the active tamper guard; removing registration
|
|
51
|
+
makes the gap visible. The retired Spec lock is neither enforced nor
|
|
52
|
+
a missing protection.
|
|
56
53
|
"""
|
|
57
54
|
import pactkit_opencode # noqa: F401
|
|
58
55
|
|
|
59
56
|
measured = gate_coverage_for("opencode")
|
|
60
57
|
assert measured["channel_basis"] == "registered"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
)
|
|
58
|
+
assert "tamper_guard" in measured["enforced"]
|
|
59
|
+
assert "tamper_guard" not in measured["not_enforced"]
|
|
60
|
+
assert "spec_guard" not in measured["enforced"]
|
|
61
|
+
assert "spec_guard" not in measured["not_enforced"]
|
|
66
62
|
|
|
67
63
|
saved = dict(commit_gate._ENFORCEMENT_CHANNELS)
|
|
68
64
|
try:
|
|
69
65
|
commit_gate._ENFORCEMENT_CHANNELS.pop("opencode")
|
|
70
66
|
gap = gate_coverage_for("opencode")
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
assert "spec_guard" not in gap["enforced"]
|
|
68
|
+
assert "spec_guard" not in gap["not_enforced"]
|
|
69
|
+
assert "tamper_guard" in gap["not_enforced"]
|
|
70
|
+
assert "tamper_guard" not in gap["enforced"]
|
|
73
71
|
assert "not registered" in gap["not_enforced"]["tamper_guard"], (
|
|
74
72
|
"the reason must name the missing registration, not blame the "
|
|
75
73
|
"host — opencode does offer a pre-tool surface"
|
|
@@ -19,7 +19,8 @@ def test_opencode_uses_native_current_session_contract_without_portable_methods(
|
|
|
19
19
|
manifest = json.loads((tmp_path / ".pactkit-deployed.json").read_text())
|
|
20
20
|
assert manifest["host_capabilities"]["execution_mode"] == "portable"
|
|
21
21
|
assert manifest["workflow_continuation"]["stop_hook_required"] is False
|
|
22
|
-
assert len(manifest["skills"]) ==
|
|
22
|
+
assert len(manifest["skills"]) == 11
|
|
23
|
+
assert {"pactkit-draw", "pactkit-review"}.isdisjoint(manifest["skills"])
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
def test_opencode_upgrade_removes_only_unmodified_portable_methods(tmp_path):
|
|
@@ -39,16 +39,24 @@ def test_user_command_not_rewritten(tmp_path):
|
|
|
39
39
|
assert user_cmd.read_text(encoding="utf-8") == original, "用户自建命令被转换改写"
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
def test_pactkit_commands_still_transformed(tmp_path):
|
|
43
|
-
"""
|
|
42
|
+
def test_pactkit_commands_still_transformed(tmp_path, monkeypatch):
|
|
43
|
+
"""A managed command with legacy CLI text still gets translated on deploy."""
|
|
44
|
+
from pactkit_opencode.deployer import OpenCodeDeployer
|
|
45
|
+
|
|
46
|
+
from pactkit.prompts import commands
|
|
47
|
+
|
|
44
48
|
home = tmp_path / "home"
|
|
45
49
|
target = tmp_path / "deploy"
|
|
46
50
|
home.mkdir()
|
|
47
51
|
target.mkdir()
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
)
|
|
52
|
+
monkeypatch.setenv("HOME", str(home))
|
|
53
|
+
monkeypatch.setenv("USERPROFILE", str(home))
|
|
54
|
+
monkeypatch.setenv("XDG_CONFIG_HOME", str(home / ".config"))
|
|
55
|
+
original = "---\ndescription: synthetic legacy managed command\n---\nRun `pactkit visualize` for graphs.\n"
|
|
56
|
+
monkeypatch.setattr(commands, "get_deployable_commands", lambda: {"project-debug.md": original})
|
|
57
|
+
|
|
58
|
+
OpenCodeDeployer().deploy(config={}, target=target)
|
|
59
|
+
|
|
60
|
+
rendered = (target / "commands/project-debug.md").read_text(encoding="utf-8")
|
|
61
|
+
assert "`pactkit visualize`" not in rendered
|
|
62
|
+
assert "python3 ~/.config/opencode/skills/pactkit-visualize/scripts/visualize.py" in rendered
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pactkit<5.2.0,>=5.1.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/src/pactkit_opencode.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/src/pactkit_opencode.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/src/pactkit_opencode.egg-info/top_level.txt
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
{pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_step8_declaration_search_producer.py
RENAMED
|
File without changes
|
|
File without changes
|
{pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_story070_opencode_compliance.py
RENAMED
|
File without changes
|
{pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_story071_opencode_config_parity.py
RENAMED
|
File without changes
|
{pactkit_opencode-5.1.0 → pactkit_opencode-5.2.2}/tests/test_story073_command_model_routing.py
RENAMED
|
File without changes
|
|
File without changes
|