@yottameta/yotta-skills-plugin 0.22.1 → 0.22.2

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.
@@ -12,7 +12,7 @@
12
12
  "authentication": "ON_INSTALL"
13
13
  },
14
14
  "category": "Developer Tools",
15
- "version": "0.22.1",
15
+ "version": "0.22.2",
16
16
  "description": "YuanGe (元阁) - orchestration routing, inventory, and one-command installer for the YottaMeta skill family (zero dependencies, Node.js only).",
17
17
  "interface": {
18
18
  "displayName": "元阁 yotta-skills",
@@ -12,7 +12,7 @@
12
12
  "authentication": "ON_INSTALL"
13
13
  },
14
14
  "category": "Developer Tools",
15
- "version": "0.22.1",
15
+ "version": "0.22.2",
16
16
  "description": "YuanGe (元阁) - orchestration routing, inventory, and one-command installer for the YottaMeta skill family (zero dependencies, Node.js only).",
17
17
  "interface": {
18
18
  "displayName": "元阁 yotta-skills",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yottameta/yotta-skills-plugin",
3
- "version": "0.22.1",
3
+ "version": "0.22.2",
4
4
  "description": "YuanGe (元阁) — orchestration and routing for the YottaMeta skill family, packaged as a YottaMeta Agent Plugin and DeepSeek Harness profile bundle.",
5
5
  "license": "MIT",
6
6
  "keywords": [
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "yotta-skills",
4
- "version": "0.22.1",
4
+ "version": "0.22.2",
5
5
  "description": "YuanGe (元阁) - orchestration routing, inventory, and one-command installer for the YottaMeta skill family (zero dependencies, Node.js only).",
6
6
  "author": {
7
7
  "name": "YottaMeta",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yotta-skills
3
- version: 0.22.1
3
+ version: 0.22.2
4
4
  description: 元阁 -- 元阁全家技能的总编排策划 + 编排路由 + 一键安装器 + 技能盘点 + 运行时 hook 适配。路由层:--route / route_request 按需求摘要给出候选组合、调用顺序、角色、置信度、依据、已装/缺失状态与安装命令,只建议不自动安装;非元阁家族已装技能按 frontmatter description 机械匹配作并列候选(标注来源与未扫描状态,只读不自动调用);M1 记忆裁决层:usage enable/mark 本地结构化记录 + decide-memory / MCP decide_memory 输出 promote / hold / demote 只读建议(需授权 provider;只建议不删除、不自动写元忆);策划层:按场景给出「该组合哪几个元技能、组合强在哪、怎么组合使用(安装与调用均由用户确认后执行)」;安装层:一条命令把 YottaMeta 已发布的全部 yotta-* 技能装进指定智能体或目录(默认 --pin 锁死清单精确版本);盘点层:--inventory / --reindex 扫描本机已装技能生成/更新注册表,新装技能自动被发现(install/update 后自动 re-index,会话开工只建议跑本地 --reindex;更新检查走手动 --check 或后台 --check --scheduled);运行时适配层:hook capabilities / evaluate / bind / unbind 按宿主能力矩阵执行六个统一事件并留证降级,元信 before_install 已接入安装管线;自包含零依赖,不依赖任何元技能;MCP 按需加载且需用户确认后写入配置(可选:list_installed_skills/describe_skill/reindex/route_request/decide_memory,不常驻,未加载降级 CLI)。支持 --list 清单 / --route 路由 / usage 使用记录 / decide-memory 记忆裁决 / install / update / update --check(只读检查)/ update --check --scheduled(后台周检)/ update --auto(家族自动更新)/ hook 适配 / --inventory / --reindex / --dry-run 预览 / --pin(默认)/ --range。触发:需要批量安装或更新元阁全家技能、按场景组合多个元技能、路由或判断该用哪些技能、判断哪些技能值得长期记忆、查看或记录技能使用信号、盘点或查看本机已装技能、重扫技能注册表、给某个智能体或目录一次性铺齐 yotta-* 技能、评估宿主 hook 能力、预览安装清单、锁版本安装、或用户说 元阁/装全家/一次装齐/yotta-skills/install-all/更新全家/检查更新/自动更新/hook 适配/该用哪个技能/路由技能/记忆裁决/技能该不该记住/盘点技能/查看已装技能 等。边界(Do NOT trigger):只做「组合策划 + 静态路由建议 + M1 记忆裁决只读建议 + 清单 + 下载 + 落位 + 汇总 + 盘点 + re-index + hook 适配」,不含技能本体、不做技能内容开发、不 -g 污染全局、不自动安装缺失技能、不静默写宿主配置或全局记忆、不自动删除技能或记忆;家族安装先自举或调用元信装前门禁,DO NOT INSTALL 阻断,非元阁家族包不自动安装。
5
5
  license: MIT
6
6
  metadata:
@@ -166,7 +166,7 @@ openclaw skills update @yottameta/yotta-skills
166
166
  | `update --check [--agent <name> \| --dir <path>]` | 只读检查更新:联网对 npm 最新,不改动;退出码 0=全部最新 / 3=有更新 / 1=查失败 |
167
167
  | `update --check --scheduled [--agent <name> \| --dir <path>]` | 后台周检入口:未到期不联网;到期只检查一次并写本地缓存;文本失败静默,`--json` 保留诊断;始终退出 0 |
168
168
  | `update --auto [--agent <name> \| --dir <path>]` | 检查到家族更新后自动更新(仅 yotta-* 自家家族,含装前安全扫描) |
169
- | `doctor [--agent <name> \| --dir <path>] [--slug <slug>]` | 只读自检:SKILL / 版本 / manifest / 注册表 / 自定义 doctor;`--json` 输出稳定字段 |
169
+ | `doctor [--agent <name> \| --dir <path>] [--slug <slug>]` | 只读自检:SKILL / 版本 / manifest / 注册表 / 自定义 doctor;`--dir` 可指向技能集合目录或单个技能包目录;退出码 0=通过 / 4=没有可检查对象 / 1=检查失败 / 6=manifest 身份失败 |
170
170
  | `rollback [--agent <name> \| --dir <path>] [--slug <slug>]` | 校验并恢复最近一次快照;`--list` 只列快照;`--json` 输出机器可读结果 |
171
171
  | `hook capabilities --host <name>` | 查看宿主六个统一事件的能力等级;未知宿主默认 `unsupported` |
172
172
  | `hook evaluate --host <name> --event <event> --manifest <file> --context <json>` | 评估 manifest hook 声明,输出 allow / block / warn / unverified,并写结构化证据 |
@@ -262,7 +262,9 @@ npx -y @yottameta/yotta-skills update --auto --agent codex
262
262
 
263
263
  `doctor` 是只读自检,不会修改技能目录或注册表。它检查目标技能目录、`SKILL.md`、
264
264
  frontmatter 版本、manifest 身份、本地注册表记录,以及包内声明的自定义 doctor 脚本。
265
- `--json` 返回稳定字段,适合脚本和智能体消费。
265
+ `--dir` 既可指向包含多个 `yotta-*` 子目录的技能集合目录,也可直接指向单个技能包目录;
266
+ 后者会按 `SKILL.md` / `skill-manifest.json` 自动识别技能身份。`--json` 返回稳定字段,
267
+ 适合脚本和智能体消费。退出码:`0` 通过,`4` 没有可检查对象,`1` 检查失败,`6` manifest 身份失败。
266
268
 
267
269
  ```bash
268
270
  npx -y @yottameta/yotta-skills doctor --agent codex --slug yotta-memory
@@ -42,7 +42,7 @@ const m1FeaturesLib = require('../lib/m1-features');
42
42
  const { createInstaller, isSafeTarEntry } = require('../lib/install-pipeline');
43
43
 
44
44
  const PKG_ROOT = path.join(__dirname, '..');
45
- let VERSION = '0.22.1';
45
+ let VERSION = '0.22.2';
46
46
  try { VERSION = require(path.join(PKG_ROOT, 'package.json')).version; } catch (_) { /* keep fallback */ }
47
47
 
48
48
  function loadManifest() {
@@ -820,27 +820,62 @@ function runCustomDoctor(skillDir, dest) {
820
820
  });
821
821
  }
822
822
 
823
+ function withDoctorTarget(skill, target) {
824
+ return Object.assign({}, skill, { target });
825
+ }
826
+
827
+ function selfDoctorTarget(dest) {
828
+ const meta = readInstalledMeta(dest);
829
+ const manifest = readInstalledManifest(dest);
830
+ const candidates = [
831
+ manifest && manifest.slug,
832
+ meta.name,
833
+ path.basename(dest),
834
+ ]
835
+ .filter(Boolean)
836
+ .map((value) => String(value).trim().toLowerCase());
837
+
838
+ for (const slug of candidates) {
839
+ const skill = familySkillFor(slug);
840
+ if (skill) return withDoctorTarget(skill, dest);
841
+ }
842
+ return null;
843
+ }
844
+
823
845
  function doctorTargets(opts, dest) {
846
+ const self = selfDoctorTarget(dest);
824
847
  if (opts.slug) {
848
+ if (self && self.slug === opts.slug) return [self];
825
849
  const skill = familySkillFor(opts.slug);
826
- return skill ? [skill] : [];
850
+ return skill ? [withDoctorTarget(skill, path.join(dest, skill.slug))] : [];
827
851
  }
828
852
  if (opts.skills.length) {
829
- return opts.skills.map((slug) => familySkillFor(slug)).filter(Boolean);
853
+ const targets = [];
854
+ for (const slug of opts.skills) {
855
+ if (self && self.slug === slug) {
856
+ targets.push(self);
857
+ continue;
858
+ }
859
+ const skill = familySkillFor(slug);
860
+ if (skill) targets.push(withDoctorTarget(skill, path.join(dest, skill.slug)));
861
+ }
862
+ return targets;
830
863
  }
831
864
  const found = [];
832
865
  let entries;
833
- try { entries = fs.readdirSync(dest, { withFileTypes: true }); } catch (_) { return found; }
866
+ try { entries = fs.readdirSync(dest, { withFileTypes: true }); } catch (_) { return self ? [self] : found; }
834
867
  for (const entry of entries) {
835
868
  if (!entry.isDirectory() || !/^yotta-/.test(entry.name)) continue;
836
869
  const skill = familySkillFor(entry.name);
837
- if (skill) found.push(skill);
870
+ if (skill) found.push(withDoctorTarget(skill, path.join(dest, skill.slug)));
838
871
  }
872
+ if (found.length === 0 && self) return [self];
839
873
  return found;
840
874
  }
841
875
 
842
876
  function doctorExitCode(payload) {
843
877
  if (payload.ok) return 0;
878
+ if (payload.checked === 0) return 4;
844
879
  const manifestFailure = payload.results.some((result) =>
845
880
  (result.checks || []).some((check) =>
846
881
  (check.id === 'manifest' || check.id === 'manifest_trust') && !check.ok));
@@ -861,7 +896,7 @@ function runDoctor(opts, dest) {
861
896
  }
862
897
 
863
898
  for (const skill of targets) {
864
- const target = path.join(dest, skill.slug);
899
+ const target = skill.target || path.join(dest, skill.slug);
865
900
  const result = healthLib.checkInstalledSkill({
866
901
  slug: skill.slug,
867
902
  target,
@@ -145,6 +145,8 @@ yotta-skills doctor --dir <skills-dir> --json
145
145
 
146
146
  doctor 只读检查目录、`SKILL.md`、版本、manifest 身份、注册表记录和自定义 doctor,
147
147
  不会修改目标目录或注册表。注册表版本不一致属于 warning,可用 `--reindex` 修复。
148
+ `--dir` 也可以直接指向单个技能包目录,此时会按 `SKILL.md` / `skill-manifest.json` / 目录名自动识别技能身份。
149
+ 退出码:`0` 通过,`4` 没有可检查对象,`1` 检查失败,`6` manifest / 身份校验失败。
148
150
 
149
151
  ## 安装证据
150
152
 
@@ -164,7 +166,7 @@ doctor 只读检查目录、`SKILL.md`、版本、manifest 身份、注册表记
164
166
  | 0 | 成功(含全部跳过) |
165
167
  | 1 | 安装 / 更新存在失败项 |
166
168
  | 2 | 用法错误(未知参数 / 未知技能 / 未收录智能体) |
167
- | 4 | 未指定目标且当前目录未检测到项目级技能目录 |
169
+ | 4 | 未指定目标且当前目录未检测到项目级技能目录,或 doctor 没有可检查的元阁家族技能 |
168
170
  | 5 | 装前 gate 阻断或元信不可用 |
169
171
  | 6 | manifest / 身份校验失败 |
170
172
 
@@ -27,7 +27,7 @@ import subprocess
27
27
  import sys
28
28
  from pathlib import Path
29
29
 
30
- VERSION = "0.22.1"
30
+ VERSION = "0.22.2"
31
31
  TOOL_NAME = "yotta-skills"
32
32
  CN_NAME = "元阁"
33
33
  MCP_PROTOCOL_MODERN = "2026-07-28"