daytona 0.169.0 → 0.170.0
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 +4 -4
- data/.rspec +3 -0
- data/lib/daytona/code_interpreter.rb +3 -0
- data/lib/daytona/common/charts.rb +3 -0
- data/lib/daytona/common/code_interpreter.rb +3 -0
- data/lib/daytona/common/code_language.rb +3 -0
- data/lib/daytona/common/daytona.rb +3 -0
- data/lib/daytona/common/file_system.rb +3 -0
- data/lib/daytona/common/git.rb +3 -0
- data/lib/daytona/common/image.rb +6 -2
- data/lib/daytona/common/process.rb +3 -0
- data/lib/daytona/common/pty.rb +4 -1
- data/lib/daytona/common/resources.rb +3 -0
- data/lib/daytona/common/response.rb +3 -0
- data/lib/daytona/common/snapshot.rb +3 -0
- data/lib/daytona/computer_use.rb +7 -4
- data/lib/daytona/config.rb +3 -0
- data/lib/daytona/daytona.rb +3 -0
- data/lib/daytona/file_system.rb +3 -0
- data/lib/daytona/git.rb +4 -1
- data/lib/daytona/lsp_server.rb +3 -0
- data/lib/daytona/object_storage.rb +3 -0
- data/lib/daytona/otel.rb +3 -0
- data/lib/daytona/process.rb +7 -1
- data/lib/daytona/sandbox.rb +3 -0
- data/lib/daytona/sdk/version.rb +4 -1
- data/lib/daytona/sdk.rb +3 -0
- data/lib/daytona/snapshot_service.rb +3 -0
- data/lib/daytona/util.rb +3 -0
- data/lib/daytona/volume.rb +3 -0
- data/lib/daytona/volume_service.rb +3 -0
- data/lib/daytona.rb +3 -0
- data/project.json +17 -0
- data/scripts/generate-docs.rb +2 -0
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7515dcf7e9ce6366233315925a09418cfe7714473f55ccf2062010f3d5ac692c
|
|
4
|
+
data.tar.gz: 85148ff08b50b7a9d647ac53ae8b73622e5e3d9d01f9a211229a1ec071f49979
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ccd9ad77b30a91e4aa4ca503d87d3d9a976978b553bf3c0a1ba6e80c912c804bfab99b520377edc71ab17abd4eb22790edac7ae683bf2f6a58bfe6419a08e390
|
|
7
|
+
data.tar.gz: 071d6d27256509829400a640d70b386c7a627e44731b07b0a2ba04559c3837bf31ec4f037c76f9f4bdbe5073af58d9660551d14ccac9e6fff5dd653712c0b04a
|
data/.rspec
ADDED
data/lib/daytona/common/git.rb
CHANGED
data/lib/daytona/common/image.rb
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# Copyright Daytona Platforms Inc.
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
1
4
|
# frozen_string_literal: true
|
|
2
5
|
|
|
3
6
|
require 'digest'
|
|
@@ -261,8 +264,9 @@ module Daytona
|
|
|
261
264
|
raise Sdk::Error, "Context directory #{context_dir} does not exist" unless Dir.exist?(context_dir)
|
|
262
265
|
end
|
|
263
266
|
|
|
264
|
-
# Extract copy sources from dockerfile commands
|
|
265
|
-
extract_copy_sources
|
|
267
|
+
# Extract copy sources from dockerfile commands (class-level helper)
|
|
268
|
+
self.class.send(:extract_copy_sources, dockerfile_commands.join("\n"),
|
|
269
|
+
context_dir || '').each do |context_path, original_path|
|
|
266
270
|
archive_base_path = context_path
|
|
267
271
|
if context_dir && !original_path.start_with?(context_dir)
|
|
268
272
|
archive_base_path = context_path.delete_prefix(context_dir)
|
data/lib/daytona/common/pty.rb
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# Copyright Daytona Platforms Inc.
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
1
4
|
# frozen_string_literal: true
|
|
2
5
|
|
|
3
6
|
require 'json'
|
|
@@ -299,7 +302,7 @@ module Daytona
|
|
|
299
302
|
module WebSocketControlStatus
|
|
300
303
|
ALL = [
|
|
301
304
|
CONNECTED = 'connected',
|
|
302
|
-
|
|
305
|
+
ERROR = 'error'
|
|
303
306
|
].freeze
|
|
304
307
|
end
|
|
305
308
|
end
|
data/lib/daytona/computer_use.rb
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# Copyright Daytona Platforms Inc.
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
1
4
|
# frozen_string_literal: true
|
|
2
5
|
|
|
3
6
|
module Daytona
|
|
@@ -167,14 +170,14 @@ module Daytona
|
|
|
167
170
|
|
|
168
171
|
# Presses a key with optional modifiers.
|
|
169
172
|
#
|
|
170
|
-
# @param key [String] The key to press
|
|
171
|
-
# @param modifiers [Array<String>, nil]
|
|
173
|
+
# @param key [String] The key to press. Canonical names include 'enter', 'escape', 'tab', letters, digits, unshifted punctuation, function keys, and grammar-safe numpad names such as 'num_plus'. Named keys are case-insensitive, and common aliases such as 'Return' and 'Escape' are normalized.
|
|
174
|
+
# @param modifiers [Array<String>, nil] Canonical modifier names are 'ctrl', 'alt', 'shift', and 'cmd'. Common aliases such as 'control', 'option', 'meta', and 'win' are normalized.
|
|
172
175
|
# @return [void]
|
|
173
176
|
# @raise [Daytona::Sdk::Error] If the operation fails
|
|
174
177
|
#
|
|
175
178
|
# @example
|
|
176
179
|
# # Press Enter
|
|
177
|
-
# sandbox.computer_use.keyboard.press("
|
|
180
|
+
# sandbox.computer_use.keyboard.press("enter")
|
|
178
181
|
#
|
|
179
182
|
# # Press Ctrl+C
|
|
180
183
|
# sandbox.computer_use.keyboard.press("c", modifiers: ["ctrl"])
|
|
@@ -190,7 +193,7 @@ module Daytona
|
|
|
190
193
|
|
|
191
194
|
# Presses a hotkey combination.
|
|
192
195
|
#
|
|
193
|
-
# @param keys [String]
|
|
196
|
+
# @param keys [String] A single atomic hotkey chord (e.g., 'ctrl+c', 'alt+tab', 'cmd+shift+t', 'ctrl + c', 'shift'). Uses the same normalized key contract as #press.
|
|
194
197
|
# @return [void]
|
|
195
198
|
# @raise [Daytona::Sdk::Error] If the operation fails
|
|
196
199
|
#
|
data/lib/daytona/config.rb
CHANGED
data/lib/daytona/daytona.rb
CHANGED
data/lib/daytona/file_system.rb
CHANGED
data/lib/daytona/git.rb
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# Copyright Daytona Platforms Inc.
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
1
4
|
# frozen_string_literal: true
|
|
2
5
|
|
|
3
6
|
module Daytona
|
|
@@ -142,7 +145,7 @@ module Daytona
|
|
|
142
145
|
response = toolbox_api.commit_changes(
|
|
143
146
|
DaytonaToolboxApiClient::GitCommitRequest.new(path:, message:, author:, email:, allow_empty:)
|
|
144
147
|
)
|
|
145
|
-
GitCommitResponse.new(sha: response.
|
|
148
|
+
GitCommitResponse.new(sha: response._hash)
|
|
146
149
|
rescue StandardError => e
|
|
147
150
|
raise Sdk::Error, "Failed to commit changes: #{e.message}"
|
|
148
151
|
end
|
data/lib/daytona/lsp_server.rb
CHANGED
data/lib/daytona/otel.rb
CHANGED
data/lib/daytona/process.rb
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# Copyright Daytona Platforms Inc.
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
1
4
|
# frozen_string_literal: true
|
|
2
5
|
|
|
3
6
|
require 'uri'
|
|
@@ -500,7 +503,10 @@ module Daytona
|
|
|
500
503
|
# puts "PTY Session #{session.id}: #{session.cols}x#{session.rows}"
|
|
501
504
|
# end
|
|
502
505
|
def list_pty_sessions
|
|
503
|
-
toolbox_api.list_pty_sessions
|
|
506
|
+
response = toolbox_api.list_pty_sessions
|
|
507
|
+
return [] if response.nil?
|
|
508
|
+
|
|
509
|
+
response.respond_to?(:sessions) ? (response.sessions || []) : response
|
|
504
510
|
end
|
|
505
511
|
|
|
506
512
|
# Gets detailed information about a specific PTY session
|
data/lib/daytona/sandbox.rb
CHANGED
data/lib/daytona/sdk/version.rb
CHANGED
data/lib/daytona/sdk.rb
CHANGED
data/lib/daytona/util.rb
CHANGED
data/lib/daytona/volume.rb
CHANGED
data/lib/daytona.rb
CHANGED
data/project.json
CHANGED
|
@@ -41,6 +41,23 @@
|
|
|
41
41
|
"command": "bundle exec rubocop"
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
+
"test": {
|
|
45
|
+
"executor": "nx:run-commands",
|
|
46
|
+
"cache": true,
|
|
47
|
+
"inputs": ["default", { "env": "DAYTONA_API_KEY" }, { "env": "DAYTONA_API_URL" }, { "env": "DAYTONA_JWT_TOKEN" }, { "env": "DAYTONA_ORGANIZATION_ID" }, { "env": "DAYTONA_TARGET" }],
|
|
48
|
+
"outputs": [],
|
|
49
|
+
"options": {
|
|
50
|
+
"cwd": "{projectRoot}",
|
|
51
|
+
"command": "bundle exec rspec --format documentation --tag '~e2e'"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"test:e2e": {
|
|
55
|
+
"executor": "nx:run-commands",
|
|
56
|
+
"options": {
|
|
57
|
+
"cwd": "{projectRoot}",
|
|
58
|
+
"command": "bundle exec rspec spec/e2e_spec.rb --format documentation"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
44
61
|
"format": {
|
|
45
62
|
"executor": "nx:run-commands",
|
|
46
63
|
"options": {
|
data/scripts/generate-docs.rb
CHANGED
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.
|
|
4
|
+
version: 0.170.0
|
|
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.
|
|
88
|
+
version: 0.170.0
|
|
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.
|
|
95
|
+
version: 0.170.0
|
|
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.
|
|
102
|
+
version: 0.170.0
|
|
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.
|
|
109
|
+
version: 0.170.0
|
|
110
110
|
- !ruby/object:Gem::Dependency
|
|
111
111
|
name: dotenv
|
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -171,6 +171,7 @@ executables: []
|
|
|
171
171
|
extensions: []
|
|
172
172
|
extra_rdoc_files: []
|
|
173
173
|
files:
|
|
174
|
+
- ".rspec"
|
|
174
175
|
- ".rubocop.yml"
|
|
175
176
|
- ".ruby-version"
|
|
176
177
|
- CODE_OF_CONDUCT.md
|