@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
|
@@ -32,6 +32,7 @@ export const TaskIdParamsSchema = z
|
|
|
32
32
|
metadata: z
|
|
33
33
|
.record(z.string(), z.unknown())
|
|
34
34
|
.optional()
|
|
35
|
+
.nullable()
|
|
35
36
|
.describe("Additional metadata to include in the request."),
|
|
36
37
|
})
|
|
37
38
|
.describe("Defines the parameters for a request to get a task.");
|
|
@@ -39,26 +40,26 @@ export const TaskIdParamsSchema = z
|
|
|
39
40
|
* Parameters used for querying task-related information by ID.
|
|
40
41
|
*/
|
|
41
42
|
export const TaskQueryParamsSchema = TaskIdParamsSchema.extend({
|
|
42
|
-
historyLength: z.number().optional(),
|
|
43
|
+
historyLength: z.number().optional().nullable(),
|
|
43
44
|
});
|
|
44
45
|
/**
|
|
45
46
|
* Represents the status of a task at a specific point in time.
|
|
46
47
|
*/
|
|
47
48
|
export const TaskStatusSchema = z.object({
|
|
48
49
|
state: TaskStateSchema,
|
|
49
|
-
message: MessageSchema.optional(),
|
|
50
|
-
timestamp: z.string().datetime().optional(),
|
|
50
|
+
message: MessageSchema.optional().nullable(),
|
|
51
|
+
timestamp: z.string().datetime().optional().nullable(),
|
|
51
52
|
});
|
|
52
53
|
/**
|
|
53
54
|
* Represents a task being processed by an agent.
|
|
54
55
|
*/
|
|
55
56
|
export const TaskSchema = z.object({
|
|
56
57
|
id: z.string(),
|
|
57
|
-
contextId: z.string()
|
|
58
|
+
contextId: z.string(),
|
|
58
59
|
status: TaskStatusSchema,
|
|
59
|
-
history: z.array(MessageSchema).optional(),
|
|
60
|
-
artifacts: z.array(ArtifactSchema).optional(),
|
|
61
|
-
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
60
|
+
history: z.array(MessageSchema).optional().nullable(),
|
|
61
|
+
artifacts: z.array(ArtifactSchema).optional().nullable(),
|
|
62
|
+
metadata: z.record(z.string(), z.unknown()).optional().nullable(),
|
|
62
63
|
kind: KindSchema.refine((kind) => kind === "task"),
|
|
63
64
|
});
|
|
64
65
|
/**
|
|
@@ -70,7 +71,7 @@ export const TaskStatusUpdateEventSchema = z.object({
|
|
|
70
71
|
kind: KindSchema.refine((kind) => kind === "status-update"),
|
|
71
72
|
status: TaskStatusSchema,
|
|
72
73
|
final: z.boolean(),
|
|
73
|
-
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
74
|
+
metadata: z.record(z.string(), z.unknown()).optional().nullable(),
|
|
74
75
|
});
|
|
75
76
|
/**
|
|
76
77
|
* Represents an artifact update event for a task, typically used in streaming scenarios.
|
|
@@ -80,9 +81,9 @@ export const TaskArtifactUpdateEventSchema = z.object({
|
|
|
80
81
|
contextId: z.string(),
|
|
81
82
|
kind: KindSchema.refine((kind) => kind === "artifact-update"),
|
|
82
83
|
artifact: ArtifactSchema,
|
|
83
|
-
append: z.boolean().optional(),
|
|
84
|
-
lastChunk: z.boolean().optional(),
|
|
85
|
-
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
84
|
+
append: z.boolean().optional().nullable(),
|
|
85
|
+
lastChunk: z.boolean().optional().nullable(),
|
|
86
|
+
metadata: z.record(z.string(), z.unknown()).optional().nullable(),
|
|
86
87
|
});
|
|
87
88
|
/**
|
|
88
89
|
* @description Request to retrieve the current state of a task.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artinet/sdk",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.16",
|
|
4
4
|
"description": "A TypeScript SDK for building collaborative AI agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"homepage": "https://github.com/the-artinet-project/artinet-sdk#readme",
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@modelcontextprotocol/sdk": "1.20.
|
|
66
|
+
"@modelcontextprotocol/sdk": "1.20.1",
|
|
67
67
|
"@trpc/server": "^11.4.3",
|
|
68
68
|
"cors": "^2.8.5",
|
|
69
69
|
"escape-html": "^1.0.3",
|