@kya-os/contracts 1.5.2-canary.4 → 1.5.2-canary.6

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.
Files changed (101) hide show
  1. package/dist/agentshield-api/admin-schemas.d.ts +49 -0
  2. package/dist/agentshield-api/admin-schemas.js +30 -0
  3. package/dist/agentshield-api/admin-types.d.ts +37 -0
  4. package/dist/agentshield-api/admin-types.js +10 -0
  5. package/dist/agentshield-api/endpoints.d.ts +50 -0
  6. package/dist/agentshield-api/endpoints.js +46 -0
  7. package/dist/agentshield-api/index.d.ts +15 -0
  8. package/dist/agentshield-api/index.js +40 -0
  9. package/dist/agentshield-api/schemas.d.ts +6032 -0
  10. package/dist/agentshield-api/schemas.js +240 -0
  11. package/dist/agentshield-api/types.d.ts +231 -0
  12. package/dist/agentshield-api/types.js +26 -0
  13. package/dist/cli.d.ts +388 -0
  14. package/dist/cli.js +121 -0
  15. package/dist/config/base.d.ts +96 -0
  16. package/dist/config/base.js +11 -0
  17. package/dist/config/builder.d.ts +33 -0
  18. package/dist/config/builder.js +74 -0
  19. package/dist/config/delegation.d.ts +194 -0
  20. package/dist/config/delegation.js +10 -0
  21. package/dist/config/identity.d.ts +116 -0
  22. package/dist/config/identity.js +10 -0
  23. package/dist/config/index.d.ts +34 -0
  24. package/dist/config/index.js +14 -0
  25. package/dist/config/proofing.d.ts +120 -0
  26. package/dist/config/proofing.js +10 -0
  27. package/dist/config/tool-protection.d.ts +139 -0
  28. package/dist/config/tool-protection.js +10 -0
  29. package/dist/consent/index.d.ts +6 -0
  30. package/dist/consent/index.js +23 -0
  31. package/dist/consent/schemas.d.ts +845 -0
  32. package/dist/consent/schemas.js +241 -0
  33. package/dist/consent/types.d.ts +155 -0
  34. package/dist/consent/types.js +10 -0
  35. package/dist/dashboard-config/default-config.d.ts +49 -0
  36. package/dist/dashboard-config/default-config.js +240 -0
  37. package/dist/dashboard-config/index.d.ts +10 -0
  38. package/dist/dashboard-config/index.js +35 -0
  39. package/dist/dashboard-config/schemas.d.ts +5904 -0
  40. package/dist/dashboard-config/schemas.js +254 -0
  41. package/dist/dashboard-config/types.d.ts +337 -0
  42. package/dist/dashboard-config/types.js +10 -0
  43. package/dist/delegation/constraints.d.ts +1021 -0
  44. package/dist/delegation/constraints.js +218 -0
  45. package/dist/delegation/index.d.ts +7 -0
  46. package/dist/delegation/index.js +23 -0
  47. package/dist/delegation/schemas.d.ts +8457 -0
  48. package/dist/delegation/schemas.js +475 -0
  49. package/dist/did/index.d.ts +8 -0
  50. package/dist/did/index.js +24 -0
  51. package/dist/did/resolve-contract.d.ts +219 -0
  52. package/dist/did/resolve-contract.js +31 -0
  53. package/dist/did/schemas.d.ts +112 -0
  54. package/dist/did/schemas.js +172 -0
  55. package/dist/did/types.d.ts +163 -0
  56. package/dist/did/types.js +70 -0
  57. package/dist/env/constants.d.ts +57 -0
  58. package/dist/env/constants.js +59 -0
  59. package/dist/env/index.d.ts +4 -0
  60. package/dist/env/index.js +20 -0
  61. package/dist/handshake.d.ts +335 -0
  62. package/dist/handshake.js +81 -0
  63. package/dist/index.d.ts +25 -0
  64. package/dist/index.js +55 -0
  65. package/dist/proof/index.d.ts +9 -0
  66. package/dist/proof/index.js +38 -0
  67. package/dist/proof/proof-record.d.ts +837 -0
  68. package/dist/proof/proof-record.js +133 -0
  69. package/dist/proof/signing-spec.d.ts +146 -0
  70. package/dist/proof/signing-spec.js +122 -0
  71. package/dist/proof.d.ts +414 -0
  72. package/dist/proof.js +82 -0
  73. package/dist/registry.d.ts +342 -0
  74. package/dist/registry.js +118 -0
  75. package/dist/runtime/errors.d.ts +347 -0
  76. package/dist/runtime/errors.js +119 -0
  77. package/dist/runtime/headers.d.ts +83 -0
  78. package/dist/runtime/headers.js +81 -0
  79. package/dist/runtime/index.d.ts +5 -0
  80. package/dist/runtime/index.js +21 -0
  81. package/dist/test.d.ts +251 -0
  82. package/dist/test.js +119 -0
  83. package/dist/tlkrc/index.d.ts +4 -0
  84. package/dist/tlkrc/index.js +20 -0
  85. package/dist/tlkrc/rotation.d.ts +245 -0
  86. package/dist/tlkrc/rotation.js +126 -0
  87. package/dist/tool-protection/index.d.ts +227 -0
  88. package/dist/tool-protection/index.js +113 -0
  89. package/dist/utils/validation.d.ts +30 -0
  90. package/dist/utils/validation.js +69 -0
  91. package/dist/vc/index.d.ts +7 -0
  92. package/dist/vc/index.js +23 -0
  93. package/dist/vc/schemas.d.ts +2483 -0
  94. package/dist/vc/schemas.js +224 -0
  95. package/dist/vc/statuslist.d.ts +493 -0
  96. package/dist/vc/statuslist.js +132 -0
  97. package/dist/verifier.d.ts +205 -0
  98. package/dist/verifier.js +83 -0
  99. package/dist/well-known/index.d.ts +308 -0
  100. package/dist/well-known/index.js +134 -0
  101. 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, oauthIdentitySchema, validateConsentPageConfig, validateConsentApprovalRequest, validateConsentApprovalResponse, validateConsentConfig, type ConsentBranding, type ConsentTerms, type ConsentCustomField, type ConsentPageConfig, type ConsentApprovalRequest, type ConsentApprovalResponse, type ConsentConfig, type OAuthIdentity, } from './schemas.js';
@@ -0,0 +1,23 @@
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.oauthIdentitySchema = 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, "oauthIdentitySchema", { enumerable: true, get: function () { return schemas_js_1.oauthIdentitySchema; } });
20
+ Object.defineProperty(exports, "validateConsentPageConfig", { enumerable: true, get: function () { return schemas_js_1.validateConsentPageConfig; } });
21
+ Object.defineProperty(exports, "validateConsentApprovalRequest", { enumerable: true, get: function () { return schemas_js_1.validateConsentApprovalRequest; } });
22
+ Object.defineProperty(exports, "validateConsentApprovalResponse", { enumerable: true, get: function () { return schemas_js_1.validateConsentApprovalResponse; } });
23
+ Object.defineProperty(exports, "validateConsentConfig", { enumerable: true, get: function () { return schemas_js_1.validateConsentConfig; } });