workspace

package
v1.10.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry manages active workspaces and sessions (per DMN-01, WRK-01).

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new workspace registry.

func (*Registry) ActivateWorkspace

func (r *Registry) ActivateWorkspace(key WorkspaceKey) (*WorkspaceState, error)

ActivateWorkspace registers or retrieves a workspace (per WRK-01).

func (*Registry) GetWorkspace

func (r *Registry) GetWorkspace(key WorkspaceKey) (*WorkspaceState, error)

GetWorkspace returns a workspace by key, or error if not found.

func (*Registry) RegisterSession

func (r *Registry) RegisterSession(sessionID string, wsKey WorkspaceKey, mode, profile string) *SessionState

RegisterSession creates a new session (per DMN-06).

func (*Registry) RemoveSession

func (r *Registry) RemoveSession(sessionID string)

RemoveSession removes a session (per DMN-02: daemon survives disconnect).

func (*Registry) SessionCount

func (r *Registry) SessionCount() int

SessionCount returns the number of active sessions.

func (*Registry) WorkspaceCount

func (r *Registry) WorkspaceCount() int

WorkspaceCount returns the number of active workspaces.

type SessionState

type SessionState struct {
	SessionID    string
	WorkspaceKey WorkspaceKey
	Mode         string // current mode (planning, editing, etc.)
	Profile      string // capability profile name

}

SessionState holds per-session state (per DMN-06). Keyed by MCP session ID + dirty buffer overlay + mode/capability profile.

type WorkspaceKey

type WorkspaceKey struct {
	RepoRoot  string
	Language  string
	Toolchain string
}

WorkspaceKey uniquely identifies a workspace by repo root, language, and toolchain. Per DMN-05: workspace state keyed by repo root + language + toolchain fingerprint.

func (WorkspaceKey) Hash

func (k WorkspaceKey) Hash() string

Hash returns a deterministic hash for map keying.

func (WorkspaceKey) String

func (k WorkspaceKey) String() string

String returns a human-readable representation.

type WorkspaceState

type WorkspaceState struct {
	Key    WorkspaceKey
	Status string // "initializing", "ready", "error"

}

WorkspaceState holds per-workspace state (per DMN-05).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL