Skip to content

feat: hostless package discovery — list-available-packages, list-package-components, fix version encoding#163

Merged
field123 merged 3 commits into
masterfrom
feat/hostless-package-discovery
Mar 5, 2026
Merged

feat: hostless package discovery — list-available-packages, list-package-components, fix version encoding#163
field123 merged 3 commits into
masterfrom
feat/hostless-package-discovery

Conversation

@field123
Copy link
Copy Markdown
Collaborator

@field123 field123 commented Mar 5, 2026

Summary

  • Fix gap 22 (add-package / upgrade-package HTTP 500): api-client.ts was sending ?version=latest as a raw string; the WAB server does JSON.parse(req.query.version) which throws SyntaxError. Fix: omit the version query param entirely when requesting latest (server defaults correctly), and JSON-stringify + URI-encode when a specific version is needed.
  • New action project.list-available-packages: Calls GET /api/v1/app-config, extracts hostLessComponents, and returns the full installable package catalog (same source as Studio's Insert Panel) with isInstalled flags cross-referenced against current project dependencies. Filters hidden packages by default.
  • New action project.list-package-components (gap 23): Lists components provided by installed hostless packages, cross-referencing ProjectDependency site data with HostLessComponentInfo metadata. Supports optional packageName filter.

Test plan

  • npm test passes with zero failures
  • project.add-package no longer returns HTTP 500 on EP server
  • project.list-available-packages returns package catalog with correct isInstalled flags
  • project.list-package-components returns components from installed packages
  • project.list-available-packagesproject.add-package round-trip works end to end

field123 added 3 commits March 5, 2026 11:39
…age-components, fix version encoding

- Fix add-package/upgrade-package crash (gap #22): omit version query param
  when requesting latest; JSON-stringify specific versions before URI-encoding
- Add project.list-available-packages action: browse installable hostless
  package catalog from /api/v1/app-config with isInstalled cross-reference
- Add project.list-package-components action: list components from installed
  hostless packages with optional packageName filter
- Add getAppConfig() API client method, AvailablePackage/PackageComponent types
- Update tests: version encoding, getAppConfig, listAvailablePackages,
  listPackageComponents (1,629 tests pass)
@field123 field123 force-pushed the feat/hostless-package-discovery branch from e9e75fc to f85a396 Compare March 5, 2026 11:50
@field123 field123 merged commit 9da6765 into master Mar 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant