passageway-connector-trilium
A passageway connector for Trilium Notes: every text and code note of a Trilium server, read through its ETAPI with GET requests only. It is the trilium-recall sync as a connector, so an LLM wiki kept the trilium-llm-wiki way is understood, and any other Trilium works too.
What it does
- Each note is one item. Its id is the note id, its version changes with the content, the title, the attributes or the place in the tree, and its link opens the note in Trilium.
- Headings become sections:
<h2>and<h3>split a note into passages with their heading trail (Setup › Linux); lists, tables and code blocks are kept readable; a code note is split at blank lines. Long sections are cut at about 350 tokens. - Areas give weight. The owned
#llmWikiPartnotes mark the areas:wikiandschemaweigh 1.0,sources0.8, the journal (#calendarRoot) 0.6, everything else 0.6;locks,templatesandviewsare plumbing and are left out, as are archived notes. - Wiki labels become labels:
area:wiki,type:<wikiType>,topic:<wikiTopic>,status:<wikiStatus>. - Relations and links become related items:
internalLink,relatesToandwikiSourcerelations the note owns, and the links in its text, point at other indexed notes; a source note links back to the summaries that cite it. - The path is the titles of the ancestors below the area root, nearest last, so a hit says where in the tree the note is.
- Edits to a note's content appear within a minute:
changedasks Trilium for the notes modified since the last poll, one small request when nothing changed. Trilium does not count an attribute or a move as a modification, so label changes, moves, renamed ancestors, deletions and archiving are settled at the next reconcile (every 30 minutes by default). - Cost:
listand eachfetchbatch read every note's metadata (one search per area root), because areas, paths and links need the whole tree; a Trilium with thousands of notes makes a full build take minutes. The content of a note is fetched once per version.
Configure
Create an ETAPI token in Trilium under Options › ETAPI. Trilium's tokens can write, so keep it a secret reference; the connector only ever sends GET requests.
[[connector]]
name = "notes"
command = ["/path/to/python", "-m", "passageway_connector_trilium"]
env = { URL = "http://trilium:8080", WEB_URL = "https://notes.example.org" }
secrets = { TOKEN = "env:TRILIUM_TOKEN" }
| Setting | Default | Meaning |
|---|---|---|
URL |
required | The Trilium server as the connector reaches it (/etapi is added) |
TOKEN |
required | An ETAPI token, as a secret reference such as env:TRILIUM_TOKEN |
WEB_URL |
URL |
The address links are made with, when readers reach Trilium under another name than the connector does |
TIMEOUT |
30 |
Seconds per request |
MAX_NOTE_BYTES |
1048576 |
A note whose content is larger is skipped with a warning at fetch (the core accepts 4 MiB per item line); it stays listed, so it is tried again at each reconcile |
Not carried over from trilium-recall
trilium-recall showed a note's summary in place of its source when the summary matched almost as well. The core knows no source, so that rule has no place in it; here a summary and its source are items that link each other, and a hit shows the other as a related item. The connector's parity with trilium-recall is measured on trilium-recall's public fixture, a synthetic wiki with 17 questions served by the in-test ETAPI with the real model: hit@3 0.92 and silence 1.0 against trilium-recall's published 0.83 and 1.0 (PASSAGEWAY_LIVE=1 uv run pytest connectors/trilium/tests/test_trilium_parity.py -s). A check against a live Trilium and trilium-recall's private question set is still to be done by its owner.
Test
uv run pytest connectors/trilium # offline, against an in-test ETAPI with the fixture wiki
PASSAGEWAY_LIVE=1 uv run pytest connectors/trilium/tests/test_trilium_parity.py # the fixture cases with the real model
Metadata
Release files for passageway-connector-trilium 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| passageway_connector_trilium-0.3.0.tar.gz | 17.6 kB | Without provenance | Details for passageway_connector_trilium-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| passageway_connector_trilium-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for passageway_connector_trilium-0.3.0-py3-none-any.whl |
Total release size: 27.3 kB
Release files / passageway_connector_trilium-0.3.0.tar.gz
| Download URL | passageway_connector_trilium-0.3.0.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80c2b7ad8516009279f0cebe77652d7b4546cb3e408d82d7e7a65969233dc192
|
|
BLAKE2b-256 checksum How to use checksums |
2aec41c245e357b9c060e0e49f98a8fa125b660a916474602ebfac5a744c53b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / passageway_connector_trilium-0.3.0-py3-none-any.whl
| Download URL | passageway_connector_trilium-0.3.0-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41a26458015b7f4b0f0bcb65bd6b76850603c87fe3d1bbc6ca094da2e518986b
|
|
BLAKE2b-256 checksum How to use checksums |
8e09da80d03a3f90e3b5320305e673eab5441124153625f2541e2f818d3393b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for passageway-connector-trilium 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.