cyberdesk 2.2.27 → 2.2.28

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.
@@ -431,6 +431,9 @@ export declare const updateRunV1RunsRunIdPatch: <ThrowOnError extends boolean =
431
431
  * - Starts a new session unless session_id is provided (then runs on existing session).
432
432
  * - Accepts shared_inputs/sensitive/file_inputs and per-step file_inputs.
433
433
  * - machine_id > pool_id when starting a new session; both ignored if session_id provided.
434
+ * - Client contract: once runs are persisted, failures in downstream Temporal dispatch
435
+ * do not change the HTTP success envelope; response still contains run_ids and those
436
+ * runs are transitioned to ERROR with failure metadata for deterministic polling.
434
437
  */
435
438
  export declare const createRunChainV1RunsChainPost: <ThrowOnError extends boolean = false>(options: Options<CreateRunChainV1RunsChainPostData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").WorkflowChainResponse, import("./types.gen").HttpValidationError, ThrowOnError>;
436
439
  /**
@@ -914,6 +914,9 @@ exports.updateRunV1RunsRunIdPatch = updateRunV1RunsRunIdPatch;
914
914
  * - Starts a new session unless session_id is provided (then runs on existing session).
915
915
  * - Accepts shared_inputs/sensitive/file_inputs and per-step file_inputs.
916
916
  * - machine_id > pool_id when starting a new session; both ignored if session_id provided.
917
+ * - Client contract: once runs are persisted, failures in downstream Temporal dispatch
918
+ * do not change the HTTP success envelope; response still contains run_ids and those
919
+ * runs are transitioned to ERROR with failure metadata for deterministic polling.
917
920
  */
918
921
  const createRunChainV1RunsChainPost = (options) => {
919
922
  var _a;
@@ -828,6 +828,7 @@ export type RunCreate = {
828
828
  * (id, workflow_id, machine_id, status, created_at).
829
829
  */
830
830
  export type RunField = 'user_id' | 'organization_id' | 'error' | 'output_data' | 'input_attachment_ids' | 'output_attachment_ids' | 'run_message_history' | 'input_values' | 'pool_ids' | 'sensitive_input_aliases' | 'usage_metadata' | 'session_id' | 'session_alias' | 'release_session_after' | 'started_at' | 'ended_at' | 'machine_id';
831
+ export type RunListSortMode = 'activity' | 'created_at_desc';
831
832
  /**
832
833
  * Run response schema
833
834
  */
@@ -1115,6 +1116,10 @@ export type ValidationError = {
1115
1116
  loc: Array<string | number>;
1116
1117
  msg: string;
1117
1118
  type: string;
1119
+ input?: unknown;
1120
+ ctx?: {
1121
+ [key: string]: unknown;
1122
+ };
1118
1123
  };
1119
1124
  /**
1120
1125
  * Request to create and run a multi-step chain on a single reserved session/machine
@@ -2788,6 +2793,10 @@ export type ListRunsV1RunsGetData = {
2788
2793
  * Filter runs created at or before this ISO timestamp (UTC)
2789
2794
  */
2790
2795
  created_at_to?: string | null;
2796
+ /**
2797
+ * Run sort mode. 'activity' prioritizes running/scheduling and recent completions. 'created_at_desc' returns strict reverse-chronological order.
2798
+ */
2799
+ sort_mode?: RunListSortMode;
2791
2800
  /**
2792
2801
  * Search runs by id, input_values, output_data, error, session_alias (case-insensitive substring match)
2793
2802
  */
@@ -2953,7 +2962,7 @@ export type CreateRunChainV1RunsChainPostErrors = {
2953
2962
  export type CreateRunChainV1RunsChainPostError = CreateRunChainV1RunsChainPostErrors[keyof CreateRunChainV1RunsChainPostErrors];
2954
2963
  export type CreateRunChainV1RunsChainPostResponses = {
2955
2964
  /**
2956
- * Successful Response
2965
+ * Returns persisted run_ids for the created chain session. If Temporal dispatch fails after run persistence, this endpoint still returns 201 with run_ids; those runs are marked ERROR and include failure details in subsequent run reads.
2957
2966
  */
2958
2967
  201: WorkflowChainResponse;
2959
2968
  };
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@
25
25
  * });
26
26
  * ```
27
27
  */
28
- import { type MachineResponse, type MachinePoolUpdate, type PoolResponse, type PoolCreate, type PoolUpdate, type PoolWithMachines, type MachinePoolAssignment, type WorkflowResponse, type RunResponse, type ConnectionResponse, type TrajectoryResponse, type PaginatedResponseWithIncludesMachineResponse, type PaginatedResponseWithIncludesPoolResponse, type PaginatedResponseWorkflowResponse, type PaginatedResponseWithIncludesRunResponse, type PaginatedResponseConnectionResponse, type PaginatedResponseWithIncludesTrajectoryResponse, type MachineStatus, type RunStatus, type ConnectionStatus, type MachineCreate, type WorkflowCreate, type RunCreate, type RunBulkCreate, type RunBulkCreateResponse, type WorkflowChainCreate, type WorkflowChainResponse, type FileInput, type ConnectionCreate, type TrajectoryCreate, type MachineUpdate, type WorkflowUpdate, type RunUpdate, type TrajectoryUpdate, type RunAttachmentCreate, type RunAttachmentUpdate, type RunAttachmentResponse, type RunAttachmentDownloadUrlResponse, type AttachmentType, type IncludedResource, type PaginatedResponseRunAttachmentResponse, type RunRetry, type RunField, type ModelConfigurationCreate, type ModelConfigurationUpdate, type ModelConfigurationResponse, type UsageAggregateResponse, type UsageMode, type WorkflowTagCreate, type WorkflowTagUpdate, type WorkflowTagResponse, type WorkflowTagGroupCreate, type WorkflowTagGroupUpdate, type WorkflowTagGroupResponse, type ReorderRequest, type AddTagsRequest, type BulkAddTagsRequest } from './client/types.gen';
28
+ import { type MachineResponse, type MachinePoolUpdate, type PoolResponse, type PoolCreate, type PoolUpdate, type PoolWithMachines, type MachinePoolAssignment, type WorkflowResponse, type RunResponse, type ConnectionResponse, type TrajectoryResponse, type PaginatedResponseWithIncludesMachineResponse, type PaginatedResponseWithIncludesPoolResponse, type PaginatedResponseWorkflowResponse, type PaginatedResponseWithIncludesRunResponse, type PaginatedResponseConnectionResponse, type PaginatedResponseWithIncludesTrajectoryResponse, type MachineStatus, type RunStatus, type ConnectionStatus, type MachineCreate, type WorkflowCreate, type RunCreate, type RunBulkCreate, type RunBulkCreateResponse, type WorkflowChainCreate, type WorkflowChainResponse, type FileInput, type ConnectionCreate, type TrajectoryCreate, type MachineUpdate, type WorkflowUpdate, type RunUpdate, type TrajectoryUpdate, type RunAttachmentCreate, type RunAttachmentUpdate, type RunAttachmentResponse, type RunAttachmentDownloadUrlResponse, type AttachmentType, type IncludedResource, type PaginatedResponseRunAttachmentResponse, type RunRetry, type RunField, type RunListSortMode, type ModelConfigurationCreate, type ModelConfigurationUpdate, type ModelConfigurationResponse, type UsageAggregateResponse, type UsageMode, type WorkflowTagCreate, type WorkflowTagUpdate, type WorkflowTagResponse, type WorkflowTagGroupCreate, type WorkflowTagGroupUpdate, type WorkflowTagGroupResponse, type ReorderRequest, type AddTagsRequest, type BulkAddTagsRequest } from './client/types.gen';
29
29
  export * from './client/types.gen';
30
30
  export * from './client/sdk.gen';
31
31
  export * from './client/client.gen';
@@ -1005,8 +1005,8 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string,
1005
1005
  /**
1006
1006
  * List runs with optional filtering
1007
1007
  *
1008
- * Runs are ordered by: RUNNING (by started_at DESC) first, then all others (by ended_at DESC).
1009
- * This surfaces active work and recent completions.
1008
+ * Defaults to "activity" ordering (active/scheduled runs first, then recent completions).
1009
+ * Set `sort_mode: 'created_at_desc'` for strict reverse-chronological ordering.
1010
1010
  *
1011
1011
  * @param params - Optional query parameters
1012
1012
  * @param params.skip - Number of items to skip (for pagination)
@@ -1017,6 +1017,7 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string,
1017
1017
  * @param params.session_id - Filter by session ID
1018
1018
  * @param params.search - Search runs by input_values, output_data, error, session_alias (case-insensitive)
1019
1019
  * @param params.deep_search - If true, also search run_message_history (slower but more comprehensive)
1020
+ * @param params.sort_mode - Sort mode: "activity" (default) or "created_at_desc"
1020
1021
  * @param params.fields - Optional list of fields to include per run (projection). Available fields include:
1021
1022
  * started_at, ended_at, error, output_data, input_values, usage_metadata, and more.
1022
1023
  * @param params.include - Optional list of related resources to include. Available: ["workflow", "machine", "machine.pools"].
@@ -1036,6 +1037,7 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string,
1036
1037
  session_id?: string;
1037
1038
  search?: string;
1038
1039
  deep_search?: boolean;
1040
+ sort_mode?: RunListSortMode;
1039
1041
  created_at_from?: string | Date;
1040
1042
  created_at_to?: string | Date;
1041
1043
  fields?: RunField[];
package/dist/index.js CHANGED
@@ -1035,8 +1035,8 @@ function createCyberdeskClient(apiKey, baseUrl, options) {
1035
1035
  /**
1036
1036
  * List runs with optional filtering
1037
1037
  *
1038
- * Runs are ordered by: RUNNING (by started_at DESC) first, then all others (by ended_at DESC).
1039
- * This surfaces active work and recent completions.
1038
+ * Defaults to "activity" ordering (active/scheduled runs first, then recent completions).
1039
+ * Set `sort_mode: 'created_at_desc'` for strict reverse-chronological ordering.
1040
1040
  *
1041
1041
  * @param params - Optional query parameters
1042
1042
  * @param params.skip - Number of items to skip (for pagination)
@@ -1047,6 +1047,7 @@ function createCyberdeskClient(apiKey, baseUrl, options) {
1047
1047
  * @param params.session_id - Filter by session ID
1048
1048
  * @param params.search - Search runs by input_values, output_data, error, session_alias (case-insensitive)
1049
1049
  * @param params.deep_search - If true, also search run_message_history (slower but more comprehensive)
1050
+ * @param params.sort_mode - Sort mode: "activity" (default) or "created_at_desc"
1050
1051
  * @param params.fields - Optional list of fields to include per run (projection). Available fields include:
1051
1052
  * started_at, ended_at, error, output_data, input_values, usage_metadata, and more.
1052
1053
  * @param params.include - Optional list of related resources to include. Available: ["workflow", "machine", "machine.pools"].
@@ -1068,6 +1069,7 @@ function createCyberdeskClient(apiKey, baseUrl, options) {
1068
1069
  session_id: (_d = params === null || params === void 0 ? void 0 : params.session_id) !== null && _d !== void 0 ? _d : undefined,
1069
1070
  search: params === null || params === void 0 ? void 0 : params.search,
1070
1071
  deep_search: params === null || params === void 0 ? void 0 : params.deep_search,
1072
+ sort_mode: params === null || params === void 0 ? void 0 : params.sort_mode,
1071
1073
  created_at_from: toIsoUtc(params === null || params === void 0 ? void 0 : params.created_at_from),
1072
1074
  created_at_to: toIsoUtc(params === null || params === void 0 ? void 0 : params.created_at_to),
1073
1075
  fields: params === null || params === void 0 ? void 0 : params.fields,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyberdesk",
3
- "version": "2.2.27",
3
+ "version": "2.2.28",
4
4
  "description": "The official TypeScript SDK for Cyberdesk",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",