@sodikinnaa/smart-report-plugin 1.0.7 → 1.0.8
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
CHANGED
|
@@ -110,7 +110,30 @@ export function register(api) {
|
|
|
110
110
|
return { content: JSON.stringify(data, null, 2) };
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
|
+
api.registerResource({
|
|
114
|
+
uri: 'smartreport://dashboard',
|
|
115
|
+
name: 'Daily Dashboard',
|
|
116
|
+
description: 'Real-time KPI dashboard (stats, highlights, alerts)',
|
|
117
|
+
mimeType: 'application/json',
|
|
118
|
+
read: async (params) => {
|
|
119
|
+
const data = await callMcp(api, 'smartreport/dashboard', params || {});
|
|
120
|
+
return { content: JSON.stringify(data, null, 2) };
|
|
121
|
+
}
|
|
122
|
+
});
|
|
113
123
|
// 3. Agent Tools
|
|
124
|
+
api.registerTool({
|
|
125
|
+
name: 'get_daily_dashboard',
|
|
126
|
+
description: 'Retrieve real-time KPI dashboard (stats, highlights, alerts).',
|
|
127
|
+
execute: async (args) => {
|
|
128
|
+
try {
|
|
129
|
+
const data = await callMcp(api, 'smartreport/dashboard', args);
|
|
130
|
+
return { text: JSON.stringify(data, null, 2) };
|
|
131
|
+
}
|
|
132
|
+
catch (err) {
|
|
133
|
+
return { error: err.message };
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
});
|
|
114
137
|
api.registerTool({
|
|
115
138
|
name: 'get_list_reports',
|
|
116
139
|
description: 'Retrieve reports with filters (date, employee, division).',
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "smart-report-plugin",
|
|
3
3
|
"name": "Smart Report Integration",
|
|
4
|
-
"version": "1.0.
|
|
5
|
-
"description": "Integration plugin for Smart Report and AI Analytics",
|
|
4
|
+
"version": "1.0.8",
|
|
5
|
+
"description": "Integration plugin for Smart Report and AI Analytics with Daily Dashboard",
|
|
6
6
|
"entry": "dist/index.js",
|
|
7
7
|
"skills": ["skills/smart-report/SKILL.md"],
|
|
8
8
|
"configSchema": {
|
package/package.json
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sodikinnaa/smart-report-plugin",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "OpenClaw plugin for Smart Report system integration",
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"description": "OpenClaw plugin for Smart Report system integration with Daily Dashboard",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsc",
|
|
11
|
-
"test": "
|
|
11
|
+
"test": "node test/simple.test.js",
|
|
12
|
+
"publish": "npm publish --access public"
|
|
12
13
|
},
|
|
13
14
|
"keywords": [
|
|
14
15
|
"openclaw-plugin",
|
|
15
|
-
"smart-report"
|
|
16
|
+
"smart-report",
|
|
17
|
+
"dashboard"
|
|
16
18
|
],
|
|
17
19
|
"author": "Sodikin",
|
|
18
20
|
"license": "MIT",
|
|
Binary file
|
package/src/index.ts
CHANGED
|
@@ -120,7 +120,31 @@ export function register(api: any) {
|
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
|
|
123
|
+
api.registerResource({
|
|
124
|
+
uri: 'smartreport://dashboard',
|
|
125
|
+
name: 'Daily Dashboard',
|
|
126
|
+
description: 'Real-time KPI dashboard (stats, highlights, alerts)',
|
|
127
|
+
mimeType: 'application/json',
|
|
128
|
+
read: async (params: any) => {
|
|
129
|
+
const data = await callMcp(api, 'smartreport/dashboard', params || {});
|
|
130
|
+
return { content: JSON.stringify(data, null, 2) };
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
|
|
123
134
|
// 3. Agent Tools
|
|
135
|
+
api.registerTool({
|
|
136
|
+
name: 'get_daily_dashboard',
|
|
137
|
+
description: 'Retrieve real-time KPI dashboard (stats, highlights, alerts).',
|
|
138
|
+
execute: async (args: any) => {
|
|
139
|
+
try {
|
|
140
|
+
const data = await callMcp(api, 'smartreport/dashboard', args);
|
|
141
|
+
return { text: JSON.stringify(data, null, 2) };
|
|
142
|
+
} catch (err: any) {
|
|
143
|
+
return { error: err.message };
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
124
148
|
api.registerTool({
|
|
125
149
|
name: 'get_list_reports',
|
|
126
150
|
description: 'Retrieve reports with filters (date, employee, division).',
|
|
Binary file
|