oblien 1.2.7 → 2.0.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.
Files changed (171) hide show
  1. package/dist/client.d.ts +31 -0
  2. package/dist/client.d.ts.map +1 -0
  3. package/dist/client.js +33 -0
  4. package/dist/client.js.map +1 -0
  5. package/dist/error.d.ts +29 -0
  6. package/dist/error.d.ts.map +1 -0
  7. package/dist/error.js +52 -0
  8. package/dist/error.js.map +1 -0
  9. package/dist/http.d.ts +20 -0
  10. package/dist/http.d.ts.map +1 -0
  11. package/dist/http.js +108 -0
  12. package/dist/http.js.map +1 -0
  13. package/dist/index.d.ts +8 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +10 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/resources/api-access.d.ts +21 -0
  18. package/dist/resources/api-access.d.ts.map +1 -0
  19. package/dist/resources/api-access.js +32 -0
  20. package/dist/resources/api-access.js.map +1 -0
  21. package/dist/resources/base.d.ts +17 -0
  22. package/dist/resources/base.d.ts.map +1 -0
  23. package/dist/resources/base.js +21 -0
  24. package/dist/resources/base.js.map +1 -0
  25. package/dist/resources/images.d.ts +11 -0
  26. package/dist/resources/images.d.ts.map +1 -0
  27. package/dist/resources/images.js +16 -0
  28. package/dist/resources/images.js.map +1 -0
  29. package/dist/resources/lifecycle.d.ts +23 -0
  30. package/dist/resources/lifecycle.d.ts.map +1 -0
  31. package/dist/resources/lifecycle.js +32 -0
  32. package/dist/resources/lifecycle.js.map +1 -0
  33. package/dist/resources/logs.d.ts +25 -0
  34. package/dist/resources/logs.d.ts.map +1 -0
  35. package/dist/resources/logs.js +51 -0
  36. package/dist/resources/logs.js.map +1 -0
  37. package/dist/resources/metadata.d.ts +15 -0
  38. package/dist/resources/metadata.d.ts.map +1 -0
  39. package/dist/resources/metadata.js +20 -0
  40. package/dist/resources/metadata.js.map +1 -0
  41. package/dist/resources/metrics.d.ts +17 -0
  42. package/dist/resources/metrics.d.ts.map +1 -0
  43. package/dist/resources/metrics.js +27 -0
  44. package/dist/resources/metrics.js.map +1 -0
  45. package/dist/resources/network.d.ts +17 -0
  46. package/dist/resources/network.d.ts.map +1 -0
  47. package/dist/resources/network.js +20 -0
  48. package/dist/resources/network.js.map +1 -0
  49. package/dist/resources/public-access.d.ts +15 -0
  50. package/dist/resources/public-access.d.ts.map +1 -0
  51. package/dist/resources/public-access.js +21 -0
  52. package/dist/resources/public-access.js.map +1 -0
  53. package/dist/resources/resources.d.ts +15 -0
  54. package/dist/resources/resources.d.ts.map +1 -0
  55. package/dist/resources/resources.js +20 -0
  56. package/dist/resources/resources.js.map +1 -0
  57. package/dist/resources/snapshots.d.ts +27 -0
  58. package/dist/resources/snapshots.d.ts.map +1 -0
  59. package/dist/resources/snapshots.js +45 -0
  60. package/dist/resources/snapshots.js.map +1 -0
  61. package/dist/resources/ssh.d.ts +19 -0
  62. package/dist/resources/ssh.d.ts.map +1 -0
  63. package/dist/resources/ssh.js +28 -0
  64. package/dist/resources/ssh.js.map +1 -0
  65. package/dist/resources/usage.d.ts +25 -0
  66. package/dist/resources/usage.d.ts.map +1 -0
  67. package/dist/resources/usage.js +44 -0
  68. package/dist/resources/usage.js.map +1 -0
  69. package/dist/resources/workloads.d.ts +39 -0
  70. package/dist/resources/workloads.d.ts.map +1 -0
  71. package/dist/resources/workloads.js +83 -0
  72. package/dist/resources/workloads.js.map +1 -0
  73. package/dist/runtime/exec.d.ts +71 -0
  74. package/dist/runtime/exec.d.ts.map +1 -0
  75. package/dist/runtime/exec.js +163 -0
  76. package/dist/runtime/exec.js.map +1 -0
  77. package/dist/runtime/files.d.ts +39 -0
  78. package/dist/runtime/files.d.ts.map +1 -0
  79. package/dist/runtime/files.js +143 -0
  80. package/dist/runtime/files.js.map +1 -0
  81. package/dist/runtime/search.d.ts +23 -0
  82. package/dist/runtime/search.d.ts.map +1 -0
  83. package/dist/runtime/search.js +65 -0
  84. package/dist/runtime/search.js.map +1 -0
  85. package/dist/runtime/terminal.d.ts +29 -0
  86. package/dist/runtime/terminal.d.ts.map +1 -0
  87. package/dist/runtime/terminal.js +58 -0
  88. package/dist/runtime/terminal.js.map +1 -0
  89. package/dist/runtime/watcher.d.ts +27 -0
  90. package/dist/runtime/watcher.d.ts.map +1 -0
  91. package/dist/runtime/watcher.js +53 -0
  92. package/dist/runtime/watcher.js.map +1 -0
  93. package/dist/runtime/ws.d.ts +92 -0
  94. package/dist/runtime/ws.d.ts.map +1 -0
  95. package/dist/runtime/ws.js +228 -0
  96. package/dist/runtime/ws.js.map +1 -0
  97. package/dist/runtime-http.d.ts +35 -0
  98. package/dist/runtime-http.d.ts.map +1 -0
  99. package/dist/runtime-http.js +99 -0
  100. package/dist/runtime-http.js.map +1 -0
  101. package/dist/runtime.d.ts +77 -0
  102. package/dist/runtime.d.ts.map +1 -0
  103. package/dist/runtime.js +97 -0
  104. package/dist/runtime.js.map +1 -0
  105. package/dist/types/client.d.ts +7 -0
  106. package/dist/types/client.d.ts.map +1 -0
  107. package/dist/types/client.js +3 -0
  108. package/dist/types/client.js.map +1 -0
  109. package/dist/types/common.d.ts +13 -0
  110. package/dist/types/common.d.ts.map +1 -0
  111. package/dist/types/common.js +3 -0
  112. package/dist/types/common.js.map +1 -0
  113. package/dist/types/index.d.ts +8 -0
  114. package/dist/types/index.d.ts.map +1 -0
  115. package/dist/types/index.js +2 -0
  116. package/dist/types/index.js.map +1 -0
  117. package/dist/types/network.d.ts +15 -0
  118. package/dist/types/network.d.ts.map +1 -0
  119. package/dist/types/network.js +3 -0
  120. package/dist/types/network.js.map +1 -0
  121. package/dist/types/resources.d.ts +10 -0
  122. package/dist/types/resources.d.ts.map +1 -0
  123. package/dist/types/resources.js +3 -0
  124. package/dist/types/resources.js.map +1 -0
  125. package/dist/types/runtime.d.ts +302 -0
  126. package/dist/types/runtime.d.ts.map +1 -0
  127. package/dist/types/runtime.js +3 -0
  128. package/dist/types/runtime.js.map +1 -0
  129. package/dist/types/workspace-resources.d.ts +186 -0
  130. package/dist/types/workspace-resources.d.ts.map +1 -0
  131. package/dist/types/workspace-resources.js +3 -0
  132. package/dist/types/workspace-resources.js.map +1 -0
  133. package/dist/types/workspace.d.ts +41 -0
  134. package/dist/types/workspace.d.ts.map +1 -0
  135. package/dist/types/workspace.js +3 -0
  136. package/dist/types/workspace.js.map +1 -0
  137. package/dist/workspace.d.ts +135 -0
  138. package/dist/workspace.d.ts.map +1 -0
  139. package/dist/workspace.js +194 -0
  140. package/dist/workspace.js.map +1 -0
  141. package/package.json +31 -70
  142. package/LICENSE +0 -21
  143. package/README.md +0 -574
  144. package/agents.js +0 -14
  145. package/browser.js +0 -6
  146. package/cdn.js +0 -6
  147. package/chat.js +0 -21
  148. package/credits.js +0 -11
  149. package/icons.js +0 -11
  150. package/index.d.ts +0 -967
  151. package/index.js +0 -63
  152. package/namespaces.js +0 -12
  153. package/sandbox.js +0 -12
  154. package/search.js +0 -11
  155. package/src/agents/agent.js +0 -229
  156. package/src/agents/index.js +0 -212
  157. package/src/agents/settings.js +0 -100
  158. package/src/agents/tools.js +0 -155
  159. package/src/browser/index.js +0 -449
  160. package/src/cdn/index.js +0 -744
  161. package/src/chat/index.js +0 -704
  162. package/src/chat/session.js +0 -93
  163. package/src/client.js +0 -175
  164. package/src/credits/index.js +0 -480
  165. package/src/icons/index.js +0 -185
  166. package/src/namespaces/index.js +0 -225
  167. package/src/namespaces/namespace.js +0 -274
  168. package/src/sandbox/index.js +0 -185
  169. package/src/sandbox/sandbox.js +0 -124
  170. package/src/search/index.js +0 -191
  171. package/src/utils/guest-manager.js +0 -454
@@ -0,0 +1,51 @@
1
+ /** Workspace logs — boot logs, command logs, log files, streaming. */
2
+ export class LogsResource {
3
+ _http;
4
+ constructor(_http) {
5
+ this._http = _http;
6
+ }
7
+ /** Get logs. */
8
+ async get(workspaceId, params = {}) {
9
+ return this._http.request({
10
+ method: 'GET',
11
+ path: `/workspace/${workspaceId}/logs`,
12
+ query: params,
13
+ });
14
+ }
15
+ /** Clear logs. */
16
+ async clear(workspaceId) {
17
+ return this._http.request({ method: 'DELETE', path: `/workspace/${workspaceId}/logs` });
18
+ }
19
+ /** List available log files. */
20
+ async listFiles(workspaceId) {
21
+ const res = await this._http.request({
22
+ method: 'GET',
23
+ path: `/workspace/${workspaceId}/logs/list`,
24
+ });
25
+ return res.files ?? [];
26
+ }
27
+ /** Get a specific log file by name. */
28
+ async getFile(workspaceId, name) {
29
+ return this._http.request({
30
+ method: 'GET',
31
+ path: `/workspace/${workspaceId}/logs/file/${name}`,
32
+ });
33
+ }
34
+ /** Stream boot logs (SSE). */
35
+ async *streamBoot(workspaceId, params) {
36
+ yield* this._http.requestSSE({
37
+ method: 'GET',
38
+ path: `/workspace/${workspaceId}/logs/stream/boot`,
39
+ query: params?.tail_lines ? { tail_lines: params.tail_lines } : undefined,
40
+ });
41
+ }
42
+ /** Stream command logs (SSE). */
43
+ async *streamCmd(workspaceId, params) {
44
+ yield* this._http.requestSSE({
45
+ method: 'GET',
46
+ path: `/workspace/${workspaceId}/logs/stream/cmd`,
47
+ query: params?.tail_lines ? { tail_lines: params.tail_lines } : undefined,
48
+ });
49
+ }
50
+ }
51
+ //# sourceMappingURL=logs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.js","sourceRoot":"","sources":["../../src/resources/logs.ts"],"names":[],"mappings":"AAIA,sEAAsE;AACtE,MAAM,OAAO,YAAY;IACM;IAA7B,YAA6B,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;IAAG,CAAC;IAElD,gBAAgB;IAChB,KAAK,CAAC,GAAG,CAAC,WAAmB,EAAE,SAAqB,EAAE;QACpD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;YACxB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,cAAc,WAAW,OAAO;YACtC,KAAK,EAAE,MAAqD;SAC7D,CAAC,CAAC;IACL,CAAC;IAED,kBAAkB;IAClB,KAAK,CAAC,KAAK,CAAC,WAAmB;QA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AAU,EAAE,CAAC,CAAC,CAAC,SAAS;SAC1E,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ import type { HttpClient } from '../http.js';
2
+ import type { ApiResponse } from '../types/common.js';
3
+ import type { UpdateMetadataParams } from '../types/workspace-resources.js';
4
+ /** Workspace metadata key-values. */
5
+ export declare class MetadataResource {
6
+ private readonly _http;
7
+ constructor(_http: HttpClient);
8
+ /** Get all metadata. */
9
+ get(workspaceId: string): Promise<Record<string, string>>;
10
+ /** Update metadata. */
11
+ update(workspaceId: string, params: UpdateMetadataParams): Promise<ApiResponse>;
12
+ /** Partial update metadata (alias for update). */
13
+ patch(workspaceId: string, params: UpdateMetadataParams): Promise<ApiResponse>;
14
+ }
15
+ //# sourceMappingURL=metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/resources/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAE5E,qCAAqC;AACrC,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,wBAAwB;IAClB,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAI/D,uBAAuB;IACjB,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,WAAW,CAAC;IAIrF,kDAAkD;IAC5C,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,WAAW,CAAC;CAGrF"}
@@ -0,0 +1,20 @@
1
+ /** Workspace metadata key-values. */
2
+ export class MetadataResource {
3
+ _http;
4
+ constructor(_http) {
5
+ this._http = _http;
6
+ }
7
+ /** Get all metadata. */
8
+ async get(workspaceId) {
9
+ return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/metadata` });
10
+ }
11
+ /** Update metadata. */
12
+ async update(workspaceId, params) {
13
+ return this._http.request({ method: 'PUT', path: `/workspace/${workspaceId}/metadata`, body: params });
14
+ }
15
+ /** Partial update metadata (alias for update). */
16
+ async patch(workspaceId, params) {
17
+ return this._http.request({ method: 'PATCH', path: `/workspace/${workspaceId}/metadata`, body: params });
18
+ }
19
+ }
20
+ //# sourceMappingURL=metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/resources/metadata.ts"],"names":[],"mappings":"AAIA,qCAAqC;AACrC,MAAM,OAAO,gBAAgB;IACE;IAA7B,YAA6B,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;IAAG,CAAC;IAElD,wBAAwB;IACxB,KAAK,CAAC,GAAG,CAAC,WAAmB;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,WAAW,WAAW,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED,uBAAuB;IACvB,KAAK,CAAC,MAAM,CAAC,WAAmB,EAAE,MAA4B;QAC5D,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,WAAW,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACzG,CAAC;IAED,kDAAkD;IAClD,KAAK,CAAC,KAAK,CAAC,WAAmB,EAAE,MAA4B;QAC3D,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,WAAW,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAC3G,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ import type { HttpClient } from '../http.js';
2
+ import type { ApiResponse } from '../types/common.js';
3
+ import type { StatsEvent } from '../types/workspace-resources.js';
4
+ /** Monitoring — live stats, VM info, VM config, stats streaming. */
5
+ export declare class MetricsResource {
6
+ private readonly _http;
7
+ constructor(_http: HttpClient);
8
+ /** Get current stats. */
9
+ stats(workspaceId: string): Promise<ApiResponse>;
10
+ /** Stream live stats (SSE). */
11
+ statsStream(workspaceId: string): AsyncGenerator<StatsEvent>;
12
+ /** Get VM info. */
13
+ info(workspaceId: string): Promise<ApiResponse>;
14
+ /** Get VM config. */
15
+ config(workspaceId: string): Promise<ApiResponse>;
16
+ }
17
+ //# sourceMappingURL=metrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/resources/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,oEAAoE;AACpE,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,yBAAyB;IACnB,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAItD,+BAA+B;IACxB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC;IAOnE,mBAAmB;IACb,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIrD,qBAAqB;IACf,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAGxD"}
@@ -0,0 +1,27 @@
1
+ /** Monitoring — live stats, VM info, VM config, stats streaming. */
2
+ export class MetricsResource {
3
+ _http;
4
+ constructor(_http) {
5
+ this._http = _http;
6
+ }
7
+ /** Get current stats. */
8
+ async stats(workspaceId) {
9
+ return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/stats` });
10
+ }
11
+ /** Stream live stats (SSE). */
12
+ async *statsStream(workspaceId) {
13
+ yield* this._http.requestSSE({
14
+ method: 'GET',
15
+ path: `/workspace/${workspaceId}/stats/stream`,
16
+ });
17
+ }
18
+ /** Get VM info. */
19
+ async info(workspaceId) {
20
+ return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/info` });
21
+ }
22
+ /** Get VM config. */
23
+ async config(workspaceId) {
24
+ return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/config` });
25
+ }
26
+ }
27
+ //# sourceMappingURL=metrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../src/resources/metrics.ts"],"names":[],"mappings":"AAIA,oEAAoE;AACpE,MAAM,OAAO,eAAe;IACG;IAA7B,YAA6B,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;IAAG,CAAC;IAElD,yBAAyB;IACzB,KAAK,CAAC,KAAK,CAAC,WAAmB;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,WAAW,QAAQ,EAAE,CAAC,CAAC;IACxF,CAAC;IAED,+BAA+B;IAC/B,KAAK,CAAC,CAAC,WAAW,CAAC,WAAmB;QACpC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAa;YACvC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,cAAc,WAAW,eAAe;SAC/C,CAAC,CAAC;IACL,CAAC;IAED,mBAAmB;IACnB,KAAK,CAAC,IAAI,CAAC,WAAmB;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,WAAW,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED,qBAAqB;IACrB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,WAAW,SAAS,EAAE,CAAC,CAAC;IACzF,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ import type { HttpClient } from '../http.js';
2
+ import type { ApiResponse } from '../types/common.js';
3
+ import type { NetworkUpdateParams, NetworkConfig } from '../types/workspace-resources.js';
4
+ /** Network configuration — firewall, private links, public access. */
5
+ export declare class NetworkResource {
6
+ private readonly _http;
7
+ constructor(_http: HttpClient);
8
+ /** Get network config. */
9
+ get(workspaceId: string): Promise<NetworkConfig>;
10
+ /** Update network settings (firewall, private links, public access). */
11
+ update(workspaceId: string, params: NetworkUpdateParams): Promise<ApiResponse>;
12
+ /** Apply outbound IP. */
13
+ applyOutboundIp(workspaceId: string, params: {
14
+ ip: string;
15
+ }): Promise<ApiResponse>;
16
+ }
17
+ //# sourceMappingURL=network.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/resources/network.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAE1F,sEAAsE;AACtE,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,0BAA0B;IACpB,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAItD,wEAAwE;IAClE,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAC;IAIpF,yBAAyB;IACnB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC;CAGzF"}
@@ -0,0 +1,20 @@
1
+ /** Network configuration — firewall, private links, public access. */
2
+ export class NetworkResource {
3
+ _http;
4
+ constructor(_http) {
5
+ this._http = _http;
6
+ }
7
+ /** Get network config. */
8
+ async get(workspaceId) {
9
+ return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/network` });
10
+ }
11
+ /** Update network settings (firewall, private links, public access). */
12
+ async update(workspaceId, params) {
13
+ return this._http.request({ method: 'PATCH', path: `/workspace/${workspaceId}/network`, body: params });
14
+ }
15
+ /** Apply outbound IP. */
16
+ async applyOutboundIp(workspaceId, params) {
17
+ return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/network/ip`, body: params });
18
+ }
19
+ }
20
+ //# sourceMappingURL=network.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.js","sourceRoot":"","sources":["../../src/resources/network.ts"],"names":[],"mappings":"AAIA,sEAAsE;AACtE,MAAM,OAAO,eAAe;IACG;IAA7B,YAA6B,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;IAAG,CAAC;IAElD,0BAA0B;IAC1B,KAAK,CAAC,GAAG,CAAC,WAAmB;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,WAAW,UAAU,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED,wEAAwE;IACxE,KAAK,CAAC,MAAM,CAAC,WAAmB,EAAE,MAA2B;QAC3D,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,WAAW,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1G,CAAC;IAED,yBAAyB;IACzB,KAAK,CAAC,eAAe,CAAC,WAAmB,EAAE,MAAsB;QAC/D,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,WAAW,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ import type { HttpClient } from '../http.js';
2
+ import type { ApiResponse } from '../types/common.js';
3
+ import type { PublicAccessPort, ExposePortParams } from '../types/workspace-resources.js';
4
+ /** Public port access — expose and revoke ports. */
5
+ export declare class PublicAccessResource {
6
+ private readonly _http;
7
+ constructor(_http: HttpClient);
8
+ /** List exposed ports. */
9
+ list(workspaceId: string): Promise<PublicAccessPort[]>;
10
+ /** Expose a port. */
11
+ expose(workspaceId: string, params: ExposePortParams): Promise<ApiResponse>;
12
+ /** Revoke a port. */
13
+ revoke(workspaceId: string, port: number): Promise<ApiResponse>;
14
+ }
15
+ //# sourceMappingURL=public-access.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-access.d.ts","sourceRoot":"","sources":["../../src/resources/public-access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAE1F,oDAAoD;AACpD,qBAAa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,0BAA0B;IACpB,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAO5D,qBAAqB;IACf,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC;IAIjF,qBAAqB;IACf,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAGtE"}
@@ -0,0 +1,21 @@
1
+ /** Public port access — expose and revoke ports. */
2
+ export class PublicAccessResource {
3
+ _http;
4
+ constructor(_http) {
5
+ this._http = _http;
6
+ }
7
+ /** List exposed ports. */
8
+ async list(workspaceId) {
9
+ const res = await this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/public-access` });
10
+ return res.ports ?? [];
11
+ }
12
+ /** Expose a port. */
13
+ async expose(workspaceId, params) {
14
+ return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/public-access`, body: params });
15
+ }
16
+ /** Revoke a port. */
17
+ async revoke(workspaceId, port) {
18
+ return this._http.request({ method: 'DELETE', path: `/workspace/${workspaceId}/public-access/${port}` });
19
+ }
20
+ }
21
+ //# sourceMappingURL=public-access.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-access.js","sourceRoot":"","sources":["../../src/resources/public-access.ts"],"names":[],"mappings":"AAIA,oDAAoD;AACpD,MAAM,OAAO,oBAAoB;IACF;IAA7B,YAA6B,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;IAAG,CAAC;IAElD,0BAA0B;IAC1B,KAAK,CAAC,IAAI,CAAC,WAAmB;QAC5B,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAClC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,WAAW,gBAAgB,EAAE,CACnE,CAAC;QACF,OAAQ,GAAW,CAAC,KAAK,IAAI,EAAE,CAAC;IAClC,CAAC;IAED,qBAAqB;IACrB,KAAK,CAAC,MAAM,CAAC,WAAmB,EAAE,MAAwB;QACxD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,WAAW,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAC/G,CAAC;IAED,qBAAqB;IACrB,KAAK,CAAC,MAAM,CAAC,WAAmB,EAAE,IAAY;QAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,WAAW,kBAAkB,IAAI,EAAE,EAAE,CAAC,CAAC;IAC3G,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ import type { HttpClient } from '../http.js';
2
+ import type { ApiResponse } from '../types/common.js';
3
+ import type { UpdateResourcesParams } from '../types/workspace-resources.js';
4
+ /** Workspace resources — CPU, memory, disk. */
5
+ export declare class ResourcesResource {
6
+ private readonly _http;
7
+ constructor(_http: HttpClient);
8
+ /** Get current resource allocation. */
9
+ get(workspaceId: string): Promise<ApiResponse>;
10
+ /** Update resource allocation. */
11
+ update(workspaceId: string, params: UpdateResourcesParams): Promise<ApiResponse>;
12
+ /** Partial update resource allocation (alias for update). */
13
+ patch(workspaceId: string, params: UpdateResourcesParams): Promise<ApiResponse>;
14
+ }
15
+ //# sourceMappingURL=resources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../src/resources/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE7E,+CAA+C;AAC/C,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,uCAAuC;IACjC,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIpD,kCAAkC;IAC5B,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC;IAItF,6DAA6D;IACvD,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC;CAGtF"}
@@ -0,0 +1,20 @@
1
+ /** Workspace resources — CPU, memory, disk. */
2
+ export class ResourcesResource {
3
+ _http;
4
+ constructor(_http) {
5
+ this._http = _http;
6
+ }
7
+ /** Get current resource allocation. */
8
+ async get(workspaceId) {
9
+ return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/resources` });
10
+ }
11
+ /** Update resource allocation. */
12
+ async update(workspaceId, params) {
13
+ return this._http.request({ method: 'PUT', path: `/workspace/${workspaceId}/resources`, body: params });
14
+ }
15
+ /** Partial update resource allocation (alias for update). */
16
+ async patch(workspaceId, params) {
17
+ return this._http.request({ method: 'PATCH', path: `/workspace/${workspaceId}/resources`, body: params });
18
+ }
19
+ }
20
+ //# sourceMappingURL=resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/resources/resources.ts"],"names":[],"mappings":"AAIA,+CAA+C;AAC/C,MAAM,OAAO,iBAAiB;IACC;IAA7B,YAA6B,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;IAAG,CAAC;IAElD,uCAAuC;IACvC,KAAK,CAAC,GAAG,CAAC,WAAmB;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,WAAW,YAAY,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED,kCAAkC;IAClC,KAAK,CAAC,MAAM,CAAC,WAAmB,EAAE,MAA6B;QAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,WAAW,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1G,CAAC;IAED,6DAA6D;IAC7D,KAAK,CAAC,KAAK,CAAC,WAAmB,EAAE,MAA6B;QAC5D,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,WAAW,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF"}
@@ -0,0 +1,27 @@
1
+ import type { HttpClient } from '../http.js';
2
+ import type { ApiResponse } from '../types/common.js';
3
+ import type { SnapshotParams, ArchiveCreateParams, ArchiveInfo } from '../types/workspace-resources.js';
4
+ /** Snapshots and archives. */
5
+ export declare class SnapshotsResource {
6
+ private readonly _http;
7
+ constructor(_http: HttpClient);
8
+ /** Create a snapshot. */
9
+ create(workspaceId: string, params?: SnapshotParams): Promise<ApiResponse>;
10
+ /** Restore from the latest snapshot. */
11
+ restore(workspaceId: string): Promise<ApiResponse>;
12
+ /** Create an archive. */
13
+ createArchive(workspaceId: string, params?: ArchiveCreateParams): Promise<ApiResponse>;
14
+ /** List archives. */
15
+ listArchives(workspaceId: string): Promise<ArchiveInfo[]>;
16
+ /** Get a specific archive. */
17
+ getArchive(workspaceId: string, version: string): Promise<ArchiveInfo>;
18
+ /** Delete a specific archive. */
19
+ deleteArchive(workspaceId: string, version: string, params?: {
20
+ delete_file?: boolean;
21
+ }): Promise<ApiResponse>;
22
+ /** Delete all archives. */
23
+ deleteAllArchives(workspaceId: string, params?: {
24
+ delete_files?: boolean;
25
+ }): Promise<ApiResponse>;
26
+ }
27
+ //# sourceMappingURL=snapshots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshots.d.ts","sourceRoot":"","sources":["../../src/resources/snapshots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,WAAW,EACZ,MAAM,iCAAiC,CAAC;AAEzC,8BAA8B;AAC9B,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,yBAAyB;IACnB,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,GAAE,cAAmB,GAAG,OAAO,CAAC,WAAW,CAAC;IAIpF,wCAAwC;IAClC,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIxD,yBAAyB;IACnB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,GAAE,mBAAwB,GAAG,OAAO,CAAC,WAAW,CAAC;IAIhG,qBAAqB;IACf,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAO/D,8BAA8B;IACxB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAI5E,iCAAiC;IAC3B,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAQnH,2BAA2B;IACrB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC;CAOxG"}
@@ -0,0 +1,45 @@
1
+ /** Snapshots and archives. */
2
+ export class SnapshotsResource {
3
+ _http;
4
+ constructor(_http) {
5
+ this._http = _http;
6
+ }
7
+ /** Create a snapshot. */
8
+ async create(workspaceId, params = {}) {
9
+ return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/snapshot`, body: params });
10
+ }
11
+ /** Restore from the latest snapshot. */
12
+ async restore(workspaceId) {
13
+ return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/restore` });
14
+ }
15
+ /** Create an archive. */
16
+ async createArchive(workspaceId, params = {}) {
17
+ return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/archives`, body: params });
18
+ }
19
+ /** List archives. */
20
+ async listArchives(workspaceId) {
21
+ const res = await this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/archives` });
22
+ return res.archives ?? [];
23
+ }
24
+ /** Get a specific archive. */
25
+ async getArchive(workspaceId, version) {
26
+ return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/archives/${version}` });
27
+ }
28
+ /** Delete a specific archive. */
29
+ async deleteArchive(workspaceId, version, params) {
30
+ return this._http.request({
31
+ method: 'DELETE',
32
+ path: `/workspace/${workspaceId}/archives/${version}`,
33
+ query: params?.delete_file ? { delete_file: 'true' } : undefined,
34
+ });
35
+ }
36
+ /** Delete all archives. */
37
+ async deleteAllArchives(workspaceId, params) {
38
+ return this._http.request({
39
+ method: 'DELETE',
40
+ path: `/workspace/${workspaceId}/archives`,
41
+ query: params?.delete_files ? { delete_files: 'true' } : undefined,
42
+ });
43
+ }
44
+ }
45
+ //# sourceMappingURL=snapshots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshots.js","sourceRoot":"","sources":["../../src/resources/snapshots.ts"],"names":[],"mappings":"AAQA,8BAA8B;AAC9B,MAAM,OAAO,iBAAiB;IACC;IAA7B,YAA6B,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;IAAG,CAAC;IAElD,yBAAyB;IACzB,KAAK,CAAC,MAAM,CAAC,WAAmB,EAAE,SAAyB,EAAE;QAC3D,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,WAAW,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1G,CAAC;IAED,wCAAwC;IACxC,KAAK,CAAC,OAAO,CAAC,WAAmB;QAC/B,OAAO,IAAI,CAAC,KAAK,CAAC,O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AC,KAAK,CAAC,OAAO,CAAC;YACxB,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,cAAc,WAAW,WAAW;YAC1C,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS;SACnE,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,19 @@
1
+ import type { HttpClient } from '../http.js';
2
+ import type { ApiResponse } from '../types/common.js';
3
+ import type { SshStatus, SshPasswordParams, SshKeyParams } from '../types/workspace-resources.js';
4
+ /** SSH access management. */
5
+ export declare class SshResource {
6
+ private readonly _http;
7
+ constructor(_http: HttpClient);
8
+ /** Get SSH status. */
9
+ status(workspaceId: string): Promise<SshStatus>;
10
+ /** Enable SSH. */
11
+ enable(workspaceId: string): Promise<ApiResponse>;
12
+ /** Disable SSH. */
13
+ disable(workspaceId: string): Promise<ApiResponse>;
14
+ /** Set SSH password. */
15
+ setPassword(workspaceId: string, params: SshPasswordParams): Promise<ApiResponse>;
16
+ /** Set authorized SSH key. */
17
+ setKey(workspaceId: string, params: SshKeyParams): Promise<ApiResponse>;
18
+ }
19
+ //# sourceMappingURL=ssh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssh.d.ts","sourceRoot":"","sources":["../../src/resources/ssh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAElG,6BAA6B;AAC7B,qBAAa,WAAW;IACV,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,sBAAsB;IAChB,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAIrD,kBAAkB;IACZ,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIvD,mBAAmB;IACb,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIxD,wBAAwB;IAClB,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC;IAIvF,8BAA8B;IACxB,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;CAG9E"}
@@ -0,0 +1,28 @@
1
+ /** SSH access management. */
2
+ export class SshResource {
3
+ _http;
4
+ constructor(_http) {
5
+ this._http = _http;
6
+ }
7
+ /** Get SSH status. */
8
+ async status(workspaceId) {
9
+ return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/ssh` });
10
+ }
11
+ /** Enable SSH. */
12
+ async enable(workspaceId) {
13
+ return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/ssh/enable` });
14
+ }
15
+ /** Disable SSH. */
16
+ async disable(workspaceId) {
17
+ return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/ssh/disable` });
18
+ }
19
+ /** Set SSH password. */
20
+ async setPassword(workspaceId, params) {
21
+ return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/ssh/password`, body: params });
22
+ }
23
+ /** Set authorized SSH key. */
24
+ async setKey(workspaceId, params) {
25
+ return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/ssh/key`, body: params });
26
+ }
27
+ }
28
+ //# sourceMappingURL=ssh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssh.js","sourceRoot":"","sources":["../../src/resources/ssh.ts"],"names":[],"mappings":"AAIA,6BAA6B;AAC7B,MAAM,OAAO,WAAW;IACO;IAA7B,YAA6B,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;IAAG,CAAC;IAElD,sBAAsB;IACtB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,WAAW,MAAM,EAAE,CAAC,CAAC;IACtF,CAAC;IAED,kBAAkB;IAClB,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,WAAW,aAAa,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED,mBAAmB;IACnB,KAAK,CAAC,OAAO,CAAC,WAAmB;QAC/B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,WAAW,cAAc,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED,wBAAwB;IACxB,KAAK,CAAC,WAAW,CAAC,WAAmB,EAAE,MAAyB;QAC9D,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,WAAW,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAC9G,CAAC;IAED,8BAA8B;IAC9B,KAAK,CAAC,MAAM,CAAC,WAAmB,EAAE,MAAoB;QACpD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,WAAW,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACzG,CAAC;CACF"}
@@ -0,0 +1,25 @@
1
+ import type { HttpClient } from '../http.js';
2
+ import type { ApiResponse } from '../types/common.js';
3
+ import type { UsageParams } from '../types/workspace-resources.js';
4
+ /** Per-workspace usage tracking and account-level usage. */
5
+ export declare class UsageResource {
6
+ private readonly _http;
7
+ constructor(_http: HttpClient);
8
+ /** Get workspace usage. */
9
+ get(workspaceId: string, params?: UsageParams): Promise<ApiResponse>;
10
+ /** Get usage totals. */
11
+ totals(workspaceId: string): Promise<ApiResponse>;
12
+ /** Get credits chart data. */
13
+ creditsChart(workspaceId: string): Promise<ApiResponse>;
14
+ /** Get global usage across all workspaces. */
15
+ global(): Promise<ApiResponse>;
16
+ /** Get activity history. */
17
+ activity(): Promise<ApiResponse>;
18
+ /** Wipe all usage data for a workspace. */
19
+ wipe(workspaceId: string): Promise<ApiResponse>;
20
+ /** Start usage tracking for a workspace. */
21
+ startTracking(workspaceId: string): Promise<ApiResponse>;
22
+ /** Stop usage tracking for a workspace. */
23
+ stopTracking(workspaceId: string): Promise<ApiResponse>;
24
+ }
25
+ //# sourceMappingURL=usage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/resources/usage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,4DAA4D;AAC5D,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,2BAA2B;IACrB,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,GAAE,WAAgB,GAAG,OAAO,CAAC,WAAW,CAAC;IAQ9E,wBAAwB;IAClB,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIvD,8BAA8B;IACxB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAI7D,8CAA8C;IACxC,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC;IAIpC,4BAA4B;IACtB,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC;IAItC,2CAA2C;IACrC,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIrD,4CAA4C;IACtC,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAI9D,2CAA2C;IACrC,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAG9D"}
@@ -0,0 +1,44 @@
1
+ /** Per-workspace usage tracking and account-level usage. */
2
+ export class UsageResource {
3
+ _http;
4
+ constructor(_http) {
5
+ this._http = _http;
6
+ }
7
+ /** Get workspace usage. */
8
+ async get(workspaceId, params = {}) {
9
+ return this._http.request({
10
+ method: 'GET',
11
+ path: `/workspace/${workspaceId}/usage`,
12
+ query: params,
13
+ });
14
+ }
15
+ /** Get usage totals. */
16
+ async totals(workspaceId) {
17
+ return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/usage/totals` });
18
+ }
19
+ /** Get credits chart data. */
20
+ async creditsChart(workspaceId) {
21
+ return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/usage/credits/chart` });
22
+ }
23
+ /** Get global usage across all workspaces. */
24
+ async global() {
25
+ return this._http.request({ method: 'GET', path: '/workspace/usage' });
26
+ }
27
+ /** Get activity history. */
28
+ async activity() {
29
+ return this._http.request({ method: 'GET', path: '/workspace/activity' });
30
+ }
31
+ /** Wipe all usage data for a workspace. */
32
+ async wipe(workspaceId) {
33
+ return this._http.request({ method: 'DELETE', path: `/workspace/${workspaceId}/usage` });
34
+ }
35
+ /** Start usage tracking for a workspace. */
36
+ async startTracking(workspaceId) {
37
+ return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/usage/tracking/start` });
38
+ }
39
+ /** Stop usage tracking for a workspace. */
40
+ async stopTracking(workspaceId) {
41
+ return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/usage/tracking/stop` });
42
+ }
43
+ }
44
+ //# sourceMappingURL=usage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.js","sourceRoot":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E,IAAI,EAAE,cAAc,WAAW,QAAQ,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED,4CAA4C;IAC5C,KAAK,CAAC,aAAa,CAAC,WAAmB;QACrC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,WAAW,uBAAuB,EAAE,CAAC,CAAC;IACxG,CAAC;IAED,2CAA2C;IAC3C,KAAK,CAAC,YAAY,CAAC,WAAmB;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,WAAW,sBAAsB,EAAE,CAAC,CAAC;IACvG,CAAC;CACF"}
@@ -0,0 +1,39 @@
1
+ import type { HttpClient } from '../http.js';
2
+ import type { ApiResponse } from '../types/common.js';
3
+ import type { WorkloadCreateParams, WorkloadUpdateParams, WorkloadInfo, WorkloadListParams, WorkloadStatsEvent, WorkloadLogEntry } from '../types/workspace-resources.js';
4
+ /** Managed workloads (long-running processes). */
5
+ export declare class WorkloadsResource {
6
+ private readonly _http;
7
+ constructor(_http: HttpClient);
8
+ /** Create a workload. */
9
+ create(workspaceId: string, params: WorkloadCreateParams): Promise<WorkloadInfo>;
10
+ /** List workloads. */
11
+ list(workspaceId: string, params?: WorkloadListParams): Promise<WorkloadInfo[]>;
12
+ /** Get a workload. */
13
+ get(workspaceId: string, workloadId: string): Promise<WorkloadInfo>;
14
+ /** Update a workload. */
15
+ update(workspaceId: string, workloadId: string, params: WorkloadUpdateParams): Promise<ApiResponse>;
16
+ /** Partial update a workload (PATCH alias). */
17
+ patch(workspaceId: string, workloadId: string, params: WorkloadUpdateParams): Promise<ApiResponse>;
18
+ /** Delete a workload. */
19
+ delete(workspaceId: string, workloadId: string): Promise<ApiResponse>;
20
+ /** Delete all workloads. */
21
+ deleteAll(workspaceId: string): Promise<ApiResponse>;
22
+ /** Start a workload. */
23
+ start(workspaceId: string, workloadId: string): Promise<ApiResponse>;
24
+ /** Stop a workload. */
25
+ stop(workspaceId: string, workloadId: string): Promise<ApiResponse>;
26
+ /** Get workload status. */
27
+ status(workspaceId: string, workloadId: string): Promise<ApiResponse>;
28
+ /** Get workload logs. */
29
+ logs(workspaceId: string, workloadId: string): Promise<ApiResponse>;
30
+ /** Get workload stats. */
31
+ stats(workspaceId: string, workloadId: string): Promise<ApiResponse>;
32
+ /** Stream workload stats (SSE). */
33
+ statsStream(workspaceId: string, workloadId: string): AsyncGenerator<WorkloadStatsEvent>;
34
+ /** Stream workload logs (SSE). */
35
+ logsStream(workspaceId: string, workloadId: string): AsyncGenerator<WorkloadLogEntry>;
36
+ /** Stream stats for ALL workloads (SSE). */
37
+ allStatsStream(workspaceId: string): AsyncGenerator<WorkloadStatsEvent>;
38
+ }
39
+ //# sourceMappingURL=workloads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workloads.d.ts","sourceRoot":"","sources":["../../src/resources/workloads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,iCAAiC,CAAC;AAEzC,kDAAkD;AAClD,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,yBAAyB;IACnB,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC;IAOtF,sBAAsB;IAChB,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,GAAE,kBAAuB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IASzF,sBAAsB;IAChB,GAAG,CAAC,WAAW,EAAE,M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