@robosystems/core 0.22.5 → 0.22.7
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.
|
@@ -611,8 +611,9 @@ export function ConsoleContent({ config, variant = 'page', }) {
|
|
|
611
611
|
`an API key scoped to this graph, with the header snippets filled in.\n\n` +
|
|
612
612
|
`Once connected, ask questions like:\n` +
|
|
613
613
|
`${exampleLines}\n\n` +
|
|
614
|
-
`
|
|
615
|
-
`
|
|
614
|
+
`Every graph you can reach, in one connection (Claude Code, Cursor,\n` +
|
|
615
|
+
`VS Code): ${apiUrl}/v1/mcp/graphs, with an account-wide API key\n` +
|
|
616
|
+
`from Settings → API Keys in the X-API-Key header.`, true);
|
|
616
617
|
return;
|
|
617
618
|
}
|
|
618
619
|
addSystemMessage('Creating graph-scoped API key...', true);
|
package/package.json
CHANGED
|
@@ -47,7 +47,7 @@ export declare function useGraphCreation(): {
|
|
|
47
47
|
schema_extensions?: string[];
|
|
48
48
|
/**
|
|
49
49
|
* Generic graphs only, and required for them: the node/relationship
|
|
50
|
-
* schema to apply, with at least one node
|
|
50
|
+
* schema to apply, with at least one node unless it extends `base`.
|
|
51
51
|
*/
|
|
52
52
|
custom_schema?: Record<string, unknown>;
|
|
53
53
|
create_entity?: boolean;
|
|
@@ -127,15 +127,17 @@ export function useOperationMonitoring() {
|
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
129
|
* The schema of a generic graph. A graph cannot be provisioned without a node
|
|
130
|
-
* table, so
|
|
130
|
+
* table, so the API's rule is applied before any request: a schema defines at
|
|
131
|
+
* least one node, or extends `base`, which brings the base tables with it.
|
|
131
132
|
*/
|
|
132
133
|
function genericSchema(graphData) {
|
|
133
|
-
|
|
134
|
-
const nodes =
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
const schema = graphData.custom_schema;
|
|
135
|
+
const nodes = schema === null || schema === void 0 ? void 0 : schema.nodes;
|
|
136
|
+
const hasNodes = Array.isArray(nodes) && nodes.length > 0;
|
|
137
|
+
if (!schema || (!hasNodes && schema.extends !== 'base')) {
|
|
138
|
+
throw new Error("A generic graph needs a schema that defines at least one node, or extends 'base'.");
|
|
137
139
|
}
|
|
138
|
-
return
|
|
140
|
+
return schema;
|
|
139
141
|
}
|
|
140
142
|
/**
|
|
141
143
|
* Hook for graph creation using the new unified endpoint
|