@inkeep/agents-sdk 0.0.0-dev-20250919052931 → 0.0.0-dev-20250919185254

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/index.cjs CHANGED
@@ -2981,9 +2981,112 @@ var Project = class {
2981
2981
  */
2982
2982
  async toFullProjectDefinition() {
2983
2983
  const graphsObject = {};
2984
+ const toolsObject = {};
2985
+ const dataComponentsObject = {};
2986
+ const artifactComponentsObject = {};
2984
2987
  for (const graph of this.graphs) {
2985
2988
  const graphDefinition = await graph.toFullGraphDefinition();
2986
2989
  graphsObject[graph.getId()] = graphDefinition;
2990
+ for (const agent2 of graph.agents) {
2991
+ if (!agent2.getTools) {
2992
+ continue;
2993
+ }
2994
+ const agentTools = agent2.getTools();
2995
+ for (const [toolName, toolInstance] of Object.entries(agentTools)) {
2996
+ if (toolInstance && typeof toolInstance === "object") {
2997
+ let actualTool;
2998
+ let toolId;
2999
+ if ("server" in toolInstance && "selectedTools" in toolInstance) {
3000
+ const mcpConfig = toolInstance;
3001
+ actualTool = mcpConfig.server;
3002
+ toolId = actualTool.getId();
3003
+ } else {
3004
+ actualTool = toolInstance;
3005
+ toolId = actualTool.getId?.() || actualTool.id || toolName;
3006
+ }
3007
+ if (!toolsObject[toolId]) {
3008
+ let toolConfig;
3009
+ if (actualTool.config?.serverUrl) {
3010
+ toolConfig = {
3011
+ type: "mcp",
3012
+ mcp: {
3013
+ server: {
3014
+ url: actualTool.config.serverUrl
3015
+ }
3016
+ }
3017
+ };
3018
+ } else if (actualTool.config?.type === "mcp") {
3019
+ toolConfig = actualTool.config;
3020
+ } else {
3021
+ toolConfig = {
3022
+ type: "function",
3023
+ parameters: actualTool.parameters || {}
3024
+ };
3025
+ }
3026
+ const toolData = {
3027
+ id: toolId,
3028
+ name: actualTool.config?.name || actualTool.name || toolName,
3029
+ config: toolConfig,
3030
+ status: actualTool.getStatus?.() || actualTool.status || "unknown"
3031
+ };
3032
+ if (actualTool.config?.imageUrl) {
3033
+ toolData.imageUrl = actualTool.config.imageUrl;
3034
+ }
3035
+ if (actualTool.config?.headers) {
3036
+ toolData.headers = actualTool.config.headers;
3037
+ }
3038
+ if (actualTool.capabilities) {
3039
+ toolData.capabilities = actualTool.capabilities;
3040
+ }
3041
+ if (actualTool.lastHealthCheck) {
3042
+ toolData.lastHealthCheck = actualTool.lastHealthCheck;
3043
+ }
3044
+ if (actualTool.availableTools) {
3045
+ toolData.availableTools = actualTool.availableTools;
3046
+ }
3047
+ if (actualTool.lastError) {
3048
+ toolData.lastError = actualTool.lastError;
3049
+ }
3050
+ if (actualTool.lastToolsSync) {
3051
+ toolData.lastToolsSync = actualTool.lastToolsSync;
3052
+ }
3053
+ if (actualTool.getCredentialReferenceId?.()) {
3054
+ toolData.credentialReferenceId = actualTool.getCredentialReferenceId();
3055
+ }
3056
+ toolsObject[toolId] = toolData;
3057
+ }
3058
+ }
3059
+ }
3060
+ const agentDataComponents = agent2.getDataComponents?.();
3061
+ if (agentDataComponents) {
3062
+ for (const dataComponent2 of agentDataComponents) {
3063
+ const dataComponentId = dataComponent2.id || dataComponent2.name.toLowerCase().replace(/\s+/g, "-");
3064
+ if (!dataComponentsObject[dataComponentId]) {
3065
+ dataComponentsObject[dataComponentId] = {
3066
+ id: dataComponentId,
3067
+ name: dataComponent2.name,
3068
+ description: dataComponent2.description || "",
3069
+ props: dataComponent2.props || {}
3070
+ };
3071
+ }
3072
+ }
3073
+ }
3074
+ const agentArtifactComponents = agent2.getArtifactComponents?.();
3075
+ if (agentArtifactComponents) {
3076
+ for (const artifactComponent2 of agentArtifactComponents) {
3077
+ const artifactComponentId = artifactComponent2.id || artifactComponent2.name.toLowerCase().replace(/\s+/g, "-");
3078
+ if (!artifactComponentsObject[artifactComponentId]) {
3079
+ artifactComponentsObject[artifactComponentId] = {
3080
+ id: artifactComponentId,
3081
+ name: artifactComponent2.name,
3082
+ description: artifactComponent2.description || "",
3083
+ summaryProps: artifactComponent2.summaryProps || {},
3084
+ fullProps: artifactComponent2.fullProps || {}
3085
+ };
3086
+ }
3087
+ }
3088
+ }
3089
+ }
2987
3090
  }
2988
3091
  return {
2989
3092
  id: this.projectId,
@@ -2992,8 +3095,9 @@ var Project = class {
2992
3095
  models: this.models,
2993
3096
  stopWhen: this.stopWhen,
2994
3097
  graphs: graphsObject,
2995
- tools: {},
2996
- // Empty tools object as SDK doesn't manage tools directly yet
3098
+ tools: toolsObject,
3099
+ dataComponents: Object.keys(dataComponentsObject).length > 0 ? dataComponentsObject : void 0,
3100
+ artifactComponents: Object.keys(artifactComponentsObject).length > 0 ? artifactComponentsObject : void 0,
2997
3101
  credentialReferences: void 0,
2998
3102
  // Projects don't directly hold credentials yet
2999
3103
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
package/dist/index.js CHANGED
@@ -2979,9 +2979,112 @@ var Project = class {
2979
2979
  */
2980
2980
  async toFullProjectDefinition() {
2981
2981
  const graphsObject = {};
2982
+ const toolsObject = {};
2983
+ const dataComponentsObject = {};
2984
+ const artifactComponentsObject = {};
2982
2985
  for (const graph of this.graphs) {
2983
2986
  const graphDefinition = await graph.toFullGraphDefinition();
2984
2987
  graphsObject[graph.getId()] = graphDefinition;
2988
+ for (const agent2 of graph.agents) {
2989
+ if (!agent2.getTools) {
2990
+ continue;
2991
+ }
2992
+ const agentTools = agent2.getTools();
2993
+ for (const [toolName, toolInstance] of Object.entries(agentTools)) {
2994
+ if (toolInstance && typeof toolInstance === "object") {
2995
+ let actualTool;
2996
+ let toolId;
2997
+ if ("server" in toolInstance && "selectedTools" in toolInstance) {
2998
+ const mcpConfig = toolInstance;
2999
+ actualTool = mcpConfig.server;
3000
+ toolId = actualTool.getId();
3001
+ } else {
3002
+ actualTool = toolInstance;
3003
+ toolId = actualTool.getId?.() || actualTool.id || toolName;
3004
+ }
3005
+ if (!toolsObject[toolId]) {
3006
+ let toolConfig;
3007
+ if (actualTool.config?.serverUrl) {
3008
+ toolConfig = {
3009
+ type: "mcp",
3010
+ mcp: {
3011
+ server: {
3012
+ url: actualTool.config.serverUrl
3013
+ }
3014
+ }
3015
+ };
3016
+ } else if (actualTool.config?.type === "mcp") {
3017
+ toolConfig = actualTool.config;
3018
+ } else {
3019
+ toolConfig = {
3020
+ type: "function",
3021
+ parameters: actualTool.parameters || {}
3022
+ };
3023
+ }
3024
+ const toolData = {
3025
+ id: toolId,
3026
+ name: actualTool.config?.name || actualTool.name || toolName,
3027
+ config: toolConfig,
3028
+ status: actualTool.getStatus?.() || actualTool.status || "unknown"
3029
+ };
3030
+ if (actualTool.config?.imageUrl) {
3031
+ toolData.imageUrl = actualTool.config.imageUrl;
3032
+ }
3033
+ if (actualTool.config?.headers) {
3034
+ toolData.headers = actualTool.config.headers;
3035
+ }
3036
+ if (actualTool.capabilities) {
3037
+ toolData.capabilities = actualTool.capabilities;
3038
+ }
3039
+ if (actualTool.lastHealthCheck) {
3040
+ toolData.lastHealthCheck = actualTool.lastHealthCheck;
3041
+ }
3042
+ if (actualTool.availableTools) {
3043
+ toolData.availableTools = actualTool.availableTools;
3044
+ }
3045
+ if (actualTool.lastError) {
3046
+ toolData.lastError = actualTool.lastError;
3047
+ }
3048
+ if (actualTool.lastToolsSync) {
3049
+ toolData.lastToolsSync = actualTool.lastToolsSync;
3050
+ }
3051
+ if (actualTool.getCredentialReferenceId?.()) {
3052
+ toolData.credentialReferenceId = actualTool.getCredentialReferenceId();
3053
+ }
3054
+ toolsObject[toolId] = toolData;
3055
+ }
3056
+ }
3057
+ }
3058
+ const agentDataComponents = agent2.getDataComponents?.();
3059
+ if (agentDataComponents) {
3060
+ for (const dataComponent2 of agentDataComponents) {
3061
+ const dataComponentId = dataComponent2.id || dataComponent2.name.toLowerCase().replace(/\s+/g, "-");
3062
+ if (!dataComponentsObject[dataComponentId]) {
3063
+ dataComponentsObject[dataComponentId] = {
3064
+ id: dataComponentId,
3065
+ name: dataComponent2.name,
3066
+ description: dataComponent2.description || "",
3067
+ props: dataComponent2.props || {}
3068
+ };
3069
+ }
3070
+ }
3071
+ }
3072
+ const agentArtifactComponents = agent2.getArtifactComponents?.();
3073
+ if (agentArtifactComponents) {
3074
+ for (const artifactComponent2 of agentArtifactComponents) {
3075
+ const artifactComponentId = artifactComponent2.id || artifactComponent2.name.toLowerCase().replace(/\s+/g, "-");
3076
+ if (!artifactComponentsObject[artifactComponentId]) {
3077
+ artifactComponentsObject[artifactComponentId] = {
3078
+ id: artifactComponentId,
3079
+ name: artifactComponent2.name,
3080
+ description: artifactComponent2.description || "",
3081
+ summaryProps: artifactComponent2.summaryProps || {},
3082
+ fullProps: artifactComponent2.fullProps || {}
3083
+ };
3084
+ }
3085
+ }
3086
+ }
3087
+ }
2985
3088
  }
2986
3089
  return {
2987
3090
  id: this.projectId,
@@ -2990,8 +3093,9 @@ var Project = class {
2990
3093
  models: this.models,
2991
3094
  stopWhen: this.stopWhen,
2992
3095
  graphs: graphsObject,
2993
- tools: {},
2994
- // Empty tools object as SDK doesn't manage tools directly yet
3096
+ tools: toolsObject,
3097
+ dataComponents: Object.keys(dataComponentsObject).length > 0 ? dataComponentsObject : void 0,
3098
+ artifactComponents: Object.keys(artifactComponentsObject).length > 0 ? artifactComponentsObject : void 0,
2995
3099
  credentialReferences: void 0,
2996
3100
  // Projects don't directly hold credentials yet
2997
3101
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-sdk",
3
- "version": "0.0.0-dev-20250919052931",
3
+ "version": "0.0.0-dev-20250919185254",
4
4
  "description": "Agents SDK for building and managing agents in the Inkeep Agent Framework",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -8,7 +8,7 @@
8
8
  "dependencies": {
9
9
  "nanoid": "^5.1.5",
10
10
  "zod": "^4.1.5",
11
- "@inkeep/agents-core": "^0.0.0-dev-20250919052931"
11
+ "@inkeep/agents-core": "^0.0.0-dev-20250919185254"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@types/node": "^20.11.24",