Documentation
¶
Overview ¶
Package contract exposes Cortex through the Forge dashboard dispatcher.
Index ¶
- Constants
- func NexusCatalogs(gw *nexus.Gateway, access CatalogAccess) map[string]CatalogQuery
- func Register(d *dispatcher.Dispatcher, reg dc.Registry, wreg dc.WardenRegistry, deps Deps) error
- func ShieldCatalogs(eng *shieldengine.Engine, access CatalogAccess) map[string]CatalogQuery
- func WeaveCatalogs(eng *weaveengine.Engine, access CatalogAccess) map[string]CatalogQuery
- type AgentPatch
- type AuditEvent
- type BehaviorPatch
- type CatalogAccess
- type CatalogInput
- type CatalogQuery
- type CatalogScope
- type CloneInput
- type CreateInput
- type DecisionInput
- type Deps
- type ExecuteInput
- type IDInput
- type ListInput
- type ListOutput
- type MemoryInput
- type MemoryOutput
- type OrchestrationPatch
- type OverlayListInput
- type OverlaySaveInput
- type Overrides
- type PersonaPatch
- type Reference
- type ReferenceInput
- type ReplayInput
- type ResultContentInput
- type ResumeInput
- type RunDetail
- type RunListInput
- type SendInput
- type SessionCreate
- type SessionListInput
- type SessionUpdate
- type SkillPatch
- type StreamInput
- type StreamOutput
- type SuspensionView
- type TraitPatch
- type UpdateInput
Constants ¶
const ContributorName = "cortex"
Variables ¶
This section is empty.
Functions ¶
func NexusCatalogs ¶
func NexusCatalogs(gw *nexus.Gateway, access CatalogAccess) map[string]CatalogQuery
NexusCatalogs retains provider failures instead of silently omitting models. Catalog metadata is distinct from the ability to make a remote completion.
func Register ¶
func Register(d *dispatcher.Dispatcher, reg dc.Registry, wreg dc.WardenRegistry, deps Deps) error
func ShieldCatalogs ¶
func ShieldCatalogs(eng *shieldengine.Engine, access CatalogAccess) map[string]CatalogQuery
ShieldCatalogs uses exact app/tenant filters and scans the complete scoped result before optional run filtering. Every storage error reaches the caller.
func WeaveCatalogs ¶
func WeaveCatalogs(eng *weaveengine.Engine, access CatalogAccess) map[string]CatalogQuery
WeaveCatalogs runs every engine call under the scope's tenant and checks the row's app and tenant again before reading its statistics. Listing walks all pages and exposes only exact matches.
Types ¶
type AgentPatch ¶
type AgentPatch struct {
Description *string `json:"description,omitempty"`
SystemPrompt *string `json:"system_prompt,omitempty"`
Model *string `json:"model,omitempty"`
Tools *[]string `json:"tools,omitempty"`
MaxSteps *int `json:"max_steps,omitempty"`
MaxTokens *int `json:"max_tokens,omitempty"`
Temperature *float64 `json:"temperature,omitempty"`
ReasoningLoop *string `json:"reasoning_loop,omitempty"`
Guardrails *map[string]any `json:"guardrails,omitempty"`
Metadata *map[string]any `json:"metadata,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
PersonaRef *string `json:"persona_ref,omitempty"`
InlineSkills *[]string `json:"inline_skills,omitempty"`
InlineTraits *[]string `json:"inline_traits,omitempty"`
InlineBehaviors *[]string `json:"inline_behaviors,omitempty"`
Sections *[]prompt.Section `json:"sections,omitempty"`
}
type AuditEvent ¶
type BehaviorPatch ¶
type BehaviorPatch struct {
Description *string `json:"description,omitempty"`
Triggers *[]behavior.Trigger `json:"triggers,omitempty"`
Actions *[]behavior.Action `json:"actions,omitempty"`
Priority *int `json:"priority,omitempty"`
RequiresSkill *string `json:"requires_skill,omitempty"`
RequiresTrait *string `json:"requires_trait,omitempty"`
Metadata *map[string]any `json:"metadata,omitempty"`
}
type CatalogAccess ¶
type CatalogAccess func(context.Context, string) (CatalogScope, error)
type CatalogInput ¶
type CatalogQuery ¶
CatalogQuery must enforce its own external system's authorized scope. The context already carries the resolved Cortex scope and authenticated principal. Returning unavailable is distinct from an installed provider with zero rows.
type CatalogScope ¶
CatalogScope is resolved by the host from the Cortex principal and scope. External identifiers need not equal Cortex hierarchy values. Empty identifiers are refused, because those services interpret empty filters as every tenant.
type CloneInput ¶
type CreateInput ¶
type CreateInput[T any] struct { Data T `json:"data"` }
type DecisionInput ¶
type Deps ¶
type Deps struct {
Engine *engine.Engine
AdaptiveReview *engine.AdaptiveReviewer
Learning *learning.Guard
Planning *coordination.PlanningOperator
// ExecutionBudget supplies host-owned cumulative limits before preparation.
// The callback receives a detached effective agent. Client limits can only
// narrow its result; clients cannot supply their own deadline authority.
ExecutionBudget func(context.Context, *agent.Config) (execution.Budget, error)
// AgentMutationFence serializes dashboard agent writes with host policy reads.
// The host must hold current authority until its synchronous callback returns.
// Other agent writers must participate in the same host fence.
AgentMutationFence func(context.Context, func(context.Context) error) error
Optimization *optimization.Optimizer
DefaultScope cortex.Scope
ResolveScope func(context.Context, dc.Principal) (cortex.Scope, error)
Audit func(context.Context, AuditEvent) error
ExecutionLabel string
Catalogs map[string]CatalogQuery
}
Deps lets the host supply its scope mapping and durable audit recorder. DefaultScope is only for an explicitly single-scope dashboard deployment. A present but invalid claim never falls back to it.
type ExecuteInput ¶
type ListOutput ¶
type MemoryInput ¶
type MemoryOutput ¶
type OrchestrationPatch ¶
type OrchestrationPatch struct {
Description *string `json:"description,omitempty"`
Strategy *string `json:"strategy,omitempty"`
Participants *[]orchestration.Participant `json:"participants,omitempty"`
Settings *orchestration.Settings `json:"settings,omitempty"`
Metadata *map[string]any `json:"metadata,omitempty"`
}
type OverlayListInput ¶
type OverlaySaveInput ¶
type OverlaySaveInput struct {
ID string `json:"id"`
AgentID string `json:"agent_id"`
Patches []prompt.Patch `json:"patches"`
ToolsAdded []string `json:"tools_added"`
ToolsRemoved []string `json:"tools_removed"`
Model string `json:"model"`
Temperature *float64 `json:"temperature"`
MaxTokens *int `json:"max_tokens"`
}
type Overrides ¶
type Overrides struct {
Model string `json:"model"`
Temperature *float64 `json:"temperature"`
MaxSteps int `json:"max_steps"`
MaxTokens int `json:"max_tokens"`
SystemPrompt string `json:"system_prompt"`
PersonaRef string `json:"persona_ref"`
InlineSkills []string `json:"inline_skills"`
InlineTraits []string `json:"inline_traits"`
Tools []string `json:"tools"`
}
type PersonaPatch ¶
type PersonaPatch struct {
Description *string `json:"description,omitempty"`
Identity *string `json:"identity,omitempty"`
Skills *[]persona.SkillAssignment `json:"skills,omitempty"`
Traits *[]persona.TraitAssignment `json:"traits,omitempty"`
Behaviors *[]string `json:"behaviors,omitempty"`
CognitiveStyle *cognitive.Style `json:"cognitive_style,omitempty"`
CommunicationStyle *communication.Style `json:"communication_style,omitempty"`
Perception *perception.Model `json:"perception,omitempty"`
Metadata *map[string]any `json:"metadata,omitempty"`
}
type ReferenceInput ¶
type ReplayInput ¶
type ReplayInput struct {
ID string `json:"id"`
After string `json:"after"`
Limit int `json:"limit"`
}
ReplayInput uses durable run-bound cursors, independent of runs.events offsets.
type ResultContentInput ¶
ResultContentInput selects a committed result without carrying private evidence.
type ResumeInput ¶
type ResumeInput struct {
ID string `json:"id"`
ToolResults []engine.ToolResult `json:"tool_results"`
}
type RunListInput ¶
type SessionCreate ¶
type SessionListInput ¶
type SessionUpdate ¶
type SkillPatch ¶
type SkillPatch struct {
Description *string `json:"description,omitempty"`
Tools *[]skill.ToolBinding `json:"tools,omitempty"`
Knowledge *[]skill.KnowledgeRef `json:"knowledge,omitempty"`
SystemPromptFragment *string `json:"system_prompt_fragment,omitempty"`
Dependencies *[]string `json:"dependencies,omitempty"`
DefaultProficiency *skill.Proficiency `json:"default_proficiency,omitempty"`
Metadata *map[string]any `json:"metadata,omitempty"`
}
type StreamInput ¶
type StreamOutput ¶
type SuspensionView ¶
type SuspensionView struct {
Reason suspension.SuspendReason `json:"reason"`
Pending []suspension.PendingCall `json:"pending"`
}
type TraitPatch ¶
type TraitPatch struct {
Description *string `json:"description,omitempty"`
Dimensions *[]trait.Dimension `json:"dimensions,omitempty"`
Influences *[]trait.Influence `json:"influences,omitempty"`
Category *trait.Category `json:"category,omitempty"`
Metadata *map[string]any `json:"metadata,omitempty"`
}
type UpdateInput ¶
Source Files
¶
- adaptive.go
- advanced.go
- catalogs.go
- contract.go
- execution.go
- operations.go
- optimization.go
- optimization_activations.go
- optimization_capabilities.go
- optimization_commands.go
- optimization_lessons.go
- planning.go
- references.go
- replay.go
- resources.go
- result_content.go
- runtime.go
- stats.go
- stream.go
- tools.go
- validation.go
- verification_failure.go