convexity-sdk 0.15.0.dev289__tar.gz → 0.15.0.dev290__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 (96) hide show
  1. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/PKG-INFO +1 -1
  2. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/worker_tasks.py +48 -0
  3. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/.gitignore +0 -0
  4. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/README.md +0 -0
  5. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/__init__.py +0 -0
  6. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/client.py +0 -0
  7. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/config.py +0 -0
  8. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/exceptions.py +0 -0
  9. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/http.py +0 -0
  10. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/models/__init__.py +0 -0
  11. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/__init__.py +0 -0
  12. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/address_book.py +0 -0
  13. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/api_keys.py +0 -0
  14. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/attributes.py +0 -0
  15. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/categories.py +0 -0
  16. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/classification.py +0 -0
  17. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/connections.py +0 -0
  18. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/cost_lists.py +0 -0
  19. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/crm.py +0 -0
  20. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/dashboards.py +0 -0
  21. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/datalake.py +0 -0
  22. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/datasets.py +0 -0
  23. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/email.py +0 -0
  24. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/environments.py +0 -0
  25. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/erp_config.py +0 -0
  26. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/inventory.py +0 -0
  27. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/issues.py +0 -0
  28. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/organizations.py +0 -0
  29. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/pricing.py +0 -0
  30. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/projects.py +0 -0
  31. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/purchasing.py +0 -0
  32. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/rbac.py +0 -0
  33. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/replenishment.py +0 -0
  34. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/runs.py +0 -0
  35. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/sales.py +0 -0
  36. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/sales_channels.py +0 -0
  37. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/tasks.py +0 -0
  38. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/templates.py +0 -0
  39. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/usage.py +0 -0
  40. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/warehouses.py +0 -0
  41. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/convexity_sdk/resources/workspace.py +0 -0
  42. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/pyproject.toml +0 -0
  43. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/.env.example +0 -0
  44. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/README.md +0 -0
  45. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/cancel_refresh_task.py +0 -0
  46. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/compare_api_key_scopes.py +0 -0
  47. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/create_csv_datasets.py +0 -0
  48. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/create_dashboards.py +0 -0
  49. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/create_databricks_connections.py +0 -0
  50. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/create_datasets.py +0 -0
  51. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/create_forecast_task.py +0 -0
  52. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/create_org_and_project.py +0 -0
  53. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/create_single_project_api_key.py +0 -0
  54. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/crm/001_check_crm_enabled.py +0 -0
  55. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/crm/002_enable_crm.py +0 -0
  56. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/crm/003_manage_customers.py +0 -0
  57. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/crm/004_disable_crm.py +0 -0
  58. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/getting_started.py +0 -0
  59. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/inventory/001_check_inventory_enabled.py +0 -0
  60. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/inventory/002_enable_inventory.py +0 -0
  61. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/inventory/003_manage_inventory_items.py +0 -0
  62. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/inventory/004_manage_inventory_stock.py +0 -0
  63. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/inventory/005_disable_inventory.py +0 -0
  64. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/inventory/006_manage_categories.py +0 -0
  65. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/inventory/007_manage_inventory_config.py +0 -0
  66. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/inventory/008_manage_cost_lists.py +0 -0
  67. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/list_orgs_and_projects.py +0 -0
  68. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/manage_environments.py +0 -0
  69. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/manage_issues.py +0 -0
  70. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/project_usage.py +0 -0
  71. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/purchasing/001_check_purchasing_enabled.py +0 -0
  72. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/purchasing/002_enable_purchasing.py +0 -0
  73. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/purchasing/003_manage_vendors.py +0 -0
  74. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/purchasing/004_manage_purchase_orders.py +0 -0
  75. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/purchasing/005_disable_purchasing.py +0 -0
  76. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/query_datalake.py +0 -0
  77. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/quickbook/001_check_quickbook_connection.py +0 -0
  78. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/quickbook/002_create_quickbook_datasets.py +0 -0
  79. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/rbac/001_manage_roles.py +0 -0
  80. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/rbac/002_manage_assignments.py +0 -0
  81. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/rbac/003_verify_rbac_access.py +0 -0
  82. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/sales/001_check_sales_enabled.py +0 -0
  83. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/sales/002_enable_sales.py +0 -0
  84. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/sales/003_manage_sales_invoices.py +0 -0
  85. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/sales/004_manage_sales_invoice_lifecycle.py +0 -0
  86. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/sales/005_manage_sales_orders.py +0 -0
  87. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/sales/006_disable_sales.py +0 -0
  88. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/share_dashboard.py +0 -0
  89. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/shopify/001_check_shopify_connection.py +0 -0
  90. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/shopify/002_create_shopify_datasets.py +0 -0
  91. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/uci/001_setup.py +0 -0
  92. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/uci/002_seed_inventory_from_uci.py +0 -0
  93. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/uci/003_seed_sales_from_uci.py +0 -0
  94. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/uci/004_seed_purchasing_from_uci.py +0 -0
  95. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/uci/005_run_pipelines.py +0 -0
  96. {convexity_sdk-0.15.0.dev289 → convexity_sdk-0.15.0.dev290}/samples/workspace_files.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: convexity-sdk
3
- Version: 0.15.0.dev289
3
+ Version: 0.15.0.dev290
4
4
  Summary: Convexity Python SDK - programmatic access to the Convexity platform
5
5
  Requires-Python: >=3.12
6
6
  Requires-Dist: convexity-api-client
@@ -3,6 +3,9 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from convexity_api_client import AuthenticatedClient, Client
6
+ from convexity_api_client.api.v1 import (
7
+ worker_tasks_delegate_pi_agent as _worker_tasks_delegate_pi_agent,
8
+ )
6
9
  from convexity_api_client.api.v1 import (
7
10
  worker_tasks_get as _worker_tasks_get,
8
11
  )
@@ -12,6 +15,7 @@ from convexity_api_client.api.v1 import (
12
15
  from convexity_api_client.api.v1 import (
13
16
  worker_tasks_trigger_analytics as _worker_tasks_trigger,
14
17
  )
18
+ from convexity_api_client.models.delegate_pi_agent_request import DelegatePiAgentRequest
15
19
  from convexity_api_client.models.worker_task_response import WorkerTaskResponse
16
20
  from convexity_api_client.models.worker_task_status import WorkerTaskStatus
17
21
  from convexity_api_client.models.worker_task_type import WorkerTaskType
@@ -44,6 +48,50 @@ class WorkerTasks:
44
48
  raise RuntimeError(msg)
45
49
  return result
46
50
 
51
+ def delegate_pi_agent(
52
+ self,
53
+ project_id: str,
54
+ task_prompt: str,
55
+ *,
56
+ model: str = "deepseek-v4-pro",
57
+ max_steps: int = 40,
58
+ timeout_seconds: int = 900,
59
+ allow_network: bool = False,
60
+ ) -> WorkerTaskResponse:
61
+ """Delegate an agentic coding task to the Pi coding agent.
62
+
63
+ Enqueues a ``DELEGATE_PI_AGENT`` worker task; the agent runs in the
64
+ background worker process. Poll :meth:`get` for the final status and
65
+ output.
66
+
67
+ Args:
68
+ project_id: The project to run the task in.
69
+ task_prompt: Natural-language objective for the agent.
70
+ model: LLM model id for the agent.
71
+ max_steps: Hard cap on agent loop iterations.
72
+ timeout_seconds: Wall-clock budget for the session.
73
+ allow_network: Whether the sandbox may reach the network.
74
+
75
+ Returns:
76
+ The created WorkerTaskResponse (status=PENDING).
77
+ """
78
+ body = DelegatePiAgentRequest(
79
+ task_prompt=task_prompt,
80
+ model=model,
81
+ max_steps=max_steps,
82
+ timeout_seconds=timeout_seconds,
83
+ allow_network=allow_network,
84
+ )
85
+ result = _worker_tasks_delegate_pi_agent.sync(
86
+ client=self._client,
87
+ project_id=project_id,
88
+ body=body,
89
+ )
90
+ if not isinstance(result, WorkerTaskResponse):
91
+ msg = "Unexpected response delegating Pi agent task"
92
+ raise RuntimeError(msg)
93
+ return result
94
+
47
95
  def get(self, project_id: str, task_id: str) -> WorkerTaskResponse:
48
96
  """Get a worker task by ID.
49
97