tensicai 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 37e54b5f991d58e145056e51f9d732ec7df40910b6e2dd8b368cb4b7134ca145
4
+ data.tar.gz: b6d908b099844ffbb397f9187b32206f28825ef345bd227601f0fbd98942dd20
5
+ SHA512:
6
+ metadata.gz: 4246287119673160854fdb8081222ed40f4c2895b18fe6022b41f2ec02db835610fc8f47c91b00c9c9dd9ef310abd937e0c185ef6981cc54f939f73b1bbfa717
7
+ data.tar.gz: 1cd8461a4e5e75f05940cd3a11e9bfe4ae26e983392e8a064926772452471db968f86c10028e55aad07050969755dfd39ac8f4d5433d7360ba07455fef96f478
data/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # tensicai
2
+
3
+ Ruby SDK for [Tensic](https://tensic.ai), a sovereign AI orchestration platform.
4
+
5
+ > **Early preview.** This gem establishes the package name and project layout.
6
+ > The public API is not stable and no HTTP transport is wired up yet. Expect
7
+ > breaking changes before `0.1.0`.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ gem install tensicai
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```ruby
18
+ require "tensicai"
19
+
20
+ client = Tensicai::Client.new("https://manager.tensic.ai", "my-api-key")
21
+ client.base_url # => #<URI::HTTPS https://manager.tensic.ai>
22
+ client.credentials? # => true
23
+ ```
24
+
25
+ ## Development
26
+
27
+ ```bash
28
+ gem build tensicai.gemspec
29
+ ruby -Ilib -Itest test/test_client.rb
30
+ ```
31
+
32
+ ## Other SDKs
33
+
34
+ | Language | Package | Repository |
35
+ |---|---|---|
36
+ | PHP | `tensicai/php-sdk` | [tensicai/php-sdk](https://github.com/tensicai/php-sdk) |
37
+ | Python | `tensicai` | [tensicai/python-sdk](https://github.com/tensicai/python-sdk) |
38
+ | Node | `@tensicai/node-sdk` | [tensicai/node-sdk](https://github.com/tensicai/node-sdk) |
39
+ | Rust | `tensicai-rust-sdk` | [tensicai/rust-sdk](https://github.com/tensicai/rust-sdk) |
40
+ | .NET | `TensicAI.Sdk` | [tensicai/dotnet-sdk](https://github.com/tensicai/dotnet-sdk) |
41
+ | Ruby | `tensicai` | [tensicai/ruby-sdk](https://github.com/tensicai/ruby-sdk) |
42
+
43
+ ## Licence
44
+
45
+ Apache-2.0
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "uri"
4
+
5
+ module Tensicai
6
+ # Raised when a client is constructed with invalid configuration.
7
+ class ConfigurationError < StandardError; end
8
+
9
+ # A configured client for the Tensic API.
10
+ class Client
11
+ # @return [URI::Generic] the endpoint this client targets
12
+ attr_reader :base_url
13
+
14
+ # @param base_url [String] base address of the Tensic API
15
+ # @param api_key [String] API key used to authenticate requests
16
+ # @raise [ConfigurationError] if base_url is missing or not absolute
17
+ def initialize(base_url, api_key = nil)
18
+ raise ConfigurationError, "base_url must be provided" if base_url.nil? || base_url.strip.empty?
19
+
20
+ parsed = URI.parse(base_url)
21
+ raise ConfigurationError, "base_url '#{base_url}' is not an absolute URI" unless parsed.absolute?
22
+
23
+ @base_url = parsed
24
+ @api_key = api_key.to_s
25
+ end
26
+
27
+ # @return [Boolean] whether an API key was supplied
28
+ def credentials?
29
+ !@api_key.strip.empty?
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tensicai
4
+ VERSION = "0.0.1"
5
+ end
data/lib/tensicai.rb ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "tensicai/version"
4
+ require_relative "tensicai/client"
5
+
6
+ # Ruby SDK for Tensic, a sovereign AI orchestration platform.
7
+ #
8
+ # @example
9
+ # client = Tensicai::Client.new("https://manager.tensic.ai", "my-api-key")
10
+ # client.base_url # => #<URI::HTTPS https://manager.tensic.ai>
11
+ module Tensicai
12
+ end
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tensicai
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Tensic AI
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: Ruby SDK for Tensic, a sovereign AI orchestration platform. Early preview
13
+ - the public API is not stable and no HTTP transport is wired up yet.
14
+ executables: []
15
+ extensions: []
16
+ extra_rdoc_files: []
17
+ files:
18
+ - README.md
19
+ - lib/tensicai.rb
20
+ - lib/tensicai/client.rb
21
+ - lib/tensicai/version.rb
22
+ homepage: https://tensic.ai
23
+ licenses:
24
+ - Apache-2.0
25
+ metadata:
26
+ homepage_uri: https://tensic.ai
27
+ source_code_uri: https://github.com/tensicai/ruby-sdk
28
+ rdoc_options: []
29
+ require_paths:
30
+ - lib
31
+ required_ruby_version: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: 3.1.0
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ requirements: []
42
+ rubygems_version: 3.6.9
43
+ specification_version: 4
44
+ summary: Ruby SDK for Tensic, a sovereign AI orchestration platform.
45
+ test_files: []