mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 15:26:41 +02:00
feat(ai): SSE streaming for foreground Mission Runner
Enable real-time token streaming during the planner "calling-llm" phase
so the user sees live progress ("empfange Plan… 128 tokens") instead of
a static spinner. The parser still receives the full text once complete —
no partial-JSON risk.
Changes:
- Extract shared SSE parser from playground into @mana/shared-llm/sse-parser
- remote.ts: use stream:true when onToken callback is provided
- AiPlanInput: add optional onToken field (shared-ai)
- ai-plan task: pass onToken through to backend.generate()
- runner.ts: throttled (500ms) phaseDetail updates during streaming
- Playground: refactored to use shared SSE parser
Also includes: AI agent architecture comparison report (docs/reports/)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8a0bf93699
commit
be81d11dc3
9 changed files with 633 additions and 106 deletions
|
|
@ -30,6 +30,13 @@ export interface AiPlanInput {
|
|||
readonly mission: Mission;
|
||||
readonly resolvedInputs: readonly ResolvedInput[];
|
||||
readonly availableTools: readonly AvailableTool[];
|
||||
/**
|
||||
* Optional streaming callback — called with each token delta as it
|
||||
* arrives from the LLM. The Runner uses this to show live progress
|
||||
* during the "calling-llm" phase. Only effective when the backend
|
||||
* supports streaming (mana-server / cloud tiers).
|
||||
*/
|
||||
readonly onToken?: (delta: string) => void;
|
||||
}
|
||||
|
||||
export interface PlannedStep {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue