name: 'SentryAgent Register Agent'
description: >
  Registers a new agent in SentryAgent.ai using GitHub OIDC token exchange.
  No long-lived API credentials required — the GitHub Actions OIDC token is
  exchanged for a short-lived SentryAgent.ai access token to call POST /agents.

author: 'SentryAgent.ai'

branding:
  icon: 'shield'
  color: 'blue'

inputs:
  api-url:
    description: >
      Base URL of the SentryAgent.ai AgentIdP API.
      Example: https://idp.sentryagent.ai
    required: true
  agent-name:
    description: >
      Unique name (email) for the agent being registered.
      Must be a valid email address format used as the agent identity.
    required: true
  agent-description:
    description: >
      Optional human-readable description of the agent's purpose.
      Stored as the agent owner field.
    required: false
    default: ''

outputs:
  agent-id:
    description: >
      The UUID of the newly registered agent.
      Use in subsequent steps to issue tokens or manage credentials.

runs:
  using: 'node20'
  main: 'action.js'
