chaoscypher-cli 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/PKG-INFO +2 -2
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/pyproject.toml +4 -2
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/info.py +4 -1
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/push.py +71 -51
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/package/export.py +5 -5
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/package/load.py +50 -12
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli.egg-info/PKG-INFO +2 -2
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli.egg-info/SOURCES.txt +1 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli.egg-info/requires.txt +1 -1
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_lexicon_info.py +2 -1
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_lexicon_sync.py +44 -107
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_serve_package.py +53 -73
- chaoscypher_cli-0.3.0/tests/test_package_roundtrip.py +229 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/README.md +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/setup.cfg +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/__main__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/cards.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/chat_dataset.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/composite.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/config.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/config/extraction.yaml +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/config/full.yaml +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/config/quick.yaml +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/config/workstation.yaml +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/datasets/scientific_methods_tiny/manifest.yaml +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/datasets/scientific_methods_tiny/scientific_methods_tiny.txt +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/datasets/tech_encyclopedia_tiny/manifest.yaml +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/datasets/tech_encyclopedia_tiny/queries.yaml +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/datasets/tech_encyclopedia_tiny/tech_encyclopedia_tiny.txt +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/datasets/war_and_peace_tiny/manifest.yaml +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/datasets/war_and_peace_tiny/war_and_peace_tiny.txt +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/models_registry.yaml +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/dataset.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/discovery.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/embedding_dataset.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/extraction_dataset.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/graph_cache.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/graph_provider.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/judge_prompts.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/leaderboard.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/models.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/models_registry.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/orchestrator.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/queries.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/results.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/runner.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/scorers/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/scorers/chat.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/scorers/embedding.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/scorers/v7.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/benchmark/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/benchmark/fixture.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/benchmark/init.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/benchmark/list.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/benchmark/run.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/benchmark/show.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/chat.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/chat_loop_adapter.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/completions.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/compose/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/compose/build.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/compose/down.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/compose/run.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/compose/up.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/config_cmd.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/create.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/current.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/delete.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/info.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/list.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/migrate.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/switch.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/diagnostics.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/doctor.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/graph/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/health.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/list.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/login.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/pull.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/remove.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/search.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/link/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/link/create.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/link/delete.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/link/get.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/link/list.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/link/update.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/node/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/node/create.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/node/delete.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/node/get.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/node/list.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/node/update.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/package/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/quality/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/quality/analyze.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/quality/recalculate.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/quality/report.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/quality/score.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/quality/utils.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/render_orchestration.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/runtime/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/runtime/serve.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/setup.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/add.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/confirm.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/delete.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/extract.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/get.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/list.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/rebuild_search.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/search.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/create.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/delete.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/get.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/list.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/update.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/utils.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/upgrade.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/workflow/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/workflow/get.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/workflow/list.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/context.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/engine_config.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/lazy.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/mcp/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/mcp/command.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/py.typed +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/sources/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/sources/domains.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/sources/pipeline.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/sources/service.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/utils/__init__.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/utils/console.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/utils/display.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/utils/llm_check.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/utils/paths.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli.egg-info/dependency_links.txt +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli.egg-info/entry_points.txt +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli.egg-info/top_level.txt +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_chat_loop_adapter.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cli_plumbing.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_chat.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_completions.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_compose.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_config.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_db.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_db_migrate.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_diagnostics.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_doctor_more.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_health.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_lexicon_login.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_link.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_node.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_quality_analyze.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_quality_report.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_quality_score.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_setup.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_source_add.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_source_extract_confirm_topup.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_source_get.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_source_misc.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_template.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_workflow.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_commit_extraction_results_plumbing.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_context.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_database_flag_resolution.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_doctor.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_engine_config.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_first_run_gate.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_help_text_consistency.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_index_normalization_parity.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_llm_metrics_and_quality_counters.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_mcp_maintenance_routing.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_package_export_empty_combo.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_add_gate.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_add_skip_duplicates.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_confirm.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_detect_prestep.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_domains_constant.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_extract.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_get_domain.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_get_stage_progress.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_list_awaiting.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_pipeline.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_service.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_sources_pipeline_more.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_sources_service_more.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_upgrade_command.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_upgrade_guard.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_utils_cli.py +0 -0
- {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_windows_console_encoding.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chaoscypher-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Command-line tools for Chaos Cypher knowledge graph library
|
|
5
5
|
Author-email: Denis MacPherson <denis@chaoscypher.com>
|
|
6
6
|
Maintainer-email: Denis MacPherson <denis@chaoscypher.com>
|
|
@@ -28,7 +28,7 @@ Requires-Dist: mcp<2,>=1.27.0
|
|
|
28
28
|
Requires-Dist: httpx<1,>=0.28.0
|
|
29
29
|
Provides-Extra: server
|
|
30
30
|
Requires-Dist: uvicorn<1,>=0.44.0; extra == "server"
|
|
31
|
-
Requires-Dist: fastapi<
|
|
31
|
+
Requires-Dist: fastapi<0.137,>=0.135.0; extra == "server"
|
|
32
32
|
Provides-Extra: dev
|
|
33
33
|
Requires-Dist: pytest<10,>=9.0.0; extra == "dev"
|
|
34
34
|
Requires-Dist: pytest-asyncio<2,>=1.2.0; extra == "dev"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "chaoscypher-cli"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.0"
|
|
8
8
|
description = "Command-line tools for Chaos Cypher knowledge graph library"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "AGPL-3.0-only"
|
|
@@ -43,7 +43,9 @@ dependencies = [
|
|
|
43
43
|
[project.optional-dependencies]
|
|
44
44
|
server = [
|
|
45
45
|
"uvicorn>=0.44.0,<1",
|
|
46
|
-
|
|
46
|
+
# Pinned <0.137 to match cortex: 0.137.0's router-tree refactor (fastapi/fastapi#15745)
|
|
47
|
+
# breaks empty-path routes under nested includes. See internal/TODO.md.
|
|
48
|
+
"fastapi>=0.135.0,<0.137",
|
|
47
49
|
]
|
|
48
50
|
dev = [
|
|
49
51
|
"pytest>=9.0.0,<10",
|
{chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/info.py
RENAMED
|
@@ -145,7 +145,10 @@ def _show_hub_info(package: str, version: str | None, console: Console) -> None:
|
|
|
145
145
|
|
|
146
146
|
# Show metadata
|
|
147
147
|
console.print("\n[cyan]Details:[/cyan]")
|
|
148
|
-
|
|
148
|
+
if pkg_info.conformance_classes:
|
|
149
|
+
console.print(f" Conformance: {', '.join(pkg_info.conformance_classes)}")
|
|
150
|
+
if pkg_info.is_signed is not None:
|
|
151
|
+
console.print(f" Signed: {'yes' if pkg_info.is_signed else 'no'}")
|
|
149
152
|
console.print(f" Downloads: {pkg_info.download_count:,}")
|
|
150
153
|
console.print(f" Stars: {pkg_info.star_count:,}")
|
|
151
154
|
console.print(f" Versions: {pkg_info.version_count}")
|
{chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/push.py
RENAMED
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
"""Push command - Upload packages to Lexicon Hub.
|
|
5
5
|
|
|
6
|
-
Uses the core LexiconClient to upload packages to the registry.
|
|
6
|
+
Uses the core LexiconClient to upload packages to the registry. The package
|
|
7
|
+
must be a pre-built CCX 3.0 ``.ccx`` file (build one with
|
|
8
|
+
``chaoscypher graph package export``); the archive is validated via
|
|
9
|
+
``ccx-format`` before upload.
|
|
7
10
|
|
|
8
11
|
Example:
|
|
9
12
|
chaoscypher push ./my-package.ccx
|
|
10
|
-
chaoscypher push . --message "Initial release"
|
|
13
|
+
chaoscypher push ./my-package.ccx --message "Initial release"
|
|
11
14
|
"""
|
|
12
15
|
|
|
13
16
|
from __future__ import annotations
|
|
@@ -25,31 +28,27 @@ import click
|
|
|
25
28
|
def push(path: str, message: str | None, public: bool, force: bool) -> None:
|
|
26
29
|
"""Upload a package to the Lexicon Hub.
|
|
27
30
|
|
|
28
|
-
PATH
|
|
31
|
+
PATH must be a pre-built .ccx file. Build one first with
|
|
32
|
+
``chaoscypher graph package export``.
|
|
29
33
|
|
|
30
34
|
Example:
|
|
31
35
|
chaoscypher push ./my-package.ccx
|
|
32
|
-
chaoscypher push ./my-package
|
|
33
|
-
chaoscypher push . --
|
|
34
|
-
chaoscypher push ./private-data --private
|
|
36
|
+
chaoscypher push ./my-package.ccx --message "Major update"
|
|
37
|
+
chaoscypher push ./private-data.ccx --private
|
|
35
38
|
"""
|
|
36
39
|
# Defer heavy imports to runtime (not completion time)
|
|
37
40
|
import asyncio
|
|
38
41
|
import sys
|
|
39
42
|
from pathlib import Path
|
|
40
43
|
|
|
44
|
+
import ccx
|
|
41
45
|
from rich.progress import BarColumn, Progress, TextColumn, TransferSpeedColumn
|
|
42
46
|
|
|
43
47
|
from chaoscypher_cli.commands.lexicon.login import get_auth_config, get_lexicon_url
|
|
44
48
|
from chaoscypher_cli.utils.console import get_console, print_error, print_success
|
|
45
49
|
from chaoscypher_core.exceptions import ExternalServiceError
|
|
46
50
|
from chaoscypher_core.services.lexicon import LexiconClient, LexiconClientError
|
|
47
|
-
from chaoscypher_core.services.package import
|
|
48
|
-
PackageManifest,
|
|
49
|
-
create_archive,
|
|
50
|
-
format_size,
|
|
51
|
-
validate_package_directory,
|
|
52
|
-
)
|
|
51
|
+
from chaoscypher_core.services.package import format_size
|
|
53
52
|
|
|
54
53
|
console = get_console()
|
|
55
54
|
|
|
@@ -64,49 +63,63 @@ def push(path: str, message: str | None, public: bool, force: bool) -> None:
|
|
|
64
63
|
|
|
65
64
|
path_obj = Path(path).resolve()
|
|
66
65
|
|
|
67
|
-
#
|
|
68
|
-
if path_obj.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
manifest_path = path_obj / "manifest.json"
|
|
78
|
-
if not manifest_path.exists():
|
|
79
|
-
print_error(f"No manifest.json found in {path_obj}")
|
|
80
|
-
console.print("Create one with 'chaoscypher graph package export'.")
|
|
81
|
-
sys.exit(1)
|
|
82
|
-
|
|
83
|
-
# Validate the package
|
|
84
|
-
result = validate_package_directory(path_obj)
|
|
85
|
-
if not result.is_valid:
|
|
86
|
-
print_error("Package validation failed:")
|
|
87
|
-
for error in result.errors:
|
|
88
|
-
console.print(f" [red]✗[/red] {error}")
|
|
89
|
-
sys.exit(1)
|
|
90
|
-
|
|
91
|
-
# Load manifest to get package info
|
|
92
|
-
manifest = PackageManifest.from_json(manifest_path)
|
|
93
|
-
package_name = manifest.name
|
|
94
|
-
|
|
95
|
-
# Build the archive
|
|
96
|
-
console.print("[dim]Building package archive...[/dim]")
|
|
97
|
-
safe_name = package_name.replace("/", "-")
|
|
98
|
-
archive_path = path_obj.parent / f"{safe_name}-{manifest.package_version}.ccx"
|
|
99
|
-
create_archive(path_obj, archive_path)
|
|
100
|
-
console.print(f"[green]✓[/green] Built {archive_path.name}")
|
|
101
|
-
else:
|
|
66
|
+
# A directory is no longer a supported push input: build the .ccx first.
|
|
67
|
+
if path_obj.is_dir():
|
|
68
|
+
print_error(f"Cannot push a directory: {path_obj}")
|
|
69
|
+
console.print(
|
|
70
|
+
"Build a .ccx package first with "
|
|
71
|
+
"[cyan]chaoscypher graph package export[/cyan], then push that file."
|
|
72
|
+
)
|
|
73
|
+
sys.exit(1)
|
|
74
|
+
|
|
75
|
+
if not path_obj.is_file():
|
|
102
76
|
print_error(f"Path not found: {path_obj}")
|
|
103
77
|
sys.exit(1)
|
|
104
78
|
|
|
79
|
+
if path_obj.suffix.lower() != ".ccx":
|
|
80
|
+
print_error(f"File must have .ccx extension: {path_obj}")
|
|
81
|
+
sys.exit(1)
|
|
82
|
+
|
|
83
|
+
# Validate the package and read display metadata via ccx-format.
|
|
84
|
+
try:
|
|
85
|
+
pkg = ccx.open_package(path_obj)
|
|
86
|
+
report = pkg.validate()
|
|
87
|
+
except Exception as e:
|
|
88
|
+
print_error(f"Invalid .ccx package: {e}")
|
|
89
|
+
sys.exit(1)
|
|
90
|
+
|
|
91
|
+
if not report.ok:
|
|
92
|
+
print_error("Package validation failed:")
|
|
93
|
+
for error in report.errors:
|
|
94
|
+
console.print(f" [red]✗[/red] {error}")
|
|
95
|
+
sys.exit(1)
|
|
96
|
+
|
|
97
|
+
package_name = pkg.manifest.name
|
|
98
|
+
package_version = pkg.manifest.package_version
|
|
99
|
+
|
|
100
|
+
# The hub derives the target repo from the part of ``manifest.name`` after
|
|
101
|
+
# ``owner/`` and REQUIRES the ``owner/`` segment to match the publisher's
|
|
102
|
+
# username (a mismatch is rejected with HTTP 403). We don't hard-block here
|
|
103
|
+
# — the hub is the source of truth — but a one-line heads-up makes a 403
|
|
104
|
+
# understandable rather than mysterious.
|
|
105
|
+
if "/" in package_name:
|
|
106
|
+
name_owner = package_name.split("/", 1)[0]
|
|
107
|
+
if auth.username and name_owner != auth.username:
|
|
108
|
+
console.print(
|
|
109
|
+
f" [yellow]Note:[/yellow] package owner '[bold]{name_owner}[/bold]' "
|
|
110
|
+
f"does not match your username '[bold]{auth.username}[/bold]'. "
|
|
111
|
+
"The hub publishes under your username and will reject a mismatched "
|
|
112
|
+
"owner segment (HTTP 403)."
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
archive_path = path_obj
|
|
116
|
+
|
|
105
117
|
# Read archive for upload
|
|
106
118
|
archive_bytes = archive_path.read_bytes()
|
|
107
119
|
archive_size = len(archive_bytes)
|
|
108
120
|
|
|
109
121
|
console.print(f"\n[cyan]Pushing package:[/cyan] {package_name}")
|
|
122
|
+
console.print(f" [dim]Version:[/dim] {package_version}")
|
|
110
123
|
console.print(f" [dim]File:[/dim] {archive_path.name}")
|
|
111
124
|
console.print(f" [dim]Size:[/dim] {format_size(archive_size)}")
|
|
112
125
|
console.print(f" [dim]Visibility:[/dim] {'Public' if public else 'Private'}")
|
|
@@ -142,12 +155,19 @@ def push(path: str, message: str | None, public: bool, force: bool) -> None:
|
|
|
142
155
|
|
|
143
156
|
progress.update(task, completed=archive_size)
|
|
144
157
|
|
|
145
|
-
|
|
146
|
-
|
|
158
|
+
# CCX 3.0: the hub processes uploads asynchronously and returns a
|
|
159
|
+
# job envelope (job_id/status), not finished package metadata.
|
|
160
|
+
print_success(f"Upload queued for {package_name} v{package_version}")
|
|
161
|
+
if result.status:
|
|
162
|
+
console.print(f" [dim]Status:[/dim] {result.status}")
|
|
163
|
+
if result.job_id:
|
|
164
|
+
console.print(f" [dim]Job ID:[/dim] {result.job_id}")
|
|
165
|
+
if result.message:
|
|
166
|
+
console.print(f" [dim]{result.message}[/dim]")
|
|
147
167
|
|
|
148
168
|
# Show next steps
|
|
149
|
-
console.print("\n[dim]
|
|
150
|
-
console.print(f" chaoscypher pull {
|
|
169
|
+
console.print("\n[dim]Once processing completes, share with:[/dim]")
|
|
170
|
+
console.print(f" chaoscypher pull {package_name}")
|
|
151
171
|
|
|
152
172
|
except LexiconClientError as e:
|
|
153
173
|
print_error(f"Upload failed: {e}")
|
{chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/package/export.py
RENAMED
|
@@ -48,7 +48,7 @@ console = Console()
|
|
|
48
48
|
"--title",
|
|
49
49
|
"-t",
|
|
50
50
|
default=None,
|
|
51
|
-
help="Display title for the export (
|
|
51
|
+
help="Display title for the export (stored in the package manifest)",
|
|
52
52
|
)
|
|
53
53
|
def export(
|
|
54
54
|
output: str | None,
|
|
@@ -82,10 +82,10 @@ def export(
|
|
|
82
82
|
try:
|
|
83
83
|
ctx = get_context(database_name=database)
|
|
84
84
|
|
|
85
|
-
from chaoscypher_core.services.export import
|
|
85
|
+
from chaoscypher_core.services.export import CcxExporter
|
|
86
86
|
|
|
87
87
|
# Create export service
|
|
88
|
-
service =
|
|
88
|
+
service = CcxExporter(
|
|
89
89
|
graph_repository=ctx.graph_repository,
|
|
90
90
|
settings=ctx.settings,
|
|
91
91
|
workflow_db=None, # CLI doesn't have workflow DB for triggers
|
|
@@ -108,7 +108,7 @@ def export(
|
|
|
108
108
|
) as progress:
|
|
109
109
|
progress.add_task("Exporting knowledge graph...", total=None)
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
data = service.export(
|
|
112
112
|
include_templates=templates,
|
|
113
113
|
include_knowledge=knowledge,
|
|
114
114
|
include_lenses=lenses,
|
|
@@ -121,7 +121,7 @@ def export(
|
|
|
121
121
|
|
|
122
122
|
# Write to file
|
|
123
123
|
output_path.parent.mkdir(parents=True, exist_ok=True)
|
|
124
|
-
output_path.write_bytes(
|
|
124
|
+
output_path.write_bytes(data)
|
|
125
125
|
|
|
126
126
|
# Display results
|
|
127
127
|
file_size = output_path.stat().st_size
|
{chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/package/load.py
RENAMED
|
@@ -12,7 +12,7 @@ from __future__ import annotations
|
|
|
12
12
|
import asyncio
|
|
13
13
|
import sys
|
|
14
14
|
from pathlib import Path
|
|
15
|
-
from typing import TYPE_CHECKING
|
|
15
|
+
from typing import TYPE_CHECKING, Any
|
|
16
16
|
|
|
17
17
|
import click
|
|
18
18
|
from rich.console import Console
|
|
@@ -69,10 +69,10 @@ def load(
|
|
|
69
69
|
try:
|
|
70
70
|
ctx = get_context(database_name=database)
|
|
71
71
|
|
|
72
|
-
from chaoscypher_core.services.package.importer import
|
|
72
|
+
from chaoscypher_core.services.package.importer import CcxImporter, ImportOptions
|
|
73
73
|
|
|
74
|
-
# Create import
|
|
75
|
-
|
|
74
|
+
# Create the CCX 3.0 importer (upsert-by-IRI; re-import is idempotent).
|
|
75
|
+
importer = CcxImporter(
|
|
76
76
|
graph_repository=ctx.graph_repository,
|
|
77
77
|
sources_repository=None, # CLI doesn't have sources repo
|
|
78
78
|
workflow_db=None, # CLI doesn't have workflow DB for triggers
|
|
@@ -80,8 +80,7 @@ def load(
|
|
|
80
80
|
|
|
81
81
|
# Build options
|
|
82
82
|
options = ImportOptions(
|
|
83
|
-
|
|
84
|
-
skip_existing_templates=merge, # If merge, skip existing templates
|
|
83
|
+
skip_existing_templates=merge, # If merge, reuse local templates by name
|
|
85
84
|
import_templates=templates,
|
|
86
85
|
import_knowledge=knowledge,
|
|
87
86
|
import_workflows=workflows,
|
|
@@ -93,11 +92,6 @@ def load(
|
|
|
93
92
|
|
|
94
93
|
archive_path = Path(package)
|
|
95
94
|
|
|
96
|
-
if archive_path.suffix.lower() == ".cxl":
|
|
97
|
-
raise ValueError(
|
|
98
|
-
"The .cxl bundle format has been replaced by .ccx. Re-export the bundle."
|
|
99
|
-
)
|
|
100
|
-
|
|
101
95
|
console.print(f"[cyan]Importing:[/cyan] {archive_path.name}")
|
|
102
96
|
if merge:
|
|
103
97
|
console.print("[dim]Mode: Merge (reuse local templates by name)[/dim]")
|
|
@@ -110,7 +104,12 @@ def load(
|
|
|
110
104
|
console=console,
|
|
111
105
|
) as progress:
|
|
112
106
|
progress.add_task(f"Importing {archive_path.name}...", total=None)
|
|
113
|
-
stats = asyncio.run(
|
|
107
|
+
stats = asyncio.run(importer.import_from_path(archive_path, options))
|
|
108
|
+
|
|
109
|
+
# Make the imported knowledge nodes searchable (re-embed + index). The
|
|
110
|
+
# CLI has no queue, so unlike the worker import paths this runs inline —
|
|
111
|
+
# matching what OP_INDEX_IMPORTED_NODES does for lexicon imports.
|
|
112
|
+
_index_imported_nodes(ctx, stats)
|
|
114
113
|
|
|
115
114
|
# Display results
|
|
116
115
|
_display_import_results(stats)
|
|
@@ -123,6 +122,45 @@ def load(
|
|
|
123
122
|
sys.exit(1)
|
|
124
123
|
|
|
125
124
|
|
|
125
|
+
def _index_imported_nodes(ctx: Any, stats: ImportStats) -> None:
|
|
126
|
+
"""Re-embed + index the imported knowledge nodes so they are searchable.
|
|
127
|
+
|
|
128
|
+
The CLI has no worker/queue, so it runs the same node-indexing the worker
|
|
129
|
+
enqueues (``OP_INDEX_IMPORTED_NODES``) synchronously. Best-effort: an import
|
|
130
|
+
is still a success even if the local embedding model is unavailable (the
|
|
131
|
+
nodes are still keyword-searchable via FTS).
|
|
132
|
+
"""
|
|
133
|
+
if not stats.imported_node_ids:
|
|
134
|
+
return
|
|
135
|
+
from types import SimpleNamespace
|
|
136
|
+
|
|
137
|
+
from chaoscypher_core.operations.importing.imported_source_handler import (
|
|
138
|
+
handle_index_imported_nodes,
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
try:
|
|
142
|
+
with Progress(
|
|
143
|
+
SpinnerColumn(),
|
|
144
|
+
TextColumn("[progress.description]{task.description}"),
|
|
145
|
+
console=console,
|
|
146
|
+
) as progress:
|
|
147
|
+
progress.add_task("Indexing nodes for search...", total=None)
|
|
148
|
+
result = asyncio.run(
|
|
149
|
+
handle_index_imported_nodes(
|
|
150
|
+
data={"node_ids": stats.imported_node_ids},
|
|
151
|
+
source_repository=ctx.storage_adapter,
|
|
152
|
+
graph_repository=ctx.graph_repository,
|
|
153
|
+
# The node path only needs the embedding provider off this.
|
|
154
|
+
indexing_service=SimpleNamespace(embedding_service=ctx.embedding_service),
|
|
155
|
+
search_repository=ctx.search_repository,
|
|
156
|
+
metadata={"database_name": ctx.database_name},
|
|
157
|
+
)
|
|
158
|
+
)
|
|
159
|
+
console.print(f"[green]✓ Indexed {result.get('nodes_indexed', 0)} nodes for search[/green]")
|
|
160
|
+
except Exception as e:
|
|
161
|
+
console.print(f"[yellow]⚠ Search indexing skipped: {e}[/yellow]")
|
|
162
|
+
|
|
163
|
+
|
|
126
164
|
def _display_import_results(stats: ImportStats) -> None:
|
|
127
165
|
"""Display import statistics.
|
|
128
166
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chaoscypher-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Command-line tools for Chaos Cypher knowledge graph library
|
|
5
5
|
Author-email: Denis MacPherson <denis@chaoscypher.com>
|
|
6
6
|
Maintainer-email: Denis MacPherson <denis@chaoscypher.com>
|
|
@@ -28,7 +28,7 @@ Requires-Dist: mcp<2,>=1.27.0
|
|
|
28
28
|
Requires-Dist: httpx<1,>=0.28.0
|
|
29
29
|
Provides-Extra: server
|
|
30
30
|
Requires-Dist: uvicorn<1,>=0.44.0; extra == "server"
|
|
31
|
-
Requires-Dist: fastapi<
|
|
31
|
+
Requires-Dist: fastapi<0.137,>=0.135.0; extra == "server"
|
|
32
32
|
Provides-Extra: dev
|
|
33
33
|
Requires-Dist: pytest<10,>=9.0.0; extra == "dev"
|
|
34
34
|
Requires-Dist: pytest-asyncio<2,>=1.2.0; extra == "dev"
|
|
@@ -177,6 +177,7 @@ tests/test_index_normalization_parity.py
|
|
|
177
177
|
tests/test_llm_metrics_and_quality_counters.py
|
|
178
178
|
tests/test_mcp_maintenance_routing.py
|
|
179
179
|
tests/test_package_export_empty_combo.py
|
|
180
|
+
tests/test_package_roundtrip.py
|
|
180
181
|
tests/test_source_add_gate.py
|
|
181
182
|
tests/test_source_add_skip_duplicates.py
|
|
182
183
|
tests/test_source_confirm.py
|
|
@@ -48,13 +48,14 @@ def _make_package_info(
|
|
|
48
48
|
name=name,
|
|
49
49
|
owner_username=owner,
|
|
50
50
|
description=description,
|
|
51
|
-
package_type="FULL",
|
|
52
51
|
star_count=5,
|
|
53
52
|
version_count=3,
|
|
54
53
|
download_count=100,
|
|
55
54
|
created_at=1700000000000,
|
|
56
55
|
updated_at=1700100000000,
|
|
57
56
|
version=version,
|
|
57
|
+
conformance_classes=["ccx-core"],
|
|
58
|
+
is_signed=True,
|
|
58
59
|
)
|
|
59
60
|
|
|
60
61
|
|
|
@@ -9,8 +9,9 @@ network/filesystem I/O mocked. The test matrix is:
|
|
|
9
9
|
- list: no packages dir / empty dir / table/json/simple formats / --all flag
|
|
10
10
|
- pull: happy path / file-exists-no-force / not-found error / with extract /
|
|
11
11
|
not-authed warning / hub-unreachable hint
|
|
12
|
-
- push: ccx file happy path /
|
|
13
|
-
|
|
12
|
+
- push: ccx file happy path / not-logged-in / non-ccx file / directory rejected /
|
|
13
|
+
invalid-ccx validation failure / cancelled confirmation / client error /
|
|
14
|
+
hub-unreachable hint / private flag / message
|
|
14
15
|
- remove: ccx file / directory package / version-not-found / not-found /
|
|
15
16
|
with --force / confirm-cancelled / user-scoped path / remove --all /
|
|
16
17
|
path-traversal rejection
|
|
@@ -640,19 +641,39 @@ class TestPullCommand:
|
|
|
640
641
|
class TestPushCommand:
|
|
641
642
|
"""Tests for `chaoscypher lexicon push`.
|
|
642
643
|
|
|
644
|
+
The push contract is now: accept a PRE-BUILT CCX 3.0 ``.ccx`` file,
|
|
645
|
+
validate it via ``ccx.open_package(path).validate()``, read display
|
|
646
|
+
metadata from ``pkg.manifest`` and upload the file bytes. A directory is
|
|
647
|
+
no longer a supported input (build the .ccx with
|
|
648
|
+
``chaoscypher graph package export`` first).
|
|
649
|
+
|
|
643
650
|
push.py uses deferred (local) imports inside the function body, so all
|
|
644
651
|
patches must target the SOURCE module, not the push module namespace.
|
|
645
652
|
- get_auth_config / get_lexicon_url → chaoscypher_cli.commands.lexicon.login
|
|
646
653
|
- LexiconClient / LexiconClientError → chaoscypher_core.services.lexicon.client
|
|
647
|
-
- format_size
|
|
648
|
-
|
|
649
|
-
PackageManifest → chaoscypher_core.services.package (re-exports)
|
|
654
|
+
- format_size → chaoscypher_core.services.package (re-export)
|
|
655
|
+
Validation uses real CCX 3.0 packages built with ``ccx.PackageBuilder``.
|
|
650
656
|
"""
|
|
651
657
|
|
|
652
|
-
def _make_ccx(
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
658
|
+
def _make_ccx(
|
|
659
|
+
self,
|
|
660
|
+
tmp_path: Path,
|
|
661
|
+
filename: str = "my-pkg.ccx",
|
|
662
|
+
name: str = "my-pkg",
|
|
663
|
+
version: str = "1.0.0",
|
|
664
|
+
) -> Path:
|
|
665
|
+
"""Write a real, valid CCX 3.0 package to ``tmp_path/filename``."""
|
|
666
|
+
import ccx
|
|
667
|
+
|
|
668
|
+
builder = ccx.PackageBuilder(
|
|
669
|
+
name=name,
|
|
670
|
+
package_version=version,
|
|
671
|
+
license="CC-BY-4.0",
|
|
672
|
+
)
|
|
673
|
+
builder.add_graph("ccx", "knowledge", {"@graph": []}, role="default")
|
|
674
|
+
path = tmp_path / filename
|
|
675
|
+
path.write_bytes(builder.build())
|
|
676
|
+
return path
|
|
656
677
|
|
|
657
678
|
def _make_client_mock(self, upload_result=None):
|
|
658
679
|
upload_result = upload_result or _make_upload_result()
|
|
@@ -683,7 +704,7 @@ class TestPushCommand:
|
|
|
683
704
|
|
|
684
705
|
def test_push_ccx_file_happy_path(self, tmp_path: Path) -> None:
|
|
685
706
|
runner = CliRunner()
|
|
686
|
-
ccx = self._make_ccx(tmp_path)
|
|
707
|
+
ccx = self._make_ccx(tmp_path, name="my-pkg", version="1.0.0")
|
|
687
708
|
upload_result = _make_upload_result(name="testuser/my-pkg", version="1.0.0")
|
|
688
709
|
client_mock = self._make_client_mock(upload_result)
|
|
689
710
|
|
|
@@ -700,15 +721,12 @@ class TestPushCommand:
|
|
|
700
721
|
"chaoscypher_core.services.lexicon.LexiconClient",
|
|
701
722
|
return_value=client_mock,
|
|
702
723
|
),
|
|
703
|
-
patch(
|
|
704
|
-
"chaoscypher_core.services.package.format_size",
|
|
705
|
-
return_value="20 B",
|
|
706
|
-
),
|
|
707
724
|
):
|
|
708
725
|
result = runner.invoke(push, [str(ccx), "--force"])
|
|
709
726
|
|
|
710
727
|
assert result.exit_code == 0, result.output
|
|
711
728
|
client_mock.upload.assert_called_once()
|
|
729
|
+
# Metadata comes from the package manifest, not the filename.
|
|
712
730
|
assert "my-pkg" in result.output
|
|
713
731
|
assert "1.0.0" in result.output
|
|
714
732
|
|
|
@@ -732,7 +750,8 @@ class TestPushCommand:
|
|
|
732
750
|
assert result.exit_code == 1
|
|
733
751
|
assert ".ccx" in result.output
|
|
734
752
|
|
|
735
|
-
def
|
|
753
|
+
def test_push_directory_rejected_with_export_hint(self, tmp_path: Path) -> None:
|
|
754
|
+
"""A directory is no longer pushable: error and point to export."""
|
|
736
755
|
runner = CliRunner()
|
|
737
756
|
pkg_dir = tmp_path / "mypkg"
|
|
738
757
|
pkg_dir.mkdir()
|
|
@@ -750,18 +769,14 @@ class TestPushCommand:
|
|
|
750
769
|
result = runner.invoke(push, [str(pkg_dir)])
|
|
751
770
|
|
|
752
771
|
assert result.exit_code == 1
|
|
753
|
-
assert "
|
|
772
|
+
assert "directory" in result.output.lower()
|
|
773
|
+
assert "graph package export" in result.output
|
|
754
774
|
|
|
755
|
-
def
|
|
775
|
+
def test_push_invalid_ccx_validation_failure_exits_1(self, tmp_path: Path) -> None:
|
|
776
|
+
"""A file that is not a valid CCX package fails validation."""
|
|
756
777
|
runner = CliRunner()
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
manifest = pkg_dir / "manifest.json"
|
|
760
|
-
manifest.write_text('{"name": "bad-pkg", "version": "0.1.0"}')
|
|
761
|
-
|
|
762
|
-
validation_result = MagicMock()
|
|
763
|
-
validation_result.is_valid = False
|
|
764
|
-
validation_result.errors = ["Missing required field: description"]
|
|
778
|
+
bad = tmp_path / "broken.ccx"
|
|
779
|
+
bad.write_bytes(b"NOT_A_REAL_CCX_ZIP")
|
|
765
780
|
|
|
766
781
|
with (
|
|
767
782
|
patch(
|
|
@@ -772,71 +787,13 @@ class TestPushCommand:
|
|
|
772
787
|
"chaoscypher_cli.commands.lexicon.login.get_lexicon_url",
|
|
773
788
|
return_value="https://lexicon.test",
|
|
774
789
|
),
|
|
775
|
-
patch(
|
|
776
|
-
"chaoscypher_core.services.package.validate_package_directory",
|
|
777
|
-
return_value=validation_result,
|
|
778
|
-
),
|
|
779
790
|
):
|
|
780
|
-
result = runner.invoke(push, [str(
|
|
791
|
+
result = runner.invoke(push, [str(bad)])
|
|
781
792
|
|
|
782
793
|
assert result.exit_code == 1
|
|
783
|
-
assert
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
def test_push_directory_happy_path(self, tmp_path: Path) -> None:
|
|
787
|
-
runner = CliRunner()
|
|
788
|
-
pkg_dir = tmp_path / "mypkg"
|
|
789
|
-
pkg_dir.mkdir()
|
|
790
|
-
manifest = pkg_dir / "manifest.json"
|
|
791
|
-
manifest.write_text('{"name": "cool-pkg", "version": "2.0.0"}')
|
|
792
|
-
|
|
793
|
-
validation_result = MagicMock()
|
|
794
|
-
validation_result.is_valid = True
|
|
795
|
-
validation_result.errors = []
|
|
796
|
-
|
|
797
|
-
pkg_manifest = MagicMock()
|
|
798
|
-
pkg_manifest.name = "cool-pkg"
|
|
799
|
-
pkg_manifest.package_version = "2.0.0"
|
|
800
|
-
|
|
801
|
-
upload_result = _make_upload_result(name="testuser/cool-pkg", version="2.0.0")
|
|
802
|
-
client_mock = self._make_client_mock(upload_result)
|
|
803
|
-
|
|
804
|
-
# The archive will be written at tmp_path / "cool-pkg-2.0.0.ccx"
|
|
805
|
-
fake_archive = tmp_path / "cool-pkg-2.0.0.ccx"
|
|
806
|
-
fake_archive.write_bytes(b"ARCHIVE_BYTES")
|
|
807
|
-
|
|
808
|
-
with (
|
|
809
|
-
patch(
|
|
810
|
-
"chaoscypher_cli.commands.lexicon.login.get_auth_config",
|
|
811
|
-
return_value=MagicMock(token="tok"),
|
|
812
|
-
),
|
|
813
|
-
patch(
|
|
814
|
-
"chaoscypher_cli.commands.lexicon.login.get_lexicon_url",
|
|
815
|
-
return_value="https://lexicon.test",
|
|
816
|
-
),
|
|
817
|
-
patch(
|
|
818
|
-
"chaoscypher_core.services.package.validate_package_directory",
|
|
819
|
-
return_value=validation_result,
|
|
820
|
-
),
|
|
821
|
-
patch(
|
|
822
|
-
"chaoscypher_core.services.package.PackageManifest.from_json",
|
|
823
|
-
return_value=pkg_manifest,
|
|
824
|
-
),
|
|
825
|
-
patch("chaoscypher_core.services.package.create_archive"),
|
|
826
|
-
patch(
|
|
827
|
-
"chaoscypher_core.services.lexicon.LexiconClient",
|
|
828
|
-
return_value=client_mock,
|
|
829
|
-
),
|
|
830
|
-
patch(
|
|
831
|
-
"chaoscypher_core.services.package.format_size",
|
|
832
|
-
return_value="8 B",
|
|
833
|
-
),
|
|
834
|
-
):
|
|
835
|
-
result = runner.invoke(push, [str(pkg_dir), "--force"])
|
|
836
|
-
|
|
837
|
-
assert result.exit_code == 0, result.output
|
|
838
|
-
client_mock.upload.assert_called_once()
|
|
839
|
-
assert "cool-pkg" in result.output
|
|
794
|
+
assert (
|
|
795
|
+
"Invalid .ccx package" in result.output or "validation failed" in result.output.lower()
|
|
796
|
+
)
|
|
840
797
|
|
|
841
798
|
def test_push_confirmation_cancelled(self, tmp_path: Path) -> None:
|
|
842
799
|
runner = CliRunner()
|
|
@@ -856,10 +813,6 @@ class TestPushCommand:
|
|
|
856
813
|
"chaoscypher_core.services.lexicon.LexiconClient",
|
|
857
814
|
return_value=client_mock,
|
|
858
815
|
),
|
|
859
|
-
patch(
|
|
860
|
-
"chaoscypher_core.services.package.format_size",
|
|
861
|
-
return_value="20 B",
|
|
862
|
-
),
|
|
863
816
|
):
|
|
864
817
|
result = runner.invoke(push, [str(ccx)], input="n\n")
|
|
865
818
|
|
|
@@ -892,10 +845,6 @@ class TestPushCommand:
|
|
|
892
845
|
"chaoscypher_core.services.lexicon.LexiconClient",
|
|
893
846
|
return_value=client_mock,
|
|
894
847
|
),
|
|
895
|
-
patch(
|
|
896
|
-
"chaoscypher_core.services.package.format_size",
|
|
897
|
-
return_value="20 B",
|
|
898
|
-
),
|
|
899
848
|
):
|
|
900
849
|
result = runner.invoke(push, [str(ccx), "--force"])
|
|
901
850
|
|
|
@@ -928,10 +877,6 @@ class TestPushCommand:
|
|
|
928
877
|
"chaoscypher_core.services.lexicon.LexiconClient",
|
|
929
878
|
return_value=client_mock,
|
|
930
879
|
),
|
|
931
|
-
patch(
|
|
932
|
-
"chaoscypher_core.services.package.format_size",
|
|
933
|
-
return_value="20 B",
|
|
934
|
-
),
|
|
935
880
|
):
|
|
936
881
|
result = runner.invoke(push, [str(ccx), "--force"])
|
|
937
882
|
|
|
@@ -960,10 +905,6 @@ class TestPushCommand:
|
|
|
960
905
|
"chaoscypher_core.services.lexicon.LexiconClient",
|
|
961
906
|
return_value=client_mock,
|
|
962
907
|
),
|
|
963
|
-
patch(
|
|
964
|
-
"chaoscypher_core.services.package.format_size",
|
|
965
|
-
return_value="20 B",
|
|
966
|
-
),
|
|
967
908
|
):
|
|
968
909
|
result = runner.invoke(push, [str(ccx), "--private", "--force"])
|
|
969
910
|
|
|
@@ -988,10 +929,6 @@ class TestPushCommand:
|
|
|
988
929
|
"chaoscypher_core.services.lexicon.LexiconClient",
|
|
989
930
|
return_value=client_mock,
|
|
990
931
|
),
|
|
991
|
-
patch(
|
|
992
|
-
"chaoscypher_core.services.package.format_size",
|
|
993
|
-
return_value="20 B",
|
|
994
|
-
),
|
|
995
932
|
):
|
|
996
933
|
result = runner.invoke(push, [str(ccx), "--message", "Initial release", "--force"])
|
|
997
934
|
|