2026-10-03 19:48:09 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
"""
|
2026-10-04 01:10:45 +00:00
|
|
|
DM: Headless Direct Message API (muse.ai) — with UUID tagging and logging.
|
2026-10-03 19:48:09 +00:00
|
|
|
|
2026-10-04 01:10:45 +00:00
|
|
|
Every send generates a UUID and logs to dm-log.jsonl.
|
|
|
|
|
NOTE (2026-10-03): read-back verification was REMOVED. It only read the
|
|
|
|
|
sender's own headless DOM (local echo) and reported VERIFIED for messages
|
|
|
|
|
that never reached the server (confirmed: nothing in the web UI). SENT means
|
|
|
|
|
the send command ran — it is NOT proof of delivery. Confirm receipt from
|
|
|
|
|
an independent session (e.g. the web UI) instead.
|
2026-10-03 19:48:09 +00:00
|
|
|
|
|
|
|
|
Usage:
|
2026-10-04 01:10:45 +00:00
|
|
|
dm.py send --agent 646 --target <chat_id|main>\n dm.py send --agent opm --to 646 --target main "message"
|
|
|
|
|
dm.py send --agent pip --target main --raw "$(dm-sign.sh operator-646 'hi')"
|
|
|
|
|
dm.py verify-sig --agent pip --target main # verify signed DMs in recent reads
|
2026-10-03 19:48:09 +00:00
|
|
|
dm.py read --agent 646 --target <chat_id|main> [n]
|
2026-10-03 21:36:42 +00:00
|
|
|
dm.py verify --agent 646 --target <chat_id|main> <uuid>
|
|
|
|
|
dm.py log [--n 20]
|
2026-10-03 19:48:09 +00:00
|
|
|
"""
|
|
|
|
|
import argparse
|
|
|
|
|
import subprocess
|
|
|
|
|
import time
|
|
|
|
|
import sys
|
2026-10-03 21:36:42 +00:00
|
|
|
import uuid
|
|
|
|
|
import json
|
|
|
|
|
import os
|
|
|
|
|
from datetime import datetime, timezone
|
2026-10-03 19:48:09 +00:00
|
|
|
|
|
|
|
|
API = "/home/super/Projects/NetVM/bin/muse-chat-api.py"
|
|
|
|
|
NETVM_EXEC = "/home/super/Projects/NetVM/bin/netvm-exec.sh"
|
2026-10-03 20:50:53 +00:00
|
|
|
VALID_AGENTS = ["muse", "pip", "646", "opm"]
|
2026-10-03 21:36:42 +00:00
|
|
|
LOG_FILE = "/home/super/Projects/NetVM/dm-log.jsonl"
|
|
|
|
|
|
|
|
|
|
def log_event(event):
|
|
|
|
|
"""Append to JSONL log."""
|
|
|
|
|
event["ts"] = datetime.now(timezone.utc).isoformat()
|
|
|
|
|
with open(LOG_FILE, "a") as f:
|
|
|
|
|
f.write(json.dumps(event) + "\n")
|
2026-10-03 19:48:09 +00:00
|
|
|
|
|
|
|
|
def run(cmd, timeout=60):
|
|
|
|
|
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)
|
|
|
|
|
return result.stdout.strip()
|
|
|
|
|
|
2026-10-04 01:10:45 +00:00
|
|
|
def run_full(cmd, timeout=60):
|
|
|
|
|
"""Variant returning (rc, stdout, stderr) for calls where a silent
|
|
|
|
|
failure is worse than noise (observed 2026-10-03: opm's browser was dead
|
|
|
|
|
and `dm.py read` printed nothing with exit 0, hiding the outage)."""
|
|
|
|
|
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)
|
|
|
|
|
return result.returncode, result.stdout.strip(), result.stderr.strip()
|
|
|
|
|
|
|
|
|
|
def dm_send(agent, target, message, verify=True, raw=False, to_agent=None):
|
|
|
|
|
"""Send a DM. raw=True sends verbatim (for pre-signed messages): no UUID
|
|
|
|
|
tag, no truncation."""
|
|
|
|
|
# Cross-operator: to_agent is the recipient (whose browser/chat to use).
|
|
|
|
|
# agent is the sender (for attribution). If to_agent is None, send to own chat.
|
|
|
|
|
recipient = to_agent if to_agent else agent
|
|
|
|
|
sender_prefix = f"[from {agent}] " if (to_agent and to_agent != agent) else ""
|
|
|
|
|
|
2026-10-03 19:48:09 +00:00
|
|
|
if agent not in VALID_AGENTS:
|
|
|
|
|
print(f"ERROR: Unknown agent {agent}", file=sys.stderr)
|
|
|
|
|
sys.exit(1)
|
2026-10-04 01:10:45 +00:00
|
|
|
if recipient not in VALID_AGENTS:
|
|
|
|
|
print(f"ERROR: Unknown recipient {recipient}", file=sys.stderr)
|
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
|
|
if raw:
|
|
|
|
|
tagged = message
|
|
|
|
|
msg_id = "raw"
|
|
|
|
|
else:
|
|
|
|
|
msg_id = str(uuid.uuid4())[:8]
|
|
|
|
|
# Embed ID in message for tracking
|
|
|
|
|
tagged = f"[{msg_id}] {message}"
|
|
|
|
|
|
|
|
|
|
log_event({"type": "send_start", "id": msg_id, "agent": agent, "to": recipient, "target": target, "msg": message[:100]})
|
2026-10-03 21:36:42 +00:00
|
|
|
|
2026-10-03 19:48:09 +00:00
|
|
|
# Navigate to target
|
|
|
|
|
if target == "main":
|
|
|
|
|
run(f"{NETVM_EXEC} {agent} -- python3 {API} --account {agent} sidechat main")
|
|
|
|
|
else:
|
|
|
|
|
run(f"{NETVM_EXEC} {agent} -- python3 {API} --account {agent} sidechat use {target}")
|
|
|
|
|
|
|
|
|
|
time.sleep(2)
|
|
|
|
|
|
2026-10-04 01:10:45 +00:00
|
|
|
# Send (raw mode: no truncation — signatures must survive intact)
|
|
|
|
|
tagged = sender_prefix + tagged
|
|
|
|
|
safe = tagged.replace('"', '\\"').replace('$', '\\$').replace('`', '\\`')
|
|
|
|
|
if not raw:
|
|
|
|
|
safe = safe[:1000]
|
|
|
|
|
|
|
|
|
|
# Send with verification retries
|
|
|
|
|
# The underlying muse-chat-api.py send returns None/unreliable status,
|
|
|
|
|
# so we verify by reading the recipient's chat for our message ID.
|
|
|
|
|
max_retries = 3
|
|
|
|
|
delivered = False
|
|
|
|
|
for attempt in range(max_retries):
|
|
|
|
|
run(f'{NETVM_EXEC} {recipient} -- python3 {API} --account {recipient} send "{safe}"')
|
|
|
|
|
time.sleep(3) # Wait for message to propagate
|
|
|
|
|
|
|
|
|
|
# Verify by reading recipient's chat (independent check, not local echo)
|
|
|
|
|
try:
|
|
|
|
|
check_msgs = run(f'{NETVM_EXEC} {recipient} -- python3 {API} --account {recipient} messages 5 200')
|
|
|
|
|
if msg_id in check_msgs:
|
|
|
|
|
delivered = True
|
|
|
|
|
log_event({"type": "verified", "id": msg_id, "agent": agent, "to": recipient, "target": target, "attempt": attempt + 1})
|
|
|
|
|
break
|
|
|
|
|
else:
|
|
|
|
|
log_event({"type": "retry", "id": msg_id, "agent": agent, "to": recipient, "attempt": attempt + 1})
|
|
|
|
|
except Exception as e:
|
|
|
|
|
log_event({"type": "verify_error", "id": msg_id, "error": str(e)[:100]})
|
|
|
|
|
|
|
|
|
|
if attempt < max_retries - 1:
|
|
|
|
|
time.sleep(2) # Brief pause before retry
|
2026-10-03 19:48:09 +00:00
|
|
|
|
|
|
|
|
# Back to main
|
|
|
|
|
run(f"{NETVM_EXEC} {agent} -- python3 {API} --account {agent} sidechat main")
|
|
|
|
|
|
2026-10-04 01:10:45 +00:00
|
|
|
log_event({"type": "send_done", "id": msg_id, "agent": agent, "to": recipient, "target": target})
|
2026-10-03 21:36:42 +00:00
|
|
|
|
2026-10-04 01:10:45 +00:00
|
|
|
if delivered:
|
|
|
|
|
log_event({"type": "sent", "id": msg_id, "agent": agent, "to": recipient, "target": target, "verified": True})
|
|
|
|
|
print(f"DM {msg_id} from {agent} to {recipient}/{target}: SENT and VERIFIED")
|
2026-10-03 21:36:42 +00:00
|
|
|
else:
|
2026-10-04 01:10:45 +00:00
|
|
|
log_event({"type": "failed", "id": msg_id, "agent": agent, "to": recipient, "target": target, "verified": False})
|
|
|
|
|
print(f"DM {msg_id} from {agent} to {recipient}/{target}: FAILED (not found in recipient chat after {max_retries} attempts)", file=sys.stderr)
|
|
|
|
|
sys.exit(1)
|
|
|
|
|
return msg_id
|
2026-10-03 19:48:09 +00:00
|
|
|
|
2026-10-04 01:10:45 +00:00
|
|
|
def dm_read(agent, target, n=5, quiet=False, width=200):
|
|
|
|
|
"""Read DMs via headless. width widens the per-paragraph slice
|
|
|
|
|
(needed for multi-line signature blocks)."""
|
2026-10-03 19:48:09 +00:00
|
|
|
if agent not in VALID_AGENTS:
|
|
|
|
|
print(f"ERROR: Unknown agent {agent}", file=sys.stderr)
|
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
|
|
if target == "main":
|
|
|
|
|
run(f"{NETVM_EXEC} {agent} -- python3 {API} --account {agent} sidechat main")
|
|
|
|
|
else:
|
|
|
|
|
run(f"{NETVM_EXEC} {agent} -- python3 {API} --account {agent} sidechat use {target}")
|
|
|
|
|
|
|
|
|
|
time.sleep(2)
|
2026-10-04 01:10:45 +00:00
|
|
|
rc, msgs, err = run_full(f"{NETVM_EXEC} {agent} -- python3 {API} --account {agent} messages {n} {width}")
|
2026-10-03 19:48:09 +00:00
|
|
|
run(f"{NETVM_EXEC} {agent} -- python3 {API} --account {agent} sidechat main")
|
2026-10-04 01:10:45 +00:00
|
|
|
|
|
|
|
|
if rc != 0 or not msgs:
|
|
|
|
|
# Never fail silently: an empty read with exit 0 hid a dead browser
|
|
|
|
|
# for hours (opm, 2026-10-03). Surface the last error line.
|
|
|
|
|
detail = err.splitlines()[-1] if err.strip() else "no output"
|
|
|
|
|
print(f"WARNING: read of {agent}/{target} failed (rc={rc}): {detail}", file=sys.stderr)
|
2026-10-03 21:36:42 +00:00
|
|
|
if not quiet:
|
|
|
|
|
print(msgs)
|
2026-10-03 19:48:09 +00:00
|
|
|
return msgs
|
|
|
|
|
|
2026-10-04 01:10:45 +00:00
|
|
|
SIGNERS_DIR = "/home/super/Projects/NetVM/dm-signers"
|
|
|
|
|
|
|
|
|
|
def dm_select(agent, target=None):
|
|
|
|
|
"""Select active conversation for an agent.
|
|
|
|
|
- With --target: switch directly to that conversation.
|
|
|
|
|
- Without --target: list available conversations.
|
|
|
|
|
Uses sidechat use/main under the hood; stores selection for future commands.
|
|
|
|
|
"""
|
|
|
|
|
import os, json, subprocess
|
|
|
|
|
|
|
|
|
|
NETVM_EXEC = os.path.expanduser("~/Projects/NetVM/bin/netvm-exec.sh")
|
|
|
|
|
API = os.path.expanduser("~/Projects/NetVM/bin/muse-chat-api.py")
|
|
|
|
|
state_file = os.path.expanduser(f"~/.dm-select-{agent}.json")
|
|
|
|
|
|
|
|
|
|
def run(cmd):
|
|
|
|
|
r = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=60)
|
|
|
|
|
return r.stdout.strip()
|
|
|
|
|
|
|
|
|
|
if target:
|
|
|
|
|
# Switch to target conversation
|
|
|
|
|
if target == "main":
|
|
|
|
|
run(f"{NETVM_EXEC} {agent} -- python3 {API} --account {agent} sidechat main")
|
|
|
|
|
else:
|
|
|
|
|
run(f"{NETVM_EXEC} {agent} -- python3 {API} --account {agent} sidechat use {target}")
|
|
|
|
|
# Store selection
|
|
|
|
|
with open(state_file, "w") as f:
|
|
|
|
|
json.dump({"agent": agent, "target": target}, f)
|
|
|
|
|
print(f"Selected: {agent}/{target}")
|
|
|
|
|
return target
|
|
|
|
|
|
|
|
|
|
# List available conversations
|
|
|
|
|
out = run(f"{NETVM_EXEC} {agent} -- python3 {API} --account {agent} sidechat list")
|
|
|
|
|
print(f"Conversations for {agent}:")
|
|
|
|
|
print(" main")
|
|
|
|
|
# Parse: filter out headers, timestamps, and status lines
|
|
|
|
|
import re
|
|
|
|
|
lines = [l.strip() for l in out.split("\n") if l.strip()]
|
|
|
|
|
ts = re.compile(r"^\d+[mhd]$")
|
|
|
|
|
skip = {"NOSIDEBAR", "Side chats", "Unread updates"}
|
|
|
|
|
for line in lines:
|
|
|
|
|
if line in skip:
|
|
|
|
|
continue
|
|
|
|
|
if ts.match(line):
|
|
|
|
|
continue
|
|
|
|
|
# Remaining lines are chat names
|
|
|
|
|
print(f" {line}")
|
|
|
|
|
print()
|
|
|
|
|
print(f"Use: dm.py select --agent {agent} --target <name>")
|
|
|
|
|
# Show current selection
|
|
|
|
|
if os.path.exists(state_file):
|
|
|
|
|
with open(state_file) as f:
|
|
|
|
|
sel = json.load(f)
|
|
|
|
|
print(f"Current: {sel.get('target', 'main')}")
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def dm_verify_sig(message=None, agent=None, target=None):
|
|
|
|
|
"""Verify an SSH-signed DM. Pass message text directly, or give
|
|
|
|
|
--agent/--target to scan recent reads for signed messages."""
|
|
|
|
|
import tempfile, re
|
|
|
|
|
texts = []
|
|
|
|
|
if message:
|
|
|
|
|
texts = [message]
|
|
|
|
|
elif agent and target:
|
|
|
|
|
msgs = dm_read(agent, target, n=10, quiet=True, width=2000)
|
|
|
|
|
# split read output into candidate blocks containing a signature
|
|
|
|
|
chunks = re.split(r'\n---\n', msgs)
|
|
|
|
|
texts = [c for c in chunks if '-----BEGIN SSH SIGNATURE-----' in c]
|
|
|
|
|
if not texts:
|
|
|
|
|
print("no signed messages found in recent reads", file=sys.stderr)
|
|
|
|
|
sys.exit(1)
|
2026-10-03 21:36:42 +00:00
|
|
|
else:
|
2026-10-04 01:10:45 +00:00
|
|
|
print("ERROR: provide a message or --agent/--target", file=sys.stderr)
|
2026-10-03 21:36:42 +00:00
|
|
|
sys.exit(1)
|
|
|
|
|
|
2026-10-04 01:10:45 +00:00
|
|
|
ok_any = False
|
|
|
|
|
for text in texts:
|
|
|
|
|
text = text.strip()
|
|
|
|
|
m = re.match(r'\[from:([^\]]+)\]\s*\[id:([^\]]+)\]', text)
|
|
|
|
|
if not m:
|
|
|
|
|
print("BAD: no [from:]/[id:] header", file=sys.stderr)
|
|
|
|
|
continue
|
|
|
|
|
sender, mid = m.group(1), m.group(2)
|
|
|
|
|
sm = re.search(r'\n-----BEGIN SSH SIGNATURE-----\n(.*?)\n-----END SSH SIGNATURE-----',
|
|
|
|
|
text, re.S)
|
|
|
|
|
if not sm:
|
|
|
|
|
print(f"BAD: [{mid}] no signature block", file=sys.stderr)
|
|
|
|
|
continue
|
|
|
|
|
payload = text[:sm.start()].strip()
|
|
|
|
|
sigblock = "-----BEGIN SSH SIGNATURE-----\n" + sm.group(1).strip() + "\n-----END SSH SIGNATURE-----\n"
|
|
|
|
|
pubpath = os.path.join(SIGNERS_DIR, sender + ".pub")
|
|
|
|
|
if not os.path.exists(pubpath):
|
|
|
|
|
print(f"BAD: [{mid}] no public key registered for sender '{sender}'", file=sys.stderr)
|
|
|
|
|
continue
|
|
|
|
|
with open(pubpath) as f:
|
|
|
|
|
pubkey = f.read().strip()
|
|
|
|
|
with tempfile.TemporaryDirectory() as td:
|
|
|
|
|
allowed = os.path.join(td, "allowed")
|
|
|
|
|
with open(allowed, "w") as f:
|
|
|
|
|
f.write(f"{sender} {pubkey}\n")
|
|
|
|
|
sigf = os.path.join(td, "sig")
|
|
|
|
|
with open(sigf, "w") as f:
|
|
|
|
|
f.write(sigblock)
|
|
|
|
|
payf = os.path.join(td, "payload")
|
|
|
|
|
with open(payf, "w") as f:
|
|
|
|
|
f.write(payload)
|
|
|
|
|
# verify reads the payload from stdin; feed it from the temp file
|
|
|
|
|
# (redirect, not a pipe) per the file-based lesson from chat-400
|
|
|
|
|
with open(payf, "rb") as fin:
|
|
|
|
|
r = subprocess.run(
|
|
|
|
|
["ssh-keygen", "-Y", "verify", "-f", allowed, "-I", sender,
|
|
|
|
|
"-n", "dm", "-s", sigf],
|
|
|
|
|
stdin=fin, capture_output=True, text=True, timeout=15)
|
|
|
|
|
if r.returncode == 0:
|
|
|
|
|
print(f"GOOD: [{mid}] signature valid — really from '{sender}'")
|
|
|
|
|
ok_any = True
|
|
|
|
|
else:
|
|
|
|
|
print(f"BAD: [{mid}] signature FAILED for claimed sender '{sender}': "
|
|
|
|
|
f"{r.stderr.strip()[:120]}", file=sys.stderr)
|
|
|
|
|
sys.exit(0 if ok_any else 1)
|
|
|
|
|
|
2026-10-03 21:36:42 +00:00
|
|
|
def dm_log(n=20):
|
|
|
|
|
"""Show recent log entries."""
|
|
|
|
|
if not os.path.exists(LOG_FILE):
|
|
|
|
|
print("No log file yet")
|
|
|
|
|
return
|
|
|
|
|
with open(LOG_FILE) as f:
|
|
|
|
|
lines = f.readlines()
|
|
|
|
|
for line in lines[-n:]:
|
|
|
|
|
e = json.loads(line)
|
|
|
|
|
print(f"{e['ts'][:19]} {e['type']:12} {e.get('id','-'):8} {e.get('agent','-')}/{e.get('target','-')}")
|
|
|
|
|
|
2026-10-03 19:48:09 +00:00
|
|
|
def dm_thread(from_agent, to_agent, target, message):
|
|
|
|
|
attributed = f"[{from_agent}] {message}"
|
2026-10-04 01:29:26 +00:00
|
|
|
return dm_send(from_agent, target, attributed, to_agent=to_agent)
|
2026-10-03 19:48:09 +00:00
|
|
|
|
|
|
|
|
def main():
|
2026-10-04 01:10:45 +00:00
|
|
|
p = argparse.ArgumentParser(description="DM: Headless Direct Messages (UUID-tagged, logged; delivery NOT confirmed)")
|
2026-10-03 19:48:09 +00:00
|
|
|
sub = p.add_subparsers(dest='cmd', required=True)
|
|
|
|
|
|
2026-10-04 01:10:45 +00:00
|
|
|
ps = sub.add_parser('send', help='Send a DM (UUID-tagged; delivery NOT confirmed)')
|
2026-10-03 19:48:09 +00:00
|
|
|
ps.add_argument('--agent', required=True, choices=VALID_AGENTS)
|
2026-10-04 01:10:45 +00:00
|
|
|
ps.add_argument('--to', required=False, choices=VALID_AGENTS, default=None,
|
|
|
|
|
help='Recipient operator (for cross-operator DMs). Uses recipient\'s browser/chat.')
|
2026-10-03 21:36:42 +00:00
|
|
|
ps.add_argument('--target', required=True)
|
2026-10-04 01:10:45 +00:00
|
|
|
ps.add_argument('--no-verify', action='store_true', help='Deprecated no-op: verification was removed')
|
|
|
|
|
ps.add_argument('--raw', action='store_true', help='Send verbatim: no UUID tag, no truncation (for pre-signed messages)')
|
2026-10-03 21:36:42 +00:00
|
|
|
ps.add_argument('message')
|
2026-10-04 01:10:45 +00:00
|
|
|
ps.set_defaults(func=lambda a: dm_send(a.agent, a.target, a.message, verify=not a.no_verify, raw=a.raw, to_agent=a.to))
|
2026-10-03 19:48:09 +00:00
|
|
|
|
2026-10-04 01:10:45 +00:00
|
|
|
psel = sub.add_parser('select', help='Select active conversation')
|
|
|
|
|
psel.add_argument('--agent', required=True, choices=VALID_AGENTS)
|
|
|
|
|
psel.add_argument('--target', required=False, default=None,
|
|
|
|
|
help='Conversation: main or side chat name')
|
|
|
|
|
psel.set_defaults(func=lambda a: dm_select(a.agent, a.target))
|
|
|
|
|
|
2026-10-03 21:36:42 +00:00
|
|
|
pr = sub.add_parser('read', help='Read DMs')
|
2026-10-03 19:48:09 +00:00
|
|
|
pr.add_argument('--agent', required=True, choices=VALID_AGENTS)
|
2026-10-03 21:36:42 +00:00
|
|
|
pr.add_argument('--target', required=True)
|
|
|
|
|
pr.add_argument('--n', type=int, default=5)
|
2026-10-03 19:48:09 +00:00
|
|
|
pr.set_defaults(func=lambda a: dm_read(a.agent, a.target, a.n))
|
|
|
|
|
|
2026-10-04 01:10:45 +00:00
|
|
|
pvs = sub.add_parser('verify-sig', help='Verify SSH signature on a signed DM')
|
|
|
|
|
pvs.add_argument('--agent', required=False, choices=VALID_AGENTS)
|
|
|
|
|
pvs.add_argument('--target', required=False)
|
|
|
|
|
pvs.add_argument('--from-sender', required=False, dest='from_sender')
|
|
|
|
|
pvs.add_argument('message', nargs='?')
|
|
|
|
|
pvs.set_defaults(func=lambda a: dm_verify_sig(message=a.message, agent=a.agent, target=a.target))
|
|
|
|
|
|
2026-10-03 21:36:42 +00:00
|
|
|
pl = sub.add_parser('log', help='Show DM log')
|
|
|
|
|
pl.add_argument('--n', type=int, default=20)
|
|
|
|
|
pl.set_defaults(func=lambda a: dm_log(a.n))
|
|
|
|
|
|
2026-10-03 19:48:09 +00:00
|
|
|
pt = sub.add_parser('thread', help='Thread from one agent to another')
|
|
|
|
|
pt.add_argument('--from', dest='from_agent', required=True, choices=VALID_AGENTS)
|
|
|
|
|
pt.add_argument('--to', dest='to_agent', required=True, choices=VALID_AGENTS)
|
2026-10-03 21:36:42 +00:00
|
|
|
pt.add_argument('--target', required=True)
|
|
|
|
|
pt.add_argument('message')
|
2026-10-03 19:48:09 +00:00
|
|
|
pt.set_defaults(func=lambda a: dm_thread(a.from_agent, a.to_agent, a.target, a.message))
|
|
|
|
|
|
|
|
|
|
args = p.parse_args()
|
|
|
|
|
args.func(args)
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
main()
|