Repository navigation
ref(briefs): Run Conversation Briefs as a core feature - #3410
sentry-junior[bot] wants to merge 1 commit into
Conversation
Briefs no longer register as a plugin. The session-completed task runner calls the Brief task directly, the Brief code writes and renders its own `brief_updated` events, and the System report feed builds the Briefs report itself. Stored events, task ids, and the report name do not change. Reply notifications stay on the core task registration path. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dcramer
left a comment
There was a problem hiding this comment.
one thing thats worth considering here: this is really just becoming core conversation metadata
we should challenge if and what is needed, but certainly the summary of the conversation is adding value as we use it in search
|
Agreed, the Brief is now core Conversation metadata. Here is where each field is read today, outside the Brief code and the CLI:
I'd keep this PR as the mechanical move, with no change to stored data. Trimming the schema ( |
|
17 screenshot changes — 17 changed · 0 added · 0 removed Review screenshots in Frameshift Show 11 more changed screenshots |
|
is there a way to do tasks that arent from a plugin? its ok if we have like core plugins that cant be uninstalled i suppose, if its easier to organize the code |
|
Yes. Core already runs background work outside plugins, on its own Vercel Queue topics: context compaction ( For the work that runs after a Turn completes, there are three options:
The "core plugins that can't be uninstalled" shape is what My pick: keep 1 for this PR. Do 2 as a follow-up if notifications should leave the plugin contract too. That's the point where a shared core task list has a second user. I can open that follow-up if you want it. |
|
which notifications? we want to move brief's summary => conversation.summary or something akin to that |
|
Which notifications: the dashboard reply push notifications,
I'd keep this PR as the move and do that as its own PR, because it adds a migration and changes readers. Say the word if you want it folded in here instead. |
Briefs are core behavior. Core always registers them, and no installed plugin owns them. But they were still built as a fake
PluginRegistrationwith a task context, event emitter, and report hook. That made core route its own feature through the plugin contracts and through special cases in the plugin catalog loops. This PR removes that layer, so Briefs run through direct core calls and core types. Follow-up to #3334.The branch is based on
mainafter #3334 merged. The Conversation embedding write from #3334 stays in the Brief path.Changes
updateConversationBrief({ conversationId, turnId, operationId })takes core arguments instead of aPluginTaskContext. It reads the Turn record and Source directly and uses the corewithLock,getDb(), andlogInfo.briefs/events.tsappends and rendersbrief_updateditself, the same wayjuniornative events work. The Conversation event API renders thebriefsnamespace through it.buildBriefsOperationalReport(nowMs)reads its own costs through the newreadConversationEventCostsByDayand returns the core report type. The report feed lists it first. A failure still shows a failed card, so the other reports still load.briefsTaskRegistration,coreTaskRegistrations(), and the Brief entries in the plugin report and plugin event render loops.briefs/registration.tsis nowbriefs/config.tsand holds only the enabled setting.notificationTaskRegistrations()) because they still use it.Design calls
junior_plugin_tasksand the{ plugin: "briefs", name: "updateBrief" }message. A new topic would need new routes, triggers, and workers. Keeping the message shape lets queued messages from before the deploy still run.briefsnamespace,brief_updatedv1/v2, theplugin:briefs:operation:…@1idempotency key, the cost-cache keys, and the report namebriefsstay the same.defineConversationEventkept for the event schemas. Core native events use the same helper.input.tsandschema.tsstill use the shared annotation contract, since Briefs read plugin-written annotations as data.briefs:conversation:<id>. During a deploy, an old and a new worker can miss each other's lock. The per-Turn row and theturn_already_stored/turn_already_coveredchecks then stop a second Brief for the same Turn.getUserMessageInstructionText) instead of the plugin run projection.via @dcramer.
--
View Session [Sentry]