feat(skills): content-hash publish/update, hide user-facing version - #87
Merged
liuxy0551 merged 29 commits intoJul 29, 2026
Merged
Conversation
TreeTreeDi
pushed a commit
to TreeTreeDi/doraemon
that referenced
this pull request
Jul 28, 2026
Align the seven files that failed CI Prettier --check so PR DTStack#87 can pass the pipeline.
Collaborator
|
Issues Critical — 无 Important(建议修复)
Minor
📋 Recommendations
|
Contributor
Author
|
TreeTreeDi
pushed a commit
to TreeTreeDi/doraemon
that referenced
this pull request
Jul 28, 2026
Remove ResolveVersionRef/ResolveResult left from the pre-hash update path (ticket 01, PR DTStack#87 I1).
TreeTreeDi
pushed a commit
to TreeTreeDi/doraemon
that referenced
this pull request
Jul 28, 2026
Remove unused resolve mock and rename case (ticket 03, PR DTStack#87 I3).
TreeTreeDi
pushed a commit
to TreeTreeDi/doraemon
that referenced
this pull request
Jul 28, 2026
Add contracts/skill-categories and wire registry, skills service, and CLI publish to one authoritative list (ticket 04, PR DTStack#87 I4).
TreeTreeDi
force-pushed
the
feat_skills_hash_publish_update
branch
2 times, most recently
from
July 29, 2026 01:57
b145759 to
f252da7
Compare
TreeTreeDi
marked this pull request as ready for review
July 29, 2026 09:48
added 20 commits
July 29, 2026 18:03
Align Doraemon skills with vercel-style content hashing: publish/upload pushes remote without requiring semver; re-publish is no-op when hash matches; bare update refreshes all lock-tracked skills by fingerprint. First publish requires category; CLI E2E verified against local registry.
Continue batch update after per-skill failures with a summary exit code, confirm overwrite only when content hash differs, keep content no-ops free of metadata churn, type resolve fingerprints, and validate category enums server-side. Expand CLI and registry contract tests accordingly.
Extract SkillSync decide module and cmdUpdate command so the happy path compares content fingerprints only (no resolve dual-signal). Registry detail exposes fingerprint on skill alone; publishSkill splits normalize / noop / replace internals. skills.ts re-exports update; helpers share slug and directory replace utilities.
Drop the duplicated normalizeSkillSlugOrFail copy left after C4 split.
Align the seven files that failed CI Prettier --check so PR DTStack#87 can pass the pipeline.
Write lockfile once when lockDirty after the update loop instead of mid-loop. Align update mocks with skill.fingerprint and cover hash match up_to_date.
Remove unused imports from skills.ts, use const for publish version, and fix update.ts import order so CI ESLint passes.
Remove ResolveVersionRef/ResolveResult left from the pre-hash update path (ticket 01, PR DTStack#87 I1).
Remove unused resolve mock and rename case (ticket 03, PR DTStack#87 I3).
When payload omits category, write the existing skill.category into the update payload so retention is a deliberate contract (ticket 02, I2).
Add contracts/skill-categories and wire registry, skills service, and CLI publish to one authoritative list (ticket 04, PR DTStack#87 I4).
Use http://172.16.100.225:7001 when no flag, env, cache, or site discovery is set so CLI works out of the box (ticket 01).
Always normalize and return DEFAULT_REGISTRY; throw only if empty.
Assert --registry and DT_SKILL_REGISTRY beat default and cache (ticket 02).
Extract pickRegistryFromCliAndEnv used by cli.ts so override priority is unit-tested on the shipped selection helper (ticket 02 review).
CLI help, README, and AGENTS.md cover built-in deploy URL and DT_SKILL_REGISTRY / --registry for local dev (ticket 03).
Remove stale CLAWHUB_ / no-default wording; interpolate DEFAULT_REGISTRY in help.
added 4 commits
July 29, 2026 18:03
Point repository/homepage/bugs at DTStack/doraemon, bump version to 0.18.4 for public npm, and include package LICENSE.
Local dt-skill publish (single and batch) fills contributor from cwd git config user.name when set, logs the value, and fails if the name exceeds 50 characters. Registry v1 publishSkill now persists contributor so the single-skill path matches import-file.
TreeTreeDi
force-pushed
the
feat_skills_hash_publish_update
branch
from
July 29, 2026 10:14
f252da7 to
7c29957
Compare
added 5 commits
July 29, 2026 18:16
When v1 publish is a content hash no-op, still persist contributor if the client sent it so git user.name attribution can change without a file edit.
Release CLI that fills contributor from git user.name on local publish.
Drop the duplicate local helper in skills.ts; update.ts already uses the shared skillHelpers implementation.
Pass the publish transaction into computeSkillFingerprint so the unchanged no-op decision and file listing share one consistent view.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
publish/upload与update用内容指纹(fingerprint)判断变更,不再要求用户填写 semver;version仅作内部兼容占位(默认0.0.0)。dt-skill update同步全部已跟踪 skill;pin 会跳过;结束汇总N updated / M up to date / P pinned skipped / F failed。首次发布必须选 category;同 hash 再发布为 no-op;hash 不同则覆盖(可确认 /--yes)。skill.fingerprint;内容相同 no-op;内容变化则替换;首次发布 category 为封闭枚举。优化: update 命令拆分、slug 工具收敛、publish 创建路径测试修复。范围说明
upload仍是publish的别名,且仍要求目录含SKILL.md。测试计划
cd dt-skill && npm run build && npm run test:src(Node ≥20)node --test test/skills-registry-contract.test.js(Node 18)publish(必选 category)→ 同内容 no-op →install+ 裸update→ 改内容再 publish → update 跟新 → 非法 category 拒收 → pin 跳过 update