A node's worker label is worker, so a device is only a paired one

- NodeDef `device`/`device_policy` become `worker`/`worker_policy`, the
  issue `ignored_device` becomes `ignored_worker`, and the SDK's `@node`
  takes `worker=` and `worker_policy=`
- FlowStore._migrate renames the keys in published and draft documents
  once, bumping their version; a queued run's `needs` reads the old key
- placement passes the label as `label`, client regenerated
- docs: worker placement wording, MCP issuer without DOMAIN, device rows in
  the CLI data directory and the API table, device links in compose comments

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Melvin Strobl
2026-10-16 16:56:05 +02:00
co-authored by Claude Opus 5.5
parent f8011d2a8a
commit a9d453c9d9
40 changed files with 215 additions and 178 deletions
+11 -11
View File
@@ -2606,7 +2606,7 @@ export const NodeDef_InputSchema = {
title: 'Timeout',
description: "Seconds this node's code may be silent before it is stopped. A yield or an emit resets the clock, and the first call's imports are not charged to it. 0 disables the limit: the node runs until it finishes, and only a dead worker fails the call. Empty inherits the engine default."
},
device: {
worker: {
anyOf: [
{
type: 'string'
@@ -2615,14 +2615,14 @@ export const NodeDef_InputSchema = {
type: 'null'
}
],
title: 'Device',
title: 'Worker',
description: "Label of the worker this node's code must run on, such as 'gpu'. Empty means the engine's own workers. A run needing a label no attached worker carries waits rather than failing."
},
device_policy: {
worker_policy: {
type: 'string',
enum: ['require', 'prefer'],
title: 'Device Policy',
description: 'What to do when no worker carries `device`: wait for one, or run locally anyway.',
title: 'Worker Policy',
description: 'What to do when no worker carries `worker`: wait for one, or run locally anyway.',
default: 'require'
},
cache: {
@@ -2726,7 +2726,7 @@ export const NodeDef_OutputSchema = {
title: 'Timeout',
description: "Seconds this node's code may be silent before it is stopped. A yield or an emit resets the clock, and the first call's imports are not charged to it. 0 disables the limit: the node runs until it finishes, and only a dead worker fails the call. Empty inherits the engine default."
},
device: {
worker: {
anyOf: [
{
type: 'string'
@@ -2735,14 +2735,14 @@ export const NodeDef_OutputSchema = {
type: 'null'
}
],
title: 'Device',
title: 'Worker',
description: "Label of the worker this node's code must run on, such as 'gpu'. Empty means the engine's own workers. A run needing a label no attached worker carries waits rather than failing."
},
device_policy: {
worker_policy: {
type: 'string',
enum: ['require', 'prefer'],
title: 'Device Policy',
description: 'What to do when no worker carries `device`: wait for one, or run locally anyway.',
title: 'Worker Policy',
description: 'What to do when no worker carries `worker`: wait for one, or run locally anyway.',
default: 'require'
},
cache: {
@@ -4727,7 +4727,7 @@ export const ValidationIssueSchema = {
properties: {
code: {
type: 'string',
enum: ['cycle', 'unconnected_input', 'missing_initial_value', 'node_error', 'unauthenticated_hook', 'self_loop_needs_initial', 'missing_source', 'node_unhealthy', 'ignored_device', 'unknown_device', 'device_port'],
enum: ['cycle', 'unconnected_input', 'missing_initial_value', 'node_error', 'unauthenticated_hook', 'self_loop_needs_initial', 'missing_source', 'node_unhealthy', 'ignored_worker', 'unknown_device', 'device_port'],
title: 'Code'
},
message: {
+10 -10
View File
@@ -887,11 +887,11 @@ export type NodeDef_Input = {
/**
* Label of the worker this node's code must run on, such as 'gpu'. Empty means the engine's own workers. A run needing a label no attached worker carries waits rather than failing.
*/
device?: (string | null);
worker?: (string | null);
/**
* What to do when no worker carries `device`: wait for one, or run locally anyway.
* What to do when no worker carries `worker`: wait for one, or run locally anyway.
*/
device_policy?: 'require' | 'prefer';
worker_policy?: 'require' | 'prefer';
/**
* Whether a batch run may reuse an earlier execution of this node with the same source, settings and inputs. Turn it off for a function whose answer can change on its own.
*/
@@ -913,9 +913,9 @@ export type NodeDef_Input = {
};
/**
* What to do when no worker carries `device`: wait for one, or run locally anyway.
* What to do when no worker carries `worker`: wait for one, or run locally anyway.
*/
export type device_policy = 'require' | 'prefer';
export type worker_policy = 'require' | 'prefer';
/**
* A node as stored: identity, configuration and ports.
@@ -941,11 +941,11 @@ export type NodeDef_Output = {
/**
* Label of the worker this node's code must run on, such as 'gpu'. Empty means the engine's own workers. A run needing a label no attached worker carries waits rather than failing.
*/
device?: (string | null);
worker?: (string | null);
/**
* What to do when no worker carries `device`: wait for one, or run locally anyway.
* What to do when no worker carries `worker`: wait for one, or run locally anyway.
*/
device_policy?: 'require' | 'prefer';
worker_policy?: 'require' | 'prefer';
/**
* Whether a batch run may reuse an earlier execution of this node with the same source, settings and inputs. Turn it off for a function whose answer can change on its own.
*/
@@ -1514,7 +1514,7 @@ export type ValidationError = {
* Something wrong with a flow — a fault, or merely advisory.
*/
export type ValidationIssue = {
code: 'cycle' | 'unconnected_input' | 'missing_initial_value' | 'node_error' | 'unauthenticated_hook' | 'self_loop_needs_initial' | 'missing_source' | 'node_unhealthy' | 'ignored_device' | 'unknown_device' | 'device_port';
code: 'cycle' | 'unconnected_input' | 'missing_initial_value' | 'node_error' | 'unauthenticated_hook' | 'self_loop_needs_initial' | 'missing_source' | 'node_unhealthy' | 'ignored_worker' | 'unknown_device' | 'device_port';
message: string;
flow?: string;
nodes?: Array<(string)>;
@@ -1524,7 +1524,7 @@ export type ValidationIssue = {
advisory?: boolean;
};
export type code = 'cycle' | 'unconnected_input' | 'missing_initial_value' | 'node_error' | 'unauthenticated_hook' | 'self_loop_needs_initial' | 'missing_source' | 'node_unhealthy' | 'ignored_device' | 'unknown_device' | 'device_port';
export type code = 'cycle' | 'unconnected_input' | 'missing_initial_value' | 'node_error' | 'unauthenticated_hook' | 'self_loop_needs_initial' | 'missing_source' | 'node_unhealthy' | 'ignored_worker' | 'unknown_device' | 'device_port';
export type ValidationResult = {
issues?: Array<ValidationIssue>;
@@ -23,7 +23,7 @@ import { isLight, parsePalette, type Roles, rolesOf } from "./ui/core/theme"
*
* A bound setting is read the way a widget reads a value — the same live store
* and the same socket — so a panel's own settings messages are part of what
* its credential is entitled to (`flow/panels.py`, `messages_for`).
* its credential is entitled to (`flow/devices.py`, `messages_for`).
*/
/**