@dmsdc-ai/aterm 0.1.91 → 0.1.93

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 (2) hide show
  1. package/bin/aterm.js +14 -11
  2. package/package.json +2 -2
package/bin/aterm.js CHANGED
@@ -51,17 +51,20 @@ env.AIGENTRY_PROJECT_ROOT = resolvedConfig.projectRoot;
51
51
  env.AIGENTRY_PROJECT_AIGENTRY_ROOT = resolvedConfig.projectAigentryRoot;
52
52
 
53
53
  // Single instance: if aterm is already running, activate and exit
54
- try {
55
- execFileSync('pgrep', ['-f', 'aterm.app/Contents/MacOS/aterm'], {
56
- encoding: 'utf8',
57
- stdio: ['pipe', 'pipe', 'pipe'],
58
- });
59
- // pgrep succeeded → aterm is running
60
- console.log('[aterm] already running, activating existing instance');
61
- try { execFileSync('open', [appRoot]); } catch {}
62
- process.exit(0);
63
- } catch {
64
- // pgrep exit 1 = not running, proceed to launch
54
+ // Skip in sandbox mode (ATERM_DATA_ROOT set) — always launch new instance
55
+ if (!process.env.ATERM_DATA_ROOT) {
56
+ try {
57
+ execFileSync('pgrep', ['-f', 'aterm.app/Contents/MacOS/aterm'], {
58
+ encoding: 'utf8',
59
+ stdio: ['pipe', 'pipe', 'pipe'],
60
+ });
61
+ // pgrep succeeded aterm is running
62
+ console.log('[aterm] already running, activating existing instance');
63
+ try { execFileSync('open', [appRoot]); } catch {}
64
+ process.exit(0);
65
+ } catch {
66
+ // pgrep exit 1 = not running, proceed to launch
67
+ }
65
68
  }
66
69
 
67
70
  const child = spawn(executable, process.argv.slice(2), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmsdc-ai/aterm",
3
- "version": "0.1.91",
3
+ "version": "0.1.93",
4
4
  "description": "Native aterm launcher package",
5
5
  "type": "module",
6
6
  "main": "./bin/aterm.js",
@@ -17,7 +17,7 @@
17
17
  "package.json"
18
18
  ],
19
19
  "optionalDependencies": {
20
- "@dmsdc-ai/aterm-darwin-arm64": "0.1.91"
20
+ "@dmsdc-ai/aterm-darwin-arm64": "0.1.93"
21
21
  },
22
22
  "dependencies": {
23
23
  "@dmsdc-ai/aigentry-devkit": ">=0.0.19",