@perrylink/dsh-ticktick 0.1.2
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/CHANGELOG.md +24 -0
- package/LICENSE +201 -0
- package/README.es.md +41 -0
- package/README.hi.md +33 -0
- package/README.md +111 -0
- package/README.pt.md +41 -0
- package/README.zh.md +111 -0
- package/cordis.patch.yml +35 -0
- package/lib/client.js +6233 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +1349 -0
- package/lib/typert.host.js +26 -0
- package/lib/types/client/TicktickAction.d.ts +29 -0
- package/lib/types/client/TicktickAction.d.ts.map +1 -0
- package/lib/types/client/TicktickSettingsCard.d.ts +27 -0
- package/lib/types/client/TicktickSettingsCard.d.ts.map +1 -0
- package/lib/types/client/api.d.ts +34 -0
- package/lib/types/client/api.d.ts.map +1 -0
- package/lib/types/client/dates.d.ts +26 -0
- package/lib/types/client/dates.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +34 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/locales.d.ts +61 -0
- package/lib/types/client/locales.d.ts.map +1 -0
- package/lib/types/client/order.d.ts +25 -0
- package/lib/types/client/order.d.ts.map +1 -0
- package/lib/types/client/remote.d.ts +260 -0
- package/lib/types/client/remote.d.ts.map +1 -0
- package/lib/types/client/styles.d.ts +13 -0
- package/lib/types/client/styles.d.ts.map +1 -0
- package/lib/types/config.d.ts +64 -0
- package/lib/types/config.d.ts.map +1 -0
- package/lib/types/domain.d.ts +70 -0
- package/lib/types/domain.d.ts.map +1 -0
- package/lib/types/index.d.ts +56 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/mcp.d.ts +94 -0
- package/lib/types/mcp.d.ts.map +1 -0
- package/lib/types/service.d.ts +160 -0
- package/lib/types/service.d.ts.map +1 -0
- package/lib/types/tools.d.ts +18 -0
- package/lib/types/tools.d.ts.map +1 -0
- package/lib/types/typert.host.d.ts +216 -0
- package/lib/types/typert.host.d.ts.map +1 -0
- package/lib/types/wire.d.ts +561 -0
- package/lib/types/wire.d.ts.map +1 -0
- package/lib/wire-C-vDxxnC.js +5288 -0
- package/package.json +187 -0
- package/probes/lib.mjs +65 -0
- package/probes/probe-bootstrap.mjs +10 -0
- package/probes/probe-crud.mjs +15 -0
- package/probes/probe-due.mjs +28 -0
- package/probes/probe-queries.mjs +18 -0
- package/probes/probe-reorder.mjs +24 -0
- package/src/client/TicktickAction.tsx +356 -0
- package/src/client/TicktickSettingsCard.tsx +182 -0
- package/src/client/api.ts +56 -0
- package/src/client/dates.ts +61 -0
- package/src/client/index.ts +119 -0
- package/src/client/locales.ts +113 -0
- package/src/client/order.ts +37 -0
- package/src/client/remote.ts +76 -0
- package/src/client/styles.ts +48 -0
- package/src/config.ts +136 -0
- package/src/domain.ts +224 -0
- package/src/index.ts +139 -0
- package/src/mcp.ts +213 -0
- package/src/service.ts +403 -0
- package/src/tools.ts +336 -0
- package/src/typert.host.ts +25 -0
- package/src/wire.ts +401 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
|
+
|
|
5
|
+
## [0.1.2] - 2026-09-04
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Republish under the scoped npm name `@perrylink/dsh-ticktick`: the bare `dsh-ticktick` name is owned by another account (publish E403), so the package, the bundle-patch row, the client bundle id, and the five-language install commands now carry the scoped name; the plugin id (`ticktick`), settings namespace, tools, and repository stay unchanged.
|
|
10
|
+
- Align the devDependency pins to the published dsh `0.1.2-rc.1` line and add the `dshWorkshop` omdsh-workshop-package/v1 intake manifest (carried over from the unreleased 0.1.1).
|
|
11
|
+
|
|
12
|
+
## [0.1.0] - 2026-09-03
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- TickTick (Dida365) task bridge over the official MCP endpoint: minimal streamable-HTTP MCP client (initialize handshake, session-id and protocol-version carry-over, Retry-After on 429, `isError` surfaced).
|
|
17
|
+
- `TicktickService` under the `ticktick` Typert Remote namespace: status, projects, tasks (aggregated with per-list warnings), add (with read-after-write verification), complete, remove, setDue (with the measured move-to-inbox detour for the server-side `update_task` crash), reorder (descending sortOrder semantics), completed (30-day window), search, batchAdd.
|
|
18
|
+
- Eleven curated agent tools (`ticktick_status/lists/tasks/add/complete/delete/due/reorder/completed/search/batch_add`) plus a system-prompt usage section; Code Mode calls come free via `output.schema`.
|
|
19
|
+
- Session-header task panel (`conversation.session.header.actions`): list filter, undone/completed views, full-text search, quick add, complete, delete with confirm, inline due dates with overdue/today/tomorrow chips, drag reorder (undone, single-list views).
|
|
20
|
+
- Plugin settings card (`settings.plugin.item`, key `ticktick`): secret token, token file, MCP endpoint, protected task ids; live token re-read with 401-triggered client reset.
|
|
21
|
+
- Protected task ids refuse every mutating operation before any wire call.
|
|
22
|
+
- Zero-dependency live-endpoint probes (`probes/`) for handshake, CRUD, due-date detour, reorder semantics, and query-tool contract discovery.
|
|
23
|
+
- Setup UX: DIDA365_TOKEN env fallback, one-step in-panel token setup with a connection status badge, settings-card Test-connection / Clear-credentials buttons, and CN/International endpoint presets.
|
|
24
|
+
- Unit specs: domain normalization, MCP client, service workarounds, drag math, due-date presentation, token resolution.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 PerryLink
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.es.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# dsh-ticktick
|
|
2
|
+
|
|
3
|
+
[English](README.md) | [涓枃](README.zh.md) | **Espa帽ol** | [Portugu锚s](README.pt.md) | [啶灌た啶ㄠ啶︵](README.hi.md)
|
|
4
|
+
|
|
5
|
+
Puente de tareas de TickTick / Dida365 (婊寸瓟娓呭崟) para [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): un panel de tareas en la cabecera de sesi贸n (filtro por lista, alta r谩pida, completar, borrar, fechas l铆mite, reordenar arrastrando), once herramientas para el agente, una tarjeta de configuraci贸n y un servicio Remote tipado 鈥?todo sobre el endpoint MCP oficial de TickTick.
|
|
6
|
+
|
|
7
|
+
## Caracter铆sticas
|
|
8
|
+
|
|
9
|
+
- **Panel de sesi贸n** 鈥?el bot贸n `ticktick` de la cabecera abre una ventana emergente: filtrar por lista (Todas + cada lista), a帽adir tareas con fecha opcional, completar, borrar (con confirmaci贸n), fijar/limpiar fechas l铆mite con etiquetas vencida/hoy/ma帽ana y reordenar arrastrando (vistas de una sola lista).
|
|
10
|
+
- **Ocho herramientas** 鈥?`ticktick_status`, `ticktick_lists`, `ticktick_tasks`, `ticktick_add`, `ticktick_complete`, `ticktick_delete`, `ticktick_due`, `ticktick_reorder`; Code Mode obtiene `await tools.ticktick_*(args)` gratis.
|
|
11
|
+
- **Tarjeta de configuraci贸n** 鈥?Ajustes 鈫?Plugins 鈫?TickTick: token API (secreto), archivo de token, endpoint MCP, ids protegidos.
|
|
12
|
+
- **Relectura del token en vivo** 鈥?el token se relee en cada petici贸n (secreto de la tarjeta > archivo, por defecto `$DSH_HOME/.ticktick-token`); un 401 reinicia el cliente.
|
|
13
|
+
- **Contorneos medidos** 鈥?el MCP de TickTick rechaza `update_task` para tareas de proyectos reales ("Expecting value鈥?); el puente reintenta con mover-a-bandeja 鈫?actualizar 鈫?devolver. Las listas con fallos de validaci贸n del servidor se omiten y se notifican como advertencias.
|
|
14
|
+
- **Ids protegidos** 鈥?las operaciones de mutaci贸n rechazan tareas protegidas antes de llamar a la red.
|
|
15
|
+
- **Sincronizaci贸n multidispositivo** 鈥?cada escritura va a la nube de TickTick; m贸vil, escritorio y web la ven.
|
|
16
|
+
|
|
17
|
+
## Instalaci贸n
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
dsh plugin --profile web add @perrylink/dsh-ticktick # npm (incluye lib/)
|
|
21
|
+
dsh plugin --profile web add "github:PerryLink/dsh-ticktick#<sha>" # git
|
|
22
|
+
dsh plugin --profile web add link:/path/to/dsh-ticktick # local
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Reinicia `dsh web`. Obt茅n el token API 鍙d护 (prefijo `dp_`) en la web de Dida365 (Perfil 鈫?Ajustes 鈫?Cuenta y seguridad 鈫?API 鍙d护) y p茅galo en la tarjeta o escr铆belo en `$DSH_HOME/.ticktick-token`.
|
|
26
|
+
|
|
27
|
+
| Clave | Por defecto | Significado |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `tokenFile` | `''` | Archivo de token; vac铆o = `$DSH_HOME/.ticktick-token` |
|
|
30
|
+
| `mcpUrl` | `https://mcp.dida365.com` | Endpoint MCP (el internacional no est谩 verificado) |
|
|
31
|
+
| `toolCallTimeoutMs` | `30000` | Plazo por tools/call en ms |
|
|
32
|
+
| `protectedTaskIds` | `[]` | Ids que las mutaciones rechazan |
|
|
33
|
+
| `tools.*` | `''` | Nombres MCP fijados; `''` = descubrir |
|
|
34
|
+
|
|
35
|
+
## Limitaciones
|
|
36
|
+
|
|
37
|
+
El endpoint internacional no est谩 verificado; las vistas de completadas y la b煤squeda se difieren (contratos descubiertos por `probes/probe-queries.mjs`); no expongas `dsh web` a internet. Verificaci贸n en vivo: exporta `DIDA365_TOKEN` y ejecuta `node probes/probe-*.mjs`.
|
|
38
|
+
|
|
39
|
+
## Licencia
|
|
40
|
+
|
|
41
|
+
[Apache-2.0](LICENSE)
|
package/README.hi.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# dsh-ticktick
|
|
2
|
+
|
|
3
|
+
[English](README.md) | [涓枃](README.zh.md) | [Espa帽ol](README.es.md) | [Portugu锚s](README.pt.md) | **啶灌た啶ㄠ啶︵**
|
|
4
|
+
|
|
5
|
+
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 啶曕 啶侧た啶?TickTick / Dida365 (婊寸瓟娓呭崟) 啶曕ぞ啶班啶?啶膏啶む: 啶膏い啷嵿ぐ-啶多啶班啶?啶曕ぞ啶班啶?啶啶ㄠげ (啶膏啶氞 啶ぜ啶苦げ啷嵿啶? 啶む啶掂ぐ啶苦い 啶溹啶∴ぜ, 啶啶班啶?啶曕ぐ啷囙, 啶灌啶距啶? 啶ㄠた啶い 啶むた啶ムた啶ぞ啶? 啶∴啶班啶?啶曕啶班ぎ), 啶嗋 啶忇啷囙啶?啶夃お啶曕ぐ啶? 啶膏啶熰た啶傕 啶曕ぞ啶班啶?啶斷ぐ 啶忇 啶熰ぞ啶囙お啷嵿ぁ Remote 啶膏啶掂ぞ 鈥?啶膏が 啶嗋ぇ啶苦啶距ぐ啶苦 TickTick MCP 啶忇啶∴お啷夃啶傕 啶ぐ啷?
|
|
6
|
+
## 啶掂た啶多啶粪い啶距啶?
|
|
7
|
+
- **啶膏い啷嵿ぐ 啶啶ㄠげ** 鈥?啶多啶班啶?啶曕ぞ `ticktick` 啶啶?啶啶啶?啶栢啶侧い啶?啶灌: 啶膏啶氞 啶膏 啶ぜ啶苦げ啷嵿啶?(啶膏き啷€ + 啶灌ぐ 啶膏啶氞), 啶掂啶曕げ啷嵿お啶苦 啶むた啶ムた 啶曕 啶膏ぞ啶?啶溹啶∴ぜ啶ㄠぞ, 啶啶班啶?啶曕ぐ啶ㄠぞ, 啶灌啶距え啶?(啶啶粪啶熰た 啶膏す啶苦い), 啶呧い啶苦う啷囙く/啶嗋/啶曕げ 啶氞た啶啶?啶曕 啶膏ぞ啶?啶むた啶ムた 啶膏啶?啶膏ぞ啶ぜ 啶曕ぐ啶ㄠぞ, 啶斷ぐ 啶∴啶班啶?啶曕啶班ぎ (啶忇啶?啶膏啶氞 啶︵啶多啶?啷?- **啶嗋 啶夃お啶曕ぐ啶?* 鈥?`ticktick_status`, `ticktick_lists`, `ticktick_tasks`, `ticktick_add`, `ticktick_complete`, `ticktick_delete`, `ticktick_due`, `ticktick_reorder`; Code Mode 啶曕 `await tools.ticktick_*(args)` 啶啶ぜ啷嵿い 啶た啶侧い啶?啶灌啷?- **啶膏啶熰た啶傕 啶曕ぞ啶班啶?* 鈥?啶膏啶熰た啶傕啷嵿じ 鈫?啶啶侧啶囙え啷嵿じ 鈫?TickTick: API 啶熰啶曕え (啶椸啶啶?, 啶熰啶曕え 啶ぜ啶距啶? MCP 啶忇啶∴お啷夃啶傕, 啶膏啶班啷嵿し啶苦い id啷?- **啶侧ぞ啶囙さ 啶熰啶曕え 啶啶ㄠぐ啷嵿お啶犩え** 鈥?啶熰啶曕え 啶灌ぐ 啶呧え啷佮ぐ啷嬥ぇ 啶ぐ 啶︵啶ぞ啶班ぞ 啶あ啶监ぞ 啶溹ぞ啶むぞ 啶灌 (啶曕ぞ啶班啶?啶椸啶啶?> 啶ぜ啶距啶? 啶∴た啶ぜ啷夃げ啷嵿 `$DSH_HOME/.ticktick-token`); 401 啶曕啶侧ぞ啶囙啶?啶班啶膏啶?啶曕ぐ啶むぞ 啶灌啷?- **啶ぞ啶 啶椸 啶夃お啶距く** 鈥?TickTick MCP 啶掂ぞ啶膏啶むさ啶苦 啶ぐ啶苦く啷嬥啶ㄠぞ啶撪 啶曕 啶曕ぞ啶班啶啶?啶曕 啶侧た啶?`update_task` 啶呧じ啷嵿さ啷€啶曕ぞ啶?啶曕ぐ啶むぞ 啶灌 ("Expecting value鈥?); 啶膏啶む 啶囙え啶啶曕啶?啶侧-啶溹ぞ啶?鈫?啶呧お啶∴啶?鈫?啶掂ぞ啶じ-啶侧ぞ啶?啶膏 啶啶ㄠ 啶啶班く啶距じ 啶曕ぐ啶むぞ 啶灌啷?啶膏ぐ啷嵿さ啶?啶膏い啷嵿く啶距お啶?啶啶?啶掂た啶げ 啶膏啶氞た啶ぞ啶?啶涏啶∴ぜ啷€ 啶溹ぞ啶む 啶灌啶?啶斷ぐ 啶氞啶むぞ啶掂え啷€ 啶曕 啶班啶?啶啶?啶︵た啶栢い啷€ 啶灌啶傕イ
|
|
8
|
+
- **啶膏啶班啷嵿し啶苦い id** 鈥?啶夃い啷嵿お啶班た啶掂ぐ啷嵿い啶?啶膏啶氞ぞ啶侧え 啶ㄠ啶熰さ啶班啶?啶曕啶?啶膏 啶す啶侧 啶膏啶班啷嵿し啶苦い 啶曕ぞ啶班啶啶?啶曕 啶呧じ啷嵿さ啷€啶曕ぞ啶?啶曕ぐ啶む 啶灌啶傕イ
|
|
9
|
+
- **啶す啷?啶∴た啶掂ぞ啶囙じ 啶膏ぎ啶ㄠ啶掂く** 鈥?啶灌ぐ 啶侧啶栢え TickTick 啶曕啶侧ぞ啶夃ぁ 啶ぐ 啶溹ぞ啶むぞ 啶灌; 啶ぜ啷嬥え, 啶∴啶膏啶曕啷夃お 啶斷ぐ 啶掂啶?啶夃じ啷?啶︵啶栢い啷?啶灌啶傕イ
|
|
10
|
+
|
|
11
|
+
## 啶囙啶膏啶熰啶侧啶多え
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
dsh plugin --profile web add @perrylink/dsh-ticktick # npm (lib/ 啶膏す啶苦い)
|
|
15
|
+
dsh plugin --profile web add "github:PerryLink/dsh-ticktick#<sha>" # git
|
|
16
|
+
dsh plugin --profile web add link:/path/to/dsh-ticktick # 啶膏啶ムぞ啶ㄠ啶?```
|
|
17
|
+
|
|
18
|
+
`dsh web` 啶啶ㄠ 啶嗋ぐ啶傕き 啶曕ぐ啷囙啷?Dida365 啶掂啶?(啶啶班啶ぜ啶距啶?鈫?啶膏啶熰た啶傕啷嵿じ 鈫?啶栢ぞ啶むぞ 啶斷ぐ 啶膏啶班啷嵿し啶?鈫?API 鍙d护) 啶膏 `dp_` 啶熰啶曕え 啶侧啶?啶斷ぐ 啶曕ぞ啶班啶?啶啶?啶氞た啶啶距啶?啶ぞ `$DSH_HOME/.ticktick-token` 啶啶?啶侧た啶栢啶傕イ
|
|
19
|
+
|
|
20
|
+
| 啶曕啶傕啷€ | 啶∴た啶ぜ啷夃げ啷嵿 | 啶呧ぐ啷嵿ぅ |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `tokenFile` | `''` | 啶熰啶曕え 啶ぜ啶距啶? 啶栢ぞ啶侧 = `$DSH_HOME/.ticktick-token` |
|
|
23
|
+
| `mcpUrl` | `https://mcp.dida365.com` | MCP 啶忇啶∴お啷夃啶傕 (啶呧啶むぐ啷嵿ぐ啶距し啷嵿啷嵿ぐ啷€啶?啶膏い啷嵿く啶距お啶苦い 啶ㄠす啷€啶? |
|
|
24
|
+
| `toolCallTimeoutMs` | `30000` | 啶啶班い啶?tools/call 啶膏ぎ啶?啶膏啶ぞ (ms) |
|
|
25
|
+
| `protectedTaskIds` | `[]` | 啶掂 id 啶溹た啶ㄠ啶灌啶?啶夃い啷嵿お啶班た啶掂ぐ啷嵿い啶?啶呧じ啷嵿さ啷€啶曕ぞ啶?啶曕ぐ啶む 啶灌啶?|
|
|
26
|
+
| `tools.*` | `''` | 啶ㄠた啶多啶氞た啶?MCP 啶ㄠぞ啶? `''` = 啶栢啶溹啶?|
|
|
27
|
+
|
|
28
|
+
## 啶膏啶ぞ啶忇
|
|
29
|
+
|
|
30
|
+
啶呧啶むぐ啷嵿ぐ啶距し啷嵿啷嵿ぐ啷€啶?啶忇啶∴お啷夃啶傕 啶膏い啷嵿く啶距お啶苦い 啶ㄠす啷€啶?啶灌; 啶啶班啶?啶︵啶多啶?啶斷ぐ 啶栢啶?啶ぞ啶?啶啶?(`probes/probe-queries.mjs` 啶呧え啷佮が啶傕ぇ 啶栢啶溹い啶?啶灌); `dsh web` 啶曕 啶囙啶熰ぐ啶ㄠ啶?啶ぐ 啶夃啶距啶?啶?啶曕ぐ啷囙啷?啶侧ぞ啶囙さ 啶膏い啷嵿く啶距お啶? `DIDA365_TOKEN` 啶ㄠた啶班啶ぞ啶?啶曕ぐ啷囙 啶斷ぐ `node probes/probe-*.mjs` 啶氞げ啶距啶佮イ
|
|
31
|
+
|
|
32
|
+
## 啶侧ぞ啶囙じ啷囙啶?
|
|
33
|
+
[Apache-2.0](LICENSE)
|
package/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# dsh-ticktick
|
|
2
|
+
|
|
3
|
+
**English** | [中文](README.zh.md) | [Español](README.es.md) | [Português](README.pt.md) | [हिन्दी](README.hi.md)
|
|
4
|
+
|
|
5
|
+
TickTick / Dida365 (滴答清单) task bridge for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): a Session-header task panel (list filter, quick add, complete, delete, due dates, drag reorder), eight curated agent tools, a plugin settings card, and a typed Remote service — all over the official TickTick MCP endpoint.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Session-header panel** — the `ticktick` action in the Session header opens a popup: filter by list (All + every list), toggle undone/completed views, full-text search, add tasks with an optional due date, complete, delete (with confirm), set/clear due dates with overdue/today/tomorrow chips, and drag-reorder (undone, single-list views). A status dot shows the connection state; when no token is configured the panel offers one-step in-panel token setup.
|
|
10
|
+
- **Eleven agent tools** — `ticktick_status`, `ticktick_lists`, `ticktick_tasks`, `ticktick_add`, `ticktick_complete`, `ticktick_delete`, `ticktick_due`, `ticktick_reorder`, `ticktick_completed`, `ticktick_search`, `ticktick_batch_add`; Code Mode gets `await tools.ticktick_*(args)` for free.
|
|
11
|
+
- **Settings card** — Settings → Plugins → TickTick: API token (secret), token file, MCP endpoint with CN/International presets, protected task ids, a Test-connection button, and a Clear-credentials button.
|
|
12
|
+
- **Live token re-read** — the Bearer token is re-read per request (card secret > token file, default `$DSH_HOME/.ticktick-token`); a 401 resets the client so a rotated token activates without restart.
|
|
13
|
+
- **Measured workarounds** — the TickTick MCP server rejects `update_task` for tasks inside regular projects ("Expecting value: line 1 column 1"); the bridge retries via a move-to-inbox → update → move-back detour. Lists that fail server-side validation (historical `repeatFrom: ''` data) are skipped and reported as warnings, never silently dropped.
|
|
14
|
+
- **Protected ids** — mutating operations refuse tasks on the protected-id list before any wire call.
|
|
15
|
+
- **Multi-device sync** — every write lands on the TickTick cloud account, so the phone/desktop/web apps see it; every read fetches current state.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
# npm (published artifact includes lib/, no build permission needed)
|
|
21
|
+
dsh plugin --profile web add @perrylink/dsh-ticktick
|
|
22
|
+
|
|
23
|
+
# git source (pin a commit; pnpm asks you to allow the prepare build once)
|
|
24
|
+
dsh plugin --profile web add "github:PerryLink/dsh-ticktick#<sha>"
|
|
25
|
+
|
|
26
|
+
# local development
|
|
27
|
+
dsh plugin --profile web add link:/path/to/dsh-ticktick
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Restart `dsh web` (bundle plugins activate on restart). The `ticktick` action appears in the Session header; the card appears under Settings → Plugins.
|
|
31
|
+
|
|
32
|
+
## Configuration
|
|
33
|
+
|
|
34
|
+
1. Get an API 口令 (a `dp_`-prefixed token) from the Dida365/TickTick web app: Profile → Settings → Account & Security → API 口令.
|
|
35
|
+
2. Pick one of three token sources (priority order): the Settings → Plugins → TickTick card's secret field, the `DIDA365_TOKEN` environment variable, or a token file (default `$DSH_HOME/.ticktick-token`, one line). Writing the file activates the bridge without any config change.
|
|
36
|
+
3. Use the card's **Test connection** button to verify the token, and **Clear credentials** to wipe it.
|
|
37
|
+
|
|
38
|
+
| Config key | Default | Meaning |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `tokenFile` | `''` | Path to a text file holding the token; empty resolves to `$DSH_HOME/.ticktick-token` |
|
|
41
|
+
| `mcpUrl` | `https://mcp.dida365.com` | TickTick MCP endpoint (the international endpoint is unverified — see below) |
|
|
42
|
+
| `toolCallTimeoutMs` | `30000` | Per tools/call deadline in milliseconds |
|
|
43
|
+
| `protectedTaskIds` | `[]` | Task ids every mutating operation refuses |
|
|
44
|
+
| `tools.*` | `''` each | Raw MCP tool-name pins (projects/tasks/create/complete/remove/update/move); `''` = discover by pattern |
|
|
45
|
+
|
|
46
|
+
## Agent tools
|
|
47
|
+
|
|
48
|
+
| Tool | Purpose |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `ticktick_status` | connection state: token configured, client connected, endpoint, last error |
|
|
51
|
+
| `ticktick_lists` | every list (project), the virtual Inbox included |
|
|
52
|
+
| `ticktick_tasks` | undone tasks: one list or all aggregated, with per-list warnings |
|
|
53
|
+
| `ticktick_add` | create a task (list, optional ISO due date) |
|
|
54
|
+
| `ticktick_complete` | complete a task (task id + list id) |
|
|
55
|
+
| `ticktick_delete` | delete a task (task id + list id) |
|
|
56
|
+
| `ticktick_due` | set/clear a due date (omit the date to clear) |
|
|
57
|
+
| `ticktick_reorder` | assign a new integer sortOrder (lists order by descending sortOrder) |
|
|
58
|
+
| `ticktick_completed` | tasks completed within a window (default 30 days), optionally one list |
|
|
59
|
+
| `ticktick_search` | full-text search over tasks (the official search tool) |
|
|
60
|
+
| `ticktick_batch_add` | create several tasks in one call |
|
|
61
|
+
|
|
62
|
+
## Architecture
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
browser panel ── ctx.remote.ticktick.* ──▶ TicktickService (Typert Remote)
|
|
66
|
+
settings card ── ctx.settingsScope ──────▶ settings namespace "ticktick"
|
|
67
|
+
agent tools ─── ctx.tools (ticktick_*) ──▶ the same service
|
|
68
|
+
│
|
|
69
|
+
▼
|
|
70
|
+
minimal streamable-HTTP MCP client
|
|
71
|
+
(session id, protocol version, Retry-After)
|
|
72
|
+
│
|
|
73
|
+
▼
|
|
74
|
+
https://mcp.dida365.com (official TickTick MCP)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Known limitations
|
|
78
|
+
|
|
79
|
+
- The international TickTick endpoint is **unverified**: `mcpUrl` defaults to the CN endpoint, and the international MCP URL has not been probed.
|
|
80
|
+
- The completed view, search, and batch add ride the MCP tools `list_completed_tasks_by_date`, `search`, and `batch_add_tasks`; their wire contracts come from the published catalogue (`dida365-sdk` stubs) and **re-verification against the live endpoint is pending** — run `probes/probe-queries.mjs` with a real token before claiming them verified.
|
|
81
|
+
- The measured `update_task` crash and the list-validation failure are server-side behaviors; `probes/` re-verifies them against the live endpoint before a release (run with `DIDA365_TOKEN` exported).
|
|
82
|
+
- The `/api` surface the panel uses is the standard harness Typert gateway; the token is stored locally (settings document or token file) and sent only to TickTick's own servers. Do not expose a `dsh web` instance to the public internet.
|
|
83
|
+
|
|
84
|
+
## Verify the bridge against the live endpoint
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
# PowerShell
|
|
88
|
+
$env:DIDA365_TOKEN='dp_...'
|
|
89
|
+
node probes/probe-bootstrap.mjs # handshake + tool catalogue
|
|
90
|
+
node probes/probe-crud.mjs # create/complete/delete round trip
|
|
91
|
+
node probes/probe-due.mjs # due dates (+ detour with a PROJECT_ID)
|
|
92
|
+
node probes/probe-reorder.mjs # sortOrder semantics
|
|
93
|
+
node probes/probe-queries.mjs # P2 query-tool contract discovery
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Uninstall
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
dsh plugin --profile web remove @perrylink/dsh-ticktick
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Restart `dsh web`. All runtime registrations (tools, panel, settings card, prompt section) are removed with the plugin. The only static residue is the token in the user settings document — clear it first with the card's **Clear credentials** button (or remove the token file / `DIDA365_TOKEN` variable) to detach completely. To keep the package installed but inactive, disable the row instead:
|
|
103
|
+
|
|
104
|
+
```yaml
|
|
105
|
+
- id: ticktick
|
|
106
|
+
disabled: true
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## License
|
|
110
|
+
|
|
111
|
+
[Apache-2.0](LICENSE)
|
package/README.pt.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# dsh-ticktick
|
|
2
|
+
|
|
3
|
+
[English](README.md) | [涓枃](README.zh.md) | [Espa帽ol](README.es.md) | **Portugu锚s** | [啶灌た啶ㄠ啶︵](README.hi.md)
|
|
4
|
+
|
|
5
|
+
Ponte de tarefas TickTick / Dida365 (婊寸瓟娓呭崟) para o [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): painel de tarefas no cabe莽alho da sess茫o (filtro por lista, adi莽茫o r谩pida, concluir, excluir, datas de vencimento, reordenar arrastando), Onze ferramentas do agente, cart茫o de configura莽茫o e um servi莽o Remote tipado 鈥?tudo sobre o endpoint MCP oficial do TickTick.
|
|
6
|
+
|
|
7
|
+
## Funcionalidades
|
|
8
|
+
|
|
9
|
+
- **Painel da sess茫o** 鈥?o bot茫o `ticktick` do cabe莽alho abre um popup: filtrar por lista (Todas + cada lista), adicionar tarefas com data opcional, concluir, excluir (com confirma莽茫o), definir/limpar datas com selos vencida/hoje/amanh茫 e reordenar arrastando (vistas de lista 煤nica).
|
|
10
|
+
- **Onze ferramentas** 鈥?`ticktick_status`, `ticktick_lists`, `ticktick_tasks`, `ticktick_add`, `ticktick_complete`, `ticktick_delete`, `ticktick_due`, `ticktick_reorder`; o Code Mode ganha `await tools.ticktick_*(args)` de gra莽a.
|
|
11
|
+
- **Cart茫o de configura莽茫o** 鈥?Ajustes 鈫?Plugins 鈫?TickTick: token de API (segredo), arquivo de token, endpoint MCP, ids protegidos.
|
|
12
|
+
- **Releitura do token em tempo real** 鈥?o token 茅 relido a cada requisi莽茫o (segredo do cart茫o > arquivo, padr茫o `$DSH_HOME/.ticktick-token`); um 401 reinicia o cliente.
|
|
13
|
+
- **Contornos medidos** 鈥?o MCP do TickTick rejeita `update_task` para tarefas de projetos reais ("Expecting value鈥?); a ponte tenta de novo com mover-para-caixa 鈫?atualizar 鈫?devolver. Listas com falha de valida莽茫o do servidor s茫o ignoradas e reportadas como avisos.
|
|
14
|
+
- **Ids protegidos** 鈥?muta莽玫es recusam tarefas protegidas antes de qualquer chamada de rede.
|
|
15
|
+
- **Sincroniza莽茫o multidispositivo** 鈥?cada escrita vai para a nuvem do TickTick; celular, desktop e web a veem.
|
|
16
|
+
|
|
17
|
+
## Instala莽茫o
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
dsh plugin --profile web add @perrylink/dsh-ticktick # npm (inclui lib/)
|
|
21
|
+
dsh plugin --profile web add "github:PerryLink/dsh-ticktick#<sha>" # git
|
|
22
|
+
dsh plugin --profile web add link:/path/to/dsh-ticktick # local
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Reinicie o `dsh web`. Obtenha o token API 鍙d护 (prefixo `dp_`) no site do Dida365 (Perfil 鈫?Ajustes 鈫?Conta e seguran莽a 鈫?API 鍙d护) e cole-o no cart茫o ou escreva-o em `$DSH_HOME/.ticktick-token`.
|
|
26
|
+
|
|
27
|
+
| Chave | Padr茫o | Significado |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `tokenFile` | `''` | Arquivo de token; vazio = `$DSH_HOME/.ticktick-token` |
|
|
30
|
+
| `mcpUrl` | `https://mcp.dida365.com` | Endpoint MCP (o internacional n茫o est谩 verificado) |
|
|
31
|
+
| `toolCallTimeoutMs` | `30000` | Prazo por tools/call em ms |
|
|
32
|
+
| `protectedTaskIds` | `[]` | Ids que as muta莽玫es recusam |
|
|
33
|
+
| `tools.*` | `''` | Nomes MCP fixados; `''` = descobrir |
|
|
34
|
+
|
|
35
|
+
## Limita莽玫es
|
|
36
|
+
|
|
37
|
+
O endpoint internacional n茫o est谩 verificado; visualiza莽茫o de conclu铆das e busca ficam adiadas (contratos descobertos por `probes/probe-queries.mjs`); n茫o exponha `dsh web` 脿 internet. Verifica莽茫o ao vivo: exporte `DIDA365_TOKEN` e execute `node probes/probe-*.mjs`.
|
|
38
|
+
|
|
39
|
+
## Licen莽a
|
|
40
|
+
|
|
41
|
+
[Apache-2.0](LICENSE)
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# dsh-ticktick
|
|
2
|
+
|
|
3
|
+
[English](README.md) | **中文** | [Español](README.es.md) | [Português](README.pt.md) | [हिन्दी](README.hi.md)
|
|
4
|
+
|
|
5
|
+
面向 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的滴答清单(TickTick / Dida365)任务桥:会话头部任务面板(清单筛选、快速添加、完成、删除、截止日期、拖拽排序)、8 个精选 agent 工具、插件设置卡片,以及类型化的 Remote 服务——全部走官方滴答 MCP 端点。
|
|
6
|
+
|
|
7
|
+
## 功能
|
|
8
|
+
|
|
9
|
+
- **会话头部面板**:会话头部的 `ticktick` 按钮打开弹窗——按清单筛选(全部 + 各清单)、未完成/已完成视图切换、全文搜索、带可选日期的快速添加、勾选完成、确认删除、设置/清除截止日期(过期/今天/明天高亮 chip)、单清单未完成视图内拖拽排序。常驻连接状态圆点;未配置令牌时面板内直接一步粘贴保存。
|
|
10
|
+
- **11 个 agent 工具**:`ticktick_status`、`ticktick_lists`、`ticktick_tasks`、`ticktick_add`、`ticktick_complete`、`ticktick_delete`、`ticktick_due`、`ticktick_reorder`、`ticktick_completed`、`ticktick_search`、`ticktick_batch_add`;Code Mode 免费获得 `await tools.ticktick_*(args)`。
|
|
11
|
+
- **设置卡片**:设置 → 插件 → TickTick:API 口令(secret)、令牌文件、端点预设(国内/国际版未实测/自定义)、受保护任务 id、一键**测试连接**与**清除凭据**。
|
|
12
|
+
- **令牌热重读**:Bearer 令牌每次请求重读(卡片 secret 优先于令牌文件,默认 `$DSH_HOME/.ticktick-token`);401 会重置客户端,轮换令牌无需重启。
|
|
13
|
+
- **实测绕行**:滴答 MCP 对真实项目内任务调用 `update_task` 会服务端崩溃("Expecting value: line 1 column 1")——桥自动走「移到收件箱 → 更新 → 移回」绕行;服务端校验失败的清单(历史 `repeatFrom: ''` 数据)跳过并以警告透传,绝不静默丢弃。
|
|
14
|
+
- **受保护任务**:变更操作在任何网络调用前拒绝受保护 id 列表中的任务。
|
|
15
|
+
- **多端同步**:所有写入落在滴答云端账号,手机/电脑/网页版都能看到;每次读取都是当前状态。
|
|
16
|
+
|
|
17
|
+
## 安装
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
# npm(发布产物含 lib/,无需构建许可)
|
|
21
|
+
dsh plugin --profile web add @perrylink/dsh-ticktick
|
|
22
|
+
|
|
23
|
+
# git 源码(钉住 commit;pnpm 首次会请你放行 prepare 构建)
|
|
24
|
+
dsh plugin --profile web add "github:PerryLink/dsh-ticktick#<sha>"
|
|
25
|
+
|
|
26
|
+
# 本地开发
|
|
27
|
+
dsh plugin --profile web add link:/path/to/dsh-ticktick
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
重启 `dsh web`(bundle 插件重启生效)。`ticktick` 按钮出现在会话头部;设置卡片出现在 设置 → 插件。
|
|
31
|
+
|
|
32
|
+
## 配置
|
|
33
|
+
|
|
34
|
+
1. 在滴答网页版获取 API 口令(`dp_` 开头):头像 → 设置 → 账户与安全 → API 口令。
|
|
35
|
+
2. 三种令牌来源任选其一(优先级从高到低):设置 → 插件 → TickTick 卡片的 secret 字段、`DIDA365_TOKEN` 环境变量、令牌文件(默认 `$DSH_HOME/.ticktick-token`,一行)。写文件即生效,无需任何配置变更。
|
|
36
|
+
3. 用卡片上的**测试连接**按钮验证令牌,**清除凭据**按钮一键抹除。
|
|
37
|
+
|
|
38
|
+
| 配置键 | 默认 | 含义 |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `tokenFile` | `''` | 存放令牌的文本文件路径;留空 = `$DSH_HOME/.ticktick-token` |
|
|
41
|
+
| `mcpUrl` | `https://mcp.dida365.com` | 滴答 MCP 端点(国际版端点未实测——见下文) |
|
|
42
|
+
| `toolCallTimeoutMs` | `30000` | 单次 tools/call 截止时间(毫秒) |
|
|
43
|
+
| `protectedTaskIds` | `[]` | 所有变更操作拒绝的任务 id |
|
|
44
|
+
| `tools.*` | 各自 `''` | 原始 MCP 工具名钉住(projects/tasks/create/complete/remove/update/move);`''` = 按模式发现 |
|
|
45
|
+
|
|
46
|
+
## Agent 工具
|
|
47
|
+
|
|
48
|
+
| 工具 | 用途 |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `ticktick_status` | 连接状态:令牌已配置、客户端已连接、端点、最近错误 |
|
|
51
|
+
| `ticktick_lists` | 全部清单(含虚拟收件箱) |
|
|
52
|
+
| `ticktick_tasks` | 未完成任务:单个清单或全部聚合,附带逐清单警告 |
|
|
53
|
+
| `ticktick_add` | 创建任务(清单、可选 ISO 截止日期) |
|
|
54
|
+
| `ticktick_complete` | 完成任务(任务 id + 清单 id) |
|
|
55
|
+
| `ticktick_delete` | 删除任务(任务 id + 清单 id) |
|
|
56
|
+
| `ticktick_due` | 设置/清除截止日期(省略日期 = 清除) |
|
|
57
|
+
| `ticktick_reorder` | 赋新整数 sortOrder(清单按 sortOrder 降序排列) |
|
|
58
|
+
| `ticktick_completed` | 时间窗内已完成任务(默认近 30 天),可选单清单 |
|
|
59
|
+
| `ticktick_search` | 任务全文搜索(官方 search 工具) |
|
|
60
|
+
| `ticktick_batch_add` | 一次调用批量创建任务 |
|
|
61
|
+
|
|
62
|
+
## 架构
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
浏览器面板 ── ctx.remote.ticktick.* ──▶ TicktickService(Typert Remote)
|
|
66
|
+
设置卡片 ──── ctx.settingsScope ──────▶ settings 命名空间 "ticktick"
|
|
67
|
+
agent 工具 ── ctx.tools(ticktick_*)──▶ 同一服务
|
|
68
|
+
│
|
|
69
|
+
▼
|
|
70
|
+
迷你 streamable-HTTP MCP 客户端
|
|
71
|
+
(session id、协议版本、Retry-After)
|
|
72
|
+
│
|
|
73
|
+
▼
|
|
74
|
+
https://mcp.dida365.com(官方滴答 MCP)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 已知限制
|
|
78
|
+
|
|
79
|
+
- 国际版 TickTick 端点**未实测**:`mcpUrl` 默认国内端点,国际版 MCP URL 尚未探测。
|
|
80
|
+
- 已完成视图、搜索与批量添加走官方 MCP 的 `list_completed_tasks_by_date`、`search`、`batch_add_tasks` 工具;其线上契约来自已发布目录(dida365-sdk 存根),**对真实端点的复验待做**——先用真实令牌跑 `probes/probe-queries.mjs`,再宣称已核验。
|
|
81
|
+
- 实测到的 `update_task` 崩溃与清单校验失败是服务端行为;发布前用 `probes/` 对真实端点复验(导出 `DIDA365_TOKEN` 后运行)。
|
|
82
|
+
- 面板使用的 `/api` 面是 harness 标准 Typert 网关;令牌仅存本地(设置文档或令牌文件)且只发给滴答自己的服务器。不要把 `dsh web` 实例暴露到公网。
|
|
83
|
+
|
|
84
|
+
## 对真实端点验证
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
# PowerShell
|
|
88
|
+
$env:DIDA365_TOKEN='dp_...'
|
|
89
|
+
node probes/probe-bootstrap.mjs # 握手 + 工具目录
|
|
90
|
+
node probes/probe-crud.mjs # 创建/完成/删除往返
|
|
91
|
+
node probes/probe-due.mjs # 截止日期(带 PROJECT_ID 可测绕行)
|
|
92
|
+
node probes/probe-reorder.mjs # sortOrder 语义
|
|
93
|
+
node probes/probe-queries.mjs # P2 查询工具契约探测
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## 卸载
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
dsh plugin --profile web remove @perrylink/dsh-ticktick
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
重启 `dsh web`。工具、面板、设置卡、系统提示等全部运行态注册随插件卸载一并撤销。唯一静态残留是用户设置文档里的令牌——卸载前用卡片的**清除凭据**按钮抹掉(或删除令牌文件 / `DIDA365_TOKEN` 变量)即可彻底断开。想保留安装但暂时停用,改禁用该行:
|
|
103
|
+
|
|
104
|
+
```yaml
|
|
105
|
+
- id: ticktick
|
|
106
|
+
disabled: true
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## License
|
|
110
|
+
|
|
111
|
+
[Apache-2.0](LICENSE)
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# dsh-ticktick bundle patch: mount the TickTick task bridge. `name` is the
|
|
2
|
+
# package name, resolved through the profile's node_modules. An id-targeted
|
|
3
|
+
# override replaces the whole config row — restate every key when overriding.
|
|
4
|
+
# The Bearer token (the TickTick API 口令, dp_ prefix) is read from the
|
|
5
|
+
# settings card or from $DSH_HOME/.ticktick-token at request time; writing
|
|
6
|
+
# the file activates the bridge without a config change.
|
|
7
|
+
- insert:
|
|
8
|
+
- id: ticktick
|
|
9
|
+
name: '@perrylink/dsh-ticktick'
|
|
10
|
+
config:
|
|
11
|
+
# Path to a text file holding the Bearer token. Empty (default)
|
|
12
|
+
# resolves to <DSH_HOME>/.ticktick-token at request time.
|
|
13
|
+
# tokenFile: ''
|
|
14
|
+
# TickTick MCP endpoint (CN default; the international endpoint is
|
|
15
|
+
# unverified — see README).
|
|
16
|
+
# mcpUrl: 'https://mcp.dida365.com'
|
|
17
|
+
# Per tools/call deadline in milliseconds.
|
|
18
|
+
# toolCallTimeoutMs: 30000
|
|
19
|
+
# Task ids every mutating operation refuses (space/comma separated).
|
|
20
|
+
# protectedTaskIds: []
|
|
21
|
+
# Raw MCP tool-name pins; each '' = discovered by pattern. The eleven
|
|
22
|
+
# operations are projects/tasks/create/complete/remove/update/move/
|
|
23
|
+
# completed/search/getTask/batchAdd.
|
|
24
|
+
# tools:
|
|
25
|
+
# projects: list_projects
|
|
26
|
+
# tasks: get_project_with_undone_tasks
|
|
27
|
+
# create: create_task
|
|
28
|
+
# complete: complete_task
|
|
29
|
+
# remove: delete_task
|
|
30
|
+
# update: update_task
|
|
31
|
+
# move: move_task
|
|
32
|
+
# completed: list_completed_tasks_by_date
|
|
33
|
+
# search: search
|
|
34
|
+
# getTask: get_task_by_id
|
|
35
|
+
# batchAdd: batch_add_tasks
|