BARKLY DOCS human-readable engineering reference
BARKLY LABS · AUTOMATED DOCUMENTATION

CYN-X

A human-centered intelligent system connecting local AI, interfaces, tools, software, vision, hardware, and future systems.

generation #1 100 python files 373 functions 83 classes 6 endpoints
01
BARKLY DOCS

Project

The smallest useful picture of what this project is.

PROJECT DOCUMENTATION

CYN-X

A human-centered intelligent system connecting local AI, interfaces, tools, software, vision, hardware, and future systems.

TYPE
Intelligent System
STATUS
Active Development
PYTHON FILES
100
GENERATION
#1
02
BARKLY DOCS

Principles

The rules and design principles the project is built around.

01
Human First
02
Understandable
03
Private Where Practical
04
Experimental
03
BARKLY DOCS

Components

The major systems and pieces that make up the project.

01
Local AI
02
Memory
03
Multimodal Interaction
04
Computer Vision
05
AI Interfaces
06
Human-AI Collaboration
04
BARKLY DOCS

API Endpoints

Every discovered route is compact by default and expandable when you need its technical details.

0
hardware/web/app.py
3 endpoints
GET
/
home — No description documented yet.
WHAT IT DOES

No description documented yet.

HANDLER home
FRAMEWORK FastAPI / Starlette / compatible
SOURCE hardware/web/app.py:182
RETURNS Not documented
PARAMETERS
request
Request
ROUTE DECORATORS
app.get('/', response_class=HTMLResponse)
GET
/dashboard
dashboard — No description documented yet.
WHAT IT DOES

No description documented yet.

HANDLER dashboard
FRAMEWORK FastAPI / Starlette / compatible
SOURCE hardware/web/app.py:192
RETURNS Not documented
PARAMETERS
request
Request
ROUTE DECORATORS
app.get('/dashboard')
POST
/chat
chat — No description documented yet.
WHAT IT DOES

No description documented yet.

HANDLER chat
FRAMEWORK FastAPI / Starlette / compatible
SOURCE hardware/web/app.py:207
RETURNS Not documented
PARAMETERS
data
dict
ROUTE DECORATORS
app.post('/chat')
interfaces/web/app.py
3 endpoints
GET
/
home — No description documented yet.
WHAT IT DOES

No description documented yet.

HANDLER home
FRAMEWORK FastAPI / Starlette / compatible
SOURCE interfaces/web/app.py:183
RETURNS Not documented
PARAMETERS
request
Request
ROUTE DECORATORS
app.get('/', response_class=HTMLResponse)
GET
/dashboard
dashboard — No description documented yet.
WHAT IT DOES

No description documented yet.

HANDLER dashboard
FRAMEWORK FastAPI / Starlette / compatible
SOURCE interfaces/web/app.py:194
RETURNS Not documented
PARAMETERS
request
Request
ROUTE DECORATORS
app.get('/dashboard')
POST
/chat
chat — No description documented yet.
WHAT IT DOES

No description documented yet.

HANDLER chat
FRAMEWORK FastAPI / Starlette / compatible
SOURCE interfaces/web/app.py:210
RETURNS Not documented
PARAMETERS
data
dict
ROUTE DECORATORS
app.post('/chat')
05
BARKLY DOCS

Functions & Methods

Searchable, grouped symbols with details hidden until requested.

0
ai/personality.py
11 symbols
get_manager
Get or initialize the PromptManager singleton.
ai/personality.py:173
WHAT IT DOES

Get or initialize the PromptManager singleton.

SIGNATURE
get_manager() -> PromptManager
PARAMETERS
No parameters documented.
RETURNS PromptManager
SOURCE ai/personality.py:173
get_personality
Load a legacy personality fragment.
ai/personality.py:191
WHAT IT DOES

Load a legacy personality fragment.

SIGNATURE
get_personality(name: str) -> str
PARAMETERS
name
str
RETURNS str
SOURCE ai/personality.py:191
get_personality_matrix
Return a copy of the active personality matrix.
ai/personality.py:241
WHAT IT DOES

Return a copy of the active personality matrix.

SIGNATURE
get_personality_matrix() -> Dict[str, int]
PARAMETERS
No parameters documented.
RETURNS Dict[str, int]
SOURCE ai/personality.py:241
set_personality_matrix
Update the active personality matrix. Values are clamped between 0 and 100. Unknown traits are ignored. Invalid values are ignore…
ai/personality.py:249
WHAT IT DOES

Update the active personality matrix. Values are clamped between 0 and 100. Unknown traits are ignored. Invalid values are ignored.

SIGNATURE
set_personality_matrix(values: Dict[str, int]) -> Dict[str, int]
PARAMETERS
values
Dict[str, int]
RETURNS Dict[str, int]
SOURCE ai/personality.py:249
reset_personality_matrix
Reset the personality matrix to defaults.
ai/personality.py:294
WHAT IT DOES

Reset the personality matrix to defaults.

SIGNATURE
reset_personality_matrix() -> Dict[str, int]
PARAMETERS
No parameters documented.
RETURNS Dict[str, int]
SOURCE ai/personality.py:294
get_personality_preset
Return a personality preset. Unknown presets fall back to the default personality.
ai/personality.py:308
WHAT IT DOES

Return a personality preset. Unknown presets fall back to the default personality.

SIGNATURE
get_personality_preset(name: str) -> Dict[str, int]
PARAMETERS
name
str
RETURNS Dict[str, int]
SOURCE ai/personality.py:308
apply_personality_preset
Apply a personality preset to the active matrix.
ai/personality.py:330
WHAT IT DOES

Apply a personality preset to the active matrix.

SIGNATURE
apply_personality_preset(name: str) -> Dict[str, int]
PARAMETERS
name
str
RETURNS Dict[str, int]
SOURCE ai/personality.py:330
build_personality_prompt
Convert the active personality matrix into instructions that the language model can use.
ai/personality.py:351
WHAT IT DOES

Convert the active personality matrix into instructions that the language model can use.

SIGNATURE
build_personality_prompt() -> str
PARAMETERS
No parameters documented.
RETURNS str
SOURCE ai/personality.py:351
get_mode
No description documented yet.
ai/personality.py:459
WHAT IT DOES

No description documented yet.

SIGNATURE
get_mode(name: str) -> str
PARAMETERS
name
str
RETURNS str
SOURCE ai/personality.py:459
get_available_modes
No description documented yet.
ai/personality.py:470
WHAT IT DOES

No description documented yet.

SIGNATURE
get_available_modes() -> List[str]
PARAMETERS
No parameters documented.
RETURNS List[str]
SOURCE ai/personality.py:470
build_system_prompt
No description documented yet.
ai/personality.py:481
WHAT IT DOES

No description documented yet.

SIGNATURE
build_system_prompt(core: bool = True, modes: List[str] = None, memory: str = '', context: str = '') -> str
PARAMETERS
core
bool
= True
modes
List[str]
= None
memory
str
= ''
context
str
= ''
RETURNS str
SOURCE ai/personality.py:481
barkly_docs.py
50 symbols
esc
No description documented yet.
barkly_docs.py:218
WHAT IT DOES

No description documented yet.

SIGNATURE
esc(value: object) -> str
PARAMETERS
value
object
RETURNS str
SOURCE barkly_docs.py:218
compact_doc
No description documented yet.
barkly_docs.py:222
WHAT IT DOES

No description documented yet.

SIGNATURE
compact_doc(doc: str, limit: int = 180) -> str
PARAMETERS
doc
str
limit
int
= 180
RETURNS str
SOURCE barkly_docs.py:222
full_doc
No description documented yet.
barkly_docs.py:234
WHAT IT DOES

No description documented yet.

SIGNATURE
full_doc(doc: str) -> str
PARAMETERS
doc
str
RETURNS str
SOURCE barkly_docs.py:234
expression_text
No description documented yet.
barkly_docs.py:241
WHAT IT DOES

No description documented yet.

SIGNATURE
expression_text(node: Optional[ast.AST]) -> str
PARAMETERS
node
Optional[ast.AST]
RETURNS str
SOURCE barkly_docs.py:241
annotation_text
No description documented yet.
barkly_docs.py:251
WHAT IT DOES

No description documented yet.

SIGNATURE
annotation_text(node: Optional[ast.AST]) -> str
PARAMETERS
node
Optional[ast.AST]
RETURNS str
SOURCE barkly_docs.py:251
relative_file
No description documented yet.
barkly_docs.py:255
WHAT IT DOES

No description documented yet.

SIGNATURE
relative_file(path: Path, root: Path) -> str
PARAMETERS
path
Path
root
Path
RETURNS str
SOURCE barkly_docs.py:255
code_line
No description documented yet.
barkly_docs.py:262
WHAT IT DOES

No description documented yet.

SIGNATURE
code_line(file: str, line: int) -> str
PARAMETERS
file
str
line
int
RETURNS str
SOURCE barkly_docs.py:262
short_hash
No description documented yet.
barkly_docs.py:266
WHAT IT DOES

No description documented yet.

SIGNATURE
short_hash(value: str) -> str
PARAMETERS
value
str
RETURNS str
SOURCE barkly_docs.py:266
safe_call
No description documented yet.
barkly_docs.py:270
WHAT IT DOES

No description documented yet.

SIGNATURE
safe_call(command: list[str], cwd: Path) -> str
PARAMETERS
command
list[str]
cwd
Path
RETURNS str
SOURCE barkly_docs.py:270
git_branch
No description documented yet.
barkly_docs.py:289
WHAT IT DOES

No description documented yet.

SIGNATURE
git_branch(root: Path) -> str
PARAMETERS
root
Path
RETURNS str
SOURCE barkly_docs.py:289
git_commit
No description documented yet.
barkly_docs.py:296
WHAT IT DOES

No description documented yet.

SIGNATURE
git_commit(root: Path) -> str
PARAMETERS
root
Path
RETURNS str
SOURCE barkly_docs.py:296
git_log
No description documented yet.
barkly_docs.py:303
WHAT IT DOES

No description documented yet.

SIGNATURE
git_log(root: Path, limit: int = 8) -> list[str]
PARAMETERS
root
Path
limit
int
= 8
RETURNS list[str]
SOURCE barkly_docs.py:303
node_doc
No description documented yet.
barkly_docs.py:325
WHAT IT DOES

No description documented yet.

SIGNATURE
node_doc(node: ast.AST) -> str
PARAMETERS
node
ast.AST
RETURNS str
SOURCE barkly_docs.py:325
decorator_name
No description documented yet.
barkly_docs.py:329
WHAT IT DOES

No description documented yet.

SIGNATURE
decorator_name(node: ast.AST) -> str
PARAMETERS
node
ast.AST
RETURNS str
SOURCE barkly_docs.py:329
decorator_text
No description documented yet.
barkly_docs.py:343
WHAT IT DOES

No description documented yet.

SIGNATURE
decorator_text(node: ast.AST) -> str
PARAMETERS
node
ast.AST
RETURNS str
SOURCE barkly_docs.py:343
decorators_for
No description documented yet.
barkly_docs.py:347
WHAT IT DOES

No description documented yet.

SIGNATURE
decorators_for(node: ast.AST) -> list[str]
PARAMETERS
node
ast.AST
RETURNS list[str]
SOURCE barkly_docs.py:347
parameter_kind
No description documented yet.
barkly_docs.py:354
WHAT IT DOES

No description documented yet.

SIGNATURE
parameter_kind(name: str, default_node: Optional[ast.AST]) -> str
PARAMETERS
name
str
default_node
Optional[ast.AST]
RETURNS str
SOURCE barkly_docs.py:354
collect_parameters
No description documented yet.
barkly_docs.py:379
WHAT IT DOES

No description documented yet.

SIGNATURE
collect_parameters(node: ast.FunctionDef | ast.AsyncFunctionDef) -> list[Parameter]
PARAMETERS
node
ast.FunctionDef | ast.AsyncFunctionDef
RETURNS list[Parameter]
SOURCE barkly_docs.py:379
call_root_name
No description documented yet.
barkly_docs.py:447
WHAT IT DOES

No description documented yet.

SIGNATURE
call_root_name(node: ast.Call) -> str
PARAMETERS
node
ast.Call
RETURNS str
SOURCE barkly_docs.py:447
extract_string_argument
No description documented yet.
barkly_docs.py:457
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_string_argument(call: ast.Call, index: int = 0) -> str
PARAMETERS
call
ast.Call
index
int
= 0
RETURNS str
SOURCE barkly_docs.py:457
extract_methods_keyword
No description documented yet.
barkly_docs.py:472
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_methods_keyword(call: ast.Call) -> list[str]
PARAMETERS
call
ast.Call
RETURNS list[str]
SOURCE barkly_docs.py:472
endpoint_from_decorator
No description documented yet.
barkly_docs.py:491
WHAT IT DOES

No description documented yet.

SIGNATURE
endpoint_from_decorator(decorator: ast.AST, function: ast.FunctionDef | ast.AsyncFunctionDef, file: str) -> Optional[EndpointInfo]
PARAMETERS
decorator
ast.AST
function
ast.FunctionDef | ast.AsyncFunctionDef
file
str
RETURNS Optional[EndpointInfo]
SOURCE barkly_docs.py:491
scan_python
No description documented yet.
barkly_docs.py:752
WHAT IT DOES

No description documented yet.

SIGNATURE
scan_python(root: Path) -> PythonScanner
PARAMETERS
root
Path
RETURNS PythonScanner
SOURCE barkly_docs.py:752
symbol_key
No description documented yet.
barkly_docs.py:762
WHAT IT DOES

No description documented yet.

SIGNATURE
symbol_key(function: FunctionInfo) -> str
PARAMETERS
function
FunctionInfo
RETURNS str
SOURCE barkly_docs.py:762
class_key
No description documented yet.
barkly_docs.py:766
WHAT IT DOES

No description documented yet.

SIGNATURE
class_key(item: ClassInfo) -> str
PARAMETERS
item
ClassInfo
RETURNS str
SOURCE barkly_docs.py:766
endpoint_key
No description documented yet.
barkly_docs.py:770
WHAT IT DOES

No description documented yet.

SIGNATURE
endpoint_key(item: EndpointInfo) -> str
PARAMETERS
item
EndpointInfo
RETURNS str
SOURCE barkly_docs.py:770
function_fingerprint
No description documented yet.
barkly_docs.py:779
WHAT IT DOES

No description documented yet.

SIGNATURE
function_fingerprint(item: FunctionInfo) -> str
PARAMETERS
item
FunctionInfo
RETURNS str
SOURCE barkly_docs.py:779
class_fingerprint
No description documented yet.
barkly_docs.py:793
WHAT IT DOES

No description documented yet.

SIGNATURE
class_fingerprint(item: ClassInfo) -> str
PARAMETERS
item
ClassInfo
RETURNS str
SOURCE barkly_docs.py:793
endpoint_fingerprint
No description documented yet.
barkly_docs.py:810
WHAT IT DOES

No description documented yet.

SIGNATURE
endpoint_fingerprint(item: EndpointInfo) -> str
PARAMETERS
item
EndpointInfo
RETURNS str
SOURCE barkly_docs.py:810
load_state
No description documented yet.
barkly_docs.py:835
WHAT IT DOES

No description documented yet.

SIGNATURE
load_state(path: Path) -> dict
PARAMETERS
path
Path
RETURNS dict
SOURCE barkly_docs.py:835
apply_state
No description documented yet.
barkly_docs.py:861
WHAT IT DOES

No description documented yet.

SIGNATURE
apply_state(scanner: PythonScanner, previous: dict) -> dict
PARAMETERS
scanner
PythonScanner
previous
dict
RETURNS dict
SOURCE barkly_docs.py:861
load_project_config
No description documented yet.
barkly_docs.py:919
WHAT IT DOES

No description documented yet.

SIGNATURE
load_project_config(root: Path) -> dict
PARAMETERS
root
Path
RETURNS dict
SOURCE barkly_docs.py:919
init_project
No description documented yet.
barkly_docs.py:941
WHAT IT DOES

No description documented yet.

SIGNATURE
init_project(root: Path) -> None
PARAMETERS
root
Path
RETURNS None
SOURCE barkly_docs.py:941
badge
No description documented yet.
barkly_docs.py:963
WHAT IT DOES

No description documented yet.

SIGNATURE
badge(text: str, kind: str = '') -> str
PARAMETERS
text
str
kind
str
= ''
RETURNS str
SOURCE barkly_docs.py:963
status_badges
No description documented yet.
barkly_docs.py:977
WHAT IT DOES

No description documented yet.

SIGNATURE
status_badges(is_new: bool, is_changed: bool) -> str
PARAMETERS
is_new
bool
is_changed
bool
RETURNS str
SOURCE barkly_docs.py:977
parameter_summary
No description documented yet.
barkly_docs.py:997
WHAT IT DOES

No description documented yet.

SIGNATURE
parameter_summary(params: list[Parameter]) -> str
PARAMETERS
params
list[Parameter]
RETURNS str
SOURCE barkly_docs.py:997
parameter_details
No description documented yet.
barkly_docs.py:1010
WHAT IT DOES

No description documented yet.

SIGNATURE
parameter_details(params: list[Parameter]) -> str
PARAMETERS
params
list[Parameter]
RETURNS str
SOURCE barkly_docs.py:1010
function_row
No description documented yet.
barkly_docs.py:1070
WHAT IT DOES

No description documented yet.

SIGNATURE
function_row(item: FunctionInfo, show_class: bool = False) -> str
PARAMETERS
item
FunctionInfo
show_class
bool
= False
RETURNS str
SOURCE barkly_docs.py:1070
method_group
No description documented yet.
barkly_docs.py:1179
WHAT IT DOES

No description documented yet.

SIGNATURE
method_group(title: str, functions: list[FunctionInfo]) -> str
PARAMETERS
title
str
functions
list[FunctionInfo]
RETURNS str
SOURCE barkly_docs.py:1179
class_group
No description documented yet.
barkly_docs.py:1244
WHAT IT DOES

No description documented yet.

SIGNATURE
class_group(item: ClassInfo) -> str
PARAMETERS
item
ClassInfo
RETURNS str
SOURCE barkly_docs.py:1244
endpoint_row
No description documented yet.
barkly_docs.py:1332
WHAT IT DOES

No description documented yet.

SIGNATURE
endpoint_row(item: EndpointInfo) -> str
PARAMETERS
item
EndpointInfo
RETURNS str
SOURCE barkly_docs.py:1332
module_row
No description documented yet.
barkly_docs.py:1447
WHAT IT DOES

No description documented yet.

SIGNATURE
module_row(module: ModuleInfo) -> str
PARAMETERS
module
ModuleInfo
RETURNS str
SOURCE barkly_docs.py:1447
section
No description documented yet.
barkly_docs.py:1526
WHAT IT DOES

No description documented yet.

SIGNATURE
section(number: str, title: str, description: str, body: str) -> str
PARAMETERS
number
str
title
str
description
str
body
str
RETURNS str
SOURCE barkly_docs.py:1526
info_card
No description documented yet.
barkly_docs.py:1566
WHAT IT DOES

No description documented yet.

SIGNATURE
info_card(title: str, value: str, description: str = '') -> str
PARAMETERS
title
str
value
str
description
str
= ''
RETURNS str
SOURCE barkly_docs.py:1566
simple_card_grid
No description documented yet.
barkly_docs.py:1593
WHAT IT DOES

No description documented yet.

SIGNATURE
simple_card_grid(values: list[str]) -> str
PARAMETERS
values
list[str]
RETURNS str
SOURCE barkly_docs.py:1593
search_toolbar
No description documented yet.
barkly_docs.py:1610
WHAT IT DOES

No description documented yet.

SIGNATURE
search_toolbar(input_id: str, count_id: str, new_id: str, placeholder: str) -> str
PARAMETERS
input_id
str
count_id
str
new_id
str
placeholder
str
RETURNS str
SOURCE barkly_docs.py:1610
build_html
No description documented yet.
barkly_docs.py:1656
WHAT IT DOES

No description documented yet.

SIGNATURE
build_html(project: dict, scanner: PythonScanner, state: dict, root: Path) -> str
PARAMETERS
project
dict
scanner
PythonScanner
state
dict
root
Path
RETURNS str
SOURCE barkly_docs.py:1656
generate
No description documented yet.
barkly_docs.py:3391
WHAT IT DOES

No description documented yet.

SIGNATURE
generate(source: Path, output: Path, name: Optional[str] = None, project_type: Optional[str] = None, status: Optional[str] = None) -> None
PARAMETERS
source
Path
output
Path
name
Optional[str]
= None
project_type
Optional[str]
= None
status
Optional[str]
= None
RETURNS None
SOURCE barkly_docs.py:3391
build_parser
No description documented yet.
barkly_docs.py:3483
WHAT IT DOES

No description documented yet.

SIGNATURE
build_parser() -> argparse.ArgumentParser
PARAMETERS
No parameters documented.
RETURNS argparse.ArgumentParser
SOURCE barkly_docs.py:3483
main
No description documented yet.
barkly_docs.py:3547
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE barkly_docs.py:3547
benchmark/analyzer.py
5 symbols
analyze_response
No description documented yet.
benchmark/analyzer.py:19
WHAT IT DOES

No description documented yet.

SIGNATURE
analyze_response(response: str) -> dict
PARAMETERS
response
str
RETURNS dict
SOURCE benchmark/analyzer.py:19
analyze_tool_test
Analyze tool execution recorded by the benchmark runner. IMPORTANT: This function does NOT run a tool. The runner is responsible…
benchmark/analyzer.py:109
WHAT IT DOES

Analyze tool execution recorded by the benchmark runner. IMPORTANT: This function does NOT run a tool. The runner is responsible for actually running CYN-X and recording what happened. This analyzer only determines whether the recorded tool execution matches the expected behavior. Supported locations: result["tool_test"] or: result["analysis"]["tool_test"] Expected fields: expected_tool tool_called tool_name tool_arguments tool_result result_passed_to_llm failure

SIGNATURE
analyze_tool_test(result: dict) -> dict | None
PARAMETERS
result
dict
RETURNS dict | None
SOURCE benchmark/analyzer.py:109
analyze_file
No description documented yet.
benchmark/analyzer.py:331
WHAT IT DOES

No description documented yet.

SIGNATURE
analyze_file(path: Path) -> dict | None
PARAMETERS
path
Path
RETURNS dict | None
SOURCE benchmark/analyzer.py:331
find_result_files
Find all individual benchmark result files. Results are stored by runner.py under: benchmark/results/sections/
benchmark/analyzer.py:529
WHAT IT DOES

Find all individual benchmark result files. Results are stored by runner.py under: benchmark/results/sections/

SIGNATURE
find_result_files()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE benchmark/analyzer.py:529
analyze_results
No description documented yet.
benchmark/analyzer.py:554
WHAT IT DOES

No description documented yet.

SIGNATURE
analyze_results()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE benchmark/analyzer.py:554
benchmark/cleaner.py
1 symbols
main
No description documented yet.
benchmark/cleaner.py:448
WHAT IT DOES

No description documented yet.

SIGNATURE
main()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE benchmark/cleaner.py:448
benchmark/cli.py
1 symbols
get_benchmark_command
Parse benchmark command-line arguments. Supported: python -m benchmark.runner python -m benchmark.runner quick python -m benchmar…
benchmark/cli.py:4
WHAT IT DOES

Parse benchmark command-line arguments. Supported: python -m benchmark.runner python -m benchmark.runner quick python -m benchmark.runner normal python -m benchmark.runner full python -m benchmark.runner --all python -m benchmark.runner --suite personality python -m benchmark.runner --suite personality safety memory python -m benchmark.runner --suite personality --limit 5 python -m benchmark.runner --suite personality safety --limit 10 python -m benchmark.runner --all --limit 10

SIGNATURE
get_benchmark_command()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE benchmark/cli.py:4
benchmark/formatter.py
1 symbols
format_benchmark_result
No description documented yet.
benchmark/formatter.py:10
WHAT IT DOES

No description documented yet.

SIGNATURE
format_benchmark_result(test_id: str, category: str, question: str, response: str, response_time_seconds: float, observed_topics: list[str], behavior_tags: list[str], response_words: int = 0, response_characters: int = 0, response_lines: int = 0, response_sentences: int = 0, estimated_tokens: int = 0, scores: dict | None = None) -> dict
PARAMETERS
test_id
str
category
str
question
str
response
str
response_time_seconds
float
observed_topics
list[str]
behavior_tags
list[str]
response_words
int
= 0
response_characters
int
= 0
response_lines
int
= 0
response_sentences
int
= 0
estimated_tokens
int
= 0
scores
dict | None
= None
RETURNS dict
SOURCE benchmark/formatter.py:10
benchmark/modes.py
2 symbols
apply_benchmark_filters
Filters benchmark tests before execution. Args: tests: Loaded benchmark test list. limit: Maximum number of tests to run. categor…
benchmark/modes.py:6
WHAT IT DOES

Filters benchmark tests before execution. Args: tests: Loaded benchmark test list. limit: Maximum number of tests to run. categories: Only run tests matching these categories. suites: Only run tests from these benchmark suites. Returns: Filtered list of benchmark tests.

SIGNATURE
apply_benchmark_filters(tests: list[dict], limit: Optional[int] = None, categories: Optional[list[str]] = None, suites: Optional[list[str]] = None) -> list[dict]
PARAMETERS
tests
list[dict]
limit
Optional[int]
= None
categories
Optional[list[str]]
= None
suites
Optional[list[str]]
= None
RETURNS list[dict]
SOURCE benchmark/modes.py:6
get_benchmark_mode
Returns preset benchmark configurations. Modes: quick normal full
benchmark/modes.py:93
WHAT IT DOES

Returns preset benchmark configurations. Modes: quick normal full

SIGNATURE
get_benchmark_mode(mode: str) -> dict
PARAMETERS
mode
str
RETURNS dict
SOURCE benchmark/modes.py:93
benchmark/runner.py
20 symbols
get_result_section
No description documented yet.
benchmark/runner.py:140
WHAT IT DOES

No description documented yet.

SIGNATURE
get_result_section(category)
PARAMETERS
category
RETURNS Not documented
SOURCE benchmark/runner.py:140
_colorized_message
No description documented yet.
benchmark/runner.py:162
WHAT IT DOES

No description documented yet.

SIGNATURE
_colorized_message(message, style)
PARAMETERS
message
style
RETURNS Not documented
SOURCE benchmark/runner.py:162
bench_info
No description documented yet.
benchmark/runner.py:166
WHAT IT DOES

No description documented yet.

SIGNATURE
bench_info(message)
PARAMETERS
message
RETURNS Not documented
SOURCE benchmark/runner.py:166
bench_warning
No description documented yet.
benchmark/runner.py:175
WHAT IT DOES

No description documented yet.

SIGNATURE
bench_warning(message)
PARAMETERS
message
RETURNS Not documented
SOURCE benchmark/runner.py:175
bench_error
No description documented yet.
benchmark/runner.py:184
WHAT IT DOES

No description documented yet.

SIGNATURE
bench_error(message)
PARAMETERS
message
RETURNS Not documented
SOURCE benchmark/runner.py:184
bench_pass
No description documented yet.
benchmark/runner.py:193
WHAT IT DOES

No description documented yet.

SIGNATURE
bench_pass(message)
PARAMETERS
message
RETURNS Not documented
SOURCE benchmark/runner.py:193
bench_fail
No description documented yet.
benchmark/runner.py:199
WHAT IT DOES

No description documented yet.

SIGNATURE
bench_fail(message)
PARAMETERS
message
RETURNS Not documented
SOURCE benchmark/runner.py:199
bench_header
No description documented yet.
benchmark/runner.py:205
WHAT IT DOES

No description documented yet.

SIGNATURE
bench_header(message)
PARAMETERS
message
RETURNS Not documented
SOURCE benchmark/runner.py:205
bench_suite
No description documented yet.
benchmark/runner.py:211
WHAT IT DOES

No description documented yet.

SIGNATURE
bench_suite(name)
PARAMETERS
name
RETURNS Not documented
SOURCE benchmark/runner.py:211
bench_test_id
No description documented yet.
benchmark/runner.py:215
WHAT IT DOES

No description documented yet.

SIGNATURE
bench_test_id(test_id)
PARAMETERS
test_id
RETURNS Not documented
SOURCE benchmark/runner.py:215
setup_logging
No description documented yet.
benchmark/runner.py:219
WHAT IT DOES

No description documented yet.

SIGNATURE
setup_logging()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE benchmark/runner.py:219
load_questions
No description documented yet.
benchmark/runner.py:324
WHAT IT DOES

No description documented yet.

SIGNATURE
load_questions(suites = None)
PARAMETERS
suites
= None
RETURNS Not documented
SOURCE benchmark/runner.py:324
configure_benchmark_prompt
Configure the existing PromptBuilder using the benchmark test's prompt preset/layers. Uses the existing PromptBuilder layer syste…
benchmark/runner.py:547
WHAT IT DOES

Configure the existing PromptBuilder using the benchmark test's prompt preset/layers. Uses the existing PromptBuilder layer system. Does not require apply_preset() or set_preset().

SIGNATURE
configure_benchmark_prompt(chat_engine, test)
PARAMETERS
chat_engine
test
RETURNS Not documented
SOURCE benchmark/runner.py:547
format_prompt_layers
No description documented yet.
benchmark/runner.py:728
WHAT IT DOES

No description documented yet.

SIGNATURE
format_prompt_layers(layers)
PARAMETERS
layers
RETURNS Not documented
SOURCE benchmark/runner.py:728
score_response
No description documented yet.
benchmark/runner.py:1205
WHAT IT DOES

No description documented yet.

SIGNATURE
score_response(response, category)
PARAMETERS
response
category
RETURNS Not documented
SOURCE benchmark/runner.py:1205
run_single_test
No description documented yet.
benchmark/runner.py:1354
WHAT IT DOES

No description documented yet.

SIGNATURE
run_single_test(chat_engine, test)
PARAMETERS
chat_engine
test
RETURNS Not documented
SOURCE benchmark/runner.py:1354
run_benchmark
No description documented yet.
benchmark/runner.py:1724
WHAT IT DOES

No description documented yet.

SIGNATURE
run_benchmark(chat_engine, limit = None, categories = None, suites = None)
PARAMETERS
chat_engine
limit
= None
categories
= None
suites
= None
RETURNS Not documented
SOURCE benchmark/runner.py:1724
create_cynx_engine
No description documented yet.
benchmark/runner.py:2078
WHAT IT DOES

No description documented yet.

SIGNATURE
create_cynx_engine()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE benchmark/runner.py:2078
run_command
No description documented yet.
benchmark/runner.py:2220
WHAT IT DOES

No description documented yet.

SIGNATURE
run_command(engine)
PARAMETERS
engine
RETURNS Not documented
SOURCE benchmark/runner.py:2220
main
No description documented yet.
benchmark/runner.py:2395
WHAT IT DOES

No description documented yet.

SIGNATURE
main()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE benchmark/runner.py:2395
benchmark/visualize.py
4 symbols
load_results
No description documented yet.
benchmark/visualize.py:45
WHAT IT DOES

No description documented yet.

SIGNATURE
load_results()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE benchmark/visualize.py:45
score_rating
No description documented yet.
benchmark/visualize.py:244
WHAT IT DOES

No description documented yet.

SIGNATURE
score_rating(score)
PARAMETERS
score
RETURNS Not documented
SOURCE benchmark/visualize.py:244
human_category_name
No description documented yet.
benchmark/visualize.py:279
WHAT IT DOES

No description documented yet.

SIGNATURE
human_category_name(name)
PARAMETERS
name
RETURNS Not documented
SOURCE benchmark/visualize.py:279
graph
No description documented yet.
benchmark/visualize.py:362
WHAT IT DOES

No description documented yet.

SIGNATURE
graph(name, values, title, label)
PARAMETERS
name
values
title
label
RETURNS Not documented
SOURCE benchmark/visualize.py:362
clean_cyn.py
2 symbols
clean_file
No description documented yet.
clean_cyn.py:22
WHAT IT DOES

No description documented yet.

SIGNATURE
clean_file(path: Path)
PARAMETERS
path
Path
RETURNS Not documented
SOURCE clean_cyn.py:22
main
No description documented yet.
clean_cyn.py:49
WHAT IT DOES

No description documented yet.

SIGNATURE
main()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE clean_cyn.py:49
config.py
2 symbols
get_config
No description documented yet.
config.py:25
WHAT IT DOES

No description documented yet.

SIGNATURE
get_config() -> Config
PARAMETERS
No parameters documented.
RETURNS Config
SOURCE config.py:25
logging_level_from_env
No description documented yet.
config.py:43
WHAT IT DOES

No description documented yet.

SIGNATURE
logging_level_from_env() -> int
PARAMETERS
No parameters documented.
RETURNS int
SOURCE config.py:43
cyndiscord.py
2 symbols
on_ready
No description documented yet.
cyndiscord.py:69
WHAT IT DOES

No description documented yet.

SIGNATURE
on_ready()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE cyndiscord.py:69
DECORATORS
client.event
on_message
No description documented yet.
cyndiscord.py:73
WHAT IT DOES

No description documented yet.

SIGNATURE
on_message(message)
PARAMETERS
message
RETURNS Not documented
SOURCE cyndiscord.py:73
DECORATORS
client.event
hardware/lepro/discovery.py
1 symbols
discover_devices
No description documented yet.
hardware/lepro/discovery.py:63
WHAT IT DOES

No description documented yet.

SIGNATURE
discover_devices(timeout: float = 15.0) -> list[dict[str, Any]]
PARAMETERS
timeout
float
= 15.0
RETURNS list[dict[str, Any]]
SOURCE hardware/lepro/discovery.py:63
hardware/lepro/lib/lepro/bond.py
15 symbols
tokens_from_bond_frames
Bond keys from post-bond 0x2100 notify (64 B: hs + auth_16 + auth_32). Ghidra: libiot requestBond only sends encrypted magic; no…
hardware/lepro/lib/lepro/bond.py:108
WHAT IT DOES

Bond keys from post-bond 0x2100 notify (64 B: hs + auth_16 + auth_32). Ghidra: libiot requestBond only sends encrypted magic; no tokens in .so. Firmware pushes per-bond keys on 0x2100 (FUN_4200e078 / FUN_4201d274 result 7). ctrl_c/ctrl_d stay device-static (protocol.py captures).

SIGNATURE
tokens_from_bond_frames(frames: list[DecryptedFrame], after_index: int = 0) -> BondTokens
PARAMETERS
frames
list[DecryptedFrame]
after_index
int
= 0
RETURNS BondTokens
SOURCE hardware/lepro/lib/lepro/bond.py:108
is_bond_success
True for bond result 0/7 or 16-byte LIGHT_ACK on 0x1003.
hardware/lepro/lib/lepro/bond.py:145
WHAT IT DOES

True for bond result 0/7 or 16-byte LIGHT_ACK on 0x1003.

SIGNATURE
is_bond_success(frame: DecryptedFrame) -> bool
PARAMETERS
frame
DecryptedFrame
RETURNS bool
SOURCE hardware/lepro/lib/lepro/bond.py:145
normalize_mac
No description documented yet.
hardware/lepro/lib/lepro/bond.py:156
WHAT IT DOES

No description documented yet.

SIGNATURE
normalize_mac(mac: str) -> str
PARAMETERS
mac
str
RETURNS str
SOURCE hardware/lepro/lib/lepro/bond.py:156
creds_path
No description documented yet.
hardware/lepro/lib/lepro/bond.py:163
WHAT IT DOES

No description documented yet.

SIGNATURE
creds_path(mac: str) -> Path
PARAMETERS
mac
str
RETURNS Path
SOURCE hardware/lepro/lib/lepro/bond.py:163
load_creds
No description documented yet.
hardware/lepro/lib/lepro/bond.py:168
WHAT IT DOES

No description documented yet.

SIGNATURE
load_creds(mac: str) -> BondCredentials | None
PARAMETERS
mac
str
RETURNS BondCredentials | None
SOURCE hardware/lepro/lib/lepro/bond.py:168
save_creds
No description documented yet.
hardware/lepro/lib/lepro/bond.py:176
WHAT IT DOES

No description documented yet.

SIGNATURE
save_creds(creds: BondCredentials) -> Path
PARAMETERS
creds
BondCredentials
RETURNS Path
SOURCE hardware/lepro/lib/lepro/bond.py:176
harvest_tokens
Heuristic token harvest from bond-session RX. Scans decrypted cert/device-info payloads and raw notify bytes for unique 16B and 3…
hardware/lepro/lib/lepro/bond.py:183
WHAT IT DOES

Heuristic token harvest from bond-session RX. Scans decrypted cert/device-info payloads and raw notify bytes for unique 16B and 32B candidates. Prefer blobs appearing in cert (0x2000).

SIGNATURE
harvest_tokens(frames: list[DecryptedFrame], raw_rx: list[bytes]) -> BondTokens
PARAMETERS
frames
list[DecryptedFrame]
raw_rx
list[bytes]
RETURNS BondTokens
SOURCE hardware/lepro/lib/lepro/bond.py:183
check_bond_result
No description documented yet.
hardware/lepro/lib/lepro/bond.py:232
WHAT IT DOES

No description documented yet.

SIGNATURE
check_bond_result(frames: list[DecryptedFrame]) -> int
PARAMETERS
frames
list[DecryptedFrame]
RETURNS int
SOURCE hardware/lepro/lib/lepro/bond.py:232
_scan_blob
No description documented yet.
hardware/lepro/lib/lepro/bond.py:240
WHAT IT DOES

No description documented yet.

SIGNATURE
_scan_blob(data: bytes, out_16: list[bytes], out_32: list[bytes]) -> None
PARAMETERS
data
bytes
out_16
list[bytes]
out_32
list[bytes]
RETURNS None
SOURCE hardware/lepro/lib/lepro/bond.py:240
_unique
No description documented yet.
hardware/lepro/lib/lepro/bond.py:249
WHAT IT DOES

No description documented yet.

SIGNATURE
_unique(items: list[bytes]) -> list[bytes]
PARAMETERS
items
list[bytes]
RETURNS list[bytes]
SOURCE hardware/lepro/lib/lepro/bond.py:249
export_provision_header
C header for ESP32 NVS / compile-time flash.
hardware/lepro/lib/lepro/bond.py:259
WHAT IT DOES

C header for ESP32 NVS / compile-time flash.

SIGNATURE
export_provision_header(creds: BondCredentials) -> str
PARAMETERS
creds
BondCredentials
RETURNS str
SOURCE hardware/lepro/lib/lepro/bond.py:259
export_provision_nvs
ESP-IDF NVS CSV format.
hardware/lepro/lib/lepro/bond.py:285
WHAT IT DOES

ESP-IDF NVS CSV format.

SIGNATURE
export_provision_nvs(creds: BondCredentials) -> str
PARAMETERS
creds
BondCredentials
RETURNS str
SOURCE hardware/lepro/lib/lepro/bond.py:285
_connect_transport
No description documented yet.
hardware/lepro/lib/lepro/bond.py:303
WHAT IT DOES

No description documented yet.

SIGNATURE
_connect_transport(mac: str, debug_rx: bool = False, scan_timeout: float = 15.0)
PARAMETERS
mac
str
debug_rx
bool
= False
scan_timeout
float
= 15.0
RETURNS Not documented
SOURCE hardware/lepro/lib/lepro/bond.py:303
_cmd_bond
No description documented yet.
hardware/lepro/lib/lepro/bond.py:328
WHAT IT DOES

No description documented yet.

SIGNATURE
_cmd_bond(args: argparse.Namespace) -> None
PARAMETERS
args
argparse.Namespace
RETURNS None
SOURCE hardware/lepro/lib/lepro/bond.py:328
main
No description documented yet.
hardware/lepro/lib/lepro/bond.py:342
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE hardware/lepro/lib/lepro/bond.py:342
hardware/lepro/lib/lepro/cli/_common.py
5 symbols
connect_transport
No description documented yet.
hardware/lepro/lib/lepro/cli/_common.py:16
WHAT IT DOES

No description documented yet.

SIGNATURE
connect_transport(mac: str, debug_rx: bool = False, scan_timeout: float = 15.0) -> tuple[BleakTransport, BleakClient]
PARAMETERS
mac
str
debug_rx
bool
= False
scan_timeout
float
= 15.0
RETURNS tuple[BleakTransport, BleakClient]
SOURCE hardware/lepro/lib/lepro/cli/_common.py:16
run_dry_control
No description documented yet.
hardware/lepro/lib/lepro/cli/_common.py:38
WHAT IT DOES

No description documented yet.

SIGNATURE
run_dry_control(mac: str, payload: DpPayload) -> list[tuple[str, bytes]]
PARAMETERS
mac
str
payload
DpPayload
RETURNS list[tuple[str, bytes]]
SOURCE hardware/lepro/lib/lepro/cli/_common.py:38
print_dry_run
No description documented yet.
hardware/lepro/lib/lepro/cli/_common.py:53
WHAT IT DOES

No description documented yet.

SIGNATURE
print_dry_run(sent: list[tuple[str, bytes]]) -> None
PARAMETERS
sent
list[tuple[str, bytes]]
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/_common.py:53
run_control
No description documented yet.
hardware/lepro/lib/lepro/cli/_common.py:64
WHAT IT DOES

No description documented yet.

SIGNATURE
run_control(mac: str, payload: DpPayload, dry_run: bool = False, debug_rx: bool = False) -> None
PARAMETERS
mac
str
payload
DpPayload
dry_run
bool
= False
debug_rx
bool
= False
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/_common.py:64
run_status
No description documented yet.
hardware/lepro/lib/lepro/cli/_common.py:88
WHAT IT DOES

No description documented yet.

SIGNATURE
run_status(mac: str, dry_run: bool = False, debug_rx: bool = False) -> None
PARAMETERS
mac
str
dry_run
bool
= False
debug_rx
bool
= False
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/_common.py:88
hardware/lepro/lib/lepro/cli/bond.py
3 symbols
_cmd_bond
No description documented yet.
hardware/lepro/lib/lepro/cli/bond.py:25
WHAT IT DOES

No description documented yet.

SIGNATURE
_cmd_bond(args: argparse.Namespace) -> None
PARAMETERS
args
argparse.Namespace
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/bond.py:25
_cmd_export
No description documented yet.
hardware/lepro/lib/lepro/cli/bond.py:64
WHAT IT DOES

No description documented yet.

SIGNATURE
_cmd_export(args: argparse.Namespace) -> None
PARAMETERS
args
argparse.Namespace
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/bond.py:64
main
No description documented yet.
hardware/lepro/lib/lepro/cli/bond.py:85
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/bond.py:85
hardware/lepro/lib/lepro/cli/ctl.py
2 symbols
_cmd_mode_play
No description documented yet.
hardware/lepro/lib/lepro/cli/ctl.py:17
WHAT IT DOES

No description documented yet.

SIGNATURE
_cmd_mode_play(args: argparse.Namespace) -> None
PARAMETERS
args
argparse.Namespace
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/ctl.py:17
main
No description documented yet.
hardware/lepro/lib/lepro/cli/ctl.py:57
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/ctl.py:57
hardware/lepro/lib/lepro/cli/firmware.py
5 symbols
_resolve
No description documented yet.
hardware/lepro/lib/lepro/cli/firmware.py:18
WHAT IT DOES

No description documented yet.

SIGNATURE
_resolve(profiles_path: Path | None, profile_id: str | None, firmware_path: Path | None)
PARAMETERS
profiles_path
Path | None
profile_id
str | None
firmware_path
Path | None
RETURNS Not documented
SOURCE hardware/lepro/lib/lepro/cli/firmware.py:18
cmd_fetch
No description documented yet.
hardware/lepro/lib/lepro/cli/firmware.py:31
WHAT IT DOES

No description documented yet.

SIGNATURE
cmd_fetch(args: argparse.Namespace) -> None
PARAMETERS
args
argparse.Namespace
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/firmware.py:31
cmd_patch
No description documented yet.
hardware/lepro/lib/lepro/cli/firmware.py:47
WHAT IT DOES

No description documented yet.

SIGNATURE
cmd_patch(args: argparse.Namespace) -> None
PARAMETERS
args
argparse.Namespace
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/firmware.py:47
cmd_verify
No description documented yet.
hardware/lepro/lib/lepro/cli/firmware.py:72
WHAT IT DOES

No description documented yet.

SIGNATURE
cmd_verify(args: argparse.Namespace) -> None
PARAMETERS
args
argparse.Namespace
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/firmware.py:72
main
No description documented yet.
hardware/lepro/lib/lepro/cli/firmware.py:93
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/firmware.py:93
hardware/lepro/lib/lepro/cli/ota.py
1 symbols
main
No description documented yet.
hardware/lepro/lib/lepro/cli/ota.py:13
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/ota.py:13
hardware/lepro/lib/lepro/cli/provision.py
2 symbols
_apply_config
No description documented yet.
hardware/lepro/lib/lepro/cli/provision.py:14
WHAT IT DOES

No description documented yet.

SIGNATURE
_apply_config(args: argparse.Namespace, cfg_path: Path | None) -> None
PARAMETERS
args
argparse.Namespace
cfg_path
Path | None
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/provision.py:14
main
No description documented yet.
hardware/lepro/lib/lepro/cli/provision.py:37
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/provision.py:37
hardware/lepro/lib/lepro/cli/status.py
1 symbols
main
No description documented yet.
hardware/lepro/lib/lepro/cli/status.py:13
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE hardware/lepro/lib/lepro/cli/status.py:13
hardware/lepro/lib/lepro/commands.py
11 symbols
power_on
Turn lamp on. APK test harness uses {"d1":1} only.
hardware/lepro/lib/lepro/commands.py:18
WHAT IT DOES

Turn lamp on. APK test harness uses {"d1":1} only.

SIGNATURE
power_on(brightness: int = 1000) -> dict[str, Any]
PARAMETERS
brightness
int
= 1000
RETURNS dict[str, Any]
SOURCE hardware/lepro/lib/lepro/commands.py:18
power_off
No description documented yet.
hardware/lepro/lib/lepro/commands.py:27
WHAT IT DOES

No description documented yet.

SIGNATURE
power_off() -> dict[str, Any]
PARAMETERS
No parameters documented.
RETURNS dict[str, Any]
SOURCE hardware/lepro/lib/lepro/commands.py:27
color_hsv
No description documented yet.
hardware/lepro/lib/lepro/commands.py:31
WHAT IT DOES

No description documented yet.

SIGNATURE
color_hsv(hue: float, sat: int = 1000, val: int = 1000, brightness: int = 1000) -> dict[str, Any]
PARAMETERS
hue
float
sat
int
= 1000
val
int
= 1000
brightness
int
= 1000
RETURNS dict[str, Any]
SOURCE hardware/lepro/lib/lepro/commands.py:31
color_rgb
No description documented yet.
hardware/lepro/lib/lepro/commands.py:40
WHAT IT DOES

No description documented yet.

SIGNATURE
color_rgb(r: int, g: int, b: int, brightness: int = 1000) -> dict[str, Any]
PARAMETERS
r
int
g
int
b
int
brightness
int
= 1000
RETURNS dict[str, Any]
SOURCE hardware/lepro/lib/lepro/commands.py:40
status_query
getDpState query — APK passes a JSON array string to bleGetDpState().
hardware/lepro/lib/lepro/commands.py:46
WHAT IT DOES

getDpState query — APK passes a JSON array string to bleGetDpState().

SIGNATURE
status_query(fields: tuple[str, ...] | None = None) -> list[str]
PARAMETERS
fields
tuple[str, ...] | None
= None
RETURNS list[str]
SOURCE hardware/lepro/lib/lepro/commands.py:46
segment_solid
No description documented yet.
hardware/lepro/lib/lepro/commands.py:54
WHAT IT DOES

No description documented yet.

SIGNATURE
segment_solid(rgb: tuple[int, int, int] = (255, 255, 255), brightness: int = 1000, bulb_count: int | None = None) -> dict[str, Any]
PARAMETERS
rgb
tuple[int, int, int]
= (255, 255, 255)
brightness
int
= 1000
bulb_count
int | None
= None
RETURNS dict[str, Any]
SOURCE hardware/lepro/lib/lepro/commands.py:54
dp_json_text
No description documented yet.
hardware/lepro/lib/lepro/commands.py:69
WHAT IT DOES

No description documented yet.

SIGNATURE
dp_json_text(payload: DpPayload) -> str
PARAMETERS
payload
DpPayload
RETURNS str
SOURCE hardware/lepro/lib/lepro/commands.py:69
build_dp_value_packets
Encrypt DP JSON and return (packets, next_seq).
hardware/lepro/lib/lepro/commands.py:73
WHAT IT DOES

Encrypt DP JSON and return (packets, next_seq).

SIGNATURE
build_dp_value_packets(mac: str, seq: int, payload: DpPayload, session_rand: int, max_payload: int = 128) -> tuple[list[bytes], int]
PARAMETERS
mac
str
seq
int
payload
DpPayload
session_rand
int
max_payload
int
= 128
RETURNS tuple[list[bytes], int]
SOURCE hardware/lepro/lib/lepro/commands.py:73
build_get_dp_state_packet
Encrypted getDpState query on 0x1102.
hardware/lepro/lib/lepro/commands.py:87
WHAT IT DOES

Encrypted getDpState query on 0x1102.

SIGNATURE
build_get_dp_state_packet(mac: str, seq: int, payload: DpPayload, session_rand: int) -> bytes
PARAMETERS
mac
str
seq
int
payload
DpPayload
session_rand
int
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/commands.py:87
build_dp_ciphertext_packets
No description documented yet.
hardware/lepro/lib/lepro/commands.py:99
WHAT IT DOES

No description documented yet.

SIGNATURE
build_dp_ciphertext_packets(seq: int, ciphertext: bytes, max_payload: int = 128) -> tuple[list[bytes], int]
PARAMETERS
seq
int
ciphertext
bytes
max_payload
int
= 128
RETURNS tuple[list[bytes], int]
SOURCE hardware/lepro/lib/lepro/commands.py:99
build_raw_cmd_packet
Opaque auth token on 0x1102 (no encryption).
hardware/lepro/lib/lepro/commands.py:109
WHAT IT DOES

Opaque auth token on 0x1102 (no encryption).

SIGNATURE
build_raw_cmd_packet(seq: int, token: bytes) -> bytes
PARAMETERS
seq
int
token
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/commands.py:109
hardware/lepro/lib/lepro/config.py
2 symbols
config_path
No description documented yet.
hardware/lepro/lib/lepro/config.py:51
WHAT IT DOES

No description documented yet.

SIGNATURE
config_path(explicit: Path | None = None) -> Path
PARAMETERS
explicit
Path | None
= None
RETURNS Path
SOURCE hardware/lepro/lib/lepro/config.py:51
load_config
No description documented yet.
hardware/lepro/lib/lepro/config.py:60
WHAT IT DOES

No description documented yet.

SIGNATURE
load_config(path: Path | None = None) -> LeproLabConfig
PARAMETERS
path
Path | None
= None
RETURNS LeproLabConfig
SOURCE hardware/lepro/lib/lepro/config.py:60
hardware/lepro/lib/lepro/crypto.py
13 symbols
mac_string_to_bytes
'10:20:BA:31:B2:BA' -> 6 bytes.
hardware/lepro/lib/lepro/crypto.py:42
WHAT IT DOES

'10:20:BA:31:B2:BA' -> 6 bytes.

SIGNATURE
mac_string_to_bytes(mac: str) -> bytes
PARAMETERS
mac
str
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/crypto.py:42
derive_session_key
Session AES key at le_msg_ctx+0x19 (dpValue, sendWifiMqttInfo, RX decrypt). init_msg() patches bytes [3:7] of the MAC template ke…
hardware/lepro/lib/lepro/crypto.py:50
WHAT IT DOES

Session AES key at le_msg_ctx+0x19 (dpValue, sendWifiMqttInfo, RX decrypt). init_msg() patches bytes [3:7] of the MAC template key with bleInit's rand(). The rand value is also stored in search-hello plaintext field ctx1.

SIGNATURE
derive_session_key(mac: str | bytes, session_rand: int) -> bytes
PARAMETERS
mac
str | bytes
session_rand
int
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/crypto.py:50
derive_aes_key
Replicate init_msg() key setup for a light MAC. For 10:20:BA:31:B2:BA the key is: 31b2ba3522130ecff4d2525e6c290bf9
hardware/lepro/lib/lepro/crypto.py:62
WHAT IT DOES

Replicate init_msg() key setup for a light MAC. For 10:20:BA:31:B2:BA the key is: 31b2ba3522130ecff4d2525e6c290bf9

SIGNATURE
derive_aes_key(mac: str | bytes) -> bytes
PARAMETERS
mac
str | bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/crypto.py:62
_lepro_pad
Padding used inside FUN_0x18d244 (le_aes_128_encrypt_cbc core). pad_len = ((len & ~0xF) - len) + 16 Append pad_len bytes each equ…
hardware/lepro/lib/lepro/crypto.py:81
WHAT IT DOES

Padding used inside FUN_0x18d244 (le_aes_128_encrypt_cbc core). pad_len = ((len & ~0xF) - len) + 16 Append pad_len bytes each equal to pad_len.

SIGNATURE
_lepro_pad(data: bytes) -> bytes
PARAMETERS
data
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/crypto.py:81
_lepro_unpad
No description documented yet.
hardware/lepro/lib/lepro/crypto.py:93
WHAT IT DOES

No description documented yet.

SIGNATURE
_lepro_unpad(data: bytes) -> bytes
PARAMETERS
data
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/crypto.py:93
encrypt_cbc
Encrypt with Lepro's CBC + custom padding.
hardware/lepro/lib/lepro/crypto.py:104
WHAT IT DOES

Encrypt with Lepro's CBC + custom padding.

SIGNATURE
encrypt_cbc(plaintext: bytes, key: bytes, iv: bytes = MAIN_IV) -> bytes
PARAMETERS
plaintext
bytes
key
bytes
iv
bytes
= MAIN_IV
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/crypto.py:104
decrypt_cbc
Decrypt and strip Lepro padding.
hardware/lepro/lib/lepro/crypto.py:112
WHAT IT DOES

Decrypt and strip Lepro padding.

SIGNATURE
decrypt_cbc(ciphertext: bytes, key: bytes, iv: bytes = MAIN_IV) -> bytes
PARAMETERS
ciphertext
bytes
key
bytes
iv
bytes
= MAIN_IV
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/crypto.py:112
build_search_hello_plaintext
Plaintext for searchDeviceInfo (0x1000) before encryption.
hardware/lepro/lib/lepro/crypto.py:120
WHAT IT DOES

Plaintext for searchDeviceInfo (0x1000) before encryption.

SIGNATURE
build_search_hello_plaintext(ctx0: int = 0, ctx1: int = 0, timestamp: int | None = None) -> bytes
PARAMETERS
ctx0
int
= 0
ctx1
int
= 0
timestamp
int | None
= None
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/crypto.py:120
encrypt_search_hello
Encrypt a 0x10/0x00 searchDeviceInfo hello (32-byte ciphertext).
hardware/lepro/lib/lepro/crypto.py:132
WHAT IT DOES

Encrypt a 0x10/0x00 searchDeviceInfo hello (32-byte ciphertext).

SIGNATURE
encrypt_search_hello(mac: str | bytes, ctx0: int = 0, ctx1: int = 0, timestamp: int | None = None) -> bytes
PARAMETERS
mac
str | bytes
ctx0
int
= 0
ctx1
int
= 0
timestamp
int | None
= None
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/crypto.py:132
decrypt_search_hello
Decrypt a 0x10/0x00 hello payload. Returns (magic, ctx0, ctx1, timestamp).
hardware/lepro/lib/lepro/crypto.py:144
WHAT IT DOES

Decrypt a 0x10/0x00 hello payload. Returns (magic, ctx0, ctx1, timestamp).

SIGNATURE
decrypt_search_hello(ciphertext: bytes, mac: str | bytes) -> tuple[bytes, int, int, int]
PARAMETERS
ciphertext
bytes
mac
str | bytes
RETURNS tuple[bytes, int, int, int]
SOURCE hardware/lepro/lib/lepro/crypto.py:144
encrypt_bond_request
Encrypt requestBond() plaintext (16-byte ciphertext). After bleInit/search, native code uses the session key (ctx+0x19), not the…
hardware/lepro/lib/lepro/crypto.py:159
WHAT IT DOES

Encrypt requestBond() plaintext (16-byte ciphertext). After bleInit/search, native code uses the session key (ctx+0x19), not the MAC key.

SIGNATURE
encrypt_bond_request(mac: str | bytes, session_rand: int | None = None) -> bytes
PARAMETERS
mac
str | bytes
session_rand
int | None
= None
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/crypto.py:159
encrypt_dp_json
Encrypt a DP JSON body the same way dpValue()/getDpState() do. Native code passes strlen(json)+1 bytes (includes the NUL). Use se…
hardware/lepro/lib/lepro/crypto.py:172
WHAT IT DOES

Encrypt a DP JSON body the same way dpValue()/getDpState() do. Native code passes strlen(json)+1 bytes (includes the NUL). Use session_rand from search-hello ctx1; MAC-only key is not sufficient.

SIGNATURE
encrypt_dp_json(mac: str | bytes, json_text: str, session_rand: int | None = None, null_terminated: bool = True) -> bytes
PARAMETERS
mac
str | bytes
json_text
str
session_rand
int | None
= None
null_terminated
bool
= True
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/crypto.py:172
decrypt_dp_json
Decrypt a dpValue/getDpState payload and return UTF-8 JSON text.
hardware/lepro/lib/lepro/crypto.py:196
WHAT IT DOES

Decrypt a dpValue/getDpState payload and return UTF-8 JSON text.

SIGNATURE
decrypt_dp_json(ciphertext: bytes, mac: str | bytes, session_rand: int | None = None) -> str
PARAMETERS
ciphertext
bytes
mac
str | bytes
session_rand
int | None
= None
RETURNS str
SOURCE hardware/lepro/lib/lepro/crypto.py:196
hardware/lepro/lib/lepro/firmware_profile.py
7 symbols
parse_hex
No description documented yet.
hardware/lepro/lib/lepro/firmware_profile.py:61
WHAT IT DOES

No description documented yet.

SIGNATURE
parse_hex(value: str, field: str) -> bytes
PARAMETERS
value
str
field
str
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/firmware_profile.py:61
_parse_int
No description documented yet.
hardware/lepro/lib/lepro/firmware_profile.py:74
WHAT IT DOES

No description documented yet.

SIGNATURE
_parse_int(value: object, field: str) -> int
PARAMETERS
value
object
field
str
RETURNS int
SOURCE hardware/lepro/lib/lepro/firmware_profile.py:74
_parse_bundle
No description documented yet.
hardware/lepro/lib/lepro/firmware_profile.py:82
WHAT IT DOES

No description documented yet.

SIGNATURE
_parse_bundle(raw: dict, profile_id: str) -> BundleConfig
PARAMETERS
raw
dict
profile_id
str
RETURNS BundleConfig
SOURCE hardware/lepro/lib/lepro/firmware_profile.py:82
_parse_patch
No description documented yet.
hardware/lepro/lib/lepro/firmware_profile.py:105
WHAT IT DOES

No description documented yet.

SIGNATURE
_parse_patch(raw: dict, profile_id: str, index: int) -> BytePatch
PARAMETERS
raw
dict
profile_id
str
index
int
RETURNS BytePatch
SOURCE hardware/lepro/lib/lepro/firmware_profile.py:105
_parse_profile
No description documented yet.
hardware/lepro/lib/lepro/firmware_profile.py:121
WHAT IT DOES

No description documented yet.

SIGNATURE
_parse_profile(raw: dict) -> FirmwareProfile
PARAMETERS
raw
dict
RETURNS FirmwareProfile
SOURCE hardware/lepro/lib/lepro/firmware_profile.py:121
load_profiles
No description documented yet.
hardware/lepro/lib/lepro/firmware_profile.py:154
WHAT IT DOES

No description documented yet.

SIGNATURE
load_profiles(path: Path | None = None) -> PatchProfiles
PARAMETERS
path
Path | None
= None
RETURNS PatchProfiles
SOURCE hardware/lepro/lib/lepro/firmware_profile.py:154
resolve_profile
No description documented yet.
hardware/lepro/lib/lepro/firmware_profile.py:175
WHAT IT DOES

No description documented yet.

SIGNATURE
resolve_profile(profiles: PatchProfiles, firmware_path: Path | None = None, profile_id: str | None = None) -> FirmwareProfile
PARAMETERS
profiles
PatchProfiles
firmware_path
Path | None
= None
profile_id
str | None
= None
RETURNS FirmwareProfile
SOURCE hardware/lepro/lib/lepro/firmware_profile.py:175
hardware/lepro/lib/lepro/frame.py
6 symbols
_magic_byte
No description documented yet.
hardware/lepro/lib/lepro/frame.py:59
WHAT IT DOES

No description documented yet.

SIGNATURE
_magic_byte(magic: tuple[int, int]) -> int
PARAMETERS
magic
tuple[int, int]
RETURNS int
SOURCE hardware/lepro/lib/lepro/frame.py:59
_is_fragment_magic
No description documented yet.
hardware/lepro/lib/lepro/frame.py:63
WHAT IT DOES

No description documented yet.

SIGNATURE
_is_fragment_magic(magic2: int) -> bool
PARAMETERS
magic2
int
RETURNS bool
SOURCE hardware/lepro/lib/lepro/frame.py:63
parse_ota_start_resp
0x1011 OTA start response. v2.3.18 returns compact big-endian u32 status + u32 offset. Older traces used an 8-byte wrapper with a…
hardware/lepro/lib/lepro/frame.py:238
WHAT IT DOES

0x1011 OTA start response. v2.3.18 returns compact big-endian u32 status + u32 offset. Older traces used an 8-byte wrapper with ackSn/code at +4/+6.

SIGNATURE
parse_ota_start_resp(frame: DecryptedFrame) -> OtaStartResponse | None
PARAMETERS
frame
DecryptedFrame
RETURNS OtaStartResponse | None
SOURCE hardware/lepro/lib/lepro/frame.py:238
parse_ota_data_resp
0x1013 per-chunk data response.
hardware/lepro/lib/lepro/frame.py:261
WHAT IT DOES

0x1013 per-chunk data response.

SIGNATURE
parse_ota_data_resp(frame: DecryptedFrame) -> OtaDataResponse | None
PARAMETERS
frame
DecryptedFrame
RETURNS OtaDataResponse | None
SOURCE hardware/lepro/lib/lepro/frame.py:261
parse_bond_result
0x1003 / 0xaaaa bond response → uint32 result code (big-endian).
hardware/lepro/lib/lepro/frame.py:275
WHAT IT DOES

0x1003 / 0xaaaa bond response → uint32 result code (big-endian).

SIGNATURE
parse_bond_result(frame: DecryptedFrame) -> int | None
PARAMETERS
frame
DecryptedFrame
RETURNS int | None
SOURCE hardware/lepro/lib/lepro/frame.py:275
load_capture_packets
No description documented yet.
hardware/lepro/lib/lepro/frame.py:285
WHAT IT DOES

No description documented yet.

SIGNATURE
load_capture_packets(path: str | Path | None = None) -> list[bytes]
PARAMETERS
path
str | Path | None
= None
RETURNS list[bytes]
SOURCE hardware/lepro/lib/lepro/frame.py:285
hardware/lepro/lib/lepro/modes.py
23 symbols
default_bulb_count
No description documented yet.
hardware/lepro/lib/lepro/modes.py:87
WHAT IT DOES

No description documented yet.

SIGNATURE
default_bulb_count() -> int
PARAMETERS
No parameters documented.
RETURNS int
SOURCE hardware/lepro/lib/lepro/modes.py:87
hsv_hex
12-char HSV protocol string (Hsv.toProtocolString).
hardware/lepro/lib/lepro/modes.py:94
WHAT IT DOES

12-char HSV protocol string (Hsv.toProtocolString).

SIGNATURE
hsv_hex(hue: float, sat: int = 1000, val: int = 1000) -> str
PARAMETERS
hue
float
sat
int
= 1000
val
int
= 1000
RETURNS str
SOURCE hardware/lepro/lib/lepro/modes.py:94
rgbic_scene
Segmented / RGB-IC scene mode (d2=2 + d50 + d52).
hardware/lepro/lib/lepro/modes.py:102
WHAT IT DOES

Segmented / RGB-IC scene mode (d2=2 + d50 + d52).

SIGNATURE
rgbic_scene(d50: str, brightness: int = 1000, power: bool = True) -> dict[str, Any]
PARAMETERS
d50
str
brightness
int
= 1000
power
bool
= True
RETURNS dict[str, Any]
SOURCE hardware/lepro/lib/lepro/modes.py:102
white_mode
No description documented yet.
hardware/lepro/lib/lepro/modes.py:114
WHAT IT DOES

No description documented yet.

SIGNATURE
white_mode(brightness: int = 500, temp: int = 400, power: bool = True) -> dict[str, Any]
PARAMETERS
brightness
int
= 500
temp
int
= 400
power
bool
= True
RETURNS dict[str, Any]
SOURCE hardware/lepro/lib/lepro/modes.py:114
legacy_scene_d6
Legacy bulb gradient/rainbow scenes on d6 (EffectEntity dpType=d6).
hardware/lepro/lib/lepro/modes.py:125
WHAT IT DOES

Legacy bulb gradient/rainbow scenes on d6 (EffectEntity dpType=d6).

SIGNATURE
legacy_scene_d6(d6: str, power: bool = True) -> dict[str, Any]
PARAMETERS
d6
str
power
bool
= True
RETURNS dict[str, Any]
SOURCE hardware/lepro/lib/lepro/modes.py:125
scene_gradient
No description documented yet.
hardware/lepro/lib/lepro/modes.py:133
WHAT IT DOES

No description documented yet.

SIGNATURE
scene_gradient(power: bool = True) -> dict[str, Any]
PARAMETERS
power
bool
= True
RETURNS dict[str, Any]
SOURCE hardware/lepro/lib/lepro/modes.py:133
scene_rainbow
No description documented yet.
hardware/lepro/lib/lepro/modes.py:137
WHAT IT DOES

No description documented yet.

SIGNATURE
scene_rainbow(power: bool = True) -> dict[str, Any]
PARAMETERS
power
bool
= True
RETURNS dict[str, Any]
SOURCE hardware/lepro/lib/lepro/modes.py:137
_speed_to_hex
No description documented yet.
hardware/lepro/lib/lepro/modes.py:141
WHAT IT DOES

No description documented yet.

SIGNATURE
_speed_to_hex(speed: int) -> str
PARAMETERS
speed
int
RETURNS str
SOURCE hardware/lepro/lib/lepro/modes.py:141
_speed_to_hex_center
Center-side native clamps speed_time below 0x41 to 0x40 (diyValueCenterSide).
hardware/lepro/lib/lepro/modes.py:149
WHAT IT DOES

Center-side native clamps speed_time below 0x41 to 0x40 (diyValueCenterSide).

SIGNATURE
_speed_to_hex_center(speed: int) -> str
PARAMETERS
speed
int
RETURNS str
SOURCE hardware/lepro/lib/lepro/modes.py:149
effect_tail
Six DIY effect tails confirmed in D50_FORMAT.md.
hardware/lepro/lib/lepro/modes.py:158
WHAT IT DOES

Six DIY effect tails confirmed in D50_FORMAT.md.

SIGNATURE
effect_tail(name: str, speed: int = 50) -> str
PARAMETERS
name
str
speed
int
= 50
RETURNS str
SOURCE hardware/lepro/lib/lepro/modes.py:158
build_d50_flash
Type 9 Flash — no F21 length segment; U3F3 opcode (diyValue case 9, lightMode=1).
hardware/lepro/lib/lepro/modes.py:182
WHAT IT DOES

Type 9 Flash — no F21 length segment; U3F3 opcode (diyValue case 9, lightMode=1).

SIGNATURE
build_d50_flash(color: str, speed: int = 50) -> str
PARAMETERS
color
str
speed
int
= 50
RETURNS str
SOURCE hardware/lepro/lib/lepro/modes.py:182
build_d50_center_solid
Types 12/13 center-side animation on uniform color (#V:02 + #I00/#I01).
hardware/lepro/lib/lepro/modes.py:191
WHAT IT DOES

Types 12/13 center-side animation on uniform color (#V:02 + #I00/#I01).

SIGNATURE
build_d50_center_solid(color: str, effect: str, speed: int = 50, bulb_count: int | None = None) -> str
PARAMETERS
color
str
effect
str
speed
int
= 50
bulb_count
int | None
= None
RETURNS str
SOURCE hardware/lepro/lib/lepro/modes.py:191
build_d50_solid
Single-color whole-string d50 (one group, all bulbs same color).
hardware/lepro/lib/lepro/modes.py:218
WHAT IT DOES

Single-color whole-string d50 (one group, all bulbs same color).

SIGNATURE
build_d50_solid(color: str, effect: str = 'Steady', speed: int = 50, bulb_count: int | None = None) -> str
PARAMETERS
color
str
effect
str
= 'Steady'
speed
int
= 50
bulb_count
int | None
= None
RETURNS str
SOURCE hardware/lepro/lib/lepro/modes.py:218
build_d50_from_leds
Full-string d50 from per-bulb colors.
hardware/lepro/lib/lepro/modes.py:238
WHAT IT DOES

Full-string d50 from per-bulb colors.

SIGNATURE
build_d50_from_leds(leds: list[str | None], effect: str = 'Steady', speed: int = 50, bulb_count: int | None = None) -> str
PARAMETERS
leds
list[str | None]
effect
str
= 'Steady'
speed
int
= 50
bulb_count
int | None
= None
RETURNS str
SOURCE hardware/lepro/lib/lepro/modes.py:238
diy_solid
No description documented yet.
hardware/lepro/lib/lepro/modes.py:265
WHAT IT DOES

No description documented yet.

SIGNATURE
diy_solid(color: str, effect: str = 'Steady', speed: int = 50, brightness: int = 1000, bulb_count: int | None = None) -> dict[str, Any]
PARAMETERS
color
str
effect
str
= 'Steady'
speed
int
= 50
brightness
int
= 1000
bulb_count
int | None
= None
RETURNS dict[str, Any]
SOURCE hardware/lepro/lib/lepro/modes.py:265
list_presets
No description documented yet.
hardware/lepro/lib/lepro/modes.py:299
WHAT IT DOES

No description documented yet.

SIGNATURE
list_presets(presets_dir: Path | None = None) -> list[Path]
PARAMETERS
presets_dir
Path | None
= None
RETURNS list[Path]
SOURCE hardware/lepro/lib/lepro/modes.py:299
load_preset
Load preset JSON by stem name (e.g. 'hulk').
hardware/lepro/lib/lepro/modes.py:306
WHAT IT DOES

Load preset JSON by stem name (e.g. 'hulk').

SIGNATURE
load_preset(name: str, presets_dir: Path | None = None) -> dict[str, Any]
PARAMETERS
name
str
presets_dir
Path | None
= None
RETURNS dict[str, Any]
SOURCE hardware/lepro/lib/lepro/modes.py:306
preset_frames
Normalize preset to list of frame payloads (each gets d1=1 if missing).
hardware/lepro/lib/lepro/modes.py:322
WHAT IT DOES

Normalize preset to list of frame payloads (each gets d1=1 if missing).

SIGNATURE
preset_frames(preset: dict[str, Any]) -> list[dict[str, Any]]
PARAMETERS
preset
dict[str, Any]
RETURNS list[dict[str, Any]]
SOURCE hardware/lepro/lib/lepro/modes.py:322
preset_duration_ms
No description documented yet.
hardware/lepro/lib/lepro/modes.py:340
WHAT IT DOES

No description documented yet.

SIGNATURE
preset_duration_ms(preset: dict[str, Any], default: int = 4000) -> int
PARAMETERS
preset
dict[str, Any]
default
int
= 4000
RETURNS int
SOURCE hardware/lepro/lib/lepro/modes.py:340
resolve_mode
Build a single DP payload from a built-in mode id.
hardware/lepro/lib/lepro/modes.py:344
WHAT IT DOES

Build a single DP payload from a built-in mode id.

SIGNATURE
resolve_mode(name: str, **kwargs: Any) -> DpPayload
PARAMETERS
name
str
**kwargs
Any
RETURNS DpPayload
SOURCE hardware/lepro/lib/lepro/modes.py:344
debug_payload
Return JSON text + encrypted size + estimated BLE page count.
hardware/lepro/lib/lepro/modes.py:375
WHAT IT DOES

Return JSON text + encrypted size + estimated BLE page count.

SIGNATURE
debug_payload(mac: str, payload: DpPayload) -> dict[str, Any]
PARAMETERS
mac
str
payload
DpPayload
RETURNS dict[str, Any]
SOURCE hardware/lepro/lib/lepro/modes.py:375
format_mode_catalog
No description documented yet.
hardware/lepro/lib/lepro/modes.py:401
WHAT IT DOES

No description documented yet.

SIGNATURE
format_mode_catalog() -> str
PARAMETERS
No parameters documented.
RETURNS str
SOURCE hardware/lepro/lib/lepro/modes.py:401
iter_preset_play
No description documented yet.
hardware/lepro/lib/lepro/modes.py:436
WHAT IT DOES

No description documented yet.

SIGNATURE
iter_preset_play(name: str, **kwargs: Any) -> Iterator[tuple[dict[str, Any], int]]
PARAMETERS
name
str
**kwargs
Any
RETURNS Iterator[tuple[dict[str, Any], int]]
SOURCE hardware/lepro/lib/lepro/modes.py:436
hardware/lepro/lib/lepro/ota.py
41 symbols
wait_ota_frag_ack
Wait for per-fragment ACK with matching seq. Mid-fragment ACKs use magic 0x54; the final fragment ACK uses magic 0x50 (0xAAAA).
hardware/lepro/lib/lepro/ota.py:174
WHAT IT DOES

Wait for per-fragment ACK with matching seq. Mid-fragment ACKs use magic 0x54; the final fragment ACK uses magic 0x50 (0xAAAA).

SIGNATURE
wait_ota_frag_ack(session: LeproSession, seq: int, timeout: float = 5.0) -> DecryptedFrame
PARAMETERS
session
LeproSession
seq
int
timeout
float
= 5.0
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/ota.py:174
send_ota_packets
Send fragmented OTA op, waiting for a per-fragment ACK after each TX.
hardware/lepro/lib/lepro/ota.py:196
WHAT IT DOES

Send fragmented OTA op, waiting for a per-fragment ACK after each TX.

SIGNATURE
send_ota_packets(session: LeproSession, packets: list[bytes], log: OtaLog, label: str) -> DecryptedFrame | None
PARAMETERS
session
LeproSession
packets
list[bytes]
log
OtaLog
label
str
RETURNS DecryptedFrame | None
SOURCE hardware/lepro/lib/lepro/ota.py:196
wait_opcode_verbose
Wait for an opcode, logging heartbeats so a stall is obvious.
hardware/lepro/lib/lepro/ota.py:220
WHAT IT DOES

Wait for an opcode, logging heartbeats so a stall is obvious.

SIGNATURE
wait_opcode_verbose(session: LeproSession, opcode: int, timeout: float, log: OtaLog, label: str, heartbeat: float = 5.0) -> DecryptedFrame
PARAMETERS
session
LeproSession
opcode
int
timeout
float
log
OtaLog
label
str
heartbeat
float
= 5.0
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/ota.py:220
_write_u16_be
No description documented yet.
hardware/lepro/lib/lepro/ota.py:255
WHAT IT DOES

No description documented yet.

SIGNATURE
_write_u16_be(buf: bytearray, offset: int, value: int) -> None
PARAMETERS
buf
bytearray
offset
int
value
int
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:255
_write_u32_be
No description documented yet.
hardware/lepro/lib/lepro/ota.py:259
WHAT IT DOES

No description documented yet.

SIGNATURE
_write_u32_be(buf: bytearray, offset: int, value: int) -> None
PARAMETERS
buf
bytearray
offset
int
value
int
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:259
build_ota_start_inner
Legacy 5120-byte plaintext inner buffer (older OTA path: JSON at +8).
hardware/lepro/lib/lepro/ota.py:263
WHAT IT DOES

Legacy 5120-byte plaintext inner buffer (older OTA path: JSON at +8).

SIGNATURE
build_ota_start_inner(json_bytes: bytes) -> bytes
PARAMETERS
json_bytes
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/ota.py:263
build_ota_start_plaintext
v2.3.18 OTA start plaintext: NUL-terminated JSON C string.
hardware/lepro/lib/lepro/ota.py:272
WHAT IT DOES

v2.3.18 OTA start plaintext: NUL-terminated JSON C string.

SIGNATURE
build_ota_start_plaintext(json_bytes: bytes) -> bytes
PARAMETERS
json_bytes
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/ota.py:272
build_ota_chunk_inner
Legacy 5120-byte padded inner buffer (pre-v2.3.18 otaProcess layout).
hardware/lepro/lib/lepro/ota.py:279
WHAT IT DOES

Legacy 5120-byte padded inner buffer (pre-v2.3.18 otaProcess layout).

SIGNATURE
build_ota_chunk_inner(offset: int, chunk: bytes) -> bytes
PARAMETERS
offset
int
chunk
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/ota.py:279
build_ota_chunk_plaintext
v2.3.18 OTA data plaintext: 8-byte header + chunk (FUN_420095d4 expects len+8).
hardware/lepro/lib/lepro/ota.py:291
WHAT IT DOES

v2.3.18 OTA data plaintext: 8-byte header + chunk (FUN_420095d4 expects len+8).

SIGNATURE
build_ota_chunk_plaintext(offset: int, chunk: bytes) -> bytes
PARAMETERS
offset
int
chunk
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/ota.py:291
encrypt_ota_inner
No description documented yet.
hardware/lepro/lib/lepro/ota.py:303
WHAT IT DOES

No description documented yet.

SIGNATURE
encrypt_ota_inner(mac: str, session_rand: int, inner: bytes) -> bytes
PARAMETERS
mac
str
session_rand
int
inner
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/ota.py:303
build_ota_start_packets
No description documented yet.
hardware/lepro/lib/lepro/ota.py:308
WHAT IT DOES

No description documented yet.

SIGNATURE
build_ota_start_packets(mac: str, seq: int, json_bytes: bytes, session_rand: int, max_payload: int = 128) -> tuple[list[bytes], int]
PARAMETERS
mac
str
seq
int
json_bytes
bytes
session_rand
int
max_payload
int
= 128
RETURNS tuple[list[bytes], int]
SOURCE hardware/lepro/lib/lepro/ota.py:308
build_ota_chunk_packets
No description documented yet.
hardware/lepro/lib/lepro/ota.py:322
WHAT IT DOES

No description documented yet.

SIGNATURE
build_ota_chunk_packets(mac: str, seq: int, offset: int, chunk: bytes, session_rand: int, max_payload: int = 128) -> tuple[list[bytes], int]
PARAMETERS
mac
str
seq
int
offset
int
chunk
bytes
session_rand
int
max_payload
int
= 128
RETURNS tuple[list[bytes], int]
SOURCE hardware/lepro/lib/lepro/ota.py:322
firmware_version_from_path
No description documented yet.
hardware/lepro/lib/lepro/ota.py:337
WHAT IT DOES

No description documented yet.

SIGNATURE
firmware_version_from_path(path: Path) -> str | None
PARAMETERS
path
Path
RETURNS str | None
SOURCE hardware/lepro/lib/lepro/ota.py:337
version_from_discovery
Best-effort running fw semver from discovery notify payload.
hardware/lepro/lib/lepro/ota.py:342
WHAT IT DOES

Best-effort running fw semver from discovery notify payload.

SIGNATURE
version_from_discovery(raw: bytes) -> str | None
PARAMETERS
raw
bytes
RETURNS str | None
SOURCE hardware/lepro/lib/lepro/ota.py:342
_semver_tuple
No description documented yet.
hardware/lepro/lib/lepro/ota.py:362
WHAT IT DOES

No description documented yet.

SIGNATURE
_semver_tuple(version: str) -> tuple[int, int, int]
PARAMETERS
version
str
RETURNS tuple[int, int, int]
SOURCE hardware/lepro/lib/lepro/ota.py:362
adjust_ota_version_for_running
Bump JSON/embedded version when --reflash and device already reports >= proposed OTA version. Only used when --reflash is set. De…
hardware/lepro/lib/lepro/ota.py:369
WHAT IT DOES

Bump JSON/embedded version when --reflash and device already reports >= proposed OTA version. Only used when --reflash is set. Default BLE OTA sends do_check:0, so the firmware version gate is skipped and this ratchet is not needed.

SIGNATURE
adjust_ota_version_for_running(running: str | None, ota_ver: str, reflash: bool) -> str
PARAMETERS
running
str | None
ota_ver
str
reflash
bool
RETURNS str
SOURCE hardware/lepro/lib/lepro/ota.py:369
bump_ota_version
Bump PATCH so JSON version differs from running fw_version. FUN_42008eb0 strcmp's running fw against JSON version when do_check=1.
hardware/lepro/lib/lepro/ota.py:385
WHAT IT DOES

Bump PATCH so JSON version differs from running fw_version. FUN_42008eb0 strcmp's running fw against JSON version when do_check=1.

SIGNATURE
bump_ota_version(version: str) -> str
PARAMETERS
version
str
RETURNS str
SOURCE hardware/lepro/lib/lepro/ota.py:385
resolve_ota_version
No description documented yet.
hardware/lepro/lib/lepro/ota.py:400
WHAT IT DOES

No description documented yet.

SIGNATURE
resolve_ota_version(firmware: Path, version: str | None = None, reflash: bool = False) -> str
PARAMETERS
firmware
Path
version
str | None
= None
reflash
bool
= False
RETURNS str
SOURCE hardware/lepro/lib/lepro/ota.py:400
firmware_cdn_path
No description documented yet.
hardware/lepro/lib/lepro/ota.py:414
WHAT IT DOES

No description documented yet.

SIGNATURE
firmware_cdn_path(path: Path, version: str | None = None) -> str
PARAMETERS
path
Path
version
str | None
= None
RETURNS str
SOURCE hardware/lepro/lib/lepro/ota.py:414
md5_hex
No description documented yet.
hardware/lepro/lib/lepro/ota.py:422
WHAT IT DOES

No description documented yet.

SIGNATURE
md5_hex(data: bytes) -> str
PARAMETERS
data
bytes
RETURNS str
SOURCE hardware/lepro/lib/lepro/ota.py:422
bump_embedded_version
Rewrite fixed-width version strings inside an ESP-IDF app image.
hardware/lepro/lib/lepro/ota.py:426
WHAT IT DOES

Rewrite fixed-width version strings inside an ESP-IDF app image.

SIGNATURE
bump_embedded_version(image: bytearray, old_ver: str, new_ver: str) -> int
PARAMETERS
image
bytearray
old_ver
str
new_ver
str
RETURNS int
SOURCE hardware/lepro/lib/lepro/ota.py:426
_encode_xtensa_movi_n_a8
Encode `movi.n a8, imm` for non-negative immediates representable in RI7.
hardware/lepro/lib/lepro/ota.py:447
WHAT IT DOES

Encode `movi.n a8, imm` for non-negative immediates representable in RI7.

SIGNATURE
_encode_xtensa_movi_n_a8(value: int) -> bytes
PARAMETERS
value
int
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/ota.py:447
_decode_xtensa_movi_n_a8
Decode `movi.n a8, imm`; return None when the bytes are not that instruction.
hardware/lepro/lib/lepro/ota.py:457
WHAT IT DOES

Decode `movi.n a8, imm`; return None when the bytes are not that instruction.

SIGNATURE
_decode_xtensa_movi_n_a8(data: bytes) -> int | None
PARAMETERS
data
bytes
RETURNS int | None
SOURCE hardware/lepro/lib/lepro/ota.py:457
patch_discovery_version
Rewrite the hardcoded 0x1001 device-info semver immediates in the firmware.
hardware/lepro/lib/lepro/ota.py:465
WHAT IT DOES

Rewrite the hardcoded 0x1001 device-info semver immediates in the firmware.

SIGNATURE
patch_discovery_version(image: bytearray, version: str) -> int
PARAMETERS
image
bytearray
version
str
RETURNS int
SOURCE hardware/lepro/lib/lepro/ota.py:465
repair_esp_app_image
Recalculate ESP-IDF image checksum + validation hash after byte patches.
hardware/lepro/lib/lepro/ota.py:499
WHAT IT DOES

Recalculate ESP-IDF image checksum + validation hash after byte patches.

SIGNATURE
repair_esp_app_image(image: bytearray, chip: str = 'esp32s3') -> None
PARAMETERS
image
bytearray
chip
str
= 'esp32s3'
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:499
prepare_ota_image
Load firmware bytes for OTA, optionally bumping embedded strings + discovery semver.
hardware/lepro/lib/lepro/ota.py:514
WHAT IT DOES

Load firmware bytes for OTA, optionally bumping embedded strings + discovery semver.

SIGNATURE
prepare_ota_image(firmware: Path, version: str | None = None, reflash: bool = False, chip: str = 'esp32s3') -> tuple[bytes, str]
PARAMETERS
firmware
Path
version
str | None
= None
reflash
bool
= False
chip
str
= 'esp32s3'
RETURNS tuple[bytes, str]
SOURCE hardware/lepro/lib/lepro/ota.py:514
build_ota_start_json
Build raw JSON bytes for BLE OTA start (FUN_42008eb0 flat parser).
hardware/lepro/lib/lepro/ota.py:539
WHAT IT DOES

Build raw JSON bytes for BLE OTA start (FUN_42008eb0 flat parser).

SIGNATURE
build_ota_start_json(firmware: Path, image: bytes, version: str, path_version: str | None = None, ota_secret: str = '') -> bytes
PARAMETERS
firmware
Path
image
bytes
version
str
path_version
str | None
= None
ota_secret
str
= ''
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/ota.py:539
describe_ota_start_error
Human-readable hint for OTA start response codes.
hardware/lepro/lib/lepro/ota.py:561
WHAT IT DOES

Human-readable hint for OTA start response codes.

SIGNATURE
describe_ota_start_error(code: int) -> str
PARAMETERS
code
int
RETURNS str
SOURCE hardware/lepro/lib/lepro/ota.py:561
describe_ota_data_error
Human-readable hint for OTA data response codes (0x1013 / FUN_420095d4).
hardware/lepro/lib/lepro/ota.py:578
WHAT IT DOES

Human-readable hint for OTA data response codes (0x1013 / FUN_420095d4).

SIGNATURE
describe_ota_data_error(code: int) -> str
PARAMETERS
code
int
RETURNS str
SOURCE hardware/lepro/lib/lepro/ota.py:578
classify_ota_verdict
Classify post-reboot discovery into stuck vs rolled back vs reconnect failure.
hardware/lepro/lib/lepro/ota.py:599
WHAT IT DOES

Classify post-reboot discovery into stuck vs rolled back vs reconnect failure.

SIGNATURE
classify_ota_verdict(flashed_ver: str, running_ver: str | None, reconnect_ok: bool) -> OtaConfirmVerdict
PARAMETERS
flashed_ver
str
running_ver
str | None
reconnect_ok
bool
RETURNS OtaConfirmVerdict
SOURCE hardware/lepro/lib/lepro/ota.py:599
report_ota_verdict
Log transfer + confirm outcome and exit non-zero on failure.
hardware/lepro/lib/lepro/ota.py:656
WHAT IT DOES

Log transfer + confirm outcome and exit non-zero on failure.

SIGNATURE
report_ota_verdict(verdict: OtaConfirmVerdict, transfer: OtaTransferResult, log: OtaLog) -> None
PARAMETERS
verdict
OtaConfirmVerdict
transfer
OtaTransferResult
log
OtaLog
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:656
check_version_policy
No description documented yet.
hardware/lepro/lib/lepro/ota.py:713
WHAT IT DOES

No description documented yet.

SIGNATURE
check_version_policy(firmware: Path, force: bool) -> None
PARAMETERS
firmware
Path
force
bool
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:713
_device_matches
True when a bleak device looks like our target light.
hardware/lepro/lib/lepro/ota.py:722
WHAT IT DOES

True when a bleak device looks like our target light.

SIGNATURE
_device_matches(mac: str, device: object) -> bool
PARAMETERS
mac
str
device
object
RETURNS bool
SOURCE hardware/lepro/lib/lepro/ota.py:722
_find_device_active
Active BLE scan; on macOS prefer name 'LP' (random peripheral UUIDs).
hardware/lepro/lib/lepro/ota.py:732
WHAT IT DOES

Active BLE scan; on macOS prefer name 'LP' (random peripheral UUIDs).

SIGNATURE
_find_device_active(mac: str, log: OtaLog, timeout: float) -> object | None
PARAMETERS
mac
str
log
OtaLog
timeout
float
RETURNS object | None
SOURCE hardware/lepro/lib/lepro/ota.py:732
_watch_for_device
Passive scan until the light advertises or deadline passes.
hardware/lepro/lib/lepro/ota.py:758
WHAT IT DOES

Passive scan until the light advertises or deadline passes.

SIGNATURE
_watch_for_device(mac: str, log: OtaLog, deadline: float) -> object | None
PARAMETERS
mac
str
log
OtaLog
deadline
float
RETURNS object | None
SOURCE hardware/lepro/lib/lepro/ota.py:758
_connect_to_device
No description documented yet.
hardware/lepro/lib/lepro/ota.py:791
WHAT IT DOES

No description documented yet.

SIGNATURE
_connect_to_device(device: object, mac: str, log: OtaLog, debug_rx: bool = False, debug_tx: bool = False) -> tuple[OtaTransport, BleakClient]
PARAMETERS
device
object
mac
str
log
OtaLog
debug_rx
bool
= False
debug_tx
bool
= False
RETURNS tuple[OtaTransport, BleakClient]
SOURCE hardware/lepro/lib/lepro/ota.py:791
_connect
No description documented yet.
hardware/lepro/lib/lepro/ota.py:824
WHAT IT DOES

No description documented yet.

SIGNATURE
_connect(mac: str, log: OtaLog, debug_rx: bool = False, debug_tx: bool = False, scan_timeout: float = 15.0, device: object | None = None) -> tuple[OtaTransport, BleakClient]
PARAMETERS
mac
str
log
OtaLog
debug_rx
bool
= False
debug_tx
bool
= False
scan_timeout
float
= 15.0
device
object | None
= None
RETURNS tuple[OtaTransport, BleakClient]
SOURCE hardware/lepro/lib/lepro/ota.py:824
_confirm_with_discovery
Send discovery (0x1000) to trigger esp_ota_mark_app_valid_cancel_rollback.
hardware/lepro/lib/lepro/ota.py:846
WHAT IT DOES

Send discovery (0x1000) to trigger esp_ota_mark_app_valid_cancel_rollback.

SIGNATURE
_confirm_with_discovery(mac: str, transport: OtaTransport, flashed_ver: str, log: OtaLog) -> OtaConfirmVerdict
PARAMETERS
mac
str
transport
OtaTransport
flashed_ver
str
log
OtaLog
RETURNS OtaConfirmVerdict
SOURCE hardware/lepro/lib/lepro/ota.py:846
run_post_reboot_confirm
Reconnect after OTA reboot and run discovery while image is still PENDING_VERIFY.
hardware/lepro/lib/lepro/ota.py:874
WHAT IT DOES

Reconnect after OTA reboot and run discovery while image is still PENDING_VERIFY.

SIGNATURE
run_post_reboot_confirm(mac: str, flashed_ver: str, log: OtaLog, transfer_finished_at: float | None = None, debug_rx: bool = False, scan_timeout: float = 15.0, wait_s: float = POST_REBOOT_WAIT_S, retry_s: float = POST_REBOOT_RETRY_S, retry_interval_s: float = POST_REBOOT_RETRY_INTERVAL_S) -> OtaConfirmVerdict
PARAMETERS
mac
str
flashed_ver
str
log
OtaLog
transfer_finished_at
float | None
= None
debug_rx
bool
= False
scan_timeout
float
= 15.0
wait_s
float
= POST_REBOOT_WAIT_S
retry_s
float
= POST_REBOOT_RETRY_S
retry_interval_s
float
= POST_REBOOT_RETRY_INTERVAL_S
RETURNS OtaConfirmVerdict
SOURCE hardware/lepro/lib/lepro/ota.py:874
run_ota
No description documented yet.
hardware/lepro/lib/lepro/ota.py:1139
WHAT IT DOES

No description documented yet.

SIGNATURE
run_ota(args: argparse.Namespace) -> None
PARAMETERS
args
argparse.Namespace
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:1139
main
No description documented yet.
hardware/lepro/lib/lepro/ota.py:1274
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:1274
hardware/lepro/lib/lepro/patch_cdn.py
20 symbols
apply_byte_patch
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:91
WHAT IT DOES

No description documented yet.

SIGNATURE
apply_byte_patch(fw: bytearray, patch: BytePatch) -> PatchResult
PARAMETERS
fw
bytearray
patch
BytePatch
RETURNS PatchResult
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:91
check_byte_patch
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:110
WHAT IT DOES

No description documented yet.

SIGNATURE
check_byte_patch(fw: bytes, patch: BytePatch) -> PatchResult
PARAMETERS
fw
bytes
patch
BytePatch
RETURNS PatchResult
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:110
apply_byte_patches
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:124
WHAT IT DOES

No description documented yet.

SIGNATURE
apply_byte_patches(fw: bytearray, patches: Sequence[BytePatch]) -> list[PatchResult]
PARAMETERS
fw
bytearray
patches
Sequence[BytePatch]
RETURNS list[PatchResult]
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:124
check_byte_patches
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:128
WHAT IT DOES

No description documented yet.

SIGNATURE
check_byte_patches(fw: bytes, patches: Sequence[BytePatch]) -> list[PatchResult]
PARAMETERS
fw
bytes
patches
Sequence[BytePatch]
RETURNS list[PatchResult]
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:128
be16
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:132
WHAT IT DOES

No description documented yet.

SIGNATURE
be16(buf: bytes, off: int) -> int
PARAMETERS
buf
bytes
off
int
RETURNS int
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:132
find_bundle_layout
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:136
WHAT IT DOES

No description documented yet.

SIGNATURE
find_bundle_layout(fw: bytes, bundle: BundleConfig, bundle_off: int | None = None, pin_off: int | None = None, expected_record: bytes | None = None) -> BundleLayout
PARAMETERS
fw
bytes
bundle
BundleConfig
bundle_off
int | None
= None
pin_off
int | None
= None
expected_record
bytes | None
= None
RETURNS BundleLayout
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:136
parse_bundle_layout
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:180
WHAT IT DOES

No description documented yet.

SIGNATURE
parse_bundle_layout(fw: bytes, bundle_off: int, bundle: BundleConfig, expected_record: bytes | None = None, expected_entry_off: int | None = None) -> BundleLayout
PARAMETERS
fw
bytes
bundle_off
int
bundle
BundleConfig
expected_record
bytes | None
= None
expected_entry_off
int | None
= None
RETURNS BundleLayout
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:180
pem_to_der
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:231
WHAT IT DOES

No description documented yet.

SIGNATURE
pem_to_der(pem_path: Path) -> bytes
PARAMETERS
pem_path
Path
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:231
parse_host_port
Split "host" or "host:port" (ignoring bracketed IPv6) into (host, port).
hardware/lepro/lib/lepro/patch_cdn.py:239
WHAT IT DOES

Split "host" or "host:port" (ignoring bracketed IPv6) into (host, port).

SIGNATURE
parse_host_port(value: str, default_port: int = DEFAULT_CDN_PORT) -> tuple[str, int]
PARAMETERS
value
str
default_port
int
= DEFAULT_CDN_PORT
RETURNS tuple[str, int]
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:239
fetch_cert_der_from_host
Open a TLS connection and return the server leaf certificate as DER.
hardware/lepro/lib/lepro/patch_cdn.py:248
WHAT IT DOES

Open a TLS connection and return the server leaf certificate as DER.

SIGNATURE
fetch_cert_der_from_host(host: str, port: int = DEFAULT_CDN_PORT, connect_host: str | None = None, timeout: float = 10.0) -> bytes
PARAMETERS
host
str
port
int
= DEFAULT_CDN_PORT
connect_host
str | None
= None
timeout
float
= 10.0
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:248
load_cert_der
Resolve the cert to pin: live from `cert_host` if given, else local PEM.
hardware/lepro/lib/lepro/patch_cdn.py:273
WHAT IT DOES

Resolve the cert to pin: live from `cert_host` if given, else local PEM.

SIGNATURE
load_cert_der(cert_path: Path | None, cert_host: str | None, cert_connect: str | None = None, cert_port: int = DEFAULT_CDN_PORT) -> tuple[bytes, str]
PARAMETERS
cert_path
Path | None
cert_host
str | None
cert_connect
str | None
= None
cert_port
int
= DEFAULT_CDN_PORT
RETURNS tuple[bytes, str]
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:273
build_bundle_record
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:292
WHAT IT DOES

No description documented yet.

SIGNATURE
build_bundle_record(cert_der: bytes) -> tuple[bytes, bytes, bytes]
PARAMETERS
cert_der
bytes
RETURNS tuple[bytes, bytes, bytes]
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:292
split_bundle_record
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:302
WHAT IT DOES

No description documented yet.

SIGNATURE
split_bundle_record(record: bytes, layout: BundleLayout) -> tuple[bytes, bytes]
PARAMETERS
record
bytes
layout
BundleLayout
RETURNS tuple[bytes, bytes]
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:302
sha256_hex
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:306
WHAT IT DOES

No description documented yet.

SIGNATURE
sha256_hex(data: bytes) -> str
PARAMETERS
data
bytes
RETURNS str
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:306
checksum_off
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:310
WHAT IT DOES

No description documented yet.

SIGNATURE
checksum_off(fw: bytes) -> int
PARAMETERS
fw
bytes
RETURNS int
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:310
repair_esp_app_image
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:316
WHAT IT DOES

No description documented yet.

SIGNATURE
repair_esp_app_image(fw: bytearray, chip: str) -> tuple[int, int, str, str]
PARAMETERS
fw
bytearray
chip
str
RETURNS tuple[int, int, str, str]
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:316
footer_valid
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:333
WHAT IT DOES

No description documented yet.

SIGNATURE
footer_valid(path: Path, chip: str) -> tuple[bool, str]
PARAMETERS
path
Path
chip
str
RETURNS tuple[bool, str]
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:333
warn_if_footer_invalid
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:348
WHAT IT DOES

No description documented yet.

SIGNATURE
warn_if_footer_invalid(fw: bytes, chip: str) -> None
PARAMETERS
fw
bytes
chip
str
RETURNS None
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:348
patch_firmware
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:367
WHAT IT DOES

No description documented yet.

SIGNATURE
patch_firmware(profile: FirmwareProfile, firmware_path: Path, output_path: Path, cert_path: Path | None = None, cert_host: str | None = None, cert_connect: str | None = None, bundle_off: int | None = None, pin_off: int | None = None, verify_only: bool = False, force: bool = False) -> None
PARAMETERS
profile
FirmwareProfile
firmware_path
Path
output_path
Path
cert_path
Path | None
= None
cert_host
str | None
= None
cert_connect
str | None
= None
bundle_off
int | None
= None
pin_off
int | None
= None
verify_only
bool
= False
force
bool
= False
RETURNS None
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:367
main
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:528
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:528
hardware/lepro/lib/lepro/paths.py
1 symbols
repo_path
No description documented yet.
hardware/lepro/lib/lepro/paths.py:12
WHAT IT DOES

No description documented yet.

SIGNATURE
repo_path(*parts: str) -> Path
PARAMETERS
*parts
str
RETURNS Path
SOURCE hardware/lepro/lib/lepro/paths.py:12
hardware/lepro/lib/lepro/protocol.py
11 symbols
opcode_to_wire
Convert native uint16 opcode to (ptype, subtype) wire bytes.
hardware/lepro/lib/lepro/protocol.py:110
WHAT IT DOES

Convert native uint16 opcode to (ptype, subtype) wire bytes.

SIGNATURE
opcode_to_wire(opcode: int) -> tuple[int, int]
PARAMETERS
opcode
int
RETURNS tuple[int, int]
SOURCE hardware/lepro/lib/lepro/protocol.py:110
wire_to_opcode
No description documented yet.
hardware/lepro/lib/lepro/protocol.py:115
WHAT IT DOES

No description documented yet.

SIGNATURE
wire_to_opcode(ptype: int, subtype: int) -> int
PARAMETERS
ptype
int
subtype
int
RETURNS int
SOURCE hardware/lepro/lib/lepro/protocol.py:115
crc16_lepro
Native CRC from le_msg_tx_data_ext (table @ 0x14a758, init=0).
hardware/lepro/lib/lepro/protocol.py:119
WHAT IT DOES

Native CRC from le_msg_tx_data_ext (table @ 0x14a758, init=0).

SIGNATURE
crc16_lepro(data: bytes, init: int = 0) -> int
PARAMETERS
data
bytes
init
int
= 0
RETURNS int
SOURCE hardware/lepro/lib/lepro/protocol.py:119
crc16_ibm
CRC-16/IBM — matches native table for all captured CMD/RSP packets.
hardware/lepro/lib/lepro/protocol.py:127
WHAT IT DOES

CRC-16/IBM — matches native table for all captured CMD/RSP packets.

SIGNATURE
crc16_ibm(data: bytes) -> int
PARAMETERS
data
bytes
RETURNS int
SOURCE hardware/lepro/lib/lepro/protocol.py:127
parse_packet
Parse a captured BLE packet. Returns None if too short.
hardware/lepro/lib/lepro/protocol.py:150
WHAT IT DOES

Parse a captured BLE packet. Returns None if too short.

SIGNATURE
parse_packet(raw: bytes) -> PacketHeader | None
PARAMETERS
raw
bytes
RETURNS PacketHeader | None
SOURCE hardware/lepro/lib/lepro/protocol.py:150
_build_body
No description documented yet.
hardware/lepro/lib/lepro/protocol.py:174
WHAT IT DOES

No description documented yet.

SIGNATURE
_build_body(seq: int, magic2: int, field6: int, field7: int, payload: bytes) -> bytes
PARAMETERS
seq
int
magic2
int
field6
int
field7
int
payload
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/protocol.py:174
build_packet
Construct a valid LP-light BLE packet (single 0x5A 0x50 frame).
hardware/lepro/lib/lepro/protocol.py:195
WHAT IT DOES

Construct a valid LP-light BLE packet (single 0x5A 0x50 frame).

SIGNATURE
build_packet(seq: int, ptype: int, subtype: int, payload: bytes) -> bytes
PARAMETERS
seq
int
ptype
int
subtype
int
payload
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/protocol.py:195
build_packet_opcode
Build packet from native uint16 opcode.
hardware/lepro/lib/lepro/protocol.py:201
WHAT IT DOES

Build packet from native uint16 opcode.

SIGNATURE
build_packet_opcode(seq: int, opcode: int, payload: bytes) -> bytes
PARAMETERS
seq
int
opcode
int
payload
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/protocol.py:201
build_packets_fragmented
Split payload across 0x51/0x52/0x53 frames per le_msg_tx_data_ext. max_payload: max bytes per fragment (native ctx+0x14 MTU chunk…
hardware/lepro/lib/lepro/protocol.py:207
WHAT IT DOES

Split payload across 0x51/0x52/0x53 frames per le_msg_tx_data_ext. max_payload: max bytes per fragment (native ctx+0x14 MTU chunk size).

SIGNATURE
build_packets_fragmented(seq: int, opcode: int, payload: bytes, max_payload: int = 128, encrypted: bool = False) -> list[bytes]
PARAMETERS
seq
int
opcode
int
payload
bytes
max_payload
int
= 128
encrypted
bool
= False
RETURNS list[bytes]
SOURCE hardware/lepro/lib/lepro/protocol.py:207
verify_packet
Verify the CRC of a captured packet.
hardware/lepro/lib/lepro/protocol.py:273
WHAT IT DOES

Verify the CRC of a captured packet.

SIGNATURE
verify_packet(raw: bytes) -> bool
PARAMETERS
raw
bytes
RETURNS bool
SOURCE hardware/lepro/lib/lepro/protocol.py:273
_load_capture_packets
No description documented yet.
hardware/lepro/lib/lepro/protocol.py:300
WHAT IT DOES

No description documented yet.

SIGNATURE
_load_capture_packets(path: str = 'captures.log') -> list[bytes]
PARAMETERS
path
str
= 'captures.log'
RETURNS list[bytes]
SOURCE hardware/lepro/lib/lepro/protocol.py:300
hardware/lepro/lib/lepro/provision.py
11 symbols
_prov_paths_file
No description documented yet.
hardware/lepro/lib/lepro/provision.py:49
WHAT IT DOES

No description documented yet.

SIGNATURE
_prov_paths_file(mac: str) -> Path
PARAMETERS
mac
str
RETURNS Path
SOURCE hardware/lepro/lib/lepro/provision.py:49
resolve_cert_paths
Return root/cert paths to send in provision JSON. Verified against ZB1 v2.3.18 firmware (ota_state_machine_advance, state 0x2b):…
hardware/lepro/lib/lepro/provision.py:54
WHAT IT DOES

Return root/cert paths to send in provision JSON. Verified against ZB1 v2.3.18 firmware (ota_state_machine_advance, state 0x2b): for each of "root"/"cert" the bulb ARMS its per-resource CDN fetch flag (sentinel 0x5a5a5a5a) only when the NVS key is missing (first provision) OR the path we send is byte-identical to the path already stored in NVS. If the path DIFFERS, the firmware does nothing — it neither updates NVS nor arms a fetch. Resend the exact stored path to re-arm and re-download (e.g. after rotating the cert file at the same CDN URL). On **stock** firmware the HTTPS download still requires onboarding mode (prov_mode 2/3); see prepare_cert_refetch(). On **patched** firmware (`lepro-firmware patch`, default) the prov_mode gate is removed so re-provision with the same paths re-fetches certs on an already-provisioned bulb.

SIGNATURE
resolve_cert_paths(mac: str, root: str, cert: str, update_cert_paths: bool = False) -> tuple[str, str]
PARAMETERS
mac
str
root
str
cert
str
update_cert_paths
bool
= False
RETURNS tuple[str, str]
SOURCE hardware/lepro/lib/lepro/provision.py:54
save_cert_paths
No description documented yet.
hardware/lepro/lib/lepro/provision.py:96
WHAT IT DOES

No description documented yet.

SIGNATURE
save_cert_paths(mac: str, root: str, cert: str) -> None
PARAMETERS
mac
str
root
str
cert
str
RETURNS None
SOURCE hardware/lepro/lib/lepro/provision.py:96
prepare_cert_refetch
Re-send requestBond magic before WiFi/MQTT provision. On **stock** ZB1 v2.3.18: requestBond runs ota_state_machine_advance(0x14),…
hardware/lepro/lib/lepro/provision.py:102
WHAT IT DOES

Re-send requestBond magic before WiFi/MQTT provision. On **stock** ZB1 v2.3.18: requestBond runs ota_state_machine_advance(0x14), which bumps prov_mode (ota_ctx+8) to 3 ONLY when it is already 2 or 3. The CDN cert fetch at WiFi-up (state 0x2d) is gated on prov_mode in {2, 3}. prov_mode is decided at boot and is 1 (NORMAL) on an already-provisioned bulb, so requestBond cannot enable cert re-download on stock firmware without a pairing/factory reset. On **patched** firmware (`lepro-firmware patch`) this call is harmless but not required for cert refresh — the prov_mode gate NOP makes state 0x2d always fetch.

SIGNATURE
prepare_cert_refetch(session: LeproSession) -> None
PARAMETERS
session
LeproSession
RETURNS None
SOURCE hardware/lepro/lib/lepro/provision.py:102
build_wifi_mqtt_json
No description documented yet.
hardware/lepro/lib/lepro/provision.py:130
WHAT IT DOES

No description documented yet.

SIGNATURE
build_wifi_mqtt_json(ssid: str, password: str, domain: str = DEFAULT_DOMAIN, root: str = DEFAULT_ROOT, cert: str = DEFAULT_CERT, host: str = DEFAULT_HOST, port: str = DEFAULT_PORT, uid: str | None = None) -> str
PARAMETERS
ssid
str
password
str
domain
str
= DEFAULT_DOMAIN
root
str
= DEFAULT_ROOT
cert
str
= DEFAULT_CERT
host
str
= DEFAULT_HOST
port
str
= DEFAULT_PORT
uid
str | None
= None
RETURNS str
SOURCE hardware/lepro/lib/lepro/provision.py:130
_connect
No description documented yet.
hardware/lepro/lib/lepro/provision.py:155
WHAT IT DOES

No description documented yet.

SIGNATURE
_connect(mac: str, debug_rx: bool = False) -> tuple[BleakTransport, BleakClient]
PARAMETERS
mac
str
debug_rx
bool
= False
RETURNS tuple[BleakTransport, BleakClient]
SOURCE hardware/lepro/lib/lepro/provision.py:155
send_wifi_mqtt
No description documented yet.
hardware/lepro/lib/lepro/provision.py:170
WHAT IT DOES

No description documented yet.

SIGNATURE
send_wifi_mqtt(session: LeproSession, ssid: str, password: str, domain: str, root: str, cert: str, host: str, port: str, uid: str | None, dry_run: bool = False) -> None
PARAMETERS
session
LeproSession
ssid
str
password
str
domain
str
root
str
cert
str
host
str
port
str
uid
str | None
dry_run
bool
= False
RETURNS None
SOURCE hardware/lepro/lib/lepro/provision.py:170
cmd_provision
No description documented yet.
hardware/lepro/lib/lepro/provision.py:227
WHAT IT DOES

No description documented yet.

SIGNATURE
cmd_provision(args: argparse.Namespace) -> None
PARAMETERS
args
argparse.Namespace
RETURNS None
SOURCE hardware/lepro/lib/lepro/provision.py:227
cmd_provision_with_creds
No description documented yet.
hardware/lepro/lib/lepro/provision.py:276
WHAT IT DOES

No description documented yet.

SIGNATURE
cmd_provision_with_creds(session: LeproSession, creds: BondCredentials, args: argparse.Namespace) -> None
PARAMETERS
session
LeproSession
creds
BondCredentials
args
argparse.Namespace
RETURNS None
SOURCE hardware/lepro/lib/lepro/provision.py:276
_resolved_cert_paths
No description documented yet.
hardware/lepro/lib/lepro/provision.py:310
WHAT IT DOES

No description documented yet.

SIGNATURE
_resolved_cert_paths(args: argparse.Namespace, mac: str) -> tuple[str, str]
PARAMETERS
args
argparse.Namespace
mac
str
RETURNS tuple[str, str]
SOURCE hardware/lepro/lib/lepro/provision.py:310
_add_cert_refresh_flags
No description documented yet.
hardware/lepro/lib/lepro/provision.py:321
WHAT IT DOES

No description documented yet.

SIGNATURE
_add_cert_refresh_flags(p: argparse.ArgumentParser) -> None
PARAMETERS
p
argparse.ArgumentParser
RETURNS None
SOURCE hardware/lepro/lib/lepro/provision.py:321
hardware/lepro/lib/lepro/session.py
1 symbols
bond_device
No description documented yet.
hardware/lepro/lib/lepro/session.py:401
WHAT IT DOES

No description documented yet.

SIGNATURE
bond_device(session: LeproSession, mac: str, force: bool = False) -> BondCredentials
PARAMETERS
session
LeproSession
mac
str
force
bool
= False
RETURNS BondCredentials
SOURCE hardware/lepro/lib/lepro/session.py:401
hardware/lepro/lib/lepro/tools/debug_hijack.py
10 symbols
_log
No description documented yet.
hardware/lepro/lib/lepro/tools/debug_hijack.py:45
WHAT IT DOES

No description documented yet.

SIGNATURE
_log(hypothesis_id: str, location: str, message: str, data: dict, run_id: str) -> None
PARAMETERS
hypothesis_id
str
location
str
message
str
data
dict
run_id
str
RETURNS None
SOURCE hardware/lepro/lib/lepro/tools/debug_hijack.py:45
_pem_der
No description documented yet.
hardware/lepro/lib/lepro/tools/debug_hijack.py:62
WHAT IT DOES

No description documented yet.

SIGNATURE
_pem_der(path: Path) -> bytes
PARAMETERS
path
Path
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/tools/debug_hijack.py:62
_bundle_record_at
No description documented yet.
hardware/lepro/lib/lepro/tools/debug_hijack.py:69
WHAT IT DOES

No description documented yet.

SIGNATURE
_bundle_record_at(fw: bytes, firmware_path: Path | None = None) -> tuple[object, bytes]
PARAMETERS
fw
bytes
firmware_path
Path | None
= None
RETURNS tuple[object, bytes]
SOURCE hardware/lepro/lib/lepro/tools/debug_hijack.py:69
_fetch_peer_der
No description documented yet.
hardware/lepro/lib/lepro/tools/debug_hijack.py:81
WHAT IT DOES

No description documented yet.

SIGNATURE
_fetch_peer_der(host: str, port: int, connect_host: str | None = None) -> bytes
PARAMETERS
host
str
port
int
connect_host
str | None
= None
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/tools/debug_hijack.py:81
check_firmware_pin
No description documented yet.
hardware/lepro/lib/lepro/tools/debug_hijack.py:93
WHAT IT DOES

No description documented yet.

SIGNATURE
check_firmware_pin(stock: Path, patched: Path | None, cert: Path) -> dict
PARAMETERS
stock
Path
patched
Path | None
cert
Path
RETURNS dict
SOURCE hardware/lepro/lib/lepro/tools/debug_hijack.py:93
analyze_pcap
No description documented yet.
hardware/lepro/lib/lepro/tools/debug_hijack.py:155
WHAT IT DOES

No description documented yet.

SIGNATURE
analyze_pcap(pcap: Path) -> dict
PARAMETERS
pcap
Path
RETURNS dict
SOURCE hardware/lepro/lib/lepro/tools/debug_hijack.py:155
check_dns
No description documented yet.
hardware/lepro/lib/lepro/tools/debug_hijack.py:238
WHAT IT DOES

No description documented yet.

SIGNATURE
check_dns(host: str) -> dict
PARAMETERS
host
str
RETURNS dict
SOURCE hardware/lepro/lib/lepro/tools/debug_hijack.py:238
probe_cdn
No description documented yet.
hardware/lepro/lib/lepro/tools/debug_hijack.py:248
WHAT IT DOES

No description documented yet.

SIGNATURE
probe_cdn() -> dict
PARAMETERS
No parameters documented.
RETURNS dict
SOURCE hardware/lepro/lib/lepro/tools/debug_hijack.py:248
probe_mqtt_tls
No description documented yet.
hardware/lepro/lib/lepro/tools/debug_hijack.py:295
WHAT IT DOES

No description documented yet.

SIGNATURE
probe_mqtt_tls() -> dict
PARAMETERS
No parameters documented.
RETURNS dict
SOURCE hardware/lepro/lib/lepro/tools/debug_hijack.py:295
main
No description documented yet.
hardware/lepro/lib/lepro/tools/debug_hijack.py:315
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE hardware/lepro/lib/lepro/tools/debug_hijack.py:315
hardware/lepro/lib/lepro/tools/decrypt_capture.py
3 symbols
_format_plaintext
No description documented yet.
hardware/lepro/lib/lepro/tools/decrypt_capture.py:41
WHAT IT DOES

No description documented yet.

SIGNATURE
_format_plaintext(opcode: int, plain: bytes) -> str
PARAMETERS
opcode
int
plain
bytes
RETURNS str
SOURCE hardware/lepro/lib/lepro/tools/decrypt_capture.py:41
decrypt_log
No description documented yet.
hardware/lepro/lib/lepro/tools/decrypt_capture.py:58
WHAT IT DOES

No description documented yet.

SIGNATURE
decrypt_log(path: Path, mac: str, session_filter: str | None = None, opcode_filter: int | None = None) -> None
PARAMETERS
path
Path
mac
str
session_filter
str | None
= None
opcode_filter
int | None
= None
RETURNS None
SOURCE hardware/lepro/lib/lepro/tools/decrypt_capture.py:58
main
No description documented yet.
hardware/lepro/lib/lepro/tools/decrypt_capture.py:109
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE hardware/lepro/lib/lepro/tools/decrypt_capture.py:109
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py
6 symbols
_align4
No description documented yet.
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:72
WHAT IT DOES

No description documented yet.

SIGNATURE
_align4(n: int) -> int
PARAMETERS
n
int
RETURNS int
SOURCE hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:72
parse_esp_image
No description documented yet.
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:76
WHAT IT DOES

No description documented yet.

SIGNATURE
parse_esp_image(data: bytes) -> tuple[int, list[Segment]]
PARAMETERS
data
bytes
RETURNS tuple[int, list[Segment]]
SOURCE hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:76
_build_shstrtab
No description documented yet.
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:100
WHAT IT DOES

No description documented yet.

SIGNATURE
_build_shstrtab(segments: list[Segment]) -> bytes
PARAMETERS
segments
list[Segment]
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:100
build_elf
No description documented yet.
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:108
WHAT IT DOES

No description documented yet.

SIGNATURE
build_elf(entry: int, segments: list[Segment]) -> bytes
PARAMETERS
entry
int
segments
list[Segment]
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:108
convert
No description documented yet.
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:220
WHAT IT DOES

No description documented yet.

SIGNATURE
convert(src: Path, dst: Path) -> None
PARAMETERS
src
Path
dst
Path
RETURNS None
SOURCE hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:220
main
No description documented yet.
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:237
WHAT IT DOES

No description documented yet.

SIGNATURE
main(argv: list[str] | None = None) -> int
PARAMETERS
argv
list[str] | None
= None
RETURNS int
SOURCE hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:237
hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py
7 symbols
_spki_fp
No description documented yet.
hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:60
WHAT IT DOES

No description documented yet.

SIGNATURE
_spki_fp(cert: x509.Certificate) -> str
PARAMETERS
cert
x509.Certificate
RETURNS str
SOURCE hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:60
_cert_fp
No description documented yet.
hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:68
WHAT IT DOES

No description documented yet.

SIGNATURE
_cert_fp(cert: x509.Certificate) -> str
PARAMETERS
cert
x509.Certificate
RETURNS str
SOURCE hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:68
_name
No description documented yet.
hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:72
WHAT IT DOES

No description documented yet.

SIGNATURE
_name(n: x509.Name) -> str
PARAMETERS
n
x509.Name
RETURNS str
SOURCE hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:72
fetch_cdn_body
HTTPS GET of the provisioned root path — the bytes the bulb stores verbatim.
hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:76
WHAT IT DOES

HTTPS GET of the provisioned root path — the bytes the bulb stores verbatim.

SIGNATURE
fetch_cdn_body(host: str, ip: str, root: str) -> bytes
PARAMETERS
host
str
ip
str
root
str
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:76
_dechunk
No description documented yet.
hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:99
WHAT IT DOES

No description documented yet.

SIGNATURE
_dechunk(body: bytes) -> bytes
PARAMETERS
body
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:99
fetch_broker_chain
Pull the FULL cert chain the broker presents (leaf first). Python's ssl only exposes the leaf when verification fails (which is e…
hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:114
WHAT IT DOES

Pull the FULL cert chain the broker presents (leaf first). Python's ssl only exposes the leaf when verification fails (which is exactly our case), so shell out to `openssl s_client -showcerts` to capture every certificate the server sends, regardless of trust.

SIGNATURE
fetch_broker_chain(host: str, ip: str, port: int) -> list[x509.Certificate]
PARAMETERS
host
str
ip
str
port
int
RETURNS list[x509.Certificate]
SOURCE hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:114
main
No description documented yet.
hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:153
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> int
PARAMETERS
No parameters documented.
RETURNS int
SOURCE hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py:153
hardware/lepro/lib/lepro/tools/replay.py
1 symbols
run
No description documented yet.
hardware/lepro/lib/lepro/tools/replay.py:70
WHAT IT DOES

No description documented yet.

SIGNATURE
run(target_mac: str | None)
PARAMETERS
target_mac
str | None
RETURNS Not documented
SOURCE hardware/lepro/lib/lepro/tools/replay.py:70
hardware/lepro/lib/lepro/tools/validate_ota_parser.py
3 symbols
simulate_parse
Walk the FUN_42008eb0 branch logic symbolically; return failing PC label.
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:165
WHAT IT DOES

Walk the FUN_42008eb0 branch logic symbolically; return failing PC label.

SIGNATURE
simulate_parse(obj: dict[str, Any], ctx0: int = 1, running_version: str = '2.3.18') -> str
PARAMETERS
obj
dict[str, Any]
ctx0
int
= 1
running_version
str
= '2.3.18'
RETURNS str
SOURCE hardware/lepro/lib/lepro/tools/validate_ota_parser.py:165
validate
No description documented yet.
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:225
WHAT IT DOES

No description documented yet.

SIGNATURE
validate(elf_path: Path) -> int
PARAMETERS
elf_path
Path
RETURNS int
SOURCE hardware/lepro/lib/lepro/tools/validate_ota_parser.py:225
main
No description documented yet.
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:287
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE hardware/lepro/lib/lepro/tools/validate_ota_parser.py:287
hardware/lepro/setup.py
1 symbols
main
No description documented yet.
hardware/lepro/setup.py:284
WHAT IT DOES

No description documented yet.

SIGNATURE
main() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE hardware/lepro/setup.py:284
hardware/web/app.py
3 symbols
home
No description documented yet.
hardware/web/app.py:182
WHAT IT DOES

No description documented yet.

SIGNATURE
home(request: Request)
PARAMETERS
request
Request
RETURNS Not documented
SOURCE hardware/web/app.py:182
DECORATORS
app.get('/', response_class=HTMLResponse)
dashboard
No description documented yet.
hardware/web/app.py:192
WHAT IT DOES

No description documented yet.

SIGNATURE
dashboard(request: Request)
PARAMETERS
request
Request
RETURNS Not documented
SOURCE hardware/web/app.py:192
DECORATORS
app.get('/dashboard')
chat
No description documented yet.
hardware/web/app.py:207
WHAT IT DOES

No description documented yet.

SIGNATURE
chat(data: dict)
PARAMETERS
data
dict
RETURNS Not documented
SOURCE hardware/web/app.py:207
DECORATORS
app.post('/chat')
interfaces/web/app.py
3 symbols
home
No description documented yet.
interfaces/web/app.py:183
WHAT IT DOES

No description documented yet.

SIGNATURE
home(request: Request)
PARAMETERS
request
Request
RETURNS Not documented
SOURCE interfaces/web/app.py:183
DECORATORS
app.get('/', response_class=HTMLResponse)
dashboard
No description documented yet.
interfaces/web/app.py:194
WHAT IT DOES

No description documented yet.

SIGNATURE
dashboard(request: Request)
PARAMETERS
request
Request
RETURNS Not documented
SOURCE interfaces/web/app.py:194
DECORATORS
app.get('/dashboard')
chat
No description documented yet.
interfaces/web/app.py:210
WHAT IT DOES

No description documented yet.

SIGNATURE
chat(data: dict)
PARAMETERS
data
dict
RETURNS Not documented
SOURCE interfaces/web/app.py:210
DECORATORS
app.post('/chat')
main.py
1 symbols
main
No description documented yet.
main.py:24
WHAT IT DOES

No description documented yet.

SIGNATURE
main()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE main.py:24
memory/memory.py
1 symbols
remember
No description documented yet.
memory/memory.py:61
WHAT IT DOES

No description documented yet.

SIGNATURE
remember(self, user_id, content, category = 'general', importance = 5)
PARAMETERS
self
user_id
content
category
= 'general'
importance
= 5
RETURNS Not documented
SOURCE memory/memory.py:61
memory/sqlite.py
3 symbols
connect
No description documented yet.
memory/sqlite.py:28
WHAT IT DOES

No description documented yet.

SIGNATURE
connect(db_path = None)
PARAMETERS
db_path
= None
RETURNS Not documented
SOURCE memory/sqlite.py:28
ensure_schema
No description documented yet.
memory/sqlite.py:112
WHAT IT DOES

No description documented yet.

SIGNATURE
ensure_schema(conn)
PARAMETERS
conn
RETURNS Not documented
SOURCE memory/sqlite.py:112
save_conversation
No description documented yet.
memory/sqlite.py:326
WHAT IT DOES

No description documented yet.

SIGNATURE
save_conversation(conn, user_id, role, message)
PARAMETERS
conn
user_id
role
message
RETURNS Not documented
SOURCE memory/sqlite.py:326
test_refactor.py
8 symbols
test_intent_detection
No description documented yet.
test_refactor.py:12
WHAT IT DOES

No description documented yet.

SIGNATURE
test_intent_detection()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE test_refactor.py:12
test_position_query
No description documented yet.
test_refactor.py:24
WHAT IT DOES

No description documented yet.

SIGNATURE
test_position_query()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE test_refactor.py:24
test_list_query
No description documented yet.
test_refactor.py:36
WHAT IT DOES

No description documented yet.

SIGNATURE
test_list_query()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE test_refactor.py:36
test_search_query_building
No description documented yet.
test_refactor.py:46
WHAT IT DOES

No description documented yet.

SIGNATURE
test_search_query_building()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE test_refactor.py:46
test_filtering
No description documented yet.
test_refactor.py:58
WHAT IT DOES

No description documented yet.

SIGNATURE
test_filtering()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE test_refactor.py:58
test_ranking
No description documented yet.
test_refactor.py:76
WHAT IT DOES

No description documented yet.

SIGNATURE
test_ranking()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE test_refactor.py:76
test_fursuit_query
No description documented yet.
test_refactor.py:98
WHAT IT DOES

No description documented yet.

SIGNATURE
test_fursuit_query()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE test_refactor.py:98
test_backward_compatibility
No description documented yet.
test_refactor.py:110
WHAT IT DOES

No description documented yet.

SIGNATURE
test_backward_compatibility()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE test_refactor.py:110
tests/auto_promt_test.py
5 symbols
load_cyn_personality
No description documented yet.
tests/auto_promt_test.py:62
WHAT IT DOES

No description documented yet.

SIGNATURE
load_cyn_personality(files)
PARAMETERS
files
RETURNS Not documented
SOURCE tests/auto_promt_test.py:62
loading_animation
No description documented yet.
tests/auto_promt_test.py:116
WHAT IT DOES

No description documented yet.

SIGNATURE
loading_animation(stop_event, start_time)
PARAMETERS
stop_event
start_time
RETURNS Not documented
SOURCE tests/auto_promt_test.py:116
ask_model
No description documented yet.
tests/auto_promt_test.py:159
WHAT IT DOES

No description documented yet.

SIGNATURE
ask_model(user_prompt, system_prompt)
PARAMETERS
user_prompt
system_prompt
RETURNS Not documented
SOURCE tests/auto_promt_test.py:159
generate_tests
No description documented yet.
tests/auto_promt_test.py:323
WHAT IT DOES

No description documented yet.

SIGNATURE
generate_tests()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE tests/auto_promt_test.py:323
run_tests
No description documented yet.
tests/auto_promt_test.py:416
WHAT IT DOES

No description documented yet.

SIGNATURE
run_tests()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE tests/auto_promt_test.py:416
tests/test_memory_system.py
1 symbols
test_memory_system
Test memory manager and extractor.
tests/test_memory_system.py:18
WHAT IT DOES

Test memory manager and extractor.

SIGNATURE
test_memory_system()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE tests/test_memory_system.py:18
tests/test_prompt_builder.py
1 symbols
test_build_prompt_minimal
No description documented yet.
tests/test_prompt_builder.py:4
WHAT IT DOES

No description documented yet.

SIGNATURE
test_build_prompt_minimal()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE tests/test_prompt_builder.py:4
tests/verify_refactoring.py
9 symbols
test_prompt_manager
Test PromptManager basic functionality.
tests/verify_refactoring.py:18
WHAT IT DOES

Test PromptManager basic functionality.

SIGNATURE
test_prompt_manager()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE tests/verify_refactoring.py:18
test_cyn_personality_preserved
Test that Cyn's core personality is preserved.
tests/verify_refactoring.py:69
WHAT IT DOES

Test that Cyn's core personality is preserved.

SIGNATURE
test_cyn_personality_preserved()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE tests/verify_refactoring.py:69
test_key_features_present
Test that all key Cyn features are preserved.
tests/verify_refactoring.py:96
WHAT IT DOES

Test that all key Cyn features are preserved.

SIGNATURE
test_key_features_present()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE tests/verify_refactoring.py:96
test_examples_quality
Test that examples are well-formed and diverse.
tests/verify_refactoring.py:127
WHAT IT DOES

Test that examples are well-formed and diverse.

SIGNATURE
test_examples_quality()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE tests/verify_refactoring.py:127
test_no_major_duplicates
Test that major duplicates have been removed.
tests/verify_refactoring.py:151
WHAT IT DOES

Test that major duplicates have been removed.

SIGNATURE
test_no_major_duplicates()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE tests/verify_refactoring.py:151
test_backwards_compatibility
Test that legacy code still works.
tests/verify_refactoring.py:179
WHAT IT DOES

Test that legacy code still works.

SIGNATURE
test_backwards_compatibility()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE tests/verify_refactoring.py:179
test_context_reduction
Test that context usage has been reduced.
tests/verify_refactoring.py:207
WHAT IT DOES

Test that context usage has been reduced.

SIGNATURE
test_context_reduction()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE tests/verify_refactoring.py:207
test_mode_independence
Test that modes don't interfere with each other.
tests/verify_refactoring.py:238
WHAT IT DOES

Test that modes don't interfere with each other.

SIGNATURE
test_mode_independence()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE tests/verify_refactoring.py:238
run_all_tests
Run all verification tests.
tests/verify_refactoring.py:261
WHAT IT DOES

Run all verification tests.

SIGNATURE
run_all_tests()
PARAMETERS
No parameters documented.
RETURNS Not documented
SOURCE tests/verify_refactoring.py:261
tools/SmokeCounterTool.py
13 symbols
get_connection
Open the smoke-counter SQLite database.
tools/SmokeCounterTool.py:47
WHAT IT DOES

Open the smoke-counter SQLite database.

SIGNATURE
get_connection() -> sqlite3.Connection
PARAMETERS
No parameters documented.
RETURNS sqlite3.Connection
SOURCE tools/SmokeCounterTool.py:47
init_db
Create the smoke-session table if it does not already exist.
tools/SmokeCounterTool.py:54
WHAT IT DOES

Create the smoke-session table if it does not already exist.

SIGNATURE
init_db() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE tools/SmokeCounterTool.py:54
_row_to_session
Convert a SQLite row into the session structure used by CYN.
tools/SmokeCounterTool.py:71
WHAT IT DOES

Convert a SQLite row into the session structure used by CYN.

SIGNATURE
_row_to_session(row: sqlite3.Row) -> Dict[str, Any]
PARAMETERS
row
sqlite3.Row
RETURNS Dict[str, Any]
SOURCE tools/SmokeCounterTool.py:71
migrate_json_once
Migrate the legacy smoking_log.json into SQLite once. The JSON file is never used as the active source of truth after migration.
tools/SmokeCounterTool.py:85
WHAT IT DOES

Migrate the legacy smoking_log.json into SQLite once. The JSON file is never used as the active source of truth after migration.

SIGNATURE
migrate_json_once() -> None
PARAMETERS
No parameters documented.
RETURNS None
SOURCE tools/SmokeCounterTool.py:85
log_smoke
Log a smoking session into SQLite. Cigarettes: 1 cigarette = 0.5 units Other types: amount = units directly
tools/SmokeCounterTool.py:173
WHAT IT DOES

Log a smoking session into SQLite. Cigarettes: 1 cigarette = 0.5 units Other types: amount = units directly

SIGNATURE
log_smoke(smoke_type: str, amount: float = 1) -> Dict[str, Any]
PARAMETERS
smoke_type
str
amount
float
= 1
RETURNS Dict[str, Any]
SOURCE tools/SmokeCounterTool.py:173
normalize_smoke_type
Normalize common aliases to canonical smoke types.
tools/SmokeCounterTool.py:278
WHAT IT DOES

Normalize common aliases to canonical smoke types.

SIGNATURE
normalize_smoke_type(value: Optional[str]) -> Optional[str]
PARAMETERS
value
Optional[str]
RETURNS Optional[str]
SOURCE tools/SmokeCounterTool.py:278
get_stats
Return smoking statistics directly from SQLite.
tools/SmokeCounterTool.py:310
WHAT IT DOES

Return smoking statistics directly from SQLite.

SIGNATURE
get_stats(smoke_type: Optional[str] = None, scope: str = 'all') -> Dict[str, Any]
PARAMETERS
smoke_type
Optional[str]
= None
scope
str
= 'all'
RETURNS Dict[str, Any]
SOURCE tools/SmokeCounterTool.py:310
get_recent
Return the most recent smoking sessions from SQLite.
tools/SmokeCounterTool.py:443
WHAT IT DOES

Return the most recent smoking sessions from SQLite.

SIGNATURE
get_recent(limit: int = 10) -> Dict[str, Any]
PARAMETERS
limit
int
= 10
RETURNS Dict[str, Any]
SOURCE tools/SmokeCounterTool.py:443
get_last
Return the most recently logged session.
tools/SmokeCounterTool.py:488
WHAT IT DOES

Return the most recently logged session.

SIGNATURE
get_last() -> Dict[str, Any]
PARAMETERS
No parameters documented.
RETURNS Dict[str, Any]
SOURCE tools/SmokeCounterTool.py:488
reset_stats
Completely reset the smoking tracker. This deletes all rows from the SQLite smoke-session table.
tools/SmokeCounterTool.py:525
WHAT IT DOES

Completely reset the smoking tracker. This deletes all rows from the SQLite smoke-session table.

SIGNATURE
reset_stats() -> Dict[str, Any]
PARAMETERS
No parameters documented.
RETURNS Dict[str, Any]
SOURCE tools/SmokeCounterTool.py:525
repair_aggregates
Return current database-derived statistics. Kept for compatibility with the old API. SQLite is already the source of truth, so no…
tools/SmokeCounterTool.py:556
WHAT IT DOES

Return current database-derived statistics. Kept for compatibility with the old API. SQLite is already the source of truth, so no aggregate repair is necessary.

SIGNATURE
repair_aggregates() -> Dict[str, Any]
PARAMETERS
No parameters documented.
RETURNS Dict[str, Any]
SOURCE tools/SmokeCounterTool.py:556
smoke_counter_call
Convenience function for CYN's tool registry.
tools/SmokeCounterTool.py:716
WHAT IT DOES

Convenience function for CYN's tool registry.

SIGNATURE
smoke_counter_call(action: str = 'stats', smoke_type: Optional[str] = None, amount: float = 1, limit: int = 10, scope: str = 'all') -> Dict[str, Any]
PARAMETERS
action
str
= 'stats'
smoke_type
Optional[str]
= None
amount
float
= 1
limit
int
= 10
scope
str
= 'all'
RETURNS Dict[str, Any]
SOURCE tools/SmokeCounterTool.py:716
repair_aggregates
Force-recompute and persist aggregate fields from sessions without changing sessions. Returns the reconciled data dict.
tools/SmokeCounterTool.py:741
WHAT IT DOES

Force-recompute and persist aggregate fields from sessions without changing sessions. Returns the reconciled data dict.

SIGNATURE
repair_aggregates() -> Dict[str, Any]
PARAMETERS
No parameters documented.
RETURNS Dict[str, Any]
SOURCE tools/SmokeCounterTool.py:741
tools/web_search.py
11 symbols
contains_any
No description documented yet.
tools/web_search.py:424
WHAT IT DOES

No description documented yet.

SIGNATURE
contains_any(text: str, words: Iterable[str]) -> bool
PARAMETERS
text
str
words
Iterable[str]
RETURNS bool
SOURCE tools/web_search.py:424
dedupe_terms
No description documented yet.
tools/web_search.py:435
WHAT IT DOES

No description documented yet.

SIGNATURE
dedupe_terms(*groups: Iterable[str]) -> list[str]
PARAMETERS
*groups
Iterable[str]
RETURNS list[str]
SOURCE tools/web_search.py:435
extract_query_tokens
No description documented yet.
tools/web_search.py:456
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_query_tokens(query: str) -> tuple[str, ...]
PARAMETERS
query
str
RETURNS tuple[str, ...]
SOURCE tools/web_search.py:456
normalize_domain
No description documented yet.
tools/web_search.py:473
WHAT IT DOES

No description documented yet.

SIGNATURE
normalize_domain(href: str) -> str
PARAMETERS
href
str
RETURNS str
SOURCE tools/web_search.py:473
detect_research_intent
No description documented yet.
tools/web_search.py:504
WHAT IT DOES

No description documented yet.

SIGNATURE
detect_research_intent(query: str) -> bool
PARAMETERS
query
str
RETURNS bool
SOURCE tools/web_search.py:504
detect_output_type
No description documented yet.
tools/web_search.py:531
WHAT IT DOES

No description documented yet.

SIGNATURE
detect_output_type(query: str) -> OutputMode
PARAMETERS
query
str
RETURNS OutputMode
SOURCE tools/web_search.py:531
build_intent
No description documented yet.
tools/web_search.py:553
WHAT IT DOES

No description documented yet.

SIGNATURE
build_intent(query: str) -> SearchIntent
PARAMETERS
query
str
RETURNS SearchIntent
SOURCE tools/web_search.py:553
build_search_query
No description documented yet.
tools/web_search.py:817
WHAT IT DOES

No description documented yet.

SIGNATURE
build_search_query(intent: SearchIntent) -> str
PARAMETERS
intent
SearchIntent
RETURNS str
SOURCE tools/web_search.py:817
classify_source
No description documented yet.
tools/web_search.py:1149
WHAT IT DOES

No description documented yet.

SIGNATURE
classify_source(href: str) -> str
PARAMETERS
href
str
RETURNS str
SOURCE tools/web_search.py:1149
fetch_page_text
Fetch the actual webpage and extract readable text. This is intentionally lightweight. Search snippets remain the fallback when a…
tools/web_search.py:1184
WHAT IT DOES

Fetch the actual webpage and extract readable text. This is intentionally lightweight. Search snippets remain the fallback when a page cannot be retrieved.

SIGNATURE
fetch_page_text(href: str, max_chars: int = 8000) -> str
PARAMETERS
href
str
max_chars
int
= 8000
RETURNS str
SOURCE tools/web_search.py:1184
extract_relevant_evidence
Pulls passages that appear relevant to the query. This is deliberately conservative. It does not invent summaries; it returns sou…
tools/web_search.py:1314
WHAT IT DOES

Pulls passages that appear relevant to the query. This is deliberately conservative. It does not invent summaries; it returns source text surrounding matching terms.

SIGNATURE
extract_relevant_evidence(text: str, query: str, max_chars: int = 3500) -> str
PARAMETERS
text
str
query
str
max_chars
int
= 3500
RETURNS str
SOURCE tools/web_search.py:1314
ai/chat_engine.py · ChatEngine
6 symbols
__init__
No description documented yet.
ai/chat_engine.py:50
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, ollama_client, prompt_builder, memory_store, tool_router, mode_manager, memory_manager: Optional[MemoryManager] = None, memory_extractor: Optional[MemoryExtractor] = None, context_manager = None, logger_obj = None)
PARAMETERS
self
ollama_client
prompt_builder
memory_store
tool_router
mode_manager
memory_manager
Optional[MemoryManager]
= None
memory_extractor
Optional[MemoryExtractor]
= None
context_manager
= None
logger_obj
= None
RETURNS Not documented
SOURCE ai/chat_engine.py:50
trim_context
No description documented yet.
ai/chat_engine.py:98
WHAT IT DOES

No description documented yet.

SIGNATURE
trim_context(self, text: str, limit: int) -> str
PARAMETERS
self
text
str
limit
int
RETURNS str
SOURCE ai/chat_engine.py:98
_estimate_message_tokens
Roughly estimate tokens in an Ollama message. This is intentionally conservative. Actual tokenization is model-dependent, so the…
ai/chat_engine.py:116
WHAT IT DOES

Roughly estimate tokens in an Ollama message. This is intentionally conservative. Actual tokenization is model-dependent, so the final context budget keeps headroom.

SIGNATURE
_estimate_message_tokens(self, message) -> int
PARAMETERS
self
message
RETURNS int
SOURCE ai/chat_engine.py:116
_trim_ollama_messages
Prevent Ollama requests from exceeding the available context. Priority: 1. System prompt 2. Current user message 3. Tool results…
ai/chat_engine.py:149
WHAT IT DOES

Prevent Ollama requests from exceeding the available context. Priority: 1. System prompt 2. Current user message 3. Tool results required for the current response 4. Newest conversation history 5. Older conversation history The current user message is never intentionally removed.

SIGNATURE
_trim_ollama_messages(self, messages, max_tokens: int = OLLAMA_PROMPT_BUDGET)
PARAMETERS
self
messages
max_tokens
int
= OLLAMA_PROMPT_BUDGET
RETURNS Not documented
SOURCE ai/chat_engine.py:149
_ollama_tools
No description documented yet.
ai/chat_engine.py:471
WHAT IT DOES

No description documented yet.

SIGNATURE
_ollama_tools(self, user_text: str = '')
PARAMETERS
self
user_text
str
= ''
RETURNS Not documented
SOURCE ai/chat_engine.py:471
handle_user_message
Process a user message. Flow: 1. Retrieve relevant context 2. Build Cyn prompt 3. Detect tools 4. Execute tools 5. Generate respo…
ai/chat_engine.py:501
WHAT IT DOES

Process a user message. Flow: 1. Retrieve relevant context 2. Build Cyn prompt 3. Detect tools 4. Execute tools 5. Generate response 6. Extract memories 7. Save conversation info

SIGNATURE
handle_user_message(self, user_id: str, text: str, mode: str = 'normal', personality: str = 'normal', request_id: Optional[str] = None) -> str
PARAMETERS
self
user_id
str
text
str
mode
str
= 'normal'
personality
str
= 'normal'
request_id
Optional[str]
= None
RETURNS str
SOURCE ai/chat_engine.py:501
ai/context_manager.py · ContextManager
2 symbols
__init__
No description documented yet.
ai/context_manager.py:9
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, memory_store, knowledge_store)
PARAMETERS
self
memory_store
knowledge_store
RETURNS Not documented
SOURCE ai/context_manager.py:9
build_context
No description documented yet.
ai/context_manager.py:27
WHAT IT DOES

No description documented yet.

SIGNATURE
build_context(self, user_id, user_message)
PARAMETERS
self
user_id
user_message
RETURNS Not documented
SOURCE ai/context_manager.py:27
ai/knowledge/store.py · KnowledgeStore
4 symbols
__init__
No description documented yet.
ai/knowledge/store.py:7
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, conn)
PARAMETERS
self
conn
RETURNS Not documented
SOURCE ai/knowledge/store.py:7
add
No description documented yet.
ai/knowledge/store.py:20
WHAT IT DOES

No description documented yet.

SIGNATURE
add(self, content, title = '', category = 'general', importance = 5, tags = None)
PARAMETERS
self
content
title
= ''
category
= 'general'
importance
= 5
tags
= None
RETURNS Not documented
SOURCE ai/knowledge/store.py:20
search
No description documented yet.
ai/knowledge/store.py:68
WHAT IT DOES

No description documented yet.

SIGNATURE
search(self, query, limit = 5)
PARAMETERS
self
query
limit
= 5
RETURNS Not documented
SOURCE ai/knowledge/store.py:68
recent
No description documented yet.
ai/knowledge/store.py:156
WHAT IT DOES

No description documented yet.

SIGNATURE
recent(self, limit = 10)
PARAMETERS
self
limit
= 10
RETURNS Not documented
SOURCE ai/knowledge/store.py:156
ai/memory_system/extractor.py · MemoryExtractor
10 symbols
__init__
No description documented yet.
ai/memory_system/extractor.py:30
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, memory_store)
PARAMETERS
self
memory_store
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:30
extract_and_save
No description documented yet.
ai/memory_system/extractor.py:49
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_and_save(self, user_id: str, user_message: str, assistant_response: str = '') -> List[int]
PARAMETERS
self
user_id
str
user_message
str
assistant_response
str
= ''
RETURNS List[int]
SOURCE ai/memory_system/extractor.py:49
extract_preferences
No description documented yet.
ai/memory_system/extractor.py:292
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_preferences(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:292
extract_goals
No description documented yet.
ai/memory_system/extractor.py:328
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_goals(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:328
extract_projects
No description documented yet.
ai/memory_system/extractor.py:365
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_projects(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:365
extract_names
No description documented yet.
ai/memory_system/extractor.py:402
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_names(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:402
extract_style
No description documented yet.
ai/memory_system/extractor.py:442
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_style(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:442
match_patterns
No description documented yet.
ai/memory_system/extractor.py:488
WHAT IT DOES

No description documented yet.

SIGNATURE
match_patterns(self, patterns, text, prefix)
PARAMETERS
self
patterns
text
prefix
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:488
meaningful
No description documented yet.
ai/memory_system/extractor.py:548
WHAT IT DOES

No description documented yet.

SIGNATURE
meaningful(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:548
should_save
No description documented yet.
ai/memory_system/extractor.py:577
WHAT IT DOES

No description documented yet.

SIGNATURE
should_save(self, content)
PARAMETERS
self
content
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:577
ai/memory_system/manager.py · MemoryManager
9 symbols
__init__
No description documented yet.
ai/memory_system/manager.py:24
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, conn)
PARAMETERS
self
conn
RETURNS Not documented
SOURCE ai/memory_system/manager.py:24
remember
No description documented yet.
ai/memory_system/manager.py:62
WHAT IT DOES

No description documented yet.

SIGNATURE
remember(self, user_id, content, category = 'general', importance = 5)
PARAMETERS
self
user_id
content
category
= 'general'
importance
= 5
RETURNS Not documented
SOURCE ai/memory_system/manager.py:62
recall
No description documented yet.
ai/memory_system/manager.py:160
WHAT IT DOES

No description documented yet.

SIGNATURE
recall(self, user_id, limit = 5, min_importance = 1, categories = None)
PARAMETERS
self
user_id
limit
= 5
min_importance
= 1
categories
= None
RETURNS Not documented
SOURCE ai/memory_system/manager.py:160
search
No description documented yet.
ai/memory_system/manager.py:265
WHAT IT DOES

No description documented yet.

SIGNATURE
search(self, user_id, query, limit = 5)
PARAMETERS
self
user_id
query
limit
= 5
RETURNS Not documented
SOURCE ai/memory_system/manager.py:265
get_all_memories
No description documented yet.
ai/memory_system/manager.py:368
WHAT IT DOES

No description documented yet.

SIGNATURE
get_all_memories(self, user_id)
PARAMETERS
self
user_id
RETURNS Not documented
SOURCE ai/memory_system/manager.py:368
recent
No description documented yet.
ai/memory_system/manager.py:424
WHAT IT DOES

No description documented yet.

SIGNATURE
recent(self, limit = 10)
PARAMETERS
self
limit
= 10
RETURNS Not documented
SOURCE ai/memory_system/manager.py:424
delete_memory
No description documented yet.
ai/memory_system/manager.py:472
WHAT IT DOES

No description documented yet.

SIGNATURE
delete_memory(self, memory_id)
PARAMETERS
self
memory_id
RETURNS Not documented
SOURCE ai/memory_system/manager.py:472
update_memory
No description documented yet.
ai/memory_system/manager.py:522
WHAT IT DOES

No description documented yet.

SIGNATURE
update_memory(self, memory_id, importance = None, content = None)
PARAMETERS
self
memory_id
importance
= None
content
= None
RETURNS Not documented
SOURCE ai/memory_system/manager.py:522
format_for_prompt
No description documented yet.
ai/memory_system/manager.py:598
WHAT IT DOES

No description documented yet.

SIGNATURE
format_for_prompt(self, memories)
PARAMETERS
self
memories
RETURNS Not documented
SOURCE ai/memory_system/manager.py:598
ai/mode_manager.py · ModeSpec
1 symbols
__init__
No description documented yet.
ai/mode_manager.py:9
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, name: str, allowed_tools: List[str] = None, instruction_fragment: str = '')
PARAMETERS
self
name
str
allowed_tools
List[str]
= None
instruction_fragment
str
= ''
RETURNS Not documented
SOURCE ai/mode_manager.py:9
ai/mode_manager.py · ModeManager
4 symbols
__init__
No description documented yet.
ai/mode_manager.py:21
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE ai/mode_manager.py:21
_init_default_modes
No description documented yet.
ai/mode_manager.py:25
WHAT IT DOES

No description documented yet.

SIGNATURE
_init_default_modes(self)
PARAMETERS
self
RETURNS Not documented
SOURCE ai/mode_manager.py:25
get_mode
No description documented yet.
ai/mode_manager.py:100
WHAT IT DOES

No description documented yet.

SIGNATURE
get_mode(self, name: str) -> ModeSpec
PARAMETERS
self
name
str
RETURNS ModeSpec
SOURCE ai/mode_manager.py:100
allowed_tools_for
No description documented yet.
ai/mode_manager.py:106
WHAT IT DOES

No description documented yet.

SIGNATURE
allowed_tools_for(self, name: str)
PARAMETERS
self
name
str
RETURNS Not documented
SOURCE ai/mode_manager.py:106
ai/ollama_client.py · OllamaClient
4 symbols
__init__
No description documented yet.
ai/ollama_client.py:20
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, base_url: str = 'http://localhost:11434', model: str = 'cyn-x:latest', timeout: int = 600)
PARAMETERS
self
base_url
str
= 'http://localhost:11434'
model
str
= 'cyn-x:latest'
timeout
int
= 600
RETURNS Not documented
SOURCE ai/ollama_client.py:20
generate
No description documented yet.
ai/ollama_client.py:30
WHAT IT DOES

No description documented yet.

SIGNATURE
generate(self, prompt: str, max_tokens: int = 512, stream: bool = False, **kwargs) -> Dict[str, Any]
PARAMETERS
self
prompt
str
max_tokens
int
= 512
stream
bool
= False
**kwargs
RETURNS Dict[str, Any]
SOURCE ai/ollama_client.py:30
chat
Call Ollama's chat endpoint with optional tools.
ai/ollama_client.py:102
WHAT IT DOES

Call Ollama's chat endpoint with optional tools.

SIGNATURE
chat(self, messages: List[Dict[str, Any]], tools: Optional[List[Dict[str, Any]]] = None, stream: bool = False, **kwargs) -> Dict[str, Any]
PARAMETERS
self
messages
List[Dict[str, Any]]
tools
Optional[List[Dict[str, Any]]]
= None
stream
bool
= False
**kwargs
RETURNS Dict[str, Any]
SOURCE ai/ollama_client.py:102
generate_stream
No description documented yet.
ai/ollama_client.py:304
WHAT IT DOES

No description documented yet.

SIGNATURE
generate_stream(self, prompt: str, max_tokens: int = 512, **kwargs) -> Generator[str, None, None]
PARAMETERS
self
prompt
str
max_tokens
int
= 512
**kwargs
RETURNS Generator[str, None, None]
SOURCE ai/ollama_client.py:304
ai/prompt_builder.py · PromptBuilder
12 symbols
__init__
No description documented yet.
ai/prompt_builder.py:226
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, templates_dir: Optional[str] = None)
PARAMETERS
self
templates_dir
Optional[str]
= None
RETURNS Not documented
SOURCE ai/prompt_builder.py:226
normalize_prompt_layers
No description documented yet.
ai/prompt_builder.py:244
WHAT IT DOES

No description documented yet.

SIGNATURE
normalize_prompt_layers(self, prompt_layers: Optional[Dict[str, bool]] = None) -> Dict[str, bool]
PARAMETERS
self
prompt_layers
Optional[Dict[str, bool]]
= None
RETURNS Dict[str, bool]
SOURCE ai/prompt_builder.py:244
set_prompt_layers
No description documented yet.
ai/prompt_builder.py:266
WHAT IT DOES

No description documented yet.

SIGNATURE
set_prompt_layers(self, prompt_layers: Optional[Dict[str, bool]] = None) -> Dict[str, bool]
PARAMETERS
self
prompt_layers
Optional[Dict[str, bool]]
= None
RETURNS Dict[str, bool]
SOURCE ai/prompt_builder.py:266
get_prompt_layers
No description documented yet.
ai/prompt_builder.py:282
WHAT IT DOES

No description documented yet.

SIGNATURE
get_prompt_layers(self) -> Dict[str, bool]
PARAMETERS
self
RETURNS Dict[str, bool]
SOURCE ai/prompt_builder.py:282
apply_prompt_preset
No description documented yet.
ai/prompt_builder.py:291
WHAT IT DOES

No description documented yet.

SIGNATURE
apply_prompt_preset(self, preset: str) -> Dict[str, bool]
PARAMETERS
self
preset
str
RETURNS Dict[str, bool]
SOURCE ai/prompt_builder.py:291
trim_context
No description documented yet.
ai/prompt_builder.py:311
WHAT IT DOES

No description documented yet.

SIGNATURE
trim_context(self, text: str, limit: int) -> str
PARAMETERS
self
text
str
limit
int
RETURNS str
SOURCE ai/prompt_builder.py:311
should_include_context
No description documented yet.
ai/prompt_builder.py:339
WHAT IT DOES

No description documented yet.

SIGNATURE
should_include_context(self, text: str) -> bool
PARAMETERS
self
text
str
RETURNS bool
SOURCE ai/prompt_builder.py:339
score_context
No description documented yet.
ai/prompt_builder.py:360
WHAT IT DOES

No description documented yet.

SIGNATURE
score_context(self, chunk: str, query: str) -> int
PARAMETERS
self
chunk
str
query
str
RETURNS int
SOURCE ai/prompt_builder.py:360
select_context
No description documented yet.
ai/prompt_builder.py:397
WHAT IT DOES

No description documented yet.

SIGNATURE
select_context(self, chunks: List[str], query: str, limit: int) -> str
PARAMETERS
self
chunks
List[str]
query
str
limit
int
RETURNS str
SOURCE ai/prompt_builder.py:397
build_system_prompt
No description documented yet.
ai/prompt_builder.py:472
WHAT IT DOES

No description documented yet.

SIGNATURE
build_system_prompt(self, modes: Optional[List[str]] = None, memory: str = '', context: str = '', prompt_layers: Optional[Dict[str, bool]] = None) -> str
PARAMETERS
self
modes
Optional[List[str]]
= None
memory
str
= ''
context
str
= ''
prompt_layers
Optional[Dict[str, bool]]
= None
RETURNS str
SOURCE ai/prompt_builder.py:472
budget_context
No description documented yet.
ai/prompt_builder.py:551
WHAT IT DOES

No description documented yet.

SIGNATURE
budget_context(self, sections: List[Dict[str, Any]]) -> List[str]
PARAMETERS
self
sections
List[Dict[str, Any]]
RETURNS List[str]
SOURCE ai/prompt_builder.py:551
build_prompt
No description documented yet.
ai/prompt_builder.py:688
WHAT IT DOES

No description documented yet.

SIGNATURE
build_prompt(self, user_input: str, mode_fragment: str = '', personality_fragment: str = '', history: Optional[List[dict]] = None, memory_summary: str = '', knowledge_context: str = '', tools_spec: str = '', intent: str = '', conversation_summary: str = '', prompt_layers: Optional[Dict[str, bool]] = None) -> str
PARAMETERS
self
user_input
str
mode_fragment
str
= ''
personality_fragment
str
= ''
history
Optional[List[dict]]
= None
memory_summary
str
= ''
knowledge_context
str
= ''
tools_spec
str
= ''
intent
str
= ''
conversation_summary
str
= ''
prompt_layers
Optional[Dict[str, bool]]
= None
RETURNS str
SOURCE ai/prompt_builder.py:688
ai/prompt_manager.py · PromptManager
10 symbols
__init__
No description documented yet.
ai/prompt_manager.py:97
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, prompts_dir: Optional[str] = None)
PARAMETERS
self
prompts_dir
Optional[str]
= None
RETURNS Not documented
SOURCE ai/prompt_manager.py:97
normalize_prompt_layers
No description documented yet.
ai/prompt_manager.py:151
WHAT IT DOES

No description documented yet.

SIGNATURE
normalize_prompt_layers(self, enabled_layers = None)
PARAMETERS
self
enabled_layers
= None
RETURNS Not documented
SOURCE ai/prompt_manager.py:151
_load_file
No description documented yet.
ai/prompt_manager.py:182
WHAT IT DOES

No description documented yet.

SIGNATURE
_load_file(self, path: Path)
PARAMETERS
self
path
Path
RETURNS Not documented
SOURCE ai/prompt_manager.py:182
trim_text
No description documented yet.
ai/prompt_manager.py:220
WHAT IT DOES

No description documented yet.

SIGNATURE
trim_text(self, text, limit)
PARAMETERS
self
text
limit
RETURNS Not documented
SOURCE ai/prompt_manager.py:220
load_core_prompts
No description documented yet.
ai/prompt_manager.py:254
WHAT IT DOES

No description documented yet.

SIGNATURE
load_core_prompts(self)
PARAMETERS
self
RETURNS Not documented
SOURCE ai/prompt_manager.py:254
load_personality_matrix
No description documented yet.
ai/prompt_manager.py:364
WHAT IT DOES

No description documented yet.

SIGNATURE
load_personality_matrix(self)
PARAMETERS
self
RETURNS Not documented
SOURCE ai/prompt_manager.py:364
load_optional
No description documented yet.
ai/prompt_manager.py:408
WHAT IT DOES

No description documented yet.

SIGNATURE
load_optional(self, name)
PARAMETERS
self
name
RETURNS Not documented
SOURCE ai/prompt_manager.py:408
load_option
No description documented yet.
ai/prompt_manager.py:441
WHAT IT DOES

No description documented yet.

SIGNATURE
load_option(self, name)
PARAMETERS
self
name
RETURNS Not documented
SOURCE ai/prompt_manager.py:441
load_mode
No description documented yet.
ai/prompt_manager.py:474
WHAT IT DOES

No description documented yet.

SIGNATURE
load_mode(self, mode_name)
PARAMETERS
self
mode_name
RETURNS Not documented
SOURCE ai/prompt_manager.py:474
build_system_prompt
No description documented yet.
ai/prompt_manager.py:519
WHAT IT DOES

No description documented yet.

SIGNATURE
build_system_prompt(self, active_modes = None, active_options = None, memory_summary = '', additional_context = '', include_safety = True, enabled_layers = None)
PARAMETERS
self
active_modes
= None
active_options
= None
memory_summary
= ''
additional_context
= ''
include_safety
= True
enabled_layers
= None
RETURNS Not documented
SOURCE ai/prompt_manager.py:519
ai/terminal_ui/renderer.py · CYNXTerminal
22 symbols
__init__
No description documented yet.
ai/terminal_ui/renderer.py:31
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:31
_print_label
No description documented yet.
ai/terminal_ui/renderer.py:40
WHAT IT DOES

No description documented yet.

SIGNATURE
_print_label(self, label, value = None, style, value_style = 'white')
PARAMETERS
self
label
value
= None
style
value_style
= 'white'
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:40
section
No description documented yet.
ai/terminal_ui/renderer.py:48
WHAT IT DOES

No description documented yet.

SIGNATURE
section(self, title)
PARAMETERS
self
title
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:48
info
No description documented yet.
ai/terminal_ui/renderer.py:51
WHAT IT DOES

No description documented yet.

SIGNATURE
info(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:51
memory
No description documented yet.
ai/terminal_ui/renderer.py:54
WHAT IT DOES

No description documented yet.

SIGNATURE
memory(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:54
warning
No description documented yet.
ai/terminal_ui/renderer.py:57
WHAT IT DOES

No description documented yet.

SIGNATURE
warning(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:57
error
No description documented yet.
ai/terminal_ui/renderer.py:60
WHAT IT DOES

No description documented yet.

SIGNATURE
error(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:60
dim
No description documented yet.
ai/terminal_ui/renderer.py:63
WHAT IT DOES

No description documented yet.

SIGNATURE
dim(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:63
user
No description documented yet.
ai/terminal_ui/renderer.py:66
WHAT IT DOES

No description documented yet.

SIGNATURE
user(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:66
ollama
No description documented yet.
ai/terminal_ui/renderer.py:69
WHAT IT DOES

No description documented yet.

SIGNATURE
ollama(self, label = 'OLLAMA CALL', value = None)
PARAMETERS
self
label
= 'OLLAMA CALL'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:69
model
No description documented yet.
ai/terminal_ui/renderer.py:72
WHAT IT DOES

No description documented yet.

SIGNATURE
model(self, label = 'MODEL RESPONSE', value = None)
PARAMETERS
self
label
= 'MODEL RESPONSE'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:72
tool
No description documented yet.
ai/terminal_ui/renderer.py:75
WHAT IT DOES

No description documented yet.

SIGNATURE
tool(self, label = 'TOOL CALL', value = None)
PARAMETERS
self
label
= 'TOOL CALL'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:75
tool_args
No description documented yet.
ai/terminal_ui/renderer.py:78
WHAT IT DOES

No description documented yet.

SIGNATURE
tool_args(self, label = 'TOOL ARGUMENTS', value = None)
PARAMETERS
self
label
= 'TOOL ARGUMENTS'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:78
execute
No description documented yet.
ai/terminal_ui/renderer.py:81
WHAT IT DOES

No description documented yet.

SIGNATURE
execute(self, label = 'EXECUTING TOOL', value = None)
PARAMETERS
self
label
= 'EXECUTING TOOL'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:81
result
No description documented yet.
ai/terminal_ui/renderer.py:84
WHAT IT DOES

No description documented yet.

SIGNATURE
result(self, label = 'TOOL RESULT', value = None)
PARAMETERS
self
label
= 'TOOL RESULT'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:84
prompt
No description documented yet.
ai/terminal_ui/renderer.py:87
WHAT IT DOES

No description documented yet.

SIGNATURE
prompt(self, label = 'PROMPT SECTION', value = None)
PARAMETERS
self
label
= 'PROMPT SECTION'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:87
final_prompt
No description documented yet.
ai/terminal_ui/renderer.py:90
WHAT IT DOES

No description documented yet.

SIGNATURE
final_prompt(self, label = 'FINAL SYSTEM PROMPT', value = None)
PARAMETERS
self
label
= 'FINAL SYSTEM PROMPT'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:90
available_tools
No description documented yet.
ai/terminal_ui/renderer.py:93
WHAT IT DOES

No description documented yet.

SIGNATURE
available_tools(self, tools)
PARAMETERS
self
tools
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:93
json
No description documented yet.
ai/terminal_ui/renderer.py:96
WHAT IT DOES

No description documented yet.

SIGNATURE
json(self, payload)
PARAMETERS
self
payload
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:96
timing
No description documented yet.
ai/terminal_ui/renderer.py:102
WHAT IT DOES

No description documented yet.

SIGNATURE
timing(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:102
memory_error
No description documented yet.
ai/terminal_ui/renderer.py:105
WHAT IT DOES

No description documented yet.

SIGNATURE
memory_error(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:105
blank
No description documented yet.
ai/terminal_ui/renderer.py:108
WHAT IT DOES

No description documented yet.

SIGNATURE
blank(self)
PARAMETERS
self
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:108
barkly_docs.py · FunctionInfo
2 symbols
qualified_name
No description documented yet.
barkly_docs.py:146
WHAT IT DOES

No description documented yet.

SIGNATURE
qualified_name(self) -> str
PARAMETERS
self
RETURNS str
SOURCE barkly_docs.py:146
DECORATORS
property
signature
No description documented yet.
barkly_docs.py:152
WHAT IT DOES

No description documented yet.

SIGNATURE
signature(self) -> str
PARAMETERS
self
RETURNS str
SOURCE barkly_docs.py:152
DECORATORS
property
barkly_docs.py · EndpointInfo
1 symbols
method_text
No description documented yet.
barkly_docs.py:202
WHAT IT DOES

No description documented yet.

SIGNATURE
method_text(self) -> str
PARAMETERS
self
RETURNS str
SOURCE barkly_docs.py:202
DECORATORS
property
barkly_docs.py · PythonScanner
7 symbols
__init__
No description documented yet.
barkly_docs.py:592
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, root: Path)
PARAMETERS
self
root
Path
RETURNS Not documented
SOURCE barkly_docs.py:592
scan
No description documented yet.
barkly_docs.py:600
WHAT IT DOES

No description documented yet.

SIGNATURE
scan(self) -> None
PARAMETERS
self
RETURNS None
SOURCE barkly_docs.py:600
scan_file
No description documented yet.
barkly_docs.py:607
WHAT IT DOES

No description documented yet.

SIGNATURE
scan_file(self, path: Path) -> None
PARAMETERS
self
path
Path
RETURNS None
SOURCE barkly_docs.py:607
function_node_for_class_method
No description documented yet.
barkly_docs.py:665
WHAT IT DOES

No description documented yet.

SIGNATURE
function_node_for_class_method(self, class_node: ast.ClassDef, method_name: str) -> Optional[ast.FunctionDef | ast.AsyncFunctionDef]
PARAMETERS
self
class_node
ast.ClassDef
method_name
str
RETURNS Optional[ast.FunctionDef | ast.AsyncFunctionDef]
SOURCE barkly_docs.py:665
make_function
No description documented yet.
barkly_docs.py:680
WHAT IT DOES

No description documented yet.

SIGNATURE
make_function(self, node: ast.FunctionDef | ast.AsyncFunctionDef, file: str, class_name: str = '') -> FunctionInfo
PARAMETERS
self
node
ast.FunctionDef | ast.AsyncFunctionDef
file
str
class_name
str
= ''
RETURNS FunctionInfo
SOURCE barkly_docs.py:680
make_class
No description documented yet.
barkly_docs.py:699
WHAT IT DOES

No description documented yet.

SIGNATURE
make_class(self, node: ast.ClassDef, file: str) -> ClassInfo
PARAMETERS
self
node
ast.ClassDef
file
str
RETURNS ClassInfo
SOURCE barkly_docs.py:699
find_endpoints
No description documented yet.
barkly_docs.py:729
WHAT IT DOES

No description documented yet.

SIGNATURE
find_endpoints(self, node: Optional[ast.FunctionDef | ast.AsyncFunctionDef], file: str) -> None
PARAMETERS
self
node
Optional[ast.FunctionDef | ast.AsyncFunctionDef]
file
str
RETURNS None
SOURCE barkly_docs.py:729
benchmark/cleaner.py · BenchmarkCleaner
8 symbols
__init__
No description documented yet.
benchmark/cleaner.py:99
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, execute: bool = False, remove_temp: bool = False)
PARAMETERS
self
execute
bool
= False
remove_temp
bool
= False
RETURNS Not documented
SOURCE benchmark/cleaner.py:99
show_delete
No description documented yet.
benchmark/cleaner.py:116
WHAT IT DOES

No description documented yet.

SIGNATURE
show_delete(self, path: Path)
PARAMETERS
self
path
Path
RETURNS Not documented
SOURCE benchmark/cleaner.py:116
is_protected
No description documented yet.
benchmark/cleaner.py:150
WHAT IT DOES

No description documented yet.

SIGNATURE
is_protected(self, path: Path) -> bool
PARAMETERS
self
path
Path
RETURNS bool
SOURCE benchmark/cleaner.py:150
clean_results
No description documented yet.
benchmark/cleaner.py:210
WHAT IT DOES

No description documented yet.

SIGNATURE
clean_results(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/cleaner.py:210
clean_temp_files
No description documented yet.
benchmark/cleaner.py:255
WHAT IT DOES

No description documented yet.

SIGNATURE
clean_temp_files(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/cleaner.py:255
clean_empty_directories
No description documented yet.
benchmark/cleaner.py:304
WHAT IT DOES

No description documented yet.

SIGNATURE
clean_empty_directories(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/cleaner.py:304
print_protected_info
No description documented yet.
benchmark/cleaner.py:361
WHAT IT DOES

No description documented yet.

SIGNATURE
print_protected_info(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/cleaner.py:361
summary
No description documented yet.
benchmark/cleaner.py:393
WHAT IT DOES

No description documented yet.

SIGNATURE
summary(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/cleaner.py:393
benchmark/runner.py · BenchmarkStorage
5 symbols
__init__
No description documented yet.
benchmark/runner.py:754
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/runner.py:754
save_test
No description documented yet.
benchmark/runner.py:775
WHAT IT DOES

No description documented yet.

SIGNATURE
save_test(self, result)
PARAMETERS
self
result
RETURNS Not documented
SOURCE benchmark/runner.py:775
add
No description documented yet.
benchmark/runner.py:950
WHAT IT DOES

No description documented yet.

SIGNATURE
add(self, result)
PARAMETERS
self
result
RETURNS Not documented
SOURCE benchmark/runner.py:950
save_raw
No description documented yet.
benchmark/runner.py:967
WHAT IT DOES

No description documented yet.

SIGNATURE
save_raw(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/runner.py:967
save_summary
No description documented yet.
benchmark/runner.py:1034
WHAT IT DOES

No description documented yet.

SIGNATURE
save_summary(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/runner.py:1034
hardware/lepro/config.py · LeproConfig
6 symbols
__init__
No description documented yet.
hardware/lepro/config.py:11
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, path: Path) -> None
PARAMETERS
self
path
Path
RETURNS None
SOURCE hardware/lepro/config.py:11
load
No description documented yet.
hardware/lepro/config.py:14
WHAT IT DOES

No description documented yet.

SIGNATURE
load(self) -> dict[str, Any]
PARAMETERS
self
RETURNS dict[str, Any]
SOURCE hardware/lepro/config.py:14
save
No description documented yet.
hardware/lepro/config.py:31
WHAT IT DOES

No description documented yet.

SIGNATURE
save(self, data: dict[str, Any]) -> None
PARAMETERS
self
data
dict[str, Any]
RETURNS None
SOURCE hardware/lepro/config.py:31
add_device
No description documented yet.
hardware/lepro/config.py:42
WHAT IT DOES

No description documented yet.

SIGNATURE
add_device(self, name: str, mac: str, device_type: str = 'lepro', discovered_name: str | None = None) -> dict[str, Any]
PARAMETERS
self
name
str
mac
str
device_type
str
= 'lepro'
discovered_name
str | None
= None
RETURNS dict[str, Any]
SOURCE hardware/lepro/config.py:42
get_device
No description documented yet.
hardware/lepro/config.py:68
WHAT IT DOES

No description documented yet.

SIGNATURE
get_device(self, name: str) -> dict[str, Any] | None
PARAMETERS
self
name
str
RETURNS dict[str, Any] | None
SOURCE hardware/lepro/config.py:68
list_devices
No description documented yet.
hardware/lepro/config.py:75
WHAT IT DOES

No description documented yet.

SIGNATURE
list_devices(self) -> list[dict[str, Any]]
PARAMETERS
self
RETURNS list[dict[str, Any]]
SOURCE hardware/lepro/config.py:75
hardware/lepro/devices.py · LeproDevice
11 symbols
__init__
No description documented yet.
hardware/lepro/devices.py:29
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, name: str, mac: str)
PARAMETERS
self
name
str
mac
str
RETURNS Not documented
SOURCE hardware/lepro/devices.py:29
has_credentials
Return True if this device has been bonded.
hardware/lepro/devices.py:37
WHAT IT DOES

Return True if this device has been bonded.

SIGNATURE
has_credentials(self) -> bool
PARAMETERS
self
RETURNS bool
SOURCE hardware/lepro/devices.py:37
credential_path
Return the path where Lepro stores this device's credentials.
hardware/lepro/devices.py:41
WHAT IT DOES

Return the path where Lepro stores this device's credentials.

SIGNATURE
credential_path(self)
PARAMETERS
self
RETURNS Not documented
SOURCE hardware/lepro/devices.py:41
connect
Connect to the physical Lepro device.
hardware/lepro/devices.py:49
WHAT IT DOES

Connect to the physical Lepro device.

SIGNATURE
connect(self)
PARAMETERS
self
RETURNS Not documented
SOURCE hardware/lepro/devices.py:49
bond
Bond this device with CYN-X.
hardware/lepro/devices.py:57
WHAT IT DOES

Bond this device with CYN-X.

SIGNATURE
bond(self, force: bool = False) -> Any
PARAMETERS
self
force
bool
= False
RETURNS Any
SOURCE hardware/lepro/devices.py:57
_run_control
Send a datapoint control payload to the device.
hardware/lepro/devices.py:80
WHAT IT DOES

Send a datapoint control payload to the device.

SIGNATURE
_run_control(self, payload: dict[str, Any] | list[str]) -> Any
PARAMETERS
self
payload
dict[str, Any] | list[str]
RETURNS Any
SOURCE hardware/lepro/devices.py:80
turn_on
Turn the light on.
hardware/lepro/devices.py:114
WHAT IT DOES

Turn the light on.

SIGNATURE
turn_on(self, brightness: int = 1000) -> Any
PARAMETERS
self
brightness
int
= 1000
RETURNS Any
SOURCE hardware/lepro/devices.py:114
turn_off
Turn the light off.
hardware/lepro/devices.py:126
WHAT IT DOES

Turn the light off.

SIGNATURE
turn_off(self) -> Any
PARAMETERS
self
RETURNS Any
SOURCE hardware/lepro/devices.py:126
set_color_rgb
Set the light color using RGB values.
hardware/lepro/devices.py:137
WHAT IT DOES

Set the light color using RGB values.

SIGNATURE
set_color_rgb(self, red: int, green: int, blue: int, brightness: int = 1000) -> Any
PARAMETERS
self
red
int
green
int
blue
int
brightness
int
= 1000
RETURNS Any
SOURCE hardware/lepro/devices.py:137
set_color_hsv
Set the light color using HSV values.
hardware/lepro/devices.py:155
WHAT IT DOES

Set the light color using HSV values.

SIGNATURE
set_color_hsv(self, hue: float, saturation: int = 1000, value: int = 1000, brightness: int = 1000) -> Any
PARAMETERS
self
hue
float
saturation
int
= 1000
value
int
= 1000
brightness
int
= 1000
RETURNS Any
SOURCE hardware/lepro/devices.py:155
get_status
Query the current datapoint state of the light. This uses the upstream Lepro protocol directly without modifying the upstream lib…
hardware/lepro/devices.py:177
WHAT IT DOES

Query the current datapoint state of the light. This uses the upstream Lepro protocol directly without modifying the upstream library.

SIGNATURE
get_status(self) -> dict[str, Any]
PARAMETERS
self
RETURNS dict[str, Any]
SOURCE hardware/lepro/devices.py:177
hardware/lepro/discovery.py · LeproDiscovery
2 symbols
__init__
No description documented yet.
hardware/lepro/discovery.py:12
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, timeout: float = 15.0)
PARAMETERS
self
timeout
float
= 15.0
RETURNS Not documented
SOURCE hardware/lepro/discovery.py:12
scan
No description documented yet.
hardware/lepro/discovery.py:18
WHAT IT DOES

No description documented yet.

SIGNATURE
scan(self) -> list[dict[str, Any]]
PARAMETERS
self
RETURNS list[dict[str, Any]]
SOURCE hardware/lepro/discovery.py:18
hardware/lepro/lib/lepro/bond.py · BondTokens
3 symbols
validate
No description documented yet.
hardware/lepro/lib/lepro/bond.py:50
WHAT IT DOES

No description documented yet.

SIGNATURE
validate(self) -> None
PARAMETERS
self
RETURNS None
SOURCE hardware/lepro/lib/lepro/bond.py:50
to_dict
No description documented yet.
hardware/lepro/lib/lepro/bond.py:57
WHAT IT DOES

No description documented yet.

SIGNATURE
to_dict(self) -> dict[str, str]
PARAMETERS
self
RETURNS dict[str, str]
SOURCE hardware/lepro/lib/lepro/bond.py:57
from_dict
No description documented yet.
hardware/lepro/lib/lepro/bond.py:61
WHAT IT DOES

No description documented yet.

SIGNATURE
from_dict(cls, d: dict[str, str]) -> BondTokens
PARAMETERS
cls
d
dict[str, str]
RETURNS BondTokens
SOURCE hardware/lepro/lib/lepro/bond.py:61
DECORATORS
classmethod
hardware/lepro/lib/lepro/bond.py · BondCredentials
3 symbols
__post_init__
No description documented yet.
hardware/lepro/lib/lepro/bond.py:78
WHAT IT DOES

No description documented yet.

SIGNATURE
__post_init__(self) -> None
PARAMETERS
self
RETURNS None
SOURCE hardware/lepro/lib/lepro/bond.py:78
to_json_dict
No description documented yet.
hardware/lepro/lib/lepro/bond.py:83
WHAT IT DOES

No description documented yet.

SIGNATURE
to_json_dict(self) -> dict
PARAMETERS
self
RETURNS dict
SOURCE hardware/lepro/lib/lepro/bond.py:83
from_json_dict
No description documented yet.
hardware/lepro/lib/lepro/bond.py:92
WHAT IT DOES

No description documented yet.

SIGNATURE
from_json_dict(cls, d: dict) -> BondCredentials
PARAMETERS
cls
d
dict
RETURNS BondCredentials
SOURCE hardware/lepro/lib/lepro/bond.py:92
DECORATORS
classmethod
hardware/lepro/lib/lepro/firmware_profile.py · PatchProfiles
1 symbols
by_id
No description documented yet.
hardware/lepro/lib/lepro/firmware_profile.py:53
WHAT IT DOES

No description documented yet.

SIGNATURE
by_id(self, profile_id: str) -> FirmwareProfile
PARAMETERS
self
profile_id
str
RETURNS FirmwareProfile
SOURCE hardware/lepro/lib/lepro/firmware_profile.py:53
hardware/lepro/lib/lepro/frame.py · RxAssembler
8 symbols
__init__
No description documented yet.
hardware/lepro/lib/lepro/frame.py:76
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, mac: str, session_rand: int | None = None) -> None
PARAMETERS
self
mac
str
session_rand
int | None
= None
RETURNS None
SOURCE hardware/lepro/lib/lepro/frame.py:76
set_session_rand
Update key after 0x1000 hello reveals bleInit rand() in ctx1.
hardware/lepro/lib/lepro/frame.py:90
WHAT IT DOES

Update key after 0x1000 hello reveals bleInit rand() in ctx1.

SIGNATURE
set_session_rand(self, session_rand: int) -> None
PARAMETERS
self
session_rand
int
RETURNS None
SOURCE hardware/lepro/lib/lepro/frame.py:90
feed
No description documented yet.
hardware/lepro/lib/lepro/frame.py:95
WHAT IT DOES

No description documented yet.

SIGNATURE
feed(self, raw: bytes) -> list[DecryptedFrame]
PARAMETERS
self
raw
bytes
RETURNS list[DecryptedFrame]
SOURCE hardware/lepro/lib/lepro/frame.py:95
_reset_fragment
No description documented yet.
hardware/lepro/lib/lepro/frame.py:111
WHAT IT DOES

No description documented yet.

SIGNATURE
_reset_fragment(self) -> None
PARAMETERS
self
RETURNS None
SOURCE hardware/lepro/lib/lepro/frame.py:111
_feed_fragment
No description documented yet.
hardware/lepro/lib/lepro/frame.py:116
WHAT IT DOES

No description documented yet.

SIGNATURE
_feed_fragment(self, raw: bytes, magic2: int) -> list[DecryptedFrame]
PARAMETERS
self
raw
bytes
magic2
int
RETURNS list[DecryptedFrame]
SOURCE hardware/lepro/lib/lepro/frame.py:116
_dispatch_single
No description documented yet.
hardware/lepro/lib/lepro/frame.py:176
WHAT IT DOES

No description documented yet.

SIGNATURE
_dispatch_single(self, raw: bytes) -> list[DecryptedFrame]
PARAMETERS
self
raw
bytes
RETURNS list[DecryptedFrame]
SOURCE hardware/lepro/lib/lepro/frame.py:176
_maybe_decrypt
No description documented yet.
hardware/lepro/lib/lepro/frame.py:188
WHAT IT DOES

No description documented yet.

SIGNATURE
_maybe_decrypt(self, frame: DecryptedFrame) -> DecryptedFrame
PARAMETERS
self
frame
DecryptedFrame
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/frame.py:188
_synthetic_body
No description documented yet.
hardware/lepro/lib/lepro/frame.py:206
WHAT IT DOES

No description documented yet.

SIGNATURE
_synthetic_body(seq: int, magic2: int, ptype: int, subtype: int, payload: bytes) -> bytes
PARAMETERS
seq
int
magic2
int
ptype
int
subtype
int
payload
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/frame.py:206
DECORATORS
staticmethod
hardware/lepro/lib/lepro/ota.py · OtaTransferResult
2 symbols
finalize_code
No description documented yet.
hardware/lepro/lib/lepro/ota.py:113
WHAT IT DOES

No description documented yet.

SIGNATURE
finalize_code(self) -> int | None
PARAMETERS
self
RETURNS int | None
SOURCE hardware/lepro/lib/lepro/ota.py:113
DECORATORS
property
transfer_complete
No description documented yet.
hardware/lepro/lib/lepro/ota.py:117
WHAT IT DOES

No description documented yet.

SIGNATURE
transfer_complete(self) -> bool
PARAMETERS
self
RETURNS bool
SOURCE hardware/lepro/lib/lepro/ota.py:117
DECORATORS
property
hardware/lepro/lib/lepro/ota.py · OtaLog
3 symbols
info
No description documented yet.
hardware/lepro/lib/lepro/ota.py:138
WHAT IT DOES

No description documented yet.

SIGNATURE
info(self, msg: str) -> None
PARAMETERS
self
msg
str
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:138
phase
No description documented yet.
hardware/lepro/lib/lepro/ota.py:144
WHAT IT DOES

No description documented yet.

SIGNATURE
phase(self, name: str) -> None
PARAMETERS
self
name
str
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:144
wait
No description documented yet.
hardware/lepro/lib/lepro/ota.py:147
WHAT IT DOES

No description documented yet.

SIGNATURE
wait(self, msg: str, timeout: float) -> None
PARAMETERS
self
msg
str
timeout
float
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:147
hardware/lepro/lib/lepro/ota.py · OtaTransport
2 symbols
on_notify
No description documented yet.
hardware/lepro/lib/lepro/ota.py:159
WHAT IT DOES

No description documented yet.

SIGNATURE
on_notify(self, _sender: object, data: bytearray) -> None
PARAMETERS
self
_sender
object
data
bytearray
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:159
send
No description documented yet.
hardware/lepro/lib/lepro/ota.py:165
WHAT IT DOES

No description documented yet.

SIGNATURE
send(self, data: bytes, label: str = '') -> None
PARAMETERS
self
data
bytes
label
str
= ''
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:165
hardware/lepro/lib/lepro/ota.py · BleOtaSession
2 symbols
__init__
No description documented yet.
hardware/lepro/lib/lepro/ota.py:954
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, session: LeproSession, firmware: Path, image: bytes, log: OtaLog) -> None
PARAMETERS
self
session
LeproSession
firmware
Path
image
bytes
log
OtaLog
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:954
run
No description documented yet.
hardware/lepro/lib/lepro/ota.py:966
WHAT IT DOES

No description documented yet.

SIGNATURE
run(self, json_bytes: bytes, chunk_size: int = 4096, max_retries: int = 3, dry_run: bool = False) -> OtaTransferResult
PARAMETERS
self
json_bytes
bytes
chunk_size
int
= 4096
max_retries
int
= 3
dry_run
bool
= False
RETURNS OtaTransferResult
SOURCE hardware/lepro/lib/lepro/ota.py:966
hardware/lepro/lib/lepro/patch_cdn.py · BundleLayout
1 symbols
record_len
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:78
WHAT IT DOES

No description documented yet.

SIGNATURE
record_len(self) -> int
PARAMETERS
self
RETURNS int
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:78
DECORATORS
property
hardware/lepro/lib/lepro/session.py · DeviceInfo
3 symbols
prov_state
OTA/provisioning state-machine value (device-info byte[1] = ota_ctx+0x10).
hardware/lepro/lib/lepro/session.py:71
WHAT IT DOES

OTA/provisioning state-machine value (device-info byte[1] = ota_ctx+0x10).

SIGNATURE
prov_state(self) -> int | None
PARAMETERS
self
RETURNS int | None
SOURCE hardware/lepro/lib/lepro/session.py:71
DECORATORS
property
prov_slot
Retained provisioning flag (device-info byte[2], from ota_ctx slot 0x42000b3c). Verified in ZB1 v2.3.18 build_device_info_reply:…
hardware/lepro/lib/lepro/session.py:76
WHAT IT DOES

Retained provisioning flag (device-info byte[2], from ota_ctx slot 0x42000b3c). Verified in ZB1 v2.3.18 build_device_info_reply: 6 = addable/onboarding (slot unset or factory), 7 = provisioned. NOTE: a power-cycle reset re-enters onboarding via the reboot counter WITHOUT clearing this slot, so a 7 here does NOT prove the CDN cert fetch is disabled — it is only conclusive when 6.

SIGNATURE
prov_slot(self) -> int | None
PARAMETERS
self
RETURNS int | None
SOURCE hardware/lepro/lib/lepro/session.py:76
DECORATORS
property
provisioning_summary
One-line human-readable provisioning/cert-fetch status for CLI output.
hardware/lepro/lib/lepro/session.py:87
WHAT IT DOES

One-line human-readable provisioning/cert-fetch status for CLI output.

SIGNATURE
provisioning_summary(self) -> str
PARAMETERS
self
RETURNS str
SOURCE hardware/lepro/lib/lepro/session.py:87
hardware/lepro/lib/lepro/session.py · Transport
3 symbols
send
No description documented yet.
hardware/lepro/lib/lepro/session.py:105
WHAT IT DOES

No description documented yet.

SIGNATURE
send(self, data: bytes, label: str = '') -> None
PARAMETERS
self
data
bytes
label
str
= ''
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:105
recv
No description documented yet.
hardware/lepro/lib/lepro/session.py:106
WHAT IT DOES

No description documented yet.

SIGNATURE
recv(self, timeout: float) -> bytes | None
PARAMETERS
self
timeout
float
RETURNS bytes | None
SOURCE hardware/lepro/lib/lepro/session.py:106
drain
No description documented yet.
hardware/lepro/lib/lepro/session.py:107
WHAT IT DOES

No description documented yet.

SIGNATURE
drain(self, timeout: float) -> list[bytes]
PARAMETERS
self
timeout
float
RETURNS list[bytes]
SOURCE hardware/lepro/lib/lepro/session.py:107
hardware/lepro/lib/lepro/session.py · DryRunTransport
3 symbols
send
No description documented yet.
hardware/lepro/lib/lepro/session.py:116
WHAT IT DOES

No description documented yet.

SIGNATURE
send(self, data: bytes, label: str = '') -> None
PARAMETERS
self
data
bytes
label
str
= ''
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:116
recv
No description documented yet.
hardware/lepro/lib/lepro/session.py:119
WHAT IT DOES

No description documented yet.

SIGNATURE
recv(self, timeout: float) -> bytes | None
PARAMETERS
self
timeout
float
RETURNS bytes | None
SOURCE hardware/lepro/lib/lepro/session.py:119
drain
No description documented yet.
hardware/lepro/lib/lepro/session.py:122
WHAT IT DOES

No description documented yet.

SIGNATURE
drain(self, timeout: float) -> list[bytes]
PARAMETERS
self
timeout
float
RETURNS list[bytes]
SOURCE hardware/lepro/lib/lepro/session.py:122
hardware/lepro/lib/lepro/session.py · BleakTransport
4 symbols
on_notify
No description documented yet.
hardware/lepro/lib/lepro/session.py:134
WHAT IT DOES

No description documented yet.

SIGNATURE
on_notify(self, _sender: object, data: bytearray) -> None
PARAMETERS
self
_sender
object
data
bytearray
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:134
send
No description documented yet.
hardware/lepro/lib/lepro/session.py:140
WHAT IT DOES

No description documented yet.

SIGNATURE
send(self, data: bytes, label: str = '') -> None
PARAMETERS
self
data
bytes
label
str
= ''
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:140
recv
No description documented yet.
hardware/lepro/lib/lepro/session.py:145
WHAT IT DOES

No description documented yet.

SIGNATURE
recv(self, timeout: float) -> bytes | None
PARAMETERS
self
timeout
float
RETURNS bytes | None
SOURCE hardware/lepro/lib/lepro/session.py:145
drain
No description documented yet.
hardware/lepro/lib/lepro/session.py:151
WHAT IT DOES

No description documented yet.

SIGNATURE
drain(self, timeout: float) -> list[bytes]
PARAMETERS
self
timeout
float
RETURNS list[bytes]
SOURCE hardware/lepro/lib/lepro/session.py:151
hardware/lepro/lib/lepro/session.py · LeproSession
18 symbols
__init__
No description documented yet.
hardware/lepro/lib/lepro/session.py:167
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, mac: str, transport: Transport, config: SessionConfig | None = None) -> None
PARAMETERS
self
mac
str
transport
Transport
config
SessionConfig | None
= None
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:167
_require_session_rand
No description documented yet.
hardware/lepro/lib/lepro/session.py:183
WHAT IT DOES

No description documented yet.

SIGNATURE
_require_session_rand(self) -> int
PARAMETERS
self
RETURNS int
SOURCE hardware/lepro/lib/lepro/session.py:183
_send
No description documented yet.
hardware/lepro/lib/lepro/session.py:188
WHAT IT DOES

No description documented yet.

SIGNATURE
_send(self, pkt: bytes, label: str = '') -> None
PARAMETERS
self
pkt
bytes
label
str
= ''
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:188
_next_seq
No description documented yet.
hardware/lepro/lib/lepro/session.py:192
WHAT IT DOES

No description documented yet.

SIGNATURE
_next_seq(self) -> int
PARAMETERS
self
RETURNS int
SOURCE hardware/lepro/lib/lepro/session.py:192
_ingest_rx
No description documented yet.
hardware/lepro/lib/lepro/session.py:197
WHAT IT DOES

No description documented yet.

SIGNATURE
_ingest_rx(self, raw: bytes) -> list[DecryptedFrame]
PARAMETERS
self
raw
bytes
RETURNS list[DecryptedFrame]
SOURCE hardware/lepro/lib/lepro/session.py:197
_wait_opcode
No description documented yet.
hardware/lepro/lib/lepro/session.py:203
WHAT IT DOES

No description documented yet.

SIGNATURE
_wait_opcode(self, opcode: int, timeout: float | None = None) -> DecryptedFrame
PARAMETERS
self
opcode
int
timeout
float | None
= None
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/session.py:203
_wait_any
No description documented yet.
hardware/lepro/lib/lepro/session.py:217
WHAT IT DOES

No description documented yet.

SIGNATURE
_wait_any(self, opcodes: set[int], timeout: float) -> DecryptedFrame
PARAMETERS
self
opcodes
set[int]
timeout
float
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/session.py:217
run_phase_discovery
No description documented yet.
hardware/lepro/lib/lepro/session.py:231
WHAT IT DOES

No description documented yet.

SIGNATURE
run_phase_discovery(self) -> DeviceInfo
PARAMETERS
self
RETURNS DeviceInfo
SOURCE hardware/lepro/lib/lepro/session.py:231
_wait_new_auth_resp
No description documented yet.
hardware/lepro/lib/lepro/session.py:269
WHAT IT DOES

No description documented yet.

SIGNATURE
_wait_new_auth_resp(self, after_count: int, timeout: float) -> DecryptedFrame
PARAMETERS
self
after_count
int
timeout
float
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/session.py:269
_request_bond
No description documented yet.
hardware/lepro/lib/lepro/session.py:285
WHAT IT DOES

No description documented yet.

SIGNATURE
_request_bond(self, payload: bytes, label: str) -> DecryptedFrame
PARAMETERS
self
payload
bytes
label
str
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/session.py:285
run_phase_bond
No description documented yet.
hardware/lepro/lib/lepro/session.py:290
WHAT IT DOES

No description documented yet.

SIGNATURE
run_phase_bond(self, fallback_hs: bytes | None = None) -> BondTokens
PARAMETERS
self
fallback_hs
bytes | None
= None
RETURNS BondTokens
SOURCE hardware/lepro/lib/lepro/session.py:290
_wait_auth_resp
No description documented yet.
hardware/lepro/lib/lepro/session.py:321
WHAT IT DOES

No description documented yet.

SIGNATURE
_wait_auth_resp(self, timeout: float | None = None) -> DecryptedFrame
PARAMETERS
self
timeout
float | None
= None
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/session.py:321
run_phase_auth
No description documented yet.
hardware/lepro/lib/lepro/session.py:324
WHAT IT DOES

No description documented yet.

SIGNATURE
run_phase_auth(self, creds: BondCredentials) -> None
PARAMETERS
self
creds
BondCredentials
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:324
send_dp_ciphertext
No description documented yet.
hardware/lepro/lib/lepro/session.py:339
WHAT IT DOES

No description documented yet.

SIGNATURE
send_dp_ciphertext(self, ciphertext: bytes) -> None
PARAMETERS
self
ciphertext
bytes
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:339
send_dp_payload
No description documented yet.
hardware/lepro/lib/lepro/session.py:345
WHAT IT DOES

No description documented yet.

SIGNATURE
send_dp_payload(self, payload: DpPayload) -> None
PARAMETERS
self
payload
DpPayload
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:345
send_get_dp_state
No description documented yet.
hardware/lepro/lib/lepro/session.py:353
WHAT IT DOES

No description documented yet.

SIGNATURE
send_get_dp_state(self, payload: DpPayload) -> DecryptedFrame
PARAMETERS
self
payload
DpPayload
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/session.py:353
commit_control
No description documented yet.
hardware/lepro/lib/lepro/session.py:360
WHAT IT DOES

No description documented yet.

SIGNATURE
commit_control(self, creds: BondCredentials) -> None
PARAMETERS
self
creds
BondCredentials
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:360
run_control
Full control session. pre_bulk_pages is only for large scene uploads (capture 11:17 colour).
hardware/lepro/lib/lepro/session.py:379
WHAT IT DOES

Full control session. pre_bulk_pages is only for large scene uploads (capture 11:17 colour).

SIGNATURE
run_control(self, creds: BondCredentials, dp_payload: DpPayload, pre_bulk_pages: list[bytes] | None = None) -> None
PARAMETERS
self
creds
BondCredentials
dp_payload
DpPayload
pre_bulk_pages
list[bytes] | None
= None
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:379
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py · Segment
2 symbols
p_flags
No description documented yet.
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:48
WHAT IT DOES

No description documented yet.

SIGNATURE
p_flags(self) -> int
PARAMETERS
self
RETURNS int
SOURCE hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:48
DECORATORS
property
sh_flags
No description documented yet.
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:63
WHAT IT DOES

No description documented yet.

SIGNATURE
sh_flags(self) -> int
PARAMETERS
self
RETURNS int
SOURCE hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:63
DECORATORS
property
hardware/lepro/lib/lepro/tools/validate_ota_parser.py · Elf32
5 symbols
__init__
No description documented yet.
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:123
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, data: bytes) -> None
PARAMETERS
self
data
bytes
RETURNS None
SOURCE hardware/lepro/lib/lepro/tools/validate_ota_parser.py:123
u32
No description documented yet.
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:131
WHAT IT DOES

No description documented yet.

SIGNATURE
u32(self, off: int) -> int
PARAMETERS
self
off
int
RETURNS int
SOURCE hardware/lepro/lib/lepro/tools/validate_ota_parser.py:131
vma_to_offset
No description documented yet.
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:134
WHAT IT DOES

No description documented yet.

SIGNATURE
vma_to_offset(self, vma: int) -> int | None
PARAMETERS
self
vma
int
RETURNS int | None
SOURCE hardware/lepro/lib/lepro/tools/validate_ota_parser.py:134
read_cstr
No description documented yet.
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:146
WHAT IT DOES

No description documented yet.

SIGNATURE
read_cstr(self, vma: int) -> str | None
PARAMETERS
self
vma
int
RETURNS str | None
SOURCE hardware/lepro/lib/lepro/tools/validate_ota_parser.py:146
pool_strings
No description documented yet.
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:153
WHAT IT DOES

No description documented yet.

SIGNATURE
pool_strings(self, pool_vma: int, count: int) -> list[tuple[int, int, str | None]]
PARAMETERS
self
pool_vma
int
count
int
RETURNS list[tuple[int, int, str | None]]
SOURCE hardware/lepro/lib/lepro/tools/validate_ota_parser.py:153
hardware/lepro/setup.py · LeproSetup
3 symbols
__init__
No description documented yet.
hardware/lepro/setup.py:15
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, base_dir: Path | None = None)
PARAMETERS
self
base_dir
Path | None
= None
RETURNS Not documented
SOURCE hardware/lepro/setup.py:15
run
No description documented yet.
hardware/lepro/setup.py:28
WHAT IT DOES

No description documented yet.

SIGNATURE
run(self) -> dict[str, Any]
PARAMETERS
self
RETURNS dict[str, Any]
SOURCE hardware/lepro/setup.py:28
fail
No description documented yet.
hardware/lepro/setup.py:254
WHAT IT DOES

No description documented yet.

SIGNATURE
fail(stage: str, message: str) -> dict[str, Any]
PARAMETERS
stage
str
message
str
RETURNS dict[str, Any]
SOURCE hardware/lepro/setup.py:254
DECORATORS
staticmethod
interfaces/discord_bot.py · DiscordAdapter
2 symbols
__init__
No description documented yet.
interfaces/discord_bot.py:9
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, chat_engine, logger = None)
PARAMETERS
self
chat_engine
logger
= None
RETURNS Not documented
SOURCE interfaces/discord_bot.py:9
start
No description documented yet.
interfaces/discord_bot.py:13
WHAT IT DOES

No description documented yet.

SIGNATURE
start(self)
PARAMETERS
self
RETURNS Not documented
SOURCE interfaces/discord_bot.py:13
interfaces/terminal.py · TerminalAdapter
2 symbols
__init__
No description documented yet.
interfaces/terminal.py:9
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, chat_engine, logger = None)
PARAMETERS
self
chat_engine
logger
= None
RETURNS Not documented
SOURCE interfaces/terminal.py:9
run
No description documented yet.
interfaces/terminal.py:13
WHAT IT DOES

No description documented yet.

SIGNATURE
run(self)
PARAMETERS
self
RETURNS Not documented
SOURCE interfaces/terminal.py:13
interfaces/web_ui.py · WebUIAdapter
2 symbols
__init__
No description documented yet.
interfaces/web_ui.py:6
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, chat_engine, logger = None)
PARAMETERS
self
chat_engine
logger
= None
RETURNS Not documented
SOURCE interfaces/web_ui.py:6
start
No description documented yet.
interfaces/web_ui.py:10
WHAT IT DOES

No description documented yet.

SIGNATURE
start(self, host = '127.0.0.1', port = 8000)
PARAMETERS
self
host
= '127.0.0.1'
port
= 8000
RETURNS Not documented
SOURCE interfaces/web_ui.py:10
memory/embeddings.py · EmbeddingsProvider
4 symbols
__init__
No description documented yet.
memory/embeddings.py:9
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE memory/embeddings.py:9
embed
No description documented yet.
memory/embeddings.py:12
WHAT IT DOES

No description documented yet.

SIGNATURE
embed(self, texts: List[str]) -> List[List[float]]
PARAMETERS
self
texts
List[str]
RETURNS List[List[float]]
SOURCE memory/embeddings.py:12
store_embeddings
No description documented yet.
memory/embeddings.py:15
WHAT IT DOES

No description documented yet.

SIGNATURE
store_embeddings(self, ids: List[int], vectors: List[List[float]])
PARAMETERS
self
ids
List[int]
vectors
List[List[float]]
RETURNS Not documented
SOURCE memory/embeddings.py:15
query
No description documented yet.
memory/embeddings.py:18
WHAT IT DOES

No description documented yet.

SIGNATURE
query(self, vector: List[float], top_k: int = 5)
PARAMETERS
self
vector
List[float]
top_k
int
= 5
RETURNS Not documented
SOURCE memory/embeddings.py:18
memory/memory.py · MemoryManager
1 symbols
__init__
No description documented yet.
memory/memory.py:23
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, conn)
PARAMETERS
self
conn
RETURNS Not documented
SOURCE memory/memory.py:23
tools/base.py · BaseTool
1 symbols
call
No description documented yet.
tools/base.py:19
WHAT IT DOES

No description documented yet.

SIGNATURE
call(self, args: Dict) -> ToolResult
PARAMETERS
self
args
Dict
RETURNS ToolResult
SOURCE tools/base.py:19
tools/calculator.py · CalculatorTool
2 symbols
_safe_eval
No description documented yet.
tools/calculator.py:13
WHAT IT DOES

No description documented yet.

SIGNATURE
_safe_eval(self, expr: str) -> float
PARAMETERS
self
expr
str
RETURNS float
SOURCE tools/calculator.py:13
call
No description documented yet.
tools/calculator.py:23
WHAT IT DOES

No description documented yet.

SIGNATURE
call(self, args: Dict) -> ToolResult
PARAMETERS
self
args
Dict
RETURNS ToolResult
SOURCE tools/calculator.py:23
tools/chart_tool.py · ChartTool
18 symbols
call
Main BaseTool entry point. ToolRouter calls: tool.call(args) and expects a ToolResult.
tools/chart_tool.py:68
WHAT IT DOES

Main BaseTool entry point. ToolRouter calls: tool.call(args) and expects a ToolResult.

SIGNATURE
call(self, args: Dict[str, Any]) -> ToolResult
PARAMETERS
self
args
Dict[str, Any]
RETURNS ToolResult
SOURCE tools/chart_tool.py:68
create_chart
Create one complete chart specification.
tools/chart_tool.py:140
WHAT IT DOES

Create one complete chart specification.

SIGNATURE
create_chart(self, chart_type: str, title: str, data: List[Dict[str, Any]], x_key: str | None = None, series: List[Dict[str, Any]] | None = None, description: str | None = None, footer: str | None = None, x_axis_label: str | None = None, x_axis_scale: str | None = None, y_axis_min: float | None = None, y_axis_max: float | None = None, layout: str | None = None, name_key: str | None = None, value_key: str | None = None) -> Dict[str, Any]
PARAMETERS
self
chart_type
str
title
str
data
List[Dict[str, Any]]
x_key
str | None
= None
series
List[Dict[str, Any]] | None
= None
description
str | None
= None
footer
str | None
= None
x_axis_label
str | None
= None
x_axis_scale
str | None
= None
y_axis_min
float | None
= None
y_axis_max
float | None
= None
layout
str | None
= None
name_key
str | None
= None
value_key
str | None
= None
RETURNS Dict[str, Any]
SOURCE tools/chart_tool.py:140
bar
No description documented yet.
tools/chart_tool.py:291
WHAT IT DOES

No description documented yet.

SIGNATURE
bar(self, title: str, data: List[Dict[str, Any]], x_key: str, series: List[Dict[str, Any]], **kwargs: Any) -> Dict[str, Any]
PARAMETERS
self
title
str
data
List[Dict[str, Any]]
x_key
str
series
List[Dict[str, Any]]
**kwargs
Any
RETURNS Dict[str, Any]
SOURCE tools/chart_tool.py:291
line
No description documented yet.
tools/chart_tool.py:309
WHAT IT DOES

No description documented yet.

SIGNATURE
line(self, title: str, data: List[Dict[str, Any]], x_key: str, series: List[Dict[str, Any]], **kwargs: Any) -> Dict[str, Any]
PARAMETERS
self
title
str
data
List[Dict[str, Any]]
x_key
str
series
List[Dict[str, Any]]
**kwargs
Any
RETURNS Dict[str, Any]
SOURCE tools/chart_tool.py:309
pie
No description documented yet.
tools/chart_tool.py:327
WHAT IT DOES

No description documented yet.

SIGNATURE
pie(self, title: str, data: List[Dict[str, Any]], name_key: str, value_key: str, series: List[Dict[str, Any]] | None = None, **kwargs: Any) -> Dict[str, Any]
PARAMETERS
self
title
str
data
List[Dict[str, Any]]
name_key
str
value_key
str
series
List[Dict[str, Any]] | None
= None
**kwargs
Any
RETURNS Dict[str, Any]
SOURCE tools/chart_tool.py:327
scatter
No description documented yet.
tools/chart_tool.py:347
WHAT IT DOES

No description documented yet.

SIGNATURE
scatter(self, title: str, data: List[Dict[str, Any]], x_key: str, series: List[Dict[str, Any]], **kwargs: Any) -> Dict[str, Any]
PARAMETERS
self
title
str
data
List[Dict[str, Any]]
x_key
str
series
List[Dict[str, Any]]
**kwargs
Any
RETURNS Dict[str, Any]
SOURCE tools/chart_tool.py:347
make_series
Build a series definition. Example: ChartTool.make_series( data_key="cigarettes", label="Cigarettes", axis_label="Cigarettes", va…
tools/chart_tool.py:370
WHAT IT DOES

Build a series definition. Example: ChartTool.make_series( data_key="cigarettes", label="Cigarettes", axis_label="Cigarettes", value_format="integer", )

SIGNATURE
make_series(data_key: str, label: str | None = None, axis_label: str | None = None, value_format: str | None = None, value_prefix: str | None = None, value_suffix: str | None = None, stack: str | None = None) -> Dict[str, Any]
PARAMETERS
data_key
str
label
str | None
= None
axis_label
str | None
= None
value_format
str | None
= None
value_prefix
str | None
= None
value_suffix
str | None
= None
stack
str | None
= None
RETURNS Dict[str, Any]
SOURCE tools/chart_tool.py:370
DECORATORS
staticmethod
_normalize_chart_type
No description documented yet.
tools/chart_tool.py:447
WHAT IT DOES

No description documented yet.

SIGNATURE
_normalize_chart_type(chart_type: str) -> str
PARAMETERS
chart_type
str
RETURNS str
SOURCE tools/chart_tool.py:447
DECORATORS
staticmethod
_normalize_series
No description documented yet.
tools/chart_tool.py:459
WHAT IT DOES

No description documented yet.

SIGNATURE
_normalize_series(cls, series: List[Dict[str, Any]]) -> List[Dict[str, Any]]
PARAMETERS
cls
series
List[Dict[str, Any]]
RETURNS List[Dict[str, Any]]
SOURCE tools/chart_tool.py:459
DECORATORS
classmethod
_validate_chart_type
No description documented yet.
tools/chart_tool.py:554
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_chart_type(self, chart_type: str) -> None
PARAMETERS
self
chart_type
str
RETURNS None
SOURCE tools/chart_tool.py:554
_validate_title
No description documented yet.
tools/chart_tool.py:570
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_title(title: str) -> None
PARAMETERS
title
str
RETURNS None
SOURCE tools/chart_tool.py:570
DECORATORS
staticmethod
_validate_data
No description documented yet.
tools/chart_tool.py:585
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_data(data: List[Dict[str, Any]]) -> None
PARAMETERS
data
List[Dict[str, Any]]
RETURNS None
SOURCE tools/chart_tool.py:585
DECORATORS
staticmethod
_validate_cartesian_chart
No description documented yet.
tools/chart_tool.py:607
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_cartesian_chart(chart_type: str, data: List[Dict[str, Any]], x_key: str | None, series: List[Dict[str, Any]]) -> None
PARAMETERS
chart_type
str
data
List[Dict[str, Any]]
x_key
str | None
series
List[Dict[str, Any]]
RETURNS None
SOURCE tools/chart_tool.py:607
DECORATORS
staticmethod
_validate_pie_chart
No description documented yet.
tools/chart_tool.py:648
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_pie_chart(data: List[Dict[str, Any]], name_key: str | None, value_key: str | None) -> None
PARAMETERS
data
List[Dict[str, Any]]
name_key
str | None
value_key
str | None
RETURNS None
SOURCE tools/chart_tool.py:648
DECORATORS
staticmethod
_validate_x_axis_scale
No description documented yet.
tools/chart_tool.py:705
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_x_axis_scale(chart_type: str, x_axis_scale: str, data: List[Dict[str, Any]], x_key: str | None) -> None
PARAMETERS
chart_type
str
x_axis_scale
str
data
List[Dict[str, Any]]
x_key
str | None
RETURNS None
SOURCE tools/chart_tool.py:705
DECORATORS
staticmethod
_validate_layout
No description documented yet.
tools/chart_tool.py:742
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_layout(layout: str) -> None
PARAMETERS
layout
str
RETURNS None
SOURCE tools/chart_tool.py:742
DECORATORS
staticmethod
_validate_y_axis
No description documented yet.
tools/chart_tool.py:752
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_y_axis(y_axis_min: float | None, y_axis_max: float | None) -> None
PARAMETERS
y_axis_min
float | None
y_axis_max
float | None
RETURNS None
SOURCE tools/chart_tool.py:752
DECORATORS
staticmethod
_format_output
Serialize the chart specification for ToolResult.output. ChatEngine can then parse/recognize the structured chart object rather t…
tools/chart_tool.py:792
WHAT IT DOES

Serialize the chart specification for ToolResult.output. ChatEngine can then parse/recognize the structured chart object rather than treating it as ordinary prose.

SIGNATURE
_format_output(chart: Dict[str, Any]) -> str
PARAMETERS
chart
Dict[str, Any]
RETURNS str
SOURCE tools/chart_tool.py:792
DECORATORS
staticmethod
tools/ChartTool.py · ChartTool
3 symbols
_ensure_db
No description documented yet.
tools/ChartTool.py:22
WHAT IT DOES

No description documented yet.

SIGNATURE
_ensure_db(self)
PARAMETERS
self
RETURNS Not documented
SOURCE tools/ChartTool.py:22
_smoke_data
No description documented yet.
tools/ChartTool.py:35
WHAT IT DOES

No description documented yet.

SIGNATURE
_smoke_data(self, scope: str = '7d', smoke_type: str | None = None)
PARAMETERS
self
scope
str
= '7d'
smoke_type
str | None
= None
RETURNS Not documented
SOURCE tools/ChartTool.py:35
call
No description documented yet.
tools/ChartTool.py:93
WHAT IT DOES

No description documented yet.

SIGNATURE
call(self, args: Dict[str, Any]) -> ToolResult
PARAMETERS
self
args
Dict[str, Any]
RETURNS ToolResult
SOURCE tools/ChartTool.py:93
tools/filesystem.py · FilesystemTool
1 symbols
call
No description documented yet.
tools/filesystem.py:15
WHAT IT DOES

No description documented yet.

SIGNATURE
call(self, args: Dict) -> ToolResult
PARAMETERS
self
args
Dict
RETURNS ToolResult
SOURCE tools/filesystem.py:15
tools/lepro_lights.py · LeproLightsTool
3 symbols
__init__
No description documented yet.
tools/lepro_lights.py:20
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, device_name: str, mac: str)
PARAMETERS
self
device_name
str
mac
str
RETURNS Not documented
SOURCE tools/lepro_lights.py:20
schema
Return the tool schema exposed to CYN.
tools/lepro_lights.py:30
WHAT IT DOES

Return the tool schema exposed to CYN.

SIGNATURE
schema(self) -> dict[str, Any]
PARAMETERS
self
RETURNS dict[str, Any]
SOURCE tools/lepro_lights.py:30
execute
Execute a light-control request.
tools/lepro_lights.py:86
WHAT IT DOES

Execute a light-control request.

SIGNATURE
execute(self, arguments: dict[str, Any]) -> ToolResult
PARAMETERS
self
arguments
dict[str, Any]
RETURNS ToolResult
SOURCE tools/lepro_lights.py:86
tools/LeproLightsTool.py · LeproLightsTool
3 symbols
__init__
No description documented yet.
tools/LeproLightsTool.py:20
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, device_name: str, mac: str)
PARAMETERS
self
device_name
str
mac
str
RETURNS Not documented
SOURCE tools/LeproLightsTool.py:20
schema
Return the tool schema exposed to CYN.
tools/LeproLightsTool.py:30
WHAT IT DOES

Return the tool schema exposed to CYN.

SIGNATURE
schema(self) -> dict[str, Any]
PARAMETERS
self
RETURNS dict[str, Any]
SOURCE tools/LeproLightsTool.py:30
execute
Execute a light-control request.
tools/LeproLightsTool.py:86
WHAT IT DOES

Execute a light-control request.

SIGNATURE
execute(self, arguments: dict[str, Any]) -> ToolResult
PARAMETERS
self
arguments
dict[str, Any]
RETURNS ToolResult
SOURCE tools/LeproLightsTool.py:86
tools/SmokeCounterTool.py · SmokeCounterTool
1 symbols
call
Flexible call interface: - If args is a dict (tool_router), use it. - Otherwise accept keyword args for backward compatibility. R…
tools/SmokeCounterTool.py:611
WHAT IT DOES

Flexible call interface: - If args is a dict (tool_router), use it. - Otherwise accept keyword args for backward compatibility. Returns a ToolResult with a human-readable output and metadata containing the raw result dict.

SIGNATURE
call(self, args = None, action: str = 'stats', smoke_type: Optional[str] = None, amount: float = 1, limit: int = 10, scope: str = 'all') -> ToolResult
PARAMETERS
self
args
= None
action
str
= 'stats'
smoke_type
Optional[str]
= None
amount
float
= 1
limit
int
= 10
scope
str
= 'all'
RETURNS ToolResult
SOURCE tools/SmokeCounterTool.py:611
tools/tool_router.py · ToolRouter
9 symbols
__init__
No description documented yet.
tools/tool_router.py:16
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE tools/tool_router.py:16
register_tool
No description documented yet.
tools/tool_router.py:20
WHAT IT DOES

No description documented yet.

SIGNATURE
register_tool(self, tool: BaseTool)
PARAMETERS
self
tool
BaseTool
RETURNS Not documented
SOURCE tools/tool_router.py:20
list_tools
No description documented yet.
tools/tool_router.py:24
WHAT IT DOES

No description documented yet.

SIGNATURE
list_tools(self)
PARAMETERS
self
RETURNS Not documented
SOURCE tools/tool_router.py:24
describe_tools
Gives the AI a list of available tools.
tools/tool_router.py:28
WHAT IT DOES

Gives the AI a list of available tools.

SIGNATURE
describe_tools(self)
PARAMETERS
self
RETURNS Not documented
SOURCE tools/tool_router.py:28
as_ollama_tools
Convert the registered tools into Ollama function-calling schemas.
tools/tool_router.py:41
WHAT IT DOES

Convert the registered tools into Ollama function-calling schemas.

SIGNATURE
as_ollama_tools(self)
PARAMETERS
self
RETURNS Not documented
SOURCE tools/tool_router.py:41
call_tool
No description documented yet.
tools/tool_router.py:180
WHAT IT DOES

No description documented yet.

SIGNATURE
call_tool(self, name: str, args: Dict[str, Any]) -> ToolResult
PARAMETERS
self
name
str
args
Dict[str, Any]
RETURNS ToolResult
SOURCE tools/tool_router.py:180
normalize_smoke_type
Normalize a freeform smoke_type string into a canonical type (pen, vape, cigarette, bong, weed, joint, unknown).
tools/tool_router.py:215
WHAT IT DOES

Normalize a freeform smoke_type string into a canonical type (pen, vape, cigarette, bong, weed, joint, unknown).

SIGNATURE
normalize_smoke_type(self, text: str)
PARAMETERS
self
text
str
RETURNS Not documented
SOURCE tools/tool_router.py:215
is_read_only_smoke_query
Return True when the request is asking for counts/stats/history instead of logging.
tools/tool_router.py:244
WHAT IT DOES

Return True when the request is asking for counts/stats/history instead of logging.

SIGNATURE
is_read_only_smoke_query(self, text: str) -> bool
PARAMETERS
self
text
str
RETURNS bool
SOURCE tools/tool_router.py:244
detect
Detect whether a message requires a tool.
tools/tool_router.py:285
WHAT IT DOES

Detect whether a message requires a tool.

SIGNATURE
detect(self, text: str)
PARAMETERS
self
text
str
RETURNS Not documented
SOURCE tools/tool_router.py:285
tools/weather.py · WeatherTool
1 symbols
call
No description documented yet.
tools/weather.py:12
WHAT IT DOES

No description documented yet.

SIGNATURE
call(self, args: Dict) -> ToolResult
PARAMETERS
self
args
Dict
RETURNS ToolResult
SOURCE tools/weather.py:12
tools/web_search.py · ResultFilter
2 symbols
__init__
No description documented yet.
tools/web_search.py:837
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE tools/web_search.py:837
is_bad_result
No description documented yet.
tools/web_search.py:841
WHAT IT DOES

No description documented yet.

SIGNATURE
is_bad_result(self, title: str, body: str, href: str) -> bool
PARAMETERS
self
title
str
body
str
href
str
RETURNS bool
SOURCE tools/web_search.py:841
tools/web_search.py · ResultRanker
8 symbols
__init__
No description documented yet.
tools/web_search.py:897
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, intent: SearchIntent)
PARAMETERS
self
intent
SearchIntent
RETURNS Not documented
SOURCE tools/web_search.py:897
rank
No description documented yet.
tools/web_search.py:905
WHAT IT DOES

No description documented yet.

SIGNATURE
rank(self, title: str, body: str, href: str) -> int
PARAMETERS
self
title
str
body
str
href
str
RETURNS int
SOURCE tools/web_search.py:905
score_keywords
No description documented yet.
tools/web_search.py:980
WHAT IT DOES

No description documented yet.

SIGNATURE
score_keywords(title: str, combined: str, keywords: tuple[str, ...], title_weight: int, body_weight: int) -> int
PARAMETERS
title
str
combined
str
keywords
tuple[str, ...]
title_weight
int
body_weight
int
RETURNS int
SOURCE tools/web_search.py:980
DECORATORS
staticmethod
score_negative
No description documented yet.
tools/web_search.py:1002
WHAT IT DOES

No description documented yet.

SIGNATURE
score_negative(self, title: str, combined: str) -> int
PARAMETERS
self
title
str
combined
str
RETURNS int
SOURCE tools/web_search.py:1002
output_bonus
No description documented yet.
tools/web_search.py:1022
WHAT IT DOES

No description documented yet.

SIGNATURE
output_bonus(self, title: str) -> int
PARAMETERS
self
title
str
RETURNS int
SOURCE tools/web_search.py:1022
store_bonus
No description documented yet.
tools/web_search.py:1065
WHAT IT DOES

No description documented yet.

SIGNATURE
store_bonus(self, href: str) -> int
PARAMETERS
self
href
str
RETURNS int
SOURCE tools/web_search.py:1065
domain_bonus
No description documented yet.
tools/web_search.py:1080
WHAT IT DOES

No description documented yet.

SIGNATURE
domain_bonus(href: str) -> int
PARAMETERS
href
str
RETURNS int
SOURCE tools/web_search.py:1080
DECORATORS
staticmethod
research_source_bonus
No description documented yet.
tools/web_search.py:1110
WHAT IT DOES

No description documented yet.

SIGNATURE
research_source_bonus(href: str) -> int
PARAMETERS
href
str
RETURNS int
SOURCE tools/web_search.py:1110
DECORATORS
staticmethod
tools/web_search.py · WebSearchTool
2 symbols
call
No description documented yet.
tools/web_search.py:1547
WHAT IT DOES

No description documented yet.

SIGNATURE
call(self, args)
PARAMETERS
self
args
RETURNS Not documented
SOURCE tools/web_search.py:1547
format_result
No description documented yet.
tools/web_search.py:1913
WHAT IT DOES

No description documented yet.

SIGNATURE
format_result(title: str, body: str, href: str, score: int = 0, source_type: str = 'unknown') -> str
PARAMETERS
title
str
body
str
href
str
score
int
= 0
source_type
str
= 'unknown'
RETURNS str
SOURCE tools/web_search.py:1913
DECORATORS
staticmethod
voice/audio_player.py · AudioPlayer
4 symbols
play
Play a WAV audio file. Args: filepath (str): Path to the WAV file to play Raises: FileNotFoundError: If the audio file doesn't ex…
voice/audio_player.py:18
WHAT IT DOES

Play a WAV audio file. Args: filepath (str): Path to the WAV file to play Raises: FileNotFoundError: If the audio file doesn't exist RuntimeError: If playback fails

SIGNATURE
play(self, filepath)
PARAMETERS
self
filepath
RETURNS Not documented
SOURCE voice/audio_player.py:18
_play_windows
Play audio on Windows using PowerShell.
voice/audio_player.py:42
WHAT IT DOES

Play audio on Windows using PowerShell.

SIGNATURE
_play_windows(self, filepath)
PARAMETERS
self
filepath
RETURNS Not documented
SOURCE voice/audio_player.py:42
_play_macos
Play audio on macOS using afplay.
voice/audio_player.py:57
WHAT IT DOES

Play audio on macOS using afplay.

SIGNATURE
_play_macos(self, filepath)
PARAMETERS
self
filepath
RETURNS Not documented
SOURCE voice/audio_player.py:57
_play_linux
Play audio on Linux using available tools.
voice/audio_player.py:66
WHAT IT DOES

Play audio on Linux using available tools.

SIGNATURE
_play_linux(self, filepath)
PARAMETERS
self
filepath
RETURNS Not documented
SOURCE voice/audio_player.py:66
voice/piper_engine.py · PiperTTS
2 symbols
__init__
Initialize PiperTTS with a specific model. Args: model_path (str): Path to the .onnx model file e.g., "models/voices/cyn_normal.o…
voice/piper_engine.py:33
WHAT IT DOES

Initialize PiperTTS with a specific model. Args: model_path (str): Path to the .onnx model file e.g., "models/voices/cyn_normal.onnx" Raises: FileNotFoundError: If the model file doesn't exist

SIGNATURE
__init__(self, model_path)
PARAMETERS
self
model_path
RETURNS Not documented
SOURCE voice/piper_engine.py:33
generate
Generate speech from text using Piper TTS. Args: text (str): The text to convert to speech output_file (str): Path where the WAV…
voice/piper_engine.py:53
WHAT IT DOES

Generate speech from text using Piper TTS. Args: text (str): The text to convert to speech output_file (str): Path where the WAV file will be saved Returns: str: Path to the generated WAV file Raises: RuntimeError: If Piper subprocess fails or is not installed

SIGNATURE
generate(self, text, output_file = 'cyn_output.wav')
PARAMETERS
self
text
output_file
= 'cyn_output.wav'
RETURNS Not documented
SOURCE voice/piper_engine.py:53
voice/tts_engine.py · TTSEngine
2 symbols
__init__
No description documented yet.
voice/tts_engine.py:6
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE voice/tts_engine.py:6
generate
No description documented yet.
voice/tts_engine.py:13
WHAT IT DOES

No description documented yet.

SIGNATURE
generate(self, text, output = 'cyn_output.wav')
PARAMETERS
self
text
output
= 'cyn_output.wav'
RETURNS Not documented
SOURCE voice/tts_engine.py:13
voice/voice_manager.py · VoiceManager
2 symbols
__init__
Initialize VoiceManager with TTS and playback engines. Args: tts: TTS engine (e.g., PiperTTS) with generate(text) method player:…
voice/voice_manager.py:26
WHAT IT DOES

Initialize VoiceManager with TTS and playback engines. Args: tts: TTS engine (e.g., PiperTTS) with generate(text) method player: Audio player (e.g., AudioPlayer) with play(filepath) method

SIGNATURE
__init__(self, tts, player)
PARAMETERS
self
tts
player
RETURNS Not documented
SOURCE voice/voice_manager.py:26
speak
Generate speech from text and play it immediately. Args: text (str): The text to speak Raises: Exception: Propagates errors from…
voice/voice_manager.py:37
WHAT IT DOES

Generate speech from text and play it immediately. Args: text (str): The text to speak Raises: Exception: Propagates errors from TTS or playback

SIGNATURE
speak(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE voice/voice_manager.py:37
06
BARKLY DOCS

Classes

Classes stay collapsed so large projects remain readable.

0
ChatEngine
No description documented yet.
6 methods
ai/chat_engine.py:48
No description documented yet.
__init__
No description documented yet.
ai/chat_engine.py:50
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, ollama_client, prompt_builder, memory_store, tool_router, mode_manager, memory_manager: Optional[MemoryManager] = None, memory_extractor: Optional[MemoryExtractor] = None, context_manager = None, logger_obj = None)
PARAMETERS
self
ollama_client
prompt_builder
memory_store
tool_router
mode_manager
memory_manager
Optional[MemoryManager]
= None
memory_extractor
Optional[MemoryExtractor]
= None
context_manager
= None
logger_obj
= None
RETURNS Not documented
SOURCE ai/chat_engine.py:50
trim_context
No description documented yet.
ai/chat_engine.py:98
WHAT IT DOES

No description documented yet.

SIGNATURE
trim_context(self, text: str, limit: int) -> str
PARAMETERS
self
text
str
limit
int
RETURNS str
SOURCE ai/chat_engine.py:98
_estimate_message_tokens
Roughly estimate tokens in an Ollama message. This is intentionally conservative. Actual tokenization is model-dependent, so the…
ai/chat_engine.py:116
WHAT IT DOES

Roughly estimate tokens in an Ollama message. This is intentionally conservative. Actual tokenization is model-dependent, so the final context budget keeps headroom.

SIGNATURE
_estimate_message_tokens(self, message) -> int
PARAMETERS
self
message
RETURNS int
SOURCE ai/chat_engine.py:116
_trim_ollama_messages
Prevent Ollama requests from exceeding the available context. Priority: 1. System prompt 2. Current user message 3. Tool results…
ai/chat_engine.py:149
WHAT IT DOES

Prevent Ollama requests from exceeding the available context. Priority: 1. System prompt 2. Current user message 3. Tool results required for the current response 4. Newest conversation history 5. Older conversation history The current user message is never intentionally removed.

SIGNATURE
_trim_ollama_messages(self, messages, max_tokens: int = OLLAMA_PROMPT_BUDGET)
PARAMETERS
self
messages
max_tokens
int
= OLLAMA_PROMPT_BUDGET
RETURNS Not documented
SOURCE ai/chat_engine.py:149
_ollama_tools
No description documented yet.
ai/chat_engine.py:471
WHAT IT DOES

No description documented yet.

SIGNATURE
_ollama_tools(self, user_text: str = '')
PARAMETERS
self
user_text
str
= ''
RETURNS Not documented
SOURCE ai/chat_engine.py:471
handle_user_message
Process a user message. Flow: 1. Retrieve relevant context 2. Build Cyn prompt 3. Detect tools 4. Execute tools 5. Generate respo…
ai/chat_engine.py:501
WHAT IT DOES

Process a user message. Flow: 1. Retrieve relevant context 2. Build Cyn prompt 3. Detect tools 4. Execute tools 5. Generate response 6. Extract memories 7. Save conversation info

SIGNATURE
handle_user_message(self, user_id: str, text: str, mode: str = 'normal', personality: str = 'normal', request_id: Optional[str] = None) -> str
PARAMETERS
self
user_id
str
text
str
mode
str
= 'normal'
personality
str
= 'normal'
request_id
Optional[str]
= None
RETURNS str
SOURCE ai/chat_engine.py:501
ContextManager
No description documented yet.
2 methods
ai/context_manager.py:4
No description documented yet.
__init__
No description documented yet.
ai/context_manager.py:9
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, memory_store, knowledge_store)
PARAMETERS
self
memory_store
knowledge_store
RETURNS Not documented
SOURCE ai/context_manager.py:9
build_context
No description documented yet.
ai/context_manager.py:27
WHAT IT DOES

No description documented yet.

SIGNATURE
build_context(self, user_id, user_message)
PARAMETERS
self
user_id
user_message
RETURNS Not documented
SOURCE ai/context_manager.py:27
KnowledgeStore
No description documented yet.
4 methods
ai/knowledge/store.py:4
No description documented yet.
__init__
No description documented yet.
ai/knowledge/store.py:7
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, conn)
PARAMETERS
self
conn
RETURNS Not documented
SOURCE ai/knowledge/store.py:7
add
No description documented yet.
ai/knowledge/store.py:20
WHAT IT DOES

No description documented yet.

SIGNATURE
add(self, content, title = '', category = 'general', importance = 5, tags = None)
PARAMETERS
self
content
title
= ''
category
= 'general'
importance
= 5
tags
= None
RETURNS Not documented
SOURCE ai/knowledge/store.py:20
search
No description documented yet.
ai/knowledge/store.py:68
WHAT IT DOES

No description documented yet.

SIGNATURE
search(self, query, limit = 5)
PARAMETERS
self
query
limit
= 5
RETURNS Not documented
SOURCE ai/knowledge/store.py:68
recent
No description documented yet.
ai/knowledge/store.py:156
WHAT IT DOES

No description documented yet.

SIGNATURE
recent(self, limit = 10)
PARAMETERS
self
limit
= 10
RETURNS Not documented
SOURCE ai/knowledge/store.py:156
MemoryExtractor
No description documented yet.
10 methods
ai/memory_system/extractor.py:27
No description documented yet.
__init__
No description documented yet.
ai/memory_system/extractor.py:30
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, memory_store)
PARAMETERS
self
memory_store
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:30
extract_and_save
No description documented yet.
ai/memory_system/extractor.py:49
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_and_save(self, user_id: str, user_message: str, assistant_response: str = '') -> List[int]
PARAMETERS
self
user_id
str
user_message
str
assistant_response
str
= ''
RETURNS List[int]
SOURCE ai/memory_system/extractor.py:49
extract_preferences
No description documented yet.
ai/memory_system/extractor.py:292
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_preferences(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:292
extract_goals
No description documented yet.
ai/memory_system/extractor.py:328
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_goals(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:328
extract_projects
No description documented yet.
ai/memory_system/extractor.py:365
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_projects(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:365
extract_names
No description documented yet.
ai/memory_system/extractor.py:402
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_names(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:402
extract_style
No description documented yet.
ai/memory_system/extractor.py:442
WHAT IT DOES

No description documented yet.

SIGNATURE
extract_style(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:442
match_patterns
No description documented yet.
ai/memory_system/extractor.py:488
WHAT IT DOES

No description documented yet.

SIGNATURE
match_patterns(self, patterns, text, prefix)
PARAMETERS
self
patterns
text
prefix
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:488
meaningful
No description documented yet.
ai/memory_system/extractor.py:548
WHAT IT DOES

No description documented yet.

SIGNATURE
meaningful(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:548
should_save
No description documented yet.
ai/memory_system/extractor.py:577
WHAT IT DOES

No description documented yet.

SIGNATURE
should_save(self, content)
PARAMETERS
self
content
RETURNS Not documented
SOURCE ai/memory_system/extractor.py:577
MemoryManager
No description documented yet.
9 methods
ai/memory_system/manager.py:21
No description documented yet.
__init__
No description documented yet.
ai/memory_system/manager.py:24
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, conn)
PARAMETERS
self
conn
RETURNS Not documented
SOURCE ai/memory_system/manager.py:24
remember
No description documented yet.
ai/memory_system/manager.py:62
WHAT IT DOES

No description documented yet.

SIGNATURE
remember(self, user_id, content, category = 'general', importance = 5)
PARAMETERS
self
user_id
content
category
= 'general'
importance
= 5
RETURNS Not documented
SOURCE ai/memory_system/manager.py:62
recall
No description documented yet.
ai/memory_system/manager.py:160
WHAT IT DOES

No description documented yet.

SIGNATURE
recall(self, user_id, limit = 5, min_importance = 1, categories = None)
PARAMETERS
self
user_id
limit
= 5
min_importance
= 1
categories
= None
RETURNS Not documented
SOURCE ai/memory_system/manager.py:160
search
No description documented yet.
ai/memory_system/manager.py:265
WHAT IT DOES

No description documented yet.

SIGNATURE
search(self, user_id, query, limit = 5)
PARAMETERS
self
user_id
query
limit
= 5
RETURNS Not documented
SOURCE ai/memory_system/manager.py:265
get_all_memories
No description documented yet.
ai/memory_system/manager.py:368
WHAT IT DOES

No description documented yet.

SIGNATURE
get_all_memories(self, user_id)
PARAMETERS
self
user_id
RETURNS Not documented
SOURCE ai/memory_system/manager.py:368
recent
No description documented yet.
ai/memory_system/manager.py:424
WHAT IT DOES

No description documented yet.

SIGNATURE
recent(self, limit = 10)
PARAMETERS
self
limit
= 10
RETURNS Not documented
SOURCE ai/memory_system/manager.py:424
delete_memory
No description documented yet.
ai/memory_system/manager.py:472
WHAT IT DOES

No description documented yet.

SIGNATURE
delete_memory(self, memory_id)
PARAMETERS
self
memory_id
RETURNS Not documented
SOURCE ai/memory_system/manager.py:472
update_memory
No description documented yet.
ai/memory_system/manager.py:522
WHAT IT DOES

No description documented yet.

SIGNATURE
update_memory(self, memory_id, importance = None, content = None)
PARAMETERS
self
memory_id
importance
= None
content
= None
RETURNS Not documented
SOURCE ai/memory_system/manager.py:522
format_for_prompt
No description documented yet.
ai/memory_system/manager.py:598
WHAT IT DOES

No description documented yet.

SIGNATURE
format_for_prompt(self, memories)
PARAMETERS
self
memories
RETURNS Not documented
SOURCE ai/memory_system/manager.py:598
ModeSpec
No description documented yet.
1 methods
ai/mode_manager.py:8
No description documented yet.
__init__
No description documented yet.
ai/mode_manager.py:9
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, name: str, allowed_tools: List[str] = None, instruction_fragment: str = '')
PARAMETERS
self
name
str
allowed_tools
List[str]
= None
instruction_fragment
str
= ''
RETURNS Not documented
SOURCE ai/mode_manager.py:9
ModeManager
No description documented yet.
4 methods
ai/mode_manager.py:20
No description documented yet.
__init__
No description documented yet.
ai/mode_manager.py:21
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE ai/mode_manager.py:21
_init_default_modes
No description documented yet.
ai/mode_manager.py:25
WHAT IT DOES

No description documented yet.

SIGNATURE
_init_default_modes(self)
PARAMETERS
self
RETURNS Not documented
SOURCE ai/mode_manager.py:25
get_mode
No description documented yet.
ai/mode_manager.py:100
WHAT IT DOES

No description documented yet.

SIGNATURE
get_mode(self, name: str) -> ModeSpec
PARAMETERS
self
name
str
RETURNS ModeSpec
SOURCE ai/mode_manager.py:100
allowed_tools_for
No description documented yet.
ai/mode_manager.py:106
WHAT IT DOES

No description documented yet.

SIGNATURE
allowed_tools_for(self, name: str)
PARAMETERS
self
name
str
RETURNS Not documented
SOURCE ai/mode_manager.py:106
OllamaClient
No description documented yet.
4 methods
ai/ollama_client.py:18
No description documented yet.
__init__
No description documented yet.
ai/ollama_client.py:20
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, base_url: str = 'http://localhost:11434', model: str = 'cyn-x:latest', timeout: int = 600)
PARAMETERS
self
base_url
str
= 'http://localhost:11434'
model
str
= 'cyn-x:latest'
timeout
int
= 600
RETURNS Not documented
SOURCE ai/ollama_client.py:20
generate
No description documented yet.
ai/ollama_client.py:30
WHAT IT DOES

No description documented yet.

SIGNATURE
generate(self, prompt: str, max_tokens: int = 512, stream: bool = False, **kwargs) -> Dict[str, Any]
PARAMETERS
self
prompt
str
max_tokens
int
= 512
stream
bool
= False
**kwargs
RETURNS Dict[str, Any]
SOURCE ai/ollama_client.py:30
chat
Call Ollama's chat endpoint with optional tools.
ai/ollama_client.py:102
WHAT IT DOES

Call Ollama's chat endpoint with optional tools.

SIGNATURE
chat(self, messages: List[Dict[str, Any]], tools: Optional[List[Dict[str, Any]]] = None, stream: bool = False, **kwargs) -> Dict[str, Any]
PARAMETERS
self
messages
List[Dict[str, Any]]
tools
Optional[List[Dict[str, Any]]]
= None
stream
bool
= False
**kwargs
RETURNS Dict[str, Any]
SOURCE ai/ollama_client.py:102
generate_stream
No description documented yet.
ai/ollama_client.py:304
WHAT IT DOES

No description documented yet.

SIGNATURE
generate_stream(self, prompt: str, max_tokens: int = 512, **kwargs) -> Generator[str, None, None]
PARAMETERS
self
prompt
str
max_tokens
int
= 512
**kwargs
RETURNS Generator[str, None, None]
SOURCE ai/ollama_client.py:304
PromptBuilder
No description documented yet.
12 methods
ai/prompt_builder.py:40
No description documented yet.
__init__
No description documented yet.
ai/prompt_builder.py:226
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, templates_dir: Optional[str] = None)
PARAMETERS
self
templates_dir
Optional[str]
= None
RETURNS Not documented
SOURCE ai/prompt_builder.py:226
normalize_prompt_layers
No description documented yet.
ai/prompt_builder.py:244
WHAT IT DOES

No description documented yet.

SIGNATURE
normalize_prompt_layers(self, prompt_layers: Optional[Dict[str, bool]] = None) -> Dict[str, bool]
PARAMETERS
self
prompt_layers
Optional[Dict[str, bool]]
= None
RETURNS Dict[str, bool]
SOURCE ai/prompt_builder.py:244
set_prompt_layers
No description documented yet.
ai/prompt_builder.py:266
WHAT IT DOES

No description documented yet.

SIGNATURE
set_prompt_layers(self, prompt_layers: Optional[Dict[str, bool]] = None) -> Dict[str, bool]
PARAMETERS
self
prompt_layers
Optional[Dict[str, bool]]
= None
RETURNS Dict[str, bool]
SOURCE ai/prompt_builder.py:266
get_prompt_layers
No description documented yet.
ai/prompt_builder.py:282
WHAT IT DOES

No description documented yet.

SIGNATURE
get_prompt_layers(self) -> Dict[str, bool]
PARAMETERS
self
RETURNS Dict[str, bool]
SOURCE ai/prompt_builder.py:282
apply_prompt_preset
No description documented yet.
ai/prompt_builder.py:291
WHAT IT DOES

No description documented yet.

SIGNATURE
apply_prompt_preset(self, preset: str) -> Dict[str, bool]
PARAMETERS
self
preset
str
RETURNS Dict[str, bool]
SOURCE ai/prompt_builder.py:291
trim_context
No description documented yet.
ai/prompt_builder.py:311
WHAT IT DOES

No description documented yet.

SIGNATURE
trim_context(self, text: str, limit: int) -> str
PARAMETERS
self
text
str
limit
int
RETURNS str
SOURCE ai/prompt_builder.py:311
should_include_context
No description documented yet.
ai/prompt_builder.py:339
WHAT IT DOES

No description documented yet.

SIGNATURE
should_include_context(self, text: str) -> bool
PARAMETERS
self
text
str
RETURNS bool
SOURCE ai/prompt_builder.py:339
score_context
No description documented yet.
ai/prompt_builder.py:360
WHAT IT DOES

No description documented yet.

SIGNATURE
score_context(self, chunk: str, query: str) -> int
PARAMETERS
self
chunk
str
query
str
RETURNS int
SOURCE ai/prompt_builder.py:360
select_context
No description documented yet.
ai/prompt_builder.py:397
WHAT IT DOES

No description documented yet.

SIGNATURE
select_context(self, chunks: List[str], query: str, limit: int) -> str
PARAMETERS
self
chunks
List[str]
query
str
limit
int
RETURNS str
SOURCE ai/prompt_builder.py:397
build_system_prompt
No description documented yet.
ai/prompt_builder.py:472
WHAT IT DOES

No description documented yet.

SIGNATURE
build_system_prompt(self, modes: Optional[List[str]] = None, memory: str = '', context: str = '', prompt_layers: Optional[Dict[str, bool]] = None) -> str
PARAMETERS
self
modes
Optional[List[str]]
= None
memory
str
= ''
context
str
= ''
prompt_layers
Optional[Dict[str, bool]]
= None
RETURNS str
SOURCE ai/prompt_builder.py:472
budget_context
No description documented yet.
ai/prompt_builder.py:551
WHAT IT DOES

No description documented yet.

SIGNATURE
budget_context(self, sections: List[Dict[str, Any]]) -> List[str]
PARAMETERS
self
sections
List[Dict[str, Any]]
RETURNS List[str]
SOURCE ai/prompt_builder.py:551
build_prompt
No description documented yet.
ai/prompt_builder.py:688
WHAT IT DOES

No description documented yet.

SIGNATURE
build_prompt(self, user_input: str, mode_fragment: str = '', personality_fragment: str = '', history: Optional[List[dict]] = None, memory_summary: str = '', knowledge_context: str = '', tools_spec: str = '', intent: str = '', conversation_summary: str = '', prompt_layers: Optional[Dict[str, bool]] = None) -> str
PARAMETERS
self
user_input
str
mode_fragment
str
= ''
personality_fragment
str
= ''
history
Optional[List[dict]]
= None
memory_summary
str
= ''
knowledge_context
str
= ''
tools_spec
str
= ''
intent
str
= ''
conversation_summary
str
= ''
prompt_layers
Optional[Dict[str, bool]]
= None
RETURNS str
SOURCE ai/prompt_builder.py:688
PromptManager
No description documented yet.
10 methods
ai/prompt_manager.py:31
No description documented yet.
__init__
No description documented yet.
ai/prompt_manager.py:97
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, prompts_dir: Optional[str] = None)
PARAMETERS
self
prompts_dir
Optional[str]
= None
RETURNS Not documented
SOURCE ai/prompt_manager.py:97
normalize_prompt_layers
No description documented yet.
ai/prompt_manager.py:151
WHAT IT DOES

No description documented yet.

SIGNATURE
normalize_prompt_layers(self, enabled_layers = None)
PARAMETERS
self
enabled_layers
= None
RETURNS Not documented
SOURCE ai/prompt_manager.py:151
_load_file
No description documented yet.
ai/prompt_manager.py:182
WHAT IT DOES

No description documented yet.

SIGNATURE
_load_file(self, path: Path)
PARAMETERS
self
path
Path
RETURNS Not documented
SOURCE ai/prompt_manager.py:182
trim_text
No description documented yet.
ai/prompt_manager.py:220
WHAT IT DOES

No description documented yet.

SIGNATURE
trim_text(self, text, limit)
PARAMETERS
self
text
limit
RETURNS Not documented
SOURCE ai/prompt_manager.py:220
load_core_prompts
No description documented yet.
ai/prompt_manager.py:254
WHAT IT DOES

No description documented yet.

SIGNATURE
load_core_prompts(self)
PARAMETERS
self
RETURNS Not documented
SOURCE ai/prompt_manager.py:254
load_personality_matrix
No description documented yet.
ai/prompt_manager.py:364
WHAT IT DOES

No description documented yet.

SIGNATURE
load_personality_matrix(self)
PARAMETERS
self
RETURNS Not documented
SOURCE ai/prompt_manager.py:364
load_optional
No description documented yet.
ai/prompt_manager.py:408
WHAT IT DOES

No description documented yet.

SIGNATURE
load_optional(self, name)
PARAMETERS
self
name
RETURNS Not documented
SOURCE ai/prompt_manager.py:408
load_option
No description documented yet.
ai/prompt_manager.py:441
WHAT IT DOES

No description documented yet.

SIGNATURE
load_option(self, name)
PARAMETERS
self
name
RETURNS Not documented
SOURCE ai/prompt_manager.py:441
load_mode
No description documented yet.
ai/prompt_manager.py:474
WHAT IT DOES

No description documented yet.

SIGNATURE
load_mode(self, mode_name)
PARAMETERS
self
mode_name
RETURNS Not documented
SOURCE ai/prompt_manager.py:474
build_system_prompt
No description documented yet.
ai/prompt_manager.py:519
WHAT IT DOES

No description documented yet.

SIGNATURE
build_system_prompt(self, active_modes = None, active_options = None, memory_summary = '', additional_context = '', include_safety = True, enabled_layers = None)
PARAMETERS
self
active_modes
= None
active_options
= None
memory_summary
= ''
additional_context
= ''
include_safety
= True
enabled_layers
= None
RETURNS Not documented
SOURCE ai/prompt_manager.py:519
CYNXTerminal
No description documented yet.
22 methods
ai/terminal_ui/renderer.py:30
No description documented yet.
__init__
No description documented yet.
ai/terminal_ui/renderer.py:31
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:31
_print_label
No description documented yet.
ai/terminal_ui/renderer.py:40
WHAT IT DOES

No description documented yet.

SIGNATURE
_print_label(self, label, value = None, style, value_style = 'white')
PARAMETERS
self
label
value
= None
style
value_style
= 'white'
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:40
section
No description documented yet.
ai/terminal_ui/renderer.py:48
WHAT IT DOES

No description documented yet.

SIGNATURE
section(self, title)
PARAMETERS
self
title
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:48
info
No description documented yet.
ai/terminal_ui/renderer.py:51
WHAT IT DOES

No description documented yet.

SIGNATURE
info(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:51
memory
No description documented yet.
ai/terminal_ui/renderer.py:54
WHAT IT DOES

No description documented yet.

SIGNATURE
memory(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:54
warning
No description documented yet.
ai/terminal_ui/renderer.py:57
WHAT IT DOES

No description documented yet.

SIGNATURE
warning(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:57
error
No description documented yet.
ai/terminal_ui/renderer.py:60
WHAT IT DOES

No description documented yet.

SIGNATURE
error(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:60
dim
No description documented yet.
ai/terminal_ui/renderer.py:63
WHAT IT DOES

No description documented yet.

SIGNATURE
dim(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:63
user
No description documented yet.
ai/terminal_ui/renderer.py:66
WHAT IT DOES

No description documented yet.

SIGNATURE
user(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:66
ollama
No description documented yet.
ai/terminal_ui/renderer.py:69
WHAT IT DOES

No description documented yet.

SIGNATURE
ollama(self, label = 'OLLAMA CALL', value = None)
PARAMETERS
self
label
= 'OLLAMA CALL'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:69
model
No description documented yet.
ai/terminal_ui/renderer.py:72
WHAT IT DOES

No description documented yet.

SIGNATURE
model(self, label = 'MODEL RESPONSE', value = None)
PARAMETERS
self
label
= 'MODEL RESPONSE'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:72
tool
No description documented yet.
ai/terminal_ui/renderer.py:75
WHAT IT DOES

No description documented yet.

SIGNATURE
tool(self, label = 'TOOL CALL', value = None)
PARAMETERS
self
label
= 'TOOL CALL'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:75
tool_args
No description documented yet.
ai/terminal_ui/renderer.py:78
WHAT IT DOES

No description documented yet.

SIGNATURE
tool_args(self, label = 'TOOL ARGUMENTS', value = None)
PARAMETERS
self
label
= 'TOOL ARGUMENTS'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:78
execute
No description documented yet.
ai/terminal_ui/renderer.py:81
WHAT IT DOES

No description documented yet.

SIGNATURE
execute(self, label = 'EXECUTING TOOL', value = None)
PARAMETERS
self
label
= 'EXECUTING TOOL'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:81
result
No description documented yet.
ai/terminal_ui/renderer.py:84
WHAT IT DOES

No description documented yet.

SIGNATURE
result(self, label = 'TOOL RESULT', value = None)
PARAMETERS
self
label
= 'TOOL RESULT'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:84
prompt
No description documented yet.
ai/terminal_ui/renderer.py:87
WHAT IT DOES

No description documented yet.

SIGNATURE
prompt(self, label = 'PROMPT SECTION', value = None)
PARAMETERS
self
label
= 'PROMPT SECTION'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:87
final_prompt
No description documented yet.
ai/terminal_ui/renderer.py:90
WHAT IT DOES

No description documented yet.

SIGNATURE
final_prompt(self, label = 'FINAL SYSTEM PROMPT', value = None)
PARAMETERS
self
label
= 'FINAL SYSTEM PROMPT'
value
= None
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:90
available_tools
No description documented yet.
ai/terminal_ui/renderer.py:93
WHAT IT DOES

No description documented yet.

SIGNATURE
available_tools(self, tools)
PARAMETERS
self
tools
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:93
json
No description documented yet.
ai/terminal_ui/renderer.py:96
WHAT IT DOES

No description documented yet.

SIGNATURE
json(self, payload)
PARAMETERS
self
payload
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:96
timing
No description documented yet.
ai/terminal_ui/renderer.py:102
WHAT IT DOES

No description documented yet.

SIGNATURE
timing(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:102
memory_error
No description documented yet.
ai/terminal_ui/renderer.py:105
WHAT IT DOES

No description documented yet.

SIGNATURE
memory_error(self, message)
PARAMETERS
self
message
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:105
blank
No description documented yet.
ai/terminal_ui/renderer.py:108
WHAT IT DOES

No description documented yet.

SIGNATURE
blank(self)
PARAMETERS
self
RETURNS Not documented
SOURCE ai/terminal_ui/renderer.py:108
Parameter
No description documented yet.
0 methods
barkly_docs.py:124
No description documented yet.
No methods discovered.
FunctionInfo
No description documented yet.
2 methods
barkly_docs.py:132
No description documented yet.
qualified_name
No description documented yet.
barkly_docs.py:146
WHAT IT DOES

No description documented yet.

SIGNATURE
qualified_name(self) -> str
PARAMETERS
self
RETURNS str
SOURCE barkly_docs.py:146
DECORATORS
property
signature
No description documented yet.
barkly_docs.py:152
WHAT IT DOES

No description documented yet.

SIGNATURE
signature(self) -> str
PARAMETERS
self
RETURNS str
SOURCE barkly_docs.py:152
DECORATORS
property
ClassInfo
No description documented yet.
0 methods
barkly_docs.py:175
No description documented yet.
No methods discovered.
EndpointInfo
No description documented yet.
1 methods
barkly_docs.py:187
No description documented yet.
method_text
No description documented yet.
barkly_docs.py:202
WHAT IT DOES

No description documented yet.

SIGNATURE
method_text(self) -> str
PARAMETERS
self
RETURNS str
SOURCE barkly_docs.py:202
DECORATORS
property
ModuleInfo
No description documented yet.
0 methods
barkly_docs.py:207
No description documented yet.
No methods discovered.
PythonScanner
No description documented yet.
7 methods
barkly_docs.py:591
No description documented yet.
__init__
No description documented yet.
barkly_docs.py:592
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, root: Path)
PARAMETERS
self
root
Path
RETURNS Not documented
SOURCE barkly_docs.py:592
scan
No description documented yet.
barkly_docs.py:600
WHAT IT DOES

No description documented yet.

SIGNATURE
scan(self) -> None
PARAMETERS
self
RETURNS None
SOURCE barkly_docs.py:600
scan_file
No description documented yet.
barkly_docs.py:607
WHAT IT DOES

No description documented yet.

SIGNATURE
scan_file(self, path: Path) -> None
PARAMETERS
self
path
Path
RETURNS None
SOURCE barkly_docs.py:607
function_node_for_class_method
No description documented yet.
barkly_docs.py:665
WHAT IT DOES

No description documented yet.

SIGNATURE
function_node_for_class_method(self, class_node: ast.ClassDef, method_name: str) -> Optional[ast.FunctionDef | ast.AsyncFunctionDef]
PARAMETERS
self
class_node
ast.ClassDef
method_name
str
RETURNS Optional[ast.FunctionDef | ast.AsyncFunctionDef]
SOURCE barkly_docs.py:665
make_function
No description documented yet.
barkly_docs.py:680
WHAT IT DOES

No description documented yet.

SIGNATURE
make_function(self, node: ast.FunctionDef | ast.AsyncFunctionDef, file: str, class_name: str = '') -> FunctionInfo
PARAMETERS
self
node
ast.FunctionDef | ast.AsyncFunctionDef
file
str
class_name
str
= ''
RETURNS FunctionInfo
SOURCE barkly_docs.py:680
make_class
No description documented yet.
barkly_docs.py:699
WHAT IT DOES

No description documented yet.

SIGNATURE
make_class(self, node: ast.ClassDef, file: str) -> ClassInfo
PARAMETERS
self
node
ast.ClassDef
file
str
RETURNS ClassInfo
SOURCE barkly_docs.py:699
find_endpoints
No description documented yet.
barkly_docs.py:729
WHAT IT DOES

No description documented yet.

SIGNATURE
find_endpoints(self, node: Optional[ast.FunctionDef | ast.AsyncFunctionDef], file: str) -> None
PARAMETERS
self
node
Optional[ast.FunctionDef | ast.AsyncFunctionDef]
file
str
RETURNS None
SOURCE barkly_docs.py:729
BenchmarkCleaner
No description documented yet.
8 methods
benchmark/cleaner.py:97
No description documented yet.
__init__
No description documented yet.
benchmark/cleaner.py:99
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, execute: bool = False, remove_temp: bool = False)
PARAMETERS
self
execute
bool
= False
remove_temp
bool
= False
RETURNS Not documented
SOURCE benchmark/cleaner.py:99
show_delete
No description documented yet.
benchmark/cleaner.py:116
WHAT IT DOES

No description documented yet.

SIGNATURE
show_delete(self, path: Path)
PARAMETERS
self
path
Path
RETURNS Not documented
SOURCE benchmark/cleaner.py:116
is_protected
No description documented yet.
benchmark/cleaner.py:150
WHAT IT DOES

No description documented yet.

SIGNATURE
is_protected(self, path: Path) -> bool
PARAMETERS
self
path
Path
RETURNS bool
SOURCE benchmark/cleaner.py:150
clean_results
No description documented yet.
benchmark/cleaner.py:210
WHAT IT DOES

No description documented yet.

SIGNATURE
clean_results(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/cleaner.py:210
clean_temp_files
No description documented yet.
benchmark/cleaner.py:255
WHAT IT DOES

No description documented yet.

SIGNATURE
clean_temp_files(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/cleaner.py:255
clean_empty_directories
No description documented yet.
benchmark/cleaner.py:304
WHAT IT DOES

No description documented yet.

SIGNATURE
clean_empty_directories(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/cleaner.py:304
print_protected_info
No description documented yet.
benchmark/cleaner.py:361
WHAT IT DOES

No description documented yet.

SIGNATURE
print_protected_info(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/cleaner.py:361
summary
No description documented yet.
benchmark/cleaner.py:393
WHAT IT DOES

No description documented yet.

SIGNATURE
summary(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/cleaner.py:393
BenchmarkStorage
No description documented yet.
5 methods
benchmark/runner.py:752
No description documented yet.
__init__
No description documented yet.
benchmark/runner.py:754
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/runner.py:754
save_test
No description documented yet.
benchmark/runner.py:775
WHAT IT DOES

No description documented yet.

SIGNATURE
save_test(self, result)
PARAMETERS
self
result
RETURNS Not documented
SOURCE benchmark/runner.py:775
add
No description documented yet.
benchmark/runner.py:950
WHAT IT DOES

No description documented yet.

SIGNATURE
add(self, result)
PARAMETERS
self
result
RETURNS Not documented
SOURCE benchmark/runner.py:950
save_raw
No description documented yet.
benchmark/runner.py:967
WHAT IT DOES

No description documented yet.

SIGNATURE
save_raw(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/runner.py:967
save_summary
No description documented yet.
benchmark/runner.py:1034
WHAT IT DOES

No description documented yet.

SIGNATURE
save_summary(self)
PARAMETERS
self
RETURNS Not documented
SOURCE benchmark/runner.py:1034
Config
No description documented yet.
0 methods
config.py:16
No description documented yet.
No methods discovered.
LeproConfig
Stores Lepro devices configured for CYN-X.
6 methods
hardware/lepro/config.py:8
Stores Lepro devices configured for CYN-X.
__init__
No description documented yet.
hardware/lepro/config.py:11
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, path: Path) -> None
PARAMETERS
self
path
Path
RETURNS None
SOURCE hardware/lepro/config.py:11
load
No description documented yet.
hardware/lepro/config.py:14
WHAT IT DOES

No description documented yet.

SIGNATURE
load(self) -> dict[str, Any]
PARAMETERS
self
RETURNS dict[str, Any]
SOURCE hardware/lepro/config.py:14
save
No description documented yet.
hardware/lepro/config.py:31
WHAT IT DOES

No description documented yet.

SIGNATURE
save(self, data: dict[str, Any]) -> None
PARAMETERS
self
data
dict[str, Any]
RETURNS None
SOURCE hardware/lepro/config.py:31
add_device
No description documented yet.
hardware/lepro/config.py:42
WHAT IT DOES

No description documented yet.

SIGNATURE
add_device(self, name: str, mac: str, device_type: str = 'lepro', discovered_name: str | None = None) -> dict[str, Any]
PARAMETERS
self
name
str
mac
str
device_type
str
= 'lepro'
discovered_name
str | None
= None
RETURNS dict[str, Any]
SOURCE hardware/lepro/config.py:42
get_device
No description documented yet.
hardware/lepro/config.py:68
WHAT IT DOES

No description documented yet.

SIGNATURE
get_device(self, name: str) -> dict[str, Any] | None
PARAMETERS
self
name
str
RETURNS dict[str, Any] | None
SOURCE hardware/lepro/config.py:68
list_devices
No description documented yet.
hardware/lepro/config.py:75
WHAT IT DOES

No description documented yet.

SIGNATURE
list_devices(self) -> list[dict[str, Any]]
PARAMETERS
self
RETURNS list[dict[str, Any]]
SOURCE hardware/lepro/config.py:75
LeproDevice
CYN-X interface for a physical Lepro Bluetooth device.
11 methods
hardware/lepro/devices.py:26
CYN-X interface for a physical Lepro Bluetooth device.
__init__
No description documented yet.
hardware/lepro/devices.py:29
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, name: str, mac: str)
PARAMETERS
self
name
str
mac
str
RETURNS Not documented
SOURCE hardware/lepro/devices.py:29
has_credentials
Return True if this device has been bonded.
hardware/lepro/devices.py:37
WHAT IT DOES

Return True if this device has been bonded.

SIGNATURE
has_credentials(self) -> bool
PARAMETERS
self
RETURNS bool
SOURCE hardware/lepro/devices.py:37
credential_path
Return the path where Lepro stores this device's credentials.
hardware/lepro/devices.py:41
WHAT IT DOES

Return the path where Lepro stores this device's credentials.

SIGNATURE
credential_path(self)
PARAMETERS
self
RETURNS Not documented
SOURCE hardware/lepro/devices.py:41
connect
Connect to the physical Lepro device.
hardware/lepro/devices.py:49
WHAT IT DOES

Connect to the physical Lepro device.

SIGNATURE
connect(self)
PARAMETERS
self
RETURNS Not documented
SOURCE hardware/lepro/devices.py:49
bond
Bond this device with CYN-X.
hardware/lepro/devices.py:57
WHAT IT DOES

Bond this device with CYN-X.

SIGNATURE
bond(self, force: bool = False) -> Any
PARAMETERS
self
force
bool
= False
RETURNS Any
SOURCE hardware/lepro/devices.py:57
_run_control
Send a datapoint control payload to the device.
hardware/lepro/devices.py:80
WHAT IT DOES

Send a datapoint control payload to the device.

SIGNATURE
_run_control(self, payload: dict[str, Any] | list[str]) -> Any
PARAMETERS
self
payload
dict[str, Any] | list[str]
RETURNS Any
SOURCE hardware/lepro/devices.py:80
turn_on
Turn the light on.
hardware/lepro/devices.py:114
WHAT IT DOES

Turn the light on.

SIGNATURE
turn_on(self, brightness: int = 1000) -> Any
PARAMETERS
self
brightness
int
= 1000
RETURNS Any
SOURCE hardware/lepro/devices.py:114
turn_off
Turn the light off.
hardware/lepro/devices.py:126
WHAT IT DOES

Turn the light off.

SIGNATURE
turn_off(self) -> Any
PARAMETERS
self
RETURNS Any
SOURCE hardware/lepro/devices.py:126
set_color_rgb
Set the light color using RGB values.
hardware/lepro/devices.py:137
WHAT IT DOES

Set the light color using RGB values.

SIGNATURE
set_color_rgb(self, red: int, green: int, blue: int, brightness: int = 1000) -> Any
PARAMETERS
self
red
int
green
int
blue
int
brightness
int
= 1000
RETURNS Any
SOURCE hardware/lepro/devices.py:137
set_color_hsv
Set the light color using HSV values.
hardware/lepro/devices.py:155
WHAT IT DOES

Set the light color using HSV values.

SIGNATURE
set_color_hsv(self, hue: float, saturation: int = 1000, value: int = 1000, brightness: int = 1000) -> Any
PARAMETERS
self
hue
float
saturation
int
= 1000
value
int
= 1000
brightness
int
= 1000
RETURNS Any
SOURCE hardware/lepro/devices.py:155
get_status
Query the current datapoint state of the light. This uses the upstream Lepro protocol directly without modifying the upstream lib…
hardware/lepro/devices.py:177
WHAT IT DOES

Query the current datapoint state of the light. This uses the upstream Lepro protocol directly without modifying the upstream library.

SIGNATURE
get_status(self) -> dict[str, Any]
PARAMETERS
self
RETURNS dict[str, Any]
SOURCE hardware/lepro/devices.py:177
LeproDiscovery
Find nearby Lepro Bluetooth devices.
2 methods
hardware/lepro/discovery.py:9
Find nearby Lepro Bluetooth devices.
__init__
No description documented yet.
hardware/lepro/discovery.py:12
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, timeout: float = 15.0)
PARAMETERS
self
timeout
float
= 15.0
RETURNS Not documented
SOURCE hardware/lepro/discovery.py:12
scan
No description documented yet.
hardware/lepro/discovery.py:18
WHAT IT DOES

No description documented yet.

SIGNATURE
scan(self) -> list[dict[str, Any]]
PARAMETERS
self
RETURNS list[dict[str, Any]]
SOURCE hardware/lepro/discovery.py:18
BondTokens
No description documented yet.
3 methods
hardware/lepro/lib/lepro/bond.py:43
No description documented yet.
validate
No description documented yet.
hardware/lepro/lib/lepro/bond.py:50
WHAT IT DOES

No description documented yet.

SIGNATURE
validate(self) -> None
PARAMETERS
self
RETURNS None
SOURCE hardware/lepro/lib/lepro/bond.py:50
to_dict
No description documented yet.
hardware/lepro/lib/lepro/bond.py:57
WHAT IT DOES

No description documented yet.

SIGNATURE
to_dict(self) -> dict[str, str]
PARAMETERS
self
RETURNS dict[str, str]
SOURCE hardware/lepro/lib/lepro/bond.py:57
from_dict
No description documented yet.
hardware/lepro/lib/lepro/bond.py:61
WHAT IT DOES

No description documented yet.

SIGNATURE
from_dict(cls, d: dict[str, str]) -> BondTokens
PARAMETERS
cls
d
dict[str, str]
RETURNS BondTokens
SOURCE hardware/lepro/lib/lepro/bond.py:61
DECORATORS
classmethod
BondCredentials
No description documented yet.
3 methods
hardware/lepro/lib/lepro/bond.py:72
No description documented yet.
__post_init__
No description documented yet.
hardware/lepro/lib/lepro/bond.py:78
WHAT IT DOES

No description documented yet.

SIGNATURE
__post_init__(self) -> None
PARAMETERS
self
RETURNS None
SOURCE hardware/lepro/lib/lepro/bond.py:78
to_json_dict
No description documented yet.
hardware/lepro/lib/lepro/bond.py:83
WHAT IT DOES

No description documented yet.

SIGNATURE
to_json_dict(self) -> dict
PARAMETERS
self
RETURNS dict
SOURCE hardware/lepro/lib/lepro/bond.py:83
from_json_dict
No description documented yet.
hardware/lepro/lib/lepro/bond.py:92
WHAT IT DOES

No description documented yet.

SIGNATURE
from_json_dict(cls, d: dict) -> BondCredentials
PARAMETERS
cls
d
dict
RETURNS BondCredentials
SOURCE hardware/lepro/lib/lepro/bond.py:92
DECORATORS
classmethod
BondHarvestError
Bond or token step failed.
0 methods
hardware/lepro/lib/lepro/bond.py:101
Bond or token step failed.
No methods discovered.
DeviceConfig
No description documented yet.
0 methods
hardware/lepro/lib/lepro/config.py:17
No description documented yet.
No methods discovered.
LabConfig
No description documented yet.
0 methods
hardware/lepro/lib/lepro/config.py:23
No description documented yet.
No methods discovered.
WifiConfig
No description documented yet.
0 methods
hardware/lepro/lib/lepro/config.py:30
No description documented yet.
No methods discovered.
BridgeConfig
No description documented yet.
0 methods
hardware/lepro/lib/lepro/config.py:36
No description documented yet.
No methods discovered.
LeproLabConfig
No description documented yet.
0 methods
hardware/lepro/lib/lepro/config.py:44
No description documented yet.
No methods discovered.
BytePatch
No description documented yet.
0 methods
hardware/lepro/lib/lepro/firmware_profile.py:18
No description documented yet.
No methods discovered.
BundleConfig
No description documented yet.
0 methods
hardware/lepro/lib/lepro/firmware_profile.py:26
No description documented yet.
No methods discovered.
FirmwareProfile
No description documented yet.
0 methods
hardware/lepro/lib/lepro/firmware_profile.py:36
No description documented yet.
No methods discovered.
PatchProfiles
No description documented yet.
1 methods
hardware/lepro/lib/lepro/firmware_profile.py:49
No description documented yet.
by_id
No description documented yet.
hardware/lepro/lib/lepro/firmware_profile.py:53
WHAT IT DOES

No description documented yet.

SIGNATURE
by_id(self, profile_id: str) -> FirmwareProfile
PARAMETERS
self
profile_id
str
RETURNS FirmwareProfile
SOURCE hardware/lepro/lib/lepro/firmware_profile.py:53
DecryptedFrame
No description documented yet.
0 methods
hardware/lepro/lib/lepro/frame.py:51
No description documented yet.
No methods discovered.
RxAssembler
Reassemble fragmented RX packets and optionally decrypt.
8 methods
hardware/lepro/lib/lepro/frame.py:73
Reassemble fragmented RX packets and optionally decrypt.
__init__
No description documented yet.
hardware/lepro/lib/lepro/frame.py:76
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, mac: str, session_rand: int | None = None) -> None
PARAMETERS
self
mac
str
session_rand
int | None
= None
RETURNS None
SOURCE hardware/lepro/lib/lepro/frame.py:76
set_session_rand
Update key after 0x1000 hello reveals bleInit rand() in ctx1.
hardware/lepro/lib/lepro/frame.py:90
WHAT IT DOES

Update key after 0x1000 hello reveals bleInit rand() in ctx1.

SIGNATURE
set_session_rand(self, session_rand: int) -> None
PARAMETERS
self
session_rand
int
RETURNS None
SOURCE hardware/lepro/lib/lepro/frame.py:90
feed
No description documented yet.
hardware/lepro/lib/lepro/frame.py:95
WHAT IT DOES

No description documented yet.

SIGNATURE
feed(self, raw: bytes) -> list[DecryptedFrame]
PARAMETERS
self
raw
bytes
RETURNS list[DecryptedFrame]
SOURCE hardware/lepro/lib/lepro/frame.py:95
_reset_fragment
No description documented yet.
hardware/lepro/lib/lepro/frame.py:111
WHAT IT DOES

No description documented yet.

SIGNATURE
_reset_fragment(self) -> None
PARAMETERS
self
RETURNS None
SOURCE hardware/lepro/lib/lepro/frame.py:111
_feed_fragment
No description documented yet.
hardware/lepro/lib/lepro/frame.py:116
WHAT IT DOES

No description documented yet.

SIGNATURE
_feed_fragment(self, raw: bytes, magic2: int) -> list[DecryptedFrame]
PARAMETERS
self
raw
bytes
magic2
int
RETURNS list[DecryptedFrame]
SOURCE hardware/lepro/lib/lepro/frame.py:116
_dispatch_single
No description documented yet.
hardware/lepro/lib/lepro/frame.py:176
WHAT IT DOES

No description documented yet.

SIGNATURE
_dispatch_single(self, raw: bytes) -> list[DecryptedFrame]
PARAMETERS
self
raw
bytes
RETURNS list[DecryptedFrame]
SOURCE hardware/lepro/lib/lepro/frame.py:176
_maybe_decrypt
No description documented yet.
hardware/lepro/lib/lepro/frame.py:188
WHAT IT DOES

No description documented yet.

SIGNATURE
_maybe_decrypt(self, frame: DecryptedFrame) -> DecryptedFrame
PARAMETERS
self
frame
DecryptedFrame
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/frame.py:188
_synthetic_body
No description documented yet.
hardware/lepro/lib/lepro/frame.py:206
WHAT IT DOES

No description documented yet.

SIGNATURE
_synthetic_body(seq: int, magic2: int, ptype: int, subtype: int, payload: bytes) -> bytes
PARAMETERS
seq
int
magic2
int
ptype
int
subtype
int
payload
bytes
RETURNS bytes
SOURCE hardware/lepro/lib/lepro/frame.py:206
DECORATORS
staticmethod
OtaStartResponse
No description documented yet.
0 methods
hardware/lepro/lib/lepro/frame.py:226
No description documented yet.
No methods discovered.
OtaDataResponse
No description documented yet.
0 methods
hardware/lepro/lib/lepro/frame.py:233
No description documented yet.
No methods discovered.
ModeSpec
No description documented yet.
0 methods
hardware/lepro/lib/lepro/modes.py:280
No description documented yet.
No methods discovered.
OtaTransferResult
Outcome of the BLE OTA data phase.
2 methods
hardware/lepro/lib/lepro/ota.py:104
Outcome of the BLE OTA data phase.
finalize_code
No description documented yet.
hardware/lepro/lib/lepro/ota.py:113
WHAT IT DOES

No description documented yet.

SIGNATURE
finalize_code(self) -> int | None
PARAMETERS
self
RETURNS int | None
SOURCE hardware/lepro/lib/lepro/ota.py:113
DECORATORS
property
transfer_complete
No description documented yet.
hardware/lepro/lib/lepro/ota.py:117
WHAT IT DOES

No description documented yet.

SIGNATURE
transfer_complete(self) -> bool
PARAMETERS
self
RETURNS bool
SOURCE hardware/lepro/lib/lepro/ota.py:117
DECORATORS
property
OtaConfirmVerdict
Post-reboot discovery verdict.
0 methods
hardware/lepro/lib/lepro/ota.py:122
Post-reboot discovery verdict.
No methods discovered.
OtaLog
Timestamped, flushed stdout logging for long OTA runs.
3 methods
hardware/lepro/lib/lepro/ota.py:133
Timestamped, flushed stdout logging for long OTA runs.
info
No description documented yet.
hardware/lepro/lib/lepro/ota.py:138
WHAT IT DOES

No description documented yet.

SIGNATURE
info(self, msg: str) -> None
PARAMETERS
self
msg
str
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:138
phase
No description documented yet.
hardware/lepro/lib/lepro/ota.py:144
WHAT IT DOES

No description documented yet.

SIGNATURE
phase(self, name: str) -> None
PARAMETERS
self
name
str
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:144
wait
No description documented yet.
hardware/lepro/lib/lepro/ota.py:147
WHAT IT DOES

No description documented yet.

SIGNATURE
wait(self, msg: str, timeout: float) -> None
PARAMETERS
self
msg
str
timeout
float
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:147
OtaTransport
BLE transport with compact or full TX/RX logging.
2 methods
hardware/lepro/lib/lepro/ota.py:153
BLE transport with compact or full TX/RX logging.
on_notify
No description documented yet.
hardware/lepro/lib/lepro/ota.py:159
WHAT IT DOES

No description documented yet.

SIGNATURE
on_notify(self, _sender: object, data: bytearray) -> None
PARAMETERS
self
_sender
object
data
bytearray
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:159
send
No description documented yet.
hardware/lepro/lib/lepro/ota.py:165
WHAT IT DOES

No description documented yet.

SIGNATURE
send(self, data: bytes, label: str = '') -> None
PARAMETERS
self
data
bytes
label
str
= ''
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:165
BleOtaSession
Discovery + auth + chunked OTA transfer.
2 methods
hardware/lepro/lib/lepro/ota.py:951
Discovery + auth + chunked OTA transfer.
__init__
No description documented yet.
hardware/lepro/lib/lepro/ota.py:954
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, session: LeproSession, firmware: Path, image: bytes, log: OtaLog) -> None
PARAMETERS
self
session
LeproSession
firmware
Path
image
bytes
log
OtaLog
RETURNS None
SOURCE hardware/lepro/lib/lepro/ota.py:954
run
No description documented yet.
hardware/lepro/lib/lepro/ota.py:966
WHAT IT DOES

No description documented yet.

SIGNATURE
run(self, json_bytes: bytes, chunk_size: int = 4096, max_retries: int = 3, dry_run: bool = False) -> OtaTransferResult
PARAMETERS
self
json_bytes
bytes
chunk_size
int
= 4096
max_retries
int
= 3
dry_run
bool
= False
RETURNS OtaTransferResult
SOURCE hardware/lepro/lib/lepro/ota.py:966
BundleLayout
No description documented yet.
1 methods
hardware/lepro/lib/lepro/patch_cdn.py:68
No description documented yet.
record_len
No description documented yet.
hardware/lepro/lib/lepro/patch_cdn.py:78
WHAT IT DOES

No description documented yet.

SIGNATURE
record_len(self) -> int
PARAMETERS
self
RETURNS int
SOURCE hardware/lepro/lib/lepro/patch_cdn.py:78
DECORATORS
property
PatchResult
No description documented yet.
0 methods
hardware/lepro/lib/lepro/patch_cdn.py:83
No description documented yet.
No methods discovered.
PacketHeader
No description documented yet.
0 methods
hardware/lepro/lib/lepro/protocol.py:138
No description documented yet.
No methods discovered.
SessionConfig
No description documented yet.
0 methods
hardware/lepro/lib/lepro/session.py:55
No description documented yet.
No methods discovered.
DeviceInfo
No description documented yet.
3 methods
hardware/lepro/lib/lepro/session.py:66
No description documented yet.
prov_state
OTA/provisioning state-machine value (device-info byte[1] = ota_ctx+0x10).
hardware/lepro/lib/lepro/session.py:71
WHAT IT DOES

OTA/provisioning state-machine value (device-info byte[1] = ota_ctx+0x10).

SIGNATURE
prov_state(self) -> int | None
PARAMETERS
self
RETURNS int | None
SOURCE hardware/lepro/lib/lepro/session.py:71
DECORATORS
property
prov_slot
Retained provisioning flag (device-info byte[2], from ota_ctx slot 0x42000b3c). Verified in ZB1 v2.3.18 build_device_info_reply:…
hardware/lepro/lib/lepro/session.py:76
WHAT IT DOES

Retained provisioning flag (device-info byte[2], from ota_ctx slot 0x42000b3c). Verified in ZB1 v2.3.18 build_device_info_reply: 6 = addable/onboarding (slot unset or factory), 7 = provisioned. NOTE: a power-cycle reset re-enters onboarding via the reboot counter WITHOUT clearing this slot, so a 7 here does NOT prove the CDN cert fetch is disabled — it is only conclusive when 6.

SIGNATURE
prov_slot(self) -> int | None
PARAMETERS
self
RETURNS int | None
SOURCE hardware/lepro/lib/lepro/session.py:76
DECORATORS
property
provisioning_summary
One-line human-readable provisioning/cert-fetch status for CLI output.
hardware/lepro/lib/lepro/session.py:87
WHAT IT DOES

One-line human-readable provisioning/cert-fetch status for CLI output.

SIGNATURE
provisioning_summary(self) -> str
PARAMETERS
self
RETURNS str
SOURCE hardware/lepro/lib/lepro/session.py:87
Transport
No description documented yet.
3 methods
hardware/lepro/lib/lepro/session.py:104
No description documented yet.
send
No description documented yet.
hardware/lepro/lib/lepro/session.py:105
WHAT IT DOES

No description documented yet.

SIGNATURE
send(self, data: bytes, label: str = '') -> None
PARAMETERS
self
data
bytes
label
str
= ''
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:105
recv
No description documented yet.
hardware/lepro/lib/lepro/session.py:106
WHAT IT DOES

No description documented yet.

SIGNATURE
recv(self, timeout: float) -> bytes | None
PARAMETERS
self
timeout
float
RETURNS bytes | None
SOURCE hardware/lepro/lib/lepro/session.py:106
drain
No description documented yet.
hardware/lepro/lib/lepro/session.py:107
WHAT IT DOES

No description documented yet.

SIGNATURE
drain(self, timeout: float) -> list[bytes]
PARAMETERS
self
timeout
float
RETURNS list[bytes]
SOURCE hardware/lepro/lib/lepro/session.py:107
DryRunTransport
Collect TX packets without BLE.
3 methods
hardware/lepro/lib/lepro/session.py:111
Collect TX packets without BLE.
send
No description documented yet.
hardware/lepro/lib/lepro/session.py:116
WHAT IT DOES

No description documented yet.

SIGNATURE
send(self, data: bytes, label: str = '') -> None
PARAMETERS
self
data
bytes
label
str
= ''
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:116
recv
No description documented yet.
hardware/lepro/lib/lepro/session.py:119
WHAT IT DOES

No description documented yet.

SIGNATURE
recv(self, timeout: float) -> bytes | None
PARAMETERS
self
timeout
float
RETURNS bytes | None
SOURCE hardware/lepro/lib/lepro/session.py:119
drain
No description documented yet.
hardware/lepro/lib/lepro/session.py:122
WHAT IT DOES

No description documented yet.

SIGNATURE
drain(self, timeout: float) -> list[bytes]
PARAMETERS
self
timeout
float
RETURNS list[bytes]
SOURCE hardware/lepro/lib/lepro/session.py:122
BleakTransport
No description documented yet.
4 methods
hardware/lepro/lib/lepro/session.py:127
No description documented yet.
on_notify
No description documented yet.
hardware/lepro/lib/lepro/session.py:134
WHAT IT DOES

No description documented yet.

SIGNATURE
on_notify(self, _sender: object, data: bytearray) -> None
PARAMETERS
self
_sender
object
data
bytearray
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:134
send
No description documented yet.
hardware/lepro/lib/lepro/session.py:140
WHAT IT DOES

No description documented yet.

SIGNATURE
send(self, data: bytes, label: str = '') -> None
PARAMETERS
self
data
bytes
label
str
= ''
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:140
recv
No description documented yet.
hardware/lepro/lib/lepro/session.py:145
WHAT IT DOES

No description documented yet.

SIGNATURE
recv(self, timeout: float) -> bytes | None
PARAMETERS
self
timeout
float
RETURNS bytes | None
SOURCE hardware/lepro/lib/lepro/session.py:145
drain
No description documented yet.
hardware/lepro/lib/lepro/session.py:151
WHAT IT DOES

No description documented yet.

SIGNATURE
drain(self, timeout: float) -> list[bytes]
PARAMETERS
self
timeout
float
RETURNS list[bytes]
SOURCE hardware/lepro/lib/lepro/session.py:151
LeproSession
No description documented yet.
18 methods
hardware/lepro/lib/lepro/session.py:166
No description documented yet.
__init__
No description documented yet.
hardware/lepro/lib/lepro/session.py:167
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, mac: str, transport: Transport, config: SessionConfig | None = None) -> None
PARAMETERS
self
mac
str
transport
Transport
config
SessionConfig | None
= None
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:167
_require_session_rand
No description documented yet.
hardware/lepro/lib/lepro/session.py:183
WHAT IT DOES

No description documented yet.

SIGNATURE
_require_session_rand(self) -> int
PARAMETERS
self
RETURNS int
SOURCE hardware/lepro/lib/lepro/session.py:183
_send
No description documented yet.
hardware/lepro/lib/lepro/session.py:188
WHAT IT DOES

No description documented yet.

SIGNATURE
_send(self, pkt: bytes, label: str = '') -> None
PARAMETERS
self
pkt
bytes
label
str
= ''
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:188
_next_seq
No description documented yet.
hardware/lepro/lib/lepro/session.py:192
WHAT IT DOES

No description documented yet.

SIGNATURE
_next_seq(self) -> int
PARAMETERS
self
RETURNS int
SOURCE hardware/lepro/lib/lepro/session.py:192
_ingest_rx
No description documented yet.
hardware/lepro/lib/lepro/session.py:197
WHAT IT DOES

No description documented yet.

SIGNATURE
_ingest_rx(self, raw: bytes) -> list[DecryptedFrame]
PARAMETERS
self
raw
bytes
RETURNS list[DecryptedFrame]
SOURCE hardware/lepro/lib/lepro/session.py:197
_wait_opcode
No description documented yet.
hardware/lepro/lib/lepro/session.py:203
WHAT IT DOES

No description documented yet.

SIGNATURE
_wait_opcode(self, opcode: int, timeout: float | None = None) -> DecryptedFrame
PARAMETERS
self
opcode
int
timeout
float | None
= None
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/session.py:203
_wait_any
No description documented yet.
hardware/lepro/lib/lepro/session.py:217
WHAT IT DOES

No description documented yet.

SIGNATURE
_wait_any(self, opcodes: set[int], timeout: float) -> DecryptedFrame
PARAMETERS
self
opcodes
set[int]
timeout
float
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/session.py:217
run_phase_discovery
No description documented yet.
hardware/lepro/lib/lepro/session.py:231
WHAT IT DOES

No description documented yet.

SIGNATURE
run_phase_discovery(self) -> DeviceInfo
PARAMETERS
self
RETURNS DeviceInfo
SOURCE hardware/lepro/lib/lepro/session.py:231
_wait_new_auth_resp
No description documented yet.
hardware/lepro/lib/lepro/session.py:269
WHAT IT DOES

No description documented yet.

SIGNATURE
_wait_new_auth_resp(self, after_count: int, timeout: float) -> DecryptedFrame
PARAMETERS
self
after_count
int
timeout
float
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/session.py:269
_request_bond
No description documented yet.
hardware/lepro/lib/lepro/session.py:285
WHAT IT DOES

No description documented yet.

SIGNATURE
_request_bond(self, payload: bytes, label: str) -> DecryptedFrame
PARAMETERS
self
payload
bytes
label
str
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/session.py:285
run_phase_bond
No description documented yet.
hardware/lepro/lib/lepro/session.py:290
WHAT IT DOES

No description documented yet.

SIGNATURE
run_phase_bond(self, fallback_hs: bytes | None = None) -> BondTokens
PARAMETERS
self
fallback_hs
bytes | None
= None
RETURNS BondTokens
SOURCE hardware/lepro/lib/lepro/session.py:290
_wait_auth_resp
No description documented yet.
hardware/lepro/lib/lepro/session.py:321
WHAT IT DOES

No description documented yet.

SIGNATURE
_wait_auth_resp(self, timeout: float | None = None) -> DecryptedFrame
PARAMETERS
self
timeout
float | None
= None
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/session.py:321
run_phase_auth
No description documented yet.
hardware/lepro/lib/lepro/session.py:324
WHAT IT DOES

No description documented yet.

SIGNATURE
run_phase_auth(self, creds: BondCredentials) -> None
PARAMETERS
self
creds
BondCredentials
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:324
send_dp_ciphertext
No description documented yet.
hardware/lepro/lib/lepro/session.py:339
WHAT IT DOES

No description documented yet.

SIGNATURE
send_dp_ciphertext(self, ciphertext: bytes) -> None
PARAMETERS
self
ciphertext
bytes
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:339
send_dp_payload
No description documented yet.
hardware/lepro/lib/lepro/session.py:345
WHAT IT DOES

No description documented yet.

SIGNATURE
send_dp_payload(self, payload: DpPayload) -> None
PARAMETERS
self
payload
DpPayload
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:345
send_get_dp_state
No description documented yet.
hardware/lepro/lib/lepro/session.py:353
WHAT IT DOES

No description documented yet.

SIGNATURE
send_get_dp_state(self, payload: DpPayload) -> DecryptedFrame
PARAMETERS
self
payload
DpPayload
RETURNS DecryptedFrame
SOURCE hardware/lepro/lib/lepro/session.py:353
commit_control
No description documented yet.
hardware/lepro/lib/lepro/session.py:360
WHAT IT DOES

No description documented yet.

SIGNATURE
commit_control(self, creds: BondCredentials) -> None
PARAMETERS
self
creds
BondCredentials
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:360
run_control
Full control session. pre_bulk_pages is only for large scene uploads (capture 11:17 colour).
hardware/lepro/lib/lepro/session.py:379
WHAT IT DOES

Full control session. pre_bulk_pages is only for large scene uploads (capture 11:17 colour).

SIGNATURE
run_control(self, creds: BondCredentials, dp_payload: DpPayload, pre_bulk_pages: list[bytes] | None = None) -> None
PARAMETERS
self
creds
BondCredentials
dp_payload
DpPayload
pre_bulk_pages
list[bytes] | None
= None
RETURNS None
SOURCE hardware/lepro/lib/lepro/session.py:379
Segment
No description documented yet.
2 methods
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:42
No description documented yet.
p_flags
No description documented yet.
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:48
WHAT IT DOES

No description documented yet.

SIGNATURE
p_flags(self) -> int
PARAMETERS
self
RETURNS int
SOURCE hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:48
DECORATORS
property
sh_flags
No description documented yet.
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:63
WHAT IT DOES

No description documented yet.

SIGNATURE
sh_flags(self) -> int
PARAMETERS
self
RETURNS int
SOURCE hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py:63
DECORATORS
property
Elf32
No description documented yet.
5 methods
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:122
No description documented yet.
__init__
No description documented yet.
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:123
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, data: bytes) -> None
PARAMETERS
self
data
bytes
RETURNS None
SOURCE hardware/lepro/lib/lepro/tools/validate_ota_parser.py:123
u32
No description documented yet.
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:131
WHAT IT DOES

No description documented yet.

SIGNATURE
u32(self, off: int) -> int
PARAMETERS
self
off
int
RETURNS int
SOURCE hardware/lepro/lib/lepro/tools/validate_ota_parser.py:131
vma_to_offset
No description documented yet.
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:134
WHAT IT DOES

No description documented yet.

SIGNATURE
vma_to_offset(self, vma: int) -> int | None
PARAMETERS
self
vma
int
RETURNS int | None
SOURCE hardware/lepro/lib/lepro/tools/validate_ota_parser.py:134
read_cstr
No description documented yet.
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:146
WHAT IT DOES

No description documented yet.

SIGNATURE
read_cstr(self, vma: int) -> str | None
PARAMETERS
self
vma
int
RETURNS str | None
SOURCE hardware/lepro/lib/lepro/tools/validate_ota_parser.py:146
pool_strings
No description documented yet.
hardware/lepro/lib/lepro/tools/validate_ota_parser.py:153
WHAT IT DOES

No description documented yet.

SIGNATURE
pool_strings(self, pool_vma: int, count: int) -> list[tuple[int, int, str | None]]
PARAMETERS
self
pool_vma
int
count
int
RETURNS list[tuple[int, int, str | None]]
SOURCE hardware/lepro/lib/lepro/tools/validate_ota_parser.py:153
LeproSetup
Interactive setup process for Lepro devices.
3 methods
hardware/lepro/setup.py:12
Interactive setup process for Lepro devices.
__init__
No description documented yet.
hardware/lepro/setup.py:15
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, base_dir: Path | None = None)
PARAMETERS
self
base_dir
Path | None
= None
RETURNS Not documented
SOURCE hardware/lepro/setup.py:15
run
No description documented yet.
hardware/lepro/setup.py:28
WHAT IT DOES

No description documented yet.

SIGNATURE
run(self) -> dict[str, Any]
PARAMETERS
self
RETURNS dict[str, Any]
SOURCE hardware/lepro/setup.py:28
fail
No description documented yet.
hardware/lepro/setup.py:254
WHAT IT DOES

No description documented yet.

SIGNATURE
fail(stage: str, message: str) -> dict[str, Any]
PARAMETERS
stage
str
message
str
RETURNS dict[str, Any]
SOURCE hardware/lepro/setup.py:254
DECORATORS
staticmethod
DiscordAdapter
No description documented yet.
2 methods
interfaces/discord_bot.py:8
No description documented yet.
__init__
No description documented yet.
interfaces/discord_bot.py:9
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, chat_engine, logger = None)
PARAMETERS
self
chat_engine
logger
= None
RETURNS Not documented
SOURCE interfaces/discord_bot.py:9
start
No description documented yet.
interfaces/discord_bot.py:13
WHAT IT DOES

No description documented yet.

SIGNATURE
start(self)
PARAMETERS
self
RETURNS Not documented
SOURCE interfaces/discord_bot.py:13
TerminalAdapter
No description documented yet.
2 methods
interfaces/terminal.py:8
No description documented yet.
__init__
No description documented yet.
interfaces/terminal.py:9
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, chat_engine, logger = None)
PARAMETERS
self
chat_engine
logger
= None
RETURNS Not documented
SOURCE interfaces/terminal.py:9
run
No description documented yet.
interfaces/terminal.py:13
WHAT IT DOES

No description documented yet.

SIGNATURE
run(self)
PARAMETERS
self
RETURNS Not documented
SOURCE interfaces/terminal.py:13
WebUIAdapter
No description documented yet.
2 methods
interfaces/web_ui.py:5
No description documented yet.
__init__
No description documented yet.
interfaces/web_ui.py:6
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, chat_engine, logger = None)
PARAMETERS
self
chat_engine
logger
= None
RETURNS Not documented
SOURCE interfaces/web_ui.py:6
start
No description documented yet.
interfaces/web_ui.py:10
WHAT IT DOES

No description documented yet.

SIGNATURE
start(self, host = '127.0.0.1', port = 8000)
PARAMETERS
self
host
= '127.0.0.1'
port
= 8000
RETURNS Not documented
SOURCE interfaces/web_ui.py:10
EmbeddingsProvider
No description documented yet.
4 methods
memory/embeddings.py:8
No description documented yet.
__init__
No description documented yet.
memory/embeddings.py:9
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE memory/embeddings.py:9
embed
No description documented yet.
memory/embeddings.py:12
WHAT IT DOES

No description documented yet.

SIGNATURE
embed(self, texts: List[str]) -> List[List[float]]
PARAMETERS
self
texts
List[str]
RETURNS List[List[float]]
SOURCE memory/embeddings.py:12
store_embeddings
No description documented yet.
memory/embeddings.py:15
WHAT IT DOES

No description documented yet.

SIGNATURE
store_embeddings(self, ids: List[int], vectors: List[List[float]])
PARAMETERS
self
ids
List[int]
vectors
List[List[float]]
RETURNS Not documented
SOURCE memory/embeddings.py:15
query
No description documented yet.
memory/embeddings.py:18
WHAT IT DOES

No description documented yet.

SIGNATURE
query(self, vector: List[float], top_k: int = 5)
PARAMETERS
self
vector
List[float]
top_k
int
= 5
RETURNS Not documented
SOURCE memory/embeddings.py:18
MemoryManager
No description documented yet.
1 methods
memory/memory.py:20
No description documented yet.
__init__
No description documented yet.
memory/memory.py:23
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, conn)
PARAMETERS
self
conn
RETURNS Not documented
SOURCE memory/memory.py:23
ToolResult
No description documented yet.
0 methods
tools/base.py:9
No description documented yet.
No methods discovered.
BaseTool
No description documented yet.
1 methods
tools/base.py:15
No description documented yet.
call
No description documented yet.
tools/base.py:19
WHAT IT DOES

No description documented yet.

SIGNATURE
call(self, args: Dict) -> ToolResult
PARAMETERS
self
args
Dict
RETURNS ToolResult
SOURCE tools/base.py:19
CalculatorTool
No description documented yet.
2 methods
tools/calculator.py:9
No description documented yet.
_safe_eval
No description documented yet.
tools/calculator.py:13
WHAT IT DOES

No description documented yet.

SIGNATURE
_safe_eval(self, expr: str) -> float
PARAMETERS
self
expr
str
RETURNS float
SOURCE tools/calculator.py:13
call
No description documented yet.
tools/calculator.py:23
WHAT IT DOES

No description documented yet.

SIGNATURE
call(self, args: Dict) -> ToolResult
PARAMETERS
self
args
Dict
RETURNS ToolResult
SOURCE tools/calculator.py:23
ChartTool
General-purpose CYN-X visualization tool. The output is a structured object intended for the frontend.
18 methods
tools/chart_tool.py:40
General-purpose CYN-X visualization tool. The output is a structured object intended for the frontend.
call
Main BaseTool entry point. ToolRouter calls: tool.call(args) and expects a ToolResult.
tools/chart_tool.py:68
WHAT IT DOES

Main BaseTool entry point. ToolRouter calls: tool.call(args) and expects a ToolResult.

SIGNATURE
call(self, args: Dict[str, Any]) -> ToolResult
PARAMETERS
self
args
Dict[str, Any]
RETURNS ToolResult
SOURCE tools/chart_tool.py:68
create_chart
Create one complete chart specification.
tools/chart_tool.py:140
WHAT IT DOES

Create one complete chart specification.

SIGNATURE
create_chart(self, chart_type: str, title: str, data: List[Dict[str, Any]], x_key: str | None = None, series: List[Dict[str, Any]] | None = None, description: str | None = None, footer: str | None = None, x_axis_label: str | None = None, x_axis_scale: str | None = None, y_axis_min: float | None = None, y_axis_max: float | None = None, layout: str | None = None, name_key: str | None = None, value_key: str | None = None) -> Dict[str, Any]
PARAMETERS
self
chart_type
str
title
str
data
List[Dict[str, Any]]
x_key
str | None
= None
series
List[Dict[str, Any]] | None
= None
description
str | None
= None
footer
str | None
= None
x_axis_label
str | None
= None
x_axis_scale
str | None
= None
y_axis_min
float | None
= None
y_axis_max
float | None
= None
layout
str | None
= None
name_key
str | None
= None
value_key
str | None
= None
RETURNS Dict[str, Any]
SOURCE tools/chart_tool.py:140
bar
No description documented yet.
tools/chart_tool.py:291
WHAT IT DOES

No description documented yet.

SIGNATURE
bar(self, title: str, data: List[Dict[str, Any]], x_key: str, series: List[Dict[str, Any]], **kwargs: Any) -> Dict[str, Any]
PARAMETERS
self
title
str
data
List[Dict[str, Any]]
x_key
str
series
List[Dict[str, Any]]
**kwargs
Any
RETURNS Dict[str, Any]
SOURCE tools/chart_tool.py:291
line
No description documented yet.
tools/chart_tool.py:309
WHAT IT DOES

No description documented yet.

SIGNATURE
line(self, title: str, data: List[Dict[str, Any]], x_key: str, series: List[Dict[str, Any]], **kwargs: Any) -> Dict[str, Any]
PARAMETERS
self
title
str
data
List[Dict[str, Any]]
x_key
str
series
List[Dict[str, Any]]
**kwargs
Any
RETURNS Dict[str, Any]
SOURCE tools/chart_tool.py:309
pie
No description documented yet.
tools/chart_tool.py:327
WHAT IT DOES

No description documented yet.

SIGNATURE
pie(self, title: str, data: List[Dict[str, Any]], name_key: str, value_key: str, series: List[Dict[str, Any]] | None = None, **kwargs: Any) -> Dict[str, Any]
PARAMETERS
self
title
str
data
List[Dict[str, Any]]
name_key
str
value_key
str
series
List[Dict[str, Any]] | None
= None
**kwargs
Any
RETURNS Dict[str, Any]
SOURCE tools/chart_tool.py:327
scatter
No description documented yet.
tools/chart_tool.py:347
WHAT IT DOES

No description documented yet.

SIGNATURE
scatter(self, title: str, data: List[Dict[str, Any]], x_key: str, series: List[Dict[str, Any]], **kwargs: Any) -> Dict[str, Any]
PARAMETERS
self
title
str
data
List[Dict[str, Any]]
x_key
str
series
List[Dict[str, Any]]
**kwargs
Any
RETURNS Dict[str, Any]
SOURCE tools/chart_tool.py:347
make_series
Build a series definition. Example: ChartTool.make_series( data_key="cigarettes", label="Cigarettes", axis_label="Cigarettes", va…
tools/chart_tool.py:370
WHAT IT DOES

Build a series definition. Example: ChartTool.make_series( data_key="cigarettes", label="Cigarettes", axis_label="Cigarettes", value_format="integer", )

SIGNATURE
make_series(data_key: str, label: str | None = None, axis_label: str | None = None, value_format: str | None = None, value_prefix: str | None = None, value_suffix: str | None = None, stack: str | None = None) -> Dict[str, Any]
PARAMETERS
data_key
str
label
str | None
= None
axis_label
str | None
= None
value_format
str | None
= None
value_prefix
str | None
= None
value_suffix
str | None
= None
stack
str | None
= None
RETURNS Dict[str, Any]
SOURCE tools/chart_tool.py:370
DECORATORS
staticmethod
_normalize_chart_type
No description documented yet.
tools/chart_tool.py:447
WHAT IT DOES

No description documented yet.

SIGNATURE
_normalize_chart_type(chart_type: str) -> str
PARAMETERS
chart_type
str
RETURNS str
SOURCE tools/chart_tool.py:447
DECORATORS
staticmethod
_normalize_series
No description documented yet.
tools/chart_tool.py:459
WHAT IT DOES

No description documented yet.

SIGNATURE
_normalize_series(cls, series: List[Dict[str, Any]]) -> List[Dict[str, Any]]
PARAMETERS
cls
series
List[Dict[str, Any]]
RETURNS List[Dict[str, Any]]
SOURCE tools/chart_tool.py:459
DECORATORS
classmethod
_validate_chart_type
No description documented yet.
tools/chart_tool.py:554
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_chart_type(self, chart_type: str) -> None
PARAMETERS
self
chart_type
str
RETURNS None
SOURCE tools/chart_tool.py:554
_validate_title
No description documented yet.
tools/chart_tool.py:570
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_title(title: str) -> None
PARAMETERS
title
str
RETURNS None
SOURCE tools/chart_tool.py:570
DECORATORS
staticmethod
_validate_data
No description documented yet.
tools/chart_tool.py:585
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_data(data: List[Dict[str, Any]]) -> None
PARAMETERS
data
List[Dict[str, Any]]
RETURNS None
SOURCE tools/chart_tool.py:585
DECORATORS
staticmethod
_validate_cartesian_chart
No description documented yet.
tools/chart_tool.py:607
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_cartesian_chart(chart_type: str, data: List[Dict[str, Any]], x_key: str | None, series: List[Dict[str, Any]]) -> None
PARAMETERS
chart_type
str
data
List[Dict[str, Any]]
x_key
str | None
series
List[Dict[str, Any]]
RETURNS None
SOURCE tools/chart_tool.py:607
DECORATORS
staticmethod
_validate_pie_chart
No description documented yet.
tools/chart_tool.py:648
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_pie_chart(data: List[Dict[str, Any]], name_key: str | None, value_key: str | None) -> None
PARAMETERS
data
List[Dict[str, Any]]
name_key
str | None
value_key
str | None
RETURNS None
SOURCE tools/chart_tool.py:648
DECORATORS
staticmethod
_validate_x_axis_scale
No description documented yet.
tools/chart_tool.py:705
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_x_axis_scale(chart_type: str, x_axis_scale: str, data: List[Dict[str, Any]], x_key: str | None) -> None
PARAMETERS
chart_type
str
x_axis_scale
str
data
List[Dict[str, Any]]
x_key
str | None
RETURNS None
SOURCE tools/chart_tool.py:705
DECORATORS
staticmethod
_validate_layout
No description documented yet.
tools/chart_tool.py:742
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_layout(layout: str) -> None
PARAMETERS
layout
str
RETURNS None
SOURCE tools/chart_tool.py:742
DECORATORS
staticmethod
_validate_y_axis
No description documented yet.
tools/chart_tool.py:752
WHAT IT DOES

No description documented yet.

SIGNATURE
_validate_y_axis(y_axis_min: float | None, y_axis_max: float | None) -> None
PARAMETERS
y_axis_min
float | None
y_axis_max
float | None
RETURNS None
SOURCE tools/chart_tool.py:752
DECORATORS
staticmethod
_format_output
Serialize the chart specification for ToolResult.output. ChatEngine can then parse/recognize the structured chart object rather t…
tools/chart_tool.py:792
WHAT IT DOES

Serialize the chart specification for ToolResult.output. ChatEngine can then parse/recognize the structured chart object rather than treating it as ordinary prose.

SIGNATURE
_format_output(chart: Dict[str, Any]) -> str
PARAMETERS
chart
Dict[str, Any]
RETURNS str
SOURCE tools/chart_tool.py:792
DECORATORS
staticmethod
ChartTool
No description documented yet.
3 methods
tools/ChartTool.py:18
No description documented yet.
_ensure_db
No description documented yet.
tools/ChartTool.py:22
WHAT IT DOES

No description documented yet.

SIGNATURE
_ensure_db(self)
PARAMETERS
self
RETURNS Not documented
SOURCE tools/ChartTool.py:22
_smoke_data
No description documented yet.
tools/ChartTool.py:35
WHAT IT DOES

No description documented yet.

SIGNATURE
_smoke_data(self, scope: str = '7d', smoke_type: str | None = None)
PARAMETERS
self
scope
str
= '7d'
smoke_type
str | None
= None
RETURNS Not documented
SOURCE tools/ChartTool.py:35
call
No description documented yet.
tools/ChartTool.py:93
WHAT IT DOES

No description documented yet.

SIGNATURE
call(self, args: Dict[str, Any]) -> ToolResult
PARAMETERS
self
args
Dict[str, Any]
RETURNS ToolResult
SOURCE tools/ChartTool.py:93
FilesystemTool
No description documented yet.
1 methods
tools/filesystem.py:11
No description documented yet.
call
No description documented yet.
tools/filesystem.py:15
WHAT IT DOES

No description documented yet.

SIGNATURE
call(self, args: Dict) -> ToolResult
PARAMETERS
self
args
Dict
RETURNS ToolResult
SOURCE tools/filesystem.py:15
LeproLightsTool
CYN-X tool for controlling Lepro lights.
3 methods
tools/lepro_lights.py:11
CYN-X tool for controlling Lepro lights.
__init__
No description documented yet.
tools/lepro_lights.py:20
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, device_name: str, mac: str)
PARAMETERS
self
device_name
str
mac
str
RETURNS Not documented
SOURCE tools/lepro_lights.py:20
schema
Return the tool schema exposed to CYN.
tools/lepro_lights.py:30
WHAT IT DOES

Return the tool schema exposed to CYN.

SIGNATURE
schema(self) -> dict[str, Any]
PARAMETERS
self
RETURNS dict[str, Any]
SOURCE tools/lepro_lights.py:30
execute
Execute a light-control request.
tools/lepro_lights.py:86
WHAT IT DOES

Execute a light-control request.

SIGNATURE
execute(self, arguments: dict[str, Any]) -> ToolResult
PARAMETERS
self
arguments
dict[str, Any]
RETURNS ToolResult
SOURCE tools/lepro_lights.py:86
LeproLightsTool
CYN-X tool for controlling Lepro lights.
3 methods
tools/LeproLightsTool.py:11
CYN-X tool for controlling Lepro lights.
__init__
No description documented yet.
tools/LeproLightsTool.py:20
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, device_name: str, mac: str)
PARAMETERS
self
device_name
str
mac
str
RETURNS Not documented
SOURCE tools/LeproLightsTool.py:20
schema
Return the tool schema exposed to CYN.
tools/LeproLightsTool.py:30
WHAT IT DOES

Return the tool schema exposed to CYN.

SIGNATURE
schema(self) -> dict[str, Any]
PARAMETERS
self
RETURNS dict[str, Any]
SOURCE tools/LeproLightsTool.py:30
execute
Execute a light-control request.
tools/LeproLightsTool.py:86
WHAT IT DOES

Execute a light-control request.

SIGNATURE
execute(self, arguments: dict[str, Any]) -> ToolResult
PARAMETERS
self
arguments
dict[str, Any]
RETURNS ToolResult
SOURCE tools/LeproLightsTool.py:86
SmokeCounterTool
Conversational smoke counter for CYN Studio. This class intentionally does NOT use input() or print(). CYN can call it…
1 methods
tools/SmokeCounterTool.py:573
Conversational smoke counter for CYN Studio. This class intentionally does NOT use input() or print(). CYN can call it directly and receive structured data.
call
Flexible call interface: - If args is a dict (tool_router), use it. - Otherwise accept keyword args for backward compatibility. R…
tools/SmokeCounterTool.py:611
WHAT IT DOES

Flexible call interface: - If args is a dict (tool_router), use it. - Otherwise accept keyword args for backward compatibility. Returns a ToolResult with a human-readable output and metadata containing the raw result dict.

SIGNATURE
call(self, args = None, action: str = 'stats', smoke_type: Optional[str] = None, amount: float = 1, limit: int = 10, scope: str = 'all') -> ToolResult
PARAMETERS
self
args
= None
action
str
= 'stats'
smoke_type
Optional[str]
= None
amount
float
= 1
limit
int
= 10
scope
str
= 'all'
RETURNS ToolResult
SOURCE tools/SmokeCounterTool.py:611
ToolRouter
No description documented yet.
9 methods
tools/tool_router.py:14
No description documented yet.
__init__
No description documented yet.
tools/tool_router.py:16
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE tools/tool_router.py:16
register_tool
No description documented yet.
tools/tool_router.py:20
WHAT IT DOES

No description documented yet.

SIGNATURE
register_tool(self, tool: BaseTool)
PARAMETERS
self
tool
BaseTool
RETURNS Not documented
SOURCE tools/tool_router.py:20
list_tools
No description documented yet.
tools/tool_router.py:24
WHAT IT DOES

No description documented yet.

SIGNATURE
list_tools(self)
PARAMETERS
self
RETURNS Not documented
SOURCE tools/tool_router.py:24
describe_tools
Gives the AI a list of available tools.
tools/tool_router.py:28
WHAT IT DOES

Gives the AI a list of available tools.

SIGNATURE
describe_tools(self)
PARAMETERS
self
RETURNS Not documented
SOURCE tools/tool_router.py:28
as_ollama_tools
Convert the registered tools into Ollama function-calling schemas.
tools/tool_router.py:41
WHAT IT DOES

Convert the registered tools into Ollama function-calling schemas.

SIGNATURE
as_ollama_tools(self)
PARAMETERS
self
RETURNS Not documented
SOURCE tools/tool_router.py:41
call_tool
No description documented yet.
tools/tool_router.py:180
WHAT IT DOES

No description documented yet.

SIGNATURE
call_tool(self, name: str, args: Dict[str, Any]) -> ToolResult
PARAMETERS
self
name
str
args
Dict[str, Any]
RETURNS ToolResult
SOURCE tools/tool_router.py:180
normalize_smoke_type
Normalize a freeform smoke_type string into a canonical type (pen, vape, cigarette, bong, weed, joint, unknown).
tools/tool_router.py:215
WHAT IT DOES

Normalize a freeform smoke_type string into a canonical type (pen, vape, cigarette, bong, weed, joint, unknown).

SIGNATURE
normalize_smoke_type(self, text: str)
PARAMETERS
self
text
str
RETURNS Not documented
SOURCE tools/tool_router.py:215
is_read_only_smoke_query
Return True when the request is asking for counts/stats/history instead of logging.
tools/tool_router.py:244
WHAT IT DOES

Return True when the request is asking for counts/stats/history instead of logging.

SIGNATURE
is_read_only_smoke_query(self, text: str) -> bool
PARAMETERS
self
text
str
RETURNS bool
SOURCE tools/tool_router.py:244
detect
Detect whether a message requires a tool.
tools/tool_router.py:285
WHAT IT DOES

Detect whether a message requires a tool.

SIGNATURE
detect(self, text: str)
PARAMETERS
self
text
str
RETURNS Not documented
SOURCE tools/tool_router.py:285
WeatherTool
No description documented yet.
1 methods
tools/weather.py:8
No description documented yet.
call
No description documented yet.
tools/weather.py:12
WHAT IT DOES

No description documented yet.

SIGNATURE
call(self, args: Dict) -> ToolResult
PARAMETERS
self
args
Dict
RETURNS ToolResult
SOURCE tools/weather.py:12
OutputMode
No description documented yet.
0 methods
tools/web_search.py:17
No description documented yet.
No methods discovered.
RankingProfile
No description documented yet.
0 methods
tools/web_search.py:32
No description documented yet.
No methods discovered.
SearchIntent
No description documented yet.
0 methods
tools/web_search.py:55
No description documented yet.
No methods discovered.
ResultFilter
No description documented yet.
2 methods
tools/web_search.py:835
No description documented yet.
__init__
No description documented yet.
tools/web_search.py:837
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE tools/web_search.py:837
is_bad_result
No description documented yet.
tools/web_search.py:841
WHAT IT DOES

No description documented yet.

SIGNATURE
is_bad_result(self, title: str, body: str, href: str) -> bool
PARAMETERS
self
title
str
body
str
href
str
RETURNS bool
SOURCE tools/web_search.py:841
ResultRanker
No description documented yet.
8 methods
tools/web_search.py:895
No description documented yet.
__init__
No description documented yet.
tools/web_search.py:897
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self, intent: SearchIntent)
PARAMETERS
self
intent
SearchIntent
RETURNS Not documented
SOURCE tools/web_search.py:897
rank
No description documented yet.
tools/web_search.py:905
WHAT IT DOES

No description documented yet.

SIGNATURE
rank(self, title: str, body: str, href: str) -> int
PARAMETERS
self
title
str
body
str
href
str
RETURNS int
SOURCE tools/web_search.py:905
score_keywords
No description documented yet.
tools/web_search.py:980
WHAT IT DOES

No description documented yet.

SIGNATURE
score_keywords(title: str, combined: str, keywords: tuple[str, ...], title_weight: int, body_weight: int) -> int
PARAMETERS
title
str
combined
str
keywords
tuple[str, ...]
title_weight
int
body_weight
int
RETURNS int
SOURCE tools/web_search.py:980
DECORATORS
staticmethod
score_negative
No description documented yet.
tools/web_search.py:1002
WHAT IT DOES

No description documented yet.

SIGNATURE
score_negative(self, title: str, combined: str) -> int
PARAMETERS
self
title
str
combined
str
RETURNS int
SOURCE tools/web_search.py:1002
output_bonus
No description documented yet.
tools/web_search.py:1022
WHAT IT DOES

No description documented yet.

SIGNATURE
output_bonus(self, title: str) -> int
PARAMETERS
self
title
str
RETURNS int
SOURCE tools/web_search.py:1022
store_bonus
No description documented yet.
tools/web_search.py:1065
WHAT IT DOES

No description documented yet.

SIGNATURE
store_bonus(self, href: str) -> int
PARAMETERS
self
href
str
RETURNS int
SOURCE tools/web_search.py:1065
domain_bonus
No description documented yet.
tools/web_search.py:1080
WHAT IT DOES

No description documented yet.

SIGNATURE
domain_bonus(href: str) -> int
PARAMETERS
href
str
RETURNS int
SOURCE tools/web_search.py:1080
DECORATORS
staticmethod
research_source_bonus
No description documented yet.
tools/web_search.py:1110
WHAT IT DOES

No description documented yet.

SIGNATURE
research_source_bonus(href: str) -> int
PARAMETERS
href
str
RETURNS int
SOURCE tools/web_search.py:1110
DECORATORS
staticmethod
WebSearchTool
No description documented yet.
2 methods
tools/web_search.py:1538
No description documented yet.
call
No description documented yet.
tools/web_search.py:1547
WHAT IT DOES

No description documented yet.

SIGNATURE
call(self, args)
PARAMETERS
self
args
RETURNS Not documented
SOURCE tools/web_search.py:1547
format_result
No description documented yet.
tools/web_search.py:1913
WHAT IT DOES

No description documented yet.

SIGNATURE
format_result(title: str, body: str, href: str, score: int = 0, source_type: str = 'unknown') -> str
PARAMETERS
title
str
body
str
href
str
score
int
= 0
source_type
str
= 'unknown'
RETURNS str
SOURCE tools/web_search.py:1913
DECORATORS
staticmethod
AudioPlayer
Platform-aware audio playback. Uses native system audio players: - Windows: winsound (built-in) or powershell - macOS:…
4 methods
voice/audio_player.py:6
Platform-aware audio playback. Uses native system audio players: - Windows: winsound (built-in) or powershell - macOS: afplay (built-in) - Linux: paplay or aplay (ALSA) This keeps dependencies minimal and avoids pygame for Python 3.14 compatibility.
play
Play a WAV audio file. Args: filepath (str): Path to the WAV file to play Raises: FileNotFoundError: If the audio file doesn't ex…
voice/audio_player.py:18
WHAT IT DOES

Play a WAV audio file. Args: filepath (str): Path to the WAV file to play Raises: FileNotFoundError: If the audio file doesn't exist RuntimeError: If playback fails

SIGNATURE
play(self, filepath)
PARAMETERS
self
filepath
RETURNS Not documented
SOURCE voice/audio_player.py:18
_play_windows
Play audio on Windows using PowerShell.
voice/audio_player.py:42
WHAT IT DOES

Play audio on Windows using PowerShell.

SIGNATURE
_play_windows(self, filepath)
PARAMETERS
self
filepath
RETURNS Not documented
SOURCE voice/audio_player.py:42
_play_macos
Play audio on macOS using afplay.
voice/audio_player.py:57
WHAT IT DOES

Play audio on macOS using afplay.

SIGNATURE
_play_macos(self, filepath)
PARAMETERS
self
filepath
RETURNS Not documented
SOURCE voice/audio_player.py:57
_play_linux
Play audio on Linux using available tools.
voice/audio_player.py:66
WHAT IT DOES

Play audio on Linux using available tools.

SIGNATURE
_play_linux(self, filepath)
PARAMETERS
self
filepath
RETURNS Not documented
SOURCE voice/audio_player.py:66
PiperTTS
Local Piper TTS engine for converting text to speech. Piper is a lightweight, fast, on-device Text-to-Speech (TTS) syst…
2 methods
voice/piper_engine.py:6
Local Piper TTS engine for converting text to speech. Piper is a lightweight, fast, on-device Text-to-Speech (TTS) system. Models are ONNX-based and run locally without cloud dependencies. Directory structure for models: models/ └── voices/ ├── cyn_normal.onnx # Default personality voice ├── cyn_glitch.onnx # Glitchy/error personality ├── cyn_soft.onnx # Soft/empathetic personality └── [add more .onnx files here for different voices] To add new voices: 1. Download a Piper ONNX model from https://huggingface.co/rhasspy/piper-voices 2. Place the .onnx file in models/voices/ with a descriptive name 3. Reference it in PiperTTS initialization or voice switching logic Future enhancement: VoiceManager can switch voices based on personality modes: - mode_manager.current_mode == "glitch" -> use cyn_glitch.onnx - mode_manager.current_mode == "normal" -> use cyn_normal.onnx - etc.
__init__
Initialize PiperTTS with a specific model. Args: model_path (str): Path to the .onnx model file e.g., "models/voices/cyn_normal.o…
voice/piper_engine.py:33
WHAT IT DOES

Initialize PiperTTS with a specific model. Args: model_path (str): Path to the .onnx model file e.g., "models/voices/cyn_normal.onnx" Raises: FileNotFoundError: If the model file doesn't exist

SIGNATURE
__init__(self, model_path)
PARAMETERS
self
model_path
RETURNS Not documented
SOURCE voice/piper_engine.py:33
generate
Generate speech from text using Piper TTS. Args: text (str): The text to convert to speech output_file (str): Path where the WAV…
voice/piper_engine.py:53
WHAT IT DOES

Generate speech from text using Piper TTS. Args: text (str): The text to convert to speech output_file (str): Path where the WAV file will be saved Returns: str: Path to the generated WAV file Raises: RuntimeError: If Piper subprocess fails or is not installed

SIGNATURE
generate(self, text, output_file = 'cyn_output.wav')
PARAMETERS
self
text
output_file
= 'cyn_output.wav'
RETURNS Not documented
SOURCE voice/piper_engine.py:53
TTSEngine
No description documented yet.
2 methods
voice/tts_engine.py:4
No description documented yet.
__init__
No description documented yet.
voice/tts_engine.py:6
WHAT IT DOES

No description documented yet.

SIGNATURE
__init__(self)
PARAMETERS
self
RETURNS Not documented
SOURCE voice/tts_engine.py:6
generate
No description documented yet.
voice/tts_engine.py:13
WHAT IT DOES

No description documented yet.

SIGNATURE
generate(self, text, output = 'cyn_output.wav')
PARAMETERS
self
text
output
= 'cyn_output.wav'
RETURNS Not documented
SOURCE voice/tts_engine.py:13
VoiceManager
Decoupled voice synthesis coordinator. Architecture: Text Response (from ChatEngine) | v VoiceManager.speak(text) | +--…
2 methods
voice/voice_manager.py:1
Decoupled voice synthesis coordinator. Architecture: Text Response (from ChatEngine) | v VoiceManager.speak(text) | +---> PiperTTS.generate(text) -> WAV file | +---> AudioPlayer.play(wav_file) This design allows: - Independent TTS engine implementations - Independent audio playback implementations - Easy testing with mock objects - No direct dependency on ChatEngine Future: Dynamic voice switching based on personality modes - Switch between cyn_normal.onnx, cyn_glitch.onnx, etc. - Based on mode_manager.current_mode
__init__
Initialize VoiceManager with TTS and playback engines. Args: tts: TTS engine (e.g., PiperTTS) with generate(text) method player:…
voice/voice_manager.py:26
WHAT IT DOES

Initialize VoiceManager with TTS and playback engines. Args: tts: TTS engine (e.g., PiperTTS) with generate(text) method player: Audio player (e.g., AudioPlayer) with play(filepath) method

SIGNATURE
__init__(self, tts, player)
PARAMETERS
self
tts
player
RETURNS Not documented
SOURCE voice/voice_manager.py:26
speak
Generate speech from text and play it immediately. Args: text (str): The text to speak Raises: Exception: Propagates errors from…
voice/voice_manager.py:37
WHAT IT DOES

Generate speech from text and play it immediately. Args: text (str): The text to speak Raises: Exception: Propagates errors from TTS or playback

SIGNATURE
speak(self, text)
PARAMETERS
self
text
RETURNS Not documented
SOURCE voice/voice_manager.py:37
07
BARKLY DOCS

Modules

A lightweight map of source files and their discovered contents.

ai/__init__.py
0 symbols
0 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 0
ai/chat_engine.py
7 symbols
7 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 7
IMPORTS
jsonloggingostimetypingai.memory_systemai.terminal_ui
ai/context_manager.py
3 symbols
0 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 0
ai/knowledge/store.py
5 symbols
1 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 1
IMPORTS
json
ai/memory_system/__init__.py
0 symbols
2 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 2
IMPORTS
managerextractor
ai/memory_system/extractor.py
11 symbols
3 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 3
IMPORTS
loggingretyping
ai/memory_system/manager.py
10 symbols
1 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 1
IMPORTS
json
ai/mode_manager.py
7 symbols
1 imports
FUNCTIONS 0
CLASSES 2
IMPORTS 1
IMPORTS
typing
ai/ollama_client.py
5 symbols
5 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 5
IMPORTS
jsontimetypingrequestsai.terminal_ui
ai/personality.py
11 symbols
3 imports
FUNCTIONS 11
CLASSES 0
IMPORTS 3
IMPORTS
pathlibtypingprompt_manager
ai/prompt_builder.py
13 symbols
2 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 2
IMPORTS
typingprompt_manager
ai/prompt_manager.py
11 symbols
3 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 3
IMPORTS
pathlibtypingai.terminal_ui
ai/terminal_ui/__init__.py
0 symbols
1 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 1
IMPORTS
renderer
ai/terminal_ui/colors.py
0 symbols
0 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 0
ai/terminal_ui/renderer.py
23 symbols
6 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 6
IMPORTS
jsonrich.consolerich.rulerich.syntaxrich.textai.terminal_ui.colors
barkly_docs.py
66 symbols
10 imports
FUNCTIONS 50
CLASSES 6
IMPORTS 10
IMPORTS
__future__argparseasthashlibhtmljsonsubprocessdataclassespathlibtyping
benchmark/__init__.py
0 symbols
0 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 0
benchmark/analyzer.py
5 symbols
2 imports
FUNCTIONS 5
CLASSES 0
IMPORTS 2
IMPORTS
jsonpathlib
benchmark/cleaner.py
10 symbols
3 imports
FUNCTIONS 1
CLASSES 1
IMPORTS 3
IMPORTS
__future__argparsepathlib
benchmark/cli.py
1 symbols
1 imports
FUNCTIONS 1
CLASSES 0
IMPORTS 1
IMPORTS
sys
benchmark/formatter.py
1 symbols
1 imports
FUNCTIONS 1
CLASSES 0
IMPORTS 1
IMPORTS
datetime
benchmark/modes.py
2 symbols
1 imports
FUNCTIONS 2
CLASSES 0
IMPORTS 1
IMPORTS
typing
benchmark/runner.py
26 symbols
25 imports
FUNCTIONS 20
CLASSES 1
IMPORTS 25
IMPORTS
jsonloggingstatisticstimedatetimepathlibrich.consolerich.loggingai.context_managerai.knowledge.storebenchmark.analyzerbenchmark.clibenchmark.formatterbenchmark.modesconfigai.chat_engineai.memory_systemai.mode_managerai.ollama_clientai.prompt_buildermemory.memorymemory.sqlitetools.calculatortools.tool_routertools.web_search
benchmark/visualize.py
4 symbols
7 imports
FUNCTIONS 4
CLASSES 0
IMPORTS 7
IMPORTS
jsonwebbrowserpathlibcollectionsdatetimematplotlibmatplotlib.pyplot
clean_cyn.py
2 symbols
1 imports
FUNCTIONS 2
CLASSES 0
IMPORTS 1
IMPORTS
pathlib
config.py
3 symbols
5 imports
FUNCTIONS 2
CLASSES 1
IMPORTS 5
IMPORTS
osdataclassespathlibtypingdotenv
count_results.py
0 symbols
0 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 0
cyndiscord.py
2 symbols
16 imports
FUNCTIONS 2
CLASSES 0
IMPORTS 16
IMPORTS
osdiscorddotenvai.ollama_clientai.prompt_builderai.mode_managerai.chat_enginememory.sqlitememory.memoryai.memory_system.managerai.memory_system.extractorai.context_managertools.tool_routertools.web_searchtools.calculatortools.SmokeCounterTool
hardware/lepro/__init__.py
0 symbols
0 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 0
hardware/lepro/config.py
7 symbols
4 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 4
IMPORTS
__future__jsonpathlibtyping
hardware/lepro/devices.py
12 symbols
7 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 7
IMPORTS
__future__typinglib.lepro.bondlib.lepro.cli._commonlib.lepro.commandslib.lepro.cryptolib.lepro.session
hardware/lepro/discovery.py
4 symbols
3 imports
FUNCTIONS 1
CLASSES 1
IMPORTS 3
IMPORTS
__future__typingbleak
hardware/lepro/lib/lepro/__init__.py
0 symbols
0 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 0
hardware/lepro/lib/lepro/apk_analysis.py
0 symbols
1 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 1
IMPORTS
__future__
hardware/lepro/lib/lepro/bond.py
24 symbols
11 imports
FUNCTIONS 15
CLASSES 3
IMPORTS 11
IMPORTS
__future__argparseasynciojsondataclassesdatetimepathlibhardware.lepro.lib.lepro.apk_analysishardware.lepro.lib.lepro.cryptohardware.lepro.lib.lepro.framehardware.lepro.lib.lepro.protocol
hardware/lepro/lib/lepro/cli/__init__.py
0 symbols
0 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 0
hardware/lepro/lib/lepro/cli/_common.py
5 symbols
8 imports
FUNCTIONS 5
CLASSES 0
IMPORTS 8
IMPORTS
__future__asynciobleakhardware.lepro.lib.lepro.bondhardware.lepro.lib.lepro.commandshardware.lepro.lib.lepro.cryptohardware.lepro.lib.lepro.protocolhardware.lepro.lib.lepro.session
hardware/lepro/lib/lepro/cli/bond.py
3 symbols
10 imports
FUNCTIONS 3
CLASSES 0
IMPORTS 10
IMPORTS
__future__argparseasynciosyspathlibhardware.lepro.lib.lepro.bondhardware.lepro.lib.lepro.cli._commonhardware.lepro.lib.lepro.cryptohardware.lepro.lib.lepro.protocolhardware.lepro.lib.lepro.session
hardware/lepro/lib/lepro/cli/ctl.py
2 symbols
9 imports
FUNCTIONS 2
CLASSES 0
IMPORTS 9
IMPORTS
__future__argparseasynciojsonsyshardware.lepro.lib.lepro.bondhardware.lepro.lib.lepro.cli._commonhardware.lepro.lib.lepro.commandshardware.lepro.lib.lepro.modes
hardware/lepro/lib/lepro/cli/firmware.py
5 symbols
10 imports
FUNCTIONS 5
CLASSES 0
IMPORTS 10
IMPORTS
__future__argparsesslsubprocesssysurllib.requestpathlibhardware.lepro.lib.lepro.firmware_profilehardware.lepro.lib.lepro.patch_cdnhardware.lepro.lib.lepro.paths
hardware/lepro/lib/lepro/cli/ota.py
1 symbols
5 imports
FUNCTIONS 1
CLASSES 0
IMPORTS 5
IMPORTS
__future__argparseasynciopathlibhardware.lepro.lib.lepro.ota
hardware/lepro/lib/lepro/cli/provision.py
2 symbols
6 imports
FUNCTIONS 2
CLASSES 0
IMPORTS 6
IMPORTS
__future__argparseasynciopathlibhardware.lepro.lib.lepro.confighardware.lepro.lib.lepro.provision
hardware/lepro/lib/lepro/cli/status.py
1 symbols
5 imports
FUNCTIONS 1
CLASSES 0
IMPORTS 5
IMPORTS
__future__argparseasynciohardware.lepro.lib.lepro.bondhardware.lepro.lib.lepro.cli._common
hardware/lepro/lib/lepro/commands.py
11 symbols
6 imports
FUNCTIONS 11
CLASSES 0
IMPORTS 6
IMPORTS
__future__colorsysjsontypinghardware.lepro.lib.lepro.cryptohardware.lepro.lib.lepro.protocol
hardware/lepro/lib/lepro/config.py
7 symbols
6 imports
FUNCTIONS 2
CLASSES 5
IMPORTS 6
IMPORTS
__future__ostomllibdataclassespathlibhardware.lepro.lib.lepro.paths
hardware/lepro/lib/lepro/crypto.py
13 symbols
4 imports
FUNCTIONS 13
CLASSES 0
IMPORTS 4
IMPORTS
__future__structtimeCrypto.Cipher
hardware/lepro/lib/lepro/firmware_profile.py
12 symbols
7 imports
FUNCTIONS 7
CLASSES 4
IMPORTS 7
IMPORTS
__future__fnmatchretomllibdataclassespathlibhardware.lepro.lib.lepro.paths
hardware/lepro/lib/lepro/frame.py
18 symbols
5 imports
FUNCTIONS 6
CLASSES 4
IMPORTS 5
IMPORTS
__future__structdataclasseshardware.lepro.lib.lepro.cryptohardware.lepro.lib.lepro.protocol
hardware/lepro/lib/lepro/modes.py
24 symbols
10 imports
FUNCTIONS 23
CLASSES 1
IMPORTS 10
IMPORTS
__future__jsonmathosredataclassespathlibtypinghardware.lepro.lib.lepro.commandshardware.lepro.lib.lepro.paths
hardware/lepro/lib/lepro/ota.py
55 symbols
18 imports
FUNCTIONS 41
CLASSES 5
IMPORTS 18
IMPORTS
__future__argparseasynciohashlibjsonrestructsystimedataclassespathlibbleakhardware.lepro.lib.lepro.bondhardware.lepro.lib.lepro.cryptohardware.lepro.lib.lepro.framehardware.lepro.lib.lepro.protocolhardware.lepro.lib.lepro.sessionhardware.lepro.lib.lepro.paths
hardware/lepro/lib/lepro/patch_cdn.py
23 symbols
15 imports
FUNCTIONS 20
CLASSES 2
IMPORTS 15
IMPORTS
__future__argparsehashlibresocketsslsubprocesssyscollections.abcdataclassespathlibcryptographycryptography.hazmat.primitiveshardware.lepro.lib.lepro.firmware_profilehardware.lepro.lib.lepro.paths
hardware/lepro/lib/lepro/paths.py
1 symbols
2 imports
FUNCTIONS 1
CLASSES 0
IMPORTS 2
IMPORTS
__future__pathlib
hardware/lepro/lib/lepro/protocol.py
12 symbols
3 imports
FUNCTIONS 11
CLASSES 1
IMPORTS 3
IMPORTS
__future__structdataclasses
hardware/lepro/lib/lepro/provision.py
11 symbols
12 imports
FUNCTIONS 11
CLASSES 0
IMPORTS 12
IMPORTS
__future__argparseasynciojsonstructpathlibbleakhardware.lepro.lib.lepro.bondhardware.lepro.lib.lepro.cryptohardware.lepro.lib.lepro.framehardware.lepro.lib.lepro.protocolhardware.lepro.lib.lepro.session
hardware/lepro/lib/lepro/session.py
38 symbols
13 imports
FUNCTIONS 1
CLASSES 6
IMPORTS 13
IMPORTS
__future__asynciosecretstimedataclassestypinghardware.lepro.lib.lepro.commandshardware.lepro.lib.lepro.bondhardware.lepro.lib.lepro.framehardware.lepro.lib.lepro.commandshardware.lepro.lib.lepro.cryptohardware.lepro.lib.lepro.framehardware.lepro.lib.lepro.protocol
hardware/lepro/lib/lepro/tools/__init__.py
0 symbols
0 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 0
hardware/lepro/lib/lepro/tools/debug_hijack.py
10 symbols
14 imports
FUNCTIONS 10
CLASSES 0
IMPORTS 14
IMPORTS
__future__argparsehashlibjsonsocketsslsubprocesssystimeurllib.requestpathlibhardware.lepro.lib.lepro.firmware_profilehardware.lepro.lib.lepro.patch_cdnhardware.lepro.lib.lepro.paths
hardware/lepro/lib/lepro/tools/decrypt_capture.py
3 symbols
8 imports
FUNCTIONS 3
CLASSES 0
IMPORTS 8
IMPORTS
__future__argparsejsonrestructpathlibhardware.lepro.lib.lepro.cryptohardware.lepro.lib.lepro.protocol
hardware/lepro/lib/lepro/tools/esp_idf_bin_to_elf.py
9 symbols
6 imports
FUNCTIONS 6
CLASSES 1
IMPORTS 6
IMPORTS
__future__argparsestructsysdataclassespathlib
hardware/lepro/lib/lepro/tools/mqtt_ca_dump.py
7 symbols
10 imports
FUNCTIONS 7
CLASSES 0
IMPORTS 10
IMPORTS
__future__argparsehashlibsocketsslsyspathlibcryptographycryptography.hazmat.primitiveshardware.lepro.lib.lepro.paths
hardware/lepro/lib/lepro/tools/replay.py
1 symbols
5 imports
FUNCTIONS 1
CLASSES 0
IMPORTS 5
IMPORTS
asyncioargparseosbleakhardware.lepro.lib.lepro.protocol
hardware/lepro/lib/lepro/tools/validate_ota_parser.py
9 symbols
8 imports
FUNCTIONS 3
CLASSES 1
IMPORTS 8
IMPORTS
__future__argparsejsonstructsyspathlibtypinghardware.lepro.lib.lepro.paths
hardware/lepro/setup.py
5 symbols
7 imports
FUNCTIONS 1
CLASSES 1
IMPORTS 7
IMPORTS
__future__asynciopathlibtypingconfigdevicesdiscovery
hardware/web/app.py
3 symbols
22 imports
FUNCTIONS 3
CLASSES 0
IMPORTS 22
IMPORTS
fastapifastapi.responsesfastapi.staticfilesfastapi.templatingsysossqlite3timeai.knowledge.storememory.sqliteai.context_managerai.memory_system.extractorai.memory_system.managerai.ollama_clientai.prompt_builderai.mode_managerai.chat_enginetools.tool_routertools.web_searchtools.calculatortools.SmokeCounterTooltools.ChartTool
interfaces/discord_bot.py
3 symbols
1 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 1
IMPORTS
typing
interfaces/terminal.py
3 symbols
2 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 2
IMPORTS
systyping
interfaces/web/app.py
3 symbols
22 imports
FUNCTIONS 3
CLASSES 0
IMPORTS 22
IMPORTS
fastapifastapi.responsesfastapi.staticfilesfastapi.templatingsysossqlite3timeai.knowledge.storememory.sqliteai.context_managerai.memory_system.extractorai.memory_system.managerai.ollama_clientai.prompt_builderai.mode_managerai.chat_enginetools.tool_routertools.web_searchtools.calculatortools.SmokeCounterTooltools.ChartTool
interfaces/web_ui.py
3 symbols
0 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 0
main.py
1 symbols
17 imports
FUNCTIONS 1
CLASSES 0
IMPORTS 17
IMPORTS
asynciologgingai.context_managerconfigai.ollama_clientai.prompt_builderai.personalityai.mode_managerai.chat_engineai.memory_systemmemory.sqlitememory.memorytools.calculatortools.tool_routerinterfaces.terminaltools.web_searchtools.SmokeCounterTool
memory/embeddings.py
5 symbols
1 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 1
IMPORTS
typing
memory/memory.py
3 symbols
1 imports
FUNCTIONS 1
CLASSES 1
IMPORTS 1
IMPORTS
json
memory/sqlite.py
3 symbols
2 imports
FUNCTIONS 3
CLASSES 0
IMPORTS 2
IMPORTS
sqlite3pathlib
memory/test_memory.py
0 symbols
2 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 2
IMPORTS
sqlitememory
run_30_after_fix.py
0 symbols
5 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 5
IMPORTS
timeai.ollama_clientai.prompt_buildertools.tool_routertools.SmokeCounterTool
scripts/test_tool_pipeline.py
0 symbols
2 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 2
IMPORTS
sysinterfaces.web.app
test_refactor.py
8 symbols
2 imports
FUNCTIONS 8
CLASSES 0
IMPORTS 2
IMPORTS
systools.web_search
tests/__init__.py
0 symbols
0 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 0
tests/auto_promt_test.py
5 symbols
6 imports
FUNCTIONS 5
CLASSES 0
IMPORTS 6
IMPORTS
jsonrequeststhreadingtimesysos
tests/integration_check.py
0 symbols
9 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 9
IMPORTS
syspathlibai.memory_systemai.memory_systemai.chat_enginememory.sqlitetempfileoslogging
tests/parse_temp_output.py
0 symbols
1 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 1
IMPORTS
re
tests/test_memory_system.py
1 symbols
6 imports
FUNCTIONS 1
CLASSES 0
IMPORTS 6
IMPORTS
sysospathlibai.memory_systemmemory.sqlitetempfile
tests/test_prompt_builder.py
1 symbols
1 imports
FUNCTIONS 1
CLASSES 0
IMPORTS 1
IMPORTS
ai.prompt_builder
tests/test_smoke_pipeline.py
0 symbols
16 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 16
IMPORTS
sysosai.ollama_clientai.prompt_builderai.mode_managerai.chat_enginememory.sqlitememory.memoryai.memory_systemtools.tool_routertools.web_searchtools.calculatortools.SmokeCounterToolsqlite3ostime
tests/verify_refactoring.py
9 symbols
5 imports
FUNCTIONS 9
CLASSES 0
IMPORTS 5
IMPORTS
syspathlibai.prompt_managerai.prompt_builderai.personality
tools/base.py
3 symbols
2 imports
FUNCTIONS 0
CLASSES 2
IMPORTS 2
IMPORTS
dataclassestyping
tools/calculator.py
3 symbols
3 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 3
IMPORTS
asttypingtools.base
tools/chart_tool.py
19 symbols
3 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 3
IMPORTS
__future__typingtools.base
tools/ChartTool.py
4 symbols
5 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 5
IMPORTS
sqlite3datetimepathlibtypingtools.base
tools/filesystem.py
2 symbols
3 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 3
IMPORTS
typingpathlibtools.base
tools/lepro_lights.py
4 symbols
4 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 4
IMPORTS
__future__typinghardware.lepro.devicesbase
tools/LeproLightsTool.py
4 symbols
4 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 4
IMPORTS
__future__typinghardware.lepro.devicesbase
tools/SmokeCounterTool.py
15 symbols
10 imports
FUNCTIONS 13
CLASSES 1
IMPORTS 10
IMPORTS
jsonosdatetimetypingjsonossqlite3datetimetypingtools.base
tools/tool_router.py
10 symbols
2 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 2
IMPORTS
typingtools.base
tools/weather.py
2 symbols
2 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 2
IMPORTS
typingtools.base
tools/web_search.py
29 symbols
8 imports
FUNCTIONS 11
CLASSES 6
IMPORTS 8
IMPORTS
__future__redataclassesenumtypingurllib.parseddgstools.base
voice/__init__.py
0 symbols
3 imports
FUNCTIONS 0
CLASSES 0
IMPORTS 3
IMPORTS
piper_engineaudio_playervoice_manager
voice/audio_player.py
5 symbols
3 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 3
IMPORTS
ossyssubprocess
voice/piper_engine.py
3 symbols
3 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 3
IMPORTS
subprocessospathlib
voice/tts_engine.py
3 symbols
1 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 1
IMPORTS
subprocess
voice/voice_manager.py
3 symbols
0 imports
FUNCTIONS 0
CLASSES 1
IMPORTS 0
08
BARKLY DOCS

Imports

Dependencies discovered from Python import statements.

DISCOVERED 115
SOURCE FILES 100
Crypto.Cipher__future__ai.chat_engineai.context_managerai.knowledge.storeai.memory_systemai.memory_system.extractorai.memory_system.managerai.mode_managerai.ollama_clientai.personalityai.prompt_builderai.prompt_managerai.terminal_uiai.terminal_ui.colorsargparseastasyncioaudio_playerbasebenchmark.analyzerbenchmark.clibenchmark.formatterbenchmark.modesbleakcollectionscollections.abccolorsysconfigcryptographycryptography.hazmat.primitivesdataclassesdatetimeddgsdevicesdiscorddiscoverydotenvenumextractorfastapifastapi.responsesfastapi.staticfilesfastapi.templatingfnmatchhardware.lepro.deviceshardware.lepro.lib.lepro.apk_analysishardware.lepro.lib.lepro.bondhardware.lepro.lib.lepro.cli._commonhardware.lepro.lib.lepro.commandshardware.lepro.lib.lepro.confighardware.lepro.lib.lepro.cryptohardware.lepro.lib.lepro.firmware_profilehardware.lepro.lib.lepro.framehardware.lepro.lib.lepro.modeshardware.lepro.lib.lepro.otahardware.lepro.lib.lepro.patch_cdnhardware.lepro.lib.lepro.pathshardware.lepro.lib.lepro.protocolhardware.lepro.lib.lepro.provisionhardware.lepro.lib.lepro.sessionhashlibhtmlinterfaces.terminalinterfaces.web.appjsonlib.lepro.bondlib.lepro.cli._commonlib.lepro.commandslib.lepro.cryptolib.lepro.sessionloggingmanagermathmatplotlibmatplotlib.pyplotmemorymemory.memorymemory.sqliteospathlibpiper_engineprompt_managerrerendererrequestsrich.consolerich.loggingrich.rulerich.syntaxrich.textsecretssocketsqlitesqlite3sslstatisticsstructsubprocesssystempfilethreadingtimetomllibtools.ChartTooltools.SmokeCounterTooltools.basetools.calculatortools.tool_routertools.web_searchtypingurllib.parseurllib.requestvoice_managerwebbrowser
09
BARKLY DOCS

Lifecycle

The development path used by the project.

01
Idea
02
Research
03
Experiment
04
Prototype
05
Community Testing
06
Engineering
07
Productization
08
Release
09
Feedback
10
Continued Development
10
BARKLY DOCS

Git

Repository state and recent development history.

BRANCH
main
COMMIT
49f400b
NEW FUNCTIONS
0
CHANGED FUNCTIONS
0
NEW CLASSES
0
CHANGED CLASSES
0
NEW ENDPOINTS
0
CHANGED ENDPOINTS
0
RECENT COMMITS
49f400b|2026-09-26|fixed barkly docs to be more usefull
c7eb7b8|2026-09-26|added barkly docs
a0b3c48|2026-09-14|woring on getting sutff orking
9fe7724|2026-09-14|fixed runner
46cc3a8|2026-09-14|added more content to more of the context md
efebbb3|2026-09-14|added more content to more of the context md
2c3bff1|2026-09-14|added more content to more of the context md
0235a13|2026-09-14|added more content to more of the context md
11
BARKLY DOCS

Changelog

What BARKLY DOCS noticed changed between documentation generations.

DOCUMENTATION RUN
#1
Persistent documentation snapshot.
NEW FUNCTIONS
0
Detected since the previous documentation run.
CHANGED FUNCTIONS
0
Signatures, decorators, or documentation changed.
NEW CLASSES
0
Detected since the previous documentation run.
NEW ENDPOINTS
0
Detected since the previous documentation run.
How change detection works

BARKLY DOCS stores a small local snapshot of discovered symbols and compares the next scan against it. The scanner uses static Python AST analysis and never imports or executes the project.

On the first generation, the existing project becomes the baseline. Later generations can identify newly discovered and changed functions, methods, classes, and API endpoints.