Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3ee5a3c
refactor: run tiny domains as TinyBus modules
senamakel Aug 12, 2026
9013f0c
refactor(memory): start removing legacy driver seam
senamakel Aug 12, 2026
863472e
Merge remote-tracking branch 'upstream/main' into drop-tiny-crates
senamakel Aug 12, 2026
d4330c5
refactor(memory): bind the compiled module directly
senamakel Aug 12, 2026
44ed695
fix(memory): preserve module binding compatibility
senamakel Aug 12, 2026
3929796
fix(ci): support module-disabled memory builds
senamakel Aug 12, 2026
25648ca
chore(deps): synchronize tiny module lockfiles
senamakel Aug 12, 2026
120dde2
fix(flows): handle TinyFlows shell capability
senamakel Aug 12, 2026
2566609
fix(review): address module boundary feedback
senamakel Aug 12, 2026
5ebbb11
fix(docs): satisfy rustdoc list formatting
senamakel Aug 12, 2026
874b382
fix(memory): keep module id available without module gate
senamakel Aug 12, 2026
3716ec1
test(memory): align no-module boundary expectations
senamakel Aug 12, 2026
c721304
ci: acknowledge internal wallet gate tests
senamakel Aug 12, 2026
b99473e
fix(memory): route host operations through released module API
senamakel Aug 12, 2026
1b22931
Merge remote-tracking branch 'upstream/main' into drop-tiny-crates
senamakel Aug 12, 2026
d844934
fix(ci): refresh tauri lock for tinymemory v1
senamakel Aug 12, 2026
8df6c04
fix(memory): guard every tool-memory RPC
senamakel Aug 12, 2026
cad1672
fix(tests): stabilize native module workspaces
senamakel Aug 12, 2026
f02fc0a
fix(tests): keep module binding regression outside guard scan
senamakel Aug 12, 2026
74d80a2
fix(memory): route document ingest through module API
senamakel Aug 12, 2026
9530348
fix(tests): boot memory module for golden fixture
senamakel Aug 12, 2026
4e6c9d7
fix(tests): boot memory module for parity fixture
senamakel Aug 13, 2026
2ee7049
fix(tests): boot module-backed memory harnesses
senamakel Aug 13, 2026
cc31843
fix(tests): use host tool-memory API types
senamakel Aug 13, 2026
76075e8
fix(tests): publish module policy for slack sync fixture
senamakel Aug 13, 2026
5ad7001
fix(memory): route context recall through module API
senamakel Aug 13, 2026
e4cdd9d
fix(build): refresh desktop memory lockfile
senamakel Aug 13, 2026
4ce3135
test(memory): retire learned namespace bypass
senamakel Aug 13, 2026
d93b98b
test(memory): publish module policy in raw coverage
senamakel Aug 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,3 @@
path = vendor/tinymemory
url = https://github.com/tinyhumansai/tinymemory.git
branch = main
[submodule "vendor/tinywallet"]
path = vendor/tinywallet
url = https://github.com/tinyhumansai/tinywallet
[submodule "vendor/tinydocs"]
path = vendor/tinydocs
url = https://github.com/tinyhumansai/tinydocs
35 changes: 4 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ unicode-width = { version = "0.2", optional = true }
# After cloning: `git submodule update --init vendor/tinydocs`.
#
# Optional: exclusive to the default-ON `documents` feature.
tinydocs = { path = "vendor/tinydocs", default-features = false, optional = true }

# TinyWallet — host-agnostic multi-chain wallet primitives. Owns the address
# formats themselves: parsing, validation, and the conversions between their
Expand All @@ -475,11 +474,14 @@ tinydocs = { path = "vendor/tinydocs", default-features = false, optional = true
# What stays is address validation, key derivation, the `Transport` seam, the
# wire contract, EIP-712 hashing and ERC-20 calldata — none of which needs a
# chain library.
tinywallet = { path = "vendor/tinywallet", default-features = false, features = ["btc", "evm", "solana", "tron", "keccak", "key", "net", "wire", "eip712", "abi", "x402"], optional = true }
# secp256k1 signing over the digests the wallet module hands back. Pure Rust,
# and already in the graph beneath `coins-bip32` (which derives the key being
# used), so naming it directly costs nothing and is what lets `bitcoin` go.
k256 = { version = "0.13", default-features = false, features = ["std", "ecdsa"], optional = true }
bech32 = { version = "0.11", optional = true }
ripemd = { version = "0.1", optional = true }
coins-bip32 = { version = "0.8", optional = true }
sha3 = { version = "0.10", optional = true }

[target.'cfg(windows)'.dependencies]
# Windows: tokio-tungstenite uses native-tls (schannel) so wss://
Expand Down Expand Up @@ -676,7 +678,7 @@ inference = ["dep:cpal"]
# reference instead of extracted text
# (`agent::multimodal::extract_pdf_text`). Slim / headless builds opt out via
# `--no-default-features --features "<explicit list without documents>"`.
documents = ["dep:tinydocs", "modules"]
documents = ["modules"]
# The dynamic module host (`openhuman::modules`): the loader that admits a
# compiled `cdylib` through tinybus's ABI descriptor, manifest, dependency and
# SHA-256 gates, plus the `modules` RPC namespace and the registry of modules
Expand Down Expand Up @@ -739,9 +741,13 @@ voice = [
# pulls them in regardless.
web3 = [
"dep:k256",
"dep:bech32",
"dep:ripemd",
"dep:coins-bip32",
"dep:sha3",
"dep:curve25519-dalek",
"dep:coins-bip39",
"dep:tinywallet",
"modules",
]

# Managed Node.js runtime: `runtime::node` (download / verify / extract / install
Expand Down
4 changes: 2 additions & 2 deletions src/core/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::sync::OnceLock;

use serde_json::{Map, Value};

use tinycortex_api::capabilities::{Capabilities, Capability};
use crate::openhuman::memory::api::capabilities::{Capabilities, Capability};

use crate::core::ControllerSchema;

Expand Down Expand Up @@ -242,7 +242,7 @@ struct GroupedController {
/// Absence, not a stub that errors — a registered-but-failing method
/// teaches a model that the capability exists and makes it retry. Same
/// reasoning as the `flows` compile-time gate (see CLAUDE.md) and as
/// `tinycortex_api::capabilities`' module docs.
/// `crate::openhuman::memory::api::capabilities`' module docs.
capability: Option<Capability>,
controller: RegisteredController,
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/all_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ fn memory_controllers_form_one_contiguous_run_in_aggregator_order() {
// present and failing, because a registered-but-failing method teaches a model
// the capability exists and makes it retry.

use tinycortex_api::capabilities::Capability;
use crate::openhuman::memory::api::capabilities::Capability;

/// A workspace path unique to one test.
///
Expand Down
2 changes: 1 addition & 1 deletion src/core/cli_capability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
//! static namespace/function names, never from user-supplied argument values,
//! and no memory content can reach this path at all.

use crate::openhuman::memory::api::capabilities::{Capabilities, Capability};
use anyhow::Result;
use tinycortex_api::capabilities::{Capabilities, Capability};

use crate::core::subsystem::DriverClass;

Expand Down
6 changes: 4 additions & 2 deletions src/core/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ use crate::core::all::{
capability_for_parts, capability_for_rpc_method, sole_capability_for_namespace,
};
use crate::core::cli_capability::capability_verdict;
use tinycortex_api::capabilities::Capabilities;
use crate::openhuman::memory::api::capabilities::Capabilities;

#[test]
fn capability_gated_namespace_reports_a_config_fact_not_a_typo() {
Expand Down Expand Up @@ -368,7 +368,9 @@ fn capability_gated_function_reports_a_config_fact_not_a_typo() {
fn capability_gated_rpc_method_reports_its_family_unfiltered() {
assert_eq!(
capability_for_rpc_method("openhuman.memory_tree_wipe_all"),
Some(Some(tinycortex_api::capabilities::Capability::Tree))
Some(Some(
crate::openhuman::memory::api::capabilities::Capability::Tree
))
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/core/memory_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ const SUBCOMMAND_CONTROLLER: &[(&str, &str)] = &[

/// The capability `openhuman memory <sub>` needs, if any. Resolved from the
/// controller registry, never from a local table.
fn required_capability(subcommand: &str) -> Option<tinycortex_api::capabilities::Capability> {
fn required_capability(
subcommand: &str,
) -> Option<crate::openhuman::memory::api::capabilities::Capability> {
let function = SUBCOMMAND_CONTROLLER
.iter()
.find(|(sub, _)| *sub == subcommand)
Expand Down Expand Up @@ -546,7 +548,7 @@ mod tests {
use super::*;
use crate::core::cli_capability::{capability_verdict, CAPABILITY_UNAVAILABLE_PREFIX};
use crate::core::subsystem::DriverClass;
use tinycortex_api::capabilities::{Capabilities, Capability};
use crate::openhuman::memory::api::capabilities::{Capabilities, Capability};

/// Drift guard: a renamed controller function must break here rather than
/// silently un-gate a subcommand (`required_capability` would start
Expand Down
15 changes: 8 additions & 7 deletions src/core/runtime/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,11 @@ impl CoreContext {
/// would keep `memory_store` / `memory_recall` / `memory.list_documents`
/// answering off the embedded store the guarded re-point has not yet
/// covered. See [`MemoryBinding::disables_memory`](crate::openhuman::memory::binding::MemoryBinding::disables_memory).
pub fn memory_capabilities(&self) -> tinycortex_api::capabilities::Capabilities {
pub fn memory_capabilities(&self) -> crate::openhuman::memory::api::capabilities::Capabilities {
self.memory_binding()
.map(|binding| {
if binding.disables_memory() {
tinycortex_api::capabilities::Capabilities::default()
crate::openhuman::memory::api::capabilities::Capabilities::default()
} else {
binding.capabilities()
}
Expand Down Expand Up @@ -317,7 +317,8 @@ impl CoreContext {
/// there is no context at all. This is the direct analogue of
/// `core::all::group_allowed` and is the function a future capability
/// registration filter calls.
pub fn current_memory_capabilities() -> tinycortex_api::capabilities::Capabilities {
pub fn current_memory_capabilities() -> crate::openhuman::memory::api::capabilities::Capabilities
{
Self::current()
.map(|ctx| ctx.memory_capabilities())
.unwrap_or_else(crate::openhuman::memory::binding::unbound_default_capabilities)
Expand Down Expand Up @@ -1045,7 +1046,7 @@ mod tests {
assert!(ctx.memory_binding().is_err(), "no workspace ⇒ no binding");
assert_eq!(
ctx.memory_capabilities(),
tinycortex_api::capabilities::Capabilities::all(),
crate::openhuman::memory::api::capabilities::Capabilities::all(),
"a context with no binding must not deny any capability"
);
}
Expand All @@ -1060,14 +1061,14 @@ mod tests {
fn current_memory_capabilities_defaults_open_without_a_context() {
assert_eq!(
crate::openhuman::memory::binding::unbound_default_capabilities(),
tinycortex_api::capabilities::Capabilities::all()
crate::openhuman::memory::api::capabilities::Capabilities::all()
);
// And when a context *is* ambient, the call resolves through it rather
// than erroring.
let ctx = CoreContext::for_test(crate::core::runtime::DomainSet::full(), None, None);
assert_eq!(
ctx.memory_capabilities(),
tinycortex_api::capabilities::Capabilities::all()
crate::openhuman::memory::api::capabilities::Capabilities::all()
);
}

Expand All @@ -1078,7 +1079,7 @@ mod tests {
let ctx = CoreContext::for_test(crate::core::runtime::DomainSet::harness(), None, None);
assert_eq!(
ctx.memory_capabilities(),
tinycortex_api::capabilities::Capabilities::all()
crate::openhuman::memory::api::capabilities::Capabilities::all()
);
}
}
28 changes: 4 additions & 24 deletions src/core/subsystem/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use serde::{Deserialize, Serialize};
/// This is a **host configuration fact**, never something the driver reports.
///
/// Deliberately not `#[non_exhaustive]`, for the same reason
/// `tinycortex_api::capabilities::Capability` is not: adding a class must break
/// `crate::openhuman::memory::api::capabilities::Capability` is not: adding a class must break
/// every exhaustive `match` in the host, because those matches are where policy
/// (egress, trust, credential resolution) is decided per class.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
Expand All @@ -46,27 +46,7 @@ pub enum DriverClass {
/// An out-of-process backend reached through a transport adapter over a
/// documented wire contract.
External,
/// A loadable native module: a `cdylib` admitted through tinybus's ABI,
/// manifest and digest gates and reached over the in-process module bus.
///
/// Neither of the two classes above fits, and the difference is the policy
/// this class gates:
///
/// - not [`Self::Embedded`], because the code is **not compiled into this
/// binary**. It is downloaded, verified against a digest pinned in
/// `modules::registry`, and `dlopen`ed. Whether it is present at all is a
/// runtime fact, so a capability set derived from it can be empty on a
/// platform no artifact is published for.
/// - not [`Self::External`], because there is **no egress and no process
/// boundary**. It shares this address space, these privileges and this
/// crash domain, so the trust checks that make sense for a remote backend
/// (endpoint allowlisting, TLS, credential scoping) are neither applicable
/// nor sufficient. What protects the host is admission, not isolation.
///
/// Treating a module as `External` would apply egress policy to something
/// that makes no network calls while implying an isolation the loader does
/// not provide; treating it as `Embedded` would claim a compile-time
/// guarantee that a downloaded artifact does not have.
/// A verified native TinyBus module loaded into this process.
Module,
/// A stub advertising zero capabilities — what a compiled-out or
/// unconfigured subsystem binds to.
Expand Down Expand Up @@ -128,7 +108,7 @@ impl std::str::FromStr for DriverClass {

/// Liveness of a bound driver, in the kernel's generic vocabulary.
///
/// Shaped one-for-one against `tinycortex_api::health::MemoryHealth` — and
/// Shaped one-for-one against `crate::openhuman::memory::api::health::MemoryHealth` — and
/// against whatever the next subsystem's contract carries — so the boundary
/// conversion is a total three-arm `match` that cannot drift. Serializes as an
/// internally-tagged object with a stable snake_case `status` discriminant:
Expand Down Expand Up @@ -211,7 +191,7 @@ impl std::fmt::Display for DriverHealth {
/// The kernel deliberately does not know any subsystem's family vocabulary —
/// `"tree"` and `"tool_memory"` mean something to the memory subsystem and
/// nothing here. Each subsystem's adapter converts its own typed set (for
/// memory: `tinycortex_api::capabilities::Capabilities`) into this at bind
/// memory: `crate::openhuman::memory::api::capabilities::Capabilities`) into this at bind
/// time, and the kernel only ever asks "does the bound driver advertise this
/// string?" when deciding whether to register a controller or emit a tool.
///
Expand Down
4 changes: 2 additions & 2 deletions src/core/subsystem/driver_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fn driver_health_display_includes_the_reason() {
/// silently making the conversion partial.
#[test]
fn driver_health_shape_matches_memory_health_one_for_one() {
use tinycortex_api::health::MemoryHealth;
use crate::openhuman::memory::api::health::MemoryHealth;

let pairs: Vec<(MemoryHealth, DriverHealth)> = vec![
(MemoryHealth::Ready, DriverHealth::Ready),
Expand Down Expand Up @@ -188,7 +188,7 @@ fn driver_capabilities_contains_all_is_subset_semantics() {
/// memory capability is.
#[test]
fn every_memory_contract_capability_string_maps_into_driver_capabilities() {
use tinycortex_api::capabilities::Capability;
use crate::openhuman::memory::api::capabilities::Capability;

let caps: DriverCapabilities = Capability::ALL.iter().map(|cap| cap.as_str()).collect();

Expand Down
2 changes: 1 addition & 1 deletion src/core/subsystem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//!
//! Since M2b the memory adapter exists in
//! [`crate::openhuman::memory::binding`] (it converts
//! `tinycortex_api::MemoryHealth` into [`DriverHealth`] and the contract's
//! `crate::openhuman::memory::api::MemoryHealth` into [`DriverHealth`] and the contract's
//! typed capability set into [`DriverCapabilities`]), and M2c added the
//! read-only [`status`] projection plus the `subsystems` RPC namespace and the
//! `openhuman subsystems` CLI table.
Expand Down
2 changes: 1 addition & 1 deletion src/core/subsystem/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//!
//! ## Capabilities cross the wire as opaque strings, never as a typed set
//!
//! A memory driver's typed set (`tinycortex_api::capabilities::Capabilities`)
//! A memory driver's typed set (`crate::openhuman::memory::api::capabilities::Capabilities`)
//! is a `u16` bitset whose `Deserialize` rejects the **whole** array on a
//! single unrecognised family string. A driver speaking a newer minor contract
//! may legitimately advertise a family this build has never heard of, and
Expand Down
2 changes: 1 addition & 1 deletion src/openhuman/config/schema/load_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ fn env_overlay_memory_sync_interval_parses_and_honours_zero() {
#[test]
fn env_overlay_subsystems_memory_driver_and_hooks_apply() {
let mut cfg = Config::default();
assert_eq!(cfg.subsystems.memory.driver, "tinycortex");
assert_eq!(cfg.subsystems.memory.driver, "tinymemory");
assert!(cfg.subsystems.memory.hooks.auto_recall);
assert!(cfg.subsystems.memory.hooks.auto_capture);
assert_eq!(cfg.subsystems.memory.hooks.max_context_tokens, 2000);
Expand Down
Loading
Loading