mirror of
https://github.com/awizemann/scarf.git
synced 2026-05-10 18:44:45 +00:00
M2 follow-up: Citadel 0.12.1 (current), pre-built Assets.xcassets
Two follow-ups per review:
## Citadel: current stable
Citadel is at 0.12.1, not 0.9.x as I'd been writing against. Bumped
the pin from `from: "0.7.0"` to `.upToNextMinor(from: "0.12.0")`
— tight because Citadel's pre-1.0 authentication-method variants
have shifted between minor releases (0.7 → 0.9 → 0.12), so
explicit bump-and-review is safer than letting the version float.
Downloaded Citadel 0.12.1's source and verified every API call in
CitadelSSHService against it:
- SSHAuthenticationMethod.ed25519(username:, privateKey:) ✓
- SSHClientSettings(host:, authenticationMethod:, hostKeyValidator:) ✓
- SSHHostKeyValidator.acceptAnything() ✓
- SSHClient.connect(to: settings) ✓
- client.executeCommand(_:) -> ByteBuffer ✓
- client.close() async throws ✓
Dropped the "FIXME — may need adjustment" disclaimer in the file
header; replaced with a "verified against 0.12.1" note that says
re-verify if the pin bumps to 0.13+. Same change in SETUP.md
troubleshooting.
## Assets.xcassets (app icon + accent color)
scarf/scarf-ios/Assets.xcassets/ now exists with:
- AppIcon.appiconset/
AppIcon-1024.png (1024×1024, copied from the Mac app's
icon set — same art)
Contents.json (idiom: universal, platform: ios,
size: 1024x1024 — iOS 14+ renders all
smaller sizes from this automatically)
- AccentColor.colorset/
Contents.json (Scarf teal: sRGB 0.227/0.525/0.722
light, 0.400/0.690/0.902 dark)
- Contents.json (root, empty — just version metadata)
SETUP.md updated:
- Instructs Alan to delete Xcode's scaffolded Assets.xcassets AND
import ours, not the other way around.
- Notes the accent color values so a different palette choice is
a one-file edit.
- Removes the obsolete "drop your icon asset" step.
No functional code changes; tests still 88/88 on Linux.
https://claude.ai/code/session_019yMRP6mwZWfzVrPTqevx2y
This commit is contained in:
@@ -32,11 +32,15 @@ let package = Package(
|
||||
],
|
||||
dependencies: [
|
||||
.package(path: "../ScarfCore"),
|
||||
// Pinned to the 0.7 minor line until the API stabilizes at 1.0.
|
||||
// When we bump, re-run onboarding smoke tests against at least:
|
||||
// Pinned tight to the 0.12 minor line. Citadel pre-1.0 has
|
||||
// changed its authentication-method variant names between
|
||||
// minor versions (0.7 → 0.9 → 0.12) — letting the version
|
||||
// float to 0.13+ without a code review risks a silent build
|
||||
// break in `CitadelSSHService.buildClientSettings(...)`. When
|
||||
// bumping the minor, smoke test onboarding against:
|
||||
// (a) a real host with 1Password SSH agent
|
||||
// (b) a real host with a hand-edited `authorized_keys`
|
||||
.package(url: "https://github.com/orlandos-nl/Citadel", from: "0.7.0"),
|
||||
.package(url: "https://github.com/orlandos-nl/Citadel", .upToNextMinor(from: "0.12.0")),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
|
||||
@@ -20,14 +20,15 @@ import ScarfCore
|
||||
/// (file transport, SQLite snapshot pulls, ACP channel) will
|
||||
/// layer on top.
|
||||
///
|
||||
/// **Citadel API disclaimer.** Citadel 0.9's exact authentication-
|
||||
/// method spelling for Ed25519 private keys is evolving across
|
||||
/// 0.7 → 0.9. The `runOneShotProbe(...)` helper below is written
|
||||
/// against the documented `SSHClientSettings` + `.privateKey(...)`
|
||||
/// pattern; if Citadel has renamed or refactored that variant,
|
||||
/// adjust `buildClientSettings(...)` — everything else (the retry
|
||||
/// loop, the error classification, the exit-code handling) is
|
||||
/// Citadel-version-independent.
|
||||
/// **Citadel 0.12.1 API verified.** Every call below (`SSHAuthentication
|
||||
/// Method.ed25519(username:privateKey:)`, `SSHClientSettings(host:
|
||||
/// authenticationMethod:hostKeyValidator:)`, `SSHHostKeyValidator.
|
||||
/// acceptAnything()`, `SSHClient.connect(to:)`, `client.executeCommand
|
||||
/// (_:)`, `client.close()`) was cross-checked against the 0.12.1 tag in
|
||||
/// April 2026. If Citadel's package pin is bumped to a new minor
|
||||
/// (0.13+), re-verify these against
|
||||
/// `Sources/Citadel/SSHAuthenticationMethod.swift` and
|
||||
/// `Sources/Citadel/ClientSession.swift` in the new release.
|
||||
public struct CitadelSSHService: SSHConnectionTester {
|
||||
/// Seconds to wait for the probe exec. Set tight so onboarding
|
||||
/// doesn't hang on a silently-dropped connection.
|
||||
@@ -116,15 +117,10 @@ public struct CitadelSSHService: SSHConnectionTester {
|
||||
// MARK: - Citadel glue
|
||||
|
||||
/// Translate our in-house `SSHKeyBundle` (raw 32+32 byte Ed25519)
|
||||
/// into Citadel's authentication method.
|
||||
///
|
||||
/// **FIXME when updating Citadel.** The exact function name below
|
||||
/// is my best read of Citadel 0.7–0.9's API surface — private-key
|
||||
/// auth has gone through several iterations. If the build fails
|
||||
/// here with "no member `ed25519`" or similar, check the current
|
||||
/// `SSHAuthenticationMethod.swift` in the pinned Citadel version
|
||||
/// and adjust. Everything else (key decode, error classification,
|
||||
/// timeout) is independent.
|
||||
/// into Citadel's authentication method. Verified against Citadel
|
||||
/// 0.12.1 — see `Sources/Citadel/SSHAuthenticationMethod.swift`
|
||||
/// for the full set of `.passwordBased(...)` / `.ed25519(...)` /
|
||||
/// `.p256(...)` / etc. variants.
|
||||
private func buildClientSettings(
|
||||
config: IOSServerConfig,
|
||||
key: SSHKeyBundle
|
||||
@@ -138,9 +134,6 @@ public struct CitadelSSHService: SSHConnectionTester {
|
||||
throw SSHConnectionTestError.other("Stored private key is malformed")
|
||||
}
|
||||
let username = config.user ?? "root"
|
||||
// See FIXME above — the `.ed25519(...)` method name is the
|
||||
// shape I expect based on Citadel 0.7–0.9 docs; double-check
|
||||
// on Mac once the pod is resolved.
|
||||
let auth: SSHAuthenticationMethod = .ed25519(
|
||||
username: username,
|
||||
privateKey: ck
|
||||
|
||||
Reference in New Issue
Block a user