@@ -11,7 +11,10 @@ import { log } from '../../../utils/logging/index.ts';
1111import { createTextResponse } from '../../../utils/responses/index.ts' ;
1212import type { CommandExecutor } from '../../../utils/execution/index.ts' ;
1313import { getDefaultCommandExecutor } from '../../../utils/execution/index.ts' ;
14- import { createSessionAwareTool } from '../../../utils/typed-tool-factory.ts' ;
14+ import {
15+ createSessionAwareTool ,
16+ getSessionAwareToolSchemaShape ,
17+ } from '../../../utils/typed-tool-factory.ts' ;
1518import { nullifyEmptyStrings } from '../../../utils/schema-helpers.ts' ;
1619
1720// Unified schema: XOR between projectPath and workspacePath, sharing common options
@@ -43,6 +46,13 @@ const getDeviceAppPathSchema = baseSchema
4346// Use z.infer for type safety
4447type GetDeviceAppPathParams = z . infer < typeof getDeviceAppPathSchema > ;
4548
49+ const publicSchemaObject = baseSchemaObject . omit ( {
50+ projectPath : true ,
51+ workspacePath : true ,
52+ scheme : true ,
53+ configuration : true ,
54+ } as const ) ;
55+
4656export async function get_device_app_pathLogic (
4757 params : GetDeviceAppPathParams ,
4858 executor : CommandExecutor ,
@@ -147,12 +157,10 @@ export async function get_device_app_pathLogic(
147157export default {
148158 name : 'get_device_app_path' ,
149159 description : 'Retrieves the built app path for a connected device.' ,
150- schema : baseSchemaObject . omit ( {
151- projectPath : true ,
152- workspacePath : true ,
153- scheme : true ,
154- configuration : true ,
155- } as const ) . shape ,
160+ schema : getSessionAwareToolSchemaShape ( {
161+ sessionAware : publicSchemaObject ,
162+ legacy : baseSchemaObject ,
163+ } ) ,
156164 handler : createSessionAwareTool < GetDeviceAppPathParams > ( {
157165 internalSchema : getDeviceAppPathSchema as unknown as z . ZodType < GetDeviceAppPathParams > ,
158166 logicFunction : get_device_app_pathLogic ,
0 commit comments