ellipsis-dev 0.45.0__tar.gz → 0.46.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ellipsis-dev
3
- Version: 0.45.0
3
+ Version: 0.46.0
4
4
  Summary: Python SDK for the Ellipsis agents platform: every /v1 operation, sync and async.
5
5
  Project-URL: Homepage, https://www.ellipsis.dev
6
6
  Project-URL: Documentation, https://www.ellipsis.dev/docs/api
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "ellipsis-dev"
7
- version = "0.45.0"
7
+ version = "0.46.0"
8
8
  description = "Python SDK for the Ellipsis agents platform: every /v1 operation, sync and async."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -25,6 +25,7 @@ from ._transport import (
25
25
  Transport,
26
26
  build_body,
27
27
  build_query,
28
+ new_idempotency_key,
28
29
  )
29
30
 
30
31
 
@@ -815,6 +816,7 @@ class _SyncAgents:
815
816
  environment: Union[str, models.EnvironmentConfig_Input, None] = None,
816
817
  force_rebuild: Union[bool, None] = None,
817
818
  gemini: Union[models.GeminiOverrides, None] = None,
819
+ idempotency_key: Union[str, None] = None,
818
820
  images: Union[List[models.ImageAttachment], None] = None,
819
821
  input: Union[dict[str, Any], None] = None,
820
822
  metadata: Union[dict[str, Union[str, None]], None] = None,
@@ -854,6 +856,9 @@ class _SyncAgents:
854
856
  "environment": environment,
855
857
  "force_rebuild": force_rebuild,
856
858
  "gemini": gemini,
859
+ "idempotency_key": idempotency_key
860
+ if idempotency_key is not None
861
+ else new_idempotency_key(),
857
862
  "images": images,
858
863
  "input": input,
859
864
  "metadata": metadata,
@@ -2060,7 +2065,9 @@ class _SyncSessions(SyncSessionsSugar):
2060
2065
  """
2061
2066
  path = f"/v1/sessions/{_quote(id)}/messages"
2062
2067
  body_fields: dict[str, Any] = {
2063
- "idempotency_key": idempotency_key,
2068
+ "idempotency_key": idempotency_key
2069
+ if idempotency_key is not None
2070
+ else new_idempotency_key(),
2064
2071
  "images": images,
2065
2072
  "message": message,
2066
2073
  }
@@ -2105,6 +2112,7 @@ class _SyncSessions(SyncSessionsSugar):
2105
2112
  environment: Union[str, models.EnvironmentConfig_Input, None] = None,
2106
2113
  force_rebuild: Union[bool, None] = None,
2107
2114
  gemini: Union[models.GeminiConfig_Input, None] = None,
2115
+ idempotency_key: Union[str, None] = None,
2108
2116
  images: Union[List[models.ImageAttachment], None] = None,
2109
2117
  metadata: Union[dict[str, str], None] = None,
2110
2118
  output: Union[models.OutputConfig, None] = None,
@@ -2144,6 +2152,9 @@ class _SyncSessions(SyncSessionsSugar):
2144
2152
  "environment": environment,
2145
2153
  "force_rebuild": force_rebuild,
2146
2154
  "gemini": gemini,
2155
+ "idempotency_key": idempotency_key
2156
+ if idempotency_key is not None
2157
+ else new_idempotency_key(),
2147
2158
  "images": images,
2148
2159
  "metadata": metadata,
2149
2160
  "output": output,
@@ -2254,9 +2265,9 @@ class _SyncSessions(SyncSessionsSugar):
2254
2265
  thread, pull request, issue, or Linear issue it answers starts a
2255
2266
  new session. A session is also archived when it closes and after
2256
2267
  the account's `archive_inactive_sessions_days` without a message.
2257
- When the account sets session log retention, the session's
2258
- records, messages, and prompt are deleted that many days after it
2259
- was archived (`archived.deletes_at`). The session itself stays.
2268
+ The session's records, messages, and prompt are deleted the
2269
+ account's `session_logs_days` after it was archived
2270
+ (`archived.deletes_at`). The session itself stays.
2260
2271
 
2261
2272
  Set archived to false to clear both fields and let the session
2262
2273
  take messages again. 409 `session_superseded` when a newer session
@@ -2645,7 +2656,7 @@ class _SyncWebhooksDeliveries:
2645
2656
  List webhook deliveries, newest first.
2646
2657
 
2647
2658
  Includes verification pings and deliveries for deleted webhooks.
2648
- History is retained for 30 days. Retries belong to the same delivery.
2659
+ History is kept for 7 days. Retries belong to the same delivery.
2649
2660
 
2650
2661
  Required permissions: read:webhooks.
2651
2662
  API key: Supported.
@@ -2740,7 +2751,7 @@ class _SyncWebhooks:
2740
2751
  Delete a webhook and cancel outstanding deliveries.
2741
2752
 
2742
2753
  An HTTP request already in flight may finish. Delivery history remains
2743
- available for 30 days. Deletion frees a webhook slot.
2754
+ available for 7 days. Deletion frees a webhook slot.
2744
2755
 
2745
2756
  Required permissions: delete:webhooks.
2746
2757
  API key: Supported.
@@ -3707,6 +3718,7 @@ class _AsyncAgents:
3707
3718
  environment: Union[str, models.EnvironmentConfig_Input, None] = None,
3708
3719
  force_rebuild: Union[bool, None] = None,
3709
3720
  gemini: Union[models.GeminiOverrides, None] = None,
3721
+ idempotency_key: Union[str, None] = None,
3710
3722
  images: Union[List[models.ImageAttachment], None] = None,
3711
3723
  input: Union[dict[str, Any], None] = None,
3712
3724
  metadata: Union[dict[str, Union[str, None]], None] = None,
@@ -3746,6 +3758,9 @@ class _AsyncAgents:
3746
3758
  "environment": environment,
3747
3759
  "force_rebuild": force_rebuild,
3748
3760
  "gemini": gemini,
3761
+ "idempotency_key": idempotency_key
3762
+ if idempotency_key is not None
3763
+ else new_idempotency_key(),
3749
3764
  "images": images,
3750
3765
  "input": input,
3751
3766
  "metadata": metadata,
@@ -4954,7 +4969,9 @@ class _AsyncSessions(AsyncSessionsSugar):
4954
4969
  """
4955
4970
  path = f"/v1/sessions/{_quote(id)}/messages"
4956
4971
  body_fields: dict[str, Any] = {
4957
- "idempotency_key": idempotency_key,
4972
+ "idempotency_key": idempotency_key
4973
+ if idempotency_key is not None
4974
+ else new_idempotency_key(),
4958
4975
  "images": images,
4959
4976
  "message": message,
4960
4977
  }
@@ -4999,6 +5016,7 @@ class _AsyncSessions(AsyncSessionsSugar):
4999
5016
  environment: Union[str, models.EnvironmentConfig_Input, None] = None,
5000
5017
  force_rebuild: Union[bool, None] = None,
5001
5018
  gemini: Union[models.GeminiConfig_Input, None] = None,
5019
+ idempotency_key: Union[str, None] = None,
5002
5020
  images: Union[List[models.ImageAttachment], None] = None,
5003
5021
  metadata: Union[dict[str, str], None] = None,
5004
5022
  output: Union[models.OutputConfig, None] = None,
@@ -5038,6 +5056,9 @@ class _AsyncSessions(AsyncSessionsSugar):
5038
5056
  "environment": environment,
5039
5057
  "force_rebuild": force_rebuild,
5040
5058
  "gemini": gemini,
5059
+ "idempotency_key": idempotency_key
5060
+ if idempotency_key is not None
5061
+ else new_idempotency_key(),
5041
5062
  "images": images,
5042
5063
  "metadata": metadata,
5043
5064
  "output": output,
@@ -5148,9 +5169,9 @@ class _AsyncSessions(AsyncSessionsSugar):
5148
5169
  thread, pull request, issue, or Linear issue it answers starts a
5149
5170
  new session. A session is also archived when it closes and after
5150
5171
  the account's `archive_inactive_sessions_days` without a message.
5151
- When the account sets session log retention, the session's
5152
- records, messages, and prompt are deleted that many days after it
5153
- was archived (`archived.deletes_at`). The session itself stays.
5172
+ The session's records, messages, and prompt are deleted the
5173
+ account's `session_logs_days` after it was archived
5174
+ (`archived.deletes_at`). The session itself stays.
5154
5175
 
5155
5176
  Set archived to false to clear both fields and let the session
5156
5177
  take messages again. 409 `session_superseded` when a newer session
@@ -5539,7 +5560,7 @@ class _AsyncWebhooksDeliveries:
5539
5560
  List webhook deliveries, newest first.
5540
5561
 
5541
5562
  Includes verification pings and deliveries for deleted webhooks.
5542
- History is retained for 30 days. Retries belong to the same delivery.
5563
+ History is kept for 7 days. Retries belong to the same delivery.
5543
5564
 
5544
5565
  Required permissions: read:webhooks.
5545
5566
  API key: Supported.
@@ -5634,7 +5655,7 @@ class _AsyncWebhooks:
5634
5655
  Delete a webhook and cancel outstanding deliveries.
5635
5656
 
5636
5657
  An HTTP request already in flight may finish. Delivery history remains
5637
- available for 30 days. Deletion frees a webhook slot.
5658
+ available for 7 days. Deletion frees a webhook slot.
5638
5659
 
5639
5660
  Required permissions: delete:webhooks.
5640
5661
  API key: Supported.
@@ -7,6 +7,7 @@ model; everything HTTP lives here.
7
7
 
8
8
  import random
9
9
  import time
10
+ import uuid
10
11
  from typing import Any, TypeVar
11
12
 
12
13
  import httpx
@@ -56,6 +57,13 @@ def build_body(body: BaseModel) -> Any:
56
57
  return body.model_dump(mode="json", by_alias=True, exclude_none=True)
57
58
 
58
59
 
60
+ def new_idempotency_key() -> str:
61
+ """A fresh key for a request that takes `idempotency_key`. The generated
62
+ client makes one per call when the caller sets none, so the transport's
63
+ retries of that call reuse it and the server applies the call once."""
64
+ return uuid.uuid4().hex
65
+
66
+
59
67
  def _backoff_seconds(attempt: int, retry_after: str | None) -> float:
60
68
  if retry_after is not None:
61
69
  try:
@@ -116,20 +116,14 @@ class BudgetCeiling(EllipsisModel):
116
116
 
117
117
 
118
118
  class DataRetentionSettings_Output(EllipsisModel):
119
- api_requests_days: Union[int, None] = Field(
120
- description="Reserved; API request retention is not yet enforced."
121
- )
122
119
  archive_inactive_sessions_days: int = Field(
123
120
  description="Days without a message before a session is archived. A session is also archived when it closes. 1 to 90, default 7."
124
121
  )
125
122
  environment_snapshots_days: int = Field(
126
- description="Retention of newly created reusable environment snapshots, up to 28 days from creation. Paused session workspaces have a separate lifetime."
127
- )
128
- session_logs_days: Union[int, None] = Field(
129
- description="Days after a session is archived before its records and messages are deleted. The session itself stays. Null keeps them."
123
+ description="Retention of newly created reusable environment snapshots, up to 7 days from creation. Paused session workspaces have a separate lifetime."
130
124
  )
131
- webhooks_days: Union[int, None] = Field(
132
- description="Reserved; webhook retention is not yet enforced."
125
+ session_logs_days: int = Field(
126
+ description="Days after a session is archived before its records and messages are deleted. The session itself stays. 1 to 365, default 365."
133
127
  )
134
128
 
135
129
 
@@ -3262,23 +3256,17 @@ class CreditPurchaseReceipt(EllipsisModel):
3262
3256
 
3263
3257
 
3264
3258
  class DataRetentionSettings_Input(EllipsisModel):
3265
- api_requests_days: Union[int, None] = Field(
3266
- default=None, description="Reserved; API request retention is not yet enforced."
3267
- )
3268
3259
  archive_inactive_sessions_days: Union[int, None] = Field(
3269
3260
  default=None,
3270
3261
  description="Days without a message before a session is archived. A session is also archived when it closes. 1 to 90, default 7.",
3271
3262
  )
3272
3263
  environment_snapshots_days: Union[int, None] = Field(
3273
3264
  default=None,
3274
- description="Retention of newly created reusable environment snapshots, up to 28 days from creation. Paused session workspaces have a separate lifetime.",
3265
+ description="Retention of newly created reusable environment snapshots, up to 7 days from creation. Paused session workspaces have a separate lifetime.",
3275
3266
  )
3276
3267
  session_logs_days: Union[int, None] = Field(
3277
3268
  default=None,
3278
- description="Days after a session is archived before its records and messages are deleted. The session itself stays. Null keeps them.",
3279
- )
3280
- webhooks_days: Union[int, None] = Field(
3281
- default=None, description="Reserved; webhook retention is not yet enforced."
3269
+ description="Days after a session is archived before its records and messages are deleted. The session itself stays. 1 to 365, default 365.",
3282
3270
  )
3283
3271
 
3284
3272
 
@@ -5373,7 +5361,7 @@ class SendSessionMessageRequest(EllipsisModel):
5373
5361
 
5374
5362
  idempotency_key: Union[str, None] = Field(
5375
5363
  default=None,
5376
- description="Optional retry-safety key, unique per (session, key): a retry with the same key returns the original message — no duplicate message, no double turn, no double spend. The SDK auto-generates one per send.",
5364
+ description="Optional retry safety key, unique per session. A retry with the same key returns the original message, with no second message, turn, or spend. The SDKs make a key for each call that sets none, so their own retries never send a message twice.",
5377
5365
  )
5378
5366
  images: Union[list[ImageAttachment], None] = Field(
5379
5367
  default=None,
@@ -5425,7 +5413,7 @@ class SessionArchived(EllipsisModel):
5425
5413
  description="The GitHub user who archived the session; null if unknown or unavailable."
5426
5414
  )
5427
5415
  deletes_at: Union[datetime, None] = Field(
5428
- description="When the session's records and messages are deleted, from the account's current session log retention. It moves when the retention changes. Null when the account keeps them or they're already deleted."
5416
+ description="When the session's records and messages are deleted, from the account's current session log retention. It moves when the retention changes. Null when they're already deleted."
5429
5417
  )
5430
5418
 
5431
5419
 
@@ -5974,6 +5962,10 @@ class StartAgentSessionRequest(EllipsisModel):
5974
5962
  default=None,
5975
5963
  description="Gemini CLI options for this session. Sent fields replace the agent's; naming Gemini CLI on an agent that runs another harness replaces its harness and requires a model. Set at most one of claude_code, codex, or gemini.",
5976
5964
  )
5965
+ idempotency_key: Union[str, None] = Field(
5966
+ default=None,
5967
+ description="Optional retry safety key, unique per account across POST /v1/sessions and POST /v1/agents/{id}/sessions. A retry with the same key returns the session the first request started instead of starting another. Only a request that started a session holds its key. A key is kept for 90 days. The SDKs make a key for each call that sets none, so their own retries never start a second session.",
5968
+ )
5977
5969
  images: Union[list[ImageAttachment], None] = Field(
5978
5970
  default=None,
5979
5971
  description="Images attached to the first message, base64 inline. Requires the model's `images` capability, listed by `/v1/account/models`. Each becomes an `[Image #N]` placeholder in the prompt and an image block the model sees with it. Up to 10, 5 MiB each; PNG, JPEG, GIF, or WebP.",
@@ -6062,6 +6054,10 @@ class StartSessionRequest(EllipsisModel):
6062
6054
  default=None,
6063
6055
  description="Gemini CLI input and native options. Set exactly one of claude_code, codex, or gemini.",
6064
6056
  )
6057
+ idempotency_key: Union[str, None] = Field(
6058
+ default=None,
6059
+ description="Optional retry safety key, unique per account across POST /v1/sessions and POST /v1/agents/{id}/sessions. A retry with the same key returns the session the first request started instead of starting another. Only a request that started a session holds its key. A key is kept for 90 days. The SDKs make a key for each call that sets none, so their own retries never start a second session.",
6060
+ )
6065
6061
  images: Union[list[ImageAttachment], None] = Field(
6066
6062
  default=None,
6067
6063
  description="Images attached to the first message, base64 inline. Requires the model's `images` capability, listed by `/v1/account/models`. Each becomes an `[Image #N]` placeholder in the prompt and an image block the model sees with it. Up to 10, 5 MiB each; PNG, JPEG, GIF, or WebP.",
File without changes
File without changes