rawphp / laravel-capabilities-messaging
Conversation surfaces (Telegram first) for the Laravel Capabilities bus — webhooks, identity, threads
Package info
github.com/rawphp/laravel-capabilities-messaging
pkg:composer/rawphp/laravel-capabilities-messaging
Requires
- php: ^8.2
- illuminate/database: ^11.0|^12.0|^13.0
- illuminate/events: ^11.0|^12.0|^13.0
- illuminate/http: ^11.0|^12.0|^13.0
- illuminate/routing: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- rawphp/laravel-capabilities: *
Requires (Dev)
- pestphp/pest: ^3.0
Suggests
- laravel/ai: Required for agent turns behind conversation ingress
README
Optional sibling package for conversation surfaces (Telegram first).
Implements core ConversationIngress / ApprovalNotifier contracts. Never embeds domain run() — chat feeds the agent; tools are the capability registry (D-007).
Status: 0.x pre-stable — not Packagist-published. Install via package VCS or monorepo path.
Scope (this package)
| Is | Chat ingress (Telegram first): webhooks, identity link/allowlist, threads, approval notifiers; routes messages into the agent with a configured tool profile |
| Is not | Domain run() or any second write path; the capability registry / governance stack; product CLI; AI turn/proposal engine; durable multi-instance identity product (process-local stores residual — L-006); general-purpose notification platform |
Requires rawphp/laravel-capabilities. Developed in the monorepo; consumers install this package repo.
| Doc | Where |
|---|---|
| User guide | docs/user-guide.md |
| Changelog | CHANGELOG.md |
| Core package | rawphp/laravel-capabilities |
| Sibling AI | rawphp/laravel-capabilities-ai |
| Monorepo design | laravel-capabilities-monorepo |
Install
Requires rawphp/laravel-capabilities.
VCS (package remotes)
This tree is published to github.com/rawphp/laravel-capabilities-messaging from the monorepo on every push to main.
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/rawphp/laravel-capabilities"
},
{
"type": "vcs",
"url": "https://github.com/rawphp/laravel-capabilities-messaging"
}
],
"require": {
"rawphp/laravel-capabilities": "dev-main",
"rawphp/laravel-capabilities-messaging": "dev-main"
}
}
Path (monorepo contributors)
Point path repos at packages/laravel-capabilities and packages/laravel-capabilities-messaging in a monorepo clone, require *@dev.
composer update rawphp/laravel-capabilities-messaging php artisan vendor:publish --tag=capabilities-messaging-config
Install policy: monorepo docs/versioning.md. How-to: docs/user-guide.md.
Production bindings (L-004)
When Telegram is enabled, MessagingServiceProvider::register binds:
| Abstract | Production concrete | Testing / driver=fake |
|---|---|---|
MessagingConfig |
config repository | same |
UpdateQueue |
LaravelUpdateQueue → bus ProcessTelegramUpdateJob |
FakeQueue |
TelegramBotClient |
HttpTelegramBotClient |
FakeTelegramBotClient |
ProcessTelegramUpdate |
handler | same |
TelegramWebhookController |
injects bound UpdateQueue (no FakeQueue default) |
inject FakeQueue in unit tests |
Drivers (config/capabilities-messaging.php):
queue_driver:auto|laravel|fake—auto→ fake whenAPP_ENV=testing, otherwise Laravel busbot_driver:auto|http|fake—auto→ fake when testing, otherwise HTTP
Unit tests never call the live Telegram network; inject a transport on HttpTelegramBotClient or use bot_driver=fake.
Residual: durable identity / threads (L-006)
Not silent: IdentityLinker and ThreadStore remain process-local in-memory stores. They are not durable across processes or deploys. Durable DB-backed identity linking and thread history are deferred (L-006) — plan for host-level persistence or a future package revision before multi-instance production traffic depends on them.