shadowob-sdk 1.1.3__tar.gz → 1.1.3.dev261__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: shadowob-sdk
3
- Version: 1.1.3
3
+ Version: 1.1.3.dev261
4
4
  Summary: Shadow SDK — Python client for Shadow server REST API and Socket.IO real-time events
5
5
  License-Expression: MIT
6
6
  Requires-Python: >=3.10
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "shadowob-sdk"
7
- version = "1.1.3"
7
+ version = "1.1.3.dev261"
8
8
  description = "Shadow SDK — Python client for Shadow server REST API and Socket.IO real-time events"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -253,8 +253,11 @@ class ShadowClient:
253
253
 
254
254
  # ── Agents ───────────────────────────────────────────────────────────
255
255
 
256
- def list_agents(self) -> list[dict[str, Any]]:
257
- return self._get("/api/agents")
256
+ def list_agents(self, *, include_rentals: bool = False) -> list[dict[str, Any]]:
257
+ path = "/api/agents"
258
+ if include_rentals:
259
+ path = f"{path}?includeRentals=true"
260
+ return self._get(path)
258
261
 
259
262
  def create_agent(
260
263
  self,
@@ -266,12 +269,16 @@ class ShadowClient:
266
269
  avatar_url: str | None = None,
267
270
  kernel_type: str = "openclaw",
268
271
  config: dict[str, Any] | None = None,
272
+ buddy_mode: str = "private",
273
+ allowed_server_ids: list[str] | None = None,
269
274
  ) -> dict[str, Any]:
270
275
  data: dict[str, Any] = {
271
276
  "name": name,
272
277
  "username": username,
273
278
  "kernelType": kernel_type,
274
279
  "config": config or {},
280
+ "buddyMode": buddy_mode,
281
+ "allowedServerIds": allowed_server_ids or [],
275
282
  }
276
283
  if description:
277
284
  data["description"] = description
@@ -855,6 +862,20 @@ class ShadowClient:
855
862
  path = f"/api/attachments/{attachment_id}/media-url"
856
863
  return self._get(path, params={"disposition": disposition})
857
864
 
865
+ def resolve_workspace_media_url(
866
+ self,
867
+ server_id: str,
868
+ file_id: str,
869
+ *,
870
+ disposition: str = "inline",
871
+ content_ref: str | None = None,
872
+ ) -> dict[str, Any]:
873
+ params: dict[str, Any] = {"disposition": disposition}
874
+ if content_ref:
875
+ params["contentRef"] = content_ref
876
+ path = f"/api/servers/{server_id}/workspace/files/{file_id}/media-url"
877
+ return self._get(path, params=params)
878
+
858
879
  # ── Friendships ──────────────────────────────────────────────────────
859
880
 
860
881
  def send_friend_request(self, username: str) -> dict[str, Any]:
@@ -913,6 +934,31 @@ class ShadowClient:
913
934
  def revoke_oauth_consent(self, app_id: str) -> dict[str, Any]:
914
935
  return self._post("/api/oauth/revoke", json={"appId": app_id})
915
936
 
937
+ def send_oauth_channel_message(
938
+ self,
939
+ channel_id: str,
940
+ content: str,
941
+ *,
942
+ metadata: dict[str, Any] | None = None,
943
+ ) -> dict[str, Any]:
944
+ data: dict[str, Any] = {"content": content}
945
+ if metadata is not None:
946
+ data["metadata"] = metadata
947
+ return self._post(f"/api/oauth/channels/{channel_id}/messages", json=data)
948
+
949
+ def send_oauth_buddy_message(
950
+ self,
951
+ buddy_id: str,
952
+ *,
953
+ channel_id: str,
954
+ content: str,
955
+ metadata: dict[str, Any] | None = None,
956
+ ) -> dict[str, Any]:
957
+ data: dict[str, Any] = {"channelId": channel_id, "content": content}
958
+ if metadata is not None:
959
+ data["metadata"] = metadata
960
+ return self._post(f"/api/oauth/buddies/{buddy_id}/messages", json=data)
961
+
916
962
  # ── Marketplace / Rentals ────────────────────────────────────────────
917
963
 
918
964
  def browse_listings(self, **kwargs: Any) -> dict[str, Any]: