- Asistente.tsx pins threadId "main" on CopilotChat (an explicit stable
id stops the per-mount message wipe), runs a hydration pass on page
load — an empty-messages run makes MAF replay the stored snapshot as
MESSAGES_SNAPSHOT with no LLM call — and sends the Inicio ask-box
question only after hydration so every normal run carries the full
client-known history. "Nueva conversación" clears the stored thread
behind a ConfirmDialog.
- server.ts: the BFF no longer injects context into empty-messages
requests (that would defeat MAF's hydration trigger), and the snapshot
reconciliation passes hydration replays through untouched and treats
ids the client already sent as history rather than duplicates.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Retiring it in the middleware audit was premature: MAF 1.10 reuses the
streamed id for plain-text snapshots but deliberately mints a fresh UUID
for post-tool-call assistant text (their #3619), so tool+text turns
still rendered a duplicate assistant bubble (re-verified live). The
user-message duplication that motivated the retirement only fired on
a2ui retry runs, which no longer exist now that a2ui is disabled.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CK 1.60+ validates generated a2ui ops against a component catalog before
painting, and our agent's ops fail validation — surfaces hang at
"Building interface" forever (MAF also drops RunAgentInput.context, so
the catalog/guidelines never even reach the model). Disable a2ui end to
end until the pipeline matures:
- server.ts: a2ui { enabled: false }; RENDER_TOOLS no longer includes
render_a2ui
- App.tsx: remove the a2ui provider prop
- agent.py: prompt now asks for clean markdown tables for lists and
structured data; render_spending_summary card guidance unchanged
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- ReconcileSnapshotMiddleware removed: MAF now reuses the streamed
message id in MESSAGES_SNAPSHOT (verified in _agent_run.py at
python-1.10.0 and live event logs); keeping the surgery duplicated
user messages on a2ui follow-up runs.
- beforeRequestMiddleware now injects RunAgentInput.context as a system
message: MAF declares the field but never feeds it to the model,
which starves the model of CopilotKit's A2UI catalog/guidelines.
Remove when MAF consumes context upstream.
- Workaround chain env-gated: CK_MIDDLEWARES=off runs bare for audits,
CK_DEBUG_EVENTS=1 enables the event logger.
- Kept: SuppressRenderToolText, StripModelArtifacts,
DeduplicateToolCall, pairOrphanToolCalls (behavior-verified).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The default pointed at the compose-internal 'backend' hostname, which
never resolves when the Hono runtime runs on the host — every local
agent run died with fetch failed/ENOTFOUND before reaching FastAPI.
Prod is unaffected (sets both URLs explicitly).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A thrown fetch in the auth probe is a network failure, not a 401 — it
now retries once before treating the user as logged out, and logs the
real cause (FE-15). Theme and privacy state initialize lazily from
localStorage so neither the wrong theme nor unmasked sensitive values
flash on reload (FE-07). The CopilotKit orphan-tool-call repair logs
when it has to skip instead of failing silently (FE-11).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every response gets X-Frame-Options, X-Content-Type-Options, and
Referrer-Policy (SEC-07/FE-08). Backend proxy failures now return a
logged 502 instead of an opaque uncaught error (FE-23).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
In production the browser talks to the Hono server, which only proxied
/api/copilotkit/*. All other /api/* requests hit the SPA static fallback
and got index.html back. Forward /api/v1/* and /api/auth/* to BACKEND_URL.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the Next.js scaffold with a Vite SPA paired with a Hono
sidecar that hosts the CopilotKit runtime and proxies AG-UI traffic
to the MAF backend. Adds dev/prod Dockerfile, .dockerignore,
.gitignore, pnpm workspace config, and updates entrypoints
(main.tsx / App.tsx / index.css / index.html) plus the service
worker accordingly.
Server middleware reconciles MAF MESSAGES_SNAPSHOT id mismatches
so post-tool-call assistant text doesn't render twice, suppresses
duplicate text emitted alongside render tools, and strips OpenAI
training-token leaks from streamed deltas.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>