Skip to content

Adopt the reworked bundle catalog API in the web SDK and CLI - #4821

Merged
gabrielbeamable merged 2 commits into
mainfrom
feature/bundle-dependencies-redesign
Sep 7, 2026
Merged

Adopt the reworked bundle catalog API in the web SDK and CLI#4821
gabrielbeamable merged 2 commits into
mainfrom
feature/bundle-dependencies-redesign

Conversation

@dpatekar

@dpatekar dpatekar commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Brief Description

BeamableApi changed the bundle catalog contract: visibility now belongs to a bundle's name rather than to each
published checksum, the publish history became a paged release log, and dependencies carry a version range. This branch brings the two consumers in this repo up to that contract.

The web SDK is regenerated against dev, taken whole as previous regens were. Two bundle functions are renamed as a result: beamoGetBundlesHistory is now beamoGetBundlesReleases, and beamoPutBundlesChecksumsAcl is now beamoPutBundlesAcl. The regen also needed a small fix to the generator, which split path segments on / and - only and produced an invalid type name for a route ending in .gif.

The CLI's generated client is updated for the bundle types only, and the commands follow: bundles history becomes bundles releases, bundles acl takes a name instead of a checksum, and bundles list shows per-name summaries. The authored bundle file renames peerDependencies to bundleDependencies with a {min, max} range per entry.

Nothing here is shipped yet, so there is no compatibility layer. The renamed routes were verified against dev.

Checklist

  • Have you added appropriate text to the CHANGELOG.md files?

Also fixes the codegen identifier sanitizer, which split path segments on `/` and `-` only. The new `/api/message-rail/open/{token}.gif` route produced  ApiMessageRailOpen.gif...`, so the generated SDK did not compile.
Copilot AI lite review requested due to automatic review settings September 2, 2026 13:36
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Web SDK Sample Build link

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new BundleReleasesCommand currently uses a long? cursor where the generated API expects Optional<long>, and bundle dependency range parsing silently defaults missing min values to 0 instead of validating inputs.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates this repo’s two bundle-catalog consumers (web SDK + CLI) to match the backend’s reworked bundle contract (name-scoped visibility, paged release log, and version-range dependencies), including a small Swagger generator fix to handle routes ending in extensions like .gif.

Changes:

  • Regenerated the web SDK client/models and adopted the renamed bundle endpoints (*History*Releases, *ChecksumsAcl*Acl) plus new/updated schemas.
  • Updated the CLI bundle workflow to be release-log driven (bundles releases), name-scoped ACL, and version-range bundleDependencies in authored bundle configs.
  • Fixed the CLI Swagger generator’s method-name formatting to split on non-word characters (so .gif routes generate valid identifiers).
File summaries
File Description
web/src/generated/schemas/SendMailRequest.ts Regenerated schema: adds metadata field (ordering change).
web/src/generated/schemas/SendMailObjectRequest.ts Regenerated schema: adds metadata field (ordering change).
web/src/generated/schemas/SegmentAttribute.ts Regenerated schema: adds new attribute metadata fields.
web/src/generated/schemas/RuleLeaf.ts Regenerated schema: adds ns field.
web/src/generated/schemas/ReportRailFunnelStageRequest.ts New generated request schema for message-rail funnel stage reporting.
web/src/generated/schemas/PublishBundleResponse.ts Bundle publish response now includes version.
web/src/generated/schemas/PublishBundleRequest.ts Renames peerDependenciesbundleDependencies with BundleDepRange.
web/src/generated/schemas/ProtoError.ts New generated error schema type.
web/src/generated/schemas/OtelView.ts Updates Otel view identity fields (accountId, id shape).
web/src/generated/schemas/Message.ts Regenerated schema: adds metadata field (ordering change).
web/src/generated/schemas/ListBundlesResponse.ts Bundle list response now returns BundleSummary[].
web/src/generated/schemas/ListBundleReleasesResponse.ts New generated response for paged bundle release log + tags.
web/src/generated/schemas/index.ts Exports added/removed to align with regenerated schema set.
web/src/generated/schemas/GoalPredicateDto.ts Adds property bounds filtering fields and enum dependency.
web/src/generated/schemas/GetBundleResponse.ts Bundle tags become a tag→checksum map; adds version.
web/src/generated/schemas/enums/PropertyBoundsMode.ts New generated enum.
web/src/generated/schemas/enums/BeamoV2FederationType.ts Adds IFederatedMessageRail enum member.
web/src/generated/schemas/enums/AuthorKind.ts New generated enum for audit authors.
web/src/generated/schemas/ClientAnalyticsEvent.ts Adds c field to analytics event schema.
web/src/generated/schemas/CampaignSummaryDtoCampaignPageDto.ts Fixes generated type name for campaigns list paging shape.
web/src/generated/schemas/CampaignSummaryDto.ts Adds audit fields (createdAt/by, publishedAt/by).
web/src/generated/schemas/CampaignGraphDto.ts Adds audit field linkage.
web/src/generated/schemas/CampaignAuditDto.ts New generated audit DTO.
web/src/generated/schemas/BundleSummaryTag.ts New generated tag entry used by bundle summaries.
web/src/generated/schemas/BundleSummary.ts New generated per-name bundle summary type.
web/src/generated/schemas/BundleRelease.ts Repurposes old tag type into a release-log entry (version + publishedAt).
web/src/generated/schemas/BundleDepRange.ts New generated dependency range type.
web/src/generated/schemas/BundleDep.ts New generated dependency entry type.
web/src/generated/schemas/Bundle.ts Updates bundle model to include bundleDependencies array; removes old fields.
web/src/generated/schemas/AuthorDto.ts New generated author DTO.
web/src/generated/schemas/ApiMessageRailOpenGifGetMessageRailResponse.ts Fixes invalid generated export name for .gif route response type.
web/src/generated/schemas/ApiBeamoBundlesAclPutBeamoBundleResponse.ts Fixes invalid generated export name for renamed ACL endpoint response type.
web/src/generated/schemas/AnalyticsSchemaResponse.ts New generated analytics schema response type.
web/src/generated/schemas/AnalyticsSchemaProperty.ts New generated analytics schema property type.
web/src/generated/schemas/AnalyticsSchemaListResponse.ts Fixes invalid generated export name; adds events.
web/src/generated/schemas/AnalyticsObservedEventsResponse.ts New generated observed-events response type.
web/src/generated/schemas/AnalyticsObservedEvent.ts New generated observed-event entry type.
web/src/generated/apis/SegmentsApi.ts Updates segments attributes endpoint signature to include new query filters.
web/src/generated/apis/MessageRailApi.ts Adds .gif open-token endpoint wiring and constants usage.
web/src/generated/apis/constants.ts Adds placeholders (event, token, etc.) and reorders constants.
web/src/generated/apis/CampaignApi.ts Updates campaigns list endpoint to take filters and return a paged DTO.
web/src/generated/apis/BeamoOtelApi.ts Renames query param from playerIdaccountId.
web/src/generated/apis/BeamoBundleApi.ts Adopts bundle API rename (historyreleases, checksum ACL→name ACL) and new response types.
web/src/generated/apis/AnalyticsApi.ts Adds new analytics read endpoints (events + schemas).
web/CHANGELOG.md Documents the bundle API contract changes in the web SDK.
cli/cli/Services/SwaggerService.cs Generator fix: method-name splitting uses Regex.Split(..., \\W) to handle extensions like .gif.
cli/cli/Services/Bundles/BundleWorkspace.cs Authored bundle config model now uses bundleDependencies with {min,max} ranges.
cli/cli/Docs/SkillTemplates/beam-bundles.md.scriban Updates CLI docs to reflect releases, name-scoped ACL, and dependency ranges.
cli/cli/Commands/BundleCommands/PublishBundleCommand.cs Sends bundleDependencies ranges, logs publish version, and uses name-scoped ACL endpoint.
cli/cli/Commands/BundleCommands/NewBundleCommand.cs New bundle template now writes bundleDependencies instead of peerDependencies.
cli/cli/Commands/BundleCommands/ListBundlesCommand.cs Lists published bundles as per-name summaries and renders updated columns.
cli/cli/Commands/BundleCommands/GetBundleCommand.cs Surfaces bundle version in command output.
cli/cli/Commands/BundleCommands/BundleTagInfoExtensions.cs Maps tags from both tag→checksum maps and summary tag arrays into CLI contract.
cli/cli/Commands/BundleCommands/BundleSummaryInfo.cs New CLI projection type for per-name published bundle summaries.
cli/cli/Commands/BundleCommands/BundleReleasesCommand.cs New bundles releases command that walks the paged release log.
cli/cli/Commands/BundleCommands/BundleReleaseInfo.cs New CLI projection type for one release-log entry.
cli/cli/Commands/BundleCommands/BundleInfo.cs Updates bundle projection to store dependency ranges and removes ACL field.
cli/cli/Commands/BundleCommands/BundleHistoryCommand.cs Removes the old bundles history command.
cli/cli/Commands/BundleCommands/BundleAclCommand.cs Updates ACL command to require a bundle name (no tag/checksum) and calls new endpoint.
cli/cli/App.cs Wires the bundles releases command instead of bundles history.
cli/beamable.common/Runtime/OpenApi/Models.gs.cs Regenerates shared OpenAPI models for bundles (summaries, releases, ranges, tags map).
cli/beamable.common/Runtime/OpenApi/BeamBeamobundle.gs.cs Regenerates bundle API client interface and endpoints (releases, name ACL).
cli/beamable.common/Runtime/BeamCli/Contracts/BundlesService/BundleTagInfo.cs Updates bundle tag contract to match tag→checksum map shape.
Review details

Files not reviewed (39)

  • web/src/generated/apis/AnalyticsApi.ts: Generated file
  • web/src/generated/apis/BeamoBundleApi.ts: Generated file
  • web/src/generated/apis/BeamoOtelApi.ts: Generated file
  • web/src/generated/apis/CampaignApi.ts: Generated file
  • web/src/generated/apis/MessageRailApi.ts: Generated file
  • web/src/generated/apis/SegmentsApi.ts: Generated file
  • web/src/generated/apis/constants.ts: Generated file
  • web/src/generated/schemas/AnalyticsObservedEvent.ts: Generated file
  • web/src/generated/schemas/AnalyticsObservedEventsResponse.ts: Generated file
  • web/src/generated/schemas/AnalyticsSchemaProperty.ts: Generated file
  • web/src/generated/schemas/AnalyticsSchemaResponse.ts: Generated file
  • web/src/generated/schemas/AuthorDto.ts: Generated file
  • web/src/generated/schemas/Bundle.ts: Generated file
  • web/src/generated/schemas/BundleDep.ts: Generated file
  • web/src/generated/schemas/BundleDepRange.ts: Generated file
  • web/src/generated/schemas/BundleSummary.ts: Generated file
  • web/src/generated/schemas/BundleSummaryTag.ts: Generated file
  • web/src/generated/schemas/CampaignAuditDto.ts: Generated file
  • web/src/generated/schemas/CampaignGraphDto.ts: Generated file
  • web/src/generated/schemas/CampaignSummaryDto.ts: Generated file
  • web/src/generated/schemas/ClientAnalyticsEvent.ts: Generated file
  • web/src/generated/schemas/GetBundleResponse.ts: Generated file
  • web/src/generated/schemas/GoalPredicateDto.ts: Generated file
  • web/src/generated/schemas/ListBundleReleasesResponse.ts: Generated file
  • web/src/generated/schemas/ListBundlesResponse.ts: Generated file
  • web/src/generated/schemas/Message.ts: Generated file
  • web/src/generated/schemas/OtelView.ts: Generated file
  • web/src/generated/schemas/ProtoError.ts: Generated file
  • web/src/generated/schemas/PublishBundleRequest.ts: Generated file
  • web/src/generated/schemas/PublishBundleResponse.ts: Generated file
  • web/src/generated/schemas/ReportRailFunnelStageRequest.ts: Generated file
  • web/src/generated/schemas/RuleLeaf.ts: Generated file
  • web/src/generated/schemas/SegmentAttribute.ts: Generated file
  • web/src/generated/schemas/SendMailObjectRequest.ts: Generated file
  • web/src/generated/schemas/SendMailRequest.ts: Generated file
  • web/src/generated/schemas/enums/AuthorKind.ts: Generated file
  • web/src/generated/schemas/enums/BeamoV2FederationType.ts: Generated file
  • web/src/generated/schemas/enums/PropertyBoundsMode.ts: Generated file
  • web/src/generated/schemas/index.ts: Generated file
  • Files reviewed: 24/63 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


var releases = new List<BundleReleaseInfo>();
var tags = Array.Empty<BundleTagInfo>();
long? fromVersion = null;
Comment on lines +110 to +114
var range = kvp.Value as JObject;
config.bundleDependencies[kvp.Key] = new BundleDependencyConfig
{
type = (kvp.Value as JObject)?.Value<string>("type")
min = range?.Value<long?>("min") ?? 0,
max = range?.Value<long?>("max")
Comment on lines +42 to 48
var (explicitNs, name, selector) = BundleRef.Split(args.bundleName);
if (!string.IsNullOrEmpty(selector))
throw new CliException($"Reference=[{args.bundleName}] must be a bundle name without a tag or checksum: an ACL applies to every version published under the name.");

var ns = await BundleNamespace.Resolve(args, explicitNs);
var scope = BundleAclScope.Resolve(args.scope, args.AppContext);

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Lightbeam link

@gabrielbeamable gabrielbeamable left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, just a few questions:

I see you already generated the web sdk open api files, is there a RC release for this? while we don't do a definitive release of the web sdk, we've been releasing some RCs so to use these changes in Console and portal extensions

These API changes in the web sdk might break things in the Console, specifically the bundles view page, for history etc, is there something on the mends for this? If not, that is ok, I think it shouldn't block this PR and I can take on that work

@gabrielbeamable
gabrielbeamable merged commit b6b83ce into main Sep 7, 2026
32 of 33 checks passed
@gabrielbeamable
gabrielbeamable deleted the feature/bundle-dependencies-redesign branch September 7, 2026 18:08
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.

3 participants