@daytonaio/sdk 0.127.0 → 0.128.0-alpha.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.
Files changed (277) hide show
  1. package/LICENSE +190 -0
  2. package/{src → cjs}/CodeInterpreter.d.ts +1 -0
  3. package/cjs/CodeInterpreter.d.ts.map +1 -0
  4. package/cjs/CodeInterpreter.js.map +1 -0
  5. package/{src → cjs}/ComputerUse.d.ts +1 -0
  6. package/cjs/ComputerUse.d.ts.map +1 -0
  7. package/cjs/ComputerUse.js.map +1 -0
  8. package/{src → cjs}/Daytona.d.ts +1 -0
  9. package/cjs/Daytona.d.ts.map +1 -0
  10. package/{src → cjs}/Daytona.js +1 -0
  11. package/cjs/Daytona.js.map +1 -0
  12. package/{src → cjs}/FileSystem.d.ts +1 -0
  13. package/cjs/FileSystem.d.ts.map +1 -0
  14. package/cjs/FileSystem.js.map +1 -0
  15. package/{src → cjs}/Git.d.ts +1 -0
  16. package/cjs/Git.d.ts.map +1 -0
  17. package/cjs/Git.js.map +1 -0
  18. package/{src → cjs}/Image.d.ts +21 -0
  19. package/cjs/Image.d.ts.map +1 -0
  20. package/{src → cjs}/Image.js +123 -91
  21. package/cjs/Image.js.map +1 -0
  22. package/{src → cjs}/LspServer.d.ts +1 -0
  23. package/cjs/LspServer.d.ts.map +1 -0
  24. package/cjs/LspServer.js.map +1 -0
  25. package/{src → cjs}/ObjectStorage.d.ts +1 -0
  26. package/cjs/ObjectStorage.d.ts.map +1 -0
  27. package/cjs/ObjectStorage.js.map +1 -0
  28. package/{src → cjs}/Process.d.ts +1 -0
  29. package/cjs/Process.d.ts.map +1 -0
  30. package/cjs/Process.js.map +1 -0
  31. package/{src → cjs}/PtyHandle.d.ts +1 -0
  32. package/cjs/PtyHandle.d.ts.map +1 -0
  33. package/cjs/PtyHandle.js.map +1 -0
  34. package/cjs/README.md +147 -0
  35. package/{src → cjs}/Sandbox.d.ts +2 -17
  36. package/cjs/Sandbox.d.ts.map +1 -0
  37. package/{src → cjs}/Sandbox.js +1 -27
  38. package/cjs/Sandbox.js.map +1 -0
  39. package/{src → cjs}/Snapshot.d.ts +2 -0
  40. package/cjs/Snapshot.d.ts.map +1 -0
  41. package/{src → cjs}/Snapshot.js +9 -1
  42. package/cjs/Snapshot.js.map +1 -0
  43. package/{src → cjs}/Volume.d.ts +1 -0
  44. package/cjs/Volume.d.ts.map +1 -0
  45. package/cjs/Volume.js.map +1 -0
  46. package/{src → cjs}/code-toolbox/SandboxJsCodeToolbox.d.ts +1 -0
  47. package/cjs/code-toolbox/SandboxJsCodeToolbox.d.ts.map +1 -0
  48. package/cjs/code-toolbox/SandboxJsCodeToolbox.js.map +1 -0
  49. package/{src → cjs}/code-toolbox/SandboxPythonCodeToolbox.d.ts +1 -0
  50. package/cjs/code-toolbox/SandboxPythonCodeToolbox.d.ts.map +1 -0
  51. package/cjs/code-toolbox/SandboxPythonCodeToolbox.js.map +1 -0
  52. package/{src → cjs}/code-toolbox/SandboxTsCodeToolbox.d.ts +1 -0
  53. package/cjs/code-toolbox/SandboxTsCodeToolbox.d.ts.map +1 -0
  54. package/cjs/code-toolbox/SandboxTsCodeToolbox.js.map +1 -0
  55. package/{src → cjs}/errors/DaytonaError.d.ts +1 -0
  56. package/cjs/errors/DaytonaError.d.ts.map +1 -0
  57. package/cjs/errors/DaytonaError.js.map +1 -0
  58. package/{src → cjs}/index.d.ts +1 -0
  59. package/cjs/index.d.ts.map +1 -0
  60. package/cjs/index.js.map +1 -0
  61. package/cjs/package.json +3 -0
  62. package/{src → cjs}/types/Charts.d.ts +1 -0
  63. package/cjs/types/Charts.d.ts.map +1 -0
  64. package/cjs/types/Charts.js.map +1 -0
  65. package/{src → cjs}/types/CodeInterpreter.d.ts +1 -0
  66. package/cjs/types/CodeInterpreter.d.ts.map +1 -0
  67. package/cjs/types/CodeInterpreter.js.map +1 -0
  68. package/{src → cjs}/types/ExecuteResponse.d.ts +1 -0
  69. package/cjs/types/ExecuteResponse.d.ts.map +1 -0
  70. package/cjs/types/ExecuteResponse.js.map +1 -0
  71. package/{src → cjs}/types/Pty.d.ts +1 -0
  72. package/cjs/types/Pty.d.ts.map +1 -0
  73. package/cjs/types/Pty.js.map +1 -0
  74. package/{src → cjs}/utils/ArtifactParser.d.ts +1 -0
  75. package/cjs/utils/ArtifactParser.d.ts.map +1 -0
  76. package/cjs/utils/ArtifactParser.js.map +1 -0
  77. package/{src → cjs}/utils/Binary.d.ts +1 -0
  78. package/cjs/utils/Binary.d.ts.map +1 -0
  79. package/cjs/utils/Binary.js.map +1 -0
  80. package/{src → cjs}/utils/FileTransfer.d.ts +1 -0
  81. package/cjs/utils/FileTransfer.d.ts.map +1 -0
  82. package/cjs/utils/FileTransfer.js.map +1 -0
  83. package/{src → cjs}/utils/Import.d.ts +2 -15
  84. package/cjs/utils/Import.d.ts.map +1 -0
  85. package/cjs/utils/Import.js +81 -0
  86. package/cjs/utils/Import.js.map +1 -0
  87. package/{src → cjs}/utils/Multipart.d.ts +1 -0
  88. package/cjs/utils/Multipart.d.ts.map +1 -0
  89. package/cjs/utils/Multipart.js.map +1 -0
  90. package/{src → cjs}/utils/Runtime.d.ts +1 -0
  91. package/cjs/utils/Runtime.d.ts.map +1 -0
  92. package/cjs/utils/Runtime.js.map +1 -0
  93. package/{src → cjs}/utils/Stream.d.ts +1 -0
  94. package/cjs/utils/Stream.d.ts.map +1 -0
  95. package/cjs/utils/Stream.js.map +1 -0
  96. package/{src → cjs}/utils/WebSocket.d.ts +1 -0
  97. package/cjs/utils/WebSocket.d.ts.map +1 -0
  98. package/cjs/utils/WebSocket.js.map +1 -0
  99. package/esm/CodeInterpreter.d.ts +96 -0
  100. package/esm/CodeInterpreter.d.ts.map +1 -0
  101. package/esm/CodeInterpreter.js +295 -0
  102. package/esm/CodeInterpreter.js.map +1 -0
  103. package/esm/ComputerUse.d.ts +443 -0
  104. package/esm/ComputerUse.d.ts.map +1 -0
  105. package/esm/ComputerUse.js +509 -0
  106. package/esm/ComputerUse.js.map +1 -0
  107. package/esm/Daytona.d.ts +354 -0
  108. package/esm/Daytona.d.ts.map +1 -0
  109. package/esm/Daytona.js +410 -0
  110. package/esm/Daytona.js.map +1 -0
  111. package/esm/FileSystem.d.ts +328 -0
  112. package/esm/FileSystem.d.ts.map +1 -0
  113. package/esm/FileSystem.js +331 -0
  114. package/esm/FileSystem.js.map +1 -0
  115. package/esm/Git.d.ts +203 -0
  116. package/esm/Git.d.ts.map +1 -0
  117. package/esm/Git.js +260 -0
  118. package/esm/Git.js.map +1 -0
  119. package/esm/Image.d.ts +285 -0
  120. package/esm/Image.d.ts.map +1 -0
  121. package/esm/Image.js +569 -0
  122. package/esm/Image.js.map +1 -0
  123. package/esm/LspServer.d.ts +172 -0
  124. package/esm/LspServer.d.ts.map +1 -0
  125. package/esm/LspServer.js +204 -0
  126. package/esm/LspServer.js.map +1 -0
  127. package/esm/ObjectStorage.d.ts +79 -0
  128. package/esm/ObjectStorage.d.ts.map +1 -0
  129. package/esm/ObjectStorage.js +187 -0
  130. package/esm/ObjectStorage.js.map +1 -0
  131. package/esm/Process.d.ts +442 -0
  132. package/esm/Process.d.ts.map +1 -0
  133. package/esm/Process.js +644 -0
  134. package/esm/Process.js.map +1 -0
  135. package/esm/PtyHandle.d.ts +155 -0
  136. package/esm/PtyHandle.d.ts.map +1 -0
  137. package/esm/PtyHandle.js +374 -0
  138. package/esm/PtyHandle.js.map +1 -0
  139. package/esm/README.md +147 -0
  140. package/esm/Sandbox.d.ts +359 -0
  141. package/esm/Sandbox.d.ts.map +1 -0
  142. package/esm/Sandbox.js +532 -0
  143. package/esm/Sandbox.js.map +1 -0
  144. package/esm/Snapshot.d.ts +138 -0
  145. package/esm/Snapshot.d.ts.map +1 -0
  146. package/esm/Snapshot.js +207 -0
  147. package/esm/Snapshot.js.map +1 -0
  148. package/esm/Volume.d.ts +84 -0
  149. package/esm/Volume.d.ts.map +1 -0
  150. package/esm/Volume.js +95 -0
  151. package/esm/Volume.js.map +1 -0
  152. package/esm/code-toolbox/SandboxJsCodeToolbox.d.ts +6 -0
  153. package/esm/code-toolbox/SandboxJsCodeToolbox.d.ts.map +1 -0
  154. package/esm/code-toolbox/SandboxJsCodeToolbox.js +13 -0
  155. package/esm/code-toolbox/SandboxJsCodeToolbox.js.map +1 -0
  156. package/esm/code-toolbox/SandboxPythonCodeToolbox.d.ts +12 -0
  157. package/esm/code-toolbox/SandboxPythonCodeToolbox.d.ts.map +1 -0
  158. package/esm/code-toolbox/SandboxPythonCodeToolbox.js +355 -0
  159. package/esm/code-toolbox/SandboxPythonCodeToolbox.js.map +1 -0
  160. package/esm/code-toolbox/SandboxTsCodeToolbox.d.ts +6 -0
  161. package/esm/code-toolbox/SandboxTsCodeToolbox.d.ts.map +1 -0
  162. package/esm/code-toolbox/SandboxTsCodeToolbox.js +14 -0
  163. package/esm/code-toolbox/SandboxTsCodeToolbox.js.map +1 -0
  164. package/esm/errors/DaytonaError.d.ts +32 -0
  165. package/esm/errors/DaytonaError.d.ts.map +1 -0
  166. package/esm/errors/DaytonaError.js +44 -0
  167. package/esm/errors/DaytonaError.js.map +1 -0
  168. package/esm/index.d.ts +22 -0
  169. package/esm/index.d.ts.map +1 -0
  170. package/esm/index.js +22 -0
  171. package/esm/index.js.map +1 -0
  172. package/esm/package.json +3 -0
  173. package/esm/types/Charts.d.ts +152 -0
  174. package/esm/types/Charts.d.ts.map +1 -0
  175. package/esm/types/Charts.js +42 -0
  176. package/esm/types/Charts.js.map +1 -0
  177. package/esm/types/CodeInterpreter.d.ts +77 -0
  178. package/esm/types/CodeInterpreter.d.ts.map +1 -0
  179. package/esm/types/CodeInterpreter.js +6 -0
  180. package/esm/types/CodeInterpreter.js.map +1 -0
  181. package/esm/types/ExecuteResponse.d.ts +26 -0
  182. package/esm/types/ExecuteResponse.d.ts.map +1 -0
  183. package/esm/types/ExecuteResponse.js +6 -0
  184. package/esm/types/ExecuteResponse.js.map +1 -0
  185. package/esm/types/Pty.d.ts +48 -0
  186. package/esm/types/Pty.d.ts.map +1 -0
  187. package/esm/types/Pty.js +6 -0
  188. package/esm/types/Pty.js.map +1 -0
  189. package/esm/utils/ArtifactParser.d.ts +14 -0
  190. package/esm/utils/ArtifactParser.d.ts.map +1 -0
  191. package/esm/utils/ArtifactParser.js +51 -0
  192. package/esm/utils/ArtifactParser.js.map +1 -0
  193. package/esm/utils/Binary.d.ts +39 -0
  194. package/esm/utils/Binary.d.ts.map +1 -0
  195. package/esm/utils/Binary.js +157 -0
  196. package/esm/utils/Binary.js.map +1 -0
  197. package/esm/utils/FileTransfer.d.ts +15 -0
  198. package/esm/utils/FileTransfer.d.ts.map +1 -0
  199. package/esm/utils/FileTransfer.js +209 -0
  200. package/esm/utils/FileTransfer.js.map +1 -0
  201. package/esm/utils/Import.d.ts +211 -0
  202. package/esm/utils/Import.d.ts.map +1 -0
  203. package/esm/utils/Import.js +45 -0
  204. package/esm/utils/Import.js.map +1 -0
  205. package/esm/utils/Multipart.d.ts +27 -0
  206. package/esm/utils/Multipart.d.ts.map +1 -0
  207. package/esm/utils/Multipart.js +107 -0
  208. package/esm/utils/Multipart.js.map +1 -0
  209. package/esm/utils/Runtime.d.ts +37 -0
  210. package/esm/utils/Runtime.d.ts.map +1 -0
  211. package/esm/utils/Runtime.js +57 -0
  212. package/esm/utils/Runtime.js.map +1 -0
  213. package/esm/utils/Stream.d.ts +20 -0
  214. package/esm/utils/Stream.d.ts.map +1 -0
  215. package/esm/utils/Stream.js +360 -0
  216. package/esm/utils/Stream.js.map +1 -0
  217. package/esm/utils/WebSocket.d.ts +10 -0
  218. package/esm/utils/WebSocket.d.ts.map +1 -0
  219. package/esm/utils/WebSocket.js +22 -0
  220. package/esm/utils/WebSocket.js.map +1 -0
  221. package/package.json +20 -8
  222. package/src/CodeInterpreter.js.map +0 -1
  223. package/src/ComputerUse.js.map +0 -1
  224. package/src/Daytona.js.map +0 -1
  225. package/src/FileSystem.js.map +0 -1
  226. package/src/Git.js.map +0 -1
  227. package/src/Image.js.map +0 -1
  228. package/src/LspServer.js.map +0 -1
  229. package/src/ObjectStorage.js.map +0 -1
  230. package/src/Process.js.map +0 -1
  231. package/src/PtyHandle.js.map +0 -1
  232. package/src/Sandbox.js.map +0 -1
  233. package/src/Snapshot.js.map +0 -1
  234. package/src/Volume.js.map +0 -1
  235. package/src/code-toolbox/SandboxJsCodeToolbox.js.map +0 -1
  236. package/src/code-toolbox/SandboxPythonCodeToolbox.js.map +0 -1
  237. package/src/code-toolbox/SandboxTsCodeToolbox.js.map +0 -1
  238. package/src/errors/DaytonaError.js.map +0 -1
  239. package/src/index.js.map +0 -1
  240. package/src/types/Charts.js.map +0 -1
  241. package/src/types/CodeInterpreter.js.map +0 -1
  242. package/src/types/ExecuteResponse.js.map +0 -1
  243. package/src/types/Pty.js.map +0 -1
  244. package/src/utils/ArtifactParser.js.map +0 -1
  245. package/src/utils/Binary.js.map +0 -1
  246. package/src/utils/FileTransfer.js.map +0 -1
  247. package/src/utils/Import.js +0 -77
  248. package/src/utils/Import.js.map +0 -1
  249. package/src/utils/Multipart.js.map +0 -1
  250. package/src/utils/Runtime.js.map +0 -1
  251. package/src/utils/Stream.js.map +0 -1
  252. package/src/utils/WebSocket.js.map +0 -1
  253. /package/{src → cjs}/CodeInterpreter.js +0 -0
  254. /package/{src → cjs}/ComputerUse.js +0 -0
  255. /package/{src → cjs}/FileSystem.js +0 -0
  256. /package/{src → cjs}/Git.js +0 -0
  257. /package/{src → cjs}/LspServer.js +0 -0
  258. /package/{src → cjs}/ObjectStorage.js +0 -0
  259. /package/{src → cjs}/Process.js +0 -0
  260. /package/{src → cjs}/PtyHandle.js +0 -0
  261. /package/{src → cjs}/Volume.js +0 -0
  262. /package/{src → cjs}/code-toolbox/SandboxJsCodeToolbox.js +0 -0
  263. /package/{src → cjs}/code-toolbox/SandboxPythonCodeToolbox.js +0 -0
  264. /package/{src → cjs}/code-toolbox/SandboxTsCodeToolbox.js +0 -0
  265. /package/{src → cjs}/errors/DaytonaError.js +0 -0
  266. /package/{src → cjs}/index.js +0 -0
  267. /package/{src → cjs}/types/Charts.js +0 -0
  268. /package/{src → cjs}/types/CodeInterpreter.js +0 -0
  269. /package/{src → cjs}/types/ExecuteResponse.js +0 -0
  270. /package/{src → cjs}/types/Pty.js +0 -0
  271. /package/{src → cjs}/utils/ArtifactParser.js +0 -0
  272. /package/{src → cjs}/utils/Binary.js +0 -0
  273. /package/{src → cjs}/utils/FileTransfer.js +0 -0
  274. /package/{src → cjs}/utils/Multipart.js +0 -0
  275. /package/{src → cjs}/utils/Runtime.js +0 -0
  276. /package/{src → cjs}/utils/Stream.js +0 -0
  277. /package/{src → cjs}/utils/WebSocket.js +0 -0
@@ -0,0 +1,152 @@
1
+ /**
2
+ * Chart types
3
+ */
4
+ export declare enum ChartType {
5
+ LINE = "line",
6
+ SCATTER = "scatter",
7
+ BAR = "bar",
8
+ PIE = "pie",
9
+ BOX_AND_WHISKER = "box_and_whisker",
10
+ COMPOSITE_CHART = "composite_chart",
11
+ UNKNOWN = "unknown"
12
+ }
13
+ /**
14
+ * Represents a chart with metadata from matplotlib.
15
+ */
16
+ export type Chart = {
17
+ /** The type of chart */
18
+ type: ChartType;
19
+ /** The title of the chart */
20
+ title: string;
21
+ /** The elements of the chart */
22
+ elements: any[];
23
+ /** The PNG representation of the chart encoded in base64 */
24
+ png?: string;
25
+ };
26
+ /**
27
+ * Represents a 2D chart with metadata.
28
+ */
29
+ export type Chart2D = Chart & {
30
+ /** The label of the x-axis */
31
+ x_label?: string;
32
+ /** The label of the y-axis */
33
+ y_label?: string;
34
+ };
35
+ /**
36
+ * Represents a point in a 2D chart.
37
+ */
38
+ export type PointData = {
39
+ /** The label of the point */
40
+ label: string;
41
+ /** The points of the chart */
42
+ points: [number | string, number | string][];
43
+ };
44
+ /**
45
+ * Represents a point chart with metadata.
46
+ */
47
+ export type PointChart = Chart2D & {
48
+ /** The ticks of the x-axis */
49
+ x_ticks: (number | string)[];
50
+ /** The scale of the x-axis */
51
+ x_scale: string;
52
+ /** The labels of the x-axis */
53
+ x_tick_labels: string[];
54
+ /** The ticks of the y-axis */
55
+ y_ticks: (number | string)[];
56
+ /** The scale of the y-axis */
57
+ y_scale: string;
58
+ /** The labels of the y-axis */
59
+ y_tick_labels: string[];
60
+ /** The points of the chart */
61
+ elements: PointData[];
62
+ };
63
+ /**
64
+ * Represents a line chart with metadata.
65
+ */
66
+ export type LineChart = PointChart & {
67
+ /** The type of chart */
68
+ type: ChartType.LINE;
69
+ };
70
+ /**
71
+ * Represents a scatter chart with metadata.
72
+ */
73
+ export type ScatterChart = PointChart & {
74
+ /** The type of chart */
75
+ type: ChartType.SCATTER;
76
+ };
77
+ /**
78
+ * Represents a bar in a bar chart.
79
+ */
80
+ export type BarData = {
81
+ /** The label of the bar */
82
+ label: string;
83
+ /** The value of the bar */
84
+ value: string;
85
+ /** The group of the bar */
86
+ group: string;
87
+ };
88
+ /**
89
+ * Represents a bar chart with metadata.
90
+ */
91
+ export type BarChart = Chart2D & {
92
+ /** The type of chart */
93
+ type: ChartType.BAR;
94
+ /** The bars of the chart */
95
+ elements: BarData[];
96
+ };
97
+ /**
98
+ * Represents a pie slice in a pie chart.
99
+ */
100
+ export type PieData = {
101
+ /** The label of the pie slice */
102
+ label: string;
103
+ /** The angle of the pie slice */
104
+ angle: number;
105
+ /** The radius of the pie slice */
106
+ radius: number;
107
+ };
108
+ /**
109
+ * Represents a pie chart with metadata.
110
+ */
111
+ export type PieChart = Chart & {
112
+ /** The type of chart */
113
+ type: ChartType.PIE;
114
+ /** The pie slices of the chart */
115
+ elements: PieData[];
116
+ };
117
+ /**
118
+ * Represents a box and whisker in a box and whisker chart.
119
+ */
120
+ export type BoxAndWhiskerData = {
121
+ /** The label of the box and whisker */
122
+ label: string;
123
+ /** The minimum value of the box and whisker */
124
+ min: number;
125
+ /** The first quartile of the box and whisker */
126
+ first_quartile: number;
127
+ /** The median of the box and whisker */
128
+ median: number;
129
+ /** The third quartile of the box and whisker */
130
+ max: number;
131
+ outliers: number[];
132
+ };
133
+ /**
134
+ * Represents a box and whisker chart with metadata.
135
+ */
136
+ export type BoxAndWhiskerChart = Chart2D & {
137
+ /** The type of chart */
138
+ type: ChartType.BOX_AND_WHISKER;
139
+ /** The box and whiskers of the chart */
140
+ elements: BoxAndWhiskerData[];
141
+ };
142
+ /**
143
+ * Represents a composite chart with metadata.
144
+ */
145
+ export type CompositeChart = Chart & {
146
+ /** The type of chart */
147
+ type: ChartType.COMPOSITE_CHART;
148
+ /** The charts of the composite chart */
149
+ elements: Chart[];
150
+ };
151
+ export declare function parseChart(data: any): Chart;
152
+ //# sourceMappingURL=Charts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Charts.d.ts","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/Charts.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ /**
6
+ * Chart types
7
+ */
8
+ export var ChartType;
9
+ (function (ChartType) {
10
+ ChartType["LINE"] = "line";
11
+ ChartType["SCATTER"] = "scatter";
12
+ ChartType["BAR"] = "bar";
13
+ ChartType["PIE"] = "pie";
14
+ ChartType["BOX_AND_WHISKER"] = "box_and_whisker";
15
+ ChartType["COMPOSITE_CHART"] = "composite_chart";
16
+ ChartType["UNKNOWN"] = "unknown";
17
+ })(ChartType || (ChartType = {}));
18
+ export function parseChart(data) {
19
+ switch (data.type) {
20
+ case ChartType.LINE:
21
+ return { ...data };
22
+ case ChartType.SCATTER:
23
+ return { ...data };
24
+ case ChartType.BAR:
25
+ return { ...data };
26
+ case ChartType.PIE:
27
+ return { ...data };
28
+ case ChartType.BOX_AND_WHISKER:
29
+ return { ...data };
30
+ case ChartType.COMPOSITE_CHART:
31
+ // eslint-disable-next-line no-case-declarations
32
+ const charts = data.elements.map((g) => parseChart(g));
33
+ delete data.data;
34
+ return {
35
+ ...data,
36
+ data: charts,
37
+ };
38
+ default:
39
+ return { ...data, type: ChartType.UNKNOWN };
40
+ }
41
+ }
42
+ //# sourceMappingURL=Charts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Charts.js","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/Charts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,0BAAa,CAAA;IACb,gCAAmB,CAAA;IACnB,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,gDAAmC,CAAA;IACnC,gDAAmC,CAAA;IACnC,gCAAmB,CAAA;AACrB,CAAC,EARW,SAAS,KAAT,SAAS,QAQpB;AAyJD,MAAM,UAAU,UAAU,CAAC,IAAS;IAClC,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,SAAS,CAAC,IAAI;YACjB,OAAO,EAAE,GAAG,IAAI,EAAe,CAAA;QACjC,KAAK,SAAS,CAAC,OAAO;YACpB,OAAO,EAAE,GAAG,IAAI,EAAkB,CAAA;QACpC,KAAK,SAAS,CAAC,GAAG;YAChB,OAAO,EAAE,GAAG,IAAI,EAAc,CAAA;QAChC,KAAK,SAAS,CAAC,GAAG;YAChB,OAAO,EAAE,GAAG,IAAI,EAAc,CAAA;QAChC,KAAK,SAAS,CAAC,eAAe;YAC5B,OAAO,EAAE,GAAG,IAAI,EAAwB,CAAA;QAC1C,KAAK,SAAS,CAAC,eAAe;YAC5B,gDAAgD;YAChD,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;YAC3D,OAAO,IAAI,CAAC,IAAI,CAAA;YAChB,OAAO;gBACL,GAAG,IAAI;gBACP,IAAI,EAAE,MAAM;aACK,CAAA;QACrB;YACE,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAW,CAAA;IACxD,CAAC;AACH,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * @module code-interpreter
3
+ */
4
+ import { InterpreterContext } from '@daytonaio/toolbox-api-client';
5
+ /**
6
+ * Represents stdout or stderr output from code execution.
7
+ */
8
+ export interface OutputMessage {
9
+ /**
10
+ * Output content.
11
+ */
12
+ output: string;
13
+ }
14
+ /**
15
+ * Represents an error that occurred during code execution.
16
+ */
17
+ export interface ExecutionError {
18
+ /**
19
+ * Error type/class name (e.g., "ValueError", "SyntaxError").
20
+ */
21
+ name: string;
22
+ /**
23
+ * Error value/message.
24
+ */
25
+ value: string;
26
+ /**
27
+ * Full traceback for the error, if available.
28
+ */
29
+ traceback?: string;
30
+ }
31
+ /**
32
+ * Result of code execution.
33
+ */
34
+ export interface ExecutionResult {
35
+ /**
36
+ * Standard output captured during execution.
37
+ */
38
+ stdout: string;
39
+ /**
40
+ * Standard error captured during execution.
41
+ */
42
+ stderr: string;
43
+ /**
44
+ * Details about an execution error, if one occurred.
45
+ */
46
+ error?: ExecutionError;
47
+ }
48
+ /**
49
+ * Options for executing code in the interpreter.
50
+ */
51
+ export interface RunCodeOptions {
52
+ /**
53
+ * Interpreter context to run code in.
54
+ */
55
+ context?: InterpreterContext;
56
+ /**
57
+ * Environment variables for this execution.
58
+ */
59
+ envs?: Record<string, string>;
60
+ /**
61
+ * Timeout in seconds. Set to 0 for no timeout. Default is 10 minutes.
62
+ */
63
+ timeout?: number;
64
+ /**
65
+ * Callback for stdout messages.
66
+ */
67
+ onStdout?: (message: OutputMessage) => any | Promise<any>;
68
+ /**
69
+ * Callback for stderr messages.
70
+ */
71
+ onStderr?: (message: OutputMessage) => any | Promise<any>;
72
+ /**
73
+ * Callback for execution errors (e.g., runtime exceptions).
74
+ */
75
+ onError?: (error: ExecutionError) => any | Promise<any>;
76
+ }
77
+ //# sourceMappingURL=CodeInterpreter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeInterpreter.d.ts","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/CodeInterpreter.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAElE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,cAAc,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;IACzD;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;IACzD;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;CACxD"}
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=CodeInterpreter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeInterpreter.js","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/CodeInterpreter.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1,26 @@
1
+ import { Chart } from './Charts.js';
2
+ /**
3
+ * Artifacts from the command execution.
4
+ *
5
+ * @interface
6
+ * @property stdout - Standard output from the command, same as `result` in `ExecuteResponse`
7
+ * @property charts - List of chart metadata from matplotlib
8
+ */
9
+ export interface ExecutionArtifacts {
10
+ stdout: string;
11
+ charts?: Chart[];
12
+ }
13
+ /**
14
+ * Response from the command execution.
15
+ *
16
+ * @interface
17
+ * @property exitCode - The exit code from the command execution
18
+ * @property result - The output from the command execution
19
+ * @property artifacts - Artifacts from the command execution
20
+ */
21
+ export interface ExecuteResponse {
22
+ exitCode: number;
23
+ result: string;
24
+ artifacts?: ExecutionArtifacts;
25
+ }
26
+ //# sourceMappingURL=ExecuteResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecuteResponse.d.ts","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/ExecuteResponse.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,EAAE,CAAA;CACjB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,kBAAkB,CAAA;CAC/B"}
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=ExecuteResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecuteResponse.js","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/ExecuteResponse.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Options for creating a PTY session
3
+ */
4
+ export interface PtyCreateOptions {
5
+ /**
6
+ * The unique identifier for the PTY session
7
+ */
8
+ id: string;
9
+ /**
10
+ * Starting directory for the PTY session, defaults to the sandbox's working directory
11
+ */
12
+ cwd?: string;
13
+ /**
14
+ * Environment variables for the PTY session
15
+ */
16
+ envs?: Record<string, string>;
17
+ /**
18
+ * Number of terminal columns
19
+ */
20
+ cols?: number;
21
+ /**
22
+ * Number of terminal rows
23
+ */
24
+ rows?: number;
25
+ }
26
+ /**
27
+ * Options for connecting to a PTY session
28
+ */
29
+ export interface PtyConnectOptions {
30
+ /**
31
+ * Callback to handle PTY output data
32
+ */
33
+ onData: (data: Uint8Array) => void | Promise<void>;
34
+ }
35
+ /**
36
+ * PTY session result on exit
37
+ */
38
+ export interface PtyResult {
39
+ /**
40
+ * Exit code when the PTY process ends
41
+ */
42
+ exitCode?: number;
43
+ /**
44
+ * Error message if the PTY failed
45
+ */
46
+ error?: string;
47
+ }
48
+ //# sourceMappingURL=Pty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pty.d.ts","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/Pty.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAE7B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=Pty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pty.js","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/Pty.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1,14 @@
1
+ import { ExecutionArtifacts } from '../types/ExecuteResponse.js';
2
+ /**
3
+ * Utility class for parsing artifacts from command output
4
+ */
5
+ export declare class ArtifactParser {
6
+ /**
7
+ * Parses artifacts from command output text
8
+ *
9
+ * @param output - Raw output from command execution
10
+ * @returns Parsed artifacts including stdout and charts
11
+ */
12
+ static parseArtifacts(output: string): ExecutionArtifacts;
13
+ }
14
+ //# sourceMappingURL=ArtifactParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArtifactParser.d.ts","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/utils/ArtifactParser.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAE7D;;GAEG;AACH,qBAAa,cAAc;IACzB;;;;;OAKG;WACW,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB;CAuCjE"}
@@ -0,0 +1,51 @@
1
+ /*
2
+ * Copyright 2025 Daytona Platforms Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { parseChart } from '../types/Charts.js';
6
+ /**
7
+ * Utility class for parsing artifacts from command output
8
+ */
9
+ export class ArtifactParser {
10
+ /**
11
+ * Parses artifacts from command output text
12
+ *
13
+ * @param output - Raw output from command execution
14
+ * @returns Parsed artifacts including stdout and charts
15
+ */
16
+ static parseArtifacts(output) {
17
+ const charts = [];
18
+ let stdout = output;
19
+ // Split output by lines to find artifact markers
20
+ const lines = output.split('\n');
21
+ const artifactLines = [];
22
+ for (const line of lines) {
23
+ // Look for the artifact marker pattern
24
+ if (line.startsWith('dtn_artifact_k39fd2:')) {
25
+ artifactLines.push(line);
26
+ try {
27
+ const artifactJson = line.substring('dtn_artifact_k39fd2:'.length).trim();
28
+ const artifactData = JSON.parse(artifactJson);
29
+ if (artifactData.type === 'chart' && artifactData.value) {
30
+ const chartData = artifactData.value;
31
+ charts.push(parseChart(chartData));
32
+ }
33
+ }
34
+ catch (error) {
35
+ // Skip invalid artifacts
36
+ console.warn('Failed to parse artifact:', error);
37
+ }
38
+ }
39
+ }
40
+ // Remove artifact lines from stdout along with their following newlines
41
+ for (const line of artifactLines) {
42
+ stdout = stdout.replace(line + '\n', '');
43
+ stdout = stdout.replace(line, '');
44
+ }
45
+ return {
46
+ stdout,
47
+ charts: charts.length > 0 ? charts : undefined,
48
+ };
49
+ }
50
+ }
51
+ //# sourceMappingURL=ArtifactParser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArtifactParser.js","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/utils/ArtifactParser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAS,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAGnD;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB;;;;;OAKG;IACI,MAAM,CAAC,cAAc,CAAC,MAAc;QACzC,MAAM,MAAM,GAAY,EAAE,CAAA;QAC1B,IAAI,MAAM,GAAG,MAAM,CAAA;QAEnB,iDAAiD;QACjD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAChC,MAAM,aAAa,GAAa,EAAE,CAAA;QAElC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,uCAAuC;YACvC,IAAI,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAAE,CAAC;gBAC5C,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBAExB,IAAI,CAAC;oBACH,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAA;oBACzE,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;oBAE7C,IAAI,YAAY,CAAC,IAAI,KAAK,OAAO,IAAI,YAAY,CAAC,KAAK,EAAE,CAAC;wBACxD,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAA;wBACpC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAA;oBACpC,CAAC;gBACH,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,yBAAyB;oBACzB,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAA;gBAClD,CAAC;YACH,CAAC;QACH,CAAC;QAED,wEAAwE;QACxE,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE,CAAC;YACjC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,EAAE,EAAE,CAAC,CAAA;YACxC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;QACnC,CAAC;QAED,OAAO;YACL,MAAM;YACN,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;SAC/C,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,39 @@
1
+ import { Buffer } from 'buffer';
2
+ /**
3
+ * Converts various data types to Uint8Array
4
+ */
5
+ export declare function toUint8Array(data: string | ArrayBuffer | ArrayBufferView): Uint8Array;
6
+ /**
7
+ * Concatenates multiple Uint8Array chunks into a single Uint8Array
8
+ */
9
+ export declare function concatUint8Arrays(parts: Uint8Array[]): Uint8Array;
10
+ /**
11
+ * Converts Uint8Array to Buffer (uses polyfill in non-Node environments)
12
+ */
13
+ export declare function toBuffer(data: Uint8Array): Buffer;
14
+ /**
15
+ * Decodes Uint8Array to UTF-8 string
16
+ */
17
+ export declare function utf8Decode(data: Uint8Array): string;
18
+ /**
19
+ * Finds all occurrences of a pattern in a byte buffer
20
+ */
21
+ export declare function findAllBytes(buffer: Uint8Array, pattern: Uint8Array): number[];
22
+ /**
23
+ * Finds the first occurrence of a pattern in a byte buffer within a range
24
+ */
25
+ export declare function findBytesInRange(buffer: Uint8Array, start: number, end: number, pattern: Uint8Array): number;
26
+ /**
27
+ * Checks if a sequence starts at a given position in a byte buffer
28
+ * Returns the position after the sequence if found, -1 otherwise
29
+ */
30
+ export declare function indexAfterSequence(buffer: Uint8Array, start: number, sequence: Uint8Array): number;
31
+ /**
32
+ * Collects all bytes from various stream types into a single Uint8Array
33
+ */
34
+ export declare function collectStreamBytes(stream: any): Promise<Uint8Array>;
35
+ /**
36
+ * Checks if value is a File object (browser environment)
37
+ */
38
+ export declare function isFile(value: any): boolean;
39
+ //# sourceMappingURL=Binary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Binary.d.ts","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/utils/Binary.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAG/B;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,UAAU,CAWrF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,UAAU,CASjE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEjD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEnD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,GAAG,MAAM,EAAE,CAmB9E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,MAAM,CAc5G;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,GAAG,MAAM,CAKlG;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAgDzE;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAG1C"}