satoridb 1.2.3 → 1.2.5

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.
Files changed (2) hide show
  1. package/cli.js +20 -1
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -180,7 +180,7 @@ const commands = {
180
180
  requireConn();
181
181
  if (!session.mindspace) throw new Error("Select a mindspace first");
182
182
  const r = await satori.chatMindspace({ mindspace_id: session.mindspace, message: msg });
183
- console.log(r.data);
183
+ console.log(r);
184
184
  }
185
185
  },
186
186
 
@@ -193,6 +193,25 @@ const commands = {
193
193
  console.log(r.data);
194
194
  }
195
195
  },
196
+ set_mindspace: {
197
+ desc: "set_mindspace <config> [mindspace_id]",
198
+ async run([config, mindspace_id]) {
199
+ requireConn();
200
+ if (!config) throw new Error("Usage: set_mindspace <config> [mindspace_id]");
201
+
202
+
203
+ const payload = { config };
204
+ if (mindspace_id) payload.mindspace_id = mindspace_id;
205
+ else if (session.mindspace) payload.mindspace_id = session.mindspace;
206
+
207
+
208
+ const res = await satori.setMindspace(payload);
209
+ if (payload.mindspace_id) session.mindspace = payload.mindspace_id;
210
+
211
+
212
+ console.log(`🧠 Mindspace configured: ${payload.mindspace_id ?? res.data}`);
213
+ }
214
+ },
196
215
  };
197
216
 
198
217
  // -------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "satoridb",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Install satori",
5
5
  "bin": {
6
6
  "satoridb": "./cli.js"