NousResearch/hermes-agent · error

Expected a Marketplace id like "publisher.extension".

Error message

Expected a Marketplace id like "publisher.extension".

What it means

Thrown by installVscodeThemeFromMarketplace when the supplied id does not match MARKETPLACE_ID_RE — the expected 'publisher.extension' dotted form. The id is trimmed then validated before any download, so malformed input (bare name, URL, spaces, wrong casing pattern) is rejected up front.

Source

Thrown at apps/desktop/src/themes/install.ts:80

    name: vscodeThemeSlug(result.displayName),
    label: result.displayName,
    description: `VS Code · ${result.extensionId}`,
    colors: light.palette,
    darkColors: dark.palette,
    ...(terminal ? { terminal } : {}),
    ...(darkTerminal ? { darkTerminal } : {})
  }
}

/**
 * Download a Marketplace extension and install the theme family it contributes
 * (see `buildThemeFromMarketplace`). Returns the single installed theme.
 */
export async function installVscodeThemeFromMarketplace(id: string): Promise<DesktopTheme> {
  const trimmed = id.trim()

  if (!MARKETPLACE_ID_RE.test(trimmed)) {
    throw new Error('Expected a Marketplace id like "publisher.extension".')
  }

  const api = window.hermesDesktop?.themes

  if (!api?.fetchMarketplace) {
    throw new Error('Marketplace install is only available in the desktop app.')
  }

  const result = await api.fetchMarketplace(trimmed)

  return installUserTheme(buildThemeFromMarketplace(result))
}

View on GitHub (pinned to c896c09c42)

Solutions

  1. Use the exact identifier from the Marketplace page's 'More Info -> Identifier' field, e.g. 'dracula-theme.theme-dracula'.
  2. If you have a URL, extract the itemName query parameter's value instead of passing the whole URL.
  3. Pre-validate input against the same pattern (/^[\w.-]+\.[\w.-]+$/) before calling.

Example fix

// before
installVscodeThemeFromMarketplace('Dracula Official')

// after
installVscodeThemeFromMarketplace('dracula-theme.theme-dracula')
Defensive patterns

Strategy: validation

Validate before calling

const MARKETPLACE_ID_RE = /^[\w.-]+\.[\w.-]+$/ // mirror install.ts

function extractMarketplaceId(input: string): string | null {
  const fromUrl = input.match(/[?&]itemName=([\w.-]+\.[\w.-]+)/)
  const id = (fromUrl?.[1] ?? input).trim()
  return MARKETPLACE_ID_RE.test(id) ? id : null
}

Type guard

function isMarketplaceId(id: string): boolean {
  return /^[\w.-]+\.[\w.-]+$/.test(id.trim())
}

Prevention

When it happens

Trigger: Calling installVscodeThemeFromMarketplace('dracula'), with a full marketplace URL like 'https://marketplace.visualstudio.com/items?itemName=...', or with extra characters that fail the regex.

Common situations: Users pasting the Marketplace page URL instead of the extension id, or typing only the extension half of the id and dropping the publisher prefix.

Related errors


AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14). Data as JSON: /api/errors/29f838d1d7c8c787. Report an issue: GitHub.