@@ -53,25 +53,13 @@ interface StoreEntry {
5353
5454
5555function platformFnToDefinition ( fn : FunctionNode ) : NodeDefinition {
56- const inputs : Array < { name : string ; type : string } > = [ ] ;
57- const secrets = ( fn . requiredSecrets ?? [ ] ) as FunctionRequirement [ ] ;
58- const configs = ( fn . requiredConfigs ?? [ ] ) as FunctionRequirement [ ] ;
59-
60- for ( const s of secrets ) {
61- if ( s . name ) inputs . push ( { name : s . name , type : 'string' } ) ;
62- }
63- for ( const c of configs ) {
64- if ( c . name ) inputs . push ( { name : c . name , type : 'string' } ) ;
65- }
66- // Fallback: if no fields declared, expose a generic payload input
67- if ( inputs . length === 0 ) inputs . push ( { name : 'payload' , type : 'json' } ) ;
68-
6956 return {
7057 context : fn . scope || 'platform' ,
7158 name : fn . taskIdentifier || fn . name || '' ,
7259 category : 'functions' ,
7360 description : fn . description || undefined ,
74- inputs,
61+ // TODO: pull typed ports from handler.json inputs/outputs once stored in DB
62+ inputs : [ { name : 'payload' , type : 'json' } ] ,
7563 outputs : [ { name : 'result' , type : 'json' } ] ,
7664 icon : fn . isInvocable ? 'zap' : 'circle' ,
7765 } ;
@@ -143,8 +131,6 @@ const FUNCTION_FIELDS = {
143131 isBuiltIn : true ,
144132 scope : true ,
145133 description : true ,
146- requiredSecrets : true ,
147- requiredConfigs : true ,
148134} as const ;
149135
150136const STORE_FIELDS = { id : true , name : true , hash : true } as const ;
0 commit comments