DreamLake

Memo and folder archival

Archiving removes completed work from active listings while preserving its identity, content, permissions, project filings and Bindr membership. It is separate from deletion and tags. Memos and folders expose a nullable archivedAt timestamp; null means that the item is not independently archived.

The initial HTTP and web controls are deployed. The complete client contract targets CLI/TypeScript 0.97.1 and Python 0.33.1 with the matching archive-capable server. Verify installed versions and the target server independently; upgrading a client alone does not deploy its server requirements.

Archive or unarchive

ResourceRequestAuthority
MemoPATCH /namespaces/:slug/notes/:noteIdThe Memo's rename permission
FolderPATCH /nodes/:idExisting project content-write permission

Send only {"archived":true} to archive or {"archived":false} to unarchive. Do not combine the archive field with a rename, visibility change or other edit. The node route accepts archive changes for folders, not Memo mount nodes, files or projects. Address a filed Memo through its Memo ID and owning namespace.

http
PATCH /namespaces/example-team/notes/000000000000000000000001
Authorization: Bearer <token>
Content-Type: application/json

{"archived":true}

The successful metadata response includes archivedAt. Archive changes use no body revision and must not discard a client's cached source, baseline or draft. Before archiving a Memo, the server saves pending collaboration content. If it cannot safely do so, it refuses the request; a 409 can require a later retry. An absent collaboration document is safe when no live edits need saving; the retained body is preserved. Authorization and missing-resource errors retain the endpoint's normal behavior. A lost response requires reading current state before deciding whether another mutation is needed.

bash
dl memos archive "$NOTE_ID" --namespace example-team
dl memos unarchive "$NOTE_ID" --namespace example-team
dl memos list --namespace example-team --include-archived

Tool examples refer to DreamLake's registered built-in agent tools, with namespace and authority supplied by their invocation context. They do not claim a portable MCP registration. The general Memos API design still describes a future unified handle interface; the current TS namespace call above selects a namespace, while Python's note(...) selects a Memo.

Active listings and archived folders

includeArchived=true includes both active and archived items. It does not mean "archived only," reveal deleted objects, or bypass permissions. Filtering occurs before totals, offsets and continuation cursors on filtered discovery endpoints.

ReadArchive filtering
GET /namespaces/:slug/notesActive Memos by default; accepts includeArchived with catalog search q
GET /me/notes/sharedActive shared Memos by default; accepts includeArchived
GET /namespaces/:slug/notes/searchContent matches use the same filter; continuation binds the archive choice
GET /nodesActive node discovery by default; accepts includeArchived
GET /nodes/:id/contentsLegacy complete episode/file inventory when omitted; pass includeArchived=false for active-only browsing
GET /namespaces/:slug/projects/:projectSlug/episodesActive episode browsing by default; accepts includeArchived
GET /nodes/childrenActive children or recursive search results; accepts includeArchived
GET /nodes/:id/descendantsLegacy complete inventory when omitted; pass includeArchived=false for active-only descendants
GET /namespaces/:slug/projects/:projectSlug/resourcesActive folder, project or Bindr rows; accepts includeArchived

An archived folder hides its subtree from active project listings without setting every child's own archivedAt. A child can therefore have archivedAt: null and still be hidden through an ancestor. A Memo filed in another active folder remains discoverable there unless the Memo itself is archived. Association reads continue to report the Memo's filings: archiving does not unfile it.

Direct authorized reads by ID remain available. Resolving an archived Memo for an explicit read or unarchive operation must include archived candidates rather than silently creating a replacement. Keep the archive filter unchanged when continuing a search cursor; restart the search to change it.

The contents and descendants endpoints preserve their historical complete-inventory default when includeArchived is omitted, so older download clients do not silently lose archived files or episodes. Browsing callers should send includeArchived=false explicitly. Complete recursive downloads request true, including archived paths; downloading does not restore them. These inventory exceptions do not change the active-only defaults of node children, resource listings, or episode discovery.

Folder clients

bash
dl folders archive "$FOLDER_ID"
dl folders unarchive "$FOLDER_ID"
dl folders list --namespace example-team --project research --include-archived
typescript
await dl.nodes.archive(folderId)
await dl.nodes.unarchive(folderId)
python
from dreamlake.api._client import DreamLakeClient

client = DreamLakeClient()
client.archive_folder(folder_id)
client.unarchive_folder(folder_id)
children = client.get_node_children(folder_id, include_archived=True)
members = client.projects.resources("example-team", "research",
                                   bindr=bindr_id, include_archived=True)

The registered folder tool is:

javascript
dreamlake_folder_archive({ projectId, folderId, archived: true })
dreamlake_folder_archive({ projectId, folderId, archived: false })

Folder mutations in built-in tools require projects:write scope and the existing write-tools opt-in. A read-only tool session cannot archive a folder. The server still checks the authenticated project grant and the target folder. Built-in Memo update requires its existing write scope and the Memo management permission.

GraphQL reads

Note.archivedAt and Node.archivedAt expose independent archival state. Node.children(includeArchived: true) includes archived children and paths; the default is active-only. The root episodes query accepts the same filter. Memo location and Bindr association fields retain their associations. Archive mutations remain REST; no GraphQL archive mutation is introduced.

graphql
query ArchivedChildren($namespace: String!, $project: String!) {
  project(namespaceSlug: $namespace, projectSlug: $project) {
    id
    children(includeArchived: true) { id name archivedAt }
  }
}

Saved edits restore the path

A successful changed content, metadata or attachment save restores the Memo. Editing a folder or file, or adding a child, restores its archived folder path. Memo edits restore the paths of its valid live project filings; explicit unarchive also restores the path needed to find the item.

Opening, reading, watching or synchronizing unchanged content leaves archive state intact. Content restoration occurs on durable save, not on a local keystroke or local RTC commit. A failed write does not restore the item. Independently archived siblings remain archived, and deleted resources remain deleted.

The web app offers Archive/Unarchive in memo toolbars and note/folder rows, plus Show archived in listings. See the Memos reference for the browsing behavior, and the owning client guides for complete command and method signatures.

For complete installed-client signatures, see the CLI and TypeScript archive guide and Python archive guide.