@kuralle-agents/core 0.3.3 → 0.3.4

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.
@@ -34,11 +34,18 @@ export function schemaSatisfied(node, state) {
34
34
  return computeMissingFields(node, data).length === 0;
35
35
  }
36
36
  export function projectCollectData(node, state) {
37
+ // Hand onComplete EVERY field the node collected (all schema keys present in
38
+ // the collected data) — not just the required subset. Projecting only the
39
+ // required fields silently dropped optional extracted values (e.g. a welcome
40
+ // node that also captures occasion/recipient), so onComplete could never read
41
+ // them. The schema is the contract for what a collect node yields.
37
42
  const data = getCollectData(state, node.id);
38
- const required = node.required ?? inferRequiredFields(node.schema);
43
+ const fields = inferRequiredFields(node.schema);
39
44
  const projected = {};
40
- for (const field of required) {
41
- projected[field] = data[field];
45
+ for (const field of fields) {
46
+ if (field in data) {
47
+ projected[field] = data[field];
48
+ }
42
49
  }
43
50
  return projected;
44
51
  }
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.3",
9
+ "version": "0.3.4",
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.3"
100
+ "@kuralle-agents/realtime-audio": "0.3.4"
101
101
  },
102
102
  "dependencies": {
103
103
  "chrono-node": "^2.6.0",