socialcli 0.3.10__tar.gz → 0.3.12__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 (201) hide show
  1. {socialcli-0.3.10 → socialcli-0.3.12}/PKG-INFO +5 -2
  2. {socialcli-0.3.10 → socialcli-0.3.12}/README.md +4 -1
  3. {socialcli-0.3.10 → socialcli-0.3.12}/pyproject.toml +12 -1
  4. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/adapters/youtube.py +11 -0
  5. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/agent_errors.py +33 -2
  6. socialcli-0.3.12/socialctl/agent_recovery.py +177 -0
  7. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/capabilities.yml +248 -0
  8. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/cli.py +120 -51
  9. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/cli_result.py +37 -2
  10. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/entrypoint.py +76 -5
  11. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/identity.py +8 -1
  12. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/inbox.py +16 -3
  13. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/inbox_cli.py +13 -11
  14. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/inventory_cli.py +12 -3
  15. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/batches.py +9 -6
  16. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/changes.py +13 -0
  17. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/cli.py +36 -0
  18. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/community_batch_cli.py +2 -0
  19. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/community_cli.py +2 -0
  20. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/owned_changes.py +35 -2
  21. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/owned_cli.py +2 -0
  22. socialcli-0.3.12/socialctl/management/proposal_routes.py +188 -0
  23. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/resource_cli.py +6 -0
  24. socialcli-0.3.12/socialctl/management/snapshot_diagnostics.py +53 -0
  25. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/youtube.py +1 -1
  26. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/youtube_metadata.py +26 -2
  27. socialcli-0.3.12/socialctl/metricas/almacen.py +311 -0
  28. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/insights.py +5 -2
  29. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/resumen.py +83 -3
  30. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/youtube.py +172 -43
  31. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/models.py +10 -0
  32. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/approval.py +3 -1
  33. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/cli.py +68 -4
  34. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/first_comment.py +1 -0
  35. socialcli-0.3.12/socialctl/native_schedule/planner.py +158 -0
  36. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/preflight.py +81 -9
  37. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/report.py +1 -1
  38. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/operation_output.py +12 -0
  39. socialcli-0.3.12/socialctl/post_cli.py +108 -0
  40. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/postfile.py +2 -0
  41. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/preflight.py +17 -0
  42. socialcli-0.3.12/socialctl/preview_exports.py +305 -0
  43. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/publication_steps.py +6 -0
  44. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/publisher.py +5 -1
  45. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/qa/backend.py +1 -1
  46. socialcli-0.3.12/socialctl/read_budget.py +522 -0
  47. socialcli-0.3.12/socialctl/read_checkpoints.py +739 -0
  48. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/scheduler.py +1 -1
  49. socialcli-0.3.12/socialctl/stats_recovery.py +67 -0
  50. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/ui/assets/agent-actions.json +3125 -26
  51. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/ui/assets/agent-journey.json +104 -6
  52. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/ui/assets/agent-manual.md +54 -9
  53. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/ui/assets/agents.md +3 -3
  54. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/ui/assets/cli-result.schema.json +20 -2
  55. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/youtube_data.py +49 -3
  56. socialcli-0.3.10/socialctl/metricas/almacen.py +0 -133
  57. socialcli-0.3.10/socialctl/read_budget.py +0 -225
  58. socialcli-0.3.10/socialctl/read_checkpoints.py +0 -322
  59. {socialcli-0.3.10 → socialcli-0.3.12}/.gitignore +0 -0
  60. {socialcli-0.3.10 → socialcli-0.3.12}/LICENSE +0 -0
  61. {socialcli-0.3.10 → socialcli-0.3.12}/LICENSE-MIT-LEGACY +0 -0
  62. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/__init__.py +0 -0
  63. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/__main__.py +0 -0
  64. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/adapters/__init__.py +0 -0
  65. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/adapters/base.py +0 -0
  66. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/adapters/errores.py +0 -0
  67. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/adapters/facebook.py +0 -0
  68. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/adapters/instagram.py +0 -0
  69. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/adapters/tiktok.py +0 -0
  70. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/agent_guide.py +0 -0
  71. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/agent_journey.py +0 -0
  72. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/approval_cli.py +0 -0
  73. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/auth.py +0 -0
  74. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/authflow.py +0 -0
  75. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/brands.py +0 -0
  76. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/capabilities.py +0 -0
  77. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/__init__.py +0 -0
  78. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/account_cli.py +0 -0
  79. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/cli.py +0 -0
  80. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/client.py +0 -0
  81. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/credential_cli.py +0 -0
  82. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/credential_store.py +0 -0
  83. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/file_store.py +0 -0
  84. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/http_transport.py +0 -0
  85. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/keychain.py +0 -0
  86. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/meta_user.py +0 -0
  87. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/rotation_cli.py +0 -0
  88. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/saas_client.py +0 -0
  89. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/temporary_media.py +0 -0
  90. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/connections/token_requests.py +0 -0
  91. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/context.py +0 -0
  92. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/context_cli.py +0 -0
  93. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/delivery_options.py +0 -0
  94. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/engagement.py +0 -0
  95. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/engagement_cli.py +0 -0
  96. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/executor.py +0 -0
  97. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/formatter.py +0 -0
  98. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/hosted_media.py +0 -0
  99. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/inventory.py +0 -0
  100. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/inventory_sources.py +0 -0
  101. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/__init__.py +0 -0
  102. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/batch_cli.py +0 -0
  103. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/comments_cli.py +0 -0
  104. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/community_batches.py +0 -0
  105. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/community_changes.py +0 -0
  106. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/community_schema.py +0 -0
  107. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/facebook_groups.py +0 -0
  108. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/groups_cli.py +0 -0
  109. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/inbox_readers.py +0 -0
  110. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/meta_changes.py +0 -0
  111. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/meta_cli.py +0 -0
  112. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/meta_client.py +0 -0
  113. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/meta_comment_inbox.py +0 -0
  114. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/meta_comments.py +0 -0
  115. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/meta_errors.py +0 -0
  116. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/meta_pagination.py +0 -0
  117. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/meta_schema.py +0 -0
  118. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/meta_webhooks.py +0 -0
  119. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/metadata_parts.py +0 -0
  120. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/owned_assets.py +0 -0
  121. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/owned_reorder.py +0 -0
  122. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/owned_schema.py +0 -0
  123. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/reply_context.py +0 -0
  124. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/reply_evidence.py +0 -0
  125. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/resource_changes.py +0 -0
  126. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/snippet_readback.py +0 -0
  127. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/stories.py +0 -0
  128. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/stories_cli.py +0 -0
  129. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/youtube_community.py +0 -0
  130. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/youtube_owned.py +0 -0
  131. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/management/youtube_resources.py +0 -0
  132. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/media.py +0 -0
  133. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/media_cli.py +0 -0
  134. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/media_ingress.py +0 -0
  135. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/media_preflight.py +0 -0
  136. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/media_registry.py +0 -0
  137. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/media_requirements.py +0 -0
  138. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/__init__.py +0 -0
  139. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/analytics_changes.py +0 -0
  140. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/analytics_cli.py +0 -0
  141. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/analytics_client.py +0 -0
  142. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/analytics_ingest.py +0 -0
  143. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/analytics_schema.py +0 -0
  144. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/base.py +0 -0
  145. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/facebook.py +0 -0
  146. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/instagram.py +0 -0
  147. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/modelos.py +0 -0
  148. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/piezas.py +0 -0
  149. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/reach.py +0 -0
  150. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/reporting_client.py +0 -0
  151. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/slugs.py +0 -0
  152. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/metricas/tiktok.py +0 -0
  153. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/migration_cli.py +0 -0
  154. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/migration_files.py +0 -0
  155. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/__init__.py +0 -0
  156. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/api_delivery.py +0 -0
  157. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/api_reconcile.py +0 -0
  158. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/attestations.py +0 -0
  159. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/cadence.py +0 -0
  160. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/dispatcher.py +0 -0
  161. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/facebook.py +0 -0
  162. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/facebook_reels.py +0 -0
  163. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/handoff.py +0 -0
  164. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/instagram_delivery.py +0 -0
  165. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/instagram_runtime.py +0 -0
  166. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/inventory.py +0 -0
  167. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/migration.py +0 -0
  168. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/models.py +0 -0
  169. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/preparation.py +0 -0
  170. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/reconcile.py +0 -0
  171. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/remote_data.py +0 -0
  172. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/store.py +0 -0
  173. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/verification.py +0 -0
  174. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/native_schedule/youtube.py +0 -0
  175. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/plantillas/accounts.yml +0 -0
  176. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/plantillas/brand.md +0 -0
  177. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/plantillas/estrategia.md +0 -0
  178. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/public_availability.py +0 -0
  179. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/publication_approval.py +0 -0
  180. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/publication_policy.py +0 -0
  181. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/publication_status.py +0 -0
  182. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/publish_output.py +0 -0
  183. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/qa/__init__.py +0 -0
  184. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/qa/cli.py +0 -0
  185. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/qa/guard.py +0 -0
  186. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/qa/models.py +0 -0
  187. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/qa/runner.py +0 -0
  188. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/qa/store.py +0 -0
  189. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/qa/transport.py +0 -0
  190. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/queue_migration.py +0 -0
  191. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/read_reports.py +0 -0
  192. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/rutas.py +0 -0
  193. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/schedule_remote.py +0 -0
  194. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/schedule_sqlite.py +0 -0
  195. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/scheduler_launchd.py +0 -0
  196. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/scheduler_systemd.py +0 -0
  197. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/source_links.py +0 -0
  198. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/ui/__init__.py +0 -0
  199. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/upload_consent.py +0 -0
  200. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/workspace.py +0 -0
  201. {socialcli-0.3.10 → socialcli-0.3.12}/socialctl/youtube_data_service.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: socialcli
3
- Version: 0.3.10
3
+ Version: 0.3.12
4
4
  Summary: SocialCli: publish and manage creator-owned social content from the terminal.
5
5
  Project-URL: Homepage, https://socialcli.app
6
6
  Project-URL: Documentation, https://socialcli.app/ai-agents.html
@@ -41,7 +41,10 @@ Copy this line into your AI assistant:
41
41
  > Install SocialCli https://socialcli.app/agents
42
42
 
43
43
  The live installation instructions identify the verified published release and
44
- its SHA-256. Your assistant checks the downloaded wheel, installs it in an
44
+ its SHA-256. Workflow recipes for draft creation, route planning and preview
45
+ export require installed client 0.3.11 or later. Check registry publication
46
+ separately; use the published bootstrap and installed help.
47
+ Your assistant checks the downloaded wheel, installs it in an
45
48
  isolated environment and verifies the active executable with
46
49
  `socialcli --version`. The version of this distribution is listed in its package
47
50
  metadata above; the website provides current installation and availability
@@ -20,7 +20,10 @@ Copy this line into your AI assistant:
20
20
  > Install SocialCli https://socialcli.app/agents
21
21
 
22
22
  The live installation instructions identify the verified published release and
23
- its SHA-256. Your assistant checks the downloaded wheel, installs it in an
23
+ its SHA-256. Workflow recipes for draft creation, route planning and preview
24
+ export require installed client 0.3.11 or later. Check registry publication
25
+ separately; use the published bootstrap and installed help.
26
+ Your assistant checks the downloaded wheel, installs it in an
24
27
  isolated environment and verifies the active executable with
25
28
  `socialcli --version`. The version of this distribution is listed in its package
26
29
  metadata above; the website provides current installation and availability
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "socialcli"
3
- version = "0.3.10"
3
+ version = "0.3.12"
4
4
  description = "SocialCli: publish and manage creator-owned social content from the terminal."
5
5
  readme = "README.md"
6
6
  license = "LicenseRef-SocialCli-Proprietary"
@@ -52,6 +52,7 @@ only-include = [
52
52
  "socialctl/__main__.py",
53
53
  "socialctl/adapters",
54
54
  "socialctl/agent_errors.py",
55
+ "socialctl/agent_recovery.py",
55
56
  "socialctl/agent_guide.py",
56
57
  "socialctl/agent_journey.py",
57
58
  "socialctl/approval_cli.py",
@@ -62,6 +63,7 @@ only-include = [
62
63
  "socialctl/capabilities.yml",
63
64
  "socialctl/cli.py",
64
65
  "socialctl/cli_result.py",
66
+ "socialctl/preview_exports.py",
65
67
  "socialctl/connections",
66
68
  "socialctl/context.py",
67
69
  "socialctl/context_cli.py",
@@ -93,6 +95,7 @@ only-include = [
93
95
  "socialctl/operation_output.py",
94
96
  "socialctl/plantillas",
95
97
  "socialctl/postfile.py",
98
+ "socialctl/post_cli.py",
96
99
  "socialctl/preflight.py",
97
100
  "socialctl/public_availability.py",
98
101
  "socialctl/publication_approval.py",
@@ -113,6 +116,7 @@ only-include = [
113
116
  "socialctl/scheduler_launchd.py",
114
117
  "socialctl/scheduler_systemd.py",
115
118
  "socialctl/source_links.py",
119
+ "socialctl/stats_recovery.py",
116
120
  "socialctl/ui/__init__.py",
117
121
  "socialctl/ui/assets/agent-actions.json",
118
122
  "socialctl/ui/assets/agent-manual.md",
@@ -135,6 +139,7 @@ only-include = [
135
139
  "socialctl/__main__.py",
136
140
  "socialctl/adapters",
137
141
  "socialctl/agent_errors.py",
142
+ "socialctl/agent_recovery.py",
138
143
  "socialctl/agent_guide.py",
139
144
  "socialctl/agent_journey.py",
140
145
  "socialctl/approval_cli.py",
@@ -145,6 +150,7 @@ only-include = [
145
150
  "socialctl/capabilities.yml",
146
151
  "socialctl/cli.py",
147
152
  "socialctl/cli_result.py",
153
+ "socialctl/preview_exports.py",
148
154
  "socialctl/connections",
149
155
  "socialctl/context.py",
150
156
  "socialctl/context_cli.py",
@@ -176,6 +182,7 @@ only-include = [
176
182
  "socialctl/operation_output.py",
177
183
  "socialctl/plantillas",
178
184
  "socialctl/postfile.py",
185
+ "socialctl/post_cli.py",
179
186
  "socialctl/preflight.py",
180
187
  "socialctl/public_availability.py",
181
188
  "socialctl/publication_approval.py",
@@ -196,6 +203,7 @@ only-include = [
196
203
  "socialctl/scheduler_launchd.py",
197
204
  "socialctl/scheduler_systemd.py",
198
205
  "socialctl/source_links.py",
206
+ "socialctl/stats_recovery.py",
199
207
  "socialctl/ui/__init__.py",
200
208
  "socialctl/ui/assets/agent-actions.json",
201
209
  "socialctl/ui/assets/agent-manual.md",
@@ -211,3 +219,6 @@ only-include = [
211
219
  "LICENSE",
212
220
  "LICENSE-MIT-LEGACY"
213
221
  ]
222
+
223
+ [tool.pytest.ini_options]
224
+ testpaths = ["tests"]
@@ -43,8 +43,16 @@ class YouTubeAdapter(Adapter):
43
43
  def __init__(self, *, on_created=None):
44
44
  self.on_created = on_created
45
45
 
46
+ def validate(self, post, brand):
47
+ from socialctl.preflight import youtube_input_errors
48
+ return super().validate(post, brand) + youtube_input_errors(post)
49
+
46
50
  def publish(self, post: PlatformPost, brand: Brand, client: httpx.Client) -> PostResult:
47
51
  'Publish a validated post; convert every failure to an error PostResult.'
52
+ from socialctl.preflight import youtube_input_errors
53
+ input_errors = youtube_input_errors(post)
54
+ if input_errors:
55
+ return self._error('; '.join(error.motivo for error in input_errors))
48
56
  spec = PLATFORM_SPECS[self.platform]
49
57
  if len(post.media) > spec.max_media:
50
58
  return self._error(
@@ -117,6 +125,9 @@ class YouTubeAdapter(Adapter):
117
125
  "status": {"privacyStatus": requested_privacy},
118
126
  }
119
127
 
128
+ if post.self_declared_made_for_kids is not None:
129
+ metadatos["status"]["selfDeclaredMadeForKids"] = post.self_declared_made_for_kids
130
+
120
131
  try:
121
132
  inicio = client.post(
122
133
  URL_UPLOAD,
@@ -32,12 +32,21 @@ _ACTIONS = {
32
32
  # Only fixed internal codes acquire action semantics. Provider text is diagnostic,
33
33
  # never a command, an expiry signal or evidence that a write was not accepted.
34
34
  _CATALOG = {
35
+ 'proposal_route_mismatch': ('correct_input', 'Use the validated proposal owner route; inspect operation state and use read-only recovery for an existing attempt. No write was started.'),
36
+ 'proposal_observation_unknown': ('inspect', 'The original observation age is unknown for this saved proposal; preserve it. Export cannot assign a new age or certify freshness.'),
37
+ 'proposal_missing': ('inspect', 'No saved proposal with this ID exists in the selected brand storage. No provider request was sent.'),
38
+ 'proposal_invalid': ('inspect', 'The local proposal is invalid; preserve it and inspect the selected brand storage.'),
39
+ 'proposal_unreadable': ('inspect', 'The local proposal is unreadable; preserve it and inspect the selected brand storage.'),
40
+ 'proposal_expired': ('inspect', 'The local proposal has expired or purged API data; preserve its replay guard. Do not apply it.'),
41
+ 'proposal_ambiguous': ('inspect', 'More than one validated proposal owns this ID; inspect the selected brand storage. No write was started.'),
35
42
  'executor_stale': ('inspect', 'The configured executor health report is stale. Inspect the executor; this does not establish an account connection failure.'),
36
43
  'resume_invalid': ('correct_input', 'Use the opaque local reference returned by this read; preserve invalid state for inspection.'),
37
44
  'resume_expired': ('adjust_read', 'This local read reference expired or was purged; begin a new bounded read.'),
38
45
  'resume_busy': ('retry_later', 'Another process owns this read reference; wait for it to finish.'),
39
46
  'resume_binding_mismatch': ('correct_input', 'Select the recorded operation, brand, root, service and account before resuming.'),
40
47
  'resume_query_mismatch': ('correct_input', 'Resume with the recorded query; omit query flags or begin a new read.'),
48
+ 'video_details_unavailable': ('inspect', 'Some requested video details were unavailable; visibility and availability remain unknown. Preserve returned observations and use only an eligible explicit recheck.'),
49
+ 'projection_busy': ('retry_later', 'Another SocialCli operation is saving local projections. Wait for it to finish, then resume the pending local work.'),
41
50
  'resume_unavailable': ('inspect', 'This read is already complete or has no supported continuation.'),
42
51
  'resume_restart_required': ('adjust_read', 'The reported provider scope requires a new read; retained observations are not a current provider snapshot.'),
43
52
  'resume_unsupported': ('unsupported', 'This endpoint is outside the supported durable read boundary; no write or renewal was sent.'),
@@ -132,6 +141,7 @@ def error_document(exc: BaseException, *, read_only: bool) -> dict:
132
141
  from socialctl.youtube_data import YouTubeDataBusy, YouTubeDataCleanupError
133
142
  from socialctl.identity import ReadError
134
143
  from socialctl.read_checkpoints import CheckpointError
144
+ from socialctl.metricas.almacen import ProjectionBusyError
135
145
 
136
146
  # A read flow may refresh a token via POST. A lost response to that operation
137
147
  # cannot be classified as a harmless GET retry merely from the CLI command.
@@ -150,6 +160,7 @@ def error_document(exc: BaseException, *, read_only: bool) -> dict:
150
160
  code = 'operation_uncertain'
151
161
  elif isinstance(exc, (AuthError, YouTubeManagementError, ChangeError, ResourceError, CommentError, MetaError, ReadError, MetricsProviderError, CheckpointError)) and getattr(exc, '_socialcli_error_code', None) is not None:
152
162
  code = exc._socialcli_error_code
163
+ elif isinstance(exc, ProjectionBusyError): code = 'projection_busy'
153
164
  elif isinstance(exc, YouTubeDataBusy): code = 'local_data_busy'
154
165
  elif isinstance(exc, YouTubeDataCleanupError): code = 'storage_failure'
155
166
  elif isinstance(exc, WorkspaceUnavailable): code = 'workspace_unavailable'
@@ -193,6 +204,8 @@ def error_document(exc: BaseException, *, read_only: bool) -> dict:
193
204
  if code == 'operation_rejected' and not isinstance(exc, ServiceRejected):
194
205
  result['message'] = _CATALOG[code][1]
195
206
  diagnostic = safe_diagnostic(getattr(exc, '_socialcli_diagnostic', None))
207
+ if isinstance(exc, ProjectionBusyError):
208
+ diagnostic = {'source':'local', 'stage':'local_projection'}
196
209
  if isinstance(exc, (ChangeError, CheckpointError)) and not diagnostic:
197
210
  diagnostic = {'source': 'local'}
198
211
  if isinstance(exc, ServiceRejected):
@@ -201,6 +214,15 @@ def error_document(exc: BaseException, *, read_only: bool) -> dict:
201
214
  diagnostic.update(http_status=exc.response.status_code, request_method=exc.request.method)
202
215
  if diagnostic:
203
216
  result['diagnostic'] = safe_diagnostic(diagnostic)
217
+ result['stage'] = diagnostic.get('stage', 'execute')
218
+ result['reason'] = diagnostic.get('reason', result['code'])
219
+ result['write_state'] = diagnostic.get('write_state', 'unknown')
220
+ from socialctl.management.proposal_routes import ProposalRouteError
221
+ if isinstance(exc, ProposalRouteError):
222
+ from socialctl.agent_recovery import proposal_options
223
+ options = proposal_options(exc.recovery)
224
+ if options:
225
+ result['next_steps'] = options
204
226
  return result
205
227
 
206
228
 
@@ -210,16 +232,25 @@ def safe_diagnostic(value):
210
232
  return {}
211
233
  allowed = {
212
234
  'source': {'local', 'socialcli', 'youtube'},
213
- 'stage': {'input_validation', 'workspace_read', 'file_read', 'credential_read', 'identity_read', 'provider_read', 'provider_write', 'target_read', 'reply_coverage', 'proposal_preparation', 'baseline_check', 'readback', 'executor'},
235
+ 'stage': {'local_projection', 'input_validation', 'workspace_read', 'file_read', 'credential_read', 'identity_read', 'provider_read', 'provider_write', 'target_read', 'reply_coverage', 'proposal_preparation', 'proposal_selection', 'baseline_check', 'readback', 'executor'},
214
236
  'request_method': {'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE'},
215
237
  'operation': {'channels', 'videos', 'comments', 'commentThreads', 'playlistItems', 'reports'},
216
238
  'write_state': {'not_started', 'unknown', 'accepted'},
217
239
  'content_write_state': {'not_started'},
218
- 'reason': {'thread_unverifiable', 'thread_identity_mismatch', 'thread_total_unverifiable', 'comment_binding_mismatch', 'parent_mismatch', 'replies_not_allowed', 'incomplete_reply_list', 'readback_mismatch'},
240
+ 'reason': {'owned_baseline_changed', 'thread_unverifiable', 'thread_identity_mismatch', 'thread_total_unverifiable', 'comment_binding_mismatch', 'parent_mismatch', 'replies_not_allowed', 'incomplete_reply_list', 'readback_mismatch'},
219
241
  'provider_reason': {'playlistNotFound', 'playlistItemNotFound', 'playlistItemsNotAccessible', 'commentsDisabled', 'quotaExceeded', 'dailyLimitExceeded', 'rateLimitExceeded', 'userRateLimitExceeded', 'insufficientPermissions', 'forbidden', 'authError', 'invalidValue', 'videoNotFound', 'commentNotFound', 'commentThreadNotFound', 'processingFailure', 'operationNotSupported', 'accessNotConfigured', 'serviceDisabled', 'backendError'},
220
242
  }
221
243
  clean = {key: val for key, val in value.items()
222
244
  if key in allowed and isinstance(val, str) and val in allowed[key]}
245
+ from socialctl.management.proposal_routes import APPLY_ROUTES, RECOVERY_ROUTES, PROPOSAL_KINDS, OPERATION_STATUSES
246
+ for key, routes in (('requested_route', APPLY_ROUTES), ('apply_route', APPLY_ROUTES), ('recovery_route', RECOVERY_ROUTES)):
247
+ route = value.get(key)
248
+ if isinstance(route, list) and all(isinstance(part, str) for part in route) and tuple(route) in routes:
249
+ clean[key] = list(route)
250
+ if isinstance(value.get('proposal_kind'), str) and value['proposal_kind'] in PROPOSAL_KINDS:
251
+ clean['proposal_kind'] = value['proposal_kind']
252
+ if isinstance(value.get('operation_status'), str) and value['operation_status'] in OPERATION_STATUSES:
253
+ clean['operation_status'] = value['operation_status']
223
254
  status = value.get('http_status')
224
255
  if type(status) is int and 100 <= status <= 599:
225
256
  clean['http_status'] = status
@@ -0,0 +1,177 @@
1
+ """Data-only recovery options built from validated local context.
2
+
3
+ An option is neither approval nor an instruction to execute. Provider prose and
4
+ saved shell strings never supply a command path or flags.
5
+ """
6
+ from __future__ import annotations
7
+
8
+ from dataclasses import dataclass
9
+ from pathlib import Path
10
+ import re
11
+
12
+
13
+ def command_option(argv: list[str], *, effect: str, approval_required: bool) -> dict:
14
+ if (effect not in {'read', 'prepare', 'write', 'local_export'} or not isinstance(argv, list)
15
+ or not argv or any(not isinstance(v, str) or not v or '\x00' in v for v in argv)
16
+ or type(approval_required) is not bool):
17
+ raise ValueError('Invalid local command option')
18
+ return {'kind':'command_option', 'argv':list(argv), 'effect':effect,
19
+ 'approval_required':approval_required, 'automatic':False, 'source':'local_cli'}
20
+
21
+
22
+ def _context(brand, root):
23
+ from socialctl.rutas import validar_componente_de_ruta
24
+ try:
25
+ root = Path(root)
26
+ if (not root.is_absolute() or '\x00' in str(root) or not isinstance(brand, str)
27
+ or brand.startswith('-') or any(not c.isprintable() for c in brand)):
28
+ return None
29
+ validar_componente_de_ruta(root, brand, ValueError, 'brand')
30
+ return ['--brand', brand, '--root', str(root), '--json', '--json-version', '2']
31
+ except (TypeError, ValueError, OSError, RuntimeError):
32
+ return None
33
+
34
+
35
+ def read_options(brand: str, root: Path, *, query: dict, missing_video_ids: list[str],
36
+ continuation_available: bool, reference: str | None,
37
+ retry_unavailable_available: bool = False, local_pending: bool = False) -> list[dict]:
38
+ from socialctl.read_checkpoints import validate_stats_query
39
+ context = _context(brand, root)
40
+ query = validate_stats_query(query)
41
+ if (context is None or query is None
42
+ or any(type(flag) is not bool for flag in (continuation_available, retry_unavailable_available, local_pending))):
43
+ return []
44
+ # Eligibility flags are supplied only after the caller validates checkpoint
45
+ # version, query, identity and lifecycle. Provider prose cannot supply them.
46
+ if continuation_available or retry_unavailable_available or local_pending:
47
+ if not isinstance(reference, str) or not re.fullmatch(r'read-[a-f0-9]{32}', reference):
48
+ return []
49
+ options = []
50
+ if continuation_available or local_pending:
51
+ options.append({**command_option(['socialcli','stats','--resume',reference,'--timeout','300',*context],
52
+ effect='read', approval_required=False),
53
+ 'scope':'recorded_read' if continuation_available else 'local_projection',
54
+ 'description':('Continuation of the recorded read; retained observations keep their original age.'
55
+ if continuation_available else
56
+ 'Retry pending local projections; retained provider observations keep their original age.')})
57
+ if retry_unavailable_available:
58
+ options.append({**command_option(['socialcli','stats','--resume',reference,'--retry-unavailable',
59
+ '--only','youtube','--timeout','300',*context],
60
+ effect='read', approval_required=False),
61
+ 'scope':'unavailable_details',
62
+ 'description':'Explicitly recheck unavailable video details; visibility and availability remain unknown until observed.'})
63
+ return options
64
+ options = []
65
+ for identifier in dict.fromkeys(v for v in missing_video_ids if isinstance(v, str)):
66
+ if not re.fullmatch(r'[A-Za-z0-9_][A-Za-z0-9_-]{0,127}', identifier):
67
+ continue
68
+ options.append({**command_option(['socialcli','content','show',identifier,*context],
69
+ effect='read', approval_required=False),
70
+ 'scope':'metadata_only',
71
+ 'description':'Metadata only; enrichment and current availability remain unknown until observed.'})
72
+ argv = ['socialcli','stats','--only','youtube','--timeout','300']
73
+ if query['since'] is not None:
74
+ argv += ['--since',query['since']]
75
+ options.append({**command_option([*argv,*context], effect='read', approval_required=False),
76
+ 'scope':'fresh_read', 'publication_date_filter':query['since'],
77
+ 'description':'Fresh YouTube enrichment read; not selective continuation or guaranteed completeness. '
78
+ '--since retains the publication-date filter, not the metrics period.'})
79
+ return options
80
+
81
+
82
+ @dataclass(frozen=True)
83
+ class ProposalRecoveryContext:
84
+ """Local selection context, attached only by the proposal route guard."""
85
+ brand_root: Path
86
+ proposal_id: str
87
+
88
+
89
+ def proposal_options(context: ProposalRecoveryContext) -> list[dict]:
90
+ from socialctl.management.proposal_routes import locate_proposal
91
+ if not isinstance(context, ProposalRecoveryContext):
92
+ return []
93
+ root = Path(context.brand_root)
94
+ suffix = _context(root.name, root.parent)
95
+ if suffix is None:
96
+ return []
97
+ found = locate_proposal(root, context.proposal_id)
98
+ if found['state'] != 'recognized':
99
+ return []
100
+ pending = found['operation_status'] in {'proposed', 'pending'}
101
+ path = found['apply_path'] if pending else found['recovery_path']
102
+ return [command_option(['socialcli',*path,context.proposal_id,*suffix],
103
+ effect='write' if pending else 'read', approval_required=pending)]
104
+
105
+
106
+ def _metadata_conflict_evidence(journal: list[dict]) -> dict:
107
+ """Project fixed journal facts, never infer dispatch from conflict status."""
108
+ events = [row for row in journal if isinstance(row, dict)]
109
+ latest = events[-1] if events else {}
110
+ # Only a recorded HTTP classification establishes rejection. Today's 412
111
+ # path may save just etag_conflict; that legacy absence remains unknown.
112
+ if latest.get('event') == 'etag_conflict' and latest.get('http_status') == '412':
113
+ return {'stage':'provider_write', 'reason':'conditional_request_rejected',
114
+ 'write_state':'rejected', 'http_status':412,
115
+ 'message':'The conditional metadata PUT was rejected with HTTP 412.'}
116
+ if any(row.get('event') == 'write_intent' for row in events):
117
+ return {'stage':'write_intent', 'reason':'conflict_after_write_intent',
118
+ 'write_state':'unknown',
119
+ 'message':'A metadata conflict follows durable write intent; the recorded evidence does not establish its dispatch outcome.'}
120
+ if (latest.get('event') == 'observed_state_changed'
121
+ and not any(row.get('event') in {'etag_conflict', 'write_uncertain', 'write_rejected'}
122
+ or str(row.get('event', '')).startswith('read_back_') for row in events)):
123
+ return {'stage':'baseline_check', 'reason':'remote_state_changed',
124
+ 'write_state':'not_started',
125
+ 'message':'The approved metadata baseline changed before write intent; this operation sent no write.'}
126
+ return {'stage':'unknown', 'reason':'conflict_context_unavailable', 'write_state':'unknown',
127
+ 'message':'The stored metadata conflict has insufficient attempt evidence to establish dispatch or rejection.'}
128
+
129
+
130
+ def metadata_conflict_options(brand: str, root: Path, proposal_id: str) -> tuple[list[dict], list[dict]]:
131
+ """Read actual validated local batches, never a result's arbitrary file text."""
132
+ import hashlib
133
+ import yaml
134
+ from socialctl.management.proposal_routes import locate_proposal
135
+ from socialctl.management.batches import BatchFile, BatchStore
136
+ suffix = _context(brand, root)
137
+ if suffix is None:
138
+ return [], []
139
+ try:
140
+ brand_root = Path(root) / brand
141
+ found = locate_proposal(brand_root, proposal_id)
142
+ if found['state'] != 'recognized' or found['kind'] != 'youtube-metadata-batch':
143
+ return [], []
144
+ batch = BatchStore(brand_root).load(proposal_id)
145
+ conflicts = [op for op in batch.operations if op.status == 'conflict']
146
+ if not conflicts:
147
+ return [], []
148
+ errors = [{'code':'metadata_conflict', 'action':'inspect', 'retryable':False,
149
+ 'requires_user_action':False, 'video_id':op.video_id,
150
+ **_metadata_conflict_evidence(op.journal)} for op in conflicts]
151
+ if (any(op.status in {'applying', 'uncertain', 'manual_review'} for op in batch.operations)
152
+ or any(error['write_state'] == 'unknown' for error in errors)):
153
+ return [{**command_option(['socialcli',*found['recovery_path'],proposal_id,*suffix],
154
+ effect='read', approval_required=False),
155
+ 'scope':'recorded_proposal',
156
+ 'description':'Read-only recovery of the existing batch; an unresolved attempt blocks a fresh source-batch preview.'}], errors
157
+ # A batch's source is one YAML file, not a saved shell command. Validate
158
+ # its current bytes against both the stored digest and real input model.
159
+ options = []
160
+ for raw, expected in batch.source_files.items():
161
+ path = Path(raw)
162
+ if not path.is_absolute() or any(not c.isprintable() for c in raw) or path.is_symlink():
163
+ continue
164
+ if not path.is_file() or path.stat().st_size > 1024 * 1024:
165
+ continue
166
+ body = path.read_bytes()
167
+ if hashlib.sha256(body).hexdigest() != expected:
168
+ continue
169
+ BatchFile.model_validate(yaml.safe_load(body))
170
+ options.append({**command_option(['socialcli','content','edit-batch','--file',str(path),'--dry-run',*suffix],
171
+ effect='prepare', approval_required=False),
172
+ 'scope':'fresh_preview',
173
+ 'description':'New preview of the complete source batch against fresh metadata. '
174
+ 'Includes any previously applied items; each item requires review and new exact approval before a write.'})
175
+ return options, errors
176
+ except (OSError, ValueError, TypeError, KeyError, yaml.YAMLError):
177
+ return [], []