@cerefox/memory 1.12.1 → 1.13.0
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 +2 -2
- package/dist/bin/cerefox.js +6947 -7329
- package/dist/frontend/assets/index-InRztcXr.js +121 -0
- package/dist/frontend/assets/index-InRztcXr.js.map +1 -0
- package/dist/frontend/index.html +1 -1
- package/dist/server-assets/_shared/ef-meta/index.ts +3 -3
- package/dist/server-assets/_shared/mcp-tools/feature-flags.ts +41 -23
- package/dist/server-assets/_shared/mcp-tools/ingest.ts +2 -4
- package/dist/server-assets/_shared/mcp-tools/metadata-search.ts +6 -1
- package/dist/server-assets/_shared/mcp-tools/partial-edits.ts +2 -2
- package/dist/server-assets/db/migrations/0031_review_workflow_toggle.sql +72 -0
- package/dist/server-assets/db/rpcs.sql +46 -8
- package/dist/server-assets/db/schema.sql +13 -2
- package/dist/server-assets/supabase/functions/cerefox-ingest/index.ts +2 -4
- package/dist/server-assets/supabase/functions/cerefox-metadata-search/index.ts +12 -2
- package/docs/guides/access-paths.md +1 -1
- package/docs/guides/cli.md +11 -4
- package/docs/guides/configuration.md +56 -8
- package/docs/guides/connect-agents.md +9 -5
- package/docs/guides/upgrading.md +21 -1
- package/package.json +1 -1
- package/dist/frontend/assets/index-P1F2Ldl9.js +0 -121
- package/dist/frontend/assets/index-P1F2Ldl9.js.map +0 -1
|
@@ -378,9 +378,13 @@ enable it.
|
|
|
378
378
|
### How it works
|
|
379
379
|
|
|
380
380
|
A `cerefox_config` table in Postgres stores runtime configuration as key-value
|
|
381
|
-
pairs.
|
|
382
|
-
|
|
383
|
-
|
|
381
|
+
pairs. Every key is declared once in the shared catalog
|
|
382
|
+
(`_shared/config-catalog/index.ts`: kind, default, group, description); the
|
|
383
|
+
`cerefox_set_config` RPC's allow-list stays authoritative for writes and a unit
|
|
384
|
+
test pins the two together. Run `cerefox config list` (or open **Settings** in
|
|
385
|
+
the web UI) for the current set — today that is usage tracking, the two
|
|
386
|
+
requestor-identity keys, three retrieval tunables, two version-retention keys,
|
|
387
|
+
the document-size warning threshold, `review_workflow_enabled` and
|
|
384
388
|
`relations_enabled`. Usage logging is the illustrative case below: every logging
|
|
385
389
|
call goes through the
|
|
386
390
|
`cerefox_log_usage` RPC, which checks this config value first:
|
|
@@ -414,15 +418,17 @@ cerefox config get usage_tracking_enabled
|
|
|
414
418
|
|
|
415
419
|
**Via the web UI:** `cerefox web` → **Settings**. Every runtime key is listed
|
|
416
420
|
with its description, current value and default, grouped into Retrieval,
|
|
417
|
-
Governance and Features.
|
|
421
|
+
Retention, Governance and Features.
|
|
418
422
|
|
|
419
423
|
Two things the page does deliberately:
|
|
420
424
|
|
|
421
425
|
- **Keys that change what agents see require confirmation.** Turning on
|
|
422
|
-
`relations_enabled` adds four tools to every connected agent's tool list,
|
|
426
|
+
`relations_enabled` adds four tools to every connected agent's tool list,
|
|
423
427
|
`require_requestor_identity` starts rejecting agents that don't identify
|
|
424
|
-
themselves
|
|
425
|
-
|
|
428
|
+
themselves, `review_workflow_enabled` hides or reveals the review status on
|
|
429
|
+
every surface, and `version_cleanup_enabled` decides whether old versions are
|
|
430
|
+
pruned. None is a bare toggle — you get a dialog naming the consequence
|
|
431
|
+
first.
|
|
426
432
|
- **Retired `.env` lines are flagged.** If a variable that used to control a
|
|
427
433
|
setting is still present in the server's environment, the row says so — it no
|
|
428
434
|
longer does anything, and the value shown is what actually runs. The page
|
|
@@ -539,9 +545,51 @@ This is the default state -- no configuration needed for backward compatibility.
|
|
|
539
545
|
|
|
540
546
|
---
|
|
541
547
|
|
|
548
|
+
## Review Workflow
|
|
549
|
+
|
|
550
|
+
Cerefox can queue agent-authored writes for a person to approve: with the
|
|
551
|
+
workflow **on**, a document written with `author_type: agent` lands as
|
|
552
|
+
`pending_review`, a human write lands as `approved`, and every surface shows the
|
|
553
|
+
status (a pill on the document page, badges on the dashboard, a search filter,
|
|
554
|
+
a `status` column in the CLI, the field in API and MCP output). Review status
|
|
555
|
+
never gates retrieval — a pending document is exactly as searchable as an
|
|
556
|
+
approved one — it is a governance signal, nothing more.
|
|
557
|
+
|
|
558
|
+
Since v1.13.0 the workflow is a store-level switch, `review_workflow_enabled`,
|
|
559
|
+
kept in `cerefox_config` like every other store setting so two clients on one
|
|
560
|
+
database cannot disagree about whether it exists:
|
|
561
|
+
|
|
562
|
+
| Situation | Value |
|
|
563
|
+
|---|---|
|
|
564
|
+
| Fresh install (v1.13.0+) | **`false`** — most single-operator stores never review anything |
|
|
565
|
+
| Upgraded from an earlier version | **`true`** — an upgrade never changes what your store does |
|
|
566
|
+
|
|
567
|
+
```bash
|
|
568
|
+
cerefox config get review_workflow_enabled
|
|
569
|
+
cerefox config set review_workflow_enabled true # or false; also in Settings → Governance
|
|
570
|
+
cerefox doctor # prints "review workflow ON …" / "OFF …"
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
**With the workflow off, the feature is absent, not dimmed.** Every write lands
|
|
574
|
+
`approved` whoever wrote it — the decision is made once, inside the
|
|
575
|
+
`cerefox_ingest_document` RPC, so every access path (CLI, local and remote MCP,
|
|
576
|
+
Edge Functions, web) obeys the same setting, including older clients. No surface
|
|
577
|
+
shows a `review_status`: the web pill, badges and search chip do not render;
|
|
578
|
+
the CLI drops its `status` column; API, MCP and Edge Function rows carry no
|
|
579
|
+
`review_status` key; `GET /api/v1/search?review_status=…` is a `400`; and
|
|
580
|
+
`POST /api/v1/documents/{id}/review-status` is a `404`.
|
|
581
|
+
|
|
582
|
+
**Toggling never touches stored data.** Flipping the flag off does not approve
|
|
583
|
+
anything and flipping it on does not queue anything; documents that were
|
|
584
|
+
`pending_review` are still pending, and are shown as such the moment the flag
|
|
585
|
+
is on again. Attribution and the audit log are unaffected in both states — who
|
|
586
|
+
wrote what is always recorded. Config changes are audited too.
|
|
587
|
+
|
|
588
|
+
Design: [`docs/specs/review-workflow-toggle.md`](../specs/review-workflow-toggle.md).
|
|
589
|
+
|
|
542
590
|
## Checking Your Configuration
|
|
543
591
|
|
|
544
|
-
Run the doctor to verify everything is connected (credentials, DB reachability, schema version):
|
|
592
|
+
Run the doctor to verify everything is connected (credentials, DB reachability, schema version, review workflow on/off):
|
|
545
593
|
|
|
546
594
|
```bash
|
|
547
595
|
cerefox doctor # or: cerefox status
|
|
@@ -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: 3.
|
|
641
|
+
version: 3.4.0
|
|
642
642
|
servers:
|
|
643
643
|
- url: https://<your-project-ref>.supabase.co/functions/v1
|
|
644
644
|
paths:
|
|
@@ -798,8 +798,10 @@ paths:
|
|
|
798
798
|
default: agent
|
|
799
799
|
description: >
|
|
800
800
|
Whether this write is from a human user or an AI agent.
|
|
801
|
-
|
|
802
|
-
|
|
801
|
+
Always recorded for attribution. While the store's review
|
|
802
|
+
workflow is on (review_workflow_enabled), agent writes land
|
|
803
|
+
pending_review and user writes approved; with it off every
|
|
804
|
+
write lands approved.
|
|
803
805
|
responses:
|
|
804
806
|
'200':
|
|
805
807
|
description: >
|
|
@@ -1033,9 +1035,11 @@ paths:
|
|
|
1033
1035
|
'200':
|
|
1034
1036
|
description: >
|
|
1035
1037
|
Array of matching documents:
|
|
1036
|
-
[{ document_id, title, doc_metadata,
|
|
1038
|
+
[{ document_id, title, doc_metadata, source, created_at,
|
|
1037
1039
|
updated_at, total_chars, chunk_count, project_ids, project_names,
|
|
1038
|
-
version_count, content_hash, content }]
|
|
1040
|
+
version_count, content_hash, content }], plus review_status
|
|
1041
|
+
only while the store's review workflow is on (the key is absent
|
|
1042
|
+
when it is off).
|
|
1039
1043
|
content_hash is the concurrency token — pass it back as
|
|
1040
1044
|
expected_content_hash when updating via ingestNote.
|
|
1041
1045
|
```
|
package/docs/guides/upgrading.md
CHANGED
|
@@ -11,7 +11,7 @@ cerefox guides ingest # 3. the bundled guides, into your KB
|
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
The order matters: a release may require its own schema (the version notes
|
|
14
|
-
say so — v1.9.x
|
|
14
|
+
say so — v1.9.x and v1.13.0 are two), and until `server deploy` runs, the freshly updated
|
|
15
15
|
client is talking to the previous release's server. That is why
|
|
16
16
|
`self-update` no longer runs the guides sync automatically — it used to fire
|
|
17
17
|
at the one moment in the upgrade where it cannot succeed against a
|
|
@@ -60,6 +60,24 @@ schema-requiring release.
|
|
|
60
60
|
|
|
61
61
|
## End-user upgrade
|
|
62
62
|
|
|
63
|
+
> ### Upgrading to v1.13.0 — `cerefox server deploy` is required
|
|
64
|
+
>
|
|
65
|
+
> v1.13.0 makes the review workflow optional and moves the "agent writes land
|
|
66
|
+
> `pending_review`" decision out of the clients and into the
|
|
67
|
+
> `cerefox_ingest_document` RPC (#241). A v1.13.0 client no longer decides
|
|
68
|
+
> the status itself, so against an older server every agent write would
|
|
69
|
+
> silently land `approved` — a behaviour change, not a missing feature — and
|
|
70
|
+
> the new review-status search filter would fail outright. The **minimum
|
|
71
|
+
> supported schema is therefore `0.16.0`**: until you run `cerefox server
|
|
72
|
+
> deploy`, `cerefox web` refuses to start and `doctor` says exactly why.
|
|
73
|
+
>
|
|
74
|
+
> Migration 0031 seeds `review_workflow_enabled = true` on every existing
|
|
75
|
+
> store, so **your store keeps behaving exactly as before**. The flag now
|
|
76
|
+
> exists and `cerefox doctor` prints its state; flip it with
|
|
77
|
+
> `cerefox config set review_workflow_enabled false` (or Settings → Governance)
|
|
78
|
+
> if nobody reviews the queue. See
|
|
79
|
+
> [configuration.md → Review Workflow](configuration.md#review-workflow).
|
|
80
|
+
|
|
63
81
|
> ### Upgrading to v1.1.0 — `cerefox server deploy` is required
|
|
64
82
|
>
|
|
65
83
|
> Most releases let you postpone the server step. **This one does not.** Until
|
|
@@ -166,6 +184,8 @@ knowing about:
|
|
|
166
184
|
that ingested fine before now need deduplication, or are refused on edit.
|
|
167
185
|
- **v1.7.0 — trashed documents refuse content updates.** A soft-deleted
|
|
168
186
|
document must be restored before its content can be updated.
|
|
187
|
+
- **v1.13.0 — the review workflow is a store setting.** Upgraded stores keep
|
|
188
|
+
it on; fresh installs start with it off. See the callout above.
|
|
169
189
|
|
|
170
190
|
## Notable: v1.8.0 storage reclaim (migration 0027)
|
|
171
191
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerefox/memory",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
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",
|