You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Guidance for AI coding assistants working on this repository.
6
6
7
7
You are a Senior Swift Engineer specializing in SwiftUI, Swift Concurrency, and macOS development. Your code must adhere to Apple's Human Interface Guidelines. Target **Swift 6.0+** and **macOS 26.0+**.
8
8
9
-
Kaset is a native macOS YouTube Music client (Swift/SwiftUI) using a hidden WebView for DRMplaybackand `YTMusicClient` API calls for all data fetching.
9
+
Kaset is a native macOS client for YouTube Music and YouTube (Swift/SwiftUI). It uses WebViews only for DRM/playback/auth surfaces and uses `YTMusicClient`/ `YouTubeClient`API calls for data fetching.
10
10
11
11
## Critical Rules
12
12
@@ -16,7 +16,7 @@ Kaset is a native macOS YouTube Music client (Swift/SwiftUI) using a hidden WebV
16
16
17
17
> β οΈ **No Third-Party Frameworks** β Do not introduce third-party dependencies without asking first.
18
18
19
-
> β οΈ **Prefer API over WebView** β Always use `YTMusicClient` API calls when functionality exists. Only use WebView for playback (DRM-protected audio) and authentication.
19
+
> β οΈ **Prefer API over WebView** β Always use `YTMusicClient`(YouTube Music) or `YouTubeClient` (YouTube) API calls when functionality exists. Only use WebView for playback (DRM-protected media) and authentication.
20
20
21
21
> π§ **Improve API Explorer, Don't Write One-Off Scripts** β When exploring or debugging API-related functionality, **always enhance `Sources/APIExplorer/main.swift`** instead of writing temporary scripts.
Copy file name to clipboardExpand all lines: CONTEXT.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,24 @@
1
1
# Kaset Domain Language
2
2
3
+
## App Source
4
+
5
+
The active content experience selected by the sidebar source toggle. `.music` is the YouTube Music experience and remains the default; `.video` is the regular YouTube experience. Source switches swap the visible navigation surface without merging the two data models.
6
+
7
+
## Music Experience
8
+
9
+
Kaset's YouTube Music surface: songs, albums, artists, playlists, podcasts, lyrics, queue management, and DRM audio playback through the hidden `SingletonPlayerWebView`. Data fetching belongs to `YTMusicClient` and music-specific parsers.
10
+
11
+
## YouTube Experience
12
+
13
+
Kaset's regular YouTube surface: recommendations, search, subscriptions, Shorts, channels, playlists, Watch Later, history, comments, and video playback through `YouTubeWatchWebView`. Data fetching belongs to `YouTubeClient` and YouTube-specific parsers under `Services/API/Parsers/YouTube/`.
14
+
15
+
## Playback Arbiter
16
+
17
+
The coordinator that keeps YouTube Music and regular YouTube from playing over each other. It pauses music when a YouTube video starts, pauses YouTube video when music starts, and lets media-key handling follow whichever source played most recently.
18
+
3
19
## Library
4
20
5
-
The signed-in user's saved YouTube Music collection. Kaset surfaces Library content as playlists, followed artists, subscribed podcast shows, and uploaded songs.
21
+
The signed-in user's saved YouTube Music collection. Kaset surfaces Music Library content as playlists, followed artists, subscribed podcast shows, and uploaded songs. Regular YouTube has separate library-like surfaces such as subscriptions, Watch Later, liked videos, history, and playlists.
- π΅ **Native macOS Experience** β Apple Music-style UI with Liquid Glass player bar and clean sidebar navigation
10
-
- π§ **YouTube Music Premium Support** β Full playback of DRM-protected content via your existing subscription
9
+
- π΅ **Native macOS Experience** β Apple Music-style UI with Liquid Glass player bars, clean sidebar navigation, and a source toggle for Music β YouTube
10
+
- π§ **YouTube Music Support** β Full playback of DRM-protected YouTube Music content via your existing Premium subscription
11
+
- βΆοΈ **[YouTube Support](docs/youtube.md)** β Browse regular YouTube recommendations, search, subscriptions, Shorts, Watch Later, history, comments, and video playback with native controls, captions, quality selection, and picture in picture
11
12
- ποΈ **System Integration** β Now Playing in Control Center, media key support, Dock menu controls
12
13
- π³ **Haptic Feedback** β Tactile feedback on Force Touch trackpads for player controls and navigation
13
14
- πΆ **Track Notifications** β Get notified when a new track starts playing
14
15
- π **Background Audio** β Music continues playing when the window is closed; stops on quit
15
-
- ποΈ **Equalizer** β System-wide 6-band parametric EQ with Spotify-style presets, applied to YouTube Music output
16
+
- ποΈ **Equalizer** β System-wide 6-band parametric EQ with Spotify-style presets, applied to WebKit playback output
16
17
- β¨οΈ **[Keyboard Shortcuts](docs/keyboard-shortcuts.md)** β Full keyboard control for playback, navigation, and more
17
18
- π§ **Explore** β Discover new releases, charts, and moods & genres
18
19
- ποΈ **Podcasts** β Browse and listen to podcasts with episode progress tracking
@@ -24,16 +25,15 @@ A native macOS YouTube Music client built with Swift and SwiftUI.
24
25
- π **Lyrics** β View plain and synced lyrics with line-by-line highlighting when timing data is available, plus AI-powered explanations and mood analysis on macOS 26+
25
26
- π **Queue Management** β View, reorder, shuffle, and clear your playback queue
26
27
- π£ **Share** β Share songs, playlists, albums, and artists via the native macOS share sheet
27
-
- βΆοΈ **[YouTube Mode](docs/youtube.md)** β Flip the sidebar source toggle for a native regular-YouTube client: recommendations, search, subscriptions, Shorts, Watch Later, history, comments, and video playback with native controls, captions, quality selection, and picture in picture
28
-
- π **[URL Scheme](docs/url-scheme.md)** β Open songs directly with `kaset://play?v=VIDEO_ID`; YouTube watch and `youtu.be` links play in YouTube mode
28
+
- π **[URL Scheme](docs/url-scheme.md)** β Open songs directly with `kaset://play?v=VIDEO_ID`; app-targeted YouTube watch and `youtu.be` links play in YouTube mode
29
29
- π€ **[AppleScript Support](docs/applescript.md)** β Automate playback with scripts, Raycast, Alfred, and Shortcuts
0 commit comments