fetch

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package fetch downloads a stackql MCP release bundle, verifies it against the published sha256 pin, and extracts the server binary. It backs the cmd/stackql-mcp-fetch go generate tool and the integration tests.

Index

Constants

View Source
const ReleaseURLBase = "https://github.com/stackql/stackql/releases/download"

ReleaseURLBase is the asset download root. Bundles are published as assets of the matching stackql/stackql release.

Variables

This section is empty.

Functions

func BundlePin

func BundlePin(client *http.Client, version, platformKey string) (string, error)

BundlePin resolves the published sha256 pin for a bundle. Order: the in-module pin table (for embed.DefaultVersion), the consolidated platforms.json release asset if present, then the per-bundle .sha256 asset.

func ExtractBinary

func ExtractBinary(bundle []byte, version, platformKey string) (*embed.Binary, error)

ExtractBinary pulls the server binary out of verified .mcpb bundle bytes.

Types

type Result

type Result struct {
	Binary    embed.Binary
	BundleSHA string // the published pin the bundle was verified against
}

Result is a verified, extracted server binary.

func Bundle

func Bundle(client *http.Client, version, platformKey string) (*Result, error)

Bundle downloads the .mcpb bundle for version/platformKey, verifies it against the published pin, and extracts the server binary named by the bundle manifest's entry_point.

Jump to

Keyboard shortcuts

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