-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathproject.yml
More file actions
324 lines (314 loc) · 12 KB
/
Copy pathproject.yml
File metadata and controls
324 lines (314 loc) · 12 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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
name: AstroTriage
options:
bundleIdPrefix: com.joergsflow
deploymentTarget:
macOS: "14.0"
xcodeVersion: "16.0"
createIntermediateGroups: true
groupSortPosition: top
schemes:
AstroTriage:
build:
targets:
AstroTriage: all
run:
config: Debug
test:
config: Debug
targets:
- AstroTriageTests
packages:
ImageDecoder:
path: Packages/ImageDecoder
GRDB:
url: https://github.com/groue/GRDB.swift
from: "7.4.0"
MCP:
url: https://github.com/modelcontextprotocol/swift-sdk
from: "0.12.0"
# swift-nio + nio-http1 are pulled in transitively by MCP, but the AstroTriage
# target needs them as explicit deps so it can run an in-process HTTP MCP server.
swift-nio:
url: https://github.com/apple/swift-nio
from: "2.100.0"
# swift-nio-ssl for TLS termination — Claude Desktop only accepts HTTPS MCP
# endpoints, so the in-app server must serve TLS with a self-signed cert
# the user trusts via Keychain (see MCPCertificate.swift).
swift-nio-ssl:
url: https://github.com/apple/swift-nio-ssl
from: "2.30.0"
# swift-crypto for the EC key pair, swift-certificates for X.509 cert
# construction. Both pure-Swift, sandbox-safe.
swift-crypto:
url: https://github.com/apple/swift-crypto
from: "3.10.0"
swift-certificates:
url: https://github.com/apple/swift-certificates
from: "1.10.0"
settings:
base:
SWIFT_VERSION: "5.9"
MACOSX_DEPLOYMENT_TARGET: "14.0"
CLANG_CXX_LANGUAGE_STANDARD: c++17
SWIFT_OBJC_INTEROP_MODE: objcxx
targets:
AstroTriage:
type: application
platform: macOS
sources:
- path: AstroTriage
excludes:
- "**/.DS_Store"
dependencies:
- package: ImageDecoder
product: ImageDecoderBridge
- package: GRDB
product: GRDB
- package: MCP
product: MCP
- package: swift-nio
product: NIOCore
- package: swift-nio
product: NIOPosix
- package: swift-nio
product: NIOHTTP1
- package: swift-nio-ssl
product: NIOSSL
- package: swift-crypto
product: Crypto
- package: swift-certificates
product: X509
- target: AstroTriageQuickLookThumbnail
- target: AstroTriageQuickLookPreview
# Tiny stdio↔HTTPS proxy bundled inside Contents/Helpers/ so Claude
# Desktop (which only accepts stdio MCP servers in its config) can talk
# to the in-app HTTPS MCP server. embed: false because we copy it via
# the postBuildScript below — XcodeGen's default embedding would put it
# in Contents/Resources/ which fails App Store validation as the
# un-sandboxed duplicate.
- target: AstroBlinkMCPProxy
embed: false
link: false
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.joergsflow.AstroBlinkV2
GENERATE_INFOPLIST_FILE: NO
INFOPLIST_FILE: AstroTriage/Info.plist
CURRENT_PROJECT_VERSION: 115
MARKETING_VERSION: "6.9.1"
SWIFT_EMIT_LOC_STRINGS: YES
ENABLE_APP_SANDBOX: YES
ENABLE_HARDENED_RUNTIME: YES
CODE_SIGN_ENTITLEMENTS: AstroTriage/AstroTriage.entitlements
DEVELOPMENT_TEAM: FDSVBU33S8
CODE_SIGN_STYLE: Automatic
PRODUCT_NAME: AstroBlinkV2
PRODUCT_MODULE_NAME: AstroTriage
METAL_COMPILER_FLAGS: ""
SWIFT_OBJC_INTEROP_MODE: objcxx
OTHER_LDFLAGS:
- "-lz"
postBuildScripts:
- name: "Sign SPM Resource Bundles"
script: |
# SPM resource bundles (e.g. GRDB_GRDB.bundle) are not automatically signed
# by the export step. App Store Connect requires them to be signed with the
# same distribution certificate as the main app (ITMS-90284).
# For archive builds, use the distribution cert directly since the export
# step re-signs the main app but skips resource bundles.
if [ "${CONFIGURATION}" = "Release" ]; then
SIGN_IDENTITY="Apple Distribution: Joerg Klaas (FDSVBU33S8)"
else
SIGN_IDENTITY="${EXPANDED_CODE_SIGN_IDENTITY}"
fi
find "${CODESIGNING_FOLDER_PATH}/Contents/Resources" -name "*.bundle" -print0 | while IFS= read -r -d '' bundle; do
codesign --force --sign "${SIGN_IDENTITY}" --generate-entitlement-der "$bundle"
done
- name: "Embed AstroBlinkMCPProxy (skipped for App Store builds)"
script: |
# Bundle the stdio↔HTTPS proxy at Contents/Helpers/AstroBlinkMCPProxy
# so Claude Desktop can launch it. Skipped under SKIP_MCP_PROXY=1
# for the App Store archive job — the proxy can't be sandboxed
# (it's a bare CLI child of Claude Desktop, no .app container) and
# App Store demands app-sandbox=true on every embedded exec. App
# Store users connect via Claude Desktop's Settings → Connectors UI
# or use Claude Code with the URL endpoint directly.
if [ "${SKIP_MCP_PROXY:-0}" = "1" ]; then
echo "SKIP_MCP_PROXY=1 — App Store build, not embedding MCP proxy"
exit 0
fi
PROXY_SRC="${CONFIGURATION_BUILD_DIR}/AstroBlinkMCPProxy"
DEST_DIR="${CODESIGNING_FOLDER_PATH}/Contents/Helpers"
if [ ! -f "$PROXY_SRC" ]; then
echo "warning: AstroBlinkMCPProxy binary not found at $PROXY_SRC — skipping embed"
exit 0
fi
mkdir -p "$DEST_DIR"
cp -f "$PROXY_SRC" "$DEST_DIR/AstroBlinkMCPProxy"
if [ "${CONFIGURATION}" = "Release" ]; then
# Developer ID Application is the right cert for outside-App-Store
# distribution. App Store builds skip this script entirely.
SIGN_IDENTITY="Developer ID Application: Joerg Klaas (FDSVBU33S8)"
else
SIGN_IDENTITY="${EXPANDED_CODE_SIGN_IDENTITY}"
fi
# Sign with the empty entitlements file (no sandbox). Hardened
# runtime stays on because Gatekeeper expects it for notarized DevID.
codesign --force --sign "${SIGN_IDENTITY}" \
--options runtime --timestamp=none \
--entitlements "${SRCROOT}/MCPProxy/AstroBlinkMCPProxy.entitlements" \
"$DEST_DIR/AstroBlinkMCPProxy"
AstroTriageQuickLookThumbnail:
type: app-extension
platform: macOS
sources:
- path: QuickLookExtension
excludes:
- "**/.DS_Store"
- PreviewProvider.swift
dependencies:
- package: ImageDecoder
product: ImageDecoderBridge
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.joergsflow.AstroBlinkV2.QuickLookThumbnail
GENERATE_INFOPLIST_FILE: NO
INFOPLIST_FILE: QuickLookExtension/Info.plist
CURRENT_PROJECT_VERSION: 115
MARKETING_VERSION: "6.9.1"
MACOSX_DEPLOYMENT_TARGET: "14.0"
SWIFT_VERSION: "5.9"
CLANG_CXX_LANGUAGE_STANDARD: c++17
SWIFT_OBJC_INTEROP_MODE: objcxx
ENABLE_APP_SANDBOX: YES
ENABLE_HARDENED_RUNTIME: YES
CODE_SIGN_ENTITLEMENTS: QuickLookExtension/QuickLookExtension.entitlements
DEVELOPMENT_TEAM: FDSVBU33S8
CODE_SIGN_STYLE: Automatic
SKIP_INSTALL: YES
OTHER_LDFLAGS:
- "-lz"
AstroTriageQuickLookPreview:
type: app-extension
platform: macOS
sources:
- path: QuickLookExtension
excludes:
- "**/.DS_Store"
- ThumbnailProvider.swift
- Info.plist
- path: QuickLookPreview
excludes:
- "**/.DS_Store"
dependencies:
- package: ImageDecoder
product: ImageDecoderBridge
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.joergsflow.AstroBlinkV2.QuickLookPreview
GENERATE_INFOPLIST_FILE: NO
INFOPLIST_FILE: QuickLookPreview/Info.plist
CURRENT_PROJECT_VERSION: 115
MARKETING_VERSION: "6.9.1"
MACOSX_DEPLOYMENT_TARGET: "14.0"
SWIFT_VERSION: "5.9"
CLANG_CXX_LANGUAGE_STANDARD: c++17
SWIFT_OBJC_INTEROP_MODE: objcxx
ENABLE_APP_SANDBOX: YES
ENABLE_HARDENED_RUNTIME: YES
CODE_SIGN_ENTITLEMENTS: QuickLookPreview/QuickLookPreview.entitlements
DEVELOPMENT_TEAM: FDSVBU33S8
CODE_SIGN_STYLE: Automatic
SKIP_INSTALL: YES
OTHER_LDFLAGS:
- "-lz"
# CLI helper that bridges Claude Desktop's stdio MCP protocol to our in-app
# HTTPS endpoint. CANNOT be sandboxed (sandbox needs an .app container
# anchor; bare CLI children of foreign apps like Claude Desktop have none →
# AMFI rejects). Therefore this binary ships only in the Developer ID
# build (the Embed AstroBlinkMCPProxy postBuildScript skips it under
# SKIP_MCP_PROXY=1, which the App Store archive job sets).
AstroBlinkMCPProxy:
type: tool
platform: macOS
sources:
- path: MCPProxy
excludes:
- "**/.DS_Store"
- "AstroBlinkMCPProxy.entitlements"
settings:
base:
PRODUCT_NAME: AstroBlinkMCPProxy
DEVELOPMENT_TEAM: FDSVBU33S8
CODE_SIGN_STYLE: Automatic
CODE_SIGN_ENTITLEMENTS: MCPProxy/AstroBlinkMCPProxy.entitlements
ENABLE_HARDENED_RUNTIME: YES
SKIP_INSTALL: YES
# Headless, non-sandboxed scoring driver (Phase 0 tuning rig). Compiles the same
# scoring engine sources as the app (no GUI files → no SwiftUI/AppKit) plus the
# shared ScoringRunner and a CLI main. Being a `tool` target it is NOT app-sandboxed,
# so it can read arbitrary NAS/Desktop golden-set folders. Metal shaders compile into
# a default.metallib next to the binary (loaded explicitly in main.swift).
AstroScoreCLI:
type: tool
platform: macOS
sources:
- path: Sources/AstroScoreCLI
- path: AstroTriage/Bridge/ImageDecoder.swift
- path: AstroTriage/Model/ImageEntry.swift
- path: AstroTriage/Model/DecodedImage.swift
- path: AstroTriage/Model/FrameRecord.swift
- path: AstroTriage/Metal/STFCalculator.swift
- path: AstroTriage/Metal/PreviewGenerator.swift
- path: AstroTriage/Metal/TexturePool.swift
- path: AstroTriage/Metal/Shaders.metal
- path: AstroTriage/Engine/ScoringConfig.swift
- path: AstroTriage/Engine/QualityEstimator.swift
- path: AstroTriage/Engine/QualityEstimator+SessionSanity.swift
- path: AstroTriage/Engine/QualityEstimator+Historical.swift
- path: AstroTriage/Engine/QualityEstimator+Helpers.swift
- path: AstroTriage/Engine/StarMetricsCalculator.swift
- path: AstroTriage/Engine/TrailingAnalyzer.swift
- path: AstroTriage/Engine/CalibrationDatabase.swift
- path: AstroTriage/Engine/CommunityBaseline.swift
- path: AstroTriage/Engine/ConvergenceDetector.swift
- path: AstroTriage/Engine/ThresholdLearner.swift
- path: AstroTriage/Engine/NINAFilenameParser.swift
- path: AstroTriage/Engine/MetadataExtractor.swift
- path: AstroTriage/Engine/DeepSkyTargetDatabase.swift
- path: AstroTriage/Engine/TargetCatalog.swift
- path: AstroTriage/Engine/MoonCalculator.swift
- path: AstroTriage/Engine/SunCalculator.swift
- path: AstroTriage/Engine/DisplayAligner.swift
- path: AstroTriage/Engine/GradientRemoval.swift
- path: AstroTriage/Engine/StarDetector.swift
- path: AstroTriage/Engine/ScoringRunner.swift
dependencies:
- package: ImageDecoder
product: ImageDecoderBridge
- package: GRDB
product: GRDB
settings:
base:
PRODUCT_NAME: AstroScoreCLI
DEVELOPMENT_TEAM: FDSVBU33S8
CODE_SIGN_STYLE: Automatic
ENABLE_HARDENED_RUNTIME: YES
SKIP_INSTALL: YES
AstroTriageTests:
type: bundle.unit-test
platform: macOS
sources:
- path: Tests
excludes:
- "**/.DS_Store"
dependencies:
- target: AstroTriage
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.joergsflow.AstroTriageTests
GENERATE_INFOPLIST_FILE: YES
DEVELOPMENT_TEAM: FDSVBU33S8
CODE_SIGN_STYLE: Automatic
TEST_HOST: "$(BUILT_PRODUCTS_DIR)/AstroBlinkV2.app/Contents/MacOS/AstroBlinkV2"
BUNDLE_LOADER: "$(TEST_HOST)"