ask-channel-providers 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/LICENSE +21 -0
- data/README.md +64 -0
- data/lib/ask/channel_providers/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '008b3dc3ffd6f0875b93b698a46aa92c490818026cb5218be7247c11b5da1291'
|
|
4
|
+
data.tar.gz: 61d0f30d95c6c99f72de845ecd6afa9f708d178774c4145433c73a6d98e882c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2473452ef5244df0a0c1706e8ad39cff6ff1f319c871a3e1f37d89cbfab363d9ebbcc201f3c050f2c7730990915b569f9eb45b5269cfd49586136e3dc1e461a0
|
|
7
|
+
data.tar.gz: edb38dff75b2b7a0e8b4a853ec8f7034f9a8dc8c4d9bab5b17cdca98bb2f15aee464d73e9711f39813d4c674c92943f83b5fa1a68ca2679fbcf76e536a87f9ad
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to ask-channel-providers are documented here,
|
|
4
|
+
following the keep-a-changelog format.
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-09-04
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Channel adapter interface and messaging channel implementations
|
|
13
|
+
(Telegram, Discord, Slack) for connecting AI coding agents to
|
|
14
|
+
messaging platforms.
|
|
15
|
+
- Standard ask-gem infrastructure: LICENSE, CI workflow (Ruby 3.2–3.4
|
|
16
|
+
matrix), and release docs.
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kaka Ruto
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# ask-channel-providers
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/rb/ask-channel-providers)
|
|
4
|
+
|
|
5
|
+
Channel adapters for messaging platforms in the ask-rb ecosystem. It defines
|
|
6
|
+
a uniform adapter interface for receiving and sending messages, approvals,
|
|
7
|
+
and rich cards, plus a cross-platform card system. Only Telegram is
|
|
8
|
+
implemented today; other platforms can be added by subclassing the adapter.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
gem "ask-channel-providers"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Quick Start
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require "ask-channel-providers"
|
|
20
|
+
|
|
21
|
+
adapter = Ask::ChannelProviders::Telegram::Adapter.new(
|
|
22
|
+
token: "your_telegram_bot_token",
|
|
23
|
+
allowed_users: [],
|
|
24
|
+
allowed_chats: []
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
adapter.start do |msg|
|
|
28
|
+
# msg is { chat_id:, user_id:, text:, session_key: }
|
|
29
|
+
adapter.send_message(msg[:chat_id], "Echo: #{msg[:text]}")
|
|
30
|
+
end
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Key entry points
|
|
34
|
+
|
|
35
|
+
- `Ask::ChannelProviders::Adapter` - base class for channel adapters.
|
|
36
|
+
Implement `start(config:, &on_message)` (the callback receives
|
|
37
|
+
`{ chat_id:, user_id:, text:, session_key: }`), `stop`, `send_message`,
|
|
38
|
+
`edit_message`, `request_approval`, and `send_card`.
|
|
39
|
+
- `Ask::ChannelProviders::Telegram::Adapter` - the Telegram implementation,
|
|
40
|
+
backed by the polling-based `Telegram::Bot`. Config: `token`,
|
|
41
|
+
`allowed_users`, `allowed_chats`.
|
|
42
|
+
- `Ask::ChannelProviders::Card` - a structured UI element each adapter
|
|
43
|
+
renders to its native format. Build cards with `section`, `text`,
|
|
44
|
+
`button(label, callback:, url:)`, `table(header:, rows:)`, and `divider`.
|
|
45
|
+
- `Ask::ChannelProviders::Error`, `ConfigurationError`, and `APIError` -
|
|
46
|
+
errors raised by channel adapters.
|
|
47
|
+
|
|
48
|
+
## Full documentation
|
|
49
|
+
|
|
50
|
+
The full ask-rb documentation lives at https://ask-rb.github.io/ask-docs.
|
|
51
|
+
[Reference: Gem Index](https://ask-rb.github.io/ask-docs/reference/gems)
|
|
52
|
+
covers ask-channel-providers in depth. API reference:
|
|
53
|
+
https://ask-rb.github.io/ask-docs/reference/api.
|
|
54
|
+
|
|
55
|
+
## Development
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
bundle install
|
|
59
|
+
bundle exec rake test
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
MIT
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ask-channel-providers
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kaka Ruto
|
|
@@ -87,6 +87,9 @@ executables: []
|
|
|
87
87
|
extensions: []
|
|
88
88
|
extra_rdoc_files: []
|
|
89
89
|
files:
|
|
90
|
+
- CHANGELOG.md
|
|
91
|
+
- LICENSE
|
|
92
|
+
- README.md
|
|
90
93
|
- lib/ask-channel-providers.rb
|
|
91
94
|
- lib/ask/channel_providers.rb
|
|
92
95
|
- lib/ask/channel_providers/adapter.rb
|
|
@@ -115,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
115
118
|
- !ruby/object:Gem::Version
|
|
116
119
|
version: '0'
|
|
117
120
|
requirements: []
|
|
118
|
-
rubygems_version: 4.0.
|
|
121
|
+
rubygems_version: 4.0.18
|
|
119
122
|
specification_version: 4
|
|
120
123
|
summary: Messaging channel adapters for the ask-rb ecosystem
|
|
121
124
|
test_files: []
|