feat(host-agent): add workspace application entrypoint

This commit is contained in:
2026-07-12 16:42:51 +08:00
parent 2af8909b29
commit 5e98708a94
8 changed files with 85 additions and 1 deletions
@@ -0,0 +1,3 @@
from host_agent.app import HostAgentApplication, create_application
__all__ = ["HostAgentApplication", "create_application"]
+15
View File
@@ -0,0 +1,15 @@
from __future__ import annotations
from dataclasses import dataclass
@dataclass
class HostAgentApplication:
"""Process shell expanded by the Host Agent implementation tasks."""
def run(self) -> None:
return None
def create_application() -> HostAgentApplication:
return HostAgentApplication()
+12
View File
@@ -0,0 +1,12 @@
from __future__ import annotations
import argparse
from collections.abc import Sequence
from host_agent.app import create_application
def main(argv: Sequence[str] | None = None) -> None:
parser = argparse.ArgumentParser(description="Run the Device Host Agent")
parser.parse_args(argv)
create_application().run()
+25
View File
@@ -0,0 +1,25 @@
[project]
name = "device-host-agent"
version = "0.1.0"
description = "Outbound device-host worker for the Device Cloud Platform."
requires-python = ">=3.14"
dependencies = [
"device-agent-runtime==0.1.0",
"device-cloud-platform==0.1.0",
"httpx>=0.27.0",
]
[project.scripts]
device-host-agent = "host_agent.cli:main"
[build-system]
requires = ["setuptools>=69"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
include = ["host_agent*"]
[tool.uv.sources]
device-agent-runtime = { workspace = true }
device-cloud-platform = { workspace = true }
+10
View File
@@ -0,0 +1,10 @@
from __future__ import annotations
from host_agent.app import HostAgentApplication, create_application
def test_create_application_returns_host_agent_process_shell() -> None:
application = create_application()
assert isinstance(application, HostAgentApplication)
assert application.run() is None