@ekairos/events 1.22.42-beta.development.0 → 1.22.44-beta.development.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.
@@ -8,8 +8,6 @@ export declare const EXECUTION_STATUSES: readonly ["executing", "completed", "fa
8
8
  export type ExecutionStatus = (typeof EXECUTION_STATUSES)[number];
9
9
  export declare const STEP_STATUSES: readonly ["running", "completed", "failed"];
10
10
  export type StepStatus = (typeof STEP_STATUSES)[number];
11
- export declare const STEP_KINDS: readonly ["message", "action_execute", "action_result"];
12
- export type StepKind = (typeof STEP_KINDS)[number];
13
11
  export declare const ITEM_STATUSES: readonly ["stored", "pending", "completed"];
14
12
  export type ItemStatus = (typeof ITEM_STATUSES)[number];
15
13
  export declare const ITEM_TYPES: readonly ["input", "output"];
@@ -21,11 +19,11 @@ export type TraceEventKind = (typeof TRACE_EVENT_KINDS)[number];
21
19
  export declare const STREAM_LIFECYCLE_CHUNK_TYPES: readonly ["chunk.start", "chunk.start_step", "chunk.finish_step", "chunk.finish"];
22
20
  export declare const STREAM_TEXT_CHUNK_TYPES: readonly ["chunk.text_start", "chunk.text_delta", "chunk.text_end"];
23
21
  export declare const STREAM_REASONING_CHUNK_TYPES: readonly ["chunk.reasoning_start", "chunk.reasoning_delta", "chunk.reasoning_end"];
24
- export declare const STREAM_ACTION_CHUNK_TYPES: readonly ["chunk.action_input_start", "chunk.action_input_delta", "chunk.action_input_available", "chunk.action_output_available", "chunk.action_output_error"];
22
+ export declare const STREAM_ACTION_CHUNK_TYPES: readonly ["chunk.action_started", "chunk.action_input_delta", "chunk.action_completed", "chunk.action_failed"];
25
23
  export declare const STREAM_SOURCE_CHUNK_TYPES: readonly ["chunk.source_url", "chunk.source_document", "chunk.file"];
26
24
  export declare const STREAM_METADATA_CHUNK_TYPES: readonly ["chunk.message_metadata", "chunk.response_metadata"];
27
25
  export declare const STREAM_ERROR_CHUNK_TYPES: readonly ["chunk.error", "chunk.unknown"];
28
- export declare const CONTEXT_STREAM_CHUNK_TYPES: readonly ["chunk.start", "chunk.start_step", "chunk.finish_step", "chunk.finish", "chunk.text_start", "chunk.text_delta", "chunk.text_end", "chunk.reasoning_start", "chunk.reasoning_delta", "chunk.reasoning_end", "chunk.action_input_start", "chunk.action_input_delta", "chunk.action_input_available", "chunk.action_output_available", "chunk.action_output_error", "chunk.source_url", "chunk.source_document", "chunk.file", "chunk.message_metadata", "chunk.response_metadata", "chunk.error", "chunk.unknown"];
26
+ export declare const CONTEXT_STREAM_CHUNK_TYPES: readonly ["chunk.start", "chunk.start_step", "chunk.finish_step", "chunk.finish", "chunk.text_start", "chunk.text_delta", "chunk.text_end", "chunk.reasoning_start", "chunk.reasoning_delta", "chunk.reasoning_end", "chunk.action_started", "chunk.action_input_delta", "chunk.action_completed", "chunk.action_failed", "chunk.source_url", "chunk.source_document", "chunk.file", "chunk.message_metadata", "chunk.response_metadata", "chunk.error", "chunk.unknown"];
29
27
  export type ContextStreamChunkType = (typeof CONTEXT_STREAM_CHUNK_TYPES)[number];
30
28
  export declare function isContextStreamChunkType(value: string): value is ContextStreamChunkType;
31
29
  export type ContextTransition = Transition<"open_idle" | "open_streaming" | "closed", "open_idle" | "open_streaming" | "closed">;
@@ -1,11 +1,6 @@
1
1
  export const CONTEXT_STATUSES = ["open_idle", "open_streaming", "closed"];
2
2
  export const EXECUTION_STATUSES = ["executing", "completed", "failed"];
3
3
  export const STEP_STATUSES = ["running", "completed", "failed"];
4
- export const STEP_KINDS = [
5
- "message",
6
- "action_execute",
7
- "action_result",
8
- ];
9
4
  export const ITEM_STATUSES = ["stored", "pending", "completed"];
10
5
  export const ITEM_TYPES = [
11
6
  "input",
@@ -41,11 +36,10 @@ export const STREAM_REASONING_CHUNK_TYPES = [
41
36
  "chunk.reasoning_end",
42
37
  ];
43
38
  export const STREAM_ACTION_CHUNK_TYPES = [
44
- "chunk.action_input_start",
39
+ "chunk.action_started",
45
40
  "chunk.action_input_delta",
46
- "chunk.action_input_available",
47
- "chunk.action_output_available",
48
- "chunk.action_output_error",
41
+ "chunk.action_completed",
42
+ "chunk.action_failed",
49
43
  ];
50
44
  export const STREAM_SOURCE_CHUNK_TYPES = [
51
45
  "chunk.source_url",
@@ -115,8 +115,8 @@ async function writeActionResultPartChunks(params) {
115
115
  if (!actionRef || !actionName)
116
116
  continue;
117
117
  const chunkType = result.success
118
- ? "chunk.action_output_available"
119
- : "chunk.action_output_error";
118
+ ? "chunk.action_completed"
119
+ : "chunk.action_failed";
120
120
  const identity = resolveContextPartChunkIdentity({
121
121
  stepId: params.session.stepId,
122
122
  provider: "ekairos",
@@ -151,8 +151,8 @@ async function writeActionResultPartChunks(params) {
151
151
  partSlot: identity.partSlot,
152
152
  provider: "ekairos",
153
153
  providerChunkType: result.success
154
- ? "action_output_available"
155
- : "action_output_error",
154
+ ? "action_completed"
155
+ : "action_failed",
156
156
  actionRef,
157
157
  data,
158
158
  });
@@ -170,8 +170,8 @@ async function writeActionResultPartChunks(params) {
170
170
  sequence,
171
171
  provider: "ekairos",
172
172
  providerChunkType: result.success
173
- ? "action_output_available"
174
- : "action_output_error",
173
+ ? "action_completed"
174
+ : "action_failed",
175
175
  actionRef,
176
176
  partId: identity.partId,
177
177
  providerPartId: identity.providerPartId,
@@ -368,11 +368,13 @@ async function createRuntimeOps(runtimeHandle, benchmark) {
368
368
  return { stepId };
369
369
  },
370
370
  updateContextStep: async (params) => {
371
+ const update = { updatedAt: new Date() };
372
+ if (params.patch.status !== undefined)
373
+ update.status = params.patch.status;
374
+ if (params.patch.errorText !== undefined)
375
+ update.errorText = params.patch.errorText;
371
376
  await instrumentedDb.transact([
372
- instrumentedDb.tx.event_steps[params.stepId].update({
373
- ...params.patch,
374
- updatedAt: new Date(),
375
- }),
377
+ instrumentedDb.tx.event_steps[params.stepId].update(update),
376
378
  ]);
377
379
  },
378
380
  finalizeReactionStep: async (params) => {
@@ -383,11 +385,13 @@ async function createRuntimeOps(runtimeHandle, benchmark) {
383
385
  mode: "close",
384
386
  });
385
387
  }
388
+ const update = { updatedAt: new Date() };
389
+ if (params.patch.status !== undefined)
390
+ update.status = params.patch.status;
391
+ if (params.patch.errorText !== undefined)
392
+ update.errorText = params.patch.errorText;
386
393
  await instrumentedDb.transact([
387
- instrumentedDb.tx.event_steps[params.stepId].update({
388
- ...params.patch,
389
- updatedAt: new Date(),
390
- }),
394
+ instrumentedDb.tx.event_steps[params.stepId].update(update),
391
395
  ]);
392
396
  if (!params.reactionEventId || !params.reactionEvent) {
393
397
  return {};
@@ -887,7 +891,6 @@ export class ContextEngine {
887
891
  }));
888
892
  }
889
893
  story.opts.onEventCreated?.(assistantEventEffective);
890
- const firstActionRequest = actionRequests?.[0];
891
894
  await emitContextEvents({
892
895
  silent,
893
896
  writable,
@@ -899,10 +902,6 @@ export class ContextEngine {
899
902
  executionId,
900
903
  iteration: iter,
901
904
  status: "running",
902
- kind: firstActionRequest ? "action_execute" : "message",
903
- actionName: firstActionRequest && typeof firstActionRequest.actionName === "string"
904
- ? firstActionRequest.actionName
905
- : undefined,
906
905
  },
907
906
  ],
908
907
  });
@@ -919,10 +918,6 @@ export class ContextEngine {
919
918
  stepId: openedStep.stepId,
920
919
  patch: {
921
920
  status: "completed",
922
- kind: "message",
923
- actionRequests: [],
924
- actionResults: [],
925
- continueLoop: false,
926
921
  },
927
922
  reactionEventId,
928
923
  reactionEvent: completedReactionEvent,
@@ -943,7 +938,6 @@ export class ContextEngine {
943
938
  executionId,
944
939
  iteration: iter,
945
940
  status: "completed",
946
- kind: "message",
947
941
  },
948
942
  {
949
943
  type: "step.completed",
@@ -1129,7 +1123,6 @@ export class ContextEngine {
1129
1123
  actionRequests,
1130
1124
  actionResults: actionResults,
1131
1125
  }));
1132
- const firstActionResult = actionResults?.[0];
1133
1126
  const finalizedReactionStatus = continueLoop === false ? "completed" : "pending";
1134
1127
  const finalizedReactionEvent = {
1135
1128
  ...reactionEvent,
@@ -1140,20 +1133,6 @@ export class ContextEngine {
1140
1133
  stepId: openedStep.stepId,
1141
1134
  patch: {
1142
1135
  status: "completed",
1143
- kind: actionRequests?.length ? "action_result" : "message",
1144
- actionName: typeof firstActionResult?.actionRequest?.actionName === "string"
1145
- ? firstActionResult.actionRequest.actionName
1146
- : undefined,
1147
- actionInput: firstActionResult?.actionRequest?.input,
1148
- actionOutput: firstActionResult?.success === true
1149
- ? firstActionResult?.output
1150
- : undefined,
1151
- actionError: firstActionResult?.success === false
1152
- ? String(firstActionResult?.errorText ?? "action_execution_failed")
1153
- : undefined,
1154
- actionRequests,
1155
- actionResults,
1156
- continueLoop: continueLoop !== false,
1157
1136
  },
1158
1137
  reactionEventId,
1159
1138
  reactionEvent: finalizedReactionEvent,
@@ -1174,10 +1153,6 @@ export class ContextEngine {
1174
1153
  executionId,
1175
1154
  iteration: iter,
1176
1155
  status: "completed",
1177
- kind: actionRequests?.length ? "action_result" : "message",
1178
- actionName: typeof firstActionResult?.actionRequest?.actionName === "string"
1179
- ? firstActionResult.actionRequest.actionName
1180
- : undefined,
1181
1156
  },
1182
1157
  {
1183
1158
  type: "step.completed",
@@ -146,11 +146,10 @@ export function resolveContextStreamPartType(chunkType) {
146
146
  if (chunkType === "chunk.source_url" || chunkType === "chunk.source_document") {
147
147
  return "source";
148
148
  }
149
- if (chunkType === "chunk.action_input_start" ||
149
+ if (chunkType === "chunk.action_started" ||
150
150
  chunkType === "chunk.action_input_delta" ||
151
- chunkType === "chunk.action_input_available" ||
152
- chunkType === "chunk.action_output_available" ||
153
- chunkType === "chunk.action_output_error") {
151
+ chunkType === "chunk.action_completed" ||
152
+ chunkType === "chunk.action_failed") {
154
153
  return "action";
155
154
  }
156
155
  return undefined;
@@ -163,9 +162,9 @@ export function resolveContextStreamPartSlot(chunkType, partType = resolveContex
163
162
  if (partType === "source")
164
163
  return "source";
165
164
  if (partType === "action") {
166
- if (chunkType === "chunk.action_output_error")
165
+ if (chunkType === "chunk.action_failed")
167
166
  return "action:failed";
168
- if (chunkType === "chunk.action_output_available")
167
+ if (chunkType === "chunk.action_completed")
169
168
  return "action:completed";
170
169
  return "action:started";
171
170
  }
@@ -1,5 +1,5 @@
1
1
  import type { ModelMessage } from "ai";
2
- import type { ContextStatus, ExecutionStatus, StepStatus, StepKind, ItemStatus, ItemType, Channel } from "./context.contract.js";
2
+ import type { ContextStatus, ExecutionStatus, StepStatus, ItemStatus, ItemType, Channel } from "./context.contract.js";
3
3
  export type ContextIdentifier = {
4
4
  id: string;
5
5
  key?: never;
@@ -43,14 +43,6 @@ export type ContextStep = {
43
43
  updatedAt?: Date;
44
44
  status: StepStatus;
45
45
  iteration: number;
46
- kind?: StepKind;
47
- actionName?: string;
48
- actionInput?: unknown;
49
- actionOutput?: unknown;
50
- actionError?: string;
51
- actionRequests?: any;
52
- actionResults?: any;
53
- continueLoop?: boolean;
54
46
  errorText?: string;
55
47
  };
56
48
  export type ContextExecution = {
@@ -80,7 +72,7 @@ export interface ContextStore {
80
72
  }): Promise<{
81
73
  id: string;
82
74
  }>;
83
- updateStep(stepId: string, patch: Partial<Pick<ContextStep, "status" | "kind" | "actionName" | "actionInput" | "actionOutput" | "actionError" | "actionRequests" | "actionResults" | "continueLoop" | "errorText" | "updatedAt">>): Promise<void>;
75
+ updateStep(stepId: string, patch: Partial<Pick<ContextStep, "status" | "errorText" | "updatedAt">>): Promise<void>;
84
76
  saveStepParts(params: {
85
77
  stepId: string;
86
78
  parts: any[];
@@ -1,4 +1,4 @@
1
- import type { ContextStatus, ExecutionStatus, ItemStatus, ItemType, StepKind, StepStatus, ContextStreamChunkType } from "./context.contract.js";
1
+ import type { ContextStatus, ExecutionStatus, ItemStatus, ItemType, StepStatus, ContextStreamChunkType } from "./context.contract.js";
2
2
  type IsoDateString = string;
3
3
  type ContextStreamEventBase = {
4
4
  type: string;
@@ -83,8 +83,6 @@ export type StepUpdatedEvent = ContextStreamEventBase & {
83
83
  executionId: string;
84
84
  iteration?: number;
85
85
  status?: StepStatus;
86
- kind?: StepKind;
87
- actionName?: string;
88
86
  };
89
87
  export type StepCompletedEvent = ContextStreamEventBase & {
90
88
  type: "step.completed";
@@ -92,8 +92,6 @@ export function parseContextStreamEvent(value) {
92
92
  if (value.iteration !== undefined)
93
93
  assertNumber(value.iteration, `${type}.iteration`);
94
94
  assertOptionalString(value.status, `${type}.status`);
95
- assertOptionalString(value.kind, `${type}.kind`);
96
- assertOptionalString(value.actionName, `${type}.actionName`);
97
95
  return value;
98
96
  }
99
97
  case "step.completed":
package/dist/index.d.ts CHANGED
@@ -8,8 +8,8 @@ export { actionsToActionSpecs, actionSpecToAiSdkTool, type SerializableActionSpe
8
8
  export { reactorMetadataSchema, contextPartSchema, contextPartEnvelopeSchema, contextPartContentSchema, contextMessagePartSchema, contextReasoningPartSchema, contextSourcePartSchema, contextActionPartSchema, contextEnginePartSchema, createContextPartSchema, parseContextPart, isContextPartEnvelope, parseContextPartEnvelope, normalizePartsForPersistence, } from "./context.parts.js";
9
9
  export type { ReactorMetadata, ContextEnginePart, ContextActionPart, ContextActionStartedPart, ContextActionCompletedPart, ContextActionFailedPart, ContextPartActionMap, ContextPart, ContextPartEnvelope, ContextPartContent, ContextInlineContent, } from "./context.parts.js";
10
10
  export { INPUT_ITEM_TYPE, INPUT_TEXT_ITEM_TYPE, OUTPUT_ITEM_TYPE, WEB_CHANNEL, AGENT_CHANNEL, EMAIL_CHANNEL, createUserItemFromUIMessages, createAssistantItemFromUIMessages, convertToUIMessage, convertItemToModelMessages, convertItemsToModelMessages, convertModelMessageToItem, isContextOutputPart, normalizeContextOutputPart, type ResponseMessage, type ContextOutputPart, type ContextOutputContentPart, } from "./context.events.js";
11
- export { CONTEXT_STATUSES, EXECUTION_STATUSES, STEP_STATUSES, STEP_KINDS, ITEM_STATUSES, ITEM_TYPES, CHANNELS, TRACE_EVENT_KINDS, CONTEXT_STREAM_CHUNK_TYPES, STREAM_LIFECYCLE_CHUNK_TYPES, STREAM_TEXT_CHUNK_TYPES, STREAM_REASONING_CHUNK_TYPES, STREAM_ACTION_CHUNK_TYPES, STREAM_SOURCE_CHUNK_TYPES, STREAM_METADATA_CHUNK_TYPES, STREAM_ERROR_CHUNK_TYPES, CONTEXT_TRANSITIONS, EXECUTION_TRANSITIONS, STEP_TRANSITIONS, ITEM_TRANSITIONS, canContextTransition, canExecutionTransition, canStepTransition, canItemTransition, assertContextTransition, assertExecutionTransition, assertStepTransition, assertItemTransition, isContextStreamChunkType, assertContextPartKey, } from "./context.contract.js";
12
- export type { Transition, ContextStatus, ExecutionStatus, StepStatus, StepKind, ItemStatus, ItemType, Channel, TraceEventKind, ContextStreamChunkType, ContextTransition, ExecutionTransition, StepTransition, ItemTransition, } from "./context.contract.js";
11
+ export { CONTEXT_STATUSES, EXECUTION_STATUSES, STEP_STATUSES, ITEM_STATUSES, ITEM_TYPES, CHANNELS, TRACE_EVENT_KINDS, CONTEXT_STREAM_CHUNK_TYPES, STREAM_LIFECYCLE_CHUNK_TYPES, STREAM_TEXT_CHUNK_TYPES, STREAM_REASONING_CHUNK_TYPES, STREAM_ACTION_CHUNK_TYPES, STREAM_SOURCE_CHUNK_TYPES, STREAM_METADATA_CHUNK_TYPES, STREAM_ERROR_CHUNK_TYPES, CONTEXT_TRANSITIONS, EXECUTION_TRANSITIONS, STEP_TRANSITIONS, ITEM_TRANSITIONS, canContextTransition, canExecutionTransition, canStepTransition, canItemTransition, assertContextTransition, assertExecutionTransition, assertStepTransition, assertItemTransition, isContextStreamChunkType, assertContextPartKey, } from "./context.contract.js";
12
+ export type { Transition, ContextStatus, ExecutionStatus, StepStatus, ItemStatus, ItemType, Channel, TraceEventKind, ContextStreamChunkType, ContextTransition, ExecutionTransition, StepTransition, ItemTransition, } from "./context.contract.js";
13
13
  export { DEFAULT_CODEX_TOOL_NAME, DEFAULT_CODEX_MODEL, codexToolInputSchema, buildDefaultCodexNarrative, didCodexToolExecute, createCodexContextBuilder, type CodexContextRuntimeMode, type CodexContextReasoningLevel, type CodexContextRuntime, type CodexContextEnv, type CodexToolInput, type CodexToolOutput, type CodexExecuteArgs, type CodexContextBuilderConfig, type CodexContextBuilder, } from "./codex.js";
14
14
  export { useContext, type ContextSnapshot, type ContextStreamChunk, type UseContextOptions, } from "./react.js";
15
15
  export { parseContextStreamEvent, assertContextStreamTransitions, validateContextStreamTimeline, } from "./context.stream.js";
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ export { didToolExecute, extractToolCallsFromParts } from "./context.toolcalls.j
5
5
  export { actionsToActionSpecs, actionSpecToAiSdkTool, } from "./tools-to-model-tools.js";
6
6
  export { reactorMetadataSchema, contextPartSchema, contextPartEnvelopeSchema, contextPartContentSchema, contextMessagePartSchema, contextReasoningPartSchema, contextSourcePartSchema, contextActionPartSchema, contextEnginePartSchema, createContextPartSchema, parseContextPart, isContextPartEnvelope, parseContextPartEnvelope, normalizePartsForPersistence, } from "./context.parts.js";
7
7
  export { INPUT_ITEM_TYPE, INPUT_TEXT_ITEM_TYPE, OUTPUT_ITEM_TYPE, WEB_CHANNEL, AGENT_CHANNEL, EMAIL_CHANNEL, createUserItemFromUIMessages, createAssistantItemFromUIMessages, convertToUIMessage, convertItemToModelMessages, convertItemsToModelMessages, convertModelMessageToItem, isContextOutputPart, normalizeContextOutputPart, } from "./context.events.js";
8
- export { CONTEXT_STATUSES, EXECUTION_STATUSES, STEP_STATUSES, STEP_KINDS, ITEM_STATUSES, ITEM_TYPES, CHANNELS, TRACE_EVENT_KINDS, CONTEXT_STREAM_CHUNK_TYPES, STREAM_LIFECYCLE_CHUNK_TYPES, STREAM_TEXT_CHUNK_TYPES, STREAM_REASONING_CHUNK_TYPES, STREAM_ACTION_CHUNK_TYPES, STREAM_SOURCE_CHUNK_TYPES, STREAM_METADATA_CHUNK_TYPES, STREAM_ERROR_CHUNK_TYPES, CONTEXT_TRANSITIONS, EXECUTION_TRANSITIONS, STEP_TRANSITIONS, ITEM_TRANSITIONS, canContextTransition, canExecutionTransition, canStepTransition, canItemTransition, assertContextTransition, assertExecutionTransition, assertStepTransition, assertItemTransition, isContextStreamChunkType, assertContextPartKey, } from "./context.contract.js";
8
+ export { CONTEXT_STATUSES, EXECUTION_STATUSES, STEP_STATUSES, ITEM_STATUSES, ITEM_TYPES, CHANNELS, TRACE_EVENT_KINDS, CONTEXT_STREAM_CHUNK_TYPES, STREAM_LIFECYCLE_CHUNK_TYPES, STREAM_TEXT_CHUNK_TYPES, STREAM_REASONING_CHUNK_TYPES, STREAM_ACTION_CHUNK_TYPES, STREAM_SOURCE_CHUNK_TYPES, STREAM_METADATA_CHUNK_TYPES, STREAM_ERROR_CHUNK_TYPES, CONTEXT_TRANSITIONS, EXECUTION_TRANSITIONS, STEP_TRANSITIONS, ITEM_TRANSITIONS, canContextTransition, canExecutionTransition, canStepTransition, canItemTransition, assertContextTransition, assertExecutionTransition, assertStepTransition, assertItemTransition, isContextStreamChunkType, assertContextPartKey, } from "./context.contract.js";
9
9
  export { DEFAULT_CODEX_TOOL_NAME, DEFAULT_CODEX_MODEL, codexToolInputSchema, buildDefaultCodexNarrative, didCodexToolExecute, createCodexContextBuilder, } from "./codex.js";
10
10
  export { useContext, } from "./react.js";
11
11
  export { parseContextStreamEvent, assertContextStreamTransitions, validateContextStreamTimeline, } from "./context.stream.js";
@@ -65,7 +65,7 @@ function mapAiSdkChunkType(providerChunkType) {
65
65
  return "chunk.reasoning_end";
66
66
  case "tool-input-start":
67
67
  case "tool-call-start":
68
- return "chunk.action_input_start";
68
+ return "chunk.action_started";
69
69
  case "tool-input-delta":
70
70
  case "tool-call-delta":
71
71
  return "chunk.action_input_delta";
@@ -73,11 +73,11 @@ function mapAiSdkChunkType(providerChunkType) {
73
73
  case "tool-input-end":
74
74
  case "tool-call":
75
75
  case "tool-call-end":
76
- return "chunk.action_input_available";
76
+ return "chunk.action_started";
77
77
  case "tool-output-available":
78
- return "chunk.action_output_available";
78
+ return "chunk.action_completed";
79
79
  case "tool-output-error":
80
- return "chunk.action_output_error";
80
+ return "chunk.action_failed";
81
81
  case "source-url":
82
82
  return "chunk.source_url";
83
83
  case "source-document":
@@ -100,9 +100,14 @@ function buildNormalizedData(chunk) {
100
100
  "id",
101
101
  "text",
102
102
  "delta",
103
+ "inputTextDelta",
104
+ "outputTextDelta",
103
105
  "state",
104
106
  "toolName",
105
107
  "toolCallId",
108
+ "input",
109
+ "output",
110
+ "error",
106
111
  "finishReason",
107
112
  "url",
108
113
  "title",
package/dist/schema.d.ts CHANGED
@@ -30,14 +30,6 @@ export declare const eventsDomain: import("@ekairos/domain").DomainSchemaResult<
30
30
  updatedAt: import("@instantdb/core").DataAttrDef<Date, false, false, false>;
31
31
  status: import("@instantdb/core").DataAttrDef<string, false, true, false>;
32
32
  iteration: import("@instantdb/core").DataAttrDef<number, true, true, false>;
33
- kind: import("@instantdb/core").DataAttrDef<string, false, true, false>;
34
- actionName: import("@instantdb/core").DataAttrDef<string, false, true, false>;
35
- actionInput: import("@instantdb/core").DataAttrDef<any, false, false, false>;
36
- actionOutput: import("@instantdb/core").DataAttrDef<any, false, false, false>;
37
- actionError: import("@instantdb/core").DataAttrDef<string, false, false, false>;
38
- actionRequests: import("@instantdb/core").DataAttrDef<any, false, false, false>;
39
- actionResults: import("@instantdb/core").DataAttrDef<any, false, false, false>;
40
- continueLoop: import("@instantdb/core").DataAttrDef<boolean, false, false, false>;
41
33
  errorText: import("@instantdb/core").DataAttrDef<string, false, false, false>;
42
34
  streamId: import("@instantdb/core").DataAttrDef<string, false, true, false>;
43
35
  streamClientId: import("@instantdb/core").DataAttrDef<string, false, true, false>;
package/dist/schema.js CHANGED
@@ -34,14 +34,6 @@ export const eventsDomain = domain("events")
34
34
  updatedAt: i.date().optional(),
35
35
  status: i.string().optional().indexed(), // running | completed | failed
36
36
  iteration: i.number().indexed(),
37
- kind: i.string().optional().indexed(), // message | action_execute | action_result
38
- actionName: i.string().optional().indexed(),
39
- actionInput: i.any().optional(),
40
- actionOutput: i.any().optional(),
41
- actionError: i.string().optional(),
42
- actionRequests: i.any().optional(),
43
- actionResults: i.any().optional(),
44
- continueLoop: i.boolean().optional(),
45
37
  errorText: i.string().optional(),
46
38
  streamId: i.string().optional().indexed(),
47
39
  streamClientId: i.string().optional().indexed(),
@@ -12,14 +12,6 @@ export type ContextReviewRequest = {
12
12
  };
13
13
  type ContextStepPatch = {
14
14
  status?: "running" | "completed" | "failed";
15
- kind?: "message" | "action_execute" | "action_result";
16
- actionName?: string;
17
- actionInput?: unknown;
18
- actionOutput?: unknown;
19
- actionError?: string;
20
- actionRequests?: any;
21
- actionResults?: any;
22
- continueLoop?: boolean;
23
15
  errorText?: string;
24
16
  };
25
17
  /**
@@ -567,15 +567,7 @@ export async function updateContextStep(params) {
567
567
  stepId: String(params.stepId),
568
568
  payload: {
569
569
  status: params.patch.status,
570
- kind: params.patch.kind,
571
- actionName: params.patch.actionName,
572
- actionInput: params.patch.actionInput,
573
- actionOutput: params.patch.actionOutput,
574
- actionError: params.patch.actionError,
575
570
  iteration: params.iteration,
576
- actionRequests: params.patch.actionRequests,
577
- actionResults: params.patch.actionResults,
578
- continueLoop: params.patch.continueLoop,
579
571
  errorText: params.patch.errorText,
580
572
  },
581
573
  },
@@ -618,15 +610,7 @@ export async function finalizeReactionStep(params) {
618
610
  stepId: String(params.stepId),
619
611
  payload: {
620
612
  status: params.patch.status,
621
- kind: params.patch.kind,
622
- actionName: params.patch.actionName,
623
- actionInput: params.patch.actionInput,
624
- actionOutput: params.patch.actionOutput,
625
- actionError: params.patch.actionError,
626
613
  iteration: params.iteration,
627
- actionRequests: params.patch.actionRequests,
628
- actionResults: params.patch.actionResults,
629
- continueLoop: params.patch.continueLoop,
630
614
  errorText: params.patch.errorText,
631
615
  },
632
616
  },
@@ -38,14 +38,6 @@ export declare class InstantStore implements ContextStore {
38
38
  }>;
39
39
  updateStep(stepId: string, patch: Partial<{
40
40
  status: "running" | "completed" | "failed";
41
- kind: "message" | "action_execute" | "action_result";
42
- actionName: string;
43
- actionInput: unknown;
44
- actionOutput: unknown;
45
- actionError: string;
46
- actionRequests: any;
47
- actionResults: any;
48
- continueLoop: boolean;
49
41
  errorText: string;
50
42
  updatedAt: Date;
51
43
  }>): Promise<void>;
@@ -517,9 +517,12 @@ export class InstantStore {
517
517
  }
518
518
  }
519
519
  const update = {
520
- ...patch,
521
520
  updatedAt: patch.updatedAt ?? new Date(),
522
521
  };
522
+ if (patch.status !== undefined)
523
+ update.status = patch.status;
524
+ if (patch.errorText !== undefined)
525
+ update.errorText = patch.errorText;
523
526
  await this.db.transact([this.db.tx.event_steps[stepId].update(update)]);
524
527
  }
525
528
  async linkItemToExecution(params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekairos/events",
3
- "version": "1.22.42-beta.development.0",
3
+ "version": "1.22.44-beta.development.0",
4
4
  "description": "Ekairos Events - Context-first workflow runtime",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -127,7 +127,7 @@
127
127
  },
128
128
  "dependencies": {
129
129
  "@ai-sdk/openai": "^2.0.52",
130
- "@ekairos/domain": "^1.22.42-beta.development.0",
130
+ "@ekairos/domain": "^1.22.44-beta.development.0",
131
131
  "@instantdb/admin": "0.22.158",
132
132
  "@instantdb/core": "0.22.142",
133
133
  "@vercel/mcp-adapter": "^1.0.0",