clawsql 0.2.8 → 0.2.10
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/dist/api/schemas/index.d.ts +100 -100
- package/docker/openclaw/entrypoint.sh +37 -4
- package/docker-compose.allinone.yml +3 -0
- package/docker-compose.yml +6 -0
- package/package.json +2 -2
|
@@ -69,8 +69,8 @@ export declare const InstanceResponse: z.ZodObject<{
|
|
|
69
69
|
host: string;
|
|
70
70
|
port: number;
|
|
71
71
|
version: string | null;
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
73
|
+
role: "replica" | "primary" | "unknown";
|
|
74
74
|
labels: Record<string, string>;
|
|
75
75
|
cluster_id: string | null;
|
|
76
76
|
instance_id: string;
|
|
@@ -82,8 +82,8 @@ export declare const InstanceResponse: z.ZodObject<{
|
|
|
82
82
|
host: string;
|
|
83
83
|
port: number;
|
|
84
84
|
version: string | null;
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
86
|
+
role: "replica" | "primary" | "unknown";
|
|
87
87
|
labels: Record<string, string>;
|
|
88
88
|
cluster_id: string | null;
|
|
89
89
|
instance_id: string;
|
|
@@ -110,8 +110,8 @@ export declare const InstanceListResponse: z.ZodObject<{
|
|
|
110
110
|
host: string;
|
|
111
111
|
port: number;
|
|
112
112
|
version: string | null;
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
114
|
+
role: "replica" | "primary" | "unknown";
|
|
115
115
|
labels: Record<string, string>;
|
|
116
116
|
cluster_id: string | null;
|
|
117
117
|
instance_id: string;
|
|
@@ -123,8 +123,8 @@ export declare const InstanceListResponse: z.ZodObject<{
|
|
|
123
123
|
host: string;
|
|
124
124
|
port: number;
|
|
125
125
|
version: string | null;
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
127
|
+
role: "replica" | "primary" | "unknown";
|
|
128
128
|
labels: Record<string, string>;
|
|
129
129
|
cluster_id: string | null;
|
|
130
130
|
instance_id: string;
|
|
@@ -137,15 +137,14 @@ export declare const InstanceListResponse: z.ZodObject<{
|
|
|
137
137
|
page: z.ZodNumber;
|
|
138
138
|
page_size: z.ZodNumber;
|
|
139
139
|
}, "strip", z.ZodTypeAny, {
|
|
140
|
-
total: number;
|
|
141
140
|
page: number;
|
|
142
141
|
page_size: number;
|
|
143
142
|
items: {
|
|
144
143
|
host: string;
|
|
145
144
|
port: number;
|
|
146
145
|
version: string | null;
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
147
|
+
role: "replica" | "primary" | "unknown";
|
|
149
148
|
labels: Record<string, string>;
|
|
150
149
|
cluster_id: string | null;
|
|
151
150
|
instance_id: string;
|
|
@@ -154,16 +153,16 @@ export declare const InstanceListResponse: z.ZodObject<{
|
|
|
154
153
|
last_seen: Date;
|
|
155
154
|
created_at: Date;
|
|
156
155
|
}[];
|
|
157
|
-
}, {
|
|
158
156
|
total: number;
|
|
157
|
+
}, {
|
|
159
158
|
page: number;
|
|
160
159
|
page_size: number;
|
|
161
160
|
items: {
|
|
162
161
|
host: string;
|
|
163
162
|
port: number;
|
|
164
163
|
version: string | null;
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
165
|
+
role: "replica" | "primary" | "unknown";
|
|
167
166
|
labels: Record<string, string>;
|
|
168
167
|
cluster_id: string | null;
|
|
169
168
|
instance_id: string;
|
|
@@ -172,6 +171,7 @@ export declare const InstanceListResponse: z.ZodObject<{
|
|
|
172
171
|
last_seen: Date;
|
|
173
172
|
created_at: Date;
|
|
174
173
|
}[];
|
|
174
|
+
total: number;
|
|
175
175
|
}>;
|
|
176
176
|
export declare const InstanceMetricsResponse: z.ZodObject<{
|
|
177
177
|
instance_id: z.ZodString;
|
|
@@ -267,8 +267,8 @@ export declare const DiscoveryResponse: z.ZodObject<{
|
|
|
267
267
|
host: string;
|
|
268
268
|
port: number;
|
|
269
269
|
version: string | null;
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
271
|
+
role: "replica" | "primary" | "unknown";
|
|
272
272
|
labels: Record<string, string>;
|
|
273
273
|
cluster_id: string | null;
|
|
274
274
|
instance_id: string;
|
|
@@ -280,8 +280,8 @@ export declare const DiscoveryResponse: z.ZodObject<{
|
|
|
280
280
|
host: string;
|
|
281
281
|
port: number;
|
|
282
282
|
version: string | null;
|
|
283
|
-
|
|
284
|
-
|
|
283
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
284
|
+
role: "replica" | "primary" | "unknown";
|
|
285
285
|
labels: Record<string, string>;
|
|
286
286
|
cluster_id: string | null;
|
|
287
287
|
instance_id: string;
|
|
@@ -294,7 +294,7 @@ export declare const DiscoveryResponse: z.ZodObject<{
|
|
|
294
294
|
started_at: z.ZodOptional<z.ZodDate>;
|
|
295
295
|
completed_at: z.ZodOptional<z.ZodDate>;
|
|
296
296
|
}, "strip", z.ZodTypeAny, {
|
|
297
|
-
status: "
|
|
297
|
+
status: "running" | "completed" | "failed" | "pending";
|
|
298
298
|
network_segments: string[];
|
|
299
299
|
task_id: string;
|
|
300
300
|
instances_found: number;
|
|
@@ -303,8 +303,8 @@ export declare const DiscoveryResponse: z.ZodObject<{
|
|
|
303
303
|
host: string;
|
|
304
304
|
port: number;
|
|
305
305
|
version: string | null;
|
|
306
|
-
|
|
307
|
-
|
|
306
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
307
|
+
role: "replica" | "primary" | "unknown";
|
|
308
308
|
labels: Record<string, string>;
|
|
309
309
|
cluster_id: string | null;
|
|
310
310
|
instance_id: string;
|
|
@@ -316,7 +316,7 @@ export declare const DiscoveryResponse: z.ZodObject<{
|
|
|
316
316
|
started_at?: Date | undefined;
|
|
317
317
|
completed_at?: Date | undefined;
|
|
318
318
|
}, {
|
|
319
|
-
status: "
|
|
319
|
+
status: "running" | "completed" | "failed" | "pending";
|
|
320
320
|
network_segments: string[];
|
|
321
321
|
task_id: string;
|
|
322
322
|
instances_found: number;
|
|
@@ -325,8 +325,8 @@ export declare const DiscoveryResponse: z.ZodObject<{
|
|
|
325
325
|
host: string;
|
|
326
326
|
port: number;
|
|
327
327
|
version: string | null;
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
329
|
+
role: "replica" | "primary" | "unknown";
|
|
330
330
|
labels: Record<string, string>;
|
|
331
331
|
cluster_id: string | null;
|
|
332
332
|
instance_id: string;
|
|
@@ -369,8 +369,8 @@ export declare const ClusterResponse: z.ZodObject<{
|
|
|
369
369
|
host: string;
|
|
370
370
|
port: number;
|
|
371
371
|
version: string | null;
|
|
372
|
-
|
|
373
|
-
|
|
372
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
373
|
+
role: "replica" | "primary" | "unknown";
|
|
374
374
|
labels: Record<string, string>;
|
|
375
375
|
cluster_id: string | null;
|
|
376
376
|
instance_id: string;
|
|
@@ -382,8 +382,8 @@ export declare const ClusterResponse: z.ZodObject<{
|
|
|
382
382
|
host: string;
|
|
383
383
|
port: number;
|
|
384
384
|
version: string | null;
|
|
385
|
-
|
|
386
|
-
|
|
385
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
386
|
+
role: "replica" | "primary" | "unknown";
|
|
387
387
|
labels: Record<string, string>;
|
|
388
388
|
cluster_id: string | null;
|
|
389
389
|
instance_id: string;
|
|
@@ -409,8 +409,8 @@ export declare const ClusterResponse: z.ZodObject<{
|
|
|
409
409
|
host: string;
|
|
410
410
|
port: number;
|
|
411
411
|
version: string | null;
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
413
|
+
role: "replica" | "primary" | "unknown";
|
|
414
414
|
labels: Record<string, string>;
|
|
415
415
|
cluster_id: string | null;
|
|
416
416
|
instance_id: string;
|
|
@@ -422,8 +422,8 @@ export declare const ClusterResponse: z.ZodObject<{
|
|
|
422
422
|
host: string;
|
|
423
423
|
port: number;
|
|
424
424
|
version: string | null;
|
|
425
|
-
|
|
426
|
-
|
|
425
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
426
|
+
role: "replica" | "primary" | "unknown";
|
|
427
427
|
labels: Record<string, string>;
|
|
428
428
|
cluster_id: string | null;
|
|
429
429
|
instance_id: string;
|
|
@@ -438,12 +438,13 @@ export declare const ClusterResponse: z.ZodObject<{
|
|
|
438
438
|
updated_at: z.ZodDate;
|
|
439
439
|
}, "strip", z.ZodTypeAny, {
|
|
440
440
|
name: string;
|
|
441
|
+
description: string | null;
|
|
441
442
|
primary: {
|
|
442
443
|
host: string;
|
|
443
444
|
port: number;
|
|
444
445
|
version: string | null;
|
|
445
|
-
|
|
446
|
-
|
|
446
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
447
|
+
role: "replica" | "primary" | "unknown";
|
|
447
448
|
labels: Record<string, string>;
|
|
448
449
|
cluster_id: string | null;
|
|
449
450
|
instance_id: string;
|
|
@@ -456,8 +457,8 @@ export declare const ClusterResponse: z.ZodObject<{
|
|
|
456
457
|
host: string;
|
|
457
458
|
port: number;
|
|
458
459
|
version: string | null;
|
|
459
|
-
|
|
460
|
-
|
|
460
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
461
|
+
role: "replica" | "primary" | "unknown";
|
|
461
462
|
labels: Record<string, string>;
|
|
462
463
|
cluster_id: string | null;
|
|
463
464
|
instance_id: string;
|
|
@@ -466,20 +467,20 @@ export declare const ClusterResponse: z.ZodObject<{
|
|
|
466
467
|
last_seen: Date;
|
|
467
468
|
created_at: Date;
|
|
468
469
|
}[];
|
|
469
|
-
description: string | null;
|
|
470
470
|
cluster_id: string;
|
|
471
471
|
created_at: Date;
|
|
472
472
|
instance_count: number;
|
|
473
|
-
health_status: "unknown" | "healthy" | "
|
|
473
|
+
health_status: "unknown" | "healthy" | "unhealthy" | "degraded";
|
|
474
474
|
updated_at: Date;
|
|
475
475
|
}, {
|
|
476
476
|
name: string;
|
|
477
|
+
description: string | null;
|
|
477
478
|
primary: {
|
|
478
479
|
host: string;
|
|
479
480
|
port: number;
|
|
480
481
|
version: string | null;
|
|
481
|
-
|
|
482
|
-
|
|
482
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
483
|
+
role: "replica" | "primary" | "unknown";
|
|
483
484
|
labels: Record<string, string>;
|
|
484
485
|
cluster_id: string | null;
|
|
485
486
|
instance_id: string;
|
|
@@ -492,8 +493,8 @@ export declare const ClusterResponse: z.ZodObject<{
|
|
|
492
493
|
host: string;
|
|
493
494
|
port: number;
|
|
494
495
|
version: string | null;
|
|
495
|
-
|
|
496
|
-
|
|
496
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
497
|
+
role: "replica" | "primary" | "unknown";
|
|
497
498
|
labels: Record<string, string>;
|
|
498
499
|
cluster_id: string | null;
|
|
499
500
|
instance_id: string;
|
|
@@ -502,11 +503,10 @@ export declare const ClusterResponse: z.ZodObject<{
|
|
|
502
503
|
last_seen: Date;
|
|
503
504
|
created_at: Date;
|
|
504
505
|
}[];
|
|
505
|
-
description: string | null;
|
|
506
506
|
cluster_id: string;
|
|
507
507
|
created_at: Date;
|
|
508
508
|
instance_count: number;
|
|
509
|
-
health_status: "unknown" | "healthy" | "
|
|
509
|
+
health_status: "unknown" | "healthy" | "unhealthy" | "degraded";
|
|
510
510
|
updated_at: Date;
|
|
511
511
|
}>;
|
|
512
512
|
export declare const ClusterListResponse: z.ZodObject<{
|
|
@@ -531,8 +531,8 @@ export declare const ClusterListResponse: z.ZodObject<{
|
|
|
531
531
|
host: string;
|
|
532
532
|
port: number;
|
|
533
533
|
version: string | null;
|
|
534
|
-
|
|
535
|
-
|
|
534
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
535
|
+
role: "replica" | "primary" | "unknown";
|
|
536
536
|
labels: Record<string, string>;
|
|
537
537
|
cluster_id: string | null;
|
|
538
538
|
instance_id: string;
|
|
@@ -544,8 +544,8 @@ export declare const ClusterListResponse: z.ZodObject<{
|
|
|
544
544
|
host: string;
|
|
545
545
|
port: number;
|
|
546
546
|
version: string | null;
|
|
547
|
-
|
|
548
|
-
|
|
547
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
548
|
+
role: "replica" | "primary" | "unknown";
|
|
549
549
|
labels: Record<string, string>;
|
|
550
550
|
cluster_id: string | null;
|
|
551
551
|
instance_id: string;
|
|
@@ -571,8 +571,8 @@ export declare const ClusterListResponse: z.ZodObject<{
|
|
|
571
571
|
host: string;
|
|
572
572
|
port: number;
|
|
573
573
|
version: string | null;
|
|
574
|
-
|
|
575
|
-
|
|
574
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
575
|
+
role: "replica" | "primary" | "unknown";
|
|
576
576
|
labels: Record<string, string>;
|
|
577
577
|
cluster_id: string | null;
|
|
578
578
|
instance_id: string;
|
|
@@ -584,8 +584,8 @@ export declare const ClusterListResponse: z.ZodObject<{
|
|
|
584
584
|
host: string;
|
|
585
585
|
port: number;
|
|
586
586
|
version: string | null;
|
|
587
|
-
|
|
588
|
-
|
|
587
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
588
|
+
role: "replica" | "primary" | "unknown";
|
|
589
589
|
labels: Record<string, string>;
|
|
590
590
|
cluster_id: string | null;
|
|
591
591
|
instance_id: string;
|
|
@@ -600,12 +600,13 @@ export declare const ClusterListResponse: z.ZodObject<{
|
|
|
600
600
|
updated_at: z.ZodDate;
|
|
601
601
|
}, "strip", z.ZodTypeAny, {
|
|
602
602
|
name: string;
|
|
603
|
+
description: string | null;
|
|
603
604
|
primary: {
|
|
604
605
|
host: string;
|
|
605
606
|
port: number;
|
|
606
607
|
version: string | null;
|
|
607
|
-
|
|
608
|
-
|
|
608
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
609
|
+
role: "replica" | "primary" | "unknown";
|
|
609
610
|
labels: Record<string, string>;
|
|
610
611
|
cluster_id: string | null;
|
|
611
612
|
instance_id: string;
|
|
@@ -618,8 +619,8 @@ export declare const ClusterListResponse: z.ZodObject<{
|
|
|
618
619
|
host: string;
|
|
619
620
|
port: number;
|
|
620
621
|
version: string | null;
|
|
621
|
-
|
|
622
|
-
|
|
622
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
623
|
+
role: "replica" | "primary" | "unknown";
|
|
623
624
|
labels: Record<string, string>;
|
|
624
625
|
cluster_id: string | null;
|
|
625
626
|
instance_id: string;
|
|
@@ -628,20 +629,20 @@ export declare const ClusterListResponse: z.ZodObject<{
|
|
|
628
629
|
last_seen: Date;
|
|
629
630
|
created_at: Date;
|
|
630
631
|
}[];
|
|
631
|
-
description: string | null;
|
|
632
632
|
cluster_id: string;
|
|
633
633
|
created_at: Date;
|
|
634
634
|
instance_count: number;
|
|
635
|
-
health_status: "unknown" | "healthy" | "
|
|
635
|
+
health_status: "unknown" | "healthy" | "unhealthy" | "degraded";
|
|
636
636
|
updated_at: Date;
|
|
637
637
|
}, {
|
|
638
638
|
name: string;
|
|
639
|
+
description: string | null;
|
|
639
640
|
primary: {
|
|
640
641
|
host: string;
|
|
641
642
|
port: number;
|
|
642
643
|
version: string | null;
|
|
643
|
-
|
|
644
|
-
|
|
644
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
645
|
+
role: "replica" | "primary" | "unknown";
|
|
645
646
|
labels: Record<string, string>;
|
|
646
647
|
cluster_id: string | null;
|
|
647
648
|
instance_id: string;
|
|
@@ -654,8 +655,8 @@ export declare const ClusterListResponse: z.ZodObject<{
|
|
|
654
655
|
host: string;
|
|
655
656
|
port: number;
|
|
656
657
|
version: string | null;
|
|
657
|
-
|
|
658
|
-
|
|
658
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
659
|
+
role: "replica" | "primary" | "unknown";
|
|
659
660
|
labels: Record<string, string>;
|
|
660
661
|
cluster_id: string | null;
|
|
661
662
|
instance_id: string;
|
|
@@ -664,28 +665,27 @@ export declare const ClusterListResponse: z.ZodObject<{
|
|
|
664
665
|
last_seen: Date;
|
|
665
666
|
created_at: Date;
|
|
666
667
|
}[];
|
|
667
|
-
description: string | null;
|
|
668
668
|
cluster_id: string;
|
|
669
669
|
created_at: Date;
|
|
670
670
|
instance_count: number;
|
|
671
|
-
health_status: "unknown" | "healthy" | "
|
|
671
|
+
health_status: "unknown" | "healthy" | "unhealthy" | "degraded";
|
|
672
672
|
updated_at: Date;
|
|
673
673
|
}>, "many">;
|
|
674
674
|
total: z.ZodNumber;
|
|
675
675
|
page: z.ZodNumber;
|
|
676
676
|
page_size: z.ZodNumber;
|
|
677
677
|
}, "strip", z.ZodTypeAny, {
|
|
678
|
-
total: number;
|
|
679
678
|
page: number;
|
|
680
679
|
page_size: number;
|
|
681
680
|
items: {
|
|
682
681
|
name: string;
|
|
682
|
+
description: string | null;
|
|
683
683
|
primary: {
|
|
684
684
|
host: string;
|
|
685
685
|
port: number;
|
|
686
686
|
version: string | null;
|
|
687
|
-
|
|
688
|
-
|
|
687
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
688
|
+
role: "replica" | "primary" | "unknown";
|
|
689
689
|
labels: Record<string, string>;
|
|
690
690
|
cluster_id: string | null;
|
|
691
691
|
instance_id: string;
|
|
@@ -698,8 +698,8 @@ export declare const ClusterListResponse: z.ZodObject<{
|
|
|
698
698
|
host: string;
|
|
699
699
|
port: number;
|
|
700
700
|
version: string | null;
|
|
701
|
-
|
|
702
|
-
|
|
701
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
702
|
+
role: "replica" | "primary" | "unknown";
|
|
703
703
|
labels: Record<string, string>;
|
|
704
704
|
cluster_id: string | null;
|
|
705
705
|
instance_id: string;
|
|
@@ -708,25 +708,25 @@ export declare const ClusterListResponse: z.ZodObject<{
|
|
|
708
708
|
last_seen: Date;
|
|
709
709
|
created_at: Date;
|
|
710
710
|
}[];
|
|
711
|
-
description: string | null;
|
|
712
711
|
cluster_id: string;
|
|
713
712
|
created_at: Date;
|
|
714
713
|
instance_count: number;
|
|
715
|
-
health_status: "unknown" | "healthy" | "
|
|
714
|
+
health_status: "unknown" | "healthy" | "unhealthy" | "degraded";
|
|
716
715
|
updated_at: Date;
|
|
717
716
|
}[];
|
|
718
|
-
}, {
|
|
719
717
|
total: number;
|
|
718
|
+
}, {
|
|
720
719
|
page: number;
|
|
721
720
|
page_size: number;
|
|
722
721
|
items: {
|
|
723
722
|
name: string;
|
|
723
|
+
description: string | null;
|
|
724
724
|
primary: {
|
|
725
725
|
host: string;
|
|
726
726
|
port: number;
|
|
727
727
|
version: string | null;
|
|
728
|
-
|
|
729
|
-
|
|
728
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
729
|
+
role: "replica" | "primary" | "unknown";
|
|
730
730
|
labels: Record<string, string>;
|
|
731
731
|
cluster_id: string | null;
|
|
732
732
|
instance_id: string;
|
|
@@ -739,8 +739,8 @@ export declare const ClusterListResponse: z.ZodObject<{
|
|
|
739
739
|
host: string;
|
|
740
740
|
port: number;
|
|
741
741
|
version: string | null;
|
|
742
|
-
|
|
743
|
-
|
|
742
|
+
state: "offline" | "maintenance" | "failed" | "online" | "recovering";
|
|
743
|
+
role: "replica" | "primary" | "unknown";
|
|
744
744
|
labels: Record<string, string>;
|
|
745
745
|
cluster_id: string | null;
|
|
746
746
|
instance_id: string;
|
|
@@ -749,13 +749,13 @@ export declare const ClusterListResponse: z.ZodObject<{
|
|
|
749
749
|
last_seen: Date;
|
|
750
750
|
created_at: Date;
|
|
751
751
|
}[];
|
|
752
|
-
description: string | null;
|
|
753
752
|
cluster_id: string;
|
|
754
753
|
created_at: Date;
|
|
755
754
|
instance_count: number;
|
|
756
|
-
health_status: "unknown" | "healthy" | "
|
|
755
|
+
health_status: "unknown" | "healthy" | "unhealthy" | "degraded";
|
|
757
756
|
updated_at: Date;
|
|
758
757
|
}[];
|
|
758
|
+
total: number;
|
|
759
759
|
}>;
|
|
760
760
|
export declare const FailoverStateSchema: z.ZodEnum<["idle", "detecting", "candidate_selection", "promoting", "reconfiguring", "completed", "failed"]>;
|
|
761
761
|
export declare const FailoverRequest: z.ZodObject<{
|
|
@@ -784,31 +784,31 @@ export declare const FailoverOperationResponse: z.ZodObject<{
|
|
|
784
784
|
triggered_by: z.ZodNullable<z.ZodString>;
|
|
785
785
|
}, "strip", z.ZodTypeAny, {
|
|
786
786
|
error: string | null;
|
|
787
|
-
state: "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring"
|
|
788
|
-
steps: string[];
|
|
789
|
-
manual: boolean;
|
|
787
|
+
state: "completed" | "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring";
|
|
790
788
|
reason: string | null;
|
|
791
789
|
cluster_id: string;
|
|
792
790
|
operation_id: string;
|
|
791
|
+
manual: boolean;
|
|
793
792
|
started_at: string | null;
|
|
794
793
|
completed_at: string | null;
|
|
795
794
|
old_primary_id: string | null;
|
|
796
795
|
new_primary_id: string | null;
|
|
797
796
|
duration_seconds: number | null;
|
|
797
|
+
steps: string[];
|
|
798
798
|
triggered_by: string | null;
|
|
799
799
|
}, {
|
|
800
800
|
error: string | null;
|
|
801
|
-
state: "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring"
|
|
802
|
-
steps: string[];
|
|
803
|
-
manual: boolean;
|
|
801
|
+
state: "completed" | "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring";
|
|
804
802
|
reason: string | null;
|
|
805
803
|
cluster_id: string;
|
|
806
804
|
operation_id: string;
|
|
805
|
+
manual: boolean;
|
|
807
806
|
started_at: string | null;
|
|
808
807
|
completed_at: string | null;
|
|
809
808
|
old_primary_id: string | null;
|
|
810
809
|
new_primary_id: string | null;
|
|
811
810
|
duration_seconds: number | null;
|
|
811
|
+
steps: string[];
|
|
812
812
|
triggered_by: string | null;
|
|
813
813
|
}>;
|
|
814
814
|
export declare const FailoverListResponse: z.ZodObject<{
|
|
@@ -828,68 +828,68 @@ export declare const FailoverListResponse: z.ZodObject<{
|
|
|
828
828
|
triggered_by: z.ZodNullable<z.ZodString>;
|
|
829
829
|
}, "strip", z.ZodTypeAny, {
|
|
830
830
|
error: string | null;
|
|
831
|
-
state: "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring"
|
|
832
|
-
steps: string[];
|
|
833
|
-
manual: boolean;
|
|
831
|
+
state: "completed" | "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring";
|
|
834
832
|
reason: string | null;
|
|
835
833
|
cluster_id: string;
|
|
836
834
|
operation_id: string;
|
|
835
|
+
manual: boolean;
|
|
837
836
|
started_at: string | null;
|
|
838
837
|
completed_at: string | null;
|
|
839
838
|
old_primary_id: string | null;
|
|
840
839
|
new_primary_id: string | null;
|
|
841
840
|
duration_seconds: number | null;
|
|
841
|
+
steps: string[];
|
|
842
842
|
triggered_by: string | null;
|
|
843
843
|
}, {
|
|
844
844
|
error: string | null;
|
|
845
|
-
state: "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring"
|
|
846
|
-
steps: string[];
|
|
847
|
-
manual: boolean;
|
|
845
|
+
state: "completed" | "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring";
|
|
848
846
|
reason: string | null;
|
|
849
847
|
cluster_id: string;
|
|
850
848
|
operation_id: string;
|
|
849
|
+
manual: boolean;
|
|
851
850
|
started_at: string | null;
|
|
852
851
|
completed_at: string | null;
|
|
853
852
|
old_primary_id: string | null;
|
|
854
853
|
new_primary_id: string | null;
|
|
855
854
|
duration_seconds: number | null;
|
|
855
|
+
steps: string[];
|
|
856
856
|
triggered_by: string | null;
|
|
857
857
|
}>, "many">;
|
|
858
858
|
total: z.ZodNumber;
|
|
859
859
|
}, "strip", z.ZodTypeAny, {
|
|
860
|
-
total: number;
|
|
861
860
|
items: {
|
|
862
861
|
error: string | null;
|
|
863
|
-
state: "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring"
|
|
864
|
-
steps: string[];
|
|
865
|
-
manual: boolean;
|
|
862
|
+
state: "completed" | "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring";
|
|
866
863
|
reason: string | null;
|
|
867
864
|
cluster_id: string;
|
|
868
865
|
operation_id: string;
|
|
866
|
+
manual: boolean;
|
|
869
867
|
started_at: string | null;
|
|
870
868
|
completed_at: string | null;
|
|
871
869
|
old_primary_id: string | null;
|
|
872
870
|
new_primary_id: string | null;
|
|
873
871
|
duration_seconds: number | null;
|
|
872
|
+
steps: string[];
|
|
874
873
|
triggered_by: string | null;
|
|
875
874
|
}[];
|
|
876
|
-
}, {
|
|
877
875
|
total: number;
|
|
876
|
+
}, {
|
|
878
877
|
items: {
|
|
879
878
|
error: string | null;
|
|
880
|
-
state: "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring"
|
|
881
|
-
steps: string[];
|
|
882
|
-
manual: boolean;
|
|
879
|
+
state: "completed" | "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring";
|
|
883
880
|
reason: string | null;
|
|
884
881
|
cluster_id: string;
|
|
885
882
|
operation_id: string;
|
|
883
|
+
manual: boolean;
|
|
886
884
|
started_at: string | null;
|
|
887
885
|
completed_at: string | null;
|
|
888
886
|
old_primary_id: string | null;
|
|
889
887
|
new_primary_id: string | null;
|
|
890
888
|
duration_seconds: number | null;
|
|
889
|
+
steps: string[];
|
|
891
890
|
triggered_by: string | null;
|
|
892
891
|
}[];
|
|
892
|
+
total: number;
|
|
893
893
|
}>;
|
|
894
894
|
export declare const HealthStatusResponse: z.ZodObject<{
|
|
895
895
|
status: z.ZodEnum<["healthy", "unhealthy"]>;
|
|
@@ -924,7 +924,7 @@ export declare const MonitoringHealthResponse: z.ZodObject<{
|
|
|
924
924
|
}>;
|
|
925
925
|
timestamp: z.ZodDate;
|
|
926
926
|
}, "strip", z.ZodTypeAny, {
|
|
927
|
-
status: "healthy" | "
|
|
927
|
+
status: "healthy" | "unhealthy" | "degraded";
|
|
928
928
|
timestamp: Date;
|
|
929
929
|
services: {
|
|
930
930
|
orchestrator: "healthy" | "unhealthy";
|
|
@@ -933,7 +933,7 @@ export declare const MonitoringHealthResponse: z.ZodObject<{
|
|
|
933
933
|
api: "healthy" | "unhealthy";
|
|
934
934
|
};
|
|
935
935
|
}, {
|
|
936
|
-
status: "healthy" | "
|
|
936
|
+
status: "healthy" | "unhealthy" | "degraded";
|
|
937
937
|
timestamp: Date;
|
|
938
938
|
services: {
|
|
939
939
|
orchestrator: "healthy" | "unhealthy";
|
|
@@ -4,11 +4,44 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
STATE_DIR="
|
|
7
|
+
# Determine state directory - use OPENCLAW_STATE_DIR or default
|
|
8
|
+
STATE_DIR="${OPENCLAW_STATE_DIR:-/data/state}"
|
|
9
|
+
WORKSPACE_DIR="${OPENCLAW_WORKSPACE_DIR:-/data/workspace}"
|
|
10
|
+
CONFIG_FILE="${STATE_DIR}/openclaw.json"
|
|
11
|
+
|
|
12
|
+
# Ensure directories exist with proper error handling
|
|
13
|
+
# Docker volumes may have root ownership when first created,
|
|
14
|
+
# but containers often run as non-root users
|
|
15
|
+
ensure_dir() {
|
|
16
|
+
local dir="$1"
|
|
17
|
+
if [ ! -d "$dir" ]; then
|
|
18
|
+
mkdir -p "$dir" 2>/dev/null || {
|
|
19
|
+
echo "[openclaw-entrypoint] Warning: Cannot create $dir (permission denied)"
|
|
20
|
+
|
|
21
|
+
local home_state="${HOME:-/tmp}/.openclaw/state"
|
|
22
|
+
local home_workspace="${HOME:-/tmp}/.openclaw/workspace"
|
|
23
|
+
|
|
24
|
+
if [ "$dir" = "$STATE_DIR" ]; then
|
|
25
|
+
echo "[openclaw-entrypoint] Using fallback state directory: $home_state"
|
|
26
|
+
STATE_DIR="$home_state"
|
|
27
|
+
CONFIG_FILE="$STATE_DIR/openclaw.json"
|
|
28
|
+
mkdir -p "$STATE_DIR"
|
|
29
|
+
elif [ "$dir" = "$WORKSPACE_DIR" ]; then
|
|
30
|
+
echo "[openclaw-entrypoint] Using fallback workspace directory: $home_workspace"
|
|
31
|
+
WORKSPACE_DIR="$home_workspace"
|
|
32
|
+
mkdir -p "$WORKSPACE_DIR"
|
|
33
|
+
fi
|
|
34
|
+
}
|
|
35
|
+
fi
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
ensure_dir "$STATE_DIR"
|
|
39
|
+
ensure_dir "$WORKSPACE_DIR"
|
|
9
40
|
|
|
10
|
-
#
|
|
11
|
-
|
|
41
|
+
# Export updated directories in case fallback was used
|
|
42
|
+
# This ensures openclaw.mjs uses the correct paths
|
|
43
|
+
export OPENCLAW_STATE_DIR="$STATE_DIR"
|
|
44
|
+
export OPENCLAW_WORKSPACE_DIR="$WORKSPACE_DIR"
|
|
12
45
|
|
|
13
46
|
# Check if we need to run initial configuration
|
|
14
47
|
if [ ! -f "$CONFIG_FILE" ]; then
|
|
@@ -17,6 +17,8 @@ services:
|
|
|
17
17
|
ports:
|
|
18
18
|
- "18789:18789" # Gateway WebSocket port
|
|
19
19
|
- "18790:18790" # Control UI port
|
|
20
|
+
# Note: Named volumes may have permission issues if container runs as non-root.
|
|
21
|
+
# The entrypoint.sh handles this by falling back to user-writeable directories.
|
|
20
22
|
environment:
|
|
21
23
|
- OPENCLAW_GATEWAY_PORT=18789
|
|
22
24
|
- OPENCLAW_GATEWAY_TOKEN=${OPENCLAW_GATEWAY_TOKEN:-clawsql-openclaw-token}
|
|
@@ -24,6 +26,7 @@ services:
|
|
|
24
26
|
- OPENCLAW_WORKSPACE_DIR=/data/workspace
|
|
25
27
|
volumes:
|
|
26
28
|
- openclaw-data:/data
|
|
29
|
+
- ./openclaw/entrypoint.sh:/entrypoint.sh:ro
|
|
27
30
|
restart: unless-stopped
|
|
28
31
|
healthcheck:
|
|
29
32
|
test: ["CMD-SHELL", "curl -f http://localhost:18789/health || exit 1"]
|
package/docker-compose.yml
CHANGED
|
@@ -20,6 +20,12 @@ services:
|
|
|
20
20
|
hostname: openclaw
|
|
21
21
|
network_mode: host
|
|
22
22
|
entrypoint: ["/bin/bash", "/entrypoint.sh"]
|
|
23
|
+
# Note: Named volumes may have permission issues if container runs as non-root.
|
|
24
|
+
# The entrypoint.sh handles this by falling back to user-writeable directories.
|
|
25
|
+
# Alternatively, uncomment the tmpfs mounts below for ephemeral storage:
|
|
26
|
+
# tmpfs:
|
|
27
|
+
# - /data/state
|
|
28
|
+
# - /data/workspace
|
|
23
29
|
environment:
|
|
24
30
|
- OPENCLAW_GATEWAY_PORT=18789
|
|
25
31
|
- OPENCLAW_GATEWAY_TOKEN=${OPENCLAW_GATEWAY_TOKEN:-clawsql-openclaw-token}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawsql",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "MySQL Cluster Automation and Operations Management System",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"mysql2": "^3.11.0",
|
|
46
46
|
"ora": "^9.3.0",
|
|
47
47
|
"pino": "^9.0.0",
|
|
48
|
+
"pino-pretty": "^11.0.0",
|
|
48
49
|
"prom-client": "^15.1.3",
|
|
49
50
|
"uuid": "^9.0.1",
|
|
50
51
|
"zod": "^3.23.8"
|
|
@@ -58,7 +59,6 @@
|
|
|
58
59
|
"@typescript-eslint/parser": "^7.0.0",
|
|
59
60
|
"eslint": "^8.57.0",
|
|
60
61
|
"jest": "^29.7.0",
|
|
61
|
-
"pino-pretty": "^11.0.0",
|
|
62
62
|
"ts-jest": "^29.1.4",
|
|
63
63
|
"ts-node": "^10.9.2",
|
|
64
64
|
"ts-node-dev": "^2.0.0",
|