OpenSpace/openspace
mulouout 9a1bfa71a0 feat(mcp): support async execute_task with status polling
Add non-blocking task execution to the MCP server so long-running
grounding tasks no longer trip client tool-call timeouts.

- execute_task now defaults to wait=False: it registers a background
  task, returns a task_id immediately, and streams per-step progress
  (engine warmup, skill registration, cloud search, each iteration,
  final aggregation) into an in-memory task registry.
- New get_task_status(task_id, include_logs) tool polls the registry
  for status / percent / current_step / logs / result / error.
- wait=True keeps the old blocking behaviour for CLI/sync callers.
- Add an asynccontextmanager lifespan that pre-warms the OpenSpace
  engine in the background at server start, so the first real task
  starts from an already-initialized engine instead of hanging on a
  cold init after the MCP handshake.

In-memory task registry is pruned to a bounded size; progress updates
are appended as timestamped log entries (capped per task).
2026-08-29 16:17:35 +08:00
..
agents v2 initial commit 2026-07-17 11:43:42 +08:00
cli v2 initial commit 2026-07-17 11:43:42 +08:00
cloud v2 initial commit 2026-07-17 11:43:42 +08:00
communication v2 initial commit 2026-07-17 11:43:42 +08:00
config v2 initial commit 2026-07-17 11:43:42 +08:00
core v2 initial commit 2026-07-17 11:43:42 +08:00
entrypoints feat(mcp): support async execute_task with status polling 2026-08-29 16:17:35 +08:00
grounding v2 initial commit 2026-07-17 11:43:42 +08:00
host_detection v2 initial commit 2026-07-17 11:43:42 +08:00
host_skills v2 initial commit 2026-07-17 11:43:42 +08:00
llm v2 initial commit 2026-07-17 11:43:42 +08:00
local_server v2 initial commit 2026-07-17 11:43:42 +08:00
persistence v2 initial commit 2026-07-17 11:43:42 +08:00
platforms v2 initial commit 2026-07-17 11:43:42 +08:00
prompts v2 initial commit 2026-07-17 11:43:42 +08:00
protocol v2 initial commit 2026-07-17 11:43:42 +08:00
recording v2 initial commit 2026-07-17 11:43:42 +08:00
runtime v2 initial commit 2026-07-17 11:43:42 +08:00
services v2 initial commit 2026-07-17 11:43:42 +08:00
skill_engine v2 initial commit 2026-07-17 11:43:42 +08:00
skills/remember v2 initial commit 2026-07-17 11:43:42 +08:00
telemetry v2 initial commit 2026-07-17 11:43:42 +08:00
tool_runtime v2 initial commit 2026-07-17 11:43:42 +08:00
tools v2 initial commit 2026-07-17 11:43:42 +08:00
utils v2 initial commit 2026-07-17 11:43:42 +08:00
.env.example v2 initial commit 2026-07-17 11:43:42 +08:00
__init__.py v2 initial commit 2026-07-17 11:43:42 +08:00
application.py v2 initial commit 2026-07-17 11:43:42 +08:00