ali-skills 0.0.19 → 0.0.20

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.
@@ -2205,7 +2205,7 @@ function logSkillParseFailures(failures) {
2205
2205
  if (f.hint) M.message(import_picocolors.default.yellow(` 提示: ${f.hint}`));
2206
2206
  }
2207
2207
  }
2208
- var version$1 = "2.0.19";
2208
+ var version$1 = "2.0.20";
2209
2209
  const isCancelled$1 = (value) => typeof value === "symbol";
2210
2210
  function redactSensitiveText(text) {
2211
2211
  return text.replace(/(https?:\/\/)([^/\s:@]+)(?::([^@/\s]*))?@/gi, "$1").replace(/([?&](?:private_token|access_token|token|api_key|access_key|secret|password)=)[^&\s]+/gi, "$1***");
@@ -5283,6 +5283,16 @@ async function runConfig(args) {
5283
5283
  }
5284
5284
  }
5285
5285
  }
5286
+ function getUpdateComparisonStrategy(entry) {
5287
+ if (entry.sourceType === "internal") return {
5288
+ field: "commitHash",
5289
+ value: entry.commitHash
5290
+ };
5291
+ return {
5292
+ field: "skillFolderHash",
5293
+ value: entry.skillFolderHash
5294
+ };
5295
+ }
5286
5296
  const __dirname = dirname(fileURLToPath(import.meta.url));
5287
5297
  function getVersion() {
5288
5298
  try {
@@ -5697,7 +5707,7 @@ function readSkillLock() {
5697
5707
  function getSkipReason(entry) {
5698
5708
  if (entry.sourceType === "local") return "Local path";
5699
5709
  if (entry.sourceType === "git") return "Git URL (hash tracking not supported)";
5700
- if (!(entry.sourceType === "internal" ? entry.commitHash : entry.skillFolderHash)) return "No version hash available";
5710
+ if (!getUpdateComparisonStrategy(entry).value) return "No version hash available";
5701
5711
  if (!entry.skillPath) return "No skill path recorded";
5702
5712
  return "No version tracking";
5703
5713
  }
@@ -5983,6 +5993,7 @@ async function runUpdate(args = []) {
5983
5993
  sourceType: entry.sourceType,
5984
5994
  sourceUrl,
5985
5995
  skillPath: entry.skillPath || "",
5996
+ commitHash: entry.commitHash,
5986
5997
  skillFolderHash: entry.skillFolderHash || entry.computedHash,
5987
5998
  installedAt: (/* @__PURE__ */ new Date()).toISOString(),
5988
5999
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
@@ -6002,9 +6013,11 @@ async function runUpdate(args = []) {
6002
6013
  for (const skillName of skillNames) {
6003
6014
  const entry = skillsToCheck[skillName];
6004
6015
  if (!entry) continue;
6005
- if (entry.sourceType === "internal" && projectLock) {
6006
- const localEntry = projectLock.skills[skillName];
6007
- if (!localEntry?.commitHash) {
6016
+ if (entry.sourceType === "internal") {
6017
+ const localEntry = projectLock?.skills[skillName];
6018
+ const commitHash = getUpdateComparisonStrategy(entry).value || getUpdateComparisonStrategy(localEntry || {}).value;
6019
+ const storedSkillPath = entry.skillPath || localEntry?.skillPath || "";
6020
+ if (!commitHash) {
6008
6021
  skipped.push({
6009
6022
  name: skillName,
6010
6023
  reason: "Reinstall required to enable update checking (missing commit hash)",
@@ -6013,9 +6026,9 @@ async function runUpdate(args = []) {
6013
6026
  continue;
6014
6027
  }
6015
6028
  try {
6016
- const skillPath = (localEntry.skillPath || "").replace(/\/?SKILL\.md$/i, "");
6029
+ const skillPath = storedSkillPath.replace(/\/?SKILL\.md$/i, "");
6017
6030
  const latestCommit = await fetchAliInternalCommitHash(entry.source, skillPath, null);
6018
- if (latestCommit && latestCommit !== localEntry.commitHash) availableUpdates.push({
6031
+ if (latestCommit && latestCommit !== commitHash) availableUpdates.push({
6019
6032
  name: skillName,
6020
6033
  source: entry.source,
6021
6034
  entry
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ali/cli-skills",
3
- "version": "2.0.19",
3
+ "version": "2.0.20",
4
4
  "description": "The open agent skills ecosystem",
5
5
  "type": "module",
6
6
  "bin": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ali-skills",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "The open agent skills ecosystem",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,7 +31,7 @@
31
31
  "author": "",
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
- "@ali/cli-skills": "^2.0.19"
34
+ "@ali/cli-skills": "^2.0.20"
35
35
  },
36
36
  "bundleDependencies": [
37
37
  "@ali/cli-skills"