Skip to content

Commit 3902cdd

Browse files
Merge pull request #3 from TheAcharya/dev
Migrated from TimecodeKit to SwiftTimecode 3.0.0
2 parents cd8beba + 1e69ca3 commit 3902cdd

File tree

14 files changed

+105
-87
lines changed

14 files changed

+105
-87
lines changed

.cursorrules

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Pipeline Neo - Cursor Rules
22

33
## Project Overview
4-
Pipeline Neo is a modern, fully modular Swift 6 framework for Final Cut Pro FCPXML processing with TimecodeKit integration. The codebase is 100% protocol-oriented, with all major operations defined as protocols and implemented via dependency injection for maximum flexibility, testability, and future-proofing. This project targets macOS 12+, Xcode 16+, and Swift 6.0 with full concurrency support.
4+
Pipeline Neo is a modern, fully modular Swift 6 framework for Final Cut Pro FCPXML processing with SwiftTimecode integration. The codebase is 100% protocol-oriented, with all major operations defined as protocols and implemented via dependency injection for maximum flexibility, testability, and future-proofing. This project targets macOS 12+, Xcode 16+, and Swift 6.0 with full concurrency support.
55

66
### Current Status
77
- All 46 tests passing
@@ -15,7 +15,7 @@ Pipeline Neo is a modern, fully modular Swift 6 framework for Final Cut Pro FCPX
1515
- All core operations (parsing, timecode conversion, XML manipulation, error handling) are defined as protocols (e.g., FCPXMLParsing, TimecodeConversion, XMLDocumentOperations, ErrorHandling), with both sync and async/await APIs.
1616
- Default implementations are provided, but any component can be swapped or extended via dependency injection.
1717
- All code is Sendable or @unchecked Sendable as appropriate, and passes thread sanitizer checks.
18-
- No known vulnerabilities in dependencies (including TimecodeKit 1.6.13) as of July 2025.
18+
- No known vulnerabilities in dependencies (including SwiftTimecode 3.0.0) as of July 2025.
1919
- No unsafe code patterns: no unsafe pointers, dynamic code execution, or C APIs. All concurrency is structured and type-safe.
2020
- Async/await support is comprehensive across all protocols, implementations, services, and utilities.
2121

@@ -55,7 +55,7 @@ All Swift files must include the standard header format:
5555
- Use @unchecked Sendable for classes that cannot be made final
5656
- Avoid capturing non-Sendable types in concurrent contexts
5757
- Use structured concurrency with Task and TaskGroup where types are Sendable
58-
- Note: Foundation XML types (XMLDocument, XMLElement) and TimecodeKit types are not Sendable; async/await APIs are provided, but Task-based concurrency is avoided for these types
58+
- Note: Foundation XML types (XMLDocument, XMLElement) and SwiftTimecode types are not Sendable; async/await APIs are provided, but Task-based concurrency is avoided for these types
5959

6060
### Error Handling
6161
- Use Swift's Result type for operations that can fail
@@ -73,7 +73,7 @@ All Swift files must include the standard header format:
7373
## Dependencies
7474

7575
### Primary Dependencies
76-
- TimecodeKit: 1.6.0 to 2.0.0 for timecode operations
76+
- SwiftTimecode: 3.0.0+ for timecode operations
7777
- Foundation: Core XML and data handling
7878
- CoreMedia: CMTime operations and conversions
7979

@@ -133,11 +133,13 @@ do {
133133
}
134134
```
135135

136-
### TimecodeKit Integration
137-
- Use TimecodeKit for all timecode operations
138-
- Follow TimecodeKit API conventions
136+
### SwiftTimecode Integration
137+
- Use SwiftTimecode for all timecode operations
138+
- Follow SwiftTimecode API conventions
139139
- Support all FCPXML frame rates (Final Cut Pro compatible)
140140
- Implement proper frame rate conversions
141+
- Use the new API: `Timecode(.realTime(seconds: seconds), at: frameRate)` instead of the old `Timecode(realTime:seconds, at: frameRate)`
142+
- Use updated frame rate enum cases: `.fps24`, `.fps25`, `.fps29_97`, `.fps30`, `.fps50`, `.fps59_94`, `.fps60`, `.fps23_976` instead of `._24`, `._25`, etc.
141143

142144
## Testing Requirements
143145

@@ -250,7 +252,7 @@ Only test with Final Cut Pro supported frame rates:
250252
- Implement proper XML formatting
251253

252254
### Timecode Operations
253-
- Use TimecodeKit for all timecode operations
255+
- Use SwiftTimecode for all timecode operations
254256
- Support all FCPXML frame rates (Final Cut Pro compatible)
255257
- Implement proper frame rate conversions
256258
- Handle drop frame and non-drop frame timecode
@@ -265,14 +267,14 @@ Only test with Final Cut Pro supported frame rates:
265267

266268
### Documentation
267269
- [Final Cut Pro XML Documentation](https://fcp.cafe/developers/fcpxml/)
268-
- [TimecodeKit Documentation](https://github.com/orchetect/TimecodeKit)
270+
- [SwiftTimecode Documentation](https://github.com/orchetect/swift-timecode)
269271
- [Swift Concurrency Documentation](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/concurrency/)
270272

271273
### Standards
272274
- Swift API Design Guidelines
273275
- Apple's Human Interface Guidelines
274276
- Final Cut Pro XML specifications
275-
- TimecodeKit API conventions
277+
- SwiftTimecode API conventions
276278

277279
## Common Tasks
278280

@@ -325,6 +327,6 @@ Only test with Final Cut Pro supported frame rates:
325327
### Long-term Considerations
326328
- Plan for future Swift versions
327329
- Consider new FCPXML versions
328-
- Monitor TimecodeKit updates
330+
- Monitor SwiftTimecode updates
329331
- Plan for platform changes
330332
- Maintain backward compatibility where possible

AGENT.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Pipeline Neo - AI Agent Development Guide
22

33
**Update July 2025:**
4-
Pipeline Neo now provides comprehensive async/await support for all major operations. All protocols, implementations, services, and utilities have async methods. Task-based concurrency is avoided for Foundation XML types and TimecodeKit types due to Sendable limitations, but async APIs are provided and concurrency-safe for Swift 6. The README and tests now demonstrate async/await usage, and all 46 tests/builds pass with the new architecture.
4+
Pipeline Neo now provides comprehensive async/await support for all major operations. All protocols, implementations, services, and utilities have async methods. Task-based concurrency is avoided for Foundation XML types and SwiftTimecode types due to Sendable limitations, but async APIs are provided and concurrency-safe for Swift 6. The README and tests now demonstrate async/await usage, and all 46 tests/builds pass with the new architecture.
55

6-
> **Note:** Foundation XML types (XMLDocument, XMLElement) and TimecodeKit types are not Sendable. The codebase avoids Task-based concurrency for these types, but provides async/await APIs that are concurrency-safe for Swift 6. If/when these dependencies become Sendable-compliant, further parallelisation and structured concurrency can be introduced.
6+
> **Note:** Foundation XML types (XMLDocument, XMLElement) and SwiftTimecode types are not Sendable. The codebase avoids Task-based concurrency for these types, but provides async/await APIs that are concurrency-safe for Swift 6. If/when these dependencies become Sendable-compliant, further parallelisation and structured concurrency can be introduced.
77
88
---
99

10-
A comprehensive guide for AI agents and contributors working on Pipeline Neo, a fully modular Swift 6 framework for Final Cut Pro FCPXML processing with TimecodeKit integration.
10+
A comprehensive guide for AI agents and contributors working on Pipeline Neo, a fully modular Swift 6 framework for Final Cut Pro FCPXML processing with SwiftTimecode integration.
1111

1212
## Table of Contents
1313

@@ -33,11 +33,11 @@ A comprehensive guide for AI agents and contributors working on Pipeline Neo, a
3333

3434
## Project Overview
3535

36-
Pipeline Neo is a modern, protocol-oriented Swift 6 framework for FCPXML parsing, creation, and manipulation, with advanced timecode operations via TimecodeKit. The codebase is 100% modular, with all major operations defined as protocols and implemented via dependency injection for maximum flexibility and testability.
36+
Pipeline Neo is a modern, protocol-oriented Swift 6 framework for FCPXML parsing, creation, and manipulation, with advanced timecode operations via SwiftTimecode. The codebase is 100% modular, with all major operations defined as protocols and implemented via dependency injection for maximum flexibility and testability.
3737

3838
### Core Objectives
3939
- Modern Swift 6 concurrency support with async/await patterns
40-
- Full TimecodeKit integration for professional timecode operations
40+
- Full SwiftTimecode integration for professional timecode operations
4141
- Comprehensive test coverage for all functionality (46+ tests)
4242
- Modular architecture for future expansion
4343
- Professional documentation and examples
@@ -59,7 +59,7 @@ Pipeline Neo is a modern, protocol-oriented Swift 6 framework for FCPXML parsing
5959
## Architecture
6060

6161
- Protocols: All core operations (parsing, timecode conversion, XML manipulation, error handling) are defined as protocols (e.g., FCPXMLParsing, TimecodeConversion, XMLDocumentOperations, ErrorHandling), with both synchronous and async/await methods for modern concurrency.
62-
- Implementations: Default implementations are provided, supporting both sync and async/await APIs. Async methods are concurrency-safe and avoid Task-based concurrency for Foundation XML types and TimecodeKit types due to Sendable limitations.
62+
- Implementations: Default implementations are provided, supporting both sync and async/await APIs. Async methods are concurrency-safe and avoid Task-based concurrency for Foundation XML types and SwiftTimecode types due to Sendable limitations.
6363
- Extensions: Modular extensions for CMTime, XMLElement, and XMLDocument allow dependency-injected operations with async/await support.
6464
- Service Layer: FCPXMLService orchestrates all modular components for high-level workflows, with both sync and async/await APIs.
6565
- Utilities: ModularUtilities provides pipeline creation, validation, and error-handling helpers, with comprehensive async/await support.
@@ -68,13 +68,13 @@ Pipeline Neo is a modern, protocol-oriented Swift 6 framework for FCPXML parsing
6868

6969
- All major functionality is protocol-based and dependency-injected, with both sync and async/await APIs.
7070
- Async/await support is comprehensive across protocols, implementations, services, and utilities.
71-
- Task-based concurrency (e.g., Task.detached, withTaskGroup) is avoided for Foundation XML types and TimecodeKit types due to Sendable limitations, but async APIs are provided and concurrency-safe for Swift 6.
71+
- Task-based concurrency (e.g., Task.detached, withTaskGroup) is avoided for Foundation XML types and SwiftTimecode types due to Sendable limitations, but async APIs are provided and concurrency-safe for Swift 6.
7272
- The codebase is structured for maximum clarity, maintainability, and separation of concerns.
7373

7474
## Security & Safety
7575

7676
- Thread-safe and concurrency-compliant: All code is Sendable or @unchecked Sendable as appropriate, and passes thread sanitizer checks.
77-
- No known vulnerabilities: All dependencies (including TimecodeKit 1.6.13) are up to date and have no published security advisories as of July 2025.
77+
- No known vulnerabilities: All dependencies (including SwiftTimecode 3.0.0) are up to date and have no published security advisories as of July 2025.
7878
- No unsafe code patterns: No use of unsafe pointers, dynamic code execution, or C APIs. All concurrency is structured and type-safe.
7979
- Static analysis: The codebase passes thread sanitizer and static analysis checks, with no concurrency or memory safety issues detected.
8080

@@ -84,14 +84,14 @@ Pipeline Neo is a modern, protocol-oriented Swift 6 framework for FCPXML parsing
8484
- Always use Swift 6.0 features and syntax
8585
- Leverage async/await for asynchronous operations (all major operations now have async/await APIs)
8686
- Use structured concurrency with Task and TaskGroup where types are Sendable; otherwise, provide async APIs that are concurrency-safe for current Swift 6
87-
- Implement proper Sendable compliance where possible; for Foundation XML types and TimecodeKit types, avoid Task-based concurrency
87+
- Implement proper Sendable compliance where possible; for Foundation XML types and SwiftTimecode types, avoid Task-based concurrency
8888

8989
### Concurrency Requirements
9090
- All public APIs should be async where appropriate (now implemented across the codebase)
9191
- Use @unchecked Sendable for classes that cannot be made final
9292
- Avoid capturing non-Sendable types in concurrent contexts
9393
- Implement proper actor isolation where needed
94-
- Note: Foundation XML types (XMLDocument, XMLElement) and TimecodeKit types are not Sendable; async/await APIs are provided, but Task-based concurrency is avoided for these types
94+
- Note: Foundation XML types (XMLDocument, XMLElement) and SwiftTimecode types are not Sendable; async/await APIs are provided, but Task-based concurrency is avoided for these types
9595

9696
### Error Handling
9797
- Use Swift's Result type for operations that can fail
@@ -127,17 +127,17 @@ Pipeline Neo is a modern, protocol-oriented Swift 6 framework for FCPXML parsing
127127

128128
## Note on Sendable Limitations
129129

130-
Foundation XML types (XMLDocument, XMLElement) and TimecodeKit types are not Sendable. The codebase avoids Task-based concurrency for these types, but provides async/await APIs that are concurrency-safe for Swift 6. If/when these dependencies become Sendable-compliant, further parallelisation and structured concurrency can be introduced.
130+
Foundation XML types (XMLDocument, XMLElement) and SwiftTimecode types are not Sendable. The codebase avoids Task-based concurrency for these types, but provides async/await APIs that are concurrency-safe for Swift 6. If/when these dependencies become Sendable-compliant, further parallelisation and structured concurrency can be introduced.
131131

132132
## Dependencies
133133

134134
### Primary Dependencies
135-
- TimecodeKit: Advanced timecode operations and conversions
135+
- SwiftTimecode: Advanced timecode operations and conversions
136136
- Foundation: Core XML and data handling
137137
- CoreMedia: CMTime operations and conversions
138138

139139
### Version Requirements
140-
- TimecodeKit: 1.6.0 to 2.0.0
140+
- SwiftTimecode: 3.0.0+
141141
- Swift: 6.0+
142142
- Xcode: 16.0+
143143

@@ -197,7 +197,7 @@ Main service class orchestrating all modular components:
197197

198198
### Modular Components
199199
- FCPXMLParser: XML parsing and validation
200-
- TimecodeConverter: Timecode operations with TimecodeKit
200+
- TimecodeConverter: Timecode operations with SwiftTimecode
201201
- XMLDocumentManager: Document creation and manipulation
202202
- ErrorHandler: Comprehensive error handling
203203

@@ -390,7 +390,7 @@ This ensures that AI agents working with the project have consistent guidance wh
390390

391391
### External References
392392
- [Final Cut Pro XML Documentation](https://fcp.cafe/developers/fcpxml/)
393-
- [TimecodeKit Documentation](https://github.com/orchetect/TimecodeKit)
393+
- [SwiftTimecode Documentation](https://github.com/orchetect/swift-timecode)
394394
- [Swift Concurrency Documentation](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/concurrency/)
395395

396396
### Internal References

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
### 1.0.2
4+
5+
**Released:**
6+
- 30th November 2025
7+
8+
**🔧 Improvements:**
9+
- Migrated from TimecodeKit to SwiftTimecode 3.0.0
10+
- Updated package dependency to new repository: `https://github.com/orchetect/swift-timecode`
11+
- Updated all import statements from `import TimecodeKit` to `import SwiftTimecode`
12+
- Updated Timecode initializer API to new SwiftTimecode 3.0 syntax: `Timecode(.realTime(seconds: seconds), at: frameRate)`
13+
- Updated frame rate enum cases to new naming convention: `.fps24`, `.fps25`, `.fps29_97`, `.fps30`, `.fps50`, `.fps59_94`, `.fps60`, `.fps23_976` (replacing `._24`, `._25`, etc.)
14+
- Updated all documentation references from TimecodeKit to SwiftTimecode
15+
- Updated version references from 1.6.13 to 3.0.0
16+
- All 46 tests passing with SwiftTimecode 3.0.0
17+
- Task-based concurrency avoided for Foundation XML types and SwiftTimecode types due to Sendable limitations
18+
319
### 1.0.1
420

521
**Released:**

Package.resolved

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ let package = Package(
1313
targets: ["PipelineNeo"]),
1414
],
1515
dependencies: [
16-
.package(url: "https://github.com/orchetect/TimecodeKit", from: "1.6.0")
16+
.package(url: "https://github.com/orchetect/swift-timecode", from: "3.0.0")
1717
],
1818
targets: [
1919
.target(
2020
name: "PipelineNeo",
21-
dependencies: ["TimecodeKit"],
21+
dependencies: [.product(name: "SwiftTimecode", package: "swift-timecode")],
2222
resources: [
2323
.process("FCPXML DTDs")
2424
]),

0 commit comments

Comments
 (0)