@cadenza.io/core 1.5.1 → 1.6.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/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1333,6 +1333,8 @@ var Task = class extends SignalParticipant {
|
|
|
1333
1333
|
} else if (constraints.oneOf && !constraints.oneOf.includes(value)) {
|
|
1334
1334
|
errors[`${path}.${key}`] = `Value '${value}' for '${key}' not in oneOf ${JSON.stringify(constraints.oneOf)}`;
|
|
1335
1335
|
}
|
|
1336
|
+
} else if (schema.strict) {
|
|
1337
|
+
errors[`${path}.${key}`] = `Key '${key}' is not allowed`;
|
|
1336
1338
|
}
|
|
1337
1339
|
}
|
|
1338
1340
|
if (Object.keys(errors).length > 0) {
|
|
@@ -1592,6 +1594,28 @@ var GraphRegistry = class _GraphRegistry {
|
|
|
1592
1594
|
},
|
|
1593
1595
|
"Updates task id."
|
|
1594
1596
|
).doOn("meta.task.global_id_set");
|
|
1597
|
+
this.updateTaskInputSchema = Cadenza.createMetaTask(
|
|
1598
|
+
"Update task input schema",
|
|
1599
|
+
(context) => {
|
|
1600
|
+
const { __id, __schema } = context;
|
|
1601
|
+
const task = this.tasks.get(__id);
|
|
1602
|
+
if (!task) return true;
|
|
1603
|
+
task.setInputContextSchema(__schema);
|
|
1604
|
+
return true;
|
|
1605
|
+
},
|
|
1606
|
+
"Updates task input schema."
|
|
1607
|
+
).doOn("meta.task.input_schema_updated");
|
|
1608
|
+
this.updateTaskOutputSchema = Cadenza.createMetaTask(
|
|
1609
|
+
"Update task input schema",
|
|
1610
|
+
(context) => {
|
|
1611
|
+
const { __id, __schema } = context;
|
|
1612
|
+
const task = this.tasks.get(__id);
|
|
1613
|
+
if (!task) return true;
|
|
1614
|
+
task.setOutputContextSchema(__schema);
|
|
1615
|
+
return true;
|
|
1616
|
+
},
|
|
1617
|
+
"Updates task input schema."
|
|
1618
|
+
).doOn("meta.task.output_schema_updated");
|
|
1595
1619
|
this.getTaskById = Cadenza.createMetaTask(
|
|
1596
1620
|
"Get task by id",
|
|
1597
1621
|
(context) => {
|