@principal-ai/subsystems-studio 0.6.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.
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Bin shim for `@principal-ai/subsystems-studio`.
4
+ *
5
+ * Locates the platform-specific .app bundle shipped under `bundles/<os>-<arch>/`
6
+ * and execs its launcher with argv + env passthrough. macOS arm64 is the only
7
+ * platform packaged today; the package.json's `os`/`cpu` filters keep npm from
8
+ * installing it on others, but a defensive check here gives a clearer error if
9
+ * someone sets up an environment that bypasses those filters.
10
+ */
11
+
12
+ const { spawn } = require('node:child_process');
13
+ const { existsSync } = require('node:fs');
14
+ const { join } = require('node:path');
15
+
16
+ const platform = process.platform;
17
+ const arch = process.arch;
18
+
19
+ if (platform !== 'darwin' || arch !== 'arm64') {
20
+ process.stderr.write(
21
+ `subsystems-studio: no prebuilt bundle for ${platform}-${arch} yet. Currently only darwin-arm64 is shipped.\n`,
22
+ );
23
+ process.exit(1);
24
+ }
25
+
26
+ const bundleRoot = join(__dirname, '..', 'bundles', 'macos-arm64', 'subsystems-studio.app');
27
+ const launcher = join(bundleRoot, 'Contents', 'MacOS', 'launcher');
28
+
29
+ if (!existsSync(launcher)) {
30
+ process.stderr.write(
31
+ `subsystems-studio: launcher missing at ${launcher}. The package may have been installed without its bundle.\n`,
32
+ );
33
+ process.exit(1);
34
+ }
35
+
36
+ const child = spawn(launcher, process.argv.slice(2), {
37
+ stdio: 'inherit',
38
+ env: process.env,
39
+ });
40
+
41
+ child.on('error', (err) => {
42
+ process.stderr.write(`subsystems-studio: failed to launch — ${err.message}\n`);
43
+ process.exit(1);
44
+ });
45
+
46
+ child.on('exit', (code, signal) => {
47
+ if (signal) process.kill(process.pid, signal);
48
+ else process.exit(code ?? 0);
49
+ });
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleDisplayName</key>
6
+ <string>Principal Studio</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>launcher</string>
9
+ <key>CFBundleIconFile</key>
10
+ <string>AppIcon</string>
11
+ <key>CFBundleIdentifier</key>
12
+ <string>ai.principal.subsystems-studio</string>
13
+ <key>CFBundleName</key>
14
+ <string>Principal Studio</string>
15
+ <key>CFBundlePackageType</key>
16
+ <string>APPL</string>
17
+ <key>CFBundleVersion</key>
18
+ <string>0.1.0</string>
19
+ </dict>
20
+ </plist>