Documentation
¶
Index ¶
- type Registry
- func (r *Registry) ActivateWorkspace(key WorkspaceKey) (*WorkspaceState, error)
- func (r *Registry) GetWorkspace(key WorkspaceKey) (*WorkspaceState, error)
- func (r *Registry) RegisterSession(sessionID string, wsKey WorkspaceKey, mode, profile string) *SessionState
- func (r *Registry) RemoveSession(sessionID string)
- func (r *Registry) SessionCount() int
- func (r *Registry) WorkspaceCount() int
- type SessionState
- type WorkspaceKey
- type WorkspaceState
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 (*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 ¶
RemoveSession removes a session (per DMN-02: daemon survives disconnect).
func (*Registry) SessionCount ¶
SessionCount returns the number of active sessions.
func (*Registry) WorkspaceCount ¶
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 ¶
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).