bub 0.2.2__tar.gz → 0.2.3__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 (115) hide show
  1. {bub-0.2.2 → bub-0.2.3}/.github/workflows/on-release-main.yml +2 -0
  2. {bub-0.2.2 → bub-0.2.3}/AGENTS.md +1 -1
  3. {bub-0.2.2 → bub-0.2.3}/CONTRIBUTING.md +2 -2
  4. {bub-0.2.2 → bub-0.2.3}/PKG-INFO +31 -33
  5. bub-0.2.3/README.md +103 -0
  6. {bub-0.2.2 → bub-0.2.3}/docs/architecture.md +1 -0
  7. bub-0.2.3/docs/channels.md +34 -0
  8. {bub-0.2.2 → bub-0.2.3}/docs/cli.md +12 -5
  9. {bub-0.2.2 → bub-0.2.3}/docs/deployment.md +3 -3
  10. {bub-0.2.2 → bub-0.2.3}/docs/discord.md +4 -4
  11. {bub-0.2.2 → bub-0.2.3}/docs/features.md +5 -5
  12. bub-0.2.3/docs/index.md +39 -0
  13. bub-0.2.3/docs/posts/2026-03-01-bub-socialized-evaluation-and-agent-partnership.md +68 -0
  14. {bub-0.2.2 → bub-0.2.3}/docs/telegram.md +3 -3
  15. {bub-0.2.2 → bub-0.2.3}/mkdocs.yml +14 -9
  16. {bub-0.2.2 → bub-0.2.3}/pyproject.toml +14 -11
  17. {bub-0.2.2 → bub-0.2.3}/src/bub/__init__.py +1 -1
  18. {bub-0.2.2 → bub-0.2.3}/src/bub/app/runtime.py +6 -10
  19. {bub-0.2.2 → bub-0.2.3}/src/bub/channels/__init__.py +2 -0
  20. {bub-0.2.2 → bub-0.2.3}/src/bub/channels/base.py +9 -0
  21. bub-0.2.2/src/bub/cli/interactive.py → bub-0.2.3/src/bub/channels/cli.py +57 -23
  22. {bub-0.2.2 → bub-0.2.3}/src/bub/channels/manager.py +12 -4
  23. {bub-0.2.2 → bub-0.2.3}/src/bub/channels/runner.py +21 -7
  24. bub-0.2.3/src/bub/channels/utils.py +11 -0
  25. {bub-0.2.2 → bub-0.2.3}/src/bub/cli/app.py +5 -7
  26. {bub-0.2.2 → bub-0.2.3}/src/bub/config/settings.py +1 -0
  27. {bub-0.2.2 → bub-0.2.3}/src/bub/core/agent_loop.py +26 -27
  28. {bub-0.2.2 → bub-0.2.3}/src/bub/core/model_runner.py +49 -39
  29. {bub-0.2.2 → bub-0.2.3}/src/bub/core/router.py +25 -7
  30. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/telegram/scripts/telegram_send.py +3 -0
  31. {bub-0.2.2 → bub-0.2.3}/src/bub/tape/__init__.py +2 -1
  32. {bub-0.2.2 → bub-0.2.3}/src/bub/tape/context.py +4 -4
  33. {bub-0.2.2 → bub-0.2.3}/src/bub/tape/service.py +45 -33
  34. {bub-0.2.2 → bub-0.2.3}/src/bub/tape/store.py +5 -3
  35. {bub-0.2.2 → bub-0.2.3}/src/bub/tools/builtin.py +46 -66
  36. {bub-0.2.2 → bub-0.2.3}/src/bub/tools/registry.py +1 -1
  37. {bub-0.2.2 → bub-0.2.3}/tests/test_agent_loop.py +1 -1
  38. {bub-0.2.2 → bub-0.2.3}/tests/test_channels.py +8 -0
  39. bub-0.2.3/tests/test_channels_proxy.py +16 -0
  40. {bub-0.2.2 → bub-0.2.3}/tests/test_cli_app.py +21 -11
  41. bub-0.2.2/tests/test_cli_interactive.py → bub-0.2.3/tests/test_cli_channel.py +14 -4
  42. {bub-0.2.2 → bub-0.2.3}/tests/test_model_runner.py +83 -2
  43. {bub-0.2.2 → bub-0.2.3}/tests/test_router.py +43 -4
  44. bub-0.2.3/tests/test_session_runner.py +154 -0
  45. {bub-0.2.2 → bub-0.2.3}/tests/test_tape_service.py +24 -11
  46. {bub-0.2.2 → bub-0.2.3}/tests/test_tool_registry.py +13 -0
  47. {bub-0.2.2 → bub-0.2.3}/tests/test_tools_builtin.py +17 -11
  48. {bub-0.2.2 → bub-0.2.3}/uv.lock +267 -35
  49. bub-0.2.2/README.md +0 -105
  50. bub-0.2.2/docs/index.md +0 -45
  51. bub-0.2.2/src/bub/channels/utils.py +0 -54
  52. bub-0.2.2/tests/test_channels_proxy.py +0 -28
  53. {bub-0.2.2 → bub-0.2.3}/.github/actions/setup-python-env/action.yml +0 -0
  54. {bub-0.2.2 → bub-0.2.3}/.github/workflows/main.yml +0 -0
  55. {bub-0.2.2 → bub-0.2.3}/.gitignore +0 -0
  56. {bub-0.2.2 → bub-0.2.3}/.pre-commit-config.yaml +0 -0
  57. {bub-0.2.2 → bub-0.2.3}/Dockerfile +0 -0
  58. {bub-0.2.2 → bub-0.2.3}/LICENSE +0 -0
  59. {bub-0.2.2 → bub-0.2.3}/docker-compose.yml +0 -0
  60. {bub-0.2.2 → bub-0.2.3}/docs/CNAME +0 -0
  61. {bub-0.2.2 → bub-0.2.3}/docs/assets/images/baby-bub.png +0 -0
  62. {bub-0.2.2 → bub-0.2.3}/docs/posts/2025-07-16-baby-bub-bootstrap-milestone.md +0 -0
  63. {bub-0.2.2 → bub-0.2.3}/entrypoint.sh +0 -0
  64. {bub-0.2.2 → bub-0.2.3}/env.example +0 -0
  65. {bub-0.2.2 → bub-0.2.3}/justfile +0 -0
  66. {bub-0.2.2 → bub-0.2.3}/src/bub/app/__init__.py +0 -0
  67. {bub-0.2.2 → bub-0.2.3}/src/bub/app/bootstrap.py +0 -0
  68. {bub-0.2.2 → bub-0.2.3}/src/bub/app/jobstore.py +0 -0
  69. {bub-0.2.2 → bub-0.2.3}/src/bub/channels/discord.py +0 -0
  70. {bub-0.2.2 → bub-0.2.3}/src/bub/channels/telegram.py +0 -0
  71. {bub-0.2.2 → bub-0.2.3}/src/bub/cli/__init__.py +0 -0
  72. {bub-0.2.2 → bub-0.2.3}/src/bub/cli/render.py +0 -0
  73. {bub-0.2.2 → bub-0.2.3}/src/bub/config/__init__.py +0 -0
  74. {bub-0.2.2 → bub-0.2.3}/src/bub/core/__init__.py +0 -0
  75. {bub-0.2.2 → bub-0.2.3}/src/bub/core/command_detector.py +0 -0
  76. {bub-0.2.2 → bub-0.2.3}/src/bub/core/commands.py +0 -0
  77. {bub-0.2.2 → bub-0.2.3}/src/bub/core/types.py +0 -0
  78. {bub-0.2.2 → bub-0.2.3}/src/bub/integrations/republic_client.py +0 -0
  79. {bub-0.2.2 → bub-0.2.3}/src/bub/logging_utils.py +0 -0
  80. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/__init__.py +0 -0
  81. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/discord/SKILL.md +0 -0
  82. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/discord/scripts/discord_bot.py +0 -0
  83. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/discord/scripts/discord_send.py +0 -0
  84. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/gh/SKILL.md +0 -0
  85. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/loader.py +0 -0
  86. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/skill-creator/SKILL.md +0 -0
  87. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/skill-creator/license.txt +0 -0
  88. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/skill-creator/scripts/init_skill.py +0 -0
  89. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/skill-creator/scripts/quick_validate.py +0 -0
  90. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/skill-installer/LICENSE.txt +0 -0
  91. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/skill-installer/SKILL.md +0 -0
  92. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/telegram/SKILL.md +0 -0
  93. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/telegram/scripts/telegram_edit.py +0 -0
  94. {bub-0.2.2 → bub-0.2.3}/src/bub/skills/view.py +0 -0
  95. {bub-0.2.2 → bub-0.2.3}/src/bub/tape/anchors.py +0 -0
  96. {bub-0.2.2 → bub-0.2.3}/src/bub/tools/__init__.py +0 -0
  97. {bub-0.2.2 → bub-0.2.3}/src/bub/tools/progressive.py +0 -0
  98. {bub-0.2.2 → bub-0.2.3}/src/bub/tools/schedule.py +0 -0
  99. {bub-0.2.2 → bub-0.2.3}/src/bub/tools/view.py +0 -0
  100. {bub-0.2.2 → bub-0.2.3}/tests/conftest.py +0 -0
  101. {bub-0.2.2 → bub-0.2.3}/tests/test_command_detector.py +0 -0
  102. {bub-0.2.2 → bub-0.2.3}/tests/test_discord_filter.py +0 -0
  103. {bub-0.2.2 → bub-0.2.3}/tests/test_discord_output.py +0 -0
  104. {bub-0.2.2 → bub-0.2.3}/tests/test_graceful_shutdown.py +0 -0
  105. {bub-0.2.2 → bub-0.2.3}/tests/test_runtime_event_loop.py +0 -0
  106. {bub-0.2.2 → bub-0.2.3}/tests/test_runtime_filters.py +0 -0
  107. {bub-0.2.2 → bub-0.2.3}/tests/test_skill_path_expansion.py +0 -0
  108. {bub-0.2.2 → bub-0.2.3}/tests/test_skills_loader.py +0 -0
  109. {bub-0.2.2 → bub-0.2.3}/tests/test_tape_context.py +0 -0
  110. {bub-0.2.2 → bub-0.2.3}/tests/test_tape_store.py +0 -0
  111. {bub-0.2.2 → bub-0.2.3}/tests/test_telegram_channel.py +0 -0
  112. {bub-0.2.2 → bub-0.2.3}/tests/test_telegram_filter.py +0 -0
  113. {bub-0.2.2 → bub-0.2.3}/tests/test_telegram_session_prompt.py +0 -0
  114. {bub-0.2.2 → bub-0.2.3}/tests/test_tools_schedule.py +0 -0
  115. {bub-0.2.2 → bub-0.2.3}/tox.ini +0 -0
@@ -55,6 +55,8 @@ jobs:
55
55
  deploy-docs:
56
56
  needs: publish
57
57
  runs-on: ubuntu-latest
58
+ permissions:
59
+ contents: write
58
60
  steps:
59
61
  - name: Check out
60
62
  uses: actions/checkout@v6
@@ -17,7 +17,7 @@ Tests are in `tests/`. Documentation is in `docs/`. Legacy implementation is arc
17
17
  - `uv sync`: install/update dependencies
18
18
  - `just install`: setup env + hooks
19
19
  - `uv run bub chat`: run interactive CLI
20
- - `uv run bub telegram`: run Telegram adapter
20
+ - `uv run bub message`: run message channels (Telegram/Discord)
21
21
  - `uv run pytest -q` or `just test`: run tests
22
22
  - `uv run ruff check .`: lint checks
23
23
  - `uv run mypy`: static typing checks
@@ -9,7 +9,7 @@ You can contribute in many ways:
9
9
 
10
10
  ## Report Bugs
11
11
 
12
- Report bugs at https://github.com/psiace/bub/issues
12
+ Report bugs at https://github.com/bubbuild/bub/issues
13
13
 
14
14
  If you are reporting a bug, please include:
15
15
 
@@ -33,7 +33,7 @@ bub could always use more documentation, whether as part of the official docs, i
33
33
 
34
34
  ## Submit Feedback
35
35
 
36
- The best way to send feedback is to file an issue at https://github.com/psiace/bub/issues.
36
+ The best way to send feedback is to file an issue at https://github.com/bubbuild/bub/issues.
37
37
 
38
38
  If you are proposing a new feature:
39
39
 
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bub
3
- Version: 0.2.2
4
- Summary: Bub it. Build it. Tape-first coding agent CLI.
3
+ Version: 0.2.3
4
+ Summary: Bub it. Build it. A collaborative agent for shared delivery workflows.
5
5
  Project-URL: Homepage, https://bub.build
6
- Project-URL: Repository, https://github.com/psiace/bub
6
+ Project-URL: Repository, https://github.com/bubbuild/bub
7
7
  Project-URL: Documentation, https://bub.build
8
- Author-email: Chojan Shang <psiace@apache.org>
8
+ Author-email: Chojan Shang <psiace@apache.org>, Frost Ming <me@frostming.com>, Hong Yi <zouzou0208@gmail.com>
9
9
  License-File: LICENSE
10
10
  Keywords: python
11
11
  Classifier: Intended Audience :: Developers
@@ -17,10 +17,10 @@ Classifier: Programming Language :: Python :: 3.14
17
17
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
18
  Requires-Python: <4.0,>=3.12
19
19
  Requires-Dist: aiohttp>=3.13.3
20
- Requires-Dist: any-llm-sdk[anthropic]>=1.8.0
20
+ Requires-Dist: any-llm-sdk[anthropic,vertexai]>=1.8.0
21
21
  Requires-Dist: apscheduler>=3.11.2
22
22
  Requires-Dist: discord-py>=2.6.4
23
- Requires-Dist: html2markdown>=0.1.7
23
+ Requires-Dist: httpx[socks]>=0.28.1
24
24
  Requires-Dist: loguru>=0.7.2
25
25
  Requires-Dist: prompt-toolkit>=3.0.0
26
26
  Requires-Dist: pydantic-settings>=2.0.0
@@ -29,7 +29,7 @@ Requires-Dist: python-dotenv>=1.2.1
29
29
  Requires-Dist: python-telegram-bot>=21.0
30
30
  Requires-Dist: pyyaml>=6.0.0
31
31
  Requires-Dist: rapidfuzz>=3.14.1
32
- Requires-Dist: republic>=0.3.0
32
+ Requires-Dist: republic>=0.5.2
33
33
  Requires-Dist: requests>=2.32.5
34
34
  Requires-Dist: rich>=13.0.0
35
35
  Requires-Dist: telegramify-markdown>=0.5.4
@@ -38,27 +38,33 @@ Description-Content-Type: text/markdown
38
38
 
39
39
  # Bub
40
40
 
41
- [![Release](https://img.shields.io/github/v/release/psiace/bub)](https://github.com/psiace/bub/releases)
42
- [![Build status](https://img.shields.io/github/actions/workflow/status/psiace/bub/main.yml?branch=main)](https://github.com/psiace/bub/actions/workflows/main.yml?query=branch%3Amain)
43
- [![Commit activity](https://img.shields.io/github/commit-activity/m/psiace/bub)](https://github.com/psiace/bub/graphs/commit-activity)
44
- [![License](https://img.shields.io/github/license/psiace/bub)](LICENSE)
41
+ [![Release](https://img.shields.io/github/v/release/bubbuild/bub)](https://github.com/bubbuild/bub/releases)
42
+ [![Build status](https://img.shields.io/github/actions/workflow/status/bubbuild/bub/main.yml?branch=main)](https://github.com/bubbuild/bub/actions/workflows/main.yml?query=branch%3Amain)
43
+ [![Commit activity](https://img.shields.io/github/commit-activity/m/bubbuild/bub)](https://github.com/bubbuild/bub/graphs/commit-activity)
44
+ [![License](https://img.shields.io/github/license/bubbuild/bub)](LICENSE)
45
45
 
46
46
  > Bub it. Build it.
47
47
 
48
- Bub is a coding agent CLI built on `republic`.
49
- It is designed for real engineering workflows where execution must be predictable, inspectable, and recoverable.
48
+ Bub is a collaborative agent for shared delivery workflows, evolving into a framework that helps other agents operate with the same collaboration model.
49
+ It is not a personal-assistant shell: it is designed for shared environments where work must be inspectable, handoff-friendly, and operationally reliable.
50
50
 
51
- ## Four Things To Know
51
+ > Documentation: <https://bub.build>
52
52
 
53
- 1. Command boundary is strict: only lines starting with `,` are treated as commands.
54
- 2. The same routing model is applied to both user input and assistant output.
55
- 3. Successful commands return directly; failed commands fall back to the model with structured context.
56
- 4. Session context is append-only tape with explicit `anchor/handoff` transitions.
53
+ Built on [Republic](https://github.com/bubbuild/republic), Bub treats context as explicit assembly from verifiable interaction history, rather than opaque inherited state.
54
+ This aligns with [Socialized Evaluation](https://psiace.me/posts/im-and-socialized-evaluation/): systems are judged by how well teams can inspect, review, and continue work together.
55
+
56
+ ## What Bub Provides
57
+
58
+ - Multi-operator collaboration in shared delivery environments.
59
+ - Explicit command boundaries for predictable execution.
60
+ - Verifiable history (`tape`, `anchor`, `handoff`) for audit and continuity.
61
+ - Channel-neutral behavior across CLI and message channels.
62
+ - Extensible tools and skills with a unified operator-facing workflow.
57
63
 
58
64
  ## Quick Start
59
65
 
60
66
  ```bash
61
- git clone https://github.com/psiace/bub.git
67
+ git clone https://github.com/bubbuild/bub.git
62
68
  cd bub
63
69
  uv sync
64
70
  cp env.example .env
@@ -68,7 +74,7 @@ Minimal `.env`:
68
74
 
69
75
  ```bash
70
76
  BUB_MODEL=openrouter:qwen/qwen3-coder-next
71
- OPENROUTER_API_KEY=your_key_here
77
+ LLM_API_KEY=your_key_here
72
78
  ```
73
79
 
74
80
  Start interactive CLI:
@@ -77,7 +83,7 @@ Start interactive CLI:
77
83
  uv run bub
78
84
  ```
79
85
 
80
- ## Interaction Rules
86
+ ## Interaction Model
81
87
 
82
88
  - `hello`: natural language routed to model.
83
89
  - `,help`: internal command.
@@ -100,7 +106,9 @@ Common commands:
100
106
  ,quit
101
107
  ```
102
108
 
103
- ## Telegram (Optional)
109
+ ## Channel Runtime (Optional)
110
+
111
+ Telegram:
104
112
 
105
113
  ```bash
106
114
  BUB_TELEGRAM_ENABLED=true
@@ -109,7 +117,7 @@ BUB_TELEGRAM_ALLOW_FROM='["123456789","your_username"]'
109
117
  uv run bub message
110
118
  ```
111
119
 
112
- ## Discord (Optional)
120
+ Discord:
113
121
 
114
122
  ```bash
115
123
  BUB_DISCORD_ENABLED=true
@@ -119,16 +127,6 @@ BUB_DISCORD_ALLOW_CHANNELS='["123456789012345678"]'
119
127
  uv run bub message
120
128
  ```
121
129
 
122
- ## Documentation
123
-
124
- - `docs/index.md`: getting started and usage overview
125
- - `docs/deployment.md`: local + Docker deployment playbook
126
- - `docs/features.md`: key capabilities and why they matter
127
- - `docs/cli.md`: interactive CLI workflow and troubleshooting
128
- - `docs/architecture.md`: agent loop, tape, anchor, and tool/skill design
129
- - `docs/telegram.md`: Telegram integration and operations
130
- - `docs/discord.md`: Discord integration and operations
131
-
132
130
  ## Development
133
131
 
134
132
  ```bash
bub-0.2.3/README.md ADDED
@@ -0,0 +1,103 @@
1
+ # Bub
2
+
3
+ [![Release](https://img.shields.io/github/v/release/bubbuild/bub)](https://github.com/bubbuild/bub/releases)
4
+ [![Build status](https://img.shields.io/github/actions/workflow/status/bubbuild/bub/main.yml?branch=main)](https://github.com/bubbuild/bub/actions/workflows/main.yml?query=branch%3Amain)
5
+ [![Commit activity](https://img.shields.io/github/commit-activity/m/bubbuild/bub)](https://github.com/bubbuild/bub/graphs/commit-activity)
6
+ [![License](https://img.shields.io/github/license/bubbuild/bub)](LICENSE)
7
+
8
+ > Bub it. Build it.
9
+
10
+ Bub is a collaborative agent for shared delivery workflows, evolving into a framework that helps other agents operate with the same collaboration model.
11
+ It is not a personal-assistant shell: it is designed for shared environments where work must be inspectable, handoff-friendly, and operationally reliable.
12
+
13
+ > Documentation: <https://bub.build>
14
+
15
+ Built on [Republic](https://github.com/bubbuild/republic), Bub treats context as explicit assembly from verifiable interaction history, rather than opaque inherited state.
16
+ This aligns with [Socialized Evaluation](https://psiace.me/posts/im-and-socialized-evaluation/): systems are judged by how well teams can inspect, review, and continue work together.
17
+
18
+ ## What Bub Provides
19
+
20
+ - Multi-operator collaboration in shared delivery environments.
21
+ - Explicit command boundaries for predictable execution.
22
+ - Verifiable history (`tape`, `anchor`, `handoff`) for audit and continuity.
23
+ - Channel-neutral behavior across CLI and message channels.
24
+ - Extensible tools and skills with a unified operator-facing workflow.
25
+
26
+ ## Quick Start
27
+
28
+ ```bash
29
+ git clone https://github.com/bubbuild/bub.git
30
+ cd bub
31
+ uv sync
32
+ cp env.example .env
33
+ ```
34
+
35
+ Minimal `.env`:
36
+
37
+ ```bash
38
+ BUB_MODEL=openrouter:qwen/qwen3-coder-next
39
+ LLM_API_KEY=your_key_here
40
+ ```
41
+
42
+ Start interactive CLI:
43
+
44
+ ```bash
45
+ uv run bub
46
+ ```
47
+
48
+ ## Interaction Model
49
+
50
+ - `hello`: natural language routed to model.
51
+ - `,help`: internal command.
52
+ - `,git status`: shell command.
53
+ - `, ls -la`: shell command (space after comma is optional).
54
+
55
+ Common commands:
56
+
57
+ ```text
58
+ ,help
59
+ ,tools
60
+ ,tool.describe name=fs.read
61
+ ,skills.list
62
+ ,skills.describe name=friendly-python
63
+ ,handoff name=phase-1 summary="bootstrap done"
64
+ ,anchors
65
+ ,tape.info
66
+ ,tape.search query=error
67
+ ,tape.reset archive=true
68
+ ,quit
69
+ ```
70
+
71
+ ## Channel Runtime (Optional)
72
+
73
+ Telegram:
74
+
75
+ ```bash
76
+ BUB_TELEGRAM_ENABLED=true
77
+ BUB_TELEGRAM_TOKEN=123456:token
78
+ BUB_TELEGRAM_ALLOW_FROM='["123456789","your_username"]'
79
+ uv run bub message
80
+ ```
81
+
82
+ Discord:
83
+
84
+ ```bash
85
+ BUB_DISCORD_ENABLED=true
86
+ BUB_DISCORD_TOKEN=discord_bot_token
87
+ BUB_DISCORD_ALLOW_FROM='["123456789012345678","your_discord_name"]'
88
+ BUB_DISCORD_ALLOW_CHANNELS='["123456789012345678"]'
89
+ uv run bub message
90
+ ```
91
+
92
+ ## Development
93
+
94
+ ```bash
95
+ uv run ruff check .
96
+ uv run mypy
97
+ uv run pytest -q
98
+ just docs-test
99
+ ```
100
+
101
+ ## License
102
+
103
+ [Apache 2.0](./LICENSE)
@@ -8,6 +8,7 @@ This page is for developers and advanced users who need to understand why Bub be
8
8
  2. Same routing rules for user input and assistant output.
9
9
  3. Command execution and model reasoning are explicit layers.
10
10
  4. Phase transitions are represented by `anchor/handoff`, not hidden state jumps.
11
+ 5. Human and agent operators follow the same collaboration boundaries.
11
12
 
12
13
  ## Runtime Topology
13
14
 
@@ -0,0 +1,34 @@
1
+ # Channels
2
+
3
+ Bub supports running the same agent loop through channel adapters.
4
+ Use channels when you want either local interactive operation or remote operation from mobile/shared team environments.
5
+
6
+ ## Supported Channels
7
+
8
+ - `cli` (local): interactive terminal channel used by `uv run bub chat`.
9
+ - [Telegram](telegram.md): direct messages and group chats.
10
+ - [Discord](discord.md): servers, channels, and threads.
11
+
12
+ ## Run Entry
13
+
14
+ Start channel mode with:
15
+
16
+ ```bash
17
+ uv run bub message
18
+ ```
19
+
20
+ If the process exits immediately, check that at least one channel is enabled in `.env`.
21
+
22
+ ## Session Isolation
23
+
24
+ - CLI session key: `cli` or `cli:<name>` (from `--session-id`).
25
+ - Telegram session key: `telegram:<chat_id>`
26
+ - Discord session key: `discord:<channel_id>`
27
+
28
+ This keeps message history isolated per conversation endpoint.
29
+
30
+ ## Runtime Semantics
31
+
32
+ - `uv run bub chat` runs `CliChannel` via `ChannelManager`, sharing the same channel pipeline as Telegram/Discord.
33
+ - CLI sets `debounce_enabled = False`, so each input is processed immediately.
34
+ - Message channels keep debounce enabled to batch short bursts before model execution.
@@ -1,6 +1,8 @@
1
1
  # Interactive CLI
2
2
 
3
- ## Runtime Commands
3
+ `uv run bub chat` runs the local `cli` channel adapter (same channel pipeline as other channels, but local-only).
4
+
5
+ ## Run Commands
4
6
 
5
7
  ```bash
6
8
  uv run bub chat
@@ -16,7 +18,7 @@ uv run bub chat \
16
18
  --session-id cli-main
17
19
  ```
18
20
 
19
- Other runtime modes:
21
+ Other run modes:
20
22
 
21
23
  - `uv run bub run "summarize current repo status"`: one-shot message and exit.
22
24
  - `uv run bub message`: run enabled message channels (Telegram/Discord).
@@ -31,6 +33,11 @@ Other runtime modes:
31
33
 
32
34
  This rule is shared by both user input and assistant output.
33
35
 
36
+ ## Runtime Behavior
37
+
38
+ - `cli` channel disables debounce, so each input is executed immediately.
39
+ - Command inputs (`,...`) are executed directly and are not buffered into later batched prompts.
40
+
34
41
  ## Shell Mode
35
42
 
36
43
  Press `Ctrl-X` to toggle between `agent` and `shell` mode.
@@ -46,19 +53,19 @@ Use shell mode when you want to run multiple shell commands quickly.
46
53
  2. Read files: `,fs.read path=README.md`
47
54
  3. Edit files: `,fs.edit path=foo.py old=... new=...`
48
55
  4. Validate: `uv run pytest -q`
49
- 5. Mark phase transition: `,handoff name=phase-x summary="tests pass"`
56
+ 5. Mark phase transition: `,tape.handoff name=phase-x summary="tests pass"`
50
57
 
51
58
  ## Session Context Commands
52
59
 
53
60
  ```text
54
61
  ,tape.info
55
62
  ,tape.search query=error
56
- ,anchors
63
+ ,tape.anchors
57
64
  ,tape.reset archive=true
58
65
  ```
59
66
 
60
67
  - `,tape.reset archive=true` archives then clears current tape.
61
- - `,anchors` shows phase boundaries.
68
+ - `,tape.anchors` shows phase boundaries.
62
69
 
63
70
  ## One-Shot Examples
64
71
 
@@ -11,7 +11,7 @@ This page covers production-oriented setups for Bub, including local process man
11
11
  Quick bootstrap:
12
12
 
13
13
  ```bash
14
- git clone https://github.com/psiace/bub.git
14
+ git clone https://github.com/bubbuild/bub.git
15
15
  cd bub
16
16
  uv sync
17
17
  cp env.example .env
@@ -32,7 +32,7 @@ Choose one mode based on your operation target:
32
32
  `uv run bub chat`
33
33
  2. Channel service (Telegram/Discord):
34
34
  `uv run bub message`
35
- 3. Scheduler-only autonomous runtime:
35
+ 3. Scheduler-only autonomous mode:
36
36
  `uv run bub idle`
37
37
 
38
38
  One-shot operation:
@@ -115,4 +115,4 @@ uv run mypy
115
115
  uv run pytest -q
116
116
  ```
117
117
 
118
- Then restart your runtime (`chat`, `message`, or container service).
118
+ Then restart your service mode (`chat`, `message`, or container service).
@@ -1,6 +1,6 @@
1
1
  # Discord Integration
2
2
 
3
- Discord allows Bub to run as a remote coding assistant for team channels, threads, and DMs.
3
+ Discord allows Bub to run as a remote collaboration endpoint for team channels, threads, and DMs.
4
4
 
5
5
  ## Configure
6
6
 
@@ -30,9 +30,9 @@ Notes:
30
30
  uv run bub message
31
31
  ```
32
32
 
33
- ## Runtime Behavior
33
+ ## Run Behavior
34
34
 
35
- - Uses `discord.py` bot runtime.
35
+ - Uses `discord.py` bot service loop.
36
36
  - Each Discord channel maps to `discord:<channel_id>` session key.
37
37
  - Inbound text enters the same `AgentLoop` used by CLI.
38
38
  - Outbound immediate output is sent back in-channel (split into chunks when too long).
@@ -49,4 +49,4 @@ uv run bub message
49
49
  1. Keep bot token only in `.env` or a secret manager.
50
50
  2. Restrict `BUB_DISCORD_ALLOW_CHANNELS` and `BUB_DISCORD_ALLOW_FROM`.
51
51
  3. Confirm the bot has message-content intent enabled in Discord Developer Portal.
52
- 4. If no response is observed, verify token, allowlists, intents, and runtime logs.
52
+ 4. If no response is observed, verify token, allowlists, intents, and service logs.
@@ -1,6 +1,6 @@
1
1
  # Key Features
2
2
 
3
- This page summarizes the capabilities users rely on most when working with Bub.
3
+ This page summarizes the capabilities operators rely on most when working with Bub.
4
4
 
5
5
  ## 1. Deterministic Command Routing
6
6
 
@@ -17,10 +17,10 @@ Why it matters: fewer accidental tool calls and more predictable behavior.
17
17
 
18
18
  Why it matters: the assistant can debug based on real command output instead of generic guesses.
19
19
 
20
- ## 3. Tape-First Session Memory
20
+ ## 3. Verifiable Session History and Context Assembly
21
21
 
22
- - Bub writes session activity to append-only tape.
23
- - `,anchors` and `,handoff` mark phase transitions.
22
+ - Bub records session activity as append-only, verifiable history.
23
+ - `,tape.anchors` and `,tape.handoff` mark phase transitions.
24
24
  - `,tape.search` and `,tape.info` help inspect context quickly.
25
25
 
26
26
  Why it matters: long tasks stay traceable and easier to resume.
@@ -39,7 +39,7 @@ Why it matters: prompt stays focused while advanced capabilities remain availabl
39
39
 
40
40
  - Rich interactive shell with history and completions.
41
41
  - `Ctrl-X` toggles shell mode for faster command execution.
42
- - Same runtime behavior as channel integrations.
42
+ - Same behavior model as channel integrations.
43
43
 
44
44
  Why it matters: local debugging and implementation loops are fast and consistent.
45
45
 
@@ -0,0 +1,39 @@
1
+ # Bub Docs
2
+
3
+ Bub is a collaborative agent for shared delivery workflows, evolving into a framework that helps other agents operate with the same collaboration model.
4
+ If you only remember one thing from this page, remember this: Bub is built for shared delivery workflows where execution must be inspectable, handoff-friendly, and repeatable.
5
+
6
+ Under the hood, Bub uses [Republic](https://github.com/bubbuild/republic) to assemble context from traceable history instead of inheriting opaque state.
7
+ Its operating philosophy follows [Socialized Evaluation](https://psiace.me/posts/im-and-socialized-evaluation/): quality is judged by whether teams can inspect decisions and continue work safely.
8
+
9
+ ## What Bub Is (and Is Not)
10
+
11
+ - Bub is a collaboration agent for human and agent operators.
12
+ - Bub is not a personal-assistant-only chat shell.
13
+ - Bub keeps command execution explicit, reviewable, and recoverable.
14
+
15
+ ## How Bub Works
16
+
17
+ 1. Input boundary: only lines starting with `,` are treated as commands.
18
+ 2. Unified routing: the same routing rules apply to user input and assistant output.
19
+ 3. Structured fallback: failed commands are returned to the model with execution evidence.
20
+ 4. Persistent evidence: interaction history is append-only (`tape`) and can be searched.
21
+ 5. Explicit transitions: `anchor` and `handoff` represent phase changes and responsibility transfer.
22
+
23
+ ## Checklist
24
+
25
+ 1. Start with model + API key in `.env`.
26
+ 2. Run `uv run bub` and ask a normal question.
27
+ 3. Run `,help` and `,tools` to inspect available capabilities.
28
+ 4. Execute one shell command like `,git status`.
29
+ 5. Create one handoff: `,tape.handoff name=phase-1 summary="..."`.
30
+ 6. Verify history using `,tape.info` or `,tape.search query=...`.
31
+
32
+ ## Where To Read Next
33
+
34
+ - [Key Features](features.md): capability-level overview.
35
+ - [Interactive CLI](cli.md): interactive workflow and troubleshooting.
36
+ - [Architecture](architecture.md): runtime boundaries and internals.
37
+ - [Deployment Guide](deployment.md): local and Docker operations.
38
+ - [Channels](channels.md): CLI/Telegram/Discord runtime model.
39
+ - [Post: Socialized Evaluation and Agent Partnership](posts/2026-03-01-bub-socialized-evaluation-and-agent-partnership.md): project position and principles.
@@ -0,0 +1,68 @@
1
+ ---
2
+ title: "Bub: Socialized Evaluation and Agent Partnership"
3
+ date: 2026-03-01
4
+ description: "Why Bub is designed as an agent partner system where humans and agents share the same operator model."
5
+ ---
6
+
7
+ # Bub: Socialized Evaluation and Agent Partnership
8
+
9
+ I care less about whether an agent can complete a demo task, and more about whether a real team can trust it under pressure.
10
+ That is where most systems fail: not at capability, but at collaboration.
11
+
12
+ Bub is not designed as a personal-only assistant.
13
+ It is designed for shared environments where humans and agents are treated as equivalent operators.
14
+ Current deployments may use one primary agent, but the collaboration model itself is symmetric: the same boundaries, evidence model, and handoff semantics apply to both humans and agents.
15
+
16
+ The practical goal is simple: when work gets messy, Bub should still feel like a dependable teammate.
17
+ It should make execution visible, handoff safe, and continuation predictable.
18
+
19
+ ## From Tool Execution to Human Partnership
20
+
21
+ Many agent systems focus on whether a model can execute commands.
22
+ For real teams, that is not enough.
23
+ What matters is whether outcomes remain understandable, reviewable, and improvable over long time horizons.
24
+
25
+ Bub treats this as a first-class design target:
26
+
27
+ - Agents should assist human workflows, not replace human judgment.
28
+ - Operator decisions, agent actions, and execution evidence should stay visible.
29
+ - Collaboration should remain stable when more operators and automation layers join.
30
+
31
+ ## Socialized Evaluation as a System Principle
32
+
33
+ In Bub, evaluation is not only model-centric.
34
+ It is social by design:
35
+
36
+ - Can teammates inspect what happened and why?
37
+ - Can reviewers audit decisions without hidden state?
38
+ - Can future operators continue work from recorded evidence?
39
+ - Can all operators (human or agent) coordinate without opaque side effects?
40
+
41
+ If the answer is no, the system is not reliable enough for production collaboration.
42
+ The term "Socialized Evaluation" follows the framing in [Instant Messaging and Socialized Evaluation](https://psiace.me/posts/im-and-socialized-evaluation/).
43
+
44
+ ## Why Operator Equivalence by Default
45
+
46
+ Single-user flows can hide many structural problems.
47
+ Multi-operator settings expose them quickly: state conflicts, unclear responsibility, and fragile context boundaries.
48
+
49
+ Bub is built with these constraints from day one:
50
+
51
+ - Explicit command boundaries.
52
+ - Verifiable execution history with explicit anchor and handoff points.
53
+ - Handoff and anchors for continuity across people and phases.
54
+ - Channel/runtime neutrality for different operation surfaces.
55
+
56
+ This is how Bub moves from "assistant behavior" to "collaboration infrastructure."
57
+
58
+ ## Relationship to Republic
59
+
60
+ Bub uses [Republic](https://github.com/bubbuild/republic) as its context runtime.
61
+ Republic's key value is not "a better memory trick." It reframes the problem: keep interaction history as verifiable facts, then assemble minimally sufficient context for each task.
62
+ Bub builds on that model to support practical collaboration workflows where humans and agents participate as equivalent operators.
63
+
64
+ ## Closing
65
+
66
+ Our direction is simple:
67
+
68
+ Build agents that are useful in real social systems, not only impressive in isolated demos.
@@ -1,6 +1,6 @@
1
1
  # Telegram Integration
2
2
 
3
- Telegram allows Bub to run as a remote coding assistant entry point for lightweight operations.
3
+ Telegram allows Bub to run as a remote collaboration entry point for lightweight operations.
4
4
 
5
5
  ## Configure
6
6
 
@@ -24,7 +24,7 @@ Notes:
24
24
  uv run bub message
25
25
  ```
26
26
 
27
- ## Runtime Behavior
27
+ ## Run Behavior
28
28
 
29
29
  - Uses long polling.
30
30
  - Each Telegram chat maps to `telegram:<chat_id>` session key.
@@ -38,5 +38,5 @@ uv run bub message
38
38
  1. Keep bot token only in `.env` or a secret manager.
39
39
  2. Use a dedicated bot account.
40
40
  3. Keep allowlist updated with valid user IDs/usernames.
41
- 4. If no response is observed, check network, token, allowlists, then runtime/model logs.
41
+ 4. If no response is observed, check network, token, allowlists, then service/model logs.
42
42
  5. If `uv run bub message` exits quickly, verify at least one channel is enabled (`BUB_TELEGRAM_ENABLED=true`).
@@ -1,20 +1,25 @@
1
1
  site_name: bub
2
- repo_url: https://github.com/psiace/bub
2
+ repo_url: https://github.com/bubbuild/bub
3
3
  site_url: https://bub.build
4
- site_description: Bub it. Build it.
5
- site_author: Chojan Shang
4
+ site_description: "An agent partner for real teams: visible execution, reliable collaboration."
5
+ site_author: Bub Build
6
6
  edit_uri: edit/main/docs/
7
- repo_name: psiace/bub
8
- copyright: Maintained by <a href="https://psiace.me">Chojan Shang</a>.
7
+ repo_name: bubbuild/bub
8
+ copyright: Copyright (c) 2026 Bub Build contributors.
9
9
 
10
10
  nav:
11
11
  - Home: index.md
12
12
  - Key Features: features.md
13
+ - Posts:
14
+ - "2026-03-01 · Socialized Evaluation and Agent Partnership": posts/2026-03-01-bub-socialized-evaluation-and-agent-partnership.md
15
+ - "2025-07-16 · Baby Bub Bootstrap Milestone": posts/2025-07-16-baby-bub-bootstrap-milestone.md
13
16
  - Deployment: deployment.md
14
17
  - Architecture: architecture.md
15
- - Interactive CLI: cli.md
16
- - Telegram: telegram.md
17
- - Discord: discord.md
18
+ - Channels:
19
+ - Overview: channels.md
20
+ - CLI (Local): cli.md
21
+ - Telegram: telegram.md
22
+ - Discord: discord.md
18
23
 
19
24
  plugins:
20
25
  - search
@@ -58,6 +63,6 @@ markdown_extensions:
58
63
  extra:
59
64
  social:
60
65
  - icon: fontawesome/brands/github
61
- link: https://github.com/psiace/bub
66
+ link: https://github.com/bubbuild/bub
62
67
  - icon: fontawesome/brands/python
63
68
  link: https://pypi.org/project/bub