dooers-cli 0.11.2__tar.gz → 0.11.4__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.
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/PKG-INFO +1 -1
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/pyproject.toml +1 -1
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/run.py +42 -7
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_local_runtime_slot.py +7 -1
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/uv.lock +1 -1
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/.gitignore +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/README.md +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/__init__.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/agent_store.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/agents.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/auth.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/cli.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/config.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/core_client.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/env_prod.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/ignore.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/logs.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/manifest_sync.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/org.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/push.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/push_client.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/runtime_client.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/settings.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/token_store.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/user_config.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/cli/validate.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/src/dooers/py.typed +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/__init__.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_agent_store.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_agents_delete.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_agents_update.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_config.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_core_client.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_encoding.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_env_prod.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_ignore.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_logs.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_manifest_sync.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_org.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_push_client_async.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_push_failure_display.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_push_hosting_guard.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_push_poll.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_push_teardown.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_smoke.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_token_store.py +0 -0
- {dooers_cli-0.11.2 → dooers_cli-0.11.4}/tests/test_validate.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: dooers-cli
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.4
|
|
4
4
|
Summary: Dooers CLI — run and deploy agents to Dooers, manage agent records, authenticate from the terminal
|
|
5
5
|
Project-URL: Repository, https://github.com/Dooers-ai/dooers-cli
|
|
6
6
|
Author-email: Dooers <dev@dooers.ai>
|
|
@@ -16,6 +16,7 @@ from urllib.parse import urlparse
|
|
|
16
16
|
import httpx
|
|
17
17
|
import typer
|
|
18
18
|
import websockets
|
|
19
|
+
from rich.console import Console
|
|
19
20
|
|
|
20
21
|
from dooers.cli import config
|
|
21
22
|
from dooers.cli.runtime_client import RuntimeClient, RuntimeRecord
|
|
@@ -25,6 +26,7 @@ from dooers.cli.token_store import TokenStore, is_token_expired
|
|
|
25
26
|
_HEARTBEAT_SECONDS = 20.0
|
|
26
27
|
_RECONNECT_INITIAL_SECONDS = 1.0
|
|
27
28
|
_RECONNECT_MAX_SECONDS = 15.0
|
|
29
|
+
_console = Console(highlight=False)
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
def local_runtime_ids_to_replace(runtimes: list[RuntimeRecord]) -> list[str]:
|
|
@@ -95,6 +97,30 @@ def _messages_url(public_url: str, path: str | None) -> str:
|
|
|
95
97
|
return f"{ws_scheme}://{parsed.netloc}{message_path}"
|
|
96
98
|
|
|
97
99
|
|
|
100
|
+
_console = Console(highlight=False)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def _link_block(label: str, detail: str, url: str) -> None:
|
|
104
|
+
"""Label on one line, URL on the next, so a wrap never splits the label from the address."""
|
|
105
|
+
_console.print(f" [bold]{label}[/] [dim]{detail}[/]")
|
|
106
|
+
_console.print(f" [link={url}][cyan]{url}[/cyan][/link]")
|
|
107
|
+
_console.print()
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def app_console_urls(
|
|
111
|
+
org_id: str,
|
|
112
|
+
agent_id: str,
|
|
113
|
+
runtime_id: str,
|
|
114
|
+
*,
|
|
115
|
+
app_url: str | None = None,
|
|
116
|
+
) -> tuple[str, str]:
|
|
117
|
+
"""Studio page and the 1:1 test chat already bound to this local runtime."""
|
|
118
|
+
base = (app_url or os.environ.get("DOOERS_APP_URL") or "https://app.dooers.ai").rstrip("/")
|
|
119
|
+
studio = f"{base}/studio/{org_id}/{agent_id}"
|
|
120
|
+
test = f"{base}/agents/{org_id}/{agent_id}?runtimeId={runtime_id}"
|
|
121
|
+
return studio, test
|
|
122
|
+
|
|
123
|
+
|
|
98
124
|
async def _allocate_tunnel(
|
|
99
125
|
settings: Settings, token: str, agent_id: str, paths: list[str]
|
|
100
126
|
) -> dict[str, Any]:
|
|
@@ -326,8 +352,7 @@ async def _tunnel_supervisor(
|
|
|
326
352
|
runtime = await _update_runtime_tunnel(
|
|
327
353
|
runtime_client, runtime, public_url, messages_url
|
|
328
354
|
)
|
|
329
|
-
typer.echo(f"Tunnel reconnected
|
|
330
|
-
typer.echo(f"Messages: {messages_url}")
|
|
355
|
+
typer.echo(f"Tunnel reconnected\n {public_url}")
|
|
331
356
|
first_connection = False
|
|
332
357
|
delay = _RECONNECT_INITIAL_SECONDS
|
|
333
358
|
|
|
@@ -418,17 +443,27 @@ async def _run(settings: Settings, token: str, manifest: Any, *, with_prod_env:
|
|
|
418
443
|
start_new_session=True,
|
|
419
444
|
)
|
|
420
445
|
await _wait_for_port(manifest.run.host, manifest.run.port, process)
|
|
421
|
-
typer.echo(f"Local agent: http://{manifest.run.host}:{manifest.run.port}")
|
|
422
446
|
runtime = await asyncio.to_thread(
|
|
423
447
|
runtime_client.update,
|
|
424
448
|
manifest.agent_id,
|
|
425
449
|
runtime.runtime_id,
|
|
426
450
|
{"status": "online"},
|
|
427
451
|
)
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
452
|
+
studio_url, test_url = app_console_urls(
|
|
453
|
+
manifest.organization_id, manifest.agent_id, runtime.runtime_id
|
|
454
|
+
)
|
|
455
|
+
local_url = f"http://{manifest.run.host}:{manifest.run.port}"
|
|
456
|
+
_console.print()
|
|
457
|
+
_console.print("[bold green]Local agent is online[/]")
|
|
458
|
+
_console.print()
|
|
459
|
+
_link_block("Local", "this machine", local_url)
|
|
460
|
+
_link_block("Public", "tunnel", public_url)
|
|
461
|
+
_link_block("Messages", "websocket", messages_url)
|
|
462
|
+
_console.print("[bold]Open in Dooers[/]")
|
|
463
|
+
_console.print()
|
|
464
|
+
_link_block("Studio", "agent servers", studio_url)
|
|
465
|
+
_link_block("Test", "chat on this runtime", test_url)
|
|
466
|
+
_console.print("[dim]Press Ctrl+C to stop.[/]")
|
|
432
467
|
|
|
433
468
|
tunnel_task = asyncio.create_task(
|
|
434
469
|
_tunnel_supervisor(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Stable tunnel URL replaces any previous local runtime row."""
|
|
2
2
|
|
|
3
|
-
from dooers.cli.run import local_runtime_ids_to_replace
|
|
3
|
+
from dooers.cli.run import app_console_urls, local_runtime_ids_to_replace
|
|
4
4
|
from dooers.cli.runtime_client import RuntimeRecord
|
|
5
5
|
|
|
6
6
|
|
|
@@ -25,3 +25,9 @@ def test_previous_local_runtimes_are_replaced_after_the_tunnel_is_free() -> None
|
|
|
25
25
|
_runtime("external", "online", "ext"),
|
|
26
26
|
]
|
|
27
27
|
) == ["live", "old"]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def test_console_urls_open_studio_and_the_bound_test_chat() -> None:
|
|
31
|
+
studio, test = app_console_urls("org-1", "agent-1", "runtime-1", app_url="https://app.dooers.ai/")
|
|
32
|
+
assert studio == "https://app.dooers.ai/studio/org-1/agent-1"
|
|
33
|
+
assert test == "https://app.dooers.ai/agents/org-1/agent-1?runtimeId=runtime-1"
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|