Repository navigation
Expand file tree
/
Copy pathelectron-builder.yml
More file actions
196 lines (185 loc) · 7.46 KB
/
Copy pathelectron-builder.yml
File metadata and controls
196 lines (185 loc) · 7.46 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
appId: io.github.howdeploy.canvastty
productName: CanvasTTY
directories:
buildResources: build
output: release
# Keep the distributable allow-listed: no source tree, docs, local agent context,
# settings, logs, credentials, or development artifacts are copied into the app.
files:
- out/**/*
- package.json
- LICENSE
- "!**/*.map"
# Dead weight inside production node_modules: type declarations, TypeScript and
# C sources, docs, changelogs, tests, and native build intermediates. Runtime
# code, package.json and LICENSE files stay.
- "!**/node_modules/**/*.{d.ts,d.mts,d.cts,ts,mts,cts,tsbuildinfo}"
- "!**/node_modules/**/{README,CHANGELOG,HISTORY,AUTHORS,CONTRIBUTING}*"
- "!**/node_modules/**/*.md"
- "!**/node_modules/**/{test,tests,__tests__,example,examples,docs,.github,coverage,benchmark,benchmarks}/**"
- "!**/node_modules/**/*.test.js"
# node-pty loads build/Release (rebuilt for Electron by npmRebuild) and falls
# back to prebuilds; its C++ and winpty sources, build scripts and header-only
# node-addon-api are compile-time only. (A platform-level `files` list would
# replace this one, so other platforms' prebuilds stay.) Darwin must use the
# patched source build: a fallback to the pristine npm prebuild leaks PTYs.
- "!**/node_modules/node-pty/{src,deps,scripts,node-addon-api}/**"
- "!**/node_modules/node-pty/prebuilds/darwin-*/**"
- "!**/node_modules/node-addon-api/**"
# Browser builds that Node never resolves (yaml's "node" export is dist/,
# bluebird's main is js/release).
- "!**/node_modules/yaml/browser/**"
- "!**/node_modules/bluebird/js/browser/**"
asar: true
afterPack: scripts/after-pack-updates.cjs
asarUnpack:
- node_modules/node-pty/**/*
# Close the remaining LoTL vectors in the packaged binary: ignore NODE_OPTIONS /
# NODE_EXTRA_CA_CERTS and --inspect from the environment, and validate the
# embedded asar when app.asar is loaded. Dev builds are unaffected (fuses are
# applied at package time). Electron implements asar integrity validation only on
# macOS (>= 16) and Windows (>= 30), so the Linux AppImage and deb targets flip
# the bit without receiving validation from it.
#
# runAsNode is deliberately left ENABLED: where the native canvastty-helper is
# not shipped or not chosen (Windows, CANVASTTY_HELPERS=node), provider CLIs and
# the agent runtime spawn the bundled helpers as
# { command: process.execPath, args: [helper], env: { ELECTRON_RUN_AS_NODE: "1" } }
# (src/main/index.ts for the browser, agent-runtime, and plugin-hook helpers,
# src/agent-runtime/*.mjs, plus the generated lifecycle hook commands). Setting
# runAsNode: false would break the agent runtime in packaged builds.
#
# onlyLoadAppFromAsar is left at its default (off). It does not govern the helper
# .mjs files: the fuse only narrows Electron's own application-code search order
# (app.asar -> app -> default_app.asar) to app.asar alone, and its documented
# value is that it stops asar-integrity validation from being bypassed through
# that search path. The helpers are not application code — they are spawned as
# child processes with ELECTRON_RUN_AS_NODE=1, and in that mode Electron loads no
# app bundle at all — so enabling the fuse would not break them. It stays off
# because no packaged build on any target has exercised the flip, and a wrong
# fuse choice is a release-wide defect rather than a runtime one; verify it with
# a packaged run before enabling it.
#
# enableCookieEncryption is intentionally omitted rather than set to false: the
# fuse is a one-way transition, so a release that enabled it would make every
# later build without the key read the encrypted store as plaintext and corrupt
# the profile's cookies. The upstream reference comment claimed this key kept
# cookies encrypted, which is the opposite of what false does.
electronFuses:
enableNodeOptionsEnvironmentVariable: false
enableNodeCliInspectArguments: false
enableEmbeddedAsarIntegrityValidation: true
extraResources:
- from: node_modules/ascii.rest/LICENSE
to: licenses/ascii-rest.txt
- from: assets/mascot-pipeline
to: mascot-pipeline
filter:
- "**/*"
- "!**/__pycache__/**"
- "!**/*.pyc"
- from: scripts/canvastty-control.mjs
to: agent-control/canvastty-control.mjs
- from: agent/orchestrator
to: agent/orchestrator
filter:
- SKILL.md
- from: integrations/even-g2/dist
to: even-g2-web
- from: integrations/mobile/dist
to: mobile-web
- from: src/main/services/companion/asr_worker.py
to: companion/asr_worker.py
- from: src/agent-browser
to: agent-browser
filter:
- "*.mjs"
- from: src/agent-runtime
to: agent-runtime
filter:
- "*.mjs"
- from: agent/browser
to: agent/browser
filter:
- SKILL.md
# canvastty-helper for this target (scripts/build-native-helpers.mjs, `npm run build:helpers`). Without it the app
# runs the .mjs helpers above under Electron-as-Node (src/main/services/agentHelpers.ts).
- from: build/native-helpers/${os}-${arch}
to: helpers
filter:
- canvastty-helper
- canvastty-helper.exe
# UI strings exist in English and Russian (the README ships a Simplified Chinese
# translation), so keep only those Chromium locales; other system languages fall
# back to English for native menus and dialogs. macOS uses .lproj names, Linux and
# Windows .pak names.
electronLanguages:
- en
- en-US
- ru
- zh_CN
- zh-CN
npmRebuild: true
# Rebuild the tracked node-pty source patch for the target Electron/architecture;
# downloading a pristine prebuild here would silently restore the macOS leak.
buildDependenciesFromSource: true
compression: normal
artifactName: ${productName}-${version}-${os}-${arch}.${ext}
# Avoid the maximum-XZ startup stall while retaining AppImageLauncher 2.x compatibility.
appImage:
compression: gzip
linux:
icon: build/icon.png
category: Utility
maintainer: howdeploy
syncDesktopName: true
target:
- AppImage
- deb
win:
icon: build/icon.png
extraResources:
- from: build/windows-agent-pipe-host/canvastty-windows-agent-pipe-host.exe
to: agent-browser/canvastty-windows-agent-pipe-host.exe
target:
- nsis
- portable
nsis:
artifactName: ${productName}-${version}-windows-${arch}-setup.${ext}
oneClick: false
allowToChangeInstallationDirectory: true
createDesktopShortcut: always
createStartMenuShortcut: true
portable:
artifactName: ${productName}-${version}-windows-${arch}-portable.${ext}
mac:
extraFiles:
- from: artifacts/sparkle/Sparkle.framework
to: Frameworks/Sparkle.framework
- from: artifacts/sparkle/canvastty-update-helper
to: MacOS/canvastty-update-helper
- from: src/native/updates/mac-update-server.mjs
to: Resources/updates/mac-update-server.mjs
extraResources:
- from: artifacts/companion-speech/${arch}
to: companion/speech
icon: build/icon.png
category: public.app-category.developer-tools
# A free distribution has no Developer ID identity. Sign the bundle explicitly
# with an ad-hoc identity so macOS can verify its contents are internally
# consistent; Gatekeeper still requires a one-time user acknowledgement.
identity: "-"
hardenedRuntime: false
notarize: false
target:
- dmg
- zip
# bzip2 dmg: 9 MB smaller than the default zlib (UDZO) image; lzfse (ULFO) saves
# only 2 MB. Set here rather than via `compression: maximum`, which would also
# move deb/nsis to maximum XZ/LZMA (the zip gains only 0.1 MB from -mx=9).
dmg:
format: UDBZ
publish:
provider: github
owner: howdeploy
repo: CanvasTTY