cmdbox 0.6.0__py3-none-any.whl → 0.6.0.1__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.
Potentially problematic release.
This version of cmdbox might be problematic. Click here for more details.
- cmdbox/app/common.py +14 -11
- cmdbox/app/commons/loghandler.py +62 -13
- cmdbox/app/features/cli/agent_base.py +11 -9
- cmdbox/app/features/cli/audit_base.py +16 -4
- cmdbox/app/features/cli/cmdbox_web_start.py +2 -1
- cmdbox/app/features/web/cmdbox_web_agent.py +12 -0
- cmdbox/app/features/web/cmdbox_web_do_signout.py +3 -3
- cmdbox/app/features/web/cmdbox_web_exec_cmd.py +3 -3
- cmdbox/app/features/web/cmdbox_web_signin.py +2 -1
- cmdbox/app/options.py +7 -7
- cmdbox/app/web.py +6 -9
- cmdbox/extensions/sample_project/sample/extensions/features.yml +18 -0
- cmdbox/extensions/sample_project/sample/extensions/user_list.yml +2 -1
- cmdbox/extensions/sample_project/sample/logconf_sample.yml +14 -1
- cmdbox/logconf_audit.yml +9 -4
- cmdbox/logconf_client.yml +9 -4
- cmdbox/logconf_cmdbox.yml +9 -4
- cmdbox/logconf_edge.yml +9 -4
- cmdbox/logconf_gui.yml +8 -3
- cmdbox/logconf_server.yml +8 -3
- cmdbox/logconf_web.yml +8 -3
- cmdbox/version.py +3 -3
- cmdbox/web/assets/cmdbox/agent.js +5 -2
- cmdbox/web/assets/cmdbox/common.js +1 -1
- cmdbox/web/assets/cmdbox/main.js +17 -3
- {cmdbox-0.6.0.dist-info → cmdbox-0.6.0.1.dist-info}/METADATA +1 -1
- {cmdbox-0.6.0.dist-info → cmdbox-0.6.0.1.dist-info}/RECORD +31 -32
- cmdbox/logconf_agent.yml +0 -38
- {cmdbox-0.6.0.dist-info → cmdbox-0.6.0.1.dist-info}/LICENSE +0 -0
- {cmdbox-0.6.0.dist-info → cmdbox-0.6.0.1.dist-info}/WHEEL +0 -0
- {cmdbox-0.6.0.dist-info → cmdbox-0.6.0.1.dist-info}/entry_points.txt +0 -0
- {cmdbox-0.6.0.dist-info → cmdbox-0.6.0.1.dist-info}/top_level.txt +0 -0
cmdbox/app/common.py
CHANGED
|
@@ -93,32 +93,35 @@ def save_yml(yml_path:Path, data:dict) -> None:
|
|
|
93
93
|
with open(yml_path, 'w') as f:
|
|
94
94
|
yaml.dump(data, f, default_flow_style=False, sort_keys=False)
|
|
95
95
|
|
|
96
|
-
def reset_logger(name:str, stderr:bool=False, fmt:str='%(message)s') -> None:
|
|
96
|
+
def reset_logger(name:str, stderr:bool=False, fmt:str='[%(asctime)s] %(levelname)s - %(message)s', datefmt:str='%Y-%m-%d %H:%M:%S') -> None:
|
|
97
97
|
"""
|
|
98
98
|
指定されたロガーのハンドラをクリアし、新しいハンドラを追加します。
|
|
99
99
|
Args:
|
|
100
100
|
name (str): ロガーの名前
|
|
101
101
|
stderr (bool, optional): 標準エラー出力を使用するかどうか. Defaults to False.
|
|
102
|
-
fmt (str, optional): ログフォーマット. Defaults to '%(message)s'.
|
|
102
|
+
fmt (str, optional): ログフォーマット. Defaults to '[%(asctime)s] %(levelname)s - %(message)s'.
|
|
103
|
+
datefmt (str, optional): 日時フォーマット. Defaults to '%Y-%m-%d %H:%M:%S'.
|
|
103
104
|
"""
|
|
104
105
|
logger = logging.getLogger(name)
|
|
105
106
|
logger.handlers.clear()
|
|
106
107
|
logger.propagate = False
|
|
107
|
-
logger.addHandler(create_log_handler(stderr, fmt))
|
|
108
|
+
logger.addHandler(create_log_handler(stderr, fmt, datefmt))
|
|
108
109
|
|
|
109
|
-
def create_log_handler(stderr:bool=False, fmt:str='%(message)s') -> logging.Handler:
|
|
110
|
+
def create_log_handler(stderr:bool=False, fmt:str='[%(asctime)s] %(levelname)s - %(message)s', datefmt:str='%Y-%m-%d %H:%M:%S') -> logging.Handler:
|
|
110
111
|
"""
|
|
111
112
|
ログハンドラを生成します。
|
|
112
113
|
|
|
113
114
|
Args:
|
|
114
115
|
stderr (bool, optional): 標準エラー出力を使用するかどうか. Defaults to False.
|
|
115
|
-
fmt (str, optional): ログフォーマット. Defaults to '%(message)s'.
|
|
116
|
+
fmt (str, optional): ログフォーマット. Defaults to '[%(asctime)s] %(levelname)s - %(message)s'.
|
|
117
|
+
datefmt (str, optional): 日時フォーマット. Defaults to '%Y-%m-%d %H:%M:%S'.
|
|
116
118
|
Returns:
|
|
117
119
|
logging.Handler: ログハンドラ
|
|
118
120
|
"""
|
|
119
|
-
formatter = logging.Formatter(fmt)
|
|
120
|
-
handler = RichHandler(console=Console(stderr=stderr), show_path=False, omit_repeated_times=False,
|
|
121
|
-
|
|
121
|
+
formatter = logging.Formatter(fmt, datefmt)
|
|
122
|
+
#handler = RichHandler(console=Console(stderr=stderr), show_path=False, omit_repeated_times=False,
|
|
123
|
+
# tracebacks_word_wrap=False, log_time_format='[%Y-%m-%d %H:%M]')
|
|
124
|
+
handler = loghandler.ColorfulStreamHandler(sys.stdout if not stderr else sys.stderr)
|
|
122
125
|
handler.setFormatter(formatter)
|
|
123
126
|
return handler
|
|
124
127
|
|
|
@@ -132,7 +135,9 @@ def create_console(stderr:bool=False, file=None) -> Console:
|
|
|
132
135
|
Returns:
|
|
133
136
|
Console: コンソール
|
|
134
137
|
"""
|
|
135
|
-
console = Console(
|
|
138
|
+
console = Console(height=False,
|
|
139
|
+
soft_wrap=False, stderr=stderr, file=file, log_time=True, log_path=False, log_time_format='[%Y-%m-%d %H:%M:%S]')
|
|
140
|
+
#console = Console(soft_wrap=True, stderr=stderr, file=file, log_time=True, log_path=False, log_time_format='[%Y-%m-%d %H:%M:%S]')
|
|
136
141
|
return console
|
|
137
142
|
|
|
138
143
|
def default_logger(debug:bool=False, ver=version, webcall:bool=False) -> logging.Logger:
|
|
@@ -149,8 +154,6 @@ def default_logger(debug:bool=False, ver=version, webcall:bool=False) -> logging
|
|
|
149
154
|
"""
|
|
150
155
|
logger = logging.getLogger(ver.__appid__)
|
|
151
156
|
if not webcall:
|
|
152
|
-
#formatter = logging.Formatter('%(levelname)s[%(asctime)s] - %(message)s')
|
|
153
|
-
#handler = loghandler.ColorfulStreamHandler(sys.stdout)
|
|
154
157
|
handler = create_log_handler()
|
|
155
158
|
handler.setLevel(logging.DEBUG if debug else logging.INFO)
|
|
156
159
|
logger.addHandler(handler)
|
cmdbox/app/commons/loghandler.py
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
from rich.console import Console
|
|
2
|
+
from rich import highlighter
|
|
3
|
+
from rich.theme import Theme
|
|
1
4
|
import re
|
|
2
5
|
import logging
|
|
3
6
|
import logging.handlers
|
|
@@ -77,25 +80,71 @@ def colorize_msg(msg) -> str:
|
|
|
77
80
|
return msg
|
|
78
81
|
|
|
79
82
|
level_mapping = {
|
|
80
|
-
logging.DEBUG: f"{colorize('DEBUG', Colors.Bold, Colors.Cyan)}
|
|
81
|
-
logging.INFO: f"{colorize('INFO', Colors.Bold, Colors.Green)}
|
|
82
|
-
logging.WARNING: f"{colorize('
|
|
83
|
-
logging.ERROR: f"{colorize('ERROR', Colors.Bold, Colors.Red)}
|
|
84
|
-
logging.CRITICAL:f"{colorize('
|
|
83
|
+
logging.DEBUG: f"{colorize('DEBUG', Colors.Bold, Colors.Cyan)}",
|
|
84
|
+
logging.INFO: f"{colorize('INFO', Colors.Bold, Colors.Green)} ",
|
|
85
|
+
logging.WARNING: f"{colorize('WARN', Colors.Bold, Colors.Yellow)} ",
|
|
86
|
+
logging.ERROR: f"{colorize('ERROR', Colors.Bold, Colors.Red)}",
|
|
87
|
+
logging.CRITICAL:f"{colorize('FATAL', Colors.Bold, Colors.LightGray, Colors.BackgroundRed)}"}
|
|
85
88
|
|
|
86
89
|
level_mapping_nc = {
|
|
87
|
-
logging.DEBUG: f"DEBUG
|
|
88
|
-
logging.INFO: f"INFO
|
|
89
|
-
logging.WARNING: f"
|
|
90
|
-
logging.ERROR: f"ERROR
|
|
91
|
-
logging.CRITICAL:f"
|
|
90
|
+
logging.DEBUG: f"DEBUG",
|
|
91
|
+
logging.INFO: f"INFO ",
|
|
92
|
+
logging.WARNING: f"WARN ",
|
|
93
|
+
logging.ERROR: f"ERROR",
|
|
94
|
+
logging.CRITICAL:f"FATAL"}
|
|
95
|
+
|
|
96
|
+
theme=Theme({
|
|
97
|
+
"repr.log_debug": "bold cyan",
|
|
98
|
+
"repr.log_info": "bold green",
|
|
99
|
+
"repr.log_warn": "bold Yellow",
|
|
100
|
+
"repr.log_error": "bold red",
|
|
101
|
+
"repr.log_fatal": "bold red reverse",
|
|
102
|
+
"repr.log_product": "dodger_blue2 reverse",
|
|
103
|
+
"repr.log_success": "green",})
|
|
104
|
+
|
|
105
|
+
class LogLevelHighlighter(highlighter.ReprHighlighter):
|
|
106
|
+
def __init__(self):
|
|
107
|
+
#self.highlights = []
|
|
108
|
+
self.highlights.append(r"(?P<log_debug>DEBUG)")
|
|
109
|
+
self.highlights.append(r"(?P<log_info>INFO)")
|
|
110
|
+
self.highlights.append(r"(?P<log_warn>WARN|WARNING|WARN|CAUTION|NOTICE|STOP|DISCONNECTED|DENY)")
|
|
111
|
+
self.highlights.append(r"(?P<log_error>ERROR|ALERT|ABORT|FAILED)")
|
|
112
|
+
self.highlights.append(r"(?P<log_fatal>FATAL|CRITICAL)")
|
|
113
|
+
self.highlights.append(r"(?P<log_product>CMDBOX|IINFER|USOUND|GAIAN|GAIC|WITSHAPE)")
|
|
114
|
+
self.highlights.append(r"(?P<log_success>SUCCESS|OK|PASSED|DONE|COMPLETE|START|FINISH|OPEN|CONNECTED|ALLOW|EXEC)")
|
|
115
|
+
"""
|
|
116
|
+
self.highlights.append(r"(?P<tag_start><)(?P<tag_name>[-\w.:|]*)(?P<tag_contents>[\w\W]*)(?P<tag_end>>)")
|
|
117
|
+
self.highlights.append(r'(?P<attrib_name>[\w_]{1,50})=(?P<attrib_value>"?[\w_]+"?)?')
|
|
118
|
+
self.highlights.append(r"(?P<brace>[][{}()])")
|
|
119
|
+
self.highlights.append(highlighter._combine_regex(
|
|
120
|
+
r"(?P<ipv4>[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})",
|
|
121
|
+
r"(?P<ipv6>([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})",
|
|
122
|
+
r"(?P<eui64>(?:[0-9A-Fa-f]{1,2}-){7}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{1,2}:){7}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{4}\.){3}[0-9A-Fa-f]{4})",
|
|
123
|
+
r"(?P<eui48>(?:[0-9A-Fa-f]{1,2}-){5}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{1,2}:){5}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{4}\.){2}[0-9A-Fa-f]{4})",
|
|
124
|
+
r"(?P<uuid>[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})",
|
|
125
|
+
r"(?P<call>[\w.]*?)\(",
|
|
126
|
+
r"\b(?P<bool_true>True)\b|\b(?P<bool_false>False)\b|\b(?P<none>None)\b",
|
|
127
|
+
r"(?P<ellipsis>\.\.\.)",
|
|
128
|
+
r"(?P<number_complex>(?<!\w)(?:\-?[0-9]+\.?[0-9]*(?:e[-+]?\d+?)?)(?:[-+](?:[0-9]+\.?[0-9]*(?:e[-+]?\d+)?))?j)",
|
|
129
|
+
r"(?P<number>(?<!\w)\-?[0-9]+\.?[0-9]*(e[-+]?\d+?)?\b|0x[0-9a-fA-F]*)",
|
|
130
|
+
r"(?P<path>\B(/[-\w._+]+)*\/)(?P<filename>[-\w._+]*)?",
|
|
131
|
+
r"(?<![\\\w])(?P<str>b?'''.*?(?<!\\)'''|b?'.*?(?<!\\)'|b?\"\"\".*?(?<!\\)\"\"\"|b?\".*?(?<!\\)\")",
|
|
132
|
+
r"(?P<url>(file|https|http|ws|wss)://[-0-9a-zA-Z$_+!`(),.?/;:&=%#~@]*)",
|
|
133
|
+
))
|
|
134
|
+
"""
|
|
135
|
+
self.highlights = [re.compile(h, re.IGNORECASE) for h in self.highlights]
|
|
92
136
|
|
|
93
137
|
class ColorfulStreamHandler(logging.StreamHandler):
|
|
138
|
+
console = Console(soft_wrap=True, height=True, highlighter=LogLevelHighlighter(), theme=theme)
|
|
139
|
+
|
|
94
140
|
def emit(self, record: logging.LogRecord) -> None:
|
|
95
|
-
record.levelname = level_mapping[record.levelno]
|
|
141
|
+
#record.levelname = level_mapping[record.levelno]
|
|
96
142
|
#record.asctime = colorize(record.asctime, Colors.Bold)
|
|
97
|
-
record.msg = colorize_msg(record.msg)
|
|
98
|
-
super().emit(record)
|
|
143
|
+
#record.msg = colorize_msg(record.msg)
|
|
144
|
+
#super().emit(record)
|
|
145
|
+
record.levelname = level_mapping_nc[record.levelno]
|
|
146
|
+
record.msg = self.format(record)
|
|
147
|
+
self.console.print(record.msg)
|
|
99
148
|
|
|
100
149
|
class TimedRotatingFileHandler(logging.handlers.TimedRotatingFileHandler):
|
|
101
150
|
def emit(self, record: logging.LogRecord) -> None:
|
|
@@ -30,7 +30,8 @@ class AgentBase(feature.ResultEdgeFeature):
|
|
|
30
30
|
dict(opt="agent", type=Options.T_STR, default="no", required=False, multi=False, hide=False, choice=["no", "use"],
|
|
31
31
|
discription_ja="エージェントを使用するかどうかを指定します。",
|
|
32
32
|
discription_en="Specifies whether the agent is used.",
|
|
33
|
-
choice_show=dict(use=["agent_name", "agent_description", "agent_instruction", "agent_session_store", "llmprov"
|
|
33
|
+
choice_show=dict(use=["agent_name", "agent_description", "agent_instruction", "agent_session_store", "llmprov",
|
|
34
|
+
"mcp_listen_port", "mcp_ssl_listen_port"],)),
|
|
34
35
|
dict(opt="agent_name", type=Options.T_STR, default=self.ver.__appid__, required=False, multi=False, hide=False, choice=None,
|
|
35
36
|
discription_ja="エージェント名を指定します。",
|
|
36
37
|
discription_en="Specifies the agent name."),
|
|
@@ -43,26 +44,26 @@ class AgentBase(feature.ResultEdgeFeature):
|
|
|
43
44
|
dict(opt="agent_session_store", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=['memory', 'sqlite', 'postgresql'],
|
|
44
45
|
discription_ja="エージェントのセッションを保存する方法を指定します。",
|
|
45
46
|
discription_en="Specify how the agent's session is to be saved.",
|
|
46
|
-
choice_show=dict(postgresql=["
|
|
47
|
+
choice_show=dict(postgresql=["agent_pg_host", "agent_pg_port", "agent_pg_user", "agent_pg_password", "agent_pg_dbname"]),),
|
|
47
48
|
dict(opt="mcp_listen_port", type=Options.T_INT, default="9081", required=False, multi=False, hide=False, choice=None,
|
|
48
49
|
discription_ja="省略した時は `9081` を使用します。",
|
|
49
50
|
discription_en="If omitted, `9081` is used."),
|
|
50
51
|
dict(opt="mcp_ssl_listen_port", type=Options.T_INT, default="9443", required=False, multi=False, hide=False, choice=None,
|
|
51
52
|
discription_ja="省略した時は `9443` を使用します。",
|
|
52
53
|
discription_en="If omitted, `9443` is used."),
|
|
53
|
-
dict(opt="
|
|
54
|
+
dict(opt="agent_pg_host", type=Options.T_STR, default='localhost', required=False, multi=False, hide=False, choice=None, web="mask",
|
|
54
55
|
discription_ja="postgresqlホストを指定する。",
|
|
55
56
|
discription_en="Specify the postgresql host."),
|
|
56
|
-
dict(opt="
|
|
57
|
+
dict(opt="agent_pg_port", type=Options.T_INT, default=5432, required=False, multi=False, hide=False, choice=None, web="mask",
|
|
57
58
|
discription_ja="postgresqlのポートを指定する。",
|
|
58
59
|
discription_en="Specify the postgresql port."),
|
|
59
|
-
dict(opt="
|
|
60
|
+
dict(opt="agent_pg_user", type=Options.T_STR, default='postgres', required=False, multi=False, hide=False, choice=None, web="mask",
|
|
60
61
|
discription_ja="postgresqlのユーザー名を指定する。",
|
|
61
62
|
discription_en="Specify the postgresql user name."),
|
|
62
|
-
dict(opt="
|
|
63
|
+
dict(opt="agent_pg_password", type=Options.T_STR, default='postgres', required=False, multi=False, hide=False, choice=None, web="mask",
|
|
63
64
|
discription_ja="postgresqlのパスワードを指定する。",
|
|
64
65
|
discription_en="Specify the postgresql password."),
|
|
65
|
-
dict(opt="
|
|
66
|
+
dict(opt="agent_pg_dbname", type=Options.T_STR, default='agent', required=False, multi=False, hide=False, choice=None,
|
|
66
67
|
discription_ja="postgresqlデータベース名を指定します。",
|
|
67
68
|
discription_en="Specify the postgresql database name."),
|
|
68
69
|
dict(opt="llmprov", type=Options.T_STR, default=None, required=False, multi=False, hide=False,
|
|
@@ -306,9 +307,10 @@ class AgentBase(feature.ResultEdgeFeature):
|
|
|
306
307
|
agent = Agent(
|
|
307
308
|
name=args.agent_name,
|
|
308
309
|
model=LiteLlm(
|
|
309
|
-
model=args.llmmodel,
|
|
310
|
-
|
|
310
|
+
model=f"ollama/{args.llmmodel}",
|
|
311
|
+
api_base=args.llmendpoint,
|
|
311
312
|
temperature=args.llmtemperature,
|
|
313
|
+
stream=True
|
|
312
314
|
),
|
|
313
315
|
description=description,
|
|
314
316
|
instruction=instruction,
|
|
@@ -84,12 +84,18 @@ class AuditBase(feature.ResultEdgeFeature):
|
|
|
84
84
|
Any: データベース接続オブジェクト
|
|
85
85
|
"""
|
|
86
86
|
if pg_enabled:
|
|
87
|
+
if logger.level == logging.DEBUG:
|
|
88
|
+
logger.debug(f"Initializing database with pg_enabled={pg_enabled}, pg_host={pg_host}, pg_port={pg_port}, pg_user={pg_user}, pg_dbname={pg_dbname}")
|
|
87
89
|
constr = f"host={pg_host} port={pg_port} user={pg_user} password={pg_password} dbname={pg_dbname} connect_timeout=60"
|
|
88
90
|
conn = psycopg.connect(constr, autocommit=False)
|
|
89
91
|
cursor = conn.cursor()
|
|
90
92
|
try:
|
|
91
93
|
cursor.execute("SELECT count(*) FROM information_schema.tables WHERE table_name='audit'")
|
|
92
|
-
|
|
94
|
+
row = cursor.fetchone()
|
|
95
|
+
if logger.level == logging.DEBUG:
|
|
96
|
+
logger.debug(f"SQL query: SELECT count(*) FROM information_schema.tables WHERE table_name='audit'")
|
|
97
|
+
logger.debug(f"SQL row : {row}")
|
|
98
|
+
if row[0] == 0:
|
|
93
99
|
# テーブルが存在しない場合は作成
|
|
94
100
|
cursor.execute('''
|
|
95
101
|
CREATE TABLE IF NOT EXISTS audit (
|
|
@@ -107,16 +113,22 @@ class AuditBase(feature.ResultEdgeFeature):
|
|
|
107
113
|
)
|
|
108
114
|
''')
|
|
109
115
|
finally:
|
|
116
|
+
conn.commit()
|
|
110
117
|
cursor.close()
|
|
111
|
-
conn.rollback()
|
|
112
118
|
else:
|
|
113
119
|
db_path = data_dir / '.audit' / 'audit.db'
|
|
120
|
+
if logger.level == logging.DEBUG:
|
|
121
|
+
logger.debug(f"Initializing database with db_path={db_path}")
|
|
114
122
|
db_path.parent.mkdir(parents=True, exist_ok=True)
|
|
115
123
|
conn = sqlite3.connect(db_path)
|
|
116
124
|
cursor = conn.cursor()
|
|
117
125
|
try:
|
|
118
|
-
cursor.execute(
|
|
119
|
-
|
|
126
|
+
cursor.execute("SELECT COUNT(*) FROM sqlite_master WHERE TYPE='table' AND NAME='audit'")
|
|
127
|
+
row = cursor.fetchone()
|
|
128
|
+
if logger.level == logging.DEBUG:
|
|
129
|
+
logger.debug(f"SQL query: SELECT COUNT(*) FROM sqlite_master WHERE TYPE='table' AND NAME='audit'")
|
|
130
|
+
logger.debug(f"SQL row : {row}")
|
|
131
|
+
if row[0] == 0:
|
|
120
132
|
# テーブルが存在しない場合は作成
|
|
121
133
|
cursor.execute('''
|
|
122
134
|
CREATE TABLE IF NOT EXISTS audit (
|
|
@@ -167,11 +167,12 @@ class WebStart(feature.UnsupportEdgeFeature, agent_base.AgentBase):
|
|
|
167
167
|
assets=args.assets, signin_html=args.signin_html, signin_file=args.signin_file, gui_mode=args.gui_mode)
|
|
168
168
|
agent_runner = None
|
|
169
169
|
mcp = None
|
|
170
|
+
logger.info(f"Agent={args.agent}")
|
|
170
171
|
if args.agent=='use':
|
|
171
172
|
if args.agent_session_store == 'sqlite':
|
|
172
173
|
args.agent_session_dburl = "sqlite:" + pathname2url(str(w.agent_path / 'session.db'))
|
|
173
174
|
elif args.agent_session_store == 'postgresql':
|
|
174
|
-
args.agent_session_dburl = f"postgresql+psycopg://{args.
|
|
175
|
+
args.agent_session_dburl = f"postgresql+psycopg://{args.agent_pg_user}:{args.agent_pg_password}@{args.agent_pg_host}:{args.agent_pg_port}/{args.agent_pg_dbname}"
|
|
175
176
|
else:
|
|
176
177
|
args.agent_session_dburl = None
|
|
177
178
|
agent_runner, mcp = self.init_agent_runner(logger, args)
|
|
@@ -13,6 +13,7 @@ from typing import Dict, Any, Tuple, List, Union
|
|
|
13
13
|
import locale
|
|
14
14
|
import logging
|
|
15
15
|
import json
|
|
16
|
+
import re
|
|
16
17
|
import time
|
|
17
18
|
import traceback
|
|
18
19
|
|
|
@@ -160,6 +161,15 @@ class Agent(feature.WebFeature):
|
|
|
160
161
|
agent_session = await web.create_agent_session(web.agent_runner.session_service, user_id, session_id=session_id)
|
|
161
162
|
startmsg = "こんにちは!何かお手伝いできることはありますか?" if is_japan else "Hello! Is there anything I can help you with?"
|
|
162
163
|
yield json.dumps(dict(message=startmsg), default=common.default_json_enc)
|
|
164
|
+
def _replace_match(match_obj):
|
|
165
|
+
json_str = match_obj.group(0)
|
|
166
|
+
try:
|
|
167
|
+
data = json.loads(json_str) # ユニコード文字列をエンコード
|
|
168
|
+
return json.dumps(data, ensure_ascii=False, default=common.default_json_enc)
|
|
169
|
+
except json.JSONDecodeError:
|
|
170
|
+
return json_str
|
|
171
|
+
json_pattern = re.compile(r'\{.*?\}')
|
|
172
|
+
|
|
163
173
|
from google.genai import types
|
|
164
174
|
while True:
|
|
165
175
|
outputs = None
|
|
@@ -205,6 +215,8 @@ class Agent(feature.WebFeature):
|
|
|
205
215
|
elif event.actions and event.actions.escalate:
|
|
206
216
|
msg = f"Agent escalated: {event.error_message or 'No specific message.'}"
|
|
207
217
|
if msg:
|
|
218
|
+
msg = json_pattern.sub(_replace_match, msg)
|
|
219
|
+
|
|
208
220
|
outputs['message'] = msg
|
|
209
221
|
web.options.audit_exec(sock, web, body=dict(agent_session=agent_session.id, result=msg))
|
|
210
222
|
yield json.dumps(outputs, default=common.default_json_enc)
|
|
@@ -13,9 +13,9 @@ class DoSignout(feature.WebFeature):
|
|
|
13
13
|
web (Web): Webオブジェクト
|
|
14
14
|
app (FastAPI): FastAPIオブジェクト
|
|
15
15
|
"""
|
|
16
|
-
@app.
|
|
17
|
-
@app.
|
|
18
|
-
async def do_signout(next, req:Request, res:Response):
|
|
16
|
+
@app.api_route('/dosignout/{next}', methods=['GET', 'POST'], response_class=HTMLResponse)
|
|
17
|
+
@app.api_route('/{full_path:path}/dosignout/{next}/', methods=['GET', 'POST'], response_class=HTMLResponse)
|
|
18
|
+
async def do_signout(next, req:Request, res:Response, full_path:str=None):
|
|
19
19
|
if 'signin' in req.session:
|
|
20
20
|
web.options.audit_exec(req, res, web, body=dict(msg='Signout.'), audit_type='auth')
|
|
21
21
|
for key in list(req.session.keys()).copy():
|
|
@@ -182,7 +182,7 @@ class ExecCmd(cmdbox_web_load_cmd.LoadCmd):
|
|
|
182
182
|
console = common.create_console(file=old_stdout)
|
|
183
183
|
|
|
184
184
|
try:
|
|
185
|
-
console.log(f'EXEC
|
|
185
|
+
console.log(f'EXEC - {opt_list}\n'[:logsize])
|
|
186
186
|
status, ret_main, obj = cmdbox_app.main(args_list=[common.chopdq(o) for o in opt_list], file_dict=file_dict, webcall=True)
|
|
187
187
|
if isinstance(obj, server.Server):
|
|
188
188
|
cmdbox_app.sv = obj
|
|
@@ -209,11 +209,11 @@ class ExecCmd(cmdbox_web_load_cmd.LoadCmd):
|
|
|
209
209
|
output = [dict(warn=f'The captured stdout was discarded because its size was larger than {capture_maxsize} bytes.')]
|
|
210
210
|
else:
|
|
211
211
|
output = [dict(warn='capture_stdout is off.')]
|
|
212
|
-
|
|
212
|
+
old_stdout.write(f'EXEC OUTPUT => {output}'[:logsize]) # コマンド実行時のアウトプットはカラーリングしない
|
|
213
213
|
except Exception as e:
|
|
214
214
|
web.logger.disabled = False # ログ出力を有効にする
|
|
215
215
|
msg = f'exec_cmd error. {traceback.format_exc()}'
|
|
216
|
-
console.log(f'EXEC
|
|
216
|
+
console.log(f'EXEC - {msg}'[:logsize])
|
|
217
217
|
web.logger.warning(msg)
|
|
218
218
|
output = [dict(warn=f'<pre>{html.escape(traceback.format_exc())}</pre>')]
|
|
219
219
|
sys.stdout = old_stdout
|
|
@@ -24,7 +24,8 @@ class Signin(feature.WebFeature):
|
|
|
24
24
|
web.signin_html_data = f.read()
|
|
25
25
|
|
|
26
26
|
@app.api_route('/signin/{next}', methods=['GET', 'POST'], response_class=HTMLResponse)
|
|
27
|
-
|
|
27
|
+
@app.api_route('/{full_path:path}/signin/{next}', methods=['GET', 'POST'], response_class=HTMLResponse)
|
|
28
|
+
async def _signin(next:str, req:Request, res:Response, full_path:str=None):
|
|
28
29
|
signin.Signin._enable_cors(req, res)
|
|
29
30
|
res.headers['Access-Control-Allow-Origin'] = '*'
|
|
30
31
|
return web.signin_html_data
|
cmdbox/app/options.py
CHANGED
|
@@ -632,6 +632,11 @@ class Options:
|
|
|
632
632
|
if 'enabled' not in yml['audit']:
|
|
633
633
|
raise Exception('features.yml is invalid. (The audit element must have "enabled" specified.)')
|
|
634
634
|
if not yml['audit']['enabled']: return
|
|
635
|
+
# フューチャーのoptions
|
|
636
|
+
if 'options' not in yml['audit']:
|
|
637
|
+
raise Exception('features.yml is invalid. (The audit element must have "options" specified.)')
|
|
638
|
+
self.audit_write_args = yml['audit']['options'].copy()
|
|
639
|
+
self.audit_search_args = yml['audit']['options'].copy()
|
|
635
640
|
# writeフューチャー
|
|
636
641
|
if 'write' not in yml['audit']:
|
|
637
642
|
raise Exception('features.yml is invalid. (The audit element must have "write" specified.)')
|
|
@@ -642,6 +647,8 @@ class Options:
|
|
|
642
647
|
raise Exception('features.yml is invalid. (The audit.write element must have "cmd" specified.)')
|
|
643
648
|
cmd = yml['audit']['write']['cmd']
|
|
644
649
|
self.audit_write:feature.Feature = self.get_cmd_attr(mode, cmd, 'feature')
|
|
650
|
+
self.audit_write_args['mode'] = mode
|
|
651
|
+
self.audit_write_args['cmd'] = cmd
|
|
645
652
|
# searchフューチャー
|
|
646
653
|
if 'search' not in yml['audit']:
|
|
647
654
|
raise Exception('features.yml is invalid. (The audit element must have "search" specified.)')
|
|
@@ -652,13 +659,6 @@ class Options:
|
|
|
652
659
|
raise Exception('features.yml is invalid. (The audit.search element must have "cmd" specified.)')
|
|
653
660
|
cmd = yml['audit']['search']['cmd']
|
|
654
661
|
self.audit_search:feature.Feature = self.get_cmd_attr(mode, cmd, 'feature')
|
|
655
|
-
# フューチャーのoptions
|
|
656
|
-
if 'options' not in yml['audit']:
|
|
657
|
-
raise Exception('features.yml is invalid. (The audit element must have "options" specified.)')
|
|
658
|
-
self.audit_write_args = yml['audit']['options'].copy()
|
|
659
|
-
self.audit_write_args['mode'] = mode
|
|
660
|
-
self.audit_write_args['cmd'] = cmd
|
|
661
|
-
self.audit_search_args = yml['audit']['options'].copy()
|
|
662
662
|
self.audit_search_args['mode'] = mode
|
|
663
663
|
self.audit_search_args['cmd'] = cmd
|
|
664
664
|
self.audit_loaded = True
|
cmdbox/app/web.py
CHANGED
|
@@ -900,19 +900,16 @@ class ThreadedUvicorn:
|
|
|
900
900
|
self.logger = logger
|
|
901
901
|
self.guvicorn_config = guvicorn_config
|
|
902
902
|
self.force_uvicorn = True if platform.system() == "Windows" else force_uvicorn
|
|
903
|
-
|
|
904
|
-
|
|
903
|
+
# loggerの設定
|
|
904
|
+
common.reset_logger("uvicorn")
|
|
905
|
+
common.reset_logger("uvicorn.error")
|
|
906
|
+
common.reset_logger("uvicorn.access")
|
|
907
|
+
#common.reset_logger("gunicorn.error")
|
|
908
|
+
#common.reset_logger("gunicorn.access")
|
|
905
909
|
if self.force_uvicorn:
|
|
906
|
-
# loggerの設定
|
|
907
|
-
common.reset_logger("uvicorn")
|
|
908
|
-
common.reset_logger("uvicorn.error")
|
|
909
|
-
common.reset_logger("uvicorn.access")
|
|
910
910
|
self.server = uvicorn.Server(config)
|
|
911
911
|
self.thread = RaiseThread(daemon=True, target=self.server.run)
|
|
912
912
|
else:
|
|
913
|
-
# loggerの設定
|
|
914
|
-
common.reset_logger("gunicorn.error")
|
|
915
|
-
common.reset_logger("gunicorn.access")
|
|
916
913
|
|
|
917
914
|
from gunicorn.app.wsgiapp import WSGIApplication
|
|
918
915
|
class App(WSGIApplication):
|
|
@@ -46,6 +46,24 @@ aliases: # Specify the alias for the specified co
|
|
|
46
46
|
# e.g. /{1}_exec
|
|
47
47
|
move: # Specify whether to move the regular expression group of the source to the target.
|
|
48
48
|
# e.g. true
|
|
49
|
+
agentrule: # Specifies a list of rules that determine which commands the agent can execute.
|
|
50
|
+
policy: deny # Specify the default policy for the rule. The value can be allow or deny.
|
|
51
|
+
rules: # Specify the rules for the commands that the agent can execute according to the group to which the user belongs.
|
|
52
|
+
- mode: audit # Specify the "mode" as the condition for applying the rule.
|
|
53
|
+
cmds: [search, write] # Specify the "cmd" to which the rule applies. Multiple items can be specified in a list.
|
|
54
|
+
rule: allow # Specifies whether the specified command is allowed or not. Values are allow or deny.
|
|
55
|
+
- mode: client
|
|
56
|
+
cmds: [file_copy, file_download, file_list, file_mkdir, file_move, file_remove, file_rmdir, file_upload, server_info]
|
|
57
|
+
rule: allow
|
|
58
|
+
- mode: cmd
|
|
59
|
+
cmds: [list, load]
|
|
60
|
+
rule: allow
|
|
61
|
+
- mode: server
|
|
62
|
+
cmds: [list]
|
|
63
|
+
rule: allow
|
|
64
|
+
- mode: web
|
|
65
|
+
cmds: [gencert, genpass, group_list, user_list]
|
|
66
|
+
rule: allow
|
|
49
67
|
audit:
|
|
50
68
|
enabled: true # Specify whether to enable the audit function.
|
|
51
69
|
write:
|
|
@@ -74,7 +74,8 @@ pathrule: # List of RESTAPI rules, rules that determine whe
|
|
|
74
74
|
- groups: [user]
|
|
75
75
|
paths: [/signin, /assets, /bbforce_cmd, /copyright, /dosignin, /dosignout, /password/change,
|
|
76
76
|
/gui/user_data/load, /gui/user_data/save, /gui/user_data/delete,
|
|
77
|
-
/
|
|
77
|
+
/agent, /mcp,
|
|
78
|
+
/exec_cmd, /exec_pipe, /filer, /result, /gui, /get_server_opt, /usesignout, /versions_cmdbox, /versions_used]
|
|
78
79
|
rule: allow
|
|
79
80
|
- groups: [readonly]
|
|
80
81
|
paths: [/gui/del_cmd, /gui/del_pipe, /gui/save_cmd, /gui/save_pipe]
|
|
@@ -2,7 +2,11 @@ version: 1
|
|
|
2
2
|
|
|
3
3
|
formatters:
|
|
4
4
|
fmt:
|
|
5
|
-
format: '%(
|
|
5
|
+
format: '[%(asctime)s] %(levelname)s - %(message)s'
|
|
6
|
+
datefmt: '%Y-%m-%d %H:%M:%S'
|
|
7
|
+
class: logging.Formatter
|
|
8
|
+
fmt_rich:
|
|
9
|
+
format: '%(message)s'
|
|
6
10
|
class: logging.Formatter
|
|
7
11
|
handlers:
|
|
8
12
|
std:
|
|
@@ -10,6 +14,14 @@ handlers:
|
|
|
10
14
|
level: INFO
|
|
11
15
|
formatter: fmt
|
|
12
16
|
stream: ext://sys.stdout
|
|
17
|
+
rich:
|
|
18
|
+
class: rich.logging.RichHandler
|
|
19
|
+
level: INFO
|
|
20
|
+
formatter: fmt_rich
|
|
21
|
+
show_path: false
|
|
22
|
+
omit_repeated_times: false
|
|
23
|
+
tracebacks_word_wrap: false
|
|
24
|
+
log_time_format: '[%Y-%m-%d %H:%M]'
|
|
13
25
|
sample:
|
|
14
26
|
class: cmdbox.app.commons.loghandler.TimedRotatingFileHandler
|
|
15
27
|
level: INFO
|
|
@@ -24,6 +36,7 @@ loggers:
|
|
|
24
36
|
handlers: [sample, std]
|
|
25
37
|
level: INFO
|
|
26
38
|
qualname: sample
|
|
39
|
+
propagate: false
|
|
27
40
|
|
|
28
41
|
#root:
|
|
29
42
|
# handlers: [sample, std]
|
cmdbox/logconf_audit.yml
CHANGED
|
@@ -2,13 +2,19 @@ version: 1
|
|
|
2
2
|
|
|
3
3
|
formatters:
|
|
4
4
|
fmt:
|
|
5
|
-
format: '%(
|
|
5
|
+
format: '[%(asctime)s] %(levelname)s - %(message)s'
|
|
6
|
+
datefmt: '%Y-%m-%d %H:%M:%S'
|
|
6
7
|
class: logging.Formatter
|
|
7
8
|
fmt_rich:
|
|
8
9
|
format: '%(message)s'
|
|
9
10
|
class: logging.Formatter
|
|
10
11
|
handlers:
|
|
11
12
|
std:
|
|
13
|
+
class: cmdbox.app.commons.loghandler.ColorfulStreamHandler
|
|
14
|
+
level: INFO
|
|
15
|
+
formatter: fmt
|
|
16
|
+
stream: ext://sys.stdout
|
|
17
|
+
rich:
|
|
12
18
|
class: rich.logging.RichHandler
|
|
13
19
|
level: INFO
|
|
14
20
|
formatter: fmt_rich
|
|
@@ -16,9 +22,8 @@ handlers:
|
|
|
16
22
|
omit_repeated_times: false
|
|
17
23
|
tracebacks_word_wrap: false
|
|
18
24
|
log_time_format: '[%Y-%m-%d %H:%M]'
|
|
19
|
-
#stream: ext://sys.stdout
|
|
20
25
|
audit:
|
|
21
|
-
class:
|
|
26
|
+
class: cmdbox.app.commons.loghandler.TimedRotatingFileHandler
|
|
22
27
|
level: INFO
|
|
23
28
|
formatter: fmt
|
|
24
29
|
backupCount: 5
|
|
@@ -28,7 +33,7 @@ handlers:
|
|
|
28
33
|
|
|
29
34
|
loggers:
|
|
30
35
|
audit:
|
|
31
|
-
handlers: [audit]
|
|
36
|
+
handlers: [audit, std]
|
|
32
37
|
level: INFO
|
|
33
38
|
qualname: audit
|
|
34
39
|
propagate: false
|
cmdbox/logconf_client.yml
CHANGED
|
@@ -2,13 +2,19 @@ version: 1
|
|
|
2
2
|
|
|
3
3
|
formatters:
|
|
4
4
|
fmt:
|
|
5
|
-
format: '%(
|
|
5
|
+
format: '[%(asctime)s] %(levelname)s - %(message)s'
|
|
6
|
+
datefmt: '%Y-%m-%d %H:%M:%S'
|
|
6
7
|
class: logging.Formatter
|
|
7
8
|
fmt_rich:
|
|
8
9
|
format: '%(message)s'
|
|
9
10
|
class: logging.Formatter
|
|
10
11
|
handlers:
|
|
11
12
|
std:
|
|
13
|
+
class: cmdbox.app.commons.loghandler.ColorfulStreamHandler
|
|
14
|
+
level: INFO
|
|
15
|
+
formatter: fmt
|
|
16
|
+
stream: ext://sys.stdout
|
|
17
|
+
rich:
|
|
12
18
|
class: rich.logging.RichHandler
|
|
13
19
|
level: INFO
|
|
14
20
|
formatter: fmt_rich
|
|
@@ -16,9 +22,8 @@ handlers:
|
|
|
16
22
|
omit_repeated_times: false
|
|
17
23
|
tracebacks_word_wrap: false
|
|
18
24
|
log_time_format: '[%Y-%m-%d %H:%M]'
|
|
19
|
-
#stream: ext://sys.stdout
|
|
20
25
|
client:
|
|
21
|
-
class:
|
|
26
|
+
class: cmdbox.app.commons.loghandler.TimedRotatingFileHandler
|
|
22
27
|
level: INFO
|
|
23
28
|
formatter: fmt
|
|
24
29
|
backupCount: 5
|
|
@@ -28,7 +33,7 @@ handlers:
|
|
|
28
33
|
|
|
29
34
|
loggers:
|
|
30
35
|
client:
|
|
31
|
-
handlers: [client]
|
|
36
|
+
handlers: [client, std]
|
|
32
37
|
level: INFO
|
|
33
38
|
qualname: client
|
|
34
39
|
propagate: false
|
cmdbox/logconf_cmdbox.yml
CHANGED
|
@@ -2,13 +2,19 @@ version: 1
|
|
|
2
2
|
|
|
3
3
|
formatters:
|
|
4
4
|
fmt:
|
|
5
|
-
format: '%(
|
|
5
|
+
format: '[%(asctime)s] %(levelname)s - %(message)s'
|
|
6
|
+
datefmt: '%Y-%m-%d %H:%M:%S'
|
|
6
7
|
class: logging.Formatter
|
|
7
8
|
fmt_rich:
|
|
8
9
|
format: '%(message)s'
|
|
9
10
|
class: logging.Formatter
|
|
10
11
|
handlers:
|
|
11
12
|
std:
|
|
13
|
+
class: cmdbox.app.commons.loghandler.ColorfulStreamHandler
|
|
14
|
+
level: INFO
|
|
15
|
+
formatter: fmt
|
|
16
|
+
stream: ext://sys.stdout
|
|
17
|
+
rich:
|
|
12
18
|
class: rich.logging.RichHandler
|
|
13
19
|
level: INFO
|
|
14
20
|
formatter: fmt_rich
|
|
@@ -16,9 +22,8 @@ handlers:
|
|
|
16
22
|
omit_repeated_times: false
|
|
17
23
|
tracebacks_word_wrap: false
|
|
18
24
|
log_time_format: '[%Y-%m-%d %H:%M]'
|
|
19
|
-
#stream: ext://sys.stdout
|
|
20
25
|
cmdbox:
|
|
21
|
-
class:
|
|
26
|
+
class: cmdbox.app.commons.loghandler.TimedRotatingFileHandler
|
|
22
27
|
level: INFO
|
|
23
28
|
formatter: fmt
|
|
24
29
|
backupCount: 5
|
|
@@ -28,7 +33,7 @@ handlers:
|
|
|
28
33
|
|
|
29
34
|
loggers:
|
|
30
35
|
cmdbox:
|
|
31
|
-
handlers: [cmdbox]
|
|
36
|
+
handlers: [cmdbox, std]
|
|
32
37
|
level: INFO
|
|
33
38
|
qualname: cmdbox
|
|
34
39
|
propagate: false
|
cmdbox/logconf_edge.yml
CHANGED
|
@@ -2,13 +2,19 @@ version: 1
|
|
|
2
2
|
|
|
3
3
|
formatters:
|
|
4
4
|
fmt:
|
|
5
|
-
format: '%(
|
|
5
|
+
format: '[%(asctime)s] %(levelname)s - %(message)s'
|
|
6
|
+
datefmt: '%Y-%m-%d %H:%M:%S'
|
|
6
7
|
class: logging.Formatter
|
|
7
8
|
fmt_rich:
|
|
8
9
|
format: '%(message)s'
|
|
9
10
|
class: logging.Formatter
|
|
10
11
|
handlers:
|
|
11
12
|
std:
|
|
13
|
+
class: cmdbox.app.commons.loghandler.ColorfulStreamHandler
|
|
14
|
+
level: INFO
|
|
15
|
+
formatter: fmt
|
|
16
|
+
stream: ext://sys.stdout
|
|
17
|
+
rich:
|
|
12
18
|
class: rich.logging.RichHandler
|
|
13
19
|
level: INFO
|
|
14
20
|
formatter: fmt_rich
|
|
@@ -16,9 +22,8 @@ handlers:
|
|
|
16
22
|
omit_repeated_times: false
|
|
17
23
|
tracebacks_word_wrap: false
|
|
18
24
|
log_time_format: '[%Y-%m-%d %H:%M]'
|
|
19
|
-
#stream: ext://sys.stdout
|
|
20
25
|
edge:
|
|
21
|
-
class:
|
|
26
|
+
class: cmdbox.app.commons.loghandler.TimedRotatingFileHandler
|
|
22
27
|
level: INFO
|
|
23
28
|
formatter: fmt
|
|
24
29
|
backupCount: 5
|
|
@@ -28,7 +33,7 @@ handlers:
|
|
|
28
33
|
|
|
29
34
|
loggers:
|
|
30
35
|
edge:
|
|
31
|
-
handlers: [edge]
|
|
36
|
+
handlers: [edge, std]
|
|
32
37
|
level: INFO
|
|
33
38
|
qualname: edge
|
|
34
39
|
propagate: false
|
cmdbox/logconf_gui.yml
CHANGED
|
@@ -2,13 +2,19 @@ version: 1
|
|
|
2
2
|
|
|
3
3
|
formatters:
|
|
4
4
|
fmt:
|
|
5
|
-
format: '%(
|
|
5
|
+
format: '[%(asctime)s] %(levelname)s - %(message)s'
|
|
6
|
+
datefmt: '%Y-%m-%d %H:%M:%S'
|
|
6
7
|
class: logging.Formatter
|
|
7
8
|
fmt_rich:
|
|
8
9
|
format: '%(message)s'
|
|
9
10
|
class: logging.Formatter
|
|
10
11
|
handlers:
|
|
11
12
|
std:
|
|
13
|
+
class: cmdbox.app.commons.loghandler.ColorfulStreamHandler
|
|
14
|
+
level: INFO
|
|
15
|
+
formatter: fmt
|
|
16
|
+
stream: ext://sys.stdout
|
|
17
|
+
rich:
|
|
12
18
|
class: rich.logging.RichHandler
|
|
13
19
|
level: INFO
|
|
14
20
|
formatter: fmt_rich
|
|
@@ -16,9 +22,8 @@ handlers:
|
|
|
16
22
|
omit_repeated_times: false
|
|
17
23
|
tracebacks_word_wrap: false
|
|
18
24
|
log_time_format: '[%Y-%m-%d %H:%M]'
|
|
19
|
-
#stream: ext://sys.stdout
|
|
20
25
|
gui:
|
|
21
|
-
class:
|
|
26
|
+
class: cmdbox.app.commons.loghandler.TimedRotatingFileHandler
|
|
22
27
|
level: INFO
|
|
23
28
|
formatter: fmt
|
|
24
29
|
backupCount: 5
|
cmdbox/logconf_server.yml
CHANGED
|
@@ -2,13 +2,19 @@ version: 1
|
|
|
2
2
|
|
|
3
3
|
formatters:
|
|
4
4
|
fmt:
|
|
5
|
-
format: '%(
|
|
5
|
+
format: '[%(asctime)s] %(levelname)s - %(message)s'
|
|
6
|
+
datefmt: '%Y-%m-%d %H:%M:%S'
|
|
6
7
|
class: logging.Formatter
|
|
7
8
|
fmt_rich:
|
|
8
9
|
format: '%(message)s'
|
|
9
10
|
class: logging.Formatter
|
|
10
11
|
handlers:
|
|
11
12
|
std:
|
|
13
|
+
class: cmdbox.app.commons.loghandler.ColorfulStreamHandler
|
|
14
|
+
level: INFO
|
|
15
|
+
formatter: fmt
|
|
16
|
+
stream: ext://sys.stdout
|
|
17
|
+
rich:
|
|
12
18
|
class: rich.logging.RichHandler
|
|
13
19
|
level: INFO
|
|
14
20
|
formatter: fmt_rich
|
|
@@ -16,9 +22,8 @@ handlers:
|
|
|
16
22
|
omit_repeated_times: false
|
|
17
23
|
tracebacks_word_wrap: false
|
|
18
24
|
log_time_format: '[%Y-%m-%d %H:%M]'
|
|
19
|
-
#stream: ext://sys.stdout
|
|
20
25
|
server:
|
|
21
|
-
class:
|
|
26
|
+
class: cmdbox.app.commons.loghandler.TimedRotatingFileHandler
|
|
22
27
|
level: INFO
|
|
23
28
|
formatter: fmt
|
|
24
29
|
backupCount: 5
|
cmdbox/logconf_web.yml
CHANGED
|
@@ -2,13 +2,19 @@ version: 1
|
|
|
2
2
|
|
|
3
3
|
formatters:
|
|
4
4
|
fmt:
|
|
5
|
-
format: '%(
|
|
5
|
+
format: '[%(asctime)s] %(levelname)s - %(message)s'
|
|
6
|
+
datefmt: '%Y-%m-%d %H:%M:%S'
|
|
6
7
|
class: logging.Formatter
|
|
7
8
|
fmt_rich:
|
|
8
9
|
format: '%(message)s'
|
|
9
10
|
class: logging.Formatter
|
|
10
11
|
handlers:
|
|
11
12
|
std:
|
|
13
|
+
class: cmdbox.app.commons.loghandler.ColorfulStreamHandler
|
|
14
|
+
level: INFO
|
|
15
|
+
formatter: fmt
|
|
16
|
+
stream: ext://sys.stdout
|
|
17
|
+
rich:
|
|
12
18
|
class: rich.logging.RichHandler
|
|
13
19
|
level: INFO
|
|
14
20
|
formatter: fmt_rich
|
|
@@ -16,9 +22,8 @@ handlers:
|
|
|
16
22
|
omit_repeated_times: false
|
|
17
23
|
tracebacks_word_wrap: false
|
|
18
24
|
log_time_format: '[%Y-%m-%d %H:%M]'
|
|
19
|
-
#stream: ext://sys.stdout
|
|
20
25
|
web:
|
|
21
|
-
class:
|
|
26
|
+
class: cmdbox.app.commons.loghandler.TimedRotatingFileHandler
|
|
22
27
|
level: INFO
|
|
23
28
|
formatter: fmt
|
|
24
29
|
backupCount: 5
|
cmdbox/version.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
|
|
3
|
-
dt_now = datetime.datetime(2025,
|
|
3
|
+
dt_now = datetime.datetime(2025, 6, 1)
|
|
4
4
|
__appid__ = 'cmdbox'
|
|
5
5
|
__title__ = 'cmdbox (Command Development Application)'
|
|
6
|
-
__version__ = '0.6.0'
|
|
6
|
+
__version__ = '0.6.0.1'
|
|
7
7
|
__copyright__ = f'Copyright © 2023-{dt_now.strftime("%Y")} hamacom2004jp'
|
|
8
8
|
__pypiurl__ = 'https://pypi.org/project/cmdbox/'
|
|
9
9
|
__srcurl__ = 'https://github.com/hamacom2004jp/cmdbox'
|
|
@@ -18,7 +18,7 @@ __logo__ = '''
|
|
|
18
18
|
╚═════╝╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝'''
|
|
19
19
|
__description__ = f'{__title__} {__version__}\n\n' + \
|
|
20
20
|
f'{__copyright__}\n' + \
|
|
21
|
-
f'
|
|
21
|
+
f'Build Date: {dt_now.strftime("%Y-%m-%d")}\n' + \
|
|
22
22
|
f'Web Site: PyPi <{__pypiurl__}>\n' + \
|
|
23
23
|
f'Web Site: SorceCode <{__srcurl__}>\n' + \
|
|
24
24
|
f'Web Site: Document <{__docurl__}>\n' + \
|
|
@@ -160,7 +160,10 @@ agent.init_form = async () => {
|
|
|
160
160
|
agent.format_agent_message(container, messages, txt, packet.message);
|
|
161
161
|
};
|
|
162
162
|
ws.onopen = () => {
|
|
163
|
-
const ping = () => {
|
|
163
|
+
const ping = () => {
|
|
164
|
+
ws.send('ping');
|
|
165
|
+
agent.chat_reconnect_count = 0; // pingが成功したら再接続回数をリセット
|
|
166
|
+
};
|
|
164
167
|
btn_user_msg.prop('disabled', false);
|
|
165
168
|
agent.chat_callback_ping_handler = setInterval(() => {ping();}, ping_interval);
|
|
166
169
|
};
|
|
@@ -174,7 +177,7 @@ agent.init_form = async () => {
|
|
|
174
177
|
clearInterval(agent.chat_reconnectInterval_handler);
|
|
175
178
|
cmdbox.message({'error':'Connection to the agent has failed for several minutes. Please reload to resume reconnection.'});
|
|
176
179
|
const rand = cmdbox.random_string(8);
|
|
177
|
-
location.href =
|
|
180
|
+
location.href = `../signin/agent?r=${rand}`;
|
|
178
181
|
return;
|
|
179
182
|
}
|
|
180
183
|
agent.chat_reconnect_count++;
|
|
@@ -136,7 +136,7 @@ cmdbox.set_logoicon = async (sel) => {
|
|
|
136
136
|
cmdbox.singout = (sitepath) => {
|
|
137
137
|
if (confirm('Sign out ok ?')) {
|
|
138
138
|
const rand = cmdbox.random_string(8);
|
|
139
|
-
location.href =
|
|
139
|
+
location.href = `../dosignout/${sitepath}?r=${rand}`;
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
142
|
cmdbox.editapikey = async () => {
|
cmdbox/web/assets/cmdbox/main.js
CHANGED
|
@@ -19,6 +19,9 @@ $(() => {
|
|
|
19
19
|
cmdbox.init_modal_button();
|
|
20
20
|
cmdbox.gui_callback_reconnectInterval_handler = null;
|
|
21
21
|
cmdbox.gui_callback_ping_handler = null;
|
|
22
|
+
const ping_interval = 5000; // pingの間隔
|
|
23
|
+
const max_reconnect_count = 60000/ping_interval*1; // 最大再接続回数
|
|
24
|
+
cmdbox.callback_reconnect_count = 0; // 再接続回数
|
|
22
25
|
const gui_callback = () => {
|
|
23
26
|
if (cmdbox.gui_callback_reconnectInterval_handler) {
|
|
24
27
|
clearInterval(cmdbox.gui_callback_reconnectInterval_handler);
|
|
@@ -68,8 +71,11 @@ $(() => {
|
|
|
68
71
|
}
|
|
69
72
|
};
|
|
70
73
|
ws.onopen = () => {
|
|
71
|
-
const ping = () => {
|
|
72
|
-
|
|
74
|
+
const ping = () => {
|
|
75
|
+
ws.send('ping');
|
|
76
|
+
cmdbox.callback_reconnect_count = 0;
|
|
77
|
+
};
|
|
78
|
+
cmdbox.gui_callback_ping_handler = setInterval(() => {ping();}, ping_interval);
|
|
73
79
|
};
|
|
74
80
|
ws.onerror = (e) => {
|
|
75
81
|
console.error(`Websocket error: ${e}`);
|
|
@@ -77,9 +83,17 @@ $(() => {
|
|
|
77
83
|
};
|
|
78
84
|
ws.onclose = () => {
|
|
79
85
|
clearInterval(cmdbox.gui_callback_ping_handler);
|
|
86
|
+
if (cmdbox.callback_reconnect_count >= max_reconnect_count) {
|
|
87
|
+
clearInterval(cmdbox.gui_callback_reconnectInterval_handler);
|
|
88
|
+
cmdbox.message({'error':'Connection to the agent has failed for several minutes. Please reload to resume reconnection.'});
|
|
89
|
+
const rand = cmdbox.random_string(8);
|
|
90
|
+
location.href = `../signin${path}?r=${rand}`;
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
cmdbox.callback_reconnect_count++;
|
|
80
94
|
cmdbox.gui_callback_reconnectInterval_handler = setInterval(() => {
|
|
81
95
|
gui_callback();
|
|
82
|
-
},
|
|
96
|
+
}, ping_interval);
|
|
83
97
|
};
|
|
84
98
|
};
|
|
85
99
|
gui_callback();
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
cmdbox/__init__.py,sha256=j2OAwj0wXaIoo_J_4tsEc5OaYd-5Vhco0SkBGf3Sd94,69
|
|
2
2
|
cmdbox/__main__.py,sha256=cHR9OrUw9fYbs3drwG4pJgafQEU_coNED4pZP7ZntMQ,109
|
|
3
3
|
cmdbox/config.yml,sha256=-gtxBIJzPw2wSM3bDd6HdqHdo1eeJ1gyPxWDmL5NUpk,54
|
|
4
|
-
cmdbox/
|
|
5
|
-
cmdbox/
|
|
6
|
-
cmdbox/
|
|
7
|
-
cmdbox/
|
|
8
|
-
cmdbox/
|
|
9
|
-
cmdbox/
|
|
10
|
-
cmdbox/
|
|
11
|
-
cmdbox/
|
|
12
|
-
cmdbox/version.py,sha256=witXeFqtNU9tsY24CMLUof-xvWlbPt9AsDS-kOfbPVc,2025
|
|
4
|
+
cmdbox/logconf_audit.yml,sha256=24GXtFQR-4eJyf01Nj1R8yeQudcu2ruMx9YhkCTzrA0,1086
|
|
5
|
+
cmdbox/logconf_client.yml,sha256=JrEHo6IrV-wRyUZhvfsCMlRFVU3t1eVyPMGHYbhGmto,1091
|
|
6
|
+
cmdbox/logconf_cmdbox.yml,sha256=t-3lCjT6mJQnS9NpLxz9bALOy9eD9Oz0yb1WKl29P80,1084
|
|
7
|
+
cmdbox/logconf_edge.yml,sha256=vRY-LxfWztk2QZOUN9kj_Eq6Y4qj8WzmiO9H0IRvjtQ,1081
|
|
8
|
+
cmdbox/logconf_gui.yml,sha256=-95vyd0q-aB1gsabdk8rg9dJ2zRKAZc8hRxyhNOQboU,1076
|
|
9
|
+
cmdbox/logconf_server.yml,sha256=n3c5-KVzjUzcUX5BQ6uE-PN9rp81yXaJql3whyCcSDQ,1091
|
|
10
|
+
cmdbox/logconf_web.yml,sha256=pPbdAwckbK0cgduxcVkx2mbk-Ymz5hVzR4guIsfApMQ,1076
|
|
11
|
+
cmdbox/version.py,sha256=61HZPeSTkOI0C5UMLs1RY6MJZUeEsWc7viwC8phuEhU,2031
|
|
13
12
|
cmdbox/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
13
|
cmdbox/app/app.py,sha256=YkzNBd1S1oNVwnNj1eYQUFOcrcjwdsQzv0z4mMOb_mw,9149
|
|
15
14
|
cmdbox/app/client.py,sha256=n986lXeV7hhaki4iyyvsfhNptmCXDFphxlNoNe2XhKg,19542
|
|
16
|
-
cmdbox/app/common.py,sha256=
|
|
15
|
+
cmdbox/app/common.py,sha256=qUdf8q1vK-e167nq-O2KGJ4gU-ZZNNNzzi0Bos7fWdI,25358
|
|
17
16
|
cmdbox/app/edge.py,sha256=yskob1ewd5hHbPJKWvjXm6j4IpawE4gM_lOqe70gX1w,41422
|
|
18
17
|
cmdbox/app/edge_tool.py,sha256=QqigDHcxRJa1BvK_DVq-ccNTVXg4BEBsHkYsaauMDu0,8050
|
|
19
18
|
cmdbox/app/feature.py,sha256=O3MTyQFinKXONeCvSRAt81HqZWgXV-je_-nUZi0cdCE,9910
|
|
20
19
|
cmdbox/app/filer.py,sha256=L_DSMTvnbN_ffr3JIt0obbOmVoTHEfVm2cAVz3rLH-Q,16059
|
|
21
|
-
cmdbox/app/options.py,sha256=
|
|
20
|
+
cmdbox/app/options.py,sha256=_VDUX0VeJ-UExJTFRlewTq6wT_3D-NVbYE0CvAmE-0g,45259
|
|
22
21
|
cmdbox/app/server.py,sha256=woOmIk901ONn5a_2yz_b3I1JpLYIF8g42uQRd0_MRuQ,10417
|
|
23
|
-
cmdbox/app/web.py,sha256=
|
|
22
|
+
cmdbox/app/web.py,sha256=LeiaN2qbmPS_p4fz4824tuN9lI64hEaY3sCZab1o9t4,53215
|
|
24
23
|
cmdbox/app/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
24
|
cmdbox/app/auth/azure_signin.py,sha256=ZVJTeZwdgM4y2loKiTMEPiXxbJwbdoTVMWciyJhgqc8,1666
|
|
26
25
|
cmdbox/app/auth/azure_signin_saml.py,sha256=oM2buGTK4t6-OsUuiUXTlZk0YXZL01khuPYVB84dMDU,472
|
|
@@ -29,11 +28,11 @@ cmdbox/app/auth/google_signin.py,sha256=LErFkKniumKgfE5jlY9_lAneKlqD6BfLHxg2lZgv
|
|
|
29
28
|
cmdbox/app/auth/signin.py,sha256=auRSJGJblQOF9mGDccSx2IptawF8BSnDCNs1Xgty2c0,49364
|
|
30
29
|
cmdbox/app/auth/signin_saml.py,sha256=MUM_hqCEjT-8xXNMHa-iH2j24SdBls4SU3k4BopRd48,2457
|
|
31
30
|
cmdbox/app/commons/convert.py,sha256=mkXPNQtX_pEH4L5DzonOY6Dh38SzJ5JQma_EY7UDBqU,7078
|
|
32
|
-
cmdbox/app/commons/loghandler.py,sha256=
|
|
31
|
+
cmdbox/app/commons/loghandler.py,sha256=go5Ui1c4AKqRSnxLzwrtPakYSjRHguXk4dGat1jD738,6323
|
|
33
32
|
cmdbox/app/commons/module.py,sha256=w63zqz5c6gLy-BZJ9dh4Q4C5PZyqM2Iqat5Zr9swJCI,4993
|
|
34
33
|
cmdbox/app/commons/redis_client.py,sha256=cOHshqAGI3CRWLcc2IMhk6MtXsVKlQq6HwcdqYsoA-0,14821
|
|
35
|
-
cmdbox/app/features/cli/agent_base.py,sha256=
|
|
36
|
-
cmdbox/app/features/cli/audit_base.py,sha256=
|
|
34
|
+
cmdbox/app/features/cli/agent_base.py,sha256=kY6lymXy9lA9-qcutRcJIBbjIHkNKKdTbvTcjKUyKs4,33625
|
|
35
|
+
cmdbox/app/features/cli/audit_base.py,sha256=wWWK31EUczvP4a1MNuz2KlqwaSn9yyt908ueRvjkuow,9405
|
|
37
36
|
cmdbox/app/features/cli/cmdbox_audit_createdb.py,sha256=Hmq3NVrAUBbj-UB9fum2TuWU7MIH71754S_s0X9oj40,12133
|
|
38
37
|
cmdbox/app/features/cli/cmdbox_audit_delete.py,sha256=2X6A8XtViOnUH7iDj02ZrqQhYBq7WOAwi-nL10der64,18922
|
|
39
38
|
cmdbox/app/features/cli/cmdbox_audit_search.py,sha256=Ib09SNAJ8lwkM6hiqn6knvN469PGaR9GQBJBIxRoeJM,28172
|
|
@@ -64,13 +63,13 @@ cmdbox/app/features/cli/cmdbox_web_group_add.py,sha256=aqeZ2BDFqRFzVG5sHKFAKuFXA
|
|
|
64
63
|
cmdbox/app/features/cli/cmdbox_web_group_del.py,sha256=wpi2LAX7Xs12jk98GRQXETd-sX9WzsocQsCX422JJz4,6583
|
|
65
64
|
cmdbox/app/features/cli/cmdbox_web_group_edit.py,sha256=ohlJCk1c_zbRq73udSUKsg-U5pQgdvAxe-U8GjRvy34,7312
|
|
66
65
|
cmdbox/app/features/cli/cmdbox_web_group_list.py,sha256=LyBsGtHZjqqr7YT-7Fa2cMqu8uY_wCmfYXbm4Z9ea0s,6678
|
|
67
|
-
cmdbox/app/features/cli/cmdbox_web_start.py,sha256=
|
|
66
|
+
cmdbox/app/features/cli/cmdbox_web_start.py,sha256=2H6x7GpTIyGzyLxvqR_LREFksiuiGJShKmccLvFTY5s,16291
|
|
68
67
|
cmdbox/app/features/cli/cmdbox_web_stop.py,sha256=yRLHhCR1sQvNep4-9-OITQkzeEQr1M-ZSLzd059D3EA,3568
|
|
69
68
|
cmdbox/app/features/cli/cmdbox_web_user_add.py,sha256=FrbFXK0fVwPI5YR1uEsGQgNX3NLsfkPJ7gBfl6rjJkI,8565
|
|
70
69
|
cmdbox/app/features/cli/cmdbox_web_user_del.py,sha256=bJ8Lqev4jHU68D5eYBaxkPWxmtTxWpN7sKeCJEZTIJc,6546
|
|
71
70
|
cmdbox/app/features/cli/cmdbox_web_user_edit.py,sha256=IAcZe9J0NHXwy-7Jk656HZXlV-RLYcWtqsXYJDFMwvQ,8473
|
|
72
71
|
cmdbox/app/features/cli/cmdbox_web_user_list.py,sha256=t2q6RthbKy0awcZR45BxRHgF-D2mOvRNC1T9thavTn4,6666
|
|
73
|
-
cmdbox/app/features/web/cmdbox_web_agent.py,sha256=
|
|
72
|
+
cmdbox/app/features/web/cmdbox_web_agent.py,sha256=6VUqMCJxdCz4vT5gGGMHlUibjtAy8FSwQVQ0-q74XfA,14272
|
|
74
73
|
cmdbox/app/features/web/cmdbox_web_assets.py,sha256=D1dYNrvC7xBAVAAHX6PkoB6RFehEofET4hkHeCFYq7s,1931
|
|
75
74
|
cmdbox/app/features/web/cmdbox_web_audit.py,sha256=-flyijdnh3hN-BKnw0GI3gSiduLP0vQFg_AiYCLXRBY,3359
|
|
76
75
|
cmdbox/app/features/web/cmdbox_web_audit_metrics.py,sha256=4zcWNcI_mCT36B0CNrtYz9rOAK6QXqyLzloFIgginxw,3189
|
|
@@ -79,8 +78,8 @@ cmdbox/app/features/web/cmdbox_web_copyright.py,sha256=kyDHGPQNSmnaZrORevNBvv4gU
|
|
|
79
78
|
cmdbox/app/features/web/cmdbox_web_del_cmd.py,sha256=3Bx2tuXJXc63yip9gWH2bXBydD4GNNYkmrFRXpK0sC0,1194
|
|
80
79
|
cmdbox/app/features/web/cmdbox_web_del_pipe.py,sha256=tPLvuLqk-MQjkh5WZfw9gL3ujR_W18raEwX_EKddNZw,1193
|
|
81
80
|
cmdbox/app/features/web/cmdbox_web_do_signin.py,sha256=Je9pYIdihmagP2eaIfyz6zIBbLc7_wHKxewjAQrt3IA,20787
|
|
82
|
-
cmdbox/app/features/web/cmdbox_web_do_signout.py,sha256=
|
|
83
|
-
cmdbox/app/features/web/cmdbox_web_exec_cmd.py,sha256=
|
|
81
|
+
cmdbox/app/features/web/cmdbox_web_do_signout.py,sha256=b64XcmioyuyEL6VFymcs5kFIt4zviqhqJbFUWRCdMo0,1109
|
|
82
|
+
cmdbox/app/features/web/cmdbox_web_exec_cmd.py,sha256=SUuaapl7Q7eTyrn45sTyjRtsVtZ3nAHXACffiQbcNCM,13174
|
|
84
83
|
cmdbox/app/features/web/cmdbox_web_exec_pipe.py,sha256=W9jd_9MTzC9GzgEd8X5C9Jwsn8pt6-_TFxyrHfO4iWk,10581
|
|
85
84
|
cmdbox/app/features/web/cmdbox_web_filer download.py,sha256=CVRDv0TZAEd87nzlquIO2O3rSm_tpc3i88H27FgNW4Y,2344
|
|
86
85
|
cmdbox/app/features/web/cmdbox_web_filer.py,sha256=2BdkOQFvaMMxtSoRz07RjercnfG51yChZiVrQGRDRTQ,1871
|
|
@@ -100,7 +99,7 @@ cmdbox/app/features/web/cmdbox_web_raw_pipe.py,sha256=vYyErScUwFQiv7HJ8xDgaja0bJ
|
|
|
100
99
|
cmdbox/app/features/web/cmdbox_web_result.py,sha256=hANYh1Qito_Fzs6qeTBetqWlsjsWlI2az-mNSoPkNf8,2404
|
|
101
100
|
cmdbox/app/features/web/cmdbox_web_save_cmd.py,sha256=pSuCcd-UTiQJ5MG2zMiQe5uo91S8wlyixijyaPZEclo,2134
|
|
102
101
|
cmdbox/app/features/web/cmdbox_web_save_pipe.py,sha256=QJjWeGVZH9G0Uj5FbnZx6Z4nUWQBTJstaolKfu5cX5Y,1614
|
|
103
|
-
cmdbox/app/features/web/cmdbox_web_signin.py,sha256=
|
|
102
|
+
cmdbox/app/features/web/cmdbox_web_signin.py,sha256=TvLKqmbZ0r96OXzK5XfRFuj_XJTREs73ls5DrfpZcuk,5677
|
|
104
103
|
cmdbox/app/features/web/cmdbox_web_user_data.py,sha256=vL_p2I6_dCmhz792nKZ2zvea-GhaRLrThvPvIShN-TU,2669
|
|
105
104
|
cmdbox/app/features/web/cmdbox_web_users.py,sha256=LZ3BUudBF21wqGO5EWwKvyLMxK_gE-foV7z1egv6-T8,10119
|
|
106
105
|
cmdbox/app/features/web/cmdbox_web_usesignout.py,sha256=lBjBj8M8e69uXhdv7H92wZfRRWD2j6kmC_WekSCw5yo,682
|
|
@@ -112,15 +111,15 @@ cmdbox/extensions/sample_project/requirements.txt,sha256=z_gUanGVrPeYUExYeU5_gHi
|
|
|
112
111
|
cmdbox/extensions/sample_project/.vscode/launch.json,sha256=Bj_FO1P0lPMfuwZxvyLfwQa0f7Gk276dvcVRjj2aem4,1348
|
|
113
112
|
cmdbox/extensions/sample_project/sample/__init__.py,sha256=UiUuJV0knNR9PazyIf-pyQGVZXAxHP01UjbwU9GXnRw,69
|
|
114
113
|
cmdbox/extensions/sample_project/sample/__main__.py,sha256=tVrTfVcCBhKcZp2qfkTxEV0DkPgQvEIDy4CMkqB_2cs,109
|
|
115
|
-
cmdbox/extensions/sample_project/sample/logconf_sample.yml,sha256=
|
|
114
|
+
cmdbox/extensions/sample_project/sample/logconf_sample.yml,sha256=RxPUzt-ZBzJMmCxordsM7Xm31xPH_TQlLFUjBAP6NNM,1092
|
|
116
115
|
cmdbox/extensions/sample_project/sample/version.py,sha256=Yj03cWCvXUFjCGDinEkiB5a7GEkFriJVsQurnGBYAPI,1448
|
|
117
116
|
cmdbox/extensions/sample_project/sample/app/app.py,sha256=2snmsdwgYuHfCNMpGtpOzJJUWJoB5Ovem1JsQRWqZrk,231
|
|
118
117
|
cmdbox/extensions/sample_project/sample/app/features/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
119
118
|
cmdbox/extensions/sample_project/sample/app/features/cli/sample_client_time.py,sha256=5ft6kjW7zgVWwtcGy-2eskg_sF6VamZ3oo2x80_oQgk,3131
|
|
120
119
|
cmdbox/extensions/sample_project/sample/app/features/cli/sample_server_time.py,sha256=XM8LvglW_e7ywYJihKItgw1ORdZxmb8FouTMU3PqeyU,7444
|
|
121
120
|
cmdbox/extensions/sample_project/sample/app/features/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
122
|
-
cmdbox/extensions/sample_project/sample/extensions/features.yml,sha256=
|
|
123
|
-
cmdbox/extensions/sample_project/sample/extensions/user_list.yml,sha256=
|
|
121
|
+
cmdbox/extensions/sample_project/sample/extensions/features.yml,sha256=Jn7kZVH95VU0bF6p2K2Wzv7V8u4AkUqi-_Fco5AwLoU,7374
|
|
122
|
+
cmdbox/extensions/sample_project/sample/extensions/user_list.yml,sha256=NfddsRnBOTOjPyN7UGTLoBppR1_boTvNXeZLodKgfZQ,10505
|
|
124
123
|
cmdbox/extensions/sample_project/sample/web/assets/sample/favicon.ico,sha256=z-jwmfktVBIsYjhUfCOj7ZNiq55GH-uXtbbDRzk7DHQ,9662
|
|
125
124
|
cmdbox/extensions/sample_project/sample/web/assets/sample/icon.png,sha256=8WmOhepVHG46KG8Sjs4OjZht16dTcgpsNIs972PiVWU,327723
|
|
126
125
|
cmdbox/licenses/LICENSE.Authlib.1.5.2(BSD License).txt,sha256=jYKqOj5UKtBY_y34_upU28Iok0WYyCO-8x-80yVPgd4,1543
|
|
@@ -302,16 +301,16 @@ cmdbox/web/assets/apexcharts/apexcharts.css,sha256=l-xkqykcV8a22g04B-Vpt4JFWcHlw
|
|
|
302
301
|
cmdbox/web/assets/apexcharts/apexcharts.min.js,sha256=zceUTsCKa8Y2SqjqZjLjifXQDnqsvKRTmT8fTIUix_4,570304
|
|
303
302
|
cmdbox/web/assets/bootstrap/bootstrap.bundle.min.5.3.0.js,sha256=qlPVgvl-tZTCpcxYJFdHB_m6mDe84wRr-l81VoYPTgQ,80421
|
|
304
303
|
cmdbox/web/assets/bootstrap/bootstrap.min.5.3.0.css,sha256=fx038NkLY4U1TCrBDiu5FWPEa9eiZu01EiLryshJbCo,232914
|
|
305
|
-
cmdbox/web/assets/cmdbox/agent.js,sha256=
|
|
304
|
+
cmdbox/web/assets/cmdbox/agent.js,sha256=hNkBdOCHMh9UItcoxeSuO_LxtpN6bRIyNmXIqPZ2w5Q,15839
|
|
306
305
|
cmdbox/web/assets/cmdbox/audit.js,sha256=5wFt4ejO4bwrOpt9yxOiwUz5XXXLOP8eo0ITTUwROZ0,19332
|
|
307
306
|
cmdbox/web/assets/cmdbox/color_mode.css,sha256=U4UGBnWiBMcrSEEusgT-_o-pt4MP3myoA9Lgnn1g6qE,19803
|
|
308
|
-
cmdbox/web/assets/cmdbox/common.js,sha256=
|
|
307
|
+
cmdbox/web/assets/cmdbox/common.js,sha256=s32LMd2eXdLE7DYlnX5HCdkCYcZm_pnpfxjICt3zA6A,65220
|
|
309
308
|
cmdbox/web/assets/cmdbox/favicon.ico,sha256=2U4MhqzJklRksOQwnK-MZigZCubxCHqKG_AuNJnvYtA,34494
|
|
310
309
|
cmdbox/web/assets/cmdbox/filer_modal.js,sha256=iKhNN9urjUm22na4vHYWhbj__2De9iAuDJE7TvBWtQ0,8566
|
|
311
310
|
cmdbox/web/assets/cmdbox/icon.png,sha256=xdEwDdCS8CoPQk7brW-1mV8FIGYtUeSMBRlY9Oh-3nE,296172
|
|
312
311
|
cmdbox/web/assets/cmdbox/list_cmd.js,sha256=4oVpXoSaUWXHKkxxCBEjoHgtrjTP1FSsL3QEHwjtaKc,21437
|
|
313
312
|
cmdbox/web/assets/cmdbox/list_pipe.js,sha256=2rPkauw9VHRMXl76qRgqy81Y815Y8B1tnVKOSKKfRwc,11315
|
|
314
|
-
cmdbox/web/assets/cmdbox/main.js,sha256=
|
|
313
|
+
cmdbox/web/assets/cmdbox/main.js,sha256=JRrFgjBEu66uMPmDHCrsvQFatl39YHEgR9BHpzHxbv4,5737
|
|
315
314
|
cmdbox/web/assets/cmdbox/open_capture.js,sha256=W4IQlOYLN4Y8OaS8Xc5yp-BRlm82TVjujChr3hJKS0M,709
|
|
316
315
|
cmdbox/web/assets/cmdbox/open_output_json.js,sha256=4q7mCdVmSzFudlTlW9MuIJ1-f-kDvpD6rDUU01IbKi8,727
|
|
317
316
|
cmdbox/web/assets/cmdbox/result.js,sha256=m7u6-VTXT4AK_6frn4dTIjEzDg0bfajD_Jv1MWgLZRo,3154
|
|
@@ -361,9 +360,9 @@ cmdbox/web/assets/tree-menu/image/file.png,sha256=Uw4zYkHyuoZ_kSVkesHAeSeA_g9_LP
|
|
|
361
360
|
cmdbox/web/assets/tree-menu/image/folder-close.png,sha256=TcgsKTBBF2ejgzekOEDBFBxsJf-Z5u0x9IZVi4GBR-I,284
|
|
362
361
|
cmdbox/web/assets/tree-menu/image/folder-open.png,sha256=DT7y1GRK4oXJkFvqTN_oSGM5ZYARzPvjoCGL6wqkoo0,301
|
|
363
362
|
cmdbox/web/assets/tree-menu/js/tree-menu.js,sha256=-GkZxI7xzHuXXHYQBHAVTcuKX4TtoiMuyIms6Xc3pxk,1029
|
|
364
|
-
cmdbox-0.6.0.dist-info/LICENSE,sha256=sBzzPc5v-5LBuIFi2V4olsnoVg-3EBI0zRX5r19SOxE,1117
|
|
365
|
-
cmdbox-0.6.0.dist-info/METADATA,sha256=
|
|
366
|
-
cmdbox-0.6.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
367
|
-
cmdbox-0.6.0.dist-info/entry_points.txt,sha256=1LdoMUjTD_YdxlsAiAiJ1cREcXFG8-Xg2xQTNYoNpT4,47
|
|
368
|
-
cmdbox-0.6.0.dist-info/top_level.txt,sha256=eMEkD5jn8_0PkCAL8h5xJu4qAzF2O8Wf3vegFkKUXR4,7
|
|
369
|
-
cmdbox-0.6.0.dist-info/RECORD,,
|
|
363
|
+
cmdbox-0.6.0.1.dist-info/LICENSE,sha256=sBzzPc5v-5LBuIFi2V4olsnoVg-3EBI0zRX5r19SOxE,1117
|
|
364
|
+
cmdbox-0.6.0.1.dist-info/METADATA,sha256=poydbldXRceRfMhIkVm9YhSOEQrtZaXJCefp6-BIF3A,30881
|
|
365
|
+
cmdbox-0.6.0.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
366
|
+
cmdbox-0.6.0.1.dist-info/entry_points.txt,sha256=1LdoMUjTD_YdxlsAiAiJ1cREcXFG8-Xg2xQTNYoNpT4,47
|
|
367
|
+
cmdbox-0.6.0.1.dist-info/top_level.txt,sha256=eMEkD5jn8_0PkCAL8h5xJu4qAzF2O8Wf3vegFkKUXR4,7
|
|
368
|
+
cmdbox-0.6.0.1.dist-info/RECORD,,
|
cmdbox/logconf_agent.yml
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
version: 1
|
|
2
|
-
|
|
3
|
-
formatters:
|
|
4
|
-
fmt:
|
|
5
|
-
format: '%(levelname)s[%(asctime)s] - %(message)s'
|
|
6
|
-
class: logging.Formatter
|
|
7
|
-
fmt_rich:
|
|
8
|
-
format: '%(message)s'
|
|
9
|
-
class: logging.Formatter
|
|
10
|
-
handlers:
|
|
11
|
-
std:
|
|
12
|
-
class: rich.logging.RichHandler
|
|
13
|
-
level: INFO
|
|
14
|
-
formatter: fmt_rich
|
|
15
|
-
show_path: false
|
|
16
|
-
omit_repeated_times: false
|
|
17
|
-
tracebacks_word_wrap: false
|
|
18
|
-
log_time_format: '[%Y-%m-%d %H:%M]'
|
|
19
|
-
#stream: ext://sys.stdout
|
|
20
|
-
agent:
|
|
21
|
-
class: logging.handlers.TimedRotatingFileHandler
|
|
22
|
-
level: INFO
|
|
23
|
-
formatter: fmt
|
|
24
|
-
backupCount: 5
|
|
25
|
-
when : 'D'
|
|
26
|
-
encoding : 'utf-8'
|
|
27
|
-
filename: .logs/cmdbox_agent.log
|
|
28
|
-
|
|
29
|
-
loggers:
|
|
30
|
-
agent:
|
|
31
|
-
handlers: [agent]
|
|
32
|
-
level: INFO
|
|
33
|
-
qualname: agent
|
|
34
|
-
propagate: false
|
|
35
|
-
|
|
36
|
-
#root:
|
|
37
|
-
# handlers: [std]
|
|
38
|
-
# level: NOTSET
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|