A run says whether the dashboard, the CLI or a script asked for it

`POST /runs/flows/{name}` hardcoded `cause: "api"`, so every row in the
history claimed the same origin. The body now carries an optional `cause`,
closed to the values the column knows — the dashboard sends nothing and stays
"api", `fluksio run` says "cli", and the SDK client says "sdk".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Gf7WaExcJ9bs3kfJXB3nK
This commit is contained in:
2026-08-25 22:06:29 +02:00
co-authored by Claude Opus 5
parent b194071ca5
commit 1148e54c9e
9 changed files with 83 additions and 9 deletions
+6
View File
@@ -2384,6 +2384,12 @@ export const RunCreateSchema = {
type: 'boolean',
title: 'No Cache',
default: false
},
cause: {
type: 'string',
enum: ['api', 'cli', 'sdk'],
title: 'Cause',
default: 'api'
}
},
type: 'object',
+3
View File
@@ -865,8 +865,11 @@ export type RunCreate = {
seed?: (number | null);
draft?: boolean;
no_cache?: boolean;
cause?: 'api' | 'cli' | 'sdk';
};
export type cause = 'api' | 'cli' | 'sdk';
export type RunDetail = {
id: string;
flow: string;