Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyTaskRuntime(cfg *RuntimeConfig, runtime TaskRuntime)
- func ArchivedTasksDir(baseDir string) string
- func ArchivedWorkflowName(slug string, workflowID string, archivedAt time.Time) string
- func ArchivedWorkflowShortID(workflowID string) string
- func BuildRunID(cfg *RuntimeConfig) (string, error)
- func CompozyDir(workspaceRoot string) string
- func ConfigPathForWorkspace(workspaceRoot string) string
- func DispatchMutableHook[T any](ctx context.Context, manager RuntimeManager, hook string, payload T) (T, error)
- func DispatchObserverHook(ctx context.Context, manager RuntimeManager, hook string, payload any)
- func IsActiveWorkflowDirName(name string) bool
- func RegisterOpenRunScopeFactory(...)
- func RunsBaseDirForWorkspace(workspaceRoot string) string
- func TaskDirectory(name string) string
- func TaskDirectoryForWorkspace(workspaceRoot, name string) string
- func TasksBaseDir() string
- func TasksBaseDirForWorkspace(workspaceRoot string) string
- func ValidateJobControlMessage(message string) (string, error)
- func WaitForObserverHooks(ctx context.Context, manager RuntimeManager) error
- type ArchiveConfig
- type ArchiveResult
- type BaseRunScope
- func (s *BaseRunScope) Close(ctx context.Context) error
- func (s *BaseRunScope) RunArtifacts() RunArtifacts
- func (s *BaseRunScope) RunEventBus() *events.Bus[events.Event]
- func (s *BaseRunScope) RunJournal() *journal.Journal
- func (*BaseRunScope) RunManager() RuntimeManager
- func (s *BaseRunScope) SetRunJournal(runJournal *journal.Journal)
- type ContentBlock
- func (b ContentBlock) AsDiff() (DiffBlock, error)
- func (b ContentBlock) AsImage() (ImageBlock, error)
- func (b ContentBlock) AsTerminalOutput() (TerminalOutputBlock, error)
- func (b ContentBlock) AsText() (TextBlock, error)
- func (b ContentBlock) AsToolResult() (ToolResultBlock, error)
- func (b ContentBlock) AsToolUse() (ToolUseBlock, error)
- func (b ContentBlock) Decode() (any, error)
- func (b ContentBlock) MarshalJSON() ([]byte, error)
- func (b *ContentBlock) UnmarshalJSON(data []byte) error
- type ContentBlockType
- type DiffBlock
- type ExecutionMode
- type ExplicitRuntimeFlags
- type FetchConfig
- type FetchResult
- type FixOutcome
- type ImageBlock
- type IssueEntry
- type Job
- type JobArtifacts
- type JobControlRegistry
- func (r *JobControlRegistry) Pause(ctx context.Context, runID string, jobID string) (JobControlResponse, error)
- func (r *JobControlRegistry) Register(runID string, index int, jobID string, controller JobController) func()
- func (r *JobControlRegistry) SendMessage(ctx context.Context, runID string, jobID string, message string) (JobControlResponse, error)
- type JobControlRequest
- type JobControlResponse
- type JobControlStatus
- type JobController
- type JobResult
- type MCPServer
- type MCPServerStdio
- type MigrationConfig
- type MigrationResult
- type OpenRunScopeOptions
- type OutputFormat
- type ReviewContext
- type ReviewFileMeta
- type RoundMeta
- type RunArtifacts
- func NewRunArtifacts(workspaceRoot, runID string) RunArtifacts
- func NewRunArtifactsForRunsDir(runsDir, runID string) RunArtifacts
- func ResolveHomeRunArtifacts(runID string) (RunArtifacts, error)
- func ResolvePersistedRunArtifacts(workspaceRoot, runID string) (RunArtifacts, error)
- func ResolveRuntimeRunArtifacts(cfg *RuntimeConfig) (RunArtifacts, error)
- type RunScope
- type RunSummary
- type RuntimeConfig
- type RuntimeManager
- type SessionAvailableCommand
- type SessionPlanEntry
- type SessionStatus
- type SessionUpdate
- type SessionUpdateKind
- type SolvePreparation
- func (p *SolvePreparation) CloseJournal(ctx context.Context) error
- func (p *SolvePreparation) EventBus() *events.Bus[events.Event]
- func (p *SolvePreparation) Journal() *journal.Journal
- func (p *SolvePreparation) RuntimeManager() RuntimeManager
- func (p *SolvePreparation) SetJournal(j *journal.Journal)
- func (p *SolvePreparation) SetRunScope(scope RunScope)
- type SyncConfig
- type SyncResult
- type TaskEntry
- type TaskFileMeta
- type TaskMeta
- type TaskRuntime
- type TaskRuntimeRule
- type TaskRuntimeTarget
- type TaskRuntimeTask
- type TerminalOutputBlock
- type TextBlock
- type ToolCallState
- type ToolResultBlock
- type ToolUseBlock
- type Usage
Constants ¶
const ( UnknownFileName = "unknown" IDECodex = "codex" IDEClaude = "claude" IDEDroid = "droid" IDECursor = "cursor-agent" IDEOpenCode = "opencode" IDEPi = "pi" IDEGemini = "gemini" IDECopilot = "copilot" IDEKiro = "kiro" IDEDevin = "devin" DefaultCodexModel = "gpt-5.6-sol" DefaultClaudeModel = "opus" DefaultCursorModel = "composer-1" DefaultOpenCodeModel = "anthropic/claude-opus-4-6" DefaultPiModel = "anthropic/claude-opus-4-6" DefaultGeminiModel = "gemini-2.5-pro" DefaultCopilotModel = "claude-sonnet-4.6" DefaultKiroModel = "anthropic/claude-opus-4-6" DefaultDevinModel = "anthropic/claude-opus-4-6" DefaultActivityTimeout = 10 * time.Minute WorkflowRootDirName = ".compozy" WorkflowConfigFileName = "config.toml" WorkflowTasksDirName = "tasks" WorkflowRunsDirName = "runs" ArchivedWorkflowDirName = "_archived" ModeCodeReview = "pr-review" ModePRDTasks = "prd-tasks" ModeExec = "exec" AccessModeDefault = "default" AccessModeFull = "full" OutputFormatTextValue = "text" OutputFormatJSONValue = "json" OutputFormatRawJSONValue = "raw-json" )
const DefaultReasoningEffort = "medium"
const DefaultSoundOnCompleted = "glass"
DefaultSoundOnCompleted is the preset played on run.completed when sound is enabled and the user has not set an explicit preset or path.
const DefaultSoundOnFailed = "basso"
DefaultSoundOnFailed is the preset played on run.failed / run.cancelled when sound is enabled and the user has not set an explicit preset or path.
const MaxJobControlMessageBytes = 64 * 1024
Variables ¶
Functions ¶
func ApplyTaskRuntime ¶ added in v0.2.0
func ApplyTaskRuntime(cfg *RuntimeConfig, runtime TaskRuntime)
ApplyTaskRuntime copies task-scoped runtime fields onto cfg.
func ArchivedTasksDir ¶ added in v0.1.3
func ArchivedWorkflowName ¶ added in v0.2.0
func ArchivedWorkflowShortID ¶ added in v0.2.0
func BuildRunID ¶ added in v0.2.0
func BuildRunID(cfg *RuntimeConfig) (string, error)
BuildRunID returns the effective run identifier for one runtime config.
func CompozyDir ¶ added in v0.1.5
func ConfigPathForWorkspace ¶ added in v0.1.5
func DispatchMutableHook ¶ added in v0.1.11
func DispatchObserverHook ¶ added in v0.1.11
func DispatchObserverHook(ctx context.Context, manager RuntimeManager, hook string, payload any)
func IsActiveWorkflowDirName ¶ added in v0.1.3
func RegisterOpenRunScopeFactory ¶ added in v0.1.11
func RegisterOpenRunScopeFactory(fn func(context.Context, *RuntimeConfig, OpenRunScopeOptions) (RunScope, error))
RegisterOpenRunScopeFactory installs the current run-scope bootstrap hook.
func RunsBaseDirForWorkspace ¶ added in v0.1.9
func TaskDirectory ¶
func TaskDirectoryForWorkspace ¶ added in v0.1.5
func TasksBaseDir ¶
func TasksBaseDir() string
func TasksBaseDirForWorkspace ¶ added in v0.1.5
func ValidateJobControlMessage ¶ added in v0.2.10
func WaitForObserverHooks ¶ added in v0.2.0
func WaitForObserverHooks(ctx context.Context, manager RuntimeManager) error
Types ¶
type ArchiveConfig ¶ added in v0.1.10
type ArchiveResult ¶ added in v0.1.10
type ArchiveResult struct {
Target string `json:"target"`
ArchiveRoot string `json:"archive_root"`
WorkflowsScanned int `json:"workflows_scanned"`
Archived int `json:"archived"`
Skipped int `json:"skipped"`
Forced bool `json:"forced,omitempty"`
CompletedTasks int `json:"completed_tasks,omitempty"`
ResolvedReviewIssues int `json:"resolved_review_issues,omitempty"`
ArchivedAt *time.Time `json:"archived_at,omitempty"`
ArchivedPaths []string `json:"archived_paths,omitempty"`
SkippedPaths []string `json:"skipped_paths,omitempty"`
SkippedReasons map[string]string `json:"skipped_reasons,omitempty"`
}
type BaseRunScope ¶ added in v0.1.11
type BaseRunScope struct {
Artifacts RunArtifacts
Journal *journal.Journal
EventBus *events.Bus[events.Event]
}
BaseRunScope is the neutral run scope used by legacy and non-extension paths.
func OpenBaseRunScope ¶ added in v0.1.11
func OpenBaseRunScope(ctx context.Context, cfg *RuntimeConfig) (*BaseRunScope, error)
OpenBaseRunScope allocates the non-extension runtime resources for one run.
func (*BaseRunScope) Close ¶ added in v0.1.11
func (s *BaseRunScope) Close(ctx context.Context) error
Close tears down the base runtime resources in journal-then-bus order.
func (*BaseRunScope) RunArtifacts ¶ added in v0.1.11
func (s *BaseRunScope) RunArtifacts() RunArtifacts
Artifacts reports the run artifact paths owned by the scope.
func (*BaseRunScope) RunEventBus ¶ added in v0.1.11
func (s *BaseRunScope) RunEventBus() *events.Bus[events.Event]
EventBus reports the run-scoped event bus.
func (*BaseRunScope) RunJournal ¶ added in v0.1.11
func (s *BaseRunScope) RunJournal() *journal.Journal
Journal reports the run journal owned by the scope.
func (*BaseRunScope) RunManager ¶ added in v0.1.11
func (*BaseRunScope) RunManager() RuntimeManager
RuntimeManager reports the optional extension runtime manager. Base scopes do not carry one.
func (*BaseRunScope) SetRunJournal ¶ added in v0.2.11
func (s *BaseRunScope) SetRunJournal(runJournal *journal.Journal)
SetRunJournal replaces the journal owned by the scope.
type ContentBlock ¶ added in v0.1.3
type ContentBlock struct {
Type ContentBlockType `json:"type"`
Data json.RawMessage `json:"-"`
}
ContentBlock stores one typed content payload in its canonical JSON form.
func NewContentBlock ¶ added in v0.1.3
func NewContentBlock(block any) (ContentBlock, error)
NewContentBlock encodes a typed block into the generic ContentBlock envelope.
func (ContentBlock) AsDiff ¶ added in v0.1.3
func (b ContentBlock) AsDiff() (DiffBlock, error)
AsDiff decodes the block as a DiffBlock.
func (ContentBlock) AsImage ¶ added in v0.1.3
func (b ContentBlock) AsImage() (ImageBlock, error)
AsImage decodes the block as an ImageBlock.
func (ContentBlock) AsTerminalOutput ¶ added in v0.1.3
func (b ContentBlock) AsTerminalOutput() (TerminalOutputBlock, error)
AsTerminalOutput decodes the block as a TerminalOutputBlock.
func (ContentBlock) AsText ¶ added in v0.1.3
func (b ContentBlock) AsText() (TextBlock, error)
AsText decodes the block as a TextBlock.
func (ContentBlock) AsToolResult ¶ added in v0.1.3
func (b ContentBlock) AsToolResult() (ToolResultBlock, error)
AsToolResult decodes the block as a ToolResultBlock.
func (ContentBlock) AsToolUse ¶ added in v0.1.3
func (b ContentBlock) AsToolUse() (ToolUseBlock, error)
AsToolUse decodes the block as a ToolUseBlock.
func (ContentBlock) Decode ¶ added in v0.1.3
func (b ContentBlock) Decode() (any, error)
Decode unmarshals the envelope into its typed block payload.
func (ContentBlock) MarshalJSON ¶ added in v0.1.3
func (b ContentBlock) MarshalJSON() ([]byte, error)
MarshalJSON preserves the canonical JSON payload stored in Data.
func (*ContentBlock) UnmarshalJSON ¶ added in v0.1.3
func (b *ContentBlock) UnmarshalJSON(data []byte) error
UnmarshalJSON validates the payload and stores its canonical JSON form.
type ContentBlockType ¶ added in v0.1.3
type ContentBlockType string
ContentBlockType identifies the serialized variant carried by a ContentBlock.
const ( // BlockText carries plain text or markdown content. BlockText ContentBlockType = "text" // BlockToolUse carries a tool invocation announcement. BlockToolUse ContentBlockType = "tool_use" // BlockToolResult carries tool output that is not represented by a richer block. BlockToolResult ContentBlockType = "tool_result" // BlockDiff carries file modification details. BlockDiff ContentBlockType = "diff" // BlockTerminalOutput carries terminal execution output. BlockTerminalOutput ContentBlockType = "terminal_output" // BlockImage carries inline image data. BlockImage ContentBlockType = "image" )
type DiffBlock ¶ added in v0.1.3
type DiffBlock struct {
Type ContentBlockType `json:"type"`
FilePath string `json:"filePath"`
Diff string `json:"diff"`
OldText *string `json:"oldText,omitempty"`
NewText string `json:"newText,omitempty"`
}
DiffBlock carries file modification details.
type ExecutionMode ¶
type ExecutionMode string
const ( ExecutionModePRReview ExecutionMode = ModeCodeReview ExecutionModePRDTasks ExecutionMode = ModePRDTasks ExecutionModeExec ExecutionMode = ModeExec )
type ExplicitRuntimeFlags ¶ added in v0.1.11
ExplicitRuntimeFlags tracks which runtime fields were explicitly overridden by the current caller, using CLI-compatible `Flags().Changed(...)` semantics.
type FetchConfig ¶ added in v0.1.11
type FetchResult ¶ added in v0.1.10
type FixOutcome ¶ added in v0.1.11
type ImageBlock ¶ added in v0.1.3
type ImageBlock struct {
Type ContentBlockType `json:"type"`
Data string `json:"data"`
MimeType string `json:"mimeType"`
URI *string `json:"uri,omitempty"`
}
ImageBlock carries inline image data.
type IssueEntry ¶
type Job ¶
type Job struct {
CodeFiles []string
Groups map[string][]IssueEntry
TaskNumber int
TaskTitle string
TaskType string
SafeName string
IDE string
Model string
ReasoningEffort string
Prompt []byte
SystemPrompt string
MCPServers []MCPServer
OutPromptPath string
OutLog string
ErrLog string
}
func (Job) IssueCount ¶
type JobArtifacts ¶ added in v0.1.9
type JobControlRegistry ¶ added in v0.2.10
type JobControlRegistry struct {
// contains filtered or unexported fields
}
func NewJobControlRegistry ¶ added in v0.2.10
func NewJobControlRegistry() *JobControlRegistry
func (*JobControlRegistry) Pause ¶ added in v0.2.10
func (r *JobControlRegistry) Pause(ctx context.Context, runID string, jobID string) (JobControlResponse, error)
func (*JobControlRegistry) Register ¶ added in v0.2.10
func (r *JobControlRegistry) Register( runID string, index int, jobID string, controller JobController, ) func()
func (*JobControlRegistry) SendMessage ¶ added in v0.2.10
func (r *JobControlRegistry) SendMessage( ctx context.Context, runID string, jobID string, message string, ) (JobControlResponse, error)
type JobControlRequest ¶ added in v0.2.10
type JobControlResponse ¶ added in v0.2.10
type JobControlStatus ¶ added in v0.2.10
type JobControlStatus string
const ( JobControlStatusPausing JobControlStatus = "pausing" JobControlStatusPaused JobControlStatus = "paused" JobControlStatusResumed JobControlStatus = "resumed" )
type JobController ¶ added in v0.2.10
type JobController interface {
Pause(context.Context, JobControlRequest) (JobControlResponse, error)
SendMessage(context.Context, JobControlRequest) (JobControlResponse, error)
}
type MCPServer ¶ added in v0.1.11
type MCPServer struct {
Stdio *MCPServerStdio
}
MCPServer describes one resolved MCP server attachment for an ACP session. V1 only needs stdio transport because reusable-agent `mcp.json` currently normalizes to command/args/env declarations.
func CloneMCPServers ¶ added in v0.1.11
CloneMCPServers returns a deep copy of the provided MCP server slice.
type MCPServerStdio ¶ added in v0.1.11
MCPServerStdio describes one stdio-backed MCP server attachment.
type MigrationConfig ¶ added in v0.1.10
type MigrationResult ¶ added in v0.1.10
type OpenRunScopeOptions ¶ added in v0.1.11
type OpenRunScopeOptions struct {
EnableExecutableExtensions bool
}
OpenRunScopeOptions controls whether executable extensions should be initialized as part of the early run-scope bootstrap.
type OutputFormat ¶ added in v0.1.9
type OutputFormat string
const ( OutputFormatText OutputFormat = OutputFormatTextValue OutputFormatJSON OutputFormat = OutputFormatJSONValue OutputFormatRawJSON OutputFormat = OutputFormatRawJSONValue )
type ReviewContext ¶
type ReviewFileMeta ¶
type ReviewFileMeta struct {
Provider string `yaml:"provider,omitempty"`
PR string `yaml:"pr,omitempty"`
Round int `yaml:"round,omitempty"`
RoundCreatedAt time.Time `yaml:"round_created_at,omitempty"`
Status string `yaml:"status"`
File string `yaml:"file,omitempty"`
Line int `yaml:"line,omitempty"`
Severity string `yaml:"severity,omitempty"`
Author string `yaml:"author,omitempty"`
ProviderRef string `yaml:"provider_ref,omitempty"`
ReviewHash string `yaml:"review_hash,omitempty"`
SourceReviewID string `yaml:"source_review_id,omitempty"`
SourceReviewSubmittedAt string `yaml:"source_review_submitted_at,omitempty"`
}
type RunArtifacts ¶ added in v0.1.9
type RunArtifacts struct {
RunID string
RunDir string
RunDBPath string
RunMetaPath string
EventsPath string
TurnsDir string
JobsDir string
RecoveryDir string
ResultPath string
}
func NewRunArtifacts ¶ added in v0.1.9
func NewRunArtifacts(workspaceRoot, runID string) RunArtifacts
func NewRunArtifactsForRunsDir ¶ added in v0.2.0
func NewRunArtifactsForRunsDir(runsDir, runID string) RunArtifacts
func ResolveHomeRunArtifacts ¶ added in v0.2.0
func ResolveHomeRunArtifacts(runID string) (RunArtifacts, error)
func ResolvePersistedRunArtifacts ¶ added in v0.2.0
func ResolvePersistedRunArtifacts(workspaceRoot, runID string) (RunArtifacts, error)
func ResolveRuntimeRunArtifacts ¶ added in v0.2.12
func ResolveRuntimeRunArtifacts(cfg *RuntimeConfig) (RunArtifacts, error)
ResolveRuntimeRunArtifacts resolves one runtime's run directory using the daemon-captured RunsDir when present, falling back to the process home for local/non-daemon callers.
func (RunArtifacts) JobArtifacts ¶ added in v0.1.9
func (artifacts RunArtifacts) JobArtifacts(safeName string) JobArtifacts
type RunScope ¶ added in v0.1.11
type RunScope interface {
RunArtifacts() RunArtifacts
RunJournal() *journal.Journal
RunEventBus() *events.Bus[events.Event]
RunManager() RuntimeManager
Close(context.Context) error
}
RunScope captures the pre-planning runtime resources allocated for one run.
func OpenRunScope ¶ added in v0.1.11
func OpenRunScope( ctx context.Context, cfg *RuntimeConfig, opts OpenRunScopeOptions, ) (RunScope, error)
OpenRunScope allocates the runtime resources required before planning begins.
type RunSummary ¶ added in v0.1.11
type RunSummary struct {
Status string `json:"status"`
JobsTotal int `json:"jobs_total"`
JobsSucceeded int `json:"jobs_succeeded,omitempty"`
JobsFailed int `json:"jobs_failed,omitempty"`
JobsCanceled int `json:"jobs_canceled,omitempty"`
Error string `json:"error,omitempty"`
TeardownError string `json:"teardown_error,omitempty"`
}
type RuntimeConfig ¶
type RuntimeConfig struct {
WorkspaceRoot string
RunsDir string `json:"-"`
Name string
WorkflowName string `json:"-"`
Round int
Provider string
PR string
Nitpicks bool
ReviewsDir string
TasksDir string
DryRun bool
AutoCommit bool
Concurrent int
BatchSize int
IDE string
Model string
AddDirs []string
TailLines int
ReasoningEffort string
AccessMode string
AgentName string
ExplicitRuntime ExplicitRuntimeFlags
TaskRuntimeRules []TaskRuntimeRule
Mode ExecutionMode
OutputFormat OutputFormat
Verbose bool
TUI bool
Persist bool
EnableExecutableExtensions bool
DaemonOwned bool
RunID string
ParentRunID string
PromptText string
SystemPrompt string
TargetTaskNumber *int
PromptFile string
ReadPromptStdin bool
ResolvedPromptText string
IncludeCompleted bool
Recursive bool
RecoveryAttempt int
IncludeResolved bool
Timeout time.Duration
MaxRetries int
RetryBackoffMultiplier float64
SoundEnabled bool
SoundOnCompleted string
SoundOnFailed string
JobControls *JobControlRegistry `json:"-"`
}
func (*RuntimeConfig) ApplyDefaults ¶
func (cfg *RuntimeConfig) ApplyDefaults()
func (*RuntimeConfig) Clone ¶ added in v0.2.0
func (cfg *RuntimeConfig) Clone() *RuntimeConfig
Clone returns a deep copy of cfg so callers can resolve task-local runtime overrides without mutating the shared base run configuration.
func (*RuntimeConfig) RuntimeForTask ¶ added in v0.2.0
func (cfg *RuntimeConfig) RuntimeForTask(target TaskRuntimeTarget) *RuntimeConfig
RuntimeForTask resolves the effective runtime for one task. Type selectors apply before id selectors, and later rules win within the same specificity.
type RuntimeManager ¶ added in v0.1.11
type RuntimeManager interface {
Start(context.Context) error
DispatchMutableHook(context.Context, string, any) (any, error)
DispatchObserverHook(context.Context, string, any)
Shutdown(context.Context) error
}
RuntimeManager captures the lifecycle hook the planner/executor needs from an extension-aware runtime manager.
type SessionAvailableCommand ¶ added in v0.1.3
type SessionAvailableCommand struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
ArgumentHint string `json:"argumentHint,omitempty"`
}
SessionAvailableCommand describes one ACP slash-command style command.
type SessionPlanEntry ¶ added in v0.1.3
type SessionPlanEntry struct {
Content string `json:"content"`
Priority string `json:"priority"`
Status string `json:"status"`
}
SessionPlanEntry describes one ACP plan entry.
type SessionStatus ¶ added in v0.1.3
type SessionStatus string
SessionStatus describes the lifecycle state of a streamed session update.
const ( // StatusRunning marks an in-flight session update. StatusRunning SessionStatus = "running" // StatusCompleted marks a completed session. StatusCompleted SessionStatus = "completed" // StatusFailed marks a failed or canceled session. StatusFailed SessionStatus = "failed" )
type SessionUpdate ¶ added in v0.1.3
type SessionUpdate struct {
Kind SessionUpdateKind `json:"kind,omitempty"`
MessageID string `json:"messageId,omitempty"`
ToolCallID string `json:"toolCallId,omitempty"`
ToolCallState ToolCallState `json:"toolCallState,omitempty"`
Blocks []ContentBlock `json:"blocks,omitempty"`
ThoughtBlocks []ContentBlock `json:"thoughtBlocks,omitempty"`
PlanEntries []SessionPlanEntry `json:"planEntries,omitempty"`
AvailableCommands []SessionAvailableCommand `json:"availableCommands,omitempty"`
CurrentModeID string `json:"currentModeId,omitempty"`
Usage Usage `json:"usage,omitempty"`
Status SessionStatus `json:"status"`
}
SessionUpdate is the Compozy-owned view of one streamed ACP update.
type SessionUpdateKind ¶ added in v0.1.3
type SessionUpdateKind string
SessionUpdateKind identifies the ACP notification variant carried by a SessionUpdate.
const ( // UpdateKindUnknown marks an update with no additional semantic classification. UpdateKindUnknown SessionUpdateKind = "" // UpdateKindUserMessageChunk marks a streamed user message chunk. UpdateKindUserMessageChunk SessionUpdateKind = "user_message_chunk" // UpdateKindAgentMessageChunk marks a streamed agent message chunk. UpdateKindAgentMessageChunk SessionUpdateKind = "agent_message_chunk" // UpdateKindAgentThoughtChunk marks a streamed agent thought chunk. UpdateKindAgentThoughtChunk SessionUpdateKind = "agent_thought_chunk" // UpdateKindToolCallStarted marks the start of a tool call lifecycle. UpdateKindToolCallStarted SessionUpdateKind = "tool_call_started" // UpdateKindToolCallUpdated marks an update to an existing tool call lifecycle. UpdateKindToolCallUpdated SessionUpdateKind = "tool_call_updated" // UpdateKindPlanUpdated marks a plan update. UpdateKindPlanUpdated SessionUpdateKind = "plan_updated" // UpdateKindAvailableCommandsUpdated marks an available commands update. UpdateKindAvailableCommandsUpdated SessionUpdateKind = "available_commands_updated" // UpdateKindCurrentModeUpdated marks a current mode update. UpdateKindCurrentModeUpdated SessionUpdateKind = "current_mode_updated" )
type SolvePreparation ¶
type SolvePreparation struct {
Jobs []Job
RunArtifacts RunArtifacts
// RunScope carries the runtime resources that were allocated before
// planning began. Kernel/runtime flows retain responsibility for closing it.
RunScope RunScope
InputDir string
InputDirPath string
ResolvedName string
ResolvedPR string
ResolvedProvider string
ResolvedRound int
}
func (*SolvePreparation) CloseJournal ¶ added in v0.1.10
func (p *SolvePreparation) CloseJournal(ctx context.Context) error
func (*SolvePreparation) EventBus ¶ added in v0.1.11
func (p *SolvePreparation) EventBus() *events.Bus[events.Event]
func (*SolvePreparation) Journal ¶ added in v0.1.10
func (p *SolvePreparation) Journal() *journal.Journal
func (*SolvePreparation) RuntimeManager ¶ added in v0.1.11
func (p *SolvePreparation) RuntimeManager() RuntimeManager
func (*SolvePreparation) SetJournal ¶ added in v0.1.10
func (p *SolvePreparation) SetJournal(j *journal.Journal)
func (*SolvePreparation) SetRunScope ¶ added in v0.1.11
func (p *SolvePreparation) SetRunScope(scope RunScope)
type SyncConfig ¶ added in v0.1.10
type SyncResult ¶ added in v0.1.10
type SyncResult struct {
Target string
WorkflowsScanned int
WorkflowsPruned int
MetaCreated int
MetaUpdated int
SnapshotsUpserted int
TaskItemsUpserted int
ReviewRoundsUpserted int
ReviewIssuesUpserted int
CheckpointsUpdated int
LegacyArtifactsRemoved int
SyncedPaths []string
PrunedWorkflows []string
Warnings []string
}
type TaskFileMeta ¶
type TaskRuntime ¶ added in v0.2.0
type TaskRuntime struct {
IDE string `json:"ide,omitempty"`
Model string `json:"model,omitempty"`
ReasoningEffort string `json:"reasoning_effort,omitempty"`
}
TaskRuntime describes the effective runtime fields that may vary per task.
func TaskRuntimeFromConfig ¶ added in v0.2.0
func TaskRuntimeFromConfig(cfg *RuntimeConfig) TaskRuntime
TaskRuntimeFromConfig returns the task-scoped runtime view for cfg.
type TaskRuntimeRule ¶ added in v0.2.0
type TaskRuntimeRule struct {
Workflow *string `toml:"workflow" json:"workflow,omitempty"`
ID *string `toml:"id" json:"id,omitempty"`
Type *string `toml:"type" json:"type,omitempty"`
IDE *string `toml:"ide" json:"ide,omitempty"`
Model *string `toml:"model" json:"model,omitempty"`
ReasoningEffort *string `toml:"reasoning_effort" json:"reasoning_effort,omitempty"`
}
TaskRuntimeRule defines runtime overrides that apply to one task selector. Exactly one selector should be set in validated inputs. Workflow is an optional qualifier that scopes a rule without changing selector specificity.
func CloneTaskRuntimeRules ¶ added in v0.2.0
func CloneTaskRuntimeRules(src []TaskRuntimeRule) []TaskRuntimeRule
CloneTaskRuntimeRules returns a deep copy of runtime rules so callers can merge or mutate execution-local copies safely.
func (TaskRuntimeRule) HasOverride ¶ added in v0.2.0
func (r TaskRuntimeRule) HasOverride() bool
func (TaskRuntimeRule) HasSelector ¶ added in v0.2.0
func (r TaskRuntimeRule) HasSelector() bool
func (TaskRuntimeRule) IsIDRule ¶ added in v0.2.0
func (r TaskRuntimeRule) IsIDRule() bool
func (TaskRuntimeRule) IsTypeRule ¶ added in v0.2.0
func (r TaskRuntimeRule) IsTypeRule() bool
func (TaskRuntimeRule) Matches ¶ added in v0.2.0
func (r TaskRuntimeRule) Matches(target TaskRuntimeTarget) bool
type TaskRuntimeTarget ¶ added in v0.2.0
TaskRuntimeTarget identifies the task being resolved against runtime rules.
type TaskRuntimeTask ¶ added in v0.2.0
type TaskRuntimeTask struct {
ID string `json:"id,omitempty"`
SafeName string `json:"safe_name,omitempty"`
Title string `json:"title,omitempty"`
Type string `json:"type,omitempty"`
}
TaskRuntimeTask identifies the PRD task whose runtime is being resolved.
type TerminalOutputBlock ¶ added in v0.1.3
type TerminalOutputBlock struct {
Type ContentBlockType `json:"type"`
Command string `json:"command,omitempty"`
Output string `json:"output,omitempty"`
ExitCode int `json:"exitCode"`
TerminalID string `json:"terminalId,omitempty"`
}
TerminalOutputBlock carries terminal execution details.
type TextBlock ¶ added in v0.1.3
type TextBlock struct {
Type ContentBlockType `json:"type"`
Text string `json:"text"`
}
TextBlock carries plain text or markdown output.
type ToolCallState ¶ added in v0.1.3
type ToolCallState string
ToolCallState describes the lifecycle state of a tool call entry.
const ( // ToolCallStateUnknown marks a tool call without an explicit lifecycle state. ToolCallStateUnknown ToolCallState = "" // ToolCallStatePending marks a pending tool call. ToolCallStatePending ToolCallState = "pending" // ToolCallStateInProgress marks an in-flight tool call. ToolCallStateInProgress ToolCallState = "in_progress" // ToolCallStateCompleted marks a completed tool call. ToolCallStateCompleted ToolCallState = "completed" // ToolCallStateFailed marks a failed tool call. ToolCallStateFailed ToolCallState = "failed" // ToolCallStateWaitingForConfirmation is reserved for future permission-aware UX. ToolCallStateWaitingForConfirmation ToolCallState = "waiting_for_confirmation" )
type ToolResultBlock ¶ added in v0.1.3
type ToolResultBlock struct {
Type ContentBlockType `json:"type"`
ToolUseID string `json:"toolUseId"`
Content string `json:"content"`
IsError bool `json:"isError,omitempty"`
}
ToolResultBlock carries tool output when a richer block type is not available.
type ToolUseBlock ¶ added in v0.1.3
type ToolUseBlock struct {
Type ContentBlockType `json:"type"`
ID string `json:"id"`
Name string `json:"name"`
Title string `json:"title,omitempty"`
ToolName string `json:"toolName,omitempty"`
Input json.RawMessage `json:"input,omitempty"`
RawInput json.RawMessage `json:"rawInput,omitempty"`
}
ToolUseBlock describes the start of a tool invocation.
type Usage ¶ added in v0.1.3
type Usage struct {
InputTokens int `json:"inputTokens,omitempty"`
OutputTokens int `json:"outputTokens,omitempty"`
TotalTokens int `json:"totalTokens,omitempty"`
CacheReads int `json:"cacheReads,omitempty"`
CacheWrites int `json:"cacheWrites,omitempty"`
}
Usage tracks session token consumption.