- Run
./scripts/build-swift.sh. - If unavailable, the pipeline still works via OCR fallback.
The helper uses structured guided generation first and normalizes outputs before rename.
If trace metadata shows unsupportedGuide, a guide pattern was not supported at
runtime. The current contract avoids regex guides and uses
description-guided structured output.
If the model still drifts, the parser fallback extracts and slugifies a stable value. Useful Langfuse fields include:
raw_output_unparsedresponse_modeoutput_contract_versionprompt_versioncontent_keywordsstructured_generation_attemptedstructured_generation_succeededstructured_generation_strategystructured_generation_errorstructured_generation_error_typeformat_validnormalization_source
Dedicated spans:
apple-foundation-model-structured-generationapple-foundation-model-legacy-fallback
- Validate AWS identity:
aws sts get-caller-identity. - Check bucket permissions and region.
- Confirm the bucket name passed via
--bucket.
If the message mentions BlockPublicAcls, your bucket blocks ACL-based public
objects. Either disable that block setting or use a bucket policy/public serving
strategy instead of object ACLs.
- Ensure
pbcopyis available. - Run with
--verboseand inspect logs for clipboard errors.
- Open the menubar and confirm it shows
Shortcuts: V variants (ready). - If it shows
permissions required, useRequest Shortcut Permissions. - Allow both Input Monitoring and Accessibility in System Settings.
- Restart the menubar service after granting permissions:
./scripts/redeploy-local-service.shTry again in Notes or TextEdit to rule out an app-specific shortcut conflict.
- Restart/redeploy the service with the latest code.
- In Cursor, click the target folder in Explorer, then press
Cmd+V. - If needed, verify you are on a recent Cursor build. Explorer external-file paste behavior is editor-version dependent.
Use local deterministic tests when tuning prompt/parse behavior:
./scripts/check.shRun the prompt-quality fixture eval:
./scripts/build-swift.sh
uv run python scripts/eval_apple_fm_prompt.py \
--fixture tests/fixtures/apple_fm_prompt_eval_cases.json \
--min-pass-rate 0.85Evaluate prompt behavior directly from OCR text fixtures:
swift/.build/release/DescribeImage --ocr-text-file path/to/ocr.txtFocus cases:
tests/test_enrich.pytests/test_prompt_eval.pytests/fixtures/apple_fm_prompt_eval_cases.json