feat: close the human loop — interactive init + scheduled digests with notifications - #6
Merged
Merged
Conversation
…h notifications TOT-96 + TOT-97 (human-first principle, 20 Jul): the engine worked but output was a markdown file nobody opened — last real run 25 Mar. Now the digest reaches the human without them remembering a CLI. init (TOT-97): - Interactive wizard on a TTY: about, provider pick, API key (uses env var if found or paste; stored in ~/.podflow/config.json written 0600), interests. - --yes or non-TTY (CI/agents) keeps the old defaults path. - config.apiKey wired through getModel for all providers (env fallback kept). schedule (TOT-96): - podflow schedule installs a launchd LaunchAgent (weekly Mon 08:00 default; --daily, --time, --max-episodes; --off removes; --status reports). - Handles the launchd traps: explicit PATH in plist, absolute node+script paths, API key from config (launchd never sees shell env — guarded with a clear error if config.apiKey missing). - digest --scheduled ends with a macOS notification (osascript), including on the no-new-episodes early-exit path — the branch most weeks hit (caught in testing: first version only notified on the processing path). Verified: typecheck+build green; schedule --status and the no-key guard exercised; notification delivery confirmed via osascript on this Mac. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DKmgBfWaWck8v2uK389fBb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TOT-96 + TOT-97.
podflow initbecomes an interactive wizard (provider, key stored 0600, interests);podflow scheduleinstalls a weekly launchd job whose runs end in a macOS notification — the digest reaches the human instead of waiting in a file. launchd traps handled (PATH, absolute paths, key-from-config with a clear guard). Notification verified on this Mac, including the no-new-episodes path.🤖 Generated with Claude Code