# Notices

This repository is the DeepSeek Harness adapter extracted from **magic-context**.
It carries work from more than one project, under more than one copyright, and
MIT requires the notices to travel with it. This file records where each part
came from and the exact revisions it was taken at.

## magic-context — https://github.com/cortexkit/magic-context

MIT License, Copyright (c) 2025 Ufuk Altinok.

The adapter is derived from this project: it shares its memory contracts, its
on-disk formats, and its design language. Extracted from upstream tag
**v0.46.0** (commit `651c105a9`). The adapter's own commits were replayed out of
the `dsh` branch of a local magic-context checkout at `e34eda955`
(2026-10-08) — 60 commits, authors and dates preserved.

The adapter's own database lives under the upstream project's directory
(`~/.local/share/cortexkit/magic-context-dsh-poc`) and reads the shared memory
bank at (`~/.local/share/cortexkit/magic-context/context.db`) on purpose: that
is the interoperability path with magic-context, so the namespace stays.

## DeepSeek Harness (DSH) — https://github.com/deepseek-ai/deepseek-harness

MIT License.

DSH is a separate project and is **not** included here; its packages are
consumed as dependencies. The adapter implements the DSH plugin seams
(`@deepseek-ai/cordis`, `@deepseek-ai/dsh-agent`, `-compaction`, `-llm`,
`-session`, `-tools`, and the client/session services). It is written against
DSH **0.2.1-rc.1** — checkout `1600d8a1e`, published on npm under the
coordinated dist-tag `next`.

Note that npm's `latest` tag on those packages is an *older* release line
(`0.0.1-rc.x` / `0.1.0-rc.6`); the pinned `devDependencies` are what the suite
is tested against. Individual `@deepseek-ai` packages are BSD-3-Clause rather
than MIT where their own metadata says so; that is their licence, not this
repository's.

## Vendored file: `tests/helpers/mock-adapter.ts`

MIT License, Copyright (c) 2026 DeepSeek.

Taken verbatim from DSH (`packages/core/agent-loop/tests/mock-adapter.ts`,
MIT) so that this repository's suite runs without a DSH checkout. The body is
byte-identical to upstream; only a provenance header was added.

## Vendored files: `vendor/onnx/` — onnxruntime-web (WASM backend subset)

MIT License, Copyright (c) Microsoft Corporation.

Three files taken verbatim from `onnxruntime-web`
**1.31.0-dev.20260914-8d85527a0** (`dist/ort.node.min.mjs`,
`dist/ort-wasm-simd-threaded.mjs`, `dist/ort-wasm-simd-threaded.wasm`)
so the local embedding lane runs on WebAssembly without the ~287 MB native
`onnxruntime-node` package. Verified against the native fp32 pipeline at
cosine 1.0000000 (2026-10-09). The upstream MIT license text travels with them
at `vendor/onnx/LICENSE`. The tokenizers binding (`@huggingface/tokenizers`,
Apache-2.0) is consumed as a normal npm dependency, not vendored.

## Everything else

No other third-party code is bundled. The build output (`lib/`) is compiled
from this repository's own `src/`, and the browser half is hand-written here;
`scripts/copy-client.mjs` copies it verbatim.
