@tenderprompt/cli 0.1.9 → 0.1.11
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.
- package/README.md +50 -2
- package/dist/index.js +1397 -87
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,8 +36,8 @@ session:
|
|
|
36
36
|
- inspect artifact-scoped analytics without SQL or platform credentials
|
|
37
37
|
- run server-validated chart specs and export aggregate rows
|
|
38
38
|
- generate starter analytics suggestions
|
|
39
|
-
- create saved analytics dashboards and charts, with
|
|
40
|
-
write previews
|
|
39
|
+
- create, list, update, and delete saved analytics dashboards and charts, with
|
|
40
|
+
`--dry-run` available for write previews
|
|
41
41
|
|
|
42
42
|
The CLI is deterministic by design: every workflow has a non-interactive flag
|
|
43
43
|
path, supports `--json` where automation needs structured output, and avoids
|
|
@@ -88,6 +88,15 @@ TTL values are intentionally bounded:
|
|
|
88
88
|
Use `--profile publish` only when the token should be allowed to publish.
|
|
89
89
|
Publish still requires explicit confirmation with `--confirm publish`.
|
|
90
90
|
|
|
91
|
+
Credential precedence is explicit-first:
|
|
92
|
+
|
|
93
|
+
1. `--token`
|
|
94
|
+
2. `--profile <name>`
|
|
95
|
+
3. `TENDER_API_TOKEN`
|
|
96
|
+
4. saved default profile
|
|
97
|
+
|
|
98
|
+
`--base-url` overrides the base URL for whichever credential source is used.
|
|
99
|
+
|
|
91
100
|
## Git Transport
|
|
92
101
|
|
|
93
102
|
Tender source movement uses Git:
|
|
@@ -157,6 +166,10 @@ tender app analytics export catalog artifact_123 --range 30d --json
|
|
|
157
166
|
tender app analytics export query artifact_123 --spec chart.json --format csv
|
|
158
167
|
|
|
159
168
|
tender app analytics suggestions artifact_123 --range 30d --json
|
|
169
|
+
|
|
170
|
+
tender app analytics charts templates --json
|
|
171
|
+
|
|
172
|
+
tender app analytics property-slots list artifact_123 --json
|
|
160
173
|
```
|
|
161
174
|
|
|
162
175
|
Safe write previews:
|
|
@@ -164,20 +177,53 @@ Safe write previews:
|
|
|
164
177
|
```bash
|
|
165
178
|
tender app analytics dashboards artifact_123 --create "Agent dashboard" --dry-run --json
|
|
166
179
|
|
|
180
|
+
tender app analytics property-slots activate artifact_123 \
|
|
181
|
+
--event signup_started \
|
|
182
|
+
--property plan \
|
|
183
|
+
--type dimension \
|
|
184
|
+
--dry-run \
|
|
185
|
+
--json
|
|
186
|
+
|
|
167
187
|
tender app analytics charts create artifact_123 \
|
|
168
188
|
--dashboard analytics_dashboard_123 \
|
|
169
189
|
--title "Signup funnel" \
|
|
170
190
|
--spec funnel.json \
|
|
171
191
|
--dry-run \
|
|
172
192
|
--json
|
|
193
|
+
|
|
194
|
+
tender app analytics charts update artifact_123 \
|
|
195
|
+
--chart analytics_chart_123 \
|
|
196
|
+
--title "Signup funnel" \
|
|
197
|
+
--spec funnel.json \
|
|
198
|
+
--dry-run \
|
|
199
|
+
--json
|
|
200
|
+
|
|
201
|
+
tender app analytics charts delete artifact_123 \
|
|
202
|
+
--chart analytics_chart_123 \
|
|
203
|
+
--dry-run \
|
|
204
|
+
--json
|
|
173
205
|
```
|
|
174
206
|
|
|
175
207
|
Real saved-dashboard writes use the same commands without `--dry-run`.
|
|
208
|
+
List charts before update/delete so the target chart id and current spec are
|
|
209
|
+
explicit:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
tender app analytics charts list artifact_123 --dashboard analytics_dashboard_123 --json
|
|
213
|
+
```
|
|
176
214
|
|
|
177
215
|
Agents should combine `capabilities --include-catalog` with local source-code
|
|
178
216
|
inspection. For example, inspect where the app calls
|
|
179
217
|
`__TP_ANALYTICS.invoke(...)`, propose a chart spec, validate it with
|
|
180
218
|
`analytics query`, and only then create a saved chart.
|
|
219
|
+
Use `charts templates --json` for reusable chart shapes; adapt any placeholders
|
|
220
|
+
to observed events, paths, or promoted property keys before querying or saving.
|
|
221
|
+
Property group-bys and property metrics need promoted slots; `charts create`
|
|
222
|
+
and `charts update` activate missing slots automatically when the spec includes
|
|
223
|
+
an `event_name = ...` filter. `analytics query` is read-only, so use
|
|
224
|
+
`property-slots activate` first when trying an ad hoc property query. When a
|
|
225
|
+
query fails for a missing dashboard-query property, the CLI prints the exact
|
|
226
|
+
activation commands to run and does not perform that write automatically.
|
|
181
227
|
|
|
182
228
|
## Safety Model
|
|
183
229
|
|
|
@@ -191,6 +237,8 @@ inspection. For example, inspect where the app calls
|
|
|
191
237
|
remote URLs.
|
|
192
238
|
- Analytics commands use tenant/artifact-scoped API routes. They do not expose
|
|
193
239
|
raw query credentials or raw SQL.
|
|
240
|
+
- Property slot activation is an explicit analytics write and remains
|
|
241
|
+
tenant/artifact-scoped.
|
|
194
242
|
- Raw analytics event export is intentionally not available; exports are bounded
|
|
195
243
|
catalog metadata or validated aggregate query rows.
|
|
196
244
|
|