forked from chaitanyagiri/munder-difflin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelectron-builder.yml
More file actions
129 lines (116 loc) · 5.66 KB
/
Copy pathelectron-builder.yml
File metadata and controls
129 lines (116 loc) · 5.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
appId: in.munderdiffl.app
productName: Munder Difflin
copyright: Copyright © 2026 Chaitanya Giri
# Notarize + staple after signing, but only when APPLE_* creds are in the env
# (the hook no-ops otherwise, so contributor builds still work). Root-level hook.
afterSign: build/notarize.cjs
# Register the munderdifflin:// URL scheme (shareable-hires deep link) in the
# packaged app: CFBundleURLTypes on macOS, registry entries via NSIS on Windows.
protocols:
- name: Munder Difflin
schemes:
- munderdifflin
# electron-vite emits the app into out/; package exactly that plus what the
# runtime needs. node-pty is native, so keep it out of the asar.
directories:
output: dist
buildResources: build
files:
- out/**
- package.json
- "!**/*.{md,map,ts,tsx}"
- "!**/{.eslintrc,.prettierrc,tsconfig*.json,electron.vite.config.*}"
# Ship the standalone Slack reply helper as a plain file under the app's
# resources dir (process.resourcesPath). It runs under `node`, NOT inside the
# asar, so the office worker can invoke `node <resources>/md-slack-reply.cjs`.
extraResources:
- from: resources/md-slack-reply.cjs
to: md-slack-reply.cjs
# Knowledge Graph agent CLI + its pure-JS core. Agents invoke `node
# <resources>/kg.cjs` out-of-process; kg-core.cjs ships beside it so the CLI's
# `require('./kg-core.cjs')` resolves outside the asar.
- from: resources/kg.cjs
to: kg.cjs
- from: src/main/kg-core.cjs
to: kg-core.cjs
# Bundled default skills (read-only/no-secret). copyBundledSkills() reads these
# from skillsResourceDir() = <process.resourcesPath>/skills in the packaged app
# and refreshes each agent's .claude/skills/ per spawn (dev resolves to
# repo resources/skills). Directory copy preserves the <id>/SKILL.md tree.
- from: resources/skills
to: skills
asarUnpack:
- "**/node_modules/node-pty/**"
# better-sqlite3 is native (bindings/prebuild need the .node on the real FS).
- "**/node_modules/better-sqlite3/**"
# Rebuild native deps (node-pty) for the target during packaging.
npmRebuild: true
# ---- macOS ----
mac:
category: public.app-category.developer-tools
icon: build/icon.icns
# Declare WHY the app touches the user's folders. macOS shows these strings in
# the privacy prompt and, for a signed app, remembers the grant — so the user
# is asked ONCE instead of on every agent action.
extendInfo:
NSDocumentsFolderUsageDescription: "Munder Difflin runs your Claude Code agents, which read and write files in the project folders you point them at."
NSDesktopFolderUsageDescription: "Munder Difflin's agents may work on projects located on your Desktop."
NSDownloadsFolderUsageDescription: "Munder Difflin's agents may work on projects located in your Downloads."
NSRemovableVolumesUsageDescription: "Munder Difflin's agents may work on projects located on external volumes."
NSNetworkVolumesUsageDescription: "Munder Difflin's agents may work on projects located on network volumes."
# The microphone is used by two opt-in, off-by-default voice features: Free
# Flow dictation (Groq transcription) and Realtime Michael (live voice chat
# with the orchestrator via OpenAI). Mic access only happens while one is on.
NSMicrophoneUsageDescription: "Munder Difflin uses your microphone only for its opt-in voice features: Free Flow dictation (transcribed by Groq into the message queue) and talking to Michael in real time (streamed to OpenAI). The mic is off unless you turn one of these on."
# Hardened runtime + entitlements so the spawned `claude` agents inherit this
# app's TCC responsibility (one grant covers them all) and node-pty can load.
hardenedRuntime: true
entitlements: build/entitlements.mac.plist
entitlementsInherit: build/entitlements.mac.plist
gatekeeperAssess: false
# Disable electron-builder's BUILT-IN notarization. It auto-triggers whenever the
# APPLE_* env vars are present and runs inside signApp — a path our afterSign hook's
# try/catch can't guard, so a bad-credential failure there hard-fails the whole
# release (exactly what bit us). Instead, the root-level `afterSign: build/notarize.cjs`
# hook does notarization best-effort: it tries, and on failure ships the signed (un-
# notarized) build rather than sinking the cross-platform release. Notarization
# resumes automatically once the APPLE_* secrets are valid — no further changes.
notarize: false
# Signing: TCC binds a remembered grant to a STABLE code signature, so a signed
# build is asked for folder access ONCE. The "Developer ID Application" cert is
# auto-discovered from the login keychain (CSC_IDENTITY_AUTO_DISCOVERY). If no
# cert is found, electron-builder warns and produces an unsigned build, so
# contributors without an Apple account can still build.
# To sign: install your "Developer ID Application" cert into the keychain.
# (Override with CSC_LINK=<path-to.p12> + CSC_KEY_PASSWORD for CI.)
# Notarization happens in the root-level `afterSign` hook (top of this file).
target:
- target: dmg
arch: [universal]
artifactName: Munder-Difflin-${version}-mac-${arch}.dmg
dmg:
title: Munder Difflin ${version}
# ---- Windows ----
win:
icon: build/icon.ico
target:
- target: nsis
arch: [x64]
- target: portable
arch: [x64]
nsis:
oneClick: false
perMachine: false
allowToChangeInstallationDirectory: true
artifactName: Munder-Difflin-${version}-win-x64-setup.exe
shortcutName: Munder Difflin
portable:
artifactName: Munder-Difflin-${version}-win-x64-portable.exe
# ---- Linux ----
linux:
category: Development
icon: build/icon.png
target:
- target: AppImage
arch: [x64]
artifactName: Munder-Difflin-${version}-linux-x86_64.AppImage