@tenderprompt/cli 0.1.10 → 0.1.12
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 +48 -3
- package/dist/index.js +931 -49
- 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:
|
|
@@ -159,6 +168,8 @@ tender app analytics export query artifact_123 --spec chart.json --format csv
|
|
|
159
168
|
tender app analytics suggestions artifact_123 --range 30d --json
|
|
160
169
|
|
|
161
170
|
tender app analytics charts templates --json
|
|
171
|
+
|
|
172
|
+
tender app analytics properties list artifact_123 --json
|
|
162
173
|
```
|
|
163
174
|
|
|
164
175
|
Safe write previews:
|
|
@@ -166,22 +177,54 @@ Safe write previews:
|
|
|
166
177
|
```bash
|
|
167
178
|
tender app analytics dashboards artifact_123 --create "Agent dashboard" --dry-run --json
|
|
168
179
|
|
|
180
|
+
tender app analytics properties activate artifact_123 \
|
|
181
|
+
--event signup_started \
|
|
182
|
+
--property plan \
|
|
183
|
+
--type dimension \
|
|
184
|
+
--dry-run \
|
|
185
|
+
--json
|
|
186
|
+
|
|
169
187
|
tender app analytics charts create artifact_123 \
|
|
170
188
|
--dashboard analytics_dashboard_123 \
|
|
171
189
|
--title "Signup funnel" \
|
|
172
190
|
--spec funnel.json \
|
|
173
191
|
--dry-run \
|
|
174
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
|
|
175
205
|
```
|
|
176
206
|
|
|
177
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
|
+
```
|
|
178
214
|
|
|
179
215
|
Agents should combine `capabilities --include-catalog` with local source-code
|
|
180
216
|
inspection. For example, inspect where the app calls
|
|
181
217
|
`__TP_ANALYTICS.invoke(...)`, propose a chart spec, validate it with
|
|
182
218
|
`analytics query`, and only then create a saved chart.
|
|
183
219
|
Use `charts templates --json` for reusable chart shapes; adapt any placeholders
|
|
184
|
-
to observed events, paths, or
|
|
220
|
+
to observed events, paths, or queryable property keys before querying or saving.
|
|
221
|
+
Property group-bys and property metrics need the custom event property to be
|
|
222
|
+
available for dashboard queries; `charts create` and `charts update` activate
|
|
223
|
+
missing properties automatically when the spec includes an `event_name = ...`
|
|
224
|
+
filter. `analytics query` is read-only, so use
|
|
225
|
+
`properties activate` first when trying an ad hoc property query. When a
|
|
226
|
+
query fails for a missing dashboard-query property, the CLI prints the exact
|
|
227
|
+
activation commands to run and does not perform that write automatically.
|
|
185
228
|
|
|
186
229
|
## Safety Model
|
|
187
230
|
|
|
@@ -195,6 +238,8 @@ to observed events, paths, or promoted property keys before querying or saving.
|
|
|
195
238
|
remote URLs.
|
|
196
239
|
- Analytics commands use tenant/artifact-scoped API routes. They do not expose
|
|
197
240
|
raw query credentials or raw SQL.
|
|
241
|
+
- Dashboard-query property activation is an explicit analytics write and remains
|
|
242
|
+
tenant/artifact-scoped.
|
|
198
243
|
- Raw analytics event export is intentionally not available; exports are bounded
|
|
199
244
|
catalog metadata or validated aggregate query rows.
|
|
200
245
|
|