HTTP scatter.
Design model
Platform spec article
Design model
Spec standingStandard
-
pckgClient boundary
Context
Decision
HTTP via pckgClient.ts only.
Consequences
Shared auth.
Verification anchors
Grep fetch in packages/.
-
CLI for lock
Context
Lock integrity.
Decision
Use beskid fetch/lock via CLI.
Consequences
Shared resolver.
Verification anchors
Panel CLI invocations.
- Contracts and edge cases pckgClient HTTP rules, authentication, caching, and package command contracts.
- Decisions record (legacy index) Migration index for package manager panel ADRs.
- Design model PackageTreeItem sections, pckgClient surface, cache keys, and Packages view chrome.
- Examples Corelib locked dependencies and registry search in the Packages view.
- Flow and algorithm Package search, details expansion, fetch/lock, and focus-driven refresh sequences.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Purpose and scope
Section titled “Purpose and scope”Tree structure for beskidPackagesView, the pckgClient TypeScript contract, and status-bar activity phases shared with LSP and CLI.
View layout
Section titled “View layout”The Packages view lives in container beskidViews alongside Workspaces, Project, and Outline (see extension surface design model).
flowchart TB subgraph packagesView [beskidPackagesView] TP[ThisProject section] RS[RegistrySearch section] TP --> D1[Declared/Locked dependency rows] RS --> Q[Search results] Q --> V[Version nodes] V --> Dep[Dependency leaves] endRoot sections must always be visible (not hidden behind empty search).
PackageTreeItem kinds
Section titled “PackageTreeItem kinds”section | kind | Children |
|---|---|---|
ThisProject | section | Dependency rows from LSP |
ThisProject | dependency | Optional context actions only |
RegistrySearch | section | Search prompt or results |
RegistrySearch | searchResult | Package summary node |
RegistrySearch | version | Collapsible version metadata |
RegistrySearch | registryDependency | Dependency of selected version |
Icons: dependency package; unresolved warning; registry package cloud-download.
pckgClient functions (normative)
Section titled “pckgClient functions (normative)”| Function | HTTP | Cache key |
|---|---|---|
searchPackages({ q, limit, registryBaseUrl }) | GET {base}/api/search?q=…&limit=… | search:{base}:{q}:{limit} ~30s TTL |
getPackageDetails({ name, registryBaseUrl }) | GET {base}/api/packages/{name} | details:{base}:{name} |
buildRegistryPackageUrl({ name, version, registryBaseUrl }) | — | N/A (string builder) |
createPckgFetch(context) | — | Injects auth from SecretStorage |
All functions must use createPckgFetch for transport.
Response typing (camelCase)
Section titled “Response typing (camelCase)”Align TypeScript types with pckg records:
PackageSearchResponse:{ package, reviewCount, health }PackageDetailsResponse:{ package, versions, dependencies, dependentsCount, readme, health, … }PackageDependencyResponse:{ name, version, source, registry }
Registry base URL resolution
Section titled “Registry base URL resolution”- If focused project belongs to a workspace, use
registriesentry withalias: "default"frombeskid.getWorkspaceSummary. - Else
vscode.workspace.getConfiguration('beskid.pckg').get('baseUrl'). - Else
http://localhost:5000.
Status-bar phases
Section titled “Status-bar phases”Extend shared PckgActivityPhase (and CLI phases) with:
| Phase | When |
|---|---|
search | Registry search in flight |
details | Package details fetch |
fetch | beskid fetch running |
lock | beskid lock running |
LSP scan phases remain separate on the same status controller.
View title and welcome actions
Section titled “View title and welcome actions”| Action | Command |
|---|---|
| Search | beskid.packages.search |
| Refresh | beskid.packages.refresh |
| Fetch | beskid.packages.fetch |
| Lock | beskid.packages.lock |
View welcome content should offer “Search registry…” when RegistrySearch is empty.
Related topics
Section titled “Related topics”- Contracts — auth and endpoint tables
- pckg client contract