cyberdesk 2.1.20 → 2.2.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.
@@ -166,6 +166,10 @@ export type MachineResponse = {
166
166
  is_available: boolean;
167
167
  reserved_session_id?: string | null;
168
168
  linked_keepalive_machine_id?: string | null;
169
+ /**
170
+ * Fly machine ID hosting the WebSocket connection
171
+ */
172
+ physical_server_id?: string | null;
169
173
  created_at: string;
170
174
  last_seen: string;
171
175
  pools?: Array<PoolResponse> | null;
@@ -592,7 +596,7 @@ export type RunCreate = {
592
596
  * These are optional fields beyond the essential identifiers that are always returned
593
597
  * (id, workflow_id, machine_id, status, created_at).
594
598
  */
595
- 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' | 'session_id' | 'session_alias' | 'release_session_after' | 'machine_id';
599
+ 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' | 'session_id' | 'session_alias' | 'release_session_after' | 'started_at' | 'ended_at' | 'machine_id';
596
600
  /**
597
601
  * Run response schema
598
602
  */
@@ -623,6 +627,8 @@ export type RunResponse = {
623
627
  session_alias?: string | null;
624
628
  release_session_after?: boolean | null;
625
629
  created_at: string;
630
+ started_at?: string | null;
631
+ ended_at?: string | null;
626
632
  };
627
633
  /**
628
634
  * Options for retrying an existing run in-place (same run_id).
@@ -687,6 +693,8 @@ export type RunUpdate = {
687
693
  input_values?: {
688
694
  [key: string]: unknown;
689
695
  } | null;
696
+ started_at?: string | null;
697
+ ended_at?: string | null;
690
698
  };
691
699
  /**
692
700
  * Schema for creating a trajectory
package/dist/index.d.ts CHANGED
@@ -52,7 +52,8 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
52
52
  * @param params.limit - Maximum number of items to return
53
53
  * @param params.status - Filter by machine status
54
54
  * @returns Paginated list of machines. Each machine includes desktop parameters
55
- * (machine_parameters, machine_sensitive_parameters) if configured.
55
+ * (machine_parameters, machine_sensitive_parameters) if configured,
56
+ * plus the current physical_server_id when connected to WebSockets.
56
57
  */
57
58
  list: (params?: {
58
59
  skip?: number;
@@ -100,6 +101,7 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
100
101
  * - Basic info: id, name, status, fingerprint, etc.
101
102
  * - machine_parameters: Dict of desktop parameters (if configured)
102
103
  * - machine_sensitive_parameters: Dict of sensitive parameter aliases (if configured)
104
+ * - physical_server_id: Fly machine ID currently hosting the WebSocket connection
103
105
  * - pools: List of pools this machine belongs to
104
106
  */
105
107
  get: (machineId: string) => Promise<({
@@ -148,6 +150,8 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
148
150
  * @remarks
149
151
  * - linked_keepalive_machine_id is not writable; it is managed by
150
152
  * Cyberdriver link events and will be set/cleared automatically.
153
+ * - physical_server_id is read-only; it is set automatically when the machine
154
+ * connects to a WebSocket server and cleared on disconnect.
151
155
  * - For machine_sensitive_parameters, provide actual secret values.
152
156
  * They will be stored securely in Basis Theory and only aliases stored in DB.
153
157
  */
@@ -479,6 +483,9 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
479
483
  /**
480
484
  * List runs with optional filtering
481
485
  *
486
+ * Runs are ordered by: RUNNING (by started_at DESC) first, then all others (by ended_at DESC).
487
+ * This surfaces active work and recent completions.
488
+ *
482
489
  * @param params - Optional query parameters
483
490
  * @param params.skip - Number of items to skip (for pagination)
484
491
  * @param params.limit - Maximum number of items to return
@@ -486,7 +493,12 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
486
493
  * @param params.workflow_id - Filter by workflow ID
487
494
  * @param params.machine_id - Filter by machine ID
488
495
  * @param params.session_id - Filter by session ID
489
- * @returns Paginated list of runs
496
+ * @param params.fields - Optional list of fields to include per run (projection). Available fields include:
497
+ * started_at, ended_at, error, output_data, input_values, and more.
498
+ * @returns Paginated list of runs including timing fields:
499
+ * - created_at: When run was created
500
+ * - started_at: When run execution started (null for SCHEDULING runs)
501
+ * - ended_at: When run completed (null for RUNNING/SCHEDULING runs)
490
502
  */
491
503
  list: (params?: {
492
504
  skip?: number;
@@ -622,7 +634,10 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
622
634
  * Get a specific run by ID
623
635
  *
624
636
  * @param runId - The ID of the run
625
- * @returns Run details including status, output, and attachments
637
+ * @returns Run details including timing information:
638
+ * - created_at: When run was created
639
+ * - started_at: When run execution started (null if not started)
640
+ * - ended_at: When run completed (null if not finished)
626
641
  */
627
642
  get: (runId: string) => Promise<({
628
643
  data: undefined;
package/dist/index.js CHANGED
@@ -111,7 +111,8 @@ function createCyberdeskClient(apiKey, baseUrl) {
111
111
  * @param params.limit - Maximum number of items to return
112
112
  * @param params.status - Filter by machine status
113
113
  * @returns Paginated list of machines. Each machine includes desktop parameters
114
- * (machine_parameters, machine_sensitive_parameters) if configured.
114
+ * (machine_parameters, machine_sensitive_parameters) if configured,
115
+ * plus the current physical_server_id when connected to WebSockets.
115
116
  */
116
117
  list: (params) => __awaiter(this, void 0, void 0, function* () {
117
118
  const query = {
@@ -149,6 +150,7 @@ function createCyberdeskClient(apiKey, baseUrl) {
149
150
  * - Basic info: id, name, status, fingerprint, etc.
150
151
  * - machine_parameters: Dict of desktop parameters (if configured)
151
152
  * - machine_sensitive_parameters: Dict of sensitive parameter aliases (if configured)
153
+ * - physical_server_id: Fly machine ID currently hosting the WebSocket connection
152
154
  * - pools: List of pools this machine belongs to
153
155
  */
154
156
  get: (machineId) => __awaiter(this, void 0, void 0, function* () {
@@ -193,6 +195,8 @@ function createCyberdeskClient(apiKey, baseUrl) {
193
195
  * @remarks
194
196
  * - linked_keepalive_machine_id is not writable; it is managed by
195
197
  * Cyberdriver link events and will be set/cleared automatically.
198
+ * - physical_server_id is read-only; it is set automatically when the machine
199
+ * connects to a WebSocket server and cleared on disconnect.
196
200
  * - For machine_sensitive_parameters, provide actual secret values.
197
201
  * They will be stored securely in Basis Theory and only aliases stored in DB.
198
202
  */
@@ -469,6 +473,9 @@ function createCyberdeskClient(apiKey, baseUrl) {
469
473
  /**
470
474
  * List runs with optional filtering
471
475
  *
476
+ * Runs are ordered by: RUNNING (by started_at DESC) first, then all others (by ended_at DESC).
477
+ * This surfaces active work and recent completions.
478
+ *
472
479
  * @param params - Optional query parameters
473
480
  * @param params.skip - Number of items to skip (for pagination)
474
481
  * @param params.limit - Maximum number of items to return
@@ -476,7 +483,12 @@ function createCyberdeskClient(apiKey, baseUrl) {
476
483
  * @param params.workflow_id - Filter by workflow ID
477
484
  * @param params.machine_id - Filter by machine ID
478
485
  * @param params.session_id - Filter by session ID
479
- * @returns Paginated list of runs
486
+ * @param params.fields - Optional list of fields to include per run (projection). Available fields include:
487
+ * started_at, ended_at, error, output_data, input_values, and more.
488
+ * @returns Paginated list of runs including timing fields:
489
+ * - created_at: When run was created
490
+ * - started_at: When run execution started (null for SCHEDULING runs)
491
+ * - ended_at: When run completed (null for RUNNING/SCHEDULING runs)
480
492
  */
481
493
  list: (params) => __awaiter(this, void 0, void 0, function* () {
482
494
  var _a, _b, _c, _d;
@@ -595,7 +607,10 @@ function createCyberdeskClient(apiKey, baseUrl) {
595
607
  * Get a specific run by ID
596
608
  *
597
609
  * @param runId - The ID of the run
598
- * @returns Run details including status, output, and attachments
610
+ * @returns Run details including timing information:
611
+ * - created_at: When run was created
612
+ * - started_at: When run execution started (null if not started)
613
+ * - ended_at: When run completed (null if not finished)
599
614
  */
600
615
  get: (runId) => __awaiter(this, void 0, void 0, function* () {
601
616
  return (0, sdk_gen_1.getRunV1RunsRunIdGet)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyberdesk",
3
- "version": "2.1.20",
3
+ "version": "2.2.0",
4
4
  "description": "The official TypeScript SDK for Cyberdesk",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",