socialcli 0.3.4__tar.gz → 0.3.8__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 (193) hide show
  1. socialcli-0.3.8/PKG-INFO +142 -0
  2. socialcli-0.3.8/README.md +121 -0
  3. {socialcli-0.3.4 → socialcli-0.3.8}/pyproject.toml +1 -1
  4. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/agent_errors.py +4 -0
  5. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/capabilities.yml +3 -3
  6. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/cli.py +22 -4
  7. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/connections/account_cli.py +41 -14
  8. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/connections/cli.py +6 -2
  9. socialcli-0.3.8/socialctl/connections/http_transport.py +58 -0
  10. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/entrypoint.py +9 -4
  11. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/inbox_cli.py +1 -1
  12. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/inventory.py +4 -0
  13. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/inventory_cli.py +4 -1
  14. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/cli.py +2 -1
  15. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/community_cli.py +2 -1
  16. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/meta_cli.py +2 -1
  17. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/owned_cli.py +9 -2
  18. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/resource_cli.py +2 -1
  19. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/stories_cli.py +2 -1
  20. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/youtube_owned.py +3 -0
  21. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/analytics_cli.py +2 -1
  22. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/modelos.py +3 -0
  23. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/youtube.py +45 -3
  24. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/cli.py +4 -3
  25. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/publisher.py +2 -1
  26. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/read_budget.py +2 -1
  27. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/read_reports.py +14 -0
  28. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/ui/assets/agent-actions.json +6 -6
  29. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/ui/assets/agent-journey.json +17 -4
  30. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/ui/assets/agent-manual.md +10 -4
  31. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/ui/assets/agents.md +3 -3
  32. socialcli-0.3.4/PKG-INFO +0 -171
  33. socialcli-0.3.4/README.md +0 -150
  34. {socialcli-0.3.4 → socialcli-0.3.8}/.gitignore +0 -0
  35. {socialcli-0.3.4 → socialcli-0.3.8}/LICENSE +0 -0
  36. {socialcli-0.3.4 → socialcli-0.3.8}/LICENSE-MIT-LEGACY +0 -0
  37. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/__init__.py +0 -0
  38. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/__main__.py +0 -0
  39. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/adapters/__init__.py +0 -0
  40. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/adapters/base.py +0 -0
  41. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/adapters/errores.py +0 -0
  42. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/adapters/facebook.py +0 -0
  43. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/adapters/instagram.py +0 -0
  44. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/adapters/tiktok.py +0 -0
  45. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/adapters/youtube.py +0 -0
  46. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/agent_guide.py +0 -0
  47. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/agent_journey.py +0 -0
  48. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/approval_cli.py +0 -0
  49. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/auth.py +0 -0
  50. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/authflow.py +0 -0
  51. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/brands.py +0 -0
  52. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/capabilities.py +0 -0
  53. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/cli_result.py +0 -0
  54. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/connections/__init__.py +0 -0
  55. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/connections/client.py +0 -0
  56. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/connections/credential_cli.py +0 -0
  57. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/connections/credential_store.py +0 -0
  58. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/connections/file_store.py +0 -0
  59. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/connections/keychain.py +0 -0
  60. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/connections/meta_user.py +0 -0
  61. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/connections/rotation_cli.py +0 -0
  62. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/connections/saas_client.py +0 -0
  63. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/connections/temporary_media.py +0 -0
  64. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/connections/token_requests.py +0 -0
  65. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/context.py +0 -0
  66. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/context_cli.py +0 -0
  67. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/delivery_options.py +0 -0
  68. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/engagement.py +0 -0
  69. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/engagement_cli.py +0 -0
  70. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/executor.py +0 -0
  71. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/formatter.py +0 -0
  72. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/hosted_media.py +0 -0
  73. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/identity.py +0 -0
  74. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/inbox.py +0 -0
  75. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/inventory_sources.py +0 -0
  76. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/__init__.py +0 -0
  77. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/batch_cli.py +0 -0
  78. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/batches.py +0 -0
  79. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/changes.py +0 -0
  80. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/comments_cli.py +0 -0
  81. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/community_batch_cli.py +0 -0
  82. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/community_batches.py +0 -0
  83. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/community_changes.py +0 -0
  84. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/community_schema.py +0 -0
  85. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/facebook_groups.py +0 -0
  86. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/groups_cli.py +0 -0
  87. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/inbox_readers.py +0 -0
  88. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/meta_changes.py +0 -0
  89. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/meta_client.py +0 -0
  90. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/meta_comment_inbox.py +0 -0
  91. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/meta_comments.py +0 -0
  92. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/meta_errors.py +0 -0
  93. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/meta_pagination.py +0 -0
  94. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/meta_schema.py +0 -0
  95. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/meta_webhooks.py +0 -0
  96. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/metadata_parts.py +0 -0
  97. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/owned_assets.py +0 -0
  98. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/owned_changes.py +0 -0
  99. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/owned_reorder.py +0 -0
  100. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/owned_schema.py +0 -0
  101. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/reply_context.py +0 -0
  102. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/reply_evidence.py +0 -0
  103. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/resource_changes.py +0 -0
  104. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/snippet_readback.py +0 -0
  105. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/stories.py +0 -0
  106. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/youtube.py +0 -0
  107. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/youtube_community.py +0 -0
  108. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/youtube_metadata.py +0 -0
  109. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/management/youtube_resources.py +0 -0
  110. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/media.py +0 -0
  111. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/media_cli.py +0 -0
  112. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/media_ingress.py +0 -0
  113. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/media_preflight.py +0 -0
  114. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/media_registry.py +0 -0
  115. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/media_requirements.py +0 -0
  116. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/__init__.py +0 -0
  117. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/almacen.py +0 -0
  118. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/analytics_changes.py +0 -0
  119. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/analytics_client.py +0 -0
  120. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/analytics_ingest.py +0 -0
  121. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/analytics_schema.py +0 -0
  122. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/base.py +0 -0
  123. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/facebook.py +0 -0
  124. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/insights.py +0 -0
  125. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/instagram.py +0 -0
  126. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/piezas.py +0 -0
  127. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/reach.py +0 -0
  128. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/reporting_client.py +0 -0
  129. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/resumen.py +0 -0
  130. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/slugs.py +0 -0
  131. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/metricas/tiktok.py +0 -0
  132. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/migration_cli.py +0 -0
  133. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/migration_files.py +0 -0
  134. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/models.py +0 -0
  135. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/__init__.py +0 -0
  136. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/api_delivery.py +0 -0
  137. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/api_reconcile.py +0 -0
  138. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/approval.py +0 -0
  139. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/attestations.py +0 -0
  140. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/cadence.py +0 -0
  141. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/dispatcher.py +0 -0
  142. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/facebook.py +0 -0
  143. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/facebook_reels.py +0 -0
  144. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/first_comment.py +0 -0
  145. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/handoff.py +0 -0
  146. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/instagram_delivery.py +0 -0
  147. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/instagram_runtime.py +0 -0
  148. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/inventory.py +0 -0
  149. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/migration.py +0 -0
  150. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/models.py +0 -0
  151. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/preflight.py +0 -0
  152. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/preparation.py +0 -0
  153. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/reconcile.py +0 -0
  154. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/remote_data.py +0 -0
  155. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/report.py +0 -0
  156. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/store.py +0 -0
  157. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/verification.py +0 -0
  158. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/native_schedule/youtube.py +0 -0
  159. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/operation_output.py +0 -0
  160. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/plantillas/accounts.yml +0 -0
  161. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/plantillas/brand.md +0 -0
  162. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/plantillas/estrategia.md +0 -0
  163. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/postfile.py +0 -0
  164. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/preflight.py +0 -0
  165. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/public_availability.py +0 -0
  166. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/publication_approval.py +0 -0
  167. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/publication_policy.py +0 -0
  168. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/publication_status.py +0 -0
  169. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/publication_steps.py +0 -0
  170. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/publish_output.py +0 -0
  171. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/qa/__init__.py +0 -0
  172. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/qa/backend.py +0 -0
  173. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/qa/cli.py +0 -0
  174. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/qa/guard.py +0 -0
  175. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/qa/models.py +0 -0
  176. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/qa/runner.py +0 -0
  177. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/qa/store.py +0 -0
  178. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/qa/transport.py +0 -0
  179. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/queue_migration.py +0 -0
  180. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/read_checkpoints.py +0 -0
  181. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/rutas.py +0 -0
  182. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/schedule_remote.py +0 -0
  183. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/schedule_sqlite.py +0 -0
  184. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/scheduler.py +0 -0
  185. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/scheduler_launchd.py +0 -0
  186. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/scheduler_systemd.py +0 -0
  187. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/source_links.py +0 -0
  188. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/ui/__init__.py +0 -0
  189. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/ui/assets/cli-result.schema.json +0 -0
  190. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/upload_consent.py +0 -0
  191. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/workspace.py +0 -0
  192. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/youtube_data.py +0 -0
  193. {socialcli-0.3.4 → socialcli-0.3.8}/socialctl/youtube_data_service.py +0 -0
@@ -0,0 +1,142 @@
1
+ Metadata-Version: 2.5
2
+ Name: socialcli
3
+ Version: 0.3.8
4
+ Summary: SocialCli: publish and manage creator-owned social content from the terminal.
5
+ Project-URL: Homepage, https://socialcli.app
6
+ Project-URL: Documentation, https://socialcli.app/ai-agents.html
7
+ Project-URL: Terms, https://socialcli.app/terms.html
8
+ License-Expression: LicenseRef-SocialCli-Proprietary
9
+ License-File: LICENSE
10
+ License-File: LICENSE-MIT-LEGACY
11
+ Requires-Python: >=3.11
12
+ Requires-Dist: certifi>=2026.10.19
13
+ Requires-Dist: httpx>=0.28.1
14
+ Requires-Dist: keyring>=25.0
15
+ Requires-Dist: pydantic>=2.13.5
16
+ Requires-Dist: pyyaml>=6.0.3
17
+ Requires-Dist: typer>=0.27.2
18
+ Provides-Extra: headless-credentials
19
+ Requires-Dist: cryptography>=43; extra == 'headless-credentials'
20
+ Description-Content-Type: text/markdown
21
+
22
+ <p align="center"><img src="https://socialcli.app/assets/socialcli-logo.png" width="128" height="128" alt="SocialCli logo: S and terminal prompt &gt;_"></p>
23
+
24
+ # SocialCli
25
+
26
+ **Social media tools for your AI agent.** SocialCli gives a terminal-enabled
27
+ assistant concrete commands to work with your YouTube channel: read available
28
+ content and comments, prepare uploads and replies, manage supported metadata and
29
+ playlists, and schedule eligible videos with your approval.
30
+
31
+ SocialCli is a product of **Florentino.pro**. It is a CLI, not an AI model or an
32
+ MCP server. It works with Muse, Grok bot, Codex, Claude, Gemini and other agents
33
+ that have terminal access and persistent storage.
34
+
35
+ [Website](https://socialcli.app/) · [Installation](https://socialcli.app/installation.html) · [Agent guide](https://socialcli.app/ai-agents.html) · [Features and limits](https://socialcli.app/capabilities.html) · [Security](https://socialcli.app/security.html)
36
+
37
+ ## Get started
38
+
39
+ Copy this line into your AI assistant:
40
+
41
+ > Install SocialCli https://socialcli.app/agents
42
+
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
45
+ isolated environment and verifies the active executable with
46
+ `socialcli --version`. The version of this distribution is listed in its package
47
+ metadata above; the website provides current installation and availability
48
+ information.
49
+
50
+ Requirements: macOS or Linux, Python 3.11 or newer, persistent workspace storage
51
+ and protected credentials. Video inspection also requires ffprobe from FFmpeg.
52
+ A chat-only assistant cannot run SocialCli directly.
53
+
54
+ Name the brand and channel you own or manage. Your assistant prepares only
55
+ missing setup and sends you the SocialCli sign-in and YouTube connection links.
56
+ Open them in your own browser and confirm your account. Never share email codes,
57
+ passwords or tokens in chat. Keep your workspace and credential store when
58
+ updating the client.
59
+
60
+ ## Work naturally, approve precisely
61
+
62
+ Try these prompts with your own brand and supplied files:
63
+
64
+ > Connect MyBrand to YouTube and show me its recent videos.
65
+
66
+ > Review recent comments and prepare replies for my approval.
67
+
68
+ > Prepare this finished video for YouTube. Show me the complete preview before publishing.
69
+
70
+ > Prepare a title change for this video, then verify the result after I approve it.
71
+
72
+ SocialCli uses a **preview → explicit approval → readback** workflow. The preview
73
+ identifies the exact account, content, media, visibility and scheduled time when
74
+ applicable. Your assistant carries the matching fingerprint after approval;
75
+ you do not need to type it. Connecting or subscribing does not authorize writes.
76
+
77
+ A receipt alone is not always proof of the requested result. Partial results keep
78
+ coverage limits explicit, and uncertain writes must not be automatically retried.
79
+ An accepted thumbnail upload may still lack proof of visual replacement.
80
+
81
+ ## Availability and limits
82
+
83
+ Only YouTube is publicly available. Facebook, Instagram and TikTok are pending
84
+ approval and unavailable to public customers. See the
85
+ [live platform status](https://socialcli.app/platforms.html).
86
+
87
+ Google approved `youtube.readonly`, `youtube.force-ssl` and `youtube.upload` for
88
+ SocialCli. These approvals do not include Analytics or Reporting scopes. Available
89
+ actions depend on granted permissions, the exact account and resource, and the
90
+ operation's prerequisites. Full YouTube stats requires Analytics access for video
91
+ selection; do not assume it is available through the public connection.
92
+
93
+ YouTube scheduling supports eligible never-published private videos and new
94
+ uploads through the native scheduling workflow. Native uploads require the
95
+ applicable calendar review and operator evidence. The assistant checks those
96
+ prerequisites before preparing a schedule. YouTube disables comments on private
97
+ videos. YouTube comment likes/hearts are not exposed by SocialCli.
98
+
99
+ Provide finished media files. SocialCli does not generate, crop or transcode them.
100
+ Read the [complete features and limits](https://socialcli.app/capabilities.html)
101
+ for the supported public workflow.
102
+
103
+ ## Instructions for agents
104
+
105
+ Start with the active installation:
106
+
107
+ ```bash
108
+ socialcli --version
109
+ socialcli --help
110
+ socialcli agent-guide interaction
111
+ socialcli agent-guide actions
112
+ ```
113
+
114
+ Use a persistent workspace outside the installed package, and an explicitly
115
+ named brand. Follow installed command help and observed service capabilities;
116
+ a source checkout or website update does not upgrade another agent environment.
117
+ Use `socialcli agent-guide all` for the advanced offline reference. Examples for
118
+ platforms under review do not enable public access.
119
+
120
+ Keep JSON stdout separate from progress stderr. Preserve useful observations from
121
+ partial reads. A read failure does not by itself authorize reconnecting an
122
+ account, resetting credentials or repeating a write.
123
+
124
+ ## Subscription, security and support
125
+
126
+ The public client connects to the hosted SocialCli service. Installing the client
127
+ does not grant account access or a subscription. Current pricing and trial terms
128
+ are available on the [website](https://socialcli.app/) and in the
129
+ [terms](https://socialcli.app/terms.html).
130
+
131
+ Provider application secrets stay on the service. Use an OS keyring or the
132
+ explicit encrypted-file backend for supported local credentials; preserve the
133
+ external encryption key securely. See the
134
+ [security guide](https://socialcli.app/security.html) and
135
+ [privacy policy](https://socialcli.app/privacy.html).
136
+
137
+ The source repository is private. Customers install the public client package;
138
+ GitHub access is not required. The hosted server is excluded from this package.
139
+ SocialCli uses a proprietary license owned by Florentino.pro; see the included
140
+ `LICENSE`. `LICENSE-MIT-LEGACY` preserves notices for earlier MIT-covered code.
141
+
142
+ Support: [admin@socialcli.app](mailto:admin@socialcli.app).
@@ -0,0 +1,121 @@
1
+ <p align="center"><img src="https://socialcli.app/assets/socialcli-logo.png" width="128" height="128" alt="SocialCli logo: S and terminal prompt &gt;_"></p>
2
+
3
+ # SocialCli
4
+
5
+ **Social media tools for your AI agent.** SocialCli gives a terminal-enabled
6
+ assistant concrete commands to work with your YouTube channel: read available
7
+ content and comments, prepare uploads and replies, manage supported metadata and
8
+ playlists, and schedule eligible videos with your approval.
9
+
10
+ SocialCli is a product of **Florentino.pro**. It is a CLI, not an AI model or an
11
+ MCP server. It works with Muse, Grok bot, Codex, Claude, Gemini and other agents
12
+ that have terminal access and persistent storage.
13
+
14
+ [Website](https://socialcli.app/) · [Installation](https://socialcli.app/installation.html) · [Agent guide](https://socialcli.app/ai-agents.html) · [Features and limits](https://socialcli.app/capabilities.html) · [Security](https://socialcli.app/security.html)
15
+
16
+ ## Get started
17
+
18
+ Copy this line into your AI assistant:
19
+
20
+ > Install SocialCli https://socialcli.app/agents
21
+
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
24
+ isolated environment and verifies the active executable with
25
+ `socialcli --version`. The version of this distribution is listed in its package
26
+ metadata above; the website provides current installation and availability
27
+ information.
28
+
29
+ Requirements: macOS or Linux, Python 3.11 or newer, persistent workspace storage
30
+ and protected credentials. Video inspection also requires ffprobe from FFmpeg.
31
+ A chat-only assistant cannot run SocialCli directly.
32
+
33
+ Name the brand and channel you own or manage. Your assistant prepares only
34
+ missing setup and sends you the SocialCli sign-in and YouTube connection links.
35
+ Open them in your own browser and confirm your account. Never share email codes,
36
+ passwords or tokens in chat. Keep your workspace and credential store when
37
+ updating the client.
38
+
39
+ ## Work naturally, approve precisely
40
+
41
+ Try these prompts with your own brand and supplied files:
42
+
43
+ > Connect MyBrand to YouTube and show me its recent videos.
44
+
45
+ > Review recent comments and prepare replies for my approval.
46
+
47
+ > Prepare this finished video for YouTube. Show me the complete preview before publishing.
48
+
49
+ > Prepare a title change for this video, then verify the result after I approve it.
50
+
51
+ SocialCli uses a **preview → explicit approval → readback** workflow. The preview
52
+ identifies the exact account, content, media, visibility and scheduled time when
53
+ applicable. Your assistant carries the matching fingerprint after approval;
54
+ you do not need to type it. Connecting or subscribing does not authorize writes.
55
+
56
+ A receipt alone is not always proof of the requested result. Partial results keep
57
+ coverage limits explicit, and uncertain writes must not be automatically retried.
58
+ An accepted thumbnail upload may still lack proof of visual replacement.
59
+
60
+ ## Availability and limits
61
+
62
+ Only YouTube is publicly available. Facebook, Instagram and TikTok are pending
63
+ approval and unavailable to public customers. See the
64
+ [live platform status](https://socialcli.app/platforms.html).
65
+
66
+ Google approved `youtube.readonly`, `youtube.force-ssl` and `youtube.upload` for
67
+ SocialCli. These approvals do not include Analytics or Reporting scopes. Available
68
+ actions depend on granted permissions, the exact account and resource, and the
69
+ operation's prerequisites. Full YouTube stats requires Analytics access for video
70
+ selection; do not assume it is available through the public connection.
71
+
72
+ YouTube scheduling supports eligible never-published private videos and new
73
+ uploads through the native scheduling workflow. Native uploads require the
74
+ applicable calendar review and operator evidence. The assistant checks those
75
+ prerequisites before preparing a schedule. YouTube disables comments on private
76
+ videos. YouTube comment likes/hearts are not exposed by SocialCli.
77
+
78
+ Provide finished media files. SocialCli does not generate, crop or transcode them.
79
+ Read the [complete features and limits](https://socialcli.app/capabilities.html)
80
+ for the supported public workflow.
81
+
82
+ ## Instructions for agents
83
+
84
+ Start with the active installation:
85
+
86
+ ```bash
87
+ socialcli --version
88
+ socialcli --help
89
+ socialcli agent-guide interaction
90
+ socialcli agent-guide actions
91
+ ```
92
+
93
+ Use a persistent workspace outside the installed package, and an explicitly
94
+ named brand. Follow installed command help and observed service capabilities;
95
+ a source checkout or website update does not upgrade another agent environment.
96
+ Use `socialcli agent-guide all` for the advanced offline reference. Examples for
97
+ platforms under review do not enable public access.
98
+
99
+ Keep JSON stdout separate from progress stderr. Preserve useful observations from
100
+ partial reads. A read failure does not by itself authorize reconnecting an
101
+ account, resetting credentials or repeating a write.
102
+
103
+ ## Subscription, security and support
104
+
105
+ The public client connects to the hosted SocialCli service. Installing the client
106
+ does not grant account access or a subscription. Current pricing and trial terms
107
+ are available on the [website](https://socialcli.app/) and in the
108
+ [terms](https://socialcli.app/terms.html).
109
+
110
+ Provider application secrets stay on the service. Use an OS keyring or the
111
+ explicit encrypted-file backend for supported local credentials; preserve the
112
+ external encryption key securely. See the
113
+ [security guide](https://socialcli.app/security.html) and
114
+ [privacy policy](https://socialcli.app/privacy.html).
115
+
116
+ The source repository is private. Customers install the public client package;
117
+ GitHub access is not required. The hosted server is excluded from this package.
118
+ SocialCli uses a proprietary license owned by Florentino.pro; see the included
119
+ `LICENSE`. `LICENSE-MIT-LEGACY` preserves notices for earlier MIT-covered code.
120
+
121
+ Support: [admin@socialcli.app](mailto:admin@socialcli.app).
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "socialcli"
3
- version = "0.3.4"
3
+ version = "0.3.8"
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"
@@ -57,9 +57,11 @@ _CATALOG = {
57
57
  'native_ui_required': ('user_action', 'Continue the exact approved handoff in the official platform UI. A submitted boundary permits readback only.'),
58
58
  'native_verify': ('reconcile', 'Collect fresh official evidence for this existing job. Scheduling alone does not prove publication.'),
59
59
  'operation_failed': ('inspect', 'Inspect the current state before taking another action.'),
60
+ 'connection_verification_incomplete': ('inspect', 'The connection was installed, but its final status could not be verified. Run socialcli connections for a read-only check; do not repeat OAuth or activation.'),
60
61
  'service_rejected': ('inspect', 'Review account status and service availability.'),
61
62
  'local_configuration': ('user_action', 'Check local URL, proxy and CA configuration. No server rejection was received; keep credentials unchanged.'),
62
63
  'invalid_local_state': ('user_action', 'Review arguments, local account state and protected credential storage.'),
64
+ 'provider_count_mismatch': ('inspect', 'The provider total differs from the IDs returned after pagination ended. Keep observed items; this does not prove absence or invalid credentials. Do not guess continuation tokens.'),
63
65
  'read_partial': ('inspect', 'Keep verified observations and inspect coverage before another read.'),
64
66
  'read_deadline': ('adjust_read', 'Keep verified observations; reduce read scope or increase the read budget.'),
65
67
  'response_too_large': ('adjust_read', 'Reduce read scope or page size; do not repeat the same oversized response.'),
@@ -221,6 +223,8 @@ def safe_diagnostic(value):
221
223
  status = value.get('http_status')
222
224
  if type(status) is int and 100 <= status <= 599:
223
225
  clean['http_status'] = status
226
+ for key in ('declared_total','ids_read','pages'):
227
+ if type(value.get(key)) is int and value[key]>=0:clean[key]=value[key]
224
228
  return clean
225
229
 
226
230
 
@@ -4193,7 +4193,7 @@
4193
4193
  ],
4194
4194
  "evidence": "discovery_authorization_alternatives_not_granted_scopes"
4195
4195
  },
4196
- "eligibility": "Exact configured/authenticated channel; primary reports.query top notice requires youtube.readonly; Analytics grants govern report eligibility. Actual stored scopes and API outcomes recorded separately; no implicit refresh/new grant.",
4196
+ "eligibility": "Exact configured/authenticated channel. The official reports.query notice requires youtube.readonly; supported nonmonetary reports can work with that grant. A successful query does not establish Analytics group, Reporting, monetary or management access. Respect method-specific scopes and observed report eligibility; no implicit new grant.",
4197
4197
  "source": {
4198
4198
  "url": "https://www.googleapis.com/discovery/v1/apis/youtubeAnalytics/v2/rest",
4199
4199
  "observed_at": "2026-09-12",
@@ -4213,7 +4213,7 @@
4213
4213
  "related_commands": [],
4214
4214
  "approval": "none_read_only",
4215
4215
  "prerequisites": [
4216
- "Select supported metrics, official date periods and exact owned resources; monetary/content-owner families are excluded. Current Analytics/Reporting grants and report-type availability must be checked."
4216
+ "Use the connected channel and supported nonmonetary metrics. reports.query supports youtube.readonly; do not request --analytics solely because that separate scope is absent. Analytics groups and Reporting jobs have their own grants. Keep any actual provider rejection and partial coverage."
4217
4217
  ],
4218
4218
  "verification_limits": [
4219
4219
  "Partial pages and missing/suppressed metrics remain incomplete or unknown; successful reads do not prove access to all dates or report types."
@@ -4233,7 +4233,7 @@
4233
4233
  "related_commands": [],
4234
4234
  "approval": "none_read_only",
4235
4235
  "prerequisites": [
4236
- "Select supported metrics, official date periods and exact owned resources; monetary/content-owner families are excluded. Current Analytics/Reporting grants and report-type availability must be checked."
4236
+ "Use the connected channel and supported nonmonetary metrics. reports.query supports youtube.readonly; do not request --analytics solely because that separate scope is absent. Analytics groups and Reporting jobs have their own grants. Keep any actual provider rejection and partial coverage."
4237
4237
  ],
4238
4238
  "verification_limits": [
4239
4239
  "Partial pages and missing/suppressed metrics remain incomplete or unknown; successful reads do not prove access to all dates or report types."
@@ -14,6 +14,7 @@ import webbrowser
14
14
  from datetime import date, datetime, timezone
15
15
  from pathlib import Path
16
16
 
17
+ from socialctl.connections.http_transport import client as environment_client
17
18
  import httpx
18
19
  import typer
19
20
  from socialctl.approval_cli import read_approval
@@ -568,7 +569,7 @@ def _auth_meta(brand: Brand, platform: Platform) -> None:
568
569
 
569
570
  typer.echo("Exchanging the token with Meta (this may take a few seconds)...")
570
571
  try:
571
- with httpx.Client(timeout=30) as client:
572
+ with environment_client(timeout=30) as client:
572
573
  token_larga_duracion = intercambiar_token_meta(
573
574
  client_id, client_secret, token_usuario, client
574
575
  )
@@ -644,7 +645,7 @@ def _auth_oauth_redireccion(
644
645
  )
645
646
 
646
647
  try:
647
- with httpx.Client(timeout=30) as client:
648
+ with environment_client(timeout=30) as client:
648
649
  secreto = canjear_codigo(
649
650
  platform, codigo, credenciales_app, REDIRECT_URI_OAUTH, client,
650
651
  code_verifier=code_verifier,
@@ -1864,7 +1865,7 @@ def stats(
1864
1865
  with redirect_stdout(sys.stderr):
1865
1866
  _limpiar_snapshots_y_avisar(marca)
1866
1867
  _avisar_de_fallos_persistentes(marca, snapshot)
1867
- coverage, errors = [], []
1868
+ coverage, errors, reasons = [], [], []
1868
1869
  for p, r in redes.items():
1869
1870
  warnings = r.warnings + [piece.especificas['enriquecimiento_fallido'] for piece in r.piezas
1870
1871
  if 'enriquecimiento_fallido' in piece.especificas]
@@ -1876,16 +1877,33 @@ def stats(
1876
1877
  'source':'previous_snapshot' if p in reused else 'durable_read' if checkpoint.resuming else 'current_read',
1877
1878
  'scopes':[scope for scope in checkpoint.coverage() if scope['platform'] in {p.value,'meta' if p in {Platform.FACEBOOK,Platform.INSTAGRAM} else p.value}]})
1878
1879
  if not complete:
1879
- errors.append({'platform':p.value, 'code':r.failure_code or {EstadoLectura.SIN_CREDENCIALES:'authorization_unavailable', EstadoLectura.SIN_PERMISO:'permissions_required'}.get(r.estado,'read_partial'), 'message':safe_error(r.error or '; '.join(warnings) or r.estado.value)})
1880
+ if r.read_reasons:
1881
+ from socialctl.agent_errors import error_for_code
1882
+ distinct={}
1883
+ for reason in r.read_reasons:
1884
+ key=(reason['code'],reason['stage'])
1885
+ distinct[key]=distinct.get(key,0)+reason.get('occurrences',1)
1886
+ for (code,stage),count in distinct.items():
1887
+ reason={'code':code,'stage':stage,'occurrences':count}
1888
+ reasons.append(reason)
1889
+ errors.append({'platform':p.value,**error_for_code(code),**reason})
1890
+ else:
1891
+ code=r.failure_code or {EstadoLectura.SIN_CREDENCIALES:'authorization_unavailable',EstadoLectura.SIN_PERMISO:'permissions_required'}.get(r.estado,'read_partial')
1892
+ reasons.append({'code':code,'stage':p.value+'.metrics','occurrences':1})
1893
+ errors.append({'platform':p.value,'code':code,'message':safe_error(r.error or '; '.join(dict.fromkeys(warnings)) or r.estado.value)})
1880
1894
  if persistence_error:
1881
1895
  errors.append({'operation':'persistence', 'code':'persistence_failed', 'message':safe_error(str(persistence_error))})
1882
1896
  errors.extend(checkpoint.diagnostics())
1897
+ reasons.extend({'code':e['code'],'stage':e.get('operation','checkpoint'),'occurrences':1}
1898
+ for e in errors if e.get('operation')=='persistence' or e.get('scope_id'))
1883
1899
  successes = sum(r.estado is EstadoLectura.OK for r in redes.values())
1884
1900
  status = 'ok' if not errors else ('partial' if successes else 'error')
1885
1901
  data = {'brand':marca.nombre, 'snapshot_path':str(ruta) if ruta else None,
1886
1902
  'snapshot':snapshot.model_dump(mode='json'),
1887
1903
  'merged_existing_platforms':sorted(p.value for p in reused), 'read_query':checkpoint.query,
1888
1904
  'observation_age_basis':'Original read start; per-request observation times are in coverage scopes'}
1905
+ from socialctl.read_reports import coverage_summary
1906
+ data['coverage_summary']=coverage_summary(status,checkpoint.summary(),checkpoint.observed_at,reasons)
1889
1907
  if persistence_error:
1890
1908
  data['persistence'] = {'saved':persistence_error.saved, 'not_saved':persistence_error.not_saved}
1891
1909
  report = ReadReport(status=status, observed_at=datetime.fromisoformat(checkpoint.observed_at), coverage=coverage, errors=errors, data=data, resume=checkpoint.summary())
@@ -9,6 +9,7 @@ from pathlib import Path
9
9
  import secrets
10
10
  import time
11
11
  import webbrowser
12
+ from socialctl.connections.http_transport import client as environment_client
12
13
  import httpx
13
14
  import typer
14
15
  from socialctl.brands import cargar_brand
@@ -27,7 +28,7 @@ Slot=Enum('Slot',{'ACCOUNT':'socialcli_account','PAIR':'socialcli_pair'})
27
28
  def http_client():
28
29
  from socialctl.read_budget import LocalConfigurationError
29
30
  try:
30
- return httpx.Client(timeout=30,follow_redirects=False)
31
+ return environment_client(timeout=30,follow_redirects=False)
31
32
  except (httpx.InvalidURL,ValueError,OSError,ImportError):
32
33
  raise LocalConfigurationError('Check local proxy, CA and HTTP transport configuration; no request was sent.') from None
33
34
 
@@ -44,8 +45,13 @@ def metadata(brand):
44
45
 
45
46
 
46
47
  def handoff(url,*,no_browser,seconds):
47
- typer.echo('Give this link directly to the user: '+url,err=True)
48
- typer.echo(f'Do not open, fetch or preview it. Keep this command running. The user has {seconds//60} minutes to approve. No content will be published.',err=True)
48
+ if seconds is not None and (type(seconds) not in {int,float} or not math.isfinite(seconds) or not 0<seconds<=1800):
49
+ raise ValueError('Invalid SocialCli authorization timing.')
50
+ # Progress is factual data. The agent's workflow belongs in its guide, not
51
+ # in service/tool output. The duration is relative to creation, not resume.
52
+ typer.echo(json.dumps({'version':1,'event':'authorization_pending','status':'pending',
53
+ 'browser_url':url,'expires_after_seconds':seconds,
54
+ 'expiry_reference':'authorization_creation' if seconds is not None else None},allow_nan=False),err=True)
49
55
  if not no_browser: webbrowser.open(url)
50
56
 
51
57
 
@@ -63,7 +69,9 @@ def wait(client,path,secret,seconds,interval,ready):
63
69
 
64
70
 
65
71
  def output(value,json_output):
66
- if json_output: typer.echo(json.dumps(value))
72
+ if json_output:
73
+ from socialctl.cli_result import emit_legacy
74
+ emit_legacy(value)
67
75
  else: typer.echo(value['status'].replace('_',' ').capitalize()+'.')
68
76
 
69
77
 
@@ -128,7 +136,7 @@ def login(brand_name:str=typer.Option(...,'--brand'),root:Path=typer.Option(defa
128
136
  atomic_bytes(pending_path,json.dumps(pending).encode())
129
137
  expected=client.origin+'/account/pair/'+pair_id
130
138
  if start.get('browser_url')!=expected: raise ValueError('Invalid SocialCli sign-in URL.')
131
- handoff(expected,no_browser=no_browser,seconds=1800)
139
+ handoff(expected,no_browser=no_browser,seconds=start['expires_in'])
132
140
  try:
133
141
  result=wait(client,'/api/saas/v1/pairings/'+pair_id+'/poll',poll_secret,min(timeout,start['expires_in']),start['poll_interval'],{'approved'})
134
142
  except ServiceRejected as exc:
@@ -189,12 +197,10 @@ def permissions(brand_name:str=typer.Option(...,'--brand'),root:Path=typer.Optio
189
197
  if supported.get('installation_platform_expansion') is not True:
190
198
  raise ValueError('This SocialCli service needs an update to add platforms. Keep existing connections; do not log out.')
191
199
  url=client.origin+'/account/installations/'+installation_id+'/platforms'
192
- typer.echo('Give this link directly to the owner: '+url,err=True)
193
- typer.echo('The owner must open it and approve additional platforms. Existing connections stay active. After approval, run connect for the new platform. Do not open or approve it for the owner.',err=True)
200
+ handoff(url,no_browser=no_browser,seconds=None)
194
201
  if json_output:
195
- typer.echo(json.dumps({'version':1,'status':'owner_action_required','browser_url':url,
196
- 'platform_access':result.get('platform_access')}))
197
- if not no_browser:webbrowser.open(url)
202
+ output({'version':1,'status':'owner_action_required','browser_url':url,
203
+ 'platform_access':result.get('platform_access')},True)
198
204
  except Exception as exc:
199
205
  if json_output:
200
206
  from socialctl.agent_errors import emit_error
@@ -330,11 +336,32 @@ def connect_saas(brand,platform,*,no_browser,account_id=None,replace_independent
330
336
  'management':management,'analytics':analytics})
331
337
  auth_id=opaque(start.get('authorization_id'));expected=client.origin+'/connect/'+auth_id
332
338
  if start.get('browser_url')!=expected:raise ValueError('Invalid account authorization URL.')
333
- handoff(expected,no_browser=no_browser,seconds=600)
339
+ handoff(expected,no_browser=no_browser,seconds=start['expires_in'])
334
340
  result=wait(client,'/api/saas/v1/authorizations/'+auth_id+'/poll',poll_secret,min(timeout,start['expires_in']),start['poll_interval'],{'selected'})
335
341
  if account_id is not None and result.get('account',{}).get('id')!=account_id:raise ValueError('Browser-selected account differs from the explicitly requested ID. No connection was installed.')
336
- finalize_local(brand,platform,client,result)
337
- typer.echo(platform.value+' connected for '+visible(brand.nombre)+'. No content was published.')
342
+ installed=finalize_local(brand,platform,client,result)
343
+ # Activation is already durable. A failed GET must never undo it or
344
+ # replay OAuth/activation; return the known identity and inspect guidance.
345
+ account=installed['account']
346
+ payload={'version':1,'status':'connected','verified':False,'platform':platform.value,
347
+ 'account':{'id':account['id'],'name':visible(account.get('name',account['id']))},'errors':[]}
348
+ try:
349
+ status=client.request('GET','/api/saas/v1/connections/'+opaque(installed['connection_id']),
350
+ secret=keychain.get(brand,platform,installed))
351
+ if (status.get('platform')!=platform.value or status.get('account',{}).get('id')!=account['id']
352
+ or status.get('needs_reconnect') is not False):
353
+ raise ValueError('Connection status did not confirm the selected account.')
354
+ payload.update(verified=True,verification_basis='owner_confirmation_and_connection_status')
355
+ except Exception:
356
+ from socialctl.agent_errors import error_for_code
357
+ payload.update(status='connected_unverified',errors=[error_for_code('connection_verification_incomplete')])
358
+ from socialctl.cli_result import active_result,emit_legacy
359
+ if active_result.get() is not None:emit_legacy(payload)
360
+ elif payload['verified']:
361
+ typer.echo(platform.value+' connected for '+visible(brand.nombre)+'. No content was published.')
362
+ else:
363
+ typer.echo('Connection installed, but status verification is incomplete. Run socialcli connections to inspect it; do not repeat connect or activation.',err=True)
364
+ return payload['verified']
338
365
 
339
366
 
340
367
  @account_app.command('attach')
@@ -411,7 +438,7 @@ def migrate(platform:Platform,brand_name:str=typer.Option(...,'--brand'),root:Pa
411
438
  'poll_challenge':hashlib.sha256(poll_secret.encode()).hexdigest()})
412
439
  migration_id=opaque(start.get('migration_id'));expected=client.origin+'/account/migrate/'+migration_id
413
440
  if start.get('browser_url')!=expected:raise ValueError('Invalid SocialCli migration URL.')
414
- handoff(expected,no_browser=no_browser,seconds=600)
441
+ handoff(expected,no_browser=no_browser,seconds=start['expires_in'])
415
442
  result=wait(client,'/api/saas/v1/migrations/'+migration_id+'/poll',poll_secret,
416
443
  min(timeout,start['expires_in']),start['poll_interval'],{'selected'})
417
444
  if result.get('account',{}).get('id')!=old.get('account_id'):
@@ -13,6 +13,7 @@ import time
13
13
  import webbrowser
14
14
  from pathlib import Path
15
15
 
16
+ from socialctl.connections.http_transport import client as environment_client
16
17
  import httpx
17
18
  import typer
18
19
  import yaml
@@ -34,7 +35,7 @@ def interactive_terminal():
34
35
  def http_client():
35
36
  from socialctl.read_budget import LocalConfigurationError
36
37
  try:
37
- return httpx.Client(timeout=30,follow_redirects=False)
38
+ return environment_client(timeout=30,follow_redirects=False)
38
39
  except (httpx.InvalidURL,ValueError,OSError,ImportError):
39
40
  raise LocalConfigurationError('Check local proxy, CA and HTTP transport configuration; no request was sent.') from None
40
41
 
@@ -146,7 +147,8 @@ def register(app):
146
147
  raise ValueError('TikTok analytics permission is not available in this connection flow')
147
148
  from socialctl.connections.account_cli import metadata as account_metadata,connect_saas
148
149
  if account_metadata(brand):
149
- connect_saas(brand,platform,no_browser=no_browser,account_id=account_id,replace_independent=replace_independent,management=management,analytics=analytics,timeout=timeout)
150
+ verified=connect_saas(brand,platform,no_browser=no_browser,account_id=account_id,replace_independent=replace_independent,management=management,analytics=analytics,timeout=timeout)
151
+ if not verified:raise typer.Exit(1)
150
152
  return
151
153
  previous=brand.leer_secreto(platform)
152
154
  if previous.get('auth_mode')=='broker':
@@ -260,6 +262,8 @@ def register(app):
260
262
  raise
261
263
  typer.echo(f'{platform.value} connected for {visible(brand.nombre)}. Credentials are held in your OS keyring.')
262
264
  connected=None # Successfully installed: do not cancel in finally.
265
+ except typer.Exit:
266
+ raise
263
267
  except (KeyboardInterrupt,typer.Abort):
264
268
  fail('Connection cancelled.')
265
269
  except ValueError as exc:
@@ -0,0 +1,58 @@
1
+ """Preserve environment routing when NO_PROXY contains bracketed IPv6.
2
+
3
+ HTTPX 0.28's environment reader treats ``[::1]`` as a wildcard domain,
4
+ producing the invalid URL pattern ``all://*[::1]``. Correct only that pattern
5
+ at client construction; never mutate the environment or drop an exclusion.
6
+ The small private proxy-map hook is covered by routing regression tests.
7
+ """
8
+ import ipaddress
9
+ import re
10
+
11
+ import httpx
12
+ from httpx._utils import get_environment_proxies
13
+
14
+
15
+ def _proxy_pattern(pattern):
16
+ match = re.fullmatch(r'all://\*\[([^\]]+)\](:[0-9]+)?', pattern)
17
+ if match is None:
18
+ return pattern
19
+ try:
20
+ ipaddress.IPv6Address(match[1])
21
+ except ValueError:
22
+ return pattern
23
+ return 'all://[' + match[1] + ']' + (match[2] or '')
24
+
25
+
26
+ class _IPv6ProxyMap:
27
+ def _get_proxy_map(self, proxy, allow_env_proxies):
28
+ if proxy is not None or not allow_env_proxies:
29
+ return super()._get_proxy_map(proxy, allow_env_proxies)
30
+ return {
31
+ _proxy_pattern(pattern): None if url is None else httpx.Proxy(url=url)
32
+ for pattern, url in get_environment_proxies().items()
33
+ }
34
+
35
+
36
+ class _Client(_IPv6ProxyMap, httpx.Client):
37
+ pass
38
+
39
+
40
+ class _AsyncClient(_IPv6ProxyMap, httpx.AsyncClient):
41
+ pass
42
+
43
+
44
+ def _needs_compatibility(kwargs):
45
+ if (not kwargs.get('trust_env', True) or kwargs.get('transport') is not None
46
+ or kwargs.get('proxy') is not None):
47
+ return False
48
+ return any(_proxy_pattern(pattern) != pattern for pattern in get_environment_proxies())
49
+
50
+
51
+ def client(**kwargs):
52
+ factory = _Client if _needs_compatibility(kwargs) else httpx.Client
53
+ return factory(**kwargs)
54
+
55
+
56
+ def async_client(**kwargs):
57
+ factory = _AsyncClient if _needs_compatibility(kwargs) else httpx.AsyncClient
58
+ return factory(**kwargs)
@@ -78,6 +78,7 @@ def _scan(command, args):
78
78
  left for Click to reject; scanning them cannot invoke callbacks or writes.
79
79
  """
80
80
  selected, path, enabled, versions, special, aliases, options = command, [], False, [], None, [], {}
81
+ unknown_command = False
81
82
  index = 0
82
83
  while index < len(args):
83
84
  token = args[index]
@@ -103,12 +104,16 @@ def _scan(command, args):
103
104
  options[name] = values[0] if values else True
104
105
  index += 1 + (0 if eq else count)
105
106
  continue
106
- if not token.startswith('-') and hasattr(selected,'commands'):
107
+ if not unknown_command and not token.startswith('-') and hasattr(selected,'commands'):
107
108
  if token not in selected.commands:
108
109
  path.append(token)
109
- break
110
- selected = selected.commands[token]
111
- path.append(token)
110
+ # Keep scanning the last known group's option arities so a
111
+ # trailing JSON request also covers this parse failure. Never
112
+ # resolve later tokens as commands after an invalid path.
113
+ unknown_command = True
114
+ else:
115
+ selected = selected.commands[token]
116
+ path.append(token)
112
117
  index += 1
113
118
  version = ('conflict' if len(set(versions)) > 1 else versions[-1]) if versions else '1' if selected._legacy_json else '2'
114
119
  return selected, ' '.join(path), enabled or bool(versions), version, special, aliases, options
@@ -14,7 +14,7 @@ def register(app,default_root):
14
14
  register_engagement(app,default_root)
15
15
  from socialctl.brands import cargar_brand,BrandNoEncontrada,NombreDeMarcaInvalido,AccountsInvalido
16
16
  @app.command('inbox')
17
- def inbox(brand:str=typer.Option(...,'--brand'),since:str|None=typer.Option(None,'--since'),timezone_name:str|None=typer.Option(None,'--timezone'),json_output:bool=typer.Option(False,'--json'),timeout:float=typer.Option(300,'--timeout',help='Total read budget in seconds; use --only to give one platform the full budget.'),only:list[Platform]=typer.Option(None,'--only',help='Read only selected platforms; repeat to select more than one.'),root:Path=typer.Option(default_root,'--root'),resume:str|None=typer.Option(None,'--resume',help='Continue an unfinished local read with its recorded query.')):
17
+ def inbox(brand:str=typer.Option(...,'--brand'),since:str|None=typer.Option(None,'--since',help='Required for an initial read: local date, yesterday or RFC3339 timestamp. Omit when resuming.'),timezone_name:str|None=typer.Option(None,'--timezone',help='IANA timezone for local dates/yesterday, unless set in inbox.yml. Not needed for an explicit RFC3339 offset or resume.'),json_output:bool=typer.Option(False,'--json'),timeout:float=typer.Option(300,'--timeout',help='Total read budget in seconds; use --only to give one platform the full budget.'),only:list[Platform]=typer.Option(None,'--only',help='Read only selected platforms; repeat to select more than one.'),root:Path=typer.Option(default_root,'--root'),resume:str|None=typer.Option(None,'--resume',help='Continue an unfinished local read with its recorded query.')):
18
18
  try:
19
19
  selected=cargar_brand(root,brand)
20
20
  zone=timezone_name