vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Read
  • Packages
  • Versions & Dist-tags
  • Staging
  • Trusted Publishers
  • Projects
  • GitHub
  • Members & Invitations
  • Account & User
  • Connected Apps
  • trustedPublisher.create
  • Parameters
  • trustedPublisher.delete
  • Parameters
  1. Registry
  2. /
  3. Agent Resources
  4. /
  5. MCP
  6. /
  7. Tools
  8. /
  9. Trusted Publishers

Trusted Publishers

Trust a GitHub Actions workflow to publish a package, or stop trusting it.

A package's trusted publishers live at /account/<account>/registry/<registry>/package/<name>/trusted-publisher, the package's trusted-publisher-collection link, and each one at …/trusted-publisher/<id>. They exist only on a registry the account owns. See Trusted publishing for how the workflow side works.

Both tools are offered only to a person, not a service token, and each asks you to confirm it's you with your second factor. See Step-up verification.

Example call
{
  "name": "trustedPublisher.create",
  "arguments": {
    "target": "/account/acme/registry/main/package/%40acme%2Futils/trusted-publisher",
    "input": {
      "type": "github",
      "repository": "acme/utils",
      "workflowFile": "release.yml"
    }
  }
}

trustedPublisher.create

Trust a GitHub Actions workflow to publish or stage the package without a token.

  • Target: a TrustedPublisherCollection
  • Privilege: package:trust
  • Hints: Needs confirmation Step-up

Parameters

ParameterTypeRequiredDescription
targetstringYesThe $id of the package's trusted publisher collection.
input.typestringYesThe CI provider. Only github, for GitHub Actions.
input.repositorystringYesThe GitHub repository the workflow runs in, as owner/name. A GitHub App installation linked to the account must grant it. Up to 255 characters.
input.workflowFilestringYesThe workflow file name under .github/workflows, ending in .yml or .yaml, such as release.yml. Up to 255 characters.
input.environmentstring | nullNoThe GitHub Actions environment the job must run in. Omitted or null accepts any or none.
input.allowPublishbooleanNoWhether the workflow may publish, as npm trust's --allow-publish. Defaults to true.
input.allowStagebooleanNoWhether the workflow may stage, as npm trust's --allow-stage-publish. Defaults to false.

trustedPublisher.delete

Stop trusting the workflow. Tokens it already exchanged are refused from their next use.

  • Target: a TrustedPublisher
  • Privilege: package:trust
  • Hints: Destructive Idempotent Needs confirmation Step-up

Parameters

ParameterTypeRequiredDescription
targetstringYesThe $id of the trusted publisher.

Previous: StagingApprove or reject versions staged with npm stage publish.Next: ProjectsLink GitHub repositories as projects, and change or delete them.

On this page

  • trustedPublisher.create
  • Parameters
  • trustedPublisher.delete
  • Parameters
Edit this page

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now