devops

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package devops implements the six agent roles of the DevOps reference workload as one Fenced-native runtime. Every role executes inside the fenced attempt context: tools are invoked through the brokered fenced.tool.invoke, models through fenced.model.invoke, and memory through fenced.memory.put/search.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvelopePrefix

func EnvelopePrefix() string

EnvelopePrefix exposes the goal envelope marker.

func RoleFromRef

func RoleFromRef(versionRef string) string

RoleFromRef maps an agent version ref to its role name.

func Run

func Run(ctx context.Context, deps Deps, versionRef, goal string) (json.RawMessage, error)

Run dispatches one task invocation to the role handler.

Types

type ChatMessage

type ChatMessage struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

ChatMessage mirrors the brokered message shape.

type Deps

type Deps struct {
	MCP         MCPClient
	Models      Models
	Workdir     func(string) string
	ExecutionID string
}

Deps is the per-invocation context.

type Envelope

type Envelope struct {
	Role       string `json:"role"`
	Goal       string `json:"goal"`
	WorkflowID string `json:"workflowId"`
}

Envelope is the structured task payload every role finds inside its goal.

func ParseEnvelope

func ParseEnvelope(goal, versionRef string) Envelope

ParseEnvelope decodes the structured payload from a goal.

type HTTPMCPClient

type HTTPMCPClient struct {
	// contains filtered or unexported fields
}

HTTPMCPClient posts JSON-RPC tool calls to the runtime's loopback MCP endpoint, carrying the attempt execution id in the fencing header exactly like the research reference runtime.

func NewHTTPMCPClient

func NewHTTPMCPClient(endpoint string) *HTTPMCPClient

NewHTTPMCPClient binds the client to the MCP endpoint URL.

func (*HTTPMCPClient) CallTool

func (c *HTTPMCPClient) CallTool(ctx context.Context, executionID, name string, callArgs any) (json.RawMessage, error)

CallTool implements MCPClient.

type MCPClient

type MCPClient interface {
	CallTool(ctx context.Context, executionID, name string, args any) (json.RawMessage, error)
}

MCPClient mirrors the research runtime's MCP interface.

type Models

type Models struct {
	Fast      string
	Reasoning string
}

Models binds the logical model tiers.

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

Runtime implements agent.Runtime behind the broker.

func NewRuntime

func NewRuntime(mcpEndpoint string, models Models) *Runtime

NewRuntime builds the multi-role DevOps runtime.

func (*Runtime) Checkpoint

func (r *Runtime) Checkpoint(_ context.Context, executionID string) (agent.Checkpoint, error)

Checkpoint implements agent.Runtime with versioned logical state.

func (*Runtime) Restore

func (r *Runtime) Restore(_ context.Context, request agent.RestoreRequest) error

Restore implements agent.Runtime; restores are idempotent by contract.

func (*Runtime) Run

func (r *Runtime) Run(ctx context.Context, request agent.StartRequest, emit agent.Emitter) (json.RawMessage, error)

Run implements agent.Runtime.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL