diff --git a/plugins/HopeYin/dida365/LICENSE b/plugins/HopeYin/dida365/LICENSE new file mode 100644 index 0000000..125be1b --- /dev/null +++ b/plugins/HopeYin/dida365/LICENSE @@ -0,0 +1,192 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + Copyright 2026 MCode Plugins contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/plugins/HopeYin/dida365/README.md b/plugins/HopeYin/dida365/README.md new file mode 100644 index 0000000..25f3152 --- /dev/null +++ b/plugins/HopeYin/dida365/README.md @@ -0,0 +1,65 @@ +# dida365 — 滴答清单任务管理 + +> Skills for managing your 滴答清单 (Dida365 China) tasks, lists, habits, focus records and countdowns through the official Dida365 MCP server. 本插件是纯 Skill 包:教会 Agent 安全、专业地操作滴答清单官方 MCP(40+ 工具),并提供「周报/文章批量转待办」的场景化工作流。 + +## Try it + +```text +我今天有哪些任务?按清单和优先级整理一下。 +``` + +```text +帮我把这周的高数复习拆成 5 天的任务,放进「学习」清单,每天下午 2 点。 +``` + +```text +帮我把这期技术周报整理一下,批量添加到滴答清单对应清单里。 +``` + +## How it works + +这是一个 **Skill-only 插件**,包含两个 Skill: + +- `dida365`:任务管理守则 —— 先查后改、删除类操作(`delete_task` / `delete_project_group` / `delete_comment` / `delete_focus`)前必须明确确认、模糊请求先澄清、复杂请求拆步执行,附参数约定(优先级 0/1/3/5 必须为 JSON 数字、ISO 8601 日期偏移量带冒号、批量上限、`delete_task` 需要 `task_id` + `project_id`)和失败排查指引。 +- `article2tasks`:场景化工作流 —— 把技术周报(批量)或单篇文章整理成待办,通过 `list_projects` 动态匹配你已有的清单并打标签,写入前必须预览确认。纯 MCP 调用,不依赖本地脚本,Windows / macOS / Linux 行为一致。 + +**为什么不自带 MCP 连接**:MCode 当前的可移植插件不支持插件级密钥/OAuth 配置,插件内声明的 MCP 连接无法携带你的凭据。因此本插件不内置 `mcp.json`,由你在客户端全局 MCP 设置中自行添加官方服务器(见下方配置)。 + +## Setup(一次性配置) + +1. 获取 API 口令:网页版滴答清单 → 头像 → 设置 → 账户与安全 → API 口令。 +2. 在 MiniMax Code 的**全局 MCP 设置**中添加服务器: + - 类型:Streamable HTTP + - URL:`https://mcp.dida365.com` + - Header:`Authorization: Bearer <你的口令>` +3. 安装本插件,Skills 会在你提出任务管理需求时自动生效。 + +如果你的客户端为远程 MCP 提供原生 OAuth 弹窗(如 Claude、Cursor),也可以只填 URL 走 OAuth 授权。 + +需要一个**中国版滴答清单(dida365.com)账号**;国际版 TickTick 账号数据不互通,请使用本仓库的 `ticktick` 插件。 + +## Data and network + +- 本插件自身**不发起任何网络请求**、不收集上传任何信息、不含任何凭据。 +- 任务数据读写发生在你配置的官方 MCP 服务器(`mcp.dida365.com`,HTTPS)与你自己的账号之间,仅在你的指令下进行。 +- `article2tasks` 会处理你提供的**周报正文、文章 URL 和本地文件路径**:这些内容由 Agent/模型读取和整理,整理结果(标题、推荐语、来源链接、分类、标签)可能写入你的滴答清单。请勿输入你不希望模型处理或写入任务列表的内容。 +- 你的 API 口令只保存在你自己的客户端配置中,插件不会也无法读取它。 + +## 局限性 + +- 官方 MCP 仅支持任务、清单、习惯、专注记录、纪念日的基础操作;日历视图、智能清单等高级功能暂不支持。 +- 习惯打卡补录范围限最近 90 天;未完成任务的日期范围查询跨度最大 14 天;专注记录一次最多查询一个月;批量完成清单内任务每次最多 20 个。 + +## 已知问题(实测记录) + +- **`priority` 在 MiniMax-M3 模型下会被字符串化**(2026-08-15 实测):在 MiniMax Code 中使用 MiniMax-M3 时,工具入参中的整数会被强制加引号(`"priority": 5` → `"priority": "5"`),导致 `create_task` / `update_task` / `batch_update_tasks` 被服务端拒绝(报 `must be integer`)。MiniMax-M2.7 和 Kimi-K2.7-Code 在相同输入下输出正常;直连官方 MCP 以 JSON 数字调用也已验证正常。应对:Skill 已内置传参规则与自检指引;若所用模型仍字符串化,先不带优先级创建任务,再到 App 内手动设置旗标。其余字段(标题、时间、清单等)读写正常。 +- **时间偏移量格式**:`dueDate` 必须通过 JSON Schema `date-time` 校验,偏移量写作 `+08:00` 而非 `+0800`。 +- **`delete_task` 需要同时提供 `task_id` 和 `project_id`**(清单 ID 可通过 `list_projects` 或创建任务的返回值获得)。 + +## Links + +- 官方 MCP 文档:https://help.dida365.com/articles/7438132116019216384 + +## Credits + +- `article2tasks` Skill 的「整理 → 预览 → 确认 → 执行」工作流与分类思路改编自 [article2ticktick](https://github.com/balabalabalading/article2ticktick)(MIT License),原作者 Mr.H。本实现改为纯 MCP 写入,不沿用其 URL Scheme + 本地脚本方案。 diff --git a/plugins/HopeYin/dida365/plugin.json b/plugins/HopeYin/dida365/plugin.json new file mode 100644 index 0000000..6761b64 --- /dev/null +++ b/plugins/HopeYin/dida365/plugin.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", + "name": "dida365", + "version": "0.2.0", + "description": "Skills for managing Dida365 (滴答清单, China) tasks, lists, habits, focus records and countdowns through the official Dida365 MCP server, which you add yourself in your client's MCP settings.", + "author": { + "name": "HopeYin", + "url": "https://github.com/HopeYin" + }, + "license": "Apache-2.0", + "homepage": "https://help.dida365.com/articles/7438132116019216384", + "keywords": [ + "minimax-code", + "plugin", + "mcp", + "dida365", + "task-management", + "habit-tracker" + ] +} diff --git a/plugins/HopeYin/dida365/skills/article2tasks/SKILL.md b/plugins/HopeYin/dida365/skills/article2tasks/SKILL.md new file mode 100644 index 0000000..c299ed3 --- /dev/null +++ b/plugins/HopeYin/dida365/skills/article2tasks/SKILL.md @@ -0,0 +1,65 @@ +--- +name: article2tasks +description: 将技术周报(批量)或单篇文章整理为滴答清单待办事项,自动分类到已有清单并打标签,全程通过 MCP 写入,跨平台无需任何本地脚本。当用户提供周报内容、文章链接,或提及「周报」「文章汇总」「添加到滴答」时,使用此技能。 +--- + +# 文章 / 周报 → 滴答清单(MCP 版) + +将技术周报中的推荐文章批量转换为滴答清单待办,或把单篇文章一键加入待办,自动完成分类与标签。 + +**本技能全程只使用 dida365 MCP 工具,不依赖任何本地脚本、URL Scheme 或操作系统命令,Windows / macOS / Linux 行为完全一致。** 执行任何写入前必须先向用户展示预览并得到确认。 + +## 前置:解析清单映射 + +工作流开始前,调用 `list_projects` 获取用户当前的清单列表: + +- **清单名 = 二级分类**。整理文章时只能使用用户已有的清单名,不得凭空发明分类。 +- 某篇文章明显不属于任何现有清单时:**停下来询问用户**(列出该文章和建议的新清单名),等用户在滴答清单中建好清单或指定归入某个现有清单后再继续。 +- 用户未提供任何偏好时,标签(三级分类)可自由命名,无需确认。 + +## 标准整理格式 + +收到周报批量内容后,先整理为如下结构再执行: + +```markdown +## 清单名(= 用户滴答清单中已有的清单) + +### 标签(自由命名) + +**[文章标题](文章链接)** + +- 推荐语(沿用周报原文的推荐语句,或自行概括 20~50 字) +- 出自:来源周报名称 +``` + +规则:每篇文章必须有「出自」行;文章块之间不加分隔线;标题保留 `[标题](链接)` 格式以便预览时核对。 + +## 字段映射(写入 MCP 时) + +| 滴答清单字段 | 来源 | 说明 | +|---|---|---| +| `title` | 文章标题(纯文本,不含 markdown 链接语法) | 链接不要写进标题 | +| `content` / `desc` | 推荐语 + `出自:来源` + 文章链接 | 多条目用换行合并 | +| `projectId` | 清单名 → 用 `list_projects` 的返回结果按名称精确匹配解析为 ID | 匹配不到时暂停询问,不要静默落入收集箱 | +| `tags` | 三级分类 | 先 `list_tags` 检查,缺失时用 `create_tag` 创建 | + +## 工作流分支 A:批量周报 + +1. **接收**:用户提供周报原文(粘贴文本或文件路径)。 +2. **整理**:按「标准整理格式」输出;遇到未知分类按前置规则暂停询问。 +3. **预览**:把整理结果以表格形式展示给用户(标题 / 清单 / 标签 / 链接),**等待明确确认**。 +4. **执行**:用 `batch_add_tasks` 一次性批量创建。不要在任务里设优先级,除非用户明确要求(且注意 priority 必须是 JSON 数字)。 +5. **复核**:执行后调用 `list_undone_tasks_by_time_query` 或按清单抽查,向用户汇报成功条数与失败明细。 + +## 工作流分支 B:单篇文章 + +1. **接收**:文章 URL + 标题(缺标题则从 URL 推断或询问)。 +2. **判断**:推断清单和标签,生成一句 20~50 字推荐语;清单不确定时先告知判断结果让用户确认。 +3. **预览**:展示将创建的任务字段,等确认。 +4. **执行**:用 `create_task` 创建,`content` 中包含 `出自:{文章URL}`。 + +## 注意事项 + +- 所有写操作遵循 dida365 技能的操作守则:先查后改、模糊请求先澄清。 +- 创建失败时按 dida365 技能的失败排查处理;日期字段如需设置,偏移量写 `+08:00` 带冒号格式。 +- 用户想积累自己的分类体系时,建议其在滴答清单中先建好清单,本技能会在下次运行时通过 `list_projects` 自动识别。 diff --git a/plugins/HopeYin/dida365/skills/dida365/SKILL.md b/plugins/HopeYin/dida365/skills/dida365/SKILL.md new file mode 100644 index 0000000..884322d --- /dev/null +++ b/plugins/HopeYin/dida365/skills/dida365/SKILL.md @@ -0,0 +1,55 @@ +--- +name: dida365 +description: Manage 滴答清单 (Dida365 China) tasks, lists, habits, focus records and countdowns through the official Dida365 MCP server at mcp.dida365.com. Use when the user asks to check, plan, create, update, complete or review tasks and habits on dida365.com, or asks about focus history and countdowns. +--- + +# 滴答清单任务管理 + +通过滴答清单官方 MCP 服务器(`https://mcp.dida365.com`,Streamable HTTP)管理用户的任务、清单、习惯、专注记录和纪念日。本 Skill 只适用于**中国版滴答清单(dida365.com)账号**;国际版 TickTick 账号请使用 `ticktick` 插件。 + +## 使用前确认 + +- 用户必须已完成授权(OAuth 或 API 口令)。如果任何工具调用返回认证错误,提示用户:网页版滴答清单 → 头像 → 设置 → 账户与安全 → API 口令,或重新走 OAuth 授权。 +- 首次协助时,可以先调用 `list_projects` 了解用户的清单结构,再执行任务操作。 + +## 操作守则 + +1. **先查后改**。更新、完成、移动、删除任务前,先通过 `search_task` 或 `filter_tasks` 确认目标任务,把将要执行的操作告诉用户,再执行。 +2. **删除不可逆**。`delete_task` 会把任务移入垃圾箱,`delete_project_group` 会解散文件夹下所有清单,`delete_comment` 和 `delete_focus` 会永久删除评论和专注记录 —— 执行这些操作前必须得到用户的明确确认。 +3. **描述要明确**。用户表述模糊时(没说是哪个清单、哪天、什么优先级),先问清楚再创建或修改,不要猜。 +4. **复杂请求拆步执行**。例如「把上周任务复盘并重新安排这周」应拆成:查询 → 汇总给用户 → 确认后批量操作。 + +## 工具速查 + +- **查询**:`search_task`(关键词)、`get_task_by_id`、`list_undone_tasks_by_time_query`(today / tomorrow / last7day / next7day 等)、`list_undone_tasks_by_date`(跨度最大 14 天)、`list_completed_tasks_by_date`、`filter_tasks`(多条件组合) +- **清单**:`list_projects`、`create_project`、`update_project`、`get_project_with_undone_tasks`;分组用 `list_columns` / `create_column` / `update_column`;文件夹用 `list_project_groups` / `create_project_group` / `update_project_group` / `delete_project_group` +- **任务**:`create_task`、`batch_add_tasks`、`complete_task`、`complete_tasks_in_project`(每次最多 20 个)、`update_task`、`move_task`、`batch_update_tasks`、`delete_task`(需同时提供 `task_id` 和 `project_id`) +- **评论与指派**:`get_comment`、`add_comment`、`delete_comment`、`assign_task`、`unassign_task`、`project_member` +- **标签**:`list_tags`、`create_tag` +- **习惯**:`list_habits`、`create_habit`、`update_habit`、`get_habit_checkins`、`upsert_habit_checkins`(打卡范围限最近 90 天) +- **专注记录**:`get_focuses_by_time`(一次最多查一个月)、`create_focus`、`delete_focus` +- **纪念日**:`list_countdowns` + +## 参数约定 + +- **对象参数必须传真正的 JSON 对象,绝不能传字符串化的 JSON**。实测发现部分模型(如 MiniMax-M3)会把 `task` 写成字符串、把整数加引号,导致内部字段类型全部失真: + - ❌ 错误:`"task": "{\"title\": \"x\", \"priority\": 5}"` + - ✅ 正确:`"task": {"title": "x", "priority": 5}` + - 若服务端回显的 `Received arguments` 里参数值带引号,说明本次调用已被字符串化,立即改用对象形式重发。 +- 优先级:0 = 无,1 = 低,3 = 中,5 = 高。用户说「高优先级」时用 5。 +- **`priority` 必须以 JSON 数字类型传递**(`"priority": 5`,不要加引号)。若服务端报 `task.priority: must be integer`,说明值在链路上被字符串化:先确认自己传的是数字后原样重试;仍失败则说明客户端序列化层存在问题,改为不带优先级创建任务,并告知用户在滴答清单 App 里手动设置旗标。 +- 日期时间使用 ISO 8601 并带时区,例如 `2026-08-16T15:00:00+08:00`。注意偏移量必须带冒号(`+08:00`),`+0800` 会被 date-time 格式校验拒绝。 +- 批量操作建议优先用 `batch_add_tasks` / `batch_update_tasks`,减少调用次数。 + +## 典型场景 + +- **今日概览**:「我今天有哪些任务?」→ `list_undone_tasks_by_time_query`(today),按清单和优先级整理输出。 +- **学习计划拆解**:「帮我把这周的高数复习拆成每天的任务」→ 先确认清单和每天的时间安排,再用 `batch_add_tasks` 批量创建。 +- **晚间复盘**:「看看我今天完成了什么,给习惯打卡」→ `list_completed_tasks_by_date` + `get_habit_checkins`,汇总后用 `upsert_habit_checkins` 补打卡。 +- **专注统计**:「我这个月专注了多久?」→ `get_focuses_by_time`,按月汇总趋势。 + +## 失败排查 + +- 找不到任务:让用户补充清单名、日期或关键词,或先 `search_task` 列出候选让用户指认。 +- 创建 / 更新失败:检查参数是否符合上方约定,把复杂请求拆小后重试。 +- 该 MCP 仅支持任务、清单、习惯、专注、纪念日的基础操作;日历视图、智能清单等高级功能不在能力范围内,不要承诺。