{#- SPDX-License-Identifier: Apache-2.0 -#} {#- The machinery behind the stages: mail providers, language-model backends, vector stores and caches. Each tab loads only its own plugins. -#} {% extends "_base.html" %} {% import "_macros.html" as m with context %} {% import "_plugins.html" as pl with context %} {% block title %}Pipeline ยท Oaken Mail{% endblock %} {% macro sieve_tab() %} {% set back = "/pipeline?tab=sieve" %} {% set listed = sieve.list %} {% set opened = sieve.open %}
Sieve scripts {% if listed.enabled %}on: they run on each message before it is indexed{% else %}off: [mail.sieve] enabled is false, so none of these run{% endif %}
{% if listed.scripts %}
{% for s in listed.scripts %} {% endfor %}
ScriptFingerprintEditRemove
{{ s.name }}{{ s.sha256[:12] }} Edit {{ m.confirm("sieve-delete", back, "Remove " ~ s.name, "Remove script " ~ s.name ~ "?", "Remove", {"script": s.name}, "trash") }}
{% else %}

No scripts yet. Write one below.

{% endif %}
They are plain .sieve files in {{ listed.directory }}, run in name order.
{% if listed.problems %}
Skippedthese did not load, and do not run
{% endif %}
{% if opened %}Edit {{ opened.name }}{% else %}New script{% endif %} {% if opened %}New script{% endif %}
{{ m.guard(back) }}
Save compiles it first and refuses one that does not.
{% endmacro %} {% block main %}

Pipeline

{% set tabs = [("provider","Providers"),("sieve","Sieve"),("llm_backend","LLM backends"),("vector_store","Vector stores"),("cache_store","Caches")] %}
{% if tab == "sieve" %}{{ sieve_tab() }}{% endif %} {% for key, label in tabs %}{% if tab == key and key != "sieve" %}{{ pl.kind_pane(key, label, none, "/pipeline") }} {% if key == "llm_backend" %}{{ pl.usage_card(usage_rows, "/pipeline?tab=llm_backend", "Other model usage (ask, routing and the rest)", true, false) }}{% endif %}{% endif %}{% endfor %}
{{ pl.dialogs("/pipeline?tab=" ~ tab) }} {% if tab == "provider" %}{{ pl.schedule_dialogs("/pipeline?tab=provider") }}{% endif %} {% endblock %}