@curdx/flow 6.0.3 → 6.0.4
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/CHANGELOG.md +6 -0
- package/dist/index.mjs +9 -25
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@curdx/flow` are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/) and the project follows [Semantic Versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 6.0.4 — 2026-04-29
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- **Drop `Available tools/plugins` listing from injected `~/.claude/CLAUDE.md` block.** Each plugin's own SKILL.md `description` is already injected into Claude Code's system prompt at session start, so re-listing every tool's name + version + `whenToUse` was duplicate context that cost tokens for no judgement value. `renderBlock` now emits only the three decision sections — `Tool Combination Patterns`, `Skip Rules`, `Decision Tree` — which carry the cross-tool routing logic that single-skill descriptions cannot. `renderItemLine` removed (dead code); `ManagedItem`'s `name` / `version` / `slashNamespace` / `whenToUse` fields kept for forward compat with any external consumers, but no longer rendered.
|
|
10
|
+
|
|
5
11
|
## 6.0.3 — 2026-04-29
|
|
6
12
|
|
|
7
13
|
### Changed
|
package/dist/index.mjs
CHANGED
|
@@ -809,13 +809,6 @@ var BLOCK_RE = /<!-- BEGIN @curdx\/flow v\d+[^>]*-->[\s\S]*?<!-- END @curdx\/flo
|
|
|
809
809
|
function claudeMdPath() {
|
|
810
810
|
return path3.join(os3.homedir(), ".claude", "CLAUDE.md");
|
|
811
811
|
}
|
|
812
|
-
function renderItemLine(item) {
|
|
813
|
-
let line = `- ${item.name}`;
|
|
814
|
-
if (item.version) line += ` (v${item.version})`;
|
|
815
|
-
if (item.slashNamespace) line += ` \u2014 \`${item.slashNamespace}\``;
|
|
816
|
-
if (item.whenToUse) line += ` \u2014 ${item.whenToUse}`;
|
|
817
|
-
return line;
|
|
818
|
-
}
|
|
819
812
|
function buildCombinationPatterns(ids) {
|
|
820
813
|
const has = (k) => ids.has(k);
|
|
821
814
|
const out = ["\u6309\u573A\u666F\u4E32\u8054\uFF0C\u4E0D\u8981\u4E00\u4E2A\u4E2A\u5B64\u7ACB\u8C03\u7528\uFF1A", ""];
|
|
@@ -892,26 +885,17 @@ function buildDecisionTree(ids) {
|
|
|
892
885
|
}
|
|
893
886
|
function renderBlock(items) {
|
|
894
887
|
const installedIds = new Set(items.map((i) => i.id));
|
|
895
|
-
const
|
|
896
|
-
|
|
897
|
-
"##
|
|
898
|
-
"",
|
|
899
|
-
"Available tools/plugins:",
|
|
900
|
-
...items.map(renderItemLine)
|
|
888
|
+
const sections = [
|
|
889
|
+
["## Tool Combination Patterns\uFF08\u7EC4\u5408\u5DE5\u4F5C\u6D41\uFF09", buildCombinationPatterns(installedIds)],
|
|
890
|
+
["## Skip Rules\uFF08\u9632\u8FC7\u5EA6\u5DE5\u5177\u5316\uFF09", buildSkipRules(installedIds)],
|
|
891
|
+
["## Decision Tree\uFF08\u9047\u5230\u6A21\u7CCA\u8BF7\u6C42\u65F6\uFF09", buildDecisionTree(installedIds)]
|
|
901
892
|
];
|
|
902
|
-
const
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
const skip = buildSkipRules(installedIds);
|
|
907
|
-
if (skip.length > 0) {
|
|
908
|
-
lines.push("", "## Skip Rules\uFF08\u9632\u8FC7\u5EA6\u5DE5\u5177\u5316\uFF09", "", ...skip);
|
|
909
|
-
}
|
|
910
|
-
const tree = buildDecisionTree(installedIds);
|
|
911
|
-
if (tree.length > 0) {
|
|
912
|
-
lines.push("", "## Decision Tree\uFF08\u9047\u5230\u6A21\u7CCA\u8BF7\u6C42\u65F6\uFF09", "", ...tree);
|
|
893
|
+
const lines = [BEGIN_MARKER];
|
|
894
|
+
for (const [heading, body] of sections) {
|
|
895
|
+
if (body.length === 0) continue;
|
|
896
|
+
lines.push(heading, "", ...body, "");
|
|
913
897
|
}
|
|
914
|
-
lines.push("
|
|
898
|
+
lines.push("Run `npx @curdx/flow` to install / update / uninstall.", END_MARKER);
|
|
915
899
|
return lines.join("\n");
|
|
916
900
|
}
|
|
917
901
|
function withEol(s, eol) {
|