feat: add ExtractFn utility, cursor agent workspace from thread context

- New ExtractFn = <T>(schema, prompt) => (ctx) => Promise<T>
- createExtract(provider) creates an LLM-backed ExtractFn
- CursorAgent removes workdir config, uses ExtractFn to resolve workspace from ThreadContext at runtime
- buildAgentPrompt(ctx) — reads systemPrompt from ctx.currentRole

小橘 <xiaoju@shazhou.work>
This commit is contained in:
2026-05-07 00:17:31 +00:00
parent d351343aa8
commit 99a137422c
10 changed files with 105 additions and 33 deletions
+2 -1
View File
@@ -10,6 +10,7 @@
},
"dependencies": {
"@uncaged/workflow": "workspace:*",
"@uncaged/workflow-util-agent": "workspace:*"
"@uncaged/workflow-util-agent": "workspace:*",
"zod": "^4.0.0"
}
}