@kya-os/contracts 1.6.10 → 1.6.12
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.
|
@@ -5942,9 +5942,8 @@ export declare const createDelegationRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
5942
5942
|
*
|
|
5943
5943
|
* Canonical format returned by POST /api/v1/bouncer/delegations
|
|
5944
5944
|
*
|
|
5945
|
-
*
|
|
5946
|
-
*
|
|
5947
|
-
* and is passed as a URL parameter, not in the API response body.
|
|
5945
|
+
* As of AgentShield v2.x, delegation_token (JWT) IS returned for stateless verification.
|
|
5946
|
+
* The JWT enables MCP-I servers to verify delegations without database lookups.
|
|
5948
5947
|
*/
|
|
5949
5948
|
export declare const createDelegationResponseSchema: z.ZodObject<{
|
|
5950
5949
|
delegation_id: z.ZodString;
|
|
@@ -5956,6 +5955,9 @@ export declare const createDelegationResponseSchema: z.ZodObject<{
|
|
|
5956
5955
|
issued_at: z.ZodString;
|
|
5957
5956
|
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5958
5957
|
created_at: z.ZodString;
|
|
5958
|
+
delegation_token: z.ZodOptional<z.ZodString>;
|
|
5959
|
+
token_type: z.ZodOptional<z.ZodString>;
|
|
5960
|
+
expires_in: z.ZodOptional<z.ZodNumber>;
|
|
5959
5961
|
}, "strip", z.ZodTypeAny, {
|
|
5960
5962
|
status: "active" | "revoked" | "expired";
|
|
5961
5963
|
scopes: string[];
|
|
@@ -5965,7 +5967,10 @@ export declare const createDelegationResponseSchema: z.ZodObject<{
|
|
|
5965
5967
|
created_at: string;
|
|
5966
5968
|
user_id?: string | undefined;
|
|
5967
5969
|
user_identifier?: string | undefined;
|
|
5970
|
+
delegation_token?: string | undefined;
|
|
5968
5971
|
expires_at?: string | null | undefined;
|
|
5972
|
+
token_type?: string | undefined;
|
|
5973
|
+
expires_in?: number | undefined;
|
|
5969
5974
|
}, {
|
|
5970
5975
|
status: "active" | "revoked" | "expired";
|
|
5971
5976
|
scopes: string[];
|
|
@@ -5975,7 +5980,10 @@ export declare const createDelegationResponseSchema: z.ZodObject<{
|
|
|
5975
5980
|
created_at: string;
|
|
5976
5981
|
user_id?: string | undefined;
|
|
5977
5982
|
user_identifier?: string | undefined;
|
|
5983
|
+
delegation_token?: string | undefined;
|
|
5978
5984
|
expires_at?: string | null | undefined;
|
|
5985
|
+
token_type?: string | undefined;
|
|
5986
|
+
expires_in?: number | undefined;
|
|
5979
5987
|
}>;
|
|
5980
5988
|
/**
|
|
5981
5989
|
* Wrapped creation response schema
|
|
@@ -5992,6 +6000,9 @@ export declare const createDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
5992
6000
|
issued_at: z.ZodString;
|
|
5993
6001
|
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5994
6002
|
created_at: z.ZodString;
|
|
6003
|
+
delegation_token: z.ZodOptional<z.ZodString>;
|
|
6004
|
+
token_type: z.ZodOptional<z.ZodString>;
|
|
6005
|
+
expires_in: z.ZodOptional<z.ZodNumber>;
|
|
5995
6006
|
}, "strip", z.ZodTypeAny, {
|
|
5996
6007
|
status: "active" | "revoked" | "expired";
|
|
5997
6008
|
scopes: string[];
|
|
@@ -6001,7 +6012,10 @@ export declare const createDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6001
6012
|
created_at: string;
|
|
6002
6013
|
user_id?: string | undefined;
|
|
6003
6014
|
user_identifier?: string | undefined;
|
|
6015
|
+
delegation_token?: string | undefined;
|
|
6004
6016
|
expires_at?: string | null | undefined;
|
|
6017
|
+
token_type?: string | undefined;
|
|
6018
|
+
expires_in?: number | undefined;
|
|
6005
6019
|
}, {
|
|
6006
6020
|
status: "active" | "revoked" | "expired";
|
|
6007
6021
|
scopes: string[];
|
|
@@ -6011,7 +6025,10 @@ export declare const createDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6011
6025
|
created_at: string;
|
|
6012
6026
|
user_id?: string | undefined;
|
|
6013
6027
|
user_identifier?: string | undefined;
|
|
6028
|
+
delegation_token?: string | undefined;
|
|
6014
6029
|
expires_at?: string | null | undefined;
|
|
6030
|
+
token_type?: string | undefined;
|
|
6031
|
+
expires_in?: number | undefined;
|
|
6015
6032
|
}>;
|
|
6016
6033
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
6017
6034
|
requestId: z.ZodString;
|
|
@@ -6034,7 +6051,10 @@ export declare const createDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6034
6051
|
created_at: string;
|
|
6035
6052
|
user_id?: string | undefined;
|
|
6036
6053
|
user_identifier?: string | undefined;
|
|
6054
|
+
delegation_token?: string | undefined;
|
|
6037
6055
|
expires_at?: string | null | undefined;
|
|
6056
|
+
token_type?: string | undefined;
|
|
6057
|
+
expires_in?: number | undefined;
|
|
6038
6058
|
};
|
|
6039
6059
|
metadata?: {
|
|
6040
6060
|
requestId: string;
|
|
@@ -6051,7 +6071,10 @@ export declare const createDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6051
6071
|
created_at: string;
|
|
6052
6072
|
user_id?: string | undefined;
|
|
6053
6073
|
user_identifier?: string | undefined;
|
|
6074
|
+
delegation_token?: string | undefined;
|
|
6054
6075
|
expires_at?: string | null | undefined;
|
|
6076
|
+
token_type?: string | undefined;
|
|
6077
|
+
expires_in?: number | undefined;
|
|
6055
6078
|
};
|
|
6056
6079
|
metadata?: {
|
|
6057
6080
|
requestId: string;
|
|
@@ -6179,6 +6202,7 @@ export declare const sessionClientIdentitySchema: z.ZodObject<{
|
|
|
6179
6202
|
export declare const registerSessionRequestSchema: z.ZodObject<{
|
|
6180
6203
|
session_id: z.ZodString;
|
|
6181
6204
|
agent_did: z.ZodString;
|
|
6205
|
+
agent_name: z.ZodOptional<z.ZodString>;
|
|
6182
6206
|
project_id: z.ZodString;
|
|
6183
6207
|
created_at: z.ZodNumber;
|
|
6184
6208
|
client_info: z.ZodObject<{
|
|
@@ -6227,6 +6251,7 @@ export declare const registerSessionRequestSchema: z.ZodObject<{
|
|
|
6227
6251
|
vendor?: string | undefined;
|
|
6228
6252
|
};
|
|
6229
6253
|
project_id: string;
|
|
6254
|
+
agent_name?: string | undefined;
|
|
6230
6255
|
client_identity?: {
|
|
6231
6256
|
did: string;
|
|
6232
6257
|
source: "knowthat.ai" | "kta-lookup" | "generated";
|
|
@@ -6246,6 +6271,7 @@ export declare const registerSessionRequestSchema: z.ZodObject<{
|
|
|
6246
6271
|
vendor?: string | undefined;
|
|
6247
6272
|
};
|
|
6248
6273
|
project_id: string;
|
|
6274
|
+
agent_name?: string | undefined;
|
|
6249
6275
|
client_identity?: {
|
|
6250
6276
|
did: string;
|
|
6251
6277
|
source: "knowthat.ai" | "kta-lookup" | "generated";
|
|
@@ -232,9 +232,8 @@ exports.createDelegationRequestSchema = zod_1.z
|
|
|
232
232
|
*
|
|
233
233
|
* Canonical format returned by POST /api/v1/bouncer/delegations
|
|
234
234
|
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
* and is passed as a URL parameter, not in the API response body.
|
|
235
|
+
* As of AgentShield v2.x, delegation_token (JWT) IS returned for stateless verification.
|
|
236
|
+
* The JWT enables MCP-I servers to verify delegations without database lookups.
|
|
238
237
|
*/
|
|
239
238
|
exports.createDelegationResponseSchema = zod_1.z.object({
|
|
240
239
|
delegation_id: zod_1.z.string().uuid(),
|
|
@@ -246,6 +245,10 @@ exports.createDelegationResponseSchema = zod_1.z.object({
|
|
|
246
245
|
issued_at: zod_1.z.string().datetime(),
|
|
247
246
|
expires_at: zod_1.z.string().datetime().nullable().optional(), // AgentShield allows null values
|
|
248
247
|
created_at: zod_1.z.string().datetime(),
|
|
248
|
+
// JWT for stateless verification (added in AgentShield v2.x)
|
|
249
|
+
delegation_token: zod_1.z.string().optional(),
|
|
250
|
+
token_type: zod_1.z.string().optional(), // "Bearer"
|
|
251
|
+
expires_in: zod_1.z.number().int().positive().optional(), // Seconds until token expiry
|
|
249
252
|
});
|
|
250
253
|
/**
|
|
251
254
|
* Wrapped creation response schema
|
|
@@ -296,6 +299,7 @@ exports.sessionClientIdentitySchema = zod_1.z.object({
|
|
|
296
299
|
exports.registerSessionRequestSchema = zod_1.z.object({
|
|
297
300
|
session_id: zod_1.z.string().min(1, "Session ID is required"),
|
|
298
301
|
agent_did: zod_1.z.string().min(1, "Agent DID is required"),
|
|
302
|
+
agent_name: zod_1.z.string().optional(), // Human-readable agent name for dashboard display
|
|
299
303
|
project_id: zod_1.z.string().min(1, "Project ID is required"),
|
|
300
304
|
created_at: zod_1.z.number().int().positive("Created at must be a positive timestamp"),
|
|
301
305
|
client_info: exports.sessionClientInfoSchema,
|
|
@@ -293,6 +293,8 @@ export interface RegisterSessionRequest {
|
|
|
293
293
|
session_id: string;
|
|
294
294
|
/** Agent's DID */
|
|
295
295
|
agent_did: string;
|
|
296
|
+
/** Human-readable agent name for dashboard display (optional) */
|
|
297
|
+
agent_name?: string;
|
|
296
298
|
/** AgentShield project ID */
|
|
297
299
|
project_id: string;
|
|
298
300
|
/** Unix timestamp in milliseconds when session was created */
|