kortyx 0.25.0 → 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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.26.0](https://github.com/kortyx-io/kortyx/compare/kortyx-v0.25.0...kortyx-v0.26.0) (2026-09-30)
4
+
5
+
6
+ ### Features
7
+
8
+ * **hooks:** add realtime model-selected output contracts ([#249](https://github.com/kortyx-io/kortyx/issues/249)) ([ac52b47](https://github.com/kortyx-io/kortyx/commit/ac52b47151b64ce5be6ce6c7fd42d34a0fa8a76d))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @kortyx/agent bumped to 0.28.0
16
+ * @kortyx/cli bumped to 0.11.4
17
+ * @kortyx/hooks bumped to 0.30.0
18
+ * @kortyx/runtime bumped to 0.21.4
19
+ * @kortyx/stream bumped to 0.15.0
20
+
3
21
  ## [0.25.0](https://github.com/kortyx-io/kortyx/compare/kortyx-v0.24.2...kortyx-v0.25.0) (2026-09-23)
4
22
 
5
23
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export * from '@kortyx/core/errors';
2
2
  export { Agent, AgentProcessOptions, ChatLifecycleErrorEvent, ChatLifecycleHookError, ChatLifecyclePhase, ChatRequestBody, ChatResponseFinalized, ChatResponseStatus, ChatRouteHandlerOptions, CheckpointRequestBody, CheckpointRouteHandlerOptions, CreateAgentArgs, ExecutableWorkflow, ExecuteOptions, ExecutionInfo, ExecutionInterrupt, ExecutionRequestError, ExecutionResult, InterruptScope, ListInterruptsOptions, PendingInterrupt, ResumableInterrupt, ResumeHandle, ResumeOptions, ResumeResponse, StreamChatFromRouteArgs, createAgent, createChatRouteHandler, createCheckpointRouteHandler, createFailureResponse, handleChatRequestBody, handleCheckpointRequestBody, parseChatRequestBody, parseCheckpointRequestBody, readRequestJson, streamChatFromRoute } from '@kortyx/agent';
3
3
  export { ExecutionLimit, ExecutionLimitReached, ExecutionLimits, GraphState, NodeConfig, NodeContext, NodeFn, NodeHandler, NodeResult, RuntimeEnvelope, WorkflowDefinition, WorkflowId, defineWorkflow, loadWorkflow, validateWorkflow } from '@kortyx/core';
4
- export { CompleteResponseOptions, EnsureWorkflowTopologyRequest, EnsureWorkflowTopologyResponse, InterruptContract, InterruptContractMap, InterruptHistoryEntry, KortyxErrorDetails, KortyxTelemetryConfig, KortyxTelemetryContentCapture, KortyxTelemetryCorrelation, KortyxTelemetryEvent, KortyxTelemetryEventType, KortyxTelemetryPrompt, KortyxTelemetryReporter, KortyxTelemetryService, KortyxTraceAdapter, KortyxTraceErrorProjection, KortyxTraceMetadata, ParallelError, ReportErrorOptions, UseContractInterruptArgs, UseInterruptArgs, UseReasonArgs, UseReasonInterruptConfig, UseReasonInterruptsConfig, UseReasonResult, UseReasonStep, UseReasonToolExecution, UseStructuredDataArgs, UseToolArgs, WorkflowCallError, completeResponse, createWorkflowHooks, defineInterruptContract, parallel, reportError, useAbortSignal, useInterrupt, useNodeState, useReason, useRuntimeContext, useStructuredData, useTool, useWorkflow, useWorkflowState } from '@kortyx/hooks';
4
+ export { CompleteResponseOptions, EnsureWorkflowTopologyRequest, EnsureWorkflowTopologyResponse, InterruptContract, InterruptContractMap, InterruptHistoryEntry, KortyxErrorDetails, KortyxTelemetryConfig, KortyxTelemetryContentCapture, KortyxTelemetryCorrelation, KortyxTelemetryEvent, KortyxTelemetryEventType, KortyxTelemetryPrompt, KortyxTelemetryReporter, KortyxTelemetryService, KortyxTraceAdapter, KortyxTraceErrorProjection, KortyxTraceMetadata, OutputContract, OutputContractEntry, OutputContractMap, ParallelError, ReportErrorOptions, UseContractInterruptArgs, UseContractStructuredDataArgs, UseInterruptArgs, UseReasonArgs, UseReasonInterruptConfig, UseReasonInterruptsConfig, UseReasonOutputsConfig, UseReasonResult, UseReasonStep, UseReasonToolExecution, UseStructuredDataArgs, UseToolArgs, WorkflowCallError, completeResponse, createWorkflowHooks, defineInterruptContract, defineOutputContract, parallel, reportError, useAbortSignal, useInterrupt, useNodeState, useReason, useRuntimeContext, useStructuredData, useTool, useWorkflow, useWorkflowState } from '@kortyx/hooks';
5
5
  export { CreateMCPClientArgs, MCPClient, McpToolsArgs, McpTransportConfig, createMCPClient } from '@kortyx/mcp';
6
6
  export * from '@kortyx/providers';
7
7
  export { CreateCachingFrameworkAdapterOptions, CreatePostgresFrameworkAdapterOptions, FrameworkAdapter, ManagedFrameworkAdapter, PostgresFrameworkAdapter, PruneRuntimeOptions, PruneRuntimeResult, RuntimeMaintenance, RuntimeRetentionPolicy, WorkflowRegistry, clearRegisteredNodes, createCachingFrameworkAdapter, createFileWorkflowRegistry, createFrameworkAdapterFromEnv, createInMemoryFrameworkAdapter, createInMemoryWorkflowRegistry, createPostgresFrameworkAdapter, createRedisFrameworkAdapter, getRegisteredNode, listRegisteredNodes, registerNode } from '@kortyx/runtime';
package/dist/index.js CHANGED
@@ -47,6 +47,7 @@ __export(index_exports, {
47
47
  createStructuredStreamAccumulator: () => import_stream.createStructuredStreamAccumulator,
48
48
  createWorkflowHooks: () => import_hooks.createWorkflowHooks,
49
49
  defineInterruptContract: () => import_hooks.defineInterruptContract,
50
+ defineOutputContract: () => import_hooks.defineOutputContract,
50
51
  defineWorkflow: () => import_core.defineWorkflow,
51
52
  getRegisteredNode: () => import_runtime.getRegisteredNode,
52
53
  handleChatRequestBody: () => import_agent.handleChatRequestBody,
@@ -114,6 +115,7 @@ var import_stream = require("@kortyx/stream");
114
115
  createStructuredStreamAccumulator,
115
116
  createWorkflowHooks,
116
117
  defineInterruptContract,
118
+ defineOutputContract,
117
119
  defineWorkflow,
118
120
  getRegisteredNode,
119
121
  handleChatRequestBody,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"@kortyx/core/errors\";\n// release-test: 2026-01-22\n// Public DX surface for the Kortyx framework.\n\nexport type {\n Agent,\n AgentProcessOptions,\n ChatLifecycleErrorEvent,\n ChatLifecyclePhase,\n ChatRequestBody,\n ChatResponseFinalized,\n ChatResponseStatus,\n ChatRouteHandlerOptions,\n CheckpointRequestBody,\n CheckpointRouteHandlerOptions,\n CreateAgentArgs,\n ExecutableWorkflow,\n ExecuteOptions,\n ExecutionInfo,\n ExecutionInterrupt,\n ExecutionResult,\n InterruptScope,\n ListInterruptsOptions,\n PendingInterrupt,\n ResumableInterrupt,\n ResumeHandle,\n ResumeOptions,\n ResumeResponse,\n StreamChatFromRouteArgs,\n} from \"@kortyx/agent\";\nexport {\n ChatLifecycleHookError,\n createAgent,\n createChatRouteHandler,\n createCheckpointRouteHandler,\n createFailureResponse,\n ExecutionRequestError,\n handleChatRequestBody,\n handleCheckpointRequestBody,\n parseChatRequestBody,\n parseCheckpointRequestBody,\n readRequestJson,\n streamChatFromRoute,\n} from \"@kortyx/agent\";\nexport type {\n ExecutionLimit,\n ExecutionLimitReached,\n ExecutionLimits,\n GraphState,\n NodeConfig,\n NodeContext,\n NodeFn,\n NodeHandler,\n NodeResult,\n RuntimeEnvelope,\n WorkflowDefinition,\n WorkflowId,\n} from \"@kortyx/core\";\nexport { defineWorkflow, loadWorkflow, validateWorkflow } from \"@kortyx/core\";\nexport type {\n EnsureWorkflowTopologyRequest,\n EnsureWorkflowTopologyResponse,\n InterruptContract,\n InterruptContractMap,\n InterruptHistoryEntry,\n KortyxErrorDetails,\n KortyxTelemetryConfig,\n KortyxTelemetryContentCapture,\n KortyxTelemetryCorrelation,\n KortyxTelemetryEvent,\n KortyxTelemetryEventType,\n KortyxTelemetryPrompt,\n KortyxTelemetryReporter,\n KortyxTelemetryService,\n KortyxTraceAdapter,\n KortyxTraceErrorProjection,\n KortyxTraceMetadata,\n ReportErrorOptions,\n UseContractInterruptArgs,\n UseInterruptArgs,\n UseReasonArgs,\n UseReasonInterruptConfig,\n UseReasonInterruptsConfig,\n UseReasonResult,\n UseReasonStep,\n UseReasonToolExecution,\n UseStructuredDataArgs,\n UseToolArgs,\n} from \"@kortyx/hooks\";\nexport {\n type CompleteResponseOptions,\n completeResponse,\n createWorkflowHooks,\n defineInterruptContract,\n ParallelError,\n parallel,\n reportError,\n useAbortSignal,\n useInterrupt,\n useNodeState,\n useReason,\n useRuntimeContext,\n useStructuredData,\n useTool,\n useWorkflow,\n useWorkflowState,\n WorkflowCallError,\n} from \"@kortyx/hooks\";\nexport type {\n CreateMCPClientArgs,\n MCPClient,\n McpToolsArgs,\n McpTransportConfig,\n} from \"@kortyx/mcp\";\nexport { createMCPClient } from \"@kortyx/mcp\";\nexport * from \"@kortyx/providers\";\nexport type {\n CreateCachingFrameworkAdapterOptions,\n CreatePostgresFrameworkAdapterOptions,\n FrameworkAdapter,\n ManagedFrameworkAdapter,\n PostgresFrameworkAdapter,\n PruneRuntimeOptions,\n PruneRuntimeResult,\n RuntimeMaintenance,\n RuntimeRetentionPolicy,\n WorkflowRegistry,\n} from \"@kortyx/runtime\";\nexport {\n clearRegisteredNodes,\n createCachingFrameworkAdapter,\n createFileWorkflowRegistry,\n createFrameworkAdapterFromEnv,\n createInMemoryFrameworkAdapter,\n createInMemoryWorkflowRegistry,\n createPostgresFrameworkAdapter,\n createRedisFrameworkAdapter,\n getRegisteredNode,\n listRegisteredNodes,\n registerNode,\n} from \"@kortyx/runtime\";\nexport type {\n BufferedStreamResult,\n ConsumeStreamHandlers,\n FinalizedChatContentPiece,\n FinalizedChatMessage,\n StreamChunk,\n StructuredDataChunk,\n StructuredStreamAccumulator,\n StructuredStreamState,\n} from \"@kortyx/stream\";\nexport {\n applyStructuredChunk,\n collectBufferedStream,\n collectStream,\n consumeStream,\n createFinalizedChatMessageAccumulator,\n createStreamResponse,\n createStructuredStreamAccumulator,\n projectInterruptPiece,\n readStream,\n reduceStructuredChunks,\n summarizeStreamChunks,\n toSSE,\n} from \"@kortyx/stream\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,gCAAd;AA8BA,mBAaO;AAeP,kBAA+D;AA+B/D,mBAkBO;AAOP,iBAAgC;AAChC,0BAAc,8BAnHd;AAgIA,qBAYO;AAWP,oBAaO;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"@kortyx/core/errors\";\n// release-test: 2026-01-22\n// Public DX surface for the Kortyx framework.\n\nexport type {\n Agent,\n AgentProcessOptions,\n ChatLifecycleErrorEvent,\n ChatLifecyclePhase,\n ChatRequestBody,\n ChatResponseFinalized,\n ChatResponseStatus,\n ChatRouteHandlerOptions,\n CheckpointRequestBody,\n CheckpointRouteHandlerOptions,\n CreateAgentArgs,\n ExecutableWorkflow,\n ExecuteOptions,\n ExecutionInfo,\n ExecutionInterrupt,\n ExecutionResult,\n InterruptScope,\n ListInterruptsOptions,\n PendingInterrupt,\n ResumableInterrupt,\n ResumeHandle,\n ResumeOptions,\n ResumeResponse,\n StreamChatFromRouteArgs,\n} from \"@kortyx/agent\";\nexport {\n ChatLifecycleHookError,\n createAgent,\n createChatRouteHandler,\n createCheckpointRouteHandler,\n createFailureResponse,\n ExecutionRequestError,\n handleChatRequestBody,\n handleCheckpointRequestBody,\n parseChatRequestBody,\n parseCheckpointRequestBody,\n readRequestJson,\n streamChatFromRoute,\n} from \"@kortyx/agent\";\nexport type {\n ExecutionLimit,\n ExecutionLimitReached,\n ExecutionLimits,\n GraphState,\n NodeConfig,\n NodeContext,\n NodeFn,\n NodeHandler,\n NodeResult,\n RuntimeEnvelope,\n WorkflowDefinition,\n WorkflowId,\n} from \"@kortyx/core\";\nexport { defineWorkflow, loadWorkflow, validateWorkflow } from \"@kortyx/core\";\nexport type {\n EnsureWorkflowTopologyRequest,\n EnsureWorkflowTopologyResponse,\n InterruptContract,\n InterruptContractMap,\n InterruptHistoryEntry,\n KortyxErrorDetails,\n KortyxTelemetryConfig,\n KortyxTelemetryContentCapture,\n KortyxTelemetryCorrelation,\n KortyxTelemetryEvent,\n KortyxTelemetryEventType,\n KortyxTelemetryPrompt,\n KortyxTelemetryReporter,\n KortyxTelemetryService,\n KortyxTraceAdapter,\n KortyxTraceErrorProjection,\n KortyxTraceMetadata,\n OutputContract,\n OutputContractEntry,\n OutputContractMap,\n ReportErrorOptions,\n UseContractInterruptArgs,\n UseContractStructuredDataArgs,\n UseInterruptArgs,\n UseReasonArgs,\n UseReasonInterruptConfig,\n UseReasonInterruptsConfig,\n UseReasonOutputsConfig,\n UseReasonResult,\n UseReasonStep,\n UseReasonToolExecution,\n UseStructuredDataArgs,\n UseToolArgs,\n} from \"@kortyx/hooks\";\nexport {\n type CompleteResponseOptions,\n completeResponse,\n createWorkflowHooks,\n defineInterruptContract,\n defineOutputContract,\n ParallelError,\n parallel,\n reportError,\n useAbortSignal,\n useInterrupt,\n useNodeState,\n useReason,\n useRuntimeContext,\n useStructuredData,\n useTool,\n useWorkflow,\n useWorkflowState,\n WorkflowCallError,\n} from \"@kortyx/hooks\";\nexport type {\n CreateMCPClientArgs,\n MCPClient,\n McpToolsArgs,\n McpTransportConfig,\n} from \"@kortyx/mcp\";\nexport { createMCPClient } from \"@kortyx/mcp\";\nexport * from \"@kortyx/providers\";\nexport type {\n CreateCachingFrameworkAdapterOptions,\n CreatePostgresFrameworkAdapterOptions,\n FrameworkAdapter,\n ManagedFrameworkAdapter,\n PostgresFrameworkAdapter,\n PruneRuntimeOptions,\n PruneRuntimeResult,\n RuntimeMaintenance,\n RuntimeRetentionPolicy,\n WorkflowRegistry,\n} from \"@kortyx/runtime\";\nexport {\n clearRegisteredNodes,\n createCachingFrameworkAdapter,\n createFileWorkflowRegistry,\n createFrameworkAdapterFromEnv,\n createInMemoryFrameworkAdapter,\n createInMemoryWorkflowRegistry,\n createPostgresFrameworkAdapter,\n createRedisFrameworkAdapter,\n getRegisteredNode,\n listRegisteredNodes,\n registerNode,\n} from \"@kortyx/runtime\";\nexport type {\n BufferedStreamResult,\n ConsumeStreamHandlers,\n FinalizedChatContentPiece,\n FinalizedChatMessage,\n StreamChunk,\n StructuredDataChunk,\n StructuredStreamAccumulator,\n StructuredStreamState,\n} from \"@kortyx/stream\";\nexport {\n applyStructuredChunk,\n collectBufferedStream,\n collectStream,\n consumeStream,\n createFinalizedChatMessageAccumulator,\n createStreamResponse,\n createStructuredStreamAccumulator,\n projectInterruptPiece,\n readStream,\n reduceStructuredChunks,\n summarizeStreamChunks,\n toSSE,\n} from \"@kortyx/stream\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,gCAAd;AA8BA,mBAaO;AAeP,kBAA+D;AAoC/D,mBAmBO;AAOP,iBAAgC;AAChC,0BAAc,8BAzHd;AAsIA,qBAYO;AAWP,oBAaO;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kortyx",
3
- "version": "0.25.0",
3
+ "version": "0.26.0",
4
4
  "private": false,
5
5
  "description": "TypeScript framework for production AI agents with explicit workflows, provider-agnostic models, streaming, interrupts, and runtime persistence.",
6
6
  "keywords": [
@@ -43,15 +43,15 @@
43
43
  "CHANGELOG.md"
44
44
  ],
45
45
  "dependencies": {
46
- "@kortyx/cli": "0.11.3",
46
+ "@kortyx/agent": "0.28.0",
47
+ "@kortyx/hooks": "0.30.0",
48
+ "@kortyx/cli": "0.11.4",
47
49
  "@kortyx/core": "0.11.0",
48
- "@kortyx/hooks": "0.29.0",
49
50
  "@kortyx/mcp": "0.2.7",
50
- "@kortyx/agent": "0.27.0",
51
51
  "@kortyx/providers": "0.8.3",
52
- "@kortyx/stream": "0.14.0",
52
+ "@kortyx/stream": "0.15.0",
53
53
  "@kortyx/utils": "0.3.3",
54
- "@kortyx/runtime": "0.21.3"
54
+ "@kortyx/runtime": "0.21.4"
55
55
  },
56
56
  "devDependencies": {
57
57
  "turbo": "2.6.1",