@artinet/sdk 0.5.6 → 0.5.8
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 +82 -207
- package/dist/client/a2a-client.d.ts.map +1 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/server/express/errors.d.ts.map +1 -0
- package/dist/server/express/index.d.ts.map +1 -0
- package/dist/server/express/middeware.d.ts.map +1 -0
- package/dist/{types/server → server}/express/server.d.ts +8 -8
- package/dist/server/express/server.d.ts.map +1 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/{types/services → services}/a2a/factory/builder.d.ts +8 -8
- package/dist/services/a2a/factory/builder.d.ts.map +1 -0
- package/dist/services/a2a/factory/builder.js +6 -6
- package/dist/services/a2a/factory/builder.js.map +1 -1
- package/dist/{types/services → services}/a2a/factory/context.d.ts +1 -1
- package/dist/services/a2a/factory/context.d.ts.map +1 -0
- package/dist/{types/services → services}/a2a/factory/event.d.ts +1 -1
- package/dist/services/a2a/factory/event.d.ts.map +1 -0
- package/dist/services/a2a/factory/event.js +2 -2
- package/dist/services/a2a/factory/event.js.map +1 -1
- package/dist/services/a2a/factory/index.d.ts.map +1 -0
- package/dist/services/a2a/factory/method.d.ts.map +1 -0
- package/dist/services/a2a/factory/service.d.ts.map +1 -0
- package/dist/services/a2a/helpers/index.d.ts.map +1 -0
- package/dist/services/a2a/helpers/part.d.ts.map +1 -0
- package/dist/services/a2a/index.d.ts.map +1 -0
- package/dist/services/a2a/managers/cancellation.d.ts.map +1 -0
- package/dist/services/a2a/managers/connection.d.ts.map +1 -0
- package/dist/services/a2a/managers/context.d.ts.map +1 -0
- package/dist/services/a2a/managers/index.d.ts.map +1 -0
- package/dist/services/a2a/managers/task.d.ts.map +1 -0
- package/dist/services/a2a/methods/cancel-task.d.ts.map +1 -0
- package/dist/{types/services → services}/a2a/methods/get-task.d.ts +19 -19
- package/dist/services/a2a/methods/get-task.d.ts.map +1 -0
- package/dist/services/a2a/methods/index.d.ts.map +1 -0
- package/dist/services/a2a/methods/resubscribe-task.d.ts.map +1 -0
- package/dist/services/a2a/methods/send-message.d.ts.map +1 -0
- package/dist/services/a2a/methods/stream-message.d.ts.map +1 -0
- package/dist/services/a2a/methods/stream-message.js +0 -17
- package/dist/services/a2a/methods/stream-message.js.map +1 -1
- package/dist/{types/services → services}/a2a/service.d.ts +63 -64
- package/dist/services/a2a/service.d.ts.map +1 -0
- package/dist/services/a2a/service.js +2 -5
- package/dist/services/a2a/service.js.map +1 -1
- package/dist/services/a2a/state/index.d.ts.map +1 -0
- package/dist/services/a2a/state/load.d.ts.map +1 -0
- package/dist/services/a2a/state/process.d.ts.map +1 -0
- package/dist/services/a2a/state/update/artifact.d.ts.map +1 -0
- package/dist/services/a2a/state/update/index.d.ts.map +1 -0
- package/dist/services/a2a/state/update/update.d.ts.map +1 -0
- package/dist/services/core/execution/execute.d.ts.map +1 -0
- package/dist/services/core/execution/index.d.ts.map +1 -0
- package/dist/services/core/index.d.ts.map +1 -0
- package/dist/services/core/managers/command.d.ts.map +1 -0
- package/dist/services/core/managers/event.d.ts.map +1 -0
- package/dist/services/core/managers/index.d.ts.map +1 -0
- package/dist/services/core/managers/stream.d.ts.map +1 -0
- package/dist/services/index.d.ts +4 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +1 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/mcp/index.d.ts +2 -0
- package/dist/services/mcp/index.d.ts.map +1 -0
- package/dist/services/mcp/index.js +2 -0
- package/dist/services/mcp/index.js.map +1 -0
- package/dist/services/mcp/service.d.ts +31 -0
- package/dist/services/mcp/service.d.ts.map +1 -0
- package/dist/services/mcp/service.js +123 -0
- package/dist/services/mcp/service.js.map +1 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/rpc/parser.d.ts.map +1 -0
- package/dist/transport/rpc/rpc-client.d.ts.map +1 -0
- package/dist/transport/streaming/event-stream.d.ts.map +1 -0
- package/dist/transport/trpc/a2a/factory/index.d.ts.map +1 -0
- package/dist/{types/transport → transport}/trpc/a2a/factory/router.d.ts +398 -398
- package/dist/{types/transport → transport}/trpc/a2a/factory/router.d.ts.map +1 -1
- package/dist/transport/trpc/a2a/index.d.ts.map +1 -0
- package/dist/transport/trpc/a2a/routes/index.d.ts.map +1 -0
- package/dist/{types/transport → transport}/trpc/a2a/routes/info.d.ts +15 -15
- package/dist/transport/trpc/a2a/routes/info.d.ts.map +1 -0
- package/dist/transport/trpc/a2a/routes/message/index.d.ts.map +1 -0
- package/dist/{types/transport → transport}/trpc/a2a/routes/message/route.d.ts +85 -85
- package/dist/{types/transport → transport}/trpc/a2a/routes/message/route.d.ts.map +1 -1
- package/dist/transport/trpc/a2a/routes/tasks/index.d.ts.map +1 -0
- package/dist/{types/transport → transport}/trpc/a2a/routes/tasks/route.d.ts +92 -92
- package/dist/{types/transport → transport}/trpc/a2a/routes/tasks/route.d.ts.map +1 -1
- package/dist/transport/trpc/a2a/routes/tasks/route.js +1 -1
- package/dist/transport/trpc/a2a/routes/tasks/route.js.map +1 -1
- package/dist/{types/transport → transport}/trpc/a2a/trpc.d.ts +35 -35
- package/dist/transport/trpc/a2a/trpc.d.ts.map +1 -0
- package/dist/transport/trpc/index.d.ts.map +1 -0
- package/dist/types/ext.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/interfaces/client.d.ts.map +1 -0
- package/dist/types/interfaces/index.d.ts.map +1 -0
- package/dist/types/{types/interfaces → interfaces}/services/a2a/builder.d.ts +4 -0
- package/dist/types/interfaces/services/a2a/builder.d.ts.map +1 -0
- package/dist/types/interfaces/services/a2a/builder.js +4 -0
- package/dist/types/interfaces/services/a2a/builder.js.map +1 -1
- package/dist/types/{types/interfaces → interfaces}/services/a2a/context.d.ts +1 -1
- package/dist/types/interfaces/services/a2a/context.d.ts.map +1 -0
- package/dist/types/interfaces/services/a2a/engine.d.ts.map +1 -0
- package/dist/types/interfaces/services/a2a/index.d.ts.map +1 -0
- package/dist/types/{types/interfaces → interfaces}/services/a2a/legacy.d.ts +1 -0
- package/dist/types/interfaces/services/a2a/legacy.d.ts.map +1 -0
- package/dist/types/{types/interfaces → interfaces}/services/a2a/service.d.ts +4 -4
- package/dist/types/interfaces/services/a2a/service.d.ts.map +1 -0
- package/dist/types/interfaces/services/core/context/command.d.ts.map +1 -0
- package/dist/types/{types/interfaces → interfaces}/services/core/context/context.d.ts +1 -1
- package/dist/types/interfaces/services/core/context/context.d.ts.map +1 -0
- package/dist/types/interfaces/services/core/context/index.d.ts.map +1 -0
- package/dist/types/interfaces/services/core/context/types.d.ts.map +1 -0
- package/dist/types/{types/interfaces → interfaces}/services/core/execution/engine.d.ts +1 -1
- package/dist/types/interfaces/services/core/execution/engine.d.ts.map +1 -0
- package/dist/types/interfaces/services/core/execution/environment.d.ts.map +1 -0
- package/dist/types/interfaces/services/core/execution/execute.d.ts.map +1 -0
- package/dist/types/interfaces/services/core/execution/index.d.ts.map +1 -0
- package/dist/types/interfaces/services/core/index.d.ts.map +1 -0
- package/dist/types/interfaces/services/core/managers/cancellation.d.ts.map +1 -0
- package/dist/types/interfaces/services/core/managers/connection.d.ts.map +1 -0
- package/dist/types/interfaces/services/core/managers/context.d.ts.map +1 -0
- package/dist/types/{types/interfaces → interfaces}/services/core/managers/event.d.ts +1 -1
- package/dist/types/interfaces/services/core/managers/event.d.ts.map +1 -0
- package/dist/types/interfaces/services/core/managers/index.d.ts.map +1 -0
- package/dist/types/{types/interfaces → interfaces}/services/core/managers/stream.d.ts +1 -1
- package/dist/types/interfaces/services/core/managers/stream.d.ts.map +1 -0
- package/dist/types/interfaces/services/core/managers/task.d.ts.map +1 -0
- package/dist/types/{types/interfaces → interfaces}/services/core/service.d.ts +1 -1
- package/dist/types/interfaces/services/core/service.d.ts.map +1 -0
- package/dist/types/{types/interfaces → interfaces}/services/index.d.ts +1 -0
- package/dist/types/interfaces/services/index.d.ts.map +1 -0
- package/dist/types/interfaces/services/index.js +1 -0
- package/dist/types/interfaces/services/index.js.map +1 -1
- package/dist/types/interfaces/services/mcp/index.d.ts +2 -0
- package/dist/types/interfaces/services/mcp/index.d.ts.map +1 -0
- package/dist/types/interfaces/services/mcp/index.js +2 -0
- package/dist/types/interfaces/services/mcp/index.js.map +1 -0
- package/dist/types/interfaces/services/mcp/service.d.ts +50 -0
- package/dist/types/interfaces/services/mcp/service.d.ts.map +1 -0
- package/dist/types/{schemas/deployment/proxy.js → interfaces/services/mcp/service.js} +1 -1
- package/dist/types/interfaces/services/mcp/service.js.map +1 -0
- package/dist/types/interfaces/services/protocol.d.ts.map +1 -0
- package/dist/types/interfaces/storage.d.ts.map +1 -0
- package/dist/types/schemas/a2a/agent.d.ts +2584 -0
- package/dist/types/schemas/a2a/agent.d.ts.map +1 -0
- package/dist/types/schemas/a2a/agent.js +9 -3
- package/dist/types/schemas/a2a/agent.js.map +1 -1
- package/dist/types/schemas/a2a/auth.d.ts +909 -0
- package/dist/types/schemas/a2a/auth.d.ts.map +1 -0
- package/dist/types/schemas/a2a/auth.js +11 -1
- package/dist/types/schemas/a2a/auth.js.map +1 -1
- package/dist/types/{types/schemas → schemas}/a2a/error.d.ts +243 -27
- package/dist/types/schemas/a2a/error.d.ts.map +1 -0
- package/dist/types/schemas/a2a/error.js +1 -1
- package/dist/types/schemas/a2a/error.js.map +1 -1
- package/dist/types/schemas/a2a/index.d.ts.map +1 -0
- package/dist/types/schemas/a2a/kind.d.ts +12 -0
- package/dist/types/schemas/a2a/kind.d.ts.map +1 -0
- package/dist/types/schemas/a2a/kind.js +1 -1
- package/dist/types/schemas/a2a/kind.js.map +1 -1
- package/dist/types/schemas/a2a/message.d.ts +10344 -0
- package/dist/types/schemas/a2a/message.d.ts.map +1 -0
- package/dist/types/schemas/a2a/message.js +1 -1
- package/dist/types/schemas/a2a/message.js.map +1 -1
- package/dist/types/schemas/a2a/notification.d.ts +1518 -0
- package/dist/types/schemas/a2a/notification.d.ts.map +1 -0
- package/dist/types/schemas/a2a/notification.js +2 -1
- package/dist/types/schemas/a2a/notification.js.map +1 -1
- package/dist/types/schemas/a2a/parameters.d.ts +957 -0
- package/dist/types/schemas/a2a/parameters.d.ts.map +1 -0
- package/dist/types/schemas/a2a/parameters.js +1 -1
- package/dist/types/schemas/a2a/parameters.js.map +1 -1
- package/dist/types/schemas/a2a/protocol.d.ts +14364 -0
- package/dist/types/schemas/a2a/protocol.d.ts.map +1 -0
- package/dist/types/schemas/a2a/protocol.js +1 -1
- package/dist/types/schemas/a2a/protocol.js.map +1 -1
- package/dist/types/schemas/a2a/rpc.d.ts +183 -0
- package/dist/types/schemas/a2a/rpc.d.ts.map +1 -0
- package/dist/types/schemas/a2a/rpc.js +1 -1
- package/dist/types/schemas/a2a/rpc.js.map +1 -1
- package/dist/types/schemas/a2a/task.d.ts +5887 -0
- package/dist/types/schemas/a2a/task.d.ts.map +1 -0
- package/dist/types/schemas/a2a/task.js +1 -1
- package/dist/types/schemas/a2a/task.js.map +1 -1
- package/dist/types/schemas/a2a/transport.d.ts +32 -0
- package/dist/types/schemas/a2a/transport.d.ts.map +1 -0
- package/dist/types/schemas/a2a/transport.js +2 -1
- package/dist/types/schemas/a2a/transport.js.map +1 -1
- package/dist/types/schemas/index.d.ts.map +1 -0
- package/dist/types/schemas/index.js +0 -1
- package/dist/types/schemas/index.js.map +1 -1
- package/dist/types/utils/index.d.ts +1 -8
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/transform.d.ts.map +1 -0
- package/dist/utils/common/constants.d.ts.map +1 -0
- package/dist/utils/common/errors.d.ts.map +1 -0
- package/dist/utils/common/utils.d.ts.map +1 -0
- package/dist/utils/common/zAsyncIterable-v3.d.ts +25 -0
- package/dist/utils/common/zAsyncIterable-v3.d.ts.map +1 -0
- package/dist/utils/common/zAsyncIterable-v3.js +39 -0
- package/dist/utils/common/zAsyncIterable-v3.js.map +1 -0
- package/dist/utils/common/zAsyncIterable.d.ts.map +1 -0
- package/dist/utils/common/zAsyncIterable.js +1 -0
- package/dist/utils/common/zAsyncIterable.js.map +1 -1
- package/dist/utils/index.d.ts +12 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -8
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/logging/index.d.ts.map +1 -0
- package/dist/utils/logging/log.d.ts.map +1 -0
- package/dist/utils/logging/log.js +15 -1
- package/dist/utils/logging/log.js.map +1 -1
- package/dist/utils/logging/logger.d.ts +19 -0
- package/dist/utils/logging/logger.d.ts.map +1 -0
- package/dist/utils/logging/logger.js +5 -37
- package/dist/utils/logging/logger.js.map +1 -1
- package/dist/{types/utils → utils}/storage/file.d.ts +1 -1
- package/dist/utils/storage/file.d.ts.map +1 -0
- package/dist/utils/storage/file.js +5 -4
- package/dist/utils/storage/file.js.map +1 -1
- package/dist/utils/storage/memory.d.ts.map +1 -0
- package/package.json +21 -27
- package/CHANGELOG.md +0 -276
- package/dist/types/client/a2a-client.d.ts.map +0 -1
- package/dist/types/client/index.d.ts.map +0 -1
- package/dist/types/schemas/deployment/index.js +0 -3
- package/dist/types/schemas/deployment/index.js.map +0 -1
- package/dist/types/schemas/deployment/proxy.js.map +0 -1
- package/dist/types/schemas/deployment/request.js +0 -88
- package/dist/types/schemas/deployment/request.js.map +0 -1
- package/dist/types/server/express/errors.d.ts.map +0 -1
- package/dist/types/server/express/index.d.ts.map +0 -1
- package/dist/types/server/express/middeware.d.ts.map +0 -1
- package/dist/types/server/express/server.d.ts.map +0 -1
- package/dist/types/server/index.d.ts.map +0 -1
- package/dist/types/services/a2a/factory/builder.d.ts.map +0 -1
- package/dist/types/services/a2a/factory/context.d.ts.map +0 -1
- package/dist/types/services/a2a/factory/event.d.ts.map +0 -1
- package/dist/types/services/a2a/factory/index.d.ts.map +0 -1
- package/dist/types/services/a2a/factory/method.d.ts.map +0 -1
- package/dist/types/services/a2a/factory/service.d.ts.map +0 -1
- package/dist/types/services/a2a/helpers/index.d.ts.map +0 -1
- package/dist/types/services/a2a/helpers/part.d.ts.map +0 -1
- package/dist/types/services/a2a/index.d.ts.map +0 -1
- package/dist/types/services/a2a/managers/cancellation.d.ts.map +0 -1
- package/dist/types/services/a2a/managers/connection.d.ts.map +0 -1
- package/dist/types/services/a2a/managers/context.d.ts.map +0 -1
- package/dist/types/services/a2a/managers/index.d.ts.map +0 -1
- package/dist/types/services/a2a/managers/task.d.ts.map +0 -1
- package/dist/types/services/a2a/methods/cancel-task.d.ts.map +0 -1
- package/dist/types/services/a2a/methods/get-task.d.ts.map +0 -1
- package/dist/types/services/a2a/methods/index.d.ts.map +0 -1
- package/dist/types/services/a2a/methods/resubscribe-task.d.ts.map +0 -1
- package/dist/types/services/a2a/methods/send-message.d.ts.map +0 -1
- package/dist/types/services/a2a/methods/stream-message.d.ts.map +0 -1
- package/dist/types/services/a2a/service.d.ts.map +0 -1
- package/dist/types/services/a2a/state/index.d.ts.map +0 -1
- package/dist/types/services/a2a/state/load.d.ts.map +0 -1
- package/dist/types/services/a2a/state/process.d.ts.map +0 -1
- package/dist/types/services/a2a/state/update/artifact.d.ts.map +0 -1
- package/dist/types/services/a2a/state/update/index.d.ts.map +0 -1
- package/dist/types/services/a2a/state/update/update.d.ts.map +0 -1
- package/dist/types/services/core/execution/execute.d.ts.map +0 -1
- package/dist/types/services/core/execution/index.d.ts.map +0 -1
- package/dist/types/services/core/index.d.ts.map +0 -1
- package/dist/types/services/core/managers/command.d.ts.map +0 -1
- package/dist/types/services/core/managers/event.d.ts.map +0 -1
- package/dist/types/services/core/managers/index.d.ts.map +0 -1
- package/dist/types/services/core/managers/stream.d.ts.map +0 -1
- package/dist/types/services/index.d.ts +0 -3
- package/dist/types/services/index.d.ts.map +0 -1
- package/dist/types/transport/index.d.ts.map +0 -1
- package/dist/types/transport/rpc/parser.d.ts.map +0 -1
- package/dist/types/transport/rpc/rpc-client.d.ts.map +0 -1
- package/dist/types/transport/streaming/event-stream.d.ts.map +0 -1
- package/dist/types/transport/trpc/a2a/factory/index.d.ts.map +0 -1
- package/dist/types/transport/trpc/a2a/index.d.ts.map +0 -1
- package/dist/types/transport/trpc/a2a/routes/index.d.ts.map +0 -1
- package/dist/types/transport/trpc/a2a/routes/info.d.ts.map +0 -1
- package/dist/types/transport/trpc/a2a/routes/message/index.d.ts.map +0 -1
- package/dist/types/transport/trpc/a2a/routes/tasks/index.d.ts.map +0 -1
- package/dist/types/transport/trpc/a2a/trpc.d.ts.map +0 -1
- package/dist/types/transport/trpc/index.d.ts.map +0 -1
- package/dist/types/types/ext.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -5
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/types/types/interfaces/client.d.ts.map +0 -1
- package/dist/types/types/interfaces/index.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/a2a/builder.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/a2a/context.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/a2a/engine.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/a2a/index.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/a2a/legacy.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/a2a/service.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/context/command.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/context/context.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/context/index.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/context/types.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/execution/engine.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/execution/environment.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/execution/execute.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/execution/index.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/index.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/managers/cancellation.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/managers/connection.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/managers/context.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/managers/event.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/managers/index.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/managers/stream.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/managers/task.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/core/service.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/index.d.ts.map +0 -1
- package/dist/types/types/interfaces/services/protocol.d.ts.map +0 -1
- package/dist/types/types/interfaces/storage.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/agent.d.ts +0 -509
- package/dist/types/types/schemas/a2a/agent.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/auth.d.ts +0 -285
- package/dist/types/types/schemas/a2a/auth.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/error.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/index.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/kind.d.ts +0 -28
- package/dist/types/types/schemas/a2a/kind.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/message.d.ts +0 -2570
- package/dist/types/types/schemas/a2a/message.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/notification.d.ts +0 -338
- package/dist/types/types/schemas/a2a/notification.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/parameters.d.ts +0 -308
- package/dist/types/types/schemas/a2a/parameters.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/protocol.d.ts +0 -3207
- package/dist/types/types/schemas/a2a/protocol.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/rpc.d.ts +0 -57
- package/dist/types/types/schemas/a2a/rpc.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/task.d.ts +0 -1498
- package/dist/types/types/schemas/a2a/task.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/transport.d.ts +0 -28
- package/dist/types/types/schemas/a2a/transport.d.ts.map +0 -1
- package/dist/types/types/schemas/deployment/index.d.ts +0 -3
- package/dist/types/types/schemas/deployment/index.d.ts.map +0 -1
- package/dist/types/types/schemas/deployment/proxy.d.ts +0 -96
- package/dist/types/types/schemas/deployment/proxy.d.ts.map +0 -1
- package/dist/types/types/schemas/deployment/request.d.ts +0 -508
- package/dist/types/types/schemas/deployment/request.d.ts.map +0 -1
- package/dist/types/types/schemas/index.d.ts.map +0 -1
- package/dist/types/types/utils/index.d.ts +0 -2
- package/dist/types/types/utils/index.d.ts.map +0 -1
- package/dist/types/types/utils/transform.d.ts.map +0 -1
- package/dist/types/utils/api/register.d.ts +0 -29
- package/dist/types/utils/api/register.d.ts.map +0 -1
- package/dist/types/utils/common/constants.d.ts.map +0 -1
- package/dist/types/utils/common/errors.d.ts.map +0 -1
- package/dist/types/utils/common/utils.d.ts.map +0 -1
- package/dist/types/utils/common/zAsyncIterable.d.ts.map +0 -1
- package/dist/types/utils/deployment/agents.d.ts +0 -57
- package/dist/types/utils/deployment/agents.d.ts.map +0 -1
- package/dist/types/utils/deployment/bundler.d.ts +0 -15
- package/dist/types/utils/deployment/bundler.d.ts.map +0 -1
- package/dist/types/utils/deployment/full-deployment.d.ts +0 -18
- package/dist/types/utils/deployment/full-deployment.d.ts.map +0 -1
- package/dist/types/utils/deployment/index.d.ts +0 -5
- package/dist/types/utils/deployment/index.d.ts.map +0 -1
- package/dist/types/utils/deployment/task-wrapper.d.ts +0 -43
- package/dist/types/utils/deployment/task-wrapper.d.ts.map +0 -1
- package/dist/types/utils/deployment/test-deployment.d.ts +0 -28
- package/dist/types/utils/deployment/test-deployment.d.ts.map +0 -1
- package/dist/types/utils/logging/index.d.ts.map +0 -1
- package/dist/types/utils/logging/log.d.ts.map +0 -1
- package/dist/types/utils/logging/logger.d.ts +0 -20
- package/dist/types/utils/logging/logger.d.ts.map +0 -1
- package/dist/types/utils/storage/file.d.ts.map +0 -1
- package/dist/types/utils/storage/memory.d.ts.map +0 -1
- package/dist/utils/api/register.js +0 -107
- package/dist/utils/api/register.js.map +0 -1
- package/dist/utils/deployment/agents.js +0 -96
- package/dist/utils/deployment/agents.js.map +0 -1
- package/dist/utils/deployment/bundler.js +0 -52
- package/dist/utils/deployment/bundler.js.map +0 -1
- package/dist/utils/deployment/full-deployment.js +0 -35
- package/dist/utils/deployment/full-deployment.js.map +0 -1
- package/dist/utils/deployment/index.js +0 -5
- package/dist/utils/deployment/index.js.map +0 -1
- package/dist/utils/deployment/task-wrapper.js +0 -44
- package/dist/utils/deployment/task-wrapper.js.map +0 -1
- package/dist/utils/deployment/test-deployment.js +0 -69
- package/dist/utils/deployment/test-deployment.js.map +0 -1
- /package/dist/{types/client → client}/a2a-client.d.ts +0 -0
- /package/dist/{types/client → client}/index.d.ts +0 -0
- /package/dist/{types/server → server}/express/errors.d.ts +0 -0
- /package/dist/{types/server → server}/express/index.d.ts +0 -0
- /package/dist/{types/server → server}/express/middeware.d.ts +0 -0
- /package/dist/{types/server → server}/index.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/factory/index.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/factory/method.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/factory/service.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/helpers/index.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/helpers/part.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/index.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/managers/cancellation.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/managers/connection.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/managers/context.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/managers/index.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/managers/task.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/methods/cancel-task.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/methods/index.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/methods/resubscribe-task.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/methods/send-message.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/methods/stream-message.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/state/index.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/state/load.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/state/process.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/state/update/artifact.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/state/update/index.d.ts +0 -0
- /package/dist/{types/services → services}/a2a/state/update/update.d.ts +0 -0
- /package/dist/{types/services → services}/core/execution/execute.d.ts +0 -0
- /package/dist/{types/services → services}/core/execution/index.d.ts +0 -0
- /package/dist/{types/services → services}/core/index.d.ts +0 -0
- /package/dist/{types/services → services}/core/managers/command.d.ts +0 -0
- /package/dist/{types/services → services}/core/managers/event.d.ts +0 -0
- /package/dist/{types/services → services}/core/managers/index.d.ts +0 -0
- /package/dist/{types/services → services}/core/managers/stream.d.ts +0 -0
- /package/dist/{types/transport → transport}/index.d.ts +0 -0
- /package/dist/{types/transport → transport}/rpc/parser.d.ts +0 -0
- /package/dist/{types/transport → transport}/rpc/rpc-client.d.ts +0 -0
- /package/dist/{types/transport → transport}/streaming/event-stream.d.ts +0 -0
- /package/dist/{types/transport → transport}/trpc/a2a/factory/index.d.ts +0 -0
- /package/dist/{types/transport → transport}/trpc/a2a/index.d.ts +0 -0
- /package/dist/{types/transport → transport}/trpc/a2a/routes/index.d.ts +0 -0
- /package/dist/{types/transport → transport}/trpc/a2a/routes/message/index.d.ts +0 -0
- /package/dist/{types/transport → transport}/trpc/a2a/routes/tasks/index.d.ts +0 -0
- /package/dist/{types/transport → transport}/trpc/index.d.ts +0 -0
- /package/dist/types/{types/ext.d.ts → ext.d.ts} +0 -0
- /package/dist/types/{types/interfaces → interfaces}/client.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/index.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/a2a/engine.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/a2a/index.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/core/context/command.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/core/context/index.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/core/context/types.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/core/execution/environment.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/core/execution/execute.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/core/execution/index.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/core/index.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/core/managers/cancellation.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/core/managers/connection.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/core/managers/context.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/core/managers/index.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/core/managers/task.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/services/protocol.d.ts +0 -0
- /package/dist/types/{types/interfaces → interfaces}/storage.d.ts +0 -0
- /package/dist/types/{types/schemas → schemas}/a2a/index.d.ts +0 -0
- /package/dist/types/{types/schemas → schemas}/index.d.ts +0 -0
- /package/dist/types/{types/utils → utils}/transform.d.ts +0 -0
- /package/dist/{types/utils → utils}/common/constants.d.ts +0 -0
- /package/dist/{types/utils → utils}/common/errors.d.ts +0 -0
- /package/dist/{types/utils → utils}/common/utils.d.ts +0 -0
- /package/dist/{types/utils → utils}/common/zAsyncIterable.d.ts +0 -0
- /package/dist/{types/utils → utils}/logging/index.d.ts +0 -0
- /package/dist/{types/utils → utils}/logging/log.d.ts +0 -0
- /package/dist/{types/utils → utils}/storage/memory.d.ts +0 -0
package/README.md
CHANGED
|
@@ -11,28 +11,15 @@ The artinet SDK is a TypeScript library designed for Agentic Communication. It's
|
|
|
11
11
|
|
|
12
12
|
This SDK leverages a service-oriented architecture for building AI agents allowing developers to easily create agents as simple processes or seamlessly embed them within a dedicated server.
|
|
13
13
|
|
|
14
|
-
### Quick Start
|
|
15
|
-
|
|
16
|
-
To build your own agent/server use the [`create-quick-agent`](https://www.npmjs.com/package/@artinet/create-quick-agent) (supports v0.5.2) command:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npx @artinet/create-quick-agent@latest
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
It has [serveral template projects](https://github.com/the-artinet-project/create-quick-agent) that you can use to get started building agents today.
|
|
23
|
-
|
|
24
14
|
## Table of Contents
|
|
25
15
|
|
|
26
16
|
- [artinet SDK](#artinet-sdk)
|
|
27
|
-
- [Quick Start](#quick-start)
|
|
28
17
|
- [Table of Contents](#table-of-contents)
|
|
29
18
|
- [Features](#features)
|
|
30
19
|
- [Installation](#installation)
|
|
31
20
|
- [Requirements](#requirements)
|
|
32
|
-
- [Documentation](#documentation)
|
|
33
21
|
- [Example](#example)
|
|
34
22
|
- [Running Tests](#running-tests)
|
|
35
|
-
- [Typescript](#typescript)
|
|
36
23
|
- [Usage](#usage)
|
|
37
24
|
- [Client](#client)
|
|
38
25
|
- [Basic Client Usage](#basic-client-usage)
|
|
@@ -44,35 +31,26 @@ It has [serveral template projects](https://github.com/the-artinet-project/creat
|
|
|
44
31
|
- [AgentEngine](#agentengine)
|
|
45
32
|
- [Event Handling/Monitoring \& Message Streaming](#event-handlingmonitoring--message-streaming)
|
|
46
33
|
- [Persistent Storage](#persistent-storage)
|
|
47
|
-
- [Logging](#logging)
|
|
48
|
-
- [Server Registration \& Discovery (v0.5.2)](#server-registration--discovery-v052)
|
|
49
34
|
- [Advanced Server Customization](#advanced-server-customization)
|
|
50
|
-
|
|
35
|
+
- [Cross Protocol Support](#cross-protocol-support)
|
|
51
36
|
- [Contributing](#contributing)
|
|
52
37
|
- [License](#license)
|
|
53
38
|
- [Acknowledgements](#acknowledgements)
|
|
54
39
|
|
|
40
|
+
**Breaking Changes in v0.5.8**
|
|
41
|
+
- Pino has been removed and replaced with console for better portability and is set to silent by default.
|
|
42
|
+
- The default handler for streamMessage no longer automatically emits an initial `submitted` and `working` event.
|
|
43
|
+
- Agent Registration, Bundling and Deployment utils have been removed (email us: humans@artinet.io for support).
|
|
44
|
+
- `@artinet/metadata-validator` has been removed due to build issues.
|
|
45
|
+
- getTask now correctly takes TaskQueryParams as an argument vs TaskIdParams in accordance with the A2A spec.
|
|
46
|
+
- AgentBuilder now returns a unique messageId for each status update instead of the original user provided messageId.
|
|
47
|
+
- In a future release the following packages will be set as peer dependancies to reduce the size of the build: `@modelcontextprotocol/sdk`, `@trpc/server`, `cors`, `express`
|
|
48
|
+
|
|
55
49
|
## Features
|
|
56
50
|
|
|
57
|
-
- **
|
|
58
|
-
- **
|
|
59
|
-
- **
|
|
60
|
-
- **Protocol Compliance:** Implements the complete A2A specification (v0.3.0) with support for any kind of transport layer (Express, tRPC, WebSockets, etc).
|
|
61
|
-
- **Code Deployment:** Bundle, test, and deploy agent code onto the artinet via the `./deployment` module (v0.5.3). Includes bundler, agent handler, and deployment utilities.
|
|
62
|
-
|
|
63
|
-
| Component/Feature | Description | Key Classes/Types |
|
|
64
|
-
| :------------------- | :-------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- |
|
|
65
|
-
| **Client** | Interact with A2A-compliant agents. Supports standard & streaming requests. | `A2AClient` |
|
|
66
|
-
| **Server** | Quickly spin up an Agent as a Server. | `createAgentServer`, `ExpressAgentServer`, `jsonRPCMiddleware` |
|
|
67
|
-
| **Agent Creation** | Design agents with the Agent Builder or take control with the Agent Engine. | `AgentEngine`, `Context`, `AgentBuilder` |
|
|
68
|
-
| **Storage** | Persist event state. In-memory and file-based options included. | `Store`, `InMemoryTaskStore`, `FileStore` |
|
|
69
|
-
| **Streaming (SSE)** | Handle real-time updates via Server-Sent Events with middleware support. | Built-in SSE handling, streaming generators |
|
|
70
|
-
| **Event Handling** | Monitor agent execution with our event system. | `EventManager`, `eventOverrides`, Event listeners (`start`, `update`, `error`, `complete`, `cancel`) |
|
|
71
|
-
| **Logging** | Configure structured logging for debugging and monitoring. | `logger`, `configureLogger`, `LogLevel` |
|
|
72
|
-
| **Transport Layers** | Built-in support for Express/TRPC. | Express middleware, tRPC router, or easily create your own. |
|
|
73
|
-
| **Core Types** | Fully implement A2A schema in Zod. | `AgentCard`, `Task`, `Message`, `Part`, `Artifact`, etc. |
|
|
74
|
-
| **Deployment** | Bundle, test, and deploy agents onto the artinet platform (v0.5.2). | `@artinet/sdk/deployment`, `fullDeployment`, `testDeployment`, `bundle` |
|
|
75
|
-
| **Agent Utilities** | Run agents in managed environments with our proxy system. | `artinet.v0.taskManager`, `artinet.v0.connect`, `artinet.v0.agent` |
|
|
51
|
+
- **Modular Design:** Everything you need to get started building collaborative agents + its flexible enough for advanced configuration.
|
|
52
|
+
- **Express:** Scaffold an Express Server with the `createAgentServer()` function. It handles all of the transport-layer complexity, adds A2A <-> JSON-RPC middleware, and manages Server-Sent Events (SSE) automatically.
|
|
53
|
+
- **Protocol Compliance:** Implements the complete A2A specification (v0.3.0) with support for any kind of transport layer (tRPC, WebSockets, etc).
|
|
76
54
|
|
|
77
55
|
## Installation
|
|
78
56
|
|
|
@@ -83,10 +61,10 @@ npm install @artinet/sdk
|
|
|
83
61
|
## Requirements
|
|
84
62
|
|
|
85
63
|
- Node.js (v22.0.0 or higher recommended)
|
|
86
|
-
|
|
64
|
+
<!--
|
|
87
65
|
## Documentation
|
|
88
66
|
|
|
89
|
-
For more detailed documentation visit our documentation site [here](https://the-artinet-project.github.io/artinet-documentation/).
|
|
67
|
+
For more detailed documentation visit our documentation site [here](https://the-artinet-project.github.io/artinet-documentation/). -->
|
|
90
68
|
|
|
91
69
|
## Example
|
|
92
70
|
|
|
@@ -176,7 +154,7 @@ async function runClient() {
|
|
|
176
154
|
console.log("Stream finished.");
|
|
177
155
|
}
|
|
178
156
|
|
|
179
|
-
runClient().catch(console.error);
|
|
157
|
+
await runClient().catch(console.error);
|
|
180
158
|
```
|
|
181
159
|
|
|
182
160
|
## Running Tests
|
|
@@ -185,16 +163,6 @@ runClient().catch(console.error);
|
|
|
185
163
|
npm test
|
|
186
164
|
```
|
|
187
165
|
|
|
188
|
-
To run tests with coverage:
|
|
189
|
-
|
|
190
|
-
```bash
|
|
191
|
-
npm run test:coverage
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
## Typescript
|
|
195
|
-
|
|
196
|
-
The Artinet SDK is written entirely in TypeScript and includes comprehensive type definitions, providing strong typing and enhanced developer experience.
|
|
197
|
-
|
|
198
166
|
## Usage
|
|
199
167
|
|
|
200
168
|
### Client
|
|
@@ -283,11 +251,11 @@ Use `createAgentServer()` to embed your Agents in an Express App.
|
|
|
283
251
|
|
|
284
252
|
#### Implementing an A2A Agent
|
|
285
253
|
|
|
286
|
-
The SDK provides a variety of options for creating complex ([
|
|
254
|
+
The SDK provides a variety of options for creating complex ([AgentEngines](#agentengine)) or simple agents ([AgentBuilder](#agentbuilder)).
|
|
287
255
|
|
|
288
256
|
##### AgentBuilder
|
|
289
257
|
|
|
290
|
-
**Option 1: Using AgentBuilder (Recommended for Simple Workflows)**
|
|
258
|
+
**Option 1: Using the AgentBuilder (Recommended for Simple Workflows)**
|
|
291
259
|
|
|
292
260
|
For simple agents with one or more processing steps, use the `AgentBuilder` pattern:
|
|
293
261
|
|
|
@@ -297,7 +265,7 @@ import { createAgentServer, AgentBuilder, TaskManager } from "@artinet/sdk";
|
|
|
297
265
|
//create a simple agent
|
|
298
266
|
const simpleAgent = AgentBuilder().text(() => "hello world!");
|
|
299
267
|
|
|
300
|
-
//or design a powerful
|
|
268
|
+
//or design a powerful multi-step agent
|
|
301
269
|
const { app, agent } = createAgentServer({
|
|
302
270
|
agent: AgentBuilder()
|
|
303
271
|
.text(({ command, context }) => {
|
|
@@ -349,7 +317,7 @@ The `AgentBuilder` approach is particularly useful when you need:
|
|
|
349
317
|
|
|
350
318
|
- **Step-by-step processing**: Break down complex tasks into discrete, manageable steps
|
|
351
319
|
- **Data flow between steps**: Pass results from one step to the next using the `args` parameter
|
|
352
|
-
- **Different content types**: Mix text, file, and data processing in a single
|
|
320
|
+
- **Different content types**: Mix text, file, and data processing in a single flow
|
|
353
321
|
- **Reusable components**: Build modular agents that can be easily edited or extended
|
|
354
322
|
|
|
355
323
|
##### AgentEngine
|
|
@@ -405,6 +373,7 @@ const { app, agent } = createAgentServer({
|
|
|
405
373
|
version: "1.0.0",
|
|
406
374
|
capabilities: { streaming: true },
|
|
407
375
|
skills: [{ id: "processor", name: "Text Processor" }],
|
|
376
|
+
...
|
|
408
377
|
},
|
|
409
378
|
tasks: new TaskManager(),
|
|
410
379
|
},
|
|
@@ -523,55 +492,6 @@ const { app, agent } = createAgentServer({
|
|
|
523
492
|
});
|
|
524
493
|
```
|
|
525
494
|
|
|
526
|
-
#### Logging
|
|
527
|
-
|
|
528
|
-
Use the built-in `pino`-based logger. Configure with `configureLogger`.
|
|
529
|
-
|
|
530
|
-
```typescript
|
|
531
|
-
import { logger, configureLogger, LogLevel, logDebug } from "@artinet/sdk";
|
|
532
|
-
|
|
533
|
-
// Configure logging level (optional)
|
|
534
|
-
configureLogger({ level: "debug" });
|
|
535
|
-
|
|
536
|
-
logger.info("Server starting...");
|
|
537
|
-
//use helper functions
|
|
538
|
-
logDebug("LoggerTest", { taskId: "task-123" }, "Task status updated.");
|
|
539
|
-
|
|
540
|
-
// Create child loggers with bounded contexts
|
|
541
|
-
const taskLogger = logger.child({ taskId: "abc" });
|
|
542
|
-
taskLogger.info("Processing step X");
|
|
543
|
-
```
|
|
544
|
-
|
|
545
|
-
#### Server Registration & Discovery (v0.5.2)
|
|
546
|
-
|
|
547
|
-
The SDK includes features to help make your agent discoverable using the new service-based architecture:
|
|
548
|
-
|
|
549
|
-
- **Automatic Registration:** You can configure your agent server to automatically register your `AgentCard` with the [A2A Registry](https://artinet.io) upon startup by setting `register: true` in the server parameters (temporarily unavailable in v0.5.6).
|
|
550
|
-
|
|
551
|
-
```typescript
|
|
552
|
-
const { app, agent } = createAgentServer({
|
|
553
|
-
agent: {
|
|
554
|
-
engine: myAgent,
|
|
555
|
-
agentCard: {
|
|
556
|
-
// ...
|
|
557
|
-
url: "http://my-public-domain:3000/my-agent", // Publicly accessible URL
|
|
558
|
-
// ...
|
|
559
|
-
},
|
|
560
|
-
},
|
|
561
|
-
});
|
|
562
|
-
```
|
|
563
|
-
|
|
564
|
-
- **Custom Agent Card Path:** By default, the server exposes its `AgentCard` at `/.well-known/agent-card.json` following [RFC8615](https://datatracker.ietf.org/doc/html/rfc8615). You can specify a custom path using the `agentCardPath` option.
|
|
565
|
-
|
|
566
|
-
```typescript
|
|
567
|
-
const { app, agent } = createAgentServer({
|
|
568
|
-
...
|
|
569
|
-
basePath: "/apiV2",
|
|
570
|
-
agentCardPath: "/apiV2/custom-card-info", // Custom agent card path
|
|
571
|
-
});
|
|
572
|
-
// The AgentCard is now accessible at http://localhost:3000/apiV2/custom-card-info
|
|
573
|
-
```
|
|
574
|
-
|
|
575
495
|
#### Advanced Server Customization
|
|
576
496
|
|
|
577
497
|
Our new architecture provides multiple ways to customize your agent server:
|
|
@@ -595,7 +515,7 @@ const { app, agent } = createAgentServer({
|
|
|
595
515
|
},
|
|
596
516
|
});
|
|
597
517
|
|
|
598
|
-
// custom middleware
|
|
518
|
+
// more custom middleware
|
|
599
519
|
app.use("/custom", (req, res, next) => {
|
|
600
520
|
...
|
|
601
521
|
});
|
|
@@ -686,121 +606,77 @@ for await (const update of stream) {
|
|
|
686
606
|
- Proper error handling and JSON-RPC compliance
|
|
687
607
|
- CORS headers if needed for web clients
|
|
688
608
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
We are excited to introduce new capabilities for deploying agents directly onto the artinet.
|
|
692
|
-
|
|
693
|
-
We've added a `testDeployment` utility which is available for all users letting you bundle and test your agent logic in a temporary sandboxed environment.
|
|
694
|
-
|
|
695
|
-
**QUICK-AGENTS** Use the `fullDeployment` utility, which allows direct deployment of your bundled agent code and `AgentCard` to the Artinet platform (requires an `ARTINET_API_KEY`).
|
|
609
|
+
#### Cross Protocol Support
|
|
696
610
|
|
|
697
|
-
|
|
611
|
+
**MCP (Model Context Protocol) Integration**
|
|
698
612
|
|
|
699
|
-
|
|
613
|
+
The SDK provides a Model Context Protocol (MCP) <-> A2A compatability layer.
|
|
700
614
|
|
|
701
|
-
|
|
615
|
+
Use `createMCPAgent` to expose your agent via MCP:
|
|
702
616
|
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
const llmResponse = await artinet.v0.connect({
|
|
726
|
-
agentId: "SomeLLMAgentID",
|
|
727
|
-
messages: [{ role: "user", content: "Tell me a joke." }]
|
|
728
|
-
});
|
|
729
|
-
|
|
730
|
-
// Or communicate tasks with artinet.v0.agent
|
|
731
|
-
const anotherAgent = artinet.v0.agent({
|
|
732
|
-
baseUrl: "https://agents.artinet.io/agentId=456",
|
|
733
|
-
});
|
|
734
|
-
const taskResult = await anotherAgent.sendTask({
|
|
735
|
-
...
|
|
736
|
-
});
|
|
737
|
-
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
// The host environment will invoke this taskManager with the agent's logic.
|
|
741
|
-
await artinet.v0.taskManager({ taskHandler: myAgentLogic });
|
|
742
|
-
```
|
|
743
|
-
|
|
744
|
-
_Note: The `taskHandlerProxy` and `fetchResponseProxy` utilities are now deprecated in favor of `artinet.v0.taskManager` and `artinet.v0.connect` respectively._
|
|
745
|
-
|
|
746
|
-
- **Test-Agents (Experimental):** Simulate and test your agents @ agents.artinet.io/test/deploy using the `testDeployment` tool.
|
|
747
|
-
|
|
748
|
-
```typescript
|
|
749
|
-
import {
|
|
750
|
-
testDeployment,
|
|
751
|
-
ServerDeploymentRequestParams,
|
|
752
|
-
SendTaskRequest,
|
|
753
|
-
} from "@artinet/sdk/deployment";
|
|
754
|
-
|
|
755
|
-
const deploymentParams: ServerDeploymentRequestParams = {
|
|
756
|
-
code: "/* bundled code string */",
|
|
757
|
-
};
|
|
758
|
-
//create a list of tasks for your agent to complete once deployed
|
|
759
|
-
const testRequests: SendTaskRequest[] = [
|
|
760
|
-
{
|
|
761
|
-
id: "t1",
|
|
762
|
-
message: { role: "user", parts: [{ type: "text", text: "Hi!" }] },
|
|
617
|
+
```typescript
|
|
618
|
+
import { createMCPAgent, createAgent } from "@artinet/sdk";
|
|
619
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
620
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
621
|
+
|
|
622
|
+
// Wrap your agent in an MCP Server
|
|
623
|
+
const mcpAgent = createMCPAgent({
|
|
624
|
+
serverInfo: {
|
|
625
|
+
name: "My MCP Agent",
|
|
626
|
+
version: "1.0.0",
|
|
627
|
+
},
|
|
628
|
+
options: {
|
|
629
|
+
...
|
|
630
|
+
},
|
|
631
|
+
agent: createAgent({
|
|
632
|
+
engine: myAgentEngine,
|
|
633
|
+
agentCard: {
|
|
634
|
+
name: "My Agent",
|
|
635
|
+
url: "http://localhost:3000/a2a",
|
|
636
|
+
version: "1.0.0",
|
|
637
|
+
capabilities: { streaming: true },
|
|
638
|
+
skills: [{ id: "helper", name: "Helper Agent" }],
|
|
763
639
|
},
|
|
764
|
-
|
|
640
|
+
}),
|
|
641
|
+
agentCardUri: "agent://card", //customize the URI for your AgentCard
|
|
642
|
+
});
|
|
765
643
|
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
644
|
+
// The MCPAgent is a fully compliant MCP Server so you can use it as you normally would.
|
|
645
|
+
mcpAgent.registerTool({
|
|
646
|
+
...
|
|
647
|
+
});
|
|
770
648
|
|
|
771
|
-
|
|
649
|
+
await mcpAgent.connect(new StdioServerTransport());
|
|
650
|
+
```
|
|
772
651
|
|
|
773
|
-
|
|
774
|
-
import {
|
|
775
|
-
fullDeployment,
|
|
776
|
-
ServerDeploymentRequestParams,
|
|
777
|
-
} from "@artinet/sdk/deployment";
|
|
652
|
+
Use an MCP Client to interact with an mcpAgent:
|
|
778
653
|
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
654
|
+
```typescript
|
|
655
|
+
...
|
|
656
|
+
// Access the AgentCard as a Resource
|
|
657
|
+
const agentCard = await client.readResource({ uri: "agent://card" });
|
|
658
|
+
|
|
659
|
+
// or send messages via Tool Calling
|
|
660
|
+
const result = await client.callTool({
|
|
661
|
+
name: "send-message",
|
|
662
|
+
arguments: {
|
|
663
|
+
...
|
|
664
|
+
message: {
|
|
665
|
+
...
|
|
666
|
+
parts: [{ kind: "text", text: "Hello from MCP!" }],
|
|
783
667
|
},
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
const deploymentResult = await fullDeployment(deploymentParams); // Requires an ARTINET_API_KEY environment variable
|
|
788
|
-
console.log("Deployment Result:", deploymentResult);
|
|
789
|
-
```
|
|
790
|
-
|
|
791
|
-
- **Dedicated Endpoints:** Once deployed your agent will be available On-Demand at its dedicated enpoint. (e.g. "https://agents.artinet.io/agentId=0xabf698845743538727a81352bfcfdb724e5c2bbe3113a26362482248f9f3e5fa/.well-known/agent-card.json")
|
|
792
|
-
- **New Types:** To support these features, new types for server deployment requests and responses (such as `ServerDeploymentRequestParams`, `ServerDeploymentResponse`) have been added to `src/types/extended-schema.ts`. New types for sandboxed agent interactions (`TaskProxy`, `ConnectAPICallback`, `ClientProxy`, etc.) are in `src/types/proxy.ts`.
|
|
793
|
-
|
|
794
|
-
**QUICK-AGENT FAQs**
|
|
668
|
+
},
|
|
669
|
+
});
|
|
670
|
+
```
|
|
795
671
|
|
|
796
|
-
|
|
797
|
-
- Quick-Agents do not have access to a filesystem or networking (limited persistance & networking capabalities are on the project roadmap).
|
|
798
|
-
- Quick-Agents v0 does not support streaming, push notifications or state transition history (these capabilities are on the project roadmap).
|
|
799
|
-
- Larger deployments can take significant time to deploy which may cause `fullDeployment` to timeout. In such cases wait to see if the listing has been added to your account before trying to deploy again.
|
|
800
|
-
- Quick-Agent logic is public, therefore the artinet project is not liable for any sensitive material held within a deployment.
|
|
801
|
-
- Available with version 0.5.6+ of the SDK with enhanced deployment capabilities.
|
|
672
|
+
**MCP Tools & Resources:**
|
|
802
673
|
|
|
803
|
-
|
|
674
|
+
- `send-message`: Send messages to the A2A agent
|
|
675
|
+
- `get-task`: Retrieve tasks by ID
|
|
676
|
+
- `cancel-task`: Cancel a running task
|
|
677
|
+
- `agent://card`: Retrieve the AgentCard
|
|
678
|
+
- `send-streaming-message`, `task-resubscribe` & `push-notifications` etc are currently not supported by default.
|
|
679
|
+
- Leverage the A2A Zod Schemas to implement them manually.
|
|
804
680
|
|
|
805
681
|
## Contributing
|
|
806
682
|
|
|
@@ -814,10 +690,9 @@ This project is licensed under the Apache License 2.0 - see the `LICENSE` file f
|
|
|
814
690
|
|
|
815
691
|
## Acknowledgements
|
|
816
692
|
|
|
817
|
-
This SDK builds upon the concepts and specifications of the [Agent2Agent (A2A) Protocol](https://github.com/google-a2a/A2A)
|
|
693
|
+
This SDK builds upon the concepts and specifications of the [Agent2Agent (A2A) Protocol](https://github.com/google-a2a/A2A).
|
|
818
694
|
|
|
819
695
|
Libraries used include:
|
|
820
696
|
|
|
821
697
|
- [Express.js](https://expressjs.com/) for the server framework.
|
|
822
|
-
- [Pino](https://getpino.io/) for logging.
|
|
823
698
|
- [EventSource Parser](https://github.com/rexxars/eventsource-parser) for SSE streaming.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a2a-client.d.ts","sourceRoot":"","sources":["../../src/client/a2a-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,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CAC3B,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC;IAY7C;;;;OAIG;IACG,uBAAuB,CAC3B,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC;IAY7C;;;;OAIG;IACH,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC;IAOpE;;;;OAIG;IACG,QAAQ,CACZ,UAAU,EAAE,WAAW,GAAG,mBAAmB,GAAG,wBAAwB,GACvE,OAAO,CAAC,OAAO,CAAC;IA4BnB;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAIjD;;;;OAIG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAI5C;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIhC;;OAEG;IACH,YAAY,IAAI,IAAI;CAGrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/server/express/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGnD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,mBAuC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/express/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middeware.d.ts","sourceRoot":"","sources":["../../../src/server/express/middeware.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,6BAAyB;AAiCvD,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,mBAAmB,EAC5B,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,QAAQ,EACb,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,IAAI,CAAC,CAkGf"}
|
|
@@ -15,12 +15,12 @@ export declare function createAgentServer(params: ServerParams & {
|
|
|
15
15
|
agentCardPath?: string;
|
|
16
16
|
register?: boolean;
|
|
17
17
|
}): {
|
|
18
|
-
app: express.Express;
|
|
18
|
+
app: import("express-serve-static-core").Express;
|
|
19
19
|
agent: Agent<{
|
|
20
20
|
message: {
|
|
21
21
|
role: "user" | "agent";
|
|
22
|
+
kind: "message";
|
|
22
23
|
parts: ({
|
|
23
|
-
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
24
24
|
file: {
|
|
25
25
|
bytes: string;
|
|
26
26
|
name?: string | undefined;
|
|
@@ -29,29 +29,29 @@ export declare function createAgentServer(params: ServerParams & {
|
|
|
29
29
|
} | {
|
|
30
30
|
uri: string;
|
|
31
31
|
name?: string | undefined;
|
|
32
|
-
mimeType?: string | undefined;
|
|
33
32
|
bytes?: undefined;
|
|
33
|
+
mimeType?: string | undefined;
|
|
34
34
|
};
|
|
35
|
+
kind: "file";
|
|
35
36
|
metadata?: Record<string, unknown> | undefined;
|
|
36
37
|
} | {
|
|
37
|
-
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
38
38
|
text: string;
|
|
39
|
+
kind: "text";
|
|
39
40
|
metadata?: Record<string, unknown> | undefined;
|
|
40
41
|
} | {
|
|
41
|
-
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
42
42
|
data: Record<string, unknown>;
|
|
43
|
+
kind: "data";
|
|
43
44
|
metadata?: Record<string, unknown> | undefined;
|
|
44
45
|
})[];
|
|
45
46
|
messageId: string;
|
|
46
|
-
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
47
47
|
metadata?: Record<string, unknown> | undefined;
|
|
48
48
|
extensions?: string[] | undefined;
|
|
49
49
|
referenceTaskIds?: string[] | undefined;
|
|
50
50
|
taskId?: string | undefined;
|
|
51
51
|
contextId?: string | undefined;
|
|
52
52
|
};
|
|
53
|
+
metadata?: Record<string, unknown> | undefined;
|
|
53
54
|
configuration?: {
|
|
54
|
-
acceptedOutputModes?: string[] | undefined;
|
|
55
55
|
historyLength?: number | undefined;
|
|
56
56
|
pushNotificationConfig?: {
|
|
57
57
|
url: string;
|
|
@@ -62,9 +62,9 @@ export declare function createAgentServer(params: ServerParams & {
|
|
|
62
62
|
credentials?: string | undefined;
|
|
63
63
|
} | undefined;
|
|
64
64
|
} | undefined;
|
|
65
|
+
acceptedOutputModes?: string[] | undefined;
|
|
65
66
|
blocking?: boolean | undefined;
|
|
66
67
|
} | undefined;
|
|
67
|
-
metadata?: Record<string, unknown> | undefined;
|
|
68
68
|
}, import("../../types/index.js").TaskAndHistory, import("../../types/index.js").UpdateEvent>;
|
|
69
69
|
};
|
|
70
70
|
export type ExpressAgentServer = ReturnType<typeof createAgentServer>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/server/express/server.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,6BAAyB;AAE7E,OAAa,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAIzC,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAmCD,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,GAAG;IACrB,KAAK,EAAE,KAAK,GAAG,iBAAiB,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuDF;AAED,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* workflows with type-safe step composition and automatic execution orchestration.
|
|
11
11
|
*
|
|
12
12
|
* @module A2ABuilder
|
|
13
|
-
* @version
|
|
13
|
+
* @version 0.5.7
|
|
14
14
|
* @since 0.5.6
|
|
15
15
|
* @author The Artinet Project
|
|
16
16
|
*/
|
|
@@ -278,8 +278,8 @@ export declare class EngineBuilder<TCommand extends MessageSendParams = MessageS
|
|
|
278
278
|
export declare const AgentBuilder: () => EngineBuilder<{
|
|
279
279
|
message: {
|
|
280
280
|
role: "user" | "agent";
|
|
281
|
+
kind: "message";
|
|
281
282
|
parts: ({
|
|
282
|
-
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
283
283
|
file: {
|
|
284
284
|
bytes: string;
|
|
285
285
|
name?: string | undefined;
|
|
@@ -288,29 +288,29 @@ export declare const AgentBuilder: () => EngineBuilder<{
|
|
|
288
288
|
} | {
|
|
289
289
|
uri: string;
|
|
290
290
|
name?: string | undefined;
|
|
291
|
-
mimeType?: string | undefined;
|
|
292
291
|
bytes?: undefined;
|
|
292
|
+
mimeType?: string | undefined;
|
|
293
293
|
};
|
|
294
|
+
kind: "file";
|
|
294
295
|
metadata?: Record<string, unknown> | undefined;
|
|
295
296
|
} | {
|
|
296
|
-
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
297
297
|
text: string;
|
|
298
|
+
kind: "text";
|
|
298
299
|
metadata?: Record<string, unknown> | undefined;
|
|
299
300
|
} | {
|
|
300
|
-
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
301
301
|
data: Record<string, unknown>;
|
|
302
|
+
kind: "data";
|
|
302
303
|
metadata?: Record<string, unknown> | undefined;
|
|
303
304
|
})[];
|
|
304
305
|
messageId: string;
|
|
305
|
-
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
306
306
|
metadata?: Record<string, unknown> | undefined;
|
|
307
307
|
extensions?: string[] | undefined;
|
|
308
308
|
referenceTaskIds?: string[] | undefined;
|
|
309
309
|
taskId?: string | undefined;
|
|
310
310
|
contextId?: string | undefined;
|
|
311
311
|
};
|
|
312
|
+
metadata?: Record<string, unknown> | undefined;
|
|
312
313
|
configuration?: {
|
|
313
|
-
acceptedOutputModes?: string[] | undefined;
|
|
314
314
|
historyLength?: number | undefined;
|
|
315
315
|
pushNotificationConfig?: {
|
|
316
316
|
url: string;
|
|
@@ -321,9 +321,9 @@ export declare const AgentBuilder: () => EngineBuilder<{
|
|
|
321
321
|
credentials?: string | undefined;
|
|
322
322
|
} | undefined;
|
|
323
323
|
} | undefined;
|
|
324
|
+
acceptedOutputModes?: string[] | undefined;
|
|
324
325
|
blocking?: boolean | undefined;
|
|
325
326
|
} | undefined;
|
|
326
|
-
metadata?: Record<string, unknown> | undefined;
|
|
327
327
|
}, []>;
|
|
328
328
|
/**
|
|
329
329
|
* Creates an agent execution engine from a list of workflow steps.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../../src/services/a2a/factory/builder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,WAAW,EACX,IAAI,EACJ,UAAU,EACV,yBAAyB,EACzB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EAIR,WAAW,EAEX,YAAY,EAEZ,aAAa,EAId,gCAAyB;AAI1B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,QAAQ,CAClB,QAAQ,SAAS,iBAAiB,GAAG,iBAAiB,EACtD,KAAK,SAAS,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,EACjD,YAAY,SAAS,SAAS,OAAO,EAAE,GAAG,EAAE,EAC5C,YAAY,SAAS,SAAS,OAAO,EAAE,GAAG,EAAE,EAC5C,OAAO,SACH,UAAU,CAAC,KAAK,CAAC,GACjB,yBAAyB,CAAC,KAAK,EAAE,YAAY,CAAC,GAC9C,KAAK,CAAC,KAAK,CAAC,GACZ,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,IAC3B,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,QAAQ,CAClB,QAAQ,SAAS,iBAAiB,GAAG,iBAAiB,EACtD,KAAK,SAAS,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,EACjD,YAAY,SAAS,S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* @version
|
|
13
|
+
* @version 0.5.7
|
|
14
14
|
* @since 0.5.6
|
|
15
15
|
* @author The Artinet Project
|
|
16
16
|
*/
|
|
17
17
|
import { TaskState, } from "../../../types/index.js";
|
|
18
18
|
import { createAgent } from "./service.js";
|
|
19
|
+
import { v4 as uuidv4 } from "uuid";
|
|
19
20
|
/**
|
|
20
21
|
* Fluent builder for constructing A2A agent execution engines.
|
|
21
22
|
*
|
|
@@ -285,7 +286,6 @@ export function createAgentExecutor(stepsList) {
|
|
|
285
286
|
};
|
|
286
287
|
const contextId = context.command.message.contextId;
|
|
287
288
|
const taskId = context.command.message.taskId;
|
|
288
|
-
const messageId = context.command.message.messageId;
|
|
289
289
|
if (!contextId || !taskId) {
|
|
290
290
|
throw new Error("Context ID and task ID are required");
|
|
291
291
|
}
|
|
@@ -303,7 +303,7 @@ export function createAgentExecutor(stepsList) {
|
|
|
303
303
|
const finalMessage = {
|
|
304
304
|
taskId: taskId,
|
|
305
305
|
contextId: contextId,
|
|
306
|
-
messageId:
|
|
306
|
+
messageId: uuidv4(),
|
|
307
307
|
kind: "message",
|
|
308
308
|
role: "agent",
|
|
309
309
|
parts: [],
|
|
@@ -321,7 +321,7 @@ export function createAgentExecutor(stepsList) {
|
|
|
321
321
|
state: TaskState.working,
|
|
322
322
|
timestamp: new Date().toISOString(),
|
|
323
323
|
message: {
|
|
324
|
-
messageId:
|
|
324
|
+
messageId: uuidv4(),
|
|
325
325
|
kind: "message",
|
|
326
326
|
role: "agent",
|
|
327
327
|
parts: parts,
|
|
@@ -343,7 +343,7 @@ export function createAgentExecutor(stepsList) {
|
|
|
343
343
|
state: TaskState.working,
|
|
344
344
|
timestamp: new Date().toISOString(),
|
|
345
345
|
message: {
|
|
346
|
-
messageId:
|
|
346
|
+
messageId: uuidv4(),
|
|
347
347
|
kind: "message",
|
|
348
348
|
role: "agent",
|
|
349
349
|
parts: parts,
|
|
@@ -364,7 +364,7 @@ export function createAgentExecutor(stepsList) {
|
|
|
364
364
|
state: TaskState.working,
|
|
365
365
|
timestamp: new Date().toISOString(),
|
|
366
366
|
message: {
|
|
367
|
-
messageId:
|
|
367
|
+
messageId: uuidv4(),
|
|
368
368
|
kind: "message",
|
|
369
369
|
role: "agent",
|
|
370
370
|
parts: parts,
|