@gajae-code/agent-core 0.2.4 → 0.2.5
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/package.json +4 -4
- package/src/agent.ts +1 -1
- package/src/harmony-leak.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gajae-code/agent-core",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.5",
|
|
5
5
|
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
|
|
6
6
|
"homepage": "https://gaebal-gajae.dev",
|
|
7
7
|
"author": "Yeachan-Heo",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"fmt": "biome format --write ."
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@gajae-code/ai": "0.2.
|
|
39
|
-
"@gajae-code/natives": "0.2.
|
|
40
|
-
"@gajae-code/utils": "0.2.
|
|
38
|
+
"@gajae-code/ai": "0.2.5",
|
|
39
|
+
"@gajae-code/natives": "0.2.5",
|
|
40
|
+
"@gajae-code/utils": "0.2.5",
|
|
41
41
|
"@opentelemetry/api": "^1.9.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
package/src/agent.ts
CHANGED
|
@@ -1334,7 +1334,7 @@ export class Agent {
|
|
|
1334
1334
|
|
|
1335
1335
|
/** Calculate total text length from an assistant message's content blocks */
|
|
1336
1336
|
#getAssistantTextLength(message: AgentMessage | null): number {
|
|
1337
|
-
if (
|
|
1337
|
+
if (message?.role !== "assistant" || !Array.isArray(message.content)) {
|
|
1338
1338
|
return 0;
|
|
1339
1339
|
}
|
|
1340
1340
|
let length = 0;
|
package/src/harmony-leak.ts
CHANGED
|
@@ -230,7 +230,7 @@ export function recoverHarmonyToolCall(
|
|
|
230
230
|
): HarmonyRecoveredToolCall | undefined {
|
|
231
231
|
if (detection.surface !== "tool_arg" || detection.contentIndex === undefined) return undefined;
|
|
232
232
|
const block = message.content[detection.contentIndex];
|
|
233
|
-
if (
|
|
233
|
+
if (block?.type !== "toolCall") return undefined;
|
|
234
234
|
|
|
235
235
|
const config = RECOVERY_REGISTRY[block.name];
|
|
236
236
|
if (!config) return undefined;
|