@threadbase-sh/scanner 0.24.0 → 0.24.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/cli.js +4 -14
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +3 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -13
- package/dist/index.js.map +1 -1
- package/dist/parser.d.ts +0 -1
- package/dist/parser.d.ts.map +1 -1
- package/dist/persistent/metadata-reducer.d.ts +0 -2
- package/dist/persistent/metadata-reducer.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -740,8 +740,6 @@ function initialReducerState() {
|
|
|
740
740
|
lastMessageSender: "user",
|
|
741
741
|
agentId: "",
|
|
742
742
|
isSidechain: false,
|
|
743
|
-
isTeammate: false,
|
|
744
|
-
firstUserSeen: false,
|
|
745
743
|
firstMessage: null,
|
|
746
744
|
lastMessage: null,
|
|
747
745
|
lastPrompt: "",
|
|
@@ -781,10 +779,6 @@ function reduceLine(state, entry, tier) {
|
|
|
781
779
|
return;
|
|
782
780
|
}
|
|
783
781
|
if (state.model === null && msg?.model) state.model = msg.model;
|
|
784
|
-
if (type === "user" && !state.firstUserSeen) {
|
|
785
|
-
state.firstUserSeen = true;
|
|
786
|
-
if (isTeammateContent(msg?.content)) state.isTeammate = true;
|
|
787
|
-
}
|
|
788
782
|
const content = extractTextContent(msg?.content);
|
|
789
783
|
const hasToolUseResult = type === "user" && entry.toolUseResult != null;
|
|
790
784
|
const isOnlyToolResult = hasToolUseResult && isOnlyToolResultContent(msg?.content);
|
|
@@ -851,7 +845,9 @@ function finalizeMeta(state, filePath, account, tier) {
|
|
|
851
845
|
// A sidechain line's `sessionId` IS the parent's id — that is exactly the
|
|
852
846
|
// conflation `subagentId` exists to undo, so it is the parent UUID here.
|
|
853
847
|
parentSessionUuid: isSidechain && state.sessionId ? state.sessionId : void 0,
|
|
854
|
-
|
|
848
|
+
// A teammate's records carry teamName; the lead's never do, yet the lead
|
|
849
|
+
// receives <teammate-message> tags too, so the tag is not the discriminator.
|
|
850
|
+
isTeammate: Boolean(state.teamName),
|
|
855
851
|
teamName: state.teamName || null,
|
|
856
852
|
toolNames: state.toolNames,
|
|
857
853
|
firstMessage: state.firstMessage,
|
|
@@ -1029,12 +1025,6 @@ function isOnlyToolResultContent(content) {
|
|
|
1029
1025
|
if (!Array.isArray(content)) return false;
|
|
1030
1026
|
return content.length > 0 && content.every((item) => item?.type === "tool_result");
|
|
1031
1027
|
}
|
|
1032
|
-
function isTeammateContent(content) {
|
|
1033
|
-
const raw = typeof content === "string" ? content : Array.isArray(content) ? content.map(
|
|
1034
|
-
(item) => typeof item === "string" ? item : item?.type === "text" ? item.text ?? "" : ""
|
|
1035
|
-
).join("") : "";
|
|
1036
|
-
return raw.includes("<teammate-message");
|
|
1037
|
-
}
|
|
1038
1028
|
function extractThinking(content) {
|
|
1039
1029
|
if (!Array.isArray(content)) return { content: "", signature: "" };
|
|
1040
1030
|
const blocks = content.filter((item) => item?.type === "thinking");
|