Version History
This page documents the version history of the Artinet SDK, highlighting breaking changes and important updates that may affect your integration.
Migration Guides
0.3.x to 0.5.0 Migration
If you're upgrading from 0.3.x to 0.5.0, be aware of the following breaking changes:
-
SystemError Constructor: The
data
parameter in theSystemError
constructor and all specific error factory functions (e.g.,PARSE_ERROR()
,INVALID_PARAMS()
,TASK_NOT_FOUND()
) is now mandatory. -
Express Server Refactoring: The
createExpressServer
utility has been refactored: - No longer accepts a
port
parameter. - No longer creates or returns an
http.Server
instance. -
Server starting is now handled within
A2AServer.start()
only. -
Type Definition Changes: Optional properties are now defined using
type?
instead oftype | null
. -
Task Status Initialization: When a task is initiated, the initial task status no longer includes a
message: null
field. -
Error Messaging: Generic
METHOD_NOT_FOUND()
errors have been replaced with more specificPUSH_NOTIFICATION_NOT_SUPPORTED()
errors.
Detailed Version History
Changelog
All notable changes to the @artinet/sdk package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.5.2] - 2025-05-25
Added
- New
artinet.v0
namespace insrc/utils/deployment/agents.ts
providingtaskManager
,connect
, andagent
utilities. These are designed for agents running in sandboxed or managed environments, offering a standardized way to interact with the host system for task execution, inter-agent communication, and external API calls. - Corresponding types for the new agent utilities in
src/types/proxy.ts
:TaskProxy
,TaskManagerProps
,TaskManager
,ConnectProps
,ConnectAPICallback
,ClientProxy
,ClientProps
,ClientFactory
. - New
exports
path./agents
inpackage.json
to expose theartinet.v0
utilities. - New example file
examples/nested-deployment.ts
demonstrating how to useartinet.v0.agent
for an agent to call another agent, andartinet.v0.taskManager
for managing the agent's lifecycle. - New
dev-pack
script inpackage.json
for easier local development and packaging.
Changed
- Refactoring:
src/client/interfaces/client.ts
has been moved tosrc/types/client.ts
.src/server/interfaces/context.ts
has been moved tosrc/types/context.ts
.- Internal type imports throughout the codebase have been updated to reflect these changes.
- Examples
examples/code-deployment.js
andexamples/code-deployment.ts
have been updated to use the newartinet.v0.taskManager
andartinet.v0.connect
utilities instead of the deprecated proxy functions. - Updated
@types/node
dependency to^20.17.50
.
Deprecated
- The
taskHandlerProxy
andfetchResponseProxy
functions insrc/utils/deployment/task-wrapper.ts
are now deprecated. Developers should migrate to the newartinet.v0.taskManager
andartinet.v0.connect
utilities respectively.
Removed
- Removed
json-schema-to-typescript
fromdevDependencies
as it's no longer directly used.
Fixed
- Minor wording update in the "QUICK-AGENT FAQs" section of
README.md
for clarity on searching byregistrationId/agentId
.
[0.5.1] - 2025-05-12
Added
fullDeployment
utility (src/utils/deployment/full-deployment.ts
): Enables direct deployment of bundled agent code and itsAgentCard
to the Artinet platform. Requires anARTINET_API_KEY
.- New comprehensive test suite for deployment features (
tests/deployment.test.ts
), coveringtestDeployment
andfullDeployment
. - Agents registered via
A2AServer.registerServer()
orregister: true
now includetags: ["a2a"]
in their registration payload.
Changed
- The
handler
property inA2AServerParams
(used to pass the agent's core logic) was previously documented and used in some examples astaskHandler
. This has been corrected tohandler
consistently. WhiletaskHandler
might have worked due to object flexibility,handler
is the intended property name. - Clarified type description for
ServerDeploymentRequestParams.dependencies
to note it is "currently unsupported". - Clarified type description for
BaseServerDeploymentResponseParams.deploymentId
regarding its value in full deployments.
Fixed
- Improved error handling in
A2AClient
duringagentCard()
fetching:- Validates parsed URLs before use.
- Ensures
AgentCard
objects contain aname
property.
- Enhanced error logging in
src/transport/rpc/parser.ts
to includeerror.message
forSystemError
instances. - Prevented agent registration via
register()
utility if theAgentCard.url
is localhost, 127.0.0.1, or empty, returning an empty string instead of attempting registration. - Corrected an issue in an example in
README.md
wheretaskHandler
was used instead ofhandler
for theA2AServer
constructor (matches the breaking change clarification above). - Minor stability improvement in
testDeployment
utility's event handling logic.
[0.5.0] - 2025-05-10
Added
A2AServer.getExpressApp()
: New method to access the underlying Express application instance, allowing for more flexible server customization and middleware integration.- More specific error messages for various RPC errors (e.g.,
TASK_NOT_FOUND
,INVALID_PARAMS
,PARSE_ERROR
), providing better debugging information and context.
Changed
- BREAKING: The
data
parameter in theSystemError
constructor and all specific error factory functions (e.g.,PARSE_ERROR()
,INVALID_PARAMS()
,TASK_NOT_FOUND()
) is now mandatory. This change aims to enhance error reporting by ensuring contextual information is always provided with errors. - BREAKING: Refactored the
createExpressServer
utility (src/server/lib/express-server.ts
):- It no longer accepts a
port
parameter. - It no longer creates or returns an
http.Server
instance (i.e., it doesn't callapp.listen()
). It now solely configures and returns the Expressapp
instance. - The responsibility of starting the HTTP server is now fully handled within the
A2AServer.start()
method, which uses theapp
configured bycreateExpressServer
.
- It no longer accepts a
- Updated numerous TypeScript type definitions in
src/types/schema.ts
to more strictly define optional properties. Many properties that were previouslytype | null
are now justtype?
, and JSDoc@default null
comments have been removed. This aligns with standard TypeScript practices where optional properties are either present with a value or absent (undefined), rather than being explicitlynull
. - When a task is initiated via
A2AServer.sendTaskAndStore()
, the initial task status (Task.status
) no longer includes amessage: null
field. - In
src/server/lib/state.ts
, when creating a new task object duringloadState
,sessionId
andmetadata
properties are assigned directly if provided, without defaulting tonull
if they are undefined. - Replaced generic
METHOD_NOT_FOUND()
errors with more specificPUSH_NOTIFICATION_NOT_SUPPORTED()
errors indefaultSetTaskPushNotificationMethod
anddefaultGetTaskPushNotificationMethod
when the agent's card indicates that push notifications are not supported.
Removed
- The test file
tests/deployment.test.ts
has been removed. ThetestDeployment
utility and related "Quick-Agents" features remain.
Improved
- The documentation section in
README.md
regarding agent code deployment has been renamed from "Agent Code Deployment (Beta)" to "Quick-Agents (Alpha)". This section includes updated descriptions, code examples for bundling and testing agents, and a new FAQ. - Server startup logging in
A2AServer
now consistently useslogInfo
for messages like "A2A Server started and listening".
[0.4.1] - 2025-05-08
Added
- Utility for bundling agent code using
esbuild
(src/utils/deployment/bundler.ts
). - Task handler wrapper (
taskHandlerProxy
) andfetchResponseProxy
for streamlined agent deployment logic (src/utils/deployment/task-wrapper.ts
,examples/task-wrapper.js
). - Test deployment functionality (
testDeployment
) to test agent deployments in a sandboxed environment (src/utils/deployment/test-deployment.ts
). - New types for server deployment requests and responses (
ServerDeploymentRequestParams
,ServerDeploymentResponse
, etc. insrc/types/extended-schema.ts
). - Comprehensive tests for the new bundler and deployment features (
tests/bundler.test.ts
,tests/deployment.test.ts
). - Example agents demonstrating code deployment:
examples/code-deployment.js
andexamples/code-deployment.ts
. esbuild
dependency for bundling.
Changed
- BREAKING: Updated
rootDir
intsconfig.json
tosrc
anddeclarationDir
to./dist/types
. This changes the output structure for type declarations. - Type declaration paths in
package.json
updated todist/types/index.d.ts
to reflecttsconfig.json
changes. - Deprecated
JSONRPCSuccessResponse
,JSONRPCErrorResponse
insrc/types/extended-schema.ts
in favor of the more generalJSONRPCResponse
. - Enhanced error logging in
src/transport/rpc/parser.ts
by adding response data to parse errors.
[0.3.0] - 2025-04-28
Added
- Server option
register: boolean
inA2AServerParams
to automatically register the agent with the A2A Registry on startup (default:false
). A2AServer.registerServer()
method to manually trigger agent registration.- Server option
fallbackPath: string
inA2AServerParams
to customize the fallback endpoint for serving the Agent Card (defaults to/agent-card
). The standard/.well-known/agent.json
endpoint remains. - Client constructor option
fallbackPath: string
inA2AClient
to specify a custom path when fetching the Agent Card if the standard paths fail.
Changed
- BREAKING: Renamed server configuration type from
A2AServerOptions
toA2AServerParams
for consistency. - Updated dependencies to latest versions:
eventsource-parser
to^3.0.1
. Adapted streaming logic (handleEventStream
) to useEventSourceMessage
type from this library.express
to^5.1.0
.jayson
to^4.2.0
.node:16
tonode:22
ES2020
toES2022
- Updated various code examples in documentation for improved clarity and consistency (
README.md
,examples/
).
Improved
- Refactored server JSON-RPC method handling:
- Introduced
createJSONRPCMethod
helper for wrapping A2A method logic with dependency injection and error handling. - Exported default implementations for standard A2A methods (e.g.,
defaultSendTaskMethod
) fromlib/middleware/a2a-methods.js
. - Provided
defaultCreateJSONRPCServer
factory demonstrating standard server setup. This simplifies advanced server customization.
- Introduced
- Significantly revised and expanded
README.md
documentation:- Updated Features, Class Documentation, and Usage sections.
- Added detailed section on Server Registration & Discovery.
- Corrected and clarified Advanced Server Customization examples.
- Updated test suite to incorporate tests for new server registration and fallback path functionalities.
0.2.0 - 2025-04-25
Fixed
- Fixed TypeScript errors related to the
eventsource-parser
package imports - Updated imports to use the correct types from
eventsource-parser
v1.1.1 - Properly typed the
EventSourceMessage
asParsedEvent
- Refactored
createParser
implementation to match the package's API - Fixed streaming response handler to use the correct event type checking
Changed
- Updated
tsconfig.json
to addisolatedModules: true
for better compatibility withts-jest
- Modified
package.json
test scripts to includeNODE_OPTIONS=--experimental-vm-modules
flag to support ES modules in Jest tests
Improved
- Expanded test suite to achieve 80% code coverage
- Added tests for all client methods
- Added robust error handling tests
- Added tests for streaming functionality
- Added tests for push notification configuration
- Added tests for edge cases in agent card fetching and capability detection
0.1.0 - 2025-04-22
Added
- Initial release of the @artinet/sdk package
- Implementation of the Agent2Agent (A2A) Protocol client
- Support for sending tasks, retrieving statuses, and canceling operations
- Support for streaming responses and push notifications
- Comprehensive test suite and documentation