@mono-agent/agent-runtime 0.11.4 → 0.11.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
CHANGED
|
@@ -14,17 +14,6 @@ import {
|
|
|
14
14
|
streamContentKey,
|
|
15
15
|
} from "../pi-events.js";
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* The tool-start progress line surfaced as a thinking block, or null for a
|
|
19
|
-
* blank/invalid tool name.
|
|
20
|
-
* @param {unknown} toolName
|
|
21
|
-
* @returns {string|null}
|
|
22
|
-
*/
|
|
23
|
-
export function toolStartProgressText(toolName) {
|
|
24
|
-
if (typeof toolName !== "string" || toolName.trim().length === 0) return null;
|
|
25
|
-
return `Running ${toolName}...`;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
17
|
function toolResultFileChange(result) {
|
|
29
18
|
const fileChange = result?.details?.file_change;
|
|
30
19
|
return fileChange && typeof fileChange === "object" && !Array.isArray(fileChange)
|
|
@@ -84,10 +73,6 @@ export function createStreamSubscriber(runState, { onEvent, options, toolLimits,
|
|
|
84
73
|
if (event.toolName) runState.lastToolName = event.toolName;
|
|
85
74
|
if (event.toolCallId) runState.toolStartTimes.set(event.toolCallId, Date.now());
|
|
86
75
|
const input = eventToolArgs(event.toolName, event.args, { cwd: options.cwd, toolLimits });
|
|
87
|
-
const progressText = toolStartProgressText(event.toolName);
|
|
88
|
-
if (progressText) {
|
|
89
|
-
onEvent({ type: "assistant", message: { content: [{ type: "thinking", text: progressText }] } });
|
|
90
|
-
}
|
|
91
76
|
onEvent({
|
|
92
77
|
type: "assistant",
|
|
93
78
|
message: { content: [{ type: "tool_use", id: event.toolCallId, name: event.toolName, input }] },
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The tool-start progress line surfaced as a thinking block, or null for a
|
|
3
|
-
* blank/invalid tool name.
|
|
4
|
-
* @param {unknown} toolName
|
|
5
|
-
* @returns {string|null}
|
|
6
|
-
*/
|
|
7
|
-
export function toolStartProgressText(toolName: unknown): string | null;
|
|
8
1
|
/**
|
|
9
2
|
* The slice of run state the stream subscriber reads and mutates. A structural
|
|
10
3
|
* subset of the orchestrator's runState.
|