Documentation
¶
Index ¶
- Constants
- func Emit(commandName, version string, duration time.Duration, exitCode int)
- func EnsureInstallID() (string, error)
- func RedactedSummary(ev Event) map[string]string
- func ResetInstallID() (string, error)
- func SetEnabled(enabled bool) error
- func StatePath() (string, error)
- type Event
- type InvocationSource
- type RuntimeContext
- type State
- type Status
Constants ¶
View Source
const (
DefaultEndpoint = "https://rork.com/cf-api/asc/v1/events"
)
Variables ¶
This section is empty.
Functions ¶
func EnsureInstallID ¶
func RedactedSummary ¶
func ResetInstallID ¶
func SetEnabled ¶
Types ¶
type Event ¶
type Event struct {
EventID string `json:"event_id"`
SchemaVersion uint8 `json:"schema_version"`
ASCVersion string `json:"asc_version"`
OS string `json:"os"`
Arch string `json:"arch"`
CommandPath string `json:"command_path"`
CommandFamily string `json:"command_family"`
DurationMS uint32 `json:"duration_ms"`
DurationBucket string `json:"duration_bucket"`
ExitCode int `json:"exit_code"`
Success bool `json:"success"`
RuntimeContext RuntimeContext `json:"runtime_context"`
InvocationSource InvocationSource `json:"invocation_source"`
InstallID *string `json:"install_id"`
SessionID string `json:"session_id"`
}
type InvocationSource ¶
type InvocationSource string
const ( SourceTerminal InvocationSource = "terminal" SourceClaudeCode InvocationSource = "claude_code" SourceCursorAgent InvocationSource = "cursor_agent" SourceCodexDesktop InvocationSource = "codex_desktop" SourceOpenCode InvocationSource = "opencode" SourcePi InvocationSource = "pi" SourceRorkAgent InvocationSource = "rork_agent" )
func DetectInvocationSource ¶
func DetectInvocationSource() InvocationSource
type RuntimeContext ¶
type RuntimeContext string
const ( RuntimeLocal RuntimeContext = "local" RuntimeEphemeral RuntimeContext = "ephemeral" RuntimeRorkSandbox RuntimeContext = "rork_sandbox" RuntimeRorkGitHubWorkflow RuntimeContext = "rork_github_workflow" RuntimeCI RuntimeContext = "ci" )
func DetectRuntimeContext ¶
func DetectRuntimeContext() RuntimeContext
Click to show internal directories.
Click to hide internal directories.