flowforge-sdk 0.3.7__tar.gz → 0.4.0__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.
Files changed (26) hide show
  1. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/PKG-INFO +1 -1
  2. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/pyproject.toml +1 -1
  3. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/client.py +138 -0
  4. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/.gitignore +0 -0
  5. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/README.md +0 -0
  6. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/__init__.py +0 -0
  7. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/agent.py +0 -0
  8. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/agent_def.py +0 -0
  9. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/ai/__init__.py +0 -0
  10. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/ai/providers.py +0 -0
  11. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/config.py +0 -0
  12. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/context.py +0 -0
  13. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/decorators.py +0 -0
  14. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/dev/__init__.py +0 -0
  15. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/dev/server.py +0 -0
  16. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/exceptions.py +0 -0
  17. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/execution.py +0 -0
  18. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/integrations/__init__.py +0 -0
  19. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/integrations/fastapi.py +0 -0
  20. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/network.py +0 -0
  21. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/router.py +0 -0
  22. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/steps.py +0 -0
  23. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/streaming.py +0 -0
  24. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/tools.py +0 -0
  25. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/triggers.py +0 -0
  26. {flowforge_sdk-0.3.7 → flowforge_sdk-0.4.0}/src/flowforge/worker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flowforge-sdk
3
- Version: 0.3.7
3
+ Version: 0.4.0
4
4
  Summary: Python SDK for FlowForge - AI workflow orchestration
5
5
  Project-URL: Homepage, https://github.com/flowforge/flowforge
6
6
  Project-URL: Documentation, https://flowforge.dev/docs
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "flowforge-sdk"
3
- version = "0.3.7"
3
+ version = "0.4.0"
4
4
  description = "Python SDK for FlowForge - AI workflow orchestration"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -830,6 +830,144 @@ class FlowForge:
830
830
  response.raise_for_status()
831
831
  return response.json()
832
832
 
833
+ async def refresh_skill(self, skill_id: str) -> dict[str, Any]:
834
+ """Re-fetch a skill's SKILL.md from its source repo and update instructions."""
835
+ client = await self._get_client()
836
+ headers: dict[str, str] = {}
837
+ if self.api_key:
838
+ headers["X-FlowForge-API-Key"] = self.api_key
839
+ response = await client.post(f"/api/v1/skills/{skill_id}/refresh", headers=headers)
840
+ response.raise_for_status()
841
+ return response.json()
842
+
843
+ # ── Agent detail operations ───────────────────────────────────
844
+
845
+ async def get_agent(self, agent_id: str) -> dict[str, Any]:
846
+ """Get details for a specific agent."""
847
+ client = await self._get_client()
848
+ headers: dict[str, str] = {}
849
+ if self.api_key:
850
+ headers["X-FlowForge-API-Key"] = self.api_key
851
+ response = await client.get(f"/api/v1/agents/{agent_id}", headers=headers)
852
+ response.raise_for_status()
853
+ return response.json()
854
+
855
+ async def delete_agent(self, agent_id: str) -> None:
856
+ """Delete an agent."""
857
+ client = await self._get_client()
858
+ headers: dict[str, str] = {}
859
+ if self.api_key:
860
+ headers["X-FlowForge-API-Key"] = self.api_key
861
+ response = await client.delete(f"/api/v1/agents/{agent_id}", headers=headers)
862
+ response.raise_for_status()
863
+
864
+ async def set_agent_skills(self, agent_id: str, skill_ids: list[str]) -> dict[str, Any]:
865
+ """Set which skills are enabled for an agent."""
866
+ client = await self._get_client()
867
+ headers: dict[str, str] = {}
868
+ if self.api_key:
869
+ headers["X-FlowForge-API-Key"] = self.api_key
870
+ response = await client.put(f"/api/v1/agents/{agent_id}/skills", json=skill_ids, headers=headers)
871
+ response.raise_for_status()
872
+ return response.json()
873
+
874
+ # ── Task detail operations ────────────────────────────────────
875
+
876
+ async def get_task(self, task_id: str) -> dict[str, Any]:
877
+ """Get details for a specific task."""
878
+ client = await self._get_client()
879
+ headers: dict[str, str] = {}
880
+ if self.api_key:
881
+ headers["X-FlowForge-API-Key"] = self.api_key
882
+ response = await client.get(f"/api/v1/tasks/{task_id}", headers=headers)
883
+ response.raise_for_status()
884
+ return response.json()
885
+
886
+ async def get_task_board(self) -> dict[str, Any]:
887
+ """Get the Kanban board view (tasks grouped by status columns)."""
888
+ client = await self._get_client()
889
+ headers: dict[str, str] = {}
890
+ if self.api_key:
891
+ headers["X-FlowForge-API-Key"] = self.api_key
892
+ response = await client.get("/api/v1/tasks/board", headers=headers)
893
+ response.raise_for_status()
894
+ return response.json()
895
+
896
+ async def delete_task(self, task_id: str) -> None:
897
+ """Delete a task."""
898
+ client = await self._get_client()
899
+ headers: dict[str, str] = {}
900
+ if self.api_key:
901
+ headers["X-FlowForge-API-Key"] = self.api_key
902
+ response = await client.delete(f"/api/v1/tasks/{task_id}", headers=headers)
903
+ response.raise_for_status()
904
+
905
+ # ── Comments ──────────────────────────────────────────────────
906
+
907
+ async def list_comments(
908
+ self,
909
+ *,
910
+ task_id: str | None = None,
911
+ run_id: str | None = None,
912
+ ) -> list[dict[str, Any]]:
913
+ """List comments on a task or run."""
914
+ client = await self._get_client()
915
+ headers: dict[str, str] = {}
916
+ if self.api_key:
917
+ headers["X-FlowForge-API-Key"] = self.api_key
918
+ params: dict[str, str] = {}
919
+ if task_id:
920
+ params["task_id"] = task_id
921
+ if run_id:
922
+ params["run_id"] = run_id
923
+ response = await client.get("/api/v1/comments", params=params, headers=headers)
924
+ response.raise_for_status()
925
+ return response.json().get("comments", [])
926
+
927
+ # ── Notifications ─────────────────────────────────────────────
928
+
929
+ async def list_notifications(
930
+ self,
931
+ *,
932
+ is_read: bool | None = None,
933
+ limit: int = 20,
934
+ ) -> dict[str, Any]:
935
+ """List notifications for the current user."""
936
+ client = await self._get_client()
937
+ headers: dict[str, str] = {}
938
+ if self.api_key:
939
+ headers["X-FlowForge-API-Key"] = self.api_key
940
+ params: dict[str, str] = {"limit": str(limit)}
941
+ if is_read is not None:
942
+ params["is_read"] = str(is_read).lower()
943
+ response = await client.get("/api/v1/notifications", params=params, headers=headers)
944
+ response.raise_for_status()
945
+ return response.json()
946
+
947
+ async def mark_notifications_read(self, notification_id: str | None = None) -> None:
948
+ """Mark one notification or all notifications as read."""
949
+ client = await self._get_client()
950
+ headers: dict[str, str] = {}
951
+ if self.api_key:
952
+ headers["X-FlowForge-API-Key"] = self.api_key
953
+ if notification_id:
954
+ response = await client.post(f"/api/v1/notifications/{notification_id}/read", headers=headers)
955
+ else:
956
+ response = await client.post("/api/v1/notifications/read-all", headers=headers)
957
+ response.raise_for_status()
958
+
959
+ # ── Skill toggle ──────────────────────────────────────────────
960
+
961
+ async def set_function_skills(self, function_id: str, skill_ids: list[str]) -> dict[str, Any]:
962
+ """Set which skills are enabled for a function."""
963
+ client = await self._get_client()
964
+ headers: dict[str, str] = {}
965
+ if self.api_key:
966
+ headers["X-FlowForge-API-Key"] = self.api_key
967
+ response = await client.put(f"/api/v1/functions/{function_id}/skills", json=skill_ids, headers=headers)
968
+ response.raise_for_status()
969
+ return response.json()
970
+
833
971
  async def close(self) -> None:
834
972
  """Close the HTTP client."""
835
973
  if self._http_client:
File without changes
File without changes