@burdenoff/microfe-semanticfed 2026.1031.6 → 2026.1031.8
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/dist/semanticfed/api/semanticfedGraphql.js +1 -1
- package/dist/semanticfed/components/AskQuestionPanel.js +221 -103
- package/dist/semanticfed/components/AskQuestionPanel.js.map +1 -1
- package/dist/semanticfed/components/NlAssistSettings.js +143 -0
- package/dist/semanticfed/components/NlAssistSettings.js.map +1 -0
- package/dist/semanticfed/components/SavedQueryRunsPanel.js +407 -0
- package/dist/semanticfed/components/SavedQueryRunsPanel.js.map +1 -0
- package/dist/semanticfed/hooks/useNlQuery.js +63 -11
- package/dist/semanticfed/hooks/useNlQuery.js.map +1 -1
- package/dist/semanticfed/hooks/useQueryRuns.js +171 -0
- package/dist/semanticfed/hooks/useQueryRuns.js.map +1 -0
- package/dist/semanticfed/pages/QueryConsolePage.js +138 -138
- package/dist/semanticfed/pages/QueryConsolePage.js.map +1 -1
- package/dist/semanticfed/providers/SemanticFedProvider.js +22 -10
- package/dist/semanticfed/providers/SemanticFedProvider.js.map +1 -1
- package/dist/semanticfed/utils/format.js +8 -0
- package/dist/semanticfed/utils/format.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNlQuery.js","names":[],"sources":["../../../src/semanticfed/hooks/useNlQuery.ts"],"sourcesContent":["/**\n * Natural-language question hooks (BOFF-4276), wired to the\n * `wspace-semanticfed-svc` NL module:\n *\n * - `semTranslateQuestion` translates a question into SQL over the model's\n * governed entities, dimensions and metrics without running it. Asked with\n * an empty question it returns only the example questions the model can\n * answer, which the console offers as starting points.\n * - `semAskQuestion` translates the question and runs the generated SQL\n * through the SQL endpoint with the caller's access policies applied. It is\n * metered as one query run.\n */\nimport { useMutation, useQuery } from '@tanstack/react-query';\n\nimport { semRequest } from '../api/semanticfedGraphql';\nimport { useSemanticFed } from '../providers/SemanticFedProvider';\nimport type { SemSqlResult } from './useSqlConsole';\n\nexport type SemNlStatus = 'TRANSLATED' | 'NEEDS_CLARIFICATION';\n\nexport type SemNlClarificationReason =\n | 'EMPTY_QUESTION'\n | 'TOO_LONG'\n | 'NO_MATCH'\n | 'NO_JOIN_PATH'\n | 'UNSUPPORTED_AGGREGATION'\n | 'INVALID_FILTER'\n | 'LOW_CONFIDENCE'\n | 'INVALID_QUERY';\n\nexport type SemNlStepKind =\n | 'ENTITY'\n | 'JOIN'\n | 'COLUMN'\n | 'MEASURE'\n | 'GROUP_BY'\n | 'FILTER'\n | 'ORDER'\n | 'LIMIT';\n\nexport interface SemNlStep {\n kind: SemNlStepKind;\n entity: string | null;\n field: string | null;\n aggregation: string | null;\n governed: boolean;\n operator: string | null;\n value: unknown;\n direction: string | null;\n count: number | null;\n relationship: string | null;\n}\n\nexport interface SemNlTranslation {\n modelId: string;\n modelName: string;\n question: string;\n status: SemNlStatus;\n sql: string | null;\n confidence: number;\n steps: SemNlStep[];\n unmatchedTerms: string[];\n clarificationReason: SemNlClarificationReason | null;\n clarification: string | null;\n suggestions: string[];\n engine: string;\n}\n\nexport interface SemNlAnswer {\n translation: SemNlTranslation;\n result: SemSqlResult | null;\n}\n\nexport interface SemNlQuestionInput {\n question: string;\n modelId: string;\n maxRows?: number;\n}\n\nconst TRANSLATION_FIELDS = `\n modelId\n modelName\n question\n status\n sql\n confidence\n steps {\n kind\n entity\n field\n aggregation\n governed\n operator\n value\n direction\n count\n relationship\n }\n unmatchedTerms\n clarificationReason\n clarification\n suggestions\n engine`;\n\nconst SUGGESTIONS_QUERY = `query SemNlSuggestions($input: SemNlQuestionInput!) {\n semTranslateQuestion(input: $input) {\n modelId\n suggestions\n }\n}`;\n\nconst ASK_QUESTION_MUTATION = `mutation SemAskQuestion($input: SemNlQuestionInput!) {\n semAskQuestion(input: $input) {\n translation {${TRANSLATION_FIELDS}\n }\n result {\n modelId\n columns {\n name\n entity\n field\n aggregation\n dataType\n masked\n mask\n }\n rows\n rowCount\n truncated\n durationMs\n sourcesTouched\n }\n }\n}`;\n\n/** Example questions the model can answer (translation only: reads no data, not metered). */\nexport function useSemNlSuggestions(modelId: string | null) {\n const { apiGatewayUrl, workspaceId } = useSemanticFed();\n return useQuery({\n queryKey: ['semanticfed', 'nl', 'suggestions', workspaceId ?? 'no-workspace', modelId] as const,\n enabled: Boolean(workspaceId && modelId),\n queryFn: async () => {\n const data = await semRequest<{\n semTranslateQuestion: Pick<SemNlTranslation, 'modelId' | 'suggestions'>;\n }>(SUGGESTIONS_QUERY, { input: { question: '', modelId } }, apiGatewayUrl);\n return data.semTranslateQuestion.suggestions;\n },\n });\n}\n\n/** Translate a question and run it with the caller's access policies (one metered query run). */\nexport function useSemAskQuestion() {\n const { apiGatewayUrl } = useSemanticFed();\n return useMutation({\n mutationFn: async (input: SemNlQuestionInput) => {\n const data = await semRequest<{ semAskQuestion: SemNlAnswer }>(\n ASK_QUESTION_MUTATION,\n { input },\n apiGatewayUrl\n );\n return data.semAskQuestion;\n },\n });\n}\n"],"mappings":";;;;AA+EA,IAAM,IAAqB,6VAyBrB,IAAoB,wIAOpB,IAAwB;;mBAEX,EAAmB;;;;;;;;;;;;;;;;;;;;;AAuBtC,SAAgB,EAAoB,GAAwB;CAC1D,IAAM,EAAE,kBAAe,mBAAgB,GAAgB;AACvD,QAAO,EAAS;EACd,UAAU;GAAC;GAAe;GAAM;GAAe,KAAe;GAAgB;GAAQ;EACtF,SAAS,GAAQ,KAAe;EAChC,SAAS,aACM,MAAM,EAEhB,GAAmB,EAAE,OAAO;GAAE,UAAU;GAAI;GAAS,EAAE,EAAE,EAAc,EAC9D,qBAAqB;EAEpC,CAAC;;AAIJ,SAAgB,IAAoB;CAClC,IAAM,EAAE,qBAAkB,GAAgB;AAC1C,QAAO,EAAY,EACjB,YAAY,OAAO,OACJ,MAAM,EACjB,GACA,EAAE,UAAO,EACT,EACD,EACW,gBAEf,CAAC"}
|
|
1
|
+
{"version":3,"file":"useNlQuery.js","names":[],"sources":["../../../src/semanticfed/hooks/useNlQuery.ts"],"sourcesContent":["/**\n * Natural-language question hooks (BOFF-4276), wired to the\n * `wspace-semanticfed-svc` NL module:\n *\n * - `semTranslateQuestion` translates a question into SQL over the model's\n * governed entities, dimensions and metrics without running it. Asked with\n * an empty question it returns only the example questions the model can\n * answer, which the console offers as starting points.\n * - `semAskQuestion` translates the question and runs the generated SQL\n * through the SQL endpoint with the caller's access policies applied. It is\n * metered as one query run.\n * - Follow-ups (BOFF-10533): the earlier questions of the conversation are\n * sent as `history`, so \"and by status?\" or \"only EU\" refine the previous\n * interpretation.\n * - LLM-assisted phrasing (BOFF-10533): `semNlSettings` /\n * `semUpdateNlSettings` turn on rewording by the workspace's own AI\n * provider (an OpenAI or Anthropic connection from Integrations).\n */\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { semRequest } from '../api/semanticfedGraphql';\nimport { useSemanticFed } from '../providers/SemanticFedProvider';\nimport type { SemSqlResult } from './useSqlConsole';\n\nexport type SemNlStatus = 'TRANSLATED' | 'NEEDS_CLARIFICATION';\n\nexport type SemNlClarificationReason =\n | 'EMPTY_QUESTION'\n | 'TOO_LONG'\n | 'NO_MATCH'\n | 'NO_JOIN_PATH'\n | 'UNSUPPORTED_AGGREGATION'\n | 'INVALID_FILTER'\n | 'LOW_CONFIDENCE'\n | 'INVALID_QUERY'\n | 'UNPLACED_VALUE';\n\nexport type SemNlAssistStatus =\n | 'NOT_NEEDED'\n | 'SKIPPED'\n | 'DISABLED'\n | 'NOT_CONFIGURED'\n | 'QUOTA_EXHAUSTED'\n | 'QUOTA_UNAVAILABLE'\n | 'PROVIDER_ERROR'\n | 'NO_IMPROVEMENT'\n | 'REPHRASED';\n\nexport type SemNlStepKind =\n | 'ENTITY'\n | 'JOIN'\n | 'COLUMN'\n | 'MEASURE'\n | 'GROUP_BY'\n | 'FILTER'\n | 'ORDER'\n | 'LIMIT';\n\nexport interface SemNlStep {\n kind: SemNlStepKind;\n entity: string | null;\n field: string | null;\n aggregation: string | null;\n governed: boolean;\n operator: string | null;\n value: unknown;\n direction: string | null;\n count: number | null;\n relationship: string | null;\n}\n\nexport interface SemNlTranslation {\n modelId: string;\n modelName: string;\n question: string;\n status: SemNlStatus;\n sql: string | null;\n confidence: number;\n steps: SemNlStep[];\n unmatchedTerms: string[];\n clarificationReason: SemNlClarificationReason | null;\n clarification: string | null;\n suggestions: string[];\n engine: string;\n followUp: boolean;\n assist: SemNlAssistStatus;\n rephrasedQuestion: string | null;\n assistProvider: string | null;\n}\n\nexport interface SemNlAnswer {\n translation: SemNlTranslation;\n result: SemSqlResult | null;\n}\n\nexport interface SemNlQuestionInput {\n question: string;\n modelId: string;\n maxRows?: number;\n /** Earlier questions of the conversation, oldest first. */\n history?: string[];\n}\n\nexport interface SemNlSettings {\n llmAssistEnabled: boolean;\n aiConnectionId: string | null;\n aiProviderKey: string | null;\n aiModel: string | null;\n defaultAiModel: string | null;\n supportedProviders: string[];\n updatedAt: string | null;\n updatedBy: string | null;\n}\n\nexport interface SemUpdateNlSettingsInput {\n llmAssistEnabled: boolean;\n aiConnectionId: string | null;\n aiModel: string | null;\n}\n\n/** An integration connection that can hold the workspace's AI provider key. */\nexport interface SemAiConnection {\n id: string;\n name: string;\n status: string;\n providerKey: string;\n providerName: string;\n}\n\nconst TRANSLATION_FIELDS = `\n modelId\n modelName\n question\n status\n sql\n confidence\n steps {\n kind\n entity\n field\n aggregation\n governed\n operator\n value\n direction\n count\n relationship\n }\n unmatchedTerms\n clarificationReason\n clarification\n suggestions\n engine\n followUp\n assist\n rephrasedQuestion\n assistProvider`;\n\nconst SETTINGS_FIELDS = `\n llmAssistEnabled\n aiConnectionId\n aiProviderKey\n aiModel\n defaultAiModel\n supportedProviders\n updatedAt\n updatedBy`;\n\nconst NL_SETTINGS_QUERY = `query SemNlSettings {\n semNlSettings {${SETTINGS_FIELDS}\n }\n}`;\n\nconst UPDATE_NL_SETTINGS_MUTATION = `mutation SemUpdateNlSettings($input: SemUpdateNlSettingsInput!) {\n semUpdateNlSettings(input: $input) {${SETTINGS_FIELDS}\n }\n}`;\n\nconst AI_CONNECTIONS_QUERY = `query SemAiConnections($filter: ConnectionFilterInput, $pagination: IntegrationsPaginationInput) {\n getConnections(filter: $filter, pagination: $pagination) {\n items {\n id\n name\n status\n provider {\n key\n name\n }\n }\n }\n}`;\n\nconst SUGGESTIONS_QUERY = `query SemNlSuggestions($input: SemNlQuestionInput!) {\n semTranslateQuestion(input: $input) {\n modelId\n suggestions\n }\n}`;\n\nconst ASK_QUESTION_MUTATION = `mutation SemAskQuestion($input: SemNlQuestionInput!) {\n semAskQuestion(input: $input) {\n translation {${TRANSLATION_FIELDS}\n }\n result {\n modelId\n columns {\n name\n entity\n field\n aggregation\n dataType\n masked\n mask\n }\n rows\n rowCount\n truncated\n durationMs\n sourcesTouched\n }\n }\n}`;\n\n/** Example questions the model can answer (translation only: reads no data, not metered). */\nexport function useSemNlSuggestions(modelId: string | null) {\n const { apiGatewayUrl, workspaceId } = useSemanticFed();\n return useQuery({\n queryKey: ['semanticfed', 'nl', 'suggestions', workspaceId ?? 'no-workspace', modelId] as const,\n enabled: Boolean(workspaceId && modelId),\n queryFn: async () => {\n const data = await semRequest<{\n semTranslateQuestion: Pick<SemNlTranslation, 'modelId' | 'suggestions'>;\n }>(SUGGESTIONS_QUERY, { input: { question: '', modelId } }, apiGatewayUrl);\n return data.semTranslateQuestion.suggestions;\n },\n });\n}\n\n/** Translate a question and run it with the caller's access policies (one metered query run). */\nexport function useSemAskQuestion() {\n const { apiGatewayUrl } = useSemanticFed();\n return useMutation({\n mutationFn: async (input: SemNlQuestionInput) => {\n const data = await semRequest<{ semAskQuestion: SemNlAnswer }>(\n ASK_QUESTION_MUTATION,\n { input },\n apiGatewayUrl\n );\n return data.semAskQuestion;\n },\n });\n}\n\nconst nlSettingsKey = (workspaceId: string | null | undefined) =>\n ['semanticfed', 'nl', 'settings', workspaceId ?? 'no-workspace'] as const;\n\n/** The workspace's natural-language settings (LLM-assisted phrasing is off until enabled). */\nexport function useSemNlSettings() {\n const { apiGatewayUrl, workspaceId } = useSemanticFed();\n return useQuery({\n queryKey: nlSettingsKey(workspaceId),\n enabled: Boolean(workspaceId),\n queryFn: async () => {\n const data = await semRequest<{ semNlSettings: SemNlSettings }>(\n NL_SETTINGS_QUERY,\n {},\n apiGatewayUrl\n );\n return data.semNlSettings;\n },\n });\n}\n\n/** Save the workspace's natural-language settings (governance permission). */\nexport function useSemUpdateNlSettings() {\n const { apiGatewayUrl, workspaceId } = useSemanticFed();\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: async (input: SemUpdateNlSettingsInput) => {\n const data = await semRequest<{ semUpdateNlSettings: SemNlSettings }>(\n UPDATE_NL_SETTINGS_MUTATION,\n { input },\n apiGatewayUrl\n );\n return data.semUpdateNlSettings;\n },\n onSuccess: (settings) => {\n queryClient.setQueryData(nlSettingsKey(workspaceId), settings);\n },\n });\n}\n\ninterface ConnectionsData {\n getConnections: {\n items: Array<{\n id: string;\n name: string;\n status: string;\n provider: { key: string; name: string } | null;\n }>;\n };\n}\n\n/** Active integration connections to a supported AI provider (OpenAI, Anthropic). */\nexport function useSemAiConnections(enabled: boolean, supportedProviders: string[]) {\n const { apiGatewayUrl, workspaceId } = useSemanticFed();\n return useQuery({\n queryKey: [\n 'semanticfed',\n 'nl',\n 'ai-connections',\n workspaceId ?? 'no-workspace',\n supportedProviders.join(','),\n ] as const,\n enabled: Boolean(workspaceId) && enabled,\n queryFn: async (): Promise<SemAiConnection[]> => {\n const data = await semRequest<ConnectionsData>(\n AI_CONNECTIONS_QUERY,\n { filter: { status: 'ACTIVE' }, pagination: { limit: 100 } },\n apiGatewayUrl\n );\n return data.getConnections.items\n .filter((c) => c.provider && supportedProviders.includes(c.provider.key))\n .map((c) => ({\n id: c.id,\n name: c.name,\n status: c.status,\n providerKey: c.provider?.key ?? '',\n providerName: c.provider?.name ?? '',\n }));\n },\n });\n}\n"],"mappings":";;;;AAiIA,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A;GACA;GACA,KAAe;GACf,EAAmB,KAAK,IAAI;GAC7B;EACD,SAAS,EAAQ,KAAgB;EACjC,SAAS,aACM,MAAM,EACjB,GACA;GAAE,QAAQ,EAAE,QAAQ,UAAU;GAAE,YAAY,EAAE,OAAO,KAAK;GAAE,EAC5D,EACD,EACW,eAAe,MACxB,QAAQ,MAAM,EAAE,YAAY,EAAmB,SAAS,EAAE,SAAS,IAAI,CAAC,CACxE,KAAK,OAAO;GACX,IAAI,EAAE;GACN,MAAM,EAAE;GACR,QAAQ,EAAE;GACV,aAAa,EAAE,UAAU,OAAO;GAChC,cAAc,EAAE,UAAU,QAAQ;GACnC,EAAE;EAER,CAAC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { useSemanticFed as e } from "../providers/SemanticFedProvider.js";
|
|
2
|
+
import { clearGraphqlReadCaches as t, semRequest as n } from "../api/semanticfedGraphql.js";
|
|
3
|
+
import { useMutation as r, useQuery as i, useQueryClient as a } from "@tanstack/react-query";
|
|
4
|
+
var o = 100, s = 20, c = 1500, l = new Set([
|
|
5
|
+
"SUCCEEDED",
|
|
6
|
+
"FAILED",
|
|
7
|
+
"CANCELLED"
|
|
8
|
+
]);
|
|
9
|
+
function u(e) {
|
|
10
|
+
return l.has(e);
|
|
11
|
+
}
|
|
12
|
+
function d(e, t = Date.now()) {
|
|
13
|
+
if (u(e.status)) return !1;
|
|
14
|
+
let n = Date.parse(e.createdAt);
|
|
15
|
+
return Number.isFinite(n) && t - n > 6e5;
|
|
16
|
+
}
|
|
17
|
+
var f = "id\n queryId\n status\n errorMessage\n planSummary\n rowCount\n durationMs\n sourcesTouched\n fromCache\n runById\n createdAt\n startedAt\n finishedAt", p = "query SemConsoleSavedQueries($modelId: ID, $pagination: PaginationInput) {\n semListQueries(modelId: $modelId, pagination: $pagination) {\n items {\n id\n name\n description\n modelId\n queryText\n status\n tags\n updatedAt\n }\n }\n}", m = `mutation SemConsoleRunQuery($id: ID!) {
|
|
18
|
+
semRunQuery(id: $id) {
|
|
19
|
+
${f}
|
|
20
|
+
}
|
|
21
|
+
}`, h = `query SemConsoleQueryRun($id: ID!) {
|
|
22
|
+
semQueryRun(id: $id) {
|
|
23
|
+
${f}
|
|
24
|
+
}
|
|
25
|
+
}`, g = `query SemConsoleQueryRuns($queryId: ID!, $pagination: PaginationInput) {
|
|
26
|
+
semListQueryRuns(queryId: $queryId, pagination: $pagination) {
|
|
27
|
+
items {
|
|
28
|
+
${f}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}`, _ = "query SemConsoleQueryRunResult($runId: ID!, $pagination: PaginationInput) {\n semQueryRunResult(runId: $runId, pagination: $pagination) {\n runId\n queryId\n columns {\n name\n entity\n field\n aggregation\n masked\n mask\n }\n rows\n rowCount\n totalRowCount\n truncated\n offset\n limit\n nextOffset\n expiresAt\n }\n}";
|
|
32
|
+
function v(t) {
|
|
33
|
+
let { apiGatewayUrl: r, workspaceId: a } = e();
|
|
34
|
+
return i({
|
|
35
|
+
queryKey: [
|
|
36
|
+
"semanticfed",
|
|
37
|
+
"savedQueries",
|
|
38
|
+
a ?? "no-workspace",
|
|
39
|
+
t
|
|
40
|
+
],
|
|
41
|
+
enabled: !!a,
|
|
42
|
+
queryFn: async () => (await n(p, {
|
|
43
|
+
modelId: t,
|
|
44
|
+
pagination: { limit: o }
|
|
45
|
+
}, r)).semListQueries.items.filter((e) => e.status !== "ARCHIVED")
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function y() {
|
|
49
|
+
let { apiGatewayUrl: t, workspaceId: i } = e(), o = a();
|
|
50
|
+
return r({
|
|
51
|
+
mutationFn: async (e) => (await n(m, { id: e }, t)).semRunQuery,
|
|
52
|
+
onSuccess: (e) => {
|
|
53
|
+
o.setQueryData([
|
|
54
|
+
"semanticfed",
|
|
55
|
+
"queryRun",
|
|
56
|
+
i ?? "no-workspace",
|
|
57
|
+
e.id
|
|
58
|
+
], e), o.invalidateQueries({ queryKey: [
|
|
59
|
+
"semanticfed",
|
|
60
|
+
"queryRuns",
|
|
61
|
+
i ?? "no-workspace",
|
|
62
|
+
e.queryId
|
|
63
|
+
] });
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function b(r) {
|
|
68
|
+
let { apiGatewayUrl: o, workspaceId: s } = e(), l = a();
|
|
69
|
+
return i({
|
|
70
|
+
queryKey: [
|
|
71
|
+
"semanticfed",
|
|
72
|
+
"queryRun",
|
|
73
|
+
s ?? "no-workspace",
|
|
74
|
+
r
|
|
75
|
+
],
|
|
76
|
+
enabled: !!(s && r),
|
|
77
|
+
staleTime: 0,
|
|
78
|
+
queryFn: async () => {
|
|
79
|
+
t();
|
|
80
|
+
let e = (await n(h, { id: r }, o)).semQueryRun;
|
|
81
|
+
return e && u(e.status) && l.invalidateQueries({ queryKey: [
|
|
82
|
+
"semanticfed",
|
|
83
|
+
"queryRuns",
|
|
84
|
+
s ?? "no-workspace",
|
|
85
|
+
e.queryId
|
|
86
|
+
] }), e;
|
|
87
|
+
},
|
|
88
|
+
refetchInterval: (e) => {
|
|
89
|
+
let t = e.state.data;
|
|
90
|
+
return t === null || t && (u(t.status) || d(t)) ? !1 : c;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function x(r) {
|
|
95
|
+
let { apiGatewayUrl: a, workspaceId: o } = e();
|
|
96
|
+
return i({
|
|
97
|
+
queryKey: [
|
|
98
|
+
"semanticfed",
|
|
99
|
+
"queryRuns",
|
|
100
|
+
o ?? "no-workspace",
|
|
101
|
+
r
|
|
102
|
+
],
|
|
103
|
+
enabled: !!(o && r),
|
|
104
|
+
staleTime: 0,
|
|
105
|
+
queryFn: async () => (t(), (await n(g, {
|
|
106
|
+
queryId: r,
|
|
107
|
+
pagination: { limit: s }
|
|
108
|
+
}, a)).semListQueryRuns.items)
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function S(t, r) {
|
|
112
|
+
let { apiGatewayUrl: a, workspaceId: o } = e();
|
|
113
|
+
return i({
|
|
114
|
+
queryKey: [
|
|
115
|
+
"semanticfed",
|
|
116
|
+
"queryRunResult",
|
|
117
|
+
o ?? "no-workspace",
|
|
118
|
+
t,
|
|
119
|
+
r
|
|
120
|
+
],
|
|
121
|
+
enabled: !!(o && t),
|
|
122
|
+
retry: !1,
|
|
123
|
+
queryFn: async () => (await n(_, {
|
|
124
|
+
runId: t,
|
|
125
|
+
pagination: {
|
|
126
|
+
limit: 100,
|
|
127
|
+
offset: r
|
|
128
|
+
}
|
|
129
|
+
}, a)).semQueryRunResult
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function C(e) {
|
|
133
|
+
return typeof e == "object" && e && !Array.isArray(e) ? e : null;
|
|
134
|
+
}
|
|
135
|
+
function w(e) {
|
|
136
|
+
return typeof e == "string" && e !== "" ? e : null;
|
|
137
|
+
}
|
|
138
|
+
function T(e) {
|
|
139
|
+
let t = C(C(e)?.governance);
|
|
140
|
+
if (!t) return null;
|
|
141
|
+
let n = t.outcome === "ALLOWED" ? "ALLOWED" : "DENIED", r = Array.isArray(t.decisions) ? t.decisions : [];
|
|
142
|
+
return {
|
|
143
|
+
outcome: n,
|
|
144
|
+
policiesEvaluated: typeof t.policiesEvaluated == "number" ? t.policiesEvaluated : 0,
|
|
145
|
+
reason: w(t.reason),
|
|
146
|
+
decisions: r.flatMap((e) => {
|
|
147
|
+
let t = C(e);
|
|
148
|
+
return !t || typeof t.action != "string" ? [] : [{
|
|
149
|
+
action: t.action,
|
|
150
|
+
entity: w(t.entity) ?? "",
|
|
151
|
+
field: w(t.field),
|
|
152
|
+
policyName: w(t.policyName),
|
|
153
|
+
mask: w(t.mask),
|
|
154
|
+
detail: w(t.detail)
|
|
155
|
+
}];
|
|
156
|
+
})
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
var E = new Set([
|
|
160
|
+
"ENTITY_DENIED",
|
|
161
|
+
"ROWS_BLOCKED",
|
|
162
|
+
"COLUMN_DENIED",
|
|
163
|
+
"EVALUATION_FAILED"
|
|
164
|
+
]);
|
|
165
|
+
function D(e) {
|
|
166
|
+
return e.decisions.filter((e) => E.has(e.action));
|
|
167
|
+
}
|
|
168
|
+
//#endregion
|
|
169
|
+
export { d as isRunPollExpired, u as isTerminalRunStatus, D as restrictiveDecisions, T as runGovernance, b as useSemQueryRun, S as useSemQueryRunResult, x as useSemQueryRuns, y as useSemRunSavedQuery, v as useSemSavedQueries };
|
|
170
|
+
|
|
171
|
+
//# sourceMappingURL=useQueryRuns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useQueryRuns.js","names":[],"sources":["../../../src/semanticfed/hooks/useQueryRuns.ts"],"sourcesContent":["/**\n * Saved-query run hooks (BOFF-9754), wired to the `wspace-semanticfed-svc`\n * query-run API:\n *\n * - `semListQueries` lists the workspace's saved federated queries.\n * - `semRunQuery` enqueues a run and returns it QUEUED; an async worker plans\n * and executes it, so `semQueryRun` is polled until the run is terminal\n * (SUCCEEDED / FAILED / CANCELLED).\n * - `semQueryRunResult` returns one page of the governed rows of a SUCCEEDED\n * run: columns in SELECT order with each column's access-policy mask, and\n * offset pagination through `nextOffset` (BOFF-9650).\n * - `semListQueryRuns` is the run history of a saved query, newest first.\n */\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { clearGraphqlReadCaches, semRequest } from '../api/semanticfedGraphql';\nimport { useSemanticFed } from '../providers/SemanticFedProvider';\n\nexport type SemQueryRunStatus =\n | 'QUEUED'\n | 'PLANNING'\n | 'RUNNING'\n | 'SUCCEEDED'\n | 'FAILED'\n | 'CANCELLED';\n\nexport type SemSavedQueryStatus = 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';\n\nexport interface SemSavedQuery {\n id: string;\n name: string;\n description: string | null;\n modelId: string | null;\n queryText: string;\n status: SemSavedQueryStatus;\n tags: string[];\n updatedAt: string;\n}\n\nexport interface SemQueryRun {\n id: string;\n queryId: string;\n status: SemQueryRunStatus;\n errorMessage: string | null;\n planSummary: unknown;\n rowCount: number | null;\n durationMs: number | null;\n sourcesTouched: number;\n fromCache: boolean;\n runById: string | null;\n createdAt: string;\n startedAt: string | null;\n finishedAt: string | null;\n}\n\nexport interface SemQueryRunResultColumn {\n name: string;\n entity: string;\n field: string;\n aggregation: string | null;\n masked: boolean;\n mask: string | null;\n}\n\nexport interface SemQueryRunResultPage {\n runId: string;\n queryId: string;\n columns: SemQueryRunResultColumn[];\n rows: Array<Record<string, unknown>>;\n rowCount: number;\n totalRowCount: number;\n truncated: boolean;\n offset: number;\n limit: number;\n nextOffset: number | null;\n expiresAt: string;\n}\n\n/** Rows per results page (the service allows up to 500). */\nexport const RUN_RESULT_PAGE_SIZE = 100;\n/** Saved queries offered in the picker (the picker is not paginated). */\nconst SAVED_QUERY_PICKER_LIMIT = 100;\n/** Runs shown in a saved query's history. */\nconst RUN_HISTORY_LIMIT = 20;\n/** How often an active run is polled. */\nexport const RUN_POLL_INTERVAL_MS = 1500;\n/**\n * How long after a run was created it is still polled automatically. A run\n * that is still not terminal by then (for example because the worker died\n * without marking it FAILED) is left for the user to re-check by hand.\n */\nexport const RUN_POLL_MAX_MS = 10 * 60 * 1000;\n\nconst TERMINAL_STATUSES: ReadonlySet<SemQueryRunStatus> = new Set([\n 'SUCCEEDED',\n 'FAILED',\n 'CANCELLED',\n]);\n\nexport function isTerminalRunStatus(status: SemQueryRunStatus): boolean {\n return TERMINAL_STATUSES.has(status);\n}\n\n/** True once a non-terminal run has been active longer than {@link RUN_POLL_MAX_MS}. */\nexport function isRunPollExpired(\n run: Pick<SemQueryRun, 'status' | 'createdAt'>,\n now: number = Date.now()\n): boolean {\n if (isTerminalRunStatus(run.status)) return false;\n const created = Date.parse(run.createdAt);\n return Number.isFinite(created) && now - created > RUN_POLL_MAX_MS;\n}\n\nconst RUN_FIELDS = `id\n queryId\n status\n errorMessage\n planSummary\n rowCount\n durationMs\n sourcesTouched\n fromCache\n runById\n createdAt\n startedAt\n finishedAt`;\n\nconst LIST_QUERIES_QUERY = `query SemConsoleSavedQueries($modelId: ID, $pagination: PaginationInput) {\n semListQueries(modelId: $modelId, pagination: $pagination) {\n items {\n id\n name\n description\n modelId\n queryText\n status\n tags\n updatedAt\n }\n }\n}`;\n\nconst RUN_QUERY_MUTATION = `mutation SemConsoleRunQuery($id: ID!) {\n semRunQuery(id: $id) {\n ${RUN_FIELDS}\n }\n}`;\n\nconst QUERY_RUN_QUERY = `query SemConsoleQueryRun($id: ID!) {\n semQueryRun(id: $id) {\n ${RUN_FIELDS}\n }\n}`;\n\nconst QUERY_RUNS_QUERY = `query SemConsoleQueryRuns($queryId: ID!, $pagination: PaginationInput) {\n semListQueryRuns(queryId: $queryId, pagination: $pagination) {\n items {\n ${RUN_FIELDS}\n }\n }\n}`;\n\nconst QUERY_RUN_RESULT_QUERY = `query SemConsoleQueryRunResult($runId: ID!, $pagination: PaginationInput) {\n semQueryRunResult(runId: $runId, pagination: $pagination) {\n runId\n queryId\n columns {\n name\n entity\n field\n aggregation\n masked\n mask\n }\n rows\n rowCount\n totalRowCount\n truncated\n offset\n limit\n nextOffset\n expiresAt\n }\n}`;\n\nexport function useSemSavedQueries(modelId: string | null) {\n const { apiGatewayUrl, workspaceId } = useSemanticFed();\n return useQuery({\n queryKey: ['semanticfed', 'savedQueries', workspaceId ?? 'no-workspace', modelId] as const,\n enabled: Boolean(workspaceId),\n queryFn: async () => {\n const data = await semRequest<{ semListQueries: { items: SemSavedQuery[] } }>(\n LIST_QUERIES_QUERY,\n { modelId, pagination: { limit: SAVED_QUERY_PICKER_LIMIT } },\n apiGatewayUrl\n );\n // Archived queries are deleted on the service and cannot be run.\n return data.semListQueries.items.filter((q) => q.status !== 'ARCHIVED');\n },\n });\n}\n\nexport function useSemRunSavedQuery() {\n const { apiGatewayUrl, workspaceId } = useSemanticFed();\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: async (queryId: string) => {\n const data = await semRequest<{ semRunQuery: SemQueryRun }>(\n RUN_QUERY_MUTATION,\n { id: queryId },\n apiGatewayUrl\n );\n return data.semRunQuery;\n },\n onSuccess: (run) => {\n queryClient.setQueryData(\n ['semanticfed', 'queryRun', workspaceId ?? 'no-workspace', run.id],\n run\n );\n void queryClient.invalidateQueries({\n queryKey: ['semanticfed', 'queryRuns', workspaceId ?? 'no-workspace', run.queryId],\n });\n },\n });\n}\n\n/**\n * One run, polled every {@link RUN_POLL_INTERVAL_MS} until it is terminal (or\n * for at most {@link RUN_POLL_MAX_MS}). Each poll clears the shell's\n * short-lived (15 s) read cache, which would otherwise replay the QUEUED\n * response for its whole TTL. That cache is keyed by operation and variables\n * with no per-entry eviction, so it is cleared as a whole; other reads on the\n * page are held by React Query, so clearing it does not trigger refetches.\n */\nexport function useSemQueryRun(runId: string | null) {\n const { apiGatewayUrl, workspaceId } = useSemanticFed();\n const queryClient = useQueryClient();\n return useQuery({\n queryKey: ['semanticfed', 'queryRun', workspaceId ?? 'no-workspace', runId] as const,\n enabled: Boolean(workspaceId && runId),\n staleTime: 0,\n queryFn: async () => {\n clearGraphqlReadCaches();\n const data = await semRequest<{ semQueryRun: SemQueryRun | null }>(\n QUERY_RUN_QUERY,\n { id: runId },\n apiGatewayUrl\n );\n const run = data.semQueryRun;\n if (run && isTerminalRunStatus(run.status)) {\n void queryClient.invalidateQueries({\n queryKey: ['semanticfed', 'queryRuns', workspaceId ?? 'no-workspace', run.queryId],\n });\n }\n return run;\n },\n refetchInterval: (query) => {\n const run = query.state.data;\n if (run === null) return false;\n if (run && (isTerminalRunStatus(run.status) || isRunPollExpired(run))) return false;\n return RUN_POLL_INTERVAL_MS;\n },\n });\n}\n\nexport function useSemQueryRuns(queryId: string | null) {\n const { apiGatewayUrl, workspaceId } = useSemanticFed();\n return useQuery({\n queryKey: ['semanticfed', 'queryRuns', workspaceId ?? 'no-workspace', queryId] as const,\n enabled: Boolean(workspaceId && queryId),\n staleTime: 0,\n queryFn: async () => {\n clearGraphqlReadCaches();\n const data = await semRequest<{ semListQueryRuns: { items: SemQueryRun[] } }>(\n QUERY_RUNS_QUERY,\n { queryId, pagination: { limit: RUN_HISTORY_LIMIT } },\n apiGatewayUrl\n );\n return data.semListQueryRuns.items;\n },\n });\n}\n\n/** One page of a SUCCEEDED run's governed rows; `runId` null keeps it idle. */\nexport function useSemQueryRunResult(runId: string | null, offset: number) {\n const { apiGatewayUrl, workspaceId } = useSemanticFed();\n return useQuery({\n queryKey: [\n 'semanticfed',\n 'queryRunResult',\n workspaceId ?? 'no-workspace',\n runId,\n offset,\n ] as const,\n enabled: Boolean(workspaceId && runId),\n retry: false,\n queryFn: async () => {\n const data = await semRequest<{ semQueryRunResult: SemQueryRunResultPage }>(\n QUERY_RUN_RESULT_QUERY,\n { runId, pagination: { limit: RUN_RESULT_PAGE_SIZE, offset } },\n apiGatewayUrl\n );\n return data.semQueryRunResult;\n },\n });\n}\n\n/** One access-policy decision recorded on `planSummary.governance`. */\nexport interface SemGovernanceDecision {\n action: string;\n entity: string;\n field: string | null;\n policyName: string | null;\n mask: string | null;\n detail: string | null;\n}\n\nexport interface SemRunGovernance {\n outcome: 'ALLOWED' | 'DENIED';\n policiesEvaluated: number;\n reason: string | null;\n decisions: SemGovernanceDecision[];\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> | null {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : null;\n}\n\nfunction optionalString(value: unknown): string | null {\n return typeof value === 'string' && value !== '' ? value : null;\n}\n\n/**\n * The access-policy record of a run (`planSummary.governance`), or null when\n * the run was not governed. `planSummary` is untyped JSON, so every field is\n * checked before use.\n */\nexport function runGovernance(planSummary: unknown): SemRunGovernance | null {\n const governance = asRecord(asRecord(planSummary)?.governance);\n if (!governance) return null;\n // Anything other than an explicit ALLOWED is shown as a denial, so an outcome\n // the console does not know yet can never hide a refusal.\n const outcome = governance.outcome === 'ALLOWED' ? 'ALLOWED' : 'DENIED';\n const decisions = Array.isArray(governance.decisions) ? governance.decisions : [];\n return {\n outcome,\n policiesEvaluated:\n typeof governance.policiesEvaluated === 'number' ? governance.policiesEvaluated : 0,\n reason: optionalString(governance.reason),\n decisions: decisions.flatMap((raw) => {\n const d = asRecord(raw);\n if (!d || typeof d.action !== 'string') return [];\n return [\n {\n action: d.action,\n entity: optionalString(d.entity) ?? '',\n field: optionalString(d.field),\n policyName: optionalString(d.policyName),\n mask: optionalString(d.mask),\n detail: optionalString(d.detail),\n },\n ];\n }),\n };\n}\n\n/** Decisions that removed or hid data, which a failed or partial run explains with. */\nconst RESTRICTIVE_ACTIONS: ReadonlySet<string> = new Set([\n 'ENTITY_DENIED',\n 'ROWS_BLOCKED',\n 'COLUMN_DENIED',\n 'EVALUATION_FAILED',\n]);\n\nexport function restrictiveDecisions(governance: SemRunGovernance): SemGovernanceDecision[] {\n return governance.decisions.filter((d) => RESTRICTIVE_ACTIONS.has(d.action));\n}\n"],"mappings":";;;AAiFA,IAAM,IAA2B,KAE3B,IAAoB,IAEb,IAAuB,MAQ9B,IAAoD,IAAI,IAAI;CAChE;CACA;CACA;CACD,CAAC;AAEF,SAAgB,EAAoB,GAAoC;AACtE,QAAO,EAAkB,IAAI,EAAO;;AAItC,SAAgB,EACd,GACA,IAAc,KAAK,KAAK,EACf;AACT,KAAI,EAAoB,EAAI,OAAO,CAAE,QAAO;CAC5C,IAAM,IAAU,KAAK,MAAM,EAAI,UAAU;AACzC,QAAO,OAAO,SAAS,EAAQ,IAAI,IAAM,IAAA;;AAG3C,IAAM,IAAa,8LAcb,IAAqB,8RAerB,IAAqB;;MAErB,EAAW;;IAIX,IAAkB;;MAElB,EAAW;;IAIX,IAAmB;;;QAGjB,EAAW;;;IAKb,IAAyB;AAuB/B,SAAgB,EAAmB,GAAwB;CACzD,IAAM,EAAE,kBAAe,mBAAgB,GAAgB;AACvD,QAAO,EAAS;EACd,UAAU;GAAC;GAAe;GAAgB,KAAe;GAAgB;GAAQ;EACjF,SAAS,EAAQ;EACjB,SAAS,aACM,MAAM,EACj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