Repository navigation
Expand file tree
/
Copy pathelectron-builder.yml
More file actions
211 lines (211 loc) · 9.84 KB
/
Copy pathelectron-builder.yml
File metadata and controls
211 lines (211 loc) · 9.84 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# Single build is the pro-capable one (license-gated). Keep the `.pro` bundle id so
# existing Pro installs auto-update into it (bundle id + granted TCC permissions match).
extends: scripts/config/electron-builder-runtime.yml
appId: co.getoffgridai.desktop.pro
productName: Off Grid AI Desktop
copyright: © Off Grid AI
# This hook runs before electron-builder emits artifactCreated, which is the event
# that schedules publishing. A truncated DMG therefore cannot reach GitHub.
artifactBuildCompleted: scripts/verify-electron-builder-artifact.mjs
afterPack: scripts/after-pack.mjs
# Notarize + staple here, not with mac.notarize: the built-in staple gives Apple's ticket service only
# seconds, and its connections from CI runners drop for longer (see scripts/notarize-mac.mjs).
afterSign: scripts/notarize-mac.mjs
# Electron-builder unpacks .node files, but not every shared library that the
# native addon loads beside itself. Keep those runtime files together in
# app.asar.unpacked for Sharp and ONNX Runtime on every platform.
asarUnpack:
- 'node_modules/@img/sharp-libvips-linux-x64/lib/*.so*'
- 'node_modules/**/onnxruntime-node/bin/**/*'
# ONNX Runtime opens model files by path; it cannot read them inside app.asar.
- 'node_modules/@gutenye/ocr-models/assets/**/*'
directories:
buildResources: build
files:
# Positive application boundary. Source, tests, documentation, marketing data,
# and local tooling are not runtime inputs and must never enter app.asar.
- 'out/**/*'
- 'package.json'
- '!**/.vscode/*'
# Local profiles and agent worktrees may contain private user data, downloaded
# multi-GB models, nested builds, or symlinks outside the repository. They are
# never application inputs. Keep this boundary here rather than relying on
# .gitignore: electron-builder packages filesystem contents, not only git files.
- '!{.demo-profile,.offgrid,.claude,.Codex,coverage}/**'
# The packaged-helper integration test must use an in-repo workspace because
# electron-builder rejects macOS's /tmp alias. Never admit that disposable output.
- '!out/packaged-helpers-*/**'
- '!src/*'
- '!pro/**'
- '!electron.vite.config.{js,ts,mjs,cjs}'
- '!{.eslintcache,eslint.config.mjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json,tsconfig.web.tsbuildinfo}'
- '!**/*.tsbuildinfo'
win:
executableName: off-grid-ai
# The CUDA and Kev payload is too large for NSIS to embed in one executable.
# Ship a small web installer with its checked package archive beside it.
target:
- nsis-web
# Without this, electron-builder ships the default Electron icon on Windows (the
# mac block sets its own icon below). The 512x512 PNG is auto-converted to a
# multi-size Windows ICO for the exe + NSIS installer.
icon: resources/icon.png
extraResources:
- from: resources/bin
to: bin
filter:
- '**/*'
- '!llama-cuda/**'
- '!llama-prism-cuda/**'
- '!cuda-runtime/**'
- '!sd-cuda/**'
- '!whisper/**'
- '!kev-runtime/**'
nsisWeb:
artifactName: ${name}-${version}-setup.${ext}
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
mac:
# The bundled chat, speech and image engines are built for macOS 13 or
# newer. Advertising an older macOS lets the app install while its engines cannot launch.
minimumSystemVersion: '13.0'
# DMG is the human download; the zip + latest-mac.yml (generated for the zip)
# are what electron-updater needs, so auto-update keeps working. One build, one
# update channel — no core/pro split, no arch variants to confuse anyone.
target:
- dmg
- zip
category: public.app-category.productivity
hardenedRuntime: true
entitlements: build/entitlements.mac.plist
entitlementsInherit: build/entitlements.mac.plist
extendInfo:
NSMicrophoneUsageDescription: Off Grid AI uses the microphone for on-device voice input. Audio is processed locally and never leaves your device.
NSCameraUsageDescription: Off Grid AI may use the camera for on-device vision features. Frames are processed locally and never leave your device.
NSDocumentsFolderUsageDescription: Off Grid AI reads documents you add to a project so it can answer questions about them — locally, on your device.
NSDownloadsFolderUsageDescription: Off Grid AI reads files you add to a project so it can answer questions about them — locally, on your device.
NSLocalNetworkUsageDescription: Off Grid AI Desktop uses your local network to find and sync directly with your devices. Sync traffic is encrypted and no Off Grid AI server receives it.
NSBonjourServices:
- _offgrid._tcp
- _offgrid-sync._tcp
- _offgrid-sync._udp
# Computer use — the semantic action rail. Each key is the OS prompt shown the
# first time the agent uses that capability; without it a hardened-runtime build
# is refused access before any prompt. Copy follows off-grid-ai/brand: lead with
# what the user gets, privacy as the proof, no em dashes.
NSAppleEventsUsageDescription: Off Grid AI controls apps like Messages, Mail, and Notes to carry out actions you approve. Everything runs on your Mac and nothing leaves the device.
NSCalendarsFullAccessUsageDescription: Off Grid AI reads and creates calendar events when you ask, on your device. Your calendar never leaves your Mac.
NSCalendarsUsageDescription: Off Grid AI reads and creates calendar events when you ask, on your device. Your calendar never leaves your Mac.
NSRemindersFullAccessUsageDescription: Off Grid AI reads and creates reminders when you ask, on your device. Your reminders never leave your Mac.
NSContactsUsageDescription: Off Grid AI reads your contacts to complete actions you ask for, like sending a message. Your contacts never leave your Mac.
NSLocationUsageDescription: Off Grid AI uses your current location when you ask for nearby results. Your location stays on your Mac.
NSLocationWhenInUseUsageDescription: Off Grid AI uses your current location when you ask for nearby results. Your location stays on your Mac.
NSPhotoLibraryUsageDescription: Off Grid AI works with photos you ask it to, like picking one to send. Your photos never leave your Mac.
notarize: false
icon: resources/icon.png
extraResources:
- from: resources/bin
to: bin
filter:
- '**/*'
# Kev's Python runtime downloads with a Kev model (resources/kev-runtime-packs.json).
# Bundled, it pushed the update zip past the 1 GiB Squirrel.Mac can install.
- '!kev-runtime/**'
- from: ../executorch-speech/native/bin/executorch-speech
to: bin/executorch-speech
- from: ../executorch-speech/generated/default-assets
to: speech-assets
# NOTE: no afterSign re-sign. electron-builder already signs every nested
# binary (resources/bin/*) with hardenedRuntime + these entitlements; the
# afterSign hook only notarizes + staples. A post-sign re-sign (the old resign.js)
# re-signed AFTER notarization → invalidated the staple → "Unnotarized Developer ID".
# Let electron-builder's signing stand.
dmg:
# The zlib format every release has shipped; the release's DMG integrity check attaches it.
format: UDZO
sign: true
artifactName: ${name}-${version}.${ext}
# The app is currently ~3.3 GB before compression. macOS 26 adds an EFI/GPT
# partition to large HFS images, so dmgbuild's computed size can leave less usable
# space than the bundle needs. Allocate deterministic headroom, then shrink after
# the copy so the published download remains compressed to its actual contents.
size: 5g
shrink: true
linux:
target:
- AppImage
- deb
executableName: off-grid-ai
syncDesktopName: true
icon: resources/icon.png
extraResources:
- from: build/linux-bin
to: bin
filter:
- '**/*'
- '!llama-cuda/**'
- '!llama-prism-cuda/**'
- '!cuda-runtime/**'
- '!sd-cuda/**'
- '!whisper-cuda/**'
- '!kev-runtime/**'
- from: ../executorch-speech/native/bin/executorch-speech
to: bin/executorch-speech
- from: ../executorch-speech/generated/default-assets
to: speech-assets
maintainer: Off Grid AI <hello@getoffgridai.co>
category: Utility
appImage:
artifactName: ${name}-${version}.${ext}
deb:
# Ubuntu 24.04 renamed these libraries in the time64 transition. The
# electron-builder defaults still name packages that Noble cannot install.
depends:
- libgtk-3-0t64
- libnotify4
- libnss3
- libxss1
- libxtst6
- xdg-utils
- libatspi2.0-0t64
- libuuid1
- libsecret-1-0
- libasound2t64
- libgbm1
- xdotool
- x11-utils
- wtype
- python3-gi
- geoclue-2.0
- gir1.2-atspi-2.0
- gir1.2-gstreamer-1.0
- gir1.2-gst-plugins-base-1.0
- gstreamer1.0-pipewire
- gstreamer1.0-plugins-base
- gstreamer1.0-plugins-good
- gstreamer1.0-plugins-bad
- gstreamer1.0-plugins-ugly
- gstreamer1.0-pulseaudio
- gstreamer1.0-libav
- xdg-desktop-portal
- grim
- kde-spectacle
# Electron fuses (flipped at package time). ASAR integrity makes a tampered app.asar
# refuse to load — the local-first anti-tamper lever (we don't phone home, so this is
# the bar against cracking the offline license check). Only the integrity fuses are
# set: we deliberately leave runAsNode ENABLED because TTS spawns process.execPath as
# a Node worker (disabling it would break on-device voice).
electronFuses:
enableEmbeddedAsarIntegrityValidation: true
onlyLoadAppFromAsar: true
publish:
provider: github
owner: off-grid-ai
# Use the current repo name. The former off-grid-ai-desktop path redirects,
# but a release updater must not depend on that redirect.
repo: OGAD
# Publish (not draft) so electron-updater on installed apps sees the release.
releaseType: release