Gleanex.Platform.Skills (Gleanex v0.1.0)

Copy Markdown View Source

Provides API endpoints related to skills

Summary

Functions

create(body, opts \\ [])

@spec create(body :: Gleanex.Platform.SkillCreateRequest.t(), opts :: keyword()) ::
  {:ok, Gleanex.Platform.SkillCreateResponse.t()} | {:error, Gleanex.Error.t()}

Create skill

Create a skill from an uploaded SKILL.md, .zip, or .skill bundle. If the authenticated user already has a skill with the same name, the existing skill is superseded with a new version.

Request Body

Content Types: multipart/form-data

create_version(skill_id, body, opts \\ [])

@spec create_version(
  skill_id :: String.t(),
  body :: Gleanex.Platform.SkillVersionCreateRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Platform.SkillVersionCreateResponse.t()}
  | {:error, Gleanex.Error.t()}

Create skill version

Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, or .skill bundle.

Request Body

Content Types: multipart/form-data

get(skill_id, opts \\ [])

@spec get(skill_id :: String.t(), opts :: keyword()) ::
  {:ok, Gleanex.Platform.SkillGetResponse.t()} | {:error, Gleanex.Error.t()}

Retrieve skill

Retrieve metadata for a skill available to the authenticated user.

get_content(skill_id, opts \\ [])

@spec get_content(skill_id :: String.t(), opts :: keyword()) ::
  {:ok, binary()} | {:error, Gleanex.Error.t()}

Download skill content

Download the latest installable bundle for a skill available to the authenticated user.

get_version(skill_id, version, opts \\ [])

@spec get_version(skill_id :: String.t(), version :: integer(), opts :: keyword()) ::
  {:ok, Gleanex.Platform.SkillVersionGetResponse.t()}
  | {:error, Gleanex.Error.t()}

Retrieve skill version

Retrieve metadata for a skill version available to the authenticated user.

get_version_content(skill_id, version, opts \\ [])

@spec get_version_content(
  skill_id :: String.t(),
  version :: integer(),
  opts :: keyword()
) ::
  {:ok, binary()} | {:error, Gleanex.Error.t()}

Download skill version content

Download the installable bundle for a skill version available to the authenticated user.

list(opts \\ [])

@spec list(opts :: keyword()) ::
  {:ok, Gleanex.Platform.SkillsListResponse.t()} | {:error, Gleanex.Error.t()}

List skills

List skills available to the authenticated user.

Options

  • page_size: Maximum number of skills to return.
  • cursor: Opaque pagination cursor from a previous response.

list_versions(skill_id, opts \\ [])

@spec list_versions(skill_id :: String.t(), opts :: keyword()) ::
  {:ok, Gleanex.Platform.SkillVersionsListResponse.t()}
  | {:error, Gleanex.Error.t()}

List skill versions

List versions for a skill available to the authenticated user.

Options

  • page_size: Maximum number of versions to return.
  • cursor: Opaque pagination cursor from a previous response.

preview_source(body, opts \\ [])

@spec preview_source(
  body :: Gleanex.Platform.SkillSourcePreviewRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Platform.SkillSourcePreviewResponse.t() | String.t()}
  | {:error, Gleanex.Error.t()}

Preview a GitHub skill source

Inspect a GitHub URL without persisting a source or any discovered skills. Set stream to true to receive repository scan progress as server-sent events; otherwise the response contains the completed preview.

Request Body

Content Types: application/json

update(skill_id, body, opts \\ [])

@spec update(
  skill_id :: String.t(),
  body :: Gleanex.Platform.SkillUpdateRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Platform.SkillUpdateResponse.t()} | {:error, Gleanex.Error.t()}

Update skill

Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its content.

Request Body

Content Types: application/json

validate(body, opts \\ [])

Validate skill bundle

Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout.

Request Body

Content Types: multipart/form-data