daytona 0.189.0 → 0.190.0.alpha.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17846836c31939fe3ff022eb6f504abf3bc3cae0133a1e918723a8bda8f32baf
4
- data.tar.gz: b26c47c2c367550d6b54d390866200011ebb6f11f28e34a9591fa645b5034aef
3
+ metadata.gz: 69c8bcf2147fe4ec948bce39cc0713cc978fecb9aee74f2cbadd2727418f46a0
4
+ data.tar.gz: dcabb5e45bf1918ad41459d81cea1c20c69d95d7d073d95aa7d5953b8a78db26
5
5
  SHA512:
6
- metadata.gz: 1d5db385668226ad0a6f0afd9358e5b04864b274c7609689391a07fcc5fb73933f7ff53dff3cbac74527332a4bc1f578684e53b21138a18d4590bc3700688353
7
- data.tar.gz: 46a0c8ff02abfcdbf7494564718b47c5bd2ace286249343811c1899822b857361eee87587705b3b48382c852d0afdea430f05af6109552dfbdac0de53d9c1a61
6
+ metadata.gz: 4fdba3c508f98d6da1bd946373ce4468fe3c2161a5b7a9d4ab77e42e13ba039bd57876245f61c3225203b0d37074d6b74c4fe0bf5e4b5f6941aea1ceb8cd6cb7
7
+ data.tar.gz: 988a1a1b4f550675f03c74244463edf2a8cddfbde357ae2b29cd2b72eee9d7cf7f90f0190007f3543781f7777f42a26236caadedf1b15fca2984ce022deec748
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Daytona Ruby SDK
2
2
 
3
- The official Ruby SDK for [Daytona](https://daytona.io), an open-source, secure and elastic infrastructure for running AI-generated code. Daytona provides full composable computers — [sandboxes](https://www.daytona.io/docs/en/sandboxes/) — that you can manage programmatically using the Daytona SDK.
3
+ The official Ruby SDK for [Daytona](https://daytona.io), a secure and elastic infrastructure for running AI-generated code. Daytona provides full composable computers — [sandboxes](https://www.daytona.io/docs/en/sandboxes/) — that you can manage programmatically using the Daytona SDK.
4
4
 
5
5
  The SDK provides an interface for sandbox management, file system operations, Git operations, language server protocol support, process and code execution, and computer use. For more information, see the [documentation](https://www.daytona.io/docs/en/ruby-sdk/).
6
6
 
@@ -182,7 +182,3 @@ completions = lsp_server.completions(
182
182
  position: Daytona::LspServer::Position.new(line: 10, character: 15)
183
183
  )
184
184
  ```
185
-
186
- ## Contributing
187
-
188
- Daytona is Open Source under the [Apache License 2.0](https://github.com/daytonaio/daytona/blob/main/libs/sdk-ruby/LICENSE), and is the [copyright of its contributors](https://github.com/daytonaio/daytona/blob/main/NOTICE). If you would like to contribute to the software, read the Developer Certificate of Origin Version 1.1 (https://developercertificate.org/). Afterwards, navigate to the [contributing guide](../../CONTRIBUTING.md) to get started.
@@ -43,6 +43,9 @@ module Daytona
43
43
  # @return [String, nil] Comma-separated list of allowed CIDR network addresses for the Sandbox
44
44
  attr_accessor :network_allow_list
45
45
 
46
+ # @return [String, nil] Comma-separated list of allowed domains for the Sandbox
47
+ attr_accessor :domain_allow_list
48
+
46
49
  # @return [Boolean, nil] Whether the Sandbox should be ephemeral
47
50
  attr_accessor :ephemeral
48
51
 
@@ -66,6 +69,7 @@ module Daytona
66
69
  # @param volumes [Array<DaytonaApiClient::SandboxVolume>, nil] List of volumes mounts to attach to the Sandbox
67
70
  # @param network_block_all [Boolean, nil] Whether to block all network access for the Sandbox
68
71
  # @param network_allow_list [String, nil] Comma-separated list of allowed CIDR network addresses for the Sandbox
72
+ # @param domain_allow_list [String, nil] Comma-separated list of allowed domains for the Sandbox
69
73
  # @param ephemeral [Boolean, nil] Whether the Sandbox should be ephemeral
70
74
  # @param linked_sandbox [String, nil] ID or name of an existing Sandbox to link the new Sandbox to
71
75
  def initialize( # rubocop:disable Metrics/MethodLength, Metrics/ParameterLists
@@ -81,6 +85,7 @@ module Daytona
81
85
  volumes: nil,
82
86
  network_block_all: nil,
83
87
  network_allow_list: nil,
88
+ domain_allow_list: nil,
84
89
  ephemeral: nil,
85
90
  linked_sandbox: nil
86
91
  )
@@ -96,6 +101,7 @@ module Daytona
96
101
  @volumes = volumes
97
102
  @network_block_all = network_block_all
98
103
  @network_allow_list = network_allow_list
104
+ @domain_allow_list = domain_allow_list
99
105
  @ephemeral = ephemeral
100
106
  @linked_sandbox = linked_sandbox
101
107
 
@@ -120,6 +126,7 @@ module Daytona
120
126
  volumes:,
121
127
  network_block_all:,
122
128
  network_allow_list:,
129
+ domain_allow_list:,
123
130
  ephemeral:,
124
131
  linked_sandbox:
125
132
  }.compact
@@ -166,6 +173,7 @@ module Daytona
166
173
  # @param volumes [Array<DaytonaApiClient::SandboxVolume>, nil] List of volumes mounts to attach to the Sandbox
167
174
  # @param network_block_all [Boolean, nil] Whether to block all network access for the Sandbox
168
175
  # @param network_allow_list [String, nil] Comma-separated list of allowed CIDR network addresses for the Sandbox
176
+ # @param domain_allow_list [String, nil] Comma-separated list of allowed domains for the Sandbox
169
177
  # @param ephemeral [Boolean, nil] Whether the Sandbox should be ephemeral
170
178
  def initialize(image:, resources: nil, **args)
171
179
  @image = image
@@ -204,6 +212,7 @@ module Daytona
204
212
  # @param volumes [Array<DaytonaApiClient::SandboxVolume>, nil] List of volumes mounts to attach to the Sandbox
205
213
  # @param network_block_all [Boolean, nil] Whether to block all network access for the Sandbox
206
214
  # @param network_allow_list [String, nil] Comma-separated list of allowed CIDR network addresses for the Sandbox
215
+ # @param domain_allow_list [String, nil] Comma-separated list of allowed domains for the Sandbox
207
216
  # @param ephemeral [Boolean, nil] Whether the Sandbox should be ephemeral
208
217
  def initialize(snapshot: nil, **args)
209
218
  @snapshot = snapshot
@@ -215,6 +215,7 @@ module Daytona
215
215
  volumes: params.volumes,
216
216
  network_block_all: params.network_block_all,
217
217
  network_allow_list: params.network_allow_list,
218
+ domain_allow_list: params.domain_allow_list,
218
219
  linked_sandbox: params.linked_sandbox
219
220
  )
220
221
 
@@ -41,6 +41,10 @@ module Daytona
41
41
  # Not returned by list results; call #refresh on each item to populate.
42
42
  attr_reader :network_allow_list
43
43
 
44
+ # @return [String, nil] Comma-separated list of allowed domains for the sandbox.
45
+ # Not returned by list results; call #refresh on each item to populate.
46
+ attr_reader :domain_allow_list
47
+
44
48
  # @return [String] The target environment for the sandbox
45
49
  attr_reader :target
46
50
 
@@ -216,21 +220,24 @@ module Daytona
216
220
  #
217
221
  # @param network_block_all [Boolean, nil]
218
222
  # @param network_allow_list [String, nil]
223
+ # @param domain_allow_list [String, nil]
219
224
  # @return [void]
220
225
  # @raise [Daytona::Sdk::Error]
221
- def update_network_settings(network_block_all: nil, network_allow_list: nil)
222
- if network_block_all.nil? && network_allow_list.nil?
226
+ def update_network_settings(network_block_all: nil, network_allow_list: nil, domain_allow_list: nil)
227
+ if network_block_all.nil? && network_allow_list.nil? && domain_allow_list.nil?
223
228
  raise Sdk::Error,
224
- 'At least one of network_block_all or network_allow_list must be provided'
229
+ 'At least one of network_block_all, network_allow_list or domain_allow_list must be provided'
225
230
  end
226
231
 
227
232
  body = DaytonaApiClient::UpdateSandboxNetworkSettings.new(
228
233
  network_block_all:,
229
- network_allow_list:
234
+ network_allow_list:,
235
+ domain_allow_list:
230
236
  )
231
237
  data = sandbox_api.update_network_settings(id, body)
232
238
  @network_block_all = data.network_block_all
233
239
  @network_allow_list = data.network_allow_list
240
+ @domain_allow_list = data.domain_allow_list
234
241
  end
235
242
 
236
243
  # Sets the auto-stop interval for the Sandbox.
@@ -629,6 +636,7 @@ module Daytona
629
636
  @env = sandbox_dto.env
630
637
  @network_block_all = sandbox_dto.network_block_all
631
638
  @network_allow_list = sandbox_dto.network_allow_list
639
+ @domain_allow_list = sandbox_dto.domain_allow_list
632
640
  @volumes = sandbox_dto.volumes
633
641
  @build_info = sandbox_dto.build_info
634
642
  @backup_created_at = sandbox_dto.backup_created_at
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Daytona
7
7
  module Sdk
8
- VERSION = '0.189.0'
8
+ VERSION = '0.190.0.alpha.3'
9
9
  end
10
10
  end
data/project.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "executor": "nx:run-commands",
10
10
  "options": {
11
11
  "cwd": "{projectRoot}",
12
- "commands": ["rm -f *.gem", "bundle install", "gem build daytona.gemspec"],
12
+ "commands": ["rm -f *.gem", "BUNDLE_GEMFILE=Gemfile bundle install", "gem build daytona.gemspec"],
13
13
  "parallel": false
14
14
  },
15
15
  "dependsOn": [
@@ -38,7 +38,7 @@
38
38
  "executor": "nx:run-commands",
39
39
  "options": {
40
40
  "cwd": "{projectRoot}",
41
- "command": "bundle exec rubocop"
41
+ "command": "BUNDLE_GEMFILE=Gemfile bundle exec rubocop"
42
42
  }
43
43
  },
44
44
  "test": {
@@ -52,30 +52,30 @@
52
52
  "outputs": [],
53
53
  "options": {
54
54
  "cwd": "{projectRoot}",
55
- "command": "bundle exec rspec --format documentation --tag '~e2e'"
55
+ "command": "BUNDLE_GEMFILE=Gemfile bundle exec rspec --format documentation --tag '~e2e'"
56
56
  }
57
57
  },
58
58
  "test:e2e": {
59
59
  "executor": "nx:run-commands",
60
60
  "options": {
61
61
  "cwd": "{projectRoot}",
62
- "command": "bundle exec rspec spec/e2e_spec.rb --format documentation"
62
+ "command": "BUNDLE_GEMFILE=Gemfile bundle exec rspec spec/e2e_spec.rb --format documentation"
63
63
  }
64
64
  },
65
65
  "format": {
66
66
  "executor": "nx:run-commands",
67
67
  "options": {
68
68
  "cwd": "{projectRoot}",
69
- "commands": ["bundle exec rubocop -a --fail-level=E"],
69
+ "commands": ["BUNDLE_GEMFILE=Gemfile bundle exec rubocop -a --fail-level=E"],
70
70
  "parallel": false
71
71
  }
72
72
  },
73
73
  "docs": {
74
74
  "executor": "nx:run-commands",
75
- "outputs": ["{workspaceRoot}/apps/docs/src/content/docs/en/ruby-sdk/**/*"],
75
+ "outputs": ["{workspaceRoot}/artifacts/sdk-docs/ruby-sdk/**/*"],
76
76
  "options": {
77
77
  "cwd": "{projectRoot}",
78
- "command": "bash -O extglob -c 'rm -rf ../../apps/docs/src/content/docs/en/ruby-sdk/!(index.mdx)' && bundle exec ruby scripts/generate-docs.rb"
78
+ "command": "bash -O extglob -c 'rm -rf ../../artifacts/sdk-docs/ruby-sdk/!(index.mdx)' && BUNDLE_GEMFILE=Gemfile bundle exec ruby scripts/generate-docs.rb"
79
79
  }
80
80
  },
81
81
  "publish": {
@@ -8,7 +8,7 @@ require 'tmpdir'
8
8
  require 'yard'
9
9
 
10
10
  # Configuration
11
- DOCS_OUTPUT_DIR = File.expand_path('../../../apps/docs/src/content/docs/en/ruby-sdk', __dir__)
11
+ DOCS_OUTPUT_DIR = File.expand_path('../../../artifacts/sdk-docs/ruby-sdk', __dir__)
12
12
  LIB_DIR = File.expand_path('../lib/daytona', __dir__)
13
13
 
14
14
  # Classes to document: [file_path, output_filename, class_name]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daytona
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.189.0
4
+ version: 0.190.0.alpha.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daytona Platforms Inc.
@@ -85,28 +85,28 @@ dependencies:
85
85
  requirements:
86
86
  - - '='
87
87
  - !ruby/object:Gem::Version
88
- version: 0.189.0
88
+ version: 0.190.0.alpha.3
89
89
  type: :runtime
90
90
  prerelease: false
91
91
  version_requirements: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - '='
94
94
  - !ruby/object:Gem::Version
95
- version: 0.189.0
95
+ version: 0.190.0.alpha.3
96
96
  - !ruby/object:Gem::Dependency
97
97
  name: daytona_toolbox_api_client
98
98
  requirement: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - '='
101
101
  - !ruby/object:Gem::Version
102
- version: 0.189.0
102
+ version: 0.190.0.alpha.3
103
103
  type: :runtime
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - '='
108
108
  - !ruby/object:Gem::Version
109
- version: 0.189.0
109
+ version: 0.190.0.alpha.3
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: dotenv
112
112
  requirement: !ruby/object:Gem::Requirement