<!-- source: https://docs.dreamlake.ai/notes/api/moving @ 0.1.192 b2f973b1 -->
# Resource moves and renames

**Implementation target — unreleased.** These pages specify the redesigned API. Examples are interface contracts, not claims that installed clients, tool registration or the deployed service already implement them. Verify current support before executing proposed calls against important resources.

[API index](/notes/api/) · [Resource lifecycle](/notes/api/resources/) · [Editing](/notes/api/editing/) · [CLI streams](/notes/api/cli/)

Use the public verb `move` for placement and cross-workspace ownership changes. The same verb does not give every resource identical storage, ownership or runtime effects. Existing transfer planning, recipient acceptance and status machinery remains behind the common facade.

## Identify the source

Stable IDs are primary. `dl.notes(noteId)` remembers resource identity and client configuration; opening by stable ID is local. Supported moves and renames preserve resource identity.

Namespace is optional **source/lookup context**. CLI `--ns` aliases `--namespace` for lookup, list and create; it never means destination. A stable ID resolves its owner server-side. An explicitly supplied source namespace is an assertion: reject a mismatch. Bare slugs require unambiguous explicit or configured namespace, plus project context when required. Supported qualified references remain optional conveniences.

Do not infer workspace, project and deep-folder boundaries from slash strings. Tasks and attachment paths may be deep; resources may have multiple project filings. Resolve through the collection schema once, then retain the stable resource ID through execution and reconciliation.

## Destination fields

| Meaning | CLI | TypeScript/tools | Python |
| --- | --- | --- | --- |
| Workspace | `--to-namespace` | `toNamespace` | `to_namespace` |
| Project | `--to-project` | `toProject` | `to_project` |
| Deep folder | `--to-folder` | `toFolder` | `to_folder` |
| Display name | `--name` | `name` | `name` |

Fields are individually optional; require at least one requested change. Omitted values preserve applicable current values, subject to ownership/placement validation. Never infer a missing destination from an unrelated active workspace.

Projects accept ID or slug. An ID determines its namespace; an explicit destination namespace must match. Resolve a slug in the explicit destination namespace or a valid known current context. Ambiguity requires additional context, not guessing.

Folders are relative to the resolved project/container and may be arbitrarily deep. Do not silently create folders/projects. A namespace-only destination is valid only for collections supporting unfiled ownership there.

## Move a Memo

**CLI**

```bash
dl memos move "$NOTE_ID" --ns source-workspace \
  --to-namespace destination-workspace --to-project "$PROJECT_ID" \
  --to-folder research/2026/reviews --name Review
```

**TypeScript**

```typescript
await dl.notes(noteId).move({
  toNamespace: "destination-workspace", toProject: projectId,
  toFolder: "research/2026/reviews", name: "Review",
})
```

**Python**

```python
dl.notes(note_id).move(
    to_namespace="destination-workspace", to_project=project_id,
    to_folder="research/2026/reviews", name="Review",
)
```

**Tool call**

```javascript
notes_move({
  note: noteId, toNamespace: "destination-workspace", toProject: projectId,
  toFolder: "research/2026/reviews", name: "Review",
})
```

The CLI source assertion is optional for an ID. Source and destination authority remain server-checked. Preserve Memo ID, content and supported RTC/history continuity or return an explicit blocker. Never emulate a move with copy-and-delete. Cross-workspace ownership changes must reconcile permissions, sessions, attachments and filings under the actual backend contract.

### Multiple filings

A Memo ID does not identify which of several project filings should move. Require source-filing context when ambiguous or define an ownership-only operation's filing consequences explicitly. Proposed `fromProject` could select a filing, but spelling and semantics remain open. Never remove all existing memberships silently.

## Rename

`name` changes display name, not automatically slug/path. Stable identity is retained. A path-based collection needs an explicit rule for path-component rename. Old URLs are preserved only if a redirect capability actually exists.

**CLI**

```bash
dl memos move "$NOTE_ID" --name "New title"
# Alternative convenience command:
dl memos rename "$NOTE_ID" --name "New title"
```

**TypeScript**

```typescript
await dl.notes(noteId).move({ name: "New title" })
// Alternative convenience call:
await dl.notes(noteId).rename({ name: "New title" })
```

**Python**

```python
dl.notes(note_id).move(name="New title")
# Alternative convenience call:
dl.notes(note_id).rename(name="New title")
```

**Tool call**

```javascript
notes_move({ note: noteId, name: "New title" })
// Alternative convenience call:
notes_rename({ note: noteId, name: "New title" })
```

The calls in each panel are alternatives, not instructions to rename twice. A convenience rename shares the metadata behavior; title-only changes should not require an ownership-transfer workflow. Body RTC revision is not metadata versioning: use the metadata authority/concurrency contract.

## Project ownership

A Project's destination is a namespace. A whole-project move needs a manifest of owned resources that move and linked resources that remain external. Recipient acceptance, retained-access policy and collisions remain part of the workflow.

**CLI**

```bash
dl project move "$PROJECT_ID" --ns source-workspace \
  --to-namespace destination-workspace --name Research
```

**TypeScript**

```typescript
await dl.projects(projectId).move({
  toNamespace: "destination-workspace", name: "Research",
})
```

**Python**

```python
dl.projects(project_id).move(
    to_namespace="destination-workspace", name="Research",
)
```

**Tool call**

```javascript
projects_move({
  project: projectId, toNamespace: "destination-workspace", name: "Research",
})
```

A project move does not transfer every linked resource. Missing resource adapters must be reported as blockers before completion.

## Project resource families

All use the same destination fields. Collection handle factories and tool names are proposed; verify exports/registration during implementation.

### Artifacts

Preserve catalog identity and payload references. Metadata ownership does not prove bytes were copied or external storage authority moved. Validate payload and placement access.

**CLI**

```bash
dl artifacts move "$RESOURCE_ID" --to-project "$PROJECT_ID" \
  --to-folder research/2026/reviews
```

**TypeScript**

```typescript
await dl.artifacts(resourceId).move({
  toProject: projectId, toFolder: "research/2026/reviews",
})
```

**Python**

```python
dl.artifacts(resource_id).move(
    to_project=project_id, to_folder="research/2026/reviews",
)
```

**Tool call**

```javascript
artifacts_move({
  artifact: resourceId, toProject: projectId, toFolder: "research/2026/reviews",
})
```

### Environments and scenes

Do not stop, recreate or migrate running infrastructure as an incidental metadata effect. Provider resources and credentials have separate authority. A scene alias may share the adapter.

**CLI**

```bash
dl envs move "$RESOURCE_ID" --to-project "$PROJECT_ID" \
  --to-folder research/2026/reviews
```

**TypeScript**

```typescript
await dl.envs(resourceId).move({
  toProject: projectId, toFolder: "research/2026/reviews",
})
```

**Python**

```python
dl.envs(resource_id).move(
    to_project=project_id, to_folder="research/2026/reviews",
)
```

**Tool call**

```javascript
envs_move({
  env: resourceId, toProject: projectId, toFolder: "research/2026/reviews",
})
```

### Pipelines

Validate referenced sources, artifacts and environments, and define effects on pending/running work. Do not silently rewrite logic or transfer secrets.

**CLI**

```bash
dl pipelines move "$RESOURCE_ID" --to-project "$PROJECT_ID" \
  --to-folder research/2026/reviews
```

**TypeScript**

```typescript
await dl.pipelines(resourceId).move({
  toProject: projectId, toFolder: "research/2026/reviews",
})
```

**Python**

```python
dl.pipelines(resource_id).move(
    to_project=project_id, to_folder="research/2026/reviews",
)
```

**Tool call**

```javascript
pipelines_move({
  pipeline: resourceId, toProject: projectId, toFolder: "research/2026/reviews",
})
```

### Sources

Preserve identity and data bindings. Catalog ownership does not grant access to external storage or credentials. Report destination access blockers.

**CLI**

```bash
dl sources move "$RESOURCE_ID" --to-project "$PROJECT_ID" \
  --to-folder research/2026/reviews
```

**TypeScript**

```typescript
await dl.sources(resourceId).move({
  toProject: projectId, toFolder: "research/2026/reviews",
})
```

**Python**

```python
dl.sources(resource_id).move(
    to_project=project_id, to_folder="research/2026/reviews",
)
```

**Tool call**

```javascript
sources_move({
  source: resourceId, toProject: projectId, toFolder: "research/2026/reviews",
})
```

### Annotations

Preserve identity and anchor meaning. Validate destination access to referenced assets or Memos; metadata success does not move anchored resources.

**CLI**

```bash
dl annotations move "$RESOURCE_ID" --to-project "$PROJECT_ID" \
  --to-folder research/2026/reviews
```

**TypeScript**

```typescript
await dl.annotations(resourceId).move({
  toProject: projectId, toFolder: "research/2026/reviews",
})
```

**Python**

```python
dl.annotations(resource_id).move(
    to_project=project_id, to_folder="research/2026/reviews",
)
```

**Tool call**

```javascript
annotations_move({
  annotation: resourceId, toProject: projectId, toFolder: "research/2026/reviews",
})
```

## Tasks

Preserve stable task identity, events and defined child relationships. Existing folder/path relocation does not establish cross-project or cross-workspace migration support. Those require backend guarantees even under the same verb. Define display-title versus path-component rename explicitly.

**CLI**

```bash
dl tasks move "$TASK_ID" --to-project "$PROJECT_ID" \
  --to-folder reviews/2026/followups
```

**TypeScript**

```typescript
await dl.tasks(taskId).move({
  toProject: projectId, toFolder: "reviews/2026/followups",
})
```

**Python**

```python
dl.tasks(task_id).move(
    to_project=project_id, to_folder="reviews/2026/followups",
)
```

**Tool call**

```javascript
tasks_move({
  task: taskId, toProject: projectId, toFolder: "reviews/2026/followups",
})
```

## Infrastructure registrations

For the implemented saved-review CLI, HTTP and Python interfaces, use
[Infrastructure registration moves](/infrastructure-stacks.md#move-a-registration).
The concise facade below remains a proposed interface; it does not replace the
reviewed operation or imply that these flags are installed.

Move registration/ownership metadata under the reviewed operation protocol, not live cloud infrastructure. Keep operation IDs and recovery even behind a short public command.

**CLI**

```bash
dl infra move "$STACK_ID" --to-project "$PROJECT_ID" \
  --to-folder infra/production
```

**TypeScript**

```typescript
await dl.infra(stackId).move({
  toProject: projectId, toFolder: "infra/production",
})
```

**Python**

```python
dl.infra(stack_id).move(
    to_project=project_id, to_folder="infra/production",
)
```

**Tool call**

```javascript
infra_move({
  stack: stackId, toProject: projectId, toFolder: "infra/production",
})
```

## Attachments

Identify the parent Memo and file separately. Destination folder is relative to that Memo's file tree, not a project. No new combined Note/file delimiter is needed.

**CLI**

```bash
dl memos files move "$FILE_ID" --note "$NOTE_ID" \
  --to-folder reviews/2026 --name final.md
```

**TypeScript**

```typescript
await dl.notes(noteId).files.move({
  file: fileId, toFolder: "reviews/2026", name: "final.md",
})
```

**Python**

```python
dl.notes(note_id).files.move(
    file=file_id, to_folder="reviews/2026", name="final.md",
)
```

**Tool call**

```javascript
notes_files_move({
  note: noteId, file: fileId, toFolder: "reviews/2026", name: "final.md",
})
```

Same-Note path moves retain file ID and bytes. Validate version/path ownership; destination collisions fail unless an explicit supported overwrite policy is requested. Cross-Note moves require a separate implemented capability with ownership/recovery guarantees under the same public verb. Do not infer that support from a same-Note path operation.

## Current command comparison

This is inspected source registration, not proposed spelling or deployed capability evidence.

| Collection | Existing command | Difference from target |
| --- | --- | --- |
| Project | `project move PROJECT --namespace SRC --to DST` | Target uses ID and explicit destination namespace |
| Memo filing | `notes move NOTE --namespace SRC --to-namespace DST --project PROJECT --folder PATH` | Destination project/folder need consistent `to-` prefix |
| Memo ownership | `notes transfer ID --namespace SRC --to DST` | Target has one public move facade |
| Artifact, env/scene, pipeline, source, annotation | `ownership transfer TYPE ID --namespace SRC --to DST` | Ownership transfer alone does not establish project placement |
| Tasks | `tasks move TASK DESTINATION --namespace NS --project PROJECT` | Positional destination path; broader migration requires support |
| Infra | `infra move STACK --namespace DST --project PROJECT --destination-path PATH` | Namespace currently means destination here |
| Infra transfer | `infra transfer plan/create/status/accept` | Reviewed workflow remains behind facade |
| Attachment | `notes files mv FILE NEW_PATH --note NOTE --namespace NS` | Target has separate destination folder/name |

## Results and operation states

Use a shared result envelope with stable identity and collection-specific locations. The following illustrates target output, not a released receipt:

```json
{
  "resource": { "type": "note", "id": "NOTE_ID" },
  "status": "completed",
  "from": { "namespace": "source-workspace", "projectId": "OLD_PROJECT_ID" },
  "to": {
    "namespace": "destination-workspace",
    "projectId": "PROJECT_ID",
    "folder": "research/2026/reviews",
    "name": "Review"
  },
  "url": "https://dreamlake.ai/destination-workspace/notes/NOTE_ID"
}
```

Return `pending` with operation identity when acceptance is required; requested location is not committed location. Return `blocked` with actionable capability/authority/dependency/collision reasons. An unknown transport outcome must direct reconciliation of the same operation, not a fresh move.

Stable request identity binds resolved resource ID, expected metadata version, destination and rename/folder changes. Reuse with different intent must fail. Retrying must reconcile the original operation instead of re-resolving a mutable slug and possibly moving another resource. Check current source/destination authority independently of body RTC tokens.

CLI does not implicitly read stdin for moves. Reviewed request files are explicit if required by the backend workflow. Stdout carries result data, with concise ID/location/link in TTY and structured state under `--json`; stderr carries diagnostics. Ancillary presence/link formatting failure never repeats an accepted move. See [CLI streams](/notes/api/cli/).

## Decisions to finalize

- Confirm optional slug-reference shapes per collection; IDs remain primary.
- Specify multiple-filing source selection and retained/detached filing policy.
- Define display name versus slug/path rename, collisions and any redirects.
- Define destination support, folder existence and cross-workspace preservation/acceptance per collection.
- Adapt existing reviewed transfer/status protocols without weakening authority or recovery.
- Plan flag/response compatibility; publishing these docs is not releasing the APIs.
