26382a7ac6
CI / Clippy (push) Failing after 15m13s
CI / Test (ubuntu-latest) (push) Failing after 16m1s
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Build (no embeddings / no ORT) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Cookbook (Node) (push) Has been cancelled
CI / Pi Extension (Node) (push) Has been cancelled
CI / Rust SDK (lean-ctx-client) (push) Has been cancelled
CI / Embed SDK (lean-ctx-sdk) (push) Has been cancelled
CI / Python SDK (leanctx) (push) Has been cancelled
CI / Hermes Plugin (Python) (push) Has been cancelled
CI / SDK Conformance Matrix (push) Has been cancelled
CI / Coverage (push) Has been cancelled
CI / cargo-deny (push) Has been cancelled
CI / Adversarial Safety (push) Has been cancelled
CI / Benchmarks (push) Has been cancelled
CI / Output-Quality Gate (eval A/B) (push) Has been cancelled
CI / Documentation (push) Has been cancelled
CI / CI Green (push) Has been cancelled
JetBrains Plugin / Actionlint (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (rust) (push) Has been cancelled
JetBrains Plugin / Validation (push) Has been cancelled
JetBrains Plugin / Build (push) Has been cancelled
JetBrains Plugin / Test (push) Has been cancelled
Security Check / Security Scan (push) Has been cancelled
53 lines
1.8 KiB
Markdown
53 lines
1.8 KiB
Markdown
# CCP Session Bundle v1 (CcpSessionBundleV1)
|
|
|
|
GitLab: `#2316`
|
|
|
|
CCP Session Bundles standardisieren **Export/Import** von Session-Excerpts für Replayability: Task, Findings, Decisions, Evidence (tool receipts + manual keys) sowie Governance/Policy Hashes.
|
|
|
|
## Ziele
|
|
|
|
- **Deterministisch**: gleiche Session + gleiche Policy ⇒ gleiches Bundle (bis auf `exported_at`).
|
|
- **Bounded**: feste Caps (Anzahl + Bytes).
|
|
- **Replayable**: enthält Project Identity Hash + Policy Hashes.
|
|
- **Redacted-by-default**: Exports enthalten standardmäßig keine Secret-like Inhalte.
|
|
|
|
## Bundle Format (JSON)
|
|
|
|
Top-level Felder:
|
|
|
|
- `schema_version`: `1`
|
|
- `exported_at`: RFC3339 timestamp
|
|
- `project`: project hashes (root + identity)
|
|
- `role`: `{ name, policy_md5 }`
|
|
- `profile`: `{ name, policy_md5 }`
|
|
- `session`: bounded excerpt (task/findings/decisions/files/progress/next_steps/evidence/stats)
|
|
|
|
## Privacy Levels
|
|
|
|
- `privacy="redacted"` (default): Evidence `value` wird entfernt, Strings werden durch `redaction::redact_text` gejailt.
|
|
- `privacy="full"`: nur für Admin vorgesehen; kann trotzdem redaction aktiv lassen.
|
|
|
|
## Import Semantik
|
|
|
|
- Import setzt Session-Excerpt Felder (bounded) und markiert missing/stale file paths.
|
|
- Project identity mismatch wird als Warnung reportet, Import bleibt möglich (Provenance bleibt).
|
|
|
|
## Boundedness
|
|
|
|
- Session selbst ist über MAX_* Caps bounded (`rust/src/core/session.rs`).
|
|
- Export/Import enforced zusätzlich eine max JSON byte size.
|
|
|
|
## Surface
|
|
|
|
Tool:
|
|
|
|
- `ctx_session action=export format=json|summary write=true|false path=<optional> privacy=redacted|full`
|
|
- `ctx_session action=import path=<bundle.json>`
|
|
|
|
## Relevanter Code
|
|
|
|
- Bundle contract/runtime: `rust/src/core/ccp_session_bundle.rs`
|
|
- Session store: `rust/src/core/session.rs`
|
|
- Tool surface: `rust/src/tools/ctx_session.rs` + dispatch `rust/src/server/dispatch/session_tools.rs`
|
|
|