mcli-framework 8.0.45__tar.gz → 8.0.47__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.
- {mcli_framework-8.0.45/src/mcli_framework.egg-info → mcli_framework-8.0.47}/PKG-INFO +1 -1
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/pyproject.toml +1 -1
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/sync_cmd.py +143 -5
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/ipfs_sync.py +165 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/ipns_manager.py +17 -2
- mcli_framework-8.0.47/src/mcli/lib/sync_key_store.py +69 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47/src/mcli_framework.egg-info}/PKG-INFO +1 -1
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli_framework.egg-info/SOURCES.txt +1 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/LICENSE +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/MANIFEST.in +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/README.md +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/llms-full.txt +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/llms.txt +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/mcli_rust/Cargo.toml +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/mcli_rust/src/command_parser.rs +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/mcli_rust/src/file_watcher.rs +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/mcli_rust/src/lib.rs +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/mcli_rust/src/process_manager.rs +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/mcli_rust/src/tfidf.rs +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/setup.cfg +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/commands_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/completion_helpers.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/context_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/create_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/delete_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/edit_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/import_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/init_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/list_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/main.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/migrate_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/model/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/model/model.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/model_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/mv_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/new_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/remove_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/rm_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/search_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/services_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/setup_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/source_sync_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/video/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/app/video/video.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/config.toml +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/api/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/api/api.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/api/daemon_client.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/api/daemon_client_local.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/api/daemon_decorator.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/api/mcli_decorators.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/auth/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/auth/auth.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/auth/aws_manager.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/auth/azure_manager.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/auth/credential_manager.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/auth/gcp_manager.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/auth/key_manager.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/auth/mcli_manager.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/auth/token_manager.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/auth/token_util.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/config/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/config/config.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/config/settings.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/constants/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/constants/commands.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/constants/defaults.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/constants/env.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/constants/messages.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/constants/paths.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/constants/scripts.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/constants/storage.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/custom_commands.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/discovery/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/discovery/command_discovery.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/erd/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/erd/erd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/erd/generate_graph.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/errors.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/feature_detection.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/files/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/files/files.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/folder_workflows.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/fs/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/fs/fs.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/ipfs_utils.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/lib.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/logger/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/logger/correlation.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/logger/logger.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/logger/structured.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/optional_deps.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/paths.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/performance/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/performance/optimizer.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/performance/rust_bridge.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/performance/uvloop_config.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/pickles/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/pickles/pickles.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/pyenv/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/pyenv/deps.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/pyenv/manager.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/pyenv/venv.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/script_loader.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/script_sync.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/script_watcher.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/search/cached_vectorizer.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/secrets/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/secrets/commands.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/secrets/manager.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/secrets/repl.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/secrets/store.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/services/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/services/config.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/services/data_pipeline.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/services/health.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/services/lsh_client.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/services/manager.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/services/redis_service.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/services/registry.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/services/state.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/services/supervisor.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/shell/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/shell/exceptions.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/shell/shell.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/templates/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/templates/command_templates.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/toml/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/toml/toml.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/types.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/ui/styling.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/ui/visual_effects.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/watcher/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/watcher/watcher.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/workflow_models.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/lib/workspace_registry.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/mygroup/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/mygroup/test_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/public/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/public/commands/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/public/oi/oi.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/public/public.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/self/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/self/completion_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/self/env_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/self/health_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/self/ipfs_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/self/logs_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/self/migrate_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/self/release_notes_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/self/self_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/self/store_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/self/test_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/self/workflows_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/storage/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/storage/backends/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/storage/backends/ipfs_backend.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/storage/base.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/storage/cache.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/storage/encryption.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/storage/factory.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/storage/registry.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/storage/storacha_cli.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/daemon/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/daemon/async_command_database.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/daemon/async_process_manager.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/daemon/client.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/daemon/daemon.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/daemon/daemon_api.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/daemon/enhanced_daemon.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/daemon/process_cli.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/daemon/process_manager.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/daemon/test_daemon.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/doc_convert.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/docker/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/docker/docker.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/file/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/gcloud/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/gcloud/config.toml +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/gcloud/gcloud.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/git_commit/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/git_commit/ai_service.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/interview/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/lsh_integration.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/model_service/client.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/model_service/download_and_run_efficient_models.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/model_service/lightweight_embedder.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/model_service/lightweight_model_server.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/model_service/lightweight_test.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/model_service/model_service.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/model_service/ollama_efficient_runner.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/model_service/openai_adapter.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/model_service/pdf_processor.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/model_service/test_efficient_runner.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/model_service/test_example.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/model_service/test_integration.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/model_service/test_new_features.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/notebook/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/notebook/command_loader.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/notebook/converter.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/notebook/executor.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/notebook/notebook_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/notebook/schema.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/notebook/validator.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/openai/openai.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/registry/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/registry/registry.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/repo/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/repo/repo.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/scheduler/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/scheduler/cron_parser.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/scheduler/job.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/scheduler/models.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/scheduler/monitor.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/scheduler/persistence.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/scheduler/scheduler.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/scheduler/validation.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/search/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/secrets/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/secrets/secrets_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/storage/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/storage/storage_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/sync/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/sync/test_cmd.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/videos/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/wakatime/__init__.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/wakatime/wakatime.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli/workflow/workflow.py +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli_framework.egg-info/dependency_links.txt +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli_framework.egg-info/entry_points.txt +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli_framework.egg-info/requires.txt +0 -0
- {mcli_framework-8.0.45 → mcli_framework-8.0.47}/src/mcli_framework.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcli-framework
|
|
3
|
-
Version: 8.0.
|
|
3
|
+
Version: 8.0.47
|
|
4
4
|
Summary: Portable workflow framework - transform any script into a versioned, schedulable command. Store in ~/.mcli/workflows/, version with lockfile, run as daemon or cron job.
|
|
5
5
|
Author-email: Luis Fernandez de la Vara <luis@lefv.io>
|
|
6
6
|
Maintainer-email: Luis Fernandez de la Vara <luis@lefv.io>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mcli-framework"
|
|
3
|
-
version = "8.0.
|
|
3
|
+
version = "8.0.47"
|
|
4
4
|
description = "Portable workflow framework - transform any script into a versioned, schedulable command. Store in ~/.mcli/workflows/, version with lockfile, run as daemon or cron job."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -7,6 +7,7 @@ Provides:
|
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
import json
|
|
10
|
+
import os
|
|
10
11
|
import shutil
|
|
11
12
|
import subprocess
|
|
12
13
|
import sys
|
|
@@ -460,19 +461,32 @@ def sync_push_command(global_mode: bool, description: str):
|
|
|
460
461
|
@click.option("--output", "-o", type=click.Path(path_type=Path), help="Output file path")
|
|
461
462
|
@click.option("--no-verify", is_flag=True, help="Skip hash verification")
|
|
462
463
|
@click.option("--repo", "-r", help="Override repo name for IPNS resolution (cross-repo pull)")
|
|
464
|
+
@click.option(
|
|
465
|
+
"--workflows-dir",
|
|
466
|
+
"-w",
|
|
467
|
+
type=click.Path(path_type=Path, file_okay=False),
|
|
468
|
+
help="Reconstruct script files into this directory (per-script CIDs in manifest)",
|
|
469
|
+
)
|
|
463
470
|
def sync_pull_command(
|
|
464
|
-
cid: Optional[str],
|
|
471
|
+
cid: Optional[str],
|
|
472
|
+
output: Optional[Path],
|
|
473
|
+
no_verify: bool,
|
|
474
|
+
repo: Optional[str],
|
|
475
|
+
workflows_dir: Optional[Path],
|
|
465
476
|
):
|
|
466
477
|
"""⬇️ Pull workflow state from IPFS.
|
|
467
478
|
|
|
468
479
|
If CID is provided, retrieves that exact version. If CID is omitted and
|
|
469
|
-
MCLI_SYNC_KEY is set, automatically resolves the latest via IPNS.
|
|
480
|
+
MCLI_SYNC_KEY is set, automatically resolves the latest via IPNS. With
|
|
481
|
+
--workflows-dir, also reconstructs each command's script file from its
|
|
482
|
+
per-script CID embedded in the manifest.
|
|
470
483
|
|
|
471
484
|
Examples:
|
|
472
|
-
mcli sync pull
|
|
473
|
-
mcli sync pull QmXyZ123...
|
|
474
|
-
mcli sync pull --repo other-project
|
|
485
|
+
mcli sync pull # Auto-resolve via IPNS
|
|
486
|
+
mcli sync pull QmXyZ123... # Pull specific CID
|
|
487
|
+
mcli sync pull --repo other-project # Pull from different repo
|
|
475
488
|
mcli sync pull QmXyZ123... -o my-cmds.json
|
|
489
|
+
mcli sync pull QmXyZ123... -w ./.mcli/workflows
|
|
476
490
|
"""
|
|
477
491
|
import json
|
|
478
492
|
|
|
@@ -527,6 +541,22 @@ def sync_pull_command(
|
|
|
527
541
|
|
|
528
542
|
if "version" in data:
|
|
529
543
|
console.print(SyncMessages.VERSION_LABEL.format(version=data["version"]))
|
|
544
|
+
|
|
545
|
+
# Optional: reconstruct script files from per-script CIDs
|
|
546
|
+
if workflows_dir and cid:
|
|
547
|
+
try:
|
|
548
|
+
written = ipfs.pull_workflows(cid, workflows_dir, verify=not no_verify)
|
|
549
|
+
except ValueError as exc:
|
|
550
|
+
error(f"Hash verification failed: {exc}")
|
|
551
|
+
return
|
|
552
|
+
if written:
|
|
553
|
+
success(f"Restored {len(written)} script file(s) to {workflows_dir}")
|
|
554
|
+
for path in written:
|
|
555
|
+
console.print(f" [dim]{path}[/dim]")
|
|
556
|
+
else:
|
|
557
|
+
console.print(
|
|
558
|
+
"[dim]No script files restored — manifest predates per-script CIDs.[/dim]"
|
|
559
|
+
)
|
|
530
560
|
else:
|
|
531
561
|
error(SyncMessages.FAILED_RETRIEVE_IPFS)
|
|
532
562
|
info(SyncMessages.CID_INVALID_OR_NOT_PROPAGATED)
|
|
@@ -803,3 +833,111 @@ def sync_info(is_global: bool):
|
|
|
803
833
|
else:
|
|
804
834
|
console.print(" Installed: No")
|
|
805
835
|
console.print(" [dim]Install with: brew install ipfs[/dim]")
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
@sync_group.group(name="key")
|
|
839
|
+
def sync_key_group():
|
|
840
|
+
"""🔑 Manage the persistent IPNS sync key.
|
|
841
|
+
|
|
842
|
+
Generates / shows / sets / clears the shared secret used to derive
|
|
843
|
+
a deterministic IPNS name for cross-host workflow sync. The
|
|
844
|
+
``MCLI_SYNC_KEY`` environment variable, if set, always wins over
|
|
845
|
+
the on-disk value.
|
|
846
|
+
"""
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
def _mask_key(key: str) -> str:
|
|
850
|
+
if len(key) <= 12:
|
|
851
|
+
return "*" * len(key)
|
|
852
|
+
return f"{key[:4]}...{key[-4:]}"
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
@sync_key_group.command(name="gen")
|
|
856
|
+
@click.option("--force", "-f", is_flag=True, help="Overwrite an existing key")
|
|
857
|
+
@click.option("--show", is_flag=True, help="Print the full key (default masks it)")
|
|
858
|
+
def sync_key_gen(force: bool, show: bool):
|
|
859
|
+
"""Generate and persist a new 64-char hex sync key.
|
|
860
|
+
|
|
861
|
+
Examples:
|
|
862
|
+
mcli sync key gen
|
|
863
|
+
mcli sync key gen --show
|
|
864
|
+
mcli sync key gen --force --show
|
|
865
|
+
"""
|
|
866
|
+
from mcli.lib.sync_key_store import SyncKeyStore
|
|
867
|
+
|
|
868
|
+
store = SyncKeyStore()
|
|
869
|
+
try:
|
|
870
|
+
key = store.generate(force=force)
|
|
871
|
+
except FileExistsError:
|
|
872
|
+
error("A sync key is already configured.")
|
|
873
|
+
info("Use --force to overwrite, or 'mcli sync key show' to view it.")
|
|
874
|
+
return 1
|
|
875
|
+
|
|
876
|
+
success(f"Generated sync key at {store.path}")
|
|
877
|
+
if show:
|
|
878
|
+
console.print(f"[bold cyan]{key}[/bold cyan]")
|
|
879
|
+
else:
|
|
880
|
+
console.print(f"[dim]Key: {_mask_key(key)} (use --show to print full)[/dim]")
|
|
881
|
+
console.print(
|
|
882
|
+
"[dim]Share this key with teammates / your other hosts. "
|
|
883
|
+
"Then run `mcli sync key set <key>` on each peer.[/dim]"
|
|
884
|
+
)
|
|
885
|
+
return 0
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
@sync_key_group.command(name="set")
|
|
889
|
+
@click.argument("key")
|
|
890
|
+
def sync_key_set(key: str):
|
|
891
|
+
"""Persist an existing 64-char hex sync key.
|
|
892
|
+
|
|
893
|
+
Use this on a second host after copying the key generated on the
|
|
894
|
+
first.
|
|
895
|
+
"""
|
|
896
|
+
from mcli.lib.sync_key_store import SyncKeyStore
|
|
897
|
+
|
|
898
|
+
try:
|
|
899
|
+
SyncKeyStore().set(key.strip())
|
|
900
|
+
except ValueError as exc:
|
|
901
|
+
error(str(exc))
|
|
902
|
+
return 1
|
|
903
|
+
success("Sync key stored.")
|
|
904
|
+
return 0
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
@sync_key_group.command(name="show")
|
|
908
|
+
@click.option("--reveal", is_flag=True, help="Print the full key (default masks it)")
|
|
909
|
+
def sync_key_show(reveal: bool):
|
|
910
|
+
"""Show the currently configured sync key (masked unless --reveal)."""
|
|
911
|
+
from mcli.lib.sync_key_store import SyncKeyStore
|
|
912
|
+
|
|
913
|
+
env_value = os.environ.get("MCLI_SYNC_KEY")
|
|
914
|
+
stored = SyncKeyStore().get()
|
|
915
|
+
|
|
916
|
+
if not env_value and not stored:
|
|
917
|
+
info("No sync key configured.")
|
|
918
|
+
console.print("[dim]Generate one with: mcli sync key gen[/dim]")
|
|
919
|
+
return 1
|
|
920
|
+
|
|
921
|
+
if env_value:
|
|
922
|
+
label = "MCLI_SYNC_KEY env var (overrides on-disk value)"
|
|
923
|
+
value = env_value
|
|
924
|
+
else:
|
|
925
|
+
label = "stored at " + str(SyncKeyStore().path)
|
|
926
|
+
value = stored
|
|
927
|
+
|
|
928
|
+
console.print(f"[bold]Source:[/bold] {label}")
|
|
929
|
+
console.print(f"[bold]Key:[/bold] [cyan]{value if reveal else _mask_key(value)}[/cyan]")
|
|
930
|
+
if not reveal:
|
|
931
|
+
console.print("[dim]Use --reveal to print the full key.[/dim]")
|
|
932
|
+
return 0
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
@sync_key_group.command(name="clear")
|
|
936
|
+
@click.confirmation_option(prompt="Remove the stored sync key?")
|
|
937
|
+
def sync_key_clear():
|
|
938
|
+
"""Delete the persisted sync key (env var, if set, is untouched)."""
|
|
939
|
+
from mcli.lib.sync_key_store import SyncKeyStore
|
|
940
|
+
|
|
941
|
+
SyncKeyStore().clear()
|
|
942
|
+
success("Stored sync key removed.")
|
|
943
|
+
return 0
|
|
@@ -58,6 +58,7 @@ class IPFSSync:
|
|
|
58
58
|
|
|
59
59
|
# Local IPFS daemon endpoint (default port)
|
|
60
60
|
LOCAL_IPFS_API = "http://127.0.0.1:5001/api/v0/add"
|
|
61
|
+
LOCAL_IPFS_CAT = "http://127.0.0.1:5001/api/v0/cat"
|
|
61
62
|
|
|
62
63
|
# Public IPFS gateways for retrieval
|
|
63
64
|
RETRIEVE_GATEWAY = "https://ipfs.io/ipfs/{cid}"
|
|
@@ -280,6 +281,96 @@ class IPFSSync:
|
|
|
280
281
|
logger.error(f"Failed to retrieve from all gateways: {cid}")
|
|
281
282
|
return None
|
|
282
283
|
|
|
284
|
+
def add_file_to_ipfs(self, file_path: Path, max_retries: int = 3) -> Optional[str]:
|
|
285
|
+
"""Add a single file to the local IPFS daemon and return its CID.
|
|
286
|
+
|
|
287
|
+
Used by push() to upload each workflow script body alongside the
|
|
288
|
+
manifest, so consumers can reconstruct the full workflows directory
|
|
289
|
+
on pull.
|
|
290
|
+
"""
|
|
291
|
+
if not self._check_local_ipfs():
|
|
292
|
+
logger.error("Cannot add file to IPFS: local daemon unavailable")
|
|
293
|
+
return None
|
|
294
|
+
|
|
295
|
+
path = Path(file_path)
|
|
296
|
+
if not path.is_file():
|
|
297
|
+
logger.warning(f"Skipping IPFS add — file does not exist: {path}")
|
|
298
|
+
return None
|
|
299
|
+
|
|
300
|
+
def attempt_upload():
|
|
301
|
+
with open(path, "rb") as fh:
|
|
302
|
+
files = {"file": (path.name, fh.read())}
|
|
303
|
+
response = requests.post(self.LOCAL_IPFS_API, files=files, timeout=30)
|
|
304
|
+
if response.status_code == 200:
|
|
305
|
+
cid = response.json().get("Hash")
|
|
306
|
+
logger.info(f"Added {path.name} to IPFS: {cid}")
|
|
307
|
+
return (True, cid)
|
|
308
|
+
logger.warning(f"IPFS add failed for {path.name}: {response.status_code}")
|
|
309
|
+
return (False, None)
|
|
310
|
+
|
|
311
|
+
return self._retry_with_backoff(attempt_upload, max_retries=max_retries)
|
|
312
|
+
|
|
313
|
+
def fetch_file_from_ipfs(self, cid: str, timeout: int = 30) -> Optional[bytes]:
|
|
314
|
+
"""Fetch raw bytes for a CID via the local daemon, falling back to gateways.
|
|
315
|
+
|
|
316
|
+
Used by pull_workflows() to reconstruct script files referenced by
|
|
317
|
+
per-script CIDs in the manifest.
|
|
318
|
+
"""
|
|
319
|
+
# Local daemon first
|
|
320
|
+
if self._check_local_ipfs():
|
|
321
|
+
try:
|
|
322
|
+
response = requests.post(
|
|
323
|
+
self.LOCAL_IPFS_CAT,
|
|
324
|
+
params={"arg": cid},
|
|
325
|
+
timeout=timeout,
|
|
326
|
+
)
|
|
327
|
+
if response.status_code == 200:
|
|
328
|
+
return response.content
|
|
329
|
+
logger.warning(f"Local daemon cat failed for {cid}: {response.status_code}")
|
|
330
|
+
except Exception as e:
|
|
331
|
+
logger.warning(f"Local daemon cat error for {cid}: {e}")
|
|
332
|
+
|
|
333
|
+
# Public gateway fallback
|
|
334
|
+
for gateway_template in [self.RETRIEVE_GATEWAY] + self.ALT_GATEWAYS:
|
|
335
|
+
url = gateway_template.format(cid=cid)
|
|
336
|
+
try:
|
|
337
|
+
response = requests.get(url, timeout=timeout)
|
|
338
|
+
if response.status_code == 200:
|
|
339
|
+
return response.content
|
|
340
|
+
logger.warning(
|
|
341
|
+
f"Gateway {gateway_template} returned {response.status_code} for {cid}"
|
|
342
|
+
)
|
|
343
|
+
except Exception as e:
|
|
344
|
+
logger.warning(f"Gateway {gateway_template} error for {cid}: {e}")
|
|
345
|
+
return None
|
|
346
|
+
|
|
347
|
+
def _embed_script_cids(self, command_data: dict, workflows_dir: Path) -> dict:
|
|
348
|
+
"""Augment a lockfile dict in-memory with per-script IPFS CIDs.
|
|
349
|
+
|
|
350
|
+
Reads each command's ``file`` from ``workflows_dir``, adds it to IPFS,
|
|
351
|
+
and stores the resulting CID as ``script_cid`` on the entry. Bumps
|
|
352
|
+
the manifest version to "2.1" to signal that script bodies are
|
|
353
|
+
retrievable.
|
|
354
|
+
"""
|
|
355
|
+
commands = command_data.get("commands", {})
|
|
356
|
+
any_uploaded = False
|
|
357
|
+
for name, entry in commands.items():
|
|
358
|
+
script_filename = entry.get("file")
|
|
359
|
+
if not script_filename:
|
|
360
|
+
continue
|
|
361
|
+
script_path = workflows_dir / script_filename
|
|
362
|
+
if not script_path.is_file():
|
|
363
|
+
logger.warning(f"Skipping '{name}' — script file missing: {script_path}")
|
|
364
|
+
continue
|
|
365
|
+
cid = self.add_file_to_ipfs(script_path)
|
|
366
|
+
if cid:
|
|
367
|
+
entry["script_cid"] = cid
|
|
368
|
+
any_uploaded = True
|
|
369
|
+
|
|
370
|
+
if any_uploaded:
|
|
371
|
+
command_data["version"] = "2.1"
|
|
372
|
+
return command_data
|
|
373
|
+
|
|
283
374
|
def push(self, command_lock_path: Path, description: str = "") -> Optional[str]:
|
|
284
375
|
"""
|
|
285
376
|
Push command state to IPFS.
|
|
@@ -296,6 +387,12 @@ class IPFSSync:
|
|
|
296
387
|
with open(command_lock_path) as f:
|
|
297
388
|
command_data = json.load(f)
|
|
298
389
|
|
|
390
|
+
# Add each workflow script to IPFS so consumers can reconstruct
|
|
391
|
+
# the full workflows directory on pull. Operates on the in-memory
|
|
392
|
+
# copy so the on-disk lockfile stays untouched.
|
|
393
|
+
workflows_dir = Path(command_lock_path).parent
|
|
394
|
+
command_data = self._embed_script_cids(command_data, workflows_dir)
|
|
395
|
+
|
|
299
396
|
# Add sync metadata
|
|
300
397
|
sync_data = {
|
|
301
398
|
"version": "1.0",
|
|
@@ -376,6 +473,74 @@ class IPFSSync:
|
|
|
376
473
|
|
|
377
474
|
return data.get("commands", {})
|
|
378
475
|
|
|
476
|
+
def pull_workflows(
|
|
477
|
+
self,
|
|
478
|
+
cid: str,
|
|
479
|
+
workflows_dir: Path,
|
|
480
|
+
verify: bool = True,
|
|
481
|
+
) -> list[Path]:
|
|
482
|
+
"""Pull a manifest and reconstruct the workflow script files on disk.
|
|
483
|
+
|
|
484
|
+
Walks each command entry in the retrieved manifest, fetches its
|
|
485
|
+
``script_cid`` (if present) from IPFS, verifies the recorded
|
|
486
|
+
``content_hash``, and writes the file to ``workflows_dir``.
|
|
487
|
+
|
|
488
|
+
Returns the list of files written. If the manifest predates per-script
|
|
489
|
+
CIDs (lockfile schema < 2.1), the manifest is still pulled but no
|
|
490
|
+
files are written and a warning is logged.
|
|
491
|
+
|
|
492
|
+
Raises:
|
|
493
|
+
ValueError: when a fetched script's SHA-256 does not match the
|
|
494
|
+
``content_hash`` recorded in the lockfile.
|
|
495
|
+
"""
|
|
496
|
+
manifest = self.pull(cid, verify=verify)
|
|
497
|
+
if not manifest:
|
|
498
|
+
return []
|
|
499
|
+
|
|
500
|
+
commands = manifest.get("commands", {})
|
|
501
|
+
# `pull()` strips the outer envelope, so commands maps directly.
|
|
502
|
+
# Some callers still get the v2.x nested shape — handle both.
|
|
503
|
+
if (
|
|
504
|
+
isinstance(commands, dict)
|
|
505
|
+
and "commands" in commands
|
|
506
|
+
and isinstance(commands["commands"], dict)
|
|
507
|
+
):
|
|
508
|
+
commands = commands["commands"]
|
|
509
|
+
|
|
510
|
+
if not commands:
|
|
511
|
+
return []
|
|
512
|
+
|
|
513
|
+
workflows_dir = Path(workflows_dir)
|
|
514
|
+
workflows_dir.mkdir(parents=True, exist_ok=True)
|
|
515
|
+
|
|
516
|
+
written: list[Path] = []
|
|
517
|
+
for name, entry in commands.items():
|
|
518
|
+
script_filename = entry.get("file")
|
|
519
|
+
script_cid = entry.get("script_cid")
|
|
520
|
+
if not script_filename or not script_cid:
|
|
521
|
+
logger.warning(f"Skipping '{name}': manifest predates per-script CID sync")
|
|
522
|
+
continue
|
|
523
|
+
|
|
524
|
+
payload = self.fetch_file_from_ipfs(script_cid)
|
|
525
|
+
if payload is None:
|
|
526
|
+
logger.error(f"Failed to fetch script for '{name}' (cid={script_cid})")
|
|
527
|
+
continue
|
|
528
|
+
|
|
529
|
+
expected_hash = entry.get("content_hash")
|
|
530
|
+
if expected_hash:
|
|
531
|
+
expected_value = expected_hash.split(":", 1)[-1]
|
|
532
|
+
actual = hashlib.sha256(payload).hexdigest()
|
|
533
|
+
if actual != expected_value:
|
|
534
|
+
raise ValueError(
|
|
535
|
+
f"hash mismatch for '{name}': expected {expected_value}, got {actual}"
|
|
536
|
+
)
|
|
537
|
+
|
|
538
|
+
target = workflows_dir / script_filename
|
|
539
|
+
target.write_bytes(payload)
|
|
540
|
+
written.append(target)
|
|
541
|
+
|
|
542
|
+
return written
|
|
543
|
+
|
|
379
544
|
def pull_latest(
|
|
380
545
|
self,
|
|
381
546
|
scope: str = "global",
|
|
@@ -174,8 +174,23 @@ def resolve_ipns(ipns_name: str) -> Optional[str]:
|
|
|
174
174
|
|
|
175
175
|
|
|
176
176
|
def get_sync_key() -> Optional[str]:
|
|
177
|
-
"""Return the
|
|
178
|
-
|
|
177
|
+
"""Return the active sync key.
|
|
178
|
+
|
|
179
|
+
Resolution order:
|
|
180
|
+
1. ``MCLI_SYNC_KEY`` environment variable (lets users override per-shell).
|
|
181
|
+
2. The persistent on-disk store at ``$MCLI_HOME/sync_key.json``.
|
|
182
|
+
|
|
183
|
+
Returns ``None`` when neither source has a value.
|
|
184
|
+
"""
|
|
185
|
+
env_key = os.environ.get(EnvVars.MCLI_SYNC_KEY)
|
|
186
|
+
if env_key:
|
|
187
|
+
return env_key
|
|
188
|
+
|
|
189
|
+
# Lazy import to avoid a hard dependency cycle if the store module is
|
|
190
|
+
# ever extended to read IPNS state.
|
|
191
|
+
from mcli.lib.sync_key_store import SyncKeyStore
|
|
192
|
+
|
|
193
|
+
return SyncKeyStore().get()
|
|
179
194
|
|
|
180
195
|
|
|
181
196
|
def get_repo_name() -> str:
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""Persistent storage for the shared workflow sync key.
|
|
2
|
+
|
|
3
|
+
The store keeps a 64-character hex secret on disk so users do not have
|
|
4
|
+
to ``export MCLI_SYNC_KEY=...`` in every shell. The env var still wins
|
|
5
|
+
when set — see :func:`mcli.lib.ipns_manager.get_sync_key`.
|
|
6
|
+
|
|
7
|
+
File: ``$MCLI_HOME/sync_key.json`` (default ``~/.mcli/sync_key.json``)
|
|
8
|
+
mode 0600. JSON shape: ``{"key": "<64 hex chars>"}``.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import json
|
|
14
|
+
import os
|
|
15
|
+
import re
|
|
16
|
+
import secrets
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
from typing import Optional
|
|
19
|
+
|
|
20
|
+
from mcli.lib.paths import get_mcli_home
|
|
21
|
+
|
|
22
|
+
_FILENAME = "sync_key.json"
|
|
23
|
+
_HEX64 = re.compile(r"^[0-9a-fA-F]{64}$")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class SyncKeyStore:
|
|
27
|
+
"""Read/write the persistent sync key on disk."""
|
|
28
|
+
|
|
29
|
+
@property
|
|
30
|
+
def path(self) -> Path:
|
|
31
|
+
return get_mcli_home() / _FILENAME
|
|
32
|
+
|
|
33
|
+
def get(self) -> Optional[str]:
|
|
34
|
+
path = self.path
|
|
35
|
+
if not path.is_file():
|
|
36
|
+
return None
|
|
37
|
+
try:
|
|
38
|
+
data = json.loads(path.read_text())
|
|
39
|
+
except (json.JSONDecodeError, OSError):
|
|
40
|
+
return None
|
|
41
|
+
key = data.get("key")
|
|
42
|
+
return key if isinstance(key, str) and _HEX64.match(key) else None
|
|
43
|
+
|
|
44
|
+
def set(self, key: str) -> None:
|
|
45
|
+
if not isinstance(key, str) or not _HEX64.match(key):
|
|
46
|
+
raise ValueError("sync key must be a 64-char hex string")
|
|
47
|
+
self._write(key)
|
|
48
|
+
|
|
49
|
+
def generate(self, force: bool = False) -> str:
|
|
50
|
+
if self.path.exists() and not force:
|
|
51
|
+
raise FileExistsError(
|
|
52
|
+
f"sync key already exists at {self.path}; use force=True to overwrite"
|
|
53
|
+
)
|
|
54
|
+
key = secrets.token_hex(32)
|
|
55
|
+
self._write(key)
|
|
56
|
+
return key
|
|
57
|
+
|
|
58
|
+
def clear(self) -> None:
|
|
59
|
+
try:
|
|
60
|
+
self.path.unlink()
|
|
61
|
+
except FileNotFoundError:
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
def _write(self, key: str) -> None:
|
|
65
|
+
path = self.path
|
|
66
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
67
|
+
# Write then chmod so the secret is never world-readable.
|
|
68
|
+
path.write_text(json.dumps({"key": key}))
|
|
69
|
+
os.chmod(path, 0o600)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcli-framework
|
|
3
|
-
Version: 8.0.
|
|
3
|
+
Version: 8.0.47
|
|
4
4
|
Summary: Portable workflow framework - transform any script into a versioned, schedulable command. Store in ~/.mcli/workflows/, version with lockfile, run as daemon or cron job.
|
|
5
5
|
Author-email: Luis Fernandez de la Vara <luis@lefv.io>
|
|
6
6
|
Maintainer-email: Luis Fernandez de la Vara <luis@lefv.io>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|