Skip to content

Commit a3d6f80

Browse files
authored
Feat/0.6.0 (#40)
* Update dependencies and add default configuration for observability - Updated @modelcontextprotocol/sdk version from ^1.20.1 to 1.22.0 in package.json for improved functionality. - Introduced default configuration and logging capabilities in new config/default.ts and config/index.ts files. - Added observability interfaces in utils/logging/observability.ts to support custom logging implementations. - Refactored rpcParser function to be exported in src/server/express/server.ts. - Added copyright headers to several files for compliance. * Refactor A2A service to utilize A2A types for improved clarity and consistency - Updated A2AService and related methods to replace generic types with A2A-specific types for commands, states, and contexts. - Refactored context management and task handling to align with new A2A type definitions. - Enhanced type safety in message handling and task state management across various methods. - Improved overall code readability and maintainability by consolidating type definitions. * Update A2A service and types for improved clarity and functionality - Added @artinet/types dependency to package.json for better type management. - Refactored quick-server.ts to enhance logging and command handling, including a new mapping test feature. - Updated A2AClient to utilize new success response types for improved type safety in message handling. - Consolidated A2A-related types across various services and schemas for consistency. - Removed outdated A2A schemas and replaced them with imports from @artinet/types to streamline the codebase. * Big Bertha * Refactor A2A service and logging structure - Replaced logging utility imports with a centralized logger from the new config module for consistency. - Updated A2AClient and related methods to enhance type safety and clarity in task resubscription handling. - Introduced a new observability module to streamline logging practices across the codebase. - Consolidated A2A-related types and removed outdated schemas to improve maintainability and clarity. - Added new service and handler files to support enhanced A2A functionality and better organization of code. * Refactor A2A handlers and types for improved consistency - Replaced v2-specific types with A2A types across various handlers to enhance type safety and clarity. - Updated logging utility imports to use the centralized logger for consistent error handling. - Refactored task handling methods to streamline context management and improve maintainability. - Enhanced the agent card creation function to align with updated type definitions. * Enhance A2A SDK with new logger extensions and type improvements - Added Pino, Winston, and OpenTelemetry logger extensions to the SDK for better logging capabilities. - Updated Jest configuration to support new module path mappings. - Refactored error handling in various services to utilize the new logger structure. - Improved type definitions across A2A services for enhanced clarity and consistency. - Introduced a README for the new extensions, detailing usage and configuration. * Prepare for v0.6.0-preview release with major architectural updates - Introduced a unified type system with the new `@artinet/types` package, enhancing type definitions and IDE support. - Added pluggable logger extensions for Pino, Winston, and OpenTelemetry, allowing for customizable logging configurations. - Implemented a new configuration API for centralized SDK settings, simplifying logger and tracer management. - Enhanced the AgentBuilder with new features, including a `skip()` function for conditional workflow steps. - Established a state machine architecture for improved context lifecycle management. - Updated peer dependencies to streamline installation and ensure compatibility with the latest versions. - Improved type safety and performance optimizations across the SDK, including zero-overhead defaults for logging and tracing. - Added comprehensive documentation updates, including migration guides and API references for better developer experience. * Update package.json dependencies for improved compatibility and functionality - Upgraded `uuid` from version 11.1.0 to 13.0.0 for enhanced UUID generation. - Reintroduced `@opentelemetry/api` as a peer dependency to maintain observability support. - Removed unused OpenTelemetry dependencies to streamline the package and reduce bloat. * Enhance A2A SDK with type improvements and logging updates - Added new default configuration export in `src/config/default.js` for enhanced logging capabilities. - Updated error handling across various services to utilize direct error logging instead of formatted error messages. - Improved type definitions in A2A services for better clarity and consistency, including updates to message handling and context management. - Refactored service methods to streamline parameter handling and enhance type safety. - Consolidated imports from `@artinet/types` for better maintainability and clarity in type usage. * Refactor project structure and update workflows for improved consistency - Updated `.gitignore` to include `.github` directory for better management of ignored files. - Removed `package-lock.json` to streamline dependency management. - Enhanced `package.json` with new export paths for `trpc` to improve module accessibility. - Modified GitHub Actions workflows to replace `npm ci` with `npm install` for better compatibility and reliability during CI processes. - Refactored test imports in `server.test.ts` to align with updated module paths and improve clarity. * Update documentation and comment out logger configuration in tests - Changed import path for `createAgentRouter` in `customization.md` to reflect the new module structure. - Commented out logger configuration code in `streaming.test.ts` and `service.test.ts` to simplify test setup and avoid unnecessary complexity. * Update dependencies and enhance type safety in A2A SDK - Upgraded `@artinet/types` dependency to version `^0.0.9-alpha.3` for improved functionality. - Modified optional properties for `@trpc/server` and `@a2a-js/sdk` to true for better flexibility. - Refactored type definitions in response handling functions to use `MCP.JSONRPCResultResponse` for enhanced type safety. - Updated event stream handling functions to align with new response type definitions. - Introduced Zod schemas for `Update` type to improve validation and clarity in A2A message handling. - Adjusted test cases to reflect updated type imports for consistency and accuracy. * Enhance error handling and type definitions in A2AClient and core interfaces - Added detailed error logging in A2AClient for failed agent card fetch attempts. - Improved error messages to include underlying error details for better debugging. - Updated type definitions in core interfaces to include eslint directives for clarity and maintainability. - Adjusted test assertions to use more concise error handling methods. * Update GitHub Actions workflow to include cache-dependency-path for improved npm caching - Added cache-dependency-path to the Node.js workflow to optimize dependency caching by specifying the path to package.json. This change aims to enhance build performance in CI processes. * Update package.json to include new dependencies for enhanced functionality - Added `@modelcontextprotocol/sdk` and `@trpc/server` to package.json for improved SDK capabilities and type safety. * Refactor A2A SDK with new create module and improved error handling - Introduced a new `create` module to streamline agent and message building processes, enhancing the SDK's usability. - Updated error handling in A2A services to utilize the new `@a2a-js/sdk` error classes for better consistency and clarity. - Removed deprecated methods and refactored existing code to align with the new structure, improving maintainability. - Enhanced type definitions across various components for improved type safety and developer experience. - Updated README and documentation to reflect changes in the SDK structure and usage. * Refactor task status handling and enhance logging in A2A services - Simplified task ID and context ID assignment in TaskStatusUpdateEvent to allow for more flexible parameter handling. - Updated the _canceled and _completed functions to include a new parameter for improved state management. - Added detailed debug logging in the Tasks manager to provide better insights during task updates. - Removed unused logger import in the send-message handler to clean up the codebase. - Enhanced error handling in the update message process to include actual task details for better debugging. * Improve error handling and completion logic in A2A services - Updated error handling in the execute function to rethrow errors for caller management. - Ensured completion is triggered in the state machine to maintain context cleanup consistency. - Enhanced comments for clarity on error handling and completion processes. * Update version and refactor utility imports for improved organization - Bumped version to 0.6.0-preview.2 in package.json. - Refactored imports in task-builder and update handlers to use specific utility paths for better clarity. - Enhanced error handling in update process to include formatted JSON output for improved debugging. * Refactor A2A SDK to use cr8 builder and enhance documentation - Replaced `AgentBuilder` and `createAgentServer` with the new `cr8` builder for improved agent creation and server setup. - Introduced new step types: `.message()`, `.artifact()`, `.status()`, and `.task()` for more expressive workflows. - Updated documentation across multiple files to reflect changes in API usage and new features, including the `describe` helper for creating A2A objects. - Enhanced examples in the README and other documentation to demonstrate the new capabilities of the SDK. * Add copyright and license headers to multiple files - Introduced copyright notice and SPDX license identifier to `status-builder.ts`, `otel.ts`, `pino.ts`, and `winston.ts` for compliance. - Enhanced error messages in `update.ts` to provide clearer context on invalid task IDs during updates, improving debugging capabilities. * Update version and refactor utility imports for improved organization - Bumped version to 0.6.0-preview.3 in package.json. - Updated dependency for `@artinet/types` to version `^0.0.9-alpha.4`. - Commented out logger warning in getExtensions function to reduce noise. - Refactored imports in message and task routes to use specific utility paths for better clarity. * Rename parameter in getExtensions function for clarity * Update package.json to add express module and new dependency - Added support for the express module with corresponding types and import paths. - Included @opentelemetry/api as a new dependency for enhanced observability. - Adjusted peerDependencies to maintain compatibility with existing packages. * Update README.md for improved presentation and community engagement - Reformatted badge section to center-align and enhance visual appeal. - Added a new "Join the Community" section with links to Reddit and Discord for better community interaction. * Refactor cr8 initialization in README example * Simplify text function syntax in README * Clarify server start in README example Added a comment to clarify server start. * Enhance A2A SDK with new features and refactor existing code - Added support for push notifications with a new `PushNotifications` manager and related methods. - Introduced `Native` class for handling A2A requests, including task management and push notification configuration. - Updated `Service` class to integrate user ID and notifier options for enhanced task handling. - Refactored context creation to include user ID and improved error handling. - Added `skipLibCheck` to `tsconfig.json` for better TypeScript compilation performance. - Updated dependencies in `package.json` to include `eventemitter3` and other necessary packages. - Deprecated old middleware in favor of new JSON-RPC handler from `@a2a-js/sdk/server/express`. * Remove unused import of `formatJson` from errors.ts to clean up code. * Refactor SystemError constructor in errors.ts to remove unnecessary cause parameter - Simplified the constructor by removing the unused `cause` argument from the `super` call, enhancing code clarity. * Decouple express from core package and enhance server routing - Removed express from the core package, making it a peer dependency to improve separation of concerns. - Updated server routing to utilize express.Router for better organization and maintainability. - Adjusted paths for agent card responses to align with new routing structure. - Added comments to clarify the transport layer capabilities and future enhancements. * Update version to 0.6.0-beta and refactor type definitions - Changed version in package.json from 0.6.0-preview.3 to 0.6.0-alpha. - Refactored type definitions in agent-builder.ts to simplify the inC type. - Updated create.ts to enhance type parameters in the toFunction method and improved class structure for AgentBuilder. - Deprecated old methods in favor of new implementations for better clarity and maintainability in server.ts. * Update version to 0.6.0 and refactor SDK structure - Updated version in package.json from 0.6.0-alpha to 0.6.0. - Added new SQLite module exports for better storage options. - Refactored client exports to streamline the SDK interface, removing the deprecated A2AClient. - Enhanced server implementation by integrating express routing and improving task management methods. - Removed unused transport layer files to clean up the codebase. - Updated utility functions and error handling for improved clarity and maintainability. * Refactor A2A SDK handlers and update package dependencies - Updated package.json to use the stable version of @artinet/types. - Refactored client exports to improve clarity by removing type exports. - Enhanced the Messenger class and its usage in task management methods. - Introduced new utility functions for error handling in Express servers. - Updated service methods to streamline context handling and improve type definitions. - Replaced deprecated RequestHandler with Handles for better maintainability. * chore: Add better-sqlite3 as a devDependency in package.json * chore: disabling for Actions, works locally; need to nock push notification fetch * Enhance Jest configuration and improve server start logging - Added maxWorkers setting to Jest configuration for optimized test execution. - Updated integration test to log server start and include a delay for readiness before client connection. * Refactor SQLiteStore tests to improve setup and teardown - Added beforeAll, afterAll, and afterEach hooks for better test management. - Initialized SQLite database and drizzle instance within the test suite for improved isolation and clarity. * Add nock for webhook testing in A2A protocol tests - Integrated nock to mock the webhook endpoint for improved test reliability. - Ensured persistent mock responses for consistent test behavior. * Update package.json to include nock and its types for improved testing capabilities - Added @types/nock and nock as dependencies to facilitate mocking in tests. - Enhanced testing reliability for webhook interactions. * Implement centralized logging configuration in test files - Added Pino logger configuration to multiple test files for consistent logging. - Enhanced test output readability with pretty-printing and colorization. - Set a reasonable timeout for all tests to improve execution reliability. * Enhance logging in server implementation tests - Added logger statements to track task creation and retrieval processes. - Removed duplicate test environment setting in Jest configuration for clarity. * Update Jest configuration and enhance error logging in Messenger class - Set testTimeout to 30000ms and enabled forceExit in Jest configuration for improved test reliability. - Added error logging in the Messenger class to capture failures when no fallback path is provided. * Enhance error handling in Messenger class and clean up test file imports - Improved error handling in the Messenger class by adding a catch block to log failures when creating a client from the fallback path. - Commented out unused Pino logger configuration in multiple test files for clarity and to reduce clutter. * Remove @types/nock from package.json and skip server implementation and streaming API tests for maintenance * Add nock setup for improved test isolation and reliability - Introduced a new setup file for Jest tests to configure nock for HTTP request mocking. - Enabled local network connections while disabling all others to ensure controlled test environments. - Set up persistent mock responses for the webhook endpoint to enhance test consistency. * Refactor Jest configuration and enable server tests - Removed testTimeout setting from Jest configuration for streamlined settings. - Enabled previously skipped server implementation and streaming API tests to ensure comprehensive test coverage. * Refactor streaming test setup and apply default configurations - Removed commented-out Pino logger configuration to declutter the test file. - Introduced default configuration application to streamline test setup. - Set a reasonable timeout for all tests to enhance execution reliability. * Update Jest configuration to suppress deprecation warnings and enable silent mode - Added errorOnDeprecated set to false to prevent warnings for deprecated features. - Enabled silent mode to reduce console output during test execution. * bug: @a2a-js/sdk is still prone to errors. handle with care * Skip server implementation, A2A server, and streaming API tests for maintenance * Skip A2AClient tests to focus on maintenance and stability * Refactor nock setup in test configuration - Removed the redundant call to disableNetConnect in the beforeAll hook. - Commented out the enableNetConnect function to clarify the intent of allowing local network connections only. * Refactor project structure and update documentation - Removed the `@artinet/sdk` dependency from the `package.json` and updated repository URLs for consistency. - Simplified Jest configuration by removing the `maxWorkers` setting. - Enhanced README to clarify the SDK's purpose and installation instructions, including new examples and features. - Introduced `AgentMessenger` for improved message handling and updated related documentation. - Deleted outdated `client.md` and `server.md` files, consolidating information into more relevant sections. - Updated migration guide to reflect changes in peer dependencies and configuration API. - Improved test setup by archiving irrelevant tests and enhancing error handling in the Messenger class. * Update browser entry point to export from messenger module instead of client module * Update CHANGELOG for v0.6.0 release, including breaking changes and new features. Add quickstart examples for client and server implementations. Enhance migration documentation with a reference to quickstart guide. * Remove outdated example files and README from the Artinet SDK examples directory to streamline the project and eliminate redundancy.
1 parent a87a73a commit a3d6f80

File tree

226 files changed

+11296
-20475
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+11296
-20475
lines changed

.github/workflows/node.js.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ name: Node.js CI
55

66
on:
77
push:
8-
branches: [ "main" ]
8+
branches: ["main"]
99
pull_request:
10-
branches: [ "main" ]
10+
branches: ["main"]
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
strategy:
@@ -20,12 +19,13 @@ jobs:
2019
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2120

2221
steps:
23-
- uses: actions/checkout@v4
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
cache: 'npm'
29-
- run: npm install
30-
- run: npm run build:all --if-present
31-
- run: npm test
22+
- uses: actions/checkout@v4
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: "npm"
28+
cache-dependency-path: "package.json"
29+
- run: npm install
30+
- run: npm run build:all --if-present
31+
- run: npm test

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ node_modules
22
dist
33
data
44
coverage
5-
.github
5+
# .github
66
.external
77

CHANGELOG.md

Lines changed: 88 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,95 @@
11
# Changelog
22

3-
All notable changes to the @artinet/sdk package will be documented in this file.
3+
All notable changes to the `@artinet/sdk` package will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.6.0] - 2025-12-21
9+
10+
### Highlights
11+
12+
This release represents a major architectural milestone and our first LTS release. Key themes include a unified type system, pluggable observability, and tighter integration with the emerging Agent2Agent ecosystem.
13+
14+
### Added
15+
16+
- **Unified Type System**: New `@artinet/types` package provides canonical A2A type definitions
17+
18+
- All types now accessible via `A2A` namespace (e.g., `A2A.Task`, `A2A.Message`, `A2A.Context`)
19+
- Cleaner imports and better IDE autocomplete
20+
21+
- **Pluggable Logger Extensions**: Bring-your-own-logger architecture with zero-config defaults
22+
23+
- `@artinet/sdk/pino` - Pino adapter via `configurePino()`
24+
- `@artinet/sdk/winston` - Winston adapter via `configureWinston()`
25+
- `@artinet/sdk/otel` - OpenTelemetry span-event logging via `configureOtel()`
26+
- Combine loggers: logs can go to both Pino AND span events simultaneously
27+
28+
- **OpenTelemetry Integration**: Native distributed tracing support
29+
30+
- `configure({ tracer })` for global tracer configuration
31+
- `withSpan(tracer, name, fn)` helper for easy span creation with automatic error handling
32+
- Re-exports common OTel types from `@artinet/sdk/otel`
33+
34+
- **New Configuration API**: Centralized SDK configuration
35+
36+
- `configure({ logger, tracer })` - single configuration point
37+
- `getLogger()`, `getTracer()` - access configured instances
38+
- `resetConfig()` - useful for testing
39+
- `applyDefaults()` - enable console logging with one call
40+
41+
- **AgentBuilder to cr8**:
42+
43+
- New `skip()` function to conditionally skip workflow steps
44+
- Simplified generic parameters for better TypeScript ergonomics
45+
46+
- **StateMachine Architecture**: New state machine pattern for context lifecycle management
47+
48+
### Changed
49+
50+
- **BREAKING**: `@modelcontextprotocol/sdk`, `@trpc/server`, `express` and `@a2a-js/sdk` are now **peer dependencies**
51+
- Install them explicitly: `npm install @a2a-js/sdk @modelcontextprotocol/sdk express @trpc/server`
52+
- **BREAKING**: `configureLogger()` replaced with `configure({ logger })`
53+
54+
- Before: `configureLogger({ level: 'info' })`
55+
- After: `configure({ logger: configurePino(pino({ level: 'info' })) })`
56+
57+
- **BREAKING**: Logger extensions require explicit logger instances
58+
59+
- SDK no longer creates loggers internally - you bring your configured instance
60+
- **Logger Extension Helpers**: All logger/tracer extensions (`@artinet/sdk/pino`, `@artinet/sdk/winston`, etc) now export `configure` variants (e.g., `configurePino`) that add `.child()`, `.withSpan()`, and similar convenience utilities for advanced workflows.
61+
- Use `configurePino(...)` to get SDK-ready pino loggers.
62+
- Extensions remain fully compatible with plain base logger instances if you do not need helpers.
63+
64+
- **BREAKING**: Types now use `A2A` namespace
65+
66+
- Before: `import { Task, Message } from '@artinet/sdk'`
67+
- After: `import { A2A } from '@artinet/sdk'` then use `A2A.Task`, `A2A.Message`
68+
69+
- **EngineBuilder/AgentBuilder Simplification**: Removed `TCommand` generic parameter
70+
71+
- Cleaner type signatures with fewer generic parameters
72+
- `EngineBuilder<TInboundArgs>` instead of `EngineBuilder<TCommand, TInboundArgs>`
73+
74+
- **Dependency Updates**:
75+
- `zod` upgraded to `^3.25`
76+
- `jest` upgraded to `^30.2.0`
77+
- `@types/node` upgraded to `^25.0.3`
78+
- `rimraf` upgraded to `^6.1.2`
79+
80+
### Improved
81+
82+
- **Zero-Overhead Defaults**: No-op logger and tracer when not configured - zero performance cost
83+
- **Environment Agnostic**: Observability interfaces work across Node.js, Deno, Bun, edge runtimes, and browsers
84+
- **Type Safety**: Enhanced type definitions with better inference and stricter contracts
85+
- **Bundle Size**: Moved heavy dependencies to peer/optional to reduce install footprint
86+
87+
### Technical Notes
88+
89+
- OpenTelemetry packages are optional dependencies - only install if you need tracing
90+
- Logger extensions (pino, winston) are thin wrappers - you configure, we adapt
91+
- The `A2A` namespace consolidates all Agent2Agent protocol types for cleaner code
92+
893
## [0.5.7] - 2025-08-30
994

1095
### Added
@@ -287,8 +372,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
287372
- Support for streaming responses and push notifications
288373
- Comprehensive test suite and documentation
289374

290-
<!-- [Unreleased]: https://github.com/artinet/sdk/compare/v0.5.6...HEAD -->
291-
375+
[0.6.0-preview]: https://github.com/the-artinet-project/artinet-sdk/compare/v0.5.18...v0.6.0-preview
376+
[0.5.7]: https://github.com/the-artinet-project/artinet-sdk/compare/v0.5.6...v0.5.7
292377
[0.5.6]: https://github.com/the-artinet-project/artinet-sdk/compare/v0.5.4...v0.5.6
293378
[0.5.2]: https://github.com/the-artinet-project/artinet-sdk/compare/v0.5.1...v0.5.2
294379
[0.5.1]: https://github.com/the-artinet-project/artinet-sdk/compare/v0.5.0...v0.5.1

0 commit comments

Comments
 (0)