driftnet 0.2.1 → 0.3.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
@@ -113,7 +113,7 @@ where to read it on the web page. Want the summary in the chat instead, or no re
113
113
 
114
114
  ### The web page
115
115
 
116
- <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/phone-en.jpg" alt="driftnet on a phone: the ☰ drawer with your folder tree, the Move to… picker, and a card being swiped left to the trash" width="100%"></p>
116
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/phone-en.jpg" alt="driftnet on a phone: the ☰ drawer with your folder tree, filing a card on the mind map (hold it, then tap a folder), and a card being swiped left to the trash" width="100%"></p>
117
117
 
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.
@@ -122,6 +122,11 @@ phone the sidebar folds into a ☰ drawer, and a line under the search box says
122
122
  the AI files new links by each folder's path and description, so “Games › MapleStory — Artale
123
123
  helpers” gets the MapleStory tools. Move a card with 📁 **Move to…**, or drag it by ⠿ onto a folder
124
124
  on a computer; a card you placed stays put. Deleting a folder moves its links up one level.
125
+ - **Mind map.** Folders branch out on both sides of the root like XMind, a colour per branch (one tap
126
+ switches to everything on the right). Tap a folder to open
127
+ 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”.
125
130
  - **Swipe right** to add a favorite, **swipe left** to move to the trash; a short swipe does nothing,
126
131
  and scrolling never counts as a swipe. On a computer, use ☆ and 🗑 or drag with the mouse.
127
132
  - **Undo** right after removing, or restore anything later from **Trash**. Trashed links disappear from
@@ -134,8 +139,15 @@ phone the sidebar folds into a ☰ drawer, and a line under the search box says
134
139
  newest, most shared), compact cards, tags, chat text, light or dark.
135
140
  - **Export** everything as one Markdown file, or as a zip of Markdown files with front matter that
136
141
  Obsidian opens as a vault and Notion imports (Import → Markdown & CSV).
142
+ - **Shared links open read-only.** A card link from a chat bot or an agent carries the read-only share
143
+ key, so it opens on a phone without a password; edit buttons appear after **Unlock** with the admin
144
+ 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.
137
147
  - **Add to Home Screen** to open it like an app.
138
148
 
149
+ <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
+
139
151
  <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>
140
152
 
141
153
  ### Chrome extension
@@ -353,6 +365,8 @@ listens on `127.0.0.1`. Everything below is on the page under **⚙ Settings →
353
365
  2. **Who can read.** *Private* means the password or the share key is needed to read anything.
354
366
  3. **Read-only share key.** For AIs that can only open links: `…/llms.txt?key=…` reads the catalogue
355
367
  and nothing more. If it leaks, press *New key*. The admin password is never accepted in a URL.
368
+ Chat bots and agents put it into the card links they send you, so a link opens on your phone
369
+ without the password; the page keeps it and removes it from the address bar.
356
370
  4. **Public URL.** One button opens a temporary `https://….trycloudflare.com` address through
357
371
  Cloudflare (no account; install [`cloudflared`](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/)
358
372
  yourself, driftnet never downloads it). It needs the password, turns reading private, and closes
@@ -396,6 +410,7 @@ pnpm typecheck && pnpm test
396
410
  CHROME=/path/to/chromium pnpm e2e:extension # the extension in a real browser (Chrome for Testing or Chromium)
397
411
  CHROME=/path/to/chrome pnpm e2e:web # the web page on a phone-sized screen, with real touch swipes
398
412
  pnpm build:npm # the npm package in dist/npm (try: cd dist/npm && npm pack)
413
+ pnpm demo -- --many --private --password demo-pass-123 --read-key demo-share-key-0000 # a throwaway driftnet with demo data
399
414
  ```
400
415
 
401
416
  Releasing: bump the version in `apps/server/package.json`, `server.json` and `.claude-plugin/`, then push a tag
package/README.zh-TW.md CHANGED
@@ -105,7 +105,7 @@ curl -X POST localhost:8787/api/chat -H 'content-type: application/json' \
105
105
 
106
106
  ### 網頁
107
107
 
108
- <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/phone-zh-TW.jpg" alt="driftnet 在手機上:☰ 側邊欄裡的資料夾樹、「移動到…」選單、一張卡片往左滑向垃圾桶" width="100%"></p>
108
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/phone-zh-TW.jpg" alt="driftnet 在手機上:☰ 選單裡的資料夾樹、在樹狀圖上整理卡片(按住後點資料夾)、一張卡片往左滑向垃圾桶" width="100%"></p>
109
109
 
110
110
  每個連結都會整理到一個網頁上,可以搜尋、依資料夾和類型篩選,手機也能開。在手機上,側邊欄會收進左上角的 ☰,
111
111
  搜尋框下方有一行字告訴你現在看的是哪個資料夾。
@@ -113,6 +113,9 @@ curl -X POST localhost:8787/api/chat -H 'content-type: application/json' \
113
113
  - **資料夾就是分類。**在側邊欄用 + 和 ⋯ 新增、巢狀、改名、寫說明;AI 會照資料夾的路徑和說明分新連結,
114
114
  例如「遊戲 › 楓之谷 — Artale 小工具」就會收到楓之谷的工具。卡片可以按 📁 **移動到…**,電腦上也能拖著 ⠿ 丟到資料夾;
115
115
  自己放好的卡片不會再被 AI 搬走。刪掉資料夾時,裡面的連結會移到上一層。
116
+ - **樹狀圖。**資料夾像 XMind 一樣從中心往兩側展開,每條分支一個顏色(按一下可以切成全部往右)。點資料夾展開,點卡片預覽;把卡片拖到資料夾上就完成整理
117
+ (手機上先按住一下再拖,所以快速滑動還是在移動畫面)。資料夾拖到另一個資料夾底下就變子資料夾。搜尋會標亮符合的節點,
118
+ 卡片太多的資料夾會收成「還有 N 張」。
116
119
  - **往右滑**加入最愛,**往左滑**移到垃圾桶;滑太短不會觸發,上下捲動也不會被當成滑動。電腦上可以按 ☆ 和 🗑,或用滑鼠拖曳。
117
120
  - 剛移除時可以馬上按**復原**,之後也能隨時從**垃圾桶**還原。移到垃圾桶的連結,agent 和 `/llms.txt` 也看不到;如果有人再次分享,它會自動回來。
118
121
  - **筆記。**每張卡片都能按 📝 寫自己的筆記(試過了嗎?要 GPU 嗎?)。大家丟連結時在聊天室說的話也會顯示在卡片上(💬),
@@ -121,8 +124,13 @@ curl -X POST localhost:8787/api/chat -H 'content-type: application/json' \
121
124
  不用重新啟動就生效。每個瀏覽器各自的顯示:排序(值得看/最新/最多人分享)、精簡卡片、標籤、聊天原文、深淺色。
122
125
  - **匯出**全部內容:一個 Markdown 檔,或一包附 front matter 的 Markdown(zip),Obsidian 可以直接當 vault 開,
123
126
  Notion 可以匯入(匯入 → Markdown & CSV)。
127
+ - **分享出去的連結是唯讀的。**聊天機器人和 agent 給你的卡片連結帶著唯讀分享碼,手機點開不用密碼;按「解鎖編輯」輸入管理密碼後,
128
+ 才會出現編輯按鈕。忘記密碼的話,到跑 driftnet 的那台電腦打開網頁,設定裡可以直接設新的。
129
+ - **鍵盤。**`j`/`k` 上下一張、`f` 最愛、`m` 移動(打字找資料夾)、`n` 筆記、`#` 垃圾桶、`z` 復原、`/` 搜尋、`g m` 樹狀圖、`?` 看全部快捷鍵。
124
130
  - 用瀏覽器的**加入主畫面**,就能像 App 一樣打開。
125
131
 
132
+ <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/map-zh-TW.jpg" alt="樹狀圖:資料夾從 driftnet 往外展開、底下掛著卡片;以及手機上的唯讀瀏覽" width="100%"></p>
133
+
126
134
  <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/notes-settings-zh-TW.jpg" alt="筆記頁(可以連到卡片)和設定視窗" width="100%"></p>
127
135
 
128
136
  ### Chrome 擴充
@@ -326,6 +334,7 @@ ChatGPT、Grok、架在伺服器上的 Hermes 或 OpenClaw)。伺服器只聽
326
334
  1. **管理密碼。**自己取一組,或按「產生」;旁邊會顯示強弱。只能在這台電腦上設定。知道它的人可以新增、移動、刪除,所以不要沿用其他網站的密碼。
327
335
  2. **誰可以讀。**選「要有密碼或分享碼才能讀」,沒有就什麼都看不到。
328
336
  3. **唯讀分享碼。**給只會開連結的 AI:`…/llms.txt?key=…` 只能讀清單。外流就按「重新產生」。管理密碼永遠不能放在網址裡。
337
+ 聊天機器人和 agent 給你的卡片連結會帶著它,手機點開不用輸入密碼;網頁會記住分享碼,並把它從網址列拿掉。
329
338
  4. **公開網址。**按一下就透過 Cloudflare 開一個臨時的 `https://….trycloudflare.com`(免帳號;
330
339
  [`cloudflared`](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/)
331
340
  要自己裝,driftnet 不會幫你下載)。必須先設密碼,開啟後讀取會改成私人,driftnet 關掉就跟著關。
@@ -366,6 +375,7 @@ pnpm typecheck && pnpm test
366
375
  CHROME=/path/to/chromium pnpm e2e:extension # 在真的瀏覽器裡測擴充(Chrome for Testing 或 Chromium)
367
376
  CHROME=/path/to/chrome pnpm e2e:web # 用手機尺寸和真的觸控滑動測網頁
368
377
  pnpm build:npm # 打包 npm 套件到 dist/npm(試用:cd dist/npm && npm pack)
378
+ pnpm demo -- --many --private --password demo-pass-123 --read-key demo-share-key-0000 # 開一個帶示範資料的臨時 driftnet
369
379
  ```
370
380
 
371
381
  發新版:改 `apps/server/package.json`、`server.json` 和 `.claude-plugin/` 裡的版號,再推一個標籤