dailynote-mcp 0.1.0 → 0.2.0
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/INSTALL_CODEX.md +8 -5
- package/README.md +30 -6
- package/claude-desktop.example.json +1 -1
- package/codex.example.toml +1 -1
- package/journal.mjs +15 -4
- package/package.json +1 -1
package/INSTALL_CODEX.md
CHANGED
|
@@ -4,6 +4,9 @@ MCP lokal ini menyediakan satu tool, `add_journal_entry`. Setiap pengguna memaka
|
|
|
4
4
|
token dari akun DailyNote sendiri. Token diteruskan melalui environment variable;
|
|
5
5
|
tidak perlu file `.env` atau menyimpan token di konfigurasi Codex.
|
|
6
6
|
|
|
7
|
+
Versi `0.2.0` menambahkan `format: "markdown"` untuk rich text Tiptap. Dukungan
|
|
8
|
+
backend harus sudah dideploy sebelum dipakai; input tanpa format tetap plain.
|
|
9
|
+
|
|
7
10
|
## 1. Siapkan Node.js dan aplikasi DailyNote
|
|
8
11
|
|
|
9
12
|
Pasang Node.js 24 beserta npm dari [nodejs.org](https://nodejs.org/).
|
|
@@ -21,7 +24,7 @@ serta endpoint MCP. Pengembang aplikasi menyiapkan backend tersebut.
|
|
|
21
24
|
|
|
22
25
|
## 2. Gunakan package npm
|
|
23
26
|
|
|
24
|
-
Konfigurasi berikut memakai `dailynote-mcp@0.
|
|
27
|
+
Konfigurasi berikut memakai `dailynote-mcp@0.2.0` dan berlaku setelah versi
|
|
25
28
|
tersebut tersedia di npm. `npx` akan mengambil package serta dependency ketika
|
|
26
29
|
Codex menjalankan koneksi pertama kali. Akses registry diperlukan untuk
|
|
27
30
|
pengunduhan awal. Tidak perlu menjalankan proses MCP di terminal terpisah.
|
|
@@ -70,7 +73,7 @@ perbarui blok `dailynote-journal` yang sudah ada; pertahankan konfigurasi lainny
|
|
|
70
73
|
```toml
|
|
71
74
|
[mcp_servers.dailynote-journal]
|
|
72
75
|
command = "npx"
|
|
73
|
-
args = ["-y", "dailynote-mcp@0.
|
|
76
|
+
args = ["-y", "dailynote-mcp@0.2.0"]
|
|
74
77
|
env_vars = ["DAILYNOTE_URL", "DAILYNOTE_TOKEN"]
|
|
75
78
|
enabled_tools = ["add_journal_entry"]
|
|
76
79
|
```
|
|
@@ -94,7 +97,7 @@ codex mcp get dailynote-journal
|
|
|
94
97
|
```
|
|
95
98
|
|
|
96
99
|
Hasil seharusnya menunjukkan `enabled: true`, `transport: stdio`, argumen
|
|
97
|
-
`-y dailynote-mcp@0.
|
|
100
|
+
`-y dailynote-mcp@0.2.0`, dan nama kedua environment variable. Token mentah tidak
|
|
98
101
|
perlu tampil.
|
|
99
102
|
Setelah Codex desktop dibuka ulang, buka chat baru dan pastikan tool
|
|
100
103
|
`add_journal_entry` tersedia.
|
|
@@ -109,8 +112,8 @@ Tindakan ini menambahkan isi jurnal akun pemilik token. Hasil yang diharapkan
|
|
|
109
112
|
berisi tanggal, status `saved`, dan `requestId`. Periksa hasil di DailyNote;
|
|
110
113
|
tanggal default mengikuti timezone akun.
|
|
111
114
|
|
|
112
|
-
Jika hasil belum pasti karena koneksi terputus, ulangi dengan requestId, teks
|
|
113
|
-
dan
|
|
115
|
+
Jika hasil belum pasti karena koneksi terputus, ulangi dengan requestId, teks,
|
|
116
|
+
tanggal, dan format yang sama. Jangan langsung mengirim entri baru dengan ID berbeda.
|
|
114
117
|
|
|
115
118
|
## Mengganti atau melepas koneksi
|
|
116
119
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Hubungkan AI assistant ke akun DailyNote melalui MCP lokal (stdio). Pengguna
|
|
|
4
4
|
cukup memasang **Node.js 24**; tidak perlu clone proyek, pnpm, atau database lokal.
|
|
5
5
|
Aplikasi DailyNote tujuan harus sudah mendukung Token API dan endpoint MCP.
|
|
6
6
|
|
|
7
|
-
Konfigurasi npm di bawah memerlukan rilis `dailynote-mcp@0.
|
|
7
|
+
Konfigurasi npm di bawah memerlukan rilis `dailynote-mcp@0.2.0` tersedia di npm.
|
|
8
8
|
|
|
9
9
|
## Hubungkan ke Codex
|
|
10
10
|
|
|
@@ -18,7 +18,7 @@ Konfigurasi npm di bawah memerlukan rilis `dailynote-mcp@0.1.0` tersedia di npm.
|
|
|
18
18
|
```toml
|
|
19
19
|
[mcp_servers.dailynote-journal]
|
|
20
20
|
command = "npx"
|
|
21
|
-
args = ["-y", "dailynote-mcp@0.
|
|
21
|
+
args = ["-y", "dailynote-mcp@0.2.0"]
|
|
22
22
|
env_vars = ["DAILYNOTE_URL", "DAILYNOTE_TOKEN"]
|
|
23
23
|
enabled_tools = ["add_journal_entry"]
|
|
24
24
|
```
|
|
@@ -48,15 +48,38 @@ Saat ini ada satu tool: **`add_journal_entry`**.
|
|
|
48
48
|
}
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
- `text`:
|
|
52
|
-
|
|
51
|
+
- `text`: isi entri, maksimum 20.000 unit UTF-16. Pada format plain, baris baru
|
|
52
|
+
menjadi paragraf dan HTML/Markdown disimpan sebagai teks literal.
|
|
53
53
|
- `date`: opsional, format `YYYY-MM-DD`. Default hari ini mengikuti timezone akun.
|
|
54
|
+
- `format`: opsional, `plain` (default) atau `markdown`. Plain menyimpan karakter
|
|
55
|
+
Markdown/HTML sebagai teks literal. Markdown dikonversi di backend menjadi JSON
|
|
56
|
+
Tiptap tervalidasi, sehingga formatnya dapat diedit dari aplikasi web.
|
|
54
57
|
- `requestId`: opsional untuk entri baru; gunakan kembali ID yang sama saat retry.
|
|
55
58
|
|
|
56
59
|
Tool membuat jurnal tanggal tersebut bila belum ada, atau menambahkan teks di
|
|
57
60
|
akhir jurnal yang ada. Isi, format, dan media lama tetap dipertahankan. Tidak
|
|
58
61
|
menyediakan pembacaan/penghapusan jurnal, catatan, tugas, atau upload file.
|
|
59
62
|
|
|
63
|
+
Contoh rich text, mulai versi `0.2.0`:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"text": "## Kegiatan\n\n- Menyelesaikan **fitur MCP**",
|
|
68
|
+
"format": "markdown"
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Markdown mendukung heading (semua level dinormalisasi menjadi level 2 sesuai
|
|
73
|
+
editor jurnal), tebal, miring, coret, daftar berpoin/bernomor bertingkat,
|
|
74
|
+
checklist datar, kutipan, blok kode, line break eksplisit, dan tautan HTTP(S)/mailto
|
|
75
|
+
yang lolos kebijakan jurnal. HTML ditampilkan sebagai teks literal. Tabel,
|
|
76
|
+
gambar Markdown, inline code, garis pemisah, dan checklist bertingkat ditolak
|
|
77
|
+
dengan `invalid_content`; tidak ada bagian entri yang disimpan.
|
|
78
|
+
|
|
79
|
+
Backend DailyNote harus diperbarui lebih dahulu sebelum memakai format baru.
|
|
80
|
+
Client lama tetap dapat mengirim teks biasa tanpa `format`. Metadata/isi media
|
|
81
|
+
lama tetap dipertahankan; format Markdown tidak memberikan izin upload gambar.
|
|
82
|
+
|
|
60
83
|
Contoh permintaan di Codex:
|
|
61
84
|
|
|
62
85
|
> Gunakan DailyNote MCP untuk menambahkan "Tes koneksi dari Codex" ke jurnal hari ini.
|
|
@@ -75,8 +98,9 @@ dan buka ulang client. **Cabut token** di profil menghentikan akses token terseb
|
|
|
75
98
|
Scope token saat ini hanya `journal:append`.
|
|
76
99
|
|
|
77
100
|
Jika hasil `outcome_unknown`, periksa jurnal di aplikasi atau ulangi dengan
|
|
78
|
-
**requestId, text, dan
|
|
79
|
-
kosong.
|
|
101
|
+
**requestId, text, date, dan format yang sama**, termasuk tetap tanpa `date` bila sebelumnya
|
|
102
|
+
kosong. Format yang tidak dikirim setara dengan `plain`. Tidak ada retry otomatis.
|
|
103
|
+
Mengirim payload berbeda, termasuk mengubah format, dengan ID yang sama
|
|
80
104
|
ditolak; mengganti token tidak menghilangkan deduplikasi akun.
|
|
81
105
|
|
|
82
106
|
Jika proses berhenti sebelum requestId diterima, periksa jurnal lewat aplikasi
|
package/codex.example.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Merge this block into your existing Codex config; do not replace that file.
|
|
2
2
|
[mcp_servers.dailynote-journal]
|
|
3
3
|
command = "npx"
|
|
4
|
-
args = ["-y", "dailynote-mcp@0.
|
|
4
|
+
args = ["-y", "dailynote-mcp@0.2.0"]
|
|
5
5
|
env_vars = ["DAILYNOTE_URL", "DAILYNOTE_TOKEN"]
|
|
6
6
|
enabled_tools = ["add_journal_entry"]
|
package/journal.mjs
CHANGED
|
@@ -64,7 +64,7 @@ export function createJournalServer(config) {
|
|
|
64
64
|
"add_journal_entry",
|
|
65
65
|
{
|
|
66
66
|
description:
|
|
67
|
-
"Append
|
|
67
|
+
"Append text to the personal token owner's DailyNote journal. Omit format for literal plain text, or use markdown for validated rich text. Creates the date if missing; preserves existing text and media. Date defaults to today in the account timezone. Never reads or returns journal content. On an uncertain result, retry identical text/date/format with the returned requestId; do not generate a new ID.",
|
|
68
68
|
inputSchema: z
|
|
69
69
|
.object({
|
|
70
70
|
text: z
|
|
@@ -73,7 +73,13 @@ export function createJournalServer(config) {
|
|
|
73
73
|
.max(20_000)
|
|
74
74
|
.refine((text) => text.trim().length > 0)
|
|
75
75
|
.describe(
|
|
76
|
-
"
|
|
76
|
+
"Text to append, up to 20,000 UTF-16 units. Plain mode stores Markdown/HTML literally. Markdown mode supports heading (normalized to level 2), bold, italic, strikethrough, lists, flat task lists, blockquotes, code blocks and safe links. HTML remains literal; tables, images, inline code and horizontal rules are rejected.",
|
|
77
|
+
),
|
|
78
|
+
format: z
|
|
79
|
+
.enum(["plain", "markdown"])
|
|
80
|
+
.optional()
|
|
81
|
+
.describe(
|
|
82
|
+
"Optional input format, default plain. Use markdown for rich text; requires a DailyNote backend with Markdown support. Preserve this value when retrying.",
|
|
77
83
|
),
|
|
78
84
|
date: z
|
|
79
85
|
.string()
|
|
@@ -97,7 +103,7 @@ export function createJournalServer(config) {
|
|
|
97
103
|
openWorldHint: true,
|
|
98
104
|
},
|
|
99
105
|
},
|
|
100
|
-
async ({ text, date, requestId = randomUUID() }) => {
|
|
106
|
+
async ({ text, date, format, requestId = randomUUID() }) => {
|
|
101
107
|
let result;
|
|
102
108
|
let retryAfter;
|
|
103
109
|
try {
|
|
@@ -109,7 +115,12 @@ export function createJournalServer(config) {
|
|
|
109
115
|
Authorization: `Bearer ${config.token}`,
|
|
110
116
|
"Content-Type": "application/json",
|
|
111
117
|
},
|
|
112
|
-
body: JSON.stringify({
|
|
118
|
+
body: JSON.stringify({
|
|
119
|
+
text,
|
|
120
|
+
...(date ? { date } : {}),
|
|
121
|
+
...(format ? { format } : {}),
|
|
122
|
+
requestId,
|
|
123
|
+
}),
|
|
113
124
|
});
|
|
114
125
|
const body = await response.json();
|
|
115
126
|
if (
|