Skip to content

Commit 8ed2e81

Browse files
committed
fix(mothership): remove leftover touch_plan tool references
touch_plan was removed from the copilot tool catalog earlier, but the Sim side still referenced it. Regenerating the generated tool catalog (for enrichment_run) synced it to the current contract and dropped the stale TouchPlan export, which broke the build where router.ts still imported it. Remove the dead touch_plan server tool and its test, drop its router registration and WRITE_ACTIONS entry, simplify getServerToolRegistry (no more beta-gated server tools), and clean up stale "use touch_plan" guidance strings.
1 parent 945c526 commit 8ed2e81

5 files changed

Lines changed: 3 additions & 310 deletions

File tree

apps/sim/lib/copilot/tools/server/files/create-file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const createFileServerTool: BaseServerTool<CreateFileArgs, CreateFileResu
5656
return {
5757
success: false,
5858
message:
59-
'create_file does not initialize plan aliases. Use touch_plan for new workspace or workflow plans; changelog.md is created automatically per workflow.',
59+
'create_file does not initialize plan aliases; changelog.md is created automatically per workflow.',
6060
}
6161
}
6262
const contentType = outputFile?.mimeType ?? inferContentType(outputPath, explicitType)

apps/sim/lib/copilot/tools/server/files/touch-plan.test.ts

Lines changed: 0 additions & 143 deletions
This file was deleted.

apps/sim/lib/copilot/tools/server/files/touch-plan.ts

Lines changed: 0 additions & 152 deletions
This file was deleted.

apps/sim/lib/copilot/tools/server/router.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
MoveFileFolder,
2020
RenameFile,
2121
RenameFileFolder,
22-
TouchPlan,
2322
UserTable,
2423
WorkspaceFile,
2524
} from '@/lib/copilot/generated/tool-catalog-v1'
@@ -45,7 +44,6 @@ import {
4544
renameFileFolderServerTool,
4645
} from '@/lib/copilot/tools/server/files/file-folders'
4746
import { renameFileServerTool } from '@/lib/copilot/tools/server/files/rename-file'
48-
import { touchPlanServerTool } from '@/lib/copilot/tools/server/files/touch-plan'
4947
import { workspaceFileServerTool } from '@/lib/copilot/tools/server/files/workspace-file'
5048
import { validateGeneratedToolPayload } from '@/lib/copilot/tools/server/generated-schema'
5149
import { generateImageServerTool } from '@/lib/copilot/tools/server/image/generate-image'
@@ -60,7 +58,6 @@ import { getCredentialsServerTool } from '@/lib/copilot/tools/server/user/get-cr
6058
import { setEnvironmentVariablesServerTool } from '@/lib/copilot/tools/server/user/set-environment-variables'
6159
import { editWorkflowServerTool } from '@/lib/copilot/tools/server/workflow/edit-workflow'
6260
import { queryLogsServerTool } from '@/lib/copilot/tools/server/workflow/query-logs'
63-
import { isMothershipBetaFeaturesEnabled } from '@/lib/core/config/feature-flags'
6461

6562
export type ExecuteResponseSuccess = z.output<typeof ExecuteResponseSuccessSchema>
6663

@@ -113,7 +110,6 @@ const WRITE_ACTIONS: Record<string, string[]> = {
113110
[WorkspaceFile.id]: ['create', 'append', 'update', 'delete', 'rename', 'patch'],
114111
[editContentServerTool.name]: ['*'],
115112
[CreateFile.id]: ['*'],
116-
[TouchPlan.id]: ['*'],
117113
[RenameFile.id]: ['*'],
118114
[DeleteFile.id]: ['*'],
119115
[MoveFile.id]: ['*'],
@@ -157,7 +153,6 @@ const baseServerToolRegistry: Record<string, BaseServerTool> = {
157153
[workspaceFileServerTool.name]: workspaceFileServerTool,
158154
[editContentServerTool.name]: editContentServerTool,
159155
[createFileServerTool.name]: createFileServerTool,
160-
[touchPlanServerTool.name]: touchPlanServerTool,
161156
[renameFileServerTool.name]: renameFileServerTool,
162157
[deleteFileServerTool.name]: deleteFileServerTool,
163158
[moveFileServerTool.name]: moveFileServerTool,
@@ -174,12 +169,7 @@ const baseServerToolRegistry: Record<string, BaseServerTool> = {
174169
}
175170

176171
function getServerToolRegistry(): Record<string, BaseServerTool> {
177-
if (isMothershipBetaFeaturesEnabled) {
178-
return baseServerToolRegistry
179-
}
180-
const registry = { ...baseServerToolRegistry }
181-
delete registry[touchPlanServerTool.name]
182-
return registry
172+
return baseServerToolRegistry
183173
}
184174

185175
export function getRegisteredServerToolNames(): string[] {

apps/sim/lib/copilot/vfs/resource-writer.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,7 @@ async function resolveWorkflowAliasFileTarget(args: {
207207
includeReservedSystemFolders: true,
208208
})
209209
if (!folderId) {
210-
throw new Error(
211-
`Plan backing directory is not provisioned for ${args.alias.aliasPath}. Create the plan with touch_plan first.`
212-
)
210+
throw new Error(`Plan backing directory is not provisioned for ${args.alias.aliasPath}.`)
213211
}
214212

215213
return {

0 commit comments

Comments
 (0)