@kuralle-agents/core 0.3.10 → 0.3.11

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/dist/index.d.ts CHANGED
@@ -80,7 +80,7 @@ export type { HarnessStreamPart } from './types/stream.js';
80
80
  export type { ChoiceOption, ResolvedSelection } from './types/selection.js';
81
81
  export type { RunState, StepRecord } from './runtime/durable/types.js';
82
82
  export type { RunStore } from './runtime/durable/RunStore.js';
83
- export type { ChannelDriver, TextDriver, VoiceDriver } from './runtime/channels/index.js';
83
+ export type { ChannelDriver, TextDriver } from './runtime/channels/index.js';
84
84
  export type { TurnResult } from './types/channel.js';
85
85
  export type { RunContext } from './types/run-context.js';
86
86
  export { createRuntime, Runtime, type HarnessConfig, type RunOptions, } from './runtime/Runtime.js';
@@ -65,8 +65,15 @@ export class VoiceDriver {
65
65
  return out;
66
66
  }
67
67
  async runStructured(node, ctx) {
68
- const system = composeSystem(ctx.baseInstructions, resolveInstructions(node.instructions, ctx.runState.state), ctx.runState.state);
68
+ const base = composeSystem(ctx.baseInstructions, resolveInstructions(node.instructions, ctx.runState.state), ctx.runState.state);
69
69
  const schema = node.schema;
70
+ // Parity with TextDriver: when the node offers choices, constrain the model
71
+ // to a single option id so an unconstrained string can't stall the decide.
72
+ const system = node.choices?.length
73
+ ? `${base}\n\nYou MUST pick exactly ONE option by its id. Valid ids: ${node.choices
74
+ .map((c) => c.id)
75
+ .join(', ')}. Respond with only the chosen id, nothing else.`
76
+ : base;
70
77
  const { object } = await generateObject({
71
78
  model: ctx.model,
72
79
  schema,
@@ -1,4 +1,8 @@
1
1
  export { TextDriver, buildNodePrompt } from './TextDriver.js';
2
+ // PAUSED: the realtime VoiceDriver is not on the primary (text) path and is not
3
+ // re-exported from the package's headline API. It stays here for the realtime
4
+ // stack (`@kuralle-agents/realtime-audio`) via the `/runtime` subpath. Text is
5
+ // the primary primitive; cascaded voice runs over text (see livekit-plugin).
2
6
  export { VoiceDriver } from './VoiceDriver.js';
3
7
  export { resolveVoiceGeminiTools, v2ToolsToGemini } from './voiceTools.js';
4
8
  export { setPendingUserInput, consumePendingUserInput, peekPendingUserInput } from './inputBuffer.js';
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.10",
9
+ "version": "0.3.11",
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.10"
100
+ "@kuralle-agents/realtime-audio": "0.3.11"
101
101
  },
102
102
  "dependencies": {
103
103
  "chrono-node": "^2.6.0",