| 1 | package event |
| 2 | |
| 3 | // CacheDiagnostics describes whether and why the cacheable prefix changed. |
| 4 | type CacheDiagnostics struct { |
| 5 | PrefixHash string |
| 6 | PrefixChanged bool |
| 7 | PrefixChangeReasons []string // "system", "tools", "log_rewrite", "session_context" |
| 8 | SystemHash string |
| 9 | ToolsHash string |
| 10 | LogRewriteVersion int |
| 11 | ToolSchemaTokens int |
| 12 | CacheMissTokens int |
| 13 | CacheHitTokens int |
| 14 | SessionContext *SessionContextDiagnostics |
| 15 | } |
| 16 | |
| 17 | // SessionContextSectionDiagnostics is a content-free fingerprint. |
| 18 | type SessionContextSectionDiagnostics struct { |
| 19 | Digest string |
| 20 | Chars int |
| 21 | } |
| 22 | |
| 23 | // SessionContextDiagnostics attributes a snapshot change without logging bodies. |
| 24 | type SessionContextDiagnostics struct { |
| 25 | Version int |
| 26 | Digest string |
| 27 | TargetRole string |
| 28 | Reasons []string |
| 29 | Environment SessionContextSectionDiagnostics |
| 30 | Workspace SessionContextSectionDiagnostics |
| 31 | BackgroundMemory SessionContextSectionDiagnostics |
| 32 | SkillsCatalog SessionContextSectionDiagnostics |
| 33 | } |
| 34 |