@toolplex/client 0.1.12 → 0.1.14

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.
@@ -27,6 +27,12 @@ export async function handleInitialize(params) {
27
27
  memory: `${Math.round(os.totalmem() / (1024 * 1024 * 1024))}GB`,
28
28
  cpuCores: os.cpus().length,
29
29
  workDir: process.cwd(),
30
+ date: new Date().toLocaleDateString("en-US", {
31
+ weekday: "long",
32
+ year: "numeric",
33
+ month: "long",
34
+ day: "numeric",
35
+ }),
30
36
  };
31
37
  await logger.debug("Initializing server managers and API service");
32
38
  const [serverManagerInitResults, toolplexApiInitResponse] = await Promise.all([
@@ -60,7 +66,8 @@ export async function handleInitialize(params) {
60
66
  .replace("{ARGS.arch}", systemInfo.arch)
61
67
  .replace("{ARGS.memory}", systemInfo.memory)
62
68
  .replace("{ARGS.cpuCores}", systemInfo.cpuCores.toString())
63
- .replace("{ARGS.workDir}", systemInfo.workDir),
69
+ .replace("{ARGS.workDir}", systemInfo.workDir)
70
+ .replace("{ARGS.date}", systemInfo.date),
64
71
  },
65
72
  ],
66
73
  };
@@ -82,10 +82,10 @@ export async function handleSearchTool(params) {
82
82
  total_results: totalResults,
83
83
  }),
84
84
  },
85
- // Second: Human-readable summary
85
+ // Second: Followup instructions
86
86
  {
87
87
  type: "text",
88
- text: `Found ${totalResults} results for "${query}": ${annotatedServers.length} servers, ${playbooks.length} playbooks`,
88
+ text: promptsCache.getPrompt("search_results_footer"),
89
89
  },
90
90
  ];
91
91
  await logger.info("Search completed successfully");
@@ -137,7 +137,7 @@ export class ServerManager {
137
137
  await logger.debug(`Getting name for server ${serverId}`);
138
138
  return this.serverNames.get(serverId) || serverId;
139
139
  }
140
- async connectWithHandshakeTimeout(client, transport, ms = 30000) {
140
+ async connectWithHandshakeTimeout(client, transport, ms = 60000) {
141
141
  let connectTimeout;
142
142
  let listToolsTimeout;
143
143
  try {
@@ -230,7 +230,7 @@ export class ServerManager {
230
230
  }
231
231
  const client = new Client({ name: serverId, version: "1.0.0" }, { capabilities: { prompts: {}, resources: {}, tools: {} } });
232
232
  try {
233
- const toolsResponse = await this.connectWithHandshakeTimeout(client, transport, 30000);
233
+ const toolsResponse = await this.connectWithHandshakeTimeout(client, transport, 60000);
234
234
  const tools = toolsResponse.tools || [];
235
235
  this.sessions.set(serverId, client);
236
236
  this.tools.set(serverId, tools);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.1.11";
1
+ export declare const version = "0.1.14";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '0.1.11';
1
+ export const version = '0.1.14';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolplex/client",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "author": "ToolPlex LLC",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "description": "The official ToolPlex client for AI agent tool discovery and execution",