This repository was archived by the owner on Feb 14, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ import { readSkillFile } from '../lib/SkillFs';
1212 * - return the content and mime type of the resource.
1313 */
1414export function createSkillResourceResolver ( provider : SkillRegistry ) {
15- const resolveResourceMap = ( skill : Skill , type : 'script' | 'asset' | 'reference' ) => {
16- if ( type === 'script' ) {
15+ const resolveResourceMap = ( skill : Skill , type : string ) => {
16+ if ( type === 'script' || type === 'scripts' ) {
1717 return skill . scripts ;
18- } else if ( type === 'asset' ) {
18+ } else if ( type === 'asset' || type === 'assets' ) {
1919 return skill . assets ;
20- } else if ( type === 'reference' ) {
20+ } else if ( type === 'reference' || type === 'references' ) {
2121 return skill . references ;
2222 } else {
2323 throw new Error ( `Unknown resource type: ${ type } ` ) ;
@@ -26,7 +26,7 @@ export function createSkillResourceResolver(provider: SkillRegistry) {
2626
2727 return async ( args : {
2828 skill_name : string ;
29- type : 'script' | 'asset' | 'reference' ;
29+ type : string ;
3030 relative_path : string ;
3131 } ) : Promise < {
3232 absolute_path : string ;
Original file line number Diff line number Diff line change 3232
3333import path from 'node:path' ;
3434import { createSkillResourceResolver } from '../services/SkillResourceResolver' ;
35- import { assertIsValidResourceType , SkillRegistry } from '../types' ;
35+ import { SkillRegistry } from '../types' ;
3636
3737export function createSkillResourceReader ( provider : SkillRegistry ) {
3838 const skillResourceResolver = createSkillResourceResolver ( provider ) ;
@@ -42,8 +42,6 @@ export function createSkillResourceReader(provider: SkillRegistry) {
4242
4343 const [ type , ...restPath ] = args . relative_path . split ( '/' ) ;
4444
45- assertIsValidResourceType ( type ) ;
46-
4745 const resource = await skillResourceResolver ( {
4846 skill_name : args . skill_name ,
4947 type,
You can’t perform that action at this time.
0 commit comments