repo_full_name
stringlengths
6
93
repo_url
stringlengths
25
112
repo_api_url
stringclasses
28 values
owner
stringclasses
28 values
repo_name
stringclasses
28 values
description
stringclasses
28 values
stars
int64
617
98.8k
forks
int64
31
355
watchers
int64
990
999
license
stringclasses
2 values
default_branch
stringclasses
2 values
repo_created_at
timestamp[s]date
2012-07-24 23:12:50
2025-06-16 08:07:28
repo_updated_at
timestamp[s]date
2026-02-23 15:23:15
2026-05-03 18:52:12
repo_topics
listlengths
0
13
repo_languages
unknown
is_fork
bool
1 class
open_issues
int64
3
104
file_path
stringlengths
3
208
file_name
stringclasses
509 values
file_extension
stringclasses
1 value
file_size_bytes
int64
101
84k
file_url
stringclasses
627 values
file_raw_url
stringclasses
627 values
file_sha
stringclasses
624 values
language
stringclasses
8 values
parsed_at
stringdate
2026-05-04 01:12:36
2026-05-04 19:41:55
text
stringlengths
100
102k
microsoft/qlib
https://github.com/microsoft/qlib
null
null
null
null
41,919
null
null
mit
null
null
null
null
null
null
null
examples/workflow_by_code.py
null
null
null
null
null
null
Python
2026-05-04T02:20:54.866645
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. """ Qlib provides two kinds of interfaces. (1) Users could define the Quant research workflow by a simple configuration. (2) Qlib is designed in a modularized way and supports creating research workflow by code just like building blocks. The in...
microsoft/qlib
https://github.com/microsoft/qlib
null
null
null
null
41,919
null
null
mit
null
null
null
null
null
null
null
examples/run_all_model.py
null
null
null
null
null
null
Python
2026-05-04T02:20:54.940073
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import os import sys import fire import time import glob import shutil import signal import inspect import tempfile import functools import statistics import subprocess from datetime import datetime from ruamel.yaml import YAML from pathlib imp...
microsoft/qlib
https://github.com/microsoft/qlib
null
null
null
null
41,919
null
null
mit
null
null
null
null
null
null
null
qlib/backtest/decision.py
null
null
null
null
null
null
Python
2026-05-04T02:20:55.538649
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from __future__ import annotations from abc import abstractmethod from datetime import time from enum import IntEnum # try to fix circular imports when enabling type hints from typing import TYPE_CHECKING, Any, ClassVar, Generic, List, Optional...
microsoft/qlib
https://github.com/microsoft/qlib
null
null
null
null
41,919
null
null
mit
null
null
null
null
null
null
null
qlib/backtest/backtest.py
null
null
null
null
null
null
Python
2026-05-04T02:20:55.650309
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from __future__ import annotations from typing import Dict, TYPE_CHECKING, Generator, Optional, Tuple, Union, cast import pandas as pd from qlib.backtest.decision import BaseTradeDecision from qlib.backtest.report import Indicator if TYPE_CHE...
microsoft/qlib
https://github.com/microsoft/qlib
null
null
null
null
41,919
null
null
mit
null
null
null
null
null
null
null
qlib/backtest/exchange.py
null
null
null
null
null
null
Python
2026-05-04T02:20:55.723214
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from __future__ import annotations from collections import defaultdict from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type, Union, cast from ..utils.index_data import IndexData if TYPE_CHECKING: from .account import Acc...
microsoft/qlib
https://github.com/microsoft/qlib
null
null
null
null
41,919
null
null
mit
null
null
null
null
null
null
null
examples/rl_order_execution/scripts/merge_orders.py
null
null
null
null
null
null
Python
2026-05-04T02:20:57.313910
import os import pandas as pd from tqdm import tqdm from qlib.utils.pickle_utils import restricted_pickle_load for tag in ["test", "valid"]: files = os.listdir(os.path.join("data/orders/", tag)) dfs = [] for f in tqdm(files): with open(os.path.join("data/orders/", tag, f), "rb") as fr: ...
microsoft/qlib
https://github.com/microsoft/qlib
null
null
null
null
41,919
null
null
mit
null
null
null
null
null
null
null
examples/rl_order_execution/scripts/gen_training_orders.py
null
null
null
null
null
null
Python
2026-05-04T02:20:57.314403
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import os import numpy as np import pandas as pd from pathlib import Path DATA_PATH = Path(os.path.join("data", "pickle", "backtest")) OUTPUT_PATH = Path(os.path.join("data", "orders")) def generate_order(stock: str, start_idx: int, end_idx: ...
microsoft/qlib
https://github.com/microsoft/qlib
null
null
null
null
41,919
null
null
mit
null
null
null
null
null
null
null
examples/rl_order_execution/scripts/gen_pickle_data.py
null
null
null
null
null
null
Python
2026-05-04T02:20:57.426338
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import yaml import argparse import os import shutil from copy import deepcopy from qlib.contrib.data.highfreq_provider import HighFreqProvider loader = yaml.FullLoader if __name__ == "__main__": parser = argparse.ArgumentParser() parse...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/benchmark.py
null
null
null
null
null
null
Python
2026-05-04T02:21:00.171193
"""Token-reduction benchmark - measures how much context graphify saves vs naive full-corpus approach.""" from __future__ import annotations import json from pathlib import Path import networkx as nx from networkx.readwrite import json_graph _CHARS_PER_TOKEN = 4 # standard approximation def _estimate_tokens(text: ...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/analyze.py
null
null
null
null
null
null
Python
2026-05-04T02:21:00.176718
"""Graph analysis: god nodes (most connected), surprising connections (cross-community), suggested questions.""" from __future__ import annotations from pathlib import Path import networkx as nx # Language families — extensions sharing a runtime can legitimately call each other _LANG_FAMILY: dict[str, str] = { **{...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/build.py
null
null
null
null
null
null
Python
2026-05-04T02:21:00.185684
# assemble node+edge dicts into a NetworkX graph, preserving edge direction # # Node deduplication — three layers: # # 1. Within a file (AST): each extractor tracks a `seen_ids` set. A node ID is # emitted at most once per file, so duplicate class/function definitions in # the same source file are collapsed to th...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/cluster.py
null
null
null
null
null
null
Python
2026-05-04T02:21:00.196368
"""Community detection on NetworkX graphs. Uses Leiden (graspologic) if available, falls back to Louvain (networkx). Splits oversized communities. Returns cohesion scores.""" from __future__ import annotations import contextlib import inspect import io import sys import networkx as nx def _suppress_output(): """C...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/cache.py
null
null
null
null
null
null
Python
2026-05-04T02:21:00.198201
# per-file extraction cache - skip unchanged files on re-run from __future__ import annotations import hashlib import json import os import tempfile from pathlib import Path # Output directory name — override with GRAPHIFY_OUT env var for worktrees or # shared-output setups. Accepts a relative name ("graphify-out-fea...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/detect.py
null
null
null
null
null
null
Python
2026-05-04T02:21:00.199381
# file discovery, type classification, and corpus health checks from __future__ import annotations import fnmatch import json import os import re from enum import Enum from pathlib import Path class FileType(str, Enum): CODE = "code" DOCUMENT = "document" PAPER = "paper" IMAGE = "image" VIDEO = "v...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/__main__.py
null
null
null
null
null
null
Python
2026-05-04T02:21:00.217065
"""graphify CLI - `graphify install` sets up the Claude Code skill.""" from __future__ import annotations import json import os import platform import re import shutil import sys from pathlib import Path try: from importlib.metadata import version as _pkg_version __version__ = _pkg_version("graphifyy") except ...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/export.py
null
null
null
null
null
null
Python
2026-05-04T02:21:00.218442
# write graph to HTML, JSON, SVG, GraphML, Obsidian vault, and Neo4j Cypher from __future__ import annotations import html as _html import json import math import re from collections import Counter from pathlib import Path import networkx as nx from networkx.readwrite import json_graph from graphify.security import san...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/hooks.py
null
null
null
null
null
null
Python
2026-05-04T02:21:00.221801
# git hook integration - install/uninstall graphify post-commit and post-checkout hooks from __future__ import annotations import re import subprocess from pathlib import Path _HOOK_MARKER = "# graphify-hook-start" _HOOK_MARKER_END = "# graphify-hook-end" _CHECKOUT_MARKER = "# graphify-checkout-hook-start" _CHECKOUT_M...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:21:00.223057
"""graphify - extract · build · cluster · analyze · report.""" def __getattr__(name): # Lazy imports so `graphify install` works before heavy deps are in place. _map = { "extract": ("graphify.extract", "extract"), "collect_files": ("graphify.extract", "collect_files"), "build_from_json...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/llm.py
null
null
null
null
null
null
Python
2026-05-04T02:21:01.724154
# Direct LLM backend for semantic extraction — supports Claude and Kimi K2.6. # Used by `graphify . --backend kimi` and the benchmark scripts. # The default graphify pipeline uses Claude Code subagents via skill.md; # this module provides a direct API path for non-Claude-Code environments. from __future__ import annota...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/ingest.py
null
null
null
null
null
null
Python
2026-05-04T02:21:01.868052
# fetch URLs (tweet/arxiv/pdf/web) and save as annotated markdown from __future__ import annotations import json import re import urllib.error import urllib.parse from datetime import datetime, timezone from pathlib import Path from graphify.security import safe_fetch, safe_fetch_text, validate_url def _yaml_str(s: ...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/validate.py
null
null
null
null
null
null
Python
2026-05-04T02:21:01.925328
# validate extraction JSON against the graphify schema before graph assembly from __future__ import annotations VALID_FILE_TYPES = {"code", "document", "paper", "image", "rationale", "concept"} VALID_CONFIDENCES = {"EXTRACTED", "INFERRED", "AMBIGUOUS"} REQUIRED_NODE_FIELDS = {"id", "label", "file_type", "source_file"}...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/transcribe.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.037573
# Video transcription using faster-whisper # Converts video/audio files to text transcripts for graph extraction from __future__ import annotations import os from pathlib import Path VIDEO_EXTENSIONS = {'.mp4', '.mov', '.webm', '.mkv', '.avi', '.m4v', '.mp3', '.wav', '.m4a', '.ogg'} URL_PREFIXES = ('http://', 'https...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/security.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.038915
# Security helpers - URL validation, safe fetch, path guards, label sanitisation from __future__ import annotations import contextlib import html import re import urllib.error import urllib.parse import urllib.request from pathlib import Path import ipaddress import socket _ALLOWED_SCHEMES = {"http", "https"} _MAX_F...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/watch.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.142869
# monitor a folder and auto-trigger --update when files change from __future__ import annotations import json import os import sys import time from pathlib import Path _GRAPHIFY_OUT = os.environ.get("GRAPHIFY_OUT", "graphify-out") from graphify.detect import CODE_EXTENSIONS, DOC_EXTENSIONS, PAPER_EXTENSIONS, IMAGE_E...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/serve.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.164760
# MCP stdio server - exposes graph query tools to Claude and other agents from __future__ import annotations import json import sys from pathlib import Path import networkx as nx from networkx.readwrite import json_graph from graphify.security import sanitize_label def _load_graph(graph_path: str) -> nx.Graph: tr...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/tree_html.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.166774
"""tree_html — emit a D3 v7 collapsible-tree HTML view of a graph. A self-contained printable / browseable tree-of-modules view intended to complement the existing force-directed ``graph.html``. Key visual elements: * Expand-all / collapse-all / reset-view buttons. * Multi-line label wrapping (``wrapText``) with ...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/manifest.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.208784
# re-export manifest helpers from detect for backwards compatibility from graphify.detect import save_manifest, load_manifest, detect_incremental __all__ = ["save_manifest", "load_manifest", "detect_incremental"]
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/report.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.238009
# generate GRAPH_REPORT.md - the human-readable audit trail from __future__ import annotations import re from datetime import date import networkx as nx def _safe_community_name(label: str) -> str: """Mirrors export.safe_name so community hub filenames and report wikilinks always agree.""" cleaned = re.sub(r'...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
graphify/wiki.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.324872
# Wiki export - Wikipedia-style markdown articles from the knowledge graph # Generates an agent-crawlable wiki: index.md + one article per community + god node articles from __future__ import annotations from collections import Counter from pathlib import Path import networkx as nx def _safe_filename(name: str) -> st...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/bench_extract.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.567448
#!/usr/bin/env python3 """Benchmark: sequential vs parallel AST extraction. Usage: python tests/bench_extract.py [path-to-repo] Defaults to the current directory if no path is given. Clears the AST cache between runs so every file is re-extracted. Example output: === Graphify AST Extraction Benchmark === ...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/fixtures/sample.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.610842
class Transformer: def __init__(self, d_model: int): self.d_model = d_model def forward(self, x): return x
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/fixtures/sample_calls.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.631716
"""Fixture: functions and methods that call each other - for call-graph extraction tests.""" def compute_score(data): return sum(data) def normalize(value): return value / 100.0 def run_analysis(data): score = compute_score(data) return normalize(score) class Analyzer: def process(self, data...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_analyze.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.722375
"""Tests for analyze.py.""" import json import networkx as nx from pathlib import Path from graphify.build import build_from_json from graphify.cluster import cluster from graphify.analyze import god_nodes, surprising_connections, _is_concept_node, graph_diff, _surprise_score, _file_category FIXTURES = Path(__file__)....
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_benchmark.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.753564
"""Tests for graphify/benchmark.py.""" from __future__ import annotations import json import pytest import networkx as nx from networkx.readwrite import json_graph from graphify.benchmark import run_benchmark, print_benchmark, _query_subgraph_tokens, _SAMPLE_QUESTIONS def _make_graph() -> nx.Graph: G = nx.Graph(...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_build.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.763799
import json from pathlib import Path from graphify.build import build_from_json, build FIXTURES = Path(__file__).parent / "fixtures" def load_extraction(): return json.loads((FIXTURES / "extraction.json").read_text()) def test_build_from_json_node_count(): G = build_from_json(load_extraction()) assert G....
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_cache.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.834121
"""Tests for graphify/cache.py.""" import pytest from pathlib import Path from graphify.cache import file_hash, cache_dir, load_cached, save_cached, cached_files, clear_cache, _body_content @pytest.fixture def tmp_file(tmp_path): f = tmp_path / "sample.txt" f.write_text("hello world") return f @pytest.f...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_chunking.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.884155
"""Tests for token-aware chunking and parallel chunk execution in graphify.llm.""" import time from pathlib import Path from unittest.mock import patch import pytest @pytest.fixture(autouse=False) def no_tokenizer(): """Force the chars/4 fallback so packing math is deterministic regardless of whether tiktoke...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_claude_md.py
null
null
null
null
null
null
Python
2026-05-04T02:21:02.927554
"""Tests for graphify claude install / uninstall commands.""" from pathlib import Path import pytest from graphify.__main__ import claude_install, claude_uninstall, _CLAUDE_MD_MARKER, _CLAUDE_MD_SECTION # --------------------------------------------------------------------------- # install # -------------------------...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_cluster.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.078751
import json import sys import networkx as nx from pathlib import Path from graphify.build import build_from_json from graphify.cluster import cluster, cohesion_score, score_all FIXTURES = Path(__file__).parent / "fixtures" def make_graph(): return build_from_json(json.loads((FIXTURES / "extraction.json").read_tex...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_confidence.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.139313
"""Tests for confidence_score on edges.""" import json import tempfile from pathlib import Path import networkx as nx from graphify.build import build_from_json from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections from graphify.export import to_json from graph...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_detect.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.246345
from pathlib import Path from graphify.detect import classify_file, count_words, detect, FileType, _looks_like_paper, _is_ignored, _load_graphifyignore FIXTURES = Path(__file__).parent / "fixtures" def test_classify_python(): assert classify_file(Path("foo.py")) == FileType.CODE def test_classify_typescript(): ...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_export.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.270048
import json import tempfile from pathlib import Path from graphify.build import build_from_json from graphify.cluster import cluster from graphify.export import to_json, to_cypher, to_graphml, to_html, to_canvas FIXTURES = Path(__file__).parent / "fixtures" def make_graph(): return build_from_json(json.loads((FIX...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_hooks.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.344439
"""Tests for hooks.py - git hook install/uninstall.""" import os import subprocess from pathlib import Path import pytest from graphify.hooks import install, uninstall, status, _HOOK_MARKER, _CHECKOUT_MARKER def _make_git_repo(tmp_path: Path) -> Path: subprocess.run(["git", "init", str(tmp_path)], check=True, cap...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_extract.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.358535
from pathlib import Path from graphify.extract import extract_python, extract, collect_files, _make_id FIXTURES = Path(__file__).parent / "fixtures" def test_make_id_strips_dots_and_underscores(): assert _make_id("_auth") == "auth" assert _make_id(".httpx._client") == "httpx_client" def test_make_id_consis...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_hypergraph.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.360244
"""Tests for hyperedge support in graphify.""" from __future__ import annotations import json import tempfile from pathlib import Path import networkx as nx import pytest from graphify.build import build_from_json from graphify.export import attach_hyperedges, to_json from graphify.report import generate # --------...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_ingest.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.471015
"""Tests for graphify.ingest.save_query_result""" from __future__ import annotations import re from pathlib import Path import pytest from graphify.ingest import save_query_result def test_file_created(tmp_path): out = save_query_result("what is attention?", "Attention is...", tmp_path / "memory") assert out....
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_install.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.472604
"""Tests for graphify install --platform routing.""" from pathlib import Path from unittest.mock import patch import pytest PLATFORMS = { "claude": (".claude/skills/graphify/SKILL.md",), "codex": (".agents/skills/graphify/SKILL.md",), "opencode": (".config/opencode/skills/graphify/SKILL.md",), "claw":...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_languages.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.584176
"""Tests for language extractors: Java, C, C++, Ruby, C#, Kotlin, Scala, PHP, Swift, Go, Julia, JS/TS.""" from __future__ import annotations from pathlib import Path import pytest from graphify.extract import ( extract_java, extract_c, extract_cpp, extract_ruby, extract_csharp, extract_kotlin, extract_scala, ex...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_multilang.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.696772
"""Tests for multi-language AST extraction: JS/TS, Go, Rust, SQL.""" from __future__ import annotations import shutil from pathlib import Path import pytest from graphify.extract import extract_js, extract_go, extract_rust, extract, extract_sql FIXTURES = Path(__file__).parent / "fixtures" # ── helpers ─────────────...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_pipeline.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.698678
""" End-to-end pipeline test: detect → extract → build → cluster → analyze → report → export. Uses the existing test fixtures (code + markdown). No LLM calls - AST extraction only. Catches regressions in how modules connect, not just individual module behaviour. """ import json import tempfile from pathlib import Path ...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_rationale.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.832399
"""Tests for rationale/docstring extraction in extract.py.""" import textwrap from pathlib import Path import pytest from graphify.extract import extract_python def _write_py(tmp_path: Path, code: str) -> Path: p = tmp_path / "sample.py" p.write_text(textwrap.dedent(code)) return p def test_module_docst...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_query_cli.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.833082
"""Tests for graphify query CLI context filtering.""" from __future__ import annotations import json import networkx as nx from networkx.readwrite import json_graph import graphify.__main__ as mainmod def _write_graph(tmp_path): G = nx.Graph() G.add_node("n1", label="extract", source_file="extract.py", sou...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_security.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.945371
"""Tests for graphify/security.py - URL validation, safe fetch, path guards, label sanitisation.""" from __future__ import annotations import json import urllib.error from pathlib import Path from unittest.mock import MagicMock, patch import pytest from graphify.security import ( sanitize_label, safe_fetch, ...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_report.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.946040
import json from pathlib import Path from graphify.build import build_from_json from graphify.cluster import cluster, score_all from graphify.analyze import god_nodes, surprising_connections from graphify.report import generate FIXTURES = Path(__file__).parent / "fixtures" def make_inputs(): extraction = json.loa...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_semantic_similarity.py
null
null
null
null
null
null
Python
2026-05-04T02:21:03.951590
"""Tests for semantically_similar_to edge support.""" import networkx as nx import pytest from graphify.build import build_from_json from graphify.analyze import surprising_connections, _surprise_score from graphify.report import generate # --------------------------------------------------------------------------- #...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_serve.py
null
null
null
null
null
null
Python
2026-05-04T02:21:04.054026
"""Tests for serve.py - MCP graph query helpers (no mcp package required).""" import json import pytest import networkx as nx from networkx.readwrite import json_graph from graphify.serve import ( _communities_from_graph, _score_nodes, _bfs, _dfs, _filter_graph_by_context, _infer_context_filter...
safishamsi/graphify
https://github.com/safishamsi/graphify
null
null
null
null
41,803
null
null
mit
null
null
null
null
null
null
null
tests/test_transcribe.py
null
null
null
null
null
null
Python
2026-05-04T02:21:04.109184
"""Tests for graphify.transcribe — video/audio transcription support.""" from __future__ import annotations import os from pathlib import Path from unittest.mock import MagicMock, patch import pytest from graphify.transcribe import ( VIDEO_EXTENSIONS, build_whisper_prompt, transcribe, transcribe_all,...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/hook.py
null
null
null
null
null
null
Python
2026-05-04T02:21:06.681987
"""Shared lifecycle hook primitives for agent runs.""" from __future__ import annotations from dataclasses import dataclass, field from typing import Any from loguru import logger from nanobot.providers.base import LLMResponse, ToolCallRequest @dataclass(slots=True) class AgentHookContext: """Mutable per-iter...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/__main__.py
null
null
null
null
null
null
Python
2026-05-04T02:21:06.866926
""" Entry point for running nanobot as a module: python -m nanobot """ from nanobot.cli.commands import app if __name__ == "__main__": app()
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/context.py
null
null
null
null
null
null
Python
2026-05-04T02:21:06.868606
"""Context builder for assembling agent prompts.""" import base64 import mimetypes import platform from contextlib import suppress from importlib.resources import files as pkg_files from pathlib import Path from typing import Any from nanobot.agent.memory import MemoryStore from nanobot.agent.skills import SkillsLoad...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/skills.py
null
null
null
null
null
null
Python
2026-05-04T02:21:06.874691
"""Skills loader for agent capabilities.""" import json import os import re import shutil from pathlib import Path import yaml # Default builtin skills directory (relative to this file) BUILTIN_SKILLS_DIR = Path(__file__).parent.parent / "skills" # Opening ---, YAML body (group 1), closing --- on its own line; supp...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:21:06.875806
"""Agent core module.""" from nanobot.agent.context import ContextBuilder from nanobot.agent.hook import AgentHook, AgentHookContext, CompositeHook from nanobot.agent.loop import AgentLoop from nanobot.agent.memory import Dream, MemoryStore from nanobot.agent.skills import SkillsLoader from nanobot.agent.subagent impo...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/autocompact.py
null
null
null
null
null
null
Python
2026-05-04T02:21:06.925824
"""Auto compact: proactive compression of idle sessions to reduce token cost and latency.""" from __future__ import annotations from collections.abc import Collection from datetime import datetime from typing import TYPE_CHECKING, Any, Callable, Coroutine from loguru import logger from nanobot.session.manager import...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/memory.py
null
null
null
null
null
null
Python
2026-05-04T02:21:06.927948
"""Memory system: pure file I/O store, lightweight Consolidator, and Dream processor.""" from __future__ import annotations import asyncio import json import os import re import weakref from contextlib import suppress import tiktoken from datetime import datetime from pathlib import Path from typing import TYPE_CHECK...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/runner.py
null
null
null
null
null
null
Python
2026-05-04T02:21:06.928824
"""Shared execution loop for tool-using agents.""" from __future__ import annotations import asyncio import inspect import os from contextlib import suppress from dataclasses import dataclass, field from pathlib import Path from typing import Any from loguru import logger from nanobot.agent.hook import AgentHook, A...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/loop.py
null
null
null
null
null
null
Python
2026-05-04T02:21:06.948884
"""Agent loop: the core processing engine.""" from __future__ import annotations import asyncio import dataclasses import json import os import time from contextlib import AsyncExitStack, nullcontext, suppress from pathlib import Path from typing import TYPE_CHECKING, Any, Awaitable, Callable from loguru import logg...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:21:06.978575
""" nanobot - A lightweight AI agent framework """ from importlib.metadata import PackageNotFoundError, version as _pkg_version from pathlib import Path import tomllib def _read_pyproject_version() -> str | None: """Read the source-tree version when package metadata is unavailable.""" pyproject = Path(__file...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/subagent.py
null
null
null
null
null
null
Python
2026-05-04T02:21:07.361590
"""Subagent manager for background task execution.""" import asyncio import json import time import uuid from dataclasses import dataclass, field from pathlib import Path from typing import Any from loguru import logger from nanobot.agent.hook import AgentHook, AgentHookContext from nanobot.agent.runner import Agent...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:21:07.781408
"""Agent tools module.""" from nanobot.agent.tools.base import Schema, Tool, tool_parameters from nanobot.agent.tools.registry import ToolRegistry from nanobot.agent.tools.schema import ( ArraySchema, BooleanSchema, IntegerSchema, NumberSchema, ObjectSchema, StringSchema, tool_parameters_sc...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/filesystem.py
null
null
null
null
null
null
Python
2026-05-04T02:21:07.782838
"""File system tools: read, write, edit, list.""" import difflib import mimetypes import os from dataclasses import dataclass from pathlib import Path from typing import Any from nanobot.agent.tools.base import Tool, tool_parameters from nanobot.agent.tools.schema import BooleanSchema, IntegerSchema, StringSchema, to...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/ask.py
null
null
null
null
null
null
Python
2026-05-04T02:21:07.913511
"""Tool for pausing a turn until the user answers.""" import json from typing import Any from nanobot.agent.tools.base import Tool, tool_parameters from nanobot.agent.tools.schema import ArraySchema, StringSchema, tool_parameters_schema STRUCTURED_BUTTON_CHANNELS = frozenset({"telegram", "websocket"}) class AskUse...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/mcp.py
null
null
null
null
null
null
Python
2026-05-04T02:21:07.914046
"""MCP client: connects to MCP servers and wraps their tools as native nanobot tools.""" import asyncio import os import re import shutil from contextlib import AsyncExitStack, suppress from typing import Any import httpx from loguru import logger from nanobot.agent.tools.base import Tool from nanobot.agent.tools.re...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/file_state.py
null
null
null
null
null
null
Python
2026-05-04T02:21:07.917382
"""Track file-read state for read-before-edit warnings and read deduplication.""" from __future__ import annotations import hashlib import os from contextvars import ContextVar, Token from dataclasses import dataclass from pathlib import Path @dataclass(slots=True) class ReadState: mtime: float offset: int ...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/base.py
null
null
null
null
null
null
Python
2026-05-04T02:21:07.918302
"""Base class for agent tools.""" from abc import ABC, abstractmethod from collections.abc import Callable from copy import deepcopy from typing import Any, TypeVar _ToolT = TypeVar("_ToolT", bound="Tool") # Matches :meth:`Tool._cast_value` / :meth:`Schema.validate_json_schema_value` behavior _JSON_TYPE_MAP: dict[st...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/message.py
null
null
null
null
null
null
Python
2026-05-04T02:21:07.919281
"""Message tool for sending messages to users.""" import os from contextvars import ContextVar from pathlib import Path from typing import Any, Awaitable, Callable from nanobot.agent.tools.base import Tool, tool_parameters from nanobot.agent.tools.schema import ArraySchema, StringSchema, tool_parameters_schema from n...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/cron.py
null
null
null
null
null
null
Python
2026-05-04T02:21:07.920635
"""Cron tool for scheduling reminders and tasks.""" from contextvars import ContextVar from datetime import datetime from typing import Any from nanobot.agent.tools.base import Tool, tool_parameters from nanobot.agent.tools.schema import ( BooleanSchema, IntegerSchema, StringSchema, tool_parameters_sc...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/notebook.py
null
null
null
null
null
null
Python
2026-05-04T02:21:08.003336
"""NotebookEditTool — edit Jupyter .ipynb notebooks.""" from __future__ import annotations import json import uuid from typing import Any from nanobot.agent.tools.base import tool_parameters from nanobot.agent.tools.schema import IntegerSchema, StringSchema, tool_parameters_schema from nanobot.agent.tools.filesystem...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/registry.py
null
null
null
null
null
null
Python
2026-05-04T02:21:08.115245
"""Tool registry for dynamic tool management.""" from typing import Any from nanobot.agent.tools.base import Tool class ToolRegistry: """ Registry for agent tools. Allows dynamic registration and execution of tools. """ def __init__(self): self._tools: dict[str, Tool] = {} self...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/sandbox.py
null
null
null
null
null
null
Python
2026-05-04T02:21:08.350099
"""Sandbox backends for shell command execution. To add a new backend, implement a function with the signature: _wrap_<name>(command: str, workspace: str, cwd: str) -> str and register it in _BACKENDS below. """ import shlex from pathlib import Path from nanobot.config.paths import get_media_dir def _bwrap(com...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/schema.py
null
null
null
null
null
null
Python
2026-05-04T02:21:08.363595
"""JSON Schema fragment types: all subclass :class:`~nanobot.agent.tools.base.Schema` for descriptions and constraints on tool parameters. - ``to_json_schema()``: returns a dict compatible with :meth:`~nanobot.agent.tools.base.Schema.validate_json_schema_value` / :class:`~nanobot.agent.tools.base.Tool`. - ``validate...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/shell.py
null
null
null
null
null
null
Python
2026-05-04T02:21:08.498775
"""Shell execution tool.""" import asyncio import os import re import shutil import sys from contextlib import suppress from pathlib import Path from typing import Any from loguru import logger from nanobot.agent.tools.base import Tool, tool_parameters from nanobot.agent.tools.sandbox import wrap_command from nanobo...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/spawn.py
null
null
null
null
null
null
Python
2026-05-04T02:21:08.504622
"""Spawn tool for creating background subagents.""" from contextvars import ContextVar from typing import TYPE_CHECKING, Any from nanobot.agent.tools.base import Tool, tool_parameters from nanobot.agent.tools.schema import StringSchema, tool_parameters_schema if TYPE_CHECKING: from nanobot.agent.subagent import ...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/search.py
null
null
null
null
null
null
Python
2026-05-04T02:21:08.506221
"""Search tools: grep and glob.""" from __future__ import annotations import fnmatch import os import re from contextlib import suppress from pathlib import Path, PurePosixPath from typing import Any, Iterable, TypeVar from nanobot.agent.tools.filesystem import ListDirTool, _FsTool _DEFAULT_HEAD_LIMIT = 250 T = Typ...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/agent/tools/web.py
null
null
null
null
null
null
Python
2026-05-04T02:21:08.662941
"""Web tools: web_search and web_fetch.""" from __future__ import annotations import asyncio import html import json import os import re from typing import TYPE_CHECKING, Any from urllib.parse import quote, urlparse import httpx from loguru import logger from nanobot.agent.tools.base import Tool, tool_parameters fr...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/api/server.py
null
null
null
null
null
null
Python
2026-05-04T02:21:08.684271
"""OpenAI-compatible HTTP API server for a fixed nanobot session. Provides /v1/chat/completions and /v1/models endpoints. All requests route to a single persistent API session. """ from __future__ import annotations import asyncio import contextlib import json as _json import time import uuid from typing import Any ...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/bus/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:21:08.725750
"""Message bus module for decoupled channel-agent communication.""" from nanobot.bus.events import InboundMessage, OutboundMessage from nanobot.bus.queue import MessageBus __all__ = ["MessageBus", "InboundMessage", "OutboundMessage"]
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/bus/events.py
null
null
null
null
null
null
Python
2026-05-04T02:21:08.908942
"""Event types for the message bus.""" from dataclasses import dataclass, field from datetime import datetime from typing import Any @dataclass class InboundMessage: """Message received from a chat channel.""" channel: str # telegram, discord, slack, whatsapp sender_id: str # User identifier chat_...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/bus/queue.py
null
null
null
null
null
null
Python
2026-05-04T02:21:08.944956
"""Async message queue for decoupled channel-agent communication.""" import asyncio from nanobot.bus.events import InboundMessage, OutboundMessage class MessageBus: """ Async message bus that decouples chat channels from the agent core. Channels push messages to the inbound queue, and the agent process...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/channels/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:21:09.075158
"""Chat channels module with plugin architecture.""" from nanobot.channels.base import BaseChannel from nanobot.channels.manager import ChannelManager __all__ = ["BaseChannel", "ChannelManager"]
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/channels/dingtalk.py
null
null
null
null
null
null
Python
2026-05-04T02:21:09.114689
"""DingTalk/DingDing channel implementation using Stream Mode.""" import asyncio import json import mimetypes import os import time import zipfile from io import BytesIO from pathlib import Path from typing import Any from urllib.parse import unquote, urljoin, urlparse import httpx from loguru import logger from pyda...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/channels/base.py
null
null
null
null
null
null
Python
2026-05-04T02:21:09.124827
"""Base channel interface for chat platforms.""" from __future__ import annotations from abc import ABC, abstractmethod from pathlib import Path from typing import Any from loguru import logger from nanobot.bus.events import InboundMessage, OutboundMessage from nanobot.bus.queue import MessageBus class BaseChanne...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/channels/discord.py
null
null
null
null
null
null
Python
2026-05-04T02:21:09.150376
"""Discord channel implementation using discord.py.""" from __future__ import annotations import asyncio import importlib.util import time from contextlib import suppress from dataclasses import dataclass from pathlib import Path from typing import TYPE_CHECKING, Any, Literal from loguru import logger from pydantic ...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/channels/email.py
null
null
null
null
null
null
Python
2026-05-04T02:21:09.172312
"""Email channel implementation using IMAP polling + SMTP replies.""" import asyncio import html import imaplib import re import smtplib import ssl from contextlib import suppress from datetime import date from email import policy from email.header import decode_header, make_header from email.message import EmailMessa...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/channels/feishu.py
null
null
null
null
null
null
Python
2026-05-04T02:21:09.232295
"""Feishu/Lark channel implementation using lark-oapi SDK with WebSocket long connection.""" import asyncio import importlib.util import json import os import re import threading import time import uuid from collections import OrderedDict from contextlib import suppress from dataclasses import dataclass from typing im...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/channels/manager.py
null
null
null
null
null
null
Python
2026-05-04T02:21:09.250044
"""Channel manager for coordinating chat channels.""" from __future__ import annotations import asyncio import hashlib from contextlib import suppress from pathlib import Path from typing import TYPE_CHECKING, Any from loguru import logger from nanobot.bus.events import OutboundMessage from nanobot.bus.queue import...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/channels/matrix.py
null
null
null
null
null
null
Python
2026-05-04T02:21:09.302249
"""Matrix (Element) channel — inbound sync + outbound message/media delivery.""" import asyncio import json import logging import mimetypes import time from contextlib import suppress from dataclasses import dataclass from pathlib import Path from typing import Any, Literal, TypeAlias from loguru import logger from p...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/channels/mochat.py
null
null
null
null
null
null
Python
2026-05-04T02:21:09.476143
"""Mochat channel implementation using Socket.IO with HTTP polling fallback.""" from __future__ import annotations import asyncio import json from collections import deque from contextlib import suppress from dataclasses import dataclass, field from datetime import datetime from typing import Any import httpx from l...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/channels/msteams.py
null
null
null
null
null
null
Python
2026-05-04T02:21:09.504379
"""Microsoft Teams channel MVP using a tiny built-in HTTP webhook server. Scope: - DM-focused MVP - text inbound/outbound - conversation reference persistence - sender allowlist support - optional inbound Bot Framework bearer-token validation - no attachments/cards/polls yet """ from __future__ import annotations im...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/channels/qq.py
null
null
null
null
null
null
Python
2026-05-04T02:21:09.677516
"""QQ channel implementation using botpy SDK. Inbound: - Parse QQ botpy messages (C2C / Group) - Download attachments to media dir using chunked streaming write (memory-safe) - Publish to Nanobot bus via BaseChannel._handle_message() - Content includes a clear, actionable "Received files:" list with local paths Outbo...
HKUDS/nanobot
https://github.com/HKUDS/nanobot
null
null
null
null
41,574
null
null
mit
null
null
null
null
null
null
null
nanobot/channels/registry.py
null
null
null
null
null
null
Python
2026-05-04T02:21:09.702635
"""Auto-discovery for built-in channel modules and external plugins.""" from __future__ import annotations import importlib import pkgutil from typing import TYPE_CHECKING from loguru import logger if TYPE_CHECKING: from nanobot.channels.base import BaseChannel _INTERNAL = frozenset({"base", "manager", "regist...