feat(api): export plugin utilities for transport development (#137)

Co-authored-by: banteg <4562643+banteg@users.noreply.github.com>
This commit is contained in:
Zorro909
2026-01-15 12:00:13 +01:00
committed by GitHub
parent c811092aa4
commit 495ff261de
4 changed files with 69 additions and 0 deletions
+23
View File
@@ -71,6 +71,7 @@ dependencies = ["takopi>=0.14,<0.15"]
| `ResumeToken` | Resume token (engine + value) |
| `StartedEvent` / `ActionEvent` / `CompletedEvent` | Core event types |
| `Action` | Action metadata for `ActionEvent` |
| `ActionState` / `ProgressState` / `ProgressTracker` | Progress tracking helpers for presenters |
| `RunContext` | Project/branch context |
| `ConfigError` | Configuration error type |
| `DirectiveError` | Error raised when parsing directives |
@@ -85,6 +86,28 @@ dependencies = ["takopi>=0.14,<0.15"]
| `RunningTask` / `RunningTasks` | Per-message run coordination |
| `handle_message()` | Core message handler used by transports |
### Plugin utilities
| Symbol | Purpose |
|--------|---------|
| `HOME_CONFIG_PATH` | Canonical config path (`~/.takopi/takopi.toml`) |
| `RESERVED_COMMAND_IDS` | Set of reserved command IDs |
| `read_config` | Read and parse TOML config file |
| `write_config` | Atomically write config to TOML file |
| `get_logger` | Get a structured logger for a module |
| `bind_run_context` | Bind contextual fields to all log entries |
| `clear_context` | Clear bound log context |
| `suppress_logs` | Context manager to suppress info-level logs |
| `set_run_base_dir` | Set working directory context for path relativization |
| `reset_run_base_dir` | Reset working directory context |
| `ThreadJob` | Job dataclass for ThreadScheduler |
| `ThreadScheduler` | Per-thread message serialization |
| `get_command` | Get command backend by ID |
| `list_command_ids` | Get available command plugin IDs |
| `list_backends` | Discover available engine backends |
| `load_settings` | Load full TakopiSettings from config |
| `install_issue` | Create SetupIssue for missing dependency |
---
## Runner contract (engine plugins)
+13
View File
@@ -0,0 +1,13 @@
# Plugins
Community and third-party plugins that extend takopi.
| Plugin | Type | Description |
|--------|------|-------------|
| [takopi-matrix](https://github.com/Zorro909/takopi-matrix) | Transport | Matrix protocol backend with E2EE, voice transcription, and multi-room support |
## See also
- [Plugin API](plugin-api.md) - API reference for plugin development
- [Write a plugin](../how-to/write-a-plugin.md) - Step-by-step guide
- [Plugin system](../explanation/plugin-system.md) - Architecture and design