Resource technologies as code

Synchronize custom resource technologies with a remote source code repository

Custom resource technologies are those built with an AI client. You can push one to a repository, preview the changes, and refresh it from the repository. You can also create a technology from one already in a repository, for example to copy it to another CMP instance. This requires a repository linked to Cloud Management Platform (CMP) and repository credentials on your profile so commits are attributed to you. See Integrate a remote source code repository.

What CMP stores in the repository

Each technology gets its own folder, resource_technologies/<global ID>/, holding:

  • <global ID>_metadata.json: the technology’s global ID, name, slug, contract version, and definition.
  • <global ID>_wrapper.py: the technology’s Python code.
  • <global ID>_icon.png or <global ID>_icon.svg: the icon, if the technology has one.

Resource handler endpoints and credentials are stored on the handlers, so they never reach the repository.

Push and refresh a resource technology

Go to Admin > Resource Technologies, select the Custom tab, open the technology, then select its Repository tab.

Push to Remote Source opens a form for a Repository, Branch, and Commit Message. For Branch, select an existing branch or enter the name of a new one. If the technology has been pushed before, select Preview to see what changed.

Refresh from Remote Source appears once the technology has been pushed or created from a repository. It prompts for a Repository and Branch, then updates the technology in CMP. Resource handlers use the refreshed code from their next call.

The tab also shows the repository, the remote source URL, and when the technology was last refreshed.

Nothing is pushed or refreshed automatically.

Create a resource technology from a repository

  1. Go to Admin > Resource Technologies and select the Custom tab.
  2. Select Create from Repository.
  3. Provide a Repository, Branch, and Resource Technology JSON File. The list shows the _metadata.json files in the repository’s resource_technologies/ folder.
  4. Select Create.

Creating a technology doesn’t create a resource handler for it. See Add a resource handler for the new technology.