keepfold 0.6.4__py3-none-any.whl
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.
- keepfold/__init__.py +1 -0
- keepfold/_proc.py +102 -0
- keepfold/access.py +154 -0
- keepfold/agent_eval.py +162 -0
- keepfold/agent_text.py +56 -0
- keepfold/anki.py +285 -0
- keepfold/app/__init__.py +5 -0
- keepfold/app/actions.py +690 -0
- keepfold/app/desktop.py +677 -0
- keepfold/app/exports.py +254 -0
- keepfold/app/hello.py +79 -0
- keepfold/app/launch.py +114 -0
- keepfold/app/news.py +60 -0
- keepfold/app/server.py +3142 -0
- keepfold/app/status.py +811 -0
- keepfold/app/targets.py +1374 -0
- keepfold/app/winpath.py +54 -0
- keepfold/app/wizard.py +506 -0
- keepfold/ask.py +475 -0
- keepfold/askfile.py +322 -0
- keepfold/assets/LICENSE-d3.txt +13 -0
- keepfold/assets/agent_eval.json +235 -0
- keepfold/assets/app/app.css +611 -0
- keepfold/assets/app/app.js +2712 -0
- keepfold/assets/app/capture.html +16 -0
- keepfold/assets/app/capture.js +91 -0
- keepfold/assets/app/index.html +149 -0
- keepfold/assets/brain3d.js +3730 -0
- keepfold/assets/chat_eval.json +454 -0
- keepfold/assets/d3.v7.min.js +2 -0
- keepfold/assets/dashboard.css +774 -0
- keepfold/assets/dashboard.html.tmpl +170 -0
- keepfold/assets/dashboard.js +4262 -0
- keepfold/assets/help/GUIDE.md +544 -0
- keepfold/assets/help/help.md +83 -0
- keepfold/assets/keepfold.ico +0 -0
- keepfold/assets/whats_new.json +162 -0
- keepfold/backup.py +100 -0
- keepfold/brainmap.py +1382 -0
- keepfold/browse/__init__.py +10 -0
- keepfold/browse/build.py +1320 -0
- keepfold/browse/forget.py +510 -0
- keepfold/browse/legacy.py +95 -0
- keepfold/browse/lists.py +285 -0
- keepfold/browse/privacy.py +391 -0
- keepfold/browse/selftest.py +166 -0
- keepfold/browse/sites.py +1068 -0
- keepfold/browse/sources.py +329 -0
- keepfold/browse/store.py +991 -0
- keepfold/browse/takeout.py +312 -0
- keepfold/browse/titles.py +127 -0
- keepfold/browse/vectors.py +326 -0
- keepfold/browse_serve.py +332 -0
- keepfold/catalog.py +564 -0
- keepfold/chat.py +1464 -0
- keepfold/chat_archive.py +165 -0
- keepfold/chat_eval.py +583 -0
- keepfold/chat_facts.py +721 -0
- keepfold/chat_import.py +1045 -0
- keepfold/chat_pages.py +291 -0
- keepfold/chat_study.py +371 -0
- keepfold/chats.py +669 -0
- keepfold/claims.py +650 -0
- keepfold/cli.py +3254 -0
- keepfold/clients.py +96 -0
- keepfold/cloudllm.py +135 -0
- keepfold/contract.py +43 -0
- keepfold/corrections.py +134 -0
- keepfold/dashboard.py +959 -0
- keepfold/dates.py +202 -0
- keepfold/delta.py +146 -0
- keepfold/digest.py +72 -0
- keepfold/doctor.py +565 -0
- keepfold/duplicates.py +145 -0
- keepfold/egress.py +68 -0
- keepfold/eval_history.py +109 -0
- keepfold/events.py +554 -0
- keepfold/export_context.py +109 -0
- keepfold/fact_harvest.py +578 -0
- keepfold/forget.py +720 -0
- keepfold/harvest.py +334 -0
- keepfold/home.py +714 -0
- keepfold/importers.py +627 -0
- keepfold/index.py +733 -0
- keepfold/know.py +40 -0
- keepfold/learning_eval.py +261 -0
- keepfold/levels.py +595 -0
- keepfold/life_sources.py +747 -0
- keepfold/lint.py +241 -0
- keepfold/localllm.py +699 -0
- keepfold/loops.py +316 -0
- keepfold/mcp_server.py +4464 -0
- keepfold/migrate.py +552 -0
- keepfold/more_sources.py +709 -0
- keepfold/packs.py +148 -0
- keepfold/people.py +99 -0
- keepfold/planner.py +819 -0
- keepfold/prime.py +630 -0
- keepfold/prime_hook.py +265 -0
- keepfold/profiles.py +118 -0
- keepfold/quarantine.py +123 -0
- keepfold/recall_log.py +93 -0
- keepfold/redteam.py +393 -0
- keepfold/reflect.py +164 -0
- keepfold/relink.py +477 -0
- keepfold/render.py +406 -0
- keepfold/review.py +1181 -0
- keepfold/rollups.py +412 -0
- keepfold/safety_net.py +571 -0
- keepfold/sample.py +103 -0
- keepfold/sample_vault/areas/programming.algorithms.md +11 -0
- keepfold/sample_vault/areas/programming.basics.md +11 -0
- keepfold/sample_vault/concepts/big-o-notation.md +13 -0
- keepfold/sample_vault/concepts/functions.md +13 -0
- keepfold/sample_vault/concepts/loops.md +14 -0
- keepfold/sample_vault/concepts/recursion.md +13 -0
- keepfold/sample_vault/domains/programming.md +10 -0
- keepfold/sample_vault/journal/2026-01-12.md +9 -0
- keepfold/sample_vault/me/goals.md +17 -0
- keepfold/sample_vault/me/profile.md +19 -0
- keepfold/sample_vault/mistakes/programming.off-by-one-loop.md +16 -0
- keepfold/sample_vault/notes/recursion-needs-a-base-case.md +18 -0
- keepfold/sample_vault/problems/fizzbuzz.md +12 -0
- keepfold/sample_vault/projects/text-adventure.md +15 -0
- keepfold/sample_vault/resources/python-tutorial.md +16 -0
- keepfold/semantic.py +1254 -0
- keepfold/session.py +764 -0
- keepfold/share.py +69 -0
- keepfold/sources.py +612 -0
- keepfold/sync_copies.py +83 -0
- keepfold/tags.py +230 -0
- keepfold/taint.py +301 -0
- keepfold/tonight.py +195 -0
- keepfold/topics.py +1072 -0
- keepfold/update.py +300 -0
- keepfold/vault.py +942 -0
- keepfold/vecstore.py +218 -0
- keepfold/voice.py +260 -0
- keepfold/voice_memos.py +280 -0
- keepfold/watch.py +303 -0
- keepfold/where.py +119 -0
- keepfold/xray.py +516 -0
- keepfold/zotero.py +303 -0
- keepfold-0.6.4.dist-info/METADATA +644 -0
- keepfold-0.6.4.dist-info/RECORD +148 -0
- keepfold-0.6.4.dist-info/WHEEL +4 -0
- keepfold-0.6.4.dist-info/entry_points.txt +6 -0
- keepfold-0.6.4.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Help (`/keepfold help`)
|
|
2
|
+
No session: do not call `keepfold_start`. `/keepfold help <word>` (for example `help study`, `help terminal`) shows only that section.
|
|
3
|
+
|
|
4
|
+
1. **Greet them.** One warm line with their name (from prime or the brief) and the time of day, for example "Good evening, Sam!" Then: "I'm Keepfold, your second brain. I remember what you study, what you get wrong and who you are, and I plan what to revise next."
|
|
5
|
+
2. **Show the reference below**, as written. It is the full list; don't drop rows.
|
|
6
|
+
3. **Close** by asking what they would like to do, and suggest three things to try: `/keepfold learn`, `/keepfold sweep`, and `/keepfold short` if it is late.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Study
|
|
11
|
+
| Command | What it does |
|
|
12
|
+
|---|---|
|
|
13
|
+
| `/keepfold` | Home: a short map of what's due, what's coming and what's waiting, then it asks what you want |
|
|
14
|
+
| `/keepfold learn` | Today's plan: ask first, teach the gap, re-test. Add a topic to focus: `/keepfold learn dbms` |
|
|
15
|
+
| `/keepfold review` | Only what is due for a refresh |
|
|
16
|
+
| `/keepfold short` | Tired? At most 5 small steps, your confident misses first |
|
|
17
|
+
| `/keepfold sweep` | 10 mixed cold questions with "how sure? 1–4"; explanations at the end |
|
|
18
|
+
| `/keepfold mock` | A mock interview (coding, aptitude, HR, project rounds) with a debrief |
|
|
19
|
+
| `/keepfold mock bank` | Drafts STAR stories from your projects; saves one only after you approve it |
|
|
20
|
+
| `/keepfold log` | Records a result you report ("4/5 on the TCS aptitude test") |
|
|
21
|
+
| `/keepfold week` | This week's numbers |
|
|
22
|
+
|
|
23
|
+
## Second brain
|
|
24
|
+
| Command | What it does |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `/keepfold about <topic>` (or `/keepfold <topic>`) | What you know and have about a topic |
|
|
27
|
+
| "what do I know about X?" | Search your whole vault by meaning; no command needed |
|
|
28
|
+
| `/keepfold capture` | Saves a source (article, PDF, video) and the ideas worth keeping |
|
|
29
|
+
| `/keepfold project <name>` | One project: status, decisions, next steps |
|
|
30
|
+
| `/keepfold reflect` | Weekly review: confirm or drop what's waiting about you, idea clusters, spot-checks of how a chat graded you |
|
|
31
|
+
| `/keepfold map` | Opens the brain and lists in the Keepfold app; Obsidian's graph is Ctrl+G |
|
|
32
|
+
|
|
33
|
+
## Chats
|
|
34
|
+
| Command | What it does |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `/keepfold save` | Saves what's worth keeping from this chat; you approve the list first |
|
|
37
|
+
| `/keepfold history` | Saves older Claude Code chats, a few at a time |
|
|
38
|
+
| `/keepfold harvest` | Distils your imported Gemini, Perplexity and Claude chats, about 10 minutes a night. It reads only your own messages and writes "What I explored" lines on topic pages. |
|
|
39
|
+
|
|
40
|
+
## About you
|
|
41
|
+
| Command | What it does |
|
|
42
|
+
|---|---|
|
|
43
|
+
| "save this about me" | Saves a preference or personality line, after your yes |
|
|
44
|
+
| `/keepfold help` | This list |
|
|
45
|
+
|
|
46
|
+
## Without any command
|
|
47
|
+
In every chat Keepfold already knows you from your first message, saves what's durable (facts, sources, decisions, quiz answers) and tells you when it wrote something. Each chat's changes can be undone in one step.
|
|
48
|
+
|
|
49
|
+
## Terminal (`keepfold …` in any terminal; from a source checkout, prefix `uv run`)
|
|
50
|
+
| Command | What it does |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `today` / `brief` | Today's plan / brief, teaching contract and Today |
|
|
53
|
+
| `dashboard` | Opens the Keepfold app's home (starts the app if needed) |
|
|
54
|
+
| `recall "query"` | Searches the vault by meaning and keywords |
|
|
55
|
+
| `log assessment\|result\|solved\|taught` | Records results by hand |
|
|
56
|
+
| `reflect` | The weekly review pack |
|
|
57
|
+
| `claims` (`--summary`, `--unasked`) | Lines about you: all, how well Keepfold knows you per page, or saved without asking |
|
|
58
|
+
| `chats` / `import-chats` | Past chats / import a claude.ai export |
|
|
59
|
+
| `digest` | Review chats imported since the last digest; each topic you confirm is a touch, never a grade |
|
|
60
|
+
| `harvest status` | Harvest progress and undo commands |
|
|
61
|
+
| `safety-net` (`--dry-run`, `--undo`) | Record the topics and concepts your recent chats covered that the chat forgot to log |
|
|
62
|
+
| `fact-harvest` | Save facts you stated about yourself in recent chats as guesses about you (needs a local model already loaded) |
|
|
63
|
+
| `export context` | A paste-ready "about me" file for ChatGPT, Gemini or Cursor |
|
|
64
|
+
| `pack general\|coding\|writing\|interview\|research\|review` | A context pack (≤ 1,500 characters, or 5,000 with `--chars 5000`) to paste into a web chat |
|
|
65
|
+
| `undo <session>` / `void` | Revert one chat's changes / cancel one record |
|
|
66
|
+
| `backup` | Zip the whole vault |
|
|
67
|
+
| `doctor` / `lint` / `relink` | Health check / vault problems / fix Obsidian links |
|
|
68
|
+
| `migrate` | Move what Cortex (0.6.1 and older) left: settings, vault folder, AI-app connections |
|
|
69
|
+
| `agent-text` | Every fixed text Keepfold shows an AI app, with its size per app |
|
|
70
|
+
| `rollups` (`--since YYYY-MM`) | Write the week, month and year summary pages (code only, no model) |
|
|
71
|
+
| `eval` (`all`, `learning`, `recall`) | How well search and the study forecasts are doing |
|
|
72
|
+
| `topics` (`status`, `attach`, `build`, `eval`, `split`) | The topic tree |
|
|
73
|
+
| `concept` (`add`, `alias`, `merge`, `duplicates`) | Edit the concept list |
|
|
74
|
+
| `catalog sync` / `replay` | Keep the catalog in step / recompute all states |
|
|
75
|
+
| `model` (`download`, `build`, `status`) | The local search model |
|
|
76
|
+
| `browse` (`scan`, `import`, `status`, `pair`, `serve`) / `llm status` | Your browsing as day pages, filtered on this laptop / the optional local LLM |
|
|
77
|
+
| `exclude add\|list\|remove` | Folders where Keepfold stays off (e.g. a work repo) |
|
|
78
|
+
| `watch add\|list\|remove` | Folders (or Zotero) the app imports by itself: their new and changed files, every 10 minutes |
|
|
79
|
+
| `voice import` / `forget` / `kill` / `access` | Your writing samples / delete a person's page / emergency stop / what was read as you |
|
|
80
|
+
| `session close\|sweep` | Close leftover sessions |
|
|
81
|
+
| `setup` / `init` / `sample remove` / `mcp` | Install, create a vault, remove the sample, run the server |
|
|
82
|
+
|
|
83
|
+
`keepfold --help` prints every command; `docs/GUIDE.md` explains each in detail.
|
|
Binary file
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
{
|
|
2
|
+
"0.6.4": {
|
|
3
|
+
"items": [
|
|
4
|
+
"Two saves made at almost the same moment (within about 16 ms on a default Windows PC) no longer both go ahead at once, and saves still take turns after the PC's clock is set back (as on some dual-boot PCs right after login).",
|
|
5
|
+
"Levels, counts and Review no longer count your newest results twice when two requests read them at the same moment, such as two of the app's pages or two of an AI app's tool calls. Before, this lasted until Keepfold restarted.",
|
|
6
|
+
"Pages titled only in another script (Hindi, Malayalam, Chinese, Russian...) can be saved, and so can everything on a PC whose name has non-Latin letters. Before, both were refused.",
|
|
7
|
+
"Backup works for a vault on a network share or a mapped network drive, and a note changed twice within a second on a USB stick, an older Mac disk or some Linux disks is no longer shown out of date. A page about you saved in another encoding (such as Notepad's ANSI) is skipped instead of breaking every chat's first Keepfold call and the app's Home.",
|
|
8
|
+
"Older items in the app show your own local date, not the UTC one. Two mock interviews can no longer file results under the same name: a mock's time stamp now has seconds and is in UTC.",
|
|
9
|
+
"Google Takeout times marked IST, CST or BST follow your own time zone when it is one of the zones with that name. On Linux, a local AI model at the IPv6 form of 127.0.0.1 is accepted. Recall's passage and the browsing search snippet show the line that matched."
|
|
10
|
+
],
|
|
11
|
+
"do": []
|
|
12
|
+
},
|
|
13
|
+
"0.6.3": {
|
|
14
|
+
"items": [
|
|
15
|
+
"keepfold doctor and the app now agree about Claude Code: a claude command on your PATH counts as installed.",
|
|
16
|
+
"keepfold import no longer waits on its \"who may read these pages?\" question when no one can answer it, such as a script or an AI app running the command; it uses the default and says so.",
|
|
17
|
+
"keepfold brief no longer starts with \"(BRIEF.md is missing)\" on a new vault.",
|
|
18
|
+
"A capture record an AI app sends without its resource now gets an error that names the missing field."
|
|
19
|
+
],
|
|
20
|
+
"do": []
|
|
21
|
+
},
|
|
22
|
+
"0.6.2": {
|
|
23
|
+
"items": [
|
|
24
|
+
"Cortex is now Keepfold: the app, its commands (keepfold), its tools (keepfold_*), the /keepfold skill and its folders (~/.keepfold) all have the new name, and your notes, settings and AI-app connections move over by themselves the first time it runs.",
|
|
25
|
+
"Updates come from the project's new home on GitHub (alenissacsam-2/keepfold).",
|
|
26
|
+
"Status has a new switch, Check for updates automatically. Turn it off and Keepfold contacts GitHub only when you click Check for updates.",
|
|
27
|
+
"If a line in your settings file has a typo, Keepfold no longer falls back to the defaults and takes in folders you excluded. Imports stay off until you fix the line, and Status and keepfold doctor show which line it is.",
|
|
28
|
+
"Logs and error messages leave out more: no app key in the log, and no text from a note whose header is broken. Rules files in other AI apps keep your pinned lines after an error.",
|
|
29
|
+
"The README and the privacy guide list exactly what leaves your computer and what your connected AI apps receive."
|
|
30
|
+
],
|
|
31
|
+
"do": []
|
|
32
|
+
},
|
|
33
|
+
"0.6.1": {
|
|
34
|
+
"items": [
|
|
35
|
+
"Keepfold installs and updates in a folder whose path has a space, such as C:\\Users\\John Smith. Before, setup stopped and blamed the internet connection.",
|
|
36
|
+
"When setup fails, it shows the real error first, before the advice about your internet connection.",
|
|
37
|
+
"Setup and updates use the proxy set in Windows, so they work on school and work networks that need one.",
|
|
38
|
+
"Windows on ARM laptops keep getting the x64 Python that Keepfold's packages need."
|
|
39
|
+
],
|
|
40
|
+
"do": []
|
|
41
|
+
},
|
|
42
|
+
"0.6.0": {
|
|
43
|
+
"items": [
|
|
44
|
+
"A welcome guide for new users: six short steps that set up your notes folder, connect your AI apps and show you where things are. Reopen it any time from Setup.",
|
|
45
|
+
"Installing and updating look like Keepfold now: one window with each step, a progress bar and plain words. If another program is still using Keepfold, it asks you inside the window.",
|
|
46
|
+
"Change your vault folder from Dashboard and vault. A vault in a temporary folder gets a warning, and Keepfold never swaps the vault you use for one.",
|
|
47
|
+
"Something not working? Status has Copy details (versions and what is on or off, never your notes or file paths) and a button to report it on GitHub. In a terminal: keepfold doctor --report.",
|
|
48
|
+
"Connect AI apps works on a new laptop: Claude Code's hooks run without Git Bash, an app you install later is found without restarting Keepfold, and apps that need it get Copy instructions, the short text that makes them use Keepfold in every chat. docs/CONNECT.md walks through each app.",
|
|
49
|
+
"Agent X-ray's dry run is quick after the first run: it reuses what it already read."
|
|
50
|
+
],
|
|
51
|
+
"do": [
|
|
52
|
+
"Restart Claude and your other AI apps once after updating."
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"0.5.0": {
|
|
56
|
+
"items": [
|
|
57
|
+
"A calmer day theme: soft sand panels with amber ink, the night theme in daylight. No bright yellow slabs and no pure white.",
|
|
58
|
+
"The app is easier to find your way in: the sidebar has three groups (Every day, Your setup, Check), and Setup is a short list of numbered steps with a progress bar.",
|
|
59
|
+
"Chat says how sure each answer is: exactly from your pages, from a few of your pages, thin, or nothing on record. Type # in Chat to hand it up to 3 of your pages.",
|
|
60
|
+
"Home follows what you do: study, build and research boards appear once you use them, and a new vault gets a Get started card. The brain has a month-by-month time scrub, a Focus Lens for one page and its links, and Save picture.",
|
|
61
|
+
"Press Ctrl+Alt+Space anywhere to save a thought, and more comes in by itself: Codex, Gemini CLI and GitHub Copilot CLI sessions; watched folders, notes, git projects, Zotero and calendars every 10 minutes; Anki with your review history; and TODO: lines in your notes become open loops.",
|
|
62
|
+
"Also new: Zed, Cline, Copilot CLI and JetBrains Junie can connect; text inside <private>...</private> is never saved; forget removes a line from every place Keepfold keeps it; the Mind Mirror shows how your views changed; X-ray traces a reply back to what an app was given; a damaged store repairs itself; search is about 5x faster; a hidden window sleeps; and buttons, tabs and toasts move a little."
|
|
63
|
+
],
|
|
64
|
+
"do": [
|
|
65
|
+
"Restart Claude once after updating."
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"0.4.2": {
|
|
69
|
+
"items": [
|
|
70
|
+
"An idle Keepfold gives its memory back: its search models unload after 10 quiet minutes and load again when needed, so an idle Keepfold uses under 200 MB instead of about 2.8 GB.",
|
|
71
|
+
"Codex CLI and Gemini CLI get your profile, preferences and rules on every prompt from their own hooks, as Claude Code does.",
|
|
72
|
+
"Lines added to your core, setup or teaching rules outside Keepfold (in Obsidian, a synced folder or another program) wait in Review for Keep before any AI app sees them; what is there when you update is kept. A playbook an AI wrote waits for your OK, and a guess one app made about you reaches only that app until you approve it.",
|
|
73
|
+
"The local Chat finds more: pages linked to the best match, what held at a date you ask about (\"back in July\"), follow-ups on its last list (\"the second one\") and both halves of a two-part question. When it finds only noise, it says it found nothing.",
|
|
74
|
+
"Facts you state in imported chats and in the local Chat become guesses about you by themselves, the clearest ones with no model at all. Your own words still win.",
|
|
75
|
+
"Also new: scanned PDFs are read with Windows' own offline OCR; imported documents keep their full text; you can ask Chat about a file; the Google activity import brings YouTube watch and search history; a chat-export zip in Downloads gets a one-click card on Home; Status lists every way data can leave Keepfold; and study features show only if you study."
|
|
76
|
+
],
|
|
77
|
+
"do": [
|
|
78
|
+
"Restart Claude once after updating.",
|
|
79
|
+
"Using Codex CLI or Gemini CLI? In Connect AI apps, press Apply… once to add Keepfold's hooks, then restart it. In Codex, trust Keepfold's hooks once under /hooks."
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"0.4.1": {
|
|
83
|
+
"items": [
|
|
84
|
+
"Review no longer merges two different facts: \"reads news every morning\" and \"reads papers every morning\" both stay. Lines 0.4.0 merged by mistake are put back by themselves.",
|
|
85
|
+
"Keepfold's own tidying shows in your sessions as \"Keepfold tidied lines about you\", not as an AI chat, and each Review answer is one Undo.",
|
|
86
|
+
"Status tells you when Claude Code runs an older Keepfold than the app; its Fix puts the app's copy first.",
|
|
87
|
+
"Review's More fold no longer repeats Today's cards, and its buttons say Keep first and Keep second.",
|
|
88
|
+
"Lines that try to steer an AI are also refused when they say \"act as DAN\" or start with a chat label such as \"assistant:\"."
|
|
89
|
+
],
|
|
90
|
+
"do": [
|
|
91
|
+
"Restart Claude once after updating.",
|
|
92
|
+
"If Status shows a Claude Code row, press Fix, then quit Claude completely and open it again."
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"0.4.0": {
|
|
96
|
+
"items": [
|
|
97
|
+
"Review finishes: Keepfold keeps one of lines that say nearly the same and settles replaced lines itself. It asks only when two of your own lines clash, one answer covers every rewording, and after Today's 5 it says Done for today.",
|
|
98
|
+
"What chats learn about you is saved at once as a guess; your own words always win over it. Teaching rules, your core and your setup still wait for your click.",
|
|
99
|
+
"Every AI app knows how you work: Claude, Cursor, Codex and VS Code get your profile, preferences, setup and playbooks (a note tagged playbook: how you want a kind of task done).",
|
|
100
|
+
"The local Chat knows who is asking and answers counts and timelines from your notes. The new Tonight tab shows your day, Today's 5 and what AI apps learned about you today, with Undo.",
|
|
101
|
+
"Agent X-ray shows what each AI app was given (pin, mute, scope, dry run), and lines that try to steer an AI (\"ignore previous instructions\") are refused and never reach another app.",
|
|
102
|
+
"The Keepfold capture browser extension is gone. Your history still comes in by itself from your browsers: every 10 minutes while the app runs, and from the receiver when it starts at login."
|
|
103
|
+
],
|
|
104
|
+
"do": [
|
|
105
|
+
"On Status, press Fix on the Claude Desktop row if it shows, then restart Claude once.",
|
|
106
|
+
"If you had \"Keepfold capture\", remove it from your browser's extensions page."
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"0.3.1": {
|
|
110
|
+
"items": [
|
|
111
|
+
"Keepfold shows as Keepfold: its own Keepfold.exe and logo in the title bar, taskbar, Start menu and Task Manager, and pinning it pins Keepfold.",
|
|
112
|
+
"Import my past history goes on from where you paused it, and never shrinks or redoes days an earlier import already wrote.",
|
|
113
|
+
"Settings opens at once: Setup, Local model and Browsing no longer wait about 3 seconds on each visit.",
|
|
114
|
+
"A Claude Chat-tab chat and its claude.ai export are one chat page, not two.",
|
|
115
|
+
"Next up lines wrap instead of cutting off, and the brain's legend starts folded on smaller screens."
|
|
116
|
+
],
|
|
117
|
+
"do": [
|
|
118
|
+
"If you pinned Keepfold to the taskbar before, unpin it and pin it again, so the pin shows the new logo."
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"0.3.0": {
|
|
122
|
+
"items": [
|
|
123
|
+
"Keepfold is its own app: a window and a tray icon, it starts with Windows, and closing the window keeps it running.",
|
|
124
|
+
"The first page is your live brain: what you did today and this week, Next up, exams and deadlines. New pages pop in by themselves.",
|
|
125
|
+
"Your browsing is the brain stem: one dot per site, sized by visits and glowing by how recently you went there. Click one to see its days and searches.",
|
|
126
|
+
"A Private switch behind Windows Hello shows private notes and sites; it locks again when you minimise or after 10 minutes.",
|
|
127
|
+
"Every chat is logged: past and new Claude Code, Desktop and Cowork chats import themselves every 5 minutes, and the Chat tab logs itself.",
|
|
128
|
+
"Plans have no dates: each subject is an ordered list, the one you studied last comes first, and nothing is ever behind."
|
|
129
|
+
],
|
|
130
|
+
"do": [
|
|
131
|
+
"Restart Claude once after this update, so its Keepfold tools use the new version.",
|
|
132
|
+
"Reload the browser extension (Extensions page, Reload) if you use it."
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"0.2.3": {
|
|
136
|
+
"items": [
|
|
137
|
+
"The dashboard feels like the app: buttons react, keyboard focus is easy to see, and copy buttons confirm with a check.",
|
|
138
|
+
"Status warns when your browsing history has not been imported for a while, with Import new history now.",
|
|
139
|
+
"Chat lists the sites you visited and sums up a day or week in about a second, even on a big history.",
|
|
140
|
+
"Browser profiles you untick in the history list stay unticked in every automatic import.",
|
|
141
|
+
"Chat understands more dates (\"on Monday\", \"last night\", \"the last 3 days\", \"what's due on Friday?\") and a day starts at 04:00, as in Today.",
|
|
142
|
+
"Sites filed under a category you set to Don't save never show in Chat's site lists or summaries."
|
|
143
|
+
],
|
|
144
|
+
"do": [
|
|
145
|
+
"Your first browsing import after this update rebuilds every day your browsers still hold, once, so it takes longer than usual."
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"0.2.2": {
|
|
149
|
+
"items": [
|
|
150
|
+
"Chat shows what it is doing while an answer is on its way, and how long the answer took.",
|
|
151
|
+
"Esc stops an answer, every answer has Copy, and scrolling up no longer drags you back down.",
|
|
152
|
+
"\"Which sites did I visit?\" lists every site once, most visited first; name a browser to see only its visits.",
|
|
153
|
+
"New browser history comes in by itself every 6 hours while the app or the receiver runs (Browsing, Past history).",
|
|
154
|
+
"Chat answers \"What should I study today?\", \"what's due?\" and \"summarize my week\" from your own plan and records.",
|
|
155
|
+
"The browser extension only sends its key to your own Keepfold receiver, never to another program on that port."
|
|
156
|
+
],
|
|
157
|
+
"do": [
|
|
158
|
+
"Reload the Keepfold browser extension: open your browser's Extensions page and click the reload arrow on Keepfold.",
|
|
159
|
+
"To keep history coming in without the app open, turn on Start at login under Browsing."
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
}
|
keepfold/backup.py
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"""Vault backup copies: one zip of the whole vault, .git included, and the durable browse stores
|
|
2
|
+
in .keepfold/browse (sites.json, state.json, browse.legacy's *.migrated backups, inbox-archive/, any
|
|
3
|
+
not-yet-imported inbox-*.jsonl the capture extension left before 0.3.2, filtered like the
|
|
4
|
+
archive), which hold browsing the browsers have already forgotten. The SQLite stores (DBS: the
|
|
5
|
+
browsing store and the two vector stores, which take minutes to embed again) are copied by
|
|
6
|
+
SQLite's own backup, a consistent snapshot, never the live file and its WAL. Left out: old
|
|
7
|
+
backups, the old extension's pairing token (a leftover file), the local chat history
|
|
8
|
+
(.keepfold/browse/chat), lock files, the rebuilt dashboard, stray *.tmp files and damaged stores
|
|
9
|
+
moved aside (`quarantine.found`: no use restored, and the chat import's holds raw chat turns,
|
|
10
|
+
private ones too). A zip holds
|
|
11
|
+
private browsing: keep it as private as the vault. The last KEEP zips are kept.
|
|
12
|
+
|
|
13
|
+
`private=False` (`keepfold backup --no-private`) also leaves out what Claude and cloud apps may
|
|
14
|
+
never see: private pages and pages under a private subject (`ask.private_pages`, the access
|
|
15
|
+
gate's LOCAL audience), the raw sources of private resources, browse/private/, the browse
|
|
16
|
+
store in .keepfold/browse (its visits mix private browsing in), the chat import's state
|
|
17
|
+
(.keepfold/chat-import.sqlite: the raw turns of private chats too), and .git, whose history
|
|
18
|
+
holds every private page."""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
import os
|
|
23
|
+
import sqlite3
|
|
24
|
+
import zipfile
|
|
25
|
+
from contextlib import closing
|
|
26
|
+
from datetime import datetime
|
|
27
|
+
from pathlib import Path
|
|
28
|
+
|
|
29
|
+
from keepfold import quarantine
|
|
30
|
+
from keepfold.vault import PRIVATE_BROWSE_DIR, sqlite_ro_uri
|
|
31
|
+
|
|
32
|
+
KEEP = 10 # owner's choice (verdict Q11 a)
|
|
33
|
+
# store.PATH, vectors.CACHE and semantic.CACHE (not imported: numpy is slow to load)
|
|
34
|
+
DBS = (".keepfold/browse/store.db", ".keepfold/browse/vectors-private.db", ".keepfold/vectors.db")
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def private_files(root: Path) -> set[Path]:
|
|
38
|
+
"""The private pages of the vault at `root` (`ask.private_pages`: `vault.is_private`, or
|
|
39
|
+
under a private subject) and the raw files private resources name as their source."""
|
|
40
|
+
from keepfold import ask
|
|
41
|
+
from keepfold.catalog import Catalog
|
|
42
|
+
from keepfold.index import Index
|
|
43
|
+
from keepfold.vault import Vault
|
|
44
|
+
|
|
45
|
+
v = Vault(root)
|
|
46
|
+
pages = ask.private_pages(v, Index(v, Catalog.load(v))).values()
|
|
47
|
+
return {(root / path).resolve() for path, _ in pages} | {
|
|
48
|
+
(root / str(n["fields"]["source"])).resolve() for _, n in pages
|
|
49
|
+
if n["fields"].get("source")}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def backup(root: Path, dest_dir: Path | None = None, private: bool = True) -> Path:
|
|
53
|
+
"""Zip `root` into dest_dir (default <root>/.keepfold/backups); returns the zip path.
|
|
54
|
+
`private` False leaves out the private pages and stores (module docstring)."""
|
|
55
|
+
root = Path(root).resolve()
|
|
56
|
+
skip = root / ".keepfold" / "backups"
|
|
57
|
+
browse = root / ".keepfold" / "browse"
|
|
58
|
+
dest_dir = Path(dest_dir).resolve() if dest_dir else skip
|
|
59
|
+
dest_dir.mkdir(parents=True, exist_ok=True)
|
|
60
|
+
dest = dest_dir / f"keepfold-{datetime.now():%Y%m%d-%H%M%S}.zip"
|
|
61
|
+
tmp = dest.with_suffix(".zip.tmp")
|
|
62
|
+
skip_dirs = (skip, dest_dir, browse / "chat",
|
|
63
|
+
*(() if private else (root / ".git", browse, root / PRIVATE_BROWSE_DIR)))
|
|
64
|
+
dbs = [root / d for d in DBS if private or not (root / d).is_relative_to(browse)]
|
|
65
|
+
skip_files = {tmp, dest, root / ".keepfold" / "lock", root / ".keepfold" / "dashboard.html",
|
|
66
|
+
browse / "lock", browse / "token",
|
|
67
|
+
*(Path(f"{db}{s}") for db in dbs for s in ("", "-wal", "-shm")),
|
|
68
|
+
*(() if private else private_files(root)), *quarantine.found(root),
|
|
69
|
+
# chat_import.STATE: raw text of imported chat turns, private ones too
|
|
70
|
+
*(() if private else (root / f".keepfold/chat-import.sqlite{s}"
|
|
71
|
+
for s in ("", "-wal", "-shm")))}
|
|
72
|
+
try:
|
|
73
|
+
with zipfile.ZipFile(tmp, "w", zipfile.ZIP_DEFLATED) as z:
|
|
74
|
+
for dirpath, dirnames, filenames in os.walk(root):
|
|
75
|
+
d = Path(dirpath)
|
|
76
|
+
dirnames[:] = [n for n in dirnames if d / n not in skip_dirs]
|
|
77
|
+
for name in filenames:
|
|
78
|
+
p = d / name
|
|
79
|
+
if p in skip_files or p.suffix == ".tmp":
|
|
80
|
+
continue
|
|
81
|
+
z.write(p, p.relative_to(root).as_posix())
|
|
82
|
+
for db in [db for db in dbs if db.is_file()]:
|
|
83
|
+
snap = tmp.with_suffix(".db.tmp")
|
|
84
|
+
try:
|
|
85
|
+
with closing(sqlite3.connect(sqlite_ro_uri(db), uri=True)) as src, \
|
|
86
|
+
closing(sqlite3.connect(snap)) as dst:
|
|
87
|
+
src.backup(dst)
|
|
88
|
+
z.write(snap, db.relative_to(root).as_posix())
|
|
89
|
+
finally:
|
|
90
|
+
snap.unlink(missing_ok=True)
|
|
91
|
+
os.replace(tmp, dest)
|
|
92
|
+
finally:
|
|
93
|
+
tmp.unlink(missing_ok=True)
|
|
94
|
+
for old in sorted(dest_dir.glob("keepfold-*.zip"))[:-KEEP]: # names sort by time
|
|
95
|
+
old.unlink(missing_ok=True)
|
|
96
|
+
return dest
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def same_drive(a: Path, b: Path) -> bool:
|
|
100
|
+
return Path(a).stat().st_dev == Path(b).stat().st_dev
|