mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
feat(agent): migrate tool prompts to capability slots
This commit is contained in:
@@ -14,6 +14,24 @@ type Tool interface {
|
||||
Execute(ctx context.Context, args map[string]any) *ToolResult
|
||||
}
|
||||
|
||||
const (
|
||||
ToolPromptLayerCapability = "capability"
|
||||
ToolPromptSlotTooling = "tooling"
|
||||
ToolPromptSlotMCP = "mcp"
|
||||
ToolPromptSourceRegistry = "tool_registry:native"
|
||||
ToolPromptSourceDiscovery = "tool_registry:discovery"
|
||||
)
|
||||
|
||||
type PromptMetadata struct {
|
||||
Layer string
|
||||
Slot string
|
||||
Source string
|
||||
}
|
||||
|
||||
type PromptMetadataProvider interface {
|
||||
PromptMetadata() PromptMetadata
|
||||
}
|
||||
|
||||
// --- Request-scoped tool context (channel / chatID) ---
|
||||
//
|
||||
// Carried via context.Value so that concurrent tool calls each receive
|
||||
|
||||
Reference in New Issue
Block a user