diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85b9293..7509ee9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/compatibility.json b/compatibility.json index 9a21d7f..2ecdfb5 100644 --- a/compatibility.json +++ b/compatibility.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, - "targetSdkVersion": "2.1.0", + "targetSdkVersion": "2.1.1", "plugins": { "boards": { "status": "supported", diff --git a/plugins/example-sdk/README.md b/plugins/example-sdk/README.md index f4d5bc2..b944d6b 100644 --- a/plugins/example-sdk/README.md +++ b/plugins/example-sdk/README.md @@ -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 @@ -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 diff --git a/plugins/example-sdk/index.js b/plugins/example-sdk/index.js index 21df08d..9673584 100644 --- a/plugins/example-sdk/index.js +++ b/plugins/example-sdk/index.js @@ -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(` diff --git a/plugins/stormtrade/package-lock.json b/plugins/stormtrade/package-lock.json index 456a76a..42a344c 100644 --- a/plugins/stormtrade/package-lock.json +++ b/plugins/stormtrade/package-lock.json @@ -103,13 +103,13 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.18.1.tgz", - "integrity": "sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.20.0.tgz", + "integrity": "sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg==", "license": "MIT", "dependencies": { "follow-redirects": "^1.16.0", - "form-data": "^4.0.5", + "form-data": "^4.0.6", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^2.1.0" } @@ -232,9 +232,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", - "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.2.tgz", + "integrity": "sha512-/kVP2U8z596Ia0gwFrwyIeo74ta5aVmSeU1FfAUMAmcEP5EP7zydmag3SLiN64NaRKef3lxsq7i/g7ltJQDGow==", "funding": [ { "type": "individual", @@ -498,9 +498,9 @@ } }, "node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "version": "4.6.7", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz", + "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==", "license": "MIT", "peer": true, "funding": { diff --git a/plugins/stormtrade/package.json b/plugins/stormtrade/package.json index e2b6be5..4ea322e 100644 --- a/plugins/stormtrade/package.json +++ b/plugins/stormtrade/package.json @@ -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" + } } } diff --git a/registry.json b/registry.json index 515fbc4..6a3622b 100644 --- a/registry.json +++ b/registry.json @@ -1,5 +1,5 @@ { - "version": "2.1.0", + "version": "2.1.1", "plugins": [ { "id": "boards",