smartrouter 1.0.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- smartrouter-1.0.9/.gitignore +50 -0
- smartrouter-1.0.9/LICENSE +674 -0
- smartrouter-1.0.9/PKG-INFO +452 -0
- smartrouter-1.0.9/README.md +412 -0
- smartrouter-1.0.9/docs/GUIDE.md +947 -0
- smartrouter-1.0.9/docs/PUBLISH_CHECKLIST.md +125 -0
- smartrouter-1.0.9/docs/README.zh.md +412 -0
- smartrouter-1.0.9/docs/ROUTING_GUIDE.md +245 -0
- smartrouter-1.0.9/docs/superpowers/plans/2026-04-18--smart-router-plan.md +1660 -0
- smartrouter-1.0.9/docs/superpowers/plans/2026-04-18--smart-router.md +293 -0
- smartrouter-1.0.9/docs/superpowers/plans/2026-04-19--config-v3-plan.md +1480 -0
- smartrouter-1.0.9/docs/superpowers/plans/2026-04-19--config-v3-refactor.md +570 -0
- smartrouter-1.0.9/docs/superpowers/plans/2026-04-21--routing-architecture-fix-plan.md +308 -0
- smartrouter-1.0.9/docs/superpowers/plans/2026-04-21--routing-architecture-fix.md +187 -0
- smartrouter-1.0.9/docs/superpowers/plans/2026-04-23--src-directory-refactor.md +105 -0
- smartrouter-1.0.9/pyproject.toml +75 -0
- smartrouter-1.0.9/script/download-config.py +100 -0
- smartrouter-1.0.9/script/install-remote.sh +240 -0
- smartrouter-1.0.9/script/install.sh +179 -0
- smartrouter-1.0.9/script/make-portable.sh +121 -0
- smartrouter-1.0.9/script/uninstall.sh +68 -0
- smartrouter-1.0.9/script/verify.py +94 -0
- smartrouter-1.0.9/src/smart_router/__init__.py +1 -0
- smartrouter-1.0.9/src/smart_router/assets/coffee_qr.png +0 -0
- smartrouter-1.0.9/src/smart_router/classifier/__init__.py +6 -0
- smartrouter-1.0.9/src/smart_router/classifier/difficulty_classifier.py +108 -0
- smartrouter-1.0.9/src/smart_router/classifier/embedding_matcher.py +137 -0
- smartrouter-1.0.9/src/smart_router/classifier/task_classifier.py +372 -0
- smartrouter-1.0.9/src/smart_router/classifier/types.py +23 -0
- smartrouter-1.0.9/src/smart_router/cli.py +823 -0
- smartrouter-1.0.9/src/smart_router/config/__init__.py +14 -0
- smartrouter-1.0.9/src/smart_router/config/loader.py +76 -0
- smartrouter-1.0.9/src/smart_router/config/schema.py +278 -0
- smartrouter-1.0.9/src/smart_router/config/v3_loader.py +21 -0
- smartrouter-1.0.9/src/smart_router/config/v3_schema.py +33 -0
- smartrouter-1.0.9/src/smart_router/gateway/__init__.py +16 -0
- smartrouter-1.0.9/src/smart_router/gateway/daemon.py +289 -0
- smartrouter-1.0.9/src/smart_router/gateway/server.py +205 -0
- smartrouter-1.0.9/src/smart_router/gateway/server_main.py +30 -0
- smartrouter-1.0.9/src/smart_router/misc/__init__.py +13 -0
- smartrouter-1.0.9/src/smart_router/misc/coffee_qr.py +200 -0
- smartrouter-1.0.9/src/smart_router/router/__init__.py +8 -0
- smartrouter-1.0.9/src/smart_router/router/plugin.py +194 -0
- smartrouter-1.0.9/src/smart_router/router/plugin_v3_adapter.py +128 -0
- smartrouter-1.0.9/src/smart_router/selector/__init__.py +13 -0
- smartrouter-1.0.9/src/smart_router/selector/model_selector.py +200 -0
- smartrouter-1.0.9/src/smart_router/selector/strategies.py +20 -0
- smartrouter-1.0.9/src/smart_router/selector/v3_selector.py +384 -0
- smartrouter-1.0.9/src/smart_router/templates/models.yaml +373 -0
- smartrouter-1.0.9/src/smart_router/templates/providers.yaml +63 -0
- smartrouter-1.0.9/src/smart_router/templates/routing.yaml +145 -0
- smartrouter-1.0.9/src/smart_router/utils/__init__.py +0 -0
- smartrouter-1.0.9/src/smart_router/utils/markers.py +45 -0
- smartrouter-1.0.9/src/smart_router/utils/token_counter.py +74 -0
- smartrouter-1.0.9/tests/__init__.py +0 -0
- smartrouter-1.0.9/tests/classifier/__init__.py +0 -0
- smartrouter-1.0.9/tests/classifier/test_difficulty_classifier.py +150 -0
- smartrouter-1.0.9/tests/classifier/test_embedding_matcher.py +184 -0
- smartrouter-1.0.9/tests/classifier/test_task_classifier.py +303 -0
- smartrouter-1.0.9/tests/cli/__init__.py +0 -0
- smartrouter-1.0.9/tests/cli/test_cli.py +383 -0
- smartrouter-1.0.9/tests/cli/test_cli_edge.py +190 -0
- smartrouter-1.0.9/tests/cli/test_cli_list.py +165 -0
- smartrouter-1.0.9/tests/config/__init__.py +0 -0
- smartrouter-1.0.9/tests/config/test_loader.py +179 -0
- smartrouter-1.0.9/tests/config/test_schema.py +345 -0
- smartrouter-1.0.9/tests/config/test_v3_schema.py +507 -0
- smartrouter-1.0.9/tests/gateway/__init__.py +0 -0
- smartrouter-1.0.9/tests/gateway/test_daemon.py +497 -0
- smartrouter-1.0.9/tests/gateway/test_server.py +346 -0
- smartrouter-1.0.9/tests/gateway/test_server_main.py +52 -0
- smartrouter-1.0.9/tests/integration/__init__.py +0 -0
- smartrouter-1.0.9/tests/integration/test_api.py +125 -0
- smartrouter-1.0.9/tests/integration/test_context_aware.py +321 -0
- smartrouter-1.0.9/tests/integration/test_integration.py +222 -0
- smartrouter-1.0.9/tests/integration/test_v3_integration.py +170 -0
- smartrouter-1.0.9/tests/misc/__init__.py +0 -0
- smartrouter-1.0.9/tests/misc/test_coffee_qr.py +166 -0
- smartrouter-1.0.9/tests/router/__init__.py +0 -0
- smartrouter-1.0.9/tests/router/test_plugin.py +212 -0
- smartrouter-1.0.9/tests/router/test_plugin_v3_adapter.py +174 -0
- smartrouter-1.0.9/tests/selector/__init__.py +0 -0
- smartrouter-1.0.9/tests/selector/test_model_selector.py +259 -0
- smartrouter-1.0.9/tests/selector/test_strategies.py +66 -0
- smartrouter-1.0.9/tests/selector/test_v3_selector.py +415 -0
- smartrouter-1.0.9/tests/utils/__init__.py +0 -0
- smartrouter-1.0.9/tests/utils/test_markers.py +101 -0
- smartrouter-1.0.9/tests/utils/test_token_counter.py +130 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
|
|
23
|
+
# 测试
|
|
24
|
+
.pytest_cache/
|
|
25
|
+
.coverage
|
|
26
|
+
htmlcov/
|
|
27
|
+
|
|
28
|
+
# 环境
|
|
29
|
+
.env
|
|
30
|
+
.venv
|
|
31
|
+
env/
|
|
32
|
+
venv/
|
|
33
|
+
|
|
34
|
+
# IDE
|
|
35
|
+
.idea/
|
|
36
|
+
.vscode/
|
|
37
|
+
*.swp
|
|
38
|
+
*.swo
|
|
39
|
+
|
|
40
|
+
# macOS
|
|
41
|
+
.DS_Store
|
|
42
|
+
|
|
43
|
+
# Smart Router
|
|
44
|
+
*.log
|
|
45
|
+
/smart-router.yaml
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# Opencode
|
|
50
|
+
.sisyphus/
|