@digipair/skill-editor 0.73.6 → 0.74.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +34 -0
- package/index.esm.js +34 -1
- package/libs/skill-editor/src/lib/skill-editor.d.ts +1 -0
- package/package.json +6 -1
- package/schema.fr.json +9 -0
- package/schema.json +9 -0
package/index.cjs.js
CHANGED
|
@@ -15177,6 +15177,38 @@ let EditorService = class EditorService {
|
|
|
15177
15177
|
}));
|
|
15178
15178
|
return list;
|
|
15179
15179
|
}
|
|
15180
|
+
async tools(params, _pinsSettingsList, context) {
|
|
15181
|
+
const { language = 'en' } = params;
|
|
15182
|
+
const packageFile = require.resolve('./package.json');
|
|
15183
|
+
const infos = require(packageFile);
|
|
15184
|
+
const dependencies = Object.keys(infos.dependencies);
|
|
15185
|
+
const list = [];
|
|
15186
|
+
for (const dependency of dependencies){
|
|
15187
|
+
try {
|
|
15188
|
+
const toolPath = require.resolve(dependency + '/package.json');
|
|
15189
|
+
const content = require(toolPath);
|
|
15190
|
+
if (content.keywords.includes('digipair') && content.keywords.includes('service') && content.keywords.includes('tool')) {
|
|
15191
|
+
let schemasPath = require.resolve(`${dependency}/schema.json`);
|
|
15192
|
+
if (language !== 'en') {
|
|
15193
|
+
try {
|
|
15194
|
+
schemasPath = require.resolve(`${dependency}/schema.${language}.json`);
|
|
15195
|
+
} catch (e) {}
|
|
15196
|
+
}
|
|
15197
|
+
const schema = JSON.parse(await promises.readFile(schemasPath, 'utf8'));
|
|
15198
|
+
list.push({
|
|
15199
|
+
name: dependency,
|
|
15200
|
+
summary: schema.infos.summary,
|
|
15201
|
+
description: schema.infos.description,
|
|
15202
|
+
version: schema.infos.version,
|
|
15203
|
+
icon: schema.infos['x-icon']
|
|
15204
|
+
});
|
|
15205
|
+
}
|
|
15206
|
+
} catch (error) {
|
|
15207
|
+
continue;
|
|
15208
|
+
}
|
|
15209
|
+
}
|
|
15210
|
+
return list;
|
|
15211
|
+
}
|
|
15180
15212
|
};
|
|
15181
15213
|
const setReasoning = (params, pinsSettingsList, context)=>new EditorService().setReasoning(params, pinsSettingsList, context);
|
|
15182
15214
|
const reasonings = (params, pinsSettingsList, context)=>new EditorService().reasonings(params, pinsSettingsList, context);
|
|
@@ -15190,6 +15222,7 @@ const addDigipair = (params, pinsSettingsList, context)=>new EditorService().add
|
|
|
15190
15222
|
const metadata = (params, pinsSettingsList, context)=>new EditorService().metadata(params, pinsSettingsList, context);
|
|
15191
15223
|
const templates = (params, pinsSettingsList, context)=>new EditorService().templates(params, pinsSettingsList, context);
|
|
15192
15224
|
const schemas = (params, pinsSettingsList, context)=>new EditorService().schemas(params, pinsSettingsList, context);
|
|
15225
|
+
const tools = (params, pinsSettingsList, context)=>new EditorService().tools(params, pinsSettingsList, context);
|
|
15193
15226
|
|
|
15194
15227
|
exports.addDigipair = addDigipair;
|
|
15195
15228
|
exports.digipair = digipair;
|
|
@@ -15203,3 +15236,4 @@ exports.schemas = schemas;
|
|
|
15203
15236
|
exports.setDigipair = setDigipair;
|
|
15204
15237
|
exports.setReasoning = setReasoning;
|
|
15205
15238
|
exports.templates = templates;
|
|
15239
|
+
exports.tools = tools;
|
package/index.esm.js
CHANGED
|
@@ -15173,6 +15173,38 @@ let EditorService = class EditorService {
|
|
|
15173
15173
|
}));
|
|
15174
15174
|
return list;
|
|
15175
15175
|
}
|
|
15176
|
+
async tools(params, _pinsSettingsList, context) {
|
|
15177
|
+
const { language = 'en' } = params;
|
|
15178
|
+
const packageFile = require.resolve('./package.json');
|
|
15179
|
+
const infos = require(packageFile);
|
|
15180
|
+
const dependencies = Object.keys(infos.dependencies);
|
|
15181
|
+
const list = [];
|
|
15182
|
+
for (const dependency of dependencies){
|
|
15183
|
+
try {
|
|
15184
|
+
const toolPath = require.resolve(dependency + '/package.json');
|
|
15185
|
+
const content = require(toolPath);
|
|
15186
|
+
if (content.keywords.includes('digipair') && content.keywords.includes('service') && content.keywords.includes('tool')) {
|
|
15187
|
+
let schemasPath = require.resolve(`${dependency}/schema.json`);
|
|
15188
|
+
if (language !== 'en') {
|
|
15189
|
+
try {
|
|
15190
|
+
schemasPath = require.resolve(`${dependency}/schema.${language}.json`);
|
|
15191
|
+
} catch (e) {}
|
|
15192
|
+
}
|
|
15193
|
+
const schema = JSON.parse(await readFile(schemasPath, 'utf8'));
|
|
15194
|
+
list.push({
|
|
15195
|
+
name: dependency,
|
|
15196
|
+
summary: schema.infos.summary,
|
|
15197
|
+
description: schema.infos.description,
|
|
15198
|
+
version: schema.infos.version,
|
|
15199
|
+
icon: schema.infos['x-icon']
|
|
15200
|
+
});
|
|
15201
|
+
}
|
|
15202
|
+
} catch (error) {
|
|
15203
|
+
continue;
|
|
15204
|
+
}
|
|
15205
|
+
}
|
|
15206
|
+
return list;
|
|
15207
|
+
}
|
|
15176
15208
|
};
|
|
15177
15209
|
const setReasoning = (params, pinsSettingsList, context)=>new EditorService().setReasoning(params, pinsSettingsList, context);
|
|
15178
15210
|
const reasonings = (params, pinsSettingsList, context)=>new EditorService().reasonings(params, pinsSettingsList, context);
|
|
@@ -15186,5 +15218,6 @@ const addDigipair = (params, pinsSettingsList, context)=>new EditorService().add
|
|
|
15186
15218
|
const metadata = (params, pinsSettingsList, context)=>new EditorService().metadata(params, pinsSettingsList, context);
|
|
15187
15219
|
const templates = (params, pinsSettingsList, context)=>new EditorService().templates(params, pinsSettingsList, context);
|
|
15188
15220
|
const schemas = (params, pinsSettingsList, context)=>new EditorService().schemas(params, pinsSettingsList, context);
|
|
15221
|
+
const tools = (params, pinsSettingsList, context)=>new EditorService().tools(params, pinsSettingsList, context);
|
|
15189
15222
|
|
|
15190
|
-
export { addDigipair, digipair, digipairs, metadata, reasoning, reasonings, removeDigipair, removeReasoning, schemas, setDigipair, setReasoning, templates };
|
|
15223
|
+
export { addDigipair, digipair, digipairs, metadata, reasoning, reasonings, removeDigipair, removeReasoning, schemas, setDigipair, setReasoning, templates, tools };
|
|
@@ -11,3 +11,4 @@ export declare const addDigipair: (params: any, pinsSettingsList: PinsSettings[]
|
|
|
11
11
|
export declare const metadata: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
12
12
|
export declare const templates: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<string[]>;
|
|
13
13
|
export declare const schemas: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any[]>;
|
|
14
|
+
export declare const tools: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any[]>;
|
package/package.json
CHANGED
package/schema.fr.json
CHANGED
|
@@ -390,6 +390,15 @@
|
|
|
390
390
|
],
|
|
391
391
|
"x-events": []
|
|
392
392
|
}
|
|
393
|
+
},
|
|
394
|
+
"/tools": {
|
|
395
|
+
"post": {
|
|
396
|
+
"tags": ["service"],
|
|
397
|
+
"summary": "Liste des outils",
|
|
398
|
+
"descriptions": "Liste des outils disponibles",
|
|
399
|
+
"parameters": [],
|
|
400
|
+
"x-events": []
|
|
401
|
+
}
|
|
393
402
|
}
|
|
394
403
|
},
|
|
395
404
|
"components": {
|
package/schema.json
CHANGED
|
@@ -390,6 +390,15 @@
|
|
|
390
390
|
],
|
|
391
391
|
"x-events": []
|
|
392
392
|
}
|
|
393
|
+
},
|
|
394
|
+
"/tools": {
|
|
395
|
+
"post": {
|
|
396
|
+
"tags": ["service"],
|
|
397
|
+
"summary": "List tools",
|
|
398
|
+
"descriptions": "Lists the available tools",
|
|
399
|
+
"parameters": [],
|
|
400
|
+
"x-events": []
|
|
401
|
+
}
|
|
393
402
|
}
|
|
394
403
|
},
|
|
395
404
|
"components": {
|