Skip to content

Feat/interest agent#4010

Open
capJavert wants to merge 8 commits into
mainfrom
feat/interest-agent
Open

Feat/interest agent#4010
capJavert wants to merge 8 commits into
mainfrom
feat/interest-agent

Conversation

@capJavert

Copy link
Copy Markdown
Contributor

No description provided.

capJavert and others added 6 commits July 17, 2026 15:59
Spawn an interest -> pi worker hunts daily.dev content -> scores via bragi
audienceFit -> delivers to a custom feed, a freeform summary post, and a
notification. Adds UserInterest/InterestFinding entities + migration,
SourceType.Interest, the interest-run + content-available topics/workers,
and the createInterest/sendInterestCommand/interest/interests/interestFindings
GraphQL surface.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rename SourceType.Interest -> Agent (AgentSource). Add updateInterest,
deleteInterest, interestPosts, interests queries/mutations and the
InterestFeedback loop (recorded on sendInterestCommand, seeded into the run
prompt). Worker honors fomoThreshold + outputModes (tool gating).

Guards so agent content never leaks into the platform: exclude SourceType.Agent
from feed generators, mark generated posts showOnFeed:false, and restrict
search_daily_dev to public posts only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Agent derives tags from the interest query (set_interest_tags tool, validated
against real keywords, stored as FeedTags) and refines them from finding
keywords. New postVisibleInterestMatch worker listens on api.v1.post-visible,
prefilters interests by tag overlap, scores via bragi audienceFit, and adds a
finding + notification when a newly published post clears the FOMO threshold.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the interest-scheduled-run cron that fans out a run for due active
interests (by cadence/lastRunAt), and the postUpvotedInterestSignal worker
that reinforces a user's overlapping interest tags with the upvoted post's
keywords to tighten future live matching.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mark the per-interest container feed with FeedOrigin.Agent and exclude that
origin from feedList, so agent feeds don't surface as normal custom feeds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Gate all interest GraphQL resolvers behind ctx.isTeamMember. Add
remoteConfig knobs interestAgentMaxInterestsPerPost (default 50) and
interestAgentMaxTags (default 15). Enforce a per-interest tag cap:
set_interest_tags replaces the set (capped), finding refinement and the
upvote signal only add up to the cap; the agent sees current tags to curate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@capJavert capJavert self-assigned this Jul 17, 2026
Whitelist the new notification type in notificationFlagsSchema so it round-trips
through updateNotificationSettings (it's already in DEFAULT_NOTIFICATION_SETTINGS).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pulumi

pulumi Bot commented Jul 17, 2026

Copy link
Copy Markdown

🍹 The Update (preview) for dailydotdev/api/prod (at 7be91bd) was successful.

Resource Changes

    Name                                                       Type                                  Operation
+   api-sub-api.post-upvoted-interest-signal                   gcp:pubsub/subscription:Subscription  create
~   vpc-native-validate-active-users-cron                      kubernetes:batch/v1:CronJob           update
+   api-sub-api.post-visible-interest-match                    gcp:pubsub/subscription:Subscription  create
+   vpc-native-api-db-migration-803ea2eb                       kubernetes:batch/v1:Job               create
~   vpc-native-personalized-digest-deployment                  kubernetes:apps/v1:Deployment         update
~   vpc-native-clean-old-notifications-cron                    kubernetes:batch/v1:CronJob           update
~   vpc-native-update-tag-materialized-views-cron              kubernetes:batch/v1:CronJob           update
~   vpc-native-bg-deployment                                   kubernetes:apps/v1:Deployment         update
~   vpc-native-post-analytics-history-day-clickhouse-cron      kubernetes:batch/v1:CronJob           update
~   vpc-native-update-tags-str-cron                            kubernetes:batch/v1:CronJob           update
~   vpc-native-clean-zombie-user-companies-cron                kubernetes:batch/v1:CronJob           update
-   vpc-native-api-clickhouse-migration-c0f35a0e               kubernetes:batch/v1:Job               delete
~   vpc-native-deployment                                      kubernetes:apps/v1:Deployment         update
~   vpc-native-check-analytics-report-cron                     kubernetes:batch/v1:CronJob           update
~   vpc-native-personalized-digest-cron                        kubernetes:batch/v1:CronJob           update
-   vpc-native-api-db-migration-c0f35a0e                       kubernetes:batch/v1:Job               delete
~   vpc-native-generic-referral-reminder-cron                  kubernetes:batch/v1:CronJob           update
~   vpc-native-clean-channel-highlights-cron                   kubernetes:batch/v1:CronJob           update
~   vpc-native-update-achievement-rarity-cron                  kubernetes:batch/v1:CronJob           update
~   vpc-native-update-trending-cron                            kubernetes:batch/v1:CronJob           update
~   vpc-native-squad-posts-analytics-refresh-cron              kubernetes:batch/v1:CronJob           update
~   vpc-native-user-posts-analytics-refresh-cron               kubernetes:batch/v1:CronJob           update
~   vpc-native-update-views-cron                               kubernetes:batch/v1:CronJob           update
~   vpc-native-user-profile-analytics-clickhouse-cron          kubernetes:batch/v1:CronJob           update
~   vpc-native-clean-stale-user-transactions-cron              kubernetes:batch/v1:CronJob           update
~   vpc-native-post-analytics-clickhouse-cron                  kubernetes:batch/v1:CronJob           update
+   api-sub-api.interest-content-available-notification        gcp:pubsub/subscription:Subscription  create
~   vpc-native-clean-zombie-images-cron                        kubernetes:batch/v1:CronJob           update
~   vpc-native-subscription-anniversary-achievements-cron      kubernetes:batch/v1:CronJob           update
~   vpc-native-rotate-daily-quests-cron                        kubernetes:batch/v1:CronJob           update
~   vpc-native-user-profile-analytics-history-clickhouse-cron  kubernetes:batch/v1:CronJob           update
~   vpc-native-update-highlighted-views-cron                   kubernetes:batch/v1:CronJob           update
~   vpc-native-post-lifecycle-state-clickhouse-cron            kubernetes:batch/v1:CronJob           update
~   vpc-native-sync-subscription-with-cio-cron                 kubernetes:batch/v1:CronJob           update
~   vpc-native-hourly-notification-cron                        kubernetes:batch/v1:CronJob           update
~   vpc-native-clean-zombie-opportunities-cron                 kubernetes:batch/v1:CronJob           update
~   vpc-native-clean-gifted-plus-cron                          kubernetes:batch/v1:CronJob           update
~   vpc-native-materialize-monthly-best-post-archives-cron     kubernetes:batch/v1:CronJob           update
~   vpc-native-update-current-streak-cron                      kubernetes:batch/v1:CronJob           update
~   vpc-native-materialize-yearly-best-post-archives-cron      kubernetes:batch/v1:CronJob           update
~   vpc-native-channel-digests-cron                            kubernetes:batch/v1:CronJob           update
... and 20 other changes

Jest's CommonJS runtime can't require the ESM-only pi-coding-agent/typebox, so
any test importing workers/index (which pulls in runInterestAgent) failed in CI.
Map both to __mocks__ stubs (same pattern as jose/better-auth). Prod is
unaffected — it uses Node's require(esm) at runtime.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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