@kortyx/hooks 0.14.0 → 0.16.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/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.16.0](https://github.com/kortyx-io/kortyx/compare/hooks-v0.15.0...hooks-v0.16.0) (2026-05-25)
4
+
5
+
6
+ ### Features
7
+
8
+ * add MCP tool support to useReason ([8352721](https://github.com/kortyx-io/kortyx/commit/83527215fd2fa6362348d842f8f3b9e9d9d03704))
9
+ * rename useReason tool policy to tool execution ([d6ee2f0](https://github.com/kortyx-io/kortyx/commit/d6ee2f0c92b05f9f51cb38745e94c7fed6158278))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * The following workspace dependencies were updated
15
+ * dependencies
16
+ * @kortyx/providers bumped to 0.5.0
17
+
18
+ ## [0.15.0](https://github.com/kortyx-io/kortyx/compare/hooks-v0.14.0...hooks-v0.15.0) (2026-05-24)
19
+
20
+
21
+ ### Features
22
+
23
+ * add OpenTelemetry tracing adapter ([dc1218f](https://github.com/kortyx-io/kortyx/commit/dc1218fb3759b8cb467f6c58f953a80127b25783))
24
+
3
25
  ## [0.14.0](https://github.com/kortyx-io/kortyx/compare/hooks-v0.13.0...hooks-v0.14.0) (2026-05-22)
4
26
 
5
27
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { NodeConfig, InterruptInput, InterruptResult, GraphState } from '@kortyx/core';
2
- import { R as ReasonTraceAdapter } from './tracing-BG-j1cer.js';
3
- export { a as ReasonTraceAttributes, b as ReasonTraceSpan, c as ReasonTraceSpanEndArgs, d as ReasonTraceSpanStartArgs } from './tracing-BG-j1cer.js';
4
- import { ProviderModelRef, KortyxReasoningOptions, KortyxResponseFormat, KortyxUsage, KortyxFinishReason, KortyxProviderMetadata, KortyxWarning } from '@kortyx/providers';
2
+ import { R as ReasonTraceAdapter, K as KortyxTraceMetadata } from './tracing-DK-T8zX5.js';
3
+ export { a as KortyxTelemetryConfig, b as KortyxTelemetryContentCapture, c as KortyxTelemetryPrompt, d as KortyxTraceAdapter, e as ReasonTraceAttributes, f as ReasonTraceSpan, g as ReasonTraceSpanEndArgs, h as ReasonTraceSpanStartArgs } from './tracing-DK-T8zX5.js';
4
+ import { ProviderModelRef, KortyxReasoningOptions, KortyxResponseFormat, KortyxExecutableTool, KortyxUsage, KortyxFinishReason, KortyxProviderMetadata, KortyxWarning, KortyxToolCall, KortyxToolResult } from '@kortyx/providers';
5
5
 
6
6
  type HookNodeRuntimeContext = {
7
7
  graph: {
@@ -91,6 +91,11 @@ type UseReasonInterruptConfig<TRequest extends InterruptInput = InterruptInput,
91
91
  schemaId?: string | undefined;
92
92
  schemaVersion?: string | undefined;
93
93
  };
94
+ type UseReasonToolExecution = {
95
+ maxSteps?: number | undefined;
96
+ approval?: boolean | Record<string, boolean> | undefined;
97
+ emit?: boolean | Record<string, boolean> | undefined;
98
+ };
94
99
  type UseReasonArgs<TOutput = unknown, TRequest extends InterruptInput = InterruptInput, TResponse = InterruptResult> = {
95
100
  model: ProviderModelRef;
96
101
  input: string;
@@ -105,9 +110,22 @@ type UseReasonArgs<TOutput = unknown, TRequest extends InterruptInput = Interrup
105
110
  emit?: boolean | undefined;
106
111
  stream?: boolean | undefined;
107
112
  id?: string | undefined;
113
+ telemetry?: KortyxTraceMetadata | undefined;
108
114
  outputSchema?: SchemaLike<TOutput> | undefined;
109
115
  structured?: UseReasonStructuredConfig | undefined;
110
116
  interrupt?: UseReasonInterruptConfig<TRequest, TResponse> | undefined;
117
+ tools?: KortyxExecutableTool[] | undefined;
118
+ toolExecution?: UseReasonToolExecution | undefined;
119
+ };
120
+ type UseReasonStep = {
121
+ stepIndex: number;
122
+ text: string;
123
+ toolCalls: KortyxToolCall[];
124
+ toolResults: KortyxToolResult[];
125
+ usage?: KortyxUsage | undefined;
126
+ finishReason?: KortyxFinishReason | undefined;
127
+ providerMetadata?: KortyxProviderMetadata | undefined;
128
+ warnings?: KortyxWarning[] | undefined;
111
129
  };
112
130
  type UseReasonResult<TOutput = unknown, TResponse = InterruptResult> = {
113
131
  id?: string;
@@ -120,6 +138,9 @@ type UseReasonResult<TOutput = unknown, TResponse = InterruptResult> = {
120
138
  warnings?: KortyxWarning[];
121
139
  output?: TOutput;
122
140
  interruptResponse?: TResponse;
141
+ toolCalls?: KortyxToolCall[];
142
+ toolResults?: KortyxToolResult[];
143
+ steps?: UseReasonStep[];
123
144
  };
124
145
  type UseInterruptArgs<TRequest extends InterruptInput = InterruptInput, TResponse = InterruptResult> = {
125
146
  request: TRequest;
@@ -139,4 +160,4 @@ declare function useRuntimeContext<TContext extends Record<string, unknown> = Re
139
160
  declare function useNodeState<T>(initialValue: T): [T, StateSetter<T>];
140
161
  declare function useWorkflowState<T>(key: string, ...rest: [] | [T]): [T, StateSetter<T>];
141
162
 
142
- export { type HookRuntimeContext, ReasonTraceAdapter, type UseInterruptArgs, type UseReasonArgs, type UseReasonResult, type UseStructuredDataArgs, runWithHookContext, useInterrupt, useNodeState, useReason, useRuntimeContext, useStructuredData, useWorkflowState };
163
+ export { type HookRuntimeContext, KortyxTraceMetadata, ReasonTraceAdapter, type UseInterruptArgs, type UseReasonArgs, type UseReasonResult, type UseReasonStep, type UseReasonToolExecution, type UseStructuredDataArgs, runWithHookContext, useInterrupt, useNodeState, useReason, useRuntimeContext, useStructuredData, useWorkflowState };