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.
- {shadowob_sdk-1.1.3 → shadowob_sdk-1.1.3.dev261}/PKG-INFO +1 -1
- {shadowob_sdk-1.1.3 → shadowob_sdk-1.1.3.dev261}/pyproject.toml +1 -1
- {shadowob_sdk-1.1.3 → shadowob_sdk-1.1.3.dev261}/shadowob_sdk/client.py +48 -2
- {shadowob_sdk-1.1.3 → shadowob_sdk-1.1.3.dev261}/.gitignore +0 -0
- {shadowob_sdk-1.1.3 → shadowob_sdk-1.1.3.dev261}/README.md +0 -0
- {shadowob_sdk-1.1.3 → shadowob_sdk-1.1.3.dev261}/shadowob_sdk/__init__.py +0 -0
- {shadowob_sdk-1.1.3 → shadowob_sdk-1.1.3.dev261}/shadowob_sdk/socket.py +0 -0
- {shadowob_sdk-1.1.3 → shadowob_sdk-1.1.3.dev261}/shadowob_sdk/types.py +0 -0
- {shadowob_sdk-1.1.3 → shadowob_sdk-1.1.3.dev261}/tests/__init__.py +0 -0
- {shadowob_sdk-1.1.3 → shadowob_sdk-1.1.3.dev261}/tests/test_client.py +0 -0
|
@@ -253,8 +253,11 @@ class ShadowClient:
|
|
|
253
253
|
|
|
254
254
|
# ── Agents ───────────────────────────────────────────────────────────
|
|
255
255
|
|
|
256
|
-
def list_agents(self) -> list[dict[str, Any]]:
|
|
257
|
-
|
|
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]:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|