@kya-os/contracts 1.5.3-canary.13 → 1.5.3-canary.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.
@@ -29,6 +29,13 @@ export interface ToolProtection {
29
29
  * Used to determine appropriate authorization flows
30
30
  */
31
31
  riskLevel?: 'low' | 'medium' | 'high' | 'critical';
32
+ /**
33
+ * OAuth provider name for this tool (Phase 2+)
34
+ * If specified, this tool will use the specified OAuth provider.
35
+ * If not specified, provider will be resolved via fallback strategies.
36
+ * @example "github", "google", "microsoft"
37
+ */
38
+ oauthProvider?: string;
32
39
  }
33
40
  /**
34
41
  * Tool Protection Map
@@ -101,53 +108,62 @@ export declare const ToolProtectionSchema: z.ZodObject<{
101
108
  requiresDelegation: z.ZodBoolean;
102
109
  requiredScopes: z.ZodArray<z.ZodString, "many">;
103
110
  riskLevel: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
111
+ oauthProvider: z.ZodOptional<z.ZodString>;
104
112
  }, "strip", z.ZodTypeAny, {
105
113
  requiresDelegation: boolean;
106
114
  requiredScopes: string[];
107
115
  riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
116
+ oauthProvider?: string | undefined;
108
117
  }, {
109
118
  requiresDelegation: boolean;
110
119
  requiredScopes: string[];
111
120
  riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
121
+ oauthProvider?: string | undefined;
112
122
  }>;
113
123
  export declare const ToolProtectionMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
114
124
  requiresDelegation: z.ZodBoolean;
115
125
  requiredScopes: z.ZodArray<z.ZodString, "many">;
116
126
  riskLevel: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
127
+ oauthProvider: z.ZodOptional<z.ZodString>;
117
128
  }, "strip", z.ZodTypeAny, {
118
129
  requiresDelegation: boolean;
119
130
  requiredScopes: string[];
120
131
  riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
132
+ oauthProvider?: string | undefined;
121
133
  }, {
122
134
  requiresDelegation: boolean;
123
135
  requiredScopes: string[];
124
136
  riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
137
+ oauthProvider?: string | undefined;
125
138
  }>>;
126
139
  export declare const ToolProtectionResponseSchema: z.ZodObject<{
127
140
  toolProtections: z.ZodRecord<z.ZodString, z.ZodObject<{
128
141
  requiresDelegation: z.ZodBoolean;
129
142
  requiredScopes: z.ZodArray<z.ZodString, "many">;
130
143
  riskLevel: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
144
+ oauthProvider: z.ZodOptional<z.ZodString>;
131
145
  }, "strip", z.ZodTypeAny, {
132
146
  requiresDelegation: boolean;
133
147
  requiredScopes: string[];
134
148
  riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
149
+ oauthProvider?: string | undefined;
135
150
  }, {
136
151
  requiresDelegation: boolean;
137
152
  requiredScopes: string[];
138
153
  riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
154
+ oauthProvider?: string | undefined;
139
155
  }>>;
140
156
  metadata: z.ZodOptional<z.ZodObject<{
141
157
  lastUpdated: z.ZodOptional<z.ZodString>;
142
158
  version: z.ZodOptional<z.ZodString>;
143
159
  source: z.ZodOptional<z.ZodString>;
144
160
  }, "strip", z.ZodTypeAny, {
145
- version?: string | undefined;
146
161
  lastUpdated?: string | undefined;
162
+ version?: string | undefined;
147
163
  source?: string | undefined;
148
164
  }, {
149
- version?: string | undefined;
150
165
  lastUpdated?: string | undefined;
166
+ version?: string | undefined;
151
167
  source?: string | undefined;
152
168
  }>>;
153
169
  }, "strip", z.ZodTypeAny, {
@@ -155,10 +171,11 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
155
171
  requiresDelegation: boolean;
156
172
  requiredScopes: string[];
157
173
  riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
174
+ oauthProvider?: string | undefined;
158
175
  }>;
159
176
  metadata?: {
160
- version?: string | undefined;
161
177
  lastUpdated?: string | undefined;
178
+ version?: string | undefined;
162
179
  source?: string | undefined;
163
180
  } | undefined;
164
181
  }, {
@@ -166,10 +183,11 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
166
183
  requiresDelegation: boolean;
167
184
  requiredScopes: string[];
168
185
  riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
186
+ oauthProvider?: string | undefined;
169
187
  }>;
170
188
  metadata?: {
171
- version?: string | undefined;
172
189
  lastUpdated?: string | undefined;
190
+ version?: string | undefined;
173
191
  source?: string | undefined;
174
192
  } | undefined;
175
193
  }>;
@@ -182,15 +200,15 @@ export declare const DelegationRequiredErrorDataSchema: z.ZodObject<{
182
200
  }, "strip", z.ZodTypeAny, {
183
201
  requiredScopes: string[];
184
202
  toolName: string;
185
- reason?: string | undefined;
186
203
  consentUrl?: string | undefined;
187
204
  authorizationUrl?: string | undefined;
205
+ reason?: string | undefined;
188
206
  }, {
189
207
  requiredScopes: string[];
190
208
  toolName: string;
191
- reason?: string | undefined;
192
209
  consentUrl?: string | undefined;
193
210
  authorizationUrl?: string | undefined;
211
+ reason?: string | undefined;
194
212
  }>;
195
213
  /**
196
214
  * Type Guards
@@ -29,7 +29,8 @@ const zod_1 = require("zod");
29
29
  exports.ToolProtectionSchema = zod_1.z.object({
30
30
  requiresDelegation: zod_1.z.boolean(),
31
31
  requiredScopes: zod_1.z.array(zod_1.z.string()),
32
- riskLevel: zod_1.z.enum(['low', 'medium', 'high', 'critical']).optional()
32
+ riskLevel: zod_1.z.enum(['low', 'medium', 'high', 'critical']).optional(),
33
+ oauthProvider: zod_1.z.string().optional() // Phase 2: Tool-specific OAuth provider
33
34
  });
34
35
  exports.ToolProtectionMapSchema = zod_1.z.record(zod_1.z.string(), exports.ToolProtectionSchema);
35
36
  exports.ToolProtectionResponseSchema = zod_1.z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kya-os/contracts",
3
- "version": "1.5.3-canary.13",
3
+ "version": "1.5.3-canary.15",
4
4
  "description": "Shared types and schemas for XMCP-I ecosystem",
5
5
  "type": "commonjs",
6
6
  "sideEffects": false,