Part of #327. Implements session profiling, template extraction, and warm session bootstrapping.
675 lines
24 KiB
Python
675 lines
24 KiB
Python
"""
|
|
Warm Session Provisioning: Pre-Proficient Agent Sessions
|
|
|
|
This module implements the research framework for creating warm sessions
|
|
that start with marathon-level proficiency by pre-seeding with successful
|
|
patterns extracted from long-running sessions.
|
|
|
|
Issue: #327
|
|
"""
|
|
|
|
import json
|
|
import logging
|
|
from datetime import datetime
|
|
from pathlib import Path
|
|
from typing import Any, Dict, List, Optional, Tuple
|
|
from dataclasses import dataclass, asdict
|
|
import hashlib
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
@dataclass
|
|
class ToolCallPattern:
|
|
"""Pattern for successful tool calls."""
|
|
tool_name: str
|
|
success_rate: float
|
|
common_args: Dict[str, Any]
|
|
error_recovery: Optional[str] = None
|
|
context_requirements: List[str] = None
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
return asdict(self)
|
|
|
|
|
|
@dataclass
|
|
class UserPattern:
|
|
"""User interaction patterns."""
|
|
request_style: str # "direct", "detailed", "conversational"
|
|
feedback_style: str # "terse", "detailed", "corrections_only"
|
|
common_domains: List[str] # ["coding", "research", "file_management"]
|
|
preferred_tools: List[str]
|
|
|
|
|
|
@dataclass
|
|
class RecoveryPattern:
|
|
"""Error recovery patterns."""
|
|
error_type: str
|
|
error_message_pattern: str
|
|
recovery_strategy: str
|
|
success_rate: float
|
|
|
|
|
|
@dataclass
|
|
class SessionTemplate:
|
|
"""Template for warm sessions."""
|
|
template_id: str
|
|
name: str
|
|
description: str
|
|
tool_patterns: List[ToolCallPattern]
|
|
user_patterns: UserPattern
|
|
recovery_patterns: List[RecoveryPattern]
|
|
context_markers: List[str] # Key context elements to preserve
|
|
created_at: str
|
|
source_session_id: Optional[str] = None
|
|
version: str = "1.0"
|
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
return {
|
|
"template_id": self.template_id,
|
|
"name": self.name,
|
|
"description": self.description,
|
|
"tool_patterns": [p.to_dict() for p in self.tool_patterns],
|
|
"user_patterns": asdict(self.user_patterns),
|
|
"recovery_patterns": [asdict(r) for r in self.recovery_patterns],
|
|
"context_markers": self.context_markers,
|
|
"created_at": self.created_at,
|
|
"source_session_id": self.source_session_id,
|
|
"version": self.version
|
|
}
|
|
|
|
@classmethod
|
|
def from_dict(cls, data: Dict[str, Any]) -> 'SessionTemplate':
|
|
"""Create template from dictionary."""
|
|
tool_patterns = [
|
|
ToolCallPattern(**p) for p in data.get("tool_patterns", [])
|
|
]
|
|
user_patterns = UserPattern(**data.get("user_patterns", {}))
|
|
recovery_patterns = [
|
|
RecoveryPattern(**r) for r in data.get("recovery_patterns", [])
|
|
]
|
|
|
|
return cls(
|
|
template_id=data["template_id"],
|
|
name=data["name"],
|
|
description=data["description"],
|
|
tool_patterns=tool_patterns,
|
|
user_patterns=user_patterns,
|
|
recovery_patterns=recovery_patterns,
|
|
context_markers=data.get("context_markers", []),
|
|
created_at=data.get("created_at", datetime.now().isoformat()),
|
|
source_session_id=data.get("source_session_id"),
|
|
version=data.get("version", "1.0")
|
|
)
|
|
|
|
def generate_id(self) -> str:
|
|
"""Generate deterministic ID from content."""
|
|
content = json.dumps(self.to_dict(), sort_keys=True)
|
|
return hashlib.sha256(content.encode()).hexdigest()[:16]
|
|
|
|
|
|
class SessionProfiler:
|
|
"""Analyze sessions to extract proficiency patterns."""
|
|
|
|
def __init__(self, session_db=None):
|
|
self.session_db = session_db
|
|
|
|
def analyze_session(self, session_id: str) -> Dict[str, Any]:
|
|
"""
|
|
Analyze a session for proficiency markers.
|
|
|
|
Returns:
|
|
Dict with proficiency analysis including:
|
|
- tool_success_rates: Success rate per tool
|
|
- error_patterns: Common error patterns
|
|
- user_patterns: User interaction style
|
|
- context_markers: Key context elements
|
|
"""
|
|
if not self.session_db:
|
|
return {"error": "No session database available"}
|
|
|
|
try:
|
|
messages = self.session_db.get_messages(session_id)
|
|
if not messages:
|
|
return {"error": "No messages found"}
|
|
|
|
analysis = {
|
|
"session_id": session_id,
|
|
"message_count": len(messages),
|
|
"tool_calls": self._analyze_tool_calls(messages),
|
|
"error_patterns": self._analyze_errors(messages),
|
|
"user_patterns": self._analyze_user_patterns(messages),
|
|
"context_markers": self._extract_context_markers(messages),
|
|
"proficiency_score": self._calculate_proficiency(messages)
|
|
}
|
|
|
|
return analysis
|
|
|
|
except Exception as e:
|
|
logger.error(f"Session analysis failed: {e}")
|
|
return {"error": str(e)}
|
|
|
|
def _analyze_tool_calls(self, messages: List[Dict]) -> Dict[str, Any]:
|
|
"""Analyze tool call patterns."""
|
|
tool_stats = {}
|
|
|
|
for msg in messages:
|
|
if msg.get("role") == "assistant" and msg.get("tool_calls"):
|
|
for tool_call in msg["tool_calls"]:
|
|
tool_name = tool_call.get("function", {}).get("name", "unknown")
|
|
if tool_name not in tool_stats:
|
|
tool_stats[tool_name] = {"calls": 0, "successes": 0, "errors": 0}
|
|
tool_stats[tool_name]["calls"] += 1
|
|
|
|
# Check for tool results in subsequent messages
|
|
for i, msg in enumerate(messages):
|
|
if msg.get("role") == "tool":
|
|
# Find the corresponding tool call
|
|
for j in range(i-1, -1, -1):
|
|
if messages[j].get("role") == "assistant" and messages[j].get("tool_calls"):
|
|
for tool_call in messages[j]["tool_calls"]:
|
|
tool_name = tool_call.get("function", {}).get("name", "unknown")
|
|
if tool_name in tool_stats:
|
|
# Check if result indicates success or error
|
|
content = msg.get("content", "")
|
|
if "error" in content.lower() or "failed" in content.lower():
|
|
tool_stats[tool_name]["errors"] += 1
|
|
else:
|
|
tool_stats[tool_name]["successes"] += 1
|
|
break
|
|
|
|
# Calculate success rates
|
|
for tool_name, stats in tool_stats.items():
|
|
total = stats["successes"] + stats["errors"]
|
|
stats["success_rate"] = stats["successes"] / total if total > 0 else 0
|
|
|
|
return tool_stats
|
|
|
|
def _analyze_errors(self, messages: List[Dict]) -> List[Dict[str, Any]]:
|
|
"""Analyze error patterns."""
|
|
errors = []
|
|
|
|
for msg in messages:
|
|
if msg.get("role") == "tool":
|
|
content = msg.get("content", "")
|
|
if "error" in content.lower() or "failed" in content.lower():
|
|
errors.append({
|
|
"content": content[:200],
|
|
"timestamp": msg.get("timestamp"),
|
|
"tool_call_id": msg.get("tool_call_id")
|
|
})
|
|
|
|
return errors
|
|
|
|
def _analyze_user_patterns(self, messages: List[Dict]) -> Dict[str, Any]:
|
|
"""Analyze user interaction patterns."""
|
|
user_messages = [m for m in messages if m.get("role") == "user"]
|
|
|
|
if not user_messages:
|
|
return {}
|
|
|
|
# Analyze message lengths
|
|
lengths = [len(m.get("content", "")) for m in user_messages]
|
|
avg_length = sum(lengths) / len(lengths)
|
|
|
|
# Analyze question patterns
|
|
questions = sum(1 for m in user_messages if "?" in m.get("content", ""))
|
|
question_ratio = questions / len(user_messages)
|
|
|
|
# Analyze command patterns
|
|
commands = sum(1 for m in user_messages if m.get("content", "").startswith(("/")))
|
|
command_ratio = commands / len(user_messages)
|
|
|
|
return {
|
|
"message_count": len(user_messages),
|
|
"avg_message_length": avg_length,
|
|
"question_ratio": question_ratio,
|
|
"command_ratio": command_ratio,
|
|
"style": self._classify_user_style(avg_length, question_ratio, command_ratio)
|
|
}
|
|
|
|
def _classify_user_style(self, avg_length: float, question_ratio: float, command_ratio: float) -> str:
|
|
"""Classify user interaction style."""
|
|
if command_ratio > 0.3:
|
|
return "command_driven"
|
|
elif question_ratio > 0.5:
|
|
return "conversational"
|
|
elif avg_length < 50:
|
|
return "terse"
|
|
elif avg_length > 200:
|
|
return "detailed"
|
|
else:
|
|
return "balanced"
|
|
|
|
def _extract_context_markers(self, messages: List[Dict]) -> List[str]:
|
|
"""Extract key context markers from session."""
|
|
markers = []
|
|
|
|
# Look for file paths, URLs, code snippets
|
|
for msg in messages:
|
|
content = msg.get("content", "")
|
|
|
|
# File paths
|
|
import re
|
|
file_paths = re.findall(r'[/.\][\w/.-]+\.\w+', content)
|
|
markers.extend(file_paths[:3]) # Limit to 3 per message
|
|
|
|
# URLs
|
|
urls = re.findall(r'https?://[^\s]+', content)
|
|
markers.extend(urls[:2])
|
|
|
|
# Code snippets (simple heuristic)
|
|
if "```" in content:
|
|
markers.append("code_block")
|
|
|
|
# Deduplicate and limit
|
|
return list(set(markers))[:20]
|
|
|
|
def _calculate_proficiency(self, messages: List[Dict]) -> float:
|
|
"""
|
|
Calculate session proficiency score (0-1).
|
|
|
|
Based on:
|
|
- Tool call success rate
|
|
- Error recovery rate
|
|
- Context establishment
|
|
"""
|
|
if len(messages) < 10:
|
|
return 0.0
|
|
|
|
# Simple proficiency calculation
|
|
tool_calls = sum(1 for m in messages if m.get("role") == "assistant" and m.get("tool_calls"))
|
|
tool_results = sum(1 for m in messages if m.get("role") == "tool")
|
|
|
|
if tool_calls == 0:
|
|
return 0.5 # No tool calls, neutral score
|
|
|
|
# Ratio of successful tool results
|
|
successful_results = sum(
|
|
1 for m in messages
|
|
if m.get("role") == "tool" and
|
|
"error" not in m.get("content", "").lower() and
|
|
"failed" not in m.get("content", "").lower()
|
|
)
|
|
|
|
success_rate = successful_results / tool_results if tool_results > 0 else 0
|
|
|
|
# Factor in session length (marathon sessions get bonus)
|
|
length_factor = min(1.0, len(messages) / 100) # Cap at 100 messages
|
|
|
|
return (success_rate * 0.7) + (length_factor * 0.3)
|
|
|
|
|
|
class TemplateManager:
|
|
"""Manage session templates."""
|
|
|
|
def __init__(self, template_dir: Path = None):
|
|
self.template_dir = template_dir or Path.home() / ".hermes" / "session_templates"
|
|
self.template_dir.mkdir(parents=True, exist_ok=True)
|
|
|
|
def save_template(self, template: SessionTemplate) -> Path:
|
|
"""Save a session template."""
|
|
template_path = self.template_dir / f"{template.template_id}.json"
|
|
|
|
with open(template_path, 'w') as f:
|
|
json.dump(template.to_dict(), f, indent=2)
|
|
|
|
logger.info(f"Saved template {template.template_id} to {template_path}")
|
|
return template_path
|
|
|
|
def load_template(self, template_id: str) -> Optional[SessionTemplate]:
|
|
"""Load a session template."""
|
|
template_path = self.template_dir / f"{template_id}.json"
|
|
|
|
if not template_path.exists():
|
|
logger.warning(f"Template {template_id} not found")
|
|
return None
|
|
|
|
try:
|
|
with open(template_path, 'r') as f:
|
|
data = json.load(f)
|
|
|
|
return SessionTemplate.from_dict(data)
|
|
except Exception as e:
|
|
logger.error(f"Failed to load template {template_id}: {e}")
|
|
return None
|
|
|
|
def list_templates(self) -> List[Dict[str, Any]]:
|
|
"""List all available templates."""
|
|
templates = []
|
|
|
|
for template_path in self.template_dir.glob("*.json"):
|
|
try:
|
|
with open(template_path, 'r') as f:
|
|
data = json.load(f)
|
|
|
|
templates.append({
|
|
"template_id": data.get("template_id"),
|
|
"name": data.get("name"),
|
|
"description": data.get("description"),
|
|
"created_at": data.get("created_at"),
|
|
"source_session_id": data.get("source_session_id")
|
|
})
|
|
except Exception as e:
|
|
logger.warning(f"Failed to read template {template_path}: {e}")
|
|
|
|
return templates
|
|
|
|
def delete_template(self, template_id: str) -> bool:
|
|
"""Delete a session template."""
|
|
template_path = self.template_dir / f"{template_id}.json"
|
|
|
|
if template_path.exists():
|
|
template_path.unlink()
|
|
logger.info(f"Deleted template {template_id}")
|
|
return True
|
|
|
|
return False
|
|
|
|
|
|
class WarmSessionBootstrapper:
|
|
"""Bootstrap warm sessions from templates."""
|
|
|
|
def __init__(self, template_manager: TemplateManager = None):
|
|
self.template_manager = template_manager or TemplateManager()
|
|
|
|
def create_warm_session_messages(
|
|
self,
|
|
template: SessionTemplate,
|
|
user_message: str
|
|
) -> List[Dict[str, Any]]:
|
|
"""
|
|
Create initial messages for a warm session.
|
|
|
|
This injects context from the template to give the agent
|
|
a "memory" of successful patterns.
|
|
"""
|
|
messages = []
|
|
|
|
# Add system context about the template
|
|
template_context = f"""You are starting a warm session with pre-loaded proficiency patterns.
|
|
|
|
Template: {template.name}
|
|
Description: {template.description}
|
|
User Style: {template.user_patterns.request_style}
|
|
Preferred Tools: {', '.join(template.user_patterns.preferred_tools)}
|
|
|
|
Successful Tool Patterns:
|
|
{self._format_tool_patterns(template.tool_patterns)}
|
|
|
|
Error Recovery Patterns:
|
|
{self._format_recovery_patterns(template.recovery_patterns)}
|
|
|
|
Use these patterns to provide more reliable responses from the start."""
|
|
|
|
messages.append({
|
|
"role": "system",
|
|
"content": template_context
|
|
})
|
|
|
|
# Add synthetic successful tool calls to establish patterns
|
|
synthetic_messages = self._create_synthetic_tool_calls(template)
|
|
messages.extend(synthetic_messages)
|
|
|
|
# Add the actual user message
|
|
messages.append({
|
|
"role": "user",
|
|
"content": user_message
|
|
})
|
|
|
|
return messages
|
|
|
|
def _format_tool_patterns(self, patterns: List[ToolCallPattern]) -> str:
|
|
"""Format tool patterns for context."""
|
|
if not patterns:
|
|
return "No specific patterns recorded."
|
|
|
|
lines = []
|
|
for p in patterns[:5]: # Limit to top 5
|
|
lines.append(f"- {p.tool_name}: {p.success_rate:.0%} success, common args: {p.common_args}")
|
|
|
|
return "\n".join(lines)
|
|
|
|
def _format_recovery_patterns(self, patterns: List[RecoveryPattern]) -> str:
|
|
"""Format recovery patterns for context."""
|
|
if not patterns:
|
|
return "No recovery patterns recorded."
|
|
|
|
lines = []
|
|
for p in patterns[:3]: # Limit to top 3
|
|
lines.append(f"- {p.error_type}: {p.recovery_strategy} ({p.success_rate:.0%} success)")
|
|
|
|
return "\n".join(lines)
|
|
|
|
def _create_synthetic_tool_calls(self, template: SessionTemplate) -> List[Dict[str, Any]]:
|
|
"""
|
|
Create synthetic tool call examples from template.
|
|
|
|
This gives the agent examples of successful tool usage
|
|
without actually executing them.
|
|
"""
|
|
messages = []
|
|
|
|
# Create one synthetic successful tool call per pattern
|
|
for i, pattern in enumerate(template.tool_patterns[:3]):
|
|
# Create a synthetic user request
|
|
user_msg = {
|
|
"role": "user",
|
|
"content": f"[Synthetic example {i+1}] Show me how to use {pattern.tool_name}"
|
|
}
|
|
|
|
# Create a synthetic assistant response with tool call
|
|
assistant_msg = {
|
|
"role": "assistant",
|
|
"content": f"I'll demonstrate using {pattern.tool_name}.",
|
|
"tool_calls": [{
|
|
"id": f"synthetic_{i}",
|
|
"type": "function",
|
|
"function": {
|
|
"name": pattern.tool_name,
|
|
"arguments": json.dumps(pattern.common_args)
|
|
}
|
|
}]
|
|
}
|
|
|
|
# Create a synthetic successful result
|
|
tool_msg = {
|
|
"role": "tool",
|
|
"tool_call_id": f"synthetic_{i}",
|
|
"content": "Success: Operation completed successfully."
|
|
}
|
|
|
|
messages.extend([user_msg, assistant_msg, tool_msg])
|
|
|
|
return messages
|
|
|
|
|
|
# CLI Integration
|
|
def create_template_from_session(session_id: str, session_db, name: str = None) -> Optional[SessionTemplate]:
|
|
"""Create a template from an existing session."""
|
|
profiler = SessionProfiler(session_db)
|
|
analysis = profiler.analyze_session(session_id)
|
|
|
|
if "error" in analysis:
|
|
logger.error(f"Cannot create template: {analysis['error']}")
|
|
return None
|
|
|
|
# Convert analysis to template
|
|
tool_patterns = []
|
|
for tool_name, stats in analysis.get("tool_calls", {}).items():
|
|
if stats.get("success_rate", 0) > 0.7: # Only include successful patterns
|
|
tool_patterns.append(ToolCallPattern(
|
|
tool_name=tool_name,
|
|
success_rate=stats["success_rate"],
|
|
common_args={}, # Would need more analysis
|
|
context_requirements=[]
|
|
))
|
|
|
|
user_patterns_data = analysis.get("user_patterns", {})
|
|
user_patterns = UserPattern(
|
|
request_style=user_patterns_data.get("style", "balanced"),
|
|
feedback_style="balanced",
|
|
common_domains=[],
|
|
preferred_tools=list(analysis.get("tool_calls", {}).keys())[:3]
|
|
)
|
|
|
|
template = SessionTemplate(
|
|
template_id=f"warm_{session_id[:8]}",
|
|
name=name or f"Warm session from {session_id[:8]}",
|
|
description=f"Auto-generated from session {session_id}",
|
|
tool_patterns=tool_patterns,
|
|
user_patterns=user_patterns,
|
|
recovery_patterns=[],
|
|
context_markers=analysis.get("context_markers", []),
|
|
created_at=datetime.now().isoformat(),
|
|
source_session_id=session_id
|
|
)
|
|
|
|
return template
|
|
|
|
|
|
def warm_session_command(args):
|
|
"""CLI command for warm session management."""
|
|
import argparse
|
|
|
|
parser = argparse.ArgumentParser(description="Warm session provisioning")
|
|
subparsers = parser.add_subparsers(dest="command")
|
|
|
|
# Analyze command
|
|
analyze_parser = subparsers.add_parser("analyze", help="Analyze a session")
|
|
analyze_parser.add_argument("session_id", help="Session ID to analyze")
|
|
|
|
# Create template command
|
|
create_parser = subparsers.add_parser("create-template", help="Create template from session")
|
|
create_parser.add_argument("session_id", help="Session ID to create template from")
|
|
create_parser.add_argument("--name", "-n", help="Template name")
|
|
|
|
# List templates command
|
|
subparsers.add_parser("list-templates", help="List available templates")
|
|
|
|
# Test warm session command
|
|
test_parser = subparsers.add_parser("test", help="Test warm session creation")
|
|
test_parser.add_argument("template_id", help="Template ID to test")
|
|
test_parser.add_argument("message", help="Test message")
|
|
|
|
# Parse args
|
|
parsed = parser.parse_args(args)
|
|
|
|
if not parsed.command:
|
|
parser.print_help()
|
|
return 1
|
|
|
|
# Import session DB
|
|
try:
|
|
from hermes_state import SessionDB
|
|
session_db = SessionDB()
|
|
except ImportError:
|
|
print("Error: Cannot import SessionDB")
|
|
return 1
|
|
|
|
if parsed.command == "analyze":
|
|
profiler = SessionProfiler(session_db)
|
|
analysis = profiler.analyze_session(parsed.session_id)
|
|
|
|
print(f"\n=== Session Analysis: {parsed.session_id} ===\n")
|
|
|
|
if "error" in analysis:
|
|
print(f"Error: {analysis['error']}")
|
|
return 1
|
|
|
|
print(f"Messages: {analysis['message_count']}")
|
|
print(f"Proficiency Score: {analysis['proficiency_score']:.2f}")
|
|
|
|
print("\nTool Call Analysis:")
|
|
for tool, stats in analysis.get("tool_calls", {}).items():
|
|
print(f" {tool}: {stats.get('success_rate', 0):.0%} success ({stats.get('calls', 0)} calls)")
|
|
|
|
print("\nUser Patterns:")
|
|
user = analysis.get("user_patterns", {})
|
|
print(f" Style: {user.get('style', 'unknown')}")
|
|
print(f" Avg Length: {user.get('avg_message_length', 0):.0f} chars")
|
|
|
|
print("\nContext Markers:")
|
|
for marker in analysis.get("context_markers", [])[:5]:
|
|
print(f" {marker}")
|
|
|
|
return 0
|
|
|
|
elif parsed.command == "create-template":
|
|
template = create_template_from_session(
|
|
parsed.session_id,
|
|
session_db,
|
|
name=parsed.name
|
|
)
|
|
|
|
if template:
|
|
manager = TemplateManager()
|
|
path = manager.save_template(template)
|
|
print(f"Created template: {template.template_id}")
|
|
print(f"Saved to: {path}")
|
|
return 0
|
|
else:
|
|
print("Failed to create template")
|
|
return 1
|
|
|
|
elif parsed.command == "list-templates":
|
|
manager = TemplateManager()
|
|
templates = manager.list_templates()
|
|
|
|
if not templates:
|
|
print("No templates found.")
|
|
return 0
|
|
|
|
print("\n=== Available Templates ===\n")
|
|
for t in templates:
|
|
print(f"ID: {t['template_id']}")
|
|
print(f"Name: {t['name']}")
|
|
print(f"Description: {t['description']}")
|
|
print(f"Created: {t['created_at']}")
|
|
if t.get('source_session_id'):
|
|
print(f"Source: {t['source_session_id']}")
|
|
print()
|
|
|
|
return 0
|
|
|
|
elif parsed.command == "test":
|
|
manager = TemplateManager()
|
|
template = manager.load_template(parsed.template_id)
|
|
|
|
if not template:
|
|
print(f"Template {parsed.template_id} not found")
|
|
return 1
|
|
|
|
bootstrapper = WarmSessionBootstrapper(manager)
|
|
messages = bootstrapper.create_warm_session_messages(template, parsed.message)
|
|
|
|
print(f"\n=== Warm Session Test: {parsed.template_id} ===\n")
|
|
print(f"Generated {len(messages)} messages:")
|
|
|
|
for i, msg in enumerate(messages):
|
|
role = msg.get("role", "unknown")
|
|
content = msg.get("content", "")
|
|
|
|
if role == "system":
|
|
print(f"\n[System Context]")
|
|
print(content[:200] + "..." if len(content) > 200 else content)
|
|
elif role == "user":
|
|
print(f"\n[User]: {content}")
|
|
elif role == "assistant":
|
|
print(f"\n[Assistant]: {content}")
|
|
if msg.get("tool_calls"):
|
|
for tc in msg["tool_calls"]:
|
|
func = tc.get("function", {})
|
|
print(f" Tool Call: {func.get('name')}({func.get('arguments')})")
|
|
elif role == "tool":
|
|
print(f" [Tool Result]: {content[:100]}...")
|
|
|
|
return 0
|
|
|
|
return 1
|
|
|
|
|
|
if __name__ == "__main__":
|
|
import sys
|
|
sys.exit(warm_session_command(sys.argv[1:]))
|