{"modulePath":"github.com/volcengine/volcengine-cli","version":"v1.2.3","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package proxycli\n\n## Constants\n\n```go\nconst (\n\tDefaultManifestURL = \"https://cloudcache.volccdn.com/ve/proxycli/manifest.json\"\n\n\tEnvProxyPath  = \"VOLCENGINE_CLI_PROXY_PATH\"\n\tStateFileName = \"install-state.json\"\n)\n```\n\n```go\nconst CatalogFileName = \"catalog-v2.json\"\n```\n\n```go\nconst CatalogSchemaVersion = 2\n```\n\n```go\nconst DefaultCatalogURL = \"https://cloudcache.volccdn.com/ve/proxycli/catalog-v2.json\"\n```\n\n```go\nconst InstallerProtocolVersion = 3\n```\n\n```go\nconst SkillsRepository = \"https://github.com/volcengine/volcengine-skills\"\n```\n\n## Types\n\n```go\ntype Catalog struct {\n\tSchemaVersion        int        `json:\"schema_version\"`\n\tRevision             string     `json:\"catalog_revision\"`\n\tMinInstallerProtocol int        `json:\"min_installer_protocol\"`\n\tTools                []ToolSpec `json:\"tools\"`\n}\n```\nCatalog is the versioned publication contract. Snapshot owns a private copy.\n\n```go\ntype CatalogStore struct{ Dir string }\n```\n\n```go\nfunc NewCatalogStore() (*CatalogStore, error)\n```\n\n```go\nfunc (s *CatalogStore) Load() *Snapshot\n```\nLoad is local-only and does not create directories or read business credentials. A malformed cache falls back to the previous valid cache, then the embedded data.\n\n```go\nfunc (s *CatalogStore) Refresh() (*Snapshot, error)\n```\n\n```go\nfunc (s *CatalogStore) RefreshFile(path string) (*Snapshot, error)\n```\nRefreshFile explicitly imports a reviewed local catalog. It uses exactly the production schema/URL checks, with no arbitrary download hosts or scripts.\n\n```go\ntype InstalledTool struct {\n\tVersion        string `json:\"version\"`\n\tArtifactSHA256 string `json:\"artifactSha256\"`\n\tBinarySHA256   string `json:\"binarySha256\"`\n\tPath           string `json:\"path\"`\n\tSource         Source `json:\"source\"`\n\tUpdatedAt      string `json:\"updatedAt\"`\n}\n```\n\n```go\ntype LaunchSpec struct {\n\tKind string `json:\"kind\"`\n}\n```\n\n```go\ntype Manager struct {\n\tHomeDir          string\n\tConfigDir        string\n\tBinDir           string\n\tManifestURL      string\n\tFallbackManifest []byte\n\tHTTPClient       *http.Client\n\tCheckHTTPClient  *http.Client\n\tLookPath         func(string) (string, error)\n\tGOOS             string\n\tGOARCH           string\n\tNow              func() time.Time\n\tCatalog          *Snapshot\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewManager() (*Manager, error)\n```\n\n```go\nfunc NewManagerWithCatalog(snapshot *Snapshot) (*Manager, error)\n```\n\n```go\nfunc (m *Manager) DefaultUpgradeTools() ([]Tool, error)\n```\n\n```go\nfunc (m *Manager) PrepareUpdateCheck(resolution Resolution) UpdateCheckPlan\n```\nPrepareUpdateCheck performs only local work before process delegation. A stale cache is synchronously marked with a failure-backoff lease so an exec of a short-lived child cannot cause every invocation to launch another CDN request. The caller starts an independent helper when Refresh is true.\n\n```go\nfunc (m *Manager) RefreshUpdateCheck(tool Tool, current string) error\n```\nRefreshUpdateCheck is run by the detached helper. It performs the remote probe and replaces the synchronous lease with a success or failure cache entry while preserving the daily notice throttle.\n\n```go\nfunc (m *Manager) Resolve(tool Tool) (Resolution, error)\n```\nResolve applies the fixed lookup order: the user's PATH first, followed by the ve-managed proxy CLI directory. A missing managed binary is installed lazily from the independent proxy CLI manifest.\n\n```go\nfunc (m *Manager) Upgrade(tools []Tool) (UpgradeResult, error)\n```\nUpgrade installs or upgrades ve-managed proxy CLIs. Binaries found first on PATH are deliberately left to their original package manager.\n\n```go\ntype Manifest struct {\n\tTools map[Tool]ManifestTool `json:\"tools\"`\n}\n```\n\n```go\ntype ManifestAsset struct {\n\tURL    string `json:\"url\"`\n\tSHA256 string `json:\"sha256\"`\n\tSize   int64  `json:\"size\"`\n}\n```\nManifestAsset is deliberately identical for every product. Installation uses the built-in native ZIP convention (Ark retains its legacy raw format).\n\n```go\ntype ManifestTool struct {\n\tVersion   string                   `json:\"version\"`\n\tPlatforms map[string]ManifestAsset `json:\"platforms\"`\n}\n```\n\n```go\ntype Resolution struct {\n\tTool        Tool\n\tPath        string\n\tVersion     string\n\tSource      Source\n\tArgsPrefix  []string\n\tEnvironment map[string]string\n\tTargetPath  string\n}\n```\n\n```go\ntype SkillSpec struct {\n\tRepository string   `json:\"repository\"`\n\tNames      []string `json:\"names\"`\n}\n```\n\n```go\ntype Snapshot struct {\n\t// contains filtered or unexported fields\n}\n```\nSnapshot is immutable; returned specifications are deep copies.\n\n```go\nfunc EmbeddedSnapshot() *Snapshot\n```\n\n```go\nfunc ParseCatalog(data []byte) (*Snapshot, error)\n```\nParseCatalog validates publication data, never executes or probes a tool.\n\n```go\nfunc ReadCatalogFile(path string) (*Snapshot, error)\n```\nReadCatalogFile validates a bounded local publication without changing cache.\n\n```go\nfunc (s *Snapshot) Catalog() Catalog\n```\n\n```go\nfunc (s *Snapshot) Lookup(value string) (ToolSpec, bool)\n```\n\n```go\nfunc (s *Snapshot) ParseTool(value string) (Tool, error)\n```\n\n```go\nfunc (s *Snapshot) Ready(tool Tool) (ToolSpec, error)\n```\n\n```go\nfunc (s *Snapshot) Source() string\n```\n\n```go\ntype Source string\n```\n\n```go\nconst (\n\tSourcePath     Source = \"path\"\n\tSourceManaged  Source = \"managed\"\n\tSourceCatalog  Source = \"catalog\"\n\tSourceCDN      Source = \"cdn\"\n\tSourceEmbedded Source = \"embedded-fallback\"\n)\n```\n\n```go\ntype State struct {\n\tTools map[Tool]*InstalledTool `json:\"tools\"`\n}\n```\n\n```go\ntype Status string\n```\n\n```go\nconst (\n\tStatusExternal  Status = \"externally-managed\"\n\tStatusInstalled Status = \"installed\"\n\tStatusUpdated   Status = \"updated\"\n\tStatusRestored  Status = \"restored\"\n\tStatusCurrent   Status = \"current\"\n)\n```\n\n```go\ntype Tool string\n```\n\n```go\nconst (\n\tToolArkCLI  Tool = \"arkcli\"\n\tToolTOSUtil Tool = \"tosutil\"\n)\n```\n\n```go\nfunc LegacyTools() []Tool\n```\nLegacyTools is the historical default install set, not catalog enumeration.\n\n```go\nfunc ParseTool(value string) (Tool, error)\n```\n\n```go\ntype ToolSpec struct {\n\tID             Tool                     `json:\"id\"`\n\tCommand        string                   `json:\"command\"`\n\tAliases        []string                 `json:\"aliases\"`\n\tDescription    string                   `json:\"description\"`\n\tReadiness      string                   `json:\"readiness\"`\n\tReleaseVersion string                   `json:\"release_version,omitempty\"`\n\tExecutable     string                   `json:\"executable\"`\n\tLaunch         LaunchSpec               `json:\"launch\"`\n\tSourceURL      string                   `json:\"source_url\"`\n\tPlatforms      map[string]ManifestAsset `json:\"platforms\"`\n\tSkills         SkillSpec                `json:\"skills\"`\n\tNotes          []string                 `json:\"notes,omitempty\"`\n\tGaps           []string                 `json:\"gaps,omitempty\"`\n\tPathPolicy     string                   `json:\"path_policy\"` // prefer or managed-only\n}\n```\n\n```go\ntype UpdateCheckPlan struct {\n\tRefresh   bool\n\tHasNotice bool\n\tNotice    UpdateCheckResult\n}\n```\n\n```go\ntype UpdateCheckResult struct {\n\tTool      Tool\n\tCurrent   string\n\tLatest    string\n\tHasUpdate bool\n}\n```\n\n```go\ntype UpgradeItem struct {\n\tTool    Tool\n\tStatus  Status\n\tVersion string\n\tPath    string\n\tSource  Source\n}\n```\n\n```go\ntype UpgradeResult struct {\n\tItems []UpgradeItem\n}\n```\n\n","path":"github.com/volcengine/volcengine-cli/internal/proxycli","name":"proxycli","synopsis":"","isRedistributable":true}
