pactkit-codex 3.0.4__tar.gz → 3.0.5__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-3.0.4/src/pactkit_codex.egg-info → pactkit_codex-3.0.5}/PKG-INFO +1 -1
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5}/pyproject.toml +1 -1
- pactkit_codex-3.0.5/src/pactkit_codex/declarations.py +141 -0
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5}/src/pactkit_codex/deployer.py +9 -2
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5/src/pactkit_codex.egg-info}/PKG-INFO +1 -1
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5}/src/pactkit_codex.egg-info/SOURCES.txt +1 -0
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5}/LICENSE +0 -0
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5}/README.md +0 -0
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5}/setup.cfg +0 -0
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5}/src/pactkit_codex/__init__.py +0 -0
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5}/src/pactkit_codex/enforcement.py +0 -0
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5}/src/pactkit_codex.egg-info/dependency_links.txt +0 -0
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5}/src/pactkit_codex.egg-info/entry_points.txt +0 -0
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5}/src/pactkit_codex.egg-info/requires.txt +0 -0
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5}/src/pactkit_codex.egg-info/top_level.txt +0 -0
- {pactkit_codex-3.0.4 → pactkit_codex-3.0.5}/tests/test_host_body_snapshot.py +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"""Codex's own declarations (SPEC-4.0-22 Step 6).
|
|
2
|
+
|
|
3
|
+
These lived in Core's transitional seed (`_CORE_CAPABILITIES`, `_CORE_SECURITY`,
|
|
4
|
+
`_CORE_PRETOOL_SURFACES`, `_CORE_DEPLOYMENT_CLAIMS`) until Step 6. While they
|
|
5
|
+
did, this adapter could not answer for itself: `import pactkit_codex` read Core's table
|
|
6
|
+
for its own identity, so removing the seed broke the import rather than the
|
|
7
|
+
deployment.
|
|
8
|
+
|
|
9
|
+
Core still owns the **vocabulary** (`capability.CAPABILITY_VOCABULARY`), the
|
|
10
|
+
four levels, and the hole-filling rule in `resolve_capabilities`. What a given
|
|
11
|
+
Host scores on them is the Host's own declaration — that is the split
|
|
12
|
+
SPEC-4.0-22 R1 draws, and this module is the Codex side of it.
|
|
13
|
+
|
|
14
|
+
Every value here was materialised from the seed Core was carrying, so this is a
|
|
15
|
+
move, not a re-measurement. The `Capability.evidence` strings are preserved
|
|
16
|
+
verbatim for the same reason: they are what the seed said, and re-wording them
|
|
17
|
+
here would quietly change what the registry reports.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
from pactkit.capability import Capability, CapabilityLevel
|
|
23
|
+
from pactkit.profiles import (
|
|
24
|
+
CLIPolicy,
|
|
25
|
+
DeploymentClaim,
|
|
26
|
+
FormatProfile,
|
|
27
|
+
InputTranslation,
|
|
28
|
+
SecurityDeclaration,
|
|
29
|
+
SecurityFacts,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
__all__ = [
|
|
33
|
+
"CAPABILITIES",
|
|
34
|
+
"DEPLOYMENT_CLAIM",
|
|
35
|
+
"INPUT_TRANSLATION",
|
|
36
|
+
"PRETOOL_SURFACE",
|
|
37
|
+
"PROFILE",
|
|
38
|
+
"SECURITY",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _cap(name: str, level: CapabilityLevel, implemented: bool, evidence: str) -> Capability:
|
|
43
|
+
return Capability(name=name, level=level, implemented=implemented, evidence=evidence)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
#: The Host's profile. Core no longer owns it; this module is the source.
|
|
47
|
+
PROFILE = FormatProfile(
|
|
48
|
+
name='codex',
|
|
49
|
+
display_name='Codex CLI',
|
|
50
|
+
global_config_dir='~/.codex',
|
|
51
|
+
project_config_dir='.codex',
|
|
52
|
+
skills_dir='~/.codex/skills',
|
|
53
|
+
agents_dir='~/.codex/agents',
|
|
54
|
+
commands_dir='~/.codex/prompts',
|
|
55
|
+
rules_dir='~/.codex/rules',
|
|
56
|
+
project_instructions_file='AGENTS.md',
|
|
57
|
+
global_instructions_file='AGENTS.md',
|
|
58
|
+
pactkit_yaml_path='.codex/pactkit.yaml',
|
|
59
|
+
agent_format='md',
|
|
60
|
+
rules_import_style='inline',
|
|
61
|
+
excluded_agent_fields=frozenset({'memory', 'permissionMode', 'skills', 'hooks'}),
|
|
62
|
+
excluded_commands=frozenset(),
|
|
63
|
+
supports_model_routing=False,
|
|
64
|
+
skills_path_var='~/.codex/skills',
|
|
65
|
+
command_deploy_form='skill',
|
|
66
|
+
agent_dialect=None,
|
|
67
|
+
command_dialect=None,
|
|
68
|
+
core_bundled=False,
|
|
69
|
+
cli_policy=CLIPolicy.PREFERRED,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
#: What this Host scores on the capability vocabulary.
|
|
73
|
+
CAPABILITIES: dict[str, Capability] = {
|
|
74
|
+
'completion_hook': _cap('completion_hook', CapabilityLevel.DEGRADED, False,
|
|
75
|
+
"unverified — not measured on this Host; absence of the capability is NOT established (SPEC-4.0-04 R2: "
|
|
76
|
+
"unverified is not unavailable)",
|
|
77
|
+
),
|
|
78
|
+
'git_hook': _cap('git_hook', CapabilityLevel.NATIVE, True, 'shipped (commit_gate pre-commit chain)',
|
|
79
|
+
),
|
|
80
|
+
'global_instruction': _cap('global_instruction', CapabilityLevel.EQUIVALENT, True, 'shipped (~/.codex/AGENTS.md)',
|
|
81
|
+
),
|
|
82
|
+
'native_command': _cap('native_command', CapabilityLevel.DEGRADED, False,
|
|
83
|
+
"unverified — not measured on this Host; absence of the capability is NOT established (SPEC-4.0-04 R2: "
|
|
84
|
+
"unverified is not unavailable)",
|
|
85
|
+
),
|
|
86
|
+
'native_skill': _cap('native_skill', CapabilityLevel.DEGRADED, False,
|
|
87
|
+
"unverified — not measured on this Host; absence of the capability is NOT established (SPEC-4.0-04 R2: "
|
|
88
|
+
"unverified is not unavailable)",
|
|
89
|
+
),
|
|
90
|
+
'persistent_session': _cap('persistent_session', CapabilityLevel.DEGRADED, False,
|
|
91
|
+
"unverified — not measured on this Host; absence of the capability is NOT established (SPEC-4.0-04 R2: "
|
|
92
|
+
"unverified is not unavailable)",
|
|
93
|
+
),
|
|
94
|
+
'post_tool_hook': _cap('post_tool_hook', CapabilityLevel.DEGRADED, False,
|
|
95
|
+
"unverified — not measured on this Host; absence of the capability is NOT established (SPEC-4.0-04 R2: "
|
|
96
|
+
"unverified is not unavailable)",
|
|
97
|
+
),
|
|
98
|
+
'pre_tool_hook': _cap('pre_tool_hook', CapabilityLevel.NATIVE, True,
|
|
99
|
+
'shipped (doctor.check_codex_hook_capability; native hooks engine)',
|
|
100
|
+
),
|
|
101
|
+
'project_instruction': _cap('project_instruction', CapabilityLevel.EQUIVALENT, True,
|
|
102
|
+
'shipped (AGENTS.md at project root)',
|
|
103
|
+
),
|
|
104
|
+
'rule_import': _cap('rule_import', CapabilityLevel.EQUIVALENT, True, 'shipped as AGENTS.md (generators.deployer)',
|
|
105
|
+
),
|
|
106
|
+
'session_resume': _cap('session_resume', CapabilityLevel.DEGRADED, False,
|
|
107
|
+
"unverified — not measured on this Host; absence of the capability is NOT established (SPEC-4.0-04 R2: "
|
|
108
|
+
"unverified is not unavailable)",
|
|
109
|
+
),
|
|
110
|
+
'shell_execution': _cap('shell_execution', CapabilityLevel.NATIVE, True, 'shipped (native shell tool)',
|
|
111
|
+
),
|
|
112
|
+
'structured_tool_result': _cap('structured_tool_result', CapabilityLevel.DEGRADED, False,
|
|
113
|
+
"unverified — not measured on this Host; absence of the capability is NOT established (SPEC-4.0-04 R2: "
|
|
114
|
+
"unverified is not unavailable)",
|
|
115
|
+
),
|
|
116
|
+
'subagent': _cap('subagent', CapabilityLevel.DEGRADED, False,
|
|
117
|
+
"unverified — not measured on this Host; absence of the capability is NOT established (SPEC-4.0-04 R2: "
|
|
118
|
+
"unverified is not unavailable)",
|
|
119
|
+
),
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
#: Files a gate must treat specially on this Host (SPEC-4.0-22 R8).
|
|
123
|
+
SECURITY = SecurityDeclaration(
|
|
124
|
+
env_capable=SecurityFacts.declared(['.codex/config.toml']),
|
|
125
|
+
protected=SecurityFacts.declared(['.codex/hooks.json']),
|
|
126
|
+
conditional=SecurityFacts.empty(),
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
#: Which mechanism this Host offers for pre-tool interception, when one
|
|
130
|
+
#: has been measured. `None` means unverified — not "cannot".
|
|
131
|
+
PRETOOL_SURFACE = 'native hooks engine'
|
|
132
|
+
|
|
133
|
+
#: How this Host executes and where its verification comes from.
|
|
134
|
+
DEPLOYMENT_CLAIM = DeploymentClaim(
|
|
135
|
+
execution_mode='portable',
|
|
136
|
+
verification_source='native_codex_session',
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
#: Read-side wire-format data, when the Host has one. `None` means it
|
|
140
|
+
#: declares none — the ladder then never asks it to recognise a payload.
|
|
141
|
+
INPUT_TRANSLATION: InputTranslation | None = None
|
|
@@ -46,7 +46,6 @@ from pactkit.generators.deployer import (
|
|
|
46
46
|
_enforce_deploy_integrity,
|
|
47
47
|
)
|
|
48
48
|
from pactkit.generators.spi import render_prompt, render_skill_md
|
|
49
|
-
from pactkit.profiles import get_profile
|
|
50
49
|
from pactkit.prompts.guides import GUIDES_FILES
|
|
51
50
|
from pactkit.prompts.rules import (
|
|
52
51
|
COMMAND_CONDITIONAL_RULES_MAP,
|
|
@@ -57,6 +56,8 @@ from pactkit.prompts.rules import (
|
|
|
57
56
|
)
|
|
58
57
|
from pactkit.utils import atomic_write
|
|
59
58
|
|
|
59
|
+
from pactkit_codex import declarations
|
|
60
|
+
|
|
60
61
|
# All canonical commands deploy. Sprint degrades to sequential execution when
|
|
61
62
|
# Codex does not expose team orchestration primitives.
|
|
62
63
|
CODEX_EXCLUDED_COMMANDS: frozenset[str] = frozenset()
|
|
@@ -111,7 +112,13 @@ class CodexDeployer(DeployerBase):
|
|
|
111
112
|
- config.toml (not JSON/YAML)
|
|
112
113
|
"""
|
|
113
114
|
|
|
114
|
-
|
|
115
|
+
# SPEC-4.0-22 Step 6 — the Host's own declarations (see declarations.py).
|
|
116
|
+
profile = declarations.PROFILE
|
|
117
|
+
capabilities = declarations.CAPABILITIES
|
|
118
|
+
security = declarations.SECURITY
|
|
119
|
+
pretool_surface = declarations.PRETOOL_SURFACE
|
|
120
|
+
deployment_claim = declarations.DEPLOYMENT_CLAIM
|
|
121
|
+
input_translation = declarations.INPUT_TRANSLATION
|
|
115
122
|
|
|
116
123
|
@staticmethod
|
|
117
124
|
def continuation_capabilities(codex_root=None):
|
|
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
|