@melaya/runner 1.1.75 → 1.1.76
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.
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
// Pinned computer helper releases for the runner CLI host (computerHostCli.ts),
|
|
6
6
|
// keyed by `${process.platform}-${process.arch}`. A download is only accepted
|
|
7
7
|
// when its sha256 matches.
|
|
8
|
-
export const COMPUTER_HELPER_VERSION = "1.2.
|
|
8
|
+
export const COMPUTER_HELPER_VERSION = "1.2.1";
|
|
9
9
|
export const COMPUTER_HELPER_MANIFEST = {
|
|
10
10
|
"linux-arm64": {
|
|
11
|
-
"url": "https://api.melaya.org/desktop/helpers/1.2.
|
|
12
|
-
"sha256": "
|
|
11
|
+
"url": "https://api.melaya.org/desktop/helpers/1.2.1/melaya-computer-linux-aarch64",
|
|
12
|
+
"sha256": "d4d47603d30e2b4f136a68b88654e331d2ea809520c8e6d1c9f8a604aa709207"
|
|
13
13
|
},
|
|
14
14
|
"linux-x64": {
|
|
15
|
-
"url": "https://api.melaya.org/desktop/helpers/1.2.
|
|
16
|
-
"sha256": "
|
|
15
|
+
"url": "https://api.melaya.org/desktop/helpers/1.2.1/melaya-computer-linux-x86_64",
|
|
16
|
+
"sha256": "c2a27d0f3d62efc26486f5cbb56876dd036a9d059a39d251a2704a62af6aacfb"
|
|
17
17
|
}
|
|
18
18
|
};
|
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
* packages/desktop-contract/src/computer.ts (this package cannot import it).
|
|
44
44
|
*/
|
|
45
45
|
import { type ChildProcess } from "child_process";
|
|
46
|
+
/** COMPUTER_POINTER_KINDS: in a batch, these steps skip their own after-step observation except the last one. */
|
|
47
|
+
export declare const QUIET_POINTER_KINDS: ReadonlySet<string>;
|
|
46
48
|
export type ComputerAppTier = "view" | "click" | "full";
|
|
47
49
|
export interface AllowedApp {
|
|
48
50
|
appId: string;
|
|
@@ -125,7 +127,7 @@ export declare function checkCommand(msg: {
|
|
|
125
127
|
* accepted when its sha256 matches. Empty until the first release: use
|
|
126
128
|
* MELAYA_COMPUTER_HELPER or --computer-helper meanwhile.
|
|
127
129
|
*/
|
|
128
|
-
export declare const HELPER_VERSION = "1.2.
|
|
130
|
+
export declare const HELPER_VERSION = "1.2.1";
|
|
129
131
|
export declare const HELPER_MANIFEST: Record<string, {
|
|
130
132
|
url: string;
|
|
131
133
|
sha256: string;
|
package/dist/computerHostCli.js
CHANGED
|
@@ -53,6 +53,9 @@ import { delimiter, dirname, join } from "path";
|
|
|
53
53
|
import { fileURLToPath } from "url";
|
|
54
54
|
import { COMPUTER_HELPER_MANIFEST, COMPUTER_HELPER_VERSION } from "./computerHelperManifest.js";
|
|
55
55
|
import { PAUSE_DEFAULTS, PauseRun, pauseNeedsIdle, pausePositionOf, pauseReportText, pauseRunStep, pauseStopText, } from "./computerPause.js";
|
|
56
|
+
// ── contract mirrors ────────────────────────────────────────────────────────
|
|
57
|
+
/** COMPUTER_POINTER_KINDS: in a batch, these steps skip their own after-step observation except the last one. */
|
|
58
|
+
export const QUIET_POINTER_KINDS = new Set(["move", "mouse", "path", "hover", "drag", "click", "scroll", "cursor_position", "wait", "hold_key"]);
|
|
56
59
|
export const COMPUTER_ACTION_KINDS = [
|
|
57
60
|
"screen", "screenshot", "find", "get_text", "current_app", "list_windows", "list_apps", "list_displays",
|
|
58
61
|
"clipboard_read", "ocr", "wait", "hover", "move", "scroll",
|
|
@@ -801,7 +804,10 @@ export function createCliComputerHost(options = {}) {
|
|
|
801
804
|
r = await runLocal(kind, step);
|
|
802
805
|
}
|
|
803
806
|
else {
|
|
804
|
-
const { expect: cond, onError: _onError, expectTimeoutMs, ...
|
|
807
|
+
const { expect: cond, onError: _onError, expectTimeoutMs, ...own } = step;
|
|
808
|
+
// Pointer steps other than the last skip their own after-step observation, as in the desktop app: a path
|
|
809
|
+
// step otherwise waited ~0.1 s for a UI event a canvas never sends (1200 strokes: 160 s instead of ~20 s).
|
|
810
|
+
const plain = QUIET_POINTER_KINDS.has(kind) && i < steps.length - 1 && own.observe === undefined ? { ...own, observe: "none" } : own;
|
|
805
811
|
const pathStart = i === start && plain.kind === "path" && resume ? resume : null;
|
|
806
812
|
const out = await pauseRunStep(host, run, plain, `${id}.${i + 1}`, pathStart);
|
|
807
813
|
if ("stop" in out) {
|
|
@@ -818,7 +824,10 @@ export function createCliComputerHost(options = {}) {
|
|
|
818
824
|
r = out.result;
|
|
819
825
|
if (r.ok && cond && typeof cond === "object") {
|
|
820
826
|
const timeoutMs = Math.min(Math.max(100, Number(expectTimeoutMs) || 2_000), Math.max(100, left() - 100));
|
|
821
|
-
|
|
827
|
+
// Checked on the window the step acts in: its own windowId, else the batch's (windowTitleContains never
|
|
828
|
+
// matches some other window, 2026-10-24, with helper 1.2.2).
|
|
829
|
+
const expectWindow = typeof plain.windowId === "string" ? plain.windowId : typeof action.windowId === "string" ? action.windowId : "";
|
|
830
|
+
const ex = await runOnHelper(`${id}.${i + 1}e`, { kind: "expect", condition: cond, timeoutMs, ...(expectWindow ? { windowId: expectWindow } : {}) }, allowedAppIds, allowedApps, timeoutMs + 500);
|
|
822
831
|
if (!ex.ok) {
|
|
823
832
|
expectFailed = true;
|
|
824
833
|
const em = ex.error?.message || "the expectation failed";
|
package/package.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@melaya/runner",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Run Melaya AI pipelines locally with your own LM Studio or Ollama models",
|
|
5
|
-
"license": "Apache-2.0",
|
|
6
|
-
"author": "Melaya Labs LLC",
|
|
7
|
-
"private": false,
|
|
8
|
-
"type": "module",
|
|
9
|
-
"bin": {
|
|
10
|
-
"melaya-runner": "dist/cli.js"
|
|
11
|
-
},
|
|
12
|
-
"main": "dist/index.js",
|
|
13
|
-
"files": [
|
|
14
|
-
"dist/**/*.js",
|
|
15
|
-
"dist/**/*.d.ts",
|
|
16
|
-
"dist/**/*.py",
|
|
17
|
-
"localRagIngest.py",
|
|
18
|
-
"localRagRetrieve.py",
|
|
19
|
-
"localDbProbe.py",
|
|
20
|
-
"localBacklinkFetch.py",
|
|
21
|
-
"localVault.py",
|
|
22
|
-
"localVaultMirror.py",
|
|
23
|
-
"nltk_data/**",
|
|
24
|
-
"README.md",
|
|
25
|
-
"LICENSE"
|
|
26
|
-
],
|
|
27
|
-
"scripts": {
|
|
28
|
-
"build": "tsc && node -e \"const fs=require('fs'); fs.copyFileSync('localRagIngest.py','dist/localRagIngest.py'); fs.copyFileSync('localRagRetrieve.py','dist/localRagRetrieve.py'); fs.copyFileSync('localDbProbe.py','dist/localDbProbe.py'); fs.copyFileSync('localBacklinkFetch.py','dist/localBacklinkFetch.py'); fs.copyFileSync('localVault.py','dist/localVault.py'); fs.copyFileSync('localVaultMirror.py','dist/localVaultMirror.py'); fs.copyFileSync('src/assistantHost.py','dist/assistantHost.py')\"",
|
|
29
|
-
"test": "node --test --import tsx \"src/**/*.test.ts\"",
|
|
30
|
-
"prepublishOnly": "npm run build"
|
|
31
|
-
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"chalk": "^5.3.0",
|
|
34
|
-
"commander": "^12.0.0",
|
|
35
|
-
"ora": "^8.0.0",
|
|
36
|
-
"playwright": "^1.48.0",
|
|
37
|
-
"socket.io-client": "^4.8.0"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@types/node": "^20.0.0",
|
|
41
|
-
"tsx": "^4.19.2",
|
|
42
|
-
"typescript": "^5.5.0"
|
|
43
|
-
},
|
|
44
|
-
"engines": {
|
|
45
|
-
"node": ">=18"
|
|
46
|
-
},
|
|
47
|
-
"publishConfig": {
|
|
48
|
-
"access": "public"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@melaya/runner",
|
|
3
|
+
"version": "1.1.76",
|
|
4
|
+
"description": "Run Melaya AI pipelines locally with your own LM Studio or Ollama models",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "Melaya Labs LLC",
|
|
7
|
+
"private": false,
|
|
8
|
+
"type": "module",
|
|
9
|
+
"bin": {
|
|
10
|
+
"melaya-runner": "dist/cli.js"
|
|
11
|
+
},
|
|
12
|
+
"main": "dist/index.js",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist/**/*.js",
|
|
15
|
+
"dist/**/*.d.ts",
|
|
16
|
+
"dist/**/*.py",
|
|
17
|
+
"localRagIngest.py",
|
|
18
|
+
"localRagRetrieve.py",
|
|
19
|
+
"localDbProbe.py",
|
|
20
|
+
"localBacklinkFetch.py",
|
|
21
|
+
"localVault.py",
|
|
22
|
+
"localVaultMirror.py",
|
|
23
|
+
"nltk_data/**",
|
|
24
|
+
"README.md",
|
|
25
|
+
"LICENSE"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc && node -e \"const fs=require('fs'); fs.copyFileSync('localRagIngest.py','dist/localRagIngest.py'); fs.copyFileSync('localRagRetrieve.py','dist/localRagRetrieve.py'); fs.copyFileSync('localDbProbe.py','dist/localDbProbe.py'); fs.copyFileSync('localBacklinkFetch.py','dist/localBacklinkFetch.py'); fs.copyFileSync('localVault.py','dist/localVault.py'); fs.copyFileSync('localVaultMirror.py','dist/localVaultMirror.py'); fs.copyFileSync('src/assistantHost.py','dist/assistantHost.py')\"",
|
|
29
|
+
"test": "node --test --import tsx \"src/**/*.test.ts\"",
|
|
30
|
+
"prepublishOnly": "npm run build"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"chalk": "^5.3.0",
|
|
34
|
+
"commander": "^12.0.0",
|
|
35
|
+
"ora": "^8.0.0",
|
|
36
|
+
"playwright": "^1.48.0",
|
|
37
|
+
"socket.io-client": "^4.8.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/node": "^20.0.0",
|
|
41
|
+
"tsx": "^4.19.2",
|
|
42
|
+
"typescript": "^5.5.0"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=18"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
}
|
|
50
|
+
}
|