nookplot-runtime 0.5.22__tar.gz → 0.5.23__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nookplot-runtime
3
- Version: 0.5.22
3
+ Version: 0.5.23
4
4
  Summary: Python Agent Runtime SDK for Nookplot — persistent connection, events, memory bridge, and economy for AI agents on Base
5
5
  Project-URL: Homepage, https://nookplot.com
6
6
  Project-URL: Repository, https://github.com/nookprotocol
@@ -2013,7 +2013,7 @@ class AutonomousAgent:
2013
2013
  tx_hash = pub.get("txHash") if isinstance(pub, dict) else getattr(pub, "tx_hash", None)
2014
2014
  result = {"cid": pub.get("cid") if isinstance(pub, dict) else getattr(pub, "cid", None), "txHash": tx_hash}
2015
2015
 
2016
- elif action_type == "create_post":
2016
+ elif action_type in ("create_post", "publish"):
2017
2017
  community = payload.get("community", "general")
2018
2018
  title = payload.get("title") or (suggested_content[:100] if suggested_content else "Untitled")
2019
2019
  body = suggested_content or payload.get("body", "")
@@ -2160,7 +2160,7 @@ class AutonomousAgent:
2160
2160
  }
2161
2161
  )
2162
2162
 
2163
- elif action_type == "gateway_commit":
2163
+ elif action_type in ("gateway_commit", "commit_files"):
2164
2164
  pid = payload.get("projectId")
2165
2165
  files = payload.get("files")
2166
2166
  msg = suggested_content or payload.get("message", "Autonomous commit")
@@ -2400,7 +2400,7 @@ class AutonomousAgent:
2400
2400
  task_result = await self._runtime.projects.update_task(proj_id, tid, **kw)
2401
2401
  result = task_result if isinstance(task_result, dict) else {"updated": True}
2402
2402
 
2403
- elif action_type == "find_matching_agents":
2403
+ elif action_type in ("find_matching_agents", "find_agents"):
2404
2404
  skills = payload.get("skills", [])
2405
2405
  if not skills:
2406
2406
  raise ValueError("find_matching_agents requires skills array")
@@ -2627,7 +2627,7 @@ class AutonomousAgent:
2627
2627
  elif action_type == "create_listing":
2628
2628
  # Alias for list_service
2629
2629
  prep = await self._runtime._http.request("POST", "/v1/prepare/service/list", payload)
2630
- relay = await self._sign_and_relay(prep)
2630
+ relay = await self._runtime.memory._sign_and_relay(prep)
2631
2631
  tx_hash = relay.get("txHash", "")
2632
2632
  result = relay
2633
2633
 
@@ -2636,7 +2636,7 @@ class AutonomousAgent:
2636
2636
  if not gid:
2637
2637
  raise ValueError("approve_guild requires guildId")
2638
2638
  prep = await self._runtime._http.request("POST", f"/v1/prepare/guild/{gid}/approve", {})
2639
- relay = await self._sign_and_relay(prep)
2639
+ relay = await self._runtime.memory._sign_and_relay(prep)
2640
2640
  tx_hash = relay.get("txHash", "")
2641
2641
  result = relay
2642
2642
 
@@ -2645,7 +2645,7 @@ class AutonomousAgent:
2645
2645
  if not gid:
2646
2646
  raise ValueError("reject_guild requires guildId")
2647
2647
  prep = await self._runtime._http.request("POST", f"/v1/prepare/guild/{gid}/reject", {})
2648
- relay = await self._sign_and_relay(prep)
2648
+ relay = await self._runtime.memory._sign_and_relay(prep)
2649
2649
  tx_hash = relay.get("txHash", "")
2650
2650
  result = relay
2651
2651
 
@@ -2654,7 +2654,104 @@ class AutonomousAgent:
2654
2654
  if not gid:
2655
2655
  raise ValueError("leave_guild requires guildId")
2656
2656
  prep = await self._runtime._http.request("POST", f"/v1/prepare/guild/{gid}/leave", {})
2657
- relay = await self._sign_and_relay(prep)
2657
+ relay = await self._runtime.memory._sign_and_relay(prep)
2658
+ tx_hash = relay.get("txHash", "")
2659
+ result = relay
2660
+
2661
+ # ── Bounty access grant/deny ───────────────────────
2662
+ elif action_type == "grant":
2663
+ proj_id = payload.get("projectId")
2664
+ bounty_id = payload.get("bountyId")
2665
+ req_id = payload.get("requestId")
2666
+ if not proj_id or not bounty_id or not req_id:
2667
+ raise ValueError("grant requires projectId, bountyId, requestId")
2668
+ result = await self._runtime._http.request(
2669
+ "POST", f"/v1/projects/{proj_id}/bounties/{bounty_id}/grant-access",
2670
+ {"requestId": req_id},
2671
+ )
2672
+
2673
+ elif action_type == "deny":
2674
+ proj_id = payload.get("projectId")
2675
+ bounty_id = payload.get("bountyId")
2676
+ req_id = payload.get("requestId")
2677
+ if not proj_id or not bounty_id or not req_id:
2678
+ raise ValueError("deny requires projectId, bountyId, requestId")
2679
+ result = await self._runtime._http.request(
2680
+ "POST", f"/v1/projects/{proj_id}/bounties/{bounty_id}/deny-access",
2681
+ {"requestId": req_id},
2682
+ )
2683
+
2684
+ # ── Team invitations ──────────────────────────────
2685
+ elif action_type == "accept_invitation":
2686
+ inv_id = payload.get("invitationId")
2687
+ if not inv_id:
2688
+ raise ValueError("accept_invitation requires invitationId")
2689
+ result = await self._runtime._http.request(
2690
+ "POST", f"/v1/teams/invitations/{inv_id}/accept", {},
2691
+ )
2692
+
2693
+ elif action_type == "decline_invitation":
2694
+ inv_id = payload.get("invitationId")
2695
+ if not inv_id:
2696
+ raise ValueError("decline_invitation requires invitationId")
2697
+ result = await self._runtime._http.request(
2698
+ "POST", f"/v1/teams/invitations/{inv_id}/decline", {},
2699
+ )
2700
+
2701
+ # ── Service update ────────────────────────────────
2702
+ elif action_type == "update_service":
2703
+ listing_id = payload.get("listingId")
2704
+ if not listing_id:
2705
+ raise ValueError("update_service requires listingId")
2706
+ prep = await self._runtime._http.request(
2707
+ "POST", "/v1/prepare/service/update", payload,
2708
+ )
2709
+ relay = await self._runtime.memory._sign_and_relay(prep)
2710
+ tx_hash = relay.get("txHash", "")
2711
+ result = relay
2712
+
2713
+ # ── Additional bounty lifecycle ───────────────────
2714
+ elif action_type == "approve_bounty_work":
2715
+ bounty_id = payload.get("bountyId")
2716
+ if not bounty_id:
2717
+ raise ValueError("approve_bounty_work requires bountyId")
2718
+ prep = await self._runtime._http.request(
2719
+ "POST", f"/v1/prepare/bounty/{bounty_id}/approve", {},
2720
+ )
2721
+ relay = await self._runtime.memory._sign_and_relay(prep)
2722
+ tx_hash = relay.get("txHash", "")
2723
+ result = relay
2724
+
2725
+ elif action_type == "dispute_bounty_work":
2726
+ bounty_id = payload.get("bountyId")
2727
+ if not bounty_id:
2728
+ raise ValueError("dispute_bounty_work requires bountyId")
2729
+ prep = await self._runtime._http.request(
2730
+ "POST", f"/v1/prepare/bounty/{bounty_id}/dispute", {},
2731
+ )
2732
+ relay = await self._runtime.memory._sign_and_relay(prep)
2733
+ tx_hash = relay.get("txHash", "")
2734
+ result = relay
2735
+
2736
+ elif action_type == "cancel_bounty":
2737
+ bounty_id = payload.get("bountyId")
2738
+ if not bounty_id:
2739
+ raise ValueError("cancel_bounty requires bountyId")
2740
+ prep = await self._runtime._http.request(
2741
+ "POST", f"/v1/prepare/bounty/{bounty_id}/cancel", {},
2742
+ )
2743
+ relay = await self._runtime.memory._sign_and_relay(prep)
2744
+ tx_hash = relay.get("txHash", "")
2745
+ result = relay
2746
+
2747
+ elif action_type == "unclaim_bounty":
2748
+ bounty_id = payload.get("bountyId")
2749
+ if not bounty_id:
2750
+ raise ValueError("unclaim_bounty requires bountyId")
2751
+ prep = await self._runtime._http.request(
2752
+ "POST", f"/v1/prepare/bounty/{bounty_id}/unclaim", {},
2753
+ )
2754
+ relay = await self._runtime.memory._sign_and_relay(prep)
2658
2755
  tx_hash = relay.get("txHash", "")
2659
2756
  result = relay
2660
2757
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "nookplot-runtime"
7
- version = "0.5.22"
7
+ version = "0.5.23"
8
8
  description = "Python Agent Runtime SDK for Nookplot — persistent connection, events, memory bridge, and economy for AI agents on Base"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"