スキルをアップロードするだけでエージェントアプリが作れるプラットフォーム。
Lovable (UI) ←WebSocket→ server.mjs (HTTP + WS proxy)
└─ @ccpocket/bridge (内部 port 18765)
└─ Claude Code CLI → CLAUDE.md + スキル自動ロード
| 変数名 | 必須 | デフォルト | 説明 |
|---|---|---|---|
ANTHROPIC_API_KEY |
✅ | — | Claude API キー |
PORT |
— | 8080 |
サーバーポート |
BRIDGE_PORT |
— | 18765 |
内部 Bridge ポート |
BRIDGE_HOST |
— | 127.0.0.1 |
Bridge ホスト |
npm start
# or
node server.mjsBase URL: http://localhost:8080 (本番: https://e2btest-production.up.railway.app)
全エンドポイントに以下の CORS ヘッダーが付与されます:
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONS
Access-Control-Allow-Headers: Content-Type
ヘルスチェック。
Response 200
{
"status": "ok",
"activeSessions": 3
}登録済みエージェント一覧を取得。
Response 200
{
"agents": ["general", "game-creator"]
}ZIP ファイルをアップロードして新しいエージェントを登録。
Parameters
| 名前 | 位置 | 型 | 説明 |
|---|---|---|---|
name |
path | string | エージェント名(英数字・ハイフン・アンダースコアのみ) |
Request
Content-Type: application/octet-stream- Body: ZIP ファイル (raw binary)
処理内容
- ZIP を
agents/{name}/に展開 - ネストされたディレクトリを自動フラット化
- macOS ジャンクファイル (
__MACOSX) を削除 CLAUDE.mdがなければ自動生成.mdファイルを.claude/skills/に自動配置common/.claude/skills/から共通スキルを注入
Response 201
{
"ok": true,
"name": "agent-name",
"projectPath": "/agents/agent-name"
}Error 500
{
"error": "error message"
}エージェントを削除。
Parameters
| 名前 | 位置 | 型 | 説明 |
|---|---|---|---|
name |
path | string | エージェント名 |
Response 200
{ "ok": true }Error 404
{ "error": "Not found" }エージェントが生成したファイルを取得。
Parameters
| 名前 | 位置 | 型 | 説明 |
|---|---|---|---|
name |
path | string | エージェント名 |
path |
path | string | ファイルパス(エージェントディレクトリからの相対パス) |
対応 MIME タイプ: mp4, mp3, wav, png, jpg, jpeg, gif, webp, pdf, zip, html, css, js, json, md, txt
Response 200 — 適切な Content-Type + Content-Disposition: inline
Error 404
{ "error": "File not found" }URL 例:
https://e2btest-production.up.railway.app/agents/remotion/files/koike-video/out/koike.mp4
Endpoint: ws://localhost:8080 (本番: wss://e2btest-production.up.railway.app)
HTTP と同一ポートで WebSocket をリッスンします。内部で ccpocket Bridge Server へプロキシされます。
{
"type": "start",
"prompt": "こんにちは",
"projectPath": "/agents/general",
"permissionMode": "bypassPermissions"
}| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
type |
"start" |
✅ | — |
prompt |
string | ✅ | 初回プロンプト |
projectPath |
string | — | エージェントのパス(デフォルト: /agents/{name}) |
permissionMode |
string | — | "default" or "bypassPermissions" |
{
"type": "input",
"sessionId": "uuid-string",
"text": "続きをお願いします"
}{
"type": "approve",
"sessionId": "uuid-string",
"toolUseId": "tool-123"
}{
"type": "reject",
"sessionId": "uuid-string",
"toolUseId": "tool-123",
"message": "理由(任意)"
}{
"type": "answer",
"sessionId": "uuid-string",
"toolUseId": "tool-123",
"answer": "選択肢ラベル"
}{
"type": "stop_session",
"sessionId": "uuid-string"
}{
"type": "system",
"subtype": "init",
"sessionId": "uuid-string",
"model": "claude-sonnet-4-20250514"
}{
"type": "status",
"sessionId": "uuid-string",
"status": "starting | idle | running | waiting_approval | compacting"
}{
"type": "stream_delta",
"delta": "テキストの断片"
}{
"type": "thinking_delta",
"delta": "思考テキストの断片"
}{
"type": "assistant",
"message": {
"role": "assistant",
"content": [
{ "type": "text", "text": "回答テキスト" },
{ "type": "tool_use", "id": "tool-123", "name": "Bash", "input": { "command": "ls" } }
]
}
}{
"type": "tool_result",
"toolUseId": "tool-123",
"content": "実行結果"
}{
"type": "permission_request",
"sessionId": "uuid-string",
"toolUseId": "tool-123",
"toolName": "Bash",
"input": { "command": "rm -rf /tmp/test" }
}{
"type": "result",
"isError": false,
"duration": 5200,
"cost": 0.03,
"totalCost": 0.15
}{
"type": "error",
"message": "エラーの説明"
}- セッションは
activeSessionsMap で追跡 - TTL: 5 分間の非アクティブで自動停止
- クリーンアップ間隔: 30 秒ごとにチェック
- アイドルセッションは Bridge に
stop_sessionを送信して停止
Client Server
│ │
│── start { prompt } ────────────>│
│<──── status { starting } ───────│
│<──── system { init } ───────────│
│<──── status { running } ────────│
│<──── stream_delta { ... } ──────│ (複数回)
│<──── thinking_delta { ... } ────│ (複数回)
│<──── assistant { message } ─────│
│<──── tool_result { ... } ───────│
│<──── result { cost, duration } ─│
│<──── status { idle } ───────────│
│ │
│── input { text } ──────────────>│
│<──── status { running } ────────│
│<──── ... │
/agents/
├── {name}/
│ ├── CLAUDE.md # エージェントの人格・指示
│ ├── .claude/
│ │ └── skills/ # Claude Code スキル
│ │ ├── skill-a.md
│ │ ├── skill-b.md
│ │ └── file-share.md # 共通スキル(自動注入)
│ └── [生成ファイル]
└── common/
└── .claude/
└── skills/ # 全エージェント共通スキル