codemie-sdk-python 0.1.702__py3-none-any.whl → 0.1.703__py3-none-any.whl
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.
- codemie_sdk/models/cost_center.py +27 -0
- codemie_sdk/models/mcp_config.py +48 -1
- codemie_sdk/services/cost_center.py +22 -0
- codemie_sdk/services/mcp_configs.py +46 -1
- codemie_sdk/services/project.py +1 -1
- {codemie_sdk_python-0.1.702.dist-info → codemie_sdk_python-0.1.703.dist-info}/METADATA +1 -1
- {codemie_sdk_python-0.1.702.dist-info → codemie_sdk_python-0.1.703.dist-info}/RECORD +8 -8
- {codemie_sdk_python-0.1.702.dist-info → codemie_sdk_python-0.1.703.dist-info}/WHEEL +0 -0
|
@@ -59,3 +59,30 @@ class PaginatedCostCenterListResponse(BaseModel):
|
|
|
59
59
|
|
|
60
60
|
data: list[CostCenterResponse]
|
|
61
61
|
pagination: PaginationInfo
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class CostCenterAssignedBudgetSummary(BaseModel):
|
|
65
|
+
"""Per-category budget totals aggregated across a cost center's linked projects."""
|
|
66
|
+
|
|
67
|
+
model_config = ConfigDict(extra="ignore")
|
|
68
|
+
|
|
69
|
+
budget_category: str
|
|
70
|
+
budget_duration: str | None = None
|
|
71
|
+
soft_budget: float
|
|
72
|
+
max_budget: float
|
|
73
|
+
member_count: int
|
|
74
|
+
allocated_member_budget_total: float
|
|
75
|
+
current_spending: float
|
|
76
|
+
excluded_count: int = 0
|
|
77
|
+
unsynced_count: int = 0
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class CostCenterBudgetSummary(BaseModel):
|
|
81
|
+
"""Combined budget rollup for a cost center across its linked projects."""
|
|
82
|
+
|
|
83
|
+
model_config = ConfigDict(extra="ignore")
|
|
84
|
+
|
|
85
|
+
current_spending: float
|
|
86
|
+
budget_limit: float | None = None
|
|
87
|
+
total_percent: float
|
|
88
|
+
budgets: list[CostCenterAssignedBudgetSummary] = []
|
codemie_sdk/models/mcp_config.py
CHANGED
|
@@ -24,6 +24,16 @@ class MCPServerConfigData(BaseModel):
|
|
|
24
24
|
allow_issuer_prefix_match: bool = False
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
class MCPVariableDefinition(BaseModel):
|
|
28
|
+
"""Definition of an environment variable required by an MCP server."""
|
|
29
|
+
|
|
30
|
+
model_config = ConfigDict(extra="ignore")
|
|
31
|
+
|
|
32
|
+
name: str
|
|
33
|
+
description: str
|
|
34
|
+
required: bool = True
|
|
35
|
+
|
|
36
|
+
|
|
27
37
|
class MCPConfigCreateRequest(BaseModel):
|
|
28
38
|
"""Request model for creating a global MCP configuration entry."""
|
|
29
39
|
|
|
@@ -39,6 +49,42 @@ class MCPConfigCreateRequest(BaseModel):
|
|
|
39
49
|
is_public: bool = False
|
|
40
50
|
|
|
41
51
|
|
|
52
|
+
class MCPConfigCloneRequest(BaseModel):
|
|
53
|
+
"""Request model for cloning a global MCP configuration from a submitted form payload.
|
|
54
|
+
|
|
55
|
+
``is_public`` and ``is_system`` are not part of the request: the clone always
|
|
56
|
+
inherits them from the source configuration.
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
model_config = ConfigDict(extra="ignore")
|
|
60
|
+
|
|
61
|
+
name: str = Field(..., min_length=1, max_length=255)
|
|
62
|
+
description: str | None = None
|
|
63
|
+
server_home_url: str | None = None
|
|
64
|
+
source_url: str | None = None
|
|
65
|
+
logo_url: str | None = None
|
|
66
|
+
categories: list[str] = Field(default_factory=list)
|
|
67
|
+
config: MCPServerConfigData
|
|
68
|
+
required_env_vars: list[MCPVariableDefinition] = Field(default_factory=list)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class MCPConfigUpdateRequest(BaseModel):
|
|
72
|
+
"""Request model for updating a global MCP configuration; only provided fields are sent."""
|
|
73
|
+
|
|
74
|
+
model_config = ConfigDict(extra="ignore")
|
|
75
|
+
|
|
76
|
+
name: str | None = Field(None, min_length=1, max_length=255)
|
|
77
|
+
description: str | None = None
|
|
78
|
+
server_home_url: str | None = None
|
|
79
|
+
source_url: str | None = None
|
|
80
|
+
logo_url: str | None = None
|
|
81
|
+
categories: list[str] | None = None
|
|
82
|
+
config: MCPServerConfigData | None = None
|
|
83
|
+
required_env_vars: list[MCPVariableDefinition] | None = None
|
|
84
|
+
is_public: bool | None = None
|
|
85
|
+
is_active: bool | None = None
|
|
86
|
+
|
|
87
|
+
|
|
42
88
|
class MCPConfigResponse(BaseModel):
|
|
43
89
|
"""Response model for a global MCP configuration entry."""
|
|
44
90
|
|
|
@@ -52,6 +98,7 @@ class MCPConfigResponse(BaseModel):
|
|
|
52
98
|
logo_url: str | None = None
|
|
53
99
|
categories: list[str] = Field(default_factory=list)
|
|
54
100
|
config: MCPServerConfigData | None = None
|
|
101
|
+
required_env_vars: list[MCPVariableDefinition] = Field(default_factory=list)
|
|
55
102
|
user_id: str | None = None
|
|
56
103
|
is_public: bool = False
|
|
57
104
|
is_system: bool = False
|
|
@@ -66,7 +113,7 @@ class MCPConfigListResponse(BaseModel):
|
|
|
66
113
|
|
|
67
114
|
model_config = ConfigDict(extra="ignore")
|
|
68
115
|
|
|
69
|
-
|
|
116
|
+
configs: list[MCPConfigResponse] = Field(default_factory=list)
|
|
70
117
|
total: int = 0
|
|
71
118
|
page: int = 0
|
|
72
119
|
per_page: int = 20
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
from uuid import UUID
|
|
18
18
|
|
|
19
19
|
from ..models.cost_center import (
|
|
20
|
+
CostCenterBudgetSummary,
|
|
20
21
|
CostCenterResponse,
|
|
21
22
|
CreateCostCenterRequest,
|
|
22
23
|
PaginatedCostCenterListResponse,
|
|
@@ -104,3 +105,24 @@ class CostCenterService:
|
|
|
104
105
|
params=params,
|
|
105
106
|
wrap_response=False,
|
|
106
107
|
)
|
|
108
|
+
|
|
109
|
+
def get_budget_rollup(self, cost_center_id: UUID) -> CostCenterBudgetSummary:
|
|
110
|
+
"""Get the budget rollup across the projects linked to a cost center (admin-only).
|
|
111
|
+
|
|
112
|
+
Sums the budgets of every linked project per category and overall.
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
cost_center_id: UUID of the cost center
|
|
116
|
+
|
|
117
|
+
Returns:
|
|
118
|
+
CostCenterBudgetSummary with overall spending, limit and percentage plus
|
|
119
|
+
a per-category breakdown
|
|
120
|
+
|
|
121
|
+
Raises:
|
|
122
|
+
HTTPError: If the request fails
|
|
123
|
+
"""
|
|
124
|
+
return self._api.get(
|
|
125
|
+
f"/v1/admin/cost-centers/{cost_center_id}/budget-rollup",
|
|
126
|
+
response_model=CostCenterBudgetSummary,
|
|
127
|
+
wrap_response=False,
|
|
128
|
+
)
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"""MCPConfigs service — Settings > MCPs management (global catalog entries)."""
|
|
2
2
|
|
|
3
3
|
from ..models.mcp_config import (
|
|
4
|
+
MCPConfigCloneRequest,
|
|
4
5
|
MCPConfigCreateRequest,
|
|
5
6
|
MCPConfigListResponse,
|
|
6
7
|
MCPConfigResponse,
|
|
8
|
+
MCPConfigUpdateRequest,
|
|
7
9
|
)
|
|
8
10
|
from ..utils import ApiRequestHandler, TokenSource
|
|
9
11
|
|
|
@@ -71,7 +73,50 @@ class MCPConfigsService:
|
|
|
71
73
|
params=params,
|
|
72
74
|
wrap_response=False,
|
|
73
75
|
)
|
|
74
|
-
return response.
|
|
76
|
+
return response.configs
|
|
77
|
+
|
|
78
|
+
def clone(
|
|
79
|
+
self, config_id: str, request: MCPConfigCloneRequest
|
|
80
|
+
) -> MCPConfigResponse:
|
|
81
|
+
"""Create a new global MCP configuration from a clone form payload (admin only).
|
|
82
|
+
|
|
83
|
+
``is_public`` and ``is_system`` are always copied from the source configuration.
|
|
84
|
+
An unchanged ``client_secret`` is carried over from the source.
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
config_id: ID of the source MCP config entry.
|
|
88
|
+
request: MCPConfigCloneRequest with the (possibly edited) parameters of the clone.
|
|
89
|
+
|
|
90
|
+
Returns:
|
|
91
|
+
The newly created MCPConfigResponse.
|
|
92
|
+
"""
|
|
93
|
+
return self._api.post(
|
|
94
|
+
f"/v1/mcp-configs/{config_id}/clone",
|
|
95
|
+
MCPConfigResponse,
|
|
96
|
+
json_data=request.model_dump(exclude_none=True),
|
|
97
|
+
wrap_response=False,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
def update(
|
|
101
|
+
self, config_id: str, request: MCPConfigUpdateRequest
|
|
102
|
+
) -> MCPConfigResponse:
|
|
103
|
+
"""Update a global MCP configuration (admin only).
|
|
104
|
+
|
|
105
|
+
Only the fields set on the request are sent.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
config_id: The MCP config entry ID to update.
|
|
109
|
+
request: MCPConfigUpdateRequest with the fields to change.
|
|
110
|
+
|
|
111
|
+
Returns:
|
|
112
|
+
Updated MCPConfigResponse.
|
|
113
|
+
"""
|
|
114
|
+
return self._api.put(
|
|
115
|
+
f"/v1/mcp-configs/{config_id}",
|
|
116
|
+
MCPConfigResponse,
|
|
117
|
+
json_data=request.model_dump(exclude_none=True),
|
|
118
|
+
wrap_response=False,
|
|
119
|
+
)
|
|
75
120
|
|
|
76
121
|
def delete(self, config_id: str) -> None:
|
|
77
122
|
"""Delete a global MCP configuration entry.
|
codemie_sdk/services/project.py
CHANGED
|
@@ -205,7 +205,7 @@ class ProjectService:
|
|
|
205
205
|
return self._api.patch(
|
|
206
206
|
f"/v1/projects/{project_name}",
|
|
207
207
|
response_model=ProjectUpdateResponse,
|
|
208
|
-
json_data=payload.model_dump(exclude_none=True),
|
|
208
|
+
json_data=payload.model_dump(mode="json", exclude_none=True),
|
|
209
209
|
)
|
|
210
210
|
|
|
211
211
|
def delete_project(self, project_name: str) -> ProjectDeleteResponse:
|
|
@@ -18,14 +18,14 @@ codemie_sdk/models/assistant.py,sha256=0UGqd2hOhcRfCXaSq1c5z3M5MDfYqRQzn_6gDo8UR
|
|
|
18
18
|
codemie_sdk/models/categories.py,sha256=eq7_sw-sevNLeWpjaW3N055Xcgbbevs0Bl_rj--maUk,2303
|
|
19
19
|
codemie_sdk/models/common.py,sha256=ipNNdQlv4Ct1UyIAknjJbrdjjvv0lZJYK6dnPm8wai4,1170
|
|
20
20
|
codemie_sdk/models/conversation.py,sha256=r5gV5BD-Euj4OfeLYn6NBiO-S6uFQtwACVobvFgLUcA,10204
|
|
21
|
-
codemie_sdk/models/cost_center.py,sha256=
|
|
21
|
+
codemie_sdk/models/cost_center.py,sha256=BAZMXAQj6QpEBXsN9tcXJt7LaHlFHBH_-wQV1D_ihBk,2359
|
|
22
22
|
codemie_sdk/models/datasource.py,sha256=RC4CCsGjUDnjzTxBV8XjhvXulUZiYjiaqMclWolxSTc,18034
|
|
23
23
|
codemie_sdk/models/errors.py,sha256=tQXoPUhM2U95NoyTxsSSJws8PQ-Fr3iOQQ8IjJCsx78,11658
|
|
24
24
|
codemie_sdk/models/file_operation.py,sha256=h5UBCCAbQQGm1EavF0AHn_dNE2t_Cc9be20lv_K5Vo8,722
|
|
25
25
|
codemie_sdk/models/guardrails.py,sha256=813PRnu9VEF6hoUB-lw5xG_qAZXPic38qL40AwYkSMQ,2114
|
|
26
26
|
codemie_sdk/models/integration.py,sha256=yBV28vZ8oN0oNRNHdDPL3UUSJqNga1YodABIfX8dhyI,3522
|
|
27
27
|
codemie_sdk/models/llm.py,sha256=ViADvsSAkc85YQyPUkGE3ZvMc5pnHWHO0_rOkLSTfu4,1333
|
|
28
|
-
codemie_sdk/models/mcp_config.py,sha256=
|
|
28
|
+
codemie_sdk/models/mcp_config.py,sha256=lqHEYNWW6MhZEx2tMTryVTfq_wThnmMS7vmWxtPkbYM,3792
|
|
29
29
|
codemie_sdk/models/mermaid.py,sha256=dhRgX-itvfyrt0LUg5pbSo0CTH5PewiegqcZn3hWggU,675
|
|
30
30
|
codemie_sdk/models/project.py,sha256=9nMsPNw0mUHud2sAISXrJx2lXz9VKw2Dn-ABq53UgZ8,7600
|
|
31
31
|
codemie_sdk/models/skill.py,sha256=KE4lsF8TMxIQa_UE0oRDMT6XIEHqKjsDyi0HYKEp1mM,6918
|
|
@@ -50,16 +50,16 @@ codemie_sdk/services/assistant.py,sha256=4pgwUXyqego0SUThX2B6FHtsPYmvPzKgr92TEgx
|
|
|
50
50
|
codemie_sdk/services/categories.py,sha256=1qd98JCcMNdpbos0O1WpMApT6TurE7OuI7zoYewnwk8,5030
|
|
51
51
|
codemie_sdk/services/codemie_guardrails.py,sha256=O3yCeIQYG8W7z-sVRR4Cw9UVncqP9lPVNxUSaUZrh7I,2833
|
|
52
52
|
codemie_sdk/services/conversation.py,sha256=HWedtlrVXvq4xyAgVNzJ9IZSeHMx4Se5fyp8PPIloEQ,14809
|
|
53
|
-
codemie_sdk/services/cost_center.py,sha256=
|
|
53
|
+
codemie_sdk/services/cost_center.py,sha256=YewsrVyzIW9N68CaKgM58DB5reMBJQHljyNRxYeTRxM,4036
|
|
54
54
|
codemie_sdk/services/customer_config_service.py,sha256=XxPjiR9cf5M8qjHuRfovwiEAEk7OERJHLTuCAfBr7BU,4871
|
|
55
55
|
codemie_sdk/services/datasource.py,sha256=6kIaHuMzYcrSCaB6_CXemRm2gMPsNxXTQCDxOtRxhDQ,13991
|
|
56
56
|
codemie_sdk/services/dynamic_config.py,sha256=amgSOZ-835r6O_U72sjiFe60rrxJZqJ2L7oKCK-avE4,4214
|
|
57
57
|
codemie_sdk/services/files.py,sha256=ERb6irexO2hIKepUiTw498J0dt0427YNdKrXdcOu9tM,2762
|
|
58
58
|
codemie_sdk/services/integration.py,sha256=n4ggDedJ2GCI5mTgZNfrYE49uzLsp_BKYKMdTBKRX2s,9944
|
|
59
59
|
codemie_sdk/services/llm.py,sha256=GQWIi359f99uU4YRnAdpbyae1kXp1G5OpVgJNIIn7-8,1132
|
|
60
|
-
codemie_sdk/services/mcp_configs.py,sha256=
|
|
60
|
+
codemie_sdk/services/mcp_configs.py,sha256=bfe0QTrMqE5hEvyUlNMCjTxqL7u0AG7aZloQrtpDml0,3985
|
|
61
61
|
codemie_sdk/services/mermaid.py,sha256=7cLykdrJVW576raUbON3yhuWnbGaXl8rX1QfVwbu2JE,2246
|
|
62
|
-
codemie_sdk/services/project.py,sha256=
|
|
62
|
+
codemie_sdk/services/project.py,sha256=v58ALdLv4BuxMkZNlkNZPikkXcCIePMoQtmKwdKCgko,14703
|
|
63
63
|
codemie_sdk/services/project_budget_groups.py,sha256=B7QJt3sh_LV3lfwALZlxUq0SLR30BWafHcS6eHyOh8Y,5471
|
|
64
64
|
codemie_sdk/services/skill.py,sha256=0mExdeKTMNqkEpKafD0ya1WyLj9CMCFaprkggKYqnQg,13216
|
|
65
65
|
codemie_sdk/services/task.py,sha256=UaYh__xGF7VKWCJKPrncVjTvx46Gz1AN9XczPVL71oA,1052
|
|
@@ -76,6 +76,6 @@ codemie_sdk/services/workflow_execution_state.py,sha256=u1xmGvaHjqvQS5ujhyvJ_Ac7
|
|
|
76
76
|
codemie_sdk/services/workspace.py,sha256=eLwZ0fhi1BfOesrXaQlTdOll8q7ENP9b_jb5eybKSVw,5038
|
|
77
77
|
codemie_sdk/utils/__init__.py,sha256=EzK_UrS5KHmAnE73Hci9LaObB5omjVUhIq4svh0gfwo,137
|
|
78
78
|
codemie_sdk/utils/http.py,sha256=PWejBKa5pwzQ5eLVhdN8lYKEu1B1QtwGTRmZfnGFL6c,14158
|
|
79
|
-
codemie_sdk_python-0.1.
|
|
80
|
-
codemie_sdk_python-0.1.
|
|
81
|
-
codemie_sdk_python-0.1.
|
|
79
|
+
codemie_sdk_python-0.1.703.dist-info/METADATA,sha256=hem1C48aGo9ij50PNpWpkdjzB4z5OOqJbQXi9NutqIA,47938
|
|
80
|
+
codemie_sdk_python-0.1.703.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
|
|
81
|
+
codemie_sdk_python-0.1.703.dist-info/RECORD,,
|
|
File without changes
|