evolvingmachines-evolve 0.0.61__tar.gz → 0.0.61.dev1450__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.
- {evolvingmachines_evolve-0.0.61/evolvingmachines_evolve.egg-info → evolvingmachines_evolve-0.0.61.dev1450}/PKG-INFO +1 -1
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/__init__.py +15 -1
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/config.py +7 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/hosted.py +288 -10
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450/evolvingmachines_evolve.egg-info}/PKG-INFO +1 -1
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/pyproject.toml +1 -1
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/LICENSE +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/MANIFEST.in +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/README.md +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/bridge/__init__.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/bridge/dist/bridge.bundle.cjs +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/_http.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/agent.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/bridge.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/browser_credentials.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/browser_profiles.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/integrations.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/managed_secrets.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/pipeline/__init__.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/pipeline/pipeline.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/pipeline/types.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/prompts/__init__.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/prompts/agent_md/judge.md +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/prompts/agent_md/reduce.md +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/prompts/agent_md/verify.md +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/prompts/user/judge.md +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/prompts/user/retry_feedback.md +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/prompts/user/verify.md +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/py.typed +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/results.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/retry.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/sandbox_view.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/schema.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/sessions_client.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/storage_client.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/swarm/__init__.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/swarm/results.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/swarm/swarm.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/swarm/types.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/utils.py +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolvingmachines_evolve.egg-info/SOURCES.txt +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolvingmachines_evolve.egg-info/dependency_links.txt +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolvingmachines_evolve.egg-info/requires.txt +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolvingmachines_evolve.egg-info/top_level.txt +0 -0
- {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/setup.cfg +0 -0
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/__init__.py
RENAMED
|
@@ -70,6 +70,10 @@ from .hosted import (
|
|
|
70
70
|
AuthStatus,
|
|
71
71
|
Organization,
|
|
72
72
|
OrganizationDetail,
|
|
73
|
+
OrgInvite,
|
|
74
|
+
OrgInviteCreated,
|
|
75
|
+
OrgJoined,
|
|
76
|
+
OrgMember,
|
|
73
77
|
OrgQuota,
|
|
74
78
|
OrgRole,
|
|
75
79
|
OrgUsage,
|
|
@@ -133,6 +137,9 @@ from .hosted import (
|
|
|
133
137
|
JobBuildExclusion,
|
|
134
138
|
JobCounts,
|
|
135
139
|
JobDeleteResult,
|
|
140
|
+
JobShareEmail,
|
|
141
|
+
JobShareLink,
|
|
142
|
+
JobShares,
|
|
136
143
|
JobEvent,
|
|
137
144
|
JobEventType,
|
|
138
145
|
InfraFailureSignature,
|
|
@@ -534,7 +541,7 @@ async def list_checkpoints(
|
|
|
534
541
|
await store.close()
|
|
535
542
|
|
|
536
543
|
|
|
537
|
-
__version__ = '0.0.61'
|
|
544
|
+
__version__ = '0.0.61.dev1450'
|
|
538
545
|
|
|
539
546
|
__all__ = [
|
|
540
547
|
# Main classes
|
|
@@ -658,6 +665,9 @@ __all__ = [
|
|
|
658
665
|
'JobBuildExclusion',
|
|
659
666
|
'JobCounts',
|
|
660
667
|
'JobDeleteResult',
|
|
668
|
+
'JobShareEmail',
|
|
669
|
+
'JobShareLink',
|
|
670
|
+
'JobShares',
|
|
661
671
|
'JobFailure',
|
|
662
672
|
'JobRetryConfig',
|
|
663
673
|
'JobRetryConfigInput',
|
|
@@ -771,6 +781,10 @@ __all__ = [
|
|
|
771
781
|
'AuthStatus',
|
|
772
782
|
'Organization',
|
|
773
783
|
'OrganizationDetail',
|
|
784
|
+
'OrgInvite',
|
|
785
|
+
'OrgInviteCreated',
|
|
786
|
+
'OrgJoined',
|
|
787
|
+
'OrgMember',
|
|
774
788
|
'OrgQuota',
|
|
775
789
|
'OrgRole',
|
|
776
790
|
'OrgUsage',
|
|
@@ -91,9 +91,14 @@ class HostedClientConfig:
|
|
|
91
91
|
Args:
|
|
92
92
|
api_key: Evolve API key override (default: EVOLVE_API_KEY)
|
|
93
93
|
base_url: API base URL override (default: the Evolve dashboard API)
|
|
94
|
+
org: The organization (slug or id) a job or a published dataset
|
|
95
|
+
lands in when the call names none — the client-level default. A
|
|
96
|
+
call's own ``org`` always wins; with neither, the caller's
|
|
97
|
+
personal org.
|
|
94
98
|
"""
|
|
95
99
|
api_key: Optional[str] = None
|
|
96
100
|
base_url: Optional[str] = None
|
|
101
|
+
org: Optional[str] = None
|
|
97
102
|
|
|
98
103
|
def to_dict(self) -> Dict[str, Any]:
|
|
99
104
|
result: Dict[str, Any] = {}
|
|
@@ -101,6 +106,8 @@ class HostedClientConfig:
|
|
|
101
106
|
result['api_key'] = self.api_key
|
|
102
107
|
if self.base_url:
|
|
103
108
|
result['base_url'] = self.base_url
|
|
109
|
+
if self.org:
|
|
110
|
+
result['org'] = self.org
|
|
104
111
|
return result
|
|
105
112
|
|
|
106
113
|
|
|
@@ -1345,6 +1345,37 @@ class JobDeleteResult:
|
|
|
1345
1345
|
analyses_deleted: int
|
|
1346
1346
|
|
|
1347
1347
|
|
|
1348
|
+
@dataclass
|
|
1349
|
+
class JobShareEmail:
|
|
1350
|
+
"""One email share of a job."""
|
|
1351
|
+
#: The shared address, lowercased.
|
|
1352
|
+
email: str
|
|
1353
|
+
#: The email of the account that granted the share.
|
|
1354
|
+
shared_by: str
|
|
1355
|
+
created_at: str
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
@dataclass
|
|
1359
|
+
class JobShareLink:
|
|
1360
|
+
"""The job's link state; ``url`` is set exactly while the link is enabled
|
|
1361
|
+
(the owner can always copy it again)."""
|
|
1362
|
+
enabled: bool
|
|
1363
|
+
url: Optional[str] = None
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
@dataclass
|
|
1367
|
+
class JobShares:
|
|
1368
|
+
"""A job's whole share state — the answer of ``GET /api/jobs/{jobId}/shares``
|
|
1369
|
+
and of both verbs that change it (``share`` / ``unshare``).
|
|
1370
|
+
|
|
1371
|
+
``visibility`` is ``'PRIVATE'`` or ``'LINK'`` (an unlisted link reaches
|
|
1372
|
+
the job); there is no PUBLIC. ``emails`` are the email shares.
|
|
1373
|
+
"""
|
|
1374
|
+
visibility: str
|
|
1375
|
+
link: JobShareLink
|
|
1376
|
+
emails: List[JobShareEmail] = field(default_factory=list)
|
|
1377
|
+
|
|
1378
|
+
|
|
1348
1379
|
@dataclass
|
|
1349
1380
|
class SourceJob:
|
|
1350
1381
|
"""Provenance of a derived job.
|
|
@@ -2030,6 +2061,10 @@ class Check(TypedDict):
|
|
|
2030
2061
|
exclude_task_names: List[str]
|
|
2031
2062
|
#: Harbor's -l/--n-tasks as stored; None = no cap.
|
|
2032
2063
|
n_tasks: Optional[int]
|
|
2064
|
+
#: ``'PRIVATE'``, or ``'LINK'`` when an unlisted share link reaches the check
|
|
2065
|
+
#: (``checks().share(id, link=True)``). Email shares are not a visibility:
|
|
2066
|
+
#: ``checks().shares(id)`` lists them. A server older than the field reads as ``'PRIVATE'``.
|
|
2067
|
+
visibility: str
|
|
2033
2068
|
#: One entry per task directory checked, sorted by task name.
|
|
2034
2069
|
results: List[TaskCheck]
|
|
2035
2070
|
cost_usd: Optional[float]
|
|
@@ -2200,6 +2235,15 @@ class Job:
|
|
|
2200
2235
|
updated_at: str
|
|
2201
2236
|
#: None while the job is live.
|
|
2202
2237
|
finished_at: Optional[str]
|
|
2238
|
+
#: The owning organization's slug — the ``org`` named at create, else the
|
|
2239
|
+
#: creator's personal org. None only on a regrade job whose source job
|
|
2240
|
+
#: has been deleted, or from a server older than the field.
|
|
2241
|
+
org: Optional[str] = field(default=None, kw_only=True)
|
|
2242
|
+
#: ``'PRIVATE'``, or ``'LINK'`` when an unlisted share link reaches the job
|
|
2243
|
+
#: (``jobs().share(id, link=True)``). Email shares are not a visibility:
|
|
2244
|
+
#: ``jobs().shares(id)`` lists them. Always ``'PRIVATE'`` on a regrade job;
|
|
2245
|
+
#: a server older than the field reads as ``'PRIVATE'``.
|
|
2246
|
+
visibility: str = field(default='PRIVATE', kw_only=True)
|
|
2203
2247
|
|
|
2204
2248
|
|
|
2205
2249
|
@dataclass
|
|
@@ -3427,6 +3471,46 @@ class OrganizationDetail(Organization):
|
|
|
3427
3471
|
usage: OrgUsage = field(kw_only=True)
|
|
3428
3472
|
|
|
3429
3473
|
|
|
3474
|
+
@dataclass
|
|
3475
|
+
class OrgMember:
|
|
3476
|
+
"""One member of an organization (``GET /api/orgs/{org}/members`` item)."""
|
|
3477
|
+
user_id: str
|
|
3478
|
+
email: str
|
|
3479
|
+
role: OrgRole
|
|
3480
|
+
joined_at: str
|
|
3481
|
+
|
|
3482
|
+
|
|
3483
|
+
@dataclass
|
|
3484
|
+
class OrgInvite:
|
|
3485
|
+
"""An invite link's descriptor — the token itself is returned once, at creation."""
|
|
3486
|
+
invite_id: str
|
|
3487
|
+
#: None = never expires.
|
|
3488
|
+
expires_at: Optional[str]
|
|
3489
|
+
#: None = unlimited uses.
|
|
3490
|
+
max_uses: Optional[int]
|
|
3491
|
+
#: Accepted joins so far.
|
|
3492
|
+
uses: int
|
|
3493
|
+
revoked_at: Optional[str]
|
|
3494
|
+
created_at: str
|
|
3495
|
+
|
|
3496
|
+
|
|
3497
|
+
@dataclass
|
|
3498
|
+
class OrgInviteCreated(OrgInvite):
|
|
3499
|
+
"""A freshly minted invite: the descriptor plus its one-time token
|
|
3500
|
+
(``POST /api/orgs/{org}/invites``)."""
|
|
3501
|
+
#: The invite link's credential, returned ONCE — whoever presents it while
|
|
3502
|
+
#: signed in joins as member.
|
|
3503
|
+
token: str = field(kw_only=True)
|
|
3504
|
+
|
|
3505
|
+
|
|
3506
|
+
@dataclass
|
|
3507
|
+
class OrgJoined:
|
|
3508
|
+
"""The answer to redeeming an invite token (``POST /api/orgs/invites/accept``)."""
|
|
3509
|
+
org: Organization
|
|
3510
|
+
#: True when the caller was already a member (no use of the link consumed).
|
|
3511
|
+
already_member: bool
|
|
3512
|
+
|
|
3513
|
+
|
|
3430
3514
|
# The ONE page envelope, on every collection this surface returns — top level
|
|
3431
3515
|
# or nested. ``next_cursor`` means one thing everywhere: pass it back as
|
|
3432
3516
|
# ``cursor=`` for the next page, and None means there is no next page. It never
|
|
@@ -4315,6 +4399,30 @@ def _map_job(data: Dict[str, Any]) -> Job:
|
|
|
4315
4399
|
started_at=data.get('started_at', ''),
|
|
4316
4400
|
updated_at=data.get('updated_at', ''),
|
|
4317
4401
|
finished_at=data.get('finished_at'),
|
|
4402
|
+
org=data['org'] if isinstance(data.get('org'), str) else None,
|
|
4403
|
+
visibility='LINK' if data.get('visibility') == 'LINK' else 'PRIVATE',
|
|
4404
|
+
)
|
|
4405
|
+
|
|
4406
|
+
|
|
4407
|
+
def _map_job_shares(data: Dict[str, Any]) -> JobShares:
|
|
4408
|
+
"""The wire's JobShares, read in the same tolerant shape every required
|
|
4409
|
+
field here uses."""
|
|
4410
|
+
link = data.get('link') if isinstance(data.get('link'), dict) else {}
|
|
4411
|
+
return JobShares(
|
|
4412
|
+
visibility='LINK' if data.get('visibility') == 'LINK' else 'PRIVATE',
|
|
4413
|
+
link=JobShareLink(
|
|
4414
|
+
enabled=link.get('enabled') is True,
|
|
4415
|
+
url=link['url'] if isinstance(link.get('url'), str) else None,
|
|
4416
|
+
),
|
|
4417
|
+
emails=[
|
|
4418
|
+
JobShareEmail(
|
|
4419
|
+
email=str(entry.get('email', '')),
|
|
4420
|
+
shared_by=str(entry.get('shared_by', '')),
|
|
4421
|
+
created_at=str(entry.get('created_at', '')),
|
|
4422
|
+
)
|
|
4423
|
+
for entry in (data.get('emails') or [])
|
|
4424
|
+
if isinstance(entry, dict)
|
|
4425
|
+
],
|
|
4318
4426
|
)
|
|
4319
4427
|
|
|
4320
4428
|
|
|
@@ -4358,6 +4466,27 @@ def _map_organization(data: Dict[str, Any]) -> Organization:
|
|
|
4358
4466
|
)
|
|
4359
4467
|
|
|
4360
4468
|
|
|
4469
|
+
def _map_org_member(data: Dict[str, Any]) -> OrgMember:
|
|
4470
|
+
return OrgMember(
|
|
4471
|
+
user_id=data.get('user_id', ''),
|
|
4472
|
+
email=data.get('email', ''),
|
|
4473
|
+
role='owner' if data.get('role') == 'owner' else 'member',
|
|
4474
|
+
joined_at=data.get('joined_at', ''),
|
|
4475
|
+
)
|
|
4476
|
+
|
|
4477
|
+
|
|
4478
|
+
def _map_org_invite_created(data: Dict[str, Any]) -> OrgInviteCreated:
|
|
4479
|
+
return OrgInviteCreated(
|
|
4480
|
+
invite_id=data.get('invite_id', ''),
|
|
4481
|
+
expires_at=data['expires_at'] if isinstance(data.get('expires_at'), str) else None,
|
|
4482
|
+
max_uses=data['max_uses'] if isinstance(data.get('max_uses'), int) else None,
|
|
4483
|
+
uses=int(data.get('uses', 0)),
|
|
4484
|
+
revoked_at=data['revoked_at'] if isinstance(data.get('revoked_at'), str) else None,
|
|
4485
|
+
created_at=data.get('created_at', ''),
|
|
4486
|
+
token=data.get('token', ''),
|
|
4487
|
+
)
|
|
4488
|
+
|
|
4489
|
+
|
|
4361
4490
|
def _map_organization_detail(data: Dict[str, Any]) -> OrganizationDetail:
|
|
4362
4491
|
def count(source: Dict[str, Any], key: str) -> int:
|
|
4363
4492
|
value = source.get(key)
|
|
@@ -4463,7 +4592,12 @@ def _map_check(data: Any) -> Check:
|
|
|
4463
4592
|
results = data.get('results')
|
|
4464
4593
|
return cast(
|
|
4465
4594
|
Check,
|
|
4466
|
-
{
|
|
4595
|
+
{
|
|
4596
|
+
**data,
|
|
4597
|
+
# The share link's switch; an older server that sends none reads as PRIVATE (_map_job's rule).
|
|
4598
|
+
'visibility': 'LINK' if data.get('visibility') == 'LINK' else 'PRIVATE',
|
|
4599
|
+
'results': [row for row in results if isinstance(row, dict)] if isinstance(results, list) else [],
|
|
4600
|
+
},
|
|
4467
4601
|
)
|
|
4468
4602
|
|
|
4469
4603
|
|
|
@@ -5206,6 +5340,10 @@ class _HostedHttp:
|
|
|
5206
5340
|
or DEFAULT_BASE_URL
|
|
5207
5341
|
).rstrip('/')
|
|
5208
5342
|
|
|
5343
|
+
def default_org(self) -> Optional[str]:
|
|
5344
|
+
"""The client-level org default (``HostedClientConfig.org``); None = personal."""
|
|
5345
|
+
return self._config.org or None
|
|
5346
|
+
|
|
5209
5347
|
def api_key(self) -> str:
|
|
5210
5348
|
api_key = self._config.api_key or os.environ.get('EVOLVE_API_KEY')
|
|
5211
5349
|
if not api_key:
|
|
@@ -6364,6 +6502,7 @@ class DatasetsClient:
|
|
|
6364
6502
|
hub_package: Optional[str] = None,
|
|
6365
6503
|
name: Optional[str] = None,
|
|
6366
6504
|
version: Optional[str] = None,
|
|
6505
|
+
org: Optional[str] = None,
|
|
6367
6506
|
on_upload_progress: Optional[Callable[[int, int], None]] = None,
|
|
6368
6507
|
on_registered: Optional[Callable[[str], None]] = None,
|
|
6369
6508
|
) -> DatasetImport:
|
|
@@ -6438,6 +6577,9 @@ class DatasetsClient:
|
|
|
6438
6577
|
'publish() takes EXACTLY ONE source: git_url=... + git_ref=..., '
|
|
6439
6578
|
'directory=..., archive_url=..., or hub_package=...'
|
|
6440
6579
|
)
|
|
6580
|
+
# The call's own org wins; the client default fills an absent one;
|
|
6581
|
+
# neither = no part, and the server's personal-org default applies.
|
|
6582
|
+
owning_org = org if org is not None else self._http.default_org()
|
|
6441
6583
|
if archive_url is not None:
|
|
6442
6584
|
if name is None or version is None:
|
|
6443
6585
|
raise ValueError(
|
|
@@ -6446,7 +6588,7 @@ class DatasetsClient:
|
|
|
6446
6588
|
'is accepted, so a manifest cannot supply them'
|
|
6447
6589
|
)
|
|
6448
6590
|
body, content_type = _multipart_body(
|
|
6449
|
-
{'name': name, 'version': version, 'archive_url': archive_url}
|
|
6591
|
+
{'name': name, 'version': version, 'archive_url': archive_url, 'org': owning_org}
|
|
6450
6592
|
)
|
|
6451
6593
|
raw = await self._http.request_upload(
|
|
6452
6594
|
'/api/datasets/publish', body, {'Content-Type': content_type}
|
|
@@ -6460,6 +6602,7 @@ class DatasetsClient:
|
|
|
6460
6602
|
fields['name'] = name
|
|
6461
6603
|
if version is not None:
|
|
6462
6604
|
fields['version'] = version
|
|
6605
|
+
fields['org'] = owning_org
|
|
6463
6606
|
body, content_type = _multipart_body(fields)
|
|
6464
6607
|
raw = await self._http.request_upload(
|
|
6465
6608
|
'/api/datasets/publish', body, {'Content-Type': content_type}
|
|
@@ -6485,7 +6628,7 @@ class DatasetsClient:
|
|
|
6485
6628
|
raw = await _upload_directory_archive(
|
|
6486
6629
|
self._http,
|
|
6487
6630
|
'/api/datasets/publish',
|
|
6488
|
-
{'name': name, 'version': version},
|
|
6631
|
+
{'name': name, 'version': version, 'org': owning_org},
|
|
6489
6632
|
directory,
|
|
6490
6633
|
'corpus.tar.gz',
|
|
6491
6634
|
resumable_over=RESUMABLE_UPLOAD_THRESHOLD_BYTES,
|
|
@@ -6506,6 +6649,7 @@ class DatasetsClient:
|
|
|
6506
6649
|
'version': version,
|
|
6507
6650
|
'git_url': git_url,
|
|
6508
6651
|
'git_ref': git_ref,
|
|
6652
|
+
'org': owning_org,
|
|
6509
6653
|
}
|
|
6510
6654
|
# Only when narrowing to a subfolder: an absent part means "the
|
|
6511
6655
|
# repository root", and an empty part would be refused.
|
|
@@ -7285,6 +7429,7 @@ class JobsClient:
|
|
|
7285
7429
|
datasets: List[Union[DatasetSelector, Dict[str, Any]]],
|
|
7286
7430
|
agents: List[Union[AgentArm, Dict[str, Any]]],
|
|
7287
7431
|
job_name: Optional[str] = None,
|
|
7432
|
+
org: Optional[str] = None,
|
|
7288
7433
|
n_attempts: Optional[int] = None,
|
|
7289
7434
|
n_concurrent_trials: Optional[int] = None,
|
|
7290
7435
|
max_trial_spend_usd: Optional[float] = None,
|
|
@@ -7400,6 +7545,11 @@ class JobsClient:
|
|
|
7400
7545
|
body: Dict[str, Any] = {}
|
|
7401
7546
|
if job_name is not None:
|
|
7402
7547
|
body['job_name'] = job_name
|
|
7548
|
+
# The call's own org wins; the client default fills an absent one;
|
|
7549
|
+
# neither = no key, and the server's personal-org default applies.
|
|
7550
|
+
owning_org = org if org is not None else self._http.default_org()
|
|
7551
|
+
if owning_org is not None:
|
|
7552
|
+
body['org'] = owning_org
|
|
7403
7553
|
body['datasets'] = [
|
|
7404
7554
|
(item if isinstance(item, DatasetSelector) else DatasetSelector(**item))._to_wire()
|
|
7405
7555
|
for item in datasets
|
|
@@ -8329,6 +8479,57 @@ class JobsClient:
|
|
|
8329
8479
|
)
|
|
8330
8480
|
return _map_job_delete_result(raw)
|
|
8331
8481
|
|
|
8482
|
+
async def share(
|
|
8483
|
+
self, id: str, *, link: bool = False, emails: Optional[List[str]] = None
|
|
8484
|
+
) -> JobShares:
|
|
8485
|
+
"""Share a job you created — by link, by email, or both (Harbor's
|
|
8486
|
+
``harbor job share``; the platform shares a person by email address
|
|
8487
|
+
and never makes a job public: ``link=True`` mints an UNLISTED link
|
|
8488
|
+
instead, the same link on every later call).
|
|
8489
|
+
|
|
8490
|
+
Each new address is emailed a link to the run; an address with no
|
|
8491
|
+
account gets a sign-up link for exactly that address (no gateway
|
|
8492
|
+
credits), while an address already on the waitlist or holding an
|
|
8493
|
+
invite gets the email without a sign-up link and uses that invite
|
|
8494
|
+
instead. An email share reads the job and lists it under
|
|
8495
|
+
``scope='shared'``; it never operates it. Creator-only: an org
|
|
8496
|
+
member is refused ``org_forbidden`` (403), a stranger sees 404; a
|
|
8497
|
+
regrade job id is 404. The answer is the job's whole share state.
|
|
8498
|
+
"""
|
|
8499
|
+
body: Dict[str, Any] = {}
|
|
8500
|
+
if link:
|
|
8501
|
+
body['link'] = True
|
|
8502
|
+
if emails:
|
|
8503
|
+
body['emails'] = list(emails)
|
|
8504
|
+
raw = await self._http.request_json(
|
|
8505
|
+
f'/api/jobs/{urllib.parse.quote(id)}/share', method='POST', body=body
|
|
8506
|
+
)
|
|
8507
|
+
return _map_job_shares(raw)
|
|
8508
|
+
|
|
8509
|
+
async def unshare(
|
|
8510
|
+
self, id: str, *, link: bool = False, emails: Optional[List[str]] = None
|
|
8511
|
+
) -> JobShares:
|
|
8512
|
+
"""Revoke a job's link (``link=True`` — the old link is dead at once; a
|
|
8513
|
+
later ``share`` mints a new one) and/or email shares (``emails``).
|
|
8514
|
+
Idempotent; creator-only like ``share``.
|
|
8515
|
+
"""
|
|
8516
|
+
body: Dict[str, Any] = {}
|
|
8517
|
+
if link:
|
|
8518
|
+
body['link'] = True
|
|
8519
|
+
if emails:
|
|
8520
|
+
body['emails'] = list(emails)
|
|
8521
|
+
raw = await self._http.request_json(
|
|
8522
|
+
f'/api/jobs/{urllib.parse.quote(id)}/unshare', method='POST', body=body
|
|
8523
|
+
)
|
|
8524
|
+
return _map_job_shares(raw)
|
|
8525
|
+
|
|
8526
|
+
async def shares(self, id: str) -> JobShares:
|
|
8527
|
+
"""The job's share state (Harbor's ``harbor hub job shares``): its
|
|
8528
|
+
visibility, the link with its URL while enabled, and every email
|
|
8529
|
+
share. Creator-only."""
|
|
8530
|
+
raw = await self._http.request_json(f'/api/jobs/{urllib.parse.quote(id)}/shares')
|
|
8531
|
+
return _map_job_shares(raw)
|
|
8532
|
+
|
|
8332
8533
|
async def grep(
|
|
8333
8534
|
self,
|
|
8334
8535
|
id: str,
|
|
@@ -9431,6 +9632,48 @@ class ChecksClient:
|
|
|
9431
9632
|
f'/api/checks/{urllib.parse.quote(check_id)}/tasks/{urllib.parse.quote(task_check_id)}',
|
|
9432
9633
|
)
|
|
9433
9634
|
|
|
9635
|
+
async def share(
|
|
9636
|
+
self, id: str, *, link: bool = False, emails: Optional[List[str]] = None
|
|
9637
|
+
) -> JobShares:
|
|
9638
|
+
"""Share a check you created — :meth:`JobsClient.share` on a check:
|
|
9639
|
+
``link=True`` mints the check's unlisted link (the same link on every
|
|
9640
|
+
later call); each new address is emailed a link and reads the check,
|
|
9641
|
+
its task checks and the download, and lists it under
|
|
9642
|
+
``scope='shared'``; it never operates it. Creator-only: an org member
|
|
9643
|
+
is refused ``org_forbidden`` (403), a stranger sees 404. The answer is
|
|
9644
|
+
the check's whole share state, the job's :class:`JobShares` shape.
|
|
9645
|
+
"""
|
|
9646
|
+
body: Dict[str, Any] = {}
|
|
9647
|
+
if link:
|
|
9648
|
+
body['link'] = True
|
|
9649
|
+
if emails:
|
|
9650
|
+
body['emails'] = list(emails)
|
|
9651
|
+
raw = await self._http.request_json(
|
|
9652
|
+
f'/api/checks/{urllib.parse.quote(id)}/share', method='POST', body=body
|
|
9653
|
+
)
|
|
9654
|
+
return _map_job_shares(raw)
|
|
9655
|
+
|
|
9656
|
+
async def unshare(
|
|
9657
|
+
self, id: str, *, link: bool = False, emails: Optional[List[str]] = None
|
|
9658
|
+
) -> JobShares:
|
|
9659
|
+
"""Revoke a check's link (``link=True``) and/or email shares (``emails``)
|
|
9660
|
+
— :meth:`JobsClient.unshare` on a check. Idempotent; creator-only."""
|
|
9661
|
+
body: Dict[str, Any] = {}
|
|
9662
|
+
if link:
|
|
9663
|
+
body['link'] = True
|
|
9664
|
+
if emails:
|
|
9665
|
+
body['emails'] = list(emails)
|
|
9666
|
+
raw = await self._http.request_json(
|
|
9667
|
+
f'/api/checks/{urllib.parse.quote(id)}/unshare', method='POST', body=body
|
|
9668
|
+
)
|
|
9669
|
+
return _map_job_shares(raw)
|
|
9670
|
+
|
|
9671
|
+
async def shares(self, id: str) -> JobShares:
|
|
9672
|
+
"""The check's share state: its visibility, the link with its URL
|
|
9673
|
+
while enabled, and every email share. Creator-only."""
|
|
9674
|
+
raw = await self._http.request_json(f'/api/checks/{urllib.parse.quote(id)}/shares')
|
|
9675
|
+
return _map_job_shares(raw)
|
|
9676
|
+
|
|
9434
9677
|
|
|
9435
9678
|
class AuthClient:
|
|
9436
9679
|
"""Client for caller identity.
|
|
@@ -9458,16 +9701,16 @@ class AuthClient:
|
|
|
9458
9701
|
|
|
9459
9702
|
|
|
9460
9703
|
class OrgsClient:
|
|
9461
|
-
"""Client for the caller's organizations
|
|
9704
|
+
"""Client for the caller's organizations.
|
|
9462
9705
|
|
|
9463
9706
|
Created via the standalone ``orgs()`` factory. ``list()`` is Harbor's
|
|
9464
9707
|
``harbor auth org list`` shape; ``get()`` is the hosted extension that
|
|
9465
|
-
reads one organization's quota and usage
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
given.
|
|
9708
|
+
reads one organization's quota and usage; ``create()``, ``invite()``,
|
|
9709
|
+
``join()`` and ``members()`` are the team verbs. Renaming, deleting,
|
|
9710
|
+
member roles and invite revocation stay outside the SDK until a wave
|
|
9711
|
+
asks for them; quotas are set only from the platform administrator's
|
|
9712
|
+
dashboard session, so no SDK method could ever set one. Requires
|
|
9713
|
+
``EVOLVE_API_KEY`` unless ``HostedClientConfig(api_key=...)`` is given.
|
|
9471
9714
|
"""
|
|
9472
9715
|
|
|
9473
9716
|
def __init__(self, config: Optional[HostedClientConfig] = None):
|
|
@@ -9493,6 +9736,41 @@ class OrgsClient:
|
|
|
9493
9736
|
raw = await self._http.request_json(f'/api/orgs/{urllib.parse.quote(org, safe="")}')
|
|
9494
9737
|
return _map_organization_detail(raw)
|
|
9495
9738
|
|
|
9739
|
+
async def create(self, name: str, *, display_name: Optional[str] = None) -> Organization:
|
|
9740
|
+
"""Create a shared organization under ``name`` (its slug); the caller
|
|
9741
|
+
becomes its owner (``POST /api/orgs``). A taken slug is refused
|
|
9742
|
+
``org_slug_taken``."""
|
|
9743
|
+
body: Dict[str, Any] = {'slug': name}
|
|
9744
|
+
if display_name is not None:
|
|
9745
|
+
body['display_name'] = display_name
|
|
9746
|
+
raw = await self._http.request_json('/api/orgs', method='POST', body=body)
|
|
9747
|
+
return _map_organization(raw)
|
|
9748
|
+
|
|
9749
|
+
async def invite(self, org: str) -> OrgInviteCreated:
|
|
9750
|
+
"""Mint an invite link for an org you own; the response carries the
|
|
9751
|
+
token ONCE (``POST /api/orgs/{org}/invites``, the server's defaults:
|
|
9752
|
+
7 days, unlimited uses)."""
|
|
9753
|
+
raw = await self._http.request_json(
|
|
9754
|
+
f'/api/orgs/{urllib.parse.quote(org, safe="")}/invites', method='POST', body={}
|
|
9755
|
+
)
|
|
9756
|
+
return _map_org_invite_created(raw)
|
|
9757
|
+
|
|
9758
|
+
async def join(self, token: str) -> OrgJoined:
|
|
9759
|
+
"""Redeem an invite token: join its org as member
|
|
9760
|
+
(``POST /api/orgs/invites/accept``). Idempotent for an existing
|
|
9761
|
+
member (``already_member`` True)."""
|
|
9762
|
+
raw = await self._http.request_json(
|
|
9763
|
+
'/api/orgs/invites/accept', method='POST', body={'token': token}
|
|
9764
|
+
)
|
|
9765
|
+
org_raw = raw.get('org') if isinstance(raw.get('org'), dict) else {}
|
|
9766
|
+
return OrgJoined(org=_map_organization(org_raw), already_member=raw.get('already_member') is True)
|
|
9767
|
+
|
|
9768
|
+
async def members(self, org: str) -> List[OrgMember]:
|
|
9769
|
+
"""The org's members, owners first; any member may read it (``GET /api/orgs/{org}/members``)."""
|
|
9770
|
+
raw = await self._http.request_json(f'/api/orgs/{urllib.parse.quote(org, safe="")}/members')
|
|
9771
|
+
items = raw.get('items') if isinstance(raw.get('items'), list) else []
|
|
9772
|
+
return [_map_org_member(item) for item in items if isinstance(item, dict)]
|
|
9773
|
+
|
|
9496
9774
|
|
|
9497
9775
|
def _parse_dataset_ref(ref: str) -> 'tuple[str, Optional[str]]':
|
|
9498
9776
|
at = ref.find('@')
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "evolvingmachines-evolve"
|
|
7
|
-
version = "0.0.61"
|
|
7
|
+
version = "0.0.61.dev1450"
|
|
8
8
|
description = "Pythonic SDK for multi-agent orchestration in E2B sandboxes"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/bridge/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/browser_profiles.py
RENAMED
|
File without changes
|
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/integrations.py
RENAMED
|
File without changes
|
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/managed_secrets.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/pipeline/types.py
RENAMED
|
File without changes
|
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/prompts/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/sandbox_view.py
RENAMED
|
File without changes
|
|
File without changes
|
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/sessions_client.py
RENAMED
|
File without changes
|
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/storage_client.py
RENAMED
|
File without changes
|
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/swarm/__init__.py
RENAMED
|
File without changes
|
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/swarm/results.py
RENAMED
|
File without changes
|
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/swarm/swarm.py
RENAMED
|
File without changes
|
{evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1450}/evolve/swarm/types.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|