code

package
v0.16.6 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentModeID      = "agent"
	PlanModeID       = "plan"
	UnattendedModeID = "unattended"
)
View Source
const BuiltinAgentName = "wingman"

Variables

View Source
var (
	ErrTurnInProgress = agent.ErrTurnInProgress
	ErrEmptyInput     = agent.ErrEmptyInput
)
View Source
var (
	// ErrNoActiveTurn means a steer lost the active-turn boundary race.
	ErrNoActiveTurn = errors.New("no active turn")
	// ErrTurnNotSteerable means the active backend turn rejects same-turn input.
	ErrTurnNotSteerable = errors.New("active turn is not steerable")
	// ErrInputNotQueued means a queue mutation targeted a non-queued input.
	ErrInputNotQueued = errors.New("turn input is not queued")
	// ErrDuplicateInput means an input ID is already live in the session.
	ErrDuplicateInput = errors.New("turn input id already exists")
	// ErrInvalidIntent means the input requested an unsupported routing mode.
	ErrInvalidIntent = errors.New("invalid turn input intent")
)

Functions

func HasAgentsConfig added in v0.8.3

func HasAgentsConfig() bool

func SessionIDFromContext added in v0.7.0

func SessionIDFromContext(ctx context.Context) string

func SessionsDir added in v0.6.9

func SessionsDir(workingDir string) string

func UnattendedElicitation added in v0.12.7

func UnattendedElicitation(req tool.ElicitRequest) tool.ElicitResult

UnattendedElicitation resolves questions without UI. Defaults win, followed by the first (recommended) option; required free-text questions are declined rather than answered with fabricated input.

func WithSessionID added in v0.7.0

func WithSessionID(ctx context.Context, sid string) context.Context

Types

type Agent

type Agent interface {
	Name() string

	Workspace() *Workspace

	Models(sessionID string) (available []model.Model, current string)

	SetModel(ctx context.Context, sessionID, id string) error

	Effort(sessionID string) (current string, options []string)

	SetEffort(ctx context.Context, sessionID, value string) error

	Modes(sessionID string) (available []Mode, current string)

	SetMode(ctx context.Context, sessionID, modeID string) error

	ListSessions(ctx context.Context) ([]SessionInfo, error)

	NewSession(ctx context.Context) (string, error)

	LoadSession(ctx context.Context, id string) error

	DeleteSession(ctx context.Context, id string) error

	Messages(sessionID string) []agent.Message

	Usage(sessionID string) agent.Usage

	// Send starts one turn and returns its event stream. Immediate validation
	// and busy-session failures are returned directly; errors that happen after
	// the turn starts are yielded by the stream. Send never queues implicitly.
	// Once Send returns successfully, the agent owns input and callers may reuse
	// or mutate their slice.
	Send(ctx context.Context, sessionID string, input []agent.Content) (iter.Seq2[agent.Message, error], error)

	Cancel(sessionID string)

	Close() error
}

type AgentDef added in v0.7.0

type AgentDef struct {
	Name string `json:"name"`

	Command string `json:"command"`

	Args []string `json:"args,omitempty"`

	Env map[string]string `json:"env,omitempty"`
}

func LoadAgents added in v0.7.0

func LoadAgents() ([]AgentDef, error)

type Command added in v0.12.0

type Command struct {
	Name        string
	Description string
	InputHint   string
}

type CommandProvider added in v0.12.0

type CommandProvider interface {
	Commands(sessionID string) []Command
}

CommandProvider exposes agent-defined slash commands for clients that can present command discovery alongside their own local commands.

type HistorySnapshot added in v0.12.9

type HistorySnapshot struct {
	Messages []agent.Message
	Revision uint64
}

HistorySnapshot is an atomic view of a session's retained messages. Revision changes only when existing history is rewritten (for example by compaction), not when messages are appended normally.

type HistorySnapshotProvider added in v0.12.9

type HistorySnapshotProvider interface {
	HistorySnapshot(sessionID string) HistorySnapshot
}

HistorySnapshotProvider lets UIs distinguish an append from a history rewrite. Agents without rewrite behavior may continue to expose Messages.

type HistoryVersion added in v0.12.9

type HistoryVersion struct {
	Revision     uint64
	MessageCount int
}

HistoryVersion is a cheap discriminator for retained history. Revision changes on rewrites; MessageCount changes on ordinary appends.

type HistoryVersionProvider added in v0.12.9

type HistoryVersionProvider interface {
	HistoryVersion(sessionID string) HistoryVersion
}

HistoryVersionProvider lets polling UIs avoid cloning a complete history snapshot when neither its length nor rewrite revision changed.

type ManagedToolSet added in v0.15.0

type ManagedToolSet uint8

ManagedToolSet selects the curated editor capabilities a frontend uses. Language runtimes and build tools remain external.

const (
	ManagedLSPTools ManagedToolSet = 1 << iota
	ManagedDAPTools
	ManagedEditorTools = ManagedLSPTools | ManagedDAPTools
)

type ManagedToolsUpdate added in v0.15.0

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

ManagedToolsUpdate owns one background update lifecycle. All frontends use it so cancellation and shutdown have identical behavior.

func (*ManagedToolsUpdate) Cancel added in v0.15.0

func (u *ManagedToolsUpdate) Cancel()

func (*ManagedToolsUpdate) Wait added in v0.15.0

func (u *ManagedToolsUpdate) Wait() (bool, error)

func (*ManagedToolsUpdate) WaitContext added in v0.15.0

func (u *ManagedToolsUpdate) WaitContext(ctx context.Context) (bool, error)

WaitContext observes completion without making shutdown depend on an installer that has not returned yet. Cancel remains separate so callers can stop the update before choosing how long they are willing to wait.

type Mode added in v0.8.0

type Mode struct {
	ID          string
	Name        string
	Description string
}

func UnattendedMode added in v0.12.7

func UnattendedMode() Mode

type SessionInfo added in v0.7.0

type SessionInfo struct {
	ID        string
	Title     string
	UpdatedAt time.Time
}

type SessionLoadStreamer added in v0.8.8

type SessionLoadStreamer interface {
	LoadSessionStream(ctx context.Context, id string) iter.Seq2[[]agent.Message, error]
}

type SessionUpdateSource added in v0.16.4

type SessionUpdateSource interface {
	SetSessionUpdateHandler(func(sessionID string))
}

SessionUpdateSource reports backend metadata updates that can arrive outside a Send stream (ACP configuration, commands, title, modes and usage). The callback runs after releasing adapter locks.

type TurnEvent added in v0.10.9

type TurnEvent struct {
	SessionID string
	InputID   string
	State     TurnInputState
	Intent    TurnInputIntent
	Position  int
	Input     TurnInput
	// StreamEvent carries a transport lifecycle boundary separately from
	// conversational messages.
	StreamEvent agent.StreamEvent
	// Message is only valid for the duration of the synchronous event handler.
	// Handlers that retain it must copy its content.
	Message *agent.Message
	Err     error
	// Executed is true only for the primary input whose Agent.Send call ended.
	// Steered and removed queued inputs also receive terminal states but must not
	// trigger turn-finalization side effects such as checkpoints.
	Executed bool
}

type TurnFeatureProvider added in v0.10.9

type TurnFeatureProvider interface {
	TurnFeatures(sessionID string) TurnFeatures
}

TurnFeatureProvider advertises optional in-turn behavior. FIFO follow-up queueing is supplied by TurnManager for every Agent; providers only need to advertise behavior that must be implemented by the backend itself.

type TurnFeatures added in v0.10.9

type TurnFeatures struct {
	Steer bool `json:"steer"`
}

type TurnInput added in v0.10.9

type TurnInput struct {
	ID      string          `json:"id"`
	Content []agent.Content `json:"content"`
	Intent  TurnInputIntent `json:"intent"`
	// Display is the original visible input, persisted with the execution payload.
	// A nil display denotes an older queue record and is normalized on read.
	Display *TurnInputDisplay `json:"display,omitempty"`
	Origin  string            `json:"origin,omitempty"`
}

func CloneTurnInput added in v0.16.4

func CloneTurnInput(input TurnInput) TurnInput

type TurnInputDisplay added in v0.16.4

type TurnInputDisplay struct {
	Text   string   `json:"text"`
	Files  []string `json:"files,omitempty"`
	Images []string `json:"images,omitempty"`
}

type TurnInputIntent added in v0.10.9

type TurnInputIntent string
const (
	TurnInputFollowUp TurnInputIntent = "follow_up"
	TurnInputSteer    TurnInputIntent = "steer"
)

type TurnInputSnapshot added in v0.10.9

type TurnInputSnapshot struct {
	ID       string
	State    TurnInputState
	Intent   TurnInputIntent
	Position int
	Input    TurnInput
}

type TurnInputState added in v0.10.9

type TurnInputState string
const (
	TurnInputQueued    TurnInputState = "queued"
	TurnInputActive    TurnInputState = "active"
	TurnInputSteered   TurnInputState = "steered"
	TurnInputCompleted TurnInputState = "completed"
	TurnInputCancelled TurnInputState = "cancelled"
	TurnInputFailed    TurnInputState = "failed"
)

type TurnManager added in v0.10.9

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

TurnManager provides the session-level execution semantics shared by the web UI and other multi-turn clients. It guarantees one Agent.Send call per session at a time, supplies a FIFO follow-up queue for every backend, and uses native steering only when the backend explicitly supports it.

func NewTurnManager added in v0.10.9

func NewTurnManager(ctx context.Context, a Agent, handler func(TurnEvent)) *TurnManager

func (*TurnManager) CancelAll added in v0.10.9

func (m *TurnManager) CancelAll(sessionID string) error

CancelAll interrupts the active turn and cancels every queued follow-up.

func (*TurnManager) CancelCurrent added in v0.10.9

func (m *TurnManager) CancelCurrent(sessionID string) error

CancelCurrent interrupts the active turn and pauses queued follow-ups.

func (*TurnManager) ClearQueue added in v0.10.9

func (m *TurnManager) ClearQueue(sessionID string) error

func (*TurnManager) Close added in v0.10.9

func (m *TurnManager) Close()

func (*TurnManager) Features added in v0.10.9

func (m *TurnManager) Features(sessionID string) TurnFeatures

func (*TurnManager) RemoveQueued added in v0.10.9

func (m *TurnManager) RemoveQueued(sessionID, inputID string) error

func (*TurnManager) ReplaceQueued added in v0.10.9

func (m *TurnManager) ReplaceQueued(sessionID, inputID string, replacement TurnInput) error

func (*TurnManager) Resume added in v0.10.9

func (m *TurnManager) Resume(sessionID string) bool

func (*TurnManager) SetHandler added in v0.10.9

func (m *TurnManager) SetHandler(handler func(TurnEvent))

func (*TurnManager) Snapshot added in v0.10.9

func (m *TurnManager) Snapshot(sessionID string) TurnSnapshot

func (*TurnManager) StopSession added in v0.16.4

func (m *TurnManager) StopSession(ctx context.Context, sessionID string) error

StopSession cancels execution and joins finalization before callers delete backend history. A late queue write must not recreate a deleted directory.

func (*TurnManager) Submit added in v0.10.9

func (m *TurnManager) Submit(ctx context.Context, sessionID string, input TurnInput) (TurnInputSnapshot, error)

Submit rejects duplicate live input IDs. Transport receipts own retry deduplication. A steer that loses a turn-boundary race becomes a FIFO follow-up.

type TurnQueueState added in v0.15.8

type TurnQueueState struct {
	Inputs []TurnInput `json:"inputs,omitempty"`
	Paused bool        `json:"paused,omitempty"`
}

TurnQueueState contains only inputs that have not started. Active and steered inputs are represented by the runtime ledger and are never replayed automatically after a crash.

type TurnQueueStore added in v0.15.8

type TurnQueueStore interface {
	LoadTurnQueue(sessionID string) (TurnQueueState, error)
	SaveTurnQueue(sessionID string, state TurnQueueState) error
}

TurnQueueStore is an optional Agent capability used by TurnManager. A backend that does not implement it keeps the existing in-memory behavior.

type TurnSnapshot added in v0.10.9

type TurnSnapshot struct {
	Inputs   []TurnInputSnapshot
	Paused   bool
	Features TurnFeatures
	Error    error
}

type TurnSteerer added in v0.10.9

type TurnSteerer interface {
	Steer(ctx context.Context, sessionID string, input TurnInput) error
}

TurnSteerer injects input into the currently active turn. ErrNoActiveTurn and ErrTurnNotSteerable ask TurnManager to preserve the input as a FIFO follow-up; other errors are returned to the caller. Implementations must not mutate input and must copy its content if they retain it after Steer returns.

type UI

type UI interface {
	Elicit(ctx context.Context, req tool.ElicitRequest) (tool.ElicitResult, error)
	Confirm(ctx context.Context, message string) (bool, error)
}

type Workspace added in v0.6.9

type Workspace struct {
	Root             *os.Root
	RootPath         string
	MemoryPath       string
	ScratchPath      string
	SystemSkillsPath string

	Plugins []plugin.Plugin

	MCP      *mcp.Manager
	DevTools *devtools.Manager

	Language *language.Service
	DAP      *dap.Manager
	Changes  *changes.Manager
	// contains filtered or unexported fields
}

func NewWorkspace added in v0.6.9

func NewWorkspace(workDir string) (*Workspace, error)

func (*Workspace) ChangesFingerprint added in v0.12.6

func (w *Workspace) ChangesFingerprint(ctx context.Context) uint64

func (*Workspace) Close added in v0.6.9

func (w *Workspace) Close()

func (*Workspace) CloseEditorDocument added in v0.14.0

func (w *Workspace) CloseEditorDocument(ctx context.Context, filePath string) error

func (*Workspace) CodeActions added in v0.14.0

func (w *Workspace) CodeActions(
	ctx context.Context,
	filePath string,
	content *string,
	selection lsp.Range,
	only []lsp.CodeActionKind,
	trigger lsp.CodeActionTriggerKind,
) ([]lsp.CommandOrCodeAction, error)

func (*Workspace) CompletionItems added in v0.14.0

func (w *Workspace) CompletionItems(ctx context.Context, filePath string, content *string, line, column int, completionContext *lsp.CompletionContext) (lsp.CompletionList, error)

CompletionItems asks the file's language server first and falls back to symbols extracted from the current buffer with tree-sitter when completion is unavailable.

func (*Workspace) DebugRegistry added in v0.15.0

func (w *Workspace) DebugRegistry() *debugadapter.Registry

DebugRegistry returns the language debug adapters configured for the workspace. All frontends plan and detect against the same registry.

func (*Workspace) DebugToolStatus added in v0.16.4

func (w *Workspace) DebugToolStatus(ctx context.Context, language string) ([]devtools.ToolStatus, error)

DebugToolStatus checks the selected language's debugger and host dependencies without installing anything.

func (*Workspace) DefinitionLocations added in v0.12.12

func (w *Workspace) DefinitionLocations(ctx context.Context, filePath string, content *string, line, column int) ([]lsp.Location, error)

DefinitionLocations resolves a position in a disk file or in-memory editor buffer using the language server associated with the file, falling back to the tree-sitter graph index when no server covers it.

func (*Workspace) Diagnostics added in v0.6.9

func (w *Workspace) Diagnostics(ctx context.Context) language.WorkspaceReport

func (*Workspace) Diff added in v0.12.6

func (w *Workspace) Diff(ctx context.Context, path string, layer changes.DiffLayer) (changes.FileDiff, error)

func (*Workspace) Diffs added in v0.6.9

func (w *Workspace) Diffs(ctx context.Context) ([]changes.FileDiff, error)

func (*Workspace) DiffsLayer added in v0.15.1

func (w *Workspace) DiffsLayer(ctx context.Context, layer changes.DiffLayer) ([]changes.FileDiff, error)

func (*Workspace) DocumentHighlights added in v0.14.0

func (w *Workspace) DocumentHighlights(ctx context.Context, filePath string, content *string, line, column int) ([]lsp.DocumentHighlight, error)

func (*Workspace) DocumentSymbolItems added in v0.12.12

func (w *Workspace) DocumentSymbolItems(ctx context.Context, filePath string, content *string) ([]lsp.DocumentSymbol, []lsp.SymbolInformation, error)

func (*Workspace) EditorLSPCapabilities added in v0.14.0

func (w *Workspace) EditorLSPCapabilities(ctx context.Context, filePath string) (lsp.ServerCapabilities, bool, error)

func (*Workspace) EditorLSPDocumentContent added in v0.14.0

func (w *Workspace) EditorLSPDocumentContent(filePath string) (string, bool)

func (*Workspace) ExecuteLSPCommand added in v0.14.0

func (w *Workspace) ExecuteLSPCommand(ctx context.Context, filePath string, content *string, command lsp.Command) (any, error)

func (*Workspace) ExecuteLSPCommandWithEdits added in v0.15.1

func (w *Workspace) ExecuteLSPCommandWithEdits(ctx context.Context, filePath string, content *string, command lsp.Command) (any, []lsp.CommandWorkspaceEdit, error)

func (*Workspace) FileDiagnostics added in v0.12.12

func (w *Workspace) FileDiagnostics(ctx context.Context, filePath string, content *string) ([]language.Diagnostic, bool, error)

FileDiagnostics returns diagnostics for one disk file or in-memory editor buffer. The boolean is false when the server has not produced a result yet.

func (*Workspace) FoldingRanges added in v0.14.0

func (w *Workspace) FoldingRanges(ctx context.Context, filePath string, content *string) ([]lsp.FoldingRange, error)

func (*Workspace) Formatting added in v0.14.0

func (w *Workspace) Formatting(ctx context.Context, filePath string, content *string, options lsp.FormattingOptions) ([]lsp.TextEdit, error)

func (*Workspace) GitBranches added in v0.12.6

func (w *Workspace) GitBranches(ctx context.Context, refresh bool) ([]changes.GitBranch, string, error)

func (*Workspace) GitCheckoutBranch added in v0.12.6

func (w *Workspace) GitCheckoutBranch(ctx context.Context, name, remote string) error

func (*Workspace) GitCommit added in v0.12.6

func (w *Workspace) GitCommit(ctx context.Context, message string) (string, error)

func (*Workspace) GitCompare added in v0.14.2

func (w *Workspace) GitCompare(ctx context.Context, base, head string, mergeBase bool) (changes.CompareResult, error)

func (*Workspace) GitCreateBranch added in v0.12.6

func (w *Workspace) GitCreateBranch(ctx context.Context, name string) error

func (*Workspace) GitHistory added in v0.14.2

func (w *Workspace) GitHistory(ctx context.Context) ([]changes.GitCommit, error)

func (*Workspace) GitHistoryLimit added in v0.15.1

func (w *Workspace) GitHistoryLimit(ctx context.Context, limit int) ([]changes.GitCommit, error)

func (*Workspace) GitInit added in v0.12.21

func (w *Workspace) GitInit() error

func (*Workspace) GitPull added in v0.12.6

func (w *Workspace) GitPull(ctx context.Context) (string, error)

func (*Workspace) GitPush added in v0.12.6

func (w *Workspace) GitPush(ctx context.Context) (string, error)

func (*Workspace) GitStage added in v0.12.6

func (w *Workspace) GitStage(ctx context.Context, paths []string) error

func (*Workspace) GitStatus added in v0.12.6

func (w *Workspace) GitStatus(ctx context.Context) (changes.GitStatus, error)

func (*Workspace) GitUnstage added in v0.12.6

func (w *Workspace) GitUnstage(ctx context.Context, paths []string) error

func (*Workspace) GraphEngine added in v0.14.9

func (w *Workspace) GraphEngine() (*graph.Engine, error)

func (*Workspace) GraphStateDir added in v0.14.9

func (w *Workspace) GraphStateDir() string

func (*Workspace) HasChanges added in v0.12.6

func (w *Workspace) HasChanges() bool

func (*Workspace) HasLSP added in v0.10.3

func (w *Workspace) HasLSP() bool

func (*Workspace) HasLSPFor added in v0.15.1

func (w *Workspace) HasLSPFor(filePath string) bool

func (*Workspace) HoverInformation added in v0.12.12

func (w *Workspace) HoverInformation(ctx context.Context, filePath string, content *string, line, column int) (string, error)

func (*Workspace) ImplementationLocations added in v0.12.12

func (w *Workspace) ImplementationLocations(ctx context.Context, filePath string, content *string, line, column int) ([]lsp.Location, error)

func (*Workspace) InitMCP added in v0.6.9

func (w *Workspace) InitMCP(ctx context.Context) error

func (*Workspace) InlayHints added in v0.14.0

func (w *Workspace) InlayHints(ctx context.Context, filePath string, content *string, selection lsp.Range) ([]lsp.InlayHint, error)

func (*Workspace) IsGitRepo added in v0.6.9

func (w *Workspace) IsGitRepo() bool

func (*Workspace) LSPActivities added in v0.15.1

func (w *Workspace) LSPActivities() []lsp.ServerActivity

func (*Workspace) ManagedTools added in v0.7.0

func (w *Workspace) ManagedTools() (mcpTools, lspTools, graphTools []tool.Tool)

func (*Workspace) MemoryContent added in v0.6.9

func (w *Workspace) MemoryContent() string

func (*Workspace) OnTypeFormatting added in v0.14.0

func (w *Workspace) OnTypeFormatting(ctx context.Context, filePath string, content *string, line, column int, character string, options lsp.FormattingOptions) ([]lsp.TextEdit, error)

func (*Workspace) PrepareRename added in v0.14.0

func (w *Workspace) PrepareRename(ctx context.Context, filePath string, content *string, line, column int) (lsp.PrepareRenameResult, error)

func (*Workspace) RangeFormatting added in v0.14.0

func (w *Workspace) RangeFormatting(ctx context.Context, filePath string, content *string, selection lsp.Range, options lsp.FormattingOptions) ([]lsp.TextEdit, error)

func (*Workspace) ReferenceLocations added in v0.12.12

func (w *Workspace) ReferenceLocations(ctx context.Context, filePath string, content *string, line, column int) ([]lsp.Location, error)

func (*Workspace) RefreshSkills added in v0.15.0

func (w *Workspace) RefreshSkills() bool

RefreshSkills rediscovers personal and project Agent Skills and atomically replaces the catalog when its metadata or precedence changed. Plugin skills stay fixed because reloading a plugin also affects hooks, MCP, and permissions.

func (*Workspace) Rename added in v0.14.0

func (w *Workspace) Rename(ctx context.Context, filePath string, content *string, line, column int, newName string) (*lsp.WorkspaceEdit, error)

func (*Workspace) ResolveCodeAction added in v0.14.0

func (w *Workspace) ResolveCodeAction(ctx context.Context, filePath string, content *string, action lsp.CodeAction) (*lsp.CodeAction, error)

func (*Workspace) ResolveCompletionItem added in v0.14.0

func (w *Workspace) ResolveCompletionItem(ctx context.Context, filePath string, content *string, item lsp.CompletionItem) (lsp.CompletionItem, error)

func (*Workspace) RevertChange added in v0.12.6

func (w *Workspace) RevertChange(ctx context.Context, path string) error

func (*Workspace) SemanticTokens added in v0.14.0

func (w *Workspace) SemanticTokens(ctx context.Context, filePath string, content *string) ([]language.SemanticToken, error)

func (*Workspace) SignatureHelp added in v0.14.0

func (w *Workspace) SignatureHelp(ctx context.Context, filePath string, content *string, line, column int, signatureContext *lsp.SignatureHelpContext) (*lsp.SignatureHelp, error)

func (*Workspace) Skills added in v0.6.9

func (w *Workspace) Skills() []skill.Skill

Skills returns a stable snapshot of the current skill catalog.

func (*Workspace) StartManagedToolsUpdate added in v0.15.0

func (w *Workspace) StartManagedToolsUpdate(ctx context.Context, tools ManagedToolSet, progress ...func(devtools.Progress)) *ManagedToolsUpdate

func (*Workspace) SyncEditorDocument added in v0.14.0

func (w *Workspace) SyncEditorDocument(ctx context.Context, filePath, content string, saved bool) error

SyncEditorDocument drives the explicit editor document lifecycle. Feature requests still carry the current buffer as a recovery mechanism, but normal synchronization no longer depends on the user invoking a language feature.

func (*Workspace) SyncProjectMode added in v0.6.9

func (w *Workspace) SyncProjectMode()

func (*Workspace) TypeDefinitionLocations added in v0.12.12

func (w *Workspace) TypeDefinitionLocations(ctx context.Context, filePath string, content *string, line, column int) ([]lsp.Location, error)

func (*Workspace) UpdateDebugTools added in v0.16.4

func (w *Workspace) UpdateDebugTools(ctx context.Context, language string, install bool, progress ...func(devtools.Progress)) (bool, error)

UpdateDebugTools installs or refreshes the selected language's managed debugger and host dependencies, checking for updates at most once per day.

func (*Workspace) UpdateManagedTools added in v0.15.0

func (w *Workspace) UpdateManagedTools(ctx context.Context, tools ManagedToolSet, progress ...func(devtools.Progress)) (bool, error)

UpdateManagedTools installs missing project-relevant tools. Successful updates invalidate discovery caches immediately; active sessions keep running and use the new command on their next start.

func (*Workspace) WarmUp added in v0.6.9

func (w *Workspace) WarmUp()

func (*Workspace) WithDAPManager added in v0.14.10

func (w *Workspace) WithDAPManager(fn func(*dap.Manager) error) error

WithDAPManager keeps the workspace's debugger alive for the duration of fn. DAP is an editor service, not an agent tool; callers use this boundary from explicit user-facing launch and inspection workflows.

func (*Workspace) WithEditDiagnostics added in v0.12.7

func (w *Workspace) WithEditDiagnostics(tools []tool.Tool) []tool.Tool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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