bub 0.3.2__tar.gz → 0.3.4__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.
Files changed (63) hide show
  1. bub-0.3.4/.gitignore +147 -0
  2. {bub-0.3.2 → bub-0.3.4}/PKG-INFO +41 -37
  3. {bub-0.3.2 → bub-0.3.4}/README.md +23 -22
  4. {bub-0.3.2 → bub-0.3.4}/pyproject.toml +39 -27
  5. {bub-0.3.2 → bub-0.3.4}/src/bub/__init__.py +1 -1
  6. {bub-0.3.2 → bub-0.3.4}/src/bub/__main__.py +14 -0
  7. {bub-0.3.2 → bub-0.3.4}/src/bub/builtin/agent.py +153 -50
  8. bub-0.3.4/src/bub/builtin/cli.py +201 -0
  9. {bub-0.3.2 → bub-0.3.4}/src/bub/builtin/hook_impl.py +7 -3
  10. {bub-0.3.2 → bub-0.3.4}/src/bub/builtin/settings.py +2 -1
  11. {bub-0.3.2 → bub-0.3.4}/src/bub/builtin/shell_manager.py +2 -0
  12. {bub-0.3.2 → bub-0.3.4}/src/bub/builtin/store.py +3 -3
  13. {bub-0.3.2 → bub-0.3.4}/src/bub/builtin/tools.py +11 -3
  14. {bub-0.3.2 → bub-0.3.4}/src/bub/channels/base.py +12 -0
  15. {bub-0.3.2 → bub-0.3.4}/src/bub/channels/cli/__init__.py +37 -14
  16. bub-0.3.4/src/bub/channels/cli/renderer.py +82 -0
  17. {bub-0.3.2 → bub-0.3.4}/src/bub/channels/manager.py +18 -3
  18. {bub-0.3.2 → bub-0.3.4}/src/bub/channels/telegram.py +4 -0
  19. {bub-0.3.2 → bub-0.3.4}/src/bub/framework.py +32 -14
  20. {bub-0.3.2 → bub-0.3.4}/src/bub/hook_runtime.py +15 -4
  21. {bub-0.3.2 → bub-0.3.4}/src/bub/hookspecs.py +7 -2
  22. {bub-0.3.2 → bub-0.3.4}/src/bub/types.py +4 -1
  23. {bub-0.3.2 → bub-0.3.4}/src/skills/telegram/SKILL.md +15 -25
  24. {bub-0.3.2 → bub-0.3.4}/src/skills/telegram/scripts/telegram_send.py +5 -29
  25. {bub-0.3.2 → bub-0.3.4}/tests/test_builtin_agent.py +36 -11
  26. {bub-0.3.2 → bub-0.3.4}/tests/test_builtin_hook_impl.py +15 -5
  27. {bub-0.3.2 → bub-0.3.4}/tests/test_channels.py +27 -10
  28. {bub-0.3.2 → bub-0.3.4}/tests/test_framework.py +5 -5
  29. {bub-0.3.2 → bub-0.3.4}/tests/test_settings.py +23 -1
  30. {bub-0.3.2 → bub-0.3.4}/tests/test_subagent_tool.py +8 -1
  31. bub-0.3.4/tests/test_tape_search_output.py +55 -0
  32. bub-0.3.2/src/bub/builtin/cli.py +0 -83
  33. bub-0.3.2/src/bub/channels/cli/renderer.py +0 -46
  34. {bub-0.3.2 → bub-0.3.4}/LICENSE +0 -0
  35. {bub-0.3.2 → bub-0.3.4}/src/bub/builtin/__init__.py +0 -0
  36. {bub-0.3.2 → bub-0.3.4}/src/bub/builtin/auth.py +0 -0
  37. {bub-0.3.2 → bub-0.3.4}/src/bub/builtin/context.py +0 -0
  38. {bub-0.3.2 → bub-0.3.4}/src/bub/builtin/tape.py +0 -0
  39. {bub-0.3.2 → bub-0.3.4}/src/bub/channels/__init__.py +0 -0
  40. {bub-0.3.2 → bub-0.3.4}/src/bub/channels/handler.py +0 -0
  41. {bub-0.3.2 → bub-0.3.4}/src/bub/channels/message.py +0 -0
  42. {bub-0.3.2 → bub-0.3.4}/src/bub/envelope.py +0 -0
  43. {bub-0.3.2 → bub-0.3.4}/src/bub/skills.py +0 -0
  44. {bub-0.3.2 → bub-0.3.4}/src/bub/tools.py +0 -0
  45. {bub-0.3.2 → bub-0.3.4}/src/bub/utils.py +0 -0
  46. {bub-0.3.2 → bub-0.3.4}/src/skills/README.md +0 -0
  47. {bub-0.3.2 → bub-0.3.4}/src/skills/gh/SKILL.md +0 -0
  48. {bub-0.3.2 → bub-0.3.4}/src/skills/skill-creator/SKILL.md +0 -0
  49. {bub-0.3.2 → bub-0.3.4}/src/skills/skill-creator/license.txt +0 -0
  50. {bub-0.3.2 → bub-0.3.4}/src/skills/skill-creator/scripts/init_skill.py +0 -0
  51. {bub-0.3.2 → bub-0.3.4}/src/skills/skill-creator/scripts/quick_validate.py +0 -0
  52. {bub-0.3.2 → bub-0.3.4}/src/skills/telegram/scripts/telegram_edit.py +0 -0
  53. {bub-0.3.2 → bub-0.3.4}/tests/test_builtin_cli.py +0 -0
  54. {bub-0.3.2 → bub-0.3.4}/tests/test_builtin_tools.py +0 -0
  55. {bub-0.3.2 → bub-0.3.4}/tests/test_cli_help.py +0 -0
  56. {bub-0.3.2 → bub-0.3.4}/tests/test_envelope.py +0 -0
  57. {bub-0.3.2 → bub-0.3.4}/tests/test_file_tape_store_entry_ids.py +0 -0
  58. {bub-0.3.2 → bub-0.3.4}/tests/test_fork_store_merge_back.py +0 -0
  59. {bub-0.3.2 → bub-0.3.4}/tests/test_hook_runtime.py +0 -0
  60. {bub-0.3.2 → bub-0.3.4}/tests/test_image_message.py +0 -0
  61. {bub-0.3.2 → bub-0.3.4}/tests/test_skills.py +0 -0
  62. {bub-0.3.2 → bub-0.3.4}/tests/test_tools.py +0 -0
  63. {bub-0.3.2 → bub-0.3.4}/tests/test_utils.py +0 -0
bub-0.3.4/.gitignore ADDED
@@ -0,0 +1,147 @@
1
+ docs/source
2
+
3
+ # From https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore
4
+
5
+ # Byte-compiled / optimized / DLL files
6
+ __pycache__/
7
+ *.py[cod]
8
+ *$py.class
9
+
10
+ # C extensions
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ build/
16
+ develop-eggs/
17
+ dist/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ wheels/
27
+ share/python-wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ MANIFEST
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .nox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ *.py,cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+ cover/
57
+
58
+ # Translations
59
+ *.mo
60
+ *.pot
61
+
62
+ # Django stuff:
63
+ *.log
64
+ local_settings.py
65
+ db.sqlite3
66
+ db.sqlite3-journal
67
+
68
+ # Flask stuff:
69
+ instance/
70
+ .webassets-cache
71
+
72
+ # Scrapy stuff:
73
+ .scrapy
74
+
75
+ # Sphinx documentation
76
+ docs/_build/
77
+
78
+ # PyBuilder
79
+ .pybuilder/
80
+ target/
81
+
82
+ # Jupyter Notebook
83
+ .ipynb_checkpoints
84
+
85
+ # IPython
86
+ profile_default/
87
+ ipython_config.py
88
+
89
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
90
+ __pypackages__/
91
+
92
+ # Celery stuff
93
+ celerybeat-schedule
94
+ celerybeat.pid
95
+
96
+ # SageMath parsed files
97
+ *.sage.py
98
+
99
+ # Environments
100
+ .env
101
+ .venv
102
+ env/
103
+ venv/
104
+ ENV/
105
+ env.bak/
106
+ venv.bak/
107
+ .pdm-python
108
+
109
+ # Spyder project settings
110
+ .spyderproject
111
+ .spyproject
112
+
113
+ # Rope project settings
114
+ .ropeproject
115
+
116
+ # mkdocs documentation
117
+ /site
118
+
119
+ # mypy
120
+ .mypy_cache/
121
+ .dmypy.json
122
+ dmypy.json
123
+
124
+ # Pyre type checker
125
+ .pyre/
126
+
127
+ # pytype static type analyzer
128
+ .pytype/
129
+
130
+ # Cython debug symbols
131
+ cython_debug/
132
+
133
+ # Vscode config files
134
+ .vscode/
135
+
136
+ # PyCharm
137
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
138
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
139
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
140
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
141
+ #.idea/
142
+
143
+ # Reference directory - ignore all reference projects
144
+ reference/
145
+
146
+ # Local legacy backups created during framework migrations
147
+ backup/
@@ -1,8 +1,12 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: bub
3
- Version: 0.3.2
3
+ Version: 0.3.4
4
4
  Summary: A common shape for agents that live alongside people.
5
- Author-Email: Chojan Shang <psiace@apache.org>, Frost Ming <me@frostming.com>, Yihong <zouzou0208@gmail.com>
5
+ Project-URL: Homepage, https://bub.build
6
+ Project-URL: Repository, https://github.com/bubbuild/bub
7
+ Project-URL: Documentation, https://bub.build
8
+ Author-email: Chojan Shang <psiace@apache.org>, Frost Ming <me@frostming.com>, Yihong <zouzou0208@gmail.com>
9
+ License-File: LICENSE
6
10
  Classifier: Intended Audience :: Developers
7
11
  Classifier: Programming Language :: Python
8
12
  Classifier: Programming Language :: Python :: 3
@@ -10,23 +14,22 @@ Classifier: Programming Language :: Python :: 3.12
10
14
  Classifier: Programming Language :: Python :: 3.13
11
15
  Classifier: Programming Language :: Python :: 3.14
12
16
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
13
- Project-URL: Homepage, https://bub.build
14
- Project-URL: Repository, https://github.com/bubbuild/bub
15
- Project-URL: Documentation, https://bub.build
16
17
  Requires-Python: <4.0,>=3.12
17
- Requires-Dist: pydantic>=2.0.0
18
- Requires-Dist: pydantic-settings>=2.0.0
19
- Requires-Dist: pyyaml>=6.0.0
20
- Requires-Dist: pluggy>=1.6.0
21
- Requires-Dist: typer>=0.9.0
22
- Requires-Dist: republic>=0.5.4
18
+ Requires-Dist: aiohttp>=3.13.3
23
19
  Requires-Dist: any-llm-sdk[anthropic]
24
- Requires-Dist: rich>=13.0.0
20
+ Requires-Dist: loguru>=0.7.2
21
+ Requires-Dist: pluggy>=1.6.0
25
22
  Requires-Dist: prompt-toolkit>=3.0.0
23
+ Requires-Dist: pydantic-settings>=2.0.0
24
+ Requires-Dist: pydantic>=2.0.0
26
25
  Requires-Dist: python-telegram-bot>=21.0
27
- Requires-Dist: loguru>=0.7.2
26
+ Requires-Dist: pyyaml>=6.0.0
28
27
  Requires-Dist: rapidfuzz>=3.14.3
29
- Requires-Dist: aiohttp>=3.13.3
28
+ Requires-Dist: republic>=0.5.4
29
+ Requires-Dist: rich>=13.0.0
30
+ Requires-Dist: typer>=0.9.0
31
+ Provides-Extra: logfire
32
+ Requires-Dist: logfire>=4.31.0; extra == 'logfire'
30
33
  Description-Content-Type: text/markdown
31
34
 
32
35
  # Bub
@@ -84,10 +87,10 @@ If `AGENTS.md` exists in the workspace, it is appended to the system prompt auto
84
87
 
85
88
  Key source files:
86
89
 
87
- - Turn orchestrator: [`src/bub/framework.py`](src/bub/framework.py)
88
- - Hook contract: [`src/bub/hookspecs.py`](src/bub/hookspecs.py)
89
- - Builtin hooks: [`src/bub/builtin/hook_impl.py`](src/bub/builtin/hook_impl.py)
90
- - Skill discovery: [`src/bub/skills.py`](src/bub/skills.py)
90
+ - Turn orchestrator: [`src/bub/framework.py`](https://github.com/bubbuild/bub/blob/main/src/bub/framework.py)
91
+ - Hook contract: [`src/bub/hookspecs.py`](https://github.com/bubbuild/bub/blob/main/src/bub/hookspecs.py)
92
+ - Builtin hooks: [`src/bub/builtin/hook_impl.py`](https://github.com/bubbuild/bub/blob/main/src/bub/builtin/hook_impl.py)
93
+ - Skill discovery: [`src/bub/skills.py`](https://github.com/bubbuild/bub/blob/main/src/bub/skills.py)
91
94
 
92
95
  ## What Sets It Apart
93
96
 
@@ -134,15 +137,16 @@ Lines starting with `,` enter internal command mode (`,help`, `,skill name=my-sk
134
137
 
135
138
  ## Configuration
136
139
 
137
- | Variable | Default | Description |
138
- | --------------------------- | ---------------------------------- | ----------------------------------------------- |
139
- | `BUB_MODEL` | `openrouter:qwen/qwen3-coder-next` | Model identifier |
140
- | `BUB_API_KEY` | — | Provider key (optional with `bub login openai`) |
141
- | `BUB_API_BASE` | — | Custom provider endpoint |
142
- | `BUB_API_FORMAT` | `completion` | `completion`, `responses`, or `messages` |
143
- | `BUB_MAX_STEPS` | `50` | Max tool-use loop iterations |
144
- | `BUB_MAX_TOKENS` | `1024` | Max tokens per model call |
145
- | `BUB_MODEL_TIMEOUT_SECONDS` | | Model call timeout (seconds) |
140
+ | Variable | Default | Description |
141
+ |----------|---------|-------------|
142
+ | `BUB_MODEL` | `openrouter:qwen/qwen3-coder-next` | Model identifier |
143
+ | `BUB_API_KEY` | — | Provider key (optional with `bub login openai`) |
144
+ | `BUB_API_BASE` | — | Custom provider endpoint |
145
+ | `BUB_API_FORMAT` | `completion` | `completion`, `responses`, or `messages` |
146
+ | `BUB_CLIENT_ARGS` | | JSON object forwarded to the underlying model client |
147
+ | `BUB_MAX_STEPS` | `50` | Max tool-use loop iterations |
148
+ | `BUB_MAX_TOKENS` | `1024` | Max tokens per model call |
149
+ | `BUB_MODEL_TIMEOUT_SECONDS` | — | Model call timeout (seconds) |
146
150
 
147
151
  ## Background
148
152
 
@@ -152,13 +156,13 @@ Read more: [Context from Tape](https://tape.systems) · [Socialized Evaluation a
152
156
 
153
157
  ## Docs
154
158
 
155
- - [Architecture](docs/architecture.md) — lifecycle, hook precedence, error handling
156
- - [Features](docs/features.md) — what ships today and current boundaries
157
- - [Channels](docs/channels/index.md) — CLI, Telegram, and custom adapters
158
- - [Skills](docs/skills.md) — discovery and authoring
159
- - [Extension Guide](docs/extension-guide.md) — hooks, tools, plugin packaging
160
- - [Deployment](docs/deployment.md) — Docker, environment, upgrades
161
- - [Posts](docs/posts/index.md) — design notes
159
+ - [Architecture](https://bub.build/architecture/) — lifecycle, hook precedence, error handling
160
+ - [Features](https://bub.build/features/) — what ships today and current boundaries
161
+ - [Channels](https://bub.build/channels/) — CLI, Telegram, and custom adapters
162
+ - [Skills](https://bub.build/skills/) — discovery and authoring
163
+ - [Extension Guide](https://bub.build/extension-guide/) — hooks, tools, plugin packaging
164
+ - [Deployment](https://bub.build/deployment/) — Docker, environment, upgrades
165
+ - [Posts](https://bub.build/posts/) — design notes
162
166
 
163
167
  ## Development
164
168
 
@@ -168,8 +172,8 @@ uv run mypy src
168
172
  uv run pytest -q
169
173
  ```
170
174
 
171
- See [CONTRIBUTING.md](./CONTRIBUTING.md).
175
+ See [CONTRIBUTING.md](https://github.com/bubbuild/bub/blob/main/CONTRIBUTING.md).
172
176
 
173
177
  ## License
174
178
 
175
- [Apache-2.0](./LICENSE)
179
+ [Apache-2.0](https://github.com/bubbuild/bub/blob/main/LICENSE)
@@ -53,10 +53,10 @@ If `AGENTS.md` exists in the workspace, it is appended to the system prompt auto
53
53
 
54
54
  Key source files:
55
55
 
56
- - Turn orchestrator: [`src/bub/framework.py`](src/bub/framework.py)
57
- - Hook contract: [`src/bub/hookspecs.py`](src/bub/hookspecs.py)
58
- - Builtin hooks: [`src/bub/builtin/hook_impl.py`](src/bub/builtin/hook_impl.py)
59
- - Skill discovery: [`src/bub/skills.py`](src/bub/skills.py)
56
+ - Turn orchestrator: [`src/bub/framework.py`](https://github.com/bubbuild/bub/blob/main/src/bub/framework.py)
57
+ - Hook contract: [`src/bub/hookspecs.py`](https://github.com/bubbuild/bub/blob/main/src/bub/hookspecs.py)
58
+ - Builtin hooks: [`src/bub/builtin/hook_impl.py`](https://github.com/bubbuild/bub/blob/main/src/bub/builtin/hook_impl.py)
59
+ - Skill discovery: [`src/bub/skills.py`](https://github.com/bubbuild/bub/blob/main/src/bub/skills.py)
60
60
 
61
61
  ## What Sets It Apart
62
62
 
@@ -103,15 +103,16 @@ Lines starting with `,` enter internal command mode (`,help`, `,skill name=my-sk
103
103
 
104
104
  ## Configuration
105
105
 
106
- | Variable | Default | Description |
107
- | --------------------------- | ---------------------------------- | ----------------------------------------------- |
108
- | `BUB_MODEL` | `openrouter:qwen/qwen3-coder-next` | Model identifier |
109
- | `BUB_API_KEY` | — | Provider key (optional with `bub login openai`) |
110
- | `BUB_API_BASE` | — | Custom provider endpoint |
111
- | `BUB_API_FORMAT` | `completion` | `completion`, `responses`, or `messages` |
112
- | `BUB_MAX_STEPS` | `50` | Max tool-use loop iterations |
113
- | `BUB_MAX_TOKENS` | `1024` | Max tokens per model call |
114
- | `BUB_MODEL_TIMEOUT_SECONDS` | | Model call timeout (seconds) |
106
+ | Variable | Default | Description |
107
+ |----------|---------|-------------|
108
+ | `BUB_MODEL` | `openrouter:qwen/qwen3-coder-next` | Model identifier |
109
+ | `BUB_API_KEY` | — | Provider key (optional with `bub login openai`) |
110
+ | `BUB_API_BASE` | — | Custom provider endpoint |
111
+ | `BUB_API_FORMAT` | `completion` | `completion`, `responses`, or `messages` |
112
+ | `BUB_CLIENT_ARGS` | | JSON object forwarded to the underlying model client |
113
+ | `BUB_MAX_STEPS` | `50` | Max tool-use loop iterations |
114
+ | `BUB_MAX_TOKENS` | `1024` | Max tokens per model call |
115
+ | `BUB_MODEL_TIMEOUT_SECONDS` | — | Model call timeout (seconds) |
115
116
 
116
117
  ## Background
117
118
 
@@ -121,13 +122,13 @@ Read more: [Context from Tape](https://tape.systems) · [Socialized Evaluation a
121
122
 
122
123
  ## Docs
123
124
 
124
- - [Architecture](docs/architecture.md) — lifecycle, hook precedence, error handling
125
- - [Features](docs/features.md) — what ships today and current boundaries
126
- - [Channels](docs/channels/index.md) — CLI, Telegram, and custom adapters
127
- - [Skills](docs/skills.md) — discovery and authoring
128
- - [Extension Guide](docs/extension-guide.md) — hooks, tools, plugin packaging
129
- - [Deployment](docs/deployment.md) — Docker, environment, upgrades
130
- - [Posts](docs/posts/index.md) — design notes
125
+ - [Architecture](https://bub.build/architecture/) — lifecycle, hook precedence, error handling
126
+ - [Features](https://bub.build/features/) — what ships today and current boundaries
127
+ - [Channels](https://bub.build/channels/) — CLI, Telegram, and custom adapters
128
+ - [Skills](https://bub.build/skills/) — discovery and authoring
129
+ - [Extension Guide](https://bub.build/extension-guide/) — hooks, tools, plugin packaging
130
+ - [Deployment](https://bub.build/deployment/) — Docker, environment, upgrades
131
+ - [Posts](https://bub.build/posts/) — design notes
131
132
 
132
133
  ## Development
133
134
 
@@ -137,8 +138,8 @@ uv run mypy src
137
138
  uv run pytest -q
138
139
  ```
139
140
 
140
- See [CONTRIBUTING.md](./CONTRIBUTING.md).
141
+ See [CONTRIBUTING.md](https://github.com/bubbuild/bub/blob/main/CONTRIBUTING.md).
141
142
 
142
143
  ## License
143
144
 
144
- [Apache-2.0](./LICENSE)
145
+ [Apache-2.0](https://github.com/bubbuild/bub/blob/main/LICENSE)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "bub"
3
- version = "0.3.2"
3
+ version = "0.3.4"
4
4
  description = "A common shape for agents that live alongside people."
5
5
  authors = [
6
6
  { name = "Chojan Shang", email = "psiace@apache.org" },
@@ -18,6 +18,7 @@ classifiers = [
18
18
  "Programming Language :: Python :: 3.14",
19
19
  "Topic :: Software Development :: Libraries :: Python Modules",
20
20
  ]
21
+
21
22
  dependencies = [
22
23
  "pydantic>=2.0.0",
23
24
  "pydantic-settings>=2.0.0",
@@ -42,6 +43,11 @@ Documentation = "https://bub.build"
42
43
  [project.scripts]
43
44
  bub = "bub.__main__:app"
44
45
 
46
+ [project.optional-dependencies]
47
+ logfire = [
48
+ "logfire>=4.31.0",
49
+ ]
50
+
45
51
  [dependency-groups]
46
52
  dev = [
47
53
  "pytest>=7.2.0",
@@ -58,30 +64,22 @@ dev = [
58
64
  ]
59
65
 
60
66
  [build-system]
61
- requires = [
62
- "pdm-backend",
63
- ]
64
- build-backend = "pdm.backend"
67
+ requires = ["hatchling"]
68
+ build-backend = "hatchling.build"
65
69
 
66
- [tool.pdm.build]
67
- includes = [
68
- "src/bub",
69
- "src/skills",
70
- ]
70
+ [tool.hatch.build.targets.sdist]
71
+ only-include = ["src/bub", "src/skills", "tests"]
72
+
73
+ [tool.hatch.build.targets.wheel]
74
+ sources = ["src"]
75
+ only-include = ["src/bub", "src/skills"]
71
76
 
72
77
  [tool.vulture]
73
- ignore_names = [
74
- "test_*",
75
- "Test*",
76
- ]
77
- paths = [
78
- "src",
79
- ]
78
+ ignore_names = ["test_*", "Test*"]
79
+ paths = ["src"]
80
80
 
81
81
  [tool.mypy]
82
- files = [
83
- "src",
84
- ]
82
+ files = ["src"]
85
83
  disallow_untyped_defs = false
86
84
  disallow_any_unimported = false
87
85
  no_implicit_optional = true
@@ -95,48 +93,62 @@ exclude = [
95
93
  ]
96
94
 
97
95
  [tool.pytest.ini_options]
98
- testpaths = [
99
- "tests",
100
- ]
96
+ testpaths = ["tests"]
101
97
 
102
98
  [tool.ruff]
103
99
  target-version = "py312"
104
100
  line-length = 120
105
101
  fix = true
106
102
  extend-exclude = [
107
- "src/skills/**/scripts/*",
103
+ "src/skills/**/scripts/*"
108
104
  ]
109
105
 
110
106
  [tool.ruff.lint]
111
107
  select = [
108
+ # flake8-2020
112
109
  "YTT",
110
+ # flake8-bandit
113
111
  "S",
112
+ # flake8-bugbear
114
113
  "B",
114
+ # flake8-builtins
115
115
  "A",
116
+ # flake8-comprehensions
116
117
  "C4",
118
+ # flake8-debugger
117
119
  "T10",
120
+ # flake8-simplify
118
121
  "SIM",
122
+ # isort
119
123
  "I",
124
+ # mccabe
120
125
  "C90",
126
+ # pycodestyle
121
127
  "E",
122
128
  "W",
129
+ # pyflakes
123
130
  "F",
131
+ # pygrep-hooks
124
132
  "PGH",
133
+ # pyupgrade
125
134
  "UP",
135
+ # ruff
126
136
  "RUF",
137
+ # tryceratops
127
138
  "TRY",
128
139
  ]
129
140
  ignore = [
141
+ # LineTooLong
130
142
  "E501",
143
+ # DoNotAssignLambda
131
144
  "E731",
145
+ # Avoid noisy exception-message rule for CLI/tool errors
132
146
  "TRY003",
133
147
  "S603",
134
148
  ]
135
149
 
136
150
  [tool.ruff.lint.per-file-ignores]
137
- "tests/*" = [
138
- "S101",
139
- ]
151
+ "tests/*" = ["S101"]
140
152
 
141
153
  [tool.ruff.format]
142
154
  preview = true
@@ -5,4 +5,4 @@ from bub.hookspecs import hookimpl
5
5
  from bub.tools import tool
6
6
 
7
7
  __all__ = ["BubFramework", "hookimpl", "tool"]
8
- __version__ = "0.3.2"
8
+ __version__ = "0.3.4"
@@ -7,7 +7,21 @@ import typer
7
7
  from bub.framework import BubFramework
8
8
 
9
9
 
10
+ def _instrument_bub() -> None:
11
+ try:
12
+ import logfire
13
+
14
+ logfire.configure()
15
+ except ImportError:
16
+ pass
17
+ else:
18
+ from loguru import logger
19
+
20
+ logger.configure(handlers=[logfire.loguru_handler()])
21
+
22
+
10
23
  def create_cli_app() -> typer.Typer:
24
+ _instrument_bub()
11
25
  framework = BubFramework()
12
26
  framework.load_hooks()
13
27
  app = framework.create_cli_app()