@seawork/server 1.0.13-rc.5 → 1.0.13

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.
@@ -0,0 +1,27 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ export function resolveElectronHelperPath() {
4
+ if (process.platform !== "darwin" || !process.versions["electron"]) {
5
+ return null;
6
+ }
7
+ const contentsDir = path.dirname(path.dirname(process.execPath));
8
+ const appName = path.basename(process.execPath);
9
+ const helperPath = path.join(contentsDir, "Frameworks", `${appName} Helper.app`, "Contents", "MacOS", `${appName} Helper`);
10
+ return fs.existsSync(helperPath) ? helperPath : null;
11
+ }
12
+ /**
13
+ * Returns a node-compatible runtime path that works when the user's PATH does
14
+ * not include `node`. Inside packaged Electron apps we reuse the bundled
15
+ * runtime: the Helper binary on macOS (avoids Dock icons), or the main exe on
16
+ * Windows/Linux. Spawning these requires `ELECTRON_RUN_AS_NODE=1` in env.
17
+ *
18
+ * Returns null when not running inside Electron — callers should keep the
19
+ * caller-resolved command as-is in that case.
20
+ */
21
+ export function resolveElectronNodeRuntime() {
22
+ if (!process.versions["electron"]) {
23
+ return null;
24
+ }
25
+ return resolveElectronHelperPath() ?? process.execPath;
26
+ }
27
+ //# sourceMappingURL=electron-helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"electron-helper.js","sourceRoot":"","sources":["../../../src/utils/electron-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,UAAU,yBAAyB;IACvC,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjE,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAC1B,WAAW,EACX,YAAY,EACZ,GAAG,OAAO,aAAa,EACvB,UAAU,EACV,OAAO,EACP,GAAG,OAAO,SAAS,CACpB,CAAC;IACF,OAAO,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;AACvD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B;IACxC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,yBAAyB,EAAE,IAAI,OAAO,CAAC,QAAQ,CAAC;AACzD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seawork/server",
3
- "version": "1.0.13-rc.5",
3
+ "version": "1.0.13",
4
4
  "description": "Seawork backend server",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -74,8 +74,8 @@
74
74
  "@isaacs/ttlcache": "^2.1.4",
75
75
  "@modelcontextprotocol/sdk": "^1.20.1",
76
76
  "@sctg/sentencepiece-js": "^1.1.0",
77
- "@seawork/highlight": "1.0.13-rc.5",
78
- "@seawork/relay": "1.0.13-rc.5",
77
+ "@seawork/highlight": "1.0.13",
78
+ "@seawork/relay": "1.0.13",
79
79
  "@xterm/headless": "^6.0.0",
80
80
  "ai": "5.0.78",
81
81
  "ajv": "^8.17.1",