- execute_sql.dspy: SELECT-only SQL execution with pagination - read_log.dspy: read last N lines from whitelisted log files - tail_log.dspy: incremental log monitoring from last position - RBAC: developer role only - Security: SQL validation, log file whitelist
9 lines
252 B
Plaintext
9 lines
252 B
Plaintext
filename = params_kw.get('filename') or ''
|
|
reset = params_kw.get('reset', '').lower() in ('1', 'true', 'yes')
|
|
|
|
if not filename:
|
|
return {'status': 'error', 'error': '缺少 filename 参数'}
|
|
|
|
result = await tail_log_file(filename, reset)
|
|
return result
|