# Dump
`dump` generates a super-source `mind.toml` from the current
melded and installed state, so an agent home can be reproduced or shared by
melding the output. It references and pins each melded source rather than
inlining its inventory: the reproduced meld reads each source's own `mind.toml`.
It is the inverse of melding a curated chain (discovery.md DSC-38): `mind meld`
reads a super-source, `mind dump` writes one.
"item", "source", "store", and "link" are as in [README.md](README.md). The
super-source `[discover].sources` shape, the per-entry `install` directive, and
`install-items` are defined in [discovery.md](discovery.md). The source registry
and the manifest are defined in [storage.md](storage.md).
## What dump emits
- `DUMP-1` `mind dump` writes a super-source `mind.toml` to stdout by default, or
to `--output <path>`. Its `[discover].sources` lists every melded source (the
registry, storage.md), each referenced by its spec and pinned to its currently
recorded commit as a `pin-ref` (DSC-41). The per-entry pin is authoritative
(DSC-65), overriding each source's own `[source]` pin, so melding the output
reproduces the same source set at the same revisions.
- `DUMP-4` Each emitted entry carries the meld-time settings in effect for its
source so the reproduction matches: the prefix (`as`, from the consumer alias or
the source's `[source].prefix`, namespacing.md), the scan `roots` (STO-17), and
the pin resolved to the current commit (DUMP-1). `dump` references each source
and does not inline its `[[items]]`, discovery globs, or hooks: those are read
from each source's own `mind.toml` when the output is melded.
- `DUMP-7` The emitted file is a valid super-source (it parses under DSC-3 and the
strictness of DSC-30) that declares only `[discover].sources` and no items of its
own, so melding it registers the chain and installs per the per-entry directive
(DSC-54, DSC-58, and `install-items` DSC-62). It carries a `[source].description`
noting it was generated by `dump`.
- `DUMP-8` With no melded sources, `dump` emits a valid super-source whose
`[discover].sources` is empty and exits 0.
## Item filtering
- `DUMP-2` By default `dump` filters each source to the items actually installed
(the manifest) against what the source's catalog offers, and stamps the per-entry
install directive accordingly: every offered item installed yields `install =
true` (DSC-58); none installed yields `install = false`; a proper subset
installed yields `install-items = [...]` listing exactly those items (DSC-62).
The empty `install-items = []` form is never emitted; that case is `install =
false`.
- `DUMP-5` Items in `install-items` are listed by bare `kind:name` (catalog and
source truth), so a prefix carried by the entry's `as` (DUMP-4) still applies at
install, consistent with the catalog (namespacing.md).
- `DUMP-6` An item installed only as a within-source dependency (dependencies.md)
is part of the installed set and is listed in `install-items` like any other, so
the reproduction installs the same set without relying on dependency
re-derivation at meld time.
- `DUMP-3` `--whole-sources` disables item filtering: every melded source is
emitted with `install = true` regardless of how many of its items are installed,
so the output offers each source's full inventory rather than the recorded
subset.