dailybot-cli 0.3.2__tar.gz → 0.3.3__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.
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/PKG-INFO +4 -1
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/README.md +3 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli/__init__.py +1 -1
- dailybot_cli-0.3.3/dailybot_cli/commands/status.py +88 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli.egg-info/PKG-INFO +4 -1
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/pyproject.toml +1 -1
- dailybot_cli-0.3.2/dailybot_cli/commands/status.py +0 -31
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/LICENSE +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli/api_client.py +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli/commands/__init__.py +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli/commands/agent.py +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli/commands/auth.py +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli/commands/config.py +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli/commands/interactive.py +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli/commands/update.py +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli/config.py +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli/display.py +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli/main.py +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli.egg-info/SOURCES.txt +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli.egg-info/dependency_links.txt +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli.egg-info/entry_points.txt +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli.egg-info/requires.txt +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/dailybot_cli.egg-info/top_level.txt +0 -0
- {dailybot_cli-0.3.2 → dailybot_cli-0.3.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dailybot-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Dailybot CLI - The command-line bridge between humans and agents. Progress reports, observability, and workflow automation for modern teams across Slack, Google Chat, Discord, MS Teams, and more.
|
|
5
5
|
Author-email: Dailybot <support@dailybot.com>
|
|
6
6
|
License: MIT
|
|
@@ -96,6 +96,9 @@ dailybot login --email=user@example.com --code=123456
|
|
|
96
96
|
# Multi-org accounts: step 2 prints available organizations with UUIDs.
|
|
97
97
|
# Re-run with --org to select one:
|
|
98
98
|
dailybot login --email=user@example.com --code=123456 --org=abc-123
|
|
99
|
+
|
|
100
|
+
# Verify credentials are valid (checks login session, then API key)
|
|
101
|
+
dailybot status --auth
|
|
99
102
|
```
|
|
100
103
|
|
|
101
104
|
### Agent commands
|
|
@@ -69,6 +69,9 @@ dailybot login --email=user@example.com --code=123456
|
|
|
69
69
|
# Multi-org accounts: step 2 prints available organizations with UUIDs.
|
|
70
70
|
# Re-run with --org to select one:
|
|
71
71
|
dailybot login --email=user@example.com --code=123456 --org=abc-123
|
|
72
|
+
|
|
73
|
+
# Verify credentials are valid (checks login session, then API key)
|
|
74
|
+
dailybot status --auth
|
|
72
75
|
```
|
|
73
76
|
|
|
74
77
|
### Agent commands
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"""Status command for Dailybot CLI."""
|
|
2
|
+
|
|
3
|
+
from typing import Any, Optional
|
|
4
|
+
|
|
5
|
+
import click
|
|
6
|
+
|
|
7
|
+
from dailybot_cli.api_client import APIError, DailyBotClient
|
|
8
|
+
from dailybot_cli.config import get_api_key, get_token
|
|
9
|
+
from dailybot_cli.display import (
|
|
10
|
+
console,
|
|
11
|
+
print_auth_status,
|
|
12
|
+
print_error,
|
|
13
|
+
print_info,
|
|
14
|
+
print_pending_checkins,
|
|
15
|
+
print_success,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _check_auth() -> None:
|
|
20
|
+
"""Check authentication status: try OTP login first, then API key."""
|
|
21
|
+
client: DailyBotClient = DailyBotClient()
|
|
22
|
+
|
|
23
|
+
# Try OTP/login token first
|
|
24
|
+
token: Optional[str] = get_token()
|
|
25
|
+
if token:
|
|
26
|
+
try:
|
|
27
|
+
with console.status("Checking login session..."):
|
|
28
|
+
data: dict[str, Any] = client.auth_status()
|
|
29
|
+
print_success("Authenticated via login (OTP)")
|
|
30
|
+
print_auth_status(data)
|
|
31
|
+
return
|
|
32
|
+
except APIError:
|
|
33
|
+
print_info("Login session is invalid or expired.")
|
|
34
|
+
|
|
35
|
+
# Try API key
|
|
36
|
+
api_key: Optional[str] = get_api_key()
|
|
37
|
+
if api_key:
|
|
38
|
+
try:
|
|
39
|
+
with console.status("Checking API key..."):
|
|
40
|
+
client.get_agent_health(agent_name="CLI")
|
|
41
|
+
print_success("Authenticated via API key")
|
|
42
|
+
masked: str = api_key[:4] + "****"
|
|
43
|
+
print_info(f"API key: {masked}")
|
|
44
|
+
return
|
|
45
|
+
except APIError as e:
|
|
46
|
+
if e.status_code in (401, 403):
|
|
47
|
+
print_error("API key is invalid or unauthorized.")
|
|
48
|
+
else:
|
|
49
|
+
# Non-auth error means the key itself is valid
|
|
50
|
+
print_success("Authenticated via API key")
|
|
51
|
+
masked = api_key[:4] + "****"
|
|
52
|
+
print_info(f"API key: {masked}")
|
|
53
|
+
return
|
|
54
|
+
|
|
55
|
+
print_error("Not authenticated. Run: dailybot login or dailybot config key=YOUR_KEY")
|
|
56
|
+
raise SystemExit(1)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@click.command()
|
|
60
|
+
@click.option("--auth", is_flag=True, default=False, help="Check authentication status.")
|
|
61
|
+
def status(auth: bool) -> None:
|
|
62
|
+
"""Show pending check-ins for today.
|
|
63
|
+
|
|
64
|
+
\b
|
|
65
|
+
Use --auth to verify your credentials are valid:
|
|
66
|
+
dailybot status --auth
|
|
67
|
+
"""
|
|
68
|
+
if auth:
|
|
69
|
+
_check_auth()
|
|
70
|
+
return
|
|
71
|
+
|
|
72
|
+
token: Optional[str] = get_token()
|
|
73
|
+
if not token:
|
|
74
|
+
print_error("Not logged in. Run: dailybot login")
|
|
75
|
+
raise SystemExit(1)
|
|
76
|
+
|
|
77
|
+
client: DailyBotClient = DailyBotClient()
|
|
78
|
+
try:
|
|
79
|
+
with console.status("Fetching pending check-ins..."):
|
|
80
|
+
data: dict[str, Any] = client.get_status()
|
|
81
|
+
checkins: list[dict[str, Any]] = data.get("pending_checkins", [])
|
|
82
|
+
print_pending_checkins(checkins)
|
|
83
|
+
except APIError as e:
|
|
84
|
+
if e.status_code in (401, 403):
|
|
85
|
+
print_error("Session expired. Please log in again: dailybot login")
|
|
86
|
+
else:
|
|
87
|
+
print_error(e.detail)
|
|
88
|
+
raise SystemExit(1)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dailybot-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Dailybot CLI - The command-line bridge between humans and agents. Progress reports, observability, and workflow automation for modern teams across Slack, Google Chat, Discord, MS Teams, and more.
|
|
5
5
|
Author-email: Dailybot <support@dailybot.com>
|
|
6
6
|
License: MIT
|
|
@@ -96,6 +96,9 @@ dailybot login --email=user@example.com --code=123456
|
|
|
96
96
|
# Multi-org accounts: step 2 prints available organizations with UUIDs.
|
|
97
97
|
# Re-run with --org to select one:
|
|
98
98
|
dailybot login --email=user@example.com --code=123456 --org=abc-123
|
|
99
|
+
|
|
100
|
+
# Verify credentials are valid (checks login session, then API key)
|
|
101
|
+
dailybot status --auth
|
|
99
102
|
```
|
|
100
103
|
|
|
101
104
|
### Agent commands
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dailybot-cli"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.3"
|
|
8
8
|
description = "Dailybot CLI - The command-line bridge between humans and agents. Progress reports, observability, and workflow automation for modern teams across Slack, Google Chat, Discord, MS Teams, and more."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"""Status command for Dailybot CLI."""
|
|
2
|
-
|
|
3
|
-
from typing import Any, Optional
|
|
4
|
-
|
|
5
|
-
import click
|
|
6
|
-
|
|
7
|
-
from dailybot_cli.api_client import APIError, DailyBotClient
|
|
8
|
-
from dailybot_cli.config import get_token
|
|
9
|
-
from dailybot_cli.display import console, print_error, print_pending_checkins
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@click.command()
|
|
13
|
-
def status() -> None:
|
|
14
|
-
"""Show pending check-ins for today."""
|
|
15
|
-
token: Optional[str] = get_token()
|
|
16
|
-
if not token:
|
|
17
|
-
print_error("Not logged in. Run: dailybot login")
|
|
18
|
-
raise SystemExit(1)
|
|
19
|
-
|
|
20
|
-
client: DailyBotClient = DailyBotClient()
|
|
21
|
-
try:
|
|
22
|
-
with console.status("Fetching pending check-ins..."):
|
|
23
|
-
data: dict[str, Any] = client.get_status()
|
|
24
|
-
checkins: list[dict[str, Any]] = data.get("pending_checkins", [])
|
|
25
|
-
print_pending_checkins(checkins)
|
|
26
|
-
except APIError as e:
|
|
27
|
-
if e.status_code in (401, 403):
|
|
28
|
-
print_error("Session expired. Please log in again: dailybot login")
|
|
29
|
-
else:
|
|
30
|
-
print_error(e.detail)
|
|
31
|
-
raise SystemExit(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
|