@kortyx/hooks 0.25.3 → 0.27.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 +34 -0
- package/dist/index.d.ts +18 -4
- package/dist/index.js +943 -461
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +20 -3
- package/dist/internal.js +179 -5
- package/dist/internal.js.map +1 -1
- package/dist/{tracing-BI6YKHSf.d.ts → tracing-BsxYlgEw.d.ts} +16 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.27.0](https://github.com/kortyx-io/kortyx/compare/hooks-v0.26.0...hooks-v0.27.0) (2026-09-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **observability:** report handled workflow errors ([#222](https://github.com/kortyx-io/kortyx/issues/222)) ([68a3b0e](https://github.com/kortyx-io/kortyx/commit/68a3b0eea5d93cb89bdcef63c4767f3b0d59e60d))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @kortyx/telemetry-contracts bumped to 0.10.0
|
|
16
|
+
|
|
17
|
+
## [0.26.0](https://github.com/kortyx-io/kortyx/compare/hooks-v0.25.3...hooks-v0.26.0) (2026-09-18)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **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))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **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))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Dependencies
|
|
31
|
+
|
|
32
|
+
* The following workspace dependencies were updated
|
|
33
|
+
* dependencies
|
|
34
|
+
* @kortyx/providers bumped to 0.8.0
|
|
35
|
+
* @kortyx/telemetry-contracts bumped to 0.9.0
|
|
36
|
+
|
|
3
37
|
## [0.25.3](https://github.com/kortyx-io/kortyx/compare/hooks-v0.25.2...hooks-v0.25.3) (2026-09-16)
|
|
4
38
|
|
|
5
39
|
|
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,
|
|
3
|
+
import { K as KortyxTelemetryConfig, R as ReasonTraceAdapter, a as KortyxTraceMetadata, b as ReportErrorOptions, c as KortyxTelemetryEventType } from './tracing-BsxYlgEw.js';
|
|
4
|
+
export { E as EnsureWorkflowTopologyRequest, d as EnsureWorkflowTopologyResponse, e as KortyxErrorDetails, f as KortyxTelemetryContentCapture, g as KortyxTelemetryCorrelation, h as KortyxTelemetryEvent, i as KortyxTelemetryPrompt, j as KortyxTelemetryReporter, k as KortyxTelemetryService, l as KortyxTraceAdapter, m as KortyxTraceErrorProjection, n as ReasonTraceAttributes, o as ReasonTraceSpan, p as ReasonTraceSpanEndArgs, q as ReasonTraceSpanStartArgs } from './tracing-BsxYlgEw.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,18 @@ 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
|
+
/** Reports a handled error to the configured observer without stopping execution. */
|
|
254
|
+
declare function reportError(error: unknown, options?: ReportErrorOptions): void;
|
|
255
|
+
|
|
256
|
+
type UseToolArgs<T extends KortyxExecutableTool> = {
|
|
257
|
+
tool: T;
|
|
258
|
+
input: Parameters<T["execute"]> extends [] ? unknown : Parameters<T["execute"]>[0];
|
|
259
|
+
id?: string | undefined;
|
|
260
|
+
abortSignal?: AbortSignal | undefined;
|
|
261
|
+
};
|
|
262
|
+
declare function useTool<T extends KortyxExecutableTool>(args: UseToolArgs<T>): Promise<Awaited<ReturnType<T["execute"]>>>;
|
|
263
|
+
|
|
250
264
|
/** Best effort lifecycle facts. Engine snapshots and interrupt tokens never leave the runtime. */
|
|
251
265
|
declare function emitWorkflowCall(telemetry: KortyxTelemetryConfig | undefined, type: KortyxTelemetryEventType, payload: Record<string, unknown>): void;
|
|
252
266
|
|
|
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 };
|
|
267
|
+
export { type CompleteResponseOptions, type HookRuntimeContext, KortyxTelemetryConfig, KortyxTelemetryEventType, KortyxTraceMetadata, ParallelError, ReasonTraceAdapter, ReportErrorOptions, type UseInterruptArgs, type UseReasonArgs, type UseReasonResult, type UseReasonStep, type UseReasonToolExecution, type UseStructuredDataArgs, type UseToolArgs, WorkflowCallError, type WorkflowCallOutcome, type WorkflowCallService, completeResponse, createWorkflowHooks, emitWorkflowCall, parallel, reportError, runWithHookContext, useAbortSignal, useInterrupt, useNodeState, useReason, useRuntimeContext, useStructuredData, useTool, useWorkflow, useWorkflowState, workflowCallFingerprint };
|