evolvingmachines-evolve 0.0.61__tar.gz → 0.0.61.dev1443__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.
Files changed (45) hide show
  1. {evolvingmachines_evolve-0.0.61/evolvingmachines_evolve.egg-info → evolvingmachines_evolve-0.0.61.dev1443}/PKG-INFO +1 -1
  2. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/__init__.py +15 -1
  3. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/config.py +7 -0
  4. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/hosted.py +236 -9
  5. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443/evolvingmachines_evolve.egg-info}/PKG-INFO +1 -1
  6. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/pyproject.toml +1 -1
  7. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/LICENSE +0 -0
  8. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/MANIFEST.in +0 -0
  9. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/README.md +0 -0
  10. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/bridge/__init__.py +0 -0
  11. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/bridge/dist/bridge.bundle.cjs +0 -0
  12. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/_http.py +0 -0
  13. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/agent.py +0 -0
  14. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/bridge.py +0 -0
  15. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/browser_credentials.py +0 -0
  16. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/browser_profiles.py +0 -0
  17. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/integrations.py +0 -0
  18. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/managed_secrets.py +0 -0
  19. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/pipeline/__init__.py +0 -0
  20. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/pipeline/pipeline.py +0 -0
  21. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/pipeline/types.py +0 -0
  22. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/prompts/__init__.py +0 -0
  23. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/prompts/agent_md/judge.md +0 -0
  24. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/prompts/agent_md/reduce.md +0 -0
  25. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/prompts/agent_md/verify.md +0 -0
  26. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/prompts/user/judge.md +0 -0
  27. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/prompts/user/retry_feedback.md +0 -0
  28. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/prompts/user/verify.md +0 -0
  29. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/py.typed +0 -0
  30. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/results.py +0 -0
  31. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/retry.py +0 -0
  32. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/sandbox_view.py +0 -0
  33. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/schema.py +0 -0
  34. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/sessions_client.py +0 -0
  35. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/storage_client.py +0 -0
  36. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/swarm/__init__.py +0 -0
  37. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/swarm/results.py +0 -0
  38. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/swarm/swarm.py +0 -0
  39. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/swarm/types.py +0 -0
  40. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolve/utils.py +0 -0
  41. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolvingmachines_evolve.egg-info/SOURCES.txt +0 -0
  42. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolvingmachines_evolve.egg-info/dependency_links.txt +0 -0
  43. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolvingmachines_evolve.egg-info/requires.txt +0 -0
  44. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/evolvingmachines_evolve.egg-info/top_level.txt +0 -0
  45. {evolvingmachines_evolve-0.0.61 → evolvingmachines_evolve-0.0.61.dev1443}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evolvingmachines-evolve
3
- Version: 0.0.61
3
+ Version: 0.0.61.dev1443
4
4
  Summary: Pythonic SDK for multi-agent orchestration in E2B sandboxes
5
5
  Author-email: "Swarmlink, Inc." <brandomagnani@evolvingmachines.ai>
6
6
  License: Apache-2.0
@@ -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.dev1443'
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.
@@ -2200,6 +2231,15 @@ class Job:
2200
2231
  updated_at: str
2201
2232
  #: None while the job is live.
2202
2233
  finished_at: Optional[str]
2234
+ #: The owning organization's slug — the ``org`` named at create, else the
2235
+ #: creator's personal org. None only on a regrade job whose source job
2236
+ #: has been deleted, or from a server older than the field.
2237
+ org: Optional[str] = field(default=None, kw_only=True)
2238
+ #: ``'PRIVATE'``, or ``'LINK'`` when an unlisted share link reaches the job
2239
+ #: (``jobs().share(id, link=True)``). Email shares are not a visibility:
2240
+ #: ``jobs().shares(id)`` lists them. Always ``'PRIVATE'`` on a regrade job;
2241
+ #: a server older than the field reads as ``'PRIVATE'``.
2242
+ visibility: str = field(default='PRIVATE', kw_only=True)
2203
2243
 
2204
2244
 
2205
2245
  @dataclass
@@ -3427,6 +3467,46 @@ class OrganizationDetail(Organization):
3427
3467
  usage: OrgUsage = field(kw_only=True)
3428
3468
 
3429
3469
 
3470
+ @dataclass
3471
+ class OrgMember:
3472
+ """One member of an organization (``GET /api/orgs/{org}/members`` item)."""
3473
+ user_id: str
3474
+ email: str
3475
+ role: OrgRole
3476
+ joined_at: str
3477
+
3478
+
3479
+ @dataclass
3480
+ class OrgInvite:
3481
+ """An invite link's descriptor — the token itself is returned once, at creation."""
3482
+ invite_id: str
3483
+ #: None = never expires.
3484
+ expires_at: Optional[str]
3485
+ #: None = unlimited uses.
3486
+ max_uses: Optional[int]
3487
+ #: Accepted joins so far.
3488
+ uses: int
3489
+ revoked_at: Optional[str]
3490
+ created_at: str
3491
+
3492
+
3493
+ @dataclass
3494
+ class OrgInviteCreated(OrgInvite):
3495
+ """A freshly minted invite: the descriptor plus its one-time token
3496
+ (``POST /api/orgs/{org}/invites``)."""
3497
+ #: The invite link's credential, returned ONCE — whoever presents it while
3498
+ #: signed in joins as member.
3499
+ token: str = field(kw_only=True)
3500
+
3501
+
3502
+ @dataclass
3503
+ class OrgJoined:
3504
+ """The answer to redeeming an invite token (``POST /api/orgs/invites/accept``)."""
3505
+ org: Organization
3506
+ #: True when the caller was already a member (no use of the link consumed).
3507
+ already_member: bool
3508
+
3509
+
3430
3510
  # The ONE page envelope, on every collection this surface returns — top level
3431
3511
  # or nested. ``next_cursor`` means one thing everywhere: pass it back as
3432
3512
  # ``cursor=`` for the next page, and None means there is no next page. It never
@@ -4315,6 +4395,30 @@ def _map_job(data: Dict[str, Any]) -> Job:
4315
4395
  started_at=data.get('started_at', ''),
4316
4396
  updated_at=data.get('updated_at', ''),
4317
4397
  finished_at=data.get('finished_at'),
4398
+ org=data['org'] if isinstance(data.get('org'), str) else None,
4399
+ visibility='LINK' if data.get('visibility') == 'LINK' else 'PRIVATE',
4400
+ )
4401
+
4402
+
4403
+ def _map_job_shares(data: Dict[str, Any]) -> JobShares:
4404
+ """The wire's JobShares, read in the same tolerant shape every required
4405
+ field here uses."""
4406
+ link = data.get('link') if isinstance(data.get('link'), dict) else {}
4407
+ return JobShares(
4408
+ visibility='LINK' if data.get('visibility') == 'LINK' else 'PRIVATE',
4409
+ link=JobShareLink(
4410
+ enabled=link.get('enabled') is True,
4411
+ url=link['url'] if isinstance(link.get('url'), str) else None,
4412
+ ),
4413
+ emails=[
4414
+ JobShareEmail(
4415
+ email=str(entry.get('email', '')),
4416
+ shared_by=str(entry.get('shared_by', '')),
4417
+ created_at=str(entry.get('created_at', '')),
4418
+ )
4419
+ for entry in (data.get('emails') or [])
4420
+ if isinstance(entry, dict)
4421
+ ],
4318
4422
  )
4319
4423
 
4320
4424
 
@@ -4358,6 +4462,27 @@ def _map_organization(data: Dict[str, Any]) -> Organization:
4358
4462
  )
4359
4463
 
4360
4464
 
4465
+ def _map_org_member(data: Dict[str, Any]) -> OrgMember:
4466
+ return OrgMember(
4467
+ user_id=data.get('user_id', ''),
4468
+ email=data.get('email', ''),
4469
+ role='owner' if data.get('role') == 'owner' else 'member',
4470
+ joined_at=data.get('joined_at', ''),
4471
+ )
4472
+
4473
+
4474
+ def _map_org_invite_created(data: Dict[str, Any]) -> OrgInviteCreated:
4475
+ return OrgInviteCreated(
4476
+ invite_id=data.get('invite_id', ''),
4477
+ expires_at=data['expires_at'] if isinstance(data.get('expires_at'), str) else None,
4478
+ max_uses=data['max_uses'] if isinstance(data.get('max_uses'), int) else None,
4479
+ uses=int(data.get('uses', 0)),
4480
+ revoked_at=data['revoked_at'] if isinstance(data.get('revoked_at'), str) else None,
4481
+ created_at=data.get('created_at', ''),
4482
+ token=data.get('token', ''),
4483
+ )
4484
+
4485
+
4361
4486
  def _map_organization_detail(data: Dict[str, Any]) -> OrganizationDetail:
4362
4487
  def count(source: Dict[str, Any], key: str) -> int:
4363
4488
  value = source.get(key)
@@ -5206,6 +5331,10 @@ class _HostedHttp:
5206
5331
  or DEFAULT_BASE_URL
5207
5332
  ).rstrip('/')
5208
5333
 
5334
+ def default_org(self) -> Optional[str]:
5335
+ """The client-level org default (``HostedClientConfig.org``); None = personal."""
5336
+ return self._config.org or None
5337
+
5209
5338
  def api_key(self) -> str:
5210
5339
  api_key = self._config.api_key or os.environ.get('EVOLVE_API_KEY')
5211
5340
  if not api_key:
@@ -6364,6 +6493,7 @@ class DatasetsClient:
6364
6493
  hub_package: Optional[str] = None,
6365
6494
  name: Optional[str] = None,
6366
6495
  version: Optional[str] = None,
6496
+ org: Optional[str] = None,
6367
6497
  on_upload_progress: Optional[Callable[[int, int], None]] = None,
6368
6498
  on_registered: Optional[Callable[[str], None]] = None,
6369
6499
  ) -> DatasetImport:
@@ -6438,6 +6568,9 @@ class DatasetsClient:
6438
6568
  'publish() takes EXACTLY ONE source: git_url=... + git_ref=..., '
6439
6569
  'directory=..., archive_url=..., or hub_package=...'
6440
6570
  )
6571
+ # The call's own org wins; the client default fills an absent one;
6572
+ # neither = no part, and the server's personal-org default applies.
6573
+ owning_org = org if org is not None else self._http.default_org()
6441
6574
  if archive_url is not None:
6442
6575
  if name is None or version is None:
6443
6576
  raise ValueError(
@@ -6446,7 +6579,7 @@ class DatasetsClient:
6446
6579
  'is accepted, so a manifest cannot supply them'
6447
6580
  )
6448
6581
  body, content_type = _multipart_body(
6449
- {'name': name, 'version': version, 'archive_url': archive_url}
6582
+ {'name': name, 'version': version, 'archive_url': archive_url, 'org': owning_org}
6450
6583
  )
6451
6584
  raw = await self._http.request_upload(
6452
6585
  '/api/datasets/publish', body, {'Content-Type': content_type}
@@ -6460,6 +6593,7 @@ class DatasetsClient:
6460
6593
  fields['name'] = name
6461
6594
  if version is not None:
6462
6595
  fields['version'] = version
6596
+ fields['org'] = owning_org
6463
6597
  body, content_type = _multipart_body(fields)
6464
6598
  raw = await self._http.request_upload(
6465
6599
  '/api/datasets/publish', body, {'Content-Type': content_type}
@@ -6485,7 +6619,7 @@ class DatasetsClient:
6485
6619
  raw = await _upload_directory_archive(
6486
6620
  self._http,
6487
6621
  '/api/datasets/publish',
6488
- {'name': name, 'version': version},
6622
+ {'name': name, 'version': version, 'org': owning_org},
6489
6623
  directory,
6490
6624
  'corpus.tar.gz',
6491
6625
  resumable_over=RESUMABLE_UPLOAD_THRESHOLD_BYTES,
@@ -6506,6 +6640,7 @@ class DatasetsClient:
6506
6640
  'version': version,
6507
6641
  'git_url': git_url,
6508
6642
  'git_ref': git_ref,
6643
+ 'org': owning_org,
6509
6644
  }
6510
6645
  # Only when narrowing to a subfolder: an absent part means "the
6511
6646
  # repository root", and an empty part would be refused.
@@ -7285,6 +7420,7 @@ class JobsClient:
7285
7420
  datasets: List[Union[DatasetSelector, Dict[str, Any]]],
7286
7421
  agents: List[Union[AgentArm, Dict[str, Any]]],
7287
7422
  job_name: Optional[str] = None,
7423
+ org: Optional[str] = None,
7288
7424
  n_attempts: Optional[int] = None,
7289
7425
  n_concurrent_trials: Optional[int] = None,
7290
7426
  max_trial_spend_usd: Optional[float] = None,
@@ -7400,6 +7536,11 @@ class JobsClient:
7400
7536
  body: Dict[str, Any] = {}
7401
7537
  if job_name is not None:
7402
7538
  body['job_name'] = job_name
7539
+ # The call's own org wins; the client default fills an absent one;
7540
+ # neither = no key, and the server's personal-org default applies.
7541
+ owning_org = org if org is not None else self._http.default_org()
7542
+ if owning_org is not None:
7543
+ body['org'] = owning_org
7403
7544
  body['datasets'] = [
7404
7545
  (item if isinstance(item, DatasetSelector) else DatasetSelector(**item))._to_wire()
7405
7546
  for item in datasets
@@ -8329,6 +8470,57 @@ class JobsClient:
8329
8470
  )
8330
8471
  return _map_job_delete_result(raw)
8331
8472
 
8473
+ async def share(
8474
+ self, id: str, *, link: bool = False, emails: Optional[List[str]] = None
8475
+ ) -> JobShares:
8476
+ """Share a job you created — by link, by email, or both (Harbor's
8477
+ ``harbor job share``; the platform shares a person by email address
8478
+ and never makes a job public: ``link=True`` mints an UNLISTED link
8479
+ instead, the same link on every later call).
8480
+
8481
+ Each new address is emailed a link to the run; an address with no
8482
+ account gets a sign-up link for exactly that address (no gateway
8483
+ credits), while an address already on the waitlist or holding an
8484
+ invite gets the email without a sign-up link and uses that invite
8485
+ instead. An email share reads the job and lists it under
8486
+ ``scope='shared'``; it never operates it. Creator-only: an org
8487
+ member is refused ``org_forbidden`` (403), a stranger sees 404; a
8488
+ regrade job id is 404. The answer is the job's whole share state.
8489
+ """
8490
+ body: Dict[str, Any] = {}
8491
+ if link:
8492
+ body['link'] = True
8493
+ if emails:
8494
+ body['emails'] = list(emails)
8495
+ raw = await self._http.request_json(
8496
+ f'/api/jobs/{urllib.parse.quote(id)}/share', method='POST', body=body
8497
+ )
8498
+ return _map_job_shares(raw)
8499
+
8500
+ async def unshare(
8501
+ self, id: str, *, link: bool = False, emails: Optional[List[str]] = None
8502
+ ) -> JobShares:
8503
+ """Revoke a job's link (``link=True`` — the old link is dead at once; a
8504
+ later ``share`` mints a new one) and/or email shares (``emails``).
8505
+ Idempotent; creator-only like ``share``.
8506
+ """
8507
+ body: Dict[str, Any] = {}
8508
+ if link:
8509
+ body['link'] = True
8510
+ if emails:
8511
+ body['emails'] = list(emails)
8512
+ raw = await self._http.request_json(
8513
+ f'/api/jobs/{urllib.parse.quote(id)}/unshare', method='POST', body=body
8514
+ )
8515
+ return _map_job_shares(raw)
8516
+
8517
+ async def shares(self, id: str) -> JobShares:
8518
+ """The job's share state (Harbor's ``harbor hub job shares``): its
8519
+ visibility, the link with its URL while enabled, and every email
8520
+ share. Creator-only."""
8521
+ raw = await self._http.request_json(f'/api/jobs/{urllib.parse.quote(id)}/shares')
8522
+ return _map_job_shares(raw)
8523
+
8332
8524
  async def grep(
8333
8525
  self,
8334
8526
  id: str,
@@ -9458,16 +9650,16 @@ class AuthClient:
9458
9650
 
9459
9651
 
9460
9652
  class OrgsClient:
9461
- """Client for the caller's organizations — the read pair.
9653
+ """Client for the caller's organizations.
9462
9654
 
9463
9655
  Created via the standalone ``orgs()`` factory. ``list()`` is Harbor's
9464
9656
  ``harbor auth org list`` shape; ``get()`` is the hosted extension that
9465
- reads one organization's quota and usage. Creating, renaming, deleting,
9466
- members and invite links are served by the API and stay outside the SDK
9467
- until a wave asks for them; quotas are set only from the platform
9468
- administrator's dashboard session, so no SDK method could ever set one.
9469
- Requires ``EVOLVE_API_KEY`` unless ``HostedClientConfig(api_key=...)`` is
9470
- given.
9657
+ reads one organization's quota and usage; ``create()``, ``invite()``,
9658
+ ``join()`` and ``members()`` are the team verbs. Renaming, deleting,
9659
+ member roles and invite revocation stay outside the SDK until a wave
9660
+ asks for them; quotas are set only from the platform administrator's
9661
+ dashboard session, so no SDK method could ever set one. Requires
9662
+ ``EVOLVE_API_KEY`` unless ``HostedClientConfig(api_key=...)`` is given.
9471
9663
  """
9472
9664
 
9473
9665
  def __init__(self, config: Optional[HostedClientConfig] = None):
@@ -9493,6 +9685,41 @@ class OrgsClient:
9493
9685
  raw = await self._http.request_json(f'/api/orgs/{urllib.parse.quote(org, safe="")}')
9494
9686
  return _map_organization_detail(raw)
9495
9687
 
9688
+ async def create(self, name: str, *, display_name: Optional[str] = None) -> Organization:
9689
+ """Create a shared organization under ``name`` (its slug); the caller
9690
+ becomes its owner (``POST /api/orgs``). A taken slug is refused
9691
+ ``org_slug_taken``."""
9692
+ body: Dict[str, Any] = {'slug': name}
9693
+ if display_name is not None:
9694
+ body['display_name'] = display_name
9695
+ raw = await self._http.request_json('/api/orgs', method='POST', body=body)
9696
+ return _map_organization(raw)
9697
+
9698
+ async def invite(self, org: str) -> OrgInviteCreated:
9699
+ """Mint an invite link for an org you own; the response carries the
9700
+ token ONCE (``POST /api/orgs/{org}/invites``, the server's defaults:
9701
+ 7 days, unlimited uses)."""
9702
+ raw = await self._http.request_json(
9703
+ f'/api/orgs/{urllib.parse.quote(org, safe="")}/invites', method='POST', body={}
9704
+ )
9705
+ return _map_org_invite_created(raw)
9706
+
9707
+ async def join(self, token: str) -> OrgJoined:
9708
+ """Redeem an invite token: join its org as member
9709
+ (``POST /api/orgs/invites/accept``). Idempotent for an existing
9710
+ member (``already_member`` True)."""
9711
+ raw = await self._http.request_json(
9712
+ '/api/orgs/invites/accept', method='POST', body={'token': token}
9713
+ )
9714
+ org_raw = raw.get('org') if isinstance(raw.get('org'), dict) else {}
9715
+ return OrgJoined(org=_map_organization(org_raw), already_member=raw.get('already_member') is True)
9716
+
9717
+ async def members(self, org: str) -> List[OrgMember]:
9718
+ """The org's members, owners first; any member may read it (``GET /api/orgs/{org}/members``)."""
9719
+ raw = await self._http.request_json(f'/api/orgs/{urllib.parse.quote(org, safe="")}/members')
9720
+ items = raw.get('items') if isinstance(raw.get('items'), list) else []
9721
+ return [_map_org_member(item) for item in items if isinstance(item, dict)]
9722
+
9496
9723
 
9497
9724
  def _parse_dataset_ref(ref: str) -> 'tuple[str, Optional[str]]':
9498
9725
  at = ref.find('@')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evolvingmachines-evolve
3
- Version: 0.0.61
3
+ Version: 0.0.61.dev1443
4
4
  Summary: Pythonic SDK for multi-agent orchestration in E2B sandboxes
5
5
  Author-email: "Swarmlink, Inc." <brandomagnani@evolvingmachines.ai>
6
6
  License: Apache-2.0
@@ -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.dev1443"
8
8
  description = "Pythonic SDK for multi-agent orchestration in E2B sandboxes"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"