Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Design model

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

beskid_pckg is the single HTTP client for the pckg registry service. The CLI exposes it as beskid pckg <subcommand>; analysis-time fetch uses the same PckgClient types. Server behavior for published artifacts is implemented in pckg/src/Server/ (validation, docs ingestion, workspace bundles).

flowchart LR
  CLI[beskid pckg CLI]
  Client[PckgClient]
  CFG[PckgClientConfig]
  HTTP[reqwest]
  SVC[pckg Server API]
  CLI --> Client
  CFG --> Client
  Client --> HTTP --> SVC
PieceRole
PckgClientConfigbase_url, timeout, user_agent, auth (BearerToken or PublisherApiKey)
PckgClientJSON and multipart request builders with unified PckgError mapping
pack moduleWalk tree → zip .bpk, inject README.md, build package.json (PackProfile)
Repository config.beskid/pckg/repositories.json maps registry aliases to API keys

Authenticated routes must receive either:

  • BESKID_PCKG_TOKEN / --bearer-token, or
  • BESKID_PCKG_API_KEY / --api-key (header name from config, used for publisher keys)

Missing auth on require_auth endpoints returns PckgError::MissingAuthToken without contacting the network.

ProfileDetectionpackage.json
LibraryDefault or non-Template Project.projIncludes docs paths, api.json when present under .beskid/docs/
Templateproject.type = TemplatepackageKind: template + summary from .beskid/template.json

Readme resolution uses discover_readme_for_package_root from beskid_analysis (optional readme key or default readme.md).

Concernpckg path
Publish validationpckg/src/Server/Services/PackageArtifactValidator.cs
Docs + api.jsonpckg/src/Server/Services/PackagePublishDocumentation.cs
Workspace bundlespckg/src/Server/Services/Workspace/WorkspacePublishService.cs
Dashboard listingpckg/src/Server/Components/Pages/Dashboard/Packages.razor.cs
  • compiler/crates/beskid_pckg/src/lib.rs, client.rs, cli.rs, pack.rs
  • Models: compiler/crates/beskid_pckg/src/models.rs, packages.rs