@nahisaho/katashiro 2.0.5 → 2.0.7

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 CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@nahisaho/katashiro",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "KATASHIRO - VS Code Agent Mode向け情報収集・分析・生成システム(オールインワンパッケージ)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "type": "module",
8
8
  "bin": {
9
- "katashiro": "dist/cli.js"
9
+ "katashiro": "dist/cli.js",
10
+ "katashiro-setup": "scripts/postinstall.js"
10
11
  },
11
12
  "files": [
12
13
  "dist",
@@ -108,20 +109,20 @@
108
109
  "url": "https://github.com/nahisaho/katashiro/issues"
109
110
  },
110
111
  "dependencies": {
111
- "@nahisaho/katashiro-analyzer": "^2.0.4",
112
- "@nahisaho/katashiro-collector": "^2.0.4",
113
- "@nahisaho/katashiro-core": "^2.0.4",
114
- "@nahisaho/katashiro-evaluation": "^2.0.4",
115
- "@nahisaho/katashiro-feedback": "^2.0.4",
116
- "@nahisaho/katashiro-generator": "^2.0.4",
117
- "@nahisaho/katashiro-knowledge": "^2.0.4",
118
- "@nahisaho/katashiro-llm": "^2.0.4",
119
- "@nahisaho/katashiro-observability": "^2.0.4",
120
- "@nahisaho/katashiro-orchestrator": "^2.0.4",
121
- "@nahisaho/katashiro-rag": "^2.0.4",
122
- "@nahisaho/katashiro-sandbox": "^2.0.4",
123
- "@nahisaho/katashiro-security": "^2.0.4",
124
- "@nahisaho/katashiro-workspace": "^2.0.4",
112
+ "@nahisaho/katashiro-analyzer": "^2.0.6",
113
+ "@nahisaho/katashiro-collector": "^2.0.6",
114
+ "@nahisaho/katashiro-core": "^2.0.6",
115
+ "@nahisaho/katashiro-evaluation": "^2.0.6",
116
+ "@nahisaho/katashiro-feedback": "^2.0.6",
117
+ "@nahisaho/katashiro-generator": "^2.0.6",
118
+ "@nahisaho/katashiro-knowledge": "^2.0.6",
119
+ "@nahisaho/katashiro-llm": "^2.0.6",
120
+ "@nahisaho/katashiro-observability": "^2.0.6",
121
+ "@nahisaho/katashiro-orchestrator": "^2.0.6",
122
+ "@nahisaho/katashiro-rag": "^2.0.6",
123
+ "@nahisaho/katashiro-sandbox": "^2.0.6",
124
+ "@nahisaho/katashiro-security": "^2.0.6",
125
+ "@nahisaho/katashiro-workspace": "^2.0.6",
125
126
  "commander": "^12.1.0"
126
127
  },
127
128
  "engines": {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * postinstall script - AGENTS.md, CLAUDE.md, .github をプロジェクトルートにコピー
4
+ * postinstall script - AGENTS.md, CLAUDE.md, .github をカレントディレクトリにコピー
5
5
  */
6
6
 
7
7
  import { promises as fs } from 'fs';
@@ -14,25 +14,8 @@ const __dirname = dirname(__filename);
14
14
  // パッケージのルートディレクトリ
15
15
  const packageRoot = resolve(__dirname, '..');
16
16
 
17
- /**
18
- * プロジェクトルートを検出
19
- * - node_modules/@nahisaho/katashiro から3階層上がプロジェクトルート
20
- * - node_modules/katashiro から2階層上がプロジェクトルート(CLIの場合)
21
- */
22
- function findProjectRoot() {
23
- // node_modules内にインストールされているか確認
24
- if (packageRoot.includes('node_modules/@nahisaho/katashiro')) {
25
- // @nahisaho/katashiro の場合: node_modules/@nahisaho/katashiro -> 3階層上
26
- return resolve(packageRoot, '..', '..', '..');
27
- } else if (packageRoot.includes('node_modules')) {
28
- // その他のnode_modules内の場合: 2階層上
29
- return resolve(packageRoot, '..', '..');
30
- }
31
- // 開発環境(node_modules外)
32
- return null;
33
- }
34
-
35
- const projectRoot = findProjectRoot();
17
+ // npm install を実行したカレントディレクトリ
18
+ const projectRoot = process.cwd();
36
19
 
37
20
  // コピーするファイル/ディレクトリ
38
21
  const filesToCopy = [
@@ -75,13 +58,16 @@ async function main() {
75
58
  return;
76
59
  }
77
60
 
78
- // プロジェクトルートが検出できない場合(開発環境)はスキップ
79
- if (!projectRoot) {
61
+ // node_modules内から実行されている場合のみ動作
62
+ // 開発モード判定: packageRootがnode_modules内にないかチェック
63
+ const isInNodeModules = packageRoot.includes('node_modules');
64
+ if (!isInNodeModules) {
80
65
  console.log('📦 KATASHIRO: Skipping postinstall (development mode)');
81
66
  return;
82
67
  }
83
68
 
84
69
  console.log('📦 KATASHIRO: Setting up agent configuration files...');
70
+ console.log(` Target: ${projectRoot}`);
85
71
 
86
72
  for (const file of filesToCopy) {
87
73
  const src = join(packageRoot, file);