@decocms/bindings 1.4.5 → 1.4.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.
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/bindings",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"check": "tsc --noEmit",
|
|
7
7
|
"test": "bun test"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
+
"@decocms/mcp-utils": "^1.0.5",
|
|
10
11
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
11
12
|
"@tanstack/react-router": "1.169.2",
|
|
12
13
|
"react": "^19.2.6",
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
ListToolsResult,
|
|
15
15
|
ListToolsResultSchema,
|
|
16
16
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
17
|
+
import { sharedJsonSchemaValidator } from "@decocms/mcp-utils";
|
|
17
18
|
import { MCPConnection } from "../connection";
|
|
18
19
|
import { HTTPClientTransport } from "./http-client-transport";
|
|
19
20
|
|
|
@@ -26,7 +27,10 @@ import { HTTPClientTransport } from "./http-client-transport";
|
|
|
26
27
|
*/
|
|
27
28
|
class Client extends BaseClient {
|
|
28
29
|
constructor(_clientInfo: Implementation, options?: ClientOptions) {
|
|
29
|
-
super(_clientInfo,
|
|
30
|
+
super(_clientInfo, {
|
|
31
|
+
jsonSchemaValidator: sharedJsonSchemaValidator,
|
|
32
|
+
...options,
|
|
33
|
+
});
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
override async listTools(
|
|
@@ -57,9 +57,6 @@ export const StepActionSchema = z.union([
|
|
|
57
57
|
CodeActionSchema.describe(
|
|
58
58
|
"Run pure TypeScript code for data transformation. Useful to merge data from multiple steps and transform it.",
|
|
59
59
|
),
|
|
60
|
-
// WaitForSignalActionSchema.describe(
|
|
61
|
-
// "Pause execution until an external signal is received (human-in-the-loop)",
|
|
62
|
-
// ),
|
|
63
60
|
]);
|
|
64
61
|
export type StepAction = z.infer<typeof StepActionSchema>;
|
|
65
62
|
|
|
@@ -693,41 +690,6 @@ export function groupStepsByLevel<T extends DAGStep>(steps: T[]): T[][] {
|
|
|
693
690
|
return grouped;
|
|
694
691
|
}
|
|
695
692
|
|
|
696
|
-
/**
|
|
697
|
-
* Get the dependency signature for a step (for grouping steps with same deps).
|
|
698
|
-
*
|
|
699
|
-
* @param step - The step to get signature for
|
|
700
|
-
* @returns Comma-separated sorted list of dependencies
|
|
701
|
-
*/
|
|
702
|
-
export function getRefSignature(step: DAGStep): string {
|
|
703
|
-
const inputRefs = getAllRefs(step.input);
|
|
704
|
-
const allRefs = [...new Set([...inputRefs])].sort();
|
|
705
|
-
return allRefs.join(",");
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Build a dependency graph for visualization.
|
|
710
|
-
* Returns edges as [fromStep, toStep] pairs.
|
|
711
|
-
*
|
|
712
|
-
* @param steps - Array of steps
|
|
713
|
-
* @returns Array of [source, target] pairs representing edges
|
|
714
|
-
*/
|
|
715
|
-
export function buildDependencyEdges<T extends DAGStep>(
|
|
716
|
-
steps: T[],
|
|
717
|
-
): [string, string][] {
|
|
718
|
-
const stepNames = new Set(steps.map((s) => s.name));
|
|
719
|
-
const edges: [string, string][] = [];
|
|
720
|
-
|
|
721
|
-
for (const step of steps) {
|
|
722
|
-
const deps = getStepDependencies(step, stepNames);
|
|
723
|
-
for (const dep of deps) {
|
|
724
|
-
edges.push([dep, step.name]);
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
return edges;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
693
|
/**
|
|
732
694
|
* Validate that there are no cycles in the step dependencies.
|
|
733
695
|
*
|