mindvest-atlas 0.46.0 → 0.48.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/computer-use.js +11 -0
- package/src/config.js +1 -1
- package/src/helpers/atlas_env.py +30 -3
package/package.json
CHANGED
|
@@ -81,6 +81,17 @@ const OPS = {
|
|
|
81
81
|
cursor: ['get_cursor', 0],
|
|
82
82
|
'take-over': ['take_over', 0],
|
|
83
83
|
ready: ['computer_ready', 0],
|
|
84
|
+
// WAIT ESPECIALLY. A sequence without it cannot pause for a page, which is
|
|
85
|
+
// most of what a real run of steps needs, and its absence made the documented
|
|
86
|
+
// example fail: `do "click ..." "wait 1500"` was refused as an unknown verb,
|
|
87
|
+
// which reads as do() being broken rather than a table missing a row.
|
|
88
|
+
wait: ['wait', 1],
|
|
89
|
+
copy: ['copy', 1],
|
|
90
|
+
region: ['region', 4],
|
|
91
|
+
'mouse-down': ['mouse_down', 0],
|
|
92
|
+
'mouse-up': ['mouse_up', 0],
|
|
93
|
+
'key-down': ['key_down', 1],
|
|
94
|
+
'key-up': ['key_up', 1],
|
|
84
95
|
};
|
|
85
96
|
// Which values are numbers. Passing "840" as a string to click() would move the
|
|
86
97
|
// pointer nowhere and report success.
|
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.48.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/helpers/atlas_env.py
CHANGED
|
@@ -1434,16 +1434,43 @@ def do(*steps, **kw):
|
|
|
1434
1434
|
try:
|
|
1435
1435
|
fn(*args)
|
|
1436
1436
|
except Exception as err:
|
|
1437
|
-
|
|
1438
|
-
|
|
1437
|
+
# A LONG RUN HAS TO BE SAFE TO ATTEMPT, or caution is the right
|
|
1438
|
+
# answer and nobody will attempt one. So a sequence that stops
|
|
1439
|
+
# halfway hands back a PICTURE of where it stopped, not just the
|
|
1440
|
+
# name of the step: the whole reason to fear a six-step run is not
|
|
1441
|
+
# knowing what state it left behind, and this answers that in the
|
|
1442
|
+
# same breath as the failure.
|
|
1443
|
+
where = None
|
|
1444
|
+
try:
|
|
1445
|
+
shot = screen()
|
|
1446
|
+
where = shot if isinstance(shot, str) else shot.get("path")
|
|
1447
|
+
except Exception:
|
|
1448
|
+
pass
|
|
1449
|
+
raise RuntimeError(
|
|
1450
|
+
"stopped at %s (step %d of %d): %s. Already did: %s.%s"
|
|
1451
|
+
% (name, len(did) + 1, len(steps), err, ", ".join(did) or "nothing",
|
|
1452
|
+
(" The screen at that moment: %s" % where) if where else "")
|
|
1453
|
+
)
|
|
1439
1454
|
did.append(str(name))
|
|
1440
1455
|
if not look:
|
|
1441
1456
|
return {"did": did}
|
|
1442
1457
|
if settle > 0:
|
|
1443
1458
|
import time as _time
|
|
1444
1459
|
_time.sleep(settle)
|
|
1445
|
-
|
|
1460
|
+
# THE WORK SUCCEEDING AND THE LOOK FAILING ARE TWO DIFFERENT THINGS.
|
|
1461
|
+
#
|
|
1462
|
+
# Every step ran, and then the picture at the end could not be taken, and the
|
|
1463
|
+
# whole call raised: to anybody reading, do() had failed, when in fact
|
|
1464
|
+
# everything asked for had happened. That is how a working thing gets a
|
|
1465
|
+
# reputation for being broken (owner, 2026-09-06: "it reports do() is not
|
|
1466
|
+
# working"). The actions are reported as done, and the look reports itself.
|
|
1446
1467
|
out = {"did": did}
|
|
1468
|
+
try:
|
|
1469
|
+
shot = screen()
|
|
1470
|
+
except Exception as err:
|
|
1471
|
+
out["screen"] = None
|
|
1472
|
+
out["look_failed"] = str(err)
|
|
1473
|
+
return out
|
|
1447
1474
|
# DID ANYTHING ACTUALLY CHANGE? A picture that is byte-for-byte the last one
|
|
1448
1475
|
# is a wasted look: the reader spends a turn opening it to find out nothing
|
|
1449
1476
|
# happened, which is the slowest possible way to learn that. Said in words
|