@shipfox/api-runners-dto 12.0.0 → 12.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.
@@ -1,2 +1,2 @@
1
1
  $ shipfox-swc
2
- Successfully compiled: 18 files with swc (158.52ms)
2
+ Successfully compiled: 18 files with swc (316.67ms)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @shipfox/api-runners-dto
2
2
 
3
+ ## 12.2.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 78b771c: Accept provider-specific reservation TTLs in runner demand polling and enforce a server-side ceiling.
8
+ - Updated dependencies [df2ed79]
9
+ - @shipfox/runner-labels@0.2.0
10
+
3
11
  ## 12.0.0
4
12
 
5
13
  ### Patch Changes
package/dist/events.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
- export declare const RUNNER_JOB_LEASE_EXPIRED: "runners.job.lease_expired";
3
- export declare const RUNNER_JOB_QUEUED: "runners.job.queued";
4
- export declare const RUNNER_JOB_CLAIMED: "runners.job.claimed";
2
+ export declare const RUNNER_JOB_LEASE_EXPIRED: 'runners.job.lease_expired';
3
+ export declare const RUNNER_JOB_QUEUED: 'runners.job.queued';
4
+ export declare const RUNNER_JOB_CLAIMED: 'runners.job.claimed';
5
5
  export declare const runnerJobLeaseExpiredEventSchema: z.ZodObject<{
6
6
  workflowRunId: z.ZodString;
7
7
  workflowRunAttemptId: z.ZodString;
@@ -3,8 +3,8 @@ import { z } from 'zod';
3
3
  export declare const runnersInterModuleContract: import("@shipfox/inter-module").InterModuleContract<{
4
4
  readonly module: "runners";
5
5
  readonly methods: {
6
- readonly enqueueJobExecution: {
7
- readonly input: z.ZodObject<{
6
+ enqueueJobExecution: {
7
+ input: z.ZodObject<{
8
8
  workspaceId: z.ZodString;
9
9
  workflowRunId: z.ZodString;
10
10
  workflowRunAttemptId: z.ZodString;
@@ -13,38 +13,38 @@ export declare const runnersInterModuleContract: import("@shipfox/inter-module")
13
13
  projectId: z.ZodString;
14
14
  requiredLabels: z.ZodArray<z.ZodString>;
15
15
  }, z.core.$strip>;
16
- readonly output: z.ZodObject<{}, z.core.$strip>;
17
- readonly errors: {
18
- readonly 'empty-required-labels': z.ZodObject<{}, z.core.$strip>;
16
+ output: z.ZodObject<{}, z.core.$strip>;
17
+ errors: {
18
+ 'empty-required-labels': z.ZodObject<{}, z.core.$strip>;
19
19
  };
20
20
  };
21
- readonly releaseJobExecution: {
22
- readonly input: z.ZodObject<{
21
+ releaseJobExecution: {
22
+ input: z.ZodObject<{
23
23
  jobExecutionId: z.ZodString;
24
24
  }, z.core.$strip>;
25
- readonly output: z.ZodObject<{}, z.core.$strip>;
25
+ output: z.ZodObject<{}, z.core.$strip>;
26
26
  };
27
- readonly cancelJobs: {
28
- readonly input: z.ZodObject<{
27
+ cancelJobs: {
28
+ input: z.ZodObject<{
29
29
  jobIds: z.ZodArray<z.ZodString>;
30
30
  }, z.core.$strip>;
31
- readonly output: z.ZodObject<{}, z.core.$strip>;
31
+ output: z.ZodObject<{}, z.core.$strip>;
32
32
  };
33
- readonly getLeaseState: {
34
- readonly input: z.ZodObject<{
33
+ getLeaseState: {
34
+ input: z.ZodObject<{
35
35
  jobId: z.ZodString;
36
36
  jobExecutionId: z.ZodString;
37
37
  runnerSessionId: z.ZodString;
38
38
  }, z.core.$strip>;
39
- readonly output: z.ZodObject<{
39
+ output: z.ZodObject<{
40
40
  active: z.ZodBoolean;
41
41
  }, z.core.$strip>;
42
42
  };
43
- readonly getEffectiveRunnerToolCapabilities: {
44
- readonly input: z.ZodObject<{
43
+ getEffectiveRunnerToolCapabilities: {
44
+ input: z.ZodObject<{
45
45
  runnerSessionId: z.ZodString;
46
46
  }, z.core.$strip>;
47
- readonly output: z.ZodObject<{
47
+ output: z.ZodObject<{
48
48
  capabilities: z.ZodObject<{
49
49
  harnesses: z.ZodObject<{
50
50
  pi: z.ZodOptional<z.ZodObject<{
@@ -58,11 +58,11 @@ export declare const runnersInterModuleContract: import("@shipfox/inter-module")
58
58
  reportFresh: z.ZodBoolean;
59
59
  }, z.core.$strip>;
60
60
  };
61
- readonly getWorkspaceJobCounts: {
62
- readonly input: z.ZodObject<{
61
+ getWorkspaceJobCounts: {
62
+ input: z.ZodObject<{
63
63
  workspaceIds: z.ZodArray<z.ZodString>;
64
64
  }, z.core.$strip>;
65
- readonly output: z.ZodObject<{
65
+ output: z.ZodObject<{
66
66
  counts: z.ZodArray<z.ZodObject<{
67
67
  workspaceId: z.ZodString;
68
68
  queued: z.ZodNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"inter-module.d.ts","sourceRoot":"","sources":["../src/inter-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAKtB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDrC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"inter-module.d.ts","sourceRoot":"","sources":["../src/inter-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAKtB,eAAO,MAAM,0BAA0B;;;QAGnC,mBAAmB;YACjB,KAAK;;;;;;;;;YASL,MAAM;YACN,MAAM;gBACJ,uBAAuB;;;QAG3B,mBAAmB;YACjB,KAAK;;;YACL,MAAM;;QAER,UAAU;YACR,KAAK;;;YACL,MAAM;;QAER,aAAa;YACX,KAAK;;;;;YAKL,MAAM;;;;QAER,kCAAkC;YAChC,KAAK;;;YACL,MAAM;;;;;;;;;;;;;;QAKR,qBAAqB;YACnB,KAAK;;;YACL,MAAM;;;;;;;;;EAWV,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -1,51 +1,51 @@
1
1
  import { z } from 'zod';
2
2
  export declare const runnerAdministratorLifecycleStateSchema: z.ZodEnum<{
3
- unassigned: "unassigned";
4
- assigned: "assigned";
5
3
  activated: "activated";
4
+ assigned: "assigned";
6
5
  claimed: "claimed";
7
6
  completed: "completed";
7
+ unassigned: "unassigned";
8
8
  }>;
9
9
  export declare const runnerAdministratorEnrollmentStateSchema: z.ZodEnum<{
10
10
  activated: "activated";
11
- pending: "pending";
12
11
  enrolled: "enrolled";
12
+ pending: "pending";
13
13
  }>;
14
14
  export declare const runnerAdministratorAssignmentPresenceSchema: z.ZodEnum<{
15
- unassigned: "unassigned";
16
15
  assigned: "assigned";
16
+ unassigned: "unassigned";
17
17
  }>;
18
18
  export declare const runnerAdministratorReconciliationStatusSchema: z.ZodEnum<{
19
- unknown: "unknown";
20
19
  current: "current";
21
20
  stale: "stale";
22
21
  terminal: "terminal";
22
+ unknown: "unknown";
23
23
  }>;
24
24
  export declare const runnerAdministratorInstanceSchema: z.ZodObject<{
25
25
  id: z.ZodString;
26
26
  lifecycle_state: z.ZodEnum<{
27
- unassigned: "unassigned";
28
- assigned: "assigned";
29
27
  activated: "activated";
28
+ assigned: "assigned";
30
29
  claimed: "claimed";
31
30
  completed: "completed";
31
+ unassigned: "unassigned";
32
32
  }>;
33
33
  compute_state: z.ZodEnum<{
34
- starting: "starting";
34
+ failed: "failed";
35
35
  running: "running";
36
- stopping: "stopping";
36
+ starting: "starting";
37
37
  stopped: "stopped";
38
- failed: "failed";
38
+ stopping: "stopping";
39
39
  terminated: "terminated";
40
40
  }>;
41
41
  enrollment_state: z.ZodEnum<{
42
42
  activated: "activated";
43
- pending: "pending";
44
43
  enrolled: "enrolled";
44
+ pending: "pending";
45
45
  }>;
46
46
  assignment_presence: z.ZodEnum<{
47
- unassigned: "unassigned";
48
47
  assigned: "assigned";
48
+ unassigned: "unassigned";
49
49
  }>;
50
50
  assigned_workspace: z.ZodNullable<z.ZodObject<{
51
51
  id: z.ZodString;
@@ -61,25 +61,25 @@ export declare const runnerAdministratorInstanceSchema: z.ZodObject<{
61
61
  name: z.ZodNullable<z.ZodString>;
62
62
  }, z.core.$strip>;
63
63
  reconciliation_status: z.ZodEnum<{
64
- unknown: "unknown";
65
64
  current: "current";
66
65
  stale: "stale";
67
66
  terminal: "terminal";
67
+ unknown: "unknown";
68
68
  }>;
69
69
  }, z.core.$strip>;
70
70
  export type RunnerAdministratorInstanceDto = z.infer<typeof runnerAdministratorInstanceSchema>;
71
71
  export declare const listRunnerAdministratorInstancesQuerySchema: z.ZodObject<{
72
72
  state: z.ZodOptional<z.ZodEnum<{
73
- starting: "starting";
73
+ failed: "failed";
74
74
  running: "running";
75
- stopping: "stopping";
75
+ starting: "starting";
76
76
  stopped: "stopped";
77
- failed: "failed";
77
+ stopping: "stopping";
78
78
  terminated: "terminated";
79
79
  }>>;
80
80
  assignment: z.ZodOptional<z.ZodEnum<{
81
- unassigned: "unassigned";
82
81
  assigned: "assigned";
82
+ unassigned: "unassigned";
83
83
  }>>;
84
84
  label: z.ZodOptional<z.ZodString>;
85
85
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -90,28 +90,28 @@ export declare const listRunnerAdministratorInstancesResponseSchema: z.ZodObject
90
90
  runners: z.ZodArray<z.ZodObject<{
91
91
  id: z.ZodString;
92
92
  lifecycle_state: z.ZodEnum<{
93
- unassigned: "unassigned";
94
- assigned: "assigned";
95
93
  activated: "activated";
94
+ assigned: "assigned";
96
95
  claimed: "claimed";
97
96
  completed: "completed";
97
+ unassigned: "unassigned";
98
98
  }>;
99
99
  compute_state: z.ZodEnum<{
100
- starting: "starting";
100
+ failed: "failed";
101
101
  running: "running";
102
- stopping: "stopping";
102
+ starting: "starting";
103
103
  stopped: "stopped";
104
- failed: "failed";
104
+ stopping: "stopping";
105
105
  terminated: "terminated";
106
106
  }>;
107
107
  enrollment_state: z.ZodEnum<{
108
108
  activated: "activated";
109
- pending: "pending";
110
109
  enrolled: "enrolled";
110
+ pending: "pending";
111
111
  }>;
112
112
  assignment_presence: z.ZodEnum<{
113
- unassigned: "unassigned";
114
113
  assigned: "assigned";
114
+ unassigned: "unassigned";
115
115
  }>;
116
116
  assigned_workspace: z.ZodNullable<z.ZodObject<{
117
117
  id: z.ZodString;
@@ -127,10 +127,10 @@ export declare const listRunnerAdministratorInstancesResponseSchema: z.ZodObject
127
127
  name: z.ZodNullable<z.ZodString>;
128
128
  }, z.core.$strip>;
129
129
  reconciliation_status: z.ZodEnum<{
130
- unknown: "unknown";
131
130
  current: "current";
132
131
  stale: "stale";
133
132
  terminal: "terminal";
133
+ unknown: "unknown";
134
134
  }>;
135
135
  }, z.core.$strip>>;
136
136
  next_cursor: z.ZodNullable<z.ZodString>;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare const RUNNER_SESSION_EXHAUSTED_CODE: "runner-session-exhausted";
2
+ export declare const RUNNER_SESSION_EXHAUSTED_CODE: 'runner-session-exhausted';
3
3
  export declare const claimedJobResponseSchema: z.ZodObject<{
4
4
  workflow_run_id: z.ZodString;
5
5
  workflow_run_attempt_id: z.ZodString;
@@ -8,6 +8,7 @@ export declare const pollDemandTemplateSchema: z.ZodObject<{
8
8
  }, z.core.$strip>;
9
9
  export declare const pollDemandBodySchema: z.ZodObject<{
10
10
  wait_seconds: z.ZodOptional<z.ZodNumber>;
11
+ reservation_ttl_seconds: z.ZodOptional<z.ZodNumber>;
11
12
  max_reservations: z.ZodNumber;
12
13
  templates: z.ZodArray<z.ZodObject<{
13
14
  template_key: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"poll-demand.d.ts","sourceRoot":"","sources":["../../src/schemas/poll-demand.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,eAAO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G,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC7D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACzE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -10,6 +10,7 @@ export const pollDemandTemplateSchema = z.object({
10
10
  });
11
11
  export const pollDemandBodySchema = z.object({
12
12
  wait_seconds: z.number().int().min(0).optional(),
13
+ reservation_ttl_seconds: z.number().int().min(1).optional(),
13
14
  max_reservations: z.number().int().min(0).max(1000),
14
15
  templates: z.array(pollDemandTemplateSchema).max(1000)
15
16
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schemas/poll-demand.ts"],"sourcesContent":["import {MAX_RUNNER_LABELS} from '@shipfox/runner-labels';\nimport {z} from 'zod';\nimport {runnerLabelSchema} from './register.js';\n\nexport const pollDemandTemplateSchema = z.object({\n template_key: z.string().min(1),\n labels: z.array(runnerLabelSchema).min(1).max(MAX_RUNNER_LABELS),\n available_slots: z.number().int().min(0).max(100_000),\n starting: z.number().int().min(0).max(100_000),\n running: z.number().int().min(0).max(100_000),\n});\n\nexport const pollDemandBodySchema = z.object({\n wait_seconds: z.number().int().min(0).optional(),\n max_reservations: z.number().int().min(0).max(1000),\n templates: z.array(pollDemandTemplateSchema).max(1000),\n});\n\nexport const demandStatSchema = z.object({\n workspace_id: z.string().uuid().optional(),\n labels: z.array(z.string()),\n queued: z.number().int().min(0),\n reserved: z\n .number()\n .int()\n .min(0)\n .describe(\n 'Active reservations for this label set; advisory, may exceed `queued` during heavy claiming.',\n ),\n oldest_queued_at: z.string().datetime(),\n});\n\nexport const reservationGrantSchema = z.object({\n reservation_id: z.string().uuid(),\n workspace_id: z.string().uuid().optional(),\n labels: z.array(z.string()),\n count: z.number().int().positive(),\n expires_at: z.string().datetime(),\n});\n\nexport const pollDemandResponseSchema = z.object({\n stats: z.array(demandStatSchema),\n reservations: z.array(reservationGrantSchema),\n terminate_provider_runner_ids: z.array(z.string()),\n});\n\nexport type PollDemandTemplateDto = z.infer<typeof pollDemandTemplateSchema>;\nexport type PollDemandBodyDto = z.infer<typeof pollDemandBodySchema>;\nexport type DemandStatDto = z.infer<typeof demandStatSchema>;\nexport type ReservationGrantDto = z.infer<typeof reservationGrantSchema>;\nexport type PollDemandResponseDto = z.infer<typeof pollDemandResponseSchema>;\n"],"names":["MAX_RUNNER_LABELS","z","runnerLabelSchema","pollDemandTemplateSchema","object","template_key","string","min","labels","array","max","available_slots","number","int","starting","running","pollDemandBodySchema","wait_seconds","optional","max_reservations","templates","demandStatSchema","workspace_id","uuid","queued","reserved","describe","oldest_queued_at","datetime","reservationGrantSchema","reservation_id","count","positive","expires_at","pollDemandResponseSchema","stats","reservations","terminate_provider_runner_ids"],"mappings":"AAAA,SAAQA,iBAAiB,QAAO,yBAAyB;AACzD,SAAQC,CAAC,QAAO,MAAM;AACtB,SAAQC,iBAAiB,QAAO,gBAAgB;AAEhD,OAAO,MAAMC,2BAA2BF,EAAEG,MAAM,CAAC;IAC/CC,cAAcJ,EAAEK,MAAM,GAAGC,GAAG,CAAC;IAC7BC,QAAQP,EAAEQ,KAAK,CAACP,mBAAmBK,GAAG,CAAC,GAAGG,GAAG,CAACV;IAC9CW,iBAAiBV,EAAEW,MAAM,GAAGC,GAAG,GAAGN,GAAG,CAAC,GAAGG,GAAG,CAAC;IAC7CI,UAAUb,EAAEW,MAAM,GAAGC,GAAG,GAAGN,GAAG,CAAC,GAAGG,GAAG,CAAC;IACtCK,SAASd,EAAEW,MAAM,GAAGC,GAAG,GAAGN,GAAG,CAAC,GAAGG,GAAG,CAAC;AACvC,GAAG;AAEH,OAAO,MAAMM,uBAAuBf,EAAEG,MAAM,CAAC;IAC3Ca,cAAchB,EAAEW,MAAM,GAAGC,GAAG,GAAGN,GAAG,CAAC,GAAGW,QAAQ;IAC9CC,kBAAkBlB,EAAEW,MAAM,GAAGC,GAAG,GAAGN,GAAG,CAAC,GAAGG,GAAG,CAAC;IAC9CU,WAAWnB,EAAEQ,KAAK,CAACN,0BAA0BO,GAAG,CAAC;AACnD,GAAG;AAEH,OAAO,MAAMW,mBAAmBpB,EAAEG,MAAM,CAAC;IACvCkB,cAAcrB,EAAEK,MAAM,GAAGiB,IAAI,GAAGL,QAAQ;IACxCV,QAAQP,EAAEQ,KAAK,CAACR,EAAEK,MAAM;IACxBkB,QAAQvB,EAAEW,MAAM,GAAGC,GAAG,GAAGN,GAAG,CAAC;IAC7BkB,UAAUxB,EACPW,MAAM,GACNC,GAAG,GACHN,GAAG,CAAC,GACJmB,QAAQ,CACP;IAEJC,kBAAkB1B,EAAEK,MAAM,GAAGsB,QAAQ;AACvC,GAAG;AAEH,OAAO,MAAMC,yBAAyB5B,EAAEG,MAAM,CAAC;IAC7C0B,gBAAgB7B,EAAEK,MAAM,GAAGiB,IAAI;IAC/BD,cAAcrB,EAAEK,MAAM,GAAGiB,IAAI,GAAGL,QAAQ;IACxCV,QAAQP,EAAEQ,KAAK,CAACR,EAAEK,MAAM;IACxByB,OAAO9B,EAAEW,MAAM,GAAGC,GAAG,GAAGmB,QAAQ;IAChCC,YAAYhC,EAAEK,MAAM,GAAGsB,QAAQ;AACjC,GAAG;AAEH,OAAO,MAAMM,2BAA2BjC,EAAEG,MAAM,CAAC;IAC/C+B,OAAOlC,EAAEQ,KAAK,CAACY;IACfe,cAAcnC,EAAEQ,KAAK,CAACoB;IACtBQ,+BAA+BpC,EAAEQ,KAAK,CAACR,EAAEK,MAAM;AACjD,GAAG"}
1
+ {"version":3,"sources":["../../src/schemas/poll-demand.ts"],"sourcesContent":["import {MAX_RUNNER_LABELS} from '@shipfox/runner-labels';\nimport {z} from 'zod';\nimport {runnerLabelSchema} from './register.js';\n\nexport const pollDemandTemplateSchema = z.object({\n template_key: z.string().min(1),\n labels: z.array(runnerLabelSchema).min(1).max(MAX_RUNNER_LABELS),\n available_slots: z.number().int().min(0).max(100_000),\n starting: z.number().int().min(0).max(100_000),\n running: z.number().int().min(0).max(100_000),\n});\n\nexport const pollDemandBodySchema = z.object({\n wait_seconds: z.number().int().min(0).optional(),\n reservation_ttl_seconds: z.number().int().min(1).optional(),\n max_reservations: z.number().int().min(0).max(1000),\n templates: z.array(pollDemandTemplateSchema).max(1000),\n});\n\nexport const demandStatSchema = z.object({\n workspace_id: z.string().uuid().optional(),\n labels: z.array(z.string()),\n queued: z.number().int().min(0),\n reserved: z\n .number()\n .int()\n .min(0)\n .describe(\n 'Active reservations for this label set; advisory, may exceed `queued` during heavy claiming.',\n ),\n oldest_queued_at: z.string().datetime(),\n});\n\nexport const reservationGrantSchema = z.object({\n reservation_id: z.string().uuid(),\n workspace_id: z.string().uuid().optional(),\n labels: z.array(z.string()),\n count: z.number().int().positive(),\n expires_at: z.string().datetime(),\n});\n\nexport const pollDemandResponseSchema = z.object({\n stats: z.array(demandStatSchema),\n reservations: z.array(reservationGrantSchema),\n terminate_provider_runner_ids: z.array(z.string()),\n});\n\nexport type PollDemandTemplateDto = z.infer<typeof pollDemandTemplateSchema>;\nexport type PollDemandBodyDto = z.infer<typeof pollDemandBodySchema>;\nexport type DemandStatDto = z.infer<typeof demandStatSchema>;\nexport type ReservationGrantDto = z.infer<typeof reservationGrantSchema>;\nexport type PollDemandResponseDto = z.infer<typeof pollDemandResponseSchema>;\n"],"names":["MAX_RUNNER_LABELS","z","runnerLabelSchema","pollDemandTemplateSchema","object","template_key","string","min","labels","array","max","available_slots","number","int","starting","running","pollDemandBodySchema","wait_seconds","optional","reservation_ttl_seconds","max_reservations","templates","demandStatSchema","workspace_id","uuid","queued","reserved","describe","oldest_queued_at","datetime","reservationGrantSchema","reservation_id","count","positive","expires_at","pollDemandResponseSchema","stats","reservations","terminate_provider_runner_ids"],"mappings":"AAAA,SAAQA,iBAAiB,QAAO,yBAAyB;AACzD,SAAQC,CAAC,QAAO,MAAM;AACtB,SAAQC,iBAAiB,QAAO,gBAAg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GkB,IAAI;IAC/BD,cAActB,EAAEK,MAAM,GAAGkB,IAAI,GAAGN,QAAQ;IACxCV,QAAQP,EAAEQ,KAAK,CAACR,EAAEK,MAAM;IACxB0B,OAAO/B,EAAEW,MAAM,GAAGC,GAAG,GAAGoB,QAAQ;IAChCC,YAAYjC,EAAEK,MAAM,GAAGuB,QAAQ;AACjC,GAAG;AAEH,OAAO,MAAMM,2BAA2BlC,EAAEG,MAAM,CAAC;IAC/CgC,OAAOnC,EAAEQ,KAAK,CAACa;IACfe,cAAcpC,EAAEQ,KAAK,CAACqB;IACtBQ,+BAA+BrC,EAAEQ,KAAK,CAACR,EAAEK,MAAM;AACjD,GAAG"}
@@ -17,11 +17,11 @@ export declare const reconciledBoundJobSchema: z.ZodObject<{
17
17
  export declare const reconciledRunnerInstanceSchema: z.ZodObject<{
18
18
  provider_runner_id: z.ZodString;
19
19
  state: z.ZodNullable<z.ZodEnum<{
20
- starting: "starting";
20
+ failed: "failed";
21
21
  running: "running";
22
- stopping: "stopping";
22
+ starting: "starting";
23
23
  stopped: "stopped";
24
- failed: "failed";
24
+ stopping: "stopping";
25
25
  terminated: "terminated";
26
26
  }>>;
27
27
  reservation_id: z.ZodNullable<z.ZodString>;
@@ -41,11 +41,11 @@ export declare const reconcileRunnerInstancesResponseSchema: z.ZodObject<{
41
41
  runners: z.ZodArray<z.ZodObject<{
42
42
  provider_runner_id: z.ZodString;
43
43
  state: z.ZodNullable<z.ZodEnum<{
44
- starting: "starting";
44
+ failed: "failed";
45
45
  running: "running";
46
- stopping: "stopping";
46
+ starting: "starting";
47
47
  stopped: "stopped";
48
- failed: "failed";
48
+ stopping: "stopping";
49
49
  terminated: "terminated";
50
50
  }>>;
51
51
  reservation_id: z.ZodNullable<z.ZodString>;
@@ -17,9 +17,9 @@ export declare const registerRunnerResponseSchema: z.ZodObject<{
17
17
  session_token: z.ZodString;
18
18
  session_id: z.ZodString;
19
19
  mode: z.ZodEnum<{
20
- manual: "manual";
21
- ephemeral: "ephemeral";
22
20
  activation: "activation";
21
+ ephemeral: "ephemeral";
22
+ manual: "manual";
23
23
  }>;
24
24
  max_claims: z.ZodNullable<z.ZodNumber>;
25
25
  }, z.core.$strip>;
@@ -3,11 +3,11 @@ export declare const MAX_PROVIDER_RUNNER_REPORT_EVENTS = 1000;
3
3
  export declare const MAX_PROVIDER_RUNNER_REASON_LENGTH = 500;
4
4
  export declare const MAX_PROVIDER_KIND_LENGTH = 64;
5
5
  export declare const providerRunnerStateSchema: z.ZodEnum<{
6
- starting: "starting";
6
+ failed: "failed";
7
7
  running: "running";
8
- stopping: "stopping";
8
+ starting: "starting";
9
9
  stopped: "stopped";
10
- failed: "failed";
10
+ stopping: "stopping";
11
11
  terminated: "terminated";
12
12
  }>;
13
13
  export declare const providerKindSchema: z.ZodString;
@@ -18,11 +18,11 @@ export declare const providerRunnerReportEventSchema: z.ZodObject<{
18
18
  template_key: z.ZodOptional<z.ZodString>;
19
19
  labels: z.ZodArray<z.ZodString>;
20
20
  state: z.ZodEnum<{
21
- starting: "starting";
21
+ failed: "failed";
22
22
  running: "running";
23
- stopping: "stopping";
23
+ starting: "starting";
24
24
  stopped: "stopped";
25
- failed: "failed";
25
+ stopping: "stopping";
26
26
  terminated: "terminated";
27
27
  }>;
28
28
  reason: z.ZodOptional<z.ZodString>;
@@ -38,11 +38,11 @@ export declare const reportRunnerInstancesBodySchema: z.ZodObject<{
38
38
  template_key: z.ZodOptional<z.ZodString>;
39
39
  labels: z.ZodArray<z.ZodString>;
40
40
  state: z.ZodEnum<{
41
- starting: "starting";
41
+ failed: "failed";
42
42
  running: "running";
43
- stopping: "stopping";
43
+ starting: "starting";
44
44
  stopped: "stopped";
45
- failed: "failed";
45
+ stopping: "stopping";
46
46
  terminated: "terminated";
47
47
  }>;
48
48
  reason: z.ZodOptional<z.ZodString>;
@@ -56,20 +56,20 @@ export declare const reportRunnerInstancesResponseSchema: z.ZodObject<{
56
56
  reservations_released: z.ZodNumber;
57
57
  }, z.core.$strip>;
58
58
  export declare const activeRunnerStateSchema: z.ZodEnum<{
59
- starting: "starting";
59
+ busy: "busy";
60
60
  running: "running";
61
+ starting: "starting";
61
62
  stopping: "stopping";
62
- busy: "busy";
63
63
  }>;
64
64
  export declare const activeRunnerDtoSchema: z.ZodObject<{
65
65
  runner_session_id: z.ZodNullable<z.ZodString>;
66
66
  provider_runner_id: z.ZodNullable<z.ZodString>;
67
67
  provisioner_id: z.ZodNullable<z.ZodString>;
68
68
  state: z.ZodEnum<{
69
- starting: "starting";
69
+ busy: "busy";
70
70
  running: "running";
71
+ starting: "starting";
71
72
  stopping: "stopping";
72
- busy: "busy";
73
73
  }>;
74
74
  labels: z.ZodArray<z.ZodString>;
75
75
  template_key: z.ZodNullable<z.ZodString>;
@@ -86,10 +86,10 @@ export declare const activeRunnersResponseSchema: z.ZodObject<{
86
86
  provider_runner_id: z.ZodNullable<z.ZodString>;
87
87
  provisioner_id: z.ZodNullable<z.ZodString>;
88
88
  state: z.ZodEnum<{
89
- starting: "starting";
89
+ busy: "busy";
90
90
  running: "running";
91
+ starting: "starting";
91
92
  stopping: "stopping";
92
- busy: "busy";
93
93
  }>;
94
94
  labels: z.ZodArray<z.ZodString>;
95
95
  template_key: z.ZodNullable<z.ZodString>;