Skip to content

Add repo mention type to workbenches - #3971

Merged
michaeljguarino merged 15 commits into
masterfrom
repo-mention-wb
Aug 7, 2026
Merged

Add repo mention type to workbenches#3971
michaeljguarino merged 15 commits into
masterfrom
repo-mention-wb

Conversation

@michaeljguarino

@michaeljguarino michaeljguarino commented Aug 5, 2026

Copy link
Copy Markdown
Member

This provides some basic logic for a stylized repo mention, fetching repo urls from either the agent runtimes history list or the allowed repositories in the wb.

Test Plan

Test environment: https://console.plrldemo.onplural.sh/cd/clusters/a1748282-ce8b-48ab-ae7e-326e74fce04e/services/f3f89a54-d1a7-4bc8-9152-daa07ede918d/components

Checklist

  • I have added a meaningful title and summary to convey the impact of this PR to a user.
  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have deployed the agent to a test environment and verified that it works as expected (required only when changing agent code).

Plural Flow: console

@michaeljguarino
michaeljguarino requested a review from a team August 5, 2026 19:59
@michaeljguarino michaeljguarino added the enhancement New feature or request label Aug 5, 2026
@soffi-ai

soffi-ai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Soffi AI Summary

This PR primarily introduces a repo mention type for AI workbenches — allowing users to reference Git/Helm repositories in a stylized way by fetching repo URLs from agent runtime history or workbench-allowed repositories. Alongside this core feature, the PR ships several AI/workbench-related improvements and a significant CI infrastructure migration to Blacksmith runners.

Core feature: Repo mentions in workbenches
A new mention type is added so that when users type a repo reference inside a workbench, the UI can resolve and display it in a styled, structured way — pulling URLs from either the agent runtime's history list or the workbench's allowed repositories.

AI / Workbench improvements (bundled commits)

  • Agent run message output now streams progressively rather than being buffered.
  • Agent runs can follow up on previous runs (follow-up capability).
  • Workbench-level permissions are now enforced on the underlying Kubernetes job, closing a security gap.
  • Insights are now routed directly to the relevant workbench when one is present, rather than through a generic flow.
  • MCP client registration logic was improved.
  • Helm values fetching was refactored for cleaner separation.
  • Expiration jitter for cache/token TTLs was improved to reduce thundering-herd patterns.
  • Fixed a UI flash regression in the workbench interface.

AI proxy: Mantle routing support
The go/ai-proxy service gained support for routing to a new Mantle backend, extending its list of supported LLM provider targets.

CI: Full migration to Blacksmith builders
All GitHub Actions workflows across the monorepo were migrated from GitHub-hosted ubuntu-latest runners and docker/setup-buildx-action + docker/build-push-action to Blacksmith's useblacksmith/setup-docker-builder and useblacksmith/build-push-action. GitHub Actions cache (type=gha) is replaced by Blacksmith's native per-Dockerfile cache key mechanism. This migration affects every CD/CI pipeline: controller, deployment-operator (agent, harness variants — Terraform, Terragrunt, Pulumi, Ansible), kubernetes-agent, agentk, cloud-query, AI proxy, datastore, demo, and others.

Commits

Commit Summary
9d91237 Introduces the repo mention type for workbenches, enabling stylized repository references resolved from agent runtime history or workbench-allowed repos.
98b9e5e Fixes a CI pipeline failure introduced with the repo mention changes.
1794a22 Addresses reviewer feedback on the repo mention implementation.
980f8b1 Refactors Helm values fetching into a cleaner, more reusable utility.
c533233 Implements streaming output for agent run messages so results appear progressively rather than all at once.
8122a45 Enforces workbench-level permissions on the spawned Kubernetes job, closing a privilege-escalation gap.
51027b2 Improves expiration jitter on cache/token TTLs to reduce thundering-herd effects on renewal.
73bad5d Routes AI insights directly to the associated workbench when one is present, skipping the generic insight flow.
b9aaa11 Fixes a UI flash regression in the workbench interface.
3174dbc Adds Mantle backend routing support to the AI proxy service.
b2b4a92 Improves MCP client registration logic for more reliable server connections.
6422ffa Migrates all GitHub Actions workflows from standard ubuntu-latest + docker/buildx to Blacksmith runners and Blacksmith build/push actions.
ced5285 Resolves build failures introduced by the initial Blacksmith migration.
aa028b2 Further optimizes Blacksmith builds, switching to per-Dockerfile cache keys and removing redundant GHA cache configuration.
cfa4713 Adds follow-up capability to agent runs, allowing a completed run to spawn a subsequent run in context.

Deploy in Soffi


Updated: 2026-08-07 15:00 UTC

@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds repository mentions to workbench rich-text prompts, deriving suggestions from configured repository allowlists or prior agent-run history and rendering provider-specific chips.

  • Extends mention schemas, serialization, autocomplete results, and Markdown rendering with a repository kind.
  • Passes workbench repository configuration into job prompt inputs and updates relevant GraphQL fragments and generated artifacts.
  • Moves workbench job search results into a floating portal.

Confidence Score: 4/5

This PR should not merge until the global repository-history disclosure and the prompt-form outlet-context crashes are fixed.

The repository fallback can expose URLs from unrelated agent runs, while three existing form route families render the updated prompt component without the outlet context it now requires.

Files Needing Attention: assets/src/components/ai/chatbot/input/autocomplete/useMentionDataSources.ts; assets/src/components/workbenches/workbench/WorkbenchPromptRichInput.tsx

Important Files Changed

Filename Overview
assets/src/components/ai/chatbot/input/autocomplete/useMentionDataSources.ts Adds configured and historical repository suggestions, but the history fallback exposes globally unscoped repository records.
assets/src/components/workbenches/workbench/WorkbenchPromptRichInput.tsx Sources repository configuration from outlet context, causing callers outside the Workbench outlet to crash during rendering.
assets/src/components/ai/chatbot/input/autocomplete/mentionTypes.ts Adds the repository mention kind, attributes, labels, and chip schema consistently.
assets/src/components/ai/chatbot/input/autocomplete/repositoryMention.ts Normalizes repository URLs and derives provider and display metadata for supported SCM hosts.
assets/src/components/ai/chatbot/input/autocomplete/PlrlChipMdRenderers.tsx Adds repository chip rendering with provider-specific icons and a generic fallback.
assets/src/components/workbenches/workbench/WorkbenchJobsSearch.tsx Ports the search dropdown to the shared floating positioning and portal infrastructure without an accepted defect.
assets/src/graph/workbench.graphql Fetches repository allowlists needed by workbench and job prompt autocomplete paths.

Reviews (1): Last reviewed commit: "Add repo mention type to workbenches" | Re-trigger Greptile

Comment on lines +120 to +122
} = useAgentRunRepositoriesQuery({
variables: { q: throttled || undefined },
skip: !wantsAt || !workbenchId || allowedRepositories !== null,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 security Global repository history leaks

When both workbench and runtime repository lists are null, this fallback sends only q to a resolver that reads the global repository-history table without workbench, user, or tenant filtering, exposing unrelated repository URLs in autocomplete. How this was verified: The query path was traced to AgentRunRepository.ordered() with no row-level scope applied.

syncKey?: string
wrapperStyles?: ComponentProps<typeof ChatInputSimple>['wrapperStyles']
}) {
const { workbench } = useOutletContext<WorkbenchOutletContext>()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Sibling form routes lose context

When cron schedule, chatbot, or webhook trigger forms render this input, they are sibling routes rather than children of the context-providing Workbench outlet, so destructuring the undefined outlet context crashes the form.

@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot

plural-copilot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

GitOps deployment PR: https://github.com/pluralsh/plrl-up-demos/pull/2535

It updates the console image tag to sha-ab1e24c for PR #3971 head.

@michaeljguarino
michaeljguarino force-pushed the repo-mention-wb branch 2 times, most recently from ef1ba25 to a74d51e Compare August 5, 2026 21:04
@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot

plural-copilot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Deployment GitOps PR: https://github.com/pluralsh/plrl-up-demos/pull/2541 — pins the demo console image to sha-6be895d for this PR.

@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot

plural-copilot Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Demo GitOps deployment PR has been created: https://github.com/pluralsh/plrl-up-demos/pull/2542

@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot

plural-copilot Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Deployment GitOps PR: https://github.com/pluralsh/plrl-up-demos/pull/2543

It pins console to sha-90e44fc from this PR head and is ready for review/merge.

@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot

plural-copilot Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

The deploy GitOps PR has been created: https://github.com/pluralsh/plrl-up-demos/pull/2544

@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot

plural-copilot Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

GitOps PR https://github.com/pluralsh/plrl-up-demos/pull/2545 deploys console PR #3971 head 7fa5f36 to demo.

@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot plural-copilot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment follow-up: the demo GitOps update is tracked in https://github.com/pluralsh/plrl-up-demos/pull/2546. It deploys image tag sha-da0dd78.

This provides some basic logic for a stylized repo mention, fetching repo urls from either the agent runtimes history list or the allowed repositories in the wb.
@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot

plural-copilot Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Deployment GitOps PR: https://github.com/pluralsh/plrl-up-demos/pull/2554 — updates the demo console image to sha-aa028b2.

@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot plural-copilot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitOps deployment PR for this change: https://github.com/pluralsh/plrl-up-demos/pull/2556

@michaeljguarino
michaeljguarino merged commit e4dc2e7 into master Aug 7, 2026
211 of 223 checks passed
@michaeljguarino
michaeljguarino deleted the repo-mention-wb branch August 7, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants