@sodikinnaa/smart-report-plugin 2026.3.8-beta.779 → 2026.3.9
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.
- package/dist/index.js +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/test/api.test.js +36 -0
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ async function callMcp(api, method, params = {}) {
|
|
|
30
30
|
const plugin = {
|
|
31
31
|
id: PLUGIN_ID,
|
|
32
32
|
name: "Smart Report Integration",
|
|
33
|
-
version: "2026.3.
|
|
33
|
+
version: "2026.3.9",
|
|
34
34
|
register(api) {
|
|
35
35
|
// 1. CLI Commands
|
|
36
36
|
api.registerCli(({ program }) => {
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "smart-report-plugin",
|
|
3
3
|
"name": "Smart Report Integration",
|
|
4
|
-
"version": "2026.3.
|
|
4
|
+
"version": "2026.3.9",
|
|
5
5
|
"description": "Integration plugin for Smart Report and AI Analytics with Daily Dashboard and Dynamic Guides",
|
|
6
6
|
"entrypoint": "./dist/index.js",
|
|
7
7
|
"skills": [
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/test/api.test.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
|
|
4
|
+
const API_BASE = 'https://smartreport.siapdigital.my.id/api/mcp';
|
|
5
|
+
const token = 'Wkr4v8TjpoXGPt4arv8EcBuXYpZaSDX8P0WL4dwPcanNRUAfNUrHF33j081lII30';
|
|
6
|
+
|
|
7
|
+
async function testApi() {
|
|
8
|
+
try {
|
|
9
|
+
console.log('Testing Smart Report API with provided token...');
|
|
10
|
+
const response = await axios.post(API_BASE, {
|
|
11
|
+
jsonrpc: '2.0',
|
|
12
|
+
method: 'guides/list',
|
|
13
|
+
params: {},
|
|
14
|
+
id: Date.now()
|
|
15
|
+
}, {
|
|
16
|
+
headers: {
|
|
17
|
+
'Authorization': `Bearer ${token}`,
|
|
18
|
+
'Content-Type': 'application/json',
|
|
19
|
+
'Accept': 'application/json'
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
if (response.data.error) {
|
|
24
|
+
console.error('❌ API Error:', response.data.error.message);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
console.log('✅ API Success! Found', response.data.result.length, 'guides.');
|
|
29
|
+
process.exit(0);
|
|
30
|
+
} catch (err) {
|
|
31
|
+
console.error('❌ Connection Error:', err.message);
|
|
32
|
+
process.exit(1);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
testApi();
|