@cerefox/memory 0.10.2 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENT_GUIDE.md CHANGED
@@ -149,16 +149,18 @@ Find documents by metadata criteria without a text search query.
149
149
 
150
150
  | Parameter | Required | Description |
151
151
  |-----------|----------|-------------|
152
- | `metadata_filter` | Yes | JSON key-value pairs (AND semantics). Example: `{"type": "decision-log"}` |
153
- | `project_name` | No | Restrict to a project. |
152
+ | `metadata_filter` | No† | JSON key-value pairs (AND semantics). Example: `{"type": "decision-log"}` |
153
+ | `project_name` | No† | Restrict to a project. Sufficient on its own to **list that project's documents**. |
154
154
  | `include_content` | No | Include full text (default false). |
155
155
  | `limit` | No | Max results (default 10). |
156
- | `updated_since` | No | ISO-8601 timestamp. Only docs updated on/after. |
157
- | `created_since` | No | ISO-8601 timestamp. Only docs created on/after. |
156
+ | `updated_since` | No† | ISO-8601 timestamp. Only docs updated on/after. |
157
+ | `created_since` | No† | ISO-8601 timestamp. Only docs created on/after. |
158
158
  | `max_bytes` | No | Response size budget when include_content is true. |
159
159
  | `requestor` | No | Your agent name. |
160
160
 
161
- Use for browsing by category, catching up on recent changes (`updated_since`), or finding all documents of a specific type.
161
+ † **At least one** of `metadata_filter`, `project_name`, `updated_since`, or `created_since` must be supplied (so this never becomes an unbounded whole-KB dump). An empty `metadata_filter` plus `project_name` lists that project's documents.
162
+
163
+ Use for browsing by category, catching up on recent changes (`updated_since`), listing all documents in a project (`project_name` alone), or finding all documents of a specific type. Results are ordered newest-updated first.
162
164
 
163
165
  ---
164
166
 
@@ -240,7 +242,7 @@ These two tools have **different contracts**. Picking the wrong one is the most
240
242
  | Top-N ranked hits are enough to answer | You need a complete, exhaustive set (e.g. an inventory or a catch-up) |
241
243
 
242
244
  - **`cerefox_search` is relevance-ranked top-N.** It returns the best `match_count` matches (**default 5** — raise it via `match_count`). It is **not** an enumeration tool: if more docs match than `match_count`, the rest sit silently below the cutoff — and the one you most want (e.g. the *newest*) may be exactly the one dropped.
243
- - **`cerefox_metadata_search` is exhaustive enumeration by criteria.** No text query. Filters by `metadata_filter` (plus `project_name`, `updated_since` / `created_since`). It returns **metadata only by default** (`include_content=false`) — ids + titles + tags, which is cheap — so raise `limit` (**default 10**) freely to get the whole set. Discover available keys with `cerefox_list_metadata_keys`.
245
+ - **`cerefox_metadata_search` is exhaustive enumeration by criteria.** No text query. Filters by `metadata_filter`, `project_name`, `updated_since` / `created_since` — supply **at least one** (an empty `metadata_filter` plus `project_name` lists that project's documents). It returns **metadata only by default** (`include_content=false`) — ids + titles + tags, which is cheap — so raise `limit` (**default 10**) freely to get the whole set. Discover available keys with `cerefox_list_metadata_keys`.
244
246
 
245
247
  ### Examples
246
248
 
@@ -248,6 +250,7 @@ These two tools have **different contracts**. Picking the wrong one is the most
248
250
  - *"List every decision-log doc"* (enumeration) → `cerefox_metadata_search(metadata_filter={"type":"decision-log"}, limit=50, include_content=false)`
249
251
  - *"What changed since I last looked?"* → `cerefox_metadata_search(metadata_filter={"type":"decision-log"}, updated_since="2026-05-01T00:00:00Z")`
250
252
  - *"Just the ids of all active research docs"* → `cerefox_metadata_search(metadata_filter={"type":"research","status":"active"}, limit=100)`
253
+ - *"List everything in the Cerefox project"* → `cerefox_metadata_search(project_name="Cerefox", limit=100)` (no `metadata_filter` needed)
251
254
 
252
255
  ### Pattern: finding the newest item in a growing series
253
256
 
@@ -420,6 +423,7 @@ The legacy Python `uv run cerefox` is a frozen husk as of v0.9 — only `uv run
420
423
  | `cerefox_get_document(document_id, version_id, requestor)` | `cerefox document get <document-id> --version-id <vid> --requestor <name>` |
421
424
  | `cerefox_list_versions(document_id, requestor)` | `cerefox document version list <document-id> --requestor <name>` |
422
425
  | `cerefox_list_projects(requestor)` | `cerefox project list --requestor <name>` |
426
+ | `cerefox_set_document_projects(document_id, project_names, author)` | `cerefox document set-projects <document-id> <name...> --author <a> --author-type user\|agent` (or `--clear` to remove all) |
423
427
  | `cerefox_list_metadata_keys()` | `cerefox metadata keys` |
424
428
  | `cerefox_metadata_search(metadata_filter, project_name, updated_since, created_since, limit, include_content, requestor)` | `cerefox metadata search --metadata-filter '<json>' --project-name <n> --updated-since <iso> --created-since <iso> --limit N --include-content --requestor <name>` |
425
429
  | `cerefox_get_audit_log(document_id, author, operation, since, until, limit, requestor)` | `cerefox audit list --document-id <id> --author <a> --operation <op> --since <iso> --until <iso> --limit N --json --requestor <name>` |
@@ -10,7 +10,7 @@ Cerefox is a persistent, shared knowledge base. You have **10 MCP tools** (9 of
10
10
  | `cerefox_ingest` | Save or update a document | `title`, `content` (required), `document_id` (update by ID), `update_if_exists`, `project_name` (single, non-destructive add on update), `project_names` (list, destructive replace on update), `metadata`, `author` |
11
11
  | `cerefox_get_document` | Get full document by ID | `document_id` (required) |
12
12
  | `cerefox_list_versions` | Version history of a document | `document_id` (required) |
13
- | `cerefox_metadata_search` | Find docs by metadata (no text query) | `metadata_filter` (required), `include_content`, `updated_since` |
13
+ | `cerefox_metadata_search` | Find or list docs by metadata, project, or time (no text query) | `metadata_filter`, `project_name` (list a project's docs), `updated_since`, `include_content` — **at least one** of metadata_filter/project_name/updated_since/created_since |
14
14
  | `cerefox_list_metadata_keys` | Discover available metadata keys | (none required) |
15
15
  | `cerefox_list_projects` | List all projects | (none required) |
16
16
  | `cerefox_set_document_projects` | Set doc's project memberships to exactly the given list (destructive replace; metadata-only, no content change) | `document_id`, `project_names` (required) |
@@ -64,8 +64,8 @@ Same operations, same conventions. Full reference: [`docs/guides/cli.md`](docs/g
64
64
  | `cerefox_list_versions` | `cerefox document version list <id> --requestor "<your-name>"` |
65
65
  | `cerefox_list_projects` | `cerefox project list --requestor "<your-name>"` |
66
66
  | `cerefox_list_metadata_keys` | `cerefox metadata keys` |
67
- | `cerefox_metadata_search` | `cerefox metadata search --metadata-filter '<json>' --requestor "<your-name>"` |
68
- | `cerefox_set_document_projects` | _MCP-only; a CLI command will be added in a future release. Until then, run via MCP if available._ |
67
+ | `cerefox_metadata_search` | `cerefox metadata search --metadata-filter '<json>' --requestor "<your-name>"` (list a project: `cerefox document list --project <name>`) |
68
+ | `cerefox_set_document_projects` | `cerefox document set-projects <id> <name...> --author "<your-name>" --author-type agent` (or `--clear` to remove all) |
69
69
  | `cerefox_get_audit_log` | `cerefox audit list --requestor "<your-name>"` (add `--json` for scripted access) |
70
70
  | `cerefox_get_help` | `cerefox guides show agent-quick-reference` (or `cerefox guides list` for the full bundled-docs index) |
71
71