mindvest-atlas 0.64.0 → 0.66.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": "mindvest-atlas",
3
- "version": "0.64.0",
3
+ "version": "0.66.0",
4
4
  "description": "Atlas CLI \u2014 OAuth login, tool calls, and live alert/flow streaming for the Atlas trading API",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,7 +8,10 @@
8
8
  // IT IS NOT THE COMPUTER. This drives the project's own window, so the real
9
9
  // pointer never moves, nothing is claimed, no switch is needed, and a click at
10
10
  // the wrong coordinates lands somewhere else in your own page rather than in
11
- // whatever was behind it.
11
+ // whatever was behind it. That is the FIRST pass (styling, measured). `expand`
12
+ // opens the SECOND: the dashboard in its own window on the real screen, in front
13
+ // and in the picture, to be pressed with `atlas computer-use` so every tab and
14
+ // button is seen to react (owner, 2026-09-10). `collapse` takes it down.
12
15
  import { color, println, eprintln } from '../util/ui.js';
13
16
  import { runInProject } from './computer-use.js';
14
17
 
@@ -24,6 +27,8 @@ const OPS = {
24
27
  shot: ['shot', 0],
25
28
  check: ['check', 0],
26
29
  close: ['close', 0],
30
+ expand: ['expand', 0],
31
+ collapse: ['collapse', 0],
27
32
  };
28
33
  const NUMERIC = new Set(['click', 'double-click', 'move', 'scroll']);
29
34
 
@@ -39,6 +44,9 @@ const HELP = `atlas dashboard <command>
39
44
  shot a picture, AND what is wrong with it in words
40
45
  check all four views, each measured
41
46
  close
47
+ expand its own window ON the screen, in front: then
48
+ press it with \`atlas computer-use\`
49
+ collapse take that window down
42
50
 
43
51
  --job <project> which project (defaults to $ATLAS_JOB, which a chat sets)
44
52
 
@@ -42,7 +42,7 @@ const HELPER_FUNCTIONS = {
42
42
  atlas: 'atlas(tool, params) any cloud tool, as a call instead of a process',
43
43
  ask: 'ask(prompt) the model on this computer, with its own tools',
44
44
  mcp: 'mcp(server, tool, args) a connected MCP server',
45
- dashboard: "dashboard.open/find/click/type/shot work this project's own page",
45
+ dashboard: "dashboard.open/find/click/shot/expand work this project's own page; expand = on the real screen",
46
46
  computer: 'computer: screen, click, type, key see and use the whole machine',
47
47
  screen: 'screen(), click(x,y), type(text) see and use the whole machine',
48
48
  click: 'click(x, y), double_click, drag use the mouse on this computer',
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.64.0';
5
+ export const VERSION = '0.66.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';
@@ -324,6 +324,12 @@ export const dashboard = {
324
324
  /** All four views, each measured: computer and phone, dark and light. */
325
325
  check: async () => (await driveDashboard("check")).views || [],
326
326
  close: () => driveDashboard("close"),
327
+ /** The second pass: the dashboard in its own full-screen window ON the screen,
328
+ * in front and in the picture, so it can be pressed with the real pointer
329
+ * (computer.screen / computer.click). Answers with its bounds and whether
330
+ * computer use is on. collapse() takes it down again. */
331
+ expand: () => driveDashboard("expand"),
332
+ collapse: () => driveDashboard("collapse"),
327
333
  };
328
334
 
329
335
  /**
@@ -340,19 +346,30 @@ export const dashboard = {
340
346
  * await computer.type("hello");
341
347
  * await computer.note("signing in");
342
348
  *
349
+ * ONE CALL IS ONE PYTHON. Each of those starts an interpreter, so a sequence of
350
+ * them pays that start-up per click and the run crawls (owner, 2026-09-10: "the
351
+ * slowness is the per command round trip"). Say the whole sequence instead and
352
+ * it is ONE start, with the picture already taken at the end:
353
+ *
354
+ * await computer.do([["click", x, y, "Sign in"],
355
+ * ["type", "someone@example.com"],
356
+ * ["key", "tab"],
357
+ * ["type", secret("PASSWORD")],
358
+ * ["key", "enter"]]);
359
+ *
343
360
  * Off until the person turns it on, under This Computer in Atlas Studio. Read skills/computer-use before using any of it.
344
361
  */
345
- async function useComputer(op, args = []) {
362
+ async function useComputer(op, args = [], kw = {}) {
346
363
  const { spawn } = await import("node:child_process");
347
364
  const dir = path.dirname(url_.fileURLToPath(import.meta.url));
348
365
  const py = process.env.ATLAS_PYTHON || (process.platform === "win32" ? "python" : "python3");
349
366
  const code =
350
367
  "import json,sys,atlas_env\n"
351
- + "op=sys.argv[1]; args=json.loads(sys.argv[2])\n"
352
- + "out=getattr(atlas_env,op)(*args)\n"
368
+ + "op=sys.argv[1]; args=json.loads(sys.argv[2]); kw=json.loads(sys.argv[3])\n"
369
+ + "out=getattr(atlas_env,op)(*args,**kw)\n"
353
370
  + "sys.stdout.write('\\n__ATLAS__'+json.dumps(out,default=str))\n";
354
371
  return await new Promise((done, fail) => {
355
- const p = spawn(py, ["-c", code, op, JSON.stringify(args)], { cwd: dir });
372
+ const p = spawn(py, ["-c", code, op, JSON.stringify(args), JSON.stringify(kw || {})], { cwd: dir });
356
373
  let out = "", err = "";
357
374
  p.stdout.on("data", (d) => { out += d; });
358
375
  p.stderr.on("data", (d) => { err += d; });
@@ -386,6 +403,22 @@ export const computer = {
386
403
  region: (x, y, w, h) => useComputer("region", [x, y, w, h]),
387
404
  screens: () => useComputer("screens"),
388
405
  useScreen: (n) => useComputer("use_screen", [n]),
406
+ /**
407
+ * SEVERAL THINGS, ONE ROUND TRIP, ONE LOOK AT THE END. The fast loop, and the
408
+ * answer to a run that feels slow: every other call here starts its own
409
+ * Python, so five separate steps pay that five times before anything is even
410
+ * clicked (owner, 2026-09-10: "add option to batch command, this is better").
411
+ *
412
+ * await computer.do([["click", 820, 410, "Sign in"], ["type", "hi"], ["key", "enter"]]);
413
+ * // -> { did: [...], screen: "...png", changed: true, x: 1920, y: 0 }
414
+ *
415
+ * Each step is [name, ...args] with the same names the calls below use.
416
+ * Stops at the first refusal and says what had already happened, with a
417
+ * picture of where it stopped. `settle` is a CEILING in seconds (default 1.2)
418
+ * on waiting for the screen to stop moving, not a pause; `look: false` skips
419
+ * the picture when the next thing you do does not depend on it.
420
+ */
421
+ do: (steps, opts = {}) => useComputer("do", (steps || []).map((s) => (Array.isArray(s) ? s : [s])), opts),
389
422
  click: (x, y) => useComputer("click", [x, y]),
390
423
  doubleClick: (x, y) => useComputer("double_click", [x, y]),
391
424
  rightClick: (x, y) => useComputer("right_click", [x, y]),
@@ -395,6 +395,14 @@ class _Dashboard(object):
395
395
  atlas.dashboard.close()
396
396
 
397
397
  Coordinates are inside the dashboard, from its top left, not the screen's.
398
+
399
+ THAT IS THE FIRST PASS: styling, offscreen, measured. The second pass is
400
+ the real screen (owner, 2026-09-10: "use the user's computer and navigate
401
+ and press the buttons ... test the sensitivity"): once check() is clean,
402
+ expand() puts the dashboard in its own full-screen window IN FRONT and in
403
+ the picture, and you press its tabs and buttons with the real pointer
404
+ through screen()/click()/do(), reading `changed` after each. Then
405
+ collapse(). Computer view only; the phone reacts the same way.
398
406
  """
399
407
 
400
408
  @staticmethod
@@ -526,6 +534,28 @@ class _Dashboard(object):
526
534
  _log_action("dashboard_close")
527
535
  return out
528
536
 
537
+ def expand(self):
538
+ """The dashboard in its own full-screen window, ON THE SCREEN, in front.
539
+
540
+ For the second pass: pressing it with the real pointer. This is the one
541
+ Atlas window a run may photograph, so `screen()` will show it and
542
+ `windows(title)` will find it under this project's name. Answers with
543
+ where it sits (`bounds`, in desktop points, and that display's `scale`)
544
+ and `computer_use_on`, which says whether the real-screen pass is open
545
+ to you at all. LOOK before you click: the bounds are where to look, not
546
+ a coordinate to press.
547
+ """
548
+ out = self._call("expand", timeout=90)
549
+ _log_action("dashboard_expand", {"bounds": out.get("bounds"),
550
+ "computer_use_on": bool(out.get("computer_use_on"))})
551
+ return out
552
+
553
+ def collapse(self):
554
+ """Take the expanded window down again. Do this when the pass is done."""
555
+ out = self._call("collapse")
556
+ _log_action("dashboard_collapse")
557
+ return out
558
+
529
559
 
530
560
  dashboard = _Dashboard()
531
561