You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 96d4a70
Browse filesBrowse the repository at this point in the historyBrowse files
Fix stale route table and a decorative test branch (CL-6288 review)
IMPLEMENTATION.md's route table and "register the three HTTP routes"
sentence predated feed and now this PR's three retention routes — the
package mounts seven. Added feed, forget, purge, and retention-class rows
and corrected the sentence; also listed the optional retention plane
methods alongside the existing transform ones.
src/memory.test.ts's ownership-wiring fake sql branched on
`text.includes("document_id")` with both arms returning an identical row —
it read as distinguishing the document-owner and version-owner queries but
did not. Dropped the branch; a comment explains real per-query scoping is
covered separately in retention-ownership.test.ts.
|`POST /api/tenants/:tenantId/memory/search`|`search`|`{ query, limit?, kinds?, entity_ids?, sources?, includeEvidence? }` (limit 1–50; `kinds`/`entity_ids`/`sources` narrow retrieval before fusion; unset or `[]` = unfiltered; `includeEvidence` adds a short evidence string when true) |`200 { items[], evidence?, degraded? }`; `400` on bad input |
635
635
|`GET /api/tenants/:tenantId/memory/list`|`search`| query `?limit=` (1–100, string on the wire) |`200 { events: [{ at, title, source, tenantId, principalId }] }` — durable recent documents for the caller's scope, filtered with grant-tag access (`canAccessDocument`). One event per document (active live version). |
636
+
|`GET /api/tenants/:tenantId/memory/feed`|`search`| query `?after=&limit=&exclude_generator=`|`200 { entries[], nextCursor }` — cursor pull of new live versions. See `docs/FEED.md`. |
637
+
|`POST /api/tenants/:tenantId/memory/documents/:documentId/forget`|`forget`|`{ reason? }`|`200 { documentId, versions }`; `403` unless caller is the document's creator; `404` unknown document. Tombstones — content is redacted, not archived; see docs/RETENTION.md. |
638
+
|`POST /api/tenants/:tenantId/memory/documents/:documentId/purge`|`purge`| none |`200 { documentId, deleted, reason? }`; `403` unless caller is the document's creator; `404` unknown document. Hard-deletes the row — irreversible; refused while a `durable` version is untombstoned. |
639
+
|`POST /api/tenants/:tenantId/memory/versions/:versionId/retention-class`|`forget`|`{ retention_class }`|`200 { versionId, documentId, status }`; `400` invalid class; `403` unless caller is the version's creator; `404` unknown version. |
636
640
637
-
`registerMemoryRoutes` and `createMemory({ app })` register the three HTTP routes.
641
+
`registerMemoryRoutes` and `createMemory({ app })` register these seven HTTP
0 commit comments