mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-10 17:35:11 +08:00
Register MANIFEST paths.localSkills alongside pack _skills.
Parse packaging-generated paths and load each local_skills/*/SKILL.md with the same hasSkills toggles and provider as shared packs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
6dee69be31
commit
53c47fbc6a
18 changed files with 662 additions and 156 deletions
|
|
@ -583,6 +583,7 @@ function unconfiguredKbSnapshot() {
|
|||
country: "",
|
||||
version: "",
|
||||
content: { ...EMPTY_CONTENT },
|
||||
paths: {},
|
||||
errorMessage: ""
|
||||
};
|
||||
}
|
||||
|
|
@ -604,6 +605,14 @@ function asKbSnapshot(value) {
|
|||
content[key] = flag === true;
|
||||
}
|
||||
}
|
||||
const pathsRaw = row.paths;
|
||||
const paths = {};
|
||||
if (pathsRaw !== null && typeof pathsRaw === "object" && !Array.isArray(pathsRaw)) {
|
||||
for (const [key, value2] of Object.entries(pathsRaw)) {
|
||||
if (typeof value2 === "string" && value2.trim())
|
||||
paths[key] = value2.trim();
|
||||
}
|
||||
}
|
||||
return {
|
||||
status,
|
||||
realRoot: typeof row.realRoot === "string" ? row.realRoot : "",
|
||||
|
|
@ -611,6 +620,7 @@ function asKbSnapshot(value) {
|
|||
country: typeof row.country === "string" ? row.country : "",
|
||||
version: typeof row.version === "string" ? row.version : "",
|
||||
content,
|
||||
paths,
|
||||
errorMessage: typeof row.errorMessage === "string" ? row.errorMessage : ""
|
||||
};
|
||||
}
|
||||
|
|
@ -2282,7 +2292,7 @@ var en = {
|
|||
groupInPreset: "In Netx Ops preset",
|
||||
groupPublic: "Publish to other presets",
|
||||
kbRoot: "Package root",
|
||||
kbRootHint: "Folder with MANIFEST.json (operator-subset v1.0). Browse auto-saves. Pack skills load from _skills/ when hasSkills.",
|
||||
kbRootHint: "Folder with MANIFEST.json (operator-subset v1.0). Browse auto-saves. Pack skills load from paths.skills/_skills and paths.localSkills when hasSkills.",
|
||||
kbBrowse: "Browse…",
|
||||
kbBrowseUnavailable: "Directory picker unavailable — paste an absolute folder path, then Save.",
|
||||
kbBrowseFailed: "Browse failed: {detail}",
|
||||
|
|
@ -2355,7 +2365,7 @@ var zh = {
|
|||
groupInPreset: "在 Netx Ops 预设中启用",
|
||||
groupPublic: "对其他预设公开",
|
||||
kbRoot: "知识包根目录",
|
||||
kbRootHint: "含 MANIFEST.json 的运营商子集包(v1.0)。浏览选目录后会自动保存;hasSkills 时加载 _skills/。",
|
||||
kbRootHint: "含 MANIFEST.json 的运营商子集包(v1.0)。浏览选目录后会自动保存;hasSkills 时加载 paths.skills/_skills 与 paths.localSkills。",
|
||||
kbBrowse: "浏览…",
|
||||
kbBrowseUnavailable: "目录选择器不可用 — 请粘贴绝对目录路径后点保存。",
|
||||
kbBrowseFailed: "浏览失败:{detail}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue