Merge branch 'main' into web-chat-live

This commit is contained in:
2026-10-19 07:01:39 +01:00
9 changed files with 583 additions and 3 deletions
+23
View File
@@ -60,6 +60,29 @@ export class PipelinesRepository {
return response.graph;
}
/**
* Creates a new pipeline from a definition `source` (the `submit` command),
* create-only, mirroring `PipelinesRepository.createPipeline`: the name must
* not already exist, so this can only ever add a draft and never overwrite a
* retained pipeline. A blank name is refused before anything is sent, exactly
* like the Android client; the sent name is trimmed. No run is started.
*/
async submit(name, source) {
if (!String(name ?? "").trim()) {
throw new ProtocolError("Enter a pipeline name.");
}
const response = await this.#client.call({
type: Protocol.SUBMIT,
name: String(name).trim(),
source,
create_only: true,
});
if (!response.detail) {
throw new ProtocolError("The server returned no pipeline detail.");
}
return response.detail;
}
async listRuns() {
const response = await this.#client.call({ type: Protocol.LIST_RUNS });
return { runs: response.runs ?? [], usage: response.usage ?? null };