socialcli 0.3.4__tar.gz → 0.3.7__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.
- socialcli-0.3.7/PKG-INFO +142 -0
- socialcli-0.3.7/README.md +121 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/pyproject.toml +1 -1
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/agent_errors.py +4 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/capabilities.yml +3 -3
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/cli.py +22 -4
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/connections/account_cli.py +25 -3
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/connections/cli.py +6 -2
- socialcli-0.3.7/socialctl/connections/http_transport.py +58 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/entrypoint.py +9 -4
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/inbox_cli.py +1 -1
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/inventory.py +4 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/inventory_cli.py +4 -1
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/cli.py +2 -1
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/community_cli.py +2 -1
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/meta_cli.py +2 -1
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/owned_cli.py +9 -2
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/resource_cli.py +2 -1
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/stories_cli.py +2 -1
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/youtube_owned.py +3 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/analytics_cli.py +2 -1
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/modelos.py +3 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/youtube.py +45 -3
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/cli.py +4 -3
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/publisher.py +2 -1
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/read_budget.py +2 -1
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/read_reports.py +14 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/ui/assets/agent-actions.json +6 -6
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/ui/assets/agent-journey.json +13 -4
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/ui/assets/agent-manual.md +8 -4
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/ui/assets/agents.md +3 -3
- socialcli-0.3.4/PKG-INFO +0 -171
- socialcli-0.3.4/README.md +0 -150
- {socialcli-0.3.4 → socialcli-0.3.7}/.gitignore +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/LICENSE +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/LICENSE-MIT-LEGACY +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/__init__.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/__main__.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/adapters/__init__.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/adapters/base.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/adapters/errores.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/adapters/facebook.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/adapters/instagram.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/adapters/tiktok.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/adapters/youtube.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/agent_guide.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/agent_journey.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/approval_cli.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/auth.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/authflow.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/brands.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/capabilities.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/cli_result.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/connections/__init__.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/connections/client.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/connections/credential_cli.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/connections/credential_store.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/connections/file_store.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/connections/keychain.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/connections/meta_user.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/connections/rotation_cli.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/connections/saas_client.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/connections/temporary_media.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/connections/token_requests.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/context.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/context_cli.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/delivery_options.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/engagement.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/engagement_cli.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/executor.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/formatter.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/hosted_media.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/identity.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/inbox.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/inventory_sources.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/__init__.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/batch_cli.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/batches.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/changes.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/comments_cli.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/community_batch_cli.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/community_batches.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/community_changes.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/community_schema.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/facebook_groups.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/groups_cli.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/inbox_readers.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/meta_changes.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/meta_client.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/meta_comment_inbox.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/meta_comments.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/meta_errors.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/meta_pagination.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/meta_schema.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/meta_webhooks.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/metadata_parts.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/owned_assets.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/owned_changes.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/owned_reorder.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/owned_schema.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/reply_context.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/reply_evidence.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/resource_changes.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/snippet_readback.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/stories.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/youtube.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/youtube_community.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/youtube_metadata.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/management/youtube_resources.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/media.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/media_cli.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/media_ingress.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/media_preflight.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/media_registry.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/media_requirements.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/__init__.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/almacen.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/analytics_changes.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/analytics_client.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/analytics_ingest.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/analytics_schema.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/base.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/facebook.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/insights.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/instagram.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/piezas.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/reach.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/reporting_client.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/resumen.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/slugs.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/metricas/tiktok.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/migration_cli.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/migration_files.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/models.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/__init__.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/api_delivery.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/api_reconcile.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/approval.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/attestations.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/cadence.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/dispatcher.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/facebook.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/facebook_reels.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/first_comment.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/handoff.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/instagram_delivery.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/instagram_runtime.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/inventory.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/migration.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/models.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/preflight.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/preparation.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/reconcile.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/remote_data.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/report.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/store.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/verification.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/native_schedule/youtube.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/operation_output.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/plantillas/accounts.yml +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/plantillas/brand.md +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/plantillas/estrategia.md +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/postfile.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/preflight.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/public_availability.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/publication_approval.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/publication_policy.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/publication_status.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/publication_steps.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/publish_output.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/qa/__init__.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/qa/backend.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/qa/cli.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/qa/guard.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/qa/models.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/qa/runner.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/qa/store.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/qa/transport.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/queue_migration.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/read_checkpoints.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/rutas.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/schedule_remote.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/schedule_sqlite.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/scheduler.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/scheduler_launchd.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/scheduler_systemd.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/source_links.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/ui/__init__.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/ui/assets/cli-result.schema.json +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/upload_consent.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/workspace.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/youtube_data.py +0 -0
- {socialcli-0.3.4 → socialcli-0.3.7}/socialctl/youtube_data_service.py +0 -0
socialcli-0.3.7/PKG-INFO
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: socialcli
|
|
3
|
+
Version: 0.3.7
|
|
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 >_"></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 >_"></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).
|
|
@@ -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
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
|
@@ -333,8 +334,29 @@ def connect_saas(brand,platform,*,no_browser,account_id=None,replace_independent
|
|
|
333
334
|
handoff(expected,no_browser=no_browser,seconds=600)
|
|
334
335
|
result=wait(client,'/api/saas/v1/authorizations/'+auth_id+'/poll',poll_secret,min(timeout,start['expires_in']),start['poll_interval'],{'selected'})
|
|
335
336
|
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
|
-
|
|
337
|
+
installed=finalize_local(brand,platform,client,result)
|
|
338
|
+
# Activation is already durable. A failed GET must never undo it or
|
|
339
|
+
# replay OAuth/activation; return the known identity and inspect guidance.
|
|
340
|
+
account=installed['account']
|
|
341
|
+
payload={'version':1,'status':'connected','verified':False,'platform':platform.value,
|
|
342
|
+
'account':{'id':account['id'],'name':visible(account.get('name',account['id']))},'errors':[]}
|
|
343
|
+
try:
|
|
344
|
+
status=client.request('GET','/api/saas/v1/connections/'+opaque(installed['connection_id']),
|
|
345
|
+
secret=keychain.get(brand,platform,installed))
|
|
346
|
+
if (status.get('platform')!=platform.value or status.get('account',{}).get('id')!=account['id']
|
|
347
|
+
or status.get('needs_reconnect') is not False):
|
|
348
|
+
raise ValueError('Connection status did not confirm the selected account.')
|
|
349
|
+
payload.update(verified=True,verification_basis='owner_confirmation_and_connection_status')
|
|
350
|
+
except Exception:
|
|
351
|
+
from socialctl.agent_errors import error_for_code
|
|
352
|
+
payload.update(status='connected_unverified',errors=[error_for_code('connection_verification_incomplete')])
|
|
353
|
+
from socialctl.cli_result import active_result,emit_legacy
|
|
354
|
+
if active_result.get() is not None:emit_legacy(payload)
|
|
355
|
+
if payload['verified']:
|
|
356
|
+
typer.echo(platform.value+' connected for '+visible(brand.nombre)+'. No content was published.')
|
|
357
|
+
else:
|
|
358
|
+
typer.echo('Connection installed, but status verification is incomplete. Run socialcli connections to inspect it; do not repeat connect or activation.',err=True)
|
|
359
|
+
return payload['verified']
|
|
338
360
|
|
|
339
361
|
|
|
340
362
|
@account_app.command('attach')
|
|
@@ -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
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
|
@@ -139,6 +139,7 @@ def sync_content(brand, platform, client, *, max_pages=20, resume=False):
|
|
|
139
139
|
if identifier not in run["seen_ids"]:
|
|
140
140
|
row["presence"] = "not_observed"
|
|
141
141
|
row["absence_observed_at"] = observed_at
|
|
142
|
+
run["last_page_observed_at"] = observed_at
|
|
142
143
|
run["updated_at"] = observed_at
|
|
143
144
|
state["sync"] = run
|
|
144
145
|
store.save(state) # Page and checkpoint commit in one atomic durable file.
|
|
@@ -166,6 +167,9 @@ def sync_content(brand, platform, client, *, max_pages=20, resume=False):
|
|
|
166
167
|
"retained_items": len(state["items"]) - deleted_count,
|
|
167
168
|
"absence_proves_deletion": False,
|
|
168
169
|
"deletion_scope": "Distinct IDs with valid local account-bound delete receipts and exact-ID absence; not a lifetime or server-wide deletion count. Missing local evidence is unknown, not proof of no deletions.",
|
|
170
|
+
"count_observations":[
|
|
171
|
+
{"value":len(run['seen_ids']),"source":run.get('source'),"observed_at":run.get('last_page_observed_at'),"visibility_scope":"owner_accessible_returned_items"},
|
|
172
|
+
{"value":len(state['items']),"source":"local_historical_inventory","observed_at":run.get('last_page_observed_at'),"visibility_scope":"retained_items_including_verified_deletions"}],
|
|
169
173
|
"count_semantics": {"observed_items": "Distinct owner-accessible items returned in this sync, including non-public items when returned",
|
|
170
174
|
"stored_items": "Local historical inventory, including retained verified deletions",
|
|
171
175
|
"verified_deleted_items": "Distinct verified local deletions, including IDs never stored in inventory",
|
|
@@ -8,6 +8,7 @@ import shutil
|
|
|
8
8
|
import subprocess
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
|
|
11
|
+
from socialctl.connections.http_transport import client as environment_client
|
|
11
12
|
import httpx
|
|
12
13
|
import typer
|
|
13
14
|
|
|
@@ -25,7 +26,7 @@ DEFAULT_ROOT = default_root()
|
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
def make_http_client():
|
|
28
|
-
return
|
|
29
|
+
return environment_client(timeout=30)
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
def emit(data, json_output):
|
|
@@ -108,6 +109,8 @@ def register(app, content_app):
|
|
|
108
109
|
"configured_account_id": configured, "historical_account": selected_account != configured,
|
|
109
110
|
"authority": "cached_observation", "sync": {k: run.get(k) for k in (
|
|
110
111
|
"id", "complete", "failure_class", "updated_at", "pages", "source", "missing_resource_ids")},
|
|
112
|
+
"count_observations":[{"value":len(state['items']),"source":"local_historical_inventory",
|
|
113
|
+
"observed_at":run.get('last_page_observed_at'),"visibility_scope":"retained_items_including_verified_deletions"}],
|
|
111
114
|
"items": store.public_items(state), "failure_class": None}
|
|
112
115
|
|
|
113
116
|
@content_app.command("list")
|
|
@@ -6,6 +6,7 @@ import difflib
|
|
|
6
6
|
import json
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
|
|
9
|
+
from socialctl.connections.http_transport import client as environment_client
|
|
9
10
|
import httpx
|
|
10
11
|
import typer
|
|
11
12
|
|
|
@@ -40,7 +41,7 @@ changes_app = typer.Typer(help="Inspect and apply previously prepared ChangeSets
|
|
|
40
41
|
|
|
41
42
|
def make_http_client() -> httpx.Client:
|
|
42
43
|
"""Small construction hook for testing CLI without live network."""
|
|
43
|
-
return
|
|
44
|
+
return environment_client(timeout=30.0)
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
def _fail(message: str) -> None:
|