claude-space 2.0.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.
- package/README.md +165 -0
- package/bin/claude-space +122 -0
- package/bin/claude-space.js +59 -0
- package/out/main/index.js +3830 -0
- package/out/preload/index.js +250 -0
- package/out/renderer/assets/claudeFolderGenerator-BgGHew94.js +179 -0
- package/out/renderer/assets/index-C65XSohL.js +93249 -0
- package/out/renderer/assets/index-DEj3pJkQ.css +12262 -0
- package/out/renderer/index.html +20 -0
- package/package.json +81 -0
- package/resources/icon.png +0 -0
- package/scripts/create-release-assets.sh +54 -0
- package/scripts/postinstall.js +143 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<title>Claude Space</title>
|
|
6
|
+
<meta
|
|
7
|
+
http-equiv="Content-Security-Policy"
|
|
8
|
+
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: user:; font-src 'self' data: https://fonts.gstatic.com; media-src 'self' blob: data:"
|
|
9
|
+
/>
|
|
10
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
11
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
12
|
+
<link href="https://fonts.googleapis.com/css2?family=Architects+Daughter&display=swap" rel="stylesheet">
|
|
13
|
+
<script type="module" crossorigin src="./assets/index-C65XSohL.js"></script>
|
|
14
|
+
<link rel="stylesheet" crossorigin href="./assets/index-DEj3pJkQ.css">
|
|
15
|
+
</head>
|
|
16
|
+
|
|
17
|
+
<body>
|
|
18
|
+
<div id="app"></div>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-space",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"productName": "ClaudeSpace",
|
|
5
|
+
"description": "A visual agent workflow builder for Claude - distributed via npm",
|
|
6
|
+
"main": "./out/main/index.js",
|
|
7
|
+
"author": "BorisCorp",
|
|
8
|
+
"homepage": "https://github.com/BorisCorp/AgentBuilder",
|
|
9
|
+
"bin": {
|
|
10
|
+
"claude-space": "./bin/claude-space"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"bin/",
|
|
14
|
+
"out/main/",
|
|
15
|
+
"out/preload/",
|
|
16
|
+
"out/renderer/index.html",
|
|
17
|
+
"out/renderer/assets/*.js",
|
|
18
|
+
"out/renderer/assets/*.css",
|
|
19
|
+
"resources/icon.png",
|
|
20
|
+
"scripts/postinstall.js",
|
|
21
|
+
"scripts/create-release-assets.sh"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"format": "prettier --write .",
|
|
25
|
+
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.vue --fix",
|
|
26
|
+
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
|
27
|
+
"typecheck:web": "vue-tsc --noEmit -p tsconfig.web.json --composite false",
|
|
28
|
+
"typecheck": "npm run typecheck:node && npm run typecheck:web",
|
|
29
|
+
"start": "electron-vite preview",
|
|
30
|
+
"dev": "electron-vite dev",
|
|
31
|
+
"build": "npm run typecheck && electron-vite build",
|
|
32
|
+
"postinstall": "node scripts/postinstall.js",
|
|
33
|
+
"build:unpack": "npm run build && electron-builder --dir",
|
|
34
|
+
"build:win": "npm run build && electron-builder --win",
|
|
35
|
+
"build:mac": "npm run build && electron-builder --mac",
|
|
36
|
+
"build:linux": "npm run build && electron-builder --linux",
|
|
37
|
+
"build:npm": "npm run build && npm run package:npm && npm run copy:app",
|
|
38
|
+
"package:npm": "electron-builder --dir --config electron-builder.npm.yml",
|
|
39
|
+
"copy:app": "rm -rf app && mkdir -p app && cp -R dist-npm/mac-arm64/ClaudeSpace.app app/ 2>/dev/null || true",
|
|
40
|
+
"test:npm": "npm link && claude-space"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@anthropic-ai/claude-agent-sdk": "^0.1.59",
|
|
44
|
+
"@electron-toolkit/preload": "^3.0.0",
|
|
45
|
+
"@electron-toolkit/utils": "^4.0.0",
|
|
46
|
+
"@floating-ui/vue": "^1.1.9",
|
|
47
|
+
"@types/highlight.js": "^9.12.4",
|
|
48
|
+
"@types/markdown-it": "^14.1.2",
|
|
49
|
+
"@vue-flow/background": "^1.3.0",
|
|
50
|
+
"@vue-flow/controls": "^1.1.0",
|
|
51
|
+
"@vue-flow/core": "^1.33.0",
|
|
52
|
+
"@vue-flow/minimap": "^1.4.0",
|
|
53
|
+
"highlight.js": "^11.11.1",
|
|
54
|
+
"js-yaml": "^4.1.1",
|
|
55
|
+
"markdown-it": "^14.1.0",
|
|
56
|
+
"pinia": "^2.1.7",
|
|
57
|
+
"uuid": "^9.0.0"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@electron-toolkit/eslint-config": "^1.0.2",
|
|
61
|
+
"@electron-toolkit/eslint-config-ts": "^1.0.1",
|
|
62
|
+
"@electron-toolkit/tsconfig": "^1.0.1",
|
|
63
|
+
"@rushstack/eslint-patch": "^1.7.1",
|
|
64
|
+
"@types/js-yaml": "^4.0.9",
|
|
65
|
+
"@types/node": "^18.19.9",
|
|
66
|
+
"@types/uuid": "^9.0.0",
|
|
67
|
+
"@vitejs/plugin-vue": "^5.0.3",
|
|
68
|
+
"@vue/eslint-config-prettier": "^9.0.0",
|
|
69
|
+
"@vue/eslint-config-typescript": "^12.0.0",
|
|
70
|
+
"electron": "^28.2.0",
|
|
71
|
+
"electron-builder": "^24.9.1",
|
|
72
|
+
"electron-vite": "^2.0.0",
|
|
73
|
+
"eslint": "^8.56.0",
|
|
74
|
+
"eslint-plugin-vue": "^9.20.1",
|
|
75
|
+
"prettier": "^3.2.4",
|
|
76
|
+
"typescript": "^5.3.3",
|
|
77
|
+
"vite": "^5.0.12",
|
|
78
|
+
"vue": "^3.4.15",
|
|
79
|
+
"vue-tsc": "^3.2.1"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Script to create release assets for GitHub releases
|
|
4
|
+
# Run this script after building the app with: npm run build:npm
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
VERSION=$(node -p "require('./package.json').version")
|
|
9
|
+
echo "Creating release assets for version $VERSION..."
|
|
10
|
+
|
|
11
|
+
# Create releases directory
|
|
12
|
+
mkdir -p releases
|
|
13
|
+
|
|
14
|
+
# Create macOS archive
|
|
15
|
+
if [ -d "dist-npm/mac-arm64/ClaudeSpace.app" ]; then
|
|
16
|
+
echo "Creating macOS (arm64) archive..."
|
|
17
|
+
cd dist-npm/mac-arm64
|
|
18
|
+
zip -r ../../releases/ClaudeSpace-darwin-arm64.zip ClaudeSpace.app
|
|
19
|
+
cd ../..
|
|
20
|
+
echo "Created: releases/ClaudeSpace-darwin-arm64.zip"
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
if [ -d "dist-npm/mac-x64/ClaudeSpace.app" ]; then
|
|
24
|
+
echo "Creating macOS (x64) archive..."
|
|
25
|
+
cd dist-npm/mac-x64
|
|
26
|
+
zip -r ../../releases/ClaudeSpace-darwin-x64.zip ClaudeSpace.app
|
|
27
|
+
cd ../..
|
|
28
|
+
echo "Created: releases/ClaudeSpace-darwin-x64.zip"
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Create Windows archive (if exists)
|
|
32
|
+
if [ -d "dist-npm/win-unpacked" ]; then
|
|
33
|
+
echo "Creating Windows archive..."
|
|
34
|
+
cd dist-npm/win-unpacked
|
|
35
|
+
zip -r ../../releases/ClaudeSpace-win32-x64.zip .
|
|
36
|
+
cd ../..
|
|
37
|
+
echo "Created: releases/ClaudeSpace-win32-x64.zip"
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# Create Linux archive (if exists)
|
|
41
|
+
if [ -d "dist-npm/linux-unpacked" ]; then
|
|
42
|
+
echo "Creating Linux archive..."
|
|
43
|
+
cd dist-npm/linux-unpacked
|
|
44
|
+
tar -czf ../../releases/ClaudeSpace-linux-x64.tar.gz .
|
|
45
|
+
cd ../..
|
|
46
|
+
echo "Created: releases/ClaudeSpace-linux-x64.tar.gz"
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
echo ""
|
|
50
|
+
echo "Release assets created in ./releases/"
|
|
51
|
+
echo "Upload these files to GitHub release v$VERSION"
|
|
52
|
+
echo ""
|
|
53
|
+
echo "To create a GitHub release, run:"
|
|
54
|
+
echo " gh release create v$VERSION ./releases/* --title \"v$VERSION\" --notes \"Release notes here\""
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const https = require('https');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const { execSync } = require('child_process');
|
|
7
|
+
|
|
8
|
+
const GITHUB_REPO = 'BorisCorp/AgentBuilder'; // Update if different
|
|
9
|
+
const APP_NAME = 'ClaudeSpace';
|
|
10
|
+
|
|
11
|
+
function getPlatformInfo() {
|
|
12
|
+
const platform = process.platform;
|
|
13
|
+
const arch = process.arch;
|
|
14
|
+
|
|
15
|
+
if (platform === 'darwin') {
|
|
16
|
+
return { platform: 'darwin', arch, ext: 'zip', appDir: 'app' };
|
|
17
|
+
} else if (platform === 'win32') {
|
|
18
|
+
return { platform: 'win32', arch, ext: 'zip', appDir: 'app' };
|
|
19
|
+
} else if (platform === 'linux') {
|
|
20
|
+
return { platform: 'linux', arch, ext: 'tar.gz', appDir: 'app' };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
throw new Error(`Unsupported platform: ${platform}`);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function getDownloadUrl(version, platformInfo) {
|
|
27
|
+
// Construct GitHub release URL
|
|
28
|
+
// Format: https://github.com/BorisCorp/AgentBuilder/releases/download/v{version}/ClaudeSpace-{platform}-{arch}.{ext}
|
|
29
|
+
const { platform, arch, ext } = platformInfo;
|
|
30
|
+
return `https://github.com/${GITHUB_REPO}/releases/download/v${version}/${APP_NAME}-${platform}-${arch}.${ext}`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function downloadFile(url, dest) {
|
|
34
|
+
return new Promise((resolve, reject) => {
|
|
35
|
+
console.log(`Downloading ${APP_NAME} from ${url}...`);
|
|
36
|
+
|
|
37
|
+
const file = fs.createWriteStream(dest);
|
|
38
|
+
|
|
39
|
+
https.get(url, (response) => {
|
|
40
|
+
if (response.statusCode === 302 || response.statusCode === 301) {
|
|
41
|
+
// Follow redirect
|
|
42
|
+
https.get(response.headers.location, (redirectResponse) => {
|
|
43
|
+
redirectResponse.pipe(file);
|
|
44
|
+
file.on('finish', () => {
|
|
45
|
+
file.close();
|
|
46
|
+
console.log('Download complete!');
|
|
47
|
+
resolve();
|
|
48
|
+
});
|
|
49
|
+
}).on('error', (err) => {
|
|
50
|
+
fs.unlink(dest, () => {});
|
|
51
|
+
reject(err);
|
|
52
|
+
});
|
|
53
|
+
} else if (response.statusCode === 200) {
|
|
54
|
+
response.pipe(file);
|
|
55
|
+
file.on('finish', () => {
|
|
56
|
+
file.close();
|
|
57
|
+
console.log('Download complete!');
|
|
58
|
+
resolve();
|
|
59
|
+
});
|
|
60
|
+
} else {
|
|
61
|
+
reject(new Error(`Failed to download: ${response.statusCode}`));
|
|
62
|
+
}
|
|
63
|
+
}).on('error', (err) => {
|
|
64
|
+
fs.unlink(dest, () => {});
|
|
65
|
+
reject(err);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function extractArchive(archivePath, destDir, platformInfo) {
|
|
71
|
+
console.log(`Extracting to ${destDir}...`);
|
|
72
|
+
|
|
73
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
74
|
+
|
|
75
|
+
if (platformInfo.ext === 'zip') {
|
|
76
|
+
// Use unzip on macOS/Linux, or built-in on Windows
|
|
77
|
+
if (process.platform === 'win32') {
|
|
78
|
+
execSync(`powershell -command "Expand-Archive -Path '${archivePath}' -DestinationPath '${destDir}' -Force"`, { stdio: 'inherit' });
|
|
79
|
+
} else {
|
|
80
|
+
execSync(`unzip -q "${archivePath}" -d "${destDir}"`, { stdio: 'inherit' });
|
|
81
|
+
}
|
|
82
|
+
} else if (platformInfo.ext === 'tar.gz') {
|
|
83
|
+
execSync(`tar -xzf "${archivePath}" -C "${destDir}"`, { stdio: 'inherit' });
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
console.log('Extraction complete!');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async function main() {
|
|
90
|
+
try {
|
|
91
|
+
// Check if app already exists (skip download in development)
|
|
92
|
+
const appDir = path.join(__dirname, '..', 'app');
|
|
93
|
+
if (fs.existsSync(appDir)) {
|
|
94
|
+
console.log(`${APP_NAME} app already exists, skipping download.`);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Check if local development build exists
|
|
99
|
+
const platformInfo = getPlatformInfo();
|
|
100
|
+
const localBuildPath = path.join(__dirname, '..', 'dist-npm',
|
|
101
|
+
platformInfo.platform === 'darwin' ? `mac-${platformInfo.arch}` :
|
|
102
|
+
platformInfo.platform === 'win32' ? 'win-unpacked' : 'linux-unpacked');
|
|
103
|
+
|
|
104
|
+
if (fs.existsSync(localBuildPath)) {
|
|
105
|
+
console.log('Development mode: copying from local build...');
|
|
106
|
+
fs.mkdirSync(appDir, { recursive: true });
|
|
107
|
+
|
|
108
|
+
if (platformInfo.platform === 'darwin') {
|
|
109
|
+
const appPath = path.join(localBuildPath, `${APP_NAME}.app`);
|
|
110
|
+
if (fs.existsSync(appPath)) {
|
|
111
|
+
execSync(`cp -R "${appPath}" "${appDir}/"`, { stdio: 'inherit' });
|
|
112
|
+
console.log(`${APP_NAME} copied from local build successfully!`);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Download from GitHub releases
|
|
119
|
+
const packageJson = require('../package.json');
|
|
120
|
+
const version = packageJson.version;
|
|
121
|
+
|
|
122
|
+
console.log(`Installing ${APP_NAME} v${version} for ${platformInfo.platform}-${platformInfo.arch}...`);
|
|
123
|
+
|
|
124
|
+
const downloadUrl = getDownloadUrl(version, platformInfo);
|
|
125
|
+
const archivePath = path.join(__dirname, '..', `${APP_NAME}-temp.${platformInfo.ext}`);
|
|
126
|
+
|
|
127
|
+
await downloadFile(downloadUrl, archivePath);
|
|
128
|
+
extractArchive(archivePath, appDir, platformInfo);
|
|
129
|
+
|
|
130
|
+
// Cleanup
|
|
131
|
+
fs.unlinkSync(archivePath);
|
|
132
|
+
|
|
133
|
+
console.log(`${APP_NAME} installed successfully!`);
|
|
134
|
+
} catch (error) {
|
|
135
|
+
console.error('Installation failed:', error.message);
|
|
136
|
+
console.error('\nYou may need to build the app locally or download it manually.');
|
|
137
|
+
console.error(`Visit: https://github.com/${GITHUB_REPO}/releases`);
|
|
138
|
+
// Don't fail the install completely - allow development usage
|
|
139
|
+
process.exit(0);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
main();
|