{"modulePath":"github.com/docker/docker-agent","version":"v1.165.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package programstatus\n\nPackage programstatus reports application state using the OSC 7501 protocol.\n\n## Types\n\n```go\ntype Reporter struct {\n\t// contains filtered or unexported fields\n}\n```\nReporter coalesces output. All methods run on the UI loop, or after it exits.\n\n```go\nfunc (r *Reporter) Finish(out io.Writer)\n```\nFinish retires transient state while preserving completed results on exit.\n\n```go\nfunc (r *Reporter) Set(status Status) bool\n```\nSet updates the desired status and reports whether it changed.\n\n```go\nfunc (r *Reporter) String() string\n```\nString encodes the latest state at write time, not when a command was queued. This prevents asynchronous Bubble Tea commands from publishing stale states.\n\n```go\ntype Session struct {\n\t// contains filtered or unexported fields\n}\n```\nSession tracks a conversation independently of whether its UI is visible.\n\n```go\nfunc (s *Session) Acknowledge()\n```\nAcknowledge dismisses a result when the user interacts with its conversation.\n\n```go\nfunc (s *Session) Apply(sessionID string, msg tea.Msg)\n```\nApply consumes accepted runtime events. Only the outer foreground stream finishes a turn; detached prompts survive foreground boundaries.\n\n```go\nfunc (s *Session) Cancel(sessionID string)\n```\nCancel marks an interrupted foreground run idle, not successfully completed.\n\n```go\nfunc (s *Session) Finish(sessionID, reason string)\n```\nFinish marks the outer UI operation complete, including pre-stream failures.\n\n```go\nfunc (s *Session) FinishSetup(sessionID, reason string)\n```\nFinishSetup handles a fork that stopped before its first stream started.\n\n```go\nfunc (s *Session) Resolve(event tea.Msg)\n```\nResolve retires an answered prompt without acknowledging other prompts.\n\n```go\nfunc (s *Session) Start(sessionID string)\n```\nStart marks new foreground work before its first runtime event arrives.\n\n```go\nfunc (s *Session) Status() Status\n```\nStatus returns the oldest unanswered prompt, or the conversation's state.\n\n```go\ntype Status struct {\n\tState string\n\tKind  string\n\tMsg   string\n}\n```\nStatus describes one aggregate application state.\n\n```go\nfunc Aggregate(statuses []Status) Status\n```\nAggregate gives unanswered prompts precedence over work and results. The caller supplies statuses in a stable order to break ties.\n\n```go\nfunc (s Status) Sequence() string\n```\nSequence encodes a root record, replacing all its previous keys.\n\n","path":"github.com/docker/docker-agent/pkg/programstatus","name":"programstatus","synopsis":"Package programstatus reports application state using the OSC 7501 protocol.","isRedistributable":true}
