From 9c63a6ed2cad4e9e4cc46afbdab1decb9c0e85b5 Mon Sep 17 00:00:00 2001 From: Ang Weoy Yang Date: Thu, 12 Feb 2026 09:42:53 +0800 Subject: [PATCH 1/2] feat: add required funds bool field to job offering --- virtuals_acp/client.py | 18 ++++++++++-------- virtuals_acp/job_offering.py | 3 ++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/virtuals_acp/client.py b/virtuals_acp/client.py index 4673b4b..4f14b0d 100644 --- a/virtuals_acp/client.py +++ b/virtuals_acp/client.py @@ -296,12 +296,12 @@ def _hydrate_agent(self, agent_data: Dict[str, Any]) -> IACPAgent: provider_address = agent_data.get("walletAddress") job_offerings: List[ACPJobOffering] = [] - for job in agent_data.get("jobs", []): - if "priceV2" in job: - price = job["priceV2"]["value"] - price_type = PriceType(job["priceV2"]["type"]) - elif "price" in job: - price = job["price"] + for offering in agent_data.get("jobs", []): + if "priceV2" in offering: + price = offering["priceV2"]["value"] + price_type = PriceType(offering["priceV2"]["type"]) + elif "price" in offering: + price = offering["price"] price_type = PriceType.FIXED else: continue @@ -311,10 +311,12 @@ def _hydrate_agent(self, agent_data: Dict[str, Any]) -> IACPAgent: acp_client=self, contract_client=contract_client, provider_address=provider_address, - name=job["name"], + name=offering["name"], price=price, price_type=price_type, - requirement=job.get("requirement", None), + required_funds=offering["requiredFunds"], + requirement=offering.get("requirement", None), + deliverable=offering.get("deliverable", None), ) ) diff --git a/virtuals_acp/job_offering.py b/virtuals_acp/job_offering.py index d806ca3..91ec376 100644 --- a/virtuals_acp/job_offering.py +++ b/virtuals_acp/job_offering.py @@ -28,7 +28,8 @@ class ACPJobOffering(BaseModel): provider_address: str name: str price: float - price_type: PriceType = PriceType.FIXED + price_type: PriceType + required_funds: bool requirement: Optional[Union[Dict[str, Any], str]] = None deliverable: Optional[Union[Dict[str, Any], str]] = None From 07507dbcc7f3b866e737a1612d46e54689070fbd Mon Sep 17 00:00:00 2001 From: Celeste Ang Date: Wed, 11 Feb 2026 22:14:30 -0800 Subject: [PATCH 2/2] bump to 0.3.19 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5bdcf88..e7227f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "virtuals-acp" -version = "0.3.18" +version = "0.3.19" description = "Agent Commerce Protocol Python SDK by Virtuals" authors = ["Steven Lee Soon Fatt "] readme = "README.md"