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.
Files changed (199) hide show
  1. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/PKG-INFO +2 -2
  2. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/pyproject.toml +4 -2
  3. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/info.py +4 -1
  4. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/push.py +71 -51
  5. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/package/export.py +5 -5
  6. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/package/load.py +50 -12
  7. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli.egg-info/PKG-INFO +2 -2
  8. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli.egg-info/SOURCES.txt +1 -0
  9. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli.egg-info/requires.txt +1 -1
  10. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_lexicon_info.py +2 -1
  11. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_lexicon_sync.py +44 -107
  12. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_serve_package.py +53 -73
  13. chaoscypher_cli-0.3.0/tests/test_package_roundtrip.py +229 -0
  14. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/README.md +0 -0
  15. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/setup.cfg +0 -0
  16. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/__init__.py +0 -0
  17. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/__main__.py +0 -0
  18. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/__init__.py +0 -0
  19. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/cards.py +0 -0
  20. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/chat_dataset.py +0 -0
  21. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/composite.py +0 -0
  22. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/config.py +0 -0
  23. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/config/extraction.yaml +0 -0
  24. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/config/full.yaml +0 -0
  25. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/config/quick.yaml +0 -0
  26. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/config/workstation.yaml +0 -0
  27. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/datasets/scientific_methods_tiny/manifest.yaml +0 -0
  28. {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
  29. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/datasets/tech_encyclopedia_tiny/manifest.yaml +0 -0
  30. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/datasets/tech_encyclopedia_tiny/queries.yaml +0 -0
  31. {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
  32. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/datasets/war_and_peace_tiny/manifest.yaml +0 -0
  33. {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
  34. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/data/models_registry.yaml +0 -0
  35. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/dataset.py +0 -0
  36. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/discovery.py +0 -0
  37. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/embedding_dataset.py +0 -0
  38. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/extraction_dataset.py +0 -0
  39. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/graph_cache.py +0 -0
  40. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/graph_provider.py +0 -0
  41. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/judge_prompts.py +0 -0
  42. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/leaderboard.py +0 -0
  43. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/models.py +0 -0
  44. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/models_registry.py +0 -0
  45. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/orchestrator.py +0 -0
  46. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/queries.py +0 -0
  47. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/results.py +0 -0
  48. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/runner.py +0 -0
  49. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/scorers/__init__.py +0 -0
  50. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/scorers/chat.py +0 -0
  51. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/scorers/embedding.py +0 -0
  52. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/benchmark/scorers/v7.py +0 -0
  53. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/__init__.py +0 -0
  54. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/benchmark/__init__.py +0 -0
  55. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/benchmark/fixture.py +0 -0
  56. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/benchmark/init.py +0 -0
  57. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/benchmark/list.py +0 -0
  58. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/benchmark/run.py +0 -0
  59. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/benchmark/show.py +0 -0
  60. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/chat.py +0 -0
  61. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/chat_loop_adapter.py +0 -0
  62. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/completions.py +0 -0
  63. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/compose/__init__.py +0 -0
  64. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/compose/build.py +0 -0
  65. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/compose/down.py +0 -0
  66. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/compose/run.py +0 -0
  67. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/compose/up.py +0 -0
  68. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/config_cmd.py +0 -0
  69. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/__init__.py +0 -0
  70. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/create.py +0 -0
  71. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/current.py +0 -0
  72. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/delete.py +0 -0
  73. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/info.py +0 -0
  74. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/list.py +0 -0
  75. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/migrate.py +0 -0
  76. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/db/switch.py +0 -0
  77. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/diagnostics.py +0 -0
  78. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/doctor.py +0 -0
  79. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/graph/__init__.py +0 -0
  80. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/health.py +0 -0
  81. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/__init__.py +0 -0
  82. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/list.py +0 -0
  83. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/login.py +0 -0
  84. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/pull.py +0 -0
  85. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/remove.py +0 -0
  86. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/lexicon/search.py +0 -0
  87. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/link/__init__.py +0 -0
  88. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/link/create.py +0 -0
  89. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/link/delete.py +0 -0
  90. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/link/get.py +0 -0
  91. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/link/list.py +0 -0
  92. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/link/update.py +0 -0
  93. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/node/__init__.py +0 -0
  94. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/node/create.py +0 -0
  95. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/node/delete.py +0 -0
  96. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/node/get.py +0 -0
  97. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/node/list.py +0 -0
  98. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/node/update.py +0 -0
  99. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/package/__init__.py +0 -0
  100. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/quality/__init__.py +0 -0
  101. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/quality/analyze.py +0 -0
  102. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/quality/recalculate.py +0 -0
  103. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/quality/report.py +0 -0
  104. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/quality/score.py +0 -0
  105. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/quality/utils.py +0 -0
  106. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/render_orchestration.py +0 -0
  107. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/runtime/__init__.py +0 -0
  108. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/runtime/serve.py +0 -0
  109. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/setup.py +0 -0
  110. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/__init__.py +0 -0
  111. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/add.py +0 -0
  112. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/confirm.py +0 -0
  113. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/delete.py +0 -0
  114. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/extract.py +0 -0
  115. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/get.py +0 -0
  116. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/list.py +0 -0
  117. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/rebuild_search.py +0 -0
  118. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/source/search.py +0 -0
  119. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/__init__.py +0 -0
  120. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/create.py +0 -0
  121. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/delete.py +0 -0
  122. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/get.py +0 -0
  123. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/list.py +0 -0
  124. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/update.py +0 -0
  125. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/template/utils.py +0 -0
  126. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/upgrade.py +0 -0
  127. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/workflow/__init__.py +0 -0
  128. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/workflow/get.py +0 -0
  129. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/commands/workflow/list.py +0 -0
  130. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/context.py +0 -0
  131. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/engine_config.py +0 -0
  132. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/lazy.py +0 -0
  133. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/mcp/__init__.py +0 -0
  134. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/mcp/command.py +0 -0
  135. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/py.typed +0 -0
  136. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/sources/__init__.py +0 -0
  137. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/sources/domains.py +0 -0
  138. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/sources/pipeline.py +0 -0
  139. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/sources/service.py +0 -0
  140. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/utils/__init__.py +0 -0
  141. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/utils/console.py +0 -0
  142. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/utils/display.py +0 -0
  143. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/utils/llm_check.py +0 -0
  144. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli/utils/paths.py +0 -0
  145. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli.egg-info/dependency_links.txt +0 -0
  146. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli.egg-info/entry_points.txt +0 -0
  147. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/src/chaoscypher_cli.egg-info/top_level.txt +0 -0
  148. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_chat_loop_adapter.py +0 -0
  149. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cli_plumbing.py +0 -0
  150. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_chat.py +0 -0
  151. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_completions.py +0 -0
  152. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_compose.py +0 -0
  153. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_config.py +0 -0
  154. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_db.py +0 -0
  155. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_db_migrate.py +0 -0
  156. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_diagnostics.py +0 -0
  157. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_doctor_more.py +0 -0
  158. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_health.py +0 -0
  159. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_lexicon_login.py +0 -0
  160. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_link.py +0 -0
  161. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_node.py +0 -0
  162. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_quality_analyze.py +0 -0
  163. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_quality_report.py +0 -0
  164. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_quality_score.py +0 -0
  165. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_setup.py +0 -0
  166. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_source_add.py +0 -0
  167. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_source_extract_confirm_topup.py +0 -0
  168. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_source_get.py +0 -0
  169. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_source_misc.py +0 -0
  170. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_template.py +0 -0
  171. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_cmd_workflow.py +0 -0
  172. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_commit_extraction_results_plumbing.py +0 -0
  173. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_context.py +0 -0
  174. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_database_flag_resolution.py +0 -0
  175. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_doctor.py +0 -0
  176. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_engine_config.py +0 -0
  177. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_first_run_gate.py +0 -0
  178. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_help_text_consistency.py +0 -0
  179. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_index_normalization_parity.py +0 -0
  180. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_llm_metrics_and_quality_counters.py +0 -0
  181. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_mcp_maintenance_routing.py +0 -0
  182. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_package_export_empty_combo.py +0 -0
  183. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_add_gate.py +0 -0
  184. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_add_skip_duplicates.py +0 -0
  185. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_confirm.py +0 -0
  186. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_detect_prestep.py +0 -0
  187. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_domains_constant.py +0 -0
  188. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_extract.py +0 -0
  189. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_get_domain.py +0 -0
  190. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_get_stage_progress.py +0 -0
  191. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_list_awaiting.py +0 -0
  192. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_pipeline.py +0 -0
  193. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_source_service.py +0 -0
  194. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_sources_pipeline_more.py +0 -0
  195. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_sources_service_more.py +0 -0
  196. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_upgrade_command.py +0 -0
  197. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_upgrade_guard.py +0 -0
  198. {chaoscypher_cli-0.2.0 → chaoscypher_cli-0.3.0}/tests/test_utils_cli.py +0 -0
  199. {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.2.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<1,>=0.135.0; extra == "server"
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.2.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
- "fastapi>=0.135.0,<1",
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",
@@ -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
- console.print(f" Package Type: {pkg_info.package_type}")
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}")
@@ -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 should be a local .ccx file or directory with manifest.json
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 . --message "Major update"
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
- # Determine if we have a .ccx file or a directory
68
- if path_obj.is_file():
69
- if path_obj.suffix.lower() != ".ccx":
70
- print_error(f"File must have .ccx extension: {path_obj}")
71
- sys.exit(1)
72
- archive_path = path_obj
73
- # Try to extract manifest info from filename
74
- package_name = path_obj.stem
75
- elif path_obj.is_dir():
76
- # Check for manifest.json
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
- print_success(f"Published {result.name} v{result.version}")
146
- console.print(f" [dim]URL:[/dim] {lexicon_url}/packages/{result.name}")
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]Share with:[/dim]")
150
- console.print(f" chaoscypher pull {result.name}")
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}")
@@ -48,7 +48,7 @@ console = Console()
48
48
  "--title",
49
49
  "-t",
50
50
  default=None,
51
- help="Display title for the export (shown on the graph preview image)",
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 ExportRepository
85
+ from chaoscypher_core.services.export import CcxExporter
86
86
 
87
87
  # Create export service
88
- service = ExportRepository(
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
- zip_buffer = service.export_graph(
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(zip_buffer.getvalue())
124
+ output_path.write_bytes(data)
125
125
 
126
126
  # Display results
127
127
  file_size = output_path.stat().st_size
@@ -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 ImportOptions, ImportService
72
+ from chaoscypher_core.services.package.importer import CcxImporter, ImportOptions
73
73
 
74
- # Create import service
75
- service = ImportService(
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
- verify_checksums=True,
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(service.import_from_path(archive_path, options))
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.2.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<1,>=0.135.0; extra == "server"
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
@@ -16,4 +16,4 @@ mypy<2,>=1.20.0
16
16
 
17
17
  [server]
18
18
  uvicorn<1,>=0.44.0
19
- fastapi<1,>=0.135.0
19
+ fastapi<0.137,>=0.135.0
@@ -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 / directory happy path / not-logged-in / validation error /
13
- non-ccx file / no manifest / cancelled confirmation / hub-unreachable hint
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 / create_archive /
648
- validate_package_directory /
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(self, tmp_path: Path, name: str = "my-pkg.ccx") -> Path:
653
- ccx = tmp_path / name
654
- ccx.write_bytes(b"FAKE_ARCHIVE_CONTENT")
655
- return ccx
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 test_push_directory_no_manifest_exits_1(self, tmp_path: Path) -> None:
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 "manifest.json" in result.output
772
+ assert "directory" in result.output.lower()
773
+ assert "graph package export" in result.output
754
774
 
755
- def test_push_directory_validation_failure_exits_1(self, tmp_path: Path) -> None:
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
- pkg_dir = tmp_path / "mypkg"
758
- pkg_dir.mkdir()
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(pkg_dir)])
791
+ result = runner.invoke(push, [str(bad)])
781
792
 
782
793
  assert result.exit_code == 1
783
- assert "validation failed" in result.output.lower()
784
- assert "Missing required field" in result.output
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