capability-reasoning-kernel 0.4.1__tar.gz → 0.5.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.
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/.env.example +3 -1
- capability_reasoning_kernel-0.5.0/.github/dependabot.yml +13 -0
- capability_reasoning_kernel-0.5.0/.github/workflows/ci.yml +151 -0
- capability_reasoning_kernel-0.5.0/.github/workflows/pages.yml +48 -0
- capability_reasoning_kernel-0.5.0/.github/workflows/release.yml +107 -0
- capability_reasoning_kernel-0.5.0/.pre-commit-config.yaml +33 -0
- capability_reasoning_kernel-0.5.0/CHANGELOG.md +225 -0
- capability_reasoning_kernel-0.5.0/CLAUDE.md +35 -0
- capability_reasoning_kernel-0.4.1/README.md → capability_reasoning_kernel-0.5.0/PKG-INFO +78 -19
- capability_reasoning_kernel-0.4.1/PKG-INFO → capability_reasoning_kernel-0.5.0/README.md +39 -51
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/SECURITY.md +9 -3
- capability_reasoning_kernel-0.5.0/docs/ANALYSIS-2026-07.md +249 -0
- capability_reasoning_kernel-0.5.0/docs/CONFORMANCE.md +30 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/docs/DEVELOPMENT.md +29 -10
- capability_reasoning_kernel-0.5.0/docs/OPERATIONS.md +149 -0
- capability_reasoning_kernel-0.5.0/docs/favicon.svg +6 -0
- capability_reasoning_kernel-0.5.0/docs/index.html +760 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/justfile +13 -4
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/pyproject.toml +11 -4
- capability_reasoning_kernel-0.5.0/scripts/check_artifacts.py +46 -0
- capability_reasoning_kernel-0.5.0/scripts/check_published.py +57 -0
- capability_reasoning_kernel-0.5.0/scripts/check_version.py +15 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/__init__.py +29 -3
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/config.py +4 -2
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/demo/reasoner_error.py +4 -2
- capability_reasoning_kernel-0.5.0/src/reasoning_kernel/kernel/effects.py +175 -0
- capability_reasoning_kernel-0.5.0/src/reasoning_kernel/kernel/gate.py +139 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/kernel/interpreter.py +118 -64
- capability_reasoning_kernel-0.5.0/src/reasoning_kernel/kernel/runtime.py +63 -0
- capability_reasoning_kernel-0.5.0/src/reasoning_kernel/kernel/session.py +61 -0
- capability_reasoning_kernel-0.5.0/src/reasoning_kernel/memory/sink.py +212 -0
- capability_reasoning_kernel-0.5.0/src/reasoning_kernel/memory/trace.py +150 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/reasoner/anthropic.py +19 -3
- capability_reasoning_kernel-0.5.0/src/reasoning_kernel/reasoner/base.py +119 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/reasoner/deepseek.py +4 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/reasoner/factory.py +15 -2
- capability_reasoning_kernel-0.5.0/src/reasoning_kernel/reasoner/openai.py +172 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/reasoner/parse.py +23 -7
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/reasoner/roles.py +7 -4
- capability_reasoning_kernel-0.5.0/src/reasoning_kernel/reasoner/telemetry.py +36 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/schemas/capability.py +1 -1
- capability_reasoning_kernel-0.5.0/src/reasoning_kernel/schemas/limits.py +36 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/schemas/provenance.py +6 -3
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/schemas/registry.py +4 -1
- capability_reasoning_kernel-0.5.0/src/reasoning_kernel/schemas/trace.py +184 -0
- capability_reasoning_kernel-0.5.0/src/reasoning_kernel/tools/__init__.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/tools/demo_mail.py +6 -3
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/tools/registry.py +6 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/conftest.py +1 -1
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_gate_provenance_declassify.py +22 -0
- capability_reasoning_kernel-0.5.0/tests/test_gate_unrestricted_readers.py +84 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_interpreter_loop.py +4 -2
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_no_bypass_conformance.py +7 -3
- capability_reasoning_kernel-0.5.0/tests/test_operational.py +729 -0
- capability_reasoning_kernel-0.5.0/tests/test_parse_with_schema.py +80 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_provenance_propagation.py +19 -0
- capability_reasoning_kernel-0.5.0/tests/test_provider_contracts.py +170 -0
- capability_reasoning_kernel-0.5.0/tests/test_providers_live.py +183 -0
- capability_reasoning_kernel-0.5.0/tests/test_reasoner_factory.py +50 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_reasoner_robustness.py +115 -3
- capability_reasoning_kernel-0.5.0/tests/test_release_contract.py +88 -0
- capability_reasoning_kernel-0.5.0/uv.lock +1082 -0
- capability_reasoning_kernel-0.4.1/.github/workflows/ci.yml +0 -73
- capability_reasoning_kernel-0.4.1/.github/workflows/release.yml +0 -55
- capability_reasoning_kernel-0.4.1/.pre-commit-config.yaml +0 -26
- capability_reasoning_kernel-0.4.1/CHANGELOG.md +0 -102
- capability_reasoning_kernel-0.4.1/src/reasoning_kernel/kernel/effects.py +0 -90
- capability_reasoning_kernel-0.4.1/src/reasoning_kernel/kernel/gate.py +0 -88
- capability_reasoning_kernel-0.4.1/src/reasoning_kernel/memory/trace.py +0 -23
- capability_reasoning_kernel-0.4.1/src/reasoning_kernel/reasoner/base.py +0 -58
- capability_reasoning_kernel-0.4.1/src/reasoning_kernel/reasoner/openai.py +0 -126
- capability_reasoning_kernel-0.4.1/src/reasoning_kernel/schemas/limits.py +0 -23
- capability_reasoning_kernel-0.4.1/src/reasoning_kernel/schemas/trace.py +0 -110
- capability_reasoning_kernel-0.4.1/tests/test_parse_with_schema.py +0 -32
- capability_reasoning_kernel-0.4.1/tests/test_providers_live.py +0 -54
- capability_reasoning_kernel-0.4.1/tests/test_reasoner_factory.py +0 -27
- capability_reasoning_kernel-0.4.1/uv.lock +0 -603
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/.gitignore +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/.python-version +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/LICENSE +0 -0
- /capability_reasoning_kernel-0.4.1/src/reasoning_kernel/context/__init__.py → /capability_reasoning_kernel-0.5.0/docs/.nojekyll +0 -0
- {capability_reasoning_kernel-0.4.1/src/reasoning_kernel/demo → capability_reasoning_kernel-0.5.0/src/reasoning_kernel/context}/__init__.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/context/assembler.py +0 -0
- {capability_reasoning_kernel-0.4.1/src/reasoning_kernel/kernel → capability_reasoning_kernel-0.5.0/src/reasoning_kernel/demo}/__init__.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/demo/_report.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/demo/email_exfil.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/demo/live_run.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/demo/merge.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/demo/run_limits.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/demo/subkernel.py +0 -0
- {capability_reasoning_kernel-0.4.1/src/reasoning_kernel/memory → capability_reasoning_kernel-0.5.0/src/reasoning_kernel/kernel}/__init__.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/kernel/taint.py +0 -0
- {capability_reasoning_kernel-0.4.1/src/reasoning_kernel/reasoner → capability_reasoning_kernel-0.5.0/src/reasoning_kernel/memory}/__init__.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/memory/store.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/py.typed +0 -0
- {capability_reasoning_kernel-0.4.1/src/reasoning_kernel/schemas → capability_reasoning_kernel-0.5.0/src/reasoning_kernel/reasoner}/__init__.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/reasoner/fake.py +0 -0
- {capability_reasoning_kernel-0.4.1/src/reasoning_kernel/tools → capability_reasoning_kernel-0.5.0/src/reasoning_kernel/schemas}/__init__.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/schemas/ids.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/schemas/plan.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/schemas/policy.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/src/reasoning_kernel/schemas/values.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_capability.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_composition.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_declass_policy.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_demo_email_exfil.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_demo_mail_tools.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_gate_capability.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_invariant_a.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_merge.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_plan_schema.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_public_api.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_registry.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_run_limits.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_store.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_subject_provenance.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_subkernel.py +0 -0
- {capability_reasoning_kernel-0.4.1 → capability_reasoning_kernel-0.5.0}/tests/test_trace_append_only.py +0 -0
|
@@ -7,7 +7,9 @@ DEEPSEEK_API_KEY=
|
|
|
7
7
|
|
|
8
8
|
# Optional overrides (defaults shown)
|
|
9
9
|
# RK_LLM_PROVIDER_DEFAULT=anthropic
|
|
10
|
-
# RK_LLM_MODEL_ANTHROPIC=claude-sonnet-
|
|
10
|
+
# RK_LLM_MODEL_ANTHROPIC=claude-sonnet-5 # or claude-opus-4-8 (more capable, different pricing)
|
|
11
11
|
# RK_LLM_MODEL_OPENAI=gpt-5.5 # or gpt-5.5-pro (more capable, different pricing)
|
|
12
12
|
# RK_LLM_MODEL_DEEPSEEK=deepseek-v4-flash # or deepseek-v4-pro (more capable, different pricing)
|
|
13
13
|
# RK_DEEPSEEK_BASE_URL=https://api.deepseek.com
|
|
14
|
+
# RK_LLM_TIMEOUT_SECONDS=120.0 # per-request SDK timeout passed to provider clients
|
|
15
|
+
# RK_LLM_MAX_TOKENS=4096 # default max_tokens for structured-output calls
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
live_providers:
|
|
10
|
+
description: Comma-separated providers required by the live gate
|
|
11
|
+
required: true
|
|
12
|
+
default: deepseek
|
|
13
|
+
type: string
|
|
14
|
+
workflow_call:
|
|
15
|
+
inputs:
|
|
16
|
+
live_providers:
|
|
17
|
+
description: Comma-separated providers required by the live gate
|
|
18
|
+
required: false
|
|
19
|
+
default: ""
|
|
20
|
+
type: string
|
|
21
|
+
secrets:
|
|
22
|
+
ANTHROPIC_API_KEY:
|
|
23
|
+
required: false
|
|
24
|
+
OPENAI_API_KEY:
|
|
25
|
+
required: false
|
|
26
|
+
DEEPSEEK_API_KEY:
|
|
27
|
+
required: false
|
|
28
|
+
|
|
29
|
+
permissions:
|
|
30
|
+
contents: read
|
|
31
|
+
|
|
32
|
+
concurrency:
|
|
33
|
+
group: ci-${{ github.ref }}
|
|
34
|
+
cancel-in-progress: true
|
|
35
|
+
|
|
36
|
+
jobs:
|
|
37
|
+
quality:
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
strategy:
|
|
40
|
+
fail-fast: false
|
|
41
|
+
matrix:
|
|
42
|
+
python-version: ["3.12", "3.13", "3.14"]
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
45
|
+
with:
|
|
46
|
+
persist-credentials: false
|
|
47
|
+
|
|
48
|
+
- name: Install uv
|
|
49
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
50
|
+
with:
|
|
51
|
+
version: "0.12.10"
|
|
52
|
+
checksum: "173d95a0c32d18c896c46ba6fafbf3cf9c14ab74b033f81b76c883ef492a976b"
|
|
53
|
+
python-version: ${{ matrix.python-version }}
|
|
54
|
+
enable-cache: true
|
|
55
|
+
|
|
56
|
+
- name: Install just
|
|
57
|
+
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
|
|
58
|
+
|
|
59
|
+
- name: Sync dependencies
|
|
60
|
+
run: uv sync --all-extras --locked
|
|
61
|
+
|
|
62
|
+
# The justfile uses `set dotenv-load`; provide a no-secret env so it loads cleanly.
|
|
63
|
+
# The default suite is key-free and `live` tests are excluded via addopts -m 'not live'.
|
|
64
|
+
- name: Prepare env
|
|
65
|
+
run: cp .env.example .env
|
|
66
|
+
|
|
67
|
+
- name: Lint
|
|
68
|
+
run: just lint
|
|
69
|
+
|
|
70
|
+
- name: Typecheck
|
|
71
|
+
run: just typecheck
|
|
72
|
+
|
|
73
|
+
- name: Test
|
|
74
|
+
run: just test # runs with coverage; fails under the threshold in pyproject
|
|
75
|
+
|
|
76
|
+
- name: Verify distribution
|
|
77
|
+
run: just package-check
|
|
78
|
+
|
|
79
|
+
artifact-roundtrip:
|
|
80
|
+
runs-on: ubuntu-latest
|
|
81
|
+
steps:
|
|
82
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
83
|
+
with:
|
|
84
|
+
persist-credentials: false
|
|
85
|
+
|
|
86
|
+
- name: Install uv
|
|
87
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
88
|
+
with:
|
|
89
|
+
version: "0.12.10"
|
|
90
|
+
checksum: "173d95a0c32d18c896c46ba6fafbf3cf9c14ab74b033f81b76c883ef492a976b"
|
|
91
|
+
python-version: "3.12"
|
|
92
|
+
enable-cache: true
|
|
93
|
+
|
|
94
|
+
- name: Build distribution
|
|
95
|
+
run: |
|
|
96
|
+
uv sync --all-extras --locked
|
|
97
|
+
uv build --clear
|
|
98
|
+
uv run twine check --strict dist/*
|
|
99
|
+
uv run python scripts/check_artifacts.py dist
|
|
100
|
+
sha256sum dist/* > SHA256SUMS
|
|
101
|
+
|
|
102
|
+
- name: Upload distribution
|
|
103
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
104
|
+
with:
|
|
105
|
+
name: ci-distribution
|
|
106
|
+
path: |
|
|
107
|
+
dist/
|
|
108
|
+
SHA256SUMS
|
|
109
|
+
if-no-files-found: error
|
|
110
|
+
retention-days: 1
|
|
111
|
+
|
|
112
|
+
- name: Download distribution
|
|
113
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
114
|
+
with:
|
|
115
|
+
name: ci-distribution
|
|
116
|
+
path: roundtrip
|
|
117
|
+
|
|
118
|
+
- name: Verify downloaded bytes
|
|
119
|
+
working-directory: roundtrip
|
|
120
|
+
run: sha256sum --check SHA256SUMS
|
|
121
|
+
|
|
122
|
+
# Explicit provider qualification: manual or required by the release's reusable workflow call.
|
|
123
|
+
live:
|
|
124
|
+
if: inputs.live_providers != ''
|
|
125
|
+
runs-on: ubuntu-latest
|
|
126
|
+
steps:
|
|
127
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
128
|
+
with:
|
|
129
|
+
persist-credentials: false
|
|
130
|
+
|
|
131
|
+
- name: Install uv
|
|
132
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
133
|
+
with:
|
|
134
|
+
version: "0.12.10"
|
|
135
|
+
checksum: "173d95a0c32d18c896c46ba6fafbf3cf9c14ab74b033f81b76c883ef492a976b"
|
|
136
|
+
python-version: "3.12"
|
|
137
|
+
enable-cache: true
|
|
138
|
+
|
|
139
|
+
- name: Install just
|
|
140
|
+
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
|
|
141
|
+
|
|
142
|
+
- name: Sync dependencies
|
|
143
|
+
run: uv sync --all-extras --locked
|
|
144
|
+
|
|
145
|
+
- name: Run live provider tests
|
|
146
|
+
env:
|
|
147
|
+
RK_LIVE_PROVIDERS: ${{ inputs.live_providers }}
|
|
148
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
149
|
+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
150
|
+
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
|
|
151
|
+
run: just test-live
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Pages
|
|
2
|
+
|
|
3
|
+
# Deploy the static landing page in `docs/` to GitHub Pages. No build step — the page is
|
|
4
|
+
# self-contained HTML (CSS + SVG inline). First-time setup requires the repository's
|
|
5
|
+
# Settings → Pages → Source to be set to "GitHub Actions".
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [main]
|
|
9
|
+
paths:
|
|
10
|
+
- "docs/**"
|
|
11
|
+
- ".github/workflows/pages.yml"
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
pages: write
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
# Allow one concurrent deployment; don't cancel an in-progress publish.
|
|
20
|
+
concurrency:
|
|
21
|
+
group: pages
|
|
22
|
+
cancel-in-progress: false
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
deploy:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
environment:
|
|
28
|
+
name: github-pages
|
|
29
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
30
|
+
steps:
|
|
31
|
+
# Actions pinned to immutable commit SHAs (supply-chain hardening); tag in comment.
|
|
32
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
33
|
+
with:
|
|
34
|
+
persist-credentials: false
|
|
35
|
+
|
|
36
|
+
- name: Configure Pages
|
|
37
|
+
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
|
|
38
|
+
with:
|
|
39
|
+
enablement: true # self-enable Pages (build_type=workflow) on first run — no manual Settings step
|
|
40
|
+
|
|
41
|
+
- name: Upload artifact
|
|
42
|
+
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
|
|
43
|
+
with:
|
|
44
|
+
path: docs
|
|
45
|
+
|
|
46
|
+
- name: Deploy to GitHub Pages
|
|
47
|
+
id: deployment
|
|
48
|
+
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Test the tagged commit, then promote one immutable distribution through both indexes.
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
tags: ["v*"]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: release-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: false
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
quality:
|
|
17
|
+
uses: ./.github/workflows/ci.yml
|
|
18
|
+
with:
|
|
19
|
+
live_providers: deepseek
|
|
20
|
+
secrets:
|
|
21
|
+
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
|
|
22
|
+
|
|
23
|
+
build:
|
|
24
|
+
needs: quality
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
28
|
+
with:
|
|
29
|
+
persist-credentials: false
|
|
30
|
+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
31
|
+
with:
|
|
32
|
+
version: "0.12.10"
|
|
33
|
+
checksum: "173d95a0c32d18c896c46ba6fafbf3cf9c14ab74b033f81b76c883ef492a976b"
|
|
34
|
+
python-version: "3.12"
|
|
35
|
+
- run: uv sync --all-extras --locked
|
|
36
|
+
- name: Validate tag and build
|
|
37
|
+
run: |
|
|
38
|
+
uv run python scripts/check_version.py
|
|
39
|
+
uv build --clear
|
|
40
|
+
uv run twine check --strict dist/*
|
|
41
|
+
uv run python scripts/check_artifacts.py dist
|
|
42
|
+
sha256sum dist/* > SHA256SUMS
|
|
43
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
44
|
+
with:
|
|
45
|
+
name: distribution
|
|
46
|
+
path: |
|
|
47
|
+
dist/
|
|
48
|
+
SHA256SUMS
|
|
49
|
+
if-no-files-found: error
|
|
50
|
+
|
|
51
|
+
testpypi:
|
|
52
|
+
needs: build
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
environment: testpypi
|
|
55
|
+
permissions:
|
|
56
|
+
contents: read
|
|
57
|
+
id-token: write
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
60
|
+
with:
|
|
61
|
+
name: distribution
|
|
62
|
+
- run: sha256sum --check SHA256SUMS
|
|
63
|
+
- name: Publish to TestPyPI
|
|
64
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
|
|
65
|
+
with:
|
|
66
|
+
repository-url: https://test.pypi.org/legacy/
|
|
67
|
+
|
|
68
|
+
verify-testpypi:
|
|
69
|
+
needs: testpypi
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
steps:
|
|
72
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
73
|
+
with:
|
|
74
|
+
persist-credentials: false
|
|
75
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
76
|
+
with:
|
|
77
|
+
name: distribution
|
|
78
|
+
- run: sha256sum --check SHA256SUMS
|
|
79
|
+
- run: python scripts/check_published.py dist testpypi
|
|
80
|
+
|
|
81
|
+
pypi:
|
|
82
|
+
needs: verify-testpypi
|
|
83
|
+
runs-on: ubuntu-latest
|
|
84
|
+
environment: pypi
|
|
85
|
+
permissions:
|
|
86
|
+
contents: read
|
|
87
|
+
id-token: write
|
|
88
|
+
steps:
|
|
89
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
90
|
+
with:
|
|
91
|
+
name: distribution
|
|
92
|
+
- run: sha256sum --check SHA256SUMS
|
|
93
|
+
- name: Publish to PyPI
|
|
94
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
|
|
95
|
+
|
|
96
|
+
verify-pypi:
|
|
97
|
+
needs: pypi
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
steps:
|
|
100
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
101
|
+
with:
|
|
102
|
+
persist-credentials: false
|
|
103
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
104
|
+
with:
|
|
105
|
+
name: distribution
|
|
106
|
+
- run: sha256sum --check SHA256SUMS
|
|
107
|
+
- run: python scripts/check_published.py dist pypi
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v5.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-yaml
|
|
6
|
+
- id: check-toml
|
|
7
|
+
- id: check-added-large-files
|
|
8
|
+
args: ["--maxkb=1000"]
|
|
9
|
+
- id: end-of-file-fixer
|
|
10
|
+
- id: trailing-whitespace
|
|
11
|
+
|
|
12
|
+
# Ruff and pyright run as local hooks through uv so the hook, `just lint`/`just typecheck`,
|
|
13
|
+
# and CI all execute the exact versions pinned in uv.lock — no pinned-mirror drift.
|
|
14
|
+
- repo: local
|
|
15
|
+
hooks:
|
|
16
|
+
- id: ruff-check
|
|
17
|
+
name: ruff check --fix (uv.lock version, same as `just fix`)
|
|
18
|
+
language: system
|
|
19
|
+
entry: uv run ruff check --fix src/ tests/ scripts/
|
|
20
|
+
pass_filenames: false
|
|
21
|
+
types_or: [python, pyi]
|
|
22
|
+
- id: ruff-format
|
|
23
|
+
name: ruff format (uv.lock version, same as `just fix`)
|
|
24
|
+
language: system
|
|
25
|
+
entry: uv run ruff format src/ tests/ scripts/
|
|
26
|
+
pass_filenames: false
|
|
27
|
+
types_or: [python, pyi]
|
|
28
|
+
- id: pyright
|
|
29
|
+
name: pyright (same scope as `just typecheck` — strict dirs set in pyproject)
|
|
30
|
+
language: system
|
|
31
|
+
entry: uv run pyright
|
|
32
|
+
pass_filenames: false
|
|
33
|
+
types: [python]
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format is based on
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
|
|
5
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [0.5.0] - 2026-09-06
|
|
8
|
+
|
|
9
|
+
First stable operational embedding release. It promotes the two release candidates after package,
|
|
10
|
+
provider and real-consumer compatibility validation; each host remains responsible for validating
|
|
11
|
+
its own live adapters and policies.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Qualify OpenAI SDK 3.8 through the required live DeepSeek compatibility gate without calling the
|
|
16
|
+
OpenAI service, and update the locked Pyright version.
|
|
17
|
+
- Upgrade the SHA-pinned uv and Pages actions after CI artifact round-trip and rendered Pages checks.
|
|
18
|
+
- Validate Vibemonitor's real `KernelGate` integration and complete consumer suite on Python 3.14.
|
|
19
|
+
|
|
20
|
+
## [0.5.0rc2] - 2026-09-06
|
|
21
|
+
|
|
22
|
+
Maintenance candidate following the first published operational release. Publication remains
|
|
23
|
+
separate from live host-adapter acceptance.
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- SQLite audit discovery for reserved run IDs and runs needing operator review after incomplete or
|
|
28
|
+
uncertain execution.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- Validate the provider adapters against OpenAI SDK 3.7 and Anthropic SDK 1.4, while bounding their
|
|
33
|
+
optional dependency ranges below the next untested major versions.
|
|
34
|
+
- Upgrade SHA-pinned GitHub Actions and add a CI upload/download checksum round trip for release
|
|
35
|
+
artifacts; group future Actions updates into one Dependabot pull request.
|
|
36
|
+
- Refresh the locked Pydantic, pytest and ruff versions used by CI and local development.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- Package builds clear stale distributions, while published-artifact verification ignores unrelated
|
|
41
|
+
files and still requires exactly one wheel and one source distribution.
|
|
42
|
+
|
|
43
|
+
## [0.5.0rc1] - 2026-09-06
|
|
44
|
+
|
|
45
|
+
Published operational embedding candidate. Publication does not imply live-adapter UAT.
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
|
|
49
|
+
- Single-use `RunSession`, bounded operational defaults and root-wide step/tool/parser/LLM budgets.
|
|
50
|
+
- Explicit tool egress declarations, normalized input verification and output model revalidation.
|
|
51
|
+
- `TraceSink`, memory/SQLite sinks, durable pre-call records and fail-closed storage handling.
|
|
52
|
+
- Correlated invocation IDs, parent run IDs, partial/uncertain effect outcomes and terminal run status.
|
|
53
|
+
- Redacted operational events, detached snapshots and canonical detailed digests.
|
|
54
|
+
- Bounded shared reasoner executor, returned usage/latency capture and public provider result types.
|
|
55
|
+
- Sanitized provider failure categories, HTTP status and allow-listed operational error codes.
|
|
56
|
+
- Crash, concurrency, shared-budget, adapter-contract and provider failure regression tests.
|
|
57
|
+
- Python 3.14 CI, locked dependencies, pinned actions and single-artifact release promotion with
|
|
58
|
+
a pinned/checksummed uv runtime, version checks, isolated wheel smoke and served-byte verification.
|
|
59
|
+
- Operational/migration guide and conformance checklist.
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
|
|
63
|
+
- Require a patched `pydantic-settings>=2.14.2` (GHSA-4xgf-cpjx-pc3j) and refresh its lock entry.
|
|
64
|
+
- Version the SQLite audit schema, migrate the unversioned candidate layout, reject unknown/newer
|
|
65
|
+
layouts or missing key constraints, and verify released bytes after TestPyPI and PyPI publication.
|
|
66
|
+
- Require an explicit live-provider set in release CI; `0.5.0rc1` qualifies DeepSeek while OpenAI
|
|
67
|
+
remains supported but is not live-qualified for this candidate.
|
|
68
|
+
- Low-level interpreters reject reuse and context/trace mismatches; child IDs are opaque.
|
|
69
|
+
- Limits span descendants; `RunLimits()` remains unbounded for explicit low-level wiring.
|
|
70
|
+
- Failed tools stop later steps without implying rollback; output validation cannot undo a call.
|
|
71
|
+
- OpenAI-compatible fallback uses structured error parameters, once; refusals/truncations and
|
|
72
|
+
malformed outputs are terminal errors. DeepSeek routes directly through JSON mode with local
|
|
73
|
+
schema validation because its compatible API does not implement OpenAI's native JSON Schema mode.
|
|
74
|
+
Provider exception messages no longer include raw API text.
|
|
75
|
+
- Pyright explicitly resolves the project virtualenv. Documentation distinguishes root planning,
|
|
76
|
+
delegated untrusted planning and partial effects.
|
|
77
|
+
|
|
78
|
+
## [0.4.2] - 2026-07-10
|
|
79
|
+
|
|
80
|
+
A correctness release for the gate's provenance stage, plus fail-closed hardening of the provider
|
|
81
|
+
integrations. No API removals; two behavior changes in the gate/taint semantics (both strictly
|
|
82
|
+
safety-improving) and stricter model resolution.
|
|
83
|
+
|
|
84
|
+
### Fixed
|
|
85
|
+
|
|
86
|
+
- **Gate: a tainted value with unrestricted `readers` no longer skips declassification.**
|
|
87
|
+
`readers=None` is reserved for purely trusted data, but `quarantine_label` preserves the source's
|
|
88
|
+
readers — so a Q-LLM parse of a *trusted* const yielded a value that was tainted (Q_LLM) yet
|
|
89
|
+
carried `readers=None`, and the gate's stage 3 auto-permitted it into a WRITE without consulting
|
|
90
|
+
the declassification policy. The fast-path now requires an **explicit** readers set covering the
|
|
91
|
+
tool's required capabilities; unscoped tainted flows go through the declassifier. (Regression
|
|
92
|
+
tests at gate level and end-to-end: a recipient laundered through the Q-LLM is now blocked by the
|
|
93
|
+
policy instead of auto-committed.)
|
|
94
|
+
- **Taint: `DERIVED` is no longer counted as an untrusted source.** Merging values derived solely
|
|
95
|
+
from the trusted query no longer manufactures taint (which caused spurious denials in policies
|
|
96
|
+
keyed on `is_tainted`); taint derives only from the actual presence of `TOOL_READ` / `Q_LLM` in
|
|
97
|
+
the joined sources. `DERIVED` remains on the label as an audit marker. The two fixes land
|
|
98
|
+
together deliberately: each previously masked the other.
|
|
99
|
+
- **`RK_LLM_MAX_TOKENS` now has an effect.** `call_structured` / `parse_with_schema` defaulted to a
|
|
100
|
+
private module constant, silently ignoring the `settings.llm_max_tokens` override; they now read
|
|
101
|
+
settings (lazily) as the single source of truth.
|
|
102
|
+
|
|
103
|
+
### Changed
|
|
104
|
+
|
|
105
|
+
- **Transport faults fail closed with an audit record.** Provider API errors (rate limit exhausted,
|
|
106
|
+
5xx, network, SDK timeout) are wrapped in a new `TransportError(ReasonerError)` by the Anthropic
|
|
107
|
+
and OpenAI/Deepseek providers, so an in-flight run ends with a terminal trace event
|
|
108
|
+
(`PlanRejected`/`RunErrored`) instead of an unrecorded traceback.
|
|
109
|
+
- **Model resolution is strict and construction-time.** `PLLM`/`QLLM` no longer default to
|
|
110
|
+
`model="fake"` (a real provider without an explicit model got a 404 deep inside a run); an
|
|
111
|
+
omitted model resolves via `default_model_for(provider.name)` at construction. `default_model_for`
|
|
112
|
+
now raises `ValueError` for unknown providers instead of silently falling back to the Anthropic
|
|
113
|
+
model, and maps `"fake"` to the FakeProvider's ignored sentinel. `call_structured` requires
|
|
114
|
+
`model=` explicitly.
|
|
115
|
+
- **Anthropic default model refreshed**: `claude-sonnet-4-6` → `claude-sonnet-5` (comment variant
|
|
116
|
+
stays `claude-opus-4-8`); `.env.example` and `docs/DEVELOPMENT.md` updated, including the
|
|
117
|
+
previously undocumented `RK_LLM_TIMEOUT_SECONDS` / `RK_LLM_MAX_TOKENS` overrides.
|
|
118
|
+
- **Branch coverage enabled** (`coverage: branch = true`): line coverage alone hid the gate's
|
|
119
|
+
untested readers fast-path; the new gate tests pin both directions of that branch.
|
|
120
|
+
- **Toolchain drift eliminated.** pre-commit now runs ruff and pyright as local hooks through
|
|
121
|
+
`uv run` (same versions as `uv.lock`, same scope as `just lint`/`just typecheck` and CI, instead
|
|
122
|
+
of a stale pinned ruff mirror and a partial pyright scope); a new aggregate `just check` runs
|
|
123
|
+
lint + typecheck + test exactly as CI does. `CLAUDE.md` and the README role map now include
|
|
124
|
+
`tools/` (the registry is part of the no-bypass argument).
|
|
125
|
+
|
|
126
|
+
## [0.4.1] - 2026-05-31
|
|
127
|
+
|
|
128
|
+
### Changed
|
|
129
|
+
|
|
130
|
+
- **PyPI distribution name** is now `capability-reasoning-kernel` (the import stays `reasoning_kernel`,
|
|
131
|
+
and the repository stays `reasoning-kernel`): `reasoning-kernel` is taken on PyPI by an unrelated
|
|
132
|
+
project. Released on real PyPI in addition to TestPyPI.
|
|
133
|
+
|
|
134
|
+
## [0.4.0] - 2026-05-31
|
|
135
|
+
|
|
136
|
+
A minor release: a discoverable public API at the package root, with an "Embedding the kernel" snippet,
|
|
137
|
+
a maturity note, and a license section in the README. No breaking changes.
|
|
138
|
+
|
|
139
|
+
### Added
|
|
140
|
+
|
|
141
|
+
- **Public top-level API**: `reasoning_kernel` now re-exports the key building blocks and contracts
|
|
142
|
+
(`Interpreter`, `Gate`, `EffectDispatcher`, `PLLM`/`QLLM`, `ToolRegistry`, `ToolSpec`, `RunContext`,
|
|
143
|
+
`RunLimits`, the Plan IR, provenance types, …) under `__all__`, so integrators import from the
|
|
144
|
+
package root. See the README's *Embedding the kernel* section.
|
|
145
|
+
|
|
146
|
+
## [0.3.0] - 2026-05-31
|
|
147
|
+
|
|
148
|
+
A feature release: the value-combining `MergeStep` closes the last deferred item, with sound
|
|
149
|
+
object-level taint and no change to the trusted core. No breaking API changes.
|
|
150
|
+
|
|
151
|
+
### Added
|
|
152
|
+
|
|
153
|
+
- **`MergeStep`** — the value-COMBINING step. It folds several earlier results into one structured
|
|
154
|
+
value, labelled with the *join* of its inputs (sources union + `DERIVED`, readers intersection,
|
|
155
|
+
subjects union), so taint only ever increases. This lets a single-`source` Q-LLM parse or sub-kernel
|
|
156
|
+
work over a composite of several reads. Taint stays object-level (the join over-approximates, which
|
|
157
|
+
is strictly safer); field-level labels remain deferred. (`just demo-merge`)
|
|
158
|
+
|
|
159
|
+
## [0.2.0] - 2026-05-31
|
|
160
|
+
|
|
161
|
+
A hardening release: the kernel now fails closed on every unsafe path, the trusted core is type-checked
|
|
162
|
+
in strict mode with no suppressions, provider models are current, and composition is real. No breaking
|
|
163
|
+
API changes.
|
|
164
|
+
|
|
165
|
+
### Added
|
|
166
|
+
|
|
167
|
+
- **Composable nested sub-kernels (§5.4)**: a `SubKernelStep` delegates untrusted content to an inner
|
|
168
|
+
kernel at a **clamped, reduced grant** — an injection in that content is confined to what the
|
|
169
|
+
delegated grant permits. `RunLimits.max_depth` bounds nesting. (`just demo-subkernel`)
|
|
170
|
+
- **Multi-dimensional provenance**: a `ProvenanceLabel` carries *origin* (`sources`), *flow*
|
|
171
|
+
(`readers`), and *data subject* (`subjects`). Third-party data is never auto-released into a WRITE,
|
|
172
|
+
and the Q-LLM cannot launder any dimension.
|
|
173
|
+
- **Termination bounds**: `RunLimits` caps steps / effects / q-parses, plus an optional per-call
|
|
174
|
+
reasoner timeout; a run exceeding a bound aborts closed (`RunAborted`).
|
|
175
|
+
- **Quality bar**: coverage gate at 85% (`pytest-cov`), `pyright` strict over `schemas` + `kernel` +
|
|
176
|
+
`memory`, pre-commit hooks, and GitHub Actions CI (uv + just) running lint / typecheck / covered
|
|
177
|
+
tests on push & PR, with an optional manual live-provider job.
|
|
178
|
+
- **Plan IR robustness**: `ArgRef.path` is validated at plan-construction time — a malformed dotted
|
|
179
|
+
path (empty / leading / trailing / doubled `.`) is rejected with a clear error instead of surfacing
|
|
180
|
+
opaquely at navigation time.
|
|
181
|
+
- **Docs**: `docs/DEVELOPMENT.md` (setup, quality bar, provider configuration), a typed-library
|
|
182
|
+
`py.typed` marker, and a complete *Honest limits* section in the README — the trust boundary is
|
|
183
|
+
axiomatic, control flow is static and data-independent, and verification determinism is a discipline
|
|
184
|
+
rather than a typed invariant (mirrored in `DEVELOPMENT.md` rule #2 and the `DeclassPolicy` docstring).
|
|
185
|
+
- **Robustness tests**: provider-failure fail-closed, prompt timeout abort, the demo tools failing
|
|
186
|
+
closed on malformed world state, and key-free coverage of the registry, value store, capability
|
|
187
|
+
algebra, and the demo declassifier's rejection branches.
|
|
188
|
+
|
|
189
|
+
### Changed
|
|
190
|
+
|
|
191
|
+
- **Provider models refreshed to 2026**: Anthropic `claude-sonnet-4-6` (variant `claude-opus-4-8`),
|
|
192
|
+
OpenAI `gpt-5.5` (variant `gpt-5.5-pro`), Deepseek `deepseek-v4-flash` (variant `deepseek-v4-pro`).
|
|
193
|
+
Deepseek is OpenAI-compatible and reuses the `openai` SDK via `base_url` (no separate dependency).
|
|
194
|
+
- **Trusted core kept free of `Any`**: `TaintedValue.value` and the `ValueStore` path-navigation are
|
|
195
|
+
typed `object`; `_eval_step` is exhaustive over the `PlanStep` union (a new step kind that is not
|
|
196
|
+
handled is a type error).
|
|
197
|
+
- **No suppressions**: removed every `# noqa` / `# type: ignore` from `src` and `tests`, fixing the
|
|
198
|
+
root cause instead (e.g. tests construct `RunId` / `StepId` via their constructors).
|
|
199
|
+
|
|
200
|
+
### Fixed
|
|
201
|
+
|
|
202
|
+
- **Reasoner failure is fail-closed**: a provider returning no usable output (empty / refused /
|
|
203
|
+
malformed) raises `ReasonerError`; the Conductor records it and commits nothing instead of crashing
|
|
204
|
+
or acting on a partial result.
|
|
205
|
+
- **Prompt-timeout abort is prompt**: the timeout no longer blocks on the hung call — the executor is
|
|
206
|
+
shut down without waiting rather than used as a context manager.
|
|
207
|
+
- **Demo tools fail closed**: `read_inbox` on an empty inbox raises a semantic `ValueError` rather than
|
|
208
|
+
an opaque `IndexError`.
|
|
209
|
+
- Closed a provenance gate footgun and made the Conductor fail closed on any plan it cannot safely run.
|
|
210
|
+
|
|
211
|
+
## [0.1.0] - 2026
|
|
212
|
+
|
|
213
|
+
Initial reference implementation of the Reasoning Kernel pattern (strong / CaMeL-like form): the two
|
|
214
|
+
invariants, no-effect-bypasses-the-Verifier by construction, the deterministic declassification seam,
|
|
215
|
+
and the worked email-exfiltration demo.
|
|
216
|
+
|
|
217
|
+
[0.5.0]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.5.0
|
|
218
|
+
[0.5.0rc2]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.5.0rc2
|
|
219
|
+
[0.5.0rc1]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.5.0rc1
|
|
220
|
+
[0.4.2]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.4.2
|
|
221
|
+
[0.4.1]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.4.1
|
|
222
|
+
[0.4.0]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.4.0
|
|
223
|
+
[0.3.0]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.3.0
|
|
224
|
+
[0.2.0]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.2.0
|
|
225
|
+
[0.1.0]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.1.0
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# CLAUDE.md — reasoning-kernel
|
|
2
|
+
|
|
3
|
+
Framework-agnostic Python **reference implementation** of the Reasoning Kernel pattern (strong,
|
|
4
|
+
CaMeL-like form; Debenedetti et al. 2025): the LLM is treated as untrusted compute, mediated by
|
|
5
|
+
context on input and verification on output. Published to PyPI as `capability-reasoning-kernel`.
|
|
6
|
+
Remote: `gianlucamazza/reasoning-kernel`.
|
|
7
|
+
|
|
8
|
+
## The two invariants (do not violate)
|
|
9
|
+
- **A** — the reasoner never sees raw reality: every model call gets a system-assembled, inspectable
|
|
10
|
+
context (`src/reasoning_kernel/context/`).
|
|
11
|
+
- **B** — the reasoner never commits reality: no model output becomes a durable effect except through
|
|
12
|
+
the single deterministic gate (`src/reasoning_kernel/kernel/gate.py`).
|
|
13
|
+
|
|
14
|
+
The pattern fixes a *topology*, not a policy guarantee — keep mediation/verification at those
|
|
15
|
+
boundaries by construction.
|
|
16
|
+
|
|
17
|
+
## Stack & layout
|
|
18
|
+
- Python, `uv` (uv.lock), `pyproject.toml`, `just`. Lint Ruff, types pyright.
|
|
19
|
+
- `src/reasoning_kernel/`: `context/` · `kernel/` (gate) · `reasoner/` · `memory/` · `schemas/` ·
|
|
20
|
+
`tools/` (registry — sole holder of tool callables, part of the no-bypass argument) · `demo/`
|
|
21
|
+
|
|
22
|
+
## Commands
|
|
23
|
+
```bash
|
|
24
|
+
just check # lint + typecheck + test (everything CI runs)
|
|
25
|
+
just lint # ruff
|
|
26
|
+
just fix # ruff --fix
|
|
27
|
+
just typecheck # pyright
|
|
28
|
+
just test-live # tests against live model
|
|
29
|
+
just demo # run demo (also: demo-live, demo-subkernel, demo-limits, demo-merge, demo-reasoner-error)
|
|
30
|
+
uv sync # install/refresh env (--all-extras for providers + dev tools)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Conventions
|
|
34
|
+
- It's a reference impl + spec, not a turn-key product — favor clarity and conformance over features.
|
|
35
|
+
- Changes touching invariants A/B must preserve the topology; update `docs/` and the README spec.
|