driftnet 0.4.0 → 0.5.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/README.md CHANGED
@@ -118,6 +118,9 @@ where to read it on the web page. Want the summary in the chat instead, or no re
118
118
  Every link lands on a page you can search, filter by folder and kind, and open from a phone. On a
119
119
  phone the sidebar folds into a ☰ drawer, and a line under the search box says what you're looking at.
120
120
 
121
+ - **Inbox.** New links the AI filed on its own wait in **Inbox (N)** at the top of the sidebar, each with
122
+ two or three suggested folders. One tap (or `1`–`3`) files it, `s` skips, `m` opens the full picker;
123
+ once you've placed a card it leaves the Inbox, and Undo brings it back.
121
124
  - **Your folders are the categories.** Add, nest, rename and describe them from the sidebar (+ and ⋯);
122
125
  the AI files new links by each folder's path and description, so “Games › MapleStory — Artale
123
126
  helpers” gets the MapleStory tools. Move a card with 📁 **Move to…**, or drag it by ⠿ onto a folder
@@ -125,10 +128,24 @@ phone the sidebar folds into a ☰ drawer, and a line under the search box says
125
128
  - **Mind map.** Folders branch out on both sides of the root like XMind, a colour per branch (one tap
126
129
  switches to everything on the right). Tap a folder to open
127
130
  it, tap a card to preview it, and drag a card onto a folder to file it (on a phone, hold it a moment
128
- first, so a quick swipe still pans). Drag a folder onto another to nest it. Search highlights the
129
- matches; big folders fold into “+N”.
131
+ first, so a quick swipe still pans). Shift-click adds cards to a selection (on a phone, hold one, let
132
+ go, then tap more cards) and dragging any of them onto a folder files them all. Drag a folder onto
133
+ another to nest it. Search highlights the matches; big folders fold into “+N”. Double-click a folder
134
+ (or `z`) to focus on it: only its branch is drawn, a breadcrumb leads back up, and `Esc` goes up one
135
+ level; the focus is in the address, so a link opens on it. With the keyboard the map is a tree:
136
+ arrows walk it, → / ← open and close, Home / End, or type a name to jump.
137
+ - **Split view.** On a wide screen, **Split** shows the card list and the mind map side by side; drag
138
+ cards (or a whole selection) from the list onto a folder in the map.
139
+ - **AI tidy-up.** ✨ next to + in the folders header asks the model for a plan: new folders, renames,
140
+ merges and cards to move, each with its reason. Nothing changes until you tick lines and press
141
+ **Apply selected**; cards you placed yourself and folders you made are never touched, and one Undo
142
+ reverts the whole plan.
130
143
  - **Swipe right** to add a favorite, **swipe left** to move to the trash; a short swipe does nothing,
131
144
  and scrolling never counts as a swipe. On a computer, use ☆ and 🗑 or drag with the mouse.
145
+ - **Select many cards.** `x` selects the focused card, Shift-click selects a range, and on a phone a long
146
+ press (about half a second) starts selecting. A bar at the bottom then offers **Move to…**, ★, **Trash**
147
+ (**Restore** in the trash), **Select all** and **Clear**; `Esc` clears. The whole batch is one change,
148
+ and one **Undo** puts every card back exactly where it was.
132
149
  - **Undo** right after removing, or restore anything later from **Trash**. Trashed links disappear from
133
150
  agents and `/llms.txt` too; if someone shares one again, it comes back.
134
151
  - **Notes.** 📝 on any card for your own note (tried it? needs a GPU?). What people wrote with the link
@@ -142,14 +159,29 @@ phone the sidebar folds into a ☰ drawer, and a line under the search box says
142
159
  - **Shared links open read-only.** A card link from a chat bot or an agent carries the read-only share
143
160
  key, so it opens on a phone without a password; edit buttons appear after **Unlock** with the admin
144
161
  password. Forgot it? Open driftnet on the computer it runs on: Settings there sets a new one.
145
- - **Keyboard.** `j`/`k` step through cards, `f` favorite, `m` move (type to find the folder), `n` note,
146
- `#` trash, `z` undo, `/` search, `g m` mind map, `?` the list.
162
+ - **Keyboard.** `⌘K` / `Ctrl+K` opens the command palette (jump to a folder or card, switch view,
163
+ export, settings…). `j`/`k` step through cards, `f` favorite, `m` move (type to find the folder), `n` note,
164
+ `#` trash, `x` select, `z` undo, `/` search, `g m` mind map, `?` the list. `1`–`9` file the focused card
165
+ (or the selection) into the nine folders you file into most; `?` shows which number is which, and the
166
+ **Move to…** picker marks them too.
147
167
  - **Add to Home Screen** to open it like an app.
148
168
 
149
169
  <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/map-en.jpg" alt="The mind map: folders branching out from driftnet, cards under them, the read-only view on a phone" width="100%"></p>
150
170
 
151
171
  <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/notes-settings-en.jpg" alt="The notes page with links to cards, and the settings dialog" width="100%"></p>
152
172
 
173
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/select-en.jpg" alt="Three cards selected; the bar at the bottom offers Move to…, favorite, trash, select all and clear for all of them" width="100%"></p>
174
+
175
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/tokens-en.jpg" alt="Settings → Access → Agent tokens: a new token shown once, the list with scope and last use, and Revoke" width="100%"></p>
176
+
177
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/inbox-en.jpg" alt="The Inbox: new cards with one-tap folder suggestions, keys 1–3 and m for any other folder" width="100%"></p>
178
+
179
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/split-en.jpg" alt="Split view: the card list on the left and the mind map on the right" width="100%"></p>
180
+
181
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/palette-en.jpg" alt="The command palette (Ctrl+K): folders to jump to and commands" width="100%"></p>
182
+
183
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/pair-en.jpg" alt="Settings → Access → Unlock a phone: a one-time QR code with a five-minute countdown" width="100%"></p>
184
+
153
185
  ### Chrome extension
154
186
 
155
187
  <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/extension-en.jpg" alt="The driftnet popup over a social post: saved, with category, worth and a three-point summary" width="100%"></p>
@@ -238,6 +270,9 @@ claude mcp add --transport http driftnet http://localhost:8787/mcp \
238
270
  --header "Authorization: Bearer $DRIFTNET_TOKEN" --header "X-Driftnet-Agent: claude-code"
239
271
  ```
240
272
 
273
+ Give each agent its own key instead of the admin password: **Settings → Access → Agent tokens** (or the
274
+ *Create a token for this agent* button on a Connect card, where you can edit the name first). Use the token where `$DRIFTNET_TOKEN` is.
275
+
241
276
  | MCP tool | Use |
242
277
  |---|---|
243
278
  | `driftnet_search` | Search the catalogue before picking a tool for a task |
@@ -247,6 +282,8 @@ claude mcp add --transport http driftnet http://localhost:8787/mcp \
247
282
  | `driftnet_lease_pending` / `driftnet_enrich` | Work the queue, below |
248
283
  | `driftnet_get_item` | One card in full: summary, use cases, your note, what people said in chat, tools found inside |
249
284
  | `driftnet_list_folders` / `driftnet_move_item` | Read your folder tree, file items into it |
285
+ | `driftnet_undo` | Put a batch move back, using the undo id `driftnet_move_item` returned |
286
+ | `driftnet_suggest_folders` | Ask the model for a tidy-up plan for the folder tree (proposes only; the human applies it on the page) |
250
287
  | `driftnet_create_folder` / `driftnet_update_folder` / `driftnet_delete_folder` | Add, rename or re-describe, and delete folders (contents move up; the one tool marked destructive) |
251
288
  | `driftnet_trash_item` / `driftnet_restore_item` / `driftnet_favorite_item` / `driftnet_set_note` | Tidy cards: trash (always restorable), star, write the note |
252
289
 
@@ -333,9 +370,9 @@ set by the environment itself (systemd, Docker, your shell) wins and shows there
333
370
  | `DRIFTNET_SUMMARY_RULES` | — | Your own instructions for every summary, e.g. “Say whether it is free.” Agents get them too |
334
371
  | `DRIFTNET_BLOCK_DOMAINS` | — | Domains never catalogued (subdomains included), comma separated |
335
372
  | `DRIFTNET_PLUGINS` | `~/.driftnet/plugins` | Folder of extractor plugins (`.js` / `.mjs`), see [`examples/plugins`](https://github.com/KevinChu1110/driftnet/blob/main/examples/plugins) |
336
- | `DRIFTNET_TOKEN` | — | Admin password: writes, settings, MCP with every tool, the agent queue. Settable on the page |
373
+ | `DRIFTNET_TOKEN` | — | Admin password: writes, settings, agent tokens, MCP with every tool, the agent queue. Settable on the page |
337
374
  | `DRIFTNET_READ_KEY` | — | Read-only share key (header or `?key=`): reading and the read-only MCP tools |
338
- | `DRIFTNET_ACCESS` | `public` | `public`: anyone can read. `private`: reads need the password or the share key |
375
+ | `DRIFTNET_ACCESS` | `public` | `public`: anyone can read. `private`: reads need the password, the share key or an agent token |
339
376
  | `DRIFTNET_CLOUDFLARED` | `cloudflared` | Path to `cloudflared`, for the page's public-URL button |
340
377
  | `DRIFTNET_PUBLIC_URL` | — | Replies link to the item on the web page |
341
378
  | `DRIFTNET_HOME` | `~/.driftnet` | Folder for `.env`, the database and the service log |
@@ -353,7 +390,7 @@ set by the environment itself (systemd, Docker, your shell) wins and shows there
353
390
  `POST /api/items/:id/{trash,restore,favorite,unfavorite,move}` · `GET|POST /api/folders` · `PATCH|DELETE /api/folders/:id` · `POST /api/ingest` ·
354
391
  `POST /api/chat` · `POST /api/pending` · `POST /api/items/:id/enrich` · `GET /api/stats` ·
355
392
  `PUT /api/items/:id/note` · `GET|POST /api/notes` · `PUT|DELETE /api/notes/:id` · `GET /api/export` (`?format=vault`) ·
356
- `GET|PUT /api/settings` (this machine, or with the token) · `GET /api/categories` · `GET /llms.txt` · `GET /openapi.json` · `/mcp`
393
+ `GET|PUT /api/settings` (this machine, or with the token) · `GET|POST /api/agent-tokens` · `DELETE /api/agent-tokens/:id[?purge=1]` (revoke, or remove a revoked one; admin password only) · `GET /api/categories` · `GET /llms.txt` · `GET /openapi.json` · `/mcp`
357
394
 
358
395
  </details>
359
396
 
@@ -370,14 +407,23 @@ listens on `127.0.0.1`. Everything below is on the page under **⚙ Settings →
370
407
  and nothing more. If it leaks, press *New key*. The admin password is never accepted in a URL.
371
408
  Chat bots and agents put it into the card links they send you, so a link opens on your phone
372
409
  without the password; the page keeps it and removes it from the address bar.
373
- 4. **Public URL.** One button opens a temporary `https://….trycloudflare.com` address through
410
+ 4. **Agent tokens.** One named key per agent (Hermes, Claude Code, OpenClaw…) instead of the admin
411
+ password: *write* can add, move and tidy, *read* can only look. A token is shown once when you
412
+ create it and only its hash is stored. *Revoke* cuts off that one agent at once, and *Remove* clears a revoked one from the list (revoked
413
+ tokens also drop out after 30 days); changing the admin password does not touch them. Tokens work as a Bearer header only, never in a URL, and cannot
414
+ change settings or make more tokens. The queue and card moves record which token did it.
415
+ 5. **Unlock a phone.** Show a QR code on the computer, scan it with the phone, and the phone is
416
+ unlocked with its own device token (read or write) — no password typed on the phone. The code works
417
+ once and for five minutes, and the phone appears in the token list where you can revoke it.
418
+ 6. **Public URL.** One button opens a temporary `https://….trycloudflare.com` address through
374
419
  Cloudflare (no account; install [`cloudflared`](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/)
375
420
  yourself, driftnet never downloads it). It needs the password, turns reading private, and closes
376
421
  when driftnet stops.
377
422
 
378
423
  Then **🔌 Connect an AI** in the sidebar has a ready-to-paste card for Claude Code, Claude.ai / Claude
379
424
  Desktop (custom connector, read-only), ChatGPT custom GPTs, any chat that can open a link, and
380
- Hermes / OpenClaw / pi, with the URL and the share key filled in.
425
+ Hermes / OpenClaw / pi, with the URL and the share key filled in. The agent cards can make a token for
426
+ that agent and put it in the snippet, so the admin password never leaves the page.
381
427
 
382
428
  <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/access-connect-en.jpg" alt="Access & connections in Settings, and the Connect an AI cards" width="100%"></p>
383
429
 
package/README.zh-TW.md CHANGED
@@ -110,13 +110,22 @@ curl -X POST localhost:8787/api/chat -H 'content-type: application/json' \
110
110
  每個連結都會整理到一個網頁上,可以搜尋、依資料夾和類型篩選,手機也能開。在手機上,側邊欄會收進左上角的 ☰,
111
111
  搜尋框下方有一行字告訴你現在看的是哪個資料夾。
112
112
 
113
+ - **收件匣。**AI 自己分好、你還沒確認過的新連結,會放在側邊欄最上面的 **收件匣(N)**,每張附兩、三個建議資料夾。
114
+ 點一下(或按 `1`–`3`)就歸檔,`s` 跳過,`m` 開完整的資料夾選單;你放好的卡片就會離開收件匣,按復原會再回來。
113
115
  - **資料夾就是分類。**在側邊欄用 + 和 ⋯ 新增、巢狀、改名、寫說明;AI 會照資料夾的路徑和說明分新連結,
114
116
  例如「遊戲 › 楓之谷 — Artale 小工具」就會收到楓之谷的工具。卡片可以按 📁 **移動到…**,電腦上也能拖著 ⠿ 丟到資料夾;
115
117
  自己放好的卡片不會再被 AI 搬走。刪掉資料夾時,裡面的連結會移到上一層。
116
118
  - **樹狀圖。**資料夾像 XMind 一樣從中心往兩側展開,每條分支一個顏色(按一下可以切成全部往右)。點資料夾展開,點卡片預覽;把卡片拖到資料夾上就完成整理
117
- (手機上先按住一下再拖,所以快速滑動還是在移動畫面)。資料夾拖到另一個資料夾底下就變子資料夾。搜尋會標亮符合的節點,
118
- 卡片太多的資料夾會收成「還有 N 張」。
119
+ (手機上先按住一下再拖,所以快速滑動還是在移動畫面)。按住 Shift 點卡片可以一次選好幾張(手機上:按住一張、放開,再點其他卡片),
120
+ 把其中任何一張拖到資料夾上,就會全部一起放進去。資料夾拖到另一個資料夾底下就變子資料夾。搜尋會標亮符合的節點,
121
+ 卡片太多的資料夾會收成「還有 N 張」。雙擊資料夾(或按 `z`)可以聚焦:只畫那一支,上方麵包屑可以一層層回去,`Esc` 回上一層;
122
+ 聚焦的位置記在網址裡,分享連結打開就是那一支。用鍵盤操作時樹狀圖就是一棵樹:方向鍵移動,→/← 展開收合,Home/End,直接打字跳到名稱。
123
+ - **並排檢視。**寬螢幕上按 **並排**,卡片清單和樹狀圖左右並列;可以把清單裡的卡片(或整批選取)拖到樹狀圖的資料夾上。
124
+ - **AI 整理建議。**資料夾標題旁 + 隔壁的 ✨ 會請模型提一份方案:新增資料夾、改名、合併、要搬的卡片,每項都附理由。
125
+ 要你勾選後按 **套用選取的項目** 才會動;你自己放的卡片、自己建的資料夾一律不碰,按一次復原就整份還原。
119
126
  - **往右滑**加入最愛,**往左滑**移到垃圾桶;滑太短不會觸發,上下捲動也不會被當成滑動。電腦上可以按 ☆ 和 🗑,或用滑鼠拖曳。
127
+ - **一次選多張。**`x` 選取目前這張,Shift+點擊選一段範圍,手機上長按(約半秒)就開始選取。下方會出現一條工具列:**移動到…**、★、**垃圾桶**
128
+ (在垃圾桶裡是**還原**)、**全選**、**清除**;按 `Esc` 也能清除。整批算一次變更,按一次**復原**,每張卡片都會回到原本的位置。
120
129
  - 剛移除時可以馬上按**復原**,之後也能隨時從**垃圾桶**還原。移到垃圾桶的連結,agent 和 `/llms.txt` 也看不到;如果有人再次分享,它會自動回來。
121
130
  - **筆記。**每張卡片都能按 📝 寫自己的筆記(試過了嗎?要 GPU 嗎?)。大家丟連結時在聊天室說的話也會顯示在卡片上(💬),
122
131
  兩者都搜尋得到。側邊欄的 **📝 筆記** 可以寫不綁卡片的 Markdown 筆記,寫 `#12` 就會連到第 12 張卡片。
@@ -126,13 +135,26 @@ curl -X POST localhost:8787/api/chat -H 'content-type: application/json' \
126
135
  Notion 可以匯入(匯入 → Markdown & CSV)。
127
136
  - **分享出去的連結是唯讀的。**聊天機器人和 agent 給你的卡片連結帶著唯讀分享碼,手機點開不用密碼;按「解鎖編輯」輸入管理密碼後,
128
137
  才會出現編輯按鈕。忘記密碼的話,到跑 driftnet 的那台電腦打開網頁,設定裡可以直接設新的。
129
- - **鍵盤。**`j`/`k` 上下一張、`f` 最愛、`m` 移動(打字找資料夾)、`n` 筆記、`#` 垃圾桶、`z` 復原、`/` 搜尋、`g m` 樹狀圖、`?` 看全部快捷鍵。
138
+ - **鍵盤。**`⌘K`/`Ctrl+K` 開指令面板(跳到資料夾或卡片、切換檢視、匯出、設定……)。`j`/`k` 上下一張、`f` 最愛、`m` 移動(打字找資料夾)、`n` 筆記、`#` 垃圾桶、`x` 選取、`z` 復原、`/` 搜尋、`g m` 樹狀圖、`?` 看全部快捷鍵。
139
+ `1`–`9` 把目前這張(或已選取的卡片)放進你最常整理進去的九個資料夾;`?` 會列出每個數字對應哪個資料夾,**移動到…** 選單裡也有標示。
130
140
  - 用瀏覽器的**加入主畫面**,就能像 App 一樣打開。
131
141
 
132
142
  <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/map-zh-TW.jpg" alt="樹狀圖:資料夾從 driftnet 往外展開、底下掛著卡片;以及手機上的唯讀瀏覽" width="100%"></p>
133
143
 
134
144
  <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/notes-settings-zh-TW.jpg" alt="筆記頁(可以連到卡片)和設定視窗" width="100%"></p>
135
145
 
146
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/select-zh-TW.jpg" alt="選了三張卡片,下方工具列可以對整批做:移動到…、最愛、垃圾桶、全選、清除" width="100%"></p>
147
+
148
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/tokens-zh-TW.jpg" alt="設定 → 存取 → Agent 專用金鑰:新金鑰只顯示一次,清單有權限和最後使用時間,可撤銷" width="100%"></p>
149
+
150
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/inbox-zh-TW.jpg" alt="收件匣:新卡片附一鍵歸檔的建議資料夾,按 1–3 選、m 開其他資料夾" width="100%"></p>
151
+
152
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/split-zh-TW.jpg" alt="並排檢視:左邊卡片清單,右邊樹狀圖" width="100%"></p>
153
+
154
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/palette-zh-TW.jpg" alt="指令面板(Ctrl+K):跳到資料夾、執行指令" width="100%"></p>
155
+
156
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/pair-zh-TW.jpg" alt="設定 → 存取 → 用 QR code 解鎖手機:一次性的 QR code,5 分鐘倒數" width="100%"></p>
157
+
136
158
  ### Chrome 擴充
137
159
 
138
160
  <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/extension-zh-TW.jpg" alt="driftnet 彈出視窗疊在一則社群貼文上:已收錄,附分類、評價和三點摘要" width="100%"></p>
@@ -214,6 +236,9 @@ claude mcp add --transport http driftnet http://localhost:8787/mcp \
214
236
  --header "Authorization: Bearer $DRIFTNET_TOKEN" --header "X-Driftnet-Agent: claude-code"
215
237
  ```
216
238
 
239
+ 每個 agent 各用自己的金鑰,不要拿管理密碼出去:**設定 → 存取 → Agent 專用金鑰**(或「連接 AI」卡片上的
240
+ 「幫這個 agent 建一把專用金鑰」,可先改名稱)。把金鑰放在 `$DRIFTNET_TOKEN` 的位置即可。
241
+
217
242
  | MCP 工具 | 用途 |
218
243
  |---|---|
219
244
  | `driftnet_search` | 挑工具前先搜尋清單 |
@@ -223,6 +248,8 @@ claude mcp add --transport http driftnet http://localhost:8787/mcp \
223
248
  | `driftnet_lease_pending`/`driftnet_enrich` | 整理佇列,見下方 |
224
249
  | `driftnet_get_item` | 查看一張卡片的全部內容:摘要、用途、你的筆記、聊天室裡大家說的話、從裡面找到的工具 |
225
250
  | `driftnet_list_folders`/`driftnet_move_item` | 讀你的資料夾樹、把卡片放進去 |
251
+ | `driftnet_undo` | 用 `driftnet_move_item` 回傳的復原代碼,把整批移動放回去 |
252
+ | `driftnet_suggest_folders` | 請模型替資料夾樹提一份整理方案(只提案,要你在網頁上套用) |
226
253
  | `driftnet_create_folder`/`driftnet_update_folder`/`driftnet_delete_folder` | 新增、改名或改說明、刪除資料夾(內容會移到上一層;唯一標為「破壞性」的工具) |
227
254
  | `driftnet_trash_item`/`driftnet_restore_item`/`driftnet_favorite_item`/`driftnet_set_note` | 整理卡片:丟垃圾桶(隨時可還原)、加最愛、寫筆記 |
228
255
 
@@ -304,9 +331,9 @@ agent 寫回來的內容跟其他不可信的輸入一樣要檢查:格式、
304
331
  | `DRIFTNET_SUMMARY_RULES` | — | 每次摘要都要遵守的自訂規則,例如「說明是否免費」;agent 也會收到 |
305
332
  | `DRIFTNET_BLOCK_DOMAINS` | — | 永遠不收錄的網域(含子網域),用逗號分隔 |
306
333
  | `DRIFTNET_PLUGINS` | `~/.driftnet/plugins` | 擷取器外掛(`.js`/`.mjs`)的資料夾,範例見 [`examples/plugins`](https://github.com/KevinChu1110/driftnet/blob/main/examples/plugins) |
307
- | `DRIFTNET_TOKEN` | — | 管理密碼:寫入、改設定、完整的 MCP 工具、agent 佇列。可以在網頁上設定 |
334
+ | `DRIFTNET_TOKEN` | — | 管理密碼:寫入、改設定、管理 agent 金鑰、完整的 MCP 工具、agent 佇列。可以在網頁上設定 |
308
335
  | `DRIFTNET_READ_KEY` | — | 唯讀分享碼(放 header 或 `?key=`):只能讀,MCP 也只有讀取類工具 |
309
- | `DRIFTNET_ACCESS` | `public` | `public`:任何人都能讀。`private`:讀取要密碼或分享碼 |
336
+ | `DRIFTNET_ACCESS` | `public` | `public`:任何人都能讀。`private`:讀取要密碼、分享碼或 agent 金鑰 |
310
337
  | `DRIFTNET_CLOUDFLARED` | `cloudflared` | `cloudflared` 的路徑,給網頁上的「公開網址」按鈕用 |
311
338
  | `DRIFTNET_PUBLIC_URL` | — | 回覆裡附上網頁連結 |
312
339
  | `DRIFTNET_HOME` | `~/.driftnet` | 放 `.env`、資料庫和服務日誌的資料夾 |
@@ -324,7 +351,7 @@ agent 寫回來的內容跟其他不可信的輸入一樣要檢查:格式、
324
351
  `POST /api/items/:id/{trash,restore,favorite,unfavorite,move}` · `GET|POST /api/folders` · `PATCH|DELETE /api/folders/:id` · `POST /api/ingest` ·
325
352
  `POST /api/chat` · `POST /api/pending` · `POST /api/items/:id/enrich` · `GET /api/stats` ·
326
353
  `PUT /api/items/:id/note` · `GET|POST /api/notes` · `PUT|DELETE /api/notes/:id` · `GET /api/export`(`?format=vault`)·
327
- `GET|PUT /api/settings`(限本機,或帶 token)· `GET /api/categories` · `GET /llms.txt` · `GET /openapi.json` · `/mcp`
354
+ `GET|PUT /api/settings`(限本機,或帶 token)· `GET|POST /api/agent-tokens` · `DELETE /api/agent-tokens/:id[?purge=1]`(撤銷,或移除已撤銷的;限管理密碼)· `GET /api/categories` · `GET /llms.txt` · `GET /openapi.json` · `/mcp`
328
355
 
329
356
  </details>
330
357
 
@@ -338,12 +365,19 @@ ChatGPT、Grok、架在伺服器上的 Hermes 或 OpenClaw)。伺服器只聽
338
365
  2. **誰可以讀。**選「要有密碼或分享碼才能讀」,沒有就什麼都看不到。
339
366
  3. **唯讀分享碼。**給只會開連結的 AI:`…/llms.txt?key=…` 只能讀清單。外流就按「重新產生」。管理密碼永遠不能放在網址裡。
340
367
  聊天機器人和 agent 給你的卡片連結會帶著它,手機點開不用輸入密碼;網頁會記住分享碼,並把它從網址列拿掉。
341
- 4. **公開網址。**按一下就透過 Cloudflare 開一個臨時的 `https://….trycloudflare.com`(免帳號;
368
+ 4. **Agent 專用金鑰。**每個 agent(Hermes、Claude Code、OpenClaw……)一把,不必用管理密碼:「可讀寫」能收錄、
369
+ 搬移、整理,「唯讀」只能看。金鑰建立時只顯示一次,系統只存它的雜湊值。按「撤銷」立刻斷掉那一個 agent,「移除」把已撤銷的從清單清掉(撤銷超過 30 天也會自動消失);
370
+ 換管理密碼不會影響它們。金鑰只能放在 Bearer header,不能放網址,也不能改設定或再建金鑰。
371
+ 佇列領取和卡片搬移都會記下是哪一把金鑰做的。
372
+ 5. **掃 QR 解鎖手機。**電腦上顯示 QR code,手機一掃就解鎖,拿到自己的裝置金鑰(唯讀或可讀寫),手機上不用打密碼。
373
+ 這個碼只能用一次、5 分鐘內有效;手機會出現在金鑰清單裡,可以隨時撤銷。
374
+ 6. **公開網址。**按一下就透過 Cloudflare 開一個臨時的 `https://….trycloudflare.com`(免帳號;
342
375
  [`cloudflared`](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/)
343
376
  要自己裝,driftnet 不會幫你下載)。必須先設密碼,開啟後讀取會改成私人,driftnet 關掉就跟著關。
344
377
 
345
378
  接著側邊欄的 **🔌 連接 AI** 會列出 Claude Code、Claude 網頁版/桌面版(自訂 connector,唯讀)、ChatGPT 自訂 GPT、
346
- 任何會開連結的聊天 AI,以及 Hermes/OpenClaw/pi 的設定,網址和分享碼都已經填好,複製貼上就能用。
379
+ 任何會開連結的聊天 AI,以及 Hermes/OpenClaw/pi 的設定,網址和分享碼都已經填好,複製貼上就能用。agent 的卡片還能直接幫它建一把金鑰並填進設定,
380
+ 管理密碼不必離開網頁。
347
381
 
348
382
  <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/access-connect-zh-TW.jpg" alt="設定裡的「存取與連線」,和「連接 AI」的卡片" width="100%"></p>
349
383