Task: Implement the PKPASS Handler feature

TASK-DESCRIPTION

The integrator implements the requirements in prompts/features/05-pkpass-handler.md. It writes the MIME definition, the handler entry, the three icons, and a record under $XDG_DATA_HOME, makes the entry the default for both types with xdg-mime, and reverses every step from the record. A definition at the project’s path that the project did not write is backed up and restored byte for byte, because the machine may already define the type and its definition is not this project’s to lose. The end-to-end test runs the whole install and uninstall inside a throwaway HOME, with no display, so nothing touches the real desktop.

TASK-OUTPUT

Produce these complete files in this order, then the VERIFICATION: line: 1. sources/integration/handler_integrator.h 2. sources/integration/handler_integrator.cpp 3. sources/tools/icons/pkpass-handler.svg 4. tests/handler_integrator_test.cpp 5. tests/90-handler-mime-definition.sh 6. sources/CMakeLists.txt

TASK-CONTEXT

The record’s shape follows the AppImage project’s handler record: key=value lines, a previous_default=<type> and a tab and the previous desktop id on one line per MIME type, and mime_created=1 only when this project created the definition. shared-mime-info 2.2 and later already define application/vnd.apple.pkpass, so install over a machine that defines it must back the definition up rather than assume it is absent. See documents/09-mime-type-association.md.

Nothing in this feature may write outside $XDG_DATA_HOME, $XDG_CONFIG_HOME, the tool’s own install prefix, and the temporary directory, and nothing may require root.

TASK-FILES

Operation Path
create sources/integration/handler_integrator.h
create sources/integration/handler_integrator.cpp
create sources/tools/icons/pkpass-handler.svg
create tests/handler_integrator_test.cpp
create tests/90-handler-mime-definition.sh
modify sources/CMakeLists.txt

TASK-VERIFY

TASK-FEATURES

TASK-ACCEPTANCE

OUTPUT: the complete files in the order listed, ending with the VERIFICATION: line.