Skip to content

Duration-Based Subscription#159

Open
ariessa wants to merge 2 commits intomainfrom
feat/subscription
Open

Duration-Based Subscription#159
ariessa wants to merge 2 commits intomainfrom
feat/subscription

Conversation

@ariessa
Copy link

@ariessa ariessa commented Feb 10, 2026

Duration-Based Subscription

Support duration-based subscription jobs.

Overview

Add subscription support to the ACP Node SDK, including a new example demonstrating both subscription and fixed-price buyer/provider flows, along with the underlying client and job logic changes to handle the subscription lifecycle.

Changes

  • Added a new subscription example with:
    • scenario-based buyer flow (--scenario 1 subscription, --scenario 2 fixed-price)
    • provider-side subscription validation and conditional payment request logic
    • documentation for setup, assumptions, and expected flow
  • Extended client/job logic to support subscription lifecycle behavior:
    • subscription account validation and tier handling
    • subscription payment requirement decisioning
    • memo/payment flow updates for subscription vs fixed-price paths
  • Updated ABI/contract client plumbing and exported interfaces/types needed by the new flow.
  • Updated package metadata/dependencies required by the new implementation.
  • Added/updated unit and integration tests around job offering and subscription-related client behavior.

Assumptions in example

The chosen agent includes:

  • a subscription offering at index jobOfferings[0]
  • a fixed-price offering at index jobOfferings[1]

Validation

  • Ran targeted tests:

    • npm test -- acpJobOffering.test.ts
    • npm test -- acpJob.test.ts
  • Ran subscription example flows locally:

    npx ts-node seller.ts
    npx ts-node buyer.ts --scenario 1
    npx ts-node buyer.ts --scenario 2
    

@ariessa ariessa force-pushed the feat/subscription branch 2 times, most recently from f8865cc to f6848e8 Compare February 14, 2026 14:37
@ariessa ariessa changed the title feat: add subscription Duration-Based Subscription Feb 14, 2026
@ariessa ariessa force-pushed the feat/subscription branch 2 times, most recently from e527d1b to 4562980 Compare February 14, 2026 14:47
@ariessa ariessa marked this pull request as ready for review February 14, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant