Repository navigation
feat: identity-signed audit + Berget/Grunden providers + shared-memory recall - #167
Merged
Merged
Conversation
Agent gate coverage (7 agents) + the first 3.0 primitive (kit identity). Additive minor — no breaking changes to any stable surface. See CHANGELOG. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
Add the asymmetric ATTRIBUTION layer on top of the hash chain (integrity)
and HMAC anchor. When a local `kit identity` exists, each appended
`.kit-audit.jsonl` line is signed: kit signs the line `hash` and attaches
non-hashed `kid` + `sig` (Ed25519). Best-effort and append-safe — no
identity means entries are written exactly as before, and a signing
failure never blocks the append.
- audit.ts: appendChained best-effort signs via signLineHash(); verifyAuditChain
excludes sig/kid from the hashed remainder (mixed signed/unsigned/legacy logs
still verify); new pure verifyAuditSignatures(content, resolvePubkey) returning
{total, signed, verified, invalid, unverifiable, unsigned, ok}. Forged sig =>
hard fail; unknown/absent key => fail-open.
- identity.ts: localPublicKeys() builds a kid->pubkey trust map from the current
identity plus archived rotated (.bak) records.
- commands/audit.ts: `kit audit verify` reports the signature tally and fails on
a forged signature.
- docs/AUDIT_ATTESTATION.md §2.5 + CHANGELOG Unreleased.
- Tests: chain stays valid with sig/kid present, signed entries verify, forged
sig fails, unknown key is unverifiable (fail-open), legacy keyless is unsigned-ok,
localPublicKeys resolves current + rotated keys.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
Add `berget` and `grunden` (EU-sovereign, OpenAI-compatible inference) to the service registry with their canonical key names and where to get them, so kit's secrets layer treats them as known, vault-resolved keys. Catalog-only by design: both are consumed through the `openai` SDK with a custom base URL, so there is no unique package/file signal to auto-detect on — keying on the `openai` dep would misattribute every OpenAI user. Generic kv-secret redaction already covers BERGET_API_KEY/GRUNDEN_API_KEY, so no new redaction pattern is needed. Agent-backend wiring (point an agent's OpenAI-compatible base URL at these providers) and a Berget Code gate adapter are deferred to future work. Tests: both entries expose their *_API_KEY and declare no auto-detection; a plain `openai`-SDK repo does not auto-detect either provider. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
…ntegration-cmjw7t # Conflicts: # CHANGELOG.md
|
✅ Docker image built successfully
|
Wire the committed .kit/shared/memory.jsonl tier into the recall paths (memory design gap #1): - `kit memory search` now also runs searchShared() and surfaces matching team decisions/conventions ABOVE raw transcript hits. `--json` returns `{ messages, shared }` (was a bare hits array). Project-local even under `--global` (shared memory travels with the repo). Fail-open. - SessionStart recovery re-injects the project's most recent durable shared decisions (kinds decision/convention/security/status; notes/how-built excluded) via new exported `recentDecisions(root, limit)`, so a resumed session regains the SETTLED context, not only the last few raw turns. Deterministic, zero-LLM, fail-open throughout (a missing/broken shared store never breaks recall). Tests cover durable-kind filtering, newest-first ordering, the limit, and the empty-store fail-open path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
|
✅ Docker image built successfully
|
Decision lifecycle for the curated shared tier (memory design gap #2). Append-only: a change is a NEW entry that supersedes/reverses an old id; `active` stays implicit (absent field) so pre-lifecycle entries are byte-identical and diffs stay clean. - shared.ts: SharedEntry/ShareInput gain status/supersedes/reverses; shareEntry persists them only when non-default. New pure helpers effectiveStatus (explicit status wins, else referenced-by-later ⇒ superseded/reversed; reverses outranks), activeShared, formatAge. - commands/memory.ts: `kit memory share --supersedes/--reverses/--status` (validates the referenced id exists); `kit memory area`/`search` badge superseded/reversed entries + show the chain and age; area --json carries the effective status. - hook.ts: SessionStart recovery surfaces only ACTIVE durable decisions (recentDecisions → activeShared) with age, so a resume sees the decision HEAD, not a graveyard. Surfacing shows facts (status, age, supersedes-chain); the relevance call stays human (zero-LLM, deterministic). Tests cover supersede/reverse resolution, reverses>supersedes precedence, explicit-status, the active filter, age bucketing, and recovery exclusion of superseded decisions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
|
✅ Docker image built successfully
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Three additive, backward-compatible changes on the integration branch.
1. Identity-signed audit entries + signature verify
Asymmetric attribution on top of the
.kit-audit.jsonlhash chain + HMAC anchor. When a localkit identityexists, each appended line is signed (kid+ Ed25519sigover the line hash). Best-effort/append-safe;verifyAuditChainexcludessig/kidfrom the hashed remainder so mixed signed/unsigned/legacy logs still verify. NewverifyAuditSignatures();kit audit verifyreports the tally and fails on a forged signature.localPublicKeys()builds the trust map (current + rotated keys). Docs:AUDIT_ATTESTATION.md§2.5.2. Berget AI + Grunden.ai as known providers
berget/grunden(EU-sovereign, OpenAI-compatible inference) added to the service registry with canonical key names sokit secretstreats them as known, vault-resolved keys. Catalog-only by design (no unique package signal — keying onopenaiwould misattribute every OpenAI user). Agent-backend wiring + a Berget Code gate adapter deferred.3. Curated shared memory folded into recall (memory design gap #1)
kit memory searchnow also searches the committed.kit/shared/memory.jsonltier and surfaces matching team decisions/conventions above raw transcript hits (--json→{ messages, shared }). SessionStart recovery re-injects the project's most recent durable shared decisions (kinds decision/convention/security/status) viarecentDecisions(). Project-local, deterministic, fail-open.Type of Change
Testing
npm test) — 1886 pass / 0 fail;run-security-check.mjsPASS (19 ok)Verified live:
kit memory share→kit memory searchsurfaces the curated decision above raw hits;--jsonreturns{ messages, shared }.Breaking Changes
None / N/A — all three changes are additive and backward-compatible. (
memory search --jsongains a wrapping object{ messages, shared }vs a bare array; experimental surface.)🤖 Generated with Claude Code
https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg