MetaList 0.3.9__tar.gz → 0.3.11__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.
- {metalist-0.3.9/metalist.egg-info → metalist-0.3.11}/PKG-INFO +5 -64
- {metalist-0.3.9 → metalist-0.3.11}/README.md +4 -63
- {metalist-0.3.9 → metalist-0.3.11}/app/api/middleware/auth.py +4 -3
- {metalist-0.3.9 → metalist-0.3.11}/app/api/routes/auth.py +14 -8
- {metalist-0.3.9 → metalist-0.3.11}/app/api/routes/backups.py +34 -26
- {metalist-0.3.9 → metalist-0.3.11}/app/api/routes/notes.py +53 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/main.py +3 -31
- {metalist-0.3.9 → metalist-0.3.11}/app/server_runtime.py +8 -91
- {metalist-0.3.9 → metalist-0.3.11}/app/services/client_state_service.py +3 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/content_formatting.py +182 -6
- {metalist-0.3.9 → metalist-0.3.11}/app/services/embedded_references.py +10 -3
- {metalist-0.3.9 → metalist-0.3.11}/app/services/html_export.py +2 -2
- {metalist-0.3.9 → metalist-0.3.11}/app/services/hydration_state.py +10 -0
- metalist-0.3.11/app/services/image_size_formatting.py +325 -0
- metalist-0.3.11/app/services/inline_image_occurrences.py +31 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/namespace_deletion_worker.py +1 -3
- {metalist-0.3.9 → metalist-0.3.11}/app/services/namespace_rename_worker.py +0 -2
- {metalist-0.3.9 → metalist-0.3.11}/app/services/namespace_switcher.py +80 -68
- {metalist-0.3.9 → metalist-0.3.11}/app/services/ontology_rules_store.py +15 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/query_service.py +0 -2
- metalist-0.3.11/app/services/runtime_lock.py +65 -0
- metalist-0.3.11/app/services/selected_text_tag.py +129 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/snapshot.py +0 -2
- {metalist-0.3.9 → metalist-0.3.11}/app/services/sync_state.py +8 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/tokens.py +4 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/undo_state.py +5 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/startup_sanity_config.py +1 -1
- {metalist-0.3.9 → metalist-0.3.11}/app/static/config/command_palette_tags.json +6 -6
- {metalist-0.3.9 → metalist-0.3.11}/app/static/css/main.css +244 -159
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/api-client.js +34 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/command-palette/command-palette-controller.js +57 -11
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/command-palette/endpoint-registry.js +59 -14
- metalist-0.3.11/app/static/js/modules/command-palette/note-layout-preferences.js +66 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/command-palette/preferences-store.js +20 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/config.js +2 -3
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/context-menu/context-menu-registry.js +135 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/context-menu/context-menu-service.js +232 -12
- metalist-0.3.11/app/static/js/modules/context-menu/context-menu-target-service.js +6 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/backup-restore-modal.js +15 -7
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/backup-result-modal.js +1 -1
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/backup-retention-modal.js +2 -2
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/backup-settings-modal.js +1 -1
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/base-modal.js +28 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/delete-namespace-modal.js +2 -6
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/help-modal.js +7 -13
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/namespace-modals.js +3 -28
- metalist-0.3.11/app/static/js/modules/modals/note-layout-appearance-modal.js +169 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/password-modal.js +1 -4
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/reminder-modal.js +1 -1
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/sound-manager-modal.js +1 -1
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/version-info-modal.js +1 -1
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/actions/note-actions.js +86 -3
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/events/context-menu-events.js +249 -75
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/events/keyboard-events.js +261 -311
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/events/mouse-events.js +6 -4
- metalist-0.3.11/app/static/js/modules/mode-manager/services/add-style-service.js +170 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/clipboard-shortcut-policy-service.js +30 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/context-menu-target-service.js +4 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/differential-view-service.js +2 -8
- metalist-0.3.11/app/static/js/modules/mode-manager/services/file-drop-policy-service.js +33 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/image-context-menu-action-service.js +37 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/image-file-insert-choice-modal-service.js +6 -0
- metalist-0.3.11/app/static/js/modules/mode-manager/services/note-delete-shortcut-policy-service.js +31 -0
- metalist-0.3.11/app/static/js/modules/mode-manager/services/remove-formatting-service.js +502 -0
- metalist-0.3.11/app/static/js/modules/mode-manager/services/selected-formatting-removal-service.js +207 -0
- metalist-0.3.11/app/static/js/modules/mode-manager/services/selected-text-tag-service.js +63 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/tag-syntax-service.js +12 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/templates/notes_list.html +1 -5
- metalist-0.3.11/app/usecases/add_selected_text_tag.py +104 -0
- metalist-0.3.11/app/usecases/resize_image.py +83 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/unformat_content.py +12 -3
- {metalist-0.3.9 → metalist-0.3.11}/app/version.py +1 -1
- {metalist-0.3.9 → metalist-0.3.11}/convert-from-legacy.py +2 -16
- {metalist-0.3.9 → metalist-0.3.11}/main.py +19 -172
- {metalist-0.3.9 → metalist-0.3.11/metalist.egg-info}/PKG-INFO +5 -64
- {metalist-0.3.9 → metalist-0.3.11}/metalist.egg-info/SOURCES.txt +15 -13
- {metalist-0.3.9 → metalist-0.3.11}/metalist.egg-info/entry_points.txt +0 -1
- metalist-0.3.11/metalist.egg-info/top_level.txt +2 -0
- {metalist-0.3.9 → metalist-0.3.11}/pyproject.toml +1 -2
- metalist-0.3.9/app/api/routes/mcp.py +0 -30
- metalist-0.3.9/app/api/routes/memory.py +0 -107
- metalist-0.3.9/app/mcp/__init__.py +0 -2
- metalist-0.3.9/app/mcp/__main__.py +0 -8
- metalist-0.3.9/app/mcp/errors.py +0 -18
- metalist-0.3.9/app/mcp/policy.py +0 -55
- metalist-0.3.9/app/mcp/read_service.py +0 -1124
- metalist-0.3.9/app/mcp/server.py +0 -230
- metalist-0.3.9/app/mcp/tools.py +0 -480
- metalist-0.3.9/app/services/memory.py +0 -9
- metalist-0.3.9/app/services/memory_service.py +0 -213
- metalist-0.3.9/app/static/js/modules/modals/memory-modal.js +0 -282
- metalist-0.3.9/mcp_client.py +0 -10083
- metalist-0.3.9/metalist.egg-info/top_level.txt +0 -3
- {metalist-0.3.9 → metalist-0.3.11}/MANIFEST.in +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/__init__.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/api/__init__.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/api/deps.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/api/dev.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/api/request_auth.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/api/routes/files.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/api/routes/ontology.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/api/routes/reminders.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/api/routes/sounds.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/api/routes/test.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/api/transactions.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/config.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/__init__.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/backup_settings_sql.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/engine.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/file_schema.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/file_session.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/files_sql.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/link_titles_sql.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/migrations.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/notes_sql.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/ontology_rules_sql.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/reminders_sql.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/schema.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/search_history_sql.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/session.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/settings_sql.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/sounds_sql.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/db/tab_state_sql.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/encryption_audit.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/models/commands.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/models/database.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/models/entities.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/models/enums.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/models/linked_list.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/models/list_operations.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/models/list_traversal.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/models/note_crud.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/models/utils.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/presentation/__init__.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/presentation/render/__init__.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/presentation/render/note_renderer.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/presentation/templates.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/security/encryption.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/__init__.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/auth.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/auth_cache_state.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/auth_service.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/backlinks.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/backup_service.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/backup_settings_service.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/base_service.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/content_cache.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/date_filtering.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/dependencies.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/diagnostics.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/encryption.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/exception_capture.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/file_registry.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/file_storage.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/html_unformatting.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/integrity.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/latex_rendering.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/link_titles.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/login_rate_limit.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/maintenance_mode.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/markdown_rendering.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/namespace_deletion_jobs.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/namespace_rename_jobs.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/note_image_tags.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/note_service.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/note_store.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/reminders.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/root_sorting.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/runtime_hardening.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/search_history.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/search_index.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/search_query.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/search_text.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/self_update.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/session_timeout_service.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/shell_session_service.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/sound_storage.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/store.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/sync.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/tab_state.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/tag_case.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/tag_ontology.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/tag_rename.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/tag_suggestions.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/tag_term_matching.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/test_reset.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/transaction_manager.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/undo_service.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/view_cache.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/view_diff.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/view_state.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/services/windows_process_control.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/startup_js_sanity.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/startup_sanity.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/css/forms.css +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/img/favicon.ico +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/locked.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/main.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/activity-tracker.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/async-result.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/auth.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/client-state-api.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/client-state-migration.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/command-palette/click-activation-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/command-palette/tag-config-loader.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/command-palette/usage-store.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/connectivity-monitor.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/context-menu/input-caret-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/dom-utils-fixed.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/dom-utils.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/editor-commands.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/editor-selection.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/editor-toolbar.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/error-handler.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/error-overlay.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/location-flags.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/login-namespace-picker.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/alphabetize-root-notes-modal.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/delete-namespace-validation.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/namespace-loading-page.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/namespace-ports-profile.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/namespace-rename-validation.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/ontology-modal.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/prioritize-modal.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/random-password-modal.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/reset-updated-at-modal.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/modals/session-timeout-modal.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/actions/content-actions.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/actions/history-actions.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/actions/search-actions.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/actions/selection-actions.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/actions/ui-actions.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/events/focus-events.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/events/inactivity-events.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/events/input-events.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/events/search-events.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/mode-context.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/mode-logger.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/mode-manager-controller.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/animated-scroll-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/backlinks-panel-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/collapse-affordance-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/collapse-editing-policy-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/command-gate-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/date-filter-indicator-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/date-filter-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/edit-session-collapse-policy-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/edit-session-collapse-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/embedded-image-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/file-image-preview-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/file-reference-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/filtered-refresh-selection-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/html-paste-sanitizer-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/infinite-scroll-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/link-context-menu-action-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/markdown-render-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/note-click-target-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/note-clipboard-write-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/note-collapse-animation-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/note-context-menu-action-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/note-drag-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/note-reposition-animation-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/note-split-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/password-clipboard-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/polling-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/rhs-panel-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/root-date-separator-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/root-sort-indicator-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/root-sort-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/scroll-anchor-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/scroll-restoration-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/scroll-to-top-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/search-contexts-overlay-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/search-debounce-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/search-input-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/search-interaction-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/search-redaction-reveal-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/search-suggestions-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/search-syntax-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/shell-output-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/tab-dom-cache-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/tab-duplication-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/tab-state-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/tag-bar-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/tag-suggestions-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/todo-toggle-editing-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/mode-manager/services/view-mode-search-shortcut-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/password-generator.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/reminder-store.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/reminder-surface-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/selection-markers.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/session-auth.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/sound-service.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/tag-token.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/modules/uuid.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/namespace-deleted.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/namespace-renamed.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/js/vendor/markdown-it.min.js +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/static/video/login-startup.mp4 +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/templates/base.html +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/templates/index.html +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/templates/locked.html +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/templates/maintenance.html +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/templates/namespace_deleted.html +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/templates/namespace_renamed.html +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/__init__.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/alphabetize_root_notes.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/base.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/collapse.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/copy_note.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/create_child.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/create_note.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/create_sibling.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/delete_subtree.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/expand.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/indent.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/lock.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/move.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/move_to_top.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/outdent.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/paste_child.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/paste_sibling.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/prioritize.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/record_edit_mode.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/redo.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/rename_tag.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/reset_updated_at.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/run_shell.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/search_comment_autofill.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/search_context_tags.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/set_collapse_bulk.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/set_collapse_in_context.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/split_note.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/toggle_reference_mode.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/toggle_todo_done.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/undo.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/update_content.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/usecases/view.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/utils/__init__.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/utils/encryption.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/app/utils/text_utils.py +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/metalist.egg-info/dependency_links.txt +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/metalist.egg-info/requires.txt +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/scripts/generate-lan-cert.sh +0 -0
- {metalist-0.3.9 → metalist-0.3.11}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: metalist
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.11
|
|
4
4
|
Summary: A minimalist single-user note-taking app with SSR, fast in-memory tree operations, and efficient sync.
|
|
5
5
|
Project-URL: Homepage, https://github.com/evolvingstuff/metalist
|
|
6
6
|
Project-URL: Repository, https://github.com/evolvingstuff/metalist
|
|
@@ -35,7 +35,7 @@ A minimalist single-user note-taking app focused on server-side rendering (SSR),
|
|
|
35
35
|
- Rich text editing (ContentEditable) with image support
|
|
36
36
|
- Drag-and-drop note reordering
|
|
37
37
|
- Real-time content saving
|
|
38
|
-
- Keyboard shortcuts (press `?` in the app)
|
|
38
|
+
- Keyboard shortcuts / cheatsheet (press `?` in the app)
|
|
39
39
|
- Linked-list ordering model for efficient reorders
|
|
40
40
|
- Optional password protection + encryption at rest (AES-GCM)
|
|
41
41
|
- Multi-tab search contexts with server-persisted scroll/search state (survives browser restarts)
|
|
@@ -119,12 +119,10 @@ Useful env flags:
|
|
|
119
119
|
- `METALIST_HOST=0.0.0.0` (default): bind the main app to a different interface such as `127.0.0.1`
|
|
120
120
|
- `METALIST_PORT=8000` (default): bind the main app to a different port
|
|
121
121
|
- `METALIST_HTTPS_PORT=8443`: override the HTTPS port when TLS is enabled
|
|
122
|
-
- `MCP_AGENT_WEB_PORT=8765` (default): bind the MCP sidecar web UI to a different port
|
|
123
122
|
- `METALIST_TLS_CERT=/path/to/fullchain.pem` + `METALIST_TLS_KEY=/path/to/privkey.pem`: override TLS paths
|
|
124
123
|
- `METALIST_AUTO_GENERATE_TLS=0`: disable automatic creation of the default self-signed TLS pair
|
|
125
124
|
- default TLS paths: `~/MetaList/certs/metalist-cert.pem` and `~/MetaList/certs/metalist-key.pem`
|
|
126
125
|
- `METALIST_FORWARDED_ALLOW_IPS=127.0.0.1,::1` (default): trust proxy headers only from those reverse-proxy IPs
|
|
127
|
-
- `MCP_AGENT_PUBLIC_ORIGIN=https://notes.example.com:8765`: public origin for the MCP sidecar redirect when it is exposed behind HTTPS or a separate hostname/port
|
|
128
126
|
|
|
129
127
|
### Remote Access / HTTPS
|
|
130
128
|
Plain LAN or VPN HTTP works with a normal PyCharm run:
|
|
@@ -135,7 +133,7 @@ On a fresh machine, that first launch also creates the default TLS cert pair aut
|
|
|
135
133
|
|
|
136
134
|
Namespaced launch example:
|
|
137
135
|
```bash
|
|
138
|
-
metalist --namespace work --port 8001
|
|
136
|
+
metalist --namespace work --port 8001
|
|
139
137
|
```
|
|
140
138
|
This starts a separate process backed by `~/MetaList/namespaces/work/work.metalist.db` on `http://127.0.0.1:8001`.
|
|
141
139
|
Its backup snapshots live under `~/MetaList/namespaces/work/backups/` with filenames like `work-<timestamp>.metalist-backup.tar.gz`. New backups are versioned `.tar.gz` workspace archives; legacy `.bak` backups remain restorable.
|
|
@@ -144,7 +142,7 @@ After you launch a namespace once with explicit ports, MetaList remembers them i
|
|
|
144
142
|
```bash
|
|
145
143
|
metalist work
|
|
146
144
|
```
|
|
147
|
-
and MetaList will reuse the saved HTTP / HTTPS
|
|
145
|
+
and MetaList will reuse the saved HTTP / HTTPS ports for `work`. The same applies to the default namespace: `metalist` will reuse the saved default-namespace profile.
|
|
148
146
|
|
|
149
147
|
Equivalent explicit launch, if you want it:
|
|
150
148
|
```bash
|
|
@@ -182,63 +180,6 @@ METALIST_FORWARDED_ALLOW_IPS=127.0.0.1,::1 \
|
|
|
182
180
|
metalist
|
|
183
181
|
```
|
|
184
182
|
|
|
185
|
-
If you do not need the MCP sidecar remotely, disable it:
|
|
186
|
-
```bash
|
|
187
|
-
MCP_AGENT_WEB_ENABLED=0 metalist
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
### MCP (Phase 1 Read-Only)
|
|
191
|
-
MCP is available automatically when you run:
|
|
192
|
-
```bash
|
|
193
|
-
metalist
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
`metalist` also auto-starts the agent web app sidecar and prints:
|
|
197
|
-
- `Agent web app: http://127.0.0.1:8765`
|
|
198
|
-
- The sidecar default MCP URL follows the resolved MetaList HTTP port for the current process.
|
|
199
|
-
- Use `--mcp-port` when you want multiple MetaList instances to auto-start sidecars without colliding on `8765`.
|
|
200
|
-
- On startup, local Ollama (`127.0.0.1`) is reset by default so a fresh runner is used.
|
|
201
|
-
- Sidecar Ollama auto-start uses `OLLAMA_CONTEXT_LENGTH=16384` by default.
|
|
202
|
-
|
|
203
|
-
Manual web mode (optional):
|
|
204
|
-
```bash
|
|
205
|
-
metalist-mcp web --port 8765
|
|
206
|
-
```
|
|
207
|
-
Then open `http://127.0.0.1:8765`.
|
|
208
|
-
|
|
209
|
-
Run direct MCP CLI calls:
|
|
210
|
-
```bash
|
|
211
|
-
metalist-mcp cli tools/list
|
|
212
|
-
metalist-mcp cli tools/call health_check '{}'
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
Compatibility shortcut (still works):
|
|
216
|
-
```bash
|
|
217
|
-
python mcp_client.py tools/list
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
Disable auto sidecar if needed:
|
|
221
|
-
```bash
|
|
222
|
-
MCP_AGENT_WEB_ENABLED=0 metalist
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
Control Ollama startup behavior:
|
|
226
|
-
```bash
|
|
227
|
-
# disable Ollama reset-on-start (default is enabled)
|
|
228
|
-
MCP_AGENT_RESET_OLLAMA_ON_START=0 metalist
|
|
229
|
-
|
|
230
|
-
# override auto-start context length (default 16384)
|
|
231
|
-
MCP_AGENT_OLLAMA_CONTEXT_LENGTH=32768 metalist
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
Optional: direct stdio transport (advanced/manual):
|
|
235
|
-
```bash
|
|
236
|
-
python -m app.mcp
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
Tool catalog and schemas:
|
|
240
|
-
- `docs/mcp_tools.md`
|
|
241
|
-
|
|
242
183
|
### Legacy Import
|
|
243
184
|
`convert-from-legacy.py` replaces the SQLite database referenced by `app.config.DATABASE_URL`, clears its files/sounds sidecar, and imports notes from a legacy JSON export.
|
|
244
185
|
|
|
@@ -254,7 +195,7 @@ Target a namespaced database during import:
|
|
|
254
195
|
convert-from-legacy.py --namespace work --input /path/to/legacy-export.json
|
|
255
196
|
```
|
|
256
197
|
|
|
257
|
-
If `--namespace`, `--port`,
|
|
198
|
+
If `--namespace`, `--port`, or `--https-port` are omitted, the import script prompts for them and saves the resulting launch profile inside the target namespace DB. That means a one-time import into `work` can immediately seed later shorthand launches like `metalist work`.
|
|
258
199
|
|
|
259
200
|
### Publishing
|
|
260
201
|
For the real user-facing install flow:
|
|
@@ -6,7 +6,7 @@ A minimalist single-user note-taking app focused on server-side rendering (SSR),
|
|
|
6
6
|
- Rich text editing (ContentEditable) with image support
|
|
7
7
|
- Drag-and-drop note reordering
|
|
8
8
|
- Real-time content saving
|
|
9
|
-
- Keyboard shortcuts (press `?` in the app)
|
|
9
|
+
- Keyboard shortcuts / cheatsheet (press `?` in the app)
|
|
10
10
|
- Linked-list ordering model for efficient reorders
|
|
11
11
|
- Optional password protection + encryption at rest (AES-GCM)
|
|
12
12
|
- Multi-tab search contexts with server-persisted scroll/search state (survives browser restarts)
|
|
@@ -90,12 +90,10 @@ Useful env flags:
|
|
|
90
90
|
- `METALIST_HOST=0.0.0.0` (default): bind the main app to a different interface such as `127.0.0.1`
|
|
91
91
|
- `METALIST_PORT=8000` (default): bind the main app to a different port
|
|
92
92
|
- `METALIST_HTTPS_PORT=8443`: override the HTTPS port when TLS is enabled
|
|
93
|
-
- `MCP_AGENT_WEB_PORT=8765` (default): bind the MCP sidecar web UI to a different port
|
|
94
93
|
- `METALIST_TLS_CERT=/path/to/fullchain.pem` + `METALIST_TLS_KEY=/path/to/privkey.pem`: override TLS paths
|
|
95
94
|
- `METALIST_AUTO_GENERATE_TLS=0`: disable automatic creation of the default self-signed TLS pair
|
|
96
95
|
- default TLS paths: `~/MetaList/certs/metalist-cert.pem` and `~/MetaList/certs/metalist-key.pem`
|
|
97
96
|
- `METALIST_FORWARDED_ALLOW_IPS=127.0.0.1,::1` (default): trust proxy headers only from those reverse-proxy IPs
|
|
98
|
-
- `MCP_AGENT_PUBLIC_ORIGIN=https://notes.example.com:8765`: public origin for the MCP sidecar redirect when it is exposed behind HTTPS or a separate hostname/port
|
|
99
97
|
|
|
100
98
|
### Remote Access / HTTPS
|
|
101
99
|
Plain LAN or VPN HTTP works with a normal PyCharm run:
|
|
@@ -106,7 +104,7 @@ On a fresh machine, that first launch also creates the default TLS cert pair aut
|
|
|
106
104
|
|
|
107
105
|
Namespaced launch example:
|
|
108
106
|
```bash
|
|
109
|
-
metalist --namespace work --port 8001
|
|
107
|
+
metalist --namespace work --port 8001
|
|
110
108
|
```
|
|
111
109
|
This starts a separate process backed by `~/MetaList/namespaces/work/work.metalist.db` on `http://127.0.0.1:8001`.
|
|
112
110
|
Its backup snapshots live under `~/MetaList/namespaces/work/backups/` with filenames like `work-<timestamp>.metalist-backup.tar.gz`. New backups are versioned `.tar.gz` workspace archives; legacy `.bak` backups remain restorable.
|
|
@@ -115,7 +113,7 @@ After you launch a namespace once with explicit ports, MetaList remembers them i
|
|
|
115
113
|
```bash
|
|
116
114
|
metalist work
|
|
117
115
|
```
|
|
118
|
-
and MetaList will reuse the saved HTTP / HTTPS
|
|
116
|
+
and MetaList will reuse the saved HTTP / HTTPS ports for `work`. The same applies to the default namespace: `metalist` will reuse the saved default-namespace profile.
|
|
119
117
|
|
|
120
118
|
Equivalent explicit launch, if you want it:
|
|
121
119
|
```bash
|
|
@@ -153,63 +151,6 @@ METALIST_FORWARDED_ALLOW_IPS=127.0.0.1,::1 \
|
|
|
153
151
|
metalist
|
|
154
152
|
```
|
|
155
153
|
|
|
156
|
-
If you do not need the MCP sidecar remotely, disable it:
|
|
157
|
-
```bash
|
|
158
|
-
MCP_AGENT_WEB_ENABLED=0 metalist
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### MCP (Phase 1 Read-Only)
|
|
162
|
-
MCP is available automatically when you run:
|
|
163
|
-
```bash
|
|
164
|
-
metalist
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
`metalist` also auto-starts the agent web app sidecar and prints:
|
|
168
|
-
- `Agent web app: http://127.0.0.1:8765`
|
|
169
|
-
- The sidecar default MCP URL follows the resolved MetaList HTTP port for the current process.
|
|
170
|
-
- Use `--mcp-port` when you want multiple MetaList instances to auto-start sidecars without colliding on `8765`.
|
|
171
|
-
- On startup, local Ollama (`127.0.0.1`) is reset by default so a fresh runner is used.
|
|
172
|
-
- Sidecar Ollama auto-start uses `OLLAMA_CONTEXT_LENGTH=16384` by default.
|
|
173
|
-
|
|
174
|
-
Manual web mode (optional):
|
|
175
|
-
```bash
|
|
176
|
-
metalist-mcp web --port 8765
|
|
177
|
-
```
|
|
178
|
-
Then open `http://127.0.0.1:8765`.
|
|
179
|
-
|
|
180
|
-
Run direct MCP CLI calls:
|
|
181
|
-
```bash
|
|
182
|
-
metalist-mcp cli tools/list
|
|
183
|
-
metalist-mcp cli tools/call health_check '{}'
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
Compatibility shortcut (still works):
|
|
187
|
-
```bash
|
|
188
|
-
python mcp_client.py tools/list
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
Disable auto sidecar if needed:
|
|
192
|
-
```bash
|
|
193
|
-
MCP_AGENT_WEB_ENABLED=0 metalist
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Control Ollama startup behavior:
|
|
197
|
-
```bash
|
|
198
|
-
# disable Ollama reset-on-start (default is enabled)
|
|
199
|
-
MCP_AGENT_RESET_OLLAMA_ON_START=0 metalist
|
|
200
|
-
|
|
201
|
-
# override auto-start context length (default 16384)
|
|
202
|
-
MCP_AGENT_OLLAMA_CONTEXT_LENGTH=32768 metalist
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
Optional: direct stdio transport (advanced/manual):
|
|
206
|
-
```bash
|
|
207
|
-
python -m app.mcp
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
Tool catalog and schemas:
|
|
211
|
-
- `docs/mcp_tools.md`
|
|
212
|
-
|
|
213
154
|
### Legacy Import
|
|
214
155
|
`convert-from-legacy.py` replaces the SQLite database referenced by `app.config.DATABASE_URL`, clears its files/sounds sidecar, and imports notes from a legacy JSON export.
|
|
215
156
|
|
|
@@ -225,7 +166,7 @@ Target a namespaced database during import:
|
|
|
225
166
|
convert-from-legacy.py --namespace work --input /path/to/legacy-export.json
|
|
226
167
|
```
|
|
227
168
|
|
|
228
|
-
If `--namespace`, `--port`,
|
|
169
|
+
If `--namespace`, `--port`, or `--https-port` are omitted, the import script prompts for them and saves the resulting launch profile inside the target namespace DB. That means a one-time import into `work` can immediately seed later shorthand launches like `metalist work`.
|
|
229
170
|
|
|
230
171
|
### Publishing
|
|
231
172
|
For the real user-facing install flow:
|
|
@@ -7,6 +7,7 @@ from app.api.request_auth import read_request_auth_token
|
|
|
7
7
|
from app.services.tokens import token_service
|
|
8
8
|
from app.services.auth_service import AuthService
|
|
9
9
|
from app.services.maintenance_mode import maintenance_service
|
|
10
|
+
from app.services.runtime_lock import purge_decrypted_runtime_state
|
|
10
11
|
from app.models.database import SafeSession
|
|
11
12
|
from app.config import API_PREFIX, TEST_MODE
|
|
12
13
|
|
|
@@ -21,9 +22,6 @@ class AuthMiddleware(BaseHTTPMiddleware):
|
|
|
21
22
|
f"{API_PREFIX}/auth/session",
|
|
22
23
|
f"{API_PREFIX}/auth/namespaces/delete-jobs/",
|
|
23
24
|
f"{API_PREFIX}/auth/namespaces/rename-jobs/",
|
|
24
|
-
f"{API_PREFIX}/mcp",
|
|
25
|
-
"/mcp-client-v2",
|
|
26
|
-
"/mcp-client",
|
|
27
25
|
"/namespace-deleted",
|
|
28
26
|
"/namespace-renamed",
|
|
29
27
|
"/static/", # CSS/JS files needed for login page
|
|
@@ -51,6 +49,9 @@ class AuthMiddleware(BaseHTTPMiddleware):
|
|
|
51
49
|
"""Check authentication for protected routes."""
|
|
52
50
|
path = request.url.path
|
|
53
51
|
|
|
52
|
+
if not token_service.has_active_tokens():
|
|
53
|
+
purge_decrypted_runtime_state()
|
|
54
|
+
|
|
54
55
|
# Block any v1 API usage with an explicit 410 Gone (no DB access)
|
|
55
56
|
if path.startswith('/api') and not (path.startswith(API_PREFIX) or path == API_PREFIX):
|
|
56
57
|
ref = request.headers.get('referer', '-')
|
|
@@ -52,6 +52,7 @@ from app.services.namespace_switcher import save_namespace_port_profiles
|
|
|
52
52
|
from app.services.namespace_deletion_jobs import load_namespace_deletion_job
|
|
53
53
|
from app.services.namespace_rename_jobs import load_namespace_rename_job
|
|
54
54
|
from app.server_runtime import NamespaceLaunchProfile
|
|
55
|
+
from app.server_runtime import load_all_namespace_launch_profiles
|
|
55
56
|
from app.server_runtime import resolve_namespace_directory
|
|
56
57
|
from app.server_runtime import resolve_namespaced_database_path
|
|
57
58
|
from app.server_runtime import validate_namespace
|
|
@@ -67,6 +68,7 @@ from app.services.link_titles import link_title_store
|
|
|
67
68
|
from app.services.reminders import reminder_store
|
|
68
69
|
from app.services.search_history import search_history_store
|
|
69
70
|
from app.services.sound_storage import sound_store
|
|
71
|
+
from app.services.runtime_lock import purge_decrypted_runtime_state
|
|
70
72
|
from app.services.hydration_state import hydration_state
|
|
71
73
|
from app.services.file_registry import file_registry
|
|
72
74
|
from app.services.file_storage import bootstrap_file_registry
|
|
@@ -681,8 +683,9 @@ def logout(
|
|
|
681
683
|
token: Annotated[str, Depends(_require_auth)],
|
|
682
684
|
):
|
|
683
685
|
token_service.revoke_token(token)
|
|
684
|
-
|
|
685
|
-
|
|
686
|
+
if not purge_decrypted_runtime_state():
|
|
687
|
+
clear_all_locks()
|
|
688
|
+
clear_encryption_key()
|
|
686
689
|
clear_auth_cookie(response=response)
|
|
687
690
|
return {"message": "Logout successful"}
|
|
688
691
|
|
|
@@ -882,7 +885,6 @@ def open_namespace(
|
|
|
882
885
|
namespace = _require_string_field(body, "namespace")
|
|
883
886
|
port = _require_int_field(body, "port")
|
|
884
887
|
https_port = _optional_int_field(body, "https_port")
|
|
885
|
-
mcp_port = _require_int_field(body, "mcp_port")
|
|
886
888
|
launch_capture = CapturedExceptionContext(
|
|
887
889
|
RuntimeError,
|
|
888
890
|
ValueError,
|
|
@@ -897,7 +899,6 @@ def open_namespace(
|
|
|
897
899
|
namespace=namespace,
|
|
898
900
|
port=port,
|
|
899
901
|
https_port=https_port,
|
|
900
|
-
mcp_port=mcp_port,
|
|
901
902
|
)
|
|
902
903
|
if launch_capture.captured_exception is not None:
|
|
903
904
|
exc = launch_capture.captured_exception
|
|
@@ -912,7 +913,6 @@ def open_namespace(
|
|
|
912
913
|
"namespace": result.saved_profile.namespace,
|
|
913
914
|
"port": result.saved_profile.port,
|
|
914
915
|
"https_port": result.saved_profile.https_port,
|
|
915
|
-
"mcp_port": result.saved_profile.mcp_port,
|
|
916
916
|
},
|
|
917
917
|
"saved_for_next_launch": result.saved_for_next_launch,
|
|
918
918
|
"message": result.message,
|
|
@@ -927,6 +927,10 @@ def save_namespace_ports(
|
|
|
927
927
|
):
|
|
928
928
|
body = _require_body_object(payload)
|
|
929
929
|
raw_profiles = _require_list_field(body, "profiles")
|
|
930
|
+
saved_profiles = {
|
|
931
|
+
profile.namespace: profile
|
|
932
|
+
for profile in load_all_namespace_launch_profiles()
|
|
933
|
+
}
|
|
930
934
|
requested_profiles: list[NamespaceLaunchProfile] = []
|
|
931
935
|
for raw_profile in raw_profiles:
|
|
932
936
|
if not isinstance(raw_profile, dict):
|
|
@@ -934,13 +938,16 @@ def save_namespace_ports(
|
|
|
934
938
|
namespace = _require_string_field(raw_profile, "namespace")
|
|
935
939
|
port = _require_int_field(raw_profile, "port")
|
|
936
940
|
https_port = _optional_int_field(raw_profile, "https_port")
|
|
937
|
-
|
|
941
|
+
saved_profile = saved_profiles.get(namespace)
|
|
942
|
+
legacy_mcp_port = None
|
|
943
|
+
if saved_profile is not None:
|
|
944
|
+
legacy_mcp_port = saved_profile.mcp_port
|
|
938
945
|
requested_profiles.append(
|
|
939
946
|
NamespaceLaunchProfile(
|
|
940
947
|
namespace=namespace,
|
|
941
948
|
port=port,
|
|
942
949
|
https_port=https_port,
|
|
943
|
-
mcp_port=
|
|
950
|
+
mcp_port=legacy_mcp_port,
|
|
944
951
|
)
|
|
945
952
|
)
|
|
946
953
|
|
|
@@ -968,7 +975,6 @@ def save_namespace_ports(
|
|
|
968
975
|
"namespace": profile.namespace,
|
|
969
976
|
"port": profile.port,
|
|
970
977
|
"https_port": profile.https_port,
|
|
971
|
-
"mcp_port": profile.mcp_port,
|
|
972
978
|
}
|
|
973
979
|
for profile in result.saved_profiles
|
|
974
980
|
],
|
|
@@ -33,7 +33,6 @@ from app.services.backup_service import (
|
|
|
33
33
|
)
|
|
34
34
|
from app.server_runtime import NamespaceLaunchProfile
|
|
35
35
|
from app.server_runtime import _DEFAULT_HTTP_PORT
|
|
36
|
-
from app.server_runtime import _DEFAULT_MCP_AGENT_WEB_PORT
|
|
37
36
|
from app.server_runtime import load_all_namespace_launch_profiles
|
|
38
37
|
from app.server_runtime import load_namespace_launch_profile
|
|
39
38
|
from app.server_runtime import resolve_namespace_directory
|
|
@@ -113,13 +112,11 @@ class BackupRestoreRequest(BaseModel):
|
|
|
113
112
|
class BackupRestoreLaunchProfileRequest(BaseModel):
|
|
114
113
|
port: int
|
|
115
114
|
https_port: int | None
|
|
116
|
-
mcp_port: int
|
|
117
115
|
|
|
118
116
|
|
|
119
117
|
class BackupRestoreLaunchProfileResponse(BaseModel):
|
|
120
118
|
port: int
|
|
121
119
|
https_port: int | None
|
|
122
|
-
mcp_port: int
|
|
123
120
|
|
|
124
121
|
|
|
125
122
|
class BackupRestorePreflightResponse(BaseModel):
|
|
@@ -193,13 +190,16 @@ def _serialize_settings_response(settings: dict[str, object]) -> BackupSettingsR
|
|
|
193
190
|
raise RuntimeError("backup settings selected_namespaces entries must be strings")
|
|
194
191
|
normalized_selected_namespaces.append(validate_namespace(namespace=selected_namespace))
|
|
195
192
|
available_namespaces = _list_available_namespaces()
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
193
|
+
available_namespace_set = set(available_namespaces)
|
|
194
|
+
existing_selected_namespaces = [
|
|
195
|
+
namespace
|
|
196
|
+
for namespace in normalized_selected_namespaces
|
|
197
|
+
if namespace in available_namespace_set
|
|
198
|
+
]
|
|
199
199
|
return BackupSettingsResponse(
|
|
200
200
|
folder_path=folder_path,
|
|
201
|
-
selected_namespaces=
|
|
202
|
-
available_namespaces=
|
|
201
|
+
selected_namespaces=_order_namespaces(namespaces=existing_selected_namespaces),
|
|
202
|
+
available_namespaces=available_namespaces,
|
|
203
203
|
retention_count=int(settings["retention_count"]),
|
|
204
204
|
)
|
|
205
205
|
|
|
@@ -269,14 +269,18 @@ def _order_namespaces(*, namespaces: list[str]) -> list[str]:
|
|
|
269
269
|
|
|
270
270
|
|
|
271
271
|
def _list_available_namespaces() -> list[str]:
|
|
272
|
-
discovered_namespaces = [
|
|
272
|
+
discovered_namespaces: list[str] = []
|
|
273
273
|
namespaces_directory = resolve_namespaces_directory()
|
|
274
274
|
if namespaces_directory.exists():
|
|
275
275
|
if not namespaces_directory.is_dir():
|
|
276
276
|
raise RuntimeError(f"namespaces directory is not a directory: {namespaces_directory}")
|
|
277
277
|
for child in namespaces_directory.iterdir():
|
|
278
|
-
if child.is_dir():
|
|
279
|
-
|
|
278
|
+
if not child.is_dir():
|
|
279
|
+
continue
|
|
280
|
+
namespace = validate_namespace(namespace=child.name)
|
|
281
|
+
database_path = resolve_namespaced_database_path(namespace=namespace)
|
|
282
|
+
if database_path.is_file():
|
|
283
|
+
discovered_namespaces.append(namespace)
|
|
280
284
|
return _order_namespaces(namespaces=discovered_namespaces)
|
|
281
285
|
|
|
282
286
|
|
|
@@ -298,6 +302,21 @@ def _require_existing_selected_namespaces(*, selected_namespaces: list[str]) ->
|
|
|
298
302
|
return normalized_selected_namespaces
|
|
299
303
|
|
|
300
304
|
|
|
305
|
+
def _filter_deleted_selected_namespaces(*, selected_namespaces: list[str]) -> list[str]:
|
|
306
|
+
normalized_selected_namespaces = _normalize_selected_namespaces(selected_namespaces=selected_namespaces)
|
|
307
|
+
existing_selected_namespaces: list[str] = []
|
|
308
|
+
for namespace in normalized_selected_namespaces:
|
|
309
|
+
database_path = resolve_namespaced_database_path(namespace=namespace)
|
|
310
|
+
if database_path.is_file():
|
|
311
|
+
existing_selected_namespaces.append(namespace)
|
|
312
|
+
if len(existing_selected_namespaces) == 0:
|
|
313
|
+
raise HTTPException(
|
|
314
|
+
status_code=400,
|
|
315
|
+
detail="None of the selected backup namespaces still exist",
|
|
316
|
+
)
|
|
317
|
+
return existing_selected_namespaces
|
|
318
|
+
|
|
319
|
+
|
|
301
320
|
def _run_native_folder_picker_command(*, command: list[str]) -> str | None:
|
|
302
321
|
if not isinstance(command, list) or len(command) == 0:
|
|
303
322
|
raise TypeError("command must be a non-empty list")
|
|
@@ -400,7 +419,6 @@ def _backup_profile_ports(*, profile: BackupLaunchProfile) -> list[tuple[str, in
|
|
|
400
419
|
service_pairs = [
|
|
401
420
|
("HTTP", profile.port),
|
|
402
421
|
("HTTPS", profile.https_port),
|
|
403
|
-
("MCP", profile.mcp_port),
|
|
404
422
|
]
|
|
405
423
|
ports: list[tuple[str, int]] = []
|
|
406
424
|
for service, port in service_pairs:
|
|
@@ -414,7 +432,6 @@ def _runtime_profile_ports(*, profile: NamespaceLaunchProfile) -> list[tuple[str
|
|
|
414
432
|
service_pairs = [
|
|
415
433
|
("HTTP", profile.port),
|
|
416
434
|
("HTTPS", profile.https_port),
|
|
417
|
-
("MCP", profile.mcp_port),
|
|
418
435
|
]
|
|
419
436
|
ports: list[tuple[str, int]] = []
|
|
420
437
|
for service, port in service_pairs:
|
|
@@ -674,15 +691,9 @@ def _suggest_import_launch_profile(
|
|
|
674
691
|
elif restored_profile.https_port is None:
|
|
675
692
|
https_port = None
|
|
676
693
|
|
|
677
|
-
if restored_profile is None or restored_profile.mcp_port is None:
|
|
678
|
-
mcp_start = _DEFAULT_MCP_AGENT_WEB_PORT
|
|
679
|
-
else:
|
|
680
|
-
mcp_start = restored_profile.mcp_port
|
|
681
|
-
mcp_port = _next_available_port(start_port=mcp_start, occupied_ports=occupied_ports)
|
|
682
694
|
return BackupRestoreLaunchProfileResponse(
|
|
683
695
|
port=port,
|
|
684
696
|
https_port=https_port,
|
|
685
|
-
mcp_port=mcp_port,
|
|
686
697
|
)
|
|
687
698
|
|
|
688
699
|
|
|
@@ -692,12 +703,11 @@ def _response_profile_from_backup_profile(
|
|
|
692
703
|
) -> BackupRestoreLaunchProfileResponse | None:
|
|
693
704
|
if profile is None:
|
|
694
705
|
return None
|
|
695
|
-
if profile.port is None
|
|
706
|
+
if profile.port is None:
|
|
696
707
|
return None
|
|
697
708
|
return BackupRestoreLaunchProfileResponse(
|
|
698
709
|
port=profile.port,
|
|
699
710
|
https_port=profile.https_port,
|
|
700
|
-
mcp_port=profile.mcp_port,
|
|
701
711
|
)
|
|
702
712
|
|
|
703
713
|
|
|
@@ -707,8 +717,6 @@ def _required_existing_target_launch_profile(*, target_namespace: str) -> Backup
|
|
|
707
717
|
raise RuntimeError(f"Existing target namespace has no saved launch profile: {target_namespace}")
|
|
708
718
|
if profile.port is None:
|
|
709
719
|
raise RuntimeError(f"Existing target namespace has no saved HTTP port: {target_namespace}")
|
|
710
|
-
if profile.mcp_port is None:
|
|
711
|
-
raise RuntimeError(f"Existing target namespace has no saved MCP port: {target_namespace}")
|
|
712
720
|
return BackupLaunchProfile(
|
|
713
721
|
namespace=target_namespace,
|
|
714
722
|
port=profile.port,
|
|
@@ -739,7 +747,7 @@ def _resolve_same_name_restore_launch_profile(
|
|
|
739
747
|
namespace=target_namespace,
|
|
740
748
|
port=suggested_profile.port,
|
|
741
749
|
https_port=suggested_profile.https_port,
|
|
742
|
-
mcp_port=
|
|
750
|
+
mcp_port=None,
|
|
743
751
|
)
|
|
744
752
|
|
|
745
753
|
|
|
@@ -752,7 +760,7 @@ def _backup_profile_from_request(
|
|
|
752
760
|
namespace=namespace,
|
|
753
761
|
port=profile.port,
|
|
754
762
|
https_port=profile.https_port,
|
|
755
|
-
mcp_port=
|
|
763
|
+
mcp_port=None,
|
|
756
764
|
)
|
|
757
765
|
|
|
758
766
|
|
|
@@ -873,7 +881,7 @@ def run_backup(token: Annotated[str, Depends(_require_auth)]):
|
|
|
873
881
|
raise RuntimeError("backup settings selected_namespaces must be a list")
|
|
874
882
|
if not isinstance(retention_count, int) or retention_count <= 0:
|
|
875
883
|
raise RuntimeError("backup settings retention_count must be a positive integer")
|
|
876
|
-
normalized_selected_namespaces =
|
|
884
|
+
normalized_selected_namespaces = _filter_deleted_selected_namespaces(
|
|
877
885
|
selected_namespaces=selected_namespaces,
|
|
878
886
|
)
|
|
879
887
|
|
|
@@ -19,6 +19,7 @@ from app.usecases.create_note import CmdCreateNote
|
|
|
19
19
|
from app.usecases.create_sibling import CmdCreateSibling
|
|
20
20
|
from app.usecases.create_child import CmdCreateChild
|
|
21
21
|
from app.usecases.update_content import CmdUpdateContent
|
|
22
|
+
from app.usecases.add_selected_text_tag import CmdAddSelectedTextTag
|
|
22
23
|
from app.usecases.delete_subtree import CmdDeleteSubtree
|
|
23
24
|
from app.usecases.move import CmdMove
|
|
24
25
|
from app.usecases.move_to_top import CmdMoveToTop
|
|
@@ -40,6 +41,7 @@ from app.usecases.paste_child import CmdPasteChild
|
|
|
40
41
|
from app.usecases.split_note import CmdSplitNote
|
|
41
42
|
from app.usecases.toggle_reference_mode import CmdToggleReferenceMode
|
|
42
43
|
from app.usecases.unformat_content import CmdUnformatContent
|
|
44
|
+
from app.usecases.resize_image import CmdResizeImage
|
|
43
45
|
from app.usecases.undo import CmdUndo
|
|
44
46
|
from app.usecases.redo import CmdRedo
|
|
45
47
|
from app.usecases.record_edit_mode import CmdRecordEditMode
|
|
@@ -67,6 +69,7 @@ from app.services.search_index import search_index
|
|
|
67
69
|
from app.services.tag_suggestions import suggest_tags_for_note
|
|
68
70
|
from app.services.undo_state import reset_undo_stack
|
|
69
71
|
from app.usecases.prioritize import list_prioritize_tag_suggestions
|
|
72
|
+
from app.services.selected_text_tag import SelectedTextTagValidationError
|
|
70
73
|
from app.api.request_auth import require_request_auth_token
|
|
71
74
|
|
|
72
75
|
|
|
@@ -773,6 +776,36 @@ def save_note(request: Request, note_id: str, body: dict):
|
|
|
773
776
|
return cmd.execute()
|
|
774
777
|
|
|
775
778
|
|
|
779
|
+
@router.post("/notes/{note_id}/add-selected-text-tag")
|
|
780
|
+
@transactional_route
|
|
781
|
+
def add_selected_text_tag(request: Request, note_id: str, body: dict):
|
|
782
|
+
selected_text = body["selectedText"]
|
|
783
|
+
if not isinstance(selected_text, str):
|
|
784
|
+
raise TypeError("selectedText must be a string")
|
|
785
|
+
|
|
786
|
+
token = _require_bearer_token(request)
|
|
787
|
+
viewport = _require_viewport(body)
|
|
788
|
+
_require_note_present(note_id, context="notes.add-selected-text-tag")
|
|
789
|
+
command = CmdAddSelectedTextTag(
|
|
790
|
+
note_id=note_id,
|
|
791
|
+
selected_text=selected_text,
|
|
792
|
+
token=token,
|
|
793
|
+
client_id=body["clientId"],
|
|
794
|
+
undo_context=body["undoContext"],
|
|
795
|
+
viewport=viewport,
|
|
796
|
+
)
|
|
797
|
+
capture = CapturedExceptionContext(SelectedTextTagValidationError)
|
|
798
|
+
response = None
|
|
799
|
+
with capture:
|
|
800
|
+
response = command.execute()
|
|
801
|
+
if capture.captured_exception is not None:
|
|
802
|
+
exc = capture.captured_exception
|
|
803
|
+
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
|
804
|
+
if response is None:
|
|
805
|
+
raise RuntimeError("CmdAddSelectedTextTag returned no response")
|
|
806
|
+
return response
|
|
807
|
+
|
|
808
|
+
|
|
776
809
|
@router.post("/notes/{note_id}/split")
|
|
777
810
|
@transactional_route
|
|
778
811
|
def split_note(request: Request, note_id: str, body: dict):
|
|
@@ -828,6 +861,26 @@ def unformat_note_content(request: Request, note_id: str, body: dict):
|
|
|
828
861
|
return cmd.execute()
|
|
829
862
|
|
|
830
863
|
|
|
864
|
+
@router.post("/notes/{note_id}/resize-image")
|
|
865
|
+
@transactional_route
|
|
866
|
+
def resize_note_image(request: Request, note_id: str, body: dict):
|
|
867
|
+
client_id = body["clientId"]
|
|
868
|
+
viewport = _require_viewport(body)
|
|
869
|
+
token = _require_bearer_token(request)
|
|
870
|
+
_require_note_present(note_id, context="notes.resize-image")
|
|
871
|
+
cmd = CmdResizeImage(
|
|
872
|
+
note_id=note_id,
|
|
873
|
+
source_kind=body["sourceKind"],
|
|
874
|
+
occurrence_index=body["occurrenceIndex"],
|
|
875
|
+
action=body["action"],
|
|
876
|
+
token=token,
|
|
877
|
+
client_id=client_id,
|
|
878
|
+
undo_context=body["undoContext"],
|
|
879
|
+
viewport=viewport,
|
|
880
|
+
)
|
|
881
|
+
return cmd.execute()
|
|
882
|
+
|
|
883
|
+
|
|
831
884
|
@router.post("/notes/{note_id}/run-shell")
|
|
832
885
|
@transactional_route
|
|
833
886
|
def run_shell_endpoint(note_id: str, body: dict) -> Dict[str, object]:
|