@artinet/sdk 0.5.4 → 0.5.6
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/CHANGELOG.md +106 -20
- package/README.md +472 -215
- package/dist/client/a2a-client.js +6 -1
- package/dist/client/a2a-client.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/server/express/errors.js +51 -0
- package/dist/server/express/errors.js.map +1 -0
- package/dist/server/express/index.js +4 -0
- package/dist/server/express/index.js.map +1 -0
- package/dist/server/express/middeware.js +116 -0
- package/dist/server/express/middeware.js.map +1 -0
- package/dist/server/express/server.js +80 -0
- package/dist/server/express/server.js.map +1 -0
- package/dist/server/index.js +1 -7
- package/dist/server/index.js.map +1 -1
- package/dist/services/a2a/factory/builder.js +392 -0
- package/dist/services/a2a/factory/builder.js.map +1 -0
- package/dist/services/a2a/factory/context.js +151 -0
- package/dist/services/a2a/factory/context.js.map +1 -0
- package/dist/services/a2a/factory/event.js +182 -0
- package/dist/services/a2a/factory/event.js.map +1 -0
- package/dist/services/a2a/factory/index.js +6 -0
- package/dist/services/a2a/factory/index.js.map +1 -0
- package/dist/services/a2a/factory/method.js +15 -0
- package/dist/services/a2a/factory/method.js.map +1 -0
- package/dist/services/a2a/factory/service.js +12 -0
- package/dist/services/a2a/factory/service.js.map +1 -0
- package/dist/services/a2a/helpers/index.js +2 -0
- package/dist/services/a2a/helpers/index.js.map +1 -0
- package/dist/services/a2a/helpers/part.js +47 -0
- package/dist/services/a2a/helpers/part.js.map +1 -0
- package/dist/services/a2a/index.js +5 -1
- package/dist/services/a2a/index.js.map +1 -1
- package/dist/services/a2a/managers/cancellation.js +17 -0
- package/dist/services/a2a/managers/cancellation.js.map +1 -0
- package/dist/services/a2a/managers/connection.js +17 -0
- package/dist/services/a2a/managers/connection.js.map +1 -0
- package/dist/services/a2a/managers/context.js +17 -0
- package/dist/services/a2a/managers/context.js.map +1 -0
- package/dist/services/a2a/managers/index.js +6 -0
- package/dist/services/a2a/managers/index.js.map +1 -0
- package/dist/services/a2a/managers/task.js +17 -0
- package/dist/services/a2a/managers/task.js.map +1 -0
- package/dist/services/a2a/methods/cancel-task.js +47 -0
- package/dist/services/a2a/methods/cancel-task.js.map +1 -0
- package/dist/services/a2a/methods/get-task.js +15 -0
- package/dist/services/a2a/methods/get-task.js.map +1 -0
- package/dist/services/a2a/methods/index.js +6 -0
- package/dist/services/a2a/methods/index.js.map +1 -0
- package/dist/services/a2a/methods/resubscribe-task.js +77 -0
- package/dist/services/a2a/methods/resubscribe-task.js.map +1 -0
- package/dist/services/a2a/methods/send-message.js +20 -0
- package/dist/services/a2a/methods/send-message.js.map +1 -0
- package/dist/services/a2a/methods/stream-message.js +39 -0
- package/dist/services/a2a/methods/stream-message.js.map +1 -0
- package/dist/services/a2a/service.js +88 -239
- package/dist/services/a2a/service.js.map +1 -1
- package/dist/services/a2a/state/index.js +4 -0
- package/dist/services/a2a/state/index.js.map +1 -0
- package/dist/services/a2a/state/load.js +43 -0
- package/dist/services/a2a/state/load.js.map +1 -0
- package/dist/services/a2a/state/process.js +14 -0
- package/dist/services/a2a/state/process.js.map +1 -0
- package/dist/services/a2a/state/update/artifact.js +40 -0
- package/dist/services/a2a/state/update/artifact.js.map +1 -0
- package/dist/services/a2a/state/update/index.js +3 -0
- package/dist/services/a2a/state/update/index.js.map +1 -0
- package/dist/{server/lib/update/base.js → services/a2a/state/update/update.js} +23 -9
- package/dist/services/a2a/state/update/update.js.map +1 -0
- package/dist/services/core/execution/execute.js +26 -0
- package/dist/services/core/execution/execute.js.map +1 -0
- package/dist/services/core/execution/index.js +2 -0
- package/dist/services/core/execution/index.js.map +1 -0
- package/dist/services/core/index.js +3 -0
- package/dist/services/core/index.js.map +1 -0
- package/dist/services/core/managers/command.js +95 -0
- package/dist/services/core/managers/command.js.map +1 -0
- package/dist/services/core/managers/event.js +57 -0
- package/dist/services/core/managers/event.js.map +1 -0
- package/dist/services/core/managers/index.js +4 -0
- package/dist/services/core/managers/index.js.map +1 -0
- package/dist/services/core/managers/stream.js +78 -0
- package/dist/services/core/managers/stream.js.map +1 -0
- package/dist/services/index.js +2 -1
- package/dist/services/index.js.map +1 -1
- package/dist/transport/index.js +1 -1
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/rpc/parser.js +13 -5
- package/dist/transport/rpc/parser.js.map +1 -1
- package/dist/transport/rpc/rpc-client.js +10 -2
- package/dist/transport/rpc/rpc-client.js.map +1 -1
- package/dist/transport/streaming/event-stream.js +5 -1
- package/dist/transport/streaming/event-stream.js.map +1 -1
- package/dist/transport/trpc/a2a/factory/index.js +2 -0
- package/dist/transport/trpc/a2a/factory/index.js.map +1 -0
- package/dist/transport/trpc/a2a/factory/router.js +17 -0
- package/dist/transport/trpc/a2a/factory/router.js.map +1 -0
- package/dist/transport/trpc/a2a/index.js +4 -0
- package/dist/transport/trpc/a2a/index.js.map +1 -0
- package/dist/transport/trpc/a2a/routes/index.js +4 -0
- package/dist/transport/trpc/a2a/routes/index.js.map +1 -0
- package/dist/transport/trpc/a2a/routes/info.js +10 -0
- package/dist/transport/trpc/a2a/routes/info.js.map +1 -0
- package/dist/transport/trpc/a2a/routes/message/index.js +2 -0
- package/dist/transport/trpc/a2a/routes/message/index.js.map +1 -0
- package/dist/transport/trpc/a2a/routes/message/route.js +38 -0
- package/dist/transport/trpc/a2a/routes/message/route.js.map +1 -0
- package/dist/transport/trpc/a2a/routes/tasks/index.js +2 -0
- package/dist/transport/trpc/a2a/routes/tasks/index.js.map +1 -0
- package/dist/transport/trpc/a2a/routes/tasks/route.js +71 -0
- package/dist/transport/trpc/a2a/routes/tasks/route.js.map +1 -0
- package/dist/transport/trpc/a2a/trpc.js +36 -0
- package/dist/transport/trpc/a2a/trpc.js.map +1 -0
- package/dist/transport/trpc/index.js +2 -0
- package/dist/transport/trpc/index.js.map +1 -0
- package/dist/types/client/a2a-client.d.ts +5 -1
- package/dist/types/client/a2a-client.d.ts.map +1 -1
- package/dist/types/ext.js +11 -0
- package/dist/types/ext.js.map +1 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -4
- package/dist/types/index.js.map +1 -1
- package/dist/types/interfaces/client.js +6 -0
- package/dist/types/interfaces/client.js.map +1 -0
- package/dist/types/interfaces/index.js +4 -0
- package/dist/types/interfaces/index.js.map +1 -0
- package/dist/types/interfaces/services/a2a/builder.js +2 -0
- package/dist/types/interfaces/services/a2a/builder.js.map +1 -0
- package/dist/types/interfaces/services/a2a/context.js +6 -0
- package/dist/types/interfaces/services/a2a/context.js.map +1 -0
- package/dist/types/interfaces/services/a2a/engine.js +6 -0
- package/dist/types/interfaces/services/a2a/engine.js.map +1 -0
- package/dist/types/interfaces/services/a2a/index.js +6 -0
- package/dist/types/interfaces/services/a2a/index.js.map +1 -0
- package/dist/types/interfaces/services/a2a/legacy.js +6 -0
- package/dist/types/interfaces/services/a2a/legacy.js.map +1 -0
- package/dist/types/interfaces/services/a2a/service.js +6 -0
- package/dist/types/interfaces/services/a2a/service.js.map +1 -0
- package/dist/types/interfaces/services/core/context/command.js +6 -0
- package/dist/types/interfaces/services/core/context/command.js.map +1 -0
- package/dist/types/interfaces/services/core/context/context.js +6 -0
- package/dist/types/interfaces/services/core/context/context.js.map +1 -0
- package/dist/types/interfaces/services/core/context/index.js +4 -0
- package/dist/types/interfaces/services/core/context/index.js.map +1 -0
- package/dist/types/interfaces/services/core/context/types.js +6 -0
- package/dist/types/interfaces/services/core/context/types.js.map +1 -0
- package/dist/types/interfaces/services/core/execution/engine.js +6 -0
- package/dist/types/interfaces/services/core/execution/engine.js.map +1 -0
- package/dist/types/interfaces/services/core/execution/environment.js +6 -0
- package/dist/types/interfaces/services/core/execution/environment.js.map +1 -0
- package/dist/types/interfaces/services/core/execution/execute.js +6 -0
- package/dist/types/interfaces/services/core/execution/execute.js.map +1 -0
- package/dist/types/interfaces/services/core/execution/index.js +4 -0
- package/dist/types/interfaces/services/core/execution/index.js.map +1 -0
- package/dist/types/interfaces/services/core/index.js +5 -0
- package/dist/types/interfaces/services/core/index.js.map +1 -0
- package/dist/types/interfaces/services/core/managers/cancellation.js +6 -0
- package/dist/types/interfaces/services/core/managers/cancellation.js.map +1 -0
- package/dist/types/interfaces/services/core/managers/connection.js +6 -0
- package/dist/types/interfaces/services/core/managers/connection.js.map +1 -0
- package/dist/types/interfaces/services/core/managers/context.js +6 -0
- package/dist/types/interfaces/services/core/managers/context.js.map +1 -0
- package/dist/types/interfaces/services/core/managers/event.js +6 -0
- package/dist/types/interfaces/services/core/managers/event.js.map +1 -0
- package/dist/types/interfaces/services/core/managers/index.js +7 -0
- package/dist/types/interfaces/services/core/managers/index.js.map +1 -0
- package/dist/types/interfaces/services/core/managers/stream.js +6 -0
- package/dist/types/interfaces/services/core/managers/stream.js.map +1 -0
- package/dist/types/interfaces/services/core/managers/task.js +2 -0
- package/dist/types/interfaces/services/core/managers/task.js.map +1 -0
- package/dist/types/interfaces/services/core/service.js +6 -0
- package/dist/types/interfaces/services/core/service.js.map +1 -0
- package/dist/types/interfaces/services/index.js +4 -0
- package/dist/types/interfaces/services/index.js.map +1 -0
- package/dist/types/{services → interfaces/services}/protocol.js +4 -0
- package/dist/types/interfaces/services/protocol.js.map +1 -0
- package/dist/types/interfaces/storage.js +6 -0
- package/dist/types/interfaces/storage.js.map +1 -0
- package/dist/types/schemas/a2a/agent.js +319 -0
- package/dist/types/schemas/a2a/agent.js.map +1 -0
- package/dist/types/schemas/a2a/auth.js +274 -0
- package/dist/types/schemas/a2a/auth.js.map +1 -0
- package/dist/types/schemas/a2a/error.js +119 -0
- package/dist/types/schemas/a2a/error.js.map +1 -1
- package/dist/types/schemas/a2a/index.js +8 -4
- package/dist/types/schemas/a2a/index.js.map +1 -1
- package/dist/types/schemas/a2a/kind.js +21 -0
- package/dist/types/schemas/a2a/kind.js.map +1 -0
- package/dist/types/schemas/a2a/message.js +130 -1
- package/dist/types/schemas/a2a/message.js.map +1 -1
- package/dist/types/schemas/a2a/notification.js +202 -1
- package/dist/types/schemas/a2a/notification.js.map +1 -1
- package/dist/types/schemas/a2a/parameters.js +241 -1
- package/dist/types/schemas/a2a/parameters.js.map +1 -1
- package/dist/types/schemas/a2a/protocol.js +60 -0
- package/dist/types/schemas/a2a/protocol.js.map +1 -0
- package/dist/types/schemas/a2a/rpc.js +126 -1
- package/dist/types/schemas/a2a/rpc.js.map +1 -1
- package/dist/types/schemas/a2a/task.js +131 -12
- package/dist/types/schemas/a2a/task.js.map +1 -1
- package/dist/types/schemas/a2a/transport.js +28 -0
- package/dist/types/schemas/a2a/transport.js.map +1 -0
- package/dist/types/schemas/deployment/index.js +3 -0
- package/dist/types/schemas/deployment/index.js.map +1 -0
- package/dist/types/schemas/deployment/proxy.js +6 -0
- package/dist/types/schemas/deployment/proxy.js.map +1 -0
- package/dist/types/schemas/deployment/request.js +88 -0
- package/dist/types/schemas/deployment/request.js.map +1 -0
- package/dist/types/schemas/index.js +1 -0
- package/dist/types/schemas/index.js.map +1 -1
- package/dist/types/server/express/errors.d.ts +10 -0
- package/dist/types/server/express/errors.d.ts.map +1 -0
- package/dist/types/server/express/index.d.ts +4 -0
- package/dist/types/server/express/index.d.ts.map +1 -0
- package/dist/types/server/express/middeware.d.ts +8 -0
- package/dist/types/server/express/middeware.d.ts.map +1 -0
- package/dist/types/server/express/server.d.ts +71 -0
- package/dist/types/server/express/server.d.ts.map +1 -0
- package/dist/types/server/index.d.ts +1 -7
- package/dist/types/server/index.d.ts.map +1 -1
- package/dist/types/services/a2a/factory/builder.d.ts +352 -0
- package/dist/types/services/a2a/factory/builder.d.ts.map +1 -0
- package/dist/types/services/a2a/factory/context.d.ts +133 -0
- package/dist/types/services/a2a/factory/context.d.ts.map +1 -0
- package/dist/types/services/a2a/factory/event.d.ts +59 -0
- package/dist/types/services/a2a/factory/event.d.ts.map +1 -0
- package/dist/types/services/a2a/factory/index.d.ts +6 -0
- package/dist/types/services/a2a/factory/index.d.ts.map +1 -0
- package/dist/types/services/a2a/factory/method.d.ts +7 -0
- package/dist/types/services/a2a/factory/method.d.ts.map +1 -0
- package/dist/types/services/a2a/factory/service.d.ts +10 -0
- package/dist/types/services/a2a/factory/service.d.ts.map +1 -0
- package/dist/types/services/a2a/helpers/index.d.ts +2 -0
- package/dist/types/services/a2a/helpers/index.d.ts.map +1 -0
- package/dist/types/services/a2a/helpers/part.d.ts +49 -0
- package/dist/types/services/a2a/helpers/part.d.ts.map +1 -0
- package/dist/types/services/a2a/index.d.ts +5 -1
- package/dist/types/services/a2a/index.d.ts.map +1 -1
- package/dist/types/services/a2a/managers/cancellation.d.ts +12 -0
- package/dist/types/services/a2a/managers/cancellation.d.ts.map +1 -0
- package/dist/types/services/a2a/managers/connection.d.ts +12 -0
- package/dist/types/services/a2a/managers/connection.d.ts.map +1 -0
- package/dist/types/services/a2a/managers/context.d.ts +12 -0
- package/dist/types/services/a2a/managers/context.d.ts.map +1 -0
- package/dist/types/services/a2a/managers/index.d.ts +6 -0
- package/dist/types/services/a2a/managers/index.d.ts.map +1 -0
- package/dist/types/services/a2a/managers/task.d.ts +12 -0
- package/dist/types/services/a2a/managers/task.d.ts.map +1 -0
- package/dist/types/services/a2a/methods/cancel-task.d.ts +8 -0
- package/dist/types/services/a2a/methods/cancel-task.d.ts.map +1 -0
- package/dist/types/services/a2a/methods/get-task.d.ts +113 -0
- package/dist/types/services/a2a/methods/get-task.d.ts.map +1 -0
- package/dist/types/services/a2a/methods/index.d.ts +6 -0
- package/dist/types/services/a2a/methods/index.d.ts.map +1 -0
- package/dist/types/services/a2a/methods/resubscribe-task.d.ts +8 -0
- package/dist/types/services/a2a/methods/resubscribe-task.d.ts.map +1 -0
- package/dist/types/services/a2a/methods/send-message.d.ts +8 -0
- package/dist/types/services/a2a/methods/send-message.d.ts.map +1 -0
- package/dist/types/services/a2a/methods/stream-message.d.ts +9 -0
- package/dist/types/services/a2a/methods/stream-message.d.ts.map +1 -0
- package/dist/types/services/a2a/service.d.ts +375 -41
- package/dist/types/services/a2a/service.d.ts.map +1 -1
- package/dist/types/services/a2a/state/index.d.ts +4 -0
- package/dist/types/services/a2a/state/index.d.ts.map +1 -0
- package/dist/types/services/a2a/state/load.d.ts +15 -0
- package/dist/types/services/a2a/state/load.d.ts.map +1 -0
- package/dist/types/services/a2a/state/process.d.ts +8 -0
- package/dist/types/services/a2a/state/process.d.ts.map +1 -0
- package/dist/types/services/a2a/state/update/artifact.d.ts +11 -0
- package/dist/types/services/a2a/state/update/artifact.d.ts.map +1 -0
- package/dist/types/services/a2a/state/update/index.d.ts +3 -0
- package/dist/types/services/a2a/state/update/index.d.ts.map +1 -0
- package/dist/types/services/a2a/state/update/update.d.ts +24 -0
- package/dist/types/services/a2a/state/update/update.d.ts.map +1 -0
- package/dist/types/services/core/execution/execute.d.ts +7 -0
- package/dist/types/services/core/execution/execute.d.ts.map +1 -0
- package/dist/types/services/core/execution/index.d.ts +2 -0
- package/dist/types/services/core/execution/index.d.ts.map +1 -0
- package/dist/types/services/core/index.d.ts +3 -0
- package/dist/types/services/core/index.d.ts.map +1 -0
- package/dist/types/services/core/managers/command.d.ts +40 -0
- package/dist/types/services/core/managers/command.d.ts.map +1 -0
- package/dist/types/services/core/managers/event.d.ts +19 -0
- package/dist/types/services/core/managers/event.d.ts.map +1 -0
- package/dist/types/services/core/managers/index.d.ts +4 -0
- package/dist/types/services/core/managers/index.d.ts.map +1 -0
- package/dist/types/services/core/managers/stream.d.ts +21 -0
- package/dist/types/services/core/managers/stream.d.ts.map +1 -0
- package/dist/types/services/index.d.ts +2 -1
- package/dist/types/services/index.d.ts.map +1 -1
- package/dist/types/transport/index.d.ts +1 -1
- package/dist/types/transport/index.d.ts.map +1 -1
- package/dist/types/transport/rpc/parser.d.ts +5 -1
- package/dist/types/transport/rpc/parser.d.ts.map +1 -1
- package/dist/types/transport/rpc/rpc-client.d.ts +5 -1
- package/dist/types/transport/rpc/rpc-client.d.ts.map +1 -1
- package/dist/types/transport/streaming/event-stream.d.ts +5 -1
- package/dist/types/transport/streaming/event-stream.d.ts.map +1 -1
- package/dist/types/transport/trpc/a2a/factory/index.d.ts +2 -0
- package/dist/types/transport/trpc/a2a/factory/index.d.ts.map +1 -0
- package/dist/types/transport/trpc/a2a/factory/router.d.ts +2631 -0
- package/dist/types/transport/trpc/a2a/factory/router.d.ts.map +1 -0
- package/dist/types/transport/trpc/a2a/index.d.ts +4 -0
- package/dist/types/transport/trpc/a2a/index.d.ts.map +1 -0
- package/dist/types/transport/trpc/a2a/routes/index.d.ts +4 -0
- package/dist/types/transport/trpc/a2a/routes/index.d.ts.map +1 -0
- package/dist/types/transport/trpc/a2a/routes/info.d.ts +102 -0
- package/dist/types/transport/trpc/a2a/routes/info.d.ts.map +1 -0
- package/dist/types/transport/trpc/a2a/routes/message/index.d.ts +2 -0
- package/dist/types/transport/trpc/a2a/routes/message/index.d.ts.map +1 -0
- package/dist/types/transport/trpc/a2a/routes/message/route.d.ts +523 -0
- package/dist/types/transport/trpc/a2a/routes/message/route.d.ts.map +1 -0
- package/dist/types/transport/trpc/a2a/routes/tasks/index.d.ts +2 -0
- package/dist/types/transport/trpc/a2a/routes/tasks/index.d.ts.map +1 -0
- package/dist/types/transport/trpc/a2a/routes/tasks/route.d.ts +646 -0
- package/dist/types/transport/trpc/a2a/routes/tasks/route.d.ts.map +1 -0
- package/dist/types/transport/trpc/a2a/trpc.d.ts +272 -0
- package/dist/types/transport/trpc/a2a/trpc.d.ts.map +1 -0
- package/dist/types/transport/trpc/index.d.ts +2 -0
- package/dist/types/transport/trpc/index.d.ts.map +1 -0
- package/dist/types/types/ext.d.ts +14 -0
- package/dist/types/types/ext.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +3 -4
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/{client.d.ts → interfaces/client.d.ts} +7 -2
- package/dist/types/types/interfaces/client.d.ts.map +1 -0
- package/dist/types/types/interfaces/index.d.ts +4 -0
- package/dist/types/types/interfaces/index.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/a2a/builder.d.ts +33 -0
- package/dist/types/types/interfaces/services/a2a/builder.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/a2a/context.d.ts +163 -0
- package/dist/types/types/interfaces/services/a2a/context.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/a2a/engine.d.ts +8 -0
- package/dist/types/types/interfaces/services/a2a/engine.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/a2a/index.d.ts +6 -0
- package/dist/types/types/interfaces/services/a2a/index.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/a2a/legacy.d.ts +90 -0
- package/dist/types/types/interfaces/services/a2a/legacy.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/a2a/service.d.ts +409 -0
- package/dist/types/types/interfaces/services/a2a/service.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/context/command.d.ts +26 -0
- package/dist/types/types/interfaces/services/core/context/command.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/context/context.d.ts +208 -0
- package/dist/types/types/interfaces/services/core/context/context.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/context/index.d.ts +4 -0
- package/dist/types/types/interfaces/services/core/context/index.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/context/types.d.ts +12 -0
- package/dist/types/types/interfaces/services/core/context/types.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/execution/engine.d.ts +107 -0
- package/dist/types/types/interfaces/services/core/execution/engine.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/execution/environment.d.ts +12 -0
- package/dist/types/types/interfaces/services/core/execution/environment.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/execution/execute.d.ts +8 -0
- package/dist/types/types/interfaces/services/core/execution/execute.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/execution/index.d.ts +4 -0
- package/dist/types/types/interfaces/services/core/execution/index.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/index.d.ts +5 -0
- package/dist/types/types/interfaces/services/core/index.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/managers/cancellation.d.ts +10 -0
- package/dist/types/types/interfaces/services/core/managers/cancellation.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/managers/connection.d.ts +10 -0
- package/dist/types/types/interfaces/services/core/managers/connection.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/managers/context.d.ts +18 -0
- package/dist/types/types/interfaces/services/core/managers/context.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/managers/event.d.ts +329 -0
- package/dist/types/types/interfaces/services/core/managers/event.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/managers/index.d.ts +7 -0
- package/dist/types/types/interfaces/services/core/managers/index.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/managers/stream.d.ts +218 -0
- package/dist/types/types/interfaces/services/core/managers/stream.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/managers/task.d.ts +10 -0
- package/dist/types/types/interfaces/services/core/managers/task.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/core/service.d.ts +116 -0
- package/dist/types/types/interfaces/services/core/service.d.ts.map +1 -0
- package/dist/types/types/interfaces/services/index.d.ts +4 -0
- package/dist/types/types/interfaces/services/index.d.ts.map +1 -0
- package/dist/types/types/{services → interfaces/services}/protocol.d.ts +4 -0
- package/dist/types/types/interfaces/services/protocol.d.ts.map +1 -0
- package/dist/types/types/interfaces/storage.d.ts +9 -0
- package/dist/types/types/interfaces/storage.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/agent.d.ts +509 -0
- package/dist/types/types/schemas/a2a/agent.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/auth.d.ts +285 -0
- package/dist/types/types/schemas/a2a/auth.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/error.d.ts +133 -27
- package/dist/types/types/schemas/a2a/error.d.ts.map +1 -1
- package/dist/types/types/schemas/a2a/index.d.ts +8 -216
- package/dist/types/types/schemas/a2a/index.d.ts.map +1 -1
- package/dist/types/types/schemas/a2a/kind.d.ts +28 -0
- package/dist/types/types/schemas/a2a/kind.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/message.d.ts +2549 -69
- package/dist/types/types/schemas/a2a/message.d.ts.map +1 -1
- package/dist/types/types/schemas/a2a/notification.d.ts +321 -70
- package/dist/types/types/schemas/a2a/notification.d.ts.map +1 -1
- package/dist/types/types/schemas/a2a/parameters.d.ts +287 -167
- package/dist/types/types/schemas/a2a/parameters.d.ts.map +1 -1
- package/dist/types/types/schemas/a2a/protocol.d.ts +3207 -0
- package/dist/types/types/schemas/a2a/protocol.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/rpc.d.ts +42 -89
- package/dist/types/types/schemas/a2a/rpc.d.ts.map +1 -1
- package/dist/types/types/schemas/a2a/task.d.ts +1460 -214
- package/dist/types/types/schemas/a2a/task.d.ts.map +1 -1
- package/dist/types/types/schemas/a2a/transport.d.ts +28 -0
- package/dist/types/types/schemas/a2a/transport.d.ts.map +1 -0
- package/dist/types/types/schemas/deployment/index.d.ts +3 -0
- package/dist/types/types/schemas/deployment/index.d.ts.map +1 -0
- package/dist/types/types/{proxy.d.ts → schemas/deployment/proxy.d.ts} +6 -2
- package/dist/types/types/schemas/deployment/proxy.d.ts.map +1 -0
- package/dist/types/types/schemas/deployment/request.d.ts +508 -0
- package/dist/types/types/schemas/deployment/request.d.ts.map +1 -0
- package/dist/types/types/utils/index.d.ts +2 -0
- package/dist/types/types/utils/index.d.ts.map +1 -0
- package/dist/types/types/{transform.d.ts → utils/transform.d.ts} +4 -0
- package/dist/types/types/utils/transform.d.ts.map +1 -0
- package/dist/types/utils/api/register.d.ts +4 -0
- package/dist/types/utils/api/register.d.ts.map +1 -1
- package/dist/types/utils/common/constants.d.ts +8 -4
- package/dist/types/utils/common/constants.d.ts.map +1 -1
- package/dist/types/utils/common/errors.d.ts +6 -12
- package/dist/types/utils/common/errors.d.ts.map +1 -1
- package/dist/types/utils/common/utils.d.ts +4 -14
- package/dist/types/utils/common/utils.d.ts.map +1 -1
- package/dist/types/utils/common/zAsyncIterable.d.ts +23 -0
- package/dist/types/utils/common/zAsyncIterable.d.ts.map +1 -0
- package/dist/types/utils/deployment/agents.d.ts +5 -1
- package/dist/types/utils/deployment/agents.d.ts.map +1 -1
- package/dist/types/utils/deployment/bundler.d.ts +4 -0
- package/dist/types/utils/deployment/bundler.d.ts.map +1 -1
- package/dist/types/utils/deployment/full-deployment.d.ts +12 -2
- package/dist/types/utils/deployment/full-deployment.d.ts.map +1 -1
- package/dist/types/utils/deployment/index.d.ts +5 -0
- package/dist/types/utils/deployment/index.d.ts.map +1 -0
- package/dist/types/utils/deployment/task-wrapper.d.ts +6 -2
- package/dist/types/utils/deployment/task-wrapper.d.ts.map +1 -1
- package/dist/types/utils/deployment/test-deployment.d.ts +7 -2
- package/dist/types/utils/deployment/test-deployment.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +4 -6
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/index.js +2 -0
- package/dist/types/utils/index.js.map +1 -0
- package/dist/types/utils/logging/index.d.ts +3 -0
- package/dist/types/utils/logging/index.d.ts.map +1 -0
- package/dist/types/utils/logging/log.d.ts +4 -0
- package/dist/types/utils/logging/log.d.ts.map +1 -1
- package/dist/types/utils/logging/logger.d.ts +4 -0
- package/dist/types/utils/logging/logger.d.ts.map +1 -1
- package/dist/types/{server/lib → utils}/storage/file.d.ts +9 -4
- package/dist/types/utils/storage/file.d.ts.map +1 -0
- package/dist/types/{server/lib → utils}/storage/memory.d.ts +9 -4
- package/dist/types/utils/storage/memory.d.ts.map +1 -0
- package/dist/types/{transform.js → utils/transform.js} +2 -1
- package/dist/types/utils/transform.js.map +1 -0
- package/dist/utils/api/register.js +4 -0
- package/dist/utils/api/register.js.map +1 -1
- package/dist/utils/common/constants.js +20 -11
- package/dist/utils/common/constants.js.map +1 -1
- package/dist/utils/common/errors.js +7 -40
- package/dist/utils/common/errors.js.map +1 -1
- package/dist/utils/common/utils.js +4 -46
- package/dist/utils/common/utils.js.map +1 -1
- package/dist/utils/common/zAsyncIterable.js +40 -0
- package/dist/utils/common/zAsyncIterable.js.map +1 -0
- package/dist/utils/deployment/agents.js +4 -0
- package/dist/utils/deployment/agents.js.map +1 -1
- package/dist/utils/deployment/bundler.js +4 -0
- package/dist/utils/deployment/bundler.js.map +1 -1
- package/dist/utils/deployment/full-deployment.js +6 -2
- package/dist/utils/deployment/full-deployment.js.map +1 -1
- package/dist/utils/deployment/index.js +5 -0
- package/dist/utils/deployment/index.js.map +1 -0
- package/dist/utils/deployment/task-wrapper.js +4 -0
- package/dist/utils/deployment/task-wrapper.js.map +1 -1
- package/dist/utils/deployment/test-deployment.js +15 -7
- package/dist/utils/deployment/test-deployment.js.map +1 -1
- package/dist/utils/index.js +10 -6
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/logging/index.js +3 -0
- package/dist/utils/logging/index.js.map +1 -0
- package/dist/utils/logging/log.js +4 -0
- package/dist/utils/logging/log.js.map +1 -1
- package/dist/utils/logging/logger.js +13 -0
- package/dist/utils/logging/logger.js.map +1 -1
- package/dist/{server/lib → utils}/storage/file.js +17 -6
- package/dist/utils/storage/file.js.map +1 -0
- package/dist/{server/lib → utils}/storage/memory.js +15 -5
- package/dist/utils/storage/memory.js.map +1 -0
- package/package.json +16 -5
- package/dist/server/a2a-server.js +0 -237
- package/dist/server/a2a-server.js.map +0 -1
- package/dist/server/interfaces/params.js +0 -3
- package/dist/server/interfaces/params.js.map +0 -1
- package/dist/server/interfaces/server.js +0 -2
- package/dist/server/interfaces/server.js.map +0 -1
- package/dist/server/interfaces/store.js +0 -18
- package/dist/server/interfaces/store.js.map +0 -1
- package/dist/server/lib/express-server.js +0 -252
- package/dist/server/lib/express-server.js.map +0 -1
- package/dist/server/lib/json-middleware.js +0 -3
- package/dist/server/lib/json-middleware.js.map +0 -1
- package/dist/server/lib/middleware/a2a-methods.js +0 -140
- package/dist/server/lib/middleware/a2a-methods.js.map +0 -1
- package/dist/server/lib/middleware/factory.js +0 -59
- package/dist/server/lib/middleware/factory.js.map +0 -1
- package/dist/server/lib/state.js +0 -80
- package/dist/server/lib/state.js.map +0 -1
- package/dist/server/lib/storage/file.js.map +0 -1
- package/dist/server/lib/storage/memory.js.map +0 -1
- package/dist/server/lib/update/base.js.map +0 -1
- package/dist/services/a2a/repository.js +0 -160
- package/dist/services/a2a/repository.js.map +0 -1
- package/dist/services/manager.js +0 -61
- package/dist/services/manager.js.map +0 -1
- package/dist/services/mcp/index.js +0 -2
- package/dist/services/mcp/index.js.map +0 -1
- package/dist/services/mcp/service.js +0 -75
- package/dist/services/mcp/service.js.map +0 -1
- package/dist/transport/streaming/stream.js +0 -111
- package/dist/transport/streaming/stream.js.map +0 -1
- package/dist/types/client.js +0 -2
- package/dist/types/client.js.map +0 -1
- package/dist/types/express.js +0 -2
- package/dist/types/express.js.map +0 -1
- package/dist/types/extended-schema.js +0 -7
- package/dist/types/extended-schema.js.map +0 -1
- package/dist/types/proxy.js +0 -2
- package/dist/types/proxy.js.map +0 -1
- package/dist/types/schemas/a2a/auth/auth.js +0 -2
- package/dist/types/schemas/a2a/auth/auth.js.map +0 -1
- package/dist/types/schemas/a2a/auth/base.js +0 -2
- package/dist/types/schemas/a2a/auth/base.js.map +0 -1
- package/dist/types/schemas/a2a/auth/index.js +0 -4
- package/dist/types/schemas/a2a/auth/index.js.map +0 -1
- package/dist/types/schemas/a2a/auth/oauth.js +0 -2
- package/dist/types/schemas/a2a/auth/oauth.js.map +0 -1
- package/dist/types/schemas/a2a/ref.js +0 -25
- package/dist/types/schemas/a2a/ref.js.map +0 -1
- package/dist/types/server/a2a-server.d.ts +0 -145
- package/dist/types/server/a2a-server.d.ts.map +0 -1
- package/dist/types/server/interfaces/params.d.ts +0 -109
- package/dist/types/server/interfaces/params.d.ts.map +0 -1
- package/dist/types/server/interfaces/server.d.ts +0 -35
- package/dist/types/server/interfaces/server.d.ts.map +0 -1
- package/dist/types/server/interfaces/store.d.ts +0 -35
- package/dist/types/server/interfaces/store.d.ts.map +0 -1
- package/dist/types/server/lib/express-server.d.ts +0 -59
- package/dist/types/server/lib/express-server.d.ts.map +0 -1
- package/dist/types/server/lib/json-middleware.d.ts +0 -3
- package/dist/types/server/lib/json-middleware.d.ts.map +0 -1
- package/dist/types/server/lib/middleware/a2a-methods.d.ts +0 -7
- package/dist/types/server/lib/middleware/a2a-methods.d.ts.map +0 -1
- package/dist/types/server/lib/middleware/factory.d.ts +0 -12
- package/dist/types/server/lib/middleware/factory.d.ts.map +0 -1
- package/dist/types/server/lib/state.d.ts +0 -20
- package/dist/types/server/lib/state.d.ts.map +0 -1
- package/dist/types/server/lib/storage/file.d.ts.map +0 -1
- package/dist/types/server/lib/storage/memory.d.ts.map +0 -1
- package/dist/types/server/lib/update/base.d.ts +0 -21
- package/dist/types/server/lib/update/base.d.ts.map +0 -1
- package/dist/types/services/a2a/repository.d.ts +0 -77
- package/dist/types/services/a2a/repository.d.ts.map +0 -1
- package/dist/types/services/a2a/repository.js +0 -2
- package/dist/types/services/a2a/repository.js.map +0 -1
- package/dist/types/services/a2a/service.js +0 -2
- package/dist/types/services/a2a/service.js.map +0 -1
- package/dist/types/services/context.js +0 -29
- package/dist/types/services/context.js.map +0 -1
- package/dist/types/services/dispatcher.js +0 -33
- package/dist/types/services/dispatcher.js.map +0 -1
- package/dist/types/services/index.js +0 -9
- package/dist/types/services/index.js.map +0 -1
- package/dist/types/services/manager.d.ts +0 -44
- package/dist/types/services/manager.d.ts.map +0 -1
- package/dist/types/services/manager.js +0 -2
- package/dist/types/services/manager.js.map +0 -1
- package/dist/types/services/mcp/index.d.ts +0 -2
- package/dist/types/services/mcp/index.d.ts.map +0 -1
- package/dist/types/services/mcp/service.d.ts +0 -30
- package/dist/types/services/mcp/service.d.ts.map +0 -1
- package/dist/types/services/mcp/service.js +0 -8
- package/dist/types/services/mcp/service.js.map +0 -1
- package/dist/types/services/protocol.js.map +0 -1
- package/dist/types/services/service.js +0 -2
- package/dist/types/services/service.js.map +0 -1
- package/dist/types/transform.js.map +0 -1
- package/dist/types/transport/streaming/stream.d.ts +0 -42
- package/dist/types/transport/streaming/stream.d.ts.map +0 -1
- package/dist/types/types/client.d.ts.map +0 -1
- package/dist/types/types/express.d.ts +0 -66
- package/dist/types/types/express.d.ts.map +0 -1
- package/dist/types/types/extended-schema.d.ts +0 -174
- package/dist/types/types/extended-schema.d.ts.map +0 -1
- package/dist/types/types/proxy.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/auth/auth.d.ts +0 -80
- package/dist/types/types/schemas/a2a/auth/auth.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/auth/base.d.ts +0 -16
- package/dist/types/types/schemas/a2a/auth/base.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/auth/index.d.ts +0 -4
- package/dist/types/types/schemas/a2a/auth/index.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/auth/oauth.d.ts +0 -124
- package/dist/types/types/schemas/a2a/auth/oauth.d.ts.map +0 -1
- package/dist/types/types/schemas/a2a/ref.d.ts +0 -2057
- package/dist/types/types/schemas/a2a/ref.d.ts.map +0 -1
- package/dist/types/types/services/a2a/repository.d.ts +0 -85
- package/dist/types/types/services/a2a/repository.d.ts.map +0 -1
- package/dist/types/types/services/a2a/service.d.ts +0 -29
- package/dist/types/types/services/a2a/service.d.ts.map +0 -1
- package/dist/types/types/services/context.d.ts +0 -167
- package/dist/types/types/services/context.d.ts.map +0 -1
- package/dist/types/types/services/dispatcher.d.ts +0 -20
- package/dist/types/types/services/dispatcher.d.ts.map +0 -1
- package/dist/types/types/services/index.d.ts +0 -9
- package/dist/types/types/services/index.d.ts.map +0 -1
- package/dist/types/types/services/manager.d.ts +0 -42
- package/dist/types/types/services/manager.d.ts.map +0 -1
- package/dist/types/types/services/mcp/service.d.ts +0 -57
- package/dist/types/types/services/mcp/service.d.ts.map +0 -1
- package/dist/types/types/services/protocol.d.ts.map +0 -1
- package/dist/types/types/services/service.d.ts +0 -35
- package/dist/types/types/services/service.d.ts.map +0 -1
- package/dist/types/types/transform.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../../../src/types/schemas/deployment/proxy.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 The Artinet Project
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod/v4";
|
|
6
|
+
import { JSONRPCErrorResponseSchema, JSONRPCRequestSchema, JSONRPCSuccessResponseSchema, AgentCardSchema, } from "../a2a/index.js";
|
|
7
|
+
/**
|
|
8
|
+
* @description Represents the parameters for a server deployment request.
|
|
9
|
+
*/
|
|
10
|
+
export const ServerDeploymentRequestParamsSchema = z
|
|
11
|
+
.object({
|
|
12
|
+
/**
|
|
13
|
+
* @required The name of the server
|
|
14
|
+
*/
|
|
15
|
+
name: z.string(),
|
|
16
|
+
/**
|
|
17
|
+
* @required The agent card of the server
|
|
18
|
+
*/
|
|
19
|
+
agentCard: AgentCardSchema,
|
|
20
|
+
/**
|
|
21
|
+
* @required The minified code of the server
|
|
22
|
+
*/
|
|
23
|
+
code: z.string(),
|
|
24
|
+
/**
|
|
25
|
+
* @optional The NPM dependencies of the server(currently unsupported)
|
|
26
|
+
*/
|
|
27
|
+
dependencies: z.array(z.string()).optional(),
|
|
28
|
+
})
|
|
29
|
+
.describe("Represents the parameters for a server deployment request.");
|
|
30
|
+
/**
|
|
31
|
+
* @description Represents the base parameters for a server deployment response.
|
|
32
|
+
*/
|
|
33
|
+
export const BaseServerDeploymentResponseParamsSchema = z
|
|
34
|
+
.object({
|
|
35
|
+
/**
|
|
36
|
+
* @required The deployment ID(for full deployments the deployment ID is the same as the agent/registration ID)
|
|
37
|
+
*/
|
|
38
|
+
deploymentId: z.string().describe("The deployment ID"),
|
|
39
|
+
/**
|
|
40
|
+
* @required Whether the deployment was successful
|
|
41
|
+
*/
|
|
42
|
+
success: z.boolean().describe("Whether the deployment was successful"),
|
|
43
|
+
})
|
|
44
|
+
.describe("Represents the base parameters for a server deployment response.");
|
|
45
|
+
/**
|
|
46
|
+
* @description Represents the parameters for a server deployment success response.
|
|
47
|
+
*/
|
|
48
|
+
export const ServerDeploymentSuccessResponseParamsSchema = BaseServerDeploymentResponseParamsSchema.extend({
|
|
49
|
+
/**
|
|
50
|
+
* @required The name of the server
|
|
51
|
+
*/
|
|
52
|
+
name: z.string().describe("The name of the server"),
|
|
53
|
+
/**
|
|
54
|
+
* @required The URL of the server
|
|
55
|
+
*/
|
|
56
|
+
url: z.url().describe("The URL of the server"),
|
|
57
|
+
/**
|
|
58
|
+
* @required The base path of the server
|
|
59
|
+
*/
|
|
60
|
+
basePath: z.string().describe("The base path of the server"),
|
|
61
|
+
}).describe("Represents the parameters for a server deployment success response.");
|
|
62
|
+
/**
|
|
63
|
+
* @description Represents the request for a server deployment.
|
|
64
|
+
*/
|
|
65
|
+
export const ServerDeploymentRequestSchema = JSONRPCRequestSchema.extend({
|
|
66
|
+
method: z.literal("/deploy").describe("The method name"),
|
|
67
|
+
params: ServerDeploymentRequestParamsSchema.describe("The deployment parameters"),
|
|
68
|
+
}).describe("Represents the request for a server deployment.");
|
|
69
|
+
/**
|
|
70
|
+
* @description Represents the request for a test server deployment.
|
|
71
|
+
*/
|
|
72
|
+
export const TestServerDeploymentRequestSchema = JSONRPCRequestSchema.extend({
|
|
73
|
+
method: z.literal("/test/deploy").describe("The method name"),
|
|
74
|
+
params: ServerDeploymentRequestParamsSchema.describe("The test deployment parameters"),
|
|
75
|
+
}).describe("Represents the request for a test server deployment.");
|
|
76
|
+
/**
|
|
77
|
+
* @description Represents the response for a server deployment success request.
|
|
78
|
+
*/
|
|
79
|
+
export const ServerDeploymentSuccessResponseSchema = JSONRPCSuccessResponseSchema.extend({
|
|
80
|
+
result: ServerDeploymentSuccessResponseParamsSchema.describe("The deployment result"),
|
|
81
|
+
}).describe("Represents the response for a server deployment request.");
|
|
82
|
+
/**
|
|
83
|
+
* @description Represents the response for a server deployment request.
|
|
84
|
+
*/
|
|
85
|
+
export const ServerDeploymentResponseSchema = z
|
|
86
|
+
.union([ServerDeploymentSuccessResponseSchema, JSONRPCErrorResponseSchema])
|
|
87
|
+
.describe("Represents the response for a server deployment request.");
|
|
88
|
+
//# sourceMappingURL=request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/types/schemas/deployment/request.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,4BAA4B,EAC5B,eAAe,GAChB,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC;KACjD,MAAM,CAAC;IACN;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB;;OAEG;IACH,SAAS,EAAE,eAAe;IAC1B;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB;;OAEG;IACH,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC;KACD,QAAQ,CAAC,4DAA4D,CAAC,CAAC;AAM1E;;GAEG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC;KACtD,MAAM,CAAC;IACN;;OAEG;IACH,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IACtD;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;CACvE,CAAC;KACD,QAAQ,CAAC,kEAAkE,CAAC,CAAC;AAMhF;;G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0BAA0B,CAAC,CAAC;KAC1E,QAAQ,CAAC,0DAA0D,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,yCAAyC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 The Artinet Project
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { type ErrorRequestHandler } from "express";
|
|
6
|
+
/**
|
|
7
|
+
* Express error handler middleware.
|
|
8
|
+
*/
|
|
9
|
+
export declare const errorHandler: ErrorRequestHandler;
|
|
10
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -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,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 The Artinet Project
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { NextFunction, Request, Response } from "express";
|
|
6
|
+
import { A2AServiceInterface } from "../../types/index.js";
|
|
7
|
+
export declare function jsonRPCMiddleware(service: A2AServiceInterface, req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=middeware.d.ts.map
|
|
@@ -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"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 The Artinet Project
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import express from "express";
|
|
6
|
+
import { Agent, FactoryParams as CreateAgentParams } from "../../types/index.js";
|
|
7
|
+
import { CorsOptions } from "cors";
|
|
8
|
+
export interface ServerParams {
|
|
9
|
+
app?: express.Express;
|
|
10
|
+
corsOptions?: CorsOptions;
|
|
11
|
+
basePath?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function createAgentServer(params: ServerParams & {
|
|
14
|
+
agent: Agent | CreateAgentParams;
|
|
15
|
+
agentCardPath?: string;
|
|
16
|
+
register?: boolean;
|
|
17
|
+
}): {
|
|
18
|
+
app: express.Express;
|
|
19
|
+
agent: Agent<{
|
|
20
|
+
message: {
|
|
21
|
+
role: "user" | "agent";
|
|
22
|
+
parts: ({
|
|
23
|
+
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
24
|
+
file: {
|
|
25
|
+
bytes: string;
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
mimeType?: string | undefined;
|
|
28
|
+
uri?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
uri: string;
|
|
31
|
+
name?: string | undefined;
|
|
32
|
+
mimeType?: string | undefined;
|
|
33
|
+
bytes?: undefined;
|
|
34
|
+
};
|
|
35
|
+
metadata?: Record<string, unknown> | undefined;
|
|
36
|
+
} | {
|
|
37
|
+
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
38
|
+
text: string;
|
|
39
|
+
metadata?: Record<string, unknown> | undefined;
|
|
40
|
+
} | {
|
|
41
|
+
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
42
|
+
data: Record<string, unknown>;
|
|
43
|
+
metadata?: Record<string, unknown> | undefined;
|
|
44
|
+
})[];
|
|
45
|
+
messageId: string;
|
|
46
|
+
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
47
|
+
metadata?: Record<string, unknown> | undefined;
|
|
48
|
+
extensions?: string[] | undefined;
|
|
49
|
+
referenceTaskIds?: string[] | undefined;
|
|
50
|
+
taskId?: string | undefined;
|
|
51
|
+
contextId?: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
configuration?: {
|
|
54
|
+
acceptedOutputModes?: string[] | undefined;
|
|
55
|
+
historyLength?: number | undefined;
|
|
56
|
+
pushNotificationConfig?: {
|
|
57
|
+
url: string;
|
|
58
|
+
id?: string | undefined;
|
|
59
|
+
token?: string | undefined;
|
|
60
|
+
authentication?: {
|
|
61
|
+
schemes: string[];
|
|
62
|
+
credentials?: string | undefined;
|
|
63
|
+
} | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
blocking?: boolean | undefined;
|
|
66
|
+
} | undefined;
|
|
67
|
+
metadata?: Record<string, unknown> | undefined;
|
|
68
|
+
}, import("../../types/index.js").TaskAndHistory, import("../../types/index.js").UpdateEvent>;
|
|
69
|
+
};
|
|
70
|
+
export type ExpressAgentServer = ReturnType<typeof createAgentServer>;
|
|
71
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -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"}
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./interfaces/params.js";
|
|
3
|
-
export * from "./interfaces/store.js";
|
|
4
|
-
export * from "./lib/json-middleware.js";
|
|
5
|
-
export * from "./lib/express-server.js";
|
|
6
|
-
export * from "./lib/storage/file.js";
|
|
7
|
-
export * from "./lib/storage/memory.js";
|
|
1
|
+
export * from "./express/index.js";
|
|
8
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 The Artinet Project
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview A2A Agent Builder and Execution Engine Factory
|
|
7
|
+
*
|
|
8
|
+
* This module provides a fluent builder API for constructing A2A agents and
|
|
9
|
+
* execution engines. It enables declarative definition of multi-step agent
|
|
10
|
+
* workflows with type-safe step composition and automatic execution orchestration.
|
|
11
|
+
*
|
|
12
|
+
* @module A2ABuilder
|
|
13
|
+
* @version 1.0.0
|
|
14
|
+
* @since 0.5.6
|
|
15
|
+
* @author The Artinet Project
|
|
16
|
+
*/
|
|
17
|
+
import { StepBuilder, Step, StepOutput, StepOutputWithForwardArgs, MessageSendParams, TextPart, DataPart, FilePart, AgentEngine, StepWithKind, FactoryParams } from "../../../types/index.js";
|
|
18
|
+
/**
|
|
19
|
+
* Type alias for text-based workflow steps.
|
|
20
|
+
*
|
|
21
|
+
* This type represents a step that processes or generates text content
|
|
22
|
+
* within an agent workflow. Text steps are the most common type of step
|
|
23
|
+
* and are used for message processing, content generation, and text-based
|
|
24
|
+
* decision making.
|
|
25
|
+
*
|
|
26
|
+
* @template TCommand - The command type, defaults to MessageSendParams
|
|
27
|
+
* @template TPart - The text part type, defaults to TextPart["text"]
|
|
28
|
+
* @template TInboundArgs - Arguments received from previous step
|
|
29
|
+
* @template TForwardArgs - Arguments passed to next step
|
|
30
|
+
* @template TOutput - The output type of the step
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const greetingStep: textStep = async ({ command, context, args }) => {
|
|
35
|
+
* const userName = command.message.metadata?.userName || 'there';
|
|
36
|
+
* return `Hello, ${userName}! How can I help you today?`;
|
|
37
|
+
* };
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
* @since 0.5.6
|
|
42
|
+
*/
|
|
43
|
+
export type textStep<TCommand extends MessageSendParams = MessageSendParams, TPart extends TextPart["text"] = TextPart["text"], TInboundArgs extends readonly unknown[] = [], TForwardArgs extends readonly unknown[] = [], TOutput extends StepOutput<TPart> | StepOutputWithForwardArgs<TPart, TForwardArgs> | Array<TPart> | TPart = StepOutput<TPart>> = Step<TCommand, TPart, TInboundArgs, TForwardArgs, TOutput>;
|
|
44
|
+
/**
|
|
45
|
+
* Type alias for file-based workflow steps.
|
|
46
|
+
*
|
|
47
|
+
* This type represents a step that processes or generates file content
|
|
48
|
+
* within an agent workflow. File steps handle document processing,
|
|
49
|
+
* file generation, and file-based data operations.
|
|
50
|
+
*
|
|
51
|
+
* @template TCommand - The command type, defaults to MessageSendParams
|
|
52
|
+
* @template TPart - The file part type, defaults to FilePart["file"]
|
|
53
|
+
* @template TInboundArgs - Arguments received from previous step
|
|
54
|
+
* @template TForwardArgs - Arguments passed to next step
|
|
55
|
+
* @template TOutput - The output type of the step
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const documentStep: fileStep = async ({ command, context, args }) => {
|
|
60
|
+
* const content = generateDocument(command.message.content);
|
|
61
|
+
* return {
|
|
62
|
+
* name: 'report.pdf',
|
|
63
|
+
* mimeType: 'application/pdf',
|
|
64
|
+
* bytes: content
|
|
65
|
+
* };
|
|
66
|
+
* };
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @public
|
|
70
|
+
* @since 0.5.6
|
|
71
|
+
*/
|
|
72
|
+
export type fileStep<TCommand extends MessageSendParams = MessageSendParams, TPart extends FilePart["file"] = FilePart["file"], TInboundArgs extends readonly unknown[] = [], TForwardArgs extends readonly unknown[] = [], TOutput extends StepOutput<TPart> | StepOutputWithForwardArgs<TPart, TForwardArgs> | Array<TPart> | TPart = StepOutput<TPart>> = Step<TCommand, TPart, TInboundArgs, TForwardArgs, TOutput>;
|
|
73
|
+
/**
|
|
74
|
+
* Type alias for data-based workflow steps.
|
|
75
|
+
*
|
|
76
|
+
* This type represents a step that processes or generates structured data
|
|
77
|
+
* within an agent workflow. Data steps handle JSON processing, API responses,
|
|
78
|
+
* and structured data transformations.
|
|
79
|
+
*
|
|
80
|
+
* @template TCommand - The command type, defaults to MessageSendParams
|
|
81
|
+
* @template TPart - The data part type, defaults to DataPart["data"]
|
|
82
|
+
* @template TInboundArgs - Arguments received from previous step
|
|
83
|
+
* @template TForwardArgs - Arguments passed to next step
|
|
84
|
+
* @template TOutput - The output type of the step
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* const analyzeStep: dataStep = async ({ command, context, args }) => {
|
|
89
|
+
* const analysis = await analyzeMessage(command.message.content);
|
|
90
|
+
* return {
|
|
91
|
+
* sentiment: analysis.sentiment,
|
|
92
|
+
* entities: analysis.entities,
|
|
93
|
+
* confidence: analysis.confidence
|
|
94
|
+
* };
|
|
95
|
+
* };
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* @public
|
|
99
|
+
* @since 0.5.6
|
|
100
|
+
*/
|
|
101
|
+
export type dataStep<TCommand extends MessageSendParams = MessageSendParams, TPart extends DataPart["data"] = DataPart["data"], TInboundArgs extends readonly unknown[] = [], TForwardArgs extends readonly unknown[] = [], TOutput extends StepOutput<TPart> | StepOutputWithForwardArgs<TPart, TForwardArgs> | Array<TPart> | TPart = StepOutput<TPart>> = Step<TCommand, TPart, TInboundArgs, TForwardArgs, TOutput>;
|
|
102
|
+
/**
|
|
103
|
+
* Utility type to extract forward arguments from step output.
|
|
104
|
+
*
|
|
105
|
+
* This helper type extracts the forward arguments type from a step output,
|
|
106
|
+
* enabling proper type chaining between workflow steps.
|
|
107
|
+
*
|
|
108
|
+
* @template O - The output type to extract arguments from
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
type OutArgsOf<O> = O extends StepOutputWithForwardArgs<any, infer A> ? A : [];
|
|
112
|
+
/**
|
|
113
|
+
* Fluent builder for constructing A2A agent execution engines.
|
|
114
|
+
*
|
|
115
|
+
* The EngineBuilder provides a type-safe, fluent API for composing multi-step
|
|
116
|
+
* agent workflows. It supports method chaining to build complex agent behaviors
|
|
117
|
+
* from individual processing steps, with automatic type inference and validation.
|
|
118
|
+
*
|
|
119
|
+
* @template TCommand - The command type, defaults to MessageSendParams
|
|
120
|
+
* @template TInboundArgs - The arguments type received from previous steps
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```typescript
|
|
124
|
+
* const agent = EngineBuilder.create()
|
|
125
|
+
* .text(async ({ command }) => {
|
|
126
|
+
* return `Processing: ${command.message.content}`;
|
|
127
|
+
* })
|
|
128
|
+
* .data(async ({ args }) => {
|
|
129
|
+
* return { processed: true, timestamp: Date.now() };
|
|
130
|
+
* })
|
|
131
|
+
* .text(async ({ args }) => {
|
|
132
|
+
* return `Completed at ${new Date(args[0].timestamp)}`;
|
|
133
|
+
* })
|
|
134
|
+
* .createAgent({ agentCard: myAgentCard });
|
|
135
|
+
* ```
|
|
136
|
+
*
|
|
137
|
+
* @public
|
|
138
|
+
* @since 0.5.6
|
|
139
|
+
*/
|
|
140
|
+
export declare class EngineBuilder<TCommand extends MessageSendParams = MessageSendParams, TInboundArgs extends readonly unknown[] = []> implements StepBuilder<TCommand, TInboundArgs> {
|
|
141
|
+
private steps;
|
|
142
|
+
/**
|
|
143
|
+
* Private constructor to enforce factory method usage.
|
|
144
|
+
*
|
|
145
|
+
* @param steps - Initial steps array
|
|
146
|
+
*/
|
|
147
|
+
private constructor();
|
|
148
|
+
/**
|
|
149
|
+
* Creates a new EngineBuilder instance.
|
|
150
|
+
*
|
|
151
|
+
* @template TCommand - The command type for the builder
|
|
152
|
+
* @template TInboundArgs - The initial arguments type
|
|
153
|
+
* @returns A new EngineBuilder instance
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```typescript
|
|
157
|
+
* const builder = EngineBuilder.create<MyCommand, [string, number]>();
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
static create<TCommand extends MessageSendParams = MessageSendParams, TInboundArgs extends readonly unknown[] = []>(): EngineBuilder<TCommand, TInboundArgs>;
|
|
161
|
+
addStep<TPart extends DataPart["data"] | FilePart["file"] | TextPart["text"] = TextPart["text"], TForwardArgs extends readonly unknown[] = [], TOutput extends StepOutput<TPart> | StepOutputWithForwardArgs<TPart, TForwardArgs> | Array<TPart> | TPart = StepOutput<TPart>, TKind extends "text" | "file" | "data" = "text">(step: StepWithKind<TCommand, TPart, TInboundArgs, TForwardArgs, TOutput, TKind>): EngineBuilder<TCommand, OutArgsOf<TOutput>>;
|
|
162
|
+
/**
|
|
163
|
+
* Adds a text processing step to the workflow.
|
|
164
|
+
*
|
|
165
|
+
* @template TPart - The text part type
|
|
166
|
+
* @template TForwardArgs - Arguments to forward to next step
|
|
167
|
+
* @template TOutput - The output type of the step
|
|
168
|
+
* @param step - The text step implementation
|
|
169
|
+
* @returns New builder instance with updated type parameters
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```typescript
|
|
173
|
+
* builder.text(async ({ command, args }) => {
|
|
174
|
+
* return `Hello, ${command.message.content}!`;
|
|
175
|
+
* });
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
text<TPart extends TextPart["text"] = TextPart["text"], TForwardArgs extends readonly unknown[] = [], TOutput extends StepOutput<TPart> | StepOutputWithForwardArgs<TPart, TForwardArgs> | Array<TPart> | TPart = StepOutput<TPart>>(step: textStep<TCommand, TPart, TInboundArgs, TForwardArgs, TOutput>): EngineBuilder<TCommand, OutArgsOf<TOutput>>;
|
|
179
|
+
/**
|
|
180
|
+
* Adds a file processing step to the workflow.
|
|
181
|
+
*
|
|
182
|
+
* @template TPart - The file part type
|
|
183
|
+
* @template TForwardArgs - Arguments to forward to next step
|
|
184
|
+
* @template TOutput - The output type of the step
|
|
185
|
+
* @param step - The file step implementation
|
|
186
|
+
* @returns New builder instance with updated type parameters
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* ```typescript
|
|
190
|
+
* builder.file(async ({ command, args }) => {
|
|
191
|
+
* return {
|
|
192
|
+
* name: 'output.txt',
|
|
193
|
+
* mimeType: 'text/plain',
|
|
194
|
+
* bytes: Buffer.from(command.message.content)
|
|
195
|
+
* };
|
|
196
|
+
* });
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
file<TPart extends FilePart["file"] = FilePart["file"], TForwardArgs extends readonly unknown[] = [], TOutput extends StepOutput<TPart> | StepOutputWithForwardArgs<TPart, TForwardArgs> | Array<TPart> | TPart = StepOutput<TPart>>(step: fileStep<TCommand, TPart, TInboundArgs, TForwardArgs, TOutput>): EngineBuilder<TCommand, OutArgsOf<TOutput>>;
|
|
200
|
+
/**
|
|
201
|
+
* Adds a data processing step to the workflow.
|
|
202
|
+
*
|
|
203
|
+
* @template TPart - The data part type
|
|
204
|
+
* @template TForwardArgs - Arguments to forward to next step
|
|
205
|
+
* @template TOutput - The output type of the step
|
|
206
|
+
* @param step - The data step implementation
|
|
207
|
+
* @returns New builder instance with updated type parameters
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* ```typescript
|
|
211
|
+
* builder.data(async ({ command, args }) => {
|
|
212
|
+
* return {
|
|
213
|
+
* analysis: analyzeText(command.message.content),
|
|
214
|
+
* timestamp: Date.now()
|
|
215
|
+
* };
|
|
216
|
+
* });
|
|
217
|
+
* ```
|
|
218
|
+
*/
|
|
219
|
+
data<TPart extends DataPart["data"] = DataPart["data"], TForwardArgs extends readonly unknown[] = [], TOutput extends StepOutput<TPart> | StepOutputWithForwardArgs<TPart, TForwardArgs> | Array<TPart> | TPart = StepOutput<TPart>>(step: dataStep<TCommand, TPart, TInboundArgs, TForwardArgs, TOutput>): EngineBuilder<TCommand, OutArgsOf<TOutput>>;
|
|
220
|
+
/**
|
|
221
|
+
* Creates a complete A2A agent using the built workflow.
|
|
222
|
+
*
|
|
223
|
+
* @param params - Agent factory parameters (excluding engine)
|
|
224
|
+
* @returns Configured A2A agent instance
|
|
225
|
+
*
|
|
226
|
+
* @example
|
|
227
|
+
* ```typescript
|
|
228
|
+
* const agent = builder.createAgent({
|
|
229
|
+
* agentCard: {
|
|
230
|
+
* id: 'my-agent',
|
|
231
|
+
* name: 'Assistant Agent',
|
|
232
|
+
* capabilities: ['text-processing']
|
|
233
|
+
* }
|
|
234
|
+
* });
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
createAgent(params: Omit<FactoryParams, "engine">): import("../service.js").A2AService;
|
|
238
|
+
/**
|
|
239
|
+
* Creates an agent execution engine from the built workflow.
|
|
240
|
+
*
|
|
241
|
+
* @returns Agent execution engine function
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* ```typescript
|
|
245
|
+
* const engine = builder.createAgentEngine();
|
|
246
|
+
* // Use engine with service execution
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
createAgentEngine(): AgentEngine;
|
|
250
|
+
/**
|
|
251
|
+
* Builds the step list for the workflow.
|
|
252
|
+
*
|
|
253
|
+
* @returns Array of workflow steps
|
|
254
|
+
* @throws Error if no steps have been added
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* ```typescript
|
|
258
|
+
* const steps = builder.build();
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
261
|
+
build(): StepWithKind<TCommand, any, any, any, any, any>[];
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Convenience factory function for creating an agent builder with default parameters.
|
|
265
|
+
*
|
|
266
|
+
* @returns New EngineBuilder instance with MessageSendParams command type
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* ```typescript
|
|
270
|
+
* const agent = AgentBuilder()
|
|
271
|
+
* .text(async ({ command }) => `Hello ${command.message.content}!`)
|
|
272
|
+
* .createAgent({ agentCard: myCard });
|
|
273
|
+
* ```
|
|
274
|
+
*
|
|
275
|
+
* @public
|
|
276
|
+
* @since 0.5.6
|
|
277
|
+
*/
|
|
278
|
+
export declare const AgentBuilder: () => EngineBuilder<{
|
|
279
|
+
message: {
|
|
280
|
+
role: "user" | "agent";
|
|
281
|
+
parts: ({
|
|
282
|
+
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
283
|
+
file: {
|
|
284
|
+
bytes: string;
|
|
285
|
+
name?: string | undefined;
|
|
286
|
+
mimeType?: string | undefined;
|
|
287
|
+
uri?: undefined;
|
|
288
|
+
} | {
|
|
289
|
+
uri: string;
|
|
290
|
+
name?: string | undefined;
|
|
291
|
+
mimeType?: string | undefined;
|
|
292
|
+
bytes?: undefined;
|
|
293
|
+
};
|
|
294
|
+
metadata?: Record<string, unknown> | undefined;
|
|
295
|
+
} | {
|
|
296
|
+
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
297
|
+
text: string;
|
|
298
|
+
metadata?: Record<string, unknown> | undefined;
|
|
299
|
+
} | {
|
|
300
|
+
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
301
|
+
data: Record<string, unknown>;
|
|
302
|
+
metadata?: Record<string, unknown> | undefined;
|
|
303
|
+
})[];
|
|
304
|
+
messageId: string;
|
|
305
|
+
kind: "artifact-update" | "data" | "file" | "message" | "status-update" | "task" | "text";
|
|
306
|
+
metadata?: Record<string, unknown> | undefined;
|
|
307
|
+
extensions?: string[] | undefined;
|
|
308
|
+
referenceTaskIds?: string[] | undefined;
|
|
309
|
+
taskId?: string | undefined;
|
|
310
|
+
contextId?: string | undefined;
|
|
311
|
+
};
|
|
312
|
+
configuration?: {
|
|
313
|
+
acceptedOutputModes?: string[] | undefined;
|
|
314
|
+
historyLength?: number | undefined;
|
|
315
|
+
pushNotificationConfig?: {
|
|
316
|
+
url: string;
|
|
317
|
+
id?: string | undefined;
|
|
318
|
+
token?: string | undefined;
|
|
319
|
+
authentication?: {
|
|
320
|
+
schemes: string[];
|
|
321
|
+
credentials?: string | undefined;
|
|
322
|
+
} | undefined;
|
|
323
|
+
} | undefined;
|
|
324
|
+
blocking?: boolean | undefined;
|
|
325
|
+
} | undefined;
|
|
326
|
+
metadata?: Record<string, unknown> | undefined;
|
|
327
|
+
}, []>;
|
|
328
|
+
/**
|
|
329
|
+
* Creates an agent execution engine from a list of workflow steps.
|
|
330
|
+
*
|
|
331
|
+
* This function transforms a list of step definitions into an executable
|
|
332
|
+
* agent engine that processes commands through the defined workflow,
|
|
333
|
+
* yielding updates as each step completes.
|
|
334
|
+
*
|
|
335
|
+
* @param stepsList - Array of workflow steps to execute
|
|
336
|
+
* @returns Agent execution engine function
|
|
337
|
+
*
|
|
338
|
+
* @example
|
|
339
|
+
* ```typescript
|
|
340
|
+
* const steps = [
|
|
341
|
+
* { kind: 'text', step: greetingStep },
|
|
342
|
+
* { kind: 'data', step: analysisStep }
|
|
343
|
+
* ];
|
|
344
|
+
* const engine = createAgentExecutor(steps);
|
|
345
|
+
* ```
|
|
346
|
+
*
|
|
347
|
+
* @public
|
|
348
|
+
* @since 0.5.6
|
|
349
|
+
*/
|
|
350
|
+
export declare function createAgentExecutor(stepsList: StepWithKind[]): AgentEngine;
|
|
351
|
+
export {};
|
|
352
|
+
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -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;AAG1B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,QAAQ,CAClB,QAAQ,SAAS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