-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathCargo.toml
More file actions
140 lines (125 loc) · 5.05 KB
/
Copy pathCargo.toml
File metadata and controls
140 lines (125 loc) · 5.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
[package]
name = "tinycortex"
version = "0.1.1"
edition = "2021"
license = "MIT"
repository = "https://github.com/tinyhumansai/tinycortex"
description = "Rust core for the TinyCortex memory system"
readme = "README.md"
exclude = [
".github/",
".vscode/",
"benchmarks/",
"docs/",
"gitbooks/",
"paper/",
"requirements.txt",
"viewer/",
]
[features]
# Dependency-light, fully synchronous core. No heavyweight native or async
# dependencies are pulled in by default; every heavy capability is opt-in below.
default = []
# Async background worker loops for the job queue (`memory::queue::runtime`).
# Turns `tokio` into a real (optional) dependency rather than a test-only one so
# a host can run the append/seal/flush pipeline as always-on loops instead of
# driving `run_once` by hand.
tokio = ["dep:tokio"]
# Git-backed source snapshots / diffs / checkpoints (`memory::diff`). Gates the
# heavy native `git2`/libgit2 dependency; with the feature off the whole `diff`
# module (and libgit2) compiles out.
git-diff = ["dep:git2"]
# reqwest-based embedding / LLM HTTP providers (`memory::providers`). Pulls in
# the reqwest stack and needs an async runtime, so it implies `tokio`.
providers-http = ["dep:reqwest", "tokio"]
# Live source synchronization (Composio HTTP pipelines and workspace scans).
# Host schedulers, credentials, RPC, and event buses remain outside the crate.
sync = ["dep:reqwest", "dep:tracing", "tokio"]
# Persona distillation surface (`memory::persona`): ingests local coding-agent
# history, instruction files, and git commits into a durable persona memory
# layer (doc 06). Adds NO new dependencies — readers reuse `serde_json`,
# `walkdir`, `rusqlite`, `sha2` from core; the git-history reader additionally
# requires the `git-diff` feature. A live run also wants `providers-http` for
# the OpenRouter reference provider, but the pipeline depends only on the
# `ChatProvider` / `Summariser` / `EmbeddingBackend` traits.
persona = []
[dependencies]
anyhow = "1"
log = "0.4"
futures = "0.3"
async-trait = "0.1"
chrono = { version = "0.4", features = ["serde"] }
parking_lot = "0.12"
rand = "0.10"
regex = "1"
rusqlite = { version = "0.40", features = ["bundled"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
schemars = "1"
sha2 = "0.10"
thiserror = "2"
# Kept in lockstep with OpenHuman's vendored TinyAgents checkout. Initialize it
# after cloning with `git submodule update --init vendor/tinyagents`.
tinyagents = { version = "2", path = "vendor/tinyagents" }
toml = "0.8"
uuid = { version = "1", features = ["serde", "v4"] }
walkdir = "2"
# ── Optional, feature-gated dependencies ────────────────────────────────────
# Native-linking deps are pinned to OpenHuman's versions so the host and the
# crate link one bundled SQLite and one libgit2. Keep in lockstep with the host
# root Cargo.toml when either side bumps.
# git2 links libgit2 (heavy native build) — only for the `git-diff` feature.
git2 = { version = "0.21", default-features = false, features = [
"vendored-libgit2",
], optional = true }
# reqwest pulls a large async HTTP stack — only for live synchronization.
reqwest = { version = "0.12", default-features = false, features = [
"json",
"rustls-tls",
], optional = true }
tracing = { version = "0.1", optional = true }
# tokio powers the optional background worker loops (`tokio` feature). It is
# also listed under dev-dependencies so the async test suite always compiles.
tokio = { version = "1", features = [
"rt",
"rt-multi-thread",
"macros",
"time",
"sync",
], optional = true }
[dev-dependencies]
dotenvy = "0.15"
tempfile = "3"
tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync", "time"] }
wiremock = "0.6"
[[test]]
name = "composio_sync_mock"
required-features = ["sync"]
[[test]]
name = "composio_sync_live"
required-features = ["sync"]
# Persona pipeline end-to-end over fixtures against a wiremock OpenRouter.
[[test]]
name = "persona_e2e"
required-features = ["persona", "providers-http", "git-diff"]
# Runnable persona distillation harness (doc 06).
# `OPENROUTER_API_KEY=... cargo run --example persona_harness --features persona,providers-http,git-diff -- backfill`
[[example]]
name = "persona_harness"
required-features = ["persona", "providers-http", "git-diff"]
# Persona decision agent: algorithmic BM25 retrieval + a tinyagents LLM pass
# over the distilled persona memory layer (doc 06 follow-on).
# `OPENROUTER_API_KEY=... cargo run --example persona_agent --features persona -- "<question>"`
[[example]]
name = "persona_agent"
required-features = ["persona"]
# Runnable connection + memory-sync harness for a live Composio API key.
# `COMPOSIO_API_KEY=... cargo run --example composio_harness --features sync`
[[example]]
name = "composio_harness"
required-features = ["sync"]
# Seed a workspace with sample synced memory for the viewer (no API key needed).
# `TINYCORTEX_WORKSPACE=/tmp/demo cargo run --example seed_memory --features sync`
[[example]]
name = "seed_memory"
required-features = ["sync"]