applied-cli 0.5.66__tar.gz → 0.5.68__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 (27) hide show
  1. {applied_cli-0.5.66 → applied_cli-0.5.68}/PKG-INFO +1 -1
  2. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli/__init__.py +1 -1
  3. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli/client.py +45 -4
  4. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli/tools.py +66 -0
  5. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli.egg-info/PKG-INFO +1 -1
  6. {applied_cli-0.5.66 → applied_cli-0.5.68}/pyproject.toml +1 -1
  7. {applied_cli-0.5.66 → applied_cli-0.5.68}/README.md +0 -0
  8. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli/agent_scoped_flows.py +0 -0
  9. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli/cli.py +0 -0
  10. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli/conversation_lookup.py +0 -0
  11. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli/conversations.py +0 -0
  12. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli/credentials.py +0 -0
  13. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli/flow_helpers.py +0 -0
  14. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli/formatters.py +0 -0
  15. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli.egg-info/SOURCES.txt +0 -0
  16. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli.egg-info/dependency_links.txt +0 -0
  17. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli.egg-info/entry_points.txt +0 -0
  18. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli.egg-info/requires.txt +0 -0
  19. {applied_cli-0.5.66 → applied_cli-0.5.68}/applied_cli.egg-info/top_level.txt +0 -0
  20. {applied_cli-0.5.66 → applied_cli-0.5.68}/setup.cfg +0 -0
  21. {applied_cli-0.5.66 → applied_cli-0.5.68}/tests/test_agent_scoped_flows.py +0 -0
  22. {applied_cli-0.5.66 → applied_cli-0.5.68}/tests/test_audit_tools.py +0 -0
  23. {applied_cli-0.5.66 → applied_cli-0.5.68}/tests/test_benchmark_scenario_tools.py +0 -0
  24. {applied_cli-0.5.66 → applied_cli-0.5.68}/tests/test_cli.py +0 -0
  25. {applied_cli-0.5.66 → applied_cli-0.5.68}/tests/test_client.py +0 -0
  26. {applied_cli-0.5.66 → applied_cli-0.5.68}/tests/test_conversation_tools.py +0 -0
  27. {applied_cli-0.5.66 → applied_cli-0.5.68}/tests/test_flow_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: applied-cli
3
- Version: 0.5.66
3
+ Version: 0.5.68
4
4
  Summary: CLI and shared client library for Applied Labs AI support agents
5
5
  Author: Applied Labs
6
6
  License-Expression: MIT
@@ -4,6 +4,6 @@ from applied_cli import tools
4
4
  from applied_cli.client import AppliedClient
5
5
  from applied_cli.formatters import to_csv, to_json
6
6
 
7
- __version__ = "0.5.64"
7
+ __version__ = "0.5.68"
8
8
 
9
9
  __all__ = ["AppliedClient", "tools", "to_csv", "to_json", "__version__"]
@@ -1777,6 +1777,10 @@ class AppliedClient:
1777
1777
  },
1778
1778
  )
1779
1779
 
1780
+ async def delete_benchmark(self, benchmark_id: str) -> None:
1781
+ """Delete a benchmark."""
1782
+ await self._request("DELETE", f"/v1/conversation-benchmarks/{benchmark_id}/")
1783
+
1780
1784
  # -------------------------------------------------------------------------
1781
1785
  # Scenarios
1782
1786
  # -------------------------------------------------------------------------
@@ -1786,9 +1790,18 @@ class AppliedClient:
1786
1790
  benchmark_id: str | None = None,
1787
1791
  agent_id: str | None = None,
1788
1792
  pass_status: str | None = None,
1789
- limit: int = 50,
1793
+ limit: int = 200,
1794
+ fetch_all: bool = True,
1790
1795
  ) -> list[dict]:
1791
- """List conversation scenarios."""
1796
+ """List conversation scenarios.
1797
+
1798
+ Args:
1799
+ benchmark_id: Filter by benchmark UUID
1800
+ agent_id: Filter by agent UUID
1801
+ pass_status: Filter by pass status ('pass', 'fail', 'unrated')
1802
+ limit: Page size (default 200)
1803
+ fetch_all: If True, paginate through all results (default True)
1804
+ """
1792
1805
  params: dict[str, Any] = {"limit": limit}
1793
1806
  if benchmark_id:
1794
1807
  params["benchmark_id"] = benchmark_id
@@ -1796,8 +1809,28 @@ class AppliedClient:
1796
1809
  params["agent_id"] = agent_id
1797
1810
  if pass_status:
1798
1811
  params["pass_status"] = pass_status
1799
- data = await self._request("GET", "/v1/conversation-scenarios/", params=params)
1800
- return self._normalize_response(data)
1812
+
1813
+ if not fetch_all:
1814
+ data = await self._request(
1815
+ "GET", "/v1/conversation-scenarios/", params=params
1816
+ )
1817
+ return self._normalize_response(data)
1818
+
1819
+ # Paginate through all results
1820
+ all_results: list[dict] = []
1821
+ page = 1
1822
+ while True:
1823
+ params["page"] = page
1824
+ data = await self._request(
1825
+ "GET", "/v1/conversation-scenarios/", params=params
1826
+ )
1827
+ results = self._normalize_response(data)
1828
+ all_results.extend(results)
1829
+ if isinstance(data, dict) and data.get("next"):
1830
+ page += 1
1831
+ else:
1832
+ break
1833
+ return all_results
1801
1834
 
1802
1835
  async def get_scenario(self, scenario_id: str) -> dict:
1803
1836
  """Get a single scenario by ID."""
@@ -1879,6 +1912,14 @@ class AppliedClient:
1879
1912
  """Update a scenario run's properties (ratings, feedback, etc.)."""
1880
1913
  return await self._request("PATCH", f"/v1/scenario-runs/{run_id}/", body=kwargs)
1881
1914
 
1915
+ async def delete_scenario(self, scenario_id: str) -> None:
1916
+ """Delete a scenario."""
1917
+ await self._request("DELETE", f"/v1/conversation-scenarios/{scenario_id}/")
1918
+
1919
+ async def delete_scenario_run(self, run_id: str) -> None:
1920
+ """Delete a scenario run."""
1921
+ await self._request("DELETE", f"/v1/scenario-runs/{run_id}/")
1922
+
1882
1923
  async def bulk_run_scenarios(
1883
1924
  self,
1884
1925
  scenario_ids: list[str] | None = None,
@@ -4604,6 +4604,28 @@ async def benchmark_create(
4604
4604
  return result
4605
4605
 
4606
4606
 
4607
+ async def benchmark_delete(
4608
+ client: AppliedClient,
4609
+ benchmark_id: str,
4610
+ ) -> str:
4611
+ """
4612
+ Delete a benchmark.
4613
+
4614
+ Args:
4615
+ client: Authenticated AppliedClient
4616
+ benchmark_id: The benchmark UUID
4617
+
4618
+ Returns:
4619
+ Success message
4620
+ """
4621
+ try:
4622
+ await client.delete_benchmark(benchmark_id)
4623
+ except AppliedAPIError as e:
4624
+ return _format_error(e)
4625
+
4626
+ return f"Benchmark {benchmark_id} deleted successfully."
4627
+
4628
+
4607
4629
  # -----------------------------------------------------------------------------
4608
4630
  # Scenarios
4609
4631
  # -----------------------------------------------------------------------------
@@ -4785,6 +4807,28 @@ async def scenario_update(
4785
4807
  return f"# Updated Scenario: {scenario.get('name')}\npass_status: {scenario.get('pass_status')}\ncsat_score: {scenario.get('csat_score')}"
4786
4808
 
4787
4809
 
4810
+ async def scenario_delete(
4811
+ client: AppliedClient,
4812
+ scenario_id: str,
4813
+ ) -> str:
4814
+ """
4815
+ Delete a scenario.
4816
+
4817
+ Args:
4818
+ client: Authenticated AppliedClient
4819
+ scenario_id: The scenario UUID
4820
+
4821
+ Returns:
4822
+ Success message
4823
+ """
4824
+ try:
4825
+ await client.delete_scenario(scenario_id)
4826
+ except AppliedAPIError as e:
4827
+ return _format_error(e)
4828
+
4829
+ return f"Scenario {scenario_id} deleted successfully."
4830
+
4831
+
4788
4832
  # -----------------------------------------------------------------------------
4789
4833
  # Scenario Runs
4790
4834
  # -----------------------------------------------------------------------------
@@ -4933,6 +4977,28 @@ async def scenario_run_update(
4933
4977
  return f"# Updated Scenario Run\nid: {run.get('id')}\npass_status: {run.get('pass_status')}\ncsat_score: {run.get('csat_score')}"
4934
4978
 
4935
4979
 
4980
+ async def scenario_run_delete(
4981
+ client: AppliedClient,
4982
+ run_id: str,
4983
+ ) -> str:
4984
+ """
4985
+ Delete a scenario run.
4986
+
4987
+ Args:
4988
+ client: Authenticated AppliedClient
4989
+ run_id: The scenario run UUID
4990
+
4991
+ Returns:
4992
+ Success message
4993
+ """
4994
+ try:
4995
+ await client.delete_scenario_run(run_id)
4996
+ except AppliedAPIError as e:
4997
+ return _format_error(e)
4998
+
4999
+ return f"Scenario run {run_id} deleted successfully."
5000
+
5001
+
4936
5002
  async def scenario_bulk_run(
4937
5003
  client: AppliedClient,
4938
5004
  scenario_ids: list[str] | None = None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: applied-cli
3
- Version: 0.5.66
3
+ Version: 0.5.68
4
4
  Summary: CLI and shared client library for Applied Labs AI support agents
5
5
  Author: Applied Labs
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "applied-cli"
3
- version = "0.5.66"
3
+ version = "0.5.68"
4
4
  description = "CLI and shared client library for Applied Labs AI support agents"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
File without changes
File without changes