dailybot-cli 0.3.2__tar.gz → 0.3.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.
Files changed (24) hide show
  1. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/PKG-INFO +8 -1
  2. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/README.md +7 -0
  3. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli/__init__.py +1 -1
  4. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli/commands/agent.py +15 -5
  5. dailybot_cli-0.3.4/dailybot_cli/commands/status.py +88 -0
  6. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli.egg-info/PKG-INFO +8 -1
  7. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/pyproject.toml +1 -1
  8. dailybot_cli-0.3.2/dailybot_cli/commands/status.py +0 -31
  9. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/LICENSE +0 -0
  10. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli/api_client.py +0 -0
  11. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli/commands/__init__.py +0 -0
  12. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli/commands/auth.py +0 -0
  13. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli/commands/config.py +0 -0
  14. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli/commands/interactive.py +0 -0
  15. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli/commands/update.py +0 -0
  16. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli/config.py +0 -0
  17. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli/display.py +0 -0
  18. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli/main.py +0 -0
  19. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli.egg-info/SOURCES.txt +0 -0
  20. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli.egg-info/dependency_links.txt +0 -0
  21. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli.egg-info/entry_points.txt +0 -0
  22. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli.egg-info/requires.txt +0 -0
  23. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/dailybot_cli.egg-info/top_level.txt +0 -0
  24. {dailybot_cli-0.3.2 → dailybot_cli-0.3.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dailybot-cli
3
- Version: 0.3.2
3
+ Version: 0.3.4
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
@@ -114,6 +117,9 @@ dailybot agent update "Sprint progress" --name "Claude Code" --json-data '{
114
117
  "blockers": []
115
118
  }'
116
119
 
120
+ # Attach metadata (repo, branch, PR, or any key-value context)
121
+ dailybot agent update "Fixed login bug" --name "Claude Code" --metadata '{"repo": "api-services", "branch": "fix/login", "pr": "#142"}'
122
+
117
123
  # Mark a report as a milestone
118
124
  dailybot agent update "Shipped v3.0" --milestone --name "Claude Code"
119
125
 
@@ -172,6 +178,7 @@ Usage: dailybot agent update [OPTIONS] CONTENT
172
178
  Options:
173
179
  -n, --name TEXT Agent worker name.
174
180
  -j, --json-data TEXT Structured JSON data to include.
181
+ -d, --metadata TEXT JSON metadata (e.g. repo, branch, PR).
175
182
  -m, --milestone Mark as a milestone accomplishment.
176
183
  -c, --co-authors TEXT Co-author email or UUID (repeatable, or comma-separated).
177
184
  --help Show this message and exit.
@@ -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
@@ -87,6 +90,9 @@ dailybot agent update "Sprint progress" --name "Claude Code" --json-data '{
87
90
  "blockers": []
88
91
  }'
89
92
 
93
+ # Attach metadata (repo, branch, PR, or any key-value context)
94
+ dailybot agent update "Fixed login bug" --name "Claude Code" --metadata '{"repo": "api-services", "branch": "fix/login", "pr": "#142"}'
95
+
90
96
  # Mark a report as a milestone
91
97
  dailybot agent update "Shipped v3.0" --milestone --name "Claude Code"
92
98
 
@@ -145,6 +151,7 @@ Usage: dailybot agent update [OPTIONS] CONTENT
145
151
  Options:
146
152
  -n, --name TEXT Agent worker name.
147
153
  -j, --json-data TEXT Structured JSON data to include.
154
+ -d, --metadata TEXT JSON metadata (e.g. repo, branch, PR).
148
155
  -m, --milestone Mark as a milestone accomplishment.
149
156
  -c, --co-authors TEXT Co-author email or UUID (repeatable, or comma-separated).
150
157
  --help Show this message and exit.
@@ -1,3 +1,3 @@
1
1
  """Dailybot CLI - The command-line bridge between humans and agents."""
2
2
 
3
- __version__: str = "0.3.2"
3
+ __version__: str = "0.3.4"
@@ -35,9 +35,10 @@ def agent() -> None:
35
35
  @click.argument("content")
36
36
  @click.option("--name", "-n", default="CLI Agent", help="Agent worker name.")
37
37
  @click.option("--json-data", "-j", help="Structured JSON data to include.")
38
+ @click.option("--metadata", "-d", help="JSON metadata (e.g. repo, branch, PR).")
38
39
  @click.option("--milestone", "-m", is_flag=True, default=False, help="Mark as a milestone accomplishment.")
39
40
  @click.option("--co-authors", "-c", multiple=True, help="Co-author email or UUID (repeatable, or comma-separated).")
40
- def agent_update(content: str, name: str, json_data: Optional[str], milestone: bool, co_authors: tuple[str, ...]) -> None:
41
+ def agent_update(content: str, name: str, json_data: Optional[str], metadata: Optional[str], milestone: bool, co_authors: tuple[str, ...]) -> None:
41
42
  """Submit an agent activity report.
42
43
 
43
44
  \b
@@ -48,16 +49,24 @@ def agent_update(content: str, name: str, json_data: Optional[str], milestone: b
48
49
  print_error(_NO_AUTH_MSG)
49
50
  raise SystemExit(1)
50
51
 
52
+ import json as json_mod
53
+
51
54
  structured: Optional[dict[str, Any]] = None
52
55
  if json_data:
53
- import json
54
-
55
56
  try:
56
- structured = json.loads(json_data)
57
- except json.JSONDecodeError:
57
+ structured = json_mod.loads(json_data)
58
+ except json_mod.JSONDecodeError:
58
59
  print_error("Invalid JSON in --json-data.")
59
60
  raise SystemExit(1)
60
61
 
62
+ metadata_dict: Optional[dict[str, Any]] = None
63
+ if metadata:
64
+ try:
65
+ metadata_dict = json_mod.loads(metadata)
66
+ except json_mod.JSONDecodeError:
67
+ print_error("Invalid JSON in --metadata.")
68
+ raise SystemExit(1)
69
+
61
70
  # Flatten comma-separated co-authors
62
71
  co_author_list: list[str] = []
63
72
  for val in co_authors:
@@ -73,6 +82,7 @@ def agent_update(content: str, name: str, json_data: Optional[str], milestone: b
73
82
  agent_name=name,
74
83
  content=content,
75
84
  structured=structured,
85
+ metadata=metadata_dict,
76
86
  is_milestone=milestone,
77
87
  co_authors=co_author_list or None,
78
88
  )
@@ -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.2
3
+ Version: 0.3.4
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
@@ -114,6 +117,9 @@ dailybot agent update "Sprint progress" --name "Claude Code" --json-data '{
114
117
  "blockers": []
115
118
  }'
116
119
 
120
+ # Attach metadata (repo, branch, PR, or any key-value context)
121
+ dailybot agent update "Fixed login bug" --name "Claude Code" --metadata '{"repo": "api-services", "branch": "fix/login", "pr": "#142"}'
122
+
117
123
  # Mark a report as a milestone
118
124
  dailybot agent update "Shipped v3.0" --milestone --name "Claude Code"
119
125
 
@@ -172,6 +178,7 @@ Usage: dailybot agent update [OPTIONS] CONTENT
172
178
  Options:
173
179
  -n, --name TEXT Agent worker name.
174
180
  -j, --json-data TEXT Structured JSON data to include.
181
+ -d, --metadata TEXT JSON metadata (e.g. repo, branch, PR).
175
182
  -m, --milestone Mark as a milestone accomplishment.
176
183
  -c, --co-authors TEXT Co-author email or UUID (repeatable, or comma-separated).
177
184
  --help Show this message and exit.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dailybot-cli"
7
- version = "0.3.2"
7
+ version = "0.3.4"
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