Skip to content

Commit 26eeab5

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/mcp-driver
2 parents 9421a2b + e2ff8a7 commit 26eeab5

5 files changed

Lines changed: 52 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,32 @@ jobs:
4545
python examples/basic_cli.py
4646
python examples/billing_demo.py
4747
python examples/http_driver_demo.py
48+
49+
conformance_stub:
50+
name: "Weaver Spec Conformance Stub (v0.1.0)"
51+
runs-on: ubuntu-latest
52+
needs: test
53+
permissions:
54+
contents: read
55+
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- name: Set up Python
60+
uses: actions/setup-python@v5
61+
with:
62+
python-version: "3.12"
63+
64+
- name: Install dependencies
65+
run: pip install -e ".[dev]"
66+
67+
# Placeholder: activate once dgenio/weaver-spec#4 ships the conformance runner.
68+
# weaver-spec and weaver-contracts are published on PyPI.
69+
# weaver_contracts.conformance does not yet exist (dgenio/weaver-spec#4).
70+
# Replace this step with:
71+
# pip install weaver-contracts # PyPI dist name uses a hyphen
72+
# python -m weaver_contracts.conformance --target agent_kernel
73+
- name: weaver-spec conformance suite (stub)
74+
run: |
75+
echo "weaver-contracts 0.2.0 is on PyPI; weaver_contracts.conformance runner not yet available (dgenio/weaver-spec#4)."
76+
echo "Stub passes. Activate when dgenio/weaver-spec#4 ships."

AGENTS.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ agent-kernel is part of the **Weaver ecosystem**:
2525

2626
This repo must conform to weaver-spec invariants. Key invariants (all equally critical):
2727
- **I-01**: Every tool output must pass through a context boundary before reaching the LLM.
28-
- **I-02**: Context boundaries must enforce budgets (size, depth, field count).
28+
- **I-02**: Every execution must be authorized and auditable (preceded by a policy decision, followed by a trace event).
2929
- **I-06**: Tokens must bind principal + capability + constraints; no reuse across principals.
3030

31+
Note: Budget enforcement (size, depth, field count) is an agent-kernel implementation
32+
constraint that satisfies I-01 — it is not a separate weaver-spec invariant number.
33+
3134
Full spec: [dgenio/weaver-spec](https://github.com/dgenio/weaver-spec)
3235

3336
## Domain vocabulary

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111
- Built-in `MCPDriver` with stdio and Streamable HTTP transports, tool auto-discovery, normalized MCP result handling, and optional dependency guardrails.
12-
12+
- Declared weaver-spec v0.1.0 compatibility in README: invariants I-01 (firewall), I-02 (authorization + audit), and I-06 (scoped tokens) are satisfied.
13+
- Added placeholder `conformance_stub` CI job that will activate once the weaver-spec conformance suite ships (dgenio/weaver-spec#4).
1314
## [0.4.0] - 2026-03-14
1415

1516
### Added

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,19 @@ asyncio.run(main())
110110

111111
`agent-kernel` sits **above** `contextweaver` (context compilation) and **above** raw tool execution. It provides the authorization, execution, and audit layer.
112112

113+
## Weaver Spec Compatibility: v0.1.0
114+
115+
agent-kernel is a compliant implementation of [weaver-spec v0.1.0](https://github.com/dgenio/weaver-spec).
116+
The following invariants are satisfied:
117+
118+
| Invariant | Description | How agent-kernel satisfies it |
119+
|-----------|-------------|-------------------------------|
120+
| **I-01** | LLM never sees raw tool output by default | `Context Firewall` always transforms `RawResult → Frame`; raw driver output is not returned by default, and non-admin principals cannot obtain `raw` response mode |
121+
| **I-02** | Every execution is authorized and auditable | `PolicyEngine` authorizes at grant time; a valid `CapabilityToken` (HMAC-verified on every `invoke()`) carries the authorization decision; `TraceStore` records every `ActionTrace` |
122+
| **I-06** | CapabilityTokens are scoped | Tokens bind `principal_id + capability_id + constraints` with an explicit TTL; `revoke(token_id)` / `revoke_all(principal_id)` are supported |
123+
124+
See [docs/agent-context/invariants.md](docs/agent-context/invariants.md) for the full internal invariant list and [weaver-spec INVARIANTS.md](https://github.com/dgenio/weaver-spec/blob/main/docs/INVARIANTS.md) for the specification.
125+
113126
## Security disclaimers
114127

115128
> **v0.1 is not production-hardened for real authentication.**

docs/agent-context/invariants.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ All three are equally critical — there is no priority ordering.
1111
| Invariant | Requirement | Where enforced |
1212
|-----------|-------------|----------------|
1313
| **I-01** | Every tool output must pass through a context boundary before reaching the LLM | `Firewall.transform()` in `firewall/transform.py` |
14-
| **I-02** | Context boundaries must enforce budgets (size, depth, field count) | `Budgets` in `firewall/budgets.py` |
14+
| **I-02** | Every execution must be authorized and auditable (CapabilityToken validated before execution; TraceEvent recorded after) | `HMACTokenProvider.verify()` + `TraceStore.record()` in `kernel.py`; `PolicyEngine.evaluate()` at grant time in `grant_capability()` |
1515
| **I-06** | Tokens must bind principal + capability + constraints; no reuse across principals | `HMACTokenProvider.verify()` in `tokens.py` |
1616

17+
> **Budget enforcement** (size, depth, field count via `Budgets` in `firewall/budgets.py`) is an
18+
> implementation constraint that strengthens I-01. It has no separate invariant number in weaver-spec.
19+
1720
## Forbidden shortcuts — "never do" list
1821

1922
These constraints are non-negotiable. Violating any one silently degrades security.

0 commit comments

Comments
 (0)