@ngocsangairvds/vsaf 3.1.27 → 3.2.1

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 (303) hide show
  1. package/package.json +2 -2
  2. package/src/global.js +70 -10
  3. package/tools/skills/vds-scripts-skill/.openskills.json +6 -0
  4. package/tools/skills/vds-scripts-skill/QUALITY.md +44 -0
  5. package/tools/skills/vds-scripts-skill/SKILL.md +135 -0
  6. package/tools/skills/vds-scripts-skill/references/audit-commands.md +171 -0
  7. package/tools/skills/vds-scripts-skill/references/capability-index.md +34 -0
  8. package/tools/skills/vds-scripts-skill/references/development-commands.md +12 -0
  9. package/tools/skills/vds-scripts-skill/references/google-sheets.md +73 -0
  10. package/tools/skills/vds-scripts-skill/references/integration-commands.md +17 -0
  11. package/tools/skills/vds-scripts-skill/references/platform-bootstrap.md +31 -0
  12. package/tools/skills/vds-scripts-skill/references/specialist-routing.md +14 -0
  13. package/tools/skills/vds-scripts-skill/references/validation-commands.md +15 -0
  14. package/tools/skills/vsaf-build/SKILL.md +32 -2
  15. package/tools/skills/vsaf-ship/SKILL.md +41 -10
  16. package/tools/skills/vsaf-test/SKILL.md +8 -0
  17. package/tools/vds-scripts/.mcp.json +11 -0
  18. package/tools/vds-scripts/.secrets.baseline +133 -0
  19. package/tools/vds-scripts/AGENTS.md +152 -0
  20. package/tools/vds-scripts/CLAUDE.md +101 -0
  21. package/tools/vds-scripts/CLI_COMMAND_OPTIMIZATION.md +156 -0
  22. package/tools/vds-scripts/PACKAGE_P125B_IMPLEMENTATION_SUMMARY.md +131 -0
  23. package/tools/vds-scripts/PROJECT_COMPLETION_SUMMARY.md +45 -0
  24. package/tools/vds-scripts/README.md +97 -0
  25. package/tools/vds-scripts/bitbucket_manifest_mapping.toml +34 -0
  26. package/tools/vds-scripts/bitbucket_orchestrator/ARCHITECTURE_ANALYSIS.md +258 -0
  27. package/tools/vds-scripts/bitbucket_orchestrator/BITBUCKET_API_PRACTICES.md +393 -0
  28. package/tools/vds-scripts/bitbucket_orchestrator/EVALUATION_REPORT.md +61 -0
  29. package/tools/vds-scripts/bitbucket_orchestrator/FEATURES.md +908 -0
  30. package/tools/vds-scripts/bitbucket_orchestrator/README.md +687 -0
  31. package/tools/vds-scripts/bitbucket_orchestrator/pyproject.toml +40 -0
  32. package/tools/vds-scripts/bitbucket_orchestrator/src/vds_bitbucket_orchestrator/__init__.py +20 -0
  33. package/tools/vds-scripts/bitbucket_orchestrator/src/vds_bitbucket_orchestrator/async_client.py +657 -0
  34. package/tools/vds-scripts/bitbucket_orchestrator/src/vds_bitbucket_orchestrator/cli.py +2108 -0
  35. package/tools/vds-scripts/bitbucket_orchestrator/src/vds_bitbucket_orchestrator/client.py +2534 -0
  36. package/tools/vds-scripts/bitbucket_orchestrator/src/vds_bitbucket_orchestrator/config.py +171 -0
  37. package/tools/vds-scripts/bitbucket_orchestrator/src/vds_bitbucket_orchestrator/errors.py +67 -0
  38. package/tools/vds-scripts/bitbucket_orchestrator/src/vds_bitbucket_orchestrator/factory.py +185 -0
  39. package/tools/vds-scripts/bitbucket_orchestrator/src/vds_bitbucket_orchestrator/protocols.py +244 -0
  40. package/tools/vds-scripts/bitbucket_orchestrator/tests/__init__.py +8 -0
  41. package/tools/vds-scripts/bitbucket_orchestrator/tests/conftest.py +65 -0
  42. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_advanced_search.py +151 -0
  43. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_async_client.py +546 -0
  44. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_branch_permissions.py +145 -0
  45. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_cli.py +115 -0
  46. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_client.py +157 -0
  47. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_client_branch_conditions.py +79 -0
  48. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_client_code_advanced.py +163 -0
  49. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_client_code_file.py +32 -0
  50. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_client_deployment_environments.py +194 -0
  51. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_client_issues.py +164 -0
  52. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_client_pipelines_advanced.py +179 -0
  53. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_client_pr_blockers.py +119 -0
  54. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_client_repository_variables.py +156 -0
  55. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_code.py +98 -0
  56. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_code_advanced.py +282 -0
  57. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_code_insights.py +335 -0
  58. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_conditions.py +147 -0
  59. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_config.py +131 -0
  60. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_deployment_env.py +352 -0
  61. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_factory.py +371 -0
  62. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_fork_operations.py +204 -0
  63. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_issue_cli.py +261 -0
  64. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_pipeline_advanced.py +270 -0
  65. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_pr_blocker.py +204 -0
  66. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_protocols.py +334 -0
  67. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_repo_settings.py +343 -0
  68. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_repo_variables.py +270 -0
  69. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_webhooks.py +189 -0
  70. package/tools/vds-scripts/bitbucket_orchestrator/tests/test_workspace.py +233 -0
  71. package/tools/vds-scripts/bitbucket_orchestrator/uv.lock +742 -0
  72. package/tools/vds-scripts/confluence_orchestrator/Dockerfile +19 -0
  73. package/tools/vds-scripts/confluence_orchestrator/README.md +412 -0
  74. package/tools/vds-scripts/confluence_orchestrator/SYNC_SCRIPTS.md +127 -0
  75. package/tools/vds-scripts/confluence_orchestrator/SYNC_STANDARDIZATION.md +108 -0
  76. package/tools/vds-scripts/confluence_orchestrator/pyproject.toml +48 -0
  77. package/tools/vds-scripts/confluence_orchestrator/src/confluence_orchestrator/__init__.py +20 -0
  78. package/tools/vds-scripts/confluence_orchestrator/src/confluence_orchestrator/cli.py +2532 -0
  79. package/tools/vds-scripts/confluence_orchestrator/src/confluence_orchestrator/config.py +175 -0
  80. package/tools/vds-scripts/confluence_orchestrator/src/confluence_orchestrator/content.py +290 -0
  81. package/tools/vds-scripts/confluence_orchestrator/src/confluence_orchestrator/content_v2.py +94 -0
  82. package/tools/vds-scripts/confluence_orchestrator/src/confluence_orchestrator/crawl_tree.py +1835 -0
  83. package/tools/vds-scripts/confluence_orchestrator/src/confluence_orchestrator/errors.py +80 -0
  84. package/tools/vds-scripts/confluence_orchestrator/src/confluence_orchestrator/eventing.py +109 -0
  85. package/tools/vds-scripts/confluence_orchestrator/src/confluence_orchestrator/http.py +1114 -0
  86. package/tools/vds-scripts/confluence_orchestrator/src/confluence_orchestrator/orchestration.py +165 -0
  87. package/tools/vds-scripts/confluence_orchestrator/src/confluence_orchestrator/reporting.py +78 -0
  88. package/tools/vds-scripts/confluence_orchestrator/src/confluence_orchestrator/tree.py +121 -0
  89. package/tools/vds-scripts/confluence_orchestrator/sync_pdfs_from_markdown.py +213 -0
  90. package/tools/vds-scripts/confluence_orchestrator/sync_pdfs_to_confluence.py +305 -0
  91. package/tools/vds-scripts/confluence_orchestrator/sync_png_attachments.py +305 -0
  92. package/tools/vds-scripts/confluence_orchestrator/tests/__init__.py +0 -0
  93. package/tools/vds-scripts/confluence_orchestrator/tests/conftest.py +8 -0
  94. package/tools/vds-scripts/confluence_orchestrator/tests/test_advanced_content.py +224 -0
  95. package/tools/vds-scripts/confluence_orchestrator/tests/test_advanced_search.py +188 -0
  96. package/tools/vds-scripts/confluence_orchestrator/tests/test_cache_management.py +247 -0
  97. package/tools/vds-scripts/confluence_orchestrator/tests/test_cli.py +499 -0
  98. package/tools/vds-scripts/confluence_orchestrator/tests/test_config.py +83 -0
  99. package/tools/vds-scripts/confluence_orchestrator/tests/test_content.py +186 -0
  100. package/tools/vds-scripts/confluence_orchestrator/tests/test_content_flags.py +27 -0
  101. package/tools/vds-scripts/confluence_orchestrator/tests/test_crawl_tree.py +2250 -0
  102. package/tools/vds-scripts/confluence_orchestrator/tests/test_draft_management.py +223 -0
  103. package/tools/vds-scripts/confluence_orchestrator/tests/test_eventing.py +71 -0
  104. package/tools/vds-scripts/confluence_orchestrator/tests/test_eventing_chaos.py +37 -0
  105. package/tools/vds-scripts/confluence_orchestrator/tests/test_eventing_rate_limit.py +44 -0
  106. package/tools/vds-scripts/confluence_orchestrator/tests/test_eventing_timeout.py +49 -0
  107. package/tools/vds-scripts/confluence_orchestrator/tests/test_export.py +230 -0
  108. package/tools/vds-scripts/confluence_orchestrator/tests/test_history.py +204 -0
  109. package/tools/vds-scripts/confluence_orchestrator/tests/test_http.py +117 -0
  110. package/tools/vds-scripts/confluence_orchestrator/tests/test_orchestration.py +91 -0
  111. package/tools/vds-scripts/confluence_orchestrator/tests/test_reporting.py +24 -0
  112. package/tools/vds-scripts/confluence_orchestrator/tests/test_search_cql.py +34 -0
  113. package/tools/vds-scripts/confluence_orchestrator/tests/test_space_management.py +237 -0
  114. package/tools/vds-scripts/confluence_orchestrator/tests/test_space_permissions.py +332 -0
  115. package/tools/vds-scripts/confluence_orchestrator/tests/test_user_group_management.py +388 -0
  116. package/tools/vds-scripts/confluence_orchestrator/uv.lock +1023 -0
  117. package/tools/vds-scripts/git_orchestrator/ENHANCEMENT_SUMMARY.md +119 -0
  118. package/tools/vds-scripts/git_orchestrator/README.md +280 -0
  119. package/tools/vds-scripts/git_orchestrator/VERIFICATION_REPORT.md +152 -0
  120. package/tools/vds-scripts/git_orchestrator/pyproject.toml +35 -0
  121. package/tools/vds-scripts/git_orchestrator/src/vds_git_orchestrator/__init__.py +7 -0
  122. package/tools/vds-scripts/git_orchestrator/src/vds_git_orchestrator/__main__.py +4 -0
  123. package/tools/vds-scripts/git_orchestrator/src/vds_git_orchestrator/cli.py +847 -0
  124. package/tools/vds-scripts/git_orchestrator/src/vds_git_orchestrator/logging_config.py +63 -0
  125. package/tools/vds-scripts/git_orchestrator/src/vds_git_orchestrator/manifest.py +129 -0
  126. package/tools/vds-scripts/git_orchestrator/src/vds_git_orchestrator/orchestrator.py +819 -0
  127. package/tools/vds-scripts/git_orchestrator/src/vds_git_orchestrator/reporting.py +53 -0
  128. package/tools/vds-scripts/git_orchestrator/tests/__init__.py +0 -0
  129. package/tools/vds-scripts/git_orchestrator/tests/test_cli_settings.py +21 -0
  130. package/tools/vds-scripts/git_orchestrator/tests/test_integration.py +74 -0
  131. package/tools/vds-scripts/git_orchestrator/tests/test_manifest.py +79 -0
  132. package/tools/vds-scripts/git_orchestrator/tests/test_orchestrator.py +204 -0
  133. package/tools/vds-scripts/git_orchestrator/tests/test_public_api.py +236 -0
  134. package/tools/vds-scripts/git_orchestrator/tests/test_resilience.py +345 -0
  135. package/tools/vds-scripts/git_orchestrator/uv.lock +271 -0
  136. package/tools/vds-scripts/jira_orchestrator/README.md +770 -0
  137. package/tools/vds-scripts/jira_orchestrator/pyproject.toml +39 -0
  138. package/tools/vds-scripts/jira_orchestrator/src/vds_jira_orchestrator/__init__.py +1 -0
  139. package/tools/vds-scripts/jira_orchestrator/src/vds_jira_orchestrator/adapter.py +1320 -0
  140. package/tools/vds-scripts/jira_orchestrator/src/vds_jira_orchestrator/cli.py +2271 -0
  141. package/tools/vds-scripts/jira_orchestrator/src/vds_jira_orchestrator/config.py +138 -0
  142. package/tools/vds-scripts/jira_orchestrator/src/vds_jira_orchestrator/errors.py +67 -0
  143. package/tools/vds-scripts/jira_orchestrator/src/vds_jira_orchestrator/reporting.py +65 -0
  144. package/tools/vds-scripts/jira_orchestrator/tests/__init__.py +1 -0
  145. package/tools/vds-scripts/jira_orchestrator/tests/conftest.py +86 -0
  146. package/tools/vds-scripts/jira_orchestrator/tests/test_adapter_agile_list_payloads.py +54 -0
  147. package/tools/vds-scripts/jira_orchestrator/tests/test_adapter_bulk_operations.py +69 -0
  148. package/tools/vds-scripts/jira_orchestrator/tests/test_adapter_components.py +57 -0
  149. package/tools/vds-scripts/jira_orchestrator/tests/test_adapter_createmeta.py +45 -0
  150. package/tools/vds-scripts/jira_orchestrator/tests/test_adapter_dashboard.py +117 -0
  151. package/tools/vds-scripts/jira_orchestrator/tests/test_adapter_issue_properties.py +54 -0
  152. package/tools/vds-scripts/jira_orchestrator/tests/test_adapter_permissions_compat.py +42 -0
  153. package/tools/vds-scripts/jira_orchestrator/tests/test_adapter_reindex.py +42 -0
  154. package/tools/vds-scripts/jira_orchestrator/tests/test_adapter_remote_links.py +76 -0
  155. package/tools/vds-scripts/jira_orchestrator/tests/test_adapter_transitions.py +91 -0
  156. package/tools/vds-scripts/jira_orchestrator/tests/test_adapter_user_management.py +110 -0
  157. package/tools/vds-scripts/jira_orchestrator/tests/test_adapter_version_management.py +133 -0
  158. package/tools/vds-scripts/jira_orchestrator/tests/test_adapter_watchers.py +41 -0
  159. package/tools/vds-scripts/jira_orchestrator/tests/test_advanced_search.py +164 -0
  160. package/tools/vds-scripts/jira_orchestrator/tests/test_agile.py +256 -0
  161. package/tools/vds-scripts/jira_orchestrator/tests/test_application_properties.py +193 -0
  162. package/tools/vds-scripts/jira_orchestrator/tests/test_backlog.py +91 -0
  163. package/tools/vds-scripts/jira_orchestrator/tests/test_bulk_operations.py +277 -0
  164. package/tools/vds-scripts/jira_orchestrator/tests/test_cli.py +106 -0
  165. package/tools/vds-scripts/jira_orchestrator/tests/test_components.py +106 -0
  166. package/tools/vds-scripts/jira_orchestrator/tests/test_config.py +164 -0
  167. package/tools/vds-scripts/jira_orchestrator/tests/test_dashboard.py +122 -0
  168. package/tools/vds-scripts/jira_orchestrator/tests/test_discover_fields.py +207 -0
  169. package/tools/vds-scripts/jira_orchestrator/tests/test_filter_management.py +333 -0
  170. package/tools/vds-scripts/jira_orchestrator/tests/test_issue_archiving.py +164 -0
  171. package/tools/vds-scripts/jira_orchestrator/tests/test_issue_links.py +257 -0
  172. package/tools/vds-scripts/jira_orchestrator/tests/test_issue_properties.py +171 -0
  173. package/tools/vds-scripts/jira_orchestrator/tests/test_link_types.py +314 -0
  174. package/tools/vds-scripts/jira_orchestrator/tests/test_parse_set.py +37 -0
  175. package/tools/vds-scripts/jira_orchestrator/tests/test_permissions.py +273 -0
  176. package/tools/vds-scripts/jira_orchestrator/tests/test_reindex.py +81 -0
  177. package/tools/vds-scripts/jira_orchestrator/tests/test_remote_links.py +254 -0
  178. package/tools/vds-scripts/jira_orchestrator/tests/test_security_schemes.py +170 -0
  179. package/tools/vds-scripts/jira_orchestrator/tests/test_transitions_changelog.py +114 -0
  180. package/tools/vds-scripts/jira_orchestrator/tests/test_user_management.py +226 -0
  181. package/tools/vds-scripts/jira_orchestrator/tests/test_version_management.py +339 -0
  182. package/tools/vds-scripts/jira_orchestrator/tests/test_watchers.py +101 -0
  183. package/tools/vds-scripts/jira_orchestrator/tests/test_worklog.py +223 -0
  184. package/tools/vds-scripts/jira_orchestrator/uv.lock +738 -0
  185. package/tools/vds-scripts/mcp_server/Dockerfile +34 -0
  186. package/tools/vds-scripts/mcp_server/README.md +140 -0
  187. package/tools/vds-scripts/mcp_server/pyproject.toml +42 -0
  188. package/tools/vds-scripts/mcp_server/src/vds_mcp_server/__init__.py +4 -0
  189. package/tools/vds-scripts/mcp_server/src/vds_mcp_server/config.py +36 -0
  190. package/tools/vds-scripts/mcp_server/src/vds_mcp_server/server.py +66 -0
  191. package/tools/vds-scripts/mcp_server/src/vds_mcp_server/tools/__init__.py +14 -0
  192. package/tools/vds-scripts/mcp_server/src/vds_mcp_server/tools/bitbucket_tools.py +47 -0
  193. package/tools/vds-scripts/mcp_server/src/vds_mcp_server/tools/confluence_tools.py +59 -0
  194. package/tools/vds-scripts/mcp_server/src/vds_mcp_server/tools/git_tools.py +71 -0
  195. package/tools/vds-scripts/mcp_server/src/vds_mcp_server/tools/jira_tools.py +63 -0
  196. package/tools/vds-scripts/mcp_server/tests/__init__.py +2 -0
  197. package/tools/vds-scripts/mcp_server/tests/conftest.py +29 -0
  198. package/tools/vds-scripts/mcp_server/tests/unit/__init__.py +2 -0
  199. package/tools/vds-scripts/mcp_server/tests/unit/test_bitbucket_tools.py +25 -0
  200. package/tools/vds-scripts/mcp_server/tests/unit/test_confluence_tools.py +25 -0
  201. package/tools/vds-scripts/mcp_server/tests/unit/test_git_tools.py +32 -0
  202. package/tools/vds-scripts/mcp_server/tests/unit/test_jira_tools.py +32 -0
  203. package/tools/vds-scripts/mcp_server/tests/verification/__init__.py +2 -0
  204. package/tools/vds-scripts/mcp_server/tests/verification/test_mcp_confluence_tools.py +40 -0
  205. package/tools/vds-scripts/mcp_server/tests/verification/test_mcp_jira_tools.py +37 -0
  206. package/tools/vds-scripts/mcp_server/tests/verification/test_mcp_tool_registration.py +47 -0
  207. package/tools/vds-scripts/mcp_server/uv.lock +1032 -0
  208. package/tools/vds-scripts/mypy.ini +5 -0
  209. package/tools/vds-scripts/pyproject.toml +29 -0
  210. package/tools/vds-scripts/repo-manifest.yaml +273 -0
  211. package/tools/vds-scripts/repo-manifest.yaml.example +25 -0
  212. package/tools/vds-scripts/scripts/BRD-Validation-API.postman_collection.json +706 -0
  213. package/tools/vds-scripts/scripts/BRD-Validation-README.md +308 -0
  214. package/tools/vds-scripts/scripts/README.md +162 -0
  215. package/tools/vds-scripts/scripts/bootstrap_uv.sh +30 -0
  216. package/tools/vds-scripts/scripts/brd-validation-environment.json +51 -0
  217. package/tools/vds-scripts/scripts/brd-validation-test-results.json +13023 -0
  218. package/tools/vds-scripts/scripts/brd_coverage_report.json +276 -0
  219. package/tools/vds-scripts/scripts/create_memory_session.py +35 -0
  220. package/tools/vds-scripts/scripts/deployment/load_docker_images_offline.sh +90 -0
  221. package/tools/vds-scripts/scripts/final_completion_report.md +139 -0
  222. package/tools/vds-scripts/scripts/folder_structure_report.json +321 -0
  223. package/tools/vds-scripts/scripts/generate_completion_report.py +125 -0
  224. package/tools/vds-scripts/scripts/generate_intellij_modules.py +150 -0
  225. package/tools/vds-scripts/scripts/link_integrity_report.json +807 -0
  226. package/tools/vds-scripts/scripts/move_audit_artifact_pages.py +255 -0
  227. package/tools/vds-scripts/scripts/move_audit_artifact_pages_rest.py +165 -0
  228. package/tools/vds-scripts/scripts/move_wrong_dept_pages.py +216 -0
  229. package/tools/vds-scripts/scripts/save_intellij_memories.py +120 -0
  230. package/tools/vds-scripts/scripts/save_memories_to_vds_ai.py +83 -0
  231. package/tools/vds-scripts/scripts/save_memories_vds_style.py +129 -0
  232. package/tools/vds-scripts/scripts/search_intellij_memories.py +50 -0
  233. package/tools/vds-scripts/scripts/setup_intellij_workspace.py +65 -0
  234. package/tools/vds-scripts/scripts/target-state-automation/README.md +89 -0
  235. package/tools/vds-scripts/scripts/target-state-automation/confluence_sync_coordinator.sh +27 -0
  236. package/tools/vds-scripts/scripts/target-state-automation/coordination.sh +114 -0
  237. package/tools/vds-scripts/scripts/target-state-automation/diagram_coordinator.sh +25 -0
  238. package/tools/vds-scripts/scripts/target-state-automation/docs_root.sh +22 -0
  239. package/tools/vds-scripts/scripts/target-state-automation/generate_diagrams.sh +22 -0
  240. package/tools/vds-scripts/scripts/target-state-automation/markdown_coordinator.sh +25 -0
  241. package/tools/vds-scripts/scripts/target-state-automation/progress_dashboard.sh +17 -0
  242. package/tools/vds-scripts/scripts/target-state-automation/schema_coordinator.sh +25 -0
  243. package/tools/vds-scripts/scripts/target-state-automation/sync_confluence.sh +30 -0
  244. package/tools/vds-scripts/scripts/target-state-automation/update_dependencies.sh +19 -0
  245. package/tools/vds-scripts/scripts/target-state-automation/validate_links.sh +86 -0
  246. package/tools/vds-scripts/scripts/target-state-automation/validate_markdown.sh +52 -0
  247. package/tools/vds-scripts/scripts/target-state-automation/validate_schemas.sh +26 -0
  248. package/tools/vds-scripts/scripts/target-state-automation/validate_structure.sh +98 -0
  249. package/tools/vds-scripts/scripts/update_modules_xml.py +190 -0
  250. package/tools/vds-scripts/scripts/uv-workspace-alignment-verification-2026-03-25.md +128 -0
  251. package/tools/vds-scripts/scripts/validate_brd_coverage.py +179 -0
  252. package/tools/vds-scripts/scripts/validate_folder_structure.py +240 -0
  253. package/tools/vds-scripts/scripts/validate_link_integrity.py +272 -0
  254. package/tools/vds-scripts/scripts/vds_sh_helpers.sh +180 -0
  255. package/tools/vds-scripts/scripts/verification/phase2_portable_paths_ubuntu_docker.sh +26 -0
  256. package/tools/vds-scripts/scripts/worktree_uv.sh +48 -0
  257. package/tools/vds-scripts/uv.lock +8 -0
  258. package/tools/vds-scripts/vds_cli/README.md +126 -0
  259. package/tools/vds-scripts/vds_cli/VERIFICATION_REPORT.md +41 -0
  260. package/tools/vds-scripts/vds_cli/pyproject.toml +38 -0
  261. package/tools/vds-scripts/vds_cli/src/vds_cli/__init__.py +3 -0
  262. package/tools/vds-scripts/vds_cli/src/vds_cli/cli.py +173 -0
  263. package/tools/vds-scripts/vds_cli/src/vds_cli/docs_sync.py +1203 -0
  264. package/tools/vds-scripts/vds_cli/src/vds_cli/env.py +41 -0
  265. package/tools/vds-scripts/vds_cli/src/vds_cli/google_sheets_orchestrator/__init__.py +3 -0
  266. package/tools/vds-scripts/vds_cli/src/vds_cli/google_sheets_orchestrator/google_sheets_orchestrator.py +198 -0
  267. package/tools/vds-scripts/vds_cli/src/vds_cli/router.py +93 -0
  268. package/tools/vds-scripts/vds_cli/src/vds_cli/sync_api.py +647 -0
  269. package/tools/vds-scripts/vds_cli/src/vds_cli/sync_service.py +266 -0
  270. package/tools/vds-scripts/vds_cli/tests/__init__.py +2 -0
  271. package/tools/vds-scripts/vds_cli/tests/conftest.py +49 -0
  272. package/tools/vds-scripts/vds_cli/tests/unit/__init__.py +2 -0
  273. package/tools/vds-scripts/vds_cli/tests/unit/test_cli.py +143 -0
  274. package/tools/vds-scripts/vds_cli/tests/unit/test_docs_sync.py +422 -0
  275. package/tools/vds-scripts/vds_cli/tests/unit/test_env.py +51 -0
  276. package/tools/vds-scripts/vds_cli/tests/unit/test_router.py +72 -0
  277. package/tools/vds-scripts/vds_cli/tests/unit/test_sync_api.py +357 -0
  278. package/tools/vds-scripts/vds_cli/tests/unit/test_sync_service.py +160 -0
  279. package/tools/vds-scripts/vds_cli/tests/verification/__init__.py +2 -0
  280. package/tools/vds-scripts/vds_cli/tests/verification/test_bitbucket_real.py +33 -0
  281. package/tools/vds-scripts/vds_cli/tests/verification/test_confluence_real.py +35 -0
  282. package/tools/vds-scripts/vds_cli/tests/verification/test_jira_real.py +41 -0
  283. package/tools/vds-scripts/vds_cli/uv.lock +524 -0
  284. package/tools/vds-scripts/vds_cli_common/README.md +190 -0
  285. package/tools/vds-scripts/vds_cli_common/pyproject.toml +92 -0
  286. package/tools/vds-scripts/vds_cli_common/src/vds_cli_common/__init__.py +34 -0
  287. package/tools/vds-scripts/vds_cli_common/src/vds_cli_common/completers.py +139 -0
  288. package/tools/vds-scripts/vds_cli_common/src/vds_cli_common/context.py +201 -0
  289. package/tools/vds-scripts/vds_cli_common/src/vds_cli_common/env.py +119 -0
  290. package/tools/vds-scripts/vds_cli_common/src/vds_cli_common/errors.py +318 -0
  291. package/tools/vds-scripts/vds_cli_common/src/vds_cli_common/output.py +284 -0
  292. package/tools/vds-scripts/vds_cli_common/src/vds_cli_common/paths.py +78 -0
  293. package/tools/vds-scripts/vds_cli_common/src/vds_cli_common/testing.py +213 -0
  294. package/tools/vds-scripts/vds_cli_common/src/vds_cli_common/version.py +85 -0
  295. package/tools/vds-scripts/vds_cli_common/tests/__init__.py +1 -0
  296. package/tools/vds-scripts/vds_cli_common/tests/test_completers.py +148 -0
  297. package/tools/vds-scripts/vds_cli_common/tests/test_context.py +192 -0
  298. package/tools/vds-scripts/vds_cli_common/tests/test_env.py +102 -0
  299. package/tools/vds-scripts/vds_cli_common/tests/test_errors.py +186 -0
  300. package/tools/vds-scripts/vds_cli_common/tests/test_output.py +229 -0
  301. package/tools/vds-scripts/vds_cli_common/tests/test_paths.py +61 -0
  302. package/tools/vds-scripts/vds_cli_common/tests/test_testing.py +138 -0
  303. package/tools/vds-scripts/vds_cli_common/tests/test_version.py +64 -0
@@ -0,0 +1,204 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+ from unittest.mock import Mock
5
+
6
+ import pytest
7
+ from confluence_orchestrator.cli import app
8
+ from confluence_orchestrator.config import ConfluenceSettings
9
+ from confluence_orchestrator.http import ConfluenceClient
10
+ from typer.testing import CliRunner
11
+
12
+ runner = CliRunner()
13
+
14
+
15
+ @pytest.fixture(autouse=True)
16
+ def mock_settings(monkeypatch: pytest.MonkeyPatch) -> None:
17
+ def fake_load_settings(strict: bool = False) -> ConfluenceSettings:
18
+ return ConfluenceSettings.model_validate(
19
+ {
20
+ "VDS_USERNAME": "user",
21
+ "VDS_PASSWORD": "pass",
22
+ "INTERNAL_CONFLUENCE_TOKEN": "token-int",
23
+ "EXTERNAL_CONFLUENCE_TOKEN": "token-ext",
24
+ }
25
+ )
26
+
27
+ monkeypatch.setattr("confluence_orchestrator.cli.load_settings", fake_load_settings)
28
+
29
+
30
+ def _build_fake_client() -> tuple[ConfluenceClient, Mock]:
31
+ inner = Mock()
32
+ client = ConfluenceClient.__new__(ConfluenceClient) # type: ignore[call-arg]
33
+ client._client = inner # type: ignore[attr-defined]
34
+ client._log = Mock()
35
+ client._is_cloud = False # type: ignore[attr-defined]
36
+ client._with_retry = lambda operation, _: operation() # type: ignore[assignment]
37
+ return client, inner
38
+
39
+
40
+ # ---------------------------------------------------------------------------
41
+ # Client method coverage
42
+ # ---------------------------------------------------------------------------
43
+
44
+
45
+ def test_client_history_invokes_sdk() -> None:
46
+ client, inner = _build_fake_client()
47
+ inner.history.return_value = {"latest": True, "results": [{"number": 1, "when": "2025-01-01"}]}
48
+
49
+ result = client.history("123")
50
+
51
+ assert "latest" in result
52
+ inner.history.assert_called_once_with("123")
53
+
54
+
55
+ def test_client_get_content_history_by_version_number_invokes_sdk() -> None:
56
+ client, inner = _build_fake_client()
57
+ inner.get_content_history_by_version_number.return_value = {"id": "123", "version": 2, "title": "Version 2"}
58
+
59
+ result = client.get_content_history_by_version_number("123", 2)
60
+
61
+ assert result["version"] == 2
62
+ inner.get_content_history_by_version_number.assert_called_once_with("123", 2)
63
+
64
+
65
+ def test_client_remove_content_history_invokes_sdk() -> None:
66
+ client, inner = _build_fake_client()
67
+ inner.remove_content_history.return_value = None
68
+
69
+ result = client.remove_content_history("123", 2)
70
+
71
+ assert result is None
72
+ inner.remove_content_history.assert_called_once_with("123", 2)
73
+
74
+
75
+ # ---------------------------------------------------------------------------
76
+ # CLI command coverage
77
+ # ---------------------------------------------------------------------------
78
+
79
+
80
+ class DummyHistoryClient:
81
+ def __init__(self) -> None:
82
+ self.calls: list[tuple[str, tuple[Any, ...], dict[str, Any]]] = []
83
+
84
+ def history(self, page_id: str) -> dict[str, Any]:
85
+ self.calls.append(("history", (page_id,), {}))
86
+ return {"latest": True, "results": [{"number": 1}]}
87
+
88
+ def get_content_history_by_version_number(self, page_id: str, version: int) -> dict[str, Any]:
89
+ self.calls.append(("get_content_history_by_version_number", (page_id, version), {}))
90
+ return {"id": page_id, "version": version}
91
+
92
+ def remove_content_history(self, page_id: str, version: int) -> None:
93
+ self.calls.append(("remove_content_history", (page_id, version), {}))
94
+
95
+
96
+ def test_cli_history_get_success(monkeypatch: pytest.MonkeyPatch) -> None:
97
+ client = DummyHistoryClient()
98
+ monkeypatch.setattr("confluence_orchestrator.cli._build_http_client", lambda *args: client)
99
+
100
+ result = runner.invoke(app, ["history", "get", "--page-id", "123"])
101
+
102
+ assert result.exit_code == 0
103
+ assert "123" in result.stdout
104
+ assert len(client.calls) == 1
105
+ assert client.calls[0][0] == "history"
106
+
107
+
108
+ def test_cli_history_get_requires_page_id(monkeypatch: pytest.MonkeyPatch) -> None:
109
+ client = DummyHistoryClient()
110
+ monkeypatch.setattr("confluence_orchestrator.cli._build_http_client", lambda *args: client)
111
+
112
+ result = runner.invoke(app, ["history", "get"])
113
+
114
+ assert result.exit_code != 0
115
+ assert "--page-id required" in result.stdout or "--page-id required" in result.stderr
116
+
117
+
118
+ def test_cli_history_version_success(monkeypatch: pytest.MonkeyPatch) -> None:
119
+ client = DummyHistoryClient()
120
+ monkeypatch.setattr("confluence_orchestrator.cli._build_http_client", lambda *args: client)
121
+
122
+ result = runner.invoke(app, ["history", "version", "--page-id", "123", "--version", "2"])
123
+
124
+ assert result.exit_code == 0
125
+ assert "123" in result.stdout
126
+ assert "2" in result.stdout
127
+ assert len(client.calls) == 1
128
+ assert client.calls[0][0] == "get_content_history_by_version_number"
129
+ assert client.calls[0][1][1] == 2
130
+
131
+
132
+ def test_cli_history_version_requires_page_id(monkeypatch: pytest.MonkeyPatch) -> None:
133
+ client = DummyHistoryClient()
134
+ monkeypatch.setattr("confluence_orchestrator.cli._build_http_client", lambda *args: client)
135
+
136
+ result = runner.invoke(app, ["history", "version", "--version", "2"])
137
+
138
+ assert result.exit_code != 0
139
+ assert "--page-id required" in result.stdout or "--page-id required" in result.stderr
140
+
141
+
142
+ def test_cli_history_version_requires_version(monkeypatch: pytest.MonkeyPatch) -> None:
143
+ client = DummyHistoryClient()
144
+ monkeypatch.setattr("confluence_orchestrator.cli._build_http_client", lambda *args: client)
145
+
146
+ result = runner.invoke(app, ["history", "version", "--page-id", "123"])
147
+
148
+ assert result.exit_code != 0
149
+ assert "--version required" in result.stdout or "--version required" in result.stderr
150
+
151
+
152
+ def test_cli_history_remove_success(monkeypatch: pytest.MonkeyPatch) -> None:
153
+ client = DummyHistoryClient()
154
+ monkeypatch.setattr("confluence_orchestrator.cli._build_http_client", lambda *args: client)
155
+
156
+ result = runner.invoke(app, ["history", "remove", "--page-id", "123", "--version", "2", "--yes"])
157
+
158
+ assert result.exit_code == 0
159
+ assert "removed" in result.stdout
160
+ assert "experimental" in result.stderr
161
+ assert len(client.calls) == 1
162
+ assert client.calls[0][0] == "remove_content_history"
163
+
164
+
165
+ def test_cli_history_remove_requires_yes(monkeypatch: pytest.MonkeyPatch) -> None:
166
+ client = DummyHistoryClient()
167
+ monkeypatch.setattr("confluence_orchestrator.cli._build_http_client", lambda *args: client)
168
+
169
+ result = runner.invoke(app, ["history", "remove", "--page-id", "123", "--version", "2"])
170
+
171
+ assert result.exit_code != 0
172
+ assert "--yes required" in result.stdout or "--yes required" in result.stderr
173
+ assert "experimental" in result.stdout or "experimental" in result.stderr
174
+
175
+
176
+ def test_cli_history_remove_requires_page_id(monkeypatch: pytest.MonkeyPatch) -> None:
177
+ client = DummyHistoryClient()
178
+ monkeypatch.setattr("confluence_orchestrator.cli._build_http_client", lambda *args: client)
179
+
180
+ result = runner.invoke(app, ["history", "remove", "--version", "2", "--yes"])
181
+
182
+ assert result.exit_code != 0
183
+ assert "--page-id required" in result.stdout or "--page-id required" in result.stderr
184
+
185
+
186
+ def test_cli_history_remove_requires_version(monkeypatch: pytest.MonkeyPatch) -> None:
187
+ client = DummyHistoryClient()
188
+ monkeypatch.setattr("confluence_orchestrator.cli._build_http_client", lambda *args: client)
189
+
190
+ result = runner.invoke(app, ["history", "remove", "--page-id", "123", "--yes"])
191
+
192
+ assert result.exit_code != 0
193
+ assert "--version required" in result.stdout or "--version required" in result.stderr
194
+
195
+
196
+ def test_cli_history_invalid_action(monkeypatch: pytest.MonkeyPatch) -> None:
197
+ client = DummyHistoryClient()
198
+ monkeypatch.setattr("confluence_orchestrator.cli._build_http_client", lambda *args: client)
199
+
200
+ result = runner.invoke(app, ["history", "invalid"])
201
+
202
+ assert result.exit_code != 0
203
+ assert "Unknown action" in result.stdout or "Unknown action" in result.stderr
204
+
@@ -0,0 +1,117 @@
1
+ from __future__ import annotations
2
+
3
+ from unittest.mock import MagicMock
4
+
5
+ import httpx
6
+ import pytest
7
+ from confluence_orchestrator.config import ConfluenceSettings
8
+ from confluence_orchestrator.errors import (
9
+ ConfluenceAuthError,
10
+ ConfluenceClientError,
11
+ ConfluenceConflictError,
12
+ )
13
+ from confluence_orchestrator.http import ConfluenceClient, ConfluenceHttpClient, RetryConfig
14
+
15
+
16
+ @pytest.fixture()
17
+ def base_settings() -> ConfluenceSettings:
18
+ return ConfluenceSettings.model_validate(
19
+ {
20
+ "VDS_USERNAME": "user",
21
+ "VDS_PASSWORD": "pass",
22
+ "INTERNAL_CONFLUENCE_TOKEN": "token-int",
23
+ "EXTERNAL_CONFLUENCE_TOKEN": "token-ext",
24
+ }
25
+ )
26
+
27
+
28
+ def make_client(settings: ConfluenceSettings, handler: httpx.MockTransport) -> ConfluenceHttpClient:
29
+ client = httpx.Client(
30
+ base_url=str(settings.internal_url),
31
+ transport=handler,
32
+ headers={"Authorization": "Bearer token-int", "Accept": "application/json"},
33
+ )
34
+ return ConfluenceHttpClient(settings, client=client, retry_config=RetryConfig(max_attempts=3, backoff_factor=0.01, max_wait=0.05))
35
+
36
+
37
+ def test_successful_request(monkeypatch: pytest.MonkeyPatch, base_settings: ConfluenceSettings) -> None:
38
+ attempts = {"count": 0}
39
+
40
+ def handler(request: httpx.Request) -> httpx.Response:
41
+ attempts["count"] += 1
42
+ return httpx.Response(200, json={"ok": True})
43
+
44
+ client = make_client(base_settings, httpx.MockTransport(handler))
45
+ response = client.request("GET", "/rest/api/content/123")
46
+ assert response.status_code == 200
47
+ assert attempts["count"] == 1
48
+
49
+
50
+ def test_rate_limit_retry(monkeypatch: pytest.MonkeyPatch, base_settings: ConfluenceSettings) -> None:
51
+ attempts = {"count": 0}
52
+
53
+ def handler(request: httpx.Request) -> httpx.Response:
54
+ attempts["count"] += 1
55
+ if attempts["count"] == 1:
56
+ return httpx.Response(429, headers={"Retry-After": "0.01"})
57
+ return httpx.Response(200, json={"ok": True})
58
+
59
+ client = make_client(base_settings, httpx.MockTransport(handler))
60
+ response = client.request("GET", "/rest/api/content/123")
61
+ assert response.status_code == 200
62
+ assert attempts["count"] == 2
63
+
64
+
65
+ def test_conflict_raises(base_settings: ConfluenceSettings) -> None:
66
+ def handler(request: httpx.Request) -> httpx.Response:
67
+ return httpx.Response(409)
68
+
69
+ client = make_client(base_settings, httpx.MockTransport(handler))
70
+
71
+ with pytest.raises(ConfluenceConflictError):
72
+ client.request("POST", "/rest/api/content/123")
73
+
74
+
75
+ def test_missing_token_raises(base_settings: ConfluenceSettings) -> None:
76
+ stripped_settings = base_settings.model_copy(update={"internal_token": None})
77
+ with pytest.raises(ConfluenceAuthError):
78
+ ConfluenceHttpClient(stripped_settings)
79
+
80
+
81
+ def _make_stub_confluence_client() -> ConfluenceClient:
82
+ client = ConfluenceClient.__new__(ConfluenceClient)
83
+ client._log = MagicMock()
84
+ client._client = MagicMock()
85
+ client._settings = MagicMock()
86
+ client._server = "internal"
87
+ return client
88
+
89
+
90
+ def test_delete_attachment_all_versions(monkeypatch: pytest.MonkeyPatch) -> None:
91
+ client = _make_stub_confluence_client()
92
+ client._client.get_attachment_history.return_value = [{"number": 1}, {"number": 2}]
93
+ client._client.get_attachments.return_value = {"results": [{"id": "att-1", "title": "file.pdf"}]}
94
+
95
+ client.delete_attachment_by_id("123", "att-1")
96
+
97
+ client._client.delete_attachment_by_id.assert_any_call("att-1", 2)
98
+ client._client.delete_attachment_by_id.assert_any_call("att-1", 1)
99
+ assert client._client.delete_attachment_by_id.call_count == 2
100
+
101
+
102
+ def test_delete_attachment_specific_version(monkeypatch: pytest.MonkeyPatch) -> None:
103
+ client = _make_stub_confluence_client()
104
+ client._client.get_attachment_history.return_value = [{"number": 1}, {"number": 2}]
105
+
106
+ client.delete_attachment_by_id("123", "att-1", version=1)
107
+
108
+ client._client.delete_attachment_by_id.assert_called_once_with("att-1", 1)
109
+
110
+
111
+ def test_delete_attachment_requires_version_when_history_missing(monkeypatch: pytest.MonkeyPatch) -> None:
112
+ client = _make_stub_confluence_client()
113
+ client._client.get_attachment_history.return_value = []
114
+ client._client.get_attachments.return_value = {"results": []}
115
+
116
+ with pytest.raises(ConfluenceClientError):
117
+ client.delete_attachment_by_id("123", "att-1")
@@ -0,0 +1,91 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ from confluence_orchestrator.orchestration import BatchRunner, WebhookClient
6
+
7
+
8
+ class FakeClient:
9
+ def __init__(self, responses: list[dict[str, Any]]) -> None:
10
+ self.responses = responses
11
+ self.calls = 0
12
+
13
+ def search_cql(self, *_, **kwargs) -> dict[str, Any]: # noqa: ANN401
14
+ limit = kwargs.get("limit")
15
+ if self.calls < len(self.responses):
16
+ payload = dict(self.responses[self.calls])
17
+ if limit is not None:
18
+ payload["results"] = payload["results"][:limit]
19
+ else:
20
+ payload = {"results": [], "start": 0, "limit": 0}
21
+ self.calls += 1
22
+ return payload
23
+
24
+ def request(self, method: str, path: str, **kwargs: Any): # noqa: ANN401
25
+ return FakeResponse({"method": method, "path": path, **kwargs})
26
+
27
+
28
+ class FakeResponse:
29
+ def __init__(self, payload: dict[str, Any]) -> None:
30
+ self._payload = payload
31
+
32
+ def json(self) -> dict[str, Any]:
33
+ return self._payload
34
+
35
+
36
+ def test_batch_runner_scan_returns_results() -> None:
37
+ client = FakeClient(
38
+ [
39
+ {
40
+ "results": [
41
+ {"id": "10"},
42
+ {"id": "11"},
43
+ ],
44
+ "start": 0,
45
+ "limit": 2,
46
+ }
47
+ ]
48
+ )
49
+
50
+ runner = BatchRunner(client) # type: ignore[arg-type]
51
+ results = list(runner.scan("type=page", limit=2))
52
+
53
+ assert len(results) == 2
54
+ assert runner.last_metrics is not None
55
+ assert runner.last_metrics.pages_processed == 2
56
+
57
+
58
+ def test_batch_runner_snapshot() -> None:
59
+ client = FakeClient([
60
+ {
61
+ "results": [{"id": "10"}],
62
+ "start": 0,
63
+ "limit": 1,
64
+ }
65
+ ])
66
+
67
+ runner = BatchRunner(client) # type: ignore[arg-type]
68
+ payload = runner.snapshot("type=page", limit=1)
69
+
70
+ assert payload["count"] == 1
71
+ assert payload["results"][0]["id"] == "10"
72
+
73
+
74
+ def test_webhook_client_creates_lists_and_deletes() -> None:
75
+ events: list[dict[str, Any]] = []
76
+
77
+ class RecordingHttp:
78
+ def request(self, method: str, path: str, **kwargs: Any): # noqa: ANN401
79
+ events.append({"method": method, "path": path, **kwargs})
80
+ if method == "GET":
81
+ return FakeResponse([{"id": "1"}])
82
+ return FakeResponse({"id": "1"})
83
+
84
+ client = WebhookClient(RecordingHttp()) # type: ignore[arg-type]
85
+ client.create(name="Notify", url="https://example", events=["page_created"])
86
+ client.list()
87
+ client.delete("1")
88
+
89
+ assert events[0]["method"] == "POST"
90
+ assert events[1]["method"] == "GET"
91
+ assert events[2]["path"].endswith("/1")
@@ -0,0 +1,24 @@
1
+ from __future__ import annotations
2
+
3
+ from datetime import datetime
4
+ from pathlib import Path
5
+
6
+ from confluence_orchestrator.reporting import RunSummary, write_reports
7
+
8
+
9
+ def test_write_reports_creates_json_and_markdown(tmp_path: Path) -> None:
10
+ summary = RunSummary(
11
+ command="templates",
12
+ args=["--server", "internal"],
13
+ server="internal",
14
+ exit_code=0,
15
+ duration_ms=1200,
16
+ started_at=datetime(2025, 11, 4, 10, 0, 0, tzinfo=datetime.UTC),
17
+ finished_at=datetime(2025, 11, 4, 10, 0, 2, tzinfo=datetime.UTC),
18
+ )
19
+
20
+ json_path = write_reports(summary, base_dir=tmp_path, include_markdown=True)
21
+ assert json_path.exists()
22
+ md_path = json_path.with_suffix(".md")
23
+ assert md_path.exists()
24
+ assert "✅ Success" in md_path.read_text()
@@ -0,0 +1,34 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ import pytest
6
+ from confluence_orchestrator.content import ContentClient
7
+
8
+
9
+ class DummyClient:
10
+ def __init__(self) -> None:
11
+ self.calls: list[dict[str, Any]] = []
12
+
13
+ def search_cql(self, cql: str, limit: int = 25, start: int = 0, expand: Any = None, **kwargs: Any) -> dict[str, Any]: # noqa: ANN401
14
+ self.calls.append({"cql": cql, "limit": limit, "start": start, "expand": expand})
15
+ return {
16
+ "results": [
17
+ {"id": "1", "type": "page", "title": "First"},
18
+ {"id": "2", "type": "page", "title": "Second"},
19
+ ],
20
+ "start": start,
21
+ "limit": limit,
22
+ }
23
+
24
+
25
+ @pytest.fixture()
26
+ def content_client() -> ContentClient:
27
+ return ContentClient(DummyClient())
28
+
29
+
30
+ def test_search_cql_basic(content_client: ContentClient) -> None:
31
+ payload = content_client.search_cql("type=page", limit=2, start=0)
32
+ assert payload["limit"] == 2
33
+ assert len(payload["results"]) == 2
34
+ assert payload["results"][0]["title"] == "First"