cowork-os 0.3.59 → 0.3.62
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 +11 -7
- package/package.json +5 -5
- package/scripts/setup_native.mjs +50 -7
package/README.md
CHANGED
|
@@ -44,8 +44,8 @@ Your AI needs a secure home. CoWork OS provides the runtime, security layers, an
|
|
|
44
44
|
|
|
45
45
|
### macOS App (Recommended)
|
|
46
46
|
|
|
47
|
-
- Download
|
|
48
|
-
-
|
|
47
|
+
- Download the latest build from [GitHub Releases](https://github.com/CoWork-OS/CoWork-OS/releases/latest)
|
|
48
|
+
- In Assets, download the newest Apple Silicon DMG (`CoWork-OS-<version>-arm64.dmg`)
|
|
49
49
|
- Open the `.dmg` and drag **CoWork OS** into **Applications**
|
|
50
50
|
- Eject the mounted DMG after copying, then launch only **/Applications/CoWork OS.app** (prevents duplicate app instances/icons)
|
|
51
51
|
- This app is currently distributed as an unsigned build. On first launch, use **System Settings > Privacy & Security > Open Anyway** once.
|
|
@@ -53,11 +53,11 @@ Your AI needs a secure home. CoWork OS provides the runtime, security layers, an
|
|
|
53
53
|
- If the app closes immediately with a `dyld` signature error, run: `codesign --force --deep --sign - "/Applications/CoWork OS.app"`
|
|
54
54
|
- `spctl --add` / `spctl --enable` are deprecated on newer macOS and may show "This operation is no longer supported"
|
|
55
55
|
|
|
56
|
-
### From Source (Development)
|
|
56
|
+
### From GitHub Source (Development)
|
|
57
57
|
|
|
58
58
|
#### Prerequisites
|
|
59
59
|
|
|
60
|
-
- Node.js
|
|
60
|
+
- Node.js 22+ and npm
|
|
61
61
|
- macOS 12 (Monterey) or later
|
|
62
62
|
- One of: any supported LLM provider credentials (API key/token or AWS credentials) or Ollama installed locally
|
|
63
63
|
- Xcode Command Line Tools (needed to build `better-sqlite3` for Electron): `xcode-select --install`
|
|
@@ -67,7 +67,7 @@ Your AI needs a secure home. CoWork OS provides the runtime, security layers, an
|
|
|
67
67
|
git clone https://github.com/CoWork-OS/CoWork-OS.git
|
|
68
68
|
cd CoWork-OS
|
|
69
69
|
|
|
70
|
-
# Install dependencies and set up native modules
|
|
70
|
+
# Install dependencies and set up native modules (includes automatic macOS retry handling)
|
|
71
71
|
npm run setup
|
|
72
72
|
|
|
73
73
|
# Run in development mode
|
|
@@ -78,9 +78,13 @@ npm run dev
|
|
|
78
78
|
|
|
79
79
|
#### Troubleshooting: macOS "Killed: 9" during setup
|
|
80
80
|
|
|
81
|
-
If
|
|
81
|
+
If you see `Killed: 9` during `npm run setup`, macOS terminated a native build due to memory pressure.
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
`npm run setup` already retries native setup automatically with backoff. Let it continue until it exits. If it still exits non-zero, close heavy apps and run the same command again:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm run setup
|
|
87
|
+
```
|
|
84
88
|
|
|
85
89
|
#### Build for Production
|
|
86
90
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cowork-os",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.62",
|
|
4
4
|
"description": "CoWork OS - The operating system for personal AI assistants",
|
|
5
5
|
"overrides": {
|
|
6
6
|
"undici": "^7.0.0"
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
"setup": "npm install --no-audit --no-fund && { sleep 2; i=1; max=${COWORK_SETUP_NATIVE_OUTER_ATTEMPTS:-6}; delay=2; while [ $i -le $max ]; do echo \"[cowork] setup:native (outer attempt $i/$max)\"; sh scripts/setup_native_retry.sh; s=$?; if [ $s -eq 0 ]; then exit 0; fi; if [ $s -ne 137 ] && [ $s -ne 9 ]; then exit $s; fi; echo \"[cowork] setup:native was killed; retrying in ${delay}s...\"; sleep $delay; delay=$((delay * 2)); if [ $delay -gt 20 ]; then delay=20; fi; i=$((i + 1)); done; exit $s; }",
|
|
44
44
|
"setup:native": "sleep 2; i=1; max=${COWORK_SETUP_NATIVE_OUTER_ATTEMPTS:-6}; delay=2; while [ $i -le $max ]; do echo \"[cowork] setup:native (outer attempt $i/$max)\"; sh scripts/setup_native_retry.sh; s=$?; if [ $s -eq 0 ]; then exit 0; fi; if [ $s -ne 137 ] && [ $s -ne 9 ]; then exit $s; fi; echo \"[cowork] setup:native was killed; retrying in ${delay}s...\"; sleep $delay; delay=$((delay * 2)); if [ $delay -gt 20 ]; then delay=20; fi; i=$((i + 1)); done; exit $s",
|
|
45
45
|
"setup:server": "npm install && npm rebuild --ignore-scripts=false better-sqlite3",
|
|
46
|
-
"postinstall": "electron-rebuild -f -w better-sqlite3",
|
|
47
46
|
"dev": "concurrently \"npm run dev:react\" \"npm run dev:electron\"",
|
|
48
47
|
"dev:react": "vite",
|
|
49
48
|
"dev:electron": "tsc -p tsconfig.electron.json && cross-env NODE_ENV=development electron .",
|
|
@@ -70,8 +69,7 @@
|
|
|
70
69
|
"@pydantic/monty": "^0.0.4",
|
|
71
70
|
"@slack/bolt": "^4.6.0",
|
|
72
71
|
"@types/jszip": "^3.4.1",
|
|
73
|
-
"@whiskeysockets/baileys": "
|
|
74
|
-
"better-sqlite3": "^12.6.2",
|
|
72
|
+
"@whiskeysockets/baileys": "6.7.16",
|
|
75
73
|
"botbuilder": "^4.23.3",
|
|
76
74
|
"chokidar": "^5.0.0",
|
|
77
75
|
"discord.js": "^14.25.1",
|
|
@@ -99,6 +97,9 @@
|
|
|
99
97
|
"ws": "^8.18.0",
|
|
100
98
|
"zod": "^4.3.6"
|
|
101
99
|
},
|
|
100
|
+
"optionalDependencies": {
|
|
101
|
+
"better-sqlite3": "12.6.2"
|
|
102
|
+
},
|
|
102
103
|
"devDependencies": {
|
|
103
104
|
"@electron/rebuild": "^4.0.3",
|
|
104
105
|
"@types/better-sqlite3": "^7.6.8",
|
|
@@ -118,7 +119,6 @@
|
|
|
118
119
|
"cross-env": "^10.1.0",
|
|
119
120
|
"electron": "^40.1.0",
|
|
120
121
|
"electron-builder": "^26.7.0",
|
|
121
|
-
"electron-rebuild": "^3.2.9",
|
|
122
122
|
"eslint": "^9.39.2",
|
|
123
123
|
"globals": "^17.3.0",
|
|
124
124
|
"typescript": "^5.7.3",
|
package/scripts/setup_native.mjs
CHANGED
|
@@ -21,6 +21,8 @@ import os from "node:os";
|
|
|
21
21
|
import path from "node:path";
|
|
22
22
|
import process from "node:process";
|
|
23
23
|
|
|
24
|
+
const BETTER_SQLITE3_VERSION = "12.6.2";
|
|
25
|
+
|
|
24
26
|
function run(cmd, args, opts = {}) {
|
|
25
27
|
const pretty = [cmd, ...(args || [])].join(" ");
|
|
26
28
|
console.log(`\n[cowork] $ ${pretty}`);
|
|
@@ -94,6 +96,35 @@ function testBetterSqlite3InElectron(env) {
|
|
|
94
96
|
return res;
|
|
95
97
|
}
|
|
96
98
|
|
|
99
|
+
function ensureBetterSqlite3(env) {
|
|
100
|
+
const pkgPath = path.join(
|
|
101
|
+
process.cwd(),
|
|
102
|
+
"node_modules",
|
|
103
|
+
"better-sqlite3",
|
|
104
|
+
"package.json"
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
if (fs.existsSync(pkgPath)) {
|
|
108
|
+
return { status: 0, signal: null };
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
console.log(
|
|
112
|
+
`[cowork] better-sqlite3 is missing; installing ${BETTER_SQLITE3_VERSION}...`
|
|
113
|
+
);
|
|
114
|
+
return run(
|
|
115
|
+
"npm",
|
|
116
|
+
[
|
|
117
|
+
"install",
|
|
118
|
+
"--no-audit",
|
|
119
|
+
"--no-fund",
|
|
120
|
+
"--ignore-scripts=false",
|
|
121
|
+
"--no-save",
|
|
122
|
+
`better-sqlite3@${BETTER_SQLITE3_VERSION}`,
|
|
123
|
+
],
|
|
124
|
+
{ env }
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
97
128
|
function fail(res, context) {
|
|
98
129
|
const sig = res.signal ? ` (signal ${res.signal})` : "";
|
|
99
130
|
const code =
|
|
@@ -151,6 +182,10 @@ function main() {
|
|
|
151
182
|
});
|
|
152
183
|
if (installRes.status !== 0) return installRes;
|
|
153
184
|
|
|
185
|
+
// If optional dependency install was skipped/failed earlier, recover here.
|
|
186
|
+
const ensureBetterRes = ensureBetterSqlite3(env);
|
|
187
|
+
if (ensureBetterRes.status !== 0) return ensureBetterRes;
|
|
188
|
+
|
|
154
189
|
const electronVersion = getElectronVersion();
|
|
155
190
|
const electronAbi = getElectronModulesAbi(env);
|
|
156
191
|
|
|
@@ -193,15 +228,23 @@ function main() {
|
|
|
193
228
|
}
|
|
194
229
|
|
|
195
230
|
// 3) Fallback: electron-rebuild (most expensive). Keep it sequential and only rebuild the one module.
|
|
231
|
+
const electronRebuildCli = path.join(
|
|
232
|
+
"node_modules",
|
|
233
|
+
"@electron",
|
|
234
|
+
"rebuild",
|
|
235
|
+
"lib",
|
|
236
|
+
"cli.js"
|
|
237
|
+
);
|
|
238
|
+
if (!fs.existsSync(electronRebuildCli)) {
|
|
239
|
+
console.log(
|
|
240
|
+
"[cowork] @electron/rebuild is not installed; skipping fallback rebuild."
|
|
241
|
+
);
|
|
242
|
+
return testBetterSqlite3InElectron(env);
|
|
243
|
+
}
|
|
244
|
+
|
|
196
245
|
const rebuildRes = run(
|
|
197
246
|
process.execPath,
|
|
198
|
-
[
|
|
199
|
-
"node_modules/@electron/rebuild/lib/cli.js",
|
|
200
|
-
"-f",
|
|
201
|
-
"--only",
|
|
202
|
-
"better-sqlite3",
|
|
203
|
-
"--sequential",
|
|
204
|
-
],
|
|
247
|
+
[electronRebuildCli, "-f", "--only", "better-sqlite3", "--sequential"],
|
|
205
248
|
{ env }
|
|
206
249
|
);
|
|
207
250
|
if (rebuildRes.status !== 0) return rebuildRes;
|