@kortyx/hooks 0.9.1 → 0.10.1
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 +31 -0
- package/dist/index.d.ts +15 -3
- package/dist/index.js +434 -84
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +14 -3
- package/dist/internal.js +149 -47
- package/dist/internal.js.map +1 -1
- package/dist/tracing-BG-j1cer.d.ts +25 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.10.1](https://github.com/kortyx-io/kortyx/compare/hooks-v0.10.0...hooks-v0.10.1) (2026-05-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* update vulnerable dependency versions ([274bc41](https://github.com/kortyx-io/kortyx/commit/274bc410fe04d53da9db941ef8d62407dadd4c54))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @kortyx/core bumped to 0.5.1
|
|
16
|
+
|
|
17
|
+
## [0.10.0](https://github.com/kortyx-io/kortyx/compare/hooks-v0.9.1...hooks-v0.10.0) (2026-04-25)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **google, hooks:** reasoning fallback and structured reason parsing ([b12d404](https://github.com/kortyx-io/kortyx/commit/b12d404d42c184f5dd076d00ccf8af28bb463d45))
|
|
23
|
+
* **hooks:** track reason usage and tracing spans ([7dd9bf1](https://github.com/kortyx-io/kortyx/commit/7dd9bf1a207c7ce127cb64a090cf9b123924d1c6))
|
|
24
|
+
* **providers:** normalize reason model call metadata ([1a59e64](https://github.com/kortyx-io/kortyx/commit/1a59e6438c555a7536128501114a1382e6f90be4))
|
|
25
|
+
* **providers:** use provider instances in model refs ([e6183f0](https://github.com/kortyx-io/kortyx/commit/e6183f06b17c66e35cc336ef05019148ac631390))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Dependencies
|
|
29
|
+
|
|
30
|
+
* The following workspace dependencies were updated
|
|
31
|
+
* dependencies
|
|
32
|
+
* @kortyx/providers bumped to 0.4.0
|
|
33
|
+
|
|
3
34
|
## [0.9.1](https://github.com/kortyx-io/kortyx/compare/hooks-v0.9.0...hooks-v0.9.1) (2026-04-22)
|
|
4
35
|
|
|
5
36
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { NodeContext, GraphState, InterruptInput, InterruptResult } from '@kortyx/core';
|
|
2
|
-
import {
|
|
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';
|
|
3
5
|
|
|
4
6
|
type HookRuntimeContext = {
|
|
5
7
|
node: NodeContext;
|
|
6
8
|
state: GraphState;
|
|
7
|
-
|
|
9
|
+
reasonTrace?: ReasonTraceAdapter | undefined;
|
|
8
10
|
};
|
|
9
11
|
declare function runWithHookContext<T>(ctx: HookRuntimeContext, fn: () => Promise<T>): Promise<{
|
|
10
12
|
result: T;
|
|
@@ -80,6 +82,12 @@ type UseReasonArgs<TOutput = unknown, TRequest extends InterruptInput = Interrup
|
|
|
80
82
|
input: string;
|
|
81
83
|
system?: string | undefined;
|
|
82
84
|
temperature?: number | undefined;
|
|
85
|
+
maxOutputTokens?: number | undefined;
|
|
86
|
+
stopSequences?: string[] | undefined;
|
|
87
|
+
abortSignal?: AbortSignal | undefined;
|
|
88
|
+
reasoning?: KortyxReasoningOptions | undefined;
|
|
89
|
+
responseFormat?: KortyxResponseFormat | undefined;
|
|
90
|
+
providerOptions?: Record<string, unknown> | undefined;
|
|
83
91
|
emit?: boolean | undefined;
|
|
84
92
|
stream?: boolean | undefined;
|
|
85
93
|
id?: string | undefined;
|
|
@@ -92,6 +100,10 @@ type UseReasonResult<TOutput = unknown, TResponse = InterruptResult> = {
|
|
|
92
100
|
opId: string;
|
|
93
101
|
text: string;
|
|
94
102
|
raw?: unknown;
|
|
103
|
+
usage?: KortyxUsage;
|
|
104
|
+
finishReason?: KortyxFinishReason;
|
|
105
|
+
providerMetadata?: KortyxProviderMetadata;
|
|
106
|
+
warnings?: KortyxWarning[];
|
|
95
107
|
output?: TOutput;
|
|
96
108
|
interruptResponse?: TResponse;
|
|
97
109
|
};
|
|
@@ -112,4 +124,4 @@ declare function useInterrupt<TRequest extends InterruptInput = InterruptInput,
|
|
|
112
124
|
declare function useNodeState<T>(initialValue: T): [T, StateSetter<T>];
|
|
113
125
|
declare function useWorkflowState<T>(key: string, ...rest: [] | [T]): [T, StateSetter<T>];
|
|
114
126
|
|
|
115
|
-
export { type HookRuntimeContext, type UseInterruptArgs, type UseReasonArgs, type UseReasonResult, type UseStructuredDataArgs, runWithHookContext, useInterrupt, useNodeState, useReason, useStructuredData, useWorkflowState };
|
|
127
|
+
export { type HookRuntimeContext, ReasonTraceAdapter, type UseInterruptArgs, type UseReasonArgs, type UseReasonResult, type UseStructuredDataArgs, runWithHookContext, useInterrupt, useNodeState, useReason, useStructuredData, useWorkflowState };
|