@quolu/aishell 0.1.0 → 0.1.1
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
CHANGED
|
@@ -23,10 +23,10 @@ AIがshell、Terminal、AppleScript、JXAを介さず、SwiftのmacOS APIを通
|
|
|
23
23
|
|
|
24
24
|
```text
|
|
25
25
|
npm install -g @quolu/aishell
|
|
26
|
-
open
|
|
26
|
+
aishell-open
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
global installは `
|
|
29
|
+
global installは `aishell-mcp` と `aishell-open` をPATHへ追加する。`aishell-open` はnpm package内の管理アプリをLaunchServicesで開く。install scriptは実行しない。現在はDeveloper ID署名・notarization前の実験版である。
|
|
30
30
|
|
|
31
31
|
### ソースから起動
|
|
32
32
|
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
<key>CFBundlePackageType</key>
|
|
18
18
|
<string>APPL</string>
|
|
19
19
|
<key>CFBundleShortVersionString</key>
|
|
20
|
-
<string>0.1.
|
|
20
|
+
<string>0.1.1</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>
|
|
22
|
+
<string>2</string>
|
|
23
23
|
<key>LSApplicationCategoryType</key>
|
|
24
24
|
<string>public.app-category.utilities</string>
|
|
25
25
|
<key>LSMinimumSystemVersion</key>
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quolu/aishell",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A native macOS MCP server for direct file, app, and development tool operations without a shell",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "quolu",
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
"arm64"
|
|
27
27
|
],
|
|
28
28
|
"bin": {
|
|
29
|
-
"aishell-mcp": "dist/AIShell.app/Contents/Helpers/aishell-mcp"
|
|
29
|
+
"aishell-mcp": "dist/AIShell.app/Contents/Helpers/aishell-mcp",
|
|
30
|
+
"aishell-open": "scripts/aishell-open.mjs"
|
|
30
31
|
},
|
|
31
32
|
"files": [
|
|
32
33
|
"dist/AIShell.app",
|
|
33
|
-
"scripts/
|
|
34
|
+
"scripts/aishell-open.mjs",
|
|
34
35
|
"README.md"
|
|
35
36
|
],
|
|
36
37
|
"scripts": {
|
|
37
38
|
"build:npm": "node scripts/prepare-npm-release.mjs",
|
|
38
39
|
"prepack": "npm run build:npm",
|
|
39
|
-
"postinstall": "node scripts/install-npm-app.mjs",
|
|
40
40
|
"test": "swift test",
|
|
41
41
|
"test:package": "npm run build:npm && node scripts/verify-npm-package.mjs"
|
|
42
42
|
},
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
|
|
7
|
+
const scriptDirectory = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const packageDirectory = path.dirname(scriptDirectory);
|
|
9
|
+
const appPath = path.join(packageDirectory, "dist", "AIShell.app");
|
|
10
|
+
|
|
11
|
+
const result = spawnSync("/usr/bin/open", [appPath], {
|
|
12
|
+
stdio: "inherit"
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
if (result.error) {
|
|
16
|
+
throw result.error;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (result.status !== 0) {
|
|
20
|
+
throw new Error(`AIShell.app launch failed with status ${result.status}`);
|
|
21
|
+
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { access, mkdir, rename, rm } from "node:fs/promises";
|
|
4
|
-
import { spawnSync } from "node:child_process";
|
|
5
|
-
import os from "node:os";
|
|
6
|
-
import path from "node:path";
|
|
7
|
-
import { fileURLToPath } from "node:url";
|
|
8
|
-
|
|
9
|
-
if (process.env.npm_config_global !== "true") {
|
|
10
|
-
console.log("AIShell.app installation skipped because this is not a global npm install.");
|
|
11
|
-
process.exit(0);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const scriptDirectory = path.dirname(fileURLToPath(import.meta.url));
|
|
15
|
-
const packageDirectory = path.dirname(scriptDirectory);
|
|
16
|
-
const sourceApp = path.join(packageDirectory, "dist", "AIShell.app");
|
|
17
|
-
const applicationsDirectory = process.env.AISHELL_APPLICATIONS_DIR
|
|
18
|
-
? path.resolve(process.env.AISHELL_APPLICATIONS_DIR)
|
|
19
|
-
: path.join(os.homedir(), "Applications");
|
|
20
|
-
const targetApp = path.join(applicationsDirectory, "AIShell.app");
|
|
21
|
-
const temporaryApp = path.join(applicationsDirectory, `.AIShell.installing-${process.pid}.app`);
|
|
22
|
-
const previousApp = path.join(applicationsDirectory, "AIShell.previous.app");
|
|
23
|
-
|
|
24
|
-
await access(sourceApp);
|
|
25
|
-
await mkdir(applicationsDirectory, { recursive: true });
|
|
26
|
-
await rm(temporaryApp, { recursive: true, force: true });
|
|
27
|
-
|
|
28
|
-
const copy = spawnSync("/usr/bin/ditto", [sourceApp, temporaryApp], {
|
|
29
|
-
stdio: "inherit"
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
if (copy.error) {
|
|
33
|
-
throw copy.error;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (copy.status !== 0) {
|
|
37
|
-
throw new Error(`AIShell.app copy failed with status ${copy.status}`);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
let hadPreviousInstallation = false;
|
|
41
|
-
|
|
42
|
-
try {
|
|
43
|
-
await access(targetApp);
|
|
44
|
-
hadPreviousInstallation = true;
|
|
45
|
-
} catch {
|
|
46
|
-
hadPreviousInstallation = false;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (hadPreviousInstallation) {
|
|
50
|
-
await rm(previousApp, { recursive: true, force: true });
|
|
51
|
-
await rename(targetApp, previousApp);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
try {
|
|
55
|
-
await rename(temporaryApp, targetApp);
|
|
56
|
-
} catch (error) {
|
|
57
|
-
if (hadPreviousInstallation) {
|
|
58
|
-
await rename(previousApp, targetApp);
|
|
59
|
-
}
|
|
60
|
-
throw error;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
console.log(`Installed AIShell.app at ${targetApp}`);
|