ellipsis-dev 0.43.0__tar.gz → 0.44.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.43.0
3
+ Version: 0.44.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.43.0"
7
+ version = "0.44.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"
@@ -2072,6 +2072,42 @@ class _SyncSessions(SyncSessionsSugar):
2072
2072
  assert response is not None
2073
2073
  return response
2074
2074
 
2075
+ def proxy(
2076
+ self,
2077
+ id: str,
2078
+ *,
2079
+ limit: Union[int, None] = None,
2080
+ cursor: Union[str, None] = None,
2081
+ ) -> SyncPage[models.ProxyRequest, models.SessionProxyResponse]:
2082
+ """Get Session Proxy
2083
+
2084
+ The requests the session's environment sent to GitHub through
2085
+ Ellipsis, newest first. Each is one `proxy_requests` row as stored.
2086
+
2087
+ Required permissions: read:sessions.
2088
+ API key: Supported.
2089
+ CLI user token: Supported.
2090
+ Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
2091
+ Higher permission levels include lower levels: read < write < delete.
2092
+ Grant match patterns can further restrict access to individual resources.
2093
+ """
2094
+ path = f"/v1/sessions/{_quote(id)}/proxy"
2095
+ query = build_query(
2096
+ {
2097
+ "limit": limit,
2098
+ "cursor": cursor,
2099
+ }
2100
+ )
2101
+ response = self._transport.request(
2102
+ "GET", path, response_model=models.SessionProxyResponse, query=query
2103
+ )
2104
+ assert response is not None
2105
+ return SyncPage(
2106
+ response,
2107
+ "proxy_requests",
2108
+ lambda _cursor: self.proxy(id=id, limit=limit, cursor=_cursor),
2109
+ )
2110
+
2075
2111
  def records(
2076
2112
  self,
2077
2113
  id: str,
@@ -5020,6 +5056,42 @@ class _AsyncSessions(AsyncSessionsSugar):
5020
5056
  assert response is not None
5021
5057
  return response
5022
5058
 
5059
+ async def proxy(
5060
+ self,
5061
+ id: str,
5062
+ *,
5063
+ limit: Union[int, None] = None,
5064
+ cursor: Union[str, None] = None,
5065
+ ) -> AsyncPage[models.ProxyRequest, models.SessionProxyResponse]:
5066
+ """Get Session Proxy
5067
+
5068
+ The requests the session's environment sent to GitHub through
5069
+ Ellipsis, newest first. Each is one `proxy_requests` row as stored.
5070
+
5071
+ Required permissions: read:sessions.
5072
+ API key: Supported.
5073
+ CLI user token: Supported.
5074
+ Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
5075
+ Higher permission levels include lower levels: read < write < delete.
5076
+ Grant match patterns can further restrict access to individual resources.
5077
+ """
5078
+ path = f"/v1/sessions/{_quote(id)}/proxy"
5079
+ query = build_query(
5080
+ {
5081
+ "limit": limit,
5082
+ "cursor": cursor,
5083
+ }
5084
+ )
5085
+ response = await self._transport.request(
5086
+ "GET", path, response_model=models.SessionProxyResponse, query=query
5087
+ )
5088
+ assert response is not None
5089
+ return AsyncPage(
5090
+ response,
5091
+ "proxy_requests",
5092
+ lambda _cursor: self.proxy(id=id, limit=limit, cursor=_cursor),
5093
+ )
5094
+
5023
5095
  async def records(
5024
5096
  self,
5025
5097
  id: str,
@@ -70,6 +70,8 @@ CustomerAuditLogEventType = Literal[
70
70
  "credit_granted",
71
71
  "refund_issued",
72
72
  "auto_recharge_updated",
73
+ "platform_fee_updated",
74
+ "github_proxy_updated",
73
75
  ]
74
76
 
75
77
 
@@ -615,17 +617,6 @@ class CodexConfig_Output(EllipsisModel):
615
617
  )
616
618
 
617
619
 
618
- class Duration_Output(EllipsisModel):
619
- """A duration as explicit units, summed. Set any of `hours`/`minutes`/
620
- `seconds` (at least one). The alternative to the `30m`-style shorthand
621
- string wherever a duration is accepted.
622
- """
623
-
624
- hours: Union[int, None]
625
- minutes: Union[int, None]
626
- seconds: Union[int, None]
627
-
628
-
629
620
  class MemorySize_Output(EllipsisModel):
630
621
  """A memory size as explicit units, summed (binary: 1GB = 1024MB = 1024MiB).
631
622
  Set any of `gb`/`mb` (at least one). The alternative to the `8GB`-style
@@ -637,29 +628,27 @@ class MemorySize_Output(EllipsisModel):
637
628
 
638
629
 
639
630
  class ComputeConfig_Output(EllipsisModel):
640
- """Environment compute sizing. Every field is optional; an omitted field
641
- inherits the platform default (2 vCPU / 4096 MiB / 3600s). A resolved value
642
- outside the platform bounds fails validation loudly (a sync error on the
643
- config) rather than being clamped silently.
644
-
645
- `memory` and `timeout` each accept a shorthand string ("8GB", "30m") or an
646
- explicit units object ({gb: 8}, {minutes: 30}); the `memory_mib` /
647
- `timeout_seconds` properties resolve either form to the canonical integer
648
- the environment is sized with.
649
-
650
- `timeout` is the max wall-clock the agent may run in one environment before
651
- it is stopped, capped at 1h (equal to the default, so today the knob only
652
- shortens a session; the cap matches the 1-hour validity of the session's
653
- GitHub token).
654
-
655
- Compute currently uses a temporary flat one-cent amount each time an
656
- environment is started for a session, subject to the account's existing
657
- free-compute exemptions.
631
+ """The size and lifetime of the environment. Every field is optional. An
632
+ omitted field takes the platform default (2 vCPUs, 4096 MiB, a 4h timeout,
633
+ 10m idle). A value outside the platform bounds fails validation.
634
+
635
+ `memory` accepts a string such as `8GB` or an object such as `{gb: 8}`.
636
+ `timeout` and `idle` accept a duration string such as `30m`, `8h`, or
637
+ `1h30m`.
638
+
639
+ `timeout` is the longest one message's work may run before it is stopped,
640
+ 1m to 22h, default 4h. The message ends `stopped` with reason `timeout`.
641
+
642
+ `idle` is how long the environment stays awake after the agent finishes
643
+ with no message waiting, 10s to 1h, default 10m. Then it pauses, and the
644
+ next message resumes it. Only an interactive session pauses. A session
645
+ that runs once ends when its message ends.
658
646
  """
659
647
 
660
648
  cpu: Union[int, None]
649
+ idle: Union[str, None]
661
650
  memory: Union[str, MemorySize_Output, None]
662
- timeout: Union[str, Duration_Output, None]
651
+ timeout: Union[str, None]
663
652
 
664
653
 
665
654
  class EnvironmentBaseBuild_Output(EllipsisModel):
@@ -1428,17 +1417,6 @@ class CodexConfig_Input(EllipsisModel):
1428
1417
  )
1429
1418
 
1430
1419
 
1431
- class Duration_Input(EllipsisModel):
1432
- """A duration as explicit units, summed. Set any of `hours`/`minutes`/
1433
- `seconds` (at least one). The alternative to the `30m`-style shorthand
1434
- string wherever a duration is accepted.
1435
- """
1436
-
1437
- hours: Union[int, None] = None
1438
- minutes: Union[int, None] = None
1439
- seconds: Union[int, None] = None
1440
-
1441
-
1442
1420
  class MemorySize_Input(EllipsisModel):
1443
1421
  """A memory size as explicit units, summed (binary: 1GB = 1024MB = 1024MiB).
1444
1422
  Set any of `gb`/`mb` (at least one). The alternative to the `8GB`-style
@@ -1450,29 +1428,27 @@ class MemorySize_Input(EllipsisModel):
1450
1428
 
1451
1429
 
1452
1430
  class ComputeConfig_Input(EllipsisModel):
1453
- """Environment compute sizing. Every field is optional; an omitted field
1454
- inherits the platform default (2 vCPU / 4096 MiB / 3600s). A resolved value
1455
- outside the platform bounds fails validation loudly (a sync error on the
1456
- config) rather than being clamped silently.
1457
-
1458
- `memory` and `timeout` each accept a shorthand string ("8GB", "30m") or an
1459
- explicit units object ({gb: 8}, {minutes: 30}); the `memory_mib` /
1460
- `timeout_seconds` properties resolve either form to the canonical integer
1461
- the environment is sized with.
1462
-
1463
- `timeout` is the max wall-clock the agent may run in one environment before
1464
- it is stopped, capped at 1h (equal to the default, so today the knob only
1465
- shortens a session; the cap matches the 1-hour validity of the session's
1466
- GitHub token).
1467
-
1468
- Compute currently uses a temporary flat one-cent amount each time an
1469
- environment is started for a session, subject to the account's existing
1470
- free-compute exemptions.
1431
+ """The size and lifetime of the environment. Every field is optional. An
1432
+ omitted field takes the platform default (2 vCPUs, 4096 MiB, a 4h timeout,
1433
+ 10m idle). A value outside the platform bounds fails validation.
1434
+
1435
+ `memory` accepts a string such as `8GB` or an object such as `{gb: 8}`.
1436
+ `timeout` and `idle` accept a duration string such as `30m`, `8h`, or
1437
+ `1h30m`.
1438
+
1439
+ `timeout` is the longest one message's work may run before it is stopped,
1440
+ 1m to 22h, default 4h. The message ends `stopped` with reason `timeout`.
1441
+
1442
+ `idle` is how long the environment stays awake after the agent finishes
1443
+ with no message waiting, 10s to 1h, default 10m. Then it pauses, and the
1444
+ next message resumes it. Only an interactive session pauses. A session
1445
+ that runs once ends when its message ends.
1471
1446
  """
1472
1447
 
1473
1448
  cpu: Union[int, None] = None
1449
+ idle: Union[str, None] = None
1474
1450
  memory: Union[str, MemorySize_Input, None] = None
1475
- timeout: Union[str, Duration_Input, None] = None
1451
+ timeout: Union[str, None] = None
1476
1452
 
1477
1453
 
1478
1454
  class EnvironmentBaseBuild_Input(EllipsisModel):
@@ -3545,6 +3521,7 @@ ErrorReason = Literal[
3545
3521
  "execution_disabled",
3546
3522
  "interrupted",
3547
3523
  "stopped",
3524
+ "timeout",
3548
3525
  ]
3549
3526
  """Why a message failed, was stopped, or was cancelled."""
3550
3527
 
@@ -4965,6 +4942,42 @@ PromptBlockedReason = Literal[
4965
4942
  """Why direct prompting is refused. Absent when prompting is allowed."""
4966
4943
 
4967
4944
 
4945
+ class ProxyRequest(EllipsisModel):
4946
+ """One request an environment sent through Ellipsis to GitHub, as the
4947
+ proxy recorded it.
4948
+ """
4949
+
4950
+ connection: str = Field(description="Where it went. `github` today.")
4951
+ created_at: datetime = Field(description="When the request ended.")
4952
+ customer_id: Union[str, None] = Field(default=None, description="The account.")
4953
+ duration_ms: int = Field(description="Milliseconds from arrival to the end.")
4954
+ id: str
4955
+ method: str = Field(description="The HTTP method as the environment sent it.")
4956
+ path: str = Field(description="The path as the environment sent it.")
4957
+ reason: Union[str, None] = Field(
4958
+ default=None,
4959
+ description="Why Ellipsis answered itself or the transfer ended early, null when GitHub answered in full.",
4960
+ )
4961
+ request_bytes: Union[int, None] = Field(
4962
+ default=None, description="Body bytes sent, null when none was read."
4963
+ )
4964
+ response_bytes: Union[int, None] = Field(
4965
+ default=None,
4966
+ description="Body bytes received, null when nothing was forwarded.",
4967
+ )
4968
+ sandbox_id: Union[str, None] = Field(
4969
+ default=None,
4970
+ description="The environment that sent it, the id `GET /v1/vms/{id}` reads.",
4971
+ )
4972
+ status_code: Union[int, None] = Field(
4973
+ default=None, description="The status the environment received."
4974
+ )
4975
+ upstream_host: Union[str, None] = Field(
4976
+ default=None,
4977
+ description="The host Ellipsis forwarded it to, null when Ellipsis answered itself.",
4978
+ )
4979
+
4980
+
4968
4981
  class PullRequestBranch(EllipsisModel):
4969
4982
  """One side of a pull request, a branch and the commit it pointed at."""
4970
4983
 
@@ -5754,6 +5767,17 @@ class SessionMessageResponse(EllipsisModel):
5754
5767
  )
5755
5768
 
5756
5769
 
5770
+ class SessionProxyResponse(EllipsisModel):
5771
+ has_more: bool = Field(
5772
+ default=False, description="Whether more results exist past this page."
5773
+ )
5774
+ next_cursor: Union[str, None] = Field(
5775
+ default=None,
5776
+ description="Pass as `cursor` to fetch the next page. Null on the last page. Opaque — echo it back rather than parsing it.",
5777
+ )
5778
+ proxy_requests: list[ProxyRequest]
5779
+
5780
+
5757
5781
  class UnknownSessionRecord(EllipsisRecord):
5758
5782
  """Unrecognized or unparseable payload; the complete original stays readable."""
5759
5783
 
@@ -6447,8 +6471,6 @@ __all__ = [
6447
6471
  "DeveloperBudgetWindow",
6448
6472
  "DeveloperBudgets",
6449
6473
  "DeveloperUsage",
6450
- "Duration_Input",
6451
- "Duration_Output",
6452
6474
  "EffortLevel",
6453
6475
  "EllipsisGrant_Input",
6454
6476
  "EllipsisGrant_Output",
@@ -6616,6 +6638,7 @@ __all__ = [
6616
6638
  "PlatformSessionRecord",
6617
6639
  "PollCliAuthResponse",
6618
6640
  "PromptBlockedReason",
6641
+ "ProxyRequest",
6619
6642
  "PublicFeeSchedule",
6620
6643
  "PullRequest",
6621
6644
  "PullRequestAction",
@@ -6731,6 +6754,7 @@ __all__ = [
6731
6754
  "SessionParent",
6732
6755
  "SessionPrEntry",
6733
6756
  "SessionPrompting",
6757
+ "SessionProxyResponse",
6734
6758
  "SessionPullRequestReview",
6735
6759
  "SessionRecord",
6736
6760
  "SessionRecordsListResponse",
File without changes
File without changes