acp-plugin-gamesdk 0.1.6__py3-none-any.whl → 0.1.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,14 +29,15 @@ class AcpClient:
29
29
 
30
30
  def browse_agents(self, cluster: Optional[str] = None, query: Optional[str] = None) -> List[AcpAgent]:
31
31
  url = f"{self.acp_base_url}/agents"
32
-
32
+
33
+ # agent must exclude itself from search result to prevent self-commission
34
+ url += f"?filters[walletAddress][$notIn]={self.agent_wallet_address}"
35
+
33
36
  if query:
34
- url += f"?search={requests.utils.quote(query)}"
37
+ url += f"&search={requests.utils.quote(query)}"
35
38
 
36
39
  if cluster:
37
- # Add & if there's already a parameter, otherwise add ?
38
- separator = "&" if query else "?"
39
- url += f"{separator}filters[cluster]={requests.utils.quote(cluster)}"
40
+ url += f"&filters[cluster]={requests.utils.quote(cluster)}"
40
41
 
41
42
  response = requests.get(url)
42
43
 
@@ -290,7 +290,14 @@ class AcpPlugin:
290
290
  executable=self._initiate_job_executable
291
291
  )
292
292
 
293
- def _initiate_job_executable(self, sellerWalletAddress: str, price: str, reasoning: str, serviceRequirements: str, requireEvaluation: bool, evaluatorKeyword: str, tweetContent: Optional[str] = None) -> Tuple[FunctionResultStatus, str, dict]:
293
+ def _initiate_job_executable(self, sellerWalletAddress: str, price: str, reasoning: str, serviceRequirements: str, requireEvaluation: str, evaluatorKeyword: str, tweetContent: Optional[str] = None) -> Tuple[FunctionResultStatus, str, dict]:
294
+ if isinstance(requireEvaluation, str):
295
+ require_evaluation = requireEvaluation.lower() == 'true'
296
+ elif isinstance(requireEvaluation, bool):
297
+ require_evaluation = requireEvaluation
298
+ else:
299
+ require_evaluation = False
300
+
294
301
  if not price:
295
302
  return FunctionResultStatus.FAILED, "Missing price - specify how much you're offering per unit", {}
296
303
 
@@ -306,12 +313,12 @@ class AcpPlugin:
306
313
  if not sellerWalletAddress:
307
314
  return FunctionResultStatus.FAILED, "Missing seller wallet address - specify the agent you want to buy from", {}
308
315
 
309
- if bool(requireEvaluation) and not evaluatorKeyword:
316
+ if require_evaluation and not evaluatorKeyword:
310
317
  return FunctionResultStatus.FAILED, "Missing validator keyword - provide a keyword to search for a validator", {}
311
318
 
312
319
  evaluatorAddress = self.acp_token_client.get_agent_wallet_address()
313
320
 
314
- if bool(requireEvaluation):
321
+ if require_evaluation:
315
322
  validators = self.acp_client.browse_agents(self.evaluator_cluster, evaluatorKeyword)
316
323
 
317
324
  if len(validators) == 0:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: acp-plugin-gamesdk
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: ACP Plugin for Python SDK for GAME by Virtuals
5
5
  Author: Steven Lee Soon Fatt
6
6
  Author-email: steven@virtuals.io
@@ -164,6 +164,20 @@ acp_plugin = AcpPlugin(
164
164
 
165
165
  5. (Optional) If you want to listen to the `ON_EVALUATE` event, you can implement the `on_evaluate` function.
166
166
 
167
+
168
+ Evaluation refers to the process where buyer agent reviews the result submitted by the seller and decides whether to accept or reject it.
169
+ This is where the `on_evaluate` function comes into play. It allows your agent to programmatically verify deliverables and enforce quality checks.
170
+
171
+ 🔍 **Example implementations can be found in:**
172
+
173
+ Use Cases:
174
+ - Basic always-accept evaluation
175
+ - URL and file validation examples
176
+
177
+ Source Files:
178
+ - [examples/agentic/README.md](examples/agentic/README.md)
179
+ - [examples/reactive/README.md](examples/reactive/README.md)
180
+
167
181
  ```python
168
182
  def on_evaluate(deliverable: IDeliverable) -> Tuple[bool, str]:
169
183
  print(f"Evaluating deliverable: {deliverable}")
@@ -0,0 +1,8 @@
1
+ acp_plugin_gamesdk/acp_client.py,sha256=juFDXMaRUAMhf1ullsDC0_krxPBNr80JDZ7eXiBVDls,8925
2
+ acp_plugin_gamesdk/acp_plugin.py,sha256=NkKjuEQZ5L3KD1GcuiUen8Q2nOewpj28p1IGoIwA5NI,27038
3
+ acp_plugin_gamesdk/acp_token.py,sha256=Wx87e2Wd-5QUKoMWX_wf3IBEP-cl1pSyA9IZr1yYIDE,11796
4
+ acp_plugin_gamesdk/acp_token_abi.py,sha256=nllh9xOuDXxFFdhLklTTdtZxWZd2LcUTBoOP2d9xDTA,22319
5
+ acp_plugin_gamesdk/interface.py,sha256=mWZ41SycGrNQbnC_IfBq8K6TgpguCvvbVTqFg8Uxy58,1549
6
+ acp_plugin_gamesdk-0.1.7.dist-info/METADATA,sha256=Z0qpNdTJG32s_Yl9zceDYWrkX08HGxqTYXBQde8ziMA,12098
7
+ acp_plugin_gamesdk-0.1.7.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
8
+ acp_plugin_gamesdk-0.1.7.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- acp_plugin_gamesdk/acp_client.py,sha256=JRrlfaRDgP2uZpbX8Vea-uHO6yicn488bmi_IXGVvt8,8896
2
- acp_plugin_gamesdk/acp_plugin.py,sha256=M4pZ6UyTk60CEA_R2tvKVRezd4CZQOFna94jzrM6_ss,26778
3
- acp_plugin_gamesdk/acp_token.py,sha256=Wx87e2Wd-5QUKoMWX_wf3IBEP-cl1pSyA9IZr1yYIDE,11796
4
- acp_plugin_gamesdk/acp_token_abi.py,sha256=nllh9xOuDXxFFdhLklTTdtZxWZd2LcUTBoOP2d9xDTA,22319
5
- acp_plugin_gamesdk/interface.py,sha256=mWZ41SycGrNQbnC_IfBq8K6TgpguCvvbVTqFg8Uxy58,1549
6
- acp_plugin_gamesdk-0.1.6.dist-info/METADATA,sha256=w_mr3J8GkBN5AY6IU-CVfKpZG-lv4pu4cMSLOHxN7zw,11545
7
- acp_plugin_gamesdk-0.1.6.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
8
- acp_plugin_gamesdk-0.1.6.dist-info/RECORD,,