Repository Public
1<!--2ORIX Docs3File: Packages/ORIXDocsAI/Vendor/README.md4Description: Provenance and rules of the ORIX Astra code vendored into the AI package of ORIX Docs.5Author: Simon-Pierre Boucher6Contact: contact@spboucher.ai7-->8# Vendored ORIX Astra modules910Everything in this folder except this file and `patches/` is a copy of files from **ORIX Astra**11(`https://git.spboucher.ai/orix-astra`, local checkout `~/Desktop/Cluster/apple/ORIXAstra`), the iPhone app by the same12author. The copied revision is the commit hash in `ASTRA_REVISION`.1314| Here | In the ORIX Astra repository |15|---|---|16| `Packages/AstraCore/Sources`, `Packages/AstraProviders/Sources`, `Packages/AstraAgents/Sources`, `Packages/AstraLocal/Sources` | same paths |17| `Tests/AstraCoreTests`, `Tests/AstraProvidersTests`, `Tests/AstraAgentsTests`, `Tests/AstraLocalTests` | same paths |18| `Tests/AstraLocalFixtures` | same path (recorded Hugging Face responses and the build 2 catalogue, read by `AstraLocalTests` from the source tree) |19| `docs/catalog` | same path (`catalog.json`, the model catalogue also served at `https://www.orixlab.dev/astra/models/v1/catalog.json`, and its baseline) |20| `Packages/AstraUI/Sources/Resources/catalog.json` | same path: the catalogue file the Astra app bundles, read by one `AstraLocalTests` test. No other part of AstraUI is vendored. |21| `LICENSE` | `LICENSE` |2223The paths are kept identical on purpose: the vendored tests locate their fixtures relative to their own file24(`Vendor/` plays the role of the Astra repository root).2526## Rules27281. **Never edit a vendored file.** ORIX Astra is the reference for provider behaviour. A fix belongs in ORIX Astra, then29 comes here through a sync.302. **macOS or ORIX Docs adaptations go in our own targets** (`Sources/DocAI`, `Sources/DocLocalModels`), which depend on31 the vendored modules: another Keychain service, another storage folder, an editor-aware memory policy, a router.323. If a vendored file genuinely cannot compile or behave correctly on macOS, the smallest possible change is recorded as33 `patches/NNNN-what-and-why.patch` (a `diff -u` with paths relative to this folder, `-p1`). `Scripts/sync-astra.sh`34 applies the patches after every copy and refuses to continue when one no longer applies. A silent edit is a defect.35 **There is no patch at the moment**: see `docs/v2/AI_PROVIDERS.md` for the test results of the unchanged modules on macOS.364. `Sources/DocLocalModels/Resources/catalog.json` is a byte-for-byte copy of `docs/catalog/catalog.json`, refreshed by the37 sync script and checked by a unit test.3839## Refreshing4041```sh42Scripts/sync-astra.sh # ../ORIXAstra at its HEAD43Scripts/sync-astra.sh <checkout> <rev> # any committed revision44Scripts/sync-astra.sh --check # verify that Vendor/ is exactly ASTRA_REVISION + patches; writes nothing45```4647The script reads the checkout with `git archive` (committed content only; work in progress there never leaks in, and the48checkout is not modified), rewrites `ASTRA_REVISION`, and prints which files changed. Then run the tests49(`docs/v2/AI_PROVIDERS.md`, section "Tests") and commit.5051## Licence5253ORIX Astra and ORIX Docs have the same author and rights holder (Simon-Pierre Boucher). `LICENSE` is ORIX Astra's licence54file, copied with the code; it also lists the third-party components the modules link (MLX Swift, MLX Swift LM,55swift-transformers, swift-jinja, each under its own licence). The vendored files keep their original ORIX Astra headers.56