@exreve/exk 1.0.18 → 1.0.19
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/agentSession.js +9 -2
- package/dist/moduleMcpServer.js +17 -0
- package/dist/ttc-cli.tar.gz +0 -0
- package/package.json +1 -1
package/dist/agentSession.js
CHANGED
|
@@ -4,7 +4,7 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync, unlinkSync } from '
|
|
|
4
4
|
import { symlink as fsSymlink } from 'fs';
|
|
5
5
|
import { getSkillContent } from './skills/index.js';
|
|
6
6
|
import { isLocalModel, unwrapModelName, startOpenAIAdapter, getAdapterConfig } from './openaiAdapter.js';
|
|
7
|
-
import { createModuleMcpServer } from './moduleMcpServer.js';
|
|
7
|
+
import { createModuleMcpServer, getModuleToolHint } from './moduleMcpServer.js';
|
|
8
8
|
import path from 'path';
|
|
9
9
|
import os from 'os';
|
|
10
10
|
import { createRequire } from 'module';
|
|
@@ -443,7 +443,14 @@ export class AgentSessionManager {
|
|
|
443
443
|
// Create a fresh MCP server for each query call (SDK connects transport internally, cannot reuse)
|
|
444
444
|
...(() => {
|
|
445
445
|
const mcpServer = this.buildMcpServer(sessionId);
|
|
446
|
-
|
|
446
|
+
if (mcpServer) {
|
|
447
|
+
const toolHint = getModuleToolHint(session.enabledModules || []);
|
|
448
|
+
return {
|
|
449
|
+
mcpServers: [mcpServer],
|
|
450
|
+
...(toolHint ? { systemPrompt: toolHint } : {})
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
return {};
|
|
447
454
|
})(),
|
|
448
455
|
...(pathToClaudeCodeExecutable ? { pathToClaudeCodeExecutable } : {}),
|
|
449
456
|
spawnClaudeCodeProcess: (spawnOptions) => {
|
package/dist/moduleMcpServer.js
CHANGED
|
@@ -91,3 +91,20 @@ export function createModuleMcpServer(config) {
|
|
|
91
91
|
});
|
|
92
92
|
return server;
|
|
93
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Get a system prompt hint describing available module tools.
|
|
96
|
+
* This ensures the model knows about custom MCP tools upfront without
|
|
97
|
+
* having to discover them through the MCP tool-listing mechanism.
|
|
98
|
+
*/
|
|
99
|
+
export function getModuleToolHint(enabledModules) {
|
|
100
|
+
if (enabledModules.length === 0)
|
|
101
|
+
return null;
|
|
102
|
+
const toolDescriptions = [];
|
|
103
|
+
if (enabledModules.includes('user-choice')) {
|
|
104
|
+
toolDescriptions.push('- user_choice_request: Request user input when making decisions. Presents a modal to the user with options and waits for their response. Use this when you need the user to choose between options or confirm an action.');
|
|
105
|
+
}
|
|
106
|
+
// Add more module tool descriptions here as they are implemented
|
|
107
|
+
if (toolDescriptions.length === 0)
|
|
108
|
+
return null;
|
|
109
|
+
return `You have access to the following custom MCP tools:\n${toolDescriptions.join('\n')}\n\nUse these tools proactively when they are relevant to the task.`;
|
|
110
|
+
}
|
package/dist/ttc-cli.tar.gz
CHANGED
|
Binary file
|