The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: files changed crates/openhuman-core/src/storage/import/fixtures/legacy-v1-profile/generator/C
Steven Enamakel897bc599df0c
diff --git a/crates/openhuman-core/src/storage/import/fixtures/legacy-v1-profile/generator/Cargo.lock b/crates/openhuman-core/src/storage/import/fixtures/legacy-v1-profile/generator/Cargo.lockindex 35b022b295..3d1b38c6de 100644--- a/crates/openhuman-core/src/storage/import/fixtures/legacy-v1-profile/generator/Cargo.lock+++ b/crates/openhuman-core/src/storage/import/fixtures/legacy-v1-profile/generator/Cargo.lock@@ -2,6 +2,15 @@# It is not intended for manual editing.version = 4+[[package]]+name = "android_system_properties"+version = "0.1.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc"+dependencies = [+ "libc",+]+[[package]]name = "async-trait"version = "0.1.92"@@ -13,6 +22,12 @@ dependencies = ["syn 3.0.9",]+[[package]]+name = "autocfg"+version = "1.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"+[[package]]name = "bitflags"version = "2.13.2"@@ -58,6 +73,26 @@ version = "1.0.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"+[[package]]+name = "chrono"+version = "0.4.45"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"+dependencies = [+ "iana-time-zone",+ "js-sys",+ "num-traits",+ "serde",+ "wasm-bindgen",+ "windows-link",+]++[[package]]+name = "core-foundation-sys"+version = "0.8.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"+[[package]]name = "cpufeatures"version = "0.2.17"@@ -201,6 +236,30 @@ dependencies = ["hashbrown 0.17.1",]+[[package]]+name = "iana-time-zone"+version = "0.1.65"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"+dependencies = [+ "android_system_properties",+ "core-foundation-sys",+ "iana-time-zone-haiku",+ "js-sys",+ "log",+ "wasm-bindgen",+ "windows-core",+]++[[package]]+name = "iana-time-zone-haiku"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"+dependencies = [+ "cc",+]+[[package]]name = "itoa"version = "1.0.18"@@ -232,6 +291,8 @@ dependencies = [name = "legacy-v1-profile-writer"version = "0.1.0"dependencies = [+ "chrono",+ "serde","serde_json","tinystoragedrivers","tokio",@@ -254,12 +315,27 @@ dependencies = ["vcpkg",]+[[package]]+name = "log"+version = "0.4.34"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"+[[package]]name = "memchr"version = "2.8.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"+[[package]]+name = "num-traits"+version = "0.2.19"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"+dependencies = [+ "autocfg",+]+[[package]]name = "once_cell"version = "1.21.4"@@ -671,6 +747,65 @@ dependencies = ["wasm-bindgen",]+[[package]]+name = "windows-core"+version = "0.62.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"+dependencies = [+ "windows-implement",+ "windows-interface",+ "windows-link",+ "windows-result",+ "windows-strings",+]++[[package]]+name = "windows-implement"+version = "0.60.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "windows-interface"+version = "0.59.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "windows-link"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"++[[package]]+name = "windows-result"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"+dependencies = [+ "windows-link",+]++[[package]]+name = "windows-strings"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"+dependencies = [+ "windows-link",+]+[[package]]name = "wit-bindgen"version = "0.57.1"diff --git a/crates/openhuman-core/src/storage/import/fixtures/legacy-v1-profile/generator/Cargo.toml b/crates/openhuman-core/src/storage/import/fixtures/legacy-v1-profile/generator/Cargo.tomlindex b0dfc62fcd..a3d30875c4 100644--- a/crates/openhuman-core/src/storage/import/fixtures/legacy-v1-profile/generator/Cargo.toml+++ b/crates/openhuman-core/src/storage/import/fixtures/legacy-v1-profile/generator/Cargo.toml@@ -7,8 +7,8 @@ publish = false[workspace][dependencies]-openhuman = { path = "../../../../../../../../crates/openhuman-core", default-features = false, features = ["storage-sqlite"] }tinystoragedrivers = { git = "https://github.com/tinyhumansai/tinystoragedrivers.git", rev = "0c6dcfce57201fadd830431f36fd759c3baa897a", features = ["sqlite"] }chrono = { version = "0.4", features = ["serde"] }+serde = { version = "1", features = ["derive"] }serde_json = "1"tokio = { version = "1", features = ["macros", "rt-multi-thread"] }diff --git a/crates/openhuman-core/src/storage/import/fixtures/legacy-v1-profile/generator/src/main.rs b/crates/openhuman-core/src/storage/import/fixtures/legacy-v1-profile/generator/src/main.rsindex b2696095f4..e8986f259b 100644--- a/crates/openhuman-core/src/storage/import/fixtures/legacy-v1-profile/generator/src/main.rs+++ b/crates/openhuman-core/src/storage/import/fixtures/legacy-v1-profile/generator/src/main.rs@@ -1,15 +1,108 @@use std::path::PathBuf;use chrono::{DateTime, Utc};-use openhuman::artifacts::types::{ArtifactKind, ArtifactMeta, ArtifactStatus};-use openhuman::platform::cost::types::{CostRecord, CostSource, TokenUsage, UsageScope};-use openhuman::profiles::{ProfileId, types::ProfileMeta};+use serde::{Deserialize, Serialize};use serde_json::{Value, json};use tinystoragedrivers::{CollectionSpec, Precondition, Scope, StorageConfig, WriteOptions};const PROFILE_ID: &str = "u1";const CREATED_AT_MS: i64 = 1_738_548_306_000;+// These wire types are copied from the historical owner models at+// OpenHuman 2d3e22636e^ (paths listed in the fixture README). Keeping this+// generator standalone avoids linking the current host or its patched module+// graph into a historical TSD v1 writer. The fixture test decodes the output+// with today's owner models after the owner's schema step runs.+#[derive(Serialize)]+struct LegacyCostRecord {+ id: String,+ usage: LegacyTokenUsage,+ session_id: String,+}++#[derive(Serialize)]+struct LegacyTokenUsage {+ model: String,+ input_tokens: u64,+ output_tokens: u64,+ total_tokens: u64,+ cached_input_tokens: u64,+ cache_creation_tokens: u64,+ reasoning_tokens: u64,+ cost_usd: f64,+ cost_source: LegacyCostSource,+ #[serde(skip_serializing_if = "Option::is_none")]+ run_id: Option<String>,+ #[serde(skip_serializing_if = "Option::is_none")]+ root_run_id: Option<String>,+ #[serde(skip_serializing_if = "LegacyUsageScope::is_empty")]+ scope: LegacyUsageScope,+ timestamp: DateTime<Utc>,+}++#[derive(Serialize)]+#[serde(rename_all = "snake_case")]+enum LegacyCostSource {+ Estimated,+ ProviderCharged,+ Unknown,+}++#[derive(Default, Serialize, Deserialize)]+struct LegacyUsageScope {}++impl LegacyUsageScope {+ fn is_empty(&self) -> bool {+ true+ }+}++#[derive(Serialize)]+struct LegacyArtifactMeta {+ id: String,+ kind: LegacyArtifactKind,+ title: String,+ path: String,+ #[serde(skip_serializing_if = "Option::is_none")]+ file: Option<String>,+ #[serde(skip_serializing_if = "Option::is_none")]+ file_root: Option<String>,+ size_bytes: u64,+ status: LegacyArtifactStatus,+ created_at: DateTime<Utc>,+ #[serde(skip_serializing_if = "Option::is_none")]+ error: Option<String>,+ #[serde(skip_serializing_if = "Option::is_none")]+ thread_id: Option<String>,+ #[serde(skip_serializing_if = "Option::is_none")]+ tool_call_id: Option<String>,+}++#[derive(Serialize)]+#[serde(rename_all = "lowercase")]+enum LegacyArtifactKind {+ Presentation,+ Document,+ Image,+ Video,+ Other,+}++#[derive(Serialize)]+#[serde(rename_all = "lowercase")]+enum LegacyArtifactStatus {+ Pending,+ Ready,+ Failed,+}++#[derive(Serialize)]+struct LegacyProfileMeta {+ profile_id: String,+ created_at: u64,+ layout_version: u32,+}+#[tokio::main]async fn main() -> Result<(), Box<dyn std::error::Error>> {let path = std::env::args_os()@@ -31,10 +124,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {let profile_scope = backend.for_scope(&Scope::new("profile:u1")?)?;let docs = profile_scope.documents();- let cost = CostRecord {+ let cost = LegacyCostRecord {id: "cost-0001".into(),session_id: "session-fixture".into(),- usage: TokenUsage {+ usage: LegacyTokenUsage {model: "fixture-model".into(),input_tokens: 12,output_tokens: 3,@@ -43,10 +136,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {cache_creation_tokens: 0,reasoning_tokens: 0,cost_usd: 0.000_015,- cost_source: CostSource::Estimated,+ cost_source: LegacyCostSource::Estimated,run_id: None,root_run_id: None,- scope: UsageScope::default(),+ scope: LegacyUsageScope::default(),timestamp: DateTime::parse_from_rfc3339("2025-02-03T04:05:06.789+02:00")?.with_timezone(&Utc),},@@ -55,15 +148,15 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {cost_body["ts_ms"] = 1_738_548_306_789_i64.into();put(docs, "cost_records", "cost-0001", cost_body).await?;- let artifact = ArtifactMeta {+ let artifact = LegacyArtifactMeta {id: "artifact-1".into(),- kind: ArtifactKind::Document,+ kind: LegacyArtifactKind::Document,title: "Fixture plan".into(),path: "artifact-1/plan.md".into(),file: None,file_root: None,size_bytes: 4,- status: ArtifactStatus::Ready,+ status: LegacyArtifactStatus::Ready,created_at: DateTime::parse_from_rfc3339("2025-02-03T04:05:06Z")?.with_timezone(&Utc),error: None,thread_id: Some("thread-1".into()),@@ -90,8 +183,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {.await?;let cluster = backend.for_scope(&Scope::new("cluster")?)?;- let profile = ProfileMeta {- profile_id: ProfileId::parse(PROFILE_ID)?,+ let profile = LegacyProfileMeta {+ profile_id: PROFILE_ID.into(),created_at: u64::try_from(CREATED_AT_MS / 1000)?,layout_version: 1,};diff --git a/vendor/tinyjuice b/vendor/tinyjuiceindex 5008f79e2a..b5216377ca 160000--- a/vendor/tinyjuice+++ b/vendor/tinyjuice@@ -1 +1 @@-Subproject commit 5008f79e2a8cc333f1ffd08e9132e1c810cca3a3+Subproject commit b5216377ca256b45c0d4f1395229d3bb12eb080a