Skip to content

[Gap]: signed ui extension bundle locks the runtime-extension entry, not the presentation primitives (renderDocument etc.) #522

Closed

Description

@jimhoyd

What you were trying to do

urlcode-ai (github.com/jimhoyd-com/urlcode-ai, a project built on @jimhoyd/urlcode) has a homepage (functions/home.mjs) rendered by a trusted function, using only @jimhoyd/urlcode-ui's presentation primitives — renderDocument, escapeHtml, table, and friends from the package's root . export (packages/ui/src/index.ts). It doesn't use auth/admin, doesn't need CRUD screens, and doesn't want the full ui runtime extension (a host file, extensions.ui config block, /assets/ui/* route mount) — just the shared shadcn-token stylesheet and document/partial helpers so the homepage looks consistent with the rest of the ecosystem, from a plain trusted function.

Today this is done via a direct npm dependency: "@jimhoyd/urlcode-ui": "^0.5.0" in package.json, imported directly in functions/home.mjs. That works, but @jimhoyd/[email protected] carries an npm deprecation notice ("Retired: use signed GitHub extension bundles"), and llms-full.txt/llms.txt guidance says not to add deprecated extension npm packages to a new project.

Where it broke down

Tried to migrate to the signed bundle mechanism instead ([email protected], loadExtensionBundle from @jimhoyd/urlcode/extension-bundles), expecting to get the same primitives. It doesn't work:

  • scripts/prepare-extension-bundles.ts's entryFor('ui') locks the ui bundle to packages/ui/dist/host/index.js (packages/ui/src/host/index.ts), which exports only createUiExtension, uiAuthoring, uiConfigSchema, loadProjectUi, scaffold, and CSRF helpers — the RuntimeExtension host-activation surface.
  • renderDocument, createPresentation, escapeHtml, table, and the rest of the presentation primitives live only in the package's root . export (packages/ui/src/index.ts), which the bundle catalog does not lock or expose at all.

So the only supported non-deprecated distribution channel for this package (the signed bundle) cannot deliver what a project like urlcode-ai actually needs (primitives only, no runtime extension). The only way to get renderDocument etc. today is the deprecated npm path, or building @jimhoyd/urlcode-ui from source and vendoring/packing it yourself.

Code or YAML you had to write by hand

Nothing new written — kept the existing deprecated-but-functional npm dependency ("@jimhoyd/urlcode-ui": "^0.5.0" + import {...} from '@jimhoyd/urlcode-ui'), since the alternative (bundle) genuinely can't express this use case, not because the deprecated path was easier.

What you could not verify

Didn't check whether a separate bundle entry (e.g. a ui-presentation-named bundle, or a second export path inside the existing ui bundle catalog entry) was ever considered and rejected on purpose versus just not built yet. Also didn't check whether other in-repo consumers (auth/admin) that use packages/ui's primitives do so via a workspace-internal path that wouldn't hit this gap (i.e. whether this is specific to an external project like urlcode-ai consuming the primitives standalone).

Activity

  1. added
    ai-first
    on Sep 23, 2026
  2. jimhoyd commented on Sep 23, 2026

    @jimhoyd
    CollaboratorAuthor

    this is for all extensions

  3. added
    needs-decision
    on Sep 23, 2026
  4. jimhoyd commented on Sep 24, 2026

    @jimhoyd
    CollaboratorAuthor

    Triage decision: establish a general extension-bundle rule. An extension may publish a separately named, signed public entry for safe project-consumption primitives; it is versioned and integrity-locked independently from the host-activation entry. Do not expose extension internals or make the full package surface implicitly public. Apply the pattern across extensions where a supported primitive surface exists. Leave open for bundle/catalog/API design and remove needs-decision.

  5. removed
    needs-decision
    on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-first

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions