@sodikinnaa/smart-report-plugin 2.0.0 → 2.1.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sodikinnaa/smart-report-plugin",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "OpenClaw plugin for Smart Report with Professional Dashboard Formatting",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -38,5 +38,11 @@ Tampilkan ringkasan eksekutif:
38
38
  * 📅 **[Tanggal]**: [Jumlah] laporan diterima.
39
39
  * Detail: [Link/ID laporan jika ada].
40
40
 
41
+ ### 4. Guides Management (`smartreport://guides`)
42
+ Tampilkan informasi edukatif:
43
+ * 📚 **[Judul Guide]** (Kategori: [Category]) - ID: [id]
44
+
45
+ Gunakan tool `get_guide_content` untuk membaca detail instruksi.
46
+
41
47
  ---
42
48
  *Generated by: SUL*** Eng***
package/src/index.ts CHANGED
@@ -109,6 +109,17 @@ export function register(api: any) {
109
109
  }
110
110
  });
111
111
 
112
+ api.registerResource({
113
+ uri: 'smartreport://guides',
114
+ name: 'Guides List',
115
+ description: 'List of all available dynamic guides',
116
+ mimeType: 'application/json',
117
+ read: async () => {
118
+ const data = await callMcp(api, 'guides/list', {});
119
+ return { content: JSON.stringify(data, null, 2) };
120
+ }
121
+ });
122
+
112
123
  api.registerResource({
113
124
  uri: 'smartreport://debt-aging',
114
125
  name: 'Debt Aging Analysis',
@@ -145,6 +156,32 @@ export function register(api: any) {
145
156
  }
146
157
  });
147
158
 
159
+ api.registerTool({
160
+ name: 'get_guides_list',
161
+ description: 'Retrieve list of all available dynamic guides.',
162
+ execute: async () => {
163
+ try {
164
+ const data = await callMcp(api, 'guides/list', {});
165
+ return { text: JSON.stringify(data, null, 2) };
166
+ } catch (err: any) {
167
+ return { error: err.message };
168
+ }
169
+ }
170
+ });
171
+
172
+ api.registerTool({
173
+ name: 'get_guide_content',
174
+ description: 'Retrieve full content of a specific guide by ID.',
175
+ execute: async (args: any) => {
176
+ try {
177
+ const data = await callMcp(api, 'guides/get', args);
178
+ return { text: JSON.stringify(data, null, 2) };
179
+ } catch (err: any) {
180
+ return { error: err.message };
181
+ }
182
+ }
183
+ });
184
+
148
185
  api.registerTool({
149
186
  name: 'get_list_reports',
150
187
  description: 'Retrieve reports with filters (date, employee, division).',