Skip to content

feat(search): combine temporal filters - #208

Merged
jgpruitt merged 2 commits into
mainfrom
jgpruitt/temporal-contains
Aug 9, 2026
Merged

feat(search): combine temporal filters#208
jgpruitt merged 2 commits into
mainfrom
jgpruitt/temporal-contains

Conversation

@jgpruitt

@jgpruitt jgpruitt commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • combine supplied temporal predicates with AND semantics across the API, CLI, and MCP
  • add an independent SQL contains predicate so it can coexist with overlap filtering
  • document composition and cover protocol, CLI, MCP, server, engine, and migration behavior

Testing

  • ./bun run check
  • ./bun test --timeout 30000 packages/engine/space/db.integration.test.ts packages/server/rpc/memory/memory.integration.test.ts packages/database/space/migrate/migrate.integration.test.ts

Copilot AI lite review requested due to automatic review settings August 9, 2026 19:21
@jgpruitt jgpruitt self-assigned this Aug 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Memory Engine’s temporal search filtering so that multiple temporal predicates can be provided together and are combined with AND semantics end-to-end (protocol → server → engine → SQL), including adding a dedicated contains predicate that can coexist with overlaps.

Changes:

  • Switch temporal filter handling from “mutually exclusive mode” to “combine all populated predicates with AND” across the server RPC layer, CLI, and MCP tool surfaces.
  • Extend the space search SQL function signatures to accept a new _temporal_contains argument and apply it as an independent predicate (m.temporal @> point).
  • Add/adjust integration + projection tests and update user-facing docs to describe conjunctive temporal composition.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/server/rpc/memory/memory.ts Maps all temporal predicates through to engine filters (adds temporalContains).
packages/server/rpc/memory/memory.integration.test.ts Adds RPC-level test asserting conjunctive temporal predicate behavior.
packages/protocol/memory.test.ts Ensures the protocol schema preserves multiple temporal fields simultaneously.
packages/engine/space/types.ts Adds temporalContains to engine filter types.
packages/engine/space/db.ts Threads temporalContains into search_memory / hybrid_search_memory calls.
packages/engine/space/db.integration.test.ts Adds DB integration test verifying conjunctive temporal filtering (incl. contains + overlaps).
packages/database/space/version.ts Bumps space schema version to reflect the search signature change.
packages/database/space/migrate/migrate.integration.test.ts Updates migration test coverage for upgraded search function signatures.
packages/database/space/migrate/idempotent/002_search.sql Adds _temporal_contains arg + predicate and threads it through hybrid search.
packages/cli/mcp/server.ts Updates MCP tool parameter descriptions to reflect conjunctive temporal behavior.
packages/cli/mcp/server.test.ts Verifies MCP forwarding preserves all temporal filter fields.
packages/cli/commands/memory.ts Refactors CLI temporal flag parsing to build a conjunctive temporal object.
packages/cli/commands/memory-projection.test.ts Verifies CLI preserves/forwards every temporal predicate for search + export.
docs/typescript-client.md Updates TS client example to show composing temporal predicates.
docs/search.md Documents that temporal CLI flags can be combined with AND semantics.
docs/mcp/me_memory_search.md Documents multi-field temporal filters as conjunctive for MCP search tool.
docs/mcp/me_memory_export.md Documents multi-field temporal filters as conjunctive for MCP export tool.
docs/concepts.md Explains that temporal modes can be combined; contradictory predicates yield no results.
docs/cli/me-memory.md Documents that temporal CLI flags can be combined with AND semantics.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/server/rpc/memory/memory.ts
Copilot AI review requested due to automatic review settings August 9, 2026 19:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated no new comments.

@jgpruitt
jgpruitt merged commit c46620d into main Aug 9, 2026
7 checks passed
@jgpruitt
jgpruitt deleted the jgpruitt/temporal-contains branch August 9, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants