@artinet/sdk 0.5.14 → 0.5.16
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/README.md +5 -0
- package/dist/server/express/server.d.ts +24 -24
- package/dist/services/a2a/factory/builder.d.ts +26 -26
- package/dist/services/a2a/factory/builder.js +38 -72
- package/dist/services/a2a/helpers/message-builder.d.ts +1 -1
- package/dist/services/a2a/helpers/message-builder.js +4 -4
- package/dist/services/a2a/methods/get-task.d.ts +47 -47
- package/dist/services/a2a/methods/send-message.js +1 -1
- package/dist/services/a2a/methods/stream-message.js +1 -1
- package/dist/services/a2a/service.d.ts +157 -157
- package/dist/services/a2a/state/load.d.ts +1 -1
- package/dist/transport/trpc/a2a/factory/router.d.ts +1096 -1096
- package/dist/transport/trpc/a2a/routes/info.d.ts +37 -37
- package/dist/transport/trpc/a2a/routes/message/route.d.ts +227 -227
- package/dist/transport/trpc/a2a/routes/tasks/route.d.ts +260 -260
- package/dist/transport/trpc/a2a/trpc.d.ts +120 -120
- package/dist/types/interfaces/services/a2a/service.d.ts +1 -1
- package/dist/types/schemas/a2a/agent.d.ts +840 -840
- package/dist/types/schemas/a2a/agent.js +23 -2
- package/dist/types/schemas/a2a/auth.d.ts +197 -197
- package/dist/types/schemas/a2a/auth.js +19 -4
- package/dist/types/schemas/a2a/error.d.ts +24 -24
- package/dist/types/schemas/a2a/message.d.ts +4525 -4525
- package/dist/types/schemas/a2a/message.js +10 -2
- package/dist/types/schemas/a2a/notification.d.ts +403 -403
- package/dist/types/schemas/a2a/notification.js +7 -3
- package/dist/types/schemas/a2a/parameters.d.ts +264 -264
- package/dist/types/schemas/a2a/parameters.js +14 -1
- package/dist/types/schemas/a2a/protocol.d.ts +6042 -6042
- package/dist/types/schemas/a2a/rpc.d.ts +20 -20
- package/dist/types/schemas/a2a/rpc.js +5 -0
- package/dist/types/schemas/a2a/task.d.ts +2536 -2536
- package/dist/types/schemas/a2a/task.js +12 -11
- package/package.json +2 -2
|
@@ -18,13 +18,13 @@ export declare const JSONRPCMessageSchema: z.ZodObject<{
|
|
|
18
18
|
* @description Can be a string, number. Responses must have the same ID as the request they relate to.
|
|
19
19
|
* Notifications (requests without an expected response) should omit the ID.
|
|
20
20
|
*/
|
|
21
|
-
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]
|
|
21
|
+
id: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
jsonrpc: "2.0";
|
|
24
|
-
id?: string | number | undefined;
|
|
24
|
+
id?: string | number | null | undefined;
|
|
25
25
|
}, {
|
|
26
26
|
jsonrpc: "2.0";
|
|
27
|
-
id?: string | number | undefined;
|
|
27
|
+
id?: string | number | null | undefined;
|
|
28
28
|
}>;
|
|
29
29
|
export type JSONRPCMessage = z.infer<typeof JSONRPCMessageSchema>;
|
|
30
30
|
/**
|
|
@@ -35,17 +35,17 @@ export declare const JSONRPCRequestSchema: z.ZodObject<{
|
|
|
35
35
|
} & {
|
|
36
36
|
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
37
37
|
method: z.ZodString;
|
|
38
|
-
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown
|
|
38
|
+
params: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
39
39
|
}, "strip", z.ZodTypeAny, {
|
|
40
40
|
id: string | number;
|
|
41
41
|
method: string;
|
|
42
42
|
jsonrpc: "2.0";
|
|
43
|
-
params?: Record<string, unknown> | undefined;
|
|
43
|
+
params?: Record<string, unknown> | null | undefined;
|
|
44
44
|
}, {
|
|
45
45
|
id: string | number;
|
|
46
46
|
method: string;
|
|
47
47
|
jsonrpc: "2.0";
|
|
48
|
-
params?: Record<string, unknown> | undefined;
|
|
48
|
+
params?: Record<string, unknown> | null | undefined;
|
|
49
49
|
}>;
|
|
50
50
|
export type JSONRPCRequest = z.infer<typeof JSONRPCRequestSchema>;
|
|
51
51
|
/**
|
|
@@ -63,7 +63,7 @@ export declare const JSONRPCErrorSchema: z.ZodObject<{
|
|
|
63
63
|
/**
|
|
64
64
|
* @optional A Primitive or Structured value that contains additional information about the error.
|
|
65
65
|
*/
|
|
66
|
-
data: z.ZodOptional<z.ZodUnknown
|
|
66
|
+
data: z.ZodNullable<z.ZodOptional<z.ZodUnknown>>;
|
|
67
67
|
}, "strip", z.ZodTypeAny, {
|
|
68
68
|
code: number;
|
|
69
69
|
message: string;
|
|
@@ -89,7 +89,7 @@ export declare const JSONRPCSuccessResponseSchema: z.ZodObject<{
|
|
|
89
89
|
* @description Can be a string, number. Responses must have the same ID as the request they relate to.
|
|
90
90
|
* Notifications (requests without an expected response) should omit the ID.
|
|
91
91
|
*/
|
|
92
|
-
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]
|
|
92
|
+
id: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
93
93
|
} & {
|
|
94
94
|
/**
|
|
95
95
|
* @required The result object on success
|
|
@@ -100,16 +100,16 @@ export declare const JSONRPCSuccessResponseSchema: z.ZodObject<{
|
|
|
100
100
|
* @optional The error object on failure
|
|
101
101
|
* @description Optional 'never' helps enforce exclusivity
|
|
102
102
|
*/
|
|
103
|
-
error: z.ZodOptional<z.ZodNever
|
|
103
|
+
error: z.ZodNullable<z.ZodOptional<z.ZodNever>>;
|
|
104
104
|
}, "strip", z.ZodTypeAny, {
|
|
105
105
|
jsonrpc: "2.0";
|
|
106
|
-
error?: undefined;
|
|
107
|
-
id?: string | number | undefined;
|
|
106
|
+
error?: null | undefined;
|
|
107
|
+
id?: string | number | null | undefined;
|
|
108
108
|
result?: unknown;
|
|
109
109
|
}, {
|
|
110
110
|
jsonrpc: "2.0";
|
|
111
|
-
error?: undefined;
|
|
112
|
-
id?: string | number | undefined;
|
|
111
|
+
error?: null | undefined;
|
|
112
|
+
id?: string | number | null | undefined;
|
|
113
113
|
result?: unknown;
|
|
114
114
|
}>;
|
|
115
115
|
export type JSONRPCSuccessResponse = z.infer<typeof JSONRPCSuccessResponseSchema>;
|
|
@@ -128,13 +128,13 @@ export declare const JSONRPCErrorResponseSchema: z.ZodObject<{
|
|
|
128
128
|
* @description Can be a string, number. Responses must have the same ID as the request they relate to.
|
|
129
129
|
* Notifications (requests without an expected response) should omit the ID.
|
|
130
130
|
*/
|
|
131
|
-
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]
|
|
131
|
+
id: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
132
132
|
} & {
|
|
133
133
|
/**
|
|
134
134
|
* @optional The result object on success
|
|
135
135
|
* @description Optional 'never' helps enforce exclusivity
|
|
136
136
|
*/
|
|
137
|
-
result: z.ZodOptional<z.ZodNever
|
|
137
|
+
result: z.ZodNullable<z.ZodOptional<z.ZodNever>>;
|
|
138
138
|
/**
|
|
139
139
|
* @required The result object on failure
|
|
140
140
|
*/
|
|
@@ -150,7 +150,7 @@ export declare const JSONRPCErrorResponseSchema: z.ZodObject<{
|
|
|
150
150
|
/**
|
|
151
151
|
* @optional A Primitive or Structured value that contains additional information about the error.
|
|
152
152
|
*/
|
|
153
|
-
data: z.ZodOptional<z.ZodUnknown
|
|
153
|
+
data: z.ZodNullable<z.ZodOptional<z.ZodUnknown>>;
|
|
154
154
|
}, "strip", z.ZodTypeAny, {
|
|
155
155
|
code: number;
|
|
156
156
|
message: string;
|
|
@@ -167,8 +167,8 @@ export declare const JSONRPCErrorResponseSchema: z.ZodObject<{
|
|
|
167
167
|
data?: unknown;
|
|
168
168
|
};
|
|
169
169
|
jsonrpc: "2.0";
|
|
170
|
-
id?: string | number | undefined;
|
|
171
|
-
result?: undefined;
|
|
170
|
+
id?: string | number | null | undefined;
|
|
171
|
+
result?: null | undefined;
|
|
172
172
|
}, {
|
|
173
173
|
error: {
|
|
174
174
|
code: number;
|
|
@@ -176,7 +176,7 @@ export declare const JSONRPCErrorResponseSchema: z.ZodObject<{
|
|
|
176
176
|
data?: unknown;
|
|
177
177
|
};
|
|
178
178
|
jsonrpc: "2.0";
|
|
179
|
-
id?: string | number | undefined;
|
|
180
|
-
result?: undefined;
|
|
179
|
+
id?: string | number | null | undefined;
|
|
180
|
+
result?: null | undefined;
|
|
181
181
|
}>;
|
|
182
182
|
export type JSONRPCErrorResponse = z.infer<typeof JSONRPCErrorResponseSchema>;
|
|
@@ -24,6 +24,7 @@ export const JSONRPCMessageSchema = z
|
|
|
24
24
|
id: z
|
|
25
25
|
.union([z.string(), z.number()])
|
|
26
26
|
.optional()
|
|
27
|
+
.nullable()
|
|
27
28
|
.describe("An identifier established by the Client that MUST contain a String, Number. Responses must have the same ID as the request they relate to. Notifications (requests without an expected response) should omit the ID."),
|
|
28
29
|
})
|
|
29
30
|
.describe("Base interface for all JSON-RPC messages (Requests and Responses).");
|
|
@@ -50,6 +51,7 @@ export const JSONRPCRequestSchema = JSONRPCMessageSchema.extend({
|
|
|
50
51
|
params: z
|
|
51
52
|
.record(z.string(), z.unknown())
|
|
52
53
|
.optional()
|
|
54
|
+
.nullable()
|
|
53
55
|
.describe("A Structured value that holds the parameter values to be used during the invocation of the method."),
|
|
54
56
|
}).describe("Represents a JSON-RPC request object base structure.");
|
|
55
57
|
// /**
|
|
@@ -84,6 +86,7 @@ export const JSONRPCErrorSchema = z
|
|
|
84
86
|
data: z
|
|
85
87
|
.unknown()
|
|
86
88
|
.optional()
|
|
89
|
+
.nullable()
|
|
87
90
|
.describe("A Primitive or Structured value that contains additional information about the error."),
|
|
88
91
|
})
|
|
89
92
|
.describe("Represents a JSON-RPC 2.0 Error object, included in an error response.");
|
|
@@ -105,6 +108,7 @@ export const JSONRPCSuccessResponseSchema = JSONRPCMessageSchema.extend({
|
|
|
105
108
|
error: z
|
|
106
109
|
.never()
|
|
107
110
|
.optional()
|
|
111
|
+
.nullable()
|
|
108
112
|
.describe("Optional 'never' helps enforce exclusivity"),
|
|
109
113
|
}).describe("Represents a JSON-RPC 2.0 Success Response object.");
|
|
110
114
|
/**
|
|
@@ -118,6 +122,7 @@ export const JSONRPCErrorResponseSchema = JSONRPCMessageSchema.extend({
|
|
|
118
122
|
result: z
|
|
119
123
|
.never()
|
|
120
124
|
.optional()
|
|
125
|
+
.nullable()
|
|
121
126
|
.describe("Optional 'never' helps enforce exclusivity"),
|
|
122
127
|
/**
|
|
123
128
|
* @required The result object on failure
|