@noetaris/harness-types 0.2.0 → 0.3.0
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/index.d.ts +18 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -55,10 +55,26 @@ interface LLMResponse {
|
|
|
55
55
|
toolCalls: ToolCall[];
|
|
56
56
|
stopReason: 'end' | 'tool_use' | 'max_tokens';
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Payload emitted by LLM adapters as an `"llm.request"` observer event,
|
|
60
|
+
* immediately before the provider call is made.
|
|
61
|
+
*
|
|
62
|
+
* `messages` and `tools` are opt-in — they may contain sensitive data and are
|
|
63
|
+
* typed as `unknown` because adapters pass their internal translated
|
|
64
|
+
* representations; the framework never inspects this content.
|
|
65
|
+
*/
|
|
66
|
+
interface LLMRequestEvent {
|
|
67
|
+
modelId: string;
|
|
68
|
+
providerName: string;
|
|
69
|
+
messages?: unknown;
|
|
70
|
+
tools?: unknown;
|
|
71
|
+
}
|
|
58
72
|
/**
|
|
59
73
|
* Token-usage payload emitted by LLM adapters as an `llm.response` observer event.
|
|
60
74
|
*
|
|
61
75
|
* Adapters that cannot report real token counts (e.g. mock adapters) emit `{ input: 0, output: 0 }`.
|
|
76
|
+
*
|
|
77
|
+
* `output` is opt-in — it may contain sensitive data; adapters default to omitting it.
|
|
62
78
|
*/
|
|
63
79
|
interface LLMUsageEvent {
|
|
64
80
|
tokens: {
|
|
@@ -68,6 +84,7 @@ interface LLMUsageEvent {
|
|
|
68
84
|
modelId: string;
|
|
69
85
|
stopReason: LLMResponse['stopReason'];
|
|
70
86
|
providerName: string;
|
|
87
|
+
output?: unknown;
|
|
71
88
|
}
|
|
72
89
|
/**
|
|
73
90
|
* Payload emitted on `"tool.call"` before a tool is dispatched.
|
|
@@ -112,4 +129,4 @@ interface LLM {
|
|
|
112
129
|
}): Promise<LLMResponse>;
|
|
113
130
|
}
|
|
114
131
|
|
|
115
|
-
export type { LLM, LLMResponse, LLMUsageEvent, Message, Tool, ToolCall, ToolCallEvent, ToolResultEvent };
|
|
132
|
+
export type { LLM, LLMRequestEvent, LLMResponse, LLMUsageEvent, Message, Tool, ToolCall, ToolCallEvent, ToolResultEvent };
|