socialcli 0.3.2__tar.gz → 0.3.4__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.2 → socialcli-0.3.4}/LICENSE +3 -3
- {socialcli-0.3.2 → socialcli-0.3.4}/PKG-INFO +17 -13
- {socialcli-0.3.2 → socialcli-0.3.4}/README.md +15 -12
- {socialcli-0.3.2 → socialcli-0.3.4}/pyproject.toml +54 -24
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/__main__.py +2 -2
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/adapters/youtube.py +5 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/agent_errors.py +93 -9
- socialcli-0.3.4/socialctl/agent_guide.py +52 -0
- socialcli-0.3.4/socialctl/agent_journey.py +131 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/auth.py +10 -1
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/brands.py +26 -7
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/capabilities.py +4 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/capabilities.yml +2007 -127
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/cli.py +356 -189
- socialcli-0.3.4/socialctl/cli_result.py +148 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/connections/account_cli.py +7 -4
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/connections/cli.py +2 -2
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/connections/client.py +2 -0
- socialcli-0.3.4/socialctl/connections/token_requests.py +35 -0
- socialcli-0.3.4/socialctl/context.py +306 -0
- socialcli-0.3.4/socialctl/context_cli.py +133 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/delivery_options.py +7 -2
- socialcli-0.3.4/socialctl/entrypoint.py +312 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/executor.py +3 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/identity.py +8 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/inbox.py +18 -7
- socialcli-0.3.4/socialctl/inbox_cli.py +77 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/inventory.py +68 -2
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/inventory_cli.py +12 -4
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/batch_cli.py +7 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/batches.py +46 -7
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/changes.py +40 -10
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/cli.py +35 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/comments_cli.py +2 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/community_batch_cli.py +2 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/community_batches.py +1 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/community_changes.py +19 -2
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/community_cli.py +2 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/facebook_groups.py +1 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/groups_cli.py +2 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/meta_changes.py +1 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/meta_cli.py +2 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/meta_client.py +4 -1
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/meta_comment_inbox.py +5 -2
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/meta_comments.py +5 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/owned_changes.py +79 -23
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/owned_cli.py +39 -34
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/reply_evidence.py +4 -1
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/resource_changes.py +26 -3
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/resource_cli.py +2 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/snippet_readback.py +14 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/stories.py +1 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/stories_cli.py +2 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/youtube.py +10 -4
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/youtube_community.py +13 -3
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/youtube_owned.py +8 -3
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/youtube_resources.py +1 -1
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/analytics_changes.py +1 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/analytics_cli.py +2 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/base.py +14 -5
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/modelos.py +3 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/piezas.py +1 -1
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/resumen.py +4 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/youtube.py +103 -60
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/approval.py +11 -3
- socialcli-0.3.4/socialctl/native_schedule/attestations.py +94 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/cadence.py +9 -1
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/cli.py +250 -10
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/models.py +9 -0
- socialcli-0.3.4/socialctl/native_schedule/preflight.py +196 -0
- socialcli-0.3.4/socialctl/native_schedule/preparation.py +94 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/remote_data.py +15 -3
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/report.py +16 -6
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/store.py +5 -5
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/operation_output.py +15 -7
- socialcli-0.3.4/socialctl/public_availability.py +4 -0
- socialcli-0.3.4/socialctl/publication_approval.py +34 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/publication_steps.py +5 -1
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/publish_output.py +2 -1
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/publisher.py +8 -0
- socialcli-0.3.4/socialctl/qa/__init__.py +1 -0
- socialcli-0.3.4/socialctl/qa/backend.py +175 -0
- socialcli-0.3.4/socialctl/qa/cli.py +88 -0
- socialcli-0.3.4/socialctl/qa/guard.py +32 -0
- socialcli-0.3.4/socialctl/qa/models.py +42 -0
- socialcli-0.3.4/socialctl/qa/runner.py +204 -0
- socialcli-0.3.4/socialctl/qa/store.py +89 -0
- socialcli-0.3.4/socialctl/qa/transport.py +29 -0
- socialcli-0.3.4/socialctl/read_checkpoints.py +322 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/read_reports.py +3 -1
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/schedule_remote.py +67 -8
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/scheduler.py +67 -4
- socialcli-0.3.4/socialctl/ui/assets/agent-actions.json +22301 -0
- socialcli-0.3.4/socialctl/ui/assets/agent-journey.json +533 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/ui/assets/agent-manual.md +493 -306
- socialcli-0.3.4/socialctl/ui/assets/agents.md +37 -0
- socialcli-0.3.4/socialctl/ui/assets/cli-result.schema.json +27 -0
- socialcli-0.3.4/socialctl/workspace.py +21 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/youtube_data.py +46 -0
- socialcli-0.3.2/socialctl/agent_guide.py +0 -23
- socialcli-0.3.2/socialctl/inbox_cli.py +0 -46
- socialcli-0.3.2/socialctl/ui/assets/agents.md +0 -33
- socialcli-0.3.2/socialctl/workspace.py +0 -8
- {socialcli-0.3.2 → socialcli-0.3.4}/.gitignore +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/LICENSE-MIT-LEGACY +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/__init__.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/adapters/__init__.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/adapters/base.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/adapters/errores.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/adapters/facebook.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/adapters/instagram.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/adapters/tiktok.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/approval_cli.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/authflow.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/connections/__init__.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/connections/credential_cli.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/connections/credential_store.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/connections/file_store.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/connections/keychain.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/connections/meta_user.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/connections/rotation_cli.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/connections/saas_client.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/connections/temporary_media.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/engagement.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/engagement_cli.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/formatter.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/hosted_media.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/inventory_sources.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/__init__.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/community_schema.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/inbox_readers.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/meta_errors.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/meta_pagination.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/meta_schema.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/meta_webhooks.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/metadata_parts.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/owned_assets.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/owned_reorder.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/owned_schema.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/reply_context.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/management/youtube_metadata.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/media.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/media_cli.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/media_ingress.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/media_preflight.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/media_registry.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/media_requirements.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/__init__.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/almacen.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/analytics_client.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/analytics_ingest.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/analytics_schema.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/facebook.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/insights.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/instagram.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/reach.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/reporting_client.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/slugs.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/metricas/tiktok.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/migration_cli.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/migration_files.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/models.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/__init__.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/api_delivery.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/api_reconcile.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/dispatcher.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/facebook.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/facebook_reels.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/first_comment.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/handoff.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/instagram_delivery.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/instagram_runtime.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/inventory.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/migration.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/reconcile.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/verification.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/native_schedule/youtube.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/plantillas/accounts.yml +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/plantillas/brand.md +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/plantillas/estrategia.md +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/postfile.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/preflight.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/publication_policy.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/publication_status.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/queue_migration.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/read_budget.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/rutas.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/schedule_sqlite.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/scheduler_launchd.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/scheduler_systemd.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/source_links.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/ui/__init__.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/upload_consent.py +0 -0
- {socialcli-0.3.2 → socialcli-0.3.4}/socialctl/youtube_data_service.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
SocialCli Proprietary Software License
|
|
2
|
-
Version 1 — October 24, 2026
|
|
3
|
-
Copyright (c) 2026
|
|
4
|
-
|
|
2
|
+
Version 1.1 — October 24, 2026
|
|
3
|
+
Copyright (c) 2026 Florentino.pro. All rights reserved.
|
|
4
|
+
Florentino.pro is the copyright holder, licensor and operator of SocialCli.
|
|
5
5
|
|
|
6
6
|
1. Scope
|
|
7
7
|
This license applies to SocialCli releases beginning with version 0.3.2 and
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: socialcli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: SocialCli: publish and manage creator-owned social content from the terminal.
|
|
5
5
|
Project-URL: Homepage, https://socialcli.app
|
|
6
6
|
Project-URL: Documentation, https://socialcli.app/ai-agents.html
|
|
@@ -9,6 +9,7 @@ License-Expression: LicenseRef-SocialCli-Proprietary
|
|
|
9
9
|
License-File: LICENSE
|
|
10
10
|
License-File: LICENSE-MIT-LEGACY
|
|
11
11
|
Requires-Python: >=3.11
|
|
12
|
+
Requires-Dist: certifi>=2026.10.19
|
|
12
13
|
Requires-Dist: httpx>=0.28.1
|
|
13
14
|
Requires-Dist: keyring>=25.0
|
|
14
15
|
Requires-Dist: pydantic>=2.13.5
|
|
@@ -22,12 +23,12 @@ Description-Content-Type: text/markdown
|
|
|
22
23
|
|
|
23
24
|
# SocialCli
|
|
24
25
|
|
|
25
|
-
**Current stable version: 0.3.
|
|
26
|
+
**Current stable version: 0.3.3 (published on PyPI).** SocialCli SaaS is the current SocialCli
|
|
26
27
|
product. The repository root on `main` is its single development workspace;
|
|
27
28
|
the CLI, hosted connection service and account/billing components live together
|
|
28
29
|
here. Earlier versions remain in Git history for reference and migration.
|
|
29
30
|
|
|
30
|
-
**A social media CLI for AI agents and the people who supervise them.** Use a terminal-enabled assistant to inspect your accounts, draft posts and prepare user-approved actions on YouTube
|
|
31
|
+
**A social media CLI for AI agents and the people who supervise them.** Use a terminal-enabled assistant to inspect your accounts, draft posts and prepare user-approved actions on YouTube. Facebook, Instagram and TikTok are pending approval and unavailable to public customers. SocialCli provides concrete commands, validation, previews and local records for creators and teams.
|
|
31
32
|
|
|
32
33
|
[Website and documentation](https://socialcli.app/) · [AI agent guide](docs/ai-agents.md) · [Setup](SETUP.md) · [Security](SECURITY.md) · [TikTok limitations](docs/tiktok-review.md)
|
|
33
34
|
|
|
@@ -35,9 +36,9 @@ here. Earlier versions remain in Git history for reference and migration.
|
|
|
35
36
|
|
|
36
37
|
Install SocialCli where your agent can run shell commands, point it at your creator workspace and name the brand explicitly. Try:
|
|
37
38
|
|
|
38
|
-
> Check MyBrand's
|
|
39
|
+
> Check MyBrand's YouTube connection and available capabilities. Summarize missing permissions without publishing.
|
|
39
40
|
|
|
40
|
-
> Use MyBrand/media/my-video.mp4, draft a caption in our brand voice and show the complete
|
|
41
|
+
> Use MyBrand/media/my-video.mp4, draft a caption in our brand voice and show the complete YouTube dry-run preview. Wait for my approval before sending it.
|
|
41
42
|
|
|
42
43
|
> Inspect my YouTube video and propose a description change. Show the proposal and fingerprint before applying anything.
|
|
43
44
|
|
|
@@ -51,14 +52,17 @@ Copy this line into your terminal-enabled AI assistant:
|
|
|
51
52
|
|
|
52
53
|
The installation guide verifies the selected release download and uses
|
|
53
54
|
https://pilot.socialcli.app for email sign-in, assistant approval and account
|
|
54
|
-
connections.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
The
|
|
55
|
+
connections. Only YouTube is publicly available. Meta and TikTok access is limited
|
|
56
|
+
to authorized internal review; implemented commands do not imply public approval.
|
|
57
|
+
Published pricing is USD 10/month after a 14-day trial. Billing environment and
|
|
58
|
+
provider approvals are operational states, verified separately from the client.
|
|
59
|
+
|
|
60
|
+
Source candidate **0.3.4 is not yet published**. See
|
|
61
|
+
[observed release/runtime versions](deploy/saas/current-versions.json).
|
|
62
|
+
The hosted runtime is being rebuilt from exact committed sources; its older
|
|
63
|
+
package metadata does not describe the published client.
|
|
64
|
+
|
|
65
|
+
The current stable client is **0.3.3**, published on TestPyPI and PyPI after
|
|
62
66
|
reviewed CI, matching artifact hashes and clean-install verification.
|
|
63
67
|
The hosted service is managed and verified separately from the CLI release. The client's wheel and
|
|
64
68
|
source archive are verified against the
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
# SocialCli
|
|
4
4
|
|
|
5
|
-
**Current stable version: 0.3.
|
|
5
|
+
**Current stable version: 0.3.3 (published on PyPI).** SocialCli SaaS is the current SocialCli
|
|
6
6
|
product. The repository root on `main` is its single development workspace;
|
|
7
7
|
the CLI, hosted connection service and account/billing components live together
|
|
8
8
|
here. Earlier versions remain in Git history for reference and migration.
|
|
9
9
|
|
|
10
|
-
**A social media CLI for AI agents and the people who supervise them.** Use a terminal-enabled assistant to inspect your accounts, draft posts and prepare user-approved actions on YouTube
|
|
10
|
+
**A social media CLI for AI agents and the people who supervise them.** Use a terminal-enabled assistant to inspect your accounts, draft posts and prepare user-approved actions on YouTube. Facebook, Instagram and TikTok are pending approval and unavailable to public customers. SocialCli provides concrete commands, validation, previews and local records for creators and teams.
|
|
11
11
|
|
|
12
12
|
[Website and documentation](https://socialcli.app/) · [AI agent guide](docs/ai-agents.md) · [Setup](SETUP.md) · [Security](SECURITY.md) · [TikTok limitations](docs/tiktok-review.md)
|
|
13
13
|
|
|
@@ -15,9 +15,9 @@ here. Earlier versions remain in Git history for reference and migration.
|
|
|
15
15
|
|
|
16
16
|
Install SocialCli where your agent can run shell commands, point it at your creator workspace and name the brand explicitly. Try:
|
|
17
17
|
|
|
18
|
-
> Check MyBrand's
|
|
18
|
+
> Check MyBrand's YouTube connection and available capabilities. Summarize missing permissions without publishing.
|
|
19
19
|
|
|
20
|
-
> Use MyBrand/media/my-video.mp4, draft a caption in our brand voice and show the complete
|
|
20
|
+
> Use MyBrand/media/my-video.mp4, draft a caption in our brand voice and show the complete YouTube dry-run preview. Wait for my approval before sending it.
|
|
21
21
|
|
|
22
22
|
> Inspect my YouTube video and propose a description change. Show the proposal and fingerprint before applying anything.
|
|
23
23
|
|
|
@@ -31,14 +31,17 @@ Copy this line into your terminal-enabled AI assistant:
|
|
|
31
31
|
|
|
32
32
|
The installation guide verifies the selected release download and uses
|
|
33
33
|
https://pilot.socialcli.app for email sign-in, assistant approval and account
|
|
34
|
-
connections.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
The
|
|
34
|
+
connections. Only YouTube is publicly available. Meta and TikTok access is limited
|
|
35
|
+
to authorized internal review; implemented commands do not imply public approval.
|
|
36
|
+
Published pricing is USD 10/month after a 14-day trial. Billing environment and
|
|
37
|
+
provider approvals are operational states, verified separately from the client.
|
|
38
|
+
|
|
39
|
+
Source candidate **0.3.4 is not yet published**. See
|
|
40
|
+
[observed release/runtime versions](deploy/saas/current-versions.json).
|
|
41
|
+
The hosted runtime is being rebuilt from exact committed sources; its older
|
|
42
|
+
package metadata does not describe the published client.
|
|
43
|
+
|
|
44
|
+
The current stable client is **0.3.3**, published on TestPyPI and PyPI after
|
|
42
45
|
reviewed CI, matching artifact hashes and clean-install verification.
|
|
43
46
|
The hosted service is managed and verified separately from the CLI release. The client's wheel and
|
|
44
47
|
source archive are verified against the
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "socialcli"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.4"
|
|
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"
|
|
7
7
|
license-files = ["LICENSE", "LICENSE-MIT-LEGACY"]
|
|
8
8
|
requires-python = ">=3.11"
|
|
9
9
|
dependencies = [
|
|
10
|
+
"certifi>=2026.10.19",
|
|
10
11
|
"httpx>=0.28.1",
|
|
11
12
|
"keyring>=25.0",
|
|
12
13
|
"pydantic>=2.13.5",
|
|
@@ -15,8 +16,8 @@ dependencies = [
|
|
|
15
16
|
]
|
|
16
17
|
|
|
17
18
|
[project.scripts]
|
|
18
|
-
socialcli = "socialctl.
|
|
19
|
-
socialctl = "socialctl.
|
|
19
|
+
socialcli = "socialctl.entrypoint:main"
|
|
20
|
+
socialctl = "socialctl.entrypoint:main"
|
|
20
21
|
|
|
21
22
|
[project.urls]
|
|
22
23
|
Homepage = "https://socialcli.app"
|
|
@@ -27,12 +28,17 @@ Terms = "https://socialcli.app/terms.html"
|
|
|
27
28
|
headless-credentials = ["cryptography>=43"]
|
|
28
29
|
|
|
29
30
|
[dependency-groups]
|
|
31
|
+
server = ["cryptography>=43", "fastapi>=0.115", "uvicorn>=0.30", "opentelemetry-api>=1.45.1"]
|
|
30
32
|
dev = [
|
|
31
33
|
"cryptography>=43",
|
|
32
34
|
"fastapi>=0.115",
|
|
33
35
|
"pytest>=9.1.1",
|
|
36
|
+
"jsonschema>=4.26.0",
|
|
34
37
|
"respx>=0.23.1",
|
|
35
38
|
]
|
|
39
|
+
browser-tests = [
|
|
40
|
+
"playwright>=1.56,<2",
|
|
41
|
+
]
|
|
36
42
|
|
|
37
43
|
[build-system]
|
|
38
44
|
requires = ["hatchling>=1.27"]
|
|
@@ -44,17 +50,25 @@ build-backend = "hatchling.build"
|
|
|
44
50
|
only-include = [
|
|
45
51
|
"socialctl/__init__.py",
|
|
46
52
|
"socialctl/__main__.py",
|
|
53
|
+
"socialctl/adapters",
|
|
47
54
|
"socialctl/agent_errors.py",
|
|
48
55
|
"socialctl/agent_guide.py",
|
|
56
|
+
"socialctl/agent_journey.py",
|
|
49
57
|
"socialctl/approval_cli.py",
|
|
50
58
|
"socialctl/auth.py",
|
|
51
59
|
"socialctl/authflow.py",
|
|
52
60
|
"socialctl/brands.py",
|
|
53
61
|
"socialctl/capabilities.py",
|
|
62
|
+
"socialctl/capabilities.yml",
|
|
54
63
|
"socialctl/cli.py",
|
|
64
|
+
"socialctl/cli_result.py",
|
|
65
|
+
"socialctl/connections",
|
|
66
|
+
"socialctl/context.py",
|
|
67
|
+
"socialctl/context_cli.py",
|
|
55
68
|
"socialctl/delivery_options.py",
|
|
56
69
|
"socialctl/engagement.py",
|
|
57
70
|
"socialctl/engagement_cli.py",
|
|
71
|
+
"socialctl/entrypoint.py",
|
|
58
72
|
"socialctl/executor.py",
|
|
59
73
|
"socialctl/formatter.py",
|
|
60
74
|
"socialctl/hosted_media.py",
|
|
@@ -64,25 +78,33 @@ only-include = [
|
|
|
64
78
|
"socialctl/inventory.py",
|
|
65
79
|
"socialctl/inventory_cli.py",
|
|
66
80
|
"socialctl/inventory_sources.py",
|
|
81
|
+
"socialctl/management",
|
|
67
82
|
"socialctl/media.py",
|
|
68
83
|
"socialctl/media_cli.py",
|
|
69
84
|
"socialctl/media_ingress.py",
|
|
70
85
|
"socialctl/media_preflight.py",
|
|
71
86
|
"socialctl/media_registry.py",
|
|
72
87
|
"socialctl/media_requirements.py",
|
|
88
|
+
"socialctl/metricas",
|
|
73
89
|
"socialctl/migration_cli.py",
|
|
74
90
|
"socialctl/migration_files.py",
|
|
75
91
|
"socialctl/models.py",
|
|
92
|
+
"socialctl/native_schedule",
|
|
76
93
|
"socialctl/operation_output.py",
|
|
94
|
+
"socialctl/plantillas",
|
|
77
95
|
"socialctl/postfile.py",
|
|
78
96
|
"socialctl/preflight.py",
|
|
97
|
+
"socialctl/public_availability.py",
|
|
98
|
+
"socialctl/publication_approval.py",
|
|
79
99
|
"socialctl/publication_policy.py",
|
|
80
100
|
"socialctl/publication_status.py",
|
|
81
101
|
"socialctl/publication_steps.py",
|
|
82
102
|
"socialctl/publish_output.py",
|
|
83
103
|
"socialctl/publisher.py",
|
|
104
|
+
"socialctl/qa",
|
|
84
105
|
"socialctl/queue_migration.py",
|
|
85
106
|
"socialctl/read_budget.py",
|
|
107
|
+
"socialctl/read_checkpoints.py",
|
|
86
108
|
"socialctl/read_reports.py",
|
|
87
109
|
"socialctl/rutas.py",
|
|
88
110
|
"socialctl/schedule_remote.py",
|
|
@@ -91,20 +113,16 @@ only-include = [
|
|
|
91
113
|
"socialctl/scheduler_launchd.py",
|
|
92
114
|
"socialctl/scheduler_systemd.py",
|
|
93
115
|
"socialctl/source_links.py",
|
|
116
|
+
"socialctl/ui/__init__.py",
|
|
117
|
+
"socialctl/ui/assets/agent-actions.json",
|
|
118
|
+
"socialctl/ui/assets/agent-manual.md",
|
|
119
|
+
"socialctl/ui/assets/agent-journey.json",
|
|
120
|
+
"socialctl/ui/assets/agents.md",
|
|
121
|
+
"socialctl/ui/assets/cli-result.schema.json",
|
|
94
122
|
"socialctl/upload_consent.py",
|
|
95
123
|
"socialctl/workspace.py",
|
|
96
124
|
"socialctl/youtube_data.py",
|
|
97
|
-
"socialctl/youtube_data_service.py"
|
|
98
|
-
"socialctl/adapters",
|
|
99
|
-
"socialctl/connections",
|
|
100
|
-
"socialctl/management",
|
|
101
|
-
"socialctl/metricas",
|
|
102
|
-
"socialctl/native_schedule",
|
|
103
|
-
"socialctl/plantillas",
|
|
104
|
-
"socialctl/capabilities.yml",
|
|
105
|
-
"socialctl/ui/__init__.py",
|
|
106
|
-
"socialctl/ui/assets/agents.md",
|
|
107
|
-
"socialctl/ui/assets/agent-manual.md"
|
|
125
|
+
"socialctl/youtube_data_service.py"
|
|
108
126
|
]
|
|
109
127
|
exclude = ["**/.env", "**/.env.*", "**/*.env", "**/.secrets/**", "**/__pycache__/**", "**/*.pyc", "**/*.key", "**/*.pem", "**/*.sqlite3*"]
|
|
110
128
|
|
|
@@ -115,17 +133,25 @@ dev-mode-dirs = ["."]
|
|
|
115
133
|
only-include = [
|
|
116
134
|
"socialctl/__init__.py",
|
|
117
135
|
"socialctl/__main__.py",
|
|
136
|
+
"socialctl/adapters",
|
|
118
137
|
"socialctl/agent_errors.py",
|
|
119
138
|
"socialctl/agent_guide.py",
|
|
139
|
+
"socialctl/agent_journey.py",
|
|
120
140
|
"socialctl/approval_cli.py",
|
|
121
141
|
"socialctl/auth.py",
|
|
122
142
|
"socialctl/authflow.py",
|
|
123
143
|
"socialctl/brands.py",
|
|
124
144
|
"socialctl/capabilities.py",
|
|
145
|
+
"socialctl/capabilities.yml",
|
|
125
146
|
"socialctl/cli.py",
|
|
147
|
+
"socialctl/cli_result.py",
|
|
148
|
+
"socialctl/connections",
|
|
149
|
+
"socialctl/context.py",
|
|
150
|
+
"socialctl/context_cli.py",
|
|
126
151
|
"socialctl/delivery_options.py",
|
|
127
152
|
"socialctl/engagement.py",
|
|
128
153
|
"socialctl/engagement_cli.py",
|
|
154
|
+
"socialctl/entrypoint.py",
|
|
129
155
|
"socialctl/executor.py",
|
|
130
156
|
"socialctl/formatter.py",
|
|
131
157
|
"socialctl/hosted_media.py",
|
|
@@ -135,25 +161,33 @@ only-include = [
|
|
|
135
161
|
"socialctl/inventory.py",
|
|
136
162
|
"socialctl/inventory_cli.py",
|
|
137
163
|
"socialctl/inventory_sources.py",
|
|
164
|
+
"socialctl/management",
|
|
138
165
|
"socialctl/media.py",
|
|
139
166
|
"socialctl/media_cli.py",
|
|
140
167
|
"socialctl/media_ingress.py",
|
|
141
168
|
"socialctl/media_preflight.py",
|
|
142
169
|
"socialctl/media_registry.py",
|
|
143
170
|
"socialctl/media_requirements.py",
|
|
171
|
+
"socialctl/metricas",
|
|
144
172
|
"socialctl/migration_cli.py",
|
|
145
173
|
"socialctl/migration_files.py",
|
|
146
174
|
"socialctl/models.py",
|
|
175
|
+
"socialctl/native_schedule",
|
|
147
176
|
"socialctl/operation_output.py",
|
|
177
|
+
"socialctl/plantillas",
|
|
148
178
|
"socialctl/postfile.py",
|
|
149
179
|
"socialctl/preflight.py",
|
|
180
|
+
"socialctl/public_availability.py",
|
|
181
|
+
"socialctl/publication_approval.py",
|
|
150
182
|
"socialctl/publication_policy.py",
|
|
151
183
|
"socialctl/publication_status.py",
|
|
152
184
|
"socialctl/publication_steps.py",
|
|
153
185
|
"socialctl/publish_output.py",
|
|
154
186
|
"socialctl/publisher.py",
|
|
187
|
+
"socialctl/qa",
|
|
155
188
|
"socialctl/queue_migration.py",
|
|
156
189
|
"socialctl/read_budget.py",
|
|
190
|
+
"socialctl/read_checkpoints.py",
|
|
157
191
|
"socialctl/read_reports.py",
|
|
158
192
|
"socialctl/rutas.py",
|
|
159
193
|
"socialctl/schedule_remote.py",
|
|
@@ -162,20 +196,16 @@ only-include = [
|
|
|
162
196
|
"socialctl/scheduler_launchd.py",
|
|
163
197
|
"socialctl/scheduler_systemd.py",
|
|
164
198
|
"socialctl/source_links.py",
|
|
199
|
+
"socialctl/ui/__init__.py",
|
|
200
|
+
"socialctl/ui/assets/agent-actions.json",
|
|
201
|
+
"socialctl/ui/assets/agent-manual.md",
|
|
202
|
+
"socialctl/ui/assets/agent-journey.json",
|
|
203
|
+
"socialctl/ui/assets/agents.md",
|
|
204
|
+
"socialctl/ui/assets/cli-result.schema.json",
|
|
165
205
|
"socialctl/upload_consent.py",
|
|
166
206
|
"socialctl/workspace.py",
|
|
167
207
|
"socialctl/youtube_data.py",
|
|
168
208
|
"socialctl/youtube_data_service.py",
|
|
169
|
-
"socialctl/adapters",
|
|
170
|
-
"socialctl/connections",
|
|
171
|
-
"socialctl/management",
|
|
172
|
-
"socialctl/metricas",
|
|
173
|
-
"socialctl/native_schedule",
|
|
174
|
-
"socialctl/plantillas",
|
|
175
|
-
"socialctl/capabilities.yml",
|
|
176
|
-
"socialctl/ui/__init__.py",
|
|
177
|
-
"socialctl/ui/assets/agents.md",
|
|
178
|
-
"socialctl/ui/assets/agent-manual.md",
|
|
179
209
|
"pyproject.toml",
|
|
180
210
|
"README.md",
|
|
181
211
|
"LICENSE",
|
|
@@ -40,6 +40,9 @@ class YouTubeAdapter(Adapter):
|
|
|
40
40
|
|
|
41
41
|
platform = Platform.YOUTUBE
|
|
42
42
|
|
|
43
|
+
def __init__(self, *, on_created=None):
|
|
44
|
+
self.on_created = on_created
|
|
45
|
+
|
|
43
46
|
def publish(self, post: PlatformPost, brand: Brand, client: httpx.Client) -> PostResult:
|
|
44
47
|
'Publish a validated post; convert every failure to an error PostResult.'
|
|
45
48
|
spec = PLATFORM_SPECS[self.platform]
|
|
@@ -216,6 +219,8 @@ class YouTubeAdapter(Adapter):
|
|
|
216
219
|
if not isinstance(video_id, str) or not video_id:
|
|
217
220
|
return self._error('YouTube returned an invalid video ID after the upload')
|
|
218
221
|
|
|
222
|
+
if self.on_created is not None:
|
|
223
|
+
self.on_created(video_id) # Durable caller receipt before optional readback.
|
|
219
224
|
result = PostResult(
|
|
220
225
|
platform=self.platform,
|
|
221
226
|
status=PostStatus.PUBLICADO,
|
|
@@ -32,6 +32,15 @@ _ACTIONS = {
|
|
|
32
32
|
# Only fixed internal codes acquire action semantics. Provider text is diagnostic,
|
|
33
33
|
# never a command, an expiry signal or evidence that a write was not accepted.
|
|
34
34
|
_CATALOG = {
|
|
35
|
+
'executor_stale': ('inspect', 'The configured executor health report is stale. Inspect the executor; this does not establish an account connection failure.'),
|
|
36
|
+
'resume_invalid': ('correct_input', 'Use the opaque local reference returned by this read; preserve invalid state for inspection.'),
|
|
37
|
+
'resume_expired': ('adjust_read', 'This local read reference expired or was purged; begin a new bounded read.'),
|
|
38
|
+
'resume_busy': ('retry_later', 'Another process owns this read reference; wait for it to finish.'),
|
|
39
|
+
'resume_binding_mismatch': ('correct_input', 'Select the recorded operation, brand, root, service and account before resuming.'),
|
|
40
|
+
'resume_query_mismatch': ('correct_input', 'Resume with the recorded query; omit query flags or begin a new read.'),
|
|
41
|
+
'resume_unavailable': ('inspect', 'This read is already complete or has no supported continuation.'),
|
|
42
|
+
'resume_restart_required': ('adjust_read', 'The reported provider scope requires a new read; retained observations are not a current provider snapshot.'),
|
|
43
|
+
'resume_unsupported': ('unsupported', 'This endpoint is outside the supported durable read boundary; no write or renewal was sent.'),
|
|
35
44
|
'reply_history_purged': ('user_action', 'Prior reply evidence was removed by retention. Review the preserved journal and platform before any new draft. Do not delete replay-blocking markers or repeat an uncertain write.'),
|
|
36
45
|
'dry_run_required': ('correct_input', 'inbox-draft requires --dry-run to prepare a preview. No provider content write was started.'),
|
|
37
46
|
'reply_input_invalid': ('correct_input', 'Use a version 1 reply file with a nonempty replies list (1–100 items). Each reply requires platform, account_id, comment_id and text. media_id is read from the inbox, not supplied in this file.'),
|
|
@@ -61,6 +70,10 @@ _CATALOG = {
|
|
|
61
70
|
'rate_limited': ('retry_later', 'Wait for the provider rate limit before a bounded read retry.'),
|
|
62
71
|
'authorization_unavailable': ('user_action', 'Review the account authorization; this failure alone does not prove token expiry.'),
|
|
63
72
|
'permissions_required': ('user_action', 'Review granted permissions and account eligibility with the owner.'),
|
|
73
|
+
'private_video_comments_disabled': ('inspect', 'YouTube disables comments on private videos. No settings were changed. Choose an eligible video; do not change privacy without owner approval.'),
|
|
74
|
+
'pilot_evidence_required': ('correct_input', 'Native scheduling is implemented but matching operator evidence is missing. Check existing brand records and use preflight --eligibility FILE. Only if no reusable evidence exists, run native-schedule pilot-template and complete its checklist. Do not fabricate evidence.'),
|
|
75
|
+
'pilot_evidence_invalid': ('correct_input', 'The pilot eligibility file must match this account and reference an actual nonempty evidence file inside the brand workspace.'),
|
|
76
|
+
'pilot_checklist_incomplete': ('user_action', 'The pilot checklist is incomplete. The owner must verify actual project and Studio evidence before its flags can be true.'),
|
|
64
77
|
'comments_disabled': ('inspect', 'Comments are disabled on this video. Reconnecting does not enable them; do not change video settings without owner approval.'),
|
|
65
78
|
'target_unavailable': ('correct_input', 'Verify the requested target and account before another read.'),
|
|
66
79
|
'request_rejected': ('correct_input', 'Review supported arguments and target before another request.'),
|
|
@@ -74,6 +87,8 @@ _CATALOG = {
|
|
|
74
87
|
'persistence_failed': ('repair_storage', 'Preserve verified observations and repair local persistence before collecting again.'),
|
|
75
88
|
'unsupported_operation': ('unsupported', 'This integration does not support the requested operation.'),
|
|
76
89
|
'account_not_configured': ('user_action', 'Ask the owner to select and authorize the intended account; never infer one.'),
|
|
90
|
+
'workspace_unavailable': ('inspect_workspace', 'Cannot read the selected workspace. Check --root or SOCIALCLI_ROOT and local file permissions.'),
|
|
91
|
+
'brand_not_found': ('correct_input', 'The named brand is not in the selected workspace. Check --brand and --root or SOCIALCLI_ROOT; do not select another brand automatically.'),
|
|
77
92
|
'invalid_input': ('correct_input', 'Review the supported arguments and explicit workspace.'),
|
|
78
93
|
'installation_access_required': ('sign_in', 'Ask the owner to sign in to SocialCli again.'),
|
|
79
94
|
'invalid_report_options': ('correct_input', 'Review the report date, window, item limit and platform.'),
|
|
@@ -102,6 +117,7 @@ def error_for_code(code: str, *, read_only: bool = True) -> dict:
|
|
|
102
117
|
|
|
103
118
|
def error_document(exc: BaseException, *, read_only: bool) -> dict:
|
|
104
119
|
import httpx
|
|
120
|
+
from socialctl.brands import WorkspaceUnavailable, BrandNoEncontrada, AccountsInvalido, NombreDeMarcaInvalido
|
|
105
121
|
from socialctl.read_budget import LocalConfigurationError
|
|
106
122
|
from socialctl.auth import AuthError
|
|
107
123
|
from socialctl.read_budget import ReadDeadlineExceeded, ReadResponseTooLarge
|
|
@@ -110,9 +126,10 @@ def error_document(exc: BaseException, *, read_only: bool) -> dict:
|
|
|
110
126
|
from socialctl.management.youtube import YouTubeManagementError, YouTubeUpdateUncertain
|
|
111
127
|
from socialctl.management.meta_comments import CommentError, CommentUncertain
|
|
112
128
|
from socialctl.management.meta_schema import MetaError, MetaUncertain
|
|
113
|
-
from socialctl.metricas.base import SinPermiso
|
|
129
|
+
from socialctl.metricas.base import SinPermiso, MetricsProviderError
|
|
114
130
|
from socialctl.youtube_data import YouTubeDataBusy, YouTubeDataCleanupError
|
|
115
131
|
from socialctl.identity import ReadError
|
|
132
|
+
from socialctl.read_checkpoints import CheckpointError
|
|
116
133
|
|
|
117
134
|
# A read flow may refresh a token via POST. A lost response to that operation
|
|
118
135
|
# cannot be classified as a harmless GET retry merely from the CLI command.
|
|
@@ -129,8 +146,13 @@ def error_document(exc: BaseException, *, read_only: bool) -> dict:
|
|
|
129
146
|
429:'rate_limited',503:'provider_unavailable'}.get(exc.status,'service_rejected')
|
|
130
147
|
elif isinstance(exc, (ResourceUncertain, YouTubeUpdateUncertain, CommentUncertain, MetaUncertain)):
|
|
131
148
|
code = 'operation_uncertain'
|
|
132
|
-
elif isinstance(exc, (AuthError, YouTubeManagementError, ChangeError, ResourceError, CommentError, MetaError, ReadError)) and getattr(exc, '_socialcli_error_code', None) is not None:
|
|
149
|
+
elif isinstance(exc, (AuthError, YouTubeManagementError, ChangeError, ResourceError, CommentError, MetaError, ReadError, MetricsProviderError, CheckpointError)) and getattr(exc, '_socialcli_error_code', None) is not None:
|
|
133
150
|
code = exc._socialcli_error_code
|
|
151
|
+
elif isinstance(exc, YouTubeDataBusy): code = 'local_data_busy'
|
|
152
|
+
elif isinstance(exc, YouTubeDataCleanupError): code = 'storage_failure'
|
|
153
|
+
elif isinstance(exc, WorkspaceUnavailable): code = 'workspace_unavailable'
|
|
154
|
+
elif isinstance(exc, BrandNoEncontrada): code = 'brand_not_found'
|
|
155
|
+
elif isinstance(exc, (AccountsInvalido, NombreDeMarcaInvalido)): code = 'invalid_input'
|
|
134
156
|
elif isinstance(exc, ReadDeadlineExceeded): code = 'read_deadline'
|
|
135
157
|
elif isinstance(exc, ReadResponseTooLarge): code = 'response_too_large'
|
|
136
158
|
elif isinstance(exc, KeyboardInterrupt): code = 'read_interrupted'
|
|
@@ -157,16 +179,19 @@ def error_document(exc: BaseException, *, read_only: bool) -> dict:
|
|
|
157
179
|
'configuration_missing': 'account_not_configured'}.get(exc.code, 'target_validation_failed')
|
|
158
180
|
elif isinstance(exc, ResourceError): code = 'target_validation_failed'
|
|
159
181
|
elif isinstance(exc, ChangeError): code = 'operation_rejected'
|
|
160
|
-
elif isinstance(exc,
|
|
161
|
-
elif isinstance(exc, (OSError, YouTubeDataCleanupError)): code = 'storage_failure'
|
|
182
|
+
elif isinstance(exc, OSError): code = 'storage_failure'
|
|
162
183
|
elif isinstance(exc, ValueError): code = 'invalid_local_state'
|
|
163
184
|
else: code = 'operation_failed'
|
|
164
185
|
result = error_for_code(code,read_only=read_only)
|
|
186
|
+
if isinstance(exc, ResourceError):
|
|
187
|
+
verification = verification_diagnostics(getattr(exc, '_socialcli_verification', None))
|
|
188
|
+
if verification:
|
|
189
|
+
result['diagnostics'] = verification
|
|
165
190
|
# Local validation is not evidence of a rejection by the hosted service.
|
|
166
191
|
if code == 'operation_rejected' and not isinstance(exc, ServiceRejected):
|
|
167
192
|
result['message'] = _CATALOG[code][1]
|
|
168
193
|
diagnostic = safe_diagnostic(getattr(exc, '_socialcli_diagnostic', None))
|
|
169
|
-
if isinstance(exc, ChangeError) and not diagnostic:
|
|
194
|
+
if isinstance(exc, (ChangeError, CheckpointError)) and not diagnostic:
|
|
170
195
|
diagnostic = {'source': 'local'}
|
|
171
196
|
if isinstance(exc, ServiceRejected):
|
|
172
197
|
diagnostic.update(source='socialcli', http_status=exc.status)
|
|
@@ -183,13 +208,13 @@ def safe_diagnostic(value):
|
|
|
183
208
|
return {}
|
|
184
209
|
allowed = {
|
|
185
210
|
'source': {'local', 'socialcli', 'youtube'},
|
|
186
|
-
'stage': {'input_validation', 'workspace_read', 'file_read', 'credential_read', 'identity_read', 'provider_read', 'provider_write', 'target_read', 'reply_coverage', 'proposal_preparation', 'baseline_check', 'readback'},
|
|
211
|
+
'stage': {'input_validation', 'workspace_read', 'file_read', 'credential_read', 'identity_read', 'provider_read', 'provider_write', 'target_read', 'reply_coverage', 'proposal_preparation', 'baseline_check', 'readback', 'executor'},
|
|
187
212
|
'request_method': {'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE'},
|
|
188
|
-
'operation': {'channels', 'videos', 'comments', 'commentThreads', 'playlistItems'},
|
|
213
|
+
'operation': {'channels', 'videos', 'comments', 'commentThreads', 'playlistItems', 'reports'},
|
|
189
214
|
'write_state': {'not_started', 'unknown', 'accepted'},
|
|
190
215
|
'content_write_state': {'not_started'},
|
|
191
216
|
'reason': {'thread_unverifiable', 'thread_identity_mismatch', 'thread_total_unverifiable', 'comment_binding_mismatch', 'parent_mismatch', 'replies_not_allowed', 'incomplete_reply_list', 'readback_mismatch'},
|
|
192
|
-
'provider_reason': {'commentsDisabled', 'quotaExceeded', 'dailyLimitExceeded', 'rateLimitExceeded', 'userRateLimitExceeded', 'insufficientPermissions', 'forbidden', 'authError', 'invalidValue', 'videoNotFound', 'commentNotFound', 'commentThreadNotFound', 'processingFailure', 'operationNotSupported'},
|
|
217
|
+
'provider_reason': {'playlistNotFound', 'playlistItemNotFound', 'playlistItemsNotAccessible', 'commentsDisabled', 'quotaExceeded', 'dailyLimitExceeded', 'rateLimitExceeded', 'userRateLimitExceeded', 'insufficientPermissions', 'forbidden', 'authError', 'invalidValue', 'videoNotFound', 'commentNotFound', 'commentThreadNotFound', 'processingFailure', 'operationNotSupported', 'accessNotConfigured', 'serviceDisabled', 'backendError'},
|
|
193
218
|
}
|
|
194
219
|
clean = {key: val for key, val in value.items()
|
|
195
220
|
if key in allowed and isinstance(val, str) and val in allowed[key]}
|
|
@@ -217,7 +242,7 @@ def with_http_error_code(wrapper: Exception, response, *, read_only: bool) -> Ex
|
|
|
217
242
|
cause = httpx.HTTPStatusError('Provider request rejected', request=response.request,
|
|
218
243
|
response=response)
|
|
219
244
|
wrapper = with_error_code(wrapper, cause, read_only=read_only)
|
|
220
|
-
if response.request.url.host
|
|
245
|
+
if response.request.url.host in {'www.googleapis.com','youtubeanalytics.googleapis.com','youtubereporting.googleapis.com'}:
|
|
221
246
|
diagnostic = {'source': 'youtube', 'http_status': response.status_code,
|
|
222
247
|
'request_method': response.request.method,
|
|
223
248
|
'stage': 'provider_read' if read_only else 'provider_write',
|
|
@@ -231,6 +256,8 @@ def with_http_error_code(wrapper: Exception, response, *, read_only: bool) -> Ex
|
|
|
231
256
|
diagnostic.update(reason)
|
|
232
257
|
if reason['provider_reason'] in {'quotaExceeded', 'dailyLimitExceeded', 'rateLimitExceeded', 'userRateLimitExceeded'}:
|
|
233
258
|
wrapper._socialcli_error_code = 'rate_limited' if read_only else 'operation_uncertain'
|
|
259
|
+
elif reason['provider_reason'] in {'accessNotConfigured','serviceDisabled'} and read_only:
|
|
260
|
+
wrapper._socialcli_error_code = 'provider_configuration'
|
|
234
261
|
elif reason['provider_reason'] == 'commentsDisabled' and read_only:
|
|
235
262
|
wrapper._socialcli_error_code = 'comments_disabled'
|
|
236
263
|
break
|
|
@@ -245,3 +272,60 @@ def emit_error(exc: Exception, *, read_only: bool) -> None:
|
|
|
245
272
|
import typer
|
|
246
273
|
typer.echo(json.dumps({'version': 1, 'status': 'error',
|
|
247
274
|
'error': error_document(exc, read_only=read_only)}))
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
def verification_diagnostics(payload):
|
|
278
|
+
"""Project typed verification facts, never infer success from a missing row."""
|
|
279
|
+
if not isinstance(payload, dict):
|
|
280
|
+
return {}
|
|
281
|
+
result = {}
|
|
282
|
+
if any(k in payload for k in ('declared_total','ids_read','pagination_exhausted')):
|
|
283
|
+
result['pagination'] = {k: (payload.get(k) if type(payload.get(k)) is int and payload[k]>=0 else None)
|
|
284
|
+
for k in ('declared_total','ids_read','pages')}
|
|
285
|
+
value=payload.get('pagination_exhausted')
|
|
286
|
+
result['pagination']['pagination_exhausted']=value if type(value) is bool else None
|
|
287
|
+
journal=payload.get('journal', [])
|
|
288
|
+
if not isinstance(journal,list):
|
|
289
|
+
return result
|
|
290
|
+
events=[e for e in journal if isinstance(e,dict)]
|
|
291
|
+
before=payload.get('before') or {}
|
|
292
|
+
if isinstance(before,dict) and 'thumbnails' in before:
|
|
293
|
+
from urllib.parse import urlsplit,urlunsplit,parse_qsl,urlencode
|
|
294
|
+
def urls(thumbnails):
|
|
295
|
+
if not isinstance(thumbnails,dict): return None
|
|
296
|
+
values={}
|
|
297
|
+
for size,row in thumbnails.items():
|
|
298
|
+
if size not in {'default','medium','high','standard','maxres'} or not isinstance(row,dict): continue
|
|
299
|
+
raw=row.get('url')
|
|
300
|
+
if not isinstance(raw,str): continue
|
|
301
|
+
try:
|
|
302
|
+
parts=urlsplit(raw)
|
|
303
|
+
if parts.scheme!='https' or parts.username or parts.password or parts.port not in (None,443): continue
|
|
304
|
+
if not (parts.hostname=='ytimg.com' or (parts.hostname or '').endswith('.ytimg.com')): continue
|
|
305
|
+
values[size]=urlunsplit((parts.scheme,parts.netloc,parts.path,
|
|
306
|
+
urlencode([(k,v) for k,v in parse_qsl(parts.query) if k in {'sqp','rs'}]),''))
|
|
307
|
+
except ValueError: continue
|
|
308
|
+
return values
|
|
309
|
+
event=next((e for e in reversed(events) if e.get('event') in {'thumbnail_readback','readback_unavailable'}),{})
|
|
310
|
+
before_urls=urls(before['thumbnails'])
|
|
311
|
+
after_thumbnails=event.get('thumbnails') if event.get('event')=='thumbnail_readback' else None
|
|
312
|
+
after_urls=urls(after_thumbnails)
|
|
313
|
+
# Missing/invalid URL observations are unknown, not equal empty maps.
|
|
314
|
+
original_urls=lambda values:{k:v['url'] for k,v in values.items() if k in {'default','medium','high','standard','maxres'} and isinstance(v,dict) and isinstance(v.get('url'),str)}
|
|
315
|
+
identical=(original_urls(before['thumbnails'])==original_urls(after_thumbnails)) if before_urls and after_urls else None
|
|
316
|
+
result['thumbnail']={'before_urls':before_urls,'after_urls':after_urls,'identical':identical,
|
|
317
|
+
'visual_verified':False,'observed_at':event.get('at')}
|
|
318
|
+
deletion=next((e for e in reversed(events) if e.get('event')=='delete_readback' or
|
|
319
|
+
(e.get('event')=='readback_unavailable' and e.get('operation')=='delete')),None)
|
|
320
|
+
if deletion is not None:
|
|
321
|
+
observation=deletion.get('observation')
|
|
322
|
+
if observation not in {'found','absent','permission_denied','unavailable','unknown'}:
|
|
323
|
+
observation='absent' if deletion.get('absent_observed') is True else 'found' if deletion.get('absent_observed') is False else 'unknown'
|
|
324
|
+
safe=safe_diagnostic(deletion)
|
|
325
|
+
result['deletion']={'observation':observation, 'http_status':safe.get('http_status'),
|
|
326
|
+
'provider_reason':safe.get('provider_reason'),
|
|
327
|
+
'identity_verified':deletion.get('identity_verified') if type(deletion.get('identity_verified')) is bool else None,
|
|
328
|
+
'receipt_confirmed':deletion.get('receipt_confirmed') if type(deletion.get('receipt_confirmed')) is bool else None,
|
|
329
|
+
'verification_basis':deletion.get('verification_basis') if deletion.get('verification_basis') in {'receipt_and_exact_id_absence','insufficient_evidence'} else None,
|
|
330
|
+
'observed_at':deletion.get('at')}
|
|
331
|
+
return result
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""Topic selection keeps advanced contracts available without bloating bootstrap."""
|
|
2
|
+
from importlib.resources import files
|
|
3
|
+
import importlib.metadata
|
|
4
|
+
import re
|
|
5
|
+
import json
|
|
6
|
+
|
|
7
|
+
from socialctl.agent_journey import TOPICS as JOURNEY_TOPICS, document, replace_block
|
|
8
|
+
|
|
9
|
+
TOPICS = dict.fromkeys((*sorted(JOURNEY_TOPICS), 'actions'), ())
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def render_action_index():
|
|
13
|
+
payload = json.loads(files('socialctl.ui').joinpath('assets/agent-actions.json').read_text(encoding='utf-8'))
|
|
14
|
+
lines = [payload['meaning'], '',
|
|
15
|
+
'Minimum installed version: ' + payload['minimum_version'] + '. Installation does not prove registry publication. '
|
|
16
|
+
'Only YouTube is publicly available; other platforms are internal review only.', '',
|
|
17
|
+
'Read `socialcli agent-guide actions` for the complete JSON index, per-command JSON '
|
|
18
|
+
'schemas, supplied-file schemas, fictional examples, exact prerequisites, approval '
|
|
19
|
+
'and verification limits. IDs identify scoped handlers, not whole API methods.', '',
|
|
20
|
+
'| Scoped action ID | Preparation or read command | Public availability |',
|
|
21
|
+
'|---|---|---|']
|
|
22
|
+
for row in payload['actions']:
|
|
23
|
+
lines.append('| ' + row['id'] + ' | `' + row['command'].replace('|', '\\|') + '` | '
|
|
24
|
+
+ row['availability']['public'] + ' |')
|
|
25
|
+
lines.extend(['', 'Apply commands are separate in each JSON record under related_commands. '
|
|
26
|
+
'Never apply before exact preview approval. A schema or example supplies no permission.', '',
|
|
27
|
+
'Excluded catalogue records (no action command):'])
|
|
28
|
+
for classification in ('deferred', 'unsupported', 'not_implemented', 'disabled_pilot', 'excluded'):
|
|
29
|
+
ids = [row['id'] for row in payload['excluded'] if row['classification'] == classification]
|
|
30
|
+
if ids:
|
|
31
|
+
lines.append('- ' + classification + ': ' + ', '.join(ids))
|
|
32
|
+
return '\n'.join(lines) + '\n'
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def guide(topic):
|
|
36
|
+
if topic not in TOPICS and topic!='all':
|
|
37
|
+
raise ValueError('Choose a guide topic: '+', '.join(TOPICS)+', all.')
|
|
38
|
+
if topic == 'actions':
|
|
39
|
+
return files('socialctl.ui').joinpath('assets/agent-actions.json').read_text(encoding='utf-8')
|
|
40
|
+
full=files('socialctl.ui').joinpath('assets/agent-manual.md').read_text(encoding='utf-8')
|
|
41
|
+
full = full.replace('{{SOCIALCLI_VERSION}}', importlib.metadata.version('socialcli'))
|
|
42
|
+
if topic in {'all', 'capabilities'}:
|
|
43
|
+
full = full.replace('{{AGENT_ACTION_INDEX}}', render_action_index())
|
|
44
|
+
version = importlib.metadata.version('socialcli')
|
|
45
|
+
identity = 'Installed client: ' + version + '. Installation does not prove registry publication.\n\n'
|
|
46
|
+
if topic=='all':return identity + replace_block(full, document(version=version))
|
|
47
|
+
result = '# SocialCli agent guide: ' + topic + '\n\n' + identity + document(version=version, topic=topic)
|
|
48
|
+
if topic == 'capabilities': result += '## Generated action index\n\n' + render_action_index()
|
|
49
|
+
if topic == 'qa':
|
|
50
|
+
sections = re.split(r'(?=^## )', full, flags=re.MULTILINE)
|
|
51
|
+
result += ''.join(s for s in sections if s.startswith('## Isolated YouTube QA sequences'))
|
|
52
|
+
return result + '\nNext: socialcli agent-guide actions; socialcli agent-guide interaction; socialcli agent-guide publish; socialcli agent-guide schedule; socialcli agent-guide inbox; socialcli agent-guide errors; socialcli agent-guide permissions; socialcli agent-guide all.\n'
|