MIT License

Copyright (c) 2026 Jack Skipworth

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Files under this license carry `SPDX-License-Identifier: MIT` in their first lines: the standard's
grammar, marks and reference style (`spec/md-layout.mjs`, `spec/md-marks.mjs`, `spec/md-source.mjs`, `spec/flowchart.mjs`, `spec/markdown-style.css`),
the reusable diagram source, layout and raising helpers (`draw/flowchart-mermaid.mjs`, `draw/flowchart-layout.mjs`,
`draw/flowchart-raise.mjs`) and diagram-core export facade (`shell/mermaid/api.mjs`),
ink geometry (`spec/ink.mjs`),
the layout model and line planner (`layout/model.mjs`, `layout/line-plan.mjs`, `layout/typography.mjs`, `layout/preparation.mjs`,
`layout/prepared-paragraph.mjs`, `layout/hyphenation.mjs`, `layout/paragraph-fit.mjs`), the animated-picture reader and playback
the HTML blocks use (`images/gif.mjs`, `images/playback.mjs`),
the portable HTML and document metadata helpers (`spec/html-blocks.mjs`, `spec/frontmatter.mjs`,
`spec/document-settings.mjs`, `spec/document-fonts.mjs`), the Will grammar (`agent/will.mjs`), the picture appendix reader and writer
(`spec/md-assets.mjs`), the portable comment and canonical parser support owners
(`spec/md-comments.mjs`, `spec/md-parser-config.mjs`, `spec/md-parser-runtime.mjs`),
the neutral math boundary and parser adapters (`math/delimiters.mjs`, `math/markdown-rules.mjs`), the two shared-page reference readers (`tools/read-shared-page.mjs`,
`tools/read-shared-page.py`), and the host helper `packages/rapier-embed/embed.mjs` with its
contract owner `packages/rapier-embed/contract.mjs`. The vendored Pretext (`agent/vendor/pretext`) and micromark carry their
own MIT notices. The edit-ledger module (`kit/rapier-ledger.mjs`, `kit/ledger/*.mjs`) and
its editor compatibility import (`editor/journal-records.mjs`) are also covered. The
record validator/replayer and text-only conflict merger were moved, not copied,
into that module; the Notes index merger and the rest of the agent/editor remain
AGPL-3.0-only. The page wrapper (`skills/rapier-html/wrap.mjs`, `skills/rapier-html/page.mjs`,
`skills/rapier-html/return-address.mjs`) and its carrier-staging helper
(`skills/rapier-html/package-files.mjs`) are MIT. The kit's MIT-marked facades,
`kit/render-entry.mjs`, `kit/render*.mjs`, `kit/export-fonts.mjs`, `kit/print-capitals.mjs`,
`kit/pdf-vectors.mjs`, `kit/pdf-glyphs.mjs`, `kit/stage.mjs`, `kit/markdown-vendor.mjs` and MIT-marked conformance
modules are covered too. These names describe the Rapier-owned files carrying the
MIT notice, not a grant over the editor or third-party code. Other Rapier-owned
files retain their stated license; the editor is AGPL-3.0-only (see `LICENSE`).
Third-party components retain their own copyright and license notices. The published Markdown parser,
its plugins and their dependencies retain their original MIT, ISC and BSD-2-Clause notices in `agent/vendor/NOTICE.txt` and
`agent/vendor/markdown-licenses/`; this inventory does not replace them. The Feather callout paths
in the canonical configuration retain the Feather copyright and MIT notice there.

The portable font helpers read document definitions and accept explicit host validation and
subsetting functions. The application binding (`editor/export-fonts.mjs`), captured-font
materializer (`kit/document-fonts.mjs`) and font codecs (`draw/font*.mjs`) remain AGPL-3.0-only
and are not part of the MIT package's import graph.

The picture appendix reader and writer used to be part of `images/assets.mjs`, a file that also
holds JPEG XL/raster header inspection and SVG sanitizing -- both of which reach the editor's own
AGPL-3.0-only decoders (`images/raster.mjs`, `draw/font.mjs`), so the whole file could not honestly
sit in this list. The appendix logic (`parseAssets`, `documentAssets`, `imageEnvironment`,
`mayRetireImageDefinitions`, `retireDeletedImageDefinitions`, `assetOmissions`, `isAssetBlock`,
`serializeAsset`, `appendAssetText`, `appendAsset`, and the small markdown-it plumbing they share)
depends on nothing but a markdown-it factory, so it lives in `spec/md-assets.mjs`; `images/assets.mjs`
re-imports and re-exports that surface unchanged (one owner, no copy) and keeps everything that
needs the AGPL decoders, so it is AGPL-3.0-only like the rest of the editor. The `rapier-markdown-kit`
package re-exports `spec/md-assets.mjs` directly, never `images/assets.mjs`, so its import graph
never touches AGPL code.

The JPEG XL encoder and worker modules in `images/jxl/` carry their MIT license in
`images/jxl/LICENSE`. The MIT-marked `images/encoder.mjs` and `images/codec.mjs`
re-export those modules. Their runtime import graph contains no editor code.
