mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-26 08:01:38 +00:00
fix: let plan mode use the hub integration lookup
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1972,6 +1972,14 @@ describe('createSearchHubScriptsTool', () => {
|
||||
})
|
||||
|
||||
describe('getHubIntegrationTool', () => {
|
||||
// The plan-mode gate fails closed, so a read-only tool that is not tagged is
|
||||
// silently unusable while planning.
|
||||
it('is usable while planning, like the hub search beside it', async () => {
|
||||
const { getHubIntegrationTool, createSearchHubScriptsTool } = await import('./shared')
|
||||
expect(getHubIntegrationTool.planModeSafe).toBe(true)
|
||||
expect(createSearchHubScriptsTool().planModeSafe).toBe(true)
|
||||
})
|
||||
|
||||
const doc = {
|
||||
app: 'confluence',
|
||||
display_name: 'Confluence',
|
||||
|
||||
@@ -1516,6 +1516,8 @@ function parseResourceTypeSchema(schema: unknown): unknown {
|
||||
|
||||
export const getHubIntegrationTool = {
|
||||
def: getHubIntegrationToolDef,
|
||||
// Reads one hub document over a GET and writes nothing, so planning may use it.
|
||||
planModeSafe: true,
|
||||
fn: async ({ args, toolId, toolCallbacks }) => {
|
||||
const { integration } = getHubIntegrationSchema.parse(args)
|
||||
toolCallbacks.setToolStatus(toolId, { content: `Reading the ${integration} integration...` })
|
||||
|
||||
Reference in New Issue
Block a user