dooers-cli 0.7.3__tar.gz → 0.8.0__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.7.3 → dooers_cli-0.8.0}/PKG-INFO +2 -2
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/pyproject.toml +2 -2
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/agents.py +3 -1
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/validate.py +24 -19
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_validate.py +27 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/uv.lock +2 -2
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/.gitignore +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/README.md +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/__init__.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/agent_store.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/auth.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/cli.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/config.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/core_client.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/env_prod.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/ignore.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/manifest_sync.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/org.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/push.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/push_client.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/settings.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/token_store.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/cli/user_config.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/src/dooers/py.typed +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/__init__.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_agent_store.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_agents_delete.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_config.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_core_client.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_env_prod.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_ignore.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_manifest_sync.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_org.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_push_client_async.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_push_failure_display.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_push_hosting_guard.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_push_poll.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_push_teardown.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_smoke.py +0 -0
- {dooers_cli-0.7.3 → dooers_cli-0.8.0}/tests/test_token_store.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dooers-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: Dooers CLI — push 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>
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Classifier: Typing :: Typed
|
|
17
17
|
Requires-Python: >=3.10
|
|
18
|
-
Requires-Dist: dooers-protocol>=0.
|
|
18
|
+
Requires-Dist: dooers-protocol>=0.7.0
|
|
19
19
|
Requires-Dist: httpx>=0.28.1
|
|
20
20
|
Requires-Dist: pydantic>=2.13.2
|
|
21
21
|
Requires-Dist: pyyaml>=6.0.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dooers-cli"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.8.0"
|
|
4
4
|
description = "Dooers CLI — push agents to Dooers, manage agent records, authenticate from the terminal"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -26,7 +26,7 @@ dependencies = [
|
|
|
26
26
|
"pydantic>=2.13.2",
|
|
27
27
|
"pyyaml>=6.0.2",
|
|
28
28
|
"tqdm>=4.66.4",
|
|
29
|
-
"dooers-protocol>=0.
|
|
29
|
+
"dooers-protocol>=0.7.0",
|
|
30
30
|
]
|
|
31
31
|
|
|
32
32
|
[tool.uv.sources]
|
|
@@ -75,7 +75,9 @@ def create(
|
|
|
75
75
|
"Set Agent access key in Studio and AGENT_SEED_SECRET in env.prod before push.",
|
|
76
76
|
err=True,
|
|
77
77
|
)
|
|
78
|
-
typer.echo(
|
|
78
|
+
typer.echo(
|
|
79
|
+
"Edit dooers.yaml (message_path, whatsapp, profile, database) then run dooers push."
|
|
80
|
+
)
|
|
79
81
|
|
|
80
82
|
|
|
81
83
|
@app.command("rotate-key")
|
|
@@ -93,28 +93,33 @@ def collect_issues(root: Path | None = None) -> list[ValidationIssue]:
|
|
|
93
93
|
)
|
|
94
94
|
)
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
96
|
+
manifest = read_manifest(directory=base) if manifest_path.exists() else None
|
|
97
|
+
|
|
98
|
+
# A `dooers`-managed DB is provisioned by the platform and connected via IAM,
|
|
99
|
+
# so a local localhost AGENT_DATABASE_HOST (for `postgres` local dev) is expected.
|
|
100
|
+
managed_db = manifest is not None and manifest.database.type == "dooers"
|
|
101
|
+
if not managed_db:
|
|
102
|
+
for env_path in [base / ".env", *base.glob("env.*")]:
|
|
103
|
+
if not env_path.is_file():
|
|
102
104
|
continue
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
"
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
for raw in env_path.read_text().splitlines():
|
|
106
|
+
line = raw.strip()
|
|
107
|
+
if not line or line.startswith("#") or "=" not in line:
|
|
108
|
+
continue
|
|
109
|
+
key, _, value = line.partition("=")
|
|
110
|
+
if key.strip().upper() in {
|
|
111
|
+
"AGENT_DATABASE_HOST",
|
|
112
|
+
"DATABASE_HOST",
|
|
113
|
+
"POSTGRES_HOST",
|
|
114
|
+
} and value.strip().lower() in {"127.0.0.1", "localhost", "0.0.0.0"}:
|
|
115
|
+
issues.append(
|
|
116
|
+
ValidationIssue(
|
|
117
|
+
"warning",
|
|
118
|
+
f"{env_path.name} sets {key.strip()} to localhost — "
|
|
119
|
+
"hosted deploys need a cloud database configured in Dooers Studio",
|
|
120
|
+
)
|
|
114
121
|
)
|
|
115
|
-
)
|
|
116
122
|
|
|
117
|
-
manifest = read_manifest(directory=base) if manifest_path.exists() else None
|
|
118
123
|
if manifest is not None and manifest.hosting and not (base / "env.prod").is_file():
|
|
119
124
|
issues.append(
|
|
120
125
|
ValidationIssue(
|
|
@@ -105,6 +105,33 @@ hosting: true
|
|
|
105
105
|
assert any("localhost" in i.message.lower() for i in issues)
|
|
106
106
|
|
|
107
107
|
|
|
108
|
+
def test_validate_skips_localhost_db_warning_when_managed(tmp_path: Path) -> None:
|
|
109
|
+
"""With `database.type: dooers` the platform provisions the DB, so a local
|
|
110
|
+
localhost AGENT_DATABASE_HOST (used for `postgres` local dev) must not warn."""
|
|
111
|
+
_write(
|
|
112
|
+
tmp_path / "dooers.yaml",
|
|
113
|
+
"""
|
|
114
|
+
protocol_version: "2"
|
|
115
|
+
agent_id: "550e8400-e29b-41d4-a716-446655440000"
|
|
116
|
+
name: test
|
|
117
|
+
organization_id: "org_1"
|
|
118
|
+
hosting: true
|
|
119
|
+
database:
|
|
120
|
+
type: dooers
|
|
121
|
+
""".strip()
|
|
122
|
+
+ "\n",
|
|
123
|
+
)
|
|
124
|
+
_write(tmp_path / "Dockerfile", "FROM python:3.12-slim\n")
|
|
125
|
+
_write(
|
|
126
|
+
tmp_path / "pyproject.toml",
|
|
127
|
+
'[project]\ndependencies = ["dooers-agents-server>=0.12.0"]\n',
|
|
128
|
+
)
|
|
129
|
+
_write(tmp_path / ".env", "AGENT_DATABASE_HOST=127.0.0.1\n")
|
|
130
|
+
|
|
131
|
+
issues = collect_issues(tmp_path)
|
|
132
|
+
assert not any("localhost" in i.message.lower() for i in issues)
|
|
133
|
+
|
|
134
|
+
|
|
108
135
|
def test_validate_warns_when_hosting_without_env_prod(tmp_path: Path) -> None:
|
|
109
136
|
_write(
|
|
110
137
|
tmp_path / "dooers.yaml",
|
|
@@ -232,7 +232,7 @@ toml = [
|
|
|
232
232
|
|
|
233
233
|
[[package]]
|
|
234
234
|
name = "dooers-cli"
|
|
235
|
-
version = "0.
|
|
235
|
+
version = "0.8.0"
|
|
236
236
|
source = { editable = "." }
|
|
237
237
|
dependencies = [
|
|
238
238
|
{ name = "dooers-protocol" },
|
|
@@ -278,7 +278,7 @@ provides-extras = ["dev"]
|
|
|
278
278
|
|
|
279
279
|
[[package]]
|
|
280
280
|
name = "dooers-protocol"
|
|
281
|
-
version = "0.
|
|
281
|
+
version = "0.7.0"
|
|
282
282
|
source = { editable = "../dooers-protocol" }
|
|
283
283
|
dependencies = [
|
|
284
284
|
{ name = "pydantic" },
|
|
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
|