feat(host-agent): add workspace application entrypoint
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
from host_agent.app import HostAgentApplication, create_application
|
||||||
|
|
||||||
|
__all__ = ["HostAgentApplication", "create_application"]
|
||||||
@@ -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()
|
||||||
@@ -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()
|
||||||
@@ -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 }
|
||||||
@@ -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
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
- [x] 1.1 Complete and verify every task in `uv-workspace-packaging` before changing cloud behavior.
|
- [x] 1.1 Complete and verify every task in `uv-workspace-packaging` before changing cloud behavior.
|
||||||
- Verified 17/17 tasks complete, strict OpenSpec validation passed, and the shared lockfile is current.
|
- Verified 17/17 tasks complete, strict OpenSpec validation passed, and the shared lockfile is current.
|
||||||
- [x] 1.2 Add `apps/cloud-api` as the `device-cloud-api` workspace project with an app factory and CLI/server entry point.
|
- [x] 1.2 Add `apps/cloud-api` as the `device-cloud-api` workspace project with an app factory and CLI/server entry point.
|
||||||
- [ ] 1.3 Add `apps/device-host-agent` as the `device-host-agent` workspace project with a CLI entry point and explicit Runtime/cloud dependencies.
|
- [x] 1.3 Add `apps/device-host-agent` as the `device-host-agent` workspace project with a CLI entry point and explicit Runtime/cloud dependencies.
|
||||||
- [ ] 1.4 Add configuration models that validate environment, database URL, scheduler intervals, lease durations, retry limits, poll settings, host identity, and insecure-development overrides.
|
- [ ] 1.4 Add configuration models that validate environment, database URL, scheduler intervals, lease durations, retry limits, poll settings, host identity, and insecure-development overrides.
|
||||||
|
|
||||||
## 2. Repository Contract And Migrations
|
## 2. Repository Contract And Migrations
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ dev = [
|
|||||||
[tool.uv.workspace]
|
[tool.uv.workspace]
|
||||||
members = [
|
members = [
|
||||||
"apps/cloud-api",
|
"apps/cloud-api",
|
||||||
|
"apps/device-host-agent",
|
||||||
"packages/cloud-platform",
|
"packages/cloud-platform",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ members = [
|
|||||||
"device-agent-runtime",
|
"device-agent-runtime",
|
||||||
"device-cloud-api",
|
"device-cloud-api",
|
||||||
"device-cloud-platform",
|
"device-cloud-platform",
|
||||||
|
"device-host-agent",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -491,6 +492,23 @@ dependencies = [
|
|||||||
[package.metadata]
|
[package.metadata]
|
||||||
requires-dist = [{ name = "device-agent-runtime", editable = "." }]
|
requires-dist = [{ name = "device-agent-runtime", editable = "." }]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "device-host-agent"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = { editable = "apps/device-host-agent" }
|
||||||
|
dependencies = [
|
||||||
|
{ name = "device-agent-runtime" },
|
||||||
|
{ name = "device-cloud-platform" },
|
||||||
|
{ name = "httpx" },
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.metadata]
|
||||||
|
requires-dist = [
|
||||||
|
{ name = "device-agent-runtime", editable = "." },
|
||||||
|
{ name = "device-cloud-platform", editable = "packages/cloud-platform" },
|
||||||
|
{ name = "httpx", specifier = ">=0.27.0" },
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "distro"
|
name = "distro"
|
||||||
version = "1.9.0"
|
version = "1.9.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user