@yeaft/webchat-agent 1.0.85 → 1.0.87
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.
- package/package.json +1 -1
- package/yeaft/skills.js +18 -29
package/package.json
CHANGED
package/yeaft/skills.js
CHANGED
|
@@ -31,20 +31,23 @@
|
|
|
31
31
|
* tier 1 (bundled): wherever yeaft-skills is installed on disk — typically
|
|
32
32
|
* ~/.claude/skills/yeaft-skills/skills/. Read-only — `save()` and
|
|
33
33
|
* `remove()` never target this tier.
|
|
34
|
-
* tier 2 (user
|
|
35
|
-
* loaded read-only for cross-tool compatibility.
|
|
36
|
-
* tier 3 (user-codex): ~/.codex/skills. User-level Codex assets, loaded
|
|
37
|
-
* read-only for cross-tool compatibility.
|
|
38
|
-
* tier 4 (user): <yeaftDir>/skills (e.g. ~/.yeaft/skills). User edits
|
|
34
|
+
* tier 2 (user): <yeaftDir>/skills (e.g. ~/.yeaft/skills). User edits
|
|
39
35
|
* land here. `save()` writes here. `init.js` seeds it from tier 1
|
|
40
|
-
* on first boot so users start with the
|
|
41
|
-
*
|
|
36
|
+
* on first boot so users start with the bundled Yeaft skills.
|
|
37
|
+
*
|
|
38
|
+
* Note: user-level Claude/Codex skill roots (`~/.claude/skills`,
|
|
39
|
+
* `~/.codex/skills`) are intentionally NOT scanned as default Yeaft skills.
|
|
40
|
+
* They may contain unrelated plugins such as `trade` or
|
|
41
|
+
* `yeaft-skills-write`. Yeaft borrows only the explicit bundled
|
|
42
|
+
* `yeaft-skills` package plus project-local skill roots below.
|
|
43
|
+
*
|
|
44
|
+
* tier 3 (project-claude): <workDir>/.claude/skills (if provided). Claude
|
|
42
45
|
* Code project assets, loaded so a Claude-Code-integrated project
|
|
43
46
|
* works out of the box. Higher than user (project-local beats
|
|
44
47
|
* user-global), lower than the yeaft-native project tier.
|
|
45
|
-
* tier
|
|
48
|
+
* tier 4 (project-codex): <workDir>/.agents/skills (if provided). Codex
|
|
46
49
|
* project assets, loaded with the same project-local precedence.
|
|
47
|
-
* tier
|
|
50
|
+
* tier 5 (project): <workDir>/.yeaft/skills (if provided). Highest
|
|
48
51
|
* priority — a project can pin a skill version without affecting
|
|
49
52
|
* the user's other projects, and overrides a borrowed
|
|
50
53
|
* `.claude/skills` / `.agents/skills` skill of the same name.
|
|
@@ -732,17 +735,15 @@ export class SkillManager {
|
|
|
732
735
|
* Tier order (lowest → highest priority):
|
|
733
736
|
* 1. bundled — the yeaft-skills package on disk, located via
|
|
734
737
|
* `bundledYeaftSkillsDir()` (typically ~/.claude/skills/yeaft-skills/skills/).
|
|
735
|
-
* 2. user
|
|
736
|
-
* 3.
|
|
737
|
-
* 4. user — `<yeaftDir>/skills` (e.g. ~/.yeaft/skills). User edits + saves.
|
|
738
|
-
* 5. project-claude — `<workDir>/.claude/skills` when a workDir is provided.
|
|
738
|
+
* 2. user — `<yeaftDir>/skills` (e.g. ~/.yeaft/skills). User edits + saves.
|
|
739
|
+
* 3. project-claude — `<workDir>/.claude/skills` when a workDir is provided.
|
|
739
740
|
* Claude Code project assets, loaded so a project that integrates Claude
|
|
740
741
|
* Code works out of the box. Ranks above `user` (project-local beats
|
|
741
742
|
* user-global) but below the yeaft-native project tier.
|
|
742
|
-
*
|
|
743
|
+
* 4. project-codex — `<workDir>/.agents/skills` when a workDir is provided.
|
|
743
744
|
* Codex project assets, loaded so Codex-integrated repositories work out
|
|
744
745
|
* of the box. Same precedence band as project Claude Code assets.
|
|
745
|
-
*
|
|
746
|
+
* 5. project — `<workDir>/.yeaft/skills` when a workDir is provided.
|
|
746
747
|
* Highest priority: a yeaft-native skill pinned in the project overrides
|
|
747
748
|
* a borrowed `.claude/skills` / `.agents/skills` skill of the same name.
|
|
748
749
|
*
|
|
@@ -754,9 +755,6 @@ export class SkillManager {
|
|
|
754
755
|
*/
|
|
755
756
|
export function createSkillManager(yeaftDir, workDir) {
|
|
756
757
|
const bundled = bundledYeaftSkillsDir();
|
|
757
|
-
const home = homedir();
|
|
758
|
-
const claudeUserDir = home ? join(home, '.claude', 'skills') : null;
|
|
759
|
-
const codexUserDir = home ? join(home, '.codex', 'skills') : null;
|
|
760
758
|
const userDir = join(yeaftDir, 'skills');
|
|
761
759
|
const projectRoots = [...new Set(String(workDir || '')
|
|
762
760
|
.split(delimiter)
|
|
@@ -766,24 +764,15 @@ export function createSkillManager(yeaftDir, workDir) {
|
|
|
766
764
|
const codexProjectDirs = projectRoots.map(root => join(root, '.agents', 'skills'));
|
|
767
765
|
const projectDirs = projectRoots.map(root => join(root, '.yeaft', 'skills'));
|
|
768
766
|
|
|
769
|
-
const dirs = [bundled,
|
|
767
|
+
const dirs = [bundled, userDir, ...claudeProjectDirs, ...codexProjectDirs, ...projectDirs].filter(Boolean);
|
|
770
768
|
const tierByDir = {};
|
|
771
769
|
if (bundled) tierByDir[bundled] = 'bundled';
|
|
772
|
-
if (claudeUserDir) tierByDir[claudeUserDir] = 'user-claude';
|
|
773
|
-
if (codexUserDir) tierByDir[codexUserDir] = 'user-codex';
|
|
774
770
|
tierByDir[userDir] = 'user';
|
|
775
771
|
for (const dir of claudeProjectDirs) tierByDir[dir] = 'project-claude';
|
|
776
772
|
for (const dir of codexProjectDirs) tierByDir[dir] = 'project-codex';
|
|
777
773
|
for (const dir of projectDirs) tierByDir[dir] = 'project';
|
|
778
774
|
|
|
779
|
-
const
|
|
780
|
-
if (claudeUserDir && bundled && pathIsInside(bundled, claudeUserDir)) {
|
|
781
|
-
// Borrowed ~/.claude/skills must not recurse into the Yeaft bundled plugin
|
|
782
|
-
// package; bundled skills have their own lower-priority tier/provenance.
|
|
783
|
-
ignorePathsByDir[claudeUserDir] = [join(claudeUserDir, 'yeaft-skills')];
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
const manager = new SkillManager(dirs, { userDir, tierByDir, ignorePathsByDir });
|
|
775
|
+
const manager = new SkillManager(dirs, { userDir, tierByDir });
|
|
787
776
|
manager.load();
|
|
788
777
|
return manager;
|
|
789
778
|
}
|