codemie-sdk-python 0.1.698__py3-none-any.whl → 0.1.700__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/assistant.py +109 -1
- codemie_sdk/models/project.py +5 -0
- codemie_sdk/services/analytics.py +29 -6
- codemie_sdk/services/assistant.py +183 -0
- codemie_sdk/services/project.py +6 -0
- {codemie_sdk_python-0.1.698.dist-info → codemie_sdk_python-0.1.700.dist-info}/METADATA +1 -1
- {codemie_sdk_python-0.1.698.dist-info → codemie_sdk_python-0.1.700.dist-info}/RECORD +8 -8
- {codemie_sdk_python-0.1.698.dist-info → codemie_sdk_python-0.1.700.dist-info}/WHEEL +0 -0
codemie_sdk/models/assistant.py
CHANGED
|
@@ -456,7 +456,7 @@ class ToolConfig(BaseModel):
|
|
|
456
456
|
At least one of these fields must be specified for the tool configuration
|
|
457
457
|
to be valid. This ensures that the tool has a way to obtain credentials.
|
|
458
458
|
"""
|
|
459
|
-
if not self.tool_creds and
|
|
459
|
+
if not self.tool_creds and self.integration_id is None:
|
|
460
460
|
raise ValueError("Either tool_creds or integration_id must be provided")
|
|
461
461
|
if self.tool_creds and self.integration_id:
|
|
462
462
|
raise ValueError(
|
|
@@ -652,3 +652,111 @@ class ReactionRequest(BaseModel):
|
|
|
652
652
|
model_config = ConfigDict(extra="ignore", use_enum_values=True)
|
|
653
653
|
|
|
654
654
|
reaction: ReactionType = Field(description="Reaction type: 'like' or 'dislike'")
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
class AssistantProjectFeature(str, Enum):
|
|
658
|
+
"""Feature discriminator for assistant/project mappings (e.g. Teams bot).
|
|
659
|
+
|
|
660
|
+
This enum is expected to grow over time on the backend; treat unrecognized
|
|
661
|
+
wire values defensively rather than assuming this is the complete set.
|
|
662
|
+
"""
|
|
663
|
+
|
|
664
|
+
TEAMS = "teams"
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
class AssistantProjectMappingRequest(BaseModel):
|
|
668
|
+
"""Request body for POST /v1/assistants/{assistant_id}/projects/mapping."""
|
|
669
|
+
|
|
670
|
+
model_config = ConfigDict(extra="ignore", use_enum_values=True)
|
|
671
|
+
|
|
672
|
+
project_name: str = Field(description="Project (application) name")
|
|
673
|
+
feature: AssistantProjectFeature = Field(
|
|
674
|
+
description="Feature discriminator this mapping is for, e.g. 'teams'"
|
|
675
|
+
)
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
class AssistantProjectMappingPagination(BaseModel):
|
|
679
|
+
"""Pagination metadata returned by GET /v1/assistants/projects/mapping."""
|
|
680
|
+
|
|
681
|
+
model_config = ConfigDict(extra="ignore")
|
|
682
|
+
|
|
683
|
+
page: int = Field(description="Current page, 0-indexed")
|
|
684
|
+
per_page: int = Field(description="Items per page")
|
|
685
|
+
total: int = Field(description="Total matching assistants across all pages")
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
class AssistantProjectMappingListResponse(BaseModel):
|
|
689
|
+
"""Response for GET /v1/assistants/projects/mapping.
|
|
690
|
+
|
|
691
|
+
List items are intentionally typed as ``dict[str, Any]`` rather than
|
|
692
|
+
``Assistant``/``AssistantBase``. The backend contract documents this
|
|
693
|
+
endpoint as returning "the same shape as GET /v1/assistants", but that
|
|
694
|
+
endpoint's own shape is parameterized by a ``minimal_response`` flag that
|
|
695
|
+
this new endpoint does not expose, and the exact per-item fields returned
|
|
696
|
+
here are not otherwise confirmed. Rather than guess the wire format,
|
|
697
|
+
callers get the raw dict and can assert on whichever fields they need
|
|
698
|
+
(e.g. ``item["id"]``).
|
|
699
|
+
"""
|
|
700
|
+
|
|
701
|
+
model_config = ConfigDict(extra="ignore")
|
|
702
|
+
|
|
703
|
+
data: list[dict[str, Any]] = Field(default_factory=list)
|
|
704
|
+
pagination: AssistantProjectMappingPagination
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
class UserMappingSlotConfig(BaseModel):
|
|
708
|
+
"""Configuration for a single integration slot in user mapping."""
|
|
709
|
+
|
|
710
|
+
model_config = ConfigDict(extra="ignore")
|
|
711
|
+
|
|
712
|
+
name: str = Field(description="Integration slot name (tool name, e.g. 'Git')")
|
|
713
|
+
integration_id: Optional[str] = Field(
|
|
714
|
+
default=None,
|
|
715
|
+
description="Integration ID. None = auto-lookup; empty string = explicit 'no integration'",
|
|
716
|
+
)
|
|
717
|
+
auto_lookup: Optional[bool] = Field(
|
|
718
|
+
default=None,
|
|
719
|
+
description="Whether auto-credentials lookup is enabled for this slot",
|
|
720
|
+
)
|
|
721
|
+
explicit_none: Optional[bool] = Field(
|
|
722
|
+
default=None,
|
|
723
|
+
description="User explicitly chose no integration, blocking auto-lookup override",
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
class UserMappingSaveRequest(BaseModel):
|
|
728
|
+
"""Request body for POST /v1/assistants/{assistant_id}/users/mapping."""
|
|
729
|
+
|
|
730
|
+
model_config = ConfigDict(extra="ignore")
|
|
731
|
+
|
|
732
|
+
tools_config: List[UserMappingSlotConfig] = Field(
|
|
733
|
+
default_factory=list,
|
|
734
|
+
description="Slot configurations to save",
|
|
735
|
+
)
|
|
736
|
+
workflow_id: Optional[str] = Field(
|
|
737
|
+
default=None,
|
|
738
|
+
description="Workflow scope reference. None = assistant scope",
|
|
739
|
+
)
|
|
740
|
+
apply_to_assistant_scope: bool = Field(
|
|
741
|
+
default=False,
|
|
742
|
+
description="When True, saves at assistant scope and removes workflow-scoped override",
|
|
743
|
+
)
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
class UserMappingResponse(BaseModel):
|
|
747
|
+
"""Response body for GET /v1/assistants/{assistant_id}/users/mapping."""
|
|
748
|
+
|
|
749
|
+
model_config = ConfigDict(extra="ignore")
|
|
750
|
+
|
|
751
|
+
tools_config: List[UserMappingSlotConfig] = Field(
|
|
752
|
+
default_factory=list,
|
|
753
|
+
description="Current effective slot configurations",
|
|
754
|
+
)
|
|
755
|
+
has_assistant_scope_selection: bool = Field(
|
|
756
|
+
default=False,
|
|
757
|
+
description="Whether an assistant-scoped mapping row exists for this user",
|
|
758
|
+
)
|
|
759
|
+
workflow_id: Optional[str] = Field(
|
|
760
|
+
default=None,
|
|
761
|
+
description="Workflow scope the response is effective for",
|
|
762
|
+
)
|
codemie_sdk/models/project.py
CHANGED
|
@@ -81,6 +81,7 @@ class ProjectListItem(BaseModel):
|
|
|
81
81
|
budgets: list[ProjectBudgetItem] | None = []
|
|
82
82
|
chargeback_enabled: bool = False
|
|
83
83
|
chargeback_attribution: str = "project"
|
|
84
|
+
cli_analytics_enabled: bool | None = None
|
|
84
85
|
|
|
85
86
|
|
|
86
87
|
class PaginationInfo(BaseModel):
|
|
@@ -119,6 +120,7 @@ class ProjectDetailResponse(BaseModel):
|
|
|
119
120
|
cost_center_name: str | None = None
|
|
120
121
|
members: list[ProjectMember]
|
|
121
122
|
chargeback_attribution: str = "project"
|
|
123
|
+
cli_analytics_enabled: bool | None = None
|
|
122
124
|
|
|
123
125
|
|
|
124
126
|
class ProjectCreateRequest(BaseModel):
|
|
@@ -134,6 +136,7 @@ class ProjectCreateRequest(BaseModel):
|
|
|
134
136
|
)
|
|
135
137
|
description: str | None = Field(default=None, description="Project description")
|
|
136
138
|
cost_center_id: UUID | None = None
|
|
139
|
+
cli_analytics_enabled: bool | None = None
|
|
137
140
|
|
|
138
141
|
|
|
139
142
|
class ProjectCreateResponse(BaseModel):
|
|
@@ -151,6 +154,7 @@ class ProjectCreateResponse(BaseModel):
|
|
|
151
154
|
cost_center_name: str | None = None
|
|
152
155
|
enforce_member_spend_limits: bool = False
|
|
153
156
|
chargeback_attribution: str = "project"
|
|
157
|
+
cli_analytics_enabled: bool | None = None
|
|
154
158
|
|
|
155
159
|
|
|
156
160
|
# PATCH /v1/projects/{name} returns the same shape as the create response
|
|
@@ -174,6 +178,7 @@ class ProjectUpdateRequest(BaseModel):
|
|
|
174
178
|
clear_cost_center: bool = False
|
|
175
179
|
enforce_member_spend_limits: bool | None = None
|
|
176
180
|
chargeback_attribution: str | None = None
|
|
181
|
+
cli_analytics_enabled: bool | None = None
|
|
177
182
|
|
|
178
183
|
|
|
179
184
|
class ProjectOwnershipUpdateRequest(BaseModel):
|
|
@@ -550,7 +550,9 @@ class AnalyticsService:
|
|
|
550
550
|
wrap_response=False,
|
|
551
551
|
)
|
|
552
552
|
|
|
553
|
-
def send_cli_hook_events(
|
|
553
|
+
def send_cli_hook_events(
|
|
554
|
+
self, events: list[dict], project: str | None = None
|
|
555
|
+
) -> dict:
|
|
554
556
|
"""POST /v1/analytics/cli-analytics/event-hooks — ingest CLI plugin hook events.
|
|
555
557
|
|
|
556
558
|
The events are sent as NDJSON (one JSON object per line), the format the
|
|
@@ -559,16 +561,23 @@ class AnalyticsService:
|
|
|
559
561
|
|
|
560
562
|
Args:
|
|
561
563
|
events: Hook events, e.g. ``{"type": "agent.session.start", "session_id": ...}``
|
|
564
|
+
project: Project name sent as ``X-CodeMie-Project``; the server discards
|
|
565
|
+
the batch (HTTP 200) when it is missing, unknown or has CLI analytics
|
|
566
|
+
disabled. None sends no header.
|
|
562
567
|
|
|
563
568
|
Returns:
|
|
564
|
-
Ingest response body
|
|
569
|
+
Ingest response body: an empty object on success, or the discard body
|
|
570
|
+
``{"accepted": 0, "dropped": N, "reason": ...}`` (never raised on)
|
|
565
571
|
"""
|
|
566
572
|
body = "\n".join(json.dumps(event) for event in events) + "\n"
|
|
573
|
+
headers = {"Content-Type": "application/x-ndjson"}
|
|
574
|
+
if project is not None:
|
|
575
|
+
headers["X-CodeMie-Project"] = project
|
|
567
576
|
return self._api.post(
|
|
568
577
|
"/v1/analytics/cli-analytics/event-hooks",
|
|
569
578
|
dict,
|
|
570
579
|
data=body.encode("utf-8"),
|
|
571
|
-
extra_headers=
|
|
580
|
+
extra_headers=headers,
|
|
572
581
|
wrap_response=False,
|
|
573
582
|
)
|
|
574
583
|
|
|
@@ -591,7 +600,9 @@ class AnalyticsService:
|
|
|
591
600
|
|
|
592
601
|
# ── CLI Analytics: /v1/analytics/cli-analytics/* ─────────────────────────
|
|
593
602
|
|
|
594
|
-
def ingest_cli_analytics_event_hooks(
|
|
603
|
+
def ingest_cli_analytics_event_hooks(
|
|
604
|
+
self, events: list[dict], project: str | None = None
|
|
605
|
+
) -> None:
|
|
595
606
|
"""POST /v1/analytics/cli-analytics/event-hooks — send CLI hook events.
|
|
596
607
|
|
|
597
608
|
The endpoint takes NDJSON (one event per line); each event is posted as
|
|
@@ -599,26 +610,38 @@ class AnalyticsService:
|
|
|
599
610
|
|
|
600
611
|
Args:
|
|
601
612
|
events: Hook events, e.g. ``agent.session.start``, ``agent.usage.request``
|
|
613
|
+
project: Project name sent as ``X-CodeMie-Project``. The server stores the
|
|
614
|
+
batch only for an existing project with CLI analytics enabled that the
|
|
615
|
+
sender may use; otherwise it answers HTTP 200 and discards it.
|
|
602
616
|
"""
|
|
617
|
+
headers = {"Content-Type": "application/x-ndjson"}
|
|
618
|
+
if project is not None:
|
|
619
|
+
headers["X-CodeMie-Project"] = project
|
|
603
620
|
for event in events:
|
|
604
621
|
self._api.post(
|
|
605
622
|
"/v1/analytics/cli-analytics/event-hooks",
|
|
606
623
|
dict,
|
|
607
624
|
json_data=event,
|
|
608
625
|
wrap_response=False,
|
|
609
|
-
extra_headers=
|
|
626
|
+
extra_headers=headers,
|
|
610
627
|
)
|
|
611
628
|
|
|
612
|
-
def ingest_cli_analytics_logs(
|
|
629
|
+
def ingest_cli_analytics_logs(
|
|
630
|
+
self, payload: dict, project: str | None = None
|
|
631
|
+
) -> None:
|
|
613
632
|
"""POST /v1/analytics/cli-analytics/logs — send OTLP logs as JSON.
|
|
614
633
|
|
|
615
634
|
Args:
|
|
616
635
|
payload: An OTLP ``ExportLogsServiceRequest`` in its JSON form
|
|
636
|
+
project: Project name sent as ``X-CodeMie-Project`` (see
|
|
637
|
+
``ingest_cli_analytics_event_hooks`` for the server behaviour)
|
|
617
638
|
"""
|
|
639
|
+
headers = {"X-CodeMie-Project": project} if project is not None else None
|
|
618
640
|
self._api.post(
|
|
619
641
|
"/v1/analytics/cli-analytics/logs",
|
|
620
642
|
dict,
|
|
621
643
|
json_data=payload,
|
|
644
|
+
extra_headers=headers,
|
|
622
645
|
wrap_response=False,
|
|
623
646
|
)
|
|
624
647
|
|
|
@@ -29,8 +29,12 @@ from ..models.assistant import (
|
|
|
29
29
|
AssistantEvaluationRequest,
|
|
30
30
|
ReactionRequest,
|
|
31
31
|
ToolCallResumeRequest,
|
|
32
|
+
AssistantProjectFeature,
|
|
33
|
+
AssistantProjectMappingListResponse,
|
|
34
|
+
AssistantProjectMappingRequest,
|
|
32
35
|
)
|
|
33
36
|
from ..models.common import PaginationParams
|
|
37
|
+
from ..models.conversation import BaseResponse
|
|
34
38
|
from ..utils import ApiRequestHandler, TokenSource
|
|
35
39
|
|
|
36
40
|
|
|
@@ -644,3 +648,182 @@ class AssistantService:
|
|
|
644
648
|
Response from the API
|
|
645
649
|
"""
|
|
646
650
|
return self._api.delete(f"/v1/assistants/{assistant_id}/reactions", dict)
|
|
651
|
+
|
|
652
|
+
def list_project_mapping(
|
|
653
|
+
self,
|
|
654
|
+
project_name: str,
|
|
655
|
+
feature: AssistantProjectFeature = AssistantProjectFeature.TEAMS,
|
|
656
|
+
page: int = 0,
|
|
657
|
+
per_page: int = 12,
|
|
658
|
+
) -> AssistantProjectMappingListResponse:
|
|
659
|
+
"""List assistants enabled for a project feature (e.g. Teams bot).
|
|
660
|
+
|
|
661
|
+
Accessible to any member of ``project_name``, not just project admins.
|
|
662
|
+
|
|
663
|
+
Args:
|
|
664
|
+
project_name: Project (application) name to list mappings for
|
|
665
|
+
feature: Feature discriminator, currently only "teams"
|
|
666
|
+
page: Page number, 0-indexed
|
|
667
|
+
per_page: Items per page (default 12, max 10000)
|
|
668
|
+
|
|
669
|
+
Returns:
|
|
670
|
+
Paginated list of assistants enabled for the project feature
|
|
671
|
+
"""
|
|
672
|
+
feature_value = (
|
|
673
|
+
feature.value if isinstance(feature, AssistantProjectFeature) else feature
|
|
674
|
+
)
|
|
675
|
+
params = PaginationParams(page=page, per_page=per_page).to_dict()
|
|
676
|
+
params["feature"] = feature_value
|
|
677
|
+
params["project"] = project_name
|
|
678
|
+
return self._api.get(
|
|
679
|
+
"/v1/assistants/projects/mapping",
|
|
680
|
+
AssistantProjectMappingListResponse,
|
|
681
|
+
params=params,
|
|
682
|
+
wrap_response=False,
|
|
683
|
+
)
|
|
684
|
+
|
|
685
|
+
def enable_for_project(
|
|
686
|
+
self,
|
|
687
|
+
assistant_id: str,
|
|
688
|
+
project_name: str,
|
|
689
|
+
feature: AssistantProjectFeature = AssistantProjectFeature.TEAMS,
|
|
690
|
+
) -> BaseResponse:
|
|
691
|
+
"""Enable an assistant for a project feature (e.g. Teams bot).
|
|
692
|
+
|
|
693
|
+
Idempotent — calling this when the mapping already exists returns 200
|
|
694
|
+
with no error. Requires the caller to be a project admin/maintainer
|
|
695
|
+
(or application admin) for ``project_name``.
|
|
696
|
+
|
|
697
|
+
Args:
|
|
698
|
+
assistant_id: ID of the assistant to enable
|
|
699
|
+
project_name: Project (application) name to enable the mapping for
|
|
700
|
+
feature: Feature discriminator, currently only "teams"
|
|
701
|
+
|
|
702
|
+
Returns:
|
|
703
|
+
Response confirming the assistant was enabled
|
|
704
|
+
"""
|
|
705
|
+
request = AssistantProjectMappingRequest(
|
|
706
|
+
project_name=project_name, feature=feature
|
|
707
|
+
)
|
|
708
|
+
return self._api.post(
|
|
709
|
+
f"/v1/assistants/{assistant_id}/projects/mapping",
|
|
710
|
+
BaseResponse,
|
|
711
|
+
json_data=request.model_dump(exclude_none=True),
|
|
712
|
+
)
|
|
713
|
+
|
|
714
|
+
def disable_for_project(
|
|
715
|
+
self,
|
|
716
|
+
assistant_id: str,
|
|
717
|
+
project_name: str,
|
|
718
|
+
feature: AssistantProjectFeature = AssistantProjectFeature.TEAMS,
|
|
719
|
+
) -> BaseResponse:
|
|
720
|
+
"""Disable an assistant for a project feature (e.g. Teams bot).
|
|
721
|
+
|
|
722
|
+
Raises an HTTP error (404) if the mapping does not exist. Requires the
|
|
723
|
+
caller to be a project admin/maintainer (or application admin) for
|
|
724
|
+
``project_name``.
|
|
725
|
+
|
|
726
|
+
Args:
|
|
727
|
+
assistant_id: ID of the assistant to disable
|
|
728
|
+
project_name: Project (application) name to disable the mapping for
|
|
729
|
+
feature: Feature discriminator, currently only "teams"
|
|
730
|
+
|
|
731
|
+
Returns:
|
|
732
|
+
Response confirming the assistant was disabled
|
|
733
|
+
"""
|
|
734
|
+
feature_value = (
|
|
735
|
+
feature.value if isinstance(feature, AssistantProjectFeature) else feature
|
|
736
|
+
)
|
|
737
|
+
params = {"project": project_name, "feature": feature_value}
|
|
738
|
+
return self._api.delete(
|
|
739
|
+
f"/v1/assistants/{assistant_id}/projects/mapping",
|
|
740
|
+
BaseResponse,
|
|
741
|
+
params=params,
|
|
742
|
+
)
|
|
743
|
+
|
|
744
|
+
def get_user_mapping(
|
|
745
|
+
self,
|
|
746
|
+
assistant_id: str,
|
|
747
|
+
workflow_id: Optional[str] = None,
|
|
748
|
+
) -> dict:
|
|
749
|
+
"""Get the effective personal integration mapping for an assistant.
|
|
750
|
+
|
|
751
|
+
Returns the merged per-slot view following the resolution order:
|
|
752
|
+
workflow-scoped → assistant-scoped → auto-lookup → none.
|
|
753
|
+
|
|
754
|
+
Args:
|
|
755
|
+
assistant_id: ID of the assistant
|
|
756
|
+
workflow_id: Optional workflow scope. When provided, returns the effective
|
|
757
|
+
selection for that workflow; when omitted, returns assistant-scoped only.
|
|
758
|
+
|
|
759
|
+
Returns:
|
|
760
|
+
Mapping response dict with ``tools_config`` list and
|
|
761
|
+
``has_assistant_scope_selection`` boolean.
|
|
762
|
+
"""
|
|
763
|
+
params: dict = {}
|
|
764
|
+
if workflow_id is not None:
|
|
765
|
+
params["workflow_id"] = workflow_id
|
|
766
|
+
return self._api.get(
|
|
767
|
+
f"/v1/assistants/{assistant_id}/users/mapping",
|
|
768
|
+
dict,
|
|
769
|
+
params=params or None,
|
|
770
|
+
)
|
|
771
|
+
|
|
772
|
+
def save_user_mapping(
|
|
773
|
+
self,
|
|
774
|
+
assistant_id: str,
|
|
775
|
+
tools_config: list,
|
|
776
|
+
workflow_id: Optional[str] = None,
|
|
777
|
+
apply_to_assistant_scope: bool = False,
|
|
778
|
+
) -> dict:
|
|
779
|
+
"""Save personal integration mapping for an assistant.
|
|
780
|
+
|
|
781
|
+
When ``workflow_id`` is supplied and ``apply_to_assistant_scope`` is False,
|
|
782
|
+
a workflow-scoped record is created/updated (the new default on workflow screens).
|
|
783
|
+
When ``apply_to_assistant_scope`` is True, the mapping is promoted to assistant
|
|
784
|
+
scope and any existing workflow-scoped override is removed atomically.
|
|
785
|
+
|
|
786
|
+
Args:
|
|
787
|
+
assistant_id: ID of the assistant
|
|
788
|
+
tools_config: List of slot configuration dicts (each with ``slot_id``
|
|
789
|
+
and optionally ``integration_id``)
|
|
790
|
+
workflow_id: Optional workflow scope reference
|
|
791
|
+
apply_to_assistant_scope: When True, saves at assistant scope
|
|
792
|
+
|
|
793
|
+
Returns:
|
|
794
|
+
Saved mapping response dict
|
|
795
|
+
"""
|
|
796
|
+
payload: dict = {"tools_config": tools_config}
|
|
797
|
+
if workflow_id is not None:
|
|
798
|
+
payload["workflow_id"] = workflow_id
|
|
799
|
+
if apply_to_assistant_scope:
|
|
800
|
+
payload["apply_to_assistant_scope"] = True
|
|
801
|
+
return self._api.post(
|
|
802
|
+
f"/v1/assistants/{assistant_id}/users/mapping",
|
|
803
|
+
dict,
|
|
804
|
+
json_data=payload,
|
|
805
|
+
)
|
|
806
|
+
|
|
807
|
+
def delete_user_mapping(
|
|
808
|
+
self,
|
|
809
|
+
assistant_id: str,
|
|
810
|
+
workflow_id: Optional[str] = None,
|
|
811
|
+
) -> dict:
|
|
812
|
+
"""Delete personal integration mapping for an assistant.
|
|
813
|
+
|
|
814
|
+
Args:
|
|
815
|
+
assistant_id: ID of the assistant
|
|
816
|
+
workflow_id: When provided, deletes the workflow-scoped record only.
|
|
817
|
+
When omitted, deletes the assistant-scoped record.
|
|
818
|
+
|
|
819
|
+
Returns:
|
|
820
|
+
Response from the API
|
|
821
|
+
"""
|
|
822
|
+
params: dict = {}
|
|
823
|
+
if workflow_id is not None:
|
|
824
|
+
params["workflow_id"] = workflow_id
|
|
825
|
+
return self._api.delete(
|
|
826
|
+
f"/v1/assistants/{assistant_id}/users/mapping",
|
|
827
|
+
dict,
|
|
828
|
+
params=params or None,
|
|
829
|
+
)
|
codemie_sdk/services/project.py
CHANGED
|
@@ -57,6 +57,7 @@ class ProjectService:
|
|
|
57
57
|
description: str | None = None,
|
|
58
58
|
cost_center_id: UUID | None = None,
|
|
59
59
|
display_name: str | None = None,
|
|
60
|
+
cli_analytics_enabled: bool | None = None,
|
|
60
61
|
) -> ProjectCreateResponse:
|
|
61
62
|
"""Create a new shared project.
|
|
62
63
|
|
|
@@ -65,6 +66,7 @@ class ProjectService:
|
|
|
65
66
|
description: Project description (optional)
|
|
66
67
|
cost_center_id: Optional cost center ID
|
|
67
68
|
display_name: Human-friendly display name (max 150 chars)
|
|
69
|
+
cli_analytics_enabled: Enable CLI analytics ingestion (None = not sent)
|
|
68
70
|
|
|
69
71
|
Returns:
|
|
70
72
|
ProjectCreateResponse with project details
|
|
@@ -77,6 +79,7 @@ class ProjectService:
|
|
|
77
79
|
description=description,
|
|
78
80
|
cost_center_id=cost_center_id,
|
|
79
81
|
display_name=display_name,
|
|
82
|
+
cli_analytics_enabled=cli_analytics_enabled,
|
|
80
83
|
)
|
|
81
84
|
|
|
82
85
|
return self._api.post(
|
|
@@ -163,6 +166,7 @@ class ProjectService:
|
|
|
163
166
|
enforce_member_spend_limits: bool | None = None,
|
|
164
167
|
display_name: str | None = None,
|
|
165
168
|
chargeback_attribution: str | None = None,
|
|
169
|
+
cli_analytics_enabled: bool | None = None,
|
|
166
170
|
) -> ProjectUpdateResponse:
|
|
167
171
|
"""Update a project.
|
|
168
172
|
|
|
@@ -177,6 +181,7 @@ class ProjectService:
|
|
|
177
181
|
enforce_member_spend_limits: Enable/disable per-member spend enforcement
|
|
178
182
|
display_name: Human-friendly display name (max 150 chars)
|
|
179
183
|
chargeback_attribution: Chargeback attribution mode ("project" or "cost_center")
|
|
184
|
+
cli_analytics_enabled: Enable/disable CLI analytics ingestion (None = not sent)
|
|
180
185
|
|
|
181
186
|
Returns:
|
|
182
187
|
ProjectUpdateResponse with updated project details
|
|
@@ -194,6 +199,7 @@ class ProjectService:
|
|
|
194
199
|
enforce_member_spend_limits=enforce_member_spend_limits,
|
|
195
200
|
display_name=display_name,
|
|
196
201
|
chargeback_attribution=chargeback_attribution,
|
|
202
|
+
cli_analytics_enabled=cli_analytics_enabled,
|
|
197
203
|
)
|
|
198
204
|
|
|
199
205
|
return self._api.patch(
|
|
@@ -14,7 +14,7 @@ codemie_sdk/models/a2a.py,sha256=zCNLiwwg78rok04hMlGPcQQS1IbEV4OaMcA_1KxQ9xs,158
|
|
|
14
14
|
codemie_sdk/models/activity_event.py,sha256=KDEzzUEfs1J9ALNo4mLP-Rq7jeTM4g-P4A5A7Z4YjzM,1072
|
|
15
15
|
codemie_sdk/models/admin.py,sha256=2UGaO60ZrHHcDcV9thYBVxDyUCvtfPQhs10WswhGFJs,2298
|
|
16
16
|
codemie_sdk/models/analytics.py,sha256=B9lLAddL_LylXsoOukiPqbz4HVd2itmuB6iaEbhpKiQ,10194
|
|
17
|
-
codemie_sdk/models/assistant.py,sha256=
|
|
17
|
+
codemie_sdk/models/assistant.py,sha256=0UGqd2hOhcRfCXaSq1c5z3M5MDfYqRQzn_6gDo8URnI,26114
|
|
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
|
|
@@ -27,7 +27,7 @@ codemie_sdk/models/integration.py,sha256=yBV28vZ8oN0oNRNHdDPL3UUSJqNga1YodABIfX8
|
|
|
27
27
|
codemie_sdk/models/llm.py,sha256=ViADvsSAkc85YQyPUkGE3ZvMc5pnHWHO0_rOkLSTfu4,1333
|
|
28
28
|
codemie_sdk/models/mcp_config.py,sha256=mvD2utb4fthjNGAIkZKEkTtHSQQyF2WEYrA7tn-e0Lo,2184
|
|
29
29
|
codemie_sdk/models/mermaid.py,sha256=dhRgX-itvfyrt0LUg5pbSo0CTH5PewiegqcZn3hWggU,675
|
|
30
|
-
codemie_sdk/models/project.py,sha256=
|
|
30
|
+
codemie_sdk/models/project.py,sha256=9nMsPNw0mUHud2sAISXrJx2lXz9VKw2Dn-ABq53UgZ8,7600
|
|
31
31
|
codemie_sdk/models/skill.py,sha256=KE4lsF8TMxIQa_UE0oRDMT6XIEHqKjsDyi0HYKEp1mM,6918
|
|
32
32
|
codemie_sdk/models/task.py,sha256=YHu5DRnECS2wnqIWZ_YH8Z72p1I4aV3xWFW5joxN_8Q,1442
|
|
33
33
|
codemie_sdk/models/user.py,sha256=YqPWzTgIKF-7Jw6aV7RD__su1iahEJPGaDR6Px-B4bU,3848
|
|
@@ -45,8 +45,8 @@ codemie_sdk/models/workspace.py,sha256=xYnVO1Pnd0l0PSBe2pwP80C2ZvYBc2ESo6OH_G0cO
|
|
|
45
45
|
codemie_sdk/services/a2a.py,sha256=JI_heDKmQ1qYGIES_6qPosHRyVb73tKs4v7uTGpzXx4,1026
|
|
46
46
|
codemie_sdk/services/activity_event.py,sha256=KoD0DyeqJ0CmQPA4PAXH4uGIAQCgcJbYwDnv-MCckGc,3630
|
|
47
47
|
codemie_sdk/services/admin.py,sha256=yk1xdBXDjpdW4OMOdBaURkZhAxak9h-TppKyhStLekc,4006
|
|
48
|
-
codemie_sdk/services/analytics.py,sha256=
|
|
49
|
-
codemie_sdk/services/assistant.py,sha256=
|
|
48
|
+
codemie_sdk/services/analytics.py,sha256=yTvBSzDPG2r0BCBukDlnnElvFxLNniyCb8qtYu6foZU,24328
|
|
49
|
+
codemie_sdk/services/assistant.py,sha256=4pgwUXyqego0SUThX2B6FHtsPYmvPzKgr92TEgxAIoA,28835
|
|
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
|
|
@@ -59,7 +59,7 @@ codemie_sdk/services/integration.py,sha256=n4ggDedJ2GCI5mTgZNfrYE49uzLsp_BKYKMdT
|
|
|
59
59
|
codemie_sdk/services/llm.py,sha256=GQWIi359f99uU4YRnAdpbyae1kXp1G5OpVgJNIIn7-8,1132
|
|
60
60
|
codemie_sdk/services/mcp_configs.py,sha256=MrCiWJ6-ezXE9NOTgOfHDhfyQokaumGp1rwB4IAKXzs,2466
|
|
61
61
|
codemie_sdk/services/mermaid.py,sha256=7cLykdrJVW576raUbON3yhuWnbGaXl8rX1QfVwbu2JE,2246
|
|
62
|
-
codemie_sdk/services/project.py,sha256=
|
|
62
|
+
codemie_sdk/services/project.py,sha256=IRwFZi9L1UNAW9Z37FnZXaw6527mvSzvtj-oq5_lzWg,14690
|
|
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.700.dist-info/METADATA,sha256=S0zUk2JXzc8BzD9wJ0A2YVDdd8yu6XHilhsgGClhSqo,47938
|
|
80
|
+
codemie_sdk_python-0.1.700.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
|
|
81
|
+
codemie_sdk_python-0.1.700.dist-info/RECORD,,
|
|
File without changes
|