Documentation
¶
Overview ¶
Package cli implements the subcommands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Version = "dev"
Functions ¶
func Defaults ¶ added in v0.2.0
Defaults is the config a file overrides: config's defaults with the agent and the workspace managers this build picks.
func InstallPlugins ¶ added in v0.3.0
func InstallPlugins() error
InstallPlugins finds and installs the plugins, as installPlugins does, for the process's Envs. The command's main calls it once, before NewEnv and before anything reads the configuration or the profile.
Types ¶
type Advice ¶
type Advice struct{ Name, Info, Fix string }
Advice is one doctor line about a manager: what it is, why, and the fix.
type Briefing ¶
type Briefing interface {
BriefReady(ctx context.Context, u unit.Unit) (intake.Readiness, error)
OpenIntakes(ctx context.Context) ([]intake.Intake, error)
}
Briefing tells the sweep whether a round's brief is ready and which intakes are open.
type Env ¶
type Env struct {
Out io.Writer
Err io.Writer
// In is the standard input profile add reads its text from.
In io.Reader
Git gitx.Git
// Files is what removals read of the file system; nil reads it directly.
Files workspaces.Files
// WS is every enabled workspace manager, in the configured order.
WS *workspace.Set
// Sh runs the auxiliary commands of doctor, app install and clone.
Sh func(ctx context.Context, name string, args ...string) ([]byte, error)
// Stdout runs a command for its standard output alone.
Stdout func(ctx context.Context, name string, args ...string) ([]byte, error)
LoadConfig func() (config.Config, error)
// IntentRecheck is how long the intent registry trusts the profile's stamp; zero rechecks on every read.
IntentRecheck time.Duration
// ViewDebounce is how long serve's view sinks gather wakes before they flush; zero is views.FlushDebounce.
ViewDebounce time.Duration
ConfigPath string
StateDir string
Home string
// HomeOverride is the session home a round by hand brings; nil reads
// the caller's from Getenv.
HomeOverride *string
Now func() time.Time
Rec Recorder
// Rounds is the daemon's; a command line process has none.
Rounds Rounds
// Store, Turns and Views are the daemon's; a command line process has
// none, and its rounds keep no turn.
Store *inventory.Store
Turns *turns.Service
Views *views.Service
// Briefing is the daemon's; nil sends every automatic round without
// asking for its brief.
Briefing Briefing
// Socket is the daemon's; empty means no daemon is reachable.
Socket string
// Getenv reads the environment of the agent session that runs hook, turn
// and instructions.
Getenv func(string) string
// Harness reads the hook payloads and the session identity of that session.
Harness harness.Set
// Executable is the binary the LaunchAgent runs.
Executable string
// The native menu bar and the process exit; tests replace them.
NativeAvailable func() bool
RunNative func(setup func(menubar.Tray, menubar.Notifier))
QuitNative func()
Exit func(code int)
// Reexec replaces this process with Executable, same arguments.
Reexec func() error
// Agents are the supported agents by name.
Agents map[string]turns.Agent
// Usage reads the tokens of each agent's turns by name; a kind
// without one has no usage.
Usage map[string]coreusage.Reader
// Homes are the configuration homes of each agent by name.
Homes map[string]setup.HomeKind
// Managers are the supported workspace managers by name; nil keeps WS
// whatever the config selects.
Managers map[string]ManagerEntry
// contains filtered or unexported fields
}
Env groups dependencies so commands can be tested without touching the real environment.
func (*Env) ReadAhead ¶
ReadAhead reads ref's basics and the viewer and returns ctx carrying them, with those read ahead before, for the action that takes the loop lock next. With full, an open pull request with a review workspace, the one a held round reads in full, is also read in full into the inventory.
type ManagerEntry ¶
type ManagerEntry struct {
// Display names the manager in messages, such as "Orca".
Display string
// Binary is the manager's executable, as doctor looks it up on PATH; "" for none.
Binary string
// Control are the command prefixes and ControlPaths the paths that drive
// the manager: no session the loop starts may run or read them.
Control [][]string
ControlPaths []string
// SessionVar is the variable the manager sets, in its sessions' agent
// process, to the handle of the process.
SessionVar string
// Session reads the identity the manager gives a session from its environment.
Session harness.SessionEnv
// Sink is the view sink whose columns the manager's workspace statuses
// are, "" for none; Columns are its default columns by semantic status.
Sink string
Columns map[string]string
New func() workspace.Manager
// Ports are the processes and sinks on ws; reloads ws starts on its own run under
// ctx, and its changes are noted in changes, which may be nil.
Ports func(ctx context.Context, ws workspace.Manager, prs prrow.ReportedPRs, cfg config.Config, changes *change.Log) (managerSessions, []views.Sink, error)
// Homes lists agent homes the manager keeps for kind under userHome.
Homes func(userHome, kind string) []string
// Available is nil when the manager is installed and this release can
// drive it, else why not; nil Available is always available.
Available func(ctx context.Context) error
// Advice is what doctor tells about an available manager that it cannot check.
Advice []Advice
}
ManagerEntry is what the loop runs on one workspace manager.
type Recorder ¶
type Recorder interface {
Record(ctx context.Context, ev dinv.Event) error
// RecordUnit is Record for an event on any unit.
RecordUnit(ctx context.Context, ev port.Event) error
Overrides(ctx context.Context) (map[pr.Ref]dinv.Override, error)
// FirstRoundBlocks maps each unit whose round is blocked to its
// round_blocked event.
FirstRoundBlocks(ctx context.Context) (map[unit.Unit]port.Event, error)
KeepNextGuidance(ctx context.Context, ref pr.Ref, guidance string) error
TakeNextGuidance(ctx context.Context, ref pr.Ref) (string, error)
// OpenQuestions maps each pull request to the intents whose newest turn
// is asked.
OpenQuestions(books map[unit.Unit]dturn.Book) map[pr.Ref]map[string]bool
}
Recorder receives the loop's own events; nil records nothing.
Source Files
¶
- actions.go
- address.go
- adopt.go
- agents.go
- ahead.go
- appmode.go
- automation.go
- brief_facts.go
- brief_intent.go
- briefinput.go
- builtins.go
- builtins_effects.go
- bundle.go
- classify.go
- cli.go
- config_cmd.go
- doctor.go
- doctor_disk.go
- doctor_load_view.go
- doctor_plugins.go
- doctor_repo.go
- doctor_repo_view.go
- doctor_restricted.go
- doctor_store.go
- doctor_view.go
- eval.go
- explore.go
- facts.go
- forge.go
- hand.go
- help.go
- help_topics.go
- init.go
- init_config.go
- init_profile.go
- init_prompt.go
- init_slack.go
- init_suggest.go
- install.go
- installhomes.go
- instructions.go
- intake.go
- intent_cmd.go
- launcher.go
- loopevents.go
- mcpkey.go
- module.go
- nudge.go
- outbox.go
- outbox_policy.go
- outbox_view.go
- pause.go
- placement.go
- plan.go
- plan_unit.go
- plugin_run.go
- plugin_tools.go
- plugincli.go
- prfacts.go
- probe.go
- profile_cmd.go
- profile_view.go
- records.go
- remove.go
- review.go
- root.go
- round.go
- roundreason.go
- rounds.go
- roundstate.go
- runs.go
- serve.go
- serve_cards.go
- serve_chat.go
- serve_dossier_turns.go
- serve_dossiers.go
- serve_ended.go
- serve_gates.go
- serve_github.go
- serve_headless.go
- serve_hosted.go
- serve_items.go
- serve_links.go
- serve_messages.go
- serve_outbox.go
- serve_payloads.go
- serve_placement.go
- serve_plugin_actions.go
- serve_plugins.go
- serve_projects.go
- serve_proposals.go
- serve_reported.go
- serve_slack.go
- serve_tasks.go
- serve_turnledger.go
- serve_ui.go
- serve_views.go
- skill.go
- slack.go
- sources.go
- startblocks.go
- status.go
- step_draftpropose.go
- step_draftpropose_hold.go
- step_gateopen.go
- step_taskset.go
- step_taskverb.go
- steps.go
- stepstart.go
- stepstart_unit.go
- store.go
- storecmd.go
- storedfacts.go
- sweepinputs.go
- targets.go
- targets_plugins.go
- task_cmd.go
- task_results.go
- taskturn.go
- timings.go
- trust.go
- trustgates.go
- try.go
- tui.go
- turn.go
- turnitems.go
- turnshow.go
- uninstall.go
- unitturn.go
- upgrade.go
- wire.go
- wire_briefs.go
- wire_capabilities.go
- wire_dims.go
- wire_drafts.go
- wire_prose.go
- wire_subjects.go
- wire_turnstart.go
- wire_workflows.go
- workflows_cmd.go