@athenaintel/sdk 4.3.2242 → 4.3.2244

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 (40) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/assets/client/Client.d.ts +20 -0
  3. package/dist/cjs/api/resources/assets/client/Client.js +90 -0
  4. package/dist/cjs/api/resources/assets/client/requests/ConvertToUserInterfaceAssetsRequest.d.ts +10 -0
  5. package/dist/cjs/api/resources/assets/client/requests/ConvertToUserInterfaceAssetsRequest.js +3 -0
  6. package/dist/cjs/api/resources/assets/client/requests/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/computer/client/Client.d.ts +30 -2
  8. package/dist/cjs/api/resources/computer/client/Client.js +100 -2
  9. package/dist/cjs/api/resources/computer/client/requests/GetStatusComputerRequest.d.ts +9 -0
  10. package/dist/cjs/api/resources/computer/client/requests/GetStatusComputerRequest.js +3 -0
  11. package/dist/cjs/api/resources/computer/client/requests/index.d.ts +1 -0
  12. package/dist/cjs/api/types/ComputerStatusResponseOut.d.ts +33 -0
  13. package/dist/cjs/api/types/ComputerStatusResponseOut.js +19 -0
  14. package/dist/cjs/api/types/ConvertToUserInterfaceResponseOut.d.ts +17 -0
  15. package/dist/cjs/api/types/ConvertToUserInterfaceResponseOut.js +3 -0
  16. package/dist/cjs/api/types/index.d.ts +2 -0
  17. package/dist/cjs/api/types/index.js +2 -0
  18. package/dist/cjs/version.d.ts +1 -1
  19. package/dist/cjs/version.js +1 -1
  20. package/dist/esm/BaseClient.mjs +2 -2
  21. package/dist/esm/api/resources/assets/client/Client.d.mts +20 -0
  22. package/dist/esm/api/resources/assets/client/Client.mjs +90 -0
  23. package/dist/esm/api/resources/assets/client/requests/ConvertToUserInterfaceAssetsRequest.d.mts +10 -0
  24. package/dist/esm/api/resources/assets/client/requests/ConvertToUserInterfaceAssetsRequest.mjs +2 -0
  25. package/dist/esm/api/resources/assets/client/requests/index.d.mts +1 -0
  26. package/dist/esm/api/resources/computer/client/Client.d.mts +30 -2
  27. package/dist/esm/api/resources/computer/client/Client.mjs +100 -2
  28. package/dist/esm/api/resources/computer/client/requests/GetStatusComputerRequest.d.mts +9 -0
  29. package/dist/esm/api/resources/computer/client/requests/GetStatusComputerRequest.mjs +2 -0
  30. package/dist/esm/api/resources/computer/client/requests/index.d.mts +1 -0
  31. package/dist/esm/api/types/ComputerStatusResponseOut.d.mts +33 -0
  32. package/dist/esm/api/types/ComputerStatusResponseOut.mjs +16 -0
  33. package/dist/esm/api/types/ConvertToUserInterfaceResponseOut.d.mts +17 -0
  34. package/dist/esm/api/types/ConvertToUserInterfaceResponseOut.mjs +2 -0
  35. package/dist/esm/api/types/index.d.mts +2 -0
  36. package/dist/esm/api/types/index.mjs +2 -0
  37. package/dist/esm/version.d.mts +1 -1
  38. package/dist/esm/version.mjs +1 -1
  39. package/package.json +1 -1
  40. package/reference.md +140 -2
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@athenaintel/sdk",
46
- "X-Fern-SDK-Version": "4.3.2242",
47
- "User-Agent": "@athenaintel/sdk/4.3.2242",
46
+ "X-Fern-SDK-Version": "4.3.2244",
47
+ "User-Agent": "@athenaintel/sdk/4.3.2244",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  "X-Athena-Session-Credential": options === null || options === void 0 ? void 0 : options.sessionCredential,
@@ -254,6 +254,26 @@ export declare class AssetsClient {
254
254
  */
255
255
  createCollabToken(request: AthenaIntelligence.CollabTokenRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CollabTokenResponse>;
256
256
  private __createCollabToken;
257
+ /**
258
+ * Turn an uploaded HTML file into a user interface (an app) under its own id — the conversion the Athena app's Convert to user interface performs. The asset keeps its id, folder, links and sharing (its title drops the .html extension), and no second asset is created. An uploaded HTML file stays a file until a request like this one asks: nothing converts on its own. The switch is one-way; the original upload stays downloadable from the asset's Versions pane. Requires edit access to the file. Idempotent: an asset that already is a user interface is answered as it is, with converted false. A refused conversion answers with a detail object: code CONVERSION_REFUSED, the reason, and a message saying why.
259
+ *
260
+ * @param {AthenaIntelligence.ConvertToUserInterfaceAssetsRequest} request
261
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
262
+ *
263
+ * @throws {@link AthenaIntelligence.BadRequestError}
264
+ * @throws {@link AthenaIntelligence.ForbiddenError}
265
+ * @throws {@link AthenaIntelligence.NotFoundError}
266
+ * @throws {@link AthenaIntelligence.ConflictError}
267
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
268
+ * @throws {@link AthenaIntelligence.ServiceUnavailableError}
269
+ *
270
+ * @example
271
+ * await client.assets.convertToUserInterface({
272
+ * asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
273
+ * })
274
+ */
275
+ convertToUserInterface(request: AthenaIntelligence.ConvertToUserInterfaceAssetsRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ConvertToUserInterfaceResponseOut>;
276
+ private __convertToUserInterface;
257
277
  /**
258
278
  * Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Microsoft 365 add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
259
279
  * @throws {@link AthenaIntelligence.BadRequestError}
@@ -1138,6 +1138,96 @@ class AssetsClient {
1138
1138
  }
1139
1139
  });
1140
1140
  }
1141
+ /**
1142
+ * Turn an uploaded HTML file into a user interface (an app) under its own id — the conversion the Athena app's Convert to user interface performs. The asset keeps its id, folder, links and sharing (its title drops the .html extension), and no second asset is created. An uploaded HTML file stays a file until a request like this one asks: nothing converts on its own. The switch is one-way; the original upload stays downloadable from the asset's Versions pane. Requires edit access to the file. Idempotent: an asset that already is a user interface is answered as it is, with converted false. A refused conversion answers with a detail object: code CONVERSION_REFUSED, the reason, and a message saying why.
1143
+ *
1144
+ * @param {AthenaIntelligence.ConvertToUserInterfaceAssetsRequest} request
1145
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
1146
+ *
1147
+ * @throws {@link AthenaIntelligence.BadRequestError}
1148
+ * @throws {@link AthenaIntelligence.ForbiddenError}
1149
+ * @throws {@link AthenaIntelligence.NotFoundError}
1150
+ * @throws {@link AthenaIntelligence.ConflictError}
1151
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
1152
+ * @throws {@link AthenaIntelligence.ServiceUnavailableError}
1153
+ *
1154
+ * @example
1155
+ * await client.assets.convertToUserInterface({
1156
+ * asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
1157
+ * })
1158
+ */
1159
+ convertToUserInterface(request, requestOptions) {
1160
+ return core.HttpResponsePromise.fromPromise(this.__convertToUserInterface(request, requestOptions));
1161
+ }
1162
+ __convertToUserInterface(request, requestOptions) {
1163
+ return __awaiter(this, void 0, void 0, function* () {
1164
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1165
+ const { asset_id: assetId } = request;
1166
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1167
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
1168
+ "X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
1169
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1170
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1171
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/convert-to-user-interface`),
1172
+ method: "POST",
1173
+ headers: _headers,
1174
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1175
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
1176
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
1177
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1178
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1179
+ logging: this._options.logging,
1180
+ });
1181
+ if (_response.ok) {
1182
+ return {
1183
+ data: _response.body,
1184
+ rawResponse: _response.rawResponse,
1185
+ };
1186
+ }
1187
+ if (_response.error.reason === "status-code") {
1188
+ switch (_response.error.statusCode) {
1189
+ case 400:
1190
+ throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
1191
+ case 403:
1192
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
1193
+ case 404:
1194
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
1195
+ case 409:
1196
+ throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
1197
+ case 422:
1198
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1199
+ case 503:
1200
+ throw new AthenaIntelligence.ServiceUnavailableError(_response.error.body, _response.rawResponse);
1201
+ default:
1202
+ throw new errors.AthenaIntelligenceError({
1203
+ statusCode: _response.error.statusCode,
1204
+ body: _response.error.body,
1205
+ rawResponse: _response.rawResponse,
1206
+ });
1207
+ }
1208
+ }
1209
+ switch (_response.error.reason) {
1210
+ case "non-json":
1211
+ throw new errors.AthenaIntelligenceError({
1212
+ statusCode: _response.error.statusCode,
1213
+ body: _response.error.rawBody,
1214
+ rawResponse: _response.rawResponse,
1215
+ });
1216
+ case "body-is-null":
1217
+ throw new errors.AthenaIntelligenceError({
1218
+ statusCode: _response.error.statusCode,
1219
+ rawResponse: _response.rawResponse,
1220
+ });
1221
+ case "timeout":
1222
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/assets/{asset_id}/convert-to-user-interface.");
1223
+ case "unknown":
1224
+ throw new errors.AthenaIntelligenceError({
1225
+ message: _response.error.errorMessage,
1226
+ rawResponse: _response.rawResponse,
1227
+ });
1228
+ }
1229
+ });
1230
+ }
1141
1231
  /**
1142
1232
  * Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Microsoft 365 add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
1143
1233
  * @throws {@link AthenaIntelligence.BadRequestError}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
5
+ * }
6
+ */
7
+ export interface ConvertToUserInterfaceAssetsRequest {
8
+ /** ID of the uploaded HTML file to turn into a user interface */
9
+ asset_id: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,6 +2,7 @@ export type { ArchiveAssetsRequest } from "./ArchiveAssetsRequest.js";
2
2
  export type { AssetActivityDeltaBatchRequestIn } from "./AssetActivityDeltaBatchRequestIn.js";
3
3
  export type { CollabTokenRequest } from "./CollabTokenRequest.js";
4
4
  export type { ConvertExcelToSheetRequestIn } from "./ConvertExcelToSheetRequestIn.js";
5
+ export type { ConvertToUserInterfaceAssetsRequest } from "./ConvertToUserInterfaceAssetsRequest.js";
5
6
  export type { CreateAssetRequestIn } from "./CreateAssetRequestIn.js";
6
7
  export type { CreateProjectRequestIn } from "./CreateProjectRequestIn.js";
7
8
  export type { DownloadAssetsRequest } from "./DownloadAssetsRequest.js";
@@ -69,7 +69,7 @@ export declare class ComputerClient {
69
69
  getSshAccess(request: AthenaIntelligence.GetSshAccessComputerRequest, requestOptions?: ComputerClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.SshAccessInfoOut>;
70
70
  private __getSshAccess;
71
71
  /**
72
- * Generate a time-limited SSH access token for a computer asset. Returns a full SSH command and token that can be used to connect to the computer's underlying VM and run commands. The computer must support SSH access and be in a running state.
72
+ * Generate a time-limited SSH access token for a computer asset. Returns a full SSH command and token that can be used to connect to the computer's underlying VM and run commands. The computer must support SSH access. If it is stopped, this call starts it first and can take as long as `start_computer`; after an explicit Stop it returns 409 until you call `start_computer`. Use `get_status` to see whether the computer is ready.
73
73
  *
74
74
  * @param {AthenaIntelligence.CreateSshAccessRequestIn} request
75
75
  * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -147,7 +147,7 @@ export declare class ComputerClient {
147
147
  revokeSshAccessToken(request: AthenaIntelligence.RevokeSshAccessTokenComputerRequest, requestOptions?: ComputerClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.RevokeSshAccessResponseOut>;
148
148
  private __revokeSshAccessToken;
149
149
  /**
150
- * Start a stopped computer's runtime and wait for it to come up — the same operation as the Start button in Athena. Idempotent for a running computer. Returns 409 when the computer's provider does not support lifecycle operations.
150
+ * Start a stopped computer's runtime and wait for it to come up — the same operation as the Start button in Athena. Idempotent for a running computer, and it clears an explicit stop. `state` is `started` once the runtime is up; the guest can need a few more seconds, so poll `get_status` until `ready` is true before you rely on commands or SSH. A proxy in front of the API can end this request after about 60 seconds while the start continues on the server; then poll `get_status`. Returns 409 when the computer's provider does not support lifecycle operations.
151
151
  *
152
152
  * @param {AthenaIntelligence.StartComputerComputerRequest} request
153
153
  * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -165,6 +165,34 @@ export declare class ComputerClient {
165
165
  */
166
166
  startComputer(request: AthenaIntelligence.StartComputerComputerRequest, requestOptions?: ComputerClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ComputerLifecycleResponseOut>;
167
167
  private __startComputer;
168
+ /**
169
+ * Read an existing computer's live runtime state and whether it is ready, without starting, waking, or repairing it. Works for every computer, including those created before durable initialization (`get_initialization` reports creation-time progress only). Requires membership in the computer's workspace and VIEW access. This read does not count as activity, so polling it does not keep the computer awake.
170
+ *
171
+ * **Waiting for a computer.** Call `start_computer`, then poll this endpoint every few seconds until `ready` is true; stop polling when `not_ready_reason` is `launcher_outdated`. `start_computer` waits for the computer, but a proxy in front of the API can end a long request (about 60 seconds on Athena's ingress) while the start continues on the server. The server waits up to 210 seconds by default for the computer's runtime to boot before it reports a failure, and Athena alerts its operators when the 90th percentile of starts goes above 3 minutes.
172
+ *
173
+ * **Auto-stop.** A computer stops after its `auto_stop_minutes` of inactivity (60 minutes unless the computer or the deployment sets another value; 0 means it never stops on its own). Activity is work inside the computer — commands, terminal and SSH sessions, file operations — and requests to its deployed URLs. Status reads are not activity.
174
+ *
175
+ * **The asset record's `status`.** The computer's `status` in `GET /assets/{asset_id}` records the last lifecycle change Athena recorded (create, Start, Stop); it is not a live read. It can read `running` while the computer is stopped, for example after an idle auto-stop, or `stopped` after something woke it. Use this endpoint for the live state.
176
+ *
177
+ * Returns 403 when the caller is not a member of the computer's workspace, 409 while the computer is still being created or when its creation failed, 404 when the asset does not exist or its runtime is gone for good (stop polling), and 502 when the runtime could not be read (retry).
178
+ *
179
+ * @param {AthenaIntelligence.GetStatusComputerRequest} request
180
+ * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
181
+ *
182
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
183
+ * @throws {@link AthenaIntelligence.ForbiddenError}
184
+ * @throws {@link AthenaIntelligence.NotFoundError}
185
+ * @throws {@link AthenaIntelligence.ConflictError}
186
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
187
+ * @throws {@link AthenaIntelligence.BadGatewayError}
188
+ *
189
+ * @example
190
+ * await client.computer.getStatus({
191
+ * asset_id: "asset_id"
192
+ * })
193
+ */
194
+ getStatus(request: AthenaIntelligence.GetStatusComputerRequest, requestOptions?: ComputerClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ComputerStatusResponseOut>;
195
+ private __getStatus;
168
196
  /**
169
197
  * Stop (suspend) a running computer's runtime — the same operation as the Stop button in Athena. The computer's files persist and it can be started again with `start_computer`. Returns 409 when the provider does not support lifecycle operations or when the stop was refused because the workspace could not be saved (the computer is left running; retry).
170
198
  *
@@ -325,7 +325,7 @@ class ComputerClient {
325
325
  });
326
326
  }
327
327
  /**
328
- * Generate a time-limited SSH access token for a computer asset. Returns a full SSH command and token that can be used to connect to the computer's underlying VM and run commands. The computer must support SSH access and be in a running state.
328
+ * Generate a time-limited SSH access token for a computer asset. Returns a full SSH command and token that can be used to connect to the computer's underlying VM and run commands. The computer must support SSH access. If it is stopped, this call starts it first and can take as long as `start_computer`; after an explicit Stop it returns 409 until you call `start_computer`. Use `get_status` to see whether the computer is ready.
329
329
  *
330
330
  * @param {AthenaIntelligence.CreateSshAccessRequestIn} request
331
331
  * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -679,7 +679,7 @@ class ComputerClient {
679
679
  });
680
680
  }
681
681
  /**
682
- * Start a stopped computer's runtime and wait for it to come up — the same operation as the Start button in Athena. Idempotent for a running computer. Returns 409 when the computer's provider does not support lifecycle operations.
682
+ * Start a stopped computer's runtime and wait for it to come up — the same operation as the Start button in Athena. Idempotent for a running computer, and it clears an explicit stop. `state` is `started` once the runtime is up; the guest can need a few more seconds, so poll `get_status` until `ready` is true before you rely on commands or SSH. A proxy in front of the API can end this request after about 60 seconds while the start continues on the server; then poll `get_status`. Returns 409 when the computer's provider does not support lifecycle operations.
683
683
  *
684
684
  * @param {AthenaIntelligence.StartComputerComputerRequest} request
685
685
  * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -765,6 +765,104 @@ class ComputerClient {
765
765
  }
766
766
  });
767
767
  }
768
+ /**
769
+ * Read an existing computer's live runtime state and whether it is ready, without starting, waking, or repairing it. Works for every computer, including those created before durable initialization (`get_initialization` reports creation-time progress only). Requires membership in the computer's workspace and VIEW access. This read does not count as activity, so polling it does not keep the computer awake.
770
+ *
771
+ * **Waiting for a computer.** Call `start_computer`, then poll this endpoint every few seconds until `ready` is true; stop polling when `not_ready_reason` is `launcher_outdated`. `start_computer` waits for the computer, but a proxy in front of the API can end a long request (about 60 seconds on Athena's ingress) while the start continues on the server. The server waits up to 210 seconds by default for the computer's runtime to boot before it reports a failure, and Athena alerts its operators when the 90th percentile of starts goes above 3 minutes.
772
+ *
773
+ * **Auto-stop.** A computer stops after its `auto_stop_minutes` of inactivity (60 minutes unless the computer or the deployment sets another value; 0 means it never stops on its own). Activity is work inside the computer — commands, terminal and SSH sessions, file operations — and requests to its deployed URLs. Status reads are not activity.
774
+ *
775
+ * **The asset record's `status`.** The computer's `status` in `GET /assets/{asset_id}` records the last lifecycle change Athena recorded (create, Start, Stop); it is not a live read. It can read `running` while the computer is stopped, for example after an idle auto-stop, or `stopped` after something woke it. Use this endpoint for the live state.
776
+ *
777
+ * Returns 403 when the caller is not a member of the computer's workspace, 409 while the computer is still being created or when its creation failed, 404 when the asset does not exist or its runtime is gone for good (stop polling), and 502 when the runtime could not be read (retry).
778
+ *
779
+ * @param {AthenaIntelligence.GetStatusComputerRequest} request
780
+ * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
781
+ *
782
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
783
+ * @throws {@link AthenaIntelligence.ForbiddenError}
784
+ * @throws {@link AthenaIntelligence.NotFoundError}
785
+ * @throws {@link AthenaIntelligence.ConflictError}
786
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
787
+ * @throws {@link AthenaIntelligence.BadGatewayError}
788
+ *
789
+ * @example
790
+ * await client.computer.getStatus({
791
+ * asset_id: "asset_id"
792
+ * })
793
+ */
794
+ getStatus(request, requestOptions) {
795
+ return core.HttpResponsePromise.fromPromise(this.__getStatus(request, requestOptions));
796
+ }
797
+ __getStatus(request, requestOptions) {
798
+ return __awaiter(this, void 0, void 0, function* () {
799
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
800
+ const { asset_id: assetId } = request;
801
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
802
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
803
+ "X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
804
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
805
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
806
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, `api/v0/computer/${core.url.encodePathParam(assetId)}/status`),
807
+ method: "GET",
808
+ headers: _headers,
809
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
810
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
811
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
812
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
813
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
814
+ logging: this._options.logging,
815
+ });
816
+ if (_response.ok) {
817
+ return {
818
+ data: _response.body,
819
+ rawResponse: _response.rawResponse,
820
+ };
821
+ }
822
+ if (_response.error.reason === "status-code") {
823
+ switch (_response.error.statusCode) {
824
+ case 401:
825
+ throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
826
+ case 403:
827
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
828
+ case 404:
829
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
830
+ case 409:
831
+ throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
832
+ case 422:
833
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
834
+ case 502:
835
+ throw new AthenaIntelligence.BadGatewayError(_response.error.body, _response.rawResponse);
836
+ default:
837
+ throw new errors.AthenaIntelligenceError({
838
+ statusCode: _response.error.statusCode,
839
+ body: _response.error.body,
840
+ rawResponse: _response.rawResponse,
841
+ });
842
+ }
843
+ }
844
+ switch (_response.error.reason) {
845
+ case "non-json":
846
+ throw new errors.AthenaIntelligenceError({
847
+ statusCode: _response.error.statusCode,
848
+ body: _response.error.rawBody,
849
+ rawResponse: _response.rawResponse,
850
+ });
851
+ case "body-is-null":
852
+ throw new errors.AthenaIntelligenceError({
853
+ statusCode: _response.error.statusCode,
854
+ rawResponse: _response.rawResponse,
855
+ });
856
+ case "timeout":
857
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/computer/{asset_id}/status.");
858
+ case "unknown":
859
+ throw new errors.AthenaIntelligenceError({
860
+ message: _response.error.errorMessage,
861
+ rawResponse: _response.rawResponse,
862
+ });
863
+ }
864
+ });
865
+ }
768
866
  /**
769
867
  * Stop (suspend) a running computer's runtime — the same operation as the Stop button in Athena. The computer's files persist and it can be started again with `start_computer`. Returns 409 when the provider does not support lifecycle operations or when the stop was refused because the workspace could not be saved (the computer is left running; retry).
770
868
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * asset_id: "asset_id"
5
+ * }
6
+ */
7
+ export interface GetStatusComputerRequest {
8
+ asset_id: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,6 +2,7 @@ export type { CreateSshAccessRequestIn } from "./CreateSshAccessRequestIn.js";
2
2
  export type { DeployComputerRequestIn } from "./DeployComputerRequestIn.js";
3
3
  export type { GetInitializationComputerRequest } from "./GetInitializationComputerRequest.js";
4
4
  export type { GetSshAccessComputerRequest } from "./GetSshAccessComputerRequest.js";
5
+ export type { GetStatusComputerRequest } from "./GetStatusComputerRequest.js";
5
6
  export type { ListSshAccessTokensComputerRequest } from "./ListSshAccessTokensComputerRequest.js";
6
7
  export type { RevokeSshAccessRequestIn } from "./RevokeSshAccessRequestIn.js";
7
8
  export type { RevokeSshAccessTokenComputerRequest } from "./RevokeSshAccessTokenComputerRequest.js";
@@ -0,0 +1,33 @@
1
+ /**
2
+ * A computer's live runtime state, read without starting or waking it.
3
+ */
4
+ export interface ComputerStatusResponseOut {
5
+ /** The computer asset id. */
6
+ asset_id: string;
7
+ /** Set when someone stopped the computer with Stop. While it is `stopping`, `stopped` or `uncertain`, implicit wakes are refused: minting SSH access answers 409 and an SSH connection does not start it. Call `start_computer` to clear it. `null` or `cleared` means no explicit stop is in force. */
8
+ explicit_stop?: ComputerStatusResponseOut.ExplicitStop | null;
9
+ /** Why `ready` is false; `null` when it is true. `not_started`: the computer is not running — call `start_computer`. `starting`: it is running and its guest is still coming up — keep polling. `unobservable`: readiness could not be read this time — keep polling. `launcher_outdated`: the computer runs an outdated runtime component that polling will not change — stop it and start it again to update it. */
10
+ not_ready_reason?: ComputerStatusResponseOut.NotReadyReason | null;
11
+ /** The computer's runtime provider (e.g. `talos_v2`). */
12
+ provider?: string | null;
13
+ /** Whether the computer serves work now: `state` is `started` and the guest answers ready (its workspace attached and its environment applied). Only then do commands, SSH sessions and deployed URLs reach the computer without first waiting for a start. `started` alone can come a few seconds before `ready`. */
14
+ ready: boolean;
15
+ /** The runtime's current state: `started` (running; check `ready`), `stopped` (suspended — by idle auto-stop or by Stop; files are kept), `restoring` (a start is in progress), `error` (the runtime failed; start or restart it), or `unknown` (the state could not be read this time; retry). `started`, `stopped` and `error` hold until something changes them; `restoring` and `unknown` are transient. */
16
+ state: string;
17
+ }
18
+ export declare namespace ComputerStatusResponseOut {
19
+ const ExplicitStop: {
20
+ readonly Stopping: "stopping";
21
+ readonly Stopped: "stopped";
22
+ readonly Uncertain: "uncertain";
23
+ readonly Cleared: "cleared";
24
+ };
25
+ type ExplicitStop = (typeof ExplicitStop)[keyof typeof ExplicitStop];
26
+ const NotReadyReason: {
27
+ readonly NotStarted: "not_started";
28
+ readonly Starting: "starting";
29
+ readonly LauncherOutdated: "launcher_outdated";
30
+ readonly Unobservable: "unobservable";
31
+ };
32
+ type NotReadyReason = (typeof NotReadyReason)[keyof typeof NotReadyReason];
33
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ComputerStatusResponseOut = void 0;
5
+ var ComputerStatusResponseOut;
6
+ (function (ComputerStatusResponseOut) {
7
+ ComputerStatusResponseOut.ExplicitStop = {
8
+ Stopping: "stopping",
9
+ Stopped: "stopped",
10
+ Uncertain: "uncertain",
11
+ Cleared: "cleared",
12
+ };
13
+ ComputerStatusResponseOut.NotReadyReason = {
14
+ NotStarted: "not_started",
15
+ Starting: "starting",
16
+ LauncherOutdated: "launcher_outdated",
17
+ Unobservable: "unobservable",
18
+ };
19
+ })(ComputerStatusResponseOut || (exports.ComputerStatusResponseOut = ComputerStatusResponseOut = {}));
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Response model for turning an uploaded HTML file into a user interface.
3
+ */
4
+ export interface ConvertToUserInterfaceResponseOut {
5
+ /** ID of the user interface: the HTML file's own id, which it keeps (no second asset is created) */
6
+ asset_id: string;
7
+ /** Type of the asset after the request: user_interface */
8
+ asset_type: string;
9
+ /** True when this request converted the file; false when the asset already was a user interface, in which case nothing changed */
10
+ converted: boolean;
11
+ /** ID of the asset's parent folder, which the conversion keeps */
12
+ parent_folder_id?: string | null;
13
+ /** Title of the user interface */
14
+ title: string;
15
+ /** ID of the workspace that owns the asset */
16
+ workspace_id?: string | null;
17
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -41,10 +41,12 @@ export * from "./CollabAgentSendMessageResponseOut.js";
41
41
  export * from "./CollabTokenResponse.js";
42
42
  export * from "./ComputerInitializationResponse.js";
43
43
  export * from "./ComputerLifecycleResponseOut.js";
44
+ export * from "./ComputerStatusResponseOut.js";
44
45
  export * from "./ConversationAssetInfo.js";
45
46
  export * from "./ConversationMessage.js";
46
47
  export * from "./ConversationResult.js";
47
48
  export * from "./ConvertExcelToSheetResponseOut.js";
49
+ export * from "./ConvertToUserInterfaceResponseOut.js";
48
50
  export * from "./CreatableAssetType.js";
49
51
  export * from "./CreateAssetResponseOut.js";
50
52
  export * from "./CreateNewSheetTabResponse.js";
@@ -57,10 +57,12 @@ __exportStar(require("./CollabAgentSendMessageResponseOut.js"), exports);
57
57
  __exportStar(require("./CollabTokenResponse.js"), exports);
58
58
  __exportStar(require("./ComputerInitializationResponse.js"), exports);
59
59
  __exportStar(require("./ComputerLifecycleResponseOut.js"), exports);
60
+ __exportStar(require("./ComputerStatusResponseOut.js"), exports);
60
61
  __exportStar(require("./ConversationAssetInfo.js"), exports);
61
62
  __exportStar(require("./ConversationMessage.js"), exports);
62
63
  __exportStar(require("./ConversationResult.js"), exports);
63
64
  __exportStar(require("./ConvertExcelToSheetResponseOut.js"), exports);
65
+ __exportStar(require("./ConvertToUserInterfaceResponseOut.js"), exports);
64
66
  __exportStar(require("./CreatableAssetType.js"), exports);
65
67
  __exportStar(require("./CreateAssetResponseOut.js"), exports);
66
68
  __exportStar(require("./CreateNewSheetTabResponse.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.2242";
1
+ export declare const SDK_VERSION = "4.3.2244";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "4.3.2242";
4
+ exports.SDK_VERSION = "4.3.2244";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@athenaintel/sdk",
9
- "X-Fern-SDK-Version": "4.3.2242",
10
- "User-Agent": "@athenaintel/sdk/4.3.2242",
9
+ "X-Fern-SDK-Version": "4.3.2244",
10
+ "User-Agent": "@athenaintel/sdk/4.3.2244",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  "X-Athena-Session-Credential": options === null || options === void 0 ? void 0 : options.sessionCredential,
@@ -254,6 +254,26 @@ export declare class AssetsClient {
254
254
  */
255
255
  createCollabToken(request: AthenaIntelligence.CollabTokenRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CollabTokenResponse>;
256
256
  private __createCollabToken;
257
+ /**
258
+ * Turn an uploaded HTML file into a user interface (an app) under its own id — the conversion the Athena app's Convert to user interface performs. The asset keeps its id, folder, links and sharing (its title drops the .html extension), and no second asset is created. An uploaded HTML file stays a file until a request like this one asks: nothing converts on its own. The switch is one-way; the original upload stays downloadable from the asset's Versions pane. Requires edit access to the file. Idempotent: an asset that already is a user interface is answered as it is, with converted false. A refused conversion answers with a detail object: code CONVERSION_REFUSED, the reason, and a message saying why.
259
+ *
260
+ * @param {AthenaIntelligence.ConvertToUserInterfaceAssetsRequest} request
261
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
262
+ *
263
+ * @throws {@link AthenaIntelligence.BadRequestError}
264
+ * @throws {@link AthenaIntelligence.ForbiddenError}
265
+ * @throws {@link AthenaIntelligence.NotFoundError}
266
+ * @throws {@link AthenaIntelligence.ConflictError}
267
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
268
+ * @throws {@link AthenaIntelligence.ServiceUnavailableError}
269
+ *
270
+ * @example
271
+ * await client.assets.convertToUserInterface({
272
+ * asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
273
+ * })
274
+ */
275
+ convertToUserInterface(request: AthenaIntelligence.ConvertToUserInterfaceAssetsRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ConvertToUserInterfaceResponseOut>;
276
+ private __convertToUserInterface;
257
277
  /**
258
278
  * Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Microsoft 365 add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
259
279
  * @throws {@link AthenaIntelligence.BadRequestError}
@@ -1102,6 +1102,96 @@ export class AssetsClient {
1102
1102
  }
1103
1103
  });
1104
1104
  }
1105
+ /**
1106
+ * Turn an uploaded HTML file into a user interface (an app) under its own id — the conversion the Athena app's Convert to user interface performs. The asset keeps its id, folder, links and sharing (its title drops the .html extension), and no second asset is created. An uploaded HTML file stays a file until a request like this one asks: nothing converts on its own. The switch is one-way; the original upload stays downloadable from the asset's Versions pane. Requires edit access to the file. Idempotent: an asset that already is a user interface is answered as it is, with converted false. A refused conversion answers with a detail object: code CONVERSION_REFUSED, the reason, and a message saying why.
1107
+ *
1108
+ * @param {AthenaIntelligence.ConvertToUserInterfaceAssetsRequest} request
1109
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
1110
+ *
1111
+ * @throws {@link AthenaIntelligence.BadRequestError}
1112
+ * @throws {@link AthenaIntelligence.ForbiddenError}
1113
+ * @throws {@link AthenaIntelligence.NotFoundError}
1114
+ * @throws {@link AthenaIntelligence.ConflictError}
1115
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
1116
+ * @throws {@link AthenaIntelligence.ServiceUnavailableError}
1117
+ *
1118
+ * @example
1119
+ * await client.assets.convertToUserInterface({
1120
+ * asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
1121
+ * })
1122
+ */
1123
+ convertToUserInterface(request, requestOptions) {
1124
+ return core.HttpResponsePromise.fromPromise(this.__convertToUserInterface(request, requestOptions));
1125
+ }
1126
+ __convertToUserInterface(request, requestOptions) {
1127
+ return __awaiter(this, void 0, void 0, function* () {
1128
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1129
+ const { asset_id: assetId } = request;
1130
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1131
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1132
+ "X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
1133
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1134
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1135
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/convert-to-user-interface`),
1136
+ method: "POST",
1137
+ headers: _headers,
1138
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1139
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
1140
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
1141
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1142
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1143
+ logging: this._options.logging,
1144
+ });
1145
+ if (_response.ok) {
1146
+ return {
1147
+ data: _response.body,
1148
+ rawResponse: _response.rawResponse,
1149
+ };
1150
+ }
1151
+ if (_response.error.reason === "status-code") {
1152
+ switch (_response.error.statusCode) {
1153
+ case 400:
1154
+ throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
1155
+ case 403:
1156
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
1157
+ case 404:
1158
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
1159
+ case 409:
1160
+ throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
1161
+ case 422:
1162
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1163
+ case 503:
1164
+ throw new AthenaIntelligence.ServiceUnavailableError(_response.error.body, _response.rawResponse);
1165
+ default:
1166
+ throw new errors.AthenaIntelligenceError({
1167
+ statusCode: _response.error.statusCode,
1168
+ body: _response.error.body,
1169
+ rawResponse: _response.rawResponse,
1170
+ });
1171
+ }
1172
+ }
1173
+ switch (_response.error.reason) {
1174
+ case "non-json":
1175
+ throw new errors.AthenaIntelligenceError({
1176
+ statusCode: _response.error.statusCode,
1177
+ body: _response.error.rawBody,
1178
+ rawResponse: _response.rawResponse,
1179
+ });
1180
+ case "body-is-null":
1181
+ throw new errors.AthenaIntelligenceError({
1182
+ statusCode: _response.error.statusCode,
1183
+ rawResponse: _response.rawResponse,
1184
+ });
1185
+ case "timeout":
1186
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/assets/{asset_id}/convert-to-user-interface.");
1187
+ case "unknown":
1188
+ throw new errors.AthenaIntelligenceError({
1189
+ message: _response.error.errorMessage,
1190
+ rawResponse: _response.rawResponse,
1191
+ });
1192
+ }
1193
+ });
1194
+ }
1105
1195
  /**
1106
1196
  * Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Microsoft 365 add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
1107
1197
  * @throws {@link AthenaIntelligence.BadRequestError}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
5
+ * }
6
+ */
7
+ export interface ConvertToUserInterfaceAssetsRequest {
8
+ /** ID of the uploaded HTML file to turn into a user interface */
9
+ asset_id: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -2,6 +2,7 @@ export type { ArchiveAssetsRequest } from "./ArchiveAssetsRequest.mjs";
2
2
  export type { AssetActivityDeltaBatchRequestIn } from "./AssetActivityDeltaBatchRequestIn.mjs";
3
3
  export type { CollabTokenRequest } from "./CollabTokenRequest.mjs";
4
4
  export type { ConvertExcelToSheetRequestIn } from "./ConvertExcelToSheetRequestIn.mjs";
5
+ export type { ConvertToUserInterfaceAssetsRequest } from "./ConvertToUserInterfaceAssetsRequest.mjs";
5
6
  export type { CreateAssetRequestIn } from "./CreateAssetRequestIn.mjs";
6
7
  export type { CreateProjectRequestIn } from "./CreateProjectRequestIn.mjs";
7
8
  export type { DownloadAssetsRequest } from "./DownloadAssetsRequest.mjs";
@@ -69,7 +69,7 @@ export declare class ComputerClient {
69
69
  getSshAccess(request: AthenaIntelligence.GetSshAccessComputerRequest, requestOptions?: ComputerClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.SshAccessInfoOut>;
70
70
  private __getSshAccess;
71
71
  /**
72
- * Generate a time-limited SSH access token for a computer asset. Returns a full SSH command and token that can be used to connect to the computer's underlying VM and run commands. The computer must support SSH access and be in a running state.
72
+ * Generate a time-limited SSH access token for a computer asset. Returns a full SSH command and token that can be used to connect to the computer's underlying VM and run commands. The computer must support SSH access. If it is stopped, this call starts it first and can take as long as `start_computer`; after an explicit Stop it returns 409 until you call `start_computer`. Use `get_status` to see whether the computer is ready.
73
73
  *
74
74
  * @param {AthenaIntelligence.CreateSshAccessRequestIn} request
75
75
  * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -147,7 +147,7 @@ export declare class ComputerClient {
147
147
  revokeSshAccessToken(request: AthenaIntelligence.RevokeSshAccessTokenComputerRequest, requestOptions?: ComputerClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.RevokeSshAccessResponseOut>;
148
148
  private __revokeSshAccessToken;
149
149
  /**
150
- * Start a stopped computer's runtime and wait for it to come up — the same operation as the Start button in Athena. Idempotent for a running computer. Returns 409 when the computer's provider does not support lifecycle operations.
150
+ * Start a stopped computer's runtime and wait for it to come up — the same operation as the Start button in Athena. Idempotent for a running computer, and it clears an explicit stop. `state` is `started` once the runtime is up; the guest can need a few more seconds, so poll `get_status` until `ready` is true before you rely on commands or SSH. A proxy in front of the API can end this request after about 60 seconds while the start continues on the server; then poll `get_status`. Returns 409 when the computer's provider does not support lifecycle operations.
151
151
  *
152
152
  * @param {AthenaIntelligence.StartComputerComputerRequest} request
153
153
  * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -165,6 +165,34 @@ export declare class ComputerClient {
165
165
  */
166
166
  startComputer(request: AthenaIntelligence.StartComputerComputerRequest, requestOptions?: ComputerClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ComputerLifecycleResponseOut>;
167
167
  private __startComputer;
168
+ /**
169
+ * Read an existing computer's live runtime state and whether it is ready, without starting, waking, or repairing it. Works for every computer, including those created before durable initialization (`get_initialization` reports creation-time progress only). Requires membership in the computer's workspace and VIEW access. This read does not count as activity, so polling it does not keep the computer awake.
170
+ *
171
+ * **Waiting for a computer.** Call `start_computer`, then poll this endpoint every few seconds until `ready` is true; stop polling when `not_ready_reason` is `launcher_outdated`. `start_computer` waits for the computer, but a proxy in front of the API can end a long request (about 60 seconds on Athena's ingress) while the start continues on the server. The server waits up to 210 seconds by default for the computer's runtime to boot before it reports a failure, and Athena alerts its operators when the 90th percentile of starts goes above 3 minutes.
172
+ *
173
+ * **Auto-stop.** A computer stops after its `auto_stop_minutes` of inactivity (60 minutes unless the computer or the deployment sets another value; 0 means it never stops on its own). Activity is work inside the computer — commands, terminal and SSH sessions, file operations — and requests to its deployed URLs. Status reads are not activity.
174
+ *
175
+ * **The asset record's `status`.** The computer's `status` in `GET /assets/{asset_id}` records the last lifecycle change Athena recorded (create, Start, Stop); it is not a live read. It can read `running` while the computer is stopped, for example after an idle auto-stop, or `stopped` after something woke it. Use this endpoint for the live state.
176
+ *
177
+ * Returns 403 when the caller is not a member of the computer's workspace, 409 while the computer is still being created or when its creation failed, 404 when the asset does not exist or its runtime is gone for good (stop polling), and 502 when the runtime could not be read (retry).
178
+ *
179
+ * @param {AthenaIntelligence.GetStatusComputerRequest} request
180
+ * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
181
+ *
182
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
183
+ * @throws {@link AthenaIntelligence.ForbiddenError}
184
+ * @throws {@link AthenaIntelligence.NotFoundError}
185
+ * @throws {@link AthenaIntelligence.ConflictError}
186
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
187
+ * @throws {@link AthenaIntelligence.BadGatewayError}
188
+ *
189
+ * @example
190
+ * await client.computer.getStatus({
191
+ * asset_id: "asset_id"
192
+ * })
193
+ */
194
+ getStatus(request: AthenaIntelligence.GetStatusComputerRequest, requestOptions?: ComputerClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ComputerStatusResponseOut>;
195
+ private __getStatus;
168
196
  /**
169
197
  * Stop (suspend) a running computer's runtime — the same operation as the Stop button in Athena. The computer's files persist and it can be started again with `start_computer`. Returns 409 when the provider does not support lifecycle operations or when the stop was refused because the workspace could not be saved (the computer is left running; retry).
170
198
  *
@@ -289,7 +289,7 @@ export class ComputerClient {
289
289
  });
290
290
  }
291
291
  /**
292
- * Generate a time-limited SSH access token for a computer asset. Returns a full SSH command and token that can be used to connect to the computer's underlying VM and run commands. The computer must support SSH access and be in a running state.
292
+ * Generate a time-limited SSH access token for a computer asset. Returns a full SSH command and token that can be used to connect to the computer's underlying VM and run commands. The computer must support SSH access. If it is stopped, this call starts it first and can take as long as `start_computer`; after an explicit Stop it returns 409 until you call `start_computer`. Use `get_status` to see whether the computer is ready.
293
293
  *
294
294
  * @param {AthenaIntelligence.CreateSshAccessRequestIn} request
295
295
  * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -643,7 +643,7 @@ export class ComputerClient {
643
643
  });
644
644
  }
645
645
  /**
646
- * Start a stopped computer's runtime and wait for it to come up — the same operation as the Start button in Athena. Idempotent for a running computer. Returns 409 when the computer's provider does not support lifecycle operations.
646
+ * Start a stopped computer's runtime and wait for it to come up — the same operation as the Start button in Athena. Idempotent for a running computer, and it clears an explicit stop. `state` is `started` once the runtime is up; the guest can need a few more seconds, so poll `get_status` until `ready` is true before you rely on commands or SSH. A proxy in front of the API can end this request after about 60 seconds while the start continues on the server; then poll `get_status`. Returns 409 when the computer's provider does not support lifecycle operations.
647
647
  *
648
648
  * @param {AthenaIntelligence.StartComputerComputerRequest} request
649
649
  * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -729,6 +729,104 @@ export class ComputerClient {
729
729
  }
730
730
  });
731
731
  }
732
+ /**
733
+ * Read an existing computer's live runtime state and whether it is ready, without starting, waking, or repairing it. Works for every computer, including those created before durable initialization (`get_initialization` reports creation-time progress only). Requires membership in the computer's workspace and VIEW access. This read does not count as activity, so polling it does not keep the computer awake.
734
+ *
735
+ * **Waiting for a computer.** Call `start_computer`, then poll this endpoint every few seconds until `ready` is true; stop polling when `not_ready_reason` is `launcher_outdated`. `start_computer` waits for the computer, but a proxy in front of the API can end a long request (about 60 seconds on Athena's ingress) while the start continues on the server. The server waits up to 210 seconds by default for the computer's runtime to boot before it reports a failure, and Athena alerts its operators when the 90th percentile of starts goes above 3 minutes.
736
+ *
737
+ * **Auto-stop.** A computer stops after its `auto_stop_minutes` of inactivity (60 minutes unless the computer or the deployment sets another value; 0 means it never stops on its own). Activity is work inside the computer — commands, terminal and SSH sessions, file operations — and requests to its deployed URLs. Status reads are not activity.
738
+ *
739
+ * **The asset record's `status`.** The computer's `status` in `GET /assets/{asset_id}` records the last lifecycle change Athena recorded (create, Start, Stop); it is not a live read. It can read `running` while the computer is stopped, for example after an idle auto-stop, or `stopped` after something woke it. Use this endpoint for the live state.
740
+ *
741
+ * Returns 403 when the caller is not a member of the computer's workspace, 409 while the computer is still being created or when its creation failed, 404 when the asset does not exist or its runtime is gone for good (stop polling), and 502 when the runtime could not be read (retry).
742
+ *
743
+ * @param {AthenaIntelligence.GetStatusComputerRequest} request
744
+ * @param {ComputerClient.RequestOptions} requestOptions - Request-specific configuration.
745
+ *
746
+ * @throws {@link AthenaIntelligence.UnauthorizedError}
747
+ * @throws {@link AthenaIntelligence.ForbiddenError}
748
+ * @throws {@link AthenaIntelligence.NotFoundError}
749
+ * @throws {@link AthenaIntelligence.ConflictError}
750
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
751
+ * @throws {@link AthenaIntelligence.BadGatewayError}
752
+ *
753
+ * @example
754
+ * await client.computer.getStatus({
755
+ * asset_id: "asset_id"
756
+ * })
757
+ */
758
+ getStatus(request, requestOptions) {
759
+ return core.HttpResponsePromise.fromPromise(this.__getStatus(request, requestOptions));
760
+ }
761
+ __getStatus(request, requestOptions) {
762
+ return __awaiter(this, void 0, void 0, function* () {
763
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
764
+ const { asset_id: assetId } = request;
765
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
766
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
767
+ "X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
768
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
769
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
770
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, `api/v0/computer/${core.url.encodePathParam(assetId)}/status`),
771
+ method: "GET",
772
+ headers: _headers,
773
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
774
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
775
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
776
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
777
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
778
+ logging: this._options.logging,
779
+ });
780
+ if (_response.ok) {
781
+ return {
782
+ data: _response.body,
783
+ rawResponse: _response.rawResponse,
784
+ };
785
+ }
786
+ if (_response.error.reason === "status-code") {
787
+ switch (_response.error.statusCode) {
788
+ case 401:
789
+ throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
790
+ case 403:
791
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
792
+ case 404:
793
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
794
+ case 409:
795
+ throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
796
+ case 422:
797
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
798
+ case 502:
799
+ throw new AthenaIntelligence.BadGatewayError(_response.error.body, _response.rawResponse);
800
+ default:
801
+ throw new errors.AthenaIntelligenceError({
802
+ statusCode: _response.error.statusCode,
803
+ body: _response.error.body,
804
+ rawResponse: _response.rawResponse,
805
+ });
806
+ }
807
+ }
808
+ switch (_response.error.reason) {
809
+ case "non-json":
810
+ throw new errors.AthenaIntelligenceError({
811
+ statusCode: _response.error.statusCode,
812
+ body: _response.error.rawBody,
813
+ rawResponse: _response.rawResponse,
814
+ });
815
+ case "body-is-null":
816
+ throw new errors.AthenaIntelligenceError({
817
+ statusCode: _response.error.statusCode,
818
+ rawResponse: _response.rawResponse,
819
+ });
820
+ case "timeout":
821
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/computer/{asset_id}/status.");
822
+ case "unknown":
823
+ throw new errors.AthenaIntelligenceError({
824
+ message: _response.error.errorMessage,
825
+ rawResponse: _response.rawResponse,
826
+ });
827
+ }
828
+ });
829
+ }
732
830
  /**
733
831
  * Stop (suspend) a running computer's runtime — the same operation as the Stop button in Athena. The computer's files persist and it can be started again with `start_computer`. Returns 409 when the provider does not support lifecycle operations or when the stop was refused because the workspace could not be saved (the computer is left running; retry).
734
832
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * asset_id: "asset_id"
5
+ * }
6
+ */
7
+ export interface GetStatusComputerRequest {
8
+ asset_id: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -2,6 +2,7 @@ export type { CreateSshAccessRequestIn } from "./CreateSshAccessRequestIn.mjs";
2
2
  export type { DeployComputerRequestIn } from "./DeployComputerRequestIn.mjs";
3
3
  export type { GetInitializationComputerRequest } from "./GetInitializationComputerRequest.mjs";
4
4
  export type { GetSshAccessComputerRequest } from "./GetSshAccessComputerRequest.mjs";
5
+ export type { GetStatusComputerRequest } from "./GetStatusComputerRequest.mjs";
5
6
  export type { ListSshAccessTokensComputerRequest } from "./ListSshAccessTokensComputerRequest.mjs";
6
7
  export type { RevokeSshAccessRequestIn } from "./RevokeSshAccessRequestIn.mjs";
7
8
  export type { RevokeSshAccessTokenComputerRequest } from "./RevokeSshAccessTokenComputerRequest.mjs";
@@ -0,0 +1,33 @@
1
+ /**
2
+ * A computer's live runtime state, read without starting or waking it.
3
+ */
4
+ export interface ComputerStatusResponseOut {
5
+ /** The computer asset id. */
6
+ asset_id: string;
7
+ /** Set when someone stopped the computer with Stop. While it is `stopping`, `stopped` or `uncertain`, implicit wakes are refused: minting SSH access answers 409 and an SSH connection does not start it. Call `start_computer` to clear it. `null` or `cleared` means no explicit stop is in force. */
8
+ explicit_stop?: ComputerStatusResponseOut.ExplicitStop | null;
9
+ /** Why `ready` is false; `null` when it is true. `not_started`: the computer is not running — call `start_computer`. `starting`: it is running and its guest is still coming up — keep polling. `unobservable`: readiness could not be read this time — keep polling. `launcher_outdated`: the computer runs an outdated runtime component that polling will not change — stop it and start it again to update it. */
10
+ not_ready_reason?: ComputerStatusResponseOut.NotReadyReason | null;
11
+ /** The computer's runtime provider (e.g. `talos_v2`). */
12
+ provider?: string | null;
13
+ /** Whether the computer serves work now: `state` is `started` and the guest answers ready (its workspace attached and its environment applied). Only then do commands, SSH sessions and deployed URLs reach the computer without first waiting for a start. `started` alone can come a few seconds before `ready`. */
14
+ ready: boolean;
15
+ /** The runtime's current state: `started` (running; check `ready`), `stopped` (suspended — by idle auto-stop or by Stop; files are kept), `restoring` (a start is in progress), `error` (the runtime failed; start or restart it), or `unknown` (the state could not be read this time; retry). `started`, `stopped` and `error` hold until something changes them; `restoring` and `unknown` are transient. */
16
+ state: string;
17
+ }
18
+ export declare namespace ComputerStatusResponseOut {
19
+ const ExplicitStop: {
20
+ readonly Stopping: "stopping";
21
+ readonly Stopped: "stopped";
22
+ readonly Uncertain: "uncertain";
23
+ readonly Cleared: "cleared";
24
+ };
25
+ type ExplicitStop = (typeof ExplicitStop)[keyof typeof ExplicitStop];
26
+ const NotReadyReason: {
27
+ readonly NotStarted: "not_started";
28
+ readonly Starting: "starting";
29
+ readonly LauncherOutdated: "launcher_outdated";
30
+ readonly Unobservable: "unobservable";
31
+ };
32
+ type NotReadyReason = (typeof NotReadyReason)[keyof typeof NotReadyReason];
33
+ }
@@ -0,0 +1,16 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var ComputerStatusResponseOut;
3
+ (function (ComputerStatusResponseOut) {
4
+ ComputerStatusResponseOut.ExplicitStop = {
5
+ Stopping: "stopping",
6
+ Stopped: "stopped",
7
+ Uncertain: "uncertain",
8
+ Cleared: "cleared",
9
+ };
10
+ ComputerStatusResponseOut.NotReadyReason = {
11
+ NotStarted: "not_started",
12
+ Starting: "starting",
13
+ LauncherOutdated: "launcher_outdated",
14
+ Unobservable: "unobservable",
15
+ };
16
+ })(ComputerStatusResponseOut || (ComputerStatusResponseOut = {}));
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Response model for turning an uploaded HTML file into a user interface.
3
+ */
4
+ export interface ConvertToUserInterfaceResponseOut {
5
+ /** ID of the user interface: the HTML file's own id, which it keeps (no second asset is created) */
6
+ asset_id: string;
7
+ /** Type of the asset after the request: user_interface */
8
+ asset_type: string;
9
+ /** True when this request converted the file; false when the asset already was a user interface, in which case nothing changed */
10
+ converted: boolean;
11
+ /** ID of the asset's parent folder, which the conversion keeps */
12
+ parent_folder_id?: string | null;
13
+ /** Title of the user interface */
14
+ title: string;
15
+ /** ID of the workspace that owns the asset */
16
+ workspace_id?: string | null;
17
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -41,10 +41,12 @@ export * from "./CollabAgentSendMessageResponseOut.mjs";
41
41
  export * from "./CollabTokenResponse.mjs";
42
42
  export * from "./ComputerInitializationResponse.mjs";
43
43
  export * from "./ComputerLifecycleResponseOut.mjs";
44
+ export * from "./ComputerStatusResponseOut.mjs";
44
45
  export * from "./ConversationAssetInfo.mjs";
45
46
  export * from "./ConversationMessage.mjs";
46
47
  export * from "./ConversationResult.mjs";
47
48
  export * from "./ConvertExcelToSheetResponseOut.mjs";
49
+ export * from "./ConvertToUserInterfaceResponseOut.mjs";
48
50
  export * from "./CreatableAssetType.mjs";
49
51
  export * from "./CreateAssetResponseOut.mjs";
50
52
  export * from "./CreateNewSheetTabResponse.mjs";
@@ -41,10 +41,12 @@ export * from "./CollabAgentSendMessageResponseOut.mjs";
41
41
  export * from "./CollabTokenResponse.mjs";
42
42
  export * from "./ComputerInitializationResponse.mjs";
43
43
  export * from "./ComputerLifecycleResponseOut.mjs";
44
+ export * from "./ComputerStatusResponseOut.mjs";
44
45
  export * from "./ConversationAssetInfo.mjs";
45
46
  export * from "./ConversationMessage.mjs";
46
47
  export * from "./ConversationResult.mjs";
47
48
  export * from "./ConvertExcelToSheetResponseOut.mjs";
49
+ export * from "./ConvertToUserInterfaceResponseOut.mjs";
48
50
  export * from "./CreatableAssetType.mjs";
49
51
  export * from "./CreateAssetResponseOut.mjs";
50
52
  export * from "./CreateNewSheetTabResponse.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.2242";
1
+ export declare const SDK_VERSION = "4.3.2244";
@@ -1 +1 @@
1
- export const SDK_VERSION = "4.3.2242";
1
+ export const SDK_VERSION = "4.3.2244";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenaintel/sdk",
3
- "version": "4.3.2242",
3
+ "version": "4.3.2244",
4
4
  "private": false,
5
5
  "repository": "github:Athena-Intel/athena-typescript",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -1307,6 +1307,71 @@ await client.assets.createCollabToken({
1307
1307
  </dl>
1308
1308
 
1309
1309
 
1310
+ </dd>
1311
+ </dl>
1312
+ </details>
1313
+
1314
+ <details><summary><code>client.assets.<a href="/src/api/resources/assets/client/Client.ts">convertToUserInterface</a>({ ...params }) -> AthenaIntelligence.ConvertToUserInterfaceResponseOut</code></summary>
1315
+ <dl>
1316
+ <dd>
1317
+
1318
+ #### 📝 Description
1319
+
1320
+ <dl>
1321
+ <dd>
1322
+
1323
+ <dl>
1324
+ <dd>
1325
+
1326
+ Turn an uploaded HTML file into a user interface (an app) under its own id — the conversion the Athena app's Convert to user interface performs. The asset keeps its id, folder, links and sharing (its title drops the .html extension), and no second asset is created. An uploaded HTML file stays a file until a request like this one asks: nothing converts on its own. The switch is one-way; the original upload stays downloadable from the asset's Versions pane. Requires edit access to the file. Idempotent: an asset that already is a user interface is answered as it is, with converted false. A refused conversion answers with a detail object: code CONVERSION_REFUSED, the reason, and a message saying why.
1327
+ </dd>
1328
+ </dl>
1329
+ </dd>
1330
+ </dl>
1331
+
1332
+ #### 🔌 Usage
1333
+
1334
+ <dl>
1335
+ <dd>
1336
+
1337
+ <dl>
1338
+ <dd>
1339
+
1340
+ ```typescript
1341
+ await client.assets.convertToUserInterface({
1342
+ asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
1343
+ });
1344
+
1345
+ ```
1346
+ </dd>
1347
+ </dl>
1348
+ </dd>
1349
+ </dl>
1350
+
1351
+ #### ⚙️ Parameters
1352
+
1353
+ <dl>
1354
+ <dd>
1355
+
1356
+ <dl>
1357
+ <dd>
1358
+
1359
+ **request:** `AthenaIntelligence.ConvertToUserInterfaceAssetsRequest`
1360
+
1361
+ </dd>
1362
+ </dl>
1363
+
1364
+ <dl>
1365
+ <dd>
1366
+
1367
+ **requestOptions:** `AssetsClient.RequestOptions`
1368
+
1369
+ </dd>
1370
+ </dl>
1371
+ </dd>
1372
+ </dl>
1373
+
1374
+
1310
1375
  </dd>
1311
1376
  </dl>
1312
1377
  </details>
@@ -1926,7 +1991,7 @@ await client.computer.getSshAccess({
1926
1991
  <dl>
1927
1992
  <dd>
1928
1993
 
1929
- Generate a time-limited SSH access token for a computer asset. Returns a full SSH command and token that can be used to connect to the computer's underlying VM and run commands. The computer must support SSH access and be in a running state.
1994
+ Generate a time-limited SSH access token for a computer asset. Returns a full SSH command and token that can be used to connect to the computer's underlying VM and run commands. The computer must support SSH access. If it is stopped, this call starts it first and can take as long as `start_computer`; after an explicit Stop it returns 409 until you call `start_computer`. Use `get_status` to see whether the computer is ready.
1930
1995
  </dd>
1931
1996
  </dl>
1932
1997
  </dd>
@@ -2189,7 +2254,7 @@ await client.computer.revokeSshAccessToken({
2189
2254
  <dl>
2190
2255
  <dd>
2191
2256
 
2192
- Start a stopped computer's runtime and wait for it to come up — the same operation as the Start button in Athena. Idempotent for a running computer. Returns 409 when the computer's provider does not support lifecycle operations.
2257
+ Start a stopped computer's runtime and wait for it to come up — the same operation as the Start button in Athena. Idempotent for a running computer, and it clears an explicit stop. `state` is `started` once the runtime is up; the guest can need a few more seconds, so poll `get_status` until `ready` is true before you rely on commands or SSH. A proxy in front of the API can end this request after about 60 seconds while the start continues on the server; then poll `get_status`. Returns 409 when the computer's provider does not support lifecycle operations.
2193
2258
  </dd>
2194
2259
  </dl>
2195
2260
  </dd>
@@ -2238,6 +2303,79 @@ await client.computer.startComputer({
2238
2303
  </dl>
2239
2304
 
2240
2305
 
2306
+ </dd>
2307
+ </dl>
2308
+ </details>
2309
+
2310
+ <details><summary><code>client.computer.<a href="/src/api/resources/computer/client/Client.ts">getStatus</a>({ ...params }) -> AthenaIntelligence.ComputerStatusResponseOut</code></summary>
2311
+ <dl>
2312
+ <dd>
2313
+
2314
+ #### 📝 Description
2315
+
2316
+ <dl>
2317
+ <dd>
2318
+
2319
+ <dl>
2320
+ <dd>
2321
+
2322
+ Read an existing computer's live runtime state and whether it is ready, without starting, waking, or repairing it. Works for every computer, including those created before durable initialization (`get_initialization` reports creation-time progress only). Requires membership in the computer's workspace and VIEW access. This read does not count as activity, so polling it does not keep the computer awake.
2323
+
2324
+ **Waiting for a computer.** Call `start_computer`, then poll this endpoint every few seconds until `ready` is true; stop polling when `not_ready_reason` is `launcher_outdated`. `start_computer` waits for the computer, but a proxy in front of the API can end a long request (about 60 seconds on Athena's ingress) while the start continues on the server. The server waits up to 210 seconds by default for the computer's runtime to boot before it reports a failure, and Athena alerts its operators when the 90th percentile of starts goes above 3 minutes.
2325
+
2326
+ **Auto-stop.** A computer stops after its `auto_stop_minutes` of inactivity (60 minutes unless the computer or the deployment sets another value; 0 means it never stops on its own). Activity is work inside the computer — commands, terminal and SSH sessions, file operations — and requests to its deployed URLs. Status reads are not activity.
2327
+
2328
+ **The asset record's `status`.** The computer's `status` in `GET /assets/{asset_id}` records the last lifecycle change Athena recorded (create, Start, Stop); it is not a live read. It can read `running` while the computer is stopped, for example after an idle auto-stop, or `stopped` after something woke it. Use this endpoint for the live state.
2329
+
2330
+ Returns 403 when the caller is not a member of the computer's workspace, 409 while the computer is still being created or when its creation failed, 404 when the asset does not exist or its runtime is gone for good (stop polling), and 502 when the runtime could not be read (retry).
2331
+ </dd>
2332
+ </dl>
2333
+ </dd>
2334
+ </dl>
2335
+
2336
+ #### 🔌 Usage
2337
+
2338
+ <dl>
2339
+ <dd>
2340
+
2341
+ <dl>
2342
+ <dd>
2343
+
2344
+ ```typescript
2345
+ await client.computer.getStatus({
2346
+ asset_id: "asset_id"
2347
+ });
2348
+
2349
+ ```
2350
+ </dd>
2351
+ </dl>
2352
+ </dd>
2353
+ </dl>
2354
+
2355
+ #### ⚙️ Parameters
2356
+
2357
+ <dl>
2358
+ <dd>
2359
+
2360
+ <dl>
2361
+ <dd>
2362
+
2363
+ **request:** `AthenaIntelligence.GetStatusComputerRequest`
2364
+
2365
+ </dd>
2366
+ </dl>
2367
+
2368
+ <dl>
2369
+ <dd>
2370
+
2371
+ **requestOptions:** `ComputerClient.RequestOptions`
2372
+
2373
+ </dd>
2374
+ </dl>
2375
+ </dd>
2376
+ </dl>
2377
+
2378
+
2241
2379
  </dd>
2242
2380
  </dl>
2243
2381
  </details>