chore: and more cleanups

This commit is contained in:
2026-04-09 17:46:34 +02:00
parent b7807161f0
commit ee961f1b02
15 changed files with 529 additions and 16 deletions

View File

@@ -19,6 +19,16 @@ entity AiEndpoint {
-- airplane: local model (Ollama, LM Studio, etc.)
}
surface AiEndpointSurface {
context endpoint: AiEndpoint
exposes:
endpoint.kind
endpoint.url
endpoint.api_key when endpoint.api_key != null
endpoint.model
}
entity SecureKeyStore {
-- Encrypts API keys using OS keychain
-- macOS: Keychain, Windows: DPAPI, Linux: libsecret
@@ -26,6 +36,10 @@ entity SecureKeyStore {
-- No plain-text fallback
}
surface SecureKeyStoreSurface {
context _: SecureKeyStore
}
entity ChatConversation {
title: String
model: String
@@ -35,6 +49,17 @@ entity ChatConversation {
messages: ChatMessage with conversation = this
}
surface ChatConversationSurface {
context conversation: ChatConversation
exposes:
conversation.title
conversation.model
conversation.created_at
conversation.updated_at
conversation.messages.count
}
entity ChatMessage {
conversation: ChatConversation
role: system | user | assistant | tool
@@ -44,6 +69,18 @@ entity ChatMessage {
created_at: Timestamp
}
surface ChatMessageSurface {
context message: ChatMessage
exposes:
message.conversation
message.role
message.content
message.token_usage_input when message.token_usage_input != null
message.token_usage_output when message.token_usage_output != null
message.created_at
}
surface OneShotAiSurface {
facing _: AiOperator