@shipfox/api-runners-dto 12.0.0 → 12.4.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.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +15 -0
- package/dist/events.d.ts +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/inter-module.d.ts +20 -20
- package/dist/inter-module.d.ts.map +1 -1
- package/dist/schemas/admin-runner-instances.d.ts +25 -25
- package/dist/schemas/assign-runner-instances.d.ts +2 -0
- package/dist/schemas/assign-runner-instances.d.ts.map +1 -1
- package/dist/schemas/assign-runner-instances.js +2 -0
- package/dist/schemas/assign-runner-instances.js.map +1 -1
- package/dist/schemas/claim-job.d.ts +1 -1
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +2 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/poll-demand.d.ts +2 -0
- package/dist/schemas/poll-demand.d.ts.map +1 -1
- package/dist/schemas/poll-demand.js +2 -0
- package/dist/schemas/poll-demand.js.map +1 -1
- package/dist/schemas/reconcile-runner-instances.d.ts +10 -6
- package/dist/schemas/reconcile-runner-instances.d.ts.map +1 -1
- package/dist/schemas/reconcile-runner-instances.js +3 -0
- package/dist/schemas/reconcile-runner-instances.js.map +1 -1
- package/dist/schemas/register.d.ts +2 -2
- package/dist/schemas/report-runner-instances.d.ts +15 -15
- package/dist/schemas/runner-enrollment.d.ts +2 -0
- package/dist/schemas/runner-enrollment.d.ts.map +1 -1
- package/dist/schemas/runner-enrollment.js +7 -2
- package/dist/schemas/runner-enrollment.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/index.ts +4 -0
- package/src/schemas/assign-runner-instances.ts +3 -0
- package/src/schemas/index.ts +4 -0
- package/src/schemas/poll-demand.test.ts +21 -0
- package/src/schemas/poll-demand.ts +9 -0
- package/src/schemas/reconcile-runner-instances.test.ts +27 -3
- package/src/schemas/reconcile-runner-instances.ts +4 -0
- package/src/schemas/runner-enrollment.ts +9 -1
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const MAX_RECONCILE_OBSERVED_RUNNERS = 5000;
|
|
3
3
|
export declare const MAX_OBSERVED_PROVIDER_RUNNER_ID_LENGTH = 255;
|
|
4
|
+
export declare const RECONCILE_RUNNER_INSTANCES_INTENDED_RESERVATION_HEADER = "x-shipfox-reconcile-intended-reservation";
|
|
5
|
+
export declare const RECONCILE_RUNNER_INSTANCES_INTENDED_RESERVATION_HEADER_VALUE = "1";
|
|
4
6
|
export declare const reconcileRunnerInstancesBodySchema: z.ZodObject<{
|
|
5
7
|
observed_provider_runner_ids: z.ZodArray<z.ZodString>;
|
|
6
8
|
}, z.core.$strict>;
|
|
@@ -17,13 +19,14 @@ export declare const reconciledBoundJobSchema: z.ZodObject<{
|
|
|
17
19
|
export declare const reconciledRunnerInstanceSchema: z.ZodObject<{
|
|
18
20
|
provider_runner_id: z.ZodString;
|
|
19
21
|
state: z.ZodNullable<z.ZodEnum<{
|
|
20
|
-
|
|
22
|
+
failed: "failed";
|
|
21
23
|
running: "running";
|
|
22
|
-
|
|
24
|
+
starting: "starting";
|
|
23
25
|
stopped: "stopped";
|
|
24
|
-
|
|
26
|
+
stopping: "stopping";
|
|
25
27
|
terminated: "terminated";
|
|
26
28
|
}>>;
|
|
29
|
+
intended_reservation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
30
|
reservation_id: z.ZodNullable<z.ZodString>;
|
|
28
31
|
runner_session_id: z.ZodNullable<z.ZodString>;
|
|
29
32
|
bound_job: z.ZodNullable<z.ZodObject<{
|
|
@@ -41,13 +44,14 @@ export declare const reconcileRunnerInstancesResponseSchema: z.ZodObject<{
|
|
|
41
44
|
runners: z.ZodArray<z.ZodObject<{
|
|
42
45
|
provider_runner_id: z.ZodString;
|
|
43
46
|
state: z.ZodNullable<z.ZodEnum<{
|
|
44
|
-
|
|
47
|
+
failed: "failed";
|
|
45
48
|
running: "running";
|
|
46
|
-
|
|
49
|
+
starting: "starting";
|
|
47
50
|
stopped: "stopped";
|
|
48
|
-
|
|
51
|
+
stopping: "stopping";
|
|
49
52
|
terminated: "terminated";
|
|
50
53
|
}>>;
|
|
54
|
+
intended_reservation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
55
|
reservation_id: z.ZodNullable<z.ZodString>;
|
|
52
56
|
runner_session_id: z.ZodNullable<z.ZodString>;
|
|
53
57
|
bound_job: z.ZodNullable<z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reconcile-runner-instances.d.ts","sourceRoot":"","sources":["../../src/schemas/reconcile-runner-instances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,eAAO,MAAM,8BAA8B,OAAO,CAAC;AACnD,eAAO,MAAM,sCAAsC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"reconcile-runner-instances.d.ts","sourceRoot":"","sources":["../../src/schemas/reconcile-runner-instances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,eAAO,MAAM,8BAA8B,OAAO,CAAC;AACnD,eAAO,MAAM,sCAAsC,MAAM,CAAC;AAC1D,eAAO,MAAM,sDAAsD,6CACvB,CAAC;AAC7C,eAAO,MAAM,4DAA4D,MAAM,CAAC;AAEhF,eAAO,MAAM,kCAAkC;;kBAc5C,CAAC;AAEJ,eAAO,MAAM,4BAA4B;;;EAAgC,CAAC;AAE1E,eAAO,MAAM,wBAAwB;;;;;kBAO1B,CAAC;AAEZ,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;kBAUhC,CAAC;AAEZ,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKxC,CAAC;AAEZ,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AACjG,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AACrF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC7E,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACzF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,sCAAsC,CAC9C,CAAC"}
|
|
@@ -2,6 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
import { providerRunnerStateSchema } from './report-runner-instances.js';
|
|
3
3
|
export const MAX_RECONCILE_OBSERVED_RUNNERS = 5000;
|
|
4
4
|
export const MAX_OBSERVED_PROVIDER_RUNNER_ID_LENGTH = 255;
|
|
5
|
+
export const RECONCILE_RUNNER_INSTANCES_INTENDED_RESERVATION_HEADER = 'x-shipfox-reconcile-intended-reservation';
|
|
6
|
+
export const RECONCILE_RUNNER_INSTANCES_INTENDED_RESERVATION_HEADER_VALUE = '1';
|
|
5
7
|
export const reconcileRunnerInstancesBodySchema = z.object({
|
|
6
8
|
observed_provider_runner_ids: z.array(z.string().min(1).max(MAX_OBSERVED_PROVIDER_RUNNER_ID_LENGTH)).max(MAX_RECONCILE_OBSERVED_RUNNERS)
|
|
7
9
|
}).strict().refine((body)=>new Set(body.observed_provider_runner_ids).size === body.observed_provider_runner_ids.length, {
|
|
@@ -23,6 +25,7 @@ export const reconciledBoundJobSchema = z.object({
|
|
|
23
25
|
export const reconciledRunnerInstanceSchema = z.object({
|
|
24
26
|
provider_runner_id: z.string(),
|
|
25
27
|
state: providerRunnerStateSchema.nullable(),
|
|
28
|
+
intended_reservation_id: z.string().uuid().nullable().optional(),
|
|
26
29
|
reservation_id: z.string().uuid().nullable(),
|
|
27
30
|
runner_session_id: z.string().uuid().nullable(),
|
|
28
31
|
bound_job: reconciledBoundJobSchema.nullable(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schemas/reconcile-runner-instances.ts"],"sourcesContent":["import {z} from 'zod';\nimport {providerRunnerStateSchema} from './report-runner-instances.js';\n\nexport const MAX_RECONCILE_OBSERVED_RUNNERS = 5000;\nexport const MAX_OBSERVED_PROVIDER_RUNNER_ID_LENGTH = 255;\n\nexport const reconcileRunnerInstancesBodySchema = z\n .object({\n observed_provider_runner_ids: z\n .array(z.string().min(1).max(MAX_OBSERVED_PROVIDER_RUNNER_ID_LENGTH))\n .max(MAX_RECONCILE_OBSERVED_RUNNERS),\n })\n .strict()\n .refine(\n (body) =>\n new Set(body.observed_provider_runner_ids).size === body.observed_provider_runner_ids.length,\n {\n message: 'observed_provider_runner_ids values must be unique',\n path: ['observed_provider_runner_ids'],\n },\n );\n\nexport const reconcileDesiredIntentSchema = z.enum(['keep', 'terminate']);\n\nexport const reconciledBoundJobSchema = z\n .object({\n job_id: z.string().uuid(),\n workflow_run_attempt_id: z.string().uuid(),\n last_heartbeat_at: z.string().datetime(),\n cancellation_requested_at: z.string().datetime().nullable(),\n })\n .strict();\n\nexport const reconciledRunnerInstanceSchema = z\n .object({\n provider_runner_id: z.string(),\n state: providerRunnerStateSchema.nullable(),\n reservation_id: z.string().uuid().nullable(),\n runner_session_id: z.string().uuid().nullable(),\n bound_job: reconciledBoundJobSchema.nullable(),\n desired_intent: reconcileDesiredIntentSchema,\n })\n .strict();\n\nexport const reconcileRunnerInstancesResponseSchema = z\n .object({\n runners: z.array(reconciledRunnerInstanceSchema),\n terminated_absent_provider_runner_ids: z.array(z.string()),\n })\n .strict();\n\nexport type ReconcileRunnerInstancesBodyDto = z.infer<typeof reconcileRunnerInstancesBodySchema>;\nexport type ReconcileDesiredIntentDto = z.infer<typeof reconcileDesiredIntentSchema>;\nexport type ReconciledBoundJobDto = z.infer<typeof reconciledBoundJobSchema>;\nexport type ReconciledRunnerInstanceDto = z.infer<typeof reconciledRunnerInstanceSchema>;\nexport type ReconcileRunnerInstancesResponseDto = z.infer<\n typeof reconcileRunnerInstancesResponseSchema\n>;\n"],"names":["z","providerRunnerStateSchema","MAX_RECONCILE_OBSERVED_RUNNERS","MAX_OBSERVED_PROVIDER_RUNNER_ID_LENGTH","reconcileRunnerInstancesBodySchema","object","observed_provider_runner_ids","array","string","min","max","strict","refine","body","Set","size","length","message","path","reconcileDesiredIntentSchema","enum","reconciledBoundJobSchema","job_id","uuid","workflow_run_attempt_id","last_heartbeat_at","datetime","cancellation_requested_at","nullable","reconciledRunnerInstanceSchema","provider_runner_id","state","reservation_id","runner_session_id","bound_job","desired_intent","reconcileRunnerInstancesResponseSchema","runners","terminated_absent_provider_runner_ids"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,yBAAyB,QAAO,+BAA+B;AAEvE,OAAO,MAAMC,iCAAiC,KAAK;AACnD,OAAO,MAAMC,yCAAyC,IAAI;
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/reconcile-runner-instances.ts"],"sourcesContent":["import {z} from 'zod';\nimport {providerRunnerStateSchema} from './report-runner-instances.js';\n\nexport const MAX_RECONCILE_OBSERVED_RUNNERS = 5000;\nexport const MAX_OBSERVED_PROVIDER_RUNNER_ID_LENGTH = 255;\nexport const RECONCILE_RUNNER_INSTANCES_INTENDED_RESERVATION_HEADER =\n 'x-shipfox-reconcile-intended-reservation';\nexport const RECONCILE_RUNNER_INSTANCES_INTENDED_RESERVATION_HEADER_VALUE = '1';\n\nexport const reconcileRunnerInstancesBodySchema = z\n .object({\n observed_provider_runner_ids: z\n .array(z.string().min(1).max(MAX_OBSERVED_PROVIDER_RUNNER_ID_LENGTH))\n .max(MAX_RECONCILE_OBSERVED_RUNNERS),\n })\n .strict()\n .refine(\n (body) =>\n new Set(body.observed_provider_runner_ids).size === body.observed_provider_runner_ids.length,\n {\n message: 'observed_provider_runner_ids values must be unique',\n path: ['observed_provider_runner_ids'],\n },\n );\n\nexport const reconcileDesiredIntentSchema = z.enum(['keep', 'terminate']);\n\nexport const reconciledBoundJobSchema = z\n .object({\n job_id: z.string().uuid(),\n workflow_run_attempt_id: z.string().uuid(),\n last_heartbeat_at: z.string().datetime(),\n cancellation_requested_at: z.string().datetime().nullable(),\n })\n .strict();\n\nexport const reconciledRunnerInstanceSchema = z\n .object({\n provider_runner_id: z.string(),\n state: providerRunnerStateSchema.nullable(),\n intended_reservation_id: z.string().uuid().nullable().optional(),\n reservation_id: z.string().uuid().nullable(),\n runner_session_id: z.string().uuid().nullable(),\n bound_job: reconciledBoundJobSchema.nullable(),\n desired_intent: reconcileDesiredIntentSchema,\n })\n .strict();\n\nexport const reconcileRunnerInstancesResponseSchema = z\n .object({\n runners: z.array(reconciledRunnerInstanceSchema),\n terminated_absent_provider_runner_ids: z.array(z.string()),\n })\n .strict();\n\nexport type ReconcileRunnerInstancesBodyDto = z.infer<typeof reconcileRunnerInstancesBodySchema>;\nexport type ReconcileDesiredIntentDto = z.infer<typeof reconcileDesiredIntentSchema>;\nexport type ReconciledBoundJobDto = z.infer<typeof reconciledBoundJobSchema>;\nexport type ReconciledRunnerInstanceDto = z.infer<typeof reconciledRunnerInstanceSchema>;\nexport type ReconcileRunnerInstancesResponseDto = z.infer<\n typeof reconcileRunnerInstancesResponseSchema\n>;\n"],"names":["z","providerRunnerStateSchema","MAX_RECONCILE_OBSERVED_RUNNERS","MAX_OBSERVED_PROVIDER_RUNNER_ID_LENGTH","RECONCILE_RUNNER_INSTANCES_INTENDED_RESERVATION_HEADER","RECONCILE_RUNNER_INSTANCES_INTENDED_RESERVATION_HEADER_VALUE","reconcileRunnerInstancesBodySchema","object","observed_provider_runner_ids","array","string","min","max","strict","refine","body","Set","size","length","message","path","reconcileDesiredIntentSchema","enum","reconciledBoundJobSchema","job_id","uuid","workflow_run_attempt_id","last_heartbeat_at","datetime","cancellation_requested_at","nullable","reconciledRunnerInstanceSchema","provider_runner_id","state","intended_reservation_id","optional","reservation_id","runner_session_id","bound_job","desired_intent","reconcileRunnerInstancesResponseSchema","runners","terminated_absent_provider_runner_ids"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,yBAAyB,QAAO,+BAA+B;AAEvE,OAAO,MAAMC,iCAAiC,KAAK;AACnD,OAAO,MAAMC,yCAAyC,IAAI;AAC1D,OAAO,MAAMC,yDACX,2CAA2C;AAC7C,OAAO,MAAMC,+DAA+D,IAAI;AAEhF,OAAO,MAAMC,qCAAqCN,EAC/CO,MAAM,CAAC;IACNC,8BAA8BR,EAC3BS,KAAK,CAACT,EAAEU,MAAM,GAAGC,GAAG,CAAC,GAAGC,GAAG,CAACT,yCAC5BS,GAAG,CAACV;AACT,GACCW,MAAM,GACNC,MAAM,CACL,CAACC,OACC,IAAIC,IAAID,KAAKP,4BAA4B,EAAES,IAAI,KAAKF,KAAKP,4BAA4B,CAACU,MAAM,EAC9F;IACEC,SAAS;IACTC,MAAM;QAAC;KAA+B;AACxC,GACA;AAEJ,OAAO,MAAMC,+BAA+BrB,EAAEsB,IAAI,CAAC;IAAC;IAAQ;CAAY,EAAE;AAE1E,OAAO,MAAMC,2BAA2BvB,EACrCO,MAAM,CAAC;IACNiB,QAAQxB,EAAEU,MAAM,GAAGe,IAAI;IACvBC,yBAAyB1B,EAAEU,MAAM,GAAGe,IAAI;IACxCE,mBAAmB3B,EAAEU,MAAM,GAAGkB,QAAQ;IACtCC,2BAA2B7B,EAAEU,MAAM,GAAGkB,QAAQ,GAAGE,QAAQ;AAC3D,GACCjB,MAAM,GAAG;AAEZ,OAAO,MAAMkB,iCAAiC/B,EAC3CO,MAAM,CAAC;IACNyB,oBAAoBhC,EAAEU,MAAM;IAC5BuB,OAAOhC,0BAA0B6B,QAAQ;IACzCI,yBAAyBlC,EAAEU,MAAM,GAAGe,IAAI,GAAGK,QAAQ,GAAGK,QAAQ;IAC9DC,gBAAgBpC,EAAEU,MAAM,GAAGe,IAAI,GAAGK,QAAQ;IAC1CO,mBAAmBrC,EAAEU,MAAM,GAAGe,IAAI,GAAGK,QAAQ;IAC7CQ,WAAWf,yBAAyBO,QAAQ;IAC5CS,gBAAgBlB;AAClB,GACCR,MAAM,GAAG;AAEZ,OAAO,MAAM2B,yCAAyCxC,EACnDO,MAAM,CAAC;IACNkC,SAASzC,EAAES,KAAK,CAACsB;IACjBW,uCAAuC1C,EAAES,KAAK,CAACT,EAAEU,MAAM;AACzD,GACCG,MAAM,GAAG"}
|
|
@@ -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
|
-
|
|
6
|
+
failed: "failed";
|
|
7
7
|
running: "running";
|
|
8
|
-
|
|
8
|
+
starting: "starting";
|
|
9
9
|
stopped: "stopped";
|
|
10
|
-
|
|
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
|
-
|
|
21
|
+
failed: "failed";
|
|
22
22
|
running: "running";
|
|
23
|
-
|
|
23
|
+
starting: "starting";
|
|
24
24
|
stopped: "stopped";
|
|
25
|
-
|
|
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
|
-
|
|
41
|
+
failed: "failed";
|
|
42
42
|
running: "running";
|
|
43
|
-
|
|
43
|
+
starting: "starting";
|
|
44
44
|
stopped: "stopped";
|
|
45
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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>;
|
|
@@ -13,7 +13,9 @@ export declare const createRunnerInstancesResponseSchema: z.ZodObject<{
|
|
|
13
13
|
runner_instances: z.ZodArray<z.ZodObject<{
|
|
14
14
|
runner_instance_id: z.ZodString;
|
|
15
15
|
bootstrap_token: z.ZodString;
|
|
16
|
+
request_index: z.ZodOptional<z.ZodNumber>;
|
|
16
17
|
}, z.core.$strip>>;
|
|
18
|
+
reservation_unavailable: z.ZodOptional<z.ZodLiteral<true>>;
|
|
17
19
|
}, z.core.$strip>;
|
|
18
20
|
export declare const runnerBootstrapExchangeResponseSchema: z.ZodObject<{
|
|
19
21
|
runner_instance_id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-enrollment.d.ts","sourceRoot":"","sources":["../../src/schemas/runner-enrollment.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,eAAO,MAAM,iCAAiC;;kBAEnC,CAAC;AACZ,eAAO,MAAM,+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,OAAO,+BAA+B,CAAC,CAAC"}
|
|
@@ -15,8 +15,13 @@ export const createRunnerInstancesBodySchema = z.object({
|
|
|
15
15
|
export const createRunnerInstancesResponseSchema = z.object({
|
|
16
16
|
runner_instances: z.array(z.object({
|
|
17
17
|
runner_instance_id: z.string().uuid(),
|
|
18
|
-
bootstrap_token: z.string().min(1)
|
|
19
|
-
|
|
18
|
+
bootstrap_token: z.string().min(1),
|
|
19
|
+
// Accepted instances retain their request position for short responses.
|
|
20
|
+
request_index: z.number().int().nonnegative().optional()
|
|
21
|
+
})),
|
|
22
|
+
// A demand reservation can be consumed or stale between demand polling and launch.
|
|
23
|
+
// The field is omitted for the normal and warm-launch paths.
|
|
24
|
+
reservation_unavailable: z.literal(true).optional()
|
|
20
25
|
});
|
|
21
26
|
export const runnerBootstrapExchangeResponseSchema = z.object({
|
|
22
27
|
runner_instance_id: z.string().uuid(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schemas/runner-enrollment.ts"],"sourcesContent":["import {MAX_RUNNER_LABELS} from '@shipfox/runner-labels';\nimport {z} from 'zod';\nimport {runnerLabelSchema} from './register.js';\nimport {runnerToolCapabilitiesSchema} from './tool-capabilities.js';\n\nexport const runnerBootstrapExchangeBodySchema = z\n .object({bootstrap_token: z.string().min(1)})\n .strict();\nexport const createRunnerInstancesBodySchema = z\n .object({\n provider_kind: z.string().min(1).max(64).optional(),\n runner_instances: z\n .array(\n z\n .object({\n template_key: z.string().min(1).max(255).optional(),\n reservation_id: z.string().uuid().optional(),\n })\n .strict(),\n )\n .min(1)\n .max(500),\n })\n .strict();\nexport const createRunnerInstancesResponseSchema = z.object({\n runner_instances: z.array(\n z.object({runner_instance_id: z.string().uuid()
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/runner-enrollment.ts"],"sourcesContent":["import {MAX_RUNNER_LABELS} from '@shipfox/runner-labels';\nimport {z} from 'zod';\nimport {runnerLabelSchema} from './register.js';\nimport {runnerToolCapabilitiesSchema} from './tool-capabilities.js';\n\nexport const runnerBootstrapExchangeBodySchema = z\n .object({bootstrap_token: z.string().min(1)})\n .strict();\nexport const createRunnerInstancesBodySchema = z\n .object({\n provider_kind: z.string().min(1).max(64).optional(),\n runner_instances: z\n .array(\n z\n .object({\n template_key: z.string().min(1).max(255).optional(),\n reservation_id: z.string().uuid().optional(),\n })\n .strict(),\n )\n .min(1)\n .max(500),\n })\n .strict();\nexport const createRunnerInstancesResponseSchema = z.object({\n runner_instances: z.array(\n z.object({\n runner_instance_id: z.string().uuid(),\n bootstrap_token: z.string().min(1),\n // Accepted instances retain their request position for short responses.\n request_index: z.number().int().nonnegative().optional(),\n }),\n ),\n // A demand reservation can be consumed or stale between demand polling and launch.\n // The field is omitted for the normal and warm-launch paths.\n reservation_unavailable: z.literal(true).optional(),\n});\nexport const runnerBootstrapExchangeResponseSchema = z.object({\n runner_instance_id: z.string().uuid(),\n control_session_token: z.string().min(1),\n expires_at: z.string().datetime(),\n});\nexport const runnerEnrollmentBodySchema = z\n .object({\n labels: z.array(runnerLabelSchema).min(1).max(MAX_RUNNER_LABELS),\n capabilities: runnerToolCapabilitiesSchema.optional(),\n provider_kind: z.string().min(1).max(64),\n protocol_version: z.string().min(1).max(64),\n })\n .strict();\nexport const runnerEnrollmentResponseSchema = z.object({\n activation_token: z.string().min(1).nullable(),\n});\nexport const attachRunnerControlProviderIdBodySchema = z\n .object({provider_runner_id: z.string().min(1).max(255)})\n .strict();\nexport const runnerControlHeartbeatResponseSchema = z.object({ok: z.literal(true)});\nexport const RUNNER_ASSIGNMENT_POLL_DEFAULT_WAIT_SECONDS = 30;\nexport const runnerAssignmentPollQuerySchema = z\n .object({wait_seconds: z.coerce.number().int().min(1).optional()})\n .strict();\nexport const runnerAssignmentPollResponseSchema = z.object({\n activation_token: z.string().min(1).nullable(),\n});\n\nexport type RunnerBootstrapExchangeBodyDto = z.infer<typeof runnerBootstrapExchangeBodySchema>;\nexport type CreateRunnerInstancesBodyDto = z.infer<typeof createRunnerInstancesBodySchema>;\nexport type CreateRunnerInstancesResponseDto = z.infer<typeof createRunnerInstancesResponseSchema>;\nexport type RunnerBootstrapExchangeResponseDto = z.infer<\n typeof runnerBootstrapExchangeResponseSchema\n>;\nexport type RunnerEnrollmentBodyDto = z.infer<typeof runnerEnrollmentBodySchema>;\nexport type RunnerEnrollmentResponseDto = z.infer<typeof runnerEnrollmentResponseSchema>;\nexport type RunnerAssignmentPollQueryDto = z.infer<typeof runnerAssignmentPollQuerySchema>;\n"],"names":["MAX_RUNNER_LABELS","z","runnerLabelSchema","runnerToolCapabilitiesSchema","runnerBootstrapExchangeBodySchema","object","bootstrap_token","string","min","strict","createRunnerInstancesBodySchema","provider_kind","max","optional","runner_instances","array","template_key","reservation_id","uuid","createRunnerInstancesResponseSchema","runner_instance_id","request_index","number","int","nonnegative","reservation_unavailable","literal","runnerBootstrapExchangeResponseSchema","control_session_token","expires_at","datetime","runnerEnrollmentBodySchema","labels","capabilities","protocol_version","runnerEnrollmentResponseSchema","activation_token","nullable","attachRunnerControlProviderIdBodySchema","provider_runner_id","runnerControlHeartbeatResponseSchema","ok","RUNNER_ASSIGNMENT_POLL_DEFAULT_WAIT_SECONDS","runnerAssignmentPollQuerySchema","wait_seconds","coerce","runnerAssignmentPollResponseSchema"],"mappings":"AAAA,SAAQA,iBAAiB,QAAO,yBAAyB;AACzD,SAAQC,CAAC,QAAO,MAAM;AACtB,SAAQC,iBAAiB,QAAO,gBAAgB;AAChD,SAAQC,4BAA4B,QAAO,yBAAyB;AAEpE,OAAO,MAAMC,oCAAoCH,EAC9CI,MAAM,CAAC;IAACC,iBAAiBL,EAAEM,MAAM,GAAGC,GAAG,CAAC;AAAE,GAC1CC,MAAM,GAAG;AACZ,OAAO,MAAMC,kCAAkCT,EAC5CI,MAAM,CAAC;IACNM,eAAeV,EAAEM,MAAM,GAAGC,GAAG,CAAC,GAAGI,GAAG,CAAC,IAAIC,QAAQ;IACjDC,kBAAkBb,EACfc,KAAK,CACJ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