@yottameta/yotta-skills-plugin 0.28.0 → 0.28.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.
@@ -12,7 +12,7 @@
12
12
  "authentication": "ON_INSTALL"
13
13
  },
14
14
  "category": "Developer Tools",
15
- "version": "0.28.0",
15
+ "version": "0.28.1",
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.28.0",
15
+ "version": "0.28.1",
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.28.0",
3
+ "version": "0.28.1",
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.28.0",
4
+ "version": "0.28.1",
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.28.0
3
+ version: 0.28.1
4
4
  description: 元阁 -- 元阁全家技能的总编排策划 + 编排路由 + 一键安装器 + 技能盘点 + 本机技能 Hub + 运行时 hook 适配。Hub 层:hub hosts 只读发现本机已装智能体与技能目录(文件系统优先,不读元忆;按已核实 / 自动发现 / 桥接分类);hub install / update 把技能装到 ~/.yottaskills/hub 单点真源(清单 27 + 特殊家族 5,特殊家族跟随各自 npm latest);hub link --all 用 Windows junction / POSIX symlink 分发到全部已核实宿主(默认范围;--include-discovered 显式纳入自动发现目录;锁 / 数据桥接目录永不链接),元技能在链接时收敛宿主旧副本(移入 ~/.yottaskills/trash 保留 7 天、版本闸门 Hub ≥ 宿主);hub unlink 只删链接、fail-closed;非元技能不参与更新(用户自行处理);hub status 显示来源、版本、链接与异常;view 启动本机技能枢纽面板(默认 127.0.0.1:8789,六视图 + 高级 CLI 页,写操作需页面令牌与确认);兼容 agentskills.io 技能格式、Vercel Labs skills CLI 的 .agents/skills 通用目录与 .skill-lock.json v3(只读)。路由层:--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 记忆裁决 / hub 技能 Hub / install / update / update --check(只读检查)/ update --check --scheduled(后台周检)/ update --auto(家族自动更新)/ hook 适配 / --inventory / --reindex / --dry-run 预览 / --pin(默认)/ --range。触发:需要批量安装或更新元阁全家技能、单点安装并分发到多个智能体、查看本机装了哪些智能体与技能目录、接管非元技能、按场景组合多个元技能、路由或判断该用哪些技能、判断哪些技能值得长期记忆、查看或记录技能使用信号、盘点或查看本机已装技能、重扫技能注册表、给某个智能体或目录一次性铺齐 yotta-* 技能、评估宿主 hook 能力、预览安装清单、锁版本安装、或用户说 元阁/装全家/一次装齐/yotta-skills/install-all/更新全家/检查更新/自动更新/hook 适配/该用哪个技能/路由技能/记忆裁决/技能该不该记住/盘点技能/查看已装技能/技能 Hub/单点安装/链接分发/接管技能/技能枢纽面板/图形化面板 等。边界(Do NOT trigger):只做「组合策划 + 静态路由建议 + M1 记忆裁决只读建议 + 清单 + 下载 + 落位 + 汇总 + 盘点 + re-index + Hub 本机真源与链接分发 + hook 适配」,不含技能本体、不做技能内容开发、不 -g 污染全局、不自动安装缺失技能、不静默写宿主配置或全局记忆、不自动删除技能或记忆;家族安装先自举或调用元信装前门禁,DO NOT INSTALL 阻断,非元阁家族包不自动安装。
5
5
  license: MIT
6
6
  metadata:
@@ -55,7 +55,7 @@ const { createInstaller, isSafeTarEntry } = require('../lib/install-pipeline');
55
55
  const { COPY_SKIP, copyDir } = require('../lib/copy-tree');
56
56
 
57
57
  const PKG_ROOT = path.join(__dirname, '..');
58
- let VERSION = '0.28.0';
58
+ let VERSION = '0.28.1';
59
59
  try { VERSION = require(path.join(PKG_ROOT, 'package.json')).version; } catch (_) { /* keep fallback */ }
60
60
 
61
61
  // @generated view-html:start
@@ -887,7 +887,11 @@ function ensureGate(context) {
887
887
  const installOne = createInstaller({
888
888
  runNpmPack,
889
889
  extractTarball,
890
- copyDir: (src, dst) => copyDir(src, dst, COPY_SKIP, true),
890
+ copyDir: (src, dst, options) => {
891
+ const skip = new Set(COPY_SKIP);
892
+ for (const name of (options && options.keep) || []) skip.delete(name);
893
+ copyDir(src, dst, skip, true);
894
+ },
891
895
  readInstalledVersion,
892
896
  ensureGate,
893
897
  scanTarget,
@@ -1932,7 +1936,10 @@ function hubTargetDirs(opts, discovery) {
1932
1936
  };
1933
1937
 
1934
1938
  if (opts.dir) {
1935
- if (agentDirsLib.isBridgeOnlyDir(opts.dir, { homeDir: os.homedir(), env: process.env })) {
1939
+ // Bridge dirs are never link targets, but `unlink --dir` stays available:
1940
+ // it is the explicit cleanup path for historical out-of-scope links.
1941
+ if (opts.hubAction !== 'unlink' &&
1942
+ agentDirsLib.isBridgeOnlyDir(opts.dir, { homeDir: os.homedir(), env: process.env })) {
1936
1943
  die('该目录是锁 / 数据桥接目录(XDG_STATE_HOME/skills 或 XDG_DATA_HOME/skills),永不作为链接目标', 2,
1937
1944
  '如需链接真实宿主目录,请改用 --agent <id> 或其它 --dir 路径。');
1938
1945
  }
@@ -32,7 +32,7 @@ const HUB_FAMILY_EXTRAS = [
32
32
  { slug: 'yotta-dev-mcp', name: '元开', pkg: '@yottameta/yotta-dev-mcp', version: 'latest' },
33
33
  { slug: 'yotta-partner', name: '元伴', pkg: '@yottameta/yotta-partner', version: 'latest' },
34
34
  { slug: 'yotta-present', name: '元呈', pkg: '@yottameta/yotta-present', version: 'latest' },
35
- { slug: 'yotta-skills', name: '元阁', pkg: '@yottameta/yotta-skills', version: 'latest' },
35
+ { slug: 'yotta-skills', name: '元阁', pkg: '@yottameta/yotta-skills', version: 'latest', runtimePayload: ['bin'] },
36
36
  { slug: 'yotta-verify-mcp', name: '元信MCP', pkg: '@yottameta/yotta-verify-mcp', version: 'latest' },
37
37
  ];
38
38
 
@@ -221,14 +221,20 @@ function createInstaller(deps) {
221
221
  const stagingRoot = path.join(dest, '.yottaskills-staging');
222
222
  fs.mkdirSync(stagingRoot, { recursive: true });
223
223
  staged = fs.mkdtempSync(path.join(stagingRoot, skill.slug + '-'));
224
- copyTree(extracted.pkgDir, staged, deps.copyDir);
224
+ // Hub installs keep declared runtime payload (e.g. yotta-skills bin):
225
+ // hosts linked to the Hub then inherit the runtime files (OpenCode contract).
226
+ const runtimePayload = (opts.hubScope && Array.isArray(resolvedSkill.runtimePayload))
227
+ ? resolvedSkill.runtimePayload
228
+ : [];
229
+ const copyWithRuntime = (src, dst) => deps.copyDir(src, dst, { keep: runtimePayload });
230
+ copyTree(extracted.pkgDir, staged, copyWithRuntime);
225
231
 
226
232
  if (fs.existsSync(target)) {
227
233
  const captured = captureSnapshot(target, {
228
234
  homeDir,
229
235
  slug: skill.slug,
230
236
  version: existingVersion || 'unknown',
231
- copyDir: deps.copyDir,
237
+ copyDir: copyWithRuntime,
232
238
  });
233
239
  snapshot = captured.path;
234
240
  backup = path.join(dest, '.yottaskills-backup-' + skill.slug + '-' + process.pid);
@@ -33,6 +33,9 @@ symlink),升级只改真源,已链接宿主即时生效。
33
33
 
34
34
  落地后跑一次 `hub link --all` 即可完成现存收敛。`hub doctor` 的
35
35
  `single_source:*` 检查只读报告宿主中的多份副本与版本参差,不自动修改。
36
+ Hub 真源对清单声明了 `runtimePayload` 的技能(元忆 / 元阁:`bin`)保留运行时
37
+ 载荷:链接分发后 OpenCode 等宿主直接获得 `bin/`,无需再单独补投影;普通宿主
38
+ 安装仍为薄片(顶层 `bin` 默认跳过)。
36
39
 
37
40
  ## 链接范围(0.28.0 起)
38
41
 
@@ -44,8 +47,9 @@ symlink),升级只改真源,已链接宿主即时生效。
44
47
  - **自动发现(discovered)**:文件系统启发式扫到的目录 —— 默认不链,
45
48
  `--include-discovered` 显式纳入;
46
49
  - **桥接(bridge)**:`XDG_STATE_HOME/skills`(官方 skills CLI 锁目录)与
47
- `XDG_DATA_HOME/skills`(数据桥接)—— 永不作为链接目标,`--dir` 指向时
48
- 也会被拒绝(fail-closed)。
50
+ `XDG_DATA_HOME/skills`(数据桥接)—— 永不作为链接目标(`hub link --dir`
51
+ 指向时会被拒绝);历史误链用 `hub unlink --dir <目录>` 显式清理(fail-closed,
52
+ 仍只删指向 Hub 的链接)。
49
53
 
50
54
  未核实映射(如无文档 / 无自证的宿主)默认不链,可用 `--dir <目录>` 显式指定。
51
55
  `hub doctor` 的 `link_scope:*` 检查只读报告「位于默认范围之外」的已建链接,
@@ -27,7 +27,7 @@ import subprocess
27
27
  import sys
28
28
  from pathlib import Path
29
29
 
30
- VERSION = "0.28.0"
30
+ VERSION = "0.28.1"
31
31
  TOOL_NAME = "yotta-skills"
32
32
  CN_NAME = "元阁"
33
33
  MCP_PROTOCOL_MODERN = "2026-07-28"
@@ -27,14 +27,15 @@
27
27
  "domain": "workflow",
28
28
  "desc": "跨会话/跨项目通用工作流协议(状态就近存)"
29
29
  },
30
- {
31
- "slug": "yotta-memory",
32
- "name": "元忆",
33
- "pkg": "@yottameta/yotta-memory",
34
- "version": "0.21.1",
35
- "domain": "memory",
36
- "desc": "有权限边界的文件式智能体记忆(FACT/PREF/BOUND/COMMIT)"
37
- },
30
+ {
31
+ "slug": "yotta-memory",
32
+ "name": "元忆",
33
+ "pkg": "@yottameta/yotta-memory",
34
+ "version": "0.21.1",
35
+ "domain": "memory",
36
+ "runtimePayload": ["bin"],
37
+ "desc": "有权限边界的文件式智能体记忆(FACT/PREF/BOUND/COMMIT)"
38
+ },
38
39
  {
39
40
  "slug": "yotta-learn",
40
41
  "name": "元习",