@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
- `Clients without HTTP transport support can use the stdio bridge\n` +
615
- `in proxy mode: https://github.com/RoboFinSystems/robosystems-mcp-bridge`, true);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robosystems/core",
3
- "version": "0.22.5",
3
+ "version": "0.22.7",
4
4
  "description": "Shared React core for the RoboSystems apps",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -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 a missing schema or one with no nodes is refused before any request.
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
- var _a;
134
- const nodes = (_a = graphData.custom_schema) === null || _a === void 0 ? void 0 : _a.nodes;
135
- if (!graphData.custom_schema || !Array.isArray(nodes) || nodes.length === 0) {
136
- throw new Error('A generic graph needs a schema that defines at least one node.');
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 graphData.custom_schema;
140
+ return schema;
139
141
  }
140
142
  /**
141
143
  * Hook for graph creation using the new unified endpoint