Skip to content

spec: Define generic macOS application adapter pattern using native-applescript #233

@mickdarling

Description

@mickdarling

Summary

Define a reusable pattern and guidance for creating MCPAQL adapters for any scriptable macOS application using the native-applescript transport. Apple Mail is the first instance, but the pattern should be documented generically so that adapters for Notes, Reminders, Calendar, Contacts, Safari, Finder, Music, Photos, and any third-party scriptable app follow the same structure.

Context

macOS has hundreds of scriptable applications. Once the native-applescript transport plugin exists, creating an adapter for each app should be a mechanical process:

  1. Locate the app's scripting dictionary
  2. Run the interrogator against it
  3. Review and override CRUDE classifications
  4. Generate the adapter
  5. Test

This issue documents that pattern as a reusable guide, not specific to any single application.

Scope

Application Discovery

  • How to enumerate scriptable applications on a system
  • How to locate .sdef files (bundle resources, scripting additions)
  • How to handle apps with implicit dictionaries (runtime-only, no .sdef)

Common Patterns Across Apps

Most macOS apps share Standard Suite operations:

Standard Suite Command CRUDE Endpoint Present In
open EXECUTE Nearly all apps
close EXECUTE Document-based apps
save EXECUTE Document-based apps
print EXECUTE Document-based apps
make (create new) CREATE Most apps
delete DELETE Most apps
duplicate CREATE Some apps
move UPDATE Some apps
count READ Most apps
exists READ Most apps
get (properties) READ All apps
set (properties) UPDATE All apps

Adapter Naming Convention

{app-name}-applescript-adapter.md

Examples: apple-mail-applescript-adapter.md, apple-notes-applescript-adapter.md, finder-applescript-adapter.md

Adapter Schema Template

Define a template/checklist for each new app adapter:

  • App bundle ID identified
  • .sdef located and parsed
  • Standard Suite operations mapped
  • App-specific suites mapped
  • CRUDE classifications reviewed
  • Danger levels assigned
  • Parameter types documented
  • Confirmation requirements set

Acceptance Criteria

  • Generic pattern document written
  • Application discovery guide included
  • Standard Suite mapping table defined
  • Adapter authoring checklist provided
  • At least 3 example app assessments (Mail, Notes, Reminders) showing how the pattern applies
  • Known limitations documented (sandbox restrictions, TCC permissions, etc.)

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    adapterAdapter development relatedarchitectureArchitecture and designphase-3Adapter: Adapter specifications and interfacesspecCore specification content

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions