supernote 0.28.0__tar.gz → 0.29.0__tar.gz
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.
- {supernote-0.28.0/supernote.egg-info → supernote-0.29.0}/PKG-INFO +13 -6
- {supernote-0.28.0 → supernote-0.29.0}/README.md +11 -5
- {supernote-0.28.0 → supernote-0.29.0}/pyproject.toml +4 -6
- supernote-0.29.0/supernote/alembic/versions/b8c9d0e1f2a3_add_note_title_table.py +50 -0
- supernote-0.29.0/supernote/alembic/versions/c9d0e1f2a3b4_add_wiki_backfill_page_cursor.py +30 -0
- supernote-0.29.0/supernote/alembic/versions/d0e1f2a3b4c5_add_note_title_transcript_table.py +49 -0
- supernote-0.29.0/supernote/alembic/versions/e1f2a3b4c5d6_add_summary_transcript_table.py +36 -0
- supernote-0.29.0/supernote/alembic/versions/f3c4d5e6f7a8_add_entity_type_to_system_task.py +104 -0
- supernote-0.29.0/supernote/alembic/versions/f4d5e6f7a8b9_add_rapid_log_diff_table.py +62 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/cli/client.py +544 -21
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/__init__.py +1 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/client.py +5 -0
- supernote-0.29.0/supernote/client/config.py +56 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/exceptions.py +5 -1
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/extended.py +98 -1
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/schedule.py +7 -5
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/wiki.py +33 -0
- supernote-0.29.0/supernote/epub/__init__.py +12 -0
- supernote-0.29.0/supernote/epub/parser.py +476 -0
- supernote-0.29.0/supernote/epub/writer.py +143 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/base.py +26 -2
- supernote-0.28.0/supernote/server/components/config/models.py → supernote-0.29.0/supernote/models/config.py +29 -50
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/events.py +3 -0
- supernote-0.29.0/supernote/models/extended.py +991 -0
- supernote-0.29.0/supernote/models/rapid_log.py +83 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/summary.py +8 -0
- supernote-0.29.0/supernote/models/timeline.py +139 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/wiki.py +106 -4
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/__init__.py +2 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/author.py +4 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/converter.py +258 -17
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/fileformat.py +31 -1
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/parser.py +12 -3
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/renderer.py +30 -11
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/ai/eval.py +2 -2
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/ai/prompts.py +38 -2
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/app.py +0 -8
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/__init__.py +44 -8
- supernote-0.29.0/supernote/server/components/ai/__init__.py +534 -0
- supernote-0.29.0/supernote/server/components/ai/config.py +52 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/ai/http.py +31 -4
- supernote-0.29.0/supernote/server/components/api_keys/__init__.py +43 -0
- supernote-0.29.0/supernote/server/components/api_keys/auth.py +47 -0
- supernote-0.29.0/supernote/server/components/api_keys/http.py +100 -0
- supernote-0.29.0/supernote/server/components/api_keys/service.py +216 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/apple/__init__.py +13 -1
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/apple/backend.py +2 -6
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/apple/ocr.py +24 -13
- supernote-0.29.0/supernote/server/components/auth/__init__.py +105 -0
- supernote-0.28.0/supernote/server/routes/auth.py → supernote-0.29.0/supernote/server/components/auth/http.py +122 -267
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/config/http.py +40 -32
- supernote-0.29.0/supernote/server/components/config/legacy.py +120 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/config/service.py +262 -212
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/conversion/__init__.py +10 -5
- supernote-0.29.0/supernote/server/components/conversion/config.py +33 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/conversion/http.py +50 -109
- {supernote-0.28.0/supernote/server/components/processor → supernote-0.29.0/supernote/server/components/conversion}/mcp.py +4 -4
- supernote-0.28.0/supernote/server/components/processor/png_conversion.py → supernote-0.29.0/supernote/server/components/conversion/processor.py +37 -3
- supernote-0.29.0/supernote/server/components/conversion/service.py +714 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/events/__init__.py +5 -2
- supernote-0.29.0/supernote/server/components/events/config.py +29 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/events/http.py +17 -38
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/events/service.py +11 -40
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/fake_ai/__init__.py +13 -1
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/fake_ai/embedding.py +5 -13
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/fake_ai/ocr.py +18 -13
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/fake_ai/summary.py +4 -13
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/fake_ai/text.py +6 -13
- supernote-0.29.0/supernote/server/components/files/__init__.py +40 -0
- supernote-0.29.0/supernote/server/components/files/builder.py +702 -0
- supernote-0.29.0/supernote/server/components/files/fetch.py +242 -0
- supernote-0.29.0/supernote/server/components/files/http/__init__.py +280 -0
- supernote-0.29.0/supernote/server/components/files/http/file_device.py +537 -0
- supernote-0.29.0/supernote/server/components/files/http/file_web.py +601 -0
- {supernote-0.28.0/supernote/server/routes → supernote-0.29.0/supernote/server/components/files/http}/oss.py +11 -144
- supernote-0.29.0/supernote/server/components/files/mcp.py +589 -0
- supernote-0.29.0/supernote/server/components/files/publish.py +331 -0
- supernote-0.29.0/supernote/server/components/files/upload.py +195 -0
- supernote-0.29.0/supernote/server/components/gemini/__init__.py +87 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/gemini/backend.py +35 -1
- supernote-0.29.0/supernote/server/components/gemini/config.py +31 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/gemini/embedding.py +8 -15
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/gemini/ocr.py +30 -15
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/gemini/summary.py +8 -15
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/gemini/text.py +10 -15
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/http/__init__.py +34 -6
- supernote-0.29.0/supernote/server/components/http/blob.py +175 -0
- supernote-0.29.0/supernote/server/components/http/config.py +35 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/integrity/service.py +40 -15
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/mcp/__init__.py +7 -3
- supernote-0.29.0/supernote/server/components/mcp/config.py +34 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/metrics/__init__.py +9 -1
- supernote-0.29.0/supernote/server/components/metrics/config.py +26 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/metrics/http.py +6 -3
- supernote-0.29.0/supernote/server/components/note_metadata/__init__.py +49 -0
- supernote-0.29.0/supernote/server/components/note_metadata/http.py +140 -0
- supernote-0.29.0/supernote/server/components/note_metadata/processor.py +465 -0
- supernote-0.29.0/supernote/server/components/note_metadata/service.py +451 -0
- supernote-0.29.0/supernote/server/components/oauth/__init__.py +46 -0
- supernote-0.29.0/supernote/server/components/oauth/auth.py +44 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/oauth/client_metadata.py +11 -45
- supernote-0.29.0/supernote/server/components/oauth/grants.py +313 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/oauth/http.py +43 -2
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/oauth/provider.py +9 -10
- supernote-0.29.0/supernote/server/components/openai/__init__.py +72 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/openai/backend.py +70 -10
- supernote-0.29.0/supernote/server/components/openai/config.py +25 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/openai/embedding.py +8 -15
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/openai/ocr.py +20 -15
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/openai/summary.py +8 -15
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/openai/text.py +10 -15
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/processor/__init__.py +13 -8
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/processor/base.py +62 -6
- supernote-0.29.0/supernote/server/components/processor/config.py +28 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/processor/http.py +30 -107
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/processor/page_hashing.py +33 -235
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/processor/processor.py +0 -10
- supernote-0.29.0/supernote/server/components/processor/queries.py +400 -0
- supernote-0.29.0/supernote/server/components/processor/recovery.py +315 -0
- supernote-0.29.0/supernote/server/components/processor/runner.py +403 -0
- supernote-0.29.0/supernote/server/components/processor/service.py +713 -0
- supernote-0.29.0/supernote/server/components/rapid_log/__init__.py +71 -0
- supernote-0.29.0/supernote/server/components/rapid_log/diff.py +263 -0
- supernote-0.29.0/supernote/server/components/rapid_log/events.py +52 -0
- supernote-0.28.0/supernote/server/utils/rapid_log.py → supernote-0.29.0/supernote/server/components/rapid_log/parser.py +27 -25
- supernote-0.29.0/supernote/server/components/rapid_log/service.py +290 -0
- supernote-0.29.0/supernote/server/components/schedule/http.py +472 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/search/__init__.py +9 -2
- supernote-0.29.0/supernote/server/components/search/http.py +63 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/search/processor.py +14 -9
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/socketio/__init__.py +1 -1
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/socketio/manager.py +0 -3
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/summary/__init__.py +19 -3
- supernote-0.29.0/supernote/server/components/summary/chunking.py +279 -0
- supernote-0.29.0/supernote/server/components/summary/config.py +61 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/summary/http.py +267 -293
- supernote-0.29.0/supernote/server/components/summary/markdown_export.py +119 -0
- supernote-0.29.0/supernote/server/components/summary/mcp.py +73 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/summary/processor.py +135 -50
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/summary/service.py +149 -7
- supernote-0.29.0/supernote/server/components/timeline/__init__.py +45 -0
- supernote-0.29.0/supernote/server/components/timeline/http.py +87 -0
- supernote-0.29.0/supernote/server/components/timeline/service.py +423 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/transcript/__init__.py +7 -3
- supernote-0.29.0/supernote/server/components/transcript/http.py +77 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/transcript/models.py +27 -0
- supernote-0.29.0/supernote/server/components/transcript/processor.py +558 -0
- supernote-0.29.0/supernote/server/components/transcript/service.py +418 -0
- supernote-0.29.0/supernote/server/components/transcript/summary_ocr.py +263 -0
- supernote-0.29.0/supernote/server/components/transcript/vocabulary.py +214 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/wiki/__init__.py +8 -1
- supernote-0.29.0/supernote/server/components/wiki/compiler.py +1154 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/wiki/config.py +6 -1
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/wiki/http.py +134 -102
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/wiki/models.py +34 -2
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/wiki/prompts.py +329 -11
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/wiki/service.py +120 -13
- supernote-0.29.0/supernote/server/components/wiki/source_service.py +605 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/config.py +164 -39
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/core.py +73 -19
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/models/__init__.py +4 -1
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/models/api_key.py +1 -1
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/models/device.py +1 -1
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/models/note_processing.py +148 -17
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/models/oauth_grant.py +1 -1
- supernote-0.29.0/supernote/server/db/models/rapid_log.py +96 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/models/summary.py +46 -2
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/models/wiki.py +4 -1
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/events.py +86 -47
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/exceptions.py +7 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/keys.py +1 -0
- supernote-0.29.0/supernote/server/resources/prompts/ocr_vocabulary/default/prompt.md +1 -0
- supernote-0.29.0/supernote/server/resources/prompts/summary/common/instruction.md +17 -0
- supernote-0.29.0/supernote/server/resources/prompts/summary/daily/prompt.md +6 -0
- supernote-0.29.0/supernote/server/resources/prompts/summary/default/prompt.md +4 -0
- supernote-0.29.0/supernote/server/resources/prompts/title/default/prompt.md +7 -0
- supernote-0.29.0/supernote/server/resources/prompts/wiki_compile/default/instructions.md +40 -0
- supernote-0.29.0/supernote/server/routes/__init__.py +12 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/routes/admin.py +2 -9
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/services/blob.py +20 -1
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/services/coordination.py +32 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/services/file.py +84 -21
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/services/user.py +76 -447
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/index.html +21 -27
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/api/client.js +239 -34
- supernote-0.29.0/supernote/server/static/js/api/digests.js +560 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/api/http.js +38 -4
- supernote-0.29.0/supernote/server/static/js/api/timeline.js +85 -0
- supernote-0.29.0/supernote/server/static/js/api/wiki.js +619 -0
- supernote-0.28.0/supernote/server/static/js/components/SystemPanel.js → supernote-0.29.0/supernote/server/static/js/components/ActivityPanel.js +75 -227
- supernote-0.29.0/supernote/server/static/js/components/AiModelConfigCard.js +675 -0
- supernote-0.29.0/supernote/server/static/js/components/AiProvidersConfigSection.js +523 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/DigestPanel.js +53 -6
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/FileBrowserPanel.js +277 -91
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/FileCard.js +11 -6
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/FileViewer.js +153 -41
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/LoginCard.js +18 -4
- supernote-0.29.0/supernote/server/static/js/components/NewDocumentModal.js +317 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/SearchModal.js +49 -40
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/SettingsPanel.js +61 -42
- supernote-0.29.0/supernote/server/static/js/components/SystemPanel.js +315 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/TaskPanel.js +3 -11
- supernote-0.29.0/supernote/server/static/js/components/TimelinePanel.js +366 -0
- supernote-0.29.0/supernote/server/static/js/components/WikiDiagnosticsPanel.js +507 -0
- supernote-0.29.0/supernote/server/static/js/components/WikiPanel.js +1393 -0
- supernote-0.29.0/supernote/server/static/js/components/digests/DigestCard.js +305 -0
- supernote-0.29.0/supernote/server/static/js/components/digests/DigestSidebar.js +210 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/tasks/TaskRow.js +5 -11
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/tasks/TaskSidebar.js +63 -23
- supernote-0.29.0/supernote/server/static/js/components/viewer/ViewerOutlineList.js +71 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/viewer/ViewerSidePanel.js +147 -133
- supernote-0.29.0/supernote/server/static/js/components/viewer/ViewerToolbar.js +309 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/viewer/noteMeta.js +44 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/composables/useDigests.js +35 -4
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/composables/useFileSystem.js +20 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/composables/useProcessingStatus.js +13 -2
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/composables/useRouter.js +102 -26
- supernote-0.29.0/supernote/server/static/js/composables/useServerFeatures.js +61 -0
- supernote-0.29.0/supernote/server/static/js/composables/useTimeline.js +258 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/main.js +22 -3
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/types.d.ts +97 -10
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/utils/note_content.py +20 -2
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/utils/paths.py +22 -1
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/utils/prompt_loader.py +24 -20
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/utils/rate_limit.py +1 -1
- supernote-0.29.0/supernote/server/utils/ssrf.py +83 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/utils/tasks.py +35 -10
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/utils/url_signer.py +1 -1
- {supernote-0.28.0 → supernote-0.29.0/supernote.egg-info}/PKG-INFO +13 -6
- {supernote-0.28.0 → supernote-0.29.0}/supernote.egg-info/SOURCES.txt +79 -8
- {supernote-0.28.0 → supernote-0.29.0}/supernote.egg-info/requires.txt +1 -0
- supernote-0.28.0/supernote/models/extended.py +0 -525
- supernote-0.28.0/supernote/server/components/ai/__init__.py +0 -283
- supernote-0.28.0/supernote/server/components/conversion/service.py +0 -318
- supernote-0.28.0/supernote/server/components/gemini/__init__.py +0 -32
- supernote-0.28.0/supernote/server/components/oauth/__init__.py +0 -37
- supernote-0.28.0/supernote/server/components/openai/__init__.py +0 -33
- supernote-0.28.0/supernote/server/components/processor/service.py +0 -1626
- supernote-0.28.0/supernote/server/components/schedule/http.py +0 -548
- supernote-0.28.0/supernote/server/components/search/http.py +0 -80
- supernote-0.28.0/supernote/server/components/transcript/http.py +0 -81
- supernote-0.28.0/supernote/server/components/transcript/processor.py +0 -283
- supernote-0.28.0/supernote/server/components/transcript/service.py +0 -197
- supernote-0.28.0/supernote/server/components/wiki/compiler.py +0 -640
- supernote-0.28.0/supernote/server/components/wiki/source_service.py +0 -211
- supernote-0.28.0/supernote/server/resources/prompts/summary/common/instruction.md +0 -14
- supernote-0.28.0/supernote/server/resources/prompts/summary/daily/prompt.md +0 -17
- supernote-0.28.0/supernote/server/resources/prompts/summary/default/prompt.md +0 -4
- supernote-0.28.0/supernote/server/resources/prompts/wiki_compile/default/instructions.md +0 -29
- supernote-0.28.0/supernote/server/routes/__init__.py +0 -20
- supernote-0.28.0/supernote/server/routes/file_device.py +0 -627
- supernote-0.28.0/supernote/server/routes/file_web.py +0 -681
- supernote-0.28.0/supernote/server/static/js/api/digests.js +0 -336
- supernote-0.28.0/supernote/server/static/js/api/wiki.js +0 -256
- supernote-0.28.0/supernote/server/static/js/components/WikiPanel.js +0 -629
- supernote-0.28.0/supernote/server/static/js/components/digests/DigestCard.js +0 -142
- supernote-0.28.0/supernote/server/static/js/components/digests/DigestSidebar.js +0 -143
- supernote-0.28.0/supernote/server/static/js/components/viewer/ViewerToolbar.js +0 -171
- {supernote-0.28.0 → supernote-0.29.0}/LICENSE +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/NOTICE +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/setup.cfg +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/env.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/script.py.mako +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/0543a383957b_initial_schema.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/68964804740d_prevent_user_id_reuse.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/7a8291f043bc_add_links_and_sort_fields_to_schedule_task.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/a2b3c4d5e6f7_scope_summary_unique_identifier_by_user.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/a4b5c6d7e8f9_reparent_uncategorized_ai_summaries.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/b5c6d7e8f9a0_add_previous_text_to_note_page_content.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/b7397248a96b_merge_mixed_case_system_roots.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/b8e9c0d1e2f3_backfill_summary_md5_and_timestamps.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/c1d2e3f4a5b6_add_embedding_model_to_note_page_content.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/c3d4e5f6a7b8_seed_sync_initialized_for_existing_users.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/c7d8e9f0a1b2_add_oauth_grants_table.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/d1e2f3a4b5c6_add_client_task_ids.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/d4e5f6a7b8c9_unify_schedule_ids_as_string.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/d5e6f7a8b9c0_reset_legacy_default_user_quota.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/d8e9f0a1b2c3_add_wiki_tables.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/e6f7a8b9c0d1_add_note_and_page_metadata_tables.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/e7f8a9b0c1d2_add_update_time_to_schedule_task_group.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/e8f9a0b1c2d3_add_api_keys_table.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/e9f0a1b2c3d4_add_user_id_to_system_task.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/f1a2b3c4d5e6_make_schedule_task_list_id_nullable.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/f2a3b4c5d6e7_add_user_event_log_table.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic/versions/f3b4c5d6e7f8_migrate_generated_summaries_to_ai_category.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/alembic.ini +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/cli/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/cli/admin.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/cli/main.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/cli/notebook.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/cli/server.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/admin.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/api.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/auth.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/device.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/events.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/hashing.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/login_client.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/socket.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/summary.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/client/web.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/auth.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/equipment.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/file_common.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/file_device.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/file_web.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/schedule.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/socket.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/system.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/models/user.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/color.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/decoder.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/encoder.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/exceptions.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/manipulator.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/fonts/ArchitectsDaughter-Regular.ttf +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/fonts/Caveat-Variable.ttf +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/fonts/InstrumentSerif-Italic.ttf +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/fonts/InstrumentSerif-Regular.ttf +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/fonts/Karla-Variable.ttf +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/fonts/OFL-ArchitectsDaughter.txt +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/fonts/OFL-Caveat.txt +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/fonts/OFL-InstrumentSerif.txt +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/fonts/OFL-Karla.txt +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/fonts/OFL-SpaceMono.txt +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/fonts/SpaceMono-Bold.ttf +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/fonts/SpaceMono-Regular.ttf +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/resources/fonts/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/schema.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/notebook/utils.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/py.typed +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/ai/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/ai/base.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/ai/models/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/ai/models/embedding.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/ai/models/ocr.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/ai/models/summary.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/ai/models/text.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/config/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/events/mcp.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/events/models.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/integrity/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/integrity/http.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/mcp/metrics.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/mcp/server.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/metrics/storage.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/oauth/models.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/schedule/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/schedule/ical_export.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/schedule/mcp.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/schedule/service.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/search/chunk_search.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/search/lexical_scoring.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/search/mcp.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/search/models.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/search/service.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/socketio/http.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/transcript/mcp.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/web_ui/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/web_ui/http.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/webhooks/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/webhooks/config.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/webhooks/service.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/wiki/export.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/components/wiki/mcp.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/constants.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/base.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/migrations.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/models/event_log.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/models/file.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/models/kv.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/models/login_record.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/models/schedule.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/models/user.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/db/session.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/metrics.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/resources/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/resources/prompts/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/resources/prompts/image/default/prompt.md +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/resources/prompts/ocr/common/context.md +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/resources/prompts/ocr/common/legend.md +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/resources/prompts/ocr/daily/prompt.md +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/resources/prompts/ocr/default/system.md +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/resources/prompts/ocr/monthly/prompt.md +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/resources/prompts/ocr/weekly/prompt.md +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/resources/prompts/summary/monthly/prompt.md +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/resources/prompts/summary/weekly/prompt.md +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/resources/prompts/wiki_conflict/default/instructions.md +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/resources/prompts/wiki_lint/default/instructions.md +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/routes/decorators.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/routes/system.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/services/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/services/vfs.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/socket_auth.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/favicon.ico +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/api/schedule.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/MoveModal.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/OAuthConsentCard.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/RecycleBinPanel.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/RenameModal.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/digests/DigestEditorModal.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/tasks/TaskEditorModal.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/tasks/TaskIcsModal.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/viewer/MermaidBlock.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/components/viewer/ViewerMediaPreview.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/composables/useCanvasScrollSync.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/composables/useModalEscape.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/composables/useRecycleBin.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/composables/useSchedule.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/composables/useToast.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/utils/clipboard.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/utils/format.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/utils/markdown.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/utils/mermaid.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/js/utils/oauth.js +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/static/style.css +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/trace.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/utils/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/utils/auth_utils.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/utils/hashing.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/utils/image.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/utils/request.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/utils/stopwords.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/server/utils/unique_id.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/testing/__init__.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/testing/notebook_fixtures.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote/testing/server_runner.py +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote.egg-info/dependency_links.txt +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote.egg-info/entry_points.txt +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/supernote.egg-info/top_level.txt +0 -0
- {supernote-0.28.0 → supernote-0.29.0}/tests/test_init.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: supernote
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.29.0
|
|
4
4
|
Summary: Unofficial Python toolkit for Ratta Supernote: parse and author .note files, self-host a lightweight SQLite private cloud, and run optional AI synthesis
|
|
5
5
|
Author-email: Allen Porter <allen.porter@gmail.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -46,6 +46,7 @@ Requires-Dist: starlette>=0.35.0; extra == "server"
|
|
|
46
46
|
Requires-Dist: prometheus-client>=0.20.0; extra == "server"
|
|
47
47
|
Requires-Dist: python-socketio>=5.11.0; extra == "server"
|
|
48
48
|
Requires-Dist: ical>=8.0.0; extra == "server"
|
|
49
|
+
Requires-Dist: markdown2>=2.5.0; extra == "server"
|
|
49
50
|
Provides-Extra: apple
|
|
50
51
|
Requires-Dist: pyobjc-framework-Vision>=10.0; sys_platform == "darwin" and extra == "apple"
|
|
51
52
|
Provides-Extra: all
|
|
@@ -74,9 +75,9 @@ Unlike the official multi-container Java, MariaDB, and Redis Private Cloud stack
|
|
|
74
75
|
|
|
75
76
|
| Tier | Memory Footprint | What's Included | AI Required? |
|
|
76
77
|
| :--- | :--- | :--- | :---: |
|
|
77
|
-
| **1. Bare Sync Server** | ~135 MB RAM | Drop-in Private Cloud sync for Raspberry Pi / NAS, storage quotas (
|
|
78
|
-
| **2. Web Workspace & Integrations** | ~160 MB idle (~310 MB peak) | 4-tab Web UI (Files, Digests, Tasks, Wiki), `.ics` calendar feeds, webhooks,
|
|
79
|
-
| **3. Optional AI & Knowledge Hub** | ~160 MB idle + chosen model | Handwriting & diagram OCR, standalone image OCR, hybrid semantic search, opt-in LLM Wiki + Obsidian export, MCP server for Claude/Cursor | Optional (Gemini or local Ollama/vLLM) |
|
|
78
|
+
| **1. Bare Sync Server** | ~135 MB RAM | Drop-in Private Cloud sync for Raspberry Pi / NAS, storage quotas (disables Web UI and MCP) | No |
|
|
79
|
+
| **2. Web Workspace & Integrations** | ~160 MB idle (~310 MB peak) | 4-tab Web UI (Files with cross-notebook Timeline & Jump to Day calendar, Digests, Tasks, Wiki), one-click `.note` PDF export, `.ics` calendar feeds, webhooks, built-in Supernote keyword search | No |
|
|
80
|
+
| **3. Optional AI & Knowledge Hub** | ~160 MB idle + chosen model | Handwriting & diagram OCR, searchable PDF export with TOC bookmarks, standalone image OCR, hybrid semantic search, opt-in LLM Wiki + Obsidian export, MCP server for Claude/Cursor | Optional (Gemini or local Ollama/vLLM) |
|
|
80
81
|
| **4. Offline `.note` Toolkit** | CLI / library only | Parse `.note` files, convert to PDF/PNG/SVG, or author Bullet Journal `.note` files from Markdown—no server needed | No |
|
|
81
82
|
|
|
82
83
|
---
|
|
@@ -91,14 +92,14 @@ Unlike the official multi-container Java, MariaDB, and Redis Private Cloud stack
|
|
|
91
92
|
| Search across years of notebooks by keyword or meaning | [Search & Retrieval](docs/guides/search.md) |
|
|
92
93
|
| Turn your synced notes and tasks into an Obsidian-ready personal wiki | [LLM Wiki](docs/guides/llm_wiki.md) |
|
|
93
94
|
| Connect Claude Desktop, Claude Code, or Cursor to read notes and inspect sketches | [MCP Server & AI Assistants](docs/guides/mcp.md) |
|
|
94
|
-
|
|
|
95
|
+
| Export Supernote To-Dos as a calendar feed (`.ics`) or trigger Home Assistant and n8n webhooks | [Webhooks, iCal (`.ics`) & Integrations](docs/guides/webhooks_and_integrations.md) |
|
|
95
96
|
| Convert or author `.note` files offline from the terminal or Python | [CLI Reference](docs/reference/cli_reference.md) · [`supernote.notebook`](supernote/notebook/README.md) |
|
|
96
97
|
|
|
97
98
|
---
|
|
98
99
|
|
|
99
100
|
## Quick Tour of the Web UI
|
|
100
101
|
|
|
101
|
-
Browse synced folders with rendered `.note` cover thumbnails, open handwritten pages side-by-side with AI Markdown transcripts (including rendered Mermaid diagrams), review reading digests, manage synced tasks, or curate your opt-in LLM Wiki—all in a mobile-friendly editorial Web UI.
|
|
102
|
+
Browse synced folders with rendered `.note` cover thumbnails, switch to the **Timeline** view (`#/timeline`) to browse pages written or edited on any day across all notebooks with a **Jump to Day** mini-calendar (plus optional AI summary blurbs and handwritten-date matching), open handwritten pages side-by-side with AI Markdown transcripts (including rendered Mermaid diagrams), review reading digests, manage synced tasks, or curate your opt-in LLM Wiki—all in a mobile-friendly editorial Web UI.
|
|
102
103
|
|
|
103
104
|
<p align="center">
|
|
104
105
|
<img src="docs/static-assets/web-notebook-viewer.png" alt="Handwritten Notebook Viewer side-by-side with AI Markdown OCR Transcript" width="840">
|
|
@@ -149,6 +150,12 @@ The first registered user becomes the administrator and closes public registrati
|
|
|
149
150
|
supernote admin --url http://localhost:8080 user add you@example.com
|
|
150
151
|
```
|
|
151
152
|
|
|
153
|
+
If you are running with Docker, run the same command inside the container:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
docker exec -it supernote-server supernote admin --url http://localhost:8080 user add you@example.com
|
|
157
|
+
```
|
|
158
|
+
|
|
152
159
|
### 3. Pair your Supernote
|
|
153
160
|
|
|
154
161
|
1. On your tablet, open **Settings → Sync → Supernote Cloud** and choose **Private Cloud**.
|
|
@@ -20,9 +20,9 @@ Unlike the official multi-container Java, MariaDB, and Redis Private Cloud stack
|
|
|
20
20
|
|
|
21
21
|
| Tier | Memory Footprint | What's Included | AI Required? |
|
|
22
22
|
| :--- | :--- | :--- | :---: |
|
|
23
|
-
| **1. Bare Sync Server** | ~135 MB RAM | Drop-in Private Cloud sync for Raspberry Pi / NAS, storage quotas (
|
|
24
|
-
| **2. Web Workspace & Integrations** | ~160 MB idle (~310 MB peak) | 4-tab Web UI (Files, Digests, Tasks, Wiki), `.ics` calendar feeds, webhooks,
|
|
25
|
-
| **3. Optional AI & Knowledge Hub** | ~160 MB idle + chosen model | Handwriting & diagram OCR, standalone image OCR, hybrid semantic search, opt-in LLM Wiki + Obsidian export, MCP server for Claude/Cursor | Optional (Gemini or local Ollama/vLLM) |
|
|
23
|
+
| **1. Bare Sync Server** | ~135 MB RAM | Drop-in Private Cloud sync for Raspberry Pi / NAS, storage quotas (disables Web UI and MCP) | No |
|
|
24
|
+
| **2. Web Workspace & Integrations** | ~160 MB idle (~310 MB peak) | 4-tab Web UI (Files with cross-notebook Timeline & Jump to Day calendar, Digests, Tasks, Wiki), one-click `.note` PDF export, `.ics` calendar feeds, webhooks, built-in Supernote keyword search | No |
|
|
25
|
+
| **3. Optional AI & Knowledge Hub** | ~160 MB idle + chosen model | Handwriting & diagram OCR, searchable PDF export with TOC bookmarks, standalone image OCR, hybrid semantic search, opt-in LLM Wiki + Obsidian export, MCP server for Claude/Cursor | Optional (Gemini or local Ollama/vLLM) |
|
|
26
26
|
| **4. Offline `.note` Toolkit** | CLI / library only | Parse `.note` files, convert to PDF/PNG/SVG, or author Bullet Journal `.note` files from Markdown—no server needed | No |
|
|
27
27
|
|
|
28
28
|
---
|
|
@@ -37,14 +37,14 @@ Unlike the official multi-container Java, MariaDB, and Redis Private Cloud stack
|
|
|
37
37
|
| Search across years of notebooks by keyword or meaning | [Search & Retrieval](docs/guides/search.md) |
|
|
38
38
|
| Turn your synced notes and tasks into an Obsidian-ready personal wiki | [LLM Wiki](docs/guides/llm_wiki.md) |
|
|
39
39
|
| Connect Claude Desktop, Claude Code, or Cursor to read notes and inspect sketches | [MCP Server & AI Assistants](docs/guides/mcp.md) |
|
|
40
|
-
|
|
|
40
|
+
| Export Supernote To-Dos as a calendar feed (`.ics`) or trigger Home Assistant and n8n webhooks | [Webhooks, iCal (`.ics`) & Integrations](docs/guides/webhooks_and_integrations.md) |
|
|
41
41
|
| Convert or author `.note` files offline from the terminal or Python | [CLI Reference](docs/reference/cli_reference.md) · [`supernote.notebook`](supernote/notebook/README.md) |
|
|
42
42
|
|
|
43
43
|
---
|
|
44
44
|
|
|
45
45
|
## Quick Tour of the Web UI
|
|
46
46
|
|
|
47
|
-
Browse synced folders with rendered `.note` cover thumbnails, open handwritten pages side-by-side with AI Markdown transcripts (including rendered Mermaid diagrams), review reading digests, manage synced tasks, or curate your opt-in LLM Wiki—all in a mobile-friendly editorial Web UI.
|
|
47
|
+
Browse synced folders with rendered `.note` cover thumbnails, switch to the **Timeline** view (`#/timeline`) to browse pages written or edited on any day across all notebooks with a **Jump to Day** mini-calendar (plus optional AI summary blurbs and handwritten-date matching), open handwritten pages side-by-side with AI Markdown transcripts (including rendered Mermaid diagrams), review reading digests, manage synced tasks, or curate your opt-in LLM Wiki—all in a mobile-friendly editorial Web UI.
|
|
48
48
|
|
|
49
49
|
<p align="center">
|
|
50
50
|
<img src="docs/static-assets/web-notebook-viewer.png" alt="Handwritten Notebook Viewer side-by-side with AI Markdown OCR Transcript" width="840">
|
|
@@ -95,6 +95,12 @@ The first registered user becomes the administrator and closes public registrati
|
|
|
95
95
|
supernote admin --url http://localhost:8080 user add you@example.com
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
+
If you are running with Docker, run the same command inside the container:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
docker exec -it supernote-server supernote admin --url http://localhost:8080 user add you@example.com
|
|
102
|
+
```
|
|
103
|
+
|
|
98
104
|
### 3. Pair your Supernote
|
|
99
105
|
|
|
100
106
|
1. On your tablet, open **Settings → Sync → Supernote Cloud** and choose **Private Cloud**.
|
|
@@ -4,7 +4,7 @@ requires = ["setuptools>=77.0"]
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "supernote"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.29.0"
|
|
8
8
|
license = "Apache-2.0"
|
|
9
9
|
license-files = ["LICENSE", "NOTICE"]
|
|
10
10
|
description = "Unofficial Python toolkit for Ratta Supernote: parse and author .note files, self-host a lightweight SQLite private cloud, and run optional AI synthesis"
|
|
@@ -58,6 +58,7 @@ server = [
|
|
|
58
58
|
"prometheus-client>=0.20.0",
|
|
59
59
|
"python-socketio>=5.11.0",
|
|
60
60
|
"ical>=8.0.0",
|
|
61
|
+
"markdown2>=2.5.0",
|
|
61
62
|
]
|
|
62
63
|
apple = [
|
|
63
64
|
"pyobjc-framework-Vision>=10.0; sys_platform == 'darwin'",
|
|
@@ -115,6 +116,8 @@ warn_unreachable = true
|
|
|
115
116
|
[tool.pytest.ini_options]
|
|
116
117
|
asyncio_mode = "auto"
|
|
117
118
|
asyncio_default_fixture_loop_scope = "function"
|
|
119
|
+
timeout = 60
|
|
120
|
+
timeout_method = "signal"
|
|
118
121
|
# Ignore pytest warnings in upstream libraries
|
|
119
122
|
filterwarnings = [
|
|
120
123
|
"ignore:'_UnionGenericAlias' is deprecated and slated for removal in Python 3.17:DeprecationWarning:google.genai",
|
|
@@ -134,11 +137,6 @@ markers = [
|
|
|
134
137
|
core = "sysmon"
|
|
135
138
|
disable_warnings = ["no-sysmon"]
|
|
136
139
|
|
|
137
|
-
[tool.ty.src]
|
|
138
|
-
exclude = [
|
|
139
|
-
"supernote/cli/",
|
|
140
|
-
]
|
|
141
|
-
|
|
142
140
|
[tool.ty.rules]
|
|
143
141
|
unused-type-ignore-comment = "ignore"
|
|
144
142
|
import-not-found = "ignore"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""add f_note_title table
|
|
2
|
+
|
|
3
|
+
Revision ID: b8c9d0e1f2a3
|
|
4
|
+
Revises: e9f0a1b2c3d4
|
|
5
|
+
Create Date: 2026-11-26 00:10:00.000000
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from typing import Sequence
|
|
10
|
+
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
from alembic import op
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision: str = "b8c9d0e1f2a3"
|
|
16
|
+
down_revision: str | Sequence[str] | None = "e9f0a1b2c3d4"
|
|
17
|
+
branch_labels: str | Sequence[str] | None = None
|
|
18
|
+
depends_on: str | Sequence[str] | None = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def upgrade() -> None:
|
|
22
|
+
op.create_table(
|
|
23
|
+
"f_note_title",
|
|
24
|
+
sa.Column("user_id", sa.BigInteger(), nullable=False),
|
|
25
|
+
sa.Column("file_id", sa.BigInteger(), nullable=False),
|
|
26
|
+
sa.Column("title_index", sa.Integer(), nullable=False),
|
|
27
|
+
sa.Column("page_index", sa.Integer(), nullable=False),
|
|
28
|
+
sa.Column("rect_left", sa.Integer(), nullable=True),
|
|
29
|
+
sa.Column("rect_top", sa.Integer(), nullable=True),
|
|
30
|
+
sa.Column("rect_width", sa.Integer(), nullable=True),
|
|
31
|
+
sa.Column("rect_height", sa.Integer(), nullable=True),
|
|
32
|
+
sa.Column("level", sa.Integer(), nullable=False),
|
|
33
|
+
sa.Column("style", sa.String(), nullable=True),
|
|
34
|
+
sa.Column("bitmap_md5", sa.String(), nullable=True),
|
|
35
|
+
sa.Column("text_content", sa.Text(), nullable=True),
|
|
36
|
+
sa.Column("create_time", sa.BigInteger(), nullable=False),
|
|
37
|
+
sa.Column("update_time", sa.BigInteger(), nullable=False),
|
|
38
|
+
sa.PrimaryKeyConstraint("user_id", "file_id", "title_index"),
|
|
39
|
+
)
|
|
40
|
+
op.create_index(
|
|
41
|
+
op.f("ix_f_note_title_file_id"),
|
|
42
|
+
"f_note_title",
|
|
43
|
+
["file_id"],
|
|
44
|
+
unique=False,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def downgrade() -> None:
|
|
49
|
+
op.drop_index(op.f("ix_f_note_title_file_id"), table_name="f_note_title")
|
|
50
|
+
op.drop_table("f_note_title")
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""add backfill_page_cursor to f_wiki_checkpoint
|
|
2
|
+
|
|
3
|
+
Revision ID: c9d0e1f2a3b4
|
|
4
|
+
Revises: b8c9d0e1f2a3
|
|
5
|
+
Create Date: 2026-11-26 17:35:00.000000
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from collections.abc import Sequence
|
|
10
|
+
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
from alembic import op
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision: str = "c9d0e1f2a3b4"
|
|
16
|
+
down_revision: str | Sequence[str] | None = "b8c9d0e1f2a3"
|
|
17
|
+
branch_labels: str | Sequence[str] | None = None
|
|
18
|
+
depends_on: str | Sequence[str] | None = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def upgrade() -> None:
|
|
22
|
+
op.add_column(
|
|
23
|
+
"f_wiki_checkpoint",
|
|
24
|
+
sa.Column("backfill_page_cursor", sa.String(length=128), nullable=True),
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def downgrade() -> None:
|
|
29
|
+
with op.batch_alter_table("f_wiki_checkpoint") as batch_op:
|
|
30
|
+
batch_op.drop_column("backfill_page_cursor")
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""add f_note_title_transcript table and drop f_note_title.text_content
|
|
2
|
+
|
|
3
|
+
Revision ID: d0e1f2a3b4c5
|
|
4
|
+
Revises: c9d0e1f2a3b4
|
|
5
|
+
Create Date: 2026-11-26 19:52:00.000000
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from collections.abc import Sequence
|
|
10
|
+
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
from alembic import op
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision: str = "d0e1f2a3b4c5"
|
|
16
|
+
down_revision: str | Sequence[str] | None = "c9d0e1f2a3b4"
|
|
17
|
+
branch_labels: str | Sequence[str] | None = None
|
|
18
|
+
depends_on: str | Sequence[str] | None = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def upgrade() -> None:
|
|
22
|
+
op.create_table(
|
|
23
|
+
"f_note_title_transcript",
|
|
24
|
+
sa.Column("user_id", sa.BigInteger(), nullable=False),
|
|
25
|
+
sa.Column("file_id", sa.BigInteger(), nullable=False),
|
|
26
|
+
sa.Column("bitmap_md5", sa.String(), nullable=False),
|
|
27
|
+
sa.Column("text_content", sa.Text(), nullable=False),
|
|
28
|
+
sa.Column("create_time", sa.BigInteger(), nullable=False),
|
|
29
|
+
sa.Column("update_time", sa.BigInteger(), nullable=False),
|
|
30
|
+
sa.PrimaryKeyConstraint("user_id", "file_id", "bitmap_md5"),
|
|
31
|
+
)
|
|
32
|
+
op.create_index(
|
|
33
|
+
op.f("ix_f_note_title_transcript_file_id"),
|
|
34
|
+
"f_note_title_transcript",
|
|
35
|
+
["file_id"],
|
|
36
|
+
unique=False,
|
|
37
|
+
)
|
|
38
|
+
with op.batch_alter_table("f_note_title") as batch_op:
|
|
39
|
+
batch_op.drop_column("text_content")
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def downgrade() -> None:
|
|
43
|
+
with op.batch_alter_table("f_note_title") as batch_op:
|
|
44
|
+
batch_op.add_column(sa.Column("text_content", sa.Text(), nullable=True))
|
|
45
|
+
op.drop_index(
|
|
46
|
+
op.f("ix_f_note_title_transcript_file_id"),
|
|
47
|
+
table_name="f_note_title_transcript",
|
|
48
|
+
)
|
|
49
|
+
op.drop_table("f_note_title_transcript")
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""add f_summary_transcript table
|
|
2
|
+
|
|
3
|
+
Revision ID: e1f2a3b4c5d6
|
|
4
|
+
Revises: d0e1f2a3b4c5
|
|
5
|
+
Create Date: 2026-11-27 18:00:00.000000
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from collections.abc import Sequence
|
|
10
|
+
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
from alembic import op
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision: str = "e1f2a3b4c5d6"
|
|
16
|
+
down_revision: str | Sequence[str] | None = "d0e1f2a3b4c5"
|
|
17
|
+
branch_labels: str | Sequence[str] | None = None
|
|
18
|
+
depends_on: str | Sequence[str] | None = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def upgrade() -> None:
|
|
22
|
+
op.create_table(
|
|
23
|
+
"f_summary_transcript",
|
|
24
|
+
sa.Column("user_id", sa.BigInteger(), nullable=False),
|
|
25
|
+
sa.Column("summary_id", sa.BigInteger(), nullable=False),
|
|
26
|
+
sa.Column("handwrite_md5", sa.String(), nullable=False),
|
|
27
|
+
sa.Column("text_content", sa.Text(), nullable=False),
|
|
28
|
+
sa.Column("model_id", sa.String(), nullable=True),
|
|
29
|
+
sa.Column("create_time", sa.BigInteger(), nullable=False),
|
|
30
|
+
sa.Column("update_time", sa.BigInteger(), nullable=False),
|
|
31
|
+
sa.PrimaryKeyConstraint("user_id", "summary_id"),
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def downgrade() -> None:
|
|
36
|
+
op.drop_table("f_summary_transcript")
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"""Add entity_type and rename file_id to entity_id on f_system_task
|
|
2
|
+
|
|
3
|
+
Revision ID: f3c4d5e6f7a8
|
|
4
|
+
Revises: e1f2a3b4c5d6
|
|
5
|
+
Create Date: 2026-11-27 22:55:00.000000
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from collections.abc import Sequence
|
|
10
|
+
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
from alembic import op
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision: str = "f3c4d5e6f7a8"
|
|
16
|
+
down_revision: str | Sequence[str] | None = "e1f2a3b4c5d6"
|
|
17
|
+
branch_labels: str | Sequence[str] | None = None
|
|
18
|
+
depends_on: str | Sequence[str] | None = None
|
|
19
|
+
|
|
20
|
+
_NAMING_CONVENTION = {
|
|
21
|
+
"pk": "pk_%(table_name)s",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def upgrade() -> None:
|
|
26
|
+
"""Add entity_type (default 'file') and rename file_id to entity_id on f_system_task."""
|
|
27
|
+
op.drop_index(op.f("ix_f_system_task_file_id"), table_name="f_system_task")
|
|
28
|
+
|
|
29
|
+
with op.batch_alter_table(
|
|
30
|
+
"f_system_task", naming_convention=_NAMING_CONVENTION
|
|
31
|
+
) as batch_op:
|
|
32
|
+
batch_op.drop_constraint("uq_system_task", type_="unique")
|
|
33
|
+
batch_op.alter_column(
|
|
34
|
+
"file_id",
|
|
35
|
+
new_column_name="entity_id",
|
|
36
|
+
existing_type=sa.BigInteger(),
|
|
37
|
+
nullable=False,
|
|
38
|
+
)
|
|
39
|
+
batch_op.add_column(
|
|
40
|
+
sa.Column(
|
|
41
|
+
"entity_type",
|
|
42
|
+
sa.String(),
|
|
43
|
+
nullable=False,
|
|
44
|
+
server_default="file",
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
# Recreate uq_system_task in a second batch block because SQLite batch_alter_table
|
|
49
|
+
# cannot reference a column renamed within the same block when building constraints.
|
|
50
|
+
with op.batch_alter_table(
|
|
51
|
+
"f_system_task", naming_convention=_NAMING_CONVENTION
|
|
52
|
+
) as batch_op:
|
|
53
|
+
batch_op.create_unique_constraint(
|
|
54
|
+
"uq_system_task",
|
|
55
|
+
["user_id", "entity_type", "entity_id", "task_type", "key"],
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
op.create_index(
|
|
59
|
+
op.f("ix_f_system_task_entity_type"),
|
|
60
|
+
"f_system_task",
|
|
61
|
+
["entity_type"],
|
|
62
|
+
unique=False,
|
|
63
|
+
)
|
|
64
|
+
op.create_index(
|
|
65
|
+
op.f("ix_f_system_task_entity_id"),
|
|
66
|
+
"f_system_task",
|
|
67
|
+
["entity_id"],
|
|
68
|
+
unique=False,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def downgrade() -> None:
|
|
73
|
+
"""Remove entity_type and rename entity_id back to file_id on f_system_task."""
|
|
74
|
+
conn = op.get_bind()
|
|
75
|
+
conn.execute(sa.text("DELETE FROM f_system_task WHERE entity_type != 'file'"))
|
|
76
|
+
|
|
77
|
+
op.drop_index(op.f("ix_f_system_task_entity_id"), table_name="f_system_task")
|
|
78
|
+
op.drop_index(op.f("ix_f_system_task_entity_type"), table_name="f_system_task")
|
|
79
|
+
|
|
80
|
+
with op.batch_alter_table(
|
|
81
|
+
"f_system_task", naming_convention=_NAMING_CONVENTION
|
|
82
|
+
) as batch_op:
|
|
83
|
+
batch_op.drop_constraint("uq_system_task", type_="unique")
|
|
84
|
+
batch_op.drop_column("entity_type")
|
|
85
|
+
batch_op.alter_column(
|
|
86
|
+
"entity_id",
|
|
87
|
+
new_column_name="file_id",
|
|
88
|
+
existing_type=sa.BigInteger(),
|
|
89
|
+
nullable=False,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
with op.batch_alter_table(
|
|
93
|
+
"f_system_task", naming_convention=_NAMING_CONVENTION
|
|
94
|
+
) as batch_op:
|
|
95
|
+
batch_op.create_unique_constraint(
|
|
96
|
+
"uq_system_task", ["user_id", "file_id", "task_type", "key"]
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
op.create_index(
|
|
100
|
+
op.f("ix_f_system_task_file_id"),
|
|
101
|
+
"f_system_task",
|
|
102
|
+
["file_id"],
|
|
103
|
+
unique=False,
|
|
104
|
+
)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"""add rapid log diff table
|
|
2
|
+
|
|
3
|
+
Revision ID: f4d5e6f7a8b9
|
|
4
|
+
Revises: f3c4d5e6f7a8
|
|
5
|
+
Create Date: 2026-11-29 23:48:00.000000
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from collections.abc import Sequence
|
|
10
|
+
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
from alembic import op
|
|
13
|
+
|
|
14
|
+
revision: str = "f4d5e6f7a8b9"
|
|
15
|
+
down_revision: str | Sequence[str] | None = "f3c4d5e6f7a8"
|
|
16
|
+
branch_labels: str | Sequence[str] | None = None
|
|
17
|
+
depends_on: str | Sequence[str] | None = None
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def upgrade() -> None:
|
|
21
|
+
"""Create `f_rapid_log_diff` append-only diff ledger table and indexes."""
|
|
22
|
+
op.create_table(
|
|
23
|
+
"f_rapid_log_diff",
|
|
24
|
+
sa.Column("user_id", sa.BigInteger(), nullable=False),
|
|
25
|
+
sa.Column("id", sa.BigInteger(), nullable=False),
|
|
26
|
+
sa.Column("timestamp_ms", sa.BigInteger(), nullable=False),
|
|
27
|
+
sa.Column("file_id", sa.BigInteger(), nullable=False),
|
|
28
|
+
sa.Column("page_id", sa.String(), nullable=False),
|
|
29
|
+
sa.Column("page_index", sa.Integer(), nullable=True),
|
|
30
|
+
sa.Column("change_type", sa.String(length=32), nullable=False),
|
|
31
|
+
sa.Column("kind", sa.String(length=16), nullable=False),
|
|
32
|
+
sa.Column("text", sa.Text(), nullable=False),
|
|
33
|
+
sa.Column("previous_text", sa.Text(), nullable=True),
|
|
34
|
+
sa.Column("parent_text", sa.Text(), nullable=True),
|
|
35
|
+
sa.Column("before_state", sa.String(length=32), nullable=True),
|
|
36
|
+
sa.Column("after_state", sa.String(length=32), nullable=True),
|
|
37
|
+
sa.Column("before_starred", sa.Boolean(), nullable=False),
|
|
38
|
+
sa.Column("after_starred", sa.Boolean(), nullable=False),
|
|
39
|
+
sa.Column("before_cancelled", sa.Boolean(), nullable=False),
|
|
40
|
+
sa.Column("after_cancelled", sa.Boolean(), nullable=False),
|
|
41
|
+
sa.Column("line_number", sa.Integer(), nullable=False),
|
|
42
|
+
sa.PrimaryKeyConstraint("user_id", "id"),
|
|
43
|
+
)
|
|
44
|
+
op.create_index(
|
|
45
|
+
"ix_f_rapid_log_diff_user_ts",
|
|
46
|
+
"f_rapid_log_diff",
|
|
47
|
+
["user_id", "timestamp_ms"],
|
|
48
|
+
unique=False,
|
|
49
|
+
)
|
|
50
|
+
op.create_index(
|
|
51
|
+
"ix_f_rapid_log_diff_user_file_ts",
|
|
52
|
+
"f_rapid_log_diff",
|
|
53
|
+
["user_id", "file_id", "timestamp_ms"],
|
|
54
|
+
unique=False,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def downgrade() -> None:
|
|
59
|
+
"""Drop `f_rapid_log_diff` table and indexes."""
|
|
60
|
+
op.drop_index("ix_f_rapid_log_diff_user_file_ts", table_name="f_rapid_log_diff")
|
|
61
|
+
op.drop_index("ix_f_rapid_log_diff_user_ts", table_name="f_rapid_log_diff")
|
|
62
|
+
op.drop_table("f_rapid_log_diff")
|