signetai 0.187.0 → 0.187.1
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/mcp-stdio.js +85 -46
- package/native-manifest.json +12 -12
- package/package.json +6 -6
package/dist/mcp-stdio.js
CHANGED
|
@@ -49863,9 +49863,59 @@ function toolName(value) {
|
|
|
49863
49863
|
function toolMarker(value) {
|
|
49864
49864
|
return `[tool call: ${toolName(value)}]`;
|
|
49865
49865
|
}
|
|
49866
|
+
var REASONING_TYPES = ["analysis", "thought", "thinking", "reasoning", "redacted_thinking"];
|
|
49867
|
+
var TOOL_CALL_TYPES = ["tool_use", "tool_call", "function_call", "function_calling"];
|
|
49868
|
+
var TOOL_RESULT_TYPES = [
|
|
49869
|
+
"tool_result",
|
|
49870
|
+
"tool_response",
|
|
49871
|
+
"function_call_output",
|
|
49872
|
+
"function_result",
|
|
49873
|
+
"tool_output",
|
|
49874
|
+
"tool_return"
|
|
49875
|
+
];
|
|
49876
|
+
function recordType2(value) {
|
|
49877
|
+
return (stringValue(value.type) ?? "").toLowerCase();
|
|
49878
|
+
}
|
|
49879
|
+
function isReasoningRecord(value) {
|
|
49880
|
+
const type = recordType2(value);
|
|
49881
|
+
const role = (stringValue(value.role) ?? "").toLowerCase();
|
|
49882
|
+
const content = value.content;
|
|
49883
|
+
const hasNoContent = content == null || typeof content === "string" && content.trim().length === 0;
|
|
49884
|
+
return REASONING_TYPES.some((candidate) => type === candidate || type.includes(candidate)) || role === "reasoning" || role === "thinking" || role === "assistant" && hasNoContent && (value.reasoning !== undefined || value.reasoning_content !== undefined || value.thinking !== undefined) || value.thought === true;
|
|
49885
|
+
}
|
|
49886
|
+
function isToolCallRecord(value) {
|
|
49887
|
+
return TOOL_CALL_TYPES.some((candidate) => recordType2(value).includes(candidate));
|
|
49888
|
+
}
|
|
49889
|
+
function isToolResultRecord(value) {
|
|
49890
|
+
const type = recordType2(value);
|
|
49891
|
+
const role = (stringValue(value.role) ?? "").toLowerCase();
|
|
49892
|
+
if (TOOL_RESULT_TYPES.some((candidate) => type.includes(candidate)) || role === "tool" || role === "function")
|
|
49893
|
+
return true;
|
|
49894
|
+
const payload = value.payload;
|
|
49895
|
+
if (typeof payload === "object" && payload !== null && !Array.isArray(payload)) {
|
|
49896
|
+
return isToolResultRecord(payload);
|
|
49897
|
+
}
|
|
49898
|
+
return false;
|
|
49899
|
+
}
|
|
49900
|
+
function toolCallMarkers(value) {
|
|
49901
|
+
const calls = value.tool_calls ?? value.toolCalls ?? value.calls;
|
|
49902
|
+
const records = Array.isArray(calls) ? calls : calls === undefined ? [] : [calls];
|
|
49903
|
+
const markers = records.flatMap((call2) => {
|
|
49904
|
+
if (typeof call2 !== "object" || call2 === null || Array.isArray(call2))
|
|
49905
|
+
return [];
|
|
49906
|
+
return [toolMarker(call2)];
|
|
49907
|
+
});
|
|
49908
|
+
const functionCall = value.function_call;
|
|
49909
|
+
if (typeof functionCall === "object" && functionCall !== null && !Array.isArray(functionCall)) {
|
|
49910
|
+
markers.push(toolMarker(functionCall));
|
|
49911
|
+
}
|
|
49912
|
+
return markers;
|
|
49913
|
+
}
|
|
49866
49914
|
function contentText(value) {
|
|
49867
49915
|
if (typeof value === "string")
|
|
49868
49916
|
return value.trim().length > 0 ? [value.trim()] : [];
|
|
49917
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value))
|
|
49918
|
+
return contentText([value]);
|
|
49869
49919
|
if (!Array.isArray(value))
|
|
49870
49920
|
return [];
|
|
49871
49921
|
const text = [];
|
|
@@ -49878,14 +49928,13 @@ function contentText(value) {
|
|
|
49878
49928
|
if (typeof item !== "object" || item === null || Array.isArray(item))
|
|
49879
49929
|
continue;
|
|
49880
49930
|
const block = item;
|
|
49881
|
-
|
|
49882
|
-
if (["tool_result", "tool_response", "function_call_output", "function_result"].includes(type))
|
|
49931
|
+
if (isReasoningRecord(block) || isToolResultRecord(block))
|
|
49883
49932
|
continue;
|
|
49884
|
-
if (
|
|
49933
|
+
if (isToolCallRecord(block)) {
|
|
49885
49934
|
text.push(toolMarker(block));
|
|
49886
49935
|
continue;
|
|
49887
49936
|
}
|
|
49888
|
-
const blockText = stringValue(block.text) ?? stringValue(block.content);
|
|
49937
|
+
const blockText = stringValue(block.text) ?? stringValue(block.input_text) ?? stringValue(block.content);
|
|
49889
49938
|
if (blockText)
|
|
49890
49939
|
text.push(blockText);
|
|
49891
49940
|
}
|
|
@@ -49895,49 +49944,49 @@ function jsonTranscriptLine(value) {
|
|
|
49895
49944
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
49896
49945
|
return [];
|
|
49897
49946
|
const record5 = value;
|
|
49898
|
-
const nestedItem = record5.item;
|
|
49947
|
+
const nestedItem = record5.item ?? record5.message ?? record5.payload;
|
|
49899
49948
|
const item = typeof nestedItem === "object" && nestedItem !== null && !Array.isArray(nestedItem) ? nestedItem : record5;
|
|
49900
|
-
|
|
49901
|
-
if (["tool_result", "tool_response", "function_call_output", "function_result", "tool_output", "tool_return"].some((candidate) => type.includes(candidate))) {
|
|
49949
|
+
if (isReasoningRecord(item) || isReasoningRecord(record5) || isToolResultRecord(item) || isToolResultRecord(record5))
|
|
49902
49950
|
return [];
|
|
49903
|
-
|
|
49904
|
-
if (["tool_use", "tool_call", "function_call", "function_calling"].some((candidate) => type.includes(candidate))) {
|
|
49951
|
+
if (isToolCallRecord(item) || isToolCallRecord(record5)) {
|
|
49905
49952
|
return [toolMarker(item)];
|
|
49906
49953
|
}
|
|
49907
49954
|
const role = (stringValue(item.role) ?? stringValue(record5.role) ?? "").toLowerCase();
|
|
49908
|
-
if (role === "tool" || role === "function")
|
|
49909
|
-
return [];
|
|
49910
|
-
const payload = record5.payload;
|
|
49911
|
-
if (typeof payload === "object" && payload !== null && !Array.isArray(payload)) {
|
|
49912
|
-
const payloadRecord = payload;
|
|
49913
|
-
const payloadType = (stringValue(payloadRecord.type) ?? "").toLowerCase();
|
|
49914
|
-
if (payloadType.includes("tool") || payloadType.includes("function_call")) {
|
|
49915
|
-
if (payloadType.includes("result") || payloadType.includes("output"))
|
|
49916
|
-
return [];
|
|
49917
|
-
return [toolMarker(payloadRecord)];
|
|
49918
|
-
}
|
|
49919
|
-
const payloadRole = stringValue(payloadRecord.role)?.toLowerCase();
|
|
49920
|
-
const payloadText = contentText(payloadRecord.content ?? payloadRecord.text);
|
|
49921
|
-
if (payloadRole && payloadText.length > 0)
|
|
49922
|
-
return [`${payloadRole === "user" ? "User" : "Assistant"}: ${payloadText.join(`
|
|
49923
|
-
`)}`];
|
|
49924
|
-
}
|
|
49925
49955
|
const text = contentText(item.content ?? item.text ?? item.message);
|
|
49926
|
-
|
|
49956
|
+
const markers = toolCallMarkers(item);
|
|
49957
|
+
if (text.length === 0 && markers.length === 0)
|
|
49927
49958
|
return [];
|
|
49928
49959
|
const label = role === "user" ? "User" : role === "assistant" ? "Assistant" : role === "reasoning" ? "Assistant reasoning" : null;
|
|
49929
|
-
return label ? text.map((part) => `${label}: ${part}`) : text;
|
|
49960
|
+
return [...label ? text.map((part) => `${label}: ${part}`) : text, ...markers];
|
|
49930
49961
|
}
|
|
49931
49962
|
function sanitizePlainTranscript(content) {
|
|
49932
|
-
const withoutToolBlocks = content.replace(/<(?:tool_result|tool_output|function_result|function_output|tool_response)>[\s\S]*?<\/(?:tool_result|tool_output|function_result|function_output|tool_response)>/gi, "").replace(/<(?:tool_call|tool_use|function_call)(?:\s+([^>]*))?>[\s\S]*?<\/(?:tool_call|tool_use|function_call)>/gi, (_match, attributes) => {
|
|
49963
|
+
const withoutToolBlocks = content.replace(/<(?:antml:)?(?:think|thinking|reasoning|analysis|redacted_thinking)\b[^>]*>[\s\S]*?<\/(?:antml:)?(?:think|thinking|reasoning|analysis|redacted_thinking)>/gi, "").replace(/<(?:antml:)?(?:tool_result|tool_output|function_result|function_output|tool_response)>[\s\S]*?<\/(?:antml:)?(?:tool_result|tool_output|function_result|function_output|tool_response)>/gi, "").replace(/<(?:antml:invoke|(?:antml:)?(?:tool_call|tool_use|function_call))(?:\s+([^>]*))?>[\s\S]*?<\/(?:antml:invoke|(?:antml:)?(?:tool_call|tool_use|function_call))>/gi, (_match, attributes) => {
|
|
49933
49964
|
const name = /(?:name|tool)=["']([^"']+)["']/i.exec(attributes ?? "")?.[1] ?? "tool";
|
|
49934
49965
|
return `[tool call: ${name}]`;
|
|
49935
49966
|
});
|
|
49936
49967
|
const lines = withoutToolBlocks.split(/\r?\n/);
|
|
49937
49968
|
const kept = [];
|
|
49969
|
+
let omittingReasoning = false;
|
|
49970
|
+
let omittingToolOutput = false;
|
|
49938
49971
|
for (const line of lines) {
|
|
49939
49972
|
const trimmed = line.trim();
|
|
49940
|
-
if (/^(?:tool
|
|
49973
|
+
if (/^(?:tool|function)\s*:/i.test(trimmed)) {
|
|
49974
|
+
omittingToolOutput = true;
|
|
49975
|
+
continue;
|
|
49976
|
+
}
|
|
49977
|
+
if (/^(?:user|human|assistant|system|developer)\s*:/i.test(trimmed)) {
|
|
49978
|
+
omittingReasoning = false;
|
|
49979
|
+
omittingToolOutput = false;
|
|
49980
|
+
}
|
|
49981
|
+
if (/^(?:assistant\s+)?(?:reasoning|thinking|thought|analysis)\s*:/i.test(trimmed)) {
|
|
49982
|
+
omittingReasoning = true;
|
|
49983
|
+
continue;
|
|
49984
|
+
}
|
|
49985
|
+
if (/^(?:tool[_ -]?(?:output|result)|function[_ -]?(?:output|result)|<tool_result|<tool_response)\b/i.test(trimmed)) {
|
|
49986
|
+
omittingToolOutput = true;
|
|
49987
|
+
continue;
|
|
49988
|
+
}
|
|
49989
|
+
if (omittingReasoning || omittingToolOutput)
|
|
49941
49990
|
continue;
|
|
49942
49991
|
if (/^(?:tool[_ -]?(?:call|use)|function[_ -]?call)\b/i.test(trimmed)) {
|
|
49943
49992
|
const name = trimmed.split(/\s*[:=]\s*/, 2)[1]?.trim() || "tool";
|
|
@@ -49951,26 +50000,16 @@ function sanitizePlainTranscript(content) {
|
|
|
49951
50000
|
|
|
49952
50001
|
`).trim();
|
|
49953
50002
|
}
|
|
49954
|
-
function
|
|
50003
|
+
function isJsonTranscriptExcluded(value) {
|
|
49955
50004
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
49956
50005
|
return false;
|
|
49957
50006
|
const record5 = value;
|
|
49958
|
-
const nestedItem = record5.item;
|
|
50007
|
+
const nestedItem = record5.item ?? record5.message ?? record5.payload;
|
|
49959
50008
|
const item = typeof nestedItem === "object" && nestedItem !== null && !Array.isArray(nestedItem) ? nestedItem : record5;
|
|
49960
|
-
|
|
49961
|
-
if (["tool_result", "tool_response", "function_call_output", "function_result", "tool_output", "tool_return"].some((candidate) => type.includes(candidate)))
|
|
49962
|
-
return true;
|
|
49963
|
-
const role = (stringValue(item.role) ?? stringValue(record5.role) ?? "").toLowerCase();
|
|
49964
|
-
if (role === "tool" || role === "function")
|
|
50009
|
+
if (isReasoningRecord(record5) || isReasoningRecord(item) || isToolResultRecord(record5) || isToolResultRecord(item))
|
|
49965
50010
|
return true;
|
|
49966
|
-
const
|
|
49967
|
-
|
|
49968
|
-
const payloadRecord = payload;
|
|
49969
|
-
const payloadType = (stringValue(payloadRecord.type) ?? "").toLowerCase();
|
|
49970
|
-
const payloadRole = (stringValue(payloadRecord.role) ?? "").toLowerCase();
|
|
49971
|
-
return payloadType.includes("result") || payloadType.includes("output") || payloadRole === "tool" || payloadRole === "function";
|
|
49972
|
-
}
|
|
49973
|
-
return false;
|
|
50011
|
+
const content = item.content;
|
|
50012
|
+
return Array.isArray(content) && content.length > 0 && content.every((block) => typeof block === "object" && block !== null && !Array.isArray(block) && (isReasoningRecord(block) || isToolResultRecord(block)));
|
|
49974
50013
|
}
|
|
49975
50014
|
function sanitizeTranscriptForDreaming(content) {
|
|
49976
50015
|
const lines = content.split(/\r?\n/);
|
|
@@ -50001,7 +50040,7 @@ function sanitizeTranscriptForDreaming(content) {
|
|
|
50001
50040
|
const rendered = jsonTranscriptLine(parsed);
|
|
50002
50041
|
if (rendered.length > 0)
|
|
50003
50042
|
return rendered;
|
|
50004
|
-
if (
|
|
50043
|
+
if (isJsonTranscriptExcluded(parsed))
|
|
50005
50044
|
return [];
|
|
50006
50045
|
} catch {}
|
|
50007
50046
|
return [line];
|
package/native-manifest.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "0.187.
|
|
3
|
+
"version": "0.187.1",
|
|
4
4
|
"assets": [
|
|
5
5
|
{
|
|
6
6
|
"name": "signet-darwin-arm64",
|
|
7
7
|
"platform": "darwin-arm64",
|
|
8
|
-
"sha256": "
|
|
8
|
+
"sha256": "66d5f01303df93cec5197d39e7d067b76b1183659cb432e16312ac3be4a89d75",
|
|
9
9
|
"size": 117705376
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"name": "signet-darwin-x64",
|
|
13
13
|
"platform": "darwin-x64",
|
|
14
|
-
"sha256": "
|
|
14
|
+
"sha256": "7c7cf381a004a52c499510115592ff6c17f73465762290f42e3f5ee52c0184b0",
|
|
15
15
|
"size": 122325568
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"name": "signet-linux-arm64",
|
|
19
19
|
"platform": "linux-arm64",
|
|
20
|
-
"sha256": "
|
|
21
|
-
"size":
|
|
20
|
+
"sha256": "4192e7870eb925d1fafc0402ea2317a396b22a95111662fcc867a93bfcc26b80",
|
|
21
|
+
"size": 154944502
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "signet-linux-x64",
|
|
25
25
|
"platform": "linux-x64",
|
|
26
|
-
"sha256": "
|
|
27
|
-
"size":
|
|
26
|
+
"sha256": "fa2cf1ba8f98fdf58f504e538119a9d6f45288b7a0f747a8607802909241fcff",
|
|
27
|
+
"size": 155503487
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"name": "signet-win32-x64.exe",
|
|
31
31
|
"platform": "win32-x64",
|
|
32
|
-
"sha256": "
|
|
33
|
-
"size":
|
|
32
|
+
"sha256": "7eb540f9ca277c7738894b483f558620f56c1fec94d7e858e62604fa07ed2e57",
|
|
33
|
+
"size": 171636224
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"components": {
|
|
37
37
|
"connectors": {
|
|
38
|
-
"url": "signet-connectors-0.187.
|
|
39
|
-
"sha256": "
|
|
40
|
-
"size":
|
|
38
|
+
"url": "signet-connectors-0.187.1.tar.gz",
|
|
39
|
+
"sha256": "9a527913ae68d86289479b0b503dd55501ebc921926fd79be72a72fae9de36dc",
|
|
40
|
+
"size": 16883
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "signetai",
|
|
3
|
-
"version": "0.187.
|
|
3
|
+
"version": "0.187.1",
|
|
4
4
|
"description": "Signet native CLI installer wrapper",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.187.
|
|
69
|
-
"signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.187.
|
|
70
|
-
"signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.187.
|
|
71
|
-
"signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.187.
|
|
72
|
-
"signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.187.
|
|
68
|
+
"signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.187.1/signetai-darwin-arm64-0.187.1.tgz",
|
|
69
|
+
"signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.187.1/signetai-darwin-x64-0.187.1.tgz",
|
|
70
|
+
"signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.187.1/signetai-linux-arm64-0.187.1.tgz",
|
|
71
|
+
"signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.187.1/signetai-linux-x64-0.187.1.tgz",
|
|
72
|
+
"signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.187.1/signetai-win32-x64-0.187.1.tgz"
|
|
73
73
|
}
|
|
74
74
|
}
|