osgi-run 0.1.2 → 0.1.3
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 +17 -2
- package/bin/osgi-run.js +7 -3
- package/osgi-run.jar +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ osgi-run install # registers the MCP server in opencode / Claude Code
|
|
|
13
13
|
|
|
14
14
|
## Use
|
|
15
15
|
|
|
16
|
-
Register the MCP server once (`osgi-run install`), open the workspace in your agent and ask it to start the application: the agent writes
|
|
16
|
+
Register the MCP server once (`osgi-run install`), open the workspace in your agent and ask it to start the application: the agent runs `init`, which writes `.osgi-run/osgi-run.json` and checks it: it builds, resolves the bundles in the framework without starting them, fixes what has one certain answer (a framework or bundles found on this machine, JDK packages the framework does not export) and says `VERIFIED` or names the root causes left. After that, in the root of your workspace:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
19
|
osgi-run start # build, start in background, print bundle status
|
|
@@ -21,8 +21,23 @@ osgi-run status # bundle states + why a bundle is not working
|
|
|
21
21
|
osgi-run gui tree # Swing windows and components
|
|
22
22
|
osgi-run gui type nameField "Ali"
|
|
23
23
|
osgi-run gui click "OK"
|
|
24
|
+
osgi-run why org.example.api # who exports / imports it, and where else on this machine it is
|
|
25
|
+
osgi-run verify # resolve the bundles without starting them (seconds); --fix applies the certain fixes
|
|
24
26
|
osgi-run stop
|
|
25
27
|
```
|
|
26
28
|
|
|
27
29
|
From an MCP client, ask the agent, for example: "start the app and click OK".
|
|
28
|
-
The tools
|
|
30
|
+
The tools: `init`, `verify`, `why`, `start`, `build`, `status`, `restart`, `stop`, `logs`, `find`, `native`, `report`, `test`, `skeleton`;
|
|
31
|
+
the GUI (Swing and SWT): `gui_tree`, `gui_windows`, `gui_focus`, `gui_inspect`, `gui_click`, `gui_type`, `gui_select`, `gui_check`,
|
|
32
|
+
`gui_key`, `gui_menu`, `gui_hover`, `gui_scroll`, `gui_drag`, `gui_text`, `gui_items`, `gui_table`, `gui_cell`, `gui_wait`, `gui_idle`,
|
|
33
|
+
`gui_close`, `gui_batch`, `gui_screenshot`, `gui_show`; diagnostics: `threads`, `osgi`, `heap`, `profile`, `debug`.
|
|
34
|
+
When `init` gets a workspace wrong, `osgi-run skeleton` writes its settings files and jar manifests without source code, its own
|
|
35
|
+
names, hosts and passwords replaced, to send in a bug report.
|
|
36
|
+
|
|
37
|
+
Everything osgi-run keeps is in `.osgi-run/` of the workspace (settings, tests, runtime); no file of the repository changes.
|
|
38
|
+
When the agent closes, the applications its session started are stopped too (`OSGIRUN_KEEP_RUNNING=1` keeps them).
|
|
39
|
+
To watch a test: the agent gives each step a `purpose` (shown with the call), and show mode (`gui_show`, `OSGIRUN_SHOW=1`)
|
|
40
|
+
frames each action's component on the screen with a caption saying what is done and why; hover, wheel and drag show a dot
|
|
41
|
+
where they act, moving along a drag.
|
|
42
|
+
Test scenarios (`.osgi-run/tests/*.test`, `osgi-run test`) check the application after every change; `osgi-run test --record NAME`
|
|
43
|
+
writes one from the GUI actions since the start.
|
package/bin/osgi-run.js
CHANGED
|
@@ -28,16 +28,20 @@ if (!probe.error) {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
// Windows: java.exe reads its arguments in the system's code page ("?" for letters outside it); the environment is
|
|
32
|
+
// Unicode, so the same arguments go there too and osgi-run takes them from it.
|
|
33
|
+
const args = process.argv.slice(2);
|
|
34
|
+
const win = process.platform === "win32";
|
|
35
|
+
const child = spawn(java, [...(win ? ["-Dosgirun.argv=env"] : []), "-jar", jar, ...args], {
|
|
32
36
|
stdio: "inherit",
|
|
33
|
-
env: { ...process.env, OSGIRUN_LAUNCHER: "npm" },
|
|
37
|
+
env: { ...process.env, OSGIRUN_LAUNCHER: "npm", ...(win ? { OSGIRUN_ARGV: JSON.stringify(args) } : {}) },
|
|
34
38
|
});
|
|
35
39
|
child.on("error", (err) => {
|
|
36
40
|
console.error(`osgi-run: could not start Java (${java}): ${err.message}`);
|
|
37
41
|
console.error("osgi-run needs Java 8 or newer: put java on PATH or set JAVA_HOME.");
|
|
38
42
|
process.exit(1);
|
|
39
43
|
});
|
|
40
|
-
for (const sig of ["SIGINT", "SIGTERM"]) {
|
|
44
|
+
for (const sig of ["SIGINT", "SIGTERM", "SIGHUP"]) { // SIGHUP: the terminal (Windows: the console window) closed
|
|
41
45
|
process.on(sig, () => child.kill(sig));
|
|
42
46
|
}
|
|
43
47
|
child.on("exit", (code, signal) => process.exit(code ?? (signal ? 1 : 0)));
|
package/osgi-run.jar
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "osgi-run",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Build, run, inspect and drive Eclipse Equinox OSGi applications without the IDE. CLI and MCP server for AI coding agents (opencode, Claude Code).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/
|
|
7
|
+
"url": "git+https://github.com/SanalGelistirici/osgi-build.git",
|
|
8
8
|
"directory": "osgi-run/npm"
|
|
9
9
|
},
|
|
10
10
|
"bin": {
|