Documentation
¶
Overview ¶
Package cmd is beekeeper's command line.
Index ¶
Constants ¶
const ( // DefaultGateWait is a foreground merge's wait for its turn before it // waits on in a run of its own; the hook gives a background one // BackgroundGateWait. DefaultGateWait = 2 * time.Minute BackgroundGateWait = 30 * time.Minute )
The gate's own exit codes, apart from devctl's 1-9 and the busy machine's 75.
const ( ExitError = 1 ExitUsage = 2 ExitRefused = 3 ExitRelieved = 4 ExitVault = 78 ExitOutdated = 125 )
Exit codes: 0 done, 1 error, 2 usage, 3 refused (a lease held or not granted, a hold set, the budget under its floor, a platform part this build does not have, a save by a release older than the one that wrote the state), 4 relieved (supervisor status in the session a relay relieved), 69 central unreachable (ExitCentral: a central verb whose instance did not answer), 78 vault (ExitVault: beekeeper secret could not read the shared vault: none configured, no token, op failing or silent), 125 outdated (a newer release exists: self-update --check, the status devctl's version check and muster's self-update --check use).
const ExitCentral = 69
ExitCentral is a central verb refused because the central instance is unreachable: there is no local copy to act on instead.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Harness ¶ added in v0.171.0
type Harness interface {
// Name is the harness's short name ("" for Claude Code, "omp", "agy", "codex").
Name() string
// HostPrefix prefixes a started session's HostSession ("local_", "omp_", "agy_", "codex_").
HostPrefix() string
// Host returns the HostSession for start id ("local_<id>", "omp_<id>", "agy_<id>", "codex_<id>").
Host(id string) string
// Unit returns the transient user unit name for start id, or "" for Claude Code.
Unit(id string) string
// EnvAgent is the environment variable a started session's shell carries, "" for Claude Code.
EnvAgent() string
// Start starts sp on this harness.
Start(ctx context.Context, a *app, sp agentStart) error
// DryRun prints how Start would start sp without starting anything.
DryRun(ctx context.Context, a *app, sp agentStart, gaps []string) error
// Wake delivers msg from by to the registered agent ag started under id.
Wake(a *app, by state.Party, ag state.Agent, id, msg string) error
// Send writes msg to the inbox of the agent name started under id.
Send(a *app, name, id, msg string) error
// Stop stops the unit and removes the inbox of the agent started under id.
Stop(ctx context.Context, a *app, id string) string
// Discover lists the running sessions of this harness.
Discover(cfg *config.Config, t *proc.Table, now time.Time) []*claude.Session
// Ended lists the sessions of this harness active since that no process runs.
Ended(cfg *config.Config, running []*claude.Session, since time.Time) []*claude.Session
// Tail reads the last n conversation turns of a transcript.
Tail(path string, n int) ([]claude.Turn, error)
// Follow reads the last n turns of a transcript, including tool calls.
Follow(path string, n int) ([]claude.Turn, error)
// ReadTranscript reads the work and activity of a session's transcript window.
ReadTranscript(a *app, s *claude.Session, now time.Time) (claude.Work, claude.Activity)
// SpendTranscripts reads whole-transcript API requests in [from, to) for spend.
SpendTranscripts(cfg *config.Config, from, to time.Time) ([]claude.SpendTranscript, error)
}
Harness is a coding agent harness beekeeper starts, lists, follows, wakes, stops and prices.
type ServeModeState ¶ added in v0.171.0
type ServeModeState struct {
// Mode is the mode the reader last reported.
Mode string `json:"mode,omitempty"`
// Pending is the mode a switch waits to run into.
Pending string `json:"pending,omitempty"`
// Node is the constraint the pending switch waits for; empty once the
// holder released and the request stands only for the watch to retry.
Node string `json:"node,omitempty"`
// Reason says why the switch waits.
Reason string `json:"reason,omitempty"`
// Since is when the desk asked for the pending switch.
Since time.Time `json:"since,omitzero"`
// At is when the machine was last reconciled.
At time.Time `json:"at,omitzero"`
}
ServeModeState is a self-hosted provider's serving-mode machine: the mode the reader reported, the mode a switch waits to run into, the node whose constraint the drain waits for, and why the switch waits.
Source Files
¶
- agentbackground.go
- agentdesktop.go
- agentdir.go
- agenteffort.go
- agentgh.go
- agentgone.go
- agenthandover.go
- agentkeep.go
- agentmove.go
- agentoutcome.go
- agentpark.go
- agentproblem.go
- agentprofile.go
- agentproject.go
- agentresume.go
- agentreview.go
- agentreviewparks.go
- agents.go
- agentstart.go
- agentstartagy.go
- agentstartcodex.go
- agentstartomp.go
- agentstarttimer.go
- agenttitle.go
- agentwake.go
- agentworktree.go
- alerts.go
- answer.go
- answerhistory.go
- answerwords.go
- apiread.go
- app.go
- appcreate.go
- appdrift.go
- appinstallation.go
- appmanifest.go
- archivable.go
- archive.go
- backgroundrest.go
- board.go
- boardadd.go
- boardescalate.go
- boardprrefs.go
- broadcast.go
- browse.go
- browsewindow.go
- budget.go
- budgetidentities.go
- cacheclear.go
- capacity.go
- capacityactivity.go
- capacityalias.go
- capacitypace.go
- capacitywire.go
- central.go
- centralfeed.go
- centralholds.go
- centrallanes.go
- centralmailbox.go
- centralroster.go
- changepause.go
- claims.go
- claude_usage.go
- claudelogin.go
- config.go
- configoverride.go
- continuation.go
- continuationci.go
- cpu.go
- daemonunit.go
- debug.go
- delivery.go
- deliveryabandon.go
- deliveryadmission.go
- deliveryawake.go
- deliveryflow.go
- deliveryhealth.go
- deliveryobserve.go
- desktoproom.go
- diskcaches.go
- diskfinished.go
- diskholders.go
- diskpaths.go
- diskprune.go
- disksccache.go
- diskusage.go
- diskwatch.go
- dockerprune.go
- doctor.go
- doctordesk.go
- doctormcp.go
- doctorrepository.go
- emergency.go
- epicdelivery.go
- eventsegmentation.go
- executionbundle.go
- executioncontinue.go
- executioncontrol.go
- executiongithub.go
- executiongithubhost.go
- executionharness.go
- executionhost.go
- executionhostupdate.go
- executionlease.go
- executionlog.go
- executionmcp.go
- executionmerge.go
- executionmessage.go
- executionnochange.go
- executionops.go
- executionorphan.go
- executionpublicationtarget.go
- executionpublish.go
- executionpublishcache.go
- executionpublishmerge.go
- executionpublishtransfer.go
- executionrelease.go
- executionrerun.go
- executionresolution.go
- executionretire.go
- executionreview.go
- executionreviewfix.go
- executionreviewrelay.go
- executionrun.go
- executionsource.go
- executionsourcecheck.go
- executionstart.go
- fatal.go
- fatalbarrier.go
- fatalpreflight.go
- feedback.go
- fleetwatch.go
- free.go
- freenestedworktrees.go
- gate.go
- gatealias.go
- gatecheck.go
- gatehost.go
- gatemerge.go
- gatepair.go
- gatequeue.go
- gateruns.go
- gatestop.go
- gatetakeover.go
- gateurgent.go
- githubcalls.go
- gocache.go
- gtt.go
- guard.go
- guide.go
- guidemessage.go
- guidemonitor.go
- guiderecovery.go
- guidestale.go
- guidework.go
- handover.go
- handoverboard.go
- handoverselect.go
- harness.go
- hold.go
- hookmergego.go
- hookpreinvocation.go
- hookrelay.go
- hostplacement.go
- importrow.go
- incidentstarts.go
- install.go
- issues.go
- lablifecycle.go
- labs.go
- lanes.go
- lease.go
- leasekube.go
- leaselab.go
- leaselabconfig.go
- leaserestore.go
- leaseround.go
- leftover.go
- lint.go
- literals_cmd.go
- loopalias.go
- loopcomparison.go
- loophost.go
- looplifecycle.go
- loopsteps.go
- mergecheckgroup_linux.go
- mergeevents.go
- mergeprogress.go
- metrics.go
- modelpolicy.go
- modelserver.go
- note.go
- notecentral.go
- notecheck.go
- notedecision.go
- notedelivery.go
- notedone.go
- notehold.go
- noteovertaken.go
- noteroute.go
- noteshow.go
- offroster.go
- owed.go
- owned.go
- pageowner.go
- pagerduty.go
- parkrefs.go
- parkrelease.go
- parkretire.go
- peerinstruction.go
- person.go
- platform.go
- pluginsync.go
- probelock.go
- productionnote.go
- profile.go
- prompt.go
- proof.go
- ps.go
- recovery.go
- relay.go
- reopenwait.go
- replyaddress.go
- report.go
- reporter.go
- repositoryvisibility.go
- restart.go
- reviewedmergecheck.go
- reviewedmergeenvironment.go
- reviewedmergelint.go
- reviewedrelease.go
- reviewedupdate.go
- reviewwrite.go
- revived.go
- rolecmd.go
- rolerun.go
- root.go
- runstats.go
- runtail.go
- sametitle.go
- sandbox.go
- sandboxgithub.go
- sandboxhost.go
- sandboxprotection.go
- sandboxscratch.go
- sandboxsign.go
- sandboxvault.go
- scan.go
- secret.go
- secretcapture.go
- secretgithubapp.go
- secretgithubappcheckout.go
- secretitems.go
- secretlog.go
- secretmove.go
- secretpage.go
- secretreveal.go
- secretstore.go
- secretunlock.go
- security.go
- securityreview.go
- seen.go
- selfupdate.go
- serve.go
- serveconversations.go
- servedecisions.go
- serveidentity.go
- servemessages.go
- serveresources.go
- servescope.go
- servetools.go
- servewatch.go
- servingmodes.go
- servingmodes_lease.go
- servingmodes_proc_unix.go
- sessionreport.go
- sessionreport_apply.go
- sessions.go
- sessionworktrees.go
- sim.go
- sink.go
- slotorphans.go
- snapshot.go
- spend.go
- squashmerge.go
- stalewatch.go
- standby.go
- standing.go
- startplacement.go
- statesnapshot.go
- status.go
- stop.go
- storm.go
- successor.go
- supervisor.go
- supervisoralerts.go
- supervisorgraphql.go
- supervisorhosts.go
- supervisorloop.go
- supervisorloopmerge.go
- supervisorprogress.go
- supervisorrest.go
- supervisorresume.go
- supervisorwatch.go
- suspend.go
- taskkinds.go
- teleport.go
- throughputhealth.go
- timer.go
- timercheck.go
- timercond.go
- timerdispatch.go
- timerwake.go
- tmpfs.go
- tmpfsowners.go
- transcriptpolicy.go
- transcripts.go
- ui.go
- ungated.go
- unmergedhold.go
- upgrades.go
- usage.go
- watch.go
- watchbatch.go
- watchdefaulted.go
- watchresolver.go
- worktreeowner.go
- worktreeprocess.go
- worktrees.go