thoughtleaders-cli 0.6.27__tar.gz → 0.6.28__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 (95) hide show
  1. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/.claude-plugin/plugin.json +1 -1
  2. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/PKG-INFO +1 -1
  3. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/pyproject.toml +1 -1
  4. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-import/SKILL.md +44 -9
  5. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/__init__.py +1 -1
  6. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/.claude-plugin/marketplace.json +0 -0
  7. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/.github/workflows/python-publish.yml +0 -0
  8. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/.gitignore +0 -0
  9. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/AGENTS.md +0 -0
  10. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/CLAUDE.md +0 -0
  11. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/LICENSE +0 -0
  12. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/README.md +0 -0
  13. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/agents/tl-analyst.md +0 -0
  14. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/commands/tl-balance.md +0 -0
  15. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/commands/tl-reports.md +0 -0
  16. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/commands/tl-sponsorships.md +0 -0
  17. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/commands/tl.md +0 -0
  18. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/docs/architecture.md +0 -0
  19. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/hooks/hooks.json +0 -0
  20. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/hooks/scripts/post-usage.sh +0 -0
  21. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/hooks/scripts/pre-check.sh +0 -0
  22. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl/SKILL.md +0 -0
  23. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl/references/business-glossary.md +0 -0
  24. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl/references/elasticsearch-schema.md +0 -0
  25. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl/references/firebolt-schema.md +0 -0
  26. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl/references/postgres-schema.md +0 -0
  27. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/SKILL.md +0 -0
  28. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/examples/e2e_findings.md +0 -0
  29. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/examples/golden_queries.md +0 -0
  30. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/references/columns_brands.md +0 -0
  31. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/references/columns_channels.md +0 -0
  32. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/references/columns_content.md +0 -0
  33. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/references/columns_sponsorships.md +0 -0
  34. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/references/intelligence_filterset_schema.json +0 -0
  35. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/references/intelligence_widget_schema.json +0 -0
  36. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/references/report_glossary.md +0 -0
  37. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/references/sortable_columns.json +0 -0
  38. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/references/sponsorship_filterset_schema.json +0 -0
  39. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/references/sponsorship_widget_schema.json +0 -0
  40. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/references/widgets.md +0 -0
  41. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/tools/column_builder.md +0 -0
  42. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/tools/database_query.md +0 -0
  43. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/tools/keyword_research.md +0 -0
  44. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/tools/name_resolver.md +0 -0
  45. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/tools/sample_judge.md +0 -0
  46. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/tools/similar_channels.md +0 -0
  47. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/tools/topic_matcher.md +0 -0
  48. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/skills/tl-report-builder/tools/widget_builder.md +0 -0
  49. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/_completions.py +0 -0
  50. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/auth/__init__.py +0 -0
  51. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/auth/commands.py +0 -0
  52. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/auth/finalize.py +0 -0
  53. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/auth/login.py +0 -0
  54. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/auth/pkce.py +0 -0
  55. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/auth/token_store.py +0 -0
  56. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/client/__init__.py +0 -0
  57. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/client/errors.py +0 -0
  58. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/client/http.py +0 -0
  59. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/__init__.py +0 -0
  60. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/_comments_common.py +0 -0
  61. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/ask.py +0 -0
  62. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/balance.py +0 -0
  63. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/brands.py +0 -0
  64. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/bulk_import.py +0 -0
  65. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/changelog.py +0 -0
  66. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/channels.py +0 -0
  67. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/credits.py +0 -0
  68. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/db.py +0 -0
  69. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/deals.py +0 -0
  70. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/describe.py +0 -0
  71. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/doctor.py +0 -0
  72. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/matches.py +0 -0
  73. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/proposals.py +0 -0
  74. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/recommender.py +0 -0
  75. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/reports.py +0 -0
  76. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/schema.py +0 -0
  77. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/setup.py +0 -0
  78. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/snapshots.py +0 -0
  79. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/sponsorships.py +0 -0
  80. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/uploads.py +0 -0
  81. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/commands/whoami.py +0 -0
  82. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/config.py +0 -0
  83. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/filters.py +0 -0
  84. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/hints.py +0 -0
  85. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/main.py +0 -0
  86. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/output/__init__.py +0 -0
  87. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/output/formatter.py +0 -0
  88. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/src/tl_cli/self_update.py +0 -0
  89. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/tests/__init__.py +0 -0
  90. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/tests/test_auth.py +0 -0
  91. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/tests/test_filters.py +0 -0
  92. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/tests/test_output.py +0 -0
  93. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/tests/test_reports.py +0 -0
  94. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/tests/test_sponsorships.py +0 -0
  95. {thoughtleaders_cli-0.6.27 → thoughtleaders_cli-0.6.28}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tl-cli",
3
- "version": "0.6.27",
3
+ "version": "0.6.28",
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.6.27
3
+ Version: 0.6.28
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.6.27"
7
+ version = "0.6.28"
8
8
  description = "ThoughtLeaders CLI — query sponsorship data, channels, brands, and intelligence"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -57,14 +57,36 @@ Steps:
57
57
  - `brands` → **2** (BRANDS)
58
58
  - `articles` (uploads/videos) → **1** (CONTENT)
59
59
  - `sponsorships` (adlinks/deals) → **8** (CAMPAIGN_MANAGEMENT)
60
- 4. **Pick default columns.** Read the matching columns reference file in the sibling `tl-report-builder` skill and use its **"always include"** defaultsdo NOT duplicate the list inline here, that's where the canonical default lives:
61
- - channels → `../tl-report-builder/references/columns_channels.md` (look for the "Defaults — always include" section)
60
+ 4. **Pick default columns.** Read the matching columns reference file in the sibling `tl-report-builder` skill and use its **"Defaults — always include"** sectionthat's where the canonical column list lives per type; do NOT restate it here. The four files:
61
+ - channels → `../tl-report-builder/references/columns_channels.md`
62
62
  - brands → `../tl-report-builder/references/columns_brands.md`
63
63
  - articles → `../tl-report-builder/references/columns_content.md`
64
64
  - sponsorships → `../tl-report-builder/references/columns_sponsorships.md`
65
65
 
66
- Convert the column display names into the dict shape: `{"Channel": {"display": true}, "TL Channel Summary": {"display": true}, …}`.
67
- 5. **Compose the minimal config:**
66
+ Convert each display name from the "Defaults always include" list into a column entry shape **`{"display": true, "width": "default"}`** — the `width` field is required by the dashboard's column renderer; without it, columns sometimes resolve but cells render empty. Use `"wide"` for narrative columns (e.g. `TL Channel Summary`, `Channel Description`, `Topic Descriptions`); use `"narrow"` for short numeric columns (e.g. `Status`, `Country`); `"default"` everywhere else is safe.
67
+
68
+ 5. **Pick `dataset_structure`.** This block tells the dashboard's data plane how to query each row's cell values. **Without it the report saves but rows render empty** — see the bottom-of-section sanity check. Shape:
69
+
70
+ ```json
71
+ "dataset_structure": {
72
+ "report_type": <same as the top-level report_type>,
73
+ "page_size": 50,
74
+ "sort": "<backend_code field, optionally -prefixed for descending>"
75
+ }
76
+ ```
77
+
78
+ Per-type default sort. **Critical invariant:** the `sort` field must reference a `backend_code` whose display-name column is in the column set you emitted in step 4. The dashboard's renderer rejects sorts pointing at columns that aren't present in the report. So pick the intersection of (a) the type's "Defaults — always include" columns from `columns_<type>.md` and (b) sortable columns from `../tl-report-builder/references/sortable_columns.json`:
79
+
80
+ | report_type | entity | default `sort` | maps to (must be in column set) |
81
+ |---|---|---|---|
82
+ | 3 | channels | `-reach` | `Subscribers` (in defaults) |
83
+ | 2 | brands | `-doc_count` | `Mentions` (in defaults) |
84
+ | 1 | articles | `-publication_date` | `Date` (in defaults) |
85
+ | 8 | sponsorships | `-send_date` | `Scheduled Date` (in defaults) |
86
+
87
+ If the user explicitly asked for a different sort, honor that — but if their preferred sort column isn't in the type's defaults, **add that column to the column set in step 4** before emitting the config. Sort pointing at an absent column re-creates the original render-failure bug.
88
+
89
+ 6. **Compose the minimal config:**
68
90
 
69
91
  ```json
70
92
  {
@@ -73,12 +95,13 @@ Steps:
73
95
  "report_type": <from step 3>,
74
96
  "type": 2,
75
97
  "filterset": {},
76
- "columns": <from step 4>
98
+ "columns": <from step 4>,
99
+ "dataset_structure": <from step 5>
77
100
  }
78
101
  ```
79
102
 
80
- `type: 2` is DYNAMIC (the only valid campaign type for save). `filterset: {}` is intentional — no keyword/topic/demographic filters; the report's contents will come entirely from the include list bulk-import populates next.
81
- 6. **Persist via the same primitive `tl-report-builder` uses.** Write the config dict to a temp file using your file-writing tool — **do not use shell `echo` or heredocs**, those break on titles containing apostrophes, dollar signs, backticks, etc. The whole point of `--config-file` is to bypass shell quoting entirely. Pick any temp path the agent's filesystem tool can write to (e.g. `/tmp/tl-import-container.json` on Unix, the OS temp dir on Windows).
103
+ `type: 2` is DYNAMIC (the only valid campaign type for save). `filterset: {}` is intentional — no keyword/topic/demographic filters; the report's contents will come entirely from the include list bulk-import populates next. **`dataset_structure` is what makes the rows render with actual values** — leave it out and the dashboard shows row numbers but blank cells.
104
+ 7. **Persist via the same primitive `tl-report-builder` uses.** Write the config dict to a temp file using your file-writing tool — **do not use shell `echo` or heredocs**, those break on titles containing apostrophes, dollar signs, backticks, etc. The whole point of `--config-file` is to bypass shell quoting entirely. Pick any temp path the agent's filesystem tool can write to (e.g. `/tmp/tl-import-container.json` on Unix, the OS temp dir on Windows).
82
105
 
83
106
  Then run:
84
107
 
@@ -88,9 +111,21 @@ Steps:
88
111
 
89
112
  With `--yes --json` the CLI emits a single JSON document on stdout containing the save response — parse it with one `json.loads()` and pull out `campaign_id` (and `report_url` for the summary). If `tl reports create` returns HTTP 400 with `Missing required field: report_title` or `…report_description`, the config is malformed — re-check step 1/2.
90
113
 
91
- 7. **Hand off to bulk-import** using the new `campaign_id` as if the user had supplied it. Continue with "Inputs to gather" and the rest of this skill below.
114
+ 8. **Run bulk-import, capture the result — but DO NOT render the success summary yet.** Hand off to the bulk-import path with the new `campaign_id` and execute "Inputs to gather" + the bulk-import call + the JSON-envelope parse. **Stop before** rendering the per-row classification table or any "import done" message. Step 9 below must run first; only then do you render the summary. If you find yourself about to emit the success markdown straight out of the bulk-import flow, stop — you skipped step 9.
115
+
116
+ 9. **Post-import render check (must execute before any success summary is emitted).** The save accepts the config; the renderer can still drop columns silently (e.g. `sort` points at a column you didn't emit, or `width` is missing on entries that needed it). Run:
117
+
118
+ ```bash
119
+ tl reports run <campaign_id> --limit 3 --json
120
+ ```
121
+
122
+ - If `results` is non-empty AND each row has fields beyond just an ID → render works. Now surface the bulk-import success summary (headline + per-row classification table) plus the new report URL.
123
+ - If `results` is non-empty but each row is mostly null/empty fields → the config has a render bug. Surface to the user **instead of** the normal success message: *"The bulk-import succeeded but the report is rendering with empty cells. Add columns via the dashboard UI, or delete and re-run the import."* Don't hide this — the import already happened; the user needs to know they have a partially-broken report. Still include the bulk-import's `inputs` classification table so they see what landed.
124
+ - If `results` is unexpectedly empty (shouldn't happen post-bulk-import unless every row failed) → surface the bulk-import's `inputs` table to explain which rows failed; skip the "Created [report] and imported N" headline since N=0.
125
+
126
+ *Cost: a small report-run credit. Worth it — silently handing the user a report whose cells are blank is worse than telling them upfront.*
92
127
 
93
- Surface the new report URL alongside the bulk-import results in the final summary, e.g. *"Created [Q1 cohort](https://app.thoughtleaders.io/#/thoughtleaders?campaign=23859) and imported 50 channels:"* followed by the per-row table.
128
+ Once step 9 passes, surface the new report URL alongside the bulk-import results in the final summary, e.g. *"Created [Q1 cohort](https://app.thoughtleaders.io/#/thoughtleaders?campaign=23859) and imported 50 channels:"* followed by the per-row table.
94
129
 
95
130
  ## Inputs to gather
96
131
 
@@ -1,3 +1,3 @@
1
1
  """ThoughtLeaders CLI — query sponsorship data, channels, brands, and intelligence."""
2
2
 
3
- __version__ = "0.6.27"
3
+ __version__ = "0.6.28"