Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Changes

- Add Apple Photos as a coming-soon built-in crawler with read-only status, refresh, search, platform-native storage paths, and configurable library selection.

### Fixes

- Install OpenClaw crawler apps from the current Homebrew tap instead of legacy formulas that lag released versions.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Built-in manifests ship for:
- `discrawl`
- `telecrawl`
- `imsgcrawl`
- `photoscrawl` (coming soon)
- `notcrawl`
- `gogcli` through the `gog` executable
- `wacli`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import Foundation

public extension BuiltInCrawlApps {
static let photoscrawl = CrawlAppManifest(
id: Self.photoscrawlID,
displayName: "Apple Photos",
description: "Local-first, read-only Apple Photos archive crawler",
availability: .comingSoon,
binary: .init(name: "photoscrawl"),
branding: .init(
symbolName: "photo.on.rectangle.angled",
accentColor: "#FF2D55",
bundleIdentifier: "com.apple.Photos"),
paths: .init(
defaultConfig: "~/Library/Application Support/photoscrawl/config.toml",
defaultDatabase: "~/Library/Application Support/photoscrawl/photos.sqlite",
defaultCache: "~/Library/Caches/photoscrawl",
defaultLogs: "~/Library/Application Support/photoscrawl/logs",
defaultShare: "~/Library/Application Support/photoscrawl/share"),
commands: [
"metadata": ["metadata", "--json"],
"status": ["status", "--json"],
"refresh": ["crawl", "--library", "{config:library_path}", "--json"],
"query": ["search", "--json", "--query"],
],
capabilities: [.status, .refresh, .search],
statusRequiresSecrets: false,
privacy: .init(
exportsSecrets: false,
localOnlyScopes: [
"apple-photos",
"sqlite",
"media-metadata",
"location-observations",
"local-model-observations",
]),
configOptions: [
.init(
id: "library_path",
label: "Photos library",
help: "Photos Library package read by refresh; photoscrawl expands a leading ~/ path.",
defaultValue: "~/Pictures/Photos Library.photoslibrary"),
],
configSections: [
.init(id: "photos", title: "Photos Library", optionIDs: ["library_path"]),
])
.withSuggestion(Self.appSuggest("Photos", ["com.apple.Photos"]))
}
2 changes: 2 additions & 0 deletions Sources/CrawlBarCore/BuiltInApps/BuiltInCrawlApps.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public enum BuiltInCrawlApps {
public static let discrawlID = CrawlAppID(rawValue: "discrawl")
public static let telecrawlID = CrawlAppID(rawValue: "telecrawl")
public static let imsgcrawlID = CrawlAppID(rawValue: "imsgcrawl")
public static let photoscrawlID = CrawlAppID(rawValue: "photoscrawl")
public static let notcrawlID = CrawlAppID(rawValue: "notcrawl")
public static let gogcliID = CrawlAppID(rawValue: "gogcli")
public static let wacliID = CrawlAppID(rawValue: "wacli")
Expand All @@ -18,6 +19,7 @@ public enum BuiltInCrawlApps {
Self.discrawl,
Self.telecrawl,
Self.imsgcrawl,
Self.photoscrawl,
Self.notcrawl,
Self.gogcli,
Self.wacli,
Expand Down
5 changes: 5 additions & 0 deletions Sources/CrawlBarSelfTest/SelfTestConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ extension CrawlBarSelfTest {
try Self.expect(config.apps.map(\.id) == BuiltInCrawlApps.all.map(\.id), "built-in apps are present")
try Self.expect(config.appConfig(for: BuiltInCrawlApps.gogcliID)?.enabled == true, "new Google app normalizes enabled")
try Self.expect(config.appConfig(for: BuiltInCrawlApps.gogcliID)?.showInMenuBar == true, "new Google app appears in menu bar")
try Self.expect(config.appConfig(for: BuiltInCrawlApps.photoscrawlID)?.enabled == false, "coming-soon Photos crawler normalizes disabled")
try Self.expect(BuiltInCrawlApps.photoscrawl.availability == .comingSoon, "Photos crawler remains coming soon without an installer")
try Self.expect(
BuiltInCrawlApps.photoscrawl.commands["refresh"] == ["crawl", "--library", "{config:library_path}", "--json"],
"Photos refresh uses the configured library path")
let oldConfig = CrawlBarConfig(
version: 1,
apps: [CrawlBarAppConfig(id: BuiltInCrawlApps.wacliID, enabled: false, showInMenuBar: false)]).normalized()
Expand Down