thoughtleaders-cli 0.7.3__tar.gz → 0.7.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.
Files changed (132) hide show
  1. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/.claude-plugin/plugin.json +1 -1
  2. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/PKG-INFO +1 -1
  3. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/pyproject.toml +1 -1
  4. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl/SKILL.md +3 -1
  5. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/__init__.py +1 -1
  6. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/channels.py +0 -8
  7. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/reports.py +97 -13
  8. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/tests/test_reports.py +58 -1
  9. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/.claude-plugin/marketplace.json +0 -0
  10. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/.github/workflows/python-publish.yml +0 -0
  11. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/.gitignore +0 -0
  12. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/AGENTS.md +0 -0
  13. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/API.md +0 -0
  14. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/CLAUDE.md +0 -0
  15. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/LICENSE +0 -0
  16. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/README.md +0 -0
  17. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/agents/tl-analyst.md +0 -0
  18. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/agents/youtube-comment-classifier.md +0 -0
  19. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/hooks/hooks.json +0 -0
  20. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/hooks/scripts/load-tl-skill.mjs +0 -0
  21. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/hooks/scripts/post-usage.sh +0 -0
  22. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/hooks/scripts/pre-check.sh +0 -0
  23. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl/references/business-glossary.md +0 -0
  24. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl/references/elasticsearch-schema.md +0 -0
  25. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl/references/firebolt-schema.md +0 -0
  26. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl/references/postgres-schema.md +0 -0
  27. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/.gitignore +0 -0
  28. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/SKILL.md +0 -0
  29. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/references/comment-patterns.md +0 -0
  30. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/references/peer-cohort.md +0 -0
  31. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/references/red-flags.md +0 -0
  32. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/references/scoring.md +0 -0
  33. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/scripts/_io_utf8.py +0 -0
  34. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/scripts/analyze_channel.py +0 -0
  35. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/scripts/anomaly_detector.py +0 -0
  36. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/scripts/comment_analyzer.py +0 -0
  37. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/scripts/comment_scraper.py +0 -0
  38. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/scripts/engagement_ratios.py +0 -0
  39. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/scripts/peer_cohort.py +0 -0
  40. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/scripts/report.py +0 -0
  41. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/scripts/resolve_channel.py +0 -0
  42. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/scripts/score.py +0 -0
  43. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/scripts/tl_cli.py +0 -0
  44. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/scripts/video_integrity.py +0 -0
  45. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-channel-authenticity/scripts/view_curves.py +0 -0
  46. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-import/SKILL.md +0 -0
  47. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-keyword-research/SKILL.md +0 -0
  48. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-keyword-research/scripts/probe.py +0 -0
  49. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/SKILL.md +0 -0
  50. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/examples/e2e_findings.md +0 -0
  51. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/examples/golden_queries.md +0 -0
  52. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/references/columns_brands.md +0 -0
  53. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/references/columns_channels.md +0 -0
  54. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/references/columns_content.md +0 -0
  55. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/references/columns_sponsorships.md +0 -0
  56. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/references/intelligence_filterset_schema.json +0 -0
  57. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/references/intelligence_widget_schema.json +0 -0
  58. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/references/report_glossary.md +0 -0
  59. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/references/sortable_columns.json +0 -0
  60. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/references/sponsorship_filterset_schema.json +0 -0
  61. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/references/sponsorship_widget_schema.json +0 -0
  62. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/references/widgets.md +0 -0
  63. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/tools/column_builder.md +0 -0
  64. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/tools/database_query.md +0 -0
  65. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/tools/name_resolver.md +0 -0
  66. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/tools/sample_judge.md +0 -0
  67. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/tools/similar_channels.md +0 -0
  68. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/tools/topic_matcher.md +0 -0
  69. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-report-builder/tools/widget_builder.md +0 -0
  70. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-save-report/SKILL.md +0 -0
  71. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-save-report/references/columns_brands.md +0 -0
  72. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-save-report/references/columns_channels.md +0 -0
  73. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-save-report/references/columns_content.md +0 -0
  74. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-save-report/references/columns_sponsorships.md +0 -0
  75. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-save-report/references/intelligence_filterset_schema.json +0 -0
  76. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-save-report/references/intelligence_widget_schema.json +0 -0
  77. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-save-report/references/report_glossary.md +0 -0
  78. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-save-report/references/sortable_columns.json +0 -0
  79. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-save-report/references/sponsorship_filterset_schema.json +0 -0
  80. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-save-report/references/sponsorship_widget_schema.json +0 -0
  81. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-save-report/references/widgets.md +0 -0
  82. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-top-partnerships/SKILL.md +0 -0
  83. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-top-partnerships/scripts/top_partnerships.py +0 -0
  84. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-views-guarantee/SKILL.md +0 -0
  85. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/skills/tl-views-guarantee/scripts/vg.py +0 -0
  86. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/_completions.py +0 -0
  87. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/_typer_utils.py +0 -0
  88. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/auth/__init__.py +0 -0
  89. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/auth/commands.py +0 -0
  90. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/auth/finalize.py +0 -0
  91. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/auth/login.py +0 -0
  92. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/auth/pkce.py +0 -0
  93. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/auth/token_store.py +0 -0
  94. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/client/__init__.py +0 -0
  95. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/client/errors.py +0 -0
  96. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/client/http.py +0 -0
  97. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/__init__.py +0 -0
  98. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/_comments_common.py +0 -0
  99. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/balance.py +0 -0
  100. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/brands.py +0 -0
  101. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/bulk_import.py +0 -0
  102. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/changelog.py +0 -0
  103. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/credits.py +0 -0
  104. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/db.py +0 -0
  105. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/deals.py +0 -0
  106. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/describe.py +0 -0
  107. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/doctor.py +0 -0
  108. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/matches.py +0 -0
  109. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/proposals.py +0 -0
  110. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/recommender.py +0 -0
  111. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/schema.py +0 -0
  112. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/setup.py +0 -0
  113. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/snapshots.py +0 -0
  114. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/sponsorships.py +0 -0
  115. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/uploads.py +0 -0
  116. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/commands/whoami.py +0 -0
  117. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/config.py +0 -0
  118. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/filters.py +0 -0
  119. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/hints.py +0 -0
  120. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/main.py +0 -0
  121. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/output/__init__.py +0 -0
  122. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/output/formatter.py +0 -0
  123. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/src/tl_cli/self_update.py +0 -0
  124. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/tests/__init__.py +0 -0
  125. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/tests/test_auth.py +0 -0
  126. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/tests/test_describe.py +0 -0
  127. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/tests/test_filters.py +0 -0
  128. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/tests/test_http_auth.py +0 -0
  129. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/tests/test_output.py +0 -0
  130. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/tests/test_setup.py +0 -0
  131. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/tests/test_sponsorships.py +0 -0
  132. {thoughtleaders_cli-0.7.3 → thoughtleaders_cli-0.7.4}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tl-cli",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "ThoughtLeaders CLI — query sponsorship deals, channels, brands, uploads, and intelligence from the terminal",
5
5
  "author": {
6
6
  "name": "ThoughtLeaders",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: thoughtleaders-cli
3
- Version: 0.7.3
3
+ Version: 0.7.4
4
4
  Summary: ThoughtLeaders CLI — query sponsorship data, channels, brands, and intelligence
5
5
  Project-URL: Homepage, https://thoughtleaders.io
6
6
  Project-URL: Repository, https://github.com/ThoughtLeaders-io/thoughtleaders-cli
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "thoughtleaders-cli"
7
- version = "0.7.3"
7
+ version = "0.7.4"
8
8
  description = "ThoughtLeaders CLI — query sponsorship data, channels, brands, and intelligence"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -150,6 +150,8 @@ Unless the user specifically asks for running a specific report or showing the r
150
150
 
151
151
  If the user says yes (or uses any of the save-trigger phrases, like `save it`, `save the list`, `make a report`, `persist this`, `turn this into a campaign`, `I want to come back to this`), invoke the `tl-save-report` skill — it owns the filter-vs-list decision flow, the FilterSet mapping, and the `tl reports create` / `tl reports save-list` save call. **Don't try to compose the report config yourself**; hand off to the skill.
152
152
 
153
+ **When the user already has specific IDs in hand** — "make a report of these sponsorship IDs", "save these exact channels", or a curated set you just resolved — that is always a **list-style** report: pin the IDs with `tl reports save-list <entity> --ids-file` (or add them to an existing report with `tl bulk-import <entity> -c <report-id>`). **Never** route an explicit-ID request through `tl reports create "<natural-language prompt>"` — the prompt path builds *predicate filters* and pins none of those IDs, so the report comes back showing unrelated records, not the ones the user named. After creating it, confirm the report actually contains those records before sharing the link.
154
+
153
155
  Skip the save offer when the result clearly doesn't fit a report type — a single scalar count, an aggregate roll-up across entity types, view-curve time series, schema introspection output, or anything that isn't a list of channels / brands / videos / sponsorships. A trailing offer on those would just be noise.
154
156
 
155
157
  Prefer writing shell code, `jq` commands, or `duckdb` commands that fetch or analysise large sets of data instead of analysing it yourself. On Mac and Linux, create temporary files in `/tmp` that can be analysed later in different ways. On Windows, create them in the directory pointed to by the `%TEMP%` environment variable. When coding, do it in Python.
@@ -765,7 +767,7 @@ tl channels similar 29834 msn:no --limit 30 # non-MSN channels
765
767
  tl channels similar 29834 tpp:yes --limit 30 # TPP (TL-managed) channels only
766
768
  tl channels similar 29834 min-subs:1000000 exclude:477487 --limit 15 # client-side filters
767
769
  ```
768
- **Both `tl channels show` and `tl channels similar` accept either a numeric channel ID or a channel name.** Name arguments are case-insensitive partial matches; if more than one active channel matches, the command prints a candidates table (channel_id, subscribers, name) and exits 1 so you can retry with a specific ID. The `msn` filter on `similar` is tri-state: `yes` (only MSN channels — the default), `no` (only non-MSN channels), `both` (no MSN filter). `tl channels look-alike` is a hidden alias for `similar` that matches the internal "look-alike channels" terminology.
770
+ **Both `tl channels show` and `tl channels similar` accept either a numeric channel ID or a channel name.** Name arguments are case-insensitive partial matches; if more than one active channel matches, the command prints a candidates table (channel_id, subscribers, name) and exits 1 so you can retry with a specific ID. The `msn` filter on `similar` is tri-state: `yes` (only MSN channels — the default), `no` (only non-MSN channels), `both` (no MSN filter). `tl channels look-alike` is a hidden alias for `similar` that matches the internal "look-alike channels" terminology. `tl channels show` returns a `tl_url` field — the canonical ThoughtLeaders web-app analysis page for the channel; use it verbatim when linking a user to the channel instead of constructing a URL by hand.
769
771
 
770
772
  ### "Browse the recommender" (categories, demographics, formats):
771
773
  ```bash
@@ -1,3 +1,3 @@
1
1
  """ThoughtLeaders CLI — query sponsorship data, channels, brands, and intelligence."""
2
2
 
3
- __version__ = "0.7.3"
3
+ __version__ = "0.7.4"
@@ -64,14 +64,6 @@ def show_cmd(
64
64
  client = get_client()
65
65
  try:
66
66
  data = client.get(f"/channels/{encoded_ref}")
67
- for i, r in enumerate(data.get("results", []) if isinstance(data.get("results"), list) else []):
68
- renamed = {}
69
- for k, v in r.items():
70
- if k == "id":
71
- renamed["channel_id"] = v
72
- else:
73
- renamed[k] = v
74
- data["results"][i] = renamed
75
67
  output_single(data, fmt)
76
68
  if fmt == "table" and data.get("show_cta"):
77
69
  record = data.get("results", data)
@@ -22,6 +22,71 @@ REPORT_TYPE_LABELS = {1: "Content", 2: "Brands", 3: "Channels", 8: "Sponsorships
22
22
 
23
23
  POLL_INTERVAL = 2 # seconds between server polls
24
24
 
25
+ # Filterset keys that pin specific entities into a report (the curated-ID
26
+ # lists). A report built from these holds exactly those records; a report built
27
+ # from predicate filters re-evaluates against live data and pins nothing.
28
+ _PIN_ENTITIES = ("channels", "brands", "sponsorships", "articles")
29
+ # Filterset keys that are structural, not user-facing predicate filters.
30
+ _NON_PREDICATE_KEYS = {"keyword_operator", "sort"}
31
+
32
+
33
+ def _summarize_report_contents(config: dict) -> dict:
34
+ """Summarize what a saved report config actually contains.
35
+
36
+ Returns the report-type label, a per-entity count of *pinned* IDs (the
37
+ curated lists that freeze specific channels/brands/sponsorships/articles
38
+ into the report), and the active predicate-filter keys. Lets a caller —
39
+ human or agent — catch a filters-vs-pinned-IDs mismatch (or a wholly blank
40
+ report) before sharing the link: a report built from a natural-language
41
+ prompt yields predicate filters and pins *nothing*, so "pinned: none" is
42
+ the tell that it doesn't contain the specific records the user named.
43
+ """
44
+ filterset = config.get("filterset") or {}
45
+ pinned = {
46
+ entity: len(filterset[entity])
47
+ for entity in _PIN_ENTITIES
48
+ if isinstance(filterset.get(entity), list) and filterset[entity]
49
+ }
50
+ skip = set(_PIN_ENTITIES) | {f"exclude_{e}" for e in _PIN_ENTITIES} | _NON_PREDICATE_KEYS
51
+ filters = sorted(
52
+ key
53
+ for key, value in filterset.items()
54
+ if key not in skip and value not in (None, "", [], {}, False)
55
+ )
56
+ return {
57
+ "report_type": REPORT_TYPE_LABELS.get(config.get("report_type"), config.get("report_type")),
58
+ "pinned": pinned,
59
+ "filters": filters,
60
+ }
61
+
62
+
63
+ def _render_contents_line(summary: dict) -> str:
64
+ """One-line human rendering of a `_summarize_report_contents` result."""
65
+ pinned = summary.get("pinned") or {}
66
+ pin_str = ", ".join(f"{count} {entity}" for entity, count in pinned.items()) if pinned else "none"
67
+ filters = summary.get("filters") or []
68
+ filt_str = ", ".join(filters) if filters else "none"
69
+ return f"Contents: {summary.get('report_type')} report · pinned: {pin_str} · filters: {filt_str}"
70
+
71
+
72
+ def _print_contents_summary(summary: dict) -> None:
73
+ """Surface a saved report's contents on stderr (safe in every output mode).
74
+
75
+ A report with no pinned entities *and* no filters gets a loud warning —
76
+ that blank/default state is the failure behind "you sent me an empty
77
+ report". Otherwise a dim one-liner lets the caller confirm the report holds
78
+ what the user actually asked for.
79
+ """
80
+ line = _render_contents_line(summary)
81
+ if not summary.get("pinned") and not summary.get("filters"):
82
+ err.print(
83
+ f"[yellow]⚠ {line}\n"
84
+ f" This report has no filters and no pinned entities — it will show "
85
+ f"a blank/default view.[/yellow]"
86
+ )
87
+ else:
88
+ err.print(f"[dim]{line}[/dim]")
89
+
25
90
 
26
91
  @app.callback(invoke_without_command=True)
27
92
  def reports(
@@ -330,6 +395,13 @@ def create_report(
330
395
  With a prompt, runs the AI Report Builder pipeline (keyword research, config
331
396
  generation, review) and saves the resulting campaign.
332
397
 
398
+ Have specific IDs already? A report of *exactly* the channels / brands /
399
+ sponsorships / articles you already have the IDs for is a different job —
400
+ use `tl reports save-list <entity> --ids-file` to pin those IDs into a new
401
+ report, or `tl bulk-import <entity> -c <report-id>` to add them to an
402
+ existing one. A natural-language prompt here builds *predicate filters* and
403
+ pins none of those IDs, so the report comes back showing unrelated records.
404
+
333
405
  With --config '<json>' or --config-file <path>, skips the orchestration
334
406
  pipeline and saves the provided config directly. Useful when an external
335
407
  agent (e.g. the tl-report-builder Claude Code skill) has already produced a
@@ -404,6 +476,13 @@ def create_report(
404
476
  report_url = result.get("report_url", "")
405
477
  campaign_id = result.get("campaign_id", "")
406
478
 
479
+ # Echo what the report actually contains. Surfaced even under
480
+ # --yes/--json (the agent path), so a report built from a prompt —
481
+ # which yields predicate filters and pins no specific IDs — can be
482
+ # spotted before its link is shared.
483
+ summary = _summarize_report_contents(config)
484
+ data["report_contents"] = summary
485
+
407
486
  if toon_output:
408
487
  print(toon_encode(data))
409
488
  elif json_output:
@@ -422,6 +501,8 @@ def create_report(
422
501
  if usage:
423
502
  err.print(f"\n [dim]{usage.get('credits_charged', 0)} credits · {usage.get('balance_remaining', '?')} remaining[/dim]")
424
503
 
504
+ _print_contents_summary(summary)
505
+
425
506
  except ApiError as e:
426
507
  handle_api_error(e)
427
508
  finally:
@@ -541,23 +622,26 @@ def save_list_cmd(
541
622
  finally:
542
623
  client.close()
543
624
 
625
+ summary = _summarize_report_contents(config)
626
+ data["report_contents"] = summary
627
+
544
628
  if fmt == "toon":
545
629
  print(toon_encode(data))
546
- return
547
- if fmt == "json":
630
+ elif fmt == "json":
548
631
  print(json.dumps(data, indent=2, default=str))
549
- return
632
+ else:
633
+ results = data.get("results", [{}])
634
+ result = results[0] if results else {}
635
+ err.print()
636
+ err.print("[green bold]Report created![/green bold]")
637
+ err.print(f" Campaign ID: {result.get('campaign_id', '?')}")
638
+ err.print(f" URL: https://app.thoughtleaders.io{result.get('report_url', '')}")
639
+ err.print(
640
+ "\n[dim]Refine columns, widgets, title, or description with "
641
+ "`tl reports update <id>`.[/dim]"
642
+ )
550
643
 
551
- results = data.get("results", [{}])
552
- result = results[0] if results else {}
553
- err.print()
554
- err.print("[green bold]Report created![/green bold]")
555
- err.print(f" Campaign ID: {result.get('campaign_id', '?')}")
556
- err.print(f" URL: https://app.thoughtleaders.io{result.get('report_url', '')}")
557
- err.print(
558
- "\n[dim]Refine columns, widgets, title, or description with "
559
- "`tl reports update <id>`.[/dim]"
560
- )
644
+ _print_contents_summary(summary)
561
645
 
562
646
 
563
647
  @app.command("update")
@@ -7,11 +7,68 @@ import pytest
7
7
  import typer
8
8
  from typer.testing import CliRunner
9
9
 
10
- from tl_cli.commands.reports import _parse_config_arg, app
10
+ from tl_cli.commands.reports import (
11
+ _parse_config_arg,
12
+ _render_contents_line,
13
+ _summarize_report_contents,
14
+ app,
15
+ )
11
16
 
12
17
  runner = CliRunner()
13
18
 
14
19
 
20
+ # ---------------------------------------------------------------------------
21
+ # _summarize_report_contents / _render_contents_line
22
+ # ---------------------------------------------------------------------------
23
+
24
+
25
+ class TestReportContentsSummary:
26
+ def test_filter_only_report_pins_nothing(self) -> None:
27
+ # The exact shape that caused the real bug: a sponsorships report the
28
+ # AI builder produced from a prompt — a generic format predicate, no
29
+ # pinned deals.
30
+ summary = _summarize_report_contents(
31
+ {"report_type": 8, "filterset": {"channel_formats": [4]}}
32
+ )
33
+ assert summary["report_type"] == "Sponsorships"
34
+ assert summary["pinned"] == {}
35
+ assert summary["filters"] == ["channel_formats"]
36
+
37
+ def test_pinned_ids_counted_per_entity(self) -> None:
38
+ summary = _summarize_report_contents(
39
+ {"report_type": 8, "filterset": {"sponsorships": [1, 2, 3, 4, 5]}}
40
+ )
41
+ assert summary["pinned"] == {"sponsorships": 5}
42
+ assert summary["filters"] == []
43
+
44
+ def test_blank_report_has_no_pins_and_no_filters(self) -> None:
45
+ summary = _summarize_report_contents({"report_type": 3, "filterset": {}})
46
+ assert summary["pinned"] == {}
47
+ assert summary["filters"] == []
48
+ line = _render_contents_line(summary)
49
+ assert "pinned: none" in line and "filters: none" in line
50
+
51
+ def test_structural_keys_are_not_counted_as_filters(self) -> None:
52
+ # keyword_operator / sort are structural, not user-facing predicates.
53
+ summary = _summarize_report_contents(
54
+ {"report_type": 3, "filterset": {"keyword_operator": "and", "sort": "x", "channels": [9]}}
55
+ )
56
+ assert summary["pinned"] == {"channels": 1}
57
+ assert summary["filters"] == []
58
+
59
+ def test_empty_and_falsey_filter_values_ignored(self) -> None:
60
+ summary = _summarize_report_contents(
61
+ {"report_type": 3, "filterset": {"languages": [], "is_offline": False, "reach_from": 1000}}
62
+ )
63
+ assert summary["filters"] == ["reach_from"]
64
+
65
+ def test_render_line_mentions_pins_and_filters(self) -> None:
66
+ line = _render_contents_line(
67
+ {"report_type": "Sponsorships", "pinned": {"sponsorships": 5}, "filters": ["channel_formats"]}
68
+ )
69
+ assert "5 sponsorships" in line and "channel_formats" in line
70
+
71
+
15
72
  # ---------------------------------------------------------------------------
16
73
  # _parse_config_arg
17
74
  # ---------------------------------------------------------------------------