@geekbeer/minion 3.59.10 → 3.60.1

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.
@@ -2043,3 +2043,98 @@ hq note search <project_id> "キーワード"
2043
2043
  参加中の操作 (GET state / long-poll messages / speak / leave / end / heartbeat) は MCP ツール (`meeting_get_state`, `meeting_wait_for_next_message`, `meeting_speak`, `meeting_leave`, `meeting_end`) として claude に公開されるため、直接叩く必要はない。会議の**作成**だけはルーティン/スキルから明示的に叩く必要がある (作成後は HQ がプッシュした招待で各ミニオンに mt-* tmux セッションが立ち上がる)。
2044
2044
 
2045
2045
  **leave と end の違い**: `meeting_leave` は自分だけ退席するアクション (ルームは残る)、`meeting_end` (DELETE) はルームごと削除して全員解散させるアクション (ホストミニオン限定)。自分が招集した会議が終わったら必ず `meeting_end` を呼ばないとルームが孤児として残る。
2046
+
2047
+ ### Workspace Drive (HQ, experimental)
2048
+
2049
+ ワークスペース単位のファイル管理機能。`experimental_drive` フィーチャーフラグが ON のワークスペースで利用可能。すべてのエンドポイントは `Authorization: Bearer ${API_TOKEN}` + ワークスペースメンバーであるミニオンに限定。
2050
+
2051
+ | Method | Endpoint | Description |
2052
+ |--------|----------|-------------|
2053
+ | GET | `/api/minion/workspaces/:id/drive/files` | ファイル一覧。Query: `?folder_id=<uuid\|null>`, `?search=<keyword>` |
2054
+ | POST | `/api/minion/workspaces/:id/drive/files` | ファイルアップロード (`multipart/form-data`: `file`, `folder_id?`, `name?`) |
2055
+ | GET | `/api/minion/workspaces/:id/drive/files/:fileId` | ファイル metadata |
2056
+ | GET | `/api/minion/workspaces/:id/drive/files/:fileId/download` | 60秒有効な signed URL を返す |
2057
+
2058
+ ### Slide Decks 🧪 (HQ, experimental)
2059
+
2060
+ Drive 内のスライドデッキ。**スライドは Storage ではなく DB テーブルで管理** され、要素単位で API を叩ける。多人数同時編集とミニオン操作を前提に、各 PATCH は楽観ロック (`version` 必須) でガードされる。
2061
+
2062
+ **前提**: 対象ワークスペースで `experimental_drive` が ON、ミニオンが `workspace_minions` のメンバーであること。
2063
+
2064
+ #### デッキ操作
2065
+
2066
+ | Method | Endpoint | Description |
2067
+ |--------|----------|-------------|
2068
+ | GET | `/api/minion/workspaces/:id/drive/decks` | デッキ一覧 (非ゴミ箱、最大200件) |
2069
+ | POST | `/api/minion/workspaces/:id/drive/decks` | デッキ作成。Body: `{name, folder_id?, width?, height?}`。初期空白スライド1枚付き |
2070
+ | GET | `/api/minion/workspaces/:id/drive/decks/:deckId` | デッキメタ + スライド一覧 (要素は含まれない、軽量レスポンス)。`deckId` には `slide_decks.id` か `workspace_files.id` どちらでも可 |
2071
+ | DELETE | `/api/minion/workspaces/:id/drive/decks/:deckId` | ソフト削除 (Drive ゴミ箱へ移動) |
2072
+
2073
+ POST レスポンス例:
2074
+ ```json
2075
+ {
2076
+ "deck": { "id": "...", "workspace_file_id": "...", "width": 1920, "height": 1080 },
2077
+ "workspaceFileId": "<file-uuid>",
2078
+ "firstSlideId": "<slide-uuid>",
2079
+ "mime_type": "application/vnd.geekbeer.slides"
2080
+ }
2081
+ ```
2082
+
2083
+ #### スライド操作
2084
+
2085
+ | Method | Endpoint | Description |
2086
+ |--------|----------|-------------|
2087
+ | POST | `/api/minion/workspaces/:id/drive/decks/:deckId/slides` | スライド追加。Body: `{position?, background?, speaker_notes?}` (`position` 省略時は末尾) |
2088
+ | GET | `/api/minion/workspaces/:id/drive/slides/:slideId` | スライド + 全要素 (z-order 昇順) |
2089
+ | PATCH | `/api/minion/workspaces/:id/drive/slides/:slideId` | スライド更新。Body: `{version, background?, speaker_notes?, order_key?, is_skipped?}`。`version` 必須。`is_skipped=true` でプレゼン時に飛ばされる(順序は保持) |
2090
+ | DELETE | `/api/minion/workspaces/:id/drive/slides/:slideId` | スライド削除 (要素は CASCADE) |
2091
+
2092
+ #### 要素操作 (text / image)
2093
+
2094
+ | Method | Endpoint | Description |
2095
+ |--------|----------|-------------|
2096
+ | POST | `/api/minion/workspaces/:id/drive/slides/:slideId/elements` | 要素追加。Body: `{element_type: "text"\|"image", x, y, width, height, rotation?, z_index?, data}` |
2097
+ | PATCH | `/api/minion/workspaces/:id/drive/elements/:elementId` | 要素更新。Body: `{version, x?, y?, width?, height?, rotation?, data?, order_key?}`。`version` 必須、`element_type` は不変 |
2098
+ | DELETE | `/api/minion/workspaces/:id/drive/elements/:elementId` | 要素削除 |
2099
+
2100
+ #### data ペイロード形式
2101
+
2102
+ **text:**
2103
+ ```json
2104
+ {
2105
+ "content": "Hello",
2106
+ "style": {
2107
+ "fontFamily": "Inter, sans-serif",
2108
+ "fontSize": 32,
2109
+ "fontWeight": 400,
2110
+ "fontStyle": "normal",
2111
+ "color": "#111827",
2112
+ "textAlign": "left",
2113
+ "lineHeight": 1.4
2114
+ }
2115
+ }
2116
+ ```
2117
+
2118
+ **image:**
2119
+ ```json
2120
+ { "src": "<workspace_files.id>", "fit": "contain" }
2121
+ ```
2122
+
2123
+ `src` が UUID 形式なら表示時に Drive 内画像として解決される。外部URLも指定可。
2124
+
2125
+ #### 座標系
2126
+
2127
+ - 内部座標は **1920×1080 ピクセル固定** (デッキの `width` / `height` で参照可能)。左上が原点
2128
+ - 表示時は CSS transform で viewport にフィットする
2129
+ - `rotation` は中心基準の度数 (MVP では UI 未対応だが API では受け付ける)
2130
+
2131
+ #### エラーコード
2132
+
2133
+ | Code | 意味 |
2134
+ |------|------|
2135
+ | 400 | リクエスト不正 (`version` 欠落、`element_type` 不明、座標が数値でない等) |
2136
+ | 403 | `drive_not_enabled` (ワークスペースで Drive 未有効化) または `Minion is not a member` |
2137
+ | 404 | `not_found` (ID 間違いか別ワークスペースのリソース) |
2138
+ | 409 | `version_conflict` (他者の編集と衝突)、`name_conflict`、`order_key_collision` (同時挿入の競合、再送可) |
2139
+ | 410 | `deck_in_trash` (デッキがゴミ箱にある) |
2140
+
@@ -891,6 +891,37 @@ meeting_end() # DELETE /api/minion/meetings/:id を裏で叩く
891
891
  # → 全参加ミニオンに終了通知が push され、各 mt-* tmux が終了する
892
892
  ```
893
893
 
894
+ ## スライド作成・編集 🧪 (experimental)
895
+
896
+ ワークスペース Drive にスライドデッキを作成・編集する。「資料作って」「スライドにまとめて」と頼まれた時はこのワークフローを使う。専用スキル `create-slide-deck` / `edit-slide-deck` が用意されており、これらが優先。スキルが手元に無い場合は API 仕様 (`Slide Decks` セクション) を直接叩く。
897
+
898
+ ### 新規作成 (推奨フロー)
899
+
900
+ 1. **アウトラインを先に決める。** 1枚あたりのタイトルと主要メッセージを箇条書きにする。長くても5-10スライド程度を目安に
901
+ 2. デッキを作成: `POST /api/minion/workspaces/:id/drive/decks` (Body: `{name}`)。初期空白スライド1枚が `firstSlideId` で返る
902
+ 3. 各スライドに **テキスト要素** を1つずつ追加: `POST .../slides/:slideId/elements`
903
+ - タイトル: `{x: 160, y: 80, width: 1600, height: 160, data: {content, style: {fontSize: 56, fontWeight: 700, ...}}}`
904
+ - 本文: `{x: 160, y: 280, width: 1600, height: 700, data: {content, style: {fontSize: 32, ...}}}`
905
+ 4. 2枚目以降: `POST .../decks/:deckId/slides` でスライドを追加し、手順3を繰り返す
906
+ 5. 完了したらノートまたはスレッドで起票者にデッキ URL (`${HQ_URL}/drive/slides/<workspaceFileId>`) を共有する
907
+
908
+ 座標系は 1920×1080 ピクセル固定。詳細は `~/.minion/docs/api-reference.md` の `Slide Decks` セクションを参照。
909
+
910
+ ### 部分編集
911
+
912
+ 1. `GET .../decks/:deckId` でスライド一覧 (要素なし、軽量) を取得
913
+ 2. 対象スライドの中身を `GET .../slides/:slideId` で取得 (要素の `version` も返る)
914
+ 3. 編集対象の要素を `PATCH .../elements/:elementId` で更新。**Body に `version` 必須**
915
+ 4. 409 (`version_conflict`) が返ったら手順2から再取得してリトライ
916
+
917
+ ### 注意点
918
+
919
+ - **JSON 全体を送る方式ではない。** 1要素単位で PATCH するため、ミニオンが扱うコンテキストは常に小さい
920
+ - **1テキスト要素 = 単一スタイル。** 部分太字などはできない。スタイルを変えたい区間は別要素として配置する
921
+ - **画像は Drive にアップロード済みであることが前提。** `POST .../drive/files` で画像をアップロードした後、その `workspace_files.id` を `data.src` に貼る
922
+ - **削除はソフト削除** (`DELETE .../decks/:deckId` で Drive ゴミ箱に入る)。誤削除は UI から復元できる
923
+ - スライドマスター・テーマ・トランジション・アニメーションは MVP ではサポート外
924
+
894
925
  ## ツール・MCPサーバーのインストール
895
926
 
896
927
  スキルが `requires` で宣言している MCP サーバーや CLI ツールが不足している場合は、`~/.minion/docs/environment-setup.md` の手順に従ってインストールする。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekbeer/minion",
3
- "version": "3.59.10",
3
+ "version": "3.60.1",
4
4
  "description": "AI Agent runtime for Minion - manages status and skill deployment on VPS",
5
5
  "main": "linux/server.js",
6
6
  "bin": {