htmlgraph 0.24.2__py3-none-any.whl → 0.25.0__py3-none-any.whl
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.
- htmlgraph/__init__.py +20 -1
- htmlgraph/agent_detection.py +26 -10
- htmlgraph/analytics/cross_session.py +4 -3
- htmlgraph/analytics/work_type.py +52 -16
- htmlgraph/analytics_index.py +51 -19
- htmlgraph/api/__init__.py +3 -0
- htmlgraph/api/main.py +2115 -0
- htmlgraph/api/static/htmx.min.js +1 -0
- htmlgraph/api/static/style-redesign.css +1344 -0
- htmlgraph/api/static/style.css +1079 -0
- htmlgraph/api/templates/dashboard-redesign.html +812 -0
- htmlgraph/api/templates/dashboard.html +783 -0
- htmlgraph/api/templates/partials/activity-feed-hierarchical.html +326 -0
- htmlgraph/api/templates/partials/activity-feed.html +570 -0
- htmlgraph/api/templates/partials/agents-redesign.html +317 -0
- htmlgraph/api/templates/partials/agents.html +317 -0
- htmlgraph/api/templates/partials/event-traces.html +373 -0
- htmlgraph/api/templates/partials/features-kanban-redesign.html +509 -0
- htmlgraph/api/templates/partials/features.html +509 -0
- htmlgraph/api/templates/partials/metrics-redesign.html +346 -0
- htmlgraph/api/templates/partials/metrics.html +346 -0
- htmlgraph/api/templates/partials/orchestration-redesign.html +443 -0
- htmlgraph/api/templates/partials/orchestration.html +163 -0
- htmlgraph/api/templates/partials/spawners.html +375 -0
- htmlgraph/atomic_ops.py +560 -0
- htmlgraph/builders/base.py +55 -1
- htmlgraph/builders/bug.py +17 -2
- htmlgraph/builders/chore.py +17 -2
- htmlgraph/builders/epic.py +17 -2
- htmlgraph/builders/feature.py +25 -2
- htmlgraph/builders/phase.py +17 -2
- htmlgraph/builders/spike.py +27 -2
- htmlgraph/builders/track.py +14 -0
- htmlgraph/cigs/__init__.py +4 -0
- htmlgraph/cigs/reporter.py +818 -0
- htmlgraph/cli.py +1427 -401
- htmlgraph/cli_commands/__init__.py +1 -0
- htmlgraph/cli_commands/feature.py +195 -0
- htmlgraph/cli_framework.py +115 -0
- htmlgraph/collections/__init__.py +2 -0
- htmlgraph/collections/base.py +21 -0
- htmlgraph/collections/session.py +189 -0
- htmlgraph/collections/spike.py +7 -1
- htmlgraph/collections/task_delegation.py +236 -0
- htmlgraph/collections/traces.py +482 -0
- htmlgraph/config.py +113 -0
- htmlgraph/converter.py +41 -0
- htmlgraph/cost_analysis/__init__.py +5 -0
- htmlgraph/cost_analysis/analyzer.py +438 -0
- htmlgraph/dashboard.html +3315 -492
- htmlgraph-0.24.2.data/data/htmlgraph/dashboard.html → htmlgraph/dashboard.html.backup +2246 -248
- htmlgraph/dashboard.html.bak +7181 -0
- htmlgraph/dashboard.html.bak2 +7231 -0
- htmlgraph/dashboard.html.bak3 +7232 -0
- htmlgraph/db/__init__.py +38 -0
- htmlgraph/db/queries.py +790 -0
- htmlgraph/db/schema.py +1334 -0
- htmlgraph/deploy.py +26 -27
- htmlgraph/docs/API_REFERENCE.md +841 -0
- htmlgraph/docs/HTTP_API.md +750 -0
- htmlgraph/docs/INTEGRATION_GUIDE.md +752 -0
- htmlgraph/docs/ORCHESTRATION_PATTERNS.md +710 -0
- htmlgraph/docs/README.md +533 -0
- htmlgraph/docs/version_check.py +3 -1
- htmlgraph/error_handler.py +544 -0
- htmlgraph/event_log.py +2 -0
- htmlgraph/hooks/__init__.py +8 -0
- htmlgraph/hooks/bootstrap.py +169 -0
- htmlgraph/hooks/context.py +271 -0
- htmlgraph/hooks/drift_handler.py +521 -0
- htmlgraph/hooks/event_tracker.py +405 -15
- htmlgraph/hooks/post_tool_use_handler.py +257 -0
- htmlgraph/hooks/pretooluse.py +476 -6
- htmlgraph/hooks/prompt_analyzer.py +648 -0
- htmlgraph/hooks/session_handler.py +583 -0
- htmlgraph/hooks/state_manager.py +501 -0
- htmlgraph/hooks/subagent_stop.py +309 -0
- htmlgraph/hooks/task_enforcer.py +39 -0
- htmlgraph/models.py +111 -15
- htmlgraph/operations/fastapi_server.py +230 -0
- htmlgraph/orchestration/headless_spawner.py +22 -14
- htmlgraph/pydantic_models.py +476 -0
- htmlgraph/quality_gates.py +350 -0
- htmlgraph/repo_hash.py +511 -0
- htmlgraph/sdk.py +348 -10
- htmlgraph/server.py +194 -0
- htmlgraph/session_hooks.py +300 -0
- htmlgraph/session_manager.py +131 -1
- htmlgraph/session_registry.py +587 -0
- htmlgraph/session_state.py +436 -0
- htmlgraph/system_prompts.py +449 -0
- htmlgraph/templates/orchestration-view.html +350 -0
- htmlgraph/track_builder.py +19 -0
- htmlgraph/validation.py +115 -0
- htmlgraph-0.25.0.data/data/htmlgraph/dashboard.html +7417 -0
- {htmlgraph-0.24.2.dist-info → htmlgraph-0.25.0.dist-info}/METADATA +91 -64
- {htmlgraph-0.24.2.dist-info → htmlgraph-0.25.0.dist-info}/RECORD +103 -42
- {htmlgraph-0.24.2.data → htmlgraph-0.25.0.data}/data/htmlgraph/styles.css +0 -0
- {htmlgraph-0.24.2.data → htmlgraph-0.25.0.data}/data/htmlgraph/templates/AGENTS.md.template +0 -0
- {htmlgraph-0.24.2.data → htmlgraph-0.25.0.data}/data/htmlgraph/templates/CLAUDE.md.template +0 -0
- {htmlgraph-0.24.2.data → htmlgraph-0.25.0.data}/data/htmlgraph/templates/GEMINI.md.template +0 -0
- {htmlgraph-0.24.2.dist-info → htmlgraph-0.25.0.dist-info}/WHEEL +0 -0
- {htmlgraph-0.24.2.dist-info → htmlgraph-0.25.0.dist-info}/entry_points.txt +0 -0
htmlgraph/deploy.py
CHANGED
|
@@ -16,14 +16,11 @@ from dataclasses import dataclass, field
|
|
|
16
16
|
from pathlib import Path
|
|
17
17
|
from typing import cast
|
|
18
18
|
|
|
19
|
+
from rich.console import Console
|
|
20
|
+
from rich.prompt import Confirm
|
|
19
21
|
|
|
20
|
-
#
|
|
21
|
-
|
|
22
|
-
RED = "\033[0;31m"
|
|
23
|
-
GREEN = "\033[0;32m"
|
|
24
|
-
YELLOW = "\033[1;33m"
|
|
25
|
-
BLUE = "\033[0;34m"
|
|
26
|
-
NC = "\033[0m" # No Color
|
|
22
|
+
# Global Rich Console for beautiful CLI output
|
|
23
|
+
console = Console()
|
|
27
24
|
|
|
28
25
|
|
|
29
26
|
@dataclass
|
|
@@ -157,27 +154,25 @@ class Deployer:
|
|
|
157
154
|
|
|
158
155
|
def log_section(self, message: str) -> None:
|
|
159
156
|
"""Log a section header."""
|
|
160
|
-
print()
|
|
161
|
-
print(f"{
|
|
162
|
-
print(
|
|
163
|
-
print(f"{Colors.BLUE}{'=' * 60}{Colors.NC}")
|
|
164
|
-
print()
|
|
157
|
+
console.print()
|
|
158
|
+
console.print(f"[bold blue]{message}[/bold blue]")
|
|
159
|
+
console.print()
|
|
165
160
|
|
|
166
161
|
def log_success(self, message: str) -> None:
|
|
167
162
|
"""Log a success message."""
|
|
168
|
-
print(f"
|
|
163
|
+
console.print(f"[green]✅ {message}[/green]")
|
|
169
164
|
|
|
170
165
|
def log_error(self, message: str) -> None:
|
|
171
166
|
"""Log an error message."""
|
|
172
|
-
print(f"
|
|
167
|
+
console.print(f"[red]❌ {message}[/red]")
|
|
173
168
|
|
|
174
169
|
def log_warning(self, message: str) -> None:
|
|
175
170
|
"""Log a warning message."""
|
|
176
|
-
print(f"
|
|
171
|
+
console.print(f"[yellow]⚠️ {message}[/yellow]")
|
|
177
172
|
|
|
178
173
|
def log_info(self, message: str) -> None:
|
|
179
174
|
"""Log an info message."""
|
|
180
|
-
print(f"ℹ️ {message}")
|
|
175
|
+
console.print(f"[cyan]ℹ️ {message}[/cyan]")
|
|
181
176
|
|
|
182
177
|
def run_command(
|
|
183
178
|
self,
|
|
@@ -205,7 +200,8 @@ class Deployer:
|
|
|
205
200
|
except subprocess.CalledProcessError as e:
|
|
206
201
|
self.log_error(f"Command failed: {' '.join(cmd)}")
|
|
207
202
|
if e.stderr:
|
|
208
|
-
|
|
203
|
+
# Print error to stderr using console (Rich supports stderr output)
|
|
204
|
+
console.print(e.stderr, style="red")
|
|
209
205
|
raise
|
|
210
206
|
|
|
211
207
|
def run_hook(self, hook_commands: list[str], hook_name: str) -> None:
|
|
@@ -242,8 +238,7 @@ class Deployer:
|
|
|
242
238
|
if result.returncode != 0:
|
|
243
239
|
self.log_warning("You have uncommitted changes")
|
|
244
240
|
if not self.dry_run:
|
|
245
|
-
|
|
246
|
-
if response.lower() != "y":
|
|
241
|
+
if not Confirm.ask("Continue anyway?", default=False):
|
|
247
242
|
sys.exit(1)
|
|
248
243
|
|
|
249
244
|
# Push to remote
|
|
@@ -286,7 +281,7 @@ class Deployer:
|
|
|
286
281
|
if dist_dir.exists():
|
|
287
282
|
self.log_info("Build artifacts:")
|
|
288
283
|
for file in dist_dir.iterdir():
|
|
289
|
-
print(f" - {file.name}")
|
|
284
|
+
console.print(f"[dim] - {file.name}[/dim]")
|
|
290
285
|
|
|
291
286
|
def _step_pypi_publish(self) -> None:
|
|
292
287
|
"""Publish to PyPI."""
|
|
@@ -324,8 +319,7 @@ class Deployer:
|
|
|
324
319
|
f"PyPI token not found (looking for {token_var} or UV_PUBLISH_TOKEN)"
|
|
325
320
|
)
|
|
326
321
|
if not self.dry_run:
|
|
327
|
-
|
|
328
|
-
if response.lower() != "y":
|
|
322
|
+
if not Confirm.ask("Continue anyway?", default=False):
|
|
329
323
|
sys.exit(1)
|
|
330
324
|
|
|
331
325
|
# Publish
|
|
@@ -464,7 +458,7 @@ class Deployer:
|
|
|
464
458
|
# Summary
|
|
465
459
|
self.log_section("Deployment Complete! 🎉")
|
|
466
460
|
self.log_success("All deployment steps completed successfully!")
|
|
467
|
-
print()
|
|
461
|
+
console.print()
|
|
468
462
|
|
|
469
463
|
|
|
470
464
|
def create_deployment_config_template(output_path: Path) -> None:
|
|
@@ -526,7 +520,12 @@ post_publish = []
|
|
|
526
520
|
"""
|
|
527
521
|
|
|
528
522
|
output_path.write_text(template)
|
|
529
|
-
print(
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
print(
|
|
523
|
+
console.print(
|
|
524
|
+
f"[green]✅ Created deployment config template: {output_path}[/green]"
|
|
525
|
+
)
|
|
526
|
+
console.print()
|
|
527
|
+
console.print("[bold cyan]Next steps:[/bold cyan]")
|
|
528
|
+
console.print(
|
|
529
|
+
"[dim]1. Edit htmlgraph-deploy.toml to customize your deployment[/dim]"
|
|
530
|
+
)
|
|
531
|
+
console.print("[dim]2. Run: htmlgraph deploy run[/dim]")
|