research-copilot 0.1.0 → 0.1.2

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.
Files changed (65) hide show
  1. package/README.md +0 -9
  2. package/app/out/renderer/assets/{MilkdownMarkdownEditor-bLPxrCVb.js → MilkdownMarkdownEditor-CCiFOpuq.js} +50 -50
  3. package/app/out/renderer/assets/{arc-J47ePHZ2.js → arc-BR5G9xaE.js} +1 -1
  4. package/app/out/renderer/assets/{blockDiagram-c4efeb88-5uRQXgQJ.js → blockDiagram-c4efeb88-JmvDTsGU.js} +8 -8
  5. package/app/out/renderer/assets/{c4Diagram-c83219d4-C4iCTPEL.js → c4Diagram-c83219d4-Daf_3gE1.js} +3 -3
  6. package/app/out/renderer/assets/{channel-ZAmhHE3g.js → channel-xtutyETs.js} +1 -1
  7. package/app/out/renderer/assets/{classDiagram-beda092f-7NOZxq_W.js → classDiagram-beda092f-BFWEqrCW.js} +6 -6
  8. package/app/out/renderer/assets/{classDiagram-v2-2358418a-5fPT-cUH.js → classDiagram-v2-2358418a-BQw7RI0A.js} +10 -10
  9. package/app/out/renderer/assets/{clone-CsnzsYXQ.js → clone-uoV60hcB.js} +1 -1
  10. package/app/out/renderer/assets/{createText-1719965b-Cji7KN4K.js → createText-1719965b-BaRII2sm.js} +2 -2
  11. package/app/out/renderer/assets/{edges-96097737-CD0EvAZQ.js → edges-96097737-CL7Yc4hz.js} +3 -3
  12. package/app/out/renderer/assets/{erDiagram-0228fc6a-DRYXBpi7.js → erDiagram-0228fc6a-B9hgyxu6.js} +5 -5
  13. package/app/out/renderer/assets/{flowDb-c6c81e3f-CuoIN-Cy.js → flowDb-c6c81e3f-b_RS-jIJ.js} +1 -1
  14. package/app/out/renderer/assets/{flowDiagram-50d868cf-CPWPLOml.js → flowDiagram-50d868cf-CPB3IueC.js} +12 -12
  15. package/app/out/renderer/assets/{flowDiagram-v2-4f6560a1-C_R12s4S.js → flowDiagram-v2-4f6560a1-DM8cFvdZ.js} +12 -12
  16. package/app/out/renderer/assets/{flowchart-elk-definition-6af322e1-BdKUSFpi.js → flowchart-elk-definition-6af322e1-BsxABHy9.js} +6 -6
  17. package/app/out/renderer/assets/{ganttDiagram-a2739b55-ygqT5HlG.js → ganttDiagram-a2739b55-DpMib95K.js} +3 -3
  18. package/app/out/renderer/assets/{gitGraphDiagram-82fe8481-D97GT4iA.js → gitGraphDiagram-82fe8481-C0OtwErh.js} +2 -2
  19. package/app/out/renderer/assets/{graph-DpC13d95.js → graph-CXef_RHM.js} +1 -1
  20. package/app/out/renderer/assets/{index-5325376f-Bbs7Fbqr.js → index-5325376f-0FtzFTBH.js} +6 -6
  21. package/app/out/renderer/assets/{index-B2jip-rk.js → index-BBH0Chbw.js} +6 -6
  22. package/app/out/renderer/assets/{index-K8c8Mqdy.js → index-BE4XBnng.js} +3 -3
  23. package/app/out/renderer/assets/{index-WFd2jRnA.js → index-BHo8axTp.js} +6 -6
  24. package/app/out/renderer/assets/{index-CAJkRYkO.js → index-Bg4LHaeu.js} +3 -3
  25. package/app/out/renderer/assets/{index-4-ziknCv.js → index-BohTbJeP.js} +6 -6
  26. package/app/out/renderer/assets/{index-BKTVfokE.js → index-C1Hf3CJw.js} +6 -6
  27. package/app/out/renderer/assets/{index-CvAZkqBZ.js → index-CFaiDIr7.js} +3 -3
  28. package/app/out/renderer/assets/{index-Bn433Fat.js → index-CKjCQ1EB.js} +6 -6
  29. package/app/out/renderer/assets/{index-C1ithNW1.js → index-CMDsy41q.js} +1 -1
  30. package/app/out/renderer/assets/{index-CtA0Xj22.js → index-CTF1A-5m.js} +3 -3
  31. package/app/out/renderer/assets/{index-BqDyyRCx.js → index-C_cgOzmt.js} +8 -3
  32. package/app/out/renderer/assets/{index-Cq4MH3sY.js → index-CabfPYgf.js} +3 -3
  33. package/app/out/renderer/assets/{index-BzFMeMPn.js → index-Crf9Pipm.js} +3 -3
  34. package/app/out/renderer/assets/{index-D3UDN-5c.js → index-Cx3Vwh3q.js} +4 -4
  35. package/app/out/renderer/assets/{index-D6RguhZ5.js → index-D9-3cc7l.js} +4 -4
  36. package/app/out/renderer/assets/{index-Y4lKyF6t.js → index-DRyElXV-.js} +5 -5
  37. package/app/out/renderer/assets/{index-DnEowqXv.js → index-DeVfJmHc.js} +3 -3
  38. package/app/out/renderer/assets/{index-WgMfkRFp.js → index-DuAPj57k.js} +3 -3
  39. package/app/out/renderer/assets/{index-fx307_f1.js → index-Dy2bySYF.js} +3 -3
  40. package/app/out/renderer/assets/{index-D4F9R5ao.js → index-OqY0JVi2.js} +3 -3
  41. package/app/out/renderer/assets/{index-CleO0-yj.js → index-tz7ZKjP9.js} +3 -3
  42. package/app/out/renderer/assets/{index-Kh14gO6K.js → index-uZnv8lTU.js} +3 -3
  43. package/app/out/renderer/assets/{index-BiJbFgVG.js → index-vGIhunyU.js} +6 -6
  44. package/app/out/renderer/assets/{infoDiagram-8eee0895-ptaVSwzq.js → infoDiagram-8eee0895-CPFVhSvg.js} +2 -2
  45. package/app/out/renderer/assets/{journeyDiagram-c64418c1-aloEGOQp.js → journeyDiagram-c64418c1-PKaxJ2mn.js} +4 -4
  46. package/app/out/renderer/assets/{layout-ZeuHE_aY.js → layout-CawlN23W.js} +2 -2
  47. package/app/out/renderer/assets/{line-CAgaGl-S.js → line-C_cMMDTP.js} +1 -1
  48. package/app/out/renderer/assets/{linear-DIg7lTe1.js → linear-CnzgpVoT.js} +1 -1
  49. package/app/out/renderer/assets/{mindmap-definition-8da855dc-B8XVoUxz.js → mindmap-definition-8da855dc-2dVBAm3g.js} +3 -3
  50. package/app/out/renderer/assets/{pieDiagram-a8764435-DlwoeBU2.js → pieDiagram-a8764435-p6hNN8aY.js} +3 -3
  51. package/app/out/renderer/assets/{quadrantDiagram-1e28029f-BaSi1XB4.js → quadrantDiagram-1e28029f-JJT_eOsi.js} +3 -3
  52. package/app/out/renderer/assets/{requirementDiagram-08caed73-D3EFyegZ.js → requirementDiagram-08caed73-Ck4auzva.js} +5 -5
  53. package/app/out/renderer/assets/{sankeyDiagram-a04cb91d-Cv44AsnM.js → sankeyDiagram-a04cb91d-DICtg7Jw.js} +2 -2
  54. package/app/out/renderer/assets/{sequenceDiagram-c5b8d532-CuUBu-x4.js → sequenceDiagram-c5b8d532-Bv7njQoz.js} +3 -3
  55. package/app/out/renderer/assets/{stateDiagram-1ecb1508-BOU34Zp4.js → stateDiagram-1ecb1508-CmuiBQ0q.js} +6 -6
  56. package/app/out/renderer/assets/{stateDiagram-v2-c2b004d7-BgRoffou.js → stateDiagram-v2-c2b004d7-DErEMYcv.js} +10 -10
  57. package/app/out/renderer/assets/{styles-b4e223ce-BMr9TPuj.js → styles-b4e223ce-CEjXkOYY.js} +1 -1
  58. package/app/out/renderer/assets/{styles-ca3715f6-DgbNw99p.js → styles-ca3715f6-BJWKCKia.js} +1 -1
  59. package/app/out/renderer/assets/{styles-d45a18b0-DtRYKYKf.js → styles-d45a18b0-BrhRky7i.js} +4 -4
  60. package/app/out/renderer/assets/{svgDrawCommon-b86b1483-Bein03PD.js → svgDrawCommon-b86b1483-RWkoQoOd.js} +1 -1
  61. package/app/out/renderer/assets/{timeline-definition-faaaa080-BlWpLE_4.js → timeline-definition-faaaa080-25xmyyis.js} +3 -3
  62. package/app/out/renderer/assets/{xychartDiagram-f5964ef8-Bhga-YXm.js → xychartDiagram-f5964ef8-DwBkod9W.js} +5 -5
  63. package/app/out/renderer/index.html +1 -1
  64. package/bin/cli.mjs +41 -16
  65. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { n as getAccDescription, m as setAccDescription, q as setAccTitle, J as setDiagramTitle, H as getDiagramTitle, o as getAccTitle, r as getConfig, u as select, v as log$1, A as dist, w as configureSvgSize, x as assignWithDepth$1, C as common$1, z as sanitizeText$2, M as clear$1, O as utils, ad as hasKatex, ae as calculateMathMLDimensions, af as parseFontSize, ag as ZERO_WIDTH_SPACE, ah as renderKatexSanitized, ai as getConfig$1 } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
2
- import { a as drawBackgroundRect$1, d as drawRect$1, b as getTextObj$1, c as drawEmbeddedImage, e as drawImage, g as getNoteRect$1 } from "./svgDrawCommon-b86b1483-Bein03PD.js";
3
- import "./index-BqDyyRCx.js";
1
+ import { n as getAccDescription, m as setAccDescription, q as setAccTitle, J as setDiagramTitle, H as getDiagramTitle, o as getAccTitle, r as getConfig, u as select, v as log$1, A as dist, w as configureSvgSize, x as assignWithDepth$1, C as common$1, z as sanitizeText$2, M as clear$1, O as utils, ad as hasKatex, ae as calculateMathMLDimensions, af as parseFontSize, ag as ZERO_WIDTH_SPACE, ah as renderKatexSanitized, ai as getConfig$1 } from "./MilkdownMarkdownEditor-CCiFOpuq.js";
2
+ import { a as drawBackgroundRect$1, d as drawRect$1, b as getTextObj$1, c as drawEmbeddedImage, e as drawImage, g as getNoteRect$1 } from "./svgDrawCommon-b86b1483-RWkoQoOd.js";
3
+ import "./index-C_cgOzmt.js";
4
4
  var parser = function() {
5
5
  var o = function(k, v, o2, l) {
6
6
  for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
@@ -1,9 +1,9 @@
1
- import { s as styles, d as db, p as parser$1 } from "./styles-ca3715f6-DgbNw99p.js";
2
- import { r as getConfig, u as select, v as log$1, w as configureSvgSize, C as common$1, R as curveBasis, O as utils } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
3
- import { G as Graph } from "./graph-DpC13d95.js";
4
- import { l as layout } from "./layout-ZeuHE_aY.js";
5
- import { l as line } from "./line-CAgaGl-S.js";
6
- import "./index-BqDyyRCx.js";
1
+ import { s as styles, d as db, p as parser$1 } from "./styles-ca3715f6-BJWKCKia.js";
2
+ import { r as getConfig, u as select, v as log$1, w as configureSvgSize, C as common$1, R as curveBasis, O as utils } from "./MilkdownMarkdownEditor-CCiFOpuq.js";
3
+ import { G as Graph } from "./graph-CXef_RHM.js";
4
+ import { l as layout } from "./layout-CawlN23W.js";
5
+ import { l as line } from "./line-C_cMMDTP.js";
6
+ import "./index-C_cgOzmt.js";
7
7
  import "./array-DgktLKBx.js";
8
8
  import "./path-Cp2qmpkd.js";
9
9
  const drawStartState = (g) => g.append("circle").attr("class", "start-state").attr("r", getConfig().state.sizeUnit).attr("cx", getConfig().state.padding + getConfig().state.sizeUnit).attr("cy", getConfig().state.padding + getConfig().state.sizeUnit);
@@ -1,13 +1,13 @@
1
- import { s as styles, d as db, p as parser$1, D as DEFAULT_NESTED_DOC_DIR, a as DEFAULT_STATE_TYPE, b as DIVIDER_TYPE, S as STMT_RELATION, c as STMT_STATE } from "./styles-ca3715f6-DgbNw99p.js";
2
- import { G as Graph } from "./graph-DpC13d95.js";
3
- import { v as log$1, r as getConfig, u as select, O as utils, w as configureSvgSize, C as common$1 } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
4
- import { r as render } from "./index-5325376f-Bbs7Fbqr.js";
5
- import "./layout-ZeuHE_aY.js";
6
- import "./index-BqDyyRCx.js";
7
- import "./clone-CsnzsYXQ.js";
8
- import "./edges-96097737-CD0EvAZQ.js";
9
- import "./createText-1719965b-Cji7KN4K.js";
10
- import "./line-CAgaGl-S.js";
1
+ import { s as styles, d as db, p as parser$1, D as DEFAULT_NESTED_DOC_DIR, a as DEFAULT_STATE_TYPE, b as DIVIDER_TYPE, S as STMT_RELATION, c as STMT_STATE } from "./styles-ca3715f6-BJWKCKia.js";
2
+ import { G as Graph } from "./graph-CXef_RHM.js";
3
+ import { v as log$1, r as getConfig, u as select, O as utils, w as configureSvgSize, C as common$1 } from "./MilkdownMarkdownEditor-CCiFOpuq.js";
4
+ import { r as render } from "./index-5325376f-0FtzFTBH.js";
5
+ import "./layout-CawlN23W.js";
6
+ import "./index-C_cgOzmt.js";
7
+ import "./clone-uoV60hcB.js";
8
+ import "./edges-96097737-CL7Yc4hz.js";
9
+ import "./createText-1719965b-BaRII2sm.js";
10
+ import "./line-C_cMMDTP.js";
11
11
  import "./array-DgktLKBx.js";
12
12
  import "./path-Cp2qmpkd.js";
13
13
  const SHAPE_STATE = "rect";
@@ -1,4 +1,4 @@
1
- import { H as getDiagramTitle, J as setDiagramTitle, m as setAccDescription, n as getAccDescription, o as getAccTitle, q as setAccTitle, r as getConfig, C as common$1, O as utils, v as log$1, M as clear$1, z as sanitizeText$2, aj as parseGenericTypes, u as select } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
1
+ import { H as getDiagramTitle, J as setDiagramTitle, m as setAccDescription, n as getAccDescription, o as getAccTitle, q as setAccTitle, r as getConfig, C as common$1, O as utils, v as log$1, M as clear$1, z as sanitizeText$2, aj as parseGenericTypes, u as select } from "./MilkdownMarkdownEditor-CCiFOpuq.js";
2
2
  var parser = function() {
3
3
  var o = function(k, v, o2, l) {
4
4
  for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
@@ -1,4 +1,4 @@
1
- import { H as getDiagramTitle, J as setDiagramTitle, m as setAccDescription, n as getAccDescription, q as setAccTitle, o as getAccTitle, r as getConfig, C as common$1, v as log$1, M as clear$1, ao as generateId } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
1
+ import { H as getDiagramTitle, J as setDiagramTitle, m as setAccDescription, n as getAccDescription, q as setAccTitle, o as getAccTitle, r as getConfig, C as common$1, v as log$1, M as clear$1, ao as generateId } from "./MilkdownMarkdownEditor-CCiFOpuq.js";
2
2
  var parser = function() {
3
3
  var o = function(k, v, o2, l) {
4
4
  for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
@@ -1,7 +1,7 @@
1
- import { aN as Selection, aO as root, aP as array, aQ as isPlainObject, aR as isFunction, v as log$1, r as getConfig, u as select, O as utils, ak as setupGraphViewbox$1, al as getStylesFromArray, am as interpolateToCurve, an as curveLinear, ah as renderKatexSanitized, C as common$1, S as evaluate, at as rgba } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
2
- import { G as Graph } from "./graph-DpC13d95.js";
3
- import { r as render } from "./index-5325376f-Bbs7Fbqr.js";
4
- import { c as channel } from "./channel-ZAmhHE3g.js";
1
+ import { aN as Selection, aO as root, aP as array, aQ as isPlainObject, aR as isFunction, v as log$1, r as getConfig, u as select, O as utils, ak as setupGraphViewbox$1, al as getStylesFromArray, am as interpolateToCurve, an as curveLinear, ah as renderKatexSanitized, C as common$1, S as evaluate, at as rgba } from "./MilkdownMarkdownEditor-CCiFOpuq.js";
2
+ import { G as Graph } from "./graph-CXef_RHM.js";
3
+ import { r as render } from "./index-5325376f-0FtzFTBH.js";
4
+ import { c as channel } from "./channel-xtutyETs.js";
5
5
  function selectAll(selector) {
6
6
  return typeof selector === "string" ? new Selection([document.querySelectorAll(selector)], [document.documentElement]) : new Selection([array(selector)], root);
7
7
  }
@@ -1,4 +1,4 @@
1
- import { G as lineBreakRegex, A as dist } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
1
+ import { G as lineBreakRegex, A as dist } from "./MilkdownMarkdownEditor-CCiFOpuq.js";
2
2
  const drawRect = (element, rectData) => {
3
3
  const rectElement = element.append("rect");
4
4
  rectElement.attr("x", rectData.x);
@@ -1,6 +1,6 @@
1
- import { r as getConfig, v as log$1, u as select, ak as setupGraphViewbox$1, ap as commonDb, aq as isDark, ar as lighten, as as darken, M as clear$1 } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
2
- import { a as arc } from "./arc-J47ePHZ2.js";
3
- import "./index-BqDyyRCx.js";
1
+ import { r as getConfig, v as log$1, u as select, ak as setupGraphViewbox$1, ap as commonDb, aq as isDark, ar as lighten, as as darken, M as clear$1 } from "./MilkdownMarkdownEditor-CCiFOpuq.js";
2
+ import { a as arc } from "./arc-BR5G9xaE.js";
3
+ import "./index-C_cgOzmt.js";
4
4
  import "./path-Cp2qmpkd.js";
5
5
  var parser = function() {
6
6
  var o = function(k, v, o2, l) {
@@ -1,10 +1,10 @@
1
- import { m as setAccDescription, n as getAccDescription, H as getDiagramTitle, J as setDiagramTitle, o as getAccTitle, q as setAccTitle, v as log$1, Z as selectSvgElement, w as configureSvgSize, M as clear$1, ai as getConfig$1, z as sanitizeText$2, aM as cleanAndMerge, ab as defaultConfig$2, ac as getThemeVariables$2 } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
2
- import { a as computeDimensionOfText } from "./createText-1719965b-Cji7KN4K.js";
1
+ import { m as setAccDescription, n as getAccDescription, H as getDiagramTitle, J as setDiagramTitle, o as getAccTitle, q as setAccTitle, v as log$1, Z as selectSvgElement, w as configureSvgSize, M as clear$1, ai as getConfig$1, z as sanitizeText$2, aM as cleanAndMerge, ab as defaultConfig$2, ac as getThemeVariables$2 } from "./MilkdownMarkdownEditor-CCiFOpuq.js";
2
+ import { a as computeDimensionOfText } from "./createText-1719965b-BaRII2sm.js";
3
3
  import { i as initRange } from "./init-ZxktEp_H.js";
4
4
  import { o as ordinal } from "./ordinal-DSZU4PqD.js";
5
- import { l as linear } from "./linear-DIg7lTe1.js";
6
- import { l as line } from "./line-CAgaGl-S.js";
7
- import "./index-BqDyyRCx.js";
5
+ import { l as linear } from "./linear-CnzgpVoT.js";
6
+ import { l as line } from "./line-C_cMMDTP.js";
7
+ import "./index-C_cgOzmt.js";
8
8
  import "./array-DgktLKBx.js";
9
9
  import "./path-Cp2qmpkd.js";
10
10
  function range(start, stop, step) {
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Research Pilot</title>
7
- <script type="module" crossorigin src="./assets/index-BqDyyRCx.js"></script>
7
+ <script type="module" crossorigin src="./assets/index-C_cgOzmt.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="./assets/index-C-_uCjZJ.css">
9
9
  </head>
10
10
  <body class="overflow-hidden">
package/bin/cli.mjs CHANGED
@@ -4,7 +4,6 @@
4
4
  * CLI entry point for Research Copilot.
5
5
  *
6
6
  * Usage:
7
- * npx research-copilot # Run directly
8
7
  * npm i -g research-copilot # Install globally
9
8
  * research-copilot # Then run anywhere
10
9
  */
@@ -13,21 +12,23 @@ import { spawn } from 'child_process'
13
12
  import { createRequire } from 'module'
14
13
  import { fileURLToPath } from 'url'
15
14
  import { dirname, join } from 'path'
16
- import { existsSync } from 'fs'
15
+ import { existsSync, chmodSync, readdirSync } from 'fs'
17
16
 
18
17
  const __filename = fileURLToPath(import.meta.url)
19
18
  const __dirname = dirname(__filename)
20
19
  const require = createRequire(import.meta.url)
21
20
 
22
- // Resolve the Electron binary from this package's node_modules
21
+ // Resolve the Electron binary
23
22
  let electronPath
24
23
  try {
25
- electronPath = require('electron')
24
+ electronPath = String(require('electron'))
26
25
  } catch {
27
- console.error(
28
- 'Error: Electron is not installed.\n' +
29
- 'Run: npm install\n'
30
- )
26
+ console.error('Error: Electron is not installed. Run: npm install')
27
+ process.exit(1)
28
+ }
29
+
30
+ if (!existsSync(electronPath)) {
31
+ console.error(`Error: Electron binary not found at ${electronPath}`)
31
32
  process.exit(1)
32
33
  }
33
34
 
@@ -36,21 +37,45 @@ const appDir = join(__dirname, '..', 'app')
36
37
  const mainEntry = join(appDir, 'out', 'main', 'index.mjs')
37
38
 
38
39
  if (!existsSync(mainEntry)) {
39
- console.error(
40
- 'Error: App has not been built yet.\n' +
41
- 'Run: npm run build\n'
42
- )
40
+ console.error(`Error: App not built. Expected: ${mainEntry}`)
43
41
  process.exit(1)
44
42
  }
45
43
 
44
+ // Fix node-pty spawn-helper permissions (npm strips executable bit during pack/install)
45
+ const ptyPrebuilds = join(__dirname, '..', 'node_modules', 'node-pty', 'prebuilds')
46
+ if (existsSync(ptyPrebuilds)) {
47
+ try {
48
+ for (const platform of readdirSync(ptyPrebuilds)) {
49
+ const helper = join(ptyPrebuilds, platform, 'spawn-helper')
50
+ if (existsSync(helper)) chmodSync(helper, 0o755)
51
+ }
52
+ } catch { /* best-effort */ }
53
+ }
54
+
55
+ console.log('Starting Research Copilot...')
56
+
57
+ // Ensure Electron's main process can resolve npm dependencies (e.g. node-pty)
58
+ // that live in the package root's node_modules, not inside app/.
59
+ const pkgNodeModules = join(__dirname, '..', 'node_modules')
60
+ const nodePath = process.env.NODE_PATH
61
+ ? `${pkgNodeModules}:${process.env.NODE_PATH}`
62
+ : pkgNodeModules
63
+
46
64
  // Launch Electron with the app directory
47
- const child = spawn(String(electronPath), [appDir], {
48
- stdio: 'inherit',
49
- env: { ...process.env },
65
+ const child = spawn(electronPath, [appDir], {
66
+ stdio: ['inherit', 'inherit', 'inherit'],
67
+ env: { ...process.env, NODE_PATH: nodePath },
68
+ })
69
+
70
+ child.on('close', (code) => {
71
+ process.exit(code ?? 0)
50
72
  })
51
73
 
52
- child.on('close', (code) => process.exit(code ?? 0))
53
74
  child.on('error', (err) => {
54
75
  console.error('Failed to start Electron:', err.message)
55
76
  process.exit(1)
56
77
  })
78
+
79
+ // Forward signals to Electron
80
+ process.on('SIGINT', () => child.kill('SIGINT'))
81
+ process.on('SIGTERM', () => child.kill('SIGTERM'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "research-copilot",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "AI-powered research assistant for scientists — literature search, data analysis, academic writing, and project management",
5
5
  "type": "module",
6
6
  "bin": {