Skip to content

Releases: base-14/scope-sdk

Ruby SDK v0.1.0

20 Jan 11:14
95c4740

Choose a tag to compare

Ruby SDK v0.1.0

Initial release of the Scope Client Ruby SDK.

Added

  • ScopeClient.client for creating client instances
  • ScopeClient.configure for global configuration
  • Client methods:
    • get_prompt - Get prompt metadata by ID
    • get_prompt_latest - Get latest version of a prompt
    • get_prompt_production - Get production version of a prompt
    • get_prompt_version - Get specific version of a prompt
    • list_prompts - List prompts with pagination and filters
    • render_prompt - Render prompt with variable substitution
    • clear_cache - Clear cached data
  • Thread-safe caching with configurable TTL
  • Automatic retries with exponential backoff
  • Telemetry hooks for request/response monitoring
  • Comprehensive error hierarchy:
    • AuthenticationError (401)
    • AuthorizationError (403)
    • NotFoundError (404)
    • RateLimitError (429)
    • ServerError (5xx)
    • MissingVariableError for template rendering
    • NoProductionVersionError when no production version exists
  • Environment variable configuration (SCOPE_API_KEY, SCOPE_API_URL)
  • Full YARD documentation
  • RSpec test suite with WebMock

Dependencies

  • faraday >= 2.0, < 3.0
  • faraday-retry ~> 2.0