mass-sdk

module
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2026 License: Apache-2.0

README

mass-sdk

CI Go Reference

Go helpers shared across MASS-ecosystem apps (MASS, Grimoire, runtime gateways): GUI machinery, terminal UI, installers, and pure-Go utilities.

Packages

  • connstore/ — per-MASS-endpoint connection storage (token + optional custom CA) in a JSON file at os.UserConfigDir()/mass/auth.json.
  • format/ — small, allocation-free string formatters; no UI/HTML dependencies.
  • fsutil/ — small filesystem helpers (e.g. atomic file writes).
  • gatewayhttp/ — tunnels a runtime gateway's HandleRequest gRPC stream into a normal http.Handler, trailers preserved.
  • ggufutil/ — pure-Go helpers for GGUF model filenames.
  • gui/ — shared HTTP machinery for app GUIs: the MASS connection settings control, validated against the gateway and persisted via connstore.
  • hfui/ — HuggingFace model-search widget: result rows, variant-picker overlay, download buttons + progress JS.
  • huggingface/ — HuggingFace Hub API client: model search, file listing, pagination, optional caching.
  • install/ — OS-aware install/uninstall of a desktop GUI app: staging, launchers, install record; parameterized over an AppSpec.
  • manifest/ — reads a runtime gateway's runtime.yml (name, version, display name, description).
  • masstls/ — client TLS configuration for talking to a MASS gateway, including a private or self-signed CA.
  • modelui/ — llama model-config form rendering and Datastar signal decoding; builds on uikit.
  • selfextract/ — self-extracting installer format (MWPLOAD1) shared by the packer and the setup binary.
  • term/ — dependency-free terminal styling; ANSI only on a real TTY, honors NO_COLOR.
  • tray/ — system-tray icon facade over fyne.io/systray with per-OS threading handled inside.
  • tui/ — arrow-key navigable terminal UI engine: raw-mode input, generic forms, two-button modals; styled via term.
  • uikit/ — reusable HTML-generating helpers for MASS module UIs (layout, theme, widgets).
  • webview/ — cross-platform native webview window for app standalone UIs (CGO on Linux/macOS).

Module path

import (
    "github.com/chinese-room-solutions/mass-sdk/connstore"
    "github.com/chinese-room-solutions/mass-sdk/gui"
    "github.com/chinese-room-solutions/mass-sdk/uikit"
    "github.com/chinese-room-solutions/mass-sdk/webview"
)

License

Apache-2.0

Directories

Path Synopsis
cmd
registry-validate command
Command registry-validate checks a MASS or Grimoire package index (index.yml) against the schema the SDK's registry client expects: schema version, unique package names, semver versions in ascending order, parseable compat ranges, and artifacts carrying a url and a real-or-placeholder sha256.
Command registry-validate checks a MASS or Grimoire package index (index.yml) against the schema the SDK's registry client expects: schema version, unique package names, semver versions in ascending order, parseable compat ranges, and artifacts carrying a url and a real-or-placeholder sha256.
Package connstore provides per-MASS-endpoint connection storage for app GUIs.
Package connstore provides per-MASS-endpoint connection storage for app GUIs.
Package format provides small, allocation-free string formatters for the MASS ecosystem.
Package format provides small, allocation-free string formatters for the MASS ecosystem.
Package fsutil holds small filesystem helpers shared across MASS apps.
Package fsutil holds small filesystem helpers shared across MASS apps.
Package gatewayhttp tunnels a runtime gateway's gatewaypb.RuntimeGateway_HandleRequestServer stream into a normal http.Handler and streams the response back.
Package gatewayhttp tunnels a runtime gateway's gatewaypb.RuntimeGateway_HandleRequestServer stream into a normal http.Handler and streams the response back.
Package ggufutil provides pure-Go helpers for working with GGUF model filenames.
Package ggufutil provides pure-Go helpers for working with GGUF model filenames.
Package gui provides shared HTTP machinery for app GUIs: the MASS connection settings control (endpoint/token/custom CA) that validates against the gateway and persists per endpoint via the connstore package.
Package gui provides shared HTTP machinery for app GUIs: the MASS connection settings control (endpoint/token/custom CA) that validates against the gateway and persists per endpoint via the connstore package.
Package hfui renders the HuggingFace model-search widget: result rows with a variant-picker overlay, download buttons wired to the MASS DownloadModel endpoint, and the JS runtime that drives download progress.
Package hfui renders the HuggingFace model-search widget: result rows with a variant-picker overlay, download buttons wired to the MASS DownloadModel endpoint, and the JS runtime that drives download progress.
Package huggingface provides a client for the HuggingFace Hub API with model search, file listing, pagination, and optional caching.
Package huggingface provides a client for the HuggingFace Hub API with model search, file listing, pagination, and optional caching.
Package install is the OS-aware mechanism for installing a desktop GUI app (MASS, Grimoire) from a terminal setup flow: staging the binary + its sibling assets into a per-OS install directory, recording where it went, creating launchers (Start Menu / .desktop / app placement), and uninstalling — all of it parameterized over an AppSpec so nothing app-specific lives in the package.
Package install is the OS-aware mechanism for installing a desktop GUI app (MASS, Grimoire) from a terminal setup flow: staging the binary + its sibling assets into a per-OS install directory, recording where it went, creating launchers (Start Menu / .desktop / app placement), and uninstalling — all of it parameterized over an AppSpec so nothing app-specific lives in the package.
Package manifest reads a runtime gateway's runtime.yml — the single source of truth for its name, version, display name, and description.
Package manifest reads a runtime gateway's runtime.yml — the single source of truth for its name, version, display name, and description.
Package masstls builds client TLS configuration for talking to a MASS gateway over HTTPS, including support for a private or self-signed CA.
Package masstls builds client TLS configuration for talking to a MASS gateway over HTTPS, including support for a private or self-signed CA.
Package modelui renders the llama model-config form and decodes its Datastar signals: RenderModelConfigForm binds the Signal* constants, MergeSignalsIntoConfig reads the same names back into a ModelConfigData.
Package modelui renders the llama model-config form and decodes its Datastar signals: RenderModelConfigForm binds the Signal* constants, MergeSignalsIntoConfig reads the same names back into a ModelConfigData.
Package proclife ties a process's lifetime to the one that started it.
Package proclife ties a process's lifetime to the one that started it.
Package registry is a client for the MASS package index (mass-registry): fetching the index with conditional caching, resolving the newest compatible version+artifact for a platform, and downloading artifacts with sha256 verification.
Package registry is a client for the MASS package index (mass-registry): fetching the index with conditional caching, resolving the newest compatible version+artifact for a platform, and downloading artifacts with sha256 verification.
Package selfextract is the self-extracting installer format shared by the packer (build time) and the setup binary (install time).
Package selfextract is the self-extracting installer format shared by the packer (build time) and the setup binary (install time).
Package selfupdate lets an installed MASS app find, fetch, and install a newer release of itself from GitHub.
Package selfupdate lets an installed MASS app find, fetch, and install a newer release of itself from GitHub.
Package term is a dependency-free terminal styling layer for interactive console UIs — the one place an app talks to a human at a console rather than a log.
Package term is a dependency-free terminal styling layer for interactive console UIs — the one place an app talks to a human at a console rather than a log.
Package tray adds a system-tray (status-notifier) icon to a MASS app GUI so the window can fold away to the tray instead of staying on the taskbar.
Package tray adds a system-tray (status-notifier) icon to a MASS app GUI so the window can fold away to the tray instead of staying on the taskbar.
Package tui is a dependency-free, arrow-key navigable terminal UI engine for interactive console flows — the raw-mode input layer plus a generic single- screen form and two-button modals, styled via mass-sdk/term.
Package tui is a dependency-free, arrow-key navigable terminal UI engine for interactive console flows — the raw-mode input layer plus a generic single- screen form and two-button modals, styled via mass-sdk/term.
Package uikit provides reusable HTML-generating helpers for MASS module UIs.
Package uikit provides reusable HTML-generating helpers for MASS module UIs.
Package webview provides a simple cross-platform webview window for MASS app standalone UIs.
Package webview provides a simple cross-platform webview window for MASS app standalone UIs.
internal/webview
Package webview is github.com/webview/webview_go at v0.0.0-20240831120633-6173450d4dd6 (MIT, see LICENSE + LICENSE.webview), vendored for one reason: upstream hardcodes `#cgo pkg-config: webkit2gtk-4.0`, and current distros (Fedora 41+, and Debian/Ubuntu are following) ship only webkit2gtk-4.1 — the GUI build fails at pkg-config before compiling a line.
Package webview is github.com/webview/webview_go at v0.0.0-20240831120633-6173450d4dd6 (MIT, see LICENSE + LICENSE.webview), vendored for one reason: upstream hardcodes `#cgo pkg-config: webkit2gtk-4.0`, and current distros (Fedora 41+, and Debian/Ubuntu are following) ship only webkit2gtk-4.1 — the GUI build fails at pkg-config before compiling a line.

Jump to

Keyboard shortcuts

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