Skip to content

armgit / Orkas

Public Imported from GitHub
0

Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.

Restore macOS ad-hoc codesign script + pin esbuild arm64 as optional dep

aiservice5f60dc075573
diff --git a/package-lock.json b/package-lock.json
index c4700299..59e35c7d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -28,6 +28,9 @@
"electron": "^32.0.0",
"typescript": "^6.0.3",
"vitest": "^4.1.5"
+ },
+ "optionalDependencies": {
+ "@esbuild/darwin-arm64": "^0.27.7"
}
},
"node_modules/@anthropic-ai/sdk": {
diff --git a/scripts/codesign-adhoc.cjs b/scripts/codesign-adhoc.cjs
new file mode 100644
index 00000000..7183ac5a
--- /dev/null
+++ b/scripts/codesign-adhoc.cjs
@@ -0,0 +1,24 @@
+/**
+ * electron-builder afterPack hook —— 在 macOS 包最终生成前,对整个 .app
+ * bundle 跑 ad-hoc codesign。**Why**:没有 Apple Developer ID 时,
+ * electron-builder 会跳过签名,产出的 .app 从 dmg 拷出来后被 macOS
+ * Gatekeeper(13+)直接判"已损坏",连"无法验证开发者"对话框都跳过。
+ * Ad-hoc 签名让 bundle 至少有一个完整的签名结构,Gatekeeper 退化成
+ * "未验证开发者",用户右键 → 打开一次就放行。
+ *
+ * 仅 darwin 平台生效;其它 platform no-op。Windows / Linux 出包不受影响。
+ */
+'use strict';
+
+const { execSync } = require('node:child_process');
+const path = require('node:path');
+
+module.exports = async function afterPack(context) {
+ if (context.electronPlatformName !== 'darwin') return;
+ const appName = context.packager.appInfo.productFilename;
+ const appPath = path.join(context.appOutDir, `${appName}.app`);
+ console.log(`[codesign-adhoc] signing ${appPath}`);
+ execSync(`codesign --force --deep --sign - "${appPath}"`, { stdio: 'inherit' });
+ // 校验签名(失败时直接 throw 中断 build,避免发出未签的包)
+ execSync(`codesign --verify --deep "${appPath}"`, { stdio: 'inherit' });
+};