@distilled.cloud/daytona 0.0.0-placeholder → 1.0.0-rc.13

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 (203) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +34 -0
  3. package/lib/credentials.d.ts +46 -0
  4. package/lib/credentials.d.ts.map +1 -0
  5. package/lib/credentials.js +67 -0
  6. package/lib/credentials.js.map +1 -0
  7. package/lib/endpoints.d.ts +15 -0
  8. package/lib/endpoints.d.ts.map +1 -0
  9. package/lib/endpoints.js +28 -0
  10. package/lib/endpoints.js.map +1 -0
  11. package/lib/errors.d.ts +53 -0
  12. package/lib/errors.d.ts.map +1 -0
  13. package/lib/errors.js +30 -0
  14. package/lib/errors.js.map +1 -0
  15. package/lib/index.d.ts +30 -0
  16. package/lib/index.d.ts.map +1 -0
  17. package/lib/index.js +30 -0
  18. package/lib/index.js.map +1 -0
  19. package/lib/pagination.d.ts +10 -0
  20. package/lib/pagination.d.ts.map +1 -0
  21. package/lib/pagination.js +10 -0
  22. package/lib/pagination.js.map +1 -0
  23. package/lib/protocol.d.ts +18 -0
  24. package/lib/protocol.d.ts.map +1 -0
  25. package/lib/protocol.js +75 -0
  26. package/lib/protocol.js.map +1 -0
  27. package/lib/response-validation.test.d.ts +4 -0
  28. package/lib/response-validation.test.d.ts.map +1 -0
  29. package/lib/response-validation.test.js +31 -0
  30. package/lib/response-validation.test.js.map +1 -0
  31. package/lib/retry.d.ts +50 -0
  32. package/lib/retry.d.ts.map +1 -0
  33. package/lib/retry.js +43 -0
  34. package/lib/retry.js.map +1 -0
  35. package/lib/services/api_keys.d.ts +120 -0
  36. package/lib/services/api_keys.d.ts.map +1 -0
  37. package/lib/services/api_keys.js +126 -0
  38. package/lib/services/api_keys.js.map +1 -0
  39. package/lib/services/audit.d.ts +159 -0
  40. package/lib/services/audit.d.ts.map +1 -0
  41. package/lib/services/audit.js +126 -0
  42. package/lib/services/audit.js.map +1 -0
  43. package/lib/services/computer_use.d.ts +484 -0
  44. package/lib/services/computer_use.d.ts.map +1 -0
  45. package/lib/services/computer_use.js +672 -0
  46. package/lib/services/computer_use.js.map +1 -0
  47. package/lib/services/config.d.ts +138 -0
  48. package/lib/services/config.d.ts.map +1 -0
  49. package/lib/services/config.js +88 -0
  50. package/lib/services/config.js.map +1 -0
  51. package/lib/services/docker_registry.d.ts +126 -0
  52. package/lib/services/docker_registry.d.ts.map +1 -0
  53. package/lib/services/docker_registry.js +135 -0
  54. package/lib/services/docker_registry.js.map +1 -0
  55. package/lib/services/file_system.d.ts +203 -0
  56. package/lib/services/file_system.d.ts.map +1 -0
  57. package/lib/services/file_system.js +255 -0
  58. package/lib/services/file_system.js.map +1 -0
  59. package/lib/services/git.d.ts +338 -0
  60. package/lib/services/git.d.ts.map +1 -0
  61. package/lib/services/git.js +417 -0
  62. package/lib/services/git.js.map +1 -0
  63. package/lib/services/health.d.ts +41 -0
  64. package/lib/services/health.d.ts.map +1 -0
  65. package/lib/services/health.js +49 -0
  66. package/lib/services/health.js.map +1 -0
  67. package/lib/services/index.d.ts +31 -0
  68. package/lib/services/index.d.ts.map +1 -0
  69. package/lib/services/index.js +32 -0
  70. package/lib/services/index.js.map +1 -0
  71. package/lib/services/info.d.ts +37 -0
  72. package/lib/services/info.d.ts.map +1 -0
  73. package/lib/services/info.js +55 -0
  74. package/lib/services/info.js.map +1 -0
  75. package/lib/services/interpreter.d.ts +56 -0
  76. package/lib/services/interpreter.d.ts.map +1 -0
  77. package/lib/services/interpreter.js +83 -0
  78. package/lib/services/interpreter.js.map +1 -0
  79. package/lib/services/jobs.d.ts +104 -0
  80. package/lib/services/jobs.d.ts.map +1 -0
  81. package/lib/services/jobs.js +94 -0
  82. package/lib/services/jobs.js.map +1 -0
  83. package/lib/services/lsp.d.ts +137 -0
  84. package/lib/services/lsp.d.ts.map +1 -0
  85. package/lib/services/lsp.js +160 -0
  86. package/lib/services/lsp.js.map +1 -0
  87. package/lib/services/object_storage.d.ts +31 -0
  88. package/lib/services/object_storage.d.ts.map +1 -0
  89. package/lib/services/object_storage.js +33 -0
  90. package/lib/services/object_storage.js.map +1 -0
  91. package/lib/services/organizations.d.ts +963 -0
  92. package/lib/services/organizations.d.ts.map +1 -0
  93. package/lib/services/organizations.js +1143 -0
  94. package/lib/services/organizations.js.map +1 -0
  95. package/lib/services/port.d.ts +29 -0
  96. package/lib/services/port.d.ts.map +1 -0
  97. package/lib/services/port.js +41 -0
  98. package/lib/services/port.js.map +1 -0
  99. package/lib/services/preview.d.ts +73 -0
  100. package/lib/services/preview.d.ts.map +1 -0
  101. package/lib/services/preview.js +125 -0
  102. package/lib/services/preview.js.map +1 -0
  103. package/lib/services/process.d.ts +329 -0
  104. package/lib/services/process.d.ts.map +1 -0
  105. package/lib/services/process.js +421 -0
  106. package/lib/services/process.js.map +1 -0
  107. package/lib/services/regions.d.ts +41 -0
  108. package/lib/services/regions.d.ts.map +1 -0
  109. package/lib/services/regions.js +36 -0
  110. package/lib/services/regions.js.map +1 -0
  111. package/lib/services/runners.d.ts +358 -0
  112. package/lib/services/runners.d.ts.map +1 -0
  113. package/lib/services/runners.js +316 -0
  114. package/lib/services/runners.js.map +1 -0
  115. package/lib/services/sandbox.d.ts +1276 -0
  116. package/lib/services/sandbox.d.ts.map +1 -0
  117. package/lib/services/sandbox.js +1218 -0
  118. package/lib/services/sandbox.js.map +1 -0
  119. package/lib/services/secret.d.ts +120 -0
  120. package/lib/services/secret.d.ts.map +1 -0
  121. package/lib/services/secret.js +113 -0
  122. package/lib/services/secret.js.map +1 -0
  123. package/lib/services/server.d.ts +44 -0
  124. package/lib/services/server.d.ts.map +1 -0
  125. package/lib/services/server.js +46 -0
  126. package/lib/services/server.js.map +1 -0
  127. package/lib/services/snapshots.d.ts +208 -0
  128. package/lib/services/snapshots.d.ts.map +1 -0
  129. package/lib/services/snapshots.js +189 -0
  130. package/lib/services/snapshots.js.map +1 -0
  131. package/lib/services/system.d.ts +24 -0
  132. package/lib/services/system.d.ts.map +1 -0
  133. package/lib/services/system.js +31 -0
  134. package/lib/services/system.js.map +1 -0
  135. package/lib/services/telemetry.d.ts +141 -0
  136. package/lib/services/telemetry.d.ts.map +1 -0
  137. package/lib/services/telemetry.js +165 -0
  138. package/lib/services/telemetry.js.map +1 -0
  139. package/lib/services/usage.d.ts +111 -0
  140. package/lib/services/usage.d.ts.map +1 -0
  141. package/lib/services/usage.js +146 -0
  142. package/lib/services/usage.js.map +1 -0
  143. package/lib/services/users.d.ts +125 -0
  144. package/lib/services/users.d.ts.map +1 -0
  145. package/lib/services/users.js +172 -0
  146. package/lib/services/users.js.map +1 -0
  147. package/lib/services/volumes.d.ts +83 -0
  148. package/lib/services/volumes.d.ts.map +1 -0
  149. package/lib/services/volumes.js +96 -0
  150. package/lib/services/volumes.js.map +1 -0
  151. package/lib/services/warm_pools.d.ts +79 -0
  152. package/lib/services/warm_pools.d.ts.map +1 -0
  153. package/lib/services/warm_pools.js +90 -0
  154. package/lib/services/warm_pools.js.map +1 -0
  155. package/lib/services/webhooks.d.ts +67 -0
  156. package/lib/services/webhooks.d.ts.map +1 -0
  157. package/lib/services/webhooks.js +103 -0
  158. package/lib/services/webhooks.js.map +1 -0
  159. package/lib/traits.d.ts +10 -0
  160. package/lib/traits.d.ts.map +1 -0
  161. package/lib/traits.js +11 -0
  162. package/lib/traits.js.map +1 -0
  163. package/package.json +78 -7
  164. package/src/credentials.ts +135 -0
  165. package/src/endpoints.ts +28 -0
  166. package/src/errors.ts +85 -0
  167. package/src/index.ts +33 -0
  168. package/src/pagination.ts +9 -0
  169. package/src/protocol.ts +108 -0
  170. package/src/response-validation.test.ts +45 -0
  171. package/src/retry.ts +74 -0
  172. package/src/services/api_keys.ts +378 -0
  173. package/src/services/audit.ts +416 -0
  174. package/src/services/computer_use.ts +1496 -0
  175. package/src/services/config.ts +256 -0
  176. package/src/services/docker_registry.ts +325 -0
  177. package/src/services/file_system.ts +575 -0
  178. package/src/services/git.ts +928 -0
  179. package/src/services/health.ts +116 -0
  180. package/src/services/index.ts +31 -0
  181. package/src/services/info.ts +116 -0
  182. package/src/services/interpreter.ts +182 -0
  183. package/src/services/jobs.ts +249 -0
  184. package/src/services/lsp.ts +367 -0
  185. package/src/services/object_storage.ts +75 -0
  186. package/src/services/organizations.ts +2712 -0
  187. package/src/services/port.ts +87 -0
  188. package/src/services/preview.ts +256 -0
  189. package/src/services/process.ts +948 -0
  190. package/src/services/regions.ts +90 -0
  191. package/src/services/runners.ts +811 -0
  192. package/src/services/sandbox.ts +3158 -0
  193. package/src/services/secret.ts +289 -0
  194. package/src/services/server.ts +111 -0
  195. package/src/services/snapshots.ts +508 -0
  196. package/src/services/system.ts +64 -0
  197. package/src/services/telemetry.ts +385 -0
  198. package/src/services/usage.ts +316 -0
  199. package/src/services/users.ts +380 -0
  200. package/src/services/volumes.ts +233 -0
  201. package/src/services/warm_pools.ts +209 -0
  202. package/src/services/webhooks.ts +214 -0
  203. package/src/traits.ts +44 -0
@@ -0,0 +1,37 @@
1
+ import * as S from "@distilled.cloud/core/schema";
2
+ import * as API from "@distilled.cloud/core/api";
3
+ import { type DaytonaOpError, type DaytonaOpContext } from "../protocol.ts";
4
+ export type { DaytonaOpError, DaytonaOpContext };
5
+ export interface GetUserHomeDirRequest {
6
+ }
7
+ export declare const GetUserHomeDirRequest: S.Schema<GetUserHomeDirRequest>;
8
+ export interface UserHomeDirResponse {
9
+ dir: string;
10
+ }
11
+ export declare const UserHomeDirResponse: S.Schema<UserHomeDirResponse>;
12
+ export interface GetVersionRequest {
13
+ }
14
+ export declare const GetVersionRequest: S.Schema<GetVersionRequest>;
15
+ export type GetVersionResponseBodyMap = {
16
+ [key: string]: string | undefined;
17
+ };
18
+ export declare const GetVersionResponseBodyMap: S.Schema<GetVersionResponseBodyMap>;
19
+ export type GetVersionResponse = GetVersionResponseBodyMap;
20
+ export declare const GetVersionResponse: S.Schema<GetVersionResponse>;
21
+ export interface GetWorkDirRequest {
22
+ }
23
+ export declare const GetWorkDirRequest: S.Schema<GetWorkDirRequest>;
24
+ export interface WorkDirResponse {
25
+ dir: string;
26
+ }
27
+ export declare const WorkDirResponse: S.Schema<WorkDirResponse>;
28
+ export type GetUserHomeDirError = DaytonaOpError;
29
+ /** Get user home directory Get the current user home directory path. */
30
+ export declare const getUserHomeDir: API.OperationMethod<GetUserHomeDirRequest, UserHomeDirResponse, GetUserHomeDirError, DaytonaOpContext>;
31
+ export type GetVersionError = DaytonaOpError;
32
+ /** Get version Get the current daemon version */
33
+ export declare const getVersion: API.OperationMethod<GetVersionRequest, GetVersionResponse, GetVersionError, DaytonaOpContext>;
34
+ export type GetWorkDirError = DaytonaOpError;
35
+ /** Get working directory Get the current working directory path. This is default directory used for running commands. */
36
+ export declare const getWorkDir: API.OperationMethod<GetWorkDirRequest, WorkDirResponse, GetWorkDirError, DaytonaOpContext>;
37
+ //# sourceMappingURL=info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../src/services/info.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;AAEjD,MAAM,WAAW,qBAAqB;CAAG;AACzC,eAAO,MAAM,qBAAqB,EAMrB,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAE7C,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;CACb;AACD,eAAO,MAAM,mBAAmB,EAMnB,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAE3C,MAAM,WAAW,iBAAiB;CAAG;AACrC,eAAO,MAAM,iBAAiB,EAIjB,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEzC,MAAM,MAAM,yBAAyB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAC9E,eAAO,MAAM,yBAAyB,EAG1B,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;AAEhD,MAAM,MAAM,kBAAkB,GAAG,yBAAyB,CAAC;AAC3D,eAAO,MAAM,kBAAkB,EAIlB,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAE1C,MAAM,WAAW,iBAAiB;CAAG;AACrC,eAAO,MAAM,iBAAiB,EAIjB,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEzC,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;CACb;AACD,eAAO,MAAM,eAAe,EAMf,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;AAEvC,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC;AACjD,wEAAwE;AACxE,eAAO,MAAM,cAAc,EAAE,GAAG,CAAC,eAAe,CAC9C,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,CAOf,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC;AAC7C,iDAAiD;AACjD,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,eAAe,CAC1C,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,CAOf,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC;AAC7C,yHAAyH;AACzH,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,eAAe,CAC1C,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,gBAAgB,CAOf,CAAC"}
@@ -0,0 +1,55 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-daytona/specs/{openapi,toolbox-openapi,analytics-openapi}.json). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.js";
5
+ import { DaytonaProtocol, } from "../protocol.js";
6
+ import { UnknownDaytonaError } from "../errors.js";
7
+ import * as Retry from "../retry.js";
8
+ export const GetUserHomeDirRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/user-home-dir", code: 200 }))).annotate({
9
+ identifier: "GetUserHomeDirRequest",
10
+ });
11
+ export const UserHomeDirResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
12
+ dir: S.String,
13
+ })).annotate({
14
+ identifier: "UserHomeDirResponse",
15
+ });
16
+ export const GetVersionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/version", code: 200 }))).annotate({
17
+ identifier: "GetVersionRequest",
18
+ });
19
+ export const GetVersionResponseBodyMap = /*@__PURE__*/ S.Record(S.String, S.String);
20
+ export const GetVersionResponse = /*@__PURE__*/ S.suspend(() => GetVersionResponseBodyMap.pipe(T.RawResponseRoot())).annotate({
21
+ identifier: "GetVersionResponse",
22
+ });
23
+ export const GetWorkDirRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/work-dir", code: 200 }))).annotate({
24
+ identifier: "GetWorkDirRequest",
25
+ });
26
+ export const WorkDirResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
27
+ dir: S.String,
28
+ })).annotate({
29
+ identifier: "WorkDirResponse",
30
+ });
31
+ /** Get user home directory Get the current user home directory path. */
32
+ export const getUserHomeDir = /*@__PURE__*/ API.make(() => ({
33
+ input: GetUserHomeDirRequest,
34
+ output: UserHomeDirResponse,
35
+ errors: [UnknownDaytonaError],
36
+ protocol: DaytonaProtocol,
37
+ retry: Retry.Retry,
38
+ }));
39
+ /** Get version Get the current daemon version */
40
+ export const getVersion = /*@__PURE__*/ API.make(() => ({
41
+ input: GetVersionRequest,
42
+ output: GetVersionResponse,
43
+ errors: [UnknownDaytonaError],
44
+ protocol: DaytonaProtocol,
45
+ retry: Retry.Retry,
46
+ }));
47
+ /** Get working directory Get the current working directory path. This is default directory used for running commands. */
48
+ export const getWorkDir = /*@__PURE__*/ API.make(() => ({
49
+ input: GetWorkDirRequest,
50
+ output: WorkDirResponse,
51
+ errors: [UnknownDaytonaError],
52
+ protocol: DaytonaProtocol,
53
+ retry: Retry.Retry,
54
+ }));
55
+ //# sourceMappingURL=info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/services/info.ts"],"names":[],"mappings":"AAAA,+JAA+J;AAC/J,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,eAAe,GAGhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAKrC,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAChE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CACf,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAC5D,CACF,CAAC,QAAQ,CAAC;IACT,UAAU,EAAE,uBAAuB;CACpC,CAA2C,CAAC;AAK7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAC9D,CAAC,CAAC,MAAM,CAAC;IACP,GAAG,EAAE,CAAC,CAAC,MAAM;CACd,CAAC,CACH,CAAC,QAAQ,CAAC;IACT,UAAU,EAAE,qBAAqB;CAClC,CAAyC,CAAC;AAG3C,MAAM,CAAC,MAAM,iBA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AAwE;AACxE,MAAM,CAAC,MAAM,cAAc,GAKvB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,qBAAqB;IAC5B,MAAM,EAAE,mBAAmB;IAC3B,MAAM,EAAE,CAAC,mBAAmB,CAAC;IAC7B,QAAQ,EAAE,eAAe;IACzB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC;AAGJ,iDAAiD;AACjD,MAAM,CAAC,MAAM,UAAU,GAKnB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,iBAAiB;IACxB,MAAM,EAAE,kBAAkB;IAC1B,MAAM,EAAE,CAAC,mBAAmB,CAAC;IAC7B,QAAQ,EAAE,eAAe;IACzB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC;AAGJ,yHAAyH;AACzH,MAAM,CAAC,MAAM,UAAU,GAKnB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,iBAAiB;IACxB,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,CAAC,mBAAmB,CAAC;IAC7B,QAAQ,EAAE,eAAe;IACzB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,56 @@
1
+ import * as S from "@distilled.cloud/core/schema";
2
+ import * as API from "@distilled.cloud/core/api";
3
+ import { type DaytonaOpError, type DaytonaOpContext } from "../protocol.ts";
4
+ export type { DaytonaOpError, DaytonaOpContext };
5
+ export interface CreateInterpreterContextRequest {
6
+ cwd?: string;
7
+ language?: string;
8
+ }
9
+ export declare const CreateInterpreterContextRequest: S.Schema<CreateInterpreterContextRequest>;
10
+ export interface InterpreterContext {
11
+ active: boolean;
12
+ createdAt: string;
13
+ cwd: string;
14
+ id: string;
15
+ language: string;
16
+ }
17
+ export declare const InterpreterContext: S.Schema<InterpreterContext>;
18
+ export interface DeleteInterpreterContextRequest {
19
+ /** Context ID */
20
+ id: string;
21
+ }
22
+ export declare const DeleteInterpreterContextRequest: S.Schema<DeleteInterpreterContextRequest>;
23
+ export type DeleteInterpreterContextResponseBodyMap = {
24
+ [key: string]: string | undefined;
25
+ };
26
+ export declare const DeleteInterpreterContextResponseBodyMap: S.Schema<DeleteInterpreterContextResponseBodyMap>;
27
+ export type DeleteInterpreterContextResponse = DeleteInterpreterContextResponseBodyMap;
28
+ export declare const DeleteInterpreterContextResponse: S.Schema<DeleteInterpreterContextResponse>;
29
+ export interface ExecuteInterpreterCodeRequest {
30
+ }
31
+ export declare const ExecuteInterpreterCodeRequest: S.Schema<ExecuteInterpreterCodeRequest>;
32
+ export interface ExecuteInterpreterCodeResponse {
33
+ }
34
+ export declare const ExecuteInterpreterCodeResponse: S.Schema<ExecuteInterpreterCodeResponse>;
35
+ export interface ListInterpreterContextsRequest {
36
+ }
37
+ export declare const ListInterpreterContextsRequest: S.Schema<ListInterpreterContextsRequest>;
38
+ export type ListContextsResponseContextsList = Array<InterpreterContext>;
39
+ export declare const ListContextsResponseContextsList: S.Schema<ListContextsResponseContextsList>;
40
+ export interface ListContextsResponse {
41
+ contexts: ListContextsResponseContextsList;
42
+ }
43
+ export declare const ListContextsResponse: S.Schema<ListContextsResponse>;
44
+ export type CreateInterpreterContextError = DaytonaOpError;
45
+ /** Create a new interpreter context Creates a new isolated interpreter context with optional working directory and language */
46
+ export declare const createInterpreterContext: API.OperationMethod<CreateInterpreterContextRequest, InterpreterContext, CreateInterpreterContextError, DaytonaOpContext>;
47
+ export type DeleteInterpreterContextError = DaytonaOpError;
48
+ /** Delete an interpreter context Deletes an interpreter context and shuts down its worker process */
49
+ export declare const deleteInterpreterContext: API.OperationMethod<DeleteInterpreterContextRequest, DeleteInterpreterContextResponse, DeleteInterpreterContextError, DaytonaOpContext>;
50
+ export type ExecuteInterpreterCodeError = DaytonaOpError;
51
+ /** Execute code in an interpreter context Executes code in a specified context (or default context if not specified) via WebSocket streaming */
52
+ export declare const executeInterpreterCode: API.OperationMethod<ExecuteInterpreterCodeRequest, ExecuteInterpreterCodeResponse, ExecuteInterpreterCodeError, DaytonaOpContext>;
53
+ export type ListInterpreterContextsError = DaytonaOpError;
54
+ /** List all user-created interpreter contexts Returns information about all user-created interpreter contexts (excludes default context) */
55
+ export declare const listInterpreterContexts: API.OperationMethod<ListInterpreterContextsRequest, ListContextsResponse, ListInterpreterContextsError, DaytonaOpContext>;
56
+ //# sourceMappingURL=interpreter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpreter.d.ts","sourceRoot":"","sources":["../../src/services/interpreter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;AAEjD,MAAM,WAAW,+BAA+B;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD,eAAO,MAAM,+BAA+B,EAS/B,CAAC,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC;AAEvD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,eAAO,MAAM,kBAAkB,EAUlB,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAE1C,MAAM,WAAW,+BAA+B;IAC9C,iBAAiB;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ;AACD,eAAO,MAAM,+BAA+B,EAY/B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,eAAO,MAAM,wBAAwB,EAAE,GAAG,CAAC,eAAe,CACxD,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,EAC7B,gBAAgB,CAOf,CAAC;AAEJ,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC;AACzD,gJAAgJ;AAChJ,eAAO,MAAM,sBAAsB,EAAE,GAAG,CAAC,eAAe,CACtD,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,gBAAgB,CAOf,CAAC;AAEJ,MAAM,MAAM,4BAA4B,GAAG,cAAc,CAAC;AAC1D,4IAA4I;AAC5I,eAAO,MAAM,uBAAuB,EAAE,GAAG,CAAC,eAAe,CACvD,8BAA8B,EAC9B,oBAAoB,EACpB,4BAA4B,EAC5B,gBAAgB,CAOf,CAAC"}
@@ -0,0 +1,83 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-daytona/specs/{openapi,toolbox-openapi,analytics-openapi}.json). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.js";
5
+ import { DaytonaProtocol, } from "../protocol.js";
6
+ import { UnknownDaytonaError } from "../errors.js";
7
+ import * as Retry from "../retry.js";
8
+ export const CreateInterpreterContextRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
9
+ cwd: S.optional(S.String),
10
+ language: S.optional(S.String),
11
+ }).pipe(T.Http({ method: "POST", uri: "/process/interpreter/context", code: 200 }))).annotate({
12
+ identifier: "CreateInterpreterContextRequest",
13
+ });
14
+ export const InterpreterContext = /*@__PURE__*/ S.suspend(() => S.Struct({
15
+ active: S.Boolean,
16
+ createdAt: S.String,
17
+ cwd: S.String,
18
+ id: S.String,
19
+ language: S.String,
20
+ })).annotate({
21
+ identifier: "InterpreterContext",
22
+ });
23
+ export const DeleteInterpreterContextRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
24
+ id: S.String.pipe(T.Label()),
25
+ }).pipe(T.Http({
26
+ method: "DELETE",
27
+ uri: "/process/interpreter/context/{id}",
28
+ code: 200,
29
+ }))).annotate({
30
+ identifier: "DeleteInterpreterContextRequest",
31
+ });
32
+ export const DeleteInterpreterContextResponseBodyMap = /*@__PURE__*/ S.Record(S.String, S.String);
33
+ export const DeleteInterpreterContextResponse = /*@__PURE__*/ S.suspend(() => DeleteInterpreterContextResponseBodyMap.pipe(T.RawResponseRoot())).annotate({
34
+ identifier: "DeleteInterpreterContextResponse",
35
+ });
36
+ export const ExecuteInterpreterCodeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/process/interpreter/execute", code: 200 }))).annotate({
37
+ identifier: "ExecuteInterpreterCodeRequest",
38
+ });
39
+ export const ExecuteInterpreterCodeResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
40
+ identifier: "ExecuteInterpreterCodeResponse",
41
+ });
42
+ export const ListInterpreterContextsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/process/interpreter/context", code: 200 }))).annotate({
43
+ identifier: "ListInterpreterContextsRequest",
44
+ });
45
+ export const ListContextsResponseContextsList = /*@__PURE__*/ S.Array(InterpreterContext);
46
+ export const ListContextsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
47
+ contexts: ListContextsResponseContextsList,
48
+ })).annotate({
49
+ identifier: "ListContextsResponse",
50
+ });
51
+ /** Create a new interpreter context Creates a new isolated interpreter context with optional working directory and language */
52
+ export const createInterpreterContext = /*@__PURE__*/ API.make(() => ({
53
+ input: CreateInterpreterContextRequest,
54
+ output: InterpreterContext,
55
+ errors: [UnknownDaytonaError],
56
+ protocol: DaytonaProtocol,
57
+ retry: Retry.Retry,
58
+ }));
59
+ /** Delete an interpreter context Deletes an interpreter context and shuts down its worker process */
60
+ export const deleteInterpreterContext = /*@__PURE__*/ API.make(() => ({
61
+ input: DeleteInterpreterContextRequest,
62
+ output: DeleteInterpreterContextResponse,
63
+ errors: [UnknownDaytonaError],
64
+ protocol: DaytonaProtocol,
65
+ retry: Retry.Retry,
66
+ }));
67
+ /** Execute code in an interpreter context Executes code in a specified context (or default context if not specified) via WebSocket streaming */
68
+ export const executeInterpreterCode = /*@__PURE__*/ API.make(() => ({
69
+ input: ExecuteInterpreterCodeRequest,
70
+ output: ExecuteInterpreterCodeResponse,
71
+ errors: [UnknownDaytonaError],
72
+ protocol: DaytonaProtocol,
73
+ retry: Retry.Retry,
74
+ }));
75
+ /** List all user-created interpreter contexts Returns information about all user-created interpreter contexts (excludes default context) */
76
+ export const listInterpreterContexts = /*@__PURE__*/ API.make(() => ({
77
+ input: ListInterpreterContextsRequest,
78
+ output: ListContextsResponse,
79
+ errors: [UnknownDaytonaError],
80
+ protocol: DaytonaProtocol,
81
+ retry: Retry.Retry,
82
+ }));
83
+ //# sourceMappingURL=interpreter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpreter.js","sourceRoot":"","sources":["../../src/services/interpreter.ts"],"names":[],"mappings":"AAAA,+JAA+J;AAC/J,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,eAAe,GAGhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAQrC,MAAM,CAAC,MAAM,+BAA+B,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAC1E,CAAC,CAAC,MAAM,CAAC;IACP,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IACzB,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;CAC/B,CAAC,CAAC,IAAI,CACL,CAAC,CAAC,IAAI,CAAC,E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1,104 @@
1
+ import * as S from "@distilled.cloud/core/schema";
2
+ import * as API from "@distilled.cloud/core/api";
3
+ import { type DaytonaOpError, type DaytonaOpContext } from "../protocol.ts";
4
+ export type { DaytonaOpError, DaytonaOpContext };
5
+ export interface GetJobRequest {
6
+ /** ID of the job */
7
+ jobId: string;
8
+ }
9
+ export declare const GetJobRequest: S.Schema<GetJobRequest>;
10
+ /** The type of the job */
11
+ export type JobType = "CREATE_SANDBOX" | "START_SANDBOX" | "STOP_SANDBOX" | "DESTROY_SANDBOX" | "RESIZE_SANDBOX" | "CREATE_BACKUP" | "BUILD_SNAPSHOT" | "PULL_SNAPSHOT" | "RECOVER_SANDBOX" | "INSPECT_SNAPSHOT_IN_REGISTRY" | "REMOVE_SNAPSHOT" | "UPDATE_SANDBOX_NETWORK_SETTINGS" | "UPDATE_SANDBOX_SECRETS" | "SNAPSHOT_SANDBOX" | "FORK_SANDBOX" | "PAUSE_SANDBOX";
12
+ export declare const JobType: any;
13
+ export type JobStatus = "PENDING" | "IN_PROGRESS" | "COMPLETED" | "FAILED";
14
+ export declare const JobStatus: any;
15
+ /** The type of resource this job operates on */
16
+ export type JobResourceType = "SANDBOX" | "SNAPSHOT" | "BACKUP";
17
+ export declare const JobResourceType: any;
18
+ /** OpenTelemetry trace context for distributed tracing (W3C Trace Context format) */
19
+ export type JobTraceContextMap = {
20
+ [key: string]: unknown | undefined;
21
+ };
22
+ export declare const JobTraceContextMap: S.Schema<JobTraceContextMap>;
23
+ export interface Job {
24
+ /** The ID of the job */
25
+ id: string;
26
+ /** The type of the job */
27
+ type: JobType;
28
+ /** The status of the job */
29
+ status: JobStatus;
30
+ /** The type of resource this job operates on */
31
+ resourceType: JobResourceType;
32
+ /** The ID of the resource this job operates on (sandboxId, snapshotRef, etc.) */
33
+ resourceId: string;
34
+ /** Job-specific JSON-encoded payload data (operational metadata) */
35
+ payload?: string;
36
+ /** OpenTelemetry trace context for distributed tracing (W3C Trace Context format) */
37
+ traceContext?: JobTraceContextMap;
38
+ /** Error message if the job failed */
39
+ errorMessage?: string;
40
+ /** The creation timestamp of the job */
41
+ createdAt: string;
42
+ /** The last update timestamp of the job */
43
+ updatedAt?: string;
44
+ }
45
+ export declare const Job: S.Schema<Job>;
46
+ export interface ListJobsRequest {
47
+ /** Page number of the results */
48
+ page?: number;
49
+ /** Maximum number of jobs to return (default: 100, max: 500) */
50
+ limit?: number;
51
+ /** Filter jobs by status */
52
+ status?: JobStatus | (string & {});
53
+ /** Number of jobs to skip for pagination (default: 0) */
54
+ offset?: number;
55
+ }
56
+ export declare const ListJobsRequest: S.Schema<ListJobsRequest>;
57
+ export type PaginatedJobsItemsList = Array<Job>;
58
+ export declare const PaginatedJobsItemsList: S.Schema<PaginatedJobsItemsList>;
59
+ export interface PaginatedJobs {
60
+ items: PaginatedJobsItemsList;
61
+ total: number;
62
+ page: number;
63
+ totalPages: number;
64
+ }
65
+ export declare const PaginatedJobs: S.Schema<PaginatedJobs>;
66
+ export interface PollJobsRequest {
67
+ /** Timeout in seconds for long polling (default: 30, max: 60) */
68
+ timeout?: number;
69
+ /** Maximum number of jobs to return (default: 10, max: 100) */
70
+ limit?: number;
71
+ }
72
+ export declare const PollJobsRequest: S.Schema<PollJobsRequest>;
73
+ /** List of jobs */
74
+ export type PollJobsResponseJobsList = Array<Job>;
75
+ export declare const PollJobsResponseJobsList: S.Schema<PollJobsResponseJobsList>;
76
+ export interface PollJobsResponse {
77
+ /** List of jobs */
78
+ jobs: PollJobsResponseJobsList;
79
+ }
80
+ export declare const PollJobsResponse: S.Schema<PollJobsResponse>;
81
+ export interface UpdateJobStatusRequest {
82
+ /** ID of the job */
83
+ jobId: string;
84
+ /** The new status of the job */
85
+ status: JobStatus | (string & {});
86
+ /** Error message if the job failed */
87
+ errorMessage?: string;
88
+ /** Result metadata for the job */
89
+ resultMetadata?: string;
90
+ }
91
+ export declare const UpdateJobStatusRequest: S.Schema<UpdateJobStatusRequest>;
92
+ export type GetJobError = DaytonaOpError;
93
+ /** Get job details */
94
+ export declare const getJob: API.OperationMethod<GetJobRequest, Job, GetJobError, DaytonaOpContext>;
95
+ export type ListJobsError = DaytonaOpError;
96
+ /** List jobs for the runner Returns a paginated list of jobs for the runner, optionally filtered by status. */
97
+ export declare const listJobs: API.OperationMethod<ListJobsRequest, PaginatedJobs, ListJobsError, DaytonaOpContext>;
98
+ export type PollJobsError = DaytonaOpError;
99
+ /** Long poll for jobs Long poll endpoint for runners to fetch pending jobs. Returns immediately if jobs are available, otherwise waits up to timeout seconds. */
100
+ export declare const pollJobs: API.OperationMethod<PollJobsRequest, PollJobsResponse, PollJobsError, DaytonaOpContext>;
101
+ export type UpdateJobStatusError = DaytonaOpError;
102
+ /** Update job status */
103
+ export declare const updateJobStatus: API.OperationMethod<UpdateJobStatusRequest, Job, UpdateJobStatusError, DaytonaOpContext>;
104
+ //# sourceMappingURL=jobs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/services/jobs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;AAEjD,MAAM,WAAW,aAAa;IAC5B,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AACD,eAAO,MAAM,aAAa,EAI4B,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AAE9E,0BAA0B;AAC1B,MAAM,MAAM,OAAO,GACf,gBAAgB,GAChB,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,iBAAiB,GACjB,8BAA8B,GAC9B,iBAAiB,GACjB,iCAAiC,GACjC,wBAAwB,GACxB,kBAAk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CAAsC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kCAAkC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AACD,eAAO,MAAM,sBAAsB,EAStB,CAAC,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC;AACzC,sBAAsB;AACtB,eAAO,MAAM,MAAM,EAAE,GAAG,CAAC,eAAe,CACtC,aAAa,EACb,GAAG,EACH,WAAW,EACX,gBAAgB,CAOf,CAAC;AAEJ,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC;AAC3C,+GAA+G;AAC/G,eAAO,MAAM,QAAQ,EAAE,GAAG,CAAC,eAAe,CACxC,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,CAOf,CAAC;AAEJ,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC;AAC3C,iKAAiK;AACjK,eAAO,MAAM,QAAQ,EAAE,GAAG,CAAC,eAAe,CACxC,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,gBAAgB,CAOf,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAClD,wBAAwB;AACxB,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,eAAe,CAC/C,sBAAsB,EACtB,GAAG,EACH,oBAAoB,EACpB,gBAAgB,CAOf,CAAC"}
@@ -0,0 +1,94 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-daytona/specs/{openapi,toolbox-openapi,analytics-openapi}.json). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.js";
5
+ import { DaytonaProtocol, } from "../protocol.js";
6
+ import { UnknownDaytonaError } from "../errors.js";
7
+ import * as Retry from "../retry.js";
8
+ export const GetJobRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
9
+ jobId: S.String.pipe(T.Label()),
10
+ }).pipe(T.Http({ method: "GET", uri: "/jobs/{jobId}", code: 200 }))).annotate({ identifier: "GetJobRequest" });
11
+ export const JobType = S.String;
12
+ export const JobStatus = S.String;
13
+ export const JobResourceType = S.String;
14
+ export const JobTraceContextMap = /*@__PURE__*/ S.Record(S.String, S.Unknown);
15
+ export const Job = /*@__PURE__*/ S.suspend(() => S.Struct({
16
+ id: S.String,
17
+ type: JobType,
18
+ status: JobStatus,
19
+ resourceType: JobResourceType,
20
+ resourceId: S.String,
21
+ payload: S.optional(S.String),
22
+ traceContext: S.optional(JobTraceContextMap),
23
+ errorMessage: S.optional(S.String),
24
+ createdAt: S.String,
25
+ updatedAt: S.optional(S.String),
26
+ })).annotate({ identifier: "Job" });
27
+ export const ListJobsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
28
+ page: S.optional(S.Number.pipe(T.Query())),
29
+ limit: S.optional(S.Number.pipe(T.Query())),
30
+ status: S.optional(JobStatus.pipe(T.Query())),
31
+ offset: S.optional(S.Number.pipe(T.Query())),
32
+ }).pipe(T.Http({ method: "GET", uri: "/jobs", code: 200 }))).annotate({
33
+ identifier: "ListJobsRequest",
34
+ });
35
+ export const PaginatedJobsItemsList = /*@__PURE__*/ S.Array(Job);
36
+ export const PaginatedJobs = /*@__PURE__*/ S.suspend(() => S.Struct({
37
+ items: PaginatedJobsItemsList,
38
+ total: S.Number,
39
+ page: S.Number,
40
+ totalPages: S.Number,
41
+ })).annotate({ identifier: "PaginatedJobs" });
42
+ export const PollJobsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
43
+ timeout: S.optional(S.Number.pipe(T.Query())),
44
+ limit: S.optional(S.Number.pipe(T.Query())),
45
+ }).pipe(T.Http({ method: "GET", uri: "/jobs/poll", code: 200 }))).annotate({
46
+ identifier: "PollJobsRequest",
47
+ });
48
+ export const PollJobsResponseJobsList = /*@__PURE__*/ S.Array(Job);
49
+ export const PollJobsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
50
+ jobs: PollJobsResponseJobsList,
51
+ })).annotate({
52
+ identifier: "PollJobsResponse",
53
+ });
54
+ export const UpdateJobStatusRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
55
+ jobId: S.String.pipe(T.Label()),
56
+ status: JobStatus,
57
+ errorMessage: S.optional(S.String),
58
+ resultMetadata: S.optional(S.String),
59
+ }).pipe(T.Http({ method: "POST", uri: "/jobs/{jobId}/status", code: 200 }))).annotate({
60
+ identifier: "UpdateJobStatusRequest",
61
+ });
62
+ /** Get job details */
63
+ export const getJob = /*@__PURE__*/ API.make(() => ({
64
+ input: GetJobRequest,
65
+ output: Job,
66
+ errors: [UnknownDaytonaError],
67
+ protocol: DaytonaProtocol,
68
+ retry: Retry.Retry,
69
+ }));
70
+ /** List jobs for the runner Returns a paginated list of jobs for the runner, optionally filtered by status. */
71
+ export const listJobs = /*@__PURE__*/ API.make(() => ({
72
+ input: ListJobsRequest,
73
+ output: PaginatedJobs,
74
+ errors: [UnknownDaytonaError],
75
+ protocol: DaytonaProtocol,
76
+ retry: Retry.Retry,
77
+ }));
78
+ /** Long poll for jobs Long poll endpoint for runners to fetch pending jobs. Returns immediately if jobs are available, otherwise waits up to timeout seconds. */
79
+ export const pollJobs = /*@__PURE__*/ API.make(() => ({
80
+ input: PollJobsRequest,
81
+ output: PollJobsResponse,
82
+ errors: [UnknownDaytonaError],
83
+ protocol: DaytonaProtocol,
84
+ retry: Retry.Retry,
85
+ }));
86
+ /** Update job status */
87
+ export const updateJobStatus = /*@__PURE__*/ API.make(() => ({
88
+ input: UpdateJobStatusRequest,
89
+ output: Job,
90
+ errors: [UnknownDaytonaError],
91
+ protocol: DaytonaProtocol,
92
+ retry: Retry.Retry,
93
+ }));
94
+ //# sourceMappingURL=jobs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../src/services/jobs.ts"],"names":[],"mappings":"AAAA,+JAA+J;AAC/J,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,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CAAC,CAAC;IAChC,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,CAAC,mBAAmB,CAAC;IAC7B,QAAQ,EAAE,eAAe;IACzB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC;AAGJ,wBAAwB;AACxB,MAAM,CAAC,MAAM,eAAe,GAKxB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,sBAAsB;IAC7B,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,CAAC,mBAAmB,CAAC;IAC7B,QAAQ,EAAE,eAAe;IACzB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,137 @@
1
+ import * as S from "@distilled.cloud/core/schema";
2
+ import * as API from "@distilled.cloud/core/api";
3
+ import { type DaytonaOpError, type DaytonaOpContext } from "../protocol.ts";
4
+ export type { DaytonaOpError, DaytonaOpContext };
5
+ export interface CompletionContext {
6
+ triggerCharacter?: string;
7
+ triggerKind: number;
8
+ }
9
+ export declare const CompletionContext: S.Schema<CompletionContext>;
10
+ export interface LspPosition {
11
+ character: number;
12
+ line: number;
13
+ }
14
+ export declare const LspPosition: S.Schema<LspPosition>;
15
+ export interface CompletionsRequest {
16
+ context?: CompletionContext;
17
+ languageId: string;
18
+ pathToProject: string;
19
+ position: LspPosition;
20
+ uri: string;
21
+ }
22
+ export declare const CompletionsRequest: S.Schema<CompletionsRequest>;
23
+ export interface CompletionItem {
24
+ detail?: string;
25
+ documentation?: unknown;
26
+ filterText?: string;
27
+ insertText?: string;
28
+ kind?: number;
29
+ label: string;
30
+ sortText?: string;
31
+ }
32
+ export declare const CompletionItem: S.Schema<CompletionItem>;
33
+ export type CompletionListItemsList = Array<CompletionItem>;
34
+ export declare const CompletionListItemsList: S.Schema<CompletionListItemsList>;
35
+ export interface CompletionList {
36
+ isIncomplete: boolean;
37
+ items: CompletionListItemsList;
38
+ }
39
+ export declare const CompletionList: S.Schema<CompletionList>;
40
+ export interface DidCloseRequest {
41
+ languageId: string;
42
+ pathToProject: string;
43
+ uri: string;
44
+ }
45
+ export declare const DidCloseRequest: S.Schema<DidCloseRequest>;
46
+ export interface DidCloseResponse {
47
+ }
48
+ export declare const DidCloseResponse: S.Schema<DidCloseResponse>;
49
+ export interface DidOpenRequest {
50
+ languageId: string;
51
+ pathToProject: string;
52
+ uri: string;
53
+ }
54
+ export declare const DidOpenRequest: S.Schema<DidOpenRequest>;
55
+ export interface DidOpenResponse {
56
+ }
57
+ export declare const DidOpenResponse: S.Schema<DidOpenResponse>;
58
+ export interface DocumentSymbolsRequest {
59
+ /** Language ID (e.g., python, typescript) */
60
+ languageId: string;
61
+ /** Path to project */
62
+ pathToProject: string;
63
+ /** Document URI */
64
+ uri: string;
65
+ }
66
+ export declare const DocumentSymbolsRequest: S.Schema<DocumentSymbolsRequest>;
67
+ export interface LspRange {
68
+ end: LspPosition;
69
+ start: LspPosition;
70
+ }
71
+ export declare const LspRange: S.Schema<LspRange>;
72
+ export interface LspLocation {
73
+ range: LspRange;
74
+ uri: string;
75
+ }
76
+ export declare const LspLocation: S.Schema<LspLocation>;
77
+ export interface LspSymbol {
78
+ kind: number;
79
+ location: LspLocation;
80
+ name: string;
81
+ }
82
+ export declare const LspSymbol: S.Schema<LspSymbol>;
83
+ export type DocumentSymbolsResponseBodyList = Array<LspSymbol>;
84
+ export declare const DocumentSymbolsResponseBodyList: S.Schema<DocumentSymbolsResponseBodyList>;
85
+ export type DocumentSymbolsResponse = DocumentSymbolsResponseBodyList;
86
+ export declare const DocumentSymbolsResponse: S.Schema<DocumentSymbolsResponse>;
87
+ export interface StartRequest {
88
+ languageId: string;
89
+ pathToProject: string;
90
+ }
91
+ export declare const StartRequest: S.Schema<StartRequest>;
92
+ export interface StartResponse {
93
+ }
94
+ export declare const StartResponse: S.Schema<StartResponse>;
95
+ export interface StopRequest {
96
+ languageId: string;
97
+ pathToProject: string;
98
+ }
99
+ export declare const StopRequest: S.Schema<StopRequest>;
100
+ export interface StopResponse {
101
+ }
102
+ export declare const StopResponse: S.Schema<StopResponse>;
103
+ export interface WorkspaceSymbolsRequest {
104
+ /** Search query */
105
+ query: string;
106
+ /** Language ID (e.g., python, typescript) */
107
+ languageId: string;
108
+ /** Path to project */
109
+ pathToProject: string;
110
+ }
111
+ export declare const WorkspaceSymbolsRequest: S.Schema<WorkspaceSymbolsRequest>;
112
+ export type WorkspaceSymbolsResponseBodyList = Array<LspSymbol>;
113
+ export declare const WorkspaceSymbolsResponseBodyList: S.Schema<WorkspaceSymbolsResponseBodyList>;
114
+ export type WorkspaceSymbolsResponse = WorkspaceSymbolsResponseBodyList;
115
+ export declare const WorkspaceSymbolsResponse: S.Schema<WorkspaceSymbolsResponse>;
116
+ export type CompletionsError = DaytonaOpError;
117
+ /** Get code completions Get code completion suggestions from the LSP server */
118
+ export declare const completions: API.OperationMethod<CompletionsRequest, CompletionList, CompletionsError, DaytonaOpContext>;
119
+ export type DidCloseError = DaytonaOpError;
120
+ /** Notify document closed Notify the LSP server that a document has been closed */
121
+ export declare const didClose: API.OperationMethod<DidCloseRequest, DidCloseResponse, DidCloseError, DaytonaOpContext>;
122
+ export type DidOpenError = DaytonaOpError;
123
+ /** Notify document opened Notify the LSP server that a document has been opened */
124
+ export declare const didOpen: API.OperationMethod<DidOpenRequest, DidOpenResponse, DidOpenError, DaytonaOpContext>;
125
+ export type DocumentSymbolsError = DaytonaOpError;
126
+ /** Get document symbols Get symbols (functions, classes, etc.) from a document */
127
+ export declare const documentSymbols: API.OperationMethod<DocumentSymbolsRequest, DocumentSymbolsResponse, DocumentSymbolsError, DaytonaOpContext>;
128
+ export type StartError = DaytonaOpError;
129
+ /** Start LSP server Start a Language Server Protocol server for the specified language */
130
+ export declare const start: API.OperationMethod<StartRequest, StartResponse, StartError, DaytonaOpContext>;
131
+ export type StopError = DaytonaOpError;
132
+ /** Stop LSP server Stop a Language Server Protocol server */
133
+ export declare const stop: API.OperationMethod<StopRequest, StopResponse, StopError, DaytonaOpContext>;
134
+ export type WorkspaceSymbolsError = DaytonaOpError;
135
+ /** Get workspace symbols Search for symbols across the entire workspace */
136
+ export declare const workspaceSymbols: API.OperationMethod<WorkspaceSymbolsRequest, WorkspaceSymbolsResponse, WorkspaceSymbolsError, DaytonaOpContext>;
137
+ //# sourceMappingURL=lsp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lsp.d.ts","sourceRoot":"","sources":["../../src/services/lsp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;AAEjD,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB;AACD,eAAO,MAAM,iBAAiB,EAOjB,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEzC,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AACD,eAAO,MAAM,WAAW,EAK4B,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAE1E,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;CACb;AACD,eAAO,MAAM,kBAAkB,EAUlB,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAE1C,MAAM,WAAW,cAAc;IAC7B,MAAM,CAA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