wren node: Train in the panel, as a run of wren's training flow

POST/GET /flows/{name}/nodes/{id}/train submit wren_train on the node's
targets, examples and tests and read its latest run (run.for_node,
cause "train"); "Use this model" writes `model` into the draft.
This commit is contained in:
2026-10-25 01:18:54 +02:00
parent 07fa5a2dc2
commit e9941b770d
11 changed files with 671 additions and 3 deletions
+55
View File
@@ -4505,6 +4505,61 @@ export const TokenRequestSchema = {
title: 'TokenRequest'
} as const;
export const TrainingSchema = {
properties: {
id: {
type: 'string',
title: 'Id'
},
status: {
type: 'string',
title: 'Status'
},
error: {
type: 'string',
title: 'Error',
default: ''
},
result: {
additionalProperties: true,
type: 'object',
title: 'Result',
default: {}
},
model: {
type: 'string',
title: 'Model',
default: ''
},
threshold: {
anyOf: [
{
type: 'number'
},
{
type: 'null'
}
],
title: 'Threshold'
},
test_exact_match: {
anyOf: [
{
type: 'number'
},
{
type: 'null'
}
],
title: 'Test Exact Match'
}
},
type: 'object',
required: ['id', 'status'],
title: 'Training',
description: "A wren node's latest training run, as its panel shows it."
} as const;
export const TriggerRequestSchema = {
properties: {
values: {