@exulu/backend 5.11.0 → 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/dist/{chunk-3AEINUGF.js → chunk-U4UIVZST.js} +87 -27
- package/dist/{convert-exulu-tools-to-ai-sdk-tools-FX6KTVPQ.js → convert-exulu-tools-to-ai-sdk-tools-WEC42QHZ.js} +1 -1
- package/dist/index.cjs +741 -340
- package/dist/index.d.cts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +366 -38
- package/ee/schemas.ts +23 -0
- package/ee/workers.ts +24 -0
- package/package.json +1 -1
package/ee/workers.ts
CHANGED
|
@@ -7,6 +7,8 @@ import { serializeError } from "@SRC/utils/serialize-error.ts";
|
|
|
7
7
|
import { jsonbSafeStringify } from "@SRC/utils/jsonb-safe.ts";
|
|
8
8
|
import { finishTurnMetadata } from "@SRC/exulu/turn-metadata.ts";
|
|
9
9
|
import { getEnabledTools } from "@SRC/utils/enabled-tools.ts";
|
|
10
|
+
import { getEnabledSkills } from "@SRC/utils/enabled-skills.ts";
|
|
11
|
+
import type { ExuluSkill } from "@EXULU_TYPES/skill";
|
|
10
12
|
import { ExuluStorage } from "@SRC/exulu/storage.ts";
|
|
11
13
|
import type { ExuluAgent } from "@EXULU_TYPES/models/agent.ts";
|
|
12
14
|
import type { ExuluQueueConfig } from "@EXULU_TYPES/queue-config.ts";
|
|
@@ -609,6 +611,7 @@ export const createWorkers = async (
|
|
|
609
611
|
variables: data.inputs,
|
|
610
612
|
// Tag LLM spend to this routine (cron + ad-hoc share this path).
|
|
611
613
|
routine: { id: workflow.id, name: workflow.name },
|
|
614
|
+
jobResultId,
|
|
612
615
|
sessionId,
|
|
613
616
|
resumeFromIndex,
|
|
614
617
|
// Approval-gated tools pause unless the routine opted
|
|
@@ -1687,6 +1690,7 @@ export const processUiMessagesFlow = async ({
|
|
|
1687
1690
|
config,
|
|
1688
1691
|
variables,
|
|
1689
1692
|
routine,
|
|
1693
|
+
jobResultId,
|
|
1690
1694
|
sessionId,
|
|
1691
1695
|
resumeFromIndex,
|
|
1692
1696
|
respectToolApprovals,
|
|
@@ -1706,6 +1710,12 @@ export const processUiMessagesFlow = async ({
|
|
|
1706
1710
|
* callers leave this undefined — they have no routine context.
|
|
1707
1711
|
*/
|
|
1708
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;
|
|
1709
1719
|
/**
|
|
1710
1720
|
* Session-backed runs (spec §5.1): persist each step's messages to
|
|
1711
1721
|
* agent_messages at the step boundary, pass the session to generateStream
|
|
@@ -1759,6 +1769,18 @@ export const processUiMessagesFlow = async ({
|
|
|
1759
1769
|
enabledTools?.map((x) => x.name + " (" + x.id + ")"),
|
|
1760
1770
|
);
|
|
1761
1771
|
|
|
1772
|
+
// The agent's skills, resolved like the chat route does (routes.ts): the
|
|
1773
|
+
// list goes into the system prompt and createSessionSandbox downloads the
|
|
1774
|
+
// SKILL.md folders into the session sandbox. Without it a routine's
|
|
1775
|
+
// sandbox has no skills/ folder at all, so the readFile the step text asks
|
|
1776
|
+
// for ("Nutze den Skill …") fails with "No such file", which fails the whole
|
|
1777
|
+
// step (ALGI routine runs 2026-11-02 … 11-13; chat turns were unaffected).
|
|
1778
|
+
const enabledSkills: ExuluSkill[] = await getEnabledSkills(agent, []);
|
|
1779
|
+
console.log(
|
|
1780
|
+
"[EXULU] enabled skills",
|
|
1781
|
+
enabledSkills.map((x) => `${x.name} v${x.current_version ?? "?"}`),
|
|
1782
|
+
);
|
|
1783
|
+
|
|
1762
1784
|
if (!agent.model) {
|
|
1763
1785
|
throw new Error(
|
|
1764
1786
|
`Agent ${agent.name} (${agent.id}) has no model configured.`,
|
|
@@ -1893,7 +1915,9 @@ export const processUiMessagesFlow = async ({
|
|
|
1893
1915
|
previousMessages: messageHistory.messages,
|
|
1894
1916
|
message: currentMessage,
|
|
1895
1917
|
currentTools: enabledTools,
|
|
1918
|
+
currentSkills: enabledSkills,
|
|
1896
1919
|
allExuluTools: tools,
|
|
1920
|
+
routineRun: jobResultId ? { jobResultId } : undefined,
|
|
1897
1921
|
languageModel: resolvedLanguageModel,
|
|
1898
1922
|
toolConfigs: agent.tools,
|
|
1899
1923
|
exuluConfig: config,
|