@sema-agent/settings-schema 6.0.0 → 6.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.
- package/CHANGELOG.md +278 -0
- package/README.md +62 -5
- package/conformance/VERSION +1 -1
- package/conformance/cases/c01-entry-salvage-then-typo/expected.json +3 -0
- package/conformance/cases/c02-hosts-clamp-stacked/expected.json +3 -0
- package/conformance/cases/c23-mixed-validity-models/expected.json +3 -0
- package/conformance/cases/c40-s712-identity-only-what-reads-out/expected.json +166 -0
- package/conformance/cases/c40-s712-identity-only-what-reads-out/input.json +64 -0
- package/conformance/cases/c40-s712-identity-only-what-reads-out/meta.json +13 -0
- package/conformance/cases/cli01-model-name-nfc-vs-nfd/expected.json +8 -0
- package/conformance/cases/cli02-control-and-zero-width-chars/expected.json +8 -0
- package/conformance/cases/t04-secret-literal-never-in-warning-value/expected.json +4 -0
- package/dist/api/auth-bridge.d.ts +2 -2
- package/dist/center-credential.d.ts +116 -0
- package/dist/center-credential.js +149 -0
- package/dist/config-fns.d.ts +52 -3
- package/dist/config-fns.js +78 -8
- package/dist/conformance/types.d.ts +6 -1
- package/dist/conformance/warnings.js +9 -2
- package/dist/fleet.d.ts +260 -8
- package/dist/fleet.js +167 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/types.d.ts +72 -66
- package/dist/types.js +7 -1
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
* `ENV_NAME` schema (regex) on every `*Env` field — a pasted secret value is rejected, not just discouraged.
|
|
17
17
|
*/
|
|
18
18
|
import { z } from "zod";
|
|
19
|
+
/** A private-key PEM header (`-----BEGIN [RSA |EC |OPENSSH |ENCRYPTED ]PRIVATE KEY`), unanchored — the ONE definition
|
|
20
|
+
* of that shape: {@link SECRET_LITERAL_RE} is composed from it (anchored, as one of its branches), and
|
|
21
|
+
* `redactSecrets` (config-fns) tests it ANYWHERE in a string. It carries spaces, so the token-splitting detector
|
|
22
|
+
* {@link containsSecretToken} only sees it at the very start of a string; a PEM behind a newline or a `key: ` prefix
|
|
23
|
+
* slipped past (S-712 codex review [high]). Public keys / certificates never match (see above). */
|
|
24
|
+
export declare const PRIVATE_KEY_PEM_HEADER: RegExp;
|
|
19
25
|
export declare const SECRET_LITERAL_RE: RegExp;
|
|
20
26
|
export declare const ENV_NAME: z.ZodEffects<z.ZodString, string, string>;
|
|
21
27
|
/** A NUL byte in a string the consumer feeds to spawn()/fs is a FAIL-OPEN config: it validates+persists here
|
|
@@ -416,14 +422,14 @@ export declare const TierBindings: z.ZodObject<{
|
|
|
416
422
|
flash: z.ZodOptional<z.ZodString>;
|
|
417
423
|
lite: z.ZodOptional<z.ZodString>;
|
|
418
424
|
}, "strip", z.ZodTypeAny, {
|
|
419
|
-
ultra?: string | undefined;
|
|
420
425
|
max?: string | undefined;
|
|
426
|
+
ultra?: string | undefined;
|
|
421
427
|
pro?: string | undefined;
|
|
422
428
|
flash?: string | undefined;
|
|
423
429
|
lite?: string | undefined;
|
|
424
430
|
}, {
|
|
425
|
-
ultra?: string | undefined;
|
|
426
431
|
max?: string | undefined;
|
|
432
|
+
ultra?: string | undefined;
|
|
427
433
|
pro?: string | undefined;
|
|
428
434
|
flash?: string | undefined;
|
|
429
435
|
lite?: string | undefined;
|
|
@@ -440,14 +446,14 @@ export declare const TierGroup: z.ZodObject<{
|
|
|
440
446
|
flash: z.ZodOptional<z.ZodString>;
|
|
441
447
|
lite: z.ZodOptional<z.ZodString>;
|
|
442
448
|
}, "strip", z.ZodTypeAny, {
|
|
443
|
-
ultra?: string | undefined;
|
|
444
449
|
max?: string | undefined;
|
|
450
|
+
ultra?: string | undefined;
|
|
445
451
|
pro?: string | undefined;
|
|
446
452
|
flash?: string | undefined;
|
|
447
453
|
lite?: string | undefined;
|
|
448
454
|
}, {
|
|
449
|
-
ultra?: string | undefined;
|
|
450
455
|
max?: string | undefined;
|
|
456
|
+
ultra?: string | undefined;
|
|
451
457
|
pro?: string | undefined;
|
|
452
458
|
flash?: string | undefined;
|
|
453
459
|
lite?: string | undefined;
|
|
@@ -456,8 +462,8 @@ export declare const TierGroup: z.ZodObject<{
|
|
|
456
462
|
}, "strip", z.ZodTypeAny, {
|
|
457
463
|
name: string;
|
|
458
464
|
tiers: {
|
|
459
|
-
ultra?: string | undefined;
|
|
460
465
|
max?: string | undefined;
|
|
466
|
+
ultra?: string | undefined;
|
|
461
467
|
pro?: string | undefined;
|
|
462
468
|
flash?: string | undefined;
|
|
463
469
|
lite?: string | undefined;
|
|
@@ -467,8 +473,8 @@ export declare const TierGroup: z.ZodObject<{
|
|
|
467
473
|
name: string;
|
|
468
474
|
notes?: string | undefined;
|
|
469
475
|
tiers?: {
|
|
470
|
-
ultra?: string | undefined;
|
|
471
476
|
max?: string | undefined;
|
|
477
|
+
ultra?: string | undefined;
|
|
472
478
|
pro?: string | undefined;
|
|
473
479
|
flash?: string | undefined;
|
|
474
480
|
lite?: string | undefined;
|
|
@@ -758,14 +764,14 @@ export declare const ModelsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
758
764
|
flash: z.ZodOptional<z.ZodString>;
|
|
759
765
|
lite: z.ZodOptional<z.ZodString>;
|
|
760
766
|
}, "strip", z.ZodTypeAny, {
|
|
761
|
-
ultra?: string | undefined;
|
|
762
767
|
max?: string | undefined;
|
|
768
|
+
ultra?: string | undefined;
|
|
763
769
|
pro?: string | undefined;
|
|
764
770
|
flash?: string | undefined;
|
|
765
771
|
lite?: string | undefined;
|
|
766
772
|
}, {
|
|
767
|
-
ultra?: string | undefined;
|
|
768
773
|
max?: string | undefined;
|
|
774
|
+
ultra?: string | undefined;
|
|
769
775
|
pro?: string | undefined;
|
|
770
776
|
flash?: string | undefined;
|
|
771
777
|
lite?: string | undefined;
|
|
@@ -774,8 +780,8 @@ export declare const ModelsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
774
780
|
}, "strip", z.ZodTypeAny, {
|
|
775
781
|
name: string;
|
|
776
782
|
tiers: {
|
|
777
|
-
ultra?: string | undefined;
|
|
778
783
|
max?: string | undefined;
|
|
784
|
+
ultra?: string | undefined;
|
|
779
785
|
pro?: string | undefined;
|
|
780
786
|
flash?: string | undefined;
|
|
781
787
|
lite?: string | undefined;
|
|
@@ -785,8 +791,8 @@ export declare const ModelsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
785
791
|
name: string;
|
|
786
792
|
notes?: string | undefined;
|
|
787
793
|
tiers?: {
|
|
788
|
-
ultra?: string | undefined;
|
|
789
794
|
max?: string | undefined;
|
|
795
|
+
ultra?: string | undefined;
|
|
790
796
|
pro?: string | undefined;
|
|
791
797
|
flash?: string | undefined;
|
|
792
798
|
lite?: string | undefined;
|
|
@@ -840,8 +846,8 @@ export declare const ModelsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
840
846
|
tierGroups: {
|
|
841
847
|
name: string;
|
|
842
848
|
tiers: {
|
|
843
|
-
ultra?: string | undefined;
|
|
844
849
|
max?: string | undefined;
|
|
850
|
+
ultra?: string | undefined;
|
|
845
851
|
pro?: string | undefined;
|
|
846
852
|
flash?: string | undefined;
|
|
847
853
|
lite?: string | undefined;
|
|
@@ -900,8 +906,8 @@ export declare const ModelsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
900
906
|
name: string;
|
|
901
907
|
notes?: string | undefined;
|
|
902
908
|
tiers?: {
|
|
903
|
-
ultra?: string | undefined;
|
|
904
909
|
max?: string | undefined;
|
|
910
|
+
ultra?: string | undefined;
|
|
905
911
|
pro?: string | undefined;
|
|
906
912
|
flash?: string | undefined;
|
|
907
913
|
lite?: string | undefined;
|
|
@@ -954,8 +960,8 @@ export declare const ModelsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
954
960
|
tierGroups: {
|
|
955
961
|
name: string;
|
|
956
962
|
tiers: {
|
|
957
|
-
ultra?: string | undefined;
|
|
958
963
|
max?: string | undefined;
|
|
964
|
+
ultra?: string | undefined;
|
|
959
965
|
pro?: string | undefined;
|
|
960
966
|
flash?: string | undefined;
|
|
961
967
|
lite?: string | undefined;
|
|
@@ -1014,8 +1020,8 @@ export declare const ModelsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
1014
1020
|
name: string;
|
|
1015
1021
|
notes?: string | undefined;
|
|
1016
1022
|
tiers?: {
|
|
1017
|
-
ultra?: string | undefined;
|
|
1018
1023
|
max?: string | undefined;
|
|
1024
|
+
ultra?: string | undefined;
|
|
1019
1025
|
pro?: string | undefined;
|
|
1020
1026
|
flash?: string | undefined;
|
|
1021
1027
|
lite?: string | undefined;
|
|
@@ -7312,13 +7318,13 @@ export declare const McpTransport: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<
|
|
|
7312
7318
|
* env-NAME ref (no secret). Empty → the worker forwards no principal (server sees an anonymous call). */
|
|
7313
7319
|
principalHeader: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
7314
7320
|
}, "strip", z.ZodTypeAny, {
|
|
7315
|
-
kind: "http";
|
|
7316
7321
|
url: string;
|
|
7322
|
+
kind: "http";
|
|
7317
7323
|
headerRefs?: Record<string, string> | undefined;
|
|
7318
7324
|
principalHeader?: string | undefined;
|
|
7319
7325
|
}, {
|
|
7320
|
-
kind: "http";
|
|
7321
7326
|
url: string;
|
|
7327
|
+
kind: "http";
|
|
7322
7328
|
headerRefs?: Record<string, string> | undefined;
|
|
7323
7329
|
principalHeader?: string | undefined;
|
|
7324
7330
|
}>]>;
|
|
@@ -7361,13 +7367,13 @@ export declare const McpServerSpec: z.ZodObject<{
|
|
|
7361
7367
|
* env-NAME ref (no secret). Empty → the worker forwards no principal (server sees an anonymous call). */
|
|
7362
7368
|
principalHeader: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
7363
7369
|
}, "strip", z.ZodTypeAny, {
|
|
7364
|
-
kind: "http";
|
|
7365
7370
|
url: string;
|
|
7371
|
+
kind: "http";
|
|
7366
7372
|
headerRefs?: Record<string, string> | undefined;
|
|
7367
7373
|
principalHeader?: string | undefined;
|
|
7368
7374
|
}, {
|
|
7369
|
-
kind: "http";
|
|
7370
7375
|
url: string;
|
|
7376
|
+
kind: "http";
|
|
7371
7377
|
headerRefs?: Record<string, string> | undefined;
|
|
7372
7378
|
principalHeader?: string | undefined;
|
|
7373
7379
|
}>]>;
|
|
@@ -7431,8 +7437,8 @@ export declare const McpServerSpec: z.ZodObject<{
|
|
|
7431
7437
|
args?: string[] | undefined;
|
|
7432
7438
|
envRefs?: Record<string, string> | undefined;
|
|
7433
7439
|
} | {
|
|
7434
|
-
kind: "http";
|
|
7435
7440
|
url: string;
|
|
7441
|
+
kind: "http";
|
|
7436
7442
|
headerRefs?: Record<string, string> | undefined;
|
|
7437
7443
|
principalHeader?: string | undefined;
|
|
7438
7444
|
};
|
|
@@ -7450,8 +7456,8 @@ export declare const McpServerSpec: z.ZodObject<{
|
|
|
7450
7456
|
args?: string[] | undefined;
|
|
7451
7457
|
envRefs?: Record<string, string> | undefined;
|
|
7452
7458
|
} | {
|
|
7453
|
-
kind: "http";
|
|
7454
7459
|
url: string;
|
|
7460
|
+
kind: "http";
|
|
7455
7461
|
headerRefs?: Record<string, string> | undefined;
|
|
7456
7462
|
principalHeader?: string | undefined;
|
|
7457
7463
|
};
|
|
@@ -7496,13 +7502,13 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7496
7502
|
* env-NAME ref (no secret). Empty → the worker forwards no principal (server sees an anonymous call). */
|
|
7497
7503
|
principalHeader: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
7498
7504
|
}, "strip", z.ZodTypeAny, {
|
|
7499
|
-
kind: "http";
|
|
7500
7505
|
url: string;
|
|
7506
|
+
kind: "http";
|
|
7501
7507
|
headerRefs?: Record<string, string> | undefined;
|
|
7502
7508
|
principalHeader?: string | undefined;
|
|
7503
7509
|
}, {
|
|
7504
|
-
kind: "http";
|
|
7505
7510
|
url: string;
|
|
7511
|
+
kind: "http";
|
|
7506
7512
|
headerRefs?: Record<string, string> | undefined;
|
|
7507
7513
|
principalHeader?: string | undefined;
|
|
7508
7514
|
}>]>;
|
|
@@ -7566,8 +7572,8 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7566
7572
|
args?: string[] | undefined;
|
|
7567
7573
|
envRefs?: Record<string, string> | undefined;
|
|
7568
7574
|
} | {
|
|
7569
|
-
kind: "http";
|
|
7570
7575
|
url: string;
|
|
7576
|
+
kind: "http";
|
|
7571
7577
|
headerRefs?: Record<string, string> | undefined;
|
|
7572
7578
|
principalHeader?: string | undefined;
|
|
7573
7579
|
};
|
|
@@ -7585,8 +7591,8 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7585
7591
|
args?: string[] | undefined;
|
|
7586
7592
|
envRefs?: Record<string, string> | undefined;
|
|
7587
7593
|
} | {
|
|
7588
|
-
kind: "http";
|
|
7589
7594
|
url: string;
|
|
7595
|
+
kind: "http";
|
|
7590
7596
|
headerRefs?: Record<string, string> | undefined;
|
|
7591
7597
|
principalHeader?: string | undefined;
|
|
7592
7598
|
};
|
|
@@ -7612,8 +7618,8 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7612
7618
|
args?: string[] | undefined;
|
|
7613
7619
|
envRefs?: Record<string, string> | undefined;
|
|
7614
7620
|
} | {
|
|
7615
|
-
kind: "http";
|
|
7616
7621
|
url: string;
|
|
7622
|
+
kind: "http";
|
|
7617
7623
|
headerRefs?: Record<string, string> | undefined;
|
|
7618
7624
|
principalHeader?: string | undefined;
|
|
7619
7625
|
};
|
|
@@ -7633,8 +7639,8 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7633
7639
|
args?: string[] | undefined;
|
|
7634
7640
|
envRefs?: Record<string, string> | undefined;
|
|
7635
7641
|
} | {
|
|
7636
|
-
kind: "http";
|
|
7637
7642
|
url: string;
|
|
7643
|
+
kind: "http";
|
|
7638
7644
|
headerRefs?: Record<string, string> | undefined;
|
|
7639
7645
|
principalHeader?: string | undefined;
|
|
7640
7646
|
};
|
|
@@ -7660,8 +7666,8 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7660
7666
|
args?: string[] | undefined;
|
|
7661
7667
|
envRefs?: Record<string, string> | undefined;
|
|
7662
7668
|
} | {
|
|
7663
|
-
kind: "http";
|
|
7664
7669
|
url: string;
|
|
7670
|
+
kind: "http";
|
|
7665
7671
|
headerRefs?: Record<string, string> | undefined;
|
|
7666
7672
|
principalHeader?: string | undefined;
|
|
7667
7673
|
};
|
|
@@ -7681,8 +7687,8 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7681
7687
|
args?: string[] | undefined;
|
|
7682
7688
|
envRefs?: Record<string, string> | undefined;
|
|
7683
7689
|
} | {
|
|
7684
|
-
kind: "http";
|
|
7685
7690
|
url: string;
|
|
7691
|
+
kind: "http";
|
|
7686
7692
|
headerRefs?: Record<string, string> | undefined;
|
|
7687
7693
|
principalHeader?: string | undefined;
|
|
7688
7694
|
};
|
|
@@ -7720,11 +7726,11 @@ export declare const PluginSource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<
|
|
|
7720
7726
|
kind: z.ZodLiteral<"git">;
|
|
7721
7727
|
url: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
|
|
7722
7728
|
}, "strip", z.ZodTypeAny, {
|
|
7723
|
-
kind: "git";
|
|
7724
7729
|
url: string;
|
|
7725
|
-
}, {
|
|
7726
7730
|
kind: "git";
|
|
7731
|
+
}, {
|
|
7727
7732
|
url: string;
|
|
7733
|
+
kind: "git";
|
|
7728
7734
|
}>, z.ZodObject<{
|
|
7729
7735
|
kind: z.ZodLiteral<"marketplace">;
|
|
7730
7736
|
marketplace: z.ZodString;
|
|
@@ -7746,11 +7752,11 @@ export declare const PluginSpec: z.ZodObject<{
|
|
|
7746
7752
|
kind: z.ZodLiteral<"git">;
|
|
7747
7753
|
url: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
|
|
7748
7754
|
}, "strip", z.ZodTypeAny, {
|
|
7749
|
-
kind: "git";
|
|
7750
7755
|
url: string;
|
|
7751
|
-
}, {
|
|
7752
7756
|
kind: "git";
|
|
7757
|
+
}, {
|
|
7753
7758
|
url: string;
|
|
7759
|
+
kind: "git";
|
|
7754
7760
|
}>, z.ZodObject<{
|
|
7755
7761
|
kind: z.ZodLiteral<"marketplace">;
|
|
7756
7762
|
marketplace: z.ZodString;
|
|
@@ -7775,8 +7781,8 @@ export declare const PluginSpec: z.ZodObject<{
|
|
|
7775
7781
|
name: string;
|
|
7776
7782
|
enabled: boolean;
|
|
7777
7783
|
source: {
|
|
7778
|
-
kind: "git";
|
|
7779
7784
|
url: string;
|
|
7785
|
+
kind: "git";
|
|
7780
7786
|
} | {
|
|
7781
7787
|
kind: "marketplace";
|
|
7782
7788
|
marketplace: string;
|
|
@@ -7788,8 +7794,8 @@ export declare const PluginSpec: z.ZodObject<{
|
|
|
7788
7794
|
}, {
|
|
7789
7795
|
name: string;
|
|
7790
7796
|
source: {
|
|
7791
|
-
kind: "git";
|
|
7792
7797
|
url: string;
|
|
7798
|
+
kind: "git";
|
|
7793
7799
|
} | {
|
|
7794
7800
|
kind: "marketplace";
|
|
7795
7801
|
marketplace: string;
|
|
@@ -7809,11 +7815,11 @@ export declare const PluginsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7809
7815
|
kind: z.ZodLiteral<"git">;
|
|
7810
7816
|
url: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
|
|
7811
7817
|
}, "strip", z.ZodTypeAny, {
|
|
7812
|
-
kind: "git";
|
|
7813
7818
|
url: string;
|
|
7814
|
-
}, {
|
|
7815
7819
|
kind: "git";
|
|
7820
|
+
}, {
|
|
7816
7821
|
url: string;
|
|
7822
|
+
kind: "git";
|
|
7817
7823
|
}>, z.ZodObject<{
|
|
7818
7824
|
kind: z.ZodLiteral<"marketplace">;
|
|
7819
7825
|
marketplace: z.ZodString;
|
|
@@ -7838,8 +7844,8 @@ export declare const PluginsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7838
7844
|
name: string;
|
|
7839
7845
|
enabled: boolean;
|
|
7840
7846
|
source: {
|
|
7841
|
-
kind: "git";
|
|
7842
7847
|
url: string;
|
|
7848
|
+
kind: "git";
|
|
7843
7849
|
} | {
|
|
7844
7850
|
kind: "marketplace";
|
|
7845
7851
|
marketplace: string;
|
|
@@ -7851,8 +7857,8 @@ export declare const PluginsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7851
7857
|
}, {
|
|
7852
7858
|
name: string;
|
|
7853
7859
|
source: {
|
|
7854
|
-
kind: "git";
|
|
7855
7860
|
url: string;
|
|
7861
|
+
kind: "git";
|
|
7856
7862
|
} | {
|
|
7857
7863
|
kind: "marketplace";
|
|
7858
7864
|
marketplace: string;
|
|
@@ -7868,8 +7874,8 @@ export declare const PluginsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7868
7874
|
name: string;
|
|
7869
7875
|
enabled: boolean;
|
|
7870
7876
|
source: {
|
|
7871
|
-
kind: "git";
|
|
7872
7877
|
url: string;
|
|
7878
|
+
kind: "git";
|
|
7873
7879
|
} | {
|
|
7874
7880
|
kind: "marketplace";
|
|
7875
7881
|
marketplace: string;
|
|
@@ -7883,8 +7889,8 @@ export declare const PluginsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7883
7889
|
plugins?: {
|
|
7884
7890
|
name: string;
|
|
7885
7891
|
source: {
|
|
7886
|
-
kind: "git";
|
|
7887
7892
|
url: string;
|
|
7893
|
+
kind: "git";
|
|
7888
7894
|
} | {
|
|
7889
7895
|
kind: "marketplace";
|
|
7890
7896
|
marketplace: string;
|
|
@@ -7900,8 +7906,8 @@ export declare const PluginsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7900
7906
|
name: string;
|
|
7901
7907
|
enabled: boolean;
|
|
7902
7908
|
source: {
|
|
7903
|
-
kind: "git";
|
|
7904
7909
|
url: string;
|
|
7910
|
+
kind: "git";
|
|
7905
7911
|
} | {
|
|
7906
7912
|
kind: "marketplace";
|
|
7907
7913
|
marketplace: string;
|
|
@@ -7915,8 +7921,8 @@ export declare const PluginsConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7915
7921
|
plugins?: {
|
|
7916
7922
|
name: string;
|
|
7917
7923
|
source: {
|
|
7918
|
-
kind: "git";
|
|
7919
7924
|
url: string;
|
|
7925
|
+
kind: "git";
|
|
7920
7926
|
} | {
|
|
7921
7927
|
kind: "marketplace";
|
|
7922
7928
|
marketplace: string;
|
|
@@ -9674,14 +9680,14 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
9674
9680
|
flash: z.ZodOptional<z.ZodString>;
|
|
9675
9681
|
lite: z.ZodOptional<z.ZodString>;
|
|
9676
9682
|
}, "strip", z.ZodTypeAny, {
|
|
9677
|
-
ultra?: string | undefined;
|
|
9678
9683
|
max?: string | undefined;
|
|
9684
|
+
ultra?: string | undefined;
|
|
9679
9685
|
pro?: string | undefined;
|
|
9680
9686
|
flash?: string | undefined;
|
|
9681
9687
|
lite?: string | undefined;
|
|
9682
9688
|
}, {
|
|
9683
|
-
ultra?: string | undefined;
|
|
9684
9689
|
max?: string | undefined;
|
|
9690
|
+
ultra?: string | undefined;
|
|
9685
9691
|
pro?: string | undefined;
|
|
9686
9692
|
flash?: string | undefined;
|
|
9687
9693
|
lite?: string | undefined;
|
|
@@ -9690,8 +9696,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
9690
9696
|
}, "strip", z.ZodTypeAny, {
|
|
9691
9697
|
name: string;
|
|
9692
9698
|
tiers: {
|
|
9693
|
-
ultra?: string | undefined;
|
|
9694
9699
|
max?: string | undefined;
|
|
9700
|
+
ultra?: string | undefined;
|
|
9695
9701
|
pro?: string | undefined;
|
|
9696
9702
|
flash?: string | undefined;
|
|
9697
9703
|
lite?: string | undefined;
|
|
@@ -9701,8 +9707,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
9701
9707
|
name: string;
|
|
9702
9708
|
notes?: string | undefined;
|
|
9703
9709
|
tiers?: {
|
|
9704
|
-
ultra?: string | undefined;
|
|
9705
9710
|
max?: string | undefined;
|
|
9711
|
+
ultra?: string | undefined;
|
|
9706
9712
|
pro?: string | undefined;
|
|
9707
9713
|
flash?: string | undefined;
|
|
9708
9714
|
lite?: string | undefined;
|
|
@@ -9756,8 +9762,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
9756
9762
|
tierGroups: {
|
|
9757
9763
|
name: string;
|
|
9758
9764
|
tiers: {
|
|
9759
|
-
ultra?: string | undefined;
|
|
9760
9765
|
max?: string | undefined;
|
|
9766
|
+
ultra?: string | undefined;
|
|
9761
9767
|
pro?: string | undefined;
|
|
9762
9768
|
flash?: string | undefined;
|
|
9763
9769
|
lite?: string | undefined;
|
|
@@ -9816,8 +9822,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
9816
9822
|
name: string;
|
|
9817
9823
|
notes?: string | undefined;
|
|
9818
9824
|
tiers?: {
|
|
9819
|
-
ultra?: string | undefined;
|
|
9820
9825
|
max?: string | undefined;
|
|
9826
|
+
ultra?: string | undefined;
|
|
9821
9827
|
pro?: string | undefined;
|
|
9822
9828
|
flash?: string | undefined;
|
|
9823
9829
|
lite?: string | undefined;
|
|
@@ -9870,8 +9876,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
9870
9876
|
tierGroups: {
|
|
9871
9877
|
name: string;
|
|
9872
9878
|
tiers: {
|
|
9873
|
-
ultra?: string | undefined;
|
|
9874
9879
|
max?: string | undefined;
|
|
9880
|
+
ultra?: string | undefined;
|
|
9875
9881
|
pro?: string | undefined;
|
|
9876
9882
|
flash?: string | undefined;
|
|
9877
9883
|
lite?: string | undefined;
|
|
@@ -9930,8 +9936,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
9930
9936
|
name: string;
|
|
9931
9937
|
notes?: string | undefined;
|
|
9932
9938
|
tiers?: {
|
|
9933
|
-
ultra?: string | undefined;
|
|
9934
9939
|
max?: string | undefined;
|
|
9940
|
+
ultra?: string | undefined;
|
|
9935
9941
|
pro?: string | undefined;
|
|
9936
9942
|
flash?: string | undefined;
|
|
9937
9943
|
lite?: string | undefined;
|
|
@@ -10199,13 +10205,13 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10199
10205
|
* env-NAME ref (no secret). Empty → the worker forwards no principal (server sees an anonymous call). */
|
|
10200
10206
|
principalHeader: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
10201
10207
|
}, "strip", z.ZodTypeAny, {
|
|
10202
|
-
kind: "http";
|
|
10203
10208
|
url: string;
|
|
10209
|
+
kind: "http";
|
|
10204
10210
|
headerRefs?: Record<string, string> | undefined;
|
|
10205
10211
|
principalHeader?: string | undefined;
|
|
10206
10212
|
}, {
|
|
10207
|
-
kind: "http";
|
|
10208
10213
|
url: string;
|
|
10214
|
+
kind: "http";
|
|
10209
10215
|
headerRefs?: Record<string, string> | undefined;
|
|
10210
10216
|
principalHeader?: string | undefined;
|
|
10211
10217
|
}>]>;
|
|
@@ -10269,8 +10275,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10269
10275
|
args?: string[] | undefined;
|
|
10270
10276
|
envRefs?: Record<string, string> | undefined;
|
|
10271
10277
|
} | {
|
|
10272
|
-
kind: "http";
|
|
10273
10278
|
url: string;
|
|
10279
|
+
kind: "http";
|
|
10274
10280
|
headerRefs?: Record<string, string> | undefined;
|
|
10275
10281
|
principalHeader?: string | undefined;
|
|
10276
10282
|
};
|
|
@@ -10288,8 +10294,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10288
10294
|
args?: string[] | undefined;
|
|
10289
10295
|
envRefs?: Record<string, string> | undefined;
|
|
10290
10296
|
} | {
|
|
10291
|
-
kind: "http";
|
|
10292
10297
|
url: string;
|
|
10298
|
+
kind: "http";
|
|
10293
10299
|
headerRefs?: Record<string, string> | undefined;
|
|
10294
10300
|
principalHeader?: string | undefined;
|
|
10295
10301
|
};
|
|
@@ -10315,8 +10321,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10315
10321
|
args?: string[] | undefined;
|
|
10316
10322
|
envRefs?: Record<string, string> | undefined;
|
|
10317
10323
|
} | {
|
|
10318
|
-
kind: "http";
|
|
10319
10324
|
url: string;
|
|
10325
|
+
kind: "http";
|
|
10320
10326
|
headerRefs?: Record<string, string> | undefined;
|
|
10321
10327
|
principalHeader?: string | undefined;
|
|
10322
10328
|
};
|
|
@@ -10336,8 +10342,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10336
10342
|
args?: string[] | undefined;
|
|
10337
10343
|
envRefs?: Record<string, string> | undefined;
|
|
10338
10344
|
} | {
|
|
10339
|
-
kind: "http";
|
|
10340
10345
|
url: string;
|
|
10346
|
+
kind: "http";
|
|
10341
10347
|
headerRefs?: Record<string, string> | undefined;
|
|
10342
10348
|
principalHeader?: string | undefined;
|
|
10343
10349
|
};
|
|
@@ -10363,8 +10369,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10363
10369
|
args?: string[] | undefined;
|
|
10364
10370
|
envRefs?: Record<string, string> | undefined;
|
|
10365
10371
|
} | {
|
|
10366
|
-
kind: "http";
|
|
10367
10372
|
url: string;
|
|
10373
|
+
kind: "http";
|
|
10368
10374
|
headerRefs?: Record<string, string> | undefined;
|
|
10369
10375
|
principalHeader?: string | undefined;
|
|
10370
10376
|
};
|
|
@@ -10384,8 +10390,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10384
10390
|
args?: string[] | undefined;
|
|
10385
10391
|
envRefs?: Record<string, string> | undefined;
|
|
10386
10392
|
} | {
|
|
10387
|
-
kind: "http";
|
|
10388
10393
|
url: string;
|
|
10394
|
+
kind: "http";
|
|
10389
10395
|
headerRefs?: Record<string, string> | undefined;
|
|
10390
10396
|
principalHeader?: string | undefined;
|
|
10391
10397
|
};
|
|
@@ -10408,11 +10414,11 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10408
10414
|
kind: z.ZodLiteral<"git">;
|
|
10409
10415
|
url: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
|
|
10410
10416
|
}, "strip", z.ZodTypeAny, {
|
|
10411
|
-
kind: "git";
|
|
10412
10417
|
url: string;
|
|
10413
|
-
}, {
|
|
10414
10418
|
kind: "git";
|
|
10419
|
+
}, {
|
|
10415
10420
|
url: string;
|
|
10421
|
+
kind: "git";
|
|
10416
10422
|
}>, z.ZodObject<{
|
|
10417
10423
|
kind: z.ZodLiteral<"marketplace">;
|
|
10418
10424
|
marketplace: z.ZodString;
|
|
@@ -10437,8 +10443,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10437
10443
|
name: string;
|
|
10438
10444
|
enabled: boolean;
|
|
10439
10445
|
source: {
|
|
10440
|
-
kind: "git";
|
|
10441
10446
|
url: string;
|
|
10447
|
+
kind: "git";
|
|
10442
10448
|
} | {
|
|
10443
10449
|
kind: "marketplace";
|
|
10444
10450
|
marketplace: string;
|
|
@@ -10450,8 +10456,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10450
10456
|
}, {
|
|
10451
10457
|
name: string;
|
|
10452
10458
|
source: {
|
|
10453
|
-
kind: "git";
|
|
10454
10459
|
url: string;
|
|
10460
|
+
kind: "git";
|
|
10455
10461
|
} | {
|
|
10456
10462
|
kind: "marketplace";
|
|
10457
10463
|
marketplace: string;
|
|
@@ -10467,8 +10473,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10467
10473
|
name: string;
|
|
10468
10474
|
enabled: boolean;
|
|
10469
10475
|
source: {
|
|
10470
|
-
kind: "git";
|
|
10471
10476
|
url: string;
|
|
10477
|
+
kind: "git";
|
|
10472
10478
|
} | {
|
|
10473
10479
|
kind: "marketplace";
|
|
10474
10480
|
marketplace: string;
|
|
@@ -10482,8 +10488,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10482
10488
|
plugins?: {
|
|
10483
10489
|
name: string;
|
|
10484
10490
|
source: {
|
|
10485
|
-
kind: "git";
|
|
10486
10491
|
url: string;
|
|
10492
|
+
kind: "git";
|
|
10487
10493
|
} | {
|
|
10488
10494
|
kind: "marketplace";
|
|
10489
10495
|
marketplace: string;
|
|
@@ -10499,8 +10505,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10499
10505
|
name: string;
|
|
10500
10506
|
enabled: boolean;
|
|
10501
10507
|
source: {
|
|
10502
|
-
kind: "git";
|
|
10503
10508
|
url: string;
|
|
10509
|
+
kind: "git";
|
|
10504
10510
|
} | {
|
|
10505
10511
|
kind: "marketplace";
|
|
10506
10512
|
marketplace: string;
|
|
@@ -10514,8 +10520,8 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10514
10520
|
plugins?: {
|
|
10515
10521
|
name: string;
|
|
10516
10522
|
source: {
|
|
10517
|
-
kind: "git";
|
|
10518
10523
|
url: string;
|
|
10524
|
+
kind: "git";
|
|
10519
10525
|
} | {
|
|
10520
10526
|
kind: "marketplace";
|
|
10521
10527
|
marketplace: string;
|
package/dist/types.js
CHANGED
|
@@ -26,7 +26,13 @@ import { DispatchPolicy } from "./fleet.js"; // WorkerSpec.fleet.dispatch (sched
|
|
|
26
26
|
// — a PUBLIC KEY / CERTIFICATE is NOT a secret and must NOT be flagged (PRINCIPAL_JWT_PUBKEYS lives in env).
|
|
27
27
|
// 0.1.32: this is the root fix for the public-key false-positive — replaces the 0.1.31 name-based exemption,
|
|
28
28
|
// which review flagged as a bypass (a private key misnamed `*_PUBKEY` skipped scanning entirely).
|
|
29
|
-
|
|
29
|
+
/** A private-key PEM header (`-----BEGIN [RSA |EC |OPENSSH |ENCRYPTED ]PRIVATE KEY`), unanchored — the ONE definition
|
|
30
|
+
* of that shape: {@link SECRET_LITERAL_RE} is composed from it (anchored, as one of its branches), and
|
|
31
|
+
* `redactSecrets` (config-fns) tests it ANYWHERE in a string. It carries spaces, so the token-splitting detector
|
|
32
|
+
* {@link containsSecretToken} only sees it at the very start of a string; a PEM behind a newline or a `key: ` prefix
|
|
33
|
+
* slipped past (S-712 codex review [high]). Public keys / certificates never match (see above). */
|
|
34
|
+
export const PRIVATE_KEY_PEM_HEADER = /-----BEGIN[A-Z0-9 ]*PRIVATE KEY/i;
|
|
35
|
+
export const SECRET_LITERAL_RE = new RegExp(`^(sk-|gh[opus]_|github_pat_|xox[baprse]-|xapp-|bearer\\s|basic\\s|eyJ[A-Za-z0-9_-]{10,}\\.|AKIA[0-9A-Z]{12,}|AIza[0-9A-Za-z_-]{20,}|${PRIVATE_KEY_PEM_HEADER.source})`, "i");
|
|
30
36
|
// 所有 *Env / *tokenEnv 字段的值是宿主机 env 变量的 NAME(不是值)。合法 env 变量名 + 拒绝 secret 形状的值(AKIA…
|
|
31
37
|
// 这类是合法 env-NAME 字符集却是密钥)—— "只存 env-NAME、绝不存 secret 值" 由 SCHEMA 保证。Round-5。
|
|
32
38
|
export const ENV_NAME = z
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/settings-schema",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "Sema settings schema — pure config contract (zod domains + effective-config + roster resolution + ref-integrity + remoteExec) shared by sema-registry, sema-server, and the TOC desktop/CLI. One source of truth. (Renamed at 1.0.0 from @sema-agent/registry-core — name and docs only, no behavior change; note the range moves 0.19.0 -> 1.0.0, so a dependency must become ^1.0.0. The old names @sema-agent/registry-core <=0.19.0 and @sema-ai/registry-core remain published, frozen, for migration.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"publish:npm": "npm publish --access public --@sema-agent:registry=https://registry.npmjs.org/ --\"//registry.npmjs.org/:_authToken=${NPM_TOKEN}\""
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
|
-
"@sema-agent/core": "
|
|
131
|
+
"@sema-agent/core": "7.33.1",
|
|
132
132
|
"@types/node": "^22.10.0",
|
|
133
133
|
"esbuild": "^0.21.5",
|
|
134
134
|
"typescript": "^5.7.0",
|