Files
Agent-System/internal/squad/workspace_adapter.go
T
weichenandCursor 18ddd0f862 feat(workspace): add WorkspaceRef fencing and hide physical paths
Cross-module callers get an opaque ref plus rotating lease tokens so stale writers fail closed, and file I/O is refused inside a unit of work.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 15:59:14 +00:00

16 lines
466 B
Go

package squad
import "chat-agent-system/internal/workspace"
// WorkspaceRefForRun is the only squad→workspace DTO. Physical paths stay inside workspace.
func WorkspaceRefForRun(runID string, projectID int64, env, token string) workspace.WorkspaceRef {
return workspace.WorkspaceRef{
ID: "run-" + runID,
SchemaVersion: workspace.SchemaVersion,
FencingToken: token,
ProjectScope: projectID,
RunID: runID,
Environment: env,
}
}