8000 feat(task-management): add configurable launchd and AI scripts by cuisongliu · Pull Request #1 · cuisongliu/macmini-task-monitor · GitHub
[go: up one dir, main page]

Skip to content

feat(task-management): add configurable launchd and AI scripts - #1

Merged
cuisongliu merged 1 commit into
mainfrom
configurable-task-management
Nov 13, 2026
Merged

cuisongliu merged 1 commit into
mainfrom
configurable-task-management

Conversation

@cuisongliu
Copy link
Copy Markdown
Owner

Summary

  • Add page and same-origin HTTP API management for discovered and page-created launchd tasks.
  • Add SQLite-backed Codex AI script definitions with manual prompts, model selection, testing, and reusable task links.
  • Execute generated Python or Shell scripts in disposable temporary directories with bounded output, process-group timeouts, and cleanup.
  • Add unit and browser integration coverage using temporary SQLite, plist fixtures, and simulated launchd/Codex tools.

Sequence Diagram

sequenceDiagram
    participant User
    participant Page
    participant Service
    participant SQLite
    participant Launchd
    participant Temp as Temporary Script Directory

    User->>Page: Save task or test AI script
    Page->>Service: Same-origin configuration request
    Service->>SQLite: Read or save task/script metadata
    Service->>Launchd: Validate, backup, write, and reload plist
    Service->>Temp: Write generated script and execute with bounded pipes
    Temp-->>Service: Exit code and redacted output
    Service->>Temp: Remove directory on success, failure, or timeout
    Service-->>Page: Return configuration or test result
    Page-->>User: Show task state and script execution output
Loading

Verification

  • python3 -m unittest discover -s tests (45 tests)
  • node tests/frontend.cjs
  • node --check web/app.js
  • node --check tests/frontend.cjs
  • git diff --check

Notes

  • Tests use temporary SQLite/plist fixtures and mocked launchd/Codex processes; no real business task, notification, or AI request is triggered.

Add page and API management for launchd tasks, persisted AI script definitions, and temporary-directory script execution with bounded output. Cover task CRUD, script execution, cleanup, and browser flows with local SQLite and launchd fixtures.
@cuisongliu
cuisongliu merged commit 49ebfe5 into main Nov 13, 2026
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.

1 participant

0