53d96adc65
Drop-in equivalents of the opencode templates for each scheduler
mechanism:
systemd/mempalace-pi-session.{service,timer}
launchd/se.jordbo.mempalace-pi-session.plist
cron/mempalace-pi-session.cron
Schedule is staggered from the opencode jobs (Mon 03:00 -> Tue 03:00)
so machines running both don't race each other on the post-mine HNSW
repair step. Service unit uses ConditionPathExists=%h/.pi/agent/sessions
to no-op silently on machines that haven't used pi, matching the
opencode template's guard on ~/.local/share/opencode/opencode.db.
contrib/README.md grows a 'Templates at a glance' table so the set is
discoverable without reading the whole doc.
78 lines
2.7 KiB
Plaintext
78 lines
2.7 KiB
Plaintext
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
|
|
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<!--
|
|
se.jordbo.mempalace-pi-session.plist — macOS launchd user agent
|
|
that mines pi coding-agent session history into MemPalace weekly.
|
|
|
|
Template: replace USER with your macOS short username before installing.
|
|
The install recipe in contrib/README.md does this for you via `sed`.
|
|
|
|
Parity with contrib/systemd/mempalace-pi-session.{service,timer}:
|
|
- Weekly Tue 03:00 local time → StartCalendarInterval below.
|
|
(Staggered from the opencode one, which runs Mon 03:00.)
|
|
- Low-priority background I/O → ProcessType=Background + LowPriorityIO.
|
|
- Single-instance guard → launchd refuses to start a second copy of
|
|
the same Label while one is running.
|
|
- "Skip if pi has never been used" → no native equivalent.
|
|
mempalace-pi-session exits cleanly (zero drawers filed, fast) when
|
|
~/.pi/agent/sessions is absent, so no guard is strictly needed.
|
|
-->
|
|
|
|
<key>Label</key>
|
|
<string>se.jordbo.mempalace-pi-session</string>
|
|
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>/Users/USER/.local/bin/mempalace-pi-session</string>
|
|
</array>
|
|
|
|
<!-- launchd gives agents a minimal PATH. mempalace-pi-session invokes
|
|
`mempalace` and `python3`, both must resolve. -->
|
|
<key>EnvironmentVariables</key>
|
|
<dict>
|
|
<key>PATH</key>
|
|
<string>/Users/USER/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
|
|
<key>HOME</key>
|
|
<string>/Users/USER</string>
|
|
</dict>
|
|
|
|
<!-- Weekly, Tuesday 03:00 local time. Staggered from the opencode job
|
|
(Mon 03:00) so a machine with both installed won't race the HNSW
|
|
repair step. -->
|
|
<key>StartCalendarInterval</key>
|
|
<dict>
|
|
<key>Weekday</key>
|
|
<integer>2</integer>
|
|
<key>Hour</key>
|
|
<integer>3</integer>
|
|
<key>Minute</key>
|
|
<integer>0</integer>
|
|
</dict>
|
|
|
|
<key>RunAtLoad</key>
|
|
<false/>
|
|
|
|
<key>ProcessType</key>
|
|
<string>Background</string>
|
|
<key>LowPriorityIO</key>
|
|
<true/>
|
|
<key>Nice</key>
|
|
<integer>10</integer>
|
|
|
|
<!-- Runaway guard. Pi corpora are typically smaller than opencode's
|
|
(short tactical sessions), so 2h is generous. -->
|
|
<key>ExitTimeOut</key>
|
|
<integer>7200</integer>
|
|
|
|
<!-- Logs. Tail with:
|
|
tail -f ~/Library/Logs/mempalace-pi-session.log -->
|
|
<key>StandardOutPath</key>
|
|
<string>/Users/USER/Library/Logs/mempalace-pi-session.log</string>
|
|
<key>StandardErrorPath</key>
|
|
<string>/Users/USER/Library/Logs/mempalace-pi-session.err.log</string>
|
|
</dict>
|
|
</plist>
|