mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
feat(agent): add structured prompt layering
This commit is contained in:
@@ -61,6 +61,13 @@ type ContentBlock struct {
|
||||
Type string `json:"type"` // "text"
|
||||
Text string `json:"text"`
|
||||
CacheControl *CacheControl `json:"cache_control,omitempty"`
|
||||
|
||||
// Prompt metadata is internal to the agent runtime. It records which
|
||||
// structured prompt segment produced this block without changing provider
|
||||
// JSON.
|
||||
PromptLayer string `json:"-"`
|
||||
PromptSlot string `json:"-"`
|
||||
PromptSource string `json:"-"`
|
||||
}
|
||||
|
||||
type Attachment struct {
|
||||
@@ -80,6 +87,12 @@ type Message struct {
|
||||
SystemParts []ContentBlock `json:"system_parts,omitempty"` // structured system blocks for cache-aware adapters
|
||||
ToolCalls []ToolCall `json:"tool_calls,omitempty"`
|
||||
ToolCallID string `json:"tool_call_id,omitempty"`
|
||||
|
||||
// Prompt metadata is internal to the agent runtime. It records where a
|
||||
// message or system part came from without changing provider/session JSON.
|
||||
PromptLayer string `json:"-"`
|
||||
PromptSlot string `json:"-"`
|
||||
PromptSource string `json:"-"`
|
||||
}
|
||||
|
||||
type ToolDefinition struct {
|
||||
|
||||
Reference in New Issue
Block a user