verifiers icon indicating copy to clipboard operation
verifiers copied to clipboard

Add verifiers.mcp Submodule to support mcp agents

Open vyomakesh0728 opened this issue 1 month ago • 1 comments

Description

Moves the MCP protocol/environment support files (MCPServerConnection, MCPToolWrapper, MCPServerConfig) from environments/mcp_env/src/ to a new, dedicated submodule: verifiers/mcp/.

This change does not modify any underlying logic or implementation—just code location for package structure and developer convenience to implement seamlessly for mcp agents from the sheet.

Type of Change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Documentation update
  • [ ] Test improvement

Testing

  • [x] All existing tests pass when running uv run pytest locally.
  • [ ] New tests have been added to cover the changes

Checklist

  • [x] My code follows the style guidelines of this project as outlined in AGENTS.md
  • [ ] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] My changes generate no new warnings
  • [ ] Any dependent changes have been merged and published

Additional Notes

vyomakesh0728 avatar Oct 28 '25 14:10 vyomakesh0728

We just had a discussion at our company, and we also wanted to open this issue. I think puck editor should provide this feature.

There is one additional small improvement. We have the issue, when offering 10+ components in the left sidebar, the outline out of sight. I like how cursor ai editor solves this with little tabs at the top of the left sidebar. This could be a solution for that. So we would need 2 tabs - one for components, one for outline. Probably this "tabs" could be pluggable - for custom functions in puck editor.

Image

lukasfischer avatar May 06 '25 14:05 lukasfischer

#634 included comments requesting a feature to allow the user to rename each outline item for large payloads, where the component name itself could be repeated multiple times and become more confusing than helpful as an identifier in the UI.

It also suggested allowing the developer to override how this item is presented to the user with an override like this:

const overrides = {
  // These "props" would hold the props given to the component the item represents. 
  // Here I'm assuming there is a title.
  outlineItem: ({ props }) => (
    <Puck.OutlineItem>{props.title}</Puck.OutlineItem>
  ),
};

FedericoBonel avatar Jul 18 '25 06:07 FedericoBonel

Here to chime in a great UX example of how dnd could be implemented in the outline, Shopify's Theme editor takes the crown for the ones I've used in the past:

Key highlights:

Zoom out view when moving page sections (maybe could be enabled via an API in Puck, something that signals that dragging this item zooms out the viewport)

https://github.com/user-attachments/assets/098ec99d-16e9-428c-abb2-8b6bdc2b6348

Reordering slots of a parent component, and also changing their parent

https://github.com/user-attachments/assets/ff4a8838-b802-47d8-8b3f-74fa180c7f2c

Folding composable components

https://github.com/user-attachments/assets/5dfcba49-fd7b-4283-bfaa-1020fe467a61

Add a component via the outline through a popover. Also smart "Add component" buttons that show up for the root outline but also for empty slots

https://github.com/user-attachments/assets/be603e5c-b5f3-48a0-a7d1-feb6508aa3c0

Removing, hiding, duplicating, copying, pasting and renaming components through the outline

https://github.com/user-attachments/assets/38647c71-4c96-4791-9854-bd6df971a8f7

muchisx avatar Jul 24 '25 17:07 muchisx

Similar to what was requested in #634, issue #1271 also proposed the ability to override the outline and outline items to provide custom components for them. What they proposed is the following:

I'm assuming that, like in #634, Proposal 1 would receive the current component data as the prop for the OutlineItem override, allowing for customized rendering behavior based on the component type.


Proposals

Proposal 1

Introduce a configuration option in the editor setup that allows developers to provide custom render functions or components for Outline and OutlineItem.

For example:

<Puck
  overrides={{
    Outline: CustomOutline,
    OutlineItem: CustomOutlineItem,
  }}
/>

Proposal 2: Extending ComponentConfig with a getOutlineItem option

export type ComponentConfig<Props = any> = {
  render: (props: Props) => React.ReactNode;
  fields?: Fields;
  defaultProps?: Partial<Props>;

  getOutlineItem?: (props: Props) => React.ReactNode;
};

FedericoBonel avatar Aug 26 '25 06:08 FedericoBonel

I think proposal two is way better because it is linked to the component at the end of the day. In my project we did a lot of custom component I think it should better to avoid adding too much component in the config to avoid creating re-render it the component is complex

b-barry avatar Aug 26 '25 06:08 b-barry

I'd like to push 2'nd proposal since it could be customized with each component users want to do. In 1'st proposal, we can't modify OutlineItem depending on each component. It is possible, but it would require a lot of conditional statements based on the component type.

ojj1123 avatar Aug 26 '25 06:08 ojj1123