@kortyx/hooks 0.25.2 → 0.26.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 +29 -0
- package/dist/index.d.ts +15 -4
- package/dist/index.js +911 -466
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +18 -3
- package/dist/internal.js +150 -5
- package/dist/internal.js.map +1 -1
- package/dist/{tracing-BI6YKHSf.d.ts → tracing-BUpf8RrV.d.ts} +7 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.26.0](https://github.com/kortyx-io/kortyx/compare/hooks-v0.25.3...hooks-v0.26.0) (2026-09-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **tools:** add useTool and first-class Studio observability ([#215](https://github.com/kortyx-io/kortyx/issues/215)) ([224c92d](https://github.com/kortyx-io/kortyx/commit/224c92d73caead320dd14582d8b624efc3252c9f))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **telemetry:** refresh model pricing and reject incomplete totals ([#213](https://github.com/kortyx-io/kortyx/issues/213)) ([b9e44f9](https://github.com/kortyx-io/kortyx/commit/b9e44f94c506f1d74b4f52a56b7b1998a1a932b5))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
* The following workspace dependencies were updated
|
|
19
|
+
* dependencies
|
|
20
|
+
* @kortyx/providers bumped to 0.8.0
|
|
21
|
+
* @kortyx/telemetry-contracts bumped to 0.9.0
|
|
22
|
+
|
|
23
|
+
## [0.25.3](https://github.com/kortyx-io/kortyx/compare/hooks-v0.25.2...hooks-v0.25.3) (2026-09-16)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Dependencies
|
|
27
|
+
|
|
28
|
+
* The following workspace dependencies were updated
|
|
29
|
+
* dependencies
|
|
30
|
+
* @kortyx/telemetry-contracts bumped to 0.8.0
|
|
31
|
+
|
|
3
32
|
## [0.25.2](https://github.com/kortyx-io/kortyx/compare/hooks-v0.25.1...hooks-v0.25.2) (2026-09-15)
|
|
4
33
|
|
|
5
34
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as _kortyx_core from '@kortyx/core';
|
|
2
2
|
import { WorkflowDefinition, TokenUsage, InterruptInput, GraphState, NodeConfig, InterruptResult } from '@kortyx/core';
|
|
3
|
-
import { K as KortyxTelemetryConfig, R as ReasonTraceAdapter, a as KortyxTraceMetadata, b as KortyxTelemetryEventType } from './tracing-
|
|
4
|
-
export { E as EnsureWorkflowTopologyRequest, c as EnsureWorkflowTopologyResponse, d as
|
|
3
|
+
import { K as KortyxTelemetryConfig, R as ReasonTraceAdapter, a as KortyxTraceMetadata, b as KortyxTelemetryEventType } from './tracing-BUpf8RrV.js';
|
|
4
|
+
export { E as EnsureWorkflowTopologyRequest, c as EnsureWorkflowTopologyResponse, d as KortyxErrorDetails, e as KortyxTelemetryContentCapture, f as KortyxTelemetryCorrelation, g as KortyxTelemetryEvent, h as KortyxTelemetryPrompt, i as KortyxTelemetryReporter, j as KortyxTelemetryService, k as KortyxTraceAdapter, l as KortyxTraceErrorProjection, m as ReasonTraceAttributes, n as ReasonTraceSpan, o as ReasonTraceSpanEndArgs, p as ReasonTraceSpanStartArgs } from './tracing-BUpf8RrV.js';
|
|
5
5
|
import { FailureDescriptor, KortyxError } from '@kortyx/core/errors';
|
|
6
|
+
import * as _kortyx_providers from '@kortyx/providers';
|
|
7
|
+
import { ToolObservation, ProviderModelRef, KortyxReasoningOptions, KortyxResponseFormat, KortyxExecutableTool, KortyxUsage, KortyxFinishReason, KortyxProviderMetadata, KortyxWarning, KortyxToolCall, KortyxToolResult } from '@kortyx/providers';
|
|
6
8
|
import { z } from 'zod';
|
|
7
|
-
import { ProviderModelRef, KortyxReasoningOptions, KortyxResponseFormat, KortyxExecutableTool, KortyxUsage, KortyxFinishReason, KortyxProviderMetadata, KortyxWarning, KortyxToolCall, KortyxToolResult } from '@kortyx/providers';
|
|
8
9
|
import '@kortyx/telemetry-contracts';
|
|
9
10
|
|
|
10
11
|
type CompleteResponseOptions = {
|
|
@@ -30,6 +31,7 @@ declare function parallel<const T extends readonly unknown[]>(values: T): Promis
|
|
|
30
31
|
type WorkflowCallOutcome = {
|
|
31
32
|
status: "completed";
|
|
32
33
|
data: Record<string, unknown>;
|
|
34
|
+
toolObservations?: ToolObservation[];
|
|
33
35
|
usage?: TokenUsage | undefined;
|
|
34
36
|
} | {
|
|
35
37
|
status: "interrupted";
|
|
@@ -203,6 +205,7 @@ type UseReasonArgs<TOutput = unknown, TRequest extends InterruptInput = Interrup
|
|
|
203
205
|
toolExecution?: UseReasonToolExecution | undefined;
|
|
204
206
|
};
|
|
205
207
|
type UseReasonStep = {
|
|
208
|
+
toolObservations?: _kortyx_providers.ToolObservation[];
|
|
206
209
|
stepIndex: number;
|
|
207
210
|
text: string;
|
|
208
211
|
toolCalls: KortyxToolCall[];
|
|
@@ -247,7 +250,15 @@ declare function useRuntimeContext<TContext extends Record<string, unknown> = Re
|
|
|
247
250
|
declare function useNodeState<T>(initialValue: T): [T, StateSetter<T>];
|
|
248
251
|
declare function useWorkflowState<T>(key: string, ...rest: [] | [T]): [T, StateSetter<T>];
|
|
249
252
|
|
|
253
|
+
type UseToolArgs<T extends KortyxExecutableTool> = {
|
|
254
|
+
tool: T;
|
|
255
|
+
input: Parameters<T["execute"]> extends [] ? unknown : Parameters<T["execute"]>[0];
|
|
256
|
+
id?: string | undefined;
|
|
257
|
+
abortSignal?: AbortSignal | undefined;
|
|
258
|
+
};
|
|
259
|
+
declare function useTool<T extends KortyxExecutableTool>(args: UseToolArgs<T>): Promise<Awaited<ReturnType<T["execute"]>>>;
|
|
260
|
+
|
|
250
261
|
/** Best effort lifecycle facts. Engine snapshots and interrupt tokens never leave the runtime. */
|
|
251
262
|
declare function emitWorkflowCall(telemetry: KortyxTelemetryConfig | undefined, type: KortyxTelemetryEventType, payload: Record<string, unknown>): void;
|
|
252
263
|
|
|
253
|
-
export { type CompleteResponseOptions, type HookRuntimeContext, KortyxTelemetryConfig, KortyxTelemetryEventType, KortyxTraceMetadata, ParallelError, ReasonTraceAdapter, type UseInterruptArgs, type UseReasonArgs, type UseReasonResult, type UseReasonStep, type UseReasonToolExecution, type UseStructuredDataArgs, WorkflowCallError, type WorkflowCallOutcome, type WorkflowCallService, completeResponse, createWorkflowHooks, emitWorkflowCall, parallel, runWithHookContext, useAbortSignal, useInterrupt, useNodeState, useReason, useRuntimeContext, useStructuredData, useWorkflow, useWorkflowState, workflowCallFingerprint };
|
|
264
|
+
export { type CompleteResponseOptions, type HookRuntimeContext, KortyxTelemetryConfig, KortyxTelemetryEventType, KortyxTraceMetadata, ParallelError, ReasonTraceAdapter, type UseInterruptArgs, type UseReasonArgs, type UseReasonResult, type UseReasonStep, type UseReasonToolExecution, type UseStructuredDataArgs, type UseToolArgs, WorkflowCallError, type WorkflowCallOutcome, type WorkflowCallService, completeResponse, createWorkflowHooks, emitWorkflowCall, parallel, runWithHookContext, useAbortSignal, useInterrupt, useNodeState, useReason, useRuntimeContext, useStructuredData, useTool, useWorkflow, useWorkflowState, workflowCallFingerprint };
|