Documentation
¶
Index ¶
- Variables
- func ApplyProfileToFlags(cmd *cobra.Command, profile *Profile) error
- func Deliver(sink DeliverSink, body []byte, compact bool) error
- func Execute() error
- func ExitCode(err error) int
- func FeedbackEndpointConfigured() bool
- func ListProfileNames() []string
- func RootCmd() *cobra.Command
- type DataProvenance
- type DeliverSink
- type FeedbackEntry
- type Profile
Constants ¶
This section is empty.
Variables ¶
var As = errors.As
Functions ¶
func ApplyProfileToFlags ¶
ApplyProfileToFlags overlays profile values onto flags that the user has not set explicitly on the command line. Used from root.go's PersistentPreRunE so profile values feed the whole command tree.
func Deliver ¶
func Deliver(sink DeliverSink, body []byte, compact bool) error
Deliver routes a captured output buffer to the configured sink. stdout is a no-op because the buffer has already been streamed to stdout via the MultiWriter set up in root.go.
func Execute ¶
func Execute() error
Execute runs the CLI in non-interactive mode: never prompts, all values via flags or stdin.
func FeedbackEndpointConfigured ¶
func FeedbackEndpointConfigured() bool
FeedbackEndpointConfigured reports whether an upstream feedback URL is available. Surfaced via agent-context so introspecting agents know whether their feedback will ship upstream.
func ListProfileNames ¶
func ListProfileNames() []string
ListProfileNames returns profile names sorted alphabetically. Used by the agent-context subcommand to expose available_profiles at runtime.
Types ¶
type DataProvenance ¶
type DataProvenance struct {
Source string `json:"source"` // "live" or "local"
SyncedAt *time.Time `json:"synced_at,omitempty"` // when local data was last synced
Reason string `json:"reason,omitempty"` // why local was used: "user_requested", "api_unreachable", "no_search_endpoint"
ResourceType string `json:"resource_type,omitempty"` // which resource type was queried
Freshness any `json:"freshness,omitempty"` // optional machine-owned freshness metadata for covered command paths
}
DataProvenance describes where data came from and when it was last synced.
type DeliverSink ¶
DeliverSink describes where command output should be routed when --deliver is set. Parsed from the sink specifier "scheme:target".
func ParseDeliverSink ¶
func ParseDeliverSink(spec string) (DeliverSink, error)
ParseDeliverSink parses a --deliver value. Supported schemes:
stdout -> default, no redirection file:<path> -> write output atomically to <path> webhook:<url> -> POST output body to <url>
Returns an error for unknown schemes with a message naming the supported set, so agents see a structured refusal rather than a silent misroute.
type FeedbackEntry ¶
type FeedbackEntry struct {
Text string `json:"text"`
CLI string `json:"cli"`
Version string `json:"version"`
AgentID string `json:"agent_id,omitempty"`
Timestamp time.Time `json:"timestamp"`
}
FeedbackEntry is one line in the local feedback ledger. Every run of the feedback command appends one entry; upstream POST is a separate, optional step.
type Profile ¶
type Profile struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Values map[string]string `json:"values"`
}
Profile is a named set of flag values saved for reuse across invocations. HeyGen's "Beacon" pattern: one named context that a scheduled agent reuses day after day with the same voice/format but different input each run.
func GetProfile ¶
GetProfile returns a profile by name, or (nil, nil) if not found.
Source Files
¶
- agent_context.go
- api_discovery.go
- auth.go
- channel_workflow.go
- data_source.go
- deliver.go
- doctor.go
- feedback.go
- folders.go
- folders_contents.go
- folders_contents_get-folder.go
- folders_tree.go
- folders_tree_get-folder.go
- helpers.go
- import.go
- pm_load.go
- pm_orphans.go
- pm_stale.go
- profile.go
- projects_members.go
- projects_members_list-project.go
- promoted_files.go
- promoted_global-search.go
- promoted_project-search.go
- promoted_projects.go
- promoted_queries.go
- queries_files.go
- queries_files_get-query.go
- queries_result.go
- queries_result_get-query.go
- queries_status.go
- queries_status_get-query.go
- root.go
- search.go
- sync.go
- sync_hint.go
- which.go