@talonic/mcp 0.1.99 → 0.1.100
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/CHANGELOG.md +6 -0
- package/dist/http-server.js +27 -1
- package/dist/http-server.js.map +1 -1
- package/dist/index.js +27 -1
- package/dist/index.js.map +1 -1
- package/dist/server.js +27 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
> The publish workflow assigns the version on release; after the push that publishes it, promote this block to `## [<version>] - <date>` (the changelog lock accepts the current package version living here until then).
|
|
11
11
|
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Questions steer to `talonic_ask` at the moment the model reaches for SQL.** Results of `query_data`, `describe_data`, `workspace_overview` and `plan_fields` via `talonic_invoke_agent_tool` carry one extra content item (`structuredContent.next_step`) saying that `talonic_ask` does the same work server-side in one cited call. An unknown-field refusal (the model guessed a `field_key`, as in the 2026-11-20 claude.ai session) adds that `talonic_ask` resolves field names itself. `content[0]` stays parseable JSON.
|
|
15
|
+
|
|
16
|
+
## [0.1.99] - 2026-11-21
|
|
17
|
+
|
|
12
18
|
### Security
|
|
13
19
|
|
|
14
20
|
- Runtime dependencies patched (`npm audit --omit=dev`: 9 advisories → 0, one critical). Minimum versions raised to `@modelcontextprotocol/sdk` ^1.32.2 and `zod` ^4.6.7 so installs never resolve the vulnerable ranges; transitive fixes (`proxy-addr`, `body-parser`, `fast-uri`, `hono`, `qs`, …) come through the lockfile. Dev-only `vitest` advisories need a major upgrade and stay open.
|
package/dist/http-server.js
CHANGED
|
@@ -8137,7 +8137,33 @@ var invokeAgentToolInputSchema = {
|
|
|
8137
8137
|
args: z.record(z.string(), z.unknown()).optional().describe("Arguments matching the tool's input_schema."),
|
|
8138
8138
|
document_ids: documentIdsArg
|
|
8139
8139
|
};
|
|
8140
|
+
var ANALYSIS_TOOLS = /* @__PURE__ */ new Set([
|
|
8141
|
+
"query_data",
|
|
8142
|
+
"describe_data",
|
|
8143
|
+
"workspace_overview",
|
|
8144
|
+
"plan_fields"
|
|
8145
|
+
]);
|
|
8146
|
+
var ASK_HINT = "If you are answering a question about the documents, call talonic_ask with the user's question instead of further queries: it runs this same SQL, field lookup and document reading server-side, knows the workspace's real field names and duplicate rules, and returns one cited answer in a single call.";
|
|
8147
|
+
var UNKNOWN_KEY_HINT = "talonic_ask resolves field names itself; call it with the user's question rather than guessing field_key values.";
|
|
8140
8148
|
async function handleInvokeAgentTool(getToken, baseUrl, args) {
|
|
8149
|
+
const result = await invokeAgentTool(getToken, baseUrl, args);
|
|
8150
|
+
if (!ANALYSIS_TOOLS.has(args.name)) return result;
|
|
8151
|
+
const first = result.content[0];
|
|
8152
|
+
if (!first) return result;
|
|
8153
|
+
if (result.isError) {
|
|
8154
|
+
if (/Unknown field_key|Unknown claim predicate/.test(first.text)) {
|
|
8155
|
+
first.text = `${first.text}
|
|
8156
|
+
${UNKNOWN_KEY_HINT}`;
|
|
8157
|
+
}
|
|
8158
|
+
return result;
|
|
8159
|
+
}
|
|
8160
|
+
if (result["structuredContent"] && typeof result["structuredContent"] === "object") {
|
|
8161
|
+
result["structuredContent"]["next_step"] = ASK_HINT;
|
|
8162
|
+
}
|
|
8163
|
+
result.content.push({ type: "text", text: `Next step: ${ASK_HINT}` });
|
|
8164
|
+
return result;
|
|
8165
|
+
}
|
|
8166
|
+
async function invokeAgentTool(getToken, baseUrl, args) {
|
|
8141
8167
|
return runTool(async () => {
|
|
8142
8168
|
const res = await apiJson(
|
|
8143
8169
|
getToken,
|
|
@@ -8684,7 +8710,7 @@ function registerAskTools(server, getToken, baseUrl) {
|
|
|
8684
8710
|
|
|
8685
8711
|
// package.json
|
|
8686
8712
|
var package_default = {
|
|
8687
|
-
version: "0.1.
|
|
8713
|
+
version: "0.1.100"};
|
|
8688
8714
|
|
|
8689
8715
|
// src/version.ts
|
|
8690
8716
|
var VERSION = package_default.version;
|