Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ["22.22.2", "24.15.0"]
node: ["22.23.4", "24.22.1"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
with:
repository: TONresistor/teleton-agent
ref: dev
ref: main
path: .teleton-agent

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v4
Expand Down
2 changes: 1 addition & 1 deletion compatibility.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"targetSdkVersion": "2.1.0",
"targetSdkVersion": "2.1.1",
"plugins": {
"boards": {
"status": "supported",
Expand Down
8 changes: 4 additions & 4 deletions plugins/example-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cp -r plugins/example-sdk plugins/your-plugin
|------|-------------|
| `sdk_greet` | Greet a user and track count in isolated database |
| `sdk_balance` | Check TON wallet balance and USD price |
| `sdk_announce` | Send a message with optional inline buttons (DM only) |
| `sdk_announce` | Send a message with optional inline buttons (admin only) |

## Install

Expand All @@ -34,13 +34,13 @@ Ask the AI:
## What this demonstrates

- **`tools(sdk)`** — receiving the SDK instead of using a plain array
- **`sdk.db`** — isolated SQLite database via `migrate()` export
- **`sdk.db`** — database created automatically; `migrate()` creates the example's tables
- **`sdk.ton`** — wallet address, balance, and price (read methods return null on failure)
- **`sdk.telegram`** — sending messages with inline keyboards
- **`sdk.pluginConfig`** — reading config with defaults from `manifest.defaultConfig`
- **`sdk.log`** — prefixed logging
- **`scope: "dm-only"`** — restricting a tool to DMs only
- **Error handling** — catching `PluginSDKError` from write methods
- **`scope: "admin-only"`** — restricting announcements to admins
- **Error handling** — checking nullable reads and catching write failures
- **Inline manifest** — `export const manifest` alongside `manifest.json`

## Configuration
Expand Down
4 changes: 2 additions & 2 deletions plugins/example-sdk/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const manifest = {
};

// ─── Database Migration ────────────────────────────────────────────────
// Export migrate() to get an isolated SQLite database in sdk.db.
// If you don't need persistence, skip this — sdk.db will be null.
// Teleton creates an isolated SQLite database for every plugin.
// Export migrate() only to create the tables your plugin needs.

export function migrate(db) {
db.exec(`
Expand Down
20 changes: 10 additions & 10 deletions plugins/stormtrade/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions plugins/stormtrade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
"dependencies": {
"@storm-trade/sdk": "^1.0.0-rc.4",
"@orbs-network/ton-access": "^2.3.3"
},
"overrides": {
"axios": "1.20.0",
"follow-redirects": "1.16.2",
"@ton/ton": {
"zod": "4.6.7"
}
}
}
2 changes: 1 addition & 1 deletion registry.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.1.0",
"version": "2.1.1",
"plugins": [
{
"id": "boards",
Expand Down
Loading