@f5xc-salesdemos/pi-agent-core 18.5.1 → 18.5.3
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 +3 -3
- package/src/agent-loop.ts +3 -0
- package/src/types.ts +14 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5xc-salesdemos/pi-agent-core",
|
|
4
|
-
"version": "18.5.
|
|
4
|
+
"version": "18.5.3",
|
|
5
5
|
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
|
|
6
6
|
"homepage": "https://github.com/f5xc-salesdemos/xcsh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"fmt": "biome format --write ."
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@f5xc-salesdemos/pi-ai": "18.5.
|
|
39
|
-
"@f5xc-salesdemos/pi-utils": "18.5.
|
|
38
|
+
"@f5xc-salesdemos/pi-ai": "18.5.3",
|
|
39
|
+
"@f5xc-salesdemos/pi-utils": "18.5.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@sinclair/typebox": "^0.34",
|
package/src/agent-loop.ts
CHANGED
|
@@ -496,12 +496,14 @@ async function executeToolCalls(
|
|
|
496
496
|
intent: toolCall.intent,
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
|
+
const isWarning = Boolean(result.isWarning);
|
|
499
500
|
stream.push({
|
|
500
501
|
type: "tool_execution_end",
|
|
501
502
|
toolCallId: toolCall.id,
|
|
502
503
|
toolName: toolCall.name,
|
|
503
504
|
result,
|
|
504
505
|
isError,
|
|
506
|
+
isWarning,
|
|
505
507
|
});
|
|
506
508
|
|
|
507
509
|
const toolResultMessage: ToolResultMessage = {
|
|
@@ -511,6 +513,7 @@ async function executeToolCalls(
|
|
|
511
513
|
content: result.content,
|
|
512
514
|
details: result.details,
|
|
513
515
|
isError,
|
|
516
|
+
isWarning,
|
|
514
517
|
timestamp: Date.now(),
|
|
515
518
|
};
|
|
516
519
|
record.result = result;
|
package/src/types.ts
CHANGED
|
@@ -199,6 +199,12 @@ export interface AgentToolResult<T = any, _TInput = unknown> {
|
|
|
199
199
|
content: (TextContent | ImageContent)[];
|
|
200
200
|
// Details to be displayed in a UI or logged
|
|
201
201
|
details?: T;
|
|
202
|
+
/**
|
|
203
|
+
* Tool completed without an error but produced a degraded or empty
|
|
204
|
+
* result (e.g. grep with 0 matches, fallback path). Surfaces as an
|
|
205
|
+
* orange gutter ball. Backwards-compatible: unset = "not a warning".
|
|
206
|
+
*/
|
|
207
|
+
isWarning?: boolean;
|
|
202
208
|
}
|
|
203
209
|
|
|
204
210
|
// Callback for streaming tool execution updates
|
|
@@ -289,4 +295,11 @@ export type AgentEvent =
|
|
|
289
295
|
// Tool execution lifecycle
|
|
290
296
|
| { type: "tool_execution_start"; toolCallId: string; toolName: string; args: any; intent?: string }
|
|
291
297
|
| { type: "tool_execution_update"; toolCallId: string; toolName: string; args: any; partialResult: any }
|
|
292
|
-
| {
|
|
298
|
+
| {
|
|
299
|
+
type: "tool_execution_end";
|
|
300
|
+
toolCallId: string;
|
|
301
|
+
toolName: string;
|
|
302
|
+
result: any;
|
|
303
|
+
isError?: boolean;
|
|
304
|
+
isWarning?: boolean;
|
|
305
|
+
};
|