@animalabs/agent-framework 0.5.4 → 0.5.6
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/src/framework.d.ts.map +1 -1
- package/dist/src/framework.js +13 -0
- package/dist/src/framework.js.map +1 -1
- package/dist/src/types/trace.d.ts +20 -0
- package/dist/src/types/trace.d.ts.map +1 -1
- package/dist/test/framework.test.js +47 -1
- package/dist/test/framework.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -2
- package/src/framework.ts +14 -0
- package/src/types/trace.ts +21 -0
package/src/types/trace.ts
CHANGED
|
@@ -67,6 +67,27 @@ export type TraceEvent =
|
|
|
67
67
|
type: 'inference:tokens';
|
|
68
68
|
agentName: string;
|
|
69
69
|
content: string;
|
|
70
|
+
/**
|
|
71
|
+
* Which membrane block produced this chunk. Carried verbatim from the
|
|
72
|
+
* membrane's ChunkMeta. Consumers that want to render thinking content
|
|
73
|
+
* distinctly from regular text should switch on this.
|
|
74
|
+
*/
|
|
75
|
+
blockType: 'text' | 'thinking' | 'tool_call' | 'tool_result';
|
|
76
|
+
/** 0-indexed block position in the current assistant turn. */
|
|
77
|
+
blockIndex: number;
|
|
78
|
+
})
|
|
79
|
+
| (TraceEventBase & {
|
|
80
|
+
/**
|
|
81
|
+
* Structural boundary inside the assistant turn — emitted on every
|
|
82
|
+
* block_start / block_complete from the membrane. Use this to switch
|
|
83
|
+
* render lanes (e.g. open a dim "thinking" element on block_start
|
|
84
|
+
* with blockType='thinking', close it on block_complete).
|
|
85
|
+
*/
|
|
86
|
+
type: 'inference:content_block';
|
|
87
|
+
agentName: string;
|
|
88
|
+
phase: 'block_start' | 'block_complete';
|
|
89
|
+
blockType: 'text' | 'thinking' | 'tool_call' | 'tool_result';
|
|
90
|
+
blockIndex: number;
|
|
70
91
|
})
|
|
71
92
|
| (TraceEventBase & {
|
|
72
93
|
type: 'inference:tool_calls_yielded';
|