@graphit/cli 0.2.322 → 0.2.330
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/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/bin/graphit +1 -1
- package/bin/graphit.ps1 +1 -1
- package/dist/api/client.js +15 -0
- package/dist/api/client.js.map +1 -1
- package/dist/commands/ds-config.js +2 -2
- package/dist/commands/ds-config.js.map +1 -1
- package/dist/commands/ds.js +2 -2
- package/dist/commands/ds.js.map +1 -1
- package/dist/commands/kb.js +347 -15
- package/dist/commands/kb.js.map +1 -1
- package/dist/commands/query.js +7 -7
- package/dist/commands/query.js.map +1 -1
- package/dist/index.js +0 -8
- package/dist/index.js.map +1 -1
- package/dist/skill-guard.js +2 -1
- package/dist/skill-guard.js.map +1 -1
- package/package.json +1 -1
- package/scripts/verb-policy-source.json +31 -103
- package/skills/graphit/SKILL.md +32 -39
- package/skills/graphit/VERSION.json +1 -1
- package/skills/graphit/references/attached-docs.md +74 -0
- package/skills/graphit/references/data-source-refresh.md +38 -0
- package/skills/graphit/references/data-sources.md +39 -111
- package/skills/graphit/references/filters-advanced.md +2 -2
- package/skills/graphit/references/governance-explained.md +18 -29
- package/skills/graphit/references/governance.md +20 -83
- package/skills/graphit/references/kb-actions.md +28 -81
- package/skills/graphit/references/kb-discovery.md +35 -64
- package/skills/graphit/references/kb-scope.md +17 -15
- package/skills/graphit/references/kb-structure.md +28 -54
- package/skills/graphit/references/kb-traversal.md +24 -96
- package/skills/graphit/references/metric-families.md +19 -0
- package/skills/graphit/references/migration.md +2 -2
- package/skills/graphit/references/onboarding.md +5 -4
- package/skills/graphit/references/presentations.md +1 -1
- package/skills/graphit/references/runtime.md +6 -6
- package/skills/graphit/references/semantic-authoring.md +81 -0
- package/skills/graphit/references/sql-reference.md +19 -20
- package/dist/commands/kb-constraints.d.ts +0 -14
- package/dist/commands/kb-constraints.js +0 -53
- package/dist/commands/kb-constraints.js.map +0 -1
- package/dist/commands/kb-create.d.ts +0 -2
- package/dist/commands/kb-create.js +0 -296
- package/dist/commands/kb-create.js.map +0 -1
- package/dist/commands/kb-delete.d.ts +0 -2
- package/dist/commands/kb-delete.js +0 -37
- package/dist/commands/kb-delete.js.map +0 -1
- package/dist/commands/kb-read.d.ts +0 -2
- package/dist/commands/kb-read.js +0 -223
- package/dist/commands/kb-read.js.map +0 -1
- package/dist/commands/kb-shared.d.ts +0 -43
- package/dist/commands/kb-shared.js +0 -81
- package/dist/commands/kb-shared.js.map +0 -1
- package/dist/commands/kb-update.d.ts +0 -2
- package/dist/commands/kb-update.js +0 -240
- package/dist/commands/kb-update.js.map +0 -1
- package/dist/commands/sl/index.d.ts +0 -2
- package/dist/commands/sl/index.js +0 -263
- package/dist/commands/sl/index.js.map +0 -1
- package/skills/graphit/references/parameterized-metrics.md +0 -77
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
import { apiClient } from "../api/client.js";
|
|
3
|
-
import { output, errorOutput, getOutputFormat } from "../output/format.js";
|
|
4
|
-
import { writeStderr } from "../stderr.js";
|
|
5
|
-
import { styledIntro, styledOutro, styledSuccess, formatBold, } from "../output/styled.js";
|
|
6
|
-
import { parseConstraintFlags, parseApplyOnFlags } from "./kb-constraints.js";
|
|
7
|
-
import { renderValidation, renderVisibility, withVisibility, } from "./kb-shared.js";
|
|
8
|
-
// Project #254 Phase 1: kb create verbs (metric/dimension/rule/domain/synonym/
|
|
9
|
-
// relationship/topic/template). Tables are created from data sources.
|
|
10
|
-
export function addKBCreateCommands(kb) {
|
|
11
|
-
const create = kb
|
|
12
|
-
.command("create")
|
|
13
|
-
.description("Create KB entities. Tables are created from data sources - use 'graphit ds create'.");
|
|
14
|
-
create
|
|
15
|
-
.command("metric")
|
|
16
|
-
.description("Create a new metric")
|
|
17
|
-
.requiredOption("--name <name>", "Metric name (UPPER_SNAKE_CASE)")
|
|
18
|
-
.requiredOption("--sql <expr>", "SQL calculation expression")
|
|
19
|
-
.requiredOption("--table <table>", "Primary table")
|
|
20
|
-
.option("--description <desc>", "Business meaning of the metric - what it counts and when to use it", "")
|
|
21
|
-
.option("--topics <topics>", "Comma-separated topic names")
|
|
22
|
-
.option("--default-dimensions <dims>", "Comma-separated dimension names this metric naturally groups by")
|
|
23
|
-
.option("--parameters <json>", "JSON array of parameter definitions")
|
|
24
|
-
.option("--parameters-file <path>", "Read parameters JSON from file")
|
|
25
|
-
.option("--skip-validate", "Skip pre-creation data validation")
|
|
26
|
-
.option("--unverified", "Create as a draft instead of verified (default: verified)")
|
|
27
|
-
.action(async function () {
|
|
28
|
-
try {
|
|
29
|
-
const opts = this.opts();
|
|
30
|
-
const fmt = getOutputFormat(this);
|
|
31
|
-
const topics = opts.topics ? opts.topics.split(",").map((s) => s.trim()).filter(Boolean) : [];
|
|
32
|
-
const defaultDimensions = opts.defaultDimensions ? opts.defaultDimensions.split(",").map((s) => s.trim()).filter(Boolean) : [];
|
|
33
|
-
let parameters = [];
|
|
34
|
-
if (opts.parametersFile) {
|
|
35
|
-
parameters = JSON.parse(await readFile(opts.parametersFile, "utf-8"));
|
|
36
|
-
}
|
|
37
|
-
else if (opts.parameters) {
|
|
38
|
-
parameters = JSON.parse(opts.parameters);
|
|
39
|
-
}
|
|
40
|
-
const skipValidate = opts.skipValidate ? "true" : "false";
|
|
41
|
-
const resp = await apiClient.post(`/api/v1/cli/kb/metric?skip_validate=${skipValidate}`, {
|
|
42
|
-
name: opts.name,
|
|
43
|
-
calculation: opts.sql,
|
|
44
|
-
table: opts.table,
|
|
45
|
-
description: opts.description,
|
|
46
|
-
topics,
|
|
47
|
-
default_dimensions: defaultDimensions,
|
|
48
|
-
parameters,
|
|
49
|
-
unverified: Boolean(opts.unverified),
|
|
50
|
-
});
|
|
51
|
-
if (fmt === "styled") {
|
|
52
|
-
styledIntro(`graphit kb create metric`);
|
|
53
|
-
styledSuccess(`Metric ${formatBold(String(resp.entity.name))} created`);
|
|
54
|
-
renderValidation(this, resp);
|
|
55
|
-
renderVisibility(this, resp);
|
|
56
|
-
styledOutro();
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
const out = withVisibility(this, { ...resp.entity }, resp);
|
|
60
|
-
if (resp.validation)
|
|
61
|
-
out.validation = resp.validation;
|
|
62
|
-
output(this, out, { keyValue: true });
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
catch (err) {
|
|
66
|
-
errorOutput(err);
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
create
|
|
70
|
-
.command("dimension")
|
|
71
|
-
.description("Create a new dimension")
|
|
72
|
-
.requiredOption("--name <name>", "Dimension name (UPPER_SNAKE_CASE)")
|
|
73
|
-
.requiredOption("--expr <expr>", "SQL expression")
|
|
74
|
-
.requiredOption("--table <table>", "Primary table")
|
|
75
|
-
.option("--type <type>", "Semantic type: categorical, temporal, quantitative, boolean, geographic (auto-inferred if omitted)")
|
|
76
|
-
.option("--output-type <outputType>", "SQL output type: VARCHAR, NUMBER, BOOLEAN, DATE, TIMESTAMP (auto-inferred if omitted)")
|
|
77
|
-
.option("--description <desc>", "Business meaning of the dimension - what it slices and when to use it", "")
|
|
78
|
-
.option("--topics <topics>", "Comma-separated topic names")
|
|
79
|
-
.option("--skip-validate", "Skip pre-creation data validation")
|
|
80
|
-
.option("--unverified", "Create as a draft instead of verified (default: verified)")
|
|
81
|
-
.action(async function () {
|
|
82
|
-
try {
|
|
83
|
-
const opts = this.opts();
|
|
84
|
-
const fmt = getOutputFormat(this);
|
|
85
|
-
const topics = opts.topics ? opts.topics.split(",").map((s) => s.trim()).filter(Boolean) : [];
|
|
86
|
-
const body = {
|
|
87
|
-
name: opts.name,
|
|
88
|
-
expression: opts.expr,
|
|
89
|
-
table: opts.table,
|
|
90
|
-
description: opts.description,
|
|
91
|
-
topics,
|
|
92
|
-
unverified: Boolean(opts.unverified),
|
|
93
|
-
};
|
|
94
|
-
if (opts.type)
|
|
95
|
-
body.semantic_type = opts.type;
|
|
96
|
-
if (opts.outputType)
|
|
97
|
-
body.output_type = opts.outputType;
|
|
98
|
-
const skipValidate = opts.skipValidate ? "true" : "false";
|
|
99
|
-
const resp = await apiClient.post(`/api/v1/cli/kb/dimension?skip_validate=${skipValidate}`, body);
|
|
100
|
-
if (fmt === "styled") {
|
|
101
|
-
styledIntro(`graphit kb create dimension`);
|
|
102
|
-
styledSuccess(`Dimension ${formatBold(String(resp.entity.name))} created`);
|
|
103
|
-
renderValidation(this, resp);
|
|
104
|
-
renderVisibility(this, resp);
|
|
105
|
-
styledOutro();
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
const out = withVisibility(this, { ...resp.entity }, resp);
|
|
109
|
-
if (resp.validation)
|
|
110
|
-
out.validation = resp.validation;
|
|
111
|
-
output(this, out, { keyValue: true });
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
catch (err) {
|
|
115
|
-
errorOutput(err);
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
create
|
|
119
|
-
.command("rule")
|
|
120
|
-
.description("Create a new rule. Without --apply-on the rule governs the whole --table, which cascades to every metric and dimension on it. Use --apply-on metric:NAME / dimension:NAME to govern only specific assets instead. A rule must apply to at least one asset (targetless rules are rejected).")
|
|
121
|
-
.requiredOption("--name <name>", "Rule name (UPPER_SNAKE_CASE)")
|
|
122
|
-
.requiredOption("--sql <expr>", "Rule content/SQL")
|
|
123
|
-
.requiredOption("--table <table>", "Table the rule is about (validation context, and the whole-table target unless --apply-on narrows it)")
|
|
124
|
-
.option("--description <desc>", "What the rule enforces and why it exists", "")
|
|
125
|
-
.option("--topics <topics>", "Comma-separated topic names")
|
|
126
|
-
.option("--constraint <spec...>", "Enforceable constraints (e.g., required_where:\"x=1\" forbidden_column:email)")
|
|
127
|
-
.option("--enforcement-mode <mode>", "Rule enforcement: advisory|always|conditional")
|
|
128
|
-
.option("--apply-on <targets...>", "What the rule governs. Omit to govern the whole --table (cascades to every metric/dimension on it). Use metric:NAME / dimension:NAME to govern only those assets. Cannot mix a table target with metric/dimension targets.")
|
|
129
|
-
.option("--skip-validate", "Skip pre-creation data validation")
|
|
130
|
-
.option("--unverified", "Create as a draft instead of verified (default: verified)")
|
|
131
|
-
.action(async function () {
|
|
132
|
-
try {
|
|
133
|
-
const opts = this.opts();
|
|
134
|
-
const fmt = getOutputFormat(this);
|
|
135
|
-
const topics = opts.topics ? opts.topics.split(",").map((s) => s.trim()).filter(Boolean) : [];
|
|
136
|
-
const constraints = opts.constraint ? parseConstraintFlags(opts.constraint) : undefined;
|
|
137
|
-
const applyOn = opts.applyOn ? parseApplyOnFlags(opts.applyOn) : undefined;
|
|
138
|
-
const skipValidate = opts.skipValidate ? "true" : "false";
|
|
139
|
-
const resp = await apiClient.post(`/api/v1/cli/kb/rule?skip_validate=${skipValidate}`, {
|
|
140
|
-
name: opts.name,
|
|
141
|
-
content: opts.sql,
|
|
142
|
-
table: opts.table,
|
|
143
|
-
description: opts.description,
|
|
144
|
-
topics,
|
|
145
|
-
constraints,
|
|
146
|
-
enforcement_mode: opts.enforcementMode,
|
|
147
|
-
apply_on: applyOn,
|
|
148
|
-
unverified: Boolean(opts.unverified),
|
|
149
|
-
});
|
|
150
|
-
if (fmt === "styled") {
|
|
151
|
-
styledIntro(`graphit kb create rule`);
|
|
152
|
-
styledSuccess(`Rule ${formatBold(String(resp.entity.name))} created`);
|
|
153
|
-
renderValidation(this, resp);
|
|
154
|
-
renderVisibility(this, resp);
|
|
155
|
-
styledOutro();
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
const out = withVisibility(this, { ...resp.entity }, resp);
|
|
159
|
-
if (resp.validation)
|
|
160
|
-
out.validation = resp.validation;
|
|
161
|
-
output(this, out, { keyValue: true });
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
catch (err) {
|
|
165
|
-
errorOutput(err);
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
create
|
|
169
|
-
.command("domain")
|
|
170
|
-
.description("Create a new domain")
|
|
171
|
-
.requiredOption("--name <name>", "Domain name (UPPER_SNAKE_CASE)")
|
|
172
|
-
.option("--description <desc>", "What this domain covers - the business area its tables and assets belong to", "")
|
|
173
|
-
.option("--color <hex>", "Hex color for UI", "#4DB6AC")
|
|
174
|
-
.action(async function () {
|
|
175
|
-
try {
|
|
176
|
-
const opts = this.opts();
|
|
177
|
-
const resp = await apiClient.post("/api/v1/cli/kb/domain", {
|
|
178
|
-
name: opts.name,
|
|
179
|
-
description: opts.description,
|
|
180
|
-
color: opts.color,
|
|
181
|
-
});
|
|
182
|
-
output(this, resp.entity, { keyValue: true });
|
|
183
|
-
}
|
|
184
|
-
catch (err) {
|
|
185
|
-
errorOutput(err);
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
create
|
|
189
|
-
.command("synonym")
|
|
190
|
-
.description("Create a new synonym")
|
|
191
|
-
.requiredOption("--term <term>", "Synonym term (e.g., GMV)")
|
|
192
|
-
.requiredOption("--canonical <name>", "Canonical asset name (e.g., TOTAL_REVENUE)")
|
|
193
|
-
.requiredOption("--type <type>", "Canonical type: metric, column, or table")
|
|
194
|
-
.option("--description <desc>", "When this synonym applies - the phrasing users say for the canonical asset", "")
|
|
195
|
-
.option("--unverified", "Create as a draft instead of verified (default: verified)")
|
|
196
|
-
.action(async function () {
|
|
197
|
-
try {
|
|
198
|
-
const opts = this.opts();
|
|
199
|
-
const resp = await apiClient.post("/api/v1/cli/kb/synonym", {
|
|
200
|
-
term: opts.term,
|
|
201
|
-
canonical: opts.canonical,
|
|
202
|
-
canonical_type: opts.type,
|
|
203
|
-
description: opts.description,
|
|
204
|
-
unverified: Boolean(opts.unverified),
|
|
205
|
-
});
|
|
206
|
-
renderVisibility(this, resp);
|
|
207
|
-
output(this, withVisibility(this, { ...resp.entity }, resp), { keyValue: true });
|
|
208
|
-
}
|
|
209
|
-
catch (err) {
|
|
210
|
-
errorOutput(err);
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
create
|
|
214
|
-
.command("relationship")
|
|
215
|
-
.description("Create a new relationship (JOIN between tables)")
|
|
216
|
-
.requiredOption("--name <name>", "Relationship name (e.g., ORDERS_TO_CUSTOMERS)")
|
|
217
|
-
.requiredOption("--primary-table <table>", "Primary table")
|
|
218
|
-
.requiredOption("--primary-column <col>", "Primary column")
|
|
219
|
-
.requiredOption("--related-table <table>", "Related table")
|
|
220
|
-
.requiredOption("--related-column <col>", "Related column")
|
|
221
|
-
.option("--description <desc>", "What this join represents in the business", "")
|
|
222
|
-
.action(async function () {
|
|
223
|
-
try {
|
|
224
|
-
const opts = this.opts();
|
|
225
|
-
const resp = await apiClient.post("/api/v1/cli/kb/relationship", {
|
|
226
|
-
name: opts.name,
|
|
227
|
-
primary_table: opts.primaryTable,
|
|
228
|
-
primary_column: opts.primaryColumn,
|
|
229
|
-
related_table: opts.relatedTable,
|
|
230
|
-
related_column: opts.relatedColumn,
|
|
231
|
-
description: opts.description,
|
|
232
|
-
});
|
|
233
|
-
renderVisibility(this, resp);
|
|
234
|
-
output(this, withVisibility(this, { ...resp.entity }, resp), { keyValue: true });
|
|
235
|
-
}
|
|
236
|
-
catch (err) {
|
|
237
|
-
errorOutput(err);
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
create
|
|
241
|
-
.command("topic")
|
|
242
|
-
.description("Create a new topic (business-concept tag)")
|
|
243
|
-
.requiredOption("--name <name>", "Topic name (UPPER_SNAKE_CASE)")
|
|
244
|
-
.option("--description <desc>", "What this topic tags - the business concept its assets share", "")
|
|
245
|
-
.action(async function () {
|
|
246
|
-
try {
|
|
247
|
-
const opts = this.opts();
|
|
248
|
-
const resp = await apiClient.post("/api/v1/cli/kb/topic", {
|
|
249
|
-
name: opts.name,
|
|
250
|
-
description: opts.description,
|
|
251
|
-
});
|
|
252
|
-
output(this, resp.entity, { keyValue: true });
|
|
253
|
-
}
|
|
254
|
-
catch (err) {
|
|
255
|
-
errorOutput(err);
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
create
|
|
259
|
-
.command("template")
|
|
260
|
-
.description("Create a reusable template (chart, KPI, or filter control)")
|
|
261
|
-
.requiredOption("--name <name>", "Template name (UPPER_SNAKE_CASE)")
|
|
262
|
-
.option("--render-code <code>", "JS function body for rendering")
|
|
263
|
-
.option("--file <path>", "Read render code from a local file")
|
|
264
|
-
.option("--description <desc>", "What the template renders and when to reach for it", "")
|
|
265
|
-
.option("--chart-types <types>", "Related chart types (comma-separated)", "")
|
|
266
|
-
.action(async function () {
|
|
267
|
-
try {
|
|
268
|
-
const opts = this.opts();
|
|
269
|
-
let renderCode;
|
|
270
|
-
if (opts.file) {
|
|
271
|
-
renderCode = await readFile(opts.file, "utf-8");
|
|
272
|
-
}
|
|
273
|
-
else if (opts.renderCode) {
|
|
274
|
-
renderCode = opts.renderCode;
|
|
275
|
-
}
|
|
276
|
-
else {
|
|
277
|
-
writeStderr(JSON.stringify({ error: "Provide --render-code or --file" }));
|
|
278
|
-
process.exit(1);
|
|
279
|
-
}
|
|
280
|
-
const chartTypes = opts.chartTypes
|
|
281
|
-
? opts.chartTypes.split(",").map((s) => s.trim()).filter(Boolean)
|
|
282
|
-
: [];
|
|
283
|
-
const resp = await apiClient.post("/api/v1/cli/kb/template", {
|
|
284
|
-
name: opts.name,
|
|
285
|
-
render_code: renderCode,
|
|
286
|
-
description: opts.description,
|
|
287
|
-
chart_types: chartTypes,
|
|
288
|
-
});
|
|
289
|
-
output(this, resp.entity, { keyValue: true });
|
|
290
|
-
}
|
|
291
|
-
catch (err) {
|
|
292
|
-
errorOutput(err);
|
|
293
|
-
}
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
//# sourceMappingURL=kb-create.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kb-create.js","sourceRoot":"","sources":["../../src/commands/kb-create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA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AiC,EAAE,CAAC,CAAC,CAAC;gBAC1E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;YACD,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU;gBAChC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;gBACzE,CAAC,CAAC,EAAE,CAAC;YACP,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,IAAI,CAAgB,yBAAyB,EAAE;gBAC1E,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,WAAW,EAAE,UAAU;gBACvB,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,WAAW,EAAE,UAAU;aACxB,CAAC,CAAC;YACH,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QAChD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { apiClient } from "../api/client.js";
|
|
2
|
-
import { errorOutput } from "../output/format.js";
|
|
3
|
-
import { writeStderr } from "../stderr.js";
|
|
4
|
-
import { KB_ARG_TYPE, KB_ARG_NAME } from "./kb-shared.js";
|
|
5
|
-
// Project #254 Phase 1: kb delete verb.
|
|
6
|
-
export function addKBDeleteCommands(kb) {
|
|
7
|
-
kb.command("delete")
|
|
8
|
-
.argument("<type>", KB_ARG_TYPE)
|
|
9
|
-
.argument("<name>", KB_ARG_NAME)
|
|
10
|
-
.description("Delete a KB entity (requires --yes flag)")
|
|
11
|
-
.requiredOption("--yes", "Confirm deletion")
|
|
12
|
-
// Project #272 F-6: a private asset belonging to another member can block a
|
|
13
|
-
// shared asset's delete, and the refusal names who to ask. --force is the
|
|
14
|
-
// other half of that: it proceeds anyway, and the backend notifies them.
|
|
15
|
-
// Deliberately NOT a second confirmation prompt (founder decision 4) - --yes
|
|
16
|
-
// already covers the destructive action, and a second gate teaches people to
|
|
17
|
-
// click through gates.
|
|
18
|
-
.option("--force", "Delete even though another member's private asset blocks it")
|
|
19
|
-
.action(async function (type, name) {
|
|
20
|
-
try {
|
|
21
|
-
const validTypes = ["metric", "dimension", "rule", "template", "synonym", "domain", "relationship", "topic"];
|
|
22
|
-
if (!validTypes.includes(type)) {
|
|
23
|
-
writeStderr(JSON.stringify({
|
|
24
|
-
error: `Delete not supported for '${type}'. Supported: ${validTypes.join(", ")}`,
|
|
25
|
-
}));
|
|
26
|
-
process.exit(1);
|
|
27
|
-
}
|
|
28
|
-
const force = this.opts().force === true;
|
|
29
|
-
await apiClient.delete(`/api/v1/cli/kb/${type}/${encodeURIComponent(name)}${force ? "?force=true" : ""}`);
|
|
30
|
-
console.log(JSON.stringify({ status: "deleted", type, name: name.toUpperCase(), ...(force ? { forced: true } : {}) }));
|
|
31
|
-
}
|
|
32
|
-
catch (err) {
|
|
33
|
-
errorOutput(err);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=kb-delete.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kb-delete.js","sourceRoot":"","sources":["../../src/commands/kb-delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE1D,wCAAwC;AAExC,MAAM,UAAU,mBAAmB,CAAC,EAAW;IAC7C,EAAE,CAAC,OAA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AAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACzH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/commands/kb-read.js
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { apiClient } from "../api/client.js";
|
|
2
|
-
import { output, errorOutput, getOutputFormat, note } from "../output/format.js";
|
|
3
|
-
import { styledIntro, styledOutro, styledInfo, styledMessage, styledTable, styledNote, styledWarn, formatBold, } from "../output/styled.js";
|
|
4
|
-
import { ENTITY_COLUMNS, MIGRATION_INCOMPLETE_WARNING, KB_ARG_TYPE, KB_ARG_NAME, } from "./kb-shared.js";
|
|
5
|
-
// Project #254 Phase 1: kb read verbs (list/get/search/explore/usage/verify/unverify).
|
|
6
|
-
export function addKBReadCommands(kb) {
|
|
7
|
-
kb.command("list")
|
|
8
|
-
.argument("<type>", KB_ARG_TYPE)
|
|
9
|
-
.description("List KB entities (metric, dimension, table, rule, domain, synonym) - the inventory verb. " +
|
|
10
|
-
"Parameterized metrics are collapsed: each template shows a variant_count, child variants are hidden. " +
|
|
11
|
-
"Use --include-variants for the full flat set, kb explore metric <name> to enumerate one template's variants, " +
|
|
12
|
-
"kb get for the full definition. The response carries total/truncated, so fewer rows than total means raise --limit.")
|
|
13
|
-
.option("--limit <n>", "Max rows to return; the response carries total/truncated so a short list means raise this", "50")
|
|
14
|
-
.option("--verified", "Only verified entities")
|
|
15
|
-
.option("--unverified", "Only unverified entities")
|
|
16
|
-
.option("--include-variants", "metric: expand parameterized child variants instead of collapsing them under their template")
|
|
17
|
-
.action(async function (type) {
|
|
18
|
-
try {
|
|
19
|
-
const opts = this.opts();
|
|
20
|
-
const fmt = getOutputFormat(this);
|
|
21
|
-
const params = new URLSearchParams({ limit: opts.limit });
|
|
22
|
-
if (opts.verified)
|
|
23
|
-
params.set("verified", "true");
|
|
24
|
-
if (opts.unverified)
|
|
25
|
-
params.set("verified", "false");
|
|
26
|
-
if (opts.includeVariants)
|
|
27
|
-
params.set("include_variants", "true");
|
|
28
|
-
const resp = await apiClient.get(`/api/v1/cli/kb/${type}?${params}`);
|
|
29
|
-
let entities = resp.entities;
|
|
30
|
-
if (type === "metric") {
|
|
31
|
-
entities = entities.map((e) => {
|
|
32
|
-
const calc = e.calculation || "";
|
|
33
|
-
const paramMatches = calc.match(/\$\{PARAM:(\w+)\}/g);
|
|
34
|
-
return { ...e, params: paramMatches ? paramMatches.map((m) => m.replace(/\$\{PARAM:|}/g, "")).join(", ") : "" };
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
if (fmt === "styled") {
|
|
38
|
-
styledIntro(`graphit kb list ${type}`);
|
|
39
|
-
styledInfo(`${resp.count} ${type}${resp.count !== 1 ? "s" : ""}`);
|
|
40
|
-
const cols = ENTITY_COLUMNS[type] ?? Object.keys(entities[0] ?? {});
|
|
41
|
-
const displayCols = cols.filter((c) => c !== "id");
|
|
42
|
-
const tableRows = entities.map((e) => displayCols.map((c) => c === "name" || c === "term"
|
|
43
|
-
? formatBold(String(e[c] ?? ""))
|
|
44
|
-
: String(e[c] ?? "")));
|
|
45
|
-
if (tableRows.length) {
|
|
46
|
-
styledMessage(styledTable(displayCols, tableRows));
|
|
47
|
-
}
|
|
48
|
-
if (resp.truncated) {
|
|
49
|
-
styledNote(`Showing ${resp.count} of ${resp.total} - raise --limit to see the rest.`, "Truncated");
|
|
50
|
-
}
|
|
51
|
-
if (resp.migration_incomplete)
|
|
52
|
-
styledWarn(MIGRATION_INCOMPLETE_WARNING);
|
|
53
|
-
styledOutro();
|
|
54
|
-
}
|
|
55
|
-
else if (getOutputFormat(this) === "json") {
|
|
56
|
-
// json: emit the full envelope (count/total/truncated) with the
|
|
57
|
-
// enriched entities - the bare array dropped the completeness
|
|
58
|
-
// signal this command's own --help promises.
|
|
59
|
-
output(this, { ...resp, entities });
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
output(this, entities, { columns: ENTITY_COLUMNS[type] });
|
|
63
|
-
if (resp.truncated) {
|
|
64
|
-
note(`Showing ${resp.count} of ${resp.total} ${type}s - raise --limit to see the rest (a missing asset may be truncated, not absent).`);
|
|
65
|
-
}
|
|
66
|
-
if (resp.migration_incomplete)
|
|
67
|
-
note(MIGRATION_INCOMPLETE_WARNING);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
catch (err) {
|
|
71
|
-
errorOutput(err);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
kb.command("get")
|
|
75
|
-
.argument("<type>", KB_ARG_TYPE)
|
|
76
|
-
.argument("<name>", KB_ARG_NAME)
|
|
77
|
-
.description("Get a KB entity by name")
|
|
78
|
-
.action(async function (type, name) {
|
|
79
|
-
try {
|
|
80
|
-
const resp = await apiClient.get(`/api/v1/cli/kb/${type}/by-name/${encodeURIComponent(name)}`);
|
|
81
|
-
output(this, resp.entity, { keyValue: true });
|
|
82
|
-
}
|
|
83
|
-
catch (err) {
|
|
84
|
-
errorOutput(err);
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
kb.command("search")
|
|
88
|
-
.argument("<query>", "Search text - matched against asset names, descriptions and SQL")
|
|
89
|
-
.description("Semantic + substring search across KB assets, ranked by relevance")
|
|
90
|
-
.option("--type <type>", "Filter by entity type")
|
|
91
|
-
.option("--limit <n>", "Max rows to return; the response carries total/truncated so a short list means raise this", "50")
|
|
92
|
-
.action(async function (query) {
|
|
93
|
-
try {
|
|
94
|
-
const opts = this.opts();
|
|
95
|
-
const params = new URLSearchParams({ q: query, limit: opts.limit });
|
|
96
|
-
if (opts.type)
|
|
97
|
-
params.set("type", opts.type);
|
|
98
|
-
const resp = await apiClient.get(`/api/v1/cli/kb/search?${params}`);
|
|
99
|
-
// json (default): emit the full payload so callers see count/total/truncated
|
|
100
|
-
// (a miss may be truncation, not absence). table: clean rows + a stderr note.
|
|
101
|
-
if (getOutputFormat(this) === "json") {
|
|
102
|
-
output(this, resp);
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
output(this, resp.results, { columns: ["score", "type", "name", "description"] });
|
|
106
|
-
if (resp.truncated) {
|
|
107
|
-
note(`Showing ${resp.count} of ${resp.total} matches - narrow with --type or raise --limit (max 100).`);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
catch (err) {
|
|
112
|
-
errorOutput(err);
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
kb.command("explore")
|
|
116
|
-
.argument("<type>", KB_ARG_TYPE)
|
|
117
|
-
.argument("<name>", KB_ARG_NAME)
|
|
118
|
-
.description("Traverse the KB graph - the relationships verb. metric: tables, dimensions, parameters + its concrete variants; " +
|
|
119
|
-
"table/domain/topic: every bound metric (collapsed, with variant_count), dimension and rule plus counts. " +
|
|
120
|
-
"Use this for what's bound to a table X or show me this template's variants.")
|
|
121
|
-
.action(async function (type, name) {
|
|
122
|
-
try {
|
|
123
|
-
const resp = await apiClient.get(`/api/v1/cli/kb/explore/${type}/${encodeURIComponent(name)}`);
|
|
124
|
-
output(this, resp, { keyValue: true });
|
|
125
|
-
}
|
|
126
|
-
catch (err) {
|
|
127
|
-
errorOutput(err);
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
kb.command("usage")
|
|
131
|
-
.argument("[type]", KB_ARG_TYPE)
|
|
132
|
-
.argument("[name]", KB_ARG_NAME)
|
|
133
|
-
.description("Reverse lookup: which custom dashboards present a metric, use a dimension, or enforce a rule. " +
|
|
134
|
-
"[type] [name] = primary facet; --metric/--dimension/--rule AND together. Governed macros only - raw SQL invisible.")
|
|
135
|
-
.option("--metric <name>", "Filter to entities presenting this metric")
|
|
136
|
-
.option("--dimension <name>", "Filter to entities using this dimension")
|
|
137
|
-
.option("--rule <name>", "Filter to entities where this rule is enforced")
|
|
138
|
-
.action(async function (type, name) {
|
|
139
|
-
try {
|
|
140
|
-
const opts = this.opts();
|
|
141
|
-
const facets = {
|
|
142
|
-
metric: opts.metric,
|
|
143
|
-
dimension: opts.dimension,
|
|
144
|
-
rule: opts.rule,
|
|
145
|
-
};
|
|
146
|
-
// Positional <type> <name> sets the primary facet (flags take precedence).
|
|
147
|
-
if (type && name) {
|
|
148
|
-
const t = type.toLowerCase();
|
|
149
|
-
if (t === "metric" || t === "dimension" || t === "rule") {
|
|
150
|
-
facets[t] = facets[t] ?? name;
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
errorOutput(new Error(`Unknown usage type '${type}'. Use metric, dimension, or rule.`));
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
const params = new URLSearchParams();
|
|
158
|
-
if (facets.metric)
|
|
159
|
-
params.set("metric", facets.metric);
|
|
160
|
-
if (facets.dimension)
|
|
161
|
-
params.set("dimension", facets.dimension);
|
|
162
|
-
if (facets.rule)
|
|
163
|
-
params.set("rule", facets.rule);
|
|
164
|
-
if ([...params.keys()].length === 0) {
|
|
165
|
-
errorOutput(new Error("Provide a facet: usage <metric|dimension|rule> <name>, or --metric/--dimension/--rule."));
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
const resp = await apiClient.get(`/api/v1/cli/kb/usage?${params}`);
|
|
169
|
-
if (getOutputFormat(this) === "json") {
|
|
170
|
-
output(this, resp);
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
const rows = resp.used_in.map((h) => ({
|
|
174
|
-
dashboard: h.dashboard_name,
|
|
175
|
-
entity: h.entity_id,
|
|
176
|
-
label: h.label,
|
|
177
|
-
metrics: h.metrics.join(", "),
|
|
178
|
-
dimensions: h.dimensions.join(", "),
|
|
179
|
-
rules: h.rules.map((r) => r.name).join(", "),
|
|
180
|
-
}));
|
|
181
|
-
output(this, rows, {
|
|
182
|
-
columns: ["dashboard", "entity", "label", "metrics", "dimensions", "rules"],
|
|
183
|
-
});
|
|
184
|
-
if (resp.subject) {
|
|
185
|
-
const s = resp.subject;
|
|
186
|
-
note(`${s.name} (${s.type}${s.home_table ? ` on ${s.home_table}` : ""})` +
|
|
187
|
-
(s.expression ? `: ${s.expression}` : ""));
|
|
188
|
-
}
|
|
189
|
-
note(`Presented in ${resp.dashboard_count} dashboard(s), ${resp.hit_count} chart(s).`);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
catch (err) {
|
|
193
|
-
errorOutput(err);
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
kb.command("verify")
|
|
197
|
-
.argument("<type>", KB_ARG_TYPE)
|
|
198
|
-
.argument("<name>", KB_ARG_NAME)
|
|
199
|
-
.description("Verify a KB asset by name; metric templates cascade to all variants")
|
|
200
|
-
.action(async function (type, name) {
|
|
201
|
-
try {
|
|
202
|
-
const resp = await apiClient.post(`/api/v1/cli/kb/${encodeURIComponent(type)}/${encodeURIComponent(name)}/verify`, {});
|
|
203
|
-
output(this, resp, { keyValue: true });
|
|
204
|
-
}
|
|
205
|
-
catch (err) {
|
|
206
|
-
errorOutput(err);
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
kb.command("unverify")
|
|
210
|
-
.argument("<type>", KB_ARG_TYPE)
|
|
211
|
-
.argument("<name>", KB_ARG_NAME)
|
|
212
|
-
.description("Unverify a KB asset (mark as draft); cascades to metric variants")
|
|
213
|
-
.action(async function (type, name) {
|
|
214
|
-
try {
|
|
215
|
-
const resp = await apiClient.post(`/api/v1/cli/kb/${encodeURIComponent(type)}/${encodeURIComponent(name)}/verify?unverify=true`, {});
|
|
216
|
-
output(this, resp, { keyValue: true });
|
|
217
|
-
}
|
|
218
|
-
catch (err) {
|
|
219
|
-
errorOutput(err);
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
//# sourceMappingURL=kb-read.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kb-read.js","sourceRoot":"","sources":["../../src/commands/kb-read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