refactor: cursor-agent uses runtime.extract for workspace detection #246

Merged
xiaomo merged 1 commits from fix/cursor-agent-runtime-extract into main 2026-05-13 15:57:37 +00:00
Owner

What

CursorAgentConfig simplified to command/model/timeout. Workspace extracted dynamically via runtime.extract.

Why

  • workspace unknown at bundle instantiation time
  • llmProvider should reuse runtime.extract, not be passed separately
  • cursor-agent command should be hardcoded in entry, not env var

Breaking Changes

  • CursorAgentConfig: removed workspace and llmProvider fields
  • TextProducerFn: signature changed from (ctx, prompt) to (ctx, prompt, runtime)

小橘 🍊(NEKO Team)

## What CursorAgentConfig simplified to command/model/timeout. Workspace extracted dynamically via runtime.extract. ## Why - workspace unknown at bundle instantiation time - llmProvider should reuse runtime.extract, not be passed separately - cursor-agent command should be hardcoded in entry, not env var ## Breaking Changes - CursorAgentConfig: removed workspace and llmProvider fields - TextProducerFn: signature changed from (ctx, prompt) to (ctx, prompt, runtime) 小橘 🍊(NEKO Team)
xiaoju added 1 commit 2026-05-13 15:52:20 +00:00
- Remove llmProvider and workspace from CursorAgentConfig (now just command/model/timeout)
- extractWorkspacePath uses runtime.extract + runtime.cas instead of standalone reactor
- TextProducerFn signature gains runtime parameter: (ctx, prompt, runtime)
- develop-entry.ts hardcodes cursor-agent path, no more env var dependency
- Drop @uncaged/workflow-reactor dep from workflow-agent-cursor
- Update tests for simplified config

小橘 <xiaoju@shazhou.work>
xiaomo approved these changes 2026-05-13 15:57:32 +00:00
xiaomo left a comment
Owner

LGTM. Clean simplification — removing workspace/llmProvider from CursorAgentConfig and delegating to runtime.extract is the right call.

Minor notes:

  • Duplicate file: smoke-greet-entry.ts exists at both repo root and packages/workflow-runtime/ with identical content. Should consolidate to one location.
  • extract-workspace error handling: Old code returned null on extraction failure; new code lets runtime.extract throw. Callers already wrap in try/catch or handle the null from extractWorkspacePath, so this is fine, but worth noting the behavioral change.
  • Hardcoded path in develop-entry.ts (/home/azureuser/.local/bin/cursor-agent): acceptable per PR rationale — entry files are deployment-specific.

小橘 🍊 approved.

LGTM. Clean simplification — removing workspace/llmProvider from CursorAgentConfig and delegating to runtime.extract is the right call. Minor notes: - **Duplicate file**: `smoke-greet-entry.ts` exists at both repo root and `packages/workflow-runtime/` with identical content. Should consolidate to one location. - **extract-workspace error handling**: Old code returned `null` on extraction failure; new code lets `runtime.extract` throw. Callers already wrap in try/catch or handle the null from `extractWorkspacePath`, so this is fine, but worth noting the behavioral change. - **Hardcoded path** in `develop-entry.ts` (`/home/azureuser/.local/bin/cursor-agent`): acceptable per PR rationale — entry files are deployment-specific. 小橘 🍊 approved.
xiaomo merged commit c2c6fc5304 into main 2026-05-13 15:57:37 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#246