@kya-os/contracts 1.5.2-canary.4 → 1.5.2-canary.5
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/agentshield-api/endpoints.d.ts +50 -0
- package/dist/agentshield-api/endpoints.js +46 -0
- package/dist/agentshield-api/index.d.ts +13 -0
- package/dist/agentshield-api/index.js +37 -0
- package/dist/agentshield-api/schemas.d.ts +6032 -0
- package/dist/agentshield-api/schemas.js +240 -0
- package/dist/agentshield-api/types.d.ts +231 -0
- package/dist/agentshield-api/types.js +26 -0
- package/dist/cli.d.ts +388 -0
- package/dist/cli.js +121 -0
- package/dist/config/base.d.ts +96 -0
- package/dist/config/base.js +11 -0
- package/dist/config/builder.d.ts +33 -0
- package/dist/config/builder.js +74 -0
- package/dist/config/delegation.d.ts +194 -0
- package/dist/config/delegation.js +10 -0
- package/dist/config/identity.d.ts +116 -0
- package/dist/config/identity.js +10 -0
- package/dist/config/index.d.ts +34 -0
- package/dist/config/index.js +14 -0
- package/dist/config/proofing.d.ts +120 -0
- package/dist/config/proofing.js +10 -0
- package/dist/config/tool-protection.d.ts +139 -0
- package/dist/config/tool-protection.js +10 -0
- package/dist/consent/index.d.ts +6 -0
- package/dist/consent/index.js +22 -0
- package/dist/consent/schemas.d.ts +738 -0
- package/dist/consent/schemas.js +186 -0
- package/dist/consent/types.d.ts +155 -0
- package/dist/consent/types.js +10 -0
- package/dist/dashboard-config/default-config.d.ts +49 -0
- package/dist/dashboard-config/default-config.js +240 -0
- package/dist/dashboard-config/index.d.ts +10 -0
- package/dist/dashboard-config/index.js +35 -0
- package/dist/dashboard-config/schemas.d.ts +5904 -0
- package/dist/dashboard-config/schemas.js +254 -0
- package/dist/dashboard-config/types.d.ts +337 -0
- package/dist/dashboard-config/types.js +10 -0
- package/dist/delegation/constraints.d.ts +1021 -0
- package/dist/delegation/constraints.js +218 -0
- package/dist/delegation/index.d.ts +7 -0
- package/dist/delegation/index.js +23 -0
- package/dist/delegation/schemas.d.ts +8457 -0
- package/dist/delegation/schemas.js +475 -0
- package/dist/did/index.d.ts +8 -0
- package/dist/did/index.js +24 -0
- package/dist/did/resolve-contract.d.ts +219 -0
- package/dist/did/resolve-contract.js +31 -0
- package/dist/did/schemas.d.ts +112 -0
- package/dist/did/schemas.js +172 -0
- package/dist/did/types.d.ts +163 -0
- package/dist/did/types.js +70 -0
- package/dist/env/constants.d.ts +57 -0
- package/dist/env/constants.js +59 -0
- package/dist/env/index.d.ts +4 -0
- package/dist/env/index.js +20 -0
- package/dist/handshake.d.ts +172 -0
- package/dist/handshake.js +60 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +55 -0
- package/dist/proof/index.d.ts +9 -0
- package/dist/proof/index.js +38 -0
- package/dist/proof/proof-record.d.ts +837 -0
- package/dist/proof/proof-record.js +133 -0
- package/dist/proof/signing-spec.d.ts +146 -0
- package/dist/proof/signing-spec.js +122 -0
- package/dist/proof.d.ts +414 -0
- package/dist/proof.js +82 -0
- package/dist/registry.d.ts +342 -0
- package/dist/registry.js +118 -0
- package/dist/runtime/errors.d.ts +347 -0
- package/dist/runtime/errors.js +119 -0
- package/dist/runtime/headers.d.ts +83 -0
- package/dist/runtime/headers.js +81 -0
- package/dist/runtime/index.d.ts +5 -0
- package/dist/runtime/index.js +21 -0
- package/dist/test.d.ts +251 -0
- package/dist/test.js +119 -0
- package/dist/tlkrc/index.d.ts +4 -0
- package/dist/tlkrc/index.js +20 -0
- package/dist/tlkrc/rotation.d.ts +245 -0
- package/dist/tlkrc/rotation.js +126 -0
- package/dist/tool-protection/index.d.ts +227 -0
- package/dist/tool-protection/index.js +113 -0
- package/dist/utils/validation.d.ts +30 -0
- package/dist/utils/validation.js +69 -0
- package/dist/vc/index.d.ts +7 -0
- package/dist/vc/index.js +23 -0
- package/dist/vc/schemas.d.ts +2483 -0
- package/dist/vc/schemas.js +224 -0
- package/dist/vc/statuslist.d.ts +493 -0
- package/dist/vc/statuslist.js +132 -0
- package/dist/verifier.d.ts +205 -0
- package/dist/verifier.js +83 -0
- package/dist/well-known/index.d.ts +308 -0
- package/dist/well-known/index.js +134 -0
- package/package.json +1 -1
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Protection Configuration Types
|
|
3
|
+
*
|
|
4
|
+
* Configuration for tool protection including delegation requirements,
|
|
5
|
+
* scopes, and multi-source resolution strategies.
|
|
6
|
+
*
|
|
7
|
+
* @module @kya-os/contracts/config
|
|
8
|
+
*/
|
|
9
|
+
import type { ToolProtection as BaseToolProtection, ToolProtectionMap as BaseToolProtectionMap, DelegationRequiredErrorData as BaseDelegationRequiredErrorData, ToolProtectionResponse as BaseToolProtectionResponse } from '../tool-protection/index.js';
|
|
10
|
+
export type ToolProtection = BaseToolProtection;
|
|
11
|
+
export type ToolProtectionMap = BaseToolProtectionMap;
|
|
12
|
+
export type DelegationRequiredErrorData = BaseDelegationRequiredErrorData;
|
|
13
|
+
export type ToolProtectionResponse = BaseToolProtectionResponse;
|
|
14
|
+
/**
|
|
15
|
+
* Tool protection source types
|
|
16
|
+
*/
|
|
17
|
+
export type ToolProtectionSourceType = 'inline' | 'local' | 'agentshield' | 'kta' | 'multi';
|
|
18
|
+
/**
|
|
19
|
+
* Tool protection source configuration
|
|
20
|
+
* Defines where tool protection settings come from
|
|
21
|
+
*/
|
|
22
|
+
export interface ToolProtectionSourceConfig {
|
|
23
|
+
/**
|
|
24
|
+
* Type of source to use
|
|
25
|
+
*/
|
|
26
|
+
source: ToolProtectionSourceType;
|
|
27
|
+
/**
|
|
28
|
+
* Inline tool protection map
|
|
29
|
+
* Used when source is 'inline'
|
|
30
|
+
*/
|
|
31
|
+
inline?: BaseToolProtectionMap;
|
|
32
|
+
/**
|
|
33
|
+
* Path to local tool protections file
|
|
34
|
+
* Used when source is 'local'
|
|
35
|
+
* @example './tool-protections.json'
|
|
36
|
+
*/
|
|
37
|
+
localFile?: string;
|
|
38
|
+
/**
|
|
39
|
+
* AgentShield configuration
|
|
40
|
+
* Used when source is 'agentshield'
|
|
41
|
+
*/
|
|
42
|
+
agentShield?: {
|
|
43
|
+
/**
|
|
44
|
+
* AgentShield API base URL
|
|
45
|
+
* @example 'https://kya.vouched.id'
|
|
46
|
+
*/
|
|
47
|
+
apiUrl: string;
|
|
48
|
+
/**
|
|
49
|
+
* API key for authentication
|
|
50
|
+
*/
|
|
51
|
+
apiKey?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Project ID (optional, for backward compatibility)
|
|
54
|
+
* Modern approach uses agent DID
|
|
55
|
+
*/
|
|
56
|
+
projectId?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Cache TTL in milliseconds
|
|
59
|
+
* @default 300000 (5 minutes)
|
|
60
|
+
*/
|
|
61
|
+
cacheTtl?: number;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* KTA configuration
|
|
65
|
+
* Used when source is 'kta'
|
|
66
|
+
*/
|
|
67
|
+
kta?: {
|
|
68
|
+
/**
|
|
69
|
+
* KTA API base URL
|
|
70
|
+
*/
|
|
71
|
+
apiUrl: string;
|
|
72
|
+
/**
|
|
73
|
+
* API key for authentication
|
|
74
|
+
*/
|
|
75
|
+
apiKey?: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Multi-source configuration
|
|
79
|
+
* Used when source is 'multi'
|
|
80
|
+
* Sources are checked in priority order
|
|
81
|
+
*/
|
|
82
|
+
sources?: Array<{
|
|
83
|
+
/**
|
|
84
|
+
* Source configuration
|
|
85
|
+
*/
|
|
86
|
+
config: Omit<ToolProtectionSourceConfig, 'source' | 'sources'>;
|
|
87
|
+
/**
|
|
88
|
+
* Priority (higher number = higher priority)
|
|
89
|
+
* @default 0
|
|
90
|
+
*/
|
|
91
|
+
priority?: number;
|
|
92
|
+
/**
|
|
93
|
+
* Whether to stop after this source if found
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
exclusive?: boolean;
|
|
97
|
+
}>;
|
|
98
|
+
/**
|
|
99
|
+
* Fallback configuration if all sources fail
|
|
100
|
+
*/
|
|
101
|
+
fallback?: BaseToolProtectionMap;
|
|
102
|
+
/**
|
|
103
|
+
* Enable debug logging
|
|
104
|
+
* @default false
|
|
105
|
+
*/
|
|
106
|
+
debug?: boolean;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Tool protection service configuration
|
|
110
|
+
* Used by provider-based implementations
|
|
111
|
+
*/
|
|
112
|
+
export interface ToolProtectionServiceConfig {
|
|
113
|
+
/**
|
|
114
|
+
* API base URL for fetching tool protections
|
|
115
|
+
*/
|
|
116
|
+
apiUrl: string;
|
|
117
|
+
/**
|
|
118
|
+
* API key for authentication
|
|
119
|
+
*/
|
|
120
|
+
apiKey: string;
|
|
121
|
+
/**
|
|
122
|
+
* Project ID (optional)
|
|
123
|
+
*/
|
|
124
|
+
projectId?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Cache TTL in milliseconds
|
|
127
|
+
* @default 300000 (5 minutes)
|
|
128
|
+
*/
|
|
129
|
+
cacheTtl?: number;
|
|
130
|
+
/**
|
|
131
|
+
* Fallback configuration if API is unavailable
|
|
132
|
+
*/
|
|
133
|
+
fallbackConfig?: BaseToolProtectionMap;
|
|
134
|
+
/**
|
|
135
|
+
* Enable debug logging
|
|
136
|
+
* @default false
|
|
137
|
+
*/
|
|
138
|
+
debug?: boolean;
|
|
139
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tool Protection Configuration Types
|
|
4
|
+
*
|
|
5
|
+
* Configuration for tool protection including delegation requirements,
|
|
6
|
+
* scopes, and multi-source resolution strategies.
|
|
7
|
+
*
|
|
8
|
+
* @module @kya-os/contracts/config
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consent Module Exports
|
|
3
|
+
*
|
|
4
|
+
* Types and schemas for consent page configuration and approval handling
|
|
5
|
+
*/
|
|
6
|
+
export { consentBrandingSchema, consentTermsSchema, consentCustomFieldSchema, consentCustomFieldOptionSchema, consentPageConfigSchema, consentApprovalRequestSchema, consentApprovalResponseSchema, consentConfigSchema, validateConsentPageConfig, validateConsentApprovalRequest, validateConsentApprovalResponse, validateConsentConfig, type ConsentBranding, type ConsentTerms, type ConsentCustomField, type ConsentPageConfig, type ConsentApprovalRequest, type ConsentApprovalResponse, type ConsentConfig, } from './schemas.js';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Consent Module Exports
|
|
4
|
+
*
|
|
5
|
+
* Types and schemas for consent page configuration and approval handling
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.validateConsentConfig = exports.validateConsentApprovalResponse = exports.validateConsentApprovalRequest = exports.validateConsentPageConfig = exports.consentConfigSchema = exports.consentApprovalResponseSchema = exports.consentApprovalRequestSchema = exports.consentPageConfigSchema = exports.consentCustomFieldOptionSchema = exports.consentCustomFieldSchema = exports.consentTermsSchema = exports.consentBrandingSchema = void 0;
|
|
9
|
+
// Export schemas and inferred types (types are derived from schemas)
|
|
10
|
+
var schemas_js_1 = require("./schemas.js");
|
|
11
|
+
Object.defineProperty(exports, "consentBrandingSchema", { enumerable: true, get: function () { return schemas_js_1.consentBrandingSchema; } });
|
|
12
|
+
Object.defineProperty(exports, "consentTermsSchema", { enumerable: true, get: function () { return schemas_js_1.consentTermsSchema; } });
|
|
13
|
+
Object.defineProperty(exports, "consentCustomFieldSchema", { enumerable: true, get: function () { return schemas_js_1.consentCustomFieldSchema; } });
|
|
14
|
+
Object.defineProperty(exports, "consentCustomFieldOptionSchema", { enumerable: true, get: function () { return schemas_js_1.consentCustomFieldOptionSchema; } });
|
|
15
|
+
Object.defineProperty(exports, "consentPageConfigSchema", { enumerable: true, get: function () { return schemas_js_1.consentPageConfigSchema; } });
|
|
16
|
+
Object.defineProperty(exports, "consentApprovalRequestSchema", { enumerable: true, get: function () { return schemas_js_1.consentApprovalRequestSchema; } });
|
|
17
|
+
Object.defineProperty(exports, "consentApprovalResponseSchema", { enumerable: true, get: function () { return schemas_js_1.consentApprovalResponseSchema; } });
|
|
18
|
+
Object.defineProperty(exports, "consentConfigSchema", { enumerable: true, get: function () { return schemas_js_1.consentConfigSchema; } });
|
|
19
|
+
Object.defineProperty(exports, "validateConsentPageConfig", { enumerable: true, get: function () { return schemas_js_1.validateConsentPageConfig; } });
|
|
20
|
+
Object.defineProperty(exports, "validateConsentApprovalRequest", { enumerable: true, get: function () { return schemas_js_1.validateConsentApprovalRequest; } });
|
|
21
|
+
Object.defineProperty(exports, "validateConsentApprovalResponse", { enumerable: true, get: function () { return schemas_js_1.validateConsentApprovalResponse; } });
|
|
22
|
+
Object.defineProperty(exports, "validateConsentConfig", { enumerable: true, get: function () { return schemas_js_1.validateConsentConfig; } });
|