Documentation
¶
Index ¶
- Constants
- Variables
- func CloseAllBrowserSessions()
- func CloseBrowserSession(sessionID string)
- func CrossModelAliasNames() []string
- func DecodeToolInput(input string, target any) error
- func FormatJSONLikeContent(content string) string
- func FormatStructuredData(value any) string
- func GetContextValues(ctx context.Context) (string, string)
- func GetOrCreateBrowserSession(sessionID string) (*browserSession, error)
- func InitBrowserRegistry(cfg *config.InternalToolsConfig)
- func IsBuiltinTool(name string) bool
- func IsRemoteBrowserType(browserType string) bool
- func NormalizeBrowserType(value string) string
- func NormalizeJSONInput(input string) (string, error)
- func RegisterTodoCallback(sessionID string, cb func([]TodoItem))
- func ResetAllCaches()
- func ResetOutputFilterEngine()
- func ResetRegexCache()
- func ResolveToolAlias(name string) string
- func TodoWriteSummary(todos []TodoItem, maxWidth int) string
- func UnregisterSessionCache(sessionID string)
- func UnregisterTodoCallbacks(sessionID string)
- type AskUserQuestionParamOption
- type AskUserQuestionParamQuestion
- type AskUserQuestionParams
- type AskUserQuestionResponseMetadata
- type BaseTool
- func NewAskUserQuestionTool(userInput userinput.Service) BaseTool
- func NewBashTool(permission permission.Service) BaseTool
- func NewBraveSearchTool(permissions permission.Service) BaseTool
- func NewCacheReadTool() BaseTool
- func NewCacheStatsTool() BaseTool
- func NewCodeDeleteProjectTool(indexer *code.CodeIndexer) BaseTool
- func NewCodeFindReferencesTool(indexer *code.CodeIndexer) BaseTool
- func NewCodeFindSymbolTool(indexer *code.CodeIndexer) BaseTool
- func NewCodeGetProjectStatsTool(indexer *code.CodeIndexer) BaseTool
- func NewCodeGetSymbolsOverviewTool(indexer *code.CodeIndexer) BaseTool
- func NewCodeHybridSearchTool(indexer *code.CodeIndexer) BaseTool
- func NewCodeImpactAnalysisTool(indexer *code.CodeIndexer) BaseTool
- func NewCodeIndexProjectTool(indexer *code.CodeIndexer) BaseTool
- func NewCodeIndexStatusTool(indexer *code.CodeIndexer) BaseTool
- func NewCodeListProjectsTool(indexer *code.CodeIndexer) BaseTool
- func NewCodeReindexFileTool(indexer *code.CodeIndexer) BaseTool
- func NewCodeRelatedFilesTool(indexer *code.CodeIndexer) BaseTool
- func NewCodeSearchPatternTool(indexer *code.CodeIndexer) BaseTool
- func NewContext7Tools() []BaseTool
- func NewDesignCanvasTool(permissions permission.Service) BaseTool
- func NewDesignCreateTool(permissions permission.Service) BaseTool
- func NewDesignCritiqueTool() BaseTool
- func NewDesignExportTool(permissions permission.Service) BaseTool
- func NewDesignInspectTool() BaseTool
- func NewDesignPatchTool(permissions permission.Service) BaseTool
- func NewDesignPresentTool() BaseTool
- func NewDesignRenderTool() BaseTool
- func NewDesignScreenshotTool() BaseTool
- func NewDesignSkillsTool(permissions permission.Service) BaseTool
- func NewDesignSystemTool(permissions permission.Service) BaseTool
- func NewDesignVersionsTool(permissions permission.Service) BaseTool
- func NewDiagnosticsTool(lspProvider LSPProvider) BaseTool
- func NewEditTool(lspProvider LSPProvider, permissions permission.Service, files history.Service) BaseTool
- func NewExaSearchTool(permissions permission.Service) BaseTool
- func NewFetchTool(permissions permission.Service) BaseTool
- func NewForgetTool(store *kb.KBStore) BaseTool
- func NewGlobTool() BaseTool
- func NewGoogleSearchTool(permissions permission.Service) BaseTool
- func NewGrepTool() BaseTool
- func NewHybridSearchRemembrancesTool(service *rag.RemembrancesService) BaseTool
- func NewKBAddDocumentTool(store *kb.KBStore) BaseTool
- func NewKBDeleteDocumentTool(store *kb.KBStore) BaseTool
- func NewKBGetDocumentTool(store *kb.KBStore) BaseTool
- func NewKBMarkOutdatedTool(store *kb.KBStore) BaseTool
- func NewKBRelatedDocumentsTool(store *kb.KBStore) BaseTool
- func NewKBSearchDocumentsTool(store *kb.KBStore) BaseTool
- func NewLsTool() BaseTool
- func NewLuaTools(manager *luaengine.FilterManager) []BaseTool
- func NewMesnadaAwaitTool(orch *orchestrator.Orchestrator) BaseTool
- func NewMesnadaCancelTaskTool(orch *orchestrator.Orchestrator) BaseTool
- func NewMesnadaGetOutputTool(orch *orchestrator.Orchestrator) BaseTool
- func NewMesnadaGetTaskTool(orch *orchestrator.Orchestrator) BaseTool
- func NewMesnadaListTasksTool(orch *orchestrator.Orchestrator) BaseTool
- func NewMesnadaNoteTool(orch *orchestrator.Orchestrator) BaseTool
- func NewMesnadaSpawnTool(orch *orchestrator.Orchestrator) BaseTool
- func NewMesnadaSwarmTool(orch *orchestrator.Orchestrator) BaseTool
- func NewMesnadaWaitTaskTool(orch *orchestrator.Orchestrator) BaseTool
- func NewPandoSetupTool(bridge SetupBridge, lspProvider LSPProvider) BaseTool
- func NewPatchTool(lspProvider LSPProvider, permissions permission.Service, files history.Service) BaseTool
- func NewPerplexitySearchTool(permissions permission.Service) BaseTool
- func NewRecallTool(store *kb.KBStore, defaultTTLDays int) BaseTool
- func NewRememberTool(store *kb.KBStore, defaultTTLDays int) BaseTool
- func NewSaveEventTool(store *events.EventStore) BaseTool
- func NewSavingsStatsTool() BaseTool
- func NewSearchEventsTool(store *events.EventStore) BaseTool
- func NewSourcegraphTool() BaseTool
- func NewTodoWriteTool() BaseTool
- func NewToolSearchTool(provider ToolSearchProvider, defaultLimit int) BaseTool
- func NewToolSearchToolWithExecutor(provider ToolSearchProvider, executor ToolExecutor, defaultLimit int) BaseTool
- func NewViewTool(lspProvider LSPProvider) BaseTool
- func NewWriteTool(lspProvider LSPProvider, permissions permission.Service, files history.Service) BaseTool
- type BashParams
- type BashPermissionsParams
- type BashResponseMetadata
- type BrowserClickTool
- type BrowserConsoleEntry
- type BrowserConsoleLogsTool
- type BrowserEvaluateParams
- type BrowserEvaluateTool
- type BrowserFillTool
- type BrowserGetContentParams
- type BrowserGetContentTool
- type BrowserInstall
- type BrowserNavigateParams
- type BrowserNavigateTool
- type BrowserNetworkEntry
- type BrowserNetworkTool
- type BrowserPDFTool
- type BrowserScreenshotParams
- type BrowserScreenshotTool
- type BrowserScrollTool
- type CacheEntry
- type CacheEntrySummary
- type CacheReadParams
- type CacheStats
- type CacheStatsResponse
- type CodeDeleteProjectTool
- type CodeFindReferencesTool
- type CodeFindSymbolTool
- type CodeGetProjectStatsTool
- type CodeGetSymbolsOverviewTool
- type CodeHybridSearchTool
- type CodeImpactAnalysisTool
- type CodeIndexProjectTool
- type CodeIndexStatusTool
- type CodeListProjectsTool
- type CodeReindexFileTool
- type CodeRelatedFilesTool
- type CodeSearchPatternTool
- type DesignCanvasParams
- type DesignCreateParams
- type DesignCritiqueParams
- type DesignExportParams
- type DesignInspectParams
- type DesignPatchParams
- type DesignPresentParams
- type DesignRenderParams
- type DesignScreenshotParams
- type DesignSkillsParams
- type DesignSystemParams
- type DesignVersionsParams
- type DesktopAppsParams
- type DesktopAppsTool
- type DesktopClickAtParams
- type DesktopClickAtTool
- type DesktopClickParams
- type DesktopClickTool
- type DesktopFindParams
- type DesktopFindTool
- type DesktopFocusParams
- type DesktopFocusTool
- type DesktopKeyParams
- type DesktopKeyTool
- type DesktopObserveParams
- type DesktopObserveTool
- type DesktopReadParams
- type DesktopReadTool
- type DesktopScreenshotParams
- type DesktopScreenshotTool
- type DesktopScrollParams
- type DesktopScrollTool
- type DesktopTypeParams
- type DesktopTypeTool
- type DesktopWaitParams
- type DesktopWaitTool
- type DiagnosticsParams
- type EditParams
- type EditPermissionsParams
- type EditResponseMetadata
- type EditStrategy
- type FetchParams
- type FetchPermissionsParams
- type ForgetTool
- type GlobParams
- type GlobResponseMetadata
- type GrepParams
- type GrepResponseMetadata
- type HybridSearchRemembrancesTool
- type ImageCropParams
- type ImageCropTool
- type KBAddDocumentTool
- type KBDeleteDocumentTool
- type KBGetDocumentTool
- type KBMarkOutdatedTool
- type KBRelatedDocumentsTool
- type KBSearchDocumentsTool
- type LSPCatalogEntry
- type LSPProvider
- type LSParams
- type LSResponseMetadata
- type LineScanner
- type MesnadaAwaitTool
- type MesnadaCancelTaskTool
- type MesnadaGetOutputTool
- type MesnadaGetTaskTool
- type MesnadaListTasksTool
- type MesnadaNoteTool
- type MesnadaSpawnTool
- type MesnadaSwarmTool
- type MesnadaWaitTaskTool
- type PaginationInfo
- type PaginationMetadata
- type PatchParams
- type PatchResponseMetadata
- type ReadDedupResult
- type ReadDedupStatus
- type RecallTool
- type RememberTool
- type SaveEventTool
- type SavingsStatsResponse
- type SearchEventsTool
- type SessionCache
- func (c *SessionCache) BounceTracker() *readmode.BounceTracker
- func (c *SessionCache) Clear()
- func (c *SessionCache) Delete(cacheID string)
- func (c *SessionCache) Get(cacheID string) (*CacheEntry, bool)
- func (c *SessionCache) GetPage(cacheID string, offset, limit int) (string, PaginationMetadata, error)
- func (c *SessionCache) RecordRead(path string, startLine, endLine int, content, deliveredMode string) ReadDedupResult
- func (c *SessionCache) SearchInCache(cacheID, pattern string, contextLines, limit int) (string, PaginationMetadata, error)
- func (c *SessionCache) Stats() CacheStats
- func (c *SessionCache) Store(toolCallID, toolName, content string) string
- type SetupBridge
- type SetupLSPCatalog
- type SetupMode
- type SetupModelState
- type SetupModelSwitch
- type SetupProjectRef
- type SetupRunnableCommand
- type SetupSessionInfo
- type SourcegraphParams
- type SourcegraphResponseMetadata
- type TodoItem
- type TodoWriteParams
- type ToolCall
- type ToolExecutor
- type ToolInfo
- type ToolResponse
- func InterceptToolResponse(cache *SessionCache, toolCallID string, toolName string, response ToolResponse) ToolResponse
- func NewStructuredResponse(value any) ToolResponse
- func NewTextErrorResponse(content string) ToolResponse
- func NewTextResponse(content string) ToolResponse
- func WithResponseMetadata(response ToolResponse, metadata any) ToolResponse
- type ToolSearchEntry
- type ToolSearchProvider
- type TreeNode
- type ViewParams
- type ViewResponseMetadata
- type WriteParams
- type WritePermissionsParams
- type WriteResponseMetadata
Constants ¶
const ( BashToolName = "bash" DefaultTimeout = 1 * 60 * 1000 // 1 minutes in milliseconds MaxTimeout = 10 * 60 * 1000 // 10 minutes in milliseconds MaxOutputLength = 30000 )
const ( DefaultCacheMaxBytes = 50 * 1024 * 1024 // 50MB per session DefaultCachePageLines = 200 // Default page size )
const ( // CacheThresholdBytes is the minimum response size to trigger auto-caching. CacheThresholdBytes = 15000 // CacheThresholdLines is the minimum line count to trigger auto-caching. CacheThresholdLines = 300 // CachePreviewLines is the number of lines shown inline when a response is cached. CachePreviewLines = 200 )
const ( Context7ResolveToolName = "c7_resolve_library_id" Context7DocsToolName = "c7_get_library_docs" )
const ( DesignCreateToolName = "design_create" DesignPatchToolName = "design_patch" DesignRenderToolName = "design_render" DesignScreenshotToolName = "design_screenshot" DesignInspectToolName = "design_inspect" DesignVersionsToolName = "design_versions" DesignExportToolName = "design_export" DesignCanvasToolName = "design_canvas" DesignSystemToolName = "design_system" DesignPresentToolName = "design_present" )
Design Studio tool names.
const ( LSToolName = "ls" MaxLSFiles = 1000 )
const ( ToolResponseTypeText toolResponseType = "text" ToolResponseTypeImage toolResponseType = "image" SessionIDContextKey sessionIDContextKey = "session_id" MessageIDContextKey messageIDContextKey = "message_id" ACPClientConnContextKey acpClientConnContextKey = "acp_client_connection" SessionCacheContextKey sessionCacheContextKey = "session_cache" // RuntimeResolverContextKey is the hook point for injecting a non-host // RuntimeResolver in Phase 2 without changing existing execution paths. RuntimeResolverContextKey runtimeResolverContextKey = "runtime_resolver" WorkspaceFSContextKey workspaceFSContextKey = "workspace_fs" )
const ( ViewToolName = "view" MaxReadSize = 250 * 1024 LargeFileProbeSize = 4096 DefaultReadLimit = 2000 MaxLineLength = 2000 )
const AskUserQuestionToolName = "AskUserQuestion"
const (
BraveSearchToolName = "brave_search"
)
const (
BrowserEvaluateToolName = "browser_evaluate"
)
const (
BrowserGetContentToolName = "browser_get_content"
)
const (
)
const (
BrowserScreenshotToolName = "browser_screenshot"
)
const (
CacheReadToolName = "cache_read"
)
const (
CacheStatsToolName = "cache_stats"
)
const DesignCritiqueToolName = "design_critique"
DesignCritiqueToolName is the quality gate: what is wrong with this version, how badly, and whether it is finished.
const DesignSkillsToolName = "design_skills"
DesignSkillsToolName is the gallery tool: the design templates and craft references a brief can be built from.
const (
DesktopAppsToolName = "desktop_apps"
)
const (
DesktopClickAtToolName = "desktop_click_at"
)
const (
DesktopClickToolName = "desktop_click"
)
const (
DesktopFindToolName = "desktop_find"
)
const (
DesktopFocusToolName = "desktop_focus"
)
const (
DesktopKeyToolName = "desktop_key"
)
const (
DesktopObserveToolName = "desktop_observe"
)
const (
DesktopReadToolName = "desktop_read"
)
const (
DesktopScreenshotToolName = "desktop_screenshot"
)
const (
DesktopScrollToolName = "desktop_scroll"
)
const (
DesktopTypeToolName = "desktop_type"
)
const (
DesktopWaitToolName = "desktop_wait"
)
const (
DiagnosticsToolName = "diagnostics"
)
const (
EditToolName = "edit"
)
const (
ExaSearchToolName = "exa_search"
)
const (
FetchToolName = "fetch"
)
const (
GlobToolName = "glob"
)
const (
GoogleSearchToolName = "google_search"
)
const (
GrepToolName = "grep"
)
const (
ImageCropToolName = "image_crop"
)
const (
PandoSetupToolName = "pando_setup"
)
const (
PatchToolName = "patch"
)
const (
PerplexitySearchToolName = "perplexity_search"
)
const (
SavingsStatsToolName = "pando_stats"
)
const (
SourcegraphToolName = "sourcegraph"
)
const TodoWriteToolName = "TodoWrite"
const (
WriteToolName = "write"
)
Variables ¶
var DesignToolNames = []string{ DesignCreateToolName, DesignRenderToolName, DesignInspectToolName, DesignPatchToolName, DesignScreenshotToolName, DesignVersionsToolName, DesignExportToolName, DesignCanvasToolName, DesignSystemToolName, DesignCritiqueToolName, DesignSkillsToolName, DesignPresentToolName, }
DesignToolNames lists every Design Studio tool, in the order surfaces should present them.
Functions ¶
func CloseAllBrowserSessions ¶ added in v0.30.0
func CloseAllBrowserSessions()
CloseAllBrowserSessions cancels all browser sessions. Call on app shutdown.
func CloseBrowserSession ¶ added in v0.30.0
func CloseBrowserSession(sessionID string)
CloseBrowserSession cancels and removes the browser session for the given pando sessionID.
func CrossModelAliasNames ¶ added in v0.416.3
func CrossModelAliasNames() []string
CrossModelAliasNames returns the list of all known alias names (non-canonical). Used to ensure aliases are treated as non-deferred in the tool selection policy.
func DecodeToolInput ¶ added in v0.310.0
DecodeToolInput normalizes malformed JSON generated by models and decodes it into the provided target structure.
func FormatJSONLikeContent ¶ added in v0.320.0
FormatJSONLikeContent attempts to interpret textual content as JSON and render it as TOON. If TOON rendering fails, it falls back to TOML and then indented JSON. If parsing fails, the original content is returned unchanged.
func FormatStructuredData ¶ added in v0.320.0
FormatStructuredData renders structured values as TOON when possible, then TOML, and otherwise falls back to indented JSON.
func GetOrCreateBrowserSession ¶ added in v0.30.0
GetOrCreateBrowserSession returns the existing browser session for the given pando sessionID, or creates a new one if it doesn't exist.
func InitBrowserRegistry ¶ added in v0.30.0
func InitBrowserRegistry(cfg *config.InternalToolsConfig)
InitBrowserRegistry sets the config for the global browser registry. Must be called at app startup when BrowserEnabled=true.
func IsBuiltinTool ¶ added in v0.418.6
IsBuiltinTool reports whether name is an agent-native tool that is always callable directly and is never registered in the MCP gateway catalog. Browser tools share the "browser_" prefix and are matched as a group.
func IsRemoteBrowserType ¶ added in v0.292.1
IsRemoteBrowserType reports whether a browser type is driven over a remote CDP endpoint instead of a locally launched process.
func NormalizeBrowserType ¶ added in v0.291.0
NormalizeBrowserType canonicalises a configured browser type string.
func NormalizeJSONInput ¶ added in v0.310.0
NormalizeJSONInput ensures tool input is valid JSON before decoding. Empty input is normalized to an empty object so tools with optional parameters can omit arguments safely.
func RegisterTodoCallback ¶ added in v0.257.0
RegisterTodoCallback registers a function to be called whenever the todo list for sessionID is updated. Multiple callbacks can be registered per session.
func ResetAllCaches ¶ added in v0.14.0
func ResetAllCaches()
ResetAllCaches clears all session-scoped caches (file locks and regex cache). Call this at the end of each session to prevent memory leaks.
func ResetOutputFilterEngine ¶ added in v0.605.1
func ResetOutputFilterEngine()
ResetOutputFilterEngine clears the cached engine so the next use reloads filters. Call after a config or filter-file change (hot reload).
func ResetRegexCache ¶ added in v0.14.0
func ResetRegexCache()
ResetRegexCache clears all cached regular expressions. Should be called at session end to prevent memory leaks.
func ResolveToolAlias ¶ added in v0.416.3
ResolveToolAlias returns the canonical tool name for the given name. If name is already canonical or unknown, it is returned unchanged.
func TodoWriteSummary ¶ added in v0.257.0
TodoWriteSummary returns a short single-line summary of the todo list, capped to maxWidth runes, suitable for TUI parameter display.
func UnregisterSessionCache ¶ added in v0.30.0
func UnregisterSessionCache(sessionID string)
UnregisterSessionCache removes and clears a session cache.
func UnregisterTodoCallbacks ¶ added in v0.257.0
func UnregisterTodoCallbacks(sessionID string)
UnregisterTodoCallbacks removes all callbacks registered for sessionID.
Types ¶
type AskUserQuestionParamOption ¶ added in v0.502.6
type AskUserQuestionParamQuestion ¶ added in v0.502.6
type AskUserQuestionParamQuestion struct {
Question string `json:"question"`
Header string `json:"header"`
MultiSelect bool `json:"multiSelect"`
Options []AskUserQuestionParamOption `json:"options"`
}
type AskUserQuestionParams ¶ added in v0.502.6
type AskUserQuestionParams struct {
Questions []AskUserQuestionParamQuestion `json:"questions"`
}
AskUserQuestionParams mirrors the Claude Code AskUserQuestion schema.
type AskUserQuestionResponseMetadata ¶ added in v0.502.6
AskUserQuestionResponseMetadata is attached to the tool response as structured metadata.
type BaseTool ¶
type BaseTool interface {
Info() ToolInfo
Run(ctx context.Context, params ToolCall) (ToolResponse, error)
}
func NewAskUserQuestionTool ¶ added in v0.502.6
func NewBashTool ¶
func NewBashTool(permission permission.Service) BaseTool
func NewBraveSearchTool ¶ added in v0.20.0
func NewBraveSearchTool(permissions permission.Service) BaseTool
func NewCacheReadTool ¶ added in v0.30.0
func NewCacheReadTool() BaseTool
NewCacheReadTool creates a new cache_read tool instance.
func NewCacheStatsTool ¶ added in v0.30.0
func NewCacheStatsTool() BaseTool
NewCacheStatsTool returns a tool that reports session cache statistics.
func NewCodeDeleteProjectTool ¶ added in v0.162.0
func NewCodeDeleteProjectTool(indexer *code.CodeIndexer) BaseTool
func NewCodeFindReferencesTool ¶ added in v0.320.0
func NewCodeFindReferencesTool(indexer *code.CodeIndexer) BaseTool
func NewCodeFindSymbolTool ¶ added in v0.7.0
func NewCodeFindSymbolTool(indexer *code.CodeIndexer) BaseTool
func NewCodeGetProjectStatsTool ¶ added in v0.7.0
func NewCodeGetProjectStatsTool(indexer *code.CodeIndexer) BaseTool
func NewCodeGetSymbolsOverviewTool ¶ added in v0.7.0
func NewCodeGetSymbolsOverviewTool(indexer *code.CodeIndexer) BaseTool
func NewCodeHybridSearchTool ¶ added in v0.7.0
func NewCodeHybridSearchTool(indexer *code.CodeIndexer) BaseTool
func NewCodeImpactAnalysisTool ¶ added in v0.608.1
func NewCodeImpactAnalysisTool(indexer *code.CodeIndexer) BaseTool
NewCodeImpactAnalysisTool constructs the code_impact_analysis tool.
func NewCodeIndexProjectTool ¶ added in v0.7.0
func NewCodeIndexProjectTool(indexer *code.CodeIndexer) BaseTool
func NewCodeIndexStatusTool ¶ added in v0.7.0
func NewCodeIndexStatusTool(indexer *code.CodeIndexer) BaseTool
func NewCodeListProjectsTool ¶ added in v0.7.0
func NewCodeListProjectsTool(indexer *code.CodeIndexer) BaseTool
func NewCodeReindexFileTool ¶ added in v0.7.0
func NewCodeReindexFileTool(indexer *code.CodeIndexer) BaseTool
func NewCodeRelatedFilesTool ¶ added in v0.608.1
func NewCodeRelatedFilesTool(indexer *code.CodeIndexer) BaseTool
NewCodeRelatedFilesTool constructs the code_related_files tool.
func NewCodeSearchPatternTool ¶ added in v0.7.0
func NewCodeSearchPatternTool(indexer *code.CodeIndexer) BaseTool
func NewContext7Tools ¶ added in v0.20.0
func NewContext7Tools() []BaseTool
NewContext7Tools returns both Context7 tools.
func NewDesignCanvasTool ¶ added in v0.700.0
func NewDesignCanvasTool(permissions permission.Service) BaseTool
NewDesignCanvasTool returns the canvas rasterisation tool.
func NewDesignCreateTool ¶ added in v0.700.0
func NewDesignCreateTool(permissions permission.Service) BaseTool
NewDesignCreateTool returns the artifact-creation tool.
func NewDesignCritiqueTool ¶ added in v0.700.0
func NewDesignCritiqueTool() BaseTool
NewDesignCritiqueTool returns the critique/quality-gate tool.
func NewDesignExportTool ¶ added in v0.700.0
func NewDesignExportTool(permissions permission.Service) BaseTool
NewDesignExportTool returns the export tool.
func NewDesignInspectTool ¶ added in v0.700.0
func NewDesignInspectTool() BaseTool
NewDesignInspectTool returns the structure inspector.
func NewDesignPatchTool ¶ added in v0.700.0
func NewDesignPatchTool(permissions permission.Service) BaseTool
NewDesignPatchTool returns the selector-to-source patch tool.
func NewDesignPresentTool ¶ added in v0.700.0
func NewDesignPresentTool() BaseTool
NewDesignPresentTool returns the tool that surfaces an artifact to the user.
func NewDesignRenderTool ¶ added in v0.700.0
func NewDesignRenderTool() BaseTool
NewDesignRenderTool returns the render/index tool.
func NewDesignScreenshotTool ¶ added in v0.700.0
func NewDesignScreenshotTool() BaseTool
NewDesignScreenshotTool returns the visual-feedback tool.
func NewDesignSkillsTool ¶ added in v0.700.0
func NewDesignSkillsTool(permissions permission.Service) BaseTool
NewDesignSkillsTool returns the design template gallery tool.
func NewDesignSystemTool ¶ added in v0.700.0
func NewDesignSystemTool(permissions permission.Service) BaseTool
NewDesignSystemTool returns the shared design-token tool.
func NewDesignVersionsTool ¶ added in v0.700.0
func NewDesignVersionsTool(permissions permission.Service) BaseTool
NewDesignVersionsTool returns the artifact history tool.
func NewDiagnosticsTool ¶
func NewDiagnosticsTool(lspProvider LSPProvider) BaseTool
func NewEditTool ¶
func NewEditTool(lspProvider LSPProvider, permissions permission.Service, files history.Service) BaseTool
func NewExaSearchTool ¶ added in v0.32.1
func NewExaSearchTool(permissions permission.Service) BaseTool
func NewFetchTool ¶
func NewFetchTool(permissions permission.Service) BaseTool
func NewForgetTool ¶ added in v0.416.3
NewForgetTool creates a new ForgetTool.
func NewGlobTool ¶
func NewGlobTool() BaseTool
func NewGoogleSearchTool ¶ added in v0.20.0
func NewGoogleSearchTool(permissions permission.Service) BaseTool
func NewGrepTool ¶
func NewGrepTool() BaseTool
func NewHybridSearchRemembrancesTool ¶ added in v0.210.0
func NewHybridSearchRemembrancesTool(service *rag.RemembrancesService) BaseTool
func NewKBAddDocumentTool ¶ added in v0.7.0
NewKBAddDocumentTool creates a new KBAddDocumentTool.
func NewKBDeleteDocumentTool ¶ added in v0.7.0
NewKBDeleteDocumentTool creates a new KBDeleteDocumentTool.
func NewKBGetDocumentTool ¶ added in v0.7.0
NewKBGetDocumentTool creates a new KBGetDocumentTool.
func NewKBMarkOutdatedTool ¶ added in v0.622.0
NewKBMarkOutdatedTool creates a new KBMarkOutdatedTool.
func NewKBRelatedDocumentsTool ¶ added in v0.608.1
NewKBRelatedDocumentsTool creates a new KBRelatedDocumentsTool.
func NewKBSearchDocumentsTool ¶ added in v0.7.0
NewKBSearchDocumentsTool creates a new KBSearchDocumentsTool.
func NewLuaTools ¶ added in v0.410.1
func NewLuaTools(manager *luaengine.FilterManager) []BaseTool
func NewMesnadaAwaitTool ¶ added in v0.601.2
func NewMesnadaAwaitTool(orch *orchestrator.Orchestrator) BaseTool
NewMesnadaAwaitTool constructs the await tool over the orchestrator.
func NewMesnadaCancelTaskTool ¶
func NewMesnadaCancelTaskTool(orch *orchestrator.Orchestrator) BaseTool
func NewMesnadaGetOutputTool ¶
func NewMesnadaGetOutputTool(orch *orchestrator.Orchestrator) BaseTool
func NewMesnadaGetTaskTool ¶
func NewMesnadaGetTaskTool(orch *orchestrator.Orchestrator) BaseTool
func NewMesnadaListTasksTool ¶
func NewMesnadaListTasksTool(orch *orchestrator.Orchestrator) BaseTool
func NewMesnadaNoteTool ¶ added in v0.629.4
func NewMesnadaNoteTool(orch *orchestrator.Orchestrator) BaseTool
func NewMesnadaSpawnTool ¶
func NewMesnadaSpawnTool(orch *orchestrator.Orchestrator) BaseTool
func NewMesnadaSwarmTool ¶ added in v0.629.4
func NewMesnadaSwarmTool(orch *orchestrator.Orchestrator) BaseTool
func NewMesnadaWaitTaskTool ¶
func NewMesnadaWaitTaskTool(orch *orchestrator.Orchestrator) BaseTool
func NewPandoSetupTool ¶ added in v0.629.4
func NewPandoSetupTool(bridge SetupBridge, lspProvider LSPProvider) BaseTool
NewPandoSetupTool returns the always-on tool that lets the agent inspect and steer its own Pando instance. Both dependencies may be nil: the configuration and model commands still work, while the session, command and lsp commands report unavailable.
func NewPatchTool ¶
func NewPatchTool(lspProvider LSPProvider, permissions permission.Service, files history.Service) BaseTool
func NewPerplexitySearchTool ¶ added in v0.20.0
func NewPerplexitySearchTool(permissions permission.Service) BaseTool
func NewRecallTool ¶ added in v0.416.3
NewRecallTool creates a new RecallTool.
func NewRememberTool ¶ added in v0.416.3
NewRememberTool creates a new RememberTool.
func NewSaveEventTool ¶ added in v0.7.0
func NewSaveEventTool(store *events.EventStore) BaseTool
NewSaveEventTool creates a new SaveEventTool.
func NewSavingsStatsTool ¶ added in v0.608.1
func NewSavingsStatsTool() BaseTool
NewSavingsStatsTool returns the MCP tool that reports token-savings analytics.
func NewSearchEventsTool ¶ added in v0.7.0
func NewSearchEventsTool(store *events.EventStore) BaseTool
NewSearchEventsTool creates a new SearchEventsTool.
func NewSourcegraphTool ¶
func NewSourcegraphTool() BaseTool
func NewTodoWriteTool ¶ added in v0.257.0
func NewTodoWriteTool() BaseTool
NewTodoWriteTool creates a new TodoWrite tool instance.
func NewToolSearchTool ¶ added in v0.416.3
func NewToolSearchTool(provider ToolSearchProvider, defaultLimit int) BaseTool
NewToolSearchTool creates the built-in tool_search tool backed by provider. provider should be set to the active *tooldiscovery.Registry after it is wrapped with a thin adapter (see tooldiscovery.RegistrySearchAdapter). defaultLimit is the number of results returned when the caller does not specify one; values <= 0 fall back to 8. The returned tool only supports search; use NewToolSearchToolWithExecutor to also enable execution.
func NewToolSearchToolWithExecutor ¶ added in v0.646.4
func NewToolSearchToolWithExecutor(provider ToolSearchProvider, executor ToolExecutor, defaultLimit int) BaseTool
NewToolSearchToolWithExecutor creates the unified tool_search tool that can both discover tools (query mode) and execute them (tool_name mode). When executor is nil, execution requests return an error response.
func NewViewTool ¶
func NewViewTool(lspProvider LSPProvider) BaseTool
func NewWriteTool ¶
func NewWriteTool(lspProvider LSPProvider, permissions permission.Service, files history.Service) BaseTool
type BashParams ¶
type BashPermissionsParams ¶
type BashResponseMetadata ¶
type BashResponseMetadata struct {
StartTime int64 `json:"start_time"`
EndTime int64 `json:"end_time"`
TotalLines int `json:"total_lines"`
Truncated bool `json:"truncated"`
// OutputFilter is the name of the RTK-style filter or native parser that
// compressed the command output, empty when no compression was applied.
OutputFilter string `json:"output_filter,omitempty"`
// OutputFilterCharsBefore / OutputFilterCharsAfter record the byte sizes
// before and after compression so the UI can show the token/char savings.
OutputFilterCharsBefore int `json:"output_filter_chars_before,omitempty"`
OutputFilterCharsAfter int `json:"output_filter_chars_after,omitempty"`
}
type BrowserClickTool ¶ added in v0.30.0
type BrowserClickTool struct{}
func NewBrowserClickTool ¶ added in v0.30.0
func NewBrowserClickTool() *BrowserClickTool
func (*BrowserClickTool) Info ¶ added in v0.30.0
func (t *BrowserClickTool) Info() ToolInfo
func (*BrowserClickTool) Run ¶ added in v0.30.0
func (t *BrowserClickTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type BrowserConsoleEntry ¶ added in v0.30.0
BrowserConsoleEntry holds a single JS console message captured during a browser session.
type BrowserConsoleLogsTool ¶ added in v0.30.0
type BrowserConsoleLogsTool struct{}
func NewBrowserConsoleLogsTool ¶ added in v0.30.0
func NewBrowserConsoleLogsTool() *BrowserConsoleLogsTool
func (*BrowserConsoleLogsTool) Info ¶ added in v0.30.0
func (t *BrowserConsoleLogsTool) Info() ToolInfo
func (*BrowserConsoleLogsTool) Run ¶ added in v0.30.0
func (t *BrowserConsoleLogsTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type BrowserEvaluateParams ¶ added in v0.30.0
type BrowserEvaluateParams struct {
Expression string `json:"expression"`
}
type BrowserEvaluateTool ¶ added in v0.30.0
type BrowserEvaluateTool struct{}
func NewBrowserEvaluateTool ¶ added in v0.30.0
func NewBrowserEvaluateTool() *BrowserEvaluateTool
func (*BrowserEvaluateTool) Info ¶ added in v0.30.0
func (t *BrowserEvaluateTool) Info() ToolInfo
func (*BrowserEvaluateTool) Run ¶ added in v0.30.0
func (t *BrowserEvaluateTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type BrowserFillTool ¶ added in v0.30.0
type BrowserFillTool struct{}
func NewBrowserFillTool ¶ added in v0.30.0
func NewBrowserFillTool() *BrowserFillTool
func (*BrowserFillTool) Info ¶ added in v0.30.0
func (t *BrowserFillTool) Info() ToolInfo
func (*BrowserFillTool) Run ¶ added in v0.30.0
func (t *BrowserFillTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type BrowserGetContentParams ¶ added in v0.30.0
type BrowserGetContentTool ¶ added in v0.30.0
type BrowserGetContentTool struct{}
func NewBrowserGetContentTool ¶ added in v0.30.0
func NewBrowserGetContentTool() *BrowserGetContentTool
func (*BrowserGetContentTool) Info ¶ added in v0.30.0
func (t *BrowserGetContentTool) Info() ToolInfo
func (*BrowserGetContentTool) Run ¶ added in v0.30.0
func (t *BrowserGetContentTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type BrowserInstall ¶ added in v0.291.0
type BrowserInstall = browser.BrowserInstall
BrowserInstall describes a detected browser installation.
func DetectInstalledBrowsers ¶ added in v0.291.0
func DetectInstalledBrowsers() []BrowserInstall
DetectInstalledBrowsers lists the browsers found on this machine.
func ResolveBrowserInstall ¶ added in v0.291.0
func ResolveBrowserInstall(browserType, executable string) (BrowserInstall, bool)
ResolveBrowserInstall resolves a configured browser type/executable pair to a concrete installation.
type BrowserNavigateParams ¶ added in v0.30.0
type BrowserNavigateParams struct {
}
type BrowserNavigateTool ¶ added in v0.30.0
type BrowserNavigateTool struct{}
func NewBrowserNavigateTool ¶ added in v0.30.0
func NewBrowserNavigateTool() *BrowserNavigateTool
func (*BrowserNavigateTool) Info ¶ added in v0.30.0
func (t *BrowserNavigateTool) Info() ToolInfo
func (*BrowserNavigateTool) Run ¶ added in v0.30.0
func (t *BrowserNavigateTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type BrowserNetworkEntry ¶ added in v0.30.0
type BrowserNetworkEntry struct {
RequestID string
URL string
Method string
Status int
MimeType string
Time time.Time
}
BrowserNetworkEntry holds metadata for a single network request captured during a browser session.
type BrowserNetworkTool ¶ added in v0.30.0
type BrowserNetworkTool struct{}
func NewBrowserNetworkTool ¶ added in v0.30.0
func NewBrowserNetworkTool() *BrowserNetworkTool
func (*BrowserNetworkTool) Info ¶ added in v0.30.0
func (t *BrowserNetworkTool) Info() ToolInfo
func (*BrowserNetworkTool) Run ¶ added in v0.30.0
func (t *BrowserNetworkTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type BrowserPDFTool ¶ added in v0.30.0
type BrowserPDFTool struct{}
func NewBrowserPDFTool ¶ added in v0.30.0
func NewBrowserPDFTool() *BrowserPDFTool
func (*BrowserPDFTool) Info ¶ added in v0.30.0
func (t *BrowserPDFTool) Info() ToolInfo
func (*BrowserPDFTool) Run ¶ added in v0.30.0
func (t *BrowserPDFTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type BrowserScreenshotParams ¶ added in v0.30.0
type BrowserScreenshotTool ¶ added in v0.30.0
type BrowserScreenshotTool struct{}
func NewBrowserScreenshotTool ¶ added in v0.30.0
func NewBrowserScreenshotTool() *BrowserScreenshotTool
func (*BrowserScreenshotTool) Info ¶ added in v0.30.0
func (t *BrowserScreenshotTool) Info() ToolInfo
func (*BrowserScreenshotTool) Run ¶ added in v0.30.0
func (t *BrowserScreenshotTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type BrowserScrollTool ¶ added in v0.30.0
type BrowserScrollTool struct{}
func NewBrowserScrollTool ¶ added in v0.30.0
func NewBrowserScrollTool() *BrowserScrollTool
func (*BrowserScrollTool) Info ¶ added in v0.30.0
func (t *BrowserScrollTool) Info() ToolInfo
func (*BrowserScrollTool) Run ¶ added in v0.30.0
func (t *BrowserScrollTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type CacheEntry ¶ added in v0.30.0
type CacheEntry struct {
ID string
ToolCallID string
ToolName string
Content string // Full raw response
Lines []string // Pre-split lines for O(1) pagination
TotalLines int
TotalBytes int
CreatedAt time.Time
LastUsed time.Time
}
CacheEntry holds a cached tool response with pagination support.
type CacheEntrySummary ¶ added in v0.30.0
type CacheEntrySummary struct {
CacheID string `json:"cache_id"`
ToolName string `json:"tool_name"`
TotalLines int `json:"total_lines"`
TotalBytes int `json:"total_bytes"`
AgeSeconds int `json:"age_seconds"`
}
CacheEntrySummary is a compact descriptor for a single cached entry.
type CacheReadParams ¶ added in v0.30.0
type CacheReadParams struct {
CacheID string `json:"cache_id"` // Required: ID from truncated response
Offset int `json:"offset"` // Line offset (0-based), default 0
Limit int `json:"limit"` // Lines to read, default 200
Pattern string `json:"pattern"` // Optional: search within cached content
ContextLines int `json:"context_lines,omitempty"` // Context lines around matches (default 2)
}
CacheReadParams defines the parameters for the cache_read tool.
type CacheStats ¶ added in v0.30.0
type CacheStats struct {
EntryCount int `json:"entry_count"`
TotalBytes int64 `json:"total_bytes"`
MaxBytes int64 `json:"max_bytes"`
Evictions int `json:"evictions"`
// DedupHits counts unchanged-re-read collapses (Phase 2 F-references).
DedupHits int `json:"dedup_hits"`
// Bounces counts compressed→full read bounces observed by the Phase 3 tracker.
Bounces int `json:"bounces"`
// BounceWastedBytes is the rendered size of compressed reads that later bounced.
BounceWastedBytes int64 `json:"bounce_wasted_bytes"`
}
CacheStats provides statistics about the cache state.
type CacheStatsResponse ¶ added in v0.30.0
type CacheStatsResponse struct {
Stats CacheStats `json:"stats"`
Entries []CacheEntrySummary `json:"entries"`
}
CacheStatsResponse is the structured metadata attached to the stats response.
type CodeDeleteProjectTool ¶ added in v0.162.0
type CodeDeleteProjectTool struct {
// contains filtered or unexported fields
}
CodeDeleteProjectTool deletes an indexed project and its data.
func (*CodeDeleteProjectTool) Info ¶ added in v0.162.0
func (t *CodeDeleteProjectTool) Info() ToolInfo
func (*CodeDeleteProjectTool) Run ¶ added in v0.162.0
func (t *CodeDeleteProjectTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type CodeFindReferencesTool ¶ added in v0.320.0
type CodeFindReferencesTool struct {
// contains filtered or unexported fields
}
CodeFindReferencesTool finds references to a symbol across the indexed codebase.
func (*CodeFindReferencesTool) Info ¶ added in v0.320.0
func (t *CodeFindReferencesTool) Info() ToolInfo
func (*CodeFindReferencesTool) Run ¶ added in v0.320.0
func (t *CodeFindReferencesTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type CodeFindSymbolTool ¶ added in v0.7.0
type CodeFindSymbolTool struct {
// contains filtered or unexported fields
}
CodeFindSymbolTool finds symbols by name pattern.
func (*CodeFindSymbolTool) Info ¶ added in v0.7.0
func (t *CodeFindSymbolTool) Info() ToolInfo
func (*CodeFindSymbolTool) Run ¶ added in v0.7.0
func (t *CodeFindSymbolTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type CodeGetProjectStatsTool ¶ added in v0.7.0
type CodeGetProjectStatsTool struct {
// contains filtered or unexported fields
}
CodeGetProjectStatsTool returns statistics for an indexed project.
func (*CodeGetProjectStatsTool) Info ¶ added in v0.7.0
func (t *CodeGetProjectStatsTool) Info() ToolInfo
func (*CodeGetProjectStatsTool) Run ¶ added in v0.7.0
func (t *CodeGetProjectStatsTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type CodeGetSymbolsOverviewTool ¶ added in v0.7.0
type CodeGetSymbolsOverviewTool struct {
// contains filtered or unexported fields
}
CodeGetSymbolsOverviewTool returns a high-level overview of symbols in a file.
func (*CodeGetSymbolsOverviewTool) Info ¶ added in v0.7.0
func (t *CodeGetSymbolsOverviewTool) Info() ToolInfo
func (*CodeGetSymbolsOverviewTool) Run ¶ added in v0.7.0
func (t *CodeGetSymbolsOverviewTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type CodeHybridSearchTool ¶ added in v0.7.0
type CodeHybridSearchTool struct {
// contains filtered or unexported fields
}
CodeHybridSearchTool performs hybrid semantic + FTS search over code symbols.
func (*CodeHybridSearchTool) Info ¶ added in v0.7.0
func (t *CodeHybridSearchTool) Info() ToolInfo
func (*CodeHybridSearchTool) Run ¶ added in v0.7.0
func (t *CodeHybridSearchTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type CodeImpactAnalysisTool ¶ added in v0.608.1
type CodeImpactAnalysisTool struct {
// contains filtered or unexported fields
}
CodeImpactAnalysisTool reports which symbols depend on a given symbol.
func (*CodeImpactAnalysisTool) Info ¶ added in v0.608.1
func (t *CodeImpactAnalysisTool) Info() ToolInfo
func (*CodeImpactAnalysisTool) Run ¶ added in v0.608.1
func (t *CodeImpactAnalysisTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type CodeIndexProjectTool ¶ added in v0.7.0
type CodeIndexProjectTool struct {
// contains filtered or unexported fields
}
CodeIndexProjectTool starts indexing a code project.
func (*CodeIndexProjectTool) Info ¶ added in v0.7.0
func (t *CodeIndexProjectTool) Info() ToolInfo
func (*CodeIndexProjectTool) Run ¶ added in v0.7.0
func (t *CodeIndexProjectTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type CodeIndexStatusTool ¶ added in v0.7.0
type CodeIndexStatusTool struct {
// contains filtered or unexported fields
}
CodeIndexStatusTool returns the status of an indexing job.
func (*CodeIndexStatusTool) Info ¶ added in v0.7.0
func (t *CodeIndexStatusTool) Info() ToolInfo
func (*CodeIndexStatusTool) Run ¶ added in v0.7.0
func (t *CodeIndexStatusTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type CodeListProjectsTool ¶ added in v0.7.0
type CodeListProjectsTool struct {
// contains filtered or unexported fields
}
CodeListProjectsTool lists all indexed projects.
func (*CodeListProjectsTool) Info ¶ added in v0.7.0
func (t *CodeListProjectsTool) Info() ToolInfo
func (*CodeListProjectsTool) Run ¶ added in v0.7.0
func (t *CodeListProjectsTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type CodeReindexFileTool ¶ added in v0.7.0
type CodeReindexFileTool struct {
// contains filtered or unexported fields
}
CodeReindexFileTool re-indexes a single file.
func (*CodeReindexFileTool) Info ¶ added in v0.7.0
func (t *CodeReindexFileTool) Info() ToolInfo
func (*CodeReindexFileTool) Run ¶ added in v0.7.0
func (t *CodeReindexFileTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type CodeRelatedFilesTool ¶ added in v0.608.1
type CodeRelatedFilesTool struct {
// contains filtered or unexported fields
}
CodeRelatedFilesTool reports files related to a given file via the code graph.
func (*CodeRelatedFilesTool) Info ¶ added in v0.608.1
func (t *CodeRelatedFilesTool) Info() ToolInfo
func (*CodeRelatedFilesTool) Run ¶ added in v0.608.1
func (t *CodeRelatedFilesTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type CodeSearchPatternTool ¶ added in v0.7.0
type CodeSearchPatternTool struct {
// contains filtered or unexported fields
}
CodeSearchPatternTool searches for text patterns in code symbols.
func (*CodeSearchPatternTool) Info ¶ added in v0.7.0
func (t *CodeSearchPatternTool) Info() ToolInfo
func (*CodeSearchPatternTool) Run ¶ added in v0.7.0
func (t *CodeSearchPatternTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type DesignCanvasParams ¶ added in v0.700.0
type DesignCreateParams ¶ added in v0.700.0
type DesignCreateParams struct {
Title string `json:"title"`
Kind string `json:"kind,omitempty"`
Slug string `json:"slug,omitempty"`
Skill string `json:"skill,omitempty"`
DesignSystem string `json:"design_system,omitempty"`
Entry string `json:"entry,omitempty"`
Files map[string]string `json:"files,omitempty"`
}
type DesignCritiqueParams ¶ added in v0.700.0
type DesignCritiqueParams struct {
ArtifactID string `json:"artifact_id"`
Action string `json:"action,omitempty"`
Version int `json:"version,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
// Policy overrides the gate for this pass: none, standard or strict.
Policy string `json:"policy,omitempty"`
// Round is the 1-based iteration number; it defaults to the version.
Round int `json:"round,omitempty"`
// SkipRender audits without a browser: design-system checks only.
SkipRender bool `json:"skip_render,omitempty"`
// Record stores the pass in the artifact's critique history. Default true.
Record *bool `json:"record,omitempty"`
// Score, Summary and Issues carry the critic's own judgement.
Score float64 `json:"score,omitempty"`
Summary string `json:"summary,omitempty"`
Issues []design.Issue `json:"issues,omitempty"`
}
DesignCritiqueParams drives one critic pass.
type DesignExportParams ¶ added in v0.700.0
type DesignExportParams struct {
ArtifactID string `json:"artifact_id"`
Format string `json:"format,omitempty"`
Dest string `json:"dest,omitempty"`
Slide int `json:"slide,omitempty"`
FullPage bool `json:"full_page,omitempty"`
Landscape bool `json:"landscape,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
}
type DesignInspectParams ¶ added in v0.700.0
type DesignInspectParams struct {
ArtifactID string `json:"artifact_id"`
Version int `json:"version,omitempty"`
NodeID string `json:"node_id,omitempty"`
Selector string `json:"selector,omitempty"`
Text string `json:"text,omitempty"`
Slide int `json:"slide,omitempty"`
Depth int `json:"depth,omitempty"`
Offset int `json:"offset,omitempty"`
Limit int `json:"limit,omitempty"`
IncludeStyles bool `json:"include_styles,omitempty"`
StyleProps []string `json:"style_props,omitempty"`
MaxTextLen int `json:"max_text_len,omitempty"`
}
type DesignPatchParams ¶ added in v0.700.0
type DesignPresentParams ¶ added in v0.700.0
type DesignPresentParams struct {
ArtifactID string `json:"artifact_id"`
Slide int `json:"slide,omitempty"`
NodeID string `json:"node_id,omitempty"`
Open bool `json:"open,omitempty"`
// View selects the surface: "artifact" (default) is one document, "canvas"
// is the read-only board holding every artifact of the session.
View string `json:"view,omitempty"`
}
type DesignRenderParams ¶ added in v0.700.0
type DesignRenderParams struct {
ArtifactID string `json:"artifact_id"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
WaitMS int `json:"wait_ms,omitempty"`
MaxNodes int `json:"max_nodes,omitempty"`
MaxDepth int `json:"max_depth,omitempty"`
PrintMedia bool `json:"print_media,omitempty"`
}
type DesignScreenshotParams ¶ added in v0.700.0
type DesignScreenshotParams struct {
ArtifactID string `json:"artifact_id"`
Selector string `json:"selector,omitempty"`
NodeID string `json:"node_id,omitempty"`
Slide int `json:"slide,omitempty"`
FullPage bool `json:"full_page,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
WaitMS int `json:"wait_ms,omitempty"`
}
type DesignSkillsParams ¶ added in v0.700.0
type DesignSkillsParams struct {
Action string `json:"action,omitempty"`
// Name is the template ("show", "install").
Name string `json:"name,omitempty"`
// Craft names a craft reference to read instead of a template ("show").
Craft string `json:"craft,omitempty"`
// Scope is "project" (default) or "global" ("install").
Scope string `json:"scope,omitempty"`
// Force replaces an already installed copy ("install").
Force bool `json:"force,omitempty"`
}
DesignSkillsParams drives the gallery tool.
type DesignSystemParams ¶ added in v0.700.0
type DesignSystemParams struct {
Action string `json:"action,omitempty"`
Name string `json:"name,omitempty"`
Tokens map[string]map[string]string `json:"tokens,omitempty"`
Fonts []string `json:"fonts,omitempty"`
// Source and Target drive "extract".
Source string `json:"source,omitempty"`
Target string `json:"target,omitempty"`
// ArtifactID drives "apply".
ArtifactID string `json:"artifact_id,omitempty"`
}
type DesignVersionsParams ¶ added in v0.700.0
type DesignVersionsParams struct {
ArtifactID string `json:"artifact_id,omitempty"`
Action string `json:"action,omitempty"`
Version int `json:"version,omitempty"`
From int `json:"from,omitempty"`
To int `json:"to,omitempty"`
Summary string `json:"summary,omitempty"`
Session bool `json:"session_only,omitempty"`
}
type DesktopAppsParams ¶ added in v0.700.0
type DesktopAppsParams struct{}
type DesktopAppsTool ¶ added in v0.700.0
type DesktopAppsTool struct{}
func NewDesktopAppsTool ¶ added in v0.700.0
func NewDesktopAppsTool() *DesktopAppsTool
func (*DesktopAppsTool) Info ¶ added in v0.700.0
func (t *DesktopAppsTool) Info() ToolInfo
func (*DesktopAppsTool) Run ¶ added in v0.700.0
func (t *DesktopAppsTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type DesktopClickAtParams ¶ added in v0.700.0
type DesktopClickAtTool ¶ added in v0.700.0
type DesktopClickAtTool struct {
// contains filtered or unexported fields
}
func NewDesktopClickAtTool ¶ added in v0.700.0
func NewDesktopClickAtTool(permissions permission.Service) *DesktopClickAtTool
func (*DesktopClickAtTool) Info ¶ added in v0.700.0
func (t *DesktopClickAtTool) Info() ToolInfo
func (*DesktopClickAtTool) Run ¶ added in v0.700.0
func (t *DesktopClickAtTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type DesktopClickParams ¶ added in v0.700.0
type DesktopClickParams struct {
Ref string `json:"ref"`
}
type DesktopClickTool ¶ added in v0.700.0
type DesktopClickTool struct {
// contains filtered or unexported fields
}
func NewDesktopClickTool ¶ added in v0.700.0
func NewDesktopClickTool(permissions permission.Service) *DesktopClickTool
func (*DesktopClickTool) Info ¶ added in v0.700.0
func (t *DesktopClickTool) Info() ToolInfo
func (*DesktopClickTool) Run ¶ added in v0.700.0
func (t *DesktopClickTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type DesktopFindParams ¶ added in v0.700.0
type DesktopFindTool ¶ added in v0.700.0
type DesktopFindTool struct{}
func NewDesktopFindTool ¶ added in v0.700.0
func NewDesktopFindTool() *DesktopFindTool
func (*DesktopFindTool) Info ¶ added in v0.700.0
func (t *DesktopFindTool) Info() ToolInfo
func (*DesktopFindTool) Run ¶ added in v0.700.0
func (t *DesktopFindTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type DesktopFocusParams ¶ added in v0.700.0
type DesktopFocusParams struct {
Ref string `json:"ref"`
}
type DesktopFocusTool ¶ added in v0.700.0
type DesktopFocusTool struct {
// contains filtered or unexported fields
}
func NewDesktopFocusTool ¶ added in v0.700.0
func NewDesktopFocusTool(permissions permission.Service) *DesktopFocusTool
func (*DesktopFocusTool) Info ¶ added in v0.700.0
func (t *DesktopFocusTool) Info() ToolInfo
func (*DesktopFocusTool) Run ¶ added in v0.700.0
func (t *DesktopFocusTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type DesktopKeyParams ¶ added in v0.700.0
type DesktopKeyTool ¶ added in v0.700.0
type DesktopKeyTool struct {
// contains filtered or unexported fields
}
func NewDesktopKeyTool ¶ added in v0.700.0
func NewDesktopKeyTool(permissions permission.Service) *DesktopKeyTool
func (*DesktopKeyTool) Info ¶ added in v0.700.0
func (t *DesktopKeyTool) Info() ToolInfo
func (*DesktopKeyTool) Run ¶ added in v0.700.0
func (t *DesktopKeyTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type DesktopObserveParams ¶ added in v0.700.0
type DesktopObserveParams struct {
Depth int `json:"depth,omitempty"`
// contains filtered or unexported fields
}
type DesktopObserveTool ¶ added in v0.700.0
type DesktopObserveTool struct{}
func NewDesktopObserveTool ¶ added in v0.700.0
func NewDesktopObserveTool() *DesktopObserveTool
func (*DesktopObserveTool) Info ¶ added in v0.700.0
func (t *DesktopObserveTool) Info() ToolInfo
func (*DesktopObserveTool) Run ¶ added in v0.700.0
func (t *DesktopObserveTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type DesktopReadParams ¶ added in v0.700.0
type DesktopReadParams struct {
Ref string `json:"ref"`
}
type DesktopReadTool ¶ added in v0.700.0
type DesktopReadTool struct{}
func NewDesktopReadTool ¶ added in v0.700.0
func NewDesktopReadTool() *DesktopReadTool
func (*DesktopReadTool) Info ¶ added in v0.700.0
func (t *DesktopReadTool) Info() ToolInfo
func (*DesktopReadTool) Run ¶ added in v0.700.0
func (t *DesktopReadTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type DesktopScreenshotParams ¶ added in v0.700.0
type DesktopScreenshotTool ¶ added in v0.700.0
type DesktopScreenshotTool struct {
// contains filtered or unexported fields
}
func NewDesktopScreenshotTool ¶ added in v0.700.0
func NewDesktopScreenshotTool(permissions permission.Service) *DesktopScreenshotTool
func (*DesktopScreenshotTool) Info ¶ added in v0.700.0
func (t *DesktopScreenshotTool) Info() ToolInfo
func (*DesktopScreenshotTool) Run ¶ added in v0.700.0
func (t *DesktopScreenshotTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type DesktopScrollParams ¶ added in v0.700.0
type DesktopScrollTool ¶ added in v0.700.0
type DesktopScrollTool struct {
// contains filtered or unexported fields
}
func NewDesktopScrollTool ¶ added in v0.700.0
func NewDesktopScrollTool(permissions permission.Service) *DesktopScrollTool
func (*DesktopScrollTool) Info ¶ added in v0.700.0
func (t *DesktopScrollTool) Info() ToolInfo
func (*DesktopScrollTool) Run ¶ added in v0.700.0
func (t *DesktopScrollTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type DesktopTypeParams ¶ added in v0.700.0
type DesktopTypeTool ¶ added in v0.700.0
type DesktopTypeTool struct {
// contains filtered or unexported fields
}
func NewDesktopTypeTool ¶ added in v0.700.0
func NewDesktopTypeTool(permissions permission.Service) *DesktopTypeTool
func (*DesktopTypeTool) Info ¶ added in v0.700.0
func (t *DesktopTypeTool) Info() ToolInfo
func (*DesktopTypeTool) Run ¶ added in v0.700.0
func (t *DesktopTypeTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type DesktopWaitParams ¶ added in v0.700.0
type DesktopWaitTool ¶ added in v0.700.0
type DesktopWaitTool struct{}
func NewDesktopWaitTool ¶ added in v0.700.0
func NewDesktopWaitTool() *DesktopWaitTool
func (*DesktopWaitTool) Info ¶ added in v0.700.0
func (t *DesktopWaitTool) Info() ToolInfo
func (*DesktopWaitTool) Run ¶ added in v0.700.0
func (t *DesktopWaitTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type DiagnosticsParams ¶
type DiagnosticsParams struct {
FilePath string `json:"file_path"`
}
type EditParams ¶
type EditPermissionsParams ¶
type EditResponseMetadata ¶
type EditStrategy ¶ added in v0.14.0
type EditStrategy interface {
Apply(content, oldStr, newStr string) (result string, matched bool)
Name() string
}
EditStrategy tries to find oldStr in content and replace it with newStr. Returns (result, true) on success, ("", false) if not matched. IMPORTANT: normalization is applied only for MATCHING, not for the replacement. The actual replacement must use the original content at the found position.
type FetchParams ¶
type FetchPermissionsParams ¶
type ForgetTool ¶ added in v0.416.3
type ForgetTool struct {
// contains filtered or unexported fields
}
ForgetTool deletes a memory by key or file path.
func (*ForgetTool) Info ¶ added in v0.416.3
func (t *ForgetTool) Info() ToolInfo
func (*ForgetTool) Run ¶ added in v0.416.3
func (t *ForgetTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type GlobParams ¶
type GlobResponseMetadata ¶
type GrepParams ¶
type GrepParams struct {
Pattern string `json:"pattern"`
Path string `json:"path"`
Include string `json:"include"`
LiteralText bool `json:"literal_text"`
// Extended parameters
OutputMode string `json:"output_mode"` // "content" | "files_with_matches" | "count" (default: "files_with_matches")
Context int `json:"context"` // lines of context before AND after (-C)
Before int `json:"before"` // lines before match (-B), overrides Context
After int `json:"after"` // lines after match (-A), overrides Context
Type string `json:"type"` // file type filter: "go", "js", "py", "ts", "rust", etc.
Multiline bool `json:"multiline"` // enable multiline matching
HeadLimit int `json:"head_limit"` // cap total results (0 = use default 100)
Offset int `json:"offset"` // skip first N results for pagination
}
type GrepResponseMetadata ¶
type HybridSearchRemembrancesTool ¶ added in v0.210.0
type HybridSearchRemembrancesTool struct {
// contains filtered or unexported fields
}
func (*HybridSearchRemembrancesTool) Info ¶ added in v0.210.0
func (t *HybridSearchRemembrancesTool) Info() ToolInfo
func (*HybridSearchRemembrancesTool) Run ¶ added in v0.210.0
func (t *HybridSearchRemembrancesTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type ImageCropParams ¶ added in v0.629.4
type ImageCropTool ¶ added in v0.629.4
type ImageCropTool struct{}
func NewImageCropTool ¶ added in v0.629.4
func NewImageCropTool() *ImageCropTool
func (*ImageCropTool) Info ¶ added in v0.629.4
func (t *ImageCropTool) Info() ToolInfo
func (*ImageCropTool) Run ¶ added in v0.629.4
func (t *ImageCropTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
type KBAddDocumentTool ¶ added in v0.7.0
type KBAddDocumentTool struct {
// contains filtered or unexported fields
}
KBAddDocumentTool adds a document to the knowledge base.
func (*KBAddDocumentTool) Info ¶ added in v0.7.0
func (t *KBAddDocumentTool) Info() ToolInfo
func (*KBAddDocumentTool) Run ¶ added in v0.7.0
func (t *KBAddDocumentTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type KBDeleteDocumentTool ¶ added in v0.7.0
type KBDeleteDocumentTool struct {
// contains filtered or unexported fields
}
KBDeleteDocumentTool removes a document from the knowledge base.
func (*KBDeleteDocumentTool) Info ¶ added in v0.7.0
func (t *KBDeleteDocumentTool) Info() ToolInfo
func (*KBDeleteDocumentTool) Run ¶ added in v0.7.0
func (t *KBDeleteDocumentTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type KBGetDocumentTool ¶ added in v0.7.0
type KBGetDocumentTool struct {
// contains filtered or unexported fields
}
KBGetDocumentTool retrieves a document from the knowledge base by path.
func (*KBGetDocumentTool) Info ¶ added in v0.7.0
func (t *KBGetDocumentTool) Info() ToolInfo
func (*KBGetDocumentTool) Run ¶ added in v0.7.0
func (t *KBGetDocumentTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type KBMarkOutdatedTool ¶ added in v0.622.0
type KBMarkOutdatedTool struct {
// contains filtered or unexported fields
}
KBMarkOutdatedTool flags a knowledge-base document as superseded/outdated.
func (*KBMarkOutdatedTool) Info ¶ added in v0.622.0
func (t *KBMarkOutdatedTool) Info() ToolInfo
func (*KBMarkOutdatedTool) Run ¶ added in v0.622.0
func (t *KBMarkOutdatedTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type KBRelatedDocumentsTool ¶ added in v0.608.1
type KBRelatedDocumentsTool struct {
// contains filtered or unexported fields
}
KBRelatedDocumentsTool navigates the wiki link graph of the knowledge base.
func (*KBRelatedDocumentsTool) Info ¶ added in v0.608.1
func (t *KBRelatedDocumentsTool) Info() ToolInfo
func (*KBRelatedDocumentsTool) Run ¶ added in v0.608.1
func (t *KBRelatedDocumentsTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type KBSearchDocumentsTool ¶ added in v0.7.0
type KBSearchDocumentsTool struct {
// contains filtered or unexported fields
}
KBSearchDocumentsTool searches documents in the knowledge base.
func (*KBSearchDocumentsTool) Info ¶ added in v0.7.0
func (t *KBSearchDocumentsTool) Info() ToolInfo
func (*KBSearchDocumentsTool) Run ¶ added in v0.7.0
func (t *KBSearchDocumentsTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type LSPCatalogEntry ¶ added in v0.629.4
type LSPCatalogEntry struct {
Name string
Description string
Command string
Languages []string
Filenames []string
// Configured reports an explicit [LSP.<name>] entry; OptIn a preset that
// stays inactive until the user declares it.
Configured bool
OptIn bool
Disabled bool
Installing bool
// Availability is "installed", "installable" or "manual", with
// AvailabilityLabel its short human-readable form.
Availability string
AvailabilityLabel string
Reason string
Hint string
// RunState is "stopped", "starting", "ready" or "error".
RunState string
}
LSPCatalogEntry describes one language server of the registry: how it is configured, whether its binary can be obtained, and what it is doing now.
type LSPProvider ¶ added in v0.503.5
type LSPProvider interface {
// EnsureForFile lazily starts the language server(s) that handle the file's
// type, if not already running and the binary is installed. It is a no-op
// when on-demand activation is disabled. Equivalent to EnsureForFileTrigger
// with config.LSPTriggerEdit.
EnsureForFile(ctx context.Context, path string)
// EnsureForFileTrigger is EnsureForFile with the reason for the activation.
// The configuration decides which triggers may start a server, so a tool
// that only reads a file must not claim it edited one.
EnsureForFileTrigger(ctx context.Context, path string, trigger config.LSPTrigger)
// WaitForFile blocks briefly while lazy startup settles so callers can use a
// freshly spawned LSP client within the same request.
WaitForFile(ctx context.Context, path string) map[string]*lsp.Client
// ClientsForFile returns a snapshot of running clients that handle the file.
ClientsForFile(path string) map[string]*lsp.Client
// Clients returns a snapshot of all running clients.
Clients() map[string]*lsp.Client
// language server could be obtained for the file: a missing binary and its
// install command, an install still in flight, or activation being off. It
// returns an empty string when a server is available.
UnavailableReason(path string) string
}
LSPProvider supplies LSP clients to the file tools and lazily activates the language server that handles a given file. It decouples the tools from the concrete app: *app.App implements it, returning thread-safe snapshots so the tools can iterate clients while servers are started or stopped concurrently.
func NewStaticLSPProvider ¶ added in v0.503.5
func NewStaticLSPProvider(clients map[string]*lsp.Client) LSPProvider
NewStaticLSPProvider wraps a fixed map of LSP clients as an LSPProvider.
type LSResponseMetadata ¶
type LineScanner ¶
type LineScanner struct {
// contains filtered or unexported fields
}
func NewLineScanner ¶
func NewLineScanner(r io.Reader) *LineScanner
func (*LineScanner) Err ¶
func (s *LineScanner) Err() error
func (*LineScanner) Scan ¶
func (s *LineScanner) Scan() bool
func (*LineScanner) Text ¶
func (s *LineScanner) Text() string
type MesnadaAwaitTool ¶ added in v0.601.2
type MesnadaAwaitTool struct {
// contains filtered or unexported fields
}
MesnadaAwaitTool registers a NON-BLOCKING wait intent for one or more delegated tasks and instructs the model to end its turn. It never blocks: the delegation supervisor resurrects the parent session when the join condition is satisfied (or the safety deadline passes). This is the preferred way to wait for background delegated work; the blocking mesnada_wait_task tool is reserved for short foreground waits.
func (*MesnadaAwaitTool) Info ¶ added in v0.601.2
func (t *MesnadaAwaitTool) Info() ToolInfo
func (*MesnadaAwaitTool) Run ¶ added in v0.601.2
func (t *MesnadaAwaitTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type MesnadaCancelTaskTool ¶
type MesnadaCancelTaskTool struct {
// contains filtered or unexported fields
}
MesnadaCancelTaskTool cancels a running or pending Mesnada task.
func (*MesnadaCancelTaskTool) Info ¶
func (t *MesnadaCancelTaskTool) Info() ToolInfo
func (*MesnadaCancelTaskTool) Run ¶
func (t *MesnadaCancelTaskTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type MesnadaGetOutputTool ¶
type MesnadaGetOutputTool struct {
// contains filtered or unexported fields
}
MesnadaGetOutputTool returns task output for a Mesnada task.
func (*MesnadaGetOutputTool) Info ¶
func (t *MesnadaGetOutputTool) Info() ToolInfo
func (*MesnadaGetOutputTool) Run ¶
func (t *MesnadaGetOutputTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type MesnadaGetTaskTool ¶
type MesnadaGetTaskTool struct {
// contains filtered or unexported fields
}
MesnadaGetTaskTool returns full task information for a Mesnada task.
func (*MesnadaGetTaskTool) Info ¶
func (t *MesnadaGetTaskTool) Info() ToolInfo
func (*MesnadaGetTaskTool) Run ¶
func (t *MesnadaGetTaskTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type MesnadaListTasksTool ¶
type MesnadaListTasksTool struct {
// contains filtered or unexported fields
}
MesnadaListTasksTool lists Mesnada tasks using optional filters.
func (*MesnadaListTasksTool) Info ¶
func (t *MesnadaListTasksTool) Info() ToolInfo
func (*MesnadaListTasksTool) Run ¶
func (t *MesnadaListTasksTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type MesnadaNoteTool ¶ added in v0.629.4
type MesnadaNoteTool struct {
// contains filtered or unexported fields
}
MesnadaNoteTool posts and reads structured facts on a swarm's shared blackboard, letting sibling delegated agents coordinate (P1).
func (*MesnadaNoteTool) Info ¶ added in v0.629.4
func (t *MesnadaNoteTool) Info() ToolInfo
func (*MesnadaNoteTool) Run ¶ added in v0.629.4
func (t *MesnadaNoteTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type MesnadaSpawnTool ¶
type MesnadaSpawnTool struct {
// contains filtered or unexported fields
}
MesnadaSpawnTool creates and runs a Mesnada task directly through the orchestrator.
func (*MesnadaSpawnTool) Info ¶
func (t *MesnadaSpawnTool) Info() ToolInfo
func (*MesnadaSpawnTool) Run ¶
func (t *MesnadaSpawnTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type MesnadaSwarmTool ¶ added in v0.629.4
type MesnadaSwarmTool struct {
// contains filtered or unexported fields
}
MesnadaSwarmTool creates a fan-out → verify(gate) → synthesize workgraph (P3).
func (*MesnadaSwarmTool) Info ¶ added in v0.629.4
func (t *MesnadaSwarmTool) Info() ToolInfo
func (*MesnadaSwarmTool) Run ¶ added in v0.629.4
func (t *MesnadaSwarmTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type MesnadaWaitTaskTool ¶
type MesnadaWaitTaskTool struct {
// contains filtered or unexported fields
}
MesnadaWaitTaskTool waits for a Mesnada task to reach a terminal state.
func (*MesnadaWaitTaskTool) Info ¶
func (t *MesnadaWaitTaskTool) Info() ToolInfo
func (*MesnadaWaitTaskTool) Run ¶
func (t *MesnadaWaitTaskTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type PaginationInfo ¶ added in v0.30.0
type PaginationInfo struct {
TotalItems int `json:"total_items,omitempty"`
ReturnedItems int `json:"returned_items,omitempty"`
Offset int `json:"offset,omitempty"`
Limit int `json:"limit,omitempty"`
HasMore bool `json:"has_more,omitempty"`
CacheID string `json:"cache_id,omitempty"` // Set if response was auto-cached
}
PaginationInfo is a standardized pagination descriptor included in tool metadata.
type PaginationMetadata ¶ added in v0.30.0
type PaginationMetadata struct {
CacheID string `json:"cache_id"`
TotalLines int `json:"total_lines"`
TotalBytes int `json:"total_bytes"`
Offset int `json:"offset"`
Limit int `json:"limit"`
HasMore bool `json:"has_more"`
ReturnedLines int `json:"returned_lines"`
ToolName string `json:"tool_name"`
}
PaginationMetadata describes a paginated result from the cache.
type PatchParams ¶
type PatchParams struct {
PatchText string `json:"patch_text"`
}
type PatchResponseMetadata ¶
type ReadDedupResult ¶ added in v0.608.1
type ReadDedupResult struct {
// Status is new / unchanged / changed.
Status ReadDedupStatus
// Label is the stable F-reference label for this window (e.g. "F1").
Label string
// PrevContent holds the previously-delivered window content; populated only
// when Status is ReadDedupChanged so the caller can render a diff.
PrevContent string
}
ReadDedupResult is returned by RecordRead.
type ReadDedupStatus ¶ added in v0.608.1
type ReadDedupStatus string
ReadDedupStatus classifies a `view` re-read against what was already delivered for the same (path, window) this session.
const ( // ReadDedupNew means this window has not been delivered before. ReadDedupNew ReadDedupStatus = "new" // ReadDedupUnchanged means an identical window was already delivered. ReadDedupUnchanged ReadDedupStatus = "unchanged" // ReadDedupChanged means the same window was delivered before but its content changed. ReadDedupChanged ReadDedupStatus = "changed" // ReadDedupUpgraded means the content is unchanged but the caller now wants a // higher fidelity than was previously delivered (e.g. a full read after an // earlier signatures read); the read must proceed for real rather than collapse. ReadDedupUpgraded ReadDedupStatus = "upgraded" )
type RecallTool ¶ added in v0.416.3
type RecallTool struct {
// contains filtered or unexported fields
}
RecallTool searches persistent memories and increments hit counters for returned items.
func (*RecallTool) Info ¶ added in v0.416.3
func (t *RecallTool) Info() ToolInfo
func (*RecallTool) Run ¶ added in v0.416.3
func (t *RecallTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type RememberTool ¶ added in v0.416.3
type RememberTool struct {
// contains filtered or unexported fields
}
RememberTool stores or updates a persistent memory document.
func (*RememberTool) Info ¶ added in v0.416.3
func (t *RememberTool) Info() ToolInfo
func (*RememberTool) Run ¶ added in v0.416.3
func (t *RememberTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type SaveEventTool ¶ added in v0.7.0
type SaveEventTool struct {
// contains filtered or unexported fields
}
SaveEventTool stores a temporal event with semantic search.
func (*SaveEventTool) Info ¶ added in v0.7.0
func (t *SaveEventTool) Info() ToolInfo
func (*SaveEventTool) Run ¶ added in v0.7.0
func (t *SaveEventTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type SavingsStatsResponse ¶ added in v0.608.1
SavingsStatsResponse is the structured metadata attached to the response.
type SearchEventsTool ¶ added in v0.7.0
type SearchEventsTool struct {
// contains filtered or unexported fields
}
SearchEventsTool searches events with hybrid text and time filters.
func (*SearchEventsTool) Info ¶ added in v0.7.0
func (t *SearchEventsTool) Info() ToolInfo
func (*SearchEventsTool) Run ¶ added in v0.7.0
func (t *SearchEventsTool) Run(ctx context.Context, params ToolCall) (ToolResponse, error)
type SessionCache ¶ added in v0.30.0
type SessionCache struct {
// contains filtered or unexported fields
}
SessionCache is a thread-safe, LRU in-memory cache scoped to a single session.
func EnsureSessionCache ¶ added in v0.646.4
func EnsureSessionCache(sessionID string) *SessionCache
EnsureSessionCache registers a cache for a session only if one does not already exist, and returns the existing cache otherwise. Unlike RegisterSessionCache it never wipes an in-use cache, so it is safe to call on every session lookup (e.g. on session load/resume).
func GetSessionCache ¶ added in v0.30.0
func GetSessionCache(ctx context.Context) *SessionCache
GetSessionCache retrieves the session cache from context.
func GetSessionCacheByID ¶ added in v0.30.0
func GetSessionCacheByID(sessionID string) (*SessionCache, bool)
GetSessionCacheByID retrieves a session cache by session ID.
func NewSessionCache ¶ added in v0.30.0
func NewSessionCache(sessionID string) *SessionCache
NewSessionCache creates a new session-scoped cache.
func RegisterSessionCache ¶ added in v0.30.0
func RegisterSessionCache(sessionID string) *SessionCache
RegisterSessionCache creates and registers a new cache for a session.
func (*SessionCache) BounceTracker ¶ added in v0.608.1
func (c *SessionCache) BounceTracker() *readmode.BounceTracker
BounceTracker returns the session's Phase 3 auto-mode bounce tracker.
func (*SessionCache) Clear ¶ added in v0.30.0
func (c *SessionCache) Clear()
Clear removes all entries from the cache.
func (*SessionCache) Delete ¶ added in v0.30.0
func (c *SessionCache) Delete(cacheID string)
Delete removes a single entry from the cache.
func (*SessionCache) Get ¶ added in v0.30.0
func (c *SessionCache) Get(cacheID string) (*CacheEntry, bool)
Get retrieves a cache entry by ID.
func (*SessionCache) GetPage ¶ added in v0.30.0
func (c *SessionCache) GetPage(cacheID string, offset, limit int) (string, PaginationMetadata, error)
GetPage returns a paginated slice of lines from a cached entry.
func (*SessionCache) RecordRead ¶ added in v0.608.1
func (c *SessionCache) RecordRead(path string, startLine, endLine int, content, deliveredMode string) ReadDedupResult
RecordRead classifies and records a `view` read of a (path, window) at a given delivered fidelity (deliveredMode: "full", "signatures" or "map"). It returns whether the window is new, unchanged, changed, or upgraded since the last delivery, plus the stable F-reference label for the window:
- new: never delivered before — a fresh label is assigned.
- unchanged: identical content AND the prior fidelity already covers what is now wanted — the caller may collapse to a stub (DedupHits incremented).
- upgraded: identical content but the caller now wants higher fidelity than was delivered (e.g. full after signatures) — the read must proceed; the recorded fidelity is bumped and no stub is emitted.
- changed: same window but the content differs — previous content is returned for diffing and the record is updated.
func (*SessionCache) SearchInCache ¶ added in v0.30.0
func (c *SessionCache) SearchInCache(cacheID, pattern string, contextLines, limit int) (string, PaginationMetadata, error)
SearchInCache searches for a pattern within cached content and returns matching lines with context.
func (*SessionCache) Stats ¶ added in v0.30.0
func (c *SessionCache) Stats() CacheStats
Stats returns current cache statistics.
func (*SessionCache) Store ¶ added in v0.30.0
func (c *SessionCache) Store(toolCallID, toolName, content string) string
Store saves content in the cache and returns a unique cacheID.
type SetupBridge ¶ added in v0.629.4
type SetupBridge interface {
// SessionInfo returns the usage snapshot for a session.
SessionInfo(ctx context.Context, sessionID string) (SetupSessionInfo, error)
// SessionModes lists the session modes and their current state.
SessionModes(sessionID string) []SetupMode
// Commands lists the slash commands, runnable or not.
Commands() []SetupRunnableCommand
// RunCommand activates a slash command for the session and returns the text
// the agent should read (a confirmation, or the command's own instructions).
RunCommand(ctx context.Context, sessionID, name, args string) (string, error)
// CurrentModel reports the model the session runs on.
CurrentModel(sessionID string) (SetupModelState, error)
// SetSessionModel switches the model for this session only. An empty modelID
// clears the override. When the target costs more than the current model — or
// either price is unknown — the switch is only applied if confirmed is true;
// otherwise it returns a quote with Applied false and changes nothing.
SetSessionModel(sessionID, modelID string, confirmed bool) (SetupModelSwitch, error)
// Projects lists the projects registered in this Pando instance's project
// registry — the ids/paths/names mesnada_spawn_agent's "project" argument
// accepts to delegate work into another project. Returns an error when the
// project registry is unavailable in this runtime.
Projects(ctx context.Context) ([]SetupProjectRef, error)
}
SetupBridge exposes the session-scoped state that pando_setup needs. It is implemented outside this package (the agent owns session modes and the session store, and both already import this package), so the tool stays dependency-free and testable with a fake.
type SetupLSPCatalog ¶ added in v0.629.4
type SetupLSPCatalog interface {
LSPCatalog() []LSPCatalogEntry
}
SetupLSPCatalog is the optional half of LSPProvider that describes the whole language-server catalogue. *app.App implements it; the static provider used by tests does not, and callers must degrade gracefully when the assertion fails.
type SetupMode ¶ added in v0.629.4
SetupMode reports the state of one session mode (caveman, ponytail, ...).
type SetupModelState ¶ added in v0.643.1
type SetupModelState struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
Provider string `json:"provider,omitempty"`
Account string `json:"account,omitempty"`
ContextWindow int64 `json:"contextWindow,omitempty"`
CostIn float64 `json:"costIn"`
CostOut float64 `json:"costOut"`
// CostKnown is false when the catalogue has no price for the model (local
// models, mock providers, entries models.dev could not enrich). It is not the
// same as a price of zero and must not be reported as "free".
CostKnown bool `json:"costKnown"`
// Overridden reports that the model comes from a session-scoped override
// rather than from the agent's configured default.
Overridden bool `json:"overridden"`
}
SetupModelState describes the model a session runs on, together with the price metadata used to decide whether a switch needs the user's confirmation.
type SetupModelSwitch ¶ added in v0.643.1
type SetupModelSwitch struct {
// Applied is false when the switch was only quoted and still needs the user's
// confirmation; in that case nothing changed.
Applied bool `json:"applied"`
Previous SetupModelState `json:"previous"`
Target SetupModelState `json:"target"`
// ConfirmationReason is set only when Applied is false: why the user has to
// approve (the target costs more, or a price is missing on either side).
ConfirmationReason string `json:"confirmationReason,omitempty"`
// Cleared reports that the session override was removed and the agent's
// configured default is back in use.
Cleared bool `json:"cleared,omitempty"`
}
SetupModelSwitch is the outcome of a model-switch request.
type SetupProjectRef ¶ added in v0.647.5
type SetupProjectRef struct {
ID string `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
Status string `json:"status"`
}
SetupProjectRef describes one project registered in this Pando instance's project registry — the same registry mesnada_spawn_agent's "project" argument resolves against (by id, path, or display name).
type SetupRunnableCommand ¶ added in v0.629.4
type SetupRunnableCommand struct {
Name string `json:"name"`
Summary string `json:"summary"`
Args string `json:"args,omitempty"`
// Reason is set only when the command is listed but not runnable by the
// agent; it explains why the user has to trigger it.
Reason string `json:"reason,omitempty"`
}
SetupRunnableCommand describes a slash command the agent may activate itself.
func (SetupRunnableCommand) Runnable ¶ added in v0.629.4
func (c SetupRunnableCommand) Runnable() bool
Runnable reports whether the agent may activate this command itself.
type SetupSessionInfo ¶ added in v0.629.4
type SetupSessionInfo struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
Model string `json:"model,omitempty"`
MessageCount int64 `json:"messageCount"`
PromptTokens int64 `json:"promptTokens"`
CompletionTokens int64 `json:"completionTokens"`
CacheReadTokens int64 `json:"cacheReadTokens"`
CacheCreationTokens int64 `json:"cacheCreationTokens"`
ReasoningTokens int64 `json:"reasoningTokens"`
ContextWindow int64 `json:"contextWindow,omitempty"`
Cost float64 `json:"cost"`
}
SetupSessionInfo is the usage snapshot of the current session. The token counters describe the most recent turn — the session record overwrites them on every request — while Cost accumulates over the whole session.
type SourcegraphParams ¶
type TodoItem ¶ added in v0.257.0
type TodoItem struct {
Content string `json:"content"`
Status string `json:"status"` // pending | in_progress | completed
Priority string `json:"priority"` // high | medium | low
}
TodoItem represents a single entry in the todo list.
func GetSessionTodos ¶ added in v0.257.0
GetSessionTodos returns the current todo list for a session, or nil if none.
type TodoWriteParams ¶ added in v0.257.0
type TodoWriteParams struct {
Todos []TodoItem `json:"todos"`
}
TodoWriteParams holds the input for the TodoWrite tool.
type ToolCall ¶
type ToolCall struct {
ID string `json:"id"`
Name string `json:"name"`
Input string `json:"input"`
}
func MustNormalizeToolCallInput ¶ added in v0.310.0
MustNormalizeToolCallInput returns a copy of the call with normalized JSON input.
type ToolExecutor ¶ added in v0.646.4
type ToolExecutor interface {
ExecuteTool(ctx context.Context, name string, params map[string]interface{}) (ToolResponse, error)
}
ToolExecutor executes any registered tool by canonical name or alias. It is satisfied by *tooldiscovery.Registry and lets tool_search act as the single unified discovery + execution entry point for internal and MCP tools alike.
type ToolResponse ¶
type ToolResponse struct {
Type toolResponseType `json:"type"`
Content string `json:"content"`
Metadata string `json:"metadata,omitempty"`
IsError bool `json:"is_error"`
}
func InterceptToolResponse ¶ added in v0.30.0
func InterceptToolResponse( cache *SessionCache, toolCallID string, toolName string, response ToolResponse, ) ToolResponse
InterceptToolResponse checks if a tool response exceeds caching thresholds. If so, it stores the full content in the session cache and returns a compact reference containing the first CachePreviewLines lines and a cache_id. If below thresholds or cache is unavailable, the response is returned unchanged.
func NewStructuredResponse ¶ added in v0.320.0
func NewStructuredResponse(value any) ToolResponse
NewStructuredResponse formats structured data for tool consumers. It prefers TOON output for readability and token efficiency, falls back to TOML when TOON encoding fails, and finally falls back to pretty JSON when the value cannot be rendered in either structured text format.
func NewTextErrorResponse ¶
func NewTextErrorResponse(content string) ToolResponse
func NewTextResponse ¶
func NewTextResponse(content string) ToolResponse
func WithResponseMetadata ¶
func WithResponseMetadata(response ToolResponse, metadata any) ToolResponse
type ToolSearchEntry ¶ added in v0.416.3
type ToolSearchEntry struct {
CanonicalName string `json:"name"`
Aliases []string `json:"aliases,omitempty"`
ServerName string `json:"server,omitempty"`
Source string `json:"source,omitempty"`
Description string `json:"description"`
}
ToolSearchEntry is the shape returned by a ToolSearchProvider.
type ToolSearchProvider ¶ added in v0.416.3
type ToolSearchProvider interface {
// Search returns up to limit results ranked by relevance to query.
// Each result must be JSON-marshallable.
SearchTools(query string, limit int) []ToolSearchEntry
// MarkDiscovered marks a canonical tool name as visible for this session.
MarkDiscovered(name string)
}
ToolSearchProvider is the interface the tool_search tool uses to query the active tool registry. It is satisfied by *tooldiscovery.Registry — we use an interface here to avoid an import cycle.
type ViewParams ¶
type ViewParams struct {
FilePath string `json:"file_path"`
Offset int `json:"offset"`
Limit int `json:"limit"`
EndLine int `json:"end_line"`
// Mode selects the read fidelity (lean-ctx Phase 1). One of "full" (default —
// raw line-numbered window), "signatures" (every symbol's signature),
// "map" (imports + top-level signatures) or "auto" (picked by file size/type).
// Absent or "full" reproduces the legacy output exactly. Compressed modes
// preserve line numbers so you can follow up with offset/limit to read bodies.
Mode string `json:"mode,omitempty"`
}
type ViewResponseMetadata ¶
type WriteParams ¶
type WritePermissionsParams ¶
type WriteResponseMetadata ¶
Source Files
¶
- aliases.go
- ask_user_question.go
- bash.go
- bash_outputfilter.go
- browser_content.go
- browser_detect.go
- browser_devtools.go
- browser_evaluate.go
- browser_interact.go
- browser_navigate.go
- browser_screenshot.go
- browser_session.go
- builtin_names.go
- cache.go
- cache_interceptor.go
- cache_read.go
- cache_registry.go
- cache_stats.go
- context7.go
- design.go
- design_critique.go
- design_render.go
- design_skills.go
- desktop_apps.go
- desktop_click.go
- desktop_click_at.go
- desktop_common.go
- desktop_find.go
- desktop_focus.go
- desktop_key.go
- desktop_observe.go
- desktop_read.go
- desktop_screenshot.go
- desktop_scroll.go
- desktop_type.go
- desktop_wait.go
- diagnostics.go
- edit.go
- edit_strategies.go
- fetch.go
- fetch_browser.go
- file.go
- filelock.go
- glob.go
- graph_tools.go
- grep.go
- image_crop.go
- json_input.go
- json_output.go
- ls.go
- lsp_provider.go
- lua_tools.go
- mesnada.go
- mesnada_await.go
- pando_setup.go
- patch.go
- regexcache.go
- remembrances_code.go
- remembrances_events.go
- remembrances_hybrid.go
- remembrances_kb.go
- remembrances_kb_links.go
- remembrances_memory.go
- savings_stats.go
- search_brave.go
- search_exa.go
- search_google.go
- search_perplexity.go
- sourcegraph.go
- todo_write.go
- tool_search.go
- tools.go
- view.go
- view_modes.go
- workspace_fs.go
- write.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package outputfilter implements an RTK-style declarative output-compression engine.
|
Package outputfilter implements an RTK-style declarative output-compression engine. |
|
Package readmode implements the smart file-read fidelity tiers used by the `view` tool (lean-ctx context-intelligence Phase 1) plus the helpers for the content-hash unchanged-re-read deduplication (Phase 2).
|
Package readmode implements the smart file-read fidelity tiers used by the `view` tool (lean-ctx context-intelligence Phase 1) plus the helpers for the content-hash unchanged-re-read deduplication (Phase 2). |