| /* | |
| * Licensed to the Apache Software Foundation (ASF) under one | |
| * or more contributor license agreements. See the NOTICE file | |
| * distributed with this work for additional information | |
| * regarding copyright ownership. The ASF licenses this file | |
| * to you under the Apache License, Version 2.0 (the | |
| * "License"); you may not use this file except in compliance | |
| * with the License. You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, | |
| * software distributed under the License is distributed on an | |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| * KIND, either express or implied. See the License for the | |
| * specific language governing permissions and limitations | |
| * under the License. | |
| */ | |
| pub use maka_agent_facts::memory::*; | |
| use schemars::JsonSchema; | |
| use serde::{Deserialize, Serialize}; | |
| #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] | |
| #[serde(rename_all = "camelCase", deny_unknown_fields)] | |
| pub struct MemoryRead { | |
| pub scope: MemoryScope, | |
| pub id: MemoryId, | |
| } | |
| #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] | |
| #[serde(rename_all = "camelCase", deny_unknown_fields)] | |
| pub struct MemoriesRead { | |
| pub scope: MemoryScope, | |
| pub after: Option<MemoryId>, | |
| pub limit: u32, | |
| } | |
| #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] | |
| #[serde(rename_all = "camelCase", deny_unknown_fields)] | |
| pub struct MemoryPage { | |
| pub records: Vec<MemoryRecord>, | |
| pub next: Option<MemoryId>, | |
| } | |
| #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] | |
| #[serde(rename_all = "camelCase", deny_unknown_fields)] | |
| pub struct MemoryChange { | |
| pub scope: MemoryScope, | |
| pub edit: MemoryEdit, | |
| pub resolution: Option<MemoryResolution>, | |
| } | |
| #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] | |
| #[serde(rename_all = "camelCase", deny_unknown_fields)] | |
| pub struct MemoryHistoryRead { | |
| pub scope: MemoryScope, | |
| pub id: MemoryId, | |
| pub after: Option<MemoryRevision>, | |
| pub limit: u32, | |
| } | |
| #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] | |
| #[serde(rename_all = "camelCase", deny_unknown_fields)] | |
| pub struct MemoryHistoryPage { | |
| pub versions: Vec<MemoryVersion>, | |
| pub next: Option<MemoryRevision>, | |
| } | |
| #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] | |
| #[serde(rename_all = "camelCase", deny_unknown_fields)] | |
| pub struct MemoryEvidenceRead { | |
| pub scope: MemoryScope, | |
| pub id: MemoryId, | |
| pub assertion: MemoryRevision, | |
| pub after: Option<u64>, | |
| pub limit: u32, | |
| } | |
| #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] | |
| #[serde(rename_all = "camelCase", deny_unknown_fields)] | |
| pub struct MemoryEvidencePage { | |
| pub evidence: Vec<MemoryEvidence>, | |
| pub next: Option<u64>, | |
| } | |
| #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] | |
| #[serde(rename_all = "camelCase", deny_unknown_fields)] | |
| pub struct MemoryResolution { | |
| pub session_id: String, | |
| pub model: crate::contract::ModelSelection, | |
| } | |
| #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] | |
| #[serde(rename_all = "camelCase", deny_unknown_fields)] | |
| pub struct ReconcileMemories { | |
| pub scope: MemoryScope, | |
| pub writes: Vec<MemoryWrite>, | |
| pub resolution: Option<MemoryResolution>, | |
| } |