Routines: stop auto-provisioning delivery workbenches; fix Agents/Routines classification - #277
Merged
Conversation
…s research) purposeAgentDefinitions dropped workbench-host plumbing but nothing else, so any non-conversational workflow-catalog utility seeded as a routine (workbench-digest, last-30-days-research) also passed through and showed up in the Agents list even though it was never chattable. Filter on isConversationalWorkflowName, the same test the sidebar's DM list already applies, so a routine-only workflow only ever shows up on the Routines page.
A routine created with no deliveryWorkbenchId for a workflow that requires delivery used to get a brand-new workbench minted on its behalf, named after the routine — the source of the "Daily digest" / "New Workbench" workbenches polluting a tenant's own workbench list. A routine's destination must always be a workbench a person picked or was actually talking in, never one invented and named after the routine. Removes the deliverySpace/DeliverySpacePort auto-provisioning path from both POST /routines (tenant-session) and Myra's own workflow-authenticated routine surface. Delivery-target precedence is now just: the workbench named on the request, then (Myra's surface only) the creating conversation's own workbench, then a plain 400 — never a mint-and-compensate fallback.
…sses a workbench ensureDefaultRoutines named no delivery workbench for the first preset it seeds, relying on the hub's now-removed auto-provisioning to invent one. With that gone, distinguish the hub's "deliveryWorkbenchId is required" 400 from the existing "input required" skip case and log it plainly: the preset isn't planted until a member creates it by hand and picks a real destination, rather than a fabricated one.
…vision one Both routine-creation route mounts wired provisionSpaceWorkbench as the deliverySpace port. That port no longer exists on either routes surface, so drop the wiring and the now-unused import.
TheGreatAxios
added a commit
that referenced
this pull request
Aug 21, 2026
A concurrent lane's classification fix landed here by mistake; it belongs to its own change (PR #277) rather than to the tool-package freshness guard.
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.
Summary
deliveryWorkbenchId, for a workflow whose result requires delivery, used to mint a brand-new workbench named after the routine — the mechanism behind the "Daily digest" / "New Workbench" workbenches polluting a tenant's own workbench list (owner-reported, 10th time). A routine's destination is now always a workbench a person named on the request, or (on Myra's own routine surface) the conversation it was asked from — never one invented on its behalf. Missing a destination for a workflow that needs one is a plain 400, not a silent mint.ensureDefaultRoutines(tenant seed) no longer assumes a workbench. It already had a generic "the definition needs input this preset can't pre-fill" skip path for a 400; this distinguishes the delivery-required 400 and logs an honest, specific message instead of silently getting an auto-provisioned workbench under the old behavior.workbench-digest("Daily digest") andlast-30-days-research("Last 30 days research") are seeded as routines but were showing up in the Agents list becausepurposeAgentDefinitionsonly filtered out workbench-host plumbing, not non-conversational catalog utilities. Fixed by also checkingisConversationalWorkflowName— the same test the sidebar's DM list already applies. The actual distinguishing property between an agent and a routine isconversational(can a person DM it), notautomatable(can it be scheduled) — those are orthogonal.What this does NOT do (scope cut for time)
deliveryWorkbenchIdalready exists as the field to extend — the panel (apps/web/src/shell/routine-panel.tsx) and detail page (apps/web/src/pages/routine-detail-page.tsx) still infer it implicitly (the workbench the panel was opened beside, or Myra's own default) rather than offering an explicit "any workbench" picker with edit-afterwards. Needs a follow-up.Migration / existing data
Checked the owner's live Postgres (
routines.routine): 3 tenants already have "Daily digest" + "Last 30 days research" rows, each pair sharing one already-auto-provisioneddelivery_workbench_idper tenant. This change touches no existing rows — those routines keep delivering exactly where they already do. Only future creates (new tenant seeds, or any routine created with no workbench named) stop auto-provisioning; for a brand-new tenant, the two presets will now be skipped at seed time (logged honestly) until someone creates them by hand with a real destination, since there's no "home workbench" to default to at seed time.Test plan
bun test packages/agent-directory packages/routines packages/hub-client— 634 pass, 0 failbun run typecheckclean inpackages/routines,packages/hub-client,packages/agent-directory,apps/hubbunx prettier --writeon all changed files (no-op, already formatted)