mindvest-atlas 0.94.0 → 0.95.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 +1 -1
- package/src/commands/remote-control.js +3 -0
- package/src/config.js +1 -1
- package/src/remote-control.js +32 -0
package/package.json
CHANGED
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
streamStudioFrames,
|
|
31
31
|
localBrokers, localBrokerCall,
|
|
32
32
|
studioVoice,
|
|
33
|
+
appendSaid,
|
|
33
34
|
} from '../remote-control.js';
|
|
34
35
|
import fs from 'node:fs';
|
|
35
36
|
import os from 'node:os';
|
|
@@ -466,6 +467,8 @@ async function handleAsk(ask, root) {
|
|
|
466
467
|
if (ask.op === 'chats') return answer(ask.request_id, { ok: true, chats: listChats(ask.job || '', root) });
|
|
467
468
|
if (ask.op === 'chat_read') return answer(ask.request_id, readChat(ask.job || '', ask.chat_id || '', root));
|
|
468
469
|
if (ask.op === 'chat_delete') return answer(ask.request_id, deleteChat(ask.job || '', ask.chat_id || '', root));
|
|
470
|
+
// What was said out loud in a voice conversation about this project.
|
|
471
|
+
if (ask.op === 'chat_said') return answer(ask.request_id, appendSaid(ask.job || '', ask.chat_id || '', ask.lines, root));
|
|
469
472
|
if (ask.op === 'models') {
|
|
470
473
|
void listModels().then((m) => answer(ask.request_id, { ok: true, ...m }));
|
|
471
474
|
return undefined;
|
package/src/config.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
|
|
5
|
-
export const VERSION = '0.
|
|
5
|
+
export const VERSION = '0.95.0';
|
|
6
6
|
export const DEFAULT_BASE_URL = 'https://atlasmcp.finmanagerai.com';
|
|
7
7
|
export const DEFAULT_SCOPE = 'atlas broker';
|
|
8
8
|
export const CLIENT_NAME = 'Atlas CLI';
|
package/src/remote-control.js
CHANGED
|
@@ -2455,6 +2455,38 @@ export function appendChat(job, id, role, text, root, payload, model) {
|
|
|
2455
2455
|
try { fs.writeFileSync(f, JSON.stringify(data), 'utf8'); } catch { /* best effort */ }
|
|
2456
2456
|
}
|
|
2457
2457
|
|
|
2458
|
+
/**
|
|
2459
|
+
* WHAT WAS SAID OUT LOUD, WRITTEN INTO THE PROJECT'S OWN CHAT (owner,
|
|
2460
|
+
* 2026-10-06: "when I'm using the voice from the web but connected to the
|
|
2461
|
+
* computer and a project, this is no longer atlas cloud, so things are done
|
|
2462
|
+
* there and chat are written there").
|
|
2463
|
+
*
|
|
2464
|
+
* A voice conversation had on the website or a phone, with the chat pointed at
|
|
2465
|
+
* a project on this computer, belongs to that project. Its spoken lines are
|
|
2466
|
+
* written here, in the same record a typed message is, so the conversation
|
|
2467
|
+
* reads whole from Atlas Studio and from anywhere else, and nothing of it is
|
|
2468
|
+
* kept by Atlas. Only lines: a person's and Atlas's words, in order.
|
|
2469
|
+
*/
|
|
2470
|
+
export function cleanSaidLines(lines) {
|
|
2471
|
+
if (!Array.isArray(lines)) return [];
|
|
2472
|
+
const out = [];
|
|
2473
|
+
for (const l of lines.slice(0, 20)) {
|
|
2474
|
+
if (!l || typeof l !== 'object') continue;
|
|
2475
|
+
const role = l.role === 'user' ? 'user' : l.role === 'assistant' ? 'assistant' : '';
|
|
2476
|
+
const text = typeof l.text === 'string' ? l.text.trim().slice(0, 4000) : '';
|
|
2477
|
+
if (role && text) out.push({ role, text });
|
|
2478
|
+
}
|
|
2479
|
+
return out;
|
|
2480
|
+
}
|
|
2481
|
+
export function appendSaid(job, chatId, lines, root) {
|
|
2482
|
+
const name = String(job || '').trim();
|
|
2483
|
+
const id = String(chatId || '').trim();
|
|
2484
|
+
if (!name || !id) return { ok: false, error: 'Which conversation?' };
|
|
2485
|
+
const clean = cleanSaidLines(lines);
|
|
2486
|
+
for (const l of clean) appendChat(name, id, l.role, l.text, root);
|
|
2487
|
+
return { ok: true, written: clean.length };
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2458
2490
|
/**
|
|
2459
2491
|
* FRAMES FROM ATLAS STUDIO, when it is here.
|
|
2460
2492
|
*
|