@kya-os/contracts 1.7.14 → 1.7.15
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/dashboard-config/schemas.d.ts +2338 -2338
- package/dist/tool-protection/index.d.ts +30 -30
- package/dist/tool-protection/index.js +2 -0
- package/package.json +1 -1
|
@@ -380,8 +380,10 @@ export declare const ToolProtectionSchema: z.ZodObject<{
|
|
|
380
380
|
type: "none";
|
|
381
381
|
}>]>>;
|
|
382
382
|
}, "strip", z.ZodTypeAny, {
|
|
383
|
-
requiresDelegation: boolean;
|
|
384
383
|
requiredScopes: string[];
|
|
384
|
+
requiresDelegation: boolean;
|
|
385
|
+
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
386
|
+
oauthProvider?: string | undefined;
|
|
385
387
|
authorization?: {
|
|
386
388
|
type: "oauth";
|
|
387
389
|
provider: string;
|
|
@@ -412,11 +414,11 @@ export declare const ToolProtectionSchema: z.ZodObject<{
|
|
|
412
414
|
} | {
|
|
413
415
|
type: "none";
|
|
414
416
|
} | undefined;
|
|
415
|
-
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
416
|
-
oauthProvider?: string | undefined;
|
|
417
417
|
}, {
|
|
418
|
-
requiresDelegation: boolean;
|
|
419
418
|
requiredScopes: string[];
|
|
419
|
+
requiresDelegation: boolean;
|
|
420
|
+
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
421
|
+
oauthProvider?: string | undefined;
|
|
420
422
|
authorization?: {
|
|
421
423
|
type: "oauth";
|
|
422
424
|
provider: string;
|
|
@@ -447,8 +449,6 @@ export declare const ToolProtectionSchema: z.ZodObject<{
|
|
|
447
449
|
} | {
|
|
448
450
|
type: "none";
|
|
449
451
|
} | undefined;
|
|
450
|
-
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
451
|
-
oauthProvider?: string | undefined;
|
|
452
452
|
}>;
|
|
453
453
|
export declare const ToolProtectionMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
454
454
|
requiresDelegation: z.ZodBoolean;
|
|
@@ -544,8 +544,10 @@ export declare const ToolProtectionMapSchema: z.ZodRecord<z.ZodString, z.ZodObje
|
|
|
544
544
|
type: "none";
|
|
545
545
|
}>]>>;
|
|
546
546
|
}, "strip", z.ZodTypeAny, {
|
|
547
|
-
requiresDelegation: boolean;
|
|
548
547
|
requiredScopes: string[];
|
|
548
|
+
requiresDelegation: boolean;
|
|
549
|
+
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
550
|
+
oauthProvider?: string | undefined;
|
|
549
551
|
authorization?: {
|
|
550
552
|
type: "oauth";
|
|
551
553
|
provider: string;
|
|
@@ -576,11 +578,11 @@ export declare const ToolProtectionMapSchema: z.ZodRecord<z.ZodString, z.ZodObje
|
|
|
576
578
|
} | {
|
|
577
579
|
type: "none";
|
|
578
580
|
} | undefined;
|
|
579
|
-
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
580
|
-
oauthProvider?: string | undefined;
|
|
581
581
|
}, {
|
|
582
|
-
requiresDelegation: boolean;
|
|
583
582
|
requiredScopes: string[];
|
|
583
|
+
requiresDelegation: boolean;
|
|
584
|
+
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
585
|
+
oauthProvider?: string | undefined;
|
|
584
586
|
authorization?: {
|
|
585
587
|
type: "oauth";
|
|
586
588
|
provider: string;
|
|
@@ -611,8 +613,6 @@ export declare const ToolProtectionMapSchema: z.ZodRecord<z.ZodString, z.ZodObje
|
|
|
611
613
|
} | {
|
|
612
614
|
type: "none";
|
|
613
615
|
} | undefined;
|
|
614
|
-
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
615
|
-
oauthProvider?: string | undefined;
|
|
616
616
|
}>>;
|
|
617
617
|
export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
618
618
|
toolProtections: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -709,8 +709,10 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
709
709
|
type: "none";
|
|
710
710
|
}>]>>;
|
|
711
711
|
}, "strip", z.ZodTypeAny, {
|
|
712
|
-
requiresDelegation: boolean;
|
|
713
712
|
requiredScopes: string[];
|
|
713
|
+
requiresDelegation: boolean;
|
|
714
|
+
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
715
|
+
oauthProvider?: string | undefined;
|
|
714
716
|
authorization?: {
|
|
715
717
|
type: "oauth";
|
|
716
718
|
provider: string;
|
|
@@ -741,11 +743,11 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
741
743
|
} | {
|
|
742
744
|
type: "none";
|
|
743
745
|
} | undefined;
|
|
744
|
-
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
745
|
-
oauthProvider?: string | undefined;
|
|
746
746
|
}, {
|
|
747
|
-
requiresDelegation: boolean;
|
|
748
747
|
requiredScopes: string[];
|
|
748
|
+
requiresDelegation: boolean;
|
|
749
|
+
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
750
|
+
oauthProvider?: string | undefined;
|
|
749
751
|
authorization?: {
|
|
750
752
|
type: "oauth";
|
|
751
753
|
provider: string;
|
|
@@ -776,26 +778,26 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
776
778
|
} | {
|
|
777
779
|
type: "none";
|
|
778
780
|
} | undefined;
|
|
779
|
-
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
780
|
-
oauthProvider?: string | undefined;
|
|
781
781
|
}>>;
|
|
782
782
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
783
783
|
lastUpdated: z.ZodOptional<z.ZodString>;
|
|
784
784
|
version: z.ZodOptional<z.ZodString>;
|
|
785
785
|
source: z.ZodOptional<z.ZodString>;
|
|
786
786
|
}, "strip", z.ZodTypeAny, {
|
|
787
|
-
version?: string | undefined;
|
|
788
787
|
lastUpdated?: string | undefined;
|
|
788
|
+
version?: string | undefined;
|
|
789
789
|
source?: string | undefined;
|
|
790
790
|
}, {
|
|
791
|
-
version?: string | undefined;
|
|
792
791
|
lastUpdated?: string | undefined;
|
|
792
|
+
version?: string | undefined;
|
|
793
793
|
source?: string | undefined;
|
|
794
794
|
}>>;
|
|
795
795
|
}, "strip", z.ZodTypeAny, {
|
|
796
796
|
toolProtections: Record<string, {
|
|
797
|
-
requiresDelegation: boolean;
|
|
798
797
|
requiredScopes: string[];
|
|
798
|
+
requiresDelegation: boolean;
|
|
799
|
+
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
800
|
+
oauthProvider?: string | undefined;
|
|
799
801
|
authorization?: {
|
|
800
802
|
type: "oauth";
|
|
801
803
|
provider: string;
|
|
@@ -826,18 +828,18 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
826
828
|
} | {
|
|
827
829
|
type: "none";
|
|
828
830
|
} | undefined;
|
|
829
|
-
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
830
|
-
oauthProvider?: string | undefined;
|
|
831
831
|
}>;
|
|
832
832
|
metadata?: {
|
|
833
|
-
version?: string | undefined;
|
|
834
833
|
lastUpdated?: string | undefined;
|
|
834
|
+
version?: string | undefined;
|
|
835
835
|
source?: string | undefined;
|
|
836
836
|
} | undefined;
|
|
837
837
|
}, {
|
|
838
838
|
toolProtections: Record<string, {
|
|
839
|
-
requiresDelegation: boolean;
|
|
840
839
|
requiredScopes: string[];
|
|
840
|
+
requiresDelegation: boolean;
|
|
841
|
+
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
842
|
+
oauthProvider?: string | undefined;
|
|
841
843
|
authorization?: {
|
|
842
844
|
type: "oauth";
|
|
843
845
|
provider: string;
|
|
@@ -868,12 +870,10 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
868
870
|
} | {
|
|
869
871
|
type: "none";
|
|
870
872
|
} | undefined;
|
|
871
|
-
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
872
|
-
oauthProvider?: string | undefined;
|
|
873
873
|
}>;
|
|
874
874
|
metadata?: {
|
|
875
|
-
version?: string | undefined;
|
|
876
875
|
lastUpdated?: string | undefined;
|
|
876
|
+
version?: string | undefined;
|
|
877
877
|
source?: string | undefined;
|
|
878
878
|
} | undefined;
|
|
879
879
|
}>;
|
|
@@ -886,15 +886,15 @@ export declare const DelegationRequiredErrorDataSchema: z.ZodObject<{
|
|
|
886
886
|
}, "strip", z.ZodTypeAny, {
|
|
887
887
|
requiredScopes: string[];
|
|
888
888
|
toolName: string;
|
|
889
|
+
consentUrl?: string | undefined;
|
|
889
890
|
authorizationUrl?: string | undefined;
|
|
890
891
|
reason?: string | undefined;
|
|
891
|
-
consentUrl?: string | undefined;
|
|
892
892
|
}, {
|
|
893
893
|
requiredScopes: string[];
|
|
894
894
|
toolName: string;
|
|
895
|
+
consentUrl?: string | undefined;
|
|
895
896
|
authorizationUrl?: string | undefined;
|
|
896
897
|
reason?: string | undefined;
|
|
897
|
-
consentUrl?: string | undefined;
|
|
898
898
|
}>;
|
|
899
899
|
/**
|
|
900
900
|
* Type Guards
|
|
@@ -331,6 +331,8 @@ function getAuthorizationTypeLabel(auth) {
|
|
|
331
331
|
function getAuthorizationTypeKey(auth) {
|
|
332
332
|
switch (auth.type) {
|
|
333
333
|
case 'oauth':
|
|
334
|
+
// Keep original key format for backward compatibility with existing cache entries
|
|
335
|
+
return `oauth:${auth.provider}`;
|
|
334
336
|
case 'oauth2':
|
|
335
337
|
return `oauth2:${auth.provider}`;
|
|
336
338
|
case 'password':
|