Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
de9e817
refactor(store): simplify driver initialization
senamakel Oct 7, 2026
fb7772b
chore(tinyagents-harness): add store driver tests
senamakel Oct 7, 2026
0cb2b3b
feat(store): add storage-drivers feature backed by tinystoragedrivers
senamakel Oct 7, 2026
1c27870
chore(tinyagents-harness): drop unused dev-dependency
senamakel Oct 7, 2026
4034c49
refactor(checkpoint): extract driver helpers into dedicated module
senamakel Oct 7, 2026
675aba6
feat(graph): add storage-drivers checkpoint backend
senamakel Oct 7, 2026
4d41ab6
test(checkpoint): add driver tests for checkpoint store
senamakel Oct 7, 2026
b39b239
test(checkpoint): add local sample helper for driver tests
senamakel Oct 7, 2026
d0b26ca
docs: document storage-driver checkpoint and store backends
senamakel Oct 7, 2026
c79c976
chore(vendor): add tinystoragedrivers submodule
senamakel Oct 7, 2026
5857f2f
chore(deps): add tinystoragedrivers-core to the lockfile
senamakel Oct 7, 2026
d8f8511
chore: apply rustfmt formatting across checkpoint and store drivers
senamakel Oct 7, 2026
5b66daa
feat(session): add in-memory session store
senamakel Oct 7, 2026
0fe4ece
chore(session): remove unused drivers module
senamakel Oct 7, 2026
0916af8
fix(session): reject refused driver calls with an error
senamakel Oct 7, 2026
539d5f0
refactor(session): extract refused driver into its own module
senamakel Oct 7, 2026
855e9bc
refactor(session): restructure turn state driver
senamakel Oct 7, 2026
4ae572b
refactor(session): restructure turn state driver
senamakel Oct 7, 2026
481137e
refactor(tinyagents-session): restructure transcript driver port
senamakel Oct 7, 2026
ced07db
feat(session): expose storage-driver session stores behind a feature
senamakel Oct 7, 2026
4a897c6
chore(session): add sqlite dev-dependency for storage driver tests
senamakel Oct 7, 2026
0cddb45
test(session): add tests for session port drivers
senamakel Oct 7, 2026
09dd24f
fix(session): correct refused driver test expectations
senamakel Oct 7, 2026
da3b15c
refactor(session): extract refused driver into its own module
senamakel Oct 7, 2026
a9996d6
test(session): cover transcript driver edge cases
senamakel Oct 7, 2026
232b3c7
test(session): cover turn state transitions
senamakel Oct 7, 2026
464c6c3
chore(deps): add tinystoragedrivers-sqlite to the lockfile
senamakel Oct 7, 2026
bc8d0bd
test(session): use err().unwrap() instead of unwrap_err()
senamakel Oct 7, 2026
21dab5e
test(session): remove redundant unreadable entry assertion
senamakel Oct 7, 2026
81cd693
style(session): reformat driver modules with rustfmt
senamakel Oct 7, 2026
01fc9c0
docs(session): document the driver-backed store port
senamakel Oct 7, 2026
b372ba1
docs(agents): document storage-drivers feature
senamakel Oct 7, 2026
ccb4c1e
feat(tinyagents-graph): add checkpoint driver abstraction
senamakel Oct 7, 2026
0310401
test(checkpoint): cover namespace encoding and scoped read isolation
senamakel Oct 7, 2026
3adbef2
feat(tinyagents-graph): add checkpoint driver abstraction
senamakel Oct 7, 2026
c454bd9
test(checkpoint): cover namespace encoding and scoped read isolation
senamakel Oct 7, 2026
0b0a934
fix(store): disambiguate prefixed stream names with prefix length
senamakel Oct 7, 2026
41549ef
test: reformat assertions and clone shared streams handle
senamakel Oct 7, 2026
871f8cb
Merge branch 'storage-drivers' into storage-drivers-session
senamakel Oct 7, 2026
6b8c806
fix(session): hash oversized transcript doc keys with sha-256
senamakel Oct 7, 2026
ae6713a
refactor(transcript): extract stamped line building for reuse
senamakel Oct 7, 2026
7f10020
refactor(session): move transcript jsonl handling into its own module
senamakel Oct 7, 2026
9720092
feat(session): add transcript driver port
senamakel Oct 7, 2026
befefc8
refactor(session): split driver port tests into focused modules
senamakel Oct 7, 2026
4e19480
test(transcripts): cover turn usage fields and tighten assertions
senamakel Oct 7, 2026
53d97bb
docs(session): document store port isolation and write semantics
senamakel Oct 7, 2026
4b98091
Merge pull request #336 from tinyhumansai/storage-drivers-session
senamakel Oct 8, 2026
52cb3b0
Merge remote-tracking branch 'origin/main' into storage-drivers
senamakel Oct 9, 2026
2a4ebff
chore(vendor): bump tinyinference and tinytools submodules
senamakel Oct 9, 2026
e0a292d
chore(deps): drop sha2 from lockfile
senamakel Oct 9, 2026
648e77a
chore(vendor): restore main's tinytools and tinyinference pins
senamakel Oct 9, 2026
439a246
chore(deps): add sha2 to lockfile
senamakel Oct 9, 2026
593c969
fix(session): correct transcript replay freshness check
senamakel Oct 9, 2026
06c195a
fix(session): repair transcript index on read
senamakel Oct 9, 2026
b65bbc3
fix(session): fail closed when in-flight turn recovery fails
senamakel Oct 9, 2026
424c569
test(session): cover recovery failure and index repair paths
senamakel Oct 9, 2026
6cf3b98
style: reformat long expressions to satisfy line width
senamakel Oct 9, 2026
bc75112
docs(session): clarify journal stream prefix description
senamakel Oct 9, 2026
0186a3f
feat(session): guard transcript generations with claimed reservations
senamakel Oct 9, 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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
[submodule "vendor/tinyliveagents"]
path = vendor/tinyliveagents
url = https://github.com/tinyhumansai/tinyliveagents.git
[submodule "vendor/tinystoragedrivers"]
path = vendor/tinystoragedrivers
url = https://github.com/tinyhumansai/tinystoragedrivers.git
6 changes: 4 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ dedicated `types.rs` file and keep module-local unit tests in a sibling
smallest useful API.

Cargo features are package-local. `tinyagents-harness` exposes `sqlite`,
`tools`, `multimodal`, and `tracing`; `tinyagents-graph` exposes `sqlite` and
`tracing`; registry and session expose `tracing`. Tracing instrumentation is
`tools`, `multimodal`, `storage-drivers`, and `tracing`; `tinyagents-graph`
exposes `sqlite`, `storage-drivers`, and `tracing`; session exposes
`storage-drivers` and `tracing`; registry exposes `tracing`. The
`storage-drivers` features put each store on `tinystoragedrivers` ports. Tracing instrumentation is
compiled out by default.

Integration tests are in `crates/tinyagents-integration-tests/tests/`, covering serialization, graph routing,
Expand Down
26 changes: 26 additions & 0 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ serde_json = "1"
tempfile = "3"
tokio = { version = "1", default-features = false, features = ["macros", "rt-multi-thread"] }
tracing = "0.1"
# Storage ports from the vendored tinystoragedrivers submodule. Hosts that
# vendor tinyagents use this same copy, so there is one set of port types.
tinystoragedrivers-core = { path = "vendor/tinystoragedrivers/crates/tinystoragedrivers-core", version = "0.3.0" }
uuid = { version = "1", features = ["v4"] }

[workspace.lints.rust]
Expand All @@ -52,3 +55,4 @@ strip = "debuginfo"
[patch."https://github.com/tinyhumansai/tinytools"]
tinytools-agent = { path = "vendor/tinytools/crates/tinytools-agent" }
tinytools = { path = "vendor/tinytools/crates/tinytools" }

7 changes: 7 additions & 0 deletions crates/tinyagents-graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@ tinyinference-llm = { path = "../../vendor/tinyinference/crates/tinyinference-ll
tinytools = { path = "../../vendor/tinytools/crates/tinytools", version = "0.5.0" }
tokio = { workspace = true, features = ["sync", "time", "macros", "rt", "rt-multi-thread", "fs"] }
tracing = { workspace = true }
# Storage ports (no database client) for `DriverCheckpointer`.
tinystoragedrivers-core = { workspace = true, optional = true }
# Collision-resistant ids for `DriverCheckpointer` keys too long to store.
sha2 = { version = "0.11", optional = true }

[features]
default = []
sqlite = ["dep:rusqlite"]
# `DriverCheckpointer`: checkpoints, pending writes and leases on any
# tinystoragedrivers backend the host opened.
storage-drivers = ["dep:tinystoragedrivers-core", "dep:sha2"]
# Tracing instrumentation is now always compiled in (via the `tracing` crate
# dependency above). This feature is retained as a no-op so downstream
# feature forwards keep compiling.
Expand Down
22 changes: 22 additions & 0 deletions crates/tinyagents-graph/src/checkpoint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,25 @@ crashes mid-execution.
- `DurabilityMode` trades persistence frequency for write volume — a mode that
only checkpoints on interrupt/failure means a mid-run crash loses all
progress since the last such boundary, not just the current node.

## `DriverCheckpointer` (`storage-drivers` feature)

`DriverCheckpointer` stores checkpoints, pending writes and execution leases in
a [tinystoragedrivers](https://github.com/tinyhumansai/tinystoragedrivers)
`DocumentStore`. Hosts use it to put graph durability on whichever backend they
opened, such as SQLite or MongoDB. The handle is bound to a tenant scope, so
tenants that share a thread id still never see each other's checkpoints.

It uses four collections, all prefixed `graph` by default:

- `<prefix>_checkpoints`: one document per stored checkpoint, keyed by a
per-thread insertion sequence. Duplicate ids resolve to the latest write,
as in the append-only backends.
- `<prefix>_threads`: the per-thread sequence counter, advanced with
compare-and-swap.
- `<prefix>_writes`: merged pending writes per `(thread, namespace, checkpoint)`.
- `<prefix>_leases`: per-thread execution leases, claimed, renewed and
released with compare-and-swap.

It passes the same `testkit::conformance` contracts as the bundled backends:
checkpointer, writes, lineage and concurrency.
Loading
Loading