bluelamp 4.0.4 → 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.
- package/bin/bluelamp-vscode-base +258 -0
- package/bin/bluelamp-vscode1 +2 -0
- package/bin/bluelamp-vscode10 +2 -0
- package/bin/bluelamp-vscode11 +2 -0
- package/bin/bluelamp-vscode12 +2 -0
- package/bin/bluelamp-vscode13 +2 -0
- package/bin/bluelamp-vscode14 +2 -0
- package/bin/bluelamp-vscode15 +2 -0
- package/bin/bluelamp-vscode16 +2 -0
- package/bin/bluelamp-vscode17 +2 -0
- package/bin/bluelamp-vscode18 +2 -0
- package/bin/bluelamp-vscode2 +2 -0
- package/bin/bluelamp-vscode3 +2 -0
- package/bin/bluelamp-vscode4 +2 -0
- package/bin/bluelamp-vscode5 +2 -0
- package/bin/bluelamp-vscode6 +2 -0
- package/bin/bluelamp-vscode7 +2 -0
- package/bin/bluelamp-vscode8 +2 -0
- package/bin/bluelamp-vscode9 +2 -0
- package/lib/auth/PortalAuthClient.js +1 -1
- package/lib/mcp-server/index.cjs +57 -25
- package/lib/mcp-server/portal-api-client.cjs +37 -10
- package/lib/utils/logger.js +83 -0
- package/package.json +34 -27
- package/scripts/generate-commands.js +10 -15
- package/bin/bluelamp-base +0 -280
- package/bin/bluelamp-hook +0 -49
- package/bin/bluelamp1 +0 -2
- package/bin/bluelamp10 +0 -2
- package/bin/bluelamp11 +0 -2
- package/bin/bluelamp12 +0 -2
- package/bin/bluelamp13 +0 -2
- package/bin/bluelamp14 +0 -2
- package/bin/bluelamp15 +0 -2
- package/bin/bluelamp16 +0 -2
- package/bin/bluelamp17 +0 -2
- package/bin/bluelamp18 +0 -2
- package/bin/bluelamp2 +0 -2
- package/bin/bluelamp3 +0 -2
- package/bin/bluelamp4 +0 -2
- package/bin/bluelamp5 +0 -2
- package/bin/bluelamp6 +0 -2
- package/bin/bluelamp7 +0 -2
- package/bin/bluelamp8 +0 -2
- package/bin/bluelamp9 +0 -2
- package/lib/mcp-server/fetch-prompt.js +0 -61
- package/scripts/setup-hook.js +0 -98
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Portal APIからプロンプトを取得するモジュール
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import fetch from 'node-fetch';
|
|
6
|
-
|
|
7
|
-
const PORTAL_URL = process.env.PORTAL_URL || 'https://bluelamp-6clpzmy5pa-an.a.run.app';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* キーワードに基づいてPortalからプロンプトを取得
|
|
11
|
-
*/
|
|
12
|
-
export async function fetchPromptFromPortal(keyword) {
|
|
13
|
-
try {
|
|
14
|
-
// Portal APIエンドポイント
|
|
15
|
-
const response = await fetch(`${PORTAL_URL}/api/prompts/by-keyword/${encodeURIComponent(keyword)}`, {
|
|
16
|
-
method: 'GET',
|
|
17
|
-
headers: {
|
|
18
|
-
'Content-Type': 'application/json',
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
if (!response.ok) {
|
|
23
|
-
console.error(`Portal API error: ${response.status}`);
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const data = await response.json();
|
|
28
|
-
|
|
29
|
-
if (!data.prompt) {
|
|
30
|
-
console.error('No prompt found in response');
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Portalから取得したプロンプトデータを返す
|
|
35
|
-
return {
|
|
36
|
-
title: data.prompt.name || keyword,
|
|
37
|
-
content: data.prompt.text || '',
|
|
38
|
-
tags: data.prompt.tags || [],
|
|
39
|
-
level: 'expert'
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
} catch (error) {
|
|
43
|
-
console.error('Failed to fetch prompt from Portal:', error);
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* フォールバック用のデフォルトプロンプト
|
|
50
|
-
*/
|
|
51
|
-
export const DEFAULT_PROMPTS = {
|
|
52
|
-
'BL-要件定義': {
|
|
53
|
-
title: '要件定義エンジニア',
|
|
54
|
-
content: `あなたは要件定義のスペシャリストです。
|
|
55
|
-
- ユーザーの要求を正確に理解し、技術要件に落とし込む
|
|
56
|
-
- 機能要件と非機能要件を明確に分離
|
|
57
|
-
- 実装可能性を考慮した要件定義`,
|
|
58
|
-
level: 'expert'
|
|
59
|
-
},
|
|
60
|
-
// ... 他の15個も同様
|
|
61
|
-
};
|
package/scripts/setup-hook.js
DELETED
|
@@ -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
|
-
}
|