This commit is contained in:
+44
-5
@@ -96,10 +96,32 @@ Environment variables:
|
||||
KANBANTE_ZOMBIE_DAYS Days without any activity after
|
||||
which an open card is a "zombie"
|
||||
on /health (issue #9). Default 30.
|
||||
AGENT_URL Base URL of the agent service
|
||||
(panneau Spark + console). Default
|
||||
(official/prod name)
|
||||
https://agent.dracodev.net — the dev
|
||||
environment declares its ``-dev`` name
|
||||
here (e.g. https://agent-dev.dracodev.net).
|
||||
AGENT_EVENEMENTS_URL Journal endpoint of the agent
|
||||
service (Lot 2, contract ACC-0.2)
|
||||
receiving this app's signed events.
|
||||
Default https://agent.dracodev.net/api/v1/evenements.
|
||||
Default: derived from AGENT_URL
|
||||
(``<AGENT_URL>/api/v1/evenements``).
|
||||
KANBANTE_PUBLIC_URL This app's own public base URL
|
||||
(barre commune self-link, SSO
|
||||
``return_to``). Default (official)
|
||||
https://kanbante.dracodev.net.
|
||||
DRACO_FLOWDECK_URL Public base URL of Flowdeck for the
|
||||
common app bar. Default (official)
|
||||
https://flowdeck.dracodev.net.
|
||||
DRACO_TIKTAK_URL Public base URL of TikTak for the
|
||||
common app bar. Default (official)
|
||||
https://tiktak.dracodev.net.
|
||||
ObsiGate's bar link reuses DRACO_SSO_URL
|
||||
(the SSO emitter IS ObsiGate).
|
||||
No public dracodev name is hard-coded
|
||||
outside these defaults: dev/prod differ
|
||||
only by environment, never by code.
|
||||
AGENT_EVENEMENTS_CLE Kanbante's own HMAC key signing the
|
||||
events it emits to that journal (the
|
||||
service knows it as the "kanbante"
|
||||
@@ -113,7 +135,7 @@ from pathlib import Path
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
APP_VERSION = "0.31.1"
|
||||
APP_VERSION = "0.32.0"
|
||||
|
||||
|
||||
def _env_bool(name: str, default: bool) -> bool:
|
||||
@@ -188,6 +210,10 @@ class Settings:
|
||||
draco_secret_prev: str = ""
|
||||
sso_machine_key: str = ""
|
||||
sso_url: str = "https://og.dracodev.net"
|
||||
public_url: str = "https://kanbante.dracodev.net"
|
||||
flowdeck_url: str = "https://flowdeck.dracodev.net"
|
||||
tiktak_url: str = "https://tiktak.dracodev.net"
|
||||
agent_url: str = "https://agent.dracodev.net"
|
||||
archive_suggest_days: int = 180
|
||||
agent_evenements_url: str = "https://agent.dracodev.net/api/v1/evenements"
|
||||
agent_evenements_cle: str = ""
|
||||
@@ -205,6 +231,9 @@ def get_settings() -> Settings:
|
||||
|
||||
def _env_settings() -> Settings:
|
||||
"""Build settings from the current environment only."""
|
||||
agent_url = os.getenv(
|
||||
"AGENT_URL", "https://agent.dracodev.net"
|
||||
).rstrip("/")
|
||||
return Settings(
|
||||
gitea_url=os.getenv("GITEA_URL", "https://git.dracodev.net").rstrip("/"),
|
||||
gitea_token=os.getenv("GITEA_TOKEN", ""),
|
||||
@@ -248,10 +277,20 @@ def _env_settings() -> Settings:
|
||||
draco_secret_prev=os.getenv("DRACO_SESSION_SECRET_PREV", ""),
|
||||
sso_machine_key=os.getenv("DRACO_SSO_MACHINE_KEY", ""),
|
||||
sso_url=os.getenv("DRACO_SSO_URL", "https://og.dracodev.net").rstrip("/"),
|
||||
public_url=os.getenv(
|
||||
"KANBANTE_PUBLIC_URL", "https://kanbante.dracodev.net"
|
||||
).rstrip("/"),
|
||||
flowdeck_url=os.getenv(
|
||||
"DRACO_FLOWDECK_URL", "https://flowdeck.dracodev.net"
|
||||
).rstrip("/"),
|
||||
tiktak_url=os.getenv(
|
||||
"DRACO_TIKTAK_URL", "https://tiktak.dracodev.net"
|
||||
).rstrip("/"),
|
||||
agent_url=agent_url,
|
||||
archive_suggest_days=_env_int("KANBANTE_ARCHIVE_SUGGEST_DAYS", 180),
|
||||
agent_evenements_url=os.getenv(
|
||||
"AGENT_EVENEMENTS_URL",
|
||||
"https://agent.dracodev.net/api/v1/evenements",
|
||||
agent_evenements_url=(
|
||||
os.getenv("AGENT_EVENEMENTS_URL")
|
||||
or f"{agent_url}/api/v1/evenements"
|
||||
).rstrip("/"),
|
||||
agent_evenements_cle=os.getenv("AGENT_EVENEMENTS_CLE", ""),
|
||||
)
|
||||
|
||||
+3
-1
@@ -17,6 +17,8 @@ import logging
|
||||
|
||||
import httpx
|
||||
|
||||
from app.config import APP_VERSION
|
||||
|
||||
logger = logging.getLogger("kanbante.digest")
|
||||
|
||||
MCP_PROTOCOL_VERSION = "2024-11-05"
|
||||
@@ -143,7 +145,7 @@ async def _mcp_session(client: httpx.AsyncClient, url: str, token: str) -> None:
|
||||
{
|
||||
"protocolVersion": MCP_PROTOCOL_VERSION,
|
||||
"capabilities": {},
|
||||
"clientInfo": {"name": "kanbante", "version": "0.31.1"},
|
||||
"clientInfo": {"name": "kanbante", "version": APP_VERSION},
|
||||
},
|
||||
req_id=1,
|
||||
)
|
||||
|
||||
+20
@@ -2145,6 +2145,26 @@ def render(
|
||||
token = secrets.token_urlsafe(32)
|
||||
context.setdefault("csrf_token", token)
|
||||
context.setdefault("version", APP_VERSION)
|
||||
# Noms publics dracodev par configuration (dev/prod, 0.32.0) :
|
||||
# aucun nom public n'est codé en dur dans les gabarits ni dans le
|
||||
# JS statique — tout vient de app.config (défauts = noms
|
||||
# officiels/prod ; la dev déclare ses noms en ``-dev`` par .env).
|
||||
_pub = get_settings()
|
||||
context.setdefault(
|
||||
"draco_urls",
|
||||
{
|
||||
"obsigate": _pub.sso_url,
|
||||
"flowdeck": _pub.flowdeck_url,
|
||||
"tiktak": _pub.tiktak_url,
|
||||
"kanbante": _pub.public_url,
|
||||
},
|
||||
)
|
||||
context.setdefault("agent_url", _pub.agent_url)
|
||||
context.setdefault(
|
||||
"sso_authorize_url",
|
||||
f"{_pub.sso_url}/sso/authorize?return_to="
|
||||
f"{quote(_pub.public_url + '/auth/draco', safe='')}",
|
||||
)
|
||||
# Fusion ACC-1 : initiale de l'opérateur pour la barre d'apps commune.
|
||||
context.setdefault(
|
||||
"draco_avatar", (get_settings().auth_user or "K")[:1].upper()
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{# Barre d'apps commune dracodev — Fusion ACC-1 (issue kanbante#28).
|
||||
Snippet FIGÉ vendangé depuis Projets/dracodev-commons v0.1.4
|
||||
(ui/barre-apps/) : ne pas modifier la structure ici ; toute évolution
|
||||
passe par une nouvelle version de commons.
|
||||
Snippet vendangé depuis Projets/dracodev-commons v0.1.4
|
||||
(ui/barre-apps/) : structure inchangée ; seule adaptation locale
|
||||
(0.32.0, dev/prod) = les URL des apps et l'adresse du service
|
||||
d'agents sont INJECTÉES par l'hôte depuis app.config
|
||||
(draco_urls / agent_url, défauts = noms officiels) — aucun nom
|
||||
public codé en dur dans ce gabarit ni dans draco-panneau.js.
|
||||
CSS/JS : /static/css/draco-barre.css, /static/js/draco-barre.js.
|
||||
Inclus par _header.html (toutes les pages applicatives ; ni le
|
||||
wallboard ni l'écran de connexion, volontaires). #}
|
||||
@@ -15,20 +18,20 @@
|
||||
<span class="draco-brand-mark">✦</span><span class="draco-brand-name">dracodev</span>
|
||||
</a>
|
||||
<nav class="draco-apptabs" aria-label="Applications">
|
||||
<a class="draco-apptab" data-app="obsigate" href="https://og.dracodev.net/">
|
||||
<a class="draco-apptab" data-app="obsigate" href="{{ draco_urls.obsigate }}/">
|
||||
<span class="draco-apptab-ico" style="--app:#7a5af5">▤</span>
|
||||
<span class="draco-apptab-txt"><strong>ObsiGate</strong><small>Notes</small></span>
|
||||
</a>
|
||||
<a class="draco-apptab" data-app="flowdeck" href="https://flowdeck.dracodev.net/">
|
||||
<a class="draco-apptab" data-app="flowdeck" href="{{ draco_urls.flowdeck }}/">
|
||||
<span class="draco-apptab-ico" style="--app:#2f6fed">▦</span>
|
||||
<span class="draco-apptab-txt"><strong>Flowdeck</strong><small>Projets</small></span>
|
||||
</a>
|
||||
<a class="draco-apptab" data-app="tiktak" href="https://tiktak.dracodev.net/">
|
||||
<a class="draco-apptab" data-app="tiktak" href="{{ draco_urls.tiktak }}/">
|
||||
<span class="draco-apptab-ico" style="--app:#e8762c">✓</span>
|
||||
<span class="draco-apptab-txt"><strong>TikTak</strong><small>Tâches</small></span>
|
||||
<span class="draco-badge" data-badge="tiktak" hidden>0</span>
|
||||
</a>
|
||||
<a class="draco-apptab" data-app="kanbante" href="https://kanbante.dracodev.net/">
|
||||
<a class="draco-apptab" data-app="kanbante" href="{{ draco_urls.kanbante }}/">
|
||||
<span class="draco-apptab-ico" style="--app:#0d9488">▥</span>
|
||||
<span class="draco-apptab-txt"><strong>Kanbante</strong><small>Kanban</small></span>
|
||||
<span class="draco-badge" data-badge="kanbante" hidden>0</span>
|
||||
@@ -101,4 +104,5 @@
|
||||
};
|
||||
</script>
|
||||
<script defer src="/static/js/draco-barre.js?v={{ version }}"></script>
|
||||
<script>window.DRACO_PANNEAU_CONFIG = { api: "{{ agent_url }}" };</script>
|
||||
<script defer src="/static/js/draco-panneau.js?v={{ version }}"></script>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</label>
|
||||
<button type="submit" class="login-submit">Se connecter</button>
|
||||
</form>
|
||||
<a class="login-sso" href="https://og.dracodev.net/sso/authorize?return_to=https%3A%2F%2Fkanbante.dracodev.net%2Fauth%2Fdraco">🧭 Se connecter avec ObsiGate (SSO)</a>
|
||||
<a class="login-sso" href="{{ sso_authorize_url }}">🧭 Se connecter avec ObsiGate (SSO)</a>
|
||||
<p class="login-foot">Accès restreint — session de {{ 7 }} jours, déconnexion depuis le menu latéral.</p>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user