@opentiny/next-sdk 0.2.5 → 0.2.6
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/dist/index.es.dev.js +179 -134
- package/dist/index.es.js +8721 -8688
- package/dist/index.js +2 -2
- package/dist/index.umd.dev.js +179 -134
- package/dist/index.umd.js +53 -53
- package/dist/skills/index.d.ts +2 -2
- package/dist/webagent.dev.js +177 -132
- package/dist/webagent.es.dev.js +177 -132
- package/dist/webagent.es.js +8253 -8220
- package/dist/webagent.js +51 -51
- package/package.json +1 -1
- package/skills/index.ts +4 -4
package/package.json
CHANGED
package/skills/index.ts
CHANGED
|
@@ -80,14 +80,14 @@ export function formatSkillsForSystemPrompt(skills: SkillMeta[]): string {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* 获取所有已加载的技能文件路径(含主 SKILL.md 与 reference 下的 .md/.json/.xml 等)
|
|
84
84
|
*/
|
|
85
85
|
export function getSkillMdPaths(modules: Record<string, string>): string[] {
|
|
86
86
|
return Object.keys(modules)
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
90
|
+
* 根据相对路径获取某个技能文档的原始内容(支持 .md、.json、.xml 等文本格式)
|
|
91
91
|
*/
|
|
92
92
|
export function getSkillMdContent(modules: Record<string, string>, path: string): string | undefined {
|
|
93
93
|
return modules[path]
|
|
@@ -114,10 +114,10 @@ export type SkillToolsSet = Record<string, any>
|
|
|
114
114
|
export function createSkillTools(modules: Record<string, string>): SkillToolsSet {
|
|
115
115
|
const getSkillContent = tool({
|
|
116
116
|
description:
|
|
117
|
-
'
|
|
117
|
+
'根据技能名称或文档路径获取该技能的完整文档内容。传入 skillName(如 calculator)或 path(如 ./calculator/SKILL.md)。支持 .md、.json、.xml 等各类文本格式文件。',
|
|
118
118
|
inputSchema: z.object({
|
|
119
119
|
skillName: z.string().optional().describe('技能名称,与目录名一致,如 calculator'),
|
|
120
|
-
path: z.string().optional().describe('文档相对路径,如 ./calculator/SKILL.md 或 ./product-guide/reference/xxx.
|
|
120
|
+
path: z.string().optional().describe('文档相对路径,如 ./calculator/SKILL.md 或 ./product-guide/reference/xxx.json')
|
|
121
121
|
}),
|
|
122
122
|
execute: (args: { skillName?: string; path?: string }) => {
|
|
123
123
|
const { skillName, path: pathArg } = args
|