Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Greptile SummaryThis PR adds a second tier of agent-block lint checks to the workflow edit pipeline. It extends the existing
Confidence Score: 5/5Safe to merge. The new lint path is entirely additive, gated on workspaceId, and wrapped in try/catch so any DB failure degrades gracefully without blocking the edit. All three DB-backed checks (custom tool, MCP server, skill) are correctly gated on workspaceId to avoid false positives, inline tools that carry their own schema are skipped, and the logger is now at module scope. The only note is that tool/skill DB lookups are issued sequentially rather than in parallel, which is a latency concern but not a correctness one. validation.ts — the sequential-await pattern in collectUnresolvedAgentToolReferences is worth optimising as agent blocks grow. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[edit-workflow request] --> B[applyOperationsToWorkflowState]
B --> C[collectUnresolvedReferences\ncredentials / resources]
C --> D[collectUnresolvedAgentToolReferences\ncustom-tool / mcp-tool / skill]
D --> E{workspaceId present?}
E -- No --> F[skip all DB checks\nno false positives]
E -- Yes --> G[Walk agent blocks]
G --> H{tool type?}
H -- custom-tool + no inline schema --> I[getCustomToolById\nDB lookup]
H -- mcp --> J[validateSelectorIds\nmcp-server-selector]
H -- other/workflow/integration --> K[pass through]
I --> L{resolved?}
J --> L
L -- No --> M[push UnresolvedSelectorReference\nkind: custom-tool / mcp-tool]
L -- Yes --> N[no lint error]
G --> O[Walk skills array]
O --> P[getSkillById\nbuiltin check + DB]
P --> Q{resolved?}
Q -- No --> R[push UnresolvedSelectorReference\nkind: skill]
Q -- Yes --> S[no lint error]
M --> T[unresolvedReferences + validationErrors]
R --> T
T --> U[formatWorkflowLintMessage\nseparate credential/resource vs tool/skill sections]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[edit-workflow request] --> B[applyOperationsToWorkflowState]
B --> C[collectUnresolvedReferences\ncredentials / resources]
C --> D[collectUnresolvedAgentToolReferences\ncustom-tool / mcp-tool / skill]
D --> E{workspaceId present?}
E -- No --> F[skip all DB checks\nno false positives]
E -- Yes --> G[Walk agent blocks]
G --> H{tool type?}
H -- custom-tool + no inline schema --> I[getCustomToolById\nDB lookup]
H -- mcp --> J[validateSelectorIds\nmcp-server-selector]
H -- other/workflow/integration --> K[pass through]
I --> L{resolved?}
J --> L
L -- No --> M[push UnresolvedSelectorReference\nkind: custom-tool / mcp-tool]
L -- Yes --> N[no lint error]
G --> O[Walk skills array]
O --> P[getSkillById\nbuiltin check + DB]
P --> Q{resolved?}
Q -- No --> R[push UnresolvedSelectorReference\nkind: skill]
Q -- Yes --> S[no lint error]
M --> T[unresolvedReferences + validationErrors]
R --> T
T --> U[formatWorkflowLintMessage\nseparate credential/resource vs tool/skill sections]
Reviews (2): Last reviewed commit: "improvement(validation): ensure type is ..." | Re-trigger Greptile |
|
@greptile |
Summary
Adds workflow lint for custom tool/skills/mcp tool additions to agent block
Companion: https://github.com/simstudioai/mothership/pull/335
Type of Change
Testing
Manual
Checklist