Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
8c61b30
refactor: consolidate crate sources into tinymemory-integrations
senamakel Oct 4, 2026
2c264d7
chore: remove unused workspace crates and facade crate
senamakel Oct 4, 2026
9a64ed5
Move safety fixtures into tinymemory-integrations
senamakel Oct 4, 2026
12eb888
chore(workspace): centralise package metadata and lint configuration
senamakel Oct 4, 2026
38946d7
chore(tinymemory-tools): add thiserror dependency
senamakel Oct 4, 2026
f3a7437
chore(tinymemory-integrations): add initial crate structure and core …
senamakel Oct 4, 2026
04ab31d
feat(conformance): add conformance test framework and reference imple…
senamakel Oct 4, 2026
7ee459b
chore(tinymemory-api): add initial crate structure
senamakel Oct 4, 2026
feb626e
fix(integrations): correct error type re-export path
senamakel Oct 4, 2026
74e0fdf
chore(deps): rename feature flags for documents and sources
senamakel Oct 4, 2026
ee83158
fix(safety): remove unused PII module
senamakel Oct 4, 2026
074dc6b
refactor: convert if-let chains to let-chains across multiple modules
senamakel Oct 4, 2026
0b3732c
fix(pii): simplify digit extraction in checks
senamakel Oct 4, 2026
33449d2
feat(tinymemory-integrations): re-export BearerSource and StaticBearer
senamakel Oct 4, 2026
8fcc2b5
chore: reorder imports and reformat long expressions across the codebase
senamakel Oct 4, 2026
268a4cc
chore(tinymemory-integrations): add example and test targets with fea…
senamakel Oct 4, 2026
8a486a4
fix(tests): gate office live test on both required features
senamakel Oct 4, 2026
1a1085e
fix(conformance): use intra-doc link for MemoryEngine
senamakel Oct 4, 2026
299c8ed
ci(workflows): split monolithic crate into per-package CI and workspa…
senamakel Oct 4, 2026
096bd95
feat(composio): add email cleaning and markdown conversion support
senamakel Oct 4, 2026
d0d9958
fix(integrations): handle missing GitHub token in reader
senamakel Oct 4, 2026
0ca2b94
feat(sources): add composio integration source
senamakel Oct 4, 2026
1905bde
docs(AGENTS.md): update crate descriptions and workspace conventions
senamakel Oct 4, 2026
5062e88
chore(AGENTS.md): update unsafe lint configuration description
senamakel Oct 4, 2026
6df9e40
chore(composio): remove unused helper functions from ClickUp, Linear,…
senamakel Oct 4, 2026
3259b4b
chore(composio): remove unused helper functions
senamakel Oct 4, 2026
05b0274
fix(composio): update test files to use correct assertion macros
senamakel Oct 4, 2026
f6e9eb3
fix(tinymemory-tools): correct spec module import path
senamakel Oct 4, 2026
123d261
fix(composio): handle missing fields in clickup and linear source par…
senamakel Oct 4, 2026
f8731ec
refactor(namespace): reduce public API surface and inline segment kin…
senamakel Oct 4, 2026
8b524fd
fix(composio): handle missing GitHub and Notion source fields gracefully
senamakel Oct 4, 2026
eb1ba6d
refactor(safety): reorganize safety module into submodules
senamakel Oct 4, 2026
6921ed1
refactor(explore): remove public API surface that is no longer needed
senamakel Oct 4, 2026
ff72223
fix(composio): handle empty email body in gmail post processing
senamakel Oct 4, 2026
23dde4e
fix(safety): correct default policy test module path
senamakel Oct 4, 2026
d4c7177
fix(schema): handle missing optional fields during deserialization
senamakel Oct 4, 2026
33eba30
test: add safety and PII module tests for tinymemory-integrations
senamakel Oct 4, 2026
9f5e746
feat(composio): add composio integration sources
senamakel Oct 4, 2026
ddc285f
fix(tinymemory-tools): handle missing args module gracefully
senamakel Oct 4, 2026
1c4acc2
fix(safety): handle missing composio github source in policy
senamakel Oct 4, 2026
6b32d77
fix(safety): prevent panic on empty composio source input
senamakel Oct 4, 2026
bf78b78
test(store): add test for single store listing and settling like a ba…
senamakel Oct 4, 2026
a657812
fix(filter): handle empty filter argument gracefully
senamakel Oct 4, 2026
ec01a32
fix(filter): handle empty filter argument gracefully
senamakel Oct 4, 2026
5261a47
fix(store): handle missing log entry in cortex engine store
senamakel Oct 4, 2026
2ddb84e
fix(safety): remove unused sanitize module
senamakel Oct 4, 2026
3a090f3
fix(render): handle empty input in render function
senamakel Oct 4, 2026
d0b2093
refactor(safety): split monolithic safety module into focused submodules
senamakel Oct 4, 2026
a85c835
fix(engine): reformat store method and test assertions
senamakel Oct 4, 2026
34ee2b1
refactor(safety): reorganise PII module internals
senamakel Oct 4, 2026
518569b
test(sanitize): remove stray blank line in default policy tests
senamakel Oct 4, 2026
dd785bd
fix(integrations): correct type mapping for nullable fields in source…
senamakel Oct 4, 2026
216c6b8
fix(tinymemory-tools): handle empty input in read tool
senamakel Oct 4, 2026
10abcde
test(safety): add missing imports for test modules
senamakel Oct 4, 2026
d73651f
fix(tinymemory-tools): handle empty input in read tool
senamakel Oct 4, 2026
624d0db
fix(safety): relax visibility of checks module and remove unused import
senamakel Oct 4, 2026
7be45ee
chore: files changed crates/tinymemory-integrations/src/sources/reade…
senamakel Oct 4, 2026
f8e40ad
chore(tinymemory-integrations): remove unused source registry and val…
senamakel Oct 4, 2026
4902b89
fix(tinymemory-tools): handle zero-length writes without error
senamakel Oct 4, 2026
34ab969
chore(safety): remove redundant doc comments on module declarations
senamakel Oct 4, 2026
2b8b908
feat(tools): add write tool with argument parsing
senamakel Oct 4, 2026
1037d41
docs(cortex): add module-level documentation and reorganise engine st…
senamakel Oct 4, 2026
4e798d1
fix(tinymemory-tools): remove unused import in tools module
senamakel Oct 4, 2026
0495729
fix(sources/error): remove unused Registry variant
senamakel Oct 4, 2026
84a78ab
chore(cortex-engine): remove unused Duration import
senamakel Oct 4, 2026
b7c1d78
chore(tinymemory-tools): add test modules for tools and args
senamakel Oct 4, 2026
e993ae0
docs(safety): add README for tinymemory-integrations safety module
senamakel Oct 4, 2026
ded711c
chore(args): remove unused `tool` method from `Args`
senamakel Oct 4, 2026
859504e
fix(safety): remove unused import of `std::sync::Arc`
senamakel Oct 4, 2026
5243acb
fix(ssrf): add missing SSRF protection to reader and fetch sources
senamakel Oct 4, 2026
e89284a
fix(registry): handle missing key in lookup to avoid panic
senamakel Oct 4, 2026
cb898a1
docs(registry, ssrf): update documentation references and SSRF block …
senamakel Oct 4, 2026
4f396fa
fix(ssrf): add SSRF protection to fetch source
senamakel Oct 4, 2026
5eeff7a
feat(sources): add web page reader module
senamakel Oct 4, 2026
321e3c5
fix(test): move test files to match module structure
senamakel Oct 4, 2026
6a08a1a
fix(ssrf): add test for SSRF protection in fetch sources
senamakel Oct 4, 2026
62d510c
chore(tinymemory-tools): add integration tests for tools and fix form…
senamakel Oct 4, 2026
807c8f8
test(legacy-import): add migration tests for resumable batch import
senamakel Oct 4, 2026
a842c32
refactor(html): consolidate entity decoding and remove duplicate titl…
senamakel Oct 4, 2026
2640532
fix(import): handle legacy import errors gracefully
senamakel Oct 4, 2026
35a25cd
test(tinymemory-tools): add tool contract fixtures and roundtrip tests
senamakel Oct 4, 2026
f0560dd
fix(import): box checkpoint in Engine error variant
senamakel Oct 4, 2026
cac13c7
refactor(sources): convert flat source files into module directories
senamakel Oct 4, 2026
a2f0e4a
refactor(integrations): reorganize reader modules into subdirectories
senamakel Oct 4, 2026
2d8b5dd
feat(args): reject host-fixed keys at any depth in tool arguments
senamakel Oct 4, 2026
924f4a0
docs(import): add README for tinymemory-integrations import module
senamakel Oct 4, 2026
08143a5
fix(test): simplify test assertions by removing intermediate variables
senamakel Oct 4, 2026
6418ed3
feat(sources): add items module for source integration
senamakel Oct 4, 2026
a808666
docs(tinymemory-integrations): add README for sources module
senamakel Oct 4, 2026
37642b5
docs(tinymemory-tools): add README with usage and examples
senamakel Oct 4, 2026
5692cf0
feat(sources): add composio reader module
senamakel Oct 4, 2026
2319d13
chore(tests): suppress clippy::unwrap_used on test helpers
senamakel Oct 4, 2026
f6c2431
docs(architecture): add overview document and update readme
senamakel Oct 4, 2026
8208feb
feat(documents): add document conversion and error handling modules
senamakel Oct 4, 2026
607f1d9
docs(tinymemory-integrations): add README for documents module
senamakel Oct 4, 2026
8fbe2e7
docs(tinymemory-integrations): add README for documents module
senamakel Oct 4, 2026
0aa9ed9
docs(architecture): add API documentation
senamakel Oct 4, 2026
5d964f0
docs(architecture): update cortex-wire diagram to reflect current sys…
senamakel Oct 4, 2026
e636bf7
docs(architecture): add API items documentation
senamakel Oct 4, 2026
61c2d29
docs(architecture): add Cortex Wire architecture document
senamakel Oct 4, 2026
e0c541a
docs(architecture): add operations documentation
senamakel Oct 4, 2026
5db8ee0
feat(integrations): add source error handling and improve import module
senamakel Oct 4, 2026
5ef0b55
docs(architecture): add documentation for cortex flows
senamakel Oct 4, 2026
c4f5c02
docs(architecture): add API and operations documentation
senamakel Oct 4, 2026
f590a5a
fix(integrations): correct Gmail post-processing to handle missing at…
senamakel Oct 4, 2026
c12e2e6
docs(architecture): add cortex-flows documentation
senamakel Oct 4, 2026
7b23b40
fix(ssrf): handle redirects to private IPs in GitHub source
senamakel Oct 4, 2026
bd80b4a
fix(ssrf): handle empty host in URL validation
senamakel Oct 4, 2026
bda286c
docs(architecture): add namespace documentation
senamakel Oct 4, 2026
8273ab2
fix(docs): correct stale doc comments referencing crate scope
senamakel Oct 4, 2026
67b74df
fix(context): handle empty context in memory tools
senamakel Oct 4, 2026
93cdc71
docs(architecture): clarify cortex component responsibilities
senamakel Oct 4, 2026
c830927
docs(specs): add memory-v2 specification and update tools readme
senamakel Oct 4, 2026
aaee6aa
docs(import, sources): add README files for integration modules
senamakel Oct 4, 2026
1f42ff4
docs(safety): add note that scrubbing must be called explicitly
senamakel Oct 4, 2026
5b8ed76
docs: add architecture directory to documentation index
senamakel Oct 4, 2026
0b6639a
docs(tinymemory-integrations): add README for integration examples
senamakel Oct 4, 2026
80a4d79
docs(architecture): add references to wire format and request flow docs
senamakel Oct 4, 2026
cfc058a
docs(tinymemory-integrations): add README for integration examples
senamakel Oct 4, 2026
e721bf7
docs(architecture): add testing documentation
senamakel Oct 4, 2026
535dd7b
docs(readme): rewrite to reflect the three-crate workspace and agent …
senamakel Oct 4, 2026
53d875a
docs(readme): clarify migrate function behaviour in v1 migration section
senamakel Oct 4, 2026
8aff308
docs(cortex): add README for tinymemory-integrations cortex module
senamakel Oct 4, 2026
aa9930c
fix(cortex): handle missing config fields gracefully
senamakel Oct 4, 2026
8dccbf8
fix(cortex): clarify doc and type alias for error module
senamakel Oct 4, 2026
e2a6bc6
docs(integration/cortexdb): update README paths after crate rename
senamakel Oct 4, 2026
05f6eaa
docs(architecture): add tools documentation
senamakel Oct 4, 2026
8fb7f35
docs(architecture): clarify facet-count response fields
senamakel Oct 4, 2026
c4fb2fd
feat(tinymemory-integrations): add office_live test and move live tes…
senamakel Oct 4, 2026
a0c6689
docs(architecture): add integration documentation
senamakel Oct 4, 2026
6355dc5
docs(architecture): fix escaped pipe characters in XLSX table row
senamakel Oct 4, 2026
db1a31c
fix(conversation): handle empty conversation gracefully
senamakel Oct 4, 2026
8f4ca9b
docs(architecture): add documentation for integration sources
senamakel Oct 4, 2026
dbcbdca
Drop stale facade and engine references in docs and tests
senamakel Oct 4, 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
33 changes: 24 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ jobs:
run: cargo test

# `cargo build --all-targets` only compiles an example; AGENTS.md
# promises `cargo run -p tinymemory --example basic` works.
# promises `cargo run -p tinymemory-integrations --example basic` works.
- name: Run the bundled example
run: cargo run -p tinymemory --example basic
run: cargo run -p tinymemory-integrations --example basic

# The contract is what engines and hosts compile against. It must stay
# free of storage engines, native libraries, HTTP clients and async
Expand Down Expand Up @@ -129,24 +129,39 @@ jobs:
fail-fast: false
matrix:
include:
- name: no default features
- name: integrations, no default features
package: tinymemory-integrations
features: --no-default-features
- name: cortex
package: tinymemory-integrations
features: --no-default-features --features cortex
- name: documents
package: tinymemory-integrations
features: --no-default-features --features documents
- name: documents-office
package: tinymemory-integrations
features: --no-default-features --features documents-office
- name: sources network implication
package: tinymemory-integrations
features: --no-default-features --features sources-network
- name: safety
package: tinymemory-integrations
features: --no-default-features --features safety
- name: context
features: --no-default-features --features context
- name: legacy import
package: tinymemory-integrations
features: --no-default-features --features legacy-import
- name: conformance
features: --no-default-features --features conformance
- name: full aggregate
package: tinymemory-integrations
features: --no-default-features --features full
- name: api, no features
package: tinymemory-api
features: --no-default-features
- name: api conformance
package: tinymemory-api
features: --features conformance
- name: tools
package: tinymemory-tools
features: ""
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
Expand All @@ -157,7 +172,7 @@ jobs:
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2

- name: Test
run: cargo test -p tinymemory ${{ matrix.features }}
run: cargo test -p ${{ matrix.package }} ${{ matrix.features }}

docs:
name: Docs
Expand Down Expand Up @@ -189,7 +204,7 @@ jobs:
run: |
set -euo pipefail
msrv="$(cargo metadata --format-version 1 --no-deps \
| jq -r '.packages[] | select(.name == "tinymemory") | .rust_version')"
| jq -r '.packages[] | select(.name == "tinymemory-api") | .rust_version')"
if [[ -z "$msrv" || "$msrv" == "null" ]]; then
echo "package.rust-version is not set in Cargo.toml" >&2
exit 1
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ jobs:
run: |
set -euo pipefail

# The root manifest is a virtual workspace, so name the facade
# rather than taking whichever package cargo lists first.
# Every crate inherits `version` from `[workspace.package]`, so any
# one of them names the current version; read the contract crate's.
metadata="$(cargo metadata --format-version 1 --no-deps)"
crate_name="tinymemory"
crate_name="tinymemory-api"
current_version="$(
jq -r --arg name "$crate_name" \
'.packages[] | select(.name == $name) | .version' <<< "$metadata"
Expand Down Expand Up @@ -96,9 +96,10 @@ jobs:
echo "tag=${tag}"
} >> "$GITHUB_OUTPUT"

# Bumps the facade's `[package]` version only. That is sufficient because
# no intra-workspace path dependency carries a `version = "…"`
# requirement; the guard below keeps it that way.
# Bumps `[workspace.package] version` in the root manifest, which every
# crate inherits. That is sufficient because no intra-workspace path
# dependency carries a `version = "…"` requirement; the guard below
# keeps it that way.
- name: Update crate version
env:
CRATE_NAME: ${{ steps.version.outputs.crate_name }}
Expand All @@ -117,9 +118,15 @@ jobs:
exit 1
fi

perl -0pi -e 's/(\[package\][\s\S]*?\nversion = ")[^"]+(")/$1$ENV{NEXT_VERSION}$2/' \
crates/tinymemory/Cargo.toml
cargo update -p "$CRATE_NAME" --precise "$NEXT_VERSION"
perl -0pi -e 's/(\[workspace\.package\][\s\S]*?\nversion = ")[^"]+(")/$1$ENV{NEXT_VERSION}$2/' \
Cargo.toml
cargo update --workspace
current="$(cargo metadata --format-version 1 --no-deps \
| jq -r --arg name "$CRATE_NAME" '.packages[] | select(.name == $name) | .version')"
if [[ "$current" != "$NEXT_VERSION" ]]; then
echo "Version bump did not take: $CRATE_NAME is $current, expected $NEXT_VERSION" >&2
exit 1
fi

- name: Commit version bump and tag
env:
Expand All @@ -128,7 +135,7 @@ jobs:
set -euo pipefail
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add crates/tinymemory/Cargo.toml Cargo.lock
git add Cargo.toml Cargo.lock
git commit -m "Release ${RELEASE_TAG}"
git tag -a "${RELEASE_TAG}" -m "Release ${RELEASE_TAG}"

Expand Down
43 changes: 27 additions & 16 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,27 @@ no longer applies rather than leaving it to rot.

This is a Cargo **workspace** with a virtual root: there is no root package,
and every crate lives in its own directory under `crates/`, named for the
package it holds. `members` is the glob `crates/*`, so a new crate joins the
workspace by existing. `crates/tinymemory` is the facade a host depends on;
`crates/tinymemory-api` is the contract; `crates/tinymemory-cortex` is the
CortexDB engine; the rest are subsystems, each reachable from the facade by a
feature named after it. The accepted behaviour is
[`docs/specs/memory-v2.md`](docs/specs/memory-v2.md).
package it holds. There are exactly three, one per part of the memory layer:

- `crates/tinymemory-api` — the **core contract**: `MemoryEngine`, items,
metadata, namespaces, errors, and (feature `conformance`) the suite every
engine must pass. No I/O.
- `crates/tinymemory-tools` — the **agent tool spec**: `MemoryTools` over any
engine, and the `context.md` compiler.
- `crates/tinymemory-integrations` — the **integrations**: the CortexDB engine
and its registry, documents, sources, safety and the legacy v1 import, each
a module behind a feature.

Shared package metadata, the version and the lint table live in the root
`Cargo.toml` (`[workspace.package]`, `[workspace.lints]`). The accepted
behaviour is [`docs/specs/memory-v2.md`](docs/specs/memory-v2.md); how it is
built is in [`docs/architecture/`](docs/architecture/README.md).

See [`README.md`](README.md) for the full layout and the feature table.

```text
crates/<package>/
├── Cargo.toml # one package; `[lints]` opted into per crate
├── Cargo.toml # one package; `[lints] workspace = true`
├── README.md # required of complex crates: design, surface, caveats
└── src/
├── lib.rs # crate docs + the entire public re-export surface
Expand All @@ -39,10 +48,11 @@ docs/
└── adr/ # immutable architecture decision records
```

A new crate goes in `crates/<package>/`, and a package that is not an engine
or a subsystem of the memory layer probably does not belong here at all. Reach
it from the facade by adding an optional dependency and a feature of the same
name, so a host keeps taking one dependency and stating what it wants.
Do not add a fourth crate. New contract surface goes in `tinymemory-api`, a new
agent-facing tool in `tinymemory-tools`, and anything that talks to the outside
world (a new engine, reader or converter) becomes a module of
`tinymemory-integrations` behind a feature named after it, with its
dependencies optional and enabled only by that feature.

Each feature area belongs in a focused module directory under the crate's
`src/`. A module root explains the module, wires its pieces together, and
Expand Down Expand Up @@ -83,7 +93,7 @@ Supporting commands:

- `cargo fmt --all` — format before committing.
- `cargo test <filter>` — run a focused subset while iterating.
- `cargo run -p tinymemory --example basic` — run the bundled example. The
- `cargo run -p tinymemory-integrations --example basic` — run the bundled example. The
`-p` is required: the workspace root is virtual, so cargo cannot infer which
package an example belongs to.
- `cargo doc --no-deps --all-features` — build the rustdoc CI also builds with
Expand All @@ -107,8 +117,8 @@ Use standard `rustfmt` output and Rust 2024 idioms. Do not hand-format around
`impl Into<String>` at boundaries; return owned, concrete types.
- Keep the public surface minimal: default to private, and export deliberately
from the crate's `src/lib.rs`.
- `unsafe` is forbidden crate-wide by the `[lints]` table in each crate's own
`Cargo.toml` — the root is virtual and carries no lint configuration. If a
- `unsafe` is forbidden in every crate by `[workspace.lints]` in the root
`Cargo.toml`, which each crate inherits with `[lints] workspace = true`. If a
crate genuinely needs it, relax the lint in its own commit and document every
invariant with a `// SAFETY:` comment.

Expand Down Expand Up @@ -222,7 +232,8 @@ explicitly declined with a reason.
Releases run from `.github/workflows/release.yml` via a manual
`workflow_dispatch` with a `patch` / `minor` / `major` bump. The workflow
re-runs formatting, clippy, tests, and rustdoc, computes the next version,
updates `crates/tinymemory/Cargo.toml` and `Cargo.lock`, commits and tags
updates `[workspace.package] version` in the root `Cargo.toml` and
`Cargo.lock`, commits and tags
`vX.Y.Z`, pushes both, and creates a GitHub release for the tag. There are no
binary artifacts.

Expand All @@ -231,7 +242,7 @@ take this repository by git or path, pinned to a tag.

Consequently:

- Do not hand-edit the `version` field in `crates/tinymemory/Cargo.toml`; the
- Do not hand-edit `[workspace.package] version` in the root `Cargo.toml`; the
release workflow owns it.
- Follow semantic versioning. Any change to the public surface that is not
purely additive is a breaking change and needs a major bump.
Expand Down
126 changes: 18 additions & 108 deletions Cargo.lock

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

Loading
Loading