vela-agent 0.2.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/README.md +33 -0
- package/dist/attach.d.ts +6 -0
- package/dist/attach.js +26 -0
- package/dist/attach.js.map +1 -0
- package/dist/core.d.ts +19 -0
- package/dist/core.js +42 -0
- package/dist/core.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +11 -0
- package/dist/server.js +62 -0
- package/dist/server.js.map +1 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# vela-agent
|
|
2
|
+
|
|
3
|
+
**Vela Agent** is a lightweight dev probe for Electron main processes.
|
|
4
|
+
|
|
5
|
+
A single `attach()` call in your main process registers IPC introspection and a main-process eval channel, giving the [vela-mcp](https://www.npmjs.com/package/vela-mcp) server the ability to call `vela_ipc_list`, `vela_ipc_invoke`, and `vela_main_eval` tools during development and testing.
|
|
6
|
+
|
|
7
|
+
## Integration
|
|
8
|
+
|
|
9
|
+
Add one line at the **top** of your `main.js` / `main.ts`, before any `ipcMain.handle` calls:
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
if (process.env.NODE_ENV !== 'production') require('vela-agent').attach();
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
That is the entire integration. The probe is:
|
|
16
|
+
|
|
17
|
+
- **Dev-only** — the `NODE_ENV` guard means it is completely inert in production builds.
|
|
18
|
+
- **Environment/token-gated** — the agent only activates when the Vela environment token is present, so it will not interfere with regular `npm start` runs unless a Vela test session is active.
|
|
19
|
+
- **Zero runtime dependencies** — nothing extra is bundled into your production app.
|
|
20
|
+
|
|
21
|
+
## What it enables
|
|
22
|
+
|
|
23
|
+
| vela-mcp tool | Requires vela-agent |
|
|
24
|
+
|---------------|-------------------|
|
|
25
|
+
| `vela_ipc_list` | Yes — lists every registered `ipcMain.handle` channel |
|
|
26
|
+
| `vela_ipc_invoke` | Yes — calls a channel as if from a renderer |
|
|
27
|
+
| `vela_main_eval` | Yes — evaluates arbitrary JS in the main process |
|
|
28
|
+
|
|
29
|
+
All other Vela tools (CDP-based renderer eval, screenshot, debugger, specs, capture) work without vela-agent.
|
|
30
|
+
|
|
31
|
+
## More
|
|
32
|
+
|
|
33
|
+
See [vela-mcp](https://www.npmjs.com/package/vela-mcp) and the [repo](https://github.com/OWNER/vela) for the full playbook.
|
package/dist/attach.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attach the Vela dev probe. No-op unless launched by Vela (the launcher sets
|
|
3
|
+
* VELA_PROBE_PORT + VELA_PROBE_TOKEN) and not in production. Call this at the TOP
|
|
4
|
+
* of the app's main process, BEFORE registering any ipcMain handlers.
|
|
5
|
+
*/
|
|
6
|
+
export declare function attach(): void;
|
package/dist/attach.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.attach = attach;
|
|
4
|
+
const core_1 = require("./core");
|
|
5
|
+
const server_1 = require("./server");
|
|
6
|
+
/**
|
|
7
|
+
* Attach the Vela dev probe. No-op unless launched by Vela (the launcher sets
|
|
8
|
+
* VELA_PROBE_PORT + VELA_PROBE_TOKEN) and not in production. Call this at the TOP
|
|
9
|
+
* of the app's main process, BEFORE registering any ipcMain handlers.
|
|
10
|
+
*/
|
|
11
|
+
function attach() {
|
|
12
|
+
if (process.env.NODE_ENV === "production")
|
|
13
|
+
return;
|
|
14
|
+
const port = Number(process.env.VELA_PROBE_PORT);
|
|
15
|
+
const token = process.env.VELA_PROBE_TOKEN;
|
|
16
|
+
if (!port || !token)
|
|
17
|
+
return; // not launched by Vela — stay completely inert
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
19
|
+
const electron = require("electron");
|
|
20
|
+
const core = (0, core_1.createProbe)(electron.ipcMain);
|
|
21
|
+
(0, server_1.startProbeServer)(core, { port, token }).catch((e) => {
|
|
22
|
+
// eslint-disable-next-line no-console
|
|
23
|
+
console.error("[vela-agent] failed to start probe server:", e);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=attach.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attach.js","sourceRoot":"","sources":["../src/attach.ts"],"names":[],"mappings":";;AAQA,wBAaC;AArBD,iCAAqC;AACrC,qCAA4C;AAE5C;;;;GAIG;AACH,SAAgB,MAAM;IACpB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;QAAE,OAAO;IAClD,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAC3C,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK;QAAE,OAAO,CAAC,+CAA+C;IAE5E,8DAA8D;IAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAA0C,CAAC;IAC9E,MAAM,IAAI,GAAG,IAAA,kBAAW,EAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3C,IAAA,yBAAgB,EAAC,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;QAClD,sCAAsC;QACtC,OAAO,CAAC,KAAK,CAAC,4CAA4C,EAAE,CAAC,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface IpcLike {
|
|
2
|
+
handle(channel: string, listener: (...args: any[]) => any): void;
|
|
3
|
+
on(channel: string, listener: (...args: any[]) => any): void;
|
|
4
|
+
}
|
|
5
|
+
export interface IpcChannelInfo {
|
|
6
|
+
channel: string;
|
|
7
|
+
kind: "handle" | "on";
|
|
8
|
+
}
|
|
9
|
+
export interface ProbeCore {
|
|
10
|
+
list(): IpcChannelInfo[];
|
|
11
|
+
invoke(channel: string, args: unknown[]): Promise<unknown>;
|
|
12
|
+
evalMain(code: string): Promise<unknown>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Wrap an ipcMain-like object so every `handle`/`on` registration is recorded
|
|
16
|
+
* (and still forwarded to the original), exposing introspection + invocation.
|
|
17
|
+
* Must be called BEFORE the app registers its IPC handlers.
|
|
18
|
+
*/
|
|
19
|
+
export declare function createProbe(ipc: IpcLike): ProbeCore;
|
package/dist/core.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createProbe = createProbe;
|
|
4
|
+
/**
|
|
5
|
+
* Wrap an ipcMain-like object so every `handle`/`on` registration is recorded
|
|
6
|
+
* (and still forwarded to the original), exposing introspection + invocation.
|
|
7
|
+
* Must be called BEFORE the app registers its IPC handlers.
|
|
8
|
+
*/
|
|
9
|
+
function createProbe(ipc) {
|
|
10
|
+
const handleFns = new Map();
|
|
11
|
+
const onFns = new Map();
|
|
12
|
+
const origHandle = ipc.handle.bind(ipc);
|
|
13
|
+
const origOn = ipc.on.bind(ipc);
|
|
14
|
+
ipc.handle = (channel, listener) => {
|
|
15
|
+
handleFns.set(channel, listener);
|
|
16
|
+
return origHandle(channel, listener);
|
|
17
|
+
};
|
|
18
|
+
ipc.on = (channel, listener) => {
|
|
19
|
+
onFns.set(channel, listener);
|
|
20
|
+
return origOn(channel, listener);
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
list() {
|
|
24
|
+
return [
|
|
25
|
+
...[...handleFns.keys()].map((channel) => ({ channel, kind: "handle" })),
|
|
26
|
+
...[...onFns.keys()].map((channel) => ({ channel, kind: "on" }))
|
|
27
|
+
];
|
|
28
|
+
},
|
|
29
|
+
async invoke(channel, args) {
|
|
30
|
+
const fn = handleFns.get(channel);
|
|
31
|
+
if (!fn)
|
|
32
|
+
throw new Error(`No ipcMain.handle for "${channel}"`);
|
|
33
|
+
const stubEvent = {};
|
|
34
|
+
return await fn(stubEvent, ...args);
|
|
35
|
+
},
|
|
36
|
+
async evalMain(code) {
|
|
37
|
+
const result = (0, eval)(code);
|
|
38
|
+
return await result;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=core.js.map
|
package/dist/core.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;AAqBA,kCAkCC;AAvCD;;;;GAIG;AACH,SAAgB,WAAW,CAAC,GAAY;IACtC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAmC,CAAC;IAC7D,MAAM,KAAK,GAAG,IAAI,GAAG,EAAmC,CAAC;IAEzD,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEhC,GAAG,CAAC,MAAM,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE;QACjC,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACjC,OAAO,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC;IACF,GAAG,CAAC,EAAE,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE;QAC7B,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC7B,OAAO,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,OAAO;QACL,IAAI;YACF,OAAO;gBACL,GAAG,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAiB,EAAE,CAAC,CAAC;gBACjF,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAa,EAAE,CAAC,CAAC;aAC1E,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI;YACxB,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAClC,IAAI,CAAC,EAAE;gBAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,OAAO,GAAG,CAAC,CAAC;YAC/D,MAAM,SAAS,GAAG,EAAS,CAAC;YAC5B,OAAO,MAAM,EAAE,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;QACtC,CAAC;QACD,KAAK,CAAC,QAAQ,CAAC,IAAI;YACjB,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;YAC/B,OAAO,MAAM,MAAM,CAAC;QACtB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createProbe = exports.attach = void 0;
|
|
4
|
+
var attach_1 = require("./attach");
|
|
5
|
+
Object.defineProperty(exports, "attach", { enumerable: true, get: function () { return attach_1.attach; } });
|
|
6
|
+
var core_1 = require("./core");
|
|
7
|
+
Object.defineProperty(exports, "createProbe", { enumerable: true, get: function () { return core_1.createProbe; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,+BAAqC;AAA5B,mGAAA,WAAW,OAAA"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ProbeCore } from "./core";
|
|
2
|
+
export interface ProbeServer {
|
|
3
|
+
port: number;
|
|
4
|
+
close: () => Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
/** Start a token-gated localhost JSON-RPC server exposing the probe core.
|
|
7
|
+
* Pass port 0 to let the OS choose (the chosen port is returned). */
|
|
8
|
+
export declare function startProbeServer(core: ProbeCore, opts: {
|
|
9
|
+
port: number;
|
|
10
|
+
token: string;
|
|
11
|
+
}): Promise<ProbeServer>;
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.startProbeServer = startProbeServer;
|
|
7
|
+
const node_http_1 = __importDefault(require("node:http"));
|
|
8
|
+
/** Start a token-gated localhost JSON-RPC server exposing the probe core.
|
|
9
|
+
* Pass port 0 to let the OS choose (the chosen port is returned). */
|
|
10
|
+
function startProbeServer(core, opts) {
|
|
11
|
+
const server = node_http_1.default.createServer((req, res) => {
|
|
12
|
+
if (req.method === "GET" && req.url === "/health") {
|
|
13
|
+
res.writeHead(200);
|
|
14
|
+
res.end("ok");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (req.method !== "POST" || req.url !== "/rpc") {
|
|
18
|
+
res.writeHead(404);
|
|
19
|
+
res.end();
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (req.headers["x-vela-token"] !== opts.token) {
|
|
23
|
+
res.writeHead(401, { "content-type": "application/json" });
|
|
24
|
+
res.end(JSON.stringify({ ok: false, error: "bad token" }));
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
let body = "";
|
|
28
|
+
req.on("data", (c) => (body += c));
|
|
29
|
+
req.on("end", async () => {
|
|
30
|
+
try {
|
|
31
|
+
const { method, params } = JSON.parse(body || "{}");
|
|
32
|
+
let result;
|
|
33
|
+
if (method === "ipc.list")
|
|
34
|
+
result = core.list();
|
|
35
|
+
else if (method === "ipc.invoke")
|
|
36
|
+
result = await core.invoke(params.channel, params.args ?? []);
|
|
37
|
+
else if (method === "main.eval")
|
|
38
|
+
result = await core.evalMain(params.code);
|
|
39
|
+
else
|
|
40
|
+
throw new Error(`Unknown method: ${method}`);
|
|
41
|
+
res.writeHead(200, { "content-type": "application/json" });
|
|
42
|
+
res.end(JSON.stringify({ ok: true, result }));
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
res.writeHead(200, { "content-type": "application/json" });
|
|
46
|
+
res.end(JSON.stringify({ ok: false, error: e instanceof Error ? e.message : String(e) }));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
return new Promise((resolve, reject) => {
|
|
51
|
+
server.on("error", reject);
|
|
52
|
+
server.listen(opts.port, "127.0.0.1", () => {
|
|
53
|
+
const addr = server.address();
|
|
54
|
+
const port = addr && typeof addr === "object" ? addr.port : opts.port;
|
|
55
|
+
resolve({
|
|
56
|
+
port,
|
|
57
|
+
close: () => new Promise((r) => server.close(() => r()))
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;;;;AAUA,4CA+CC;AAzDD,0DAA6B;AAQ7B;qEACqE;AACrE,SAAgB,gBAAgB,CAAC,IAAe,EAAE,I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AAI,GAAG,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;YACtE,OAAO,CAAC;gBACN,IAAI;gBACJ,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI,OAAO,CAAO,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;aAC/D,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vela-agent",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Vela dev probe — a one-line require('vela-agent').attach() in an Electron main process that exposes IPC introspection + main-process eval to the Vela test framework (dev-only).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Vela authors <colleenkantner@gmail.com>",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"electron",
|
|
9
|
+
"testing",
|
|
10
|
+
"ipc",
|
|
11
|
+
"vela",
|
|
12
|
+
"mcp",
|
|
13
|
+
"dev"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/michael-ltm/vela.git",
|
|
18
|
+
"directory": "packages/agent"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/michael-ltm/vela/tree/main/packages/agent#readme",
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=20"
|
|
23
|
+
},
|
|
24
|
+
"main": "dist/index.js",
|
|
25
|
+
"types": "dist/index.d.ts",
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsc -p tsconfig.json",
|
|
34
|
+
"prepublishOnly": "pnpm run build"
|
|
35
|
+
}
|
|
36
|
+
}
|