powerquant-cli 0.2.10__tar.gz → 0.2.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.
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/PKG-INFO +14 -2
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/README.md +13 -1
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/pyproject.toml +1 -1
- powerquant_cli-0.2.11/src/quant_cli/app/operations/cli/operations_cli.py +272 -0
- powerquant_cli-0.2.11/src/quant_cli/app/operations/schema/operation_schema.py +67 -0
- powerquant_cli-0.2.11/src/quant_cli/app/operations/service/operation_service.py +113 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/quant_cli.py +2 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/application_container.py +6 -0
- powerquant_cli-0.2.11/src/quant_cli/common/http/__init__.py +0 -0
- powerquant_cli-0.2.11/src/quant_cli/common/http/operations_client.py +68 -0
- powerquant_cli-0.2.11/src/quant_cli/common/utils/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/resources/agent_hint.md +3 -1
- powerquant_cli-0.2.11/src/quant_cli/resources/skills/pq-data-operations/SKILL.md +45 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/resources/skills/pq-research/SKILL.md +5 -0
- powerquant_cli-0.2.11/tests/__init__.py +0 -0
- powerquant_cli-0.2.11/tests/integration/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_agent_install.py +2 -1
- powerquant_cli-0.2.11/tests/unit/test_operations.py +227 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/uv.lock +1 -1
- powerquant_cli-0.2.10/src/quant_cli/resources/skills/pq-data-operations/SKILL.md +0 -37
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/.env.example +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/.gitignore +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/LICENSE +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/client.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/download.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/exceptions.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/schema/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/schema/adjustment_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/schema/bar_content_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/schema/bar_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/schema/corporate_action_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/schema/history_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/schema/pit_daily_window.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/schema/query_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/schema/quote_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/schema/reference_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/schema/reliability_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/pqdata/schema/snapshot_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/SPEC.md +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/backtest/SPEC.md +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/backtest/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/backtest/backtest_input_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/backtest/backtest_run.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/backtest/data_guard.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/backtest/historical_clock.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/backtest/legacy_result_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/backtest/metrics.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/backtest/performance_report.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/backtest/report_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/backtest/schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/backtest/service/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/backtest/service/backtest_execution_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/constants.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/domain/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/domain/trading_quantity_value.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/exceptions.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/interface/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/interface/adjustment_factor_query.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/interface/market_data_query.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/interface/market_data_verification.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/interface/market_event_source.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/interface/market_revision_query.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/interface/market_runtime_repository.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/interface/market_time_slice_source.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/repository/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/adjustment_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/corporate_action_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/event_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/exchange_operating_state.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/exchange_state_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/history_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/instrument_identity.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/market_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/pit_daily_window.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/quote_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/reliability_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/snapshot_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/schema/trading_state_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/service/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/service/calendar_coverage_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/service/prepared_data_verification_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/service/prepared_market_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/data/service/price_adjustment_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/LICENSE.vnpy +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/builtin/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/builtin/alpha101_recipe.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/builtin/alpha158_recipe.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/builtin/factor_recipe_catalog.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/computation/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/computation/factor_batch_evaluator.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/computation/factor_expression.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/computation/factor_source_loader.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/computation/operators/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/computation/operators/arithmetic_operator.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/computation/operators/cross_section_operator.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/computation/operators/time_series_operator.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/computation/panel_evaluator.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/computation/panel_expression.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/computation/python_factor_executor.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/computation/universe_filter.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/constants.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/exceptions.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/factor_dependency.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/interface/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/interface/factor_compute.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/interface/factor_execution.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/interface/factor_local_data.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/interface/factor_panel_compute.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/interface/factor_panel_input.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/interface/factor_query_store.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/interface/public/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/interface/public/factor_diagnostics.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/interface/public/factor_exposure_query.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/interface/public/factor_local.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/interface/public/factor_query.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/interface/public/factor_selection.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/model/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/repository/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/diagnostic_types.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/factor_artifact_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/factor_computation_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/factor_compute_request.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/factor_contract.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/factor_input_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/factor_panel.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/factor_publication_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/factor_query_result_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/factor_result_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/local_factor_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/panel_policy.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/selection_report.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/schema/selection_types.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/service/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/service/factor_compute_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/service/factor_diagnostic_runner.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/service/factor_diagnostics_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/service/factor_exposure_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/service/factor_input_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/service/factor_local_execution_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/service/factor_panel_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/service/factor_runtime_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/service/factor_selection_runner.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/service/published_factor_execution_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/service/selection_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/factor/visibility.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/opportunity/SPEC.md +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/opportunity/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/SPEC.md +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/bar_matcher.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/constants.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/domain/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/domain/execution_batch.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/domain/order_entity.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/domain/order_event.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/domain/order_policy.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/domain/order_value.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/fee_model.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/interface/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/interface/order_account.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/interface/order_trading_rules.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/interface/public/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/interface/public/execution_account.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/interface/public/order_events.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/interface/public/order_execution.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/interface/public/order_runtime.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/interface/public/order_submission.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/order_event_bus.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/order_execution_dependency.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/order_submission_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/schema/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/schema/order_request_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/simulation_broker.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/slippage_model.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/tradability_policy.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/order_execution/validators.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/SPEC.md +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/domain/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/domain/entitlement_entity.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/domain/portfolio_entity.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/domain/portfolio_event.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/domain/portfolio_value.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/domain/position_entity.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/domain/reservation_entity.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/interface/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/interface/public/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/interface/public/portfolio.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/interface/public/simulation_account.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/ledger_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/order_account_listener.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/portfolio_dependency.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/portfolio_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/portfolio/simulated_portfolio.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/SPEC.md +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/adapter/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/adapter/market_label_query.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/interface/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/interface/research_dataset.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/interface/research_evaluation.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/schema/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/schema/comparison_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/schema/dataset_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/schema/research_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/service/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/service/research_dataset_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/service/research_evaluation_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/research/service/research_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/SPEC.md +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/constants.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/exceptions.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/interface/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/interface/public/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/interface/public/portfolio_construction.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/interface/public/strategy.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/interface/public/strategy_market_query.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/interface/public/strategy_portfolio_reader.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/interface/strategy_factor_reader.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/interface/strategy_order_reader.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/schema/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/schema/portfolio_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/schema/portfolio_target.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/schema/python_strategy_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/schema/screener_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/schema/signal_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/schema/strategy_publication_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/schema/strategy_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/service/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/service/factor_top_n_strategy.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/service/portfolio_construction_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/service/python_strategy_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/service/screener_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/service/store_factor_reader.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/service/strategy_market_view.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/service/strategy_runtime_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/service/strategy_scheduler.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/strategies/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/strategies/momentum_volume_breakout.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/strategy_context.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/strategy/strategy_dependency.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/SPEC.md +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/domain/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/replay/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/replay/daily_state_expand.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/replay/exchange_state_resolver.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/replay/market_runtime_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/replay/market_state_resolver.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/runtime_ports.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/runtime_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/runtime_session.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/strategy_portfolio_adapter.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/trading_rule_book.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/app/trading_runtime/trading_rule_query.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/common/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/common/exceptions/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/common/exceptions/base.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/bundled/quant_core/common/local_run.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/cached_factor_screen.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/factors/ma_close_10.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/factors/max_drawdown_20d.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/factors/momentum_20d.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/factors/multi_intraday_screen.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/factors/risk_adjusted_momentum_20d.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/factors/volume_ratio_5d.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/factors/volume_weighted_close_pressure.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/full_market_screen.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/local_quant_validation.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/published_definition_validation.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/research/factor_pit_coverage.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/research/ipo_first_day.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/selection/README.md +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/selection/backtest.json +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/selection/buy_hold.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/selection/compute.json +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/selection/prepare.json +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/selection/select.json +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/strategies/bar_roundtrip.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/strategies/buy_and_hold.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/strategies/contrarian_timing.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/strategies/factor_gate_vwap.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/strategies/ipo_next_day_vwap.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/strategies/momentum_timing.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/strategies/monthly_equal_weight.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/strategies/session_roundtrip.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/strategies/trend_drawdown_guard.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/strategies/weekly_risk_adjusted_rotation.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/examples/unified_snapshot_validation.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/hatch_build.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/licenses/LICENSE.vnpy +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/api.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/agent_resources/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/agent_resources/cli/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/agent_resources/cli/agent_resource_cli.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/agent_resources/interface/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/agent_resources/interface/public/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/agent_resources/interface/public/agent_resource_sync.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/agent_resources/repository/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/agent_resources/repository/agent_resource_repository.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/agent_resources/schema/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/agent_resources/schema/agent_resource_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/agent_resources/service/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/agent_resources/service/agent_resource_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/backtest/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/backtest/cli/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/backtest/cli/local_backtest_cli.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/backtest/local_backtest_dependency.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/backtest/local_backtest_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/backtest/repository/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/backtest/repository/backtest_local_repository.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/backtest/service/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/backtest/service/backtest_application_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/backtest/service/local_backtest_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/cli_dependency.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/cli/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/cli/data_cli.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/data_dependency.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/repository/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/repository/parquet_repository.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/schema/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/schema/dataset_audit_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/schema/dataset_request_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/schema/parquet_file_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/service/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/service/bar_cache_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/service/dataset_audit_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/service/dataset_load_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/data/service/dataset_prepare_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/cli/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/cli/factor_definition_cli.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/cli/local_factor_cli.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/cli/local_selection_cli.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/interface/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/interface/local_selection_store.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/local_factor_dependency.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/repository/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/repository/factor_local_repository.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/repository/selection_local_repository.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/schema/local_selection_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/service/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/service/factor_application_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/service/factor_data_prepare_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/service/local_factor_query_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/service/local_factor_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/factor/service/local_selection_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/job/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/job/cli/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/job/cli/local_job_cli.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/job/schema/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/job/schema/local_job_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/job/service/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/job/service/local_job_service.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/app/research → powerquant_cli-0.2.11/src/quant_cli/app/operations}/__init__.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/app/research → powerquant_cli-0.2.11/src/quant_cli/app/operations}/cli/__init__.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/app/research/repository → powerquant_cli-0.2.11/src/quant_cli/app/operations/schema}/__init__.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/app/research/schema → powerquant_cli-0.2.11/src/quant_cli/app/operations/service}/__init__.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/app/research/service → powerquant_cli-0.2.11/src/quant_cli/app/research}/__init__.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/app/strategy → powerquant_cli-0.2.11/src/quant_cli/app/research/cli}/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/research/cli/local_research_cli.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/research/local_research_dependency.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/app/strategy/cli → powerquant_cli-0.2.11/src/quant_cli/app/research/repository}/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/research/repository/research_local_repository.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/app/system → powerquant_cli-0.2.11/src/quant_cli/app/research/schema}/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/research/schema/local_research_schema.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/app/system/cli → powerquant_cli-0.2.11/src/quant_cli/app/research/service}/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/research/service/local_research_execution_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/research/service/local_research_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/research/service/research_application_service.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/app/system/interface → powerquant_cli-0.2.11/src/quant_cli/app/strategy}/__init__.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/app/system/service → powerquant_cli-0.2.11/src/quant_cli/app/strategy/cli}/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/strategy/cli/strategy_cli.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/common → powerquant_cli-0.2.11/src/quant_cli/app/system}/__init__.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/common/database → powerquant_cli-0.2.11/src/quant_cli/app/system/cli}/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/system/cli/config_cli.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/system/cli/system_cli.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/common/http → powerquant_cli-0.2.11/src/quant_cli/app/system/interface}/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/system/interface/package_updater.py +0 -0
- {powerquant_cli-0.2.10/src/quant_cli/common/utils → powerquant_cli-0.2.11/src/quant_cli/app/system/service}/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/system/service/bootstrap_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/system/service/connection_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/app/system/service/upgrade_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/application_settings.py +0 -0
- {powerquant_cli-0.2.10/tests → powerquant_cli-0.2.11/src/quant_cli/common}/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/application_errors.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/command_error_handler.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/command_help.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/constants.py +0 -0
- {powerquant_cli-0.2.10/tests/integration → powerquant_cli-0.2.11/src/quant_cli/common/database}/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/database/duckdb_connection.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/filesystem.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/hashing.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/http/definition_client.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/operation_error.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/package_update_worker.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/package_updater.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/utils/cli_utils.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/utils/platform_utils.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/common/utils/runtime_environment.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/config/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/config/connection_config.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/resources/skills/pq-bootstrap/SKILL.md +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/src/quant_cli/resources/skills/pq-bootstrap/references/resources.md +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/conftest.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/factor_fixtures.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/integration/test_local_quant_storage.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/integration/test_local_selection.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/__init__.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_agent_json.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_alpha_backtest_reports.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_alpha_identity.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_alpha_market_input.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_alpha_research.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_alpha_top_n.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_backtest_run_result.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_bar_cache.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_coarse_execution_capability.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_connection_config.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_corporate_action_replay.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_d1_replay_execution_chain.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_daily_state_expand.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_daily_state_snapshot.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_daily_vwap_execution.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_data_guard.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_dataset_audit.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_definition_errors.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_domain_dependency_boundaries.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_domain_interface_boundary.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_exchange_state_execution.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_exchange_state_replay.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_exchange_state_resolver.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_exchange_state_schema.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_factor_contract.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_factor_diagnostic_runner.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_factor_diagnostics.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_factor_expression.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_factor_local_runner.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_factor_runtime_service.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_factor_selection.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_factor_selection_runner.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_ipo_vwap_study.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_local_quant_boundary.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_market_replay.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_market_trading_state.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_order_domain.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_order_submission.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_package_upgrade.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_portfolio_construction.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_portfolio_contracts.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_python_strategy_runtime.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_replay_state_boundaries.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_risk_adjusted_strategy_example.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_simulated_order_execution.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_simulated_portfolio.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_store_factor_reader.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_strategy_adjusted_view.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_strategy_domain.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_strategy_lifecycle.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_tradability_policy.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_trading_runtime_contracts.py +0 -0
- {powerquant_cli-0.2.10 → powerquant_cli-0.2.11}/tests/unit/test_trading_runtime_session.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: powerquant-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.11
|
|
4
4
|
Summary: Power Quant local research CLI
|
|
5
5
|
Project-URL: Repository, https://github.com/Kepler452Byte/power-quant
|
|
6
6
|
License-Expression: LicenseRef-PowerQuant-Proprietary AND MIT
|
|
@@ -96,10 +96,22 @@ pq init
|
|
|
96
96
|
|
|
97
97
|
`pq init` 先返回安装计划。使用返回的 `data.expected_plan` 执行 `pq init --confirm --expected-plan <expected_plan>`,默认安装到 Codex 的 `~/.agents/skills` 和 Claude Code 的 `~/.claude/skills`。可用 `--agent codex|claude|both` 选择客户端,或用 `--skills-dir` 指定项目目录。Hint 仅写入显式提供的 `--hint-file`,保留受管块外的内容。
|
|
98
98
|
|
|
99
|
-
没有 Token 也可以初始化;需要连接行情时,按 bootstrap Skill 申请权限并通过 `pq config token`
|
|
99
|
+
没有 Token 也可以初始化;需要连接行情时,按 bootstrap Skill 申请权限并通过 `pq config token` 安全录入。行情运维使用 `pq operations`,通过 PQData API 提交任务。
|
|
100
100
|
|
|
101
101
|
`pq upgrade` 先预览,再用 `--confirm --expected-plan <expected_plan>` 启动后台升级;通过 `pq agent upgrade-status <operation_id>` 查询结果。升级沿用 uv tool 或 pipx 安装渠道,并同步已登记的资源目录。`pq upgrade --skip-package` 仅同步资源。独立资源同步使用 `pq agent sync`,同样先预览再确认。
|
|
102
102
|
|
|
103
|
+
## 数据运维
|
|
104
|
+
|
|
105
|
+
`pq operations` 使用与行情读取相同的 market_url、平台 Token,需 market:operate 权限。入口包括 status、datasets、plan、submit、jobs 和 publish,详细参数通过各级 --help 发现。
|
|
106
|
+
|
|
107
|
+
```sh
|
|
108
|
+
pq operations status --start 2026-10-13 --end 2026-10-13
|
|
109
|
+
pq operations datasets list
|
|
110
|
+
pq operations jobs list --status running
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
所有写命令先返回 planned 和 data.expected_plan,再使用相同参数加 --confirm --expected-plan 确认。plan 确认只保存服务端计划;核对返回分片范围后,用 plan_uuid 与显式幂等键提交。submit、retry、publish 返回 submitted,任务 ID 在 data.result.job_uuid;之后用 jobs show/steps 跟踪终态并复查覆盖和版本。API 超时不自动重试或换幂等键。默认不等待、不运行本地 Worker,也不调度 Coding Agent。
|
|
114
|
+
|
|
103
115
|
## 依赖生命周期
|
|
104
116
|
|
|
105
117
|
ApplicationContainer 接收 ApplicationSettings,按需组装明确的因子、回测、研究应用 Service,CLI 从 ctx.obj 获取。Service 依赖由构造函数显式传入;不维护通用 Repository 缓存、不查询全局容器、不在缺少上下文时静默创建容器。MarketClient 按需创建并由调用方 async with 关闭,本地 Repository 使用短事务。配置、帮助和资源查看不初始化数据库或联网。
|
|
@@ -74,10 +74,22 @@ pq init
|
|
|
74
74
|
|
|
75
75
|
`pq init` 先返回安装计划。使用返回的 `data.expected_plan` 执行 `pq init --confirm --expected-plan <expected_plan>`,默认安装到 Codex 的 `~/.agents/skills` 和 Claude Code 的 `~/.claude/skills`。可用 `--agent codex|claude|both` 选择客户端,或用 `--skills-dir` 指定项目目录。Hint 仅写入显式提供的 `--hint-file`,保留受管块外的内容。
|
|
76
76
|
|
|
77
|
-
没有 Token 也可以初始化;需要连接行情时,按 bootstrap Skill 申请权限并通过 `pq config token`
|
|
77
|
+
没有 Token 也可以初始化;需要连接行情时,按 bootstrap Skill 申请权限并通过 `pq config token` 安全录入。行情运维使用 `pq operations`,通过 PQData API 提交任务。
|
|
78
78
|
|
|
79
79
|
`pq upgrade` 先预览,再用 `--confirm --expected-plan <expected_plan>` 启动后台升级;通过 `pq agent upgrade-status <operation_id>` 查询结果。升级沿用 uv tool 或 pipx 安装渠道,并同步已登记的资源目录。`pq upgrade --skip-package` 仅同步资源。独立资源同步使用 `pq agent sync`,同样先预览再确认。
|
|
80
80
|
|
|
81
|
+
## 数据运维
|
|
82
|
+
|
|
83
|
+
`pq operations` 使用与行情读取相同的 market_url、平台 Token,需 market:operate 权限。入口包括 status、datasets、plan、submit、jobs 和 publish,详细参数通过各级 --help 发现。
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
pq operations status --start 2026-10-13 --end 2026-10-13
|
|
87
|
+
pq operations datasets list
|
|
88
|
+
pq operations jobs list --status running
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
所有写命令先返回 planned 和 data.expected_plan,再使用相同参数加 --confirm --expected-plan 确认。plan 确认只保存服务端计划;核对返回分片范围后,用 plan_uuid 与显式幂等键提交。submit、retry、publish 返回 submitted,任务 ID 在 data.result.job_uuid;之后用 jobs show/steps 跟踪终态并复查覆盖和版本。API 超时不自动重试或换幂等键。默认不等待、不运行本地 Worker,也不调度 Coding Agent。
|
|
92
|
+
|
|
81
93
|
## 依赖生命周期
|
|
82
94
|
|
|
83
95
|
ApplicationContainer 接收 ApplicationSettings,按需组装明确的因子、回测、研究应用 Service,CLI 从 ctx.obj 获取。Service 依赖由构造函数显式传入;不维护通用 Repository 缓存、不查询全局容器、不在缺少上下文时静默创建容器。MarketClient 按需创建并由调用方 async with 关闭,本地 Repository 使用短事务。配置、帮助和资源查看不初始化数据库或联网。
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"""Platform operations commands: parse inputs, invoke service and emit JSON."""
|
|
2
|
+
|
|
3
|
+
from datetime import date
|
|
4
|
+
from typing import Annotated
|
|
5
|
+
|
|
6
|
+
import typer
|
|
7
|
+
|
|
8
|
+
from quant_cli.app.cli_dependency import container
|
|
9
|
+
from quant_cli.app.operations.schema.operation_schema import (
|
|
10
|
+
Dataset,
|
|
11
|
+
DateRange,
|
|
12
|
+
Mode,
|
|
13
|
+
PageInput,
|
|
14
|
+
PlanInput,
|
|
15
|
+
PublishInput,
|
|
16
|
+
RetryInput,
|
|
17
|
+
SubmitInput,
|
|
18
|
+
)
|
|
19
|
+
from quant_cli.common.command_error_handler import CommandGroup
|
|
20
|
+
from quant_cli.common.command_help import Command
|
|
21
|
+
from quant_cli.common.utils.cli_utils import cli_errors, output
|
|
22
|
+
|
|
23
|
+
app = typer.Typer(cls=CommandGroup, no_args_is_help=True, help="数据运维:查询、计划与异步任务")
|
|
24
|
+
datasets = typer.Typer(cls=CommandGroup, no_args_is_help=True, help="数据集与覆盖版本查询")
|
|
25
|
+
jobs = typer.Typer(cls=CommandGroup, no_args_is_help=True, help="运维任务与分片管理")
|
|
26
|
+
app.add_typer(datasets, name="datasets")
|
|
27
|
+
app.add_typer(jobs, name="jobs")
|
|
28
|
+
OptionString = Annotated[str, typer.Option()]
|
|
29
|
+
OptionalString = Annotated[str | None, typer.Option()]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def query(offset: int, limit: int, **filters) -> dict:
|
|
33
|
+
return {
|
|
34
|
+
**PageInput(offset=offset, limit=limit).model_dump(),
|
|
35
|
+
**{key: value for key, value in filters.items() if value is not None},
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@app.command("status", cls=Command)
|
|
40
|
+
@cli_errors
|
|
41
|
+
def data_status(ctx: typer.Context, start: OptionString, end: OptionString) -> None:
|
|
42
|
+
"""检查指定日期范围的数据证据与缺口,不推断完整性。"""
|
|
43
|
+
request = DateRange.model_validate({"start": start, "end": end})
|
|
44
|
+
output(container(ctx).operations_service.data_status(request.model_dump(mode="json")))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@datasets.command("list", cls=Command)
|
|
48
|
+
@cli_errors
|
|
49
|
+
def list_datasets(
|
|
50
|
+
ctx: typer.Context,
|
|
51
|
+
keyword: OptionalString = None,
|
|
52
|
+
publication_status: OptionalString = None,
|
|
53
|
+
coverage_status: OptionalString = None,
|
|
54
|
+
offset: int = 0,
|
|
55
|
+
limit: int = 20,
|
|
56
|
+
) -> None:
|
|
57
|
+
"""分页查询数据集,筛选由服务端执行。"""
|
|
58
|
+
output(
|
|
59
|
+
container(ctx).operations_service.datasets(
|
|
60
|
+
query(
|
|
61
|
+
offset,
|
|
62
|
+
limit,
|
|
63
|
+
keyword=keyword,
|
|
64
|
+
publication_status=publication_status,
|
|
65
|
+
coverage_status=coverage_status,
|
|
66
|
+
)
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@datasets.command("show", cls=Command)
|
|
72
|
+
@cli_errors
|
|
73
|
+
def show_dataset(ctx: typer.Context, name: Dataset) -> None:
|
|
74
|
+
"""查看数据集分区规则、数据范围与版本状态。"""
|
|
75
|
+
output(container(ctx).operations_service.dataset(name.value))
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
@datasets.command("versions", cls=Command)
|
|
79
|
+
@cli_errors
|
|
80
|
+
def dataset_versions(ctx: typer.Context, name: Dataset, offset: int = 0, limit: int = 20) -> None:
|
|
81
|
+
"""分页查询已发布的数据集版本。"""
|
|
82
|
+
output(container(ctx).operations_service.dataset(name.value, "versions", query(offset, limit)))
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
@datasets.command("coverage", cls=Command)
|
|
86
|
+
@cli_errors
|
|
87
|
+
def dataset_coverage(
|
|
88
|
+
ctx: typer.Context,
|
|
89
|
+
name: Dataset,
|
|
90
|
+
start: OptionalString = None,
|
|
91
|
+
end: OptionalString = None,
|
|
92
|
+
instrument_id: OptionalString = None,
|
|
93
|
+
status: OptionalString = None,
|
|
94
|
+
offset: int = 0,
|
|
95
|
+
limit: int = 20,
|
|
96
|
+
) -> None:
|
|
97
|
+
"""查询指定范围的覆盖凭证,缺口与未知状态保持原样。"""
|
|
98
|
+
dates = {}
|
|
99
|
+
for key, value in (("start", start), ("end", end)):
|
|
100
|
+
if value is not None:
|
|
101
|
+
dates[key] = date.fromisoformat(value).isoformat()
|
|
102
|
+
if start and end:
|
|
103
|
+
DateRange.model_validate({"start": start, "end": end})
|
|
104
|
+
output(
|
|
105
|
+
container(ctx).operations_service.dataset(
|
|
106
|
+
name.value,
|
|
107
|
+
"coverage",
|
|
108
|
+
query(offset, limit, **dates, instrument_id=instrument_id, status=status),
|
|
109
|
+
)
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
@app.command("plan", cls=Command)
|
|
114
|
+
@cli_errors
|
|
115
|
+
def create_plan(
|
|
116
|
+
ctx: typer.Context,
|
|
117
|
+
mode: Annotated[Mode, typer.Option()],
|
|
118
|
+
start: OptionString,
|
|
119
|
+
end: OptionString,
|
|
120
|
+
dataset: Annotated[list[Dataset], typer.Option()],
|
|
121
|
+
instrument_id: Annotated[list[str] | None, typer.Option()] = None,
|
|
122
|
+
confirm: bool = False,
|
|
123
|
+
expected_plan: OptionalString = None,
|
|
124
|
+
) -> None:
|
|
125
|
+
"""预览同步范围;确认后保存服务端计划,不执行同步。"""
|
|
126
|
+
request = PlanInput.model_validate(
|
|
127
|
+
{
|
|
128
|
+
"mode": mode,
|
|
129
|
+
"start": start,
|
|
130
|
+
"end": end,
|
|
131
|
+
"datasets": dataset,
|
|
132
|
+
"instrument_ids": instrument_id or [],
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
output(
|
|
136
|
+
container(ctx).operations_service.plan(
|
|
137
|
+
request.model_dump(mode="json"), confirm, expected_plan
|
|
138
|
+
),
|
|
139
|
+
status="applied" if confirm else "planned",
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
@app.command("submit", cls=Command)
|
|
144
|
+
@cli_errors
|
|
145
|
+
def submit(
|
|
146
|
+
ctx: typer.Context,
|
|
147
|
+
plan_uuid: OptionString,
|
|
148
|
+
idempotency_key: OptionString,
|
|
149
|
+
concurrency: int = 4,
|
|
150
|
+
confirm: bool = False,
|
|
151
|
+
expected_plan: OptionalString = None,
|
|
152
|
+
) -> None:
|
|
153
|
+
"""预览提交已核对的计划;确认后异步返回 job_uuid。"""
|
|
154
|
+
request = SubmitInput.model_validate(
|
|
155
|
+
{"plan_uuid": plan_uuid, "idempotency_key": idempotency_key, "concurrency": concurrency}
|
|
156
|
+
)
|
|
157
|
+
output(
|
|
158
|
+
container(ctx).operations_service.submit(
|
|
159
|
+
request.model_dump(mode="json"), confirm, expected_plan
|
|
160
|
+
),
|
|
161
|
+
status="submitted" if confirm else "planned",
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
@jobs.command("list", cls=Command)
|
|
166
|
+
@cli_errors
|
|
167
|
+
def list_jobs(
|
|
168
|
+
ctx: typer.Context,
|
|
169
|
+
status: OptionalString = None,
|
|
170
|
+
kind: OptionalString = None,
|
|
171
|
+
dataset: OptionalString = None,
|
|
172
|
+
owner_user_uuid: OptionalString = None,
|
|
173
|
+
created_start: OptionalString = None,
|
|
174
|
+
created_end: OptionalString = None,
|
|
175
|
+
offset: int = 0,
|
|
176
|
+
limit: int = 20,
|
|
177
|
+
) -> None:
|
|
178
|
+
"""分页查询任务,可按状态、类型、数据集与所属用户筛选。"""
|
|
179
|
+
output(
|
|
180
|
+
container(ctx).operations_service.jobs(
|
|
181
|
+
query(
|
|
182
|
+
offset,
|
|
183
|
+
limit,
|
|
184
|
+
status=status,
|
|
185
|
+
kind=kind,
|
|
186
|
+
dataset=dataset,
|
|
187
|
+
owner_user_uuid=owner_user_uuid,
|
|
188
|
+
created_start=created_start,
|
|
189
|
+
created_end=created_end,
|
|
190
|
+
)
|
|
191
|
+
)
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
@jobs.command("show", cls=Command)
|
|
196
|
+
@cli_errors
|
|
197
|
+
def show_job(ctx: typer.Context, job_uuid: str) -> None:
|
|
198
|
+
"""查询任务详情与终态,提交成功不代表任务完成。"""
|
|
199
|
+
output(container(ctx).operations_service.job(job_uuid))
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
@jobs.command("steps", cls=Command)
|
|
203
|
+
@cli_errors
|
|
204
|
+
def job_steps(
|
|
205
|
+
ctx: typer.Context,
|
|
206
|
+
job_uuid: str,
|
|
207
|
+
status: OptionalString = None,
|
|
208
|
+
dataset: OptionalString = None,
|
|
209
|
+
keyword: OptionalString = None,
|
|
210
|
+
offset: int = 0,
|
|
211
|
+
limit: int = 20,
|
|
212
|
+
) -> None:
|
|
213
|
+
"""分页查询分片进度与失败原因。"""
|
|
214
|
+
output(
|
|
215
|
+
container(ctx).operations_service.job(
|
|
216
|
+
job_uuid, "steps", query(offset, limit, status=status, dataset=dataset, keyword=keyword)
|
|
217
|
+
)
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
@jobs.command("retry", cls=Command)
|
|
222
|
+
@cli_errors
|
|
223
|
+
def retry_job(
|
|
224
|
+
ctx: typer.Context,
|
|
225
|
+
job_uuid: str,
|
|
226
|
+
idempotency_key: OptionString,
|
|
227
|
+
stable_key: Annotated[list[str] | None, typer.Option()] = None,
|
|
228
|
+
concurrency: int = 4,
|
|
229
|
+
confirm: bool = False,
|
|
230
|
+
expected_plan: OptionalString = None,
|
|
231
|
+
) -> None:
|
|
232
|
+
"""预览并重试授权分片,保留明确的幂等键。"""
|
|
233
|
+
request = RetryInput(
|
|
234
|
+
idempotency_key=idempotency_key, stable_keys=stable_key, concurrency=concurrency
|
|
235
|
+
)
|
|
236
|
+
output(
|
|
237
|
+
container(ctx).operations_service.retry(
|
|
238
|
+
job_uuid, request.model_dump(mode="json", exclude_none=True), confirm, expected_plan
|
|
239
|
+
),
|
|
240
|
+
status="submitted" if confirm else "planned",
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
@jobs.command("cancel", cls=Command)
|
|
245
|
+
@cli_errors
|
|
246
|
+
def cancel_job(
|
|
247
|
+
ctx: typer.Context, job_uuid: str, confirm: bool = False, expected_plan: OptionalString = None
|
|
248
|
+
) -> None:
|
|
249
|
+
"""预览目标任务并确认取消,不隐式恢复任务。"""
|
|
250
|
+
output(
|
|
251
|
+
container(ctx).operations_service.cancel(job_uuid, confirm, expected_plan),
|
|
252
|
+
status="applied" if confirm else "planned",
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
@app.command("publish", cls=Command)
|
|
257
|
+
@cli_errors
|
|
258
|
+
def publish(
|
|
259
|
+
ctx: typer.Context,
|
|
260
|
+
dataset: Annotated[list[Dataset], typer.Option()],
|
|
261
|
+
idempotency_key: OptionString,
|
|
262
|
+
confirm: bool = False,
|
|
263
|
+
expected_plan: OptionalString = None,
|
|
264
|
+
) -> None:
|
|
265
|
+
"""预览并发布已有数据版本;不隐式重新同步。"""
|
|
266
|
+
request = PublishInput(datasets=dataset, idempotency_key=idempotency_key)
|
|
267
|
+
output(
|
|
268
|
+
container(ctx).operations_service.publish(
|
|
269
|
+
request.model_dump(mode="json"), confirm, expected_plan
|
|
270
|
+
),
|
|
271
|
+
status="submitted" if confirm else "planned",
|
|
272
|
+
)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""CLI input DTOs; the backend remains authoritative for domain rules."""
|
|
2
|
+
|
|
3
|
+
from datetime import date
|
|
4
|
+
from enum import StrEnum
|
|
5
|
+
from uuid import UUID
|
|
6
|
+
|
|
7
|
+
from pydantic import BaseModel, ConfigDict, Field, model_validator
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Mode(StrEnum):
|
|
11
|
+
BOOTSTRAP = "bootstrap"
|
|
12
|
+
UPDATE = "update"
|
|
13
|
+
REPAIR = "repair"
|
|
14
|
+
AUDIT = "audit"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Dataset(StrEnum):
|
|
18
|
+
INSTRUMENT = "instrument"
|
|
19
|
+
CODE_MAPPING = "instrument_code_mapping"
|
|
20
|
+
CALENDAR = "trading_calendar"
|
|
21
|
+
RULE = "trading_rule"
|
|
22
|
+
BAR = "bar"
|
|
23
|
+
DAILY_BASIC = "daily_basic"
|
|
24
|
+
DAILY_FACT = "instrument_daily_fact"
|
|
25
|
+
ADJUSTMENT = "adjustment_factor"
|
|
26
|
+
CORPORATE_ACTION = "corporate_action"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class DateRange(BaseModel):
|
|
30
|
+
start: date
|
|
31
|
+
end: date
|
|
32
|
+
|
|
33
|
+
@model_validator(mode="after")
|
|
34
|
+
def ordered(self):
|
|
35
|
+
if self.start > self.end:
|
|
36
|
+
raise ValueError("start 不得晚于 end")
|
|
37
|
+
return self
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class PlanInput(DateRange):
|
|
41
|
+
mode: Mode
|
|
42
|
+
datasets: list[Dataset] = Field(min_length=1)
|
|
43
|
+
instrument_ids: list[str] = Field(default_factory=list)
|
|
44
|
+
frequency: str = "1d"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class SubmitInput(BaseModel):
|
|
48
|
+
plan_uuid: UUID
|
|
49
|
+
idempotency_key: str = Field(min_length=1, max_length=128)
|
|
50
|
+
concurrency: int = Field(default=4, ge=1, le=32)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class RetryInput(BaseModel):
|
|
54
|
+
idempotency_key: str = Field(min_length=1, max_length=128)
|
|
55
|
+
concurrency: int = Field(default=4, ge=1, le=32)
|
|
56
|
+
stable_keys: list[str] | None = Field(default=None, min_length=1)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class PublishInput(BaseModel):
|
|
60
|
+
datasets: list[Dataset] = Field(min_length=1, max_length=9)
|
|
61
|
+
idempotency_key: str = Field(min_length=1, max_length=128)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class PageInput(BaseModel):
|
|
65
|
+
model_config = ConfigDict(extra="forbid")
|
|
66
|
+
offset: int = Field(default=0, ge=0)
|
|
67
|
+
limit: int = Field(default=20, ge=1, le=100)
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"""Operations use cases and deterministic confirmation; no service-side execution."""
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
from collections.abc import Callable
|
|
5
|
+
from hashlib import sha256
|
|
6
|
+
from typing import Any
|
|
7
|
+
from urllib.parse import quote
|
|
8
|
+
from uuid import UUID
|
|
9
|
+
|
|
10
|
+
from quant_cli.common.http.operations_client import OperationsClient
|
|
11
|
+
from quant_cli.common.operation_error import OperationError
|
|
12
|
+
from quant_cli.config.connection_config import MarketConnection
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class OperationService:
|
|
16
|
+
def __init__(self, connection: Callable[[], MarketConnection], client: OperationsClient):
|
|
17
|
+
self.connection = connection
|
|
18
|
+
self.client = client
|
|
19
|
+
|
|
20
|
+
def _connection(self) -> MarketConnection:
|
|
21
|
+
connection = self.connection()
|
|
22
|
+
if not connection.token:
|
|
23
|
+
raise OperationError(
|
|
24
|
+
"缺少平台 Token:请申请 market:operate 权限并安全配置;参考 pq-bootstrap。",
|
|
25
|
+
"token-required",
|
|
26
|
+
2,
|
|
27
|
+
)
|
|
28
|
+
return connection
|
|
29
|
+
|
|
30
|
+
def _get(self, path: str, params: dict | None = None) -> Any:
|
|
31
|
+
c = self._connection()
|
|
32
|
+
return self.client.request(c.url, c.token, "GET", path, params=params)
|
|
33
|
+
|
|
34
|
+
def data_status(self, payload: dict) -> Any:
|
|
35
|
+
return self._get("/data-status", payload)
|
|
36
|
+
|
|
37
|
+
def datasets(self, query: dict) -> Any:
|
|
38
|
+
return self._get("/datasets", query)
|
|
39
|
+
|
|
40
|
+
def dataset(self, name: str, section: str = "", query: dict | None = None) -> Any:
|
|
41
|
+
return self._get(
|
|
42
|
+
"/datasets/" + quote(name, safe="") + ("/" + section if section else ""), query
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
def jobs(self, query: dict) -> Any:
|
|
46
|
+
return self._get("/jobs", query)
|
|
47
|
+
|
|
48
|
+
def job(self, job_uuid: str, section: str = "", query: dict | None = None) -> Any:
|
|
49
|
+
job_uuid = str(UUID(job_uuid))
|
|
50
|
+
return self._get("/jobs/" + job_uuid + ("/" + section if section else ""), query)
|
|
51
|
+
|
|
52
|
+
def _write(
|
|
53
|
+
self,
|
|
54
|
+
action: str,
|
|
55
|
+
path: str,
|
|
56
|
+
payload: dict,
|
|
57
|
+
confirm: bool,
|
|
58
|
+
expected_plan: str | None,
|
|
59
|
+
evidence: dict | None = None,
|
|
60
|
+
) -> dict:
|
|
61
|
+
c = self._connection()
|
|
62
|
+
operation = {
|
|
63
|
+
"action": action,
|
|
64
|
+
"endpoint": c.url.rstrip("/") + "/operations" + path,
|
|
65
|
+
"payload": payload,
|
|
66
|
+
"evidence": evidence,
|
|
67
|
+
}
|
|
68
|
+
# Bind confirmation to both endpoint and identity without exposing credentials.
|
|
69
|
+
identity = sha256(c.token.encode()).hexdigest()
|
|
70
|
+
signature = sha256(
|
|
71
|
+
json.dumps({**operation, "identity": identity}, sort_keys=True).encode()
|
|
72
|
+
).hexdigest()
|
|
73
|
+
if not confirm:
|
|
74
|
+
return {**operation, "expected_plan": signature, "write_performed": False}
|
|
75
|
+
if expected_plan != signature:
|
|
76
|
+
raise OperationError(
|
|
77
|
+
"操作预览已变化或缺少 expected_plan;请重新预览并确认。", "plan-conflict", 3
|
|
78
|
+
)
|
|
79
|
+
result = self.client.request(c.url, c.token, "POST", path, payload=payload)
|
|
80
|
+
return {"action": action, "result": result, "write_performed": True}
|
|
81
|
+
|
|
82
|
+
def plan(self, payload: dict, confirm: bool, expected_plan: str | None) -> dict:
|
|
83
|
+
return self._write("create_plan", "/plans", payload, confirm, expected_plan)
|
|
84
|
+
|
|
85
|
+
def submit(self, payload: dict, confirm: bool, expected_plan: str | None) -> dict:
|
|
86
|
+
return self._write("submit", "/jobs", payload, confirm, expected_plan)
|
|
87
|
+
|
|
88
|
+
def retry(self, job_uuid: str, payload: dict, confirm: bool, expected_plan: str | None) -> dict:
|
|
89
|
+
job_uuid = str(UUID(job_uuid))
|
|
90
|
+
detail = self.job(job_uuid)
|
|
91
|
+
evidence = {
|
|
92
|
+
"job_uuid": job_uuid,
|
|
93
|
+
"status": detail["status"],
|
|
94
|
+
"parameters": detail["parameters"],
|
|
95
|
+
}
|
|
96
|
+
return self._write(
|
|
97
|
+
"retry", "/jobs/" + job_uuid + "/retry", payload, confirm, expected_plan, evidence
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
def cancel(self, job_uuid: str, confirm: bool, expected_plan: str | None) -> dict:
|
|
101
|
+
job_uuid = str(UUID(job_uuid))
|
|
102
|
+
detail = self.job(job_uuid)
|
|
103
|
+
evidence = {
|
|
104
|
+
"job_uuid": job_uuid,
|
|
105
|
+
"status": detail["status"],
|
|
106
|
+
"parameters": detail["parameters"],
|
|
107
|
+
}
|
|
108
|
+
return self._write(
|
|
109
|
+
"cancel", "/jobs/" + job_uuid + "/cancel", {}, confirm, expected_plan, evidence
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
def publish(self, payload: dict, confirm: bool, expected_plan: str | None) -> dict:
|
|
113
|
+
return self._write("publish", "/dataset-publications", payload, confirm, expected_plan)
|
|
@@ -12,6 +12,7 @@ from quant_cli.app.backtest.cli.local_backtest_cli import app as backtest
|
|
|
12
12
|
from quant_cli.app.data.cli.data_cli import app as data
|
|
13
13
|
from quant_cli.app.factor.cli.local_factor_cli import app as factor
|
|
14
14
|
from quant_cli.app.job.cli.local_job_cli import app as job
|
|
15
|
+
from quant_cli.app.operations.cli.operations_cli import app as operations
|
|
15
16
|
from quant_cli.app.research.cli.local_research_cli import app as research
|
|
16
17
|
from quant_cli.app.strategy.cli.strategy_cli import app as strategy
|
|
17
18
|
from quant_cli.app.system.cli.config_cli import app as config
|
|
@@ -31,6 +32,7 @@ app = typer.Typer(
|
|
|
31
32
|
no_args_is_help=True,
|
|
32
33
|
)
|
|
33
34
|
app.add_typer(data, name="data")
|
|
35
|
+
app.add_typer(operations, name="operations")
|
|
34
36
|
app.add_typer(job, name="job")
|
|
35
37
|
app.add_typer(factor, name="factor")
|
|
36
38
|
app.add_typer(research, name="research")
|
|
@@ -13,12 +13,14 @@ from quant_cli.app.backtest.service.backtest_application_service import Backtest
|
|
|
13
13
|
from quant_cli.app.factor.repository.factor_local_repository import FactorLocalRepository
|
|
14
14
|
from quant_cli.app.factor.repository.selection_local_repository import SelectionLocalRepository
|
|
15
15
|
from quant_cli.app.factor.service.factor_application_service import FactorApplicationService
|
|
16
|
+
from quant_cli.app.operations.service.operation_service import OperationService
|
|
16
17
|
from quant_cli.app.research.repository.research_local_repository import ResearchLocalRepository
|
|
17
18
|
from quant_cli.app.research.service.research_application_service import ResearchApplicationService
|
|
18
19
|
from quant_cli.app.system.service.bootstrap_service import BootstrapService
|
|
19
20
|
from quant_cli.app.system.service.connection_service import ConnectionService
|
|
20
21
|
from quant_cli.app.system.service.upgrade_service import UpgradeService
|
|
21
22
|
from quant_cli.application_settings import ApplicationSettings
|
|
23
|
+
from quant_cli.common.http.operations_client import OperationsClient
|
|
22
24
|
from quant_cli.common.operation_error import OperationError
|
|
23
25
|
from quant_cli.common.package_updater import PackageUpdater
|
|
24
26
|
|
|
@@ -35,6 +37,10 @@ class ApplicationContainer:
|
|
|
35
37
|
self.agent_resource_service, PackageUpdater("powerquant-cli", "pq", settings.state_dir)
|
|
36
38
|
)
|
|
37
39
|
|
|
40
|
+
@cached_property
|
|
41
|
+
def operations_service(self) -> OperationService:
|
|
42
|
+
return OperationService(self.settings.market_connection, OperationsClient())
|
|
43
|
+
|
|
38
44
|
@cached_property
|
|
39
45
|
def factor_service(self) -> FactorApplicationService:
|
|
40
46
|
return FactorApplicationService(FactorLocalRepository, SelectionLocalRepository)
|
|
File without changes
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""Bounded JSON transport for the platform operations HTTP contract."""
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
from pqdata import MarketAPIError
|
|
7
|
+
|
|
8
|
+
from quant_cli.common.operation_error import OperationError
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class OperationsClient:
|
|
12
|
+
def __init__(self, transport: httpx.BaseTransport | None = None):
|
|
13
|
+
self.transport = transport
|
|
14
|
+
|
|
15
|
+
def request(
|
|
16
|
+
self,
|
|
17
|
+
base_url: str,
|
|
18
|
+
token: str,
|
|
19
|
+
method: str,
|
|
20
|
+
path: str,
|
|
21
|
+
payload: dict | None = None,
|
|
22
|
+
params: dict | None = None,
|
|
23
|
+
) -> Any:
|
|
24
|
+
try:
|
|
25
|
+
with httpx.Client(
|
|
26
|
+
timeout=60, follow_redirects=False, transport=self.transport
|
|
27
|
+
) as client:
|
|
28
|
+
response = client.request(
|
|
29
|
+
method,
|
|
30
|
+
base_url.rstrip("/") + "/operations" + path,
|
|
31
|
+
headers={"Authorization": "Bearer " + token},
|
|
32
|
+
json=payload,
|
|
33
|
+
params=params,
|
|
34
|
+
)
|
|
35
|
+
except httpx.TimeoutException as exc:
|
|
36
|
+
raise OperationError(
|
|
37
|
+
"运维请求超时;写请求可能已提交,请按原幂等键查询或重放,勿换键重复提交。",
|
|
38
|
+
"operations-timeout",
|
|
39
|
+
1,
|
|
40
|
+
) from exc
|
|
41
|
+
except httpx.RequestError as exc:
|
|
42
|
+
raise OperationError(
|
|
43
|
+
"运维服务连接失败;检查地址与网络,不要输出 Token。", "operations-connection", 1
|
|
44
|
+
) from exc
|
|
45
|
+
request_id = response.headers.get("X-Request-ID")
|
|
46
|
+
try:
|
|
47
|
+
document = response.json()
|
|
48
|
+
except ValueError:
|
|
49
|
+
document = None
|
|
50
|
+
success = 200 <= response.status_code < 300
|
|
51
|
+
if not success or (isinstance(document, dict) and document.get("code") != 0):
|
|
52
|
+
code: str | int = f"HTTP_{response.status_code}"
|
|
53
|
+
message = f"运维请求失败(HTTP {response.status_code})"
|
|
54
|
+
if isinstance(document, dict):
|
|
55
|
+
candidate = document.get("error_code", document.get("code"))
|
|
56
|
+
if isinstance(candidate, (str, int)) and not isinstance(candidate, bool):
|
|
57
|
+
code = candidate
|
|
58
|
+
value = document.get("message")
|
|
59
|
+
if isinstance(value, str) and len(value) <= 512:
|
|
60
|
+
message = value
|
|
61
|
+
if not request_id and isinstance(document.get("request_id"), str):
|
|
62
|
+
request_id = document["request_id"][:128]
|
|
63
|
+
# Never return an accidental credential echo from a remote response.
|
|
64
|
+
message = message.replace(token, "[redacted]")
|
|
65
|
+
raise MarketAPIError(response.status_code, request_id, code=code, message=message)
|
|
66
|
+
if not isinstance(document, dict) or document.get("code") != 0 or "data" not in document:
|
|
67
|
+
raise OperationError("运维响应不符合 JSON 契约", "operations-protocol", 1)
|
|
68
|
+
return document["data"]
|
|
File without changes
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# Power Quant
|
|
2
2
|
|
|
3
|
-
通过 pq --help 发现真实命令,pq --version 查看安装版本。按任务加载 pq-bootstrap(安装、连接)、pq-research(本地研究)或 pq-data-operations(
|
|
3
|
+
通过 pq --help 发现真实命令,pq --version 查看安装版本。按任务加载 pq-bootstrap(安装、连接)、pq-research(本地研究)或 pq-data-operations(pq operations 数据运维),不依次加载所有 Skill。
|
|
4
4
|
|
|
5
5
|
正常输出读取 stdout 的 status/data;错误读取 stderr 的 code/message/details/request_id 和退出码。缺 Token 时提示用户申请并安全配置,不将密钥写入命令参数、Hint或报告。
|
|
6
6
|
|
|
7
7
|
资源安装和升级先核对预览,再在既有授权范围内确认。升级 started、运维任务已提交均不代表完成;查询最终状态和实际证据。数据覆盖未知时不报告完整。
|
|
8
|
+
|
|
9
|
+
数据运维写操作先预览后确认,幂等键保持稳定;确认后的响应读取 data.result。CLI 不承担 Codex/Claude 会话调度。
|