Documentation
¶
Index ¶
- Constants
- func AdvisorRequest(advisorModel string, executor model.Request, assistant []domain.ContentBlock) (model.Request, error)
- func AdvisorToolSchema() model.ToolSchema
- func AppendMerging(base, added []domain.Message) []domain.Message
- func CoordinatorToolSchemas() []model.ToolSchema
- func EnabledSelfHostedToolSchemas(toolSet domain.ToolSet) []model.ToolSchema
- func EnabledToolSchemas(toolSet domain.ToolSet) []model.ToolSchema
- func FlattenResultText(content []any) string
- func HasThinkingBlocks(blocks []domain.ContentBlock) bool
- func IsCoordinatorTool(name string) bool
- func LoadedRuntimeSkills(messages []domain.Message) map[string]struct{}
- func ProjectAdvisorSystemContext(base string) string
- func ProjectCoordinatorSystemContext(base string) string
- func ReattachRuntimeSkillInjections(full []domain.Message, projected []domain.Message) []domain.Message
- func RuntimeSkillInjection(name string, body []byte) domain.ContentBlock
- func RuntimeSkillInjectionAt(root string, name string, body []byte) domain.ContentBlock
- func RuntimeSkillName(input map[string]any) (string, error)
- func RuntimeSkillReattachmentBudget(messages []domain.Message) int
- func RuntimeSkillToolSchema() model.ToolSchema
- func TextBlocksToContent(blocks []domain.ContentBlock) []any
- func ValidateToolCapabilities(toolSet domain.ToolSet) error
- type SendToAgentInput
Constants ¶
const ( ListAgentsToolName = "list_agents" SendToAgentToolName = "send_to_agent" AdvisorToolName = "advisor" )
const RuntimeSkillToolName = "Skill"
RuntimeSkillToolName is the model-visible dispatcher used to activate a discovered Skill. It is an agent-runtime primitive, not a configurable Mango runtime built-in and never appears in an Agent's public tools array.
Variables ¶
This section is empty.
Functions ¶
func AdvisorRequest ¶
func AdvisorRequest( advisorModel string, executor model.Request, assistant []domain.ContentBlock, ) (model.Request, error)
AdvisorRequest builds a provider-neutral, tool-free reviewer inference. The executor transcript is serialized as quoted JSON in one user text block so provider-native reasoning signatures and dangling tool calls are never replayed as protocol messages to a different model.
func AdvisorToolSchema ¶
func AdvisorToolSchema() model.ToolSchema
AdvisorToolSchema exposes Mango's private consultation capability as an ordinary client tool. The provider only needs normal tool calling support; Mango owns the independent advisor inference and its durable projection.
func AppendMerging ¶
AppendMerging appends messages while preserving strict role alternation.
func CoordinatorToolSchemas ¶
func CoordinatorToolSchemas() []model.ToolSchema
CoordinatorToolSchemas are the private model-facing tools automatically attached to a Mango coordinator. They are runtime capabilities, not entries in the persisted Agent toolset.
func EnabledSelfHostedToolSchemas ¶
func EnabledSelfHostedToolSchemas(toolSet domain.ToolSet) []model.ToolSchema
EnabledSelfHostedToolSchemas declares the contracts implemented by an external Environment worker while retaining provider-native Web tools.
func EnabledToolSchemas ¶
func EnabledToolSchemas(toolSet domain.ToolSet) []model.ToolSchema
EnabledToolSchemas returns enabled built-ins in canonical order, followed by application-owned custom tools.
func FlattenResultText ¶
func HasThinkingBlocks ¶
func HasThinkingBlocks(blocks []domain.ContentBlock) bool
func IsCoordinatorTool ¶
func LoadedRuntimeSkills ¶
LoadedRuntimeSkills returns the Skills whose injected instruction block is still present in model context. Session pins are immutable, so presence of a successful injection is enough to suppress an identical re-load.
func ProjectAdvisorSystemContext ¶
ProjectAdvisorSystemContext teaches the executor when the runtime-owned private tool is useful without making it part of the persisted Agent prompt.
func ProjectCoordinatorSystemContext ¶
ProjectCoordinatorSystemContext appends the private harness protocol that makes Mango's public cross-Thread events meaningful to the model. It is runtime-owned rather than persisted in the user-configurable Agent system prompt.
func ReattachRuntimeSkillInjections ¶
func ReattachRuntimeSkillInjections( full []domain.Message, projected []domain.Message, ) []domain.Message
ReattachRuntimeSkillInjections carries invoked Skills across request-time compaction. It starts with the most recent invocation when applying the combined budget, then restores selected blocks in their original order. Complete bodies remain recognizable as loaded. Truncated reattachments are useful context but deliberately allow a later Skill invocation to restore the complete body, matching Claude Code's documented content lifecycle.
func RuntimeSkillInjection ¶
func RuntimeSkillInjection(name string, body []byte) domain.ContentBlock
RuntimeSkillInjection is the CCB-compatible context block appended after the Skill tool result. The main SKILL.md body enters context here; later references remain on disk and are loaded progressively through ordinary sandbox tools.
func RuntimeSkillInjectionAt ¶
func RuntimeSkillInjectionAt(root string, name string, body []byte) domain.ContentBlock
RuntimeSkillInjectionAt records the actual immutable Agent-scope directory so Claude Code-style supporting-file reads stay inside the selected bundle.
func RuntimeSkillName ¶
RuntimeSkillName validates the dispatcher input before it reaches any filesystem operation. Membership in the Session's immutable pins is checked separately by the execution Activity.
func RuntimeSkillReattachmentBudget ¶
RuntimeSkillReattachmentBudget returns the CCB-compatible context reserve for the latest invocation of each loaded Skill: at most 5,000 estimated tokens per Skill and 25,000 across the Session.
func RuntimeSkillToolSchema ¶
func RuntimeSkillToolSchema() model.ToolSchema
RuntimeSkillToolSchema describes the private dispatcher offered only when a Session has effective Skills. Discovery metadata remains in the system context; the dispatcher accepts the selected frontmatter name and lets the runtime load the corresponding immutable Session pin.
func TextBlocksToContent ¶
func TextBlocksToContent(blocks []domain.ContentBlock) []any
func ValidateToolCapabilities ¶
ValidateToolCapabilities rejects permission semantics that a provider-native model tool cannot pause for Mango to approve.
Types ¶
type SendToAgentInput ¶
func ParseSendToAgentInput ¶
func ParseSendToAgentInput(input map[string]any) (SendToAgentInput, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package tools provides the built-in tool executors that an agent runtime runs inside a sandbox, plus the model-facing input schemas that describe them to the model.
|
Package tools provides the built-in tool executors that an agent runtime runs inside a sandbox, plus the model-facing input schemas that describe them to the model. |