bluelamp 4.0.5 → 4.0.6

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 (47) hide show
  1. package/bin/bluelamp-vscode-base +258 -0
  2. package/bin/bluelamp-vscode1 +2 -0
  3. package/bin/bluelamp-vscode10 +2 -0
  4. package/bin/bluelamp-vscode11 +2 -0
  5. package/bin/bluelamp-vscode12 +2 -0
  6. package/bin/bluelamp-vscode13 +2 -0
  7. package/bin/bluelamp-vscode14 +2 -0
  8. package/bin/bluelamp-vscode15 +2 -0
  9. package/bin/bluelamp-vscode16 +2 -0
  10. package/bin/bluelamp-vscode17 +2 -0
  11. package/bin/bluelamp-vscode18 +2 -0
  12. package/bin/bluelamp-vscode2 +2 -0
  13. package/bin/bluelamp-vscode3 +2 -0
  14. package/bin/bluelamp-vscode4 +2 -0
  15. package/bin/bluelamp-vscode5 +2 -0
  16. package/bin/bluelamp-vscode6 +2 -0
  17. package/bin/bluelamp-vscode7 +2 -0
  18. package/bin/bluelamp-vscode8 +2 -0
  19. package/bin/bluelamp-vscode9 +2 -0
  20. package/lib/auth/PortalAuthClient.js +1 -1
  21. package/lib/mcp-server/index.cjs +57 -25
  22. package/lib/mcp-server/portal-api-client.cjs +37 -10
  23. package/lib/utils/logger.js +83 -0
  24. package/package.json +33 -25
  25. package/scripts/generate-commands.js +10 -15
  26. package/bin/bluelamp-base +0 -200
  27. package/bin/bluelamp-hook +0 -49
  28. package/bin/bluelamp1 +0 -2
  29. package/bin/bluelamp10 +0 -2
  30. package/bin/bluelamp11 +0 -2
  31. package/bin/bluelamp12 +0 -2
  32. package/bin/bluelamp13 +0 -2
  33. package/bin/bluelamp14 +0 -2
  34. package/bin/bluelamp15 +0 -2
  35. package/bin/bluelamp16 +0 -2
  36. package/bin/bluelamp17 +0 -2
  37. package/bin/bluelamp18 +0 -2
  38. package/bin/bluelamp2 +0 -2
  39. package/bin/bluelamp3 +0 -2
  40. package/bin/bluelamp4 +0 -2
  41. package/bin/bluelamp5 +0 -2
  42. package/bin/bluelamp6 +0 -2
  43. package/bin/bluelamp7 +0 -2
  44. package/bin/bluelamp8 +0 -2
  45. package/bin/bluelamp9 +0 -2
  46. package/lib/mcp-server/fetch-prompt.js +0 -61
  47. package/scripts/setup-hook.js +0 -98
@@ -1,98 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * BlueLamp Hook セットアップスクリプト
5
- * Claude Code の settings.json に SessionStart Hook を追加
6
- */
7
-
8
- const fs = require('fs');
9
- const path = require('path');
10
- const os = require('os');
11
-
12
- const claudeSettingsDir = path.join(os.homedir(), '.claude');
13
- const claudeSettingsPath = path.join(claudeSettingsDir, 'settings.json');
14
-
15
- // bluelamp-hook コマンドのパス(グローバルインストール時)
16
- const hookCommand = 'bluelamp-hook';
17
-
18
- function setupHook() {
19
- console.log('🔧 BlueLamp SessionStart Hook をセットアップ中...');
20
-
21
- // .claude ディレクトリがなければ作成
22
- if (!fs.existsSync(claudeSettingsDir)) {
23
- fs.mkdirSync(claudeSettingsDir, { recursive: true });
24
- console.log(` Created: ${claudeSettingsDir}`);
25
- }
26
-
27
- // 既存の settings.json を読み込み
28
- let settings = {};
29
- if (fs.existsSync(claudeSettingsPath)) {
30
- try {
31
- const content = fs.readFileSync(claudeSettingsPath, 'utf-8');
32
- settings = JSON.parse(content);
33
- console.log(' 既存の settings.json を読み込みました');
34
- } catch (e) {
35
- console.log(' settings.json の解析に失敗、新規作成します');
36
- }
37
- }
38
-
39
- // hooks が未定義なら初期化
40
- if (!settings.hooks) {
41
- settings.hooks = {};
42
- }
43
-
44
- // SessionStart hooks が未定義なら初期化
45
- if (!settings.hooks.SessionStart) {
46
- settings.hooks.SessionStart = [];
47
- }
48
-
49
- // BlueLamp hook が既に存在するかチェック
50
- const existingHook = settings.hooks.SessionStart.find(
51
- h => h.hooks && h.hooks.some(hook => hook.command === hookCommand)
52
- );
53
-
54
- if (existingHook) {
55
- console.log('✅ BlueLamp Hook は既にセットアップ済みです');
56
- return;
57
- }
58
-
59
- // BlueLamp SessionStart Hook を追加
60
- settings.hooks.SessionStart.push({
61
- matcher: "",
62
- hooks: [
63
- {
64
- type: "command",
65
- command: hookCommand
66
- }
67
- ]
68
- });
69
-
70
- // settings.json を保存
71
- fs.writeFileSync(claudeSettingsPath, JSON.stringify(settings, null, 2));
72
- console.log(`✅ SessionStart Hook を追加しました: ${claudeSettingsPath}`);
73
- console.log('');
74
- console.log('📝 追加された設定:');
75
- console.log(JSON.stringify(settings.hooks.SessionStart, null, 2));
76
- }
77
-
78
- try {
79
- setupHook();
80
- } catch (error) {
81
- console.error('❌ Hook セットアップエラー:', error.message);
82
- console.log('');
83
- console.log('手動でセットアップするには:');
84
- console.log(`1. ${claudeSettingsPath} を開く`);
85
- console.log('2. 以下を追加:');
86
- console.log(`
87
- {
88
- "hooks": {
89
- "SessionStart": [
90
- {
91
- "matcher": "",
92
- "hooks": [{ "type": "command", "command": "${hookCommand}" }]
93
- }
94
- ]
95
- }
96
- }
97
- `);
98
- }