@manta-eu/react 0.2.1 → 0.3.0
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/components/datastore-management/tree.d.ts +1 -1
- package/dist/components/datastore-management/tree.d.ts.map +1 -1
- package/dist/components/datastore-management/tree.js +5 -5
- package/dist/components/datastore-management/tree.js.map +1 -1
- package/dist/components/explain-fact/ExplainFact.js +3 -3
- package/dist/components/explain-fact/ExplainFact.js.map +1 -1
- package/dist/components/planning/plan-detail-utils.d.ts.map +1 -1
- package/dist/components/planning/plan-detail-utils.js +2 -0
- package/dist/components/planning/plan-detail-utils.js.map +1 -1
- package/dist/components/tool-invocation-card/ListRulesResultDisplay.d.ts +2 -2
- package/dist/components/tool-invocation-card/ListRulesResultDisplay.d.ts.map +1 -1
- package/dist/components/tool-invocation-card/ToolOutputRenderer.d.ts.map +1 -1
- package/dist/components/tool-invocation-card/ToolOutputRenderer.js +7 -4
- package/dist/components/tool-invocation-card/ToolOutputRenderer.js.map +1 -1
- package/dist/components/tool-invocation-card/types.d.ts +5 -5
- package/dist/components/tool-invocation-card/types.d.ts.map +1 -1
- package/dist/components/tool-invocation-card/types.js +5 -5
- package/dist/components/tool-invocation-card/types.js.map +1 -1
- package/dist/explain-fact/rule-presentation.js +2 -2
- package/dist/explain-fact/rule-presentation.js.map +1 -1
- package/dist/explain-fact/tree-model.js +2 -2
- package/dist/explain-fact/tree-model.js.map +1 -1
- package/dist/hooks/use-connection-problems.d.ts.map +1 -1
- package/dist/hooks/useValidateActionPlan.d.ts.map +1 -1
- package/dist/lib/find-latest-staged-rule.js +1 -1
- package/dist/lib/find-latest-staged-rule.js.map +1 -1
- package/dist/lib/tool-icons.js +6 -6
- package/dist/lib/tool-icons.js.map +1 -1
- package/dist/lib/tool-names.d.ts.map +1 -1
- package/dist/lib/tool-names.js +0 -1
- package/dist/lib/tool-names.js.map +1 -1
- package/dist/ontology/skolem.js +2 -2
- package/dist/ontology/skolem.js.map +1 -1
- package/dist/providers/KnowledgeGraphStateProvider.js +1 -1
- package/dist/providers/KnowledgeGraphStateProvider.js.map +1 -1
- package/dist/routes/data-explorer/class-properties.js +2 -2
- package/dist/routes/data-explorer/class-properties.js.map +1 -1
- package/dist/routes/data-explorer/classes.js +2 -2
- package/dist/routes/data-explorer/classes.js.map +1 -1
- package/dist/routes/data-explorer/recents.js +1 -1
- package/dist/routes/data-explorer/recents.js.map +1 -1
- package/dist/routes/data-explorer/shapes.js +2 -2
- package/dist/routes/data-explorer/shapes.js.map +1 -1
- package/dist/routes/integrations/components/connect-forms/CanvaConnectForm.d.ts +3 -0
- package/dist/routes/integrations/components/connect-forms/CanvaConnectForm.d.ts.map +1 -0
- package/dist/routes/integrations/components/connect-forms/CanvaConnectForm.js +12 -0
- package/dist/routes/integrations/components/connect-forms/CanvaConnectForm.js.map +1 -0
- package/dist/routes/integrations/connect-forms.d.ts +1 -0
- package/dist/routes/integrations/connect-forms.d.ts.map +1 -1
- package/dist/routes/integrations/connect-forms.js +1 -0
- package/dist/routes/integrations/connect-forms.js.map +1 -1
- package/dist/routes/integrations/connection-view.d.ts.map +1 -1
- package/dist/routes/integrations/connection-view.js +1 -0
- package/dist/routes/integrations/connection-view.js.map +1 -1
- package/dist/routes/integrations/types.d.ts +2 -1
- package/dist/routes/integrations/types.d.ts.map +1 -1
- package/dist/routes/integrations/types.js +1 -0
- package/dist/routes/integrations/types.js.map +1 -1
- package/dist/routes/rules/hooks/useRuleFactsPreview.js +4 -4
- package/dist/routes/rules/hooks/useRuleFactsPreview.js.map +1 -1
- package/dist/shacl/form-appearance.d.ts +1 -1
- package/dist/shacl/form-appearance.d.ts.map +1 -1
- package/dist/shacl/form-appearance.js +1 -1
- package/dist/shacl/form-appearance.js.map +1 -1
- package/dist/shared/graph-derived-queries.js +2 -2
- package/dist/shared/graph-derived-queries.js.map +1 -1
- package/package.json +7 -7
- package/src/components/datastore-management/tree.ts +5 -5
- package/src/components/explain-fact/ExplainFact.tsx +3 -3
- package/src/components/planning/plan-detail-utils.tsx +2 -0
- package/src/components/tool-invocation-card/ListRulesResultDisplay.tsx +2 -2
- package/src/components/tool-invocation-card/ToolOutputRenderer.tsx +10 -8
- package/src/components/tool-invocation-card/types.ts +8 -8
- package/src/explain-fact/rule-presentation.ts +2 -2
- package/src/explain-fact/tree-model.ts +2 -2
- package/src/lib/find-latest-staged-rule.ts +1 -1
- package/src/lib/tool-icons.ts +6 -6
- package/src/lib/tool-names.ts +0 -1
- package/src/ontology/skolem.ts +2 -2
- package/src/providers/KnowledgeGraphStateProvider.tsx +1 -1
- package/src/routes/data-explorer/class-properties.ts +2 -2
- package/src/routes/data-explorer/classes.ts +2 -2
- package/src/routes/data-explorer/recents.ts +1 -1
- package/src/routes/data-explorer/shapes.ts +2 -2
- package/src/routes/datastores/flatten.ts +1 -1
- package/src/routes/integrations/components/connect-forms/CanvaConnectForm.tsx +26 -0
- package/src/routes/integrations/connect-forms.ts +1 -0
- package/src/routes/integrations/connection-view.ts +1 -0
- package/src/routes/integrations/types.ts +2 -0
- package/src/routes/rules/hooks/useRuleFactsPreview.ts +4 -4
- package/src/shacl/form-appearance.ts +1 -1
- package/src/shared/graph-derived-queries.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-appearance.js","sourceRoot":"","sources":["../../src/shacl/form-appearance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,qHAAqH;AACrH,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmHpB,CAAC;AAEF,IAAI,SAAS,GAAyB,IAAI,CAAC;AAE3C,qHAAqH;AACrH,MAAM,UAAU,eAAe,CA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C,UAAU,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useActionPlanByIriQuery, useActionPlanDiffQuery, useActionPlanRulesQuery, useActionPlanRunHistoryQuery, useActionPlanSamplesQuery, useActionPlansQuery, useConversationStartersQuery, useCoverageRulesQuery, useCurrentFactValueQuery,
|
|
1
|
+
import { useActionPlanByIriQuery, useActionPlanDiffQuery, useActionPlanRulesQuery, useActionPlanRunHistoryQuery, useActionPlanSamplesQuery, useActionPlansQuery, useConversationStartersQuery, useCoverageRulesQuery, useCurrentFactValueQuery, useExplainFactQuery, useGetActionPlansSummaryQuery, useMemoriesQuery, useMemorySchemasQuery, useNodePropertiesQuery, useNodeRelationshipsQuery, useRulesQuery, useShaclShapesQuery, useSparqlQueryQuery, useUserPreferencesQuery, useValidateActionPlanQuery, } from "@manta-eu/client";
|
|
2
2
|
import { invalidateQueries } from "#lib/tanstack-query";
|
|
3
3
|
// Queries whose resolver reads the active datastore's knowledge graph, so any graph write can change them.
|
|
4
4
|
export const graphDerivedQueries = [
|
|
@@ -11,7 +11,7 @@ export const graphDerivedQueries = [
|
|
|
11
11
|
useConversationStartersQuery,
|
|
12
12
|
useCoverageRulesQuery,
|
|
13
13
|
useCurrentFactValueQuery,
|
|
14
|
-
|
|
14
|
+
useExplainFactQuery,
|
|
15
15
|
useGetActionPlansSummaryQuery,
|
|
16
16
|
useMemoriesQuery,
|
|
17
17
|
useMemorySchemasQuery,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-derived-queries.js","sourceRoot":"","sources":["../../src/shared/graph-derived-queries.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,mBAAmB,EACnB,4BAA4B,EAC5B,qBAAqB,EACrB,wBAAwB,EACxB,
|
|
1
|
+
{"version":3,"file":"graph-derived-queries.js","sourceRoot":"","sources":["../../src/shared/graph-derived-queries.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,mBAAmB,EACnB,4BAA4B,EAC5B,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,6BAA6B,EAC7B,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAwB,MAAM,qBAAqB,CAAC;AAE9E,2GAA2G;AAC3G,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IACpD,uBAAuB;IACvB,sBAAsB;IACtB,uBAAuB;IACvB,4BAA4B;IAC5B,yBAAyB;IACzB,mBAAmB;IACnB,4BAA4B;IAC5B,qBAAqB;IACrB,wBAAwB;IACxB,mBAAmB;IACnB,6BAA6B;IAC7B,gBAAgB;IAChB,qBAAqB;IACrB,sBAAsB;IACtB,yBAAyB;IACzB,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,uBAAuB;IACvB,0BAA0B;CAC3B,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,6BAA6B,CAAC,WAAwB;IAC1E,MAAM,iBAAiB,CAAC,WAAW,EAAE,CAAC,GAAG,mBAAmB,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;AACpG,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manta-eu/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "The Manta design system, knowledge-graph UI and agent components",
|
|
5
5
|
"homepage": "https://developers.manta.eu",
|
|
6
6
|
"keywords": [
|
|
@@ -1134,12 +1134,12 @@
|
|
|
1134
1134
|
"usehooks-ts": "^3.1.1",
|
|
1135
1135
|
"zod": "^4.5.0",
|
|
1136
1136
|
"zustand": "^5.0.2",
|
|
1137
|
-
"@manta-eu/
|
|
1138
|
-
"@manta-eu/
|
|
1139
|
-
"@manta-eu/lib": "0.
|
|
1140
|
-
"@manta-eu/ldo": "0.
|
|
1141
|
-
"@manta-eu/
|
|
1142
|
-
"@manta-eu/
|
|
1137
|
+
"@manta-eu/auth": "0.3.0",
|
|
1138
|
+
"@manta-eu/datalog-parser": "0.3.0",
|
|
1139
|
+
"@manta-eu/lib": "0.3.0",
|
|
1140
|
+
"@manta-eu/ldo": "0.3.0",
|
|
1141
|
+
"@manta-eu/client": "0.3.0",
|
|
1142
|
+
"@manta-eu/rdf-lib": "0.3.0"
|
|
1143
1143
|
},
|
|
1144
1144
|
"peerDependencies": {
|
|
1145
1145
|
"@ulb-darmstadt/shacl-form": "^2.1.1-rc1",
|
|
@@ -11,17 +11,17 @@ export function collectDatastoreIds(nodes: DatastoreNodeLike[]): string[] {
|
|
|
11
11
|
return nodes.flatMap((node) => (isPresent(node.datastoreId) && !node.removed ? [node.datastoreId] : []));
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export function
|
|
14
|
+
export function hasDatastoreShell(status?: DatastoreStatus): boolean {
|
|
15
15
|
return isPresent(status) && status.known && !status.offline && status.exists && !status.materialized;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
// KGC's sensor creates the
|
|
18
|
+
// KGC's sensor creates the datastore once registered (wiki/kgc.md).
|
|
19
19
|
export function isAwaitingDatastore(status?: DatastoreStatus): boolean {
|
|
20
20
|
return isPresent(status) && status.known && !status.offline && !status.exists;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export function isMaterializing(status?: DatastoreStatus): boolean {
|
|
24
|
-
return
|
|
24
|
+
return hasDatastoreShell(status) || isAwaitingDatastore(status);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export type DatastoreStatusCategory =
|
|
@@ -62,10 +62,10 @@ export function datastoreStatusCategory(
|
|
|
62
62
|
({ status }) => !!status?.ready,
|
|
63
63
|
() => "ready" as const,
|
|
64
64
|
)
|
|
65
|
-
// A pre-existing
|
|
65
|
+
// A pre-existing datastore shell means this was registered before, so it's still `materializing`,
|
|
66
66
|
// not `notRegistered`.
|
|
67
67
|
.when(
|
|
68
|
-
({ status }) => status?.registered === false && !
|
|
68
|
+
({ status }) => status?.registered === false && !hasDatastoreShell(status),
|
|
69
69
|
() => "notRegistered" as const,
|
|
70
70
|
)
|
|
71
71
|
.otherwise(() => "materializing" as const)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useExplainFactQuery } from "@manta-eu/client";
|
|
2
2
|
import { ChevronRight } from "lucide-react";
|
|
3
3
|
import { useMemo, useState } from "react";
|
|
4
4
|
import { Link } from "react-router";
|
|
@@ -50,7 +50,7 @@ function ExplainFactFromFetch(props: ExplainFactBaseProps) {
|
|
|
50
50
|
|
|
51
51
|
const { mantaClient } = useMantaClient();
|
|
52
52
|
|
|
53
|
-
const queryResult =
|
|
53
|
+
const queryResult = useExplainFactQuery(mantaClient, {
|
|
54
54
|
subject,
|
|
55
55
|
predicate,
|
|
56
56
|
object,
|
|
@@ -68,7 +68,7 @@ function ExplainFactFromFetch(props: ExplainFactBaseProps) {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
const error = queryResult.error;
|
|
71
|
-
const response = queryResult.data?.
|
|
71
|
+
const response = queryResult.data?.explainFact;
|
|
72
72
|
|
|
73
73
|
if (error || response?.error) {
|
|
74
74
|
const detail = error instanceof Error ? error.message : (response?.error ?? undefined);
|
|
@@ -108,6 +108,7 @@ export function formatIntegration(integration: GQLIntegration | null): string {
|
|
|
108
108
|
.with(GQLIntegration.Slack, () => "Slack")
|
|
109
109
|
.with(GQLIntegration.Figma, () => "Figma")
|
|
110
110
|
.with(GQLIntegration.Dash, () => "Dash")
|
|
111
|
+
.with(GQLIntegration.Canva, () => "Canva")
|
|
111
112
|
.exhaustive();
|
|
112
113
|
}
|
|
113
114
|
|
|
@@ -123,6 +124,7 @@ export function integrationToChannel(integration: GQLIntegration): Channel | nul
|
|
|
123
124
|
[GQLIntegration.Slack]: null,
|
|
124
125
|
[GQLIntegration.Figma]: null,
|
|
125
126
|
[GQLIntegration.Dash]: null,
|
|
127
|
+
[GQLIntegration.Canva]: null,
|
|
126
128
|
} as const satisfies Record<GQLIntegration, Channel | null>;
|
|
127
129
|
|
|
128
130
|
return integrationChannelMap[integration];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GetRulesToolResult } from "./types";
|
|
2
2
|
|
|
3
3
|
type ListRulesResultDisplayProps = {
|
|
4
|
-
result:
|
|
4
|
+
result: GetRulesToolResult;
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export function ListRulesResultDisplay(_props: ListRulesResultDisplayProps) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { withDatastoreQueryParam } from "@manta-eu/client/shared/datastore-path";
|
|
1
2
|
import { isShowEntitiesResult } from "@manta-eu/client/shared/tools";
|
|
2
3
|
import {
|
|
3
4
|
isWorkspaceArtifactInlineMediaType,
|
|
@@ -17,7 +18,7 @@ import type {
|
|
|
17
18
|
ChartToolResult,
|
|
18
19
|
ErrorToolResult,
|
|
19
20
|
ExplainFactToolResult,
|
|
20
|
-
|
|
21
|
+
GetRulesToolResult,
|
|
21
22
|
ManageRulesResult,
|
|
22
23
|
ShowcaseToolResult,
|
|
23
24
|
ShowEntitiesToolResult,
|
|
@@ -26,8 +27,8 @@ import type {
|
|
|
26
27
|
import {
|
|
27
28
|
isChartToolResult,
|
|
28
29
|
isErrorToolResult,
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
isExplainFactToolResult,
|
|
31
|
+
isGetRulesToolResult,
|
|
31
32
|
isManageRulesResult,
|
|
32
33
|
isShowcaseToolResult,
|
|
33
34
|
isWorkspaceArtifactResult,
|
|
@@ -45,6 +46,7 @@ import {
|
|
|
45
46
|
import { decodeChartEntities } from "#lib/decode-chart-entities";
|
|
46
47
|
import { cn } from "#lib/utils";
|
|
47
48
|
import { useChatManagerConnection } from "#providers/ChatManagerProvider";
|
|
49
|
+
import { useMantaClient } from "#providers/MantaClientProvider";
|
|
48
50
|
|
|
49
51
|
type ErrorResultDisplayProps = {
|
|
50
52
|
result: ErrorToolResult;
|
|
@@ -126,11 +128,13 @@ type WorkspaceArtifactResultDisplayProps = {
|
|
|
126
128
|
function WorkspaceArtifactResultDisplay(props: WorkspaceArtifactResultDisplayProps) {
|
|
127
129
|
const { result } = props;
|
|
128
130
|
|
|
131
|
+
const { datastoreId } = useMantaClient();
|
|
132
|
+
|
|
129
133
|
return (
|
|
130
134
|
<FileMessagePart
|
|
131
135
|
part={{
|
|
132
136
|
type: "file",
|
|
133
|
-
url: result.url,
|
|
137
|
+
url: withDatastoreQueryParam(result.url, datastoreId),
|
|
134
138
|
mediaType: result.mediaType,
|
|
135
139
|
filename: result.filename,
|
|
136
140
|
}}
|
|
@@ -151,10 +155,8 @@ export function ToolOutputRenderer(props: ToolOutputRendererProps) {
|
|
|
151
155
|
.when(isErrorToolResult, (errorResult: ErrorToolResult) => <ErrorResultDisplay result={errorResult} />)
|
|
152
156
|
.when(isChartToolResult, (chartResult: ChartToolResult) => <ChartResultDisplay result={chartResult} />)
|
|
153
157
|
.when(isManageRulesResult, (rulesResult: ManageRulesResult) => <ManageRulesResultDisplay result={rulesResult} />)
|
|
154
|
-
.when(
|
|
155
|
-
|
|
156
|
-
))
|
|
157
|
-
.when(isExplainRDFoxRulesResult, (explainResult: ExplainFactToolResult) => (
|
|
158
|
+
.when(isGetRulesToolResult, (rulesResult: GetRulesToolResult) => <ListRulesResultDisplay result={rulesResult} />)
|
|
159
|
+
.when(isExplainFactToolResult, (explainResult: ExplainFactToolResult) => (
|
|
158
160
|
<ExplainFactResultDisplay result={explainResult} toolUIPart={toolUIPart} />
|
|
159
161
|
))
|
|
160
162
|
.when(isShowcaseToolResult, (showcaseResult: ShowcaseToolResult) => (
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
type ActionPlanShowcaseOutput,
|
|
4
4
|
type ShowEntitiesOutput,
|
|
5
5
|
} from "@manta-eu/client/shared/tools";
|
|
6
|
-
import type {
|
|
6
|
+
import type { GetRulesOutputSuccess } from "@manta-eu/client/shared/tools/types";
|
|
7
7
|
import { workspaceArtifactSchema, type WorkspaceArtifact } from "@manta-eu/client/shared/workspace-artifacts";
|
|
8
8
|
import { isJsonLdDocument } from "@manta-eu/client/types/jsonld";
|
|
9
9
|
import type { DatalogRule, InferenceVerificationResult } from "@manta-eu/datalog-parser";
|
|
@@ -45,7 +45,7 @@ export type StagedManageRulesResult = ManageRulesResult & {
|
|
|
45
45
|
|
|
46
46
|
export type ShowcaseToolResult = Extract<ActionPlanShowcaseOutput, { planIri: string }>;
|
|
47
47
|
export type ShowEntitiesToolResult = Extract<ShowEntitiesOutput, { entityIris: string[] }>;
|
|
48
|
-
export type
|
|
48
|
+
export type GetRulesToolResult = GetRulesOutputSuccess;
|
|
49
49
|
export type ExplainFactToolResult = ExplainFactOutput;
|
|
50
50
|
|
|
51
51
|
export type ToolResult =
|
|
@@ -54,7 +54,7 @@ export type ToolResult =
|
|
|
54
54
|
| ManageRulesResult
|
|
55
55
|
| ShowcaseToolResult
|
|
56
56
|
| ShowEntitiesToolResult
|
|
57
|
-
|
|
|
57
|
+
| GetRulesToolResult
|
|
58
58
|
| ExplainFactToolResult
|
|
59
59
|
| WorkspaceArtifact
|
|
60
60
|
| { content: Array<{ type: string; text: string }> }
|
|
@@ -95,11 +95,11 @@ export function isShowcaseToolResult(result: unknown): result is ShowcaseToolRes
|
|
|
95
95
|
return isObjectWithProps(result, ["planIri"]);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
export function
|
|
98
|
+
export function isGetRulesToolResult(result: unknown): result is GetRulesOutputSuccess {
|
|
99
99
|
return isObjectWithProps(result, ["rules"]) && Array.isArray(result.rules);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
export function
|
|
102
|
+
export function isExplainFactToolResult(result: unknown): result is ExplainFactToolResult {
|
|
103
103
|
if (typeof result !== "object" || result === null || Array.isArray(result)) return false;
|
|
104
104
|
if ("is_error" in result || "rules" in result || "type" in result) return false;
|
|
105
105
|
|
|
@@ -120,8 +120,8 @@ export function hasVisualOutput(output: unknown): boolean {
|
|
|
120
120
|
isManageRulesResult(output) ||
|
|
121
121
|
isShowcaseToolResult(output) ||
|
|
122
122
|
isShowEntitiesResult(output) ||
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
isGetRulesToolResult(output) ||
|
|
124
|
+
isExplainFactToolResult(output) ||
|
|
125
125
|
isWorkspaceArtifactResult(output))
|
|
126
126
|
);
|
|
127
127
|
}
|
|
@@ -129,7 +129,7 @@ export function hasVisualOutput(output: unknown): boolean {
|
|
|
129
129
|
export function hasInlineVisualOutput(output: unknown): boolean {
|
|
130
130
|
return (
|
|
131
131
|
isChartToolResult(output) ||
|
|
132
|
-
|
|
132
|
+
isExplainFactToolResult(output) ||
|
|
133
133
|
isShowEntitiesResult(output) ||
|
|
134
134
|
isWorkspaceArtifactResult(output)
|
|
135
135
|
);
|
|
@@ -362,7 +362,7 @@ function ruleNameTermFromHeadText(headText: string): string {
|
|
|
362
362
|
return predicate.trim();
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
// Explain payloads echo
|
|
365
|
+
// Explain payloads echo rules as the datastore serializes them (bare ON, atom-free aggregates),
|
|
366
366
|
// so authored text falls through to the expanded grammar when the strict parse fails.
|
|
367
367
|
function explainRuleAst(rule: string): DatalogRule | undefined {
|
|
368
368
|
return parseDatalogRuleCached(rule).ast ?? parseGroundedDatalogRuleCached(rule).ast ?? undefined;
|
|
@@ -415,7 +415,7 @@ function collectFormulaBindings(
|
|
|
415
415
|
.with({ type: "aggregate" }, (aggregate) => {
|
|
416
416
|
if (groundedFormula?.type !== "aggregate") return;
|
|
417
417
|
|
|
418
|
-
// AS targets first, then the aggregate's inner atoms —
|
|
418
|
+
// AS targets first, then the aggregate's inner atoms — the datastore grounds those too
|
|
419
419
|
// (e.g. `:clicks[?c, ?x]` → `:clicks[:C_1, 10]`), and first-wins keeps a head binding.
|
|
420
420
|
if (groundedFormula.bindings?.length === aggregate.bindings?.length) {
|
|
421
421
|
aggregate.bindings?.forEach((binding, index) => {
|
|
@@ -380,7 +380,7 @@ function flattenFacts(output: ExplainFactOutput): FactEntry[] {
|
|
|
380
380
|
const values = Array.isArray(value) ? value : [value];
|
|
381
381
|
|
|
382
382
|
return values.flatMap((fact, index) => {
|
|
383
|
-
if (!
|
|
383
|
+
if (!isExplainedFact(fact)) return [];
|
|
384
384
|
|
|
385
385
|
return [
|
|
386
386
|
{
|
|
@@ -393,7 +393,7 @@ function flattenFacts(output: ExplainFactOutput): FactEntry[] {
|
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
function
|
|
396
|
+
function isExplainedFact(value: unknown): value is ExplainedFact {
|
|
397
397
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
398
398
|
}
|
|
399
399
|
|
|
@@ -3,5 +3,5 @@ import { isStagedManageRulesResult } from "../components/tool-invocation-card/ty
|
|
|
3
3
|
import { findLatestToolOutput } from "./find-latest-tool-output";
|
|
4
4
|
|
|
5
5
|
export function findLatestStagedRuleIri(messages: ChatUIMessage[]): string | null {
|
|
6
|
-
return findLatestToolOutput(messages, "tool-
|
|
6
|
+
return findLatestToolOutput(messages, "tool-manageRules", isStagedManageRulesResult)?.ruleIri ?? null;
|
|
7
7
|
}
|
package/src/lib/tool-icons.ts
CHANGED
|
@@ -27,12 +27,12 @@ import {
|
|
|
27
27
|
import { match } from "ts-pattern";
|
|
28
28
|
|
|
29
29
|
const toolIconMap: Record<ToolName, LucideIcon> = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
queryKnowledgeGraph: Database,
|
|
31
|
+
addFacts: Database,
|
|
32
|
+
manageFacts: Database,
|
|
33
|
+
getRules: Brain,
|
|
34
|
+
explainFact: Brain,
|
|
35
|
+
manageRules: Brain,
|
|
36
36
|
generateChart: TrendingUp,
|
|
37
37
|
scheduleTask: Clock,
|
|
38
38
|
listScheduledTasks: Clock,
|
package/src/lib/tool-names.ts
CHANGED
package/src/ontology/skolem.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type SkolemPart = { type: "iri"; value: string } | { type: "literal"; val
|
|
|
5
5
|
const blankNodePrefixes = ["_:", "_."];
|
|
6
6
|
const segmentTagLength = 2;
|
|
7
7
|
|
|
8
|
-
//
|
|
8
|
+
// The datastore datatype tags: "02" = IRI, "05" = string; other datatypes are binary-encoded.
|
|
9
9
|
const segmentTypeByTag: Record<string, SkolemPart["type"]> = {
|
|
10
10
|
"02": "iri",
|
|
11
11
|
"05": "literal",
|
|
@@ -29,7 +29,7 @@ function decodeSegment(segment: string): string | undefined {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
//
|
|
32
|
+
// The datastore skolem labels: dot-separated base64 segments, each prefixed with a 2-char type tag.
|
|
33
33
|
export function decodeSkolem(term: string): SkolemPart[] | undefined {
|
|
34
34
|
const prefix = blankNodePrefixes.find((candidate) => term.startsWith(candidate));
|
|
35
35
|
|
|
@@ -135,7 +135,7 @@ export function KnowledgeGraphStateProvider(props: KnowledgeGraphStateProviderPr
|
|
|
135
135
|
|
|
136
136
|
if (currentDataVersion && isPresent(previousDataVersion) && previousDataVersion !== currentDataVersion) {
|
|
137
137
|
void invalidateGraphDerivedQueries(queryClient);
|
|
138
|
-
console.debug("Knowledge graph dataVersion changed, invalidating
|
|
138
|
+
console.debug("Knowledge graph dataVersion changed, invalidating the knowledge graph queries");
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
if (currentDataVersion && currentDataVersion !== previousDataVersion) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ontologyGraphIri,
|
|
1
|
+
import { ontologyGraphIri, shaclGraph } from "@manta-eu/client/shared/rdf-namespaces";
|
|
2
2
|
import { isPresent } from "@manta-eu/lib/present";
|
|
3
3
|
import { DataFactory } from "ldkit/rdf";
|
|
4
4
|
import { SELECT } from "ldkit/sparql";
|
|
@@ -32,7 +32,7 @@ function classPropertiesQuery(classIri: string): string {
|
|
|
32
32
|
|
|
33
33
|
function shapeConstraintsQuery(classIri: string): string {
|
|
34
34
|
return `${prefixes}${SELECT`?path ?minCount ?allowedValue`.WHERE`
|
|
35
|
-
VALUES ?shapeGraph { ${df.namedNode(ontologyGraphIri)} ${df.namedNode(
|
|
35
|
+
VALUES ?shapeGraph { ${df.namedNode(ontologyGraphIri)} ${df.namedNode(shaclGraph)} }
|
|
36
36
|
GRAPH ?shapeGraph {
|
|
37
37
|
?shape sh:targetClass ${df.namedNode(safeIri(classIri))} ; sh:property ?propertyShape .
|
|
38
38
|
?propertyShape sh:path ?path .
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ontologyGraphIri,
|
|
1
|
+
import { ontologyGraphIri, shaclGraph } from "@manta-eu/client/shared/rdf-namespaces";
|
|
2
2
|
import { isPresent } from "@manta-eu/lib/present";
|
|
3
3
|
import { DataFactory, type RDF } from "ldkit/rdf";
|
|
4
4
|
import { SELECT } from "ldkit/sparql";
|
|
@@ -33,7 +33,7 @@ const classesQuery = `${prefixes}${SELECT.DISTINCT`?class ?label ?comment`.WHERE
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
UNION {
|
|
36
|
-
GRAPH ${df.namedNode(
|
|
36
|
+
GRAPH ${df.namedNode(shaclGraph)} { ?shapeInShaclGraph sh:targetClass ?class }
|
|
37
37
|
}
|
|
38
38
|
OPTIONAL { GRAPH ${df.namedNode(ontologyGraphIri)} { ?class rdfs:label ?label } }
|
|
39
39
|
OPTIONAL { GRAPH ${df.namedNode(ontologyGraphIri)} { ?class rdfs:comment ?comment } }
|
|
@@ -19,7 +19,7 @@ const df = new DataFactory();
|
|
|
19
19
|
|
|
20
20
|
export const recentTypesLimit = 10;
|
|
21
21
|
|
|
22
|
-
// STR() ordering because sources mix xsd:date and xsd:dateTime, which
|
|
22
|
+
// STR() ordering because sources mix xsd:date and xsd:dateTime, which the datastore will not compare as temporals
|
|
23
23
|
const recentlyModifiedTypesSubquery = SELECT`?type (MAX(STR(?modified)) AS ?lastModified)`.WHERE`
|
|
24
24
|
?dated schema:dateModified ?modified .
|
|
25
25
|
?dated a ?type .
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ontologyGraphIri,
|
|
1
|
+
import { ontologyGraphIri, shaclGraph } from "@manta-eu/client/shared/rdf-namespaces";
|
|
2
2
|
import { isPresent } from "@manta-eu/lib/present";
|
|
3
3
|
import { DataFactory, type RDF } from "ldkit/rdf";
|
|
4
4
|
import { SELECT } from "ldkit/sparql";
|
|
@@ -62,7 +62,7 @@ export function groupShapeConstraints(rows: ShapeConstraintRow[]): ClassShape[]
|
|
|
62
62
|
|
|
63
63
|
function shapeDetailsQuery(classIri: string): string {
|
|
64
64
|
return `${prefixes}${SELECT.DISTINCT`?shape ?path ?constraint ?value ?listValue`.WHERE`
|
|
65
|
-
VALUES ?shapeGraph { ${df.namedNode(ontologyGraphIri)} ${df.namedNode(
|
|
65
|
+
VALUES ?shapeGraph { ${df.namedNode(ontologyGraphIri)} ${df.namedNode(shaclGraph)} }
|
|
66
66
|
GRAPH ?shapeGraph {
|
|
67
67
|
?shape sh:targetClass ${df.namedNode(safeIri(classIri))} ; sh:property ?propertyShape .
|
|
68
68
|
?propertyShape sh:path ?path ; ?constraint ?value .
|
|
@@ -22,7 +22,7 @@ export type DatastoreRow = {
|
|
|
22
22
|
// Org roots carry their own datastore but are also the container the rest hang off.
|
|
23
23
|
isOrganization: boolean;
|
|
24
24
|
mirrored?: boolean;
|
|
25
|
-
// Real in
|
|
25
|
+
// Real in the datastore, but no Keycloak node behind it, so it can only be selected.
|
|
26
26
|
isRealmDefault?: boolean;
|
|
27
27
|
isUnlinked?: boolean;
|
|
28
28
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { GQLIntegration } from "@manta-eu/client";
|
|
2
|
+
import { OAuthSingleAccountConnectForm } from "./OAuthSingleAccountConnectForm";
|
|
3
|
+
import type { ConnectFormProps } from "./types";
|
|
4
|
+
|
|
5
|
+
const canvaPermissions = [
|
|
6
|
+
"Read your designs, the folders they live in, and your uploaded assets.",
|
|
7
|
+
"Export your designs so their pages can be analyzed.",
|
|
8
|
+
"Read your brand templates and the comments on your designs.",
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
export function CanvaConnectForm(props: ConnectFormProps) {
|
|
12
|
+
return (
|
|
13
|
+
<OAuthSingleAccountConnectForm
|
|
14
|
+
{...props}
|
|
15
|
+
integration={GQLIntegration.Canva}
|
|
16
|
+
startHref="/oauth/canva/start"
|
|
17
|
+
ctaLabel="Continue with Canva"
|
|
18
|
+
stepTitle="Connect your Canva account"
|
|
19
|
+
stepDescription="Manta will take you to Canva to ask for permission, then bring you back here."
|
|
20
|
+
supportingInfo="You'll be taken to Canva to approve access. You can revoke it any time from your Canva account settings."
|
|
21
|
+
permissions={canvaPermissions}
|
|
22
|
+
waitingLabel="Waiting for you to finish connecting to Canva…"
|
|
23
|
+
connectedToastLabel="Canva connected"
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -6,6 +6,7 @@ export {
|
|
|
6
6
|
type StoredConnection,
|
|
7
7
|
} from "./components/connect-forms/DataConnectionConnectForm";
|
|
8
8
|
export type { DataConnectionSetting, StoredDataConnection } from "./components/connect-forms/data-connection-fields";
|
|
9
|
+
export { CanvaConnectForm } from "./components/connect-forms/CanvaConnectForm";
|
|
9
10
|
export { FigmaConnectForm } from "./components/connect-forms/FigmaConnectForm";
|
|
10
11
|
export { GmailConnectForm } from "./components/connect-forms/GmailConnectForm";
|
|
11
12
|
export { GoogleAdsConnectForm } from "./components/connect-forms/GoogleAdsConnectForm";
|
|
@@ -36,6 +36,7 @@ export type ConnectionView = {
|
|
|
36
36
|
// Fallback nouns shown until the ontology carries rdfs:labels for these classes (MNT-503).
|
|
37
37
|
// https://linear.app/manta-eu/issue/MNT-503/add-rdfslabel-to-provider-entity-classes-in-the-ontology
|
|
38
38
|
const oauthAccountNoun = {
|
|
39
|
+
[GQLIntegration.Canva]: "User",
|
|
39
40
|
[GQLIntegration.Dash]: "Account",
|
|
40
41
|
[GQLIntegration.Figma]: "User",
|
|
41
42
|
[GQLIntegration.Slack]: "Workspace",
|
|
@@ -11,6 +11,7 @@ import type { ComponentType, SVGProps } from "react";
|
|
|
11
11
|
import type { ConnectionView } from "./connection-view";
|
|
12
12
|
|
|
13
13
|
export const gmailProviderId = "GMAIL";
|
|
14
|
+
export const canvaProviderId = "CANVA";
|
|
14
15
|
export const figmaProviderId = "FIGMA";
|
|
15
16
|
export const dashProviderId = "DASH";
|
|
16
17
|
export const dataConnectionProviderIds = {
|
|
@@ -29,6 +30,7 @@ export type DataConnectorType = keyof typeof dataConnectionProviderIds;
|
|
|
29
30
|
export type ProviderId =
|
|
30
31
|
| `${GQLInferalIntegrationProvider}`
|
|
31
32
|
| typeof gmailProviderId
|
|
33
|
+
| typeof canvaProviderId
|
|
32
34
|
| typeof figmaProviderId
|
|
33
35
|
| typeof dashProviderId
|
|
34
36
|
| (typeof dataConnectionProviderIds)[DataConnectorType];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useSparqlQueryQuery } from "@manta-eu/client";
|
|
2
|
-
import {
|
|
2
|
+
import { formatIriForSparql, compactUri, namespaces } from "@manta-eu/client/shared/rdf-namespaces";
|
|
3
3
|
import { isJsonLdNode } from "@manta-eu/client/types/jsonld";
|
|
4
4
|
import { parseDatalogRule, datalogBodyToSparqlSelect } from "@manta-eu/datalog-parser";
|
|
5
5
|
import type { DatalogAtom, SparqlSelectResult } from "@manta-eu/datalog-parser";
|
|
@@ -241,20 +241,20 @@ function generateTriplePattern(atom: DatalogAtom): string | null {
|
|
|
241
241
|
.with("property", () => {
|
|
242
242
|
if (!isPropertyAtom(atom)) return null;
|
|
243
243
|
const subject = atom.arguments[0]?.value || "?s";
|
|
244
|
-
const predicate =
|
|
244
|
+
const predicate = formatIriForSparql(atom.predicate.value || "");
|
|
245
245
|
const object = atom.arguments[1]?.value || "?o";
|
|
246
246
|
return `${subject} ${predicate} ${object}`;
|
|
247
247
|
})
|
|
248
248
|
.with("class", () => {
|
|
249
249
|
if (!isClassAtom(atom)) return null;
|
|
250
250
|
const subject = atom.arguments[0]?.value || "?s";
|
|
251
|
-
const classIRI =
|
|
251
|
+
const classIRI = formatIriForSparql(atom.predicate.value || "");
|
|
252
252
|
return `${subject} a ${classIRI}`;
|
|
253
253
|
})
|
|
254
254
|
.with("triple", () => {
|
|
255
255
|
if (!isTripleAtom(atom)) return null;
|
|
256
256
|
const subject = atom.subject.value || "?s";
|
|
257
|
-
const predicate =
|
|
257
|
+
const predicate = formatIriForSparql(atom.predicate.value || "");
|
|
258
258
|
const object = atom.object.value || "?o";
|
|
259
259
|
return `${subject} ${predicate} ${object}`;
|
|
260
260
|
})
|
|
@@ -168,7 +168,7 @@ function propertyPathsByBlankNode(turtle: string): Map<string, string> {
|
|
|
168
168
|
return paths;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
/**
|
|
171
|
+
/** The datastore emits `sh:property` in arbitrary order, so fields move on every open; reorder by path local name. */
|
|
172
172
|
export function sortShapeProperties(turtle: string): string {
|
|
173
173
|
const paths = propertyPathsByBlankNode(turtle);
|
|
174
174
|
const localName = (node: string) => {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
useConversationStartersQuery,
|
|
9
9
|
useCoverageRulesQuery,
|
|
10
10
|
useCurrentFactValueQuery,
|
|
11
|
-
|
|
11
|
+
useExplainFactQuery,
|
|
12
12
|
useGetActionPlansSummaryQuery,
|
|
13
13
|
useMemoriesQuery,
|
|
14
14
|
useMemorySchemasQuery,
|
|
@@ -34,7 +34,7 @@ export const graphDerivedQueries: QueryWithGetKey[] = [
|
|
|
34
34
|
useConversationStartersQuery,
|
|
35
35
|
useCoverageRulesQuery,
|
|
36
36
|
useCurrentFactValueQuery,
|
|
37
|
-
|
|
37
|
+
useExplainFactQuery,
|
|
38
38
|
useGetActionPlansSummaryQuery,
|
|
39
39
|
useMemoriesQuery,
|
|
40
40
|
useMemorySchemasQuery,
|