@kuralle-agents/core 0.3.18 → 0.3.20

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.
@@ -11,6 +11,11 @@ export interface ValidateInput {
11
11
  readonly assistantOutput: string;
12
12
  readonly toolCallsMade: ToolCallRecord[];
13
13
  readonly knowledgeCitations: SourceRef[];
14
+ /** Current flow state (`runState.state`). Lets a grounding validator ground a
15
+ * claim against evidence an ACTION node wrote (e.g. `state.orderRef` after a
16
+ * create-order tool), which `toolCallsMade` (this turn's model tool calls only)
17
+ * does not capture. `{}` when the turn ran outside a flow. */
18
+ readonly state: Readonly<Record<string, unknown>>;
14
19
  readonly abortSignal?: AbortSignal;
15
20
  }
16
21
  export type ValidateDecision = {
@@ -4,4 +4,4 @@ export type { TextDriverConfig } from './TextDriver.js';
4
4
  export { VoiceDriver } from './VoiceDriver.js';
5
5
  export type { VoiceDriverConfig } from './VoiceDriver.js';
6
6
  export { resolveVoiceGeminiTools, v2ToolsToGemini } from './voiceTools.js';
7
- export { setPendingUserInput, consumePendingUserInput, peekPendingUserInput } from './inputBuffer.js';
7
+ export { setPendingUserInput, consumePendingUserInput, peekPendingUserInput, hasPendingUserInput, } from './inputBuffer.js';
@@ -5,4 +5,4 @@ export { TextDriver, buildNodePrompt } from './TextDriver.js';
5
5
  // the primary primitive; cascaded voice runs over text (see livekit-plugin).
6
6
  export { VoiceDriver } from './VoiceDriver.js';
7
7
  export { resolveVoiceGeminiTools, v2ToolsToGemini } from './voiceTools.js';
8
- export { setPendingUserInput, consumePendingUserInput, peekPendingUserInput } from './inputBuffer.js';
8
+ export { setPendingUserInput, consumePendingUserInput, peekPendingUserInput, hasPendingUserInput, } from './inputBuffer.js';
@@ -3,4 +3,5 @@ export type { RuntimeLike } from './RuntimeLike.js';
3
3
  export { SessionWorkingMemory } from './WorkingMemory.js';
4
4
  export { TextDriver, VoiceDriver } from './channels/index.js';
5
5
  export type { VoiceDriverConfig } from './channels/index.js';
6
+ export { setPendingUserInput, consumePendingUserInput, peekPendingUserInput, hasPendingUserInput, } from './channels/index.js';
6
7
  export { isAbortSignal, type InterruptionEvent, type AbortOptions, type CancellationReason, } from '../types/index.js';
@@ -1,4 +1,8 @@
1
1
  export { createRuntime, Runtime, } from './Runtime.js';
2
2
  export { SessionWorkingMemory } from './WorkingMemory.js';
3
3
  export { TextDriver, VoiceDriver } from './channels/index.js';
4
+ // Pending-input buffer helpers — required by custom ChannelDriver authors to
5
+ // implement awaitUser the same FIFO-aware way the built-in drivers do (the
6
+ // buffer is an ordered queue since 0.3.13/H3, not a single slot).
7
+ export { setPendingUserInput, consumePendingUserInput, peekPendingUserInput, hasPendingUserInput, } from './channels/index.js';
4
8
  export { isAbortSignal, } from '../types/index.js';
@@ -117,6 +117,7 @@ async function runValidationPolicies(ctx, userMessage, assistantOutput, toolCall
117
117
  assistantOutput: current,
118
118
  toolCallsMade,
119
119
  knowledgeCitations,
120
+ state: ctx.runState.state,
120
121
  abortSignal: ctx.abortSignal,
121
122
  });
122
123
  recordValidationDecision(ctx, policy.name, decision);
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "git+https://github.com/kuralle/kuralle-agents.git",
7
7
  "directory": "packages/kuralle-core"
8
8
  },
9
- "version": "0.3.18",
9
+ "version": "0.3.20",
10
10
  "description": "A framework for structured conversational AI agents",
11
11
  "publishConfig": {
12
12
  "access": "public"
@@ -97,7 +97,7 @@
97
97
  "dotenv": "^16.4.0",
98
98
  "typescript": "^5.3.0",
99
99
  "zod": "^3.23.0",
100
- "@kuralle-agents/realtime-audio": "0.3.18"
100
+ "@kuralle-agents/realtime-audio": "0.3.20"
101
101
  },
102
102
  "dependencies": {
103
103
  "chrono-node": "^2.6.0",