runtime-sdk 0.4.19__tar.gz → 0.4.20__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.
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/PKG-INFO +2 -1
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/README.md +1 -0
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/pyproject.toml +1 -1
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/scripts/runtime_sdk/cli.py +40 -0
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/scripts/runtime_sdk/client.py +3 -0
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/scripts/runtime_sdk.egg-info/PKG-INFO +2 -1
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/scripts/runtime_sdk/__init__.py +0 -0
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/scripts/runtime_sdk/config.py +0 -0
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/scripts/runtime_sdk.egg-info/SOURCES.txt +0 -0
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/scripts/runtime_sdk.egg-info/dependency_links.txt +0 -0
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/scripts/runtime_sdk.egg-info/entry_points.txt +0 -0
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/scripts/runtime_sdk.egg-info/requires.txt +0 -0
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/scripts/runtime_sdk.egg-info/top_level.txt +0 -0
- {runtime_sdk-0.4.19 → runtime_sdk-0.4.20}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: runtime-sdk
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.20
|
|
4
4
|
Summary: Runtime Python SDK and CLI
|
|
5
5
|
Project-URL: Repository, https://github.com/The-Money-Company-Limited/runtimevm
|
|
6
6
|
Project-URL: Issues, https://github.com/The-Money-Company-Limited/runtimevm/issues
|
|
@@ -66,6 +66,7 @@ runtime login --api-key rt_live_...
|
|
|
66
66
|
runtime api-keys list
|
|
67
67
|
runtime api-keys create "my laptop"
|
|
68
68
|
runtime api-keys revoke 123
|
|
69
|
+
runtime integrations list
|
|
69
70
|
runtime integrations connect github
|
|
70
71
|
|
|
71
72
|
# Computers
|
|
@@ -190,6 +190,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
190
190
|
|
|
191
191
|
integrations_cmd = subparsers.add_parser("integrations", help="Connect account-level integrations")
|
|
192
192
|
integrations_subparsers = integrations_cmd.add_subparsers(dest="integrations_action", required=True)
|
|
193
|
+
integrations_subparsers.add_parser("list", aliases=["ls"], help="List integrations")
|
|
193
194
|
integrations_connect = integrations_subparsers.add_parser("connect", help="Connect an integration")
|
|
194
195
|
integrations_connect.add_argument("provider", choices=["github"])
|
|
195
196
|
integrations_connect.add_argument("--slug", default="github", help="Integration slug to create (default: github)")
|
|
@@ -351,6 +352,8 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
351
352
|
return handle_secrets_delete(config, args.slug)
|
|
352
353
|
return report_error("unknown secrets command")
|
|
353
354
|
if args.command == "integrations":
|
|
355
|
+
if args.integrations_action in ("list", "ls"):
|
|
356
|
+
return handle_integrations_list(config)
|
|
354
357
|
if args.integrations_action == "connect":
|
|
355
358
|
return handle_integrations_connect(config, args.provider, args.slug, args.owner, no_open=args.no_open)
|
|
356
359
|
return report_error("unknown integrations command")
|
|
@@ -1553,6 +1556,35 @@ def handle_api_keys_revoke(config: RuntimeConfig, key_id: str | None) -> int:
|
|
|
1553
1556
|
|
|
1554
1557
|
|
|
1555
1558
|
|
|
1559
|
+
def _render_integrations_table(payload: dict[str, Any]) -> None:
|
|
1560
|
+
mods = _UI.rich()
|
|
1561
|
+
Table = mods["Table"]
|
|
1562
|
+
integrations = payload.get("integrations") or []
|
|
1563
|
+
if not isinstance(integrations, list) or not integrations:
|
|
1564
|
+
_UI.console().print("[yellow]no integrations found[/yellow]")
|
|
1565
|
+
return
|
|
1566
|
+
|
|
1567
|
+
table = Table(title="Integrations", expand=True, box=mods["box"].SIMPLE_HEAVY)
|
|
1568
|
+
table.add_column("Slug", style="bold white")
|
|
1569
|
+
table.add_column("Provider", style="white")
|
|
1570
|
+
table.add_column("Owner", style="white")
|
|
1571
|
+
table.add_column("Transport", style="white")
|
|
1572
|
+
table.add_column("Backend", style="white")
|
|
1573
|
+
|
|
1574
|
+
for entry in integrations:
|
|
1575
|
+
if not isinstance(entry, dict):
|
|
1576
|
+
continue
|
|
1577
|
+
table.add_row(
|
|
1578
|
+
str(entry.get("slug") or "—"),
|
|
1579
|
+
str(entry.get("provider") or "—"),
|
|
1580
|
+
str(entry.get("credential_ref") or "—"),
|
|
1581
|
+
str(entry.get("transport") or "—"),
|
|
1582
|
+
str(entry.get("backend") or "—"),
|
|
1583
|
+
)
|
|
1584
|
+
_UI.console().print(table)
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
|
|
1556
1588
|
def _coerce_secret_set_slug(slug: str | None) -> str | None:
|
|
1557
1589
|
value = str(slug or "").strip()
|
|
1558
1590
|
return value or None
|
|
@@ -1685,6 +1717,14 @@ def handle_secrets_delete(config: RuntimeConfig, slug: str | None) -> int:
|
|
|
1685
1717
|
|
|
1686
1718
|
|
|
1687
1719
|
|
|
1720
|
+
def handle_integrations_list(config: RuntimeConfig) -> int:
|
|
1721
|
+
if (err := _require_api_key(config)) is not None:
|
|
1722
|
+
return err
|
|
1723
|
+
client = RuntimeClient(base_url=config.base_url, api_key=config.api_key)
|
|
1724
|
+
return report_success(client.list_integrations(), _render_integrations_table)
|
|
1725
|
+
|
|
1726
|
+
|
|
1727
|
+
|
|
1688
1728
|
def handle_integrations_connect(
|
|
1689
1729
|
config: RuntimeConfig,
|
|
1690
1730
|
provider: str,
|
|
@@ -54,6 +54,9 @@ class RuntimeClient:
|
|
|
54
54
|
|
|
55
55
|
# --- Integrations ---
|
|
56
56
|
|
|
57
|
+
def list_integrations(self) -> dict[str, Any]:
|
|
58
|
+
return self._request("GET", "/api/integrations", auth_required=True)
|
|
59
|
+
|
|
57
60
|
def start_github_connect(self, *, slug: str | None = None) -> dict[str, Any]:
|
|
58
61
|
body: dict[str, Any] = {}
|
|
59
62
|
if slug:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: runtime-sdk
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.20
|
|
4
4
|
Summary: Runtime Python SDK and CLI
|
|
5
5
|
Project-URL: Repository, https://github.com/The-Money-Company-Limited/runtimevm
|
|
6
6
|
Project-URL: Issues, https://github.com/The-Money-Company-Limited/runtimevm/issues
|
|
@@ -66,6 +66,7 @@ runtime login --api-key rt_live_...
|
|
|
66
66
|
runtime api-keys list
|
|
67
67
|
runtime api-keys create "my laptop"
|
|
68
68
|
runtime api-keys revoke 123
|
|
69
|
+
runtime integrations list
|
|
69
70
|
runtime integrations connect github
|
|
70
71
|
|
|
71
72
|
# Computers
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|