@lythos/skill-deck 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/link.ts +11 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lythos/skill-deck",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Declarative skill deck governance — cold pool, working set, deny-by-default",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/link.ts CHANGED
@@ -23,14 +23,8 @@ import {
23
23
  // ── 路径工具 ────────────────────────────────────────────────
24
24
 
25
25
  function findDeckToml(from: string): string | null {
26
- let dir = from;
27
- for (let i = 0; i < 10; i++) {
28
- const p = join(dir, "skill-deck.toml");
29
- if (existsSync(p)) return p;
30
- const parent = dirname(dir);
31
- if (parent === dir) break;
32
- dir = parent;
33
- }
26
+ const p = join(from, "skill-deck.toml");
27
+ if (existsSync(p)) return p;
34
28
  return null;
35
29
  }
36
30
 
@@ -127,7 +121,15 @@ const DECK_PATH = cliDeck
127
121
  : findDeckToml(process.cwd()) || resolve("skill-deck.toml");
128
122
 
129
123
  if (!existsSync(DECK_PATH)) {
130
- console.error(`❌ ${DECK_PATH} 不存在`);
124
+ console.error(`❌ skill-deck.toml not found in ${process.cwd()}`);
125
+ console.error(`\nCreate one:`);
126
+ console.error(` cat > skill-deck.toml <<'EOF'`);
127
+ console.error(` [deck]`);
128
+ console.error(` max_cards = 10`);
129
+ console.error(` \n [tool]`);
130
+ console.error(` skills = ["lythoskill-deck"]`);
131
+ console.error(` EOF`);
132
+ console.error(`\nOr specify a path: bunx @lythos/skill-deck link --deck /path/to/deck.toml`);
131
133
  process.exit(1);
132
134
  }
133
135