cli

package
v0.49.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 33 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cli is the entrypoint for `ppz`. Each verb either talks to the daemon over IPC or IS the daemon (`ppz daemon start --foreground`).

Index

Constants

View Source
const HeartbeatIntervalSec = 60

HeartbeatIntervalSec is the canonical heartbeat cadence. The ticker runs every HeartbeatIntervalSec seconds, the payload's interval_sec field carries the same value so consumers (notably `ppz who`'s classifier) can scale online/stale/offline thresholds proportionally. Keep this as the single source of truth — three earlier copies of `60` (ticker, payload field, doc) drifted apart in review.

Variables

This section is empty.

Functions

func Run

func Run(args []string) error

Run dispatches argv[1:] to the appropriate verb. Returns a *cliproto.Error when there is one — main turns that into the standard exit code + stderr.

Verb hierarchy (Phase B):

ppz daemon {start|stop|login|logout}
(source verbs removed in Phase 1 — see ppz terminal/agent create
for replacements; current-handle state managed via ppz set/unset)
ppz terminal {wrap|watch|peek}     (terminal verbs are reshaped in Phase D)
ppz {status|ls|read|send}

Old top-level verbs (`ppz create`, `ppz switch`, `ppz kill`, `ppz login`) are removed without aliases — fresh MVP, no users to migrate.

Types

type HeartbeatPayload added in v0.33.0

type HeartbeatPayload struct {
	TS            string `json:"ts"`
	Seq           uint64 `json:"seq"`
	Harness       string `json:"harness"`
	HarnessSource string `json:"harness_source"` // "detected" | "env" | ""
	AgentState    string `json:"agent_state"`    // "" | "idle" | "working" | "blocked"
	ChildPID      int    `json:"child_pid"`      // foreground pid when a harness is detected
	Model         string `json:"model"`
	Hostname      string `json:"hostname"`
	OS            string `json:"os"`
	Arch          string `json:"arch"`
	PID           int    `json:"pid"`
	PPZVersion    string `json:"ppz_version"`
	StartedAt     string `json:"started_at"`
	IntervalSec   int    `json:"interval_sec"`
}

HeartbeatPayload is the wire shape published to <handle>.heartbeat. Every beat is fully self-describing — there is no "hello + delta" split — so consumers (notably `ppz who`) can read a single message and have everything needed to render an agent's identity + status.

Jump to

Keyboard shortcuts

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