-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathproject.yml
More file actions
277 lines (272 loc) · 10.5 KB
/
Copy pathproject.yml
File metadata and controls
277 lines (272 loc) · 10.5 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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
name: Zentty
options:
bundleIdPrefix: be.zenjoy
deploymentTarget:
macOS: "13.0"
settings:
base:
PRODUCT_NAME: Zentty
SWIFT_VERSION: "6.0"
MACOSX_DEPLOYMENT_TARGET: "13.0"
GENERATE_INFOPLIST_FILE: NO
CLANG_ENABLE_MODULES: YES
CODE_SIGN_STYLE: Automatic
DEVELOPMENT_TEAM: 25TVW8MSGJ
configs:
Debug:
OTHER_CODE_SIGN_FLAGS: "--timestamp=none"
packages:
ArgumentParser:
url: https://github.com/apple/swift-argument-parser
from: "1.5.0"
Sentry:
url: https://github.com/getsentry/sentry-cocoa
from: "9.9.0"
Sparkle:
url: https://github.com/sparkle-project/Sparkle
from: "2.7.2"
FuzzyMatch:
# Vendored: upstream declares a macOS 14 platform floor, but the code is pure
# Foundation and Zentty targets macOS 13. See Vendor/FuzzyMatch/Package.swift.
path: Vendor/FuzzyMatch
schemes:
Zentty:
build:
targets:
Zentty: all
run:
config: Debug
test:
config: Debug
targets:
- ZenttyLogicTests
- ZenttyTests
- ZenttyIntegrationTests
profile:
config: Release
analyze:
config: Debug
archive:
config: Release
targets:
ZenttyCLI:
type: tool
platform: macOS
sources:
- path: ZenttyCLI
- path: Zentty/AppState/Agent/AgentIPCProtocol.swift
- path: Zentty/AppState/Agent/AmpPluginInstaller.swift
- path: Zentty/AppState/Agent/CursorHooksInstaller.swift
- path: Zentty/AppState/Agent/DroidHooksInstaller.swift
- path: Zentty/AppState/Agent/GrokHooksInstaller.swift
- path: Zentty/AppState/Agent/GrokCanonicalReEmitter.swift
- path: Zentty/AppState/Agent/HookCanonicalReEmitter.swift
- path: Zentty/AppState/Agent/HooksInstalling.swift
- path: Zentty/AppState/Agent/JSONCRelaxedParse.swift
- path: Zentty/AppState/Agent/JSONKeyAccess.swift
- path: Zentty/AppState/Agent/KimiHooksInstaller.swift
- path: Zentty/AppState/Agent/AgyHooksInstaller.swift
- path: Zentty/AppState/Agent/AgyCanonicalReEmitter.swift
- path: Zentty/AppState/Agent/HermesHooksInstaller.swift
- path: Zentty/AppState/Agent/VibeHooksInstaller.swift
- path: Zentty/AppState/Agent/PiFamilyLaunchPolicy.swift
- path: Zentty/Servers/ServerIPCCommands.swift
- path: Zentty/Servers/ServerOutputURLDetector.swift
- path: Zentty/Servers/ServerURLNormalizer.swift
- path: Zentty/Servers/ServerWatchRunner.swift
- path: Zentty/UI/Theme/WorklaneColor.swift
dependencies:
- package: ArgumentParser
product: ArgumentParser
settings:
base:
PRODUCT_NAME: zentty
PRODUCT_MODULE_NAME: ZenttyCLI
PRODUCT_BUNDLE_IDENTIFIER: be.zenjoy.zentty.cli
GENERATE_INFOPLIST_FILE: YES
CODE_SIGN_STYLE: Automatic
SKIP_INSTALL: YES
ENABLE_HARDENED_RUNTIME: YES
INFOPLIST_KEY_CFBundleName: zentty
INFOPLIST_KEY_LSMinimumSystemVersion: "13.0"
Zentty:
type: application
platform: macOS
sources:
- path: Zentty
excludes:
- Updates/AppUpdateController.swift
- Updates/AppUpdateStateStore.swift
- Updates/SparkleAppUpdateController.swift
- path: Zentty/Updates/AppUpdateController.swift
- path: Zentty/Updates/AppUpdateStateStore.swift
- path: Zentty/Updates/SparkleAppUpdateController.swift
- path: ZenttyResources/Assets.xcassets
buildPhase: resources
- path: ZenttyResources/ThirdPartyLicenses.json
buildPhase: resources
dependencies:
- target: ZenttyCLI
embed: false
- framework: FrameworksLocal/GhosttyKit.xcframework
embed: false
- package: Sentry
product: Sentry
- package: Sparkle
product: Sparkle
- package: FuzzyMatch
product: FuzzyMatch
info:
path: Zentty/Info.plist
properties:
CFBundleShortVersionString: $(MARKETING_VERSION)
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
CFBundleIconFile: AppIcon
GlitchTipDSN: $(GLITCHTIP_DSN)
NSLocalNetworkUsageDescription: A program running within Zentty would like to access devices on your local network.
NSMicrophoneUsageDescription: A program running within Zentty would like to use your microphone.
SUAutomaticallyUpdate: false
SUEnableAutomaticChecks: true
SUFeedURL: $(SPARKLE_FEED_URL)
SUPublicEDKey: $(SPARKLE_PUBLIC_ED_KEY)
preBuildScripts:
- name: Verify GhosttyKit
script: |
FRAMEWORK_PATH="${PROJECT_DIR}/FrameworksLocal/GhosttyKit.xcframework"
if [ ! -d "$FRAMEWORK_PATH" ]; then
echo "error: GhosttyKit.xcframework not found. Run scripts/build_ghosttykit.sh first."
exit 1
fi
basedOnDependencyAnalysis: false
postBuildScripts:
- name: Copy Agent Shell Resources
script: |
set -euo pipefail
RESOURCES_SRC="${PROJECT_DIR}/ZenttyResources"
RESOURCES_DST="${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
mkdir -p "${RESOURCES_DST}/bin" "${RESOURCES_DST}/shell-integration" "${RESOURCES_DST}/amp/plugins" "${RESOURCES_DST}/opencode/plugins" "${RESOURCES_DST}/pi/extensions" "${RESOURCES_DST}/omp/extensions" "${RESOURCES_DST}/shared/pi-family" "${RESOURCES_DST}/ghostty" "${RESOURCES_DST}/terminfo"
rsync -a --delete "${RESOURCES_SRC}/bin/" "${RESOURCES_DST}/bin/"
install -m 755 "${BUILT_PRODUCTS_DIR}/zentty" "${RESOURCES_DST}/bin/shared/zentty"
find "${RESOURCES_DST}/bin" -type f \( -path "*/amp/amp" -o -path "*/claude/claude" -o -path "*/codex/codex" -o -path "*/copilot/copilot" -o -path "*/cursor/cursor-agent" -o -path "*/droid/droid" -o -path "*/gemini/gemini" -o -path "*/grok/grok" -o -path "*/hermes/hermes" -o -path "*/kimi/kimi" -o -path "*/kimi/kimi-cli" -o -path "*/opencode/opencode" -o -path "*/pi/pi" -o -path "*/omp/omp" -o -path "*/agy/agy" -o -path "*/vibe/vibe" -o -path "*/vibe/mistral-vibe" -o -path "*/small-harness/small-harness" -o -path "*/shared/zentty" -o -path "*/shared/zentty-agent-wrapper" -o -path "*/tmux-shim/tmux" \) -exec chmod 755 {} +
rsync -a --delete "${RESOURCES_SRC}/shell-integration/" "${RESOURCES_DST}/shell-integration/"
rsync -a --delete "${RESOURCES_SRC}/amp/" "${RESOURCES_DST}/amp/"
rsync -a --delete "${RESOURCES_SRC}/opencode/" "${RESOURCES_DST}/opencode/"
rsync -a --delete "${RESOURCES_SRC}/pi/" "${RESOURCES_DST}/pi/"
rsync -a --delete "${RESOURCES_SRC}/omp/" "${RESOURCES_DST}/omp/"
rsync -a --delete "${RESOURCES_SRC}/shared/pi-family/" "${RESOURCES_DST}/shared/pi-family/"
rsync -a --delete "${RESOURCES_SRC}/ghostty/" "${RESOURCES_DST}/ghostty/"
rsync -a --delete "${RESOURCES_SRC}/terminfo/" "${RESOURCES_DST}/terminfo/"
basedOnDependencyAnalysis: false
- name: Inject Git Commit Metadata
script: |
set -euo pipefail
INFO_PLIST="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
COMMIT_HASH="$(git -C "${PROJECT_DIR}" rev-parse --short HEAD 2>/dev/null || true)"
if [ -z "${COMMIT_HASH}" ]; then
COMMIT_HASH="unknown"
fi
/usr/libexec/PlistBuddy -c "Delete :ZenttyGitCommit" "${INFO_PLIST}" >/dev/null 2>&1 || true
/usr/libexec/PlistBuddy -c "Add :ZenttyGitCommit string ${COMMIT_HASH}" "${INFO_PLIST}"
basedOnDependencyAnalysis: false
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: be.zenjoy.zentty
CURRENT_PROJECT_VERSION: 890
MARKETING_VERSION: 0.3.0
VERSIONING_SYSTEM: apple-generic
INFOPLIST_FILE: Zentty/Info.plist
SPARKLE_FEED_URL: ""
SPARKLE_PUBLIC_ED_KEY: ""
GLITCHTIP_DSN: ""
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
ENABLE_HARDENED_RUNTIME: YES
CODE_SIGN_ENTITLEMENTS: Zentty/Zentty.entitlements
SWIFT_EMIT_LOC_STRINGS: YES
OTHER_LDFLAGS:
- -lc++
- -framework
- Metal
- -framework
- QuartzCore
- -framework
- IOSurface
- -framework
- UniformTypeIdentifiers
- -framework
- Carbon
configs:
Release:
CODE_SIGN_STYLE: Manual
CODE_SIGN_IDENTITY: "Developer ID Application"
ZenttyTests:
type: bundle.unit-test
platform: macOS
sources:
- path: ZenttyTests
info:
path: ZenttyTests/Info.plist
settings:
base:
# Tests run on dev machines only; the app itself supports macOS 13.
MACOSX_DEPLOYMENT_TARGET: "14.0"
PRODUCT_NAME: ZenttyTests
PRODUCT_BUNDLE_IDENTIFIER: be.zenjoy.zenttyTests
INFOPLIST_FILE: ZenttyTests/Info.plist
TEST_HOST: "$(BUILT_PRODUCTS_DIR)/Zentty.app/Contents/MacOS/Zentty"
BUNDLE_LOADER: "$(TEST_HOST)"
dependencies:
- target: Zentty
ZenttyIntegrationTests:
type: bundle.unit-test
platform: macOS
sources:
- path: ZenttyIntegrationTests
info:
path: ZenttyIntegrationTests/Info.plist
settings:
base:
MACOSX_DEPLOYMENT_TARGET: "14.0"
PRODUCT_NAME: ZenttyIntegrationTests
PRODUCT_BUNDLE_IDENTIFIER: be.zenjoy.zenttyIntegrationTests
INFOPLIST_FILE: ZenttyIntegrationTests/Info.plist
TEST_HOST: ""
BUNDLE_LOADER: ""
configs:
Debug:
LD_RUNPATH_SEARCH_PATHS:
- "$(inherited)"
- "@executable_path/../Frameworks"
- "@loader_path/../Frameworks"
- "@loader_path/../../../Zentty.app/Contents/MacOS"
OTHER_LDFLAGS:
- "$(inherited)"
- "$(BUILT_PRODUCTS_DIR)/Zentty.app/Contents/MacOS/Zentty.debug.dylib"
dependencies:
- target: Zentty
ZenttyLogicTests:
type: bundle.unit-test
platform: macOS
sources:
- path: ZenttyLogicTests
info:
path: ZenttyLogicTests/Info.plist
settings:
base:
MACOSX_DEPLOYMENT_TARGET: "14.0"
PRODUCT_NAME: ZenttyLogicTests
PRODUCT_BUNDLE_IDENTIFIER: be.zenjoy.zenttyLogicTests
INFOPLIST_FILE: ZenttyLogicTests/Info.plist
TEST_HOST: ""
BUNDLE_LOADER: ""
configs:
Debug:
LD_RUNPATH_SEARCH_PATHS:
- "$(inherited)"
- "@executable_path/../Frameworks"
- "@loader_path/../Frameworks"
- "@loader_path/../../../Zentty.app/Contents/MacOS"
OTHER_LDFLAGS:
- "$(inherited)"
- "$(BUILT_PRODUCTS_DIR)/Zentty.app/Contents/MacOS/Zentty.debug.dylib"
dependencies:
- target: Zentty