跳到主要内容

任务与目标

Memorose 把 L3 作为任务和规划系统对外暴露。

核心接口

  • GET /v1/users/:user_id/streams/:stream_id/tasks/tree
  • GET /v1/users/:user_id/tasks/tree
  • GET /v1/users/:user_id/tasks/ready
  • PUT /v1/users/:user_id/tasks/:task_id/status

返回内容

任务树接口返回 goal 根节点及其嵌套 L3Task 子树。ready 接口返回依赖已满足、状态仍为 pending 的任务。

更新任务状态

curl -s -X PUT "http://127.0.0.1:3000/v1/users/user_123/tasks/11111111-1111-1111-1111-111111111111/status" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "Completed",
"progress": 1.0,
"result_summary": "Migrated the API docs to the current route model."
}'

任务完成后,结果还可以继续沉积回事件流。