Skip to content

Add structured native app-control actions to BasicAction#111

Merged
NakaokaRei merged 2 commits into
masterfrom
codex/issue-82-app-control-actions
Jun 13, 2026
Merged

Add structured native app-control actions to BasicAction#111
NakaokaRei merged 2 commits into
masterfrom
codex/issue-82-app-control-actions

Conversation

@NakaokaRei

Copy link
Copy Markdown
Owner

Summary

  • add openURL, activateApp, quitApp, and getFrontmostApp to BasicAction
  • expose the actions through both OpenAI backends, including prompts, parsing, history descriptions, and strict JSON schema
  • implement Tier 1 app control with native macOS APIs instead of interpolated AppleScript:
    • NSWorkspace.open for URLs
    • NSRunningApplication.activate for activation
    • NSRunningApplication.terminate for quitting
    • NSWorkspace.frontmostApplication for frontmost-app lookup
  • move generic Action.executeAppleScript execution onto a dedicated serial queue to avoid blocking the main actor
  • add a repository-local Claude/Codex skill with manual sagui agent smoke-test commands

This incorporates the implementation concerns raised in the issue discussion, while retaining the structured AI action interface proposed by the issue.

Validation

  • swift test (131 tests passed)
  • swift package generate-documentation
  • live sagui agent checks for getFrontmostApp and activateApp
  • verified Calculator became the frontmost app after native activation

Closes #82

@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

🧪 Test Results

✅ All Tests Passed!


Workflow run: 27451653186
Powered by xcbeautify 🎨

@NakaokaRei NakaokaRei merged commit 26f1c9e into master Jun 13, 2026
5 checks passed
@NakaokaRei NakaokaRei deleted the codex/issue-82-app-control-actions branch June 13, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add structured app-control actions to BasicAction (AppleScript-backed)

1 participant