@exulu/backend 5.11.1 → 5.12.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/ee/schemas.ts CHANGED
@@ -351,6 +351,23 @@ export const jobResultsSchema: ExuluTableDefinition = {
351
351
  name: "workflow",
352
352
  type: "text",
353
353
  },
354
+ // Work status of a routine run — the fachliche status people work
355
+ // with (spec 2026-11-16-routine-work-status-design), separate from
356
+ // the technical `state`. A key from the routine's work_statuses.
357
+ {
358
+ name: "work_status",
359
+ type: "text",
360
+ index: true,
361
+ },
362
+ {
363
+ name: "work_status_updated_at",
364
+ type: "date",
365
+ },
366
+ // { kind: "user" | "tool" | "agent" | "default", id?, user? }
367
+ {
368
+ name: "work_status_updated_by",
369
+ type: "json",
370
+ },
354
371
  ],
355
372
  };
356
373
 
@@ -490,6 +507,12 @@ export const workflowTemplatesSchema: ExuluTableDefinition = {
490
507
  type: "boolean",
491
508
  default: false,
492
509
  },
510
+ // Per-routine work statuses: { statuses: [{ key, label, color?, done? }], default }.
511
+ // null / empty list = feature off for this routine.
512
+ {
513
+ name: "work_statuses",
514
+ type: "json",
515
+ },
493
516
  {
494
517
  name: "queue",
495
518
  type: "text"
package/ee/workers.ts CHANGED
@@ -611,6 +611,7 @@ export const createWorkers = async (
611
611
  variables: data.inputs,
612
612
  // Tag LLM spend to this routine (cron + ad-hoc share this path).
613
613
  routine: { id: workflow.id, name: workflow.name },
614
+ jobResultId,
614
615
  sessionId,
615
616
  resumeFromIndex,
616
617
  // Approval-gated tools pause unless the routine opted
@@ -1689,6 +1690,7 @@ export const processUiMessagesFlow = async ({
1689
1690
  config,
1690
1691
  variables,
1691
1692
  routine,
1693
+ jobResultId,
1692
1694
  sessionId,
1693
1695
  resumeFromIndex,
1694
1696
  respectToolApprovals,
@@ -1708,6 +1710,12 @@ export const processUiMessagesFlow = async ({
1708
1710
  * callers leave this undefined — they have no routine context.
1709
1711
  */
1710
1712
  routine?: { id: string; name: string };
1713
+ /**
1714
+ * The job_results row of this run. Tools then receive a `routine` object
1715
+ * (routine.runs.current.update) and writes count as coming from the
1716
+ * worker's run (spec 2026-11-16-routine-work-status-design).
1717
+ */
1718
+ jobResultId?: string;
1711
1719
  /**
1712
1720
  * Session-backed runs (spec §5.1): persist each step's messages to
1713
1721
  * agent_messages at the step boundary, pass the session to generateStream
@@ -1909,6 +1917,7 @@ export const processUiMessagesFlow = async ({
1909
1917
  currentTools: enabledTools,
1910
1918
  currentSkills: enabledSkills,
1911
1919
  allExuluTools: tools,
1920
+ routineRun: jobResultId ? { jobResultId } : undefined,
1912
1921
  languageModel: resolvedLanguageModel,
1913
1922
  toolConfigs: agent.tools,
1914
1923
  exuluConfig: config,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@exulu/backend",
3
3
  "author": "Qventu B.V.",
4
- "version": "5.11.1",
4
+ "version": "5.12.0",
5
5
  "main": "./dist/index.js",
6
6
  "private": false,
7
7
  "publishConfig": {