workspace

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentInfo

type AgentInfo struct {
	ID           string                 `json:"id,omitempty"`
	Name         string                 `json:"name,omitempty"`
	Internal     bool                   `json:"internal,omitempty"`
	ModelRef     string                 `json:"modelRef,omitempty"`
	Tools        []string               `json:"tools,omitempty"`
	StarterTasks []agentmdl.StarterTask `json:"starterTasks,omitempty"`
}

AgentInfo describes a UI-facing agent entry with its preferred model.

type Capabilities

type Capabilities struct {
	AgentAutoSelection    bool `json:"agentAutoSelection,omitempty"`
	ModelAutoSelection    bool `json:"modelAutoSelection,omitempty"`
	ToolAutoSelection     bool `json:"toolAutoSelection,omitempty"`
	Goals                 bool `json:"goals,omitempty"`
	CompactConversation   bool `json:"compactConversation,omitempty"`
	PruneConversation     bool `json:"pruneConversation,omitempty"`
	AnonymousSession      bool `json:"anonymousSession,omitempty"`
	MessageCursor         bool `json:"messageCursor,omitempty"`
	StructuredElicitation bool `json:"structuredElicitation,omitempty"`
	TurnStartedEvent      bool `json:"turnStartedEvent,omitempty"`
}

Capabilities advertises optional backend contracts so the UI can avoid inventing client-only sentinels and endpoint probes.

type Defaults

type Defaults struct {
	AppName         string `json:"appName,omitempty"`
	AppIconRef      string `json:"appIconRef,omitempty"`
	Agent           string `json:"agent,omitempty"`
	Model           string `json:"model,omitempty"`
	Embedder        string `json:"embedder,omitempty"`
	AutoSelectTools bool   `json:"autoSelectTools,omitempty"`
	// ElicitationTimeoutSec is the per-prompt response timeout applied by
	// interactive clients (CLI, UI) when waiting for a user to respond to an
	// elicitation. Zero means the client should use its built-in default.
	ElicitationTimeoutSec int `json:"elicitationTimeoutSec,omitempty"`
}

Defaults captures UI-facing runtime defaults in a stable nested shape.

type FileBrowserEntry

type FileBrowserEntry struct {
	Name    string `json:"name"`
	URI     string `json:"uri"`
	IsDir   bool   `json:"isDir"`
	Size    int64  `json:"size,omitempty"`
	ModTime string `json:"modTime,omitempty"`
}

FileBrowserEntry represents a file or directory in the file browser.

type FileBrowserHandler

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

FileBrowserHandler serves file browser endpoints using afs for scheme-agnostic file access.

func NewFileBrowserHandler

func NewFileBrowserHandler() *FileBrowserHandler

NewFileBrowserHandler creates a file browser handler.

func (*FileBrowserHandler) Register

func (h *FileBrowserHandler) Register(mux *http.ServeMux)

Register mounts file browser routes on the given mux.

type MetadataHandler

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

MetadataHandler serves the workspace metadata endpoint.

func NewMetadataHandler

func NewMetadataHandler(defaults *config.Defaults, store ws.Store, version string) *MetadataHandler

NewMetadataHandler creates a metadata handler.

func (*MetadataHandler) Register

func (h *MetadataHandler) Register(mux *http.ServeMux)

Register mounts the metadata endpoint.

type MetadataResponse

type MetadataResponse struct {
	WorkspaceRoot    string       `json:"workspaceRoot,omitempty"`
	WorkspaceVersion string       `json:"workspaceVersion,omitempty"`
	MetadataVersion  string       `json:"metadataVersion,omitempty"`
	DefaultAgent     string       `json:"defaultAgent,omitempty"`
	DefaultModel     string       `json:"defaultModel,omitempty"`
	DefaultEmbedder  string       `json:"defaultEmbedder,omitempty"`
	AppName          string       `json:"appName,omitempty"`
	AppIconRef       string       `json:"appIconRef,omitempty"`
	Defaults         *Defaults    `json:"defaults,omitempty"`
	Capabilities     Capabilities `json:"capabilities,omitempty"`
	Agents           []string     `json:"agents,omitempty"`
	Models           []string     `json:"models,omitempty"`
	AgentInfos       []AgentInfo  `json:"agentInfos,omitempty"`
	ModelInfos       []ModelInfo  `json:"modelInfos,omitempty"`
	Version          string       `json:"version,omitempty"`
}

MetadataResponse is the response for the workspace metadata endpoint.

type ModelInfo

type ModelInfo struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

ModelInfo describes a UI-facing model entry.

Jump to

Keyboard shortcuts

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