assemble

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package assemble provides the canonical tool assembly pipeline. All tool set construction — base tools + Task + Batch + ToolDefs — goes through this package, eliminating duplication across CLI inspection, session init, and per-turn config reload.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {
	Config      config.Config
	Paths       config.Paths
	Runtime     *config.Runtime // nil for CLI inspection
	TodoList    *todo.List
	Events      chan<- ui.Event
	PluginCache *plugins.Cache
	LSPManager  *lsp.Manager
	Estimate    func(string) int // from estimator.EstimateLocal

	// Existing tools to re-inject instead of creating new ones (reload path).
	// When nil, new instances are created from config.
	ExistingTask  *task.Tool
	ExistingBatch *batch.Tool

	// When true, adds Done(nil) and Ask(nil) for display/inspection.
	ForDisplay bool
}

Params holds dependencies for the canonical tool assembly pipeline.

type Result

type Result struct {
	Tools tool.Tools
	Task  *task.Tool // nil if no subagent agents exist
	Batch *batch.Tool
}

Result holds the assembled tool set and references to meta-tools.

func Tools

func Tools(p Params) (Result, error)

Tools builds the complete tool set: base tools + Task + Batch + ToolDefs.

Pipeline:

  1. tools.All() — built-in + plugin + Skill + ToolDefs + availability filter
  2. Task tool — re-inject existing or create from subagent agents
  3. Batch tool — re-inject existing or create new
  4. Display tools — Done(nil) + Ask(nil) when ForDisplay is set
  5. ToolDefs.Apply — catches Task, Batch, and display tools
  6. Runtime.AllTools assignment (when Runtime is non-nil)

Jump to

Keyboard shortcuts

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