Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/feat-configurable-marketplace-name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"server": minor
"dashboard": minor
---

Make the generated marketplace name configurable per-project. Adds `plugins.getMarketplaceSettings` and `plugins.updateMarketplaceSettings` on the management API plus a Marketplace settings dialog in the Plugins tab. The default is now `<org-slug>-speakeasy` (previously `<org-slug>-gram`); the org-slug prefix keeps defaults unique across customers so end users installing from two Gram marketplaces don't collide. Saving an override on a project that already has a published marketplace auto-republishes the new manifest to GitHub. References to "Gram" in the generated README, plugin descriptions, and hook scripts are rebranded to "Speakeasy"; URLs, env-var names, and HTTP header names are unchanged.
5 changes: 5 additions & 0 deletions .changeset/mig-project-marketplace-settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"server": minor
---

Add the `project_marketplace_settings` table to hold per-project marketplace configuration. Schema-only change; the table is consumed in a follow-up PR that exposes a configurable marketplace name on the plugins management API.
28 changes: 28 additions & 0 deletions .mise-tasks/gen/resolve.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

#MISE description="Resolve merge conflicts in generated artifacts by taking main's version and regenerating"
#MISE dir="{{ config_root }}"

#USAGE flag "-b --base <ref>" help="Git ref to checkout generated artifacts from" default="main"

set -e

base="${usage_base:-main}"

if ! git rev-parse --verify "$base" >/dev/null 2>&1; then
echo "error: ref '$base' does not exist" >&2
exit 1
fi

paths=(.speakeasy client/sdk server/gen)

echo "==> Checking out $base for: ${paths[*]}"
git checkout "$base" -- "${paths[@]}"

echo "==> Regenerating Goa server"
mise run gen:goa-server

echo "==> Regenerating SDK"
mise run gen:sdk

echo "==> Done. Review and stage the regenerated files."
218 changes: 218 additions & 0 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14228,6 +14228,96 @@ paths:
tags:
- plugins
x-speakeasy-name-override: downloadPluginPackage
/rpc/plugins.getMarketplaceSettings:
get:
description: Get the marketplace settings for the current project, including the effective marketplace name and the server-side default.
operationId: getMarketplaceSettings
parameters:
- allowEmptyValue: true
description: Session header
in: header
name: Gram-Session
schema:
description: Session header
type: string
- allowEmptyValue: true
description: project header
in: header
name: Gram-Project
schema:
description: project header
type: string
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/MarketplaceSettingsResult'
description: OK response.
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'bad_request: request is invalid'
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'unauthorized: unauthorized access'
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'forbidden: permission denied'
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'not_found: resource not found'
"409":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'conflict: resource already exists'
"415":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'unsupported_media: unsupported media type'
"422":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'invalid: request contains one or more invalidation fields'
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'unexpected: an unexpected error occurred'
"502":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'gateway_error: an unexpected error occurred'
security:
- project_slug_header_Gram-Project: []
session_header_Gram-Session: []
- {}
summary: getMarketplaceSettings plugins
tags:
- plugins
x-speakeasy-name-override: getMarketplaceSettings
x-speakeasy-react-hook:
name: MarketplaceSettings
/rpc/plugins.getPlugin:
get:
description: Get a plugin with its servers and assignments.
Expand Down Expand Up @@ -14799,6 +14889,102 @@ paths:
x-speakeasy-name-override: setPluginAssignments
x-speakeasy-react-hook:
name: SetPluginAssignments
/rpc/plugins.updateMarketplaceSettings:
post:
description: Update the marketplace settings for the current project. If a marketplace is already published, the updated settings are pushed to GitHub before the call returns.
operationId: updateMarketplaceSettings
parameters:
- allowEmptyValue: true
description: Session header
in: header
name: Gram-Session
schema:
description: Session header
type: string
- allowEmptyValue: true
description: project header
in: header
name: Gram-Project
schema:
description: project header
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateMarketplaceSettingsRequestBody'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateMarketplaceSettingsResult'
description: OK response.
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'bad_request: request is invalid'
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'unauthorized: unauthorized access'
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'forbidden: permission denied'
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'not_found: resource not found'
"409":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'conflict: resource already exists'
"415":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'unsupported_media: unsupported media type'
"422":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'invalid: request contains one or more invalidation fields'
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'unexpected: an unexpected error occurred'
"502":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'gateway_error: an unexpected error occurred'
security:
- project_slug_header_Gram-Project: []
session_header_Gram-Session: []
- {}
summary: updateMarketplaceSettings plugins
tags:
- plugins
x-speakeasy-name-override: updateMarketplaceSettings
x-speakeasy-react-hook:
name: UpdateMarketplaceSettings
/rpc/plugins.updatePlugin:
put:
description: Update plugin metadata.
Expand Down Expand Up @@ -33301,6 +33487,21 @@ components:
- id
- name
- url
MarketplaceSettingsResult:
type: object
properties:
default_name:
type: string
description: The default marketplace name used when no override is configured.
effective_name:
type: string
description: The marketplace name that will be used at publish time (override if set, otherwise default).
marketplace_name:
type: string
description: User-provided override for the marketplace name. Absent when no override is configured.
required:
- default_name
- effective_name
McpEndpoint:
type: object
properties:
Expand Down Expand Up @@ -38180,6 +38381,23 @@ components:
required:
- invitation_id
- role_id
UpdateMarketplaceSettingsRequestBody:
type: object
properties:
marketplace_name:
type: string
description: Override for the marketplace name (the identifier users type as `<plugin>@<marketplace>`). Pass an empty string or omit to clear the override and fall back to the default.
UpdateMarketplaceSettingsResult:
type: object
properties:
republished:
type: boolean
description: Whether the marketplace was automatically republished to GitHub as part of this update.
settings:
$ref: '#/components/schemas/MarketplaceSettingsResult'
required:
- settings
- republished
UpdateMcpEndpointForm:
type: object
properties:
Expand Down
Loading
Loading