1 noosphere pURI scheme-based payload handlingayload#3
Merged
Conversation
Co-Authored-By: Nora Noh <nora.noh.dev@gmail.com>
Update internal @Noosphere package dependencies to match current versions: - agent-core: contracts, crypto, registry 0.1.0-alpha.3 -> 0.1.0-alpha.5 - crypto: contracts 0.1.0-alpha.3 -> 0.1.0-alpha.5
- ContainerManager: Add connection retry for ECONNREFUSED (5 retries, 3s delay) - NoosphereAgent: Add request retry mechanism with configurable options - maxRetries: Maximum retry attempts (default: 3) - retryIntervalMs: Interval between retry checks (default: 30s) - Throttled to 1 retry per cycle to avoid rate limiting - Export RetryableEvent type for agent implementations - Bump version to 0.1.0-alpha.11
Update SDK to support the new PayloadData struct from EVM contracts. PayloadData allows flexible URI schemes (ipfs://, https://, ar://, etc.) while maintaining content integrity via contentHash verification. Changes: - Add PayloadData interface and InputType enum to contracts/types - Update Coordinator.abi.json and Router.abi.json with PayloadData struct - Update Coordinator.ts and Router.ts wrappers for PayloadData - Add PayloadUtils class with helper methods for creating PayloadData - Update NoosphereAgent to use PayloadData for result submission - Auto-regenerate typechain files Related to noosphere-evm#34, noosphere-evm#35
Add test coverage for PayloadData implementation: - PayloadUtils tests (28 tests): - fromInlineData: content hash computation - fromExternalUri: IPFS, HTTPS, Arweave, chain schemes - fromHashAndUri: pre-computed hash support - empty: zero hash for empty proof - computeHash: keccak256 hashing - verifyContent: integrity verification - Integration tests for full workflow - Edge cases: long content, special chars, unicode - PayloadData type tests (7 tests): - Empty URI (inline) - IPFS, HTTPS, Arweave, chain, data URI schemes - InputType enum tests (3 tests) - Updated ComputeDeliveredEvent test with PayloadData fields Total: 38 new test cases
Add integration test environment and scenarios for PayloadData: - config.ts: Test environment config (Anvil accounts, contract addresses) - payloadData.integration.test.ts: 23 test cases - Scenario 1: PayloadData creation and encoding - Scenario 2: URI scheme support (IPFS, HTTPS, Arweave, etc.) - Scenario 3: Content integrity verification - Scenario 4: Full flow simulation - Scenario 5: Gas cost estimation - Scenario 6: Error cases - npm scripts: - test: Run unit tests only - test:integration: Run integration tests only - test:all: Run all tests
- Add comprehensive E2E test suite for PayloadData - Test ABI encoding compatibility with EVM contracts - Verify gas cost analysis and savings (84-99%) - Test content integrity verification - Test URI scheme handling (ipfs, https, ar, data, chain) - Add full flow simulation tests - Add live contract test with reportComputeResult
…sed payload handling - Add PayloadResolver for resolving PayloadData from various URI schemes - Add storage adapters: IpfsStorage (Pinata), HttpStorage, DataUriStorage - Update NoosphereAgent to support payload encoding for outputs - Update CommitmentUtils to handle PayloadData format - Export PayloadUtils, PayloadData, PayloadResolver from index
- Add docker/docker-compose.yml for local Verdaccio registry - Add docker/verdaccio/config.yaml for registry configuration - Add scripts/publish-local.sh to publish SDK packages locally
- Add --patch, --minor, --major version bump options - Add --prerelease TAG for alpha/beta releases - Add --version for custom version - Add --help with usage examples - Add --dry-run for preview mode
Verdaccio config already allows unauthenticated publishing for @noosphere/* packages. The heredoc-based npm adduser was causing issues in non-interactive environments.
- Add S3Storage class supporting AWS S3, Cloudflare R2, and MinIO - Update PayloadResolver to support S3 storage option alongside IPFS - Fix ComputeDeliveredEvent to pass PayloadData instead of raw strings - Add @aws-sdk/client-s3 as optional peer dependency
- Update tests to expect hex-encoded URIs for Solidity bytes type - Bump contracts to 0.1.0-alpha.6 - Bump agent-core to 0.1.0-alpha.16
Update version across all packages for npm public registry release: - @noosphere/agent-core: 0.2.0-alpha.1 - @noosphere/contracts: 0.2.0-alpha.1 - @noosphere/crypto: 0.2.0-alpha.1 - @noosphere/registry: 0.2.0-alpha.1 - @noosphere/sdk: 0.2.0-alpha.1
- Add PayloadResolver to architecture diagram - Document storage backends (IPFS, S3/R2, DataUri, HTTP) - Add PayloadResolver usage example - Add storage environment variables (R2, IPFS/Pinata)
- Add new @noosphere/payload package with PayloadResolver, storage classes, and utilities - Migrate from Jest to Vitest across all packages - Improve test coverage (payload: 97.68%, contracts: 78.82%, registry: 91.48%) - Remove duplicate storage implementations from agent-core (now in payload package) - Add SDK smoke tests for verifying exports - Update agent-core PayloadResolver to use @noosphere/payload
- Fix EventMonitor WebSocket access using public getter 'websocket' instead of '_websocket' - Fix retry mechanism to use stored event data instead of hardcoded values - Add missing fee and commitment fields to RetryableEvent interface
Dependencies like vitest v4 and AWS SDK v3.970 require Node >= 20. Update CI matrix to test on Node 20.x and 22.x, and sync package-lock.json.
Ensure tsup is available in each package that uses it for builds.
Add cache clean and retry mechanism to handle npm's "Exit handler never called" error on CI.
Ensure tsup and typechain are found via npx to handle npm workspace binary resolution issues in CI.
- Add typechain, @typechain/ethers-v6, vitest to root package.json - Disable npm cache in CI to avoid stale dependency issues
- Retry npm ci up to 3 times with 10s delay - Fallback to npm install if npm ci fails - Verify tsup binary exists before proceeding
npm ci/install failing with "Exit handler never called" on GitHub Actions. Yarn is more stable for this environment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Create a new shared package for URI scheme-based payload handling.