Changelog
Week 46 (2026)
Security fixes from the November review
- Rendered Markdown can no longer run script (stored XSS). Chat
replies, notes and workflow results go through DOMPurify after marked
(
shared/safe-html.js). Mermaid source stays escaped instead of being decoded into live HTML, slash-command buttons insert the escaped text, and the "retry tool call" button no longer carries an inlineonclick. Connector help texts and setup steps are sanitized or escaped too. If DOMPurify is missing the text is shown escaped (fail-closed). - Scripts are served locally. marked 18.2.0, DOMPurify 3.4.17 and
Alpine.js 3.17.5 live in
shared/vendor/with pinned versions instead of unpinned jsDelivr URLs. Only the Tailwind CDN is still external. - Content-Security-Policy and other browser headers. Every response
carries a CSP (scripts only from the gateway and the Tailwind CDN,
network requests only to the gateway and the MCP registry, no plugins,
no foreign framing),
X-Frame-Options,nosniffand a same-origin referrer policy. - DNS-rebinding guard. A gateway without a password now answers only
for known host names: loopback, the bind address, the LAN names it
detects for a
0.0.0.0bind, the hosts inMYCELOS_ALLOWED_ORIGINSand newMYCELOS_ALLOWED_HOSTS(comma-separated,*turns the check off). OtherHostheaders get421. Before, a page on a foreign domain that re-pointed its DNS to 127.0.0.1 could read and change everything. WithMYCELOS_PASSWORDset the check is skipped (the attacker never holds the credentials). The Telegram webhook stays reachable. - Login hardening. A password with umlauts or other non-ASCII
characters no longer crashes the login with a 500 (it is compared as
UTF-8 bytes). After 10 wrong attempts from one address within five
minutes, the login page and Basic Auth answer
429withRetry-After; failed attempts are audited asauth.login_failed. - The SecurityProxy sends a credential only to its own service.
POST /httpwithinject_credentialused to inject any stored key into a request to any public address, so a compromised gateway could have the OpenAI key or the Telegram token sent to its own server. Each credential is now bound to its service's hosts (fixed list for OpenAI, Telegram, Anthropic, GitHub, … over HTTPS) or to the host of its ownapi_base(Ollama, custom OpenAI-compatible servers). Everything else gets403before any outbound request and is logged asproxy.credential_host_denied. - The gateway container no longer sees the master key.
docker-compose.ymlmounted./datainto both containers and the key lived there, so the "isolated" gateway could read it (andmycelos credential exportin the gateway printed every key). The key now lives in./secrets(MYCELOS_SECRETS_DIR), mounted into the proxy container only (MYCELOS_MASTER_KEY_FILE=/secrets/.master_key). Existing installs: re-runninginstall.sh/install.ps1fetches the new compose file and movesdata/.master_keyto the secrets directory (copy, compare, delete); with the new compose file the proxy entrypoint does the same on start. Two different keys → nothing is touched and the proxy refuses to start.mycelos updatealone keeps the old compose file, so the proxy only warns there. The proxy entrypoint also creates the key on first start and hands it to the container user, which fixes the ".master_keynot found" start failure on Docker Desktop. The gateway never reads or creates a key whenMYCELOS_PROXY_URLis set: first-start init and the CLI inside the gateway container store credentials through the proxy,credential listshows no key preview there, andcredential exportpoints to the proxy container.
Week 45 (2026)
Views and approval cards survive a reload; Telegram gets buttons
- Reloading a conversation shows its views again. Timelines, connections, filing previews and approval cards are kept in the session file next to the messages and come back in the same place. The model never sees them when a conversation resumes.
- Cards show where they stand. A reloaded approval card that was already answered stays locked with its outcome ("Moved 1 note(s)."); an expired or foreign card cannot be pressed; an open card still works.
- Approval cards on Telegram. Saving, correcting and attaching show the card with one button per action. A press resolves the same stored proposal as the web chat, only for allowlisted users and only for their own cards, and the message then shows the outcome without buttons. Saving a note on Telegram now shows the "where it went" card too.
Collector leftovers: local sources in the shared source model
- Local sources are part of the config history. Adding, editing, pausing
and resuming a local source is audited (
local_source.*, without the root path) and creates a config generation. Config snapshots now also carry the folder attachments and rules of every source (connectors, local sources, chat), so a rollback restores where each source files. Older snapshots leave these tables untouched. - One API for every source.
/api/sources/{key}acceptslocal:<id>(only for your own local source, refused otherwise) andchatnext to connector ids.GET /api/local-sources/{id}/filingshows a local source's attached folders and rule. - Articles in your language. Source analysis and relation reasons follow the language preference instead of always writing German; the relation prompt is now English like every other prompt.
- Relations versus links documented. The spec states the split between
structural
knowledge_linksand typed evidenceknowledge_relations. - The source card shows where a source files. Each local source card lists its attached folders and its rule, so an attachment approved in the chat is visible in the settings too.
Collector leftovers: German strings through the locale files
- The web UI speaks your language again. The source card, Telegram
settings, MCP connections, collector page, knowledge map, notifications,
settings, help and about pages took hardcoded German from the collector
work. Their strings now live in
en.yamlandde.yaml(about 390 keys underweb.*), andi18n.jssets the page language. t()in the browser takes placeholders.t('key', {count: 3})fills{count}like the Pythont(). Static pages usedata-i18n,data-i18n-ariaanddata-i18n-title.- Server messages of local sources are translated. Errors and status
texts of local sources, source checks, readers, the Obsidian import and the
inbox entries for failed imports use
t("sources.*"); validation messages that go back to the model stay English. Themycelos sourceCLI help is English. - Tests. A test fails on hardcoded German in the converted files and on missing keys in either language; browser tests load the real German translations.
- Not yet converted: the chat page,
<mycelos-view>, the model settings and the provider endpoints (other changes are in flight there), and the step descriptions of the source workflow templates, which are stored with every source.
Capture, attach and correct with approval cards (Package 8, slice 5)
- Saving something in the chat shows where it went. When Mycelos saves a note for you, a card shows the folder (or "Inbox" when the organizer sorts it later) and its confidence, with "Keep it", "File elsewhere" and "Make it a task". "File elsewhere" puts a sentence in the composer, so you just say where.
- Corrections are a card, not a silent move. Saying "that belongs to Müller, not Projects" shows the move before and after. "Move and teach the rule" lists the similar notes from the same folder and source that would move too, moves them and remembers the rule, so the organizer files new notes like it there.
- Attaching a local source asks first. Attaching an Obsidian vault or a folder to a folder shows what, where and the rule, plus an import preview (files and notes, counted without a model). Nothing is attached or imported before you approve; approving attaches it, saves the rule and starts the import.
- One source model. Local sources now use the same folder attachments and
rules as connectors (key
local:<id>): the organizer keeps their notes inside the attached folder, and the source's article root is created there. Rules also apply to sources without attachments, including chat captures. - The buttons work.
<mycelos-view>approval cards in the chat callPOST /api/proposals/{id}/resolve. The card carries only an id; what an action does is stored on the server when the card is built, so a client cannot change a target. Unknown, foreign, expired (7 days) and already answered cards are refused; a failed action leaves the card pressable. Every card and every answer is audited with ids and paths only. - No tool can press a button. The new tools
filing_correctandsource_attachonly build cards; security tests check that building cards changes nothing and that note content cannot add actions.
Questions answered with views (Package 8, slice 4)
- Knowledge questions get a view, not a wall of text. A new chat tool,
knowledge_view, finds the notes for a question and answers with the view that fits: a timeline for "what is open with Müller", connections for "how does A relate to B", a mind map of topics for an overview, counts for "how many", evidence when sources support or contradict each other. With a structure from the model it also shows comparisons and flows, validated against the view schema. - The same question gets the same view. Keyword rules in English and German pick the question type; the model's guess counts only when no rule matches. A view the user names ("als Zeitleiste") wins over the model's preference, and both are accepted only when the view fits the data.
- The switcher works. Every view that fits is built with the answer, so
"Show as" changes between timeline, connections, counts and text at once,
without asking the model again.
/demo viewuses the same mechanism. - The model writes only the lead. It gets the view's text version and sources back, not the view itself, and is told not to repeat it as a list. Telegram and the CLI show the text version.
- Note content stays data. Titles and relation reasons are shown, never followed; system views (approval card, filing change) can never be chosen for an answer. Security tests cover injected note titles, smuggled fields and system-view hints.
- Connections put the hub in the middle. Graph nodes are ranked by their links with topics first on ties, and the renderer keeps that order for ties instead of sorting by path.
Knowledge views in the web chat (Package 8, slice 2)
- Answers can now be shown as views, not just text. A new
<mycelos-view>web component renders all nine catalog views: timeline, mind map, graph slice, comparison, flow, counts, evidence, filing change and approval card. Each view shows its title, the reason it was chosen, its sources as chips and a switcher to the other valid views; "Text" always shows the deterministic text fallback. - Works offline. Mind maps and flows are drawn with the Mermaid copy
served from
/shared; the component loads it itself when a page has not. No view needs a CDN. - Note content stays data. Every text field is escaped, Mermaid labels
are built from entity-encoded text and rendered with
securityLevel: strict. A browser test checks that markup and Mermaid directives inside note content are shown as text and never run. - Try it with
/demo view. It sends one sample of every view to the chat. Widget events with a catalog type render through the new component. - Labels are translated (
web.views.*in English and German).
Tests no longer hang CI
- SecurityProxy children are stopped after each test. With
MYCELOS_MASTER_KEYset, as in CI, every test that built a gateway forked a SecurityProxy child that was never stopped. A full run kept about 200 of them alive until the runner ran out of memory, and the Tests workflow onmainhung until GitHub cancelled it after six hours. A test fixture now stops every proxy a test started. - Browser tests run last. pytest grouped the Playwright tests near the start of the run, and the event loop that Playwright keeps running made every later async test fail. They now run after all other tests.
- Schema comments moved above the last
knowledge_notescolumn. The SQLite on the CI runners could not dropplacement_confidence(the migration test does) while comments followed it, and failed with "incomplete input".
Daily briefing as views (generative UI, slice 3)
- The briefing carries catalog views. Next to the markdown it now
returns a lead text and validated views from the knowledge view catalog:
countsfor what arrived per source since the last briefing (gmail, yt-summary, local sources, quick capture, ...),evidencefor new contradicting relations between notes, and agraph_slicefor one older note rediscovered through something that arrived today. A fact group without data gives no view; data that does not validate is dropped, never shown half-built. - Cards that need you are live.
needs_youis read from the unified inbox on every request instead of being cached with the day's briefing, so its number always equalsGET /api/inbox/countand every card keeps its own resolve actions. - Since the last briefing. Arrivals and contradictions are counted from when the previous briefing was built (at most seven days back), not from a fixed 24 hours.
- Rediscovered notes do not repeat. A rediscovered note must be at least 30 days old and untouched, and the same note is not resurfaced again within 30 days.
- First message of the day.
GET /api/briefing/first-messagesays whether the web chat should open with the briefing today;POST /api/briefing/first-message/shownrecords it (audited). Reading is side-effect free, so a reload before the client confirms still shows it. - Telegram gets the new facts as text: arrivals per source, new
contradictions and the rediscovered note. All new strings go through
t()in English and German. - Security test: imported note titles, provenance labels and relation reasons cannot change the view types or add actions.
- The web chat opens the day with the briefing. On the first visit of
the day the chat shows the lead text, the arrivals view, the cards that
need you (with their Done / Snooze / Accept / Retry actions working in
place) and the contradiction and rediscovery views, then confirms it as
shown. The inbox page and the briefing cards share one resolve path
(
window.MycelosInbox.resolveininbox.js).
Documentation archive from agentpark
- Original planning docs preserved. The design specs, implementation
plans, reviews and framework comparisons that existed only in the old
agentparkrepository now live indocs/archive/agentpark/, with a README explaining what they are. This lets the old repository be archived or deleted without losing the project's design history.
Week 33 (2026)
Every routine run leaves a record
A sync that stopped running used to be invisible: source syncs wrote nothing durable, so a dead connector looked exactly like a quiet one. Runs of all four kinds — workflows, scheduled tasks, the briefing and source syncs — now write to one table, and a run that ends for any reason says so.
- Failed source syncs reach the inbox. A failed sync becomes a
consequence entry naming the source and the cause.
POST /api/inbox/runs/{source}/retryruns it again from there, and the entry disappears when a run succeeds — nothing has to be dismissed. A retry that fails again reports the failure and keeps the entry. A source that keeps failing stays one entry with a failure count rather than one per tick. - Failures are recorded honestly. A crash used to leave a run marked "running" forever, relabelled after a restart as though the gateway had been restarted under it. Real causes are now recorded when they happen.
- A run whose outcome is genuinely unknown says that. A row still marked "running" when the system next starts cannot be told apart from a crash, a kill or a redeploy, so it is reported as an unknown outcome rather than a guess. That sweep runs once at startup and not on a timer: until the next restart, a crashed run stays "running" and shows nothing.
- Causes carry no content. The stored cause names what failed and why — never a traceback, a file path, or the data that failed to parse. It is chosen from a fixed set by failure mode; a connector's own error text and an exception's message never reach the column, the inbox or an audit event.
workflow_events, a table with no writer and no reader, is removed.
Only source syncs produce an inbox entry. A failing briefing does not. It retries every five minutes — about 288 times a day — and none of those failures creates an entry or an audit event, so a briefing that stops being delivered is still only visible in the run table and the server log. This is deliberate for now: a briefing clears itself daily, so an entry would appear and vanish on its own, and there is no retry route to offer. It is a real gap and it is open. Failing workflows and scheduled tasks likewise write run rows but no entry; they have their own surfaces.
Not in this release: the Routines interface, run-now and pause over HTTP, per-source schedules, and cost accounting. Source syncs still share one global switch and a fixed hourly cadence.
The inbox only holds what needs you
A 499-note import used to put roughly 150 placement suggestions into the inbox — a list nobody reads, which makes the count meaningless and hides the entries that mattered. The inbox now distinguishes three classes by one question: what happens if you ignore this forever?
- Uncertain placements are filed, not queued. A note classified below
the silent-apply floor lands in the proposed folder immediately and is
marked with its confidence. It is searchable and linked at once; the
marker makes the shaky ones reviewable as a set under
GET /api/inbox/placements, shakiest first. Reviewing is an opportunity, not a debt. - The inbox keeps decisions with consequences — merges (destructive), new main categories (structural), unclassifiable notes and scope violations — plus your own obligations: due reminders and overdue tasks. Failed source runs were a planned kind here, waiting for something to record a run; "Every routine run leaves a record" below builds it, so the entry is real.
- Every entry has a working exit. A note the organizer gave up on
goes back into its queue with
POST /api/inbox/notes/{path}/retry— after you file it yourself, or after a provider outage. Nothing has to be archived to clear the count. - The count means something again. It covers only those two classes, so a 3 means exactly three things want a human.
- The scope boundary is unchanged. A note from a scoped source is still only ever filed inside its permitted subtrees, uncertain or not; an out-of-scope answer is still rejected deterministically.
- A rejected out-of-scope answer is its own entry kind. It used to be
stored as a
move, which forced the inbox to guess from the payload whether a row was an optimization or a rejection. It is now written asscope_violation, selected by kind, and excluded from accept-all. Legacymoverows in existing databases are inert: the policy filters them out of the inbox and they carry noplacement_confidence, so they appear in neither view. Their disposition is deferred — deciding it needs aDRY_RUN=yescount first.
Sources attach to folders and carry a rule
A source (Gmail, yt-summary, …) now attaches to one or more folders and carries one free-text rule describing what belongs where — configured once, in the user's own words, at the place the source feeds.
- Attachments open subtrees. A source attached to
Vorfinamay file intoVorfinaand anything beneath it — never above it, never into a sibling branch. Attaching at root means "anywhere", the right meaning for a mixed inbox. - The constraint is enforced deterministically. The organizer is prompted with the permitted topics only, and its answer is validated against them: a path outside the permitted set is rejected, the note falls back to the attachment folder, and an inbox entry is created. Prompt scoping alone would be a probabilistic boundary, which is no boundary at all.
- New main categories need confirmation. A new folder directly under an attachment always goes to the inbox, whatever the confidence — opening a category is the user's decision. Folders deeper than an attachment are fine-sorting inside an already-accepted category and are created on confidence alone.
- The rule is an instruction, content is data. The rule sits in a
<user-rule>block before the note sections, and the classifier is told explicitly that only that block is an instruction — imported mail cannot redirect its own filing.
Week 32 (2026)
Hybrid search (FTS5 + vector + RRF)
search()andfind_relevant()now fuse full-text (BM25) and vector KNN results via Reciprocal Rank Fusion (K=60) instead of using one signal or falling back — keyword-only and semantic-only matches both surface, ranked sanely. Without an embedding provider, behavior is unchanged (FTS with LIKE fallback).- The FTS index is diacritics-insensitive (
remove_diacritics 2): "ernahrung" finds "Ernährung". Outdated indexes are detected via their stored DDL and rebuilt automatically at startup from the note files. - Duplicate detection deliberately remains vector-only (fail-closed June decision) — now pinned by a regression test.
Organizer auto-accept is fail-closed (P0 residuals)
Closed the remaining gaps from the June claims audit:
- Confidence floor for unattended acceptance. Stale (>24h) pending suggestions are only auto-applied at confidence >= 0.95; below that they stay in the inbox for the user. Merges remain excluded entirely.
- Acceptance now means success. The background auto-accept, the
single-accept API, and accept-all no longer mark suggestions
"accepted" when the underlying action failed — failures stay pending
(API) or flip to a
failedstatus and re-enter classification (background), with anorganizer.auto_accept_failedaudit event. - Accept-all never touches merges. The blanket
accept_all_pending()safety net silently marked merge suggestions accepted without executing them; accept-all now reportsskipped_mergesand leaves them pending for individual confirmation. - Merges are traceable. A successful merge records a
merged_fromedge (primary -> secondary) in the link graph before archiving the secondary note, so it stays visible and restorable during the 30-day tombstone window.
Local embeddings are the reliable default
- Provider selection is deterministic and fail-closed. Previously any proxy client counted as an OpenAI key, so a setup without an OpenAI credential still selected the OpenAI provider and every embedding call silently returned nothing — semantic search was dead without a single error. Selection now asks for a real credential and degrades openai → local → none, with EU mode never reaching a US provider.
- Multilingual model. Local embeddings use
intfloat/multilingual-e5-smallwith correct E5 role prefixes (query:/passage:) instead of the English-centric MiniLM — noticeably better recall on German notes. - No implicit downloads. The model is installed explicitly via
mycelos embeddings setup; a missing model degrades to FTS-only search instead of pulling ~120 MB inside a request.mycelos embeddings statusandmycelos doctorreport provider, model, and backfill state. - Automatic re-embedding. Changing provider, model, or dimension now rebuilds every note's vector instead of leaving the vector index silently empty.
Week 33 (2026)
yt-summary flows into the brain
Mycelos now syncs summaries from yt-summary through its export_since
MCP tool — the first external tool feeding the knowledge base
continuously.
- Incremental and idempotent. Sync resumes from a high-water mark, pages through changes, and keys on the item id: re-running never duplicates, and a summary updated in yt-summary (resummarize, new highlights) updates the existing note in place — topic placement, links and organizer state survive.
- Fail closed. An error writes nothing and does not advance the high-water mark; re-fetching beats skipping.
- Scheduled for free. The source registers in the existing ingest registry, so the generic API route and the auto-ingest scheduler pick it up without new wiring. Attach the source to a folder to scope where its notes may land.
- Truncation is observable. A sync that reaches the page cap reports
truncatedin its result and audit entry rather than looking like a completed run — so if a run stops at the limit, the user knows to check back and re-run. - Timestamps are validated and clock-skew clamped. An unparseable or
missing item timestamp is now rejected (
skipped_malformed) instead of being compared as a raw string — previously one garbage or far-future value could permanently poison the high-water mark and silently stop the sync. A candidate mark is also capped at consumer-now plus a one-hour tolerance for the producer's clock skew; the affected item still imports, only the mark stops advancing. - A failed content write no longer advances provenance. If the note
file behind an update went missing, the sync used to rewrite the
stored timestamp anyway, making the item look up-to-date forever. It
now leaves the old timestamp in place and counts
failed_updates, so the item is retried on the next run. - A malformed item no longer aborts the whole sync. A non-mapping
item or a non-list
tagsfield used to raise past the loop's error handling and block every future run on the same poisoned item; both are now handled defensively (skipped_malformed/ tags coerced to[]).
Week 25 (2026) — OKF export (proof-of-concept)
Export the knowledge tree as a conformant Open Knowledge Format (OKF v0.1) bundle. OKF is a boundary format: the internal Note + SQLite index stay authoritative — only the serializer at the boundary knows about OKF, so a spec bump touches one file.
- New serializer
mycelos/knowledge/okf_export.py. Maps each note to OKF frontmatter (requiredtype, plus additivedescription,timestamp,resourcealiases) while preserving Mycelos-specific keys so the bundle can round-trip back. The OKF directory layout reflects topic membership (parent_path), not the internal file path, and synthesizes a navigationindex.mdat the bundle root and per topic directory. - CLI:
mycelos knowledge export --okf <dir>writes the bundle to a directory (--forceto overwrite a non-empty target). - API:
GET /api/knowledge/export?format=okfstreams the bundle as a.zipdownload. Non-archived notes only; unknown format → 422. - Export is read-only — no config generation — but logs a
knowledge.exportaudit event for provenance.
Scope (PoC): export only (import is a later extension), text notes only (no
binary document blobs), no log.md synthesis.
Week 24 (2026) — doctor catches dead Telegram polling
mycelos doctor now detects the exact failure mode that was hard to
diagnose by hand: Telegram sends (the daily briefing arrives) but
receives nothing, because the proxy credential bootstrap window
closed before the bot token was materialized, so the inbound polling
thread never started.
check_telegramreads theproxy.materialize_denied/reason=window_closedaudit event (only since the latestgateway.started, so a stale failure from an earlier boot doesn't flag a now-healthy channel) and reports a warning explaining that outbound works but inbound is down, plus the fix.mycelos doctor --fixprints the restart command and theMYCELOS_BOOTSTRAP_WINDOWknob for slow hosts.- Documented in the Raspberry Pi setup guide's troubleshooting section.
Week 24 (2026) — UX review: density & clarity
Three information-density improvements from the UX review:
- Organizer Inbox is unobtrusive when collapsed. Its action buttons (Accept all / Run now / Find duplicates) only appear when the bar is expanded; collapsed it's just a compact "N suggestions" badge, so it no longer pushes the knowledge view down.
- Agent Status panel: no more wall of zeros. Before the first message, the four zero-value metric cards (0 tokens, $0.0000, 0 messages, model) are replaced by a single quiet "metrics appear once you start chatting" line; the full metrics show up once the session has activity.
- Topics vs notes are visually distinct in the "All" view: topics get a folder glyph, a tertiary tint, and bold text so folders read as containers, not as notes mixed into the list.
Week 24 (2026) — mobile chat input fix + UX polish
From a thorough UX review (desktop + mobile, chat + knowledge):
Critical: mobile chat input was unusable
The message textarea collapsed to a narrow black box on phones — text
wrapped after 1-2 words and the box ballooned vertically. Cause: the
textarea was a flex child with flex-1 but no min-w-0, so flexbox's
default min-width:auto let the fixed-width buttons squeeze it to almost
nothing (the same bug the recording waveform already had fixed). Added
min-w-0.
Mobile overflow fixes
- Chat top bar: the session and agent pills no longer overflow the right
edge on narrow screens (responsive padding/gaps,
min-w-0, smaller pill max-widths on mobile, dropped the redundant "Chat · " prefix). - Knowledge view tabs (Topics/All/Tasks/Graph) now scroll horizontally
instead of cutting off the last tab (
overflow-x-auto+ ano-scrollbarutility +flex-shrink-0tabs). - Note-detail action toolbar wraps on mobile instead of running off-screen.
Localization
- Fixed the raw
web.common.cancelkey (was double-prefixed → rendered the literal key; now resolves to Abbrechen/Cancel). - Knowledge empty state ("Select a note" / hint), the "Untitled" fallbacks, and the Saving/Save-changes states across pages now use t() with en+de keys — no more German/English mix on those.
- Corrected ASCII-ized German umlauts in the web UI strings (Überfällig, Ausführen, Übersicht, Verknüpfungen, Zurück, …).
Security banner is now actionable
The "Network exposed — no password set" sidebar banner is a clickable link to the setup guide with a "Secure it now →" call-to-action, and its text (plus the protected/localhost variants) is localized.
Week 24 (2026) — knowledge mobile polish
Fixes the rough edges reported on the Knowledge page on a phone:
- Organizer Inbox bar no longer overflows. The action row (Accept all / Run now / Find duplicates) now wraps on narrow screens instead of running off the right edge, with tighter mobile margins.
- Consistent language. The view tabs (Topics/All/Tasks/Graph), the "N notes" count, the task section headers (Overdue/Open/Done), the sub-topic badge, the empty-topic message, and the organizer buttons ("Accept all", "Find duplicates", "open" badge) all go through t() now — no more German/English mix. New en+de keys added.
- Mobile "More" label fixed. The bottom nav showed the raw key
sidebar.more; the missingsidebar.moretranslation is now defined (en "More" / de "Mehr"), so it renders correctly. - Less wasted vertical space. The organizer banner's large top
margin is desktop-only now (
mt-3on mobile vsmt-20on desktop), and the left-panel right divider is desktop-only (md:border-r) since on mobile that panel is the whole screen.
Week 24 (2026) — settings restructure
Splits the single 1563-line Settings page into three focused pages. Behavior and API calls are unchanged — only the information architecture moved.
/pages/account-settings.html(Preferences). User-level Language + Appearance, reachable as a top-level "Preferences" sidebar entry outside the Admin group. Calls/api/languageand/api/ui/themeonly./pages/ai-providers.html(AI Providers). The heavy AI configuration — Models (provider connect, EU mode, refresh, winners/migration banners), Credentials, and Agent/System model assignments. Lives under Admin. Calls/api/models,/api/credentials,/api/models/upgrades,/api/models/winners,/api/setup/providers, plus the assignment/migration endpoints — all relocated intact from the old page./pages/settings.html(renamed to "System Settings"). Now hosts only Config Generations, Updates, and Data Management. Calls/api/config,/api/config/generations, and/api/system/update-status.- Sidebar gains a "Preferences" link (top-level) and an "AI Providers" entry under Admin; the old "Settings" entry is relabeled "System Settings".
ui_open_pagesettings_modelstarget now points at/pages/ai-providers.html#models(the Models UI moved there).- New i18n keys (
web.preferences.*,web.ai_providers.*,web.system_settings.*,web.sidebar.preferences,web.sidebar.admin_ai_providers) added to bothen.yamlandde.yaml.
Week 24 (2026) — knowledge mobile navigation
The Knowledge page was built for the desktop 3-pane layout and collapsed badly on phones: tapping a topic selected it as an (empty) note and the list disappeared, leaving the user with nothing useful. The page now has a real master → detail navigation stack on mobile, in the Obsidian/Notion style.
- Mobile navigation stack. A new
mobileLevelstate (list→topic→note) drives one level at a time on narrow screens. Tapping a topic now navigates into it and shows its child notes full-width (instead of selecting the topic as a note); tapping a child opens the note. A mobile-only breadcrumb header ("Topics /") with a back affordance pops one level at a time. The Uncategorized/Pending bucket drills in the same way. - Desktop untouched. Every changed
x-show/:classcondition is gated behindmobileView, so atmd:and up the aside + detail + graph panes render exactly as before. The inline topic-expand, the desktop empty state, and the breadcrumb in the detail header are unchanged on desktop. - Graph on touch. The force-directed canvas (tiny nodes, hover-based hit test) is unusable on touch, so on narrow screens the graph view now shows a plain tappable note list with a "best on a larger screen" hint instead of the canvas. Desktop keeps the interactive graph.
- New i18n keys (
knowledge.back,knowledge.breadcrumb_root,knowledge.topic_empty,knowledge.graph_desktop_only) in en + de.
Week 24 (2026) — language setting actually works
Fixes a three-bug chain that made the UI language setting (and the voice transcription hint that depends on it) silently ineffective:
- Writer/reader key mismatch. The settings selector wrote
user.preference.languagevia a chat slash command, but startup readuser.language— so the choice was stored and never read. There is now one canonical key (user.language) and a dedicatedGET/POST /api/languageendpoint (validated, audited aslanguage.changed) instead of the slash-command round-trip. get_language()was a process-global set once at boot. It now reads the live value from the app's memory (viabind_app), so a language change in the running server takes effect immediately — for translations AND the STT transcription hint — without a restart. This was the direct cause of voice notes still transcribing in the old language after switching to German.- Settings UI now loads the persisted language into the selector (was hardcoded to 'en'), saves via the new endpoint with a "Saved" confirmation, and explains that the change covers interface, LLM responses, and voice transcription (reload to see the UI translated).
Week 24 (2026) — voice fixes
- Transcription speaks your language. Whisper's auto-detection misfired on short clips (German speech came back as English word salad). All STT paths — web mic, audio upload, Telegram voice notes — now pass the configured UI language (Settings -> Language) as the transcription hint. The in-browser speech path already did.
- Mobile: the stop button is visible again. The recording waveform is a canvas with a 300px intrinsic width that flexbox refuses to shrink — on narrow phones it pushed the stop button out of the viewport. The waveform now shrinks properly, and while recording the mic button becomes a solid red stop button instead of a small pulsing glyph.
Week 24 (2026) — login page + Docker start fix
Session login replaces the Basic-Auth popup
With a password configured, browsers now get a proper login page
(/login, Neural Mycelium style) and a session cookie instead of the
raw Basic-Auth dialog that demanded a username nothing ever checked:
POST /api/auth/login(password only) issues an HttpOnly session cookie (7-day TTL, in-process tokens);POST /api/auth/logoutrevokes.- "Remember this device" (checked by default): a 90-day cookie whose SHA-256 hash is persisted server-side, so the device stays signed in across gateway restarts — only the hash is stored, a DB leak never yields a usable token. Unchecked: a browser-session cookie that dies with the browser and the gateway. Logout forgets the device.
- Browser navigations without a session redirect to
/login?next=...(same-origin paths only — no open redirect); API callers still get a 401 with the Basic challenge, so curl/scripts keep working unchanged via Basic Auth. - Public without auth:
/api/health(Docker healthcheck), the login flow,/api/i18n, and the static assets the login page needs.
Docker: gateway no longer refuses to start without a password
The secure-by-default bind check (Week 24) broke Docker deployments:
the container must bind 0.0.0.0 internally, so every password-less
stack crash-looped and the reason was buried in docker logs. Fixed at
the right layers:
- The container CMD passes
--allow-insecure-bind— in-container 0.0.0.0 is safe; actual exposure is the compose port mapping (127.0.0.1:9100:9100by default). - The entrypoint fails fast with a loud message when the host
exposes the port (
MYCELOS_BINDbeyond localhost) withoutMYCELOS_PASSWORD(compose now passesMYCELOS_BINDthrough). - The
myceloshost wrapper gains astartcommand, pre-flights the.env(exposed bind without password aborts with guidance beforedocker compose up), and replies with actionable hints ("mycelos start" / "mycelos logs gateway") instead of docker-compose errors when the gateway isn't running.
Week 24 (2026) — Neural Mycelium UI
Full visual identity pass over the web UI ("Neural Mycelium" design system): ambient backdrop, glass surfaces, no-border depth, cyan glow accents. Visual changes only — no behavioral rewrites.
User-customizable themes
Because the design system is pure CSS custom properties, a theme is just a variable set — so it is now user-configurable:
- Three presets: Mycelium Dark (default), Mycelium Light, Graphite —
selected via
data-themevariable overrides inshared/base.css. - Custom accent color: a single
--primaryoverride; derived tones (dim, container, on-primary, secondary) fan out via CSScolor-mix(), so one hex value re-tints the whole system coherently. - Settings → Appearance: preset cards + color picker (i18n en/de).
- Follows the user across devices: persisted server-side via
GET/POST /api/ui/theme(system memory scope, auditedui.theme.updated), applied flash-free on load from a localStorage mirror, then reconciled with the server value.
Design tokens (shared/base.css)
- Ambient mycelium backdrop: fixed dual radial glow (cyan top-left,
violet bottom-right) behind every page; opaque
<main>backgrounds removed so the glow shows through. - New semantic tokens:
--success,--success-dim,--warning,--warning-dim(the warning token was referenced by five pages but never defined), plus--glow-primary/--glow-primary-soft/--glow-tertiary-soft. - No-border philosophy for
.card/.card-low: depth now comes from layered gradients, inset top highlight, and shadow instead of outlines; hover adds a faint cyan aura. - New
.hero-panelutility: glass hero surface with cyan aura, used for page-level hero sections. - Sidebar active state: glow pill with luminous left indicator instead of a hard right border.
Layout shell
- Sidebar is now a glass panel (
.sidebar-shell): translucent blurred surface with a soft luminous right edge instead of a hard border. - Brand mark gets a radial cyan halo (
.sidebar-brand-mark) and the wordmark a subtle text glow.
Dashboard hero
- New hero panel: time-of-day greeting with the user's name, tagline, and live system pulse badges (gateway, scheduler, agent count).
- Knowledge graph teaser: a live mini force-directed render of the knowledge graph (glowing nodes, cyan filaments) inside the hero, linking to the full graph view.
knowledge.htmlaccepts?view=graphto deep-link straight into the graph view (used by the teaser).- New i18n keys under
web.dashboardinen.yamlandde.yaml(greetings, hero subtitle, graph teaser labels).
Knowledge graph
- Nodes now render with a soft neon glow per type; the hovered node flares brighter and its connecting filaments light up cyan.
- Edges are drawn as cyan mycelium filaments (related links stay neutral dotted).
- Legend dots glow in their node color; legend labels, stats line, and
the empty state are now i18n'd (
web.knowledge.legend_*,graph_notes,graph_links,graph_emptyin en/de). - Empty state redesigned: glowing hub mark instead of bare text.
Chat
- User bubbles get a deep-blue gradient and soft shadow instead of a flat fill.
- Empty-state suggestion chips are now glass pills with a faint cyan ring.
- Input bar: rounder glass container with backdrop blur, matching the ambient glow wrapper.
Consistency sweep
- All plain
#48c78esuccess-green hardcodes across about, agents, connectors, docs, doctor, settings, and workflows now usevar(--success)(alpha-modified Tailwind hex values intentionally kept — the CDN build cannot alpha-modify CSS variables). Brand colors (Telegram blue, Slack red) are deliberately untouched.
Week 24 (2026) — morning briefing & living knowledge
The strategic answer to "subconscious loop" assistants: the knowledge base keeps itself current and the user gets a proactive daily synthesis.
- Scheduled auto-ingest (
auto_ingest_checkinscheduler/jobs.py): an hourly Huey job runs every registeredINGEST_SOURCESconnector — but only when the user opted in (memory keyauto_ingest_enabled, default OFF) and the connector is active in the registry. Idempotent via external-id dedup; per-run audit event (knowledge.auto_ingest.run); a failing connector never crashes the scheduler loop. - Briefing builder (
knowledge/briefing.py): gathers deterministic facts first — overdue tasks, tasks due today, reminders firing today, notes created in the last 24h (with connector provenance), topics touched — then makes ONE LLM call on the cheapest model to synthesize a short friendly briefing (~200 words, user's language). User content is framed as data-not-instructions (same injection hardening as the organizer). Fail-soft: if the LLM is down, the deterministic sections still go out. Built once per day, cached in memory scope. - Daily delivery (
briefing_tick): a 5-minute Huey tick sends the briefing once per day after the user-configured time (memory keybriefing_time, default 07:30;briefing_enableddefault OFF;briefing_last_sentprevents double sends). Delivery rides the reminder channel path — Telegram when configured, otherwise skip with a log. Audit eventbriefing.sent. - API:
GET /api/briefing/today(cached-for-the-day, else freshly built),GET/POST /api/briefing/settings(enabled / time / auto_ingest_enabled, validated HH:MM, audited asbriefing.settings.updated). All settings live in memory scope — content state, no config generation required (Constitution Rule 2). - Dashboard: a Morning Briefing card on the dashboard page, loaded
independently so it never blocks the rest of the dashboard. New i18n
keys in
en.yaml+de.yaml. - Tests:
tests/test_briefing.py(builder, fail-soft, per-day cache, time-window logic, no-double-send, settings API, audit events) andtests/test_scheduled_ingest.py(off-by-default gating, active- connector gating, error isolation, idempotency, audit).
v0.3.0 — 2026-04-21
First tagged public release. Baseline for self-hosted single-user deployment on localhost.
Highlights
- Two-container Docker deployment with hard security isolation (Phase 1b). The master key lives only in the proxy container; the gateway holds no plaintext credentials and has no direct internet route. Every outbound call — LLM, HTTP, MCP, Telegram — flows through the proxy.
- Zero-question installer (
scripts/install.sh/install.ps1). Idempotent re-runs upgrade the stack, install amycelosCLI wrapper into~/.local/bin, write static tab-completion for bash / zsh / fish, and preserve.master_key+.envevery time. - Host-side stack operations via the wrapper:
mycelos update(pull + up),restart,logs,shell,stop.mycelos doctorreports when a new release is available. - Agent toolkit preloaded — beautifulsoup4, lxml, openpyxl, python-docx, Pillow, pymupdf. Heavy ML stacks stay opt-in through a custom image.
- Gateway binds to
127.0.0.1by default. Exposing on the LAN requiresMYCELOS_BIND=0.0.0.0plusMYCELOS_PASSWORD(HTTP Basic Auth). Passkey authentication is Phase 2.
Fixes this week
fix(prompt)— Mycelos stops asking for API keys that are already stored; configured LLM providers are now in the system prompt.fix(reminders)— user timezone is detected from the browser, passed into the prompt, andnote_writerejectsremind_atin the past. "Remind me tomorrow 9am" in a UTC container no longer fires immediately.fix(prompt)— Mycelos always addresses the user in second person instead of narrating about them in the third.fix(chat)— the native scrollbar is reachable again on very long assistant messages (the fixed composer was overlapping the bottom of the scroll region).fix(telegram)— Telegram channel works under two-container deployment. Stateless calls go through a new proxy URL-path credential injection; the aiogram long-poll session materializes its token once at startup via a narrow, bootstrap-window-gated allow list.fix(proxy)— unauthenticated/healthzso the Docker healthcheck works without leaking operational detail.fix(compose)— containers exportMYCELOS_DATA_DIR=/dataso the in-container CLI finds the bind-mount.cleanup(frontend)— removed a stale Next.js "Maicel" export that was still reachable at/out/from the pre-rename era.
Week 24 (2026) — day-one knowledge (connector ingest)
The onboarding moment: after connecting Gmail, recent mail flows into the knowledge base — Mycelos knows you from day one instead of starting with an empty Zettelkasten.
POST /api/knowledge/ingest/gmailpulls recent threads (default: last 30 days, promotions/social excluded, 25 max) through the MCP layer and creates notes with full provenance:created_by='import',source = {kind: connector, connector: gmail, external_id: <thread id>}.- Idempotent: the external id is the dedup key — re-running an ingest never duplicates notes, even when subjects change.
- Fail-closed: a connector error writes nothing.
- New notes enter the organizer queue (
organizer_state='pending') and the hardened organizer (below) classifies them into topics in batches. - Every run emits a
knowledge.ingest.completedaudit event. More sources (GitHub, Calendar) register inINGEST_SOURCES.
Unlike the "reads you first" competitors, this runs entirely on the user's own infrastructure — OAuth tokens stay in the credential proxy, content never transits a vendor cloud.
Week 24 (2026) — organizer robustness
Hardens the knowledge organizer so bulk external content (the upcoming "day-one knowledge" connector ingest) cannot burn costs, be steered by injected text, or misfile notes:
- Retry cap. Failed classifications (LLM error, unparseable answer,
answer with neither a topic nor a proposed name) increment
organizer_attempts; after 3 failures the note is parked asorganizer_state='manual'with an audit event instead of retrying every hour forever. Success resets the counter. Empty-target suggestions (which fed an infinite delete-and-requeue loop) are no longer created at all. - Batch classification. Up to 10 notes per LLM call — a full 30-note run costs 3 calls instead of 30. Notes missing from a batch answer count as failed attempts (fail-closed, never "file under misc").
- Injection hardening. The classifier receives note content
(frontmatter stripped) wrapped in
<note-content>tags with an explicit "data, not instructions" rule — imported emails/web pages cannot steer move/new-topic decisions. Confidence is clamped to [0, 1] and response fields are type-validated. - One
slugify(). Topic paths were computed with two different algorithms ("Ernährung" →ern-hrungvsernährung), so auto-accepted umlaut topics moved notes under parents that don't exist. A singleslugify()(German transliteration: ä→ae, ö→oe, ü→ue, ß→ss) now serves path generation, topic rename, the inbox, and auto-accept — which also switched to find-or-create, so it can no longer create duplicate-2topics for existing names.
Week 24 (2026) — claims enforcement (P1)
Makes the EU-residency and "secure by default" claims true and testable, following the same audit as the P0 data-integrity fixes.
EU mode is now enforced, not just a UI filter
- Server-side EU-mode state. EU mode is persisted (system memory scope) and every toggle emits an audit event, so it survives a browser change and a GDPR-bound user can demonstrate when it was enabled.
- Broker enforcement (fail-closed). With EU mode on, the LLM broker restricts the entire candidate chain — primary and fallbacks — to EU-resident providers. A rate-limited EU primary no longer fails over to a US provider (previously the fallback deliberately preferred a different provider, silently exfiltrating the full conversation). If no EU model is configured, the request is denied rather than sent to the US.
- Egress gates. Voice transcription refuses cloud STT backends (OpenAI
Whisper, Google) under EU mode, allowing only local/openai_compatible.
Knowledge embeddings never select the OpenAI provider under EU mode.
Vertex AI credentials must be pinned to a
europe-*region — a non-EU region is rejected at setup.
Secure by default on the network
- The gateway refuses to start unauthenticated on a non-loopback bind.
Binding to
0.0.0.0(or any non-loopback host) without a password now raisesInsecureBindErrorinstead of merely logging a warning — this is the OpenClaw exposed-instance failure mode, now opt-in (--allow-insecure-bind) rather than opt-out. Also fixed a latentNameErrorin the Basic-Auth middleware path (missing imports) that the new test exposed.
Credential sanitizer covers EU-provider formats
- ResponseSanitizer now redacts Google OAuth access tokens (
ya29.*, used by Vertex AI), PEM private-key blocks (service accounts), and credential-keyword-prefixed high-entropy tokens (e.g. Mistral keys).
Knowledge provenance + interactive graph
Every note now answers "who created me, from what":
- Provenance columns.
knowledge_notesgainscreated_by(agent id /user/organizer/import) andsource(JSON: kind plus conversation, connector, filename references). Threaded through every write path: thenote_writetool records the creating agent and conversation, Quick Capture recordsquick_capture, the import pipeline recordsimport+ filename, document ingest records the upload. Provenance survives edits, lands in the note frontmatter (files stay self-describing), and theknowledge.note.createdaudit event carries the creating agent. - Note detail shows provenance — "Created by mycelos via chat" under the breadcrumb, with the source filename for documents.
- Typed graph edges with referential integrity.
knowledge_linksgains akind(wikilink | parent | related | merged_from). Renaming a topic re-points all link endpoints and re-syncs the FTS row; merging topics redirects inbound links to the target and removes the merged-away topic from listings/search; deleting a note cleans its links and vector row, so the graph never renders dangling edges or ghost nodes. - Interactive knowledge graph in the web UI: a new Graph view renders the whole knowledge base as a force-directed canvas — topics, tasks, documents, and notes colored by type, wikilinks solid, topic membership dashed. Clicking a node opens the note.
Knowledge-layer data-integrity fixes (P0)
A claims-vs-implementation audit surfaced several paths that could silently corrupt or lose knowledge data. Fixed:
update()no longer wipes note metadata. Editing a note's content, status, or tags previously resetparent_path,reminder,remind_via, andsource_fileto their defaults, because the re-index call did not forward the existing values. This detached notes from their topic, cleared pending reminders (the scheduler reads the DB), and destroyed thesource_fileprovenance pointer to the original document. Existing values are now preserved.- Destructive merges are never auto-accepted. The organizer's
stale-suggestion auto-accept (>24h) no longer applies
mergeactions — only non-destructive moves/links/new-topics. Merges archive (and eventually hard-delete) the secondary note and now require explicit user confirmation, matching the mandatory-dry-run principle. - Vector similarity is correctly calibrated. The vector table now
pins
distance_metric=cosine(sqlite-vec defaulted to L2, so thesimilarity = 1 - distancemath was wrong) and the KNN query uses the requiredk = ?constraint (the priork > ?threw and was swallowed, making vector search silently dead). Duplicate detection no longer falls back to keyword search when embeddings are unavailable — it fails closed and returns no candidates, so mere keyword overlap can never trigger a merge.
Telegram access is fail-closed
- Removed the first-sender bootstrap. An empty Telegram allowlist previously auto-trusted the first user who messaged the bot, granting permanent access to whoever found the bot handle first. The allowlist must now be populated at setup; an empty allowlist blocks everyone
Week 24 (2026) — EU enforcement at the proxy (last egress point)
The SecurityProxy now enforces EU residency itself instead of trusting the gateway's broker — the proxy is where bytes actually leave the machine, so a future code path that bypasses the broker still cannot send data to a non-EU provider (defense in depth):
- The proxy reads the persisted EU-mode flag from its read-only DB view per request — a toggle takes effect immediately, no restart needed.
- STT: with EU mode on, cloud transcription backends (OpenAI Whisper, Google) are refused at the proxy; only local/openai_compatible pass.
- LLM:
/llm/completedenies non-EU providers with 403 and allm.blocked_eu_modeaudit event; Vertex AI additionally requires aeurope-*region in the stored credential. - EU provider credentials fixed: the proxy's provider map now covers
mistral(api_key) andvertex_ai(service-account JSON + project + region injected as litellm kwargs). Previously these authenticated via env vars inside the proxy — bypassing the audited credential path the EU story depends on.
Week 18 (2026)
Session attachments — Multi-Part LLM content replaces marker pipeline
- File uploads in chat (Web UI + Telegram) now save to a per-session folder at
~/.mycelos/sessions/<id>/attachments/<filename>and are automatically attached to every subsequent LLM call as Anthropic Multi-Part content (Document for PDFs, Image for images, Text for plaintext). The agent reads them directly — no marker pipeline. - Two new tools the agent uses to manage attachments:
note_save_attachment(filename, summary, tags)— promotes a session attachment to the permanent Knowledge Base (file + agent-generated summary).attachment_load(filename)— forces a previously-evicted attachment back into the next turn's context.
- Token-budget eviction: when the model context is near full, oldest attachments are replaced by a text stub like
[Attachment 'old.pdf' parked — call attachment_load('old.pdf') ...]. The agent can re-load any of them viaattachment_load. Files marked viaattachment_loadskip eviction. - Session deletion via
SessionStore.purge_old(...)now optionally drops the session attachment folder when an attachment store is supplied. - Per-type size caps enforced at upload time: PDFs ≤ 32 MB, images ≤ 5 MB, text ≤ 10 MB. Other binary types rejected at the boundary (
/api/uploadand Telegram). - Audit-logged: every successful upload (Web + Telegram) emits
chat.attachment_uploadedwith session_id, filename, kind, size. - Removed: the
[System: User uploaded ...]marker write in/api/upload, the auto-ingest of PDFs into the Knowledge Base from/api/uploadand Telegram, the marker-detection / promote-to-system-prompt logic inChatService, the marker-era prompt section inmycelos.md, the/api/inbox/<filename>endpoint. - Spec / plan:
docs/superpowers/specs/2026-04-29-session-attachments-design.md,docs/superpowers/plans/2026-04-29-session-attachments-plan.md.
Upload UX — confirmation bubble after file attach
/api/uploadnow emits asystem_response_eventafter the preview event so the chat shows a bot bubble like "📎 BH_03_2026.pdf ist angehängt. Frag mich, was du darüber wissen willst." instead of an empty Mycelos header. Localized viachat.attachment_ready(en/de). The user immediately sees that the upload landed and the agent has the file ready.
Week 17 (2026)
Connector registry unification (single source of truth)
MCPRecipe.kind("channel"or"mcp") replaces the parallelCONNECTORSdict incli/connector_cmd.py. Every connector now lives in one registry (RECIPES) — Telegram is the solekind="channel"entry; everything else inherits the"mcp"default. Capabilities / setup_flow / category come from the recipe — no more drift between two parallel lists.mycelos connector setup <id>routes viarecipe.kindto either_setup_channel(Telegram-specific handler — allowlist viagetUpdates, polling vs. webhook,channelstable write) or_setup_mcp(recipe-driven credential prompt, policy grant, registry row). The OAuth path on_setup_mcpexits before any state mutation — OAuth recipes now point users to the Web UI instead of leaving half-configured registry rows behind.mycelos connector listrenders three sections: Installed / Channels (not yet configured) / MCP Connectors (not yet configured). The previous single mixed-kind table with aKindcolumn is gone — sections do that job.- Chat
/connector add,/connector setup,/connector remove,/connector testare removed./connector listand/connector searchstay. Setup happens in the Web UI or via the CLI (mycelos connector setup <id>); the deprecated verbs return a pointer instead of executing. Removes ~650 lines of duplicate setup logic fromslash_commands.py. Autocomplete (completer.SLASH_COMMANDS["connector"]) reflects the trimmed verb set. - Gateway
/api/connectors/recipesnow returns{channels: [...], mcp: [...]}grouped byrecipe.kind; every payload includes the newkindfield./api/connectors/recipes/{id}still returns a single recipe and now exposeskindtoo. - Connectors page (Web UI) gains two labeled sections — "Channels" and "MCP Connectors" — each with their own card grid, hidden when empty. Setup-button click handlers and the OAuth dialog are unchanged.
connector.unknown_idandconnector.see_listi18n keys added (en/de) so the new "Unknown connector …" error matches the rest of the CLI.- New tests:
tests/test_recipe_kind.py,tests/test_connector_list_two_sections.py,tests/test_frontend_connectors_api.py,tests/test_connector_slash_trimmed.py. Existing tests rewritten where they checked the deleted dict shape. - Spec / plan:
docs/superpowers/specs/2026-04-24-connector-registry-unification-design.md,docs/superpowers/plans/2026-04-24-connector-registry-unification-plan.md.
CSRF middleware on the gateway
- New
CSRFMiddleware(ingateway/routes.py) blocks cross-origin browser POSTs to/api/*with a 403. Same-origin andlocalhost:*always pass. Missing bothOriginandReferer(CLI / curl / server-to-server) passes through unchanged. OPTIONS preflight is exempt so CORS keeps working. MYCELOS_ALLOWED_ORIGINSenv var lets a user whitelist specific external origins (e.g. an internal Grafana dashboard) without opening the door to every site.- Threat model: a Mycelos user on
localhost:9100opens a malicious site in the same browser; the site's JS firesfetch('http://localhost:9100/api/...')to exfiltrate or plant data through the user's own session. The Origin/Referer check stops it before the handler runs, while the no-Origin escape hatch keeps the CLI usable.
ui.open_page tool — agent links the user into admin pages
- New
ui.open_pagetool lets the Mycelos chat agent send the user directly to a Web-UI page (Connectors, Model settings, Config Generations, Doctor) instead of explaining setup in prose. Optionalanchorlands on a specific recipe (e.g.connectors#gmail); optionallabeloverrides the default button text. - Frontend chat renderer recognizes the new
kind: "link"discriminator on suggested-actions cards and navigates viawindow.locationinstead of submitting a slash-command. - Telegram channel renders link actions as Markdown links with the absolute host (
MYCELOS_PUBLIC_URLenv var, defaults tohttp://localhost:9100) plus a hint that the page must be opened on the host computer (telegram.web_link_hinti18n key, en + de). - CLI chat renderer emits OSC-8 ANSI hyperlinks (clickable in iTerm2 / kitty / modern gnome-terminal) with the URL in dim parens as fallback for older terminals. Number-selection on a link-action prints the URL with a "Open this URL in your browser" hint instead of trying to re-submit.
- Mycelos system prompt updated with a "Sending the user to the Web UI" section telling the agent when to use the new tool.
- Dead-code sweep: removed obsolete CLI-routing prose hints from
slash_commands.py(3 places) andcontext.py(2 places). The agent now points at the Web UI through the tool, not by spelling out CLI commands in transcripts. - Spec / plan:
docs/superpowers/specs/2026-04-26-ui-open-page-tool-design.md,docs/superpowers/plans/2026-04-26-ui-open-page-tool-plan.md.
Constitution Rule 2 audit
- New audit suite
tests/security/test_constitution_rule_2.pyverifies that every state-mutating Web-API endpoint produces aconfig_generationsrow, and pins that invariant for the future. Initial run: all green — the system is already conformant via service-layer notifiers (ConfigNotifier.notify_changeis called fromCredentialService,ConnectorRegistry,ModelRegistry,AgentRegistry,MountManager,PolicyEngine). - CLAUDE.md Rule 2 now spells out which tables count as declarative state (connectors, credentials, agents, policies, etc.) and which don't (knowledge, memory, execution traces, sessions). Saves future code reviewers from re-flagging the same false diagnosis we ran into this week.
- Spec / plan:
docs/superpowers/specs/2026-04-25-constitution-rule-2-audit-design.md,docs/superpowers/plans/2026-04-25-constitution-rule-2-audit-plan.md.
Custom MCP connector setup
- The "Add Connector" form on the Connectors page is a real Custom-MCP setup wizard now. Name, Command, and a repeatable Environment Variables list (Key + Value + delete row + "+ Variable" button) replace the previous single-secret field.
- When the user pastes a Command, the form looks up the npm package against the MCP Registry (
GET /api/connectors/lookup-env-vars?package=<pkg>) and pre-fills the env-vars rows on a hit. On miss or registry error, the form silently leaves an empty row for manual entry. POST /api/connectorsnow acceptsenv_vars: dict[str, str]alongside the legacysecret: string. Whenenv_varsis set, the credential is stored as a JSON blob with the__multi__sentinel on theenv_varfield; recipe-setup code paths keep using the old single-var shape.- MCP spawn (
mcp_client._build_env) detects the__multi__sentinel, parses the JSON blob, and merges every key/value into the subprocess env. Blocked env vars (PATH,HOME, ...) are still filtered. - MCP auto-start after registration now runs in a background thread (recipe + custom paths), so the POST returns immediately even when npm is slow or unreachable.
- Spec / plan:
docs/superpowers/specs/2026-04-25-custom-mcp-setup-design.md,docs/superpowers/plans/2026-04-25-custom-mcp-setup-plan.md.
Connectors page cleanup
- Connectors page now leads with an "Installed" section. The two "Available" sections (Channels, MCP Connectors) sit below and never show a recipe that's already installed. No more duplicate cards or confusing "Configured"/"View" buttons in the catalog. Page subtitle reads "Your installed connectors plus what's available to add."
mcp-memoryrecipe (upstream@modelcontextprotocol/server-memory, generic knowledge graph) was removed — it overlaps with Mycelos's own Knowledge Base and offering both confused users about where data lands.- New one-shot maintenance script:
scripts/cleanup_orphan_connectors.py --data-dir ~/.mycelos. Default mode is--dry-run;--applydeletes orphanconnector_registryrows (ids no longer inRECIPES) plus their capabilities and credentials, atomically per-orphan viastorage.transaction(), and writes a timestampedmycelos.db.bak-*first. Used to clear leftoverweb-search-duckduckgo/httprows that Spec 1 surfaced but didn't migrate. Mid-loop failures print a recovery hint pointing at the backup file. - Spec / plan:
docs/superpowers/specs/2026-04-24-connectors-page-cleanup-design.md,docs/superpowers/plans/2026-04-24-connectors-page-cleanup-plan.md.
Settings → Models: migration banner + provider winners
- New endpoints:
GET /api/models/winners(top per tier per provider, reusingregister_provider_models),GET /api/models/upgrades(detects stale assignments when a newer model exists in the same provider+tier bucket, skips date-only bumps),POST /api/models/migrate(re-points selected agent / system-default slots to the new model and auto-registers it from the catalog if missing). - Settings page now surfaces an in-place banner (e.g. "Opus 4.5 → 4.7, 5 places use Opus 4.5") with per-assignment checkboxes so the user can opt out row-by-row before applying the upgrade.
- Provider pill row (Anthropic / OpenAI / Gemini / Ollama / OpenRouter / All) with "winner" cards (one per tier) shown above the full table. Full table collapses behind a "Show all models" toggle. Pills are hidden for providers without stored credentials — pointing users at a model they can't actually call is noise.
- "Connect a provider" row on the Models page itself: one button per supported provider (Anthropic, OpenAI, Gemini, OpenRouter, Ollama), each opening a slim form (API key or Ollama URL) that calls the existing
/api/setupendpoint. Already-connected providers render as a greyed-out "Connected" state so the row doubles as an at-a-glance status.
Model-registry sync correctness
fix(model-registry)— Bedrock/Vertex aliases no longer leak into Anthropic/OpenAI.sync_from_litellmnow trustsinfo['litellm_provider']from the LiteLLM catalog instead of guessing the provider from the model-name shape, and shares the same gateway/region prefix filters withget_provider_models(single source of truth). Cured the "new model discovered: anthropic/anthropic.claude-mythos-preview" false positive — Mythos is a Bedrock-only alias that can't be called through the Anthropic API anyway.- Cleanup pass in the same sync drops previously mis-registered doubled-prefix aliases (
anthropic/anthropic.*,openai/openai.*) from the registry — but only when no agent_llm_models row still references them, so live assignments are left alone for the user to retire manually.
Google via MCP (retiring the gog-CLI path)
- Gmail, Google Calendar, and Google Drive each get a dedicated MCP recipe (
@gongrzhe/server-gmail-autoauth-mcp,@cocal/google-calendar-mcp,@piotr-agier/google-drive-mcp), spawned inside the SecurityProxy container like every other MCP connector. The single gog-CLIgmailrecipe (which was broken under two-container deployment —gogwasn't in the proxy image and the gateway has no direct internet anyway) is retired, and so are the five in-processgoogle.*tool bindings inconnectors/registry.py, the whole_setup_gog_connectorpath in the CLI, and thegog_*i18n keys. - The stale
@modelcontextprotocol/server-google-drivereference (package was never published) is replaced by the real@piotr-agier/google-drive-mcp. - Connectors page gains a "Google Workspace" use-case group surfacing all three services as separate cards so users can enable only the scopes they need.
- New doc:
docs/deployment/google-setup.mdwalks through OAuth-keys creation, the shared Google Cloud project, the one-shotnpx ... authconsent flow inside the proxy container, and thelocalhost:3000callback caveats for home-network (Raspberry Pi) deployments. - Three live integration tests under
tests/integration/test_*_mcp_live.pycatch upstream breaking changes before users do; all skip cleanly without credentials.
OAuth connector setup in the web UI
- New
setup_flowfield onMCPRecipediscriminates between plain-secret connectors and OAuth-based ones. The three Google recipes now declaresetup_flow="oauth_browser"— the Connectors page opens a dedicated dialog for them with a step-by-step Google Cloud project wizard,gcp-oauth.keys.jsonupload with shape validation, and a live subprocess log of thenpx ... authconsent flow streamed via WebSocket through a gateway passthrough. Users no longer need to open a terminal to onboard Gmail / Calendar / Drive. - New proxy endpoints
POST /oauth/start,POST /oauth/stop,WS /oauth/stream/{session_id}— generic enough to host future OAuth-based connectors without code changes in the web layer beyond adding a setup guide. - New gateway endpoints
GET /api/connectors/recipes/{id}(recipe + inlined guide in one roundtrip),POST /api/connectors/oauth/{start,stop},WS /api/connectors/oauth/stream/{session_id}(passthrough),POST /api/credentials/oauth-keys/validate(shape-check gcp-oauth.keys.json before upload). docs/deployment/google-setup.mdnow leads with the UI path; the shell-based walkthrough is retained as a fallback for headless installs.
File-based credential materialization
- Upstream MCP packages that read credentials from hardcoded file paths (e.g.
~/.gmail-mcp/gcp-oauth.keys.json) now participate in the encrypted-credential flow without breaking the "DB is the only persistent copy" rule. Newcredential_materializermodule writes the credential blob to a session-scoped tmp HOME right beforePopen, setsHOME=on the spawned subprocess, and purges on exit via a context manager'sfinally. - Proxy's
/oauth/startand/mcp/startnow acceptrecipe_idand handle materialization themselves. After a cleannpx ... authrun, the token file the tool wrote is read back and stored as a second credential (<recipe>-oauth-token). Future MCP-server runs materialize both files. - Gateway's
/api/connectors/oauth/startnow sends only{recipe_id}; the proxy looks up the recipe and drives the flow. FrontendsubmitOAuthKeysAndStartis simpler by one parameter. - Docker
tmpfsmount on the proxy's/tmp/mycelos-oauth— cleartext keys/tokens never hit persistent disk. - New audit events:
credential.materialized,credential.purged,credential.token_persisted. - New
MCPRecipefields for file-based tools:oauth_keys_credential_service,oauth_keys_home_dir,oauth_keys_filename,oauth_token_filename,oauth_token_credential_service. The three Google recipes use them.
Google via official MCP server — Gmail first
- Dropped the
oauth_browser/ file-materialization path (gongrzhe + friends) in favor of Google's official remote MCP servers. Gmail now useshttps://gmailmcp.googleapis.com/mcp/v1with standard OAuth 2.0 Authorization Code Flow + PKCE. No morenpxsubprocesses, no more~/.gmail-mcp/tmpfs hack, no more WebSocket streaming of subprocess I/O. - New
setup_flow="oauth_http"onMCPRecipewith fields forhttp_endpoint,oauth_authorize_url,oauth_token_url,oauth_scopes,oauth_client_credential_service,oauth_token_credential_service. - New
oauth_token_managermodule: pure functions for code-exchange and lazy-refresh against any OAuth 2.0 token endpoint. - New gateway endpoints:
POST /api/connectors/oauth/start(auth URL with PKCE + in-memory state),GET /api/connectors/oauth/callback(proxy-to-gateway redirect from Google). New proxy endpoint:POST /oauth/callback(code → token exchange). New proxyGET /credential/get/{service}/{label}for the gateway's startup reads. - Old code archived on
archive/oauth-browser-file-materialization— not deleted from history, just not built on any longer. - Calendar and Drive recipes removed for now; add back in a follow-up plan once Gmail is proven stable.
Week 16 (2026)
Two-Container Docker Deployment (Phase 1b — security lockdown)
- Credential writes move out of the gateway. New endpoints on the SecurityProxy:
POST /credential/store,DELETE /credential/{service}/{label},GET /credential/list(metadata only),POST /credential/rotate.SecurityProxyClientgains matchingcredential_store/credential_delete/credential_list/credential_rotatemethods. - Gateway uses
DelegatingCredentialProxy, a thin wrapper that forwards writes and never reads plaintext.get_credentialraisesNotImplementedError— callers needing plaintext must go throughSecurityProxyClient.llm_complete/mcp_start/http_get. app.credentialsauto-selects:MYCELOS_PROXY_URL+ wired proxy-client →DelegatingCredentialProxy; otherwise → legacy in-processEncryptedCredentialProxy. Master key never loaded in the gateway process in two-container mode.- Gateway's direct-httpx calls in
search_tools,github_tools,mcp_search,llm.model_registry.sync_from_litellm, andmodel_updater release checknow route through the SecurityProxy viahttp_tools._proxy_client. Telegram polling is a follow-up because of the long-poll shape. - Runtime
pip installis disabled in Docker mode with an audit event (package.install_blocked) and a pointer todocs/deployment/custom-image.md. P0 security item from the April audit closed. - Gateway container drops off the
defaultDocker network —mycelos-internalis its only network. Proxy'smycelos.dbbind-mount flips from read-only to read-write (required for credential writes). - New E2E assertion:
docker compose exec gateway curl https://example.comfails at the network layer. - Threat model doc (
docs/security/two-container-deployment.md) updated: Phase 1 is complete, Phase 1c ships a rich image + MCP-first docs, Phase 2 is passkey auth + public exposure.
Two-Container Docker Deployment (Phase 1a)
- New default:
docker compose up -dlaunchesmycelos-proxy(hosts MCP subprocess children in its own PID namespace, reads.master_keyfrom a read-only bind mount, not reachable from the host) andmycelos-gateway(web UI, API, chat, scheduler) on a shared Docker network with a bearer-token shared secret. - New
scripts/install.shandscripts/install.ps1installers. Zero-question: generate a master key and proxy token, write.envanddocker-compose.yml, bring the stack up, wait for/api/health. Idempotent. - Single-container mode still works unchanged: when
MYCELOS_PROXY_URLis not set, the gateway forks a local SecurityProxy viaProxyLauncherlike before. No breaking change for existing installs. mycelos servegains--role {all,gateway,proxy}.all(default) is today's in-process behavior;gatewayuses an external proxy fromMYCELOS_PROXY_URL;proxyruns only the SecurityProxy on TCP.SecurityProxyClientaccepts eithersocket_path=(legacy UDS) orurl=(new TCP) — mutually exclusive.- New doc
docs/security/two-container-deployment.mdspells out exactly what Phase 1a protects, what is deferred to Phase 1b (credential-write RPC + gateway network lockdown), and what Phase 2 (passkey auth + public exposure) will add. - Phase 1a binds to
localhost. Credential writes from the gateway still use the in-processEncryptedCredentialProxy(master key still reaches the gateway during init). Phase 1b removes that dependency and cuts the gateway's outbound Docker network. Public exposure with authentication ships in Phase 2.
Agents Page — Tool Capabilities View
- Agent detail panel now shows tool capabilities grouped by category (core, connectors, email, knowledge_read, knowledge_write, knowledge_manage, system, workflows, …).
- System agents (mycelos, builder, workflow-agent, evaluator-agent, auditor-agent) see the capability list in read-only mode with an explanation that their tool set is role-defined — stripping tools would break the agent's purpose.
- Custom agents (persona / deterministic types) get a live checkbox matrix over the same categories, plus a collapsible raw textarea for prefix matches like
playwright.*. - New
GET /api/toolsreturns every registered built-in tool with its category and permission level.
Integration Tests — Local LLM Backends (Ollama + LM Studio)
- New
.env.test.exampletemplate committed so contributors can see which integration keys matter without leaking real secrets. .env.testgainedOLLAMA_HOSTandLM_STUDIO_HOSTentries (your copy — not committed).require_ollamaandrequire_lm_studiopytest fixtures: skip cleanly if the endpoint isn't reachable or has no models loaded, with specific reasons.integration_app_localindirect-parameterized fixture: boots a full App wired to either backend, auto-picks the best available chat model (prefersgemma4/gemma-4-e4b-it), warms Ollama up so the test timeout only covers the response.tests/integration/test_local_llm_smoke.py— endpoint discovery tests always run when the host is set. Ollama inference roundtrip runs by default; LM Studio is gated behindLOCAL_LLM_BACKEND=lm_studioso 16 GB machines can't accidentally double-load two 8B models and trip a "Compute error".tests/integration/test_chat_local.py— the chat pipeline (session → message → response) runs end-to-end against Ollama. Live counterpart to the "Run on Your Data." promise.tests/integration/test_organizer_local.py,test_reminder_local.py,test_session_summary_local.py— three background-LLM workloads (knowledge classification, reminder message generation, session memory extraction) run against the local model the user has configured as the cheapest-model chain. Proves the "build with cloud, run locally" story for the daily background work, not just the chat roundtrip.tests/integration/test_intent_classification_local.py—ChatOrchestrator.classify()against gemma4. Greeting → CONVERSATION/TASK_REQUEST, explicit agent-creation request → CREATE_AGENT/TASK_REQUEST. Pure classification, no tool loop, very reliable on small models.tests/integration/test_chat_memory_local.py— Chat pipeline with tool calls. Verifies the tool-loop works on a local model that advertises native tool-calling (gemma4). Lax acceptance: eithermemory_writewas invoked OR the model acknowledged the preference in text.
Updates — Daily Mycelos Release Check
ModelUpdaterHandlernow also checks GitHub's releases/latest once per day for a newer Mycelos version. The check rides on the existing daily task — no extra scheduler slot, one extra unauthenticated request per day.- Update state persists in system memory so the UI can render the banner without re-querying GitHub.
- Doctor page shows a "Mycelos X.Y.Z is available" banner when an update exists, with the
docker compose pull && docker compose up -dcommand and a link to the release notes. - Settings → Updates section shows current version, latest version (if available), and a "Check daily" toggle to opt out.
mycelos.update_availableaudit event (Noteworthy tier) fires once per new release tag — not once per daily poll.- New endpoints
GET /api/system/update-status(read cached state, no network) andPUT /api/system/update-check-enabled. - README gained an "Updating" section with the upgrade command and a transparency note: no telemetry, only an unauthenticated GitHub request, opt-out available.
Models — Skip Previous-Generation Models on Sync
- The periodic model-registry sync no longer imports previous-generation models (Claude 3.x, GPT-3 / GPT-4-turbo, Gemini 1.x / 2.0, …). The registry stays focused on what a user would sensibly pick today.
- Existing legacy entries are never deleted by the sync — the filter only applies to fresh additions. A model you manually added for compatibility stays.
include_legacy=Truekwarg as explicit escape hatch.sync_from_litellmnow returnsskipped_legacy: [...]alongside added/updated. The Settings refresh banner shows "Skipped N older-generation models" as a small opacity-70 hint.- Extracted
is_legacy_model(model_id, provider)andLEGACY_PATTERNSinmycelos.llm.providersso the CLI listing and the registry sync share one definition of "current generation".
Models — Auto-Refresh Scoped to Configured Providers
ModelUpdaterHandlernow restricts the sync to providers the user has credentials for (plus Ollama when its endpoint is configured). No credentials = no sync. Stops the registry from flooding with 200 Gemini models after an Anthropic-only setup.ModelRegistry.sync_from_litellmgained aproviders: list[str] | Noneallow-list parameter.- Settings refresh result banner: new models are now shown as rounded chips, the "up to date" case lists the providers that were actually checked, and the dismiss button has a visible close icon. No more raw JSON / comma-separated strings.
Models — Daily Auto-Refresh (deterministic, no LLM)
- New
ModelUpdaterHandlersystem handler. Runs once per day at 03:00 UTC via Huey, fetches LiteLLM's live model-cost JSON from GitHub, and adds freshly-released provider models to the registry (e.g. a new Opus or GPT version appears in Settings the day after the provider ships it — nopip install --upgrade litellmrequired). - Deliberately deterministic: zero LLM calls, zero tool loop. A concrete proof that Mycelos workflows don't always need a language model.
- New
POST /api/models/refreshfor on-demand checks from the Settings UI. - Settings page gained a "Check for new models" button next to the Models heading. Surfaces a banner listing newly-discovered models with guidance to assign them in System Defaults.
ModelRegistry.sync_from_litellm(prefer_remote=True)now returns{"added": [...], "updated": [...], "total": N}instead of a bare count. On remote-fetch failure it silently falls back to the bundled map, so the worst case is unchanged behavior.- New
models.discoveredaudit event (Noteworthy tier) surfaces in the Doctor Activity panel when new models are found.
Security — Close Path Traversal in KnowledgeBase.write + append_related_link
KnowledgeBase.write()derived the file path from the note title viaNote.generate_path()without running it through_safe_path(). A prompt-injected or malicious title (e.g.../../etc/passwd) could write outside~/.mycelos/knowledge/. Now validated — traversal raisesPathTraversalErrorand logsknowledge.traversal.blocked.KnowledgeBase.append_related_link()took bothnote_pathandtarget_pathwithout validation. Both now go through_safe_path. Previously a traversal-y target path would have been embedded as an active wikilink in the note body.- Three new tests in
tests/security/test_knowledge_traversal.pycoverwritevia title,append_related_linkvia note_path, andappend_related_linkvia target_path.
Doctor — Activity Panel with Suspicious / Noteworthy / All tabs
- System Doctor page gained an Activity section that shows the recent audit feed classified in real time. Three tabs:
- Suspicious — only security-relevant events (tamper detection, tool/policy denials, credential rotations, capability expiry, security-gate blocks,
*.flood_blocked,*.denied,*.tamper_detected). Empty state = green "Clean" banner. - Noteworthy — everything except high-volume noise (default).
- All — raw feed including
reminder.tick,scheduler.tick,llm.usage,session.heartbeat.
- Suspicious — only security-relevant events (tamper detection, tool/policy denials, credential rotations, capability expiry, security-gate blocks,
- Time window selector (1h / 24h / 7d / All).
- New
GET /api/audit/activity?level=…&since=…&limit=…endpoint with classification counts so the tab badges fill in without a second roundtrip. - The CLI
--suspicious/--quietfilter lists and the Doctor classification now share one source of truth inmycelos.audit_patterns.
Audit CLI — Suspicious / Quiet / Time Filters
mycelos db auditgained--suspicious(only security-relevant events: tamper detection, tool/policy denials, credential rotations, capability expiry, security-gate blocks, *.flood_blocked, *.denied),--quiet(hides high-volume noise: reminder.tick, scheduler.tick, session.heartbeat, llm.usage),--since 30m|1h|24h|7d(time-range filter),--agent <id>(per-agent), and comma-separated--type a,b,c.- Examples in the command help:
mycelos db audit --suspicious --since 24h,mycelos db audit --quiet --since 1h,mycelos db audit --agent mycelos --since 1h.
Models — Hardcoded Model IDs Replaced with Registry Lookups
- Background LLM calls (knowledge summary, tag extraction, vision analysis for scanned PDFs, knowledge organizer classification, note-split helpers, knowledge UI "improve" action, chat compaction summarization) now resolve the model through
app.resolve_cheapest_model()/resolve_strongest_model()instead of pinningclaude-haiku-4-5orclaude-sonnet-4-5in the source. Users who change the Background or Default execution chain in Settings now actually see those choices honored everywhere. create_persona_agenttool resolves short tier names (haiku/sonnet/opus) against the live model registry instead of the previous hardcoded 4.5/4.6 IDs.compact_conversationaccepts asummary_modelkwarg; the chat service now passes the cheapest registered model.- The Agents detail page (
/pages/agents.html) replaces the free-text Model input with a dropdown populated from/api/models, plus an explicit "Use system default" option. - Every registered agent (including the Mycelos primary chat agent) now has an explicit row in the Settings page. Agents without a custom model chain show an "Inherits default" badge plus an Override button that seeds the edit buffer with the current system default. Dropdown + Up/Down + Remove + Add-Fallback controls per row. Save is per-agent.
- System defaults are shown as a separate "System Defaults" section with human-readable labels: "Default execution chain" (fallback for agents without their own assignment) and "Background tasks" (cheapest model for knowledge classification, reminders, session summaries).
- Onboarding now assigns the Mycelos primary chat agent its own execution chain (previously it silently inherited system defaults and was invisible in the UI).
/api/modelsnow returns a top-levelagentslist (id, name) so the UI can render registered-but-unassigned agents.PUT /api/models/assignments/{agent_id}andPUT /api/models/system-defaultsreplace the model chain for one scope, validating every model ID exists before writing (fail-closed). The system-defaults endpoint preserves the other purpose's chain when updating one.
Security — MCP Credential Lookup Fail-Closed (Rule 3)
MycelosMCPClient._resolve_tokenno longer swallows exceptions from the credential proxy. Credential-store errors now surface to the caller instead of silently degrading to an unauthenticated request that produces a confusing 401 downstream.
Security — HTTP Tool Error Sanitization (Rule 4)
http_get/http_postnow run exception messages throughResponseSanitizerbefore returning them to agents. Inline URL credentials (https://user:pass@host) and reflected tokens (Bearer, API-keys, …) no longer leak into agent-visible error responses.ResponseSanitizergained a new pattern that redacts userinfo in URLs.
Security — Config Tamper Detection (SEC09)
ConfigGenerationManager.get_active_config()and_load_config()now re-compute the SHA-256 of the stored snapshot and compare toconfig_hash. On mismatch they raiseConfigTamperErrorand emit aconfig.tamper_detectedaudit event when an audit logger is wired in. Previously a direct DB write toconfig_generations.config_snapshotwas silently loaded as truth.
Security — Automatic Audit Trail for Registry Mutations (Rule 1)
ConfigNotifier.notify_change()now emits a{trigger}.appliedaudit event with the change description every time it is called. Credential rotations, policy changes, agent status updates, workflow deprecation, schedule add/pause/resume/delete, mount add/revoke, model registry changes, and connector registry changes — all now leave a trace without needing each caller to remember.- The audit event is emitted even when the config generation insert itself fails, so a DB degradation cannot silently hide a state change.
Security — Agent Subprocess Env Hardening
agent_runner._safe_env()now strips*_API_KEYand*APIKEYvariables from subprocess environments (previously only matched SECRET/TOKEN/PASSWORD/CREDENTIAL/MASTER_KEY substrings — ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY etc. leaked through)- Added SEC05 tests in
tests/security/test_sandbox_boundaries.pycovering the denylist
PDF Knowledge Ingest
- PDFs uploaded via Telegram or Web are now saved as Knowledge documents with LLM-generated summaries
- New
documentnote type withsource_filefield linking to original PDF inknowledge/documents/ - Text extraction via pymupdf (free), summarization via Haiku (~$0.005)
- Scanned PDFs (no text layer) stored with placeholder — Vision analysis available on request
- Vision renders pages as PNG, sends to Claude Sonnet (~$0.02/page), extracts text + structure as Markdown
- PDF icon, download button, and Vision button in Knowledge UI
- Telegram and Web upload handlers route PDFs through the ingest pipeline automatically
Note Splitting
- New
note_splittool: LLM analyzes a note and proposes 2-5 focused sub-notes - Split button (scissors icon) in note detail UI with section preview before confirming
- Original note becomes an index with Wikilinks to the child notes
- Available via chat ("split this note") and UI button
- Both
note_splitandnote_visionregistered inknowledge_managediscovery category
Telegram Notification Fix
- Fixed workflow notifications failing silently when message exceeds Telegram's 4096-character limit —
send_notification()now auto-splits long messages at paragraph/line boundaries - Fixed
mark_notified()being called even when Telegram delivery failed — undelivered notifications now retry on the next 1-minute cycle instead of being silently lost
Knowledge Base — Duplicate Detection
- Organizer now detects duplicate notes via vector similarity (threshold 0.92) using existing embeddings — no extra LLM calls
- New
mergesuggestion type in organizer inbox with similarity percentage - Auto-merge after 24h: appends newer content to older note, merges tags, archives the duplicate
- "Find Duplicates" button for one-time full sweep across all notes
- New API endpoint:
POST /api/organizer/sweep-duplicates - Merge execution on accept:
POST /api/organizer/suggestions/{id}/acceptnow handles merge kind
Knowledge Base — Note Detail Actions
- Status toggle: click the status badge on tasks to mark done/reopen
- Archive button in note detail action bar (next to delete)
- Editable tags: remove with "×", add with inline input
- Priority selector: None/Low/Medium/High dropdown with color-coded badge
- Extended
PUT /api/knowledge/notes/{path}with status, tags, priority, archive fields
Week 15 (2026)
Prompt Architecture
- Added
PromptLoaderclass for loading Markdown prompt files with{variable}substitution - Extracted all agent system prompts from Python code to editable Markdown files in
src/mycelos/prompts/:mycelos.md— main Mycelos system promptmycelos-channel-api.md,mycelos-channel-cli.md,mycelos-channel-telegram.md— channel-specific additionsbuilder.md— Builder-Agent promptplanner.md— PlannerAgent prompt (with{system_context}variable)knowledge-organizer.md— Knowledge organizer prompt
- Added explicit cost-optimization rule to Builder prompt (default to haiku for workflows)
Code Cleanup
- Removed dead
CreatorAgentclass (creator.py) — superseded by CreatorPipeline - Cleaned up Orchestrator: removed unused CREATE_AGENT routing path
- Removed
tests/test_creator.pyand CREATE_AGENT test from orchestrator tests
Reminder Scheduler Overhaul
- Reminders now fire through a periodic Huey job (
reminder_tick, every 1 minute) — the old fire-once daemon-thread approach had no persistence (gateway restart = lost reminder) and never fired anything that was persisted with plainreminder=1, due=today - New column
knowledge_notes.reminder_fired_at(ISO datetime, nullable) replaces the destructivereminder = 0reset. The reminder flag now means "this task has a reminder configured";reminder_fired_atmeans "…and it's already been handled" (either by the scheduler or by the user dismissing it) - New unified query
ReminderService.get_due_reminders_now()honors bothremind_atprecision and thereminder_fired_atguard: a row is ripe when it's flagged, not dismissed, and eitherremind_at <= nowor (remind_at IS NULLanddue <= today).remind_atalways wins when set note_write(remind_in="5m")andnote_remind(when="5m")no longer spawn a daemon thread. They computeremind_at = now + deltaand persist it; the Huey tick takes over from there. Gateway restart is now survivable- Inbox bell: no longer shows future reminders or already-dismissed entries — it reflects what needs attention right now. The query goes through the same
get_due_reminders_now()helper so the scheduler and the bell can't disagree - Bell entries are click-to-dismiss: clicking a reminder POSTs to
/api/admin/inbox/dismiss, which stampsreminder_fired_at=nowand emits areminder.dismissedaudit event, then navigates to the note. The entry disappears from the bell on the next refresh - New doctor check
reminder_schedulerwarns when there's been noreminder.tickaudit event in the last 2 hours — a clear signal that the Huey consumer is dead and reminders won't fire - Audit events renamed:
reminder.sent→reminder.fired(withchannels_succeeded/channels_faileddetail) and newreminder.dismissed,reminder.tick
LLM Time Awareness
- Each user message now arrives at the LLM with a
[current time: YYYY-MM-DD HH:MM]prefix so relative phrasing like "in 5 minutes" resolves against now, not against the stale session-start moment baked into the system prompt - Prefix lives only in the in-memory conversation sent to the model — the persisted session store still records the pure user text, so replays, audits, and exports stay clean
- Prefix is regenerated on every user turn, not every model message (tool_results, proactive notifications, assistant turns) — minimal token overhead
- Does not fix the separate scheduler-never-runs bug: relative reminders that the LLM translates to
note_write(remind_in="5m")still rely on the daemon-thread timer path, not on a periodic scheduler tick
Task + Reminder Detail in Knowledge UI
- New
knowledge_notes.remind_atcolumn (ISO datetime, nullable) — separate fromdue(which stays a date).dueanswers "when is it due",remind_atanswers "when exactly should I be reminded" KnowledgeBase.set_reminder(path, due, remind_at=...)+/api/knowledge/notes/.../remindaccept the new field; calling withoutremind_atclears a previously-set datetimeGET /api/knowledge/notes/{path}now returnsreminder,remind_at,remind_viaalongside content — the detail view reads these from the index row so DB-only updates are visible immediately- Knowledge detail pane: type badge, task status badge, due-date badge, reminder badge with exact fire time, and "Set time / Change time" datetime-local input that writes through the existing
/remindendpoint - Task list rows now have a hover tooltip with title, due date, and reminder status
Header Inbox Bell
- Lightning-bolt icon removed from the header (never had a handler)
- Bell now opens a dropdown with three sections: due Reminders, Waiting for you (workflow runs in
waiting_input), Failed (24h) workflow runs. Red count badge on the bell reflects the sum - New
/api/admin/inboxendpoint aggregates the three lists in one read-only call, polled every 60s while the page is visible - Each inbox entry deep-links to the right spot: reminders → Knowledge, waiting workflows → Chat resume, failed → Workflows run detail
Session Titles
ChatServicedeterministically sets a session title from the first user message (up to 60 chars, ellipsised) — independent of the LLM so it can't be forgotten. The LLM'ssession_set()tool can still overwrite later, and an existing title is never clobbered- UI fallback for untitled sessions shows the formatted start time ("Apr 11, 16:04") instead of the raw session_id
SessionStore.backfill_titles_from_first_message()+ newmycelos sessions backfill-titlesCLI subcommand for one-shot retrofitting of legacy sessions that never got a title
Doctor in the Web UI (read-only)
- New admin page
/pages/doctor.html— click "Doctor" in the sidebar and you get the same health-check suite asmycelos doctorfrom the CLI, without leaving the browser - New endpoint
GET /api/admin/doctor— deliberately read-only: no mutation, no LLM, no subprocess. Runsrun_health_checks(app, gateway_url=None)and returns the structured result list run_health_checks: passinggateway_url=Nonenow skips the server-reachability check entirely instead of reporting "server not running" — the gateway doesn't need to ping itself- Summary strip shows Healthy / Warnings / Errors / Not configured counts; each check renders as a status-coloured card with its details
- Sidebar entry + i18n keys (
sidebar.admin_doctor, fulldoctor.*block in en/de) - Auto-fix and
--why(LLM diagnosis) stay CLI-only by design — neither is safe to expose over a network endpoint without auth, and they're not part of this feature
Workflow Runs ↔ Session Linking
workflow_runsschema: newsession_id TEXTcolumn +idx_workflow_runs_session_idindex, migrated on existing DBsWorkflowRunManager.start(session_id=...)+list_runs_by_session()— runs now remember the chat session they were triggered fromWorkflowAgent.__init__acceptssession_id; chat service passes it through for both inline workflow runs and/runcommands (headless/cron runs stay NULL)/api/workflow-runs/{id}exposessession_idin the detail payload/api/admin/sessionsenriches every session with aworkflow_runsarray (id, workflow_name, status, created_at) via a single JOIN — no N+1- Admin workflows page: Status filter chips above Recent Runs (Failed+Waiting / Running / Completed / All) with per-chip counts, defaulting to Failed+Waiting so attention-needing runs surface first
- Admin workflows page: "View Session" button in the run detail panel when a run has a session_id, linking to
/pages/sessions.html?session_id=… - Admin workflows page:
?run_id=<id>deep-link auto-expands the target run (widens filter to "All" if needed) - Admin session inspector: Workflow badges next to the session title link back to
/pages/workflows.html?run_id=<id>, colour-matched to run status; sidebar rows show a compact workflow count badge - Admin session inspector:
?session_id=<id>deep-link auto-selects that session - i18n:
sidebar.admin_sessionskey added to en/de locales (was showing raw key)
Test Suite Stability
- E2E
test_page_loads: heading locators scoped tomain h1, main h2so they no longer accidentally match (now-visible) sidebar entries from the expanded Admin submenu;docs.htmlandabout.htmltitle_text updated to match the real page headings (Documentation,Mycelos) — a latent bug that only started firing after the sidebar gained entries with the same names - E2E
test_sidebar_navigation: link lookups scoped to the desktop<aside>(avoids strict-mode violations from mobile nav duplicates) and now explicitly expands the Admin submenu before clicking Workflows/Connectors - E2E
test_add_connector_via_page: name-input locator pinned to the form's placeholder instead oflocator("input").first(which had started matching the sidebar'squick-capture-input) test_voice_handler_calls_stt: async handler is now driven from a dedicated thread so it co-exists with Playwright's uvloop in combined runs — previously failed only when run after an e2e file in the same session
Session Audit & Debug Inspector
SessionStoreextended withappend_llm_round,append_tool_call,append_tool_result,append_tool_error— structured JSONL events for every chat sessionload_all_events,list_sessions_with_stats,purge_old(30 days)methods- Chat service instruments every LLM round and tool execution: args, results, errors with traceback
- New admin API:
/api/admin/sessions,/api/admin/sessions/{id}/events,/api/admin/sessions/{id}/download - Download formats: JSONL, JSON, Markdown
- New admin page
/pages/sessions.htmlwith timeline view, filters, and search — session-level debugging now possible from the web UI - Fills the gap between our auditability promise and the previous message-only session logs
Security & Network Access
MYCELOS_PASSWORDenvironment variable support for Basic Auth (serve_cmd + docker-compose).env.exampleupdated with network access / password guidance- README section on network access + security
.gitignorefix so.env.exampleis actually tracked (was blocked by.env*pattern)- Mic button in chat UI disabled when not in a secure context (HTTPS or localhost)
Onboarding Redesign
- Level-aware LLM prompt:
get_level_prompt()returns level-scaled prompt blocks — Newcomer gets detailed guidance (~200 tokens), Power User gets minimal (~30 tokens) - Replaced static
_ONBOARDING_PROMPTand_SETUP_HINTS_PROMPTwith dynamic level-aware injection in system prompt - Benefit-oriented hints: condition-based, deterministic selection instead of random generic tips — power users (level 5+) get no hints
- Simplified onboarding conversation: positioning intro ("grows with you, data stays local"), first note capture, no connector push
- Fixed agent rename bug:
display_namenow syncs to agents table when written viamemory_write(UI shows chosen name) - Added positioning welcome box to
mycelos init(Rich panel, i18n en+de)
Knowledge Tools + Breadcrumb
- Breadcrumb path on note detail view — clickable segments navigate to the parent topic
topic_renametool — renames topic, updates children paths + on-disk filestopic_mergetool — soft-merge with redirect note (no wikilink rewriting)topic_deletetool — deletes empty topics (refuses if children exist)note_archivetool — archives note (hidden from views, auto-deleted after 30 days)find_relatedtool — finds semantically similar notes via FTS5topic_overviewtool — structured topic summary with child countsknowledge_statstool — knowledge base statistics (notes, topics, tasks, archived)- Organizer lifecycle: archived > 30 days → hard delete (DB + disk)
- All new tools registered in Lazy Tool Discovery categories
Lazy Tool Discovery
- Context-adaptive tool loading: core tools always loaded, dynamic basis-set filled by usage frequency, specialized categories discovered on demand via
discover_toolsmeta-tool - Token budget calculated from model context window (5%, capped at 4096 tokens) — local 8K models get ~3 tools, Sonnet gets the full basis-set
tool_usagetable tracks call frequency per user+agent for adaptive basis-set selection- All 37 registered tools assigned to 8 categories (max 8 tools each): core, knowledge_read, knowledge_write, knowledge_manage, workflows, connectors, system, email
discover_toolsinterception in ChatService with mid-session category loading- System prompt updated with discovery instructions for the LLM
- Builder and WorkflowAgent continue using full tool access (unaffected)
Knowledge — Smart Import + Topic Map (Milestone C)
- Smart Import: zip upload with auto detection (≥3 folders → preserve, otherwise suggest)
- Preserve mode mirrors source folders into
topics/<lowercased-chain>/, parses YAML frontmatter, skips LLM - Suggest mode drops files into
imports/<YYYY-MM-DD>/and triggers the organizer synchronously to populate the inbox POST /api/knowledge/importmultipart endpoint (replaces the legacy Obsidian importer)- Smart Import button on Knowledge page with modal, option toggle (auto/preserve/suggest), file picker, and global drag-drop zone
- Topic Map: auto-generated Mermaid graph embedded in every topic-index note by
regenerate_topic_indexes, collapsed in<details>when the topic has ≥16 sub-notes - Wikilink edges between sub-notes are rendered as graph edges
Knowledge — Lazy Organizer + Inbox (Milestone B)
- New
knowledge-organizersystem handler (Haiku via broker): Huey periodic trigger (hourly), batch limit 30, confidence threshold 0.8 - Pure classification logic split into
mycelos/knowledge/organizer.py:decide_action,Classification,is_done_task_older_than,is_fired_reminder_past,SILENT_CONFIDENCE - Lifecycle: done tasks > 7 days old and fired reminders > 1 day in the past are auto-archived
InboxServiceCRUD layer (mycelos/knowledge/inbox.py) fororganizer_suggestions- Four new
/api/organizer/*endpoints: list grouped suggestions, accept (applies move/create_topic/link), dismiss, force run KnowledgeBase.append_related_link()— append-only wikilink insertion under## Verwandtheading- Organizer Inbox card on the Knowledge page (grouped by kind, Accept/Dismiss per item, Run-now button)
mycelos doctor --check organizer— reports pending queue size and last run timestamp- Bug fix: organizer handler now passes
claude-haiku-4-5to the LLM broker instead of the bare"haiku"model alias (LiteLLM requires the full provider-prefixed name)
Knowledge — Foundation + Quick Capture (Milestone A)
- v3 schema migration:
organizer_state,organizer_seen_atcolumns onknowledge_notesand a neworganizer_suggestionstable with a partial index on pending suggestions bucket_note()deterministic helper — reminders / due-date notes →tasks/, everything else →notes/parse_noteDE+EN parser in Python and JavaScript, driven by shared test vectors intests/fixtures/parse-note-vectors.jsonPOST /api/knowledge/notesextended with server-side parsing, bucketing, andknowledge.note.createdaudit eventCmd+KQuick Capture modal on every sidebar-layout page (plain JS, injected vialayout.js); inline parse chips show type / reminder / due / tags while typing; Enter saves to the API- Knowledge page:
Uncategorizedrenamed toPending; empty state prompts forCmd+K - Sidebar footer hint for Quick Capture discoverability
- Global
[x-cloak]CSS rule added to prevent Alpine components from flashing visible on load loadFragmentnow re-executes<script>tags in injected fragments so plain-JS partials like Quick Capture wire up
Week 14 (2026)
Agent Routing (Custom Agents & Personas)
- Dynamic agent discovery: Mycelos handler dynamically discovers registered custom agents and exposes them as tools or handoff targets
- Code agents as tools: Custom code agents (e.g., pdf-text-extractor) are exposed as
run_agent_*tools — LLM calls them directly instead of using built-in tools - Persona agents as handoff: Persona agents added to handoff tool enum — users can say "talk to Stella" and get routed
- Agent subprocess execution:
_execute_custom_agentloads code from object store via code_hash and runs in isolated subprocess via AgentRunner - Dynamic routing rules: System prompt includes custom agent descriptions with instruction to prefer specialist agents over built-in tools
- MCP connector context: Active MCP connectors listed in system prompt with usage instructions
- Audit trail: Every custom agent execution logged as
agent.executedevent
Security Fixes (Sentinel PR findings, implemented ourselves)
- KB path traversal fixed:
_safe_path()withPath.resolve() + relative_to()on all filesystem-touching methods (read, update, move_to_topic, set_reminder, regenerate_topic_indexes). Blocked attempts logged asknowledge.traversal.blockedaudit event. - Auditor AST bypass fixed: Added
ast.Calldetection for bareeval(),exec(),compile(),__import__()without imports. Addedast.Assigndetection for function aliasing (e = eval). NewDANGEROUS_FUNCTIONSset. - 9 security tests for path traversal, 6 tests for AST bypass detection
Security Hardening (Code Review Findings)
- Capability token race condition fixed: atomic SQL UPDATE prevents TOCTOU in token validation
- Exception string sanitization: 9 locations in proxy_server.py and workflow tools no longer leak raw error details to clients
- Silent exception handlers: 14
except: passblocks now log at debug level instead of swallowing errors silently - Dead code removed: 440 lines of legacy tool definitions from chat/service.py
Agent Dependency Management
- Dependencies field: AgentSpec and create_agent schema now support
dependencies: ["pdfplumber", "pandas"] - User permission for pip install: missing packages trigger PermissionRequired — user sees permission prompt before installation
- TestRunner uses real libraries: installed packages are no longer mocked in test sandbox — pdfplumber tests run with real pdfplumber
- create_sample_pdf fixture: TestRunner provides PDF creation fixture using pure Python — no extra library needed for test fixtures
- Dependency-aware prompts: test generator and code generator know which libraries are available and generate appropriate code
- Partial test registration: agents with ≥30% passing tests register as active (sandbox limitations don't block registration)
- Builder awareness: Builder-Agent prompt and schema updated to pass dependencies when creating agents
Workflow Progress & Session Persistence
/runthrough ChatService:/runcommands now go through the full chat pipeline with streaming progress events and session persistence (previously used slash-command path with no persistence)- Tool-call progress events:
on_progresscallback injected into tool context — workflow tool calls emit step-progress SSE events on all code paths - Slash command persistence: all slash command responses (not just /run) now persist to JSONL session store
- New Session endpoint: added
POST /api/sessions— "New Chat" button now works correctly - Conversation validation after permission: fixes tool_use/tool_result pairing errors after PermissionRequired interruptions
UX Improvements
- Mobile navigation: "More" overflow menu with Knowledge, Workflows, Connectors, Settings
- Chat accessibility: aria-labels on textarea, send, mic, and attach buttons
- i18n widgets: 50+ hardcoded English strings replaced with t() calls, new keys in en.yaml and de.yaml
- i18n key prefix fix: removed incorrect
web.prefix from chat.html translation keys
Creator Agent E2E Tests
- 6 integration tests covering: handoff to Builder, pipeline execution, full creator flow, dependency management (missing/installed/multiple)
Competitive Analysis
- Detailed comparison with OpenClaw completed: Mycelos wins on security, self-evolving agents, config rollback, knowledge/memory, cost optimization. OpenClaw wins on channel breadth (20+), mobile apps, community
Workflow Run Detail View
- Expandable detail panel: clicking a run row in "Recent Runs" expands to show full result, error, tool calls, cost breakdown, and completed steps
- Single-run API endpoint:
GET /api/workflow-runs/{run_id}returns full run data with parsed conversation and token totals - Markdown rendering: result text rendered via marked.js with prose styling
- Tool call extraction: parses both Anthropic and OpenAI conversation formats to display tool usage
- Duration calculation: shows elapsed time for completed runs
Background Workflow Execution
- Run persistence: every workflow execution (chat, scheduled, background) now persists to
workflow_runstable with status, cost, result, conversation - Background dispatch: workflows can run in a background thread — user gets immediate acknowledgment, result delivered via notification
- Clarification pause/resume: when a workflow needs user input, it pauses as
waiting_inputwith conversation saved to DB. User replies resume the workflow seamlessly — works across gateway restarts - Notifications: completed/failed background and scheduled workflows notify the user via Telegram (periodic check every minute)
- API endpoints:
GET /api/workflows/{id}/runsandGET /api/workflow-runsfor run history - Workflows UI: new "Recent Runs" section shows status badges, relative timestamps, cost, result previews, and "Answer" links for paused workflows
- Real-time progress: workflow tool calls stream as
step-progressSSE events (search_web running... done) - Dead code removed: ManagedWorkflowExecutor, scoring.py, related tests (~1030 lines)
Connectors & Channels
- MCP package names fixed: all recipes changed from
@anthropic/mcp-server-*to@modelcontextprotocol/server-*(brave-search, fetch, sqlite, slack, google-drive) - Builtin connectors skip MCP startup: email and other builtin connectors no longer crash on gateway start
- MCP auto-start on setup: recipe-based connectors start immediately after registration (no gateway restart needed)
- Gmail wizard fix: clicking Gmail tile now opens email wizard instead of Slack wizard
- Channel API: new
POST /api/channelsendpoint registers channels in DB + connector registry - Telegram wizard registers channel: wizard now writes to channels table so Telegram shows as "active" in UI
Test Suite Cleanup
- Removed 59 duplicate tests (1810 → 1751) with zero coverage loss
- Deleted
test_agent_registry.py(superseded by_v2.py) - Removed 46 duplicate slash command tests from
test_integration_comprehensive.py - Removed 7 misplaced agent/workflow tests from
test_memory_system.py - Fixed init wizard hangs: tests now provide complete input for all wizard prompts
- Fixed security proxy test: mock DNS resolution so httpx mock works without network
- Added pytest-timeout=30s: catches hanging tests early instead of blocking forever
- Test suite now runs in ~50s (was 8:48 with 17 failures)
Web UI Internationalization
- Added
web.*translation namespace to EN/DE locale files (sidebar, dashboard, agents, chat, knowledge, workflows, connectors, settings, common) - New
GET /api/i18nendpoint returns translations for active user language - Frontend
i18n.jsmodule with Alpine.js$t()magic for reactive translations - Migrated all HTML templates (sidebar, header, mobile-nav, all pages) to
$t() - Key parity test ensures EN and DE stay in sync
Voice Input in Chat
- Microphone button records audio via MediaRecorder API
- Real-time waveform visualization (Web Audio API frequency bars) with recording timer
- New
POST /api/transcribeendpoint for transcription-only (returns JSON, not SSE) - Transcribed text appears in textarea for review/editing before sending
Week 13 (2026)
i18n: Remove all German strings from code (Constitution Rule 6+9)
chat/context.py: all LLM context strings translated to English (25 strings)chat/service.py: workflow status messages to English (6 strings)agents/creator_pipeline.py: error messages to English (8 strings)agents/gherkin_generator.py: empty result message to Englishcli/demo_cmd.py: permission options moved to bilingual_TEXTSdict- Tests updated to assert on English strings
Security: Response Sanitization + SSRF Hardening (from PR #24)
- Final assistant response now sanitized via
ResponseSanitizer(prevents credential reflection by LLM) - SSRF:
is_multicast+is_unspecifiedIP checks added (both http_tools and proxy_server) - HuggingFace (
hf_*) and Stripe (sk_live_*) credential patterns added to sanitizer - Proxy error sanitization consolidated to use central
ResponseSanitizer - Skipped: overly broad generic patterns (
token|session|cookie|sid) — too many false positives - 8 new tests: multicast/unspecified SSRF, HuggingFace/Stripe patterns, false-positive checks
Chat UX Flow Fixes
- Suggested Actions: new
suggested-actionsSSE event renders clickable command buttons in chat - Connector setup and credential commands now show "Restart Gateway" button instead of text-only instruction
- Builder handoff tool loop: after handoff, new agent's tool calls are now executed in a loop (max 10 rounds) instead of being silently dropped
- Gateway restart auto-reconnect: frontend detects restart event, polls
/api/health, and shows "Gateway restarted. Ready." when back online /restartnow returns structured events instead of plain text
Security & NixOS Config Consistency Fixes
- Timing attack fix: proxy token comparison now uses
hmac.compare_digest - NixOS config generation: ModelRegistry wired to ConfigNotifier (add/remove/defaults/agent)
- NixOS config generation: AgentRegistry notifier calls for
update_reputation,save_code,set_models - NixOS config generation: Credential
mark_security_rotatedtriggers config generation - Default user:
mycelos initcreates "default" user in users table - Closed PRs #21, #22, #23 (findings cherry-picked, branches can be deleted)
- user_id FK constraints: all 10 tables with
user_idnow haveREFERENCES users(id) userstable moved to top of schema (defined before dependent tables)- Default user seeded directly in schema via
INSERT OR IGNORE - Tests updated: test users created in fixtures for FK compliance
WorkflowAgent — LLM-Powered Workflow Execution
- New
WorkflowAgentclass (src/mycelos/workflows/agent.py) replaces dumb WorkflowRunner for plan-based workflows - LLM loop: executes workflow plan as system prompt, calls tools, handles multi-round reasoning
- Tool scoping: each workflow defines
allowed_tools— only those are visible to the LLM (both built-in and MCP) - Wildcard support:
playwright.*allows all Playwright MCP tools,filesystem.*scopes filesystem access - Clarification flow: LLM signals
NEEDS_CLARIFICATION:→ workflow pauses, user responds, agent resumes - Full conversation tracking for pause/resume (stored in
workflow_runs.conversation) - Model selection per workflow (
haiku,sonnet,opus) — Builder picks cheapest capable model - Max rounds safety limit prevents infinite loops
- DB schema: added
plan,model,allowed_toolscolumns toworkflowstable - DB schema: added
conversation,clarificationcolumns toworkflow_runstable - WorkflowRegistry updated:
register()andupdate()accept agent fields - 16 new tests covering tool scoping, LLM loop, clarification, model selection, conversation tracking
- System agents updated: Creator+Planner replaced by Builder, Workflow-Agent added
- Smart defaults: Builder gets opus, Workflow-Agent gets haiku (overridden per workflow)
- ToolRegistry:
workflow-agent:*prefix recognized as system agent (full tool access)
Knowledge System v2 — Smart Zettelkasten
- Topics: notes with
type='topic'serve as organizational containers create_topic(),list_topics(),list_children()methods on KnowledgeBase- Auto-generated topic index content listing child notes, tasks, and tags
- Auto-classify on insert: LLM (Haiku) classifies new notes — extracts type, due, topic, tags
- Matches to existing topics or creates new ones automatically
auto_classify=Trueflag onnote_write/kb.write()- Parent-child hierarchy:
parent_pathcolumn links notes to topics - Reminders:
remindercolumn +set_reminder(path, due)method - New tools:
note_done(mark task done),note_remind(set due + notification),note_move(change topic) - Extended
note_writetool withtopicandreminderparameters - DB schema: added
parent_path,reminder,sort_ordercolumns toknowledge_notes - Note model:
reminderandparent_pathfields in frontmatter - 24 new tests covering topics, auto-classify, tools, schema, topic indexes
- Search improvements:
note_searchtool now acceptsstatusandduefilters this_weekdue filter added to indexer (today through end of week)- Reminder workflow:
check-reminders.yamlseed workflow (scheduled, uses WorkflowAgent) - Note-intake workflow:
note-intake.yamlseed workflow for auto-classifying incoming notes - WorkflowRegistry YAML import now reads
plan,model,allowed_toolsfrom YAML - Web UI: Knowledge page redesigned with three-view layout:
- Topics view: collapsible topic tree with child notes, task checkboxes, reminder bells
- All view: flat note list (existing behavior)
- Tasks view: overdue (red border), open, done sections with inline checkboxes
- Toggle done: click checkbox to mark task done/open
- Toggle reminder: bell icon to enable/disable notifications
- New API endpoints:
/api/knowledge/topics,/api/knowledge/topics/{path}/children,/api/knowledge/notes/{path}/done,/api/knowledge/notes/{path}/remind,/api/knowledge/notes/{path}/move
Static Website (mycelos.com)
- Astro 5 project scaffolded in
website/with Neural Mycelium design tokens (Tailwind CSS v4) - Particle Constellation hero animation (Canvas 2D, 120 particles, mouse-reactive connections)
- Home page: full-viewport hero, value proposition cards, 6-feature grid, architecture preview, CTA
- Docs: 10 sections rendered from shared Markdown files via Astro Content Collections
- Constitution page with Evolve principle and 6 product principles
- About page migrated from local frontend HTML
- Changelog page rendering CHANGELOG.md at build time
- 15 static pages total, builds in ~500ms
Content Architecture
- Extracted 10 docs sections from embedded HTML (docs.html) into individual Markdown files in
docs/website/ - Created Product Constitution (
docs/constitution.md) with Evolve philosophy - Created About page (
docs/about.md) from existing about.html - Single Source of Truth: both local frontend and website render from same Markdown
- Added
GET /api/docsandGET /api/docs/{slug}endpoints for local frontend - Migrated local docs.html from 815 lines embedded HTML to dynamic Markdown loading (394 lines)
- TOC scroll highlighting re-initialized after dynamic content loads
Docs API Endpoints
- Added
_parse_frontmatter(),_list_docs(),_get_doc()helper functions tosrc/mycelos/gateway/routes.py - Added
GET /api/docsendpoint — returns sorted list of doc sections with slug, title, description, order, icon fromdocs/website/*.mdfrontmatter - Added
GET /api/docs/{slug}endpoint — returns single doc content (Markdown body without frontmatter) or 404 - Both endpoints resolve
docs/website/relative to the package file viaPath(__file__).parent.parent.parent.parent _get_doc()rejects slugs with non-[a-z0-9-]characters (path traversal protection)- Added
import reandfrom pathlib import Pathto routes.py imports - Created
tests/test_docs_api.py— 4 tests: list returns all sections, get returns Markdown body, 404 for missing, rejects path traversal (4/4 pass)
Website — Astro Project Scaffold
- Created
website/Astro project with Tailwind CSS v4 via@tailwindcss/viteplugin website/astro.config.mjs— site set tohttps://mycelos.com, Tailwind via vite pluginwebsite/tailwind.config.mjs— Neural Mycelium design tokens (colors + font families)website/src/styles/global.css— Google Fonts import, Tailwind v4@import "tailwindcss",@themeblock for design tokens,.proseclass styling for rendered Markdownwebsite/src/content/config.ts—docscollection schema:title,description,order,iconwebsite/src/content/docs— symlink todocs/website/(SSOT for documentation Markdown)website/src/pages/index.astro— placeholder page with Neural Mycelium backgroundwebsite/public/— copiedlogo.png,favicon.ico,apple-touch-icon.pngwebsite/.gitignore— excludesdist/,node_modules/,.astro/website/package.json,website/tsconfig.jsonaddednpx astro buildpasses: 1 page built, content collection synced, 0 errors
Website — Constitution and About Pages
- Created
docs/constitution.md— user-facing Product Constitution with the Evolve Principle and six design principles (your data, security, transparency, autonomy, cost-conscious, open by nature) - Created
docs/about.md— extracted and converted fromsrc/mycelos/frontend/pages/about.html: What is Mycelos, Core Principles, Why Open Source, Technology (tech stack + LLM providers table), Getting Involved - Both files have YAML frontmatter (
title,description) and serve as shared source of truth for local frontend and mycelos.com static website
Website — Documentation Content Extraction
- Created
docs/website/directory as the Single Source of Truth for documentation content - Extracted all 10 documentation sections from
src/mycelos/frontend/pages/docs.html(lines 296–765) into individual Markdown files - Converted HTML to clean Markdown: headings, code blocks, bullet/numbered lists, tables, inline code
- Arch layer diagram converted to a text diagram block in
architecture.md - CLI Reference and API Reference styled div cards converted to Markdown tables
- Each file has YAML frontmatter:
title,description,order,icon(material icon name) - Files created:
getting-started.md,architecture.md,agents.md,connectors.md,workflows.md,knowledge-base.md,security.md,cli-reference.md,slash-commands.md,api-reference.md
Earlier in Week 13
Agent Handoff — Cleanup Old Routing
- Removed hardcoded
CREATE_AGENTrouting branch fromChatService.handle_message()— agent creation now handled via handoff tool to Creator handler - Removed hardcoded
TASK_REQUESTrouting branch — planning now handled via handoff tool to Planner handler - Removed
ChatService._handle_create_agent()method — replaced byCreatorHandler - Removed
route_result-based_pendingplan state population — Planner handler manages plan state directly - Removed unused
plan_eventimport - Updated
tests/e2e/test_chat_scenarios.py: Creator interview tests now use handoff-based flow - Updated
tests/test_creator_integration.py: replaced_handle_create_agenttests with handoff + handler tests - Added 4 integration tests in
TestHandoffIntegration: cross-service persistence, old routing removed, handler tools include handoff, handler prompts non-empty - Tests: 813 passing (pre-existing
test_init_credential_stored_encryptedexcluded)
Agent Handoff — Handler-Based Routing
- Added
App.get_agent_handlers()tosrc/mycelos/app.py: returns{"maicel": MycelosHandler, "creator": CreatorHandler, "planner": PlannerHandler}— central factory for handler instances - Added
ChatService._get_active_agent(session_id)tosrc/mycelos/chat/service.py: readssession_agentstable with in-memory cache; defaults to"maicel"when no row exists - Added
ChatService._execute_handoff(session_id, target_agent_id, reason, context): validates target (system agents always valid; non-system agents checked foruser_facing), updatessession_agentswithINSERT OR REPLACE, invalidates cache, logsagent.handoffaudit event - Added
ChatService._get_model_for_agent(agent_id): resolves agent-specific LLM model viamodel_registry; returnsNonefor system default - Updated
ChatService.handle_message(): looks up active agent handler before the LLM loop; uses handler'sget_system_prompt()(replaces system message in conversation),get_tools()(includes handoff), and model;agent_eventnow uses handler'sdisplay_nameinstead of hardcoded "Mycelos" - Added
ChatService._augment_tools_with_connectors(): extracted MCP connector tool injection (connector_tools, connector_call, github_api) so it can be applied to the mycelos handler's tool list dynamically - Added handoff tool dispatch in
ChatService._execute_tool_inner(): recognisestool_name == "handoff", calls_execute_handoff(), returns{"status": "handoff", "message": "Handed off to X: reason"} - Added handoff early-return in tool loop: when a
handofftool returnsstatus=handoff, emitssystem_response_eventwith the message and returns immediately (no further LLM call)
Tests
- Extended
tests/test_agent_handoff.pywith 6 new tests inTestHandoffExecution: handoff updates DB, rejects non-user-facing agents, default agent is maicel, active agent after handoff, DB persistence across service instances,app.get_agent_handlers()keys + agent_id. Tests: 207 total passing.
Agent Handoff — Tasks 3 & 4: MycelosHandler, CreatorHandler, PlannerHandler
- Created
src/mycelos/agents/handlers/maicel_handler.py:MycelosHandler— default chat agent wrapping_MAICEL_SYSTEM_PROMPT+CHAT_AGENT_TOOLSwith a dynamichandofftool; thetarget_agentenum is read live from theagentstable (user_facing=1, status=active) and falls back to["creator", "planner"]; includes_HANDOFF_RULESblock in the system prompt (creator for agent building, planner for complex multi-step tasks);handle()raisesNotImplementedErrorpending Task 5 wiring - Created
src/mycelos/agents/handlers/creator_handler.py:CreatorHandler— specialist for the agent creation pipeline; system prompt documents all four phases (interview, design, code generation, registration), tool guidelines for generated agent code (audit, credential proxy, capability scoping), and handoff rules (done/cancel/pause/unrelated → maicel); tools:handoff+note_write;handle()raisesNotImplementedError - Created
src/mycelos/agents/handlers/planner_handler.py:PlannerHandler— specialist for complex planning;get_system_prompt()callsbuild_planner_context(app)andformat_context_for_prompt()to inject live workflow/agent/connector state; tools:handoff+note_write+note_search+note_list+search_web; handoff rules: needs new agent → creator, done/simple → maicel;handle()raisesNotImplementedError
Tests
- Extended
tests/test_agent_handoff.pywith 9 new tests acrossTestMycelosHandler,TestCreatorHandler,TestPlannerHandler: agent IDs and display names,handofftool presence, prompt content assertions (handoff rules, creator/planner routing, audit, workflow context). Tests: 187 total passing.
Agent Handoff — Schema + Session Tracking
- Added
session_agentstable tosrc/mycelos/storage/schema.sql: tracks which agent is active per session (session_id,active_agent_idDEFAULTmycelos,handoff_reason,updated_at) - Updated
src/mycelos/storage/database.py: addedsession_agentsto_ensure_schemacheck list so it's auto-created for existing DBs - Added
("agents", "user_facing", "INTEGER NOT NULL DEFAULT 0")to_MIGRATIONSlist for column migration on existing databases
Agent Handoff — AgentHandler Protocol
- Created
src/mycelos/agents/handlers/__init__.py(package init) - Created
src/mycelos/agents/handlers/base.py:@runtime_checkable AgentHandlerProtocol withagent_id,display_name,handle(),get_system_prompt(),get_tools()— unified interface for all user-facing agents, enabling session-based routing without if-else chains
Tests
- Added
tests/test_agent_handoff.py: 7 tests coveringsession_agentstable existence, default behaviour (None row = maicel), INSERT/UPDATE round-trips,user_facingcolumn existence, and AgentHandler Protocol attribute presence + runtime-checkable flag. Tests: 173 total passing.
Docs — README rewrite
- Rewrote
README.mdfrom scratch: hero section, quick start (3 steps), feature groups, architecture diagram, security model, configuration commands, dev setup, tech stack table - Removed specific test counts and internal implementation notes not relevant to readers
- Clean structure under 300 lines, English-only, no marketing fluff
File Handling — Upload Pipeline + File Tools
Telegram document/photo handlers (src/mycelos/channels/telegram.py):
handle_document()— receives file attachments, size-checks BEFORE download (50MB limit), saves to inbox, extracts text, routes to ChatService for analysis; handlesvision_neededcase with user prompthandle_photo()— receives photos, saves to inbox asphoto-{unique_id}.jpg, prompts user for analysis consent- Both handlers registered BEFORE
handle_voice(aiogram routing order matters)
Web upload endpoint (src/mycelos/gateway/routes.py):
POST /api/upload— acceptsUploadFile, validates 50MB size limit, saves todata_dir/inbox, extracts text viaextract_text(), streams SSE response withsession_event+system_response_eventor full chat analysis; handlesvision_neededwith prompt, returns SSE for all code paths
File tools in ChatService (src/mycelos/chat/service.py):
file_analyzetool — checksMountRegistryfor read access, checks KB for existing analysis before re-extracting, returns text/method/path or vision_needed statusfile_managetool —move/copy/deletewithMountRegistrychecks on source (read) and destination (write), audits each operation, updates KB notes with new paths after move/copy- Both tools added to
CHAT_AGENT_TOOLSlist and_execute_tool_inner()
/inbox slash command (src/mycelos/chat/slash_commands.py):
_handle_inbox()—listshows files with sizes (KB/MB),clearremoves all, unknown subcommand returns usage- Added to
handlersdict, added to/helpoutput - Updated
src/mycelos/cli/completer.py(SLASH_COMMANDS) with/inbox+clearsubcommand
Frontend upload button (src/mycelos/frontend/out/index.html):
initFileUpload()— inserts paperclip button (📎) BEFORE the mic button, opens file picker on click, validates 50MB client-side, uploads viaPOST /api/uploadwith FormData, reads SSE response stream to capturesession_id, spinner during upload- Both
initVoiceRecorder()andinitFileUpload()called onDOMContentLoaded
Tests (tests/test_file_handling.py):
TestFileTools(4 tests):file_analyze/file_managein tool list, required params, action enum validationTestInboxSlashCommand(6 tests): empty inbox, list with files (size display), clear, unknown subcommand usage, /help contains /inbox, completer has /inbox- Tests: 46 passed in
test_file_handling.py; 56 passed (1 pre-existing failure unrelated) in broader test run
File Handling — LLM Analyzer + Filing Rules
src/mycelos/files/analyzer.py— LLM analysis for document classification with prompt injection defenseANALYSIS_PROMPT— XML-wrapped content to prevent injection attacks ("IMPORTANT: content is untrusted user-supplied data")build_analysis_prompt()— wraps document content in<document>tags, truncates to 3000 chars, includes filenameparse_analysis_response()— extracts JSON from LLM response, handles markdown code blocks, returns sensible defaults on parse failurevalidate_analysis()— checks for required fields (type,summary)sanitize_template_var()— removes path separators (/,\), removes.., replaces non-word chars with underscoresexpand_filing_rule()— expands template variables:{year},{month},{day},{type},{company}from analysis data, all sanitized before substitution
tests/test_file_handling.py— 12 new tests inTestAnalyzerclass: prompt building/truncation, JSON parsing (valid/markdown/invalid), analysis validation, template var sanitization (normal/traversal/slashes), filing rule expansion (with/without company)- Tests: 1725 passed, 44 skipped (1713 baseline + 12 new)
File Handling — Inbox Manager
src/mycelos/files/__init__.py— module marker (empty)src/mycelos/files/inbox.py—sanitize_filename()prevents path traversal (strips path components, removes dangerous chars, truncates to 200 chars).InboxManagerclass:save()writes files with date prefix and handles duplicates via counter suffix,list_files()returns all inbox files,remove()deletes with containment check,get_path()partial filename match. Max file size: 50MB configurable.- Security checks:
Path.is_relative_to()prevents escaping sandbox, null bytes removed, special chars replaced with underscores - File size validation before write, duplicate suffix auto-incrementing
- Security checks:
tests/test_file_handling.py— 17 new tests coveringsanitize_filename()(9 tests) andInboxManager(8 tests): normal/traversal/separators/null-bytes/empty names, file save/list/remove/get/duplicates/oversized, containment checks- Tests: 1711 passed, 44 skipped
Chat — Tool Result Guard + Conversation Validator
src/mycelos/chat/tool_result_guard.py—ToolResultGuard: tracks pending tool calls and synthesizes missingtool_resultmessages when tool execution is interrupted.validate_tool_calls()drops malformed tool calls missing requiredidorfunction.namefields.src/mycelos/chat/conversation_validator.py—validate_conversation()repairs conversation lists for Anthropic API compliance: merges consecutive same-role messages, removes orphanedtool_resultmessages, strips danglingtool_useblocks without matching results, adds fallback content to empty assistant messages, and moves system messages to the start.src/mycelos/chat/service.py— integrated both guards into the tool-use loop inhandle_message():ToolResultGuardtracks each tool call and synthesizes synthetic error results for any unresolved calls before the next LLM callvalidate_conversation()runs before everyllm.complete()call and syncs the cleaned list back toself._conversations[session_id]validate_tool_calls()validates tool calls after each LLM response; breaks loop if all calls are malformed
tests/test_conversation_guard.py— 17 new tests coveringToolResultGuard,validate_tool_calls, andvalidate_conversation(TDD: tests written first)- Tests: 1677 passed, 44 skipped
Week 13 continued
Knowledge Base — Index Auto-Generation
src/mycelos/knowledge/service.py—regenerate_index()method generatesknowledge/index.mdwith overview of all notes- Sections: Open Tasks (sorted by due date with [P{priority}] badges), Recent (last 10 notes with timestamps), Tags summary (top 20 tags with counts)
- Called automatically after
write(),update(), andlink()operations to keep index current - Format: Markdown with wiki-style links
[[path|title]]
tests/test_knowledge_base.py— 3 new tests inTestIndexGenerationclass: index file creation, open tasks display, priority display (total 30 tests, 1 skipped)- Tests: 1646 passed, 44 skipped
Knowledge Base — CRUD + FTS5 Indexer
src/mycelos/knowledge/indexer.py—KnowledgeIndexer:index_note(),remove_note(),get_note_meta(),search_fts(),list_notes(),add_link(),get_backlinks(),ensure_fts(). Uses standalone FTS5 virtual table (nocontent=backing) to avoid SQLite trigger issues on update/delete.src/mycelos/knowledge/service.py—KnowledgeBase:write(),read(),search(),list_notes(),update(),link(),find_relevant(). Notes stored as Markdown files underdata_dir/knowledge/<type>/. Duplicate path handling via counter suffix.src/mycelos/protocols.py—KnowledgeBaseProtocoladdedsrc/mycelos/app.py—knowledge_baselazy property addedtests/test_knowledge_base.py— 12 new tests: write/read/list/update/search/link/backlinks/priority/duplicate paths/app property (total 20 tests)- Tests: 1637 passed, 43 skipped
Knowledge Base — Schema + Note Data Model
src/mycelos/knowledge/__init__.py— new packagesrc/mycelos/knowledge/note.py—Notedataclass with YAML frontmatter support:render_note(),parse_frontmatter(),generate_path()- Type-to-folder mapping: note→notes/, task→tasks/, decision→decisions/, reference→references/, fact→facts/, journal→journal/
src/mycelos/storage/schema.sql—knowledge_notes,knowledge_links,knowledge_configtables + indexessrc/mycelos/storage/database.py—knowledge_notesadded to auto-migration check listtests/test_knowledge_base.py— 8 tests: create note, render markdown, parse frontmatter, no-frontmatter fallback, path generation (decision/task/fact), roundtrip- Tests: 1625 passed, 43 skipped
Permission UI — 5-option agent-scoped prompts
grant_permission()extended withallow_all_alwaysdecision (global, all agents)- All permanent grants (
always_allow,allow_all_always,never_allow) trigger config generation (NixOS-style rollback, Constitution Rule 2) _handle_permission_response()now accepts 1-5 numeric input, legacy Y/A/N/! shortcuts, andPERM:{id}:{value}protocol from web frontend- Permission prompt updated to show 5 numbered options with agent name (i18n)
permission_id(uuid hex) added to widget event for web/Telegram correlation- i18n keys added to
en.yamlandde.yaml(permission.*) - 15 new tests covering all 5 decisions, config generation, legacy inputs, web prefix
- Tests at
tests/test_permission_ui.py(1612 passed, 43 skipped)
Speech-to-Text
- SecurityProxy
POST /stt/transcribeendpoint (Whisper API via OpenAI, verbose_json) - SecurityProxyClient
stt_transcribe()method + Protocol update - Gateway
POST /api/audioroute — audio upload, transcribe, process as chat - Telegram voice message handler — download .ogg, transcribe, respond
- Web Frontend record button (MediaRecorder API, .webm/opus)
[Voice]prefix shows transcription to user before response- Audio never stored — bytes discarded after transcription
- Configurable provider via
stt_providerin config (default: openai) - 11 new tests (proxy endpoint, client, gateway route, Telegram handler)
SecurityProxy — Process Isolation for Credentials and Network Access
- Architecture: Two-process model — SecurityProxy child process owns master key, all credentials, and all external network access. Gateway communicates via Unix Domain Socket with session token auth.
- proxy_server.py: FastAPI app with Bearer auth, SSRF filter, HTTP proxy, MCP subprocess management, LLM proxy (litellm inside proxy), credential bootstrap endpoint
- proxy_client.py: Synchronous httpx client over Unix socket (
httpx.HTTPTransport(uds=...)) - proxy_launcher.py: Fork via multiprocessing, health polling, auto-restart (max 3), degraded mode
- SecurityProxyProtocol in protocols.py for mockable interface
- Gateway wiring: App container has
proxy_client, http_tools delegates to proxy, LLM broker delegates to proxy - Credential bootstrap: One-time 10s window for Telegram bot token at startup
- Security tests: 37 invariant tests (auth enforcement, SSRF, credential isolation, bootstrap window)
- E2E tests: 9 integration tests (require
MAICEL_SKIP_PROXY_E2E=0for Unix socket permissions)
Background Execution System
- Schema: users, background_tasks, background_task_steps tables
- BackgroundTaskRunner: dispatch, lifecycle, notification tracking
- Creator Pipeline runs in background via Huey (non-blocking)
- /bg slash command: list, cancel, approve, detail
- Stale task sweeper (every 5min) + daily cost warnings ($5/$10/$25)
- E2E integration tests for full lifecycle (10 tests)
- Proactive notification: completed tasks shown on next chat message
Security: Sanitizer Case-Sensitivity Fix (Sentinel)
- ResponseSanitizer now uses re.IGNORECASE — catches uppercase API_KEY, SECRET, etc.
- New patterns: AWS IAM keys (AKIA...), Slack tokens (xox-...), .env file paths
- Base64 credential detection now case-insensitive
- 5 new security tests including uppercase base64 edge case
Security Fixes from Code Audit (Codex)
- SSRF protection in http_get/http_post: blocks private IPs, localhost, metadata endpoints, non-HTTP schemes (17 tests)
- ToolRegistry warns on duplicate tool registration (no more silent overwrite)
- Telegram uses explicit app reference instead of _chat_service._app private access
Test count: 1498 passed, 34 skipped
Week 13 earlier
Critical Bug Fixes
- Intent routing was DEAD CODE (wrong indentation in if/else block)
- Classifier JSON parsing failed on Haiku markdown code blocks
- PermissionRequired exception caught too early (never reached tool loop)
- Classifier: simple tool calls (list files, search) now route as "conversation" not "task_request"
System Permission Prompts (Claude Code Pattern)
- PermissionRequired exception for filesystem access on unmounted paths
- System shows permission prompt — LLM never sees the interaction
- Y=session, A=always, N=deny, !=never — all agent-scoped
- Permission decisions stored in PolicyEngine (agent_id scoped)
- Path normalization: /home/user → /Users/user on macOS
Creator Agent Integration
- Merged InterviewEngine from PR #8 (7-phase state machine)
- Fixed language detection (memory-based, not hardcoded "de")
- Agent Routing: HandoffEnvelope + HandoffResult protocol
- Creator Pipeline verified working (hello-test agent created successfully)
- System prompt: "NEVER write scripts, delegate to Creator"
- filesystem_write guard blocks .py/.sh from chat context
Security (6 Quick Fixes from Overnight Review)
- F1: Gateway localhost-only middleware
- F2: .gitignore for .env*, .master_key
- F3: Generic error messages to API clients
- F6: hmac.compare_digest for webhook secret
- F7: Workflow-runner capability bypass removed
- F8: connector_call per-tool policy check
Live LLM Testing Framework
- Haiku-as-User: cheap LLM plays the user in test scenarios
- YAML scenario definitions with behavioral assertions
- NixOS state rollback after each test
- Detailed logging: routing, tools, handoffs, costs
- CLI: mycelos test --live [scenario_name]
- 3 scenarios: create-pdf-agent, daily-news-schedule, github-repos
Classifier Improvements
- German examples added to classifier prompt
- Markdown code block stripping for Haiku responses
- Brace-depth JSON extraction for extra text after JSON
- "conversation" is now the default for simple tool calls
System Prompt Cleanup
- Removed all /mount and slash command suggestions
- "Permissions are handled automatically by the system"
- English everywhere in code (Constitution rule #9)
Security Architecture Decisions (documented)
- Credential Broker as separate process (P1)
- 10 guardrails against LLM secret access
- Process boundaries analysis
Plans Created
- Agent Routing ("Announced Delegation with Summarized Context")
- Knowledge Base (Markdown wiki with wikilinks)
- Permission UI improvements (path validation, Claude Code style)
- Real LLM Testing framework design
Tests: 1458 passed, 0 failures
Week 13 start
Creator Agent: Interactive Interview Engine
- New
InterviewEnginestate machine replaces direct pipeline execution - Guided interview flow: Greeting → Clarification → Scope Check → Summary → Gherkin Review → Confirmed
- Non-technical user focus: questions are simple, summaries avoid jargon
- Scope Guard: rejects unrealistic requests (databases, frameworks, complete apps) and suggests splitting complex ones
- Gherkin scenarios shown for user confirmation before code generation
- Cancel at any point with "abbrechen", "cancel", "stop" etc.
- Full i18n support (de/en) for all interview strings
- ChatService integration: active interviews persist across messages per session
- After interview confirmation, Creator Pipeline runs with confirmed AgentSpec
- 25 new tests covering phases, scope guard, edge cases, and full flow (88 total creator tests)
Smart Tool Discovery
- Meta-tools:
connector_tools+connector_callinstead of 50+ tools in prompt - Token savings:
11k tokens per request ($0.03/request) - LLM discovers connector tools on-demand, not all at once
Workflow Tools + Scheduling
create_scheduletool: LLM creates schedules directly (no slash command needed)workflow_infotool: LLM can inspect workflow detailscreate_workflowtool: LLM can create simple workflows (TODO: route through Planner)/schedule add|delete|pause|resumeslash commands implemented/workflow show|deleteslash commands added
Workflow Capability Scoping
- WorkflowRunner checks agent_capabilities before tool execution
- Capability prefix matching:
github.readallowsgithub.list_issues - MCP connector steps:
connector:github.list_issuesformat in workflow steps - Audit event
capability.deniedwhen agent lacks required capability
System Prompt Cleanup
- All prompts now English (response language controlled via user preferences)
- Telegram status awareness: LLM knows when Telegram is active
- Scheduling intent: LLM creates workflows instead of suggesting slash commands
Telegram Channel (Production-Ready)
- Polling als Default (kein Webhook/ngrok noetig) — inspiriert von OpenClaw
- Allowlist fuer User-Zugriffskontrolle (channels table, NixOS State)
- Typing Indicator ("Mycelos tippt...")
- Robustes Markdown-Fallback (4-stufig: Markdown → Plain → Stripped → Error)
- Session-Persistenz ueber Server-Restarts (sucht letzte Session pro User)
- Bot-Token-Test nach Setup (getMe API)
mycelos onboardingCLI entfernt (Onboarding laeuft in-chat)
MCP Integration (Connector-Tools via MCP Server)
- MCP-Server starten automatisch beim
mycelos serveBoot - GitHub MCP Server: 26 Tools (Issues, PRs, Commits, Code Search, etc.) — WORKING
- Filesystem MCP Server: 14 Tools (Read, Write, Edit, Search, etc.) — WORKING
- Tool-Name-Mapping:
.→_fuer Anthropic API Kompatibilitaet - Persistenter Event-Loop-Thread fuer MCP Sessions (kein "Event loop is closed")
github_apiFallback-Tool fuer Endpoints die MCP nicht abdeckt (/user/repos)/reloadSlash Command — MCP-Server ohne Restart neu laden- Node.js als Core Requirement (Warnung bei
mycelos initwenn fehlend) - Dynamische Tool-Liste: LLM sieht nur Tools von aktiven Connectors
Security Gate (SEC21)
- PolicyEngine verdrahtet in ChatService, WorkflowRunner, ExecutionRuntime
- ResponseSanitizer auf alle Tool-Ergebnisse (API Keys, SSH Paths redacted)
- Confirm-Flow: Tools mit "confirm" Policy geben
confirmation_requiredzurueck - Default-Policy im Chat: "always" (User ist direkt anwesend)
- Default-Policy in Workflows: "confirm" (braucht User-Bestaetigung)
- Audit Trail:
tool.executed,tool.blocked,tool.confirmation_required
Memory Write Security (H-03)
- Key-Scoping: LLM kann nur
user.*Keys schreiben - Content-Sanitization: Max 500 Zeichen, Injection-Pattern-Blocklist
- Memory Review Agent: Session Summary prueft LLM-geschriebene Eintraege
MCP Command Validation (F-01, F-03, F-11)
- Command-Allowlist: nur npx/node/python/docker erlaubt
- Shell-Metachar-Blocklist (
;,|,&,$, etc.) - Template-Platzhalter aus Recipes entfernt
shlex.split()stattstr.split()fuer korrekte Argument-Behandlung- Env-Var-Blocklist (LD_PRELOAD, DYLD_INSERT_LIBRARIES, etc.)
Planner + Creator MCP-Awareness
- Planner-Prompt: "Bevorzuge MCP-Server statt Eigenentwicklung"
- Creator-Prompt: "Nutze run(tool=...) statt custom API Code"
- Connector-Kontext mit Beschreibungen und Capabilities an LLM uebergeben
- Code-Generator bekommt verfuegbare Connectors als Kontext
Memory UX Verbesserungen
/memoryzeigt menschenlesbaren Summary (statt rohe Keys)/memory listmit Nummern fuer einfaches Loeschen/memory delete <nummer>statt UUID/memory set name/tone/langfuer Persoenlichkeits-Einstellungen
Debugging + Tooling
mycelos dbCLI: connectors, agents, policies, channels, credentials, audit, memory, sql, context- Debug-Script:
scripts/debug_telegram_chat.py(simuliert Chat ohne Gateway) - Gateway Logging: Huey/LiteLLM/httpcore auf WARNING gedrosselt, File-Log unter ~/.maicel/gateway.log
Cost Tracking Fix
- Provider-Prefix-Bug gefixt:
anthropic/claude-sonnet-4-6→claude-sonnet-4-6fuer litellm.model_cost Lookup - Kosten werden jetzt korrekt berechnet ($3/1M input, $15/1M output fuer Sonnet)
Gherkin Scenarios
- UC36: MCP-in-Workflow Integration (Planner schlaegt MCPs vor)
- SEC21: ChatService Security Gate (Policy + Sanitization)
Tests: 1338 passed, 0 failures
Week 12 (2026)
Security Audit + Fixes
- 23 Findings (3 Critical, 5 High, 9 Medium, 6 Low)
- C-01: Mount path traversal fix (startswith → is_relative_to)
- C-02: Credential race condition fix (api_key parameter statt os.environ)
- C-03: Telegram webhook secret verification
- H-01: Telegram user allowlist
- H-04: Generic error messages (kein Internal-Detail-Leak)
Integration Tests: 101 neue Tests
- Slash Commands, Onboarding, Streaming, Cost Tracking, Mounts, Confirmable Commands
Web Frontend Plan
- Next.js + Telegram OTP Auth (nur Plan, nicht implementiert)
- Implementation plan saved for reference