Repository navigation
APIとMCPを画面の操作と同じ範囲にする - #25
Merged
Merged
Conversation
既存の作成・更新・削除はそのままに、検索、並び替え、タグ、設定、コピー、リザルトを同じ data.json で扱えるようにする。
画面は外部からのデータ変更で設定とテーマも読み直す。Googleの今すぐ同期はアプリプロセスだけが行う。
initialize、tools/list、tools/call を SDK 経由にし、画面の操作に対応するツール名で出す。
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
ローカルAPIとMCPから、画面と同じタスク・タグ・設定の操作ができるようにした。既存の
GET/POST /tasksとPATCH/DELETE /tasks/:idの形は維持している。MCPは公式SDKの initialize、tools/list、tools/call に合わせ、画面の操作名でツールを出す。チェックリスト
画面の操作 / ローカルAPI / MCP。できたものは ✅。
POST /tasksに加え、入力欄と同じ文(:プロジェクト、URL、日付、カンマ区切り)DELETE /tasks/:idは{deleted}を残し、一緒に消したIDを足したconfirmがdeleteのときだけ。設定は残る)互換
既存のHTTPは、認証、
unauthorized、title is required、task not found、status must be todo or doneなどの応答を維持する。一覧にcount、削除にalsoDeletedを足しただけで、以前からあるフィールドは変えていない。MCPのツール名は
list_tasks/create_task/update_task/delete_taskから、下の操作名に変えた。tauri-plugin-processは 2.3.1、tauri-plugin-updaterは 2.12.0 に固定した。それより新しい版は Tauri 2.12(Rust 1.90)が必要で、mise.toml の Rust 1.88 とロック中の Tauri 2.11.2 から外れる。検証
pnpm test: 23件成功。MCPクライアント(SDKの Client + stdio)で initialize、ping、tools/list、tools/call を確認した。追加、検索、親子、子が残る完了の失敗、cascade、削除、設定、フォーカス、タグ、Google状態にシークレットが出ないこと、未知のツールと引数不足の isError を含むcargo test --manifest-path src-tauri/core/Cargo.toml: 単体3件、HTTP 11件成功pnpm build(tsc と vite build)成功cargo check --manifest-path src-tauri/Cargo.toml --locked成功CI / checkは成功(push と pull_request の2本。test、build、cargo test)MCPの使い方
アプリを起動し、リポジトリで
pnpm installしたあと、stdio でnode mcp/server.jsを起動する。接続先はアプリが書くapi.json(macOS は~/Library/Application Support/com.fasttask.desktop/api.json)。FASTTASK_PORTとFASTTASK_TOKENで上書きできる。ツール:
search_tasksタスクを探すget_task1件取得add_tasks入力欄と同じ文、またはフィールド指定で追加edit_taskタイトル、プロジェクト、期限、URL、タグ、MUST、確認待ち、親set_task_status完了 / 未完了。子が残るときは cascadedelete_tasks削除(子孫も消える)reorder_tasks未完了の並び替えreorder_projectsプロジェクト見出しの並び替えlist_tags/save_tag/delete_tagタグget_settings/update_settings表示設定copy_listコピーと同じ Markdowndaily_resultリザルトrecord_focusフォーカス時間clear_all_dataタスクとタグの全削除(confirm: "delete")google_sync連携の状態、同期スイッチ、今すぐ同期、タスクリスト一覧