@cerefox/memory 1.13.1 → 1.13.2
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 +14 -14
- package/AGENT_QUICK_REFERENCE.md +10 -10
- package/dist/bin/cerefox.js +34 -23
- package/dist/server-assets/_shared/ef-meta/index.ts +3 -3
- package/dist/server-assets/_shared/mcp-tools/get-help-content.ts +2 -2
- package/dist/server-assets/supabase/functions/cerefox-get-audit-log/index.ts +7 -5
- package/dist/server-assets/supabase/functions/cerefox-get-document/index.ts +5 -4
- package/dist/server-assets/supabase/functions/cerefox-ingest/index.ts +7 -3
- package/dist/server-assets/supabase/functions/cerefox-list-projects/index.ts +6 -5
- package/dist/server-assets/supabase/functions/cerefox-list-versions/index.ts +5 -4
- package/dist/server-assets/supabase/functions/cerefox-metadata/index.ts +5 -4
- package/dist/server-assets/supabase/functions/cerefox-metadata-search/index.ts +5 -4
- package/dist/server-assets/supabase/functions/cerefox-search/index.ts +7 -4
- package/docs/guides/cli.md +17 -17
- package/docs/guides/configuration.md +5 -2
- package/docs/guides/connect-agents.md +42 -26
- package/package.json +1 -1
|
@@ -638,7 +638,7 @@ In the action editor, paste this schema (replace `<your-project-ref>`):
|
|
|
638
638
|
openapi: 3.1.0
|
|
639
639
|
info:
|
|
640
640
|
title: Cerefox Knowledge Base
|
|
641
|
-
version:
|
|
641
|
+
version: 4.0.0
|
|
642
642
|
servers:
|
|
643
643
|
- url: https://<your-project-ref>.supabase.co/functions/v1
|
|
644
644
|
paths:
|
|
@@ -698,11 +698,12 @@ paths:
|
|
|
698
698
|
Whole results are dropped (never truncated mid-document) until
|
|
699
699
|
the budget is met; the response sets `truncated: true` when this
|
|
700
700
|
happens. Advanced; leave unset for the default.
|
|
701
|
-
|
|
701
|
+
author:
|
|
702
702
|
type: string
|
|
703
703
|
description: >
|
|
704
|
-
|
|
705
|
-
|
|
704
|
+
Your name (agent or user), e.g. "ChatGPT". Recorded in the
|
|
705
|
+
usage log for attribution. Optional. `requestor` is still
|
|
706
|
+
accepted as an alias.
|
|
706
707
|
responses:
|
|
707
708
|
'200':
|
|
708
709
|
description: >
|
|
@@ -847,9 +848,11 @@ paths:
|
|
|
847
848
|
schema:
|
|
848
849
|
type: object
|
|
849
850
|
properties:
|
|
850
|
-
|
|
851
|
+
author:
|
|
851
852
|
type: string
|
|
852
|
-
description:
|
|
853
|
+
description: >
|
|
854
|
+
Your name (agent or user). Recorded in the usage log.
|
|
855
|
+
Optional. `requestor` is still accepted as an alias.
|
|
853
856
|
responses:
|
|
854
857
|
'200':
|
|
855
858
|
description: Array of metadata keys with doc_count and example_values
|
|
@@ -875,9 +878,11 @@ paths:
|
|
|
875
878
|
description: >
|
|
876
879
|
UUID of a specific archived version to retrieve. Omit (or pass null)
|
|
877
880
|
for the current version. Version UUIDs are returned by listVersions.
|
|
878
|
-
|
|
881
|
+
author:
|
|
879
882
|
type: string
|
|
880
|
-
description:
|
|
883
|
+
description: >
|
|
884
|
+
Your name (agent or user). Recorded in the usage log.
|
|
885
|
+
Optional. `requestor` is still accepted as an alias.
|
|
881
886
|
responses:
|
|
882
887
|
'200':
|
|
883
888
|
description: >
|
|
@@ -905,9 +910,11 @@ paths:
|
|
|
905
910
|
document_id:
|
|
906
911
|
type: string
|
|
907
912
|
description: UUID of the document whose version history to list
|
|
908
|
-
|
|
913
|
+
author:
|
|
909
914
|
type: string
|
|
910
|
-
description:
|
|
915
|
+
description: >
|
|
916
|
+
Your name (agent or user). Recorded in the usage log.
|
|
917
|
+
Optional. `requestor` is still accepted as an alias.
|
|
911
918
|
responses:
|
|
912
919
|
'200':
|
|
913
920
|
description: >
|
|
@@ -929,9 +936,12 @@ paths:
|
|
|
929
936
|
document_id:
|
|
930
937
|
type: string
|
|
931
938
|
description: Filter by document UUID (optional)
|
|
932
|
-
|
|
939
|
+
by_author:
|
|
933
940
|
type: string
|
|
934
|
-
description:
|
|
941
|
+
description: >
|
|
942
|
+
Filter: only entries written by this author name (optional).
|
|
943
|
+
Was `author` before v1.13.2; `author` is now the caller's
|
|
944
|
+
identity here, as on every other operation.
|
|
935
945
|
operation:
|
|
936
946
|
type: string
|
|
937
947
|
description: >
|
|
@@ -949,9 +959,11 @@ paths:
|
|
|
949
959
|
type: integer
|
|
950
960
|
default: 50
|
|
951
961
|
description: Max entries to return (max 200)
|
|
952
|
-
|
|
962
|
+
author:
|
|
953
963
|
type: string
|
|
954
|
-
description:
|
|
964
|
+
description: >
|
|
965
|
+
Your name (agent or user). Recorded in the usage log.
|
|
966
|
+
Optional. `requestor` is still accepted as an alias.
|
|
955
967
|
responses:
|
|
956
968
|
'200':
|
|
957
969
|
description: >
|
|
@@ -969,9 +981,11 @@ paths:
|
|
|
969
981
|
schema:
|
|
970
982
|
type: object
|
|
971
983
|
properties:
|
|
972
|
-
|
|
984
|
+
author:
|
|
973
985
|
type: string
|
|
974
|
-
description:
|
|
986
|
+
description: >
|
|
987
|
+
Your name (agent or user). Recorded in the usage log.
|
|
988
|
+
Optional. `requestor` is still accepted as an alias.
|
|
975
989
|
responses:
|
|
976
990
|
'200':
|
|
977
991
|
description: >
|
|
@@ -1028,9 +1042,11 @@ paths:
|
|
|
1028
1042
|
description: >
|
|
1029
1043
|
Response size budget in bytes when include_content is true
|
|
1030
1044
|
(whole results dropped to fit). Advanced; leave unset for the default.
|
|
1031
|
-
|
|
1045
|
+
author:
|
|
1032
1046
|
type: string
|
|
1033
|
-
description:
|
|
1047
|
+
description: >
|
|
1048
|
+
Your name (agent or user). Recorded in the usage log.
|
|
1049
|
+
Optional. `requestor` is still accepted as an alias.
|
|
1034
1050
|
responses:
|
|
1035
1051
|
'200':
|
|
1036
1052
|
description: >
|
|
@@ -1258,7 +1274,7 @@ You have access to a personal Cerefox knowledge base via a local CLI.
|
|
|
1258
1274
|
Identify yourself on every call:
|
|
1259
1275
|
- Writes (document ingest, document ingest-dir): pass --author "<your-name>" --author-type agent
|
|
1260
1276
|
- Reads (search, document get, document version list, project list,
|
|
1261
|
-
metadata search, audit list): pass --
|
|
1277
|
+
metadata search, audit list): pass --author "<your-name>" (the same flag as on writes)
|
|
1262
1278
|
|
|
1263
1279
|
When answering questions, search Cerefox first. When the user asks you to
|
|
1264
1280
|
remember something, ingest it. Cite document titles for every claim drawn
|
|
@@ -1271,17 +1287,17 @@ The agent docs are written around MCP tool names. **CLI flag names match MCP par
|
|
|
1271
1287
|
|
|
1272
1288
|
| MCP tool | CLI command |
|
|
1273
1289
|
|---|---|
|
|
1274
|
-
| `cerefox_search` | `cerefox search "<query>" --match-count N --project-name <n> --metadata-filter '<json>' --
|
|
1290
|
+
| `cerefox_search` | `cerefox search "<query>" --match-count N --project-name <n> --metadata-filter '<json>' --author <name>` (CLI-only: `--mode`, `--alpha`, `--min-score`, `--only-metadata`) |
|
|
1275
1291
|
| `cerefox_ingest` (file) | `cerefox document ingest <path> --title <t> --project-name <n> --metadata '<json>' --update-if-exists\|--document-id <uuid> --source <s> --author <a> --author-type user\|agent` |
|
|
1276
1292
|
| `cerefox_ingest` (paste) | `printf '...' \| cerefox document ingest --paste --title "<title>"` (same flags) |
|
|
1277
|
-
| `cerefox_get_document` | `cerefox document get <document-id> --version-id <vid> --
|
|
1278
|
-
| `cerefox_list_versions` | `cerefox document version list <document-id> --
|
|
1279
|
-
| `cerefox_list_projects` | `cerefox project list --
|
|
1293
|
+
| `cerefox_get_document` | `cerefox document get <document-id> --version-id <vid> --author <name>` |
|
|
1294
|
+
| `cerefox_list_versions` | `cerefox document version list <document-id> --author <name>` |
|
|
1295
|
+
| `cerefox_list_projects` | `cerefox project list --author <name>` |
|
|
1280
1296
|
| `cerefox_set_document_metadata` | `cerefox document set-metadata <document-id> --set key=value` (also `--remove key`, `--json '{...}'`, `--replace`) |
|
|
1281
1297
|
| `cerefox_set_document_projects` | `cerefox document set-projects <document-id> <name...> --author <a> --author-type user\|agent` (or `--clear`) |
|
|
1282
1298
|
| `cerefox_list_metadata_keys` | `cerefox metadata keys` |
|
|
1283
|
-
| `cerefox_metadata_search` | `cerefox metadata search --metadata-filter '<json>' --project-name <n> --
|
|
1284
|
-
| `cerefox_get_audit_log` | `cerefox audit list --document-id <id> --author <a> --operation <op> --since <iso> --until <iso> --limit N --json --
|
|
1299
|
+
| `cerefox_metadata_search` | `cerefox metadata search --metadata-filter '<json>' --project-name <n> --author <name>` |
|
|
1300
|
+
| `cerefox_get_audit_log` | `cerefox audit list --document-id <id> --by-author <a> --operation <op> --since <iso> --until <iso> --limit N --json --author <name>` |
|
|
1285
1301
|
|
|
1286
1302
|
> CLI verbs with no MCP equivalent: `cerefox document edit`, `cerefox project create` / `cerefox project edit`, `cerefox config list`.
|
|
1287
1303
|
|
|
@@ -1301,7 +1317,7 @@ After pointing your agent at the repo, ask it:
|
|
|
1301
1317
|
### Caveats
|
|
1302
1318
|
|
|
1303
1319
|
- **Privilege level**: the CLI uses the **service-role key** (`CEREFOX_SUPABASE_KEY`), which bypasses Row Level Security. An agent with Bash access has the same full read/write power you do. Only enable Path C for agents you trust to act on your behalf — the same trust level you'd grant Cursor/Claude Code for editing your source code.
|
|
1304
|
-
- **Audit attribution**: Path C records `access_path = "cli"` in usage logs, distinct from `"local-mcp"` / `"remote-mcp"`. **Agents must set `--author <name> --author-type agent` on writes and `--
|
|
1320
|
+
- **Audit attribution**: Path C records `access_path = "cli"` in usage logs, distinct from `"local-mcp"` / `"remote-mcp"`. **Agents must set `--author <name> --author-type agent` on writes and `--author <name>` on reads** (or rely on `CEREFOX_AUTHOR_NAME` / `CEREFOX_AUTHOR_TYPE` / `CEREFOX_REQUESTOR_NAME` env vars). Without these flags, writes attribute to `"unknown"` / `"user"`, which under-reports agent activity. See the 2026-05-18 Decision Log Q2 entry for the design rationale (`author_type` is caller-declared on ambiguous channels — CLI and Edge Functions — but `access_path` is always derived from the code layer).
|
|
1305
1321
|
- **Soft-delete and restore are reachable; permanent purge is not** — by design. `cerefox document delete` / `cerefox document restore` on the CLI, `cerefox_delete_document` / `cerefox_restore_document` over MCP (v1.7.0, #208/#210): both audited with author attribution. **Permanent purge** (irreversible) stays web-UI-only with human-in-the-loop confirmation. If an agent deletes or restores content, it should surface that to the user explicitly so they can follow it in the audit trail. See [`access-paths.md` → Destructive operations and the trust model](access-paths.md#destructive-operations-and-the-trust-model) for the full rationale and contributor guidance.
|
|
1306
1322
|
- **Cross-doc links in content you ingest** become clickable when the user views them in the Cerefox web UI. **Always author them as `[Text](uuid)`** — the server validates these on every write (v1.7.0) and rejects links to nonexistent ids, which catches mangled UUIDs at write time. `[Text](docs/path.md)` exists for repo-ingested files; do not write title-based links (fragile, and `AGENT_GUIDE.md` says never in agent-authored content). See [`AGENT_GUIDE.md` → "Writing linkable content"](../../AGENT_GUIDE.md#writing-linkable-content) for the full set of rules.
|
|
1307
1323
|
- **CLI install per machine**: the agent needs the `cerefox` binary installed (`npm install -g @cerefox/memory`) with a resolvable `.env`. If you skip the local install entirely, Path A-Remote or Path B is the only option.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerefox/memory",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.2",
|
|
4
4
|
"description": "Cerefox — user-owned shared memory for AI agents. CLI + stdio MCP server + web UI + ingestion for a knowledge base on your own Supabase project (or fully self-hosted with Cerefox Local).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/fstamatelopoulos/cerefox",
|